public override void ProcessExitZone(TileMoveData moveData) { base.ProcessExitZone(moveData); if (this._data.Source != null && moveData.DoAttackOfOpportunity) { if (moveData.Target.Proxy.LParty != this._data.Source.Proxy.LParty) { var data = new ActionData(); data.Ability = EAbility.Attack_Of_Opportunity; data.DisplayDefended = false; data.Source = this._data.Source; data.Target = moveData.Target.Tile; data.WpnAbility = false; this._action = new MAction(data); moveData.ParentEvent.AddChildAction(this._action); this._action.TryProcessNoDisplay(); foreach (var hit in this._action.Data.Hits) { if (!FHit.HasFlag(hit.Data.Flags.CurFlags, FHit.Flags.Block) && !FHit.HasFlag(hit.Data.Flags.CurFlags, FHit.Flags.Dodge) && !FHit.HasFlag(hit.Data.Flags.CurFlags, FHit.Flags.Parry)) { moveData.Callback(this); this._action.AddCallback(moveData.ParentEvent.TryDone); } } this._action.DisplayAction(); } } }
public override void ProcessEnterZone(TileMoveData moveData) { base.ProcessEnterZone(moveData); if (this._suppressionZoneData.Source != null) { if (moveData.Target.Proxy.LParty != this._suppressionZoneData.Source.Proxy.LParty) { var data = new ActionData(); data.Ability = EAbility.Aim; data.LWeapon = this._suppressionZoneData.LWeapon; data.ParentWeapon = this._suppressionZoneData.ParentWeapon; data.Source = this._suppressionZoneData.Source; data.Target = moveData.Target.Tile; data.WpnAbility = true; this._action = new MAction(data); moveData.ParentEvent.AddChildAction(this._action); this._action.AddCallback(moveData.ParentEvent.TryDone); var staminaCalc = new StaminaCalculator(); var cost = staminaCalc.Process(this._action); if (cost <= this._action.Data.Source.Proxy.GetPoints(ESecondaryStat.Stamina)) { moveData.Callback(this); this._action.TryProcessNoDisplay(); this.HandleAim(null); } } } }
public override void ProcessEnterZone(TileMoveData moveData) { base.ProcessEnterZone(moveData); var resist = new ResistCalculator(); if (!resist.DidResist(moveData.Target, this._data.Effect, this._data.ResistBase)) { var slime = this.GetSlimeEffect(); this._data.Effect.ApplyEffectFx(moveData.Target.Tile); moveData.Target.Proxy.AddEffect(slime); } }
private void TryProcessMove() { if (this.VerifyData()) { var apData = new EvAPModData(); apData.Char = this._data.Char; apData.IsHeal = false; apData.Qty = this._data.Cost; apData.ToDisplay = false; var apEvent = new EvAPMod(apData); apEvent.TryProcess(); var staminaData = new EvStaminaModData(); staminaData.Char = this._data.Char; staminaData.IsHeal = false; staminaData.Qty = this._data.Cost; staminaData.ToDisplay = false; var staminaEvent = new EvStaminaMod(staminaData); staminaEvent.TryProcess(); var exitData = new TileMoveData(); exitData.Callback = this.SetPathInterrupted; exitData.DoAttackOfOpportunity = this._data.DoAttackOfOpportunity; exitData.ParentEvent = this; exitData.Target = this._data.Char; this._data.Source.ProcessExitTile(exitData); if (!this._pathInterrupted) { var script = this._data.Char.GameHandle.AddComponent <SObjectMove>(); var data = new SObjectMoveData(); data.Epsilon = ViewParams.MOVE_EPSILON; data.Object = this._data.Char.GameHandle; data.Source = this._data.Source.Handle.transform.position; data.Speed = ViewParams.MOVE_SPEED; data.Target = this._data.Target.Handle.transform.position; script.Init(data); script.AddCallback(this.MoveDone); } else { this.MoveDone(null); } } }
private void MoveDone(object o) { if (!this._pathInterrupted) { this._data.Char.ProcessEnterNewTile(this._data.Target); this._data.Source.SetCurrent(null); this._data.Target.SetCurrent(this._data.Char); var moveData = new TileMoveData(); moveData.Callback = this.SetPathInterrupted; moveData.ParentEvent = this; moveData.Target = this._data.Char; this._data.Target.ProcessEnterTile(moveData); this.TryDone(null); } else { this.TryDone(null); } }
public override void ProcessEnterZone(TileMoveData moveData) { this.FirstSpearWallHit = false; this.SpearWallHit = false; base.ProcessEnterZone(moveData); if (this._spearWallData.Source != null) { if (moveData.Target.Proxy.LParty != this._spearWallData.Source.Proxy.LParty) { moveData.Callback(this); var data = new ActionData(); data.Ability = EAbility.Pierce; data.LWeapon = this._spearWallData.LWeapon; data.ParentWeapon = this._spearWallData.ParentWeapon; data.Source = this._spearWallData.Source; data.Target = moveData.Target.Tile; data.WpnAbility = true; this._action = new MAction(data); this._action.AddCallback(moveData.ParentEvent.TryDone); moveData.ParentEvent.AddChildAction(this._action); var staminaCalc = new StaminaCalculator(); var cost = staminaCalc.Process(this._action); if (FActionStatus.HasFlag(this._action.Data.Source.Proxy.GetActionFlags().CurFlags, FActionStatus.Flags.Spearwalling) && cost <= this._action.Data.Source.Proxy.GetPoints(ESecondaryStat.Stamina)) { this._action.TryProcessNoDisplay(); foreach (var hit in this._action.Data.Hits) { if (!FHit.HasFlag(hit.Data.Flags.CurFlags, FHit.Flags.Block) && !FHit.HasFlag(hit.Data.Flags.CurFlags, FHit.Flags.Dodge) && !FHit.HasFlag(hit.Data.Flags.CurFlags, FHit.Flags.Parry)) { this.SpearWallHit = true; } } this.HandleSpeared(null); } } } }
public virtual void ProcessExitZone(TileMoveData data) { }