34 lines
626 B
Go
34 lines
626 B
Go
package effect
|
|
|
|
import (
|
|
"blazing/logic/service/fight/input"
|
|
"blazing/logic/service/fight/node"
|
|
)
|
|
|
|
// Effect 506: 下回合受到致命伤害时残留{0}点体力
|
|
type Effect506 struct {
|
|
node.EffectNode
|
|
triggered bool
|
|
}
|
|
|
|
func (e *Effect506) Skill_Use() bool {
|
|
e.triggered = true
|
|
|
|
return true
|
|
}
|
|
func (e *Effect506) Action_end() bool {
|
|
if !e.triggered {
|
|
return true
|
|
}
|
|
minHealth := uint32(e.Args()[0].IntPart()) // m点体力
|
|
if e.Ctx().Our.CurPet[0].GetHP().IntPart() == 0 {
|
|
e.Ctx().Our.CurPet[0].Info.Hp = minHealth
|
|
}
|
|
|
|
return true
|
|
}
|
|
func init() {
|
|
input.InitEffect(input.EffectType.Skill, 506, &Effect506{})
|
|
|
|
}
|