Skip to content

Commit

Permalink
Merge pull request #479 from Propagandist1/master
Browse files Browse the repository at this point in the history
[SAM] Add Hissatsu: Guren features
  • Loading branch information
MKhayle authored Dec 13, 2024
2 parents d0ae94c + 77b25c7 commit 1b47d57
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 13 deletions.
51 changes: 39 additions & 12 deletions XIVComboExpanded/Combos/SAM.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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<SAMGauge>();
var fuka = FindEffect(SAM.Buffs.Fuka);
var fukaTime = fuka != null ? fuka.RemainingTime : 0;
Expand All @@ -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;
Expand Down Expand Up @@ -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<SAMGauge>();

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;
Expand Down
14 changes: 13 additions & 1 deletion XIVComboExpanded/CustomComboPreset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 1b47d57

Please sign in to comment.