31 lines
725 B
Go
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{})
|
|
}
|