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

42 lines
1.1 KiB
Go
Raw Normal View History

package effect
import (
"blazing/logic/service/fight/action"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
)
/**
*n 回合内,自身与对方反转战斗时属性
*/
type Effect55 struct {
node.EffectNode
}
func (e *Effect55) Turn_Start(fattack *action.SelectSkillAction, sattack *action.SelectSkillAction) {
2025-11-17 19:31:51 +00:00
e.Ctx().Our.CurrentPet.PetInfo.Type, e.Ctx().Opp.CurrentPet.PetInfo.Type = e.Ctx().Opp.CurrentPet.PetInfo.Type, e.Ctx().Our.CurrentPet.PetInfo.Type
}
func init() {
ret := &Effect55{}
input.InitEffect(input.EffectType.Skill, 55, ret)
}
func (e *Effect55) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.EffectNode.Duration(e.EffectNode.SideEffectArgs[0])
}
2025-11-17 19:31:51 +00:00
func (e *Effect55) Alive(t ...bool) bool {
2025-11-17 19:31:51 +00:00
if e.BoolisFalse(t...) && e.Hit() { //说明到了回合结束取消节点,那么就将变化过的属性变化回来
2025-11-17 19:31:51 +00:00
//还原属性
e.Ctx().Our.CurrentPet.PetInfo.Type, e.Ctx().Opp.CurrentPet.PetInfo.Type = e.Ctx().Opp.CurrentPet.PetInfo.Type, e.Ctx().Our.CurrentPet.PetInfo.Type
}
2025-11-17 19:31:51 +00:00
return e.EffectNode.Alive(t...)
}