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

Commit

Permalink
Merge pull request #1859 from Kagekazu/fixes
Browse files Browse the repository at this point in the history
[Stuff] Various little fixes
  • Loading branch information
Taurenkey authored Nov 17, 2024
2 parents 2f78213 + 722b5ac commit 2ca64e1
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 34 deletions.
2 changes: 1 addition & 1 deletion ECommons
Submodule ECommons updated 146 files
29 changes: 16 additions & 13 deletions XIVSlothCombo/Combos/JobHelpers/BLM.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,32 @@ internal class BLM
{
// BLM Gauge & Extensions
public static BLMGauge Gauge = GetJobGauge<BLMGauge>();
public static int Fire4Count = ActionWatching.CombatActions.Count(x => x == Fire4);

public static int maxPolyglot = TraitLevelChecked(Traits.EnhancedPolyglotII) ? 3 :
public static bool canWeave = CanSpellWeave(ActionWatching.LastSpell);

public static uint curMp = LocalPlayer.CurrentMp;
public static BLMOpenerLogic BLMOpener = new();

public static int maxPolyglot => TraitLevelChecked(Traits.EnhancedPolyglotII) ? 3 :
TraitLevelChecked(Traits.EnhancedPolyglot) ? 2 : 1;

public static bool canWeave = CanSpellWeave(ActionWatching.LastSpell);
public static float elementTimer = Gauge.ElementTimeRemaining / 1000f;
public static double gcdsInTimer = Math.Floor(elementTimer / GetActionCastTime(ActionWatching.LastSpell));
public static int Fire4Count => ActionWatching.CombatActions.Count(x => x == Fire4);

public static int remainingPolyglotCD = Math.Max(0,
public static float elementTimer => Gauge.ElementTimeRemaining / 1000f;

public static double gcdsInTimer => Math.Floor(elementTimer / GetActionCastTime(ActionWatching.LastSpell));

public static int remainingPolyglotCD => Math.Max(0,
(maxPolyglot - Gauge.PolyglotStacks) * 30000 + (Gauge.EnochianTimer - 30000));

public static Status? thunderDebuffST =
public static Status? thunderDebuffST =>
FindEffect(ThunderList[OriginalHook(Thunder)], CurrentTarget, LocalPlayer.GameObjectId);

public static Status? thunderDebuffAoE =
public static Status? thunderDebuffAoE =>
FindEffect(ThunderList[OriginalHook(Thunder2)], CurrentTarget, LocalPlayer.GameObjectId);

public static bool canSwiftF = TraitLevelChecked(Traits.AspectMasteryIII) &&
IsOffCooldown(All.Swiftcast);

public static uint curMp = LocalPlayer.CurrentMp;
public static BLMOpenerLogic BLMOpener = new();
public static bool canSwiftF => TraitLevelChecked(Traits.AspectMasteryIII) &&
IsOffCooldown(All.Swiftcast);

public static bool HasPolyglotStacks(BLMGauge gauge) => gauge.PolyglotStacks > 0;

Expand Down
6 changes: 3 additions & 3 deletions XIVSlothCombo/Combos/JobHelpers/DRG.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ internal class DRG
public static DRGGauge Gauge = GetJobGauge<DRGGauge>();
public static DRGOpenerLogic DRGOpener = new();

public static Status? ChaosDoTDebuff = FindTargetEffect(LevelChecked(ChaoticSpring)
public static Status? ChaosDoTDebuff => FindTargetEffect(LevelChecked(ChaoticSpring)
? Debuffs.ChaoticSpring
: Debuffs.ChaosThrust);

public static bool trueNorthReady = TargetNeedsPositionals() && ActionReady(All.TrueNorth) &&
!HasEffect(All.Buffs.TrueNorth);
public static bool trueNorthReady => TargetNeedsPositionals() && ActionReady(All.TrueNorth) &&
!HasEffect(All.Buffs.TrueNorth);

internal class DRGOpenerLogic
{
Expand Down
11 changes: 8 additions & 3 deletions XIVSlothCombo/Combos/JobHelpers/MCH.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,23 @@ internal class MCH

public static float GCD = GetCooldown(OriginalHook(SplitShot)).CooldownTotal;
public static float heatblastRC = GetCooldown(Heatblast).CooldownTotal;
public static MCHGauge Gauge = GetJobGauge<MCHGauge>();

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 bool interruptReady => ActionReady(All.HeadGraze) && CanInterruptEnemy() &&
CanDelayedWeave(ActionWatching.LastWeaponskill);

public static int BSUsed => ActionWatching.CombatActions.Count(x => x == BarrelStabilizer);

internal class MCHOpenerLogic
Expand Down
6 changes: 3 additions & 3 deletions XIVSlothCombo/Combos/JobHelpers/RPR.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ internal class RPR
// RPR Gauge & Extensions
public static float GCD = GetCooldown(Slice).CooldownTotal;

public static bool trueNorthReady = TargetNeedsPositionals() && ActionReady(All.TrueNorth) &&
!HasEffect(All.Buffs.TrueNorth);

public static RPROpenerLogic RPROpener = new();
public static RPRGauge Gauge = GetJobGauge<RPRGauge>();

public static bool trueNorthReady => TargetNeedsPositionals() && ActionReady(All.TrueNorth) &&
!HasEffect(All.Buffs.TrueNorth);

internal class RPROpenerLogic
{
private OpenerState currentState = OpenerState.PrePull;
Expand Down
10 changes: 2 additions & 8 deletions XIVSlothCombo/Combos/JobHelpers/SGE.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,9 @@ internal class SGE

public static int Dosis3Count => ActionWatching.CombatActions.Count(x => x == Dosis3);

public static bool HasAddersgall(SGEGauge gauge)
{
return gauge.Addersgall > 0;
}
public static bool HasAddersgall(SGEGauge gauge) => gauge.Addersgall > 0;

public static bool HasAddersting(SGEGauge gauge)
{
return gauge.Addersting > 0;
}
public static bool HasAddersting(SGEGauge gauge) => gauge.Addersting > 0;

internal class SGEOpenerLogic
{
Expand Down
6 changes: 3 additions & 3 deletions XIVSlothCombo/Combos/JobHelpers/VPR.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ internal class VPR
public static float GCD = GetCooldown(OriginalHook(ReavingFangs)).CooldownTotal;
public static float ireCD = GetCooldownRemainingTime(SerpentsIre);

public static bool trueNorthReady = TargetNeedsPositionals() && ActionReady(All.TrueNorth) &&
!HasEffect(All.Buffs.TrueNorth);

public static VPROpenerLogic VPROpener = new();
public static VPRGauge gauge = GetJobGauge<VPRGauge>();

public static bool trueNorthReady => TargetNeedsPositionals() && ActionReady(All.TrueNorth) &&
!HasEffect(All.Buffs.TrueNorth);

public static bool VicewinderReady => gauge.DreadCombo == DreadCombo.Dreadwinder;

public static bool HuntersCoilReady => gauge.DreadCombo == DreadCombo.HuntersCoil;
Expand Down

0 comments on commit 2ca64e1

Please sign in to comment.