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

42 lines
847 B
Go

package effect
import (
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
)
// Effect 430: 消除对手能力提升状态,若消除状态成功,则自身{0}等级+{1}
type Effect430 struct {
node.EffectNode
}
func (e *Effect430) Skill_Use() bool {
var isadd bool
// 检查对手是否有能力强化状态
for i, v := range e.Ctx().Opp.Prop[:] {
if v > 0 {
if e.Ctx().Opp.SetProp(e.Ctx().Our, int8(i), 0) {
isadd = true
}
return true
}
}
if !isadd {
return true
}
// 如果成功消除了状态,提升自身能力等级
effectType := int8(e.Args()[0].IntPart()) // XX类型
effectValue := int8(e.Args()[1].IntPart()) // 等级m
e.Ctx().Our.SetProp(e.Ctx().Our, effectType, effectValue)
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 430, &Effect430{})
}