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

Commit

Permalink
Fix log spam
Browse files Browse the repository at this point in the history
  • Loading branch information
Taurenkey committed Jul 7, 2024
1 parent d877129 commit 5f4bb55
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 141 deletions.
16 changes: 0 additions & 16 deletions XIVSlothCombo/Combos/CustomComboPreset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2144,18 +2144,6 @@ public enum CustomComboPreset
[CustomComboInfo("Hide to Mug/Trick Attack Feature", "Replaces Hide with Mug while in combat and Trick Attack whilst Hidden.", NIN.JobID)]
NIN_HideMug = 10057,

[ReplaceSkill(NIN.Huraijin)]
[CustomComboInfo("Huraijin / Raiju Feature", "Replaces Huraijin with Forked and Fleeting Raiju when available.", NIN.JobID)]
NIN_HuraijinRaiju = 10059,

[ParentCombo(NIN_HuraijinRaiju)]
[CustomComboInfo("Huraijin / Raiju Feature Option 1", "Replaces Huraijin with Fleeting Raiju when available.", NIN.JobID)]
NIN_HuraijinRaiju_Fleeting = 10060,

[ParentCombo(NIN_HuraijinRaiju)]
[CustomComboInfo("Huraijin / Raiju Feature Option 2", "Replaces Huraijin with Forked Raiju when available.", NIN.JobID)]
NIN_HuraijinRaiju_Forked = 10061,

[ReplaceSkill(NIN.Ten, NIN.Chi, NIN.Jin)]
[CustomComboInfo("Simple Mudras Feature", "Simplify the mudra casting to avoid failing.", NIN.JobID)]
NIN_Simple_Mudras = 10062,
Expand All @@ -2165,10 +2153,6 @@ public enum CustomComboPreset
[CustomComboInfo("Ten Chi Jin Feature", "Turns Ten Chi Jin (the move) into Ten, Chi, and Jin.", NIN.JobID)]
NIN_TCJ = 10063,

[ReplaceSkill(NIN.Huraijin)]
[CustomComboInfo("Huraijin / Armor Crush Combo Feature", "Replace Huraijin with Armor Crush after using Gust Slash.", NIN.JobID)]
NIN_HuraijinArmorCrush = 10064,

[ParentCombo(NIN_ST_AdvancedMode_Ninjitsus_Raiton)]
[CustomComboInfo("Raiton Uptime Option", "Adds Raiton as an uptime feature.", NIN.JobID)]
NIN_ST_AdvancedMode_Raiton_Uptime = 10065,
Expand Down
8 changes: 4 additions & 4 deletions XIVSlothCombo/Combos/JobHelpers/AST.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ private static void CheckCards(IFramework framework)
if (Service.ClientState.LocalPlayer is null || Service.ClientState.LocalPlayer.ClassJob.Id != 33)
return;

