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

35 lines
642 B
Go

package effect
import (
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
)
// Effect 85: 使对手的能力提升效果转化到自己身上
type Effect85 struct {
node.EffectNode
}
// ----------------------
// 执行时逻辑
// ----------------------
func (e *Effect85) OnSkill() bool {
for i, v := range e.Ctx().Opp.Prop[:] {
if v > 0 {
e.Ctx().Our.SetProp(e.Ctx().Our, int8(i), v)
e.Ctx().Opp.SetProp(e.Ctx().Our, int8(i), 0)
}
}
return true
}
// ----------------------
// 注册所有效果
// ----------------------
func init() {
input.InitEffect(input.EffectType.Skill, 85, &Effect85{})
}