39 lines
777 B
Go
39 lines
777 B
Go
package effect
|
||
|
||
import (
|
||
"blazing/logic/service/fight/info"
|
||
"blazing/logic/service/fight/input"
|
||
"blazing/logic/service/fight/node"
|
||
|
||
"github.com/alpacahq/alpacadecimal"
|
||
)
|
||
|
||
// 515 - 自身处于能力下降状态时附加n点固定伤害,并解除这些能力下降状态
|
||
type Effect515 struct {
|
||
node.EffectNode
|
||
}
|
||
|
||
func (e *Effect515) OnSkill() bool {
|
||
var is bool
|
||
for i := 0; i < 6; i++ {
|
||
if e.Ctx().Our.Prop[i] < 0 {
|
||
is = true
|
||
}
|
||
|
||
}
|
||
if !is {
|
||
return true
|
||
}
|
||
|
||
fixedDamage := alpacadecimal.NewFromInt(int64(e.Args()[0].IntPart()))
|
||
damageZone := &info.DamageZone{
|
||
Type: info.DamageType.Fixed,
|
||
Damage: fixedDamage,
|
||
}
|
||
e.Ctx().Opp.Damage(e.Ctx().Our, damageZone)
|
||
return true
|
||
}
|
||
func init() {
|
||
input.InitEffect(input.EffectType.NewSel, 515, &Effect515{})
|
||
}
|