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) { 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); } } } }