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

39 lines
784 B
Go

package effect
import (
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
"github.com/alpacahq/alpacadecimal"
)
// Effect 515: 自身处于能力下降状态时附加{0}点固定伤害,并解除这些能力下降状态
type Effect515 struct {
node.EffectNode
}
func (e *Effect515) OnSkill() bool {
var is bool
for i := 0; i < 6; i++ {
if e.Ctx().Our.Prop[i] < 0 {
is = true
}
}
if !is {
return true
}
fixedDamage := alpacadecimal.NewFromInt(int64(e.Args()[0].IntPart()))
damageZone := &info.DamageZone{
Type: info.DamageType.Fixed,
Damage: fixedDamage,
}
e.Ctx().Opp.Damage(e.Ctx().Our, damageZone)
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 515, &Effect515{})
}