Skip to content

Commit

Permalink
Merge pull request #1299 from Taurenkey/issuesBranch
Browse files Browse the repository at this point in the history
Resolved Issues
  • Loading branch information
Taurenkey authored Oct 21, 2023
2 parents 88443e2 + 8a80384 commit 7692e93
Show file tree
Hide file tree
Showing 14 changed files with 195 additions and 98 deletions.
22 changes: 15 additions & 7 deletions XIVSlothCombo/Combos/CustomComboPreset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -296,9 +296,12 @@ public enum CustomComboPreset
AST_Cards_DrawOnPlay = 1000,

[ParentCombo(AST_Cards_DrawOnPlay)]
[CustomComboInfo("Redraw Feature", "Sets Draw to Redraw if you pull a card with a seal you already have and you can use Redraw.", AST.JobID)]
[CustomComboInfo("Redraw Feature", "Sets Play to Redraw if you pull a card with a seal you already have and you can use Redraw.", AST.JobID)]
AST_Cards_Redraw = 1032,

[ReplaceSkill(AST.Draw)]
[CustomComboInfo("Redraw on Draw", "Sets Draw to Redraw if you have the Clarifying Draw buff.", AST.JobID)]
AST_Cards_RedrawStandalone = 1040,

[ReplaceSkill(AST.Play)]
//Works With AST_Cards_DrawOnPlay as a feature, or by itself if AST_Cards_DrawOnPlay is disabled.
Expand Down Expand Up @@ -649,6 +652,7 @@ public enum CustomComboPreset
[CustomComboInfo("Bard Buffs Feature", "Adds Raging Strikes and Battle Voice onto Barrage.", BRD.JobID, 0, "", "")]
BRD_Buffs = 3013,

[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, 0, "", "")]
BRD_OneButtonSongs = 3014,

Expand Down Expand Up @@ -3505,9 +3509,8 @@ New features should be added to the appropriate sections.
WHM_ST_MainCombo = 19099,

[ParentCombo(WHM_ST_MainCombo)]
[CustomComboInfo("Glare III Opener Option", "Delays all oGCDs until after third Glare III cast." +
"\nOnly works with Glare III.", WHM.JobID, 11, "", "")]
WHM_ST_MainCombo_NoSwiftOpener = 19023,
[CustomComboInfo("Opener Option", "Use the Balance opener from level 56+.", WHM.JobID, 11, "", "")]
WHM_ST_MainCombo_Opener = 19023,

[ParentCombo(WHM_ST_MainCombo)]
[CustomComboInfo("Aero/Dia Uptime Option", "Adds Aero/Dia to the single target combo if the debuff is not present on current target, or is about to expire.", WHM.JobID, 12, "", "")]
Expand Down Expand Up @@ -3661,7 +3664,7 @@ New features should be added to the appropriate sections.
[CustomComboInfo("Rampart Option", "Use Variant Rampart on cooldown.", WHM.JobID)]
WHM_DPS_Variant_Rampart = 19026,

// Last value = 19026
// Last value = 19027

#endregion

Expand Down Expand Up @@ -4181,8 +4184,13 @@ New features should be added to the appropriate sections.

[SecretCustomCombo]
[ParentCombo(WARPvP_BurstMode)]
[CustomComboInfo("Blota Option", "Removes Blota from Burst Mode if Primal Rend has 5 seconds or less on its cooldown.", WARPvP.JobID)]
WARPvP_BurstMode_Blota = 128002,
[CustomComboInfo("Blota Option", "Adds Blota to Burst Mode when not in melee range.", WARPvP.JobID)]
WARPvP_BurstMode_Blota = 128003,

[SecretCustomCombo]
[ParentCombo(WARPvP_BurstMode)]
[CustomComboInfo("Primal Rend Option", "Adds Primal Rend to Burst Mode.", WARPvP.JobID)]
WARPvP_BurstMode_PrimalRend = 128004,

// Last value = 128002

Expand Down
13 changes: 13 additions & 0 deletions XIVSlothCombo/Combos/PvE/AST.cs
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,19 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim
: actionID;
}

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

protected override uint Invoke(uint actionID, uint lastComboActionID, float comboTime, byte level)
{
if (actionID is Draw && HasEffect(Buffs.ClarifyingDraw))
return Redraw;

return actionID;
}
}

