Skip to content

Commit aa80be9

Browse files
authored
Merge pull request #831 from FFXIV-CombatReborn/MCHxFieldOP
Small hotfix for MCH Rework, other misc fixes
2 parents 16a505a + 42170ef commit aa80be9

File tree

6 files changed

+71
-24
lines changed

6 files changed

+71
-24
lines changed

BasicRotations/Ranged/MCH_Rework.cs

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -92,19 +92,28 @@ protected override bool AttackAbility(IAction nextGCD, out IAction? act)
9292
}
9393
}
9494

95-
if (HyperchargePvE.CanUse(out act))
95+
if (HyperchargePvE.EnoughLevel)
9696
{
9797
if (!WildfirePvE.EnoughLevel)
9898
{
99-
return true;
99+
if (HyperchargePvE.CanUse(out act))
100+
{
101+
return true;
102+
}
100103
}
101-
if (HasWildfire && !FullMetalFieldPvE.EnoughLevel)
104+
if ((HasWildfire || (WildfirePvE.Cooldown.IsCoolingDown && Battery == 100)) && !FullMetalFieldPvE.EnoughLevel)
102105
{
103-
return true;
106+
if (HyperchargePvE.CanUse(out act))
107+
{
108+
return true;
109+
}
104110
}
105111
if (HasWildfire && FullMetalFieldPvE.EnoughLevel && IsLastAction(false, FullMetalFieldPvE))
106112
{
107-
return true;
113+
if (HyperchargePvE.CanUse(out act))
114+
{
115+
return true;
116+
}
108117
}
109118
}
110119

@@ -144,7 +153,7 @@ protected override bool AttackAbility(IAction nextGCD, out IAction? act)
144153
}
145154
if (!FullMetalFieldPvE.EnoughLevel)
146155
{
147-
if (WildfirePvE.Cooldown.WillHaveOneChargeGCD(1) && (IsLastAbility(false, HyperchargePvE) || Heat >= 50 || HasHypercharged) && ToolChargeSoon(out _) && !LowLevelHyperCheck)
156+
if ((Heat >= 50 || HasHypercharged) && ToolChargeSoon(out _) && !LowLevelHyperCheck)
148157
{
149158
if (WeaponRemain < GCDTime(1) / 2 && WildfirePvE.CanUse(out act))
150159
{
@@ -232,7 +241,7 @@ protected override bool GeneralGCD(out IAction? act)
232241
if (!SpreadShotPvE.CanUse(out _))
233242
{
234243
// use AirAnchor if possible
235-
if (AirAnchorPvE.CanUse(out act))
244+
if (HotShotMasteryTrait.EnoughLevel && AirAnchorPvE.CanUse(out act))
236245
{
237246
return true;
238247
}
@@ -242,6 +251,11 @@ protected override bool GeneralGCD(out IAction? act)
242251
{
243252
return true;
244253
}
254+
255+
if (!HotShotMasteryTrait.EnoughLevel && HotShotPvE.CanUse(out act))
256+
{
257+
return true;
258+
}
245259
}
246260

247261
// ChainSaw is always used after Drill

RotationSolver.Basic/Configuration/Configs.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,7 @@ public const string
712712
[JobConfig, Range(0.05f, 0.25f, ConfigUnitType.Percent)]
713713
[UI("Action Ahead (Percent of your GCD time remaining on a GCD cycle before RSR will try to queue the next GCD)", Filter = BasicTimer,
714714
Description = "This setting controls how many oGCDs RSR will try to fit in a single GCD window\nLower numbers mean more oGCDs, but potentially more GCD clipping")]
715-
private readonly float _action5head = 0.20f;
715+
private readonly float _action6head = 0.25f;
716716

717717
[JobConfig, UI("The HP for using Guard.",
718718
Filter = PvPSpecificControls)]

RotationSolver.Basic/DataCenter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ public static unsafe ushort PlayerFateId
328328
/// <summary>
329329
/// Calculates the action ahead time based on the default GCD total and minimum animation lock.
330330
/// </summary>
331-
public static float CalculatedActionAhead => DefaultGCDTotal * Service.Config.Action5Head;
331+
public static float CalculatedActionAhead => DefaultGCDTotal * Service.Config.Action6Head;
332332

333333
/// <summary>
334334
/// Calculates the total GCD time for a given number of GCDs and an optional offset.

RotationSolver.Basic/Helpers/ObjectHelper.cs

Lines changed: 36 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using Dalamud.Game.ClientState.Objects.Enums;
33
using Dalamud.Game.ClientState.Objects.SubKinds;
44
using ECommons;
5+
using ECommons.Automation.UIInput;
56
using ECommons.DalamudServices;
67
using ECommons.ExcelServices;
78
using ECommons.GameFunctions;
@@ -166,23 +167,45 @@ internal static bool IsAttackable(this IBattleChara battleChara)
166167
}
167168
}
168169

169-
if (Service.Config.BozjaCEmobtargeting
170-
&& DataCenter.IsInBozjanFieldOp
171-
&& !DataCenter.IsInDelubrumNormal
172-
&& !DataCenter.IsInDelubrumSavage)
170+
if (DataCenter.IsInBozjanFieldOp)
173171
{
174172
bool isInCE = DataCenter.IsInBozjanFieldOpCE;
175173

176-
// Prevent targeting mobs in Bozja CE if you are not in CE
177-
if (battleChara.IsBozjanCEFateMob() && !isInCE)
174+
if (isInCE)
178175
{
179-
return false;
176+
if (!battleChara.IsBozjanCEMob())
177+
{
178+
return false;
179+
}
180180
}
181181

182-
// Prevent targeting mobs out of Bozja CE if you are in CE
183-
if (!battleChara.IsBozjanCEFateMob() && isInCE)
182+
if (!isInCE)
184183
{
185-
return false;
184+
if (battleChara.IsBozjanCEMob())
185+
{
186+
return false;
187+
}
188+
}
189+
}
190+
191+
if (DataCenter.IsInOccultCrescentOp)
192+
{
193+
bool isInCE = Player.Object.GetEventType() == EventHandlerContent.PublicContentDirector;
194+
195+
if (isInCE)
196+
{
197+
if (!battleChara.IsOccultCEMob())
198+
{
199+
return false;
200+
}
201+
}
202+
203+
if (!isInCE)
204+
{
205+
if (battleChara.IsOccultCEMob())
206+
{
207+
return false;
208+
}
186209
}
187210
}
188211

@@ -225,14 +248,14 @@ internal static bool IsAttackable(this IBattleChara battleChara)
225248
};
226249
}
227250

