30 lines
662 B
Go
30 lines
662 B
Go
package effect
|
||
|
||
import (
|
||
"blazing/logic/service/fight/action"
|
||
"blazing/logic/service/fight/input"
|
||
"blazing/logic/service/fight/node"
|
||
)
|
||
|
||
// Effect 579: 若当回合未击败对手,则恢复自身最大体力的1/{0}
|
||
type Effect579 struct {
|
||
node.EffectNode
|
||
}
|
||
|
||
func (e *Effect579) Action_end() bool {
|
||
// 检查对手是否还活着
|
||
if e.Ctx().Opp.CurrentPet.Alive() {
|
||
// 恢复自身最大体力的 1/divisor
|
||
maxHp := e.Ctx().Our.CurrentPet.GetMaxHP()
|
||
|
||
// 执行治疗
|
||
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, maxHp.Div(e.Args()[0]))
|
||
}
|
||
|
||
return true
|
||
}
|
||
|
||
func init() {
|
||
input.InitEffect(input.EffectType.Skill, 579, &Effect579{})
|
||
}
|