Skip to content

Commit

Permalink
Fix low level MNK combo issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Taurenkey committed Aug 25, 2024
1 parent 32e9b71 commit e98ef0c
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 62 deletions.
7 changes: 4 additions & 3 deletions XIVSlothCombo/Combos/JobHelpers/MNK.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using XIVSlothCombo.Combos.PvE;
using XIVSlothCombo.CustomComboNS.Functions;
using XIVSlothCombo.Data;
using XIVSlothCombo.Extensions;

namespace XIVSlothCombo.Combos.JobHelpers
{
Expand All @@ -15,7 +16,7 @@ public static uint DetermineCoreAbility(uint actionId, bool useTrueNorthIfEnable
{
if (CustomComboFunctions.HasEffect(Buffs.OpoOpoForm) || CustomComboFunctions.HasEffect(Buffs.FormlessFist))
{
if (Gauge.OpoOpoFury == 0)
if (Gauge.OpoOpoFury == 0 && DragonKick.LevelChecked())
{
if (CustomComboFunctions.LevelChecked(DragonKick))
return DragonKick;
Expand All @@ -28,7 +29,7 @@ public static uint DetermineCoreAbility(uint actionId, bool useTrueNorthIfEnable

if (CustomComboFunctions.HasEffect(Buffs.RaptorForm))
{
if (Gauge.RaptorFury == 0)
if (Gauge.RaptorFury == 0 && TwinSnakes.LevelChecked())
{
if (CustomComboFunctions.LevelChecked(TwinSnakes))
return TwinSnakes;
Expand All @@ -42,7 +43,7 @@ public static uint DetermineCoreAbility(uint actionId, bool useTrueNorthIfEnable

if (CustomComboFunctions.HasEffect(Buffs.CoeurlForm))
{
if (Gauge.CoeurlFury == 0)
if (Gauge.CoeurlFury == 0 && Demolish.LevelChecked())
{
if (!CustomComboFunctions.OnTargetsRear()
&& CustomComboFunctions.TargetNeedsPositionals()
Expand Down
117 changes: 58 additions & 59 deletions XIVSlothCombo/Combos/PvE/MNK.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb
}

// OGCDs
if (inCombat && canWeave)
if (canWeave)
{
if (IsEnabled(Variant.VariantRampart) &&
IsOffCooldown(Variant.VariantRampart))
Expand Down Expand Up @@ -157,80 +157,79 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb
}

// GCDs
if (inCombat)

// Ensure usage if buff is almost depleted.
if (HasEffect(Buffs.FiresRumination) && GetBuffRemainingTime(Buffs.FiresRumination) < 4)
{
// Ensure usage if buff is almost depleted.
if (HasEffect(Buffs.FiresRumination) && GetBuffRemainingTime(Buffs.FiresRumination) < 4)
{
return FiresReply;
}
return FiresReply;
}

if (HasEffect(Buffs.WindsRumination) && GetBuffRemainingTime(Buffs.WindsRumination) < 4)
{
return WindsReply;
}
if (HasEffect(Buffs.WindsRumination) && GetBuffRemainingTime(Buffs.WindsRumination) < 4)
{
return WindsReply;
}

if (HasEffect(Buffs.FormlessFist))
{
return Gauge.OpoOpoFury == 0 ? OriginalHook(DragonKick) : OriginalHook(Bootshine);
}
if (HasEffect(Buffs.FormlessFist))
{
return Gauge.OpoOpoFury == 0 ? OriginalHook(DragonKick) : OriginalHook(Bootshine);
}

// Masterful Blitz
if (MasterfulBlitz.LevelChecked() && !HasEffect(Buffs.PerfectBalance) && HasEffect(Buffs.RiddleOfFire) && !IsOriginal(MasterfulBlitz))
{
return OriginalHook(MasterfulBlitz);
}
// Masterful Blitz
if (MasterfulBlitz.LevelChecked() && !HasEffect(Buffs.PerfectBalance) && HasEffect(Buffs.RiddleOfFire) && !IsOriginal(MasterfulBlitz))
{
return OriginalHook(MasterfulBlitz);
}

// Perfect Balance
if (HasEffect(Buffs.PerfectBalance))
{
bool solarNadi = Gauge.Nadi == Nadi.SOLAR;
bool lunarNadi = Gauge.Nadi == Nadi.LUNAR;
int opoOpoChakra = Gauge.BeastChakra.Where(x => x == BeastChakra.OPOOPO).Count();
int raptorChakra = Gauge.BeastChakra.Where(x => x == BeastChakra.RAPTOR).Count();
int coeurlChakra = Gauge.BeastChakra.Where(x => x == BeastChakra.COEURL).Count();
// Perfect Balance
if (HasEffect(Buffs.PerfectBalance))
{
bool solarNadi = Gauge.Nadi == Nadi.SOLAR;
bool lunarNadi = Gauge.Nadi == Nadi.LUNAR;
int opoOpoChakra = Gauge.BeastChakra.Where(x => x == BeastChakra.OPOOPO).Count();
int raptorChakra = Gauge.BeastChakra.Where(x => x == BeastChakra.RAPTOR).Count();
int coeurlChakra = Gauge.BeastChakra.Where(x => x == BeastChakra.COEURL).Count();

#region Open Solar
if (!solarNadi && !bothNadisOpen)
#region Open Solar
if (!solarNadi && !bothNadisOpen)
{
if (coeurlChakra == 0)
{
if (coeurlChakra == 0)
{
return Gauge.CoeurlFury == 0 ? OriginalHook(Demolish) : OriginalHook(SnapPunch);
}
else if (raptorChakra == 0)
{
return Gauge.RaptorFury == 0 ? OriginalHook(TwinSnakes) : OriginalHook(TrueStrike);
}
else if (opoOpoChakra == 0)
{
return Gauge.OpoOpoFury == 0 ? OriginalHook(DragonKick) : OriginalHook(Bootshine);
}
return Gauge.CoeurlFury == 0 ? OriginalHook(Demolish) : OriginalHook(SnapPunch);
}
#endregion
#region Open Lunar
if (solarNadi || lunarNadi || bothNadisOpen)
else if (raptorChakra == 0)
{
return Gauge.RaptorFury == 0 ? OriginalHook(TwinSnakes) : OriginalHook(TrueStrike);
}
else if (opoOpoChakra == 0)
{
return Gauge.OpoOpoFury == 0 ? OriginalHook(DragonKick) : OriginalHook(Bootshine);
}
#endregion
}

if (HasEffect(Buffs.WindsRumination))
#endregion
#region Open Lunar
if (solarNadi || lunarNadi || bothNadisOpen)
{
return WindsReply;
return Gauge.OpoOpoFury == 0 ? OriginalHook(DragonKick) : OriginalHook(Bootshine);
}
#endregion
}

if (HasEffect(Buffs.FiresRumination)
&& !HasEffect(Buffs.PerfectBalance)
&& !HasEffect(Buffs.FormlessFist)
&& (WasLastWeaponskill(LeapingOpo) || WasLastWeaponskill(DragonKick)))
{
return FiresReply;
}
if (HasEffect(Buffs.WindsRumination))
{
return WindsReply;
}

// Standard Beast Chakras
return MNKHelper.DetermineCoreAbility(actionID);
if (HasEffect(Buffs.FiresRumination)
&& !HasEffect(Buffs.PerfectBalance)
&& !HasEffect(Buffs.FormlessFist)
&& (WasLastWeaponskill(LeapingOpo) || WasLastWeaponskill(DragonKick)))
{
return FiresReply;
}

// Standard Beast Chakras
return MNKHelper.DetermineCoreAbility(actionID);

}

return actionID;
Expand Down Expand Up @@ -468,7 +467,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim
// 3. During Brotherhood.
// 4. During Riddle of Fire.
// 5. Prepare Masterful Blitz for the Riddle of Fire & Brotherhood window.
if (HasCharges(PerfectBalance) &&
if (HasCharges(PerfectBalance) &&
(GetRemainingCharges(PerfectBalance) == GetMaxCharges(PerfectBalance)) ||
(GetCooldownRemainingTime(PerfectBalance) <= 4) ||
(HasEffect(Buffs.Brotherhood)) ||
Expand Down

0 comments on commit e98ef0c

Please sign in to comment.