38 lines
707 B
Go
38 lines
707 B
Go
package effect
|
|
|
|
import (
|
|
"blazing/logic/service/fight/action"
|
|
"blazing/logic/service/fight/input"
|
|
"blazing/logic/service/fight/node"
|
|
)
|
|
|
|
// Effect 485: 消除对手能力提升状态,消除成功则恢复自身所有体力
|
|
type Effect485 struct {
|
|
node.EffectNode
|
|
}
|
|
|
|
func (e *Effect485) Skill_Use() bool {
|
|
isfff := false
|
|
for i, v := range e.Ctx().Opp.Prop[:] {
|
|
|
|
if v > 0 {
|
|
isfff = true
|
|
e.Ctx().Opp.SetProp(e.Ctx().Our, int8(i), 0)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if isfff {
|
|
// 恢复自身所有体力
|
|
maxHp := e.Ctx().Our.CurrentPet.GetMaxHP()
|
|
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, maxHp)
|
|
}
|
|
|
|
return true
|
|
}
|
|
func init() {
|
|
input.InitEffect(input.EffectType.Skill, 485, &Effect485{})
|
|
|
|
}
|