Files
bl/logic/service/fight/effect/524.go
xinian 9c6f3988de
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
refactor: 重构 CurrentPet 为 CurPet
2026-04-04 04:34:43 +08:00

31 lines
725 B
Go

package effect
import (
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
)
// Effect 524: {0}回合内若被对手击败则对手疲惫{1}回合
type Effect524 struct {
RoundEffectArg0Base
}
func (e *Effect524) SwitchOut(in *input.Input) bool {
if e.Input == in {
if !e.Ctx().Our.CurPet[0].Alive() { // 被击败
// 给对手添加疲惫状态
tiredEffect := e.Ctx().Our.InitEffect(input.EffectType.Status, int(info.PetStatus.Tired))
if tiredEffect != nil {
tiredEffect.Duration(int(e.Args()[1].IntPart()))
e.Ctx().Opp.AddEffect(e.Ctx().Our, tiredEffect)
}
}
e.Alive(false)
}
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 524, &Effect524{})
}