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

29 lines
544 B
Go

package effect
import (
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
)
// Effect 456: 若对手体力不足{0}则直接秒杀
type Effect456 struct {
node.EffectNode
}
func (e *Effect456) OnSkill() bool {
if e.Ctx().Opp.CurrentPet.GetHP().Cmp(e.Args()[0]) > 0 {
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Fixed,
Damage: e.Args()[0],
})
}
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 456, &Effect456{})
}