41 lines
729 B
Go
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
|
|
}
|