Files
bl/logic/service/fight/effect/63.go

35 lines
627 B
Go

package effect
import (
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
)
// Effect 63: 将能力下降状态反馈给对手
type Effect63 struct {
node.EffectNode
}
// ----------------------
// 执行时逻辑
// ----------------------
func (e *Effect63) OnSkill() bool {
for i, v := range e.Ctx().Our.Prop[:] {
if v < 0 {
e.Ctx().Opp.SetProp(e.Ctx().Our, int8(i), v)
e.Ctx().Our.SetProp(e.Ctx().Our, int8(i), 0)
}
}
return true
}
// ----------------------
// 注册所有效果
// ----------------------
func init() {
input.InitEffect(input.EffectType.Skill, 63, &Effect63{})
}