diff --git a/XIVComboExpanded/Combos/SAM.cs b/XIVComboExpanded/Combos/SAM.cs index d3b9abb1..38df4d33 100644 --- a/XIVComboExpanded/Combos/SAM.cs +++ b/XIVComboExpanded/Combos/SAM.cs @@ -177,13 +177,13 @@ internal class SamuraiMangetsu : CustomCombo protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) { if (actionID == SAM.Mangetsu || actionID == SAM.Oka) - { - if (level >= SAM.Levels.Mangetsu && level < SAM.Levels.Oka) - return SAM.Mangetsu; - - if (level > SAM.Levels.Fuga && level < SAM.Levels.Mangetsu) - return SAM.Fuga; - + { + if (level >= SAM.Levels.Mangetsu && level < SAM.Levels.Oka) + return SAM.Mangetsu; + + if (level > SAM.Levels.Fuga && level < SAM.Levels.Mangetsu) + return SAM.Fuga; + var iaijutsu = OriginalHook(SAM.Iaijutsu); var tsubame = OriginalHook(SAM.TsubameGaeshi); @@ -194,8 +194,8 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (level >= SAM.Levels.TenkaGoken && IsEnabled(CustomComboPreset.SamuraiAutoAoEFinaleFeature) && (iaijutsu == SAM.TenkaGoken || iaijutsu == SAM.TendoGoken)) - return iaijutsu; - + return iaijutsu; + var gauge = GetJobGauge(); var fuka = FindEffect(SAM.Buffs.Fuka); var fukaTime = fuka != null ? fuka.RemainingTime : 0; @@ -222,9 +222,9 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return SAM.Mangetsu; return actionID; - } - - return OriginalHook(SAM.Fuga); + } + + return OriginalHook(SAM.Fuga); } return actionID; @@ -348,6 +348,33 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } } +internal class SamuraiGuren : CustomCombo +{ + protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.SamAny; + + protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) + { + if (actionID == SAM.HissatsuGuren) + { + var gauge = GetJobGauge(); + + if (IsEnabled(CustomComboPreset.SamuraiGurenZanshinFeature)) + { + if (level >= SAM.Levels.Zanshin && HasEffect(SAM.Buffs.ZanshinReady)) + return SAM.Zanshin; + } + + if (IsEnabled(CustomComboPreset.SamuraiGurenShohaFeature)) + { + if (level >= SAM.Levels.Shoha && gauge.MeditationStacks >= 3) + return SAM.Shoha; + } + } + + return actionID; + } +} + internal class SamuraiIkishoten : CustomCombo { protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.SamuraiIkishotenNamikiriFeature; diff --git a/XIVComboExpanded/CustomComboPreset.cs b/XIVComboExpanded/CustomComboPreset.cs index fae93cd2..152250eb 100644 --- a/XIVComboExpanded/CustomComboPreset.cs +++ b/XIVComboExpanded/CustomComboPreset.cs @@ -2149,12 +2149,24 @@ public enum CustomComboPreset [CustomComboInfo("Kyuten to Shoha", "Replace Hissatsu: Kyuten with Shoha when Meditation is full.", SAM.JobID)] SamuraiKyutenShohaFeature = 3412, - [IconsCombo([SAM.HissatsuShinten, UTL.ArrowLeft, SAM.HissatsuGuren, UTL.Blank, SAM.HissatsuGuren, UTL.Checkmark])] + [IconsCombo([SAM.HissatsuKyuten, UTL.ArrowLeft, SAM.HissatsuGuren, UTL.Blank, SAM.HissatsuGuren, UTL.Checkmark])] [SectionCombo("Kyuten")] [ExpandedCustomCombo] [CustomComboInfo("Kyuten to Guren", "Replace Hissatsu: Kyuten with Guren when available.", SAM.JobID)] SamuraiKyutenGurenFeature = 3415, + [IconsCombo([SAM.HissatsuGuren, UTL.ArrowLeft, SAM.Zanshin, UTL.Blank, SAM.Zanshin, UTL.Checkmark])] + [SectionCombo("Guren")] + [ExpandedCustomCombo] + [CustomComboInfo("Guren to Zanshin", "Replace Hissatsu: Guren with Zanshin when available.", SAM.JobID)] + SamuraiGurenZanshinFeature = 3426, + + [IconsCombo([SAM.HissatsuGuren, UTL.ArrowLeft, SAM.Shoha, UTL.Blank, SAM.Shoha, UTL.Checkmark])] + [SectionCombo("Guren")] + [ExpandedCustomCombo] + [CustomComboInfo("Guren to Shoha", "Replace Hissatsu: Guren with Shoha when Meditation is full.", SAM.JobID)] + SamuraiGurenShohaFeature = 3427, + [IconsCombo([SAM.Ikishoten, UTL.ArrowLeft, SAM.OgiNamikiri, SAM.KaeshiNamikiri, UTL.Blank, SAM.OgiNamikiri, SAM.KaeshiNamikiri, UTL.Checkmark])] [SectionCombo("Ikishoten")] [AccessibilityCustomCombo]