Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

more rotations #414

Merged
merged 4 commits into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
122 changes: 68 additions & 54 deletions BossMod/ActionQueue/Healers/SCH.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,42 +5,48 @@ public enum AID : uint
None = 0,
Sprint = ClassShared.AID.Sprint,

AngelFeathers = 4247, // LB3, 2.0s cast, range 0, AOE 50 circle, targets=self, castAnimLock=8.100
Ruin1 = 17869, // L1, 1.5s cast, GCD, range 25, single-target, targets=hostile, animLock=???
Bio1 = 17864, // L2, instant, GCD, range 25, single-target, targets=hostile, animLock=???
Physick = 190, // L4, 1.5s cast, GCD, range 30, single-target, targets=self/party/alliance/friendly
SummonEos = 17215, // L4, 1.5s cast, GCD, range 0, single-target, targets=self
WhisperingDawn = 16537, // L20, instant, 60.0s CD (group 13), range 0, single-target, targets=self
Bio2 = 17865, // L26, instant, GCD, range 25, single-target, targets=hostile
Adloquium = 185, // L30, 2.0s cast, GCD, range 30, single-target, targets=self/party/alliance/friendly
Succor = 186, // L35, 2.0s cast, GCD, range 0, AOE 15 circle, targets=self
Ruin2 = 17870, // L38, instant, GCD, range 25, single-target, targets=hostile
FeyIllumination = 16538, // L40, instant, 120.0s CD (group 21), range 0, single-target, targets=self
Aetherflow = 166, // L45, instant, 60.0s CD (group 12), range 0, single-target, targets=self
EnergyDrain = 167, // L45, instant, 1.0s CD (group 3), range 25, single-target, targets=hostile
Lustrate = 189, // L45, instant, 1.0s CD (group 0), range 30, single-target, targets=self/party/alliance/friendly
ArtOfWar1 = 16539, // L46, instant, GCD, range 0, AOE 5 circle, targets=self
SacredSoil = 188, // L50, instant, 30.0s CD (group 5), range 30, ???, targets=area
Indomitability = 3583, // L52, instant, 30.0s CD (group 6), range 0, AOE 15 circle, targets=self
Broil1 = 3584, // L54, 1.5s cast, GCD, range 25, single-target, targets=hostile, animLock=???
DeploymentTactics = 3585, // L56, instant, 120.0s CD (group 19), range 30, AOE 30 circle, targets=self/party
EmergencyTactics = 3586, // L58, instant, 15.0s CD (group 4), range 0, single-target, targets=self
Dissipation = 3587, // L60, instant, 180.0s CD (group 24), range 0, single-target, targets=self
Excogitation = 7434, // L62, instant, 45.0s CD (group 8), range 30, single-target, targets=self/party
Broil2 = 7435, // L64, 1.5s cast, GCD, range 25, single-target, targets=hostile
ChainStratagem = 7436, // L66, instant, 120.0s CD (group 20), range 25, single-target, targets=hostile
Aetherpact = 7437, // L70, instant, 3.0s CD (group 2), range 30, single-target, targets=self/party
DissolveUnion = 7869, // L70, instant, 1.0s CD (group 1), range 0, single-target, targets=self
Broil3 = 16541, // L72, 1.5s cast, GCD, range 25, single-target, targets=hostile, animLock=???
Biolysis = 16540, // L72, instant, GCD, range 25, single-target, targets=hostile
Recitation = 16542, // L74, instant, 90.0s CD (group 14), range 0, single-target, targets=self
FeyBlessing = 16543, // L76, instant, 60.0s CD (group 10), range 0, single-target, targets=self
Consolation = 16546, // L80, instant, 30.0s CD (group 9/70) (2? charges), range 0, single-target, targets=self
SummonSeraph = 16545, // L80, instant, 120.0s CD (group 22), range 0, single-target, targets=self
Broil4 = 25865, // L82, 1.5s cast, GCD, range 25, single-target, targets=hostile
ArtOfWar2 = 25866, // L82, instant, GCD, range 0, AOE 5 circle, targets=self
Protraction = 25867, // L86, instant, 60.0s CD (group 11), range 30, single-target, targets=self/party
Expedient = 25868, // L90, instant, 120.0s CD (group 23), range 0, AOE 30 circle, targets=self
AngelFeathers = 4247, // LB3, 2.0s cast, range 0, AOE 50 circle, targets=Self, animLock=8.100s?
Ruin1 = 17869, // L1, 1.5s cast, GCD, range 25, single-target, targets=Hostile
Bio1 = 17864, // L2, instant, GCD, range 25, single-target, targets=Hostile
Physick = 190, // L4, 1.5s cast, GCD, range 30, single-target, targets=Self/Party/Alliance/Friendly
SummonEos = 17215, // L4, 1.5s cast, GCD, range 0, single-target, targets=Self
WhisperingDawn = 16537, // L20, instant, 60.0s CD (group 14), range 0, single-target, targets=Self
Bio2 = 17865, // L26, instant, GCD, range 25, single-target, targets=Hostile
Adloquium = 185, // L30, 2.0s cast, GCD, range 30, single-target, targets=Self/Party/Alliance/Friendly
Succor = 186, // L35, 2.0s cast, GCD, range 0, AOE 15 circle, targets=Self
Ruin2 = 17870, // L38, instant, GCD, range 25, single-target, targets=Hostile
FeyIllumination = 16538, // L40, instant, 120.0s CD (group 21), range 0, single-target, targets=Self
Aetherflow = 166, // L45, instant, 60.0s CD (group 13), range 0, single-target, targets=Self
EnergyDrain = 167, // L45, instant, 1.0s CD (group 3), range 25, single-target, targets=Hostile
Lustrate = 189, // L45, instant, 1.0s CD (group 0), range 30, single-target, targets=Self/Party/Alliance/Friendly
ArtOfWar1 = 16539, // L46, instant, GCD, range 0, AOE 5 circle, targets=Self
SacredSoil = 188, // L50, instant, 30.0s CD (group 7), range 30, ???, targets=Area
Indomitability = 3583, // L52, instant, 30.0s CD (group 8), range 0, AOE 15 circle, targets=Self
Broil1 = 3584, // L54, 1.5s cast, GCD, range 25, single-target, targets=Hostile
DeploymentTactics = 3585, // L56, instant, 120.0s CD (group 19), range 30, AOE 30 circle, targets=Self/Party
EmergencyTactics = 3586, // L58, instant, 15.0s CD (group 6), range 0, single-target, targets=Self
Dissipation = 3587, // L60, instant, 180.0s CD (group 24), range 0, single-target, targets=Self
Excogitation = 7434, // L62, instant, 45.0s CD (group 9), range 30, single-target, targets=Self/Party
Broil2 = 7435, // L64, 1.5s cast, GCD, range 25, single-target, targets=Hostile
ChainStratagem = 7436, // L66, instant, 120.0s CD (group 20), range 25, single-target, targets=Hostile
DissolveUnion = 7869, // L70, instant, 1.0s CD (group 1), range 0, single-target, targets=Self
Aetherpact = 7437, // L70, instant, 3.0s CD (group 5), range 30, single-target, targets=Self/Party
Biolysis = 16540, // L72, instant, GCD, range 25, single-target, targets=Hostile
Broil3 = 16541, // L72, 1.5s cast, GCD, range 25, single-target, targets=Hostile
Recitation = 16542, // L74, instant, 90.0s CD (group 15), range 0, single-target, targets=Self
FeyBlessing = 16543, // L76, instant, 60.0s CD (group 11), range 0, single-target, targets=Self
SummonSeraph = 16545, // L80, instant, 120.0s CD (group 22), range 0, single-target, targets=Self
Consolation = 16546, // L80, instant, 30.0s CD (group 10/70) (2 charges), range 0, single-target, targets=Self
ArtOfWar2 = 25866, // L82, instant, GCD, range 0, AOE 5 circle, targets=Self
Broil4 = 25865, // L82, 1.5s cast, GCD, range 25, single-target, targets=Hostile
Protraction = 25867, // L86, instant, 60.0s CD (group 12), range 30, single-target, targets=Self/Party
Expedient = 25868, // L90, instant, 120.0s CD (group 18), range 0, AOE 30 circle, targets=Self
BanefulImpaction = 37012, // L92, instant, 1.0s CD (group 2), range 25, AOE 5 circle, targets=Hostile, animLock=???
Concitation = 37013, // L96, 2.0s cast, GCD, range 0, AOE 15 circle, targets=Self, animLock=???
Seraphism = 37014, // L100, instant, 180.0s CD (group 23), range 0, single-target, targets=Self, animLock=???
Manifestation = 37015, // L100, instant, GCD, range 30, single-target, targets=Self/Party/Alliance/Friendly, animLock=???
Accession = 37016, // L100, instant, GCD, range 0, AOE 15 circle, targets=Self, animLock=???
EmergencyTactics1 = 37037, // L100, instant, 1.0s CD (group 4), range 0, single-target, targets=Self, animLock=???

