Files
bl/logic/service/fight/effect/532.go
xinian 875ad668aa
Some checks failed
ci/woodpecker/push/my-first-workflow Pipeline failed
feat: 实现战斗效果逻辑和接口重构
2026-03-28 21:57:22 +08:00

32 lines
721 B
Go

package effect
import (
"blazing/logic/service/fight/action"
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
)
// Effect 532: {0}回合内每回合使用技能恢复自身最大体力的1/{1}并造成等量百分比伤害
type Effect532 struct {
RoundEffectArg0Base
}
func (h *Effect532) OnSkill() bool {
maxHp := h.Ctx().Our.CurrentPet.GetMaxHP()
healAmount := maxHp.Div(h.Args()[1])
h.Ctx().Our.Heal(h.Ctx().Our, &action.SelectSkillAction{}, healAmount)
h.Ctx().Opp.Damage(h.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Percent,
Damage: healAmount,
})
return true
}
// SetArgs 设置参数
func init() {
input.InitEffect(input.EffectType.Skill, 532, &Effect532{})
}