package effect import ( "blazing/logic/service/fight/action" "blazing/logic/service/fight/input" "blazing/logic/service/fight/node" ) /** * n回合防御力和对手相同 */ type Effect51 struct { node.EffectNode oldtype uint32 } func (e *Effect51) Turn_Start(fattack *action.SelectSkillAction, sattack *action.SelectSkillAction) { e.oldtype = e.Ctx().Opp.CurrentPet.Info.Prop[0] e.Ctx().Our.CurrentPet.Info.Prop[0] = e.Ctx().Opp.CurrentPet.Info.Prop[0] } func init() { ret := &Effect51{} input.InitEffect(input.EffectType.Skill, 51, ret) } func (e *Effect51) SetArgs(t *input.Input, a ...int) { e.EffectNode.SetArgs(t, a...) e.EffectNode.Duration(e.EffectNode.SideEffectArgs[0]) } func (e *Effect51) Alive(t ...bool) bool { if e.BoolisFalse(t...) && e.Hit() { //说明到了回合结束取消节点,那么就将变化过的属性变化回来 //还原属性 e.Ctx().Our.CurrentPet.Info.Prop[0] = e.oldtype } return e.EffectNode.Alive(t...) }