// pet abilities (TODO: regenerate)
PetEmbrace = 802, // L1, instant, 3.0s CD (group 76), range 30, single-target 0/0, targets=self/party/friendly, animLock=???
Expand All @@ -54,15 +60,15 @@ public enum AID : uint
PetConsolation = 16547, // L80, instant, range 0, AOE circle 20/0, targets=self, animLock=???

// Shared
HealingWind = ClassShared.AID.HealingWind, // LB1, 2.0s cast, range 0, AOE 50 circle, targets=self, castAnimLock=2.100
BreathOfTheEarth = ClassShared.AID.BreathOfTheEarth, // LB2, 2.0s cast, range 0, AOE 50 circle, targets=self, castAnimLock=5.130
Repose = ClassShared.AID.Repose, // L8, 2.5s cast, GCD, range 30, single-target, targets=hostile
Esuna = ClassShared.AID.Esuna, // L10, 1.0s cast, GCD, range 30, single-target, targets=self/party/alliance/friendly
Resurrection = ClassShared.AID.Resurrection, // L12, 8.0s cast, GCD, range 30, single-target, targets=party/alliance/friendly
LucidDreaming = ClassShared.AID.LucidDreaming, // L14, instant, 60.0s CD (group 45), range 0, single-target, targets=self
Swiftcast = ClassShared.AID.Swiftcast, // L18, instant, 60.0s CD (group 44), range 0, single-target, targets=self
Surecast = ClassShared.AID.Surecast, // L44, instant, 120.0s CD (group 48), range 0, single-target, targets=self
Rescue = ClassShared.AID.Rescue, // L48, instant, 120.0s CD (group 49), range 30, single-target, targets=party
HealingWind = ClassShared.AID.HealingWind, // LB1, 2.0s cast, range 0, AOE 50 circle, targets=Self, animLock=2.100s?
BreathOfTheEarth = ClassShared.AID.BreathOfTheEarth, // LB2, 2.0s cast, range 0, AOE 50 circle, targets=Self, animLock=5.130s?
Repose = ClassShared.AID.Repose, // L8, 2.5s cast, GCD, range 30, single-target, targets=Hostile
Esuna = ClassShared.AID.Esuna, // L10, 1.0s cast, GCD, range 30, single-target, targets=Self/Party/Alliance/Friendly
Resurrection = ClassShared.AID.Resurrection, // L12, 8.0s cast, GCD, range 30, single-target, targets=Party/Alliance/Friendly/Dead
LucidDreaming = ClassShared.AID.LucidDreaming, // L14, instant, 60.0s CD (group 44), range 0, single-target, targets=Self
Swiftcast = ClassShared.AID.Swiftcast, // L18, instant, 60.0s CD (group 43), range 0, single-target, targets=Self
Surecast = ClassShared.AID.Surecast, // L44, instant, 120.0s CD (group 48), range 0, single-target, targets=Self
Rescue = ClassShared.AID.Rescue, // L48, instant, 120.0s CD (group 49), range 30, single-target, targets=Party
}

