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 #209 from FFXIV-CombatReborn/Viper-and-Bard-optimi…
Browse files Browse the repository at this point in the history
…zations

Refactor status checks and ability logic in VPR and BRD
  • Loading branch information
LTS-FFXIV authored Sep 6, 2024
2 parents 7400263 + 7b03b29 commit 02a459c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 27 deletions.
6 changes: 3 additions & 3 deletions BasicRotations/Melee/VPR_Default.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,18 +113,18 @@ protected override bool GeneralGCD(out IAction? act)
}

// Uncoiled Fury Overcap protection
if (MaxRattling == RattlingCoilStacks || RattlingCoilStacks >= MaxUncoiledStacksUser && !Player.HasStatus(true, StatusID.Reawakened))
if ((MaxRattling == RattlingCoilStacks || RattlingCoilStacks >= MaxUncoiledStacksUser) && !Player.HasStatus(true, StatusID.ReadyToReawaken))
{
if (UncoiledFuryPvE.CanUse(out act, usedUp: true)) return true;
}

if (BurstUncoiledFury && Player.HasStatus(true, StatusID.Medicated) && !Player.HasStatus(true, StatusID.Reawakened))
if (BurstUncoiledFury && Player.HasStatus(true, StatusID.Medicated) && !Player.HasStatus(true, StatusID.ReadyToReawaken))
{
if (UncoiledFuryPvE.CanUse(out act, usedUp: true)) return true;
}

//Uncoiled fury use
if (SerpentsIrePvE.Cooldown.JustUsedAfter(30) && !Player.HasStatus(true, StatusID.Reawakened))
if (SerpentsIrePvE.Cooldown.JustUsedAfter(30) && !Player.HasStatus(true, StatusID.ReadyToReawaken))
{
if (UncoiledFuryPvE.CanUse(out act, usedUp: true)) return true;
}
Expand Down
38 changes: 14 additions & 24 deletions BasicRotations/Ranged/BRD_Default.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ public sealed class BRD_Default : BardRotation
{
#region Config Options

[RotationConfig(CombatType.PvE, Name = "Tincture/Gemdraught Usage (Experimental)")]
public bool ExperimentalPot { get; set; } = false;

[RotationConfig(CombatType.PvE, Name = @"Use Raging Strikes on ""Wanderer's Minuet""")]
public bool BindWAND { get; set; } = false;

Expand All @@ -37,7 +34,9 @@ public sealed class BRD_Default : BardRotation
private float MAGERemainTime => 45 - MAGETime;
private float ARMYRemainTime => 45 - ARMYTime;

private static bool InBurstStatus => !Player.WillStatusEnd(0, true, StatusID.RagingStrikes);
private static bool InBurstStatus => (Player.Level > 50 && !Player.WillStatusEnd(0, true, StatusID.RagingStrikes))
|| (Player.Level >= 50 && Player.Level < 90 && !Player.WillStatusEnd(0, true, StatusID.RagingStrikes) && !Player.WillStatusEnd(0, true, StatusID.BattleVoice))
|| (MinstrelsCodaTrait.EnoughLevel && !Player.WillStatusEnd(0, true, StatusID.RagingStrikes) && !Player.WillStatusEnd(0, true, StatusID.RadiantFinale) && !Player.WillStatusEnd(0, true, StatusID.BattleVoice));

#endregion

Expand Down Expand Up @@ -73,7 +72,7 @@ protected override bool AttackAbility(IAction nextGCD, out IAction? act)
{
act = null;

if (IsBurst && ExperimentalPot)
if (IsBurst)
{
if (UseBurstMedicine(out act)) return true;
}
Expand Down Expand Up @@ -103,30 +102,21 @@ protected override bool AttackAbility(IAction nextGCD, out IAction? act)
{
if (NewLogicType)
{
if (RadiantFinalePvE.CanUse(out act, skipAoeCheck: true)) return true;
if (((!RadiantFinalePvE.EnoughLevel && !RagingStrikesPvE.Cooldown.IsCoolingDown)
|| (RadiantFinalePvE.EnoughLevel && !RadiantFinalePvE.Cooldown.IsCoolingDown && RagingStrikesPvE.EnoughLevel && !RagingStrikesPvE.Cooldown.IsCoolingDown))
&& BattleVoicePvE.CanUse(out act, isLastAbility: false)) return true;

if (BattleVoicePvE.CanUse(out act, skipAoeCheck: true)) return true;
if (!Player.WillStatusEnd(0, true, StatusID.BattleVoice) && RadiantFinalePvE.CanUse(out act)) return true;

if (RagingStrikesPvE.CanUse(out act, isLastAbility: true))
{
if (RadiantFinalePvE.EnoughLevel)
{
if (Player.HasStatus(true, StatusID.RadiantFinale) && Player.HasStatus(true, StatusID.BattleVoice)) return true;
}
else if (!RadiantFinalePvE.EnoughLevel && BattleVoicePvE.EnoughLevel)
{
if (Player.HasStatus(true, StatusID.BattleVoice)) return true;
}
else
{
if (!BindWANDEnough) return true;
}
}
if (((RadiantFinalePvE.EnoughLevel && !Player.WillStatusEnd(0, true, StatusID.RadiantFinale) && !Player.WillStatusEnd(0, true, StatusID.BattleVoice))
|| (!RadiantFinalePvE.EnoughLevel && BattleVoicePvE.EnoughLevel && !Player.WillStatusEnd(0, true, StatusID.BattleVoice))
|| (!RadiantFinalePvE.EnoughLevel && !BattleVoicePvE.EnoughLevel))
&& RagingStrikesPvE.CanUse(out act)) return true;
}

if (!NewLogicType)
{
if (RagingStrikesPvE.CanUse(out act, isLastAbility: true))
if (RagingStrikesPvE.CanUse(out act))
{
if (BindWANDEnough && Song == Song.WANDERER && TheWanderersMinuetPvE.EnoughLevel) return true;
if (!BindWANDEnough) return true;
Expand Down Expand Up @@ -220,7 +210,7 @@ protected override bool GeneralGCD(out IAction? act)
if (IronJawsPvE.CanUse(out act)) return true;
if (IronJawsPvE.CanUse(out act, skipStatusProvideCheck: true) && (IronJawsPvE.Target.Target?.WillStatusEnd(30, true, IronJawsPvE.Setting.TargetStatusProvide ?? []) ?? false))
{
if (Player.HasStatus(true, StatusID.RagingStrikes) && Player.WillStatusEndGCD(1, 0, true, StatusID.RagingStrikes)) return true;
if (Player.HasStatus(true, StatusID.BattleVoice) && Player.WillStatusEndGCD(1, 0, true, StatusID.BattleVoice)) return true;
}

if (ResonantArrowPvE.CanUse(out act)) return true;
Expand Down

0 comments on commit 02a459c

Please sign in to comment.