Skip to content
This repository has been archived by the owner on Jul 3, 2024. It is now read-only.

Commit

Permalink
Removed CanUse junk conditions
Browse files Browse the repository at this point in the history
Removed onLastAbility and skipClippingCheck from all rotations
  • Loading branch information
Tykku committed May 13, 2024
1 parent 1582d84 commit 6738eb4
Show file tree
Hide file tree
Showing 32 changed files with 67 additions and 269 deletions.
30 changes: 15 additions & 15 deletions BasicRotations/Healer/SGE_Default.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ protected override bool DefenseAreaAbility(IAction nextGCD, out IAction? act)
{
if (Addersgall <= 1)
{
if (PanhaimaPvE.CanUse(out act, onLastAbility: true)) return true;
if (PanhaimaPvE.CanUse(out act)) return true;
}

if (KeracholePvE.CanUse(out act, onLastAbility: true)) return true;
if (KeracholePvE.CanUse(out act)) return true;

if (HolosPvE.CanUse(out act, onLastAbility: true)) return true;
if (HolosPvE.CanUse(out act)) return true;

return base.DefenseAreaAbility(nextGCD, out act);
}
Expand All @@ -58,19 +58,19 @@ protected override bool DefenseSingleAbility(IAction nextGCD, out IAction? act)
{
if (Addersgall <= 1)
{
if (HaimaPvE.CanUse(out act, onLastAbility: true)) return true;
if (HaimaPvE.CanUse(out act)) return true;
}

if (TaurocholePvE.CanUse(out act, onLastAbility: true) && TaurocholePvE.Target.Target?.GetHealthRatio() < 0.8) return true;
if (TaurocholePvE.CanUse(out act) && TaurocholePvE.Target.Target?.GetHealthRatio() < 0.8) return true;

if (Addersgall <= 1)
{
if ((!HaimaPvE.EnoughLevel || HaimaPvE.Cooldown.ElapsedAfter(20)) && PanhaimaPvE.CanUse(out act, onLastAbility: true)) return true;
if ((!HaimaPvE.EnoughLevel || HaimaPvE.Cooldown.ElapsedAfter(20)) && PanhaimaPvE.CanUse(out act)) return true;
}

if ((!TaurocholePvE.EnoughLevel || TaurocholePvE.Cooldown.ElapsedAfter(20)) && KeracholePvE.CanUse(out act, onLastAbility: true)) return true;
if ((!TaurocholePvE.EnoughLevel || TaurocholePvE.Cooldown.ElapsedAfter(20)) && KeracholePvE.CanUse(out act)) return true;

if (HolosPvE.CanUse(out act, onLastAbility: true)) return true;
if (HolosPvE.CanUse(out act)) return true;

return base.DefenseSingleAbility(nextGCD, out act);
}
Expand All @@ -81,13 +81,13 @@ protected override bool HealAreaAbility(IAction nextGCD, out IAction? act)
if (PhysisIiPvE.CanUse(out act)) return true;
if (!PhysisIiPvE.EnoughLevel && PhysisPvE.CanUse(out act)) return true;

if (KeracholePvE.CanUse(out act, onLastAbility: true) && EnhancedKeracholeTrait.EnoughLevel) return true;
if (KeracholePvE.CanUse(out act) && EnhancedKeracholeTrait.EnoughLevel) return true;

if (HolosPvE.CanUse(out act, onLastAbility: true) && PartyMembersAverHP < 0.50f) return true;
if (HolosPvE.CanUse(out act) && PartyMembersAverHP < 0.50f) return true;

if (IxocholePvE.CanUse(out act, onLastAbility: true)) return true;
if (IxocholePvE.CanUse(out act)) return true;

if (KeracholePvE.CanUse(out act, onLastAbility: true)) return true;
if (KeracholePvE.CanUse(out act)) return true;

return base.HealAreaAbility(nextGCD, out act);
}
Expand All @@ -107,14 +107,14 @@ protected override bool HealSingleAbility(IAction nextGCD, out IAction? act)
var tank = PartyMembers.GetJobCategory(JobRole.Tank);
if (Addersgall < 1 && (tank.Any(t => t.GetHealthRatio() < 0.65f) || PartyMembers.Any(b => b.GetHealthRatio() < 0.20f)))
{
if (HaimaPvE.CanUse(out act, onLastAbility: true)) return true;
if (HaimaPvE.CanUse(out act)) return true;

if (PhysisIiPvE.CanUse(out act)) return true;
if (!PhysisIiPvE.EnoughLevel && PhysisPvE.CanUse(out act)) return true;

if (HolosPvE.CanUse(out act, onLastAbility: true)) return true;
if (HolosPvE.CanUse(out act)) return true;

if ((!HaimaPvE.EnoughLevel || HaimaPvE.Cooldown.ElapsedAfter(20)) && PanhaimaPvE.CanUse(out act, onLastAbility: true)) return true;
if ((!HaimaPvE.EnoughLevel || HaimaPvE.Cooldown.ElapsedAfter(20)) && PanhaimaPvE.CanUse(out act)) return true;
}

