Files
bl/logic/service/fight/effect/effect_60.go
2025-11-21 05:47:51 +00:00

41 lines
729 B
Go

package effect
import (
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
"github.com/shopspring/decimal"
)
/**
* n回合内,每回合附加m点固定伤害
*/
func init() {
input.InitEffect(input.EffectType.Skill, 60, &Effect60{})
}
type Effect60 struct {
node.EffectNode
}
// 默认添加回合
func (e *Effect60) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.EffectNode.Duration(e.SideEffectArgs[0])
}
func (e *Effect60) OnSkill() bool {
if !e.Hit() {
return true
}
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Fixed,
Damage: decimal.NewFromInt(int64(e.SideEffectArgs[1]))})
return true
}