Skip to content
This repository has been archived by the owner on Nov 21, 2024. It is now read-only.

Commit

Permalink
Merge branch 'main' into BLM_Adv
Browse files Browse the repository at this point in the history
  • Loading branch information
Taurenkey authored Nov 17, 2024
2 parents 09062b6 + 6a91bd9 commit 1c60b2b
Show file tree
Hide file tree
Showing 11 changed files with 2,551 additions and 2,298 deletions.
100 changes: 70 additions & 30 deletions XIVSlothCombo/Combos/CustomComboPreset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ public enum CustomComboPreset
[ParentCombo(AST_ST_DPS)]
[CustomComboInfo("Combust Uptime Option", "Adds Combust to the DPS feature if it's not present on current target, or is about to expire.", AST.JobID)]
AST_ST_DPS_CombustUptime = 1018,

[ParentCombo(AST_ST_DPS)]
[CustomComboInfo("Lightspeed Weave Option", "Adds Lightspeed when moving", AST.JobID, 2, "", "")]
AST_DPS_LightSpeed = 1020,
Expand Down Expand Up @@ -220,13 +220,13 @@ public enum CustomComboPreset
[CustomComboInfo("Earthly Star Option", "Adds Earthly Star." +
"\nTo be used in conjunction with Redirect/Reaction/etc", AST.JobID, 11)]
AST_ST_DPS_EarthlyStar = 1051,

#endregion

#region AOE DPS
[ReplaceSkill(AST.Gravity, AST.Gravity2)]
[CustomComboInfo("AoE DPS Feature", "Replaces Gravity with options below", AST.JobID, 2)]
AST_AOE_DPS = 1041,
AST_AOE_DPS = 1041,

[ParentCombo(AST_AOE_DPS)]
[CustomComboInfo("Lightspeed Weave Option", "Adds Lightspeed when moving", AST.JobID, 2, "", "")]
Expand Down Expand Up @@ -319,7 +319,7 @@ public enum CustomComboPreset
[ParentCombo(AST_AoE_SimpleHeals_AspectedHelios)]
[CustomComboInfo("Horoscope Option", "Adds Horoscope.", AST.JobID)]
AST_AoE_SimpleHeals_Horoscope = 1026,

[ParentCombo(AST_AoE_SimpleHeals_AspectedHelios)]
[CustomComboInfo("Aspected Helios Option", "In Helios mode: Will Cast Aspected Helios when the HoT is missing on yourself."
+ "\nIn Aspected Helios mode: Is considered enabled regardless.", AST.JobID)]
Expand Down Expand Up @@ -697,7 +697,7 @@ public enum CustomComboPreset
[ConflictingCombos(BRD_ST_AdvMode, BRD_ST_SimpleMode)]
[CustomComboInfo("Heavy Shot into Straight Shot Feature", "Replaces Heavy Shot/Burst Shot with Straight Shot/Refulgent Arrow when procced.", BRD.JobID)]
BRD_StraightShotUpgrade = 3001,

[ParentCombo(BRD_StraightShotUpgrade)]
[CustomComboInfo("DoT Maintenance Option", "Enabling this option will make Heavy Shot into Straight Shot refresh your DoTs on your current.", BRD.JobID)]
BRD_DoTMaintainance = 3002,
Expand All @@ -724,22 +724,22 @@ public enum CustomComboPreset
[CustomComboInfo("Single Target oGCD Feature", "All oGCD's on Bloodletter/Heartbreakshot (+ Songs rotation) depending on their CD.", BRD.JobID)]
BRD_ST_oGCD = 3006,

[ReplaceSkill(BRD.RainOfDeath)]
[ReplaceSkill(BRD.RainOfDeath)]
[CustomComboInfo("AoE oGCD Feature", "All AoE oGCD's on Rain of Death depending on their CD.", BRD.JobID)]
BRD_AoE_oGCD = 3007,

[ReplaceSkill(BRD.QuickNock, BRD.Ladonsbite)]
[ConflictingCombos(BRD_AoE_AdvMode, BRD_AoE_SimpleMode)]
[CustomComboInfo("Quick Nock Feature", "Replaces Quick Nock/Ladonsbite with Shadowbite when ready.", BRD.JobID)]
BRD_AoE_Combo = 3008,

[ParentCombo(BRD_ST_AdvMode)]
[CustomComboInfo("Bard DoTs Option", "This option will make Bard apply DoTs if none are present on the target.", BRD.JobID)]
BRD_Adv_DoT = 3010,

[ParentCombo(BRD_ST_AdvMode)]
[CustomComboInfo("Bard Songs Option", "This option adds the Bard's Songs to the Advanced Bard Feature.", BRD.JobID)]
BRD_Adv_Song = 3011,
BRD_Adv_Song = 3011,