internal class AST_ST_SimpleHeals : CustomCombo
{
protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.AST_ST_SimpleHeals;
Expand Down
30 changes: 10 additions & 20 deletions XIVSlothCombo/Combos/PvE/BRD.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
using System;
using Dalamud.Game.ClientState.JobGauge.Enums;
using Dalamud.Game.ClientState.JobGauge.Types;
using Dalamud.Game.ClientState.Statuses;
using System;
using System.Linq;
using XIVSlothCombo.Combos.PvE.Content;
using XIVSlothCombo.Core;
using XIVSlothCombo.CustomComboNS;
using XIVSlothCombo.Data;

namespace XIVSlothCombo.Combos.PvE
{
Expand Down Expand Up @@ -828,31 +830,19 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim
// Doesn't display the lowest cooldown song if they have been used out of order and are all on cooldown.
BRDGauge? gauge = GetJobGauge<BRDGauge>();
int songTimerInSeconds = gauge.SongTimer / 1000;
bool songWanderer = gauge.Song != Song.WANDERER;
bool canUse = (songWanderer || songTimerInSeconds < 3) && !JustUsed(WanderersMinuet);
bool wanderersMinuetReady = LevelChecked(WanderersMinuet) && IsOffCooldown(WanderersMinuet);
bool magesBalladReady = LevelChecked(MagesBallad) && IsOffCooldown(MagesBallad);
bool armysPaeonReady = LevelChecked(ArmysPaeon) && IsOffCooldown(ArmysPaeon);

if (wanderersMinuetReady)
if (wanderersMinuetReady || (gauge.Song == Song.WANDERER && songTimerInSeconds > 2))
return WanderersMinuet;

if (canUse)
{
if (magesBalladReady)
{
if (songWanderer && gauge.Repertoire > 0)
return OriginalHook(WanderersMinuet);
return MagesBallad;
}

if (armysPaeonReady)
{
if (songWanderer && gauge.Repertoire > 0)
return OriginalHook(WanderersMinuet);
return ArmysPaeon;
}
}
if (magesBalladReady || (gauge.Song == Song.MAGE && songTimerInSeconds > 11))
return MagesBallad;

if (armysPaeonReady || (gauge.Song == Song.ARMY && songTimerInSeconds > 2))
return ArmysPaeon;

}

return actionID;
Expand Down
7 changes: 6 additions & 1 deletion XIVSlothCombo/Combos/PvE/MNK.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using XIVSlothCombo.Combos.PvE.Content;
using XIVSlothCombo.Core;
using XIVSlothCombo.CustomComboNS;
using XIVSlothCombo.Extensions;

namespace XIVSlothCombo.Combos.PvE
{
Expand Down Expand Up @@ -229,9 +230,13 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim
return OriginalHook(ArmOfTheDestroyer);
}

if (HasEffect(Buffs.RaptorForm) && level >= Levels.FourPointFury)
if (HasEffect(Buffs.RaptorForm))
{
if (FourPointFury.LevelChecked())
return FourPointFury;

if (TwinSnakes.LevelChecked())
return TwinSnakes;
}

if (HasEffect(Buffs.CoerlForm) && level >= Levels.Rockbreaker)
Expand Down
27 changes: 23 additions & 4 deletions XIVSlothCombo/Combos/PvE/PLD.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ public static UserInt
PLD_SpiritsWithinOption = new("PLD_SpiritsWithinOption"),
PLD_SheltronOption = new("PLD_SheltronOption"),
PLD_ST_RequiescatWeave = new("PLD_ST_RequiescatWeave"),
PLD_AoE_RequiescatWeave = new("PLD_AoE_RequiescatWeave");
PLD_AoE_RequiescatWeave = new("PLD_AoE_RequiescatWeave"),
PLD_ST_AtonementTiming = new("PLD_ST_EquilibriumTiming"),
PLD_ST_DivineMightTiming = new("PLD_ST_DivineMightTiming");
public static UserBool
PLD_Intervene_MeleeOnly = new("PLD_Intervene_MeleeOnly");
}
Expand Down Expand Up @@ -313,7 +315,7 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb
// (arguably better to delay by less than a whole GCD and just stop moving to cast)
if (IsEnabled(CustomComboPreset.PLD_ST_AdvancedMode_ShieldLob) &&
ShieldLob.LevelChecked() &&
((HolySpirit.LevelChecked() && GetResourceCost(HolySpirit) > LocalPlayer.CurrentMp) || (!HolySpirit.LevelChecked())) || IsMoving)
((HolySpirit.LevelChecked() && GetResourceCost(HolySpirit) > LocalPlayer.CurrentMp) || (!HolySpirit.LevelChecked()) || IsMoving))
return ShieldLob;
}

