Files
bl/logic/service/fight/effect/456.go
xinian 78a68148ce
Some checks failed
ci/woodpecker/push/my-first-workflow Pipeline failed
chore: update fight logic and effect implementations
2026-04-05 02:25:44 +08:00

29 lines
556 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.TargetInput().CurPet[0].GetHP().Cmp(e.Args()[0]) > 0 {
e.TargetInput().Damage(e.CarrierInput(), &info.DamageZone{
Type: info.DamageType.Fixed,
Damage: e.Args()[0],
})
}
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 456, &Effect456{})
}