Skip to content

Commit

Permalink
Fix SMN
Browse files Browse the repository at this point in the history
  • Loading branch information
Taurenkey committed Nov 19, 2024
1 parent d5b3278 commit 69f2e8e
Showing 1 changed file with 78 additions and 78 deletions.
156 changes: 78 additions & 78 deletions XIVSlothCombo/Combos/PvE/SMN/SMN.cs
Original file line number Diff line number Diff line change
Expand Up @@ -824,7 +824,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim
}

// Emergency priority Demi Nuke to prevent waste if you can't get demi attacks out to satisfy the slider check.
if (OriginalHook(Ruin) is AstralImpulse or UmbralImpulse or FountainOfFire &&
if (OriginalHook(Ruin) is AstralImpulse or UmbralImpulse or FountainOfFire &&
IsEnabled(CustomComboPreset.SMN_Advanced_Combo_DemiSummons_Attacks_AoE) && GetCooldown(OriginalHook(Aethercharge)).CooldownElapsed >= 12.5)
{
if (IsEnabled(CustomComboPreset.SMN_Advanced_Combo_DemiSummons_Attacks_AoE))
Expand Down Expand Up @@ -864,7 +864,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim
(SummonerBurstPhase is not 4)) ||
(SummonerBurstPhase == 4 && !HasEffect(Buffs.TitansFavor)))
return OriginalHook(Painflare);

}
}
}
Expand All @@ -875,7 +875,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim
// Demi Nuke
if (OriginalHook(Ruin) is AstralImpulse or UmbralImpulse or FountainOfFire)
{
if (IsEnabled(CustomComboPreset.SMN_Advanced_Combo_DemiSummons_Attacks_AoE) && IsBahamutReady && (LevelChecked(SummonSolarBahamut) || DemiAttackCount >= burstDelay)
if (IsEnabled(CustomComboPreset.SMN_Advanced_Combo_DemiSummons_Attacks_AoE) && IsBahamutReady && (LevelChecked(SummonSolarBahamut) || DemiAttackCount >= burstDelay)
&& (IsNotEnabled(CustomComboPreset.SMN_SearingLight_Burst_AoE) || (LevelChecked(SummonSolarBahamut) || HasEffect(Buffs.SearingLight))))
{
if (IsOffCooldown(OriginalHook(EnkindleBahamut)) && LevelChecked(SummonBahamut))
Expand All @@ -896,7 +896,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim
}

// Demi Nuke 3: More Boogaloo
if (IsEnabled(CustomComboPreset.SMN_Advanced_Combo_DemiSummons_Attacks_AoE) && IsSolarBahamutReady && DemiAttackCount >= burstDelay &&
if (IsEnabled(CustomComboPreset.SMN_Advanced_Combo_DemiSummons_Attacks_AoE) && IsSolarBahamutReady && DemiAttackCount >= burstDelay &&
(IsNotEnabled(CustomComboPreset.SMN_SearingLight_Burst_AoE) || HasEffect(Buffs.SearingLight)))
{
if (IsOffCooldown(OriginalHook(EnkindleSolarBahamut)) && LevelChecked(SummonSolarBahamut))
Expand All @@ -906,7 +906,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim
return OriginalHook(AstralFlow);
}
}

// Lux Solaris
if (IsOffCooldown(LuxSolaris) && IsEnabled(CustomComboPreset.SMN_Advanced_Combo_DemiSummons_LuxSolaris_AoE) && HasEffect(Buffs.RefulgentLux) &&
(PlayerHealthPercentageHp() < 100 || GetBuffRemainingTime(Buffs.RefulgentLux) is < 3 and > 0))
Expand All @@ -918,12 +918,12 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim
if (gauge.HasAetherflowStacks && CanSpellWeave(actionID))
{
if (IsNotEnabled(CustomComboPreset.SMN_DemiEgiMenu_oGCDPooling_AoE))
return OriginalHook(Painflare);
return OriginalHook(Painflare);

if (IsEnabled(CustomComboPreset.SMN_DemiEgiMenu_oGCDPooling_AoE))
{
if (!LevelChecked(SearingLight))
return OriginalHook(Painflare);
return OriginalHook(Painflare);

if ((((HasEffect(Buffs.SearingLight) && IsNotEnabled(CustomComboPreset.SMN_Advanced_Burst_Any_Option_AoE)) || HasEffectAny(Buffs.SearingLight)) &&
SummonerBurstPhase is 0 or 1 or 2 or 3 && DemiAttackCount >= burstDelay) ||
Expand All @@ -936,49 +936,49 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim
// Lucid Dreaming
if (IsEnabled(CustomComboPreset.SMN_Lucid_AoE) && ActionReady(All.LucidDreaming) && LocalPlayer.CurrentMp <= lucidThreshold)
return All.LucidDreaming;
}

// Demi
if (IsEnabled(CustomComboPreset.SMN_Advanced_Combo_DemiSummons_AoE))
{
if (InCombat() && gauge.SummonTimerRemaining == 0 && IsOffCooldown(OriginalHook(Aethercharge)) &&
((LevelChecked(Aethercharge) && !LevelChecked(SummonBahamut)) || // Pre-Bahamut Phase
(IsBahamutReady && LevelChecked(SummonBahamut)) || // Bahamut Phase
(IsPhoenixReady && LevelChecked(SummonPhoenix)) || // Phoenix Phase
(IsSolarBahamutReady && LevelChecked(SummonSolarBahamut)))) // Solar Bahamut Phase
return OriginalHook(Aethercharge);
}

//Ruin4 in Egi Phases
if (IsEnabled(CustomComboPreset.SMN_Advanced_Combo_Ruin4_AoE) && HasEffect(Buffs.FurtherRuin) &&
((!HasEffect(All.Buffs.Swiftcast) && IsMoving && ((HasEffect(Buffs.GarudasFavor) && !IsGarudaAttuned) || (IsIfritAttuned && lastComboMove is not CrimsonCyclone))) ||
GetCooldownRemainingTime(OriginalHook(Aethercharge)) is < 2.5f and > 0))
return Ruin4;

// Egi Features
if (IsEnabled(CustomComboPreset.SMN_DemiEgiMenu_SwiftcastEgi_AoE) && LevelChecked(All.Swiftcast))
{
// Swiftcast Garuda Feature
if (swiftcastPhase is 0 or 1 && LevelChecked(Slipstream) && HasEffect(Buffs.GarudasFavor))
// Demi
if (IsEnabled(CustomComboPreset.SMN_Advanced_Combo_DemiSummons_AoE))
{
if (CanSpellWeave(actionID) && IsGarudaAttuned && IsOffCooldown(All.Swiftcast))
return All.Swiftcast;

if (Config.SMN_ST_Egi_AstralFlow[2] &&
((HasEffect(Buffs.GarudasFavor) && HasEffect(All.Buffs.Swiftcast)) || (gauge.Attunement == 0))) // Astral Flow if Swiftcast is not ready throughout Garuda
return OriginalHook(AstralFlow);
if (InCombat() && gauge.SummonTimerRemaining == 0 && IsOffCooldown(OriginalHook(Aethercharge)) &&
((LevelChecked(Aethercharge) && !LevelChecked(SummonBahamut)) || // Pre-Bahamut Phase
(IsBahamutReady && LevelChecked(SummonBahamut)) || // Bahamut Phase
(IsPhoenixReady && LevelChecked(SummonPhoenix)) || // Phoenix Phase
(IsSolarBahamutReady && LevelChecked(SummonSolarBahamut)))) // Solar Bahamut Phase
return OriginalHook(Aethercharge);
}

// Swiftcast Ifrit Feature (Conditions to allow for SpS Ruins to still be under the effect of Swiftcast)
if (swiftcastPhase == 2)
//Ruin4 in Egi Phases
if (IsEnabled(CustomComboPreset.SMN_Advanced_Combo_Ruin4_AoE) && HasEffect(Buffs.FurtherRuin) &&
((!HasEffect(All.Buffs.Swiftcast) && IsMoving && ((HasEffect(Buffs.GarudasFavor) && !IsGarudaAttuned) || (IsIfritAttuned && lastComboMove is not CrimsonCyclone))) ||
GetCooldownRemainingTime(OriginalHook(Aethercharge)) is < 2.5f and > 0))
return Ruin4;

// Egi Features
if (IsEnabled(CustomComboPreset.SMN_DemiEgiMenu_SwiftcastEgi_AoE) && LevelChecked(All.Swiftcast))
{
if (IsOffCooldown(All.Swiftcast) && IsIfritAttuned && lastComboMove is not CrimsonCyclone)
// Swiftcast Garuda Feature
if (swiftcastPhase is 0 or 1 && LevelChecked(Slipstream) && HasEffect(Buffs.GarudasFavor))
{
if (!Config.SMN_ST_Egi_AstralFlow[1] || (Config.SMN_ST_Egi_AstralFlow[1] && gauge.Attunement >= 1))
if (CanSpellWeave(actionID) && IsGarudaAttuned && IsOffCooldown(All.Swiftcast))
return All.Swiftcast;

if (Config.SMN_ST_Egi_AstralFlow[2] &&
((HasEffect(Buffs.GarudasFavor) && HasEffect(All.Buffs.Swiftcast)) || (gauge.Attunement == 0))) // Astral Flow if Swiftcast is not ready throughout Garuda
return OriginalHook(AstralFlow);
}

// Swiftcast Ifrit Feature (Conditions to allow for SpS Ruins to still be under the effect of Swiftcast)
if (swiftcastPhase == 2)
{
if (IsOffCooldown(All.Swiftcast) && IsIfritAttuned && lastComboMove is not CrimsonCyclone)
{
if (!Config.SMN_ST_Egi_AstralFlow[1] || (Config.SMN_ST_Egi_AstralFlow[1] && gauge.Attunement >= 1))
return All.Swiftcast;
}
}
}
}

// SpS Swiftcast
if (swiftcastPhase == 3)
Expand All @@ -987,8 +987,8 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim
if (LevelChecked(Slipstream) && HasEffect(Buffs.GarudasFavor))
{
if (CanSpellWeave(actionID) && IsGarudaAttuned && IsOffCooldown(All.Swiftcast))
return All.Swiftcast;
return All.Swiftcast;

if (Config.SMN_ST_Egi_AstralFlow[2] &&
((HasEffect(Buffs.GarudasFavor) && HasEffect(All.Buffs.Swiftcast)) || (gauge.Attunement == 0))) // Astral Flow if Swiftcast is not ready throughout Garuda
return OriginalHook(AstralFlow);
Expand All @@ -1001,53 +1001,53 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim
return All.Swiftcast;
}
}


// Precious Brilliance priority casting
if (IsEnabled(CustomComboPreset.SMN_Advanced_Combo_EgiSummons_Attacks_AoE) && LevelChecked(PreciousBrilliance) &&
((IsIfritAttuned && gauge.Attunement >= 1 && HasEffect(All.Buffs.Swiftcast) && lastComboMove is not CrimsonCyclone) ||
(HasEffect(Buffs.GarudasFavor) && gauge.Attunement >= 1 && !HasEffect(All.Buffs.Swiftcast) && IsMoving)))
return OriginalHook(PreciousBrilliance);

if ((Config.SMN_ST_Egi_AstralFlow[2] && HasEffect(Buffs.GarudasFavor) && (IsNotEnabled(CustomComboPreset.SMN_DemiEgiMenu_SwiftcastEgi_AoE) || swiftcastPhase == 2)) || // Garuda
(Config.SMN_ST_Egi_AstralFlow[0] && HasEffect(Buffs.TitansFavor) && lastComboMove is TopazRite or TopazCata && CanSpellWeave(actionID)) || // Titan
(Config.SMN_ST_Egi_AstralFlow[1] && (HasEffect(Buffs.IfritsFavor) && !Config.SMN_ST_CrimsonCycloneMelee && (IsMoving || gauge.Attunement == 0) || (lastComboMove is CrimsonCyclone && InMeleeRange()))) ||
(Config.SMN_ST_Egi_AstralFlow[1] && HasEffect(Buffs.IfritsFavor) && Config.SMN_ST_CrimsonCycloneMelee && InMeleeRange())) // Ifrit
return OriginalHook(AstralFlow);
// Precious Brilliance priority casting
if (IsEnabled(CustomComboPreset.SMN_Advanced_Combo_EgiSummons_Attacks_AoE) && LevelChecked(PreciousBrilliance) &&
((IsIfritAttuned && gauge.Attunement >= 1 && HasEffect(All.Buffs.Swiftcast) && lastComboMove is not CrimsonCyclone) ||
(HasEffect(Buffs.GarudasFavor) && gauge.Attunement >= 1 && !HasEffect(All.Buffs.Swiftcast) && IsMoving)))
return OriginalHook(PreciousBrilliance);

// Precious Brilliance
if (IsEnabled(CustomComboPreset.SMN_Advanced_Combo_EgiSummons_Attacks_AoE) && LevelChecked(PreciousBrilliance) && (IsGarudaAttuned || IsTitanAttuned || IsIfritAttuned))
return OriginalHook(PreciousBrilliance);
if ((Config.SMN_ST_Egi_AstralFlow[2] && HasEffect(Buffs.GarudasFavor) && (IsNotEnabled(CustomComboPreset.SMN_DemiEgiMenu_SwiftcastEgi_AoE) || swiftcastPhase == 2)) || // Garuda
(Config.SMN_ST_Egi_AstralFlow[0] && HasEffect(Buffs.TitansFavor) && lastComboMove is TopazRite or TopazCata && CanSpellWeave(actionID)) || // Titan
(Config.SMN_ST_Egi_AstralFlow[1] && (HasEffect(Buffs.IfritsFavor) && !Config.SMN_ST_CrimsonCycloneMelee && (IsMoving || gauge.Attunement == 0) || (lastComboMove is CrimsonCyclone && InMeleeRange()))) ||
(Config.SMN_ST_Egi_AstralFlow[1] && HasEffect(Buffs.IfritsFavor) && Config.SMN_ST_CrimsonCycloneMelee && InMeleeRange())) // Ifrit
return OriginalHook(AstralFlow);

// Egi Order
if (IsEnabled(CustomComboPreset.SMN_DemiEgiMenu_EgiOrder_AoE) && gauge.SummonTimerRemaining == 0)
{
if (gauge.IsIfritReady && !gauge.IsTitanReady && !gauge.IsGarudaReady && LevelChecked(SummonRuby))
return OriginalHook(SummonRuby);
// Precious Brilliance
if (IsEnabled(CustomComboPreset.SMN_Advanced_Combo_EgiSummons_Attacks_AoE) && LevelChecked(PreciousBrilliance) && (IsGarudaAttuned || IsTitanAttuned || IsIfritAttuned))
return OriginalHook(PreciousBrilliance);

if (summonerPrimalChoice is 0 or 1)
// Egi Order
if (IsEnabled(CustomComboPreset.SMN_DemiEgiMenu_EgiOrder_AoE) && gauge.SummonTimerRemaining == 0)
{
if (gauge.IsTitanReady && LevelChecked(SummonTopaz))
return OriginalHook(SummonTopaz);
if (gauge.IsIfritReady && !gauge.IsTitanReady && !gauge.IsGarudaReady && LevelChecked(SummonRuby))
return OriginalHook(SummonRuby);

if (gauge.IsGarudaReady && LevelChecked(SummonEmerald))
return OriginalHook(SummonEmerald);
}
if (summonerPrimalChoice is 0 or 1)
{
if (gauge.IsTitanReady && LevelChecked(SummonTopaz))
return OriginalHook(SummonTopaz);

if (summonerPrimalChoice == 2)
{
if (gauge.IsGarudaReady && LevelChecked(SummonEmerald))
return OriginalHook(SummonEmerald);
if (gauge.IsGarudaReady && LevelChecked(SummonEmerald))
return OriginalHook(SummonEmerald);
}

if (gauge.IsTitanReady && LevelChecked(SummonTopaz))
return OriginalHook(SummonTopaz);
}
}
if (summonerPrimalChoice == 2)
{
if (gauge.IsGarudaReady && LevelChecked(SummonEmerald))
return OriginalHook(SummonEmerald);

// Ruin 4
if (IsEnabled(CustomComboPreset.SMN_Advanced_Combo_Ruin4_AoE) && LevelChecked(Ruin4) && gauge.SummonTimerRemaining == 0 && gauge.AttunmentTimerRemaining == 0 && HasEffect(Buffs.FurtherRuin))
return Ruin4;
if (gauge.IsTitanReady && LevelChecked(SummonTopaz))
return OriginalHook(SummonTopaz);
}
}

// Ruin 4
if (IsEnabled(CustomComboPreset.SMN_Advanced_Combo_Ruin4_AoE) && LevelChecked(Ruin4) && gauge.SummonTimerRemaining == 0 && gauge.AttunmentTimerRemaining == 0 && HasEffect(Buffs.FurtherRuin))
return Ruin4;
}
return actionID;
}
}
Expand Down

0 comments on commit 69f2e8e

Please sign in to comment.