Files
bl/logic/service/fight/effect/effect_187.go
昔念 d367f9d1d4
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
41
2026-03-07 23:54:01 +08:00

34 lines
837 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package effect
import (
"blazing/logic/service/fight/action"
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
)
// 187 - n回合内若对手使用属性技能则自身恢复1/m最大体力值
type Effect187 struct {
node.EffectNode
}
func (e *Effect187) Skill_Use_ex() bool {
if e.Ctx().SkillEntity != nil && e.Ctx().SkillEntity.Category() == info.Category.STATUS {
maxHp := e.Ctx().Our.CurrentPet.GetMaxHP()
healAmount := maxHp.Div(e.Args()[1]) // 1/m
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, healAmount)
}
return true
}
func (e *Effect187) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.EffectNode.Duration(a[0]) // 持续n回合
}
func init() {
input.InitEffect(input.EffectType.NewSel, 187, &Effect187{})
}