Skip to content

Commit

Permalink
fix TrueNorth, multi-dotting range issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Akechi-kun committed Feb 22, 2025
1 parent 772aed4 commit a119603
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
9 changes: 4 additions & 5 deletions BossMod/Autorotation/Standard/akechi/AkechiTools.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using static BossMod.ActorState;
using static BossMod.AIHints;
using static BossMod.AIHints;

namespace BossMod.Autorotation.akechi;

Expand Down Expand Up @@ -771,12 +770,12 @@ public sealed override void Execute(StrategyValues strategy, ref Actor? primaryT
DowntimeIn = Manager.Planner?.EstimateTimeToNextDowntime().Item2 ?? float.MaxValue;
CombatTimer = (float)(World.CurrentTime - Manager.CombatStart).TotalSeconds;
CountdownRemaining = World.Client.CountdownRemaining;
CanTrueNorth = ActionUnlocked(ActionID.MakeSpell(ClassShared.AID.TrueNorth)) && World.Client.Cooldowns[ActionDefinitions.Instance.Spell(ClassShared.AID.TrueNorth)!.MainCooldownGroup].Remaining < 45.6f;
HasTrueNorth = StatusRemaining(Player, ClassShared.SID.TrueNorth, 15) > 0.1f;
CanSwiftcast = ActionUnlocked(ActionID.MakeSpell(ClassShared.AID.Swiftcast)) && World.Client.Cooldowns[ActionDefinitions.Instance.Spell(ClassShared.AID.Swiftcast)!.MainCooldownGroup].Remaining < 0.6f;
CanTrueNorth = !HasTrueNorth && ActionUnlocked(ActionID.MakeSpell(ClassShared.AID.TrueNorth)) && World.Client.Cooldowns[ActionDefinitions.Instance.Spell(ClassShared.AID.TrueNorth)!.MainCooldownGroup].Remaining < 45.6f;
HasSwiftcast = StatusRemaining(Player, ClassShared.SID.Swiftcast, 10) > 0.1f;
CanPeloton = !Player.InCombat && ActionUnlocked(ActionID.MakeSpell(ClassShared.AID.Peloton)) && World.Client.Cooldowns[ActionDefinitions.Instance.Spell(ClassShared.AID.Peloton)!.MainCooldownGroup].Remaining < 0.6f;
CanSwiftcast = ActionUnlocked(ActionID.MakeSpell(ClassShared.AID.Swiftcast)) && World.Client.Cooldowns[ActionDefinitions.Instance.Spell(ClassShared.AID.Swiftcast)!.MainCooldownGroup].Remaining < 0.6f;
HasPeloton = PlayerHasAnyEffect(ClassShared.SID.Peloton);
CanPeloton = !Player.InCombat && !HasPeloton && ActionUnlocked(ActionID.MakeSpell(ClassShared.AID.Peloton)) && World.Client.Cooldowns[ActionDefinitions.Instance.Spell(ClassShared.AID.Peloton)!.MainCooldownGroup].Remaining < 0.6f;

if (Player.MountId is not (103 or 117 or 128))
Execution(strategy, PlayerTarget);
Expand Down
8 changes: 4 additions & 4 deletions BossMod/Autorotation/Standard/akechi/DPS/AkechiDRG.cs
Original file line number Diff line number Diff line change
Expand Up @@ -553,15 +553,15 @@ public override void Execution(StrategyValues strategy, Enemy? primaryTarget)
};
private bool ShouldUseTrueNorth(TrueNorthStrategy strategy, Actor? target) => strategy switch
{
TrueNorthStrategy.Automatic => target != null && Player.InCombat && !PlayerHasEffect(SID.TrueNorth) && GCD < 1.25f &&
TrueNorthStrategy.Automatic => target != null && Player.InCombat && CanTrueNorth && GCD < 1.25f &&
(!IsOnRear(target) && ComboLastMove is AID.Disembowel or AID.SpiralBlow or AID.ChaosThrust or AID.ChaoticSpring ||
!IsOnFlank(target) && ComboLastMove is AID.HeavensThrust or AID.FullThrust),
TrueNorthStrategy.ASAP => target != null && Player.InCombat && !PlayerHasEffect(SID.TrueNorth) &&
TrueNorthStrategy.ASAP => target != null && Player.InCombat && CanTrueNorth &&
(!IsOnRear(target) && ComboLastMove is AID.Disembowel or AID.SpiralBlow or AID.ChaosThrust or AID.ChaoticSpring ||
!IsOnFlank(target) && ComboLastMove is AID.HeavensThrust or AID.FullThrust),
TrueNorthStrategy.Flank => target != null && Player.InCombat && !PlayerHasEffect(SID.TrueNorth) && GCD < 1.25f &&
TrueNorthStrategy.Flank => target != null && Player.InCombat && CanTrueNorth && GCD < 1.25f &&
!IsOnFlank(target) && ComboLastMove is AID.HeavensThrust or AID.FullThrust,
TrueNorthStrategy.Rear => target != null && Player.InCombat && !PlayerHasEffect(SID.TrueNorth) && GCD < 1.25f &&
TrueNorthStrategy.Rear => target != null && Player.InCombat && CanTrueNorth && GCD < 1.25f &&
!IsOnRear(target) && ComboLastMove is AID.Disembowel or AID.SpiralBlow or AID.ChaosThrust or AID.ChaoticSpring,
TrueNorthStrategy.Force => !PlayerHasEffect(SID.TrueNorth),
TrueNorthStrategy.Delay => false,
Expand Down

0 comments on commit a119603

Please sign in to comment.