Skip to content

Commit bdf8717

Browse files
committed
fix a couple fuckups in RDM
1 parent b62a8fe commit bdf8717

File tree

1 file changed

+25
-16
lines changed

1 file changed

+25
-16
lines changed

XIVComboVX/Combos/RDM.cs

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim
351351
}
352352

353353
if (fastCast || level < RDM.Levels.Verthunder2)
354-
return OriginalHook(RDM.Impact);
354+
return OriginalHook(RDM.Scatter);
355355

356356
if (level < RDM.Levels.Veraero2)
357357
return RDM.Verthunder2;
@@ -422,6 +422,7 @@ private static uint noCastingSubCheck(byte level, bool engageCheck, bool holdOne
422422
if (shouldEngage && engageEarly)
423423
return RDM.Engagement;
424424

425+
// TODO check the times on Prefulgence Ready and Thorned Flourish to prioritise one over the other if it's about to run out
425426
if (level >= RDM.Levels.Prefulgence && SelfHasEffect(RDM.Buffs.PrefulgenceReady))
426427
return RDM.Prefulgence;
427428

@@ -515,9 +516,12 @@ const int
515516
if (alt > 0)
516517
return alt;
517518
}
518-
if (isFinishingAny) // This accounts for both the finisher combo chain (Scorch and Resolution) AND the initial decision of whether to START the finishers (Verflare or Verholy)
519-
// Since you lose your mana stacks when you cast ANY spell, you want to use the finishers as soon as they're up, so you don't lose them
520-
return actionID;
519+
520+
// This accounts for both the finisher combo chain (Scorch and Resolution) AND the initial decision of whether to START the finishers (Verflare or Verholy)
521+
// Since you lose your mana stacks when you cast ANY spell, you want to use the finishers as soon as they're up, so you don't lose them
522+
if (isFinishingAny)
523+
return actionID; // isFinishingAny is only true if the helper function assigned the appropriate actionID value
524+
521525
if (instacasting) {
522526
// TODO: need to account for hardcasting spells with no cast time!
523527

@@ -560,17 +564,21 @@ const int
560564
return OriginalHook(RDM.Veraero);
561565
}
562566
}
563-
if (shouldCloseGap) // If this is the case, then meleeCombo CANNOT be, because one requires isClose and one requires !isClose, so the order of these two doesn't really matter.
564-
// I decided to put it here because logically, you need to close before you can melee.
567+
568+
// If this is the case, then meleeCombo CANNOT be, because one requires isClose and one requires !isClose, so the order of these two doesn't really matter.
569+
// I decided to put it here because logically, you need to close before you can melee.
570+
if (shouldCloseGap)
565571
return RDM.Corpsacorps;
572+
566573
if (meleeCombo) {
567-
// If we're out of range while in the combo, become Corps-a-corps to get back in range. Otherwise, just run the combo.
568574

575+
// If we're out of range while in the combo, become Corps-a-corps to get back in range. Otherwise, just run the combo.
569576
if (targeting && !isClose && level >= RDM.Levels.Corpsacorps)
570577
return RDM.Corpsacorps;
571578

572579
return actionID; // meleeCombo is only true if the helper function assigned the appropriate actionID value
573580
}
581+
574582
if (smartMove) {
575583
// Can't slowcast spells if you're moving, so we have to fall back to instants.
576584
// I know it's a mess. Moving it into another method was basically the best I could do, since the whole thing is duplicated for weaving and moving but with different variables.
@@ -582,18 +590,18 @@ const int
582590
if (alt > 0)
583591
return alt;
584592
}
585-
if (useGrandImpact) // Should maybe check time remaining on GI Ready and verprocs, but checking time on three different buffs to calculate priorities is gonna be a bit of a bitch...
586-
// Eventually(tm)
587-
// Hm, note to self - could probably just check the lesser of the nonzero verprocs is at least ~6s, to account for cooldown from GI being GCD and then the cast time on the spell...
588-
// What if both are about to run out, though? Verproc gives dualcast, so.. probably that one?
589-
// Might need to check with a sweaty RDM optimiser
590593

594+
// Should maybe check time remaining on GI Ready and verprocs, but checking time on three different buffs to calculate priorities is gonna be a bit of a bitch...
595+
// Eventually(tm)
596+
// Hm, note to self - could probably just check the lesser of the nonzero verprocs is at least ~6s, to account for cooldown from GI being GCD and then the cast time on the spell...
597+
// What if both are about to run out, though? Verproc gives dualcast, so.. probably that one?
598+
// Might need to check with a sweaty RDM optimiser
599+
if (useGrandImpact)
591600
return RDM.GrandImpact;
592601

593602
// Stand fast, slow cast!
594603

595604
if (verfireUp && verstoneUp) {
596-
597605
// TODO should probably check at the VERY least that the effect for the chosen action has at least ~3 seconds left, or you won't finish the cast before it interrupts you and you'll drift
598606

599607
// Decide by mana levels
@@ -622,7 +630,8 @@ const int
622630
return alt;
623631
}
624632

625-
// Finally, if all else fails, become Jolt whatever, or Grand Impact I guess
633+
// Finally, if all else fails, become Jolt whatever
634+
// It won't be Grand Impact cause we handle that ourselves up above, but there's three damn jolts now and I canNOT be assed to handle them myself :V
626635
return OriginalHook(RDM.Jolt);
627636
}
628637
}
@@ -659,14 +668,14 @@ internal class RedMageManafication: CustomCombo {
659668

660669
protected override uint Invoke(uint actionID, uint lastComboActionId, float comboTime, byte level) {
661670
bool melee = (level >= RDM.Levels.Manafication && SelfHasEffect(RDM.Buffs.MagickedSwordplay))
662-
|| lastComboActionId is RDM.Riposte or RDM.EnchantedRiposte or RDM.Zwerchhau or RDM.EnchantedZwerchhau;
671+
|| lastComboActionId is RDM.EnchantedRiposte or RDM.EnchantedZwerchhau;
663672

664673
if (IsEnabled(CustomComboPreset.RedMageManaficationIntoMeleeGauge) && !melee) {
665674
RDMGauge gauge = GetJobGauge<RDMGauge>();
666675
byte black = gauge.BlackMana;
667676
byte white = gauge.WhiteMana;
668677
byte threshold = RDM.ManaForMeleeChain(level);
669-
if ((black >= threshold && white >= threshold && black != white) || black == 100)
678+
if (black >= threshold && white >= threshold && (black != white || black == 100))
670679
melee = true;
671680
}
672681

0 commit comments

Comments
 (0)