public enum TraitID : uint
Expand All @@ -88,20 +94,22 @@ public enum SID : uint
None = 0,
Bio1 = 179, // applied by Bio1 to target, dot
Bio2 = 189, // applied by Bio2 to target, dot
Biolysis = 0xFFFFFF, // TODO!
Biolysis = 1895,
Galvanize = 297, // applied by Adloquium to target, shield
LucidDreaming = 1204, // applied by Lucid Dreaming to self
Swiftcast = 167, // applied by Swiftcast to self
Sleep = 3, // applied by Repose to target
BanefulImpaction = 3883, // applied by Baneful Impaction to target
ImpactImminent = 3882, // applied by Chain Stratagem to self
}

public sealed class Definitions : IDisposable
{
public Definitions(ActionDefinitions d)
{
d.RegisterSpell(AID.AngelFeathers, castAnimLock: 8.10f); // castAnimLock=8.100
d.RegisterSpell(AID.Ruin1); // animLock=???
d.RegisterSpell(AID.Bio1); // animLock=???
d.RegisterSpell(AID.AngelFeathers, castAnimLock: 8.10f); // animLock=8.100s?
d.RegisterSpell(AID.Ruin1);
d.RegisterSpell(AID.Bio1);
d.RegisterSpell(AID.Physick);
d.RegisterSpell(AID.SummonEos);
d.RegisterSpell(AID.WhisperingDawn);
Expand All @@ -116,25 +124,31 @@ public Definitions(ActionDefinitions d)
d.RegisterSpell(AID.ArtOfWar1);
d.RegisterSpell(AID.SacredSoil);
d.RegisterSpell(AID.Indomitability);
d.RegisterSpell(AID.Broil1); // animLock=???
d.RegisterSpell(AID.Broil1);
d.RegisterSpell(AID.DeploymentTactics);
d.RegisterSpell(AID.EmergencyTactics);
d.RegisterSpell(AID.Dissipation);
d.RegisterSpell(AID.Excogitation);
d.RegisterSpell(AID.Broil2);
d.RegisterSpell(AID.ChainStratagem);
d.RegisterSpell(AID.Aetherpact);
d.RegisterSpell(AID.DissolveUnion);
d.RegisterSpell(AID.Broil3); // animLock=???
d.RegisterSpell(AID.Aetherpact);
d.RegisterSpell(AID.Biolysis);
d.RegisterSpell(AID.Broil3);
d.RegisterSpell(AID.Recitation);
d.RegisterSpell(AID.FeyBlessing);
d.RegisterSpell(AID.Consolation);
d.RegisterSpell(AID.SummonSeraph);
d.RegisterSpell(AID.Broil4);
d.RegisterSpell(AID.Consolation);
d.RegisterSpell(AID.ArtOfWar2);
d.RegisterSpell(AID.Broil4);
d.RegisterSpell(AID.Protraction);
d.RegisterSpell(AID.Expedient);
d.RegisterSpell(AID.BanefulImpaction); // animLock=???
d.RegisterSpell(AID.Concitation); // animLock=???
d.RegisterSpell(AID.Seraphism); // animLock=???
d.RegisterSpell(AID.Manifestation); // animLock=???
d.RegisterSpell(AID.Accession); // animLock=???
d.RegisterSpell(AID.EmergencyTactics1); // animLock=???

Customize(d);
}
Expand Down
2 changes: 2 additions & 0 deletions BossMod/ActionQueue/Tanks/DRK.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ public enum SID : uint
Grit = 743,
SaltedEarth = 749,
Delirium = 1972,
EnhancedDelirium = 3836,
Scorn = 3837,
}