[ReplaceSkill(BRD.Barrage)]
[CustomComboInfo("Bard Buffs Feature", "Adds Raging Strikes and Battle Voice onto Barrage.", BRD.JobID)]
Expand All @@ -748,7 +748,7 @@ public enum CustomComboPreset
[ReplaceSkill(BRD.WanderersMinuet)]
[CustomComboInfo("One Button Songs Feature", "Add Mage's Ballad and Army's Paeon to Wanderer's Minuet depending on cooldowns.", BRD.JobID)]
BRD_OneButtonSongs = 3014,

[ParentCombo(BRD_AoE_AdvMode)]
[CustomComboInfo("Bard Song Option", "Weave Songs on the Advanced AoE.", BRD.JobID)]
BRD_AoE_Adv_Songs = 3016,
Expand Down Expand Up @@ -1670,7 +1670,7 @@ public enum CustomComboPreset
GNB_ST_RangedUptime = 7004,
#endregion

#endregion
#endregion

#region Advanced AoE
[ConflictingCombos(GNB_AoE_Simple)]
Expand Down Expand Up @@ -2097,7 +2097,7 @@ public enum CustomComboPreset
MNK_AOE_SimpleMode = 9003,

#region Monk Advanced ST

[ReplaceSkill([MNK.Bootshine])]
[ConflictingCombos(MNK_ST_BeastChakras, MNK_ST_SimpleMode)]
[CustomComboInfo("Advanced Mode - Single Target", "Replaces Bootshine with a one-button full single target rotation.\nThese features are ideal if you want to customize the rotation.", MNK.JobID)]
Expand Down Expand Up @@ -2163,7 +2163,7 @@ public enum CustomComboPreset
[ConflictingCombos(MNK_AOE_SimpleMode)]
[CustomComboInfo("Advanced Mode - AoE", "Replaces Arm of the Destroyer with a one-button full single target rotation.\nThese features are ideal if you want to customize the rotation.", MNK.JobID)]
MNK_AOE_AdvancedMode = 9027,

[ParentCombo(MNK_AOE_AdvancedMode)]
[CustomComboInfo("Meditation Option", "Adds Meditation to the rotation", MNK.JobID)]
MNK_AoEUseMeditation = 9028,
Expand Down Expand Up @@ -2199,7 +2199,7 @@ public enum CustomComboPreset
[ParentCombo(MNK_AoEUseROF)]
[CustomComboInfo("Fire's Reply Option", "Adds Fire's Reply to the rotation", MNK.JobID)]
MNK_AoEUseFiresReply = 9036,

[ParentCombo(MNK_AOE_AdvancedMode)]
[CustomComboInfo("Combo Heals Option", "Adds Bloodbath and Second Wind to the rotation.", MNK.JobID)]
MNK_AoE_ComboHeals = 9037,
Expand Down Expand Up @@ -2250,10 +2250,10 @@ public enum CustomComboPreset
MNK_Variant_Cure = 9026,

#endregion

// last value = 9037
// End Monk

#endregion

#region NINJA
Expand Down Expand Up @@ -2669,7 +2669,7 @@ public enum CustomComboPreset
[CustomComboInfo("Lucid Dreaming Option", $"Adds Lucid Dreaming to the combo.", PCT.JobID)]
PCT_ST_AdvancedMode_LucidDreaming = 20034,

// Last value for ST = 20034
// Last value for ST = 20034
#endregion

#region AoE
Expand Down Expand Up @@ -3105,7 +3105,7 @@ public enum CustomComboPreset

#endregion

#region Advanced AoE
#region Advanced AoE

[ReplaceSkill(RPR.SpinningScythe)]
[ConflictingCombos(RPR_AoE_SimpleMode)]
Expand Down Expand Up @@ -3870,7 +3870,7 @@ The three digets after RDM.JobID can be used to reorder items in the list
SAM_Iaijutsu = 15201,

[ParentCombo(SAM_Iaijutsu)]
[CustomComboInfo("Iaijutsu to Tsubame-Gaeshi", "Replace Iaijutsu with Tsubame-gaeshi when Sen is empty.", SAM.JobID)]
[CustomComboInfo("Iaijutsu to Tsubame-Gaeshi", "Replace Iaijutsu with Tsubame-gaeshi when appropriate.", SAM.JobID)]
SAM_Iaijutsu_TsubameGaeshi = 15202,

[ParentCombo(SAM_Iaijutsu)]
Expand All @@ -3886,40 +3886,68 @@ The three digets after RDM.JobID can be used to reorder items in the list
#region Shinten Features

[ReplaceSkill(SAM.Shinten)]
[CustomComboInfo("Shinten Features", "Collection of Hissatsu: Shinten Features.", SAM.JobID)]
SAM_Shinten = 15251,

