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

Commit

Permalink
Merge pull request #25 from FFXIV-CombatReborn/DT-GNB-Double-Down-Fix
Browse files Browse the repository at this point in the history
Dt gnb double down fix
  • Loading branch information
Tykku authored Jul 3, 2024
2 parents 99908a6 + 7d13e57 commit 1e9e3ef
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions BasicRotations/Tank/GNB_Default.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ public sealed class GNB_Default : GunbreakerRotation
}
#endregion

#region Config Options

bool areDDTargetsInRange = AllHostileTargets.Any(hostile => hostile.DistanceToPlayer() < 4.5f);

#endregion

#region oGCD Logic
protected override bool EmergencyAbility(IAction nextGCD, out IAction? act)
{
Expand Down Expand Up @@ -87,12 +93,6 @@ protected override bool AttackAbility(IAction nextGCD, out IAction? act)
if (GnashingFangPvE.Cooldown.IsCoolingDown && DoubleDownPvE.Cooldown.IsCoolingDown && Ammo == 0 && BloodfestPvE.CanUse(out act)) return true;

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

if (Player.HasStatus(true, StatusID.NoMercy))
{
// if (TrajectoryPvE.CanUse(out act, usedUp: true) && !IsMoving) return true;
}

if (EyeGougePvE.CanUse(out act)) return true;
if (FatedBrandPvE.CanUse(out act)) return true;
if (HypervelocityPvE.CanUse(out act)) return true;
Expand All @@ -113,7 +113,7 @@ protected override bool GeneralGCD(out IAction? act)

if (Player.HasStatus(true, StatusID.NoMercy) && CanUseSonicBreak(out act)) return true;

if (Player.HasStatus(true, StatusID.NoMercy) && CanUseDoubleDown(out act)) return true;
if (Player.HasStatus(true, StatusID.NoMercy) && areDDTargetsInRange && CanUseDoubleDown(out act)) return true;

if (SavageClawPvE.CanUse(out act, skipComboCheck: true)) return true;
if (WickedTalonPvE.CanUse(out act, skipComboCheck: true)) return true;
Expand Down Expand Up @@ -159,10 +159,10 @@ protected override bool GeneralGCD(out IAction? act)
private bool CanUseReignOfBeasts(out IAction? act)
{
if (ReignOfBeastsPvE.CanUse(out act))
{
{
if (DemonSlicePvE.CanUse(out _)) return true;

if (Player.HasStatus(true, StatusID.ReadyToReign)) return true;
if (Player.HasStatus(true, StatusID.ReadyToReign)) return true;

}
return false;
Expand Down Expand Up @@ -204,10 +204,11 @@ private bool CanUseSonicBreak(out IAction act)
return false;
}

private bool CanUseDoubleDown(out IAction act)
private bool CanUseDoubleDown(out IAction? act)
{
if (DoubleDownPvE.CanUse(out act, skipAoeCheck: true))
{

if (DemonSlicePvE.CanUse(out _) && Player.HasStatus(true, StatusID.NoMercy)) return true;

if (SonicBreakPvE.Cooldown.IsCoolingDown && Player.HasStatus(true, StatusID.NoMercy)) return true;
Expand All @@ -229,7 +230,7 @@ private bool CanUseBurstStrike(out IAction act)
if (Player.HasStatus(true, StatusID.NoMercy) &&
AmmoComboStep == 0 &&
!GnashingFangPvE.Cooldown.WillHaveOneCharge(1)) return true;

if (!CartridgeChargeIiTrait.EnoughLevel && Ammo == 2) return true;

if (IsLastGCD((ActionID)BrutalShellPvE.ID) &&
Expand All @@ -252,5 +253,5 @@ private bool CanUseBowShock(out IAction act)
}
return false;
}
#endregion
#endregion
}

0 comments on commit 1e9e3ef

Please sign in to comment.