public sealed class Definitions : IDisposable
Expand Down
18 changes: 15 additions & 3 deletions BossMod/ActionTweaks/ManualActionQueueTweak.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,13 @@ private bool ResolveTarget(ActionDefinition def, Actor player, ulong targetId, F
targetPos = default;
if (def.AllowedTargets.HasFlag(ActionTargets.Area))
{
// GT actions with range 0 must be cast on player - there are only a few of these (BLM leylines, PCT leylines, PCT PVP limit break)
if (def.Range == 0)
{
targetPos = player.PosRot.XYZ();
return true;
}

// ground-targeted actions have special targeting
var (gtTarget, gtPos) = getAreaTarget();
if (gtPos != null)
Expand All @@ -141,9 +148,14 @@ private bool ResolveTarget(ActionDefinition def, Actor player, ulong targetId, F
}
else if (gtTarget is not 0 and not 0xE0000000)
{
// auto cast at target
target = ws.Actors.Find(gtTarget);
return target != null; // if target isn't found in world, bail
var t = ws.Actors.Find(gtTarget);
if (t != null)
{
// auto cast at target's position
targetPos = t.PosRot.XYZ();
return true;
}
return false; // if target isn't found in world, bail
}
else
{
Expand Down
10 changes: 2 additions & 8 deletions BossMod/Autorotation/xan/AI/Healer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public enum RaiseTarget
public ActionID RaiseAction => Player.Class switch
{
Class.CNJ or Class.WHM => ActionID.MakeSpell(BossMod.WHM.AID.Raise),
Class.ACN or Class.SCH => ActionID.MakeSpell(SCH.AID.Resurrection),
Class.ACN or Class.SCH => ActionID.MakeSpell(BossMod.SCH.AID.Resurrection),
Class.AST => ActionID.MakeSpell(BossMod.AST.AID.Ascend),
Class.SGE => ActionID.MakeSpell(BossMod.SGE.AID.Egeiro),
_ => default
Expand Down Expand Up @@ -125,13 +125,7 @@ void UseThinAir()
});
}

private bool BeingRaised(Actor actor)
{
if (Player.FindStatus(BossMod.WHM.SID.Raise) != null)
return true;

return World.PendingEffects.PendingStatus(actor.InstanceID, (uint)BossMod.WHM.SID.Raise) != null;
}
private static bool BeingRaised(Actor actor) => actor.Statuses.Any(s => s.ID is 148 or 1140);

private void AutoWHM(StrategyValues strategy)
{
Expand Down
16 changes: 13 additions & 3 deletions BossMod/Autorotation/xan/Basexan.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ protected void PushGCD(AID aid, Actor? target, int priority = 0, float delay = 0
}
}

protected void PushOGCD<P>(AID aid, Actor? target, P priority, float delay = 0) where P : Enum
=> PushOGCD(aid, target, (int)(object)priority, delay);

protected void PushOGCD(AID aid, Actor? target, int priority = 0, float delay = 0)
=> PushAction(aid, target, ActionQueue.Priority.Low + 100 + priority, delay);

Expand All @@ -99,10 +102,11 @@ protected bool PushAction(AID aid, Actor? target, float priority, float delay)
}

