Files
bl/logic/service/fight/effect/effect_448.go
xinian 1e37d71878
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
fix: 修复属性设置逻辑
2026-03-17 10:57:11 +08:00

45 lines
874 B
Go

package effect
import (
"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 v == 0 {
continue
}
if e.rev {
e.Ctx().Opp.SetProp(e.Ctx().Our, int8(i), int8(v))
} else {
e.Ctx().Our.SetProp(e.Ctx().Our, int8(i), int8(v))
}
}
return true
}
// -----------------------------------------------------------
// 初始化
// -----------------------------------------------------------
func init() {
input.InitEffect(input.EffectType.Skill, 448, &Effect448{
rev: true,
})
input.InitEffect(input.EffectType.Skill, 433, &Effect448{
rev: false,
})
}