Skip to content
This repository has been archived by the owner on Nov 21, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1811 from Kagekazu/MNK-Opener-fix
Browse files Browse the repository at this point in the history
[MNK] 2 little fixes
  • Loading branch information
Taurenkey authored Oct 14, 2024
2 parents 98e95b3 + 11afa81 commit 283a25a
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 27 deletions.
30 changes: 19 additions & 11 deletions XIVSlothCombo/Combos/JobHelpers/MNK.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,35 +110,43 @@ private static bool HasCooldowns()
if (Gauge.Nadi != Nadi.NONE)
return false;

if (Gauge.RaptorFury != 0 || Gauge.CoeurlFury != 0)
if (Gauge.RaptorFury != 0)
return false;

if (Gauge.CoeurlFury != 0)
return false;

return true;
}

private bool DoPrePullSteps(ref uint actionID)
{
if (!LevelChecked)
return false;
if (!LevelChecked) return false;

if (CanOpener && PrePullStep == 0) PrePullStep = 1;

if (!HasCooldowns()) PrePullStep = 0;

if (CurrentState == OpenerState.PrePull && PrePullStep > 0)
{
if (Gauge.Chakra == 5 && PrePullStep == 1) PrePullStep++;
else if (PrePullStep == 1) actionID = OriginalHook(Meditation);
if (Gauge.Chakra < 5 && PrePullStep == 1)
{
actionID = ForbiddenMeditation;

if (HasEffect(Buffs.FormlessFist) && Gauge.Chakra == 5 && PrePullStep == 2) PrePullStep++;
else if (PrePullStep == 2) actionID = FormShift;
return true;
}

if (WasLastAction(DragonKick) && PrePullStep == 3) CurrentState = OpenerState.InOpener;
else if (PrePullStep == 3) actionID = DragonKick;
if (!HasEffect(Buffs.FormlessFist) &&
!HasEffect(Buffs.RaptorForm) && PrePullStep == 1)
{
actionID = FormShift;

if (!HasEffect(Buffs.FormlessFist) && Gauge.Chakra == 5 && PrePullStep == 3)
currentState = OpenerState.FailedOpener;
return true;
}

if (WasLastAction(DragonKick) && PrePullStep == 1) CurrentState = OpenerState.InOpener;
else if (PrePullStep == 1) actionID = DragonKick;

if (ActionWatching.CombatActions.Count > 2 && InCombat())
CurrentState = OpenerState.FailedOpener;

Expand Down
36 changes: 20 additions & 16 deletions XIVSlothCombo/Combos/PvE/MNK.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb
int opoOpoChakra = Gauge.BeastChakra.Count(x => x == BeastChakra.OPOOPO);
int raptorChakra = Gauge.BeastChakra.Count(x => x == BeastChakra.RAPTOR);
int coeurlChakra = Gauge.BeastChakra.Count(x => x == BeastChakra.COEURL);
float GCD = GetCooldown(OriginalHook(Bootshine)).CooldownTotal;

if (actionID is Bootshine or LeapingOpo)
{
Expand All @@ -120,6 +121,10 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb
PlayerHealthPercentageHp() <= Config.MNK_VariantCure)
return Variant.VariantCure;

if (ActionReady(RiddleOfFire) &&
CanDelayedWeave(ActionWatching.LastWeaponskill))
return RiddleOfFire;

// OGCDs
if (CanWeave(ActionWatching.LastWeaponskill))
{
Expand All @@ -132,16 +137,13 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb
if (ActionReady(Brotherhood))
return Brotherhood;

if (ActionReady(RiddleOfFire) &&
CanDelayedWeave(ActionWatching.LastWeaponskill))
return RiddleOfFire;

if (ActionReady(RiddleOfWind))
return RiddleOfWind;

//Perfect Balance
if (ActionReady(PerfectBalance) &&
!HasEffect(Buffs.PerfectBalance))
!HasEffect(Buffs.PerfectBalance) &&
!HasEffect(Buffs.FormlessFist))
{
// Odd window
if ((JustUsed(OriginalHook(Bootshine)) || JustUsed(DragonKick)) &&
Expand All @@ -152,8 +154,8 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb

// Even window
if ((JustUsed(OriginalHook(Bootshine)) || JustUsed(DragonKick)) &&
HasEffect(Buffs.Brotherhood) &&
HasEffect(Buffs.RiddleOfFire))
(GetCooldownRemainingTime(Brotherhood) <= GCD * 3 || HasEffect(Buffs.Brotherhood)) &&
(GetCooldownRemainingTime(RiddleOfFire) <= GCD * 3 || HasEffect(Buffs.RiddleOfFire)))
return PerfectBalance;

// Low level
Expand Down Expand Up @@ -233,8 +235,8 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb

if (HasEffect(Buffs.WindsRumination) &&
LevelChecked(WindsReply) &&
(HasEffect(Buffs.RiddleOfFire) ||
GetBuffRemainingTime(Buffs.WindsRumination) < 4))
HasEffect(Buffs.RiddleOfWind) &&
GetBuffRemainingTime(Buffs.WindsRumination) < 4)
return WindsReply;

// Standard Beast Chakras
Expand All @@ -259,6 +261,7 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb
int opoOpoChakra = Gauge.BeastChakra.Count(x => x == BeastChakra.OPOOPO);
int raptorChakra = Gauge.BeastChakra.Count(x => x == BeastChakra.RAPTOR);
int coeurlChakra = Gauge.BeastChakra.Count(x => x == BeastChakra.COEURL);
float GCD = GetCooldown(OriginalHook(Bootshine)).CooldownTotal;

if (actionID is Bootshine or LeapingOpo)
{
Expand Down Expand Up @@ -313,7 +316,8 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb
//Perfect Balance
if (IsEnabled(CustomComboPreset.MNK_STUsePerfectBalance) &&
ActionReady(PerfectBalance) &&
!HasEffect(Buffs.PerfectBalance))
!HasEffect(Buffs.PerfectBalance) &&
!HasEffect(Buffs.FormlessFist))
{
// Odd window
if ((JustUsed(OriginalHook(Bootshine)) || JustUsed(DragonKick)) &&
Expand All @@ -324,8 +328,8 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb

// Even window
if ((JustUsed(OriginalHook(Bootshine)) || JustUsed(DragonKick)) &&
HasEffect(Buffs.Brotherhood) &&
HasEffect(Buffs.RiddleOfFire))
(GetCooldownRemainingTime(Brotherhood) <= GCD * 3 || HasEffect(Buffs.Brotherhood)) &&
(GetCooldownRemainingTime(RiddleOfFire) <= GCD * 3 || HasEffect(Buffs.RiddleOfFire)))
return PerfectBalance;

// Low level
Expand Down Expand Up @@ -414,12 +418,12 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb
GetBuffRemainingTime(Buffs.FiresRumination) < 4))
return FiresReply;

if (IsEnabled(CustomComboPreset.MNK_STUseROW) &&
if (IsEnabled(CustomComboPreset.MNK_STUseROW) &&
IsEnabled(CustomComboPreset.MNK_STUseWindsReply) &&
HasEffect(Buffs.WindsRumination) &&
LevelChecked(WindsReply) &&
(HasEffect(Buffs.RiddleOfFire) ||
GetBuffRemainingTime(Buffs.WindsRumination) < 4))
HasEffect(Buffs.RiddleOfWind) &&
GetBuffRemainingTime(Buffs.WindsRumination) < 4)
return WindsReply;
}

Expand Down Expand Up @@ -467,7 +471,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim

if (ActionReady(Brotherhood))
return Brotherhood;

if (ActionReady(RiddleOfWind))
return RiddleOfWind;

Expand Down

0 comments on commit 283a25a

Please sign in to comment.