Files
bl/logic/service/fight/effect/effect_28.go
xinian 9c6f3988de
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
refactor: 重构 CurrentPet 为 CurPet
2026-04-04 04:34:43 +08:00

31 lines
534 B
Go

package effect
import (
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
)
/**
* 降低对方 1/n 的 体力
*/
func init() {
input.InitEffect(input.EffectType.Skill, 28, &Effect28{})
}
// Effect 28: 降低对方1/{0}的hp
type Effect28 struct {
node.EffectNode
}
func (e *Effect28) OnSkill() bool {
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Percent,
Damage: e.Ctx().Opp.CurPet[0].GetHP().Div(e.Args()[0]),
})
return true
}