if (tank.Any(t => t.GetHealthRatio() < 0.60f))
Expand Down
6 changes: 3 additions & 3 deletions BasicRotations/Magical/BLM_Default.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ protected override bool EmergencyAbility(IAction nextGCD, out IAction? act)
//To Fire
if (CurrentMp >= 7200 && UmbralIceStacks == 2 && ParadoxPvE.EnoughLevel)
{
if ((HasFire || HasSwift) && TransposePvE.CanUse(out act, onLastAbility: true)) return true;
if ((HasFire || HasSwift) && TransposePvE.CanUse(out act)) return true;
}
if (nextGCD.IsTheSameTo(false, FireIiiPvE) && HasFire)
{
Expand All @@ -104,7 +104,7 @@ protected override bool GeneralGCD(out IAction? act)
if (InFireOrIce(out act, out var mustGo)) return true;
if (mustGo) return false;
//Triplecast for moving.
if (IsMoving && HasHostilesInRange && TriplecastPvE.CanUse(out act, usedUp: true, skipClippingCheck: true)) return true;
if (IsMoving && HasHostilesInRange && TriplecastPvE.CanUse(out act, usedUp: true)) return true;

if (AddElementBase(out act)) return true;
if (ScathePvE.CanUse(out act)) return true;
Expand Down Expand Up @@ -265,7 +265,7 @@ private bool DoFire(out IAction? act)
if (AddThunder(out act, 0)) return true;
}

if (TriplecastPvE.CanUse(out act, skipClippingCheck: true)) return true;
if (TriplecastPvE.CanUse(out act)) return true;

if (AddThunder(out act, 0) && Player.WillStatusEndGCD(1, 0, true,
StatusID.Thundercloud)) return true;
Expand Down
4 changes: 2 additions & 2 deletions BasicRotations/Melee/DRG_Default.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ protected override bool EmergencyAbility(IAction nextGCD, out IAction? act)
if (nextGCD.IsTheSameTo(true, FullThrustPvE, CoerthanTormentPvE)
|| Player.HasStatus(true, StatusID.LanceCharge) && nextGCD.IsTheSameTo(false, FangAndClawPvE))
{
if (LifeSurgePvE.CanUse(out act, onLastAbility: true, usedUp: true)) return true;
if (LifeSurgePvE.CanUse(out act, usedUp: true)) return true;
}

return base.EmergencyAbility(nextGCD, out act);
Expand All @@ -43,7 +43,7 @@ protected override bool AttackAbility(IAction nextGCD, out IAction? act)
if (IsBurst && InCombat)
{
if (LanceChargePvE.CanUse(out act, skipAoeCheck: true) && Player.HasStatus(true, StatusID.PowerSurge)) return true;
if (LanceChargePvE.CanUse(out act, skipAoeCheck: true, onLastAbility: true) && !Player.HasStatus(true, StatusID.PowerSurge)) return true;
if (LanceChargePvE.CanUse(out act, skipAoeCheck: true) && !Player.HasStatus(true, StatusID.PowerSurge)) return true;

if (DragonSightPvE.CanUse(out act, skipAoeCheck: true)) return true;
if (BattleLitanyPvE.CanUse(out act, skipAoeCheck: true)) return true;
Expand Down
2 changes: 1 addition & 1 deletion BasicRotations/Melee/MNK_Default.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ protected override bool EmergencyAbility(IAction nextGCD, out IAction? act)
if (InCombat)
{
if (UseBurstMedicine(out act)) return true;
if (IsBurst && !CombatElapsedLessGCD(2) && RiddleOfFirePvE.CanUse(out act, onLastAbility: true)) return true;
if (IsBurst && !CombatElapsedLessGCD(2) && RiddleOfFirePvE.CanUse(out act)) return true;
}
return base.EmergencyAbility(nextGCD, out act);
}
Expand Down
6 changes: 3 additions & 3 deletions BasicRotations/Melee/RPR_Default.cs
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,14 @@ protected override bool GeneralGCD(out IAction? act)

