Skip to content

Commit

Permalink
Merge pull request #550 from FFXIV-CombatReborn/BetaPromo
Browse files Browse the repository at this point in the history
Promote GNB, PLD, and SMN betas to default. Fix issues with SMN and NIN rotations, allow more wiggle room on PLD ogcd usage
  • Loading branch information
LTS-FFXIV authored Jan 10, 2025
2 parents 4ca8666 + f22be31 commit 90c265e
Show file tree
Hide file tree
Showing 12 changed files with 566 additions and 551 deletions.
File renamed without changes.
4 changes: 2 additions & 2 deletions BasicRotations/Magical/PCT_Default.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ protected override bool AttackAbility(IAction nextGCD, out IAction? act)
// Bursts
int adjustCombatTimeForOpener = Player.Level < 92 ? 2 : 5;
if (StarryMusePvE.CanUse(out act) && CombatTime > adjustCombatTimeForOpener && IsBurst) return true;
if (CombatTime > adjustCombatTimeForOpener && StrikingMusePvE.CanUse(out act) && burstTimingCheckerStriking) return true;
if (CombatTime > adjustCombatTimeForOpener && StrikingMusePvE.CanUse(out act, usedUp: true) && burstTimingCheckerStriking) return true;
if (SubtractivePalettePvE.CanUse(out act)) return true;

if (HasStarryMuse)
Expand All @@ -115,7 +115,7 @@ protected override bool AttackAbility(IAction nextGCD, out IAction? act)
}
if (RetributionOfTheMadeenPvE.CanUse(out act)) return true;
if (MogOfTheAgesPvE.CanUse(out act)) return true;
if (StrikingMusePvE.CanUse(out act) && burstTimingCheckerStriking) return true;
if (StrikingMusePvE.CanUse(out act, usedUp: true) && burstTimingCheckerStriking) return true;
if (PomMusePvE.CanUse(out act, usedUp: true)) return true;
if (WingedMusePvE.CanUse(out act, usedUp: true)) return true;
if (ClawedMusePvE.CanUse(out act, usedUp: true)) return true;
Expand Down
4 changes: 2 additions & 2 deletions BasicRotations/Magical/SMN_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 (inBigInvocation && (elapsed1ChargeAfterInvocation || targetIsBossAndDying) && SunflarePvE.CanUse(out act, skipAoeCheck: true)) return true;

if (RekindlePvE.CanUse(out act, skipAoeCheck: true)) return true;
if (MountainBusterPvE.CanUse(out act, skipAoeCheck: true)) return true;
if (MountainBusterPvE.CanUse(out act)) return true;

if ((inSolarUnique && Player.HasStatus(false, StatusID.SearingLight) || !SearingLightPvE.EnoughLevel || isTargetBoss && isTargetDying) && EnergyDrainPvE.IsInCooldown && PainflarePvE.CanUse(out act)) return true;
if ((inSolarUnique && Player.HasStatus(false, StatusID.SearingLight) || !SearingLightPvE.EnoughLevel || isTargetBoss && isTargetDying) && EnergyDrainPvE.IsInCooldown && FesterPvE.CanUse(out act)) return true;
Expand Down Expand Up @@ -128,7 +128,7 @@ protected override bool AttackAbility(IAction nextGCD, out IAction? act)
if (inBigInvocation && (elapsed4ChargeAfterInvocation || targetIsBossAndDying) && SunflarePvE.CanUse(out act, skipAoeCheck: true)) return true;

if (RekindlePvE.CanUse(out act, skipAoeCheck: true)) return true;
if (MountainBusterPvE.CanUse(out act, skipAoeCheck: true)) return true;
if (MountainBusterPvE.CanUse(out act)) return true;

if ((inSolarUnique && Player.HasStatus(false, StatusID.SearingLight) && elapsed2ChargeAfterInvocation && EnergyDrainPvE.Cooldown.WillHaveOneCharge(2) || !SearingLightPvE.EnoughLevel || isTargetBoss && isTargetDying) && EnergyDrainPvE.IsInCooldown && PainflarePvE.CanUse(out act)) return true;
if ((inSolarUnique && Player.HasStatus(false, StatusID.SearingLight) && elapsed2ChargeAfterInvocation && EnergyDrainPvE.Cooldown.WillHaveOneCharge(2) || !SearingLightPvE.EnoughLevel || isTargetBoss && isTargetDying) && EnergyDrainPvE.IsInCooldown && FesterPvE.CanUse(out act)) return true;
Expand Down
44 changes: 28 additions & 16 deletions BasicRotations/Melee/NIN_Default.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@ public sealed class NIN_Default : NinjaRotation

