Skip to content

Commit ff39723

Browse files
authored
Merge pull request #845 from FFXIV-CombatReborn/MCHxSMNhotfixes
Update SMN and MCH
2 parents e90a774 + 65db116 commit ff39723

File tree

3 files changed

+70
-42
lines changed

3 files changed

+70
-42
lines changed

BasicRotations/Magical/SMN_Default.cs

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using System.ComponentModel;
1+
using Dalamud.Interface.Colors;
2+
using System.ComponentModel;
23

34
namespace RebornRotations.Magical;
45

@@ -51,6 +52,16 @@ public enum SummonOrderType : byte
5152

5253
#endregion
5354

55+
#region Tracking Properties
56+
public override void DisplayStatus()
57+
{
58+
ImGui.TextColored(ImGuiColors.DalamudViolet, "Rotation Tracking:");
59+
ImGui.Text($"EnergyDrainPvE: Is Cooling Down: {EnergyDrainPvE.Cooldown.IsCoolingDown}");
60+
ImGui.TextColored(ImGuiColors.DalamudYellow, "Base Tracking:");
61+
base.DisplayStatus();
62+
}
63+
#endregion
64+
5465
#region Countdown Logic
5566
protected override IAction? CountDownAction(float remainTime)
5667
{
@@ -95,7 +106,7 @@ protected override bool AttackAbility(IAction nextGCD, out IAction? act)
95106
bool elapsed2ChargeAfterInvocation = SummonSolarBahamutPvE.Cooldown.ElapsedOneChargeAfterGCD(2) || SummonBahamutPvE.Cooldown.ElapsedOneChargeAfterGCD(2) || SummonPhoenixPvE.Cooldown.ElapsedOneChargeAfterGCD(2);
96107
bool burstInSolar = Player.Level == 100 ? InSolarBahamut : InBahamut;
97108

98-
if (!Player.HasStatus(false, StatusID.SearingLight) && burstInSolar && elapsed0ChargeAfterInvocation)
109+
if (!HasSearingLight && burstInSolar && elapsed0ChargeAfterInvocation)
99110
{
100111
if (SearingLightPvE.CanUse(out act, skipAoeCheck: true))
101112
{
@@ -148,12 +159,12 @@ protected override bool AttackAbility(IAction nextGCD, out IAction? act)
148159
return true;
149160
}
150161

151-
if (((inSolarUnique && Player.HasStatus(false, StatusID.SearingLight)) || !SearingLightPvE.EnoughLevel || (isTargetBoss && isTargetDying)) && EnergyDrainPvE.Cooldown.IsCoolingDown && PainflarePvE.CanUse(out act))
162+
if (((inSolarUnique && HasSearingLight) || !SearingLightPvE.EnoughLevel || (isTargetBoss && isTargetDying)) && PainflarePvE.CanUse(out act))
152163
{
153164
return true;
154165
}
155166

156-
if (((inSolarUnique && Player.HasStatus(false, StatusID.SearingLight)) || !SearingLightPvE.EnoughLevel || (isTargetBoss && isTargetDying)) && EnergyDrainPvE.Cooldown.IsCoolingDown && FesterPvE.CanUse(out act))
167+
if (((inSolarUnique && HasSearingLight) || !SearingLightPvE.EnoughLevel || (isTargetBoss && isTargetDying)) && FesterPvE.CanUse(out act))
157168
{
158169
return true;
159170
}
@@ -176,7 +187,7 @@ protected override bool AttackAbility(IAction nextGCD, out IAction? act)
176187
bool elapsed4ChargeAfterInvocation = SummonSolarBahamutPvE.Cooldown.ElapsedOneChargeAfterGCD(4) || SummonBahamutPvE.Cooldown.ElapsedOneChargeAfterGCD(4) || SummonPhoenixPvE.Cooldown.ElapsedOneChargeAfterGCD(4);
177188
bool burstInSolar = Player.Level == 100 ? InSolarBahamut : InBahamut;
178189

179-
if (!Player.HasStatus(false, StatusID.SearingLight) && burstInSolar && elapsed1ChargeAfterInvocation)
190+
if (!HasSearingLight && burstInSolar && elapsed1ChargeAfterInvocation)
180191
{
181192
if (SearingLightPvE.CanUse(out act, skipAoeCheck: true))
182193
{
@@ -229,22 +240,22 @@ protected override bool AttackAbility(IAction nextGCD, out IAction? act)
229240
return true;
230241
}
231242

232-
if (((inSolarUnique && Player.HasStatus(false, StatusID.SearingLight) && elapsed2ChargeAfterInvocation && EnergyDrainPvE.Cooldown.WillHaveOneCharge(2)) || !SearingLightPvE.EnoughLevel || (isTargetBoss && isTargetDying)) && EnergyDrainPvE.Cooldown.IsCoolingDown && PainflarePvE.CanUse(out act))
243+
if (((inSolarUnique && HasSearingLight && elapsed2ChargeAfterInvocation && EnergyDrainPvE.Cooldown.WillHaveOneCharge(2)) || !SearingLightPvE.EnoughLevel || (isTargetBoss && isTargetDying)) && PainflarePvE.CanUse(out act))
233244
{
234245
return true;
235246
}
236247

237-
if (((inSolarUnique && Player.HasStatus(false, StatusID.SearingLight) && elapsed2ChargeAfterInvocation && EnergyDrainPvE.Cooldown.WillHaveOneCharge(2)) || !SearingLightPvE.EnoughLevel || (isTargetBoss && isTargetDying)) && EnergyDrainPvE.Cooldown.IsCoolingDown && FesterPvE.CanUse(out act))
248+
if (((inSolarUnique && HasSearingLight && elapsed2ChargeAfterInvocation && EnergyDrainPvE.Cooldown.WillHaveOneCharge(2)) || !SearingLightPvE.EnoughLevel || (isTargetBoss && isTargetDying)) && FesterPvE.CanUse(out act))
238249
{
239250
return true;
240251
}
241252

242-
if (((inSolarUnique && Player.HasStatus(false, StatusID.SearingLight) && elapsed2ChargeAfterInvocation) || !SearingLightPvE.EnoughLevel || (isTargetBoss && isTargetDying)) && EnergyDrainPvE.Cooldown.IsCoolingDown && PainflarePvE.CanUse(out act))
253+
if (((inSolarUnique && HasSearingLight && elapsed2ChargeAfterInvocation) || !SearingLightPvE.EnoughLevel || (isTargetBoss && isTargetDying)) && PainflarePvE.CanUse(out act))
243254
{
244255
return true;
245256
}
246257

247-
if (((inSolarUnique && Player.HasStatus(false, StatusID.SearingLight) && elapsed2ChargeAfterInvocation) || !SearingLightPvE.EnoughLevel || (isTargetBoss && isTargetDying)) && EnergyDrainPvE.Cooldown.IsCoolingDown && FesterPvE.CanUse(out act))
258+
if (((inSolarUnique && HasSearingLight && elapsed2ChargeAfterInvocation) || !SearingLightPvE.EnoughLevel || (isTargetBoss && isTargetDying)) && FesterPvE.CanUse(out act))
248259
{
249260
return true;
250261
}
@@ -267,23 +278,23 @@ protected override bool AttackAbility(IAction nextGCD, out IAction? act)
267278
protected override bool EmergencyAbility(IAction nextGCD, out IAction? act)
268279
{
269280
bool anyBigInvocationIsCoolingDown = SummonBahamutPvE.Cooldown.IsCoolingDown || SummonSolarBahamutPvE.Cooldown.IsCoolingDown || SummonPhoenixPvE.Cooldown.IsCoolingDown;
270-
if (AddSwiftcastOnGaruda && nextGCD == SlipstreamPvE && Player.Level > 86 && !InBahamut && !InPhoenix && !InSolarBahamut)
281+
if (AddSwiftcastOnGaruda && nextGCD.IsTheSameTo(false, SlipstreamPvE) && ElementalMasteryTrait.EnoughLevel && !InBahamut && !InPhoenix && !InSolarBahamut)
271282
{
272283
if (SwiftcastPvE.CanUse(out act))
273284
{
274285
return true;
275286
}
276287
}
277288

278-
if (AddSwiftcastOnRuby && nextGCD == RubyRitePvE && Player.Level < 86)
289+
if (AddSwiftcastOnRuby && nextGCD.IsTheSameTo(false, RubyRitePvE) && !ElementalMasteryTrait.EnoughLevel)
279290
{
280291
if (SwiftcastPvE.CanUse(out act))
281292
{
282293
return true;
283294
}
284295
}
285296

286-
if (((RadiantOnCooldown && RadiantAegisPvE.Cooldown.CurrentCharges == 2) || (RadiantAegisPvE.Cooldown.CurrentCharges == 1 && RadiantAegisPvE.Cooldown.WillHaveOneCharge(5))) && anyBigInvocationIsCoolingDown && Player.Level <= 100 && RadiantAegisPvE.CanUse(out act))
297+
if (((RadiantOnCooldown && RadiantAegisPvE.Cooldown.CurrentCharges == 2) || (RadiantAegisPvE.Cooldown.CurrentCharges == 1 && RadiantAegisPvE.Cooldown.WillHaveOneCharge(5))) && anyBigInvocationIsCoolingDown && RadiantAegisPvE.CanUse(out act))
287298
{
288299
return true;
289300
}
@@ -319,7 +330,7 @@ protected override bool GeneralGCD(out IAction? act)
319330
return true;
320331
}
321332

322-
if ((Player.HasStatus(false, StatusID.SearingLight) || SearingLightPvE.Cooldown.IsCoolingDown) && SummonBahamutPvE.CanUse(out act))
333+
if ((HasSearingLight || SearingLightPvE.Cooldown.IsCoolingDown) && SummonBahamutPvE.CanUse(out act))
323334
{
324335
return true;
325336
}
@@ -443,7 +454,7 @@ protected override bool GeneralGCD(out IAction? act)
443454
}
444455
}
445456

446-
if (SummonTimeEndAfterGCD() && AttunmentTimeEndAfterGCD() && !InBahamut && !InPhoenix && !InSolarBahamut && SummonEmeraldPvE.Cooldown.IsCoolingDown && SummonTopazPvE.Cooldown.IsCoolingDown && SummonRubyPvE.Cooldown.IsCoolingDown &&
457+
if (SummonTimeEndAfterGCD() && AttunmentTimeEndAfterGCD() && !InBahamut && !InPhoenix && !InSolarBahamut &&
447458
RuinIvPvE.CanUse(out act, skipAoeCheck: true))
448459
{
449460
return true;
@@ -466,7 +477,7 @@ protected override bool GeneralGCD(out IAction? act)
466477
#region Extra Methods
467478
public override bool CanHealSingleSpell => false;
468479

469-
public bool DoesAnyPlayerNeedHeal()
480+
public static bool DoesAnyPlayerNeedHeal()
470481
{
471482
return PartyMembersAverHP < 0.8f;
472483
}

BasicRotations/Ranged/MCH_Rework.cs

Lines changed: 30 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,31 @@ protected override bool EmergencyAbility(IAction nextGCD, out IAction? act)
4343
UpdateFoundStepPair();
4444
}
4545

46+
if (HyperchargePvE.EnoughLevel)
47+
{
48+
if (!WildfirePvE.EnoughLevel)
49+
{
50+
if (HyperchargePvE.CanUse(out act, skipTTKCheck: true))
51+
{
52+
return true;
53+
}
54+
}
55+
if ((HasWildfire || (WildfirePvE.Cooldown.IsCoolingDown && Battery == 100)) && !FullMetalFieldPvE.EnoughLevel)
56+
{
57+
if (HyperchargePvE.CanUse(out act, skipTTKCheck: true))
58+
{
59+
return true;
60+
}
61+
}
62+
if (HasWildfire && FullMetalFieldPvE.EnoughLevel && IsLastAction(false, FullMetalFieldPvE))
63+
{
64+
if (HyperchargePvE.CanUse(out act, skipTTKCheck: true))
65+
{
66+
return true;
67+
}
68+
}
69+
}
70+
4671
return base.EmergencyAbility(nextGCD, out act);
4772
}
4873

@@ -98,31 +123,6 @@ protected override bool AttackAbility(IAction nextGCD, out IAction? act)
98123
}
99124
}
100125

