Skip to content

Commit

Permalink
Fix redundant checks on MNK causing delays for Masterful Blitz varian…
Browse files Browse the repository at this point in the history
…t uses, added option to BRD to preserve the use of esuna for self
  • Loading branch information
LTS-FFXIV committed Dec 26, 2024
1 parent 34ce44a commit db3315b
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 12 deletions.
28 changes: 18 additions & 10 deletions BasicRotations/Melee/MNK_Default.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.ComponentModel;
using static DefaultRotations.Magical.SMN_Default;

namespace DefaultRotations.Melee;

Expand Down Expand Up @@ -92,7 +91,7 @@ protected override bool EmergencyAbility(IAction nextGCD, out IAction? act)

protected override bool GeneralAbility(IAction nextGCD, out IAction? act)
{
if (Player.WillStatusEnd(2.5f, true, StatusID.EarthsRumination) && EarthsReplyPvE.CanUse(out act)) return true;
if (Player.WillStatusEnd(5, true, StatusID.EarthsRumination) && EarthsReplyPvE.CanUse(out act)) return true;
return base.GeneralAbility(nextGCD, out act);
}

Expand Down Expand Up @@ -172,7 +171,7 @@ protected override bool AttackAbility(IAction nextGCD, out IAction? act)
// use bh when bh and rof are ready (opener) or ask bh to wait for rof's cd to be close and then use bh
if (!CombatElapsedLessGCD(2)
&& ((BrotherhoodPvE.IsInCooldown && RiddleOfFirePvE.IsInCooldown) || Math.Abs(BrotherhoodPvE.Cooldown.CoolDownGroup - RiddleOfFirePvE.Cooldown.CoolDownGroup) < 3)
&& BrotherhoodPvE.CanUse(out act, skipAoeCheck: true)) return true;
&& BrotherhoodPvE.CanUse(out act)) return true;

// rof needs to be used on cd or after x gcd in opener
if (!CombatElapsedLessGCD(3) && RiddleOfFirePvE.CanUse(out act)) return true; // Riddle Of Fire
Expand Down Expand Up @@ -227,18 +226,27 @@ protected override bool GeneralGCD(out IAction? act)
// or if burst was missed, and next burst is not arriving in time, use it better than waste it, otherwise, hold it for next rof
if (!BeastChakras.Contains(BeastChakra.NONE) && (Player.HasStatus(true, StatusID.RiddleOfFire) || RiddleOfFirePvE.Cooldown.JustUsedAfter(42)))
{
// for some reason phantom doesn't count as a variation of masterful like the others
if (PhantomRushPvE.CanUse(out act, skipAoeCheck: true)) return true;
if (TornadoKickPvE.CanUse(out act, skipAoeCheck: true)) return true;
if (CelestialRevolutionPvE.CanUse(out act, skipAoeCheck: true)) return true; // shouldn't need this but who know what button the user may press
if (MasterfulBlitzPvE.CanUse(out act, skipAoeCheck: true)) return true;
// Both Nadi and 3 beasts
if (PhantomRushPvE.CanUse(out act)) return true;
if (TornadoKickPvE.CanUse(out act)) return true;

// Needing Solar Nadi and has 3 different beasts
if (RisingPhoenixPvE.CanUse(out act)) return true;
if (FlintStrikePvE.CanUse(out act)) return true;

// Needing Lunar Nadi and has 3 of the same beasts
if (ElixirBurstPvE.CanUse(out act)) return true;
if (ElixirFieldPvE.CanUse(out act)) return true;

// No Nadi and 3 beasts
if (CelestialRevolutionPvE.CanUse(out act)) return true;
}