[ParentCombo(SAM_Shinten)]
[CustomComboInfo("Shinten to Shoha", "Replace Hissatsu: Shinten with Shoha when Meditation is full.", SAM.JobID)]
SAM_Shinten_Shoha = 15205,

[ParentCombo(SAM_Shinten_Shoha)]
[ParentCombo(SAM_Shinten)]
[CustomComboInfo("Shinten to Senei", "Replace Hissatsu: Shinten with Senei when its cooldown is up.", SAM.JobID)]
SAM_Shinten_Shoha_Senei = 15206,
SAM_Shinten_Senei = 15206,

[ParentCombo(SAM_Shinten)]
[CustomComboInfo("Shinten to Zanshin", "Replace Hissatsu: Shinten with Zanshin when usable.", SAM.JobID)]
SAM_Shinten_Zanshin = 15207,

#endregion

#region Kyuten Features

[ReplaceSkill(SAM.Kyuten)]
[CustomComboInfo("Kyuten Features", "Collection of Hissatsu: Kyuten Features.", SAM.JobID)]
SAM_Kyuten = 15252,

[ParentCombo(SAM_Kyuten)]
[CustomComboInfo("Kyuten to Shoha", "Replace Hissatsu: Kyuten with Shoha when Meditation is full.", SAM.JobID)]
SAM_Kyuten_Shoha = 15207,
SAM_Kyuten_Shoha = 15208,

[ParentCombo(SAM_Kyuten_Shoha)]
[ParentCombo(SAM_Kyuten)]
[CustomComboInfo("Kyuten to Guren", "Replace Hissatsu: Kyuten with Guren when its cooldown is up.", SAM.JobID)]
SAM_Kyuten_Shoha_Guren = 15208,
SAM_Kyuten_Guren = 15209,

[ParentCombo(SAM_Kyuten)]
[CustomComboInfo("Kyuten to Zanshin", "Replace Hissatsu: Kyuten with Zanshin when usable.", SAM.JobID)]
SAM_Kyuten_Zanshin = 15210,

#endregion

#region Ikishoten Features

[ReplaceSkill(SAM.Ikishoten)]
[CustomComboInfo("Ikishoten Features", "Collection of Ikishoten Features.", SAM.JobID)]
SAM_Ikishoten = 15253,

[ParentCombo(SAM_Ikishoten)]
[CustomComboInfo("Ikishoten to Namikiri", "Replace Ikishoten with Ogi Namikiri & Kaeshi Namikiri when available.", SAM.JobID)]
SAM_Ikishoten_Namikiri = 15212,

[ParentCombo(SAM_Ikishoten)]
[CustomComboInfo("Ikishoten to Shoha", "Replace Ikishoten with Shoha when Meditation is full before Ogi Namikiri.", SAM.JobID)]
SAM_Ikishoten_Shoha = 15213,

#endregion

#region Other

[ReplaceSkill(SAM.Gyoten)]
[CustomComboInfo("Gyoten Feature", "Hissatsu: Gyoten becomes Yaten/Gyoten depending on the distance from your target.", SAM.JobID)]
SAM_GyotenYaten = 15209,

[ReplaceSkill(SAM.Ikishoten)]
[CustomComboInfo("Ikishoten Namikiri Feature", "Replace Ikishoten with Ogi Namikiri and then Kaeshi Namikiri when available.\nIf you have full Meditation stacks, Ikishoten becomes Shoha while you have Ogi Namikiri ready.", SAM.JobID)]
SAM_Ikishoten_OgiNamikiri = 15210,
SAM_GyotenYaten = 15211,

#endregion

#region variant
#region variant

[Variant]
[VariantParent(SAM_ST_AdvancedMode, SAM_AoE_AdvancedMode)]
Expand Down Expand Up @@ -4297,12 +4325,16 @@ The three digets after RDM.JobID can be used to reorder items in the list
[CustomComboInfo("Vicewinder Combo", "Adds Swiftskin's Coil and Hunter's Coil to the rotation.\nWill automatically swap depending on your position.", VPR.JobID)]
VPR_ST_VicewinderCombo = 30007,

[ParentCombo(VPR_ST_CDs)]
[CustomComboInfo("Vicewinder Weaves", "Adds Twinfang and Bloodfang to the rotation.", VPR.JobID)]
VPR_ST_VicewinderWeaves = 30013,

#endregion

[ParentCombo(VPR_ST_AdvancedMode)]
[CustomComboInfo("Serpents Tail", "Adds Serpents Tail to the rotation.", VPR.JobID)]
VPR_ST_SerpentsTail = 30008,