if (DrawnCard != Gauge.DrawnCard)
if (DrawnCard != Gauge.DrawnCards[0])
{
DrawnCard = Gauge.DrawnCard;
DrawnCard = Gauge.DrawnCards[0];
if (CustomComboFunctions.IsEnabled(CustomComboPreset.AST_Cards_QuickTargetCards))
{
AST_QuickTargetCards.SelectedRandomMember = null;
Expand Down Expand Up @@ -60,8 +60,8 @@ public static void Invoke()

private static bool SetTarget()
{
if (Gauge.DrawnCard.Equals(CardType.NONE)) return false;
CardType cardDrawn = Gauge.DrawnCard;
if (Gauge.DrawnCards[0].Equals(CardType.NONE)) return false;
CardType cardDrawn = Gauge.DrawnCards[0];
PartyTargets.Clear();
for (int i = 1; i <= 8; i++) //Checking all 8 available slots and skipping nulls & DCs
{
Expand Down
46 changes: 3 additions & 43 deletions XIVSlothCombo/Combos/PvE/AST.cs
Original file line number Diff line number Diff line change
Expand Up @@ -157,22 +157,11 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim
if (actionID is Play)
{
var haveCard = HasEffect(Buffs.BalanceDrawn) || HasEffect(Buffs.BoleDrawn) || HasEffect(Buffs.ArrowDrawn) || HasEffect(Buffs.SpearDrawn) || HasEffect(Buffs.EwerDrawn) || HasEffect(Buffs.SpireDrawn);
var cardDrawn = Gauge.DrawnCard;
var cardDrawn = Gauge.DrawnCards[0];

if (IsEnabled(CustomComboPreset.AST_Cards_AstrodyneOnPlay) && ActionReady(Astrodyne) && !Gauge.ContainsSeal(SealType.NONE) &&
(Gauge.DrawnCard != CardType.NONE || HasCharges(Draw)))
return Astrodyne;

if (haveCard)
{
if (HasEffect(Buffs.ClarifyingDraw) && IsEnabled(CustomComboPreset.AST_Cards_Redraw))
{
if ((cardDrawn is CardType.BALANCE or CardType.BOLE && Gauge.Seals.Contains(SealType.SUN)) ||
(cardDrawn is CardType.ARROW or CardType.EWER && Gauge.Seals.Contains(SealType.MOON)) ||
(cardDrawn is CardType.SPEAR or CardType.SPIRE && Gauge.Seals.Contains(SealType.CELESTIAL)))
return Redraw;
}

return OriginalHook(Play);
}

Expand Down Expand Up @@ -248,29 +237,11 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim
CanSpellWeave(actionID))
return All.LucidDreaming;

//Astrodyne
if (IsEnabled(CustomComboPreset.AST_DPS_Astrodyne) &&
ActionReady(Astrodyne) &&
!Gauge.ContainsSeal(SealType.NONE) &&
CanSpellWeave(actionID))
return Astrodyne;

//Redraw Card
if (IsEnabled(CustomComboPreset.AST_DPS_AutoPlay_Redraw) && HasEffect(Buffs.ClarifyingDraw) && ActionReady(Redraw))
{
var cardDrawn = Gauge.DrawnCard;
if (((cardDrawn is CardType.BALANCE or CardType.BOLE && Gauge.Seals.Contains(SealType.SUN)) ||
(cardDrawn is CardType.ARROW or CardType.EWER && Gauge.Seals.Contains(SealType.MOON)) ||
(cardDrawn is CardType.SPEAR or CardType.SPIRE && Gauge.Seals.Contains(SealType.CELESTIAL))) &&
CanSpellWeave(actionID) &&
spellsSinceDraw >= (IsEnabled(CustomComboPreset.AST_DPS_AutoPlay) ? Config.AST_ST_DPS_Play_SpeedSetting : 1))
return Redraw;
}

//Play Card
if (IsEnabled(CustomComboPreset.AST_DPS_AutoPlay) &&
ActionReady(Play) &&
Gauge.DrawnCard is not CardType.NONE &&
Gauge.DrawnCards[0] is not CardType.NONE &&
CanSpellWeave(actionID) &&
spellsSinceDraw >= Config.AST_ST_DPS_Play_SpeedSetting &&
!WasLastAction(Redraw))
Expand All @@ -279,7 +250,7 @@ Gauge.DrawnCard is not CardType.NONE &&
//Card Draw
if (IsEnabled(CustomComboPreset.AST_DPS_AutoDraw) &&
ActionReady(Draw) &&
Gauge.DrawnCard is CardType.NONE &&
Gauge.DrawnCards[0] is CardType.NONE &&
CanDelayedWeave(actionID))
return Draw;

Expand Down Expand Up @@ -379,17 +350,6 @@ Gauge.DrawnCrownCard is CardType.LADY
}
}

//Works With AST_Cards_DrawOnPlay as a feature, or by itself if AST_Cards_DrawOnPlay is disabled.
//Do not do ConflictingCombos with AST_Cards_DrawOnPlay
internal class AST_Cards_AstrodyneOnPlay : CustomCombo
{
protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.AST_Cards_AstrodyneOnPlay;

protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level)
=> actionID is Play && !IsEnabled(CustomComboPreset.AST_Cards_DrawOnPlay) && !Gauge.ContainsSeal(SealType.NONE)
? Astrodyne
: actionID;
}

internal class AST_Cards_RedrawStandalone : CustomCombo
{
Expand Down
79 changes: 3 additions & 76 deletions XIVSlothCombo/Combos/PvE/NIN.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ public const uint
HakkeMujinsatsu = 16488,
Meisui = 16489,
Bunshin = 16493,
Huraijin = 25876,
PhantomKamaitachi = 25774,
ForkedRaiju = 25777,
FleetingRaiju = 25778,
Expand Down Expand Up @@ -339,20 +338,6 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim

if (!inTNWithDoubleArmorCrush)
{
if (IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Ninjitsus_Huton) &&
IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Ninjitsus) &&
(!Huraijin.LevelChecked() || !InCombat()) &&
gauge.HutonTimer <= 15000 &&
chargeCheck &&
mudraState.CastHuton(ref actionID))
return actionID;

if (IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Huraijin) &&
InCombat() &&
gauge.HutonTimer <= hutonHuraijinTimer &&
Huraijin.LevelChecked() && !inMudraState)
return OriginalHook(Huraijin);

