From 69c85e47b68074b1cb017def0913de3f728783ea Mon Sep 17 00:00:00 2001 From: Khayle Date: Sun, 14 Jul 2024 17:44:03 +0200 Subject: [PATCH] VPR update added All-in-one Reawaken combo --- XIVComboExpanded/Combos/VPR.cs | 41 +++++++++++++++++++++++++++ XIVComboExpanded/CustomComboPreset.cs | 4 +++ 2 files changed, 45 insertions(+) diff --git a/XIVComboExpanded/Combos/VPR.cs b/XIVComboExpanded/Combos/VPR.cs index 94efa196..e8849d42 100644 --- a/XIVComboExpanded/Combos/VPR.cs +++ b/XIVComboExpanded/Combos/VPR.cs @@ -230,6 +230,47 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim } } +internal class AutoGenerationLegacies : CustomCombo +{ + protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.ViperAutoGenerationsLegaciesFeature; + + protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) + { + if (actionID == VPR.Reawaken && HasEffect(VPR.Buffs.Reawakened)) + { + var gauge = GetJobGauge(); + var maxtribute = 4; + + if (level == 100) + { + if (OriginalHook(VPR.SerpentsTail) == VPR.FirstLegacy) + return VPR.FirstLegacy; + if (OriginalHook(VPR.SerpentsTail) == VPR.SecondLegacy) + return VPR.SecondLegacy; + if (OriginalHook(VPR.SerpentsTail) == VPR.ThirdLegacy) + return VPR.ThirdLegacy; + if (OriginalHook(VPR.SerpentsTail) == VPR.FourthLegacy) + return VPR.FourthLegacy; + } + + if (level >= VPR.Levels.Ouroboros) + maxtribute = 5; + if (gauge.AnguineTribute == maxtribute) + return VPR.FirstGeneration; + if (gauge.AnguineTribute == maxtribute - 1) + return VPR.SecondGeneration; + if (gauge.AnguineTribute == maxtribute - 2) + return VPR.ThirdGeneration; + if (gauge.AnguineTribute == maxtribute - 3) + return VPR.FourthGeneration; + if (gauge.AnguineTribute == 1 && level >= VPR.Levels.Ouroboros) + return VPR.Ouroboros; + } + + return actionID; + } +} + internal class GenerationLegacies : CustomCombo { protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.ViperGenerationLegaciesFeature; diff --git a/XIVComboExpanded/CustomComboPreset.cs b/XIVComboExpanded/CustomComboPreset.cs index 32e8d030..a99dcdf7 100644 --- a/XIVComboExpanded/CustomComboPreset.cs +++ b/XIVComboExpanded/CustomComboPreset.cs @@ -1236,6 +1236,10 @@ public enum CustomComboPreset [CustomComboInfo("Twin Coil AoE Feature", "Replace Swiftskin's Den and Hunter's Den with their respective Twinblood and Twinfang skills.", VPR.JobID)] ViperTwinDenFeature = 4104, + [SecretCustomCombo] + [CustomComboInfo("All-in-one Reawaken Feature", "Replace Reawaken by the Generation skills with their respective Legacies in order.", VPR.JobID)] + ViperAutoGenerationsLegaciesFeature = 4123, + [CustomComboInfo("Generation Legacy Feature", "Replaces the Generation skills with their respective Legacies.", VPR.JobID)] ViperGenerationLegaciesFeature = 4105,