39 lines
784 B
Go
39 lines
784 B
Go
package effect
|
|
|
|
import (
|
|
"blazing/logic/service/fight/info"
|
|
"blazing/logic/service/fight/input"
|
|
"blazing/logic/service/fight/node"
|
|
|
|
"github.com/alpacahq/alpacadecimal"
|
|
)
|
|
|
|
// Effect 515: 自身处于能力下降状态时附加{0}点固定伤害,并解除这些能力下降状态
|
|
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.Skill, 515, &Effect515{})
|
|
}
|