[ParentCombo(VPR_ST_AdvancedMode)]
[CustomComboInfo("Uncoiled Fury", "Adds Uncoiled Fury to the rotation.", VPR.JobID)]
VPR_ST_UncoiledFury = 30009,
Expand Down Expand Up @@ -4377,6 +4409,11 @@ The three digets after RDM.JobID can be used to reorder items in the list
[CustomComboInfo("Disable Range Check", "Disables the range check for Swiftskin's Den and Hunter's Den, so they will be used even without a target selected.", VPR.JobID)]
VPR_AoE_VicepitCombo_DisableRange = 30113,

[ParentCombo(VPR_AoE_CDs)]
[CustomComboInfo("Vicepit Weaves", "Adds Twinfang and Twinblood to the rotation.", VPR.JobID)]
VPR_AoE_VicepitWeaves = 30115,


#endregion

[ParentCombo(VPR_AoE_AdvancedMode)]
Expand Down Expand Up @@ -4457,6 +4494,9 @@ The three digets after RDM.JobID can be used to reorder items in the list
[VariantParent(VPR_ST_SimpleMode, VPR_AoE_SimpleMode, VPR_ST_AdvancedMode, VPR_AoE_AdvancedMode)]
[CustomComboInfo("Rampart Option", "Use Variant Rampart on cooldown.", VPR.JobID)]
VPR_Variant_Rampart = 30301,

//Last Value ST = 30012
//Last Value AoE = 30112

#endregion

Expand Down
33 changes: 24 additions & 9 deletions XIVSlothCombo/Combos/JobHelpers/MCH.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,34 @@
using ECommons.DalamudServices;
using FFXIVClientStructs.FFXIV.Client.Game;
using XIVSlothCombo.Combos.JobHelpers.Enums;
using XIVSlothCombo.Combos.PvE;
using XIVSlothCombo.Data;
using static XIVSlothCombo.Combos.PvE.MCH;
using static XIVSlothCombo.CustomComboNS.Functions.CustomComboFunctions;

namespace XIVSlothCombo.Combos.JobHelpers;

internal abstract class MCHHelpers
internal class MCH
{
// MCH Gauge & Extensions
public static MCHOpenerLogic MCHOpener = new();

public static float GCD = GetCooldown(OriginalHook(SplitShot)).CooldownTotal;
public static float heatblastRC = GetCooldown(Heatblast).CooldownTotal;
public static bool drillCD = !LevelChecked(Drill) || (!TraitLevelChecked(Traits.EnhancedMultiWeapon) &&
GetCooldownRemainingTime(Drill) > heatblastRC * 6) ||
(TraitLevelChecked(Traits.EnhancedMultiWeapon) &&
GetRemainingCharges(Drill) < GetMaxCharges(Drill) &&
GetCooldownRemainingTime(Drill) > heatblastRC * 6);
public static bool anchorCD = !LevelChecked(AirAnchor) ||
(LevelChecked(AirAnchor) && GetCooldownRemainingTime(AirAnchor) > heatblastRC * 6);
public static bool sawCD = !LevelChecked(Chainsaw) ||
(LevelChecked(Chainsaw) && GetCooldownRemainingTime(Chainsaw) > heatblastRC * 6);
public static bool interruptReady = ActionReady(All.HeadGraze) && CanInterruptEnemy() &&
CanDelayedWeave(ActionWatching.LastWeaponskill);
public static MCHGauge Gauge = GetJobGauge<MCHGauge>();
public static int BSUsed => ActionWatching.CombatActions.Count(x => x == BarrelStabilizer);

internal class MCHOpenerLogic
{
private OpenerState currentState = OpenerState.PrePull;
Expand Down Expand Up @@ -254,25 +274,20 @@ public bool DoFullOpener(ref uint actionID)
}
}

internal static class MCHExtensions
internal static class MCHHelper
{
public static unsafe bool IsComboExpiring(float Times)
{
float GCD = GetCooldown(OriginalHook(SplitShot)).CooldownTotal * Times;

if (ActionManager.Instance()->Combo.Timer != 0 && ActionManager.Instance()->Combo.Timer < GCD)
return true;

return false;
return ActionManager.Instance()->Combo.Timer != 0 && ActionManager.Instance()->Combo.Timer < GCD;
}

public static bool UseQueen(MCHGauge gauge)
{
int BSUsed = ActionWatching.CombatActions.Count(x => x == BarrelStabilizer);

if (!ActionWatching.HasDoubleWeaved() && !gauge.IsOverheated && !HasEffect(Buffs.Wildfire) &&
!JustUsed(OriginalHook(Heatblast)) && LevelChecked(OriginalHook(RookAutoturret)) &&
!gauge.IsRobotActive && gauge.Battery >= 50)
gauge is { IsRobotActive: false, Battery: >= 50 })
{
if (LevelChecked(FullMetalField))
{
Expand Down
Loading

0 comments on commit 1c60b2b

Please sign in to comment.