228-
internal static bool IsBozjanCEFateMob(this IBattleChara battleChara)
251+
internal static bool IsBozjanCEMob(this IBattleChara battleChara)
229252
{
230253
if (battleChara == null)
231254
{
232255
return false;
233256
}
234257

235-
if (battleChara.IsEnemy() == false)
258+
if (!battleChara.IsEnemy())
236259
{
237260
return false;
238261
}
@@ -246,15 +269,14 @@ internal static bool IsBozjanCEFateMob(this IBattleChara battleChara)
246269
return battleChara.GetEventType() == EventHandlerContent.PublicContentDirector;
247270
}
248271

249-
// This exists because OC CEs can often have a large amount of players in them, and if you are not on AllTargetsCanAttack the mobs target may despawn due to object limit
250272
internal static bool IsOccultCEMob(this IBattleChara battleChara)
251273
{
252274
if (battleChara == null)
253275
{
254276
return false;
255277
}
256278

257-
if (battleChara.IsEnemy() == false)
279+
if (!battleChara.IsEnemy())
258280
{
259281
return false;
260282
}

RotationSolver.Basic/Rotations/Basic/ViperRotation.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@ public partial class ViperRotation
44
{
55
/// <inheritdoc/>
66
public override MedicineType MedicineType => MedicineType.Dexterity;
7+
8+
/// <inheritdoc/>
9+
public override bool IsBursting()
10+
{
11+
if (HasHunterAndSwift)
12+
{
13+
return true;
14+
}
15+
return false;
16+
}
17+
718
#region JobGauge
819
/// <summary>
920
/// Gets how many uses of uncoiled fury the player has.

RotationSolver/UI/RotationConfigWindow.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3814,7 +3814,7 @@ private static unsafe void DrawTargetData()
38143814
ImGui.Spacing();
38153815
ImGui.Text($"FateID: {battleChara.FateId().ToString() ?? string.Empty}");
38163816
ImGui.Text($"EventType: {battleChara.GetEventType().ToString() ?? string.Empty}");
3817-
ImGui.Text($"IsBozjanCEFateMob: {battleChara.IsBozjanCEFateMob()}");
3817+
ImGui.Text($"IsBozjanCEFateMob: {battleChara.IsBozjanCEMob()}");
38183818
ImGui.Spacing();
38193819
ImGui.Text($"IsOccultCEMob: {battleChara.IsOccultCEMob()}");
38203820
ImGui.Text($"IsOccultFateMob: {battleChara.IsOccultFateMob()}");

0 commit comments

Comments
 (0)