Skip to content

Commit

Permalink
SAM Bloodbath replacer
Browse files Browse the repository at this point in the history
-Added replacer for bloodbath. If enabled, Bloodbath will be replaced with Second Wind if Bloodbath is on cooldown and Second Wind is not.
  • Loading branch information
FrigidWalrus committed Jul 9, 2024
1 parent 7638d2e commit 6fdb65e
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
22 changes: 20 additions & 2 deletions XIVComboVX/Combos/SAM.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ public const uint
Ikishoten = 16482,
Shoha2 = 25779,
OgiNamikiri = 25781,
KaeshiNamikiri = 25782;
KaeshiNamikiri = 25782,
Bloodbath = 7542,
SecondWind = 7541;

public static class Buffs {
public const ushort
Expand Down Expand Up @@ -66,7 +68,8 @@ public const byte
Hyosetsu = 86,
Fuko = 86,
KaeshiNamikiri = 90,
OgiNamikiri = 90;
OgiNamikiri = 90,
Bloodbath = 12;
}
}

Expand Down Expand Up @@ -177,6 +180,21 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim
return OriginalHook(SAM.Fuga);
}
}
internal class BloodbathReplacer: CustomCombo {
public override CustomComboPreset Preset => CustomComboPreset.SamuraiBloodbathReplacer;
public override uint[] ActionIDs { get; } = [SAM.Bloodbath];

protected override uint Invoke(uint actionID, uint lastComboActionId, float comboTime, byte level) {

if (IsEnabled(CustomComboPreset.SamuraiBloodbathReplacer)) {
if (!CanUse(SAM.Bloodbath)) {
if (IsOffCooldown(SAM.SecondWind))
return SAM.SecondWind; }

}
return actionID;
}
}

/* internal class SamuraiTsubameGaeshiFeature: CustomCombo {
public override CustomComboPreset Preset => CustomComboPreset.SamAny;
Expand Down
3 changes: 3 additions & 0 deletions XIVComboVX/CustomComboPreset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1167,6 +1167,9 @@ public enum CustomComboPreset {
[CustomComboInfo("Hissatsu Senei/Guren Sync Feature", "Replace Hissatsu Senei with Hissatsu Guren when underlevel.", SAM.JobID)]
SamuraiGurenSeneiLevelSyncFeature = 3418,

[CustomComboInfo("Bloodbath Replacer Feature", "Replace Bloodbath with Second Wind when Bloodbath is on cooldown and Second Wind is not.", SAM.JobID)]
SamuraiBloodbathReplacer = 3419,

#endregion
// ====================================================================================
#region SCHOLAR (28xx)
Expand Down

0 comments on commit 6fdb65e

Please sign in to comment.