Skip to content

Commit

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

namespace BossMod.Autorotation.akechi;

Expand Down Expand Up @@ -610,9 +611,9 @@ P targetPrio(Actor potentialTarget)
/// <param name="initial">The <b>initial</b> target to consider for applying the <b>DoT</b> effect.</param>
/// <param name="getTimer">A function that retrieves the <b>timer</b> value associated with a given <b>actor</b>.</param>
/// <param name="maxAllowedTargets">The maximum number of valid targets to evaluate.</param>
protected (Enemy? Best, P Timer) GetDOTTarget<P>(Enemy? initial, Func<Actor?, P> getTimer, int maxAllowedTargets) where P : struct, IComparable
protected (Enemy? Best, P Timer) GetDOTTarget<P>(Enemy? initial, Func<Actor?, P> getTimer, int maxAllowedTargets, float range = 30) where P : struct, IComparable
{
if (initial == null || maxAllowedTargets <= 0)
if (initial == null || maxAllowedTargets <= 0 || Player.DistanceToHitbox(initial.Actor) > range)
{
return (null, getTimer(null));
}
Expand All @@ -624,7 +625,7 @@ P targetPrio(Actor potentialTarget)

foreach (var dotTarget in Hints.PriorityTargets)
{
if (dotTarget.ForbidDOTs)
if (dotTarget.ForbidDOTs || Player.DistanceToHitbox(dotTarget.Actor) > range)
continue;

if (++numTargets > maxAllowedTargets)
Expand Down
11 changes: 4 additions & 7 deletions BossMod/Autorotation/Standard/akechi/DPS/AkechiDRG.cs
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ public override void Execution(StrategyValues strategy, Enemy? primaryTarget)
(BestAOETargets, NumAOETargets) = GetBestTarget(primaryTarget, 10, Is10yRectTarget);
(BestSpearTargets, NumSpearTargets) = GetBestTarget(primaryTarget, 15, Is15yRectTarget);
(BestDiveTargets, NumDiveTargets) = GetBestTarget(primaryTarget, 20, IsSplashTarget);
(BestDOTTargets, chaosLeft) = GetDOTTarget(primaryTarget, ChaosRemaining, 2);
(BestDOTTargets, chaosLeft) = GetDOTTarget(primaryTarget, ChaosRemaining, 2, 3.5f);
BestAOETarget = (Unlocked(AID.DoomSpike) && NumAOETargets > 2) ? BestAOETargets : BestDOTTarget;
BestSpearTarget = (Unlocked(AID.Geirskogul) && NumSpearTargets > 1) ? BestSpearTargets : primaryTarget;
BestDiveTarget = (Unlocked(AID.Stardiver) && NumDiveTargets > 1) ? BestDiveTargets : primaryTarget;
Expand Down Expand Up @@ -351,11 +351,8 @@ public override void Execution(StrategyValues strategy, Enemy? primaryTarget)
private AID FullRotation() => ComboLastMove switch
{
AID.Drakesbane or AID.CoerthanTorment => NumAOETargets > 2 ? FullAOE() : Hints.NumPriorityTargetsInAOECircle(Player.Position, 3.5f) == 2 ? STBuffs() : FullST(),
AID.SonicThrust => FullAOE(),
AID.DoomSpike or AID.DraconianFury => FullAOE(),
AID.WheelingThrust or AID.FangAndClaw => FullST(),
AID.VorpalThrust or AID.LanceBarrage or AID.Disembowel or AID.SpiralBlow => FullST(),
AID.TrueThrust or AID.RaidenThrust => FullST(),
AID.DoomSpike or AID.DraconianFury or AID.SonicThrust => FullAOE(),
AID.TrueThrust or AID.RaidenThrust or AID.VorpalThrust or AID.LanceBarrage or AID.Disembowel or AID.SpiralBlow or AID.HeavensThrust or AID.FullThrust or AID.WheelingThrust or AID.FangAndClaw => FullST(),
_ => NumAOETargets > 2 ? FullAOE() : Hints.NumPriorityTargetsInAOECircle(Player.Position, 3.5f) == 2 ? STBuffs() : FullST()
};

Expand All @@ -369,7 +366,7 @@ public override void Execution(StrategyValues strategy, Enemy? primaryTarget)
private AID FullST() => ComboLastMove switch
{
AID.TrueThrust or AID.RaidenThrust => Unlocked(AID.Disembowel) && (powerLeft <= GCDLength * 6 || chaosLeft <= GCDLength * 4) ? Unlocked(AID.SpiralBlow) ? AID.SpiralBlow : AID.Disembowel : Unlocked(AID.LanceBarrage) ? AID.LanceBarrage : AID.VorpalThrust,
AID.Disembowel or AID.SpiralBlow => Unlocked(AID.ChaoticSpring) ? AID.ChaoticSpring : AID.TrueThrust,
AID.Disembowel or AID.SpiralBlow => Unlocked(AID.ChaoticSpring) ? AID.ChaoticSpring : Unlocked(AID.ChaosThrust) ? AID.ChaosThrust : AID.TrueThrust,
AID.VorpalThrust or AID.LanceBarrage => Unlocked(AID.HeavensThrust) ? AID.HeavensThrust : Unlocked(AID.FullThrust) ? AID.FullThrust : AID.TrueThrust,
AID.FullThrust or AID.HeavensThrust => Unlocked(AID.FangAndClaw) ? AID.FangAndClaw : AID.TrueThrust,
AID.ChaosThrust or AID.ChaoticSpring => Unlocked(AID.WheelingThrust) ? AID.WheelingThrust : AID.TrueThrust,
Expand Down

0 comments on commit 772aed4

Please sign in to comment.