Expand Down Expand Up @@ -452,6 +454,10 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb
GetResourceCost(HolySpirit) <= LocalPlayer.CurrentMp)
return HolySpirit;

if (IsEnabled(CustomComboPreset.PLD_ST_AdvancedMode_Atonement) &&
GetBuffStacks(Buffs.SwordOath) is < 3 and > 0 && InMeleeRange())
return Atonement;

// Base combo
if (comboTime > 0)
{
Expand All @@ -462,16 +468,29 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb
if (lastComboActionID is RiotBlade && RageOfHalone.LevelChecked())
{
if (IsEnabled(CustomComboPreset.PLD_ST_AdvancedMode_Atonement) &&
HasEffect(Buffs.SwordOath) && InMeleeRange())
HasEffect(Buffs.SwordOath) && InMeleeRange() &&
(Config.PLD_ST_AtonementTiming == 2 || (Config.PLD_ST_AtonementTiming == 3 && ActionWatching.CombatActions.Count(x => x == FightOrFlight) % 2 == 0)))
return Atonement;

return (IsEnabled(CustomComboPreset.PLD_ST_AdvancedMode_HolySpirit) &&
HasEffect(Buffs.DivineMight) &&
GetResourceCost(HolySpirit) <= LocalPlayer.CurrentMp)
GetResourceCost(HolySpirit) <= LocalPlayer.CurrentMp &&
(Config.PLD_ST_DivineMightTiming == 2 || (Config.PLD_ST_DivineMightTiming == 3 && ActionWatching.CombatActions.Count(x => x == FightOrFlight) % 2 == 1)))
? HolySpirit
: OriginalHook(RageOfHalone);
}
}

if (IsEnabled(CustomComboPreset.PLD_ST_AdvancedMode_Atonement) &&
HasEffect(Buffs.SwordOath) && InMeleeRange() &&
(Config.PLD_ST_AtonementTiming == 1 || (Config.PLD_ST_AtonementTiming == 3 && ActionWatching.CombatActions.Count(x => x == FightOrFlight) % 2 == 1)))
return Atonement;

if (IsEnabled(CustomComboPreset.PLD_ST_AdvancedMode_HolySpirit) &&
HasEffect(Buffs.DivineMight) &&
GetResourceCost(HolySpirit) <= LocalPlayer.CurrentMp &&
(Config.PLD_ST_DivineMightTiming == 1 || (Config.PLD_ST_DivineMightTiming == 3 && ActionWatching.CombatActions.Count(x => x == FightOrFlight) % 2 == 0)))
return HolySpirit;
}
}

Expand Down
6 changes: 5 additions & 1 deletion XIVSlothCombo/Combos/PvE/WAR.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using XIVSlothCombo.Combos.PvE.Content;
using XIVSlothCombo.Core;
using XIVSlothCombo.CustomComboNS;
using XIVSlothCombo.Extensions;

namespace XIVSlothCombo.Combos.PvE
{
Expand Down Expand Up @@ -127,8 +128,11 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim

if (IsEnabled(CustomComboPreset.WAR_ST_StormsPath_FellCleave) && LevelChecked(InnerBeast))
{
if (HasEffect(Buffs.InnerRelease) || HasEffect(Buffs.NascentChaos))
if (HasEffect(Buffs.InnerRelease) || (HasEffect(Buffs.NascentChaos) && InnerChaos.LevelChecked()))
return OriginalHook(InnerBeast);

if (HasEffect(Buffs.NascentChaos) && !InnerChaos.LevelChecked())
return OriginalHook(Decimate);
}

}
Expand Down
Loading

0 comments on commit 7692e93

Please sign in to comment.