[RotationConfig(CombatType.PvE, Name = "Use Unhide")]
public bool AutoUnhide { get; set; } = true;

[RotationConfig(CombatType.PvE, Name = "Use Mudras Outside of Combat when enemies are near")]
public bool CommbatMudra { get; set; } = true;
#endregion

#region Tracking Properties
// Properties to track RabbitMediumPvE failures and related information.
private int _rabbitMediumFailures = 0;
private IBaseAction? _lastNinActionAim = null;
private IAction? _followUpGCDAction = null;
#endregion

#region CountDown Logic
Expand Down Expand Up @@ -54,7 +64,6 @@ public sealed class NIN_Default : NinjaRotation
// Finally, updates the current ninjutsu action aim if it's different from the incoming action.
private void SetNinjutsu(IBaseAction act)
{

if (act == null || AdjustId(ActionID.NinjutsuPvE) == ActionID.RabbitMediumPvE) return;

if (_ninActionAim != null && IsLastAction(false, TenPvE, JinPvE, ChiPvE, FumaShurikenPvE_18873, FumaShurikenPvE_18874, FumaShurikenPvE_18875)) return;
Expand All @@ -70,6 +79,7 @@ private void ClearNinjutsu()
{
if (_ninActionAim != null)
{
_lastNinActionAim = _ninActionAim;
_ninActionAim = null;
}
}
Expand All @@ -88,7 +98,7 @@ private bool ChoiceNinjutsu(out IAction? act)
ClearNinjutsu();
}

if ((!JinPvE.Cooldown.HasOneCharge && JinPvE.EnoughLevel) || (!JinPvE.Cooldown.HasOneCharge && TenPvE.EnoughLevel)) return false;
if (!TenPvE.Cooldown.HasOneCharge && TenPvE.EnoughLevel) return false;
// Ensures that the action ID currently considered for Ninjutsu is actually valid for Ninjutsu execution.
//if (AdjustId(ActionID.NinjutsuPvE) != ActionID.NinjutsuPvE) return false;
// If more than 4.5 seconds have passed since the last action, it clears any pending Ninjutsu to avoid stale actions.
Expand Down Expand Up @@ -129,7 +139,7 @@ private bool ChoiceNinjutsu(out IAction? act)
// If Suiton is active but no specific Ninjutsu is currently aimed, it clears the Ninjutsu aim.
// This check is relevant for managing Suiton's effect, particularly for enabling Trick Attack.
if (Player.HasStatus(true, StatusID.ShadowWalker)
&& _ninActionAim == SuitonPvE && NoNinjutsu)
&& _ninActionAim == SuitonPvE)
{
ClearNinjutsu();
}
Expand All @@ -141,7 +151,7 @@ private bool ChoiceNinjutsu(out IAction? act)
//Aoe
if (NumberOfHostilesInRange > 1 && KatonPvE.EnoughLevel && ChiPvE.CanUse(out _) && TenPvE.CanUse(out _))
{
if (!Player.HasStatus(true, StatusID.Doton) && !IsMoving && !IsLastGCD(false, DotonPvE) && (!TenChiJinPvE.Cooldown.WillHaveOneCharge(6)) || !Player.HasStatus(true, StatusID.Doton) && !TenChiJinPvE.Cooldown.IsCoolingDown && TenPvE.CanUse(out _) && ChiPvE.CanUse(out _) && JinPvE.CanUse(out _))
if (!HasDoton && !IsMoving && !IsLastGCD(false, DotonPvE) && (!TenChiJinPvE.Cooldown.WillHaveOneCharge(6)) || !HasDoton && !TenChiJinPvE.Cooldown.IsCoolingDown && TenPvE.CanUse(out _) && ChiPvE.CanUse(out _) && JinPvE.CanUse(out _))
SetNinjutsu(DotonPvE);
else SetNinjutsu(KatonPvE);
}
Expand Down Expand Up @@ -191,7 +201,7 @@ private bool DoNinjutsu(out IAction? act)
&& !IsLastAction(false, FumaShurikenPvE_18875, FumaShurikenPvE_18873))
{
//AOE
if (KatonPvE.EnoughLevel)
if (KatonPvE.CanUse(out _))
{
if (FumaShurikenPvE_18875.CanUse(out act)) return true;
}
Expand All @@ -204,19 +214,19 @@ private bool DoNinjutsu(out IAction? act)
{
if (KatonPvE_18876.CanUse(out act, skipAoeCheck: true)) return true;
}
//Others
else if (chiId == RaitonPvE_18877.ID && !IsLastAction(false, RaitonPvE_18877))
{
if (RaitonPvE_18877.CanUse(out act, skipAoeCheck: true)) return true;
}
else if (chiId == DotonPvE_18880.ID && !IsLastAction(false, DotonPvE_18880) && !HasDoton)
{
if (DotonPvE_18880.CanUse(out act, skipAoeCheck: true)) return true;
}
//Others
else if (jinId == SuitonPvE_18881.ID && !IsLastAction(false, SuitonPvE_18881))
{
if (SuitonPvE_18881.CanUse(out act, skipAoeCheck: true, skipStatusProvideCheck: true)) return true;
}
else if (chiId == DotonPvE_18880.ID && !IsLastAction(false, DotonPvE_18880) && !HasDoton)
{
if (DotonPvE_18880.CanUse(out act, skipAoeCheck: true)) return true;
}
}

