Skip to content

Commit

Permalink
SAM Kenki consumers on Iaijutsu/Tsubame
Browse files Browse the repository at this point in the history
  • Loading branch information
aldros-ffxi committed Aug 5, 2024
1 parent 733b271 commit 74a373f
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 10 deletions.
64 changes: 60 additions & 4 deletions XIVComboExpanded/Combos/SAM.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System.Net.Mail;
using Dalamud.Game.ClientState.JobGauge.Enums;
using Dalamud.Game.ClientState.JobGauge.Types;

Expand Down Expand Up @@ -44,6 +45,7 @@ public const ushort
EyesOpen = 1252,
Jinpu = 1298,
Shifu = 1299,
TsubameGaeshiReady = 3852,
OgiNamikiriReady = 2959,
ZanshinReady = 3855;
}
Expand Down Expand Up @@ -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);
}
}
}

Expand All @@ -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);
}
}
}

Expand Down
24 changes: 18 additions & 6 deletions XIVComboExpanded/CustomComboPreset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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,

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 74a373f

Please sign in to comment.