Skip to content

Commit

Permalink
Merge pull request #594 from FFXIV-CombatReborn/PLDxSMNstuff
Browse files Browse the repository at this point in the history
Update various classes with new properties and logic
  • Loading branch information
LTS-FFXIV authored Jan 20, 2025
2 parents 340ceed + 389282e commit ecae346
Show file tree
Hide file tree
Showing 5 changed files with 81 additions and 9 deletions.
10 changes: 7 additions & 3 deletions BasicRotations/Magical/SMN_Default.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,14 @@ public enum SummonOrderType : byte
[Description("Ruby-Emerald-Topaz")] RubyEmeraldTopaz,
}

[RotationConfig(CombatType.PvE, Name = "Use Crimson Cyclone. Will use at any range, regardless of saftey use with caution.")]
[RotationConfig(CombatType.PvE, Name = "Use Crimson Cyclone at any range, regardless of saftey use with caution (Enabling this ignores the below distance setting).")]
public bool AddCrimsonCyclone { get; set; } = true;

[RotationConfig(CombatType.PvE, Name = "Use Crimson Cyclone. Even When MOVING")]
[Range(1, 20, ConfigUnitType.Yalms)]
[RotationConfig(CombatType.PvE, Name = "Max distance you can be from the target for Crimson Cyclone use")]
public float CrimsonCycloneDistance { get; set; } = 3.0f;

[RotationConfig(CombatType.PvE, Name = "Use Crimson Cyclone when moving")]
public bool AddCrimsonCycloneMoving { get; set; } = false;

[RotationConfig(CombatType.PvE, Name = "Use Swiftcast on Garuda")]
Expand Down Expand Up @@ -190,7 +194,7 @@ protected override bool GeneralGCD(out IAction? act)

if (GemshinePvE.CanUse(out act)) return true;

if ((!IsMoving || AddCrimsonCycloneMoving) && AddCrimsonCyclone && CrimsonCyclonePvE.CanUse(out act, skipAoeCheck: true)) return true;
if ((!IsMoving || AddCrimsonCycloneMoving) && (AddCrimsonCyclone || CrimsonCyclonePvE.Target.Target?.DistanceToPlayer() <= CrimsonCycloneDistance) && CrimsonCyclonePvE.CanUse(out act, skipAoeCheck: true)) return true;

if (!SummonBahamutPvE.EnoughLevel && HasHostilesInRange && AetherchargePvE.CanUse(out act)) return true;

Expand Down
18 changes: 13 additions & 5 deletions BasicRotations/Tank/PLD_Default.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ protected override bool EmergencyAbility(IAction nextGCD, out IAction? act)
if (!RageOfHalonePvE.EnoughLevel && nextGCD.IsTheSameTo(true, RiotBladePvE, TotalEclipsePvE) && FightOrFlightPvE.CanUse(out act)) return true;
if (!ProminencePvE.EnoughLevel && nextGCD.IsTheSameTo(true, RageOfHalonePvE, TotalEclipsePvE) && FightOrFlightPvE.CanUse(out act)) return true;
if (!AtonementPvE.EnoughLevel && nextGCD.IsTheSameTo(true, RoyalAuthorityPvE, ProminencePvE) && FightOrFlightPvE.CanUse(out act)) return true;
if (AtonementPvE.EnoughLevel && (Player.HasStatus(true, StatusID.AtonementReady) || IsLastAction(true, RoyalAuthorityPvE)) && FightOrFlightPvE.CanUse(out act)) return true;
if (AtonementPvE.EnoughLevel && (Player.HasStatus(true, StatusID.AtonementReady, StatusID.SepulchreReady, StatusID.SupplicationReady, StatusID.DivineMight) || IsLastAction(true, RoyalAuthorityPvE)) && FightOrFlightPvE.CanUse(out act)) return true;


// if requiscat is able to proc confiteor, use it immediately after Fight or Flight
if (RequiescatMasteryTrait.EnoughLevel)
Expand Down Expand Up @@ -215,9 +216,16 @@ protected override bool GeneralGCD(out IAction? act)
if (GoringBladePvE.CanUse(out act)) return true;

// Atonement Combo
if (SepulchrePvE.CanUse(out act)) return true;
if (SupplicationPvE.CanUse(out act)) return true;
if (AtonementPvE.CanUse(out act)) return true;
if ((!FightOrFlightPvE.Cooldown.WillHaveOneCharge(1) || HasFightOrFlight || Player.WillStatusEndGCD(1, 0, true, StatusID.AtonementReady)) && AtonementPvE.CanUse(out act)) return true;
if (((!HasAtonementReady && (SepulchreReady || SupplicationReady || HasDivineMight)) ||
(HasAtonementReady && !HasDivineMight)) &&
!Player.HasStatus(true, StatusID.Medicated) && !HasFightOrFlight && !RageOfHalonePvE.CanUse(out act, skipComboCheck: false))
{
if (RiotBladePvE.CanUse(out act) || FastBladePvE.CanUse(out act)) return true;
}
if ((RageOfHalonePvE.CanUse(out _, skipComboCheck: false) || HasFightOrFlight || Player.WillStatusEndGCD(1, 0, true, StatusID.SupplicationReady)) && SupplicationPvE.CanUse(out act)) return true;
if (RequiescatStacks > 0 && IsLastGCD(true, SupplicationPvE) && !HasFightOrFlight && HolySpiritPvE.CanUse(out act, skipCastingCheck: true)) return true;
if ((RageOfHalonePvE.CanUse(out _, skipComboCheck: false) || HasFightOrFlight || Player.WillStatusEndGCD(1, 0, true, StatusID.SepulchreReady)) && SepulchrePvE.CanUse(out act)) return true;

