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

28 lines
658 B
Go

package effect
import (
"blazing/logic/service/fight/input"
)
// Effect 199: 下次被击败后,下一个出场的精灵{0}等级+{1}
type Effect199 struct {
FixedDurationNeg1Base
}
func (e *Effect199) SwitchOut(in *input.Input) bool {
if e.Input == in {
if !e.Ctx().Our.CurrentPet.Alive() { // 被击败
// 设置下一个出场精灵的增益效果
effectType := int8(e.Args()[0].IntPart()) // xx类型
effectValue := int8(e.Args()[1].IntPart()) // 等级+k
e.Ctx().Our.SetProp(e.Ctx().Our, effectType, effectValue)
}
e.Alive(false)
}
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 199, &Effect199{})
}