Files
bl/logic/service/fight/effect/530.go
xinian a2e4ec867c
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
feat: 新增技能效果525、530、550、558、565
2026-03-17 14:35:06 +08:00

31 lines
610 B
Go

package effect
import (
"blazing/logic/service/fight/action"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
)
// 530 -
type Effect530 struct {
node.EffectNode
}
func (e *Effect530) Skill_Use() bool {
maxHp := e.Ctx().Our.CurrentPet.GetMaxHP()
healAmount := maxHp.Div(e.Args()[0]) // 1/n
if e.Ctx().Our.CurrentPet.GetHP().Cmp(healAmount) < 0{ // 先出手
// 回复1/n的最大体力值
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, maxHp)
}
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 530, &Effect530{})
}