//AoE
if ((HasDivineMight || RequiescatStacks > 0) && HolyCirclePvE.CanUse(out act, skipCastingCheck: true)) return true;
Expand All @@ -227,7 +235,7 @@ protected override bool GeneralGCD(out IAction? act)
//Single Target
if ((HasDivineMight || RequiescatStacks > 0) && HolySpiritPvE.CanUse(out act, skipCastingCheck: true)) return true;

if (RoyalAuthorityPvE.CanUse(out act)) return true;
if (!SupplicationReady && !SepulchreReady && !HasAtonementReady && !HasDivineMight && RoyalAuthorityPvE.CanUse(out act)) return true;
if (RageOfHalonePvE.CanUse(out act)) return true;
if (RiotBladePvE.CanUse(out act)) return true;
if (FastBladePvE.CanUse(out act)) return true;
Expand Down
30 changes: 30 additions & 0 deletions RotationSolver.Basic/Helpers/IActionHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -154,4 +154,34 @@ private static ActionID[] GetIDFromActions(bool isAdjust, params IAction[] actio
}
return result;
}

/// <summary>
/// Determines if the last combo action matches any of the provided actions.
/// </summary>
/// <param name="isAdjust">Whether to use the adjusted ID.</param>
/// <param name="actions">The actions to check against.</param>
/// <returns>True if the last combo action matches any of the provided actions, otherwise false.</returns>
internal static bool IsLastComboAction(bool isAdjust, params IAction[] actions)
{
return actions != null && IsLastComboAction(GetIDFromActions(isAdjust, actions));
}

/// <summary>
/// Determines if the last combo action matches any of the provided action IDs.
/// </summary>
/// <param name="ids">The action IDs to check against.</param>
/// <returns>True if the last combo action matches any of the provided action IDs, otherwise false.</returns>
internal static bool IsLastComboAction(params ActionID[] ids)
{
return IsActionID(DataCenter.LastComboAction, ids);
}

/// <summary>
/// Determines if the last action was a combo action.
/// </summary>
/// <returns>True if the last action was a combo action, otherwise false.</returns>
public static bool IsLastActionCombo()
{
return DataCenter.LastAction == DataCenter.LastComboAction;
}
}
1 change: 0 additions & 1 deletion RotationSolver.Basic/Rotations/Basic/PaladinRotation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ public static byte RequiescatStacks
public static byte OathGauge => JobGauge.OathGauge;
#endregion


#region Status Tracking

/// <summary>
Expand Down
31 changes: 31 additions & 0 deletions RotationSolver.Basic/Rotations/CustomRotation_OtherInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,11 @@ public static bool CanHitPositional(EnemyPositional positional, IBattleChara ene
/// </summary>
protected static IEnumerable<IBattleChara> AllHostileTargets => DataCenter.AllHostileTargets;

/// <summary>
/// All targets. This includes both hostile and friendly targets.
/// </summary>
protected static IEnumerable<IBattleChara> AllTargets => DataCenter.AllTargets;

/// <summary>
/// Average time to kill for all targets.
/// </summary>
Expand Down Expand Up @@ -501,6 +506,32 @@ public static bool IsLastAction(params ActionID[] ids)
return IActionHelper.IsLastAction(ids);
}

/// <summary>
/// Last used Combo Action.
/// <br>WARNING: Do Not make this method the main of your rotation.</br>
/// </summary>
/// <param name="isAdjust">Check for adjust id not raw id.</param>
/// <param name="actions">True if any of this is matched.</param>
/// <returns></returns>
[Description("Just used Combo Action")]
public static bool IsLastComboAction(bool isAdjust, params IAction[] actions)
{
CountingOfLastUsing++;
return IActionHelper.IsLastComboAction(isAdjust, actions);
}

/// <summary>
/// Last used Combo Action.
/// <br>WARNING: Do Not make this method the main of your rotation.</br>
/// </summary>
/// <param name="ids">True if any of this is matched.</param>
/// <returns></returns>
public static bool IsLastComboAction(params ActionID[] ids)
{
CountingOfLastUsing++;
return IActionHelper.IsLastComboAction(ids);
}

/// <summary>
/// <br>WARNING: Do Not make this method the main of your rotation.</br>
/// </summary>
Expand Down

0 comments on commit ecae346

Please sign in to comment.