Vector3 targetPos = default;
if (def.ID.ID is (uint)BossMod.BLM.AID.LeyLines or (uint)BossMod.BLM.AID.Retrace or (uint)BossMod.PCT.AID.StarryMuse or (uint)BossMod.PCT.AID.ScenicMuse)

if (def.Range == 0 && def.AllowedTargets.HasFlag(ActionTargets.Area))
targetPos = Player.PosRot.XYZ();

Hints.ActionsToExecute.Push(ActionID.MakeSpell(aid), target, priority, targetPos: targetPos, delay: delay);
Hints.ActionsToExecute.Push(ActionID.MakeSpell(aid), target, priority, delay: delay, targetPos: targetPos);
return true;
}

Expand Down Expand Up @@ -332,7 +336,13 @@ public sealed override void Execute(StrategyValues strategy, Actor? primaryTarge
if (primaryTarget?.OID != 0x2DE0)
return (Bossmods.RaidCooldowns.DamageBuffLeft(Player), Bossmods.RaidCooldowns.NextDamageBuffIn2());

return base.EstimateRaidBuffTimings(primaryTarget);
// hack for a dummy: expect that raidbuffs appear at 7.8s and then every 120s
var cycleTime = CombatTimer - 7.8f;
if (cycleTime < 0)
return (0, 7.8f - CombatTimer); // very beginning of a fight

cycleTime %= 120;
return cycleTime < 20 ? (20 - cycleTime, 0) : (0, 120 - cycleTime);
}

public abstract void Exec(StrategyValues strategy, Actor? primaryTarget);
Expand Down
8 changes: 5 additions & 3 deletions BossMod/Autorotation/xan/Casters/BLM.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,10 @@ private void FirePhase(StrategyValues strategy, Actor? primaryTarget)
{
if (Unlocked(TraitID.UmbralHeart))
FirePhaseAOE(strategy);
else
else if (Unlocked(AID.Fire2)) // loll
FireAOELowLevel(strategy, primaryTarget);
else
IceAOELowLevel(strategy, primaryTarget);
}
else
FirePhaseST(strategy, primaryTarget);
Expand Down Expand Up @@ -262,7 +264,7 @@ private void FireAOELowLevel(StrategyValues strategy, Actor? primaryTarget)

if (MP >= 3000)
PushGCD(AID.Fire2, BestAOETarget);
else if (MP >= 800)
else if (MP >= 800 && Unlocked(AID.Flare))
PushGCD(AID.Flare, BestAOETarget);
else
{
Expand All @@ -275,7 +277,7 @@ private void FireAOELowLevel(StrategyValues strategy, Actor? primaryTarget)

private void IcePhase(StrategyValues strategy, Actor? primaryTarget)
{
if (NumAOETargets > 2)
if (NumAOETargets > 2 && Unlocked(AID.Blizzard2))
{
if (Unlocked(TraitID.UmbralHeart))
IcePhaseAOE(strategy, primaryTarget);
Expand Down
3 changes: 3 additions & 0 deletions BossMod/Autorotation/xan/Casters/RDM.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ public override void Exec(StrategyValues strategy, Actor? primaryTarget)
return;
}

if (Swordplay > 0 || LowestMana >= 50 || InCombo)
Hints.RecommendedRangeToTarget = 3f;

OGCD(strategy, primaryTarget);

if (ComboLastMove is AID.Scorch)
Expand Down
2 changes: 1 addition & 1 deletion BossMod/Autorotation/xan/Casters/SMN.cs
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ public override void Exec(StrategyValues strategy, Actor? primaryTarget)

if (CountdownRemaining > 0)
{
if (CountdownRemaining <= GetSlidecastTime(AID.Ruin1))
if (CountdownRemaining <= GetCastTime(AID.Ruin1))
PushGCD(AID.Ruin1, primaryTarget);

return;
Expand Down
Loading
Loading