if (HasSoulReaver)
{
if (GuillotinePvE.CanUse(out act, skipClippingCheck: true)) return true;
if (GuillotinePvE.CanUse(out act)) return true;
if (Player.HasStatus(true, StatusID.EnhancedGibbet))
{
if (GibbetPvE.CanUse(out act, skipClippingCheck: true, skipComboCheck: true)) return true;
if (GibbetPvE.CanUse(out act, skipComboCheck: true)) return true;
}
else
{
if (GallowsPvE.CanUse(out act, skipClippingCheck: true, skipComboCheck: true)) return true;
if (GallowsPvE.CanUse(out act, skipComboCheck: true)) return true;
}
}

Expand Down
2 changes: 1 addition & 1 deletion BasicRotations/PVPRotations/Healer/AST_Default.PVP.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ private bool TryPurify(out IAction? action)
{
if (status.Value && Player.HasStatus(true, (StatusID)status.Key))
{
return PurifyPvP.CanUse(out action, skipClippingCheck: true);
return PurifyPvP.CanUse(out action);
}
}

Expand Down
2 changes: 1 addition & 1 deletion BasicRotations/PVPRotations/Healer/SCH_Default.PVP.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ private bool TryPurify(out IAction? action)
{
if (status.Value && Player.HasStatus(true, (StatusID)status.Key))
{
return PurifyPvP.CanUse(out action, skipClippingCheck: true);
return PurifyPvP.CanUse(out action);
}
}

Expand Down
2 changes: 1 addition & 1 deletion BasicRotations/PVPRotations/Healer/SGE_Default.PVP.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ private bool TryPurify(out IAction? action)
{
if (status.Value && Player.HasStatus(true, (StatusID)status.Key))
{
return PurifyPvP.CanUse(out action, skipClippingCheck: true);
return PurifyPvP.CanUse(out action);
}
}

Expand Down
2 changes: 1 addition & 1 deletion BasicRotations/PVPRotations/Healer/WHM_Default.PVP.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ private bool TryPurify(out IAction? action)
{
if (status.Value && Player.HasStatus(true, (StatusID)status.Key))
{
return PurifyPvP.CanUse(out action, skipClippingCheck: true);
return PurifyPvP.CanUse(out action);
}
}

Expand Down
2 changes: 1 addition & 1 deletion BasicRotations/PVPRotations/Magical/BLM_Default.PVP.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ private bool TryPurify(out IAction? action)
{
if (status.Value && Player.HasStatus(true, (StatusID)status.Key))
{
return PurifyPvP.CanUse(out action, skipClippingCheck: true);
return PurifyPvP.CanUse(out action);
}
}

Expand Down
2 changes: 1 addition & 1 deletion BasicRotations/PVPRotations/Magical/RDM_Default.PvP.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ private bool TryPurify(out IAction? action)
{
if (status.Value && Player.HasStatus(true, (StatusID)status.Key))
{
return PurifyPvP.CanUse(out action, skipClippingCheck: true);
return PurifyPvP.CanUse(out action);
}
}

Expand Down
2 changes: 1 addition & 1 deletion BasicRotations/PVPRotations/Magical/SMN_Default.PVP.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ private bool TryPurify(out IAction? action)
{
if (status.Value && Player.HasStatus(true, (StatusID)status.Key))
{
return PurifyPvP.CanUse(out action, skipClippingCheck: true);
return PurifyPvP.CanUse(out action);
}
}

Expand Down
2 changes: 1 addition & 1 deletion BasicRotations/PVPRotations/Melee/DRG_Default.PVP.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ private bool TryPurify(out IAction? action)
{
if (status.Value && Player.HasStatus(true, (StatusID)status.Key))
{
return PurifyPvP.CanUse(out action, skipClippingCheck: true);
return PurifyPvP.CanUse(out action);
}
}

Expand Down
2 changes: 1 addition & 1 deletion BasicRotations/PVPRotations/Melee/MNK_Default.PVP.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ private bool TryPurify(out IAction? action)
{
if (status.Value && Player.HasStatus(true, (StatusID)status.Key))
{
return PurifyPvP.CanUse(out action, skipClippingCheck: true);
return PurifyPvP.CanUse(out action);
}
}