if (IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Kassatsu_HyoshoRaynryu) &&
!inTrickBurstSaveWindow &&
(IsNotEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Mug) || (IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_Mug) && IsOnCooldown(Mug))) &&
Expand Down Expand Up @@ -390,8 +375,8 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim
lastComboMove == GustSlash &&
(IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_TrickAttack) && IsOnCooldown(TrickAttack) ||
IsNotEnabled(CustomComboPreset.NIN_ST_AdvancedMode_TrickAttack)) &&
((gauge.HutonTimer <= hutonArmorCrushTimer) || doubleArmorCrush && timesLastEnderWasArmorCrush == 1) &&
gauge.HutonTimer > 0 && ArmorCrush.LevelChecked() &&
(doubleArmorCrush && timesLastEnderWasArmorCrush == 1) &&
ArmorCrush.LevelChecked() &&
comboTime > 1f)
{
if (IsEnabled(CustomComboPreset.NIN_ST_AdvancedMode_TrueNorth) &&
Expand Down Expand Up @@ -548,20 +533,6 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim

}

if (IsEnabled(CustomComboPreset.NIN_AoE_AdvancedMode_Ninjitsus_Huton) &&
IsEnabled(CustomComboPreset.NIN_AoE_AdvancedMode_Ninjitsus) &&
(!Huraijin.LevelChecked() || !InCombat()) &&
gauge.HutonTimer <= 15000 &&
chargeCheck &&
mudraState.CastHuton(ref actionID))
return actionID;

if (IsEnabled(CustomComboPreset.NIN_AoE_AdvancedMode_Huraijin) &&
InCombat() &&
gauge.HutonTimer <= hutonHuraijinTimer &&
Huraijin.LevelChecked() && !inMudraState)
return OriginalHook(Huraijin);

if (IsEnabled(CustomComboPreset.NIN_AoE_AdvancedMode_GokaMekkyaku) &&
mudraState.CastGokaMekkyaku(ref actionID))
return actionID;
Expand Down Expand Up @@ -640,12 +611,6 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim
if (IsEnabled(CustomComboPreset.NIN_Variant_Cure) && IsEnabled(Variant.VariantCure) && PlayerHealthPercentageHp() <= GetOptionValue(Config.NIN_VariantCure))
return Variant.VariantCure;

if (!Huraijin.LevelChecked() && gauge.HutonTimer <= 15000 && mudraState.CastHuton(ref actionID))
return actionID;

if (InCombat() && gauge.HutonTimer == 0 && Huraijin.LevelChecked() && !inMudraState)
return OriginalHook(Huraijin);

if (mudraState.CastHyoshoRanryu(ref actionID))
return actionID;

Expand Down Expand Up @@ -713,7 +678,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim
if (lastComboMove == SpinningEdge && GustSlash.LevelChecked())
return OriginalHook(GustSlash);

if (lastComboMove == GustSlash && gauge.HutonTimer <= 30000 && ArmorCrush.LevelChecked())
if (lastComboMove == GustSlash && ArmorCrush.LevelChecked())
return OriginalHook(ArmorCrush);

if (lastComboMove == GustSlash && TargetNeedsPositionals() && GetRemainingCharges(All.TrueNorth) > 0 && All.TrueNorth.LevelChecked() && !HasEffect(All.Buffs.TrueNorth) && canWeave)
Expand Down Expand Up @@ -765,12 +730,6 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim
if (IsEnabled(CustomComboPreset.NIN_Variant_Cure) && IsEnabled(Variant.VariantCure) && PlayerHealthPercentageHp() <= GetOptionValue(Config.NIN_VariantCure))
return Variant.VariantCure;

if (!Huraijin.LevelChecked() && gauge.HutonTimer <= 15000 && mudraState.CastHuton(ref actionID))
return actionID;

if (InCombat() && gauge.HutonTimer == 0 && Huraijin.LevelChecked())
return OriginalHook(Huraijin);

if (HasEffect(Buffs.Kassatsu))
{
if (GokaMekkyaku.LevelChecked())
Expand Down Expand Up @@ -869,20 +828,6 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim
}
}

