Skip to content

Commit

Permalink
Allow Sage to swiftcast Dosis if buff is up
Browse files Browse the repository at this point in the history
Closes #92 by adding options to all three _Dosis into <X>_ combos to prevent replacing Dosis while under swiftcast. If you wanna burn swiftcast on a dosis, be my guest, I guess.
  • Loading branch information
PrincessRTFM committed Nov 13, 2023
1 parent 3a212ff commit 70187e8
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 11 deletions.
28 changes: 17 additions & 11 deletions XIVComboVX/Combos/SGE.cs
Original file line number Diff line number Diff line change
Expand Up @@ -276,28 +276,34 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim
if (HasTarget) {

if (IsEnabled(CustomComboPreset.SageDosisPhlegma)) {
if (!IsEnabled(CustomComboPreset.SageDosisPhlegmaCombatOnly) || InCombat) {
if (level >= SGE.Levels.Phlegma && TargetDistance <= 6) {
uint phlegma = OriginalHook(SGE.Phlegma);
if (CanUse(phlegma))
return phlegma;
if (!IsEnabled(CustomComboPreset.SageDosisPhlegmaHardcastOnly) || IsHardcasting) {
if (!IsEnabled(CustomComboPreset.SageDosisPhlegmaCombatOnly) || InCombat) {
if (level >= SGE.Levels.Phlegma && TargetDistance <= 6) {
uint phlegma = OriginalHook(SGE.Phlegma);
if (CanUse(phlegma))
return phlegma;
}
}
}
}

if (IsEnabled(CustomComboPreset.SageDosisToxikon)) {
if (!IsEnabled(CustomComboPreset.SageDosisToxikonCombatOnly) || InCombat) {
if (level >= SGE.Levels.Toxikon && gauge.Addersting > 0)
return OriginalHook(SGE.Toxikon);
if (!IsEnabled(CustomComboPreset.SageDosisToxikonHardcastOnly) || IsHardcasting) {
if (!IsEnabled(CustomComboPreset.SageDosisToxikonCombatOnly) || InCombat) {
if (level >= SGE.Levels.Toxikon && gauge.Addersting > 0)
return OriginalHook(SGE.Toxikon);
}
}
}

}

if (IsEnabled(CustomComboPreset.SageDosisDyskrasia)) {
if (!IsEnabled(CustomComboPreset.SageDosisDyskrasiaCombatOnly) || InCombat) {
if (level >= SGE.Levels.Dyskrasia)
return OriginalHook(SGE.Dyskrasia);
if (!IsEnabled(CustomComboPreset.SageDosisDyskrasiaHardcastOnly) || IsHardcasting) {
if (!IsEnabled(CustomComboPreset.SageDosisDyskrasiaCombatOnly) || InCombat) {
if (level >= SGE.Levels.Dyskrasia)
return OriginalHook(SGE.Dyskrasia);
}
}
}

Expand Down
1 change: 1 addition & 0 deletions XIVComboVX/CustomCombo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ protected internal static bool IsFastcasting
|| SelfHasEffect(Common.Buffs.Swiftcast3)
|| SelfHasEffect(RDM.Buffs.Dualcast)
|| SelfHasEffect(Common.Buffs.LostChainspell);
protected internal static bool IsHardcasting => !IsFastcasting;

protected internal static T GetJobGauge<T>() where T : JobGaugeBase
=> Service.DataCache.GetJobGauge<T>();
Expand Down
12 changes: 12 additions & 0 deletions XIVComboVX/CustomComboPreset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1289,20 +1289,32 @@ public enum CustomComboPreset {
[CustomComboInfo("Combat Only", "Only change Dosis into Phlegma when already in combat.", SGE.JobID)]
SageDosisPhlegmaCombatOnly = 4021,

[ParentPreset(SageDosisPhlegma)]
[CustomComboInfo("Only when hardcasting", "Only change Dosis into Phlegma when hardcasting.", SGE.JobID)]
SageDosisPhlegmaHardcastOnly = 4024,

[CustomComboInfo("Dosis into Toxikon", "Turns Dosis into Toxikon while moving and have a target and Addersting.\nDoes not apply if you have Eukrasia active.", SGE.JobID)]
SageDosisToxikon = 4017,

[ParentPreset(SageDosisToxikon)]
[CustomComboInfo("Combat Only", "Only change Dosis into Toxikon when already in combat.", SGE.JobID)]
SageDosisToxikonCombatOnly = 4022,

[ParentPreset(SageDosisToxikon)]
[CustomComboInfo("Only when hardcasting", "Only change Dosis into Toxikon when hardcasting.", SGE.JobID)]
SageDosisToxikonHardcastOnly = 4025,

[CustomComboInfo("Dosis into Dyskrasia", "Turns Dosis into Dyskrasia while moving and not becoming Phlegma or Toxikon.\nDoes not apply if you have Eukrasia active.", SGE.JobID)]
SageDosisDyskrasia = 4018,

[ParentPreset(SageDosisDyskrasia)]
[CustomComboInfo("Combat Only", "Only change Dosis into Dyskrasia when already in combat.", SGE.JobID)]
SageDosisDyskrasiaCombatOnly = 4023,

[ParentPreset(SageDosisDyskrasia)]
[CustomComboInfo("Only when hardcasting", "Only change Dosis into Dyskrasia when hardcasting.", SGE.JobID)]
SageDosisDyskrasiaHardcastOnly = 4026,

[CustomComboInfo("Lucid Dosis", "Weave Dosis into Lucid Dreaming when it's available and your MP is below a threshold.\nThis also applies when Phlegma becomes Dosis.", SGE.JobID)]
SageLucidDosis = 4012,

Expand Down

0 comments on commit 70187e8

Please sign in to comment.