Skip to content

Commit

Permalink
smh okay I mean it this time really (not clickbait)
Browse files Browse the repository at this point in the history
  • Loading branch information
Akechi-kun committed Feb 22, 2025
1 parent a119603 commit 3cab82c
Showing 1 changed file with 26 additions and 20 deletions.
46 changes: 26 additions & 20 deletions BossMod/Autorotation/Standard/akechi/DPS/AkechiDRG.cs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ public enum OGCDPriority
private bool canWT;
private bool canROTD;
private bool canSC;
private float GCDLength;
private float blCD;
private float lcLeft;
private float lcCD;
Expand All @@ -171,6 +170,10 @@ public enum OGCDPriority
private int NumAOETargets;
private int NumSpearTargets;
private int NumDiveTargets;
private bool ShouldUseAOE;
private bool ShouldUseSpears;
private bool ShouldUseDives;
private bool ShouldUseDOT;
private Enemy? BestAOETargets;
private Enemy? BestSpearTargets;
private Enemy? BestDiveTargets;
Expand All @@ -187,38 +190,41 @@ public override void Execution(StrategyValues strategy, Enemy? primaryTarget)
var gauge = World.Client.GetGauge<DragoonGauge>();
focusCount = gauge.FirstmindsFocusCount;
hasLOTD = gauge.LotdTimer > 0;
blCD = TotalCD(AID.BattleLitany);
lcCD = TotalCD(AID.LanceCharge);
lcLeft = SelfStatusLeft(SID.LanceCharge, 20);
powerLeft = SelfStatusLeft(SID.PowerSurge, 30);
chaosLeft = MathF.Max(StatusDetails(primaryTarget?.Actor, SID.ChaosThrust, Player.InstanceID).Left, StatusDetails(primaryTarget?.Actor, SID.ChaoticSpring, Player.InstanceID).Left);
blCD = TotalCD(AID.BattleLitany);
GCDLength = ActionSpeed.GCDRounded(World.Client.PlayerStats.SkillSpeed, World.Client.PlayerStats.Haste, Player.Level);
hasMD = PlayerHasEffect(SID.DiveReady);
hasNastrond = PlayerHasEffect(SID.NastrondReady);
hasLC = lcCD is >= 40 and <= 60;
hasBL = blCD is >= 100 and <= 120;
hasDF = PlayerHasEffect(SID.DragonsFlight);
hasSC = PlayerHasEffect(SID.StarcrossReady);
canLC = Unlocked(AID.LanceCharge) && ActionReady(AID.LanceCharge);
canBL = Unlocked(AID.BattleLitany) && ActionReady(AID.BattleLitany);
canLS = Unlocked(AID.LifeSurge);
canJump = Unlocked(AID.Jump) && ActionReady(AID.Jump);
canDD = Unlocked(AID.DragonfireDive) && ActionReady(AID.DragonfireDive);
canGeirskogul = Unlocked(AID.Geirskogul) && ActionReady(AID.Geirskogul);
canLC = ActionReady(AID.LanceCharge);
canBL = ActionReady(AID.BattleLitany);
canLS = Unlocked(AID.LifeSurge) && (Unlocked(TraitID.EnhancedLifeSurge) ? TotalCD(AID.LifeSurge) < 40.6f : TotalCD(AID.LifeSurge) < 0.6f) && !PlayerHasEffect(SID.LifeSurge);
canJump = ActionReady(AID.Jump);
canDD = ActionReady(AID.DragonfireDive);
canGeirskogul = ActionReady(AID.Geirskogul);
canMD = Unlocked(AID.MirageDive) && hasMD;
canNastrond = Unlocked(AID.Nastrond) && hasNastrond;
canSD = Unlocked(AID.Stardiver) && ActionReady(AID.Stardiver);
canWT = Unlocked(AID.WyrmwindThrust) && ActionReady(AID.WyrmwindThrust) && focusCount == 2;
canSD = ActionReady(AID.Stardiver);
canWT = ActionReady(AID.WyrmwindThrust) && focusCount == 2;
canROTD = Unlocked(AID.RiseOfTheDragon) && hasDF;
canSC = Unlocked(AID.Starcross) && hasSC;
ShouldUseAOE = Unlocked(AID.DoomSpike) && NumAOETargets > 2;
ShouldUseSpears = Unlocked(AID.Geirskogul) && NumSpearTargets > 1;
ShouldUseDives = Unlocked(AID.Stardiver) && NumDiveTargets > 1;
ShouldUseDOT = Unlocked(AID.ChaosThrust) && Hints.NumPriorityTargetsInAOECircle(Player.Position, 3.5f) == 2 && ComboLastMove is AID.Disembowel or AID.SpiralBlow;
(BestAOETargets, NumAOETargets) = GetBestTarget(primaryTarget, 10, Is10yRectTarget);
(BestSpearTargets, NumSpearTargets) = GetBestTarget(primaryTarget, 15, Is15yRectTarget);
(BestDiveTargets, NumDiveTargets) = GetBestTarget(primaryTarget, 20, IsSplashTarget);
(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;
BestDOTTarget = (Unlocked(AID.ChaosThrust) && Hints.NumPriorityTargetsInAOECircle(Player.Position, 3.5f) == 2 && ComboLastMove is AID.Disembowel or AID.SpiralBlow) ? BestDOTTargets : primaryTarget;
BestAOETarget = ShouldUseAOE ? BestAOETargets : BestDOTTarget;
BestSpearTarget = ShouldUseSpears ? BestSpearTargets : primaryTarget;
BestDiveTarget = ShouldUseDives ? BestDiveTargets : primaryTarget;
BestDOTTarget = ShouldUseDOT ? BestDOTTargets : primaryTarget;

#region Strategy Definitions
var hold = strategy.Option(Track.Hold).As<HoldStrategy>() == HoldStrategy.Forbid;
Expand Down Expand Up @@ -278,7 +284,7 @@ public override void Execution(StrategyValues strategy, Enemy? primaryTarget)
if (AOEStrategy is AOEStrategy.AutoFinish)
QueueGCD(FullRotation(), BestAOETarget?.Actor, GCDPriority.Combo123);
if (AOEStrategy is AOEStrategy.AutoBreak)
QueueGCD(NumAOETargets > 2 ? FullAOE() : Hints.NumPriorityTargetsInAOECircle(Player.Position, 3.5f) == 2 ? STBuffs() : FullST(), BestAOETarget?.Actor, GCDPriority.Combo123);
QueueGCD(ShouldUseAOE ? FullAOE() : ShouldUseDOT ? STBuffs() : FullST(), BestAOETarget?.Actor, GCDPriority.Combo123);
if (AOEStrategy == AOEStrategy.ForceST)
QueueGCD(FullST(), TargetChoice(AOE) ?? primaryTarget?.Actor, GCDPriority.ForcedGCD);
if (AOEStrategy == AOEStrategy.Force123ST)
Expand Down Expand Up @@ -350,10 +356,10 @@ 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.Drakesbane or AID.CoerthanTorment => ShouldUseAOE ? FullAOE() : ShouldUseDOT ? STBuffs() : 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()
_ => ShouldUseAOE ? FullAOE() : ShouldUseDOT ? STBuffs() : FullST()
};

#region Single-Target Helpers
Expand All @@ -365,7 +371,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.TrueThrust or AID.RaidenThrust => Unlocked(AID.Disembowel) && (powerLeft <= SkSGCDLength * 6 || chaosLeft <= SkSGCDLength * 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 : 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,
Expand Down Expand Up @@ -506,7 +512,7 @@ public override void Execution(StrategyValues strategy, Enemy? primaryTarget)
};
private bool ShouldUseWyrmwindThrust(OGCDStrategy strategy, Actor? target) => strategy switch
{
OGCDStrategy.Automatic => Player.InCombat && target != null && In15y(target) && canWT && lcCD > GCDLength * 2,
OGCDStrategy.Automatic => Player.InCombat && target != null && In15y(target) && canWT && lcCD > SkSGCDLength * 2,
OGCDStrategy.Force => canWT,
OGCDStrategy.AnyWeave => canWT && CanWeaveIn,
OGCDStrategy.EarlyWeave => canWT && CanEarlyWeaveIn,
Expand Down

0 comments on commit 3cab82c

Please sign in to comment.