Expand Down
2 changes: 1 addition & 1 deletion BasicRotations/PVPRotations/Melee/NIN_Default.PVP.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ private bool TryPurify(out IAction? action)
{
if (status.Value && Player.HasStatus(true, (StatusID)status.Key))
{
return PurifyPvP.CanUse(out action, skipClippingCheck: true);
return PurifyPvP.CanUse(out action);
}
}

Expand Down
2 changes: 1 addition & 1 deletion BasicRotations/PVPRotations/Melee/RPR_Default.PVP.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ private bool TryPurify(out IAction? action)
{
if (status.Value && Player.HasStatus(true, (StatusID)status.Key))
{
return PurifyPvP.CanUse(out action, skipClippingCheck: true);
return PurifyPvP.CanUse(out action);
}
}

Expand Down
2 changes: 1 addition & 1 deletion BasicRotations/PVPRotations/Melee/SAM_Default.PVP.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ private bool TryPurify(out IAction? action)
{
if (status.Value && Player.HasStatus(true, (StatusID)status.Key))
{
return PurifyPvP.CanUse(out action, skipClippingCheck: true);
return PurifyPvP.CanUse(out action);
}
}

Expand Down
2 changes: 1 addition & 1 deletion BasicRotations/PVPRotations/Ranged/BRD_Default.PVP.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ private bool TryPurify(out IAction? action)
{
if (status.Value && Player.HasStatus(true, (StatusID)status.Key))
{
return PurifyPvP.CanUse(out action, skipClippingCheck: true);
return PurifyPvP.CanUse(out action);
}
}

Expand Down
2 changes: 1 addition & 1 deletion BasicRotations/PVPRotations/Ranged/DNC_Default.PVP.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ private bool TryPurify(out IAction? action)
{
if (status.Value && Player.HasStatus(true, (StatusID)status.Key))
{
return PurifyPvP.CanUse(out action, skipClippingCheck: true);
return PurifyPvP.CanUse(out action);
}
}

Expand Down
4 changes: 2 additions & 2 deletions BasicRotations/PVPRotations/Ranged/MCH_Default.PvP.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ private bool TryPurify(out IAction? action)
{
if (status.Value && Player.HasStatus(true, (StatusID)status.Key))
{
return PurifyPvP.CanUse(out action, skipClippingCheck: true);
return PurifyPvP.CanUse(out action);
}
}

Expand All @@ -86,7 +86,7 @@ protected override bool AttackAbility(IAction nextGCD, out IAction? act)

if (BishopAutoturretPvP.CanUse(out act, skipAoeCheck: true)) return true;
// Use WildfirePvP if Overheated
if (Player.HasStatus(true, StatusID.Overheated_3149) && WildfirePvP.CanUse(out act, skipAoeCheck: true, skipComboCheck: true, skipClippingCheck: true)) return true;
if (Player.HasStatus(true, StatusID.Overheated_3149) && WildfirePvP.CanUse(out act, skipAoeCheck: true, skipComboCheck: true)) return true;

