diff --git a/XIVComboExpanded/Combos/SAM.cs b/XIVComboExpanded/Combos/SAM.cs index 729ef5e41..6e26a53ed 100644 --- a/XIVComboExpanded/Combos/SAM.cs +++ b/XIVComboExpanded/Combos/SAM.cs @@ -1,3 +1,4 @@ +using System.Net.Mail; using Dalamud.Game.ClientState.JobGauge.Enums; using Dalamud.Game.ClientState.JobGauge.Types; @@ -44,6 +45,7 @@ public const ushort EyesOpen = 1252, Jinpu = 1298, Shifu = 1299, + TsubameGaeshiReady = 3852, OgiNamikiriReady = 2959, ZanshinReady = 3855; } @@ -230,10 +232,37 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (IsEnabled(CustomComboPreset.SamuraiTsubameGaeshiIaijutsuFeature)) { - if (level >= SAM.Levels.TsubameGaeshi && gauge.Sen == Sen.NONE) + if (level >= SAM.Levels.TsubameGaeshi && HasEffect(SAM.Buffs.TsubameGaeshiReady)) return OriginalHook(SAM.TsubameGaeshi); - return OriginalHook(SAM.Iaijutsu); + if (gauge?.Sen != Sen.NONE) + return OriginalHook(SAM.Iaijutsu); + } + + if (IsEnabled(CustomComboPreset.SamuraiTsubameGaeshiShintenFeature)) + { + if (level >= SAM.Levels.Zanshin && HasEffect(SAM.Buffs.ZanshinReady)) + return SAM.Zanshin; + + if (gauge?.Kenki >= 25) + { + if (level >= SAM.Levels.HissatsuSenei && IsCooldownUsable(SAM.HissatsuSenei)) + return SAM.HissatsuSenei; + return OriginalHook(SAM.HissatsuShinten); + } + } + + if (IsEnabled(CustomComboPreset.SamuraiTsubameGaeshiKyutenFeature)) + { + if (level >= SAM.Levels.Zanshin && HasEffect(SAM.Buffs.ZanshinReady)) + return SAM.Zanshin; + + if (gauge?.Kenki >= 25) + { + if (level >= SAM.Levels.HissatsuGuren && IsCooldownUsable(SAM.HissatsuGuren)) + return SAM.HissatsuGuren; + return OriginalHook(SAM.HissatsuGuren); + } } } @@ -259,10 +288,37 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (IsEnabled(CustomComboPreset.SamuraiIaijutsuTsubameGaeshiFeature)) { - if (level >= SAM.Levels.TsubameGaeshi && gauge.Sen == Sen.NONE) + if (level >= SAM.Levels.TsubameGaeshi && HasEffect(SAM.Buffs.TsubameGaeshiReady)) return OriginalHook(SAM.TsubameGaeshi); - return OriginalHook(SAM.Iaijutsu); + if (gauge?.Sen != Sen.NONE) + return OriginalHook(SAM.Iaijutsu); + } + + if (IsEnabled(CustomComboPreset.SamuraiIaijutsuShintenFeature)) + { + if (level >= SAM.Levels.Zanshin && HasEffect(SAM.Buffs.ZanshinReady)) + return SAM.Zanshin; + + if (gauge?.Kenki >= 25) + { + if (level >= SAM.Levels.HissatsuSenei && IsCooldownUsable(SAM.HissatsuSenei)) + return SAM.HissatsuSenei; + return OriginalHook(SAM.HissatsuShinten); + } + } + + if (IsEnabled(CustomComboPreset.SamuraiIaijutsuKyutenFeature)) + { + if (level >= SAM.Levels.Zanshin && HasEffect(SAM.Buffs.ZanshinReady)) + return SAM.Zanshin; + + if (gauge?.Kenki >= 25) + { + if (level >= SAM.Levels.HissatsuGuren && IsCooldownUsable(SAM.HissatsuGuren)) + return SAM.HissatsuGuren; + return OriginalHook(SAM.HissatsuKyuten); + } } } diff --git a/XIVComboExpanded/CustomComboPreset.cs b/XIVComboExpanded/CustomComboPreset.cs index 0656e068f..8b64c62fe 100644 --- a/XIVComboExpanded/CustomComboPreset.cs +++ b/XIVComboExpanded/CustomComboPreset.cs @@ -1121,19 +1121,15 @@ public enum CustomComboPreset [CustomComboInfo("Oka Combo", "Replace Oka with its combo chain.", SAM.JobID)] SamuraiOkaCombo = 3405, - [ConflictingCombos(SamuraiIaijutsuTsubameGaeshiFeature)] - [CustomComboInfo("Tsubame-gaeshi to Iaijutsu", "Replace Tsubame-gaeshi with Iaijutsu when Sen is empty.", SAM.JobID)] + [CustomComboInfo("Tsubame-gaeshi to Iaijutsu", "Allow Tsubame-gaeshi to function the same as Iaijutsu", SAM.JobID)] SamuraiTsubameGaeshiIaijutsuFeature = 3407, - [ConflictingCombos(SamuraiIaijutsuShohaFeature)] [CustomComboInfo("Tsubame-gaeshi to Shoha", "Replace Tsubame-gaeshi with Shoha when meditation is 3.", SAM.JobID)] SamuraiTsubameGaeshiShohaFeature = 3408, - [ConflictingCombos(SamuraiTsubameGaeshiIaijutsuFeature)] - [CustomComboInfo("Iaijutsu to Tsubame-gaeshi", "Replace Iaijutsu with Tsubame-gaeshi when Sen is not empty.", SAM.JobID)] + [CustomComboInfo("Iaijutsu to Tsubame-gaeshi", "Allow Iaijutsu to function the same as Tsubame-gaeshi.", SAM.JobID)] SamuraiIaijutsuTsubameGaeshiFeature = 3409, - [ConflictingCombos(SamuraiTsubameGaeshiShohaFeature)] [CustomComboInfo("Iaijutsu to Shoha", "Replace Iaijutsu with Shoha when meditation is 3.", SAM.JobID)] SamuraiIaijutsuShohaFeature = 3410, @@ -1165,6 +1161,22 @@ public enum CustomComboPreset [CustomComboInfo("Ikishoten Shoha Feature", "Replace Ikishoten with Shoha when Meditation is full.", SAM.JobID)] SamuraiIkishotenShohaFeature = 3419, + [ConflictingCombos(SamuraiTsubameGaeshiKyutenFeature)] + [CustomComboInfo("Shinten/Senei/Zanshin on Tsubame Gaeshi", "Replaces Tsubame Gaeshi with Hissatsu: Shinten, Hissatsu: Senei, or Zanshin when available. Iaijutsu/Tsubame Gaeshi abilities take precedence over this.", SAM.JobID)] + SamuraiTsubameGaeshiShintenFeature = 3422, + + [ConflictingCombos(SamuraiTsubameGaeshiShintenFeature)] + [CustomComboInfo("Kyuten/Guren/Zanshin on Tsubame Gaeshi", "Replaces Tsubame Gaeshi with Hissatsu: Kyuten, Hissatsu: Guren, or Zanshin when available. Iaijutsu/Tsubame Gaeshi abilities take precedence over this.", SAM.JobID)] + SamuraiTsubameGaeshiKyutenFeature = 3423, + + [ConflictingCombos(SamuraiIaijutsuKyutenFeature)] + [CustomComboInfo("Shinten/Senei/Zanshin on Iaijutsu", "Replaces Iaijutsu with Hissatsu: Shinten, Hissatsu: Senei, or Zanshin when available. Iaijutsu/Tsubame Gaeshi abilities take precedence over this.", SAM.JobID)] + SamuraiIaijutsuShintenFeature = 3424, + + [ConflictingCombos(SamuraiIaijutsuShintenFeature)] + [CustomComboInfo("Kyuten/Guren/Zanshin on Iaijutsu", "Replaces Iaijutsu with Hissatsu: Kyuten, Hissatsu: Guren, or Zanshin when available. Iaijutsu/Tsubame Gaeshi abilities take precedence over this.", SAM.JobID)] + SamuraiIaijutsuKyutenFeature = 3425, + #endregion // ==================================================================================== #region SCHOLAR