//Keep Kassatsu in Burst.
Expand All @@ -229,6 +239,7 @@ private bool DoNinjutsu(out IAction? act)
//Failed
if ((uint)id == RabbitMediumPvE.ID)
{
_rabbitMediumFailures++;
ClearNinjutsu();
act = null;
return false;
Expand Down Expand Up @@ -309,7 +320,7 @@ protected override bool EmergencyAbility(IAction nextGCD, out IAction? act)

// First priority is given to Kassatsu if it's available, allowing for an immediate powerful Ninjutsu.
if (NoNinjutsu && KassatsuPvE.CanUse(out act)) return true;
if (!TenChiJinPvE.Cooldown.IsCoolingDown && MeisuiPvE.CanUse(out act)) return true;
if ((!TenChiJinPvE.Cooldown.IsCoolingDown || Player.WillStatusEndGCD(2, 0, true, StatusID.ShadowWalker)) && MeisuiPvE.CanUse(out act)) return true;

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

Expand Down Expand Up @@ -390,14 +401,14 @@ protected override bool GeneralGCD(out IAction? act)

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

if ((InTrickAttack || InMug) && NoNinjutsu && !HasRaijuReady
if (!IsExecutingMudra && (InTrickAttack || InMug) && NoNinjutsu && !HasRaijuReady
&& !Player.HasStatus(true, StatusID.TenChiJin)
&& PhantomKamaitachiPvE.CanUse(out act)) return true;

if (FleetingRaijuPvE.CanUse(out act)) return true;
if (!IsExecutingMudra && FleetingRaijuPvE.CanUse(out act)) return true;

if (ChoiceNinjutsu(out act)) return true;
if ((!InCombat || !CombatElapsedLess(7)) && DoNinjutsu(out act)) return true;
if ((InCombat || (CommbatMudra && HasHostilesInMaxRange)) && ChoiceNinjutsu(out act)) return true;
if (((!InCombat && CommbatMudra && HasHostilesInMaxRange) || !CombatElapsedLess(7)) && DoNinjutsu(out act)) return true;

//No Ninjutsu
if (NoNinjutsu)
Expand Down Expand Up @@ -428,7 +439,6 @@ protected override bool GeneralGCD(out IAction? act)
}
if (!InCombat && _ninActionAim == null && UseHide
&& TenPvE.Cooldown.IsCoolingDown && HidePvE.CanUse(out act)) return true;

return base.GeneralGCD(out act);
}
#endregion
Expand All @@ -440,6 +450,8 @@ protected override bool GeneralGCD(out IAction? act)
public override void DisplayStatus()
{
ImGui.Text($"Ninjutsu Action: {_ninActionAim}");
ImGui.Text($"Mudra Failure Count: {_rabbitMediumFailures}");
ImGui.Text($"Last Ninjutsu Action Cleared From Queue: {_lastNinActionAim}");
ImGui.Text($"Ninki: {Ninki}");
ImGui.Text($"Kazematoi: {Kazematoi}");
ImGui.Text($"HasJin: {HasJin}");
Expand Down
3 changes: 3 additions & 0 deletions BasicRotations/RebornRotations.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
</ItemGroup>
<ItemGroup>
<Compile Include="Duty\EmanationDefault" />
<Compile Include="Magical\ICWA_PCT_BETA" />
<Compile Include="Tank\GNB_Default_Old" />
<Compile Include="Tank\PLD_Default_Old" />
</ItemGroup>
<ItemGroup>
<Reference Include="Dalamud">
Expand Down
Loading

0 comments on commit 90c265e

Please sign in to comment.