// Check if BioblasterPvP, AirAnchorPvP, or ChainSawPvP can be used
if (InCombat && !Player.HasStatus(true, StatusID.Analysis) &&
Expand Down
2 changes: 1 addition & 1 deletion BasicRotations/PVPRotations/Tank/DRK_Default.PVP.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ private bool TryPurify(out IAction? action)
{
if (status.Value && Player.HasStatus(true, (StatusID)status.Key))
{
return PurifyPvP.CanUse(out action, skipClippingCheck: true);
return PurifyPvP.CanUse(out action);
}
}

Expand Down
2 changes: 1 addition & 1 deletion BasicRotations/PVPRotations/Tank/GNB_Default.PVP.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ private bool TryPurify(out IAction? action)
{
if (status.Value && Player.HasStatus(true, (StatusID)status.Key))
{
return PurifyPvP.CanUse(out action, skipClippingCheck: true);
return PurifyPvP.CanUse(out action);
}
}

Expand Down
2 changes: 1 addition & 1 deletion BasicRotations/PVPRotations/Tank/PLD_Default.PVP.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ private bool TryPurify(out IAction? action)
{
if (status.Value && Player.HasStatus(true, (StatusID)status.Key))
{
return PurifyPvP.CanUse(out action, skipClippingCheck: true);
return PurifyPvP.CanUse(out action);
}
}

Expand Down
2 changes: 1 addition & 1 deletion BasicRotations/PVPRotations/Tank/WAR_Default.PVP.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ private bool TryPurify(out IAction? action)
{
if (status.Value && Player.HasStatus(true, (StatusID)status.Key))
{
return PurifyPvP.CanUse(out action, skipClippingCheck: true);
return PurifyPvP.CanUse(out action);
}
}

Expand Down
2 changes: 1 addition & 1 deletion BasicRotations/Ranged/BRD_Default.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ protected override bool AttackAbility(IAction nextGCD, out IAction? act)

if (RadiantFinalePvE.EnoughLevel && RadiantFinalePvE.Cooldown.IsCoolingDown && BattleVoicePvE.EnoughLevel && !BattleVoicePvE.Cooldown.IsCoolingDown) return false;

if (TheWanderersMinuetPvE.CanUse(out act, onLastAbility: true))
if (TheWanderersMinuetPvE.CanUse(out act))
{
if (SongEndAfter(ARMYRemainTime) && (Song != Song.NONE || Player.HasStatus(true, StatusID.ArmysEthos))) return true;
}
Expand Down
6 changes: 3 additions & 3 deletions BasicRotations/Ranged/DNC_Default.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,19 @@ protected override bool EmergencyAbility(IAction nextGCD, out IAction? act)
{
if (Player.HasStatus(true, StatusID.TechnicalFinish))
{
if (DevilmentPvE.CanUse(out act, skipClippingCheck: true)) return true;
if (DevilmentPvE.CanUse(out act)) return true;
}

// Special handling if the last action was Quadruple Technical Finish and level requirement is met
if (IsLastGCD(ActionID.QuadrupleTechnicalFinishPvE) && TechnicalStepPvE.EnoughLevel)
{
// Attempt to use Devilment ignoring clipping checks
if (DevilmentPvE.CanUse(out act, skipClippingCheck: true)) return true;
if (DevilmentPvE.CanUse(out act)) return true;
}
// Similar handling for Double Standard Finish when level requirement is not met
else if (IsLastGCD(ActionID.DoubleStandardFinishPvE) && !TechnicalStepPvE.EnoughLevel)
{
if (DevilmentPvE.CanUse(out act, skipClippingCheck: true)) return true;
if (DevilmentPvE.CanUse(out act)) return true;
}

// If currently dancing, defer to the base class emergency handling
Expand Down
8 changes: 4 additions & 4 deletions BasicRotations/Ranged/MCH_Default.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ protected override bool EmergencyAbility(IAction nextGCD, out IAction? act)
// Attempt to use Reassemble if it's ready
if (isReassembleUsable)
{
if (ReassemblePvE.CanUse(out act, onLastAbility: true, skipClippingCheck: true, skipComboCheck: true, usedUp: true)) return true;
if (ReassemblePvE.CanUse(out act, skipComboCheck: true, usedUp: true)) return true;
}

// Use Ricochet
Expand Down Expand Up @@ -89,7 +89,7 @@ protected override bool AttackAbility(IAction nextGCD, out IAction? act)
// If Wildfire is active, use Hypercharge.....Period
if (Player.HasStatus(true, StatusID.Wildfire_1946))
{
return HyperchargePvE.CanUse(out act, skipClippingCheck: true);
return HyperchargePvE.CanUse(out act);
}
// Burst
if (IsBurst)
Expand All @@ -98,7 +98,7 @@ protected override bool AttackAbility(IAction nextGCD, out IAction? act)

{
if ((IsLastAbility(false, HyperchargePvE) || Heat >= 50) && !CombatElapsedLess(10) && CanUseHyperchargePvE(out _)
&& !LowLevelHyperCheck && WildfirePvE.CanUse(out act, onLastAbility: true)) return true;
&& !LowLevelHyperCheck && WildfirePvE.CanUse(out act)) return true;
}
}
// Use Hypercharge if at least 12 seconds of combat and (if wildfire will not be up in 30 seconds or if you hit 100 heat)
Expand Down Expand Up @@ -142,7 +142,7 @@ protected override bool GeneralGCD(out IAction? act)
}

// Special condition for using ChainSaw outside of AoE checks if no action is chosen within 4 GCDs.
if (!CombatElapsedLessGCD(4) && ChainSawPvE.CanUse(out act, skipAoeCheck: true)) return true;
if (!CombatElapsedLessGCD(4) && ChainSawPvE.CanUse(out act)) return true;

// AoE actions: ChainSaw and SpreadShot based on their usability.
if (SpreadShotPvE.CanUse(out _))
Expand Down
Loading

0 comments on commit 6738eb4

Please sign in to comment.