From 9837bafca98e9ba29a5ee4f38298c6e00ced2d2c Mon Sep 17 00:00:00 2001 From: Ethan Henderson Date: Wed, 18 Sep 2024 15:51:07 -0600 Subject: [PATCH] Add HP% Threshold for DRK's Delirum --- XIVSlothCombo/Combos/PvE/DRK.cs | 16 +++++++---- XIVSlothCombo/Window/Functions/UserConfig.cs | 30 ++++++++++++++++---- 2 files changed, 36 insertions(+), 10 deletions(-) diff --git a/XIVSlothCombo/Combos/PvE/DRK.cs b/XIVSlothCombo/Combos/PvE/DRK.cs index d3d2e29ea..c53a2af29 100644 --- a/XIVSlothCombo/Combos/PvE/DRK.cs +++ b/XIVSlothCombo/Combos/PvE/DRK.cs @@ -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"); } @@ -97,7 +99,8 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim var gauge = GetJobGauge(); 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) @@ -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 @@ -296,7 +300,8 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (actionID != Unleash) return actionID; var gauge = GetJobGauge(); - 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) @@ -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) diff --git a/XIVSlothCombo/Window/Functions/UserConfig.cs b/XIVSlothCombo/Window/Functions/UserConfig.cs index ee955301a..7b59bd9d3 100644 --- a/XIVSlothCombo/Window/Functions/UserConfig.cs +++ b/XIVSlothCombo/Window/Functions/UserConfig.cs @@ -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 // ====================================================================================