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

Commit

Permalink
Add HP% Threshold for DRK's Delirum
Browse files Browse the repository at this point in the history
  • Loading branch information
zbee committed Sep 18, 2024
1 parent 21b7483 commit 9837baf
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 10 deletions.
16 changes: 11 additions & 5 deletions XIVSlothCombo/Combos/PvE/DRK.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ public static readonly UserInt
DRK_ST_ManaSpenderPooling = new("DRK_ST_ManaSpenderPooling", 3000),
DRK_ST_LivingDeadThreshold = new("DRK_ST_LivingDeadThreshold", 10),
DRK_AoE_LivingDeadThreshold = new("DRK_AoE_LivingDeadThreshold", 40),
DRK_ST_DeliriumThreshold = new("DRK_ST_DeliriumThreshold", 0),
DRK_AoE_DeliriumThreshold = new("DRK_AoE_DeliriumThreshold", 25),
DRK_VariantCure = new("DRKVariantCure");
}

Expand All @@ -97,7 +99,8 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim

var gauge = GetJobGauge<DRKGauge>();
var mpRemaining = Config.DRK_ST_ManaSpenderPooling;
var hpRemaining = Config.DRK_ST_LivingDeadThreshold;
var hpRemainingLiving = Config.DRK_ST_LivingDeadThreshold;
var hpRemainingDelirium = Config.DRK_ST_DeliriumThreshold;

// Variant Cure - Heal: Priority to save your life
if (IsEnabled(CustomComboPreset.DRK_Variant_Cure)
Expand Down Expand Up @@ -177,13 +180,14 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim
&& IsEnabled(CustomComboPreset.DRK_ST_CDs_LivingShadow)
&& IsOffCooldown(LivingShadow)
&& LevelChecked(LivingShadow)
&& GetTargetHPPercent() > hpRemaining)
&& GetTargetHPPercent() > hpRemainingLiving)
return LivingShadow;

// Delirium
if (IsEnabled(CustomComboPreset.DRK_ST_Delirium)
&& IsOffCooldown(BloodWeapon)
&& LevelChecked(BloodWeapon)
&& GetTargetHPPercent() > hpRemainingDelirium
&& ((CombatEngageDuration().TotalSeconds < 8 // Opening Delirium
&& WasLastWeaponskill(Souleater))
|| CombatEngageDuration().TotalSeconds > 8)) // Regular Delirium
Expand Down Expand Up @@ -296,7 +300,8 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim
if (actionID != Unleash) return actionID;

var gauge = GetJobGauge<DRKGauge>();
var hpRemaining = Config.DRK_AoE_LivingDeadThreshold;
var hpRemainingLiving = Config.DRK_AoE_LivingDeadThreshold;
var hpRemainingDelirium = Config.DRK_AoE_DeliriumThreshold;

// Variant Cure - Heal: Priority to save your life
if (IsEnabled(CustomComboPreset.DRK_Variant_Cure)
Expand Down Expand Up @@ -339,13 +344,14 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim
if (IsEnabled(CustomComboPreset.DRK_AoE_CDs_LivingShadow)
&& IsOffCooldown(LivingShadow)
&& LevelChecked(LivingShadow)
&& GetTargetHPPercent() > hpRemaining)
&& GetTargetHPPercent() > hpRemainingLiving)
return LivingShadow;

// Delirium
if (IsEnabled(CustomComboPreset.DRK_AoE_Delirium)
&& IsOffCooldown(BloodWeapon)
&& LevelChecked(BloodWeapon))
&& LevelChecked(BloodWeapon)
&& GetTargetHPPercent() > hpRemainingDelirium)
return OriginalHook(Delirium);

if (gauge.DarksideTimeRemaining > 1)
Expand Down
30 changes: 25 additions & 5 deletions XIVSlothCombo/Window/Functions/UserConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1457,19 +1457,39 @@ internal static void Draw(CustomComboPreset preset, bool enabled)
#region DARK KNIGHT

if (preset == CustomComboPreset.DRK_ST_ManaSpenderPooling && enabled)
UserConfig.DrawSliderInt(0, 3000, DRK.Config.DRK_ST_ManaSpenderPooling, "How much MP to save (0 = Use All)", 150, SliderIncrements.Thousands);
UserConfig.DrawSliderInt(0, 3000, DRK.Config.DRK_ST_ManaSpenderPooling,
"How much MP to save (0 = Use All)",
itemWidth: 150f, sliderIncrement:SliderIncrements.Thousands);

if (preset == CustomComboPreset.DRK_ST_CDs_LivingShadow && enabled)
UserConfig.DrawSliderInt(0, 30, DRK.Config.DRK_ST_LivingDeadThreshold, "Stop Using When Target HP% is at or Below (Set to 0 to Disable This Check)", 150, SliderIncrements.Fives);
UserConfig.DrawSliderInt(0, 30, DRK.Config.DRK_ST_LivingDeadThreshold,
"Stop Using When Target HP% is at or Below (Set to 0 to Disable check)",
itemWidth: 150f, sliderIncrement:SliderIncrements.Fives);

if (preset == CustomComboPreset.DRK_ST_Delirium && enabled)
UserConfig.DrawSliderInt(0, 30, DRK.Config.DRK_ST_DeliriumThreshold,
"Stop Using When Target HP% is at or Below (Set to 0 to Disable check)",
itemWidth: 150f, sliderIncrement:SliderIncrements.Fives);

if (preset == CustomComboPreset.DRK_AoE_CDs_LivingShadow && enabled)
UserConfig.DrawSliderInt(0, 60, DRK.Config.DRK_AoE_LivingDeadThreshold, "Stop Using When Target HP% is at or Below (Set to 0 to Disable This Check)", 150, SliderIncrements.Fives);
UserConfig.DrawSliderInt(0, 60, DRK.Config.DRK_AoE_LivingDeadThreshold,
"Stop Using When Target HP% is at or Below (Set to 0 to Disable check)",
itemWidth: 150f, sliderIncrement:SliderIncrements.Fives);

if (preset == CustomComboPreset.DRK_AoE_Delirium && enabled)
UserConfig.DrawSliderInt(0, 60, DRK.Config.DRK_AoE_DeliriumThreshold,
"Stop Using When Target HP% is at or Below (Set to 0 to Disable check)",
itemWidth: 150f, sliderIncrement:SliderIncrements.Fives);

if (preset == CustomComboPreset.DRKPvP_Burst)
UserConfig.DrawSliderInt(1, 100, DRKPvP.Config.ShadowbringerThreshold, "HP% to be at or above to use Shadowbringer");
UserConfig.DrawSliderInt(1, 100, DRKPvP.Config.ShadowbringerThreshold,
"HP% to be at or Above to use (Set to 0 to Disable)",
itemWidth: 150f, sliderIncrement:SliderIncrements.Fives);

if (preset == CustomComboPreset.DRK_Variant_Cure)
UserConfig.DrawSliderInt(1, 100, DRK.Config.DRK_VariantCure, "HP% to be at or under", 200);
UserConfig.DrawSliderInt(1, 100, DRK.Config.DRK_VariantCure,
"HP% to be at or Below",
itemWidth: 200, sliderIncrement:SliderIncrements.Fives);

#endregion
// ====================================================================================
Expand Down

0 comments on commit 9837baf

Please sign in to comment.