internal class NIN_HuraijinArmorCrush : CustomCombo
{
protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.NIN_HuraijinArmorCrush;

protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level)
{
if (actionID == Huraijin)
{
if (lastComboMove == GustSlash && !HasEffect(Buffs.RaijuReady))
return ArmorCrush;
}
return actionID;
}
}

internal class NIN_HideMug : CustomCombo
{
Expand Down Expand Up @@ -970,24 +915,6 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim
}
}

internal class NIN_HuraijinRaiju : CustomCombo
{
protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.NIN_HuraijinRaiju;

protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level)
{
if (actionID == Huraijin)
{
if (IsEnabled(CustomComboPreset.NIN_HuraijinRaiju_Fleeting) && ForkedRaiju.LevelChecked() && HasEffect(Buffs.RaijuReady))
return FleetingRaiju;

if (IsEnabled(CustomComboPreset.NIN_HuraijinRaiju_Forked) && ForkedRaiju.LevelChecked() && HasEffect(Buffs.RaijuReady))
return ForkedRaiju;
}
return actionID;
}
}

internal class NIN_Simple_Mudras : CustomCombo
{
protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.NIN_Simple_Mudras;
Expand Down
4 changes: 2 additions & 2 deletions XIVSlothCombo/Combos/PvE/RDM.cs
Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,7 @@ internal class RDM_EmboldenProtection : CustomCombo
protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) =>
actionID is Embolden &&
ActionReady(Embolden) &&
HasEffectAny(Buffs.EmboldenOthers) ? SCH.ChainStratagem : actionID;
HasEffectAny(Buffs.EmboldenOthers) ? OriginalHook(11) : actionID;
}

internal class RDM_MagickProtection : CustomCombo
Expand All @@ -847,7 +847,7 @@ internal class RDM_MagickProtection : CustomCombo
protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) =>
actionID is MagickBarrier &&
ActionReady(MagickBarrier) &&
HasEffectAny(Buffs.MagickBarrier) ? SCH.SacredSoil : actionID;
HasEffectAny(Buffs.MagickBarrier) ? OriginalHook(11) : actionID;
}
}
}

0 comments on commit 5f4bb55

Please sign in to comment.