Skip to content

Commit

Permalink
Merge pull request #417 from kaedys/feature/viper-3rd-hit-feature
Browse files Browse the repository at this point in the history
[FEATURE] Viper auto-select 3rd combo hit
  • Loading branch information
MKhayle authored Aug 12, 2024
2 parents 6577f2d + a4ef081 commit f96275d
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 7 deletions.
36 changes: 34 additions & 2 deletions XIVComboExpanded/Combos/VPR.cs
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,27 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim
IsCooldownUsable(VPR.Vicewinder) && IsOriginal(VPR.SerpentsTail))
return VPR.Vicewinder;

if (IsEnabled(CustomComboPreset.ViperAutoSteelReavingFeature) && OriginalHook(VPR.SteelFangs) == VPR.SteelFangs)
if (IsEnabled(CustomComboPreset.ViperAutoFangBiteFeature))
{
if (OriginalHook(VPR.SteelFangs) == VPR.HindstingStrike)
{
if (HasEffect(VPR.Buffs.HindsbaneVenom))
return VPR.HindsbaneFang;
if (HasEffect(VPR.Buffs.HindstungVenom))
return VPR.HindstingStrike;
}

if (OriginalHook(VPR.SteelFangs) == VPR.FlankstingStrike)
{
if (HasEffect(VPR.Buffs.FlanksbaneVenom))
return VPR.FlanksbaneFang;
if (HasEffect(VPR.Buffs.FlankstungVenom))
return VPR.FlankstingStrike;
}
}

if (IsEnabled(CustomComboPreset.ViperAutoSteelReavingFeature) &&
OriginalHook(VPR.SteelFangs) == VPR.SteelFangs)
return HasEffect(VPR.Buffs.HonedReavers) ? VPR.ReavingFangs : VPR.SteelFangs;
}

Expand Down Expand Up @@ -266,7 +286,19 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim
IsCooldownUsable(VPR.VicePit) && IsOriginal(VPR.SerpentsTail))
return VPR.VicePit;

if (IsEnabled(CustomComboPreset.ViperAutoSteelReavingFeature) && OriginalHook(VPR.SteelMaw) == VPR.SteelMaw)
if (IsEnabled(CustomComboPreset.ViperAutoFangBiteFeature))
{
if (OriginalHook(VPR.SteelMaw) == VPR.JaggedMaw)
{
if (HasEffect(VPR.Buffs.GrimhuntersVenom))
return VPR.JaggedMaw;
if (HasEffect(VPR.Buffs.GrimskinsVenom))
return VPR.BloodiedMaw;
}
}

if (IsEnabled(CustomComboPreset.ViperAutoSteelReavingFeature) &&
OriginalHook(VPR.SteelMaw) == VPR.SteelMaw)
return HasEffect(VPR.Buffs.HonedReavers) ? VPR.ReavingMaw : VPR.SteelMaw;
}

Expand Down
16 changes: 11 additions & 5 deletions XIVComboExpanded/CustomComboPreset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2311,17 +2311,23 @@ public enum CustomComboPreset
// ====================================================================================
#region VIPER

[SectionCombo("Standard Combos")]
[IconsCombo([VPR.SteelFangs, VPR.ReavingFangs, UTL.ArrowLeft, VPR.DeathRattle, UTL.Blank, VPR.SteelMaw, VPR.ReavingMaw, UTL.ArrowLeft, VPR.LastLash])]
[CustomComboInfo("Serpent's Fang Feature", "Replace Steel Fangs, Reaving Fangs, Steel Maw, and Reaving Maw with Serpent's Tail after finishing a combo.", VPR.JobID)]
ViperSteelTailFeature = 4101,

[SectionCombo("Standard Combos")]
[IconsCombo([VPR.SteelFangs, UTL.Cycle, VPR.ReavingFangs, UTL.Blank, VPR.SteelMaw, UTL.Cycle, VPR.ReavingMaw])]
[AccessibilityCustomCombo]
[CustomComboInfo("Auto Steel Reaving", "Replace Steel Fangs/Reaving Fangs and Steel Maw/Reaving Maw with whichever is currently empowered. Only affects the first combo hit.", VPR.JobID)]
ViperAutoSteelReavingFeature = 4124,

[SectionCombo("Standard Combos")]
[IconsCombo([VPR.HindstingStrike, VPR.HindsbaneFang, VPR.FlanksbaneFang, VPR.FlankstingStrike, UTL.Idea, UTL.Blank, VPR.JaggedMaw, VPR.BloodiedMaw, UTL.Idea])]
[AccessibilityCustomCombo]
[CustomComboInfo("Auto Fang/Bite", "Replace Steel Fangs/Reaving Fangs and Steel Maw/Reaving Maw with whichever of the two available 3rd combo hits is currently empowered. Only affects the third combo hit.\n\nNOTE: This means that, for example, rather than Steel Fangs having Hindsting Strike and Reaving Fangs having Hindsbane Fang, both will have whichever of those two is currently empowered. If neither is empowered, they'll have whatever they normally have for the 3rd combo hit.", VPR.JobID)]
ViperAutoFangBiteFeature = 4125,

[SectionCombo("Standard Combos")]
[IconsCombo([VPR.SteelFangs, VPR.ReavingFangs, UTL.ArrowLeft, VPR.DeathRattle, UTL.Blank, VPR.SteelMaw, VPR.ReavingMaw, UTL.ArrowLeft, VPR.LastLash])]
[CustomComboInfo("Serpent's Fang Feature", "Replace Steel Fangs, Reaving Fangs, Steel Maw, and Reaving Maw with Serpent's Tail after finishing a combo.", VPR.JobID)]
ViperSteelTailFeature = 4101,

[SectionCombo("Vice Combos")]
[IconsCombo([VPR.SteelFangs, VPR.ReavingFangs, VPR.SteelMaw, VPR.ReavingMaw, UTL.ArrowLeft, VPR.HuntersCoil, VPR.SwiftskinsCoil, VPR.HuntersDen, VPR.SwiftskinsDen])]
[ExpandedCustomCombo]
Expand Down

0 comments on commit f96275d

Please sign in to comment.