Files
bl/logic/service/fight/effect/effect_448.go
xinian de8ce9fc81
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
feat: 新增多个战斗效果并修复逻辑问题
2026-03-07 14:51:32 +08:00

43 lines
928 B
Go

package effect
import (
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
)
type Effect448 struct {
node.EffectNode
rev bool
}
func (e *Effect448) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.EffectNode.Duration(e.EffectNode.SideEffectArgs[0])
}
func (e *Effect448) OnSkill() bool {
for i, v := range e.SideEffectArgs[1:] {
if e.rev {
e.Ctx().Opp.SetProp(e.Ctx().Our, int8(i), int8(v), info.AbilityOpType.SUB)
} else {
e.Ctx().Our.SetProp(e.Ctx().Our, int8(i), int8(v), info.AbilityOpType.ADD)
}
}
return true
}
// -----------------------------------------------------------
// 初始化
// -----------------------------------------------------------
func init() {
input.InitEffect(input.EffectType.Skill, 448, &Effect448{
rev: true,
})
input.InitEffect(input.EffectType.Skill, 433, &Effect448{
rev: false,
})
}