// 'Because Fire¡¯s Reply grants formless, we have an imposed restriction that we prefer not to use it while under PB, or if we have a formless already.' + 'Cast Fire's Reply after an opo gcd'
// need to test and see if IsLastGCD(false, ...) is better
if ((!Player.HasStatus(true, StatusID.PerfectBalance) && !Player.HasStatus(true, StatusID.FormlessFist) && IsLastGCD(true, DragonKickPvE, LeapingOpoPvE, BootshinePvE) || Player.WillStatusEnd(5, true, StatusID.FiresRumination)) && FiresReplyPvE.CanUse(out act, skipAoeCheck: true)) return true; // Fires Reply
if ((!Player.HasStatus(true, StatusID.PerfectBalance) && !Player.HasStatus(true, StatusID.FormlessFist) && IsLastGCD(true, DragonKickPvE, LeapingOpoPvE, BootshinePvE) || Player.WillStatusEnd(5, true, StatusID.FiresRumination)) && FiresReplyPvE.CanUse(out act)) return true; // Fires Reply
// 'Cast Wind's Reply literally anywhere in the window'
if (!Player.HasStatus(true, StatusID.PerfectBalance) && WindsReplyPvE.CanUse(out act, skipAoeCheck: true)) return true; // Winds Reply
if ((!Player.HasStatus(true, StatusID.PerfectBalance) || Player.WillStatusEnd(5, true, StatusID.WindsRumination)) && WindsReplyPvE.CanUse(out act)) return true; // Winds Reply

// Opo needs to follow each PB
// 'This means ¡°bookending¡± any PB usage with opos and spending formless on opos.'
Expand Down
5 changes: 4 additions & 1 deletion BasicRotations/Ranged/BRD_Default.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ public sealed class BRD_Default : BardRotation
[RotationConfig(CombatType.PvE, Name = "First Song")]
private Song FirstSong { get; set; } = Song.WANDERER;

[RotationConfig(CombatType.PvE, Name = "Use Warden's Paean on other players")]
public bool BRDEsuna { get; set; } = true;

private float WANDRemainTime => 45 - WANDTime;
private float MAGERemainTime => 45 - MAGETime;
private float ARMYRemainTime => 45 - ARMYTime;
Expand Down Expand Up @@ -76,7 +79,7 @@ protected override bool EmergencyAbility(IAction nextGCD, out IAction? act)
[RotationDesc(ActionID.TheWardensPaeanPvE)]
protected override bool DispelGCD(out IAction? act)
{
if (TheWardensPaeanPvE.CanUse(out act)) return true;
if (BRDEsuna && TheWardensPaeanPvE.CanUse(out act)) return true;
return base.DispelGCD(out act);
}

Expand Down
10 changes: 9 additions & 1 deletion RotationSolver.Basic/Rotations/Basic/MonkRotation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ static partial void ModifyMantraPvE(ref ActionSetting setting)
setting.CreateConfig = () => new ActionConfig()
{
TimeToKill = 10,
AoeCount = 1,
};
}

Expand Down Expand Up @@ -240,11 +241,17 @@ static partial void ModifyFlintStrikePvE(ref ActionSetting setting)
static partial void ModifyRiddleOfEarthPvE(ref ActionSetting setting)
{
setting.StatusProvide = [StatusID.RiddleOfEarth, StatusID.EarthsRumination];
setting.IsFriendly = true;
setting.CreateConfig = () => new ActionConfig()
{
AoeCount = 1,
};
}

static partial void ModifyEarthsReplyPvE(ref ActionSetting setting)
{
setting.StatusNeed = [StatusID.EarthsRumination];
setting.IsFriendly = true;
setting.CreateConfig = () => new ActionConfig()
{
AoeCount = 1,
Expand All @@ -266,6 +273,7 @@ static partial void ModifyBrotherhoodPvE(ref ActionSetting setting)
setting.CreateConfig = () => new ActionConfig()
{
TimeToKill = 10,
AoeCount = 1,
};
setting.UnlockedByQuestID = 67966;
}
Expand All @@ -289,7 +297,7 @@ static partial void ModifyEnlightenmentPvE(ref ActionSetting setting)
setting.ActionCheck = () => InCombat && Chakra == 5;
setting.CreateConfig = () => new ActionConfig()
{
AoeCount = 3,
AoeCount = 1,
};
}

Expand Down

0 comments on commit db3315b

Please sign in to comment.