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 #1458 from Tartarga/RDM
Browse files Browse the repository at this point in the history
RDM Manafication Fix
  • Loading branch information
Taurenkey authored Jul 11, 2024
2 parents 63cbed4 + 7b8f992 commit 7300ab5
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 10 deletions.
2 changes: 1 addition & 1 deletion XIVSlothCombo/Combos/CustomComboPreset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2700,7 +2700,7 @@ The three digets after RDM.JobID can be used to reorder items in the list
RDM_AoE_oGCD = 13241,

[ParentCombo(RDM_AoE_DPS)]
[CustomComboInfo("Moulinet Melee Combo Option", "Use Moulinet when over 60/60 mana", RDM.JobID, 420)]
[CustomComboInfo("Moulinet Melee Combo Option", "Use Moulinet when over 50/50 mana", RDM.JobID, 420)]
RDM_AoE_MeleeCombo = 13420,

[ParentCombo(RDM_AoE_MeleeCombo)]
Expand Down
40 changes: 31 additions & 9 deletions XIVSlothCombo/Combos/PvE/RDM.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ public const uint
Resolution = 25858,
Moulinet = 7513,
EnchantedMoulinet = 7530,
EnchantedMoulinetDeux = 6969,
EnchantedMoulinetTrois = 6969,
EnchantedMoulinetDeux = 37002,
EnchantedMoulinetTrois = 37003,
Corpsacorps = 7506,
Displacement = 7515,
Reprise = 16529,
Expand All @@ -65,6 +65,7 @@ public const ushort
Acceleration = 1238,
Embolden = 1239,
EmboldenOthers = 1297,
Manafication = 1971,
MagickBarrier = 2707;
}

Expand All @@ -73,7 +74,7 @@ public static class Debuffs
// public const short placeholder = 0;
}

protected static RDMGauge Gauge => CustomComboFunctions.GetJobGauge<RDMGauge>();
public static RDMGauge Gauge => CustomComboFunctions.GetJobGauge<RDMGauge>();

public static class Config
{
Expand Down Expand Up @@ -375,7 +376,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim
&& LocalPlayer.IsCasting == false)
{
bool ActionFound =
(!Config.RDM_ST_MeleeCombo_Adv && actionID is Jolt or Jolt2 or Jolt3) ||
(!Config.RDM_ST_MeleeCombo_Adv && (actionID is Jolt or Jolt2 or Jolt3)) ||
(Config.RDM_ST_MeleeCombo_Adv &&
((Config.RDM_ST_MeleeCombo_OnAction[0] && actionID is Jolt or Jolt2 or Jolt3) ||
(Config.RDM_ST_MeleeCombo_OnAction[1] && actionID is Riposte or EnchantedRiposte)));
Expand Down Expand Up @@ -500,9 +501,17 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim
return OriginalHook(Redoublement);
}

if (((Math.Min(Gauge.WhiteMana, Gauge.BlackMana) >= 50 && LevelChecked(Redoublement))
|| (Math.Min(Gauge.WhiteMana, Gauge.BlackMana) >= 35 && !LevelChecked(Redoublement))
|| (Math.Min(Gauge.WhiteMana, Gauge.BlackMana) >= 20 && !LevelChecked(Zwerchhau)))
//7.0 Manification Magic Mana
int Mana = Math.Min(Gauge.WhiteMana, Gauge.BlackMana);
if (LevelChecked(Manafication))
{
int ManaBuff = (int)GetBuffStacks(Buffs.Manafication);
if (ManaBuff > 0) Mana = 50; //ITS FREE REAL ESTATE
}

if (((Mana >= 50 && LevelChecked(Redoublement))
|| (Mana >= 35 && !LevelChecked(Redoublement))
|| (Mana >= 20 && !LevelChecked(Zwerchhau)))
&& !HasEffect(Buffs.Dualcast))
{
if (IsEnabled(CustomComboPreset.RDM_ST_MeleeCombo_CorpsGapCloser)
Expand Down Expand Up @@ -652,6 +661,12 @@ actionID is Scatter or Impact &&

if (ActionFound)
{
//Finish the combo
if (LevelChecked(Moulinet)
&& lastComboMove is EnchantedMoulinet or EnchantedMoulinetDeux
&& comboTime > 0f)
return OriginalHook(Moulinet);

//RDM_AOE_MANAFICATIONEMBOLDEN
if (IsEnabled(CustomComboPreset.RDM_AoE_MeleeCombo_ManaEmbolden))
{
Expand Down Expand Up @@ -713,20 +728,27 @@ actionID is Scatter or Impact &&
//END_RDM_AOE_MANAFICATIONEMBOLDEN
}

//7.0 Manification Magic Mana
//The Math.Min after level check is GaugeStack * 16.67 >= 50 to validate Molinet
//Really needs some higher level autism to figure out if there is a better way
int ManaBuff = (int)GetBuffStacks(Buffs.Manafication);
if (ManaBuff > 3) ManaBuff = 3; //Only need 3 to use the combo (low level 60 get 3)
int ManaStacks = Math.Max(Gauge.ManaStacks, ManaBuff);

if (LevelChecked(Moulinet)
&& LocalPlayer.IsCasting == false
&& !HasEffect(Buffs.Dualcast)
&& !HasEffect(All.Buffs.Swiftcast)
&& !HasEffect(Buffs.Acceleration)
&& ((Math.Min(Gauge.BlackMana, Gauge.WhiteMana) + (Gauge.ManaStacks * 20) >= 50) ||
&& ((Math.Min(Gauge.BlackMana, Gauge.WhiteMana) + (ManaStacks * 16.67) >= 50) ||
(!LevelChecked(Verflare) && Math.Min(Gauge.BlackMana, Gauge.WhiteMana) >= 20)))
{
if (IsEnabled(CustomComboPreset.RDM_AoE_MeleeCombo_CorpsGapCloser)
&& ActionReady(Corpsacorps)
&& GetTargetDistance() > Config.RDM_AoE_MoulinetRange)
return Corpsacorps;

if ((GetTargetDistance() <= Config.RDM_AoE_MoulinetRange && Gauge.ManaStacks == 0) || Gauge.ManaStacks >= 1)
if ((GetTargetDistance() <= Config.RDM_AoE_MoulinetRange && ManaStacks == 0) || ManaStacks >= 1)
return OriginalHook(Moulinet);
}
}
Expand Down

0 comments on commit 7300ab5

Please sign in to comment.