Files
bl/logic/service/fight/effect/430.go
xinian faad50b1df
Some checks failed
ci/woodpecker/push/my-first-workflow Pipeline failed
feat: 新增战斗技能效果并修复初始化注册
2026-03-13 16:05:43 +08:00

42 lines
837 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package effect
import (
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
)
// 430 - 消除对手能力强化状态若消除状态成功则自身XX等级m
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{})
}