101-
if (HyperchargePvE.EnoughLevel)
102-
{
103-
if (!WildfirePvE.EnoughLevel)
104-
{
105-
if (HyperchargePvE.CanUse(out act, skipTTKCheck: true))
106-
{
107-
return true;
108-
}
109-
}
110-
if ((HasWildfire || (WildfirePvE.Cooldown.IsCoolingDown && Battery == 100)) && !FullMetalFieldPvE.EnoughLevel)
111-
{
112-
if (HyperchargePvE.CanUse(out act, skipTTKCheck: true))
113-
{
114-
return true;
115-
}
116-
}
117-
if (HasWildfire && FullMetalFieldPvE.EnoughLevel && IsLastAction(false, FullMetalFieldPvE))
118-
{
119-
if (HyperchargePvE.CanUse(out act, skipTTKCheck: true))
120-
{
121-
return true;
122-
}
123-
}
124-
}
125-
126126
// Start Ricochet/Gauss cooldowns rolling if they are not already
127127
if (!RicochetPvE.Cooldown.IsCoolingDown && RicochetPvE.CanUse(out act))
128128
{
@@ -245,6 +245,11 @@ protected override bool GeneralGCD(out IAction? act)
245245
return true;
246246
}
247247

248+
if (IsLastAction(false, HyperchargePvE))
249+
{
250+
return false;
251+
}
252+
248253
// Drill AOE
249254
if ((BioMove || (!IsMoving && !BioMove)) && BioblasterPvE.CanUse(out act, usedUp: true))
250255
{

RotationSolver.Basic/Rotations/Basic/SummonerRotation.cs

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,14 @@ protected static bool AttunmentTimeEndAfterGCD(uint gcdCount = 0, float offset =
136136
///
137137
/// </summary>
138138
private static bool HasSummon => DataCenter.HasPet() && SummonTimeEndAfterGCD();
139+
#endregion
140+
#region Status
141+
142+
/// <summary>
143+
///
144+
/// </summary>
145+
public static bool HasSearingLight => Player.HasStatus(true, StatusID.SearingLight);
146+
139147
#endregion
140148

141149
#region PvE Actions Unassignable Status
@@ -324,7 +332,7 @@ static partial void ModifyGemshinePvE(ref ActionSetting setting)
324332

325333
static partial void ModifyFesterPvE(ref ActionSetting setting)
326334
{
327-
setting.ActionCheck = () => HasAetherflowStacks;
335+
setting.ActionCheck = () => SMNAetherflowStacks > 0;
328336
}
329337

330338
static partial void ModifyEnergyDrainPvE(ref ActionSetting setting)
@@ -416,6 +424,10 @@ static partial void ModifyAstralFlowPvE(ref ActionSetting setting)
416424
static partial void ModifyRuinIvPvE(ref ActionSetting setting)
417425
{
418426
setting.StatusNeed = [StatusID.FurtherRuin_2701];
427+
setting.CreateConfig = () => new ActionConfig()
428+
{
429+
AoeCount = 1,
430+
};
419431
}
420432

421433
static partial void ModifySearingLightPvE(ref ActionSetting setting)
@@ -461,7 +473,7 @@ static partial void ModifySummonGarudaIiPvE(ref ActionSetting setting)
461473

462474
static partial void ModifyNecrotizePvE(ref ActionSetting setting)
463475
{
464-
setting.ActionCheck = () => HasAetherflowStacks;
476+
setting.ActionCheck = () => SMNAetherflowStacks > 0;
465477
}
466478

467479
static partial void ModifySearingFlashPvE(ref ActionSetting setting)

0 commit comments

Comments
 (0)