From 2a5699bf27194d84c8cba80f675b4103a95795d7 Mon Sep 17 00:00:00 2001 From: Andrew Gilewsky Date: Sun, 7 Apr 2024 15:27:49 +0100 Subject: [PATCH 01/18] Forbid activating multiple modules of the same type concurrently. --- BossMod/BossModule/BossModuleManager.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/BossMod/BossModule/BossModuleManager.cs b/BossMod/BossModule/BossModuleManager.cs index 5318c8cee0..601ea307f9 100644 --- a/BossMod/BossModule/BossModuleManager.cs +++ b/BossMod/BossModule/BossModuleManager.cs @@ -72,10 +72,12 @@ public void Update() var m = _loadedModules[i]; m.StateMachine.PrepullTimer = WorldState.Client.CountdownRemaining ?? 10000; bool wasActive = m.StateMachine.ActiveState != null; + bool allowUpdate = wasActive || !_loadedModules.Any(other => other.StateMachine.ActiveState != null && other.GetType() == m.GetType()); // hack: forbid activating multiple modules of the same type bool isActive; try { - m.Update(); + if (allowUpdate) + m.Update(); isActive = m.StateMachine.ActiveState != null; } catch (Exception ex) From 6f660e4d342e48e925674d17060446642a69e49b Mon Sep 17 00:00:00 2001 From: Andrew Gilewsky Date: Sun, 7 Apr 2024 21:30:33 +0100 Subject: [PATCH 02/18] Thaleia trash. --- BossMod/BossModule/StateMachineBuilder.cs | 20 ++-- BossMod/Data/Actor.cs | 1 + BossMod/Debug/DebugGraphics.cs | 30 ++++-- .../Endwalker/Alliance/A30Trash/A30Trash1.cs | 100 +++++++++++++++++ .../Endwalker/Alliance/A30Trash/A30Trash2.cs | 102 ++++++++++++++++++ .../Alliance/A30TrashPack1/A30TrashPack1.cs | 70 ------------ .../A30TrashPack1/A30TrashPack1Enums.cs | 22 ---- .../Alliance/A31Thaliak/A31Thaliak.cs | 2 +- .../Alliance/A32Llymlaen/A32Llymlaen.cs | 2 +- .../Endwalker/Alliance/A33Oschon/A33Oschon.cs | 2 +- .../A34Eulogia.cs} | 8 +- .../A34EulogiaEnums.cs} | 2 +- .../A34EulogiaStates.cs} | 6 +- .../EulogiaAsAboveSoBelow.cs | 2 +- .../EulogiaByregotStrike.cs | 2 +- .../EulogiaClimbingShot.cs | 2 +- .../EulogiaFirstBlush.cs | 2 +- .../EulogiaHieroglyphika.cs | 2 +- .../EulogiaHydrostasis.cs | 2 +- .../EulogiaMatronsBreath.cs | 2 +- .../EulogiaQuintessence.cs | 2 +- .../EulogiaRadiantRhythm.cs | 2 +- .../EulogiaThousandfoldThrust.cs | 2 +- .../EulogiaTridents.cs | 2 +- .../Alliance/A34TrashPack2/A34TrashPack3.cs | 54 ---------- .../A34TrashPack2/A34TrashPack3Enums.cs | 15 --- .../Alliance/A35TrashPack3/A35TrashPack3.cs | 46 -------- .../A35TrashPack3/A35TrashPack3Enums.cs | 13 --- .../Endwalker/Unreal/Un1Ultima/Un1Ultima.cs | 2 +- .../Extreme/Ex1Ultima/Ex1Ultima.cs | 2 +- .../RealmReborn/Raid/T01Caduceus/T01ADS.cs | 2 +- BossMod/Replay/ReplayManager.cs | 60 +++++++---- .../Visualization/ReplayDetailsWindow.cs | 2 +- 33 files changed, 301 insertions(+), 284 deletions(-) create mode 100644 BossMod/Modules/Endwalker/Alliance/A30Trash/A30Trash1.cs create mode 100644 BossMod/Modules/Endwalker/Alliance/A30Trash/A30Trash2.cs delete mode 100644 BossMod/Modules/Endwalker/Alliance/A30TrashPack1/A30TrashPack1.cs delete mode 100644 BossMod/Modules/Endwalker/Alliance/A30TrashPack1/A30TrashPack1Enums.cs rename BossMod/Modules/Endwalker/Alliance/{A36Eulogia/A36Eulogia.cs => A34Eulogia/A34Eulogia.cs} (89%) rename BossMod/Modules/Endwalker/Alliance/{A36Eulogia/A36EulogiaEnums.cs => A34Eulogia/A34EulogiaEnums.cs} (99%) rename BossMod/Modules/Endwalker/Alliance/{A36Eulogia/A36EulogiaStates.cs => A34Eulogia/A34EulogiaStates.cs} (91%) rename BossMod/Modules/Endwalker/Alliance/{A36Eulogia => A34Eulogia}/EulogiaAsAboveSoBelow.cs (97%) rename BossMod/Modules/Endwalker/Alliance/{A36Eulogia => A34Eulogia}/EulogiaByregotStrike.cs (95%) rename BossMod/Modules/Endwalker/Alliance/{A36Eulogia => A34Eulogia}/EulogiaClimbingShot.cs (95%) rename BossMod/Modules/Endwalker/Alliance/{A36Eulogia => A34Eulogia}/EulogiaFirstBlush.cs (96%) rename BossMod/Modules/Endwalker/Alliance/{A36Eulogia => A34Eulogia}/EulogiaHieroglyphika.cs (97%) rename BossMod/Modules/Endwalker/Alliance/{A36Eulogia => A34Eulogia}/EulogiaHydrostasis.cs (95%) rename BossMod/Modules/Endwalker/Alliance/{A36Eulogia => A34Eulogia}/EulogiaMatronsBreath.cs (95%) rename BossMod/Modules/Endwalker/Alliance/{A36Eulogia => A34Eulogia}/EulogiaQuintessence.cs (99%) rename BossMod/Modules/Endwalker/Alliance/{A36Eulogia => A34Eulogia}/EulogiaRadiantRhythm.cs (98%) rename BossMod/Modules/Endwalker/Alliance/{A36Eulogia => A34Eulogia}/EulogiaThousandfoldThrust.cs (94%) rename BossMod/Modules/Endwalker/Alliance/{A36Eulogia => A34Eulogia}/EulogiaTridents.cs (96%) delete mode 100644 BossMod/Modules/Endwalker/Alliance/A34TrashPack2/A34TrashPack3.cs delete mode 100644 BossMod/Modules/Endwalker/Alliance/A34TrashPack2/A34TrashPack3Enums.cs delete mode 100644 BossMod/Modules/Endwalker/Alliance/A35TrashPack3/A35TrashPack3.cs delete mode 100644 BossMod/Modules/Endwalker/Alliance/A35TrashPack3/A35TrashPack3Enums.cs diff --git a/BossMod/BossModule/StateMachineBuilder.cs b/BossMod/BossModule/StateMachineBuilder.cs index 0cbd34d4a6..e198adb1dc 100644 --- a/BossMod/BossModule/StateMachineBuilder.cs +++ b/BossMod/BossModule/StateMachineBuilder.cs @@ -1,4 +1,6 @@ -namespace BossMod; +using System.Xml.Linq; + +namespace BossMod; // utility for building state machines for boss modules // conventions for id: @@ -120,24 +122,18 @@ public Phase SimplePhase(uint seqID, Action buildState, string name, float return new(phase, Module); } - // create a phase triggered by primary actor's hp reaching specific threshold - public Phase HPPercentPhase(uint seqID, Action buildState, string name, float hpThreshold, float dur = -1) - { - var phase = SimplePhase(seqID, buildState, name, dur); - phase.Raw.Update = () => Module.PrimaryActor.IsDestroyed || Module.PrimaryActor.IsDead || Module.PrimaryActor.HP.Cur < Module.PrimaryActor.HP.Max * hpThreshold; - return phase; - } - // create a phase for typical single-phase fight (triggered by primary actor dying) public Phase DeathPhase(uint seqID, Action buildState) { - return HPPercentPhase(seqID, buildState, "Boss death", 0, -1); + var phase = SimplePhase(seqID, buildState, "Boss death"); + phase.Raw.Update = () => Module.PrimaryActor.IsDestroyed || Module.PrimaryActor.IsDead || Module.PrimaryActor.HP.Cur == 0; + return phase; } // create a single-state phase; useful for modules with trivial state machines - public Phase TrivialPhase(float enrage = 10000) + public Phase TrivialPhase(uint seqID = 0, float enrage = 10000) { - return DeathPhase(0, id => { SimpleState(id, enrage, "Enrage"); }); + return DeathPhase(seqID, id => { SimpleState(id, enrage, "Enrage"); }); } // create a simple state without any actions diff --git a/BossMod/Data/Actor.cs b/BossMod/Data/Actor.cs index 6bdac82245..d03c1d8f9a 100644 --- a/BossMod/Data/Actor.cs +++ b/BossMod/Data/Actor.cs @@ -126,6 +126,7 @@ public class Actor public WPos Position => new(PosRot.X, PosRot.Z); public Angle Rotation => PosRot.W.Radians(); public bool Omnidirectional => Utils.CharacterIsOmnidirectional(OID); + public bool IsDeadOrDestroyed => IsDead || IsDestroyed; public Actor(ulong instanceID, uint oid, int spawnIndex, string name, uint nameID, ActorType type, Class classID, int level, Vector4 posRot, float hitboxRadius = 1, ActorHP hp = new(), uint mp = 0, bool targetable = true, bool ally = false, ulong ownerID = 0) { diff --git a/BossMod/Debug/DebugGraphics.cs b/BossMod/Debug/DebugGraphics.cs index 0d0c8257c7..7566cb6a08 100644 --- a/BossMod/Debug/DebugGraphics.cs +++ b/BossMod/Debug/DebugGraphics.cs @@ -14,6 +14,7 @@ private class WatchedRenderObject private bool _showGraphicsLeafCharactersOnly = true; private Dictionary _watchedRenderObjects = new(); + private bool _overlayCircle = false; private Vector2 _overlayCenter = new(100, 100); private Vector2 _overlayStep = new(2, 2); private Vector2 _overlayMaxOffset = new(20, 20); @@ -279,6 +280,7 @@ public void DrawOverlay() if (Camera.Instance == null || Service.ClientState.LocalPlayer == null) return; + ImGui.Checkbox("Circle", ref _overlayCircle); ImGui.DragFloat2("Center", ref _overlayCenter); ImGui.DragFloat2("Step", ref _overlayStep); ImGui.DragFloat2("Max offset", ref _overlayMaxOffset); @@ -286,15 +288,31 @@ public void DrawOverlay() int mx = (int)(_overlayMaxOffset.X / _overlayStep.X); int mz = (int)(_overlayMaxOffset.Y / _overlayStep.Y); float y = Service.ClientState.LocalPlayer.Position.Y; - for (int ix = -mx; ix <= mx; ++ix) + if (_overlayCircle) { - var x = _overlayCenter.X + ix * _overlayStep.X; - Camera.Instance.DrawWorldLine(new(x, y, _overlayCenter.Y - _overlayMaxOffset.Y), new(x, y, _overlayCenter.Y + _overlayMaxOffset.Y), ArenaColor.PC); + var center = new Vector3(_overlayCenter.X, y, _overlayCenter.Y); + for (int ir = 0; ir <= mx; ++ir) + { + Camera.Instance.DrawWorldCircle(center, ir * _overlayStep.X, ArenaColor.PC); + } + for (int ia = 0; ia < 8; ++ia) + { + var offset = ((ia * 22.5f.Degrees()).ToDirection() * _overlayMaxOffset.X).ToVec3(); + Camera.Instance.DrawWorldLine(center - offset, center + offset, ArenaColor.PC); + } } - for (int iz = -mz; iz <= mz; ++iz) + else { - var z = _overlayCenter.Y + iz * _overlayStep.Y; - Camera.Instance.DrawWorldLine(new(_overlayCenter.X - _overlayMaxOffset.X, y, z), new(_overlayCenter.X + _overlayMaxOffset.X, y, z), ArenaColor.PC); + for (int ix = -mx; ix <= mx; ++ix) + { + var x = _overlayCenter.X + ix * _overlayStep.X; + Camera.Instance.DrawWorldLine(new(x, y, _overlayCenter.Y - _overlayMaxOffset.Y), new(x, y, _overlayCenter.Y + _overlayMaxOffset.Y), ArenaColor.PC); + } + for (int iz = -mz; iz <= mz; ++iz) + { + var z = _overlayCenter.Y + iz * _overlayStep.Y; + Camera.Instance.DrawWorldLine(new(_overlayCenter.X - _overlayMaxOffset.X, y, z), new(_overlayCenter.X + _overlayMaxOffset.X, y, z), ArenaColor.PC); + } } } diff --git a/BossMod/Modules/Endwalker/Alliance/A30Trash/A30Trash1.cs b/BossMod/Modules/Endwalker/Alliance/A30Trash/A30Trash1.cs new file mode 100644 index 0000000000..33cd4fef7f --- /dev/null +++ b/BossMod/Modules/Endwalker/Alliance/A30Trash/A30Trash1.cs @@ -0,0 +1,100 @@ +namespace BossMod.Endwalker.Alliance.A30Trash1; + +public enum OID : uint +{ + Serpent = 0x4010, // R3.450, x6 + Triton = 0x4011, // R1.950, x0, x2 spawn during fight + DivineSprite = 0x4012, // R1.600, x0, x3 spawn during fight + WaterSprite = 0x4085, // R0.800, x0, x5 spawn during fight +} + +public enum AID : uint +{ + AutoAttack = 870, // Serpent/Triton->player, no cast, single-target + WaterIII = 35438, // Serpent->location, 4.0s cast, range 8 circle + PelagicCleaver1 = 35439, // Triton->self, 5.0s cast, range 40 60-degree cone + PelagicCleaver2 = 35852, // Triton->self, 5.0s cast, range 40 60-degree cone + WaterAutoAttack = 35469, // WaterSprite/DivineSprite->player, no cast, single-target, auto attack + WaterFlood = 35442, // WaterSprite->self, 3.0s cast, range 6 circle + WaterBurst = 35443, // WaterSprite->self, no cast, range 40 circle, raidwide when Water Sprite dies + DivineFlood = 35440, // DivineSprite->self, 3.0s cast, range 6 circle + DivineBurst = 35441, // DivineSprite->self, no cast, range 40 circle, raidwide when Divine Sprite dies +} + +class WaterIII : Components.LocationTargetedAOEs +{ + public WaterIII() : base(ActionID.MakeSpell(AID.WaterIII), 8) { } +} + +class PelagicCleaver1 : Components.SelfTargetedAOEs +{ + public PelagicCleaver1() : base(ActionID.MakeSpell(AID.PelagicCleaver1), new AOEShapeCone(40, 30.Degrees())) { } +} + +class PelagicCleaver2 : Components.SelfTargetedAOEs +{ + public PelagicCleaver2() : base(ActionID.MakeSpell(AID.PelagicCleaver2), new AOEShapeCone(40, 30.Degrees())) { } +} + +class PelagicCleaver1InterruptHint : Components.CastInterruptHint +{ + public PelagicCleaver1InterruptHint() : base(ActionID.MakeSpell(AID.PelagicCleaver1)) { } +} + +class PelagicCleaver2InterruptHint : Components.CastInterruptHint +{ + public PelagicCleaver2InterruptHint() : base(ActionID.MakeSpell(AID.PelagicCleaver2)) { } +} + +class WaterFlood : Components.SelfTargetedAOEs +{ + public WaterFlood() : base(ActionID.MakeSpell(AID.WaterFlood), new AOEShapeCircle(6)) { } +} + +class DivineFlood : Components.SelfTargetedAOEs +{ + public DivineFlood() : base(ActionID.MakeSpell(AID.DivineFlood), new AOEShapeCircle(6)) { } +} + +public class A30Trash1States : StateMachineBuilder +{ + public A30Trash1States(A30Trash1 module) : base(module) + { + TrivialPhase() + .ActivateOnEnter() + .Raw.Update = () => module.Serpents.All(e => e.IsDeadOrDestroyed); + TrivialPhase(1) + .ActivateOnEnter() + .ActivateOnEnter() + .ActivateOnEnter() + .ActivateOnEnter() + .ActivateOnEnter() + .ActivateOnEnter() + .Raw.Update = () => module.Serpents.All(e => e.IsDestroyed) && module.Tritons.All(e => e.IsDeadOrDestroyed) && module.DivineSprites.All(e => e.IsDeadOrDestroyed) && module.WaterSprites.All(e => e.IsDeadOrDestroyed); + } +} + +[ModuleInfo(BossModuleInfo.Maturity.Verified, Contributors = "Malediktus, LTS", PrimaryActorOID = (uint)OID.Serpent, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 962, NameID = 12478, SortOrder = 1)] +public class A30Trash1 : BossModule +{ + public readonly IReadOnlyList Serpents; // available from start + public readonly IReadOnlyList Tritons; // spawned after all serpents are dead + public readonly IReadOnlyList DivineSprites; // spawned after all serpents are dead + public readonly IReadOnlyList WaterSprites; // spawned after all serpents are dead + + public A30Trash1(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(-800, -800), 20)) + { + Serpents = Enemies(OID.Serpent); + Tritons = Enemies(OID.Triton); + DivineSprites = Enemies(OID.DivineSprite); + WaterSprites = Enemies(OID.WaterSprite); + } + + protected override void DrawEnemies(int pcSlot, Actor pc) + { + Arena.Actors(Serpents, ArenaColor.Enemy); + Arena.Actors(Tritons, ArenaColor.Enemy); + Arena.Actors(DivineSprites, ArenaColor.Enemy); + Arena.Actors(WaterSprites, ArenaColor.Enemy); + } +} diff --git a/BossMod/Modules/Endwalker/Alliance/A30Trash/A30Trash2.cs b/BossMod/Modules/Endwalker/Alliance/A30Trash/A30Trash2.cs new file mode 100644 index 0000000000..01d04820d0 --- /dev/null +++ b/BossMod/Modules/Endwalker/Alliance/A30Trash/A30Trash2.cs @@ -0,0 +1,102 @@ +namespace BossMod.Endwalker.Alliance.A30Trash2; + +public enum OID : uint +{ + AngelosPack1 = 0x4013, // R3.600, x1 + AngelosMikros = 0x4014, // R2.000, x8 + + AngelosPack2 = 0x40E1, // R3.600, x3 +} + +public enum AID : uint +{ + AutoAttack = 870, // AngelosPack1/AngelosMikros/AngelosPack2->player, no cast, single-target + RingOfSkylight = 35444, // AngelosPack1/AngelosPack2->self, 5.0s cast, range ?-30 donut + SkylightCross = 35445, // AngelosPack1/AngelosPack2->self, 5.0s cast, range 60 width 8 cross + Skylight = 35446, // AngelosMikros->self, 3.0s cast, range 6 circle +} + +class RingOfSkylight : Components.SelfTargetedAOEs +{ + public RingOfSkylight() : base(ActionID.MakeSpell(AID.RingOfSkylight), new AOEShapeDonut(8, 30)) { } +} + +class RingOfSkylightInterruptHint : Components.CastInterruptHint +{ + public RingOfSkylightInterruptHint() : base(ActionID.MakeSpell(AID.RingOfSkylight)) { } +} + +class SkylightCross : Components.SelfTargetedAOEs +{ + public SkylightCross() : base(ActionID.MakeSpell(AID.SkylightCross), new AOEShapeCross(60, 4)) { } +} + +class SkylightCrossInterruptHint : Components.CastInterruptHint +{ + public SkylightCrossInterruptHint() : base(ActionID.MakeSpell(AID.SkylightCross)) { } +} + +class Skylight : Components.SelfTargetedAOEs +{ + public Skylight() : base(ActionID.MakeSpell(AID.Skylight), new AOEShapeCircle(6)) { } +} + +public class A30Trash2Pack1States : StateMachineBuilder +{ + public A30Trash2Pack1States(A30Trash2Pack1 module) : base(module) + { + TrivialPhase() + .ActivateOnEnter() + .ActivateOnEnter() + .ActivateOnEnter() + .ActivateOnEnter() + .ActivateOnEnter() + .Raw.Update = () => module.PrimaryActor.IsDeadOrDestroyed && module.AngelosMikros.All(e => e.IsDeadOrDestroyed); + } +} + +[ModuleInfo(BossModuleInfo.Maturity.Verified, Contributors = "Malediktus", PrimaryActorOID = (uint)OID.AngelosPack1, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 962, NameID = 12481, SortOrder = 5)] +public class A30Trash2Pack1 : BossModule +{ + public IReadOnlyList AngelosMikros; + + public A30Trash2Pack1(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsRect(new(800, 770), 15, 25)) + { + AngelosMikros = Enemies(OID.AngelosMikros); + } + + protected override void DrawEnemies(int pcSlot, Actor pc) + { + Arena.Actor(PrimaryActor, ArenaColor.Enemy); + Arena.Actors(AngelosMikros, ArenaColor.Enemy); + } +} + +public class A30Trash2Pack2States : StateMachineBuilder +{ + public A30Trash2Pack2States(A30Trash2Pack2 module) : base(module) + { + TrivialPhase() + .ActivateOnEnter() + .ActivateOnEnter() + .ActivateOnEnter() + .ActivateOnEnter() + .Raw.Update = () => module.Angelos.All(e => e.IsDeadOrDestroyed); + } +} + +[ModuleInfo(BossModuleInfo.Maturity.Verified, Contributors = "Malediktus", PrimaryActorOID = (uint)OID.AngelosPack2, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 962, NameID = 12481, SortOrder = 6)] +public class A30Trash2Pack2 : BossModule +{ + public IReadOnlyList Angelos; + + public A30Trash2Pack2(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsSquare(new(800, 910), 20)) + { + Angelos = Enemies(OID.AngelosPack2); + } + + protected override void DrawEnemies(int pcSlot, Actor pc) + { + Arena.Actors(Angelos, ArenaColor.Enemy); + } +} diff --git a/BossMod/Modules/Endwalker/Alliance/A30TrashPack1/A30TrashPack1.cs b/BossMod/Modules/Endwalker/Alliance/A30TrashPack1/A30TrashPack1.cs deleted file mode 100644 index 38342500d6..0000000000 --- a/BossMod/Modules/Endwalker/Alliance/A30TrashPack1/A30TrashPack1.cs +++ /dev/null @@ -1,70 +0,0 @@ -namespace BossMod.Endwalker.Alliance.A30TrashPack1; - -class WaterIII : Components.LocationTargetedAOEs -{ - public WaterIII() : base(ActionID.MakeSpell(AID.WaterIII), 8) { } -} - -class PelagicCleaver1 : Components.SelfTargetedAOEs -{ - public PelagicCleaver1() : base(ActionID.MakeSpell(AID.PelagicCleaver1), new AOEShapeCone(40, 30.Degrees())) { } -} - -class PelagicCleaver2 : Components.SelfTargetedAOEs -{ - public PelagicCleaver2() : base(ActionID.MakeSpell(AID.PelagicCleaver2), new AOEShapeCone(40, 30.Degrees())) { } -} - -class PelagicCleaver1Hint : Components.CastInterruptHint -{ - public PelagicCleaver1Hint() : base(ActionID.MakeSpell(AID.PelagicCleaver1)) { } -} - -class PelagicCleaver2Hint : Components.CastInterruptHint -{ - public PelagicCleaver2Hint() : base(ActionID.MakeSpell(AID.PelagicCleaver2)) { } -} - -class WaterFlood : Components.SelfTargetedAOEs -{ - public WaterFlood() : base(ActionID.MakeSpell(AID.WaterFlood), new AOEShapeCircle(6)) { } -} - -class DivineFlood : Components.SelfTargetedAOEs -{ - public DivineFlood() : base(ActionID.MakeSpell(AID.DivineFlood), new AOEShapeCircle(6)) { } -} - -public class A30TrashPack1States : StateMachineBuilder -{ - public A30TrashPack1States(BossModule module) : base(module) - { - TrivialPhase() - .ActivateOnEnter() - .ActivateOnEnter() - .ActivateOnEnter() - .ActivateOnEnter() - .ActivateOnEnter() - .ActivateOnEnter() - .ActivateOnEnter() - .Raw.Update = () => module.Enemies(OID.Boss).All(e => e.IsDestroyed) && module.Enemies(OID.Triton).All(e => e.IsDead) && module.Enemies(OID.WaterSprite).All(e => e.IsDead) && module.Enemies(OID.WaterSprite).All(e => e.IsDead); - } -} - -[ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus, LTS", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 962, NameID = 12478)] -public class A30TrashPack1 : BossModule -{ - public A30TrashPack1(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(-800, -800), 20)) { } - - protected override void DrawEnemies(int pcSlot, Actor pc) - { - foreach (var e in Enemies(OID.Boss)) - Arena.Actor(e, ArenaColor.Enemy); - foreach (var e in Enemies(OID.Triton)) - Arena.Actor(e, ArenaColor.Enemy); - foreach (var e in Enemies(OID.DivineSprite)) - Arena.Actor(e, ArenaColor.Enemy); - foreach (var e in Enemies(OID.WaterSprite)) - Arena.Actor(e, ArenaColor.Enemy); - } -} diff --git a/BossMod/Modules/Endwalker/Alliance/A30TrashPack1/A30TrashPack1Enums.cs b/BossMod/Modules/Endwalker/Alliance/A30TrashPack1/A30TrashPack1Enums.cs deleted file mode 100644 index 1ff167e5cd..0000000000 --- a/BossMod/Modules/Endwalker/Alliance/A30TrashPack1/A30TrashPack1Enums.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace BossMod.Endwalker.Alliance.A30TrashPack1; - -public enum OID : uint -{ - Boss = 0x4010, // R3.450, x6 - Triton = 0x4011, // R1.950, x2 - DivineSprite = 0x4012, // R1.600, x3 - WaterSprite = 0x4085, // R0.800, x5 -} - -public enum AID : uint -{ - AutoAttack = 870, // Serpent/Triton->player, no cast, single-target - WaterIII = 35438, // Serpent->location, 4.0s cast, range 8 circle - PelagicCleaver1 = 35439, // Triton->self, 5.0s cast, range 40 60-degree cone - PelagicCleaver2 = 35852, // Triton->self, 5.0s cast, range 40 60-degree cone - Water = 35469, // Water Sprite/Divine Sprite->player, no cast, single-target - WaterFlood = 35442, // Water Sprite->self, 3.0s cast, range 6 circle - WaterBurst = 35443, // Water Sprite->self, no cast, range 40 circle, raidwide when Water Sprite dies - DivineFlood = 35440, // Divine Sprite->self, 3.0s cast, range 6 circle - DivineBurst = 35441, // Divine Sprite->self, no cast, range 40 circle, raidwide when Divine Sprite dies -} diff --git a/BossMod/Modules/Endwalker/Alliance/A31Thaliak/A31Thaliak.cs b/BossMod/Modules/Endwalker/Alliance/A31Thaliak/A31Thaliak.cs index 1628bff3f4..eff686ffdc 100644 --- a/BossMod/Modules/Endwalker/Alliance/A31Thaliak/A31Thaliak.cs +++ b/BossMod/Modules/Endwalker/Alliance/A31Thaliak/A31Thaliak.cs @@ -61,7 +61,7 @@ class RightBank2 : Components.SelfTargetedAOEs public RightBank2() : base(ActionID.MakeSpell(AID.RightBank2), new AOEShapeCone(60, 90.Degrees())) { } } -[ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus, LTS", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 962, NameID = 11298)] +[ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus, LTS", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 962, NameID = 11298, SortOrder = 2)] public class A31Thaliak : BossModule { public A31Thaliak(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsSquare(new(-945, 945), 24)) { } diff --git a/BossMod/Modules/Endwalker/Alliance/A32Llymlaen/A32Llymlaen.cs b/BossMod/Modules/Endwalker/Alliance/A32Llymlaen/A32Llymlaen.cs index d448cd106e..6345b763b5 100644 --- a/BossMod/Modules/Endwalker/Alliance/A32Llymlaen/A32Llymlaen.cs +++ b/BossMod/Modules/Endwalker/Alliance/A32Llymlaen/A32Llymlaen.cs @@ -65,7 +65,7 @@ class Stormwinds : Components.SpreadFromCastTargets public Stormwinds() : base(ActionID.MakeSpell(AID.StormwindsSpread), 6) { } } -[ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus, LTS", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 962, NameID = 11299)] +[ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus, LTS", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 962, NameID = 11299, SortOrder = 3)] public class A32Llymlaen : BossModule { public A32Llymlaen(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsRect(new(0, -900), 19, 29)) { } diff --git a/BossMod/Modules/Endwalker/Alliance/A33Oschon/A33Oschon.cs b/BossMod/Modules/Endwalker/Alliance/A33Oschon/A33Oschon.cs index 3f2ed292d2..5972e5083c 100644 --- a/BossMod/Modules/Endwalker/Alliance/A33Oschon/A33Oschon.cs +++ b/BossMod/Modules/Endwalker/Alliance/A33Oschon/A33Oschon.cs @@ -77,7 +77,7 @@ class DownhillBig : Components.LocationTargetedAOEs public DownhillBig() : base(ActionID.MakeSpell(AID.DownhillBig), 8) { } } -[ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus, LTS", PrimaryActorOID = (uint)OID.OschonP1, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 962, NameID = 11300)] +[ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus, LTS", PrimaryActorOID = (uint)OID.OschonP1, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 962, NameID = 11300, SortOrder = 4)] public class A33Oschon : BossModule { private Actor? _oschonP1; diff --git a/BossMod/Modules/Endwalker/Alliance/A36Eulogia/A36Eulogia.cs b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/A34Eulogia.cs similarity index 89% rename from BossMod/Modules/Endwalker/Alliance/A36Eulogia/A36Eulogia.cs rename to BossMod/Modules/Endwalker/Alliance/A34Eulogia/A34Eulogia.cs index 5ad24cad69..316ce79442 100644 --- a/BossMod/Modules/Endwalker/Alliance/A36Eulogia/A36Eulogia.cs +++ b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/A34Eulogia.cs @@ -1,4 +1,4 @@ -namespace BossMod.Endwalker.Alliance.A36Eulogia; +namespace BossMod.Endwalker.Alliance.A34Eulogia; class EudaimonEorzea : Components.RaidwideCast { @@ -46,8 +46,8 @@ class DestructiveBoltStack : Components.StackWithCastTargets public DestructiveBoltStack() : base(ActionID.MakeSpell(AID.DestructiveBoltStack), 6) { } } -[ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus, LTS", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 962, NameID = 11301)] -public class A36Eulogia : BossModule +[ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus, LTS", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 962, NameID = 11301, SortOrder = 7)] +public class A34Eulogia : BossModule { - public A36Eulogia(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(945, -945), 35)) { } + public A34Eulogia(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(945, -945), 35)) { } } diff --git a/BossMod/Modules/Endwalker/Alliance/A36Eulogia/A36EulogiaEnums.cs b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/A34EulogiaEnums.cs similarity index 99% rename from BossMod/Modules/Endwalker/Alliance/A36Eulogia/A36EulogiaEnums.cs rename to BossMod/Modules/Endwalker/Alliance/A34Eulogia/A34EulogiaEnums.cs index c3111f9196..980ed76341 100644 --- a/BossMod/Modules/Endwalker/Alliance/A36Eulogia/A36EulogiaEnums.cs +++ b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/A34EulogiaEnums.cs @@ -1,4 +1,4 @@ -namespace BossMod.Endwalker.Alliance.A36Eulogia; +namespace BossMod.Endwalker.Alliance.A34Eulogia; public enum OID : uint { diff --git a/BossMod/Modules/Endwalker/Alliance/A36Eulogia/A36EulogiaStates.cs b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/A34EulogiaStates.cs similarity index 91% rename from BossMod/Modules/Endwalker/Alliance/A36Eulogia/A36EulogiaStates.cs rename to BossMod/Modules/Endwalker/Alliance/A34Eulogia/A34EulogiaStates.cs index a7bd7b5b05..dbd231d4ce 100644 --- a/BossMod/Modules/Endwalker/Alliance/A36Eulogia/A36EulogiaStates.cs +++ b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/A34EulogiaStates.cs @@ -1,4 +1,4 @@ -namespace BossMod.Endwalker.Alliance.A36Eulogia; +namespace BossMod.Endwalker.Alliance.A34Eulogia; class ArenaChanges : BossComponent { @@ -16,9 +16,9 @@ public override void OnEventEnvControl(BossModule module, byte index, uint state } } -class A36EulogiaStates : StateMachineBuilder +class A34EulogiaStates : StateMachineBuilder { - public A36EulogiaStates(BossModule module) : base(module) + public A34EulogiaStates(BossModule module) : base(module) { TrivialPhase() .ActivateOnEnter() diff --git a/BossMod/Modules/Endwalker/Alliance/A36Eulogia/EulogiaAsAboveSoBelow.cs b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaAsAboveSoBelow.cs similarity index 97% rename from BossMod/Modules/Endwalker/Alliance/A36Eulogia/EulogiaAsAboveSoBelow.cs rename to BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaAsAboveSoBelow.cs index 69daf1bff1..898b1d9712 100644 --- a/BossMod/Modules/Endwalker/Alliance/A36Eulogia/EulogiaAsAboveSoBelow.cs +++ b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaAsAboveSoBelow.cs @@ -1,4 +1,4 @@ -namespace BossMod.Endwalker.Alliance.A36Eulogia; +namespace BossMod.Endwalker.Alliance.A34Eulogia; class AsAboveSoBelow : Components.Exaflare { diff --git a/BossMod/Modules/Endwalker/Alliance/A36Eulogia/EulogiaByregotStrike.cs b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaByregotStrike.cs similarity index 95% rename from BossMod/Modules/Endwalker/Alliance/A36Eulogia/EulogiaByregotStrike.cs rename to BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaByregotStrike.cs index ac5476a693..dbd5328c28 100644 --- a/BossMod/Modules/Endwalker/Alliance/A36Eulogia/EulogiaByregotStrike.cs +++ b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaByregotStrike.cs @@ -1,4 +1,4 @@ -namespace BossMod.Endwalker.Alliance.A36Eulogia; +namespace BossMod.Endwalker.Alliance.A34Eulogia; class ByregotStrikeJump : Components.LocationTargetedAOEs { diff --git a/BossMod/Modules/Endwalker/Alliance/A36Eulogia/EulogiaClimbingShot.cs b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaClimbingShot.cs similarity index 95% rename from BossMod/Modules/Endwalker/Alliance/A36Eulogia/EulogiaClimbingShot.cs rename to BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaClimbingShot.cs index 956ea75c0f..29a2d49bc5 100644 --- a/BossMod/Modules/Endwalker/Alliance/A36Eulogia/EulogiaClimbingShot.cs +++ b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaClimbingShot.cs @@ -1,4 +1,4 @@ -namespace BossMod.Endwalker.Alliance.A36Eulogia; +namespace BossMod.Endwalker.Alliance.A34Eulogia; class ClimbingShot : Components.Knockback { diff --git a/BossMod/Modules/Endwalker/Alliance/A36Eulogia/EulogiaFirstBlush.cs b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaFirstBlush.cs similarity index 96% rename from BossMod/Modules/Endwalker/Alliance/A36Eulogia/EulogiaFirstBlush.cs rename to BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaFirstBlush.cs index fea9668232..1f2edb6716 100644 --- a/BossMod/Modules/Endwalker/Alliance/A36Eulogia/EulogiaFirstBlush.cs +++ b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaFirstBlush.cs @@ -1,4 +1,4 @@ -namespace BossMod.Endwalker.Alliance.A36Eulogia; +namespace BossMod.Endwalker.Alliance.A34Eulogia; class FirstBlush : Components.GenericAOEs { diff --git a/BossMod/Modules/Endwalker/Alliance/A36Eulogia/EulogiaHieroglyphika.cs b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaHieroglyphika.cs similarity index 97% rename from BossMod/Modules/Endwalker/Alliance/A36Eulogia/EulogiaHieroglyphika.cs rename to BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaHieroglyphika.cs index 636fe9b699..b3038129e3 100644 --- a/BossMod/Modules/Endwalker/Alliance/A36Eulogia/EulogiaHieroglyphika.cs +++ b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaHieroglyphika.cs @@ -1,4 +1,4 @@ -namespace BossMod.Endwalker.Alliance.A36Eulogia; +namespace BossMod.Endwalker.Alliance.A34Eulogia; class Hieroglyphika : Components.GenericAOEs { diff --git a/BossMod/Modules/Endwalker/Alliance/A36Eulogia/EulogiaHydrostasis.cs b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaHydrostasis.cs similarity index 95% rename from BossMod/Modules/Endwalker/Alliance/A36Eulogia/EulogiaHydrostasis.cs rename to BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaHydrostasis.cs index 013a88b5a5..1c7c70ea97 100644 --- a/BossMod/Modules/Endwalker/Alliance/A36Eulogia/EulogiaHydrostasis.cs +++ b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaHydrostasis.cs @@ -1,4 +1,4 @@ -namespace BossMod.Endwalker.Alliance.A36Eulogia; +namespace BossMod.Endwalker.Alliance.A34Eulogia; class Hydrostasis : Components.Knockback { diff --git a/BossMod/Modules/Endwalker/Alliance/A36Eulogia/EulogiaMatronsBreath.cs b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaMatronsBreath.cs similarity index 95% rename from BossMod/Modules/Endwalker/Alliance/A36Eulogia/EulogiaMatronsBreath.cs rename to BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaMatronsBreath.cs index 6b9e10970e..13cdedf3d8 100644 --- a/BossMod/Modules/Endwalker/Alliance/A36Eulogia/EulogiaMatronsBreath.cs +++ b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaMatronsBreath.cs @@ -1,4 +1,4 @@ -namespace BossMod.Endwalker.Alliance.A36Eulogia; +namespace BossMod.Endwalker.Alliance.A34Eulogia; class MatronsBreath : Components.GenericAOEs { diff --git a/BossMod/Modules/Endwalker/Alliance/A36Eulogia/EulogiaQuintessence.cs b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaQuintessence.cs similarity index 99% rename from BossMod/Modules/Endwalker/Alliance/A36Eulogia/EulogiaQuintessence.cs rename to BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaQuintessence.cs index 08dbfc1601..f166838eec 100644 --- a/BossMod/Modules/Endwalker/Alliance/A36Eulogia/EulogiaQuintessence.cs +++ b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaQuintessence.cs @@ -1,4 +1,4 @@ -namespace BossMod.Endwalker.Alliance.A36Eulogia; +namespace BossMod.Endwalker.Alliance.A34Eulogia; class Quintessence : Components.GenericAOEs { diff --git a/BossMod/Modules/Endwalker/Alliance/A36Eulogia/EulogiaRadiantRhythm.cs b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaRadiantRhythm.cs similarity index 98% rename from BossMod/Modules/Endwalker/Alliance/A36Eulogia/EulogiaRadiantRhythm.cs rename to BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaRadiantRhythm.cs index d4a15217ea..79beba3b0a 100644 --- a/BossMod/Modules/Endwalker/Alliance/A36Eulogia/EulogiaRadiantRhythm.cs +++ b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaRadiantRhythm.cs @@ -1,4 +1,4 @@ -namespace BossMod.Endwalker.Alliance.A36Eulogia; +namespace BossMod.Endwalker.Alliance.A34Eulogia; class RadiantFlourish : Components.GenericAOEs { diff --git a/BossMod/Modules/Endwalker/Alliance/A36Eulogia/EulogiaThousandfoldThrust.cs b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaThousandfoldThrust.cs similarity index 94% rename from BossMod/Modules/Endwalker/Alliance/A36Eulogia/EulogiaThousandfoldThrust.cs rename to BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaThousandfoldThrust.cs index 15525779c1..88acbe37d9 100644 --- a/BossMod/Modules/Endwalker/Alliance/A36Eulogia/EulogiaThousandfoldThrust.cs +++ b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaThousandfoldThrust.cs @@ -1,4 +1,4 @@ -namespace BossMod.Endwalker.Alliance.A36Eulogia; +namespace BossMod.Endwalker.Alliance.A34Eulogia; class ThousandfoldThrust : Components.GenericAOEs { diff --git a/BossMod/Modules/Endwalker/Alliance/A36Eulogia/EulogiaTridents.cs b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaTridents.cs similarity index 96% rename from BossMod/Modules/Endwalker/Alliance/A36Eulogia/EulogiaTridents.cs rename to BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaTridents.cs index d4d70e13cb..09cf60493b 100644 --- a/BossMod/Modules/Endwalker/Alliance/A36Eulogia/EulogiaTridents.cs +++ b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaTridents.cs @@ -1,4 +1,4 @@ -namespace BossMod.Endwalker.Alliance.A36Eulogia; +namespace BossMod.Endwalker.Alliance.A34Eulogia; class TorrentialTridents : Components.RaidwideCastDelay { diff --git a/BossMod/Modules/Endwalker/Alliance/A34TrashPack2/A34TrashPack3.cs b/BossMod/Modules/Endwalker/Alliance/A34TrashPack2/A34TrashPack3.cs deleted file mode 100644 index fabbfe30b2..0000000000 --- a/BossMod/Modules/Endwalker/Alliance/A34TrashPack2/A34TrashPack3.cs +++ /dev/null @@ -1,54 +0,0 @@ -namespace BossMod.Endwalker.Alliance.A34TrashPack2; - -class RingOfSkylight : Components.SelfTargetedAOEs -{ - public RingOfSkylight() : base(ActionID.MakeSpell(AID.RingOfSkylight), new AOEShapeDonut(8, 30)) { } -} - -class SkylightCross : Components.SelfTargetedAOEs -{ - public SkylightCross() : base(ActionID.MakeSpell(AID.SkylightCross), new AOEShapeCross(60, 4)) { } -} - -class Skylight : Components.SelfTargetedAOEs -{ - public Skylight() : base(ActionID.MakeSpell(AID.SkylightCross), new AOEShapeCircle(6)) { } -} - -class RingOfSkylightHint : Components.CastInterruptHint -{ - public RingOfSkylightHint() : base(ActionID.MakeSpell(AID.RingOfSkylight)) { } -} - -class SkylightCrossHint : Components.CastInterruptHint -{ - public SkylightCrossHint() : base(ActionID.MakeSpell(AID.SkylightCross)) { } -} - -public class A34TrashPack2States : StateMachineBuilder -{ - public A34TrashPack2States(BossModule module) : base(module) - { - TrivialPhase() - .ActivateOnEnter() - .ActivateOnEnter() - .ActivateOnEnter() - .ActivateOnEnter() - .ActivateOnEnter() - .Raw.Update = () => module.Enemies(OID.Boss).All(e => e.IsDead) && module.Enemies(OID.AngelosMikros).All(e => e.IsDead); - } -} - -[ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 962, NameID = 12481)] -public class A34TrashPack2 : BossModule -{ - public A34TrashPack2(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsRect(new(800, 770), 15, 25)) { } - - protected override void DrawEnemies(int pcSlot, Actor pc) - { - foreach (var e in Enemies(OID.Boss)) - Arena.Actor(e, ArenaColor.Enemy); - foreach (var e in Enemies(OID.AngelosMikros)) - Arena.Actor(e, ArenaColor.Enemy); - } -} diff --git a/BossMod/Modules/Endwalker/Alliance/A34TrashPack2/A34TrashPack3Enums.cs b/BossMod/Modules/Endwalker/Alliance/A34TrashPack2/A34TrashPack3Enums.cs deleted file mode 100644 index e35a872575..0000000000 --- a/BossMod/Modules/Endwalker/Alliance/A34TrashPack2/A34TrashPack3Enums.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace BossMod.Endwalker.Alliance.A34TrashPack2; - -public enum OID : uint -{ - Boss = 0x4013, // R=3.6 - AngelosMikros = 0x4014, // R=2.0 -}; - -public enum AID : uint -{ - AutoAttack = 870, // 4014/4013->player, no cast, single-target - Skylight = 35446, // 4014->self, 3,0s cast, range 6 circle - SkylightCross = 35445, // 4013->self, 5,0s cast, range 60 width 8 cross - RingOfSkylight = 35444, // 4013->self, 5,0s cast, range ?-30 donut -}; diff --git a/BossMod/Modules/Endwalker/Alliance/A35TrashPack3/A35TrashPack3.cs b/BossMod/Modules/Endwalker/Alliance/A35TrashPack3/A35TrashPack3.cs deleted file mode 100644 index 2e0fb82208..0000000000 --- a/BossMod/Modules/Endwalker/Alliance/A35TrashPack3/A35TrashPack3.cs +++ /dev/null @@ -1,46 +0,0 @@ -namespace BossMod.Endwalker.Alliance.A35TrashPack3; - -class RingOfSkylight : Components.SelfTargetedAOEs -{ - public RingOfSkylight() : base(ActionID.MakeSpell(AID.RingOfSkylight), new AOEShapeDonut(8, 30)) { } -} - -class SkylightCross : Components.SelfTargetedAOEs -{ - public SkylightCross() : base(ActionID.MakeSpell(AID.SkylightCross), new AOEShapeCross(60, 4)) { } -} - -class RingOfSkylightHint : Components.CastInterruptHint -{ - public RingOfSkylightHint() : base(ActionID.MakeSpell(AID.RingOfSkylight)) { } -} - -class SkylightCrossHint : Components.CastInterruptHint -{ - public SkylightCrossHint() : base(ActionID.MakeSpell(AID.SkylightCross)) { } -} - -public class A35TrashPack2States : StateMachineBuilder -{ - public A35TrashPack2States(BossModule module) : base(module) - { - TrivialPhase() - .ActivateOnEnter() - .ActivateOnEnter() - .ActivateOnEnter() - .ActivateOnEnter() - .Raw.Update = () => module.Enemies(OID.Boss).All(e => e.IsDead); - } -} - -[ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 962, NameID = 12481)] -public class A35TrashPack2 : BossModule -{ - public A35TrashPack2(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsSquare(new(800, 910), 20)) { } - - protected override void DrawEnemies(int pcSlot, Actor pc) - { - foreach (var e in Enemies(OID.Boss)) - Arena.Actor(e, ArenaColor.Enemy); - } -} diff --git a/BossMod/Modules/Endwalker/Alliance/A35TrashPack3/A35TrashPack3Enums.cs b/BossMod/Modules/Endwalker/Alliance/A35TrashPack3/A35TrashPack3Enums.cs deleted file mode 100644 index 2a2be3bafb..0000000000 --- a/BossMod/Modules/Endwalker/Alliance/A35TrashPack3/A35TrashPack3Enums.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace BossMod.Endwalker.Alliance.A35TrashPack3; - -public enum OID : uint -{ - Boss = 0x40E1, // R=3.6 -}; - -public enum AID : uint -{ - AutoAttack = 870, // 40E1->player, no cast, single-target - SkylightCross = 35445, // 40E1->self, 5,0s cast, range 60 width 8 cross - RingOfSkylight = 35444, // 40E1->self, 5,0s cast, range ?-30 donut -}; diff --git a/BossMod/Modules/Endwalker/Unreal/Un1Ultima/Un1Ultima.cs b/BossMod/Modules/Endwalker/Unreal/Un1Ultima/Un1Ultima.cs index f8693d524d..3733b0499a 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un1Ultima/Un1Ultima.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un1Ultima/Un1Ultima.cs @@ -25,7 +25,7 @@ public class Un1UltimaStates : StateMachineBuilder public Un1UltimaStates(BossModule module) : base(module) { // TODO: reconsider - TrivialPhase(600) + TrivialPhase(0, 600) .ActivateOnEnter() .ActivateOnEnter() .ActivateOnEnter() diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/Ex1Ultima.cs b/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/Ex1Ultima.cs index c1a2058fa9..4918831167 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/Ex1Ultima.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/Ex1Ultima.cs @@ -46,7 +46,7 @@ public Ex1UltimaStates(BossModule module) : base(module) // garuda end is PATE 0655 on UltimaGaruda // titan end is PATE 0656 on UltimaTitan // ifrit end is PATE 0657 on UltimaIfrit - TrivialPhase(600) + TrivialPhase(0, 600) .ActivateOnEnter() .ActivateOnEnter() .ActivateOnEnter() diff --git a/BossMod/Modules/RealmReborn/Raid/T01Caduceus/T01ADS.cs b/BossMod/Modules/RealmReborn/Raid/T01Caduceus/T01ADS.cs index 80b73ecc0c..1f4984ed11 100644 --- a/BossMod/Modules/RealmReborn/Raid/T01Caduceus/T01ADS.cs +++ b/BossMod/Modules/RealmReborn/Raid/T01Caduceus/T01ADS.cs @@ -57,7 +57,7 @@ public T01ADSStates(BossModule module) : base(module) { // adds spawn: at ~40.3, ~80.3, ~120.3, ~160.3, ~200.3 (2x) // enrage: first cast at ~245.2, then repeat every 5s - TrivialPhase(245) + TrivialPhase(0, 245) .ActivateOnEnter() .ActivateOnEnter() .ActivateOnEnter() diff --git a/BossMod/Replay/ReplayManager.cs b/BossMod/Replay/ReplayManager.cs index c65008a8ad..b08454a78a 100644 --- a/BossMod/Replay/ReplayManager.cs +++ b/BossMod/Replay/ReplayManager.cs @@ -256,30 +256,50 @@ private void DrawNewEntry() if (ImGui.Button("Analyze all")) { var analysis = new AnalysisEntry(_path); - try - { - var di = new DirectoryInfo(_path); - var pattern = "*.log"; - if (!di.Exists && (di.Parent?.Exists ?? false)) - { - pattern = di.Name; - di = di.Parent; - } - foreach (var fi in di.EnumerateFiles(pattern, new EnumerationOptions { RecurseSubdirectories = true })) - { - var r = new ReplayEntry(fi.FullName, false); - _replayEntries.Add(r); - analysis.Replays.Add(r); - } - } - catch (Exception e) - { - Service.Log($"Failed to read {_path}: {e}"); - } + analysis.Replays.AddRange(LoadAll(_path)); if (analysis.Replays.Count > 0) _analysisEntries.Add(analysis); } } + ImGui.SameLine(); + using (ImRaii.Disabled(_path.Length == 0)) + { + if (ImGui.Button("Load all")) + { + LoadAll(_path); + } + } + } + + private List LoadAll(string path) + { + try + { + var res = new List(); + var di = new DirectoryInfo(path); + var pattern = "*.log"; + if (!di.Exists && (di.Parent?.Exists ?? false)) + { + pattern = di.Name; + di = di.Parent; + } + foreach (var fi in di.EnumerateFiles(pattern, new EnumerationOptions { RecurseSubdirectories = true })) + { + var r = _replayEntries.Find(e => e.Path == fi.FullName); + if (r == null) + { + r = new ReplayEntry(fi.FullName, false); + _replayEntries.Add(r); + } + res.Add(r); + } + return res; + } + catch (Exception e) + { + Service.Log($"Failed to read {path}: {e}"); + return new(); + } } private void ConvertLog(Replay r, ReplayLogFormat format) diff --git a/BossMod/Replay/Visualization/ReplayDetailsWindow.cs b/BossMod/Replay/Visualization/ReplayDetailsWindow.cs index 26a89eb81e..6d009995a9 100644 --- a/BossMod/Replay/Visualization/ReplayDetailsWindow.cs +++ b/BossMod/Replay/Visualization/ReplayDetailsWindow.cs @@ -275,7 +275,7 @@ private void DrawEnemyTables() if (_mgr.ActiveModule == null) return; - DrawEnemyTable(_mgr.ActiveModule.PrimaryActor.OID, new Actor[] { _mgr.ActiveModule.PrimaryActor }); + DrawEnemyTable(_mgr.ActiveModule.PrimaryActor.OID, _mgr.ActiveModule.RelevantEnemies.GetValueOrDefault(_mgr.ActiveModule.PrimaryActor.OID) ?? [_mgr.ActiveModule.PrimaryActor]); foreach ((var oid, var list) in _mgr.ActiveModule.RelevantEnemies) { if (oid != _mgr.ActiveModule.PrimaryActor.OID) From b703a474963511e23801beee2f5bf9478fd5a0e7 Mon Sep 17 00:00:00 2001 From: Andrew Gilewsky Date: Sun, 7 Apr 2024 22:58:28 +0100 Subject: [PATCH 03/18] Get rid of semicolons after enum definitions. --- .../Endwalker/Alliance/A10Lions/A10LionsEnums.cs | 6 +++--- .../A10RhalgrEmissary/A10RhalgrEmissaryEnums.cs | 4 ++-- .../Endwalker/Alliance/A11Byregot/A11ByregotEnums.cs | 4 ++-- .../Endwalker/Alliance/A12Rhalgr/A12RhalgrEnums.cs | 4 ++-- .../Endwalker/Alliance/A13Azeyma/A13AzeymaEnums.cs | 4 ++-- .../Endwalker/Alliance/A14Naldthal/A14NaldthalEnums.cs | 4 ++-- .../Endwalker/Alliance/A21Nophica/A21NophicaEnums.cs | 8 ++++---- .../Alliance/A22AlthykNymeia/A22AlthykNymeiaEnums.cs | 10 +++++----- .../Endwalker/Alliance/A23Halone/A23HaloneEnums.cs | 6 +++--- .../Endwalker/Alliance/A24Menphina/A24MenphinaEnums.cs | 8 ++++---- .../Endwalker/Alliance/A31Thaliak/A31ThaliakEnums.cs | 8 ++++---- .../Endwalker/Alliance/A32Llymlaen/A32LlymlaenEnum.cs | 4 ++-- .../Endwalker/Alliance/A33Oschon/A33OschonEnum.cs | 6 +++--- .../Endwalker/Alliance/A34Eulogia/A34EulogiaEnums.cs | 10 +++++----- .../Endwalker/Criterion/C01ASS/C010Trash/C010Armor.cs | 4 ++-- .../Criterion/C01ASS/C010Trash/C010Belladonna.cs | 4 ++-- .../Endwalker/Criterion/C01ASS/C010Trash/C010Dryad.cs | 4 ++-- .../Criterion/C01ASS/C010Trash/C010Dullahan.cs | 4 ++-- .../Endwalker/Criterion/C01ASS/C010Trash/C010Kaluk.cs | 4 ++-- .../Criterion/C01ASS/C010Trash/C010Udumbara.cs | 4 ++-- .../Criterion/C01ASS/C011Silkie/C011SilkieEnums.cs | 6 +++--- .../C01ASS/C012Gladiator/C012GladiatorEnums.cs | 6 +++--- .../C01ASS/C013Shadowcaster/C013ShadowcasterEnums.cs | 6 +++--- .../Endwalker/Criterion/C02AMR/C020Trash/C020Trash1.cs | 4 ++-- .../Endwalker/Criterion/C02AMR/C020Trash/C020Trash2.cs | 4 ++-- .../Criterion/C02AMR/C021Shishio/C021ShishioEnums.cs | 6 +++--- .../Criterion/C02AMR/C022Gorai/C022GoraiEnums.cs | 10 +++++----- .../Criterion/C02AMR/C023Moko/C023MokoEnums.cs | 8 ++++---- .../Endwalker/Criterion/C03AAI/C030Trash/C030Trash1.cs | 4 ++-- .../Endwalker/Criterion/C03AAI/C030Trash/C030Trash2.cs | 4 ++-- .../Criterion/C03AAI/C031Ketuduke/C031KetudukeEnums.cs | 8 ++++---- .../Criterion/C03AAI/C032Lala/C032LalaEnums.cs | 10 +++++----- .../Criterion/C03AAI/C033Statice/C033StaticeEnums.cs | 10 +++++----- .../DeepDungeon/EurekaOrthos/DD30TiamatsClone.cs | 6 +++--- .../Endwalker/DeepDungeon/EurekaOrthos/DD70Aeturna.cs | 8 ++++---- .../Endwalker/Dungeon/D01TowerOfZot/D011Minduruva.cs | 6 +++--- .../Endwalker/Dungeon/D01TowerOfZot/D012Sanduruva.cs | 6 +++--- .../Dungeon/D01TowerOfZot/D013MagusSisters.cs | 6 +++--- .../Dungeon/D11LapisManalis/D110AlbusGriffin.cs | 2 +- .../Dungeon/D11LapisManalis/D110CaladriusMaturus.cs | 2 +- .../Endwalker/Dungeon/D11LapisManalis/D111Albion.cs | 4 ++-- .../Dungeon/D11LapisManalis/D112GalateaMagna.cs | 6 +++--- .../Endwalker/Dungeon/D11LapisManalis/D113Cagnazzo.cs | 8 ++++---- .../Endwalker/Dungeon/D12Aetherfont/D121Lyngbakr.cs | 4 ++-- .../Endwalker/Dungeon/D12Aetherfont/D122Arkas.cs | 6 +++--- .../Endwalker/Dungeon/D12Aetherfont/D123Octomammoth.cs | 4 ++-- .../Dungeon/D13LunarSubterrane/D131DarkElf.cs | 6 +++--- .../Dungeon/D13LunarSubterrane/D132DamcyanAntilon.cs | 4 ++-- .../Dungeon/D13LunarSubterrane/D133Durante.cs | 4 ++-- .../Endwalker/Extreme/Ex1Zodiark/Ex1ZodiarkEnums.cs | 6 +++--- .../Modules/Endwalker/Extreme/Ex1Zodiark/Paradeigma.cs | 2 +- .../Endwalker/Extreme/Ex2Hydaelyn/Ex2HydaelynEnums.cs | 4 ++-- .../Extreme/Ex3Endsinger/Ex3EndsingerEnums.cs | 4 ++-- .../Extreme/Ex3Endsinger/TwinsongAporrhoia.cs | 2 +- .../Extreme/Ex4Barbariccia/Ex4BarbaricciaEnums.cs | 8 ++++---- .../Extreme/Ex5Rubicante/Ex5RubicanteEnums.cs | 10 +++++----- .../Endwalker/Extreme/Ex6Golbez/Ex6GolbezEnums.cs | 10 +++++----- .../Endwalker/Extreme/Ex7Zeromus/Ex7ZeromusEnums.cs | 10 +++++----- BossMod/Modules/Endwalker/FATE/Chi.cs | 4 ++-- BossMod/Modules/Endwalker/FATE/Daivadipa.cs | 6 +++--- BossMod/Modules/Endwalker/Hunt/RankA/Aegeiros.cs | 4 ++-- BossMod/Modules/Endwalker/Hunt/RankA/ArchEta.cs | 4 ++-- BossMod/Modules/Endwalker/Hunt/RankA/FanAil.cs | 4 ++-- BossMod/Modules/Endwalker/Hunt/RankA/Gurangatch.cs | 4 ++-- BossMod/Modules/Endwalker/Hunt/RankA/Hulder.cs | 2 +- .../Modules/Endwalker/Hunt/RankA/LunatenderQueen.cs | 4 ++-- BossMod/Modules/Endwalker/Hunt/RankA/Minerva.cs | 2 +- BossMod/Modules/Endwalker/Hunt/RankA/MoussePrincess.cs | 4 ++-- BossMod/Modules/Endwalker/Hunt/RankA/Petalodus.cs | 2 +- BossMod/Modules/Endwalker/Hunt/RankA/Storsie.cs | 2 +- BossMod/Modules/Endwalker/Hunt/RankA/Sugriva.cs | 2 +- BossMod/Modules/Endwalker/Hunt/RankA/Yilan.cs | 4 ++-- BossMod/Modules/Endwalker/Hunt/RankS/Armstrong.cs | 4 ++-- BossMod/Modules/Endwalker/Hunt/RankS/Burfurlur.cs | 4 ++-- BossMod/Modules/Endwalker/Hunt/RankS/Ker.cs | 6 +++--- BossMod/Modules/Endwalker/Hunt/RankS/KerShroud.cs | 4 ++-- BossMod/Modules/Endwalker/Hunt/RankS/NarrowRift.cs | 6 +++--- BossMod/Modules/Endwalker/Hunt/RankS/Ophioneus.cs | 4 ++-- BossMod/Modules/Endwalker/Hunt/RankS/Ruminator.cs | 4 ++-- BossMod/Modules/Endwalker/Hunt/RankS/Sphatika.cs | 6 +++--- .../Endwalker/Quest/Endwalker/EndwalkerEnums.cs | 6 +++--- .../Savage/P10SPandaemonium/P10SPandaemoniumEnums.cs | 10 +++++----- .../Endwalker/Savage/P11SThemis/P11SThemisEnums.cs | 8 ++++---- .../Endwalker/Savage/P12S1Athena/P12S1AthenaEnums.cs | 10 +++++----- .../Savage/P12S2PallasAthena/P12S2PallasAthenaEnums.cs | 10 +++++----- .../Endwalker/Savage/P1SErichthonios/P1SEnums.cs | 4 ++-- .../Endwalker/Savage/P2SHippokampos/P2SEnums.cs | 4 ++-- .../Endwalker/Savage/P2SHippokampos/SewageDeluge.cs | 2 +- .../Modules/Endwalker/Savage/P3SPhoinix/P3SEnums.cs | 4 ++-- .../Modules/Endwalker/Savage/P4S1Hesperos/P4S1Enums.cs | 4 ++-- .../Modules/Endwalker/Savage/P4S2Hesperos/P4S2Enums.cs | 4 ++-- .../Endwalker/Savage/P5SProtoCarbuncle/P5SEnums.cs | 4 ++-- .../Modules/Endwalker/Savage/P6SHegemone/P6SEnums.cs | 10 +++++----- .../Modules/Endwalker/Savage/P7SAgdistis/P7SEnums.cs | 8 ++++---- .../Endwalker/Savage/P8S1Hephaistos/P8S1Enums.cs | 6 +++--- .../Endwalker/Savage/P8S2Hephaistos/P8S2Enums.cs | 6 +++--- .../Endwalker/Savage/P9SKokytos/P9SKokytosEnums.cs | 6 +++--- .../TreasureHunt/TheExcitatron6000/LuckyFace.cs | 6 +++--- .../TheShiftingGymnasionAgonon/GymnasiouAcheloios.cs | 6 +++--- .../TheShiftingGymnasionAgonon/GymnasiouLeon.cs | 4 ++-- .../TheShiftingGymnasionAgonon/GymnasiouMandragoras.cs | 4 ++-- .../TheShiftingGymnasionAgonon/GymnasiouMegakantha.cs | 4 ++-- .../TheShiftingGymnasionAgonon/GymnasiouMeganereis.cs | 4 ++-- .../TheShiftingGymnasionAgonon/GymnasiouPithekos.cs | 6 +++--- .../TheShiftingGymnasionAgonon/GymnasiouSatyros.cs | 4 ++-- .../TheShiftingGymnasionAgonon/GymnasiouSphinx.cs | 4 ++-- .../GymnasiouStyphnolobion.cs | 4 ++-- .../TheShiftingGymnasionAgonon/GymnasiouTigris.cs | 4 ++-- .../TheShiftingGymnasionAgonon/GymnasiouTriton.cs | 4 ++-- .../TheShiftingGymnasionAgonon/LampasChrysine.cs | 4 ++-- .../TheShiftingGymnasionAgonon/LyssaChrysine.cs | 4 ++-- .../TheShiftingGymnasionAgonon/Narkissos.cs | 6 +++--- .../Endwalker/Trial/T02Hydaelyn/T02HydaelynEnums.cs | 6 +++--- BossMod/Modules/Endwalker/Trial/T08Asura/T08Enums.cs | 4 ++-- BossMod/Modules/Endwalker/Ultimate/DSW1/DSW1Enums.cs | 4 ++-- BossMod/Modules/Endwalker/Ultimate/DSW2/DSW2Enums.cs | 4 ++-- BossMod/Modules/Endwalker/Ultimate/TOP/TOPEnums.cs | 10 +++++----- .../Endwalker/Unreal/Un1Ultima/Un1UltimaEnums.cs | 4 ++-- .../Endwalker/Unreal/Un2Sephirot/Un2SephirotEnums.cs | 8 ++++---- .../Endwalker/Unreal/Un3Sophia/Un3SophiaEnums.cs | 6 +++--- .../Endwalker/Unreal/Un4Zurvan/Un4ZurvanEnums.cs | 8 ++++---- .../Endwalker/Unreal/Un5Thordan/Un5ThordanEnums.cs | 10 +++++----- .../GoldSaucer/TheSliceIsRight/TheSliceIsRight.cs | 4 ++-- .../Stage01AllsWellThatStartsWell/Stage01.cs | 4 ++-- .../Stage02MuchAdoAboutPudding/Stage02Act1.cs | 4 ++-- .../Stage02MuchAdoAboutPudding/Stage02Act2.cs | 4 ++-- .../MaskedCarnivale/Stage03WaitingForGolem/Stage03.cs | 4 ++-- .../Stage04GentlemanPreferSwords/Stage04Act1.cs | 4 ++-- .../Stage04GentlemanPreferSwords/Stage04Act2.cs | 4 ++-- .../Stage05TheThreepennyTurtles/Stage05.cs | 2 +- .../MaskedCarnivale/Stage06EyeSociety/Stage06Act1.cs | 6 +++--- .../MaskedCarnivale/Stage06EyeSociety/Stage06Act2.cs | 6 +++--- .../MaskedCarnivale/Stage07AChorusSlime/Stage07Act1.cs | 4 ++-- .../MaskedCarnivale/Stage07AChorusSlime/Stage07Act2.cs | 4 ++-- .../MaskedCarnivale/Stage07AChorusSlime/Stage07Act3.cs | 4 ++-- .../Stage08BombedyOfErrors/Stage08Act1.cs | 4 ++-- .../Stage08BombedyOfErrors/Stage08Act2.cs | 4 ++-- .../Stage09ToKillAMockingslime/Stage09.cs | 4 ++-- .../Stage10ALittleKnightMusic/Stage10.cs | 4 ++-- .../Stage11SomeLikeItExcruciatinglyHot/Stage11Act1.cs | 4 ++-- .../Stage11SomeLikeItExcruciatinglyHot/Stage11Act2.cs | 4 ++-- .../Stage12ThePlantomOfTheOpera/Stage12Act1.cs | 4 ++-- .../Stage12ThePlantomOfTheOpera/Stage12Act2.cs | 4 ++-- .../Stage13BeautyAndABeast/Stage13Act1.cs | 4 ++-- .../Stage13BeautyAndABeast/Stage13Act2.cs | 4 ++-- .../Stage14BlobsInTheWoods/Stage14Act1.cs | 4 ++-- .../Stage14BlobsInTheWoods/Stage14Act2.cs | 4 ++-- .../MaskedCarnivale/Stage15TheMeNobodyNodes/Stage15.cs | 4 ++-- .../Stage16SunsetBullevard/Stage16Act1.cs | 4 ++-- .../Stage16SunsetBullevard/Stage16Act2.cs | 4 ++-- .../Stage17TheSwordOfMusic/Stage17Act1.cs | 4 ++-- .../Stage17TheSwordOfMusic/Stage17Act2.cs | 4 ++-- .../Stage18MidsummerNightsExplosion/Stage18Act1.cs | 4 ++-- .../Stage18MidsummerNightsExplosion/Stage18Act2.cs | 4 ++-- .../Stage19Act1.cs | 6 +++--- .../Stage19Act2.cs | 6 +++--- .../MaskedCarnivale/Stage20MissTyphon/Stage20Act1.cs | 4 ++-- .../MaskedCarnivale/Stage20MissTyphon/Stage20Act2.cs | 4 ++-- .../MaskedCarnivale/Stage20MissTyphon/Stage20Act3.cs | 4 ++-- .../Stage21ChimeraOnAHotTinRoof/Stage21Act1.cs | 4 ++-- .../Stage21ChimeraOnAHotTinRoof/Stage21Act2.cs | 4 ++-- .../Stage22HereComesTheBoom/Stage22Act1.cs | 4 ++-- .../Stage22HereComesTheBoom/Stage22Act2.cs | 4 ++-- .../Stage23BehemothsAndBroomsticks/Stage23.cs | 4 ++-- .../Stage24AmazingTechnicolorPitFiends/Stage24Act1.cs | 4 ++-- .../Stage24AmazingTechnicolorPitFiends/Stage24Act2.cs | 4 ++-- .../Stage24AmazingTechnicolorPitFiends/Stage24Act3.cs | 4 ++-- .../Stage25DirtyRottenAzulmagia/Stage25Act1.cs | 6 +++--- .../Stage25DirtyRottenAzulmagia/Stage25Act2.cs | 6 +++--- .../Stage25DirtyRottenAzulmagia/Stage25Act3.cs | 6 +++--- .../MaskedCarnivale/Stage26PapaMia/Stage26Act1.cs | 6 +++--- .../MaskedCarnivale/Stage26PapaMia/Stage26Act2.cs | 8 ++++---- .../Stage27LockUpYourSnorters/Stage27.cs | 4 ++-- .../Modules/Global/PVP/HiddenGorge/GoblinMercenary.cs | 6 +++--- BossMod/Modules/Global/Quest/FF15Collab/Garuda.cs | 2 +- BossMod/Modules/Global/Quest/FF15Collab/Iseultalon.cs | 4 ++-- BossMod/Modules/Global/Quest/FF15Collab/MA-x.cs | 2 +- .../Global/Quest/FF16Collab/InfernalShadowEnums.cs | 2 +- .../DeepDungeon/PalaceOfTheDead/D60TheBlackRider.cs | 4 ++-- .../DeepDungeon/PalaceOfTheDead/D70Yaquaru.cs | 4 ++-- .../DeepDungeon/PalaceOfTheDead/D80Gudanna.cs | 4 ++-- .../RealmReborn/Dungeon/D03Copperbell/D031Kottos.cs | 2 +- .../Dungeon/D03Copperbell/D032IchorousIre.cs | 2 +- .../RealmReborn/Dungeon/D03Copperbell/D033Gyges.cs | 2 +- .../RealmReborn/Dungeon/D05Totorak/D053Graffias.cs | 4 ++-- .../RealmReborn/Dungeon/D06Haukke/D061ManorClaviger.cs | 4 ++-- .../RealmReborn/Dungeon/D06Haukke/D063LadyAmandine.cs | 4 ++-- .../RealmReborn/Dungeon/D07Brayflox/D074Aiatar.cs | 4 ++-- .../RealmReborn/Dungeon/D08Qarn/D081Teratotaur.cs | 6 +++--- .../RealmReborn/Dungeon/D08Qarn/D082TempleGuardian.cs | 4 ++-- .../RealmReborn/Dungeon/D08Qarn/D083Adjudicator.cs | 4 ++-- .../Dungeon/D09Cutter/D092GiantTunnelWorm.cs | 4 ++-- .../RealmReborn/Dungeon/D09Cutter/D093Chimera.cs | 4 ++-- .../RealmReborn/Dungeon/D10StoneVigil/D101ChudoYudo.cs | 4 ++-- .../RealmReborn/Dungeon/D10StoneVigil/D102Koshchei.cs | 4 ++-- .../RealmReborn/Dungeon/D10StoneVigil/D103Isgebind.cs | 4 ++-- .../Dungeon/D11DzemaelDarkhold/D111AllSeeingEye.cs | 6 +++--- .../Dungeon/D11DzemaelDarkhold/D113Batraal.cs | 4 ++-- .../RealmReborn/Dungeon/D12AurumVale/D121Locksmith.cs | 4 ++-- .../Dungeon/D12AurumVale/D122Coincounter.cs | 4 ++-- .../Dungeon/D12AurumVale/D123MisersMistress.cs | 4 ++-- .../Dungeon/D13CastrumMeridianum/D131BlackEft.cs | 4 ++-- .../D13CastrumMeridianum/D132MagitekVanguardF1.cs | 4 ++-- .../Dungeon/D13CastrumMeridianum/D133Livia.cs | 4 ++-- .../RealmReborn/Dungeon/D14Praetorium/D141Colossus.cs | 4 ++-- .../RealmReborn/Dungeon/D14Praetorium/D142Nero.cs | 4 ++-- .../RealmReborn/Dungeon/D14Praetorium/D143Gaius.cs | 4 ++-- .../Dungeon/D15WanderersPalace/D151KeeperOfHalidom.cs | 4 ++-- .../Dungeon/D15WanderersPalace/D152GiantBavarois.cs | 6 +++--- .../Dungeon/D15WanderersPalace/D153TonberryKing.cs | 6 +++--- .../RealmReborn/Dungeon/D16Amdapor/D161Psycheflayer.cs | 4 ++-- .../RealmReborn/Dungeon/D16Amdapor/D162DemonWall.cs | 4 ++-- .../RealmReborn/Dungeon/D16Amdapor/D163Anantaboga.cs | 6 +++--- .../RealmReborn/Extreme/Ex1Ultima/Ex1UltimaEnums.cs | 4 ++-- .../RealmReborn/Extreme/Ex2Garuda/Ex2GarudaEnums.cs | 6 +++--- .../RealmReborn/Extreme/Ex3Titan/Ex3TitanEnums.cs | 8 ++++---- .../RealmReborn/Extreme/Ex4Ifrit/Ex4IfritEnums.cs | 6 +++--- BossMod/Modules/RealmReborn/Raid/T01Caduceus/T01ADS.cs | 4 ++-- .../RealmReborn/Raid/T01Caduceus/T01Caduceus.cs | 6 +++--- .../RealmReborn/Raid/T02MultiADS/T02MultiADS.cs | 6 +++--- .../RealmReborn/Raid/T04Gauntlet/T04Gauntlet.cs | 4 ++-- .../RealmReborn/Raid/T05Twintania/T05Twintania.cs | 6 +++--- .../Modules/RealmReborn/Trial/T01IfritN/T01IfritN.cs | 4 ++-- .../Modules/RealmReborn/Trial/T02TitanN/T02TitanN.cs | 4 ++-- .../Modules/RealmReborn/Trial/T03GarudaN/T03GarudaN.cs | 4 ++-- .../Trial/T04PortaDecumana/T04PortaDecumana1.cs | 6 +++--- .../Trial/T04PortaDecumana/T04PortaDecumana2.cs | 4 ++-- .../Modules/RealmReborn/Trial/T05IfritH/T05IfritH.cs | 4 ++-- .../Modules/RealmReborn/Trial/T06GarudaH/T06GarudaH.cs | 6 +++--- .../Modules/RealmReborn/Trial/T07TitanH/T07TitanH.cs | 4 ++-- .../RealmReborn/Trial/T08ThornmarchH/T08ThornmarchH.cs | 4 ++-- .../Trial/T09WhorleaterH/T09WhorleaterHEnums.cs | 6 +++--- .../Dungeon/D01Holminster/D011ForgivenDissonance.cs | 4 ++-- .../Dungeon/D01Holminster/D012TesleentheForgiven.cs | 6 +++--- .../Shadowbringers/Dungeon/D01Holminster/D013Philia.cs | 8 ++++---- .../Dungeon/D03QitanaRavel/D030RonkanDreamer.cs | 4 ++-- .../Dungeon/D03QitanaRavel/D031Lozatl.cs | 2 +- .../Dungeon/D03QitanaRavel/D032Batsquatch.cs | 2 +- .../Shadowbringers/Dungeon/D03QitanaRavel/D033Eros.cs | 6 +++--- .../Dungeon/D05MtGulg/D050ForgivenPrejudice.cs | 2 +- .../Dungeon/D05MtGulg/D051ForgivenCruelty.cs | 2 +- .../Dungeon/D05MtGulg/D052ForgivenApathy.cs | 2 +- .../Dungeon/D05MtGulg/D053ForgivenWhimsy.cs | 2 +- .../Dungeon/D05MtGulg/D054ForgivenRevelry.cs | 2 +- .../Dungeon/D05MtGulg/D055ForgivenObscenity.cs | 2 +- BossMod/Modules/Shadowbringers/FATE/Archaeotania.cs | 6 +++--- BossMod/Modules/Shadowbringers/FATE/Formidable.cs | 8 ++++---- .../Foray/CriticalEngagement/CE11ShadowOfDeathHand.cs | 4 ++-- .../Foray/CriticalEngagement/CE12BayingOfHounds.cs | 4 ++-- .../Foray/CriticalEngagement/CE13KillItWithFire.cs | 6 +++--- .../Foray/CriticalEngagement/CE14VigilForLost.cs | 4 ++-- .../Foray/CriticalEngagement/CE21FinalFurlong.cs | 6 +++--- .../Foray/CriticalEngagement/CE31MetalFoxChaos.cs | 4 ++-- .../CriticalEngagement/CE41WithDiremiteAndMain.cs | 6 +++--- .../Foray/CriticalEngagement/CE42FromBeyondTheGrave.cs | 6 +++--- .../Foray/CriticalEngagement/CE44FamiliarFace.cs | 4 ++-- .../Foray/CriticalEngagement/CE51ThereWouldBeBlood.cs | 4 ++-- .../Foray/CriticalEngagement/CE52TimeToBurn.cs | 4 ++-- .../CriticalEngagement/CE53HereComesTheCavalry.cs | 6 +++--- .../Foray/CriticalEngagement/CE54NeverCryWolf.cs | 4 ++-- .../Foray/CriticalEngagement/CE62LooksToDieFor.cs | 4 ++-- .../Foray/CriticalEngagement/CE63WornToShadow.cs | 8 ++++---- .../Foray/CriticalEngagement/CE64FeelingTheBurn.cs | 8 ++++---- .../DelubrumReginae/DRS1TrinitySeeker/DRS1Enums.cs | 10 +++++----- .../DRS2StygimolochWarrior/DRS2Enums.cs | 8 ++++---- .../DRS2StygimolochWarrior/Entrapment.cs | 2 +- .../Foray/DelubrumReginae/DRS3Dahu/DRS3Enums.cs | 6 +++--- .../Foray/DelubrumReginae/DRS4QueensGuard/DRS4Enums.cs | 10 +++++----- .../Foray/DelubrumReginae/DRS5Phantom/DRS5Enums.cs | 4 ++-- .../DelubrumReginae/DRS6TrinityAvowed/DRS6Enums.cs | 6 +++--- .../DelubrumReginae/DRS7StygimolochLord/DRS7Enums.cs | 8 ++++---- .../Foray/DelubrumReginae/DRS8Queen/DRS8Enums.cs | 6 +++--- .../Foray/Duel/Duel2Lyon/Duel2LyonEnums.cs | 8 ++++---- .../Foray/Duel/Duel4Dabog/Duel4DabogEnums.cs | 6 +++--- .../Foray/Duel/Duel5Menenius/Duel5MeneniusEnums.cs | 4 ++-- BossMod/Modules/Shadowbringers/Hunt/RankA/Baal.cs | 4 ++-- BossMod/Modules/Shadowbringers/Hunt/RankA/Grassman.cs | 4 ++-- BossMod/Modules/Shadowbringers/Hunt/RankA/Huracan.cs | 4 ++-- .../Modules/Shadowbringers/Hunt/RankA/LilMurderer.cs | 4 ++-- .../Modules/Shadowbringers/Hunt/RankA/Maliktender.cs | 4 ++-- BossMod/Modules/Shadowbringers/Hunt/RankA/Nariphon.cs | 8 ++++---- .../Modules/Shadowbringers/Hunt/RankA/Nuckelavee.cs | 4 ++-- .../Shadowbringers/Hunt/RankA/OPoorestPauldia.cs | 4 ++-- BossMod/Modules/Shadowbringers/Hunt/RankA/Rusalka.cs | 4 ++-- BossMod/Modules/Shadowbringers/Hunt/RankA/Sugaar.cs | 2 +- BossMod/Modules/Shadowbringers/Hunt/RankA/Supay.cs | 6 +++--- BossMod/Modules/Shadowbringers/Hunt/RankA/TheMudman.cs | 6 +++--- BossMod/Modules/Shadowbringers/Hunt/RankS/Aglaope.cs | 6 +++--- .../Shadowbringers/Hunt/RankS/ForgivenGossip.cs | 4 ++-- .../Shadowbringers/Hunt/RankS/ForgivenPedantry.cs | 4 ++-- .../Shadowbringers/Hunt/RankS/ForgivenRebellion.cs | 8 ++++---- BossMod/Modules/Shadowbringers/Hunt/RankS/Gunitt.cs | 8 ++++---- BossMod/Modules/Shadowbringers/Hunt/RankS/Ixtab.cs | 6 +++--- BossMod/Modules/Shadowbringers/Hunt/RankS/Tarchia.cs | 4 ++-- BossMod/Modules/Shadowbringers/Hunt/RankS/Tyger.cs | 4 ++-- .../TreasureHunt/TheDungeonsOfLyheGhiah/Goliath.cs | 4 ++-- .../FuathTroublemaker.cs | 4 ++-- .../TheShiftingOubliettesOfLyheGhiah/GreedyPixie.cs | 4 ++-- .../TheShiftingOubliettesOfLyheGhiah/SecretBasket.cs | 4 ++-- .../SecretCladoselache.cs | 6 +++--- .../TheShiftingOubliettesOfLyheGhiah/SecretDjinn.cs | 4 ++-- .../TheShiftingOubliettesOfLyheGhiah/SecretKeeper.cs | 4 ++-- .../TheShiftingOubliettesOfLyheGhiah/SecretKorrigan.cs | 4 ++-- .../TheShiftingOubliettesOfLyheGhiah/SecretPegasus.cs | 4 ++-- .../TheShiftingOubliettesOfLyheGhiah/SecretPorxie.cs | 4 ++-- .../TheShiftingOubliettesOfLyheGhiah/SecretSerpent.cs | 4 ++-- .../TheShiftingOubliettesOfLyheGhiah/SecretSwallow.cs | 4 ++-- .../TheShiftingOubliettesOfLyheGhiah/SecretUndine.cs | 4 ++-- .../TheShiftingOubliettesOfLyheGhiah/SecretWorm.cs | 6 +++--- .../Modules/Shadowbringers/Ultimate/TEA/TEAEnums.cs | 4 ++-- BossMod/Modules/Stormblood/Hunt/RankA/Angada.cs | 4 ++-- BossMod/Modules/Stormblood/Hunt/RankA/Gajasura.cs | 4 ++-- BossMod/Modules/Stormblood/Hunt/RankS/BoneCrawler.cs | 4 ++-- BossMod/Modules/Stormblood/Hunt/RankS/Gamma.cs | 6 +++--- BossMod/Modules/Stormblood/Hunt/RankS/Okina.cs | 4 ++-- BossMod/Modules/Stormblood/Hunt/RankS/Orghana.cs | 4 ++-- .../TheLostCanalsOfUznair/CanalIcebeast.cs | 4 ++-- .../TheShiftingAltarsOfUznair/AltarAiravata.cs | 6 +++--- .../TheShiftingAltarsOfUznair/AltarArachne.cs | 4 ++-- .../TheShiftingAltarsOfUznair/AltarBeast.cs | 4 ++-- .../TheShiftingAltarsOfUznair/AltarChimera.cs | 6 +++--- .../TheShiftingAltarsOfUznair/AltarDiresaur.cs | 6 +++--- .../TheShiftingAltarsOfUznair/AltarDullahan.cs | 4 ++-- .../TheShiftingAltarsOfUznair/AltarKelpie.cs | 4 ++-- .../TheShiftingAltarsOfUznair/AltarMandragora.cs | 4 ++-- .../TheShiftingAltarsOfUznair/AltarSkatene.cs | 4 ++-- .../TheShiftingAltarsOfUznair/AltarTotem.cs | 6 +++--- .../TreasureHunt/TheShiftingAltarsOfUznair/Hati.cs | 4 ++-- .../TheShiftingAltarsOfUznair/TheGreatGoldWhisker.cs | 4 ++-- .../TheShiftingAltarsOfUznair/TheOlderOne.cs | 4 ++-- .../TheShiftingAltarsOfUznair/TheWinged.cs | 4 ++-- BossMod/Modules/Stormblood/Ultimate/UCOB/UCOBEnums.cs | 10 +++++----- BossMod/Modules/Stormblood/Ultimate/UWU/UWUEnums.cs | 10 +++++----- BossMod/Modules/StrikingDummy.cs | 2 +- BossMod/Replay/Analysis/AbilityInfo.cs | 2 +- BossMod/Replay/Analysis/IconInfo.cs | 2 +- BossMod/Replay/Analysis/StatusInfo.cs | 2 +- BossMod/Replay/Analysis/TetherInfo.cs | 2 +- 338 files changed, 820 insertions(+), 820 deletions(-) diff --git a/BossMod/Modules/Endwalker/Alliance/A10Lions/A10LionsEnums.cs b/BossMod/Modules/Endwalker/Alliance/A10Lions/A10LionsEnums.cs index ad63ea3485..2aa967face 100644 --- a/BossMod/Modules/Endwalker/Alliance/A10Lions/A10LionsEnums.cs +++ b/BossMod/Modules/Endwalker/Alliance/A10Lions/A10LionsEnums.cs @@ -6,7 +6,7 @@ public enum OID : uint Lioness = 0x38DB, // R5.600, x1 Lions = 0x38DC, // R0.500, x1 Helper = 0x233C, // R0.500, x2 -}; +} public enum AID : uint { @@ -26,10 +26,10 @@ public enum AID : uint RoaringBlazeSolo = 29375, // Lioness/Lion->self, 4.0s cast, range 50 180-degree cone TrialByFire = 29376, // Lion->self, 4.0s cast, range 14 circle SpinningSlash = 29377, // Lioness->self, 4.0s cast, range 6-30 donut -}; +} public enum IconID : uint { Order1 = 332, // Lion/Lioness Order2 = 333, // Lion/Lioness -}; +} diff --git a/BossMod/Modules/Endwalker/Alliance/A10RhalgrEmissary/A10RhalgrEmissaryEnums.cs b/BossMod/Modules/Endwalker/Alliance/A10RhalgrEmissary/A10RhalgrEmissaryEnums.cs index 3448417d05..3a972de229 100644 --- a/BossMod/Modules/Endwalker/Alliance/A10RhalgrEmissary/A10RhalgrEmissaryEnums.cs +++ b/BossMod/Modules/Endwalker/Alliance/A10RhalgrEmissary/A10RhalgrEmissaryEnums.cs @@ -4,7 +4,7 @@ public enum OID : uint { Boss = 0x38FA, // R5.997, x1 Helper = 0x233C, // R0.500, x30 -}; +} public enum AID : uint { @@ -21,4 +21,4 @@ public enum AID : uint LightningBoltAOE = 28898, // Helper->location, 3.0s cast, range 6 circle puddle BoltsFromTheBlue = 28899, // Boss->self, 5.0s cast, single-target, visual (raidwide) BoltsFromTheBlueAOE = 28900, // Helper->self, no cast, range 25 circle, raidwide -}; +} diff --git a/BossMod/Modules/Endwalker/Alliance/A11Byregot/A11ByregotEnums.cs b/BossMod/Modules/Endwalker/Alliance/A11Byregot/A11ByregotEnums.cs index 16067e2b8e..a13c87000f 100644 --- a/BossMod/Modules/Endwalker/Alliance/A11Byregot/A11ByregotEnums.cs +++ b/BossMod/Modules/Endwalker/Alliance/A11Byregot/A11ByregotEnums.cs @@ -5,7 +5,7 @@ public enum OID : uint Boss = 0x390B, // R6.000, x1 Avatar = 0x390C, // R6.000, x5 Helper = 0x233C, // R0.500, x14 -}; +} public enum AID : uint { @@ -36,7 +36,7 @@ public enum AID : uint CloudToGroundSlow = 28749, // Helper->self, 7.0s cast, range 7 circle CloudToGroundFastAOE = 29038, // Helper->self, no cast, range 7 circle CloudToGroundSlowAOE = 28750, // Helper->self, no cast, range 7 circle -}; +} public enum SID : uint { diff --git a/BossMod/Modules/Endwalker/Alliance/A12Rhalgr/A12RhalgrEnums.cs b/BossMod/Modules/Endwalker/Alliance/A12Rhalgr/A12RhalgrEnums.cs index 0e9921ca8a..57f36ce99a 100644 --- a/BossMod/Modules/Endwalker/Alliance/A12Rhalgr/A12RhalgrEnums.cs +++ b/BossMod/Modules/Endwalker/Alliance/A12Rhalgr/A12RhalgrEnums.cs @@ -7,7 +7,7 @@ public enum OID : uint FistOfJudgment = 0x38D8, // R3.600, x1, blue portal LightningOrb = 0x38D9, // R2.000, spawn during fight Helper = 0x233C, // R0.500, x19 -}; +} public enum AID : uint { @@ -48,4 +48,4 @@ public enum AID : uint BronzeWork = 28843, // Boss->self, 6.5s cast, visual (two sets of cones) BronzeLightning = 28857, // Helper->self, 7.0s cast, range 50 45-degree cone, 4 casts then 4 more casts -}; +} diff --git a/BossMod/Modules/Endwalker/Alliance/A13Azeyma/A13AzeymaEnums.cs b/BossMod/Modules/Endwalker/Alliance/A13Azeyma/A13AzeymaEnums.cs index 0544bf6fa5..97745fc448 100644 --- a/BossMod/Modules/Endwalker/Alliance/A13Azeyma/A13AzeymaEnums.cs +++ b/BossMod/Modules/Endwalker/Alliance/A13Azeyma/A13AzeymaEnums.cs @@ -8,7 +8,7 @@ public enum OID : uint Sunstorm = 0x38D4, // spawn during fight after solar wings cast ProdigalSun = 0x38D5, // spawn during fight Helper = 0x233C, // x33 -}; +} public enum AID : uint { @@ -59,4 +59,4 @@ public enum AID : uint Sunbeam = 28823, // Helper->self, 6.0s cast, range 9 aoe SublimeSunset = 28824, // Boss->self, 9.0s cast SublimeSunsetAOE = 28825, // ProdigalSun->location, 9.5s cast, range 60 aoe with ? falloff -}; +} diff --git a/BossMod/Modules/Endwalker/Alliance/A14Naldthal/A14NaldthalEnums.cs b/BossMod/Modules/Endwalker/Alliance/A14Naldthal/A14NaldthalEnums.cs index 6459365b0e..ca141ac7e1 100644 --- a/BossMod/Modules/Endwalker/Alliance/A14Naldthal/A14NaldthalEnums.cs +++ b/BossMod/Modules/Endwalker/Alliance/A14Naldthal/A14NaldthalEnums.cs @@ -7,7 +7,7 @@ public enum OID : uint SoulVesselFake = 0x3907, // untargetable/tethered placeholders that spawn during fight SoulVesselReal = 0x38A1, // adds that spawn during fight Helper = 0x233C, // x31 -}; +} // nald = orange, thal = blue public enum AID : uint @@ -102,7 +102,7 @@ public enum AID : uint TippedScales = 29576, // Boss->self, no cast, visual TippedScalesAOE = 29561, // Helper->self, 34.0s cast, raidwide (on success) TippedScalesEnrage = 29562, // Helper->self, 34.0s cast, wipe (on failure) -}; +} public enum SID : uint { diff --git a/BossMod/Modules/Endwalker/Alliance/A21Nophica/A21NophicaEnums.cs b/BossMod/Modules/Endwalker/Alliance/A21Nophica/A21NophicaEnums.cs index e7616bbb81..272c4edc1d 100644 --- a/BossMod/Modules/Endwalker/Alliance/A21Nophica/A21NophicaEnums.cs +++ b/BossMod/Modules/Endwalker/Alliance/A21Nophica/A21NophicaEnums.cs @@ -9,7 +9,7 @@ public enum OID : uint GoldSafeZone = 0x1EB846, // R0.500, EventObj type, spawn during fight BlueTower = 0x1EB843, // R0.500, EventObj type, spawn during fight GoldTower = 0x1EB844, // R0.500, EventObj type, spawn during fight -}; +} public enum AID : uint { @@ -41,7 +41,7 @@ public enum AID : uint Furrow = 31766, // Boss->players, 6.0s cast, range 6 circle stack HeavensEarth = 31778, // Boss->self, 5.0s cast, single-target, visual (tankbusters) HeavensEarthAOE = 31779, // Helper->player, 5.0s cast, range 5 circle tankbuster -}; +} public enum SID : uint { @@ -52,7 +52,7 @@ public enum SID : uint ForcedMarch = 1257, // none->player, extra=0x1/0x8/0x4/0x2 BloomingBlue = 3459, // none->player, extra=0x0 BloomingGold = 3460, // none->player, extra=0x0 -}; +} public enum IconID : uint { @@ -64,4 +64,4 @@ public enum IconID : uint Order6 = 403, // Tower Furrow = 318, // player HeavensEarth = 343, // player -}; +} diff --git a/BossMod/Modules/Endwalker/Alliance/A22AlthykNymeia/A22AlthykNymeiaEnums.cs b/BossMod/Modules/Endwalker/Alliance/A22AlthykNymeia/A22AlthykNymeiaEnums.cs index b5e133ddc2..74a009bd6e 100644 --- a/BossMod/Modules/Endwalker/Alliance/A22AlthykNymeia/A22AlthykNymeiaEnums.cs +++ b/BossMod/Modules/Endwalker/Alliance/A22AlthykNymeia/A22AlthykNymeiaEnums.cs @@ -6,7 +6,7 @@ public enum OID : uint Althyk = 0x3CDF, // R8.960, x1 Helper = 0x233C, // R0.500, x17 HydrostasisQuick = 0x3E70, // R0.500, x1 -}; +} public enum AID : uint { @@ -36,7 +36,7 @@ public enum AID : uint HydrostasisAOE3 = 31293, // Helper->self, 22.0s cast, range 72 circle, knockback 28 HydrostasisAOE0 = 31294, // Helper->self, 2.0s cast, range 72 circle, knockback 28 HydrostasisAOEDelayed = 32698, // Helper->self, 11.0s cast, range 72 circle, knockback 28 (happens if althyk is killed before mechanic is resolved) -}; +} public enum SID : uint { @@ -48,7 +48,7 @@ public enum SID : uint Pyretic = 3522, // none->player, extra=0x0 FreezingUp = 3523, // none->player, extra=0x0 Heavy = 2551, // none->player, extra=0x19 -}; +} public enum IconID : uint { @@ -56,7 +56,7 @@ public enum IconID : uint TimeAndTide = 380, // player Hydroptosis = 139, // player Petrai = 259, // player -}; +} public enum TetherID : uint { @@ -65,4 +65,4 @@ public enum TetherID : uint SpinnersWheel = 221, // player->Nymeia TimeAndTide = 223, // player->Althyk HydrostasisQuick = 219, // HydrostasisQuick->Althyk -}; +} diff --git a/BossMod/Modules/Endwalker/Alliance/A23Halone/A23HaloneEnums.cs b/BossMod/Modules/Endwalker/Alliance/A23Halone/A23HaloneEnums.cs index 5bc98acdc2..5b1d09139d 100644 --- a/BossMod/Modules/Endwalker/Alliance/A23Halone/A23HaloneEnums.cs +++ b/BossMod/Modules/Endwalker/Alliance/A23Halone/A23HaloneEnums.cs @@ -6,7 +6,7 @@ public enum OID : uint Helper = 0x233C, // R0.500, x48 GlacialSpearSmall = 0x3DAE, // R3.500, x3 spawn during fight GlacialSpearLarge = 0x3DAF, // R4.000, x1 spawn during fight -}; +} public enum AID : uint { @@ -73,7 +73,7 @@ public enum AID : uint TetrapagosThrust = 32089, // Boss->self, 13.0s cast, single-target, visual (tetrapagos + thousandfold thrust) Chalaza = 32101, // Boss->self, 3.0s cast, single-target, visual (stack + spread) IceRondel = 32103, // Helper->players, 6.0s cast, range 6 circle stack -}; +} public enum IconID : uint { @@ -86,4 +86,4 @@ public enum IconID : uint IceRondel = 318, // player Cheimon1 = 156, // GlacialSpearLarge Cheimon2 = 157, // GlacialSpearLarge -}; +} diff --git a/BossMod/Modules/Endwalker/Alliance/A24Menphina/A24MenphinaEnums.cs b/BossMod/Modules/Endwalker/Alliance/A24Menphina/A24MenphinaEnums.cs index 033a1a9dac..c1a2c8bcda 100644 --- a/BossMod/Modules/Endwalker/Alliance/A24Menphina/A24MenphinaEnums.cs +++ b/BossMod/Modules/Endwalker/Alliance/A24Menphina/A24MenphinaEnums.cs @@ -6,7 +6,7 @@ public enum OID : uint Helper = 0x233C, // R0.500, x39 CeremonialPillar = 0x3E79, // R2.000, x4 IceSprite = 0x3E74, // R0.720, spawn during fight -}; +} public enum AID : uint { @@ -91,16 +91,16 @@ public enum AID : uint CrateringChill = 31726, // Boss->self, 3.0s cast, single-target, visual (two proximity aoes) CrateringChillAOE = 31727, // Helper->self, 6.0s cast, range 60 circle with 20 falloff WinterSolstice = 31725, // Boss->self, 3.0s cast, single-target, visual (slippery floor) -}; +} public enum IconID : uint { LunarKiss = 412, // player KeenMoonbeam = 139, // player MoonsetRays = 62, // player -}; +} public enum TetherID : uint { CeremonialPillar = 14, // CeremonialPillar->Boss -}; +} diff --git a/BossMod/Modules/Endwalker/Alliance/A31Thaliak/A31ThaliakEnums.cs b/BossMod/Modules/Endwalker/Alliance/A31Thaliak/A31ThaliakEnums.cs index 2b706dc152..de86f9d233 100644 --- a/BossMod/Modules/Endwalker/Alliance/A31Thaliak/A31ThaliakEnums.cs +++ b/BossMod/Modules/Endwalker/Alliance/A31Thaliak/A31ThaliakEnums.cs @@ -5,7 +5,7 @@ public enum OID : uint Boss = 0x404C, // R9.496, x1 ThaliakClone = 0x404D, // R9.496, x1 Helper = 0x233C, // R0.500, x44, 523 type -}; +} public enum AID : uint { @@ -45,7 +45,7 @@ public enum AID : uint LeftBank2 = 35884, // Thaliak->self, 22.0s cast, range 60 180-degree cone RightBank = 35027, // Thaliak->self, 5.0s cast, range 60 180-degree cone RightBank2 = 35885, // Thaliak->self, 22.0s cast, range 60 180-degree cone -}; +} public enum SID : uint { @@ -55,7 +55,7 @@ public enum SID : uint DownForTheCount = 783, // ThaliakHelper->player, extra=0xEC7 Inscribed = 3732, // none->player, extra=0x0 Bind = 2518, // none->player, extra=0x0 -}; +} public enum IconID : uint { @@ -64,4 +64,4 @@ public enum IconID : uint RhytonBuster = 471, // player ClockwiseHieroglyphika = 487, // HieroglyphikaIndicator CounterClockwiseHieroglyphika = 490, // HieroglyphikaIndicator -}; +} diff --git a/BossMod/Modules/Endwalker/Alliance/A32Llymlaen/A32LlymlaenEnum.cs b/BossMod/Modules/Endwalker/Alliance/A32Llymlaen/A32LlymlaenEnum.cs index 04d002c6f4..2d2667d0c7 100644 --- a/BossMod/Modules/Endwalker/Alliance/A32Llymlaen/A32LlymlaenEnum.cs +++ b/BossMod/Modules/Endwalker/Alliance/A32Llymlaen/A32LlymlaenEnum.cs @@ -8,7 +8,7 @@ public enum OID : uint Perykos = 0x4026, // R6.300, x1 SeaFoam = 0x4029, // R1.500, spawn during fight Trident = 0x4025, // R3.000, spawn during fight -}; +} public enum AID : uint { @@ -79,4 +79,4 @@ public enum AID : uint //these only happen if a player uses the blowkiss emote on Llymlaen, stun+heavy dmg, not our fault if people do that BlowkissPunishment = 34874, // Llymlaen->player, no cast, single-target, knockback 10 away from source + down for the count NavigatorsDagger = 34875, // Llymlaen->player, no cast, single-target -}; +} diff --git a/BossMod/Modules/Endwalker/Alliance/A33Oschon/A33OschonEnum.cs b/BossMod/Modules/Endwalker/Alliance/A33Oschon/A33OschonEnum.cs index d807f38a8a..882fa9c6bb 100644 --- a/BossMod/Modules/Endwalker/Alliance/A33Oschon/A33OschonEnum.cs +++ b/BossMod/Modules/Endwalker/Alliance/A33Oschon/A33OschonEnum.cs @@ -6,7 +6,7 @@ public enum OID : uint OschonP2 = 0x406F, // R24.990, spawn during fight OschonsAvatar = 0x406E, // R8.000, x4 Helper = 0x233C, // R0.500, x40, 523 type -}; +} public enum AID : uint { @@ -83,11 +83,11 @@ public enum AID : uint WanderingVolley = 35245, // OschonBig->self, 10.0s cast, range 40 width 40 rect, damage fall off raidwide, knockback 12 left/right WanderingVolley2 = 35244, // OschonBig->self, 10.0s cast, range 40 width 40 rect, damage fall off raidwide, knockback 12 left/right -}; +} public enum IconID : uint { FlintedFoehnStack = 316, // player TankbusterP1 = 344, // player TankbusterP2 = 500, // player -}; +} diff --git a/BossMod/Modules/Endwalker/Alliance/A34Eulogia/A34EulogiaEnums.cs b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/A34EulogiaEnums.cs index 980ed76341..8aa2ffaa73 100644 --- a/BossMod/Modules/Endwalker/Alliance/A34Eulogia/A34EulogiaEnums.cs +++ b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/A34EulogiaEnums.cs @@ -17,7 +17,7 @@ public enum OID : uint BlueSafeZone = 0x1EB845, // R0.500, EventObj type, spawn during fight GoldFlowers = 0x1EB844, // R0.500, EventObj type, spawn during fight BlueFlowers = 0x1EB843, // R0.500, EventObj type, spawn during fight -}; +} public enum AID : uint { @@ -146,7 +146,7 @@ public enum AID : uint TheWanderersWhimsy = 35374, // Helper->self, no cast, range 80 circle, raidwide EudaimonEorzea1 = 35372, // Eulogia->self, 22.2s cast, single-target EudaimonEorzea2 = 36091, // Helper->self, 24.9s cast, range 40 circle -}; +} public enum SID : uint { @@ -157,12 +157,12 @@ public enum SID : uint Bind = 2518, // none->player, extra=0x0 BloomingGold = 3460, // none->player, extra=0x0 BloomingBlue = 3459, // none->player, extra=0x0 -}; +} public enum TetherID : uint { HydrostasisQuick = 219, // HydrostasisQuick->Eulogia -}; +} public enum IconID : uint { @@ -176,4 +176,4 @@ public enum IconID : uint Order2 = 399, // MatronsBreathHelper Order3 = 400, // MatronsBreathHelper Order4 = 401, // MatronsBreathHelper -}; +} diff --git a/BossMod/Modules/Endwalker/Criterion/C01ASS/C010Trash/C010Armor.cs b/BossMod/Modules/Endwalker/Criterion/C01ASS/C010Trash/C010Armor.cs index 5536152252..61a7bae0e8 100644 --- a/BossMod/Modules/Endwalker/Criterion/C01ASS/C010Trash/C010Armor.cs +++ b/BossMod/Modules/Endwalker/Criterion/C01ASS/C010Trash/C010Armor.cs @@ -4,7 +4,7 @@ public enum OID : uint { NBoss = 0x3AD8, // R2.500, x1 SBoss = 0x3AE1, // R2.500, x1 -}; +} public enum AID : uint { @@ -15,7 +15,7 @@ public enum AID : uint SDominionSlash = 31106, // Boss->self, 3.5s cast, range 12 90-degree cone aoe SInfernalWeight = 31107, // Boss->self, 5.0s cast, raidwide SHellsNebula = 31108, // Boss->self, 4.0s cast, raidwide set hp to 1 -}; +} class DominionSlash : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Endwalker/Criterion/C01ASS/C010Trash/C010Belladonna.cs b/BossMod/Modules/Endwalker/Criterion/C01ASS/C010Trash/C010Belladonna.cs index 24fe61168e..cea5ee10cb 100644 --- a/BossMod/Modules/Endwalker/Criterion/C01ASS/C010Trash/C010Belladonna.cs +++ b/BossMod/Modules/Endwalker/Criterion/C01ASS/C010Trash/C010Belladonna.cs @@ -4,7 +4,7 @@ public enum OID : uint { NBoss = 0x3AD5, // R4.000, x1 SBoss = 0x3ADE, // R4.000, x1 -}; +} public enum AID : uint { @@ -15,7 +15,7 @@ public enum AID : uint SAtropineSpore = 31096, // SBoss->self, 4.0s cast, range 10-40 donut aoe SFrondAffront = 31097, // SBoss->self, 3.0s cast, gaze SDeracinator = 31098, // SBoss->player, 4.0s cast, single-target tankbuster -}; +} class AtropineSpore : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Endwalker/Criterion/C01ASS/C010Trash/C010Dryad.cs b/BossMod/Modules/Endwalker/Criterion/C01ASS/C010Trash/C010Dryad.cs index bec540c6cf..63b472a989 100644 --- a/BossMod/Modules/Endwalker/Criterion/C01ASS/C010Trash/C010Dryad.cs +++ b/BossMod/Modules/Endwalker/Criterion/C01ASS/C010Trash/C010Dryad.cs @@ -6,7 +6,7 @@ public enum OID : uint NOdqan = 0x3AD2, // R1.050, x2 SBoss = 0x3ADA, // R3.000, x1 SOdqan = 0x3ADB, // R1.050, x2 -}; +} public enum AID : uint { @@ -19,7 +19,7 @@ public enum AID : uint SAcornBomb = 31088, // SBoss->location, 3.0s cast, range 6 circle SGelidGale = 31089, // SOdqan->location, 3.0s cast, range 6 circle SUproot = 31090, // SOdqan->self, 3.0s cast, range 6 circle -}; +} class ArborealStorm : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Endwalker/Criterion/C01ASS/C010Trash/C010Dullahan.cs b/BossMod/Modules/Endwalker/Criterion/C01ASS/C010Trash/C010Dullahan.cs index e38f2eb805..f73e39307e 100644 --- a/BossMod/Modules/Endwalker/Criterion/C01ASS/C010Trash/C010Dullahan.cs +++ b/BossMod/Modules/Endwalker/Criterion/C01ASS/C010Trash/C010Dullahan.cs @@ -4,7 +4,7 @@ public enum OID : uint { NBoss = 0x3AD7, // R2.500, x1 SBoss = 0x3AE0, // R2.500, x1 -}; +} public enum AID : uint { @@ -15,7 +15,7 @@ public enum AID : uint SBlightedGloom = 31102, // Boss->self, 4.0s cast, range 10 circle aoe SKingsWill = 31104, // Boss->self, 2.5s cast, single-target damage up SInfernalPain = 31105, // Boss->self, 5.0s cast, raidwide -}; +} class BlightedGloom : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Endwalker/Criterion/C01ASS/C010Trash/C010Kaluk.cs b/BossMod/Modules/Endwalker/Criterion/C01ASS/C010Trash/C010Kaluk.cs index 20dea10d13..12fce08e1e 100644 --- a/BossMod/Modules/Endwalker/Criterion/C01ASS/C010Trash/C010Kaluk.cs +++ b/BossMod/Modules/Endwalker/Criterion/C01ASS/C010Trash/C010Kaluk.cs @@ -4,7 +4,7 @@ public enum OID : uint { NBoss = 0x3AD6, // R2.800, x1 SBoss = 0x3ADF, // R2.800, x1 -}; +} public enum AID : uint { @@ -15,7 +15,7 @@ public enum AID : uint SRightSweep = 31099, // SBoss->self, 4.0s cast, range 30 210-degree cone aoe SLeftSweep = 31100, // SBoss->self, 4.0s cast, range 30 210-degree cone aoe SCreepingIvy = 31101, // SBoss->self, 3.0s cast, range 10 90-degree cone aoe -}; +} class RightSweep : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Endwalker/Criterion/C01ASS/C010Trash/C010Udumbara.cs b/BossMod/Modules/Endwalker/Criterion/C01ASS/C010Trash/C010Udumbara.cs index 21fce0350a..7eb3b3de5f 100644 --- a/BossMod/Modules/Endwalker/Criterion/C01ASS/C010Trash/C010Udumbara.cs +++ b/BossMod/Modules/Endwalker/Criterion/C01ASS/C010Trash/C010Udumbara.cs @@ -6,7 +6,7 @@ public enum OID : uint NSapria = 0x3AD4, // R1.440, x2 SBoss = 0x3ADC, // R4.000, x1 SSapria = 0x3ADD, // R1.440, x2 -}; +} public enum AID : uint { @@ -19,7 +19,7 @@ public enum AID : uint SHoneyedRight = 31092, // SBoss->self, 4.0s cast, range 30 180-degree cone SHoneyedFront = 31093, // SBoss->self, 4.0s cast, range 30 120-degree cone SBloodyCaress = 31095, // SSapria->self, 3.0s cast, range 12 120-degree cone -}; +} class HoneyedLeft : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Endwalker/Criterion/C01ASS/C011Silkie/C011SilkieEnums.cs b/BossMod/Modules/Endwalker/Criterion/C01ASS/C011Silkie/C011SilkieEnums.cs index c8dad4bd00..15c8536553 100644 --- a/BossMod/Modules/Endwalker/Criterion/C01ASS/C011Silkie/C011SilkieEnums.cs +++ b/BossMod/Modules/Endwalker/Criterion/C01ASS/C011Silkie/C011SilkieEnums.cs @@ -11,7 +11,7 @@ public enum OID : uint SEasternEwer = 0x39F7, // R2.400, x5 Helper = 0x233C, // R0.500, x15 -}; +} public enum AID : uint { @@ -95,7 +95,7 @@ public enum AID : uint Enrage2 = 31225, // NBoss->self, no cast, range 100 circle ??? NBuffetedPuffs = 30697, // NSilkenPuff->self, no cast, single-target, visual (puffs merge if too close) NBuffetedPuffsAOE = 30698, // Helper->self, no cast, raidwide wipe -}; +} public enum SID : uint { @@ -108,4 +108,4 @@ public enum SID : uint FizzlingSudsPuff = 3307, // none->SilkenPuff, extra=0x0 ForkedLightning = 587, // Boss->player, extra=0x0, spread -}; +} diff --git a/BossMod/Modules/Endwalker/Criterion/C01ASS/C012Gladiator/C012GladiatorEnums.cs b/BossMod/Modules/Endwalker/Criterion/C01ASS/C012Gladiator/C012GladiatorEnums.cs index 9d02511945..61e0e22bc8 100644 --- a/BossMod/Modules/Endwalker/Criterion/C01ASS/C012Gladiator/C012GladiatorEnums.cs +++ b/BossMod/Modules/Endwalker/Criterion/C01ASS/C012Gladiator/C012GladiatorEnums.cs @@ -13,7 +13,7 @@ public enum OID : uint SRegret = 0x3A13, // R1.000, spawn during fight Helper = 0x233C, // R0.500, x18 -}; +} public enum AID : uint { @@ -104,7 +104,7 @@ public enum AID : uint Enrage = 30329, // NBoss->self, 10.0s cast, enrage Enrage2 = 31282, // NBoss->self, no cast, range 60 circle ??? -}; +} public enum SID : uint { @@ -119,4 +119,4 @@ public enum SID : uint SecondInLine = 3005, // none->player, extra=0x0 ScreamOfTheFallen = 3291, // none->player, extra=0x0 ChainsOfResentment = 3294, // none->player, extra=0x0 -}; +} diff --git a/BossMod/Modules/Endwalker/Criterion/C01ASS/C013Shadowcaster/C013ShadowcasterEnums.cs b/BossMod/Modules/Endwalker/Criterion/C01ASS/C013Shadowcaster/C013ShadowcasterEnums.cs index 9f7eb1487a..9cc7dc2bb5 100644 --- a/BossMod/Modules/Endwalker/Criterion/C01ASS/C013Shadowcaster/C013ShadowcasterEnums.cs +++ b/BossMod/Modules/Endwalker/Criterion/C01ASS/C013Shadowcaster/C013ShadowcasterEnums.cs @@ -16,7 +16,7 @@ public enum OID : uint Helper = 0x233C, // R0.500, x32 Portal = 0x1EB761, // R0.500, EventObj type, spawn during fight -}; +} public enum AID : uint { @@ -75,7 +75,7 @@ public enum AID : uint Enrage = 29887, // NBoss->self, 10.0s cast, range 80 circle enrage EnrageRepeat = 29641, // NBoss->self, no cast, range 80 circle enrage -}; +} public enum SID : uint { @@ -90,4 +90,4 @@ public enum SID : uint Counter = 2397, // none->NLaser/NBeacon, extra=0x1C2/0x1C3/0x1C4/0x1C5/0x1C6/0x1C7/0x1C8/0x1C9/0x1C1/0x1CC/0x1F3 (1C2-1C5 = #1-#4 NS, 1C6-1C9 = #1-#4 EW, 1C1 = unbreakable) PlayerPortal = 2970, // NBoss->player, extra=0x1CD/0x1CE/0x1D2/0x1D3 (1CD = CCW E->N, 1CE = CW W->N, 1D2 = CW E->S, 1D3 = CCW W->S) CallOfThePortal = 3276, // NBoss->player, extra=0x0 -}; +} diff --git a/BossMod/Modules/Endwalker/Criterion/C02AMR/C020Trash/C020Trash1.cs b/BossMod/Modules/Endwalker/Criterion/C02AMR/C020Trash/C020Trash1.cs index e3b577fbf2..820515e5b8 100644 --- a/BossMod/Modules/Endwalker/Criterion/C02AMR/C020Trash/C020Trash1.cs +++ b/BossMod/Modules/Endwalker/Criterion/C02AMR/C020Trash/C020Trash1.cs @@ -13,7 +13,7 @@ public enum OID : uint SFuko = 0x3F9C, // R4.500, x1 SPenghou = 0x3F9D, // R1.680, x2 SYuki = 0x3FA2, // R2.000, x1 -}; +} public enum AID : uint { @@ -43,7 +43,7 @@ public enum AID : uint NLeftSwipe = 34438, // NYuki->self, 4.0s cast, range 60 180-degree cone SRightSwipe = 34440, // SYuki->self, 4.0s cast, range 60 180-degree cone SLeftSwipe = 34441, // SYuki->self, 4.0s cast, range 60 180-degree cone -}; +} public abstract class C020Trash1 : BossModule { diff --git a/BossMod/Modules/Endwalker/Criterion/C02AMR/C020Trash/C020Trash2.cs b/BossMod/Modules/Endwalker/Criterion/C02AMR/C020Trash/C020Trash2.cs index 7354bac555..ee9025d453 100644 --- a/BossMod/Modules/Endwalker/Criterion/C02AMR/C020Trash/C020Trash2.cs +++ b/BossMod/Modules/Endwalker/Criterion/C02AMR/C020Trash/C020Trash2.cs @@ -9,7 +9,7 @@ public enum OID : uint SKotengu = 0x3F9E, // R1.500 SOnmitsugashira = 0x3F9F, // R1.360, x1 SYamabiko = 0x3FA3, // R0.800, x6 -}; +} public enum AID : uint { @@ -39,7 +39,7 @@ public enum AID : uint // yamabiko NMountainBreeze = 34439, // NYamabiko->self, 6.0s cast, range 40 width 8 rect SMountainBreeze = 34442, // SYamabiko->self, 6.0s cast, range 40 width 8 rect -}; +} class MountainBreeze : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Endwalker/Criterion/C02AMR/C021Shishio/C021ShishioEnums.cs b/BossMod/Modules/Endwalker/Criterion/C02AMR/C021Shishio/C021ShishioEnums.cs index 01cef62d42..b5fdbb1cbd 100644 --- a/BossMod/Modules/Endwalker/Criterion/C02AMR/C021Shishio/C021ShishioEnums.cs +++ b/BossMod/Modules/Endwalker/Criterion/C02AMR/C021Shishio/C021ShishioEnums.cs @@ -15,7 +15,7 @@ public enum OID : uint SHauntingThrall = 0x3F51, // R2.000, spawn during fight - tethered ghosts Helper = 0x233C, // R0.500, x20 -}; +} public enum AID : uint { @@ -108,11 +108,11 @@ public enum AID : uint SEnrage = 33861, // SBoss->self, 10.0s cast, range 60 circle enrage NEnrageRepeat = 33981, // NBoss->self, no cast, range 60 circle SEnrageRepeat = 33982, // SBoss->self, no cast, range 60 circle -}; +} public enum SID : uint { ScatteredWailing = 3563, // *Boss->player, extra=0x0 IntensifiedWailing = 3564, // *Boss->player, extra=0x0 //_Gen_ = 2056, // none->*DevilishThrall, extra=0xE1 -}; +} diff --git a/BossMod/Modules/Endwalker/Criterion/C02AMR/C022Gorai/C022GoraiEnums.cs b/BossMod/Modules/Endwalker/Criterion/C02AMR/C022Gorai/C022GoraiEnums.cs index baaa6241a2..8eca41f851 100644 --- a/BossMod/Modules/Endwalker/Criterion/C02AMR/C022Gorai/C022GoraiEnums.cs +++ b/BossMod/Modules/Endwalker/Criterion/C02AMR/C022Gorai/C022GoraiEnums.cs @@ -15,7 +15,7 @@ public enum OID : uint OrangeTower2 = 0x1EB906, // R0.500, EventObj type, spawn during fight BlueTower1 = 0x1EB896, // R0.500, EventObj type, spawn during fight BlueTower2 = 0x1EB897, // R0.500, EventObj type, spawn during fight -}; +} public enum AID : uint { @@ -107,7 +107,7 @@ public enum AID : uint SFireSpreadCross = 34113, // Helper->self, 3.5s cast, range 46 width 5 rect LivingHell = 34102, // *Boss->self, 10.0s cast, single-target, enrage -}; +} public enum SID : uint { @@ -123,7 +123,7 @@ public enum SID : uint OdderIncarnation4 = 3604, // none->player, extra=0x0 (blue 4) SquirrellyPrayer = 3605, // none->player, extra=0x0 (orange) OdderPrayer = 3606, // none->player, extra=0x0 (blue) -}; +} public enum IconID : uint { @@ -133,10 +133,10 @@ public enum IconID : uint Order2 = 337, // player Order3 = 338, // player Order4 = 339, // player -}; +} public enum TetherID : uint { RousingReincarnation = 248, // player->NBoss PointedPurgation = 89, // player->NBoss -}; +} diff --git a/BossMod/Modules/Endwalker/Criterion/C02AMR/C023Moko/C023MokoEnums.cs b/BossMod/Modules/Endwalker/Criterion/C02AMR/C023Moko/C023MokoEnums.cs index 76d230ca83..a95a285733 100644 --- a/BossMod/Modules/Endwalker/Criterion/C02AMR/C023Moko/C023MokoEnums.cs +++ b/BossMod/Modules/Endwalker/Criterion/C02AMR/C023Moko/C023MokoEnums.cs @@ -16,7 +16,7 @@ public enum OID : uint Helper = 0x233C, // R0.500, x20 SoldierOfDeath = 0x1EB8C9, // R0.500, EventObj type, spawn during fight - soldiers of death mechanic -}; +} public enum AID : uint { @@ -140,7 +140,7 @@ public enum AID : uint //_Weaponskill_KenkiRelease = 34254, // NMokoShadow->self, 3.0s cast, range 60 circle Enrage = 34273, // *Boss->self, 10.0s cast, range 60 circle -}; +} public enum SID : uint { @@ -151,10 +151,10 @@ public enum SID : uint //_Gen_ = 2193, // none->*Boss/*MokoShadow, extra=0x268/0x267/0x266/0xE1 //_Gen_ = 2056, // none->*OniClaw/*Boss/*AshigaruKyuhei, extra=0x257/0x26C/0x26D/0x1E8/0x5E //_Gen_Bind = 2518, // *AncientKatana->player, extra=0x0 -}; +} public enum TetherID : uint { RatAndMouse = 17, // *Boss/*MokoShadow->player //_Gen_Tether_1 = 1, // *MokoShadow->*MokoShadow -}; +} diff --git a/BossMod/Modules/Endwalker/Criterion/C03AAI/C030Trash/C030Trash1.cs b/BossMod/Modules/Endwalker/Criterion/C03AAI/C030Trash/C030Trash1.cs index 1d8c45112d..82a7ba5ff2 100644 --- a/BossMod/Modules/Endwalker/Criterion/C03AAI/C030Trash/C030Trash1.cs +++ b/BossMod/Modules/Endwalker/Criterion/C03AAI/C030Trash/C030Trash1.cs @@ -18,7 +18,7 @@ public enum OID : uint Helper = 0x233C, // R0.500, 523 type, spawn during fight Twister = 0x40CE, // R1.500, spawn during fight -}; +} public enum AID : uint { @@ -56,7 +56,7 @@ public enum AID : uint NCrossAttack = 35771, // NMonk->player, 5.0s cast, single-target tankbuster SHydroshot = 35793, // SMonk->player, 5.0s cast, single-target SCrossAttack = 35919, // SMonk->player, 5.0s cast, single-target tankbuster -}; +} class Twister : Components.Adds { diff --git a/BossMod/Modules/Endwalker/Criterion/C03AAI/C030Trash/C030Trash2.cs b/BossMod/Modules/Endwalker/Criterion/C03AAI/C030Trash/C030Trash2.cs index 87c5eca0bb..97ced16646 100644 --- a/BossMod/Modules/Endwalker/Criterion/C03AAI/C030Trash/C030Trash2.cs +++ b/BossMod/Modules/Endwalker/Criterion/C03AAI/C030Trash/C030Trash2.cs @@ -7,7 +7,7 @@ public enum OID : uint SWoodGolem = 0x40DA, // R2.660 SIslekeeper = 0x40DB, // R2.550 -}; +} public enum AID : uint { @@ -28,7 +28,7 @@ public enum AID : uint SGravityForce = 35898, // SIslekeeper->players, 5.0s cast, range 6 circle stack SIsleDrop = 35900, // SIslekeeper->location, 5.0s cast, range 6 circle puddle SAncientQuagaEnrage = 35914, // SIslekeeper->self, 10.0s cast, range 100 circle enrage -}; +} public abstract class C030Trash2 : BossModule { diff --git a/BossMod/Modules/Endwalker/Criterion/C03AAI/C031Ketuduke/C031KetudukeEnums.cs b/BossMod/Modules/Endwalker/Criterion/C03AAI/C031Ketuduke/C031KetudukeEnums.cs index 12091b2ba7..27fc923567 100644 --- a/BossMod/Modules/Endwalker/Criterion/C03AAI/C031Ketuduke/C031KetudukeEnums.cs +++ b/BossMod/Modules/Endwalker/Criterion/C03AAI/C031Ketuduke/C031KetudukeEnums.cs @@ -20,7 +20,7 @@ public enum OID : uint KnockbackHelper = 0x40B2, // R0.500, spawn during fight BubbleStrewer = 0x1EB936, // R0.500, EventObj type, spawn during fight BubbleBlower = 0x1EB937, // R0.500, EventObj type, spawn during fight -}; +} public enum AID : uint { @@ -101,7 +101,7 @@ public enum AID : uint SBigBurst = 35555, // Helper->self, no cast, range 60 circle tower fail Enrage = 35542, // *Boss->self, 10.0s cast, single-target, enrage -}; +} public enum SID : uint { @@ -110,10 +110,10 @@ public enum SID : uint HydrobulletTarget = 3748, // none->player, extra=0x0 HydrofallTarget = 3747, // none->player, extra=0x0 Bubble = 3745, // none->*SpringCrystal1/*Zaratan, extra=0xC8 -}; +} public enum IconID : uint { Order1 = 336, // KnockbackHelper Order2 = 337, // KnockbackHelper -}; +} diff --git a/BossMod/Modules/Endwalker/Criterion/C03AAI/C032Lala/C032LalaEnums.cs b/BossMod/Modules/Endwalker/Criterion/C03AAI/C032Lala/C032LalaEnums.cs index 50349b4117..245f4e32ca 100644 --- a/BossMod/Modules/Endwalker/Criterion/C03AAI/C032Lala/C032LalaEnums.cs +++ b/BossMod/Modules/Endwalker/Criterion/C03AAI/C032Lala/C032LalaEnums.cs @@ -15,7 +15,7 @@ public enum OID : uint Helper = 0x233C, // R0.500, x33, 523 type ArrowBright = 0x1EB941, // R0.500, EventObj type, spawn during fight ArrowDim = 0x1EB942, // R0.500, EventObj type, spawn during fight -}; +} public enum AID : uint { @@ -98,7 +98,7 @@ public enum AID : uint SExplosiveTheorem = 35838, // SBoss->self, 5.0s cast, single-target, visual (spreads with lingering puddles) SExplosiveTheoremAOE = 35839, // Helper->player, 5.0s cast, range 8 circle spread STelluricTheorem = 35840, // Helper->location, 4.5s cast, range 8 circle puddle -}; +} public enum SID : uint { @@ -115,7 +115,7 @@ public enum SID : uint SubtractiveSuppressorBeta = 3725, // *Boss->player, extra=0x1/0x2/0x3/0x4 ForwardMarch = 3715, // *Boss->player, extra=0x0 ForcedMarch = 3719, // *Boss->player, extra=0x8/0x4 -}; +} public enum IconID : uint { @@ -129,9 +129,9 @@ public enum IconID : uint SymmetricSurge = 62, // player ArcanePoint = 23, // player ExplosiveTheorem = 229, // player -}; +} public enum TetherID : uint { TargetedLight = 17, // player->*Boss -}; +} diff --git a/BossMod/Modules/Endwalker/Criterion/C03AAI/C033Statice/C033StaticeEnums.cs b/BossMod/Modules/Endwalker/Criterion/C03AAI/C033Statice/C033StaticeEnums.cs index 7a45381cea..fe706ce25b 100644 --- a/BossMod/Modules/Endwalker/Criterion/C03AAI/C033Statice/C033StaticeEnums.cs +++ b/BossMod/Modules/Endwalker/Criterion/C03AAI/C033Statice/C033StaticeEnums.cs @@ -23,7 +23,7 @@ public enum OID : uint Helper = 0x233C, // R0.500, x20, 523 type ConeSlice = 0x40C6, // R1.000, x6 Dart = 0x1EB931, // R0.500, EventObj type, spawn during fight -}; +} public enum AID : uint { @@ -101,7 +101,7 @@ public enum AID : uint SFireSpreadRest = 35323, // Helper->self, no cast, range 12 width 5 rect (x11, advance by 10 degrees every time) Enrage = 35875, // *Boss->self, 10.0s cast, range 60 circle, enrage EnrageAOE = 35876, // *Boss->self, no cast, range 60 circle, enrage repeat (every 3s after enrage) -}; +} public enum SID : uint { @@ -112,7 +112,7 @@ public enum SID : uint RightFace = 3541, // none->player, extra=0x0 ForcedMarch = 1257, // none->player, extra=0x2/0x1/0x4/0x8 BurningChains = 769, // none->player, extra=0x0 -}; +} public enum IconID : uint { @@ -128,11 +128,11 @@ public enum IconID : uint ShockingAbandon = 218, // player RotateCW = 156, // *BallOfFire RotateCCW = 157, // *BallOfFire -}; +} public enum TetherID : uint { BombsLink = 54, // *Bomb->*Bomb Follow = 17, // *SurprisingMissile/*SurprisingClaw->player BurningChains = 9, // player->player -}; +} diff --git a/BossMod/Modules/Endwalker/DeepDungeon/EurekaOrthos/DD30TiamatsClone.cs b/BossMod/Modules/Endwalker/DeepDungeon/EurekaOrthos/DD30TiamatsClone.cs index de53fe1f83..fa95ab4d48 100644 --- a/BossMod/Modules/Endwalker/DeepDungeon/EurekaOrthos/DD30TiamatsClone.cs +++ b/BossMod/Modules/Endwalker/DeepDungeon/EurekaOrthos/DD30TiamatsClone.cs @@ -5,7 +5,7 @@ public enum OID : uint Boss = 0x3D9A, // R19.000 DarkWanderer = 0x3D9B, // R2.000 Helper = 0x233C, // R0.500 -}; +} public enum AID : uint { @@ -20,12 +20,12 @@ public enum AID : uint DarkWyrmwing2 = 31846, // 233C->self, 6.0s cast, range 40 width 16 rect // Summon Heads Heading E/W from E/W Walls WheiMornFirst = 31847, // 3D9A->location, 5.0s cast, range 6 circle WheiMornRest = 31848, // 3D9A->location, no cast, range 6 circle -}; +} public enum IconID : uint { ChasingAOE = 197, // player -}; +} class WheiMorn : Components.StandardChasingAOEs { diff --git a/BossMod/Modules/Endwalker/DeepDungeon/EurekaOrthos/DD70Aeturna.cs b/BossMod/Modules/Endwalker/DeepDungeon/EurekaOrthos/DD70Aeturna.cs index 3fc1c9e43f..0c7e9e6d2a 100644 --- a/BossMod/Modules/Endwalker/DeepDungeon/EurekaOrthos/DD70Aeturna.cs +++ b/BossMod/Modules/Endwalker/DeepDungeon/EurekaOrthos/DD70Aeturna.cs @@ -5,7 +5,7 @@ public enum OID : uint Boss = 0x3D1B, // R5.950, x1 AllaganCrystal = 0x3D1C, // R1.500, x4 Helper = 0x233C, // R0.500, x12, 523 type -}; +} public enum AID : uint { @@ -22,18 +22,18 @@ public enum AID : uint ShatterCone = 31440, // 3D1C->self, 2.5s cast, range 18+R 150-degree cone SteelClaw = 31445, // 3D1B->player, 5.0s cast, single-target Teleport = 31446, // 3D1B->location, no cast, single-target, boss teleports mid -}; +} public enum IconID : uint { tankbuster = 198, // player -}; +} public enum TetherID : uint { FerocityTetherGood = 1, // Boss->player FerocityTetherStretch = 57, // Boss->player -}; +} class SteelClaw : Components.SingleTargetDelayableCast { diff --git a/BossMod/Modules/Endwalker/Dungeon/D01TowerOfZot/D011Minduruva.cs b/BossMod/Modules/Endwalker/Dungeon/D01TowerOfZot/D011Minduruva.cs index 7a42261254..576623d030 100644 --- a/BossMod/Modules/Endwalker/Dungeon/D01TowerOfZot/D011Minduruva.cs +++ b/BossMod/Modules/Endwalker/Dungeon/D01TowerOfZot/D011Minduruva.cs @@ -4,7 +4,7 @@ public enum OID : uint { Boss = 0x33EE, // R=2.04 Helper = 0x233C, -}; +} public enum AID : uint { @@ -28,7 +28,7 @@ public enum AID : uint ManusyaThunder = 25247, // Boss->player, no cast, single-target TransmuteBlizzardIII = 25371, // Boss->self, 2,7s cast, single-target TransmuteThunderIII = 25372, // Boss->self, 2,7s cast, single-target -}; +} public enum SID : uint { @@ -40,7 +40,7 @@ public enum SID : uint IceAlchemy = 2752, // Boss->Boss, extra=0x0 ToxicAlchemy = 2754, // Boss->Boss, extra=0x0 FireAlchemy = 2751, // Boss->Boss, extra=0x0 -}; +} class ManusyaBio : Components.SingleTargetCast { diff --git a/BossMod/Modules/Endwalker/Dungeon/D01TowerOfZot/D012Sanduruva.cs b/BossMod/Modules/Endwalker/Dungeon/D01TowerOfZot/D012Sanduruva.cs index e27ae16d2f..708dde01d6 100644 --- a/BossMod/Modules/Endwalker/Dungeon/D01TowerOfZot/D012Sanduruva.cs +++ b/BossMod/Modules/Endwalker/Dungeon/D01TowerOfZot/D012Sanduruva.cs @@ -4,7 +4,7 @@ public enum OID : uint { Boss = 0x33EF, // R=2.5 BerserkerSphere = 0x33F0, // R=1.5-2.5 -}; +} public enum AID : uint { @@ -18,7 +18,7 @@ public enum AID : uint PrakamyaSiddhi = 25251, // Boss->self, 4.0s cast, range 5 circle PraptiSiddhi = 25256, //Boss->self, 2.0s cast, range 40 width 4 rect SphereShatter = 25252, // BerserkerSphere->self, 2.0s cast, range 15 circle -}; +} public enum SID : uint { @@ -28,7 +28,7 @@ public enum SID : uint ManusyaConfuse = 2652, // Boss->player, extra=0x1C6 WhoIsShe = 2655, // none->Boss, extra=0x0 WhoIsShe2 = 2654, // none->BerserkerSphere, extra=0x1A8 -}; +} class IsitvaSiddhi : Components.SingleTargetCast { diff --git a/BossMod/Modules/Endwalker/Dungeon/D01TowerOfZot/D013MagusSisters.cs b/BossMod/Modules/Endwalker/Dungeon/D01TowerOfZot/D013MagusSisters.cs index 75c4c13e8c..25fb5ed0d5 100644 --- a/BossMod/Modules/Endwalker/Dungeon/D01TowerOfZot/D013MagusSisters.cs +++ b/BossMod/Modules/Endwalker/Dungeon/D01TowerOfZot/D013MagusSisters.cs @@ -8,7 +8,7 @@ public enum OID : uint BerserkerSphere = 0x33F0, // R=1.5-2.5 Helper = 0x233C, Helper2 = 0x3610, -}; +} public enum AID : uint { @@ -47,7 +47,7 @@ public enum AID : uint PrakamyaSiddhi = 25278, // Sanduruva->self, 4,0s cast, range 5 circle ManusyaBlizzardIII = 25285, // Minduruva->self, 4,0s cast, single-target ManusyaBlizzardIII2 = 25286, // Helper->self, 4,0s cast, range 40+R 20-degree cone -}; +} public enum SID : uint { @@ -55,7 +55,7 @@ public enum SID : uint Burns = 2082, // Minduruva->player, extra=0x0 Frostbite = 2083, // Minduruva->player, extra=0x0 Electrocution = 2086, // Minduruva->player, extra=0x0 -}; +} class Dhrupad : BossComponent { diff --git a/BossMod/Modules/Endwalker/Dungeon/D11LapisManalis/D110AlbusGriffin.cs b/BossMod/Modules/Endwalker/Dungeon/D11LapisManalis/D110AlbusGriffin.cs index ee08b2ba5b..16fe697655 100644 --- a/BossMod/Modules/Endwalker/Dungeon/D11LapisManalis/D110AlbusGriffin.cs +++ b/BossMod/Modules/Endwalker/Dungeon/D11LapisManalis/D110AlbusGriffin.cs @@ -11,7 +11,7 @@ public enum AID : uint WindsOfWinter = 32785, // Boss->self, 5,0s cast, range 40 circle Freefall = 32786, // Boss->location, 3,5s cast, range 8 circle GoldenTalons = 32787, // Boss->self, 4,5s cast, range 8 90-degree cone -}; +} class WindsOfWinter : Components.RaidwideCast { diff --git a/BossMod/Modules/Endwalker/Dungeon/D11LapisManalis/D110CaladriusMaturus.cs b/BossMod/Modules/Endwalker/Dungeon/D11LapisManalis/D110CaladriusMaturus.cs index 3c9ec369be..0ad0c2caa7 100644 --- a/BossMod/Modules/Endwalker/Dungeon/D11LapisManalis/D110CaladriusMaturus.cs +++ b/BossMod/Modules/Endwalker/Dungeon/D11LapisManalis/D110CaladriusMaturus.cs @@ -10,7 +10,7 @@ public enum AID : uint { AutoAttack = 872, // Caladrius/Boss->player, no cast, single-target TransonicBlast = 32535, // Caladrius->self, 4,0s cast, range 9 90-degree cone -}; +} class TransonicBlast : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Endwalker/Dungeon/D11LapisManalis/D111Albion.cs b/BossMod/Modules/Endwalker/Dungeon/D11LapisManalis/D111Albion.cs index e02f3720fd..f18cd21107 100644 --- a/BossMod/Modules/Endwalker/Dungeon/D11LapisManalis/D111Albion.cs +++ b/BossMod/Modules/Endwalker/Dungeon/D11LapisManalis/D111Albion.cs @@ -29,14 +29,14 @@ public enum AID : uint IcyThroes3 = 31363, // Helper->player, 5,0s cast, range 6 circle IcyThroes4 = 32697, // Helper->self, 5,0s cast, range 6 circle RoarOfAlbion = 31364, // Boss->self, 7,0s cast, range 60 circle -}; +} public enum IconID : uint { Tankbuster = 218, // player Target = 210, // IceCrystal Spreadmarker = 139, // player -}; +} class WildlifeCrossing : Components.GenericAOEs { diff --git a/BossMod/Modules/Endwalker/Dungeon/D11LapisManalis/D112GalateaMagna.cs b/BossMod/Modules/Endwalker/Dungeon/D11LapisManalis/D112GalateaMagna.cs index b9bd501ccc..7f78fecc69 100644 --- a/BossMod/Modules/Endwalker/Dungeon/D11LapisManalis/D112GalateaMagna.cs +++ b/BossMod/Modules/Endwalker/Dungeon/D11LapisManalis/D112GalateaMagna.cs @@ -25,7 +25,7 @@ public enum AID : uint Burst = 31383, // Helper->self, no cast, range 5 circle, tower success BigBurst = 31384, // Helper->self, no cast, range 60 circle, tower fail StonyGaze = 31385, // Helper->self, no cast, gaze -}; +} public enum IconID : uint { @@ -34,7 +34,7 @@ public enum IconID : uint Icon3 = 338, // 3D06 Icon4 = 339, // 3D06 PlayerGaze = 73, // player -}; +} public enum SID : uint { @@ -42,7 +42,7 @@ public enum SID : uint ScarecrowChase = 2056, // none->Boss, extra=0x22B Doom = 3364, // Helper->player, extra=0x0 GlassyEyed = 3511, // Boss->player, extra=0x0, takes possession of the player after status ends and does a petrifying attack in all direction -}; +} class ScarecrowChase : Components.GenericAOEs { diff --git a/BossMod/Modules/Endwalker/Dungeon/D11LapisManalis/D113Cagnazzo.cs b/BossMod/Modules/Endwalker/Dungeon/D11LapisManalis/D113Cagnazzo.cs index ac64dfbc87..6290ae7cec 100644 --- a/BossMod/Modules/Endwalker/Dungeon/D11LapisManalis/D113Cagnazzo.cs +++ b/BossMod/Modules/Endwalker/Dungeon/D11LapisManalis/D113Cagnazzo.cs @@ -37,25 +37,25 @@ public enum AID : uint Lifescleaver = 31112, // Boss->self, 4,0s cast, single-target Lifescleaver2 = 31113, // Helper->self, 5,0s cast, range 50 30-degree cone VoidTorrent = 31118, // Boss->self/player, 5,0s cast, range 60 width 8 rect -}; +} public enum IconID : uint { Stackmarker = 161, // player Spreadmarker = 139, // player Tankbuster = 230, // player -}; +} public enum TetherID : uint { LimitBreakCharger = 3, // FearsomeFlotsam->Boss BaitAway = 1, // 3E97->player -}; +} public enum NPCYell : uint { LimitBreakStart = 15175, -}; +} class VoidTorrent : Components.BaitAwayCast { diff --git a/BossMod/Modules/Endwalker/Dungeon/D12Aetherfont/D121Lyngbakr.cs b/BossMod/Modules/Endwalker/Dungeon/D12Aetherfont/D121Lyngbakr.cs index 7aade2d635..596f7b9931 100644 --- a/BossMod/Modules/Endwalker/Dungeon/D12Aetherfont/D121Lyngbakr.cs +++ b/BossMod/Modules/Endwalker/Dungeon/D12Aetherfont/D121Lyngbakr.cs @@ -6,7 +6,7 @@ public enum OID : uint Helper = 0x233C, SmallCrystal = 0x1EB882, // R=0.5 BigCrystal = 0x1EB883, // R=0.5 -}; +} public enum AID : uint { @@ -20,7 +20,7 @@ public enum AID : uint Upsweep = 33338, // Boss->self, 5.0s cast, range 40 circle Floodstide = 33341, // Boss->self, 3.0s cast, single-target Waterspout = 33342, // Helper->player, 5.0s cast, range 5 circle, spread -}; +} class Frequencies : Components.GenericAOEs { diff --git a/BossMod/Modules/Endwalker/Dungeon/D12Aetherfont/D122Arkas.cs b/BossMod/Modules/Endwalker/Dungeon/D12Aetherfont/D122Arkas.cs index 4ff1e08755..134b6372b9 100644 --- a/BossMod/Modules/Endwalker/Dungeon/D12Aetherfont/D122Arkas.cs +++ b/BossMod/Modules/Endwalker/Dungeon/D12Aetherfont/D122Arkas.cs @@ -4,7 +4,7 @@ public enum OID : uint { Boss = 0x3EEA, //R=5.1 Helper = 0x233C, -}; +} public enum AID : uint { @@ -29,13 +29,13 @@ public enum AID : uint SpinningClaw = 33362, // Boss->self, 3.5s cast, range 10 circle ForkedFissures = 33361, // Helper->location, 1.0s cast, width 4 rect charge SpunLightning = 33363, // Helper->self, 3.5s cast, range 30 width 8 rect -}; +} public enum IconID : uint { Tankbuster = 218, // player Stackmarker = 161, // 39D7/3DC2 -}; +} class Voidzone : BossComponent { diff --git a/BossMod/Modules/Endwalker/Dungeon/D12Aetherfont/D123Octomammoth.cs b/BossMod/Modules/Endwalker/Dungeon/D12Aetherfont/D123Octomammoth.cs index 75b3197e2a..2d13663fa0 100644 --- a/BossMod/Modules/Endwalker/Dungeon/D12Aetherfont/D123Octomammoth.cs +++ b/BossMod/Modules/Endwalker/Dungeon/D12Aetherfont/D123Octomammoth.cs @@ -6,7 +6,7 @@ public enum OID : uint MammothTentacle = 0x3EAB, // R=6.0 Crystals = 0x3EAC, // R=0.5 Helper = 0x233C, -}; +} public enum AID : uint { @@ -24,7 +24,7 @@ public enum AID : uint WaterDrop = 34436, // Helper->player, 5.0s cast, range 6 circle WallopVisual = 33350, // Boss->self, no cast, single-target, visual, starts tentacle wallops Wallop = 33346, // MammothTentacle->self, 3.0s cast, range 22 width 8 rect -}; +} class Border : BossComponent { diff --git a/BossMod/Modules/Endwalker/Dungeon/D13LunarSubterrane/D131DarkElf.cs b/BossMod/Modules/Endwalker/Dungeon/D13LunarSubterrane/D131DarkElf.cs index 8317710712..cfbe687f31 100644 --- a/BossMod/Modules/Endwalker/Dungeon/D13LunarSubterrane/D131DarkElf.cs +++ b/BossMod/Modules/Endwalker/Dungeon/D13LunarSubterrane/D131DarkElf.cs @@ -5,7 +5,7 @@ public enum OID : uint Boss = 0x3FE2, // R=5.0 HexingStaff = 0x3FE3, // R=1.2 Helper = 0x233C, -}; +} public enum AID : uint { @@ -23,12 +23,12 @@ public enum AID : uint VoidDarkII2 = 34788, // 233C->player, 5,0s cast, range 6 circle StaffSmite = 35204, // 3FE2->player, 5,0s cast, single-target AbyssalOutburst = 34782, // 3FE2->self, 5,0s cast, range 60 circle -}; +} public enum SID : uint { Doom = 3364, // none->player, extra=0x0 -}; +} class HexingStaves : Components.GenericAOEs { diff --git a/BossMod/Modules/Endwalker/Dungeon/D13LunarSubterrane/D132DamcyanAntilon.cs b/BossMod/Modules/Endwalker/Dungeon/D13LunarSubterrane/D132DamcyanAntilon.cs index e7942d8452..8b62814c42 100644 --- a/BossMod/Modules/Endwalker/Dungeon/D13LunarSubterrane/D132DamcyanAntilon.cs +++ b/BossMod/Modules/Endwalker/Dungeon/D13LunarSubterrane/D132DamcyanAntilon.cs @@ -7,7 +7,7 @@ public enum OID : uint StonePillar2 = 0x3FD1, // R=1.5 QuicksandVoidzone = 0x1EB90E, Helper = 0x233C, -}; +} public enum AID : uint { @@ -23,7 +23,7 @@ public enum AID : uint EarthenGeyser = 34821, // Boss->self, 4,0s cast, single-target EarthenGeyser2 = 34822, // Helper->players, 5,0s cast, range 10 circle PoundSand = 34443, // Boss->location, 6,0s cast, range 12 circle -}; +} class Sandblast : Components.RaidwideCast { diff --git a/BossMod/Modules/Endwalker/Dungeon/D13LunarSubterrane/D133Durante.cs b/BossMod/Modules/Endwalker/Dungeon/D13LunarSubterrane/D133Durante.cs index 9c390bbc14..41f6a1f9b1 100644 --- a/BossMod/Modules/Endwalker/Dungeon/D13LunarSubterrane/D133Durante.cs +++ b/BossMod/Modules/Endwalker/Dungeon/D13LunarSubterrane/D133Durante.cs @@ -5,7 +5,7 @@ public enum OID : uint Boss = 0x4042, // R=6.0 AethericCharge = 0x4043, // R=1.0 Helper = 0x233C, -}; +} public enum AID : uint { @@ -35,7 +35,7 @@ public enum AID : uint DeathsJourney = 34995, // Boss->self, 6,0s cast, range 8 circle DeathsJourney2 = 34996, // Helper->self, 6,5s cast, range 30 30-degree cone, this does the damage DeathsJourney3 = 35872, // Helper->self, 6,5s cast, range 30 30-degree cone, visual -}; +} class Voidzone : BossComponent { diff --git a/BossMod/Modules/Endwalker/Extreme/Ex1Zodiark/Ex1ZodiarkEnums.cs b/BossMod/Modules/Endwalker/Extreme/Ex1Zodiark/Ex1ZodiarkEnums.cs index 50c87b8e88..703cd55347 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex1Zodiark/Ex1ZodiarkEnums.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex1Zodiark/Ex1ZodiarkEnums.cs @@ -11,7 +11,7 @@ public enum OID : uint ExoSquare = 0x3590, // x5 ExoTri = 0x3591, // x5 RoilingDarkness = 0x3595, // x4, spawn during first intermission -}; +} public enum AID : uint { @@ -55,7 +55,7 @@ public enum AID : uint AutoAttack = 27763, // Boss->target, no cast ApomnemoneumataLethal = 28026, // Helper->self ApomnemoneumataNormal = 28027, // Helper->self -}; +} public enum SID : uint { @@ -66,7 +66,7 @@ public enum TetherID : uint { ExoTri = 164, // Boss->ExoTri ExoSquare = 171, // Boss->ExoSquare -}; +} public enum IconID : uint { diff --git a/BossMod/Modules/Endwalker/Extreme/Ex1Zodiark/Paradeigma.cs b/BossMod/Modules/Endwalker/Extreme/Ex1Zodiark/Paradeigma.cs index ff3f21addc..4a0f1b27e0 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex1Zodiark/Paradeigma.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex1Zodiark/Paradeigma.cs @@ -3,7 +3,7 @@ // state related to paradeigma and astral flow mechanics class Paradeigma : BossComponent { - public enum FlowDirection { None, CW, CCW }; + public enum FlowDirection { None, CW, CCW } private FlowDirection _flow; private List _birds = new(); diff --git a/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/Ex2HydaelynEnums.cs b/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/Ex2HydaelynEnums.cs index f65070b9fc..d55f2ed30f 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/Ex2HydaelynEnums.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/Ex2HydaelynEnums.cs @@ -13,7 +13,7 @@ public enum OID : uint LightwaveWaveTarget = 0x1EB24B, // eventobj RefulgenceHexagon = 0x1EB24C, // eventobj RefulgenceTriangle = 0x1EB24D, // eventobj -}; +} public enum AID : uint { @@ -80,7 +80,7 @@ public enum AID : uint Aureole2AOE = 28434, // Helper->self LateralAureole2 = 28435, // Boss->self LateralAureole2AOE = 28436, // Helper->self -}; +} public enum SID : uint { diff --git a/BossMod/Modules/Endwalker/Extreme/Ex3Endsinger/Ex3EndsingerEnums.cs b/BossMod/Modules/Endwalker/Extreme/Ex3Endsinger/Ex3EndsingerEnums.cs index 3e46fa571c..f71ef8dc17 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex3Endsinger/Ex3EndsingerEnums.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex3Endsinger/Ex3EndsingerEnums.cs @@ -9,7 +9,7 @@ public enum OID : uint AzureStar = 0x38C3, // x2, and more spawn for short time during fight DarkStar = 0x38C4, // x1 Helper = 0x233C, // x16, and more spawn for short time during fight -}; +} public enum AID : uint { @@ -81,7 +81,7 @@ public enum AID : uint Enrage = 28721, // Boss->self, 5s cast, visual EnrageAOE = 28722, // Helper->self, 5s cast -}; +} public enum SID : uint { diff --git a/BossMod/Modules/Endwalker/Extreme/Ex3Endsinger/TwinsongAporrhoia.cs b/BossMod/Modules/Endwalker/Extreme/Ex3Endsinger/TwinsongAporrhoia.cs index 0d611d8598..8379c22ab3 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex3Endsinger/TwinsongAporrhoia.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex3Endsinger/TwinsongAporrhoia.cs @@ -2,7 +2,7 @@ class TwinsongAporrhoia : BossComponent { - private enum HeadID { Center, Danger1, Danger2, Safe1, Safe2, Count }; + private enum HeadID { Center, Danger1, Danger2, Safe1, Safe2, Count } private int _castsDone; private bool _ringsAssigned; diff --git a/BossMod/Modules/Endwalker/Extreme/Ex4Barbariccia/Ex4BarbaricciaEnums.cs b/BossMod/Modules/Endwalker/Extreme/Ex4Barbariccia/Ex4BarbaricciaEnums.cs index 522597af1f..8e82ff62c0 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex4Barbariccia/Ex4BarbaricciaEnums.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex4Barbariccia/Ex4BarbaricciaEnums.cs @@ -11,7 +11,7 @@ public enum OID : uint //_Gen_Exit = 0x1E850B, // x1, EventObj type //_Gen_MagitekArmor = 0x1EB702, // x4, EventObj type //_Gen_Actor1e8536 = 0x1E8536, // x1, EventObj type -}; +} public enum AID : uint { @@ -107,14 +107,14 @@ public enum AID : uint Entanglement = 30125, // Boss->self, 4.0s cast, single-target, visual Maelstrom = 30142, // Boss->self, 9.0s cast, enrage -}; +} public enum TetherID : uint { BrutalRush = 17, // player->Boss Tangle = 199, // player->Tangle Entanglement = 210, // player->player -}; +} public enum IconID : uint { @@ -131,4 +131,4 @@ public enum IconID : uint //_Gen_Icon_259 = 259, // player //_Gen_Icon_365 = 365, // player //_Gen_Icon_371 = 371, // player -}; +} diff --git a/BossMod/Modules/Endwalker/Extreme/Ex5Rubicante/Ex5RubicanteEnums.cs b/BossMod/Modules/Endwalker/Extreme/Ex5Rubicante/Ex5RubicanteEnums.cs index 9d5e906c49..7e60a6d35d 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex5Rubicante/Ex5RubicanteEnums.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex5Rubicante/Ex5RubicanteEnums.cs @@ -17,7 +17,7 @@ public enum OID : uint FlamesentNC = 0x3D94, // R2.600, spawn during fight (northern center add) //_Gen_Actor1ea1a1 = 0x1EA1A1, // R2.000, x1, EventObj type //_Gen_Exit = 0x1E850B, // R0.500, x1, EventObj type -}; +} public enum AID : uint { @@ -98,7 +98,7 @@ public enum AID : uint Flamespire = 32042, // Helper->self, no cast, range 60 circle raidwide (wipe if flamespire reaches 5 stacks) Enrage = 32043, // Boss->self, 10.0s cast, range 60 circle -}; +} public enum SID : uint { @@ -117,14 +117,14 @@ public enum SID : uint //_Gen_Flamespire = 3487, // none->player, extra=0x1/0x2/0x3/0x4/0x5 //_Gen_Flamespire = 3486, // none->player, extra=0x1/0x2/0x3 //_Gen_SlashingResistanceDown = 1693, // Helper->player, extra=0x0 -}; +} public enum TetherID : uint { ShatteringHeatAdd = 84, // FlamesentNS->player GhastlyWind = 192, // FlamesentSS->player FlamespireClaw = 89, // player->Boss -}; +} public enum IconID : uint { @@ -142,4 +142,4 @@ public enum IconID : uint //_Gen_Icon_23 = 23, // player //_Gen_Icon_211 = 211, // player //_Gen_Icon_93 = 93, // player -}; +} diff --git a/BossMod/Modules/Endwalker/Extreme/Ex6Golbez/Ex6GolbezEnums.cs b/BossMod/Modules/Endwalker/Extreme/Ex6Golbez/Ex6GolbezEnums.cs index bbd1b510c9..351468eb8c 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex6Golbez/Ex6GolbezEnums.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex6Golbez/Ex6GolbezEnums.cs @@ -7,7 +7,7 @@ public enum OID : uint GaleSphere = 0x3F59, // R1.000, x16 GolbezsShadow = 0x3F5A, // R7.500, x4 Helper = 0x233C, // R0.500, x25 -}; +} public enum AID : uint { @@ -86,17 +86,17 @@ public enum AID : uint VoidBlizzard = 33890, // Helper->players, 6.0s cast, range 6 circle 4-man stack VoidAero = 33884, // Helper->players, 6.0s cast, range 3 circle 2-man stack VoidTornado = 33885, // Helper->players, 6.0s cast, range 6 circle 4-man stack -}; +} public enum SID : uint { FlamesOfEventide = 3573, // Boss->player, extra=0x1/0x2 -}; +} public enum TetherID : uint { Cauterize = 17, // ShadowDragon->player -}; +} public enum IconID : uint { @@ -109,4 +109,4 @@ public enum IconID : uint AbyssalQuasar = 347, // player VoidBlizzard = 318, // player - also VoidTornado VoidAero = 451, // player -}; +} diff --git a/BossMod/Modules/Endwalker/Extreme/Ex7Zeromus/Ex7ZeromusEnums.cs b/BossMod/Modules/Endwalker/Extreme/Ex7Zeromus/Ex7ZeromusEnums.cs index 732193f06b..04e336c604 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex7Zeromus/Ex7ZeromusEnums.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex7Zeromus/Ex7ZeromusEnums.cs @@ -10,7 +10,7 @@ public enum OID : uint FlareTower = 0x1EB94E, // R0.500, EventObj type, spawn during fight FlareRay = 0x1EB94F, // R0.500, EventObj type, spawn during fight BlackHole = 0x1EB94C, // R0.500, EventObj type, spawn during fight -}; +} public enum AID : uint { @@ -114,7 +114,7 @@ public enum AID : uint ChasmicNailsVisual3 = 35625, // Helper->self, 4.0s cast, range 60 40-degree cone, visual (telegraph) ChasmicNailsVisual4 = 35626, // Helper->self, 5.0s cast, range 60 40-degree cone, visual (telegraph) ChasmicNailsVisual5 = 35627, // Helper->self, 6.0s cast, range 60 40-degree cone, visual (telegraph) -}; +} public enum SID : uint { @@ -133,7 +133,7 @@ public enum SID : uint //FireResistanceDownII = 2098, // Helper->player, extra=0x0 // = 2056, // Boss->Boss, extra=0x286 //FleshWound = 264, // Helper->player, extra=0x0 -}; +} public enum IconID : uint { @@ -146,7 +146,7 @@ public enum IconID : uint Nox = 197, // player AkhRhai = 23, // player UmbralPrism = 211, // player -}; +} public enum TetherID : uint { @@ -156,4 +156,4 @@ public enum TetherID : uint VoidMeteorStretchedGood = 255, // Comet->player BondsOfDarkness = 163, // player->player FlowOfTheAbyss = 265, // FlowOfTheAbyss->Boss -}; +} diff --git a/BossMod/Modules/Endwalker/FATE/Chi.cs b/BossMod/Modules/Endwalker/FATE/Chi.cs index a4b5268ef7..89f8dd1335 100644 --- a/BossMod/Modules/Endwalker/FATE/Chi.cs +++ b/BossMod/Modules/Endwalker/FATE/Chi.cs @@ -9,7 +9,7 @@ public enum OID : uint Helper4 = 0x364C, //R=0.5 Helper5 = 0x364D, //R=0.5 Helper6 = 0x3505, //R=0.5 -}; +} public enum AID : uint { @@ -44,7 +44,7 @@ public enum AID : uint BouncingBomb3 = 27486, // Helper5->self, 1,0s cast, range 20 width 20 rect ThermobaricExplosive = 25965, // Boss->self, 3,0s cast, single-target ThermobaricExplosive2 = 25966, // Helper1->location, 10,0s cast, range 55 circle, damage fall off AOE -}; +} class Bunkerbuster : Components.GenericAOEs { diff --git a/BossMod/Modules/Endwalker/FATE/Daivadipa.cs b/BossMod/Modules/Endwalker/FATE/Daivadipa.cs index 45afa93277..f97d292954 100644 --- a/BossMod/Modules/Endwalker/FATE/Daivadipa.cs +++ b/BossMod/Modules/Endwalker/FATE/Daivadipa.cs @@ -10,7 +10,7 @@ public enum OID : uint Helper1 = 0x3573, //R=0.5 Helper2 = 0x3574, //R=0.5 Helper3 = 0x3575, //R=0.5 -}; +} public enum AID : uint { @@ -39,7 +39,7 @@ public enum AID : uint DivineCall2 = 26520, // Boss->self, 4,0s cast, range 65 circle, forced right march DivineCall3 = 27079, // Boss->self, 4,0s cast, range 65 circle, forced forward march DivineCall4 = 26519, // Boss->self, 4,0s cast, range 65 circle, forced left march -}; +} public enum SID : uint { @@ -49,7 +49,7 @@ public enum SID : uint ForwardMarch = 1958, // Boss->player, extra=0x0 LeftFace = 1960, // Boss->player, extra=0x0 ForcedMarch = 1257, // Boss->player, extra=0x2/0x8/0x1/0x4 -}; +} class LitPath : Components.GenericAOEs { diff --git a/BossMod/Modules/Endwalker/Hunt/RankA/Aegeiros.cs b/BossMod/Modules/Endwalker/Hunt/RankA/Aegeiros.cs index 0e6df730f5..b004903365 100644 --- a/BossMod/Modules/Endwalker/Hunt/RankA/Aegeiros.cs +++ b/BossMod/Modules/Endwalker/Hunt/RankA/Aegeiros.cs @@ -3,7 +3,7 @@ public enum OID : uint { Boss = 0x3671, // R7.500, x1 -}; +} public enum AID : uint { @@ -13,7 +13,7 @@ public enum AID : uint Snowball = 27710, // Boss->location, 3.0s cast, range 8 circle Canopy = 27711, // Boss->players, no cast, range 12 120-degree cone cleave BackhandBlow = 27712, // Boss->self, 3.0s cast, range 12 120-degree cone -}; +} class LeafstormRimestorm : Components.GenericAOEs { diff --git a/BossMod/Modules/Endwalker/Hunt/RankA/ArchEta.cs b/BossMod/Modules/Endwalker/Hunt/RankA/ArchEta.cs index 363b4faf7e..313233ecd3 100644 --- a/BossMod/Modules/Endwalker/Hunt/RankA/ArchEta.cs +++ b/BossMod/Modules/Endwalker/Hunt/RankA/ArchEta.cs @@ -3,7 +3,7 @@ public enum OID : uint { Boss = 0x35C0, // R7.200, x1 -}; +} public enum AID : uint { @@ -14,7 +14,7 @@ public enum AID : uint SonicHowl = 27272, // Boss->self, 5.0s cast, range 30 circle SteelFang = 27273, // Boss->player, 5.0s cast, single-target FangedLunge = 27274, // Boss->player, no cast, single-target -}; +} class EnergyWave : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Endwalker/Hunt/RankA/FanAil.cs b/BossMod/Modules/Endwalker/Hunt/RankA/FanAil.cs index 73481134ec..8382188983 100644 --- a/BossMod/Modules/Endwalker/Hunt/RankA/FanAil.cs +++ b/BossMod/Modules/Endwalker/Hunt/RankA/FanAil.cs @@ -3,7 +3,7 @@ public enum OID : uint { Boss = 0x35C1, // R5.040, x1 -}; +} public enum AID : uint { @@ -15,7 +15,7 @@ public enum AID : uint DeathSentence = 27379, // Boss->player, 5.0s cast, single-target CycloneWing = 27380, // Boss->self, 5.0s cast, range 35 circle AutoAttack = 27381, // Boss->player, no cast, single-target -}; +} // TODO: ok, this needs investigation... class Divebomb : Components.SelfTargetedLegacyRotationAOEs diff --git a/BossMod/Modules/Endwalker/Hunt/RankA/Gurangatch.cs b/BossMod/Modules/Endwalker/Hunt/RankA/Gurangatch.cs index 6c6a4131c4..2c3aae47d0 100644 --- a/BossMod/Modules/Endwalker/Hunt/RankA/Gurangatch.cs +++ b/BossMod/Modules/Endwalker/Hunt/RankA/Gurangatch.cs @@ -3,7 +3,7 @@ public enum OID : uint { Boss = 0x361B, // R6.000, x1 -}; +} public enum AID : uint { @@ -20,7 +20,7 @@ public enum AID : uint OctupleSlammerRestR = 27500, // Boss->self, 1.0s cast, range 30 180-degree cone WildCharge = 27511, // Boss->players, no cast, width 8 rect charge BoneShaker = 27512, // Boss->self, 4.0s cast, range 30 circle -}; +} class Slammer : Components.GenericRotatingAOE { diff --git a/BossMod/Modules/Endwalker/Hunt/RankA/Hulder.cs b/BossMod/Modules/Endwalker/Hunt/RankA/Hulder.cs index 97189dfd4c..bcc4a9d50b 100644 --- a/BossMod/Modules/Endwalker/Hunt/RankA/Hulder.cs +++ b/BossMod/Modules/Endwalker/Hunt/RankA/Hulder.cs @@ -3,7 +3,7 @@ public enum OID : uint { Boss = 0x35DD, // R5.400, x1 -}; +} public enum AID : uint { diff --git a/BossMod/Modules/Endwalker/Hunt/RankA/LunatenderQueen.cs b/BossMod/Modules/Endwalker/Hunt/RankA/LunatenderQueen.cs index 88c54ae593..e4e40cdd1f 100644 --- a/BossMod/Modules/Endwalker/Hunt/RankA/LunatenderQueen.cs +++ b/BossMod/Modules/Endwalker/Hunt/RankA/LunatenderQueen.cs @@ -3,7 +3,7 @@ public enum OID : uint { Boss = 0x35DF, // R5.320, x1 -}; +} public enum AID : uint { @@ -16,7 +16,7 @@ public enum AID : uint AvertYourEyesInverted = 27369, // Boss->self, 7.0s cast, range 40 circle YouMayApproachInverted = 27370, // Boss->self, 7.0s cast, range 15 circle AwayWithYouInverted = 27371, // Boss->self, 7.0s cast, range 6-40 donut -}; +} class AvertYourEyes : Components.CastGaze { diff --git a/BossMod/Modules/Endwalker/Hunt/RankA/Minerva.cs b/BossMod/Modules/Endwalker/Hunt/RankA/Minerva.cs index 582d0b5e3c..a237f56206 100644 --- a/BossMod/Modules/Endwalker/Hunt/RankA/Minerva.cs +++ b/BossMod/Modules/Endwalker/Hunt/RankA/Minerva.cs @@ -3,7 +3,7 @@ public enum OID : uint { Boss = 0x3609, // R6.000, x1 -}; +} public enum AID : uint { diff --git a/BossMod/Modules/Endwalker/Hunt/RankA/MoussePrincess.cs b/BossMod/Modules/Endwalker/Hunt/RankA/MoussePrincess.cs index 29e337f8db..26d175717e 100644 --- a/BossMod/Modules/Endwalker/Hunt/RankA/MoussePrincess.cs +++ b/BossMod/Modules/Endwalker/Hunt/RankA/MoussePrincess.cs @@ -3,7 +3,7 @@ public enum OID : uint { Boss = 0x360B, // R6.000, x1 -}; +} public enum AID : uint { @@ -15,7 +15,7 @@ public enum AID : uint PrincessCacophony = 27322, // Boss->location, 5.0s cast, range 12 circle Banish = 27323, // Boss->player, 5.0s cast, single-target RemoveWhimsy = 27634, // Boss->self, no cast, single-target, removes whimsy debuffs -}; +} public enum SID : uint { diff --git a/BossMod/Modules/Endwalker/Hunt/RankA/Petalodus.cs b/BossMod/Modules/Endwalker/Hunt/RankA/Petalodus.cs index 2a51f2e8a6..f4835fc91a 100644 --- a/BossMod/Modules/Endwalker/Hunt/RankA/Petalodus.cs +++ b/BossMod/Modules/Endwalker/Hunt/RankA/Petalodus.cs @@ -3,7 +3,7 @@ public enum OID : uint { Boss = 0x35FB, // R5.400, x1 -}; +} public enum AID : uint { diff --git a/BossMod/Modules/Endwalker/Hunt/RankA/Storsie.cs b/BossMod/Modules/Endwalker/Hunt/RankA/Storsie.cs index 409ca753b0..dda775c2a8 100644 --- a/BossMod/Modules/Endwalker/Hunt/RankA/Storsie.cs +++ b/BossMod/Modules/Endwalker/Hunt/RankA/Storsie.cs @@ -3,7 +3,7 @@ public enum OID : uint { Boss = 0x35DE, // R5.290, x1 -}; +} public enum AID : uint { diff --git a/BossMod/Modules/Endwalker/Hunt/RankA/Sugriva.cs b/BossMod/Modules/Endwalker/Hunt/RankA/Sugriva.cs index cf239f2a57..1ddf4633fc 100644 --- a/BossMod/Modules/Endwalker/Hunt/RankA/Sugriva.cs +++ b/BossMod/Modules/Endwalker/Hunt/RankA/Sugriva.cs @@ -3,7 +3,7 @@ public enum OID : uint { Boss = 0x35FC, // R6.000, x1 -}; +} public enum AID : uint { diff --git a/BossMod/Modules/Endwalker/Hunt/RankA/Yilan.cs b/BossMod/Modules/Endwalker/Hunt/RankA/Yilan.cs index 8d5a9f7c6c..fbfa48447d 100644 --- a/BossMod/Modules/Endwalker/Hunt/RankA/Yilan.cs +++ b/BossMod/Modules/Endwalker/Hunt/RankA/Yilan.cs @@ -3,7 +3,7 @@ public enum OID : uint { Boss = 0x35BF, // R5.400, x1 -}; +} public enum AID : uint { @@ -13,7 +13,7 @@ public enum AID : uint Devour = 27232, // Boss->self, 1.0s cast, range 10 ?-degree cone, kills seduced and deals very small damage otherwise BogBomb = 27233, // Boss->location, 4.0s cast, range 6 circle BrackishRain = 27234, // Boss->self, 4.0s cast, range 10 90-degree cone -}; +} public enum SID : uint { diff --git a/BossMod/Modules/Endwalker/Hunt/RankS/Armstrong.cs b/BossMod/Modules/Endwalker/Hunt/RankS/Armstrong.cs index a0eebe2db0..9a2b8b5d11 100644 --- a/BossMod/Modules/Endwalker/Hunt/RankS/Armstrong.cs +++ b/BossMod/Modules/Endwalker/Hunt/RankS/Armstrong.cs @@ -3,7 +3,7 @@ public enum OID : uint { Boss = 0x35BE, // R7.800, x1 -}; +} public enum AID : uint { @@ -17,7 +17,7 @@ public enum AID : uint CalculatedCombustion = 27476, // Boss->self, 5.0s cast, range 35 circle Pummel = 27477, // Boss->player, 5.0s cast, single-target SoporificGas = 27478, // Boss->self, 6.0s cast, range 12 circle -}; +} class MagitekCompressor : Components.GenericRotatingAOE { diff --git a/BossMod/Modules/Endwalker/Hunt/RankS/Burfurlur.cs b/BossMod/Modules/Endwalker/Hunt/RankS/Burfurlur.cs index 825048074f..fbb0df4c90 100644 --- a/BossMod/Modules/Endwalker/Hunt/RankS/Burfurlur.cs +++ b/BossMod/Modules/Endwalker/Hunt/RankS/Burfurlur.cs @@ -3,7 +3,7 @@ public enum OID : uint { Boss = 0x360A, // R6.000, x1 -}; +} public enum AID : uint { @@ -17,7 +17,7 @@ public enum AID : uint QuintupleSneeze35 = 27693, // Boss->self, 0.5s cast, range 40 45-degree cone Uppercut = 27314, // Boss->self, 3.0s cast, range 15 120-degree cone RottenSpores = 27313, // Boss->location, 3.0s cast, range 6 circle -}; +} class QuintupleSneeze : Components.GenericAOEs { diff --git a/BossMod/Modules/Endwalker/Hunt/RankS/Ker.cs b/BossMod/Modules/Endwalker/Hunt/RankS/Ker.cs index 8592cf6df5..4c770868fd 100644 --- a/BossMod/Modules/Endwalker/Hunt/RankS/Ker.cs +++ b/BossMod/Modules/Endwalker/Hunt/RankS/Ker.cs @@ -3,7 +3,7 @@ public enum OID : uint { Boss = 0x35CF, // R8.000, x1 -}; +} public enum AID : uint { @@ -35,7 +35,7 @@ public enum AID : uint Mirrored_RearInterment = 27662, // Boss->self, 6,0s cast, range 40 180-degree cone unknown = 25698, // Boss->player, no cast, single-target, no idea what this is for, gets very rarely used, my 6min replay from pull to death doesn't have it for instance -}; +} public enum SID : uint { TemporaryMisdirection = 1422, // Boss->player, extra=0x2D0 @@ -44,7 +44,7 @@ public enum SID : uint Pyretic = 960, // Boss->player, extra=0x0 Doom = 1970, // Boss->player WhispersManifest = 2847, // Boss->Boss, extra=0x0 -}; +} class MinaxGlare : Components.CastHint { diff --git a/BossMod/Modules/Endwalker/Hunt/RankS/KerShroud.cs b/BossMod/Modules/Endwalker/Hunt/RankS/KerShroud.cs index 659198e245..3aabbddded 100644 --- a/BossMod/Modules/Endwalker/Hunt/RankS/KerShroud.cs +++ b/BossMod/Modules/Endwalker/Hunt/RankS/KerShroud.cs @@ -3,14 +3,14 @@ public enum OID : uint { Boss = 0x3672, // R2.500, x1 -}; +} public enum AID : uint { AutoAttack = 872, // Boss->player, no cast, single-target AccursedPox = 27725, // Boss->location, 5.0s cast, range 8 circle EntropicFlame = 27724, // Boss->self, 4.0s cast, range 60 width 8 rect -}; +} class AccursedPox : Components.LocationTargetedAOEs { diff --git a/BossMod/Modules/Endwalker/Hunt/RankS/NarrowRift.cs b/BossMod/Modules/Endwalker/Hunt/RankS/NarrowRift.cs index d89bdfafa1..60e5023c28 100644 --- a/BossMod/Modules/Endwalker/Hunt/RankS/NarrowRift.cs +++ b/BossMod/Modules/Endwalker/Hunt/RankS/NarrowRift.cs @@ -3,7 +3,7 @@ public enum OID : uint { Boss = 0x35DB, // R6.000, x1 -}; +} public enum AID : uint { @@ -22,7 +22,7 @@ public enum AID : uint EmptyRefrainDonutFirst = 27332, // Boss->self, 13.5s cast, range 6-40 donut EmptyRefrainCircleSecond = 27335, // Boss->self, 1.0s cast, range 10 circle EmptyRefrainDonutSecond = 27337, // Boss->self, 1.0s cast, range 6-40 donut -}; +} public enum SID : uint { @@ -31,7 +31,7 @@ public enum SID : uint LeftFace = 1960, // Boss->player, extra=0x0 RightFace = 1961, // Boss->player, extra=0x0 ForcedMarch = 1257, // Boss->player, extra=1 (forward) / 2 (backward) / 4 (left) / 8 (right) -}; +} class EmptyPromise : Components.GenericAOEs { diff --git a/BossMod/Modules/Endwalker/Hunt/RankS/Ophioneus.cs b/BossMod/Modules/Endwalker/Hunt/RankS/Ophioneus.cs index b2a26d1e94..68eddbc828 100644 --- a/BossMod/Modules/Endwalker/Hunt/RankS/Ophioneus.cs +++ b/BossMod/Modules/Endwalker/Hunt/RankS/Ophioneus.cs @@ -3,7 +3,7 @@ public enum OID : uint { Boss = 0x35DC, // R5.875, x1 -}; +} public enum AID : uint { @@ -17,7 +17,7 @@ public enum AID : uint LeapingPyricCircleAOE = 27346, // Boss->self, 1.0s cast, range 5-40 donut LeapingPyricBurstAOE = 27347, // Boss->self, 1.0s cast, range 40 circle with ? falloff Scratch = 27348, // Boss->player, 5.0s cast, single-target -}; +} class RightMaw : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Endwalker/Hunt/RankS/Ruminator.cs b/BossMod/Modules/Endwalker/Hunt/RankS/Ruminator.cs index 01eb07ab0d..03bcc22b98 100644 --- a/BossMod/Modules/Endwalker/Hunt/RankS/Ruminator.cs +++ b/BossMod/Modules/Endwalker/Hunt/RankS/Ruminator.cs @@ -3,7 +3,7 @@ public enum OID : uint { Boss = 0x35BD, // R7.800, x1 -}; +} public enum AID : uint { @@ -21,7 +21,7 @@ public enum AID : uint ChitinousReversalCircleRest = 26167, // Boss->self, no cast, range 8 circle ChitinousReversalDonutRest = 26168, // Boss->self, no cast, range 8-40 donut StygianVapor = 26882, // Boss->self, 5.0s cast, range 40 circle -}; +} class ChitinousTrace : Components.GenericAOEs { diff --git a/BossMod/Modules/Endwalker/Hunt/RankS/Sphatika.cs b/BossMod/Modules/Endwalker/Hunt/RankS/Sphatika.cs index 55a159e633..9635ee0525 100644 --- a/BossMod/Modules/Endwalker/Hunt/RankS/Sphatika.cs +++ b/BossMod/Modules/Endwalker/Hunt/RankS/Sphatika.cs @@ -3,7 +3,7 @@ public enum OID : uint { Boss = 0x3670, // R8.750, x1 -}; +} public enum AID : uint { @@ -28,7 +28,7 @@ public enum AID : uint HindWhipRightward = 27633, // Boss->self, 1.0s cast, range 40 180-degree cone aimed left (with rightward bearing) LongLickSecond = 27714, // Boss->self, 1.0s cast, range 40 180-degree cone (after hind whip) HindWhipSecond = 27715, // Boss->self, 1.0s cast, range 40 180-degree cone (after long lick) -}; +} public enum SID : uint { @@ -36,7 +36,7 @@ public enum SID : uint BackwardBearing = 2836, // Boss->Boss, extra=0x0 LeftwardBearing = 2837, // Boss->Boss, extra=0x0 RightwardBearing = 2838, // Boss->Boss, extra=0x0 -}; +} class Gnaw : Components.SingleTargetCast { diff --git a/BossMod/Modules/Endwalker/Quest/Endwalker/EndwalkerEnums.cs b/BossMod/Modules/Endwalker/Quest/Endwalker/EndwalkerEnums.cs index b8996c384b..86918b8fd6 100644 --- a/BossMod/Modules/Endwalker/Quest/Endwalker/EndwalkerEnums.cs +++ b/BossMod/Modules/Endwalker/Quest/Endwalker/EndwalkerEnums.cs @@ -7,7 +7,7 @@ public enum OID : uint ZenosP1 = 0x3364, // R2.001, x1 ZenosP2 = 0x3365, // R2.001, x1 Puddles = 0x1E950D, // R0.500, EventObj type, spawn during fight -}; +} public enum AID : uint { @@ -61,7 +61,7 @@ public enum AID : uint UnmovingDvenadkatik = 26955, // ZenosP2->self, 5.0s cast, single-target UnmovingDvenadkatikVisual = 26956, // Helpers->self, 6.0s cast, range 50 30-degree cone TheEdgeUnbound2 = 26957, // ZenosP2->self, 4.0s cast, range 10 circle -}; +} public enum SID : uint { @@ -76,4 +76,4 @@ public enum SID : uint _Gen_Unk03 = 2850, // none->player, extra=0x0 SparkOfHope = 2786, // none->player, extra=0x5/0x4/0x3/0x2/0x1 _Gen_Unk04 = 2881, // none->player, extra=0x0 -}; +} diff --git a/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/P10SPandaemoniumEnums.cs b/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/P10SPandaemoniumEnums.cs index 37e00c15bf..e80b9d2c6f 100644 --- a/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/P10SPandaemoniumEnums.cs +++ b/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/P10SPandaemoniumEnums.cs @@ -9,7 +9,7 @@ public enum OID : uint Pillar = 0x3F21, // R0.200, x6 Helper = 0x233C, // R0.500, x23 ArcaneSphere = 0x3F22, // R0.700, spawn during fight -}; +} public enum AID : uint { @@ -69,7 +69,7 @@ public enum AID : uint HarrowingHellKnockback = 33428, // Helper->self, 3.9s cast, range 60 width 60 rect PartedPlumes = 33429, // Boss->self, 3.0s cast, single-target, visual PartedPlumesAOE = 33430, // Helper->self, 4.0s cast, range 50 20-degree cone -}; +} public enum SID : uint { @@ -77,7 +77,7 @@ public enum SID : uint DuodaemoniacBonds = 3551, // none->player, extra=0x0 TetradaemoniacBonds = 3696, // none->player, extra=0x0 DarkResistanceDown = 3323, // PandaemoniacPillarTurret->player, extra=0x0 -}; +} public enum IconID : uint { @@ -90,11 +90,11 @@ public enum IconID : uint Order2 = 337, // PandaemoniacPillarTurret Order3 = 338, // PandaemoniacPillarTurret Order4 = 339, // PandaemoniacPillarTurret -}; +} public enum TetherID : uint { DividingWings = 242, // Helper->player Web = 226, // player/Pillar->player/Pillar WebFail = 227, // player->player -}; +} diff --git a/BossMod/Modules/Endwalker/Savage/P11SThemis/P11SThemisEnums.cs b/BossMod/Modules/Endwalker/Savage/P11SThemis/P11SThemisEnums.cs index 5e0e337e0c..4d95fbffd8 100644 --- a/BossMod/Modules/Endwalker/Savage/P11SThemis/P11SThemisEnums.cs +++ b/BossMod/Modules/Endwalker/Savage/P11SThemis/P11SThemisEnums.cs @@ -11,7 +11,7 @@ public enum OID : uint SphereLight = 0x3EF7, // R1.000, x2 SphereDark = 0x3EF8, // R1.000, x2 ArcaneCylinder = 0x3EF9, // R1.000, x3 -}; +} public enum AID : uint { @@ -110,7 +110,7 @@ public enum AID : uint MassiveExplosion = 33320, // Helper->self, no cast, range 50 circle unsoaked tower UltimateVerdict = 33324, // Boss->self, 10.0s cast, range 50 circle enrage -}; +} public enum IconID : uint { @@ -119,7 +119,7 @@ public enum IconID : uint RotateCW = 156, // ArcaneCylinder RotateCCW = 157, // ArcaneCylinder BlindingLight = 466, // player -}; +} public enum TetherID : uint { @@ -131,4 +131,4 @@ public enum TetherID : uint DarkLightGood = 240, // player->player (dist < ~7) DarkLightBad = 241, // player->player (dist > ~7) //_Gen_Tether_245 = 245, // player->player - happens when one of the tethered player dies? -}; +} diff --git a/BossMod/Modules/Endwalker/Savage/P12S1Athena/P12S1AthenaEnums.cs b/BossMod/Modules/Endwalker/Savage/P12S1Athena/P12S1AthenaEnums.cs index de5a274e4f..80615d4688 100644 --- a/BossMod/Modules/Endwalker/Savage/P12S1Athena/P12S1AthenaEnums.cs +++ b/BossMod/Modules/Endwalker/Savage/P12S1Athena/P12S1AthenaEnums.cs @@ -15,7 +15,7 @@ public enum OID : uint SuperchainSpread = 0x3F33, // R0.600, spawn during fight SuperchainPairs = 0x3F34, // R0.600, spawn during fight PalladionVoidzone = 0x1E8FEA, // R0.500, EventObj type, spawn during fight -}; +} public enum AID : uint { @@ -94,7 +94,7 @@ public enum AID : uint TheosUltimaEnrage = 34134, // Boss->self, 7.0s cast, range 60 circle, enrage TransitionVisual = 33611, // Helper->self, 5.0s cast, range 10 width 40 rect, ??? (is interrupted 2s after start) TransitionStun = 33612, // Helper->location, no cast, range 60 circle (attract 60 + apply down for the count) -}; +} public enum SID : uint { @@ -111,7 +111,7 @@ public enum SID : uint //_Gen_ = 2056, // none->SuperchainOrigin, extra=0x247 //_Gen_Concussion = 2944, // Boss->player, extra=0x0 //_Gen_EnchainedSoul = 3585, // none->player, extra=0x0 -}; +} public enum IconID : uint { @@ -136,7 +136,7 @@ public enum IconID : uint Palladion6 = 438, // player Palladion7 = 439, // player Palladion8 = 440, // player -}; +} public enum TetherID : uint { @@ -149,4 +149,4 @@ public enum TetherID : uint SuperchainSpread = 230, // SuperchainSpread->SuperchainOrigin SuperchainPairs = 231, // SuperchainPairs->SuperchainOrigin UnnaturalEnchainment = 232, // Wing->Boss (destroyed platform) -}; +} diff --git a/BossMod/Modules/Endwalker/Savage/P12S2PallasAthena/P12S2PallasAthenaEnums.cs b/BossMod/Modules/Endwalker/Savage/P12S2PallasAthena/P12S2PallasAthenaEnums.cs index 36a153bae1..b81e5080b0 100644 --- a/BossMod/Modules/Endwalker/Savage/P12S2PallasAthena/P12S2PallasAthenaEnums.cs +++ b/BossMod/Modules/Endwalker/Savage/P12S2PallasAthena/P12S2PallasAthenaEnums.cs @@ -9,7 +9,7 @@ public enum OID : uint ConceptOfWater = 0x3F38, // R1.000, spawn during fight (hexagon) ConceptOfEarth = 0x3F39, // R1.000, spawn during fight (square) ForbiddenFactor = 0x3F3A, // R1.000, spawn during fight (pangenesis slime) -}; +} public enum AID : uint { @@ -82,7 +82,7 @@ public enum AID : uint ExFactor = 33601, // Helper->players, no cast, range 60 circle, wipe if not enough slimes were spawned Ignorabimus = 33609, // Boss->self, 15.0s cast, range 100 circle, enrage -}; +} public enum SID : uint { @@ -103,7 +103,7 @@ public enum SID : uint //_Gen_MissingLink = 3587, // none->player, extra=0x0 //_Gen_ShackledTogether = 3588, // none->player, extra=0x0 //_Gen_EntropyResistance = 3617, // none->player, extra=0x0 -}; +} public enum IconID : uint { @@ -117,7 +117,7 @@ public enum IconID : uint CaloricTheory1InitialFire = 303, // player CaloricTheory2InitialWind = 469, // player CaloricTheory2InitialFire = 470, // player -}; +} public enum TetherID : uint { @@ -126,4 +126,4 @@ public enum TetherID : uint ClassicalConceptsShapes = 1, // ConceptOfEarth/ConceptOfFire/Hemitheos->player/ConceptOfWater BiochemicalFactor = 213, // player->player FactorIn = 84, // ForbiddenFactor->player -}; +} diff --git a/BossMod/Modules/Endwalker/Savage/P1SErichthonios/P1SEnums.cs b/BossMod/Modules/Endwalker/Savage/P1SErichthonios/P1SEnums.cs index 6b5c1d29e3..83644a5aa2 100644 --- a/BossMod/Modules/Endwalker/Savage/P1SErichthonios/P1SEnums.cs +++ b/BossMod/Modules/Endwalker/Savage/P1SErichthonios/P1SEnums.cs @@ -7,7 +7,7 @@ public enum OID : uint FlailLR = 0x3523, // "anchor" weapon, purely visual FlailI = 0x3524, // "ball" weapon, also used for knockbacks FlailO = 0x3525, // "chakram" weapon -}; +} public enum AID : uint { @@ -61,7 +61,7 @@ public enum AID : uint GaolerFlailO2 = 28077, // Helper->self, second hit, donut InevitableFlame = 28353, // Helper->self, no cast, after SoT resolve to red - hit others standing in fire InevitableLight = 28354, // Helper->self, no cast, after SoT resolve to red - hit others standing in blue -}; +} public enum SID : uint { diff --git a/BossMod/Modules/Endwalker/Savage/P2SHippokampos/P2SEnums.cs b/BossMod/Modules/Endwalker/Savage/P2SHippokampos/P2SEnums.cs index f964a3cec0..d1717e6a51 100644 --- a/BossMod/Modules/Endwalker/Savage/P2SHippokampos/P2SEnums.cs +++ b/BossMod/Modules/Endwalker/Savage/P2SHippokampos/P2SEnums.cs @@ -6,7 +6,7 @@ public enum OID : uint CataractHead = 0x359C, DissociatedHead = 0x386A, Helper = 0x233C, // x24 -}; +} public enum AID : uint { @@ -44,7 +44,7 @@ public enum AID : uint TaintedFloodAOE = 26680, // Helper->targets AutoAttack = 27978, // Boss->MT, no cast ChannelingOverflow = 28098, // Boss->Boss (both 2nd and 3rd arrows) -}; +} public enum SID : uint { diff --git a/BossMod/Modules/Endwalker/Savage/P2SHippokampos/SewageDeluge.cs b/BossMod/Modules/Endwalker/Savage/P2SHippokampos/SewageDeluge.cs index 9bc6c90267..144d58d81c 100644 --- a/BossMod/Modules/Endwalker/Savage/P2SHippokampos/SewageDeluge.cs +++ b/BossMod/Modules/Endwalker/Savage/P2SHippokampos/SewageDeluge.cs @@ -3,7 +3,7 @@ // state related to sewage deluge mechanic class SewageDeluge : BossComponent { - public enum Corner { None, NW, NE, SW, SE }; + public enum Corner { None, NW, NE, SW, SE } private Corner _blockedCorner = Corner.None; diff --git a/BossMod/Modules/Endwalker/Savage/P3SPhoinix/P3SEnums.cs b/BossMod/Modules/Endwalker/Savage/P3SPhoinix/P3SEnums.cs index 28c8504c06..f250372151 100644 --- a/BossMod/Modules/Endwalker/Savage/P3SPhoinix/P3SEnums.cs +++ b/BossMod/Modules/Endwalker/Savage/P3SPhoinix/P3SEnums.cs @@ -12,7 +12,7 @@ public enum OID : uint DarkblazeTwister = 0x3547, // spawned mid fight, tornadoes SparkfledgedUnknown = 0x3800, // spawned mid fight, have weird kind... - look like "eyes" during death toll?.. Helper = 0x233C, // x45 -}; +} public enum AID : uint { @@ -79,7 +79,7 @@ public enum AID : uint ScorchedExaltation = 26374, // Boss->Boss FinalExaltation = 27691, // Boss->Boss DevouringBrandAOE = 28035, // Helper->Helper (one in the center), 20sec cast -}; +} public enum SID : uint { diff --git a/BossMod/Modules/Endwalker/Savage/P4S1Hesperos/P4S1Enums.cs b/BossMod/Modules/Endwalker/Savage/P4S1Hesperos/P4S1Enums.cs index 53e6161670..48bee98907 100644 --- a/BossMod/Modules/Endwalker/Savage/P4S1Hesperos/P4S1Enums.cs +++ b/BossMod/Modules/Endwalker/Savage/P4S1Hesperos/P4S1Enums.cs @@ -6,7 +6,7 @@ public enum OID : uint Pinax = 0x35FE, // '', 4x exist at start at [90/110, 90/110] Orb = 0x35FF, // orbs spawned by Belone Bursts Helper = 0x233C, // 38 exist at start -}; +} public enum AID : uint { @@ -61,7 +61,7 @@ public enum AID : uint Decollation = 27145, // Boss->Boss VengefulBelone = 28194, // Boss->Boss InversiveChlamysAOE2 = 28437, // Helper->target, no cast, damage to tethered targets (during belone coils) -}; +} public enum SID : uint { diff --git a/BossMod/Modules/Endwalker/Savage/P4S2Hesperos/P4S2Enums.cs b/BossMod/Modules/Endwalker/Savage/P4S2Hesperos/P4S2Enums.cs index 156898d764..89d80d96d9 100644 --- a/BossMod/Modules/Endwalker/Savage/P4S2Hesperos/P4S2Enums.cs +++ b/BossMod/Modules/Endwalker/Savage/P4S2Hesperos/P4S2Enums.cs @@ -5,7 +5,7 @@ public enum OID : uint Boss = 0x3600, // second phase boss (exists from start, but recreated on checkpoint) Akantha = 0x3601, // ?? 'akantha', 12 exist at start Helper = 0x233C, // 38 exist at start -}; +} public enum AID : uint { @@ -54,7 +54,7 @@ public enum AID : uint AkanthaiAct4 = 28342, // Boss->Boss AkanthaiFinale = 28343, // Boss->Boss FleetingImpulse = 28344, // Boss->Boss -}; +} public enum SID : uint { diff --git a/BossMod/Modules/Endwalker/Savage/P5SProtoCarbuncle/P5SEnums.cs b/BossMod/Modules/Endwalker/Savage/P5SProtoCarbuncle/P5SEnums.cs index 6a17cbcd84..0907137ec0 100644 --- a/BossMod/Modules/Endwalker/Savage/P5SProtoCarbuncle/P5SEnums.cs +++ b/BossMod/Modules/Endwalker/Savage/P5SProtoCarbuncle/P5SEnums.cs @@ -9,7 +9,7 @@ public enum OID : uint LivelyBait = 0x39ED, // spawn during fight TopazStoneAny = 0x1EB78C, // EventObj type, spawn during fight ('bent circle' spawns near wall and looks towards wall) TopazStonePoison = 0x1EB78D, // EventObj type, spawn during fight -}; +} public enum AID : uint { @@ -82,4 +82,4 @@ public enum AID : uint SonicShatter = 30497, // Boss->self, 5.0s cast, raidwide SonicShatterRest = 30498, // Boss->self, no cast, raidwide AcidicSlaver = 30499, // Boss->self, 5.0s cast, enrage -}; +} diff --git a/BossMod/Modules/Endwalker/Savage/P6SHegemone/P6SEnums.cs b/BossMod/Modules/Endwalker/Savage/P6SHegemone/P6SEnums.cs index 619e969e4b..ad4f89ecab 100644 --- a/BossMod/Modules/Endwalker/Savage/P6SHegemone/P6SEnums.cs +++ b/BossMod/Modules/Endwalker/Savage/P6SHegemone/P6SEnums.cs @@ -8,7 +8,7 @@ public enum OID : uint Parasitos = 0x3AEB, // x8 (transmission) //_Gen_Parasitos = 0x3A38, // x8 //_Gen_Parasitos = 0x3A39, // x4 -}; +} public enum AID : uint { @@ -82,7 +82,7 @@ public enum AID : uint DarkSphereAOE = 30864, // Helper->players, 6.0s cast, range 10 circle aoe (spread) Enrage = 30867, // Boss->self, 10.0s cast -}; +} public enum SID : uint { @@ -93,7 +93,7 @@ public enum SID : uint Glossomorph = 3400, // none->player, extra=0x0, snake infection OutOfControlWing = 3362, // none->player, extra=0x0 OutOfControlSnake = 3316, // none->player, extra=0x0 -}; +} public enum TetherID : uint { @@ -101,7 +101,7 @@ public enum TetherID : uint TransmissionSnake = 208, // player->Boss TransmissionWing = 209, // player->Boss PolyExchange = 207, // PolySquare->PolySquare -}; +} public enum IconID : uint { @@ -123,4 +123,4 @@ public enum IconID : uint DarkAshes = 101, // player UnholyDarkness = 318, // player DarkSphere = 328, // player -}; +} diff --git a/BossMod/Modules/Endwalker/Savage/P7SAgdistis/P7SEnums.cs b/BossMod/Modules/Endwalker/Savage/P7SAgdistis/P7SEnums.cs index 2fdbe35214..522d475887 100644 --- a/BossMod/Modules/Endwalker/Savage/P7SAgdistis/P7SEnums.cs +++ b/BossMod/Modules/Endwalker/Savage/P7SAgdistis/P7SEnums.cs @@ -13,7 +13,7 @@ public enum OID : uint BridgeDestroyer = 0x3A34, // x3 BullTetherSource = 0x3AD9, // x9 Tower = 0x1EB793, // EventObj type, spawn during fight -}; +} public enum AID : uint { @@ -75,7 +75,7 @@ public enum AID : uint BullishSlash = 30743, // ImmatureMinotaur->self, no cast, range 60 45-degree cone (tethered minotaur) BullishSwipe = 30744, // ImmatureMinotaur->self, 2.5s cast, single-target, visual (untethered minotaur) BullishSwipeAOE = 30745, // Helper->self, 3.0s cast, range 60 90-degree cone aoe (baited from untethered minotaur) -}; +} public enum SID : uint { @@ -91,7 +91,7 @@ public enum SID : uint HolyPurgation2 = 3394, // none->player, extra=0x0 HolyPurgation3 = 3395, // none->player, extra=0x0 HolyPurgation4 = 3396, // none->player, extra=0x0 -}; +} public enum TetherID : uint { @@ -99,4 +99,4 @@ public enum TetherID : uint MinotaurClose = 57, // ImmatureMinotaur->player MinotaurFar = 1, // ImmatureMinotaur->player Bird = 17, // ImmatureStymphalide->player -}; +} diff --git a/BossMod/Modules/Endwalker/Savage/P8S1Hephaistos/P8S1Enums.cs b/BossMod/Modules/Endwalker/Savage/P8S1Hephaistos/P8S1Enums.cs index d1c4eea9ae..ac8c05cb03 100644 --- a/BossMod/Modules/Endwalker/Savage/P8S1Hephaistos/P8S1Enums.cs +++ b/BossMod/Modules/Endwalker/Savage/P8S1Hephaistos/P8S1Enums.cs @@ -9,7 +9,7 @@ public enum OID : uint Suneater = 0x3AD0, // R7.000, x3 (chtonic vent snake) Gorgon = 0x3ACC, // R1.200, spawn during fight CthonicVent = 0x1EB703, // R0.500, EventObj type, spawn during fight -}; +} public enum AID : uint { @@ -99,7 +99,7 @@ public enum AID : uint BreathOfTheGorgon = 31024, // Helper->location, no cast, range 6 circle stack Enrage = 31050, // Boss->self, 5.0s cast, range 60 circle -}; +} public enum SID : uint { @@ -109,4 +109,4 @@ public enum SID : uint CrownOfTheGorgon = 3352, // none->player, extra=0x0 (petrifying circle gaze) BloodOfTheGorgon = 3326, // none->player, extra=0x0 (poison aoe) BreathOfTheGorgon = 3327, // none->player, extra=0x0 (poison stack aoe) -}; +} diff --git a/BossMod/Modules/Endwalker/Savage/P8S2Hephaistos/P8S2Enums.cs b/BossMod/Modules/Endwalker/Savage/P8S2Hephaistos/P8S2Enums.cs index 267213e070..2809fa7a65 100644 --- a/BossMod/Modules/Endwalker/Savage/P8S2Hephaistos/P8S2Enums.cs +++ b/BossMod/Modules/Endwalker/Savage/P8S2Hephaistos/P8S2Enums.cs @@ -6,7 +6,7 @@ public enum OID : uint Helper = 0x233C, // R0.500, x42 IllusoryHephaistosMovable = 0x3AE6, // R5.760, x4 IllusoryHephaistosLanes = 0x3AE7, // R5.760, x8 -}; +} public enum AID : uint { @@ -65,7 +65,7 @@ public enum AID : uint OrogenicAnnihilation = 31194, // Helper->self, no cast, raidwide from unsoaked tower Enrage = 31204, // Boss->self, 16.0s cast -}; +} public enum SID : uint { @@ -93,4 +93,4 @@ public enum SID : uint Supersplice = 3347, // none->player, extra=0x0 (HC 3-person stack) Everburn = 3406, // Helper->player, extra=0x0 (damage up after resurrection) InEvent = 2999, // none->player, extra=0x0 -}; +} diff --git a/BossMod/Modules/Endwalker/Savage/P9SKokytos/P9SKokytosEnums.cs b/BossMod/Modules/Endwalker/Savage/P9SKokytos/P9SKokytosEnums.cs index 52eba3e208..89954e3b03 100644 --- a/BossMod/Modules/Endwalker/Savage/P9SKokytos/P9SKokytosEnums.cs +++ b/BossMod/Modules/Endwalker/Savage/P9SKokytos/P9SKokytosEnums.cs @@ -8,7 +8,7 @@ public enum OID : uint KokytossEcho = 0x3ED8, // R9.500, spawn during fight Comet = 0x3EDA, // R2.400, spawn during fight Charybdis = 0x1EB881, // R0.500, EventObj type, spawn during fight -}; +} public enum AID : uint { @@ -108,7 +108,7 @@ public enum AID : uint Disintegration = 33162, // Boss->self, 10.0s cast, single-target, visual (enrage) DisintegrationAOE = 33163, // Helper->self, no cast, range 60 circle, enrage -}; +} public enum IconID : uint { @@ -124,4 +124,4 @@ public enum IconID : uint Icon8 = 86, // player Icemeld = 330, // player EclipticMeteor = 435, // Comet -}; +} diff --git a/BossMod/Modules/Endwalker/TreasureHunt/TheExcitatron6000/LuckyFace.cs b/BossMod/Modules/Endwalker/TreasureHunt/TheExcitatron6000/LuckyFace.cs index def04ddd34..fff453f75c 100644 --- a/BossMod/Modules/Endwalker/TreasureHunt/TheExcitatron6000/LuckyFace.cs +++ b/BossMod/Modules/Endwalker/TreasureHunt/TheExcitatron6000/LuckyFace.cs @@ -9,7 +9,7 @@ public enum OID : uint ExcitingGarlic = 0x380A, // R0,840, icon 3, needs to be killed in order from 1 to 5 for maximum rewards ExcitingEgg = 0x3809, // R0,840, icon 2, needs to be killed in order from 1 to 5 for maximum rewards ExcitingOnion = 0x3808, // R0,840, icon 1, needs to be killed in order from 1 to 5 for maximum rewards -}; +} public enum AID : uint { @@ -48,13 +48,13 @@ public enum AID : uint HeirloomScream = 6451, // 380B->self, 3,5s cast, range 6+R circle PungentPirouette = 6450, // 380A->self, 3,5s cast, range 6+R circle Pollen = 6452, // 380C->self, 3,5s cast, range 6+R circle -}; +} public enum IconID : uint { tankbuster = 218, spreadmarker = 194, -}; +} class LeftInTheDark1 : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouAcheloios.cs b/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouAcheloios.cs index a21610e215..c9fa08af3a 100644 --- a/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouAcheloios.cs +++ b/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouAcheloios.cs @@ -12,7 +12,7 @@ public enum OID : uint GymnasticTomato = 0x3D52, // R0,840, icon 4, needs to be killed in order from 1 to 5 for maximum rewards BonusAdds_Lampas = 0x3D4D, //R=2.001, bonus loot adds BonusAdds_Lyssa = 0x3D4E, //R=3.75, bonus loot adds -}; +} public enum AID : uint { @@ -40,13 +40,13 @@ public enum AID : uint TearyTwirl = 32301, // GymnasticOnion->self, 3,5s cast, range 7 circle Telega = 9630, // bonusadds->self, no cast, single-target, bonus add disappear HeavySmash = 32317, // BonusAdd_Lyssa->location, 3,0s cast, range 6 circle -}; +} public enum IconID : uint { RotateCW = 167, // Boss RotateCCW = 168, // Boss -}; +} class Slammer : Components.GenericRotatingAOE { diff --git a/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouLeon.cs b/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouLeon.cs index cebd9f1496..2d7fcba3c6 100644 --- a/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouLeon.cs +++ b/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouLeon.cs @@ -6,7 +6,7 @@ public enum OID : uint BossAdd = 0x3D28, //R=3.5 BossHelper = 0x233C, BonusAdds_Lyssa = 0x3D4E, //R=3.75 -}; +} public enum AID : uint { @@ -20,7 +20,7 @@ public enum AID : uint HeavySmash = 32317, // 3D4E->location, 3,0s cast, range 6 circle FlareStar2 = 32816, // 233C->self, 7,0s cast, range 40 circle, AOE with dmg fall off, damage seems to stop falling after about range 10-12 MarkOfTheBeast = 32205, // 3D28->self, 3,0s cast, range 8 120-degree cone -}; +} class InfernoBlast : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouMandragoras.cs b/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouMandragoras.cs index afbdf88fd9..e9cec44e80 100644 --- a/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouMandragoras.cs +++ b/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouMandragoras.cs @@ -10,7 +10,7 @@ public enum OID : uint GymnasticEggplant = 0x3D50, // R0,840, icon 2, needs to be killed in order from 1 to 5 for maximum rewards GymnasticOnion = 0x3D4F, // R0,840, icon 1, needs to be killed in order from 1 to 5 for maximum rewards GymnasticTomato = 0x3D52, // R0,840, icon 4, needs to be killed in order from 1 to 5 for maximum rewards -}; +} public enum AID : uint { @@ -24,7 +24,7 @@ public enum AID : uint PungentPirouette = 32303, // GymnasticGarlic->self, 3,5s cast, range 7 circle TearyTwirl = 32301, // GymnasticOnion->self, 3,5s cast, range 7 circle Telega = 9630, // bonusadds->self, no cast, single-target, bonus add disappear -}; +} class Ram : Components.SingleTargetCast { diff --git a/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouMegakantha.cs b/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouMegakantha.cs index a280c08974..a263408763 100644 --- a/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouMegakantha.cs +++ b/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouMegakantha.cs @@ -8,7 +8,7 @@ public enum OID : uint BossAdd1 = 0x3D35, //R=1.76 BossAdd2 = 0x3D36, //R=1.56 BonusAdds_Lampas = 0x3D4D, //R=2.001, bonus loot adds -}; +} public enum AID : uint { @@ -28,7 +28,7 @@ public enum AID : uint HeavySmash = 32317, // BossAdd->location, 3,0s cast, range 6 circle Telega = 9630, // BonusAdds->self, no cast, single-target, bonus add disappear -}; +} class HeavySmash : Components.LocationTargetedAOEs { diff --git a/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouMeganereis.cs b/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouMeganereis.cs index f84b58ce5a..da0b4973a6 100644 --- a/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouMeganereis.cs +++ b/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouMeganereis.cs @@ -12,7 +12,7 @@ public enum OID : uint GymnasticTomato = 0x3D52, // R0,840, icon 4, needs to be killed in order from 1 to 5 for maximum rewards BonusAdds_Lampas = 0x3D4D, //R=2.001, bonus loot adds BonusAdds_Lyssa = 0x3D4E, //R=3.75, bonus loot adds -}; +} public enum AID : uint { @@ -38,7 +38,7 @@ public enum AID : uint TearyTwirl = 32301, // GymnasticOnion->self, 3,5s cast, range 7 circle Telega = 9630, // bonusadds->self, no cast, single-target, bonus add disappear HeavySmash = 32317, // 3D4E->location, 3,0s cast, range 6 circle -}; +} class Ceras : Components.SingleTargetCast { diff --git a/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouPithekos.cs b/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouPithekos.cs index 534099ee80..fc8c5a581d 100644 --- a/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouPithekos.cs +++ b/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouPithekos.cs @@ -7,7 +7,7 @@ public enum OID : uint BossAdd = 0x3D2C, //R=4.2 BossHelper = 0x233C, BonusAdd_Lyssa = 0x3D4E, //R=3.75, bonus loot adds -}; +} public enum AID : uint { @@ -21,12 +21,12 @@ public enum AID : uint RockThrow = 32217, // BossAdds->location, 3,0s cast, range 6 circle SweepingGouge = 32211, // Boss->player, 5,0s cast, single-target HeavySmash = 32317, // BossAdd_Lyssa -> location 3,0s cast, range 6 circle -}; +} public enum IconID : uint { Thundercall = 111, // Thundercall marker -}; +} class Spark : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouSatyros.cs b/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouSatyros.cs index 6a40167654..4b9ff57a2c 100644 --- a/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouSatyros.cs +++ b/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouSatyros.cs @@ -8,7 +8,7 @@ public enum OID : uint StormsGrip = 0x3D2F, //R=1.0 BonusAdds_Lyssa = 0x3D4E, //R=3.75, bonus loot adds BonusAdds_Lampas = 0x3D4D, //R=2.001, bonus loot adds -}; +} public enum AID : uint { @@ -27,7 +27,7 @@ public enum AID : uint HeavySmash = 32317, // BossAdd->location, 3,0s cast, range 6 circle Telega = 9630, // BonusAdds->self, no cast, single-target, bonus add disappear -}; +} class HeavySmash : Components.LocationTargetedAOEs { diff --git a/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouSphinx.cs b/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouSphinx.cs index c60d84b98f..fa32a0da00 100644 --- a/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouSphinx.cs +++ b/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouSphinx.cs @@ -13,7 +13,7 @@ public enum OID : uint GymnasticTomato = 0x3D52, // R0,840, icon 4, needs to be killed in order from 1 to 5 for maximum rewards BonusAdds_Lampas = 0x3D4D, //R=2.001, bonus loot adds BonusAdds_Lyssa = 0x3D4E, //R=3.75, bonus loot adds -}; +} public enum AID : uint { @@ -37,7 +37,7 @@ public enum AID : uint TearyTwirl = 32301, // GymnasticOnion->self, 3,5s cast, range 7 circle Telega = 9630, // bonusadds->self, no cast, single-target, bonus add disappear HeavySmash = 32317, // 3D4E->location, 3,0s cast, range 6 circle -}; +} class Scratch : Components.SingleTargetCast { diff --git a/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouStyphnolobion.cs b/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouStyphnolobion.cs index 655f7f9df4..fbeeb3894d 100644 --- a/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouStyphnolobion.cs +++ b/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouStyphnolobion.cs @@ -11,7 +11,7 @@ public enum OID : uint GymnasticOnion = 0x3D4F, // R0,840, icon 1, needs to be killed in order from 1 to 5 for maximum rewards GymnasticTomato = 0x3D52, // R0,840, icon 4, needs to be killed in order from 1 to 5 for maximum rewards BonusAdds_Lyssa = 0x3D4E, //R=3.75 -}; +} public enum AID : uint { @@ -36,7 +36,7 @@ public enum AID : uint TearyTwirl = 32301, // GymnasticOnion->self, 3,5s cast, range 7 circle Telega = 9630, // bonusadds->self, no cast, single-target, bonus add disappear HeavySmash = 32317, // 3D4E->location, 3,0s cast, range 6 circle -}; +} class Rake : Components.SingleTargetCast { diff --git a/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouTigris.cs b/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouTigris.cs index af133375b5..9732ff3f3a 100644 --- a/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouTigris.cs +++ b/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouTigris.cs @@ -11,7 +11,7 @@ public enum OID : uint GymnasticOnion = 0x3D4F, // R0,840, icon 1, needs to be killed in order from 1 to 5 for maximum rewards GymnasticTomato = 0x3D52, // R0,840, icon 4, needs to be killed in order from 1 to 5 for maximum rewards BonusAdds_Lyssa = 0x3D4E, //R=3.75, bonus loot adds -}; +} public enum AID : uint { @@ -29,7 +29,7 @@ public enum AID : uint TearyTwirl = 32301, // GymnasticOnion->self, 3,5s cast, range 7 circle Telega = 9630, // bonusadds->self, no cast, single-target, bonus add disappear HeavySmash = 32317, // BossAdd->location, 3,0s cast, range 6 circle -}; +} class HeavySmash : Components.LocationTargetedAOEs { diff --git a/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouTriton.cs b/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouTriton.cs index ab47aeedad..6f2bdfe3a7 100644 --- a/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouTriton.cs +++ b/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouTriton.cs @@ -6,7 +6,7 @@ public enum OID : uint BossAdd = 0x3D31, //R=2.2 BossHelper = 0x233C, Bubble = 0x3D32, //R=1.0 -}; +} public enum AID : uint { @@ -18,7 +18,7 @@ public enum AID : uint WateryGrave = 32234, // Bubble->self, no cast, range 2 circle, voidzone, imprisons player until status runs out NavalRam = 32232, // BossAdd->player, no cast, single-target ProtolithicPuncture = 32228, // Boss->player, 5,0s cast, single-target -}; +} class PelagicCleaver : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/LampasChrysine.cs b/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/LampasChrysine.cs index 5295ede663..9ee995358d 100644 --- a/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/LampasChrysine.cs +++ b/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/LampasChrysine.cs @@ -5,7 +5,7 @@ public enum OID : uint Boss = 0x3D40, //R=6 BossHelper = 0x233C, BonusAdds_Lampas = 0x3D4D, //R=2.001, bonus loot adds -}; +} public enum AID : uint { @@ -19,7 +19,7 @@ public enum AID : uint Shine2 = 32292, // BossHelper->location, 3,0s cast, range 5 circle Summon = 32288, // Boss->self, 1,3s cast, single-target, spawns bonus loot adds Telega = 9630, // BonusAdds_Lampas->self, no cast, single-target, bonus loot add despawn -}; +} class Shine : Components.LocationTargetedAOEs { diff --git a/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/LyssaChrysine.cs b/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/LyssaChrysine.cs index 388749a0f5..f7164ae3ca 100644 --- a/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/LyssaChrysine.cs +++ b/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/LyssaChrysine.cs @@ -7,7 +7,7 @@ public enum OID : uint BossHelper = 0x233C, IcePillars = 0x3D44, BonusAdds_Lampas = 0x3D4D, //R=2.001, bonus loot adds -}; +} public enum AID : uint { @@ -26,7 +26,7 @@ public enum AID : uint FrigidStone = 32308, // Boss->self, 2,5s cast, single-target, activates helpers FrigidStone2 = 32309, // BossHelper->location, 3,0s cast, range 5 circle Telega = 9630, // BonusAdds->self, no cast, single-target, bonus add disappear -}; +} class HeavySmash2 : Components.LocationTargetedAOEs { diff --git a/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/Narkissos.cs b/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/Narkissos.cs index 2937c01dc1..d3385d3dc3 100644 --- a/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/Narkissos.cs +++ b/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/Narkissos.cs @@ -6,7 +6,7 @@ public enum OID : uint BossHelper = 0x233C, BonusAdds_Lampas = 0x3D4D, //R=2.001, bonus loot adds BonusAdds_Lyssa = 0x3D4E, //R=3.75, bonus loot adds -}; +} public enum AID : uint { @@ -23,7 +23,7 @@ public enum AID : uint BeguilingGas = 32331, // Boss->self, 5,0s cast, range 40 circle, Temporary Misdirection Brainstorm = 32334, // Boss->self, 5,0s cast, range 40 circle, Forced March debuffs PutridBreath = 32338, // Boss->self, 4,0s cast, range 25 90-degree cone -}; +} public enum SID : uint { @@ -34,7 +34,7 @@ public enum SID : uint ForwardMarch = 1958, // Boss->player, extra=0x0 AboutFace = 1959, // Boss->player, extra=0x0 LeftFace = 1960, // Boss->player, extra=0x0 -}; +} class Brainstorm : Components.StatusDrivenForcedMarch { diff --git a/BossMod/Modules/Endwalker/Trial/T02Hydaelyn/T02HydaelynEnums.cs b/BossMod/Modules/Endwalker/Trial/T02Hydaelyn/T02HydaelynEnums.cs index c15b1bad36..77a653d6f5 100644 --- a/BossMod/Modules/Endwalker/Trial/T02Hydaelyn/T02HydaelynEnums.cs +++ b/BossMod/Modules/Endwalker/Trial/T02Hydaelyn/T02HydaelynEnums.cs @@ -63,12 +63,12 @@ public enum AID : uint Lightwave = 26260, // Boss->self, 4,0s cast, single-target Lightwave2 = 26261, // Boss->self, 4,0s cast, single-target Lightwave3 = 26259, // Boss->self, 4,0s cast, single-target -}; +} public enum IconID : uint { Echoes = 305, // player, stack 5 times -}; +} public enum SID : uint { @@ -77,4 +77,4 @@ public enum SID : uint MousasMantle = 2878, // none->Boss, extra=0x0, chakram stance MagossMantle = 2877, // none->Boss, extra=0x0, staff stance CrystallizeElement = 2056, // EchoOfHydaelyn/Boss->EchoOfHydaelyn/Boss, extra=0x152/0x153 -}; +} diff --git a/BossMod/Modules/Endwalker/Trial/T08Asura/T08Enums.cs b/BossMod/Modules/Endwalker/Trial/T08Asura/T08Enums.cs index b1e72554c9..3fa686ab8a 100644 --- a/BossMod/Modules/Endwalker/Trial/T08Asura/T08Enums.cs +++ b/BossMod/Modules/Endwalker/Trial/T08Asura/T08Enums.cs @@ -65,7 +65,7 @@ public enum AID : uint Scattering = 35993, // Helper->self, 3,0s cast, range 20 width 6 rect OrderedChaos = 36002, // Boss->self, no cast, single-target OrderedChaos2 = 36003, // Helper->player, 5,0s cast, range 5 circle -}; +} public enum IconID : uint { @@ -77,4 +77,4 @@ public enum IconID : uint Khadga5 = 458, // Helper, icon 5 Khadga6 = 459, // Helper, icon 6 Spreadmarker = 139, // player -}; +} diff --git a/BossMod/Modules/Endwalker/Ultimate/DSW1/DSW1Enums.cs b/BossMod/Modules/Endwalker/Ultimate/DSW1/DSW1Enums.cs index f09e93bdd8..89b59e900c 100644 --- a/BossMod/Modules/Endwalker/Ultimate/DSW1/DSW1Enums.cs +++ b/BossMod/Modules/Endwalker/Ultimate/DSW1/DSW1Enums.cs @@ -13,7 +13,7 @@ public enum OID : uint //_Gen_Haurchefant = 0x333D, // R0.500, x1 //_Gen_Actorfd8a1 = 0xFD8A1, // R0.500-1.000, x1, EventNpc type //_Gen_Actor1eb681 = 0x1EB681, // R0.500, x0, EventObj type, and more spawn during fight -}; +} public enum AID : uint { @@ -59,7 +59,7 @@ public enum AID : uint Shockwave = 25315, // SpearOfTheFury->self, no cast, raidwide, 7 casts every ~1.1s Brightwing = 25369, // Helper->self, no cast, range 18 ?-degree cone, baited on 2 closest targets Skyblind = 25370, // Helper->location, 2.5s cast, range 3 puddle -}; +} public enum SID : uint { diff --git a/BossMod/Modules/Endwalker/Ultimate/DSW2/DSW2Enums.cs b/BossMod/Modules/Endwalker/Ultimate/DSW2/DSW2Enums.cs index 9f13f59a3a..0c1249552c 100644 --- a/BossMod/Modules/Endwalker/Ultimate/DSW2/DSW2Enums.cs +++ b/BossMod/Modules/Endwalker/Ultimate/DSW2/DSW2Enums.cs @@ -67,7 +67,7 @@ public enum OID : uint VoidzoneAhkMorn = 0x1EB683, // R0.500, EventObj type, spawn during p6 DragonKingThordan = 0x3148, // R8.000, x1 - p7 -}; +} public enum AID : uint { @@ -319,7 +319,7 @@ public enum AID : uint MornAfahsEdgeVisual = 28207, // DragonKingThordan->self, no cast, single-target, visual (subsequent) MornAfahsEdgeRest = 28208, // Helper->self, no cast, range 4 circle tower MornAfahsEdgeFail = 28209, // Helper->self, no cast, range 60 circle unsoaked tower -}; +} public enum SID : uint { diff --git a/BossMod/Modules/Endwalker/Ultimate/TOP/TOPEnums.cs b/BossMod/Modules/Endwalker/Ultimate/TOP/TOPEnums.cs index daafa71d97..92a46e2544 100644 --- a/BossMod/Modules/Endwalker/Ultimate/TOP/TOPEnums.cs +++ b/BossMod/Modules/Endwalker/Ultimate/TOP/TOPEnums.cs @@ -32,7 +32,7 @@ public enum OID : uint //_Gen_Actor1ea1a1 = 0x1EA1A1, // R2.000, x1, EventObj type //_Gen_Exit = 0x1E850B, // R0.500, x1, EventObj type -}; +} public enum AID : uint { @@ -239,7 +239,7 @@ public enum AID : uint CosmoMeteorVisualEnd = 31665, // BossP6->self, no cast, single-target, visual (?) MagicNumber = 31670, // BossP6->self, 5.0s cast, range 100 circle, raidwide requiring LB RunMi = 31648, // BossP6->self, 16.0s cast, range 100 circle, enrage -}; +} public enum SID : uint { @@ -280,7 +280,7 @@ public enum SID : uint HelloNearWorld = 3442, // none->player, extra=0x0 HelloDistantWorld = 3443, // none->player, extra=0x0 QuickeningDynamis = 3444, // Helper->player, extra=0x1/0x2/0x3 -}; +} public enum IconID : uint { @@ -295,7 +295,7 @@ public enum IconID : uint RotateCW = 156, // LeftArmUnit/RightArmUnit RotateCCW = 157, // LeftArmUnit/RightArmUnit SigmaWaveCannon = 244, // player -}; +} public enum TetherID : uint { @@ -307,4 +307,4 @@ public enum TetherID : uint HWLocalTether = 224, // player->player - tether broken by moving close HWRemoteTether = 225, // player->player - tether broken by moving away SigmaHyperPulse = 17, // RightArmUnit->player -}; +} diff --git a/BossMod/Modules/Endwalker/Unreal/Un1Ultima/Un1UltimaEnums.cs b/BossMod/Modules/Endwalker/Unreal/Un1Ultima/Un1UltimaEnums.cs index 446858afdc..f09e52e6bb 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un1Ultima/Un1UltimaEnums.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un1Ultima/Un1UltimaEnums.cs @@ -11,7 +11,7 @@ public enum OID : uint MagitekBit = 0x3861, // spawn mid fight Helper = 0x3867, // x19 AetheroplasmHelper = 0x3868, // x3 -}; +} public enum AID : uint { @@ -45,7 +45,7 @@ public enum AID : uint AssaultCannon = 28421, // MagitekBit->self, 2.5s cast, range 45 half-width 1 rect Detonation = 28410, // Helper->self, no cast, range 40 aoe with ? falloff (TODO: don't know how to detect in advance...) -}; +} public enum SID : uint { diff --git a/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/Un2SephirotEnums.cs b/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/Un2SephirotEnums.cs index 7ce9391fd5..2efe27a3dc 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/Un2SephirotEnums.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/Un2SephirotEnums.cs @@ -9,7 +9,7 @@ public enum OID : uint Cochma = 0x39DC, // spawn during fight StormOfWords = 0x39DE, // spawn during fight CoronalWind = 0x39DF, // spawn during fight when storm of words is killed -}; +} public enum AID : uint { @@ -58,13 +58,13 @@ public enum AID : uint ImpactOfHod = 30394, // Helper->self, no cast, raidwide knockback 5 Ascension = 30385, // CoronalWind->self, 4.0s cast, range 6 circle PillarOfSeverityAOE = 30387, // Helper->self, no cast, raidwide enrage (unless hit by ascension) -}; +} public enum SID : uint { ForceAgainstMight = 1005, // BossP3->player, extra=0x0 ForceAgainstMagic = 1006, // BossP3->player, extra=0x0 -}; +} public enum IconID : uint { @@ -73,4 +73,4 @@ public enum IconID : uint FiendishRage = 72, // player Earthshaker = 40, // player Ascension = 62, // CoronalWind -}; +} diff --git a/BossMod/Modules/Endwalker/Unreal/Un3Sophia/Un3SophiaEnums.cs b/BossMod/Modules/Endwalker/Unreal/Un3Sophia/Un3SophiaEnums.cs index dfa4a6e31f..54b98f311b 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un3Sophia/Un3SophiaEnums.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un3Sophia/Un3SophiaEnums.cs @@ -12,7 +12,7 @@ public enum OID : uint Helper2 = 0x3E7B, // R0.500, x17, and more spawn during fight ArenaTilt = 0x1EA12C, // R2.000, x1, EventObj type RingOfPain = 0x1EA199, // R0.500, EventObj type, spawn during fight, voidzone -}; +} public enum AID : uint { @@ -65,10 +65,10 @@ public enum AID : uint ScalesOfWisdomRaidwide = 32198, // Helper2->self, no cast, range 80+R circle, raidwide Enrage = 32197, // Boss->self, no cast, range 45+R circle -}; +} public enum IconID : uint { Pairs1 = 77, // player (dunno whether white or black) Pairs2 = 78, // player (dunno whether white or black) -}; +} diff --git a/BossMod/Modules/Endwalker/Unreal/Un4Zurvan/Un4ZurvanEnums.cs b/BossMod/Modules/Endwalker/Unreal/Un4Zurvan/Un4ZurvanEnums.cs index 78b833f7a7..626d76568d 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un4Zurvan/Un4ZurvanEnums.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un4Zurvan/Un4ZurvanEnums.cs @@ -27,7 +27,7 @@ public enum OID : uint SouthernCrossVoidzone = 0x1EA2A6, // R0.500, EventObj type, spawn during fight FireTower = 0x1EA2A7, // R0.500, EventObj type, spawn during fight IceTower = 0x1EA2A8, // R0.500, EventObj type, spawn during fight -}; +} public enum AID : uint { @@ -78,7 +78,7 @@ public enum AID : uint NorthStarWrong = 34179, // Helper->self, no cast, range 2 circle (oneshot if fire tower is soaked by wrong debuff) Enrage = 34177, // BossP2->self, 10.0s cast, single-target, visual (enrage) EnrageAOE = 34176, // Helper->location, no cast, range 12 circle, enrage -}; +} public enum IconID : uint { @@ -86,11 +86,11 @@ public enum IconID : uint DemonicDive = 62, // player CoolFlame = 23, // player WaveCannon = 14, // player -}; +} public enum TetherID : uint { InfiniteAnguish = 1, // player->player (tether stretched too far, > ~12) InfiniteFire = 5, // player->player InfiniteIce = 8, // player->player -}; +} diff --git a/BossMod/Modules/Endwalker/Unreal/Un5Thordan/Un5ThordanEnums.cs b/BossMod/Modules/Endwalker/Unreal/Un5Thordan/Un5ThordanEnums.cs index 85b7306040..9e17325d2f 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un5Thordan/Un5ThordanEnums.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un5Thordan/Un5ThordanEnums.cs @@ -43,7 +43,7 @@ public enum OID : uint //_Gen_Actor1e9e3b = 0x1E9E3B, // R2.000, x1, EventObj type //_Gen_Actor1e9b99 = 0x1E9B99, // R2.000, x1, EventObj type //_Gen_Actor1e8536 = 0x1E8536, // R2.000, x1, EventObj type -}; +} public enum AID : uint { @@ -117,14 +117,14 @@ public enum AID : uint AbsoluteConviction = 35300, // Helper->self, no cast, range 80+R circle, raidwide Enrage = 35269, // Boss->self, 10.0s cast, range 80+R circle, enrage -}; +} public enum SID : uint { DamageUp = 290, SwordOfTheHeavens = 944, ShieldOfTheHeavens = 945 -}; +} public enum IconID : uint { @@ -135,11 +135,11 @@ public enum IconID : uint HiemalStorm = 29, // player TargetedComet = 11, // player HolyShieldBash = 16, // player -}; +} public enum TetherID : uint { ThordanInvul = 1, SpiralPierce = 5, BurningChains = 9 -}; +} diff --git a/BossMod/Modules/Global/GoldSaucer/TheSliceIsRight/TheSliceIsRight.cs b/BossMod/Modules/Global/GoldSaucer/TheSliceIsRight/TheSliceIsRight.cs index 90c5b94ecb..bfd58b0fa9 100644 --- a/BossMod/Modules/Global/GoldSaucer/TheSliceIsRight/TheSliceIsRight.cs +++ b/BossMod/Modules/Global/GoldSaucer/TheSliceIsRight/TheSliceIsRight.cs @@ -14,7 +14,7 @@ public enum OID : uint HelperDoubleRect = 0x1EAE9A, HelperCircle = 0x1EAE9B, Pileofgold = 0x1EAE9C, -}; +} public enum AID : uint { @@ -34,7 +34,7 @@ public enum AID : uint FirstGilJump = 18335, // 25AC->location, 2.5s cast, width 7 rect charge NextGilJump = 18336, // 25AC->location, 1.5s cast, width 7 rect charge BadCup = 18337, // 25AC->self, 1.0s cast, range 15+R 120-degree cone -}; +} class BambooSplits : Components.GenericAOEs { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage01AllsWellThatStartsWell/Stage01.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage01AllsWellThatStartsWell/Stage01.cs index 19ab889825..c52d94b4e2 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage01AllsWellThatStartsWell/Stage01.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage01AllsWellThatStartsWell/Stage01.cs @@ -4,7 +4,7 @@ public enum OID : uint { Boss = 0x25BE, //R=1.5 Slime = 0x25BD, //R=1.5 -}; +} public enum AID : uint { @@ -12,7 +12,7 @@ public enum AID : uint FluidSpread = 14198, // 25BD->player, no cast, single-target AutoAttack2 = 6497, // 25BE->player, no cast, single-target IronJustice = 14199, // 25BE->self, 2,5s cast, range 8+R 120-degree cone -}; +} class IronJustice : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage02MuchAdoAboutPudding/Stage02Act1.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage02MuchAdoAboutPudding/Stage02Act1.cs index a5ce2c0063..40fd9b7bcd 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage02MuchAdoAboutPudding/Stage02Act1.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage02MuchAdoAboutPudding/Stage02Act1.cs @@ -5,7 +5,7 @@ public enum OID : uint Boss = 0x25C0, //R=1.8 Marshmallow = 0x25C2, //R1.8 Bavarois = 0x25C4, //R1.8 -}; +} public enum AID : uint { @@ -13,7 +13,7 @@ public enum AID : uint Aero = 14269, // 25C2->player, 1,0s cast, single-target Thunder = 14268, // 25C4->player, 1,0s cast, single-target GoldenTongue = 14265, // 25C0/25C2/25C4->self, 5,0s cast, single-target -}; +} class GoldenTongue : Components.CastHint { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage02MuchAdoAboutPudding/Stage02Act2.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage02MuchAdoAboutPudding/Stage02Act2.cs index 2135f0a277..ddb665ea3d 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage02MuchAdoAboutPudding/Stage02Act2.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage02MuchAdoAboutPudding/Stage02Act2.cs @@ -6,7 +6,7 @@ public enum OID : uint Flan = 0x25C5, //R1.8 Licorice = 0x25C3, //R=1.8 -}; +} public enum AID : uint { @@ -14,7 +14,7 @@ public enum AID : uint Stone = 14270, // 25C3->player, 1,0s cast, single-target Blizzard = 14267, // 25C1->player, 1,0s cast, single-target GoldenTongue = 14265, // 25C5/25C3/25C1->self, 5,0s cast, single-target -}; +} class GoldenTongue : Components.CastHint { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage03WaitingForGolem/Stage03.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage03WaitingForGolem/Stage03.cs index dd98c38bb9..437bf4ed3e 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage03WaitingForGolem/Stage03.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage03WaitingForGolem/Stage03.cs @@ -4,7 +4,7 @@ public enum OID : uint { Boss = 0x25D4, //R=2.2 voidzone = 0x1E8FEA, -}; +} public enum AID : uint { @@ -12,7 +12,7 @@ public enum AID : uint BoulderClap = 14363, // 25D4->self, 3,0s cast, range 14 120-degree cone EarthenHeart = 14364, // 25D4->location, 3,0s cast, range 6 circle Obliterate = 14365, // 25D4->self, 6,0s cast, range 60 circle -}; +} class BoulderClap : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage04GentlemanPreferSwords/Stage04Act1.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage04GentlemanPreferSwords/Stage04Act1.cs index 03255102b5..b0a83b3e22 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage04GentlemanPreferSwords/Stage04Act1.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage04GentlemanPreferSwords/Stage04Act1.cs @@ -4,7 +4,7 @@ public enum OID : uint { Boss = 0x25C8, //R=1.65 Bat = 0x25D2, //R=0.4 -}; +} public enum AID : uint { @@ -12,7 +12,7 @@ public enum AID : uint AutoAttack2 = 6499, // 25D2->player, no cast, single-target BloodDrain = 14360, // 25D2->player, no cast, single-target SanguineBite = 14361, // 25C8->self, no cast, range 3+R width 2 rect -}; +} class Hints : BossComponent { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage04GentlemanPreferSwords/Stage04Act2.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage04GentlemanPreferSwords/Stage04Act2.cs index 6fdaef3fa1..bcee67bca9 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage04GentlemanPreferSwords/Stage04Act2.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage04GentlemanPreferSwords/Stage04Act2.cs @@ -4,7 +4,7 @@ public enum OID : uint { Boss = 0x25D5, //R=2.5 Beetle = 0x25D6, //R=0.6 -}; +} public enum AID : uint { @@ -14,7 +14,7 @@ public enum AID : uint MagitekField = 14369, // 25D5->self, 5,0s cast, single-target Spoil = 14362, // 25D6->self, no cast, range 6+R circle MagitekRay = 14368, // 25D5->location, 3,0s cast, range 6 circle -}; +} class GrandStrike : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage05TheThreepennyTurtles/Stage05.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage05TheThreepennyTurtles/Stage05.cs index d90a3519ab..77ee2dd6a8 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage05TheThreepennyTurtles/Stage05.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage05TheThreepennyTurtles/Stage05.cs @@ -3,7 +3,7 @@ namespace BossMod.Global.MaskedCarnivale.Stage05; public enum OID : uint { Boss = 0x25CC, //R=5.0 -}; +} class Hints : BossComponent { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage06EyeSociety/Stage06Act1.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage06EyeSociety/Stage06Act1.cs index 37ad3eee04..d09e7f3a54 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage06EyeSociety/Stage06Act1.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage06EyeSociety/Stage06Act1.cs @@ -4,7 +4,7 @@ public enum OID : uint { Boss = 0x25CD, //R=2.53 Mandragora = 0x2700, //R=0.3 -}; +} public enum AID : uint { @@ -12,12 +12,12 @@ public enum AID : uint DemonEye = 14691, // 25CD->self, 5,0s cast, range 50+R circle Attack = 6499, // 2700/25CD->player, no cast, single-target ColdStare = 14692, // 25CD->self, 2,5s cast, range 40+R 90-degree cone -}; +} public enum SID : uint { Blind = 571, // Mandragora->player, extra=0x0 -}; +} class DemonEye : Components.CastGaze { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage06EyeSociety/Stage06Act2.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage06EyeSociety/Stage06Act2.cs index e5c9779904..030b49f0ff 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage06EyeSociety/Stage06Act2.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage06EyeSociety/Stage06Act2.cs @@ -5,7 +5,7 @@ public enum OID : uint Boss = 0x26FF, //R=2.53 Eye = 0x25CE, //R=1.35 Mandragora = 0x2701, //R=0.3 -}; +} public enum AID : uint { @@ -16,12 +16,12 @@ public enum AID : uint Stone = 14695, // 25CE->player, 1,0s cast, single-target DreadGaze = 14694, // 25CE->self, 3,0s cast, range 6+R ?-degree cone -}; +} public enum SID : uint { Blind = 571, // Mandragora->player, extra=0x0 -}; +} class DemonEye : Components.CastGaze { private BitMask _blinded; diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage07AChorusSlime/Stage07Act1.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage07AChorusSlime/Stage07Act1.cs index cb702eab4e..4654cafa8d 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage07AChorusSlime/Stage07Act1.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage07AChorusSlime/Stage07Act1.cs @@ -4,13 +4,13 @@ public enum OID : uint { Boss = 0x2703, //R=1.6 Sprite = 0x2702, //R=0.8 -}; +} public enum AID : uint { Detonation = 14696, // 2703->self, no cast, range 6+R circle Blizzard = 14709, // 2702->player, 1,0s cast, single-target -}; +} class SlimeExplosion : Components.GenericStackSpread { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage07AChorusSlime/Stage07Act2.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage07AChorusSlime/Stage07Act2.cs index 58f4c2ca80..24a44bfc4f 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage07AChorusSlime/Stage07Act2.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage07AChorusSlime/Stage07Act2.cs @@ -4,13 +4,13 @@ public enum OID : uint { Boss = 0x2705, //R=1.6 Sprite = 0x2704, //R=0.8 -}; +} public enum AID : uint { Detonation = 14696, // 2705->self, no cast, range 6+R circle Blizzard = 14709, // 2704->player, 1,0s cast, single-target -}; +} class SlimeExplosion : Components.GenericStackSpread { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage07AChorusSlime/Stage07Act3.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage07AChorusSlime/Stage07Act3.cs index 34ba8eb0aa..f5d2988697 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage07AChorusSlime/Stage07Act3.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage07AChorusSlime/Stage07Act3.cs @@ -4,14 +4,14 @@ public enum OID : uint { Boss = 0x2706, //R=5.0 Slime = 0x2707, //R=0.8 -}; +} public enum AID : uint { LowVoltage = 14710, // 2706->self, 12,0s cast, range 30+R circle - can be line of sighted by barricade Detonation = 14696, // 2707->self, no cast, range 6+R circle Object130 = 14711, // 2706->self, no cast, range 30+R circle - instant kill if you do not line of sight the towers when they die -}; +} class LowVoltage : Components.GenericLineOfSightAOE { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage08BombedyOfErrors/Stage08Act1.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage08BombedyOfErrors/Stage08Act1.cs index 9c31c403c6..7baeee9f24 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage08BombedyOfErrors/Stage08Act1.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage08BombedyOfErrors/Stage08Act1.cs @@ -5,14 +5,14 @@ public enum OID : uint Boss = 0x2708, //R=0.6 Bomb = 0x2709, //R=1.2 Snoll = 0x270A, //R=0.9 -}; +} public enum AID : uint { SelfDestruct = 14687, // 2708->self, no cast, range 10 circle HypothermalCombustion = 14689, // 270A->self, no cast, range 6 circle SelfDestruct2 = 14688, // 2709->self, no cast, range 6 circle -}; +} class Selfdetonations : BossComponent { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage08BombedyOfErrors/Stage08Act2.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage08BombedyOfErrors/Stage08Act2.cs index 9772d96908..5a4daa4b3c 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage08BombedyOfErrors/Stage08Act2.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage08BombedyOfErrors/Stage08Act2.cs @@ -5,7 +5,7 @@ public enum OID : uint Boss = 0x270B, //R=3.75 Bomb = 0x270C, //R=0.6 Snoll = 0x270D, //R=0.9 -}; +} public enum AID : uint { @@ -14,7 +14,7 @@ public enum AID : uint HypothermalCombustion = 14731, // 270D->self, no cast, range 6 circle Sap = 14708, // 270B->location, 5,0s cast, range 8 circle Burst = 14680, // 270B->self, 6,0s cast, range 50 circle -}; +} class Sap : Components.LocationTargetedAOEs { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage09ToKillAMockingslime/Stage09.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage09ToKillAMockingslime/Stage09.cs index d8c87d3a93..e625dcebad 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage09ToKillAMockingslime/Stage09.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage09ToKillAMockingslime/Stage09.cs @@ -10,7 +10,7 @@ public enum OID : uint Bavarois = 0x2715, //R=1.8 Flan = 0x2716, //R=1.8 DarkVoidzone = 0x1E9C9D, //R=0.5 -}; +} public enum AID : uint { @@ -23,7 +23,7 @@ public enum AID : uint Stone = 14270, // 2714->player, 1,0s cast, single-target Thunder = 14268, // 2715->player, 1,0s cast, single-target Water = 14271, // 2716->player, 1,0s cast, single-target -}; +} class GoldenTongue : Components.CastHint { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage10ALittleKnightMusic/Stage10.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage10ALittleKnightMusic/Stage10.cs index 3589cb8652..0c3210ede4 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage10ALittleKnightMusic/Stage10.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage10ALittleKnightMusic/Stage10.cs @@ -3,7 +3,7 @@ namespace BossMod.Global.MaskedCarnivale.Stage10; public enum OID : uint { Boss = 0x2717, // R1.0/1.5/2.0/2.5 (radius increases with amount of successful King's Will casts) -}; +} public enum AID : uint { @@ -18,7 +18,7 @@ public enum AID : uint IronJustice4 = 14728, // Boss->self, 2,5s cast, range 8+R 120-degree cone Cloudcover2 = 14723, // Boss->player, no cast, range 6 circle BlackNebula = 14724, // Boss->self, 6,0s cast, range 50+R circle, interruptible enrage after 3 King's Will casts -}; +} class IronJustice1 : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage11SomeLikeItExcruciatinglyHot/Stage11Act1.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage11SomeLikeItExcruciatinglyHot/Stage11Act1.cs index 18eb4d986c..5d3330322e 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage11SomeLikeItExcruciatinglyHot/Stage11Act1.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage11SomeLikeItExcruciatinglyHot/Stage11Act1.cs @@ -3,12 +3,12 @@ namespace BossMod.Global.MaskedCarnivale.Stage11.Act1; public enum OID : uint { Boss = 0x2718, //R=1.2 -}; +} public enum AID : uint { Fulmination = 14583, // 2718->self, 23,0s cast, range 60 circle -}; +} class Hints : BossComponent { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage11SomeLikeItExcruciatinglyHot/Stage11Act2.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage11SomeLikeItExcruciatinglyHot/Stage11Act2.cs index d471ac5099..9db60820ba 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage11SomeLikeItExcruciatinglyHot/Stage11Act2.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage11SomeLikeItExcruciatinglyHot/Stage11Act2.cs @@ -3,12 +3,12 @@ namespace BossMod.Global.MaskedCarnivale.Stage11.Act2; public enum OID : uint { Boss = 0x2719, //R=1.2 -}; +} public enum AID : uint { Fulmination = 14583, // 2719->self, 23,0s cast, range 60 circle -}; +} class Hints : BossComponent { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage12ThePlantomOfTheOpera/Stage12Act1.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage12ThePlantomOfTheOpera/Stage12Act1.cs index 82f28574b7..6a75b7bb2d 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage12ThePlantomOfTheOpera/Stage12Act1.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage12ThePlantomOfTheOpera/Stage12Act1.cs @@ -3,12 +3,12 @@ namespace BossMod.Global.MaskedCarnivale.Stage12.Act1; public enum OID : uint { Boss = 0x271A, //R=0.8 -}; +} public enum AID : uint { Seedvolley = 14750, // 271A->player, no cast, single-target -}; +} class Hints : BossComponent { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage12ThePlantomOfTheOpera/Stage12Act2.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage12ThePlantomOfTheOpera/Stage12Act2.cs index e3514cd83a..c06688a5a1 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage12ThePlantomOfTheOpera/Stage12Act2.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage12ThePlantomOfTheOpera/Stage12Act2.cs @@ -4,7 +4,7 @@ public enum OID : uint { Boss = 0x271B, //R=6.96 Roselet = 0x271C, //R=0.8 -}; +} public enum AID : uint { @@ -13,7 +13,7 @@ public enum AID : uint Seedvolley = 14750, // 271C->player, no cast, single-target Trounce = 14754, // 271B->self, 4,5s cast, range 40+R 60-degree cone InflammableFumes = 14753, // 271B->self, 15,0s cast, range 50 circle -}; +} class WildHorn : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage13BeautyAndABeast/Stage13Act1.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage13BeautyAndABeast/Stage13Act1.cs index 0474aa17d9..a0893d5c3c 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage13BeautyAndABeast/Stage13Act1.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage13BeautyAndABeast/Stage13Act1.cs @@ -4,13 +4,13 @@ public enum OID : uint { Boss = 0x26F5, //R=1.4 Vodoriga = 0x26F6, //R=1.2 -}; +} public enum AID : uint { Attack = 6497, // Boss/Vodoriga->player, no cast, single-target Mow = 14879, // Boss->self, 3,0s cast, range 6+R 120-degree cone -}; +} class Mow : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage13BeautyAndABeast/Stage13Act2.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage13BeautyAndABeast/Stage13Act2.cs index f519b86194..c1b4f147d8 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage13BeautyAndABeast/Stage13Act2.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage13BeautyAndABeast/Stage13Act2.cs @@ -5,7 +5,7 @@ public enum OID : uint Boss = 0x26F8, // R=2.0 Succubus = 0x26F7, //R=1.0 Helper = 0x233C, //R=0.5 -}; +} public enum AID : uint { @@ -23,7 +23,7 @@ public enum AID : uint BeguilingMist = 15045, // 26F7->self, 7,0s cast, range 50+R circle, interruptable, applies hysteria FatalAllure = 14952, // 26F8->self, no cast, range 50+R circle, attract, applies terror BloodRain = 14882, // 26F8->location, 3,0s cast, range 50 circle -}; +} class VoidFireII : Components.LocationTargetedAOEs { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage14BlobsInTheWoods/Stage14Act1.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage14BlobsInTheWoods/Stage14Act1.cs index f66c8ccb97..5704433b02 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage14BlobsInTheWoods/Stage14Act1.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage14BlobsInTheWoods/Stage14Act1.cs @@ -3,12 +3,12 @@ namespace BossMod.Global.MaskedCarnivale.Stage14.Act1; public enum OID : uint { Boss = 0x271D, //R=2.0 -}; +} public enum AID : uint { TheLastSong = 14756, // 271D->self, 6,0s cast, range 60 circle -}; +} class LastSong : Components.GenericLineOfSightAOE { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage14BlobsInTheWoods/Stage14Act2.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage14BlobsInTheWoods/Stage14Act2.cs index 90fc20ecb6..10c61842f2 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage14BlobsInTheWoods/Stage14Act2.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage14BlobsInTheWoods/Stage14Act2.cs @@ -3,13 +3,13 @@ namespace BossMod.Global.MaskedCarnivale.Stage14.Act2; public enum OID : uint { Boss = 0x271E, //R=2.0 -}; +} public enum AID : uint { Syrup = 14757, // 271E->player, no cast, range 4 circle, applies heavy to player TheLastSong = 14756, // 271E->self, 6,0s cast, range 60 circle, heavy dmg, applies silence to player -}; +} class LastSong : Components.GenericLineOfSightAOE { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage15TheMeNobodyNodes/Stage15.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage15TheMeNobodyNodes/Stage15.cs index 9787553b71..2ce4a238e0 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage15TheMeNobodyNodes/Stage15.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage15TheMeNobodyNodes/Stage15.cs @@ -6,7 +6,7 @@ public enum OID : uint Shabti = 0x26FA, //R=1.1 Serpent = 0x26FB, //R=1.2 Helper = 0x233C, //R=0.5 -}; +} public enum AID : uint { @@ -24,7 +24,7 @@ public enum AID : uint Superstorm = 14971, // 26F9->self, 3,5s cast, single-target Superstorm2 = 14970, // 233C->self, 3,5s cast, range 8-20 donut Disseminate = 14899, // 26FB->self, 2,0s cast, range 6+R circle, casts on death of serpents -}; +} class HighVoltage : Components.CastHint { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage16SunsetBullevard/Stage16Act1.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage16SunsetBullevard/Stage16Act1.cs index 4ffa2f0993..272d73ebf6 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage16SunsetBullevard/Stage16Act1.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage16SunsetBullevard/Stage16Act1.cs @@ -3,12 +3,12 @@ namespace BossMod.Global.MaskedCarnivale.Stage16.Act1; public enum OID : uint { Boss = 0x26F2, //R=3.2 -}; +} public enum AID : uint { Attack = 6497, // 26F2->player, no cast, single-target -}; +} class Hints : BossComponent { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage16SunsetBullevard/Stage16Act2.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage16SunsetBullevard/Stage16Act2.cs index 1a5c5903b9..62eeeee1cd 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage16SunsetBullevard/Stage16Act2.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage16SunsetBullevard/Stage16Act2.cs @@ -5,7 +5,7 @@ public enum OID : uint Boss = 0x26F4, // R=4.0 Cyclops = 0x26F3, //R=3.2 Helper = 0x233C, //R=0.5 -}; +} public enum AID : uint { @@ -20,7 +20,7 @@ public enum AID : uint ZoomIn = 14873, // 26F4->player, 4,0s cast, width 8 rect unavoidable charge, knockback dist 20 TenTonzeWave = 14876, // 26F4->self, 4,0s cast, range 40+R 60-degree cone TenTonzeWave2 = 15268, // 233C->self, 4,6s cast, range 10-20 donut -}; +} class OneOneOneOneTonzeSwing : Components.RaidwideCast { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage17TheSwordOfMusic/Stage17Act1.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage17TheSwordOfMusic/Stage17Act1.cs index 7fcfd65ac2..0c5a80547d 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage17TheSwordOfMusic/Stage17Act1.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage17TheSwordOfMusic/Stage17Act1.cs @@ -4,14 +4,14 @@ public enum OID : uint { Boss = 0x2720, //R=2.0 RightClaw = 0x271F, //R=2.0 -}; +} public enum AID : uint { AutoAttack = 6499, // 2720/271F->player, no cast, single-target TheHand = 14760, // 271F/2720->self, 3,0s cast, range 6+R 120-degree cone, knockback away from source, dist 10 Shred = 14759, // 2720/271F->self, 2,5s cast, range 4+R width 4 rect, stuns player -}; +} class TheHand : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage17TheSwordOfMusic/Stage17Act2.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage17TheSwordOfMusic/Stage17Act2.cs index 076cdd0665..2bdfca4913 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage17TheSwordOfMusic/Stage17Act2.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage17TheSwordOfMusic/Stage17Act2.cs @@ -6,7 +6,7 @@ public enum OID : uint LeftClaw = 0x2722, //R=2.0 RightClaw = 0x2723, //R=2.0 MagitekRayVoidzone = 0x1E8D9B, //R=0.5 -}; +} public enum AID : uint { @@ -17,7 +17,7 @@ public enum AID : uint TheHand = 14760, // 2722/2723->self, 3,0s cast, range 6+R 120-degree cone Shred = 14759, // 2723/2722->self, 2,5s cast, range 4+R width 4 rect MagitekRay = 15048, // 2721->location, 3,0s cast, range 6 circle, voidzone, interruptible -}; +} class GrandStrike : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage18MidsummerNightsExplosion/Stage18Act1.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage18MidsummerNightsExplosion/Stage18Act1.cs index 3140927663..04467ba9cc 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage18MidsummerNightsExplosion/Stage18Act1.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage18MidsummerNightsExplosion/Stage18Act1.cs @@ -4,7 +4,7 @@ public enum OID : uint { Boss = 0x2724, //R=3.0 Keg = 0x2726, //R=0.65 -}; +} public enum AID : uint { @@ -14,7 +14,7 @@ public enum AID : uint Fireball = 15051, // 2724->location, 4,0s cast, range 6 circle BoneShaker = 15053, // 2724->self, no cast, range 50 circle TailSmash = 15052, // 2724->self, 4,0s cast, range 12+R 90-degree cone -}; +} class Explosion : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage18MidsummerNightsExplosion/Stage18Act2.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage18MidsummerNightsExplosion/Stage18Act2.cs index 6d9530557b..e11d7f1732 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage18MidsummerNightsExplosion/Stage18Act2.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage18MidsummerNightsExplosion/Stage18Act2.cs @@ -4,7 +4,7 @@ public enum OID : uint { Boss = 0x2725, //R=3.0 Keg = 0x2726, //R=0.65 -}; +} public enum AID : uint { @@ -14,7 +14,7 @@ public enum AID : uint RipperClaw = 15050, // 2725->self, 4,0s cast, range 5+R 90-degree cone TailSmash = 15052, // 2725->self, 4,0s cast, range 12+R 90-degree cone BoneShaker = 15053, // 2725->self, no cast, range 50 circle, harmless raidwide -}; +} class Explosion : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage19OnAClearDayYouCanSmellForever/Stage19Act1.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage19OnAClearDayYouCanSmellForever/Stage19Act1.cs index 415648c659..493d5f3340 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage19OnAClearDayYouCanSmellForever/Stage19Act1.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage19OnAClearDayYouCanSmellForever/Stage19Act1.cs @@ -4,7 +4,7 @@ public enum OID : uint { Boss = 0x2727, //R=5.775 voidzone = 0x1EA9F9, //R=0.5 -}; +} public enum AID : uint { @@ -13,7 +13,7 @@ public enum AID : uint BadBreath = 15074, // 2727->self, 3,5s cast, range 12+R 120-degree cone VineProbe = 15075, // 2727->self, 2,5s cast, range 6+R width 8 rect OffalBreath = 15076, // 2727->location, 3,5s cast, range 6 circle, interruptible, voidzone -}; +} public enum SID : uint { @@ -28,7 +28,7 @@ public enum SID : uint Leaden = 67, // none->player, extra=0x3C Pollen = 19, // none->player, extra=0x0 Stun = 149, // 2729->player, extra=0x0 -}; +} class BadBreath : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage19OnAClearDayYouCanSmellForever/Stage19Act2.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage19OnAClearDayYouCanSmellForever/Stage19Act2.cs index 441fa660a6..3dc3bf04e4 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage19OnAClearDayYouCanSmellForever/Stage19Act2.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage19OnAClearDayYouCanSmellForever/Stage19Act2.cs @@ -5,7 +5,7 @@ public enum OID : uint Boss = 0x2728, //R=5.775 HotHip = 0x2779, //R=1.50 voidzone = 0x1EA9F9, //R=0.5 -}; +} public enum AID : uint { @@ -16,7 +16,7 @@ public enum AID : uint Schizocarps = 15077, // 2728->self, 5,0s cast, single-target ExplosiveDehiscence = 15078, // 2729->self, 6,0s cast, range 50 circle, gaze BadBreath = 15074, // 2728->self, 3,5s cast, range 12+R 120-degree cone, interruptible, voidzone -}; +} public enum SID : uint { @@ -31,7 +31,7 @@ public enum SID : uint Leaden = 67, // none->player, extra=0x3C Pollen = 19, // none->player, extra=0x0 Stun = 149, // 2729->player, extra=0x0 -}; +} class ExplosiveDehiscence : Components.CastGaze { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage20MissTyphon/Stage20Act1.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage20MissTyphon/Stage20Act1.cs index 7a68fd2883..d9cb5d9c26 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage20MissTyphon/Stage20Act1.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage20MissTyphon/Stage20Act1.cs @@ -3,7 +3,7 @@ namespace BossMod.Global.MaskedCarnivale.Stage20.Act1; public enum OID : uint { Boss = 0x272A, //R=4.5 -}; +} public enum AID : uint { @@ -11,7 +11,7 @@ public enum AID : uint Fireball = 14706, // 272A->location, 3,5s cast, range 8 circle Snort = 14704, // 272A->self, 7,0s cast, range 50+R circle, stun, knockback 30 away from source Fireball2 = 14707, // 272A->player, no cast, range 8 circle, 3 casts after snort -}; +} class Fireball : Components.LocationTargetedAOEs { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage20MissTyphon/Stage20Act2.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage20MissTyphon/Stage20Act2.cs index 1ca804ac35..cc2c07d4f8 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage20MissTyphon/Stage20Act2.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage20MissTyphon/Stage20Act2.cs @@ -4,7 +4,7 @@ public enum OID : uint { Boss = 0x272B, //R=5.1 Helper = 0x233C, //R=0.5 -}; +} public enum AID : uint { @@ -13,7 +13,7 @@ public enum AID : uint ImpSong = 14712, // 272B->self, 6,0s cast, range 50+R circle Waterspout = 14718, // 233C->location, 2,5s cast, range 4 circle LightningBolt = 14717, // 233C->location, 3,0s cast, range 3 circle -}; +} class AquaBreath : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage20MissTyphon/Stage20Act3.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage20MissTyphon/Stage20Act3.cs index 6e99cee330..e4e1b2273a 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage20MissTyphon/Stage20Act3.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage20MissTyphon/Stage20Act3.cs @@ -5,7 +5,7 @@ public enum OID : uint Boss = 0x272C, //R=4.5 Ultros = 0x272D, //R=5.1 Tentacle = 0x272E, //R=7.2 -}; +} public enum AID : uint { @@ -19,7 +19,7 @@ public enum AID : uint AquaBreath = 14745, // 272D->self, 2,5s cast, range 8+R 90-degree cone Megavolt = 14746, // 272D->self, 3,0s cast, range 6+R circle ImpSong = 14744, // 272D->self, 6,0s cast, range 50+R circle -}; +} class AquaBreath : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage21ChimeraOnAHotTinRoof/Stage21Act1.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage21ChimeraOnAHotTinRoof/Stage21Act1.cs index 0c1c48f7e4..417fe4fb7b 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage21ChimeraOnAHotTinRoof/Stage21Act1.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage21ChimeraOnAHotTinRoof/Stage21Act1.cs @@ -3,14 +3,14 @@ namespace BossMod.Global.MaskedCarnivale.Stage21.Act1; public enum OID : uint { Boss = 0x272F, //R=0.45 -}; +} public enum AID : uint { Blizzard = 14267, // Boss->player, 1,0s cast, single-target VoidBlizzard = 15063, // Boss->player, 6,0s cast, single-target Icefall = 15064, // Boss->location, 2,5s cast, range 5 circle -}; +} class Icefall : Components.LocationTargetedAOEs { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage21ChimeraOnAHotTinRoof/Stage21Act2.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage21ChimeraOnAHotTinRoof/Stage21Act2.cs index 9a535feb5a..a299d694ac 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage21ChimeraOnAHotTinRoof/Stage21Act2.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage21ChimeraOnAHotTinRoof/Stage21Act2.cs @@ -5,7 +5,7 @@ public enum OID : uint Boss = 0x2730, //R=3.7 ArenaImp = 0x2731, //R=0.45 Voidzone = 0x1E972A, -}; +} public enum AID : uint { @@ -17,7 +17,7 @@ public enum AID : uint TheDragonsVoice = 15080, // Boss->self, 4,0s cast, range 8-30 donut TheRamsKeeper = 15081, // Boss->location, 6,0s cast, range 9 circle -}; +} class TheRamsKeeper : Components.PersistentVoidzoneAtCastTarget { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage22HereComesTheBoom/Stage22Act1.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage22HereComesTheBoom/Stage22Act1.cs index a73067100e..25d57a1a9e 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage22HereComesTheBoom/Stage22Act1.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage22HereComesTheBoom/Stage22Act1.cs @@ -4,12 +4,12 @@ public enum OID : uint { Boss = 0x26FC, //R=1.2 BossAct2 = 0x26FE, //R=3.75, needed for pullcheck, otherwise it activates additional modules in act2 -}; +} public enum AID : uint { Fulmination = 14901, // 26FC->self, no cast, range 50+R circle, wipe if failed to kill grenade in one hit -}; +} class Hints : BossComponent { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage22HereComesTheBoom/Stage22Act2.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage22HereComesTheBoom/Stage22Act2.cs index f0b91c8938..d5e0ba9404 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage22HereComesTheBoom/Stage22Act2.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage22HereComesTheBoom/Stage22Act2.cs @@ -6,7 +6,7 @@ public enum OID : uint ArenaGrenade = 0x26FC, //R=1.2 ArenaGasBomb = 0x26FD, //R=1.2 Helper = 0x233C, -}; +} public enum AID : uint { @@ -19,7 +19,7 @@ public enum AID : uint Fulmination = 14901, // ArenaGrenade->self, no cast, range 50+R circle, wipe if failed to kill grenade in one hit or boss finishes casting Ignition when grenade is still alive Flashthoom = 14902, // ArenaGasBomb->self, 6,0s cast, range 6+R circle Burst = 14904, // Boss->self, 20,0s cast, range 50 circle -}; +} class Sap : Components.LocationTargetedAOEs { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage23BehemothsAndBroomsticks/Stage23.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage23BehemothsAndBroomsticks/Stage23.cs index 557f9e7f41..a6d2f02983 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage23BehemothsAndBroomsticks/Stage23.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage23BehemothsAndBroomsticks/Stage23.cs @@ -5,7 +5,7 @@ public enum OID : uint Boss = 0x2732, //R=5.8 Maelstrom = 0x2733, //R=1.0 Helper = 0x233C, -}; +} public enum AID : uint { @@ -16,7 +16,7 @@ public enum AID : uint Comet = 15260, // Boss->self, 5,0s cast, single-target Comet2 = 15261, // Helper->location, 4,0s cast, range 10 circle EclipticMeteor = 15257, // Boss->location, 10,0s cast, range 50 circle -}; +} class Charybdis : Components.LocationTargetedAOEs diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage24AmazingTechnicolorPitFiends/Stage24Act1.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage24AmazingTechnicolorPitFiends/Stage24Act1.cs index 2f508d1ac8..e85860b9cb 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage24AmazingTechnicolorPitFiends/Stage24Act1.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage24AmazingTechnicolorPitFiends/Stage24Act1.cs @@ -4,7 +4,7 @@ public enum OID : uint { Boss = 0x2735, //R=1.0 ArenaViking = 0x2734, //R=1.0 -}; +} public enum AID : uint { @@ -13,7 +13,7 @@ public enum AID : uint Starstorm = 15317, // Boss->location, 3,0s cast, range 5 circle RagingAxe = 15316, // ArenaViking->self, 3,0s cast, range 4+R 90-degree cone LightningSpark = 15318, // Boss->player, 6,0s cast, single-target -}; +} class Starstorm : Components.LocationTargetedAOEs { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage24AmazingTechnicolorPitFiends/Stage24Act2.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage24AmazingTechnicolorPitFiends/Stage24Act2.cs index c15d4c5e2e..1fce8879a4 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage24AmazingTechnicolorPitFiends/Stage24Act2.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage24AmazingTechnicolorPitFiends/Stage24Act2.cs @@ -5,7 +5,7 @@ public enum OID : uint Boss = 0x2736, //R=2.0 ArenaViking = 0x2737, //R=1.0 ArenaMagus = 0x2738, //R=1.0 -}; +} public enum AID : uint { @@ -18,7 +18,7 @@ public enum AID : uint Starstorm = 15317, // 2738->location, 3,0s cast, range 5 circle RagingAxe = 15316, // 2737->self, 3,0s cast, range 4+R 90-degree cone Silence = 15321, // 2736->player, 5,0s cast, single-target -}; +} class Starstorm : Components.LocationTargetedAOEs { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage24AmazingTechnicolorPitFiends/Stage24Act3.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage24AmazingTechnicolorPitFiends/Stage24Act3.cs index 2b61580758..24a7c5ff9a 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage24AmazingTechnicolorPitFiends/Stage24Act3.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage24AmazingTechnicolorPitFiends/Stage24Act3.cs @@ -5,7 +5,7 @@ public enum OID : uint Boss = 0x2739, //R=3.0 ArenaMagus = 0x273A, //R=1.0 VacuumWave = 0x273B, //R=1.0 -}; +} public enum AID : uint { @@ -18,7 +18,7 @@ public enum AID : uint BoneShaker = 15326, // 2739->self, 3,0s cast, range 50+R circle, raidwide + adds Fire = 14266, // 273A->player, 1,0s cast, single-target SelfDetonate = 15329, // 273A->player, 3,0s cast, single-target -}; +} class MagicHammer : Components.LocationTargetedAOEs { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage25DirtyRottenAzulmagia/Stage25Act1.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage25DirtyRottenAzulmagia/Stage25Act1.cs index 4fc7b84526..a7df304c2f 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage25DirtyRottenAzulmagia/Stage25Act1.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage25DirtyRottenAzulmagia/Stage25Act1.cs @@ -4,7 +4,7 @@ public enum OID : uint { Boss = 0x2678, //R=1.2 Helper = 0x233C, -}; +} public enum AID : uint { @@ -16,13 +16,13 @@ public enum AID : uint TremblingEarth = 14774, // 233C->self, 3,5s cast, range 10-20 donut TremblingEarth2 = 14775, // 233C->self, 3,5s cast, range 20-30 donut ApocalypticRoar = 14767, // 2678->self, 5,0s cast, range 35+R 120-degree cone -}; +} public enum SID : uint { IceSpikes = 1307, // Boss->Boss, extra=0x64 Doom = 910, // Boss->player, extra=0x0 -}; +} class ApocalypticBolt : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage25DirtyRottenAzulmagia/Stage25Act2.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage25DirtyRottenAzulmagia/Stage25Act2.cs index dc8bce15be..97d4a277b5 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage25DirtyRottenAzulmagia/Stage25Act2.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage25DirtyRottenAzulmagia/Stage25Act2.cs @@ -5,7 +5,7 @@ public enum OID : uint Boss = 0x267F, //R=1.2 BlazingAngon = 0x2682, //R=0.6 Helper = 0x233C, -}; +} public enum AID : uint { @@ -16,13 +16,13 @@ public enum AID : uint TheRamsVoice = 14763, // 267F->self, 3,5s cast, range 8 circle TheDragonsVoice = 14764, // 267F->self, 3,5s cast, range 6-30 donut ApocalypticRoar = 14767, // 267F->self, 5,0s cast, range 35+R 120-degree cone -}; +} public enum SID : uint { RepellingSpray = 556, // Boss->Boss, extra=0x64 Doom = 910, // Boss->player, extra=0x0 -}; +} class ApocalypticBolt : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage25DirtyRottenAzulmagia/Stage25Act3.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage25DirtyRottenAzulmagia/Stage25Act3.cs index daf394ae94..600757709f 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage25DirtyRottenAzulmagia/Stage25Act3.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage25DirtyRottenAzulmagia/Stage25Act3.cs @@ -6,7 +6,7 @@ public enum OID : uint Maelstrom = 0x2681, //R=0.6 Helper = 0x233C, LavaVoidzone = 0x1EA8BB, -}; +} public enum AID : uint { @@ -24,14 +24,14 @@ public enum AID : uint Plaincracker = 14765, // 2680->self, 3,5s cast, range 6+R circle TremblingEarth = 14774, // 233C->self, 3,5s cast, range 10-20 donut TremblingEarth2 = 14775, // 233C->self, 3,5s cast, range 20-30 donut -}; +} public enum SID : uint { RepellingSpray = 556, // Boss->Boss, extra=0x64 IceSpikes = 1307, // Boss->Boss, extra=0x64 Doom = 910, // Boss->player, extra=0x0 -}; +} class Charybdis : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage26PapaMia/Stage26Act1.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage26PapaMia/Stage26Act1.cs index be6aea7f46..f502e0f6b2 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage26PapaMia/Stage26Act1.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage26PapaMia/Stage26Act1.cs @@ -4,7 +4,7 @@ public enum OID : uint { Boss = 0x2C84, //R=2.55 Helper = 0x233C, -}; +} public enum AID : uint { @@ -13,14 +13,14 @@ public enum AID : uint RuffledFeathers = 18685, // 2C84->player, no cast, single-target Gust = 18687, // 2C84->location, 2,5s cast, range 3 circle CaberToss = 18688, // 2C84->player, 5,0s cast, single-target, interrupt or wipe -}; +} public enum SID : uint { VulnerabilityDown = 63, // Boss->Boss, extra=0x0 Windburn = 269, // Boss->player, extra=0x0 -}; +} class Gust : Components.LocationTargetedAOEs diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage26PapaMia/Stage26Act2.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage26PapaMia/Stage26Act2.cs index 3bc08ee774..e098fbc1ab 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage26PapaMia/Stage26Act2.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage26PapaMia/Stage26Act2.cs @@ -5,7 +5,7 @@ public enum OID : uint Boss = 0x2C58, //R=3.6 Thunderhead = 0x2C59, //R=1.0 Helper = 0x233C, -}; +} public enum AID : uint { @@ -16,18 +16,18 @@ public enum AID : uint LightningBolt = 18606, // 2C59->self, no cast, range 8 circle DadJoke = 18605, // 2C58->self, no cast, range 25+R 120-degree cone, knockback 15, dir forward VoidThunderIII = 18603, // 2C58->player, 4,0s cast, range 20 circle -}; +} public enum SID : uint { CriticalStrikes = 1797, // Boss->Boss, extra=0x0 Electrocution = 271, // Boss/2C59->player, extra=0x0 -}; +} public enum IconID : uint { BaitKnockback = 23, // player -}; +} class Thunderhead : Components.PersistentVoidzone { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage27LockUpYourSnorters/Stage27.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage27LockUpYourSnorters/Stage27.cs index 0cbe7af874..a7bb698281 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage27LockUpYourSnorters/Stage27.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage27LockUpYourSnorters/Stage27.cs @@ -6,7 +6,7 @@ public enum OID : uint Bomb = 0x2CF9, //R=0.8 MagitekExplosive = 0x2CEC, //R=0.8 Helper = 0x233C, -}; +} public enum AID : uint { @@ -17,7 +17,7 @@ public enum AID : uint Fungahhh = 19257, // Boss->self, no cast, range 8+R 90-degree cone, knockback 15 away from source Snort = 19266, // Boss->self, 10,0s cast, range 60+R circle, knockback 15 away from source MassiveExplosion = 19261, // 2CEC->self, no cast, range 60 circle, wipe, failed to destroy Magitek Explosive in time -}; +} class Fireball : Components.LocationTargetedAOEs { diff --git a/BossMod/Modules/Global/PVP/HiddenGorge/GoblinMercenary.cs b/BossMod/Modules/Global/PVP/HiddenGorge/GoblinMercenary.cs index 3993955dbe..29c9f0a91b 100644 --- a/BossMod/Modules/Global/PVP/HiddenGorge/GoblinMercenary.cs +++ b/BossMod/Modules/Global/PVP/HiddenGorge/GoblinMercenary.cs @@ -4,7 +4,7 @@ public enum OID : uint { Boss = 0x25FA, //R=2.0 BossHelper = 0x233C, -}; +} public enum AID : uint { @@ -17,13 +17,13 @@ public enum AID : uint GobswipeConklopsTelegraph = 14568, // BossHelper->self, 1,0s cast, single-target GobswipeConklops = 14560, // Boss->self, no cast, range 5-30 donut, knockback 15 away from source Discharge = 14561, // Boss->self, no cast, single-target -}; +} public enum IconID : uint { RotateCCW = 168, // Boss RotateCW = 167, // Boss -}; +} class GobspinSwipe : Components.GenericAOEs { diff --git a/BossMod/Modules/Global/Quest/FF15Collab/Garuda.cs b/BossMod/Modules/Global/Quest/FF15Collab/Garuda.cs index b7c4bdc1d8..65feef4d17 100644 --- a/BossMod/Modules/Global/Quest/FF15Collab/Garuda.cs +++ b/BossMod/Modules/Global/Quest/FF15Collab/Garuda.cs @@ -30,7 +30,7 @@ public enum AID : uint MistralGaol = 14621, // Boss->self, 5,0s cast, range 6 circle, quick time event starts Microburst2 = 14624, // Boss->self, no cast, range 25 circle, quick time event failed (enrage) warpstrike = 14597, //duty action for player -}; +} class GustFront : Components.UniformStackSpread { diff --git a/BossMod/Modules/Global/Quest/FF15Collab/Iseultalon.cs b/BossMod/Modules/Global/Quest/FF15Collab/Iseultalon.cs index ef308f29cc..fd6a9411ed 100644 --- a/BossMod/Modules/Global/Quest/FF15Collab/Iseultalon.cs +++ b/BossMod/Modules/Global/Quest/FF15Collab/Iseultalon.cs @@ -26,13 +26,13 @@ public enum AID : uint Electrocution2 = 14981, // 25B3->location, 10,0s cast, range 3 circle, tower FatalCurrent = 14610, // Helper/Helper2->self, 2,0s cast, range 80 circle, tower fail TailWhip = 14607, // Boss->self, 3,0s cast, range 12 270-degree cone -}; +} public enum IconID : uint { stack = 93, // 2650 spread = 129, // player/2650 -}; +} class Thunderbolt : Components.UniformStackSpread { diff --git a/BossMod/Modules/Global/Quest/FF15Collab/MA-x.cs b/BossMod/Modules/Global/Quest/FF15Collab/MA-x.cs index 7808178846..fb0d2f3bd1 100644 --- a/BossMod/Modules/Global/Quest/FF15Collab/MA-x.cs +++ b/BossMod/Modules/Global/Quest/FF15Collab/MA-x.cs @@ -18,7 +18,7 @@ public enum AID : uint Shock = 14600, // Boss->self, 3,0s cast, range 10 circle unknown = 14531, // Boss->self, no cast, single-target unknown2 = 14533, // Boss->self, no cast, single-target -}; +} class Chainsaw : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Global/Quest/FF16Collab/InfernalShadowEnums.cs b/BossMod/Modules/Global/Quest/FF16Collab/InfernalShadowEnums.cs index cc80296dea..6e6dcb3cd8 100644 --- a/BossMod/Modules/Global/Quest/FF16Collab/InfernalShadowEnums.cs +++ b/BossMod/Modules/Global/Quest/FF16Collab/InfernalShadowEnums.cs @@ -136,4 +136,4 @@ public enum AID : uint CliveAbility = 35097, // Clive->self, no cast, single-target CliveScarletCyclone = 35104, // Clive->self, no cast, range 6 circle ClivePrecisionStrike = 35100, // Clive->Boss/InfernalSword, no cast, single-target -}; +} diff --git a/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/D60TheBlackRider.cs b/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/D60TheBlackRider.cs index a4c6435f98..d53520a8a2 100644 --- a/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/D60TheBlackRider.cs +++ b/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/D60TheBlackRider.cs @@ -6,7 +6,7 @@ public enum OID : uint Voidzone = 0x1E858E, // R0.500, EventObj type, spawn during fight VoidsentDiscarnate = 0x18E6, // R1.000, spawn during fight Helper = 0x233C, // R0.500, x12, 523 type -}; +} public enum AID : uint { @@ -15,7 +15,7 @@ public enum AID : uint HallOfSorrow = 7088, // Boss->location, no cast, range 9 circle Infaturation = 7157, // VoidsentDiscarnate->self, 6.5s cast, range 6+R circle Valfodr = 7089, // Boss->player, 4.0s cast, width 6 rect charge, knockback 25, dir forward -}; +} class CleaveAuto : Components.Cleave { diff --git a/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/D70Yaquaru.cs b/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/D70Yaquaru.cs index 69a4e61c75..12ceeab425 100644 --- a/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/D70Yaquaru.cs +++ b/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/D70Yaquaru.cs @@ -5,7 +5,7 @@ public enum OID : uint Boss = 0x1815, // R5.750, x1 Voidzone = 0x1E9998, // R0.500, EventObj type, spawn during fight Helper = 0x233C, // R0.500, x12, 523 type -}; +} public enum AID : uint { @@ -14,7 +14,7 @@ public enum AID : uint Drench = 7093, // Boss->self, no cast, range 10+R 90-degree cone, 5.1s after pull, 7.1s after every 2nd Electrogenesis, 7.3s after every FangsEnd Electrogenesis = 7094, // Boss->location, 3.0s cast, range 8 circle FangsEnd = 7092, // Boss->player, no cast, single-target -}; +} class Douse : Components.PersistentVoidzoneAtCastTarget { diff --git a/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/D80Gudanna.cs b/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/D80Gudanna.cs index 1de3ef5d12..2ccde91a4d 100644 --- a/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/D80Gudanna.cs +++ b/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/D80Gudanna.cs @@ -5,7 +5,7 @@ public enum OID : uint Boss = 0x1816, // R11.600, x1 Tornado = 0x18F0, // R1.000, spawn during fight Helper = 0x233C, // R0.500, x12, 523 type -}; +} public enum AID : uint { @@ -16,7 +16,7 @@ public enum AID : uint Maelstrom = 7167, // 18F0->self, 1.3s cast, range 10 circle Thunderbolt = 7095, // Boss->self, 2.5s cast, range 5+R 120-degree cone Trounce = 7098, // Boss->self, 2.5s cast, range 40+R 60-degree cone -}; +} class Charybdis : Components.LocationTargetedAOEs { diff --git a/BossMod/Modules/RealmReborn/Dungeon/D03Copperbell/D031Kottos.cs b/BossMod/Modules/RealmReborn/Dungeon/D03Copperbell/D031Kottos.cs index f11977723d..97283f9033 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D03Copperbell/D031Kottos.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D03Copperbell/D031Kottos.cs @@ -15,7 +15,7 @@ public enum AID : uint LumberingLeapJumpRest = 28549, // Boss->location, no cast, teleport ColossalSlam = 28546, // Boss->self, 4.0s cast, range 30 60-degree cone aoe Catapult = 28547, // Boss->player, 5.0s cast, single target damage at random target -}; +} class GrandSlam : Components.SingleTargetCast { diff --git a/BossMod/Modules/RealmReborn/Dungeon/D03Copperbell/D032IchorousIre.cs b/BossMod/Modules/RealmReborn/Dungeon/D03Copperbell/D032IchorousIre.cs index a7c76910af..cc00fbb539 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D03Copperbell/D032IchorousIre.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D03Copperbell/D032IchorousIre.cs @@ -14,7 +14,7 @@ public enum AID : uint Divide = 28463, // Boss->self, 3.0s cast, visual DivideAppear = 28464, // IchorousDrip->location, no cast, teleport/appear Burst = 28465, // IchorousDrip->self, 6.0s cast, range 8 aoe -}; +} class Syrup : Components.LocationTargetedAOEs { diff --git a/BossMod/Modules/RealmReborn/Dungeon/D03Copperbell/D033Gyges.cs b/BossMod/Modules/RealmReborn/Dungeon/D03Copperbell/D033Gyges.cs index 7671510445..267cd8195f 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D03Copperbell/D033Gyges.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D03Copperbell/D033Gyges.cs @@ -14,7 +14,7 @@ public enum AID : uint GiganticBlast = 28761, // Helper->self, 6.0s cast, range 8 aoe GrandSlam = 28764, // Boss->player, 5.0s cast, tankbuster ColossalSlam = 28763, // Boss->self, 4.0s cast, range 40 60-degree cone aoe -}; +} class GiganticSwing : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/RealmReborn/Dungeon/D05Totorak/D053Graffias.cs b/BossMod/Modules/RealmReborn/Dungeon/D05Totorak/D053Graffias.cs index 4b2b17a1a2..c5ed6a18bf 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D05Totorak/D053Graffias.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D05Totorak/D053Graffias.cs @@ -7,7 +7,7 @@ public enum OID : uint Comesmite = 0x104, // spawn during fight GraffiasTail = 0x10A, // spawn during fight PollenZone = 0x1E8614, // spawn during fight -}; +} public enum AID : uint { @@ -18,7 +18,7 @@ public enum AID : uint PodBurst = 730, // FleshyPod->self, 3.0s cast, range 7.050 aoe TailMolt = 704, // Boss->self, no cast, visual (spawns tail) DeadlyThrust = 702, // Boss->self, 2.0s cast, visual (spawns pollen zone) -}; +} class Silkscreen : Components.SelfTargetedLegacyRotationAOEs { diff --git a/BossMod/Modules/RealmReborn/Dungeon/D06Haukke/D061ManorClaviger.cs b/BossMod/Modules/RealmReborn/Dungeon/D06Haukke/D061ManorClaviger.cs index b625763723..9e92c79a46 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D06Haukke/D061ManorClaviger.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D06Haukke/D061ManorClaviger.cs @@ -3,7 +3,7 @@ public enum OID : uint { Boss = 0x110, // x1 -}; +} public enum AID : uint { @@ -11,7 +11,7 @@ public enum AID : uint SweetSteel = 489, // Boss->self, no cast, range 7.4 ?-degree cone cleave VoidFire2 = 855, // Boss->location, 3.0s cast, range 5 aoe DarkMist = 705, // Boss->self, 4.0s cast, range 9.4 aoe -}; +} class SweetSteel : Components.Cleave { diff --git a/BossMod/Modules/RealmReborn/Dungeon/D06Haukke/D063LadyAmandine.cs b/BossMod/Modules/RealmReborn/Dungeon/D06Haukke/D063LadyAmandine.cs index ae2e9c9025..ebb38a2dd2 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D06Haukke/D063LadyAmandine.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D06Haukke/D063LadyAmandine.cs @@ -5,7 +5,7 @@ public enum OID : uint Boss = 0x38A8, // x1 Sentry = 0x38A9, // x1 Handmaiden = 0x38AA, // spawn during fight -}; +} public enum AID : uint { @@ -22,7 +22,7 @@ public enum AID : uint AutoAttackAdd = 870, // Handmaiden->player, no cast ColdCaress = 28642, // Handmaiden->player, no cast Stoneskin = 28641, // Handmaiden->Boss, 5.0s cast, buff target -}; +} class DarkMist : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/RealmReborn/Dungeon/D07Brayflox/D074Aiatar.cs b/BossMod/Modules/RealmReborn/Dungeon/D07Brayflox/D074Aiatar.cs index 16a91b7978..3d5653e9bb 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D07Brayflox/D074Aiatar.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D07Brayflox/D074Aiatar.cs @@ -4,7 +4,7 @@ public enum OID : uint { Boss = 0x38C5, // x1 Helper = 0x233C, // x14 -}; +} public enum AID : uint { @@ -14,7 +14,7 @@ public enum AID : uint ToxicVomitAOE = 28657, // Helper->self, 5.0s cast, range 2 aoe Burst = 28658, // Helper->self, 9.0s cast, range 10 aoe DragonBreath = 28660, // Boss->self, 3.0s cast, range 30 width 8 rect -}; +} class SalivousSnap : Components.SingleTargetCast { diff --git a/BossMod/Modules/RealmReborn/Dungeon/D08Qarn/D081Teratotaur.cs b/BossMod/Modules/RealmReborn/Dungeon/D08Qarn/D081Teratotaur.cs index 883c9ef1fb..2da047eeb5 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D08Qarn/D081Teratotaur.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D08Qarn/D081Teratotaur.cs @@ -7,7 +7,7 @@ public enum OID : uint Platform1 = 0x1E87E2, // x1, EventObj type; eventstate 0 if active, 7 if inactive Platform2 = 0x1E87E3, // x1, EventObj type; eventstate 0 if active, 7 if inactive Platform3 = 0x1E87E4, // x1, EventObj type; eventstate 0 if active, 7 if inactive -}; +} public enum AID : uint { @@ -19,12 +19,12 @@ public enum AID : uint AutoAttackWespe = 871, // DungWespe->player, no cast FinalSting = 919, // DungWespe->player, 3.0s cast -}; +} public enum SID : uint { Doom = 210, // Boss->player, extra=0x0 -}; +} class Triclip : Components.Cleave { diff --git a/BossMod/Modules/RealmReborn/Dungeon/D08Qarn/D082TempleGuardian.cs b/BossMod/Modules/RealmReborn/Dungeon/D08Qarn/D082TempleGuardian.cs index 8fe8ac4fcf..371cf0619a 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D08Qarn/D082TempleGuardian.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D08Qarn/D082TempleGuardian.cs @@ -4,7 +4,7 @@ public enum OID : uint { Boss = 0x6DB, // x1 GolemSoulstone = 0x7FA, // x1, Part type, and more spawn during fight -}; +} public enum AID : uint { @@ -14,7 +14,7 @@ public enum AID : uint Rockslide = 1419, // Boss->self, 2.5s cast, range 16.2 width 8 rect aoe StoneSkull = 1416, // Boss->player, no cast, random single-target Obliterate = 680, // Boss->self, 2.0s cast, range 6? ??? aoe -}; +} class BoulderClap : Components.SelfTargetedLegacyRotationAOEs { diff --git a/BossMod/Modules/RealmReborn/Dungeon/D08Qarn/D083Adjudicator.cs b/BossMod/Modules/RealmReborn/Dungeon/D08Qarn/D083Adjudicator.cs index d5486b99ec..963a002c54 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D08Qarn/D083Adjudicator.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D08Qarn/D083Adjudicator.cs @@ -8,7 +8,7 @@ public enum OID : uint Platform1 = 0x1E870F, // x1, EventObj type Platform2 = 0x1E8710, // x1, EventObj type Platform3 = 0x1E8711, // x1, EventObj type -}; +} public enum AID : uint { @@ -18,7 +18,7 @@ public enum AID : uint CreepingDarkness = 927, // Boss->self, 2.5s cast, raidwide VergeLine = 929, // MythrilVerge->self, 4.0s cast, range 60 width 4 rect aoe VergePulse = 930, // MythrilVerge->self, 10.0s cast, range 60 ??? -}; +} class Darkness : Components.SelfTargetedLegacyRotationAOEs { diff --git a/BossMod/Modules/RealmReborn/Dungeon/D09Cutter/D092GiantTunnelWorm.cs b/BossMod/Modules/RealmReborn/Dungeon/D09Cutter/D092GiantTunnelWorm.cs index c0e14c5158..4687c84348 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D09Cutter/D092GiantTunnelWorm.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D09Cutter/D092GiantTunnelWorm.cs @@ -5,7 +5,7 @@ public enum OID : uint Boss = 0x536, // x1 BottomlessDesertHelper = 0x64A, // x1 SandPillarHelper = 0x64B, // x7 -}; +} public enum AID : uint { @@ -15,7 +15,7 @@ public enum AID : uint Earthbreak = 531, // Boss->self, no cast, range 14.5 aoe BottomlessDesert = 1112, // BottomlessDesertHelper->self, no cast, raidwide drawin SandPillar = 1113, // SandPillarHelper->self, no cast, range 4.5 aoe -}; +} class Sandstorm : Components.Cleave { diff --git a/BossMod/Modules/RealmReborn/Dungeon/D09Cutter/D093Chimera.cs b/BossMod/Modules/RealmReborn/Dungeon/D09Cutter/D093Chimera.cs index 51f3b164e2..8c9b9d7e9a 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D09Cutter/D093Chimera.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D09Cutter/D093Chimera.cs @@ -5,7 +5,7 @@ public enum OID : uint Boss = 0x64C, // x1 Cacophony = 0x64D, // spawn during fight RamsKeeper = 0x1E8713, // EventObj type, spawn during fight -}; +} public enum AID : uint { @@ -18,7 +18,7 @@ public enum AID : uint RamsKeeper = 1106, // Boss->location, 3.0s cast, range 6 voidzone Cacophony = 1107, // Boss->self, no cast, visual, summons orb ChaoticChorus = 1108, // Cacophony->self, no cast, range 6 aoe -}; +} class LionsBreath : Components.Cleave { diff --git a/BossMod/Modules/RealmReborn/Dungeon/D10StoneVigil/D101ChudoYudo.cs b/BossMod/Modules/RealmReborn/Dungeon/D10StoneVigil/D101ChudoYudo.cs index bcb5caa3d8..ce47174580 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D10StoneVigil/D101ChudoYudo.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D10StoneVigil/D101ChudoYudo.cs @@ -3,7 +3,7 @@ public enum OID : uint { Boss = 0x5B5, // x1 -}; +} public enum AID : uint { @@ -11,7 +11,7 @@ public enum AID : uint Rake = 901, // Boss->player, no cast, extra attack on tank LionsBreath = 902, // Boss->self, 1.0s cast, range 10.25 ?-degree cone aoe Swinge = 903, // Boss->self, 4.0s cast, range 40 ?-degree cone aoe -}; +} class LionsBreath : Components.SelfTargetedLegacyRotationAOEs { diff --git a/BossMod/Modules/RealmReborn/Dungeon/D10StoneVigil/D102Koshchei.cs b/BossMod/Modules/RealmReborn/Dungeon/D10StoneVigil/D102Koshchei.cs index e9a79c7a63..4e1c9500cc 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D10StoneVigil/D102Koshchei.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D10StoneVigil/D102Koshchei.cs @@ -5,7 +5,7 @@ public enum OID : uint Boss = 0x38C7, // x1 MaelstromVisual = 0x38C8, // spawn during fight MaelstromHelper = 0x38D0, // x4 -}; +} public enum AID : uint { @@ -14,7 +14,7 @@ public enum AID : uint SonicStorm = 29053, // Boss->location, 3.0s cast, range 6 aoe Typhoon = 28730, // Boss->self, 3.0s cast, visual TyphoonAOE = 28731, // MaelstromHelper->self, no cast, range 3 aoe -}; +} class SpikedTail : Components.SingleTargetCast { diff --git a/BossMod/Modules/RealmReborn/Dungeon/D10StoneVigil/D103Isgebind.cs b/BossMod/Modules/RealmReborn/Dungeon/D10StoneVigil/D103Isgebind.cs index dffbd019bb..f14999284a 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D10StoneVigil/D103Isgebind.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D10StoneVigil/D103Isgebind.cs @@ -4,7 +4,7 @@ public enum OID : uint { Boss = 0x5AF, // x1 Helper = 0x233C, // x8 -}; +} public enum AID : uint { @@ -15,7 +15,7 @@ public enum AID : uint SheetOfIce2 = 1024, // Helper->location, 3.0s cast, range 5 aoe Cauterize = 1026, // Boss->self, 4.0s cast, range 48 width 20 rect aoe Touchdown = 1027, // Boss->self, no cast, range 5 aoe around center -}; +} class RimeWreath : Components.RaidwideCast { diff --git a/BossMod/Modules/RealmReborn/Dungeon/D11DzemaelDarkhold/D111AllSeeingEye.cs b/BossMod/Modules/RealmReborn/Dungeon/D11DzemaelDarkhold/D111AllSeeingEye.cs index fd8acb39e8..cd3c342695 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D11DzemaelDarkhold/D111AllSeeingEye.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D11DzemaelDarkhold/D111AllSeeingEye.cs @@ -6,7 +6,7 @@ public enum OID : uint MoucheVolante = 0x606, // spawn during fight Amanuensis = 0x607, // spawn during fight Crystal = 0x1E8594, // x6, EventObj type -}; +} public enum AID : uint { @@ -18,12 +18,12 @@ public enum AID : uint AutoAttackAdd = 878, // MoucheVolante->player, no cast, single-target Thunderstrike = 1097, // MoucheVolante->self, 2.0s cast, range 10+1.2 width 3 rect Condemnation = 1100, // Amanuensis->self, 2.5s cast, range 6+1.3 90-degree cone -}; +} public enum SID : uint { Invincibility = 325, // none->Boss, extra=0x0 -}; +} class CursedGaze : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/RealmReborn/Dungeon/D11DzemaelDarkhold/D113Batraal.cs b/BossMod/Modules/RealmReborn/Dungeon/D11DzemaelDarkhold/D113Batraal.cs index ca3ec6130f..177060310a 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D11DzemaelDarkhold/D113Batraal.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D11DzemaelDarkhold/D113Batraal.cs @@ -5,7 +5,7 @@ public enum OID : uint Boss = 0x60A, // x1 CorruptedCrystal = 0x60C, // spawn during fight VoidPitch = 0x6B4, // spawn during fight -}; +} public enum AID : uint { @@ -16,7 +16,7 @@ public enum AID : uint Hellssend = 1132, // Boss->self, no cast, damage up buff AetherialSurge = 1167, // CorruptedCrystal->self, 3.0s cast, range 5+1 circle aoe SeaOfPitch = 962, // VoidPitch->location, no cast, range 4 circle -}; +} class GrimFate : Components.Cleave { diff --git a/BossMod/Modules/RealmReborn/Dungeon/D12AurumVale/D121Locksmith.cs b/BossMod/Modules/RealmReborn/Dungeon/D12AurumVale/D121Locksmith.cs index 92a8850560..8f0957719c 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D12AurumVale/D121Locksmith.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D12AurumVale/D121Locksmith.cs @@ -3,7 +3,7 @@ public enum OID : uint { Boss = 0x5BF, // x1 -}; +} public enum AID : uint { @@ -11,7 +11,7 @@ public enum AID : uint HundredLashings = 1031, // Boss->self, no cast, range 8+R ?-degree cone GoldRush = 1032, // Boss->self, no cast, raidwide GoldDust = 1033, // Boss->location, 3.5s cast, range 8 circle -}; +} class HundredLashings : Components.Cleave { diff --git a/BossMod/Modules/RealmReborn/Dungeon/D12AurumVale/D122Coincounter.cs b/BossMod/Modules/RealmReborn/Dungeon/D12AurumVale/D122Coincounter.cs index 94158e320e..14e758d15e 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D12AurumVale/D122Coincounter.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D12AurumVale/D122Coincounter.cs @@ -3,7 +3,7 @@ public enum OID : uint { Boss = 0x5BE, // x1 -}; +} public enum AID : uint { @@ -14,7 +14,7 @@ public enum AID : uint Glower = 629, // Boss->self, 3.0s cast, range 17+R width 7 rect aoe AnimalInstinct = 630, // Boss->self, no cast, single-target EyeOfTheBeholder = 631, // Boss->self, 2.5s cast, range 8-15+R donut 270-degree cone aoe -}; +} class TenTonzeSwipe : Components.Cleave { diff --git a/BossMod/Modules/RealmReborn/Dungeon/D12AurumVale/D123MisersMistress.cs b/BossMod/Modules/RealmReborn/Dungeon/D12AurumVale/D123MisersMistress.cs index 752a9fdb9a..02feaf62b1 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D12AurumVale/D123MisersMistress.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D12AurumVale/D123MisersMistress.cs @@ -4,7 +4,7 @@ public enum OID : uint { Boss = 0x3AF, // x1 MorbolFruit = 0x5BC, // spawn during fight -}; +} public enum AID : uint { @@ -14,7 +14,7 @@ public enum AID : uint BurrBurrow = 1038, // Boss->self, 3.0s cast, raidwide? HookedBurrs = 1039, // Boss->player, 1.5s cast, single-target Sow = 1081, // Boss->player, 3.0s cast, single-target, spawns adds -}; +} class VineProbe : Components.Cleave { diff --git a/BossMod/Modules/RealmReborn/Dungeon/D13CastrumMeridianum/D131BlackEft.cs b/BossMod/Modules/RealmReborn/Dungeon/D13CastrumMeridianum/D131BlackEft.cs index d0b55e6014..2cfcbcde0a 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D13CastrumMeridianum/D131BlackEft.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D13CastrumMeridianum/D131BlackEft.cs @@ -7,7 +7,7 @@ public enum OID : uint AddSignifer = 0x38CC, // x2, and more spawn during fight AddLaquearius = 0x38CB, // x2, and more spawn during fight AddMagitekColossus = 0x394C, // spawn during fight -}; +} public enum AID : uint { @@ -17,7 +17,7 @@ public enum AID : uint HighPoweredMagitekRay = 28773, // Boss->self, 5.0s cast, range 60 width 4 rect aoe RequestAssistance = 28774, // Boss->self, 4.0s cast, single-target, summon adds MagitekCannon = 28775, // Boss->location, 3.0s cast, range 6 circle aoe -}; +} class IncendiarySupport : Components.CastHint { diff --git a/BossMod/Modules/RealmReborn/Dungeon/D13CastrumMeridianum/D132MagitekVanguardF1.cs b/BossMod/Modules/RealmReborn/Dungeon/D13CastrumMeridianum/D132MagitekVanguardF1.cs index 3c135b75e6..795991df69 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D13CastrumMeridianum/D132MagitekVanguardF1.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D13CastrumMeridianum/D132MagitekVanguardF1.cs @@ -4,7 +4,7 @@ public enum OID : uint { Boss = 0x38CD, // x1 Helper = 0x233C, // x7 -}; +} public enum AID : uint { @@ -18,7 +18,7 @@ public enum AID : uint TargetedSupportAOE = 28784, // Helper->self, 3.0s cast, range 5 circle aoe CermetDrill = 28785, // Boss->player, 5.0s cast, single-target tankbuster Overcharge = 29146, // Boss->self, 3.0s cast, range 11 120-degree cone aoe -}; +} class ThermobaricCharge : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/RealmReborn/Dungeon/D13CastrumMeridianum/D133Livia.cs b/BossMod/Modules/RealmReborn/Dungeon/D13CastrumMeridianum/D133Livia.cs index 4a4306dc57..b3db0407fa 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D13CastrumMeridianum/D133Livia.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D13CastrumMeridianum/D133Livia.cs @@ -4,7 +4,7 @@ public enum OID : uint { Boss = 0x38CE, // x1 Helper = 0x233C, // x50 -}; +} public enum AID : uint { @@ -34,7 +34,7 @@ public enum AID : uint ArtificialBoost = 29354, // Boss->self, 4.0s cast, single-target, visual (buff) ArtificialPlasmaBoostFirst = 29352, // Boss->self, 5.0s cast, raidwide ArtificialPlasmaBoostRest = 29353, // Boss->self, no cast, raidwide -}; +} class AglaeaClimb : Components.SingleTargetCast { diff --git a/BossMod/Modules/RealmReborn/Dungeon/D14Praetorium/D141Colossus.cs b/BossMod/Modules/RealmReborn/Dungeon/D14Praetorium/D141Colossus.cs index 44247c19c9..9d0d7a6f54 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D14Praetorium/D141Colossus.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D14Praetorium/D141Colossus.cs @@ -4,7 +4,7 @@ public enum OID : uint { Boss = 0x3872, // x1 Helper = 0x233C, // x8 -}; +} public enum AID : uint { @@ -17,7 +17,7 @@ public enum AID : uint PrototypeLaserBeta = 28471, // Boss->self, 5.0s cast, single-target, visual IronKissBeta = 28472, // Helper->player, 5.0s cast, range 5 circle spread GrandSword = 28473, // Boss->self, 5.0s cast, range 25 90-degree cone aoe -}; +} class CeruleumVent : Components.RaidwideCast { diff --git a/BossMod/Modules/RealmReborn/Dungeon/D14Praetorium/D142Nero.cs b/BossMod/Modules/RealmReborn/Dungeon/D14Praetorium/D142Nero.cs index 54a53b34e4..e6713e09a8 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D14Praetorium/D142Nero.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D14Praetorium/D142Nero.cs @@ -5,7 +5,7 @@ public enum OID : uint Boss = 0x3873, // x1 MagitekDeathClaw = 0x3874, // spawn during fight Helper = 0x233C, // x8 -}; +} public enum AID : uint { @@ -19,7 +19,7 @@ public enum AID : uint Activate = 28479, // Boss->self, 3.0s cast, single-target, visual (spawn claw) TheHand = 28480, // MagitekDeathClaw->player, no cast, single-target (autoattack with knockback 20) WheelOfSuffering = 28481, // Boss->self, 3.5s cast, range 7 circle aoe (knockback 12) -}; +} class IronUprising : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/RealmReborn/Dungeon/D14Praetorium/D143Gaius.cs b/BossMod/Modules/RealmReborn/Dungeon/D14Praetorium/D143Gaius.cs index 8174b69830..e078e89b33 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D14Praetorium/D143Gaius.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D14Praetorium/D143Gaius.cs @@ -7,7 +7,7 @@ public enum OID : uint PhantomGaiusSide = 0x3876, // x5, untargetable PhantomGaiusAdd = 0x3877, // x4, adds that become targetable on low hp TerminusEst = 0x3878, // spawn during fight -}; +} public enum AID : uint { @@ -34,7 +34,7 @@ public enum AID : uint Heirsbane = 28498, // PhantomGaiusAdd->player, 5.0s cast, single-target damage VeniVidiVici = 28499, // Boss->self, no cast, raidwide on last add death VeniVidiViciEnrage = 28500, // Boss->self, no cast, enrage (if adds aren't killed in 90s) -}; +} class TerminusEstTriple : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/RealmReborn/Dungeon/D15WanderersPalace/D151KeeperOfHalidom.cs b/BossMod/Modules/RealmReborn/Dungeon/D15WanderersPalace/D151KeeperOfHalidom.cs index 0099c2edb4..b2adffd5dd 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D15WanderersPalace/D151KeeperOfHalidom.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D15WanderersPalace/D151KeeperOfHalidom.cs @@ -3,7 +3,7 @@ public enum OID : uint { Boss = 0x41C, -}; +} public enum AID : uint { @@ -13,7 +13,7 @@ public enum AID : uint Inhale = 950, // Boss->self, 2.5s cast, range 20+R 90-degree cone GoobbuesGrief = 942, // Boss->self, 0.5s cast, range 6+R circle MoldyPhlegm = 941, // Boss->location, 2.5s cast, range 6 circle -}; +} class MoldySneeze : Components.Cleave { diff --git a/BossMod/Modules/RealmReborn/Dungeon/D15WanderersPalace/D152GiantBavarois.cs b/BossMod/Modules/RealmReborn/Dungeon/D15WanderersPalace/D152GiantBavarois.cs index 53c3f59849..235db7ed9f 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D15WanderersPalace/D152GiantBavarois.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D15WanderersPalace/D152GiantBavarois.cs @@ -7,7 +7,7 @@ public enum OID : uint GreenBavarois = 0x41F, // spawn during fight PurpleBavarois = 0x421, // spawn during fight BlueBavarois = 0x422, // spawn during fight -}; +} public enum AID : uint { @@ -18,12 +18,12 @@ public enum AID : uint Aero = 1397, // GreenBavarois->player, 1.0s cast, single-target Thunder = 1396, // PurpleBavarois->player, 1.0s cast, single-target Water = 971, // BlueBavarois->player, 1.0s cast, single-target -}; +} public enum IconID : uint { AmorphicFlail = 1, // player -}; +} class Fire : Components.SingleTargetCast { diff --git a/BossMod/Modules/RealmReborn/Dungeon/D15WanderersPalace/D153TonberryKing.cs b/BossMod/Modules/RealmReborn/Dungeon/D15WanderersPalace/D153TonberryKing.cs index 3a2a8cef4b..89bcf63a78 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D15WanderersPalace/D153TonberryKing.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D15WanderersPalace/D153TonberryKing.cs @@ -5,7 +5,7 @@ public enum OID : uint Boss = 0x374, // x1 Tonberry = 0x3A3, // spawn during fight TonberrySlasher = 0x8D5, // spawn during fight -}; +} public enum AID : uint { @@ -17,12 +17,12 @@ public enum AID : uint ThroatStab = 948, // Tonberry/TonberrySlasher->player, no cast, single-target EveryonesGrudge = 947, // Boss->player, 3.0s cast, single-target, buffed by rancor stacks RancorRelease = 949, // Tonberry->Boss, 1.0s cast, single-target, gives boss rancor stack on death -}; +} public enum SID : uint { Rancor = 351, // Tonberry->Boss, extra=num stacks -}; +} class D153TonberryKingStates : StateMachineBuilder { diff --git a/BossMod/Modules/RealmReborn/Dungeon/D16Amdapor/D161Psycheflayer.cs b/BossMod/Modules/RealmReborn/Dungeon/D16Amdapor/D161Psycheflayer.cs index 876c4e4f73..76a08ef88c 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D16Amdapor/D161Psycheflayer.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D16Amdapor/D161Psycheflayer.cs @@ -7,7 +7,7 @@ public enum OID : uint StoneMarionette = 0x5D2, // x1 MarbleMarionette = 0x5D3, // x1 MegalithMarionette = 0x5D4, // x1 -}; +} public enum AID : uint { @@ -25,7 +25,7 @@ public enum AID : uint Rockslide = 1086, // StoneMarionette->self, 2.5s cast, range 11+R width 8 rect Obliterate = 1088, // MarbleMarionette->self, 3.0s cast, raidwide Plaincracker = 1087, // MegalithMarionette->self, 7.0s cast, range 25+R circle -}; +} class VoidFireCleave : Components.Cleave { diff --git a/BossMod/Modules/RealmReborn/Dungeon/D16Amdapor/D162DemonWall.cs b/BossMod/Modules/RealmReborn/Dungeon/D16Amdapor/D162DemonWall.cs index 81c346e2ce..a9a2bc1940 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D16Amdapor/D162DemonWall.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D16Amdapor/D162DemonWall.cs @@ -5,7 +5,7 @@ public enum OID : uint Helper = 0x19A, // x3 Boss = 0x283, // x1 Pollen = 0x1E86B1, // x1, EventObj type -}; +} public enum AID : uint { @@ -13,7 +13,7 @@ public enum AID : uint LiquefyCenter = 1045, // Helper->self, 3.0s cast, range 50+R width 8 rect LiquefySides = 1046, // Helper->self, 2.0s cast, range 50+R width 7 rect Repel = 1047, // Boss->self, 3.0s cast, range 40+R 180?-degree cone knockback 20 (non-immunable) -}; +} class LiquefyCenter : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/RealmReborn/Dungeon/D16Amdapor/D163Anantaboga.cs b/BossMod/Modules/RealmReborn/Dungeon/D16Amdapor/D163Anantaboga.cs index d723a6c934..99ca038807 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D16Amdapor/D163Anantaboga.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D16Amdapor/D163Anantaboga.cs @@ -9,7 +9,7 @@ public enum OID : uint Pillar2 = 0x1E86A8, // x1, EventObj type Pillar3 = 0x1E86A9, // x1, EventObj type Pillar4 = 0x1E86AA, // x1, EventObj type -}; +} public enum AID : uint { @@ -22,12 +22,12 @@ public enum AID : uint TriumphantRoar = 741, // DarkHelot->self, no cast, single-target damage up (enrage if not killed fast enough) PlagueDance = 1075, // Boss->self, no cast, single-target, visual (spawns dark nova) BubonicCloud = 1076, // DarkNova->self, no cast, range 10+R circle, voidzone -}; +} public enum TetherID : uint { PlagueDance = 1, // Boss->player -}; +} class TheLook : Components.Cleave { diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/Ex1UltimaEnums.cs b/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/Ex1UltimaEnums.cs index 327628e651..a995464a3a 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/Ex1UltimaEnums.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/Ex1UltimaEnums.cs @@ -11,7 +11,7 @@ public enum OID : uint MagitekBit = 0x915, // R0.600, more spawn during fight Helper = 0x1B2, // R0.500, x19 AetheroplasmHelper = 0x8EE, // R0.500, x3 -}; +} public enum AID : uint { @@ -47,7 +47,7 @@ public enum AID : uint AssaultCannon = 1526, // MagitekBit->self, 2.5s cast, range 45+R width 2 rect aoe Freefire = 1515, // Helper->self, no cast, range 40 circle aoe with 15 falloff -}; +} public enum SID : uint { diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/Ex2GarudaEnums.cs b/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/Ex2GarudaEnums.cs index 9bd2cec0c9..0b2002a5e4 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/Ex2GarudaEnums.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/Ex2GarudaEnums.cs @@ -17,7 +17,7 @@ public enum OID : uint Monolith3 = 0x1E8708, // R2.000, x1, EventObj type Monolith4 = 0x1E8709, // R2.000, x1, EventObj type SpinyShield = 0x1E8F68, // R0.500, EventObj type, spawn during fight -}; +} public enum AID : uint { @@ -40,9 +40,9 @@ public enum AID : uint Gigastorm = 1555, // SpinyPlume->self, 3.0s cast, range 6+R circle aoe on death; after cast end shield spawns and stays active for ~10s Cyclone = 1556, // SpinyPlume->player, no cast, single-target, applies thermal low SuperCyclone = 1557, // SpinyPlume->location, no cast, deadly raidwide if thermal low reaches 3 stacks -}; +} public enum SID : uint { ThermalLow = 379, // SpinyPlume->player, extra=0x1/0x2/0x3 -}; +} diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/Ex3TitanEnums.cs b/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/Ex3TitanEnums.cs index 738de75dc3..c8583bf22d 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/Ex3TitanEnums.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/Ex3TitanEnums.cs @@ -10,7 +10,7 @@ public enum OID : uint GraniteGaoler = 0x8F2, // R1.900, spawn during fight TitansHeart = 0x5E5, // R5.250, Part type, spawn during fight GaolerVoidzone = 0x1E8F8F, // R0.500, EventObj type, spawn during fight (voidzone left by killed gaolers) -}; +} public enum AID : uint { @@ -37,15 +37,15 @@ public enum AID : uint AutoAttackGaoler = 1651, // GraniteGaoler->player, no cast, single-target LandslideGaoler = 1475, // GraniteGaoler->self, 2.2s cast, range 35+R width 6 rect aoe, knockback 15 TumultGaoler = 1476, // GraniteGaoler->self, no cast, raidwide -}; +} public enum SID : uint { PhysicalVulnerabilityUp = 126, // Boss->player, extra=0x1/0x2/0x3/0x4/0x5/0x6/0x7 Fetters = 292, // none->player, extra=0x0 -}; +} public enum TetherID : uint { Gaol = 7, // player->player -}; +} diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/Ex4IfritEnums.cs b/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/Ex4IfritEnums.cs index 654c132c4a..ddf8389c83 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/Ex4IfritEnums.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/Ex4IfritEnums.cs @@ -6,7 +6,7 @@ public enum OID : uint Helper = 0x908, // R0.500, x20 InfernalNailSmall = 0xD4, // R1.000, spawn during fight InfernalNailLarge = 0x91B, // R2.000, spawn during fight -}; +} public enum AID : uint { @@ -23,7 +23,7 @@ public enum AID : uint RadiantPlumeAOE = 1359, // Helper->location, 3.0s cast, range 8 circle aoe CrimsonCyclone = 1532, // Boss->self, 3.0s cast, range 44+R width 18 rect aoe InfernalFetters = 1534, // Helper->player, no cast, single-target, visual -}; +} public enum SID : uint { @@ -32,4 +32,4 @@ public enum SID : uint VulnerabilityUp = 202, // InfernalNailSmall->player, extra=0x1/0x2/... Invincibility = 775, // none->Helper/Boss, extra=0x0 InfernalFetters = 377, // none->player, extra=0x1/0x3/0x5 -}; +} diff --git a/BossMod/Modules/RealmReborn/Raid/T01Caduceus/T01ADS.cs b/BossMod/Modules/RealmReborn/Raid/T01Caduceus/T01ADS.cs index 1f4984ed11..d4ab564536 100644 --- a/BossMod/Modules/RealmReborn/Raid/T01Caduceus/T01ADS.cs +++ b/BossMod/Modules/RealmReborn/Raid/T01Caduceus/T01ADS.cs @@ -8,7 +8,7 @@ public enum OID : uint AttackNode = 0x889, // spawn during fight DefenseNode = 0x88A, // spawn during fight GravityField = 0x1E8728, // EventObj type, spawn during fight -}; +} public enum AID : uint { @@ -22,7 +22,7 @@ public enum AID : uint ChainLightningAOE = 1449, // Helper->player, no cast, single-target, ??? NodeRetrieval = 1228, // Boss->PatrolNode/AttackNode/DefenseNode, no cast, single-target, happens if add is not killed in ~27s and gives boss damage up Object199 = 1229, // Boss->self, no cast, enrage -}; +} class HighVoltage : Components.CastHint { diff --git a/BossMod/Modules/RealmReborn/Raid/T01Caduceus/T01Caduceus.cs b/BossMod/Modules/RealmReborn/Raid/T01Caduceus/T01Caduceus.cs index de7ae103fb..f3f351b933 100644 --- a/BossMod/Modules/RealmReborn/Raid/T01Caduceus/T01Caduceus.cs +++ b/BossMod/Modules/RealmReborn/Raid/T01Caduceus/T01Caduceus.cs @@ -8,7 +8,7 @@ public enum OID : uint Platform = 0x1E8729, // x13 Regorge = 0x1E8B20, // EventObj type, spawn during fight Syrup = 0x1E88F1, // EventObj type, spawn during fight -}; +} public enum AID : uint { @@ -23,12 +23,12 @@ public enum AID : uint Syrup = 1214, // DarkMatterSlime->location, 0.5s cast, range 4 circle aoe that leaves voidzone Rupture = 1213, // DarkMatterSlime->self, no cast, range 16+R circle aoe suicide (damage depends on cur hp?) Devour = 1454, // Boss->DarkMatterSlime, no cast, single-target visual -}; +} public enum SID : uint { SteelScales = 349, // Boss->Boss, extra=1-8 (num stacks) -}; +} class HoodSwing : Components.Cleave { diff --git a/BossMod/Modules/RealmReborn/Raid/T02MultiADS/T02MultiADS.cs b/BossMod/Modules/RealmReborn/Raid/T02MultiADS/T02MultiADS.cs index 085373dc6a..43a50361e0 100644 --- a/BossMod/Modules/RealmReborn/Raid/T02MultiADS/T02MultiADS.cs +++ b/BossMod/Modules/RealmReborn/Raid/T02MultiADS/T02MultiADS.cs @@ -18,7 +18,7 @@ public enum OID : uint ADSHelper = 0x8E2, // R0.500, x10 ADSVacuumWaveHelper = 0x8E3, // R0.500, x1 GravityField = 0x1E8728, // EventObj type, spawns during fight -}; +} public enum AID : uint { @@ -44,14 +44,14 @@ public enum AID : uint NodeRetrieval = 1228, // ADS->QuarantineNode/AttackNode/SanitaryNode/DefenseNode/DisposalNode, no cast, single-target, visual Object199 = 1229, // ADS->self, no cast, enrage -}; +} public enum SID : uint { VulnerabilityUp = 202, // ADS/QuarantineNode/AttackNode/SanitaryNode/MonitoringNode/DefenseNode/DisposalNode->player, extra=0x1/0x2/0x3/0x4/0x5/0x6/0x7/0x8 AllaganRot = 333, // QuarantineNode/ADS->player, extra=0x0 AllaganImmunity = 334, // none->player, extra=0x0 -}; +} class CleaveCommon : Components.Cleave { diff --git a/BossMod/Modules/RealmReborn/Raid/T04Gauntlet/T04Gauntlet.cs b/BossMod/Modules/RealmReborn/Raid/T04Gauntlet/T04Gauntlet.cs index 31bbf164c4..f449a80264 100644 --- a/BossMod/Modules/RealmReborn/Raid/T04Gauntlet/T04Gauntlet.cs +++ b/BossMod/Modules/RealmReborn/Raid/T04Gauntlet/T04Gauntlet.cs @@ -11,7 +11,7 @@ public enum OID : uint DriveCylinder = 0x1B2, // R0.500, x1 TerminalEnd = 0x1E86FA, TerminalStart = 0x1E86F9, -}; +} public enum AID : uint { @@ -25,7 +25,7 @@ public enum AID : uint GravityThrust = 1236, // SpinnerRook->player, 1.5s cast, single-target damage (avoidable by moving to the back) Pox = 1237, // SpinnerRook->player, 3.0s cast, single-target debuff (avoidable by moving to the back) EmergencyOverride = 1258, // DriveCylinder->self, no cast, soft enrage raidwide -}; +} class Rotoswipe : Components.Cleave { diff --git a/BossMod/Modules/RealmReborn/Raid/T05Twintania/T05Twintania.cs b/BossMod/Modules/RealmReborn/Raid/T05Twintania/T05Twintania.cs index 7087d25daf..1c5cbf0170 100644 --- a/BossMod/Modules/RealmReborn/Raid/T05Twintania/T05Twintania.cs +++ b/BossMod/Modules/RealmReborn/Raid/T05Twintania/T05Twintania.cs @@ -15,7 +15,7 @@ public enum OID : uint HelperMarker = 0x8EE, // R0.500, x2 LiquidHell = 0x1E88FE, // R0.500, EventObj type, spawn during fight Twister = 0x1E8910, // R0.500, EventObj type, spawn during fight -}; +} public enum AID : uint { @@ -49,13 +49,13 @@ public enum AID : uint Hatch = 1256, // Oviform->self, no cast, ??? LiquidHellMarker = 1457, // Boss->player, no cast, single-target, visual icon for liquid hell LiquidHellBoss = 670, // Boss->location, no cast, range 6 circle voidzone -}; +} public enum SID : uint { Fetters = 292, // none->player, extra=0x0 Disseminate = 348, // Hygieia->Asclepius/Hygieia/player, extra=0x1/0x2/0x3/0x4 -}; +} // note: this is one of the very early fights that is not represented well by a state machine - it has multiple timers running, can delay casts randomly, can have different overlaps depending on raid dps, etc. // the only thing that is well timed is P3 (divebombs phase) diff --git a/BossMod/Modules/RealmReborn/Trial/T01IfritN/T01IfritN.cs b/BossMod/Modules/RealmReborn/Trial/T01IfritN/T01IfritN.cs index 201c99fd1a..afe106c7a6 100644 --- a/BossMod/Modules/RealmReborn/Trial/T01IfritN/T01IfritN.cs +++ b/BossMod/Modules/RealmReborn/Trial/T01IfritN/T01IfritN.cs @@ -5,7 +5,7 @@ public enum OID : uint Boss = 0xCF, // x1 InfernalNail = 0xD0, // spawn during fight Helper = 0x191, // x19 -}; +} public enum AID : uint { @@ -17,7 +17,7 @@ public enum AID : uint Hellfire = 458, // Boss->self, 2.0s cast, infernal nail 'enrage' RadiantPlume = 456, // Boss->self, 2.2s cast, visual RadiantPlumeAOE = 734, // Helper->location, 3.0s cast, range 8 aoe -}; +} class Hints : BossComponent { diff --git a/BossMod/Modules/RealmReborn/Trial/T02TitanN/T02TitanN.cs b/BossMod/Modules/RealmReborn/Trial/T02TitanN/T02TitanN.cs index 7d93d2c874..913d032b8c 100644 --- a/BossMod/Modules/RealmReborn/Trial/T02TitanN/T02TitanN.cs +++ b/BossMod/Modules/RealmReborn/Trial/T02TitanN/T02TitanN.cs @@ -6,7 +6,7 @@ public enum OID : uint Helper = 0x1B2, // x4 TitansHeart = 0x5E3, // Part type, spawn during fight GraniteGaol = 0x5A4, // spawn during fight -}; +} public enum AID : uint { @@ -20,7 +20,7 @@ public enum AID : uint EarthenFury = 652, // Boss->self, no cast, wipe if heart not killed, otherwise just a raidwide WeightOfTheLand = 644, // Boss->self, 3.0s cast, visual WeightOfTheLandAOE = 973, // Helper->location, 3.5s cast, range 6 puddle -}; +} class Hints : BossComponent { diff --git a/BossMod/Modules/RealmReborn/Trial/T03GarudaN/T03GarudaN.cs b/BossMod/Modules/RealmReborn/Trial/T03GarudaN/T03GarudaN.cs index a06d67bfa1..6417e891b1 100644 --- a/BossMod/Modules/RealmReborn/Trial/T03GarudaN/T03GarudaN.cs +++ b/BossMod/Modules/RealmReborn/Trial/T03GarudaN/T03GarudaN.cs @@ -7,7 +7,7 @@ public enum OID : uint EyeOfTheStormHelper = 0x622, // x1 RazorPlumeP1 = 0xEE, // spawn during fight RazorPlumeP2 = 0x2B0, // spawn during fight -}; +} public enum AID : uint { @@ -22,7 +22,7 @@ public enum AID : uint MistralSongP2 = 660, // Boss->self, 4.0s cast, range 30+1.7 ?-degree cone aoe MistralShriek = 661, // Boss->self, 4.0s cast, range 23+1.7 circle aoe Featherlance = 665, // RazorPlumeP1/RazorPlumeP2->self, no cast, range 8 circle, suicide attack if not killed in ~25s -}; +} // disallow clipping monoliths class Friction : BossComponent diff --git a/BossMod/Modules/RealmReborn/Trial/T04PortaDecumana/T04PortaDecumana1.cs b/BossMod/Modules/RealmReborn/Trial/T04PortaDecumana/T04PortaDecumana1.cs index e845bba436..04dd32d073 100644 --- a/BossMod/Modules/RealmReborn/Trial/T04PortaDecumana/T04PortaDecumana1.cs +++ b/BossMod/Modules/RealmReborn/Trial/T04PortaDecumana/T04PortaDecumana1.cs @@ -8,7 +8,7 @@ public enum OID : uint UltimaIfrit = 0x38FF, // x1 GraniteGaol = 0x38FE, // spawn during fight Helper = 0x233C, // x15 -}; +} public enum AID : uint { @@ -42,13 +42,13 @@ public enum AID : uint TransitionFinish1 = 28994, // Boss->self, no cast, single-target, visual (lose buff) TransitionFinish2 = 28993, // Boss->self, no cast, single-target, visual (lose buff) TransitionFinish3 = 28995, // Boss->self, no cast, single-target, visual (lose buff) -}; +} public enum SID : uint { Invincibility = 325, // none->Boss, extra=0x0 VortexBarrier = 3012, // Boss->Boss, extra=0x0 -}; +} class EarthenFury : Components.RaidwideCast { diff --git a/BossMod/Modules/RealmReborn/Trial/T04PortaDecumana/T04PortaDecumana2.cs b/BossMod/Modules/RealmReborn/Trial/T04PortaDecumana/T04PortaDecumana2.cs index 421b092a09..b44ad61def 100644 --- a/BossMod/Modules/RealmReborn/Trial/T04PortaDecumana/T04PortaDecumana2.cs +++ b/BossMod/Modules/RealmReborn/Trial/T04PortaDecumana/T04PortaDecumana2.cs @@ -6,7 +6,7 @@ public enum OID : uint Helper = 0x233C, // x10 Aetheroplasm = 0x3902, // spawn during fight MagitekBit = 0x3901, // spawn during fight -}; +} public enum AID : uint { @@ -39,7 +39,7 @@ public enum AID : uint LimitBreakRefill = 28542, // Helper->self, no cast, range 40 circle - probably limit break refill Ultima = 29024, // Boss->self, 71.0s cast, enrage -}; +} class TankPurge : Components.RaidwideCast { diff --git a/BossMod/Modules/RealmReborn/Trial/T05IfritH/T05IfritH.cs b/BossMod/Modules/RealmReborn/Trial/T05IfritH/T05IfritH.cs index 381edc0f72..55110d9444 100644 --- a/BossMod/Modules/RealmReborn/Trial/T05IfritH/T05IfritH.cs +++ b/BossMod/Modules/RealmReborn/Trial/T05IfritH/T05IfritH.cs @@ -5,7 +5,7 @@ public enum OID : uint Boss = 0xD1, // x4 InfernalNail = 0xD2, // spawn during fight Helper = 0x1B2, // x20 -}; +} public enum AID : uint { @@ -19,7 +19,7 @@ public enum AID : uint RadiantPlume = 1356, // Boss->self, 2.2s cast, single-target, visual RadiantPlumeAOE = 1359, // Helper->location, 3.0s cast, range 8 circle aoe Hellfire = 1357, // Boss->self, 2.0s cast, infernal nail 'enrage' (raidwide if killed) -}; +} class Hints : BossComponent { diff --git a/BossMod/Modules/RealmReborn/Trial/T06GarudaH/T06GarudaH.cs b/BossMod/Modules/RealmReborn/Trial/T06GarudaH/T06GarudaH.cs index 5fa5f0eb2e..5d4b4f46ac 100644 --- a/BossMod/Modules/RealmReborn/Trial/T06GarudaH/T06GarudaH.cs +++ b/BossMod/Modules/RealmReborn/Trial/T06GarudaH/T06GarudaH.cs @@ -14,7 +14,7 @@ public enum OID : uint Monolith2 = 0x1E8707, // x1, EventObj type Monolith3 = 0x1E8708, // x1, EventObj type Monolith4 = 0x1E8709, // x1, EventObj type -}; +} public enum AID : uint { @@ -30,13 +30,13 @@ public enum AID : uint EyeOfTheStorm = 1387, // EyeOfTheStorm->self, 3.0s cast, range 12-25 donut Featherlance = 1388, // RazorPlume->self, no cast, range 8 circle, suicide attack if not killed in ~25s ThermalTumult = 1389, // SatinPlume->self, no cast, range 6 circle, suicide attack (applies sleep) if not killed in ~25s -}; +} public enum TetherID : uint { Rehabilitation = 4, // Chirada/Suparna->Boss, green (heal) DamageUp = 11, // Chirada/Suparna->Boss, red (damage up) -}; +} // disallow clipping monoliths class Friction : BossComponent diff --git a/BossMod/Modules/RealmReborn/Trial/T07TitanH/T07TitanH.cs b/BossMod/Modules/RealmReborn/Trial/T07TitanH/T07TitanH.cs index b1d6eb9319..631341896a 100644 --- a/BossMod/Modules/RealmReborn/Trial/T07TitanH/T07TitanH.cs +++ b/BossMod/Modules/RealmReborn/Trial/T07TitanH/T07TitanH.cs @@ -7,7 +7,7 @@ public enum OID : uint GraniteGaol = 0x5E1, // spawn during fight BombBoulder = 0x5A3, // spawn during fight TitansHeart = 0x5E4, // Part type, spawn during fight -}; +} public enum AID : uint { @@ -26,7 +26,7 @@ public enum AID : uint EarthenFury = 1366, // Boss->self, no cast, wipe if heart not killed, otherwise just a raidwide MountainBuster = 643, // Boss->self, no cast, range 16+R ?-degree cone cleave -}; +} class Hints : BossComponent { diff --git a/BossMod/Modules/RealmReborn/Trial/T08ThornmarchH/T08ThornmarchH.cs b/BossMod/Modules/RealmReborn/Trial/T08ThornmarchH/T08ThornmarchH.cs index a875442921..4790c9cec1 100644 --- a/BossMod/Modules/RealmReborn/Trial/T08ThornmarchH/T08ThornmarchH.cs +++ b/BossMod/Modules/RealmReborn/Trial/T08ThornmarchH/T08ThornmarchH.cs @@ -12,7 +12,7 @@ public enum OID : uint GoodKingMoggleMogXII = 0x3923, // R3.000, spawn during fight (main boss) Helper = 0x233C, // R0.500, x12 PomBog = 0x1E8F67, // R0.500, EventObj type, spawn during fight -}; +} public enum AID : uint { @@ -58,7 +58,7 @@ public enum AID : uint PomStoneMid = 29202, // Helper->self, 5.0s cast, range 10-20 donut PomStoneOut = 29619, // Helper->self, 5.0s cast, range 20-30 donut MogCreation = 29208, // GoodKingMoggleMogXII->self, 3.0s cast, range 50 width 10 rect aoe -}; +} class SpinningMogshield : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/RealmReborn/Trial/T09WhorleaterH/T09WhorleaterHEnums.cs b/BossMod/Modules/RealmReborn/Trial/T09WhorleaterH/T09WhorleaterHEnums.cs index 726d0ccf65..545c8bcbe5 100644 --- a/BossMod/Modules/RealmReborn/Trial/T09WhorleaterH/T09WhorleaterHEnums.cs +++ b/BossMod/Modules/RealmReborn/Trial/T09WhorleaterH/T09WhorleaterHEnums.cs @@ -14,7 +14,7 @@ public enum OID : uint Leviathan_Unk2 = 0xACD, // R0.500, x4 ElementalConverter = 0xB84, // R0.500, x1 SpinningDiveHelper = 0xA87, // R4.500, 523 type, spawn during fight -}; +} public enum AID : uint { @@ -44,11 +44,11 @@ public enum AID : uint TidalWave = 1872, // Boss->self, no cast, range 60+R circle Dreadstorm = 1865, // Wavetooth Sahagin --> location, 3.0s cast, range 50, 6 circle Ruin = 2214, // Sahagin-->player --> 1.0s cast time -}; +} public enum SID : uint { VeilOfTheWhorl = 478, // Boss->A88/Boss/A87, extra=0x64 MantleOfTheWhorl = 477, // Tail->Tail, extra=0x64 Invincibility = 775, // none->A88/Boss/Tail/A87, extra=0x0 -}; +} diff --git a/BossMod/Modules/Shadowbringers/Dungeon/D01Holminster/D011ForgivenDissonance.cs b/BossMod/Modules/Shadowbringers/Dungeon/D01Holminster/D011ForgivenDissonance.cs index 6a7a482755..ad323ff239 100644 --- a/BossMod/Modules/Shadowbringers/Dungeon/D01Holminster/D011ForgivenDissonance.cs +++ b/BossMod/Modules/Shadowbringers/Dungeon/D01Holminster/D011ForgivenDissonance.cs @@ -6,7 +6,7 @@ public enum OID : uint Orbs = 0x2896, // R1.100, spawn during fight Helper = 0x233C, // x3 Helper2 = 0x2A4B, // R3.450, spawn during fight -}; +} public enum AID : uint { @@ -19,7 +19,7 @@ public enum AID : uint LightShot = 15819, // Orbs->self, 3.0s cast, range 40 width 4 rect WoodenHorse = 15815, // Boss->self, 5.0s cast, range 40 90-degree cone Pillory = 15812, // Boss->player, 5.0s cast, single-target -}; +} class Thumbscrew : Components.ChargeAOEs { diff --git a/BossMod/Modules/Shadowbringers/Dungeon/D01Holminster/D012TesleentheForgiven.cs b/BossMod/Modules/Shadowbringers/Dungeon/D01Holminster/D012TesleentheForgiven.cs index 53ce6c78e0..d29137d0f9 100644 --- a/BossMod/Modules/Shadowbringers/Dungeon/D01Holminster/D012TesleentheForgiven.cs +++ b/BossMod/Modules/Shadowbringers/Dungeon/D01Holminster/D012TesleentheForgiven.cs @@ -8,7 +8,7 @@ public enum OID : uint Helper2 = 0x2A4B, Helper3 = 0x2A4C, // R1.320, x5 Helper4 = 0x2A4D, // R2.000, x2 -}; +} public enum AID : uint { @@ -21,7 +21,7 @@ public enum AID : uint ExorciseB = 15827, // 278B->location, no cast, range 6 circle HolyWaterVoidzones = 15825, // 278B->self, no cast, single-target HolyWater = 15828, // Helper->location, 7.0s cast, range 6 circle -}; +} public enum IconID : uint { @@ -31,7 +31,7 @@ public enum IconID : uint Icon3 = 81, // player Icon4 = 82, // player Stackmarker = 62, // player -}; +} class TheTickler : Components.SingleTargetDelayableCast { diff --git a/BossMod/Modules/Shadowbringers/Dungeon/D01Holminster/D013Philia.cs b/BossMod/Modules/Shadowbringers/Dungeon/D01Holminster/D013Philia.cs index 8cdaa7307b..6dca02818c 100644 --- a/BossMod/Modules/Shadowbringers/Dungeon/D01Holminster/D013Philia.cs +++ b/BossMod/Modules/Shadowbringers/Dungeon/D01Holminster/D013Philia.cs @@ -6,7 +6,7 @@ public enum OID : uint IronChain = 0x2895, // R1.000, spawn during fight SludgeVoidzone = 0x1EABFA, Helper = 0x233C, // x3 -}; +} public enum AID : uint { @@ -35,7 +35,7 @@ public enum AID : uint FierceBeating6 = 15838, // Helper->self, no cast, range 4 circle CatONineTails = 15840, // 278C->self, no cast, single-target CatONineTails2 = 15841, // Helper->self, 2,0s cast, range 25 120-degree cone -}; +} public enum IconID : uint { @@ -44,14 +44,14 @@ public enum IconID : uint ChainTarget = 92, // player Spread = 139, // player RotateCW = 167, // Boss -}; +} public enum SID : uint { Fetters = 1849, // none->player, extra=0xEC4 DownForTheCount = 783, // none->player, extra=0xEC7 Sludge = 287, // none->player, extra=0x0 -}; +} class SludgeVoidzone : Components.PersistentVoidzone { diff --git a/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D030RonkanDreamer.cs b/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D030RonkanDreamer.cs index 1c5dc560b0..23d7640790 100644 --- a/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D030RonkanDreamer.cs +++ b/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D030RonkanDreamer.cs @@ -21,12 +21,12 @@ public enum AID : uint AutoAttack = 872, // 28DD/28DC->player, no cast, single-target AutoAttack2 = 17949, // 28E3->player, no cast, single-target BurningBeam = 15923, // 28E3->self, 3,0s cast, range 15 width 4 rect -}; +} public enum TetherID : uint { StatueActivate = 37, // 28E8->Boss -}; +} class RonkanFire : Components.SingleTargetCast { diff --git a/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D031Lozatl.cs b/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D031Lozatl.cs index 969d1fc082..2aa515e280 100644 --- a/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D031Lozatl.cs +++ b/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D031Lozatl.cs @@ -18,7 +18,7 @@ public enum AID : uint HeatUp2 = 15501, // 27AF->self, 3,0s cast, single-target LozatlsFuryA = 15504, // 27AF->self, 4,0s cast, range 60 width 20 rect LozatlsFuryB = 15503, // 27AF->self, 4,0s cast, range 60 width 20 rect -}; +} class LozatlsFuryA : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D032Batsquatch.cs b/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D032Batsquatch.cs index f3c0cad456..b6545fb8ae 100644 --- a/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D032Batsquatch.cs +++ b/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D032Batsquatch.cs @@ -17,7 +17,7 @@ public enum AID : uint FallingRock2 = 15509, // 233C->self, 2,0s cast, range 2 circle FallingBoulder = 15511, // 233C->self, 2,0s cast, range 4 circle Towerfall = 15512, // 233C->self, 3,0s cast, range 15 30-degree cone -}; +} class Towerfall : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D033Eros.cs b/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D033Eros.cs index b316f5dea9..457efe6517 100644 --- a/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D033Eros.cs +++ b/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D033Eros.cs @@ -29,7 +29,7 @@ public enum AID : uint ConfessionOfFaithStack = 15525, // Helper->players, 5,8s cast, range 6 circle, stack ConfessionOfFaithCenter = 15522, // Helper->self, 5,5s cast, range 60 40-degree cone ConfessionOfFaithSpread = 15523, // Helper->player, 5,8s cast, range 5 circle, spread -}; +} public enum IconID : uint { @@ -37,13 +37,13 @@ public enum IconID : uint stack = 62, // player poisonbait = 171, // player spread = 96, // player -}; +} public enum TetherID : uint { HoundOutOfHeavenTetherGood = 1, // Boss->player HoundOutOfHeavenTetherStretch = 57, // Boss->player -}; +} class HoundOutOfHeavenGood : Components.BaitAwayTethers //TODO: consider generalizing stretched tethers? { diff --git a/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D050ForgivenPrejudice.cs b/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D050ForgivenPrejudice.cs index 929d5238b7..96ca22cdee 100644 --- a/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D050ForgivenPrejudice.cs +++ b/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D050ForgivenPrejudice.cs @@ -18,7 +18,7 @@ public enum AID : uint SanctifiedAero = 16813, // 28F1->self, 5,0s cast, range 40 width 8 rect PunitiveLight = 16815, // Boss->self, 5,0s cast, range 20 circle Sanctification = 16814, // Boss->self, 5,0s cast, range 12 90-degree cone -}; +} class SanctifiedAero : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D051ForgivenCruelty.cs b/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D051ForgivenCruelty.cs index ef9206cd89..43c1fadb47 100644 --- a/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D051ForgivenCruelty.cs +++ b/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D051ForgivenCruelty.cs @@ -21,7 +21,7 @@ public enum AID : uint CycloneWing = 15612, // 27CA->self, 3,0s cast, single-target CycloneWing2 = 15613, // 233C->self, 4,0s cast, range 40 circle HurricaneWing = 15619, // 233C->self, 5,0s cast, range 10 circle -}; +} class Rake : Components.SingleTargetDelayableCast { diff --git a/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D052ForgivenApathy.cs b/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D052ForgivenApathy.cs index eedcba8e4e..1078651e15 100644 --- a/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D052ForgivenApathy.cs +++ b/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D052ForgivenApathy.cs @@ -21,7 +21,7 @@ public enum AID : uint EarthShaker2 = 16245, // 233C->self, 5,0s cast, range 60 60-degree cone Sanctification = 16814, // 28F2->self, 5,0s cast, range 12 90-degree cone PunitiveLight = 16815, // 28F2->self, 5,0s cast, range 20 circle -}; +} class PunitiveLight : Components.CastInterruptHint { //Note: this attack is a r20 circle, not drawing it because it is too big and the damage not all that high even if interrupt/stun fails diff --git a/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D053ForgivenWhimsy.cs b/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D053ForgivenWhimsy.cs index 11cc78214a..bee67be24f 100644 --- a/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D053ForgivenWhimsy.cs +++ b/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D053ForgivenWhimsy.cs @@ -27,7 +27,7 @@ public enum AID : uint FoundWanting = 15632, // 233C->self, no cast, range 40 circle, tower fail RiteOfTheSacrament = 15629, // 27CC->self, no cast, single-target PerfectContrition = 15630, // 27CD->self, 6,0s cast, range 5-15 donut -}; +} class Catechism : Components.SingleTargetCastDelay { diff --git a/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D054ForgivenRevelry.cs b/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D054ForgivenRevelry.cs index b7aad6cb63..074a9c9152 100644 --- a/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D054ForgivenRevelry.cs +++ b/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D054ForgivenRevelry.cs @@ -16,7 +16,7 @@ public enum AID : uint LightShot = 16251, // Brightsphere->self, 4,0s cast, range 40 width 4 rect RightPalm = 16247, // Boss->self, no cast, single-target RightPalm2 = 16248, // 233C->self, 4,5s cast, range 30 width 15 rect -}; +} class PalmAttacks : Components.GenericAOEs //Palm Attacks have a wrong origin, so i made a custom solution { diff --git a/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D055ForgivenObscenity.cs b/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D055ForgivenObscenity.cs index e5b5125fb0..9d0e09b34c 100644 --- a/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D055ForgivenObscenity.cs +++ b/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D055ForgivenObscenity.cs @@ -34,7 +34,7 @@ public enum AID : uint SacramentSforzando = 15634, // Boss->self, 4,0s cast, single-target SacramentSforzando2 = 15635, // 233C->player, no cast, single-target SanctifiedStaccato = 15654, // 233C->self, no cast, range 3 circle, sort of a voidzone around the light orbs, only triggers if you get too close -}; +} class Orbs : Components.GenericAOEs { diff --git a/BossMod/Modules/Shadowbringers/FATE/Archaeotania.cs b/BossMod/Modules/Shadowbringers/FATE/Archaeotania.cs index dc7e22e807..539c39ae7e 100644 --- a/BossMod/Modules/Shadowbringers/FATE/Archaeotania.cs +++ b/BossMod/Modules/Shadowbringers/FATE/Archaeotania.cs @@ -11,7 +11,7 @@ public enum OID : uint IceBoulder = 0x2A8D, // R2.200, spawn during fight AncientAevis = 0x2A8E, // R4.200, spawn during fight Aether = 0x2A8F, // R2.000, spawn during fight -}; +} public enum AID : uint { @@ -41,12 +41,12 @@ public enum AID : uint AutoAttackAdd = 870, // AncientAevis->player, no cast, single-target HeadlongRush = 17042, // AncientAevis->self, 3.0s cast, range 9+R width 10 rect Gigaflare = 16451, // Boss->self, 120.0s cast, range 80 circle -}; +} public enum IconID : uint { Megaflare = 62, // player -}; +} class BlizzardBreath : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Shadowbringers/FATE/Formidable.cs b/BossMod/Modules/Shadowbringers/FATE/Formidable.cs index 2ca9980066..a227807f02 100644 --- a/BossMod/Modules/Shadowbringers/FATE/Formidable.cs +++ b/BossMod/Modules/Shadowbringers/FATE/Formidable.cs @@ -16,7 +16,7 @@ public enum OID : uint //_Gen_Actor1eadec = 0x1EADEC, // R0.500, EventObj type, spawn during fight //_Gen_Actor1eadee = 0x1EADEE, // R0.500, EventObj type, spawn during fight //_Gen_Actor1eaded = 0x1EADED, // R0.500, EventObj type, spawn during fight -}; +} public enum AID : uint { @@ -38,17 +38,17 @@ public enum AID : uint DwarvenDischargeCircle = 17405, // DwarvenChargeCircle->self, 3.0s cast, range 8 circle SteamDome = 17394, // Boss->self, 3.0s cast, range 30 circle knockback 15 DynamicSensoryJammer = 17407, // Boss->self, 3.0s cast, range 70 circle -}; +} public enum IconID : uint { DrillShot = 62, // player -}; +} public enum SID : uint { AlteredStates = 1387, // ExpandHelper-->GiantGrenade ExtremeCaution = 1269, // Boss->players -}; +} class Spincrush : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE11ShadowOfDeathHand.cs b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE11ShadowOfDeathHand.cs index b7fe0f14ed..41181a93d9 100644 --- a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE11ShadowOfDeathHand.cs +++ b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE11ShadowOfDeathHand.cs @@ -9,7 +9,7 @@ public enum OID : uint Deathwall = 0x2EE8, // R0.500, x1 Helper = 0x233C, // R0.500, x10 DeathwallEvent = 0x1EB02E, // R0.500, EventObj type, spawn during fight -}; +} public enum AID : uint { @@ -46,7 +46,7 @@ public enum AID : uint HardBeakCrow = 20190, // TamedCarrionCrow->player, 4.0s cast, single-target, micro tankbuster PiercingBarrageCrow = 20191, // TamedCarrionCrow->self, 3.0s cast, range 40 width 8 rect -}; +} class BestialLoyalty : Components.CastHint { diff --git a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE12BayingOfHounds.cs b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE12BayingOfHounds.cs index 9342c2acbb..2eea1a5990 100644 --- a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE12BayingOfHounds.cs +++ b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE12BayingOfHounds.cs @@ -5,7 +5,7 @@ public enum OID : uint Boss = 0x2E66, // R7.020, x1 Helper = 0x233C, // R0.500, x14 Hellsfire = 0x2E67, // R1.000-2.500, spawn during fight -}; +} public enum AID : uint { @@ -30,7 +30,7 @@ public enum AID : uint VoidQuakeAOE1 = 20549, // Helper->self, 3.0s cast, range 10 circle aoe VoidQuakeAOE2 = 20550, // Helper->self, 3.0s cast, range 10-20 donut aoe VoidQuakeAOE3 = 20551, // Helper->self, 3.0s cast, range 20-30 donut aoe -}; +} class Hellclaw : Components.SingleTargetCast { diff --git a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE13KillItWithFire.cs b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE13KillItWithFire.cs index 1563246ef8..4687065e20 100644 --- a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE13KillItWithFire.cs +++ b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE13KillItWithFire.cs @@ -6,7 +6,7 @@ public enum OID : uint Helper = 0x233C, // R0.500, x32 RottenMandragora = 0x2E30, // R1.050, spawn during fight Pheromones = 0x2E31, // R1.500, spawn during fight -}; +} public enum AID : uint { @@ -29,13 +29,13 @@ public enum AID : uint PlayfulBreeze = 20525, // Boss->self, 4.0s cast, single-target, visual (raidwide) PlayfulBreezeAOE = 20526, // Helper->self, 4.0s cast, range 60 circle raidwide Budbutt = 20527, // Boss->player, 4.0s cast, single-target, tankbuster -}; +} public enum SID : uint { TenderAnaphylaxis = 2301, // Helper->player, extra=0x0 JealousAnaphylaxis = 2302, // Helper->player, extra=0x0 -}; +} class Pheromones : Components.PersistentVoidzone { diff --git a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE14VigilForLost.cs b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE14VigilForLost.cs index 8ad612a77c..f885b0ecde 100644 --- a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE14VigilForLost.cs +++ b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE14VigilForLost.cs @@ -5,7 +5,7 @@ public enum OID : uint Boss = 0x2DBD, // R8.000, x1 Helper = 0x233C, // R0.500, x11 MagitekBit = 0x2F58, // R0.660, spawn during fight -}; +} public enum AID : uint { @@ -22,7 +22,7 @@ public enum AID : uint Explosion = 21266, // Helper->self, 7.0s cast, range 6 circle tower MassiveExplosion = 21267, // Helper->self, no cast, range 60 circle, failed tower MagitekRay = 21268, // MagitekBit->self, 2.5s cast, range 50 width 4 rect -}; +} class LightLeap : Components.LocationTargetedAOEs { diff --git a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE21FinalFurlong.cs b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE21FinalFurlong.cs index 5813e312ed..5c6a315e53 100644 --- a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE21FinalFurlong.cs +++ b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE21FinalFurlong.cs @@ -7,7 +7,7 @@ public enum OID : uint Monoceros = 0x2DB9, // R1.800, x1 LlofiiTheForthright = 0x2DBA, // R0.500, x1 GraspingRancor = 0x2DBC, // R1.600, spawn during fight -}; +} public enum AID : uint { @@ -30,14 +30,14 @@ public enum AID : uint Teleport = 20135, // Monoceros->location, no cast, single-target, teleport Ruin = 20142, // LlofiiTheForthright->Boss, 2.5s cast, single-target, autoattack Scupper = 21334, // LlofiiTheForthright->Boss, 2.0s cast, single-target, damage down on boss -}; +} public enum TetherID : uint { Movable = 1, // GraspingRancor->player Frozen = 2, // GraspingRancor->player Unfreezable = 17, // GraspingRancor->player (appears if hand wasn't hit by aoe) -}; +} class GraspingRancor : Components.LocationTargetedAOEs { diff --git a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE31MetalFoxChaos.cs b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE31MetalFoxChaos.cs index 47a5906ef7..aa0ef45cf9 100644 --- a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE31MetalFoxChaos.cs +++ b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE31MetalFoxChaos.cs @@ -5,7 +5,7 @@ public enum OID : uint Boss = 0x2DB5, // R=8.0 Helper = 0x233C, // R=0.500 MagitekBit = 0x2DB6, // R=1.2 -}; +} public enum AID : uint { @@ -17,7 +17,7 @@ public enum AID : uint LaserShower2 = 20140, // Helper->location, 5,0s cast, range 10 circle Rush = 20139, // Boss->player, 3,0s cast, width 14 rect charge SatelliteLaser = 20137, // Boss->self, 10,0s cast, range 100 circle -}; +} class MagitekBitLasers : Components.GenericAOEs { diff --git a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE41WithDiremiteAndMain.cs b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE41WithDiremiteAndMain.cs index 697a4c200a..d2910d3199 100644 --- a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE41WithDiremiteAndMain.cs +++ b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE41WithDiremiteAndMain.cs @@ -7,7 +7,7 @@ public enum OID : uint DimCrystal = 0x31CD, // R1.600, spawn during fight CorruptedCrystal = 0x31CE, // R1.600, spawn during fight SandSphere = 0x31CF, // R4.000, spawn during fight -}; +} public enum AID : uint { @@ -34,7 +34,7 @@ public enum AID : uint Hailfire = 24088, // Boss->self, 8.0s cast, single-target, visual HailfireAOE = 24089, // Boss->self, no cast, range 40 width 4 rect aoe Teleport = 24090, // Boss->location, no cast, single-target -}; +} public enum IconID : uint { @@ -43,7 +43,7 @@ public enum IconID : uint Hailfire2 = 80, // player Hailfire3 = 81, // player Hailfire4 = 82, // player -}; +} class CrystallineFracture : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE42FromBeyondTheGrave.cs b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE42FromBeyondTheGrave.cs index e257a39659..23a7fa73ce 100644 --- a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE42FromBeyondTheGrave.cs +++ b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE42FromBeyondTheGrave.cs @@ -13,7 +13,7 @@ public enum OID : uint Monoceros = 0x3237, // R1.800, x1 PurifyingLight = 0x1EB173, // R0.500, EventObj type, spawn during fight LivingCorpseSpawn = 0x1EB07A, // R0.500, EventObj type, spawn during fight -}; +} public enum AID : uint { @@ -52,7 +52,7 @@ public enum AID : uint Ruin = 24119, // LlofiiTheForthright->Boss, 2.5s cast, single-target, autoattack Cleanse = 24969, // LlofiiTheForthright->location, 5.0s cast, range 6 circle, damages boss SoothingGlimmer = 24970, // LlofiiTheForthright->self, 2.5s cast, single-target, heal -}; +} public enum SID : uint { @@ -61,7 +61,7 @@ public enum SID : uint LeftFace = 2163, // Boss->player, extra=0x0 RightFace = 2164, // Boss->player, extra=0x0 ForcedMarch = 1257, // Boss->player, extra=0x2/0x1/0x8/0x4 -}; +} class DevourSoul : Components.SingleTargetCast { diff --git a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE44FamiliarFace.cs b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE44FamiliarFace.cs index 811aa01d39..592518d286 100644 --- a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE44FamiliarFace.cs +++ b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE44FamiliarFace.cs @@ -9,7 +9,7 @@ public enum OID : uint Tower = 0x1EB17E, // R0.500, EventObj type, spawn during fight FallingTower = 0x1EB17D, // R0.500, EventObj type, spawn during fight, rotation at spawn determines fall direction?.. Hammer = 0x1EB17F, // R0.500, EventObj type, spawn during fight -}; +} public enum AID : uint { @@ -39,7 +39,7 @@ public enum AID : uint HammerRound = 23824, // Boss->self, 5.0s cast, single-target, visual Hammerfall = 23825, // Helper->self, 8.0s cast, range 37 circle aoe -}; +} class TectonicEruption : Components.LocationTargetedAOEs { diff --git a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE51ThereWouldBeBlood.cs b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE51ThereWouldBeBlood.cs index 3489f5b1d8..cdf90aa8fb 100644 --- a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE51ThereWouldBeBlood.cs +++ b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE51ThereWouldBeBlood.cs @@ -5,7 +5,7 @@ public enum OID : uint Boss = 0x319A, // R6.000, x1 Helper = 0x233C, // R0.500, x17 EmbitteredSoul = 0x319B, // R3.600, spawn during fight -}; +} public enum AID : uint { @@ -29,7 +29,7 @@ public enum AID : uint SummonDarkness = 23571, // Boss->self, 3.0s cast, single-target, visual TempestOfAnguish = 23572, // EmbitteredSoul->self, 6.5s cast, range 55 width 10 rect aoe TragicalGaze = 23573, // EmbitteredSoul->self, 7.5s cast, range 55 circle -}; +} class CloudOfLocusts : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE52TimeToBurn.cs b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE52TimeToBurn.cs index 0442f6d657..bd46c76e27 100644 --- a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE52TimeToBurn.cs +++ b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE52TimeToBurn.cs @@ -7,7 +7,7 @@ public enum OID : uint Clock = 0x1EB17A, // R0.500, x9, EventObj type TimeBomb1 = 0x1EB17B, // R0.500, EventObj type, spawn during fight TimeBomb2 = 0x1EB1D4, // R0.500, EventObj type, spawn during fight -}; +} public enum AID : uint { @@ -24,7 +24,7 @@ public enum AID : uint FireTankbuster = 23961, // Boss->player, 5.0s cast, single-target FireRaidwide = 23962, // Boss->self, 5.0s cast, single-target, visual FireRaidwideAOE = 23963, // Helper->self, no cast, ??? -}; +} // these three main mechanics can overlap in a complex way, so we have a single component to handle them. Potential options: // - eruption only (fast/slow clocks): visual cast -> 9 eobjanims -> pause cast -> start cast -> resolve diff --git a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE53HereComesTheCavalry.cs b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE53HereComesTheCavalry.cs index 8478e7a841..e83fb778fd 100644 --- a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE53HereComesTheCavalry.cs +++ b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE53HereComesTheCavalry.cs @@ -7,7 +7,7 @@ public enum OID : uint ImperialAssaultCraft = 0x2EE8, // R0.500, x22, also helper? Cavalry = 0x31C6, // R4.000, x9, and more spawn during fight FireShot = 0x1EB1D3, // R0.500, EventObj type, spawn during fight -}; +} public enum AID : uint { @@ -37,12 +37,12 @@ public enum AID : uint CallControlledBurn = 23950, // Boss->self, 5.0s cast, single-target, visual (spread) CallControlledBurnAOE = 23951, // ImperialAssaultCraft->players, 5.0s cast, range 6 circle spread MagitekBlaster = 23952, // Boss->players, 5.0s cast, range 8 circle stack -}; +} public enum TetherID : uint { RawSteel = 57, // Boss->player -}; +} class StormSlash : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE54NeverCryWolf.cs b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE54NeverCryWolf.cs index b9003c2415..19532956b9 100644 --- a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE54NeverCryWolf.cs +++ b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE54NeverCryWolf.cs @@ -7,7 +7,7 @@ public enum OID : uint IceSprite = 0x319D, // R0.800, spawn during fight Icicle = 0x319E, // R3.000, spawn during fight Imaginifer = 0x319F, // R0.500, spawn during fight -}; +} public enum AID : uint { @@ -43,7 +43,7 @@ public enum AID : uint TeleportBoss = 23621, // Boss->location, no cast, teleport TeleportImaginifer = 23622, // Imaginifer->location, no cast, ???, teleport ActivateImaginifer = 23623, // Imaginifer->self, no cast, single-target, visual -}; +} class IcePillar : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE62LooksToDieFor.cs b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE62LooksToDieFor.cs index 1ead34cc1a..64ca4b7e52 100644 --- a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE62LooksToDieFor.cs +++ b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE62LooksToDieFor.cs @@ -8,7 +8,7 @@ public enum OID : uint BallOfFire = 0x31CB, // R1.000, spawn during fight //_Gen_Actor1ea1a1 = 0x1EA1A1, // R2.000, x2, EventObj type //_Gen_Actor1eb180 = 0x1EB180, // R0.500, x0, EventObj type, and more spawn during fight -}; +} public enum AID : uint { @@ -36,7 +36,7 @@ public enum AID : uint LevinboltAOE = 23984, // Helper->players, 5.0s cast, range 6 circle spread SerpentsEdge = 23985, // Boss->player, 5.0s cast, single-target, tankbuster Deathwall = 24711, // Helper->self, no cast, range 20-30 donut -}; +} class Thundercall : Components.RaidwideCast { diff --git a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE63WornToShadow.cs b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE63WornToShadow.cs index f16eb7044c..f59c0305a1 100644 --- a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE63WornToShadow.cs +++ b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE63WornToShadow.cs @@ -8,7 +8,7 @@ public enum OID : uint VorticalOrb1 = 0x3239, // R0.500, spawn during fight VorticalOrb2 = 0x323A, // R0.500, spawn during fight VorticalOrb3 = 0x31D2, // R0.500, spawn during fight -}; +} public enum AID : uint { @@ -28,18 +28,18 @@ public enum AID : uint ForeshadowingPulse = 24133, // AlkonostsShadow->self, 5.0s cast, range 8-25 donut ForeshadowingStorm = 24134, // AlkonostsShadow->self, 5.0s cast, range 36 130-degree cone aoe ForeshadowingGust = 24135, // AlkonostsShadow->self, 5.0s cast, range 20 circle aoe -}; +} public enum SID : uint { OrbMovement = 2234, // none->VorticalOrb1/VorticalOrb2/VorticalOrb3, extra=0x1E (fast)/0x49 (slow) Transfiguration = 705, // AlkonostsShadow->AlkonostsShadow, extra=0x1A4 -}; +} public enum TetherID : uint { Foreshadowing = 45, // AlkonostsShadow->Boss -}; +} class Stormcall : Components.GenericAOEs { diff --git a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE64FeelingTheBurn.cs b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE64FeelingTheBurn.cs index 7eac8b0104..49765df563 100644 --- a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE64FeelingTheBurn.cs +++ b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE64FeelingTheBurn.cs @@ -6,7 +6,7 @@ public enum OID : uint Escort1 = 0x31A1, // R2.800, x24 Escort2 = 0x32FD, // R2.800, spawn during fight Helper = 0x233C, // R0.500, x26 -}; +} public enum AID : uint { @@ -28,20 +28,20 @@ public enum AID : uint SuppressiveMagitekRaysAOE = 23617, // Helper->self, 5.5s cast, ???, raidwide Analysis = 23607, // Boss->self, 3.0s cast, single-target, visual PreciseStrike = 23619, // Escort1->self, 5.0s cast, range 60 width 6 rect aoe (should orient correctly to avoid vuln) -}; +} public enum SID : uint { Tracking = 2056, // none->Escort2, extra=0x87 FrontUnseen = 2644, // Boss->player, extra=0x120 BackUnseen = 1709, // Boss->player, extra=0xE8 -}; +} public enum IconID : uint { BallisticImpact = 261, // Helper ChainCannon = 164, // player -}; +} class DiveFormation : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/DRS1Enums.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/DRS1Enums.cs index 5c2fa20371..aec03e8bed 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/DRS1Enums.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/DRS1Enums.cs @@ -6,7 +6,7 @@ public enum OID : uint SeekerAvatar = 0x3136, // R4.000, x7 Helper = 0x233C, // R0.500, x16 AetherialOrb = 0x3137, // R2.000, spawn during fight -}; +} public enum AID : uint { @@ -64,7 +64,7 @@ public enum AID : uint DeadIron = 23244, // SeekerAvatar->self, 4.0s cast, single-target, visual (earthshakers) DeadIronAOE = 23245, // Helper->self, no cast, range 50 30-degree cone earthshaker DeadIronSecond = 23364, // SeekerAvatar->self, no cast, single-target, visual (second earthshakers, without cast) -}; +} public enum SID : uint { @@ -75,17 +75,17 @@ public enum SID : uint //PhantomEdge = 2488, // Boss->Boss, extra=0x0 //BurningChains = 769, // none->player, extra=0x0 //AreaOfInfluenceUp = 1749, // none->Helper, extra=0x10 -}; +} public enum TetherID : uint { BurningChains = 128, // player->player DeadIron = 138, // player->SeekerAvatar -}; +} public enum IconID : uint { BurningChains = 238, // player DeadIron = 237, // player MercifulArc = 243, // player -}; +} diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS2StygimolochWarrior/DRS2Enums.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS2StygimolochWarrior/DRS2Enums.cs index d8d1ed8b4a..08b69d3374 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS2StygimolochWarrior/DRS2Enums.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS2StygimolochWarrior/DRS2Enums.cs @@ -9,7 +9,7 @@ public enum OID : uint TrapToad = 0x1EB0E4, // R0.500, EventObj type, spawn during fight TrapIce = 0x1EB0E5, // R0.500, EventObj type, spawn during fight TrapMini = 0x1EB0E6, // R0.500, EventObj type, spawn during fight -}; +} public enum AID : uint { @@ -53,7 +53,7 @@ public enum AID : uint SunsIre = 22394, // Boss->self, 12.0s cast, single-target, visual (enrage) SunsIreAOE = 22446, // Helper->self, no cast, range 50 circle, enrage SunsIreRepeat = 22395, // Boss->self, no cast, single-target, enrage repeat every 2s -}; +} public enum SID : uint { @@ -67,9 +67,9 @@ public enum SID : uint public enum IconID : uint { FlailingStrike = 4, // player -}; +} public enum TetherID : uint { FlailingStrike = 17, // Boss->player -}; +} diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS2StygimolochWarrior/Entrapment.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS2StygimolochWarrior/Entrapment.cs index e53144cb3c..e72b5a0444 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS2StygimolochWarrior/Entrapment.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS2StygimolochWarrior/Entrapment.cs @@ -21,7 +21,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf // the 'board' is 7x7; cell index is zzzxxx (64 bit), with (0,0) corresponding to NW cell class Entrapment : Components.CastCounter { - public enum TrapType { Normal, Toad, Ice, Mini }; + public enum TrapType { Normal, Toad, Ice, Mini } public struct Pattern { diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS3Dahu/DRS3Enums.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS3Dahu/DRS3Enums.cs index 0b19db4caa..fa61eb1467 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS3Dahu/DRS3Enums.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS3Dahu/DRS3Enums.cs @@ -6,7 +6,7 @@ public enum OID : uint Marchosias = 0x30A9, // R2.500, spawn during fight CrownedMarchosias = 0x30AA, // R2.500, spawn during fight Helper = 0x233C, // R0.500, x20 -}; +} public enum AID : uint { @@ -31,7 +31,7 @@ public enum AID : uint HystericAssault = 22392, // Boss->self, 5.0s cast, single-target, visual (knockback) HystericAssaultAOE = 23363, // Helper->self, no cast, range 50 circle, raidwide knockback 30 Burn = 21603, // Helper->players, no cast, range 45 circle with ? falloff -}; +} public enum IconID : uint { @@ -42,4 +42,4 @@ public enum IconID : uint FirebreatheCW = 167, // Boss FirebreatheCCW = 168, // Boss Burn = 87, // player -}; +} diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS4QueensGuard/DRS4Enums.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS4QueensGuard/DRS4Enums.cs index 82baa0001a..3af2aa320d 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS4QueensGuard/DRS4Enums.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS4QueensGuard/DRS4Enums.cs @@ -18,7 +18,7 @@ public enum OID : uint ImmolatingFlame = 0x30CE, // R1.000-3.000, spawn during fight (soldier/gunner big fireball) AutomaticTurret = 0x30D0, // R4.000, spawn during fight (soldier/gunner untargetable turret) GunTurret = 0x30D1, // R4.000, spawn during fight (soldier/gunner targetable turret) -}; +} public enum AID : uint { @@ -109,7 +109,7 @@ public enum AID : uint EnrageP3Warrior = 22794, // Warrior->self, 70.0s cast EnrageP3Soldier = 22795, // Soldier->self, 70.0s cast EnrageP3Gunner = 22796, // Gunner->self, 70.0s cast -}; +} public enum SID : uint { @@ -133,13 +133,13 @@ public enum SID : uint Pyretic = 960, // Soldier->player, extra=0x0 DirectionalParry = 680, // AetherialWard->AetherialWard, extra=0x3 (front+back)/0xC (left+right) //_Gen_ = 2195, // AetherialWard->AetherialWard, extra=0x101/0x100 -}; +} public enum IconID : uint { Reversal = 255, // player SpriteCheck = 23, // player -}; +} public enum TetherID : uint { @@ -151,4 +151,4 @@ public enum TetherID : uint //_Gen_Tether_101 = 101, // AetherialSphere->Knight //_Gen_Tether_54 = 54, // GunTurret->Gunner SecretsRevealed = 30, // SoldierAvatar->Soldier -}; +} diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS5Phantom/DRS5Enums.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS5Phantom/DRS5Enums.cs index 412b5712bc..28512cce8b 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS5Phantom/DRS5Enums.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS5Phantom/DRS5Enums.cs @@ -12,7 +12,7 @@ public enum OID : uint MiasmaHighRect = 0x1EB0E0, // R0.500, EventObj type, spawn during fight MiasmaHighCircle = 0x1EB0E1, // R0.500, EventObj type, spawn during fight MiasmaHighDonut = 0x1EB0E2, // R0.500, EventObj type, spawn during fight -}; +} public enum AID : uint { @@ -31,4 +31,4 @@ public enum AID : uint Transference = 22445, // Boss->location, no cast, single-target, teleport Summon = 22464, // Boss->self, 3.0s cast, single-target, visual (go untargetable and spawn adds) MaledictionOfRuin = 22465, // Boss->self, 43.0s cast, single-target -}; +} diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS6TrinityAvowed/DRS6Enums.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS6TrinityAvowed/DRS6Enums.cs index 72278d6c3d..104263109f 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS6TrinityAvowed/DRS6Enums.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS6TrinityAvowed/DRS6Enums.cs @@ -13,7 +13,7 @@ public enum OID : uint BlazingOrb = 0x30E3, // R1.500, spawn during fight (gives +1 temperature) RoaringOrb = 0x30E4, // R1.500, spawn during fight (gives +2 temperature) AvowedAvatar = 0x30E5, // R3.400, x11 -}; +} public enum AID : uint { @@ -106,7 +106,7 @@ public enum AID : uint EnrageSecondary = 23355, // Helper->self, 12.6s cast, range 85 circle, enrage hitting second half of raid EnrageRepeat = 22869, // Boss->self, no cast, range 85 circle, enrage repeat in 3s EnrageRepeatSecondary = 23356, // Helper->self, 0.6s cast, range 85 circle, secondary enrage repeat in 3s -}; +} public enum SID : uint { @@ -132,4 +132,4 @@ public enum SID : uint HotBlade2 = 2298, // none->Boss/AvowedAvatar, extra=0x0 ColdBlade1 = 2299, // none->AvowedAvatar, extra=0x0 ColdBlade2 = 2300, // none->AvowedAvatar, extra=0x0 -}; +} diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS7StygimolochLord/DRS7Enums.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS7StygimolochLord/DRS7Enums.cs index f2f5d090d7..705bdad5b2 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS7StygimolochLord/DRS7Enums.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS7StygimolochLord/DRS7Enums.cs @@ -8,7 +8,7 @@ public enum OID : uint BallOfFire = 0x30B4, // R1.000, spawn during fight BallOfEarth = 0x30B6, // R1.000, spawn during fight HiddenTrap = 0x18D6, // R0.500, spawn during fight -}; +} public enum AID : uint { @@ -43,16 +43,16 @@ public enum AID : uint DevastatingBoltInner = 22470, // Helper->self, 4.0s cast, range 12-17 donut RendingBolt = 22475, // Boss->self, 3.0s cast, single-target, visual (electrocution puddles) Electrocution = 22476, // Helper->location, 3.0s cast, range 3 circle puddles -}; +} public enum SID : uint { WanderersFate = 2430, // none->player, extra=0x0 SacrificesFate = 2431, // none->player, extra=0x0 -}; +} public enum IconID : uint { FoeSplitter = 198, // player RapidBolts = 160, // player -}; +} diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/DRS8Enums.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/DRS8Enums.cs index 3c334d3602..445f46f60a 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/DRS8Enums.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/DRS8Enums.cs @@ -15,7 +15,7 @@ public enum OID : uint AetherialBolt = 0x3119, // R0.600, spawn during fight (small bomb) AetherialBurst = 0x311A, // R1.200, spawn during fight (big bomb) ProtectiveDome = 0x1EB12C, // R0.500, EventObj type, spawn during fight -}; +} public enum AID : uint { @@ -109,7 +109,7 @@ public enum AID : uint SoftEnrageGAOE = 23414, // Helper->self, 5.0s cast, range 60 circle, raidwide SoftEnrageS = 23075, // QueensSoldier->self, 5.0s cast, range 60 circle, visual (raidwide) SoftEnrageSAOE = 23413, // Helper->self, 5.0s cast, range 60 circle, raidwide -}; +} public enum SID : uint { @@ -136,4 +136,4 @@ public enum SID : uint AboveBoardPlayerShort = 2427, // none->player, extra=0x3E8 AboveBoardBombLong = 2428, // none->AetherialBurst/AetherialBolt, extra=0x3E8 AboveBoardBombShort = 2429, // none->AetherialBolt/AetherialBurst, extra=0x3E8 -}; +} diff --git a/BossMod/Modules/Shadowbringers/Foray/Duel/Duel2Lyon/Duel2LyonEnums.cs b/BossMod/Modules/Shadowbringers/Foray/Duel/Duel2Lyon/Duel2LyonEnums.cs index 3bf0d4f3ca..7b64bfaab8 100644 --- a/BossMod/Modules/Shadowbringers/Foray/Duel/Duel2Lyon/Duel2LyonEnums.cs +++ b/BossMod/Modules/Shadowbringers/Foray/Duel/Duel2Lyon/Duel2LyonEnums.cs @@ -6,7 +6,7 @@ public enum OID : uint Helper = 0x233C, // R0.500 VermillionFlame = 0x2E8F, //R1.2 RavenousGaleVoidzone = 0x1E8910 //R0.5 -}; +} public enum AID : uint { @@ -33,15 +33,15 @@ public enum AID : uint SplittingRage = 20814, // Boss->self, 3,0s cast, range 50 circle SkyrendingStrike = 20804, //enrage, 35s cast time SkyrendingStrike2 = 20805, //enrage, 0 cast time, repeat incase player survived 1st enrage -}; +} public enum TetherID : uint { fireorbs = 5, // Boss->player -}; +} public enum SID : uint { Enaero = 206, // Boss->Boss, extra=0x64 TemporaryMisdirection = 1422, // Boss->player, extra=0x2D0 -}; +} diff --git a/BossMod/Modules/Shadowbringers/Foray/Duel/Duel4Dabog/Duel4DabogEnums.cs b/BossMod/Modules/Shadowbringers/Foray/Duel/Duel4Dabog/Duel4DabogEnums.cs index dee49353ce..e0a67d4c6b 100644 --- a/BossMod/Modules/Shadowbringers/Foray/Duel/Duel4Dabog/Duel4DabogEnums.cs +++ b/BossMod/Modules/Shadowbringers/Foray/Duel/Duel4Dabog/Duel4DabogEnums.cs @@ -8,7 +8,7 @@ public enum OID : uint DabogFragment = 0x3262, // R4.500, spawn during fight AtomicSphere = 0x3263, // R1.000, spawn during fight AtomicSphereVoidzone = 0x1EB1A4, // R0.500, EventObj type, spawn during fight -}; +} public enum AID : uint { @@ -41,7 +41,7 @@ public enum AID : uint RightArmRayAOEFirst = 24273, // Helper->self, 10.0s cast, range 16 width 6 cross aoe RightArmRayAOERest = 24274, // Helper->self, no cast, range 16 width 6 cross aoe RightArmRayVoidzone = 24275, // Helper->player, no cast, range 5 circle aoe that leaves voidzone -}; +} public enum IconID : uint { @@ -50,4 +50,4 @@ public enum IconID : uint LeftArmWaveBait = 23, // player AtomicSphereCW = 156, // AtomicSphere AtomicSphereCCW = 157, // AtomicSphere -}; +} diff --git a/BossMod/Modules/Shadowbringers/Foray/Duel/Duel5Menenius/Duel5MeneniusEnums.cs b/BossMod/Modules/Shadowbringers/Foray/Duel/Duel5Menenius/Duel5MeneniusEnums.cs index 4061c5eaff..1a7a5a0700 100644 --- a/BossMod/Modules/Shadowbringers/Foray/Duel/Duel5Menenius/Duel5MeneniusEnums.cs +++ b/BossMod/Modules/Shadowbringers/Foray/Duel/Duel5Menenius/Duel5MeneniusEnums.cs @@ -30,7 +30,7 @@ public enum AID : uint ReactiveMunition = 23894, SenseWeakness = 23893, MagitekImpetus = 23899, -}; +} public enum SID : uint { @@ -39,4 +39,4 @@ public enum SID : uint LeftFace = 0x50F, RightFace = 0x510, AccelerationBomb = 0x430, -}; +} diff --git a/BossMod/Modules/Shadowbringers/Hunt/RankA/Baal.cs b/BossMod/Modules/Shadowbringers/Hunt/RankA/Baal.cs index cd39560089..96606f49e9 100644 --- a/BossMod/Modules/Shadowbringers/Hunt/RankA/Baal.cs +++ b/BossMod/Modules/Shadowbringers/Hunt/RankA/Baal.cs @@ -3,7 +3,7 @@ namespace BossMod.Shadowbringers.Hunt.RankA.Baal; public enum OID : uint { Boss = 0x2854, // R=3.2 -}; +} public enum AID : uint { @@ -14,7 +14,7 @@ public enum AID : uint SewageWave1 = 17422, // 2854->self, no cast, range 30 180-degree cone SewageWave2 = 17424, // 2854->self, 5,0s cast, range 30 180-degree cone SewageWave3 = 17421, // 2854->self, no cast, range 30 180-degree cone -}; +} class SewerWater : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Shadowbringers/Hunt/RankA/Grassman.cs b/BossMod/Modules/Shadowbringers/Hunt/RankA/Grassman.cs index 703e0d9693..a17b568e6a 100644 --- a/BossMod/Modules/Shadowbringers/Hunt/RankA/Grassman.cs +++ b/BossMod/Modules/Shadowbringers/Hunt/RankA/Grassman.cs @@ -3,7 +3,7 @@ namespace BossMod.Shadowbringers.Hunt.RankA.Grassman; public enum OID : uint { Boss = 0x283A, // R=4.0 -}; +} public enum AID : uint { @@ -13,7 +13,7 @@ public enum AID : uint StoolPelt = 17861, // 283A->location, 3,0s cast, range 5 circle Browbeat = 17860, // 283A->player, 4,0s cast, single-target Streak = 17862, // 283A->location, 3,0s cast, width 6 rect charge, knockback 10, away from source -}; +} class ChestThump : BossComponent { diff --git a/BossMod/Modules/Shadowbringers/Hunt/RankA/Huracan.cs b/BossMod/Modules/Shadowbringers/Hunt/RankA/Huracan.cs index 7df83974d9..f6390c87e5 100644 --- a/BossMod/Modules/Shadowbringers/Hunt/RankA/Huracan.cs +++ b/BossMod/Modules/Shadowbringers/Hunt/RankA/Huracan.cs @@ -3,7 +3,7 @@ namespace BossMod.Shadowbringers.Hunt.RankA.Huracan; public enum OID : uint { Boss = 0x28B5, // R=4.9 -}; +} public enum AID : uint { @@ -15,7 +15,7 @@ public enum AID : uint DawnsEdge = 17495, // Boss->self, 3,5s cast, range 15 width 10 rect SpringBreeze = 17496, // Boss->self, 3,5s cast, range 80 width 10 rect AutumnWreath = 17498, // Boss->self, 4,0s cast, range 10-20 donut -}; +} class SpringBreeze : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Shadowbringers/Hunt/RankA/LilMurderer.cs b/BossMod/Modules/Shadowbringers/Hunt/RankA/LilMurderer.cs index 4cdc27a0cd..8f5b36779d 100644 --- a/BossMod/Modules/Shadowbringers/Hunt/RankA/LilMurderer.cs +++ b/BossMod/Modules/Shadowbringers/Hunt/RankA/LilMurderer.cs @@ -3,7 +3,7 @@ namespace BossMod.Shadowbringers.Hunt.RankA.LilMurderer; public enum OID : uint { Boss = 0x28B4, // R=2.1 -}; +} public enum AID : uint { @@ -13,7 +13,7 @@ public enum AID : uint GobthunderII = 17492, // Boss->location, 4,0s cast, range 8 circle, applies Lightning Resistance Down II Gobhaste = 17491, // Boss->self, 3,0s cast, single-target GoblinSlash = 17489, // Boss->self, no cast, range 8 circle, sometimes boss uses Gobthunder II on itself, next attack after is this -}; +} class GoblinSlash : Components.GenericAOEs { diff --git a/BossMod/Modules/Shadowbringers/Hunt/RankA/Maliktender.cs b/BossMod/Modules/Shadowbringers/Hunt/RankA/Maliktender.cs index 4cfa7e5027..904ab862cc 100644 --- a/BossMod/Modules/Shadowbringers/Hunt/RankA/Maliktender.cs +++ b/BossMod/Modules/Shadowbringers/Hunt/RankA/Maliktender.cs @@ -3,7 +3,7 @@ namespace BossMod.Shadowbringers.Hunt.RankA.Maliktender; public enum OID : uint { Boss = 0x2874, // R=3.06 -}; +} public enum AID : uint { @@ -18,7 +18,7 @@ public enum SID : uint { Haste = 1962, Stun = 149, -}; +} class Sabotendance : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Shadowbringers/Hunt/RankA/Nariphon.cs b/BossMod/Modules/Shadowbringers/Hunt/RankA/Nariphon.cs index 6679633892..d49a4f6b59 100644 --- a/BossMod/Modules/Shadowbringers/Hunt/RankA/Nariphon.cs +++ b/BossMod/Modules/Shadowbringers/Hunt/RankA/Nariphon.cs @@ -3,7 +3,7 @@ namespace BossMod.Shadowbringers.Hunt.RankA.Nariphon; public enum OID : uint { Boss = 0x2890, // R=6.0 -}; +} public enum AID : uint { @@ -12,18 +12,18 @@ public enum AID : uint AllergenInjection = 16972, // 2890->player, 5,0s cast, range 6 circle RootsOfAtopy = 16971, // 2890->player, 5,0s cast, range 6 circle OdiousMiasma = 16970, // 2890->self, 3,0s cast, range 12 120-degree cone -}; +} public enum SID : uint { PiercingResistanceDownII = 1435, // Boss->player, extra=0x0 -}; +} public enum IconID : uint { Baitaway = 140, // player Stackmarker = 62, // player -}; +} class OdiousMiasma : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Shadowbringers/Hunt/RankA/Nuckelavee.cs b/BossMod/Modules/Shadowbringers/Hunt/RankA/Nuckelavee.cs index b2dc5affdd..960d909573 100644 --- a/BossMod/Modules/Shadowbringers/Hunt/RankA/Nuckelavee.cs +++ b/BossMod/Modules/Shadowbringers/Hunt/RankA/Nuckelavee.cs @@ -3,7 +3,7 @@ namespace BossMod.Shadowbringers.Hunt.RankA.Nuckelavee; public enum OID : uint { Boss = 0x288F, // R=3.6 -}; +} public enum AID : uint { @@ -12,7 +12,7 @@ public enum AID : uint BogBody = 16965, // 288F->player, 5,0s cast, range 5 circle, spread, applies bleed that can be dispelled Gallop = 16967, // 288F->location, 4,5s cast, rushes to target and casts Spite Spite = 18037, // 288F->self, no cast, range 8 circle -}; +} class Torpedo : Components.SingleTargetDelayableCast { diff --git a/BossMod/Modules/Shadowbringers/Hunt/RankA/OPoorestPauldia.cs b/BossMod/Modules/Shadowbringers/Hunt/RankA/OPoorestPauldia.cs index d5ed9cad09..db29afa28c 100644 --- a/BossMod/Modules/Shadowbringers/Hunt/RankA/OPoorestPauldia.cs +++ b/BossMod/Modules/Shadowbringers/Hunt/RankA/OPoorestPauldia.cs @@ -3,7 +3,7 @@ namespace BossMod.Shadowbringers.Hunt.RankA.OPoorestPauldia; public enum OID : uint { Boss = 0x2820, // R=4.025 -}; +} public enum AID : uint { @@ -12,7 +12,7 @@ public enum AID : uint TailDrive = 16831, // 2820->self, 5,0s cast, range 30+R 90-degree cone WordsOfWoe = 16832, // 2820->self, 3,0s cast, range 45+R width 6 rect TheSpin = 16833, // 2820->self, 3,0s cast, range 40 circle -}; +} class RustingClaw : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Shadowbringers/Hunt/RankA/Rusalka.cs b/BossMod/Modules/Shadowbringers/Hunt/RankA/Rusalka.cs index b70765e64b..95f13de83d 100644 --- a/BossMod/Modules/Shadowbringers/Hunt/RankA/Rusalka.cs +++ b/BossMod/Modules/Shadowbringers/Hunt/RankA/Rusalka.cs @@ -3,7 +3,7 @@ namespace BossMod.Shadowbringers.Hunt.RankA.Rusalka; public enum OID : uint { Boss = 0x2853, // R=3.6 -}; +} public enum AID : uint { @@ -12,7 +12,7 @@ public enum AID : uint AetherialSpark = 17368, // Boss->self, 2,5s cast, range 12 width 4 rect AetherialPull = 17366, // Boss->self, 4,0s cast, range 30 circle, pull 30 between centers Flood = 17369, // Boss->self, no cast, range 8 circle -}; +} class Hydrocannon : Components.LocationTargetedAOEs { diff --git a/BossMod/Modules/Shadowbringers/Hunt/RankA/Sugaar.cs b/BossMod/Modules/Shadowbringers/Hunt/RankA/Sugaar.cs index 17e26bf0b8..be4fe16add 100644 --- a/BossMod/Modules/Shadowbringers/Hunt/RankA/Sugaar.cs +++ b/BossMod/Modules/Shadowbringers/Hunt/RankA/Sugaar.cs @@ -3,7 +3,7 @@ namespace BossMod.Shadowbringers.Hunt.RankA.Sugaar; public enum OID : uint { Boss = 0x2875, // R5.500, x1 -}; +} public enum AID : uint { diff --git a/BossMod/Modules/Shadowbringers/Hunt/RankA/Supay.cs b/BossMod/Modules/Shadowbringers/Hunt/RankA/Supay.cs index 6ad5a80d12..1a8d3fde5c 100644 --- a/BossMod/Modules/Shadowbringers/Hunt/RankA/Supay.cs +++ b/BossMod/Modules/Shadowbringers/Hunt/RankA/Supay.cs @@ -3,7 +3,7 @@ namespace BossMod.Shadowbringers.Hunt.RankA.Supay; public enum OID : uint { Boss = 0x2839, // R=3.6 -}; +} public enum AID : uint { @@ -11,12 +11,12 @@ public enum AID : uint BlasphemousHowl = 17858, // Boss->players, 3,0s cast, range 8 circle, spread, applies terror PetroEyes = 17856, // Boss->self, 3,0s cast, range 40 circle, gaze, inflicts petrification Beakaxe = 17857, // Boss->player, no cast, single-target, instantlyy kills petrified players -}; +} public enum IconID : uint { Baitaway = 159, // player -}; +} class BlasphemousHowl : Components.GenericBaitAway { diff --git a/BossMod/Modules/Shadowbringers/Hunt/RankA/TheMudman.cs b/BossMod/Modules/Shadowbringers/Hunt/RankA/TheMudman.cs index 2090a3e49a..a55f7d9cc4 100644 --- a/BossMod/Modules/Shadowbringers/Hunt/RankA/TheMudman.cs +++ b/BossMod/Modules/Shadowbringers/Hunt/RankA/TheMudman.cs @@ -3,7 +3,7 @@ namespace BossMod.Shadowbringers.Hunt.RankA.TheMudman; public enum OID : uint { Boss = 0x281F, // R=4.2 -}; +} public enum AID : uint { @@ -12,12 +12,12 @@ public enum AID : uint RoyalFlush = 16826, // Boss->self, 3,0s cast, range 8 circle BogBequest = 16827, // Boss->self, 5,0s cast, range 5-20 donut GravityForce = 16829, // Boss->player, 5,0s cast, range 6 circle, interruptible, applies heavy -}; +} public enum IconID : uint { Baitaway = 140, // player -}; +} class BogBequest : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Shadowbringers/Hunt/RankS/Aglaope.cs b/BossMod/Modules/Shadowbringers/Hunt/RankS/Aglaope.cs index da8a72f4b2..68b86effe2 100644 --- a/BossMod/Modules/Shadowbringers/Hunt/RankS/Aglaope.cs +++ b/BossMod/Modules/Shadowbringers/Hunt/RankS/Aglaope.cs @@ -3,7 +3,7 @@ namespace BossMod.Shadowbringers.Hunt.RankS.Aglaope; public enum OID : uint { Boss = 0x281E, // R=2.4 -}; +} public enum AID : uint { @@ -15,13 +15,13 @@ public enum AID : uint AncientAero = 16823, // Boss->self, 3,0s cast, range 40+R width 6 rect SongOfTorment = 16825, // Boss->self, 5,0s cast, range 50 circle, interruptible raidwide with bleed AncientAeroIII = 18056, // Boss->self, 3,0s cast, range 30 circle, knockback 10, away from source -}; +} public enum SID : uint { Seduced = 991, // Boss->player, extra=0x11 Bleeding = 642, // Boss->player, extra=0x0 -}; +} class SongOfTorment : Components.CastInterruptHint { diff --git a/BossMod/Modules/Shadowbringers/Hunt/RankS/ForgivenGossip.cs b/BossMod/Modules/Shadowbringers/Hunt/RankS/ForgivenGossip.cs index d730eaf976..4b7127971b 100644 --- a/BossMod/Modules/Shadowbringers/Hunt/RankS/ForgivenGossip.cs +++ b/BossMod/Modules/Shadowbringers/Hunt/RankS/ForgivenGossip.cs @@ -3,14 +3,14 @@ public enum OID : uint { Boss = 0x2A03, // R=0.75 -}; +} public enum AID : uint { AutoAttack = 18129, // Boss->player, no cast, single-target Icefall = 17043, // Boss->location, 3,0s cast, range 5 circle, deadly if petrified by gaze PetrifyingEye = 18041, // Boss->self, 3,0s cast, range 40 circle -}; +} class Icefall : Components.LocationTargetedAOEs { diff --git a/BossMod/Modules/Shadowbringers/Hunt/RankS/ForgivenPedantry.cs b/BossMod/Modules/Shadowbringers/Hunt/RankS/ForgivenPedantry.cs index 2defe40893..ade798aa3f 100644 --- a/BossMod/Modules/Shadowbringers/Hunt/RankS/ForgivenPedantry.cs +++ b/BossMod/Modules/Shadowbringers/Hunt/RankS/ForgivenPedantry.cs @@ -3,7 +3,7 @@ public enum OID : uint { Boss = 0x298A, // R=5.5 -}; +} public enum AID : uint { @@ -20,7 +20,7 @@ public enum AID : uint SanctifiedShock = 17900, // 298A->player, no cast, single-target, stuns target before WitchHunt WitchHunt = 17444, // 298A->players, 3,0s cast, width 10 rect charge WitchHunt2 = 17445, // 298A->players, no cast, width 10 rect charge, targets main tank -}; +} class LeftRightCheek : Components.GenericAOEs { diff --git a/BossMod/Modules/Shadowbringers/Hunt/RankS/ForgivenRebellion.cs b/BossMod/Modules/Shadowbringers/Hunt/RankS/ForgivenRebellion.cs index 9da8573608..dcc18c36d2 100644 --- a/BossMod/Modules/Shadowbringers/Hunt/RankS/ForgivenRebellion.cs +++ b/BossMod/Modules/Shadowbringers/Hunt/RankS/ForgivenRebellion.cs @@ -3,7 +3,7 @@ public enum OID : uint { Boss = 0x28B6, // R=3.4 -}; +} public enum AID : uint { @@ -23,7 +23,7 @@ public enum AID : uint Mindjack = 17599, // Boss->self, 4,0s cast, range 40 circle, applies forced march buffs RagingFire = 17601, // Boss->self, 5,0s cast, range 5-40 donut Interference = 17602, // Boss->self, 4,5s cast, range 28 180-degree cone -}; +} public enum SID : uint { @@ -32,13 +32,13 @@ public enum SID : uint RightFace = 1961, // Boss->player, extra=0x0 LeftFace = 1960, // Boss->player, extra=0x0 ForcedMarch = 1257, // Boss->player, extra=0x2/0x1/0x8/0x4 -}; +} public enum IconID : uint { RotateCCW = 168, // Boss RotateCW = 167, // Boss -}; +} class SanctifiedBlizzardChain : Components.GenericRotatingAOE { diff --git a/BossMod/Modules/Shadowbringers/Hunt/RankS/Gunitt.cs b/BossMod/Modules/Shadowbringers/Hunt/RankS/Gunitt.cs index 33c67b888f..a5474e1dfb 100644 --- a/BossMod/Modules/Shadowbringers/Hunt/RankS/Gunitt.cs +++ b/BossMod/Modules/Shadowbringers/Hunt/RankS/Gunitt.cs @@ -3,7 +3,7 @@ namespace BossMod.Shadowbringers.Hunt.RankS.Gunitt; public enum OID : uint { Boss = 0x2852, // R=4.0 -}; +} public enum AID : uint { @@ -16,18 +16,18 @@ public enum AID : uint CoinToss = 17360, // 2852->self, 4,0s cast, range 40 circle, gaze, applies Seduced (forced march to boss) TheDeepRends = 17351, // 2852->self, 5,5s cast, range 20 60-degree cone TheDeepRends2 = 17352, // 2852->self, no cast, range 20 60-degree cone, seems to target 5 random players after first The Deep Rends, no telegraph? -}; +} public enum SID : uint { MagicVulnerabilityUp = 1138, // Boss->player, extra=0x0 Seduced = 227, // Boss->player, extra=0x0 -}; +} public enum IconID : uint { Stackmarker = 93, // player -}; +} class TheDeepSeeks : Components.SingleTargetCast diff --git a/BossMod/Modules/Shadowbringers/Hunt/RankS/Ixtab.cs b/BossMod/Modules/Shadowbringers/Hunt/RankS/Ixtab.cs index fc1cda9fc9..634126deb6 100644 --- a/BossMod/Modules/Shadowbringers/Hunt/RankS/Ixtab.cs +++ b/BossMod/Modules/Shadowbringers/Hunt/RankS/Ixtab.cs @@ -3,7 +3,7 @@ public enum OID : uint { Boss = 0x2838, // R=3.24 -}; +} public enum AID : uint { @@ -20,7 +20,7 @@ public enum AID : uint Cryptcall = 17847, // Boss->self/players, 3,0s cast, range 35+R 120-degree cone, sets hp to 1, applies heal to full doom with 25s duration TartareanQuake = 17849, // Boss->self, 4,0s cast, range 40 circle TartareanTwister = 18072, // Boss->self, 5,0s cast, range 55 circle, raidwide + windburn DoT, interruptible -}; +} public enum SID : uint { @@ -28,7 +28,7 @@ public enum SID : uint Dualcast = 1798, // Boss->Boss, extra=0x0 Paralysis = 17, // Boss->player, extra=0x0 Doom = 1769, // Boss->player, extra=0x0 -}; +} class DualCastTartareanFlameThunder : Components.GenericAOEs { diff --git a/BossMod/Modules/Shadowbringers/Hunt/RankS/Tarchia.cs b/BossMod/Modules/Shadowbringers/Hunt/RankS/Tarchia.cs index 9344705eaf..b64a1a87a7 100644 --- a/BossMod/Modules/Shadowbringers/Hunt/RankS/Tarchia.cs +++ b/BossMod/Modules/Shadowbringers/Hunt/RankS/Tarchia.cs @@ -3,7 +3,7 @@ namespace BossMod.Shadowbringers.Hunt.RankS.Tarchia; public enum OID : uint { Boss = 0x2873, // R=9.86 -}; +} public enum AID : uint { @@ -17,7 +17,7 @@ public enum AID : uint Trounce = 18027, // Boss->self, 4,0s cast, range 40 60-degree cone MetamorphicBlast = 18031, // Boss->self, 4,0s cast, range 40 circle Groundstorm = 18023, // Boss->self, 5,0s cast, range 5-40 donut -}; +} class WildHorn : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Shadowbringers/Hunt/RankS/Tyger.cs b/BossMod/Modules/Shadowbringers/Hunt/RankS/Tyger.cs index 6b14fd3005..aa526b8b23 100644 --- a/BossMod/Modules/Shadowbringers/Hunt/RankS/Tyger.cs +++ b/BossMod/Modules/Shadowbringers/Hunt/RankS/Tyger.cs @@ -3,7 +3,7 @@ namespace BossMod.Shadowbringers.Hunt.RankS.Tyger; public enum OID : uint { Boss = 0x288E, // R=5.92 -}; +} public enum AID : uint { @@ -15,7 +15,7 @@ public enum AID : uint TheRamsEmbrace = 16960, // Boss->location, 3,0s cast, range 9 circle TheDragonsVoice = 16963, // Boss->self, 4,0s cast, range 8-30 donut, interruptible raidwide donut TheRamsVoice = 16962, // Boss->self, 4,0s cast, range 9 circle -}; +} class TheLionsBreath : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Shadowbringers/TreasureHunt/TheDungeonsOfLyheGhiah/Goliath.cs b/BossMod/Modules/Shadowbringers/TreasureHunt/TheDungeonsOfLyheGhiah/Goliath.cs index 2a490cfbac..a37f58fb5c 100644 --- a/BossMod/Modules/Shadowbringers/TreasureHunt/TheDungeonsOfLyheGhiah/Goliath.cs +++ b/BossMod/Modules/Shadowbringers/TreasureHunt/TheDungeonsOfLyheGhiah/Goliath.cs @@ -11,7 +11,7 @@ public enum OID : uint DungeonOnion = 0x2A06, // R0,840, icon 1, needs to be killed in order from 1 to 5 for maximum rewards DungeonEgg = 0x2A07, // R0,840, icon 2, needs to be killed in order from 1 to 5 for maximum rewards BonusAdd_TheKeeperOfTheKeys = 0x2A05, // R3.230 -}; +} public enum AID : uint { @@ -34,7 +34,7 @@ public enum AID : uint Scoop = 17853, // 2A05->self, 4,0s cast, range 15 120-degree cone Inhale = 17855, // 2A05->self, no cast, range 20 120-degree cone, attract 25 between hitboxes, shortly before Spin Spin = 17854, // 2A05->self, 2,5s cast, range 11 circle -}; +} class Wellbore : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/FuathTroublemaker.cs b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/FuathTroublemaker.cs index ef33a10da2..008bd9e38a 100644 --- a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/FuathTroublemaker.cs +++ b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/FuathTroublemaker.cs @@ -6,7 +6,7 @@ public enum OID : uint BossAdd = 0x3019, //R=1.8 BossHelper = 0x233C, BonusAdd_FuathTrickster = 0x3033, // R0.750 -}; +} public enum AID : uint { @@ -19,7 +19,7 @@ public enum AID : uint ToyHammer = 21734, // Boss->player, 4,0s cast, single-target Hydrocannon = 21737, // Boss->players, 5,0s cast, range 6 circle Telega = 9630, // BonusAdds->self, no cast, single-target, bonus adds disappear -}; +} class CroakingChorus : Components.CastHint { diff --git a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/GreedyPixie.cs b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/GreedyPixie.cs index ba59237817..470bb77064 100644 --- a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/GreedyPixie.cs +++ b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/GreedyPixie.cs @@ -14,7 +14,7 @@ public enum OID : uint SecretEgg = 0x301E, // R0,840, icon 2, needs to be killed in order from 1 to 5 for maximum rewards BonusAdd_TheKeeperOfTheKeys = 0x3034, // R3.230 BonusAdd_FuathTrickster = 0x3033, // R0.750 -}; +} public enum AID : uint { @@ -38,7 +38,7 @@ public enum AID : uint Inhale = 21770, // 3034->self, no cast, range 20 120-degree cone, attract 25 between hitboxes, shortly before Spin Spin = 21769, // 3034->self, 4,0s cast, range 11 circle Scoop = 21768, // 3034->self, 4,0s cast, range 15 120-degree cone -}; +} class Windrune : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretBasket.cs b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretBasket.cs index aea8abce4f..4337ad04e7 100644 --- a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretBasket.cs +++ b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretBasket.cs @@ -10,7 +10,7 @@ public enum OID : uint SecretTomato = 0x3020, // R0,840, icon 4, needs to be killed in order from 1 to 5 for maximum rewards SecretOnion = 0x301D, // R0,840, icon 1, needs to be killed in order from 1 to 5 for maximum rewards SecretEgg = 0x301E, // R0,840, icon 2, needs to be killed in order from 1 to 5 for maximum rewards -}; +} public enum AID : uint { @@ -35,7 +35,7 @@ public enum AID : uint PluckAndPrune = 6449, // 2A07->self, 3,5s cast, range 6+R circle PungentPirouette = 6450, // 2A08->self, 3,5s cast, range 6+R circle Telega = 9630, // BonusAdds->self, no cast, single-target, bonus adds disappear -}; +} class Earthquake : Components.RaidwideCast { diff --git a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretCladoselache.cs b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretCladoselache.cs index c52d6373b9..ac52b0fa63 100644 --- a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretCladoselache.cs +++ b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretCladoselache.cs @@ -6,7 +6,7 @@ public enum OID : uint BossAdd = 0x3028, //R=3.0 BossHelper = 0x233C, BonusAdd_TheKeeperOfTheKeys = 0x3034, // R3.230 -}; +} public enum AID : uint { @@ -25,14 +25,14 @@ public enum AID : uint Inhale = 21770, // 3034->self, no cast, range 20 120-degree cone, attract 25 between hitboxes, shortly before Spin Spin = 21769, // 3034->self, 4,0s cast, range 11 circle Scoop = 21768, // 3034->self, 4,0s cast, range 15 120-degree cone -}; +} public enum IconID : uint { spreadmarker = 135, // player RotateCCW = 168, // Boss RotateCW = 167, // Boss -}; +} class PelagicCleaverRotation : Components.GenericRotatingAOE { diff --git a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretDjinn.cs b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretDjinn.cs index 150256f8a2..214128c816 100644 --- a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretDjinn.cs +++ b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretDjinn.cs @@ -6,7 +6,7 @@ public enum OID : uint BossAdd = 0x3010, //R=1.32 BossHelper = 0x233C, BonusAdd_TheKeeperOfTheKeys = 0x3034, // R3.230 -}; +} public enum AID : uint { @@ -23,7 +23,7 @@ public enum AID : uint Inhale = 21770, // 3034->self, no cast, range 20 120-degree cone, attract 25 between hitboxes, shortly before Spin Spin = 21769, // 3034->self, 4,0s cast, range 11 circle Scoop = 21768, // 3034->self, 4,0s cast, range 15 120-degree cone -}; +} class Gust : Components.LocationTargetedAOEs { diff --git a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretKeeper.cs b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretKeeper.cs index b1624923a9..9c5a25220e 100644 --- a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretKeeper.cs +++ b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretKeeper.cs @@ -8,7 +8,7 @@ public enum OID : uint ResinVoidzone = 0x1E8FC7, BonusAdd_TheKeeperOfTheKeys = 0x3034, // R3.230 BonusAdd_FuathTrickster = 0x3033, // R0.750 -}; +} public enum AID : uint { @@ -24,7 +24,7 @@ public enum AID : uint Inhale = 21770, // 3034->self, no cast, range 20 120-degree cone, attract 25 between hitboxes, shortly before Spin Spin = 21769, // 3034->self, 4,0s cast, range 11 circle Scoop = 21768, // 3034->self, 4,0s cast, range 15 120-degree cone -}; +} class Buffet : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretKorrigan.cs b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretKorrigan.cs index 59bf977346..1bdc087d37 100644 --- a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretKorrigan.cs +++ b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretKorrigan.cs @@ -10,7 +10,7 @@ public enum OID : uint SecretTomato = 0x3020, // R0,840, icon 4, needs to be killed in order from 1 to 5 for maximum rewards SecretOnion = 0x301D, // R0,840, icon 1, needs to be killed in order from 1 to 5 for maximum rewards SecretEgg = 0x301E, // R0,840, icon 2, needs to be killed in order from 1 to 5 for maximum rewards -}; +} public enum AID : uint { @@ -26,7 +26,7 @@ public enum AID : uint PluckAndPrune = 6449, // 2A07->self, 3,5s cast, range 6+R circle PungentPirouette = 6450, // 2A08->self, 3,5s cast, range 6+R circle Telega = 9630, // BonusAdds->self, no cast, single-target, bonus adds disappear -}; +} class Hypnotize : Components.CastGaze { diff --git a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretPegasus.cs b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretPegasus.cs index 01fed8321b..4995821e12 100644 --- a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretPegasus.cs +++ b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretPegasus.cs @@ -6,7 +6,7 @@ public enum OID : uint Thunderhead = 0x3017, //R=1.0, untargetable BossHelper = 0x233C, BonusAdd_TheKeeperOfTheKeys = 0x3034, // R3.230 -}; +} public enum AID : uint { @@ -22,7 +22,7 @@ public enum AID : uint Inhale = 21770, // 3034->self, no cast, range 20 120-degree cone, attract 25 between hitboxes, shortly before Spin Spin = 21769, // 3034->self, 4,0s cast, range 11 circle Scoop = 21768, // 3034->self, 4,0s cast, range 15 120-degree cone -}; +} class BurningBright : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretPorxie.cs b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretPorxie.cs index 640c383f7b..1d3d57a32c 100644 --- a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretPorxie.cs +++ b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretPorxie.cs @@ -17,7 +17,7 @@ public enum OID : uint SecretTomato = 0x3020, // R0,840, icon 4, needs to be killed in order from 1 to 5 for maximum rewards SecretOnion = 0x301D, // R0,840, icon 1, needs to be killed in order from 1 to 5 for maximum rewards SecretEgg = 0x301E, // R0,840, icon 2, needs to be killed in order from 1 to 5 for maximum rewards -}; +} public enum AID : uint { @@ -41,7 +41,7 @@ public enum AID : uint HeirloomScream = 6451, // 2A09->self, 3,5s cast, range 6+R circle PluckAndPrune = 6449, // 2A07->self, 3,5s cast, range 6+R circle PungentPirouette = 6450, // 2A08->self, 3,5s cast, range 6+R circle -}; +} class BrewingStorm : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretSerpent.cs b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretSerpent.cs index a37b166c8e..d9e48fa63c 100644 --- a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretSerpent.cs +++ b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretSerpent.cs @@ -11,7 +11,7 @@ public enum OID : uint SecretTomato = 0x3020, // R0,840, icon 4, needs to be killed in order from 1 to 5 for maximum rewards SecretOnion = 0x301D, // R0,840, icon 1, needs to be killed in order from 1 to 5 for maximum rewards SecretEgg = 0x301E, // R0,840, icon 2, needs to be killed in order from 1 to 5 for maximum rewards -}; +} public enum AID : uint { @@ -29,7 +29,7 @@ public enum AID : uint PluckAndPrune = 6449, // 2A07->self, 3,5s cast, range 6+R circle PungentPirouette = 6450, // 2A08->self, 3,5s cast, range 6+R circle Telega = 9630, // BonusAdds->self, no cast, single-target, bonus adds disappear -}; +} class Douse : Components.PersistentVoidzoneAtCastTarget { diff --git a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretSwallow.cs b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretSwallow.cs index 7d9a7ee44d..1a6490d41e 100644 --- a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretSwallow.cs +++ b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretSwallow.cs @@ -5,7 +5,7 @@ public enum OID : uint Boss = 0x302B, //R=4.0 BossAdd = 0x302C, //R=2.0 BossHelper = 0x233C, -}; +} public enum AID : uint { @@ -17,7 +17,7 @@ public enum AID : uint SeventhWave = 21719, // 302B->self, 4,5s cast, range 11 circle BodySlam = 21718, // 302B->location, 4,0s cast, range 10 circle, knockback 20, away from source PrevailingCurrent = 21717, // 302C->self, 3,0s cast, range 22+R width 6 rect -}; +} class ElectricWhorl : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretUndine.cs b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretUndine.cs index eb6ea5ce5d..bb36b016a3 100644 --- a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretUndine.cs +++ b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretUndine.cs @@ -7,7 +7,7 @@ public enum OID : uint Bubble = 0x3012, //R=1.3, untargetable BossHelper = 0x233C, BonusAdd_TheKeeperOfTheKeys = 0x3034, // R3.230 -}; +} public enum AID : uint { @@ -26,7 +26,7 @@ public enum AID : uint Inhale = 21770, // 3034->self, no cast, range 20 120-degree cone, attract 25 between hitboxes, shortly before Spin Spin = 21769, // 3034->self, 4,0s cast, range 11 circle Scoop = 21768, // 3034->self, 4,0s cast, range 15 120-degree cone -}; +} class Hydrofan : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretWorm.cs b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretWorm.cs index c408442ead..143a7579a0 100644 --- a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretWorm.cs +++ b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretWorm.cs @@ -10,7 +10,7 @@ public enum OID : uint SecretTomato = 0x3020, // R0,840, icon 4, needs to be killed in order from 1 to 5 for maximum rewards SecretOnion = 0x301D, // R0,840, icon 1, needs to be killed in order from 1 to 5 for maximum rewards SecretEgg = 0x301E, // R0,840, icon 2, needs to be killed in order from 1 to 5 for maximum rewards -}; +} public enum AID : uint { @@ -28,12 +28,12 @@ public enum AID : uint PluckAndPrune = 6449, // 2A07->self, 3,5s cast, range 6+R circle PungentPirouette = 6450, // 2A08->self, 3,5s cast, range 6+R circle Telega = 9630, // BonusAdds->self, no cast, single-target, bonus adds disappear -}; +} public enum IconID : uint { Baitaway = 23, // player -}; +} class Hydrocannon : Components.LocationTargetedAOEs { diff --git a/BossMod/Modules/Shadowbringers/Ultimate/TEA/TEAEnums.cs b/BossMod/Modules/Shadowbringers/Ultimate/TEA/TEAEnums.cs index 4a58811504..50b425df89 100644 --- a/BossMod/Modules/Shadowbringers/Ultimate/TEA/TEAEnums.cs +++ b/BossMod/Modules/Shadowbringers/Ultimate/TEA/TEAEnums.cs @@ -40,7 +40,7 @@ public enum OID : uint //_Gen_Actor1EA1A1 = 0x1EA1A1, // R0.500-2.000, x8, EventObj type //_Gen_Actor1E8536 = 0x1E8536, // R0.500-2.000, x1, EventObj type -}; +} public enum AID : uint { @@ -210,7 +210,7 @@ public enum AID : uint IrresistibleGrace = 18580, // PerfectAlexander->players, 5.0s cast, range 6 circle stack TemporalInterference = 18582, // PerfectAlexander->self, 5.0s cast, single-target, visual (enrage sequence start) TemporalPrison = 18583, // PerfectAlexander->self, 42.0s cast, range 100 circle, enrage -}; +} public enum SID : uint { diff --git a/BossMod/Modules/Stormblood/Hunt/RankA/Angada.cs b/BossMod/Modules/Stormblood/Hunt/RankA/Angada.cs index f63cf590a2..9280f66bf9 100644 --- a/BossMod/Modules/Stormblood/Hunt/RankA/Angada.cs +++ b/BossMod/Modules/Stormblood/Hunt/RankA/Angada.cs @@ -3,7 +3,7 @@ public enum OID : uint { Boss = 0x1AC0, // R=5.4 -}; +} public enum AID : uint { @@ -12,7 +12,7 @@ public enum AID : uint RockThrow = 8193, // 1AC0->location, 3,0s cast, range 6 circle Butcher = 8191, // 1AC0->self, 3,0s cast, range 6+R 120-degree cone Rip = 8192, // 1AC0->self, no cast, range 6+R 120-degree cone, always happens directly after Butcher -}; +} class ScytheTail : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Stormblood/Hunt/RankA/Gajasura.cs b/BossMod/Modules/Stormblood/Hunt/RankA/Gajasura.cs index 07cf131388..88d36f0edf 100644 --- a/BossMod/Modules/Stormblood/Hunt/RankA/Gajasura.cs +++ b/BossMod/Modules/Stormblood/Hunt/RankA/Gajasura.cs @@ -3,7 +3,7 @@ public enum OID : uint { Boss = 0x1ABF, // R=3.23 -}; +} public enum AID : uint { @@ -11,7 +11,7 @@ public enum AID : uint Spin = 8188, // 1ABF->self, 3,0s cast, range 5+R 120-degree cone Hurl = 8187, // 1ABF->location, 3,0s cast, range 6 circle Buffet = 8189, // 1ABF->none, 3,0s cast, single-target, randomly hits a target that isn't tanking, only happens when at least 2 actors are in combat with Gajasura (chocobos count) -}; +} class Spin : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Stormblood/Hunt/RankS/BoneCrawler.cs b/BossMod/Modules/Stormblood/Hunt/RankS/BoneCrawler.cs index 532d75928b..fa460465da 100644 --- a/BossMod/Modules/Stormblood/Hunt/RankS/BoneCrawler.cs +++ b/BossMod/Modules/Stormblood/Hunt/RankS/BoneCrawler.cs @@ -3,7 +3,7 @@ namespace BossMod.Stormblood.Hunt.RankS.BoneCrawler; public enum OID : uint { Boss = 0x1AB5, // R=6.2 -}; +} public enum AID : uint { @@ -17,7 +17,7 @@ public enum AID : uint HotCharge = 7922, // Boss->location, 2,5s cast, width 12 rect charge Haste = 7926, // Boss->self, no cast, single-target, boss applies Haste to self BoneShaker = 7925, // Boss->self, no cast, range 30+R circle, raidwide player stun -}; +} class HeatBreath : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Stormblood/Hunt/RankS/Gamma.cs b/BossMod/Modules/Stormblood/Hunt/RankS/Gamma.cs index ff942e1c83..1f5bb8dbd5 100644 --- a/BossMod/Modules/Stormblood/Hunt/RankS/Gamma.cs +++ b/BossMod/Modules/Stormblood/Hunt/RankS/Gamma.cs @@ -3,7 +3,7 @@ namespace BossMod.Stormblood.Hunt.RankS.Gamma; public enum OID : uint { Boss = 0x1AB2, // R=8.4 -}; +} public enum AID : uint { @@ -13,13 +13,13 @@ public enum AID : uint MagitekFlamehook = 7913, // Boss->self, 1,5s cast, range 30+R circle, raidwide + pyretic LimitCut = 7916, // Boss->self, 2,0s cast, single-target, applies Haste to self Launcher = 7915, // Boss->self, 1,5s cast, range 30+R circle, raidwide, does %HP dmg (10%, 20%, 30%, or 50%) -}; +} public enum SID : uint { Pyretic = 960, // Boss->player, extra=0x0 Haste = 8, // Boss->Boss, extra=0x0 -}; +} class DiffractiveLaser : Components.LocationTargetedAOEs { diff --git a/BossMod/Modules/Stormblood/Hunt/RankS/Okina.cs b/BossMod/Modules/Stormblood/Hunt/RankS/Okina.cs index 978d07616b..786f2898eb 100644 --- a/BossMod/Modules/Stormblood/Hunt/RankS/Okina.cs +++ b/BossMod/Modules/Stormblood/Hunt/RankS/Okina.cs @@ -3,7 +3,7 @@ public enum OID : uint { Boss = 0x1AB1, // R=8.0 -}; +} public enum AID : uint { @@ -15,7 +15,7 @@ public enum AID : uint Expulsion = 7995, // 1AB1->self, 3,0s cast, range 6+R circle, knockback 30, away from source Immersion = 7994, // 1AB1->self, 3,0s cast, range 60+R circle RubyTide = 7992, // Boss->self, 2,0s cast, single-target, boss gives itself Dmg up buff -}; +} class Hydrocannon : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Stormblood/Hunt/RankS/Orghana.cs b/BossMod/Modules/Stormblood/Hunt/RankS/Orghana.cs index c13446eca2..138bb141d8 100644 --- a/BossMod/Modules/Stormblood/Hunt/RankS/Orghana.cs +++ b/BossMod/Modules/Stormblood/Hunt/RankS/Orghana.cs @@ -3,7 +3,7 @@ namespace BossMod.Stormblood.Hunt.RankS.Orghana; public enum OID : uint { Boss = 0x1AB3, // R=5.04 -}; +} public enum AID : uint { @@ -13,7 +13,7 @@ public enum AID : uint TremblingEpigraph2 = 8001, // Boss->self, no cast, range 40 circle FlaringEpigraph = 8002, // Boss->self, 5,0s cast, range 40 circle Epigraph = 7997, // Boss->self, 3,5s cast, range 50+R width 8 rect -}; +} class TremblingEpigraph : Components.RaidwideCast { diff --git a/BossMod/Modules/Stormblood/TreasureHunt/TheLostCanalsOfUznair/CanalIcebeast.cs b/BossMod/Modules/Stormblood/TreasureHunt/TheLostCanalsOfUznair/CanalIcebeast.cs index a5834d4db7..2ea4c430b2 100644 --- a/BossMod/Modules/Stormblood/TreasureHunt/TheLostCanalsOfUznair/CanalIcebeast.cs +++ b/BossMod/Modules/Stormblood/TreasureHunt/TheLostCanalsOfUznair/CanalIcebeast.cs @@ -7,7 +7,7 @@ public enum OID : uint BossAdd1 = 0x1F0E, // R1.560 BossAdd2 = 0x1F0F, // R1.600 BonusAdd_Abharamu = 0x1EBF, // R3.420 -}; +} public enum AID : uint { @@ -25,7 +25,7 @@ public enum AID : uint RaucousScritch = 8598, // BonusAdd_Abharamu->self, 2,5s cast, range 5+R 120-degree cone Hurl = 5352, // BonusAdd_Abharamu->location, 3,0s cast, range 6 circle Telega = 9630, // BonusAdds->self, no cast, single-target, bonus adds disappear -}; +} class Eyeshine : Components.CastGaze { diff --git a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarAiravata.cs b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarAiravata.cs index 7ca701476b..3b35b053f2 100644 --- a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarAiravata.cs +++ b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarAiravata.cs @@ -6,7 +6,7 @@ public enum OID : uint BonusAdd_AltarMatanga = 0x2545, // R3.420 BonusAdd_GoldWhisker = 0x2544, // R0.540 BossHelper = 0x233C, -}; +} public enum AID : uint { @@ -23,12 +23,12 @@ public enum AID : uint RaucousScritch = 8598, // BonusAdd_AltarMatanga->self, 2,5s cast, range 5+R 120-degree cone Hurl = 5352, // BonusAdd_AltarMatanga->location, 3,0s cast, range 6 circle Telega = 9630, // BonusAdds->self, no cast, single-target, bonus adds disappear -}; +} public enum IconID : uint { BuffetTarget = 23, // player -}; +} class HurlBoss : Components.LocationTargetedAOEs { diff --git a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarArachne.cs b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarArachne.cs index 1873b3aa62..8351d148dd 100644 --- a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarArachne.cs +++ b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarArachne.cs @@ -8,7 +8,7 @@ public enum OID : uint BossHelper = 0x233C, BonusAdd_AltarMatanga = 0x2545, // R3.420 BonusAdd_GoldWhisker = 0x2544, // R0.540 -}; +} public enum AID : uint { @@ -26,7 +26,7 @@ public enum AID : uint RaucousScritch = 8598, // BonusAdd_AltarMatanga->self, 2,5s cast, range 5+R 120-degree cone Hurl = 5352, // BonusAdd_AltarMatanga->location, 3,0s cast, range 6 circle Telega = 9630, // BonusAdds->self, no cast, single-target, bonus adds disappear -}; +} class DarkSpike : Components.SingleTargetDelayableCast { diff --git a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarBeast.cs b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarBeast.cs index b128d3f7a0..6764813142 100644 --- a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarBeast.cs +++ b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarBeast.cs @@ -11,7 +11,7 @@ public enum OID : uint AltarOnion = 0x2546, // R0,840, icon 1, needs to be killed in order from 1 to 5 for maximum rewards AltarEgg = 0x2547, // R0,840, icon 2, needs to be killed in order from 1 to 5 for maximum rewards BonusAdd_AltarMatanga = 0x2545, // R3.420 -}; +} public enum AID : uint { @@ -35,7 +35,7 @@ public enum AID : uint Spin = 8599, // BonusAdd_AltarMatanga->self, no cast, range 6+R 120-degree cone RaucousScritch = 8598, // BonusAdd_AltarMatanga->self, 2,5s cast, range 5+R 120-degree cone Hurl = 5352, // BonusAdd_AltarMatanga->location, 3,0s cast, range 6 circle -}; +} class RustingClaw : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarChimera.cs b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarChimera.cs index 4b6cb9aa45..e5e84d4417 100644 --- a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarChimera.cs +++ b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarChimera.cs @@ -7,7 +7,7 @@ public enum OID : uint BossHelper = 0x233C, IceVoidzone = 0x1E8D9C, BonusAdd_AltarMatanga = 0x2545, // R3.420 -}; +} public enum AID : uint { @@ -26,12 +26,12 @@ public enum AID : uint RaucousScritch = 8598, // BonusAdd_AltarMatanga->self, 2,5s cast, range 5+R 120-degree cone Hurl = 5352, // BonusAdd_AltarMatanga->location, 3,0s cast, range 6 circle Telega = 9630, // bonusadds->self, no cast, single-target, bonus add disappear -}; +} public enum IconID : uint { Baitaway = 23, // player -}; +} class TheScorpionsSting : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarDiresaur.cs b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarDiresaur.cs index f42e0783d5..74736f181c 100644 --- a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarDiresaur.cs +++ b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarDiresaur.cs @@ -8,7 +8,7 @@ public enum OID : uint BonusAdd_AltarMatanga = 0x2545, // R3.420 BonusAdd_GoldWhisker = 0x2544, // R0.540 FireVoidzone = 0x1EA140, -}; +} public enum AID : uint { @@ -28,12 +28,12 @@ public enum AID : uint RaucousScritch = 8598, // BonusAdd_AltarMatanga->self, 2,5s cast, range 5+R 120-degree cone Hurl = 5352, // BonusAdd_AltarMatanga->location, 3,0s cast, range 6 circle Telega = 9630, // BonusAdds->self, no cast, single-target, bonus adds disappear -}; +} public enum IconID : uint { Baitaway = 23, // player -}; +} class DeadlyHold : Components.SingleTargetDelayableCast { diff --git a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarDullahan.cs b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarDullahan.cs index f96f9654d5..65a83852f3 100644 --- a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarDullahan.cs +++ b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarDullahan.cs @@ -11,7 +11,7 @@ public enum OID : uint AltarOnion = 0x2546, // R0,840, icon 1, needs to be killed in order from 1 to 5 for maximum rewards AltarEgg = 0x2547, // R0,840, icon 2, needs to be killed in order from 1 to 5 for maximum rewards BonusAdd_AltarMatanga = 0x2545, // R3.420 -}; +} public enum AID : uint { @@ -35,7 +35,7 @@ public enum AID : uint Hurl = 5352, // BonusAdd_AltarMatanga->location, 3,0s cast, range 6 circle Telega = 9630, // bonusadds->self, no cast, single-target, bonus add disappear -}; +} class IronJustice : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarKelpie.cs b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarKelpie.cs index 2315a537b1..b3422a1b3d 100644 --- a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarKelpie.cs +++ b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarKelpie.cs @@ -12,7 +12,7 @@ public enum OID : uint AltarTomato = 0x2549, // R0,840, icon 4, needs to be killed in order from 1 to 5 for maximum rewards AltarOnion = 0x2546, // R0,840, icon 1, needs to be killed in order from 1 to 5 for maximum rewards AltarEgg = 0x2547, // R0,840, icon 2, needs to be killed in order from 1 to 5 for maximum rewards -}; +} public enum AID : uint { @@ -35,7 +35,7 @@ public enum AID : uint Pollen = 6452, // AltarQueen->self, 3,5s cast, range 6+R circle HeirloomScream = 6451, // AltarTomato->self, 3,5s cast, range 6+R circle Telega = 9630, // BonusAdds->self, no cast, single-target, bonus adds disappear -}; +} class Innocence : Components.LocationTargetedAOEs { diff --git a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarMandragora.cs b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarMandragora.cs index 38cc2b03df..777fc9ca9c 100644 --- a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarMandragora.cs +++ b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarMandragora.cs @@ -10,7 +10,7 @@ public enum OID : uint AltarTomato = 0x2549, // R0,840, icon 4, needs to be killed in order from 1 to 5 for maximum rewards AltarOnion = 0x2546, // R0,840, icon 1, needs to be killed in order from 1 to 5 for maximum rewards AltarEgg = 0x2547, // R0,840, icon 2, needs to be killed in order from 1 to 5 for maximum rewards -}; +} public enum AID : uint { @@ -27,7 +27,7 @@ public enum AID : uint Pollen = 6452, // AltarQueen->self, 3,5s cast, range 6+R circle HeirloomScream = 6451, // AltarTomato->self, 3,5s cast, range 6+R circle Telega = 9630, // bonusadds->self, no cast, single-target, bonus add disappear -}; +} class OpticalIntrusion : Components.SingleTargetDelayableCast { diff --git a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarSkatene.cs b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarSkatene.cs index 84e94f147a..3d44b4f84c 100644 --- a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarSkatene.cs +++ b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarSkatene.cs @@ -5,7 +5,7 @@ public enum OID : uint Boss = 0x2535, //R=4.48 BossAdd = 0x255E, //R=0.9 BossHelper = 0x233C, -}; +} public enum AID : uint { @@ -15,7 +15,7 @@ public enum AID : uint Tornado = 13309, // Boss->location, 3,0s cast, range 6 circle VoidCall = 13312, // Boss->self, 3,5s cast, single-target Chirp = 13310, // Boss->self, 3,5s cast, range 8+R circle -}; +} class Chirp : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarTotem.cs b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarTotem.cs index c10aaea05c..be877c1720 100644 --- a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarTotem.cs +++ b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarTotem.cs @@ -7,7 +7,7 @@ public enum OID : uint BossHelper = 0x233C, FireVoidzone = 0x1EA8BB, BonusAdd_AltarMatanga = 0x2545, // R3.420 -}; +} public enum AID : uint { @@ -25,12 +25,12 @@ public enum AID : uint RaucousScritch = 8598, // BonusAdd_AltarMatanga->self, 2,5s cast, range 5+R 120-degree cone Hurl = 5352, // BonusAdd_AltarMatanga->location, 3,0s cast, range 6 circle Telega = 9630, // BonusAdds->self, no cast, single-target, bonus adds disappear -}; +} public enum IconID : uint { Baitaway = 23, // player -}; +} class FlurryOfRage : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/Hati.cs b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/Hati.cs index be74e7572c..3ce2a7c512 100644 --- a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/Hati.cs +++ b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/Hati.cs @@ -5,7 +5,7 @@ public enum OID : uint Boss = 0x2538, //R=5.4 BossAdd = 0x2569, //R=3.0 BossHelper = 0x233C, -}; +} public enum AID : uint { @@ -17,7 +17,7 @@ public enum AID : uint Netherwind = 13741, // BossAdd->self, 3,0s cast, range 15+R width 4 rect BrainFreeze = 13361, // Boss->self, 4,0s cast, range 10+R circle, turns player into Imp PolarRoar = 13360, // Boss->self, 3,0s cast, range 9-40 donut -}; +} class PolarRoar : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/TheGreatGoldWhisker.cs b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/TheGreatGoldWhisker.cs index e0c47e143f..f633f23d3d 100644 --- a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/TheGreatGoldWhisker.cs +++ b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/TheGreatGoldWhisker.cs @@ -5,7 +5,7 @@ public enum OID : uint Boss = 0x2541, //R=2.4 BossHelper = 0x233C, BonusAdd_GoldWhisker = 0x2544, // R0.540 -}; +} public enum AID : uint { @@ -14,7 +14,7 @@ public enum AID : uint Tingle = 13365, // Boss->self, 4,0s cast, range 10+R circle FishOutOfWater = 13366, // Boss->self, 3,0s cast, single-target Telega = 9630, // BonusAdd_GoldWhisker->self, no cast, single-target -}; +} class TripleTrident : Components.SingleTargetDelayableCast { diff --git a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/TheOlderOne.cs b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/TheOlderOne.cs index 43627ea4ba..bc5d77c819 100644 --- a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/TheOlderOne.cs +++ b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/TheOlderOne.cs @@ -15,7 +15,7 @@ public enum OID : uint AltarOnion = 0x2546, // R0,840, icon 1, needs to be killed in order from 1 to 5 for maximum rewards AltarEgg = 0x2547, // R0,840, icon 2, needs to be killed in order from 1 to 5 for maximum rewards BonusAdd_AltarMatanga = 0x2545, // R3.420 -}; +} public enum AID : uint { @@ -40,7 +40,7 @@ public enum AID : uint RaucousScritch = 8598, // BonusAdd_AltarMatanga->self, 2,5s cast, range 5+R 120-degree cone Hurl = 5352, // BonusAdd_AltarMatanga->location, 3,0s cast, range 6 circle Telega = 9630, // bonusadds->self, no cast, single-target, bonus add disappear -}; +} class MysticLight : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/TheWinged.cs b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/TheWinged.cs index 386e332ab6..4acd780e11 100644 --- a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/TheWinged.cs +++ b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/TheWinged.cs @@ -12,7 +12,7 @@ public enum OID : uint AltarEgg = 0x2547, // R0,840, icon 2, needs to be killed in order from 1 to 5 for maximum rewards BonusAdd_AltarMatanga = 0x2545, // R3.420 BonusAdd_GoldWhisker = 0x2544, // R0.540 -}; +} public enum AID : uint { @@ -35,7 +35,7 @@ public enum AID : uint RaucousScritch = 8598, // BonusAdd_AltarMatanga->self, 2,5s cast, range 5+R 120-degree cone Hurl = 5352, // BonusAdd_AltarMatanga->location, 3,0s cast, range 6 circle Telega = 9630, // BonusAdds->self, no cast, single-target, bonus adds disappear -}; +} class Filoplumes : Components.SelfTargetedAOEs { diff --git a/BossMod/Modules/Stormblood/Ultimate/UCOB/UCOBEnums.cs b/BossMod/Modules/Stormblood/Ultimate/UCOB/UCOBEnums.cs index b848bef5ce..2d83c9971d 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UCOB/UCOBEnums.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UCOB/UCOBEnums.cs @@ -29,7 +29,7 @@ public enum OID : uint //_Gen_Actor1e8536 = 0x1E8536, // R2.000, x1, EventObj type //_Gen_Exit = 0x1E850B, // R0.500, x1, EventObj type -}; +} public enum AID : uint { @@ -113,7 +113,7 @@ public enum AID : uint ExaflareRest = 9969, // Helper->self, no cast, range 6 circle Enrage = 9965, // BahamutPrime->player, 10.0s cast, range 4 circle, enrage spread EnrageAOE = 9966, // BahamutPrime->player, no cast, range 4 circle, enrage spread second+ casts -}; +} public enum SID : uint { @@ -122,13 +122,13 @@ public enum SID : uint Icebitten = 465, // Iceclaw->player, extra=0x0 Thunderstruck = 466, // none->player, extra=0x0 DownForTheCount = 783, // none->player, extra=0xEC7 -}; +} public enum TetherID : uint { Fireball = 5, // Firehorn->player TempestWing = 4, // player->BahamutPrime -}; +} public enum IconID : uint { @@ -140,4 +140,4 @@ public enum IconID : uint MegaflareDive = 41, // player TwistingDive = 42, // player LunarDive = 119, // player -}; +} diff --git a/BossMod/Modules/Stormblood/Ultimate/UWU/UWUEnums.cs b/BossMod/Modules/Stormblood/Ultimate/UWU/UWUEnums.cs index 73a04e9381..5bc6959d01 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UWU/UWUEnums.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UWU/UWUEnums.cs @@ -27,7 +27,7 @@ public enum OID : uint Helper = 0x233C, // R0.500, x14 ArenaFeatures = 0x1EA1A1, // R2.000, x8, EventObj type BeyondLimits = 0x1EA989, // R0.500, EventObj type, spawn during fight -}; +} public enum AID : uint { @@ -142,7 +142,7 @@ public enum AID : uint EnrageSequenceStart = 11148, // UltimaWeapon->self, no cast, single-target, visual EnrageSelectVictim = 11154, // Helper->player, no cast, single-target Sabik = 11155, // UltimaWeapon->self, no cast, range 50 circle ? (related to enrage) -}; +} public enum SID : uint { @@ -162,13 +162,13 @@ public enum SID : uint //BeyondLimits = 1530, // none->player, extra=0x0 //Woken = 1591, // none->Lahabrea, extra=0x0 //Doom = 210, // Lahabrea->player, extra=0x0 -}; +} public enum IconID : uint { MistralSong = 16, // player FlamingCrush = 117, // player -}; +} public enum TetherID : uint { @@ -176,4 +176,4 @@ public enum TetherID : uint //_Gen_Tether_17 = 17, // SpinyPlume->player //_Gen_Tether_9 = 9, // player->player //_Gen_Tether_1 = 1, // player->UltimaWeapon -}; +} diff --git a/BossMod/Modules/StrikingDummy.cs b/BossMod/Modules/StrikingDummy.cs index 0204881706..6db96c6154 100644 --- a/BossMod/Modules/StrikingDummy.cs +++ b/BossMod/Modules/StrikingDummy.cs @@ -4,7 +4,7 @@ namespace BossMod.StrikingDummy public enum OID : uint { Boss = 0x385, - }; + } class StrikingDummyStates : StateMachineBuilder { diff --git a/BossMod/Replay/Analysis/AbilityInfo.cs b/BossMod/Replay/Analysis/AbilityInfo.cs index ea787e9440..13114995ec 100644 --- a/BossMod/Replay/Analysis/AbilityInfo.cs +++ b/BossMod/Replay/Analysis/AbilityInfo.cs @@ -499,7 +499,7 @@ public void DrawContextMenu() var sb = new StringBuilder("public enum AID : uint\n{\n"); foreach (var (aid, data) in _data) sb.Append($" {EnumMemberString(aid, data)}\n"); - sb.Append("};\n"); + sb.Append("}\n"); ImGui.SetClipboardText(sb.ToString()); } diff --git a/BossMod/Replay/Analysis/IconInfo.cs b/BossMod/Replay/Analysis/IconInfo.cs index f313ea1a56..163928f6bb 100644 --- a/BossMod/Replay/Analysis/IconInfo.cs +++ b/BossMod/Replay/Analysis/IconInfo.cs @@ -53,7 +53,7 @@ public void DrawContextMenu() var sb = new StringBuilder("public enum IconID : uint\n{\n"); foreach (var (iid, data) in _data) sb.Append($" {EnumMemberString(iid, data)}\n"); - sb.Append("};\n"); + sb.Append("}\n"); ImGui.SetClipboardText(sb.ToString()); } diff --git a/BossMod/Replay/Analysis/StatusInfo.cs b/BossMod/Replay/Analysis/StatusInfo.cs index fa7dc26738..36d115ad0d 100644 --- a/BossMod/Replay/Analysis/StatusInfo.cs +++ b/BossMod/Replay/Analysis/StatusInfo.cs @@ -58,7 +58,7 @@ public void DrawContextMenu() var sb = new StringBuilder("public enum SID : uint\n{\n"); foreach (var (sid, data) in _data) sb.Append($" {EnumMemberString(sid, data)}\n"); - sb.Append("\n};\n"); + sb.Append("\n}\n"); ImGui.SetClipboardText(sb.ToString()); } diff --git a/BossMod/Replay/Analysis/TetherInfo.cs b/BossMod/Replay/Analysis/TetherInfo.cs index c35508bc8e..26f970a3e9 100644 --- a/BossMod/Replay/Analysis/TetherInfo.cs +++ b/BossMod/Replay/Analysis/TetherInfo.cs @@ -56,7 +56,7 @@ public void DrawContextMenu() var sb = new StringBuilder("public enum TetherID : uint\n{\n"); foreach (var (tid, data) in _data) sb.Append($" {EnumMemberString(tid, data)}\n"); - sb.Append("};\n"); + sb.Append("}\n"); ImGui.SetClipboardText(sb.ToString()); } From 5d06b5496b913819e645b73c466edbab4e8a7dca Mon Sep 17 00:00:00 2001 From: Andrew Gilewsky Date: Mon, 8 Apr 2024 00:15:36 +0100 Subject: [PATCH 04/18] Use primary constructors for trivial components. --- BossMod/BossModule/BossModule.cs | 5 +-- .../Endwalker/Alliance/A30Trash/A30Trash1.cs | 41 ++++--------------- .../Endwalker/Alliance/A30Trash/A30Trash2.cs | 29 +++---------- 3 files changed, 13 insertions(+), 62 deletions(-) diff --git a/BossMod/BossModule/BossModule.cs b/BossMod/BossModule/BossModule.cs index c85b272bea..d5396c5ed0 100644 --- a/BossMod/BossModule/BossModule.cs +++ b/BossMod/BossModule/BossModule.cs @@ -29,10 +29,7 @@ public IReadOnlyList Enemies(uint oid) var entry = _relevantEnemies.GetValueOrDefault(oid); if (entry == null) { - entry = new(); - foreach (var actor in WorldState.Actors.Where(actor => actor.OID == oid)) - entry.Add(actor); - _relevantEnemies[oid] = entry; + _relevantEnemies[oid] = entry = WorldState.Actors.Where(actor => actor.OID == oid).ToList(); } return entry; } diff --git a/BossMod/Modules/Endwalker/Alliance/A30Trash/A30Trash1.cs b/BossMod/Modules/Endwalker/Alliance/A30Trash/A30Trash1.cs index 33cd4fef7f..52cfeef21e 100644 --- a/BossMod/Modules/Endwalker/Alliance/A30Trash/A30Trash1.cs +++ b/BossMod/Modules/Endwalker/Alliance/A30Trash/A30Trash1.cs @@ -21,40 +21,13 @@ public enum AID : uint DivineBurst = 35441, // DivineSprite->self, no cast, range 40 circle, raidwide when Divine Sprite dies } -class WaterIII : Components.LocationTargetedAOEs -{ - public WaterIII() : base(ActionID.MakeSpell(AID.WaterIII), 8) { } -} - -class PelagicCleaver1 : Components.SelfTargetedAOEs -{ - public PelagicCleaver1() : base(ActionID.MakeSpell(AID.PelagicCleaver1), new AOEShapeCone(40, 30.Degrees())) { } -} - -class PelagicCleaver2 : Components.SelfTargetedAOEs -{ - public PelagicCleaver2() : base(ActionID.MakeSpell(AID.PelagicCleaver2), new AOEShapeCone(40, 30.Degrees())) { } -} - -class PelagicCleaver1InterruptHint : Components.CastInterruptHint -{ - public PelagicCleaver1InterruptHint() : base(ActionID.MakeSpell(AID.PelagicCleaver1)) { } -} - -class PelagicCleaver2InterruptHint : Components.CastInterruptHint -{ - public PelagicCleaver2InterruptHint() : base(ActionID.MakeSpell(AID.PelagicCleaver2)) { } -} - -class WaterFlood : Components.SelfTargetedAOEs -{ - public WaterFlood() : base(ActionID.MakeSpell(AID.WaterFlood), new AOEShapeCircle(6)) { } -} - -class DivineFlood : Components.SelfTargetedAOEs -{ - public DivineFlood() : base(ActionID.MakeSpell(AID.DivineFlood), new AOEShapeCircle(6)) { } -} +class WaterIII() : Components.LocationTargetedAOEs(ActionID.MakeSpell(AID.WaterIII), 8); +class PelagicCleaver1() : Components.SelfTargetedAOEs(ActionID.MakeSpell(AID.PelagicCleaver1), new AOEShapeCone(40, 30.Degrees())); +class PelagicCleaver2() : Components.SelfTargetedAOEs(ActionID.MakeSpell(AID.PelagicCleaver2), new AOEShapeCone(40, 30.Degrees())); +class PelagicCleaver1InterruptHint() : Components.CastInterruptHint(ActionID.MakeSpell(AID.PelagicCleaver1)); +class PelagicCleaver2InterruptHint() : Components.CastInterruptHint(ActionID.MakeSpell(AID.PelagicCleaver2)); +class WaterFlood() : Components.SelfTargetedAOEs(ActionID.MakeSpell(AID.WaterFlood), new AOEShapeCircle(6)); +class DivineFlood() : Components.SelfTargetedAOEs(ActionID.MakeSpell(AID.DivineFlood), new AOEShapeCircle(6)); public class A30Trash1States : StateMachineBuilder { diff --git a/BossMod/Modules/Endwalker/Alliance/A30Trash/A30Trash2.cs b/BossMod/Modules/Endwalker/Alliance/A30Trash/A30Trash2.cs index 01d04820d0..726b22fb3a 100644 --- a/BossMod/Modules/Endwalker/Alliance/A30Trash/A30Trash2.cs +++ b/BossMod/Modules/Endwalker/Alliance/A30Trash/A30Trash2.cs @@ -16,30 +16,11 @@ public enum AID : uint Skylight = 35446, // AngelosMikros->self, 3.0s cast, range 6 circle } -class RingOfSkylight : Components.SelfTargetedAOEs -{ - public RingOfSkylight() : base(ActionID.MakeSpell(AID.RingOfSkylight), new AOEShapeDonut(8, 30)) { } -} - -class RingOfSkylightInterruptHint : Components.CastInterruptHint -{ - public RingOfSkylightInterruptHint() : base(ActionID.MakeSpell(AID.RingOfSkylight)) { } -} - -class SkylightCross : Components.SelfTargetedAOEs -{ - public SkylightCross() : base(ActionID.MakeSpell(AID.SkylightCross), new AOEShapeCross(60, 4)) { } -} - -class SkylightCrossInterruptHint : Components.CastInterruptHint -{ - public SkylightCrossInterruptHint() : base(ActionID.MakeSpell(AID.SkylightCross)) { } -} - -class Skylight : Components.SelfTargetedAOEs -{ - public Skylight() : base(ActionID.MakeSpell(AID.Skylight), new AOEShapeCircle(6)) { } -} +class RingOfSkylight() : Components.SelfTargetedAOEs(ActionID.MakeSpell(AID.RingOfSkylight), new AOEShapeDonut(8, 30)); +class RingOfSkylightInterruptHint() : Components.CastInterruptHint(ActionID.MakeSpell(AID.RingOfSkylight)); +class SkylightCross() : Components.SelfTargetedAOEs(ActionID.MakeSpell(AID.SkylightCross), new AOEShapeCross(60, 4)); +class SkylightCrossInterruptHint() : Components.CastInterruptHint(ActionID.MakeSpell(AID.SkylightCross)); +class Skylight() : Components.SelfTargetedAOEs(ActionID.MakeSpell(AID.Skylight), new AOEShapeCircle(6)); public class A30Trash2Pack1States : StateMachineBuilder { From c93d4d85318ee1e57c21dd2c84d6e119fcf56c5f Mon Sep 17 00:00:00 2001 From: Andrew Gilewsky Date: Mon, 8 Apr 2024 01:12:31 +0100 Subject: [PATCH 05/18] Trying to get rid of activator. --- BossMod/BossModule/BossModule.cs | 2 +- BossMod/Modules/ModuleRegistry.cs | 12 +++--- BossMod/Util/New.cs | 61 +++++++++++++++++++++++++++++++ 3 files changed, 69 insertions(+), 6 deletions(-) create mode 100644 BossMod/Util/New.cs diff --git a/BossMod/BossModule/BossModule.cs b/BossMod/BossModule/BossModule.cs index d5396c5ed0..43242dd5e5 100644 --- a/BossMod/BossModule/BossModule.cs +++ b/BossMod/BossModule/BossModule.cs @@ -88,7 +88,7 @@ public BossModule(WorldState ws, Actor primary, ArenaBounds bounds) Arena = new(WindowConfig, bounds); Info = ModuleRegistry.FindByOID(primary.OID); - StateMachine = Info?.StatesType != null ? ((StateMachineBuilder)Activator.CreateInstance(Info.StatesType, this)!).Build() : new(new()); + StateMachine = Info != null ? ((StateMachineBuilder)Activator.CreateInstance(Info.StatesType, this)!).Build() : new(new()); if (Info?.CooldownPlanningSupported ?? false) { PlanConfig = Service.Config.Get(Info.ConfigType!); diff --git a/BossMod/Modules/ModuleRegistry.cs b/BossMod/Modules/ModuleRegistry.cs index 9dcaac03fc..91092dc661 100644 --- a/BossMod/Modules/ModuleRegistry.cs +++ b/BossMod/Modules/ModuleRegistry.cs @@ -15,6 +15,7 @@ public class Info public Type? TetherIDType; public Type? IconIDType; public uint PrimaryActorOID; + public Func ModuleFactory; public BossModuleInfo.Maturity Maturity; public string Contributors = ""; @@ -160,6 +161,7 @@ private Info(Type moduleType, Type statesType) { ModuleType = moduleType; StatesType = statesType; + ModuleFactory = New.ConstructorDerived(moduleType); } } @@ -183,15 +185,15 @@ static ModuleRegistry() public static Info? FindByOID(uint oid) => _modules.GetValueOrDefault(oid); - public static BossModule? CreateModule(Type? type, WorldState ws, Actor primary) + public static BossModule? CreateModule(Info? info, WorldState ws, Actor primary) { - return type != null ? (BossModule?)Activator.CreateInstance(type, ws, primary) : null; + return info != null ? info.ModuleFactory(ws, primary) : null; } public static BossModule? CreateModuleForActor(WorldState ws, Actor primary, BossModuleInfo.Maturity minMaturity) { var info = primary.Type is ActorType.Enemy or ActorType.EventObj ? FindByOID(primary.OID) : null; - return info?.Maturity >= minMaturity ? CreateModule(info.ModuleType, ws, primary) : null; + return info?.Maturity >= minMaturity ? CreateModule(info, ws, primary) : null; } // TODO: this is a hack... @@ -199,13 +201,13 @@ static ModuleRegistry() { foreach (var i in _modules.Values) if (i.ConfigType == cfg) - return CreateModule(i.ModuleType, new(TimeSpan.TicksPerSecond, "fake"), new(0, i.PrimaryActorOID, -1, "", 0, ActorType.None, Class.None, 0, new())); + return CreateModule(i, new(TimeSpan.TicksPerSecond, "fake"), new(0, i.PrimaryActorOID, -1, "", 0, ActorType.None, Class.None, 0, new())); return null; } // TODO: this is a hack... public static BossModule? CreateModuleForTimeline(uint oid) { - return CreateModule(FindByOID(oid)?.ModuleType, new(TimeSpan.TicksPerSecond, "fake"), new(0, oid, -1, "", 0, ActorType.None, Class.None, 0, new())); + return CreateModule(FindByOID(oid), new(TimeSpan.TicksPerSecond, "fake"), new(0, oid, -1, "", 0, ActorType.None, Class.None, 0, new())); } } diff --git a/BossMod/Util/New.cs b/BossMod/Util/New.cs new file mode 100644 index 0000000000..56428d5bd3 --- /dev/null +++ b/BossMod/Util/New.cs @@ -0,0 +1,61 @@ +using System.Linq.Expressions; + +namespace BossMod; + +// utility for invoking parametrized constructors in generic context +public static class New +{ + private static readonly Type TypeOfT = typeof(T); + + public static T Create() => Build.Instantiate(); + public static T Create(Arg1 arg1) => Build.Instantiate(arg1); + public static T Create(Arg1 arg1, Arg2 arg2) => Build.Instantiate(arg1, arg2); + + public static Func Constructor() => Build.Constructor; + public static Func Constructor() => Build.Constructor; + public static Func Construct() => Build.Constructor; + + public static Func ConstructorDerived(Type derived) => Build.CreateConstructor(derived); + public static Func ConstructorDerived(Type derived) => Build.CreateConstructor(derived); + public static Func ConstructorDerived(Type derived) => Build.CreateConstructor(derived); + + private static class Build + { + public static readonly Func Constructor = CreateConstructor(TypeOfT); + public static T Instantiate() => Constructor.Invoke(); + + public static Func CreateConstructor(Type builtType) => Expression.Lambda>(Expression.New(builtType)).Compile(); + } + + private static class Build + { + public static readonly Func Constructor = CreateConstructor(TypeOfT); + public static T Instantiate(Arg1 arg) => Constructor.Invoke(arg); + + public static Func CreateConstructor(Type builtType) + { + var (expression, param) = CreateExpressions(builtType, typeof(Arg1)); + return Expression.Lambda>(expression, param).Compile(); + } + } + + private static class Build + { + public static Func Constructor = CreateConstructor(TypeOfT); + public static T Instantiate(Arg1 arg1, Arg2 arg2) => Constructor.Invoke(arg1, arg2); + + public static Func CreateConstructor(Type builtType) + { + var (expression, param) = CreateExpressions(builtType, typeof(Arg1), typeof(Arg2)); + return Expression.Lambda>(expression, param).Compile(); + } + } + + private static (NewExpression, ParameterExpression[]) CreateExpressions(Type builtType, params Type[] argsTypes) + { + var constructorInfo = builtType.GetConstructor(argsTypes) ?? throw new Exception($"{builtType} is not constructible from ({string.Join(", ", argsTypes.Select(t => t))})"); + var constructorParameters = argsTypes.Select(Expression.Parameter).ToArray(); + var expression = Expression.New(constructorInfo, constructorParameters); + return (expression, constructorParameters); + } +} From 02b89725b5cbfe02bd4d082b8f8f49c150ee81f8 Mon Sep 17 00:00:00 2001 From: Andrew Gilewsky Date: Mon, 8 Apr 2024 16:04:56 +0100 Subject: [PATCH 06/18] Component refactor WIP: common components. --- BossMod/BossModule/BossComponent.cs | 58 ++++--- BossMod/Components/Adds.cs | 18 +-- BossMod/Components/BaitAway.cs | 152 +++++++----------- BossMod/Components/CastCounter.cs | 11 +- BossMod/Components/CastHint.cs | 42 +++-- BossMod/Components/Chains.cs | 35 ++--- BossMod/Components/ChasingAOEs.cs | 84 ++++------ BossMod/Components/Cleave.cs | 38 ++--- BossMod/Components/ConcentricAOEs.cs | 11 +- BossMod/Components/DirectionalParry.cs | 36 ++--- BossMod/Components/Exaflare.cs | 26 ++-- BossMod/Components/ForcedMarch.cs | 48 +++--- BossMod/Components/Gaze.cs | 73 ++++----- BossMod/Components/GenericAOEs.cs | 159 ++++++------------- BossMod/Components/Knockback.cs | 94 +++++------ BossMod/Components/LineOfSightAOE.cs | 48 +++--- BossMod/Components/PersistentVoidzone.cs | 89 ++++------- BossMod/Components/Protean.cs | 34 ++-- BossMod/Components/RotatingAOE.cs | 6 +- BossMod/Components/SharedTankbuster.cs | 42 ++--- BossMod/Components/StackSpread.cs | 189 ++++++++--------------- BossMod/Components/StayMove.cs | 8 +- BossMod/Components/TankbusterTether.cs | 56 +++---- BossMod/Components/Towers.cs | 56 ++----- BossMod/Components/Twister.cs | 56 +++---- BossMod/Components/UnavoidableDamage.cs | 100 ++++-------- BossMod/Components/WildCharge.cs | 29 ++-- BossMod/Data/WorldState.cs | 1 + TODO | 1 + 29 files changed, 606 insertions(+), 994 deletions(-) diff --git a/BossMod/BossModule/BossComponent.cs b/BossMod/BossModule/BossComponent.cs index f58746996e..1f0f601156 100644 --- a/BossMod/BossModule/BossComponent.cs +++ b/BossMod/BossModule/BossComponent.cs @@ -5,6 +5,8 @@ // components can also have sub-components; typically these are created immediately by constructor public class BossComponent { + public readonly BossModule Module; + // list of actor-specific hints (string + whether this is a "risk" type of hint) public class TextHints : List<(string, bool)> { @@ -32,30 +34,38 @@ public enum PlayerPriority public bool KeepOnPhaseChange; // by default, all components are deactivated on phase change automatically (since phase change can happen at any time) - setting this to true prevents this - public virtual void Init(BossModule module) { } // called at activation - public virtual void Update(BossModule module) { } // called every frame - it is a good place to update any cached values - public virtual void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) { } // gather any relevant pieces of advice for specified raid member - public virtual void AddGlobalHints(BossModule module, GlobalHints hints) { } // gather any relevant pieces of advice for whole raid - public virtual void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { } // gather AI hints for specified raid member - public virtual PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) => PlayerPriority.Irrelevant; // determine how particular party member should be drawn; if custom color is left untouched, standard color is selected - public virtual void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) { } // called at the beginning of arena draw, good place to draw aoe zones - public virtual void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) { } // called after arena background and borders are drawn, good place to draw actors, tethers, etc. + public BossComponent(BossModule module) => Module = module; + + public virtual void Update() { } // called every frame - it is a good place to update any cached values + public virtual void AddHints(int slot, Actor actor, TextHints hints) { } // gather any relevant pieces of advice for specified raid member + public virtual void AddMovementHints(int slot, Actor actor, MovementHints movementHints) { } // gather movement hints for specified raid member + public virtual void AddGlobalHints(GlobalHints hints) { } // gather any relevant pieces of advice for whole raid + public virtual void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { } // gather AI hints for specified raid member + public virtual PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) => PlayerPriority.Irrelevant; // determine how particular party member should be drawn; if custom color is left untouched, standard color is selected + public virtual void DrawArenaBackground(int pcSlot, Actor pc) { } // called at the beginning of arena draw, good place to draw aoe zones + public virtual void DrawArenaForeground(int pcSlot, Actor pc) { } // called after arena background and borders are drawn, good place to draw actors, tethers, etc. // world state event handlers - public virtual void OnActorCreated(BossModule module, Actor actor) { } - public virtual void OnActorDestroyed(BossModule module, Actor actor) { } - public virtual void OnStatusGain(BossModule module, Actor actor, ActorStatus status) { } // note: also called for status-change events; if component needs to distinguish between lose+gain and change, it can use the fact that 'lose' is not called for change - public virtual void OnStatusLose(BossModule module, Actor actor, ActorStatus status) { } - public virtual void OnTethered(BossModule module, Actor source, ActorTetherInfo tether) { } - public virtual void OnUntethered(BossModule module, Actor source, ActorTetherInfo tether) { } - public virtual void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) { } // note: action is always a spell; not called for player spells - public virtual void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) { } // note: action is always a spell; not called for player spells - public virtual void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) { } // note: action is always a spell; not called for player spells - public virtual void OnEventIcon(BossModule module, Actor actor, uint iconID) { } - public virtual void OnActorEState(BossModule module, Actor actor, ushort state) { } - public virtual void OnActorEAnim(BossModule module, Actor actor, uint state) { } - public virtual void OnActorPlayActionTimelineEvent(BossModule module, Actor actor, ushort id) { } - public virtual void OnActorNpcYell(BossModule module, Actor actor, ushort id) { } - public virtual void OnActorModelStateChange(BossModule module, Actor actor, byte modelState, byte animState1, byte animState2) { } - public virtual void OnEventEnvControl(BossModule module, byte index, uint state) { } + public virtual void OnActorCreated(Actor actor) { } + public virtual void OnActorDestroyed(Actor actor) { } + public virtual void OnStatusGain(Actor actor, ActorStatus status) { } // note: also called for status-change events; if component needs to distinguish between lose+gain and change, it can use the fact that 'lose' is not called for change + public virtual void OnStatusLose(Actor actor, ActorStatus status) { } + public virtual void OnTethered(Actor source, ActorTetherInfo tether) { } + public virtual void OnUntethered(Actor source, ActorTetherInfo tether) { } + public virtual void OnCastStarted(Actor caster, ActorCastInfo spell) { } // note: action is always a spell; not called for player spells + public virtual void OnCastFinished(Actor caster, ActorCastInfo spell) { } // note: action is always a spell; not called for player spells + public virtual void OnEventCast(Actor caster, ActorCastEvent spell) { } // note: action is always a spell; not called for player spells + public virtual void OnEventIcon(Actor actor, uint iconID) { } + public virtual void OnActorEState(Actor actor, ushort state) { } + public virtual void OnActorEAnim(Actor actor, uint state) { } + public virtual void OnActorPlayActionTimelineEvent(Actor actor, ushort id) { } + public virtual void OnActorNpcYell(Actor actor, ushort id) { } + public virtual void OnActorModelStateChange(Actor actor, byte modelState, byte animState1, byte animState2) { } + public virtual void OnEventEnvControl(byte index, uint state) { } + + // some commonly used shortcuts + protected MiniArena Arena => Module.Arena; + protected WorldState WorldState => Module.WorldState; + protected PartyState Raid => Module.Raid; + protected void ReportError(string message) => Module.ReportError(this, message); } diff --git a/BossMod/Components/Adds.cs b/BossMod/Components/Adds.cs index 92e885725c..944ba97c5c 100644 --- a/BossMod/Components/Adds.cs +++ b/BossMod/Components/Adds.cs @@ -3,24 +3,16 @@ // generic component used for drawing adds public class Adds : BossComponent { - private uint _actorOID; - private IReadOnlyList _actors = ActorEnumeration.EmptyList; - - public IReadOnlyList Actors => _actors; + public readonly IReadOnlyList Actors; public IEnumerable ActiveActors => Actors.Where(a => a.IsTargetable && !a.IsDead); - public Adds(uint actorOID) - { - _actorOID = actorOID; - } - - public override void Init(BossModule module) + public Adds(BossModule module, uint oid) : base(module) { - _actors = module.Enemies(_actorOID); + Actors = module.Enemies(oid); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - arena.Actors(_actors, ArenaColor.Enemy); + Arena.Actors(Actors, ArenaColor.Enemy); } } diff --git a/BossMod/Components/BaitAway.cs b/BossMod/Components/BaitAway.cs index 5a82275558..a4b2869baf 100644 --- a/BossMod/Components/BaitAway.cs +++ b/BossMod/Components/BaitAway.cs @@ -3,7 +3,7 @@ // generic component for mechanics that require baiting some aoe (by proximity, by tether, etc) away from raid // some players can be marked as 'forbidden' - if any of them is baiting, they are warned // otherwise we show own bait as as outline (and warn if player is clipping someone) and other baits as filled (and warn if player is being clipped) -public class GenericBaitAway : CastCounter +public class GenericBaitAway(BossModule module, ActionID aid = default, bool alwaysDrawOtherBaits = true, bool centerAtTarget = false) : CastCounter(module, aid) { public struct Bait { @@ -23,29 +23,23 @@ public Bait(Actor source, Actor target, AOEShape shape, DateTime activation = de } } - public bool AlwaysDrawOtherBaits; // if false, other baits are drawn only if they are clipping a player - public bool CenterAtTarget; // if true, aoe source is at target + public bool AlwaysDrawOtherBaits = alwaysDrawOtherBaits; // if false, other baits are drawn only if they are clipping a player + public bool CenterAtTarget = centerAtTarget; // if true, aoe source is at target public bool AllowDeadTargets = true; // if false, baits with dead targets are ignored public bool EnableHints = true; public bool IgnoreOtherBaits = false; // if true, don't show hints/aoes for baits by others public PlayerPriority BaiterPriority = PlayerPriority.Interesting; public BitMask ForbiddenPlayers; // these players should avoid baiting - public List CurrentBaits = new(); + public readonly List CurrentBaits = new(); public IEnumerable ActiveBaits => AllowDeadTargets ? CurrentBaits : CurrentBaits.Where(b => !b.Target.IsDead); public IEnumerable ActiveBaitsOn(Actor target) => ActiveBaits.Where(b => b.Target == target); public IEnumerable ActiveBaitsNotOn(Actor target) => ActiveBaits.Where(b => b.Target != target); public WPos BaitOrigin(Bait bait) => (CenterAtTarget ? bait.Target : bait.Source).Position; public bool IsClippedBy(Actor actor, Bait bait) => bait.Shape.Check(actor.Position, BaitOrigin(bait), bait.Rotation); - public IEnumerable PlayersClippedBy(BossModule module, Bait bait) => module.Raid.WithoutSlot().Exclude(bait.Target).InShape(bait.Shape, BaitOrigin(bait), bait.Rotation); + public IEnumerable PlayersClippedBy(Bait bait) => Raid.WithoutSlot().Exclude(bait.Target).InShape(bait.Shape, BaitOrigin(bait), bait.Rotation); - public GenericBaitAway(ActionID aid = default, bool alwaysDrawOtherBaits = true, bool centerAtTarget = false) : base(aid) - { - AlwaysDrawOtherBaits = alwaysDrawOtherBaits; - CenterAtTarget = centerAtTarget; - } - - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (!EnableHints) return; @@ -57,7 +51,7 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } else { - if (ActiveBaitsOn(actor).Any(b => PlayersClippedBy(module, b).Any())) + if (ActiveBaitsOn(actor).Any(b => PlayersClippedBy(b).Any())) hints.Add("Bait away from raid!"); } @@ -65,94 +59,76 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint hints.Add("GTFO from baited aoe!"); } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { foreach (var b in ActiveBaitsNotOn(actor)) hints.AddForbiddenZone(b.Shape, BaitOrigin(b), b.Rotation, b.Activation); //TODO: AI hints for when actor is the target } - public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) - { - return ActiveBaitsOn(player).Any() ? BaiterPriority : PlayerPriority.Irrelevant; - } + public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) => ActiveBaitsOn(player).Any() ? BaiterPriority : PlayerPriority.Irrelevant; - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { if (!IgnoreOtherBaits) foreach (var bait in ActiveBaitsNotOn(pc)) if (AlwaysDrawOtherBaits || IsClippedBy(pc, bait)) - bait.Shape.Draw(arena, BaitOrigin(bait), bait.Rotation); + bait.Shape.Draw(Arena, BaitOrigin(bait), bait.Rotation); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (var bait in ActiveBaitsOn(pc)) { - bait.Shape.Outline(arena, BaitOrigin(bait), bait.Rotation); + bait.Shape.Outline(Arena, BaitOrigin(bait), bait.Rotation); } } } -// bait on all players, requiring everyone to spread out, by default originating from primary actor +// bait on all players, requiring everyone to spread out public class BaitAwayEveryone : GenericBaitAway { - public AOEShape Shape; - - public BaitAwayEveryone(AOEShape shape, ActionID aid = default) : base(aid) + public BaitAwayEveryone(BossModule module, Actor? source, AOEShape shape, ActionID aid = default) : base(module, aid) { - Shape = shape; AllowDeadTargets = false; - } - - public override void Init(BossModule module) => SetSource(module, module.PrimaryActor); - - public void SetSource(BossModule module, Actor source) - { - CurrentBaits.Clear(); - CurrentBaits.AddRange(module.Raid.WithoutSlot(true).Select(p => new Bait(source, p, Shape))); + if (source != null) + CurrentBaits.AddRange(Raid.WithoutSlot(true).Select(p => new Bait(source, p, shape))); } } // component for mechanics requiring tether targets to bait their aoe away from raid -public class BaitAwayTethers : GenericBaitAway +public class BaitAwayTethers(BossModule module, AOEShape shape, uint tetherID, ActionID aid = default) : GenericBaitAway(module, aid) { + public AOEShape Shape = shape; + public uint TID = tetherID; public bool DrawTethers = true; - public AOEShape Shape; - public uint TID; - - public BaitAwayTethers(AOEShape shape, uint tetherID, ActionID aid = default) : base(aid) - { - Shape = shape; - TID = tetherID; - } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - base.DrawArenaForeground(module, pcSlot, pc, arena); + base.DrawArenaForeground(pcSlot, pc); if (DrawTethers) { foreach (var b in ActiveBaits) { - if (arena.Config.ShowOutlinesAndShadows) - arena.AddLine(b.Source.Position, b.Target.Position, 0xFF000000, 2); - arena.AddLine(b.Source.Position, b.Target.Position, ArenaColor.Danger); + if (Arena.Config.ShowOutlinesAndShadows) + Arena.AddLine(b.Source.Position, b.Target.Position, 0xFF000000, 2); + Arena.AddLine(b.Source.Position, b.Target.Position, ArenaColor.Danger); } } } - public override void OnTethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnTethered(Actor source, ActorTetherInfo tether) { - var (player, enemy) = DetermineTetherSides(module, source, tether); + var (player, enemy) = DetermineTetherSides(source, tether); if (player != null && enemy != null) { CurrentBaits.Add(new(enemy, player, Shape)); } } - public override void OnUntethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnUntethered(Actor source, ActorTetherInfo tether) { - var (player, enemy) = DetermineTetherSides(module, source, tether); + var (player, enemy) = DetermineTetherSides(source, tether); if (player != null && enemy != null) { CurrentBaits.RemoveAll(b => b.Source == enemy && b.Target == player); @@ -160,19 +136,19 @@ public override void OnUntethered(BossModule module, Actor source, ActorTetherIn } // we support both player->enemy and enemy->player tethers - private (Actor? player, Actor? enemy) DetermineTetherSides(BossModule module, Actor source, ActorTetherInfo tether) + private (Actor? player, Actor? enemy) DetermineTetherSides(Actor source, ActorTetherInfo tether) { if (tether.ID != TID) return (null, null); - var target = module.WorldState.Actors.Find(tether.Target); + var target = WorldState.Actors.Find(tether.Target); if (target == null) return (null, null); var (player, enemy) = source.Type == ActorType.Player ? (source, target) : (target, source); if (player.Type != ActorType.Player || enemy.Type == ActorType.Player) { - module.ReportError(this, $"Unexpected tether pair: {source.InstanceID:X} -> {target.InstanceID:X}"); + ReportError($"Unexpected tether pair: {source.InstanceID:X} -> {target.InstanceID:X}"); return (null, null); } @@ -181,59 +157,47 @@ public override void OnUntethered(BossModule module, Actor source, ActorTetherIn } // component for mechanics requiring icon targets to bait their aoe away from raid -public class BaitAwayIcon : GenericBaitAway +public class BaitAwayIcon(BossModule module, AOEShape shape, uint iconID, ActionID aid = default, float activationDelay = 5.1f) : GenericBaitAway(module, aid) { - public AOEShape Shape; - public uint IID; - public float ActivationDelay; - - public virtual Actor? BaitSource(BossModule module, Actor target) => module.PrimaryActor; + public AOEShape Shape = shape; + public uint IID = iconID; + public float ActivationDelay = activationDelay; - public BaitAwayIcon(AOEShape shape, uint iconID, ActionID aid = default, float activationDelay = 5.1f) : base(aid) - { - Shape = shape; - IID = iconID; - ActivationDelay = activationDelay; - } + public virtual Actor? BaitSource(Actor target) => Module.PrimaryActor; - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { - if (iconID == IID && BaitSource(module, actor) is var source && source != null) - CurrentBaits.Add(new(source, actor, Shape, module.WorldState.CurrentTime.AddSeconds(ActivationDelay))); + if (iconID == IID && BaitSource(actor) is var source && source != null) + CurrentBaits.Add(new(source, actor, Shape, WorldState.FutureTime(ActivationDelay))); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { - base.OnEventCast(module, caster, spell); + base.OnEventCast(caster, spell); if (spell.Action == WatchedAction) CurrentBaits.Clear(); } } // component for mechanics requiring cast targets to gtfo from raid (aoe tankbusters etc) -public class BaitAwayCast : GenericBaitAway +public class BaitAwayCast(BossModule module, ActionID aid, AOEShape shape, bool centerAtTarget = false) : GenericBaitAway(module, aid, centerAtTarget: centerAtTarget) { - public AOEShape Shape; + public AOEShape Shape = shape; public bool EndsOnCastEvent; - public BaitAwayCast(ActionID aid, AOEShape shape, bool centerAtTarget = false) : base(aid, centerAtTarget: centerAtTarget) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { - Shape = shape; - } - - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) - { - if (spell.Action == WatchedAction && module.WorldState.Actors.Find(spell.TargetID) is var target && target != null) + if (spell.Action == WatchedAction && WorldState.Actors.Find(spell.TargetID) is var target && target != null) CurrentBaits.Add(new(caster, target, Shape, spell.NPCFinishAt)); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction && !EndsOnCastEvent) CurrentBaits.RemoveAll(b => b.Source == caster); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if (spell.Action == WatchedAction && EndsOnCastEvent) CurrentBaits.RemoveAll(b => b.Source == caster); @@ -241,28 +205,24 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } // a variation of BaitAwayCast for charges that end at target -public class BaitAwayChargeCast : GenericBaitAway +public class BaitAwayChargeCast(BossModule module, ActionID aid, float halfWidth) : GenericBaitAway(module, aid) { - public float HalfWidth; - - public BaitAwayChargeCast(ActionID aid, float halfWidth) : base(aid) - { - HalfWidth = halfWidth; - } + public float HalfWidth = halfWidth; - public override void Update(BossModule module) + public override void Update() { foreach (var b in CurrentBaits) - ((AOEShapeRect)b.Shape).LengthFront = (b.Target.Position - b.Source.Position).Length(); + if (b.Shape is AOEShapeRect shape) + shape.LengthFront = (b.Target.Position - b.Source.Position).Length(); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { - if (spell.Action == WatchedAction && module.WorldState.Actors.Find(spell.TargetID) is var target && target != null) + if (spell.Action == WatchedAction && WorldState.Actors.Find(spell.TargetID) is var target && target != null) CurrentBaits.Add(new(caster, target, new AOEShapeRect(0, HalfWidth), spell.NPCFinishAt)); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) CurrentBaits.RemoveAll(b => b.Source == caster); diff --git a/BossMod/Components/CastCounter.cs b/BossMod/Components/CastCounter.cs index a8ed3d2b94..eeb455f610 100644 --- a/BossMod/Components/CastCounter.cs +++ b/BossMod/Components/CastCounter.cs @@ -1,17 +1,12 @@ namespace BossMod.Components; // generic component that counts specified casts -public class CastCounter : BossComponent +public class CastCounter(BossModule module, ActionID aid) : BossComponent(module) { - public ActionID WatchedAction { get; private set; } + public ActionID WatchedAction { get; private set; } = aid; public int NumCasts { get; protected set; } = 0; - public CastCounter(ActionID aid) - { - WatchedAction = aid; - } - - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if (spell.Action == WatchedAction) ++NumCasts; diff --git a/BossMod/Components/CastHint.cs b/BossMod/Components/CastHint.cs index 62986838f4..3c7b9756da 100644 --- a/BossMod/Components/CastHint.cs +++ b/BossMod/Components/CastHint.cs @@ -1,36 +1,30 @@ namespace BossMod.Components; // generic component that is 'active' when any actor casts specific spell -public class CastHint : CastCounter +public class CastHint(BossModule module, ActionID aid, string hint, bool showCastTimeLeft = false) : CastCounter(module, aid) { - public string Hint; - public bool ShowCastTimeLeft; // if true, show cast time left until next instance - private List _casters = new(); - public IReadOnlyList Casters => _casters; - public bool Active => _casters.Count > 0; + public string Hint = hint; + public bool ShowCastTimeLeft = showCastTimeLeft; // if true, show cast time left until next instance + public readonly List Casters = new(); - public CastHint(ActionID action, string hint, bool showCastTimeLeft = false) : base(action) - { - Hint = hint; - ShowCastTimeLeft = showCastTimeLeft; - } + public bool Active => Casters.Count > 0; - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (Active && Hint.Length > 0) - hints.Add(ShowCastTimeLeft ? $"{Hint} {((Casters.First().CastInfo?.NPCFinishAt ?? module.WorldState.CurrentTime) - module.WorldState.CurrentTime).TotalSeconds:f1}s left" : Hint); + hints.Add(ShowCastTimeLeft ? $"{Hint} {((Casters.First().CastInfo?.NPCFinishAt ?? WorldState.CurrentTime) - WorldState.CurrentTime).TotalSeconds:f1}s left" : Hint); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) - _casters.Add(caster); + Casters.Add(caster); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) - _casters.Remove(caster); + Casters.Remove(caster); } } @@ -38,10 +32,10 @@ public class CastInterruptHint : CastHint { public bool CanBeInterrupted { get; init; } public bool CanBeStunned { get; init; } - public bool ShowNameInHint { get ; init; } // important if there are several targets + public bool ShowNameInHint { get; init; } // important if there are several targets public string HintExtra { get; init; } - public CastInterruptHint(ActionID aid, bool canBeInterrupted = true, bool canBeStunned = false, string hintExtra = "", bool showNameInHint = false) : base(aid, "") + public CastInterruptHint(BossModule module, ActionID aid, bool canBeInterrupted = true, bool canBeStunned = false, string hintExtra = "", bool showNameInHint = false) : base(module, aid, "") { CanBeInterrupted = canBeInterrupted; CanBeStunned = canBeStunned; @@ -50,7 +44,7 @@ public CastInterruptHint(ActionID aid, bool canBeInterrupted = true, bool canBeS UpdateHint(); } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { foreach (var c in Casters) { @@ -63,16 +57,16 @@ public override void AddAIHints(BossModule module, int slot, Actor actor, PartyR } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { - base.OnCastStarted(module, caster, spell); + base.OnCastStarted(caster, spell); if (ShowNameInHint && spell.Action == WatchedAction) UpdateHint(); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { - base.OnCastFinished(module, caster, spell); + base.OnCastFinished(caster, spell); if (ShowNameInHint && spell.Action == WatchedAction) UpdateHint(); } diff --git a/BossMod/Components/Chains.cs b/BossMod/Components/Chains.cs index 83be67809c..88d394d1f2 100644 --- a/BossMod/Components/Chains.cs +++ b/BossMod/Components/Chains.cs @@ -1,60 +1,55 @@ namespace BossMod.Components; // component for breakable chains -public class Chains : CastCounter +public class Chains(BossModule module, uint tetherID, ActionID aid = default) : CastCounter(module, aid) { - public uint TID { get; init; } + public uint TID { get; init; } = tetherID; public bool TethersAssigned { get; private set; } private Actor?[] _partner = new Actor?[PartyState.MaxAllianceSize]; - public Chains(uint tetherID, ActionID aid = default) : base(aid) - { - TID = tetherID; - } - - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_partner[slot] != null) hints.Add("Break the tether!"); } - public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) + public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) { return _partner[pcSlot] == player ? PlayerPriority.Danger : PlayerPriority.Irrelevant; } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (_partner[pcSlot] is var partner && partner != null) - arena.AddLine(pc.Position, partner.Position, ArenaColor.Danger); + Arena.AddLine(pc.Position, partner.Position, ArenaColor.Danger); } - public override void OnTethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnTethered(Actor source, ActorTetherInfo tether) { if (tether.ID == TID) { TethersAssigned = true; - var target = module.WorldState.Actors.Find(tether.Target); + var target = WorldState.Actors.Find(tether.Target); if (target != null) { - SetPartner(module, source.InstanceID, target); - SetPartner(module, target.InstanceID, source); + SetPartner(source.InstanceID, target); + SetPartner(target.InstanceID, source); } } } - public override void OnUntethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnUntethered(Actor source, ActorTetherInfo tether) { if (tether.ID == TID) { - SetPartner(module, source.InstanceID, null); - SetPartner(module, tether.Target, null); + SetPartner(source.InstanceID, null); + SetPartner(tether.Target, null); } } - private void SetPartner(BossModule module, ulong source, Actor? target) + private void SetPartner(ulong source, Actor? target) { - var slot = module.Raid.FindSlot(source); + var slot = Raid.FindSlot(source); if (slot >= 0) _partner[slot] = target; } diff --git a/BossMod/Components/ChasingAOEs.cs b/BossMod/Components/ChasingAOEs.cs index c059438dc6..e8e36125f4 100644 --- a/BossMod/Components/ChasingAOEs.cs +++ b/BossMod/Components/ChasingAOEs.cs @@ -1,28 +1,17 @@ namespace BossMod.Components; // generic 'chasing AOE' component - these are AOEs that follow the target for a set amount of casts -public class GenericChasingAOEs : GenericAOEs +public class GenericChasingAOEs(BossModule module, ActionID aid = default, string warningText = "GTFO from chasing aoe!") : GenericAOEs(module, aid, warningText) { - public class Chaser + public class Chaser(AOEShape shape, Actor target, WPos prevPos, float moveDist, int numRemaining, DateTime nextActivation, float secondsBetweenActivations) { - public AOEShape Shape; - public Actor Target; - public WPos PrevPos; - public float MoveDist; - public int NumRemaining; - public DateTime NextActivation; - public float SecondsBetweenActivations; - - public Chaser(AOEShape shape, Actor target, WPos prevPos, float moveDist, int numRemaining, DateTime nextActivation, float secondsBetweenActivations) - { - Shape = shape; - Target = target; - PrevPos = prevPos; - MoveDist = moveDist; - NumRemaining = numRemaining; - NextActivation = nextActivation; - SecondsBetweenActivations = secondsBetweenActivations; - } + public AOEShape Shape = shape; + public Actor Target = target; + public WPos PrevPos = prevPos; + public float MoveDist = moveDist; + public int NumRemaining = numRemaining; + public DateTime NextActivation = nextActivation; + public float SecondsBetweenActivations = secondsBetweenActivations; public WPos PredictedPosition() { @@ -34,9 +23,7 @@ public WPos PredictedPosition() public List Chasers = new(); - public GenericChasingAOEs(ActionID aid = default, string warningText = "GTFO from chasing aoe!") : base(aid, warningText) { } - - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { foreach (var c in Chasers) { @@ -46,10 +33,7 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, } } - public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) - { - return Chasers.Any(c => c.Target == player) ? PlayerPriority.Interesting : PlayerPriority.Irrelevant; - } + public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) => Chasers.Any(c => c.Target == player) ? PlayerPriority.Interesting : PlayerPriority.Irrelevant; // return false if chaser was not found public bool Advance(WPos pos, float moveDistance, DateTime currentTime, bool removeWhenFinished = true) @@ -74,47 +58,37 @@ public bool Advance(WPos pos, float moveDistance, DateTime currentTime, bool rem } // standard chasing aoe; first cast is long - assume it is baited on the nearest allowed target; successive casts are instant -public class StandardChasingAOEs : GenericChasingAOEs +public class StandardChasingAOEs(BossModule module, AOEShape shape, ActionID actionFirst, ActionID actionRest, float moveDistance, float secondsBetweenActivations, int maxCasts) : GenericChasingAOEs(module) { - public AOEShape Shape; - public ActionID ActionFirst; - public ActionID ActionRest; - public float MoveDistance; - public float SecondsBetweenActivations; - public int MaxCasts; + public AOEShape Shape = shape; + public ActionID ActionFirst = actionFirst; + public ActionID ActionRest = actionRest; + public float MoveDistance = moveDistance; + public float SecondsBetweenActivations = secondsBetweenActivations; + public int MaxCasts = maxCasts; public BitMask ExcludedTargets; // any targets in this mask aren't considered to be possible targets - public StandardChasingAOEs(AOEShape shape, ActionID actionFirst, ActionID actionRest, float moveDistance, float secondsBetweenActivations, int maxCasts) - { - Shape = shape; - ActionFirst = actionFirst; - ActionRest = actionRest; - MoveDistance = moveDistance; - SecondsBetweenActivations = secondsBetweenActivations; - MaxCasts = maxCasts; - } - - public override void Update(BossModule module) + public override void Update() { Chasers.RemoveAll(c => (c.Target.IsDestroyed || c.Target.IsDead) && c.NumRemaining < MaxCasts); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (var c in Chasers) { - if (arena.Config.ShowOutlinesAndShadows) - arena.AddLine(c.PrevPos, c.Target.Position, 0xFF000000, 2); - arena.AddLine(c.PrevPos, c.Target.Position, ArenaColor.Danger); + if (Arena.Config.ShowOutlinesAndShadows) + Arena.AddLine(c.PrevPos, c.Target.Position, 0xFF000000, 2); + Arena.AddLine(c.PrevPos, c.Target.Position, ArenaColor.Danger); } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if (spell.Action == ActionFirst) { - var pos = spell.TargetID == caster.InstanceID ? caster.Position : module.WorldState.Actors.Find(spell.TargetID)?.Position ?? spell.LocXZ; - var (slot, target) = module.Raid.WithSlot().ExcludedFromMask(ExcludedTargets).MinBy(ip => (ip.Item2.Position - pos).LengthSq()); + var pos = spell.TargetID == caster.InstanceID ? caster.Position : WorldState.Actors.Find(spell.TargetID)?.Position ?? spell.LocXZ; + var (slot, target) = Raid.WithSlot().ExcludedFromMask(ExcludedTargets).MinBy(ip => (ip.Item2.Position - pos).LengthSq()); if (target != null) { Chasers.Add(new(Shape, target, pos, 0, MaxCasts, spell.NPCFinishAt, SecondsBetweenActivations)); // initial cast does not move anywhere @@ -123,12 +97,12 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if (spell.Action == ActionFirst || spell.Action == ActionRest) { - var pos = spell.MainTargetID == caster.InstanceID ? caster.Position : module.WorldState.Actors.Find(spell.MainTargetID)?.Position ?? spell.TargetXZ; - Advance(pos, MoveDistance, module.WorldState.CurrentTime); + var pos = spell.MainTargetID == caster.InstanceID ? caster.Position : WorldState.Actors.Find(spell.MainTargetID)?.Position ?? spell.TargetXZ; + Advance(pos, MoveDistance, WorldState.CurrentTime); } } } diff --git a/BossMod/Components/Cleave.cs b/BossMod/Components/Cleave.cs index d1fb0a8946..5fcc52d377 100644 --- a/BossMod/Components/Cleave.cs +++ b/BossMod/Components/Cleave.cs @@ -3,40 +3,34 @@ // generic component for cleaving autoattacks; shows shape outline and warns when anyone other than main target is inside public class Cleave : CastCounter { - public AOEShape Shape { get; private init; } - public uint EnemyOID { get; private init; } - public bool ActiveForUntargetable { get; private init; } - public bool ActiveWhileCasting { get; private init; } - public bool OriginAtTarget { get; private init; } + public AOEShape Shape { get; init; } + public bool ActiveForUntargetable { get; init; } + public bool ActiveWhileCasting { get; init; } + public bool OriginAtTarget { get; init; } public DateTime NextExpected; - private IReadOnlyList _enemies = ActorEnumeration.EmptyList; + private readonly IReadOnlyList _enemies; // enemy OID == 0 means 'primary actor' - public Cleave(ActionID aid, AOEShape shape, uint enemyOID = 0, bool activeForUntargetable = false, bool originAtTarget = false, bool activeWhileCasting = true) : base(aid) + public Cleave(BossModule module, ActionID aid, AOEShape shape, uint enemyOID = 0, bool activeForUntargetable = false, bool originAtTarget = false, bool activeWhileCasting = true) : base(module, aid) { Shape = shape; - EnemyOID = enemyOID; ActiveForUntargetable = activeForUntargetable; ActiveWhileCasting = activeWhileCasting; OriginAtTarget = originAtTarget; + _enemies = module.Enemies(enemyOID != 0 ? enemyOID : module.PrimaryActor.OID); } - public override void Init(BossModule module) + public override void AddHints(int slot, Actor actor, TextHints hints) { - _enemies = module.Enemies(EnemyOID != 0 ? EnemyOID : module.PrimaryActor.OID); - } - - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) - { - if (OriginsAndTargets(module).Any(e => e.target != actor && Shape.Check(actor.Position, e.origin.Position, e.angle))) + if (OriginsAndTargets().Any(e => e.target != actor && Shape.Check(actor.Position, e.origin.Position, e.angle))) { hints.Add("GTFO from cleave!"); } } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { - foreach (var (origin, target, angle) in OriginsAndTargets(module)) + foreach (var (origin, target, angle) in OriginsAndTargets()) { if (actor != target) { @@ -45,15 +39,15 @@ public override void AddAIHints(BossModule module, int slot, Actor actor, PartyR } } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - foreach (var e in OriginsAndTargets(module)) + foreach (var e in OriginsAndTargets()) { - Shape.Outline(arena, e.origin.Position, e.angle); + Shape.Outline(Arena, e.origin.Position, e.angle); } } - private IEnumerable<(Actor origin, Actor target, Angle angle)> OriginsAndTargets(BossModule module) + private IEnumerable<(Actor origin, Actor target, Angle angle)> OriginsAndTargets() { foreach (var enemy in _enemies) { @@ -66,7 +60,7 @@ public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc if (!ActiveWhileCasting && enemy.CastInfo != null) continue; - var target = module.WorldState.Actors.Find(enemy.TargetID); + var target = WorldState.Actors.Find(enemy.TargetID); if (target != null) { yield return (OriginAtTarget ? target : enemy, target, Angle.FromDirection(target.Position - enemy.Position)); diff --git a/BossMod/Components/ConcentricAOEs.cs b/BossMod/Components/ConcentricAOEs.cs index e76cf067bf..67827779d3 100644 --- a/BossMod/Components/ConcentricAOEs.cs +++ b/BossMod/Components/ConcentricAOEs.cs @@ -1,7 +1,7 @@ namespace BossMod.Components; // generic 'concentric aoes' component - a sequence of aoes (typically cone then donuts) with same origin and increasing size -public class ConcentricAOEs : GenericAOEs +public class ConcentricAOEs(BossModule module, AOEShape[] shapes) : GenericAOEs(module) { public struct Sequence { @@ -11,15 +11,10 @@ public struct Sequence public int NumCastsDone; } - public AOEShape[] Shapes; + public AOEShape[] Shapes = shapes; public List Sequences = new(); - public ConcentricAOEs(AOEShape[] shapes) - { - Shapes = shapes; - } - - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => Sequences.Where(s => s.NumCastsDone < Shapes.Length).Select(s => new AOEInstance(Shapes[s.NumCastsDone], s.Origin, s.Rotation, s.NextActivation)); + public override IEnumerable ActiveAOEs(int slot, Actor actor) => Sequences.Where(s => s.NumCastsDone < Shapes.Length).Select(s => new AOEInstance(Shapes[s.NumCastsDone], s.Origin, s.Rotation, s.NextActivation)); public void AddSequence(WPos origin, DateTime activation = default, Angle rotation = default) => Sequences.Add(new() { Origin = origin, Rotation = rotation, NextActivation = activation }); diff --git a/BossMod/Components/DirectionalParry.cs b/BossMod/Components/DirectionalParry.cs index b5922bb0d4..be566c64c9 100644 --- a/BossMod/Components/DirectionalParry.cs +++ b/BossMod/Components/DirectionalParry.cs @@ -2,7 +2,7 @@ // generic 'directional parry' component that shows actors and sides it's forbidden to attack them from // uses common status + custom prediction -public class DirectionalParry : Adds +public class DirectionalParry(BossModule module, uint actorOID) : Adds(module, actorOID) { [Flags] public enum Side @@ -11,7 +11,7 @@ public enum Side Front = 0x1, Back = 0x2, Left = 0x4, - Right =0x8, + Right = 0x8, All = 0xF } @@ -20,9 +20,7 @@ public enum Side private Dictionary _actorStates = new(); // value == active-side | (imminent-side << 4) public bool Active => _actorStates.Values.Any(s => ActiveSides(s) != Side.None); - public DirectionalParry(uint actorOID) : base(actorOID) { } - - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { var target = Actors.FirstOrDefault(w => w.InstanceID == actor.TargetID); if (target != null && _actorStates.TryGetValue(actor.TargetID, out var targetState)) @@ -43,24 +41,24 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - base.DrawArenaForeground(module, pcSlot, pc, arena); + base.DrawArenaForeground(pcSlot, pc); foreach (var a in ActiveActors) { if (_actorStates.TryGetValue(a.InstanceID, out var aState)) { var active = ActiveSides(aState); var imminent = ImminentSides(aState); - DrawParry(arena, a, 0.Degrees(), active, imminent, Side.Front); - DrawParry(arena, a, 180.Degrees(), active, imminent, Side.Back); - DrawParry(arena, a, 90.Degrees(), active, imminent, Side.Left); - DrawParry(arena, a, 270.Degrees(), active, imminent, Side.Right); + DrawParry(a, 0.Degrees(), active, imminent, Side.Front); + DrawParry(a, 180.Degrees(), active, imminent, Side.Back); + DrawParry(a, 90.Degrees(), active, imminent, Side.Left); + DrawParry(a, 270.Degrees(), active, imminent, Side.Right); } } } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if (status.ID == ParrySID) { @@ -70,7 +68,7 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st } } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { if (status.ID == ParrySID) { @@ -83,19 +81,19 @@ public void PredictParrySide(ulong instanceID, Side sides) UpdateState(instanceID, ((int)sides << 4) | ActorState(instanceID) & 0xF); } - private void DrawParry(MiniArena arena, Actor actor, Angle offset, Side active, Side imminent, Side check) + private void DrawParry(Actor actor, Angle offset, Side active, Side imminent, Side check) { if (active.HasFlag(check)) - DrawParry(arena, actor, offset, ArenaColor.Enemy); + DrawParry(actor, offset, ArenaColor.Enemy); else if (imminent.HasFlag(check)) - DrawParry(arena, actor, offset, ArenaColor.Danger); + DrawParry(actor, offset, ArenaColor.Danger); } - private void DrawParry(MiniArena arena, Actor actor, Angle offset, uint color) + private void DrawParry(Actor actor, Angle offset, uint color) { var dir = actor.Rotation + offset; - arena.PathArcTo(actor.Position, 1.5f, (dir - 45.Degrees()).Rad, (dir + 45.Degrees()).Rad); - arena.PathStroke(false, color); + Arena.PathArcTo(actor.Position, 1.5f, (dir - 45.Degrees()).Rad, (dir + 45.Degrees()).Rad); + Arena.PathStroke(false, color); } private int ActorState(ulong instanceID) => _actorStates.GetValueOrDefault(instanceID, 0); diff --git a/BossMod/Components/Exaflare.cs b/BossMod/Components/Exaflare.cs index f2c8e7ddf9..2a40ee6ff3 100644 --- a/BossMod/Components/Exaflare.cs +++ b/BossMod/Components/Exaflare.cs @@ -1,7 +1,7 @@ namespace BossMod.Components; // generic 'exaflare' component - these mechanics are a bunch of moving aoes, with different lines either staggered or moving with different speed -public class Exaflare : GenericAOEs +public class Exaflare(BossModule module, AOEShape shape, ActionID aid = default) : GenericAOEs(module, aid, "GTFO from exaflare!") { public class Line { @@ -14,36 +14,32 @@ public class Line public int MaxShownExplosions; } - public AOEShape Shape { get; private init; } + public AOEShape Shape { get; init; } = shape; public uint ImminentColor = ArenaColor.Danger; public uint FutureColor = ArenaColor.AOE; protected List Lines = new(); public bool Active => Lines.Count > 0; - public Exaflare(AOEShape shape, ActionID watchedAction = new()) : base(watchedAction, "GTFO from exaflare!") - { - Shape = shape; - } - public Exaflare(float radius, ActionID watchedAction = new()) : this(new AOEShapeCircle(radius), watchedAction) { } + public Exaflare(BossModule module, float radius, ActionID aid = new()) : this(module, new AOEShapeCircle(radius), aid) { } - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { - foreach (var (c, t, r) in FutureAOEs(module.WorldState.CurrentTime)) - yield return new(Shape, c, r, activation: t, color: FutureColor); + foreach (var (c, t, r) in FutureAOEs()) + yield return new(Shape, c, r, t, FutureColor); foreach (var (c, t, r) in ImminentAOEs()) - yield return new(Shape, c, r, activation: t, color: ImminentColor); + yield return new(Shape, c, r, t, ImminentColor); } protected IEnumerable<(WPos, DateTime, Angle)> ImminentAOEs() => Lines.Where(l => l.ExplosionsLeft > 0).Select(l => (l.Next, l.NextExplosion, l.Rotation)); - protected IEnumerable<(WPos, DateTime, Angle)> FutureAOEs(DateTime currentTime) + protected IEnumerable<(WPos, DateTime, Angle)> FutureAOEs() { foreach (var l in Lines) { int num = Math.Min(l.ExplosionsLeft, l.MaxShownExplosions); var pos = l.Next; - var time = l.NextExplosion > currentTime ? l.NextExplosion : currentTime; + var time = l.NextExplosion > WorldState.CurrentTime ? l.NextExplosion : WorldState.CurrentTime; for (int i = 1; i < num; ++i) { pos += l.Advance; @@ -53,10 +49,10 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, } } - protected void AdvanceLine(BossModule module, Line l, WPos pos) + protected void AdvanceLine(Line l, WPos pos) { l.Next = pos + l.Advance; - l.NextExplosion = module.WorldState.CurrentTime.AddSeconds(l.TimeToMove); + l.NextExplosion = WorldState.FutureTime(l.TimeToMove); --l.ExplosionsLeft; } } diff --git a/BossMod/Components/ForcedMarch.cs b/BossMod/Components/ForcedMarch.cs index 211231453d..e5c095d9a0 100644 --- a/BossMod/Components/ForcedMarch.cs +++ b/BossMod/Components/ForcedMarch.cs @@ -3,7 +3,7 @@ // generic component dealing with 'forced march' mechanics // these mechanics typically feature 'march left/right/forward/backward' debuffs, which rotate player and apply 'forced march' on expiration // if there are several active march debuffs, we assume they are chained together -public class GenericForcedMarch : BossComponent +public class GenericForcedMarch(BossModule module) : BossComponent(module) { public class PlayerState { @@ -19,23 +19,23 @@ public class PlayerState public float ActivationLimit = float.MaxValue; // do not show pending moves that activate later than this limit // called to determine whether we need to show hint - public virtual bool DestinationUnsafe(BossModule module, int slot, Actor actor, WPos pos) => !module.Bounds.Contains(pos); + public virtual bool DestinationUnsafe(int slot, Actor actor, WPos pos) => !Module.Bounds.Contains(pos); - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { - var last = ForcedMovements(module, actor).LastOrDefault(); - if (last.from != last.to && DestinationUnsafe(module, slot, actor, last.to)) + var last = ForcedMovements(actor).LastOrDefault(); + if (last.from != last.to && DestinationUnsafe(slot, actor, last.to)) hints.Add("Aim for safe spot!"); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - foreach (var m in ForcedMovements(module, pc)) + foreach (var m in ForcedMovements(pc)) { - if (arena.Config.ShowOutlinesAndShadows) - arena.AddLine(m.from, m.to, 0xFF000000, 2); - arena.AddLine(m.from, m.to, ArenaColor.Danger); - arena.Actor(m.to, m.dir, ArenaColor.Danger); + if (Arena.Config.ShowOutlinesAndShadows) + Arena.AddLine(m.from, m.to, 0xFF000000, 2); + Arena.AddLine(m.from, m.to, ArenaColor.Danger); + Arena.Actor(m.to, m.dir, ArenaColor.Danger); } } @@ -46,7 +46,7 @@ public void AddForcedMovement(Actor player, Angle direction, float duration, Dat moves.SortBy(e => e.activation); } - public bool HasForcedMovements(BossModule module, Actor player) => State.GetValueOrDefault(player.InstanceID)?.Active(module) ?? false; + public bool HasForcedMovements(Actor player) => State.GetValueOrDefault(player.InstanceID)?.Active(Module) ?? false; public void ActivateForcedMovement(Actor player, DateTime expiration) { @@ -60,7 +60,7 @@ public void DeactivateForcedMovement(Actor player) --NumActiveForcedMarches; } - public IEnumerable<(WPos from, WPos to, Angle dir)> ForcedMovements(BossModule module, Actor player) + public IEnumerable<(WPos from, WPos to, Angle dir)> ForcedMovements(Actor player) { var state = State.GetValueOrDefault(player.InstanceID); if (state == null) @@ -68,16 +68,16 @@ public void DeactivateForcedMovement(Actor player) var from = player.Position; var dir = player.Rotation; - if (state.ForcedEnd > module.WorldState.CurrentTime) + if (state.ForcedEnd > WorldState.CurrentTime) { // note: as soon as player starts marching, he turns to desired direction // TODO: would be nice to use non-interpolated rotation here... - var to = from + MovementSpeed * (float)(state.ForcedEnd - module.WorldState.CurrentTime).TotalSeconds * dir.ToDirection(); + var to = from + MovementSpeed * (float)(state.ForcedEnd - WorldState.CurrentTime).TotalSeconds * dir.ToDirection(); yield return (from, to, dir); from = to; } - var limit = ActivationLimit < float.MaxValue ? module.WorldState.CurrentTime.AddSeconds(ActivationLimit) : DateTime.MaxValue; + var limit = ActivationLimit < float.MaxValue ? WorldState.FutureTime(ActivationLimit) : DateTime.MaxValue; foreach (var move in state.PendingMoves.TakeWhile(move => move.activation <= limit)) { dir += move.dir; @@ -89,18 +89,12 @@ public void DeactivateForcedMovement(Actor player) } // typical forced march is driven by statuses -public class StatusDrivenForcedMarch : GenericForcedMarch +public class StatusDrivenForcedMarch(BossModule module, float duration, uint statusForward, uint statusBackward, uint statusLeft, uint statusRight, uint statusForced = 1257) : GenericForcedMarch(module) { - public float Duration; - public uint[] Statuses; // 5 elements: fwd, left, back, right, forced + public float Duration = duration; + public readonly uint[] Statuses = [statusForward, statusLeft, statusBackward, statusRight, statusForced]; // 5 elements: fwd, left, back, right, forced - public StatusDrivenForcedMarch(float duration, uint statusForward, uint statusBackward, uint statusLeft, uint statusRight, uint statusForced = 1257) - { - Duration = duration; - Statuses = new[] { statusForward, statusLeft, statusBackward, statusRight, statusForced }; - } - - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { var statusKind = Array.IndexOf(Statuses, status.ID); if (statusKind == 4) @@ -113,7 +107,7 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st } } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { var statusKind = Array.IndexOf(Statuses, status.ID); if (statusKind == 4) diff --git a/BossMod/Components/Gaze.cs b/BossMod/Components/Gaze.cs index efa3b1653f..b9b7277656 100644 --- a/BossMod/Components/Gaze.cs +++ b/BossMod/Components/Gaze.cs @@ -3,7 +3,7 @@ namespace BossMod.Components; // generic gaze/weakpoint component, allows customized 'eye' position -public abstract class GenericGaze : CastCounter +public abstract class GenericGaze(BossModule module, ActionID aid = new(), bool inverted = false) : CastCounter(module, aid) { public struct Eye { @@ -21,7 +21,7 @@ public struct Eye } } - public bool Inverted; // if inverted, player should face eyes instead of averting + public bool Inverted = inverted; // if inverted, player should face eyes instead of averting private static readonly float _eyeOuterH = 10; private static readonly float _eyeOuterV = 6; @@ -30,39 +30,34 @@ public struct Eye private static readonly float _eyeOffsetV = _eyeOuterR - _eyeOuterV; private static readonly float _eyeHalfAngle = MathF.Asin(_eyeOuterH / _eyeOuterR); - public abstract IEnumerable ActiveEyes(BossModule module, int slot, Actor actor); + public abstract IEnumerable ActiveEyes(int slot, Actor actor); - public GenericGaze(ActionID aid = new(), bool inverted = false) : base(aid) + public override void AddHints(int slot, Actor actor, TextHints hints) { - Inverted = inverted; - } - - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) - { - if (ActiveEyes(module, slot, actor).Any(eye => eye.Risky && HitByEye(actor, eye) != Inverted)) + if (ActiveEyes(slot, actor).Any(eye => eye.Risky && HitByEye(actor, eye) != Inverted)) hints.Add(Inverted ? "Face the eye!" : "Turn away from gaze!"); } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { if (Inverted) { - foreach (var eye in ActiveEyes(module, slot, actor).Where(eye => eye.Risky)) + foreach (var eye in ActiveEyes(slot, actor).Where(eye => eye.Risky)) hints.ForbiddenDirections.Add((Angle.FromDirection(actor.Position - eye.Position) - eye.Forward, 135.Degrees(), eye.Activation)); } else { - foreach (var eye in ActiveEyes(module, slot, actor).Where(eye => eye.Risky)) + foreach (var eye in ActiveEyes(slot, actor).Where(eye => eye.Risky)) hints.ForbiddenDirections.Add((Angle.FromDirection(eye.Position - actor.Position) - eye.Forward, 45.Degrees(), eye.Activation)); } } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - foreach (var eye in ActiveEyes(module, pcSlot, pc)) + foreach (var eye in ActiveEyes(pcSlot, pc)) { bool danger = HitByEye(pc, eye) != Inverted; - var eyeCenter = IndicatorScreenPos(module, eye.Position); + var eyeCenter = IndicatorScreenPos(eye.Position); var dl = ImGui.GetWindowDrawList(); dl.PathArcTo(eyeCenter - new Vector2(0, _eyeOffsetV), _eyeOuterR, MathF.PI / 2 + _eyeHalfAngle, MathF.PI / 2 - _eyeHalfAngle); dl.PathArcTo(eyeCenter + new Vector2(0, _eyeOffsetV), _eyeOuterR, -MathF.PI / 2 + _eyeHalfAngle, -MathF.PI / 2 - _eyeHalfAngle); @@ -72,8 +67,8 @@ public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc if (eye.Risky) { var (min, max) = Inverted ? (45, 315) : (-45, 45); - arena.PathArcTo(pc.Position, 1, (pc.Rotation + eye.Forward + min.Degrees()).Rad, (pc.Rotation + eye.Forward + max.Degrees()).Rad); - arena.PathStroke(false, ArenaColor.Enemy); + Arena.PathArcTo(pc.Position, 1, (pc.Rotation + eye.Forward + min.Degrees()).Rad, (pc.Rotation + eye.Forward + max.Degrees()).Rad); + Arena.PathStroke(false, ArenaColor.Enemy); } } } @@ -83,36 +78,34 @@ private bool HitByEye(Actor actor, Eye eye) return (actor.Rotation + eye.Forward).ToDirection().Dot((eye.Position - actor.Position).Normalized()) >= 0.707107f; // 45-degree } - private Vector2 IndicatorScreenPos(BossModule module, WPos eye) + private Vector2 IndicatorScreenPos(WPos eye) { - if (module.Bounds.Contains(eye)) + if (Module.Bounds.Contains(eye)) { - return module.Arena.WorldPositionToScreenPosition(eye); + return Arena.WorldPositionToScreenPosition(eye); } else { - var dir = (eye - module.Bounds.Center).Normalized(); - return module.Arena.ScreenCenter + module.Arena.RotatedCoords(dir.ToVec2()) * (module.Arena.ScreenHalfSize + module.Arena.ScreenMarginSize / 2); + var dir = (eye - Module.Bounds.Center).Normalized(); + return Arena.ScreenCenter + Arena.RotatedCoords(dir.ToVec2()) * (Arena.ScreenHalfSize + Arena.ScreenMarginSize / 2); } } } // gaze that happens on cast end -public class CastGaze : GenericGaze +public class CastGaze(BossModule module, ActionID aid, bool inverted = false) : GenericGaze(module, aid, inverted) { private List _casters = new(); - public CastGaze(ActionID aid, bool inverted = false) : base(aid, inverted) { } - - public override IEnumerable ActiveEyes(BossModule module, int slot, Actor actor) => _casters.Select(c => new Eye(c.Position, c.CastInfo!.NPCFinishAt)); + public override IEnumerable ActiveEyes(int slot, Actor actor) => _casters.Select(c => new Eye(c.Position, c.CastInfo!.NPCFinishAt)); - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) _casters.Add(caster); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) _casters.Remove(caster); @@ -120,20 +113,14 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn } // cast weakpoint component: a number of casts (with supposedly non-intersecting shapes), player should face specific side determined by active status to the caster for aoe he's in -public class CastWeakpoint : GenericGaze +public class CastWeakpoint(BossModule module, ActionID aid, AOEShape shape, uint statusForward, uint statusBackward, uint statusLeft, uint statusRight) : GenericGaze(module, aid, true) { - public AOEShape Shape; - public uint[] Statuses; // 4 elements: fwd, left, back, right + public AOEShape Shape = shape; + public readonly uint[] Statuses = [statusForward, statusLeft, statusBackward, statusRight]; // 4 elements: fwd, left, back, right private List _casters = new(); private Dictionary _playerWeakpoints = new(); - public CastWeakpoint(ActionID aid, AOEShape shape, uint statusForward, uint statusBackward, uint statusLeft, uint statusRight) : base(aid, true) - { - Shape = shape; - Statuses = new[] { statusForward, statusLeft, statusBackward, statusRight }; - } - - public override IEnumerable ActiveEyes(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveEyes(int slot, Actor actor) { // if there are multiple casters, take one that finishes first var caster = _casters.Where(a => Shape.Check(actor.Position, a.Position, a.CastInfo!.Rotation)).MinBy(a => a.CastInfo!.NPCFinishAt); @@ -142,26 +129,26 @@ public override IEnumerable ActiveEyes(BossModule module, int slot, Actor a yield return new(caster.Position, caster.CastInfo!.NPCFinishAt, angle); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) _casters.Add(caster); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) _casters.Remove(caster); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { var statusKind = Array.IndexOf(Statuses, status.ID); if (statusKind >= 0) _playerWeakpoints[actor.InstanceID] = statusKind * 90.Degrees(); } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { var statusKind = Array.IndexOf(Statuses, status.ID); if (statusKind >= 0) diff --git a/BossMod/Components/GenericAOEs.cs b/BossMod/Components/GenericAOEs.cs index 558b071252..fc5f040016 100644 --- a/BossMod/Components/GenericAOEs.cs +++ b/BossMod/Components/GenericAOEs.cs @@ -1,192 +1,133 @@ namespace BossMod.Components; // generic component that shows arbitrary shapes representing avoidable aoes -public abstract class GenericAOEs : CastCounter +public abstract class GenericAOEs(BossModule module, ActionID aid = default, string warningText = "GTFO from aoe!") : CastCounter(module, aid) { - public struct AOEInstance + public record struct AOEInstance(AOEShape Shape, WPos Origin, Angle Rotation = default, DateTime Activation = default, uint Color = ArenaColor.AOE, bool Risky = true) { - public AOEShape Shape; - public WPos Origin; - public Angle Rotation; - public DateTime Activation; - public uint Color; - public bool Risky; - - public AOEInstance(AOEShape shape, WPos origin, Angle rotation = new(), DateTime activation = new(), uint color = ArenaColor.AOE, bool risky = true) - { - Shape = shape; - Origin = origin; - Rotation = rotation; - Activation = activation; - Color = color; - Risky = risky; - } - public bool Check(WPos pos) => Shape.Check(pos, Origin, Rotation); } - private string _warningText; - - public GenericAOEs(ActionID aid = new(), string warningText = "GTFO from aoe!") : base(aid) - { - _warningText = warningText; - } + public string WarningText = warningText; - public abstract IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor); + public abstract IEnumerable ActiveAOEs(int slot, Actor actor); - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { - if (ActiveAOEs(module, slot, actor).Any(c => c.Risky && c.Check(actor.Position))) - hints.Add(_warningText); + if (ActiveAOEs(slot, actor).Any(c => c.Risky && c.Check(actor.Position))) + hints.Add(WarningText); } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { - foreach (var c in ActiveAOEs(module, slot, actor)) + foreach (var c in ActiveAOEs(slot, actor)) if (c.Risky) hints.AddForbiddenZone(c.Shape, c.Origin, c.Rotation, c.Activation); } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { - foreach (var c in ActiveAOEs(module, pcSlot, pc)) - c.Shape.Draw(arena, c.Origin, c.Rotation, c.Color); + foreach (var c in ActiveAOEs(pcSlot, pc)) + c.Shape.Draw(Arena, c.Origin, c.Rotation, c.Color); } } // self-targeted aoe that happens at the end of the cast -public class SelfTargetedAOEs : GenericAOEs +public class SelfTargetedAOEs(BossModule module, ActionID aid, AOEShape shape, int maxCasts = int.MaxValue) : GenericAOEs(module, aid) { - public AOEShape Shape { get; private init; } - public int MaxCasts; // used for staggered aoes, when showing all active would be pointless + public AOEShape Shape { get; init; } = shape; + public int MaxCasts = maxCasts; // used for staggered aoes, when showing all active would be pointless public uint Color = ArenaColor.AOE; // can be customized if needed public bool Risky = true; // can be customized if needed - private List _casters = new(); - public IReadOnlyList Casters => _casters; - public IEnumerable ActiveCasters => _casters.Take(MaxCasts); + public readonly List Casters = new(); - public SelfTargetedAOEs(ActionID aid, AOEShape shape, int maxCasts = int.MaxValue) : base(aid) - { - Shape = shape; - MaxCasts = maxCasts; - } + public IEnumerable ActiveCasters => Casters.Take(MaxCasts); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) - { - return ActiveCasters.Select(c => new AOEInstance(Shape, c.Position, c.CastInfo!.Rotation, c.CastInfo.NPCFinishAt, Color, Risky)); - } + public override IEnumerable ActiveAOEs(int slot, Actor actor) => ActiveCasters.Select(c => new AOEInstance(Shape, c.Position, c.CastInfo!.Rotation, c.CastInfo.NPCFinishAt, Color, Risky)); - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) - _casters.Add(caster); + Casters.Add(caster); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) - _casters.Remove(caster); + Casters.Remove(caster); } } // self-targeted aoe that uses current caster's rotation instead of rotation from cast-info - used by legacy modules written before i've reversed real cast rotation -public class SelfTargetedLegacyRotationAOEs : GenericAOEs +public class SelfTargetedLegacyRotationAOEs(BossModule module, ActionID aid, AOEShape shape, int maxCasts = int.MaxValue) : GenericAOEs(module, aid) { - public AOEShape Shape { get; private init; } - public int MaxCasts { get; private init; } // used for staggered aoes, when showing all active would be pointless - private List _casters = new(); - public IReadOnlyList Casters => _casters; - public IEnumerable ActiveCasters => _casters.Take(MaxCasts); + public AOEShape Shape { get; init; } = shape; + public int MaxCasts = maxCasts; // used for staggered aoes, when showing all active would be pointless + public readonly List Casters = new(); - public SelfTargetedLegacyRotationAOEs(ActionID aid, AOEShape shape, int maxCasts = int.MaxValue) : base(aid) - { - Shape = shape; - MaxCasts = maxCasts; - } + public IEnumerable ActiveCasters => Casters.Take(MaxCasts); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) - { - return ActiveCasters.Select(c => new AOEInstance(Shape, c.Position, c.Rotation, c.CastInfo!.NPCFinishAt)); - } + public override IEnumerable ActiveAOEs(int slot, Actor actor) => ActiveCasters.Select(c => new AOEInstance(Shape, c.Position, c.Rotation, c.CastInfo!.NPCFinishAt)); - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) - _casters.Add(caster); + Casters.Add(caster); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) - _casters.Remove(caster); + Casters.Remove(caster); } } // location-targeted aoe that happens at the end of the cast -public class LocationTargetedAOEs : GenericAOEs +public class LocationTargetedAOEs(BossModule module, ActionID aid, float radius, string warningText = "GTFO from puddle!", int maxCasts = int.MaxValue) : GenericAOEs(module, aid, warningText) { - public AOEShapeCircle Shape { get; private init; } - public int MaxCasts { get; private init; } // used for staggered aoes, when showing all active would be pointless + public AOEShapeCircle Shape { get; init; } = new(radius); + public int MaxCasts = maxCasts; // used for staggered aoes, when showing all active would be pointless public uint Color = ArenaColor.AOE; // can be customized if needed public bool Risky = true; // can be customized if needed - private List _casters = new(); - public IReadOnlyList Casters => _casters; - public IEnumerable ActiveCasters => _casters.Take(MaxCasts); + public readonly List Casters = new(); - public LocationTargetedAOEs(ActionID aid, float radius, string warningText = "GTFO from puddle!", int maxCasts = int.MaxValue) : base(aid, warningText) - { - Shape = new(radius); - MaxCasts = maxCasts; - } + public IEnumerable ActiveCasters => Casters.Take(MaxCasts); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) - { - foreach (var c in ActiveCasters) - yield return new(Shape, c.CastInfo!.LocXZ, c.CastInfo.Rotation, c.CastInfo.NPCFinishAt, Color, Risky); - } + public override IEnumerable ActiveAOEs(int slot, Actor actor) => ActiveCasters.Select(c => new AOEInstance(Shape, c.CastInfo!.LocXZ, c.CastInfo.Rotation, c.CastInfo.NPCFinishAt, Color, Risky)); - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) - _casters.Add(caster); + Casters.Add(caster); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) - _casters.Remove(caster); + Casters.Remove(caster); } } // 'charge at location' aoes that happen at the end of the cast -public class ChargeAOEs : GenericAOEs +public class ChargeAOEs(BossModule module, ActionID aid, float halfWidth) : GenericAOEs(module, aid) { - public float HalfWidth { get; private init; } - private List<(Actor caster, AOEShape shape, Angle direction)> _casters = new(); - public IReadOnlyList<(Actor caster, AOEShape shape, Angle direction)> Casters => _casters; + public float HalfWidth { get; init; } = halfWidth; + public readonly List<(Actor caster, AOEShape shape, Angle direction)> Casters = new(); - public ChargeAOEs(ActionID aid, float halfWidth) : base(aid) - { - HalfWidth = halfWidth; - } - - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) - { - return Casters.Select(csr => new AOEInstance(csr.shape, csr.caster.Position, csr.direction, csr.caster.CastInfo!.NPCFinishAt)); - } + public override IEnumerable ActiveAOEs(int slot, Actor actor) => Casters.Select(csr => new AOEInstance(csr.shape, csr.caster.Position, csr.direction, csr.caster.CastInfo!.NPCFinishAt)); - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) { var dir = spell.LocXZ - caster.Position; - _casters.Add((caster, new AOEShapeRect(dir.Length(), HalfWidth), Angle.FromDirection(dir))); + Casters.Add((caster, new AOEShapeRect(dir.Length(), HalfWidth), Angle.FromDirection(dir))); } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) - _casters.RemoveAll(e => e.caster == caster); + Casters.RemoveAll(e => e.caster == caster); } } diff --git a/BossMod/Components/Knockback.cs b/BossMod/Components/Knockback.cs index 7c24f0d714..b401aed8d9 100644 --- a/BossMod/Components/Knockback.cs +++ b/BossMod/Components/Knockback.cs @@ -1,7 +1,9 @@ -namespace BossMod.Components; +using static BossMod.Components.Knockback; + +namespace BossMod.Components; // generic knockback/attract component; it's a cast counter for convenience -public abstract class Knockback : CastCounter +public abstract class Knockback(BossModule module, ActionID aid = new(), bool ignoreImmunes = false, int maxCasts = int.MaxValue) : CastCounter(module, aid) { public enum Kind { @@ -32,9 +34,9 @@ protected struct PlayerImmuneState public bool ImmuneAt(DateTime time) => RoleBuffExpire > time || JobBuffExpire > time || DutyBuffExpire > time; } - public bool IgnoreImmunes { get; private init; } + public bool IgnoreImmunes { get; init; } = ignoreImmunes; public bool StopAtWall; // use if wall is solid rather than deadly - public int MaxCasts; // use to limit number of drawn knockbacks + public int MaxCasts = maxCasts; // use to limit number of drawn knockbacks protected PlayerImmuneState[] PlayerImmunes = new PlayerImmuneState[PartyState.MaxAllianceSize]; public bool IsImmune(int slot, DateTime time) => !IgnoreImmunes && PlayerImmunes[slot].ImmuneAt(time); @@ -54,88 +56,82 @@ public static void DrawKnockback(WPos from, WPos to, Angle rot, MiniArena arena) } public static void DrawKnockback(Actor actor, WPos adjPos, MiniArena arena) => DrawKnockback(actor.Position, adjPos, actor.Rotation, arena); - public Knockback(ActionID aid = new(), bool ignoreImmunes = false, int maxCasts = int.MaxValue) : base(aid) - { - IgnoreImmunes = ignoreImmunes; - MaxCasts = maxCasts; - } - // note: if implementation returns multiple sources, it is assumed they are applied sequentially (so they should be pre-sorted in activation order) - public abstract IEnumerable Sources(BossModule module, int slot, Actor actor); + public abstract IEnumerable Sources(int slot, Actor actor); // called to determine whether we need to show hint - public virtual bool DestinationUnsafe(BossModule module, int slot, Actor actor, WPos pos) => StopAtWall ? false : !module.Bounds.Contains(pos); + public virtual bool DestinationUnsafe(int slot, Actor actor, WPos pos) => StopAtWall ? false : !Module.Bounds.Contains(pos); - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { - if (CalculateMovements(module, slot, actor).Any(e => DestinationUnsafe(module, slot, actor, e.to))) + if (CalculateMovements(slot, actor).Any(e => DestinationUnsafe(slot, actor, e.to))) hints.Add("About to be knocked into danger!"); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - foreach (var e in CalculateMovements(module, pcSlot, pc)) - DrawKnockback(e.from, e.to, pc.Rotation, arena); + foreach (var e in CalculateMovements(pcSlot, pc)) + DrawKnockback(e.from, e.to, pc.Rotation, Arena); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { switch (status.ID) { case 3054: //Guard in PVP case (uint)WHM.SID.Surecast: case (uint)WAR.SID.ArmsLength: - var slot1 = module.Raid.FindSlot(actor.InstanceID); + var slot1 = Raid.FindSlot(actor.InstanceID); if (slot1 >= 0) PlayerImmunes[slot1].RoleBuffExpire = status.ExpireAt; break; case 1722: //Bluemage Diamondback case (uint)WAR.SID.InnerStrength: - var slot2 = module.Raid.FindSlot(actor.InstanceID); + var slot2 = Raid.FindSlot(actor.InstanceID); if (slot2 >= 0) PlayerImmunes[slot2].JobBuffExpire = status.ExpireAt; break; case 2345: //Lost Manawall in Bozja - var slot3 = module.Raid.FindSlot(actor.InstanceID); + var slot3 = Raid.FindSlot(actor.InstanceID); if (slot3 >= 0) PlayerImmunes[slot3].DutyBuffExpire = status.ExpireAt; break; } } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { switch (status.ID) { case 3054: //Guard in PVP case (uint)WHM.SID.Surecast: case (uint)WAR.SID.ArmsLength: - var slot1 = module.Raid.FindSlot(actor.InstanceID); + var slot1 = Raid.FindSlot(actor.InstanceID); if (slot1 >= 0) PlayerImmunes[slot1].RoleBuffExpire = new(); break; case 1722: //Bluemage Diamondback case (uint)WAR.SID.InnerStrength: - var slot2 = module.Raid.FindSlot(actor.InstanceID); + var slot2 = Raid.FindSlot(actor.InstanceID); if (slot2 >= 0) PlayerImmunes[slot2].JobBuffExpire = new(); break; case 2345: //Lost Manawall in Bozja - var slot3 = module.Raid.FindSlot(actor.InstanceID); + var slot3 = Raid.FindSlot(actor.InstanceID); if (slot3 >= 0) PlayerImmunes[slot3].DutyBuffExpire = new(); break; } } - protected IEnumerable<(WPos from, WPos to)> CalculateMovements(BossModule module, int slot, Actor actor) + protected IEnumerable<(WPos from, WPos to)> CalculateMovements(int slot, Actor actor) { if (MaxCasts <= 0) yield break; var from = actor.Position; int count = 0; - foreach (var s in Sources(module, slot, actor)) + foreach (var s in Sources(slot, actor)) { if (IsImmune(slot, s.Activation)) continue; // this source won't affect player due to immunity @@ -161,7 +157,7 @@ public override void OnStatusLose(BossModule module, Actor actor, ActorStatus st continue; // this could happen if attract starts from < min distance if (StopAtWall) - distance = Math.Min(distance, module.Bounds.IntersectRay(from, dir) - actor.HitboxRadius); + distance = Math.Min(distance, Module.Bounds.IntersectRay(from, dir) - actor.HitboxRadius); var to = from + distance * dir; yield return (from, to); @@ -175,29 +171,19 @@ public override void OnStatusLose(BossModule module, Actor actor, ActorStatus st // generic 'knockback from/attract to cast target' component // TODO: knockback is really applied when effectresult arrives rather than when actioneffect arrives, this is important for ai hints (they can reposition too early otherwise) -public class KnockbackFromCastTarget : Knockback +public class KnockbackFromCastTarget(BossModule module, ActionID aid, float distance, bool ignoreImmunes = false, int maxCasts = int.MaxValue, AOEShape? shape = null, Kind kind = Kind.AwayFromOrigin, float minDistance = 0, bool minDistanceBetweenHitboxes = false) + : Knockback(module, aid, ignoreImmunes, maxCasts) { - public float Distance; - public AOEShape? Shape; - public Kind KnockbackKind; - public float MinDistance; - public bool MinDistanceBetweenHitboxes; - private List _casters = new(); - public IReadOnlyList Casters => _casters; - - public KnockbackFromCastTarget(ActionID aid, float distance, bool ignoreImmunes = false, int maxCasts = int.MaxValue, AOEShape? shape = null, Kind kind = Kind.AwayFromOrigin, float minDistance = 0, bool minDistanceBetweenHitboxes = false) - : base(aid, ignoreImmunes, maxCasts) - { - Distance = distance; - Shape = shape; - KnockbackKind = kind; - MinDistance = minDistance; - MinDistanceBetweenHitboxes = minDistanceBetweenHitboxes; - } - - public override IEnumerable Sources(BossModule module, int slot, Actor actor) + public float Distance = distance; + public AOEShape? Shape = shape; + public Kind KnockbackKind = kind; + public float MinDistance = minDistance; + public bool MinDistanceBetweenHitboxes = minDistanceBetweenHitboxes; + public readonly List Casters = new(); + + public override IEnumerable Sources(int slot, Actor actor) { - foreach (var c in _casters) + foreach (var c in Casters) { // note that majority of knockback casts are self-targeted var minDist = MinDistance + (MinDistanceBetweenHitboxes ? actor.HitboxRadius + c.HitboxRadius : 0); @@ -207,21 +193,21 @@ public override IEnumerable Sources(BossModule module, int slot, Actor a } else { - var origin = module.WorldState.Actors.Find(c.CastInfo.TargetID)?.Position ?? c.CastInfo.LocXZ; + var origin = WorldState.Actors.Find(c.CastInfo.TargetID)?.Position ?? c.CastInfo.LocXZ; yield return new(origin, Distance, c.CastInfo.NPCFinishAt, Shape, Angle.FromDirection(origin - c.Position), KnockbackKind, minDist); } } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) - _casters.Add(caster); + Casters.Add(caster); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) - _casters.Remove(caster); + Casters.Remove(caster); } } diff --git a/BossMod/Components/LineOfSightAOE.cs b/BossMod/Components/LineOfSightAOE.cs index a21fcfadac..c8b630ab13 100644 --- a/BossMod/Components/LineOfSightAOE.cs +++ b/BossMod/Components/LineOfSightAOE.cs @@ -1,21 +1,15 @@ namespace BossMod.Components; // generic component that shows line-of-sight cones for arbitrary origin and blocking shapes -public abstract class GenericLineOfSightAOE : CastCounter +public abstract class GenericLineOfSightAOE(BossModule module, ActionID aid, float maxRange, bool blockersImpassable) : CastCounter(module, aid) { public DateTime NextExplosion; - public bool BlockersImpassable; - public float MaxRange { get; private set; } + public bool BlockersImpassable = blockersImpassable; + public float MaxRange { get; private set; } = maxRange; public WPos? Origin { get; private set; } // inactive if null public List<(WPos Center, float Radius)> Blockers { get; private set; } = new(); public List<(float Distance, Angle Dir, Angle HalfWidth)> Visibility { get; private set; } = new(); - public GenericLineOfSightAOE(ActionID aid, float maxRange, bool blockersImpassable) : base(aid) - { - BlockersImpassable = blockersImpassable; - MaxRange = maxRange; - } - public void Modify(WPos? origin, IEnumerable<(WPos Center, float Radius)> blockers, DateTime nextExplosion = default) { NextExplosion = nextExplosion; @@ -34,7 +28,7 @@ public void Modify(WPos? origin, IEnumerable<(WPos Center, float Radius)> blocke } } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (Origin != null && actor.Position.InCircle(Origin.Value, MaxRange) @@ -44,7 +38,7 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { if (Origin != null) { @@ -74,14 +68,14 @@ public override void AddAIHints(BossModule module, int slot, Actor actor, PartyR } } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { // TODO: reconsider, this looks like shit... if (Origin != null) { - arena.ZoneDonut(Origin.Value, MaxRange, 1000, ArenaColor.SafeFromAOE); + Arena.ZoneDonut(Origin.Value, MaxRange, 1000, ArenaColor.SafeFromAOE); foreach (var v in Visibility) - arena.ZoneCone(Origin.Value, v.Distance, 1000, v.Dir, v.HalfWidth, ArenaColor.SafeFromAOE); + Arena.ZoneCone(Origin.Value, v.Distance, 1000, v.Dir, v.HalfWidth, ArenaColor.SafeFromAOE); } } } @@ -89,40 +83,38 @@ public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc // simple line-of-sight aoe that happens at the end of the cast public abstract class CastLineOfSightAOE : GenericLineOfSightAOE { - private List _casters = new(); + private readonly List _casters = new(); public Actor? ActiveCaster => _casters.MinBy(c => c.CastInfo!.NPCFinishAt); - public CastLineOfSightAOE(ActionID aid, float maxRange, bool blockersImpassable) : base(aid, maxRange, blockersImpassable) { } - - public abstract IEnumerable BlockerActors(BossModule module); - - public override void Init(BossModule module) + public CastLineOfSightAOE(BossModule module, ActionID aid, float maxRange, bool blockersImpassable) : base(module, aid, maxRange, blockersImpassable) { - Refresh(module); + Refresh(); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public abstract IEnumerable BlockerActors(); + + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) { _casters.Add(caster); - Refresh(module); + Refresh(); } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) { _casters.Remove(caster); - Refresh(module); + Refresh(); } } - private void Refresh(BossModule module) + private void Refresh() { var caster = ActiveCaster; - WPos? position = caster != null ? (module.WorldState.Actors.Find(caster.CastInfo!.TargetID)?.Position ?? caster.CastInfo!.LocXZ) : null; - Modify(position, BlockerActors(module).Select(b => (b.Position, b.HitboxRadius)), caster?.CastInfo?.NPCFinishAt ?? default); + WPos? position = caster != null ? (WorldState.Actors.Find(caster.CastInfo!.TargetID)?.Position ?? caster.CastInfo!.LocXZ) : null; + Modify(position, BlockerActors().Select(b => (b.Position, b.HitboxRadius)), caster?.CastInfo?.NPCFinishAt ?? default); } } diff --git a/BossMod/Components/PersistentVoidzone.cs b/BossMod/Components/PersistentVoidzone.cs index 6639a2277d..f995c0cd6c 100644 --- a/BossMod/Components/PersistentVoidzone.cs +++ b/BossMod/Components/PersistentVoidzone.cs @@ -3,111 +3,88 @@ namespace BossMod.Components; // voidzone (circle aoe that stays active for some time) centered at each existing object with specified OID, assumed to be persistent voidzone center // TODO: typically sources are either eventobj's with eventstate != 7 or normal actors that are non dead; other conditions are much rarer -public class PersistentVoidzone : GenericAOEs +public class PersistentVoidzone(BossModule module, float radius, Func> sources) : GenericAOEs(module, default, "GTFO from voidzone!") { - public AOEShapeCircle Shape { get; private init; } - public Func> Sources { get; private init; } + public AOEShapeCircle Shape { get; init; } = new(radius); + public Func> Sources { get; init; } = sources; - public PersistentVoidzone(float radius, Func> sources) : base(new(), "GTFO from voidzone!") - { - Shape = new(radius); - Sources = sources; - } - - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) - { - foreach (var s in Sources(module)) - yield return new(Shape, s.Position); - } + public override IEnumerable ActiveAOEs(int slot, Actor actor) => Sources().Select(s => new AOEInstance(Shape, s.Position)); } // voidzone that appears with some delay at cast target // note that if voidzone is predicted by cast start rather than cast event, we have to account for possibility of cast finishing without event (e.g. if actor dies before cast finish) // TODO: this has problems when target moves - castevent and spawn position could be quite different // TODO: this has problems if voidzone never actually spawns after castevent, eg because of phase changes -public class PersistentVoidzoneAtCastTarget : GenericAOEs +public class PersistentVoidzoneAtCastTarget(BossModule module, float radius, ActionID aid, Func> sources, float castEventToSpawn) : GenericAOEs(module, aid, "GTFO from voidzone!") { - public AOEShapeCircle Shape { get; private init; } - public Func> Sources { get; private init; } - public float CastEventToSpawn { get; private init; } + public AOEShapeCircle Shape { get; init; } = new(radius); + public Func> Sources { get; init; } = sources; + public float CastEventToSpawn { get; init; } = castEventToSpawn; private List<(WPos pos, DateTime time)> _predictedByEvent = new(); private List<(Actor caster, DateTime time)> _predictedByCast = new(); public bool HaveCasters => _predictedByCast.Count > 0; - public PersistentVoidzoneAtCastTarget(float radius, ActionID aid, Func> sources, float castEventToSpawn) : base(aid, "GTFO from voidzone!") - { - Shape = new(radius); - Sources = sources; - CastEventToSpawn = castEventToSpawn; - } - - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { foreach (var p in _predictedByEvent) - yield return new(Shape, p.pos, activation: p.time); + yield return new(Shape, p.pos, Activation: p.time); foreach (var p in _predictedByCast) - yield return new(Shape, module.WorldState.Actors.Find(p.caster.CastInfo!.TargetID)?.Position ?? p.caster.CastInfo.LocXZ, activation: p.time); - foreach (var z in Sources(module)) + yield return new(Shape, WorldState.Actors.Find(p.caster.CastInfo!.TargetID)?.Position ?? p.caster.CastInfo.LocXZ, Activation: p.time); + foreach (var z in Sources()) yield return new(Shape, z.Position); } - public override void Update(BossModule module) + public override void Update() { if (_predictedByEvent.Count > 0) - foreach (var s in Sources(module)) + foreach (var s in Sources()) _predictedByEvent.RemoveAll(p => p.pos.InCircle(s.Position, 3)); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) _predictedByCast.Add((caster, spell.NPCFinishAt.AddSeconds(CastEventToSpawn))); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) _predictedByCast.RemoveAll(p => p.caster == caster); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { - base.OnEventCast(module, caster, spell); + base.OnEventCast(caster, spell); if (spell.Action == WatchedAction) - _predictedByEvent.Add((module.WorldState.Actors.Find(spell.MainTargetID)?.Position ?? spell.TargetXZ, module.WorldState.CurrentTime.AddSeconds(CastEventToSpawn))); + _predictedByEvent.Add((WorldState.Actors.Find(spell.MainTargetID)?.Position ?? spell.TargetXZ, WorldState.FutureTime(CastEventToSpawn))); } } // these are normal voidzones that could be 'inverted' (e.g. when you need to enter a voidzone at specific time to avoid some mechanic) // TODO: i'm not sure whether these should be considered actual voidzones (if so, should i merge them with base component? what about cast prediction?) or some completely other type of mechanic (maybe drawing differently) // TODO: might want to have per-player invertability -public class PersistentInvertibleVoidzone : CastCounter +public class PersistentInvertibleVoidzone(BossModule module, float radius, Func> sources, ActionID aid = default) : CastCounter(module, aid) { - public AOEShapeCircle Shape { get; private init; } - public Func> Sources { get; private init; } + public AOEShapeCircle Shape { get; init; } = new(radius); + public Func> Sources { get; init; } = sources; public DateTime InvertResolveAt; public bool Inverted => InvertResolveAt != default; - public PersistentInvertibleVoidzone(float radius, Func> sources, ActionID aid = default) : base(aid) - { - Shape = new(radius); - Sources = sources; - } - - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { - var inVoidzone = Sources(module).Any(s => Shape.Check(actor.Position, s)); + var inVoidzone = Sources().Any(s => Shape.Check(actor.Position, s)); if (Inverted) hints.Add(inVoidzone ? "Stay in voidzone" : "Go to voidzone!", !inVoidzone); else if (inVoidzone) hints.Add("GTFO from voidzone!"); } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { - var shapes = Sources(module).Select(s => Shape.Distance(s.Position, s.Rotation)).ToList(); + var shapes = Sources().Select(s => Shape.Distance(s.Position, s.Rotation)).ToList(); if (shapes.Count == 0) return; @@ -120,26 +97,24 @@ public override void AddAIHints(BossModule module, int slot, Actor actor, PartyR } // TODO: reconsider - draw foreground circles instead? - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { var color = Inverted ? ArenaColor.SafeFromAOE : ArenaColor.AOE; - foreach (var s in Sources(module)) - Shape.Draw(arena, s.Position, s.Rotation, color); + foreach (var s in Sources()) + Shape.Draw(Arena, s.Position, s.Rotation, color); } } // invertible voidzone that is inverted when specific spell is being cast; resolved when cast ends -public class PersistentInvertibleVoidzoneByCast : PersistentInvertibleVoidzone +public class PersistentInvertibleVoidzoneByCast(BossModule module, float radius, Func> sources, ActionID aid) : PersistentInvertibleVoidzone(module, radius, sources, aid) { - public PersistentInvertibleVoidzoneByCast(float radius, Func> sources, ActionID aid) : base(radius, sources, aid) { } - - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) InvertResolveAt = spell.NPCFinishAt; } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) InvertResolveAt = default; diff --git a/BossMod/Components/Protean.cs b/BossMod/Components/Protean.cs index c9b34e1e45..60094a8460 100644 --- a/BossMod/Components/Protean.cs +++ b/BossMod/Components/Protean.cs @@ -2,47 +2,37 @@ // generic protean mechanic is a bunch of aoes baited in some manner by players that have to hit that player only // TODO: combine with BaitAway -public abstract class GenericProtean : CastCounter +public abstract class GenericProtean(BossModule module, ActionID aid, AOEShape shape) : CastCounter(module, aid) { - public AOEShape Shape { get; private init; } + public AOEShape Shape { get; init; } = shape; - public GenericProtean(ActionID aid, AOEShape shape) : base(aid) - { - Shape = shape; - } - - public abstract IEnumerable<(Actor source, Actor target)> ActiveAOEs(BossModule module); + public abstract IEnumerable<(Actor source, Actor target)> ActiveAOEs(); - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { - if (ActiveAOEs(module).Any(st => st.target != actor && IsPlayerClipped(st.source, st.target, actor))) + if (ActiveAOEs().Any(st => st.target != actor && IsPlayerClipped(st.source, st.target, actor))) hints.Add("GTFO from protean!"); } - public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) + public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) { - var playerProteanSource = player != pc ? ActiveAOEs(module).FirstOrDefault(st => st.target == player).source : null; + var playerProteanSource = player != pc ? ActiveAOEs().FirstOrDefault(st => st.target == player).source : null; return playerProteanSource == null ? PlayerPriority.Irrelevant : IsPlayerClipped(playerProteanSource, player, pc) ? PlayerPriority.Danger : PlayerPriority.Normal; } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { // draw own protean (if any) and clipping proteans (if any) - foreach (var (source, target) in ActiveAOEs(module)) + foreach (var (source, target) in ActiveAOEs()) if (target == pc || IsPlayerClipped(source, target, pc)) - Shape.Draw(arena, source.Position, Angle.FromDirection(target.Position - source.Position)); + Shape.Draw(Arena, source.Position, Angle.FromDirection(target.Position - source.Position)); } public bool IsPlayerClipped(Actor source, Actor target, Actor player) => Shape.Check(player.Position, source.Position, Angle.FromDirection(target.Position - source.Position)); } // typical protean will originate from primary actor and hit all alive players -public class SimpleProtean : GenericProtean +public class SimpleProtean(BossModule module, ActionID aid, AOEShape shape) : GenericProtean(module, aid, shape) { - public SimpleProtean(ActionID aid, AOEShape shape) : base(aid, shape) { } - - public override IEnumerable<(Actor source, Actor target)> ActiveAOEs(BossModule module) - { - return module.Raid.WithoutSlot().Select(p => (module.PrimaryActor, p)); - } + public override IEnumerable<(Actor source, Actor target)> ActiveAOEs() => Raid.WithoutSlot().Select(p => (Module.PrimaryActor, p)); } diff --git a/BossMod/Components/RotatingAOE.cs b/BossMod/Components/RotatingAOE.cs index ce6607d1a8..97a43570bb 100644 --- a/BossMod/Components/RotatingAOE.cs +++ b/BossMod/Components/RotatingAOE.cs @@ -1,7 +1,7 @@ namespace BossMod.Components; // generic 'rotating aoes' component - a sequence of aoes (typically cones) with same origin and increasing rotation -public class GenericRotatingAOE : GenericAOEs +public class GenericRotatingAOE(BossModule module) : GenericAOEs(module) { public record struct Sequence ( @@ -19,14 +19,14 @@ public record struct Sequence public uint ImminentColor = ArenaColor.Danger; public uint FutureColor = ArenaColor.AOE; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { // future AOEs foreach (var s in Sequences) { int num = Math.Min(s.NumRemainingCasts, s.MaxShownAOEs); var rot = s.Rotation; - var time = s.NextActivation > module.WorldState.CurrentTime ? s.NextActivation : module.WorldState.CurrentTime; + var time = s.NextActivation > WorldState.CurrentTime ? s.NextActivation : WorldState.CurrentTime; for (int i = 1; i < num; ++i) { rot += s.Increment; diff --git a/BossMod/Components/SharedTankbuster.cs b/BossMod/Components/SharedTankbuster.cs index 8073928b81..8ed6583261 100644 --- a/BossMod/Components/SharedTankbuster.cs +++ b/BossMod/Components/SharedTankbuster.cs @@ -2,32 +2,26 @@ // generic 'shared tankbuster' component; assumes only 1 concurrent cast is active // TODO: revise and improve (track invuln, ai hints, num stacked tanks?) -public class GenericSharedTankbuster : CastCounter +public class GenericSharedTankbuster(BossModule module, ActionID aid, AOEShape shape, bool originAtTarget = false) : CastCounter(module, aid) { - public AOEShape Shape { get; private init; } - public bool OriginAtTarget { get; private init; } + public AOEShape Shape { get; init; } = shape; + public bool OriginAtTarget { get; init; } = originAtTarget; protected Actor? Source; protected Actor? Target; protected DateTime Activation; public bool Active => Source != null; - public GenericSharedTankbuster(ActionID aid, AOEShape shape, bool originAtTarget = false) : base(aid) - { - Shape = shape; - OriginAtTarget = originAtTarget; - } - // circle shapes typically have origin at target - public GenericSharedTankbuster(ActionID aid, float radius) : this(aid, new AOEShapeCircle(radius), true) { } + public GenericSharedTankbuster(BossModule module, ActionID aid, float radius) : this(module, aid, new AOEShapeCircle(radius), true) { } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (Target == null) return; if (Target == actor) { - hints.Add("Stack with other tanks or press invuln!", !module.Raid.WithoutSlot().Any(a => a != actor && a.Role == Role.Tank && InAOE(a))); + hints.Add("Stack with other tanks or press invuln!", !Raid.WithoutSlot().Any(a => a != actor && a.Role == Role.Tank && InAOE(a))); } else if (actor.Role == Role.Tank) { @@ -39,7 +33,7 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { if (Source != null && Target != null && Target != actor) { @@ -51,19 +45,16 @@ public override void AddAIHints(BossModule module, int slot, Actor actor, PartyR } } - public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) - { - return Target == player ? PlayerPriority.Interesting : PlayerPriority.Irrelevant; - } + public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) => Target == player ? PlayerPriority.Interesting : PlayerPriority.Irrelevant; - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (Source != null && Target != null) { if (OriginAtTarget) - Shape.Outline(arena, Target); + Shape.Outline(Arena, Target); else - Shape.Outline(arena, Source.Position, Angle.FromDirection(Target.Position - Source.Position)); + Shape.Outline(Arena, Source.Position, Angle.FromDirection(Target.Position - Source.Position)); } } @@ -71,22 +62,21 @@ public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc } // shared tankbuster at cast target -public class CastSharedTankbuster : GenericSharedTankbuster +public class CastSharedTankbuster(BossModule module, ActionID aid, AOEShape shape, bool originAtTarget = false) : GenericSharedTankbuster(module, aid, shape, originAtTarget) { - public CastSharedTankbuster(ActionID aid, AOEShape shape, bool originAtTarget = false) : base(aid, shape, originAtTarget) { } - public CastSharedTankbuster(ActionID aid, float radius) : base(aid, radius) { } + public CastSharedTankbuster(BossModule module, ActionID aid, float radius) : this(module, aid, new AOEShapeCircle(radius), true) { } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) { Source = caster; - Target = module.WorldState.Actors.Find(spell.TargetID); + Target = WorldState.Actors.Find(spell.TargetID); Activation = spell.NPCFinishAt; } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if (caster == Source) Source = Target = null; diff --git a/BossMod/Components/StackSpread.cs b/BossMod/Components/StackSpread.cs index 5ad9f0d334..a70f205904 100644 --- a/BossMod/Components/StackSpread.cs +++ b/BossMod/Components/StackSpread.cs @@ -2,45 +2,26 @@ // generic 'stack/spread' mechanic has some players that have to spread away from raid, some other players that other players need to stack with // there are various variants (e.g. everyone should spread, or everyone should stack in one or more groups, or some combination of that) -public class GenericStackSpread : BossComponent +public class GenericStackSpread(BossModule module, bool alwaysShowSpreads = false, bool raidwideOnResolve = true, bool includeDeadTargets = false) : BossComponent(module) { - public struct Stack - { - public Actor Target; - public float Radius; - public int MinSize; - public int MaxSize; - public DateTime Activation; - public BitMask ForbiddenPlayers; // raid members that aren't allowed to participate in the stack - - public Stack(Actor target, float radius, int minSize = 2, int maxSize = int.MaxValue, DateTime activation = default, BitMask forbiddenPlayers = default) - { - Target = target; - Radius = radius; - MinSize = minSize; - MaxSize = maxSize; - Activation = activation; - ForbiddenPlayers = forbiddenPlayers; - } - } - - public struct Spread - { - public Actor Target; - public float Radius; - public DateTime Activation; - - public Spread(Actor target, float radius, DateTime activation = default) - { - Target = target; - Radius = radius; - Activation = activation; - } - } - - public bool AlwaysShowSpreads; // if false, we only shown own spread radius for spread targets - this reduces visual clutter - public bool RaidwideOnResolve; // if true, assume even if mechanic is correctly resolved everyone will still take damage - public bool IncludeDeadTargets; // if false, stacks & spreads with dead targets are ignored + public record struct Stack( + Actor Target, + float Radius, + int MinSize = 2, + int MaxSize = int.MaxValue, + DateTime Activation = default, + BitMask ForbiddenPlayers = default // raid members that aren't allowed to participate in the stack + ); + + public record struct Spread( + Actor Target, + float Radius, + DateTime Activation = default + ); + + public bool AlwaysShowSpreads = alwaysShowSpreads; // if false, we only shown own spread radius for spread targets - this reduces visual clutter + public bool RaidwideOnResolve = raidwideOnResolve; // if true, assume even if mechanic is correctly resolved everyone will still take damage + public bool IncludeDeadTargets = includeDeadTargets; // if false, stacks & spreads with dead targets are ignored public List Stacks = new(); public List Spreads = new(); @@ -51,25 +32,18 @@ public Spread(Actor target, float radius, DateTime activation = default) public bool IsStackTarget(Actor actor) => Stacks.Any(s => s.Target == actor); public bool IsSpreadTarget(Actor actor) => Spreads.Any(s => s.Target == actor); - public GenericStackSpread(bool alwaysShowSpreads = false, bool raidwideOnResolve = true, bool includeDeadTargets = false) - { - AlwaysShowSpreads = alwaysShowSpreads; - RaidwideOnResolve = raidwideOnResolve; - IncludeDeadTargets = includeDeadTargets; - } - - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (Spreads.FindIndex(s => s.Target == actor) is var iSpread && iSpread >= 0) { - hints.Add("Spread!", module.Raid.WithoutSlot().InRadiusExcluding(actor, Spreads[iSpread].Radius).Any()); + hints.Add("Spread!", Raid.WithoutSlot().InRadiusExcluding(actor, Spreads[iSpread].Radius).Any()); } else if (Stacks.FindIndex(s => s.Target == actor) is var iStack && iStack >= 0) { var stack = Stacks[iStack]; int numStacked = 1; // always stacked with self bool stackedWithOtherStackOrAvoid = false; - foreach (var (j, other) in module.Raid.WithSlot().InRadiusExcluding(actor, stack.Radius)) + foreach (var (j, other) in Raid.WithSlot().InRadiusExcluding(actor, stack.Radius)) { ++numStacked; stackedWithOtherStackOrAvoid |= stack.ForbiddenPlayers[j] || IsStackTarget(other); @@ -84,7 +58,7 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint { if (actor.Position.InCircle(s.Target.Position, s.Radius)) ++numParticipatingStacks; - else if (module.Raid.WithoutSlot().InRadiusExcluding(s.Target, s.Radius).Count() + 1 < s.MinSize) + else if (Raid.WithoutSlot().InRadiusExcluding(s.Target, s.Radius).Count() + 1 < s.MinSize) ++numUnsatisfiedStacks; } @@ -108,7 +82,7 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { // forbid standing next to spread markers // TODO: think how to improve this, current implementation works, but isn't particularly good - e.g. nearby players tend to move to same spot, turn around, etc. @@ -139,12 +113,12 @@ public override void AddAIHints(BossModule module, int slot, Actor actor, PartyR BitMask damageMask = new(); foreach (var s in ActiveSpreads) { - damageMask.Set(module.Raid.FindSlot(s.Target.InstanceID)); + damageMask.Set(Raid.FindSlot(s.Target.InstanceID)); firstActivation = firstActivation < s.Activation ? firstActivation : s.Activation; } foreach (var s in ActiveStacks) { - damageMask |= module.Raid.WithSlot().Mask() & ~s.ForbiddenPlayers; // assume everyone will take damage except forbidden players (so-so assumption really...) + damageMask |= Raid.WithSlot().Mask() & ~s.ForbiddenPlayers; // assume everyone will take damage except forbidden players (so-so assumption really...) firstActivation = firstActivation < s.Activation ? firstActivation : s.Activation; } @@ -153,7 +127,7 @@ public override void AddAIHints(BossModule module, int slot, Actor actor, PartyR } } - public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) + public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) { var shouldSpread = IsSpreadTarget(player); var shouldStack = IsStackTarget(player); @@ -165,52 +139,44 @@ public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor : Active ? PlayerPriority.Normal : PlayerPriority.Irrelevant; } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (!AlwaysShowSpreads && Spreads.FindIndex(s => s.Target == pc) is var iSpread && iSpread >= 0) { // draw only own circle - no one should be inside, this automatically resolves mechanic for us - arena.AddCircle(pc.Position, Spreads[iSpread].Radius, ArenaColor.Danger); + Arena.AddCircle(pc.Position, Spreads[iSpread].Radius, ArenaColor.Danger); } else { // draw spread and stack circles foreach (var s in ActiveStacks) { - if (arena.Config.ShowOutlinesAndShadows) - arena.AddCircle(s.Target.Position, s.Radius, 0xFF000000, 2); - arena.AddCircle(s.Target.Position, s.Radius, ArenaColor.Safe); + if (Arena.Config.ShowOutlinesAndShadows) + Arena.AddCircle(s.Target.Position, s.Radius, 0xFF000000, 2); + Arena.AddCircle(s.Target.Position, s.Radius, ArenaColor.Safe); } foreach (var s in ActiveSpreads) { - if (arena.Config.ShowOutlinesAndShadows) - arena.AddCircle(s.Target.Position, s.Radius, 0xFF000000, 2); - arena.AddCircle(s.Target.Position, s.Radius, ArenaColor.Danger); + if (Arena.Config.ShowOutlinesAndShadows) + Arena.AddCircle(s.Target.Position, s.Radius, 0xFF000000, 2); + Arena.AddCircle(s.Target.Position, s.Radius, ArenaColor.Danger); } } } } // stack/spread with same properties for all stacks and all spreads (most common variant) -public class UniformStackSpread : GenericStackSpread +public class UniformStackSpread(BossModule module, float stackRadius, float spreadRadius, int minStackSize = 2, int maxStackSize = int.MaxValue, bool alwaysShowSpreads = false, bool raidwideOnResolve = true, bool includeDeadTargets = false) + : GenericStackSpread(module, alwaysShowSpreads, raidwideOnResolve, includeDeadTargets) { - public float StackRadius; - public float SpreadRadius; - public int MinStackSize; - public int MaxStackSize; + public float StackRadius = stackRadius; + public float SpreadRadius = spreadRadius; + public int MinStackSize = minStackSize; + public int MaxStackSize = maxStackSize; public IEnumerable ActiveStackTargets => ActiveStacks.Select(s => s.Target); public IEnumerable ActiveSpreadTargets => ActiveSpreads.Select(s => s.Target); - public UniformStackSpread(float stackRadius, float spreadRadius, int minStackSize = 2, int maxStackSize = int.MaxValue, bool alwaysShowSpreads = false, bool raidwideOnResolve = true, bool includeDeadTargets = false) - : base(alwaysShowSpreads, raidwideOnResolve, includeDeadTargets) - { - StackRadius = stackRadius; - SpreadRadius = spreadRadius; - MinStackSize = minStackSize; - MaxStackSize = maxStackSize; - } - public void AddStack(Actor target, DateTime activation = default, BitMask forbiddenPlayers = default) => Stacks.Add(new(target, StackRadius, MinStackSize, MaxStackSize, activation, forbiddenPlayers)); public void AddStacks(IEnumerable targets, DateTime activation = default) => Stacks.AddRange(targets.Select(target => new Stack(target, StackRadius, MinStackSize, MaxStackSize, activation))); public void AddSpread(Actor target, DateTime activation = default) => Spreads.Add(new(target, SpreadRadius, activation)); @@ -218,33 +184,27 @@ public UniformStackSpread(float stackRadius, float spreadRadius, int minStackSiz } // spread/stack mechanic that selects targets by casts -public class CastStackSpread : UniformStackSpread +public class CastStackSpread(BossModule module, ActionID stackAID, ActionID spreadAID, float stackRadius, float spreadRadius, int minStackSize = 2, int maxStackSize = int.MaxValue, bool alwaysShowSpreads = false) + : UniformStackSpread(module, stackRadius, spreadRadius, minStackSize, maxStackSize, alwaysShowSpreads) { - public ActionID StackAction { get; private init; } - public ActionID SpreadAction { get; private init; } + public ActionID StackAction { get; init; } = stackAID; + public ActionID SpreadAction { get; init; } = spreadAID; public int NumFinishedStacks { get; protected set; } public int NumFinishedSpreads { get; protected set; } - public CastStackSpread(ActionID stackAID, ActionID spreadAID, float stackRadius, float spreadRadius, int minStackSize = 2, int maxStackSize = int.MaxValue, bool alwaysShowSpreads = false) - : base(stackRadius, spreadRadius, minStackSize, maxStackSize, alwaysShowSpreads) - { - StackAction = stackAID; - SpreadAction = spreadAID; - } - - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { - if (spell.Action == StackAction && module.WorldState.Actors.Find(spell.TargetID) is var stackTarget && stackTarget != null) + if (spell.Action == StackAction && WorldState.Actors.Find(spell.TargetID) is var stackTarget && stackTarget != null) { AddStack(stackTarget, spell.NPCFinishAt); } - else if (spell.Action == SpreadAction && module.WorldState.Actors.Find(spell.TargetID) is var spreadTarget && spreadTarget != null) + else if (spell.Action == SpreadAction && WorldState.Actors.Find(spell.TargetID) is var spreadTarget && spreadTarget != null) { AddSpread(spreadTarget, spell.NPCFinishAt); } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if (spell.Action == StackAction) { @@ -260,51 +220,36 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn } // generic 'spread from targets of specific cast' mechanic -public class SpreadFromCastTargets : CastStackSpread -{ - public SpreadFromCastTargets(ActionID aid, float radius, bool drawAllSpreads = true) : base(new(), aid, 0, radius, alwaysShowSpreads: drawAllSpreads) { } -} +public class SpreadFromCastTargets(BossModule module, ActionID aid, float radius, bool drawAllSpreads = true) : CastStackSpread(module, default, aid, 0, radius, alwaysShowSpreads: drawAllSpreads); // generic 'stack with targets of specific cast' mechanic -public class StackWithCastTargets : CastStackSpread -{ - public StackWithCastTargets(ActionID aid, float radius, int minStackSize = 2, int maxStackSize = int.MaxValue) : base(aid, new(), radius, 0, minStackSize, maxStackSize) { } -} +public class StackWithCastTargets(BossModule module, ActionID aid, float radius, int minStackSize = 2, int maxStackSize = int.MaxValue) : CastStackSpread(module, aid, default, radius, 0, minStackSize, maxStackSize); // spread/stack mechanic that selects targets by icon and finishes by cast event -public class IconStackSpread : UniformStackSpread +public class IconStackSpread(BossModule module, uint stackIcon, uint spreadIcon, ActionID stackAID, ActionID spreadAID, float stackRadius, float spreadRadius, float activationDelay, int minStackSize = 2, int maxStackSize = int.MaxValue, bool alwaysShowSpreads = false) + : UniformStackSpread(module, stackRadius, spreadRadius, minStackSize, maxStackSize, alwaysShowSpreads) { - public uint StackIcon { get; private init; } - public uint SpreadIcon { get; private init; } - public ActionID StackAction { get; private init; } - public ActionID SpreadAction { get; private init; } - public float ActivationDelay { get; private init; } + public uint StackIcon { get; init; } = stackIcon; + public uint SpreadIcon { get; init; } = spreadIcon; + public ActionID StackAction { get; init; } = stackAID; + public ActionID SpreadAction { get; init; } = spreadAID; + public float ActivationDelay { get; init; } = activationDelay; public int NumFinishedStacks { get; protected set; } public int NumFinishedSpreads { get; protected set; } - public IconStackSpread(uint stackIcon, uint spreadIcon, ActionID stackAID, ActionID spreadAID, float stackRadius, float spreadRadius, float activationDelay, int minStackSize = 2, int maxStackSize = int.MaxValue, bool alwaysShowSpreads = false) - : base(stackRadius, spreadRadius, minStackSize, maxStackSize, alwaysShowSpreads) - { - StackIcon = stackIcon; - SpreadIcon = spreadIcon; - StackAction = stackAID; - SpreadAction = spreadAID; - ActivationDelay = activationDelay; - } - - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == StackIcon) { - AddStack(actor, module.WorldState.CurrentTime.AddSeconds(ActivationDelay)); + AddStack(actor, WorldState.FutureTime(ActivationDelay)); } else if (iconID == SpreadIcon) { - AddSpread(actor, module.WorldState.CurrentTime.AddSeconds(ActivationDelay)); + AddSpread(actor, WorldState.FutureTime(ActivationDelay)); } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if (spell.Action == StackAction) { @@ -320,13 +265,7 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } // generic 'spread from actors with specific icon' mechanic -public class SpreadFromIcon : IconStackSpread -{ - public SpreadFromIcon(uint icon, ActionID aid, float radius, float activationDelay, bool drawAllSpreads = true) : base(0, icon, default, aid, 0, radius, activationDelay, alwaysShowSpreads: drawAllSpreads) { } -} +public class SpreadFromIcon(BossModule module, uint icon, ActionID aid, float radius, float activationDelay, bool drawAllSpreads = true) : IconStackSpread(module, 0, icon, default, aid, 0, radius, activationDelay, alwaysShowSpreads: drawAllSpreads); // generic 'stack with actors with specific icon' mechanic -public class StackWithIcon : IconStackSpread -{ - public StackWithIcon(uint icon, ActionID aid, float radius, float activationDelay, int minStackSize = 2, int maxStackSize = int.MaxValue) : base(icon, 0, aid, default, radius, 0, activationDelay, minStackSize, maxStackSize) { } -} +public class StackWithIcon(BossModule module, uint icon, ActionID aid, float radius, float activationDelay, int minStackSize = 2, int maxStackSize = int.MaxValue) : IconStackSpread(module, icon, 0, aid, default, radius, 0, activationDelay, minStackSize, maxStackSize); diff --git a/BossMod/Components/StayMove.cs b/BossMod/Components/StayMove.cs index c6eed4a5c6..ebe8aa7c4d 100644 --- a/BossMod/Components/StayMove.cs +++ b/BossMod/Components/StayMove.cs @@ -1,20 +1,20 @@ namespace BossMod.Components; // component for mechanics that either require players to move or stay still -public class StayMove : BossComponent +public class StayMove(BossModule module) : BossComponent(module) { public enum Requirement { None, Stay, Move } public Requirement[] Requirements = new Requirement[PartyState.MaxPartySize]; private (Vector3 prev, Vector3 curr)[] _lastPositions = new (Vector3, Vector3)[PartyState.MaxPartySize]; - public override void Update(BossModule module) + public override void Update() { for (int i = 0; i < _lastPositions.Length; ++i) - _lastPositions[i] = (_lastPositions[i].curr, module.Raid[i]?.PosRot.XYZ() ?? default); + _lastPositions[i] = (_lastPositions[i].curr, Raid[i]?.PosRot.XYZ() ?? default); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { switch (Requirements[slot]) { diff --git a/BossMod/Components/TankbusterTether.cs b/BossMod/Components/TankbusterTether.cs index 4926d03fdf..aaf56d1bd3 100644 --- a/BossMod/Components/TankbusterTether.cs +++ b/BossMod/Components/TankbusterTether.cs @@ -1,34 +1,28 @@ namespace BossMod.Components; // generic component for tankbuster at tethered targets; tanks are supposed to intercept tethers and gtfo from the raid -public class TankbusterTether : CastCounter +public class TankbusterTether(BossModule module, ActionID aid, uint tetherID, float radius) : CastCounter(module, aid) { - public uint TID { get; private init; } - public float Radius { get; private init; } + public uint TID { get; init; } = tetherID; + public float Radius { get; init; } = radius; private List<(Actor Player, Actor Enemy)> _tethers = new(); private BitMask _tetheredPlayers; private BitMask _inAnyAOE; // players hit by aoe, excluding selves public bool Active => _tetheredPlayers.Any(); - public TankbusterTether(ActionID aid, uint tetherID, float radius) : base(aid) - { - TID = tetherID; - Radius = radius; - } - - public override void Update(BossModule module) + public override void Update() { _inAnyAOE = new(); foreach (int slot in _tetheredPlayers.SetBits()) { - var target = module.Raid[slot]; + var target = Raid[slot]; if (target != null) - _inAnyAOE |= module.Raid.WithSlot().InRadiusExcluding(target, Radius).Mask(); + _inAnyAOE |= Raid.WithSlot().InRadiusExcluding(target, Radius).Mask(); } } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (!Active) return; @@ -39,7 +33,7 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint { hints.Add("Grab the tether!"); } - else if (module.Raid.WithoutSlot().InRadiusExcluding(actor, Radius).Any()) + else if (Raid.WithoutSlot().InRadiusExcluding(actor, Radius).Any()) { hints.Add("GTFO from raid!"); } @@ -57,7 +51,7 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } } - public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) + public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) { if (_tetheredPlayers[playerSlot]) return PlayerPriority.Danger; @@ -70,23 +64,23 @@ public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor return PlayerPriority.Irrelevant; } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { // show tethered targets with circles foreach (var side in _tethers) { - if (arena.Config.ShowOutlinesAndShadows) - arena.AddLine(side.Enemy.Position, side.Player.Position, 0xFF000000, 2); - arena.AddLine(side.Enemy.Position, side.Player.Position, side.Player.Role == Role.Tank ? ArenaColor.Safe : ArenaColor.Danger); - if (arena.Config.ShowOutlinesAndShadows) - arena.AddCircle(side.Player.Position, Radius, 0xFF000000, 2); - arena.AddCircle(side.Player.Position, Radius, ArenaColor.Danger); + if (Arena.Config.ShowOutlinesAndShadows) + Arena.AddLine(side.Enemy.Position, side.Player.Position, 0xFF000000, 2); + Arena.AddLine(side.Enemy.Position, side.Player.Position, side.Player.Role == Role.Tank ? ArenaColor.Safe : ArenaColor.Danger); + if (Arena.Config.ShowOutlinesAndShadows) + Arena.AddCircle(side.Player.Position, Radius, 0xFF000000, 2); + Arena.AddCircle(side.Player.Position, Radius, ArenaColor.Danger); } } - public override void OnTethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnTethered(Actor source, ActorTetherInfo tether) { - var sides = DetermineTetherSides(module, source, tether); + var sides = DetermineTetherSides(source, tether); if (sides != null) { _tethers.Add((sides.Value.Player, sides.Value.Enemy)); @@ -94,9 +88,9 @@ public override void OnTethered(BossModule module, Actor source, ActorTetherInfo } } - public override void OnUntethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnUntethered(Actor source, ActorTetherInfo tether) { - var sides = DetermineTetherSides(module, source, tether); + var sides = DetermineTetherSides(source, tether); if (sides != null) { _tethers.Remove((sides.Value.Player, sides.Value.Enemy)); @@ -105,26 +99,26 @@ public override void OnUntethered(BossModule module, Actor source, ActorTetherIn } // we support both player->enemy and enemy->player tethers - private (int PlayerSlot, Actor Player, Actor Enemy)? DetermineTetherSides(BossModule module, Actor source, ActorTetherInfo tether) + private (int PlayerSlot, Actor Player, Actor Enemy)? DetermineTetherSides(Actor source, ActorTetherInfo tether) { if (tether.ID != TID) return null; - var target = module.WorldState.Actors.Find(tether.Target); + var target = WorldState.Actors.Find(tether.Target); if (target == null) return null; var (player, enemy) = source.Type == ActorType.Player ? (source, target) : (target, source); if (player.Type != ActorType.Player || enemy.Type == ActorType.Player) { - module.ReportError(this, $"Unexpected tether pair: {source.InstanceID:X} -> {target.InstanceID:X}"); + ReportError($"Unexpected tether pair: {source.InstanceID:X} -> {target.InstanceID:X}"); return null; } - var playerSlot = module.Raid.FindSlot(player.InstanceID); + var playerSlot = Raid.FindSlot(player.InstanceID); if (playerSlot < 0) { - module.ReportError(this, $"Non-party-member player is tethered: {source.InstanceID:X} -> {target.InstanceID:X}"); + ReportError($"Non-party-member player is tethered: {source.InstanceID:X} -> {target.InstanceID:X}"); return null; } diff --git a/BossMod/Components/Towers.cs b/BossMod/Components/Towers.cs index 25bda1be06..015043e93d 100644 --- a/BossMod/Components/Towers.cs +++ b/BossMod/Components/Towers.cs @@ -1,24 +1,9 @@ namespace BossMod.Components; -public class GenericTowers : CastCounter +public class GenericTowers(BossModule module, ActionID aid = default) : CastCounter(module, aid) { - public struct Tower + public record struct Tower(WPos Position, float Radius, int MinSoakers = 1, int MaxSoakers = 1, BitMask ForbiddenSoakers = default) { - public WPos Position; - public float Radius; - public int MinSoakers; - public int MaxSoakers; - public BitMask ForbiddenSoakers; - - public Tower(WPos position, float radius, int minSoakers = 1, int maxSoakers = 1, BitMask forbiddenSoakers = default) - { - Position = position; - Radius = radius; - MinSoakers = minSoakers; - MaxSoakers = maxSoakers; - ForbiddenSoakers = forbiddenSoakers; - } - public bool IsInside(WPos pos) => pos.InCircle(Position, Radius); public bool IsInside(Actor actor) => IsInside(actor.Position); public int NumInside(BossModule module) => module.Raid.WithSlot().ExcludedFromMask(ForbiddenSoakers).InRadius(Position, Radius).Count(); @@ -35,9 +20,7 @@ public static void DrawTower(MiniArena arena, WPos pos, float radius, bool safe) arena.AddCircle(pos, radius, safe ? ArenaColor.Safe : ArenaColor.Danger, 2); } - public GenericTowers(ActionID aid = default) : base(aid) { } - - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (Towers.Any(t => t.ForbiddenSoakers[slot] && t.IsInside(actor))) { @@ -45,52 +28,45 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } else if (Towers.FindIndex(t => !t.ForbiddenSoakers[slot] && t.IsInside(actor)) is var soakedIndex && soakedIndex >= 0) // note: this assumes towers don't overlap { - var count = Towers[soakedIndex].NumInside(module); + var count = Towers[soakedIndex].NumInside(Module); if (count < Towers[soakedIndex].MinSoakers) hints.Add("Too few soakers in the tower!"); else if (count > Towers[soakedIndex].MaxSoakers) hints.Add("Too many soakers in the tower!"); } - else if (Towers.Any(t => !t.ForbiddenSoakers[slot] && !t.CorrectAmountInside(module))) + else if (Towers.Any(t => !t.ForbiddenSoakers[slot] && !t.CorrectAmountInside(Module))) { hints.Add("Soak the tower!"); } } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (var t in Towers) - DrawTower(arena, t.Position, t.Radius, !t.ForbiddenSoakers[pcSlot]); + DrawTower(Arena, t.Position, t.Radius, !t.ForbiddenSoakers[pcSlot]); } } -public class CastTowers : GenericTowers +public class CastTowers(BossModule module, ActionID aid, float radius, int minSoakers = 1, int maxSoakers = 1) : GenericTowers(module, aid) { - public float Radius; - public int MinSoakers; - public int MaxSoakers; - - public CastTowers(ActionID aid, float radius, int minSoakers = 1, int maxSoakers = 1) : base(aid) - { - Radius = radius; - MinSoakers = minSoakers; - MaxSoakers = maxSoakers; - } + public float Radius = radius; + public int MinSoakers = minSoakers; + public int MaxSoakers = maxSoakers; - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) - Towers.Add(new(DeterminePosition(module, caster, spell), Radius, MinSoakers, MaxSoakers)); + Towers.Add(new(DeterminePosition(caster, spell), Radius, MinSoakers, MaxSoakers)); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) { - var pos = DeterminePosition(module, caster, spell); + var pos = DeterminePosition(caster, spell); Towers.RemoveAll(t => t.Position.AlmostEqual(pos, 1)); } } - private WPos DeterminePosition(BossModule module, Actor caster, ActorCastInfo spell) => spell.TargetID == caster.InstanceID ? caster.Position : module.WorldState.Actors.Find(spell.TargetID)?.Position ?? spell.LocXZ; + private WPos DeterminePosition(Actor caster, ActorCastInfo spell) => spell.TargetID == caster.InstanceID ? caster.Position : WorldState.Actors.Find(spell.TargetID)?.Position ?? spell.LocXZ; } diff --git a/BossMod/Components/Twister.cs b/BossMod/Components/Twister.cs index 1a7243c32f..b35edc6408 100644 --- a/BossMod/Components/Twister.cs +++ b/BossMod/Components/Twister.cs @@ -6,27 +6,28 @@ public class GenericTwister : GenericAOEs { private AOEShapeCircle _shape; private uint _twisterOID; + protected IReadOnlyList Twisters; protected DateTime PredictedActivation; protected List PredictedPositions = new(); - protected IReadOnlyList Twisters = ActorEnumeration.EmptyList; public IEnumerable ActiveTwisters => Twisters.Where(v => v.EventState != 7); public bool Active => ActiveTwisters.Count() > 0; - public GenericTwister(float radius, uint oid, ActionID aid = default) : base(aid, "GTFO from twister!") + public GenericTwister(BossModule module, float radius, uint oid, ActionID aid = default) : base(module, aid, "GTFO from twister!") { _shape = new(radius); _twisterOID = oid; + Twisters = module.Enemies(oid); } - public void AddPredicted(BossModule module, float activationDelay) + public void AddPredicted(float activationDelay) { PredictedPositions.Clear(); - PredictedPositions.AddRange(module.Raid.WithoutSlot().Select(a => a.Position)); - PredictedActivation = module.WorldState.CurrentTime.AddSeconds(activationDelay); + PredictedPositions.AddRange(Raid.WithoutSlot().Select(a => a.Position)); + PredictedActivation = WorldState.FutureTime(activationDelay); } - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { foreach (var p in PredictedPositions) yield return new(_shape, p, default, PredictedActivation); @@ -34,12 +35,7 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, yield return new(_shape, p.Position); } - public override void Init(BossModule module) - { - Twisters = module.Enemies(_twisterOID); - } - - public override void OnActorCreated(BossModule module, Actor actor) + public override void OnActorCreated(Actor actor) { if (actor.OID == _twisterOID) PredictedPositions.Clear(); @@ -49,43 +45,29 @@ public override void OnActorCreated(BossModule module, Actor actor) // twister that activates immediately on init public class ImmediateTwister : GenericTwister { - private float _activationDelay; - - public ImmediateTwister(float radius, uint oid, float activationDelay) : base(radius, oid) - { - _activationDelay = activationDelay; - } - - public override void Init(BossModule module) + public ImmediateTwister(BossModule module, float radius, uint oid, float activationDelay) : base(module, radius, oid) { - base.Init(module); - AddPredicted(module, _activationDelay); + AddPredicted(activationDelay); } } // twister that activates on cast end, or slightly before -public class CastTwister : GenericTwister +public class CastTwister(BossModule module, float radius, uint oid, ActionID aid, float activationDelay, float predictBeforeCastEnd = 0) : GenericTwister(module, radius, oid, aid) { - private float _activationDelay; // from cast-end to twister spawn - private float _predictBeforeCastEnd; + private float _activationDelay = activationDelay; // from cast-end to twister spawn + private float _predictBeforeCastEnd = predictBeforeCastEnd; private DateTime _predictStart = DateTime.MaxValue; - public CastTwister(float radius, uint oid, ActionID aid, float activationDelay, float predictBeforeCastEnd = 0) : base(radius, oid, aid) - { - _activationDelay = activationDelay; - _predictBeforeCastEnd = predictBeforeCastEnd; - } - - public override void Update(BossModule module) + public override void Update() { - if (PredictedPositions.Count == 0 && Twisters.Count == 0 && module.WorldState.CurrentTime >= _predictStart) + if (PredictedPositions.Count == 0 && Twisters.Count == 0 && WorldState.CurrentTime >= _predictStart) { - AddPredicted(module, _predictBeforeCastEnd + _activationDelay); + AddPredicted(_predictBeforeCastEnd + _activationDelay); _predictStart = DateTime.MaxValue; } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction && _predictStart == DateTime.MaxValue) { @@ -93,12 +75,12 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction && _predictStart < DateTime.MaxValue) { // cast finished earlier than expected, just activate things now - AddPredicted(module, _activationDelay); + AddPredicted(_activationDelay); _predictStart = DateTime.MaxValue; } } diff --git a/BossMod/Components/UnavoidableDamage.cs b/BossMod/Components/UnavoidableDamage.cs index efe25f0f83..0565ae4fea 100644 --- a/BossMod/Components/UnavoidableDamage.cs +++ b/BossMod/Components/UnavoidableDamage.cs @@ -1,43 +1,35 @@ namespace BossMod.Components; // generic unavoidable raidwide, started and finished by a single cast -public class RaidwideCast : CastHint +public class RaidwideCast(BossModule module, ActionID aid, string hint = "Raidwide") : CastHint(module, aid, hint) { - public RaidwideCast(ActionID aid, string hint = "Raidwide") : base(aid, hint) { } - - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { foreach (var c in Casters) - hints.PredictedDamage.Add((module.Raid.WithSlot().Mask(), c.CastInfo?.NPCFinishAt ?? default)); + hints.PredictedDamage.Add((Raid.WithSlot().Mask(), c.CastInfo?.NPCFinishAt ?? default)); } } // generic unavoidable raidwide, initiated by a custom condition and applied by an instant cast after a delay -public class RaidwideInstant : CastCounter +public class RaidwideInstant(BossModule module, ActionID aid, float delay, string hint = "Raidwide") : CastCounter(module, aid) { - public float Delay; - public string Hint; + public float Delay = delay; + public string Hint = hint; public DateTime Activation; // default if inactive, otherwise expected cast time - public RaidwideInstant(ActionID aid, float delay, string hint = "Raidwide") : base(aid) - { - Delay = delay; - Hint = hint; - } - - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (Activation != default && Hint.Length > 0) hints.Add(Hint); } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { if (Activation != default) - hints.PredictedDamage.Add((module.Raid.WithSlot().Mask(), Activation)); + hints.PredictedDamage.Add((Raid.WithSlot().Mask(), Activation)); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if (spell.Action == WatchedAction) { @@ -48,16 +40,11 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } // generic unavoidable instant raidwide initiated by a cast (usually visual-only) -public class RaidwideCastDelay : RaidwideInstant +public class RaidwideCastDelay(BossModule module, ActionID actionVisual, ActionID actionAOE, float delay, string hint = "Raidwide") : RaidwideInstant(module, actionAOE, delay, hint) { - public ActionID ActionVisual; - - public RaidwideCastDelay(ActionID actionVisual, ActionID actionAOE, float delay, string hint = "Raidwide") : base(actionAOE, delay, hint) - { - ActionVisual = actionVisual; - } + public ActionID ActionVisual = actionVisual; - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if (spell.Action == ActionVisual) Activation = spell.NPCFinishAt.AddSeconds(Delay); @@ -65,93 +52,72 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } // generic unavoidable instant raidwide cast initiated by NPC yell -public class RaidwideAfterNPCYell : RaidwideInstant +public class RaidwideAfterNPCYell(BossModule module, ActionID aid, uint npcYellID, float delay, string hint = "Raidwide") : RaidwideInstant(module, aid, delay, hint) { - public uint NPCYellID; - - public RaidwideAfterNPCYell(ActionID aid, uint npcYellID, float delay, string hint = "Raidwide") : base(aid, delay, hint) - { - NPCYellID = npcYellID; - } + public uint NPCYellID = npcYellID; - public override void OnActorNpcYell(BossModule module, Actor actor, ushort id) + public override void OnActorNpcYell(Actor actor, ushort id) { if (id == NPCYellID) - Activation = module.WorldState.CurrentTime.AddSeconds(Delay); + Activation = WorldState.FutureTime(Delay); } } // generic unavoidable single-target damage, started and finished by a single cast (typically tankbuster, but not necessary) -public class SingleTargetCast : CastHint +public class SingleTargetCast(BossModule module, ActionID aid, string hint = "Tankbuster") : CastHint(module, aid, hint) { - public SingleTargetCast(ActionID aid, string hint = "Tankbuster") : base(aid, hint) { } - - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { foreach (var c in Casters) { if (c.CastInfo != null) { - hints.PredictedDamage.Add((new BitMask().WithBit(module.Raid.FindSlot(c.CastInfo.TargetID)), c.CastInfo.NPCFinishAt)); + hints.PredictedDamage.Add((new BitMask().WithBit(Raid.FindSlot(c.CastInfo.TargetID)), c.CastInfo.NPCFinishAt)); } } } } // generic unavoidable single-target damage, initiated by a custom condition and applied by an instant cast after a delay -public class SingleTargetInstant : CastCounter +public class SingleTargetInstant(BossModule module, ActionID aid, float delay, string hint = "Tankbuster") : CastCounter(module, aid) { - public float Delay; // delay from visual cast end to cast event - public string Hint; - public List<(int slot, DateTime activation)> Targets = new(); + public float Delay = delay; // delay from visual cast end to cast event + public string Hint = hint; + public readonly List<(int slot, DateTime activation)> Targets = new(); - public SingleTargetInstant(ActionID aid, float delay, string hint = "Tankbuster") : base(aid) - { - Delay = delay; - Hint = hint; - } - - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (Targets.Count > 0 && Hint.Length > 0) hints.Add(Hint); } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { foreach (var t in Targets) hints.PredictedDamage.Add((new BitMask().WithBit(t.slot), t.activation)); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if (spell.Action == WatchedAction) { ++NumCasts; - Targets.RemoveAll(t => module.Raid[t.slot]?.InstanceID == spell.MainTargetID); + Targets.RemoveAll(t => Raid[t.slot]?.InstanceID == spell.MainTargetID); } } } // generic unavoidable instant single-target damage initiated by a cast (usually visual-only) -public class SingleTargetCastDelay : SingleTargetInstant +public class SingleTargetCastDelay(BossModule module, ActionID actionVisual, ActionID actionAOE, float delay, string hint = "Tankbuster") : SingleTargetInstant(module, actionAOE, delay, hint) { - public ActionID ActionVisual; + public ActionID ActionVisual = actionVisual; - public SingleTargetCastDelay(ActionID actionVisual, ActionID actionAOE, float delay, string hint = "Tankbuster") : base(actionAOE, delay, hint) - { - ActionVisual = actionVisual; - } - - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if (spell.Action == ActionVisual) - Targets.Add((module.Raid.FindSlot(spell.TargetID), spell.NPCFinishAt.AddSeconds(Delay))); + Targets.Add((Raid.FindSlot(spell.TargetID), spell.NPCFinishAt.AddSeconds(Delay))); } } // generic unavoidable single-target damage, started and finished by a single cast, that can be delayed by moving out of range (typically tankbuster, but not necessary) -public class SingleTargetDelayableCast : SingleTargetCastDelay -{ - public SingleTargetDelayableCast(ActionID aid, string hint = "Tankbuster") : base(aid, aid, 0, hint) { } -} +public class SingleTargetDelayableCast(BossModule module, ActionID aid, string hint = "Tankbuster") : SingleTargetCastDelay(module, aid, aid, 0, hint); diff --git a/BossMod/Components/WildCharge.cs b/BossMod/Components/WildCharge.cs index cc3527ceef..34c37483cb 100644 --- a/BossMod/Components/WildCharge.cs +++ b/BossMod/Components/WildCharge.cs @@ -1,7 +1,7 @@ namespace BossMod.Components; // generic 'wild charge': various mechanics that consist of charge aoe on some target that other players have to stay in; optionally some players can be marked as 'having to be closest to source' (usually tanks) -public class GenericWildCharge : CastCounter +public class GenericWildCharge(BossModule module, float halfWidth, ActionID aid = default) : CastCounter(module, aid) { public enum PlayerRole { @@ -12,22 +12,17 @@ public enum PlayerRole Avoid, // player has to avoid aoe } - public float HalfWidth; + public float HalfWidth = halfWidth; public float FixedLength; // if == 0, length is up to target public Actor? Source; // if null, mechanic is not active public PlayerRole[] PlayerRoles = new PlayerRole[PartyState.MaxAllianceSize]; - public GenericWildCharge(float halfWidth, ActionID aid = new()) : base(aid) - { - HalfWidth = halfWidth; - } - - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (Source == null || PlayerRoles[slot] is PlayerRole.Ignore or PlayerRole.Target) // TODO: consider hints for target?.. return; - var target = module.Raid[Array.IndexOf(PlayerRoles, PlayerRole.Target)]; + var target = Raid[Array.IndexOf(PlayerRoles, PlayerRole.Target)]; if (target == null) return; @@ -40,13 +35,13 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint case PlayerRole.Share: if (!inAOE) hints.Add("Stay inside charge!"); - else if (AnyRoleCloser(module, Source.Position, dir, length, PlayerRole.ShareNotFirst, (actor.Position - Source.Position).LengthSq())) + else if (AnyRoleCloser(Source.Position, dir, length, PlayerRole.ShareNotFirst, (actor.Position - Source.Position).LengthSq())) hints.Add("Move closer to charge source!"); break; case PlayerRole.ShareNotFirst: if (!inAOE) hints.Add("Stay inside charge!"); - else if (!AnyRoleCloser(module, Source.Position, dir, length, PlayerRole.Share, (actor.Position - Source.Position).LengthSq())) + else if (!AnyRoleCloser(Source.Position, dir, length, PlayerRole.Share, (actor.Position - Source.Position).LengthSq())) hints.Add("Hide behind tank!"); break; case PlayerRole.Avoid: @@ -56,26 +51,26 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { // TODO: implement } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { if (Source == null || PlayerRoles[pcSlot] == PlayerRole.Ignore) return; - var target = module.Raid[Array.IndexOf(PlayerRoles, PlayerRole.Target)]; + var target = Raid[Array.IndexOf(PlayerRoles, PlayerRole.Target)]; if (target != null) { var dir = target.Position - Source.Position; var length = FixedLength > 0 ? FixedLength : dir.Length(); dir = dir.Normalized(); - arena.ZoneRect(Source.Position, dir, length, 0, HalfWidth, PlayerRoles[pcSlot] == PlayerRole.Avoid ? ArenaColor.AOE : ArenaColor.SafeFromAOE); + Arena.ZoneRect(Source.Position, dir, length, 0, HalfWidth, PlayerRoles[pcSlot] == PlayerRole.Avoid ? ArenaColor.AOE : ArenaColor.SafeFromAOE); } } - private bool AnyRoleCloser(BossModule module, WPos sourcePos, WDir direction, float length, PlayerRole role, float thresholdSq) - => module.Raid.WithSlot().Any(ia => PlayerRoles[ia.Item1] == role && ia.Item2.Position.InRect(sourcePos, direction, length, 0, HalfWidth) && (ia.Item2.Position - sourcePos).LengthSq() < thresholdSq); + private bool AnyRoleCloser(WPos sourcePos, WDir direction, float length, PlayerRole role, float thresholdSq) + => Raid.WithSlot().Any(ia => PlayerRoles[ia.Item1] == role && ia.Item2.Position.InRect(sourcePos, direction, length, 0, HalfWidth) && (ia.Item2.Position - sourcePos).LengthSq() < thresholdSq); } diff --git a/BossMod/Data/WorldState.cs b/BossMod/Data/WorldState.cs index 20aa9ed008..22fd7fae0d 100644 --- a/BossMod/Data/WorldState.cs +++ b/BossMod/Data/WorldState.cs @@ -19,6 +19,7 @@ public class WorldState public PendingEffects PendingEffects { get; init; } = new(); public DateTime CurrentTime => Frame.Timestamp; + public DateTime FutureTime(float deltaSeconds) => Frame.Timestamp.AddSeconds(deltaSeconds); public WorldState(ulong qpf, string gameVersion) { diff --git a/TODO b/TODO index 90c2d0f42e..a45e0615c5 100644 --- a/TODO +++ b/TODO @@ -16,6 +16,7 @@ network rework: - utility to inject custom ipcs to the stream for debugging? general: +- knockback/forced movement projected actor - along line rather than from center - autoreplay improvements - react to module manager transitions? - better timing tracking for: statuses, gauges, cooldowns, cast times, anim lock, ... - constrain bossmodules to zone id (e.g. for T04) From 01e76eab031fbc1ccdc52ae95cca9f5a5e1b58aa Mon Sep 17 00:00:00 2001 From: Andrew Gilewsky Date: Mon, 8 Apr 2024 16:32:28 +0100 Subject: [PATCH 07/18] Fixed framework. --- BossMod/BossModule/BossModule.cs | 75 ++++++++++--------- BossMod/BossModule/BossModuleHintsWindow.cs | 2 +- BossMod/BossModule/BossModuleMainWindow.cs | 6 +- BossMod/Modules/DemoModule.cs | 24 +++--- .../Visualization/ReplayDetailsWindow.cs | 2 +- 5 files changed, 58 insertions(+), 51 deletions(-) diff --git a/BossMod/BossModule/BossModule.cs b/BossMod/BossModule/BossModule.cs index 43242dd5e5..b75522582e 100644 --- a/BossMod/BossModule/BossModule.cs +++ b/BossMod/BossModule/BossModule.cs @@ -40,34 +40,31 @@ public IReadOnlyList Enemies(uint oid) public IReadOnlyList Components => _components; public T? FindComponent() where T : BossComponent => _components.OfType().FirstOrDefault(); - public void ActivateComponent() where T : BossComponent, new() + public void ActivateComponent() where T : BossComponent { if (FindComponent() != null) { ReportError(null, $"State {StateMachine.ActiveState?.ID:X}: Activating a component of type {typeof(T)} when another of the same type is already active; old one is deactivated automatically"); DeactivateComponent(); } - T comp = new(); + var comp = New.Create(this); _components.Add(comp); - // execute init customization point - comp.Init(this); - // execute callbacks for existing state foreach (var actor in WorldState.Actors) { bool nonPlayer = actor.Type is not ActorType.Player and not ActorType.Pet and not ActorType.Chocobo; if (nonPlayer) { - comp.OnActorCreated(this, actor); + comp.OnActorCreated(actor); if (actor.CastInfo?.IsSpell() ?? false) - comp.OnCastStarted(this, actor, actor.CastInfo); + comp.OnCastStarted(actor, actor.CastInfo); } if (actor.Tether.ID != 0) - comp.OnTethered(this, actor, actor.Tether); + comp.OnTethered(actor, actor.Tether); for (int i = 0; i < actor.Statuses.Length; ++i) if (actor.Statuses[i].ID != 0) - comp.OnStatusGain(this, actor, actor.Statuses[i]); + comp.OnStatusGain(actor, actor.Statuses[i]); } } @@ -171,17 +168,17 @@ public void Update() { UpdateModule(); foreach (var comp in _components) - comp.Update(this); + comp.Update(); } } - public void Draw(float cameraAzimuth, int pcSlot, BossComponent.MovementHints? pcMovementHints, bool includeText, bool includeArena) + public void Draw(float cameraAzimuth, int pcSlot, bool includeText, bool includeArena) { var pc = Raid[pcSlot]; if (pc == null) return; - var pcHints = CalculateHintsForRaidMember(pcSlot, pc, pcMovementHints); + var pcHints = CalculateHintsForRaidMember(pcSlot, pc); if (includeText) { if (WindowConfig.ShowMechanicTimers) @@ -206,7 +203,7 @@ public virtual void DrawArena(int pcSlot, Actor pc, bool haveRisks) // draw background DrawArenaBackground(pcSlot, pc); foreach (var comp in _components) - comp.DrawArenaBackground(this, pcSlot, pc, Arena); + comp.DrawArenaBackground(pcSlot, pc); // draw borders if (WindowConfig.ShowBorder) @@ -222,18 +219,26 @@ public virtual void DrawArena(int pcSlot, Actor pc, bool haveRisks) // draw foreground DrawArenaForeground(pcSlot, pc); foreach (var comp in _components) - comp.DrawArenaForeground(this, pcSlot, pc, Arena); + comp.DrawArenaForeground(pcSlot, pc); // draw enemies & player DrawEnemies(pcSlot, pc); Arena.Actor(pc, ArenaColor.PC, true); } - public BossComponent.TextHints CalculateHintsForRaidMember(int slot, Actor actor, BossComponent.MovementHints? movementHints = null) + public BossComponent.TextHints CalculateHintsForRaidMember(int slot, Actor actor) { BossComponent.TextHints hints = new(); foreach (var comp in _components) - comp.AddHints(this, slot, actor, hints, movementHints); + comp.AddHints(slot, actor, hints); + return hints; + } + + public BossComponent.MovementHints CalculateMovementHintsForRaidMember(int slot, Actor actor) + { + BossComponent.MovementHints hints = new(); + foreach (var comp in _components) + comp.AddMovementHints(slot, actor, hints); return hints; } @@ -241,7 +246,7 @@ public BossComponent.GlobalHints CalculateGlobalHints() { BossComponent.GlobalHints hints = new(); foreach (var comp in _components) - comp.AddGlobalHints(this, hints); + comp.AddGlobalHints(hints); return hints; } @@ -250,7 +255,7 @@ public virtual void CalculateAIHints(int slot, Actor actor, PartyRolesConfig.Ass { hints.Bounds = Bounds; foreach (var comp in _components) - comp.AddAIHints(this, slot, actor, assignment, hints); + comp.AddAIHints(slot, actor, assignment, hints); } public virtual bool NeedToJump(WPos from, WDir dir) => false; // if arena has complicated shape that requires jumps to navigate, module can provide this info to AI @@ -350,7 +355,7 @@ private void DrawPartyMembers(int pcSlot, Actor pc) foreach (var s in _components) { uint subColor = 0; - var subPrio = s.CalcPriority(this, pcSlot, pc, playerSlot, player, ref subColor); + var subPrio = s.CalcPriority(pcSlot, pc, playerSlot, player, ref subColor); if (subPrio > highestPrio) { highestPrio = subPrio; @@ -371,7 +376,7 @@ private void OnActorCreated(Actor actor) _relevantEnemies.GetValueOrDefault(actor.OID)?.Add(actor); if (actor.Type is not ActorType.Player and not ActorType.Pet and not ActorType.Chocobo) foreach (var comp in _components) - comp.OnActorCreated(this, actor); + comp.OnActorCreated(actor); } private void OnActorDestroyed(Actor actor) @@ -379,94 +384,94 @@ private void OnActorDestroyed(Actor actor) _relevantEnemies.GetValueOrDefault(actor.OID)?.Remove(actor); if (actor.Type is not ActorType.Player and not ActorType.Pet and not ActorType.Chocobo) foreach (var comp in _components) - comp.OnActorDestroyed(this, actor); + comp.OnActorDestroyed(actor); } private void OnActorCastStarted(Actor actor) { if ((actor.Type is not ActorType.Player and not ActorType.Pet and not ActorType.Chocobo) && (actor.CastInfo?.IsSpell() ?? false)) foreach (var comp in _components) - comp.OnCastStarted(this, actor, actor.CastInfo); + comp.OnCastStarted(actor, actor.CastInfo); } private void OnActorCastFinished(Actor actor) { if ((actor.Type is not ActorType.Player and not ActorType.Pet and not ActorType.Chocobo) && (actor.CastInfo?.IsSpell() ?? false)) foreach (var comp in _components) - comp.OnCastFinished(this, actor, actor.CastInfo); + comp.OnCastFinished(actor, actor.CastInfo); } private void OnActorTethered(Actor actor) { foreach (var comp in _components) - comp.OnTethered(this, actor, actor.Tether); + comp.OnTethered(actor, actor.Tether); } private void OnActorUntethered(Actor actor) { foreach (var comp in _components) - comp.OnUntethered(this, actor, actor.Tether); + comp.OnUntethered(actor, actor.Tether); } private void OnActorStatusGain(Actor actor, int index) { foreach (var comp in _components) - comp.OnStatusGain(this, actor, actor.Statuses[index]); + comp.OnStatusGain(actor, actor.Statuses[index]); } private void OnActorStatusLose(Actor actor, int index) { foreach (var comp in _components) - comp.OnStatusLose(this, actor, actor.Statuses[index]); + comp.OnStatusLose(actor, actor.Statuses[index]); } private void OnActorIcon(Actor actor, uint iconID) { foreach (var comp in _components) - comp.OnEventIcon(this, actor, iconID); + comp.OnEventIcon(actor, iconID); } private void OnActorCastEvent(Actor actor, ActorCastEvent cast) { if ((actor.Type is not ActorType.Player and not ActorType.Pet and not ActorType.Chocobo) && cast.IsSpell()) foreach (var comp in _components) - comp.OnEventCast(this, actor, cast); + comp.OnEventCast(actor, cast); } private void OnActorEState(Actor actor, ushort state) { foreach (var comp in _components) - comp.OnActorEState(this, actor, state); + comp.OnActorEState(actor, state); } private void OnActorEAnim(Actor actor, ushort p1, ushort p2) { uint state = ((uint)p1 << 16) | p2; foreach (var comp in _components) - comp.OnActorEAnim(this, actor, state); + comp.OnActorEAnim(actor, state); } private void OnActorPlayActionTimelineEvent(Actor actor, ushort id) { foreach (var comp in _components) - comp.OnActorPlayActionTimelineEvent(this, actor, id); + comp.OnActorPlayActionTimelineEvent(actor, id); } private void OnActorNpcYell(Actor actor, ushort id) { foreach (var comp in _components) - comp.OnActorNpcYell(this, actor, id); + comp.OnActorNpcYell(actor, id); } private void OnActorModelStateChange(Actor actor) { foreach (var comp in _components) - comp.OnActorModelStateChange(this, actor, actor.ModelState.ModelState, actor.ModelState.AnimState1, actor.ModelState.AnimState2); + comp.OnActorModelStateChange(actor, actor.ModelState.ModelState, actor.ModelState.AnimState1, actor.ModelState.AnimState2); } private void OnEnvControl(WorldState.OpEnvControl op) { foreach (var comp in _components) - comp.OnEventEnvControl(this, op.Index, op.State); + comp.OnEventEnvControl(op.Index, op.State); } } diff --git a/BossMod/BossModule/BossModuleHintsWindow.cs b/BossMod/BossModule/BossModuleHintsWindow.cs index 3e0986ecec..20bfcbe933 100644 --- a/BossMod/BossModule/BossModuleHintsWindow.cs +++ b/BossMod/BossModule/BossModuleHintsWindow.cs @@ -24,7 +24,7 @@ public override void Draw() { try { - _mgr.ActiveModule?.Draw(0, PartyState.PlayerSlot, null, true, false); + _mgr.ActiveModule?.Draw(0, PartyState.PlayerSlot, true, false); } catch (Exception ex) { diff --git a/BossMod/BossModule/BossModuleMainWindow.cs b/BossMod/BossModule/BossModuleMainWindow.cs index f6cd46cc0b..a31340107d 100644 --- a/BossMod/BossModule/BossModuleMainWindow.cs +++ b/BossMod/BossModule/BossModuleMainWindow.cs @@ -57,9 +57,9 @@ public override void Draw() { try { - BossComponent.MovementHints? movementHints = _mgr.WindowConfig.ShowWorldArrows ? new() : null; - _mgr.ActiveModule.Draw(_mgr.WindowConfig.RotateArena ? (Camera.Instance?.CameraAzimuth ?? 0) : 0, PartyState.PlayerSlot, movementHints, !_mgr.WindowConfig.HintsInSeparateWindow, true); - DrawMovementHints(movementHints, _mgr.WorldState.Party.Player()?.PosRot.Y ?? 0); + _mgr.ActiveModule.Draw(_mgr.WindowConfig.RotateArena ? (Camera.Instance?.CameraAzimuth ?? 0) : 0, PartyState.PlayerSlot, !_mgr.WindowConfig.HintsInSeparateWindow, true); + if (_mgr.WindowConfig.ShowWorldArrows && _mgr.WorldState.Party[PartyState.PlayerSlot] is var pc && pc != null) + DrawMovementHints(_mgr.ActiveModule.CalculateMovementHintsForRaidMember(PartyState.PlayerSlot, pc), pc.PosRot.Y); } catch (Exception ex) { diff --git a/BossMod/Modules/DemoModule.cs b/BossMod/Modules/DemoModule.cs index 04f703959c..d842400877 100644 --- a/BossMod/Modules/DemoModule.cs +++ b/BossMod/Modules/DemoModule.cs @@ -2,34 +2,36 @@ public class DemoModule : BossModule { - private class DemoComponent : BossComponent + private class DemoComponent(BossModule module) : BossComponent(module) { - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { hints.Add("Hint", false); hints.Add("Risk"); - if (movementHints != null) - movementHints.Add(actor.Position, actor.Position + new WDir(10, 10), ArenaColor.Danger); } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddMovementHints(int slot, Actor actor, MovementHints movementHints) + { + movementHints.Add(actor.Position, actor.Position + new WDir(10, 10), ArenaColor.Danger); + } + + public override void AddGlobalHints(GlobalHints hints) { hints.Add("Global"); } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { - arena.ZoneCircle(module.Bounds.Center, 10, ArenaColor.AOE); + Arena.ZoneCircle(Module.Bounds.Center, 10, ArenaColor.AOE); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - arena.Actor(module.Bounds.Center, 0.Degrees(), ArenaColor.PC); + Arena.Actor(Module.Bounds.Center, 0.Degrees(), ArenaColor.PC); } } - public DemoModule(WorldState ws, Actor primary) - : base(ws, primary, new ArenaBoundsSquare(new(100, 100), 20)) + public DemoModule(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsSquare(new(100, 100), 20)) { ActivateComponent(); } diff --git a/BossMod/Replay/Visualization/ReplayDetailsWindow.cs b/BossMod/Replay/Visualization/ReplayDetailsWindow.cs index 6d009995a9..e1793d6399 100644 --- a/BossMod/Replay/Visualization/ReplayDetailsWindow.cs +++ b/BossMod/Replay/Visualization/ReplayDetailsWindow.cs @@ -57,7 +57,7 @@ public override void Draw() if (_mgr.ActiveModule != null) { var drawTimerPre = DateTime.Now; - _mgr.ActiveModule.Draw(_azimuth / 180 * MathF.PI, _povSlot, null, true, true); + _mgr.ActiveModule.Draw(_azimuth / 180 * MathF.PI, _povSlot, true, true); var drawTimerPost = DateTime.Now; var compList = string.Join(", ", _mgr.ActiveModule.Components.Select(c => c.GetType().Name)); From eec3c5e97c626cd4af97fc3fdcd61ba1ba999eac Mon Sep 17 00:00:00 2001 From: Andrew Gilewsky Date: Mon, 8 Apr 2024 17:58:04 +0100 Subject: [PATCH 08/18] Restored TEA module. --- BossMod/BossModule/StateMachineBuilder.cs | 10 +- BossMod/Components/PersistentVoidzone.cs | 26 ++--- .../Ultimate/TEA/ApocalypticRay.cs | 32 ++---- .../Shadowbringers/Ultimate/TEA/LimitCut.cs | 41 ++++--- .../Shadowbringers/Ultimate/TEA/P1Cascade.cs | 8 +- .../Ultimate/TEA/P1HandOfPain.cs | 10 +- .../Ultimate/TEA/P1HandOfPartingPrayer.cs | 8 +- .../Ultimate/TEA/P1JagdDolls.cs | 20 ++-- .../Ultimate/TEA/P1ProteanWaveLiquid.cs | 31 ++---- .../Ultimate/TEA/P1ProteanWaveTornado.cs | 28 ++--- .../Shadowbringers/Ultimate/TEA/P1Throttle.cs | 4 +- .../TEA/P2CompressedWaterLightning.cs | 31 +++--- .../Ultimate/TEA/P2Flarethrower.cs | 18 ++-- .../Ultimate/TEA/P2Intermission.cs | 56 +++++----- .../Ultimate/TEA/P2MissileCommand.cs | 38 +++---- .../Shadowbringers/Ultimate/TEA/P2Nisi.cs | 20 ++-- .../Ultimate/TEA/P2PlasmaShield.cs | 6 +- .../Ultimate/TEA/P2SuperJump.cs | 10 +- .../Ultimate/TEA/P3Inception1.cs | 50 +++++---- .../Ultimate/TEA/P3Inception2.cs | 12 +-- .../Ultimate/TEA/P3Inception3.cs | 40 ++++--- .../Ultimate/TEA/P3Inception4.cs | 10 +- .../Ultimate/TEA/P3TemporalStasis.cs | 74 ++++++------- .../Shadowbringers/Ultimate/TEA/P3Wormhole.cs | 71 ++++++------ .../Ultimate/TEA/P4AlmightyJudgment.cs | 10 +- .../Ultimate/TEA/P4FateCalibrationAlpha.cs | 56 +++++----- .../Ultimate/TEA/P4FateCalibrationBeta.cs | 50 ++++----- .../Ultimate/TEA/P4FateProjection.cs | 6 +- .../Ultimate/TEA/P4FinalWord.cs | 24 ++--- .../Ultimate/TEA/P4ForcedMarchDebuffs.cs | 22 ++-- .../Ultimate/TEA/P4OpticalSight.cs | 12 +-- .../Ultimate/TEA/P4OrdainedPunishment.cs | 15 +-- .../Ultimate/TEA/P4TemporalPrison.cs | 4 +- .../Shadowbringers/Ultimate/TEA/TEA.cs | 101 ++++-------------- .../Shadowbringers/Ultimate/TEA/TEAConfig.cs | 10 +- .../Shadowbringers/Ultimate/TEA/TEAStates.cs | 4 +- BossMod/Replay/ReplayParserLog.cs | 2 +- 37 files changed, 413 insertions(+), 557 deletions(-) diff --git a/BossMod/BossModule/StateMachineBuilder.cs b/BossMod/BossModule/StateMachineBuilder.cs index e198adb1dc..4bb9b2cea8 100644 --- a/BossMod/BossModule/StateMachineBuilder.cs +++ b/BossMod/BossModule/StateMachineBuilder.cs @@ -1,6 +1,4 @@ -using System.Xml.Linq; - -namespace BossMod; +namespace BossMod; // utility for building state machines for boss modules // conventions for id: @@ -39,8 +37,8 @@ public Phase OnExit(Action action, bool condition = true) } // note: usually components are deactivated automatically on phase change - manual deactivate is needed only for components that opt out of this (useful for components that need to maintain state across multiple phases) - public Phase ActivateOnEnter(bool condition = true) where C : BossComponent, new() => OnEnter(_module.ActivateComponent, condition); - public Phase DeactivateOnEnter(bool condition = true) where C : BossComponent, new() => OnEnter(_module.DeactivateComponent, condition); // TODO: reconsider... + public Phase ActivateOnEnter(bool condition = true) where C : BossComponent => OnEnter(_module.ActivateComponent, condition); + public Phase DeactivateOnEnter(bool condition = true) where C : BossComponent => OnEnter(_module.DeactivateComponent, condition); // TODO: reconsider... public Phase DeactivateOnExit(bool condition = true) where C : BossComponent => OnExit(_module.DeactivateComponent, condition); } @@ -70,7 +68,7 @@ public State OnExit(Action action, bool condition = true) return this; } - public State ActivateOnEnter(bool condition = true) where C : BossComponent, new() => OnEnter(_module.ActivateComponent, condition); + public State ActivateOnEnter(bool condition = true) where C : BossComponent => OnEnter(_module.ActivateComponent, condition); public State DeactivateOnExit(bool condition = true) where C : BossComponent => OnExit(_module.DeactivateComponent, condition); public State ExecOnEnter(Action fn, bool condition = true) where C : BossComponent => OnEnter(() => { var c = _module.FindComponent(); if (c != null) fn(c); }, condition); public State ExecOnExit(Action fn, bool condition = true) where C : BossComponent => OnExit(() => { var c = _module.FindComponent(); if (c != null) fn(c); }, condition); diff --git a/BossMod/Components/PersistentVoidzone.cs b/BossMod/Components/PersistentVoidzone.cs index f995c0cd6c..b59b08a120 100644 --- a/BossMod/Components/PersistentVoidzone.cs +++ b/BossMod/Components/PersistentVoidzone.cs @@ -3,22 +3,22 @@ namespace BossMod.Components; // voidzone (circle aoe that stays active for some time) centered at each existing object with specified OID, assumed to be persistent voidzone center // TODO: typically sources are either eventobj's with eventstate != 7 or normal actors that are non dead; other conditions are much rarer -public class PersistentVoidzone(BossModule module, float radius, Func> sources) : GenericAOEs(module, default, "GTFO from voidzone!") +public class PersistentVoidzone(BossModule module, float radius, Func> sources) : GenericAOEs(module, default, "GTFO from voidzone!") { public AOEShapeCircle Shape { get; init; } = new(radius); - public Func> Sources { get; init; } = sources; + public Func> Sources { get; init; } = sources; - public override IEnumerable ActiveAOEs(int slot, Actor actor) => Sources().Select(s => new AOEInstance(Shape, s.Position)); + public override IEnumerable ActiveAOEs(int slot, Actor actor) => Sources(Module).Select(s => new AOEInstance(Shape, s.Position)); } // voidzone that appears with some delay at cast target // note that if voidzone is predicted by cast start rather than cast event, we have to account for possibility of cast finishing without event (e.g. if actor dies before cast finish) // TODO: this has problems when target moves - castevent and spawn position could be quite different // TODO: this has problems if voidzone never actually spawns after castevent, eg because of phase changes -public class PersistentVoidzoneAtCastTarget(BossModule module, float radius, ActionID aid, Func> sources, float castEventToSpawn) : GenericAOEs(module, aid, "GTFO from voidzone!") +public class PersistentVoidzoneAtCastTarget(BossModule module, float radius, ActionID aid, Func> sources, float castEventToSpawn) : GenericAOEs(module, aid, "GTFO from voidzone!") { public AOEShapeCircle Shape { get; init; } = new(radius); - public Func> Sources { get; init; } = sources; + public Func> Sources { get; init; } = sources; public float CastEventToSpawn { get; init; } = castEventToSpawn; private List<(WPos pos, DateTime time)> _predictedByEvent = new(); private List<(Actor caster, DateTime time)> _predictedByCast = new(); @@ -31,14 +31,14 @@ public override IEnumerable ActiveAOEs(int slot, Actor actor) yield return new(Shape, p.pos, Activation: p.time); foreach (var p in _predictedByCast) yield return new(Shape, WorldState.Actors.Find(p.caster.CastInfo!.TargetID)?.Position ?? p.caster.CastInfo.LocXZ, Activation: p.time); - foreach (var z in Sources()) + foreach (var z in Sources(Module)) yield return new(Shape, z.Position); } public override void Update() { if (_predictedByEvent.Count > 0) - foreach (var s in Sources()) + foreach (var s in Sources(Module)) _predictedByEvent.RemoveAll(p => p.pos.InCircle(s.Position, 3)); } @@ -65,17 +65,17 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) // these are normal voidzones that could be 'inverted' (e.g. when you need to enter a voidzone at specific time to avoid some mechanic) // TODO: i'm not sure whether these should be considered actual voidzones (if so, should i merge them with base component? what about cast prediction?) or some completely other type of mechanic (maybe drawing differently) // TODO: might want to have per-player invertability -public class PersistentInvertibleVoidzone(BossModule module, float radius, Func> sources, ActionID aid = default) : CastCounter(module, aid) +public class PersistentInvertibleVoidzone(BossModule module, float radius, Func> sources, ActionID aid = default) : CastCounter(module, aid) { public AOEShapeCircle Shape { get; init; } = new(radius); - public Func> Sources { get; init; } = sources; + public Func> Sources { get; init; } = sources; public DateTime InvertResolveAt; public bool Inverted => InvertResolveAt != default; public override void AddHints(int slot, Actor actor, TextHints hints) { - var inVoidzone = Sources().Any(s => Shape.Check(actor.Position, s)); + var inVoidzone = Sources(Module).Any(s => Shape.Check(actor.Position, s)); if (Inverted) hints.Add(inVoidzone ? "Stay in voidzone" : "Go to voidzone!", !inVoidzone); else if (inVoidzone) @@ -84,7 +84,7 @@ public override void AddHints(int slot, Actor actor, TextHints hints) public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { - var shapes = Sources().Select(s => Shape.Distance(s.Position, s.Rotation)).ToList(); + var shapes = Sources(Module).Select(s => Shape.Distance(s.Position, s.Rotation)).ToList(); if (shapes.Count == 0) return; @@ -100,13 +100,13 @@ public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignme public override void DrawArenaBackground(int pcSlot, Actor pc) { var color = Inverted ? ArenaColor.SafeFromAOE : ArenaColor.AOE; - foreach (var s in Sources()) + foreach (var s in Sources(Module)) Shape.Draw(Arena, s.Position, s.Rotation, color); } } // invertible voidzone that is inverted when specific spell is being cast; resolved when cast ends -public class PersistentInvertibleVoidzoneByCast(BossModule module, float radius, Func> sources, ActionID aid) : PersistentInvertibleVoidzone(module, radius, sources, aid) +public class PersistentInvertibleVoidzoneByCast(BossModule module, float radius, Func> sources, ActionID aid) : PersistentInvertibleVoidzone(module, radius, sources, aid) { public override void OnCastStarted(Actor caster, ActorCastInfo spell) { diff --git a/BossMod/Modules/Shadowbringers/Ultimate/TEA/ApocalypticRay.cs b/BossMod/Modules/Shadowbringers/Ultimate/TEA/ApocalypticRay.cs index dba6b16e4b..3c391310b8 100644 --- a/BossMod/Modules/Shadowbringers/Ultimate/TEA/ApocalypticRay.cs +++ b/BossMod/Modules/Shadowbringers/Ultimate/TEA/ApocalypticRay.cs @@ -1,26 +1,21 @@ namespace BossMod.Shadowbringers.Ultimate.TEA; -class ApocalypticRay : Components.GenericAOEs +class ApocalypticRay(BossModule module, bool faceCenter) : Components.GenericAOEs(module) { public Actor? Source { get; private set; } - private bool _faceCenter; + private bool _faceCenter = faceCenter; private Angle _rotation; private DateTime _activation; private AOEShapeCone _shape = new(25.5f, 45.Degrees()); // TODO: verify angle - public ApocalypticRay(bool faceCenter) - { - _faceCenter = faceCenter; - } - - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (Source != null) yield return new(_shape, Source.Position, _rotation, _activation); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { @@ -28,30 +23,23 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent Source = caster; if (_faceCenter) { - _rotation = Angle.FromDirection(module.Bounds.Center - caster.Position); + _rotation = Angle.FromDirection(Module.Bounds.Center - caster.Position); } else { - var target = module.WorldState.Actors.Find(caster.TargetID); + var target = WorldState.Actors.Find(caster.TargetID); _rotation = target != null ? Angle.FromDirection(target.Position - caster.Position) : caster.Rotation; // this seems to be how it is baited } - _activation = module.WorldState.CurrentTime.AddSeconds(0.6f); + _activation = WorldState.FutureTime(0.6f); break; case AID.ApocalypticRayAOE: ++NumCasts; - _activation = module.WorldState.CurrentTime.AddSeconds(1.1f); + _activation = WorldState.FutureTime(1.1f); _rotation = caster.Rotation; // fix possible mistake break; } } } -class P2ApocalypticRay : ApocalypticRay -{ - public P2ApocalypticRay() : base(false) { } -} - -class P3ApocalypticRay : ApocalypticRay -{ - public P3ApocalypticRay() : base(true) { } -} +class P2ApocalypticRay(BossModule module) : ApocalypticRay(module, false); +class P3ApocalypticRay(BossModule module) : ApocalypticRay(module, true); diff --git a/BossMod/Modules/Shadowbringers/Ultimate/TEA/LimitCut.cs b/BossMod/Modules/Shadowbringers/Ultimate/TEA/LimitCut.cs index b6319b96b7..2be0f82ea1 100644 --- a/BossMod/Modules/Shadowbringers/Ultimate/TEA/LimitCut.cs +++ b/BossMod/Modules/Shadowbringers/Ultimate/TEA/LimitCut.cs @@ -1,11 +1,11 @@ namespace BossMod.Shadowbringers.Ultimate.TEA; -class LimitCut : Components.GenericBaitAway +class LimitCut(BossModule module, float alphaDelay) : Components.GenericBaitAway(module) { private enum State { Teleport, Alpha, Blasty } public int[] PlayerOrder = new int[PartyState.MaxPartySize]; - private float _alphaDelay; + private float _alphaDelay = alphaDelay; private State _nextState; private Actor? _chaser; private WPos _prevPos; @@ -14,33 +14,28 @@ private enum State { Teleport, Alpha, Blasty } private static readonly AOEShapeCone _shapeAlpha = new(30, 45.Degrees()); private static readonly AOEShapeRect _shapeBlasty = new(55, 5); - public LimitCut(float alphaDelay) - { - _alphaDelay = alphaDelay; - } - - public override void Update(BossModule module) + public override void Update() { if (_nextState == State.Teleport && _chaser != null && _chaser.Position != _prevPos) { _nextState = State.Alpha; _prevPos = _chaser.Position; - SetNextBaiter(module, NumCasts + 1, _shapeAlpha); + SetNextBaiter(NumCasts + 1, _shapeAlpha); } } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (PlayerOrder[slot] > 0) hints.Add($"Order: {PlayerOrder[slot]}", false); - base.AddHints(module, slot, actor, hints, movementHints); + base.AddHints(slot, actor, hints); } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { if (PlayerOrder[slot] > NumCasts) { - var hitIn = Math.Max(0, (float)(_nextHit - module.WorldState.CurrentTime).TotalSeconds); + var hitIn = Math.Max(0, (float)(_nextHit - WorldState.CurrentTime).TotalSeconds); var hitIndex = NumCasts + 1; while (PlayerOrder[slot] > hitIndex) { @@ -55,49 +50,49 @@ public override void AddAIHints(BossModule module, int slot, Actor actor, PartyR } } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID >= 79 && iconID <= 86) { - int slot = module.Raid.FindSlot(actor.InstanceID); + int slot = Raid.FindSlot(actor.InstanceID); if (slot >= 0) PlayerOrder[slot] = (int)iconID - 78; if (_chaser == null) { // initialize baits on first icon; note that icons appear over ~300ms - _chaser = ((TEA)module).CruiseChaser(); + _chaser = ((TEA)Module).CruiseChaser(); _prevPos = _chaser?.Position ?? default; - _nextHit = module.WorldState.CurrentTime.AddSeconds(9.5f); + _nextHit = WorldState.FutureTime(9.5f); } } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { case AID.AlphaSwordP2: ++NumCasts; _nextState = State.Blasty; - SetNextBaiter(module, NumCasts + 1, _shapeBlasty); - _nextHit = module.WorldState.CurrentTime.AddSeconds(1.5f); + SetNextBaiter(NumCasts + 1, _shapeBlasty); + _nextHit = WorldState.FutureTime(1.5f); break; case AID.SuperBlasstyChargeP2: case AID.SuperBlasstyChargeP3: ++NumCasts; _nextState = State.Teleport; CurrentBaits.Clear(); - _nextHit = module.WorldState.CurrentTime.AddSeconds(_alphaDelay); + _nextHit = WorldState.FutureTime(_alphaDelay); break; } } - private void SetNextBaiter(BossModule module, int order, AOEShape shape) + private void SetNextBaiter(int order, AOEShape shape) { CurrentBaits.Clear(); - var target = module.Raid[Array.IndexOf(PlayerOrder, order)]; + var target = Raid[Array.IndexOf(PlayerOrder, order)]; if (_chaser != null && target != null) CurrentBaits.Add(new(_chaser, target, shape)); } diff --git a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P1Cascade.cs b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P1Cascade.cs index 1b3dabc377..85ccc3860f 100644 --- a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P1Cascade.cs +++ b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P1Cascade.cs @@ -1,11 +1,9 @@ namespace BossMod.Shadowbringers.Ultimate.TEA; -class P1Cascade : Components.PersistentVoidzone +class P1Cascade(BossModule module) : Components.PersistentVoidzone(module, 8, m => m.Enemies(OID.LiquidRage)) { - public P1Cascade() : base(8, m => m.Enemies(OID.LiquidRage)) { } - - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - arena.Actors(module.Enemies(OID.Embolus), ArenaColor.Object, true); + Arena.Actors(Module.Enemies(OID.Embolus), ArenaColor.Object, true); } } diff --git a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P1HandOfPain.cs b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P1HandOfPain.cs index bae8a4233a..f07b7c0ecc 100644 --- a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P1HandOfPain.cs +++ b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P1HandOfPain.cs @@ -1,13 +1,11 @@ namespace BossMod.Shadowbringers.Ultimate.TEA; -class P1HandOfPain : Components.CastCounter +class P1HandOfPain(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.HandOfPain)) { - public P1HandOfPain() : base(ActionID.MakeSpell(AID.HandOfPain)) { } - - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { - var boss = module.Enemies(OID.BossP1).FirstOrDefault(); - var hand = module.Enemies(OID.LiquidHand).FirstOrDefault(); + var boss = Module.Enemies(OID.BossP1).FirstOrDefault(); + var hand = Module.Enemies(OID.LiquidHand).FirstOrDefault(); if (boss != null && hand != null) { var diff = (int)(hand.HP.Cur - boss.HP.Cur) * 100.0f / boss.HP.Max; diff --git a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P1HandOfPartingPrayer.cs b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P1HandOfPartingPrayer.cs index 3b68160176..cb1080faa7 100644 --- a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P1HandOfPartingPrayer.cs +++ b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P1HandOfPartingPrayer.cs @@ -1,13 +1,13 @@ namespace BossMod.Shadowbringers.Ultimate.TEA; // TODO: determine when mechanic is selected; determine threshold -class P1HandOfPartingPrayer : BossComponent +class P1HandOfPartingPrayer(BossModule module) : BossComponent(module) { public bool Resolved { get; private set; } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { - var hint = (module.Enemies(OID.LiquidHand).FirstOrDefault()?.ModelState.ModelState ?? 0) switch + var hint = (Module.Enemies(OID.LiquidHand).FirstOrDefault()?.ModelState.ModelState ?? 0) switch { 19 => "Split boss & hand", 20 => "Stack boss & hand", @@ -17,7 +17,7 @@ public override void AddGlobalHints(BossModule module, GlobalHints hints) hints.Add(hint); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.HandOfParting or AID.HandOfPrayer) Resolved = true; diff --git a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P1JagdDolls.cs b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P1JagdDolls.cs index 86fa59f345..36105bbcff 100644 --- a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P1JagdDolls.cs +++ b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P1JagdDolls.cs @@ -3,7 +3,7 @@ class P1JagdDolls : BossComponent { public int NumExhausts { get; private set; } - private IReadOnlyList _dolls = ActorEnumeration.EmptyList; + private IReadOnlyList _dolls; private HashSet _exhaustsDone = new(); private static readonly float _exhaustRadius = 8.8f; @@ -11,12 +11,12 @@ class P1JagdDolls : BossComponent private IEnumerable ActiveDolls => _dolls.Where(d => d.IsTargetable && !d.IsDead); public bool Active => ActiveDolls.Any(); - public override void Init(BossModule module) + public P1JagdDolls(BossModule module) : base(module) { _dolls = module.Enemies(OID.JagdDoll); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (NumExhausts < 2 && ActiveDolls.InRadius(actor.Position, _exhaustRadius).Count() > 1) { @@ -24,32 +24,32 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { foreach (var t in hints.PotentialTargets.Where(t => (OID)t.Actor.OID == OID.JagdDoll)) t.ForbidDOTs = true; } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (var doll in ActiveDolls) { - arena.Actor(doll, doll.HP.Cur < doll.HP.Max / 4 ? ArenaColor.Enemy : ArenaColor.Vulnerable); + Arena.Actor(doll, doll.HP.Cur < doll.HP.Max / 4 ? ArenaColor.Enemy : ArenaColor.Vulnerable); - var tether = module.WorldState.Actors.Find(doll.Tether.Target); + var tether = WorldState.Actors.Find(doll.Tether.Target); if (tether != null) { - arena.AddLine(doll.Position, tether.Position, ArenaColor.Danger); + Arena.AddLine(doll.Position, tether.Position, ArenaColor.Danger); } if (NumExhausts < 2) { - arena.AddCircle(doll.Position, _exhaustRadius, ArenaColor.Safe); + Arena.AddCircle(doll.Position, _exhaustRadius, ArenaColor.Safe); } } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.Exhaust && NumExhausts < 2) { diff --git a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P1ProteanWaveLiquid.cs b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P1ProteanWaveLiquid.cs index c279fadb7c..f4fa1c5aac 100644 --- a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P1ProteanWaveLiquid.cs +++ b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P1ProteanWaveLiquid.cs @@ -1,14 +1,7 @@ namespace BossMod.Shadowbringers.Ultimate.TEA; -class P1ProteanWaveLiquidVisBoss : Components.SelfTargetedAOEs -{ - public P1ProteanWaveLiquidVisBoss() : base(ActionID.MakeSpell(AID.ProteanWaveLiquidVisBoss), new AOEShapeCone(40, 15.Degrees())) { } -} - -class P1ProteanWaveLiquidVisHelper : Components.SelfTargetedAOEs -{ - public P1ProteanWaveLiquidVisHelper() : base(ActionID.MakeSpell(AID.ProteanWaveLiquidVisHelper), new AOEShapeCone(40, 15.Degrees())) { } -} +class P1ProteanWaveLiquidVisBoss(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ProteanWaveLiquidVisBoss), new AOEShapeCone(40, 15.Degrees())); +class P1ProteanWaveLiquidVisHelper(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ProteanWaveLiquidVisHelper), new AOEShapeCone(40, 15.Degrees())); // single protean ("shadow") that fires in the direction the boss is facing class P1ProteanWaveLiquidInvisFixed : Components.GenericAOEs @@ -17,17 +10,15 @@ class P1ProteanWaveLiquidInvisFixed : Components.GenericAOEs private static readonly AOEShapeCone _shape = new(40, 15.Degrees()); - public P1ProteanWaveLiquidInvisFixed() : base(ActionID.MakeSpell(AID.ProteanWaveLiquidInvisBoss)) { } - - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public P1ProteanWaveLiquidInvisFixed(BossModule module) : base(module, ActionID.MakeSpell(AID.ProteanWaveLiquidInvisBoss)) { - if (_source != null) - yield return new(_shape, _source.Position, _source.Rotation); + _source = module.Enemies(OID.BossP1).FirstOrDefault(); } - public override void Init(BossModule module) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { - _source = module.Enemies(OID.BossP1).FirstOrDefault(); + if (_source != null) + yield return new(_shape, _source.Position, _source.Rotation); } } @@ -38,18 +29,16 @@ class P1ProteanWaveLiquidInvisBaited : Components.GenericBaitAway private static readonly AOEShapeCone _shape = new(40, 15.Degrees()); - public P1ProteanWaveLiquidInvisBaited() : base(ActionID.MakeSpell(AID.ProteanWaveLiquidInvisHelper)) { } - - public override void Init(BossModule module) + public P1ProteanWaveLiquidInvisBaited(BossModule module) : base(module, ActionID.MakeSpell(AID.ProteanWaveLiquidInvisHelper)) { _source = module.Enemies(OID.BossP1).FirstOrDefault(); } - public override void Update(BossModule module) + public override void Update() { CurrentBaits.Clear(); if (_source != null) - foreach (var target in module.Raid.WithoutSlot().SortedByRange(_source.Position).Take(4)) + foreach (var target in Raid.WithoutSlot().SortedByRange(_source.Position).Take(4)) CurrentBaits.Add(new(_source, target, _shape)); } } diff --git a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P1ProteanWaveTornado.cs b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P1ProteanWaveTornado.cs index 114493c23e..c50b0c04c2 100644 --- a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P1ProteanWaveTornado.cs +++ b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P1ProteanWaveTornado.cs @@ -2,36 +2,28 @@ class P1ProteanWaveTornado : Components.GenericBaitAway { + private readonly IReadOnlyList _liquidRage; + private static readonly AOEShapeCone _shape = new(40, 15.Degrees()); - public P1ProteanWaveTornado(bool enableHints) : base(ActionID.MakeSpell(AID.ProteanWaveTornadoInvis)) + public P1ProteanWaveTornado(BossModule module, bool enableHints) : base(module, ActionID.MakeSpell(AID.ProteanWaveTornadoInvis)) { + _liquidRage = module.Enemies(OID.LiquidRage); EnableHints = enableHints; } - public override void Update(BossModule module) + public override void Update() { CurrentBaits.Clear(); - foreach (var tornado in module.Enemies(OID.LiquidRage)) + foreach (var tornado in _liquidRage) { - var target = module.Raid.WithoutSlot().Closest(tornado.Position); + var target = Raid.WithoutSlot().Closest(tornado.Position); if (target != null) CurrentBaits.Add(new(tornado, target, _shape)); } } } -class P1ProteanWaveTornadoVisCast : Components.SelfTargetedAOEs -{ - public P1ProteanWaveTornadoVisCast() : base(ActionID.MakeSpell(AID.ProteanWaveTornadoVis), new AOEShapeCone(40, 15.Degrees())) { } -} - -class P1ProteanWaveTornadoVisBait : P1ProteanWaveTornado -{ - public P1ProteanWaveTornadoVisBait() : base(false) { } -} - -class P1ProteanWaveTornadoInvis : P1ProteanWaveTornado -{ - public P1ProteanWaveTornadoInvis() : base(true) { } -} +class P1ProteanWaveTornadoVisCast(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ProteanWaveTornadoVis), new AOEShapeCone(40, 15.Degrees())); +class P1ProteanWaveTornadoVisBait(BossModule module) : P1ProteanWaveTornado(module, false); +class P1ProteanWaveTornadoInvis(BossModule module) : P1ProteanWaveTornado(module, true); diff --git a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P1Throttle.cs b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P1Throttle.cs index 32e09ad35d..6158faaa44 100644 --- a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P1Throttle.cs +++ b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P1Throttle.cs @@ -1,10 +1,10 @@ namespace BossMod.Shadowbringers.Ultimate.TEA; -class P1Throttle : BossComponent +class P1Throttle(BossModule module) : BossComponent(module) { public bool Applied { get; private set; } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Throttle) Applied = true; diff --git a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P2CompressedWaterLightning.cs b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P2CompressedWaterLightning.cs index c0d83f1f5b..761ddc98d7 100644 --- a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P2CompressedWaterLightning.cs +++ b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P2CompressedWaterLightning.cs @@ -1,35 +1,32 @@ namespace BossMod.Shadowbringers.Ultimate.TEA; -class P2CompressedWaterLightning : Components.GenericStackSpread +class P2CompressedWaterLightning(BossModule module) : Components.GenericStackSpread(module) { public bool ResolveImminent; // we want to show hints shortly before next resolve private BitMask _forbiddenWater; private BitMask _forbiddenLighting; - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (ResolveImminent) - base.AddHints(module, slot, actor, hints, movementHints); + base.AddHints(slot, actor, hints); } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { if (ResolveImminent) - base.AddAIHints(module, slot, actor, assignment, hints); + base.AddAIHints(slot, actor, assignment, hints); } - public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) - { - return ResolveImminent ? base.CalcPriority(module, pcSlot, pc, playerSlot, player, ref customColor) : PlayerPriority.Irrelevant; - } + public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) => ResolveImminent ? base.CalcPriority(pcSlot, pc, playerSlot, player, ref customColor) : PlayerPriority.Irrelevant; - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (ResolveImminent) - base.DrawArenaForeground(module, pcSlot, pc, arena); + base.DrawArenaForeground(pcSlot, pc); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { switch ((SID)status.ID) { @@ -46,26 +43,26 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st // note: typical sequence is 'compressed' status loss > 'crashing' spells > 'resistance down' status gain > 'compressed' status gain // because of that, cast is the best point to remove previous stacks - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { case AID.CrashingWave: - Stacks.RemoveAll(s => CheckAndRecord(s, 6, module, ref _forbiddenWater)); + Stacks.RemoveAll(s => CheckAndRecord(s, 6, ref _forbiddenWater)); ResolveImminent = false; // auto disable on resolve break; case AID.CrashingThunder: - Stacks.RemoveAll(s => CheckAndRecord(s, 2, module, ref _forbiddenLighting)); + Stacks.RemoveAll(s => CheckAndRecord(s, 2, ref _forbiddenLighting)); ResolveImminent = false; // auto disable on resolve break; } } - private bool CheckAndRecord(Stack s, int maxSize, BossModule module, ref BitMask mask) + private bool CheckAndRecord(Stack s, int maxSize, ref BitMask mask) { if (s.MaxSize != maxSize) return false; - mask.Set(module.Raid.FindSlot(s.Target.InstanceID)); + mask.Set(Raid.FindSlot(s.Target.InstanceID)); return true; } } diff --git a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P2Flarethrower.cs b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P2Flarethrower.cs index b73a405d0d..8b3b2aeb41 100644 --- a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P2Flarethrower.cs +++ b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P2Flarethrower.cs @@ -1,33 +1,31 @@ namespace BossMod.Shadowbringers.Ultimate.TEA; -class P2Flarethrower : Components.GenericBaitAway +class P2Flarethrower(BossModule module) : Components.GenericBaitAway(module, ActionID.MakeSpell(AID.FlarethrowerP2AOE)) { private Actor? _source; private static readonly AOEShapeCone _shape = new(100, 45.Degrees()); // TODO: verify angle - public P2Flarethrower() : base(ActionID.MakeSpell(AID.FlarethrowerP2AOE)) { } - - public override void Update(BossModule module) + public override void Update() { CurrentBaits.Clear(); - if (_source != null && module.Raid.WithoutSlot().Closest(_source.Position) is var target && target != null) + if (_source != null && Raid.WithoutSlot().Closest(_source.Position) is var target && target != null) CurrentBaits.Add(new(_source, target, _shape)); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { - base.AddHints(module, slot, actor, hints, movementHints); - if (_source != null && CurrentBaits.Any(b => b.Target == actor) && module.Enemies(OID.LiquidRage).Any(r => !_shape.Check(r.Position, _source.Position, Angle.FromDirection(actor.Position - _source.Position)))) + base.AddHints(slot, actor, hints); + if (_source != null && CurrentBaits.Any(b => b.Target == actor) && Module.Enemies(OID.LiquidRage).Any(r => !_shape.Check(r.Position, _source.Position, Angle.FromDirection(actor.Position - _source.Position)))) hints.Add("Aim towards tornado!"); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.FlarethrowerP2) { _source = caster; - ForbiddenPlayers = module.Raid.WithSlot(true).WhereActor(a => a.InstanceID != caster.TargetID).Mask(); // TODO: unsure about this... assumes BJ main target should bait + ForbiddenPlayers = Raid.WithSlot(true).WhereActor(a => a.InstanceID != caster.TargetID).Mask(); // TODO: unsure about this... assumes BJ main target should bait } } } diff --git a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P2Intermission.cs b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P2Intermission.cs index 8470856516..400e32a938 100644 --- a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P2Intermission.cs +++ b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P2Intermission.cs @@ -1,49 +1,43 @@ namespace BossMod.Shadowbringers.Ultimate.TEA; -class P2IntermissionLimitCut : LimitCut -{ - public P2IntermissionLimitCut() : base(3.2f) { } -} +class P2IntermissionLimitCut(BossModule module) : LimitCut(module, 3.2f); -class P2IntermissionHawkBlaster : Components.GenericAOEs +class P2IntermissionHawkBlaster(BossModule module) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.HawkBlasterIntermission)) { private Angle _blasterStartingDirection; private static readonly float _blasterOffset = 14; private static readonly AOEShapeCircle _blasterShape = new(10); - public P2IntermissionHawkBlaster() : base(ActionID.MakeSpell(AID.HawkBlasterIntermission)) { } - - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { - foreach (var c in FutureBlasterCenters(module)) - yield return new(_blasterShape, c, risky: false); - foreach (var c in ImminentBlasterCenters(module)) - yield return new(_blasterShape, c, color: ArenaColor.Danger); + foreach (var c in FutureBlasterCenters()) + yield return new(_blasterShape, c, Risky: false); + foreach (var c in ImminentBlasterCenters()) + yield return new(_blasterShape, c, Color: ArenaColor.Danger); } // TODO: reconsider - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddMovementHints(int slot, Actor actor, MovementHints movementHints) { - base.AddHints(module, slot, actor, hints, movementHints); - if (movementHints != null && SafeSpotHint(module, slot) is var safespot && safespot != null) + if (SafeSpotHint(slot) is var safespot && safespot != null) movementHints.Add(actor.Position, safespot.Value, ArenaColor.Safe); } // TODO: reconsider - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - if (SafeSpotHint(module, pcSlot) is var safespot && safespot != null) - arena.AddCircle(safespot.Value, 1, ArenaColor.Safe); + if (SafeSpotHint(pcSlot) is var safespot && safespot != null) + Arena.AddCircle(safespot.Value, 1, ArenaColor.Safe); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if (spell.Action == WatchedAction) { if (NumCasts == 0) { - var offset = spell.TargetXZ - module.Bounds.Center; + var offset = spell.TargetXZ - Module.Bounds.Center; // a bit of a hack: most strats (lpdu etc) select a half between W and NE inclusive to the 'first' group; ensure 'starting' direction is one of these bool invert = Math.Abs(offset.Z) < 2 ? offset.X > 0 : offset.Z > 0; if (invert) @@ -70,35 +64,35 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent _ => 10 }; - private IEnumerable BlasterCenters(BossModule module, int index) + private IEnumerable BlasterCenters(int index) { switch (index) { case 0: case 1: case 2: case 3: { var dir = (_blasterStartingDirection - index * 45.Degrees()).ToDirection(); - yield return module.Bounds.Center + _blasterOffset * dir; - yield return module.Bounds.Center - _blasterOffset * dir; + yield return Module.Bounds.Center + _blasterOffset * dir; + yield return Module.Bounds.Center - _blasterOffset * dir; } break; case 5: case 6: case 7: case 8: { var dir = (_blasterStartingDirection - (index - 5) * 45.Degrees()).ToDirection(); - yield return module.Bounds.Center + _blasterOffset * dir; - yield return module.Bounds.Center - _blasterOffset * dir; + yield return Module.Bounds.Center + _blasterOffset * dir; + yield return Module.Bounds.Center - _blasterOffset * dir; } break; case 4: case 9: - yield return module.Bounds.Center; + yield return Module.Bounds.Center; break; } } - private IEnumerable ImminentBlasterCenters(BossModule module) => NumCasts > 0 ? BlasterCenters(module, NextBlasterIndex) : Enumerable.Empty(); - private IEnumerable FutureBlasterCenters(BossModule module) => NumCasts > 0 ? BlasterCenters(module, NextBlasterIndex + 1) : Enumerable.Empty(); + private IEnumerable ImminentBlasterCenters() => NumCasts > 0 ? BlasterCenters(NextBlasterIndex) : Enumerable.Empty(); + private IEnumerable FutureBlasterCenters() => NumCasts > 0 ? BlasterCenters(NextBlasterIndex + 1) : Enumerable.Empty(); // TODO: reconsider - private WPos? SafeSpotHint(BossModule module, int slot) + private WPos? SafeSpotHint(int slot) { //var safespots = NextBlasterIndex switch //{ @@ -114,8 +108,8 @@ private IEnumerable BlasterCenters(BossModule module, int index) if (strategy == TEAConfig.P2Intermission.None) return null; - bool invert = strategy == TEAConfig.P2Intermission.FirstForOddPairs && (module.FindComponent()?.PlayerOrder[slot] is 3 or 4 or 7 or 8); + bool invert = strategy == TEAConfig.P2Intermission.FirstForOddPairs && (Module.FindComponent()?.PlayerOrder[slot] is 3 or 4 or 7 or 8); var offset = _blasterOffset * _blasterStartingDirection.ToDirection(); - return module.Bounds.Center + (invert ? -offset : offset); + return Module.Bounds.Center + (invert ? -offset : offset); } } diff --git a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P2MissileCommand.cs b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P2MissileCommand.cs index 25d3f05a32..910338e459 100644 --- a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P2MissileCommand.cs +++ b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P2MissileCommand.cs @@ -1,15 +1,9 @@ namespace BossMod.Shadowbringers.Ultimate.TEA; -class P2EarthMissileBaited : Components.PersistentVoidzoneAtCastTarget -{ - public P2EarthMissileBaited() : base(5, ActionID.MakeSpell(AID.EarthMissileBaited), m => m.Enemies(OID.VoidzoneEarthMissileBaited).Where(z => z.EventState != 7), 0.9f) { } -} +class P2EarthMissileBaited(BossModule module) : Components.PersistentVoidzoneAtCastTarget(module, 5, ActionID.MakeSpell(AID.EarthMissileBaited), m => m.Enemies(OID.VoidzoneEarthMissileBaited).Where(z => z.EventState != 7), 0.9f); -class P2EarthMissileIce : Components.PersistentVoidzoneAtCastTarget +class P2EarthMissileIce(BossModule module) : Components.PersistentVoidzoneAtCastTarget(module, 10, ActionID.MakeSpell(AID.EarthMissileIce), Voidzones, 0.8f) // TODO: verify larger radius... { - // TODO: verify larger radius... - public P2EarthMissileIce() : base(10, ActionID.MakeSpell(AID.EarthMissileIce), Voidzones, 0.8f) { } - private static IEnumerable Voidzones(BossModule m) { foreach (var z in m.Enemies(OID.VoidzoneEarthMissileIceSmall).Where(z => z.EventState != 7)) @@ -27,25 +21,23 @@ private static IEnumerable Voidzones(BossModule m) // note: we use a single spread/stack component for both enumerations and ice missile spreads, since they happen at the same time // TODO: add hint for spread target to stay close to tornado... -class P2Enumeration : Components.UniformStackSpread +class P2Enumeration(BossModule module) : Components.UniformStackSpread(module, 5, 6, 3, 3, true, false) // TODO: verify enumeration radius { - public P2Enumeration() : base(5, 6, 3, 3, true, false) { } // TODO: verify enumeration radius - - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { switch ((IconID)iconID) { case IconID.Enumeration: // note: we assume tanks never share enumeration - AddStack(actor, module.WorldState.CurrentTime.AddSeconds(5.1f), module.Raid.WithSlot(true).WhereActor(p => p.Role == Role.Tank).Mask()); + AddStack(actor, WorldState.FutureTime(5.1f), Raid.WithSlot(true).WhereActor(p => p.Role == Role.Tank).Mask()); break; case IconID.EarthMissileIce: - AddSpread(actor, module.WorldState.CurrentTime.AddSeconds(5.1f)); + AddSpread(actor, WorldState.FutureTime(5.1f)); break; } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { @@ -59,28 +51,26 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } -class P2HiddenMinefield : Components.SelfTargetedAOEs +class P2HiddenMinefield(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HiddenMinefield), new AOEShapeCircle(5)) { private List _mines = new(); - public P2HiddenMinefield() : base(ActionID.MakeSpell(AID.HiddenMinefield), new AOEShapeCircle(5)) { } - - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (var m in _mines) - arena.Actor(m, default, ArenaColor.Object); + Arena.Actor(m, default, ArenaColor.Object); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { - base.OnCastStarted(module, caster, spell); + base.OnCastStarted(caster, spell); if (spell.Action == WatchedAction) _mines.Add(caster.Position); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { - base.OnEventCast(module, caster, spell); + base.OnEventCast(caster, spell); if ((AID)spell.Action.ID is AID.HiddenMine or AID.HiddenMineShrapnel) _mines.RemoveAll(m => m.AlmostEqual(caster.Position, 1)); } diff --git a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P2Nisi.cs b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P2Nisi.cs index 23c72ba8e1..23dee461f0 100644 --- a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P2Nisi.cs +++ b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P2Nisi.cs @@ -11,7 +11,7 @@ public enum Nisi { None, Alpha, Beta, Gamma, Delta } private Nisi[] _current = new Nisi[PartyState.MaxPartySize]; private Nisi[] _judgments = new Nisi[PartyState.MaxPartySize]; - public override void Init(BossModule module) + public P2Nisi(BossModule module) : base(module) { int[] firstMembersOfGroup = { -1, -1, -1, -1 }; foreach (var p in Service.Config.Get().P2NisiPairs.Resolve(module.Raid)) @@ -29,7 +29,7 @@ public override void Init(BossModule module) } } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (PassPartnerSlot(slot) >= 0) { @@ -37,19 +37,19 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - var partner = module.Raid[PassPartnerSlot(pcSlot)]; + var partner = Raid[PassPartnerSlot(pcSlot)]; if (partner != null) { - arena.AddLine(pc.Position, partner.Position, ArenaColor.Danger); + Arena.AddLine(pc.Position, partner.Position, ArenaColor.Danger); } } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { var nisi = NisiForSID((SID)status.ID); - if (nisi != Nisi.None && module.Raid.FindSlot(actor.InstanceID) is var slot && slot >= 0) + if (nisi != Nisi.None && Raid.FindSlot(actor.InstanceID) is var slot && slot >= 0) { if (_current[slot] != nisi) // sometimes same nisi is reapplied, which is weird... ++_numNisiApplications; @@ -66,16 +66,16 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st SID.FinalJudgmentNisiDelta => Nisi.Delta, _ => Nisi.None }; - if (judgment != Nisi.None && module.Raid.FindSlot(actor.InstanceID) is var judgmentSlot && judgmentSlot >= 0) + if (judgment != Nisi.None && Raid.FindSlot(actor.InstanceID) is var judgmentSlot && judgmentSlot >= 0) { _judgments[judgmentSlot] = judgment; } } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { var nisi = NisiForSID((SID)status.ID); - if (nisi != Nisi.None && module.Raid.FindSlot(actor.InstanceID) is var slot && slot >= 0 && nisi == _current[slot]) + if (nisi != Nisi.None && Raid.FindSlot(actor.InstanceID) is var slot && slot >= 0 && nisi == _current[slot]) { _current[slot] = Nisi.None; --NumActiveNisi; diff --git a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P2PlasmaShield.cs b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P2PlasmaShield.cs index a6250a40c6..cf55471a3e 100644 --- a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P2PlasmaShield.cs +++ b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P2PlasmaShield.cs @@ -1,10 +1,8 @@ namespace BossMod.Shadowbringers.Ultimate.TEA; -class P2PlasmaShield : Components.DirectionalParry +class P2PlasmaShield(BossModule module) : Components.DirectionalParry(module, (uint)OID.PlasmaShield) { - public P2PlasmaShield() : base((uint)OID.PlasmaShield) { } - - public override void OnActorCreated(BossModule module, Actor actor) + public override void OnActorCreated(Actor actor) { if ((OID)actor.OID == OID.PlasmaShield) PredictParrySide(actor.InstanceID, Side.Left | Side.Right | Side.Back); diff --git a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P2SuperJump.cs b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P2SuperJump.cs index 003c38467b..b6897ef1a9 100644 --- a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P2SuperJump.cs +++ b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P2SuperJump.cs @@ -1,16 +1,14 @@ namespace BossMod.Shadowbringers.Ultimate.TEA; -class P2SuperJump : Components.GenericBaitAway +class P2SuperJump(BossModule module) : Components.GenericBaitAway(module, ActionID.MakeSpell(AID.SuperJumpAOE), centerAtTarget: true) { private static readonly AOEShapeCircle _shape = new(10); - public P2SuperJump() : base(ActionID.MakeSpell(AID.SuperJumpAOE), centerAtTarget: true) { } - - public override void Update(BossModule module) + public override void Update() { CurrentBaits.Clear(); - var source = ((TEA)module).BruteJustice(); - var target = source != null ? module.Raid.WithoutSlot().Farthest(source.Position) : null; + var source = ((TEA)Module).BruteJustice(); + var target = source != null ? Raid.WithoutSlot().Farthest(source.Position) : null; if (source != null && target != null) CurrentBaits.Add(new(source, target, _shape)); } diff --git a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P3Inception1.cs b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P3Inception1.cs index 60f452a162..e58740a8c1 100644 --- a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P3Inception1.cs +++ b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P3Inception1.cs @@ -1,6 +1,6 @@ namespace BossMod.Shadowbringers.Ultimate.TEA; -class P3Inception1 : Components.CastCounter +class P3Inception1(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.JudgmentCrystalAOE)) { private List _plasmaspheres = new(); private Actor?[] _tetherSources = new Actor?[PartyState.MaxPartySize]; @@ -12,9 +12,7 @@ class P3Inception1 : Components.CastCounter private static readonly float _crystalRadius = 5; private static readonly float _sphereRadius = 6; - public P3Inception1() : base(ActionID.MakeSpell(AID.JudgmentCrystalAOE)) { } - - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (!AllSpheresSpawned) return; @@ -22,36 +20,36 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint var sphere = _tetherSources[slot]; if (sphere != null) { - if (!sphere.IsDead && module.Raid.WithSlot(true).WhereSlot(s => _tetherSources[s] != null).InRadiusExcluding(actor, _sphereRadius * 2).Any()) + if (!sphere.IsDead && Raid.WithSlot(true).WhereSlot(s => _tetherSources[s] != null).InRadiusExcluding(actor, _sphereRadius * 2).Any()) hints.Add("GTFO from other tethers!"); } else if (!CrystalsDone) { - if (module.Raid.WithSlot(true).WhereSlot(s => _tetherSources[s] == null).InRadiusExcluding(actor, _crystalRadius * 2).Any()) + if (Raid.WithSlot(true).WhereSlot(s => _tetherSources[s] == null).InRadiusExcluding(actor, _crystalRadius * 2).Any()) hints.Add("GTFO from other crystals!"); } } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (!AllSpheresSpawned) return; - foreach (var (slot, player) in module.Raid.WithSlot(true)) + foreach (var (slot, player) in Raid.WithSlot(true)) { var sphere = _tetherSources[slot]; if (sphere != null) { if (!sphere.IsDead) { - arena.Actor(sphere, ArenaColor.Object, true); - arena.AddLine(sphere.Position, player.Position, slot == pcSlot ? ArenaColor.Safe : ArenaColor.Danger); - arena.AddCircle(player.Position, _sphereRadius, ArenaColor.Danger); + Arena.Actor(sphere, ArenaColor.Object, true); + Arena.AddLine(sphere.Position, player.Position, slot == pcSlot ? ArenaColor.Safe : ArenaColor.Danger); + Arena.AddCircle(player.Position, _sphereRadius, ArenaColor.Danger); } } else if (!CrystalsDone) { - arena.AddCircle(player.Position, _crystalRadius, ArenaColor.Danger); + Arena.AddCircle(player.Position, _crystalRadius, ArenaColor.Danger); } } @@ -60,51 +58,51 @@ public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc { if (!pcSphere.IsDead) { - arena.AddCircle(_assignedPositions[pcSlot], 1, ArenaColor.Safe); + Arena.AddCircle(_assignedPositions[pcSlot], 1, ArenaColor.Safe); } } else if (!CrystalsDone) { - arena.AddCircle(_assignedPositions[pcSlot] + new WDir(-5, -5), 1, ArenaColor.Safe); - arena.AddCircle(_assignedPositions[pcSlot] + new WDir(-5, +5), 1, ArenaColor.Safe); - arena.AddCircle(_assignedPositions[pcSlot] + new WDir(+5, -5), 1, ArenaColor.Safe); - arena.AddCircle(_assignedPositions[pcSlot] + new WDir(+5, +5), 1, ArenaColor.Safe); + Arena.AddCircle(_assignedPositions[pcSlot] + new WDir(-5, -5), 1, ArenaColor.Safe); + Arena.AddCircle(_assignedPositions[pcSlot] + new WDir(-5, +5), 1, ArenaColor.Safe); + Arena.AddCircle(_assignedPositions[pcSlot] + new WDir(+5, -5), 1, ArenaColor.Safe); + Arena.AddCircle(_assignedPositions[pcSlot] + new WDir(+5, +5), 1, ArenaColor.Safe); } } - public override void OnTethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnTethered(Actor source, ActorTetherInfo tether) { if (tether.ID == (uint)TetherID.Plasmasphere && (OID)source.OID == OID.Plasmasphere) { _plasmaspheres.Add(source); - var slot = module.Raid.FindSlot(tether.Target); + var slot = Raid.FindSlot(tether.Target); if (slot >= 0) _tetherSources[slot] = source; if (AllSpheresSpawned) - InitAssignments(module); + InitAssignments(); } } - private void InitAssignments(BossModule module) + private void InitAssignments() { // alex is either at N or S cardinal; 2 spheres are E and 2 spheres are W // for tethered player, assign 45-degree spot on alex's side, as far away from source as possible - bool alexNorth = ((TEA)module).AlexPrime()?.Position.Z < module.Bounds.Center.Z; - var boxPos = module.Bounds.Center + new WDir(0, alexNorth ? 13 : -13); + bool alexNorth = ((TEA)Module).AlexPrime()?.Position.Z < Module.Bounds.Center.Z; + var boxPos = Module.Bounds.Center + new WDir(0, alexNorth ? 13 : -13); for (int slot = 0; slot < _tetherSources.Length; ++slot) { var sphere = _tetherSources[slot]; if (sphere != null) { - var sphereWest = sphere.Position.X < module.Bounds.Center.X; - var sameSideSphere = _plasmaspheres.Find(o => o != sphere && (o.Position.X < module.Bounds.Center.X) == sphereWest); + var sphereWest = sphere.Position.X < Module.Bounds.Center.X; + var sameSideSphere = _plasmaspheres.Find(o => o != sphere && (o.Position.X < Module.Bounds.Center.X) == sphereWest); var sphereNorth = sphere.Position.Z < sameSideSphere?.Position.Z; var spotDir = alexNorth ? (sphereNorth ? 90.Degrees() : 135.Degrees()) : (sphereNorth ? 45.Degrees() : 90.Degrees()); if (!sphereWest) spotDir = -spotDir; - _assignedPositions[slot] = module.Bounds.Center + 18 * spotDir.ToDirection(); + _assignedPositions[slot] = Module.Bounds.Center + 18 * spotDir.ToDirection(); } else { diff --git a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P3Inception2.cs b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P3Inception2.cs index c8dbdaa343..ed2534bcb5 100644 --- a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P3Inception2.cs +++ b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P3Inception2.cs @@ -8,25 +8,25 @@ class P3Inception2 : Components.GenericBaitAway private static readonly AOEShapeCone _shape = new(100, 45.Degrees()); // TODO: verify angle - public override void Init(BossModule module) + public P3Inception2(BossModule module) : base(module) { // assume first two are baited by tanks ForbiddenPlayers = module.Raid.WithSlot(true).WhereActor(a => a.Role != Role.Tank).Mask(); } - public override void Update(BossModule module) + public override void Update() { CurrentBaits.Clear(); if (_numAetheroplasmsDone >= 4) // do not show anything until all aetheroplasms (part 1 of the mechanic) are done { - var source = ((TEA)module).BruteJustice(); - var target = source != null ? module.Raid.WithoutSlot().Closest(source.Position) : null; + var source = ((TEA)Module).BruteJustice(); + var target = source != null ? Raid.WithoutSlot().Closest(source.Position) : null; if (source != null && target != null) CurrentBaits.Add(new(source, target, _shape)); } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { @@ -37,7 +37,7 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent ++NumCasts; foreach (var t in spell.Targets) { - var slot = module.Raid.FindSlot(t.ID); + var slot = Raid.FindSlot(t.ID); _taken.Set(slot); ForbiddenPlayers.Set(slot); } diff --git a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P3Inception3.cs b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P3Inception3.cs index ee084c3a46..069f565dcc 100644 --- a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P3Inception3.cs +++ b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P3Inception3.cs @@ -8,75 +8,73 @@ class P3Inception3Sacrament : Components.GenericAOEs private DateTime _activation; private static readonly AOEShapeCross _shape = new(100, 8); - public P3Inception3Sacrament() : base(ActionID.MakeSpell(AID.SacramentInception)) { } - - public override void Init(BossModule module) + public P3Inception3Sacrament(BossModule module) : base(module, ActionID.MakeSpell(AID.SacramentInception)) { // note: boss moves to position around the component activation time _source = ((TEA)module).AlexPrime(); - _activation = module.WorldState.CurrentTime.AddSeconds(4.1f); + _activation = WorldState.FutureTime(4.1f); } - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_source != null) yield return new(_shape, _source.Position, _source.Rotation, _activation); } } -class P3Inception3Debuffs : Components.GenericStackSpread +class P3Inception3Debuffs(BossModule module) : Components.GenericStackSpread(module) { private Actor? _sharedSentence; private BitMask _avoid; private BitMask _tethered; private bool _inited; // we init stuff on first update, since component is activated when statuses are already applied - public override void Update(BossModule module) + public override void Update() { if (!_inited) { _inited = true; if (_sharedSentence != null) - Stacks.Add(new(_sharedSentence, 4, 3, int.MaxValue, module.WorldState.CurrentTime.AddSeconds(4), _avoid)); + Stacks.Add(new(_sharedSentence, 4, 3, int.MaxValue, WorldState.FutureTime(4), _avoid)); } - base.Update(module); + base.Update(); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { - base.AddHints(module, slot, actor, hints, movementHints); - if (_tethered[slot] && FindPartner(module, slot) is var partner && partner != null && (partner.Position - actor.Position).LengthSq() < 30 * 30) + base.AddHints(slot, actor, hints); + if (_tethered[slot] && FindPartner(slot) is var partner && partner != null && (partner.Position - actor.Position).LengthSq() < 30 * 30) hints.Add("Stay farther from partner!"); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - base.DrawArenaForeground(module, pcSlot, pc, arena); + base.DrawArenaForeground(pcSlot, pc); - if (_tethered[pcSlot] && FindPartner(module, pcSlot) is var partner && partner != null) - arena.AddLine(pc.Position, partner.Position, (partner.Position - pc.Position).LengthSq() < 30 * 30 ? ArenaColor.Danger : ArenaColor.Safe); + if (_tethered[pcSlot] && FindPartner(pcSlot) is var partner && partner != null) + Arena.AddLine(pc.Position, partner.Position, (partner.Position - pc.Position).LengthSq() < 30 * 30 ? ArenaColor.Danger : ArenaColor.Safe); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { switch ((SID)status.ID) { case SID.AggravatedAssault: - _avoid.Set(module.Raid.FindSlot(actor.InstanceID)); + _avoid.Set(Raid.FindSlot(actor.InstanceID)); break; case SID.SharedSentence: _sharedSentence = actor; break; case SID.RestrainingOrder: - _tethered.Set(module.Raid.FindSlot(actor.InstanceID)); + _tethered.Set(Raid.FindSlot(actor.InstanceID)); break; } } - private Actor? FindPartner(BossModule module, int slot) + private Actor? FindPartner(int slot) { var remaining = _tethered; remaining.Clear(slot); - return remaining.Any() ? module.Raid[remaining.LowestSetBit()] : null; + return remaining.Any() ? Raid[remaining.LowestSetBit()] : null; } } diff --git a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P3Inception4.cs b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P3Inception4.cs index 5f229990ef..3950a98b89 100644 --- a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P3Inception4.cs +++ b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P3Inception4.cs @@ -1,17 +1,15 @@ namespace BossMod.Shadowbringers.Ultimate.TEA; // TODO: assign positions? -class P3Inception4Cleaves : Components.GenericBaitAway +class P3Inception4Cleaves(BossModule module) : Components.GenericBaitAway(module, ActionID.MakeSpell(AID.AlphaSwordP3)) { private static readonly AOEShapeCone _shape = new(30, 45.Degrees()); // TODO: verify angle - public P3Inception4Cleaves() : base(ActionID.MakeSpell(AID.AlphaSwordP3)) { } - - public override void Update(BossModule module) + public override void Update() { CurrentBaits.Clear(); - var source = ((TEA)module).CruiseChaser(); + var source = ((TEA)Module).CruiseChaser(); if (source != null) - CurrentBaits.AddRange(module.Raid.WithoutSlot().SortedByRange(source.Position).Take(3).Select(t => new Bait(source, t, _shape))); + CurrentBaits.AddRange(Raid.WithoutSlot().SortedByRange(source.Position).Take(3).Select(t => new Bait(source, t, _shape))); } } diff --git a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P3TemporalStasis.cs b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P3TemporalStasis.cs index a28921bb3f..84df987cb5 100644 --- a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P3TemporalStasis.cs +++ b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P3TemporalStasis.cs @@ -1,6 +1,6 @@ namespace BossMod.Shadowbringers.Ultimate.TEA; -class P3TemporalStasis : Components.GenericBaitAway +class P3TemporalStasis(BossModule module) : Components.GenericBaitAway(module, ActionID.MakeSpell(AID.FlarethrowerP3)) { public enum Mechanic { None, AvoidDamage, StayClose, StayFar } @@ -10,71 +10,71 @@ public enum Mechanic { None, AvoidDamage, StayClose, StayFar } private static readonly AOEShapeCone _shapeBJ = new(100, 45.Degrees()); // TODO: verify angle private static readonly AOEShapeCone _shapeCC = new(30, 45.Degrees()); // TODO: verify angle - public P3TemporalStasis() : base(ActionID.MakeSpell(AID.FlarethrowerP3)) { } - - public override void Update(BossModule module) + public override void Update() { CurrentBaits.Clear(); - if (BJ(module) is var bj && bj != null) - CurrentBaits.AddRange(module.Raid.WithoutSlot().SortedByRange(bj.Position).Take(2).Select(t => new Bait(bj, t, _shapeBJ))); - if (CC(module) is var cc && cc != null) - CurrentBaits.AddRange(module.Raid.WithoutSlot().SortedByRange(cc.Position).Take(3).Select(t => new Bait(cc, t, _shapeCC))); + if (BJ() is var bj && bj != null) + CurrentBaits.AddRange(Raid.WithoutSlot().SortedByRange(bj.Position).Take(2).Select(t => new Bait(bj, t, _shapeBJ))); + if (CC() is var cc && cc != null) + CurrentBaits.AddRange(Raid.WithoutSlot().SortedByRange(cc.Position).Take(3).Select(t => new Bait(cc, t, _shapeCC))); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { - base.AddHints(module, slot, actor, hints, movementHints); + base.AddHints(slot, actor, hints); switch (_playerMechanics[slot]) { case Mechanic.StayClose: - if (FindPartner(module, slot) is var partner1 && partner1 != null && (partner1.Position - actor.Position).LengthSq() > 5 * 5) + if (FindPartner(slot) is var partner1 && partner1 != null && (partner1.Position - actor.Position).LengthSq() > 5 * 5) hints.Add("Stay closer to partner!"); break; case Mechanic.StayFar: - if (FindPartner(module, slot) is var partner2 && partner2 != null && (partner2.Position - actor.Position).LengthSq() < 30 * 30) + if (FindPartner(slot) is var partner2 && partner2 != null && (partner2.Position - actor.Position).LengthSq() < 30 * 30) hints.Add("Stay farther from partner!"); break; } + } - if (movementHints != null) - movementHints.Add(actor.Position, SafeSpot(module, slot, actor), ArenaColor.Safe); + public override void AddMovementHints(int slot, Actor actor, MovementHints movementHints) + { + movementHints.Add(actor.Position, SafeSpot(slot, actor), ArenaColor.Safe); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - base.DrawArenaForeground(module, pcSlot, pc, arena); + base.DrawArenaForeground(pcSlot, pc); switch (_playerMechanics[pcSlot]) { case Mechanic.StayClose: - if (FindPartner(module, pcSlot) is var partner1 && partner1 != null) - arena.AddLine(pc.Position, partner1.Position, (partner1.Position - pc.Position).LengthSq() > 5 * 5 ? ArenaColor.Danger : ArenaColor.Safe); + if (FindPartner(pcSlot) is var partner1 && partner1 != null) + Arena.AddLine(pc.Position, partner1.Position, (partner1.Position - pc.Position).LengthSq() > 5 * 5 ? ArenaColor.Danger : ArenaColor.Safe); break; case Mechanic.StayFar: - if (FindPartner(module, pcSlot) is var partner2 && partner2 != null) - arena.AddLine(pc.Position, partner2.Position, (partner2.Position - pc.Position).LengthSq() < 30 * 30 ? ArenaColor.Danger : ArenaColor.Safe); + if (FindPartner(pcSlot) is var partner2 && partner2 != null) + Arena.AddLine(pc.Position, partner2.Position, (partner2.Position - pc.Position).LengthSq() < 30 * 30 ? ArenaColor.Danger : ArenaColor.Safe); break; } - arena.Actor(BJ(module), ArenaColor.Enemy, true); - arena.Actor(CC(module), ArenaColor.Enemy, true); - arena.AddCircle(SafeSpot(module, pcSlot, pc), 1, ArenaColor.Safe); + Arena.Actor(BJ(), ArenaColor.Enemy, true); + Arena.Actor(CC(), ArenaColor.Enemy, true); + Arena.AddCircle(SafeSpot(pcSlot, pc), 1, ArenaColor.Safe); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { switch ((SID)status.ID) { case SID.AggravatedAssault: - AssignMechanic(module, actor, Mechanic.AvoidDamage); - ForbiddenPlayers.Set(module.Raid.FindSlot(actor.InstanceID)); + AssignMechanic(actor, Mechanic.AvoidDamage); + ForbiddenPlayers.Set(Raid.FindSlot(actor.InstanceID)); break; case SID.HouseArrest: - AssignMechanic(module, actor, Mechanic.StayClose); + AssignMechanic(actor, Mechanic.StayClose); break; case SID.RestrainingOrder: - AssignMechanic(module, actor, Mechanic.StayFar); + AssignMechanic(actor, Mechanic.StayFar); break; case SID.TemporalDisplacement: Frozen = true; @@ -82,16 +82,16 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st } } - private Actor? FindPartner(BossModule module, int slot) + private Actor? FindPartner(int slot) { var partnerSlot = -1; for (int i = 0; i < _playerMechanics.Length; ++i) if (i != slot && _playerMechanics[i] == _playerMechanics[slot]) partnerSlot = i; - return module.Raid[partnerSlot]; + return Raid[partnerSlot]; } - private WPos SafeSpot(BossModule module, int slot, Actor actor) + private WPos SafeSpot(int slot, Actor actor) { // using LPDU assignments: // - 'near' baiting N (th) / S (dd) of the eastern actor (BJ/CC doesn't matter) @@ -99,8 +99,8 @@ private WPos SafeSpot(BossModule module, int slot, Actor actor) // - 'far' E (th) / W (dd), whoever is closer to CC baits third aoe outside // - 'avoid' staying E/W, closer to BJ // BJ/CC are located at center +/- (6, 0) - var bjLeft = BJ(module)?.Position.X < module.Bounds.Center.X; - return module.Bounds.Center + _playerMechanics[slot] switch + var bjLeft = BJ()?.Position.X < Module.Bounds.Center.X; + return Module.Bounds.Center + _playerMechanics[slot] switch { Mechanic.AvoidDamage => new WDir(bjLeft ? -20 : +20, 0), Mechanic.StayClose => new WDir(6, actor.Class.IsSupport() ? -2 : +2), @@ -109,13 +109,13 @@ private WPos SafeSpot(BossModule module, int slot, Actor actor) }; } - private void AssignMechanic(BossModule module, Actor actor, Mechanic mechanic) + private void AssignMechanic(Actor actor, Mechanic mechanic) { - var slot = module.Raid.FindSlot(actor.InstanceID); + var slot = Raid.FindSlot(actor.InstanceID); if (slot >= 0) _playerMechanics[slot] = mechanic; } - private Actor? BJ(BossModule module) => ((TEA)module).BruteJustice(); - private Actor? CC(BossModule module) => ((TEA)module).CruiseChaser(); + private Actor? BJ() => ((TEA)Module).BruteJustice(); + private Actor? CC() => ((TEA)Module).CruiseChaser(); } diff --git a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P3Wormhole.cs b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P3Wormhole.cs index 43dfeab275..7ebee79b9b 100644 --- a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P3Wormhole.cs +++ b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P3Wormhole.cs @@ -1,14 +1,7 @@ namespace BossMod.Shadowbringers.Ultimate.TEA; -class P3WormholeLimitCut : LimitCut -{ - public P3WormholeLimitCut() : base(2.7f) { } -} - -class P3WormholeSacrament : Components.SelfTargetedAOEs -{ - public P3WormholeSacrament() : base(ActionID.MakeSpell(AID.SacramentWormhole), new AOEShapeCross(100, 8)) { } -} +class P3WormholeLimitCut(BossModule module) : LimitCut(module, 2.7f); +class P3WormholeSacrament(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.SacramentWormhole), new AOEShapeCross(100, 8)); class P3WormholeRepentance : BossComponent { @@ -19,14 +12,14 @@ class P3WormholeRepentance : BossComponent private static readonly float[] _radiuses = { 8, 6, 3 }; - public override void Init(BossModule module) + public P3WormholeRepentance(BossModule module) : base(module) { _limitCut = module.FindComponent(); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { - var alex = ((TEA)module).AlexPrime(); + var alex = ((TEA)Module).AlexPrime(); if (alex == null || NumSoaks >= 3) return; @@ -34,7 +27,7 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint if (order == 0) return; - var dirToAlex = (alex.Position - module.Bounds.Center).Normalized(); + var dirToAlex = (alex.Position - Module.Bounds.Center).Normalized(); var dirToSide = SelectSide(order, dirToAlex); bool shouldSoak = ShouldSoakWormhole(order); @@ -45,14 +38,29 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint if (soakingWormhole != shouldSoak) hints.Add(shouldSoak ? "Soak the wormhole!" : "GTFO from wormhole!"); } + } + + public override void AddMovementHints(int slot, Actor actor, MovementHints movementHints) + { + var alex = ((TEA)Module).AlexPrime(); + if (alex == null || NumSoaks >= 3) + return; - if (movementHints != null && (!shouldSoak || !_chakramsDone)) - movementHints.Add(actor.Position, module.Bounds.Center + SafeSpotOffset(order, dirToAlex, dirToSide), ArenaColor.Safe); + var order = _limitCut?.PlayerOrder[slot] ?? 0; + if (order == 0) + return; + + if (!ShouldSoakWormhole(order) || !_chakramsDone) + { + var dirToAlex = (alex.Position - Module.Bounds.Center).Normalized(); + var dirToSide = SelectSide(order, dirToAlex); + movementHints.Add(actor.Position, Module.Bounds.Center + SafeSpotOffset(order, dirToAlex, dirToSide), ArenaColor.Safe); + } } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - var alex = ((TEA)module).AlexPrime(); + var alex = ((TEA)Module).AlexPrime(); if (alex == null || NumSoaks >= 3) return; @@ -60,24 +68,24 @@ public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc if (pcOrder == 0) return; - var dirToAlex = (alex.Position - module.Bounds.Center).Normalized(); + var dirToAlex = (alex.Position - Module.Bounds.Center).Normalized(); var dirToSide = SelectSide(pcOrder, dirToAlex); var shouldSoak = ShouldSoakWormhole(pcOrder); foreach (var w in _wormholes) - arena.AddCircle(w, _radiuses[NumSoaks], shouldSoak && dirToSide.Dot(w - module.Bounds.Center) > 0 ? ArenaColor.Safe : ArenaColor.Danger); + Arena.AddCircle(w, _radiuses[NumSoaks], shouldSoak && dirToSide.Dot(w - Module.Bounds.Center) > 0 ? ArenaColor.Safe : ArenaColor.Danger); if (!shouldSoak || !_chakramsDone) - arena.AddCircle(module.Bounds.Center + SafeSpotOffset(pcOrder, dirToAlex, dirToSide), 1, ArenaColor.Safe); + Arena.AddCircle(Module.Bounds.Center + SafeSpotOffset(pcOrder, dirToAlex, dirToSide), 1, ArenaColor.Safe); } - public override void OnActorCreated(BossModule module, Actor actor) + public override void OnActorCreated(Actor actor) { if ((OID)actor.OID == OID.Wormhole1) _wormholes.Add(actor.Position); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { @@ -131,28 +139,23 @@ private WDir SafeSpotOffset(int order, WDir dirToAlex, WDir dirToSide) } } -class P3WormholeIncineratingHeat : Components.StackWithCastTargets -{ - public P3WormholeIncineratingHeat() : base(ActionID.MakeSpell(AID.IncineratingHeat), 5, 8) { } -} +class P3WormholeIncineratingHeat(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.IncineratingHeat), 5, 8); -class P3WormholeEnumeration : Components.UniformStackSpread +class P3WormholeEnumeration(BossModule module) : Components.UniformStackSpread(module, 5, 0, 3, 3, raidwideOnResolve: false) // TODO: verify enumeration radius { private BitMask _targets; // we start showing stacks only after incinerating heat is resolved private DateTime _activation; - public P3WormholeEnumeration() : base(5, 0, 3, 3, raidwideOnResolve: false) { } // TODO: verify enumeration radius - - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.Enumeration) { - _targets.Set(module.Raid.FindSlot(actor.InstanceID)); - _activation = module.WorldState.CurrentTime.AddSeconds(5.1f); + _targets.Set(Raid.FindSlot(actor.InstanceID)); + _activation = WorldState.FutureTime(5.1f); } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { @@ -160,7 +163,7 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent Stacks.Clear(); break; case AID.IncineratingHeat: - AddStacks(module.Raid.WithSlot(true).IncludedInMask(_targets).Actors(), _activation); + AddStacks(Raid.WithSlot(true).IncludedInMask(_targets).Actors(), _activation); break; } } diff --git a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P4AlmightyJudgment.cs b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P4AlmightyJudgment.cs index 935706c411..a2f4356db9 100644 --- a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P4AlmightyJudgment.cs +++ b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P4AlmightyJudgment.cs @@ -1,7 +1,7 @@ namespace BossMod.Shadowbringers.Ultimate.TEA; // note: sets are 2s apart, 8-9 casts per set -class P4AlmightyJudgment : Components.GenericAOEs +class P4AlmightyJudgment(BossModule module) : Components.GenericAOEs(module) { private List<(WPos pos, DateTime activation)> _casters = new(); @@ -9,7 +9,7 @@ class P4AlmightyJudgment : Components.GenericAOEs public bool Active => _casters.Count > 0; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_casters.Count > 0) { @@ -22,13 +22,13 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.AlmightyJudgmentVisual) - _casters.Add((caster.Position, module.WorldState.CurrentTime.AddSeconds(8))); + _casters.Add((caster.Position, WorldState.FutureTime(8))); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.AlmightyJudgmentAOE) _casters.RemoveAll(c => c.pos.AlmostEqual(caster.Position, 1)); diff --git a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P4FateCalibrationAlpha.cs b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P4FateCalibrationAlpha.cs index d08fa89257..65fdfa5a2e 100644 --- a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P4FateCalibrationAlpha.cs +++ b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P4FateCalibrationAlpha.cs @@ -1,18 +1,18 @@ namespace BossMod.Shadowbringers.Ultimate.TEA; -class P4FateCalibrationAlphaStillnessMotion : Components.StayMove +class P4FateCalibrationAlphaStillnessMotion(BossModule module) : Components.StayMove(module) { public int NumCasts { get; private set; } private Requirement _first; private Requirement _second; - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (_first != Requirement.None) hints.Add($"Movement: {_first} -> {(_second != Requirement.None ? _second.ToString() : "???")}"); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { @@ -57,26 +57,24 @@ public enum Debuff { None, Defamation, SharedSentence, AggravatedAssault } private P4FateProjection? _proj; private BitMask _avoidMask; - public P4FateCalibrationAlphaDebuffs() : base(4, 30, 3, alwaysShowSpreads: true) { } - - public override void Init(BossModule module) + public P4FateCalibrationAlphaDebuffs(BossModule module) : base(module, 4, 30, 3, alwaysShowSpreads: true) { _proj = module.FindComponent(); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { case AID.FateCalibrationAlphaDefamation: // applied to nearest projection - var defamationSlot = _proj?.ProjectionOwner(module.Enemies(OID.FateProjection).Closest(caster.Position)?.InstanceID ?? 0) ?? -1; + var defamationSlot = _proj?.ProjectionOwner(Module.Enemies(OID.FateProjection).Closest(caster.Position)?.InstanceID ?? 0) ?? -1; if (defamationSlot >= 0) { Debuffs[defamationSlot] = Debuff.Defamation; - var defamationTarget = module.Raid[defamationSlot]; + var defamationTarget = Raid[defamationSlot]; if (defamationTarget != null) - AddSpread(defamationTarget, module.WorldState.CurrentTime.AddSeconds(20.1f)); + AddSpread(defamationTarget, WorldState.CurrentTime.AddSeconds(20.1f)); } break; case AID.FateCalibrationAlphaSharedSentence: @@ -84,9 +82,9 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent if (sharedSlot >= 0) { Debuffs[sharedSlot] = Debuff.SharedSentence; - var sharedTarget = module.Raid[sharedSlot]; + var sharedTarget = Raid[sharedSlot]; if (sharedTarget != null) - AddStack(sharedTarget, module.WorldState.CurrentTime.AddSeconds(20.1f), _avoidMask); // note: avoid mask is typically empty here, since aggravated assaults happen later + AddStack(sharedTarget, WorldState.CurrentTime.AddSeconds(20.1f), _avoidMask); // note: avoid mask is typically empty here, since aggravated assaults happen later } break; case AID.FateCalibrationAlphaAggravatedAssault: @@ -103,40 +101,36 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } -class P4FateCalibrationAlphaSacrament : Components.GenericAOEs +class P4FateCalibrationAlphaSacrament(BossModule module) : Components.GenericAOEs(module) { private List<(Actor caster, DateTime activation)> _casters = new(); private WPos[]? _safespots; private static readonly AOEShapeCross _shape = new(100, 8); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) - { - return _casters.Select(c => new AOEInstance(_shape, c.caster.Position, c.caster.Rotation, c.activation)); - } + public override IEnumerable ActiveAOEs(int slot, Actor actor) => _casters.Select(c => new AOEInstance(_shape, c.caster.Position, c.caster.Rotation, c.activation)); - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddMovementHints(int slot, Actor actor, MovementHints movementHints) { - base.AddHints(module, slot, actor, hints, movementHints); - if (movementHints != null && _safespots != null) + if (_safespots != null) movementHints.Add(actor.Position, _safespots[slot], ArenaColor.Safe); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - base.DrawArenaForeground(module, pcSlot, pc, arena); + base.DrawArenaForeground(pcSlot, pc); if (_safespots != null) - arena.AddCircle(_safespots[pcSlot], 1, ArenaColor.Safe); + Arena.AddCircle(_safespots[pcSlot], 1, ArenaColor.Safe); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { case AID.FateCalibrationAlphaSacrament: - _casters.Add((caster, module.WorldState.CurrentTime.AddSeconds(18.1f))); + _casters.Add((caster, WorldState.FutureTime(18.1f))); if (_casters.Count == 3) - InitSafeSpots(module); + InitSafeSpots(); break; case AID.FateCalibrationAlphaResolveSacrament: _casters.RemoveAll(c => c.caster == caster); @@ -145,18 +139,18 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } - private void InitSafeSpots(BossModule module) + private void InitSafeSpots() { - var safeClone = module.Enemies(OID.PerfectAlexander).FirstOrDefault(a => a != ((TEA)module).PerfectAlex() && _casters.FindIndex(c => c.caster == a) < 0); - var debuffs = module.FindComponent(); + var safeClone = Module.Enemies(OID.PerfectAlexander).FirstOrDefault(a => a != ((TEA)Module).PerfectAlex() && _casters.FindIndex(c => c.caster == a) < 0); + var debuffs = Module.FindComponent(); if (safeClone == null || debuffs == null) return; - var dirToSafe = (safeClone.Position - module.Bounds.Center).Normalized(); + var dirToSafe = (safeClone.Position - Module.Bounds.Center).Normalized(); _safespots = new WPos[PartyState.MaxPartySize]; for (int i = 0; i < _safespots.Length; ++i) { - _safespots[i] = module.Bounds.Center + debuffs.Debuffs[i] switch + _safespots[i] = Module.Bounds.Center + debuffs.Debuffs[i] switch { P4FateCalibrationAlphaDebuffs.Debuff.Defamation => 18 * dirToSafe, P4FateCalibrationAlphaDebuffs.Debuff.AggravatedAssault => -18 * dirToSafe + 3 * dirToSafe.OrthoR(), diff --git a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P4FateCalibrationBeta.cs b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P4FateCalibrationBeta.cs index 3bd5c665c4..af75fcaac0 100644 --- a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P4FateCalibrationBeta.cs +++ b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P4FateCalibrationBeta.cs @@ -11,12 +11,12 @@ private enum Color { Unknown, Light, Dark } private int[] _nearTethers = { -1, -1 }; private int _sharedSentence = -1; - public override void Init(BossModule module) + public P4FateCalibrationBetaDebuffs(BossModule module) : base(module) { _proj = module.FindComponent(); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { switch ((SID)status.ID) { @@ -41,7 +41,7 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st } } - public override void OnTethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnTethered(Actor source, ActorTetherInfo tether) { switch ((TetherID)tether.ID) { @@ -56,21 +56,21 @@ public override void OnTethered(BossModule module, Actor source, ActorTetherInfo } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { case AID.FateCalibrationAlphaSharedSentence: _sharedSentence = _proj?.ProjectionOwner(spell.MainTargetID) ?? -1; // note: at this point, we can distinguish light beacon vs light untethered (shared sentence hits untethered), but not darks - InitColor(module, Color.Light, GuessLightBeacon()); + InitColor(Color.Light, GuessLightBeacon()); break; case AID.FateCalibrationBetaKillBeaconSpread: case AID.FateCalibrationBetaKillBeaconStack: // these are always cast at two beacons var slot = _proj?.ProjectionOwner(spell.MainTargetID) ?? -1; if (slot >= 0) - InitColor(module, _colors[slot], slot); + InitColor(_colors[slot], slot); break; } } @@ -91,7 +91,7 @@ private int GuessLightBeacon() return -1; } - private void InitColor(BossModule module, Color color, int beacon) + private void InitColor(Color color, int beacon) { for (int i = 0; i < PartyState.MaxPartySize; ++i) { @@ -102,9 +102,9 @@ private void InitColor(BossModule module, Color color, int beacon) { Debuffs[i] = color == Color.Light ? Debuff.LightBeacon : Debuff.DarkBeacon; if (color == Color.Light) - LightBeacon = module.Raid[i]; + LightBeacon = Raid[i]; else - DarkBeacon = module.Raid[i]; + DarkBeacon = Raid[i]; } else { @@ -114,7 +114,7 @@ private void InitColor(BossModule module, Color color, int beacon) } } -class P4FateCalibrationBetaJJump : Components.GenericBaitAway +class P4FateCalibrationBetaJJump(BossModule module) : Components.GenericBaitAway(module, centerAtTarget: true) { private bool _enabled; private List _jumpers = new(); @@ -123,9 +123,7 @@ class P4FateCalibrationBetaJJump : Components.GenericBaitAway public void Show() => _enabled = true; - public P4FateCalibrationBetaJJump() : base(centerAtTarget: true) { } - - public override void Update(BossModule module) + public override void Update() { CurrentBaits.Clear(); if (!_enabled) @@ -133,13 +131,13 @@ public override void Update(BossModule module) foreach (var source in _jumpers) { - var target = module.Raid.WithoutSlot().Farthest(source.Position); + var target = Raid.WithoutSlot().Farthest(source.Position); if (target != null) CurrentBaits.Add(new(source, target, _shape)); } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { @@ -154,7 +152,7 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } -class P4FateCalibrationBetaOpticalSight : Components.UniformStackSpread +class P4FateCalibrationBetaOpticalSight(BossModule module) : Components.UniformStackSpread(module, 6, 6, 4) { private enum Mechanic { Unknown, Stack, Spread } @@ -162,28 +160,26 @@ private enum Mechanic { Unknown, Stack, Spread } private Mechanic _mechanic; private List _stackTargets = new(); - public void Show(BossModule module) + public void Show() { switch (_mechanic) { case Mechanic.Stack: - AddStacks(_stackTargets, module.WorldState.CurrentTime.AddSeconds(6.1f)); + AddStacks(_stackTargets, WorldState.FutureTime(6.1f)); break; case Mechanic.Spread: - AddSpreads(module.Raid.WithoutSlot(true), module.WorldState.CurrentTime.AddSeconds(6.1f)); + AddSpreads(Raid.WithoutSlot(true), WorldState.FutureTime(6.1f)); break; } } - public P4FateCalibrationBetaOpticalSight() : base(6, 6, 4) { } - - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (_mechanic != Mechanic.Unknown) hints.Add($"{_mechanic} after jumps"); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { @@ -192,7 +188,7 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent break; case AID.FateCalibrationBetaKillBeaconStack: _mechanic = Mechanic.Stack; - var target = module.Raid[module.FindComponent()?.ProjectionOwner(spell.MainTargetID) ?? -1]; + var target = Raid[Module.FindComponent()?.ProjectionOwner(spell.MainTargetID) ?? -1]; if (target != null) _stackTargets.Add(target); break; @@ -208,7 +204,7 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } -class P4FateCalibrationBetaRadiantSacrament : Components.GenericAOEs +class P4FateCalibrationBetaRadiantSacrament(BossModule module) : Components.GenericAOEs(module) { private Actor? _caster; private bool _enabled; @@ -217,13 +213,13 @@ class P4FateCalibrationBetaRadiantSacrament : Components.GenericAOEs public void Show() => _enabled = true; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_enabled && _caster != null) yield return new(_shape, _caster.Position); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { diff --git a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P4FateProjection.cs b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P4FateProjection.cs index c66cf02d4a..89aae7a49a 100644 --- a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P4FateProjection.cs +++ b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P4FateProjection.cs @@ -1,17 +1,17 @@ namespace BossMod.Shadowbringers.Ultimate.TEA; // note: fate projection tethers appear before clone actors are spawned, so we're storing id's rather than actors -class P4FateProjection : BossComponent +class P4FateProjection(BossModule module) : BossComponent(module) { public ulong[] Projections = new ulong[PartyState.MaxPartySize]; public int ProjectionOwner(ulong proj) => Array.IndexOf(Projections, proj); - public override void OnTethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnTethered(Actor source, ActorTetherInfo tether) { if (tether.ID == (uint)TetherID.FateProjection) { - var slot = module.Raid.FindSlot(source.InstanceID); + var slot = Raid.FindSlot(source.InstanceID); if (slot >= 0) { Projections[slot] = tether.Target; diff --git a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P4FinalWord.cs b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P4FinalWord.cs index d75acb78af..3eaf5c5250 100644 --- a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P4FinalWord.cs +++ b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P4FinalWord.cs @@ -1,6 +1,6 @@ namespace BossMod.Shadowbringers.Ultimate.TEA; -class P4FinalWordDebuffs : P4ForcedMarchDebuffs +class P4FinalWordDebuffs(BossModule module) : P4ForcedMarchDebuffs(module) { protected override WDir SafeSpotDirection(int slot) => Debuffs[slot] switch { @@ -9,22 +9,22 @@ class P4FinalWordDebuffs : P4ForcedMarchDebuffs _ => new(0, 10), // slightly N of dark beacon }; - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { switch ((SID)status.ID) { case SID.FinalWordContactProhibition: - AssignDebuff(module, actor, Debuff.LightFollow); + AssignDebuff(actor, Debuff.LightFollow); break; case SID.FinalWordContactRegulation: - AssignDebuff(module, actor, Debuff.LightBeacon); + AssignDebuff(actor, Debuff.LightBeacon); LightBeacon = actor; break; case SID.FinalWordEscapeProhibition: - AssignDebuff(module, actor, Debuff.DarkFollow); + AssignDebuff(actor, Debuff.DarkFollow); break; case SID.FinalWordEscapeDetection: - AssignDebuff(module, actor, Debuff.DarkBeacon); + AssignDebuff(actor, Debuff.DarkBeacon); DarkBeacon = actor; break; case SID.ContactProhibitionOrdained: @@ -36,19 +36,19 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st } } - private void AssignDebuff(BossModule module, Actor actor, Debuff debuff) + private void AssignDebuff(Actor actor, Debuff debuff) { - var slot = module.Raid.FindSlot(actor.InstanceID); + var slot = Raid.FindSlot(actor.InstanceID); if (slot >= 0) Debuffs[slot] = debuff; } } -class P4FinalWordStillnessMotion : Components.StayMove +class P4FinalWordStillnessMotion(BossModule module) : Components.StayMove(module) { private Requirement _first; - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if (_first != Requirement.None) return; // we've already seen first cast, so we no longer care - we assume stillness is always followed by motion and vice versa @@ -66,11 +66,11 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.OrdainedMotionSuccess or AID.OrdainedMotionFail or AID.OrdainedStillnessSuccess or AID.OrdainedStillnessFail) { - var slot = module.Raid.FindSlot(spell.MainTargetID); + var slot = Raid.FindSlot(spell.MainTargetID); if (slot >= 0) { Requirements[slot] = Requirements[slot] != _first ? Requirement.None : _first == Requirement.Move ? Requirement.Stay : Requirement.Move; diff --git a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P4ForcedMarchDebuffs.cs b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P4ForcedMarchDebuffs.cs index 9ee2dad10c..cd1db70cb3 100644 --- a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P4ForcedMarchDebuffs.cs +++ b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P4ForcedMarchDebuffs.cs @@ -1,6 +1,6 @@ namespace BossMod.Shadowbringers.Ultimate.TEA; -abstract class P4ForcedMarchDebuffs : BossComponent +abstract class P4ForcedMarchDebuffs(BossModule module) : BossComponent(module) { public enum Debuff { None, LightBeacon, LightFollow, DarkBeacon, DarkFollow } @@ -13,7 +13,7 @@ public enum Debuff { None, LightBeacon, LightFollow, DarkBeacon, DarkFollow } private static readonly float _minLightDistance = 22; // TODO: verify private static readonly float _maxDarkDistance = 5; // TODO: verify - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (Done || Debuffs[slot] == Debuff.None) return; @@ -27,19 +27,23 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint case Debuff.DarkFollow: if (DarkBeacon != null) { - if (!module.Bounds.Contains(Components.Knockback.AwayFromSource(actor.Position, DarkBeacon.Position, _forcedMarchDistance))) + if (!Module.Bounds.Contains(Components.Knockback.AwayFromSource(actor.Position, DarkBeacon.Position, _forcedMarchDistance))) hints.Add("Aim away from wall!"); if ((actor.Position - DarkBeacon.Position).LengthSq() > _maxDarkDistance * _maxDarkDistance) hints.Add("Move closer to dark beacon!"); } break; } + } - if (movementHints != null) - movementHints.Add(actor.Position, module.Bounds.Center + SafeSpotDirection(slot), ArenaColor.Safe); + public override void AddMovementHints(int slot, Actor actor, MovementHints movementHints) + { + if (Done || Debuffs[slot] == Debuff.None) + return; + movementHints.Add(actor.Position, Module.Bounds.Center + SafeSpotDirection(slot), ArenaColor.Safe); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (Done || Debuffs[pcSlot] == Debuff.None) return; @@ -50,19 +54,19 @@ public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc if (LightBeacon != null) { var pos = (pc.Position - LightBeacon.Position).LengthSq() <= _forcedMarchDistance * _forcedMarchDistance ? LightBeacon.Position : pc.Position + _forcedMarchDistance * (LightBeacon.Position - pc.Position).Normalized(); - Components.Knockback.DrawKnockback(pc, pos, arena); + Components.Knockback.DrawKnockback(pc, pos, Arena); } break; case Debuff.DarkFollow: if (DarkBeacon != null) { var pos = Components.Knockback.AwayFromSource(pc.Position, DarkBeacon.Position, _forcedMarchDistance); - Components.Knockback.DrawKnockback(pc, pos, arena); + Components.Knockback.DrawKnockback(pc, pos, Arena); } break; } - arena.AddCircle(module.Bounds.Center + SafeSpotDirection(pcSlot), 1, ArenaColor.Safe); + Arena.AddCircle(Module.Bounds.Center + SafeSpotDirection(pcSlot), 1, ArenaColor.Safe); } protected abstract WDir SafeSpotDirection(int slot); diff --git a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P4OpticalSight.cs b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P4OpticalSight.cs index 2eaeff72b9..1d2b882ccd 100644 --- a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P4OpticalSight.cs +++ b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P4OpticalSight.cs @@ -1,23 +1,21 @@ namespace BossMod.Shadowbringers.Ultimate.TEA; -class P4OpticalSight : Components.UniformStackSpread +class P4OpticalSight(BossModule module) : Components.UniformStackSpread(module, 6, 6, 4) { - public P4OpticalSight() : base(6, 6, 4) { } - - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { switch ((IconID)iconID) { case IconID.OpticalSightSpread: - AddSpread(actor, module.WorldState.CurrentTime.AddSeconds(5.1f)); + AddSpread(actor, WorldState.FutureTime(5.1f)); break; case IconID.OpticalSightStack: - AddStack(actor, module.WorldState.CurrentTime.AddSeconds(5.1f)); + AddStack(actor, WorldState.FutureTime(5.1f)); break; } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { diff --git a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P4OrdainedPunishment.cs b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P4OrdainedPunishment.cs index 2fd59f186b..f4ae709653 100644 --- a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P4OrdainedPunishment.cs +++ b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P4OrdainedPunishment.cs @@ -1,15 +1,13 @@ namespace BossMod.Shadowbringers.Ultimate.TEA; -class P4OrdainedCapitalPunishment : Components.GenericSharedTankbuster +class P4OrdainedCapitalPunishment(BossModule module) : Components.GenericSharedTankbuster(module, ActionID.MakeSpell(AID.OrdainedCapitalPunishmentAOE), 4) { - public P4OrdainedCapitalPunishment() : base(ActionID.MakeSpell(AID.OrdainedCapitalPunishmentAOE), 4) { } - - public override void Update(BossModule module) + public override void Update() { - Target = Source != null ? module.WorldState.Actors.Find(Source.TargetID) : null; + Target = Source != null ? WorldState.Actors.Find(Source.TargetID) : null; } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.OrdainedCapitalPunishment) { @@ -20,7 +18,4 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } // TODO: dedicated tankbuster component with tankswap hint -class P4OrdainedPunishment : Components.SpreadFromCastTargets -{ - public P4OrdainedPunishment() : base(ActionID.MakeSpell(AID.OrdainedPunishment), 5) { } -} +class P4OrdainedPunishment(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.OrdainedPunishment), 5); diff --git a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P4TemporalPrison.cs b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P4TemporalPrison.cs index b3287db2c1..bb27e46053 100644 --- a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P4TemporalPrison.cs +++ b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P4TemporalPrison.cs @@ -1,11 +1,11 @@ namespace BossMod.Shadowbringers.Ultimate.TEA; // TODO: show prison spots, warn if not taken... -class P4TemporalPrison : BossComponent +class P4TemporalPrison(BossModule module) : BossComponent(module) { public int NumPrisons { get; private set; } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.TemporalPrison) ++NumPrisons; diff --git a/BossMod/Modules/Shadowbringers/Ultimate/TEA/TEA.cs b/BossMod/Modules/Shadowbringers/Ultimate/TEA/TEA.cs index 4398d97504..666eabcc72 100644 --- a/BossMod/Modules/Shadowbringers/Ultimate/TEA/TEA.cs +++ b/BossMod/Modules/Shadowbringers/Ultimate/TEA/TEA.cs @@ -1,85 +1,26 @@ namespace BossMod.Shadowbringers.Ultimate.TEA; -class P1FluidSwing : Components.Cleave -{ - public P1FluidSwing() : base(ActionID.MakeSpell(AID.FluidSwing), new AOEShapeCone(11.5f, 45.Degrees())) { } -} - -class P1FluidStrike : Components.Cleave -{ - public P1FluidStrike() : base(ActionID.MakeSpell(AID.FluidSwing), new AOEShapeCone(11.6f, 45.Degrees()), (uint)OID.LiquidHand) { } -} - -class P1Sluice : Components.LocationTargetedAOEs -{ - public P1Sluice() : base(ActionID.MakeSpell(AID.Sluice), 5) { } -} - -class P1Splash : Components.CastCounter -{ - public P1Splash() : base(ActionID.MakeSpell(AID.Splash)) { } -} - -class P1Drainage : Components.TankbusterTether -{ - public P1Drainage() : base(ActionID.MakeSpell(AID.DrainageP1), (uint)TetherID.Drainage, 6) { } -} - -class P2JKick : Components.CastCounter -{ - public P2JKick() : base(ActionID.MakeSpell(AID.JKick)) { } -} - -class P2EyeOfTheChakram : Components.SelfTargetedAOEs -{ - public P2EyeOfTheChakram() : base(ActionID.MakeSpell(AID.EyeOfTheChakram), new AOEShapeRect(73, 3, 3)) { } -} - -class P2HawkBlasterOpticalSight : Components.LocationTargetedAOEs -{ - public P2HawkBlasterOpticalSight() : base(ActionID.MakeSpell(AID.HawkBlasterP2), 10) { } -} - -class P2Photon : Components.CastCounter -{ - public P2Photon() : base(ActionID.MakeSpell(AID.PhotonAOE)) { } -} - -class P2SpinCrusher : Components.SelfTargetedAOEs -{ - public P2SpinCrusher() : base(ActionID.MakeSpell(AID.SpinCrusher), new AOEShapeCone(10, 45.Degrees())) { } -} - -class P2Drainage : Components.PersistentVoidzone -{ - public P2Drainage() : base(8, m => m.Enemies(OID.LiquidRage)) { } // TODO: verify distance -} - -class P2PropellerWind : Components.CastLineOfSightAOE -{ - public P2PropellerWind() : base(ActionID.MakeSpell(AID.PropellerWind), 50, false) { } - public override IEnumerable BlockerActors(BossModule module) => module.Enemies(OID.GelidGaol); -} - -class P2DoubleRocketPunch : Components.CastSharedTankbuster -{ - public P2DoubleRocketPunch() : base(ActionID.MakeSpell(AID.DoubleRocketPunch), 3) { } -} - -class P3ChasteningHeat : Components.BaitAwayCast -{ - public P3ChasteningHeat() : base(ActionID.MakeSpell(AID.ChasteningHeat), new AOEShapeCircle(5), true) { } -} - -class P3DivineSpear : Components.Cleave -{ - public P3DivineSpear() : base(ActionID.MakeSpell(AID.DivineSpear), new AOEShapeCone(24.2f, 45.Degrees()), (uint)OID.AlexanderPrime) { } // TODO: verify angle -} - -class P3DivineJudgmentRaidwide : Components.CastCounter -{ - public P3DivineJudgmentRaidwide() : base(ActionID.MakeSpell(AID.DivineJudgmentRaidwide)) { } -} +class P1FluidSwing(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.FluidSwing), new AOEShapeCone(11.5f, 45.Degrees())); +class P1FluidStrike(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.FluidSwing), new AOEShapeCone(11.6f, 45.Degrees()), (uint)OID.LiquidHand); +class P1Sluice(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Sluice), 5); +class P1Splash(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.Splash)); +class P1Drainage(BossModule module) : Components.TankbusterTether(module, ActionID.MakeSpell(AID.DrainageP1), (uint)TetherID.Drainage, 6); +class P2JKick(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.JKick)); +class P2EyeOfTheChakram(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.EyeOfTheChakram), new AOEShapeRect(73, 3, 3)); +class P2HawkBlasterOpticalSight(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.HawkBlasterP2), 10); +class P2Photon(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.PhotonAOE)); +class P2SpinCrusher(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.SpinCrusher), new AOEShapeCone(10, 45.Degrees())); +class P2Drainage(BossModule module) : Components.PersistentVoidzone(module, 8, m => m.Enemies(OID.LiquidRage)); // TODO: verify distance + +class P2PropellerWind(BossModule module) : Components.CastLineOfSightAOE(module, ActionID.MakeSpell(AID.PropellerWind), 50, false) +{ + public override IEnumerable BlockerActors() => Module.Enemies(OID.GelidGaol); +} + +class P2DoubleRocketPunch(BossModule module) : Components.CastSharedTankbuster(module, ActionID.MakeSpell(AID.DoubleRocketPunch), 3); +class P3ChasteningHeat(BossModule module) : Components.BaitAwayCast(module, ActionID.MakeSpell(AID.ChasteningHeat), new AOEShapeCircle(5), true); +class P3DivineSpear(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.DivineSpear), new AOEShapeCone(24.2f, 45.Degrees()), (uint)OID.AlexanderPrime); // TODO: verify angle +class P3DivineJudgmentRaidwide(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.DivineJudgmentRaidwide)); [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.BossP1, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 694)] public class TEA : BossModule diff --git a/BossMod/Modules/Shadowbringers/Ultimate/TEA/TEAConfig.cs b/BossMod/Modules/Shadowbringers/Ultimate/TEA/TEAConfig.cs index 305f689fea..f220a3cf33 100644 --- a/BossMod/Modules/Shadowbringers/Ultimate/TEA/TEAConfig.cs +++ b/BossMod/Modules/Shadowbringers/Ultimate/TEA/TEAConfig.cs @@ -1,7 +1,7 @@ namespace BossMod.Shadowbringers.Ultimate.TEA; [ConfigDisplay(Order = 0x200, Parent = typeof(ShadowbringersConfig))] -public class TEAConfig : CooldownPlanningConfigNode +public class TEAConfig() : CooldownPlanningConfigNode(80) { public enum P2Intermission { @@ -19,10 +19,8 @@ public enum P2Intermission public P2Intermission P2IntermissionHints = P2Intermission.FirstForOddPairs; [PropertyDisplay("P2: nisi pair assignments")] - [GroupDetails(new string[] { "Pair 1", "Pair 2", "Pair 3", "Pair 4" })] - [GroupPreset("Melee together", new[] { 0, 1, 2, 3, 0, 1, 2, 3 })] - [GroupPreset("DD CCW", new[] { 0, 2, 1, 3, 1, 0, 2, 3 })] + [GroupDetails(["Pair 1", "Pair 2", "Pair 3", "Pair 4"])] + [GroupPreset("Melee together", [0, 1, 2, 3, 0, 1, 2, 3])] + [GroupPreset("DD CCW", [0, 2, 1, 3, 1, 0, 2, 3])] public GroupAssignmentDDSupportPairs P2NisiPairs = GroupAssignmentDDSupportPairs.DefaultMeleeTogether(); - - public TEAConfig() : base(80) { } } diff --git a/BossMod/Modules/Shadowbringers/Ultimate/TEA/TEAStates.cs b/BossMod/Modules/Shadowbringers/Ultimate/TEA/TEAStates.cs index 26dfd95357..aab763aae2 100644 --- a/BossMod/Modules/Shadowbringers/Ultimate/TEA/TEAStates.cs +++ b/BossMod/Modules/Shadowbringers/Ultimate/TEA/TEAStates.cs @@ -9,7 +9,7 @@ public TEAStates(TEA module) : base(module) _module = module; SimplePhase(0, Phase1LivingLiquid, "P1: Living Liquid") .ActivateOnEnter() - .Raw.Update = () => Module.PrimaryActor.IsDestroyed || Module.PrimaryActor.IsDead; // phase 1 ends either with wipe (everything destroyed) or success (boss dies, then is destroyed few seconds into next phase) + .Raw.Update = () => Module.PrimaryActor.IsDeadOrDestroyed; // phase 1 ends either with wipe (everything destroyed) or success (boss dies, then is destroyed few seconds into next phase) SimplePhase(1, Phase2BruteJusticeCruiseChaser, "P2: BJ+CC") .Raw.Update = () => { @@ -683,7 +683,7 @@ private void P4FateCalibrationBeta(uint id, float delay) .DeactivateOnExit() // tethers & shared sentence resolve ~1s before jumps .DeactivateOnExit(); ComponentCondition(id + 0x130, 6, comp => comp.Done, "Stack/spread") - .ExecOnEnter(comp => comp.Show(Module)) + .ExecOnEnter(comp => comp.Show()) .DeactivateOnExit(); ComponentCondition(id + 0x140, 5, comp => comp.NumCasts > 0, "Donut") .ExecOnEnter(comp => comp.Show()) diff --git a/BossMod/Replay/ReplayParserLog.cs b/BossMod/Replay/ReplayParserLog.cs index e31ec69dbc..364a5bc996 100644 --- a/BossMod/Replay/ReplayParserLog.cs +++ b/BossMod/Replay/ReplayParserLog.cs @@ -456,7 +456,7 @@ private void ParseActorCreate() OID = uint.Parse(parts[1], NumberStyles.HexNumber), SpawnIndex = spawnIndex, Name = parts[2], - Type = Enum.Parse(parts[3]), + Type = parts[3] == "Unknown" ? ActorType.Part : Enum.Parse(parts[3]), Class = cls, PosRot = new(float.Parse(parts[4]), float.Parse(parts[5]), float.Parse(parts[6]), float.Parse(parts[7]).Degrees().Rad), HitboxRadius = radius, From ea08251db5d6f76c752ef78becc24cd812db4139 Mon Sep 17 00:00:00 2001 From: Andrew Gilewsky Date: Tue, 9 Apr 2024 01:35:40 +0100 Subject: [PATCH 09/18] EW WIP --- BossMod/BossModule/StateMachineBuilder.cs | 2 +- BossMod/Components/StackSpread.cs | 17 +- BossMod/Components/Towers.cs | 8 +- BossMod/Components/WildCharge.cs | 4 +- .../Endwalker/Alliance/A10Lions/A10Lions.cs | 13 +- .../Alliance/A10Lions/RoaringBlaze.cs | 8 +- .../Alliance/A10Lions/SlashAndBurn.cs | 8 +- .../A10RhalgrEmissary/A10RhalgrEmissary.cs | 28 +-- .../Alliance/A10RhalgrEmissary/Boltloop.cs | 8 +- .../A10RhalgrEmissary/DestructiveCharge.cs | 12 +- .../Alliance/A11Byregot/A11Byregot.cs | 10 +- .../Alliance/A11Byregot/ByregotStrike.cs | 27 +-- .../Endwalker/Alliance/A11Byregot/Hammers.cs | 47 ++--- .../Alliance/A11Byregot/Reproduce.cs | 14 +- .../Endwalker/Alliance/A12Rhalgr/A12Rhalgr.cs | 23 +-- .../Alliance/A12Rhalgr/HandOfTheDestroyer.cs | 28 ++- .../Alliance/A12Rhalgr/RhalgrBeacon.cs | 20 +- .../Endwalker/Alliance/A13Azeyma/A13Azeyma.cs | 34 +--- .../Alliance/A13Azeyma/DancingFlame.cs | 10 +- .../Endwalker/Alliance/A13Azeyma/SolarFans.cs | 20 +- .../Alliance/A13Azeyma/SolarWings.cs | 25 +-- .../Alliance/A13Azeyma/WildfireWard.cs | 12 +- .../Alliance/A14Naldthal/A14Naldthal.cs | 58 +----- .../Alliance/A14Naldthal/FarAboveDeepBelow.cs | 40 ++-- .../Alliance/A14Naldthal/FortuneFlux.cs | 40 ++-- .../A14Naldthal/HeatAboveFlamesBelow.cs | 10 +- .../Alliance/A14Naldthal/HeavensTrial.cs | 11 +- .../A14Naldthal/OnceAboveEverBelow.cs | 22 +-- .../Alliance/A21Nophica/A21Nophica.cs | 40 +--- .../Alliance/A21Nophica/FloralHaze.cs | 2 +- .../Alliance/A21Nophica/MatronsBreath.cs | 16 +- .../Alliance/A21Nophica/SowingCircle.cs | 12 +- .../A22AlthykNymeia/A22AlthykNymeia.cs | 15 +- .../A22AlthykNymeia/A22AlthykNymeiaStates.cs | 4 +- .../Alliance/A22AlthykNymeia/Axioma.cs | 16 +- .../Alliance/A22AlthykNymeia/Hydrorythmos.cs | 16 +- .../Alliance/A22AlthykNymeia/Hydrostasis.cs | 12 +- .../Alliance/A22AlthykNymeia/Petrai.cs | 10 +- .../Alliance/A22AlthykNymeia/SpinnersWheel.cs | 40 ++-- .../Endwalker/Alliance/A23Halone/A23Halone.cs | 58 +----- .../Endwalker/Alliance/A23Halone/DoomSpear.cs | 6 +- .../Alliance/A23Halone/FurysAegis.cs | 6 +- .../Endwalker/Alliance/A23Halone/Lochos.cs | 24 +-- .../Alliance/A23Halone/Tetrapagos.cs | 8 +- .../Alliance/A23Halone/ThousandfoldThrust.cs | 8 +- .../Alliance/A23Halone/WillOfTheFury.cs | 16 +- .../Alliance/A24Menphina/A24Menphina.cs | 76 ++------ .../Alliance/A24Menphina/LunarKiss.cs | 8 +- .../Alliance/A24Menphina/MidnightFrost.cs | 8 +- .../Alliance/A24Menphina/WinterHalo.cs | 8 +- .../Endwalker/Alliance/A30Trash/A30Trash1.cs | 42 ++--- .../Endwalker/Alliance/A30Trash/A30Trash2.cs | 36 ++-- .../Alliance/A31Thaliak/A31Thaliak.cs | 65 ++----- .../A31Thaliak/ThaliakHieroglyphika.cs | 14 +- .../Alliance/A31Thaliak/ThaliakRheognosis.cs | 27 ++- .../Alliance/A31Thaliak/ThaliakTetraktys.cs | 20 +- .../Alliance/A32Llymlaen/A32Llymlaen.cs | 82 ++------ .../A32Llymlaen/LlymlaenDireStraits.cs | 14 +- .../A32Llymlaen/LlymlaenFrothingSea.cs | 12 +- .../A32Llymlaen/LlymlaenNavigatorsTrident.cs | 27 ++- .../A32Llymlaen/LlymlaenSerpentsTide.cs | 8 +- .../A32Llymlaen/LlymlaenSurgingWave.cs | 92 ++++----- .../Alliance/A32Llymlaen/LlymlaenToTheLast.cs | 10 +- .../Alliance/A32Llymlaen/LlymlaenTridents.cs | 15 +- .../Endwalker/Alliance/A33Oschon/A33Oschon.cs | 80 ++------ .../Alliance/A33Oschon/A33OschonStates.cs | 6 +- .../Alliance/A33Oschon/OschonClimbingShot.cs | 12 +- .../Alliance/A33Oschon/OschonFlintedFoehn.cs | 20 +- .../Alliance/A33Oschon/OschonP2ArrowTrail.cs | 10 +- .../A33Oschon/OschonP2WanderingShot.cs | 14 +- .../A33Oschon/OschonP2WanderingVolley.cs | 34 ++-- .../Alliance/A33Oschon/OschonSwingingDraw.cs | 9 +- .../Alliance/A34Eulogia/A34Eulogia.cs | 51 +---- .../Alliance/A34Eulogia/A34EulogiaStates.cs | 10 +- .../A34Eulogia/EulogiaAsAboveSoBelow.cs | 22 +-- .../A34Eulogia/EulogiaByregotStrike.cs | 19 +- .../A34Eulogia/EulogiaClimbingShot.cs | 12 +- .../Alliance/A34Eulogia/EulogiaFirstBlush.cs | 8 +- .../A34Eulogia/EulogiaHieroglyphika.cs | 14 +- .../Alliance/A34Eulogia/EulogiaHydrostasis.cs | 8 +- .../A34Eulogia/EulogiaMatronsBreath.cs | 16 +- .../A34Eulogia/EulogiaQuintessence.cs | 16 +- .../A34Eulogia/EulogiaRadiantRhythm.cs | 16 +- .../A34Eulogia/EulogiaThousandfoldThrust.cs | 10 +- .../Alliance/A34Eulogia/EulogiaTridents.cs | 16 +- .../Criterion/C01ASS/C010Trash/C010Armor.cs | 35 ++-- .../C01ASS/C010Trash/C010Belladonna.cs | 35 ++-- .../Criterion/C01ASS/C010Trash/C010Dryad.cs | 50 ++--- .../C01ASS/C010Trash/C010Dullahan.cs | 35 ++-- .../Criterion/C01ASS/C010Trash/C010Kaluk.cs | 35 ++-- .../C01ASS/C010Trash/C010Udumbara.cs | 54 ++---- .../Criterion/C01ASS/C011Silkie/C011Silkie.cs | 67 +++---- .../C01ASS/C011Silkie/C011SilkieStates.cs | 4 +- .../C01ASS/C011Silkie/EasternEwers.cs | 12 +- .../C01ASS/C011Silkie/PuffTethers.cs | 49 +++-- .../C01ASS/C011Silkie/PuffTracker.cs | 14 +- .../C01ASS/C011Silkie/SlipperySoap.cs | 68 ++++--- .../C01ASS/C012Gladiator/C012Gladiator.cs | 27 +-- .../C012Gladiator/C012GladiatorStates.cs | 4 +- .../C01ASS/C012Gladiator/CurseOfTheFallen.cs | 68 +++---- .../C012Gladiator/CurseOfTheMonument.cs | 33 ++-- .../C01ASS/C012Gladiator/SculptorsPassion.cs | 16 +- .../C01ASS/C012Gladiator/WrathOfRuin.cs | 44 ++--- .../C013Shadowcaster/C013Shadowcaster.cs | 36 ++-- .../C013ShadowcasterStates.cs | 5 +- .../C01ASS/C013Shadowcaster/CastShadow.cs | 8 +- .../C01ASS/C013Shadowcaster/CrypticFlames.cs | 26 +-- .../C013Shadowcaster/FiresteelStrike.cs | 32 ++-- .../C01ASS/C013Shadowcaster/InfernWave.cs | 47 ++--- .../C01ASS/C013Shadowcaster/Portals.cs | 40 ++-- .../Criterion/C02AMR/C020Trash/C020Fuko.cs | 48 ++--- .../Criterion/C02AMR/C020Trash/C020Kotengu.cs | 37 ++-- .../C02AMR/C020Trash/C020Onmitsugashira.cs | 47 ++--- .../Criterion/C02AMR/C020Trash/C020Raiko.cs | 61 +++--- .../Criterion/C02AMR/C020Trash/C020Trash1.cs | 5 +- .../Criterion/C02AMR/C020Trash/C020Trash2.cs | 14 +- .../Criterion/C02AMR/C020Trash/C020Yuki.cs | 26 +-- .../C02AMR/C021Shishio/C021Shishio.cs | 27 +-- .../C02AMR/C021Shishio/C021ShishioStates.cs | 4 +- .../C02AMR/C021Shishio/EyeThunderVortex.cs | 8 +- .../C02AMR/C021Shishio/HauntingCry.cs | 50 +++-- .../C02AMR/C021Shishio/LightningBolt.cs | 19 +- .../C02AMR/C021Shishio/NoblePursuit.cs | 16 +- .../C02AMR/C021Shishio/RokujoRevel.cs | 28 +-- .../Criterion/C02AMR/C021Shishio/Slither.cs | 10 +- .../C02AMR/C021Shishio/UnnaturalWail.cs | 10 +- .../Criterion/C02AMR/C022Gorai/C022Gorai.cs | 18 +- .../C02AMR/C022Gorai/C022GoraiStates.cs | 4 +- .../C02AMR/C022Gorai/CloudToGround.cs | 14 +- .../C02AMR/C022Gorai/FightingSpirits.cs | 47 ++--- .../C02AMR/C022Gorai/FlameAndSulphur.cs | 16 +- .../C02AMR/C022Gorai/ImpurePurgation.cs | 15 +- .../C022Gorai/MalformedReincarnation.cs | 58 +++--- .../C02AMR/C022Gorai/RousingReincarnation.cs | 39 ++-- .../C02AMR/C022Gorai/SealOfScurryingSparks.cs | 10 +- .../Criterion/C02AMR/C022Gorai/Thundercall.cs | 38 ++-- .../C02AMR/C022Gorai/TorchingTorment.cs | 10 +- .../Criterion/C02AMR/C023Moko/AzureAuspice.cs | 46 ++--- .../Criterion/C02AMR/C023Moko/C023Moko.cs | 18 +- .../C02AMR/C023Moko/C023MokoStates.cs | 4 +- .../Criterion/C02AMR/C023Moko/Giri.cs | 74 ++++---- .../C02AMR/C023Moko/ScarletAuspice.cs | 37 ++-- .../Criterion/C02AMR/C023Moko/ShadowTwin.cs | 34 ++-- .../C02AMR/C023Moko/SoldiersOfDeath.cs | 20 +- .../C03AAI/C030Trash/C030Islekeeper.cs | 32 +--- .../Criterion/C03AAI/C030Trash/C030Kiwakin.cs | 29 +-- .../Criterion/C03AAI/C030Trash/C030Monk.cs | 22 +-- .../Criterion/C03AAI/C030Trash/C030Ray.cs | 43 ++--- .../Criterion/C03AAI/C030Trash/C030Snipper.cs | 33 ++-- .../Criterion/C03AAI/C030Trash/C030Trash1.cs | 15 +- .../Criterion/C03AAI/C030Trash/C030Trash2.cs | 5 +- .../C03AAI/C030Trash/C030WoodGolem.cs | 32 +--- .../C03AAI/C031Ketuduke/AngrySeas.cs | 22 +-- .../C03AAI/C031Ketuduke/BlowingBubbles.cs | 8 +- .../C03AAI/C031Ketuduke/C031Ketuduke.cs | 40 ++-- .../C03AAI/C031Ketuduke/C031KetudukeStates.cs | 4 +- .../C03AAI/C031Ketuduke/FlukeGale.cs | 24 +-- .../C03AAI/C031Ketuduke/FlukeTyphoon.cs | 13 +- .../C031Ketuduke/HydrofallHydrobullet.cs | 26 ++- .../Criterion/C03AAI/C031Ketuduke/Roar.cs | 22 +-- .../C03AAI/C031Ketuduke/SpringCrystals.cs | 44 ++--- .../C03AAI/C031Ketuduke/StrewnBubbles.cs | 20 +- .../Criterion/C03AAI/C032Lala/Analysis.cs | 52 +++-- .../C03AAI/C032Lala/ArcaneArrayPlot.cs | 30 +-- .../Criterion/C03AAI/C032Lala/ArcanePoint.cs | 41 ++-- .../Criterion/C03AAI/C032Lala/C032Lala.cs | 18 +- .../C03AAI/C032Lala/C032LalaStates.cs | 4 +- .../C03AAI/C032Lala/PlanarTactics.cs | 38 ++-- .../C03AAI/C032Lala/SpatialTactics.cs | 28 +-- .../C03AAI/C032Lala/SymmetricSurge.cs | 8 +- .../C03AAI/C033Statice/C033Statice.cs | 29 +-- .../C03AAI/C033Statice/C033StaticeStates.cs | 4 +- .../Criterion/C03AAI/C033Statice/Dartboard.cs | 41 ++-- .../Criterion/C03AAI/C033Statice/Fireworks.cs | 146 +++++++-------- .../C033Statice/RingARingOExplosions.cs | 14 +- .../C03AAI/C033Statice/TrickReload.cs | 27 ++- .../EurekaOrthos/DD30TiamatsClone.cs | 36 +--- .../DeepDungeon/EurekaOrthos/DD70Aeturna.cs | 100 ++++------ .../Dungeon/D01TowerOfZot/D011Minduruva.cs | 55 ++---- .../Dungeon/D01TowerOfZot/D012Sanduruva.cs | 46 ++--- .../Dungeon/D01TowerOfZot/D013MagusSisters.cs | 135 ++++--------- .../D11LapisManalis/D110AlbusGriffin.cs | 22 +-- .../D11LapisManalis/D110CaladriusMaturus.cs | 12 +- .../Dungeon/D11LapisManalis/D111Albion.cs | 84 +++------ .../D11LapisManalis/D112GalateaMagna.cs | 76 ++++---- .../Dungeon/D11LapisManalis/D113Cagnazzo.cs | 115 ++++-------- .../Dungeon/D12Aetherfont/D121Lyngbakr.cs | 52 ++--- .../Dungeon/D12Aetherfont/D122Arkas.cs | 99 +++------- .../Dungeon/D12Aetherfont/D123Octomammoth.cs | 79 +++----- .../Dungeon/D13LunarSubterrane/D131DarkElf.cs | 58 ++---- .../D13LunarSubterrane/D132DamcyanAntilon.cs | 80 ++++---- .../Dungeon/D13LunarSubterrane/D133Durante.cs | 109 ++++------- .../Endwalker/Extreme/Ex1Zodiark/Adikia.cs | 12 +- .../Endwalker/Extreme/Ex1Zodiark/Algedon.cs | 12 +- .../Endwalker/Extreme/Ex1Zodiark/Ania.cs | 26 +-- .../Extreme/Ex1Zodiark/AstralEclipse.cs | 40 ++-- .../Extreme/Ex1Zodiark/Ex1Zodiark.cs | 20 +- .../Extreme/Ex1Zodiark/Exoterikos.cs | 26 +-- .../Extreme/Ex1Zodiark/Paradeigma.cs | 72 +++---- .../Endwalker/Extreme/Ex1Zodiark/Styx.cs | 8 +- .../Endwalker/Extreme/Ex2Hydaelyn/Aureole.cs | 16 +- .../Extreme/Ex2Hydaelyn/Crystallize.cs | 48 ++--- .../Endwalker/Extreme/Ex2Hydaelyn/Echoes.cs | 8 +- .../Extreme/Ex2Hydaelyn/Ex2Hydaelyn.cs | 25 +-- .../Extreme/Ex2Hydaelyn/HerosSundering.cs | 26 +-- .../Extreme/Ex2Hydaelyn/InfralateralArc.cs | 18 +- .../Extreme/Ex2Hydaelyn/IntermissionAdds.cs | 18 +- .../Extreme/Ex2Hydaelyn/Lightwave1.cs | 22 +-- .../Extreme/Ex2Hydaelyn/Lightwave2.cs | 30 +-- .../Extreme/Ex2Hydaelyn/Lightwave3.cs | 12 +- .../Extreme/Ex2Hydaelyn/LightwaveCommon.cs | 12 +- .../Extreme/Ex2Hydaelyn/ParhelicCircle.cs | 18 +- .../Extreme/Ex2Hydaelyn/Parhelion.cs | 18 +- .../Extreme/Ex2Hydaelyn/ShiningSaber.cs | 12 +- .../Endwalker/Extreme/Ex2Hydaelyn/Spectrum.cs | 16 +- .../Extreme/Ex2Hydaelyn/WeaponTracker.cs | 26 +-- .../Ex3Endsinger/DespairUnforgotten.cs | 30 +-- .../Extreme/Ex3Endsinger/Elenchos.cs | 14 +- .../Endwalker/Extreme/Ex3Endsinger/Endsong.cs | 12 +- .../Extreme/Ex3Endsinger/Ex3Endsinger.cs | 35 +--- .../Endwalker/Extreme/Ex3Endsinger/Planets.cs | 40 ++-- .../Extreme/Ex3Endsinger/TwinsongAporrhoia.cs | 20 +- .../Ex4Barbariccia/BoldBoulderTrample.cs | 14 +- .../Extreme/Ex4Barbariccia/BrutalRush.cs | 12 +- .../Extreme/Ex4Barbariccia/Ex4Barbariccia.cs | 148 +++------------ .../Ex4Barbariccia/SavageBarberyHairRaid.cs | 25 +-- .../Extreme/Ex4Barbariccia/StiffBreeze.cs | 8 +- .../Extreme/Ex4Barbariccia/Tangle.cs | 18 +- .../Extreme/Ex4Barbariccia/WindingGale.cs | 10 +- .../Extreme/Ex5Rubicante/ArchInferno.cs | 47 +---- .../Extreme/Ex5Rubicante/Dualfire.cs | 8 +- .../Extreme/Ex5Rubicante/Ex5Rubicante.cs | 27 +-- .../Ex5Rubicante/Ex5RubicanteStates.cs | 2 +- .../Extreme/Ex5Rubicante/Flamesent.cs | 47 +---- .../Extreme/Ex5Rubicante/FlamespireBrand.cs | 30 ++- .../Extreme/Ex5Rubicante/FlamespireClaw.cs | 38 ++-- .../Extreme/Ex5Rubicante/OrdealOfPurgation.cs | 24 +-- .../Ex5Rubicante/SweepingImmolation.cs | 40 +--- .../Extreme/Ex6Golbez/AzdajasShadow.cs | 32 ++-- .../Endwalker/Extreme/Ex6Golbez/BlackFang.cs | 6 +- .../Extreme/Ex6Golbez/DoubleMeteor.cs | 50 +++-- .../Extreme/Ex6Golbez/EventideFallTriad.cs | 6 +- .../Endwalker/Extreme/Ex6Golbez/Ex6Golbez.cs | 93 ++------- .../Endwalker/Extreme/Ex6Golbez/GaleSphere.cs | 14 +- .../Endwalker/Extreme/Ex6Golbez/VoidMeteor.cs | 8 +- .../Extreme/Ex6Golbez/VoidStardust.cs | 13 +- .../Endwalker/Extreme/Ex7Zeromus/BlackHole.cs | 32 ++-- .../Extreme/Ex7Zeromus/DarkMatter.cs | 26 ++- .../Extreme/Ex7Zeromus/Ex7Zeromus.cs | 39 +--- .../Endwalker/Extreme/Ex7Zeromus/Flare.cs | 35 ++-- .../Extreme/Ex7Zeromus/FlowOfTheAbyss.cs | 35 ++-- .../Endwalker/Extreme/Ex7Zeromus/Nostalgia.cs | 11 +- .../Extreme/Ex7Zeromus/SableThread.cs | 13 +- .../Extreme/Ex7Zeromus/VisceralWhirl.cs | 56 +++--- .../Extreme/Ex7Zeromus/VoidMeteor.cs | 57 +++--- BossMod/Modules/Endwalker/FATE/Chi.cs | 120 ++++-------- BossMod/Modules/Endwalker/FATE/Daivadipa.cs | 120 +++++------- .../Modules/Endwalker/Hunt/RankA/Aegeiros.cs | 46 ++--- .../Modules/Endwalker/Hunt/RankA/ArchEta.cs | 34 +--- .../Modules/Endwalker/Hunt/RankA/FanAil.cs | 33 +--- .../Endwalker/Hunt/RankA/Gurangatch.cs | 20 +- .../Modules/Endwalker/Hunt/RankA/Hulder.cs | 34 +--- .../Endwalker/Hunt/RankA/LunatenderQueen.cs | 52 +---- .../Modules/Endwalker/Hunt/RankA/Minerva.cs | 44 ++--- .../Endwalker/Hunt/RankA/MoussePrincess.cs | 42 ++--- .../Modules/Endwalker/Hunt/RankA/Petalodus.cs | 28 +-- .../Modules/Endwalker/Hunt/RankA/Storsie.cs | 26 +-- .../Modules/Endwalker/Hunt/RankA/Sugriva.cs | 68 +++---- BossMod/Modules/Endwalker/Hunt/RankA/Yilan.cs | 42 ++--- .../Modules/Endwalker/Hunt/RankS/Armstrong.cs | 38 +--- .../Modules/Endwalker/Hunt/RankS/Burfurlur.cs | 30 +-- BossMod/Modules/Endwalker/Hunt/RankS/Ker.cs | 159 ++++------------ .../Modules/Endwalker/Hunt/RankS/KerShroud.cs | 15 +- .../Endwalker/Hunt/RankS/NarrowRift.cs | 39 ++-- .../Modules/Endwalker/Hunt/RankS/Ophioneus.cs | 29 +-- .../Modules/Endwalker/Hunt/RankS/Ruminator.cs | 24 +-- .../Modules/Endwalker/Hunt/RankS/Sphatika.cs | 44 ++--- .../Endwalker/Quest/Endwalker/AetherialRay.cs | 14 +- .../Endwalker/Quest/Endwalker/AkhMorn.cs | 22 +-- .../Endwalker/Quest/Endwalker/Candlewick.cs | 12 +- .../Endwalker/Quest/Endwalker/Endwalker.cs | 104 +++------- .../Endwalker/Quest/Endwalker/Exaflare.cs | 12 +- .../Endwalker/Quest/Endwalker/SilveredEdge.cs | 28 +-- .../Endwalker/Quest/Endwalker/TidalWave.cs | 10 +- .../Savage/P10SPandaemonium/Border.cs | 30 +-- .../Savage/P10SPandaemonium/DaemoniacBonds.cs | 10 +- .../Savage/P10SPandaemonium/EntanglingWeb.cs | 21 +-- .../Savage/P10SPandaemonium/HarrowingHell.cs | 10 +- .../P10SPandaemonium/P10SPandaemonium.cs | 55 ++---- .../P10SPandaemonium/PandaemoniacMeltdown.cs | 36 ++-- .../P10SPandaemonium/PandaemoniacRay.cs | 18 +- .../Savage/P10SPandaemonium/PartedPlumes.cs | 15 +- .../Savage/P10SPandaemonium/Silkspit.cs | 22 +-- .../Savage/P10SPandaemonium/SoulGrasp.cs | 10 +- .../Savage/P10SPandaemonium/SteelWeb.cs | 28 ++- .../Savage/P10SPandaemonium/Turrets.cs | 43 ++--- .../Savage/P10SPandaemonium/WickedStep.cs | 20 +- .../Savage/P11SThemis/ArcaneRevelation.cs | 33 ++-- .../Savage/P11SThemis/DarkAndLight.cs | 38 ++-- .../Savage/P11SThemis/DarkCurrent.cs | 19 +- .../Endwalker/Savage/P11SThemis/Dike.cs | 10 +- .../Savage/P11SThemis/DivisiveOverruling.cs | 8 +- .../Savage/P11SThemis/HeartOfJudgment.cs | 6 +- .../P11SThemis/InevitableLawSentence.cs | 26 +-- .../Savage/P11SThemis/JuryOverruling.cs | 17 +- .../Savage/P11SThemis/Lightstream.cs | 10 +- .../Endwalker/Savage/P11SThemis/P11SThemis.cs | 10 +- .../Endwalker/Savage/P11SThemis/Styx.cs | 10 +- .../Savage/P11SThemis/UpheldOverruling.cs | 35 +--- .../Endwalker/Savage/P12S1Athena/Dialogos.cs | 22 +-- .../Savage/P12S1Athena/EngravementOfSouls1.cs | 28 ++- .../Savage/P12S1Athena/EngravementOfSouls2.cs | 42 ++--- .../Savage/P12S1Athena/EngravementOfSouls3.cs | 102 +++++----- .../P12S1Athena/EngravementOfSoulsCommon.cs | 60 +++--- .../Endwalker/Savage/P12S1Athena/Glaukopis.cs | 16 +- .../Savage/P12S1Athena/P12S1Athena.cs | 22 +-- .../Savage/P12S1Athena/P12S1AthenaConfig.cs | 4 +- .../Endwalker/Savage/P12S1Athena/Palladion.cs | 112 +++++------ .../Savage/P12S1Athena/SuperchainTheory.cs | 49 +++-- .../Savage/P12S1Athena/TrinityOfSouls.cs | 58 +++--- .../P12S1Athena/UnnaturalEnchainment.cs | 10 +- .../Savage/P12S1Athena/WhiteFlame.cs | 18 +- .../Savage/P12S2PallasAthena/CaloricTheory.cs | 71 +++---- .../P12S2PallasAthena/ClassicalConcepts.cs | 84 ++++----- .../Savage/P12S2PallasAthena/CrushHelm.cs | 8 +- .../Savage/P12S2PallasAthena/Ekpyrosis.cs | 31 +-- .../Savage/P12S2PallasAthena/Gaiaochos.cs | 70 +++---- .../P12S2PallasAthena/P12S2PallasAthena.cs | 4 +- .../P12S2PallasAthenaConfig.cs | 4 +- .../P12S2PallasAthena/PalladianGrasp.cs | 33 ++-- .../Savage/P12S2PallasAthena/Pangenesis.cs | 51 ++--- .../Savage/P1SErichthonios/AetherExplosion.cs | 34 ++-- .../Savage/P1SErichthonios/Flails.cs | 28 +-- .../Savage/P1SErichthonios/Intemperance.cs | 71 +++---- .../Savage/P1SErichthonios/Knockback.cs | 48 ++--- .../Endwalker/Savage/P1SErichthonios/P1S.cs | 4 +- .../Savage/P1SErichthonios/P1SConfig.cs | 4 +- .../Savage/P1SErichthonios/Shackles.cs | 107 ++++++----- .../Savage/P2SHippokampos/Cataract.cs | 14 +- .../Savage/P2SHippokampos/ChannelingFlow.cs | 46 ++--- .../Savage/P2SHippokampos/Coherence.cs | 40 ++-- .../Savage/P2SHippokampos/Dissociation.cs | 18 +- .../Savage/P2SHippokampos/KampeosHarma.cs | 51 ++--- .../Savage/P2SHippokampos/OminousBubbling.cs | 18 +- .../Endwalker/Savage/P2SHippokampos/P2S.cs | 21 +-- .../Savage/P2SHippokampos/PredatoryAvarice.cs | 40 ++-- .../Savage/P2SHippokampos/SewageDeluge.cs | 102 +++++----- .../Savage/P2SHippokampos/TaintedFlood.cs | 26 ++- .../Endwalker/Savage/P3SPhoinix/Ashplume.cs | 24 +-- .../Savage/P3SPhoinix/BirdDistance.cs | 36 ++-- .../Endwalker/Savage/P3SPhoinix/BirdTether.cs | 56 +++--- .../Savage/P3SPhoinix/BrightenedFire.cs | 32 ++-- .../Endwalker/Savage/P3SPhoinix/Cinderwing.cs | 14 +- .../Savage/P3SPhoinix/DarkblazeTwister.cs | 34 ++-- .../Savage/P3SPhoinix/DarkenedFire.cs | 16 +- .../Savage/P3SPhoinix/DevouringBrand.cs | 14 +- .../Endwalker/Savage/P3SPhoinix/Fireplume.cs | 46 ++--- .../Savage/P3SPhoinix/FlamesOfAsphodelos.cs | 32 ++-- .../Savage/P3SPhoinix/FledglingFlight.cs | 36 ++-- .../Endwalker/Savage/P3SPhoinix/P3S.cs | 17 +- .../Endwalker/Savage/P3SPhoinix/P3SStates.cs | 4 +- .../Savage/P3SPhoinix/StormsOfAsphodelos.cs | 50 ++--- .../Savage/P3SPhoinix/SunshadowTether.cs | 42 ++--- .../Savage/P3SPhoinix/TrailOfCondemnation.cs | 42 ++--- .../Savage/P4S1Hesperos/BeloneCoils.cs | 12 +- .../Savage/P4S1Hesperos/DirectorsBelone.cs | 40 ++-- .../Savage/P4S1Hesperos/ElementalBelone.cs | 20 +- .../Savage/P4S1Hesperos/InversiveChlamys.cs | 32 ++-- .../Endwalker/Savage/P4S1Hesperos/P4S1.cs | 15 +- .../Savage/P4S1Hesperos/P4S1States.cs | 2 +- .../Endwalker/Savage/P4S1Hesperos/Pinax.cs | 52 ++--- .../Savage/P4S1Hesperos/PinaxUptime.cs | 10 +- .../Savage/P4S1Hesperos/SettingTheScene.cs | 28 +-- .../Endwalker/Savage/P4S1Hesperos/Shift.cs | 22 +-- .../Savage/P4S1Hesperos/VengefulBelone.cs | 50 ++--- .../Savage/P4S2Hesperos/CurtainCall.cs | 34 ++-- .../Savage/P4S2Hesperos/HellsSting.cs | 14 +- .../Savage/P4S2Hesperos/NearFarSight.cs | 26 +-- .../Endwalker/Savage/P4S2Hesperos/P4S2.cs | 14 +- .../Savage/P4S2Hesperos/P4S2Config.cs | 4 +- .../Savage/P4S2Hesperos/WreathOfThorns1.cs | 22 +-- .../Savage/P4S2Hesperos/WreathOfThorns2.cs | 42 ++--- .../Savage/P4S2Hesperos/WreathOfThorns3.cs | 50 ++--- .../Savage/P4S2Hesperos/WreathOfThorns4.cs | 66 +++---- .../Savage/P4S2Hesperos/WreathOfThorns5.cs | 28 +-- .../Savage/P5SProtoCarbuncle/ClawTail.cs | 14 +- .../Endwalker/Savage/P5SProtoCarbuncle/P5S.cs | 41 +--- .../Savage/P5SProtoCarbuncle/RubyGlow1.cs | 8 +- .../Savage/P5SProtoCarbuncle/RubyGlow2.cs | 20 +- .../Savage/P5SProtoCarbuncle/RubyGlow3.cs | 18 +- .../Savage/P5SProtoCarbuncle/RubyGlow4.cs | 18 +- .../Savage/P5SProtoCarbuncle/RubyGlow5.cs | 8 +- .../Savage/P5SProtoCarbuncle/RubyGlow6.cs | 10 +- .../P5SProtoCarbuncle/RubyGlowCommon.cs | 76 ++++---- .../P5SProtoCarbuncle/StarvingStampede.cs | 4 +- .../P5SProtoCarbuncle/VenomSquallSurge.cs | 36 ++-- .../Savage/P5SProtoCarbuncle/VenomTowers.cs | 10 +- .../Savage/P5SProtoCarbuncle/VenomousMass.cs | 14 +- .../P6SHegemone/AetheronecrosisPredation.cs | 22 +-- .../Endwalker/Savage/P6SHegemone/Agonies.cs | 12 +- .../Savage/P6SHegemone/ChorosIxou.cs | 12 +- .../Savage/P6SHegemone/Exocleaver.cs | 12 +- .../Endwalker/Savage/P6SHegemone/P6S.cs | 33 +--- .../Savage/P6SHegemone/PathogenicCells.cs | 10 +- .../Savage/P6SHegemone/Polyominoid.cs | 16 +- .../Endwalker/Savage/P6SHegemone/PteraIxou.cs | 33 ++-- .../Endwalker/Savage/P6SHegemone/Synergy.cs | 29 ++- .../Savage/P6SHegemone/Transmission.cs | 48 +++-- .../Savage/P7SAgdistis/BladesOfAttis.cs | 12 +- .../Endwalker/Savage/P7SAgdistis/Border.cs | 38 ++-- .../P7SAgdistis/DispersedCondensedAero.cs | 34 ++-- .../Savage/P7SAgdistis/ForbiddenFruit1.cs | 6 +- .../Savage/P7SAgdistis/ForbiddenFruit10.cs | 22 +-- .../Savage/P7SAgdistis/ForbiddenFruit2.cs | 6 +- .../Savage/P7SAgdistis/ForbiddenFruit3.cs | 6 +- .../Savage/P7SAgdistis/ForbiddenFruit4.cs | 20 +- .../Savage/P7SAgdistis/ForbiddenFruit5.cs | 12 +- .../Savage/P7SAgdistis/ForbiddenFruit6.cs | 6 +- .../Savage/P7SAgdistis/ForbiddenFruit7.cs | 6 +- .../Savage/P7SAgdistis/ForbiddenFruit8.cs | 16 +- .../Savage/P7SAgdistis/ForbiddenFruit9.cs | 6 +- .../P7SAgdistis/ForbiddenFruitCommon.cs | 42 ++--- .../Endwalker/Savage/P7SAgdistis/P7S.cs | 63 ++----- .../Endwalker/Savage/P7SAgdistis/WindsHoly.cs | 8 +- .../Savage/P8S1Hephaistos/Centaur1.cs | 31 ++- .../Savage/P8S1Hephaistos/Centaur2.cs | 78 ++++---- .../Savage/P8S1Hephaistos/CentaurCommon.cs | 8 +- .../Savage/P8S1Hephaistos/ChtonicVent.cs | 8 +- .../Savage/P8S1Hephaistos/Flameviper.cs | 10 +- .../Savage/P8S1Hephaistos/ManifoldFlames.cs | 42 ++--- .../Endwalker/Savage/P8S1Hephaistos/NFlare.cs | 30 ++- .../Endwalker/Savage/P8S1Hephaistos/P8S1.cs | 16 +- .../Savage/P8S1Hephaistos/P8S1Config.cs | 4 +- .../Savage/P8S1Hephaistos/P8S1States.cs | 2 +- .../Endwalker/Savage/P8S1Hephaistos/Snake1.cs | 42 ++--- .../Endwalker/Savage/P8S1Hephaistos/Snake2.cs | 51 +++-- .../Savage/P8S1Hephaistos/SnakeCommon.cs | 34 ++-- .../Savage/P8S1Hephaistos/Sunforge.cs | 41 ++-- .../Savage/P8S2Hephaistos/AshingBlaze.cs | 10 +- .../Savage/P8S2Hephaistos/Dominion.cs | 24 ++- .../Savage/P8S2Hephaistos/EgoDeath.cs | 10 +- .../Savage/P8S2Hephaistos/EndOfDays.cs | 12 +- .../P8S2Hephaistos/EndOfDaysTethered.cs | 20 +- .../Savage/P8S2Hephaistos/HighConcept.cs | 115 ++++++------ .../P8S2Hephaistos/LimitlessDesolation.cs | 31 ++- .../Savage/P8S2Hephaistos/NaturalAlignment.cs | 28 ++- .../Endwalker/Savage/P8S2Hephaistos/P8S2.cs | 10 +- .../Savage/P8S2Hephaistos/P8S2Config.cs | 4 +- .../P8S2Hephaistos/TyrantsUnholyDarkness.cs | 21 +-- .../Savage/P9SKokytos/ArchaicRockbreaker.cs | 72 +++---- .../Endwalker/Savage/P9SKokytos/Charibdys.cs | 72 +++---- .../Savage/P9SKokytos/ChimericSuccession.cs | 36 ++-- .../Savage/P9SKokytos/DualityOfDeath.cs | 16 +- .../Endwalker/Savage/P9SKokytos/Dualspell.cs | 40 ++-- .../Savage/P9SKokytos/LevinstrikeSummoning.cs | 50 +++-- .../Endwalker/Savage/P9SKokytos/P9SKokytos.cs | 27 +-- .../Endwalker/Savage/P9SKokytos/Uplift.cs | 12 +- .../TheExcitatron6000/LuckyFace.cs | 110 +++-------- .../GymnasiouAcheloios.cs | 85 ++------- .../GymnasiouLeon.cs | 45 +---- .../GymnasiouMandragoras.cs | 51 +---- .../GymnasiouMegakantha.cs | 51 ++--- .../GymnasiouMeganereis.cs | 88 ++------- .../GymnasiouPithekos.cs | 60 ++---- .../GymnasiouSatyros.cs | 39 +--- .../GymnasiouSphinx.cs | 87 ++------- .../GymnasiouStyphnolobion.cs | 70 ++----- .../GymnasiouTigris.cs | 69 ++----- .../GymnasiouTriton.cs | 27 +-- .../LampasChrysine.cs | 29 +-- .../LyssaChrysine.cs | 71 +++---- .../TheShiftingGymnasionAgonon/Narkissos.cs | 67 ++----- .../Endwalker/Trial/T02Hydaelyn/Echoes.cs | 8 +- .../Endwalker/Trial/T02Hydaelyn/Exodus.cs | 14 +- .../Endwalker/Trial/T02Hydaelyn/Lightwave.cs | 8 +- .../Trial/T02Hydaelyn/ParhelicCircle.cs | 37 ++-- .../Trial/T02Hydaelyn/T02Hydaelyn.cs | 75 ++------ .../Trial/T02Hydaelyn/WeaponTracker.cs | 16 +- .../Endwalker/Trial/T08Asura/T08Asura.cs | 78 ++------ .../Trial/T08Asura/T08AsuriChakra.cs | 35 +--- .../Endwalker/Trial/T08Asura/T08Laceration.cs | 14 +- .../Endwalker/Trial/T08Asura/T08ManyFaces.cs | 12 +- .../Trial/T08Asura/T08MyriadAspects.cs | 12 +- .../Trial/T08Asura/T08SixBladedKhadga.cs | 14 +- .../Modules/Endwalker/Ultimate/DSW1/DSW1.cs | 17 +- .../Endwalker/Ultimate/DSW1/DSW1Config.cs | 4 +- .../Endwalker/Ultimate/DSW1/Heavensblaze.cs | 24 +-- .../Endwalker/Ultimate/DSW1/Heavensflame.cs | 73 ++++---- .../Ultimate/DSW1/HyperdimensionalSlash.cs | 45 +++-- .../Endwalker/Ultimate/DSW1/PureOfHeart.cs | 39 ++-- .../Endwalker/Ultimate/DSW1/ShiningBlade.cs | 62 +++--- .../Modules/Endwalker/Ultimate/DSW2/DSW2.cs | 106 ++--------- .../Endwalker/Ultimate/DSW2/DSW2Config.cs | 22 +-- .../Endwalker/Ultimate/DSW2/DSW2States.cs | 6 +- .../Endwalker/Ultimate/DSW2/DragonsGaze.cs | 17 +- .../Endwalker/Ultimate/DSW2/HeavyImpact.cs | 19 +- .../Endwalker/Ultimate/DSW2/P2BroadSwing.cs | 10 +- .../Endwalker/Ultimate/DSW2/P2Discomposed.cs | 4 +- .../Ultimate/DSW2/P2SanctityOfTheWard1.cs | 108 +++++------ .../Ultimate/DSW2/P2SanctityOfTheWard2.cs | 177 ++++++++---------- .../Ultimate/DSW2/P2StrengthOfTheWard1.cs | 23 +-- .../Ultimate/DSW2/P2StrengthOfTheWard2.cs | 95 +++++----- .../Ultimate/DSW2/P3DarkdragonDiveCounter.cs | 18 +- .../Ultimate/DSW2/P3DiveFromGrace.cs | 127 ++++++------- .../Endwalker/Ultimate/DSW2/P4Hatebound.cs | 53 +++--- .../Endwalker/Ultimate/DSW2/P4Intermission.cs | 10 +- .../Ultimate/DSW2/P5DeathOfTheHeavens.cs | 105 +++++------ .../Ultimate/DSW2/P5WrathOfTheHeavens.cs | 149 ++++++--------- .../Endwalker/Ultimate/DSW2/P6AkhAfah.cs | 14 +- .../Ultimate/DSW2/P6HallowedWings.cs | 77 ++++---- .../Endwalker/Ultimate/DSW2/P6HotWingTail.cs | 8 +- .../Endwalker/Ultimate/DSW2/P6MortalVow.cs | 46 ++--- .../Endwalker/Ultimate/DSW2/P6Touchdown.cs | 32 ++-- .../Endwalker/Ultimate/DSW2/P6WrothFlames.cs | 80 ++++---- .../Endwalker/Ultimate/DSW2/P6Wyrmsbreath.cs | 74 ++++---- .../Endwalker/Ultimate/DSW2/P7AkhMornsEdge.cs | 6 +- .../Ultimate/DSW2/P7ExaflaresEdge.cs | 16 +- .../Ultimate/DSW2/P7FlamesIceOfAscalon.cs | 10 +- .../Ultimate/DSW2/P7GigaflaresEdge.cs | 8 +- .../Ultimate/DSW2/P7MornAfahsEdge.cs | 6 +- .../Endwalker/Ultimate/DSW2/P7Trinity.cs | 12 +- .../Ultimate/TOP/CommonAssignments.cs | 10 +- .../Endwalker/Ultimate/TOP/P1Pantokrator.cs | 49 +++-- .../Endwalker/Ultimate/TOP/P1ProgramLoop.cs | 30 +-- .../Ultimate/TOP/P2LimitlessSynergy.cs | 34 ++-- .../Endwalker/Ultimate/TOP/P2PartySynergy.cs | 74 ++++---- .../Endwalker/Ultimate/TOP/P3HelloWorld.cs | 92 ++++----- .../Endwalker/Ultimate/TOP/P3Intermission.cs | 35 ++-- .../Ultimate/TOP/P3OversampledWaveCannon.cs | 24 +-- .../Endwalker/Ultimate/TOP/P4WaveCannon.cs | 31 ++- .../Modules/Endwalker/Ultimate/TOP/P5Delta.cs | 106 +++++------ .../Ultimate/TOP/P5NearDistantWorld.cs | 22 +-- .../Modules/Endwalker/Ultimate/TOP/P5Omega.cs | 90 ++++----- .../Modules/Endwalker/Ultimate/TOP/P5Sigma.cs | 96 +++++----- .../Endwalker/Ultimate/TOP/P5SolarRay.cs | 10 +- .../Endwalker/Ultimate/TOP/P6CosmoArrow.cs | 20 +- .../Endwalker/Ultimate/TOP/P6CosmoDive.cs | 10 +- .../Endwalker/Ultimate/TOP/P6CosmoMeteor.cs | 29 +-- .../Endwalker/Ultimate/TOP/P6FlashGale.cs | 10 +- .../Endwalker/Ultimate/TOP/P6WaveCannon.cs | 21 +-- BossMod/Modules/Endwalker/Ultimate/TOP/TOP.cs | 20 +- .../Endwalker/Unreal/Un1Ultima/Garuda.cs | 14 +- .../Endwalker/Unreal/Un1Ultima/Mechanics.cs | 44 ++--- .../Endwalker/Unreal/Un1Ultima/TitanIfrit.cs | 8 +- .../Endwalker/Unreal/Un1Ultima/Un1Ultima.cs | 9 +- .../Endwalker/Unreal/Un2Sephirot/EinSof.cs | 2 +- .../Unreal/Un2Sephirot/P1FiendishRage.cs | 16 +- .../Endwalker/Unreal/Un2Sephirot/P1Ratzon.cs | 26 +-- .../Endwalker/Unreal/Un2Sephirot/P3Daat.cs | 6 +- .../Unreal/Un2Sephirot/P3Earthshaker.cs | 10 +- .../Unreal/Un2Sephirot/P3FiendishWail.cs | 12 +- .../Unreal/Un2Sephirot/P3GevurahChesed.cs | 12 +- .../Unreal/Un2Sephirot/Un2Sephirot.cs | 55 ++---- .../Unreal/Un3Sophia/ArmsOfWisdom.cs | 8 +- .../Endwalker/Unreal/Un3Sophia/Demiurges.cs | 30 +-- .../Endwalker/Unreal/Un3Sophia/Pairs.cs | 24 +-- .../Endwalker/Unreal/Un3Sophia/Tilt.cs | 12 +- .../Endwalker/Unreal/Un3Sophia/Un3Sophia.cs | 75 ++------ .../Endwalker/Unreal/Un4Zurvan/P1Platforms.cs | 4 +- .../Endwalker/Unreal/Un4Zurvan/P2Adds.cs | 30 +-- .../Unreal/Un4Zurvan/P2BrokenSeal.cs | 18 +- .../Unreal/Un4Zurvan/P2DemonsClaw.cs | 14 +- .../Endwalker/Unreal/Un4Zurvan/P2Eidos.cs | 2 +- .../Endwalker/Unreal/Un4Zurvan/P2Soar.cs | 27 ++- .../Endwalker/Unreal/Un4Zurvan/Un4Zurvan.cs | 65 ++----- .../Unreal/Un5Thordan/BurningChains.cs | 18 +- .../Unreal/Un5Thordan/DragonsGaze.cs | 10 +- .../Unreal/Un5Thordan/HolyShieldBash.cs | 10 +- .../Unreal/Un5Thordan/Intermission2.cs | 23 +-- .../Unreal/Un5Thordan/Intermission3.cs | 43 ++--- .../Unreal/Un5Thordan/LightningStorm.cs | 6 +- .../Unreal/Un5Thordan/SpiralThrust.cs | 14 +- .../Endwalker/Unreal/Un5Thordan/Un5Thordan.cs | 75 ++------ .../TheSliceIsRight/TheSliceIsRight.cs | 29 +-- .../Global/MaskedCarnivale/ObstacleLayouts.cs | 12 +- .../Stage01AllsWellThatStartsWell/Stage01.cs | 7 +- .../Stage02MuchAdoAboutPudding/Stage02Act1.cs | 9 +- .../Stage02MuchAdoAboutPudding/Stage02Act2.cs | 7 +- .../Stage03WaitingForGolem/Stage03.cs | 19 +- .../Stage04Act1.cs | 4 +- .../Stage04Act2.cs | 19 +- .../Stage05TheThreepennyTurtles/Stage05.cs | 2 +- .../Stage06EyeSociety/Stage06Act1.cs | 32 ++-- .../Stage06EyeSociety/Stage06Act2.cs | 42 ++--- .../Stage07AChorusSlime/Stage07Act1.cs | 18 +- .../Stage07AChorusSlime/Stage07Act2.cs | 6 +- .../Stage07AChorusSlime/Stage07Act3.cs | 11 +- .../Stage08BombedyOfErrors/Stage08Act1.cs | 16 +- .../Stage08BombedyOfErrors/Stage08Act2.cs | 16 +- .../Stage09ToKillAMockingslime/Stage09.cs | 17 +- .../Stage10ALittleKnightMusic/Stage10.cs | 44 +---- .../Stage11Act1.cs | 2 +- .../Stage11Act2.cs | 2 +- .../Stage12Act1.cs | 2 +- .../Stage12Act2.cs | 22 +-- .../Stage13BeautyAndABeast/Stage13Act1.cs | 7 +- .../Stage13BeautyAndABeast/Stage13Act2.cs | 47 +---- .../Stage14BlobsInTheWoods/Stage14Act1.cs | 13 +- .../Stage14BlobsInTheWoods/Stage14Act2.cs | 13 +- .../Stage15TheMeNobodyNodes/Stage15.cs | 78 +++----- .../Stage16SunsetBullevard/Stage16Act1.cs | 2 +- .../Stage16SunsetBullevard/Stage16Act2.cs | 50 ++--- .../Stage17TheSwordOfMusic/Stage17Act1.cs | 25 +-- .../Stage17TheSwordOfMusic/Stage17Act2.cs | 36 +--- .../Stage18Act1.cs | 28 +-- .../Stage18Act2.cs | 28 +-- .../Stage19Act1.cs | 23 +-- .../Stage19Act2.cs | 39 ++-- .../Stage20MissTyphon/Stage20Act1.cs | 14 +- .../Stage20MissTyphon/Stage20Act2.cs | 27 +-- .../Stage20MissTyphon/Stage20Act3.cs | 49 ++--- .../Stage21Act1.cs | 14 +- .../Stage21Act2.cs | 34 +--- .../Stage22HereComesTheBoom/Stage22Act1.cs | 4 +- .../Stage22HereComesTheBoom/Stage22Act2.cs | 29 +-- .../Stage23BehemothsAndBroomsticks/Stage23.cs | 29 +-- .../Stage24Act1.cs | 25 +-- .../Stage24Act2.cs | 36 +--- .../Stage24Act3.cs | 36 ++-- .../Stage25Act1.cs | 47 ++--- .../Stage25Act2.cs | 30 +-- .../Stage25Act3.cs | 73 ++------ .../Stage26PapaMia/Stage26Act1.cs | 25 +-- .../Stage26PapaMia/Stage26Act2.cs | 47 ++--- .../Stage27LockUpYourSnorters/Stage27.cs | 49 +++-- .../Global/PVP/HiddenGorge/GoblinMercenary.cs | 35 ++-- .../Modules/Global/Quest/FF15Collab/Garuda.cs | 68 +++---- .../Global/Quest/FF15Collab/Iseultalon.cs | 41 ++-- .../Modules/Global/Quest/FF15Collab/MA-x.cs | 15 +- .../Global/Quest/FF16Collab/InfernalShadow.cs | 93 +++------ .../Quest/FF16Collab/InfernalShadowStates.cs | 2 +- .../PalaceOfTheDead/D60TheBlackRider.cs | 47 ++--- .../DeepDungeon/PalaceOfTheDead/D70Yaquaru.cs | 41 ++-- .../DeepDungeon/PalaceOfTheDead/D80Gudanna.cs | 29 +-- .../Dungeon/D01Sastasha/D010Switch.cs | 4 +- .../Dungeon/D03Copperbell/D031Kottos.cs | 25 +-- .../Dungeon/D03Copperbell/D032IchorousIre.cs | 20 +- .../Dungeon/D03Copperbell/D033Gyges.cs | 30 +-- .../Dungeon/D05Totorak/D053Graffias.cs | 25 +-- .../Dungeon/D06Haukke/D061ManorClaviger.cs | 20 +- .../Dungeon/D06Haukke/D063LadyAmandine.cs | 20 +- .../Dungeon/D07Brayflox/D074Aiatar.cs | 25 +-- .../Dungeon/D08Qarn/D081Teratotaur.cs | 31 ++- .../Dungeon/D08Qarn/D082TempleGuardian.cs | 15 +- .../Dungeon/D08Qarn/D083Adjudicator.cs | 10 +- .../Dungeon/D09Cutter/D092GiantTunnelWorm.cs | 16 +- .../Dungeon/D09Cutter/D093Chimera.cs | 42 +---- .../Dungeon/D10StoneVigil/D101ChudoYudo.cs | 19 +- .../Dungeon/D10StoneVigil/D102Koshchei.cs | 21 +-- .../Dungeon/D10StoneVigil/D103Isgebind.cs | 36 +--- .../D11DzemaelDarkhold/D111AllSeeingEye.cs | 26 +-- .../Dungeon/D11DzemaelDarkhold/D113Batraal.cs | 17 +- .../Dungeon/D12AurumVale/D121Locksmith.cs | 17 +- .../Dungeon/D12AurumVale/D122Coincounter.cs | 30 +-- .../D12AurumVale/D123MisersMistress.cs | 14 +- .../D13CastrumMeridianum/D131BlackEft.cs | 20 +- .../D132MagitekVanguardF1.cs | 35 +--- .../Dungeon/D13CastrumMeridianum/D133Livia.cs | 47 ++--- .../Dungeon/D14Praetorium/D141Colossus.cs | 30 +-- .../Dungeon/D14Praetorium/D142Nero.cs | 29 +-- .../Dungeon/D14Praetorium/D143Gaius.cs | 48 ++--- .../D15WanderersPalace/D151KeeperOfHalidom.cs | 25 +-- .../D15WanderersPalace/D152GiantBavarois.cs | 20 +- .../Dungeon/D16Amdapor/D161Psycheflayer.cs | 40 +--- .../Dungeon/D16Amdapor/D162DemonWall.cs | 23 +-- .../Dungeon/D16Amdapor/D163Anantaboga.cs | 39 ++-- .../Extreme/Ex1Ultima/AethericBoom.cs | 14 +- .../Extreme/Ex1Ultima/Aetheroplasm.cs | 14 +- .../Extreme/Ex1Ultima/CrimsonCyclone.cs | 10 +- .../Extreme/Ex1Ultima/Ex1Ultima.cs | 35 +--- .../Extreme/Ex1Ultima/Ex1UltimaAI.cs | 8 +- .../Ex1Ultima/EyeOfTheStormGeocrush.cs | 10 +- .../RealmReborn/Extreme/Ex1Ultima/Freefire.cs | 14 +- .../Ex1Ultima/MistralSongVulcanBurst.cs | 32 ++-- .../Extreme/Ex1Ultima/TankPurge.cs | 10 +- .../Extreme/Ex1Ultima/ViscousAetheroplasm.cs | 14 +- .../Extreme/Ex2Garuda/Ex2Garuda.cs | 50 +---- .../Extreme/Ex2Garuda/Ex2GarudaAI.cs | 14 +- .../Extreme/Ex2Garuda/Ex2GarudaStates.cs | 2 +- .../Extreme/Ex2Garuda/EyeOfTheStorm.cs | 10 +- .../Extreme/Ex2Garuda/MistralSong.cs | 14 +- .../Extreme/Ex2Garuda/SpinyShield.cs | 6 +- .../Extreme/Ex2Garuda/WickedWheel.cs | 22 +-- .../RealmReborn/Extreme/Ex3Titan/Ex3Titan.cs | 15 +- .../Extreme/Ex3Titan/Ex3TitanAI.cs | 26 +-- .../Extreme/Ex3Titan/Ex3TitanStates.cs | 12 +- .../RealmReborn/Extreme/Ex3Titan/Geocrush.cs | 18 +- .../Extreme/Ex3Titan/GraniteGaol.cs | 20 +- .../Extreme/Ex3Titan/LandslideBurst.cs | 6 +- .../Extreme/Ex3Titan/MountainBuster.cs | 4 +- .../RealmReborn/Extreme/Ex3Titan/Tumult.cs | 8 +- .../RealmReborn/Extreme/Ex3Titan/Upheaval.cs | 20 +- .../RealmReborn/Extreme/Ex4Ifrit/Eruption.cs | 12 +- .../RealmReborn/Extreme/Ex4Ifrit/Ex4Ifrit.cs | 10 +- .../Extreme/Ex4Ifrit/Ex4IfritAI.cs | 114 +++++------ .../RealmReborn/Extreme/Ex4Ifrit/Hellfire.cs | 6 +- .../Extreme/Ex4Ifrit/InfernalFetters.cs | 20 +- .../Extreme/Ex4Ifrit/SearingWind.cs | 16 +- .../RealmReborn/Raid/T01Caduceus/Platforms.cs | 6 +- .../RealmReborn/Raid/T01Caduceus/T01ADS.cs | 25 +-- .../RealmReborn/Raid/T01Caduceus/T01AI.cs | 20 +- .../Raid/T01Caduceus/T01Caduceus.cs | 52 ++--- .../Raid/T02MultiADS/AllaganRot.cs | 26 +-- .../Raid/T02MultiADS/T02MultiADS.cs | 65 ++----- .../Raid/T04Gauntlet/T04Gauntlet.cs | 12 +- .../RealmReborn/Raid/T05Twintania/Common.cs | 38 ++-- .../RealmReborn/Raid/T05Twintania/Phase1.cs | 9 +- .../RealmReborn/Raid/T05Twintania/Phase2.cs | 48 ++--- .../RealmReborn/Raid/T05Twintania/Phase3.cs | 38 ++-- .../RealmReborn/Raid/T05Twintania/Phase4.cs | 28 +-- .../RealmReborn/Raid/T05Twintania/Phase5.cs | 22 +-- .../RealmReborn/Trial/T01IfritN/T01IfritN.cs | 26 +-- .../RealmReborn/Trial/T02TitanN/T02TitanN.cs | 26 +-- .../Trial/T03GarudaN/T03GarudaN.cs | 26 +-- .../T04PortaDecumana/T04PortaDecumana1.cs | 54 ++---- .../T04PortaDecumana/T04PortaDecumana2.cs | 62 ++---- .../RealmReborn/Trial/T05IfritH/T05IfritH.cs | 31 ++- .../Trial/T06GarudaH/T06GarudaH.cs | 29 +-- .../RealmReborn/Trial/T07TitanH/T07TitanH.cs | 37 ++-- .../Trial/T08ThornmarchH/MoogleGoRound.cs | 8 +- .../Trial/T08ThornmarchH/PomMeteor.cs | 18 +- .../Trial/T08ThornmarchH/PomStone.cs | 6 +- .../Trial/T08ThornmarchH/T08ThornmarchH.cs | 70 ++----- .../Trial/T09WhorleaterH/T09WhorleaterH.cs | 15 +- .../T09WhorleaterH/T09WhorleaterHBodyslam.cs | 28 +-- .../T09WhorleaterH/T09WhorleaterHHints.cs | 8 +- .../T09WhorleaterHSpinningDive.cs | 16 +- .../D01Holminster/D011ForgivenDissonance.cs | 40 +--- .../D01Holminster/D012TesleentheForgiven.cs | 33 +--- .../Dungeon/D01Holminster/D013Philia.cs | 112 +++++------ .../D03QitanaRavel/D030RonkanDreamer.cs | 39 ++-- .../Dungeon/D03QitanaRavel/D031Lozatl.cs | 38 +--- .../Dungeon/D03QitanaRavel/D032Batsquatch.cs | 40 +--- .../Dungeon/D03QitanaRavel/D033Eros.cs | 73 +++----- .../D05MtGulg/D050ForgivenPrejudice.cs | 10 +- .../Dungeon/D05MtGulg/D051ForgivenCruelty.cs | 35 +--- .../Dungeon/D05MtGulg/D052ForgivenApathy.cs | 10 +- .../Dungeon/D05MtGulg/D053ForgivenWhimsy.cs | 30 +-- .../Dungeon/D05MtGulg/D054ForgivenRevelry.cs | 20 +- .../D05MtGulg/D055ForgivenObscenity.cs | 64 ++----- .../Shadowbringers/FATE/Archaeotania.cs | 85 ++------- .../Modules/Shadowbringers/FATE/Formidable.cs | 86 +++------ .../CE11ShadowOfDeathHand.cs | 55 ++---- .../CriticalEngagement/CE12BayingOfHounds.cs | 61 ++---- .../CriticalEngagement/CE13KillItWithFire.cs | 53 ++---- .../CriticalEngagement/CE14VigilForLost.cs | 50 +---- .../CriticalEngagement/CE21FinalFurlong.cs | 49 ++--- .../CriticalEngagement/CE31MetalFoxChaos.cs | 32 +--- .../CE41WithDiremiteAndMain.cs | 52 ++--- .../CE42FromBeyondTheGrave.cs | 65 ++----- .../CriticalEngagement/CE44FamiliarFace.cs | 55 ++---- .../CE51ThereWouldBeBlood.cs | 55 ++---- .../CriticalEngagement/CE52TimeToBurn.cs | 34 ++-- .../CE53HereComesTheCavalry.cs | 80 +++----- .../CriticalEngagement/CE54NeverCryWolf.cs | 65 +++---- .../CriticalEngagement/CE62LooksToDieFor.cs | 72 +++---- .../CriticalEngagement/CE63WornToShadow.cs | 42 ++--- .../CriticalEngagement/CE64FeelingTheBurn.cs | 49 ++--- .../DRS1TrinitySeeker/ActOfMercy.cs | 6 +- .../DRS1TrinitySeeker/BalefulBlade.cs | 10 +- .../DRS1TrinitySeeker/BalefulFirestorm.cs | 6 +- .../DRS1TrinitySeeker/BalefulSwathe.cs | 8 +- .../DelubrumReginae/DRS1TrinitySeeker/DRS1.cs | 45 +---- .../DRS1TrinitySeeker/DRS1States.cs | 8 +- .../DRS1TrinitySeeker/IronSplitter.cs | 20 +- .../DRS1TrinitySeeker/MercifulMoon.cs | 6 +- .../DRS1TrinitySeeker/MercyFourfold.cs | 8 +- .../DRS2StygimolochWarrior/DRS2.cs | 20 +- .../DRS2StygimolochWarrior/Entrapment.cs | 47 ++--- .../DRS2StygimolochWarrior/FocusedTremor.cs | 21 +-- .../UnrelentingCharge.cs | 8 +- .../Foray/DelubrumReginae/DRS3Dahu/DRS3.cs | 25 +-- .../DRS3Dahu/FeralHowlHystericAssault.cs | 4 +- .../DRS3Dahu/FirebreatheRotating.cs | 8 +- .../DelubrumReginae/DRS3Dahu/Shockwave.cs | 6 +- .../DelubrumReginae/DRS3Dahu/SpitFlame.cs | 10 +- .../DRS4QueensGuard/AboveBoard.cs | 12 +- .../DRS4QueensGuard/CoatOfArms.cs | 2 +- .../DelubrumReginae/DRS4QueensGuard/DRS4.cs | 45 +---- .../DRS4QueensGuard/GreatBallOfFire.cs | 6 +- .../DRS4QueensGuard/OptimalOffensive.cs | 25 +-- .../SpellforgeSteelstingHint.cs | 6 +- .../DRS4QueensGuard/WindsOfWeight.cs | 10 +- .../Foray/DelubrumReginae/DRS5Phantom/DRS5.cs | 20 +- .../DelubrumReginae/DRS5Phantom/Miasma.cs | 18 +- .../DRS6TrinityAvowed/AllegiantArsenal.cs | 8 +- .../DRS6TrinityAvowed/BladeOfEntropy.cs | 8 +- .../DelubrumReginae/DRS6TrinityAvowed/Bow.cs | 44 ++--- .../DelubrumReginae/DRS6TrinityAvowed/DRS6.cs | 35 +--- .../DRS6TrinityAvowed/Staff.cs | 18 +- .../DRS6TrinityAvowed/TemperatureAOE.cs | 4 +- .../DRS7StygimolochLord/AddPhaseArena.cs | 14 +- .../DRS7StygimolochLord/CrushingHoof.cs | 6 +- .../DRS7StygimolochLord/DRS7.cs | 35 +--- .../DRS7StygimolochLord/FatefulWords.cs | 10 +- .../DRS7StygimolochLord/RapidBolts.cs | 6 +- .../DRS7StygimolochLord/ViciousSwipe.cs | 8 +- .../DelubrumReginae/DRS8Queen/AboveBoard.cs | 12 +- .../Foray/DelubrumReginae/DRS8Queen/Chess.cs | 26 +-- .../Foray/DelubrumReginae/DRS8Queen/DRS8.cs | 60 ++---- .../DRS8Queen/FieryIcyPortent.cs | 4 +- .../DelubrumReginae/DRS8Queen/HeavensWrath.cs | 11 +- .../DRS8Queen/JudgmentBlade.cs | 6 +- .../DRS8Queen/MaelstromsBolt.cs | 2 +- .../DelubrumReginae/DRS8Queen/TurretsTour.cs | 8 +- .../DRS8Queen/UnluckyLotAetherialSphere.cs | 6 +- .../DRS8Queen/WindsOfWeight.cs | 10 +- .../Duel/Duel2Lyon/Duel2LyonGenericAttacks.cs | 98 ++++------ .../Foray/Duel/Duel4Dabog/Duel4Dabog.cs | 25 +-- .../Duel/Duel4Dabog/LeftArmMetalCutter.cs | 22 +-- .../Foray/Duel/Duel4Dabog/RightArmComet.cs | 14 +- .../Foray/Duel/Duel4Dabog/RightArmRay.cs | 28 ++- .../Duel/Duel5Menenius/BlueHiddenMines.cs | 4 +- .../Foray/Duel/Duel5Menenius/Duel5Menenius.cs | 36 ++-- .../Foray/Duel/Duel5Menenius/GigaTempest.cs | 4 +- .../Foray/Duel/Duel5Menenius/GunberdShot.cs | 8 +- .../Duel/Duel5Menenius/RedHiddenMines.cs | 6 +- .../Foray/Duel/Duel5Menenius/Ruination.cs | 10 +- .../Modules/Shadowbringers/Hunt/RankA/Baal.cs | 24 +-- .../Shadowbringers/Hunt/RankA/Grassman.cs | 27 +-- .../Shadowbringers/Hunt/RankA/Huracan.cs | 24 +-- .../Shadowbringers/Hunt/RankA/LilMurderer.cs | 33 +--- .../Shadowbringers/Hunt/RankA/Maliktender.cs | 19 +- .../Shadowbringers/Hunt/RankA/Nariphon.cs | 25 ++- .../Shadowbringers/Hunt/RankA/Nuckelavee.cs | 16 +- .../Hunt/RankA/OPoorestPauldia.cs | 20 +- .../Shadowbringers/Hunt/RankA/Rusalka.cs | 18 +- .../Shadowbringers/Hunt/RankA/Sugaar.cs | 37 ++-- .../Shadowbringers/Hunt/RankA/Supay.cs | 11 +- .../Shadowbringers/Hunt/RankA/TheMudman.cs | 26 +-- .../Shadowbringers/Hunt/RankS/Aglaope.cs | 52 ++--- .../Hunt/RankS/ForgivenGossip.cs | 15 +- .../Hunt/RankS/ForgivenPedantry.cs | 60 +++--- .../Hunt/RankS/ForgivenRebellion.cs | 65 +++---- .../Shadowbringers/Hunt/RankS/Gunitt.cs | 51 ++--- .../Shadowbringers/Hunt/RankS/Ixtab.cs | 72 +++---- .../Shadowbringers/Hunt/RankS/Tarchia.cs | 43 ++--- .../Shadowbringers/Hunt/RankS/Tyger.cs | 57 ++---- .../TheDungeonsOfLyheGhiah/Goliath.cs | 75 ++------ .../FuathTroublemaker.cs | 25 +-- .../GreedyPixie.cs | 75 ++------ .../SecretBasket.cs | 54 ++---- .../SecretCladoselache.cs | 48 ++--- .../SecretDjinn.cs | 40 +--- .../SecretKeeper.cs | 45 +---- .../SecretKorrigan.cs | 45 +---- .../SecretPegasus.cs | 35 +--- .../SecretPorxie.cs | 59 ++---- .../SecretSerpent.cs | 50 +---- .../SecretSwallow.cs | 30 +-- .../SecretUndine.cs | 45 +---- .../SecretWorm.cs | 60 ++---- .../Shadowbringers/Ultimate/TEA/P2Nisi.cs | 2 +- .../Ultimate/TEA/P3Inception2.cs | 2 +- .../Ultimate/TEA/P4FateCalibrationAlpha.cs | 4 +- .../Modules/Stormblood/Hunt/RankA/Angada.cs | 28 +-- .../Modules/Stormblood/Hunt/RankA/Gajasura.cs | 20 +- .../Stormblood/Hunt/RankS/BoneCrawler.cs | 40 +--- .../Modules/Stormblood/Hunt/RankS/Gamma.cs | 36 ++-- .../Modules/Stormblood/Hunt/RankS/Okina.cs | 50 +---- .../Modules/Stormblood/Hunt/RankS/Orghana.cs | 20 +- .../TheLostCanalsOfUznair/CanalIcebeast.cs | 35 +--- .../AltarAiravata.cs | 59 ++---- .../TheShiftingAltarsOfUznair/AltarArachne.cs | 50 +---- .../TheShiftingAltarsOfUznair/AltarBeast.cs | 70 ++----- .../TheShiftingAltarsOfUznair/AltarChimera.cs | 70 ++----- .../AltarDiresaur.cs | 65 ++----- .../AltarDullahan.cs | 65 ++----- .../TheShiftingAltarsOfUznair/AltarKelpie.cs | 68 ++----- .../AltarMandragora.cs | 45 +---- .../TheShiftingAltarsOfUznair/AltarSkatene.cs | 20 +- .../TheShiftingAltarsOfUznair/AltarTotem.cs | 55 ++---- .../TheShiftingAltarsOfUznair/Hati.cs | 25 +-- .../TheGreatGoldWhisker.cs | 15 +- .../TheShiftingAltarsOfUznair/TheOlderOne.cs | 70 ++----- .../TheShiftingAltarsOfUznair/TheWinged.cs | 65 ++----- .../Modules/Stormblood/Ultimate/UCOB/Hatch.cs | 18 +- .../Ultimate/UCOB/P1DeathSentence.cs | 4 +- .../Ultimate/UCOB/P2BahamutsFavor.cs | 51 +++-- .../Stormblood/Ultimate/UCOB/P2Cauterize.cs | 23 +-- .../Stormblood/Ultimate/UCOB/P2Heavensfall.cs | 17 +- .../Stormblood/Ultimate/UCOB/P2Ravensbeak.cs | 4 +- .../Ultimate/UCOB/P3BlackfireTrio.cs | 22 +-- .../Stormblood/Ultimate/UCOB/P3EarthShaker.cs | 18 +- .../Ultimate/UCOB/P3FellruinTrio.cs | 4 +- .../Stormblood/Ultimate/UCOB/P3GrandOctet.cs | 30 +-- .../Ultimate/UCOB/P3HeavensfallTrio.cs | 27 ++- .../Ultimate/UCOB/P3QuickmarchTrio.cs | 52 ++--- .../Ultimate/UCOB/P3SeventhUmbralEra.cs | 16 +- .../Stormblood/Ultimate/UCOB/P5AhkMorn.cs | 4 +- .../Stormblood/Ultimate/UCOB/P5Enrage.cs | 6 +- .../Stormblood/Ultimate/UCOB/P5Exaflare.cs | 6 +- .../Stormblood/Ultimate/UCOB/P5Teraflare.cs | 7 +- .../Modules/Stormblood/Ultimate/UCOB/Quote.cs | 26 +-- .../Stormblood/Ultimate/UCOB/Twister.cs | 5 +- .../Modules/Stormblood/Ultimate/UCOB/UCOB.cs | 25 +-- .../Stormblood/Ultimate/UWU/P1FeatherRain.cs | 12 +- .../Stormblood/Ultimate/UWU/P1Mesohigh.cs | 10 +- .../Stormblood/Ultimate/UWU/P1Plumes.cs | 2 +- .../Stormblood/Ultimate/UWU/P1WickedWheel.cs | 12 +- .../Ultimate/UWU/P2CrimsonCyclone.cs | 26 +-- .../Stormblood/Ultimate/UWU/P2Eruption.cs | 10 +- .../Stormblood/Ultimate/UWU/P2FlamingCrush.cs | 8 +- .../Ultimate/UWU/P2InfernalFetters.cs | 16 +- .../Stormblood/Ultimate/UWU/P2Nails.cs | 2 +- .../Stormblood/Ultimate/UWU/P2SearingWind.cs | 12 +- .../Stormblood/Ultimate/UWU/P2VulcanBurst.cs | 2 +- .../Stormblood/Ultimate/UWU/P3Burst.cs | 8 +- .../Stormblood/Ultimate/UWU/P3Gaols.cs | 18 +- .../Stormblood/Ultimate/UWU/P3Geocrush.cs | 21 +-- .../Stormblood/Ultimate/UWU/P3Landslide.cs | 12 +- .../Stormblood/Ultimate/UWU/P4CeruleumVent.cs | 6 +- .../Stormblood/Ultimate/UWU/P4Freefire.cs | 6 +- .../Stormblood/Ultimate/UWU/P4MagitekBits.cs | 2 +- .../Ultimate/UWU/P4UltimateAnnihilation.cs | 2 +- .../Ultimate/UWU/P4UltimatePredation.cs | 18 +- .../Ultimate/UWU/P4ViscousAetheroplasm.cs | 19 +- .../Modules/Stormblood/Ultimate/UWU/UWU.cs | 115 +++--------- .../Stormblood/Ultimate/UWU/UWUStates.cs | 2 +- BossMod/Modules/StrikingDummy.cs | 5 +- 920 files changed, 10004 insertions(+), 17757 deletions(-) diff --git a/BossMod/BossModule/StateMachineBuilder.cs b/BossMod/BossModule/StateMachineBuilder.cs index 4bb9b2cea8..24523e291e 100644 --- a/BossMod/BossModule/StateMachineBuilder.cs +++ b/BossMod/BossModule/StateMachineBuilder.cs @@ -124,7 +124,7 @@ public Phase SimplePhase(uint seqID, Action buildState, string name, float public Phase DeathPhase(uint seqID, Action buildState) { var phase = SimplePhase(seqID, buildState, "Boss death"); - phase.Raw.Update = () => Module.PrimaryActor.IsDestroyed || Module.PrimaryActor.IsDead || Module.PrimaryActor.HP.Cur == 0; + phase.Raw.Update = () => Module.PrimaryActor.IsDeadOrDestroyed || Module.PrimaryActor.HP.Cur == 0; return phase; } diff --git a/BossMod/Components/StackSpread.cs b/BossMod/Components/StackSpread.cs index a70f205904..0b5f0a8b97 100644 --- a/BossMod/Components/StackSpread.cs +++ b/BossMod/Components/StackSpread.cs @@ -4,14 +4,15 @@ // there are various variants (e.g. everyone should spread, or everyone should stack in one or more groups, or some combination of that) public class GenericStackSpread(BossModule module, bool alwaysShowSpreads = false, bool raidwideOnResolve = true, bool includeDeadTargets = false) : BossComponent(module) { - public record struct Stack( - Actor Target, - float Radius, - int MinSize = 2, - int MaxSize = int.MaxValue, - DateTime Activation = default, - BitMask ForbiddenPlayers = default // raid members that aren't allowed to participate in the stack - ); + public struct Stack(Actor target, float radius, int minSize = 2, int maxSize = int.MaxValue, DateTime activation = default, BitMask forbiddenPlayers = default) + { + public Actor Target = target; + public float Radius = radius; + public int MinSize = minSize; + public int MaxSize = maxSize; + public DateTime Activation = activation; + public BitMask ForbiddenPlayers = forbiddenPlayers; // raid members that aren't allowed to participate in the stack + } public record struct Spread( Actor Target, diff --git a/BossMod/Components/Towers.cs b/BossMod/Components/Towers.cs index 015043e93d..9c9e533e84 100644 --- a/BossMod/Components/Towers.cs +++ b/BossMod/Components/Towers.cs @@ -2,8 +2,14 @@ public class GenericTowers(BossModule module, ActionID aid = default) : CastCounter(module, aid) { - public record struct Tower(WPos Position, float Radius, int MinSoakers = 1, int MaxSoakers = 1, BitMask ForbiddenSoakers = default) + public struct Tower(WPos position, float radius, int minSoakers = 1, int maxSoakers = 1, BitMask forbiddenSoakers = default) { + public WPos Position = position; + public float Radius = radius; + public int MinSoakers = minSoakers; + public int MaxSoakers = maxSoakers; + public BitMask ForbiddenSoakers = forbiddenSoakers; + public bool IsInside(WPos pos) => pos.InCircle(Position, Radius); public bool IsInside(Actor actor) => IsInside(actor.Position); public int NumInside(BossModule module) => module.Raid.WithSlot().ExcludedFromMask(ForbiddenSoakers).InRadius(Position, Radius).Count(); diff --git a/BossMod/Components/WildCharge.cs b/BossMod/Components/WildCharge.cs index 34c37483cb..d3febe0368 100644 --- a/BossMod/Components/WildCharge.cs +++ b/BossMod/Components/WildCharge.cs @@ -1,7 +1,7 @@ namespace BossMod.Components; // generic 'wild charge': various mechanics that consist of charge aoe on some target that other players have to stay in; optionally some players can be marked as 'having to be closest to source' (usually tanks) -public class GenericWildCharge(BossModule module, float halfWidth, ActionID aid = default) : CastCounter(module, aid) +public class GenericWildCharge(BossModule module, float halfWidth, ActionID aid = default, float fixedLength = 0) : CastCounter(module, aid) { public enum PlayerRole { @@ -13,7 +13,7 @@ public enum PlayerRole } public float HalfWidth = halfWidth; - public float FixedLength; // if == 0, length is up to target + public float FixedLength = fixedLength; // if == 0, length is up to target public Actor? Source; // if null, mechanic is not active public PlayerRole[] PlayerRoles = new PlayerRole[PartyState.MaxAllianceSize]; diff --git a/BossMod/Modules/Endwalker/Alliance/A10Lions/A10Lions.cs b/BossMod/Modules/Endwalker/Alliance/A10Lions/A10Lions.cs index ccfa02ef3e..0521144cb7 100644 --- a/BossMod/Modules/Endwalker/Alliance/A10Lions/A10Lions.cs +++ b/BossMod/Modules/Endwalker/Alliance/A10Lions/A10Lions.cs @@ -1,34 +1,27 @@ namespace BossMod.Endwalker.Alliance.A10Lions; -class DoubleImmolation : Components.RaidwideCast -{ - public DoubleImmolation() : base(ActionID.MakeSpell(AID.DoubleImmolation)) { } -} +class DoubleImmolation(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.DoubleImmolation)); class A10LionsStates : StateMachineBuilder { - private bool IsDead(Actor? actor) => actor == null || actor.IsDestroyed || actor.IsDead; - public A10LionsStates(A10Lions module) : base(module) { SimplePhase(0, id => SimpleState(id, 600, "???"), "Single phase") .ActivateOnEnter() .ActivateOnEnter() .ActivateOnEnter() - .Raw.Update = () => IsDead(module.Lion()) && IsDead(module.Lioness()); + .Raw.Update = () => (module.Lion()?.IsDeadOrDestroyed ?? true) && (module.Lioness()?.IsDeadOrDestroyed ?? true); } } [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.Lion, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 866, NameID = 11294, SortOrder = 4)] -public class A10Lions : BossModule +public class A10Lions(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(-677.25f, -606.25f), 20)) { private Actor? _lioness; public Actor? Lion() => PrimaryActor; public Actor? Lioness() => _lioness; - public A10Lions(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(-677.25f, -606.25f), 20)) { } - protected override void UpdateModule() { // TODO: this is an ugly hack, think how multi-actor fights can be implemented without it... diff --git a/BossMod/Modules/Endwalker/Alliance/A10Lions/RoaringBlaze.cs b/BossMod/Modules/Endwalker/Alliance/A10Lions/RoaringBlaze.cs index b3f42ada18..fa4e2647cc 100644 --- a/BossMod/Modules/Endwalker/Alliance/A10Lions/RoaringBlaze.cs +++ b/BossMod/Modules/Endwalker/Alliance/A10Lions/RoaringBlaze.cs @@ -1,14 +1,14 @@ namespace BossMod.Endwalker.Alliance.A10Lions; -class RoaringBlaze : Components.GenericAOEs +class RoaringBlaze(BossModule module) : Components.GenericAOEs(module) { private List _aoes = new(); private static readonly AOEShapeCone _shape = new(50, 90.Degrees()); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => _aoes.Take(1); + public override IEnumerable ActiveAOEs(int slot, Actor actor) => _aoes.Take(1); - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.RoaringBlazeFirst or AID.RoaringBlazeSecond or AID.RoaringBlazeSolo) { @@ -17,7 +17,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.RoaringBlazeFirst or AID.RoaringBlazeSecond or AID.RoaringBlazeSolo) _aoes.RemoveAll(aoe => aoe.Origin.AlmostEqual(caster.Position, 1)); diff --git a/BossMod/Modules/Endwalker/Alliance/A10Lions/SlashAndBurn.cs b/BossMod/Modules/Endwalker/Alliance/A10Lions/SlashAndBurn.cs index d8b8490e92..955e93bea9 100644 --- a/BossMod/Modules/Endwalker/Alliance/A10Lions/SlashAndBurn.cs +++ b/BossMod/Modules/Endwalker/Alliance/A10Lions/SlashAndBurn.cs @@ -1,15 +1,15 @@ namespace BossMod.Endwalker.Alliance.A10Lions; -class SlashAndBurn : Components.GenericAOEs +class SlashAndBurn(BossModule module) : Components.GenericAOEs(module) { private List _aoes = new(); private static readonly AOEShapeCircle _shapeOut = new(14); private static readonly AOEShapeDonut _shapeIn = new(6, 30); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => _aoes.Take(1); + public override IEnumerable ActiveAOEs(int slot, Actor actor) => _aoes.Take(1); - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { AOEShape? shape = (AID)spell.Action.ID switch { @@ -24,7 +24,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.SlashAndBurnOutFirst or AID.SlashAndBurnOutSecond or AID.SlashAndBurnInFirst or AID.SlashAndBurnInSecond or AID.TrialByFire or AID.SpinningSlash) _aoes.RemoveAll(aoe => aoe.Origin.AlmostEqual(caster.Position, 1)); diff --git a/BossMod/Modules/Endwalker/Alliance/A10RhalgrEmissary/A10RhalgrEmissary.cs b/BossMod/Modules/Endwalker/Alliance/A10RhalgrEmissary/A10RhalgrEmissary.cs index 1bad75fd8b..c3b1560204 100644 --- a/BossMod/Modules/Endwalker/Alliance/A10RhalgrEmissary/A10RhalgrEmissary.cs +++ b/BossMod/Modules/Endwalker/Alliance/A10RhalgrEmissary/A10RhalgrEmissary.cs @@ -1,27 +1,9 @@ namespace BossMod.Endwalker.Alliance.A10RhalgrEmissary; -class DestructiveStatic : Components.SelfTargetedAOEs -{ - public DestructiveStatic() : base(ActionID.MakeSpell(AID.DestructiveStatic), new AOEShapeCone(50, 90.Degrees())) { } -} - -class LightningBolt : Components.LocationTargetedAOEs -{ - public LightningBolt() : base(ActionID.MakeSpell(AID.LightningBoltAOE), 6) { } -} - -class BoltsFromTheBlue : Components.CastCounter -{ - public BoltsFromTheBlue() : base(ActionID.MakeSpell(AID.BoltsFromTheBlueAOE)) { } -} - -class DestructiveStrike : Components.BaitAwayCast -{ - public DestructiveStrike() : base(ActionID.MakeSpell(AID.DestructiveStrike), new AOEShapeCone(13, 60.Degrees())) { } // TODO: verify angle -} +class DestructiveStatic(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.DestructiveStatic), new AOEShapeCone(50, 90.Degrees())); +class LightningBolt(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.LightningBoltAOE), 6); +class BoltsFromTheBlue(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.BoltsFromTheBlueAOE)); +class DestructiveStrike(BossModule module) : Components.BaitAwayCast(module, ActionID.MakeSpell(AID.DestructiveStrike), new AOEShapeCone(13, 60.Degrees())); // TODO: verify angle [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 866, NameID = 11274, SortOrder = 2)] -public class A10RhalgrEmissary : BossModule -{ - public A10RhalgrEmissary(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(74, 516), 25)) { } -} +public class A10RhalgrEmissary(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(74, 516), 25)); diff --git a/BossMod/Modules/Endwalker/Alliance/A10RhalgrEmissary/Boltloop.cs b/BossMod/Modules/Endwalker/Alliance/A10RhalgrEmissary/Boltloop.cs index 922699b0a8..98dcdb6204 100644 --- a/BossMod/Modules/Endwalker/Alliance/A10RhalgrEmissary/Boltloop.cs +++ b/BossMod/Modules/Endwalker/Alliance/A10RhalgrEmissary/Boltloop.cs @@ -1,14 +1,14 @@ namespace BossMod.Endwalker.Alliance.A10RhalgrEmissary; -class Boltloop : Components.GenericAOEs +class Boltloop(BossModule module) : Components.GenericAOEs(module) { private List _aoes = new(); private static readonly AOEShape[] _shapes = { new AOEShapeCircle(10), new AOEShapeDonut(10, 20), new AOEShapeDonut(20, 30) }; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => _aoes.Skip(NumCasts).Take(2); + public override IEnumerable ActiveAOEs(int slot, Actor actor) => _aoes.Skip(NumCasts).Take(2); - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { AOEShape? shape = (AID)spell.Action.ID switch { @@ -24,7 +24,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.BoltloopAOE1 or AID.BoltloopAOE2 or AID.BoltloopAOE3) ++NumCasts; diff --git a/BossMod/Modules/Endwalker/Alliance/A10RhalgrEmissary/DestructiveCharge.cs b/BossMod/Modules/Endwalker/Alliance/A10RhalgrEmissary/DestructiveCharge.cs index 7096cdea7b..3473a89d56 100644 --- a/BossMod/Modules/Endwalker/Alliance/A10RhalgrEmissary/DestructiveCharge.cs +++ b/BossMod/Modules/Endwalker/Alliance/A10RhalgrEmissary/DestructiveCharge.cs @@ -1,14 +1,14 @@ namespace BossMod.Endwalker.Alliance.A10RhalgrEmissary; -class DestructiveCharge : Components.GenericAOEs +class DestructiveCharge(BossModule module) : Components.GenericAOEs(module) { public List AOEs = new(); private static readonly AOEShapeCone _shape = new(25, 45.Degrees()); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => AOEs; + public override IEnumerable ActiveAOEs(int slot, Actor actor) => AOEs; - public override void OnEventEnvControl(BossModule module, byte index, uint state) + public override void OnEventEnvControl(byte index, uint state) { if (index != 0x25) return; @@ -23,12 +23,12 @@ public override void OnEventEnvControl(BossModule module, byte index, uint state }; if (dir != default) { - AOEs.Add(new(_shape, module.Bounds.Center, dir, module.WorldState.CurrentTime.AddSeconds(16.1f))); - AOEs.Add(new(_shape, module.Bounds.Center, dir + 180.Degrees(), module.WorldState.CurrentTime.AddSeconds(16.1f))); + AOEs.Add(new(_shape, Module.Bounds.Center, dir, WorldState.FutureTime(16.1f))); + AOEs.Add(new(_shape, Module.Bounds.Center, dir + 180.Degrees(), WorldState.FutureTime(16.1f))); } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.DestructiveChargeAOE) { diff --git a/BossMod/Modules/Endwalker/Alliance/A11Byregot/A11Byregot.cs b/BossMod/Modules/Endwalker/Alliance/A11Byregot/A11Byregot.cs index c50025cbcb..f959748b20 100644 --- a/BossMod/Modules/Endwalker/Alliance/A11Byregot/A11Byregot.cs +++ b/BossMod/Modules/Endwalker/Alliance/A11Byregot/A11Byregot.cs @@ -1,12 +1,6 @@ namespace BossMod.Endwalker.Alliance.A11Byregot; -class ByregotWard : Components.BaitAwayCast -{ - public ByregotWard() : base(ActionID.MakeSpell(AID.ByregotWard), new AOEShapeCone(10, 45.Degrees())) { } -} +class ByregotWard(BossModule module) : Components.BaitAwayCast(module, ActionID.MakeSpell(AID.ByregotWard), new AOEShapeCone(10, 45.Degrees())); [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 866, NameID = 11281, SortOrder = 1)] -public class A11Byregot : BossModule -{ - public A11Byregot(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsSquare(new(0, 700), 25)) { } -} +public class A11Byregot(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsSquare(new(0, 700), 25)); diff --git a/BossMod/Modules/Endwalker/Alliance/A11Byregot/ByregotStrike.cs b/BossMod/Modules/Endwalker/Alliance/A11Byregot/ByregotStrike.cs index 5e6d178b30..0153e23537 100644 --- a/BossMod/Modules/Endwalker/Alliance/A11Byregot/ByregotStrike.cs +++ b/BossMod/Modules/Endwalker/Alliance/A11Byregot/ByregotStrike.cs @@ -1,36 +1,25 @@ namespace BossMod.Endwalker.Alliance.A11Byregot; -class ByregotStrikeJump : Components.LocationTargetedAOEs -{ - public ByregotStrikeJump() : base(ActionID.MakeSpell(AID.ByregotStrikeJump), 8) { } -} - -class ByregotStrikeJumpCone : Components.LocationTargetedAOEs -{ - public ByregotStrikeJumpCone() : base(ActionID.MakeSpell(AID.ByregotStrikeJumpCone), 8) { } -} - -class ByregotStrikeKnockback : Components.KnockbackFromCastTarget -{ - public ByregotStrikeKnockback() : base(ActionID.MakeSpell(AID.ByregotStrikeKnockback), 18) { } -} +class ByregotStrikeJump(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.ByregotStrikeJump), 8); +class ByregotStrikeJumpCone(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.ByregotStrikeJumpCone), 8); +class ByregotStrikeKnockback(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.ByregotStrikeKnockback), 18); -class ByregotStrikeCone : Components.GenericAOEs +class ByregotStrikeCone(BossModule module) : Components.GenericAOEs(module) { private readonly List _aoes = []; private static readonly AOEShapeCone _shape = new(90, 22.5f.Degrees()); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => _aoes; + public override IEnumerable ActiveAOEs(int slot, Actor actor) => _aoes; - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { - if ((AID)spell.Action.ID == AID.ByregotStrikeKnockback && module.PrimaryActor.FindStatus(SID.Glow) != null) + if ((AID)spell.Action.ID == AID.ByregotStrikeKnockback && Module.PrimaryActor.FindStatus(SID.Glow) != null) for (int i = 0; i < 4; ++i) _aoes.Add(new(_shape, caster.Position, spell.Rotation + i * 90.Degrees(), spell.NPCFinishAt)); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.ByregotStrikeCone) { diff --git a/BossMod/Modules/Endwalker/Alliance/A11Byregot/Hammers.cs b/BossMod/Modules/Endwalker/Alliance/A11Byregot/Hammers.cs index 133740264a..a8a67af021 100644 --- a/BossMod/Modules/Endwalker/Alliance/A11Byregot/Hammers.cs +++ b/BossMod/Modules/Endwalker/Alliance/A11Byregot/Hammers.cs @@ -1,6 +1,6 @@ namespace BossMod.Endwalker.Alliance.A11Byregot; -class HammersCells : Components.GenericAOEs +class HammersCells(BossModule module) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.DestroySideTiles), "GTFO from dangerous cell!") { public bool Active { get; private set; } public bool MovementPending { get; private set; } @@ -9,9 +9,7 @@ class HammersCells : Components.GenericAOEs private static readonly AOEShapeRect _shape = new(5, 5, 5); - public HammersCells() : base(ActionID.MakeSpell(AID.DestroySideTiles), "GTFO from dangerous cell!") { } - - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (!Active) yield break; @@ -21,35 +19,35 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, for (int x = -2; x <= 2; ++x) { if (CellDangerous(x, z, true)) - yield return new(_shape, CellCenter(module, x, z), color: ArenaColor.AOE); + yield return new(_shape, CellCenter(x, z), Color: ArenaColor.AOE); else if (CellDangerous(x, z, false)) - yield return new(_shape, CellCenter(module, x, z), color: ArenaColor.SafeFromAOE); + yield return new(_shape, CellCenter(x, z), Color: ArenaColor.SafeFromAOE); } } } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (!Active) return; - arena.AddLine(module.Bounds.Center + new WDir(-15, -25), module.Bounds.Center + new WDir(-15, +25), ArenaColor.Border); - arena.AddLine(module.Bounds.Center + new WDir( -5, -25), module.Bounds.Center + new WDir( -5, +25), ArenaColor.Border); - arena.AddLine(module.Bounds.Center + new WDir( +5, -25), module.Bounds.Center + new WDir( +5, +25), ArenaColor.Border); - arena.AddLine(module.Bounds.Center + new WDir(+15, -25), module.Bounds.Center + new WDir(+15, +25), ArenaColor.Border); - arena.AddLine(module.Bounds.Center + new WDir(-25, -15), module.Bounds.Center + new WDir(+25, -15), ArenaColor.Border); - arena.AddLine(module.Bounds.Center + new WDir(-25, -5), module.Bounds.Center + new WDir(+25, -5), ArenaColor.Border); - arena.AddLine(module.Bounds.Center + new WDir(-25, +5), module.Bounds.Center + new WDir(+25, +5), ArenaColor.Border); - arena.AddLine(module.Bounds.Center + new WDir(-25, +15), module.Bounds.Center + new WDir(+25, +15), ArenaColor.Border); + Arena.AddLine(Module.Bounds.Center + new WDir(-15, -25), Module.Bounds.Center + new WDir(-15, +25), ArenaColor.Border); + Arena.AddLine(Module.Bounds.Center + new WDir( -5, -25), Module.Bounds.Center + new WDir( -5, +25), ArenaColor.Border); + Arena.AddLine(Module.Bounds.Center + new WDir( +5, -25), Module.Bounds.Center + new WDir( +5, +25), ArenaColor.Border); + Arena.AddLine(Module.Bounds.Center + new WDir(+15, -25), Module.Bounds.Center + new WDir(+15, +25), ArenaColor.Border); + Arena.AddLine(Module.Bounds.Center + new WDir(-25, -15), Module.Bounds.Center + new WDir(+25, -15), ArenaColor.Border); + Arena.AddLine(Module.Bounds.Center + new WDir(-25, -5), Module.Bounds.Center + new WDir(+25, -5), ArenaColor.Border); + Arena.AddLine(Module.Bounds.Center + new WDir(-25, +5), Module.Bounds.Center + new WDir(+25, +5), ArenaColor.Border); + Arena.AddLine(Module.Bounds.Center + new WDir(-25, +15), Module.Bounds.Center + new WDir(+25, +15), ArenaColor.Border); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) Active = true; } - public override void OnEventEnvControl(BossModule module, byte index, uint state) + public override void OnEventEnvControl(byte index, uint state) { if (index is >= 7 and <= 11) { @@ -64,7 +62,7 @@ public override void OnEventEnvControl(BossModule module, byte index, uint state }; MovementPending = true; if (_lineMovement[i] == 0) - module.ReportError(this, $"Unexpected env-control {i}={state:X}, offset={_lineOffset[i]}"); + ReportError($"Unexpected env-control {i}={state:X}, offset={_lineOffset[i]}"); } else if (index == 26) { @@ -83,7 +81,7 @@ public override void OnEventEnvControl(BossModule module, byte index, uint state } } - private WPos CellCenter(BossModule module, int x, int z) => module.Bounds.Center + 10 * new WDir(x, z); + private WPos CellCenter(int x, int z) => Module.Bounds.Center + 10 * new WDir(x, z); private bool CellDangerous(int x, int z, bool future) { @@ -94,12 +92,5 @@ private bool CellDangerous(int x, int z, bool future) } } -class HammersLevinforge : Components.SelfTargetedAOEs -{ - public HammersLevinforge() : base(ActionID.MakeSpell(AID.Levinforge), new AOEShapeRect(50, 5)) { } -} - -class HammersSpire : Components.SelfTargetedAOEs -{ - public HammersSpire() : base(ActionID.MakeSpell(AID.ByregotSpire), new AOEShapeRect(50, 15)) { } -} +class HammersLevinforge(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Levinforge), new AOEShapeRect(50, 5)); +class HammersSpire(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ByregotSpire), new AOEShapeRect(50, 15)); diff --git a/BossMod/Modules/Endwalker/Alliance/A11Byregot/Reproduce.cs b/BossMod/Modules/Endwalker/Alliance/A11Byregot/Reproduce.cs index 164c873dca..21b84ffcbf 100644 --- a/BossMod/Modules/Endwalker/Alliance/A11Byregot/Reproduce.cs +++ b/BossMod/Modules/Endwalker/Alliance/A11Byregot/Reproduce.cs @@ -1,10 +1,8 @@ namespace BossMod.Endwalker.Alliance.A11Byregot; -class Reproduce : Components.Exaflare +class Reproduce(BossModule module) : Components.Exaflare(module, 7) { - public Reproduce() : base(7) { } - - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.CloudToGroundFast or AID.CloudToGroundSlow) { @@ -13,7 +11,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.CloudToGroundFast or AID.CloudToGroundSlow or AID.CloudToGroundFastAOE or AID.CloudToGroundSlowAOE) { @@ -22,12 +20,12 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent int index = Lines.FindIndex(item => MathF.Abs(item.Next.Z - caster.Position.Z) < 1); if (index == -1) { - module.ReportError(this, $"Failed to find entry for {caster.InstanceID:X}"); + ReportError($"Failed to find entry for {caster.InstanceID:X}"); return; } - AdvanceLine(module, Lines[index], caster.Position); - if (Lines[index].Next.X < module.Bounds.Center.X - module.Bounds.HalfSize) + AdvanceLine(Lines[index], caster.Position); + if (Lines[index].Next.X < Module.Bounds.Center.X - Module.Bounds.HalfSize) Lines.RemoveAt(index); } } diff --git a/BossMod/Modules/Endwalker/Alliance/A12Rhalgr/A12Rhalgr.cs b/BossMod/Modules/Endwalker/Alliance/A12Rhalgr/A12Rhalgr.cs index 815fc6490d..c059d00f12 100644 --- a/BossMod/Modules/Endwalker/Alliance/A12Rhalgr/A12Rhalgr.cs +++ b/BossMod/Modules/Endwalker/Alliance/A12Rhalgr/A12Rhalgr.cs @@ -1,27 +1,12 @@ namespace BossMod.Endwalker.Alliance.A12Rhalgr; -class DestructiveBolt : Components.SpreadFromCastTargets -{ - public DestructiveBolt() : base(ActionID.MakeSpell(AID.DestructiveBoltAOE), 3) { } -} - -class StrikingMeteor : Components.LocationTargetedAOEs -{ - public StrikingMeteor() : base(ActionID.MakeSpell(AID.StrikingMeteor), 6) { } -} - -class BronzeLightning : Components.SelfTargetedAOEs -{ - public BronzeLightning() : base(ActionID.MakeSpell(AID.BronzeLightning), new AOEShapeCone(50, 22.5f.Degrees()), 4) { } -} +class DestructiveBolt(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.DestructiveBoltAOE), 3); +class StrikingMeteor(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.StrikingMeteor), 6); +class BronzeLightning(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.BronzeLightning), new AOEShapeCone(50, 22.5f.Degrees()), 4); [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 866, NameID = 11273, SortOrder = 3)] -public class A12Rhalgr : BossModule +public class A12Rhalgr(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsSquare(new(-15, 275), 30)) // note: arena has a really complex shape... { - public A12Rhalgr(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsSquare(new(-15, 275), 30)) // note: arena has a really complex shape... - { - } - protected override void DrawArenaForeground(int pcSlot, Actor pc) { Arena.PathLineTo(new(2.5f, 245)); diff --git a/BossMod/Modules/Endwalker/Alliance/A12Rhalgr/HandOfTheDestroyer.cs b/BossMod/Modules/Endwalker/Alliance/A12Rhalgr/HandOfTheDestroyer.cs index f83b37da93..6a92c92d1e 100644 --- a/BossMod/Modules/Endwalker/Alliance/A12Rhalgr/HandOfTheDestroyer.cs +++ b/BossMod/Modules/Endwalker/Alliance/A12Rhalgr/HandOfTheDestroyer.cs @@ -1,20 +1,20 @@ namespace BossMod.Endwalker.Alliance.A12Rhalgr; -class HandOfTheDestroyer : Components.GenericAOEs +class HandOfTheDestroyer(BossModule module) : Components.GenericAOEs(module) { private List _aoes = new(); private static readonly AOEShapeRect _shape = new(90, 20); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => _aoes; + public override IEnumerable ActiveAOEs(int slot, Actor actor) => _aoes; - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.HandOfTheDestroyerWrathAOE or AID.HandOfTheDestroyerJudgmentAOE) _aoes.Add(new(_shape, caster.Position, spell.Rotation, spell.NPCFinishAt)); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.HandOfTheDestroyerWrathAOE or AID.HandOfTheDestroyerJudgmentAOE) { @@ -24,13 +24,10 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn } } -class BrokenWorld : Components.SelfTargetedAOEs -{ - public BrokenWorld() : base(ActionID.MakeSpell(AID.BrokenWorldAOE), new AOEShapeCircle(30)) { } // TODO: determine falloff -} +class BrokenWorld(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.BrokenWorldAOE), new AOEShapeCircle(30)); // TODO: determine falloff // this is not an official mechanic name - it refers to broken world + hand of the destroyer combo, which creates multiple small aoes -class BrokenShards : Components.GenericAOEs +class BrokenShards(BossModule module) : Components.GenericAOEs(module) { private List _aoes = new(); @@ -38,9 +35,9 @@ class BrokenShards : Components.GenericAOEs private static readonly WPos[] _westLocations = { new(-6.9f, 268.0f), new(-0.2f, 285.0f), new(-25.6f, 298.5f), new(-34.2f, 283.5f), new(-11.6f, 293.5f), new(-46.1f, 270.5f), new(-18.1f, 279.0f), new(-40.3f, 290.5f), new(-2.1f, 252.0f) }; private static readonly AOEShapeCircle _shape = new(20); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => _aoes; + public override IEnumerable ActiveAOEs(int slot, Actor actor) => _aoes; - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { var locs = (AID)spell.Action.ID switch { @@ -52,18 +49,15 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf _aoes.AddRange(locs.Select(p => new AOEInstance(_shape, p, default, spell.NPCFinishAt))); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.BrokenShardsAOE) { ++NumCasts; if (_aoes.RemoveAll(aoe => aoe.Origin.AlmostEqual(caster.Position, 0.1f)) != 1) - module.ReportError(this, $"Unexpected shard position: {caster.Position}"); + ReportError($"Unexpected shard position: {caster.Position}"); } } } -class LightningStorm : Components.SpreadFromCastTargets -{ - public LightningStorm() : base(ActionID.MakeSpell(AID.LightningStorm), 5) { } -} +class LightningStorm(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.LightningStorm), 5); diff --git a/BossMod/Modules/Endwalker/Alliance/A12Rhalgr/RhalgrBeacon.cs b/BossMod/Modules/Endwalker/Alliance/A12Rhalgr/RhalgrBeacon.cs index eaa730ebe4..53a26bdac2 100644 --- a/BossMod/Modules/Endwalker/Alliance/A12Rhalgr/RhalgrBeacon.cs +++ b/BossMod/Modules/Endwalker/Alliance/A12Rhalgr/RhalgrBeacon.cs @@ -1,30 +1,22 @@ namespace BossMod.Endwalker.Alliance.A12Rhalgr; -class RhalgrBeaconAOE : Components.SelfTargetedAOEs -{ - public RhalgrBeaconAOE() : base(ActionID.MakeSpell(AID.RhalgrsBeaconAOE), new AOEShapeCircle(10)) { } -} +class RhalgrBeaconAOE(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RhalgrsBeaconAOE), new AOEShapeCircle(10)); -class RhalgrBeaconShock : Components.GenericAOEs +class RhalgrBeaconShock(BossModule module) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.Shock)) { private List _aoes = new(); private static readonly AOEShapeCircle _shape = new(8); - public RhalgrBeaconShock() : base(ActionID.MakeSpell(AID.Shock)) { } - - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => _aoes; + public override IEnumerable ActiveAOEs(int slot, Actor actor) => _aoes; - public override void OnActorCreated(BossModule module, Actor actor) + public override void OnActorCreated(Actor actor) { if ((OID)actor.OID == OID.LightningOrb) - _aoes.Add(new(_shape, actor.Position, default, module.WorldState.CurrentTime.AddSeconds(13))); + _aoes.Add(new(_shape, actor.Position, default, WorldState.FutureTime(13))); } } // TODO: this is a knockback 50, ignores immunities - but need to clamp to correct fingers // there are two possible source locations ([-10.12, 268.50] and [-24.12, 266.50]), two potential fingers for each - one of them is sometimes covered by lightning aoes -class RhalgrBeaconKnockback : Components.CastCounter -{ - public RhalgrBeaconKnockback() : base(ActionID.MakeSpell(AID.RhalgrsBeaconKnockback)) { } -} +class RhalgrBeaconKnockback(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.RhalgrsBeaconKnockback)); diff --git a/BossMod/Modules/Endwalker/Alliance/A13Azeyma/A13Azeyma.cs b/BossMod/Modules/Endwalker/Alliance/A13Azeyma/A13Azeyma.cs index b15118c2e5..4486c2bc1e 100644 --- a/BossMod/Modules/Endwalker/Alliance/A13Azeyma/A13Azeyma.cs +++ b/BossMod/Modules/Endwalker/Alliance/A13Azeyma/A13Azeyma.cs @@ -1,32 +1,10 @@ namespace BossMod.Endwalker.Alliance.A13Azeyma; -class WardensWarmth : Components.SpreadFromCastTargets -{ - public WardensWarmth() : base(ActionID.MakeSpell(AID.WardensWarmthAOE), 6) { } -} - -class FleetingSpark : Components.SelfTargetedAOEs -{ - public FleetingSpark() : base(ActionID.MakeSpell(AID.FleetingSpark), new AOEShapeCone(60, 135.Degrees())) { } -} - -class SolarFold : Components.SelfTargetedAOEs -{ - public SolarFold() : base(ActionID.MakeSpell(AID.SolarFoldAOE), new AOEShapeCross(30, 5)) { } -} - -class Sunbeam : Components.SelfTargetedAOEs -{ - public Sunbeam() : base(ActionID.MakeSpell(AID.Sunbeam), new AOEShapeCircle(9), 14) { } -} - -class SublimeSunset : Components.LocationTargetedAOEs -{ - public SublimeSunset() : base(ActionID.MakeSpell(AID.SublimeSunsetAOE), 40) { } // TODO: check falloff -} +class WardensWarmth(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.WardensWarmthAOE), 6); +class FleetingSpark(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.FleetingSpark), new AOEShapeCone(60, 135.Degrees())); +class SolarFold(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.SolarFoldAOE), new AOEShapeCross(30, 5)); +class Sunbeam(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Sunbeam), new AOEShapeCircle(9), 14); +class SublimeSunset(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.SublimeSunsetAOE), 40); // TODO: check falloff [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 866, NameID = 11277, SortOrder = 5)] -public class A13Azeyma : BossModule -{ - public A13Azeyma(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(-750, -750), 30)) { } -} +public class A13Azeyma(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(-750, -750), 30)); diff --git a/BossMod/Modules/Endwalker/Alliance/A13Azeyma/DancingFlame.cs b/BossMod/Modules/Endwalker/Alliance/A13Azeyma/DancingFlame.cs index d11e6584e7..376788877c 100644 --- a/BossMod/Modules/Endwalker/Alliance/A13Azeyma/DancingFlame.cs +++ b/BossMod/Modules/Endwalker/Alliance/A13Azeyma/DancingFlame.cs @@ -1,22 +1,20 @@ namespace BossMod.Endwalker.Alliance.A13Azeyma; -class DancingFlame : Components.GenericAOEs +class DancingFlame(BossModule module) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.DancingFlameFirst)) { public List AOEs = new(); private static readonly AOEShapeRect _shape = new(17.5f, 17.5f, 17.5f); // 15 for diagonal 'squares' + 2.5 for central cross - public DancingFlame() : base(ActionID.MakeSpell(AID.DancingFlameFirst)) { } + public override IEnumerable ActiveAOEs(int slot, Actor actor) => AOEs; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => AOEs; - - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.HauteAirFlare) AOEs.Add(new(_shape, caster.Position + 40 * caster.Rotation.ToDirection(), default, spell.NPCFinishAt.AddSeconds(1))); } - public override void OnEventEnvControl(BossModule module, byte index, uint state) + public override void OnEventEnvControl(byte index, uint state) { if (index == 27 && state == 0x00080004) AOEs.Clear(); diff --git a/BossMod/Modules/Endwalker/Alliance/A13Azeyma/SolarFans.cs b/BossMod/Modules/Endwalker/Alliance/A13Azeyma/SolarFans.cs index 771a9a3934..78a8cde725 100644 --- a/BossMod/Modules/Endwalker/Alliance/A13Azeyma/SolarFans.cs +++ b/BossMod/Modules/Endwalker/Alliance/A13Azeyma/SolarFans.cs @@ -1,29 +1,21 @@ namespace BossMod.Endwalker.Alliance.A13Azeyma; -class SolarFans : Components.ChargeAOEs -{ - public SolarFans() : base(ActionID.MakeSpell(AID.SolarFansAOE), 5) { } // TODO: or SolarFansCharge? not sure which one deals damage... -} +class SolarFans(BossModule module) : Components.ChargeAOEs(module, ActionID.MakeSpell(AID.SolarFansAOE), 5); // TODO: or SolarFansCharge? not sure which one deals damage... class RadiantRhythm : Components.GenericAOEs { - private IReadOnlyList _flames = ActorEnumeration.EmptyList; + private IReadOnlyList _flames; private static readonly AOEShapeDonutSector _shape = new(20, 30, 45.Degrees()); - public RadiantRhythm() : base(ActionID.MakeSpell(AID.RadiantFlight)) { } - - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => NextCenterDirections(module.Bounds.Center).Select(d => new AOEInstance(_shape, module.Bounds.Center, d)); - - public override void Init(BossModule module) + public RadiantRhythm(BossModule module) : base(module, ActionID.MakeSpell(AID.RadiantFlight)) { _flames = module.Enemies(OID.WardensFlame); } + public override IEnumerable ActiveAOEs(int slot, Actor actor) => NextCenterDirections(Module.Bounds.Center).Select(d => new AOEInstance(_shape, Module.Bounds.Center, d)); + private IEnumerable NextCenterDirections(WPos center) => _flames.Where(f => (f.Position - center).LengthSq() > 25).Select(f => Angle.FromDirection(f.Position - center) + 45.Degrees()); } -class RadiantFinish : Components.SelfTargetedAOEs -{ - public RadiantFinish() : base(ActionID.MakeSpell(AID.RadiantFlourish), new AOEShapeCircle(25)) { } -} +class RadiantFinish(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RadiantFlourish), new AOEShapeCircle(25)); diff --git a/BossMod/Modules/Endwalker/Alliance/A13Azeyma/SolarWings.cs b/BossMod/Modules/Endwalker/Alliance/A13Azeyma/SolarWings.cs index 71fb1075e4..cd01dafcaf 100644 --- a/BossMod/Modules/Endwalker/Alliance/A13Azeyma/SolarWings.cs +++ b/BossMod/Modules/Endwalker/Alliance/A13Azeyma/SolarWings.cs @@ -1,16 +1,9 @@ namespace BossMod.Endwalker.Alliance.A13Azeyma; -class SolarWingsL : Components.SelfTargetedAOEs -{ - public SolarWingsL() : base(ActionID.MakeSpell(AID.SolarWingsL), new AOEShapeCone(30, 75.Degrees())) { } -} - -class SolarWingsR : Components.SelfTargetedAOEs -{ - public SolarWingsR() : base(ActionID.MakeSpell(AID.SolarWingsR), new AOEShapeCone(30, 75.Degrees())) { } -} +class SolarWingsL(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.SolarWingsL), new AOEShapeCone(30, 75.Degrees())); +class SolarWingsR(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.SolarWingsR), new AOEShapeCone(30, 75.Degrees())); -class SolarFlair : Components.GenericAOEs +class SolarFlair(BossModule module) : Components.GenericAOEs(module) { private List _sunstorms = new(); private BitMask _adjusted; @@ -18,15 +11,15 @@ class SolarFlair : Components.GenericAOEs private static readonly float _kickDistance = 18; private static readonly AOEShapeCircle _shape = new(15); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => _sunstorms.Select(p => new AOEInstance(_shape, p)); + public override IEnumerable ActiveAOEs(int slot, Actor actor) => _sunstorms.Select(p => new AOEInstance(_shape, p)); - public override void OnActorCreated(BossModule module, Actor actor) + public override void OnActorCreated(Actor actor) { if ((OID)actor.OID == OID.Sunstorm) _sunstorms.Add(actor.Position); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { @@ -42,18 +35,18 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } else { - module.ReportError(this, $"Unexpected teleport location: {spell.TargetXZ}, closest sunstorm at {closestSunstorm.p}"); + ReportError($"Unexpected teleport location: {spell.TargetXZ}, closest sunstorm at {closestSunstorm.p}"); } } else { - module.ReportError(this, "Unexpected teleport, no sunstorms active"); + ReportError("Unexpected teleport, no sunstorms active"); } break; case AID.SolarFlair: ++NumCasts; if (_sunstorms.RemoveAll(p => p.AlmostEqual(caster.Position, 1)) != 1) - module.ReportError(this, $"Unexpected solar flair position {caster.Position}"); + ReportError($"Unexpected solar flair position {caster.Position}"); break; } } diff --git a/BossMod/Modules/Endwalker/Alliance/A13Azeyma/WildfireWard.cs b/BossMod/Modules/Endwalker/Alliance/A13Azeyma/WildfireWard.cs index 265958c3cb..1e3cf52414 100644 --- a/BossMod/Modules/Endwalker/Alliance/A13Azeyma/WildfireWard.cs +++ b/BossMod/Modules/Endwalker/Alliance/A13Azeyma/WildfireWard.cs @@ -1,21 +1,19 @@ namespace BossMod.Endwalker.Alliance.A13Azeyma; -class WildfireWard : Components.KnockbackFromCastTarget +class WildfireWard(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.IlluminatingGlimpse), 15, false, 1, kind: Kind.DirLeft) { private static readonly WPos[] _tri = { new(-750, -762), new(-760.392f, -744), new(-739.608f, -744) }; - public WildfireWard() : base(ActionID.MakeSpell(AID.IlluminatingGlimpse), 15, false, 1, kind: Kind.DirLeft) { } - - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (!actor.Position.InTri(_tri[0], _tri[1], _tri[2])) hints.Add("Go to safe zone!"); - if (CalculateMovements(module, slot, actor).Any(e => !e.to.InTri(_tri[0], _tri[1], _tri[2]))) + if (CalculateMovements(slot, actor).Any(e => !e.to.InTri(_tri[0], _tri[1], _tri[2]))) hints.Add("About to be knocked into fire!"); } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { - arena.ZoneTri(_tri[0], _tri[1], _tri[2], ArenaColor.SafeFromAOE); + Arena.ZoneTri(_tri[0], _tri[1], _tri[2], ArenaColor.SafeFromAOE); } } diff --git a/BossMod/Modules/Endwalker/Alliance/A14Naldthal/A14Naldthal.cs b/BossMod/Modules/Endwalker/Alliance/A14Naldthal/A14Naldthal.cs index 04c8b2cc5b..17237ffa37 100644 --- a/BossMod/Modules/Endwalker/Alliance/A14Naldthal/A14Naldthal.cs +++ b/BossMod/Modules/Endwalker/Alliance/A14Naldthal/A14Naldthal.cs @@ -1,53 +1,15 @@ namespace BossMod.Endwalker.Alliance.A14Naldthal; -class GoldenTenet : Components.CastSharedTankbuster -{ - public GoldenTenet() : base(ActionID.MakeSpell(AID.GoldenTenetAOE), 6) { } -} - -class StygianTenet : Components.SpreadFromCastTargets -{ - public StygianTenet() : base(ActionID.MakeSpell(AID.StygianTenetAOE), 6) { } -} - -class HellOfFireFront : Components.SelfTargetedAOEs -{ - public HellOfFireFront() : base(ActionID.MakeSpell(AID.HellOfFireFrontAOE), new AOEShapeCone(60, 90.Degrees())) { } -} - -class HellOfFireBack : Components.SelfTargetedAOEs -{ - public HellOfFireBack() : base(ActionID.MakeSpell(AID.HellOfFireBackAOE), new AOEShapeCone(60, 90.Degrees())) { } -} - -class WaywardSoul : Components.SelfTargetedAOEs -{ - public WaywardSoul() : base(ActionID.MakeSpell(AID.WaywardSoulAOE), new AOEShapeCircle(18), 3) { } -} - -class SoulVessel : Components.Adds -{ - public SoulVessel() : base((uint)OID.SoulVesselReal) { } -} - -class Twingaze : Components.SelfTargetedAOEs -{ - public Twingaze() : base(ActionID.MakeSpell(AID.Twingaze), new AOEShapeCone(60, 15.Degrees())) { } -} - -class MagmaticSpell : Components.StackWithCastTargets -{ - public MagmaticSpell() : base(ActionID.MakeSpell(AID.MagmaticSpellAOE), 6, 8) { } -} - -class TippedScales : Components.CastCounter -{ - public TippedScales() : base(ActionID.MakeSpell(AID.TippedScalesAOE)) { } -} +class GoldenTenet(BossModule module) : Components.CastSharedTankbuster(module, ActionID.MakeSpell(AID.GoldenTenetAOE), 6); +class StygianTenet(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.StygianTenetAOE), 6); +class HellOfFireFront(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HellOfFireFrontAOE), new AOEShapeCone(60, 90.Degrees())); +class HellOfFireBack(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HellOfFireBackAOE), new AOEShapeCone(60, 90.Degrees())); +class WaywardSoul(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.WaywardSoulAOE), new AOEShapeCircle(18), 3); +class SoulVessel(BossModule module) : Components.Adds(module, (uint)OID.SoulVesselReal); +class Twingaze(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Twingaze), new AOEShapeCone(60, 15.Degrees())); +class MagmaticSpell(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.MagmaticSpellAOE), 6, 8); +class TippedScales(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.TippedScalesAOE)); // TODO: balancing counter [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 866, NameID = 11286, SortOrder = 6)] -public class A14Naldthal : BossModule -{ - public A14Naldthal(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(750, -750), 30)) { } -} +public class A14Naldthal(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(750, -750), 30)); diff --git a/BossMod/Modules/Endwalker/Alliance/A14Naldthal/FarAboveDeepBelow.cs b/BossMod/Modules/Endwalker/Alliance/A14Naldthal/FarAboveDeepBelow.cs index 11e28913bc..2aefff790c 100644 --- a/BossMod/Modules/Endwalker/Alliance/A14Naldthal/FarAboveDeepBelow.cs +++ b/BossMod/Modules/Endwalker/Alliance/A14Naldthal/FarAboveDeepBelow.cs @@ -1,33 +1,28 @@ namespace BossMod.Endwalker.Alliance.A14Naldthal; // TODO: create and use generic 'line stack' component -class FarFlungFire : Components.GenericWildCharge +class FarFlungFire(BossModule module) : Components.GenericWildCharge(module, 3, fixedLength: 40) { private bool _real; private ulong _targetID; - public FarFlungFire() : base(3) - { - FixedLength = 40; - } - - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.FarAboveDeepBelowNald or AID.HearthAboveFlightBelowNald or AID.HearthAboveFlightBelowThalNald) { _real = true; - InitIfReal(module); + InitIfReal(); } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { case AID.FarFlungFireVisual: Source = caster; _targetID = spell.MainTargetID; - InitIfReal(module); + InitIfReal(); break; case AID.FarFlungFireAOE: ++NumCasts; @@ -37,15 +32,15 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } - private void InitIfReal(BossModule module) + private void InitIfReal() { if (_real && _targetID != 0) - foreach (var (i, p) in module.Raid.WithSlot(true)) + foreach (var (i, p) in Raid.WithSlot(true)) PlayerRoles[i] = p.InstanceID == _targetID ? PlayerRole.Target : PlayerRole.Share; } } -class DeepestPit : Components.GenericAOEs +class DeepestPit(BossModule module) : Components.GenericAOEs(module, default, "GTFO from puddle!") { private bool _real; private List _targets = new(); @@ -55,23 +50,18 @@ class DeepestPit : Components.GenericAOEs private static readonly AOEShapeCircle _shape = new(6); - public DeepestPit() : base(default, "GTFO from puddle!") { } + public override IEnumerable ActiveAOEs(int slot, Actor actor) => _casters.Select(c => new AOEInstance(_shape, c.CastInfo!.LocXZ, default, c.CastInfo.NPCFinishAt)); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => _casters.Select(c => new AOEInstance(_shape, c.CastInfo!.LocXZ, default, c.CastInfo.NPCFinishAt)); - - public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) - { - return _real && _targets.Contains(player) ? PlayerPriority.Danger : PlayerPriority.Irrelevant; - } + public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) => _real && _targets.Contains(player) ? PlayerPriority.Danger : PlayerPriority.Irrelevant; - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (_real) foreach (var t in _targets) - arena.AddCircle(t.Position, _shape.Radius, ArenaColor.Danger); + Arena.AddCircle(t.Position, _shape.Radius, ArenaColor.Danger); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { @@ -87,7 +77,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.DeepestPitFirst or AID.DeepestPitRest) { @@ -97,7 +87,7 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn } } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if ((IconID)iconID == IconID.DeepestPitTarget) { diff --git a/BossMod/Modules/Endwalker/Alliance/A14Naldthal/FortuneFlux.cs b/BossMod/Modules/Endwalker/Alliance/A14Naldthal/FortuneFlux.cs index 9969d1482d..ff8341a8b6 100644 --- a/BossMod/Modules/Endwalker/Alliance/A14Naldthal/FortuneFlux.cs +++ b/BossMod/Modules/Endwalker/Alliance/A14Naldthal/FortuneFlux.cs @@ -1,6 +1,6 @@ namespace BossMod.Endwalker.Alliance.A14Naldthal; -class FortuneFluxOrder : BossComponent +class FortuneFluxOrder(BossModule module) : BossComponent(module) { public enum Mechanic { None, AOE, Knockback } @@ -9,14 +9,14 @@ public enum Mechanic { None, AOE, Knockback } private WPos _currentTethered; private Mechanic _currentMechanic; - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { var order = string.Join(" > ", Mechanics.Skip(NumComplete).Select(m => m.mechanic)); if (order.Length > 0) hints.Add($"Order: {order}"); } - public override void OnTethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnTethered(Actor source, ActorTetherInfo tether) { if (tether.ID == (uint)TetherID.FiredUp) { @@ -25,7 +25,7 @@ public override void OnTethered(BossModule module, Actor source, ActorTetherInfo } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { @@ -42,27 +42,27 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf TryAdd(); break; case AID.FortuneFluxAOE1: - UpdateActivation(module, 0, Mechanic.AOE, spell); + UpdateActivation(0, Mechanic.AOE, spell); break; case AID.FortuneFluxAOE2: - UpdateActivation(module, 1, Mechanic.AOE, spell); + UpdateActivation(1, Mechanic.AOE, spell); break; case AID.FortuneFluxAOE3: - UpdateActivation(module, 2, Mechanic.AOE, spell); + UpdateActivation(2, Mechanic.AOE, spell); break; case AID.FortuneFluxKnockback1: - UpdateActivation(module, 0, Mechanic.Knockback, spell); + UpdateActivation(0, Mechanic.Knockback, spell); break; case AID.FortuneFluxKnockback2: - UpdateActivation(module, 1, Mechanic.Knockback, spell); + UpdateActivation(1, Mechanic.Knockback, spell); break; case AID.FortuneFluxKnockback3: - UpdateActivation(module, 2, Mechanic.Knockback, spell); + UpdateActivation(2, Mechanic.Knockback, spell); break; } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.FortuneFluxAOE1 or AID.FortuneFluxAOE2 or AID.FortuneFluxAOE3 or AID.FortuneFluxKnockback1 or AID.FortuneFluxKnockback2 or AID.FortuneFluxKnockback3) ++NumComplete; @@ -78,30 +78,30 @@ private void TryAdd() } } - private void UpdateActivation(BossModule module, int order, Mechanic mechanic, ActorCastInfo spell) + private void UpdateActivation(int order, Mechanic mechanic, ActorCastInfo spell) { if (order >= Mechanics.Count) { - module.ReportError(this, $"Unexpected mechanic #{order}, only {Mechanics.Count} in list"); + ReportError($"Unexpected mechanic #{order}, only {Mechanics.Count} in list"); return; } ref var m = ref Mechanics.AsSpan()[order]; if (m.mechanic != mechanic) { - module.ReportError(this, $"Unexpected mechanic #{order}: started {mechanic}, expected {m.mechanic}"); + ReportError($"Unexpected mechanic #{order}: started {mechanic}, expected {m.mechanic}"); m.mechanic = mechanic; } if (!m.source.AlmostEqual(spell.LocXZ, 0.5f)) { - module.ReportError(this, $"Unexpected mechanic #{order} position: started {spell.LocXZ}, expected {m.source}"); + ReportError($"Unexpected mechanic #{order} position: started {spell.LocXZ}, expected {m.source}"); m.source = spell.LocXZ; } if (m.activation != DateTime.MaxValue) { - module.ReportError(this, $"Several cast-start for #{order}"); + ReportError($"Several cast-start for #{order}"); } m.activation = spell.NPCFinishAt; } @@ -113,12 +113,12 @@ class FortuneFluxAOE : Components.GenericAOEs private static readonly AOEShapeCircle _shape = new(20); - public override void Init(BossModule module) + public FortuneFluxAOE(BossModule module) : base(module) { _order = module.FindComponent(); } - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_order != null) foreach (var m in _order.Mechanics.Skip(_order.NumComplete).Where(m => m.mechanic == FortuneFluxOrder.Mechanic.AOE)) @@ -130,12 +130,12 @@ class FortuneFluxKnockback : Components.Knockback { private FortuneFluxOrder? _order; - public override void Init(BossModule module) + public FortuneFluxKnockback(BossModule module) : base(module) { _order = module.FindComponent(); } - public override IEnumerable Sources(BossModule module, int slot, Actor actor) + public override IEnumerable Sources(int slot, Actor actor) { if (_order != null) foreach (var m in _order.Mechanics.Skip(_order.NumComplete).Where(m => m.mechanic == FortuneFluxOrder.Mechanic.Knockback)) diff --git a/BossMod/Modules/Endwalker/Alliance/A14Naldthal/HeatAboveFlamesBelow.cs b/BossMod/Modules/Endwalker/Alliance/A14Naldthal/HeatAboveFlamesBelow.cs index 03702bfdb7..4873c1792f 100644 --- a/BossMod/Modules/Endwalker/Alliance/A14Naldthal/HeatAboveFlamesBelow.cs +++ b/BossMod/Modules/Endwalker/Alliance/A14Naldthal/HeatAboveFlamesBelow.cs @@ -1,29 +1,29 @@ namespace BossMod.Endwalker.Alliance.A14Naldthal; -class HeatAboveFlamesBelow : Components.GenericAOEs +class HeatAboveFlamesBelow(BossModule module) : Components.GenericAOEs(module) { public List _aoes = new(); private static readonly AOEShapeCircle _shapeOut = new(8); private static readonly AOEShapeDonut _shapeIn = new(8, 30); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => _aoes; + public override IEnumerable ActiveAOEs(int slot, Actor actor) => _aoes; - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { var shape = ShapeForAction(spell.Action); if (shape != null) _aoes.Add(new(shape, caster.Position, spell.Rotation, spell.NPCFinishAt)); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { var shape = ShapeForAction(spell.Action); if (shape != null) _aoes.Clear(); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { var shape = ShapeForAction(spell.Action); if (shape != null) diff --git a/BossMod/Modules/Endwalker/Alliance/A14Naldthal/HeavensTrial.cs b/BossMod/Modules/Endwalker/Alliance/A14Naldthal/HeavensTrial.cs index 6afb8c5a3d..4b05226aca 100644 --- a/BossMod/Modules/Endwalker/Alliance/A14Naldthal/HeavensTrial.cs +++ b/BossMod/Modules/Endwalker/Alliance/A14Naldthal/HeavensTrial.cs @@ -1,15 +1,15 @@ namespace BossMod.Endwalker.Alliance.A14Naldthal; -class HeavensTrialCone : Components.GenericBaitAway +class HeavensTrialCone(BossModule module) : Components.GenericBaitAway(module) { private static readonly AOEShapeCone _shape = new(60, 15.Degrees()); - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { case AID.HeavensTrialConeStart: - var target = module.WorldState.Actors.Find(spell.MainTargetID); + var target = WorldState.Actors.Find(spell.MainTargetID); if (target != null) CurrentBaits.Add(new(caster, target, _shape)); break; @@ -21,7 +21,4 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } -class HeavensTrialStack : Components.StackWithCastTargets -{ - public HeavensTrialStack() : base(ActionID.MakeSpell(AID.HeavensTrialAOE), 6, 8) { } -} +class HeavensTrialStack(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.HeavensTrialAOE), 6, 8); diff --git a/BossMod/Modules/Endwalker/Alliance/A14Naldthal/OnceAboveEverBelow.cs b/BossMod/Modules/Endwalker/Alliance/A14Naldthal/OnceAboveEverBelow.cs index 8856124f37..36d0246635 100644 --- a/BossMod/Modules/Endwalker/Alliance/A14Naldthal/OnceAboveEverBelow.cs +++ b/BossMod/Modules/Endwalker/Alliance/A14Naldthal/OnceAboveEverBelow.cs @@ -1,50 +1,48 @@ namespace BossMod.Endwalker.Alliance.A14Naldthal; -class OnceAboveEverBelow : Components.Exaflare +class OnceAboveEverBelow(BossModule module) : Components.Exaflare(module, 6) { - public OnceAboveEverBelow() : base(6) { } - - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.EverfireFirst or AID.OnceBurnedFirst) { var advance = 6 * spell.Rotation.ToDirection(); // lines are offset by 6/18/30; outer have 1 explosion only, mid have 4 or 5, inner 5 - var numExplosions = (caster.Position - module.Bounds.Center).LengthSq() > 500 ? 1 : 5; + var numExplosions = (caster.Position - Module.Bounds.Center).LengthSq() > 500 ? 1 : 5; Lines.Add(new() { Next = caster.Position, Advance = advance, NextExplosion = spell.NPCFinishAt, TimeToMove = 1.5f, ExplosionsLeft = numExplosions, MaxShownExplosions = 5 }); Lines.Add(new() { Next = caster.Position, Advance = -advance, NextExplosion = spell.NPCFinishAt, TimeToMove = 1.5f, ExplosionsLeft = numExplosions, MaxShownExplosions = 5 }); } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { case AID.EverfireFirst: case AID.OnceBurnedFirst: var dir = caster.Rotation.ToDirection(); - Advance(module, caster.Position, dir); - Advance(module, caster.Position, -dir); + Advance(caster.Position, dir); + Advance(caster.Position, -dir); ++NumCasts; break; case AID.EverfireRest: case AID.OnceBurnedRest: - Advance(module, caster.Position, caster.Rotation.ToDirection()); + Advance(caster.Position, caster.Rotation.ToDirection()); ++NumCasts; break; } } - private void Advance(BossModule module, WPos position, WDir dir) + private void Advance(WPos position, WDir dir) { int index = Lines.FindIndex(item => item.Next.AlmostEqual(position, 1) && item.Advance.Dot(dir) > 5); if (index == -1) { - module.ReportError(this, $"Failed to find entry for {position} / {dir}"); + ReportError($"Failed to find entry for {position} / {dir}"); return; } - AdvanceLine(module, Lines[index], position); + AdvanceLine(Lines[index], position); if (Lines[index].ExplosionsLeft == 0) Lines.RemoveAt(index); } diff --git a/BossMod/Modules/Endwalker/Alliance/A21Nophica/A21Nophica.cs b/BossMod/Modules/Endwalker/Alliance/A21Nophica/A21Nophica.cs index e6e2f7e6b1..d620e30a77 100644 --- a/BossMod/Modules/Endwalker/Alliance/A21Nophica/A21Nophica.cs +++ b/BossMod/Modules/Endwalker/Alliance/A21Nophica/A21Nophica.cs @@ -1,37 +1,11 @@ namespace BossMod.Endwalker.Alliance.A21Nophica; -class SummerShade : Components.SelfTargetedAOEs -{ - public SummerShade() : base(ActionID.MakeSpell(AID.SummerShade), new AOEShapeDonut(12, 40)) { } -} - -class SpringFlowers : Components.SelfTargetedAOEs -{ - public SpringFlowers() : base(ActionID.MakeSpell(AID.SpringFlowers), new AOEShapeCircle(12)) { } -} - -class ReapersGale : Components.SelfTargetedAOEs -{ - public ReapersGale() : base(ActionID.MakeSpell(AID.ReapersGaleAOE), new AOEShapeRect(36, 4, 36), 9) { } -} - -class Landwaker : Components.LocationTargetedAOEs -{ - public Landwaker() : base(ActionID.MakeSpell(AID.LandwakerAOE), 10) { } -} - -class Furrow : Components.StackWithCastTargets -{ - public Furrow() : base(ActionID.MakeSpell(AID.Furrow), 6, 8) { } -} - -class HeavensEarth : Components.BaitAwayCast -{ - public HeavensEarth() : base(ActionID.MakeSpell(AID.HeavensEarthAOE), new AOEShapeCircle(5), true) { } -} +class SummerShade(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.SummerShade), new AOEShapeDonut(12, 40)); +class SpringFlowers(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.SpringFlowers), new AOEShapeCircle(12)); +class ReapersGale(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ReapersGaleAOE), new AOEShapeRect(36, 4, 36), 9); +class Landwaker(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.LandwakerAOE), 10); +class Furrow(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.Furrow), 6, 8); +class HeavensEarth(BossModule module) : Components.BaitAwayCast(module, ActionID.MakeSpell(AID.HeavensEarthAOE), new AOEShapeCircle(5), true); [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 911, NameID = 12065)] -public class A21Nophica : BossModule -{ - public A21Nophica(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(0, -238), 30)) { } -} +public class A21Nophica(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(0, -238), 30)); diff --git a/BossMod/Modules/Endwalker/Alliance/A21Nophica/FloralHaze.cs b/BossMod/Modules/Endwalker/Alliance/A21Nophica/FloralHaze.cs index d713af18a4..9c4783e933 100644 --- a/BossMod/Modules/Endwalker/Alliance/A21Nophica/FloralHaze.cs +++ b/BossMod/Modules/Endwalker/Alliance/A21Nophica/FloralHaze.cs @@ -2,7 +2,7 @@ class FloralHaze : Components.StatusDrivenForcedMarch { - public FloralHaze() : base(2, (uint)SID.ForwardMarch, (uint)SID.AboutFace, (uint)SID.LeftFace, (uint)SID.RightFace) + public FloralHaze(BossModule module) : base(module, 2, (uint)SID.ForwardMarch, (uint)SID.AboutFace, (uint)SID.LeftFace, (uint)SID.RightFace) { ActivationLimit = 8; } diff --git a/BossMod/Modules/Endwalker/Alliance/A21Nophica/MatronsBreath.cs b/BossMod/Modules/Endwalker/Alliance/A21Nophica/MatronsBreath.cs index 6bbfd5163e..a68151dd46 100644 --- a/BossMod/Modules/Endwalker/Alliance/A21Nophica/MatronsBreath.cs +++ b/BossMod/Modules/Endwalker/Alliance/A21Nophica/MatronsBreath.cs @@ -3,36 +3,36 @@ class MatronsBreath : BossComponent { public int NumCasts { get; private set; } - private IReadOnlyList _blueSafe = ActorEnumeration.EmptyList; - private IReadOnlyList _goldSafe = ActorEnumeration.EmptyList; + private IReadOnlyList _blueSafe; + private IReadOnlyList _goldSafe; private List _towers = new(); private static readonly AOEShapeDonut _shape = new(8, 40); // TODO: verify safe zone radius - public override void Init(BossModule module) + public MatronsBreath(BossModule module) : base(module) { _blueSafe = module.Enemies(OID.BlueSafeZone); _goldSafe = module.Enemies(OID.GoldSafeZone); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_shape.Check(actor.Position, NextSafeZone)) hints.Add("Go to correct safe zone!"); } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { - _shape.Draw(arena, NextSafeZone); + _shape.Draw(Arena, NextSafeZone); } - public override void OnActorCreated(BossModule module, Actor actor) + public override void OnActorCreated(Actor actor) { if ((OID)actor.OID is OID.BlueTower or OID.GoldTower) _towers.Add(actor); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.Blueblossoms or AID.Giltblossoms) { diff --git a/BossMod/Modules/Endwalker/Alliance/A21Nophica/SowingCircle.cs b/BossMod/Modules/Endwalker/Alliance/A21Nophica/SowingCircle.cs index 32139380f7..e813b581d2 100644 --- a/BossMod/Modules/Endwalker/Alliance/A21Nophica/SowingCircle.cs +++ b/BossMod/Modules/Endwalker/Alliance/A21Nophica/SowingCircle.cs @@ -1,10 +1,8 @@ namespace BossMod.Endwalker.Alliance.A21Nophica; -class SowingCircle : Components.Exaflare +class SowingCircle(BossModule module) : Components.Exaflare(module, 5) { - public SowingCircle() : base(5) { } - - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.SowingCircleFirst) { @@ -12,7 +10,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.SowingCircleFirst or AID.SowingCircleRest) { @@ -20,11 +18,11 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent int index = Lines.FindIndex(item => item.Next.AlmostEqual(spell.TargetXZ, 1)); if (index == -1) { - module.ReportError(this, $"Failed to find entry for {caster.InstanceID:X}"); + ReportError($"Failed to find entry for {caster.InstanceID:X}"); return; } - AdvanceLine(module, Lines[index], spell.TargetXZ); + AdvanceLine(Lines[index], spell.TargetXZ); if (Lines[index].ExplosionsLeft == 0) Lines.RemoveAt(index); } diff --git a/BossMod/Modules/Endwalker/Alliance/A22AlthykNymeia/A22AlthykNymeia.cs b/BossMod/Modules/Endwalker/Alliance/A22AlthykNymeia/A22AlthykNymeia.cs index 5183a3ca3c..10aaae9767 100644 --- a/BossMod/Modules/Endwalker/Alliance/A22AlthykNymeia/A22AlthykNymeia.cs +++ b/BossMod/Modules/Endwalker/Alliance/A22AlthykNymeia/A22AlthykNymeia.cs @@ -1,25 +1,16 @@ namespace BossMod.Endwalker.Alliance.A22AlthykNymeia; -class MythrilGreataxe : Components.SelfTargetedAOEs -{ - public MythrilGreataxe() : base(ActionID.MakeSpell(AID.MythrilGreataxe), new AOEShapeCone(71, 30.Degrees())) { } -} - -class Hydroptosis : Components.SpreadFromCastTargets -{ - public Hydroptosis() : base(ActionID.MakeSpell(AID.HydroptosisAOE), 6) { } -} +class MythrilGreataxe(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.MythrilGreataxe), new AOEShapeCone(71, 30.Degrees())); +class Hydroptosis(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.HydroptosisAOE), 6); [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.Althyk, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 911, NameID = 12244)] -public class A22AlthykNymeia : BossModule +public class A22AlthykNymeia(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsSquare(new(50, -750), 25)) { private Actor? _nymeia; public Actor? Althyk() => PrimaryActor; public Actor? Nymeia() => _nymeia; - public A22AlthykNymeia(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsSquare(new(50, -750), 25)) { } - protected override void UpdateModule() { // TODO: this is an ugly hack, think how multi-actor fights can be implemented without it... diff --git a/BossMod/Modules/Endwalker/Alliance/A22AlthykNymeia/A22AlthykNymeiaStates.cs b/BossMod/Modules/Endwalker/Alliance/A22AlthykNymeia/A22AlthykNymeiaStates.cs index 45e31180f9..1fa81dc262 100644 --- a/BossMod/Modules/Endwalker/Alliance/A22AlthykNymeia/A22AlthykNymeiaStates.cs +++ b/BossMod/Modules/Endwalker/Alliance/A22AlthykNymeia/A22AlthykNymeiaStates.cs @@ -4,14 +4,12 @@ class A22AlthykNymeiaStates : StateMachineBuilder { private A22AlthykNymeia _module; - private bool IsDead(Actor? actor) => actor == null || actor.IsDestroyed || actor.IsDead; - public A22AlthykNymeiaStates(A22AlthykNymeia module) : base(module) { _module = module; SimplePhase(0, SinglePhase, "Single phase") .ActivateOnEnter() - .Raw.Update = () => IsDead(_module.Althyk()) && IsDead(_module.Nymeia()); + .Raw.Update = () => (_module.Althyk()?.IsDeadOrDestroyed ?? true) && (_module.Nymeia()?.IsDeadOrDestroyed ?? true); } private void SinglePhase(uint id) diff --git a/BossMod/Modules/Endwalker/Alliance/A22AlthykNymeia/Axioma.cs b/BossMod/Modules/Endwalker/Alliance/A22AlthykNymeia/Axioma.cs index 7e63de4540..5d9f19e299 100644 --- a/BossMod/Modules/Endwalker/Alliance/A22AlthykNymeia/Axioma.cs +++ b/BossMod/Modules/Endwalker/Alliance/A22AlthykNymeia/Axioma.cs @@ -1,36 +1,36 @@ namespace BossMod.Endwalker.Alliance.A22AlthykNymeia; // TODO: show zone shapes -class Axioma : BossComponent +class Axioma(BossModule module) : BossComponent(module) { public bool ShouldBeInZone { get; private set; } private BitMask _inZone; - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_inZone[slot] != ShouldBeInZone) hints.Add(ShouldBeInZone ? "Go to dark zone!" : "GTFO from dark zone!"); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Heavy) - _inZone.Set(module.Raid.FindSlot(actor.InstanceID)); + _inZone.Set(Raid.FindSlot(actor.InstanceID)); } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Heavy) - _inZone.Clear(module.Raid.FindSlot(actor.InstanceID)); + _inZone.Clear(Raid.FindSlot(actor.InstanceID)); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.InexorablePullAOE) ShouldBeInZone = true; } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.InexorablePullAOE) ShouldBeInZone = false; diff --git a/BossMod/Modules/Endwalker/Alliance/A22AlthykNymeia/Hydrorythmos.cs b/BossMod/Modules/Endwalker/Alliance/A22AlthykNymeia/Hydrorythmos.cs index 97b301e263..0b62031ebb 100644 --- a/BossMod/Modules/Endwalker/Alliance/A22AlthykNymeia/Hydrorythmos.cs +++ b/BossMod/Modules/Endwalker/Alliance/A22AlthykNymeia/Hydrorythmos.cs @@ -1,6 +1,6 @@ namespace BossMod.Endwalker.Alliance.A22AlthykNymeia; -class Hydrorythmos : Components.GenericAOEs +class Hydrorythmos(BossModule module) : Components.GenericAOEs(module) { private Angle _dir; private DateTime _activation; @@ -8,21 +8,21 @@ class Hydrorythmos : Components.GenericAOEs private static readonly AOEShapeRect _shapeFirst = new(25, 5, 25); private static readonly AOEShapeRect _shapeRest = new(25, 2.5f, 25); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (NumCasts > 0) { var offset = ((NumCasts + 1) >> 1) * 5 * _dir.ToDirection().OrthoL(); - yield return new(_shapeRest, module.Bounds.Center + offset, _dir, _activation); - yield return new(_shapeRest, module.Bounds.Center - offset, _dir, _activation); + yield return new(_shapeRest, Module.Bounds.Center + offset, _dir, _activation); + yield return new(_shapeRest, Module.Bounds.Center - offset, _dir, _activation); } else if (_activation != default) { - yield return new(_shapeFirst, module.Bounds.Center, _dir, _activation); + yield return new(_shapeFirst, Module.Bounds.Center, _dir, _activation); } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.HydrorythmosFirst) { @@ -31,12 +31,12 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.HydrorythmosFirst or AID.HydrorythmosRest) { ++NumCasts; - _activation = module.WorldState.CurrentTime.AddSeconds(2.1f); + _activation = WorldState.FutureTime(2.1f); } } } diff --git a/BossMod/Modules/Endwalker/Alliance/A22AlthykNymeia/Hydrostasis.cs b/BossMod/Modules/Endwalker/Alliance/A22AlthykNymeia/Hydrostasis.cs index 71886fc629..07a05386cc 100644 --- a/BossMod/Modules/Endwalker/Alliance/A22AlthykNymeia/Hydrostasis.cs +++ b/BossMod/Modules/Endwalker/Alliance/A22AlthykNymeia/Hydrostasis.cs @@ -1,20 +1,20 @@ namespace BossMod.Endwalker.Alliance.A22AlthykNymeia; -class Hydrostasis : Components.Knockback +class Hydrostasis(BossModule module) : Components.Knockback(module) { private List _sources = new(); public bool Active => _sources.Count == 3 || NumCasts > 0; - public override IEnumerable Sources(BossModule module, int slot, Actor actor) => Active ? _sources : Enumerable.Empty(); + public override IEnumerable Sources(int slot, Actor actor) => Active ? _sources : Enumerable.Empty(); - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.HydrostasisAOE1 or AID.HydrostasisAOE2 or AID.HydrostasisAOE3 or AID.HydrostasisAOEDelayed) AddSource(caster.Position, spell.NPCFinishAt); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.HydrostasisAOE1 or AID.HydrostasisAOE2 or AID.HydrostasisAOE3 or AID.HydrostasisAOE0 or AID.HydrostasisAOEDelayed) { @@ -24,10 +24,10 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn } } - public override void OnTethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnTethered(Actor source, ActorTetherInfo tether) { if (tether.ID == (uint)TetherID.HydrostasisQuick) - AddSource(source.Position, module.WorldState.CurrentTime.AddSeconds(12)); + AddSource(source.Position, WorldState.FutureTime(12)); } private void AddSource(WPos pos, DateTime activation) diff --git a/BossMod/Modules/Endwalker/Alliance/A22AlthykNymeia/Petrai.cs b/BossMod/Modules/Endwalker/Alliance/A22AlthykNymeia/Petrai.cs index fb746446aa..6685b251c7 100644 --- a/BossMod/Modules/Endwalker/Alliance/A22AlthykNymeia/Petrai.cs +++ b/BossMod/Modules/Endwalker/Alliance/A22AlthykNymeia/Petrai.cs @@ -1,20 +1,18 @@ namespace BossMod.Endwalker.Alliance.A22AlthykNymeia; -class Petrai : Components.GenericSharedTankbuster +class Petrai(BossModule module) : Components.GenericSharedTankbuster(module, ActionID.MakeSpell(AID.PetraiAOE), 6) { - public Petrai() : base(ActionID.MakeSpell(AID.PetraiAOE), 6) { } - - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.Petrai) { Source = caster; - Target = module.WorldState.Actors.Find(spell.TargetID); + Target = WorldState.Actors.Find(spell.TargetID); Activation = spell.NPCFinishAt.AddSeconds(1); } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if (spell.Action == WatchedAction) { diff --git a/BossMod/Modules/Endwalker/Alliance/A22AlthykNymeia/SpinnersWheel.cs b/BossMod/Modules/Endwalker/Alliance/A22AlthykNymeia/SpinnersWheel.cs index c68ca47184..a2c6fcf35b 100644 --- a/BossMod/Modules/Endwalker/Alliance/A22AlthykNymeia/SpinnersWheel.cs +++ b/BossMod/Modules/Endwalker/Alliance/A22AlthykNymeia/SpinnersWheel.cs @@ -1,12 +1,12 @@ namespace BossMod.Endwalker.Alliance.A22AlthykNymeia; -class SpinnersWheelSelect : BossComponent +class SpinnersWheelSelect(BossModule module) : BossComponent(module) { public enum Branch { None, Gaze, StayMove } public Branch SelectedBranch { get; private set; } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { var branch = (SID)status.ID switch { @@ -26,56 +26,44 @@ class SpinnersWheelGaze : Components.GenericGaze private DateTime _activation; private BitMask _affected; - public SpinnersWheelGaze(bool inverted, AID aid, SID sid) : base(ActionID.MakeSpell(aid), inverted) + public SpinnersWheelGaze(BossModule module, bool inverted, AID aid, SID sid) : base(module, ActionID.MakeSpell(aid), inverted) { _sid = sid; - } - - public override void Init(BossModule module) - { _source = module.Enemies(OID.Nymeia).FirstOrDefault(); } - public override IEnumerable ActiveEyes(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveEyes(int slot, Actor actor) { if (_source != null && _affected[slot]) yield return new(_source.Position, _activation); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == _sid) { _activation = status.ExpireAt; - _affected.Set(module.Raid.FindSlot(actor.InstanceID)); + _affected.Set(Raid.FindSlot(actor.InstanceID)); } } } +class SpinnersWheelArcaneAttraction(BossModule module) : SpinnersWheelGaze(module, false, AID.SpinnersWheelArcaneAttraction, SID.ArcaneAttraction); +class SpinnersWheelAttractionReversed(BossModule module) : SpinnersWheelGaze(module, true, AID.SpinnersWheelAttractionReversed, SID.AttractionReversed); -class SpinnersWheelArcaneAttraction : SpinnersWheelGaze -{ - public SpinnersWheelArcaneAttraction() : base(false, AID.SpinnersWheelArcaneAttraction, SID.ArcaneAttraction) { } -} - -class SpinnersWheelAttractionReversed : SpinnersWheelGaze -{ - public SpinnersWheelAttractionReversed() : base(true, AID.SpinnersWheelAttractionReversed, SID.AttractionReversed) { } -} - -class SpinnersWheelStayMove : Components.StayMove +class SpinnersWheelStayMove(BossModule module) : Components.StayMove(module) { public int ActiveDebuffs { get; private set; } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { switch ((SID)status.ID) { case SID.ArcaneFever: - if (module.Raid.FindSlot(actor.InstanceID) is var feverSlot && feverSlot >= 0 && feverSlot < Requirements.Length) + if (Raid.FindSlot(actor.InstanceID) is var feverSlot && feverSlot >= 0 && feverSlot < Requirements.Length) Requirements[feverSlot] = Requirement.Stay; break; case SID.FeverReversed: - if (module.Raid.FindSlot(actor.InstanceID) is var revSlot && revSlot >= 0 && revSlot < Requirements.Length) + if (Raid.FindSlot(actor.InstanceID) is var revSlot && revSlot >= 0 && revSlot < Requirements.Length) Requirements[revSlot] = Requirement.Move; break; case SID.Pyretic: @@ -85,12 +73,12 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st } } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { if ((SID)status.ID is SID.Pyretic or SID.FreezingUp) { --ActiveDebuffs; - if (module.Raid.FindSlot(actor.InstanceID) is var slot && slot >= 0 && slot < Requirements.Length) + if (Raid.FindSlot(actor.InstanceID) is var slot && slot >= 0 && slot < Requirements.Length) Requirements[slot] = Requirement.None; } } diff --git a/BossMod/Modules/Endwalker/Alliance/A23Halone/A23Halone.cs b/BossMod/Modules/Endwalker/Alliance/A23Halone/A23Halone.cs index f90da4a552..3c7f5bb954 100644 --- a/BossMod/Modules/Endwalker/Alliance/A23Halone/A23Halone.cs +++ b/BossMod/Modules/Endwalker/Alliance/A23Halone/A23Halone.cs @@ -1,52 +1,14 @@ namespace BossMod.Endwalker.Alliance.A23Halone; -class RainOfSpearsFirst : Components.CastCounter -{ - public RainOfSpearsFirst() : base(ActionID.MakeSpell(AID.RainOfSpearsFirst)) { } -} - -class RainOfSpearsRest : Components.CastCounter -{ - public RainOfSpearsRest() : base(ActionID.MakeSpell(AID.RainOfSpearsRest)) { } -} - -class SpearsThree : Components.BaitAwayCast -{ - public SpearsThree() : base(ActionID.MakeSpell(AID.SpearsThreeAOE), new AOEShapeCircle(5), true) { } -} - -class WrathOfHalone : Components.SelfTargetedAOEs -{ - public WrathOfHalone() : base(ActionID.MakeSpell(AID.WrathOfHaloneAOE), new AOEShapeCircle(25)) { } // TODO: verify falloff -} - -class GlacialSpearSmall : Components.Adds -{ - public GlacialSpearSmall() : base((uint)OID.GlacialSpearSmall) { } -} - -class GlacialSpearLarge : Components.Adds -{ - public GlacialSpearLarge() : base((uint)OID.GlacialSpearLarge) { } -} - -class IceDart : Components.SpreadFromCastTargets -{ - public IceDart() : base(ActionID.MakeSpell(AID.IceDart), 6) { } -} - -class IceRondel : Components.StackWithCastTargets -{ - public IceRondel() : base(ActionID.MakeSpell(AID.IceRondel), 6) { } -} - -class Niphas : Components.SelfTargetedAOEs -{ - public Niphas() : base(ActionID.MakeSpell(AID.Niphas), new AOEShapeCircle(9)) { } -} +class RainOfSpearsFirst(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.RainOfSpearsFirst)); +class RainOfSpearsRest(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.RainOfSpearsRest)); +class SpearsThree(BossModule module) : Components.BaitAwayCast(module, ActionID.MakeSpell(AID.SpearsThreeAOE), new AOEShapeCircle(5), true); +class WrathOfHalone(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.WrathOfHaloneAOE), new AOEShapeCircle(25)); // TODO: verify falloff +class GlacialSpearSmall(BossModule module) : Components.Adds(module, (uint)OID.GlacialSpearSmall); +class GlacialSpearLarge(BossModule module) : Components.Adds(module, (uint)OID.GlacialSpearLarge); +class IceDart(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.IceDart), 6); +class IceRondel(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.IceRondel), 6); +class Niphas(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Niphas), new AOEShapeCircle(9)); [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 911, NameID = 12064)] -public class A23Halone : BossModule -{ - public A23Halone(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(-700, 600), 30)) { } -} +public class A23Halone(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(-700, 600), 30)); diff --git a/BossMod/Modules/Endwalker/Alliance/A23Halone/DoomSpear.cs b/BossMod/Modules/Endwalker/Alliance/A23Halone/DoomSpear.cs index 42ded4d2f8..d9843c859b 100644 --- a/BossMod/Modules/Endwalker/Alliance/A23Halone/DoomSpear.cs +++ b/BossMod/Modules/Endwalker/Alliance/A23Halone/DoomSpear.cs @@ -1,14 +1,14 @@ namespace BossMod.Endwalker.Alliance.A23Halone; -class DoomSpear : Components.GenericTowers +class DoomSpear(BossModule module) : Components.GenericTowers(module) { - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.DoomSpearAOE1 or AID.DoomSpearAOE2 or AID.DoomSpearAOE3) Towers.Add(new(caster.Position, 6, 8, int.MaxValue)); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.DoomSpearAOE1 or AID.DoomSpearAOE2 or AID.DoomSpearAOE3) { diff --git a/BossMod/Modules/Endwalker/Alliance/A23Halone/FurysAegis.cs b/BossMod/Modules/Endwalker/Alliance/A23Halone/FurysAegis.cs index 221f4d0b00..bdb45e8a86 100644 --- a/BossMod/Modules/Endwalker/Alliance/A23Halone/FurysAegis.cs +++ b/BossMod/Modules/Endwalker/Alliance/A23Halone/FurysAegis.cs @@ -1,10 +1,8 @@ namespace BossMod.Endwalker.Alliance.A23Halone; -class FurysAegis : BossComponent +class FurysAegis(BossModule module) : Components.CastCounter(module, default) { - public int NumCasts { get; private set; } - - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.Shockwave or AID.FurysAegisAOE1 or AID.FurysAegisAOE2 or AID.FurysAegisAOE3 or AID.FurysAegisAOE4 or AID.FurysAegisAOE5 or AID.FurysAegisAOE6) ++NumCasts; diff --git a/BossMod/Modules/Endwalker/Alliance/A23Halone/Lochos.cs b/BossMod/Modules/Endwalker/Alliance/A23Halone/Lochos.cs index 9d62224ddb..8a723179ba 100644 --- a/BossMod/Modules/Endwalker/Alliance/A23Halone/Lochos.cs +++ b/BossMod/Modules/Endwalker/Alliance/A23Halone/Lochos.cs @@ -1,30 +1,25 @@ namespace BossMod.Endwalker.Alliance.A23Halone; -class Lochos : Components.GenericAOEs +class Lochos(BossModule module, float activationDelay) : Components.GenericAOEs(module) { private List _aoes = new(); - private float _activationDelay; + private float _activationDelay = activationDelay; private static readonly AOEShapeRect _shape = new(60, 15); - public Lochos(float activationDelay) - { - _activationDelay = activationDelay; - } + public override IEnumerable ActiveAOEs(int slot, Actor actor) => _aoes; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => _aoes; - - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.LochosFirst or AID.LochosRest) { if (!_aoes.Any(aoe => aoe.Origin.AlmostEqual(caster.Position, 1) && aoe.Rotation.AlmostEqual(caster.Rotation, 0.1f))) - module.ReportError(this, "Unexpected caster position/rotation"); + ReportError("Unexpected caster position/rotation"); ++NumCasts; } } - public override void OnEventEnvControl(BossModule module, byte index, uint state) + public override void OnEventEnvControl(byte index, uint state) { if (state == 0x00200010) { @@ -38,11 +33,10 @@ public override void OnEventEnvControl(BossModule module, byte index, uint state }; if (offset != default) { - _aoes.Add(new(_shape, module.Bounds.Center + offset, dir, module.WorldState.CurrentTime.AddSeconds(_activationDelay))); + _aoes.Add(new(_shape, Module.Bounds.Center + offset, dir, WorldState.FutureTime(_activationDelay))); } } } } - -class Lochos1 : Lochos { public Lochos1() : base(10.9f) { } } -class Lochos2 : Lochos { public Lochos2() : base(14.8f) { } } +class Lochos1(BossModule module) : Lochos(module, 10.9f); +class Lochos2(BossModule module) : Lochos(module, 14.8f); diff --git a/BossMod/Modules/Endwalker/Alliance/A23Halone/Tetrapagos.cs b/BossMod/Modules/Endwalker/Alliance/A23Halone/Tetrapagos.cs index 4004681c8b..c86d8ee524 100644 --- a/BossMod/Modules/Endwalker/Alliance/A23Halone/Tetrapagos.cs +++ b/BossMod/Modules/Endwalker/Alliance/A23Halone/Tetrapagos.cs @@ -1,12 +1,12 @@ namespace BossMod.Endwalker.Alliance.A23Halone; -class Tetrapagos : Components.GenericAOEs +class Tetrapagos(BossModule module) : Components.GenericAOEs(module) { private List _aoes = new(); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => _aoes.Take(1); + public override IEnumerable ActiveAOEs(int slot, Actor actor) => _aoes.Take(1); - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { AOEShape? shape = (AID)spell.Action.ID switch { @@ -19,7 +19,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf _aoes.Add(new(shape, caster.Position, caster.Rotation, spell.NPCFinishAt.AddSeconds(7.3f))); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.TetrapagosHailstormAOE or AID.TetrapagosSwirlAOE or AID.TetrapagosRightrimeAOE or AID.TetrapagosLeftrimeAOE) { diff --git a/BossMod/Modules/Endwalker/Alliance/A23Halone/ThousandfoldThrust.cs b/BossMod/Modules/Endwalker/Alliance/A23Halone/ThousandfoldThrust.cs index 8148640f81..683671f488 100644 --- a/BossMod/Modules/Endwalker/Alliance/A23Halone/ThousandfoldThrust.cs +++ b/BossMod/Modules/Endwalker/Alliance/A23Halone/ThousandfoldThrust.cs @@ -1,18 +1,18 @@ namespace BossMod.Endwalker.Alliance.A23Halone; -class ThousandfoldThrust : Components.GenericAOEs +class ThousandfoldThrust(BossModule module) : Components.GenericAOEs(module) { private AOEInstance? _aoe; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => Utils.ZeroOrOne(_aoe); + public override IEnumerable ActiveAOEs(int slot, Actor actor) => Utils.ZeroOrOne(_aoe); - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.ThousandfoldThrustAOEFirst) _aoe = new(new AOEShapeCone(30, 90.Degrees()), caster.Position, spell.Rotation, spell.NPCFinishAt); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.ThousandfoldThrustAOEFirst or AID.ThousandfoldThrustAOERest) ++NumCasts; diff --git a/BossMod/Modules/Endwalker/Alliance/A23Halone/WillOfTheFury.cs b/BossMod/Modules/Endwalker/Alliance/A23Halone/WillOfTheFury.cs index 8cf4118dc9..24656d3073 100644 --- a/BossMod/Modules/Endwalker/Alliance/A23Halone/WillOfTheFury.cs +++ b/BossMod/Modules/Endwalker/Alliance/A23Halone/WillOfTheFury.cs @@ -1,6 +1,6 @@ namespace BossMod.Endwalker.Alliance.A23Halone; -class WillOfTheFury : Components.GenericAOEs +class WillOfTheFury(BossModule module) : Components.GenericAOEs(module) { private AOEInstance? _aoe; @@ -8,26 +8,26 @@ class WillOfTheFury : Components.GenericAOEs public bool Active => _aoe != null; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => Utils.ZeroOrOne(_aoe); + public override IEnumerable ActiveAOEs(int slot, Actor actor) => Utils.ZeroOrOne(_aoe); - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.WillOfTheFuryAOE1) { - UpdateAOE(module.Bounds.Center, spell.NPCFinishAt); + UpdateAOE(spell.NPCFinishAt); } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.WillOfTheFuryAOE1 or AID.WillOfTheFuryAOE2 or AID.WillOfTheFuryAOE3 or AID.WillOfTheFuryAOE4 or AID.WillOfTheFuryAOE5) { ++NumCasts; - UpdateAOE(module.Bounds.Center, module.WorldState.CurrentTime.AddSeconds(2)); + UpdateAOE(WorldState.FutureTime(2)); } } - private void UpdateAOE(WPos origin, DateTime activation) + private void UpdateAOE(DateTime activation) { var outerRadius = (5 - NumCasts) * _impactRadiusIncrement; AOEShape? shape = NumCasts switch @@ -36,6 +36,6 @@ private void UpdateAOE(WPos origin, DateTime activation) 4 => new AOEShapeCircle(outerRadius), _ => null }; - _aoe = shape != null ? new(shape, origin, default, activation) : null; + _aoe = shape != null ? new(shape, Module.Bounds.Center, default, activation) : null; } } diff --git a/BossMod/Modules/Endwalker/Alliance/A24Menphina/A24Menphina.cs b/BossMod/Modules/Endwalker/Alliance/A24Menphina/A24Menphina.cs index 9d07da5acb..a8efcc8460 100644 --- a/BossMod/Modules/Endwalker/Alliance/A24Menphina/A24Menphina.cs +++ b/BossMod/Modules/Endwalker/Alliance/A24Menphina/A24Menphina.cs @@ -1,67 +1,17 @@ namespace BossMod.Endwalker.Alliance.A24Menphina; -class BlueMoon : Components.CastCounter -{ - public BlueMoon() : base(ActionID.MakeSpell(AID.BlueMoonAOE)) { } -} - -class FirstBlush : Components.SelfTargetedAOEs -{ - public FirstBlush() : base(ActionID.MakeSpell(AID.FirstBlush), new AOEShapeRect(80, 12.5f)) { } -} - -class SilverMirror : Components.SelfTargetedAOEs -{ - public SilverMirror() : base(ActionID.MakeSpell(AID.SilverMirrorAOE), new AOEShapeCircle(7)) { } -} - -class Moonset : Components.SelfTargetedAOEs -{ - public Moonset() : base(ActionID.MakeSpell(AID.MoonsetAOE), new AOEShapeCircle(12)) { } -} - -class LoversBridgeShort : Components.SelfTargetedAOEs -{ - public LoversBridgeShort() : base(ActionID.MakeSpell(AID.LoversBridgeShort), new AOEShapeCircle(19)) { } -} - -class LoversBridgeLong : Components.SelfTargetedAOEs -{ - public LoversBridgeLong() : base(ActionID.MakeSpell(AID.LoversBridgeLong), new AOEShapeCircle(19)) { } -} - -class CeremonialPillar : Components.Adds -{ - public CeremonialPillar() : base((uint)OID.CeremonialPillar) { } -} - -class AncientBlizzard : Components.SelfTargetedAOEs -{ - public AncientBlizzard() : base(ActionID.MakeSpell(AID.AncientBlizzard), new AOEShapeCone(45, 22.5f.Degrees())) { } -} - -class KeenMoonbeam : Components.SpreadFromCastTargets -{ - public KeenMoonbeam() : base(ActionID.MakeSpell(AID.KeenMoonbeamAOE), 6) { } -} - -class RiseOfTheTwinMoons : Components.CastCounter -{ - public RiseOfTheTwinMoons() : base(ActionID.MakeSpell(AID.RiseOfTheTwinMoons)) { } -} - -class CrateringChill : Components.SelfTargetedAOEs -{ - public CrateringChill() : base(ActionID.MakeSpell(AID.CrateringChillAOE), new AOEShapeCircle(20)) { } -} - -class MoonsetRays : Components.StackWithCastTargets -{ - public MoonsetRays() : base(ActionID.MakeSpell(AID.MoonsetRaysAOE), 6, 4) { } -} +class BlueMoon(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.BlueMoonAOE)); +class FirstBlush(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.FirstBlush), new AOEShapeRect(80, 12.5f)); +class SilverMirror(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.SilverMirrorAOE), new AOEShapeCircle(7)); +class Moonset(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.MoonsetAOE), new AOEShapeCircle(12)); +class LoversBridgeShort(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.LoversBridgeShort), new AOEShapeCircle(19)); +class LoversBridgeLong(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.LoversBridgeLong), new AOEShapeCircle(19)); +class CeremonialPillar(BossModule module) : Components.Adds(module, (uint)OID.CeremonialPillar); +class AncientBlizzard(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.AncientBlizzard), new AOEShapeCone(45, 22.5f.Degrees())); +class KeenMoonbeam(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.KeenMoonbeamAOE), 6); +class RiseOfTheTwinMoons(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.RiseOfTheTwinMoons)); +class CrateringChill(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.CrateringChillAOE), new AOEShapeCircle(20)); +class MoonsetRays(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.MoonsetRaysAOE), 6, 4); [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 911, NameID = 12063)] -public class A24Menphina : BossModule -{ - public A24Menphina(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(800, 750), 30)) { } -} +public class A24Menphina(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(800, 750), 30)); diff --git a/BossMod/Modules/Endwalker/Alliance/A24Menphina/LunarKiss.cs b/BossMod/Modules/Endwalker/Alliance/A24Menphina/LunarKiss.cs index fc71f1e6bf..38e5da4853 100644 --- a/BossMod/Modules/Endwalker/Alliance/A24Menphina/LunarKiss.cs +++ b/BossMod/Modules/Endwalker/Alliance/A24Menphina/LunarKiss.cs @@ -1,16 +1,16 @@ namespace BossMod.Endwalker.Alliance.A24Menphina; -class LunarKiss : Components.GenericBaitAway +class LunarKiss(BossModule module) : Components.GenericBaitAway(module) { private static readonly AOEShapeRect _shape = new(60, 3); - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.LunarKiss) - CurrentBaits.Add(new(module.PrimaryActor, actor, _shape)); + CurrentBaits.Add(new(Module.PrimaryActor, actor, _shape)); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.LunarKissAOE) { diff --git a/BossMod/Modules/Endwalker/Alliance/A24Menphina/MidnightFrost.cs b/BossMod/Modules/Endwalker/Alliance/A24Menphina/MidnightFrost.cs index 261d67d93a..cf8d14d2ae 100644 --- a/BossMod/Modules/Endwalker/Alliance/A24Menphina/MidnightFrost.cs +++ b/BossMod/Modules/Endwalker/Alliance/A24Menphina/MidnightFrost.cs @@ -1,14 +1,14 @@ namespace BossMod.Endwalker.Alliance.A24Menphina; -class MidnightFrostWaxingClaw : Components.GenericAOEs +class MidnightFrostWaxingClaw(BossModule module) : Components.GenericAOEs(module) { private List _aoes = new(); private static readonly AOEShapeCone _shape = new(60, 90.Degrees()); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => _aoes; + public override IEnumerable ActiveAOEs(int slot, Actor actor) => _aoes; - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.MidnightFrostShortNormalFrontAOE or AID.MidnightFrostShortNormalBackAOE or AID.MidnightFrostShortMountedFrontAOE or AID.MidnightFrostShortMountedBackAOE or @@ -20,7 +20,7 @@ AID.MidnightFrostLongDismountedFrontAOE or AID.MidnightFrostLongDismountedBackAO } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.MidnightFrostShortNormalFrontAOE or AID.MidnightFrostShortNormalBackAOE or AID.MidnightFrostShortMountedFrontAOE or AID.MidnightFrostShortMountedBackAOE or diff --git a/BossMod/Modules/Endwalker/Alliance/A24Menphina/WinterHalo.cs b/BossMod/Modules/Endwalker/Alliance/A24Menphina/WinterHalo.cs index 83f0a8ca25..e8b4b0bc05 100644 --- a/BossMod/Modules/Endwalker/Alliance/A24Menphina/WinterHalo.cs +++ b/BossMod/Modules/Endwalker/Alliance/A24Menphina/WinterHalo.cs @@ -1,20 +1,20 @@ namespace BossMod.Endwalker.Alliance.A24Menphina; -class WinterHalo : Components.GenericAOEs +class WinterHalo(BossModule module) : Components.GenericAOEs(module) { private AOEInstance? _aoe; private static readonly AOEShapeDonut _shape = new(10, 60); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => Utils.ZeroOrOne(_aoe); + public override IEnumerable ActiveAOEs(int slot, Actor actor) => Utils.ZeroOrOne(_aoe); - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.WinterHaloShortAOE or AID.WinterHaloLongMountedAOE or AID.WinterHaloLongDismountedAOE) _aoe = new(_shape, caster.Position, spell.Rotation, spell.NPCFinishAt); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.WinterHaloShortAOE or AID.WinterHaloLongMountedAOE or AID.WinterHaloLongDismountedAOE) { diff --git a/BossMod/Modules/Endwalker/Alliance/A30Trash/A30Trash1.cs b/BossMod/Modules/Endwalker/Alliance/A30Trash/A30Trash1.cs index 52cfeef21e..8d2644b2c8 100644 --- a/BossMod/Modules/Endwalker/Alliance/A30Trash/A30Trash1.cs +++ b/BossMod/Modules/Endwalker/Alliance/A30Trash/A30Trash1.cs @@ -21,21 +21,22 @@ public enum AID : uint DivineBurst = 35441, // DivineSprite->self, no cast, range 40 circle, raidwide when Divine Sprite dies } -class WaterIII() : Components.LocationTargetedAOEs(ActionID.MakeSpell(AID.WaterIII), 8); -class PelagicCleaver1() : Components.SelfTargetedAOEs(ActionID.MakeSpell(AID.PelagicCleaver1), new AOEShapeCone(40, 30.Degrees())); -class PelagicCleaver2() : Components.SelfTargetedAOEs(ActionID.MakeSpell(AID.PelagicCleaver2), new AOEShapeCone(40, 30.Degrees())); -class PelagicCleaver1InterruptHint() : Components.CastInterruptHint(ActionID.MakeSpell(AID.PelagicCleaver1)); -class PelagicCleaver2InterruptHint() : Components.CastInterruptHint(ActionID.MakeSpell(AID.PelagicCleaver2)); -class WaterFlood() : Components.SelfTargetedAOEs(ActionID.MakeSpell(AID.WaterFlood), new AOEShapeCircle(6)); -class DivineFlood() : Components.SelfTargetedAOEs(ActionID.MakeSpell(AID.DivineFlood), new AOEShapeCircle(6)); +class WaterIII(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.WaterIII), 8); +class PelagicCleaver1(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PelagicCleaver1), new AOEShapeCone(40, 30.Degrees())); +class PelagicCleaver2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PelagicCleaver2), new AOEShapeCone(40, 30.Degrees())); +class PelagicCleaver1InterruptHint(BossModule module) : Components.CastInterruptHint(module, ActionID.MakeSpell(AID.PelagicCleaver1)); +class PelagicCleaver2InterruptHint(BossModule module) : Components.CastInterruptHint(module, ActionID.MakeSpell(AID.PelagicCleaver2)); +class WaterFlood(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.WaterFlood), new AOEShapeCircle(6)); +class DivineFlood(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.DivineFlood), new AOEShapeCircle(6)); public class A30Trash1States : StateMachineBuilder { public A30Trash1States(A30Trash1 module) : base(module) { + // as soon as the last serpent dies, other adds are spawned; serpents are destroyed a bit later TrivialPhase() .ActivateOnEnter() - .Raw.Update = () => module.Serpents.All(e => e.IsDeadOrDestroyed); + .Raw.Update = () => module.Enemies(OID.Serpent).All(e => e.IsDead); TrivialPhase(1) .ActivateOnEnter() .ActivateOnEnter() @@ -43,31 +44,18 @@ public A30Trash1States(A30Trash1 module) : base(module) .ActivateOnEnter() .ActivateOnEnter() .ActivateOnEnter() - .Raw.Update = () => module.Serpents.All(e => e.IsDestroyed) && module.Tritons.All(e => e.IsDeadOrDestroyed) && module.DivineSprites.All(e => e.IsDeadOrDestroyed) && module.WaterSprites.All(e => e.IsDeadOrDestroyed); + .Raw.Update = () => module.Enemies(OID.Serpent).Count == 0 && module.Enemies(OID.Triton).All(e => e.IsDead) && module.Enemies(OID.DivineSprite).All(e => e.IsDead) && module.Enemies(OID.WaterSprite).All(e => e.IsDead); } } [ModuleInfo(BossModuleInfo.Maturity.Verified, Contributors = "Malediktus, LTS", PrimaryActorOID = (uint)OID.Serpent, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 962, NameID = 12478, SortOrder = 1)] -public class A30Trash1 : BossModule +public class A30Trash1(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(-800, -800), 20)) { - public readonly IReadOnlyList Serpents; // available from start - public readonly IReadOnlyList Tritons; // spawned after all serpents are dead - public readonly IReadOnlyList DivineSprites; // spawned after all serpents are dead - public readonly IReadOnlyList WaterSprites; // spawned after all serpents are dead - - public A30Trash1(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(-800, -800), 20)) - { - Serpents = Enemies(OID.Serpent); - Tritons = Enemies(OID.Triton); - DivineSprites = Enemies(OID.DivineSprite); - WaterSprites = Enemies(OID.WaterSprite); - } - protected override void DrawEnemies(int pcSlot, Actor pc) { - Arena.Actors(Serpents, ArenaColor.Enemy); - Arena.Actors(Tritons, ArenaColor.Enemy); - Arena.Actors(DivineSprites, ArenaColor.Enemy); - Arena.Actors(WaterSprites, ArenaColor.Enemy); + Arena.Actors(Enemies(OID.Serpent), ArenaColor.Enemy); + Arena.Actors(Enemies(OID.Triton), ArenaColor.Enemy); + Arena.Actors(Enemies(OID.DivineSprite), ArenaColor.Enemy); + Arena.Actors(Enemies(OID.WaterSprite), ArenaColor.Enemy); } } diff --git a/BossMod/Modules/Endwalker/Alliance/A30Trash/A30Trash2.cs b/BossMod/Modules/Endwalker/Alliance/A30Trash/A30Trash2.cs index 726b22fb3a..1818939aea 100644 --- a/BossMod/Modules/Endwalker/Alliance/A30Trash/A30Trash2.cs +++ b/BossMod/Modules/Endwalker/Alliance/A30Trash/A30Trash2.cs @@ -16,11 +16,11 @@ public enum AID : uint Skylight = 35446, // AngelosMikros->self, 3.0s cast, range 6 circle } -class RingOfSkylight() : Components.SelfTargetedAOEs(ActionID.MakeSpell(AID.RingOfSkylight), new AOEShapeDonut(8, 30)); -class RingOfSkylightInterruptHint() : Components.CastInterruptHint(ActionID.MakeSpell(AID.RingOfSkylight)); -class SkylightCross() : Components.SelfTargetedAOEs(ActionID.MakeSpell(AID.SkylightCross), new AOEShapeCross(60, 4)); -class SkylightCrossInterruptHint() : Components.CastInterruptHint(ActionID.MakeSpell(AID.SkylightCross)); -class Skylight() : Components.SelfTargetedAOEs(ActionID.MakeSpell(AID.Skylight), new AOEShapeCircle(6)); +class RingOfSkylight(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RingOfSkylight), new AOEShapeDonut(8, 30)); +class RingOfSkylightInterruptHint(BossModule module) : Components.CastInterruptHint(module, ActionID.MakeSpell(AID.RingOfSkylight)); +class SkylightCross(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.SkylightCross), new AOEShapeCross(60, 4)); +class SkylightCrossInterruptHint(BossModule module) : Components.CastInterruptHint(module, ActionID.MakeSpell(AID.SkylightCross)); +class Skylight(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Skylight), new AOEShapeCircle(6)); public class A30Trash2Pack1States : StateMachineBuilder { @@ -32,24 +32,17 @@ public A30Trash2Pack1States(A30Trash2Pack1 module) : base(module) .ActivateOnEnter() .ActivateOnEnter() .ActivateOnEnter() - .Raw.Update = () => module.PrimaryActor.IsDeadOrDestroyed && module.AngelosMikros.All(e => e.IsDeadOrDestroyed); + .Raw.Update = () => Module.PrimaryActor.IsDeadOrDestroyed && module.Enemies(OID.AngelosMikros).All(e => e.IsDead); } } [ModuleInfo(BossModuleInfo.Maturity.Verified, Contributors = "Malediktus", PrimaryActorOID = (uint)OID.AngelosPack1, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 962, NameID = 12481, SortOrder = 5)] -public class A30Trash2Pack1 : BossModule +public class A30Trash2Pack1(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsRect(new(800, 770), 15, 25)) { - public IReadOnlyList AngelosMikros; - - public A30Trash2Pack1(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsRect(new(800, 770), 15, 25)) - { - AngelosMikros = Enemies(OID.AngelosMikros); - } - protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); - Arena.Actors(AngelosMikros, ArenaColor.Enemy); + Arena.Actors(Enemies(OID.AngelosMikros), ArenaColor.Enemy); } } @@ -62,22 +55,15 @@ public A30Trash2Pack2States(A30Trash2Pack2 module) : base(module) .ActivateOnEnter() .ActivateOnEnter() .ActivateOnEnter() - .Raw.Update = () => module.Angelos.All(e => e.IsDeadOrDestroyed); + .Raw.Update = () => module.Enemies(OID.AngelosPack2).All(e => e.IsDead); } } [ModuleInfo(BossModuleInfo.Maturity.Verified, Contributors = "Malediktus", PrimaryActorOID = (uint)OID.AngelosPack2, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 962, NameID = 12481, SortOrder = 6)] -public class A30Trash2Pack2 : BossModule +public class A30Trash2Pack2(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsSquare(new(800, 910), 20)) { - public IReadOnlyList Angelos; - - public A30Trash2Pack2(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsSquare(new(800, 910), 20)) - { - Angelos = Enemies(OID.AngelosPack2); - } - protected override void DrawEnemies(int pcSlot, Actor pc) { - Arena.Actors(Angelos, ArenaColor.Enemy); + Arena.Actors(Enemies(OID.AngelosPack2), ArenaColor.Enemy); } } diff --git a/BossMod/Modules/Endwalker/Alliance/A31Thaliak/A31Thaliak.cs b/BossMod/Modules/Endwalker/Alliance/A31Thaliak/A31Thaliak.cs index eff686ffdc..b77f6c7ded 100644 --- a/BossMod/Modules/Endwalker/Alliance/A31Thaliak/A31Thaliak.cs +++ b/BossMod/Modules/Endwalker/Alliance/A31Thaliak/A31Thaliak.cs @@ -1,31 +1,26 @@ namespace BossMod.Endwalker.Alliance.A31Thaliak; -class Katarraktes : Components.RaidwideCast -{ - public Katarraktes() : base(ActionID.MakeSpell(AID.KatarraktesAOE), "Raidwide + Bleed") { } -} - -class Thlipsis : Components.StackWithCastTargets -{ - public Thlipsis() : base(ActionID.MakeSpell(AID.ThlipsisStack), 6) { } -} - -class Hydroptosis : Components.SpreadFromCastTargets -{ - public Hydroptosis() : base(ActionID.MakeSpell(AID.HydroptosisSpread), 6) { } -} +class Katarraktes(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.KatarraktesAOE), "Raidwide + Bleed"); +class Thlipsis(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.ThlipsisStack), 6); +class Hydroptosis(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.HydroptosisSpread), 6); -class Rhyton : Components.GenericBaitAway +class Rhyton(BossModule module) : Components.GenericBaitAway(module) { private static readonly AOEShapeRect _shape = new(70, 3); - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void AddGlobalHints(GlobalHints hints) + { + if (CurrentBaits.Count > 0) + hints.Add("Tankbuster cleave"); + } + + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.RhytonBuster) - CurrentBaits.Add(new(module.PrimaryActor, actor, _shape)); + CurrentBaits.Add(new(Module.PrimaryActor, actor, _shape)); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.RhytonHelper) { @@ -33,36 +28,12 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent CurrentBaits.Clear(); } } - - public override void AddGlobalHints(BossModule module, GlobalHints hints) - { - if (CurrentBaits.Count > 0) - hints.Add("Tankbuster cleave"); - } -} - -class LeftBank : Components.SelfTargetedAOEs -{ - public LeftBank() : base(ActionID.MakeSpell(AID.LeftBank), new AOEShapeCone(60, 90.Degrees())) { } } -class LeftBank2 : Components.SelfTargetedAOEs -{ - public LeftBank2() : base(ActionID.MakeSpell(AID.LeftBank2), new AOEShapeCone(60, 90.Degrees())) { } -} - -class RightBank : Components.SelfTargetedAOEs -{ - public RightBank() : base(ActionID.MakeSpell(AID.RightBank), new AOEShapeCone(60, 90.Degrees())) { } -} - -class RightBank2 : Components.SelfTargetedAOEs -{ - public RightBank2() : base(ActionID.MakeSpell(AID.RightBank2), new AOEShapeCone(60, 90.Degrees())) { } -} +class LeftBank(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.LeftBank), new AOEShapeCone(60, 90.Degrees())); +class LeftBank2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.LeftBank2), new AOEShapeCone(60, 90.Degrees())); +class RightBank(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RightBank), new AOEShapeCone(60, 90.Degrees())); +class RightBank2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RightBank2), new AOEShapeCone(60, 90.Degrees())); [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus, LTS", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 962, NameID = 11298, SortOrder = 2)] -public class A31Thaliak : BossModule -{ - public A31Thaliak(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsSquare(new(-945, 945), 24)) { } -} +public class A31Thaliak(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsSquare(new(-945, 945), 24)); diff --git a/BossMod/Modules/Endwalker/Alliance/A31Thaliak/ThaliakHieroglyphika.cs b/BossMod/Modules/Endwalker/Alliance/A31Thaliak/ThaliakHieroglyphika.cs index 653ec289a7..cb945fe0f6 100644 --- a/BossMod/Modules/Endwalker/Alliance/A31Thaliak/ThaliakHieroglyphika.cs +++ b/BossMod/Modules/Endwalker/Alliance/A31Thaliak/ThaliakHieroglyphika.cs @@ -1,6 +1,6 @@ namespace BossMod.Endwalker.Alliance.A31Thaliak; -class Hieroglyphika : Components.GenericAOEs +class Hieroglyphika(BossModule module) : Components.GenericAOEs(module) { private static readonly AOEShapeRect rect = new(6, 6, 6); private readonly List _aoes = []; @@ -8,7 +8,7 @@ class Hieroglyphika : Components.GenericAOEs private static readonly WPos[] StartingCoords = [new(-963, 939), new(-963, 963), new(-939, 927), new(-951, 939), new(-951, 927), new(-939, 963), new(-927, 939), new(-939, 951), new(-939, 939), new(-927, 963), new(-963, 951), new(-927, 951), new(-951, 951), new(-963, 927)]; private byte currentIndex; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => _aoes.Take(14); + public override IEnumerable ActiveAOEs(int slot, Actor actor) => _aoes.Take(14); private static WPos RotateAroundOrigin(float rotatebydegrees, WPos origin, WPos caster) //TODO: consider moving to utils for future use { @@ -17,7 +17,7 @@ class Hieroglyphika : Components.GenericAOEs return new WPos(origin.X + x, origin.Z + z); } - public override void OnEventEnvControl(BossModule module, byte index, uint state) + public override void OnEventEnvControl(byte index, uint state) { if (state == 0x00020001) { @@ -28,10 +28,10 @@ public override void OnEventEnvControl(BossModule module, byte index, uint state } } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { - var _activation = module.WorldState.CurrentTime.AddSeconds(17); - var origin = module.Bounds.Center; + var _activation = WorldState.FutureTime(17); + var origin = Module.Bounds.Center; if (iconID == (uint)IconID.ClockwiseHieroglyphika) { if (currentIndex == 0x17) @@ -52,7 +52,7 @@ public override void OnEventIcon(BossModule module, Actor actor, uint iconID) } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if (_aoes.Count > 0 && (AID)spell.Action.ID is AID.HieroglyphikaRect) _aoes.Clear(); diff --git a/BossMod/Modules/Endwalker/Alliance/A31Thaliak/ThaliakRheognosis.cs b/BossMod/Modules/Endwalker/Alliance/A31Thaliak/ThaliakRheognosis.cs index 2c9be3e9d8..028adadc06 100644 --- a/BossMod/Modules/Endwalker/Alliance/A31Thaliak/ThaliakRheognosis.cs +++ b/BossMod/Modules/Endwalker/Alliance/A31Thaliak/ThaliakRheognosis.cs @@ -1,39 +1,34 @@ namespace BossMod.Endwalker.Alliance.A31Thaliak; -class Rheognosis : Components.RaidwideCast -{ - public Rheognosis() : base(ActionID.MakeSpell(AID.RheognosisKnockback), "Raidwide + Knockback") { } -} +class Rheognosis(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.RheognosisKnockback), "Raidwide + Knockback"); -class RheognosisKnockback : Components.Knockback +class RheognosisKnockback(BossModule module) : Components.Knockback(module) { private Source? _knockback; - public override IEnumerable Sources(BossModule module, int slot, Actor actor) => Utils.ZeroOrOne(_knockback); + public override IEnumerable Sources(int slot, Actor actor) => Utils.ZeroOrOne(_knockback); - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.Rheognosis or AID.RheognosisPetrine) - _knockback = new(module.Bounds.Center, 25, module.WorldState.CurrentTime.AddSeconds(20.2f), Direction: spell.Rotation + 180.Degrees(), Kind: Kind.DirForward); + _knockback = new(Module.Bounds.Center, 25, WorldState.FutureTime(20.2f), Direction: spell.Rotation + 180.Degrees(), Kind: Kind.DirForward); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.RheognosisKnockback) _knockback = null; } } -public class RheognosisCrash : Components.Exaflare +public class RheognosisCrash(BossModule module) : Components.Exaflare(module, new AOEShapeRect(24.01f, 12)) //actually the rect is only 24, but there seem to be a few thousandth of variation in the location { private static readonly Angle _rot1 = 90.Degrees(); private static readonly Angle _rot2 = -90.Degrees(); - public RheognosisCrash() : base(new AOEShapeRect(24.01f, 12)) { } //actually the rect is only 24, but there seem to be a few thousandth of variation in the location - - public override void OnEventEnvControl(BossModule module, byte index, uint state) + public override void OnEventEnvControl(byte index, uint state) { - var _activation = module.WorldState.CurrentTime.AddSeconds(0.15f); + var _activation = WorldState.FutureTime(0.15f); if (state == 0x01000001) { if (index == 0x00) @@ -50,13 +45,13 @@ public override void OnEventEnvControl(BossModule module, byte index, uint state } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if (Lines.Count > 0 && (AID)spell.Action.ID == AID.RheognosisCrashExaflare) { ++NumCasts; int index = Lines.FindIndex(item => item.Next.AlmostEqual(caster.Position, 1)); - AdvanceLine(module, Lines[index], caster.Position); + AdvanceLine(Lines[index], caster.Position); if (Lines[index].ExplosionsLeft == 0) Lines.RemoveAt(index); } diff --git a/BossMod/Modules/Endwalker/Alliance/A31Thaliak/ThaliakTetraktys.cs b/BossMod/Modules/Endwalker/Alliance/A31Thaliak/ThaliakTetraktys.cs index 2640b3fc41..19443f959f 100644 --- a/BossMod/Modules/Endwalker/Alliance/A31Thaliak/ThaliakTetraktys.cs +++ b/BossMod/Modules/Endwalker/Alliance/A31Thaliak/ThaliakTetraktys.cs @@ -1,17 +1,17 @@ namespace BossMod.Endwalker.Alliance.A31Thaliak; -class Tetraktys : BossComponent +class Tetraktys(BossModule module) : BossComponent(module) { - public override void OnEventEnvControl(BossModule module, byte index, uint state) + public override void OnEventEnvControl(byte index, uint state) { if (state == 0x00080004 && index == 0x04) // 02, 03, 04 always activate at the same time - module.Arena.Bounds = new ArenaBoundsSquare(new(-945, 945), 24); + Module.Arena.Bounds = new ArenaBoundsSquare(new(-945, 945), 24); if (state == 0x00200010 && index == 0x04) // 02, 03, 04 always deactivate at the same time - module.Arena.Bounds = new ArenaBoundsTri(new(-945, 948.5f), 41); + Module.Arena.Bounds = new ArenaBoundsTri(new(-945, 948.5f), 41); } } -class TetraTriangles : Components.GenericAOEs +class TetraTriangles(BossModule module) : Components.GenericAOEs(module) { private readonly List _aoes = []; private static readonly AOEShapeTriangle tri = new(16); @@ -28,17 +28,17 @@ class TetraTriangles : Components.GenericAOEs private static readonly Angle _rot9 = 60.Degrees(); private bool TutorialDone; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { foreach (var c in _aoes) if (_aoes.Count > 0) yield return new(c.Shape, c.Origin, c.Rotation, c.Activation); } - public override void OnEventEnvControl(BossModule module, byte index, uint state) + public override void OnEventEnvControl(byte index, uint state) { - var _activation = module.WorldState.CurrentTime.AddSeconds(3.8f); - var _activation2 = module.WorldState.CurrentTime.AddSeconds(7.9f); + var _activation = WorldState.FutureTime(3.8f); + var _activation2 = WorldState.FutureTime(7.9f); if (state == 0x00020001) { if (index == 0x07) //07, 0A, 0D always activate together @@ -119,7 +119,7 @@ public override void OnEventEnvControl(BossModule module, byte index, uint state } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if (_aoes.Count > 0 && (AID)spell.Action.ID is AID.TetraBlueTriangles or AID.TetraGreenTriangles or AID.TetraktuosKosmosTri or AID.TetraktuosKosmosRect) _aoes.RemoveAt(0); diff --git a/BossMod/Modules/Endwalker/Alliance/A32Llymlaen/A32Llymlaen.cs b/BossMod/Modules/Endwalker/Alliance/A32Llymlaen/A32Llymlaen.cs index 6345b763b5..2df5878c05 100644 --- a/BossMod/Modules/Endwalker/Alliance/A32Llymlaen/A32Llymlaen.cs +++ b/BossMod/Modules/Endwalker/Alliance/A32Llymlaen/A32Llymlaen.cs @@ -1,72 +1,18 @@ namespace BossMod.Endwalker.Alliance.A32Llymlaen; -class Godsbane : Components.RaidwideCast -{ - public Godsbane() : base(ActionID.MakeSpell(AID.Godsbane), "Raidwide + DoT") { } -} - -class Tempest : Components.RaidwideCast -{ - public Tempest() : base(ActionID.MakeSpell(AID.Tempest)) { } -} - -class RightStrait : Components.SelfTargetedAOEs -{ - public RightStrait() : base(ActionID.MakeSpell(AID.RightStraitCone), new AOEShapeCone(60, 90.Degrees())) { } -} - -class LeftStrait : Components.SelfTargetedAOEs -{ - public LeftStrait() : base(ActionID.MakeSpell(AID.LeftStraitCone), new AOEShapeCone(60, 90.Degrees())) { } -} - -class Stormwhorl : Components.LocationTargetedAOEs -{ - public Stormwhorl() : base(ActionID.MakeSpell(AID.Stormwhorl), 6) { } -} - -class Maelstrom : Components.LocationTargetedAOEs -{ - public Maelstrom() : base(ActionID.MakeSpell(AID.Maelstrom), 6) { } -} - -class WindRose : Components.SelfTargetedAOEs -{ - public WindRose() : base(ActionID.MakeSpell(AID.WindRose), new AOEShapeCircle(12)) { } -} - -class SeafoamSpiral : Components.SelfTargetedAOEs -{ - public SeafoamSpiral() : base(ActionID.MakeSpell(AID.SeafoamSpiral), new AOEShapeDonut(6, 70)) { } -} - -class DeepDive1 : Components.StackWithCastTargets -{ - public DeepDive1() : base(ActionID.MakeSpell(AID.DeepDiveStack1), 6) { } -} - -class DeepDive2 : Components.StackWithCastTargets -{ - public DeepDive2() : base(ActionID.MakeSpell(AID.DeepDiveStack2), 6) { } -} - -class HardWater1 : Components.StackWithCastTargets -{ - public HardWater1() : base(ActionID.MakeSpell(AID.HardWaterStack1), 6) { } -} - -class HardWater2 : Components.StackWithCastTargets -{ - public HardWater2() : base(ActionID.MakeSpell(AID.HardWaterStack2), 6) { } -} - -class Stormwinds : Components.SpreadFromCastTargets -{ - public Stormwinds() : base(ActionID.MakeSpell(AID.StormwindsSpread), 6) { } -} +class Godsbane(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.Godsbane), "Raidwide + DoT"); +class Tempest(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.Tempest)); +class RightStrait(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RightStraitCone), new AOEShapeCone(60, 90.Degrees())); +class LeftStrait(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.LeftStraitCone), new AOEShapeCone(60, 90.Degrees())); +class Stormwhorl(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Stormwhorl), 6); +class Maelstrom(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Maelstrom), 6); +class WindRose(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.WindRose), new AOEShapeCircle(12)); +class SeafoamSpiral(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.SeafoamSpiral), new AOEShapeDonut(6, 70)); +class DeepDive1(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.DeepDiveStack1), 6); +class DeepDive2(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.DeepDiveStack2), 6); +class HardWater1(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.HardWaterStack1), 6); +class HardWater2(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.HardWaterStack2), 6); +class Stormwinds(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.StormwindsSpread), 6); [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus, LTS", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 962, NameID = 11299, SortOrder = 3)] -public class A32Llymlaen : BossModule -{ - public A32Llymlaen(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsRect(new(0, -900), 19, 29)) { } -} +public class A32Llymlaen(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsRect(new(0, -900), 19, 29)); diff --git a/BossMod/Modules/Endwalker/Alliance/A32Llymlaen/LlymlaenDireStraits.cs b/BossMod/Modules/Endwalker/Alliance/A32Llymlaen/LlymlaenDireStraits.cs index eadc84d2c0..429a94ea9d 100644 --- a/BossMod/Modules/Endwalker/Alliance/A32Llymlaen/LlymlaenDireStraits.cs +++ b/BossMod/Modules/Endwalker/Alliance/A32Llymlaen/LlymlaenDireStraits.cs @@ -1,31 +1,31 @@ namespace BossMod.Endwalker.Alliance.A32Llymlaen; -class DireStraits : Components.GenericAOEs +class DireStraits(BossModule module) : Components.GenericAOEs(module) { private static readonly AOEShapeRect rect = new(80, 40); private readonly List _aoes = []; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_aoes.Count == 2) { yield return new(_aoes[0].Shape, _aoes[0].Origin, _aoes[0].Rotation, _aoes[0].Activation, ArenaColor.Danger); - yield return new(_aoes[1].Shape, _aoes[1].Origin, _aoes[1].Rotation, _aoes[1].Activation, risky: false); + yield return new(_aoes[1].Shape, _aoes[1].Origin, _aoes[1].Rotation, _aoes[1].Activation, Risky: false); } if (_aoes.Count == 1) yield return new(_aoes[0].Shape, _aoes[0].Origin, _aoes[0].Rotation, _aoes[0].Activation, ArenaColor.Danger); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.DireStraitTelegraph1) { - _aoes.Add(new(rect, module.Bounds.Center, spell.Rotation, spell.NPCFinishAt.AddSeconds(5))); - _aoes.Add(new(rect, module.Bounds.Center, spell.Rotation + 180.Degrees(), spell.NPCFinishAt.AddSeconds(6.7f))); + _aoes.Add(new(rect, Module.Bounds.Center, spell.Rotation, spell.NPCFinishAt.AddSeconds(5))); + _aoes.Add(new(rect, Module.Bounds.Center, spell.Rotation + 180.Degrees(), spell.NPCFinishAt.AddSeconds(6.7f))); } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if (_aoes.Count > 0 && (AID)spell.Action.ID is AID.DireStraitsRectAOE1 or AID.DireStraitsRectAOE2) _aoes.RemoveAt(0); diff --git a/BossMod/Modules/Endwalker/Alliance/A32Llymlaen/LlymlaenFrothingSea.cs b/BossMod/Modules/Endwalker/Alliance/A32Llymlaen/LlymlaenFrothingSea.cs index cf73aa182f..56f06a566f 100644 --- a/BossMod/Modules/Endwalker/Alliance/A32Llymlaen/LlymlaenFrothingSea.cs +++ b/BossMod/Modules/Endwalker/Alliance/A32Llymlaen/LlymlaenFrothingSea.cs @@ -1,27 +1,25 @@ namespace BossMod.Endwalker.Alliance.A32Llymlaen; -public class FrothingSea : Components.Exaflare +public class FrothingSea(BossModule module) : Components.Exaflare(module, new AOEShapeRect(6, 20, 80)) { private static readonly Angle _rot1 = 90.Degrees(); private static readonly Angle _rot2 = -90.Degrees(); - public FrothingSea() : base(new AOEShapeRect(6, 20, 80)) { } - - public override void OnEventEnvControl(BossModule module, byte index, uint state) + public override void OnEventEnvControl(byte index, uint state) { - var _activation = module.WorldState.CurrentTime.AddSeconds(0.15f); + var _activation = WorldState.FutureTime(0.15f); if (state == 0x00800040 && index == 0x49) Lines.Add(new() { Next = new(-80, -900), Advance = 2.2f * _rot1.ToDirection(), NextExplosion = _activation, TimeToMove = 0.9f, ExplosionsLeft = 13, MaxShownExplosions = 2, Rotation = _rot1 }); if (state == 0x08000400 && index == 0x49) Lines.Add(new() { Next = new(80, -900), Advance = 2.2f * _rot2.ToDirection(), NextExplosion = _activation, TimeToMove = 0.9f, ExplosionsLeft = 13, MaxShownExplosions = 2, Rotation = _rot2 }); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if (Lines.Count > 0 && (AID)spell.Action.ID == AID.FrothingSeaRectAOE) { ++NumCasts; - AdvanceLine(module, Lines[0], Lines[0].Next + 2.2f * Lines[0].Rotation.ToDirection()); + AdvanceLine(Lines[0], Lines[0].Next + 2.2f * Lines[0].Rotation.ToDirection()); if (Lines[0].ExplosionsLeft == 0) Lines.RemoveAt(0); } diff --git a/BossMod/Modules/Endwalker/Alliance/A32Llymlaen/LlymlaenNavigatorsTrident.cs b/BossMod/Modules/Endwalker/Alliance/A32Llymlaen/LlymlaenNavigatorsTrident.cs index efb78208db..20eec2b56d 100644 --- a/BossMod/Modules/Endwalker/Alliance/A32Llymlaen/LlymlaenNavigatorsTrident.cs +++ b/BossMod/Modules/Endwalker/Alliance/A32Llymlaen/LlymlaenNavigatorsTrident.cs @@ -1,23 +1,20 @@ namespace BossMod.Endwalker.Alliance.A32Llymlaen; -class NavigatorsTridentRaidwide : Components.RaidwideCast -{ - public NavigatorsTridentRaidwide() : base(ActionID.MakeSpell(AID.NavigatorsTridentRectAOE)) { } -} +class NavigatorsTridentRaidwide(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.NavigatorsTridentRectAOE)); -class NavigatorsTridentRectAOE : Components.GenericAOEs +class NavigatorsTridentRectAOE(BossModule module) : Components.GenericAOEs(module) { private AOEInstance? _aoe; private static readonly AOEShapeRect _shape = new(20, 5, 20); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => Utils.ZeroOrOne(_aoe); + public override IEnumerable ActiveAOEs(int slot, Actor actor) => Utils.ZeroOrOne(_aoe); - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.NavigatorsTridentRectAOE) _aoe = new(_shape, caster.Position, spell.Rotation, spell.NPCFinishAt); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.NavigatorsTridentRectAOE) { @@ -27,25 +24,25 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn } } -class NavigatorsTridentKnockback : Components.Knockback +class NavigatorsTridentKnockback(BossModule module) : Components.Knockback(module) { private readonly List _sources = []; private static readonly AOEShapeCone _shape = new(30, 90.Degrees()); - public override IEnumerable Sources(BossModule module, int slot, Actor actor) => _sources; + public override IEnumerable Sources(int slot, Actor actor) => _sources; - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.NavigatorsTridentRectAOE) { _sources.Clear(); // knockback rect always happens through center, so create two sources with origin at center looking orthogonally - _sources.Add(new(module.Bounds.Center, 20, spell.NPCFinishAt, _shape, spell.Rotation + 90.Degrees(), Kind.DirForward)); - _sources.Add(new(module.Bounds.Center, 20, spell.NPCFinishAt, _shape, spell.Rotation - 90.Degrees(), Kind.DirForward)); + _sources.Add(new(Module.Bounds.Center, 20, spell.NPCFinishAt, _shape, spell.Rotation + 90.Degrees(), Kind.DirForward)); + _sources.Add(new(Module.Bounds.Center, 20, spell.NPCFinishAt, _shape, spell.Rotation - 90.Degrees(), Kind.DirForward)); } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.NavigatorsTridentRectAOE) { @@ -54,5 +51,5 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn } } - public override bool DestinationUnsafe(BossModule module, int slot, Actor actor, WPos pos) => module.FindComponent()?.ActiveAOEs(module, slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false || !module.Bounds.Contains(pos); + public override bool DestinationUnsafe(int slot, Actor actor, WPos pos) => Module.FindComponent()?.ActiveAOEs(slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false || !Module.Bounds.Contains(pos); } diff --git a/BossMod/Modules/Endwalker/Alliance/A32Llymlaen/LlymlaenSerpentsTide.cs b/BossMod/Modules/Endwalker/Alliance/A32Llymlaen/LlymlaenSerpentsTide.cs index 18bf5dc63b..ae8a415861 100644 --- a/BossMod/Modules/Endwalker/Alliance/A32Llymlaen/LlymlaenSerpentsTide.cs +++ b/BossMod/Modules/Endwalker/Alliance/A32Llymlaen/LlymlaenSerpentsTide.cs @@ -1,19 +1,19 @@ namespace BossMod.Endwalker.Alliance.A32Llymlaen; -class SerpentsTide : Components.GenericAOEs +class SerpentsTide(BossModule module) : Components.GenericAOEs(module) { private static readonly AOEShapeRect rect = new(80, 10); private readonly List _aoes = []; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => _aoes.Take(2); + public override IEnumerable ActiveAOEs(int slot, Actor actor) => _aoes.Take(2); - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.SerpentsTideVisual) _aoes.Add(new(rect, caster.Position, spell.Rotation, spell.NPCFinishAt.AddSeconds(0.15f))); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if (_aoes.Count > 0 && (AID)spell.Action.ID is AID.SerpentsTideRectAOE1 or AID.SerpentsTideRectAOE2 or AID.SerpentsTideRectAOE3 or AID.SerpentsTideRectAOE4) _aoes.RemoveAt(0); diff --git a/BossMod/Modules/Endwalker/Alliance/A32Llymlaen/LlymlaenSurgingWave.cs b/BossMod/Modules/Endwalker/Alliance/A32Llymlaen/LlymlaenSurgingWave.cs index a3f34bc1ca..a00b650915 100644 --- a/BossMod/Modules/Endwalker/Alliance/A32Llymlaen/LlymlaenSurgingWave.cs +++ b/BossMod/Modules/Endwalker/Alliance/A32Llymlaen/LlymlaenSurgingWave.cs @@ -1,70 +1,69 @@ namespace BossMod.Endwalker.Alliance.A32Llymlaen; -class SurgingWavesArenaChange : BossComponent +class SurgingWavesArenaChange(BossModule module) : BossComponent(module) { - public enum Arena { Normal, ExtendWest, ExtendEast } - public Arena Shape { get; private set; } + public enum ArenaShape { Normal, ExtendWest, ExtendEast } + public ArenaShape Shape { get; private set; } private bool Shockwave; - public override void OnEventEnvControl(BossModule module, byte index, uint state) + public override void OnEventEnvControl(byte index, uint state) { if (state is 0x00200001 or 0x02000001 && index == 0x49) { - module.Arena.Bounds = new ArenaBoundsRect(new(0, -900), 19, 29); - Shape = Arena.Normal; + Module.Arena.Bounds = new ArenaBoundsRect(new(0, -900), 19, 29); + Shape = ArenaShape.Normal; } if (state == 0x00800040 && index == 0x49) - Shape = Arena.ExtendWest; + Shape = ArenaShape.ExtendWest; if (state == 0x08000400 && index == 0x49) - Shape = Arena.ExtendEast; + Shape = ArenaShape.ExtendEast; } - public override void Update(BossModule module) + public override void Update() { - - if (Shockwave && Shape == Arena.Normal) + if (Shockwave && Shape == ArenaShape.Normal) Shockwave = false; - if (Shockwave && Shape == Arena.ExtendWest) - module.Arena.Bounds = new ArenaBoundsRect(new(-40, -900), 40, 10); - if (Shockwave && Shape == Arena.ExtendEast) - module.Arena.Bounds = new ArenaBoundsRect(new(40, -900), 40, 10); + if (Shockwave && Shape == ArenaShape.ExtendWest) + Module.Arena.Bounds = new ArenaBoundsRect(new(-40, -900), 40, 10); + if (Shockwave && Shape == ArenaShape.ExtendEast) + Module.Arena.Bounds = new ArenaBoundsRect(new(40, -900), 40, 10); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.Shockwave) Shockwave = true; } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - var c = Shape == Arena.ExtendWest ? 1 : -1; - if (Shape != Arena.Normal) + var c = Shape == ArenaShape.ExtendWest ? 1 : -1; + if (Shape != ArenaShape.Normal) { - arena.PathLineTo(new(c * -19, -890)); - arena.PathLineTo(new(c * -19, -871)); - arena.PathLineTo(new(c * 19, -871)); - arena.PathLineTo(new(c * 19, -929)); - arena.PathLineTo(new(c * -19, -929)); - arena.PathLineTo(new(c * -19, -910)); - arena.PathStroke(false, ArenaColor.Border, 2); - if (module.FindComponent()!.Sources(module, pcSlot, pc).Any()) - arena.ZoneCone(new(-6 * c, -900), 0, 6, c * -90.Degrees(), 22.5f.Degrees(), ArenaColor.SafeFromAOE); + Arena.PathLineTo(new(c * -19, -890)); + Arena.PathLineTo(new(c * -19, -871)); + Arena.PathLineTo(new(c * 19, -871)); + Arena.PathLineTo(new(c * 19, -929)); + Arena.PathLineTo(new(c * -19, -929)); + Arena.PathLineTo(new(c * -19, -910)); + Arena.PathStroke(false, ArenaColor.Border, 2); + if (Module.FindComponent()!.Sources(pcSlot, pc).Any()) + Arena.ZoneCone(new(-6 * c, -900), 0, 6, c * -90.Degrees(), 22.5f.Degrees(), ArenaColor.SafeFromAOE); } } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { - var c = Shape == Arena.ExtendWest ? -1 : 1; - base.AddAIHints(module, slot, actor, assignment, hints); - if (module.FindComponent()!.Sources(module, slot, actor).Any()) + var c = Shape == ArenaShape.ExtendWest ? -1 : 1; + base.AddAIHints(slot, actor, assignment, hints); + if (Module.FindComponent()!.Sources(slot, actor).Any()) hints.AddForbiddenZone(ShapeDistance.InvertedCone(new(4 * c, -900), 6, c * 90.Degrees(), 22.5f.Degrees())); //for some reason I need to use different coords and angle for this than when drawing the ZoneCone, otherwise it wont appear in the correct spot? } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { - var c = Shape == Arena.ExtendWest ? -1 : 1; - if (module.FindComponent()!.Sources(module, slot, actor).Any()) + var c = Shape == ArenaShape.ExtendWest ? -1 : 1; + if (Module.FindComponent()!.Sources(slot, actor).Any()) { if (!actor.Position.InCircleCone(new(4 * c, -900), 6, c * 90.Degrees(), 22.5f.Degrees())) //for some reason I need to use different coords and angle for this than when drawing the ZoneCone, otherwise it wont appear in the correct spot? hints.Add("Wait in cone for knockback!"); @@ -74,22 +73,7 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } } -class SeaFoam : Components.PersistentVoidzone -{ - public SeaFoam() : base(1.5f, m => m.Enemies(OID.SeaFoam).Where(x => !x.IsDead)) { } -} - -class SurgingWave : Components.SelfTargetedAOEs -{ - public SurgingWave() : base(ActionID.MakeSpell(AID.SurgingWaveAOE), new AOEShapeCircle(6)) { } -} - -class Shockwave : Components.KnockbackFromCastTarget -{ - public Shockwave() : base(ActionID.MakeSpell(AID.Shockwave), 68, true, kind: Kind.AwayFromOrigin) { } -} - -class ShockwaveRaidwide : Components.RaidwideCast -{ - public ShockwaveRaidwide() : base(ActionID.MakeSpell(AID.Shockwave)) { } -} +class SeaFoam(BossModule module) : Components.PersistentVoidzone(module, 1.5f, m => m.Enemies(OID.SeaFoam).Where(x => !x.IsDead)); +class SurgingWave(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.SurgingWaveAOE), new AOEShapeCircle(6)); +class Shockwave(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.Shockwave), 68, true, kind: Kind.AwayFromOrigin); +class ShockwaveRaidwide(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.Shockwave)); diff --git a/BossMod/Modules/Endwalker/Alliance/A32Llymlaen/LlymlaenToTheLast.cs b/BossMod/Modules/Endwalker/Alliance/A32Llymlaen/LlymlaenToTheLast.cs index ec55dff508..9e97030c8e 100644 --- a/BossMod/Modules/Endwalker/Alliance/A32Llymlaen/LlymlaenToTheLast.cs +++ b/BossMod/Modules/Endwalker/Alliance/A32Llymlaen/LlymlaenToTheLast.cs @@ -1,25 +1,25 @@ namespace BossMod.Endwalker.Alliance.A32Llymlaen; -class ToTheLast : Components.GenericAOEs +class ToTheLast(BossModule module) : Components.GenericAOEs(module) { private static readonly AOEShapeRect rect = new(80, 5); private readonly List _aoes = []; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_aoes.Count > 0) yield return new(_aoes[0].Shape, _aoes[0].Origin, _aoes[0].Rotation, _aoes[0].Activation, ArenaColor.Danger); if (_aoes.Count > 1) - yield return new(_aoes[1].Shape, _aoes[1].Origin, _aoes[1].Rotation, _aoes[1].Activation, risky: false); + yield return new(_aoes[1].Shape, _aoes[1].Origin, _aoes[1].Rotation, _aoes[1].Activation, Risky: false); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.ToTheLastTelegraph) _aoes.Add(new(rect, caster.Position, spell.Rotation, spell.NPCFinishAt.AddSeconds(5 + 1.9f + _aoes.Count))); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if (_aoes.Count > 0 && (AID)spell.Action.ID == AID.ToTheLastAOE) _aoes.RemoveAt(0); diff --git a/BossMod/Modules/Endwalker/Alliance/A32Llymlaen/LlymlaenTridents.cs b/BossMod/Modules/Endwalker/Alliance/A32Llymlaen/LlymlaenTridents.cs index 1dee6ecd1a..feeae0f95b 100644 --- a/BossMod/Modules/Endwalker/Alliance/A32Llymlaen/LlymlaenTridents.cs +++ b/BossMod/Modules/Endwalker/Alliance/A32Llymlaen/LlymlaenTridents.cs @@ -1,15 +1,12 @@ namespace BossMod.Endwalker.Alliance.A32Llymlaen; -class TorrentialTridents : Components.RaidwideCastDelay -{ - public TorrentialTridents() : base(ActionID.MakeSpell(AID.TorrentialTridents), ActionID.MakeSpell(AID.Landing), 2.7f, "Raidwide x6") { } -} +class TorrentialTridents(BossModule module) : Components.RaidwideCastDelay(module, ActionID.MakeSpell(AID.TorrentialTridents), ActionID.MakeSpell(AID.Landing), 2.7f, "Raidwide x6"); -class Tridents : Components.GenericAOEs +class Tridents(BossModule module) : Components.GenericAOEs(module) { private readonly List _aoes = []; private static readonly AOEShapeCircle _shape = new(18); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_aoes.Count > 0) yield return new(_aoes[0].Shape, _aoes[0].Origin, _aoes[0].Rotation, _aoes[0].Activation, ArenaColor.Danger); @@ -18,13 +15,13 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, yield return new(_aoes[i].Shape, _aoes[i].Origin, _aoes[i].Rotation, _aoes[i].Activation); } - public override void OnActorCreated(BossModule module, Actor actor) + public override void OnActorCreated(Actor actor) { if ((OID)actor.OID == OID.Trident) - _aoes.Add(new(_shape, actor.Position, activation: module.WorldState.CurrentTime.AddSeconds(13.8f))); + _aoes.Add(new(_shape, actor.Position, default, WorldState.FutureTime(13.8f))); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.LandingCircle && _aoes.Count > 0) _aoes.RemoveAt(0); diff --git a/BossMod/Modules/Endwalker/Alliance/A33Oschon/A33Oschon.cs b/BossMod/Modules/Endwalker/Alliance/A33Oschon/A33Oschon.cs index 5972e5083c..cd9764ca9d 100644 --- a/BossMod/Modules/Endwalker/Alliance/A33Oschon/A33Oschon.cs +++ b/BossMod/Modules/Endwalker/Alliance/A33Oschon/A33Oschon.cs @@ -1,84 +1,38 @@ namespace BossMod.Endwalker.Alliance.A33Oschon; -class DownhillP1 : Components.LocationTargetedAOEs -{ - public DownhillP1() : base(ActionID.MakeSpell(AID.Downhill), 6) { } -} - -class SoaringMinuet1 : Components.SelfTargetedAOEs -{ - public SoaringMinuet1() : base(ActionID.MakeSpell(AID.SoaringMinuet1), new AOEShapeCone(65, 135.Degrees())) { } -} - -class SoaringMinuet2 : Components.SelfTargetedAOEs -{ - public SoaringMinuet2() : base(ActionID.MakeSpell(AID.SoaringMinuet2), new AOEShapeCone(65, 135.Degrees())) { } -} - -class SuddenDownpour : Components.RaidwideCast -{ - public SuddenDownpour() : base(ActionID.MakeSpell(AID.SuddenDownpour2)) { } -} - -class LoftyPeaks : Components.RaidwideCast -{ - public LoftyPeaks() : base(ActionID.MakeSpell(AID.LoftyPeaks), "Raidwide x5 coming") { } -} - -class TrekShot : Components.SelfTargetedAOEs -{ - public TrekShot() : base(ActionID.MakeSpell(AID.TrekShot), new AOEShapeCone(65, 60.Degrees())) { } -} +class DownhillP1(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Downhill), 6); +class SoaringMinuet1(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.SoaringMinuet1), new AOEShapeCone(65, 135.Degrees())); +class SoaringMinuet2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.SoaringMinuet2), new AOEShapeCone(65, 135.Degrees())); +class SuddenDownpour(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.SuddenDownpour2)); +class LoftyPeaks(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.LoftyPeaks), "Raidwide x5 coming"); +class TrekShot(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TrekShot), new AOEShapeCone(65, 60.Degrees())); +class TrekShot2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TrekShot2), new AOEShapeCone(65, 60.Degrees())); -class TrekShot2 : Components.SelfTargetedAOEs +class TheArrow(BossModule module) : Components.BaitAwayCast(module, ActionID.MakeSpell(AID.TheArrow), new AOEShapeCircle(6), true) { - public TrekShot2() : base(ActionID.MakeSpell(AID.TrekShot2), new AOEShapeCone(65, 60.Degrees())) { } -} - -class TheArrow : Components.BaitAwayCast -{ - public TheArrow() : base(ActionID.MakeSpell(AID.TheArrow), new AOEShapeCircle(6), true) { } - - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (CurrentBaits.Count > 0) hints.Add("Tankbuster cleave"); } } -class TheArrowP2 : Components.BaitAwayCast +class TheArrowP2(BossModule module) : Components.BaitAwayCast(module, ActionID.MakeSpell(AID.TheArrowP2), new AOEShapeCircle(10), true) { - public TheArrowP2() : base(ActionID.MakeSpell(AID.TheArrowP2), new AOEShapeCircle(10), true) { } - - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (CurrentBaits.Count > 0) hints.Add("Tankbuster cleave"); } } -class PitonPull : Components.LocationTargetedAOEs -{ - public PitonPull() : base(ActionID.MakeSpell(AID.PitonPull), 22) { } -} - -class Altitude : Components.LocationTargetedAOEs -{ - public Altitude() : base(ActionID.MakeSpell(AID.Altitude), 6) { } -} - -class DownhillSmall : Components.LocationTargetedAOEs -{ - public DownhillSmall() : base(ActionID.MakeSpell(AID.DownhillSmall), 6) { } -} - -class DownhillBig : Components.LocationTargetedAOEs -{ - public DownhillBig() : base(ActionID.MakeSpell(AID.DownhillBig), 8) { } -} +class PitonPull(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.PitonPull), 22); +class Altitude(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Altitude), 6); +class DownhillSmall(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.DownhillSmall), 6); +class DownhillBig(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.DownhillBig), 8); [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus, LTS", PrimaryActorOID = (uint)OID.OschonP1, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 962, NameID = 11300, SortOrder = 4)] -public class A33Oschon : BossModule +public class A33Oschon(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsSquare(new(0, 750), 25)) { private Actor? _oschonP1; private Actor? _oschonP2; @@ -86,8 +40,6 @@ public class A33Oschon : BossModule public Actor? OschonP1() => PrimaryActor; public Actor? OschonP2() => _oschonP2; - public A33Oschon(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsSquare(new(0, 750), 25)) { } - protected override void UpdateModule() { // TODO: this is an ugly hack, think how multi-actor fights can be implemented without it... diff --git a/BossMod/Modules/Endwalker/Alliance/A33Oschon/A33OschonStates.cs b/BossMod/Modules/Endwalker/Alliance/A33Oschon/A33OschonStates.cs index 63451cef51..3fb28ff77e 100644 --- a/BossMod/Modules/Endwalker/Alliance/A33Oschon/A33OschonStates.cs +++ b/BossMod/Modules/Endwalker/Alliance/A33Oschon/A33OschonStates.cs @@ -1,11 +1,11 @@ namespace BossMod.Endwalker.Alliance.A33Oschon; -class Phase2ArenaUpdate : BossComponent +class Phase2ArenaUpdate(BossModule module) : BossComponent(module) { - public override void OnEventEnvControl(BossModule module, byte index, uint state) + public override void OnEventEnvControl(byte index, uint state) { if (state == 0x00200010 && index == 0x42) - module.Arena.Bounds = new ArenaBoundsSquare(new(0, 750), 20); + Module.Arena.Bounds = new ArenaBoundsSquare(new(0, 750), 20); } } diff --git a/BossMod/Modules/Endwalker/Alliance/A33Oschon/OschonClimbingShot.cs b/BossMod/Modules/Endwalker/Alliance/A33Oschon/OschonClimbingShot.cs index 2cc25c6eec..b44e67d452 100644 --- a/BossMod/Modules/Endwalker/Alliance/A33Oschon/OschonClimbingShot.cs +++ b/BossMod/Modules/Endwalker/Alliance/A33Oschon/OschonClimbingShot.cs @@ -1,22 +1,22 @@ namespace BossMod.Endwalker.Alliance.A33Oschon; -class ClimbingShot : Components.Knockback +class ClimbingShot(BossModule module) : Components.Knockback(module) { private Source? _knockback; - public override IEnumerable Sources(BossModule module, int slot, Actor actor) => Utils.ZeroOrOne(_knockback); + public override IEnumerable Sources(int slot, Actor actor) => Utils.ZeroOrOne(_knockback); - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.ClimbingShot or AID.ClimbingShot2 or AID.ClimbingShot3 or AID.ClimbingShot4) - _knockback = new(module.PrimaryActor.Position, 20, spell.NPCFinishAt); + _knockback = new(Module.PrimaryActor.Position, 20, spell.NPCFinishAt); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.ClimbingShot or AID.ClimbingShot2 or AID.ClimbingShot3 or AID.ClimbingShot4) _knockback = null; } - public override bool DestinationUnsafe(BossModule module, int slot, Actor actor, WPos pos) => module.FindComponent()?.ActiveAOEs(module, slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false || !module.Bounds.Contains(pos); + public override bool DestinationUnsafe(int slot, Actor actor, WPos pos) => Module.FindComponent()?.ActiveAOEs(slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false || !Module.Bounds.Contains(pos); } diff --git a/BossMod/Modules/Endwalker/Alliance/A33Oschon/OschonFlintedFoehn.cs b/BossMod/Modules/Endwalker/Alliance/A33Oschon/OschonFlintedFoehn.cs index 1ff13182c2..89c2a8004e 100644 --- a/BossMod/Modules/Endwalker/Alliance/A33Oschon/OschonFlintedFoehn.cs +++ b/BossMod/Modules/Endwalker/Alliance/A33Oschon/OschonFlintedFoehn.cs @@ -1,12 +1,10 @@ namespace BossMod.Endwalker.Alliance.A33Oschon; -class FlintedFoehnP1 : Components.UniformStackSpread +class FlintedFoehnP1(BossModule module) : Components.UniformStackSpread(module, 6, 0) { public int NumCasts { get; private set; } - public FlintedFoehnP1() : base(6, 0) { } - - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.FlintedFoehnStack) { @@ -19,20 +17,18 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.FlintedFoehnStack) - AddStack(actor, module.WorldState.CurrentTime.AddSeconds(4.5f)); + AddStack(actor, WorldState.FutureTime(4.5f)); } } -class FlintedFoehnP2 : Components.UniformStackSpread +class FlintedFoehnP2(BossModule module) : Components.UniformStackSpread(module, 8, 0) { public int NumCasts { get; private set; } - public FlintedFoehnP2() : base(8, 0) { } - - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.FlintedFoehnStackP2) { @@ -45,9 +41,9 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.FlintedFoehnStack) - AddStack(actor, module.WorldState.CurrentTime.AddSeconds(4.5f)); + AddStack(actor, WorldState.FutureTime(4.5f)); } } diff --git a/BossMod/Modules/Endwalker/Alliance/A33Oschon/OschonP2ArrowTrail.cs b/BossMod/Modules/Endwalker/Alliance/A33Oschon/OschonP2ArrowTrail.cs index f84b30a43a..d231540e79 100644 --- a/BossMod/Modules/Endwalker/Alliance/A33Oschon/OschonP2ArrowTrail.cs +++ b/BossMod/Modules/Endwalker/Alliance/A33Oschon/OschonP2ArrowTrail.cs @@ -1,22 +1,20 @@ namespace BossMod.Endwalker.Alliance.A33Oschon; -public class ArrowTrail : Components.Exaflare +public class ArrowTrail(BossModule module) : Components.Exaflare(module, new AOEShapeRect(5, 5, 5)) { - public ArrowTrail() : base(new AOEShapeRect(5, 5, 5)) { } - - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.ArrowTrailTelegraph) Lines.Add(new() { Next = caster.Position, Advance = 5 * caster.Rotation.ToDirection(), NextExplosion = spell.NPCFinishAt.AddSeconds(2.3f), TimeToMove = 0.5f, ExplosionsLeft = 8, MaxShownExplosions = 3 }); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if (Lines.Count > 0 && (AID)spell.Action.ID == AID.ArrowTrailExa) { ++NumCasts; int index = Lines.FindIndex(item => item.Next.AlmostEqual(caster.Position, 1)); - AdvanceLine(module, Lines[index], caster.Position); + AdvanceLine(Lines[index], caster.Position); if (Lines[index].ExplosionsLeft == 0) Lines.RemoveAt(index); } diff --git a/BossMod/Modules/Endwalker/Alliance/A33Oschon/OschonP2WanderingShot.cs b/BossMod/Modules/Endwalker/Alliance/A33Oschon/OschonP2WanderingShot.cs index cda242b50c..60c21b2415 100644 --- a/BossMod/Modules/Endwalker/Alliance/A33Oschon/OschonP2WanderingShot.cs +++ b/BossMod/Modules/Endwalker/Alliance/A33Oschon/OschonP2WanderingShot.cs @@ -1,26 +1,26 @@ namespace BossMod.Endwalker.Alliance.A33Oschon; -class GreatWhirlwind : Components.GenericAOEs +class GreatWhirlwind(BossModule module) : Components.GenericAOEs(module) { private AOEInstance? _aoe; private static readonly AOEShapeCircle circle = new(23); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => Utils.ZeroOrOne(_aoe); + public override IEnumerable ActiveAOEs(int slot, Actor actor) => Utils.ZeroOrOne(_aoe); - public override void OnEventEnvControl(BossModule module, byte index, uint state) + public override void OnEventEnvControl(byte index, uint state) { - var _activation = module.WorldState.CurrentTime.AddSeconds(10.7f); + var _activation = WorldState.FutureTime(10.7f); if (index == 0x48) { if (state == 0x00200010) - _aoe = new(circle, new WPos(-0.015f, 759.975f), activation: _activation); + _aoe = new(circle, new WPos(-0.015f, 759.975f), default, _activation); if (state == 0x00020001) - _aoe = new(circle, new WPos(-0.015f, 739.986f), activation: _activation); + _aoe = new(circle, new WPos(-0.015f, 739.986f), default, _activation); } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.GreatWhirlwind) _aoe = null; diff --git a/BossMod/Modules/Endwalker/Alliance/A33Oschon/OschonP2WanderingVolley.cs b/BossMod/Modules/Endwalker/Alliance/A33Oschon/OschonP2WanderingVolley.cs index 170731ec3b..e6233de404 100644 --- a/BossMod/Modules/Endwalker/Alliance/A33Oschon/OschonP2WanderingVolley.cs +++ b/BossMod/Modules/Endwalker/Alliance/A33Oschon/OschonP2WanderingVolley.cs @@ -1,24 +1,24 @@ namespace BossMod.Endwalker.Alliance.A33Oschon; -class WanderingVolley : Components.Knockback +class WanderingVolley(BossModule module) : Components.Knockback(module) { private readonly List _sources = []; private static readonly AOEShapeCone _shape = new(30, 90.Degrees()); - public override IEnumerable Sources(BossModule module, int slot, Actor actor) => _sources; + public override IEnumerable Sources(int slot, Actor actor) => _sources; - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.WanderingVolley or AID.WanderingVolley2) { _sources.Clear(); // happens through center, so create two sources with origin at center looking orthogonally - _sources.Add(new(module.Bounds.Center, 12, spell.NPCFinishAt, _shape, spell.Rotation + 90.Degrees(), Kind.DirForward)); - _sources.Add(new(module.Bounds.Center, 12, spell.NPCFinishAt, _shape, spell.Rotation - 90.Degrees(), Kind.DirForward)); + _sources.Add(new(Module.Bounds.Center, 12, spell.NPCFinishAt, _shape, spell.Rotation + 90.Degrees(), Kind.DirForward)); + _sources.Add(new(Module.Bounds.Center, 12, spell.NPCFinishAt, _shape, spell.Rotation - 90.Degrees(), Kind.DirForward)); } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.WanderingVolley or AID.WanderingVolley2) { @@ -27,25 +27,24 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn } } - public override bool DestinationUnsafe(BossModule module, int slot, Actor actor, WPos pos) => module.FindComponent()?.ActiveAOEs(module, slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false || !module.Bounds.Contains(pos); + public override bool DestinationUnsafe(int slot, Actor actor, WPos pos) => Module.FindComponent()?.ActiveAOEs(slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false || !Module.Bounds.Contains(pos); } -class WanderingVolleyAOE : Components.GenericAOEs +class WanderingVolleyAOE(BossModule module) : Components.GenericAOEs(module) { private AOEInstance? _aoe; private static readonly AOEShapeRect _shape = new(40, 5, 40); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => Utils.ZeroOrOne(_aoe); + public override IEnumerable ActiveAOEs(int slot, Actor actor) => Utils.ZeroOrOne(_aoe); - - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.WanderingVolley or AID.WanderingVolley2) _aoe = new(_shape, caster.Position, spell.Rotation, spell.NPCFinishAt); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.WanderingVolley or AID.WanderingVolley2) { @@ -55,12 +54,5 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn } } -class WanderingVolleyRaidwide1 : Components.RaidwideCast -{ - public WanderingVolleyRaidwide1() : base(ActionID.MakeSpell(AID.WanderingVolley)) { } -} - -class WanderingVolleyRaidwide2 : Components.RaidwideCast -{ - public WanderingVolleyRaidwide2() : base(ActionID.MakeSpell(AID.WanderingVolley2)) { } -} +class WanderingVolleyRaidwide1(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.WanderingVolley)); +class WanderingVolleyRaidwide2(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.WanderingVolley2)); diff --git a/BossMod/Modules/Endwalker/Alliance/A33Oschon/OschonSwingingDraw.cs b/BossMod/Modules/Endwalker/Alliance/A33Oschon/OschonSwingingDraw.cs index bac3f45032..db594a65c8 100644 --- a/BossMod/Modules/Endwalker/Alliance/A33Oschon/OschonSwingingDraw.cs +++ b/BossMod/Modules/Endwalker/Alliance/A33Oschon/OschonSwingingDraw.cs @@ -1,14 +1,15 @@ namespace BossMod.Endwalker.Alliance.A33Oschon; -class SwingingDraw : Components.GenericAOEs +class SwingingDraw(BossModule module) : Components.GenericAOEs(module) { private const float maxError = MathF.PI / 180; private readonly List _aoes = []; private static readonly AOEShapeCone _shape = new(60, 60.Degrees()); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => _aoes; - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override IEnumerable ActiveAOEs(int slot, Actor actor) => _aoes; + + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { var _activation = spell.NPCFinishAt.AddSeconds(6.1f); if ((AID)spell.Action.ID == AID.SwingingDrawCW) @@ -35,7 +36,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.SwingingDraw) { diff --git a/BossMod/Modules/Endwalker/Alliance/A34Eulogia/A34Eulogia.cs b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/A34Eulogia.cs index 316ce79442..b710ee5f3e 100644 --- a/BossMod/Modules/Endwalker/Alliance/A34Eulogia/A34Eulogia.cs +++ b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/A34Eulogia.cs @@ -1,53 +1,22 @@ namespace BossMod.Endwalker.Alliance.A34Eulogia; -class EudaimonEorzea : Components.RaidwideCast -{ - public EudaimonEorzea() : base(ActionID.MakeSpell(AID.EudaimonEorzea2), "Raidwide x12") { } -} - -class TheWhorl : Components.RaidwideCast -{ - public TheWhorl() : base(ActionID.MakeSpell(AID.TheWhorl)) { } -} - -class DawnOfTime : Components.RaidwideCast -{ - public DawnOfTime() : base(ActionID.MakeSpell(AID.DawnOfTime)) { } -} - -class SoaringMinuet : Components.SelfTargetedAOEs -{ - public SoaringMinuet() : base(ActionID.MakeSpell(AID.SoaringMinuet), new AOEShapeCone(40, 135.Degrees())) { } -} +class EudaimonEorzea(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.EudaimonEorzea2), "Raidwide x12"); +class TheWhorl(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.TheWhorl)); +class DawnOfTime(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.DawnOfTime)); +class SoaringMinuet(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.SoaringMinuet), new AOEShapeCone(40, 135.Degrees())); +class HandOfTheDestroyerJudgment(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HandOfTheDestroyerJudgmentAOE), new AOEShapeRect(90, 20)); +class HandOfTheDestroyerWrath(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HandOfTheDestroyerWrathAOE), new AOEShapeRect(90, 20)); -class HandOfTheDestroyerJudgment : Components.SelfTargetedAOEs +class Sunbeam(BossModule module) : Components.BaitAwayCast(module, ActionID.MakeSpell(AID.SunbeamTankBuster), new AOEShapeCircle(6), true) { - public HandOfTheDestroyerJudgment() : base(ActionID.MakeSpell(AID.HandOfTheDestroyerJudgmentAOE), new AOEShapeRect(90, 20)) { } -} - -class HandOfTheDestroyerWrath : Components.SelfTargetedAOEs -{ - public HandOfTheDestroyerWrath() : base(ActionID.MakeSpell(AID.HandOfTheDestroyerWrathAOE), new AOEShapeRect(90, 20)) { } -} - -class Sunbeam : Components.BaitAwayCast -{ - public Sunbeam() : base(ActionID.MakeSpell(AID.SunbeamTankBuster), new AOEShapeCircle(6), true) { } - - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (CurrentBaits.Count > 0) hints.Add("Tankbuster cleave"); } } -class DestructiveBoltStack : Components.StackWithCastTargets -{ - public DestructiveBoltStack() : base(ActionID.MakeSpell(AID.DestructiveBoltStack), 6) { } -} +class DestructiveBoltStack(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.DestructiveBoltStack), 6); [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus, LTS", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 962, NameID = 11301, SortOrder = 7)] -public class A34Eulogia : BossModule -{ - public A34Eulogia(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(945, -945), 35)) { } -} +public class A34Eulogia(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(945, -945), 35)); diff --git a/BossMod/Modules/Endwalker/Alliance/A34Eulogia/A34EulogiaStates.cs b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/A34EulogiaStates.cs index dbd231d4ce..3831843e76 100644 --- a/BossMod/Modules/Endwalker/Alliance/A34Eulogia/A34EulogiaStates.cs +++ b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/A34EulogiaStates.cs @@ -1,17 +1,17 @@ namespace BossMod.Endwalker.Alliance.A34Eulogia; -class ArenaChanges : BossComponent +class ArenaChanges(BossModule module) : BossComponent(module) { - public override void OnEventEnvControl(BossModule module, byte index, uint state) + public override void OnEventEnvControl(byte index, uint state) { if (index == 0x1B) { if (state == 0x00080004) - module.Arena.Bounds = new ArenaBoundsCircle(new(945, -945), 35); + Module.Arena.Bounds = new ArenaBoundsCircle(new(945, -945), 35); if (state is 0x00020001 or 0x00100001) - module.Arena.Bounds = new ArenaBoundsCircle(new(945, -945), 30); + Module.Arena.Bounds = new ArenaBoundsCircle(new(945, -945), 30); if (state == 0x00400020) - module.Arena.Bounds = new ArenaBoundsSquare(new(945, -945), 24); + Module.Arena.Bounds = new ArenaBoundsSquare(new(945, -945), 24); } } } diff --git a/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaAsAboveSoBelow.cs b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaAsAboveSoBelow.cs index 898b1d9712..c83c85841d 100644 --- a/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaAsAboveSoBelow.cs +++ b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaAsAboveSoBelow.cs @@ -1,50 +1,48 @@ namespace BossMod.Endwalker.Alliance.A34Eulogia; -class AsAboveSoBelow : Components.Exaflare +class AsAboveSoBelow(BossModule module) : Components.Exaflare(module, 6) { - public AsAboveSoBelow() : base(6) { } - - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.EverfireFirst or AID.OnceBurnedFirst) { var advance = 6 * spell.Rotation.ToDirection(); // outer lines have 4 explosion only, rest 5 - var numExplosions = (caster.Position - module.Bounds.Center).LengthSq() > 500 ? 4 : 5; + var numExplosions = (caster.Position - Module.Bounds.Center).LengthSq() > 500 ? 4 : 5; Lines.Add(new() { Next = caster.Position, Advance = advance, NextExplosion = spell.NPCFinishAt, TimeToMove = 1.5f, ExplosionsLeft = numExplosions, MaxShownExplosions = 5 }); Lines.Add(new() { Next = caster.Position, Advance = -advance, NextExplosion = spell.NPCFinishAt, TimeToMove = 1.5f, ExplosionsLeft = numExplosions, MaxShownExplosions = 5 }); } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { case AID.EverfireFirst: case AID.OnceBurnedFirst: var dir = caster.Rotation.ToDirection(); - Advance(module, caster.Position, dir); - Advance(module, caster.Position, -dir); + Advance(caster.Position, dir); + Advance(caster.Position, -dir); ++NumCasts; break; case AID.EverfireRest: case AID.OnceBurnedRest: - Advance(module, caster.Position, caster.Rotation.ToDirection()); + Advance(caster.Position, caster.Rotation.ToDirection()); ++NumCasts; break; } } - private void Advance(BossModule module, WPos position, WDir dir) + private void Advance(WPos position, WDir dir) { int index = Lines.FindIndex(item => item.Next.AlmostEqual(position, 1) && item.Advance.Dot(dir) > 5); if (index == -1) { - module.ReportError(this, $"Failed to find entry for {position} / {dir}"); + ReportError($"Failed to find entry for {position} / {dir}"); return; } - AdvanceLine(module, Lines[index], position); + AdvanceLine(Lines[index], position); if (Lines[index].ExplosionsLeft == 0) Lines.RemoveAt(index); } diff --git a/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaByregotStrike.cs b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaByregotStrike.cs index dbd5328c28..d702afbdf6 100644 --- a/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaByregotStrike.cs +++ b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaByregotStrike.cs @@ -1,31 +1,24 @@ namespace BossMod.Endwalker.Alliance.A34Eulogia; -class ByregotStrikeJump : Components.LocationTargetedAOEs -{ - public ByregotStrikeJump() : base(ActionID.MakeSpell(AID.ByregotStrikeJump), 8) { } -} - -class ByregotStrikeKnockback : Components.KnockbackFromCastTarget -{ - public ByregotStrikeKnockback() : base(ActionID.MakeSpell(AID.ByregotStrikeKnockback), 20) { } -} +class ByregotStrikeJump(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.ByregotStrikeJump), 8); +class ByregotStrikeKnockback(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.ByregotStrikeKnockback), 20); -class ByregotStrikeCone : Components.GenericAOEs +class ByregotStrikeCone(BossModule module) : Components.GenericAOEs(module) { private readonly List _aoes = []; private static readonly AOEShapeCone _shape = new(90, 22.5f.Degrees()); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => _aoes; + public override IEnumerable ActiveAOEs(int slot, Actor actor) => _aoes; - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.ByregotStrikeKnockback) for (int i = 0; i < 4; ++i) _aoes.Add(new(_shape, caster.Position, spell.Rotation + i * 90.Degrees(), spell.NPCFinishAt)); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.ByregotStrikeCone) { diff --git a/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaClimbingShot.cs b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaClimbingShot.cs index 29a2d49bc5..a3b7eff512 100644 --- a/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaClimbingShot.cs +++ b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaClimbingShot.cs @@ -1,22 +1,22 @@ namespace BossMod.Endwalker.Alliance.A34Eulogia; -class ClimbingShot : Components.Knockback +class ClimbingShot(BossModule module) : Components.Knockback(module) { private Source? _knockback; - public override IEnumerable Sources(BossModule module, int slot, Actor actor) => Utils.ZeroOrOne(_knockback); + public override IEnumerable Sources(int slot, Actor actor) => Utils.ZeroOrOne(_knockback); - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.ClimbingShotVisual or AID.ClimbingShotVisual2) - _knockback = new(module.PrimaryActor.Position, 20, spell.NPCFinishAt.AddSeconds(0.2f)); + _knockback = new(Module.PrimaryActor.Position, 20, spell.NPCFinishAt.AddSeconds(0.2f)); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.ClimbingShot1 or AID.ClimbingShot2 or AID.ClimbingShot3 or AID.ClimbingShot4) _knockback = null; } - public override bool DestinationUnsafe(BossModule module, int slot, Actor actor, WPos pos) => module.FindComponent()?.ActiveAOEs(module, slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false || !module.Bounds.Contains(pos); + public override bool DestinationUnsafe(int slot, Actor actor, WPos pos) => Module.FindComponent()?.ActiveAOEs(slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false || !Module.Bounds.Contains(pos); } diff --git a/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaFirstBlush.cs b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaFirstBlush.cs index 1f2edb6716..ce10aeb0eb 100644 --- a/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaFirstBlush.cs +++ b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaFirstBlush.cs @@ -1,12 +1,12 @@ namespace BossMod.Endwalker.Alliance.A34Eulogia; -class FirstBlush : Components.GenericAOEs +class FirstBlush(BossModule module) : Components.GenericAOEs(module) { private readonly List<(WPos position, Angle rotation, DateTime activation, uint AID)> _castersunsorted = []; private List<(WPos position, Angle rotation, DateTime activation)> _casters = []; private static readonly AOEShapeRect _shape = new(120, 12.5f); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_casters.Count > 0) yield return new(_shape, _casters[0].position, _casters[0].rotation, _casters[0].activation, ArenaColor.Danger); @@ -14,7 +14,7 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, yield return new(_shape, _casters[1].position, _casters[1].rotation, _casters[1].activation); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.FirstBlush1 or AID.FirstBlush2 or AID.FirstBlush3 or AID.FirstBlush4) { @@ -23,7 +23,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if (_casters.Count > 0 && (AID)spell.Action.ID is AID.FirstBlush1 or AID.FirstBlush2 or AID.FirstBlush3 or AID.FirstBlush4) { diff --git a/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaHieroglyphika.cs b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaHieroglyphika.cs index b3038129e3..6a7e455577 100644 --- a/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaHieroglyphika.cs +++ b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaHieroglyphika.cs @@ -1,13 +1,13 @@ namespace BossMod.Endwalker.Alliance.A34Eulogia; -class Hieroglyphika : Components.GenericAOEs +class Hieroglyphika(BossModule module) : Components.GenericAOEs(module) { private static readonly AOEShapeRect rect = new(12, 6); private readonly List _aoes = []; private const float RadianConversion = MathF.PI / 180; private static readonly WPos[] StartingCoords = [new(951, -933), new(939, -933), new(951, -957), new(939, -957), new(927, -933), new(963, -957), new(963, -933), new(951, -945), new(939, -945), new(927, -921), new(939, -921), new(927, -945), new(963, -945), new(963, -921)]; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => _aoes.Take(14); + public override IEnumerable ActiveAOEs(int slot, Actor actor) => _aoes.Take(14); private static WPos RotateAroundOrigin(float rotatebydegrees, WPos origin, WPos caster) //TODO: consider moving to utils for future use { @@ -16,19 +16,19 @@ class Hieroglyphika : Components.GenericAOEs return new WPos(origin.X + x, origin.Z + z); } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { - var _activation = module.WorldState.CurrentTime.AddSeconds(16); - var origin = module.Bounds.Center; + var _activation = WorldState.FutureTime(16); + var origin = Module.Bounds.Center; if (iconID == (uint)IconID.ClockwiseHieroglyphika) foreach (var r in StartingCoords) _aoes.Add(new(rect, RotateAroundOrigin(0, origin, r), 180.Degrees(), _activation)); if (iconID == (uint)IconID.CounterClockwiseHieroglyphika) foreach (var r in StartingCoords) - _aoes.Add(new(rect, RotateAroundOrigin(180, origin, r), activation: _activation)); + _aoes.Add(new(rect, RotateAroundOrigin(180, origin, r), default, _activation)); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if (_aoes.Count > 0 && (AID)spell.Action.ID is AID.HieroglyphikaRect) _aoes.Clear(); diff --git a/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaHydrostasis.cs b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaHydrostasis.cs index 1c7c70ea97..7b2fe184ce 100644 --- a/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaHydrostasis.cs +++ b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaHydrostasis.cs @@ -1,20 +1,20 @@ namespace BossMod.Endwalker.Alliance.A34Eulogia; -class Hydrostasis : Components.Knockback +class Hydrostasis(BossModule module) : Components.Knockback(module) { private readonly List _sources = []; public bool Active => _sources.Count == 3 || NumCasts > 0; - public override IEnumerable Sources(BossModule module, int slot, Actor actor) => Active ? _sources : Enumerable.Empty(); + public override IEnumerable Sources(int slot, Actor actor) => Active ? _sources : Enumerable.Empty(); - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.HydrostasisAOE1 or AID.HydrostasisAOE2 or AID.HydrostasisAOE3) AddSource(caster.Position, spell.NPCFinishAt); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.HydrostasisAOE1 or AID.HydrostasisAOE2 or AID.HydrostasisAOE3) { diff --git a/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaMatronsBreath.cs b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaMatronsBreath.cs index 13cdedf3d8..7f6e45934d 100644 --- a/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaMatronsBreath.cs +++ b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaMatronsBreath.cs @@ -1,26 +1,26 @@ namespace BossMod.Endwalker.Alliance.A34Eulogia; -class MatronsBreath : Components.GenericAOEs +class MatronsBreath(BossModule module) : Components.GenericAOEs(module) { private readonly List<(Actor actor, DateTime activation)> _flowers = []; private static readonly AOEShapeDonut _shape = new(8, 50); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { - var _blueFlowers = module.Enemies(OID.BlueSafeZone).FirstOrDefault(); - var _goldFlowers = module.Enemies(OID.GoldSafeZone).FirstOrDefault(); + var _blueFlowers = Module.Enemies(OID.BlueSafeZone).FirstOrDefault(); + var _goldFlowers = Module.Enemies(OID.GoldSafeZone).FirstOrDefault(); if (_flowers.Count > 0) - yield return new(_shape, _flowers[0].actor.OID == (uint)OID.BlueFlowers ? _blueFlowers!.Position : _goldFlowers!.Position, activation: _flowers[0].activation); + yield return new(_shape, _flowers[0].actor.OID == (uint)OID.BlueFlowers ? _blueFlowers!.Position : _goldFlowers!.Position, default, _flowers[0].activation); } - public override void OnActorCreated(BossModule module, Actor actor) + public override void OnActorCreated(Actor actor) { if ((OID)actor.OID is OID.BlueFlowers or OID.GoldFlowers) - _flowers.Add((actor, module.WorldState.CurrentTime.AddSeconds(10.8f))); + _flowers.Add((actor, WorldState.FutureTime(10.8f))); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if (_flowers.Count > 0 && (AID)spell.Action.ID is AID.Blueblossoms or AID.Giltblossoms) { diff --git a/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaQuintessence.cs b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaQuintessence.cs index f166838eec..1283fd592a 100644 --- a/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaQuintessence.cs +++ b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaQuintessence.cs @@ -1,6 +1,6 @@ namespace BossMod.Endwalker.Alliance.A34Eulogia; -class Quintessence : Components.GenericAOEs +class Quintessence(BossModule module) : Components.GenericAOEs(module) { private static readonly AOEShapeCone cone = new(50, 90.Degrees()); private static readonly AOEShapeDonut donut = new(8, 60); @@ -17,7 +17,7 @@ class Quintessence : Components.GenericAOEs private WPos position; private readonly List _aoes = []; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_aoes.Count > 0) yield return new(_aoes[0].Shape, _aoes[0].Origin, _aoes[0].Rotation, _aoes[0].Activation, ArenaColor.Danger); @@ -25,7 +25,7 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, yield return new(_aoes[1].Shape, _aoes[1].Origin, _aoes[1].Rotation, _aoes[1].Activation); } - public override void OnEventEnvControl(BossModule module, byte index, uint state) + public override void OnEventEnvControl(byte index, uint state) { if (state == 0x00020001) { @@ -52,7 +52,7 @@ public override void OnEventEnvControl(BossModule module, byte index, uint state } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { var _activation1 = spell.NPCFinishAt.AddSeconds(19.4f); var _activation2 = spell.NPCFinishAt.AddSeconds(15.7f); @@ -82,7 +82,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf if ((AID)spell.Action.ID == AID.FirstFormAOE) { if (_index is 0x4F or 0x4C or 0x4E) - _aoes.Add(new(donut, position, activation: _activation1)); + _aoes.Add(new(donut, position, default, _activation1)); } if ((AID)spell.Action.ID == AID.SecondFormRight) { @@ -103,7 +103,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf if ((AID)spell.Action.ID == AID.SecondFormAOE) { if (_index is 0x56 or 0x51) - _aoes.Add(new(donut, position, activation: _activation2)); + _aoes.Add(new(donut, position, default, _activation2)); } if ((AID)spell.Action.ID == AID.ThirdFormRight) { @@ -126,11 +126,11 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf if ((AID)spell.Action.ID == AID.ThirdFormAOE) { if (_index is 0x53 or 0x54 or 0x57 or 0x56 or 0x51 or 0x50) - _aoes.Add(new(donut, position, activation: _activation3)); + _aoes.Add(new(donut, position, default, _activation3)); } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if (_aoes.Count > 0 && (AID)spell.Action.ID is AID.QuintessenceFirstRight or AID.QuintessenceFirstLeft or AID.QuintessenceFirstAOE or AID.QuintessenceSecondRight or AID.QuintessenceSecondLeft or AID.QuintessenceSecondAOE or AID.QuintessenceThirdRight or AID.QuintessenceThirdLeft or AID.QuintessenceThirdAOE) { diff --git a/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaRadiantRhythm.cs b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaRadiantRhythm.cs index 79beba3b0a..0b48c48fad 100644 --- a/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaRadiantRhythm.cs +++ b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaRadiantRhythm.cs @@ -1,27 +1,27 @@ namespace BossMod.Endwalker.Alliance.A34Eulogia; -class RadiantFlourish : Components.GenericAOEs +class RadiantFlourish(BossModule module) : Components.GenericAOEs(module) { private static readonly AOEShapeCircle circle = new(27); private readonly List _aoes = []; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => _aoes; + public override IEnumerable ActiveAOEs(int slot, Actor actor) => _aoes; - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.SolarFansAOE) - _aoes.Add(new(circle, spell.LocXZ, activation: module.WorldState.CurrentTime.AddSeconds(13.7f))); + _aoes.Add(new(circle, spell.LocXZ, default, WorldState.FutureTime(13.7f))); if ((AID)spell.Action.ID == AID.RadiantFlourish) _aoes.Clear(); } } -class RadiantRhythm : Components.GenericAOEs +class RadiantRhythm(BossModule module) : Components.GenericAOEs(module) { private static readonly AOEShapeDonutSector _shape = new(20, 30, 45.Degrees()); private readonly List _aoes = []; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_aoes.Count > 1) for (int i = 0; i < 2; ++i) @@ -31,7 +31,7 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, yield return new(_aoes[i].Shape, _aoes[i].Origin, _aoes[i].Rotation, _aoes[i].Activation); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { var _activation = spell.NPCFinishAt.AddSeconds(2.7f); if ((AID)spell.Action.ID == AID.SolarFansAOE) @@ -51,7 +51,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if (_aoes.Count > 0 && (AID)spell.Action.ID == AID.RadiantFlight) _aoes.RemoveAt(0); diff --git a/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaThousandfoldThrust.cs b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaThousandfoldThrust.cs index 88acbe37d9..a8d0ba6916 100644 --- a/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaThousandfoldThrust.cs +++ b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaThousandfoldThrust.cs @@ -1,18 +1,18 @@ namespace BossMod.Endwalker.Alliance.A34Eulogia; -class ThousandfoldThrust : Components.GenericAOEs +class ThousandfoldThrust(BossModule module) : Components.GenericAOEs(module) { private AOEInstance? _aoe; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => Utils.ZeroOrOne(_aoe); + public override IEnumerable ActiveAOEs(int slot, Actor actor) => Utils.ZeroOrOne(_aoe); - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.ThousandfoldThrustAOEFirst) _aoe = new(new AOEShapeCone(60, 90.Degrees()), caster.Position, spell.Rotation, spell.NPCFinishAt); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.ThousandfoldThrustAOERest) { @@ -22,7 +22,7 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.ThousandfoldThrustAOEFirst) ++NumCasts; diff --git a/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaTridents.cs b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaTridents.cs index 09cf60493b..28218fa151 100644 --- a/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaTridents.cs +++ b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaTridents.cs @@ -1,15 +1,13 @@ namespace BossMod.Endwalker.Alliance.A34Eulogia; -class TorrentialTridents : Components.RaidwideCastDelay -{ - public TorrentialTridents() : base(ActionID.MakeSpell(AID.TorrentialTridents), ActionID.MakeSpell(AID.Landing), 0.9f, "Raidwide x6") { } -} +class TorrentialTridents(BossModule module) : Components.RaidwideCastDelay(module, ActionID.MakeSpell(AID.TorrentialTridents), ActionID.MakeSpell(AID.Landing), 0.9f, "Raidwide x6"); -class Tridents : Components.GenericAOEs +class Tridents(BossModule module) : Components.GenericAOEs(module) { private readonly List _aoes = []; private static readonly AOEShapeCircle _shape = new(18); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_aoes.Count > 0) yield return new(_aoes[0].Shape, _aoes[0].Origin, _aoes[0].Rotation, _aoes[0].Activation, ArenaColor.Danger); @@ -18,13 +16,13 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, yield return new(_aoes[i].Shape, _aoes[i].Origin, _aoes[i].Rotation, _aoes[i].Activation); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.Landing) - _aoes.Add(new(_shape, caster.Position, activation: module.WorldState.CurrentTime.AddSeconds(13.1f))); + _aoes.Add(new(_shape, caster.Position, default, WorldState.FutureTime(13.1f))); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.LightningBolt && _aoes.Count > 0) _aoes.RemoveAt(0); diff --git a/BossMod/Modules/Endwalker/Criterion/C01ASS/C010Trash/C010Armor.cs b/BossMod/Modules/Endwalker/Criterion/C01ASS/C010Trash/C010Armor.cs index 61a7bae0e8..4532d60561 100644 --- a/BossMod/Modules/Endwalker/Criterion/C01ASS/C010Trash/C010Armor.cs +++ b/BossMod/Modules/Endwalker/Criterion/C01ASS/C010Trash/C010Armor.cs @@ -17,26 +17,17 @@ public enum AID : uint SHellsNebula = 31108, // Boss->self, 4.0s cast, raidwide set hp to 1 } -class DominionSlash : Components.SelfTargetedAOEs -{ - public DominionSlash(AID aid) : base(ActionID.MakeSpell(aid), new AOEShapeCone(12, 45.Degrees())) { } -} -class NDominionSlash : DominionSlash { public NDominionSlash() : base(AID.NDominionSlash) { } } -class SDominionSlash : DominionSlash { public SDominionSlash() : base(AID.SDominionSlash) { } } +class DominionSlash(BossModule module, AID aid) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(aid), new AOEShapeCone(12, 45.Degrees())); +class NDominionSlash(BossModule module) : DominionSlash(module, AID.NDominionSlash); +class SDominionSlash(BossModule module) : DominionSlash(module, AID.SDominionSlash); -class InfernalWeight : Components.RaidwideCast -{ - public InfernalWeight(AID aid) : base(ActionID.MakeSpell(aid), "Raidwide with slow") { } -} -class NInfernalWeight : InfernalWeight { public NInfernalWeight() : base(AID.NInfernalWeight) { } } -class SInfernalWeight : InfernalWeight { public SInfernalWeight() : base(AID.SInfernalWeight) { } } +class InfernalWeight(BossModule module, AID aid) : Components.RaidwideCast(module, ActionID.MakeSpell(aid), "Raidwide with slow"); +class NInfernalWeight(BossModule module) : InfernalWeight(module, AID.NInfernalWeight); +class SInfernalWeight(BossModule module) : InfernalWeight(module, AID.SInfernalWeight); -class HellsNebula : Components.CastHint -{ - public HellsNebula(AID aid) : base(ActionID.MakeSpell(aid), "Reduce hp to 1") { } -} -class NHellsNebula : HellsNebula { public NHellsNebula() : base(AID.NHellsNebula) { } } -class SHellsNebula : HellsNebula { public SHellsNebula() : base(AID.SHellsNebula) { } } +class HellsNebula(BossModule module, AID aid) : Components.CastHint(module, ActionID.MakeSpell(aid), "Reduce hp to 1"); +class NHellsNebula(BossModule module) : HellsNebula(module, AID.NHellsNebula); +class SHellsNebula(BossModule module) : HellsNebula(module, AID.SHellsNebula); class C010ArmorStates : StateMachineBuilder { @@ -51,11 +42,11 @@ public C010ArmorStates(BossModule module, bool savage) : base(module) .ActivateOnEnter(savage); } } -class C010NArmorStates : C010ArmorStates { public C010NArmorStates(BossModule module) : base(module, false) { } } -class C010SArmorStates : C010ArmorStates { public C010SArmorStates(BossModule module) : base(module, true) { } } +class C010NArmorStates(BossModule module) : C010ArmorStates(module, false); +class C010SArmorStates(BossModule module) : C010ArmorStates(module, true); [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.NBoss, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 878, NameID = 11515, SortOrder = 6)] -public class C010NArmor : SimpleBossModule { public C010NArmor(WorldState ws, Actor primary) : base(ws, primary) { } } +public class C010NArmor(WorldState ws, Actor primary) : SimpleBossModule(ws, primary); [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.SBoss, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 879, NameID = 11515, SortOrder = 6)] -public class C010SArmor : SimpleBossModule { public C010SArmor(WorldState ws, Actor primary) : base(ws, primary) { } } +public class C010SArmor(WorldState ws, Actor primary) : SimpleBossModule(ws, primary); diff --git a/BossMod/Modules/Endwalker/Criterion/C01ASS/C010Trash/C010Belladonna.cs b/BossMod/Modules/Endwalker/Criterion/C01ASS/C010Trash/C010Belladonna.cs index cea5ee10cb..ac2aa19dc6 100644 --- a/BossMod/Modules/Endwalker/Criterion/C01ASS/C010Trash/C010Belladonna.cs +++ b/BossMod/Modules/Endwalker/Criterion/C01ASS/C010Trash/C010Belladonna.cs @@ -17,26 +17,17 @@ public enum AID : uint SDeracinator = 31098, // SBoss->player, 4.0s cast, single-target tankbuster } -class AtropineSpore : Components.SelfTargetedAOEs -{ - public AtropineSpore(AID aid) : base(ActionID.MakeSpell(aid), new AOEShapeDonut(10, 40)) { } -} -class NAtropineSpore : AtropineSpore { public NAtropineSpore() : base(AID.NAtropineSpore) { } } -class SAtropineSpore : AtropineSpore { public SAtropineSpore() : base(AID.SAtropineSpore) { } } +class AtropineSpore(BossModule module, AID aid) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(aid), new AOEShapeDonut(10, 40)); +class NAtropineSpore(BossModule module) : AtropineSpore(module, AID.NAtropineSpore); +class SAtropineSpore(BossModule module) : AtropineSpore(module, AID.SAtropineSpore); -class FrondAffront : Components.CastGaze -{ - public FrondAffront(AID aid) : base(ActionID.MakeSpell(aid)) { } -} -class NFrondAffront : FrondAffront { public NFrondAffront() : base(AID.NFrondAffront) { } } -class SFrondAffront : FrondAffront { public SFrondAffront() : base(AID.SFrondAffront) { } } +class FrondAffront(BossModule module, AID aid) : Components.CastGaze(module, ActionID.MakeSpell(aid)); +class NFrondAffront(BossModule module) : FrondAffront(module, AID.NFrondAffront); +class SFrondAffront(BossModule module) : FrondAffront(module, AID.SFrondAffront); -class Deracinator : Components.SingleTargetCast -{ - public Deracinator(AID aid) : base(ActionID.MakeSpell(aid)) { } -} -class NDeracinator : Deracinator { public NDeracinator() : base(AID.NDeracinator) { } } -class SDeracinator : Deracinator { public SDeracinator() : base(AID.SDeracinator) { } } +class Deracinator(BossModule module, AID aid) : Components.SingleTargetCast(module, ActionID.MakeSpell(aid)); +class NDeracinator(BossModule module) : Deracinator(module, AID.NDeracinator); +class SDeracinator(BossModule module) : Deracinator(module, AID.SDeracinator); class C010BelladonnaStates : StateMachineBuilder { @@ -51,11 +42,11 @@ public C010BelladonnaStates(BossModule module, bool savage) : base(module) .ActivateOnEnter(savage); } } -class C010NBelladonnaStates : C010BelladonnaStates { public C010NBelladonnaStates(BossModule module) : base(module, false) { } } -class C010SBelladonnaStates : C010BelladonnaStates { public C010SBelladonnaStates(BossModule module) : base(module, true) { } } +class C010NBelladonnaStates(BossModule module) : C010BelladonnaStates(module, false); +class C010SBelladonnaStates(BossModule module) : C010BelladonnaStates(module, true); [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.NBoss, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 878, NameID = 11514, SortOrder = 1)] -public class C010NBelladonna : SimpleBossModule { public C010NBelladonna(WorldState ws, Actor primary) : base(ws, primary) { } } +public class C010NBelladonna(WorldState ws, Actor primary) : SimpleBossModule(ws, primary); [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.SBoss, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 879, NameID = 11514, SortOrder = 1)] -public class C010SBelladonna : SimpleBossModule { public C010SBelladonna(WorldState ws, Actor primary) : base(ws, primary) { } } +public class C010SBelladonna(WorldState ws, Actor primary) : SimpleBossModule(ws, primary); diff --git a/BossMod/Modules/Endwalker/Criterion/C01ASS/C010Trash/C010Dryad.cs b/BossMod/Modules/Endwalker/Criterion/C01ASS/C010Trash/C010Dryad.cs index 63b472a989..679482b0c4 100644 --- a/BossMod/Modules/Endwalker/Criterion/C01ASS/C010Trash/C010Dryad.cs +++ b/BossMod/Modules/Endwalker/Criterion/C01ASS/C010Trash/C010Dryad.cs @@ -21,33 +21,21 @@ public enum AID : uint SUproot = 31090, // SOdqan->self, 3.0s cast, range 6 circle } -class ArborealStorm : Components.SelfTargetedAOEs -{ - public ArborealStorm(AID aid) : base(ActionID.MakeSpell(aid), new AOEShapeCircle(12)) { } -} -class NArborealStorm : ArborealStorm { public NArborealStorm() : base(AID.NArborealStorm) { } } -class SArborealStorm : ArborealStorm { public SArborealStorm() : base(AID.SArborealStorm) { } } +class ArborealStorm(BossModule module, AID aid) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(aid), new AOEShapeCircle(12)); +class NArborealStorm(BossModule module) : ArborealStorm(module, AID.NArborealStorm); +class SArborealStorm(BossModule module) : ArborealStorm(module, AID.SArborealStorm); -class AcornBomb : Components.LocationTargetedAOEs -{ - public AcornBomb(AID aid) : base(ActionID.MakeSpell(aid), 6) { } -} -class NAcornBomb : AcornBomb { public NAcornBomb() : base(AID.NAcornBomb) { } } -class SAcornBomb : AcornBomb { public SAcornBomb() : base(AID.SAcornBomb) { } } +class AcornBomb(BossModule module, AID aid) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(aid), 6); +class NAcornBomb(BossModule module) : AcornBomb(module, AID.NAcornBomb); +class SAcornBomb(BossModule module) : AcornBomb(module, AID.SAcornBomb); -class GelidGale : Components.LocationTargetedAOEs -{ - public GelidGale(AID aid) : base(ActionID.MakeSpell(aid), 6) { } -} -class NGelidGale : GelidGale { public NGelidGale() : base(AID.NGelidGale) { } } -class SGelidGale : GelidGale { public SGelidGale() : base(AID.SGelidGale) { } } +class GelidGale(BossModule module, AID aid) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(aid), 6); +class NGelidGale(BossModule module) : GelidGale(module, AID.NGelidGale); +class SGelidGale(BossModule module) : GelidGale(module, AID.SGelidGale); -class Uproot : Components.SelfTargetedAOEs -{ - public Uproot(AID aid) : base(ActionID.MakeSpell(aid), new AOEShapeCircle(6)) { } -} -class NUproot : Uproot { public NUproot() : base(AID.NUproot) { } } -class SUproot : Uproot { public SUproot() : base(AID.SUproot) { } } +class Uproot(BossModule module, AID aid) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(aid), new AOEShapeCircle(6)); +class NUproot(BossModule module) : Uproot(module, AID.NUproot); +class SUproot(BossModule module) : Uproot(module, AID.SUproot); class C010DryadStates : StateMachineBuilder { @@ -62,17 +50,15 @@ public C010DryadStates(BossModule module, bool savage) : base(module) .ActivateOnEnter(savage) .ActivateOnEnter(savage) .ActivateOnEnter(savage) - .Raw.Update = () => (module.PrimaryActor.IsDestroyed || module.PrimaryActor.IsDead) && !module.Enemies(savage ? OID.SOdqan : OID.NOdqan).Any(a => !a.IsDead); + .Raw.Update = () => Module.PrimaryActor.IsDeadOrDestroyed && module.Enemies(savage ? OID.SOdqan : OID.NOdqan).All(a => a.IsDead); } } -class C010NDryadStates : C010DryadStates { public C010NDryadStates(BossModule module) : base(module, false) { } } -class C010SDryadStates : C010DryadStates { public C010SDryadStates(BossModule module) : base(module, true) { } } +class C010NDryadStates(BossModule module) : C010DryadStates(module, false); +class C010SDryadStates(BossModule module) : C010DryadStates(module, true); [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.NBoss, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 878, NameID = 11513, SortOrder = 4)] -public class C010NDryad : SimpleBossModule +public class C010NDryad(WorldState ws, Actor primary) : SimpleBossModule(ws, primary) { - public C010NDryad(WorldState ws, Actor primary) : base(ws, primary) { } - protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); @@ -81,10 +67,8 @@ protected override void DrawEnemies(int pcSlot, Actor pc) } [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.SBoss, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 879, NameID = 11513, SortOrder = 4)] -public class C010SDryad : SimpleBossModule +public class C010SDryad(WorldState ws, Actor primary) : SimpleBossModule(ws, primary) { - public C010SDryad(WorldState ws, Actor primary) : base(ws, primary) { } - protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); diff --git a/BossMod/Modules/Endwalker/Criterion/C01ASS/C010Trash/C010Dullahan.cs b/BossMod/Modules/Endwalker/Criterion/C01ASS/C010Trash/C010Dullahan.cs index f73e39307e..09c5ae0a1f 100644 --- a/BossMod/Modules/Endwalker/Criterion/C01ASS/C010Trash/C010Dullahan.cs +++ b/BossMod/Modules/Endwalker/Criterion/C01ASS/C010Trash/C010Dullahan.cs @@ -17,26 +17,17 @@ public enum AID : uint SInfernalPain = 31105, // Boss->self, 5.0s cast, raidwide } -class BlightedGloom : Components.SelfTargetedAOEs -{ - public BlightedGloom(AID aid) : base(ActionID.MakeSpell(aid), new AOEShapeCircle(10)) { } -} -class NBlightedGloom : BlightedGloom { public NBlightedGloom() : base(AID.NBlightedGloom) { } } -class SBlightedGloom : BlightedGloom { public SBlightedGloom() : base(AID.SBlightedGloom) { } } +class BlightedGloom(BossModule module, AID aid) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(aid), new AOEShapeCircle(10)); +class NBlightedGloom(BossModule module) : BlightedGloom(module, AID.NBlightedGloom); +class SBlightedGloom(BossModule module) : BlightedGloom(module, AID.SBlightedGloom); -class KingsWill : Components.CastHint -{ - public KingsWill(AID aid) : base(ActionID.MakeSpell(aid), "Damage increase buff") { } -} -class NKingsWill : KingsWill { public NKingsWill() : base(AID.NKingsWill) { } } -class SKingsWill : KingsWill { public SKingsWill() : base(AID.SKingsWill) { } } +class KingsWill(BossModule module, AID aid) : Components.CastHint(module, ActionID.MakeSpell(aid), "Damage increase buff"); +class NKingsWill(BossModule module) : KingsWill(module, AID.NKingsWill); +class SKingsWill(BossModule module) : KingsWill(module, AID.SKingsWill); -class InfernalPain : Components.RaidwideCast -{ - public InfernalPain(AID aid) : base(ActionID.MakeSpell(aid)) { } -} -class NInfernalPain : InfernalPain { public NInfernalPain() : base(AID.NInfernalPain) { } } -class SInfernalPain : InfernalPain { public SInfernalPain() : base(AID.SInfernalPain) { } } +class InfernalPain(BossModule module, AID aid) : Components.RaidwideCast(module, ActionID.MakeSpell(aid)); +class NInfernalPain(BossModule module) : InfernalPain(module, AID.NInfernalPain); +class SInfernalPain(BossModule module) : InfernalPain(module, AID.SInfernalPain); class C010DullahanStates : StateMachineBuilder { @@ -51,11 +42,11 @@ public C010DullahanStates(BossModule module, bool savage) : base(module) .ActivateOnEnter(savage); } } -class C010NDullahanStates : C010DullahanStates { public C010NDullahanStates(BossModule module) : base(module, false) { } } -class C010SDullahanStates : C010DullahanStates { public C010SDullahanStates(BossModule module) : base(module, true) { } } +class C010NDullahanStates(BossModule module) : C010DullahanStates(module, false); +class C010SDullahanStates(BossModule module) : C010DullahanStates(module, true); [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.NBoss, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 878, NameID = 11506, SortOrder = 7)] -public class C010NDullahan : SimpleBossModule { public C010NDullahan(WorldState ws, Actor primary) : base(ws, primary) { } } +public class C010NDullahan(WorldState ws, Actor primary) : SimpleBossModule(ws, primary); [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.SBoss, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 879, NameID = 11506, SortOrder = 7)] -public class C010SDullahan : SimpleBossModule { public C010SDullahan(WorldState ws, Actor primary) : base(ws, primary) { } } +public class C010SDullahan(WorldState ws, Actor primary) : SimpleBossModule(ws, primary); diff --git a/BossMod/Modules/Endwalker/Criterion/C01ASS/C010Trash/C010Kaluk.cs b/BossMod/Modules/Endwalker/Criterion/C01ASS/C010Trash/C010Kaluk.cs index 12fce08e1e..a9ef24d8bb 100644 --- a/BossMod/Modules/Endwalker/Criterion/C01ASS/C010Trash/C010Kaluk.cs +++ b/BossMod/Modules/Endwalker/Criterion/C01ASS/C010Trash/C010Kaluk.cs @@ -17,26 +17,17 @@ public enum AID : uint SCreepingIvy = 31101, // SBoss->self, 3.0s cast, range 10 90-degree cone aoe } -class RightSweep : Components.SelfTargetedAOEs -{ - public RightSweep(AID aid) : base(ActionID.MakeSpell(aid), new AOEShapeCone(30, 105.Degrees())) { } -} -class NRightSweep : RightSweep { public NRightSweep() : base(AID.NRightSweep) { } } -class SRightSweep : RightSweep { public SRightSweep() : base(AID.SRightSweep) { } } +class RightSweep(BossModule module, AID aid) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(aid), new AOEShapeCone(30, 105.Degrees())); +class NRightSweep(BossModule module) : RightSweep(module, AID.NRightSweep); +class SRightSweep(BossModule module) : RightSweep(module, AID.SRightSweep); -class LeftSweep : Components.SelfTargetedAOEs -{ - public LeftSweep(AID aid) : base(ActionID.MakeSpell(aid), new AOEShapeCone(30, 105.Degrees())) { } -} -class NLeftSweep : LeftSweep { public NLeftSweep() : base(AID.NLeftSweep) { } } -class SLeftSweep : LeftSweep { public SLeftSweep() : base(AID.SLeftSweep) { } } +class LeftSweep(BossModule module, AID aid) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(aid), new AOEShapeCone(30, 105.Degrees())); +class NLeftSweep(BossModule module) : LeftSweep(module, AID.NLeftSweep); +class SLeftSweep(BossModule module) : LeftSweep(module, AID.SLeftSweep); -class CreepingIvy : Components.SelfTargetedAOEs -{ - public CreepingIvy(AID aid) : base(ActionID.MakeSpell(aid), new AOEShapeCone(10, 45.Degrees())) { } -} -class NCreepingIvy : CreepingIvy { public NCreepingIvy() : base(AID.NCreepingIvy) { } } -class SCreepingIvy : CreepingIvy { public SCreepingIvy() : base(AID.SCreepingIvy) { } } +class CreepingIvy(BossModule module, AID aid) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(aid), new AOEShapeCone(10, 45.Degrees())); +class NCreepingIvy(BossModule module) : CreepingIvy(module, AID.NCreepingIvy); +class SCreepingIvy(BossModule module) : CreepingIvy(module, AID.SCreepingIvy); class C010KalukStates : StateMachineBuilder { @@ -51,11 +42,11 @@ public C010KalukStates(BossModule module, bool savage) : base(module) .ActivateOnEnter(savage); } } -class C010NKalukStates : C010KalukStates { public C010NKalukStates(BossModule module) : base(module, false) { } } -class C010SKalukStates : C010KalukStates { public C010SKalukStates(BossModule module) : base(module, true) { } } +class C010NKalukStates(BossModule module) : C010KalukStates(module, false); +class C010SKalukStates(BossModule module) : C010KalukStates(module, true); [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.NBoss, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 878, NameID = 11510, SortOrder = 2)] -public class C010NKaluk : SimpleBossModule { public C010NKaluk(WorldState ws, Actor primary) : base(ws, primary) { } } +public class C010NKaluk(WorldState ws, Actor primary) : SimpleBossModule(ws, primary); [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.SBoss, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 879, NameID = 11510, SortOrder = 2)] -public class C010SKaluk : SimpleBossModule { public C010SKaluk(WorldState ws, Actor primary) : base(ws, primary) { } } +public class C010SKaluk(WorldState ws, Actor primary) : SimpleBossModule(ws, primary); diff --git a/BossMod/Modules/Endwalker/Criterion/C01ASS/C010Trash/C010Udumbara.cs b/BossMod/Modules/Endwalker/Criterion/C01ASS/C010Trash/C010Udumbara.cs index 7eb3b3de5f..902b0160ca 100644 --- a/BossMod/Modules/Endwalker/Criterion/C01ASS/C010Trash/C010Udumbara.cs +++ b/BossMod/Modules/Endwalker/Criterion/C01ASS/C010Trash/C010Udumbara.cs @@ -1,4 +1,6 @@ -namespace BossMod.Endwalker.Criterion.C01ASS.C010Udumbara; +using BossMod; + +namespace BossMod.Endwalker.Criterion.C01ASS.C010Udumbara; public enum OID : uint { @@ -21,33 +23,21 @@ public enum AID : uint SBloodyCaress = 31095, // SSapria->self, 3.0s cast, range 12 120-degree cone } -class HoneyedLeft : Components.SelfTargetedAOEs -{ - public HoneyedLeft(AID aid) : base(ActionID.MakeSpell(aid), new AOEShapeCone(30, 90.Degrees())) { } -} -class NHoneyedLeft : HoneyedLeft { public NHoneyedLeft() : base(AID.NHoneyedLeft) { } } -class SHoneyedLeft : HoneyedLeft { public SHoneyedLeft() : base(AID.SHoneyedLeft) { } } +class HoneyedLeft(BossModule module, AID aid) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(aid), new AOEShapeCone(30, 90.Degrees())); +class NHoneyedLeft(BossModule module) : HoneyedLeft(module, AID.NHoneyedLeft); +class SHoneyedLeft(BossModule module) : HoneyedLeft(module, AID.SHoneyedLeft); -class HoneyedRight : Components.SelfTargetedAOEs -{ - public HoneyedRight(AID aid) : base(ActionID.MakeSpell(aid), new AOEShapeCone(30, 90.Degrees())) { } -} -class NHoneyedRight : HoneyedRight { public NHoneyedRight() : base(AID.NHoneyedRight) { } } -class SHoneyedRight : HoneyedRight { public SHoneyedRight() : base(AID.SHoneyedRight) { } } +class HoneyedRight(BossModule module, AID aid) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(aid), new AOEShapeCone(30, 90.Degrees())); +class NHoneyedRight(BossModule module) : HoneyedRight(module, AID.NHoneyedRight); +class SHoneyedRight(BossModule module) : HoneyedRight(module, AID.SHoneyedRight); -class HoneyedFront : Components.SelfTargetedAOEs -{ - public HoneyedFront(AID aid) : base(ActionID.MakeSpell(aid), new AOEShapeCone(30, 60.Degrees())) { } -} -class NHoneyedFront : HoneyedFront { public NHoneyedFront() : base(AID.NHoneyedFront) { } } -class SHoneyedFront : HoneyedFront { public SHoneyedFront() : base(AID.SHoneyedFront) { } } +class HoneyedFront(BossModule module, AID aid) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(aid), new AOEShapeCone(30, 60.Degrees())); +class NHoneyedFront(BossModule module) : HoneyedFront(module, AID.NHoneyedFront); +class SHoneyedFront(BossModule module) : HoneyedFront(module, AID.SHoneyedFront); -class BloodyCaress : Components.SelfTargetedAOEs -{ - public BloodyCaress(AID aid) : base(ActionID.MakeSpell(aid), new AOEShapeCone(12, 60.Degrees())) { } -} -class NBloodyCaress : BloodyCaress { public NBloodyCaress() : base(AID.NBloodyCaress) { } } -class SBloodyCaress : BloodyCaress { public SBloodyCaress() : base(AID.SBloodyCaress) { } } +class BloodyCaress(BossModule module, AID aid) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(aid), new AOEShapeCone(12, 60.Degrees())); +class NBloodyCaress(BossModule module) : BloodyCaress(module, AID.NBloodyCaress); +class SBloodyCaress(BossModule module) : BloodyCaress(module, AID.SBloodyCaress); class C010UdumbaraStates : StateMachineBuilder { @@ -62,17 +52,15 @@ public C010UdumbaraStates(BossModule module, bool savage) : base(module) .ActivateOnEnter(savage) .ActivateOnEnter(savage) .ActivateOnEnter(savage) - .Raw.Update = () => (module.PrimaryActor.IsDestroyed || module.PrimaryActor.IsDead) && !module.Enemies(savage ? OID.SSapria : OID.NSapria).Any(a => !a.IsDead); + .Raw.Update = () => Module.PrimaryActor.IsDeadOrDestroyed && module.Enemies(savage ? OID.SSapria : OID.NSapria).All(a => a.IsDead); } } -class C010NUdumbaraStates : C010UdumbaraStates { public C010NUdumbaraStates(BossModule module) : base(module, false) { } } -class C010SUdumbaraStates : C010UdumbaraStates { public C010SUdumbaraStates(BossModule module) : base(module, true) { } } +class C010NUdumbaraStates(BossModule module) : C010UdumbaraStates(module, false); +class C010SUdumbaraStates(BossModule module) : C010UdumbaraStates(module, true); [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.NBoss, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 878, NameID = 11511, SortOrder = 3)] -public class C010NUdumbara : SimpleBossModule +public class C010NUdumbara(WorldState ws, Actor primary) : SimpleBossModule(ws, primary) { - public C010NUdumbara(WorldState ws, Actor primary) : base(ws, primary) { } - protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); @@ -81,10 +69,8 @@ protected override void DrawEnemies(int pcSlot, Actor pc) } [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.SBoss, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 879, NameID = 11511, SortOrder = 3)] -public class C010SUdumbara : SimpleBossModule +public class C010SUdumbara(WorldState ws, Actor primary) : SimpleBossModule(ws, primary) { - public C010SUdumbara(WorldState ws, Actor primary) : base(ws, primary) { } - protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); diff --git a/BossMod/Modules/Endwalker/Criterion/C01ASS/C011Silkie/C011Silkie.cs b/BossMod/Modules/Endwalker/Criterion/C01ASS/C011Silkie/C011Silkie.cs index a8d455578d..bb75e273fe 100644 --- a/BossMod/Modules/Endwalker/Criterion/C01ASS/C011Silkie/C011Silkie.cs +++ b/BossMod/Modules/Endwalker/Criterion/C01ASS/C011Silkie/C011Silkie.cs @@ -1,53 +1,32 @@ namespace BossMod.Endwalker.Criterion.C01ASS.C011Silkie; -class FizzlingDuster : Components.SelfTargetedAOEs -{ - public FizzlingDuster(AID aid) : base(ActionID.MakeSpell(aid), C011Silkie.ShapeYellow) { } -} -class NFizzlingDuster : FizzlingDuster { public NFizzlingDuster() : base(AID.NFizzlingDusterAOE) { } } -class SFizzlingDuster : FizzlingDuster { public SFizzlingDuster() : base(AID.SFizzlingDusterAOE) { } } +class FizzlingDuster(BossModule module, AID aid) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(aid), C011Silkie.ShapeYellow); +class NFizzlingDuster(BossModule module) : FizzlingDuster(module, AID.NFizzlingDusterAOE); +class SFizzlingDuster(BossModule module) : FizzlingDuster(module, AID.SFizzlingDusterAOE); -class DustBluster : Components.KnockbackFromCastTarget -{ - public DustBluster(AID aid) : base(ActionID.MakeSpell(aid), 16) { } -} -class NDustBluster : DustBluster { public NDustBluster() : base(AID.NDustBluster) { } } -class SDustBluster : DustBluster { public SDustBluster() : base(AID.SDustBluster) { } } +class DustBluster(BossModule module, AID aid) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(aid), 16); +class NDustBluster(BossModule module) : DustBluster(module, AID.NDustBluster); +class SDustBluster(BossModule module) : DustBluster(module, AID.SDustBluster); -class SqueakyCleanE : Components.SelfTargetedAOEs -{ - public SqueakyCleanE(AID aid) : base(ActionID.MakeSpell(aid), new AOEShapeCone(60, 112.5f.Degrees())) { } -} -class NSqueakyCleanE : SqueakyCleanE { public NSqueakyCleanE() : base(AID.NSqueakyCleanAOE3E) { } } -class SSqueakyCleanE : SqueakyCleanE { public SSqueakyCleanE() : base(AID.SSqueakyCleanAOE3E) { } } +class SqueakyCleanE(BossModule module, AID aid) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(aid), new AOEShapeCone(60, 112.5f.Degrees())); +class NSqueakyCleanE(BossModule module) : SqueakyCleanE(module, AID.NSqueakyCleanAOE3E); +class SSqueakyCleanE(BossModule module) : SqueakyCleanE(module, AID.SSqueakyCleanAOE3E); -class SqueakyCleanW : Components.SelfTargetedAOEs -{ - public SqueakyCleanW(AID aid) : base(ActionID.MakeSpell(aid), new AOEShapeCone(60, 112.5f.Degrees())) { } -} -class NSqueakyCleanW : SqueakyCleanW { public NSqueakyCleanW() : base(AID.NSqueakyCleanAOE3W) { } } -class SSqueakyCleanW : SqueakyCleanW { public SSqueakyCleanW() : base(AID.SSqueakyCleanAOE3W) { } } +class SqueakyCleanW(BossModule module, AID aid) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(aid), new AOEShapeCone(60, 112.5f.Degrees())); +class NSqueakyCleanW(BossModule module) : SqueakyCleanW(module, AID.NSqueakyCleanAOE3W); +class SSqueakyCleanW(BossModule module) : SqueakyCleanW(module, AID.SSqueakyCleanAOE3W); -class ChillingDusterPuff : Components.SelfTargetedAOEs -{ - public ChillingDusterPuff(AID aid) : base(ActionID.MakeSpell(aid), C011Silkie.ShapeBlue) { } -} -class NChillingDusterPuff : ChillingDusterPuff { public NChillingDusterPuff() : base(AID.NChillingDusterPuff) { } } -class SChillingDusterPuff : ChillingDusterPuff { public SChillingDusterPuff() : base(AID.SChillingDusterPuff) { } } +class ChillingDusterPuff(BossModule module, AID aid) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(aid), C011Silkie.ShapeBlue); +class NChillingDusterPuff(BossModule module) : ChillingDusterPuff(module, AID.NChillingDusterPuff); +class SChillingDusterPuff(BossModule module) : ChillingDusterPuff(module, AID.SChillingDusterPuff); -class BracingDusterPuff : Components.SelfTargetedAOEs -{ - public BracingDusterPuff(AID aid) : base(ActionID.MakeSpell(aid), C011Silkie.ShapeGreen) { } -} -class NBracingDusterPuff : BracingDusterPuff { public NBracingDusterPuff() : base(AID.NBracingDusterPuff) { } } -class SBracingDusterPuff : BracingDusterPuff { public SBracingDusterPuff() : base(AID.SBracingDusterPuff) { } } +class BracingDusterPuff(BossModule module, AID aid) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(aid), C011Silkie.ShapeGreen); +class NBracingDusterPuff(BossModule module) : BracingDusterPuff(module, AID.NBracingDusterPuff); +class SBracingDusterPuff(BossModule module) : BracingDusterPuff(module, AID.SBracingDusterPuff); -class FizzlingDusterPuff : Components.SelfTargetedAOEs -{ - public FizzlingDusterPuff(AID aid) : base(ActionID.MakeSpell(aid), C011Silkie.ShapeYellow) { } -} -class NFizzlingDusterPuff : FizzlingDusterPuff { public NFizzlingDusterPuff() : base(AID.NFizzlingDusterPuff) { } } -class SFizzlingDusterPuff : FizzlingDusterPuff { public SFizzlingDusterPuff() : base(AID.SFizzlingDusterPuff) { } } +class FizzlingDusterPuff(BossModule module, AID aid) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(aid), C011Silkie.ShapeYellow); +class NFizzlingDusterPuff(BossModule module) : FizzlingDusterPuff(module, AID.NFizzlingDusterPuff); +class SFizzlingDusterPuff(BossModule module) : FizzlingDusterPuff(module, AID.SFizzlingDusterPuff); public abstract class C011Silkie : BossModule { @@ -59,7 +38,7 @@ public abstract class C011Silkie : BossModule } [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.NBoss, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 878, NameID = 11369, SortOrder = 5)] -public class C011NSilkie : C011Silkie { public C011NSilkie(WorldState ws, Actor primary) : base(ws, primary) { } } +public class C011NSilkie(WorldState ws, Actor primary) : C011Silkie(ws, primary); [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.SBoss, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 879, NameID = 11369, SortOrder = 5)] -public class C011SSilkie : C011Silkie { public C011SSilkie(WorldState ws, Actor primary) : base(ws, primary) { } } +public class C011SSilkie(WorldState ws, Actor primary) : C011Silkie(ws, primary); diff --git a/BossMod/Modules/Endwalker/Criterion/C01ASS/C011Silkie/C011SilkieStates.cs b/BossMod/Modules/Endwalker/Criterion/C01ASS/C011Silkie/C011SilkieStates.cs index 681cf565ba..890df44eca 100644 --- a/BossMod/Modules/Endwalker/Criterion/C01ASS/C011Silkie/C011SilkieStates.cs +++ b/BossMod/Modules/Endwalker/Criterion/C01ASS/C011Silkie/C011SilkieStates.cs @@ -179,5 +179,5 @@ private void Tethers2(uint id, float delay) } } -class C011NSilkieStates : C011SilkieStates { public C011NSilkieStates(BossModule module) : base(module, false) { } } -class C011SSilkieStates : C011SilkieStates { public C011SSilkieStates(BossModule module) : base(module, true) { } } +class C011NSilkieStates(BossModule module) : C011SilkieStates(module, false); +class C011SSilkieStates(BossModule module) : C011SilkieStates(module, true); diff --git a/BossMod/Modules/Endwalker/Criterion/C01ASS/C011Silkie/EasternEwers.cs b/BossMod/Modules/Endwalker/Criterion/C01ASS/C011Silkie/EasternEwers.cs index 445f792811..0edc20c7c8 100644 --- a/BossMod/Modules/Endwalker/Criterion/C01ASS/C011Silkie/EasternEwers.cs +++ b/BossMod/Modules/Endwalker/Criterion/C01ASS/C011Silkie/EasternEwers.cs @@ -1,10 +1,8 @@ namespace BossMod.Endwalker.Criterion.C01ASS.C011Silkie; -class EasternEwers : Components.Exaflare +class EasternEwers(BossModule module) : Components.Exaflare(module, 4) { - public EasternEwers() : base(4) { } - - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.NBrimOver or AID.SBrimOver) { @@ -12,18 +10,18 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.NBrimOver or AID.SBrimOver or AID.NRinse or AID.SRinse) { int index = Lines.FindIndex(item => Math.Abs(item.Next.X - caster.Position.X) < 1); if (index == -1) { - module.ReportError(this, $"Failed to find entry for {caster.InstanceID:X}"); + ReportError($"Failed to find entry for {caster.InstanceID:X}"); return; } - AdvanceLine(module, Lines[index], caster.Position); + AdvanceLine(Lines[index], caster.Position); if (Lines[index].ExplosionsLeft == 0) Lines.RemoveAt(index); } diff --git a/BossMod/Modules/Endwalker/Criterion/C01ASS/C011Silkie/PuffTethers.cs b/BossMod/Modules/Endwalker/Criterion/C01ASS/C011Silkie/PuffTethers.cs index e0443523e0..adced315f1 100644 --- a/BossMod/Modules/Endwalker/Criterion/C01ASS/C011Silkie/PuffTethers.cs +++ b/BossMod/Modules/Endwalker/Criterion/C01ASS/C011Silkie/PuffTethers.cs @@ -8,42 +8,38 @@ class PuffTethers : BossComponent private static readonly uint _hintColor = 0x40008080; - public PuffTethers(bool originAtBoss) + public PuffTethers(BossModule module, bool originAtBoss) : base(module) { _originAtBoss = originAtBoss; - } - - public override void Init(BossModule module) - { _tracker = module.FindComponent(); } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { if (_tracker == null) return; - DrawTetherHints(module, pc, _tracker.ChillingPuffs, false); - DrawTetherHints(module, pc, _tracker.FizzlingPuffs, true); + DrawTetherHints(pc, _tracker.ChillingPuffs, false); + DrawTetherHints(pc, _tracker.FizzlingPuffs, true); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (_tracker == null) return; - DrawTether(module, pc, _tracker.ChillingPuffs); - DrawTether(module, pc, _tracker.FizzlingPuffs); + DrawTether(pc, _tracker.ChillingPuffs); + DrawTether(pc, _tracker.FizzlingPuffs); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { - if (actor != module.PrimaryActor) + if (actor != Module.PrimaryActor) return; var color = SlipperySoap.ColorForStatus(status.ID); if (color != SlipperySoap.Color.None) _bossColor = color; } - private void DrawTetherHints(BossModule module, Actor player, List puffs, bool yellow) + private void DrawTetherHints(Actor player, List puffs, bool yellow) { var source = puffs.Find(p => p.Tether.Target == player.InstanceID); if (source == null) @@ -54,37 +50,36 @@ private void DrawTetherHints(BossModule module, Actor player, List puffs, var moveAngle = Angle.FromDirection(moveDir); if (yellow) { - C011Silkie.ShapeYellow.Draw(module.Arena, movePos, moveAngle + 45.Degrees(), _hintColor); - C011Silkie.ShapeYellow.Draw(module.Arena, movePos, moveAngle + 135.Degrees(), _hintColor); - C011Silkie.ShapeYellow.Draw(module.Arena, movePos, moveAngle - 135.Degrees(), _hintColor); - C011Silkie.ShapeYellow.Draw(module.Arena, movePos, moveAngle - 45.Degrees(), _hintColor); + C011Silkie.ShapeYellow.Draw(Arena, movePos, moveAngle + 45.Degrees(), _hintColor); + C011Silkie.ShapeYellow.Draw(Arena, movePos, moveAngle + 135.Degrees(), _hintColor); + C011Silkie.ShapeYellow.Draw(Arena, movePos, moveAngle - 135.Degrees(), _hintColor); + C011Silkie.ShapeYellow.Draw(Arena, movePos, moveAngle - 45.Degrees(), _hintColor); } else { - C011Silkie.ShapeBlue.Draw(module.Arena, movePos, moveAngle, _hintColor); + C011Silkie.ShapeBlue.Draw(Arena, movePos, moveAngle, _hintColor); } - var bossOrigin = _originAtBoss ? module.PrimaryActor.Position : module.Bounds.Center; + var bossOrigin = _originAtBoss ? Module.PrimaryActor.Position : Module.Bounds.Center; switch (_bossColor) { case SlipperySoap.Color.Green: - C011Silkie.ShapeGreen.Draw(module.Arena, bossOrigin, new(), _hintColor); + C011Silkie.ShapeGreen.Draw(Arena, bossOrigin, new(), _hintColor); break; case SlipperySoap.Color.Blue: - C011Silkie.ShapeBlue.Draw(module.Arena, bossOrigin, new(), _hintColor); + C011Silkie.ShapeBlue.Draw(Arena, bossOrigin, new(), _hintColor); break; } } - private void DrawTether(BossModule module, Actor player, List puffs) + private void DrawTether(Actor player, List puffs) { var source = puffs.Find(p => p.Tether.Target == player.InstanceID); if (source != null) { - module.Arena.AddLine(source.Position, player.Position, ArenaColor.Danger); + Arena.AddLine(source.Position, player.Position, ArenaColor.Danger); } } } - -class PuffTethers1 : PuffTethers { public PuffTethers1() : base(false) { } } -class PuffTethers2 : PuffTethers { public PuffTethers2() : base(true) { } } +class PuffTethers1(BossModule module) : PuffTethers(module, false); +class PuffTethers2(BossModule module) : PuffTethers(module, true); diff --git a/BossMod/Modules/Endwalker/Criterion/C01ASS/C011Silkie/PuffTracker.cs b/BossMod/Modules/Endwalker/Criterion/C01ASS/C011Silkie/PuffTracker.cs index 1693d10300..09d8fadb6f 100644 --- a/BossMod/Modules/Endwalker/Criterion/C01ASS/C011Silkie/PuffTracker.cs +++ b/BossMod/Modules/Endwalker/Criterion/C01ASS/C011Silkie/PuffTracker.cs @@ -1,19 +1,19 @@ namespace BossMod.Endwalker.Criterion.C01ASS.C011Silkie; -class PuffTracker : BossComponent +class PuffTracker(BossModule module) : BossComponent(module) { public List BracingPuffs = new(); public List ChillingPuffs = new(); public List FizzlingPuffs = new(); - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - arena.Actors(BracingPuffs, 0xff80ff80, true); - arena.Actors(ChillingPuffs, 0xffff8040, true); - arena.Actors(FizzlingPuffs, 0xff40c0c0, true); + Arena.Actors(BracingPuffs, 0xff80ff80, true); + Arena.Actors(ChillingPuffs, 0xffff8040, true); + Arena.Actors(FizzlingPuffs, 0xff40c0c0, true); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { switch ((SID)status.ID) { @@ -35,7 +35,7 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st } } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { switch ((SID)status.ID) { diff --git a/BossMod/Modules/Endwalker/Criterion/C01ASS/C011Silkie/SlipperySoap.cs b/BossMod/Modules/Endwalker/Criterion/C01ASS/C011Silkie/SlipperySoap.cs index a545c430f0..03b5f2e8cc 100644 --- a/BossMod/Modules/Endwalker/Criterion/C01ASS/C011Silkie/SlipperySoap.cs +++ b/BossMod/Modules/Endwalker/Criterion/C01ASS/C011Silkie/SlipperySoap.cs @@ -13,7 +13,7 @@ public enum Color { None, Green, Blue, Yellow } }; } -class SlipperySoapCharge : Components.Knockback +class SlipperySoapCharge(BossModule module) : Components.Knockback(module) { private Actor? _chargeTarget; private Angle _chargeDir; @@ -23,28 +23,28 @@ class SlipperySoapCharge : Components.Knockback public bool ChargeImminent => _chargeTarget != null; - public override IEnumerable Sources(BossModule module, int slot, Actor actor) + public override IEnumerable Sources(int slot, Actor actor) { if (_chargeTarget != null && _color == SlipperySoap.Color.Green) - yield return new(module.PrimaryActor.Position, 15, _chargeResolve, _chargeShape, _chargeDir, Kind.DirForward); + yield return new(Module.PrimaryActor.Position, 15, _chargeResolve, _chargeShape, _chargeDir, Kind.DirForward); } - public override void Update(BossModule module) + public override void Update() { if (_chargeTarget != null) { - var toTarget = _chargeTarget.Position - module.PrimaryActor.Position; + var toTarget = _chargeTarget.Position - Module.PrimaryActor.Position; _chargeShape.LengthFront = toTarget.Length() + 0.01f; // add eps to ensure charge target is considered 'inside' _chargeDir = Angle.FromDirection(toTarget); // keep shape's offset zero to properly support dir-forward } } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { - base.AddHints(module, slot, actor, hints, movementHints); + base.AddHints(slot, actor, hints); if (_chargeTarget != null) { - if (_chargeTarget != actor && !_chargeShape.Check(actor.Position, module.PrimaryActor.Position, _chargeDir)) + if (_chargeTarget != actor && !_chargeShape.Check(actor.Position, Module.PrimaryActor.Position, _chargeDir)) hints.Add("Stack inside charge!"); switch (_color) @@ -59,30 +59,30 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { if (_chargeTarget != null) - _chargeShape.Draw(arena, module.PrimaryActor.Position, _chargeDir, ArenaColor.SafeFromAOE); + _chargeShape.Draw(Arena, Module.PrimaryActor.Position, _chargeDir, ArenaColor.SafeFromAOE); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { - base.OnStatusGain(module, actor, status); - if (actor != module.PrimaryActor) + base.OnStatusGain(actor, status); + if (actor != Module.PrimaryActor) return; var color = SlipperySoap.ColorForStatus(status.ID); if (color != SlipperySoap.Color.None) _color = color; } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { - base.OnEventCast(module, caster, spell); + base.OnEventCast(caster, spell); switch ((AID)spell.Action.ID) { case AID.SlipperySoapTargetSelection: - _chargeTarget = module.WorldState.Actors.Find(spell.MainTargetID); - _chargeResolve = module.WorldState.CurrentTime.AddSeconds(5.5f); + _chargeTarget = WorldState.Actors.Find(spell.MainTargetID); + _chargeResolve = WorldState.FutureTime(5.5f); break; case AID.NSlipperySoapAOEBlue: case AID.NSlipperySoapAOEGreen: @@ -96,57 +96,55 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } -class SlipperySoapAOE : Components.GenericAOEs +class SlipperySoapAOE(BossModule module) : Components.GenericAOEs(module) { private SlipperySoap.Color _color; public bool Active => _color != SlipperySoap.Color.None; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { // TODO: activation switch (_color) { case SlipperySoap.Color.Green: - yield return new(C011Silkie.ShapeGreen, module.PrimaryActor.Position, module.PrimaryActor.Rotation); + yield return new(C011Silkie.ShapeGreen, Module.PrimaryActor.Position, Module.PrimaryActor.Rotation); break; case SlipperySoap.Color.Blue: - yield return new(C011Silkie.ShapeBlue, module.PrimaryActor.Position, module.PrimaryActor.Rotation); + yield return new(C011Silkie.ShapeBlue, Module.PrimaryActor.Position, Module.PrimaryActor.Rotation); break; case SlipperySoap.Color.Yellow: - yield return new(C011Silkie.ShapeYellow, module.PrimaryActor.Position, module.PrimaryActor.Rotation + 45.Degrees()); - yield return new(C011Silkie.ShapeYellow, module.PrimaryActor.Position, module.PrimaryActor.Rotation + 135.Degrees()); - yield return new(C011Silkie.ShapeYellow, module.PrimaryActor.Position, module.PrimaryActor.Rotation - 135.Degrees()); - yield return new(C011Silkie.ShapeYellow, module.PrimaryActor.Position, module.PrimaryActor.Rotation - 45.Degrees()); + yield return new(C011Silkie.ShapeYellow, Module.PrimaryActor.Position, Module.PrimaryActor.Rotation + 45.Degrees()); + yield return new(C011Silkie.ShapeYellow, Module.PrimaryActor.Position, Module.PrimaryActor.Rotation + 135.Degrees()); + yield return new(C011Silkie.ShapeYellow, Module.PrimaryActor.Position, Module.PrimaryActor.Rotation - 135.Degrees()); + yield return new(C011Silkie.ShapeYellow, Module.PrimaryActor.Position, Module.PrimaryActor.Rotation - 45.Degrees()); break; } } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { - if (actor != module.PrimaryActor) + if (actor != Module.PrimaryActor) return; var color = SlipperySoap.ColorForStatus(status.ID); if (color != SlipperySoap.Color.None) _color = color; } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { - base.OnEventCast(module, caster, spell); + base.OnEventCast(caster, spell); if ((AID)spell.Action.ID is AID.NChillingDusterBoss or AID.NBracingDusterBoss or AID.NFizzlingDusterBoss or AID.SChillingDusterBoss or AID.SBracingDusterBoss or AID.SFizzlingDusterBoss) _color = SlipperySoap.Color.None; } } // note: we don't wait for forked lightning statuses to appear -class SoapsudStatic : Components.UniformStackSpread +class SoapsudStatic(BossModule module) : Components.UniformStackSpread(module, 0, 5) { - public SoapsudStatic() : base(0, 5) { } - - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { - if (actor == module.PrimaryActor && SlipperySoap.ColorForStatus(status.ID) == SlipperySoap.Color.Yellow) - AddSpreads(module.Raid.WithoutSlot(true)); + if (actor == Module.PrimaryActor && SlipperySoap.ColorForStatus(status.ID) == SlipperySoap.Color.Yellow) + AddSpreads(Raid.WithoutSlot(true)); } } diff --git a/BossMod/Modules/Endwalker/Criterion/C01ASS/C012Gladiator/C012Gladiator.cs b/BossMod/Modules/Endwalker/Criterion/C01ASS/C012Gladiator/C012Gladiator.cs index 3b607c035a..2a81f23ea3 100644 --- a/BossMod/Modules/Endwalker/Criterion/C01ASS/C012Gladiator/C012Gladiator.cs +++ b/BossMod/Modules/Endwalker/Criterion/C01ASS/C012Gladiator/C012Gladiator.cs @@ -1,26 +1,17 @@ namespace BossMod.Endwalker.Criterion.C01ASS.C012Gladiator; -class RushOfMightFront : Components.SelfTargetedAOEs -{ - public RushOfMightFront(AID aid) : base(ActionID.MakeSpell(aid), new AOEShapeCone(60, 90.Degrees())) { } -} -class NRushOfMightFront : RushOfMightFront { public NRushOfMightFront() : base(AID.NRushOfMightFront) { } } -class SRushOfMightFront : RushOfMightFront { public SRushOfMightFront() : base(AID.SRushOfMightFront) { } } +class RushOfMightFront(BossModule module, AID aid) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(aid), new AOEShapeCone(60, 90.Degrees())); +class NRushOfMightFront(BossModule module) : RushOfMightFront(module, AID.NRushOfMightFront); +class SRushOfMightFront(BossModule module) : RushOfMightFront(module, AID.SRushOfMightFront); -class RushOfMightBack : Components.SelfTargetedAOEs -{ - public RushOfMightBack(AID aid) : base(ActionID.MakeSpell(aid), new AOEShapeCone(60, 90.Degrees())) { } -} -class NRushOfMightBack : RushOfMightBack { public NRushOfMightBack() : base(AID.NRushOfMightBack) { } } -class SRushOfMightBack : RushOfMightBack { public SRushOfMightBack() : base(AID.SRushOfMightBack) { } } +class RushOfMightBack(BossModule module, AID aid) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(aid), new AOEShapeCone(60, 90.Degrees())); +class NRushOfMightBack(BossModule module) : RushOfMightBack(module, AID.NRushOfMightBack); +class SRushOfMightBack(BossModule module) : RushOfMightBack(module, AID.SRushOfMightBack); -public abstract class C012Gladiator : BossModule -{ - public C012Gladiator(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsSquare(new(-35, -271), 20)) { } -} +public abstract class C012Gladiator(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsSquare(new(-35, -271), 20)); [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.NBoss, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 878, NameID = 11387, SortOrder = 8)] -public class C012NGladiator : C012Gladiator { public C012NGladiator(WorldState ws, Actor primary) : base(ws, primary) { } } +public class C012NGladiator(WorldState ws, Actor primary) : C012Gladiator(ws, primary); [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.SBoss, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 879, NameID = 11387, SortOrder = 8)] -public class C012SGladiator : C012Gladiator { public C012SGladiator(WorldState ws, Actor primary) : base(ws, primary) { } } +public class C012SGladiator(WorldState ws, Actor primary) : C012Gladiator(ws, primary); diff --git a/BossMod/Modules/Endwalker/Criterion/C01ASS/C012Gladiator/C012GladiatorStates.cs b/BossMod/Modules/Endwalker/Criterion/C01ASS/C012Gladiator/C012GladiatorStates.cs index 6782d4ea8a..764f734498 100644 --- a/BossMod/Modules/Endwalker/Criterion/C01ASS/C012Gladiator/C012GladiatorStates.cs +++ b/BossMod/Modules/Endwalker/Criterion/C01ASS/C012Gladiator/C012GladiatorStates.cs @@ -172,5 +172,5 @@ private void CurseOfTheMonument(uint id, float delay) } } -class C012NGladiatorStates : C012GladiatorStates { public C012NGladiatorStates(BossModule module) : base(module, false) { } } -class C012SGladiatorStates : C012GladiatorStates { public C012SGladiatorStates(BossModule module) : base(module, true) { } } +class C012NGladiatorStates(BossModule module) : C012GladiatorStates(module, false); +class C012SGladiatorStates(BossModule module) : C012GladiatorStates(module, true); diff --git a/BossMod/Modules/Endwalker/Criterion/C01ASS/C012Gladiator/CurseOfTheFallen.cs b/BossMod/Modules/Endwalker/Criterion/C01ASS/C012Gladiator/CurseOfTheFallen.cs index 45ac208891..701076fbc7 100644 --- a/BossMod/Modules/Endwalker/Criterion/C01ASS/C012Gladiator/CurseOfTheFallen.cs +++ b/BossMod/Modules/Endwalker/Criterion/C01ASS/C012Gladiator/CurseOfTheFallen.cs @@ -1,6 +1,6 @@ namespace BossMod.Endwalker.Criterion.C01ASS.C012Gladiator; -class CurseOfTheFallen : Components.UniformStackSpread +class CurseOfTheFallen(BossModule module) : Components.UniformStackSpread(module, 5, 6, 3, 3, true) { private List _fallen = new(); private Actor? _thunderous; @@ -9,9 +9,7 @@ class CurseOfTheFallen : Components.UniformStackSpread private DateTime _stackResolve; private bool _dirty; - public CurseOfTheFallen() : base(5, 6, 3, 3, true) { } - - public override void Update(BossModule module) + public override void Update() { if (_dirty) { @@ -29,10 +27,10 @@ public override void Update(BossModule module) AddStack(_thunderous, _stackResolve, _lingering); } } - base.Update(module); + base.Update(); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { switch ((SID)status.ID) { @@ -47,13 +45,13 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st _dirty = true; break; case SID.LingeringEchoes: - _lingering.Set(module.Raid.FindSlot(actor.InstanceID)); + _lingering.Set(Raid.FindSlot(actor.InstanceID)); _dirty = true; break; } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { @@ -76,44 +74,26 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } -class RingOfMight1Out : Components.SelfTargetedAOEs -{ - public RingOfMight1Out(AID aid) : base(ActionID.MakeSpell(aid), new AOEShapeCircle(8)) { } -} -class NRingOfMight1Out : RingOfMight1Out { public NRingOfMight1Out() : base(AID.NRingOfMight1Out) { } } -class SRingOfMight1Out : RingOfMight1Out { public SRingOfMight1Out() : base(AID.SRingOfMight1Out) { } } +class RingOfMight1Out(BossModule module, AID aid) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(aid), new AOEShapeCircle(8)); +class NRingOfMight1Out(BossModule module) : RingOfMight1Out(module, AID.NRingOfMight1Out); +class SRingOfMight1Out(BossModule module) : RingOfMight1Out(module, AID.SRingOfMight1Out); -class RingOfMight2Out : Components.SelfTargetedAOEs -{ - public RingOfMight2Out(AID aid) : base(ActionID.MakeSpell(aid), new AOEShapeCircle(13)) { } -} -class NRingOfMight2Out : RingOfMight2Out { public NRingOfMight2Out() : base(AID.NRingOfMight2Out) { } } -class SRingOfMight2Out : RingOfMight2Out { public SRingOfMight2Out() : base(AID.SRingOfMight2Out) { } } +class RingOfMight2Out(BossModule module, AID aid) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(aid), new AOEShapeCircle(13)); +class NRingOfMight2Out(BossModule module) : RingOfMight2Out(module, AID.NRingOfMight2Out); +class SRingOfMight2Out(BossModule module) : RingOfMight2Out(module, AID.SRingOfMight2Out); -class RingOfMight3Out : Components.SelfTargetedAOEs -{ - public RingOfMight3Out(AID aid) : base(ActionID.MakeSpell(aid), new AOEShapeCircle(18)) { } -} -class NRingOfMight3Out : RingOfMight3Out { public NRingOfMight3Out() : base(AID.NRingOfMight3Out) { } } -class SRingOfMight3Out : RingOfMight3Out { public SRingOfMight3Out() : base(AID.SRingOfMight3Out) { } } +class RingOfMight3Out(BossModule module, AID aid) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(aid), new AOEShapeCircle(18)); +class NRingOfMight3Out(BossModule module) : RingOfMight3Out(module, AID.NRingOfMight3Out); +class SRingOfMight3Out(BossModule module) : RingOfMight3Out(module, AID.SRingOfMight3Out); -class RingOfMight1In : Components.SelfTargetedAOEs -{ - public RingOfMight1In(AID aid) : base(ActionID.MakeSpell(aid), new AOEShapeDonut(8, 30)) { } -} -class NRingOfMight1In : RingOfMight1In { public NRingOfMight1In() : base(AID.NRingOfMight1In) { } } -class SRingOfMight1In : RingOfMight1In { public SRingOfMight1In() : base(AID.SRingOfMight1In) { } } +class RingOfMight1In(BossModule module, AID aid) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(aid), new AOEShapeDonut(8, 30)); +class NRingOfMight1In(BossModule module) : RingOfMight1In(module, AID.NRingOfMight1In); +class SRingOfMight1In(BossModule module) : RingOfMight1In(module, AID.SRingOfMight1In); -class RingOfMight2In : Components.SelfTargetedAOEs -{ - public RingOfMight2In(AID aid) : base(ActionID.MakeSpell(aid), new AOEShapeDonut(13, 30)) { } -} -class NRingOfMight2In : RingOfMight2In { public NRingOfMight2In() : base(AID.NRingOfMight2In) { } } -class SRingOfMight2In : RingOfMight2In { public SRingOfMight2In() : base(AID.SRingOfMight2In) { } } +class RingOfMight2In(BossModule module, AID aid) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(aid), new AOEShapeDonut(13, 30)); +class NRingOfMight2In(BossModule module) : RingOfMight2In(module, AID.NRingOfMight2In); +class SRingOfMight2In(BossModule module) : RingOfMight2In(module, AID.SRingOfMight2In); -class RingOfMight3In : Components.SelfTargetedAOEs -{ - public RingOfMight3In(AID aid) : base(ActionID.MakeSpell(aid), new AOEShapeDonut(18, 30)) { } -} -class NRingOfMight3In : RingOfMight3In { public NRingOfMight3In() : base(AID.NRingOfMight3In) { } } -class SRingOfMight3In : RingOfMight3In { public SRingOfMight3In() : base(AID.SRingOfMight3In) { } } +class RingOfMight3In(BossModule module, AID aid) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(aid), new AOEShapeDonut(18, 30)); +class NRingOfMight3In(BossModule module) : RingOfMight3In(module, AID.NRingOfMight3In); +class SRingOfMight3In(BossModule module) : RingOfMight3In(module, AID.SRingOfMight3In); diff --git a/BossMod/Modules/Endwalker/Criterion/C01ASS/C012Gladiator/CurseOfTheMonument.cs b/BossMod/Modules/Endwalker/Criterion/C01ASS/C012Gladiator/CurseOfTheMonument.cs index 4092c2abb3..6ad7ec18ec 100644 --- a/BossMod/Modules/Endwalker/Criterion/C01ASS/C012Gladiator/CurseOfTheMonument.cs +++ b/BossMod/Modules/Endwalker/Criterion/C01ASS/C012Gladiator/CurseOfTheMonument.cs @@ -1,13 +1,10 @@ namespace BossMod.Endwalker.Criterion.C01ASS.C012Gladiator; -class SunderedRemains : Components.SelfTargetedAOEs -{ - public SunderedRemains(AID aid) : base(ActionID.MakeSpell(aid), new AOEShapeCircle(10)) { } // TODO: max-casts... -} -class NSunderedRemains : SunderedRemains { public NSunderedRemains() : base(AID.NSunderedRemains) { } } -class SSunderedRemains : SunderedRemains { public SSunderedRemains() : base(AID.SSunderedRemains) { } } +class SunderedRemains(BossModule module, AID aid) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(aid), new AOEShapeCircle(10)); // TODO: max-casts... +class NSunderedRemains(BossModule module) : SunderedRemains(module, AID.NSunderedRemains); +class SSunderedRemains(BossModule module) : SunderedRemains(module, AID.SSunderedRemains); -class ScreamOfTheFallen : Components.UniformStackSpread +class ScreamOfTheFallen(BossModule module) : Components.UniformStackSpread(module, 0, 15, alwaysShowSpreads: true) { public int NumCasts { get; private set; } private BitMask _second; @@ -15,24 +12,22 @@ class ScreamOfTheFallen : Components.UniformStackSpread private static readonly float _towerRadius = 3; - public ScreamOfTheFallen() : base(0, 15, alwaysShowSpreads: true) { } - - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { - base.AddHints(module, slot, actor, hints, movementHints); + base.AddHints(slot, actor, hints); if (!IsSpreadTarget(actor)) hints.Add("Soak the tower!", !ActiveTowers(_second[slot]).Any(t => t.Position.InCircle(actor.Position, _towerRadius))); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - base.DrawArenaForeground(module, pcSlot, pc, arena); + base.DrawArenaForeground(pcSlot, pc); if (!IsSpreadTarget(pc)) foreach (var t in ActiveTowers(_second[pcSlot])) - arena.AddCircle(t.Position, _towerRadius, ArenaColor.Safe, 2); + Arena.AddCircle(t.Position, _towerRadius, ArenaColor.Safe, 2); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { switch ((SID)status.ID) { @@ -40,18 +35,18 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st AddSpread(actor); break; case SID.SecondInLine: - _second.Set(module.Raid.FindSlot(actor.InstanceID)); + _second.Set(Raid.FindSlot(actor.InstanceID)); break; } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.NExplosion or AID.SExplosion) _towers.Add(caster); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.NExplosion or AID.SExplosion) { @@ -59,7 +54,7 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn { case 2: Spreads.Clear(); - AddSpreads(module.Raid.WithSlot().IncludedInMask(_second).Actors()); + AddSpreads(Raid.WithSlot().IncludedInMask(_second).Actors()); break; case 4: Spreads.Clear(); diff --git a/BossMod/Modules/Endwalker/Criterion/C01ASS/C012Gladiator/SculptorsPassion.cs b/BossMod/Modules/Endwalker/Criterion/C01ASS/C012Gladiator/SculptorsPassion.cs index 26b1a34903..3e147f3db9 100644 --- a/BossMod/Modules/Endwalker/Criterion/C01ASS/C012Gladiator/SculptorsPassion.cs +++ b/BossMod/Modules/Endwalker/Criterion/C01ASS/C012Gladiator/SculptorsPassion.cs @@ -1,19 +1,17 @@ namespace BossMod.Endwalker.Criterion.C01ASS.C012Gladiator; -class SculptorsPassion : Components.GenericWildCharge +class SculptorsPassion(BossModule module, AID aid) : Components.GenericWildCharge(module, 4, ActionID.MakeSpell(aid)) { - public SculptorsPassion(AID aid) : base(4, ActionID.MakeSpell(aid)) { } - - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { - base.OnEventCast(module, caster, spell); + base.OnEventCast(caster, spell); if ((AID)spell.Action.ID == AID.SculptorsPassionTargetSelection) { - Source = module.PrimaryActor; - foreach (var (slot, player) in module.Raid.WithSlot(true)) + Source = Module.PrimaryActor; + foreach (var (slot, player) in Raid.WithSlot(true)) PlayerRoles[slot] = player.InstanceID == spell.MainTargetID ? PlayerRole.Target : player.Role == Role.Tank ? PlayerRole.Share : PlayerRole.ShareNotFirst; } } } -class NSculptorsPassion : SculptorsPassion { public NSculptorsPassion() : base(AID.NSculptorsPassion) { } } -class SSculptorsPassion : SculptorsPassion { public SSculptorsPassion() : base(AID.SSculptorsPassion) { } } +class NSculptorsPassion(BossModule module) : SculptorsPassion(module, AID.NSculptorsPassion); +class SSculptorsPassion(BossModule module) : SculptorsPassion(module, AID.SSculptorsPassion); diff --git a/BossMod/Modules/Endwalker/Criterion/C01ASS/C012Gladiator/WrathOfRuin.cs b/BossMod/Modules/Endwalker/Criterion/C01ASS/C012Gladiator/WrathOfRuin.cs index 94c56f0f75..72347453ba 100644 --- a/BossMod/Modules/Endwalker/Criterion/C01ASS/C012Gladiator/WrathOfRuin.cs +++ b/BossMod/Modules/Endwalker/Criterion/C01ASS/C012Gladiator/WrathOfRuin.cs @@ -1,6 +1,6 @@ namespace BossMod.Endwalker.Criterion.C01ASS.C012Gladiator; -class GoldenSilverFlame : BossComponent +class GoldenSilverFlame(BossModule module) : BossComponent(module) { private List _goldenFlames = new(); private List _silverFlames = new(); @@ -10,25 +10,25 @@ class GoldenSilverFlame : BossComponent private static readonly AOEShapeRect _shape = new(60, 5); - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (DebuffsAtPosition(actor.Position) != _debuffs[slot]) hints.Add("Go to correct cell!"); } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { // TODO: implement } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { if (Active) - foreach (var c in SafeCenters(module, _debuffs[pcSlot])) - arena.ZoneRect(c, new WDir(1, 0), _shape.HalfWidth, _shape.HalfWidth, _shape.HalfWidth, ArenaColor.SafeFromAOE); + foreach (var c in SafeCenters(_debuffs[pcSlot])) + Arena.ZoneRect(c, new WDir(1, 0), _shape.HalfWidth, _shape.HalfWidth, _shape.HalfWidth, ArenaColor.SafeFromAOE); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { int debuff = (SID)status.ID switch { @@ -39,17 +39,17 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st if (debuff == 0) return; - var slot = module.Raid.FindSlot(actor.InstanceID); + var slot = Raid.FindSlot(actor.InstanceID); if (slot >= 0) _debuffs[slot] |= debuff; } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { CasterList(spell)?.Add(caster); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { CasterList(spell)?.Remove(caster); } @@ -64,10 +64,10 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn private int CastersHittingPosition(List casters, WPos pos) => casters.Count(a => _shape.Check(pos, a.Position, a.CastInfo!.Rotation)); private int DebuffsAtPosition(WPos pos) => CastersHittingPosition(_silverFlames, pos) | (CastersHittingPosition(_goldenFlames, pos) << 16); - private IEnumerable SafeCenters(BossModule module, int debuff) + private IEnumerable SafeCenters(int debuff) { - var limit = module.Bounds.Center + new WDir(module.Bounds.HalfSize, module.Bounds.HalfSize); - var first = module.Bounds.Center - new WDir(module.Bounds.HalfSize - _shape.HalfWidth, module.Bounds.HalfSize - _shape.HalfWidth); + var limit = Module.Bounds.Center + new WDir(Module.Bounds.HalfSize, Module.Bounds.HalfSize); + var first = Module.Bounds.Center - new WDir(Module.Bounds.HalfSize - _shape.HalfWidth, Module.Bounds.HalfSize - _shape.HalfWidth); var advance = 2 * _shape.HalfWidth; for (float x = first.X; x < limit.X; x += advance) for (float z = first.Z; z < limit.Z; z += advance) @@ -78,16 +78,10 @@ private IEnumerable SafeCenters(BossModule module, int debuff) // note: actual spell targets location, but it seems to be incorrect... // note: we can predict cast start during Regret actor spawn... -class RackAndRuin : Components.SelfTargetedAOEs -{ - public RackAndRuin(AID aid) : base(ActionID.MakeSpell(aid), new AOEShapeRect(40, 2.5f), 8) { } -} -class NRackAndRuin : RackAndRuin { public NRackAndRuin() : base(AID.NRackAndRuin) { } } -class SRackAndRuin : RackAndRuin { public SRackAndRuin() : base(AID.SRackAndRuin) { } } +class RackAndRuin(BossModule module, AID aid) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(aid), new AOEShapeRect(40, 2.5f), 8); +class NRackAndRuin(BossModule module) : RackAndRuin(module, AID.NRackAndRuin); +class SRackAndRuin(BossModule module) : RackAndRuin(module, AID.SRackAndRuin); -class NothingBesideRemains : Components.SpreadFromCastTargets -{ - public NothingBesideRemains(AID aid) : base(ActionID.MakeSpell(aid), 8) { } -} -class NNothingBesideRemains : NothingBesideRemains { public NNothingBesideRemains() : base(AID.NNothingBesideRemainsAOE) { } } -class SNothingBesideRemains : NothingBesideRemains { public SNothingBesideRemains() : base(AID.SNothingBesideRemainsAOE) { } } +class NothingBesideRemains(BossModule module, AID aid) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(aid), 8); +class NNothingBesideRemains(BossModule module) : NothingBesideRemains(module, AID.NNothingBesideRemainsAOE); +class SNothingBesideRemains(BossModule module) : NothingBesideRemains(module, AID.SNothingBesideRemainsAOE); diff --git a/BossMod/Modules/Endwalker/Criterion/C01ASS/C013Shadowcaster/C013Shadowcaster.cs b/BossMod/Modules/Endwalker/Criterion/C01ASS/C013Shadowcaster/C013Shadowcaster.cs index 853ea9effe..89cedf35e7 100644 --- a/BossMod/Modules/Endwalker/Criterion/C01ASS/C013Shadowcaster/C013Shadowcaster.cs +++ b/BossMod/Modules/Endwalker/Criterion/C01ASS/C013Shadowcaster/C013Shadowcaster.cs @@ -1,34 +1,22 @@ namespace BossMod.Endwalker.Criterion.C01ASS.C013Shadowcaster; -class FiresteelFracture : Components.Cleave -{ - public FiresteelFracture(AID aid) : base(ActionID.MakeSpell(aid), new AOEShapeCone(40, 30.Degrees())) { } -} -class NFiresteelFracture : FiresteelFracture { public NFiresteelFracture() : base(AID.NFiresteelFracture) { } } -class SFiresteelFracture : FiresteelFracture { public SFiresteelFracture() : base(AID.SFiresteelFracture) { } } +class FiresteelFracture(BossModule module, AID aid) : Components.Cleave(module, ActionID.MakeSpell(aid), new AOEShapeCone(40, 30.Degrees())); +class NFiresteelFracture(BossModule module) : FiresteelFracture(module, AID.NFiresteelFracture); +class SFiresteelFracture(BossModule module) : FiresteelFracture(module, AID.SFiresteelFracture); // TODO: show AOEs -class BlazingBenifice : Components.CastCounter -{ - public BlazingBenifice(AID aid) : base(ActionID.MakeSpell(aid)) { } -} -class NBlazingBenifice : BlazingBenifice { public NBlazingBenifice() : base(AID.NBlazingBenifice) { } } -class SBlazingBenifice : BlazingBenifice { public SBlazingBenifice() : base(AID.SBlazingBenifice) { } } +class BlazingBenifice(BossModule module, AID aid) : Components.CastCounter(module, ActionID.MakeSpell(aid)); +class NBlazingBenifice(BossModule module) : BlazingBenifice(module, AID.NBlazingBenifice); +class SBlazingBenifice(BossModule module) : BlazingBenifice(module, AID.SBlazingBenifice); -class PureFire : Components.LocationTargetedAOEs -{ - public PureFire(AID aid) : base(ActionID.MakeSpell(aid), 6) { } -} -class NPureFire : PureFire { public NPureFire() : base(AID.NPureFireAOE) { } } -class SPureFire : PureFire { public SPureFire() : base(AID.SPureFireAOE) { } } +class PureFire(BossModule module, AID aid) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(aid), 6); +class NPureFire(BossModule module) : PureFire(module, AID.NPureFireAOE); +class SPureFire(BossModule module) : PureFire(module, AID.SPureFireAOE); -public abstract class C013Shadowcaster : BossModule -{ - public C013Shadowcaster(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsRect(new(289, -105), 15, 20)) { } -} +public abstract class C013Shadowcaster(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsRect(new(289, -105), 15, 20)); [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.NBoss, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 878, NameID = 11393, SortOrder = 9)] -public class C013NShadowcaster : C013Shadowcaster { public C013NShadowcaster(WorldState ws, Actor primary) : base(ws, primary) { } } +public class C013NShadowcaster(WorldState ws, Actor primary) : C013Shadowcaster(ws, primary); [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.SBoss, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 879, NameID = 11393, SortOrder = 9)] -public class C013SShadowcaster : C013Shadowcaster { public C013SShadowcaster(WorldState ws, Actor primary) : base(ws, primary) { } } +public class C013SShadowcaster(WorldState ws, Actor primary) : C013Shadowcaster(ws, primary); diff --git a/BossMod/Modules/Endwalker/Criterion/C01ASS/C013Shadowcaster/C013ShadowcasterStates.cs b/BossMod/Modules/Endwalker/Criterion/C01ASS/C013Shadowcaster/C013ShadowcasterStates.cs index b7340137b1..bbcc4e7e8d 100644 --- a/BossMod/Modules/Endwalker/Criterion/C01ASS/C013Shadowcaster/C013ShadowcasterStates.cs +++ b/BossMod/Modules/Endwalker/Criterion/C01ASS/C013Shadowcaster/C013ShadowcasterStates.cs @@ -164,6 +164,5 @@ private void InfernBrand5(uint id, float delay) .DeactivateOnExit(); } } - -class C013NShadowcasterStates : C013ShadowcasterStates { public C013NShadowcasterStates(BossModule module) : base(module, false) { } } -class C013SShadowcasterStates : C013ShadowcasterStates { public C013SShadowcasterStates(BossModule module) : base(module, true) { } } +class C013NShadowcasterStates(BossModule module) : C013ShadowcasterStates(module, false); +class C013SShadowcasterStates(BossModule module) : C013ShadowcasterStates(module, true); diff --git a/BossMod/Modules/Endwalker/Criterion/C01ASS/C013Shadowcaster/CastShadow.cs b/BossMod/Modules/Endwalker/Criterion/C01ASS/C013Shadowcaster/CastShadow.cs index 43120a109a..0a94bc9bff 100644 --- a/BossMod/Modules/Endwalker/Criterion/C01ASS/C013Shadowcaster/CastShadow.cs +++ b/BossMod/Modules/Endwalker/Criterion/C01ASS/C013Shadowcaster/CastShadow.cs @@ -1,23 +1,23 @@ namespace BossMod.Endwalker.Criterion.C01ASS.C013Shadowcaster; -class CastShadow : Components.GenericAOEs +class CastShadow(BossModule module) : Components.GenericAOEs(module) { public List FirstAOECasters = new(); public List SecondAOECasters = new(); private static readonly AOEShape _shape = new AOEShapeCone(65, 15.Degrees()); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { return (FirstAOECasters.Count > 0 ? FirstAOECasters : SecondAOECasters).Select(c => new AOEInstance(_shape, c.Position, c.CastInfo!.Rotation, c.CastInfo.NPCFinishAt)); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { ListForAction(spell.Action)?.Add(caster); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { ListForAction(spell.Action)?.Remove(caster); } diff --git a/BossMod/Modules/Endwalker/Criterion/C01ASS/C013Shadowcaster/CrypticFlames.cs b/BossMod/Modules/Endwalker/Criterion/C01ASS/C013Shadowcaster/CrypticFlames.cs index 7544cfc7d9..b130a96b39 100644 --- a/BossMod/Modules/Endwalker/Criterion/C01ASS/C013Shadowcaster/CrypticFlames.cs +++ b/BossMod/Modules/Endwalker/Criterion/C01ASS/C013Shadowcaster/CrypticFlames.cs @@ -1,46 +1,46 @@ namespace BossMod.Endwalker.Criterion.C01ASS.C013Shadowcaster; -class CrypticFlames : BossComponent +class CrypticFlames(BossModule module) : BossComponent(module) { public bool ReadyToBreak { get; private set; } private int[] _playerOrder = new int[4]; private List<(Actor laser, int order)> _lasers = new(); private int _numBrokenLasers; - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { var order = _playerOrder[slot]; if (order != 0) hints.Add($"Break order: {order}", order == CurrentBreakOrder); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { var order = _playerOrder[pcSlot]; foreach (var l in _lasers) { var dir = l.laser.Rotation.ToDirection(); - var extent = 2 * dir * dir.Dot(module.Bounds.Center - l.laser.Position); + var extent = 2 * dir * dir.Dot(Module.Bounds.Center - l.laser.Position); var color = l.order != _playerOrder[pcSlot] ? ArenaColor.Enemy : order == CurrentBreakOrder ? ArenaColor.Safe : ArenaColor.Danger; - arena.AddLine(l.laser.Position, l.laser.Position + extent, color, 2); + Arena.AddLine(l.laser.Position, l.laser.Position + extent, color, 2); } } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { switch ((SID)status.ID) { case SID.FirstBrand: - SetPlayerOrder(module, actor, 1); + SetPlayerOrder(actor, 1); break; case SID.SecondBrand: - SetPlayerOrder(module, actor, 2); + SetPlayerOrder(actor, 2); break; case SID.ThirdBrand: - SetPlayerOrder(module, actor, 3); + SetPlayerOrder(actor, 3); break; case SID.FourthBrand: - SetPlayerOrder(module, actor, 4); + SetPlayerOrder(actor, 4); break; case SID.FirstFlame: case SID.SecondFlame: @@ -64,7 +64,7 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st } } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Counter) { @@ -72,9 +72,9 @@ public override void OnStatusLose(BossModule module, Actor actor, ActorStatus st } } - private void SetPlayerOrder(BossModule module, Actor player, int order) + private void SetPlayerOrder(Actor player, int order) { - int slot = module.Raid.FindSlot(player.InstanceID); + int slot = Raid.FindSlot(player.InstanceID); if (slot >= 0 && slot < _playerOrder.Length) _playerOrder[slot] = order; } diff --git a/BossMod/Modules/Endwalker/Criterion/C01ASS/C013Shadowcaster/FiresteelStrike.cs b/BossMod/Modules/Endwalker/Criterion/C01ASS/C013Shadowcaster/FiresteelStrike.cs index a546054391..18f1c34ae7 100644 --- a/BossMod/Modules/Endwalker/Criterion/C01ASS/C013Shadowcaster/FiresteelStrike.cs +++ b/BossMod/Modules/Endwalker/Criterion/C01ASS/C013Shadowcaster/FiresteelStrike.cs @@ -9,48 +9,46 @@ class FiresteelStrike : Components.UniformStackSpread private static readonly AOEShapeRect _cleaveShape = new(65, 4); - public FiresteelStrike() : base(0, 10, alwaysShowSpreads: true) { } - - public override void Init(BossModule module) + public FiresteelStrike(BossModule module) : base(module, 0, 10, alwaysShowSpreads: true) { - AddSpreads(module.Raid.WithoutSlot(true)); + AddSpreads(Raid.WithoutSlot(true)); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (NumJumps < 2) { - base.AddHints(module, slot, actor, hints, movementHints); + base.AddHints(slot, actor, hints); } else if (NumCleaves < _jumpTargets.Count) { if (_jumpTargets[NumCleaves] == actor) - hints.Add("Hide behind someone!", !TargetIntercepted(module)); + hints.Add("Hide behind someone!", !TargetIntercepted()); else if (_interceptors.Contains(actor)) - hints.Add("Intercept next cleave!", !TargetIntercepted(module)); + hints.Add("Intercept next cleave!", !TargetIntercepted()); } } - public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) + public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) { if (NumJumps < 2) - return base.CalcPriority(module, pcSlot, pc, playerSlot, player, ref customColor); + return base.CalcPriority(pcSlot, pc, playerSlot, player, ref customColor); else if (NumCleaves < _jumpTargets.Count) return player == _jumpTargets[NumCleaves] ? PlayerPriority.Danger : PlayerPriority.Normal; else return PlayerPriority.Irrelevant; } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { if (NumJumps >= 2 && NumCleaves < _jumpTargets.Count) { var target = _jumpTargets[NumCleaves]; - _cleaveShape.Draw(arena, module.PrimaryActor.Position, Angle.FromDirection(target.Position - module.PrimaryActor.Position), target == pc || _interceptors.Contains(pc) ? ArenaColor.SafeFromAOE : ArenaColor.AOE); + _cleaveShape.Draw(Arena, Module.PrimaryActor.Position, Angle.FromDirection(target.Position - Module.PrimaryActor.Position), target == pc || _interceptors.Contains(pc) ? ArenaColor.SafeFromAOE : ArenaColor.AOE); } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { @@ -58,7 +56,7 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent case AID.NFiresteelStrikeAOE2: case AID.SFiresteelStrikeAOE1: case AID.SFiresteelStrikeAOE2: - if ((spell.Targets.Count > 0 ? module.WorldState.Actors.Find(spell.Targets[0].ID) : null) is var target && target != null) + if ((spell.Targets.Count > 0 ? WorldState.Actors.Find(spell.Targets[0].ID) : null) is var target && target != null) { _jumpTargets.Add(target); Spreads.RemoveAll(s => s.Target == target); @@ -83,15 +81,15 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } - private bool TargetIntercepted(BossModule module) + private bool TargetIntercepted() { var target = NumCleaves < _jumpTargets.Count ? _jumpTargets[NumCleaves] : null; if (target == null) return true; - var toTarget = target.Position - module.PrimaryActor.Position; + var toTarget = target.Position - Module.PrimaryActor.Position; var angle = Angle.FromDirection(toTarget); var distSq = toTarget.LengthSq(); - return _interceptors.InShape(_cleaveShape, module.PrimaryActor.Position, angle).Any(a => (a.Position - module.PrimaryActor.Position).LengthSq() < distSq); + return _interceptors.InShape(_cleaveShape, Module.PrimaryActor.Position, angle).Any(a => (a.Position - Module.PrimaryActor.Position).LengthSq() < distSq); } } diff --git a/BossMod/Modules/Endwalker/Criterion/C01ASS/C013Shadowcaster/InfernWave.cs b/BossMod/Modules/Endwalker/Criterion/C01ASS/C013Shadowcaster/InfernWave.cs index 41ba761e50..4b5eebe724 100644 --- a/BossMod/Modules/Endwalker/Criterion/C01ASS/C013Shadowcaster/InfernWave.cs +++ b/BossMod/Modules/Endwalker/Criterion/C01ASS/C013Shadowcaster/InfernWave.cs @@ -1,6 +1,6 @@ namespace BossMod.Endwalker.Criterion.C01ASS.C013Shadowcaster; -class InfernWave : Components.CastCounter +class InfernWave(BossModule module, bool savage, bool showHints, int maxActive) : Components.CastCounter(module, ActionID.MakeSpell(savage ? AID.SInfernWaveAOE : AID.NInfernWaveAOE)) { private class Beacon { @@ -15,26 +15,19 @@ public Beacon(Actor source, DateTime activation) } } - public bool ShowHints = true; - private bool _savage; - private int _maxActive; + public bool ShowHints = showHints; + private bool _savage = savage; + private int _maxActive = maxActive; private List _beacons = new(); private static readonly AOEShapeCone _shape = new(60, 45.Degrees()); - public InfernWave(bool savage, bool showHints, int maxActive) : base(ActionID.MakeSpell(savage ? AID.SInfernWaveAOE : AID.NInfernWaveAOE)) - { - ShowHints = showHints; - _savage = savage; - _maxActive = maxActive; - } - - public override void Update(BossModule module) + public override void Update() { // create entries for newly activated beacons - foreach (var s in module.Enemies(_savage ? OID.SBeacon : OID.NBeacon).Where(s => s.ModelState.AnimState1 == 1 && !_beacons.Any(b => b.Source == s))) + foreach (var s in Module.Enemies(_savage ? OID.SBeacon : OID.NBeacon).Where(s => s.ModelState.AnimState1 == 1 && !_beacons.Any(b => b.Source == s))) { - _beacons.Add(new(s, module.WorldState.CurrentTime.AddSeconds(17.1f))); + _beacons.Add(new(s, WorldState.FutureTime(17.1f))); } // update beacon targets @@ -43,13 +36,13 @@ public override void Update(BossModule module) foreach (var b in ActiveBeacons()) { b.Targets.Clear(); - foreach (var t in module.Raid.WithoutSlot().SortedByRange(b.Source.Position).Take(2)) + foreach (var t in Raid.WithoutSlot().SortedByRange(b.Source.Position).Take(2)) b.Targets.Add((t, Angle.FromDirection(t.Position - b.Source.Position))); } } } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (!ShowHints) return; @@ -63,7 +56,7 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint if (t.target == actor) { ++numBaits; - clipping |= module.Raid.WithoutSlot().Exclude(actor).InShape(_shape, b.Source.Position, t.dir).Any(); + clipping |= Raid.WithoutSlot().Exclude(actor).InShape(_shape, b.Source.Position, t.dir).Any(); } else { @@ -80,25 +73,25 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint hints.Add("GTFO from other bait!"); } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { if (!ShowHints) return; foreach (var b in ActiveBeacons()) foreach (var t in b.Targets) - _shape.Draw(arena, b.Source.Position, t.dir); + _shape.Draw(Arena, b.Source.Position, t.dir); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (var b in ActiveBeacons()) - arena.Actor(b.Source, ArenaColor.Object, true); + Arena.Actor(b.Source, ArenaColor.Object, true); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { - base.OnEventCast(module, caster, spell); + base.OnEventCast(caster, spell); if (spell.Action == WatchedAction) { var beacon = _beacons.Find(b => b.Source.Position.AlmostEqual(caster.Position, 1)); @@ -110,7 +103,7 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent private IEnumerable ActiveBeacons() => _beacons.Where(b => b.Activation != default).Take(_maxActive); } -class NInfernWave1 : InfernWave { public NInfernWave1() : base(false, false, 2) { } } -class SInfernWave1 : InfernWave { public SInfernWave1() : base(true, false, 2) { } } -class NInfernWave2 : InfernWave { public NInfernWave2() : base(false, true, 1) { } } -class SInfernWave2 : InfernWave { public SInfernWave2() : base(true, true, 1) { } } +class NInfernWave1(BossModule module) : InfernWave(module, false, false, 2); +class SInfernWave1(BossModule module) : InfernWave(module, true, false, 2); +class NInfernWave2(BossModule module) : InfernWave(module, false, true, 1); +class SInfernWave2(BossModule module) : InfernWave(module, true, true, 1); diff --git a/BossMod/Modules/Endwalker/Criterion/C01ASS/C013Shadowcaster/Portals.cs b/BossMod/Modules/Endwalker/Criterion/C01ASS/C013Shadowcaster/Portals.cs index 63d32f8156..29d4c62e60 100644 --- a/BossMod/Modules/Endwalker/Criterion/C01ASS/C013Shadowcaster/Portals.cs +++ b/BossMod/Modules/Endwalker/Criterion/C01ASS/C013Shadowcaster/Portals.cs @@ -25,30 +25,24 @@ static class Portals class PortalsAOE : Components.GenericAOEs { - private OID _movedOID; - private IReadOnlyList _movedActors = ActorEnumeration.EmptyList; + private IReadOnlyList _movedActors; private float _activationDelay; private AOEShape _shape; private List<(WPos pos, Angle rot, DateTime activation)> _origins = new(); - public PortalsAOE(AID aid, OID movedOID, float activationDelay, AOEShape shape) : base(ActionID.MakeSpell(aid)) + public PortalsAOE(BossModule module, AID aid, OID movedOID, float activationDelay, AOEShape shape) : base(module, ActionID.MakeSpell(aid)) { - _movedOID = movedOID; + _movedActors = module.Enemies(movedOID); _activationDelay = activationDelay; _shape = shape; } - public override void Init(BossModule module) - { - _movedActors = module.Enemies(_movedOID); - } - - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { return _origins.Select(o => new AOEInstance(_shape, o.pos, o.rot, o.activation)); } - public override void OnActorEAnim(BossModule module, Actor actor, uint state) + public override void OnActorEAnim(Actor actor, uint state) { var dest = Portals.DestinationForEAnim(actor, state); if (dest == null) @@ -56,39 +50,39 @@ public override void OnActorEAnim(BossModule module, Actor actor, uint state) var movedActor = _movedActors.FirstOrDefault(a => a.Position.AlmostEqual(actor.Position, 1)); if (movedActor != null) - _origins.Add((dest.Value, movedActor.Rotation, module.WorldState.CurrentTime.AddSeconds(_activationDelay))); + _origins.Add((dest.Value, movedActor.Rotation, WorldState.FutureTime(_activationDelay))); } } -class NPortalsBurn : PortalsAOE { public NPortalsBurn() : base(AID.NBurn, OID.NBallOfFire, 11.6f, new AOEShapeCircle(12)) { } } -class SPortalsBurn : PortalsAOE { public SPortalsBurn() : base(AID.SBurn, OID.SBallOfFire, 11.6f, new AOEShapeCircle(12)) { } } +class NPortalsBurn(BossModule module) : PortalsAOE(module, AID.NBurn, OID.NBallOfFire, 11.6f, new AOEShapeCircle(12)); +class SPortalsBurn(BossModule module) : PortalsAOE(module, AID.SBurn, OID.SBallOfFire, 11.6f, new AOEShapeCircle(12)); -class NPortalsMirror : PortalsAOE { public NPortalsMirror() : base(AID.NBlazingBenifice, OID.NArcaneFont, 11.7f, new AOEShapeRect(100, 5, 100)) { } } -class SPortalsMirror : PortalsAOE { public SPortalsMirror() : base(AID.SBlazingBenifice, OID.SArcaneFont, 11.7f, new AOEShapeRect(100, 5, 100)) { } } +class NPortalsMirror(BossModule module) : PortalsAOE(module, AID.NBlazingBenifice, OID.NArcaneFont, 11.7f, new AOEShapeRect(100, 5, 100)); +class SPortalsMirror(BossModule module) : PortalsAOE(module, AID.SBlazingBenifice, OID.SArcaneFont, 11.7f, new AOEShapeRect(100, 5, 100)); -class PortalsWave : BossComponent +class PortalsWave(BossModule module) : BossComponent(module) { public bool Done { get; private set; } private List<(WPos n, WPos s)> _portals = new(); private int[] _playerPortals = new int[PartyState.MaxPartySize]; // 0 = unassigned, otherwise 'z direction sign' (-1 if own portal points N, +1 for S) - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { var dir = _playerPortals[pcSlot]; if (dir != 0) { foreach (var p in _portals) { - arena.AddCircle(dir > 0 ? p.s : p.n, 1, ArenaColor.Safe, 2); + Arena.AddCircle(dir > 0 ? p.s : p.n, 1, ArenaColor.Safe, 2); } } } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.PlayerPortal) { - var slot = module.Raid.FindSlot(actor.InstanceID); + var slot = Raid.FindSlot(actor.InstanceID); if (slot >= 0) { _playerPortals[slot] = status.Extra switch @@ -101,7 +95,7 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st } } - public override void OnActorEAnim(BossModule module, Actor actor, uint state) + public override void OnActorEAnim(Actor actor, uint state) { if ((OID)actor.OID == OID.Portal && state == 0x00100020) { @@ -110,7 +104,7 @@ public override void OnActorEAnim(BossModule module, Actor actor, uint state) } var dest = Portals.DestinationForEAnim(actor, state); - if (dest == null || !module.Bounds.Contains(dest.Value)) + if (dest == null || !Module.Bounds.Contains(dest.Value)) return; var n = actor.Position; diff --git a/BossMod/Modules/Endwalker/Criterion/C02AMR/C020Trash/C020Fuko.cs b/BossMod/Modules/Endwalker/Criterion/C02AMR/C020Trash/C020Fuko.cs index fb9e4a54d4..59fddfb071 100644 --- a/BossMod/Modules/Endwalker/Criterion/C02AMR/C020Trash/C020Fuko.cs +++ b/BossMod/Modules/Endwalker/Criterion/C02AMR/C020Trash/C020Fuko.cs @@ -1,32 +1,20 @@ namespace BossMod.Endwalker.Criterion.C02AMR.C020Trash1; -class Tornado : Components.LocationTargetedAOEs -{ - public Tornado(AID aid) : base(ActionID.MakeSpell(aid), 6) { } -} -class NTornado : Tornado { public NTornado() : base(AID.NTornado) { } } -class STornado : Tornado { public STornado() : base(AID.STornado) { } } +class Tornado(BossModule module, AID aid) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(aid), 6); +class NTornado(BossModule module) : Tornado(module, AID.NTornado); +class STornado(BossModule module) : Tornado(module, AID.STornado); -class ScytheTail : Components.SelfTargetedAOEs -{ - public ScytheTail(AID aid) : base(ActionID.MakeSpell(aid), new AOEShapeCircle(10)) { } -} -class NScytheTail : ScytheTail { public NScytheTail() : base(AID.NScytheTail) { } } -class SScytheTail : ScytheTail { public SScytheTail() : base(AID.SScytheTail) { } } +class ScytheTail(BossModule module, AID aid) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(aid), new AOEShapeCircle(10)); +class NScytheTail(BossModule module) : ScytheTail(module, AID.NScytheTail); +class SScytheTail(BossModule module) : ScytheTail(module, AID.SScytheTail); -class Twister : Components.StackWithCastTargets -{ - public Twister(AID aid) : base(ActionID.MakeSpell(aid), 8, 4) { } -} -class NTwister : Twister { public NTwister() : base(AID.NTwister) { } } -class STwister : Twister { public STwister() : base(AID.STwister) { } } +class Twister(BossModule module, AID aid) : Components.StackWithCastTargets(module, ActionID.MakeSpell(aid), 8, 4); +class NTwister(BossModule module) : Twister(module, AID.NTwister); +class STwister(BossModule module) : Twister(module, AID.STwister); -class Crosswind : Components.KnockbackFromCastTarget -{ - public Crosswind(AID aid) : base(ActionID.MakeSpell(aid), 25) { } -} -class NCrosswind : Crosswind { public NCrosswind() : base(AID.NCrosswind) { } } -class SCrosswind : Crosswind { public SCrosswind() : base(AID.SCrosswind) { } } +class Crosswind(BossModule module, AID aid) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(aid), 25); +class NCrosswind(BossModule module) : Crosswind(module, AID.NCrosswind); +class SCrosswind(BossModule module) : Crosswind(module, AID.SCrosswind); class C020FukoStates : StateMachineBuilder { @@ -79,14 +67,12 @@ private void Crosswind(uint id, float delay) Cast(id, _savage ? AID.SCrosswind : AID.NCrosswind, delay, 4, "Knockback"); } } -class C020NFukoStates : C020FukoStates { public C020NFukoStates(BossModule module) : base(module, false) { } } -class C020SFukoStates : C020FukoStates { public C020SFukoStates(BossModule module) : base(module, true) { } } +class C020NFukoStates(BossModule module) : C020FukoStates(module, false); +class C020SFukoStates(BossModule module) : C020FukoStates(module, true); [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.NFuko, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 946, NameID = 12399, SortOrder = 2)] -public class C020NFuko : C020Trash1 +public class C020NFuko(WorldState ws, Actor primary) : C020Trash1(ws, primary) { - public C020NFuko(WorldState ws, Actor primary) : base(ws, primary) { } - protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); @@ -96,10 +82,8 @@ protected override void DrawEnemies(int pcSlot, Actor pc) } [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.SFuko, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 947, NameID = 12399, SortOrder = 2)] -public class C020SFuko : C020Trash1 +public class C020SFuko(WorldState ws, Actor primary) : C020Trash1(ws, primary) { - public C020SFuko(WorldState ws, Actor primary) : base(ws, primary) { } - protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); diff --git a/BossMod/Modules/Endwalker/Criterion/C02AMR/C020Trash/C020Kotengu.cs b/BossMod/Modules/Endwalker/Criterion/C02AMR/C020Trash/C020Kotengu.cs index af1b52bd4b..aa70d02013 100644 --- a/BossMod/Modules/Endwalker/Criterion/C02AMR/C020Trash/C020Kotengu.cs +++ b/BossMod/Modules/Endwalker/Criterion/C02AMR/C020Trash/C020Kotengu.cs @@ -1,14 +1,14 @@ namespace BossMod.Endwalker.Criterion.C02AMR.C020Trash2; -class BladeOfTheTengu : Components.GenericAOEs +class BladeOfTheTengu(BossModule module) : Components.GenericAOEs(module) { private List _aoes = new(); private static readonly AOEShapeCone _shape = new(50, 45.Degrees()); // TODO: verify angle - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => _aoes; + public override IEnumerable ActiveAOEs(int slot, Actor actor) => _aoes; - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { var secondAngle = (AID)spell.Action.ID switch { @@ -25,7 +25,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.NBladeOfTheTengu or AID.SBladeOfTheTengu) { @@ -36,27 +36,18 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } -class WrathOfTheTengu : Components.RaidwideCast -{ - public WrathOfTheTengu(AID aid) : base(ActionID.MakeSpell(aid), "Raidwide with bleed") { } -} -class NWrathOfTheTengu : WrathOfTheTengu { public NWrathOfTheTengu() : base(AID.NWrathOfTheTengu) { } } -class SWrathOfTheTengu : WrathOfTheTengu { public SWrathOfTheTengu() : base(AID.SWrathOfTheTengu) { } } +class WrathOfTheTengu(BossModule module, AID aid) : Components.RaidwideCast(module, ActionID.MakeSpell(aid), "Raidwide with bleed"); +class NWrathOfTheTengu(BossModule module) : WrathOfTheTengu(module, AID.NWrathOfTheTengu); +class SWrathOfTheTengu(BossModule module) : WrathOfTheTengu(module, AID.SWrathOfTheTengu); -class GazeOfTheTengu : Components.CastGaze -{ - public GazeOfTheTengu(AID aid) : base(ActionID.MakeSpell(aid)) { } -} -class NGazeOfTheTengu : GazeOfTheTengu { public NGazeOfTheTengu() : base(AID.NGazeOfTheTengu) { } } -class SGazeOfTheTengu : GazeOfTheTengu { public SGazeOfTheTengu() : base(AID.SGazeOfTheTengu) { } } +class GazeOfTheTengu(BossModule module, AID aid) : Components.CastGaze(module, ActionID.MakeSpell(aid)); +class NGazeOfTheTengu(BossModule module) : GazeOfTheTengu(module, AID.NGazeOfTheTengu); +class SGazeOfTheTengu(BossModule module) : GazeOfTheTengu(module, AID.SGazeOfTheTengu); class C020KotenguStates : StateMachineBuilder { - private bool _savage; - public C020KotenguStates(BossModule module, bool savage) : base(module) { - _savage = savage; TrivialPhase() .ActivateOnEnter() .ActivateOnEnter(!savage) @@ -68,11 +59,11 @@ public C020KotenguStates(BossModule module, bool savage) : base(module) .ActivateOnEnter(savage); } } -class C020NKotenguStates : C020KotenguStates { public C020NKotenguStates(BossModule module) : base(module, false) { } } -class C020SKotenguStates : C020KotenguStates { public C020SKotenguStates(BossModule module) : base(module, true) { } } +class C020NKotenguStates(BossModule module) : C020KotenguStates(module, false); +class C020SKotenguStates(BossModule module) : C020KotenguStates(module, true); [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.NKotengu, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 946, NameID = 12410, SortOrder = 6)] -public class C020NKotengu : C020Trash2 { public C020NKotengu(WorldState ws, Actor primary) : base(ws, primary) { } } +public class C020NKotengu(WorldState ws, Actor primary) : C020Trash2(ws, primary); [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.SKotengu, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 947, NameID = 12410, SortOrder = 6)] -public class C020SKotengu : C020Trash2 { public C020SKotengu(WorldState ws, Actor primary) : base(ws, primary) { } } +public class C020SKotengu(WorldState ws, Actor primary) : C020Trash2(ws, primary); diff --git a/BossMod/Modules/Endwalker/Criterion/C02AMR/C020Trash/C020Onmitsugashira.cs b/BossMod/Modules/Endwalker/Criterion/C02AMR/C020Trash/C020Onmitsugashira.cs index 1e1ea93ea0..d90c3a76b2 100644 --- a/BossMod/Modules/Endwalker/Criterion/C02AMR/C020Trash/C020Onmitsugashira.cs +++ b/BossMod/Modules/Endwalker/Criterion/C02AMR/C020Trash/C020Onmitsugashira.cs @@ -1,40 +1,25 @@ namespace BossMod.Endwalker.Criterion.C02AMR.C020Trash2; -class Issen : Components.SingleTargetCast -{ - public Issen(AID aid) : base(ActionID.MakeSpell(aid)) { } -} -class NIssen : Issen { public NIssen() : base(AID.NIssen) { } } -class SIssen : Issen { public SIssen() : base(AID.SIssen) { } } +class Issen(BossModule module, AID aid) : Components.SingleTargetCast(module, ActionID.MakeSpell(aid)); +class NIssen(BossModule module) : Issen(module, AID.NIssen); +class SIssen(BossModule module) : Issen(module, AID.SIssen); -class Huton : Components.SingleTargetCast -{ - public Huton(AID aid) : base(ActionID.MakeSpell(aid), "Cast speed buff") { } -} -class NHuton : Huton { public NHuton() : base(AID.NHuton) { } } -class SHuton : Huton { public SHuton() : base(AID.SHuton) { } } +class Huton(BossModule module, AID aid) : Components.SingleTargetCast(module, ActionID.MakeSpell(aid), "Cast speed buff"); +class NHuton(BossModule module) : Huton(module, AID.NHuton); +class SHuton(BossModule module) : Huton(module, AID.SHuton); -class JujiShuriken : Components.SelfTargetedAOEs -{ - public JujiShuriken(AID aid) : base(ActionID.MakeSpell(aid), new AOEShapeRect(40, 1.5f)) { } -} -class NJujiShuriken : JujiShuriken { public NJujiShuriken() : base(AID.NJujiShuriken) { } } -class SJujiShuriken : JujiShuriken { public SJujiShuriken() : base(AID.SJujiShuriken) { } } +class JujiShuriken(BossModule module, AID aid) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(aid), new AOEShapeRect(40, 1.5f)); +class NJujiShuriken(BossModule module) : JujiShuriken(module, AID.NJujiShuriken); +class SJujiShuriken(BossModule module) : JujiShuriken(module, AID.SJujiShuriken); -class JujiShurikenFast : Components.SelfTargetedAOEs -{ - public JujiShurikenFast(AID aid) : base(ActionID.MakeSpell(aid), new AOEShapeRect(40, 1.5f)) { } -} -class NJujiShurikenFast : JujiShurikenFast { public NJujiShurikenFast() : base(AID.NJujiShurikenFast) { } } -class SJujiShurikenFast : JujiShurikenFast { public SJujiShurikenFast() : base(AID.SJujiShurikenFast) { } } +class JujiShurikenFast(BossModule module, AID aid) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(aid), new AOEShapeRect(40, 1.5f)); +class NJujiShurikenFast(BossModule module) : JujiShurikenFast(module, AID.NJujiShurikenFast); +class SJujiShurikenFast(BossModule module) : JujiShurikenFast(module, AID.SJujiShurikenFast); class C020OnmitsugashiraStates : StateMachineBuilder { - private bool _savage; - public C020OnmitsugashiraStates(BossModule module, bool savage) : base(module) { - _savage = savage; TrivialPhase() .ActivateOnEnter(!savage) .ActivateOnEnter(!savage) @@ -49,11 +34,11 @@ public C020OnmitsugashiraStates(BossModule module, bool savage) : base(module) .ActivateOnEnter(savage); } } -class C020NOnmitsugashiraStates : C020OnmitsugashiraStates { public C020NOnmitsugashiraStates(BossModule module) : base(module, false) { } } -class C020SOnmitsugashiraStates : C020OnmitsugashiraStates { public C020SOnmitsugashiraStates(BossModule module) : base(module, true) { } } +class C020NOnmitsugashiraStates(BossModule module) : C020OnmitsugashiraStates(module, false); +class C020SOnmitsugashiraStates(BossModule module) : C020OnmitsugashiraStates(module, true); [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.NOnmitsugashira, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 946, NameID = 12424, SortOrder = 5)] -public class C020NOnmitsugashira : C020Trash2 { public C020NOnmitsugashira(WorldState ws, Actor primary) : base(ws, primary) { } } +public class C020NOnmitsugashira(WorldState ws, Actor primary) : C020Trash2(ws, primary); [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.SOnmitsugashira, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 947, NameID = 12424, SortOrder = 5)] -public class C020SOnmitsugashira : C020Trash2 { public C020SOnmitsugashira(WorldState ws, Actor primary) : base(ws, primary) { } } +public class C020SOnmitsugashira(WorldState ws, Actor primary) : C020Trash2(ws, primary); diff --git a/BossMod/Modules/Endwalker/Criterion/C02AMR/C020Trash/C020Raiko.cs b/BossMod/Modules/Endwalker/Criterion/C02AMR/C020Trash/C020Raiko.cs index 9068478ed3..b1542cba5d 100644 --- a/BossMod/Modules/Endwalker/Criterion/C02AMR/C020Trash/C020Raiko.cs +++ b/BossMod/Modules/Endwalker/Criterion/C02AMR/C020Trash/C020Raiko.cs @@ -1,40 +1,27 @@ -namespace BossMod.Endwalker.Criterion.C02AMR.C020Trash1; +using BossMod; -class BloodyCaress : Components.SelfTargetedAOEs -{ - public BloodyCaress(AID aid) : base(ActionID.MakeSpell(aid), new AOEShapeCone(12, 60.Degrees())) { } -} -class NBloodyCaress : BloodyCaress { public NBloodyCaress() : base(AID.NBloodyCaress) { } } -class SBloodyCaress : BloodyCaress { public SBloodyCaress() : base(AID.SBloodyCaress) { } } +namespace BossMod.Endwalker.Criterion.C02AMR.C020Trash1; -class DisciplesOfLevin : Components.SelfTargetedAOEs -{ - public DisciplesOfLevin(AID aid) : base(ActionID.MakeSpell(aid), new AOEShapeCircle(10)) { } -} -class NDisciplesOfLevin : DisciplesOfLevin { public NDisciplesOfLevin() : base(AID.NDisciplesOfLevin) { } } -class SDisciplesOfLevin : DisciplesOfLevin { public SDisciplesOfLevin() : base(AID.SDisciplesOfLevin) { } } +class BloodyCaress(BossModule module, AID aid) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(aid), new AOEShapeCone(12, 60.Degrees())); +class NBloodyCaress(BossModule module) : BloodyCaress(module, AID.NBloodyCaress); +class SBloodyCaress(BossModule module) : BloodyCaress(module, AID.SBloodyCaress); + +class DisciplesOfLevin(BossModule module, AID aid) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(aid), new AOEShapeCircle(10)); +class NDisciplesOfLevin(BossModule module) : DisciplesOfLevin(module, AID.NDisciplesOfLevin); +class SDisciplesOfLevin(BossModule module) : DisciplesOfLevin(module, AID.SDisciplesOfLevin); // TODO: better component (auto update rect length) -class BarrelingSmash : Components.BaitAwayCast -{ - public BarrelingSmash(AID aid) : base(ActionID.MakeSpell(aid), new AOEShapeRect(50, 3.5f)) { } // TODO: it should be safe to stay beyond target... -} -class NBarrelingSmash : BarrelingSmash { public NBarrelingSmash() : base(AID.NBarrelingSmash) { } } -class SBarrelingSmash : BarrelingSmash { public SBarrelingSmash() : base(AID.SBarrelingSmash) { } } +class BarrelingSmash(BossModule module, AID aid) : Components.BaitAwayChargeCast(module, ActionID.MakeSpell(aid), 3.5f); +class NBarrelingSmash(BossModule module) : BarrelingSmash(module, AID.NBarrelingSmash); +class SBarrelingSmash(BossModule module) : BarrelingSmash(module, AID.SBarrelingSmash); -class Howl : Components.RaidwideCast -{ - public Howl(AID aid) : base(ActionID.MakeSpell(aid)) { } -} -class NHowl : Howl { public NHowl() : base(AID.NHowl) { } } -class SHowl : Howl { public SHowl() : base(AID.SHowl) { } } +class Howl(BossModule module, AID aid) : Components.RaidwideCast(module, ActionID.MakeSpell(aid)); +class NHowl(BossModule module) : Howl(module, AID.NHowl); +class SHowl(BossModule module) : Howl(module, AID.SHowl); -class MasterOfLevin : Components.SelfTargetedAOEs -{ - public MasterOfLevin(AID aid) : base(ActionID.MakeSpell(aid), new AOEShapeDonut(5, 30)) { } -} -class NMasterOfLevin : MasterOfLevin { public NMasterOfLevin() : base(AID.NMasterOfLevin) { } } -class SMasterOfLevin : MasterOfLevin { public SMasterOfLevin() : base(AID.SMasterOfLevin) { } } +class MasterOfLevin(BossModule module, AID aid) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(aid), new AOEShapeDonut(5, 30)); +class NMasterOfLevin(BossModule module) : MasterOfLevin(module, AID.NMasterOfLevin); +class SMasterOfLevin(BossModule module) : MasterOfLevin(module, AID.SMasterOfLevin); class C020RaikoStates : StateMachineBuilder { @@ -86,14 +73,12 @@ private void MasterOfLevin(uint id, float delay) Cast(id, _savage ? AID.SMasterOfLevin : AID.NMasterOfLevin, delay, 4, "In"); } } -class C020NRaikoStates : C020RaikoStates { public C020NRaikoStates(BossModule module) : base(module, false) { } } -class C020SRaikoStates : C020RaikoStates { public C020SRaikoStates(BossModule module) : base(module, true) { } } +class C020NRaikoStates(BossModule module) : C020RaikoStates(module, false); +class C020SRaikoStates(BossModule module) : C020RaikoStates(module, true); [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.NRaiko, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 946, NameID = 12422, SortOrder = 1)] -public class C020NRaiko : C020Trash1 +public class C020NRaiko(WorldState ws, Actor primary) : C020Trash1(ws, primary) { - public C020NRaiko(WorldState ws, Actor primary) : base(ws, primary) { } - protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); @@ -103,10 +88,8 @@ protected override void DrawEnemies(int pcSlot, Actor pc) } [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.SRaiko, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 947, NameID = 12422, SortOrder = 1)] -public class C020SRaiko : C020Trash1 +public class C020SRaiko(WorldState ws, Actor primary) : C020Trash1(ws, primary) { - public C020SRaiko(WorldState ws, Actor primary) : base(ws, primary) { } - protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); diff --git a/BossMod/Modules/Endwalker/Criterion/C02AMR/C020Trash/C020Trash1.cs b/BossMod/Modules/Endwalker/Criterion/C02AMR/C020Trash/C020Trash1.cs index 820515e5b8..dd13dc627c 100644 --- a/BossMod/Modules/Endwalker/Criterion/C02AMR/C020Trash/C020Trash1.cs +++ b/BossMod/Modules/Endwalker/Criterion/C02AMR/C020Trash/C020Trash1.cs @@ -45,7 +45,4 @@ public enum AID : uint SLeftSwipe = 34441, // SYuki->self, 4.0s cast, range 60 180-degree cone } -public abstract class C020Trash1 : BossModule -{ - public C020Trash1(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsSquare(new(0, 0), 20)) { } -} +public abstract class C020Trash1(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsSquare(new(0, 0), 20)); diff --git a/BossMod/Modules/Endwalker/Criterion/C02AMR/C020Trash/C020Trash2.cs b/BossMod/Modules/Endwalker/Criterion/C02AMR/C020Trash/C020Trash2.cs index ee9025d453..04b276e2f6 100644 --- a/BossMod/Modules/Endwalker/Criterion/C02AMR/C020Trash/C020Trash2.cs +++ b/BossMod/Modules/Endwalker/Criterion/C02AMR/C020Trash/C020Trash2.cs @@ -41,14 +41,8 @@ public enum AID : uint SMountainBreeze = 34442, // SYamabiko->self, 6.0s cast, range 40 width 8 rect } -class MountainBreeze : Components.SelfTargetedAOEs -{ - public MountainBreeze(AID aid) : base(ActionID.MakeSpell(aid), new AOEShapeRect(38, 4, 2)) { } -} -class NMountainBreeze : MountainBreeze { public NMountainBreeze() : base(AID.NMountainBreeze) { } } -class SMountainBreeze : MountainBreeze { public SMountainBreeze() : base(AID.SMountainBreeze) { } } +class MountainBreeze(BossModule module, AID aid) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(aid), new AOEShapeRect(38, 4, 2)); +class NMountainBreeze(BossModule module) : MountainBreeze(module, AID.NMountainBreeze); +class SMountainBreeze(BossModule module) : MountainBreeze(module, AID.SMountainBreeze); -public abstract class C020Trash2 : BossModule -{ - public C020Trash2(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsRect(new(300, 0), 20, 40)) { } -} +public abstract class C020Trash2(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsRect(new(300, 0), 20, 40)); diff --git a/BossMod/Modules/Endwalker/Criterion/C02AMR/C020Trash/C020Yuki.cs b/BossMod/Modules/Endwalker/Criterion/C02AMR/C020Trash/C020Yuki.cs index e9df15295c..0a3ce874f7 100644 --- a/BossMod/Modules/Endwalker/Criterion/C02AMR/C020Trash/C020Yuki.cs +++ b/BossMod/Modules/Endwalker/Criterion/C02AMR/C020Trash/C020Yuki.cs @@ -1,18 +1,12 @@ namespace BossMod.Endwalker.Criterion.C02AMR.C020Trash1; -class RightSwipe : Components.SelfTargetedAOEs -{ - public RightSwipe(AID aid) : base(ActionID.MakeSpell(aid), new AOEShapeCone(60, 90.Degrees())) { } -} -class NRightSwipe : RightSwipe { public NRightSwipe() : base(AID.NRightSwipe) { } } -class SRightSwipe : RightSwipe { public SRightSwipe() : base(AID.SRightSwipe) { } } +class RightSwipe(BossModule module, AID aid) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(aid), new AOEShapeCone(60, 90.Degrees())); +class NRightSwipe(BossModule module) : RightSwipe(module, AID.NRightSwipe); +class SRightSwipe(BossModule module) : RightSwipe(module, AID.SRightSwipe); -class LeftSwipe : Components.SelfTargetedAOEs -{ - public LeftSwipe(AID aid) : base(ActionID.MakeSpell(aid), new AOEShapeCone(60, 90.Degrees())) { } -} -class NLeftSwipe : LeftSwipe { public NLeftSwipe() : base(AID.NLeftSwipe) { } } -class SLeftSwipe : LeftSwipe { public SLeftSwipe() : base(AID.SLeftSwipe) { } } +class LeftSwipe(BossModule module, AID aid) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(aid), new AOEShapeCone(60, 90.Degrees())); +class NLeftSwipe(BossModule module) : LeftSwipe(module, AID.NLeftSwipe); +class SLeftSwipe(BossModule module) : LeftSwipe(module, AID.SLeftSwipe); class C020YukiStates : StateMachineBuilder { @@ -25,11 +19,11 @@ public C020YukiStates(BossModule module, bool savage) : base(module) .ActivateOnEnter(savage); } } -class C020NYukiStates : C020YukiStates { public C020NYukiStates(BossModule module) : base(module, false) { } } -class C020SYukiStates : C020YukiStates { public C020SYukiStates(BossModule module) : base(module, true) { } } +class C020NYukiStates(BossModule module) : C020YukiStates(module, false); +class C020SYukiStates(BossModule module) : C020YukiStates(module, true); [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.NYuki, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 946, NameID = 12425, SortOrder = 3)] -public class C020NYuki : C020Trash1 { public C020NYuki(WorldState ws, Actor primary) : base(ws, primary) { } } +public class C020NYuki(WorldState ws, Actor primary) : C020Trash1(ws, primary); [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.SYuki, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 947, NameID = 12425, SortOrder = 3)] -public class C020SYuki : C020Trash1 { public C020SYuki(WorldState ws, Actor primary) : base(ws, primary) { } } +public class C020SYuki(WorldState ws, Actor primary) : C020Trash1(ws, primary); diff --git a/BossMod/Modules/Endwalker/Criterion/C02AMR/C021Shishio/C021Shishio.cs b/BossMod/Modules/Endwalker/Criterion/C02AMR/C021Shishio/C021Shishio.cs index fb64a75486..8bb7c262cc 100644 --- a/BossMod/Modules/Endwalker/Criterion/C02AMR/C021Shishio/C021Shishio.cs +++ b/BossMod/Modules/Endwalker/Criterion/C02AMR/C021Shishio/C021Shishio.cs @@ -1,26 +1,17 @@ namespace BossMod.Endwalker.Criterion.C02AMR.C021Shishio; -class SplittingCry : Components.BaitAwayCast -{ - public SplittingCry(AID aid) : base(ActionID.MakeSpell(aid), new AOEShapeRect(60, 7)) { } -} -class NSplittingCry : SplittingCry { public NSplittingCry() : base(AID.NSplittingCry) { } } -class SSplittingCry : SplittingCry { public SSplittingCry() : base(AID.SSplittingCry) { } } +class SplittingCry(BossModule module, AID aid) : Components.BaitAwayCast(module, ActionID.MakeSpell(aid), new AOEShapeRect(60, 7)); +class NSplittingCry(BossModule module) : SplittingCry(module, AID.NSplittingCry); +class SSplittingCry(BossModule module) : SplittingCry(module, AID.SSplittingCry); -class ThunderVortex : Components.SelfTargetedAOEs -{ - public ThunderVortex(AID aid) : base(ActionID.MakeSpell(aid), new AOEShapeDonut(8, 30)) { } -} -class NThunderVortex : ThunderVortex { public NThunderVortex() : base(AID.NThunderVortex) { } } -class SThunderVortex : ThunderVortex { public SThunderVortex() : base(AID.SThunderVortex) { } } +class ThunderVortex(BossModule module, AID aid) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(aid), new AOEShapeDonut(8, 30)); +class NThunderVortex(BossModule module) : ThunderVortex(module, AID.NThunderVortex); +class SThunderVortex(BossModule module) : ThunderVortex(module, AID.SThunderVortex); -public abstract class C021Shishio : BossModule -{ - public C021Shishio(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsSquare(new(0, -100), 20)) { } -} +public abstract class C021Shishio(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsSquare(new(0, -100), 20)); [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.NBoss, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 946, NameID = 12428, SortOrder = 4)] -public class C021NShishio : C021Shishio { public C021NShishio(WorldState ws, Actor primary) : base(ws, primary) { } } +public class C021NShishio(WorldState ws, Actor primary) : C021Shishio(ws, primary); [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.SBoss, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 947, NameID = 12428, SortOrder = 4)] -public class C021SShishio : C021Shishio { public C021SShishio(WorldState ws, Actor primary) : base(ws, primary) { } } +public class C021SShishio(WorldState ws, Actor primary) : C021Shishio(ws, primary); diff --git a/BossMod/Modules/Endwalker/Criterion/C02AMR/C021Shishio/C021ShishioStates.cs b/BossMod/Modules/Endwalker/Criterion/C02AMR/C021Shishio/C021ShishioStates.cs index 97b5a08063..60af8d9bc2 100644 --- a/BossMod/Modules/Endwalker/Criterion/C02AMR/C021Shishio/C021ShishioStates.cs +++ b/BossMod/Modules/Endwalker/Criterion/C02AMR/C021Shishio/C021ShishioStates.cs @@ -161,5 +161,5 @@ private void ThunderVortex(uint id, float delay) } } -class C021NShishioStates : C021ShishioStates { public C021NShishioStates(BossModule module) : base(module, false) { } } -class C021SShishioStates : C021ShishioStates { public C021SShishioStates(BossModule module) : base(module, true) { } } +class C021NShishioStates(BossModule module) : C021ShishioStates(module, false); +class C021SShishioStates(BossModule module) : C021ShishioStates(module, true); diff --git a/BossMod/Modules/Endwalker/Criterion/C02AMR/C021Shishio/EyeThunderVortex.cs b/BossMod/Modules/Endwalker/Criterion/C02AMR/C021Shishio/EyeThunderVortex.cs index 09e66e7bb1..b71b1616d8 100644 --- a/BossMod/Modules/Endwalker/Criterion/C02AMR/C021Shishio/EyeThunderVortex.cs +++ b/BossMod/Modules/Endwalker/Criterion/C02AMR/C021Shishio/EyeThunderVortex.cs @@ -1,15 +1,15 @@ namespace BossMod.Endwalker.Criterion.C02AMR.C021Shishio; -class EyeThunderVortex : Components.GenericAOEs +class EyeThunderVortex(BossModule module) : Components.GenericAOEs(module) { private List _aoes = new(); private static readonly AOEShapeCircle _shapeCircle = new(15); private static readonly AOEShapeDonut _shapeDonut = new(8, 30); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => _aoes.Take(1); + public override IEnumerable ActiveAOEs(int slot, Actor actor) => _aoes.Take(1); - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { @@ -26,7 +26,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.NEyeOfTheThunderVortexFirst or AID.NEyeOfTheThunderVortexSecond or AID.NVortexOfTheThunderEyeFirst or AID.NVortexOfTheThunderEyeSecond or AID.SEyeOfTheThunderVortexFirst or AID.SEyeOfTheThunderVortexSecond or AID.SVortexOfTheThunderEyeFirst or AID.SVortexOfTheThunderEyeSecond) diff --git a/BossMod/Modules/Endwalker/Criterion/C02AMR/C021Shishio/HauntingCry.cs b/BossMod/Modules/Endwalker/Criterion/C02AMR/C021Shishio/HauntingCry.cs index 0a35785fce..1266123306 100644 --- a/BossMod/Modules/Endwalker/Criterion/C02AMR/C021Shishio/HauntingCry.cs +++ b/BossMod/Modules/Endwalker/Criterion/C02AMR/C021Shishio/HauntingCry.cs @@ -1,23 +1,23 @@ namespace BossMod.Endwalker.Criterion.C02AMR.C021Shishio; -class HauntingCrySwipes : Components.GenericAOEs +class HauntingCrySwipes(BossModule module) : Components.GenericAOEs(module) { private List _casters = new(); private static readonly AOEShapeCone _shape = new(40, 90.Degrees()); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { return _casters.Take(4).Select(c => new AOEInstance(_shape, c.Position, c.CastInfo!.Rotation, c.CastInfo.NPCFinishAt)); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.NRightSwipe or AID.NLeftSwipe or AID.SRightSwipe or AID.SLeftSwipe) _casters.Add(caster); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.NRightSwipe or AID.NLeftSwipe or AID.SRightSwipe or AID.SLeftSwipe) { @@ -27,7 +27,7 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn } } -class HauntingCryReisho : Components.GenericAOEs +class HauntingCryReisho(BossModule module) : Components.GenericAOEs(module) { private List _ghosts = new(); private DateTime _activation; @@ -35,49 +35,43 @@ class HauntingCryReisho : Components.GenericAOEs private static readonly AOEShapeCircle _shape = new(6); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => _ghosts.Select(g => new AOEInstance(_shape, g.Position, default, _activation)); + public override IEnumerable ActiveAOEs(int slot, Actor actor) => _ghosts.Select(g => new AOEInstance(_shape, g.Position, default, _activation)); - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (var g in _ghosts) { - arena.Actor(g, ArenaColor.Object, true); - var target = module.WorldState.Actors.Find(g.Tether.Target); + Arena.Actor(g, ArenaColor.Object, true); + var target = WorldState.Actors.Find(g.Tether.Target); if (target != null) - arena.AddLine(g.Position, target.Position, ArenaColor.Danger); + Arena.AddLine(g.Position, target.Position, ArenaColor.Danger); } } - public override void OnTethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnTethered(Actor source, ActorTetherInfo tether) { if ((OID)source.OID is OID.NHauntingThrall or OID.SHauntingThrall) { _ghosts.Add(source); - _activation = module.WorldState.CurrentTime.AddSeconds(5.1f); + _activation = WorldState.FutureTime(5.1f); } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { - if ((AID)spell.Action.ID is AID.NReisho or AID.SReisho && module.WorldState.CurrentTime > _ignoreBefore) + if ((AID)spell.Action.ID is AID.NReisho or AID.SReisho && WorldState.CurrentTime > _ignoreBefore) { ++NumCasts; - _activation = module.WorldState.CurrentTime.AddSeconds(2.1f); - _ignoreBefore = module.WorldState.CurrentTime.AddSeconds(1); + _activation = WorldState.FutureTime(2.1f); + _ignoreBefore = WorldState.FutureTime(1); } } } -class HauntingCryVermilionAura : Components.CastTowers -{ - public HauntingCryVermilionAura(AID aid) : base(ActionID.MakeSpell(aid), 4) { } -} -class NHauntingCryVermilionAura : HauntingCryVermilionAura { public NHauntingCryVermilionAura() : base(AID.NVermilionAura) { } } -class SHauntingCryVermilionAura : HauntingCryVermilionAura { public SHauntingCryVermilionAura() : base(AID.SVermilionAura) { } } +class HauntingCryVermilionAura(BossModule module, AID aid) : Components.CastTowers(module, ActionID.MakeSpell(aid), 4); +class NHauntingCryVermilionAura(BossModule module) : HauntingCryVermilionAura(module, AID.NVermilionAura); +class SHauntingCryVermilionAura(BossModule module) : HauntingCryVermilionAura(module, AID.SVermilionAura); -class HauntingCryStygianAura : Components.SpreadFromCastTargets -{ - public HauntingCryStygianAura(AID aid) : base(ActionID.MakeSpell(aid), 15, true) { } -} -class NHauntingCryStygianAura : HauntingCryStygianAura { public NHauntingCryStygianAura() : base(AID.NStygianAura) { } } -class SHauntingCryStygianAura : HauntingCryStygianAura { public SHauntingCryStygianAura() : base(AID.SStygianAura) { } } +class HauntingCryStygianAura(BossModule module, AID aid) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(aid), 15, true); +class NHauntingCryStygianAura(BossModule module) : HauntingCryStygianAura(module, AID.NStygianAura); +class SHauntingCryStygianAura(BossModule module) : HauntingCryStygianAura(module, AID.SStygianAura); diff --git a/BossMod/Modules/Endwalker/Criterion/C02AMR/C021Shishio/LightningBolt.cs b/BossMod/Modules/Endwalker/Criterion/C02AMR/C021Shishio/LightningBolt.cs index 5df5ad5dfa..95a5a30128 100644 --- a/BossMod/Modules/Endwalker/Criterion/C02AMR/C021Shishio/LightningBolt.cs +++ b/BossMod/Modules/Endwalker/Criterion/C02AMR/C021Shishio/LightningBolt.cs @@ -1,13 +1,10 @@ namespace BossMod.Endwalker.Criterion.C02AMR.C021Shishio; -class LightningBolt : Components.LocationTargetedAOEs -{ - public LightningBolt(AID aid) : base(ActionID.MakeSpell(aid), 6) { } -} -class NLightningBolt : LightningBolt { public NLightningBolt() : base(AID.NLightningBoltAOE) { } } -class SLightningBolt : LightningBolt { public SLightningBolt() : base(AID.SLightningBoltAOE) { } } +class LightningBolt(BossModule module, AID aid) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(aid), 6); +class NLightningBolt(BossModule module) : LightningBolt(module, AID.NLightningBoltAOE); +class SLightningBolt(BossModule module) : LightningBolt(module, AID.SLightningBoltAOE); -class CloudToCloud : Components.GenericAOEs +class CloudToCloud(BossModule module) : Components.GenericAOEs(module) { private List _aoes = new(); @@ -17,7 +14,7 @@ class CloudToCloud : Components.GenericAOEs public bool Active => _aoes.Count > 0; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_aoes.Count > 0) { @@ -27,21 +24,21 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { var shape = ShapeForAction(spell.Action); if (shape != null) _aoes.Add(new(shape, caster.Position, spell.Rotation, spell.NPCFinishAt)); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if (ShapeForAction(spell.Action) != null) { ++NumCasts; var numRemoved = _aoes.RemoveAll(aoe => aoe.Origin.AlmostEqual(caster.Position, 1)); if (numRemoved != 1) - module.ReportError(this, $"Unexpected number of matching aoes: {numRemoved}"); + ReportError($"Unexpected number of matching aoes: {numRemoved}"); } } diff --git a/BossMod/Modules/Endwalker/Criterion/C02AMR/C021Shishio/NoblePursuit.cs b/BossMod/Modules/Endwalker/Criterion/C02AMR/C021Shishio/NoblePursuit.cs index 8d4cb08c51..0d240ade97 100644 --- a/BossMod/Modules/Endwalker/Criterion/C02AMR/C021Shishio/NoblePursuit.cs +++ b/BossMod/Modules/Endwalker/Criterion/C02AMR/C021Shishio/NoblePursuit.cs @@ -1,6 +1,6 @@ namespace BossMod.Endwalker.Criterion.C02AMR.C021Shishio; -class NoblePursuit : Components.GenericAOEs +class NoblePursuit(BossModule module) : Components.GenericAOEs(module) { private WPos _posAfterLastCharge; private List _charges = new(); @@ -11,7 +11,7 @@ class NoblePursuit : Components.GenericAOEs public bool Active => _charges.Count + _rings.Count > 0; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { var firstActivation = _charges.Count > 0 ? _charges[0].Activation : _rings.Count > 0 ? _rings[0].Activation : default; var deadline = firstActivation.AddSeconds(2.5f); @@ -19,13 +19,13 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, yield return aoe; } - public override void OnActorCreated(BossModule module, Actor actor) + public override void OnActorCreated(Actor actor) { if ((OID)actor.OID is OID.NRairin or OID.SRairin) { if (_charges.Count == 0) { - module.ReportError(this, "Ring appeared while no charges are in progress"); + ReportError("Ring appeared while no charges are in progress"); return; } @@ -38,7 +38,7 @@ public override void OnActorCreated(BossModule module, Actor actor) if (Math.Abs(nextDir.Z) < 0.1) nextDir.Z = 0; nextDir = nextDir.Normalized(); - var ts = module.Bounds.Center + nextDir.Sign() * module.Bounds.HalfSize - _posAfterLastCharge; + var ts = Module.Bounds.Center + nextDir.Sign() * Module.Bounds.HalfSize - _posAfterLastCharge; var t = Math.Min(nextDir.X != 0 ? ts.X / nextDir.X : float.MaxValue, nextDir.Z != 0 ? ts.Z / nextDir.Z : float.MaxValue); _charges.Add(new(new AOEShapeRect(t, _chargeHalfWidth), _posAfterLastCharge, Angle.FromDirection(nextDir), _charges.Last().Activation.AddSeconds(1.4f))); _posAfterLastCharge += nextDir * t; @@ -47,14 +47,14 @@ public override void OnActorCreated(BossModule module, Actor actor) // ensure ring rotations are expected if (!_charges.Last().Rotation.AlmostEqual(actor.Rotation, 0.1f)) { - module.ReportError(this, "Unexpected rotation for ring inside last pending charge"); + ReportError("Unexpected rotation for ring inside last pending charge"); } _rings.Add(new(_shapeRing, actor.Position, actor.Rotation, _charges.Last().Activation.AddSeconds(0.8f))); } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.NNoblePursuitFirst or AID.SNoblePursuitFirst) { @@ -64,7 +64,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { diff --git a/BossMod/Modules/Endwalker/Criterion/C02AMR/C021Shishio/RokujoRevel.cs b/BossMod/Modules/Endwalker/Criterion/C02AMR/C021Shishio/RokujoRevel.cs index 048bc10f1e..ac8f43a4e9 100644 --- a/BossMod/Modules/Endwalker/Criterion/C02AMR/C021Shishio/RokujoRevel.cs +++ b/BossMod/Modules/Endwalker/Criterion/C02AMR/C021Shishio/RokujoRevel.cs @@ -14,10 +14,16 @@ class RokujoRevel : Components.GenericAOEs public bool Active => _pendingLines.Count + _pendingCircles.Count > 0; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public RokujoRevel(BossModule module) : base(module) + { + _clouds.AddRange(module.Enemies(OID.NRaiun)); + _clouds.AddRange(module.Enemies(OID.SRaiun)); + } + + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_pendingLines.Count > 1) - yield return new(_shapeLine, module.Bounds.Center, _pendingLines[1].dir, _pendingLines[1].activation, risky: false); + yield return new(_shapeLine, Module.Bounds.Center, _pendingLines[1].dir, _pendingLines[1].activation, Risky: false); if (_pendingCircles.Count > 0 && ShapeCircle is var shapeCircle && shapeCircle != null) { var firstFutureActivation = _pendingCircles[0].activation.AddSeconds(1); @@ -26,7 +32,7 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, { var lastFutureActivation = _pendingCircles[firstFutureIndex].activation.AddSeconds(1.5f); foreach (var p in _pendingCircles.Skip(firstFutureIndex).TakeWhile(p => p.activation <= lastFutureActivation)) - yield return new(shapeCircle, p.origin, default, p.activation, risky: false); + yield return new(shapeCircle, p.origin, default, p.activation, Risky: false); } else { @@ -36,16 +42,10 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, yield return new(shapeCircle, p.origin, default, p.activation, ArenaColor.Danger); } if (_pendingLines.Count > 0) - yield return new(_shapeLine, module.Bounds.Center, _pendingLines[0].dir, _pendingLines[0].activation, ArenaColor.Danger); - } - - public override void Init(BossModule module) - { - _clouds.AddRange(module.Enemies(OID.NRaiun)); - _clouds.AddRange(module.Enemies(OID.SRaiun)); + yield return new(_shapeLine, Module.Bounds.Center, _pendingLines[0].dir, _pendingLines[0].activation, ArenaColor.Danger); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { @@ -64,18 +64,18 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf var index = _pendingCircles.FindIndex(p => p.origin.AlmostEqual(caster.Position, 1)); if (index < 0) { - module.ReportError(this, $"Failed to predict levin from {caster.InstanceID:X}"); + ReportError($"Failed to predict levin from {caster.InstanceID:X}"); _pendingCircles.Add((caster.Position, spell.NPCFinishAt)); } else if (Math.Abs((_pendingCircles[index].activation - spell.NPCFinishAt).TotalSeconds) > 1) { - module.ReportError(this, $"Mispredicted levin from {caster.InstanceID:X} by {(_pendingCircles[index].activation - spell.NPCFinishAt).TotalSeconds}"); + ReportError($"Mispredicted levin from {caster.InstanceID:X} by {(_pendingCircles[index].activation - spell.NPCFinishAt).TotalSeconds}"); } break; } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { diff --git a/BossMod/Modules/Endwalker/Criterion/C02AMR/C021Shishio/Slither.cs b/BossMod/Modules/Endwalker/Criterion/C02AMR/C021Shishio/Slither.cs index 00c3bc8ddf..315916a3e5 100644 --- a/BossMod/Modules/Endwalker/Criterion/C02AMR/C021Shishio/Slither.cs +++ b/BossMod/Modules/Endwalker/Criterion/C02AMR/C021Shishio/Slither.cs @@ -1,21 +1,21 @@ namespace BossMod.Endwalker.Criterion.C02AMR.C021Shishio; -class Slither : Components.GenericAOEs +class Slither(BossModule module) : Components.GenericAOEs(module) { private Actor? _caster; private DateTime _predictedActivation; private static readonly AOEShapeCone _shape = new(25, 45.Degrees()); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_caster?.CastInfo != null) yield return new(_shape, _caster.Position, _caster.CastInfo.Rotation, _caster.CastInfo.NPCFinishAt); else if (_predictedActivation != default) - yield return new(_shape, module.PrimaryActor.Position, module.PrimaryActor.Rotation + 180.Degrees(), _predictedActivation); + yield return new(_shape, Module.PrimaryActor.Position, Module.PrimaryActor.Rotation + 180.Degrees(), _predictedActivation); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { @@ -31,7 +31,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.NSlither or AID.SSlither) { diff --git a/BossMod/Modules/Endwalker/Criterion/C02AMR/C021Shishio/UnnaturalWail.cs b/BossMod/Modules/Endwalker/Criterion/C02AMR/C021Shishio/UnnaturalWail.cs index 2e6469d2c5..6d2e03512a 100644 --- a/BossMod/Modules/Endwalker/Criterion/C02AMR/C021Shishio/UnnaturalWail.cs +++ b/BossMod/Modules/Endwalker/Criterion/C02AMR/C021Shishio/UnnaturalWail.cs @@ -1,6 +1,6 @@ namespace BossMod.Endwalker.Criterion.C02AMR.C021Shishio; -class UnnaturalWail : Components.UniformStackSpread +class UnnaturalWail(BossModule module) : Components.UniformStackSpread(module, 6, 6, 2, 2, alwaysShowSpreads: true) { public int NumMechanics { get; private set; } private List _spreadTargets = new(); @@ -8,9 +8,7 @@ class UnnaturalWail : Components.UniformStackSpread private DateTime _spreadResolve; private DateTime _stackResolve; - public UnnaturalWail() : base(6, 6, 2, 2, alwaysShowSpreads: true) { } - - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (_spreadResolve == default || _stackResolve == default) return; @@ -18,7 +16,7 @@ public override void AddGlobalHints(BossModule module, GlobalHints hints) hints.Add($"Debuff order: {orderHint}"); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { switch ((SID)status.ID) { @@ -35,7 +33,7 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { diff --git a/BossMod/Modules/Endwalker/Criterion/C02AMR/C022Gorai/C022Gorai.cs b/BossMod/Modules/Endwalker/Criterion/C02AMR/C022Gorai/C022Gorai.cs index 238866ebf1..0a1797d6b7 100644 --- a/BossMod/Modules/Endwalker/Criterion/C02AMR/C022Gorai/C022Gorai.cs +++ b/BossMod/Modules/Endwalker/Criterion/C02AMR/C022Gorai/C022Gorai.cs @@ -1,19 +1,13 @@ namespace BossMod.Endwalker.Criterion.C02AMR.C022Gorai; -class Unenlightenment : Components.CastCounter -{ - public Unenlightenment(AID aid) : base(ActionID.MakeSpell(aid)) { } -} -class NUnenlightenment : Unenlightenment { public NUnenlightenment() : base(AID.NUnenlightenmentAOE) { } } -class SUnenlightenment : Unenlightenment { public SUnenlightenment() : base(AID.SUnenlightenmentAOE) { } } +class Unenlightenment(BossModule module, AID aid) : Components.CastCounter(module, ActionID.MakeSpell(aid)); +class NUnenlightenment(BossModule module) : Unenlightenment(module, AID.NUnenlightenmentAOE); +class SUnenlightenment(BossModule module) : Unenlightenment(module, AID.SUnenlightenmentAOE); -public abstract class C022Gorai : BossModule -{ - public C022Gorai(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsSquare(new(300, -120), 20)) { } -} +public abstract class C022Gorai(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsSquare(new(300, -120), 20)); [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.NBoss, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 946, NameID = 12373, SortOrder = 7)] -public class C022NGorai : C022Gorai { public C022NGorai(WorldState ws, Actor primary) : base(ws, primary) { } } +public class C022NGorai(WorldState ws, Actor primary) : C022Gorai(ws, primary); [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.SBoss, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 947, NameID = 12373, SortOrder = 7)] -public class C022SGorai : C022Gorai { public C022SGorai(WorldState ws, Actor primary) : base(ws, primary) { } } +public class C022SGorai(WorldState ws, Actor primary) : C022Gorai(ws, primary); diff --git a/BossMod/Modules/Endwalker/Criterion/C02AMR/C022Gorai/C022GoraiStates.cs b/BossMod/Modules/Endwalker/Criterion/C02AMR/C022Gorai/C022GoraiStates.cs index 2c14cd40b4..536e45fc97 100644 --- a/BossMod/Modules/Endwalker/Criterion/C02AMR/C022Gorai/C022GoraiStates.cs +++ b/BossMod/Modules/Endwalker/Criterion/C02AMR/C022Gorai/C022GoraiStates.cs @@ -170,5 +170,5 @@ private void MalformedReincarnation(uint id, float delay) } } -class C022NGoraiStates : C022GoraiStates { public C022NGoraiStates(BossModule module) : base(module, false) { } } -class C022SGoraiStates : C022GoraiStates { public C022SGoraiStates(BossModule module) : base(module, true) { } } +class C022NGoraiStates(BossModule module) : C022GoraiStates(module, false); +class C022SGoraiStates(BossModule module) : C022GoraiStates(module, true); diff --git a/BossMod/Modules/Endwalker/Criterion/C02AMR/C022Gorai/CloudToGround.cs b/BossMod/Modules/Endwalker/Criterion/C02AMR/C022Gorai/CloudToGround.cs index 8474b98eb7..7290ef6000 100644 --- a/BossMod/Modules/Endwalker/Criterion/C02AMR/C022Gorai/CloudToGround.cs +++ b/BossMod/Modules/Endwalker/Criterion/C02AMR/C022Gorai/CloudToGround.cs @@ -1,19 +1,17 @@ namespace BossMod.Endwalker.Criterion.C02AMR.C022Gorai; -class CloudToGround : Components.Exaflare +class CloudToGround(BossModule module) : Components.Exaflare(module, 6) { - public CloudToGround() : base(6) { } - - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.NCloudToGroundAOEFirst or AID.SCloudToGroundAOEFirst) { // 4 central exaflares (+-6 along one axis, 0 along other) have 3 casts, 4 side exaflares (+-20 along one axis, +-5/15 along other) have 7 casts - Lines.Add(new() { Next = caster.Position, Advance = 6 * spell.Rotation.ToDirection(), NextExplosion = spell.NPCFinishAt, TimeToMove = 1.1f, ExplosionsLeft = (caster.Position - module.Bounds.Center).LengthSq() > 100 ? 7 : 3, MaxShownExplosions = 3 }); + Lines.Add(new() { Next = caster.Position, Advance = 6 * spell.Rotation.ToDirection(), NextExplosion = spell.NPCFinishAt, TimeToMove = 1.1f, ExplosionsLeft = (caster.Position - Module.Bounds.Center).LengthSq() > 100 ? 7 : 3, MaxShownExplosions = 3 }); } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.NCloudToGroundAOEFirst or AID.SCloudToGroundAOEFirst or AID.NCloudToGroundAOERest or AID.SCloudToGroundAOERest) { @@ -21,11 +19,11 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent int index = Lines.FindIndex(item => item.Next.AlmostEqual(caster.Position, 1)); if (index == -1) { - module.ReportError(this, $"Failed to find entry for {caster.InstanceID:X}"); + ReportError($"Failed to find entry for {caster.InstanceID:X}"); return; } - AdvanceLine(module, Lines[index], caster.Position); + AdvanceLine(Lines[index], caster.Position); if (Lines[index].ExplosionsLeft == 0) Lines.RemoveAt(index); } diff --git a/BossMod/Modules/Endwalker/Criterion/C02AMR/C022Gorai/FightingSpirits.cs b/BossMod/Modules/Endwalker/Criterion/C02AMR/C022Gorai/FightingSpirits.cs index 9595a76a97..9715ad0bf9 100644 --- a/BossMod/Modules/Endwalker/Criterion/C02AMR/C022Gorai/FightingSpirits.cs +++ b/BossMod/Modules/Endwalker/Criterion/C02AMR/C022Gorai/FightingSpirits.cs @@ -1,44 +1,39 @@ namespace BossMod.Endwalker.Criterion.C02AMR.C022Gorai; -class FightingSpirits : Components.KnockbackFromCastTarget -{ - public FightingSpirits(AID aid) : base(ActionID.MakeSpell(aid), 16) { } -} -class NFightingSpirits : FightingSpirits { public NFightingSpirits() : base(AID.NFightingSpiritsAOE) { } } -class SFightingSpirits : FightingSpirits { public SFightingSpirits() : base(AID.SFightingSpiritsAOE) { } } +class FightingSpirits(BossModule module, AID aid) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(aid), 16); +class NFightingSpirits(BossModule module) : FightingSpirits(module, AID.NFightingSpiritsAOE); +class SFightingSpirits(BossModule module) : FightingSpirits(module, AID.SFightingSpiritsAOE); -class WorldlyPursuitBait : Components.GenericBaitAway +class WorldlyPursuitBait(BossModule module) : Components.GenericBaitAway(module, centerAtTarget: true) { private int[] _order = { -1, -1, -1, -1 }; private static readonly AOEShapeCross _shape = new(60, 10); - public WorldlyPursuitBait() : base(centerAtTarget: true) { } - - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_order[slot] >= 0) hints.Add($"Order: {_order[slot] + 1}", false); - base.AddHints(module, slot, actor, hints, movementHints); + base.AddHints(slot, actor, hints); } // TODO: reconsider when we start showing first hint... - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.FightingSpirits) - UpdateBait(module); + UpdateBait(); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.NWorldlyPursuitAOE or AID.SWorldlyPursuitAOE) { ++NumCasts; - UpdateBait(module); + UpdateBait(); } } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { var order = (IconID)iconID switch { @@ -48,35 +43,33 @@ public override void OnEventIcon(BossModule module, Actor actor, uint iconID) IconID.Order4 => 3, _ => -1, }; - if (order >= 0 && module.Raid.FindSlot(actor.InstanceID) is var slot && slot >= 0) + if (order >= 0 && Raid.FindSlot(actor.InstanceID) is var slot && slot >= 0) { _order[slot] = order; } } - private void UpdateBait(BossModule module) + private void UpdateBait() { CurrentBaits.Clear(); - var baiter = module.Raid[Array.IndexOf(_order, NumCasts)]; + var baiter = Raid[Array.IndexOf(_order, NumCasts)]; if (baiter != null) - CurrentBaits.Add(new(module.PrimaryActor, baiter, _shape)); + CurrentBaits.Add(new(Module.PrimaryActor, baiter, _shape)); } } -class WorldlyPursuitLast : Components.GenericAOEs +class WorldlyPursuitLast(BossModule module) : Components.GenericAOEs(module) { - private DateTime _activation; + private DateTime _activation = module.WorldState.FutureTime(3.1f); private static readonly AOEShapeCross _shape = new(60, 10); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { - yield return new(_shape, module.Bounds.Center, Angle.FromDirection(module.Bounds.Center - module.PrimaryActor.Position), _activation); + yield return new(_shape, Module.Bounds.Center, Angle.FromDirection(Module.Bounds.Center - Module.PrimaryActor.Position), _activation); } - public override void Init(BossModule module) => _activation = module.WorldState.CurrentTime.AddSeconds(3.1f); - - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.NWorldlyPursuitAOE or AID.SWorldlyPursuitAOE) ++NumCasts; diff --git a/BossMod/Modules/Endwalker/Criterion/C02AMR/C022Gorai/FlameAndSulphur.cs b/BossMod/Modules/Endwalker/Criterion/C02AMR/C022Gorai/FlameAndSulphur.cs index 90a5be7b03..eec856bc18 100644 --- a/BossMod/Modules/Endwalker/Criterion/C02AMR/C022Gorai/FlameAndSulphur.cs +++ b/BossMod/Modules/Endwalker/Criterion/C02AMR/C022Gorai/FlameAndSulphur.cs @@ -1,6 +1,6 @@ namespace BossMod.Endwalker.Criterion.C02AMR.C022Gorai; -class FlameAndSulphur : Components.GenericAOEs +class FlameAndSulphur(BossModule module) : Components.GenericAOEs(module) { private List _aoes = new(); @@ -9,32 +9,32 @@ class FlameAndSulphur : Components.GenericAOEs private static readonly AOEShapeCircle _shapeRockExpand = new(11); private static readonly AOEShapeDonut _shapeRockSplit = new(6, 16); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => _aoes; + public override IEnumerable ActiveAOEs(int slot, Actor actor) => _aoes; - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { case AID.BrazenBalladExpanding: - foreach (var a in module.Enemies(OID.FlameAndSulphurFlame)) + foreach (var a in Module.Enemies(OID.FlameAndSulphurFlame)) _aoes.Add(new(_shapeFlameExpand, a.Position, a.Rotation, spell.NPCFinishAt.AddSeconds(3.1f))); - foreach (var a in module.Enemies(OID.FlameAndSulphurRock)) + foreach (var a in Module.Enemies(OID.FlameAndSulphurRock)) _aoes.Add(new(_shapeRockExpand, a.Position, a.Rotation, spell.NPCFinishAt.AddSeconds(3.1f))); break; case AID.BrazenBalladSplitting: - foreach (var a in module.Enemies(OID.FlameAndSulphurFlame)) + foreach (var a in Module.Enemies(OID.FlameAndSulphurFlame)) { var offset = a.Rotation.ToDirection().OrthoL() * 7.5f; _aoes.Add(new(_shapeFlameSplit, a.Position + offset, a.Rotation, spell.NPCFinishAt.AddSeconds(3.1f))); _aoes.Add(new(_shapeFlameSplit, a.Position - offset, a.Rotation, spell.NPCFinishAt.AddSeconds(3.1f))); } - foreach (var a in module.Enemies(OID.FlameAndSulphurRock)) + foreach (var a in Module.Enemies(OID.FlameAndSulphurRock)) _aoes.Add(new(_shapeRockSplit, a.Position, a.Rotation, spell.NPCFinishAt.AddSeconds(3.1f))); break; } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.NFireSpreadExpand or AID.NFireSpreadSplit or AID.NFallingRockExpand or AID.NFallingRockSplit or AID.SFireSpreadExpand or AID.SFireSpreadSplit or AID.SFallingRockExpand or AID.SFallingRockSplit) diff --git a/BossMod/Modules/Endwalker/Criterion/C02AMR/C022Gorai/ImpurePurgation.cs b/BossMod/Modules/Endwalker/Criterion/C02AMR/C022Gorai/ImpurePurgation.cs index e00d6ba99b..412272caaf 100644 --- a/BossMod/Modules/Endwalker/Criterion/C02AMR/C022Gorai/ImpurePurgation.cs +++ b/BossMod/Modules/Endwalker/Criterion/C02AMR/C022Gorai/ImpurePurgation.cs @@ -1,10 +1,8 @@ namespace BossMod.Endwalker.Criterion.C02AMR.C022Gorai; -class ImpurePurgationBait : Components.BaitAwayEveryone +class ImpurePurgationBait(BossModule module) : Components.BaitAwayEveryone(module, module.PrimaryActor, new AOEShapeCone(60, 22.5f.Degrees())) { - public ImpurePurgationBait() : base(new AOEShapeCone(60, 22.5f.Degrees())) { } - - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.NImpurePurgationBait or AID.SImpurePurgationBait) { @@ -14,9 +12,6 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } -class ImpurePurgationAOE : Components.SelfTargetedAOEs -{ - public ImpurePurgationAOE(AID aid) : base(ActionID.MakeSpell(aid), new AOEShapeCone(60, 22.5f.Degrees())) { } -} -class NImpurePurgationAOE : ImpurePurgationAOE { public NImpurePurgationAOE() : base(AID.NImpurePurgationAOE) { } } -class SImpurePurgationAOE : ImpurePurgationAOE { public SImpurePurgationAOE() : base(AID.SImpurePurgationAOE) { } } +class ImpurePurgationAOE(BossModule module, AID aid) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(aid), new AOEShapeCone(60, 22.5f.Degrees())); +class NImpurePurgationAOE(BossModule module) : ImpurePurgationAOE(module, AID.NImpurePurgationAOE); +class SImpurePurgationAOE(BossModule module) : ImpurePurgationAOE(module, AID.SImpurePurgationAOE); diff --git a/BossMod/Modules/Endwalker/Criterion/C02AMR/C022Gorai/MalformedReincarnation.cs b/BossMod/Modules/Endwalker/Criterion/C02AMR/C022Gorai/MalformedReincarnation.cs index d1241e7751..798c0a2f1d 100644 --- a/BossMod/Modules/Endwalker/Criterion/C02AMR/C022Gorai/MalformedReincarnation.cs +++ b/BossMod/Modules/Endwalker/Criterion/C02AMR/C022Gorai/MalformedReincarnation.cs @@ -1,14 +1,11 @@ namespace BossMod.Endwalker.Criterion.C02AMR.C022Gorai; -class MalformedReincarnation : Components.CastCounter -{ - public MalformedReincarnation(AID aid) : base(ActionID.MakeSpell(aid)) { } -} -class NMalformedReincarnation : MalformedReincarnation { public NMalformedReincarnation() : base(AID.NMalformedReincarnationAOE) { } } -class SMalformedReincarnation : MalformedReincarnation { public SMalformedReincarnation() : base(AID.SMalformedReincarnationAOE) { } } +class MalformedReincarnation(BossModule module, AID aid) : Components.CastCounter(module, ActionID.MakeSpell(aid)); +class NMalformedReincarnation(BossModule module) : MalformedReincarnation(module, AID.NMalformedReincarnationAOE); +class SMalformedReincarnation(BossModule module) : MalformedReincarnation(module, AID.SMalformedReincarnationAOE); // TODO: initial hints (depending on strat?) + specific towers -class MalformedPrayer2 : Components.GenericTowers +class MalformedPrayer2(BossModule module) : Components.GenericTowers(module) { private BitMask _blueTowers; private BitMatrix _playerBlue; // [i] = blue debuffs for slot i; 0 = bait, 1/2/3 = soaks @@ -16,22 +13,22 @@ class MalformedPrayer2 : Components.GenericTowers private static readonly float TowerRadius = 4; - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { - if (!_baitsDone && (Towers.Any(t => t.Position.InCircle(actor.Position, TowerRadius * 2)) || module.Raid.WithoutSlot().InRadiusExcluding(actor, TowerRadius * 2).Any())) + if (!_baitsDone && (Towers.Any(t => t.Position.InCircle(actor.Position, TowerRadius * 2)) || Raid.WithoutSlot().InRadiusExcluding(actor, TowerRadius * 2).Any())) hints.Add("Bait away from other towers!"); - base.AddHints(module, slot, actor, hints, movementHints); + base.AddHints(slot, actor, hints); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - base.DrawArenaForeground(module, pcSlot, pc, arena); + base.DrawArenaForeground(pcSlot, pc); if (!_baitsDone) - foreach (var p in module.Raid.WithoutSlot()) - arena.AddCircle(p.Position, TowerRadius, ArenaColor.Danger); + foreach (var p in Raid.WithoutSlot()) + Arena.AddCircle(p.Position, TowerRadius, ArenaColor.Danger); } - public override void OnActorCreated(BossModule module, Actor actor) + public override void OnActorCreated(Actor actor) { if ((OID)actor.OID is OID.OrangeTower1 or OID.BlueTower1) { @@ -39,7 +36,7 @@ public override void OnActorCreated(BossModule module, Actor actor) } } - public override void OnEventEnvControl(BossModule module, byte index, uint state) + public override void OnEventEnvControl(byte index, uint state) { if (state == 0x00020001) { @@ -71,12 +68,12 @@ public override void OnEventEnvControl(BossModule module, byte index, uint state }; if (offset != default) { - AddTower(module.Bounds.Center + offset, blue); + AddTower(Module.Bounds.Center + offset, blue); } } } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { var blueSlot = (SID)status.ID switch { @@ -86,20 +83,20 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st SID.OdderIncarnation3 => 3, _ => -1 }; - if (blueSlot >= 0 && module.Raid.FindSlot(actor.InstanceID) is var slot && slot >= 0) + if (blueSlot >= 0 && Raid.FindSlot(actor.InstanceID) is var slot && slot >= 0) _playerBlue[slot, blueSlot] = true; } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { if ((SID)status.ID is SID.SquirrellyPrayer or SID.OdderPrayer) { _baitsDone = true; - EnableNextTowers(module); + EnableNextTowers(); } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.NBurstOrange or AID.NBurstBlue or AID.SBurstOrange or AID.SBurstBlue) { @@ -108,9 +105,9 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent if (index >= 0) Towers.RemoveAt(index); else - module.ReportError(this, $"Failed to find at {caster.Position}"); + ReportError($"Failed to find at {caster.Position}"); if ((NumCasts & 3) == 0) - EnableNextTowers(module); + EnableNextTowers(); } } @@ -121,11 +118,11 @@ private void AddTower(WPos position, bool blue) Towers.Add(new(position, TowerRadius, 0, 0, new(0xF))); } - private void EnableNextTowers(BossModule module) + private void EnableNextTowers() { var blueSlot = NumCasts / 4 + 1; BitMask forbiddenOrange = new(); - foreach (var (slot, _) in module.Raid.WithSlot(true)) + foreach (var (slot, _) in Raid.WithSlot(true)) if (_playerBlue[slot, blueSlot]) forbiddenOrange.Set(slot); var forbiddenBlue = forbiddenOrange ^ new BitMask(0xF); @@ -136,9 +133,6 @@ private void EnableNextTowers(BossModule module) } } -class FlickeringFlame : Components.SelfTargetedAOEs -{ - public FlickeringFlame(AID aid) : base(ActionID.MakeSpell(aid), new AOEShapeRect(46, 2.5f), 8) { } -} -class NFlickeringFlame : FlickeringFlame { public NFlickeringFlame() : base(AID.NFireSpreadCross) { } } -class SFlickeringFlame : FlickeringFlame { public SFlickeringFlame() : base(AID.SFireSpreadCross) { } } +class FlickeringFlame(BossModule module, AID aid) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(aid), new AOEShapeRect(46, 2.5f), 8); +class NFlickeringFlame(BossModule module) : FlickeringFlame(module, AID.NFireSpreadCross); +class SFlickeringFlame(BossModule module) : FlickeringFlame(module, AID.SFireSpreadCross); diff --git a/BossMod/Modules/Endwalker/Criterion/C02AMR/C022Gorai/RousingReincarnation.cs b/BossMod/Modules/Endwalker/Criterion/C02AMR/C022Gorai/RousingReincarnation.cs index 0461d835fa..5a6c53fcd4 100644 --- a/BossMod/Modules/Endwalker/Criterion/C02AMR/C022Gorai/RousingReincarnation.cs +++ b/BossMod/Modules/Endwalker/Criterion/C02AMR/C022Gorai/RousingReincarnation.cs @@ -1,19 +1,16 @@ namespace BossMod.Endwalker.Criterion.C02AMR.C022Gorai; -class RousingReincarnation : Components.CastCounter -{ - public RousingReincarnation(AID aid) : base(ActionID.MakeSpell(aid)) { } -} -class NRousingReincarnation : RousingReincarnation { public NRousingReincarnation() : base(AID.NRousingReincarnationAOE) { } } -class SRousingReincarnation : RousingReincarnation { public SRousingReincarnation() : base(AID.SRousingReincarnationAOE) { } } +class RousingReincarnation(BossModule module, AID aid) : Components.CastCounter(module, ActionID.MakeSpell(aid)); +class NRousingReincarnation(BossModule module) : RousingReincarnation(module, AID.NRousingReincarnationAOE); +class SRousingReincarnation(BossModule module) : RousingReincarnation(module, AID.SRousingReincarnationAOE); // note on towers: indices are 0-7 CW from N, even (cardinal) are blue, odd (intercardinal) are orange -class MalformedPrayer1 : Components.GenericTowers +class MalformedPrayer1(BossModule module) : Components.GenericTowers(module) { public int[] OrangeSoakOrder = { -1, -1, -1, -1 }; // blue is inferred as (x+2)%4 private List _towerOrder = new(); - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { var order = (SID)status.ID switch { @@ -23,21 +20,21 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st SID.RodentialRebirth4 => 3, _ => -1, }; - if (order >= 0 && module.Raid.FindSlot(actor.InstanceID) is var slot && slot >= 0) + if (order >= 0 && Raid.FindSlot(actor.InstanceID) is var slot && slot >= 0) OrangeSoakOrder[slot] = order; } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.NBurstOrange or AID.NBurstBlue or AID.SBurstOrange or AID.SBurstBlue) { ++NumCasts; if ((NumCasts & 1) == 0) - UpdateTowers(module); + UpdateTowers(); } } - public override void OnEventEnvControl(BossModule module, byte index, uint state) + public override void OnEventEnvControl(byte index, uint state) { if (state == 0x00020001) { @@ -63,12 +60,12 @@ public override void OnEventEnvControl(BossModule module, byte index, uint state { _towerOrder.Add(towerIndex); if (_towerOrder.Count == 2) - UpdateTowers(module); + UpdateTowers(); } } } - private void UpdateTowers(BossModule module) + private void UpdateTowers() { Towers.Clear(); int towerOrder = NumCasts / 2; @@ -79,7 +76,7 @@ private void UpdateTowers(BossModule module) BitMask forbidden = new(0xf); var soakerSlot = (index & 1) != 0 ? orangeSoaker : blueSoaker; forbidden.Clear(soakerSlot); - Towers.Add(new(module.Bounds.Center + 11 * (180.Degrees() - index * 45.Degrees()).ToDirection(), 4, forbiddenSoakers: forbidden)); + Towers.Add(new(Module.Bounds.Center + 11 * (180.Degrees() - index * 45.Degrees()).ToDirection(), 4, ForbiddenSoakers: forbidden)); } } } @@ -88,12 +85,10 @@ class PointedPurgation : Components.BaitAwayTethers { private BitMask _oddSoakers; // players with 1/3 debuff - public PointedPurgation() : base(new AOEShapeCone(60, 22.5f.Degrees()), (uint)TetherID.PointedPurgation) { } - - public override void Init(BossModule module) - { + public PointedPurgation(BossModule module) : base(module, new AOEShapeCone(60, 22.5f.Degrees()), (uint)TetherID.PointedPurgation) +{ var malformedPlayer = module.FindComponent(); - foreach (var (index, _) in module.Raid.WithSlot(true)) + foreach (var (index, _) in Raid.WithSlot(true)) { var soakOrder = malformedPlayer?.OrangeSoakOrder[index] ?? -1; if (soakOrder is 0 or 2) @@ -102,12 +97,12 @@ public override void Init(BossModule module) ForbiddenPlayers = _oddSoakers; } - public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) + public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) { return _oddSoakers[playerSlot] != _oddSoakers[pcSlot] ? PlayerPriority.Danger : PlayerPriority.Normal; } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.NPointedPurgationAOE or AID.SPointedPurgationAOE) { diff --git a/BossMod/Modules/Endwalker/Criterion/C02AMR/C022Gorai/SealOfScurryingSparks.cs b/BossMod/Modules/Endwalker/Criterion/C02AMR/C022Gorai/SealOfScurryingSparks.cs index 8e968fe204..e72cb95f9e 100644 --- a/BossMod/Modules/Endwalker/Criterion/C02AMR/C022Gorai/SealOfScurryingSparks.cs +++ b/BossMod/Modules/Endwalker/Criterion/C02AMR/C022Gorai/SealOfScurryingSparks.cs @@ -1,6 +1,6 @@ namespace BossMod.Endwalker.Criterion.C02AMR.C022Gorai; -class SealOfScurryingSparks : Components.UniformStackSpread +class SealOfScurryingSparks(BossModule module) : Components.UniformStackSpread(module, 6, 10, alwaysShowSpreads: true) { public int NumMechanics { get; private set; } private List _spreadTargets = new(); @@ -8,9 +8,7 @@ class SealOfScurryingSparks : Components.UniformStackSpread private DateTime _spreadResolve; private DateTime _stackResolve; - public SealOfScurryingSparks() : base(6, 10, alwaysShowSpreads: true) { } - - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (_spreadResolve == default || _stackResolve == default) return; @@ -18,7 +16,7 @@ public override void AddGlobalHints(BossModule module, GlobalHints hints) hints.Add($"Debuff order: {orderHint}"); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { switch ((SID)status.ID) { @@ -35,7 +33,7 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { diff --git a/BossMod/Modules/Endwalker/Criterion/C02AMR/C022Gorai/Thundercall.cs b/BossMod/Modules/Endwalker/Criterion/C02AMR/C022Gorai/Thundercall.cs index f72bf6c1b3..a0d1580ca6 100644 --- a/BossMod/Modules/Endwalker/Criterion/C02AMR/C022Gorai/Thundercall.cs +++ b/BossMod/Modules/Endwalker/Criterion/C02AMR/C022Gorai/Thundercall.cs @@ -1,6 +1,6 @@ namespace BossMod.Endwalker.Criterion.C02AMR.C022Gorai; -class Thundercall : Components.GenericAOEs +class Thundercall(BossModule module) : Components.GenericAOEs(module) { private List _orbs = new(); private Actor? _safeOrb; @@ -10,32 +10,32 @@ class Thundercall : Components.GenericAOEs private static readonly AOEShapeCircle _shapeSmall = new(8); private static readonly AOEShapeCircle _shapeLarge = new(18); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => _aoes; + public override IEnumerable ActiveAOEs(int slot, Actor actor) => _aoes; - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - arena.Actors(_orbs, ArenaColor.Object, true); + Arena.Actors(_orbs, ArenaColor.Object, true); if (_miniTarget != null) - arena.AddCircle(_miniTarget.Position, 3, ArenaColor.Danger); + Arena.AddCircle(_miniTarget.Position, 3, ArenaColor.Danger); if (_safeOrb != null) - arena.AddCircle(_safeOrb.Position, 1, ArenaColor.Safe); + Arena.AddCircle(_safeOrb.Position, 1, ArenaColor.Safe); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.NHumbleHammerAOE or AID.SHumbleHammerAOE) { - _orbs.AddRange(module.Enemies(OID.NBallOfLevin)); - _orbs.AddRange(module.Enemies(OID.SBallOfLevin)); + _orbs.AddRange(Module.Enemies(OID.NBallOfLevin)); + _orbs.AddRange(Module.Enemies(OID.SBallOfLevin)); WDir center = new(); foreach (var o in _orbs) - center += o.Position - module.Bounds.Center; - _safeOrb = _orbs.Farthest(module.Bounds.Center + center); - _miniTarget = module.WorldState.Actors.Find(spell.TargetID); + center += o.Position - Module.Bounds.Center; + _safeOrb = _orbs.Farthest(Module.Bounds.Center + center); + _miniTarget = WorldState.Actors.Find(spell.TargetID); } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { @@ -44,7 +44,7 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent _miniTarget = null; _safeOrb = null; foreach (var o in _orbs) - _aoes.Add(new(spell.Targets.Any(t => t.ID == o.InstanceID) ? _shapeSmall : _shapeLarge, o.Position, default, module.WorldState.CurrentTime.AddSeconds(4.2f))); + _aoes.Add(new(spell.Targets.Any(t => t.ID == o.InstanceID) ? _shapeSmall : _shapeLarge, o.Position, default, WorldState.FutureTime(4.2f))); break; case AID.NShockSmall: case AID.NShockLarge: @@ -57,18 +57,16 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } -class Flintlock : Components.GenericWildCharge +class Flintlock(BossModule module) : Components.GenericWildCharge(module, 4) { - public Flintlock() : base(4) { } - - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { case AID.NHumbleHammerAOE: case AID.SHumbleHammerAOE: - Source = module.PrimaryActor; - foreach (var (slot, player) in module.Raid.WithSlot(true)) + Source = Module.PrimaryActor; + foreach (var (slot, player) in Raid.WithSlot(true)) PlayerRoles[slot] = spell.MainTargetID == player.InstanceID ? PlayerRole.Target : player.Role == Role.Tank ? PlayerRole.Share : PlayerRole.ShareNotFirst; // TODO: or should it be 'avoid'? break; case AID.NFlintlockAOE: diff --git a/BossMod/Modules/Endwalker/Criterion/C02AMR/C022Gorai/TorchingTorment.cs b/BossMod/Modules/Endwalker/Criterion/C02AMR/C022Gorai/TorchingTorment.cs index 7bee1b1d81..c298575fff 100644 --- a/BossMod/Modules/Endwalker/Criterion/C02AMR/C022Gorai/TorchingTorment.cs +++ b/BossMod/Modules/Endwalker/Criterion/C02AMR/C022Gorai/TorchingTorment.cs @@ -1,18 +1,16 @@ namespace BossMod.Endwalker.Criterion.C02AMR.C022Gorai; -class TorchingTorment : Components.GenericBaitAway +class TorchingTorment(BossModule module) : Components.GenericBaitAway(module, centerAtTarget: true) { private static readonly AOEShapeCircle _shape = new(6); - public TorchingTorment() : base(centerAtTarget: true) { } - - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { - if ((AID)spell.Action.ID == AID.TorchingTorment && module.WorldState.Actors.Find(spell.TargetID) is var target && target != null) + if ((AID)spell.Action.ID == AID.TorchingTorment && WorldState.Actors.Find(spell.TargetID) is var target && target != null) CurrentBaits.Add(new(caster, target, _shape)); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.NTorchingTormentAOE or AID.STorchingTormentAOE) { diff --git a/BossMod/Modules/Endwalker/Criterion/C02AMR/C023Moko/AzureAuspice.cs b/BossMod/Modules/Endwalker/Criterion/C02AMR/C023Moko/AzureAuspice.cs index d57ba25f52..434bd4394e 100644 --- a/BossMod/Modules/Endwalker/Criterion/C02AMR/C023Moko/AzureAuspice.cs +++ b/BossMod/Modules/Endwalker/Criterion/C02AMR/C023Moko/AzureAuspice.cs @@ -1,23 +1,17 @@ namespace BossMod.Endwalker.Criterion.C02AMR.C023Moko; -class AzureAuspice : Components.SelfTargetedAOEs -{ - public AzureAuspice(AID aid) : base(ActionID.MakeSpell(aid), new AOEShapeDonut(6, 40)) { } // TODO: verify inner radius -} -class NAzureAuspice : AzureAuspice { public NAzureAuspice() : base(AID.NAzureAuspice) { } } -class SAzureAuspice : AzureAuspice { public SAzureAuspice() : base(AID.SAzureAuspice) { } } +class AzureAuspice(BossModule module, AID aid) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(aid), new AOEShapeDonut(6, 40)); // TODO: verify inner radius +class NAzureAuspice(BossModule module) : AzureAuspice(module, AID.NAzureAuspice); +class SAzureAuspice(BossModule module) : AzureAuspice(module, AID.SAzureAuspice); -class BoundlessAzure : Components.SelfTargetedAOEs -{ - public BoundlessAzure(AID aid) : base(ActionID.MakeSpell(aid), new AOEShapeRect(30, 5, 30)) { } -} -class NBoundlessAzure : BoundlessAzure { public NBoundlessAzure() : base(AID.NBoundlessAzureAOE) { } } -class SBoundlessAzure : BoundlessAzure { public SBoundlessAzure() : base(AID.SBoundlessAzureAOE) { } } +class BoundlessAzure(BossModule module, AID aid) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(aid), new AOEShapeRect(30, 5, 30)); +class NBoundlessAzure(BossModule module) : BoundlessAzure(module, AID.NBoundlessAzureAOE); +class SBoundlessAzure(BossModule module) : BoundlessAzure(module, AID.SBoundlessAzureAOE); // note: each initial line sends out two 'exaflares' to the left & right // each subsequent exaflare moves by distance 5, and happen approximately 2s apart // each wave is 5 subsequent lines, except for two horizontal ones that go towards edges - they only have 1 line - meaning there's a total 32 'rest' casts -class Upwell : Components.GenericAOEs +class Upwell(BossModule module) : Components.GenericAOEs(module) { private class LineSequence { @@ -33,16 +27,16 @@ private class LineSequence private static readonly AOEShapeRect _shapeWide = new(30, 5, 30); private static readonly AOEShapeRect _shapeNarrow = new(30, 2.5f, 30); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { // TODO: think about imminent/future color/risk, esp for overlapping lines - var imminentDeadline = module.WorldState.CurrentTime.AddSeconds(5); + var imminentDeadline = WorldState.FutureTime(5); foreach (var l in _lines) if (l.NextShape != null && l.NextActivation <= imminentDeadline) yield return new(l.NextShape, l.NextOrigin, l.Rotation, l.NextActivation); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.NUpwellFirst or AID.SUpwellFirst) { @@ -52,7 +46,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.NUpwellFirst or AID.SUpwellFirst) { @@ -60,17 +54,17 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn var index = _lines.FindIndex(l => l.NextOrigin.AlmostEqual(caster.Position, 1) && l.NextShape == _shapeWide && l.Rotation.AlmostEqual(spell.Rotation, 0.1f)); if (index < 0 || index + 1 >= _lines.Count) { - module.ReportError(this, $"Unexpected exaline end"); + ReportError($"Unexpected exaline end"); } else { - Advance(module, _lines[index]); - Advance(module, _lines[index + 1]); + Advance(_lines[index]); + Advance(_lines[index + 1]); } } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.NUpwellRest or AID.SUpwellRest) { @@ -78,20 +72,20 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent var index = _lines.FindIndex(l => l.NextOrigin.AlmostEqual(caster.Position, 1) && l.NextShape == _shapeNarrow && l.Rotation.AlmostEqual(caster.Rotation, 0.1f)); if (index < 0) { - module.ReportError(this, $"Unexpected exaline @ {caster.Position} / {caster.Rotation}"); + ReportError($"Unexpected exaline @ {caster.Position} / {caster.Rotation}"); } else { - Advance(module, _lines[index]); + Advance(_lines[index]); } } } - private void Advance(BossModule module, LineSequence line) + private void Advance(LineSequence line) { line.NextOrigin += line.Advance; - line.NextActivation = module.WorldState.CurrentTime.AddSeconds(2); - var offset = (line.NextOrigin - module.Bounds.Center).Abs(); + line.NextActivation = WorldState.FutureTime(2); + var offset = (line.NextOrigin - Module.Bounds.Center).Abs(); line.NextShape = offset.X < 19 && offset.Z < 19 ? _shapeNarrow : null; } } diff --git a/BossMod/Modules/Endwalker/Criterion/C02AMR/C023Moko/C023Moko.cs b/BossMod/Modules/Endwalker/Criterion/C02AMR/C023Moko/C023Moko.cs index 1ca1d27b96..b19eef47fb 100644 --- a/BossMod/Modules/Endwalker/Criterion/C02AMR/C023Moko/C023Moko.cs +++ b/BossMod/Modules/Endwalker/Criterion/C02AMR/C023Moko/C023Moko.cs @@ -1,19 +1,13 @@ namespace BossMod.Endwalker.Criterion.C02AMR.C023Moko; -class LateralSlice : Components.BaitAwayCast -{ - public LateralSlice(AID aid) : base(ActionID.MakeSpell(aid), new AOEShapeCone(40, 45.Degrees())) { } // TODO: verify angle -} -class NLateralSlice : LateralSlice { public NLateralSlice() : base(AID.NLateralSlice) { } } -class SLateralSlice : LateralSlice { public SLateralSlice() : base(AID.SLateralSlice) { } } +class LateralSlice(BossModule module, AID aid) : Components.BaitAwayCast(module, ActionID.MakeSpell(aid), new AOEShapeCone(40, 45.Degrees())); // TODO: verify angle +class NLateralSlice(BossModule module) : LateralSlice(module, AID.NLateralSlice); +class SLateralSlice(BossModule module) : LateralSlice(module, AID.SLateralSlice); -public abstract class C023Moko : BossModule -{ - public C023Moko(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsSquare(new(-200, 0), 20)) { } -} +public abstract class C023Moko(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsSquare(new(-200, 0), 20)); [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.NBoss, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 946, NameID = 12357, SortOrder = 8)] -public class C023NMoko : C023Moko { public C023NMoko(WorldState ws, Actor primary) : base(ws, primary) { } } +public class C023NMoko(WorldState ws, Actor primary) : C023Moko(ws, primary); [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.SBoss, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 947, NameID = 12357, SortOrder = 8)] -public class C023SMoko : C023Moko { public C023SMoko(WorldState ws, Actor primary) : base(ws, primary) { } } +public class C023SMoko(WorldState ws, Actor primary) : C023Moko(ws, primary); diff --git a/BossMod/Modules/Endwalker/Criterion/C02AMR/C023Moko/C023MokoStates.cs b/BossMod/Modules/Endwalker/Criterion/C02AMR/C023Moko/C023MokoStates.cs index 656286756b..bc1c78a5ed 100644 --- a/BossMod/Modules/Endwalker/Criterion/C02AMR/C023Moko/C023MokoStates.cs +++ b/BossMod/Modules/Endwalker/Criterion/C02AMR/C023Moko/C023MokoStates.cs @@ -169,5 +169,5 @@ private void SoldiersOfDeath(uint id, float delay) } } -class C023NMokoStates : C023MokoStates { public C023NMokoStates(BossModule module) : base(module, false) { } } -class C023SMokoStates : C023MokoStates { public C023SMokoStates(BossModule module) : base(module, true) { } } +class C023NMokoStates(BossModule module) : C023MokoStates(module, false); +class C023SMokoStates(BossModule module) : C023MokoStates(module, true); diff --git a/BossMod/Modules/Endwalker/Criterion/C02AMR/C023Moko/Giri.cs b/BossMod/Modules/Endwalker/Criterion/C02AMR/C023Moko/Giri.cs index 1feba84a57..7235afc3a6 100644 --- a/BossMod/Modules/Endwalker/Criterion/C02AMR/C023Moko/Giri.cs +++ b/BossMod/Modules/Endwalker/Criterion/C02AMR/C023Moko/Giri.cs @@ -2,7 +2,7 @@ // the main complexity is that first status and cast-start happen at the same time, so we can receive them in arbitrary order // we need cast to know proper rotation (we can't use actor's rotation, since it's interpolated) -class TripleKasumiGiri : Components.GenericAOEs +class TripleKasumiGiri(BossModule module) : Components.GenericAOEs(module) { private List _hints = new(); private List _directionOffsets = new(); @@ -13,15 +13,15 @@ class TripleKasumiGiri : Components.GenericAOEs private static readonly AOEShapeCircle _shapeOut = new(6); private static readonly AOEShapeDonut _shapeIn = new(6, 40); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => _aoes.Take(2); + public override IEnumerable ActiveAOEs(int slot, Actor actor) => _aoes.Take(2); - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (_hints.Count > 0) hints.Add($"Safespots: {string.Join(" > ", _hints)}"); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Giri) { @@ -39,7 +39,7 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st }; if (hint.Length == 0) { - module.ReportError(this, $"Unexpected extra {status.Extra:X}"); + ReportError($"Unexpected extra {status.Extra:X}"); return; } @@ -47,7 +47,7 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st _directionOffsets.Add(dir); _hints.Add(hint); - //var activation = _aoes.Count > 0 ? _aoes.Last().Activation.AddSeconds(3.1f) : actor.CastInfo?.NPCFinishAt ?? module.WorldState.CurrentTime.AddSeconds(12); + //var activation = _aoes.Count > 0 ? _aoes.Last().Activation.AddSeconds(3.1f) : actor.CastInfo?.NPCFinishAt ?? WorldState.FutureTime(12); //var rotation = (_aoes.Count > 0 ? _aoes.Last().Rotation : actor.Rotation) + dir; //_aoes.Add(new(donut ? _shapeIn : _shapeOut, actor.Position, rotation, activation)); //_aoes.Add(new(_shapeCone, actor.Position, rotation, activation)); @@ -55,7 +55,7 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { var (dir, donut, order) = ClassifyAction(spell.Action); if (order < 0) @@ -65,36 +65,36 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf { // first cast: create first aoe pair, first status may or may not be known yet, so verify consistency on cast-finish if (_aoes.Count > 0 || NumCasts > 0) - module.ReportError(this, "Unexpected state on first cast start"); + ReportError("Unexpected state on first cast start"); } else if (order > 0) { // subsequent casts: ensure predicted state is correct, then update aoes in case it was not if (NumCasts == 0 || NumCasts >= 3 || _aoes.Count != 2) - module.ReportError(this, "Unexpected state on subsequent cast"); + ReportError("Unexpected state on subsequent cast"); var mismatch = _aoes.FindIndex(aoe => !aoe.Rotation.AlmostEqual(spell.Rotation, 0.1f)); if (mismatch >= 0) - module.ReportError(this, $"Mispredicted rotation: {spell.Rotation} vs predicted {_aoes[mismatch].Rotation}"); + ReportError($"Mispredicted rotation: {spell.Rotation} vs predicted {_aoes[mismatch].Rotation}"); _aoes.Clear(); } _aoes.Add(new(donut ? _shapeIn : _shapeOut, caster.Position, spell.Rotation, spell.NPCFinishAt)); _aoes.Add(new(_shapeCone, caster.Position, spell.Rotation, spell.NPCFinishAt)); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { var (dir, donut, order) = ClassifyAction(spell.Action); if (order < 0) return; // irrelevant spell if ((order == 0) != (NumCasts == 0)) - module.ReportError(this, $"Unexpected cast order: spell {order} at num-casts {NumCasts}"); + ReportError($"Unexpected cast order: spell {order} at num-casts {NumCasts}"); if (_aoes.Count != 2) - module.ReportError(this, "No predicted casts"); + ReportError("No predicted casts"); if (NumCasts >= _directionOffsets.Count) - module.ReportError(this, $"Unexpected cast #{NumCasts}"); + ReportError($"Unexpected cast #{NumCasts}"); if (order == 0 && NumCasts == 0 && _directionOffsets.Count > 0 && !spell.Rotation.AlmostEqual(caster.Rotation + _directionOffsets[0], 0.1f)) - module.ReportError(this, $"Mispredicted first rotation: expected {caster.Rotation}+{_directionOffsets[0]}, got {spell.Rotation}"); + ReportError($"Mispredicted first rotation: expected {caster.Rotation}+{_directionOffsets[0]}, got {spell.Rotation}"); // complete part of mechanic if (_hints.Count > 0) @@ -105,7 +105,7 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn // predict next set of aoes if (NumCasts < _directionOffsets.Count) { - var activation = module.WorldState.CurrentTime.AddSeconds(3.1f); + var activation = WorldState.FutureTime(3.1f); var rotation = spell.Rotation + _directionOffsets[NumCasts]; _aoes.Add(new(_ins[NumCasts] ? _shapeIn : _shapeOut, caster.Position, rotation, activation)); _aoes.Add(new(_shapeCone, caster.Position, rotation, activation)); @@ -156,14 +156,14 @@ public Instance(Actor source) private float _jumpOffset; private bool _baitsDirty; - public IaiGiriBait(float jumpOffset, float distance) + public IaiGiriBait(BossModule module, float jumpOffset, float distance) : base(module) { Distance = distance; IgnoreOtherBaits = true; // this really makes things only worse... _jumpOffset = jumpOffset; } - public override void Update(BossModule module) + public override void Update() { foreach (var inst in Instances) if (inst.Target != null) @@ -180,7 +180,7 @@ public override void Update(BossModule module) } } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Giri) { @@ -194,7 +194,7 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st }; if (hint.Length == 0) { - module.ReportError(this, $"Unexpected extra {status.Extra:X}"); + ReportError($"Unexpected extra {status.Extra:X}"); return; } @@ -205,16 +205,16 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st } } - public override void OnTethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnTethered(Actor source, ActorTetherInfo tether) { if (tether.ID is (uint)TetherID.RatAndMouse) { - InstanceFor(source).Target = module.WorldState.Actors.Find(tether.Target); + InstanceFor(source).Target = WorldState.Actors.Find(tether.Target); _baitsDirty = true; } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.FleetingIaiGiri or AID.DoubleIaiGiri) CurrentBaits.Clear(); // TODO: this is a hack, if we ever mark baits as dirty again, they will be recreated - but we need instances for resolve @@ -232,7 +232,7 @@ private Instance InstanceFor(Actor source) } } -class IaiGiriResolve : Components.GenericAOEs +class IaiGiriResolve(BossModule module) : Components.GenericAOEs(module) { public class Instance { @@ -247,14 +247,14 @@ public Instance(Actor source) private List _instances = new(); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { foreach (var i in _instances) if (i.AOEs.Count > 0) yield return i.AOEs.First(); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.NFleetingIaiGiriFront or AID.NFleetingIaiGiriRight or AID.NFleetingIaiGiriLeft or AID.SFleetingIaiGiriFront or AID.SFleetingIaiGiriRight or AID.SFleetingIaiGiriLeft @@ -266,7 +266,7 @@ or AID.NShadowKasumiGiriFrontSecond or AID.NShadowKasumiGiriRightSecond or AID.N var inst = _instances.Find(i => i.Source == caster); if (inst == null) { - module.ReportError(this, $"Did not predict cast for {caster.InstanceID:X}"); + ReportError($"Did not predict cast for {caster.InstanceID:X}"); return; } @@ -285,23 +285,23 @@ or AID.NShadowKasumiGiriFrontSecond or AID.NShadowKasumiGiriRightSecond or AID.N } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { case AID.FleetingIaiGiri: case AID.DoubleIaiGiri: - var comp = module.FindComponent(); + var comp = Module.FindComponent(); var bait = comp?.Instances.Find(i => i.Source == caster); if (bait?.Target == null) { - module.ReportError(this, $"Failed to find bait for {caster.InstanceID:X}"); + ReportError($"Failed to find bait for {caster.InstanceID:X}"); return; } var inst = new Instance(caster); var curRot = bait.Target.Rotation; - var nextActivation = module.WorldState.CurrentTime.AddSeconds(2.7f); + var nextActivation = WorldState.FutureTime(2.7f); foreach (var off in bait.DirOffsets) { curRot += off; @@ -341,22 +341,18 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn } } -class FleetingIaiGiriBait : IaiGiriBait +class FleetingIaiGiriBait(BossModule module) : IaiGiriBait(module, 3, 60) { - public FleetingIaiGiriBait() : base(3, 60) { } - - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (Instances.Count == 1 && Instances[0].Hints.Count == 1) hints.Add($"Safespot: {Instances[0].Hints[0]}"); } } -class DoubleIaiGiriBait : IaiGiriBait +class DoubleIaiGiriBait(BossModule module) : IaiGiriBait(module, 1, 23) { - public DoubleIaiGiriBait() : base(1, 23) { } - - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { var safespots = string.Join(", ", Instances.Where(i => i.Hints.Count == 2).Select(i => i.Hints[1])); if (safespots.Length > 0) diff --git a/BossMod/Modules/Endwalker/Criterion/C02AMR/C023Moko/ScarletAuspice.cs b/BossMod/Modules/Endwalker/Criterion/C02AMR/C023Moko/ScarletAuspice.cs index 1b5bd9deab..1721392576 100644 --- a/BossMod/Modules/Endwalker/Criterion/C02AMR/C023Moko/ScarletAuspice.cs +++ b/BossMod/Modules/Endwalker/Criterion/C02AMR/C023Moko/ScarletAuspice.cs @@ -1,27 +1,18 @@ namespace BossMod.Endwalker.Criterion.C02AMR.C023Moko; -class ScarletAuspice : Components.SelfTargetedAOEs -{ - public ScarletAuspice(AID aid) : base(ActionID.MakeSpell(aid), new AOEShapeCircle(6)) { } -} -class NScarletAuspice : ScarletAuspice { public NScarletAuspice() : base(AID.NScarletAuspice) { } } -class SScarletAuspice : ScarletAuspice { public SScarletAuspice() : base(AID.SScarletAuspice) { } } +class ScarletAuspice(BossModule module, AID aid) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(aid), new AOEShapeCircle(6)); +class NScarletAuspice(BossModule module) : ScarletAuspice(module, AID.NScarletAuspice); +class SScarletAuspice(BossModule module) : ScarletAuspice(module, AID.SScarletAuspice); -class BoundlessScarletFirst : Components.SelfTargetedAOEs -{ - public BoundlessScarletFirst(AID aid) : base(ActionID.MakeSpell(aid), new AOEShapeRect(30, 5, 30)) { } -} -class NBoundlessScarletFirst : BoundlessScarletFirst { public NBoundlessScarletFirst() : base(AID.NBoundlessScarletAOE) { } } -class SBoundlessScarletFirst : BoundlessScarletFirst { public SBoundlessScarletFirst() : base(AID.SBoundlessScarletAOE) { } } +class BoundlessScarletFirst(BossModule module, AID aid) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(aid), new AOEShapeRect(30, 5, 30)); +class NBoundlessScarletFirst(BossModule module) : BoundlessScarletFirst(module, AID.NBoundlessScarletAOE); +class SBoundlessScarletFirst(BossModule module) : BoundlessScarletFirst(module, AID.SBoundlessScarletAOE); -class BoundlessScarletRest : Components.SelfTargetedAOEs -{ - public BoundlessScarletRest(AID aid) : base(ActionID.MakeSpell(aid), new AOEShapeRect(30, 15, 30), 2) { } -} -class NBoundlessScarletRest : BoundlessScarletRest { public NBoundlessScarletRest() : base(AID.NBoundlessScarletExplosion) { } } -class SBoundlessScarletRest : BoundlessScarletRest { public SBoundlessScarletRest() : base(AID.SBoundlessScarletExplosion) { } } +class BoundlessScarletRest(BossModule module, AID aid) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(aid), new AOEShapeRect(30, 15, 30), 2); +class NBoundlessScarletRest(BossModule module) : BoundlessScarletRest(module, AID.NBoundlessScarletExplosion); +class SBoundlessScarletRest(BossModule module) : BoundlessScarletRest(module, AID.SBoundlessScarletExplosion); -class InvocationOfVengeance : Components.UniformStackSpread +class InvocationOfVengeance(BossModule module) : Components.UniformStackSpread(module, 3, 3, alwaysShowSpreads: true) { public int NumMechanics { get; private set; } private List _spreadTargets = new(); @@ -29,9 +20,7 @@ class InvocationOfVengeance : Components.UniformStackSpread private DateTime _spreadResolve; private DateTime _stackResolve; - public InvocationOfVengeance() : base(3, 3, alwaysShowSpreads: true) { } - - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (_spreadResolve == default || _stackResolve == default) return; @@ -39,7 +28,7 @@ public override void AddGlobalHints(BossModule module, GlobalHints hints) hints.Add($"Debuff order: {orderHint}"); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { switch ((SID)status.ID) { @@ -56,7 +45,7 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { diff --git a/BossMod/Modules/Endwalker/Criterion/C02AMR/C023Moko/ShadowTwin.cs b/BossMod/Modules/Endwalker/Criterion/C02AMR/C023Moko/ShadowTwin.cs index b641197a3f..079448885b 100644 --- a/BossMod/Modules/Endwalker/Criterion/C02AMR/C023Moko/ShadowTwin.cs +++ b/BossMod/Modules/Endwalker/Criterion/C02AMR/C023Moko/ShadowTwin.cs @@ -1,19 +1,19 @@ namespace BossMod.Endwalker.Criterion.C02AMR.C023Moko; // TODO: cast start/end? -class Clearout : Components.GenericAOEs +class Clearout(BossModule module) : Components.GenericAOEs(module) { public List AOEs = new(); private static readonly AOEShapeCone _shape = new(27, 90.Degrees()); // TODO: verify range, it's definitely bigger than what table suggests... maybe origin is wrong? - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => AOEs; + public override IEnumerable ActiveAOEs(int slot, Actor actor) => AOEs; - public override void OnActorPlayActionTimelineEvent(BossModule module, Actor actor, ushort id) + public override void OnActorPlayActionTimelineEvent(Actor actor, ushort id) { if (id == 0x1E43 && (OID)actor.OID is OID.NOniClaw or OID.SOniClaw) { - AOEs.Add(new(_shape, actor.Position, actor.Rotation, module.WorldState.CurrentTime.AddSeconds(8.3f))); + AOEs.Add(new(_shape, actor.Position, actor.Rotation, WorldState.FutureTime(8.3f))); } } } @@ -28,37 +28,35 @@ public enum Mechanic { None, Far, Near } private static readonly AOEShapeCircle _shape = new(6); private static readonly WDir[] _safespotDirections = { new(1, 0), new(-1, 0), new(0, 1), new(0, -1) }; - public AccursedEdge() : base(centerAtTarget: true) { } - - public override void Init(BossModule module) + public AccursedEdge(BossModule module) : base(module, centerAtTarget: true) { _clearout = module.FindComponent(); var baits = module.FindComponent(); if (baits != null) foreach (var i in baits.Instances) - ForbiddenPlayers.Set(module.Raid.FindSlot(i.Target?.InstanceID ?? 0)); + ForbiddenPlayers.Set(Raid.FindSlot(i.Target?.InstanceID ?? 0)); } - public override void Update(BossModule module) + public override void Update() { CurrentBaits.Clear(); if (_curMechanic != Mechanic.None) { - var players = module.Raid.WithoutSlot().SortedByRange(module.PrimaryActor.Position).ToList(); + var players = Raid.WithoutSlot().SortedByRange(Module.PrimaryActor.Position).ToList(); foreach (var p in _curMechanic == Mechanic.Far ? players.TakeLast(2) : players.Take(2)) - CurrentBaits.Add(new(module.PrimaryActor, p, _shape)); + CurrentBaits.Add(new(Module.PrimaryActor, p, _shape)); } } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (_curMechanic != Mechanic.None) hints.Add($"Untethered bait: {_curMechanic}"); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - base.DrawArenaForeground(module, pcSlot, pc, arena); + base.DrawArenaForeground(pcSlot, pc); // draw safespots (TODO: consider assigning specific side) if (_curMechanic != Mechanic.None && _clearout != null) @@ -69,14 +67,14 @@ public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc var baitDistance = stayClose ? 12 : 19; foreach (var dir in _safespotDirections) { - var potentialSafespot = module.Bounds.Center + baitDistance * dir; + var potentialSafespot = Module.Bounds.Center + baitDistance * dir; if (!_clearout.AOEs.Any(aoe => aoe.Check(potentialSafespot))) - arena.AddCircle(potentialSafespot, 1, ArenaColor.Safe); + Arena.AddCircle(potentialSafespot, 1, ArenaColor.Safe); } } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { var mechanic = (AID)spell.Action.ID switch { @@ -88,7 +86,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf _curMechanic = mechanic; } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.NAccursedEdge or AID.SAccursedEdge) { diff --git a/BossMod/Modules/Endwalker/Criterion/C02AMR/C023Moko/SoldiersOfDeath.cs b/BossMod/Modules/Endwalker/Criterion/C02AMR/C023Moko/SoldiersOfDeath.cs index 622027ff57..628e424850 100644 --- a/BossMod/Modules/Endwalker/Criterion/C02AMR/C023Moko/SoldiersOfDeath.cs +++ b/BossMod/Modules/Endwalker/Criterion/C02AMR/C023Moko/SoldiersOfDeath.cs @@ -9,16 +9,16 @@ class IronRainStorm : Components.GenericAOEs private static readonly AOEShapeCircle _shapeStorm = new(20); private static readonly WDir[] _safespotDirections = { new(1, 0), new(-1, 0), new(0, 1), new(0, -1) }; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => AOEs; - - public override void Init(BossModule module) + public IronRainStorm(BossModule module) : base(module) { _bait = module.FindComponent(); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override IEnumerable ActiveAOEs(int slot, Actor actor) => AOEs; + + public override void DrawArenaForeground(int pcSlot, Actor pc) { - base.DrawArenaForeground(module, pcSlot, pc, arena); + base.DrawArenaForeground(pcSlot, pc); // draw safespots (TODO: consider assigning specific side) var bait = _bait?.Instances.Find(i => i.Target == pc); @@ -27,16 +27,16 @@ public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc var offset = bait.DirOffsets[1].Rad > 0 ? 5 : -5; foreach (var dir in _safespotDirections) { - var safespot = module.Bounds.Center + 19 * dir; + var safespot = Module.Bounds.Center + 19 * dir; if (!AOEs.Any(aoe => aoe.Check(safespot))) { - arena.AddCircle(safespot + offset * dir.OrthoR(), 1, ArenaColor.Safe); + Arena.AddCircle(safespot + offset * dir.OrthoR(), 1, ArenaColor.Safe); } } } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { AOEShapeCircle? shape = (AID)spell.Action.ID switch { @@ -48,7 +48,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf AOEs.Add(new(shape, spell.LocXZ, default, spell.NPCFinishAt)); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { @@ -58,7 +58,7 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn case AID.SIronStormFirst: ++NumCasts; foreach (ref var aoe in AOEs.AsSpan()) - aoe.Activation = module.WorldState.CurrentTime.AddSeconds(6.2f); // second aoe will happen at same location + aoe.Activation = WorldState.FutureTime(6.2f); // second aoe will happen at same location break; case AID.NIronRainSecond: case AID.SIronRainSecond: diff --git a/BossMod/Modules/Endwalker/Criterion/C03AAI/C030Trash/C030Islekeeper.cs b/BossMod/Modules/Endwalker/Criterion/C03AAI/C030Trash/C030Islekeeper.cs index a13668d1b4..044be3d75a 100644 --- a/BossMod/Modules/Endwalker/Criterion/C03AAI/C030Trash/C030Islekeeper.cs +++ b/BossMod/Modules/Endwalker/Criterion/C03AAI/C030Trash/C030Islekeeper.cs @@ -1,18 +1,12 @@ namespace BossMod.Endwalker.Criterion.C03AAI.C030Trash2; -class GravityForce : Components.StackWithCastTargets -{ - public GravityForce(AID aid) : base(ActionID.MakeSpell(aid), 6, 4) { } -} -class NGravityForce : GravityForce { public NGravityForce() : base(AID.NGravityForce) { } } -class SGravityForce : GravityForce { public SGravityForce() : base(AID.SGravityForce) { } } +class GravityForce(BossModule module, AID aid) : Components.StackWithCastTargets(module, ActionID.MakeSpell(aid), 6, 4); +class NGravityForce(BossModule module) : GravityForce(module, AID.NGravityForce); +class SGravityForce(BossModule module) : GravityForce(module, AID.SGravityForce); -class IsleDrop : Components.LocationTargetedAOEs -{ - public IsleDrop(AID aid) : base(ActionID.MakeSpell(aid), 6) { } -} -class NIsleDrop : IsleDrop { public NIsleDrop() : base(AID.NIsleDrop) { } } -class SIsleDrop : IsleDrop { public SIsleDrop() : base(AID.SIsleDrop) { } } +class IsleDrop(BossModule module, AID aid) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(aid), 6); +class NIsleDrop(BossModule module) : IsleDrop(module, AID.NIsleDrop); +class SIsleDrop(BossModule module) : IsleDrop(module, AID.SIsleDrop); class C030IslekeeperStates : StateMachineBuilder { @@ -55,17 +49,11 @@ private void IsleDrop(uint id, float delay) .DeactivateOnExit(); } } -class C030NIslekeeperStates : C030IslekeeperStates { public C030NIslekeeperStates(BossModule module) : base(module, false) { } } -class C030SIslekeeperStates : C030IslekeeperStates { public C030SIslekeeperStates(BossModule module) : base(module, true) { } } +class C030NIslekeeperStates(BossModule module) : C030IslekeeperStates(module, false); +class C030SIslekeeperStates(BossModule module) : C030IslekeeperStates(module, true); [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.NIslekeeper, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 979, NameID = 12561, SortOrder = 7)] -public class C030NIslekeeper : C030Trash2 -{ - public C030NIslekeeper(WorldState ws, Actor primary) : base(ws, primary) { } -} +public class C030NIslekeeper(WorldState ws, Actor primary) : C030Trash2(ws, primary); [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.SIslekeeper, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 980, NameID = 12561, SortOrder = 7)] -public class C030SIslekeeper : C030Trash2 -{ - public C030SIslekeeper(WorldState ws, Actor primary) : base(ws, primary) { } -} +public class C030SIslekeeper(WorldState ws, Actor primary) : C030Trash2(ws, primary); diff --git a/BossMod/Modules/Endwalker/Criterion/C03AAI/C030Trash/C030Kiwakin.cs b/BossMod/Modules/Endwalker/Criterion/C03AAI/C030Trash/C030Kiwakin.cs index 21f1e1d72f..e891ba1d0b 100644 --- a/BossMod/Modules/Endwalker/Criterion/C03AAI/C030Trash/C030Kiwakin.cs +++ b/BossMod/Modules/Endwalker/Criterion/C03AAI/C030Trash/C030Kiwakin.cs @@ -1,22 +1,17 @@ namespace BossMod.Endwalker.Criterion.C03AAI.C030Trash1; -class LeadHook : Components.CastCounter +class LeadHook(BossModule module) : Components.CastCounter(module, default) { - public LeadHook() : base(default) { } - - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.NLeadHook or AID.NLeadHookAOE1 or AID.NLeadHookAOE2 or AID.SLeadHook or AID.SLeadHookAOE1 or AID.SLeadHookAOE2) ++NumCasts; } } -class TailScrew : Components.LocationTargetedAOEs -{ - public TailScrew(AID aid) : base(ActionID.MakeSpell(aid), 4) { } -} -class NTailScrew : TailScrew { public NTailScrew() : base(AID.NTailScrew) { } } -class STailScrew : TailScrew { public STailScrew() : base(AID.STailScrew) { } } +class TailScrew(BossModule module, AID aid) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(aid), 4); +class NTailScrew(BossModule module) : TailScrew(module, AID.NTailScrew); +class STailScrew(BossModule module) : TailScrew(module, AID.STailScrew); class C030KiwakinStates : StateMachineBuilder { @@ -67,17 +62,11 @@ private void TailScrew(uint id, float delay) Cast(id, _savage ? AID.STailScrew : AID.NTailScrew, delay, 5, "AOE"); } } -class C030NKiwakinStates : C030KiwakinStates { public C030NKiwakinStates(BossModule module) : base(module, false) { } } -class C030SKiwakinStates : C030KiwakinStates { public C030SKiwakinStates(BossModule module) : base(module, true) { } } +class C030NKiwakinStates(BossModule module) : C030KiwakinStates(module, false); +class C030SKiwakinStates(BossModule module) : C030KiwakinStates(module, true); [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.NKiwakin, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 979, NameID = 12632, SortOrder = 1)] -public class C030NKiwakin : C030Trash1 -{ - public C030NKiwakin(WorldState ws, Actor primary) : base(ws, primary) { } -} +public class C030NKiwakin(WorldState ws, Actor primary) : C030Trash1(ws, primary); [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.SKiwakin, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 980, NameID = 12632, SortOrder = 1)] -public class C030SKiwakin : C030Trash1 -{ - public C030SKiwakin(WorldState ws, Actor primary) : base(ws, primary) { } -} +public class C030SKiwakin(WorldState ws, Actor primary) : C030Trash1(ws, primary); diff --git a/BossMod/Modules/Endwalker/Criterion/C03AAI/C030Trash/C030Monk.cs b/BossMod/Modules/Endwalker/Criterion/C03AAI/C030Trash/C030Monk.cs index 1a8271643f..649c2bfac8 100644 --- a/BossMod/Modules/Endwalker/Criterion/C03AAI/C030Trash/C030Monk.cs +++ b/BossMod/Modules/Endwalker/Criterion/C03AAI/C030Trash/C030Monk.cs @@ -1,22 +1,22 @@ namespace BossMod.Endwalker.Criterion.C03AAI.C030Trash1; -class Hydroshot : Components.Knockback +class Hydroshot(BossModule module) : Components.Knockback(module) { private Actor? _caster; - public override IEnumerable Sources(BossModule module, int slot, Actor actor) + public override IEnumerable Sources(int slot, Actor actor) { if (_caster?.CastInfo?.TargetID == actor.InstanceID) yield return new(_caster.Position, 10, _caster.CastInfo?.NPCFinishAt ?? default); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.NHydroshot or AID.SHydroshot) _caster = caster; } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if (_caster == caster) _caster = null; @@ -55,17 +55,11 @@ private void CrossAttack(uint id, float delay) .SetHint(StateMachine.StateHint.Tankbuster); } } -class C030NMonkStates : C030MonkStates { public C030NMonkStates(BossModule module) : base(module, false) { } } -class C030SMonkStates : C030MonkStates { public C030SMonkStates(BossModule module) : base(module, true) { } } +class C030NMonkStates(BossModule module) : C030MonkStates(module, false); +class C030SMonkStates(BossModule module) : C030MonkStates(module, true); [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.NMonk, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 979, NameID = 12631, SortOrder = 4)] -public class C030NMonk : C030Trash1 -{ - public C030NMonk(WorldState ws, Actor primary) : base(ws, primary) { } -} +public class C030NMonk(WorldState ws, Actor primary) : C030Trash1(ws, primary); [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.SMonk, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 980, NameID = 12631, SortOrder = 4)] -public class C030SMonk : C030Trash1 -{ - public C030SMonk(WorldState ws, Actor primary) : base(ws, primary) { } -} +public class C030SMonk(WorldState ws, Actor primary) : C030Trash1(ws, primary); diff --git a/BossMod/Modules/Endwalker/Criterion/C03AAI/C030Trash/C030Ray.cs b/BossMod/Modules/Endwalker/Criterion/C03AAI/C030Trash/C030Ray.cs index 47f9d1d80e..ddfeef277e 100644 --- a/BossMod/Modules/Endwalker/Criterion/C03AAI/C030Trash/C030Ray.cs +++ b/BossMod/Modules/Endwalker/Criterion/C03AAI/C030Trash/C030Ray.cs @@ -1,25 +1,18 @@ -namespace BossMod.Endwalker.Criterion.C03AAI.C030Trash1; +using BossMod; -class Hydrocannon : Components.SelfTargetedAOEs -{ - public Hydrocannon(AID aid) : base(ActionID.MakeSpell(aid), new AOEShapeRect(15, 3)) { } -} -class NHydrocannon : Hydrocannon { public NHydrocannon() : base(AID.NHydrocannon) { } } -class SHydrocannon : Hydrocannon { public SHydrocannon() : base(AID.SHydrocannon) { } } +namespace BossMod.Endwalker.Criterion.C03AAI.C030Trash1; -class Expulsion : Components.SelfTargetedAOEs -{ - public Expulsion(AID aid) : base(ActionID.MakeSpell(aid), new AOEShapeCircle(8)) { } -} -class NExpulsion : Expulsion { public NExpulsion() : base(AID.NExpulsion) { } } -class SExpulsion : Expulsion { public SExpulsion() : base(AID.SExpulsion) { } } +class Hydrocannon(BossModule module, AID aid) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(aid), new AOEShapeRect(15, 3)); +class NHydrocannon(BossModule module) : Hydrocannon(module, AID.NHydrocannon); +class SHydrocannon(BossModule module) : Hydrocannon(module, AID.SHydrocannon); -class ElectricWhorl : Components.SelfTargetedAOEs -{ - public ElectricWhorl(AID aid) : base(ActionID.MakeSpell(aid), new AOEShapeDonut(8, 60)) { } -} -class NElectricWhorl : ElectricWhorl { public NElectricWhorl() : base(AID.NElectricWhorl) { } } -class SElectricWhorl : ElectricWhorl { public SElectricWhorl() : base(AID.SElectricWhorl) { } } +class Expulsion(BossModule module, AID aid) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(aid), new AOEShapeCircle(8)); +class NExpulsion(BossModule module) : Expulsion(module, AID.NExpulsion); +class SExpulsion(BossModule module) : Expulsion(module, AID.SExpulsion); + +class ElectricWhorl(BossModule module, AID aid) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(aid), new AOEShapeDonut(8, 60)); +class NElectricWhorl(BossModule module) : ElectricWhorl(module, AID.NElectricWhorl); +class SElectricWhorl(BossModule module) : ElectricWhorl(module, AID.SElectricWhorl); class C030RayStates : StateMachineBuilder { @@ -56,14 +49,12 @@ private void ExpulsionElectricWhorl(uint id, float delay) Cast(id + 0x10, _savage ? AID.SExpulsion : AID.NExpulsion, 2.1f, 5, "In"); } } -class C030NRayStates : C030RayStates { public C030NRayStates(BossModule module) : base(module, false) { } } -class C030SRayStates : C030RayStates { public C030SRayStates(BossModule module) : base(module, true) { } } +class C030NRayStates(BossModule module) : C030RayStates(module, false); +class C030SRayStates(BossModule module) : C030RayStates(module, true); [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.NRay, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 979, NameID = 12541, SortOrder = 3)] -public class C030NRay : C030Trash1 +public class C030NRay(WorldState ws, Actor primary) : C030Trash1(ws, primary) { - public C030NRay(WorldState ws, Actor primary) : base(ws, primary) { } - protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); @@ -72,10 +63,8 @@ protected override void DrawEnemies(int pcSlot, Actor pc) } [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.SRay, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 980, NameID = 12541, SortOrder = 3)] -public class C030SRay : C030Trash1 +public class C030SRay(WorldState ws, Actor primary) : C030Trash1(ws, primary) { - public C030SRay(WorldState ws, Actor primary) : base(ws, primary) { } - protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); diff --git a/BossMod/Modules/Endwalker/Criterion/C03AAI/C030Trash/C030Snipper.cs b/BossMod/Modules/Endwalker/Criterion/C03AAI/C030Trash/C030Snipper.cs index 9fa7b88b21..1d2cc6c973 100644 --- a/BossMod/Modules/Endwalker/Criterion/C03AAI/C030Trash/C030Snipper.cs +++ b/BossMod/Modules/Endwalker/Criterion/C03AAI/C030Trash/C030Snipper.cs @@ -1,22 +1,21 @@ -namespace BossMod.Endwalker.Criterion.C03AAI.C030Trash1; +using BossMod; -class Water : Components.StackWithCastTargets -{ - public Water(AID aid) : base(ActionID.MakeSpell(aid), 8, 4) { } -} -class NWater : Water { public NWater() : base(AID.NWater) { } } -class SWater : Water { public SWater() : base(AID.SWater) { } } +namespace BossMod.Endwalker.Criterion.C03AAI.C030Trash1; + +class Water(BossModule module, AID aid) : Components.StackWithCastTargets(module, ActionID.MakeSpell(aid), 8, 4); +class NWater(BossModule module) : Water(module, AID.NWater); +class SWater(BossModule module) : Water(module, AID.SWater); -class BubbleShowerCrabDribble : Components.GenericAOEs +class BubbleShowerCrabDribble(BossModule module) : Components.GenericAOEs(module) { private List _aoes = new(); private static readonly AOEShapeCone _shape1 = new(9, 45.Degrees()); private static readonly AOEShapeCone _shape2 = new(6, 60.Degrees()); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => _aoes.Take(1); + public override IEnumerable ActiveAOEs(int slot, Actor actor) => _aoes.Take(1); - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.NBubbleShower or AID.SBubbleShower) { @@ -26,7 +25,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.NBubbleShower or AID.SBubbleShower or AID.NCrabDribble or AID.SCrabDribble && _aoes.Count > 0) { @@ -71,14 +70,12 @@ private void BubbleShowerCrabDribble(uint id, float delay) Cast(id + 0x10, _savage ? AID.SCrabDribble : AID.NCrabDribble, 2.1f, 1.5f, "Cleave back"); } } -class C030NSnipperStates : C030SnipperStates { public C030NSnipperStates(BossModule module) : base(module, false) { } } -class C030SSnipperStates : C030SnipperStates { public C030SSnipperStates(BossModule module) : base(module, true) { } } +class C030NSnipperStates(BossModule module) : C030SnipperStates(module, false); +class C030SSnipperStates(BossModule module) : C030SnipperStates(module, true); [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.NSnipper, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 979, NameID = 12537, SortOrder = 2)] -public class C030NSnipper : C030Trash1 +public class C030NSnipper(WorldState ws, Actor primary) : C030Trash1(ws, primary) { - public C030NSnipper(WorldState ws, Actor primary) : base(ws, primary) { } - protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); @@ -87,10 +84,8 @@ protected override void DrawEnemies(int pcSlot, Actor pc) } [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.SSnipper, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 980, NameID = 12537, SortOrder = 2)] -public class C030SSnipper : C030Trash1 +public class C030SSnipper(WorldState ws, Actor primary) : C030Trash1(ws, primary) { - public C030SSnipper(WorldState ws, Actor primary) : base(ws, primary) { } - protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); diff --git a/BossMod/Modules/Endwalker/Criterion/C03AAI/C030Trash/C030Trash1.cs b/BossMod/Modules/Endwalker/Criterion/C03AAI/C030Trash/C030Trash1.cs index 82a7ba5ff2..a0e7f3c7b6 100644 --- a/BossMod/Modules/Endwalker/Criterion/C03AAI/C030Trash/C030Trash1.cs +++ b/BossMod/Modules/Endwalker/Criterion/C03AAI/C030Trash/C030Trash1.cs @@ -58,20 +58,15 @@ public enum AID : uint SCrossAttack = 35919, // SMonk->player, 5.0s cast, single-target tankbuster } -class Twister : Components.Adds +class Twister(BossModule module) : Components.Adds(module, (uint)OID.Twister) { - public Twister() : base((uint)OID.Twister) { } + public override void DrawArenaForeground(int pcSlot, Actor pc) { } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) { } - - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { foreach (var twister in Actors) - arena.ZoneCircle(twister.Position, 6, ArenaColor.AOE); + Arena.ZoneCircle(twister.Position, 6, ArenaColor.AOE); } } -public abstract class C030Trash1 : BossModule -{ - public C030Trash1(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsRect(new(0, 100), 20, 30)) { } -} +public abstract class C030Trash1(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsRect(new(0, 100), 20, 30)); diff --git a/BossMod/Modules/Endwalker/Criterion/C03AAI/C030Trash/C030Trash2.cs b/BossMod/Modules/Endwalker/Criterion/C03AAI/C030Trash/C030Trash2.cs index 97ced16646..4ba554acc5 100644 --- a/BossMod/Modules/Endwalker/Criterion/C03AAI/C030Trash/C030Trash2.cs +++ b/BossMod/Modules/Endwalker/Criterion/C03AAI/C030Trash/C030Trash2.cs @@ -30,7 +30,4 @@ public enum AID : uint SAncientQuagaEnrage = 35914, // SIslekeeper->self, 10.0s cast, range 100 circle enrage } -public abstract class C030Trash2 : BossModule -{ - public C030Trash2(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsSquare(new(200, 128), 30)) { } -} +public abstract class C030Trash2(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsSquare(new(200, 128), 30)); diff --git a/BossMod/Modules/Endwalker/Criterion/C03AAI/C030Trash/C030WoodGolem.cs b/BossMod/Modules/Endwalker/Criterion/C03AAI/C030Trash/C030WoodGolem.cs index af9564b250..f05aad53e0 100644 --- a/BossMod/Modules/Endwalker/Criterion/C03AAI/C030Trash/C030WoodGolem.cs +++ b/BossMod/Modules/Endwalker/Criterion/C03AAI/C030Trash/C030WoodGolem.cs @@ -1,18 +1,12 @@ namespace BossMod.Endwalker.Criterion.C03AAI.C030Trash2; -class Tornado : Components.SpreadFromCastTargets -{ - public Tornado(AID aid) : base(ActionID.MakeSpell(aid), 4) { } -} -class NTornado : Tornado { public NTornado() : base(AID.NTornado) { } } -class STornado : Tornado { public STornado() : base(AID.STornado) { } } +class Tornado(BossModule module, AID aid) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(aid), 4); +class NTornado(BossModule module) : Tornado(module, AID.NTornado); +class STornado(BossModule module) : Tornado(module, AID.STornado); -class Ovation : Components.SelfTargetedAOEs -{ - public Ovation(AID aid) : base(ActionID.MakeSpell(aid), new AOEShapeRect(12, 2)) { } -} -class NOvation : Ovation { public NOvation() : base(AID.NOvation) { } } -class SOvation : Ovation { public SOvation() : base(AID.SOvation) { } } +class Ovation(BossModule module, AID aid) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(aid), new AOEShapeRect(12, 2)); +class NOvation(BossModule module) : Ovation(module, AID.NOvation); +class SOvation(BossModule module) : Ovation(module, AID.SOvation); class C030WoodGolemStates : StateMachineBuilder { @@ -57,17 +51,11 @@ private void Ovation(uint id, float delay) .DeactivateOnExit(); } } -class C030NWoodGolemStates : C030WoodGolemStates { public C030NWoodGolemStates(BossModule module) : base(module, false) { } } -class C030SWoodGolemStates : C030WoodGolemStates { public C030SWoodGolemStates(BossModule module) : base(module, true) { } } +class C030NWoodGolemStates(BossModule module) : C030WoodGolemStates(module, false); +class C030SWoodGolemStates(BossModule module) : C030WoodGolemStates(module, true); [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.NWoodGolem, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 979, NameID = 12560, SortOrder = 6)] -public class C030NWoodGolem : C030Trash2 -{ - public C030NWoodGolem(WorldState ws, Actor primary) : base(ws, primary) { } -} +public class C030NWoodGolem(WorldState ws, Actor primary) : C030Trash2(ws, primary); [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.SWoodGolem, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 980, NameID = 12560, SortOrder = 6)] -public class C030SWoodGolem : C030Trash2 -{ - public C030SWoodGolem(WorldState ws, Actor primary) : base(ws, primary) { } -} +public class C030SWoodGolem(WorldState ws, Actor primary) : C030Trash2(ws, primary); diff --git a/BossMod/Modules/Endwalker/Criterion/C03AAI/C031Ketuduke/AngrySeas.cs b/BossMod/Modules/Endwalker/Criterion/C03AAI/C031Ketuduke/AngrySeas.cs index 98879cf0df..d73ea5576d 100644 --- a/BossMod/Modules/Endwalker/Criterion/C03AAI/C031Ketuduke/AngrySeas.cs +++ b/BossMod/Modules/Endwalker/Criterion/C03AAI/C031Ketuduke/AngrySeas.cs @@ -1,14 +1,14 @@ namespace BossMod.Endwalker.Criterion.C03AAI.C031Ketuduke; -class AngrySeasAOE : Components.GenericAOEs +class AngrySeasAOE(BossModule module) : Components.GenericAOEs(module) { - private List _aoes = new(); + private List _aoes = []; private static readonly AOEShapeRect _shape = new(20, 5, 20); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => _aoes; + public override IEnumerable ActiveAOEs(int slot, Actor actor) => _aoes; - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.NAngrySeasAOE or AID.SAngrySeasAOE) _aoes.Add(new(_shape, caster.Position, spell.Rotation, spell.NPCFinishAt)); @@ -16,25 +16,25 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } // TODO: generalize -class AngrySeasKnockback : Components.Knockback +class AngrySeasKnockback(BossModule module) : Components.Knockback(module) { - private List _sources = new(); + private List _sources = []; private static readonly AOEShapeCone _shape = new(30, 90.Degrees()); - public override IEnumerable Sources(BossModule module, int slot, Actor actor) => _sources; + public override IEnumerable Sources(int slot, Actor actor) => _sources; - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.NAngrySeasAOE or AID.SAngrySeasAOE) { _sources.Clear(); // charge always happens through center, so create two sources with origin at center looking orthogonally - _sources.Add(new(module.Bounds.Center, 12, spell.NPCFinishAt, _shape, spell.Rotation + 90.Degrees(), Kind.DirForward)); - _sources.Add(new(module.Bounds.Center, 12, spell.NPCFinishAt, _shape, spell.Rotation - 90.Degrees(), Kind.DirForward)); + _sources.Add(new(Module.Bounds.Center, 12, spell.NPCFinishAt, _shape, spell.Rotation + 90.Degrees(), Kind.DirForward)); + _sources.Add(new(Module.Bounds.Center, 12, spell.NPCFinishAt, _shape, spell.Rotation - 90.Degrees(), Kind.DirForward)); } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.NAngrySeasAOE or AID.SAngrySeasAOE) { diff --git a/BossMod/Modules/Endwalker/Criterion/C03AAI/C031Ketuduke/BlowingBubbles.cs b/BossMod/Modules/Endwalker/Criterion/C03AAI/C031Ketuduke/BlowingBubbles.cs index eb209f7216..e2696c5abe 100644 --- a/BossMod/Modules/Endwalker/Criterion/C03AAI/C031Ketuduke/BlowingBubbles.cs +++ b/BossMod/Modules/Endwalker/Criterion/C03AAI/C031Ketuduke/BlowingBubbles.cs @@ -1,20 +1,20 @@ namespace BossMod.Endwalker.Criterion.C03AAI.C031Ketuduke; -class BlowingBubbles : BossComponent +class BlowingBubbles(BossModule module) : BossComponent(module) { private List _actors = new(); private static readonly AOEShapeCircle _shape = new(5); - public override void OnActorCreated(BossModule module, Actor actor) + public override void OnActorCreated(Actor actor) { if ((OID)actor.OID is OID.NAiryBubbleExaflare or OID.SAiryBubbleExaflare) _actors.Add(actor); } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { foreach (var a in _actors) - _shape.Draw(arena, a); + _shape.Draw(Arena, a); } } diff --git a/BossMod/Modules/Endwalker/Criterion/C03AAI/C031Ketuduke/C031Ketuduke.cs b/BossMod/Modules/Endwalker/Criterion/C03AAI/C031Ketuduke/C031Ketuduke.cs index 1a6b656571..19ba612677 100644 --- a/BossMod/Modules/Endwalker/Criterion/C03AAI/C031Ketuduke/C031Ketuduke.cs +++ b/BossMod/Modules/Endwalker/Criterion/C03AAI/C031Ketuduke/C031Ketuduke.cs @@ -1,35 +1,23 @@ namespace BossMod.Endwalker.Criterion.C03AAI.C031Ketuduke; -class TidalRoar : Components.CastCounter -{ - public TidalRoar(AID aid) : base(ActionID.MakeSpell(aid)) { } -} -class NTidalRoar : TidalRoar { public NTidalRoar() : base(AID.NTidalRoarAOE) { } } -class STidalRoar : TidalRoar { public STidalRoar() : base(AID.STidalRoarAOE) { } } +class TidalRoar(BossModule module, AID aid) : Components.CastCounter(module, ActionID.MakeSpell(aid)); +class NTidalRoar(BossModule module) : TidalRoar(module, AID.NTidalRoarAOE); +class STidalRoar(BossModule module) : TidalRoar(module, AID.STidalRoarAOE); -class BubbleNet : Components.CastCounter -{ - public BubbleNet(AID aid) : base(ActionID.MakeSpell(aid)) { } -} -class NBubbleNet1 : BubbleNet { public NBubbleNet1() : base(AID.NBubbleNet1AOE) { } } -class SBubbleNet1 : BubbleNet { public SBubbleNet1() : base(AID.SBubbleNet1AOE) { } } -class NBubbleNet2 : BubbleNet { public NBubbleNet2() : base(AID.NBubbleNet2AOE) { } } -class SBubbleNet2 : BubbleNet { public SBubbleNet2() : base(AID.SBubbleNet2AOE) { } } +class BubbleNet(BossModule module, AID aid) : Components.CastCounter(module, ActionID.MakeSpell(aid)); +class NBubbleNet1(BossModule module) : BubbleNet(module, AID.NBubbleNet1AOE); +class SBubbleNet1(BossModule module) : BubbleNet(module, AID.SBubbleNet1AOE); +class NBubbleNet2(BossModule module) : BubbleNet(module, AID.NBubbleNet2AOE); +class SBubbleNet2(BossModule module) : BubbleNet(module, AID.SBubbleNet2AOE); -class Hydrobomb : Components.LocationTargetedAOEs -{ - public Hydrobomb(AID aid) : base(ActionID.MakeSpell(aid), 5) { } -} -class NHydrobomb : Hydrobomb { public NHydrobomb() : base(AID.NHydrobombAOE) { } } -class SHydrobomb : Hydrobomb { public SHydrobomb() : base(AID.SHydrobombAOE) { } } +class Hydrobomb(BossModule module, AID aid) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(aid), 5); +class NHydrobomb(BossModule module) : Hydrobomb(module, AID.NHydrobombAOE); +class SHydrobomb(BossModule module) : Hydrobomb(module, AID.SHydrobombAOE); -public abstract class C031Ketuduke : BossModule -{ - public C031Ketuduke(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsSquare(new(0, 0), 20)) { } -} +public abstract class C031Ketuduke(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsSquare(new(0, 0), 20)); [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.NBoss, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 979, NameID = 12605, SortOrder = 5)] -public class C031NKetuduke : C031Ketuduke { public C031NKetuduke(WorldState ws, Actor primary) : base(ws, primary) { } } +public class C031NKetuduke(WorldState ws, Actor primary) : C031Ketuduke(ws, primary); [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.SBoss, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 980, NameID = 12605, SortOrder = 5)] -public class C031SKetuduke : C031Ketuduke { public C031SKetuduke(WorldState ws, Actor primary) : base(ws, primary) { } } +public class C031SKetuduke(WorldState ws, Actor primary) : C031Ketuduke(ws, primary); diff --git a/BossMod/Modules/Endwalker/Criterion/C03AAI/C031Ketuduke/C031KetudukeStates.cs b/BossMod/Modules/Endwalker/Criterion/C03AAI/C031Ketuduke/C031KetudukeStates.cs index 2ed3ff5b24..8982c6eefe 100644 --- a/BossMod/Modules/Endwalker/Criterion/C03AAI/C031Ketuduke/C031KetudukeStates.cs +++ b/BossMod/Modules/Endwalker/Criterion/C03AAI/C031Ketuduke/C031KetudukeStates.cs @@ -166,5 +166,5 @@ private void AngrySeas(uint id, float delay) .DeactivateOnExit(); } } -class C031NKetudukeStates : C031KetudukeStates { public C031NKetudukeStates(BossModule module) : base(module, false) { } } -class C031SKetudukeStates : C031KetudukeStates { public C031SKetudukeStates(BossModule module) : base(module, true) { } } +class C031NKetudukeStates(BossModule module) : C031KetudukeStates(module, false); +class C031SKetudukeStates(BossModule module) : C031KetudukeStates(module, true); diff --git a/BossMod/Modules/Endwalker/Criterion/C03AAI/C031Ketuduke/FlukeGale.cs b/BossMod/Modules/Endwalker/Criterion/C03AAI/C031Ketuduke/FlukeGale.cs index 7321fe3416..5edebfa5ca 100644 --- a/BossMod/Modules/Endwalker/Criterion/C03AAI/C031Ketuduke/FlukeGale.cs +++ b/BossMod/Modules/Endwalker/Criterion/C03AAI/C031Ketuduke/FlukeGale.cs @@ -13,33 +13,33 @@ public enum Resolve { None, Stack, Spread } private static readonly AOEShapeRect _shape = new(20, 10); private static readonly AOEShapeRect _safeZone = new(5, 5, 5); - public override IEnumerable Sources(BossModule module, int slot, Actor actor) => _debuffs[slot] != Debuff.FoamyFetters ? Gales : Enumerable.Empty(); - - public override void Init(BossModule module) + public FlukeGale(BossModule module) : base(module) { _crystals = module.FindComponent(); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override IEnumerable Sources(int slot, Actor actor) => _debuffs[slot] != Debuff.FoamyFetters ? Gales : Enumerable.Empty(); + + public override void AddHints(int slot, Actor actor, TextHints hints) { - base.AddHints(module, slot, actor, hints, movementHints); + base.AddHints(slot, actor, hints); if (_debuffs[slot] != Debuff.None) hints.Add($"Debuff: {(_debuffs[slot] == Debuff.BubbleWeave ? "bubble" : "bind")}", false); if (_resolution != Resolve.None && _debuffs[slot] != Debuff.None && Gales.Count == 4 && _crystals != null) { - var finalPos = CalculateMovements(module, slot, actor).LastOrDefault((actor.Position, actor.Position)).Item2; + var finalPos = CalculateMovements(slot, actor).LastOrDefault((actor.Position, actor.Position)).Item2; if (!SafeZones(slot).Any(c => _safeZone.Check(finalPos, c, default))) hints.Add("Aim towards safe zone!"); } } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { foreach (var c in SafeZones(pcSlot)) - _safeZone.Draw(arena, c, default, ArenaColor.SafeFromAOE); + _safeZone.Draw(Arena, c, default, ArenaColor.SafeFromAOE); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { var debuff = (SID)status.ID switch { @@ -47,11 +47,11 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st SID.FoamyFetters => Debuff.FoamyFetters, _ => Debuff.None }; - if (debuff != Debuff.None && module.Raid.FindSlot(actor.InstanceID) is var slot && slot >= 0) + if (debuff != Debuff.None && Raid.FindSlot(actor.InstanceID) is var slot && slot >= 0) _debuffs[slot] = debuff; } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { @@ -69,7 +69,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.FlukeGaleAOE1 or AID.FlukeGaleAOE2) { diff --git a/BossMod/Modules/Endwalker/Criterion/C03AAI/C031Ketuduke/FlukeTyphoon.cs b/BossMod/Modules/Endwalker/Criterion/C03AAI/C031Ketuduke/FlukeTyphoon.cs index e2079c899a..1888054a17 100644 --- a/BossMod/Modules/Endwalker/Criterion/C03AAI/C031Ketuduke/FlukeTyphoon.cs +++ b/BossMod/Modules/Endwalker/Criterion/C03AAI/C031Ketuduke/FlukeTyphoon.cs @@ -1,13 +1,10 @@ namespace BossMod.Endwalker.Criterion.C03AAI.C031Ketuduke; -class FlukeTyphoon : Components.CastCounter -{ - public FlukeTyphoon() : base(ActionID.MakeSpell(AID.FlukeTyphoonAOE)) { } -} +class FlukeTyphoon(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.FlukeTyphoonAOE)); -class FlukeTyphoonBurst : Components.GenericTowers +class FlukeTyphoonBurst(BossModule module) : Components.GenericTowers(module) { - public override void OnEventEnvControl(BossModule module, byte index, uint state) + public override void OnEventEnvControl(byte index, uint state) { if (state == 0x00020001) { @@ -22,11 +19,11 @@ public override void OnEventEnvControl(BossModule module, byte index, uint state _ => default }; if (offset != default) - Towers.Add(new(module.Bounds.Center + offset, 4)); + Towers.Add(new(Module.Bounds.Center + offset, 4)); } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.NBurst or AID.SBurst or AID.NBigBurst or AID.SBigBurst) { diff --git a/BossMod/Modules/Endwalker/Criterion/C03AAI/C031Ketuduke/HydrofallHydrobullet.cs b/BossMod/Modules/Endwalker/Criterion/C03AAI/C031Ketuduke/HydrofallHydrobullet.cs index afd4a173ef..ce3ae8bd9c 100644 --- a/BossMod/Modules/Endwalker/Criterion/C03AAI/C031Ketuduke/HydrofallHydrobullet.cs +++ b/BossMod/Modules/Endwalker/Criterion/C03AAI/C031Ketuduke/HydrofallHydrobullet.cs @@ -1,6 +1,6 @@ namespace BossMod.Endwalker.Criterion.C03AAI.C031Ketuduke; -class HydrofallHydrobullet : Components.UniformStackSpread +class HydrofallHydrobullet(BossModule module) : Components.UniformStackSpread(module, 6, 15) { public struct Mechanic { @@ -12,9 +12,7 @@ public struct Mechanic public int ActiveMechanic { get; private set; } = -1; public List Mechanics = new(); - public HydrofallHydrobullet() : base(6, 15) { } - - public void Activate(BossModule module, int index) + public void Activate(int index) { if (ActiveMechanic == index) return; @@ -25,30 +23,30 @@ public void Activate(BossModule module, int index) { ref var m = ref Mechanics.AsSpan()[index]; if (m.Spread) - AddSpreads(module.Raid.WithSlot(true).IncludedInMask(m.Targets).Actors(), m.Activation); + AddSpreads(Raid.WithSlot(true).IncludedInMask(m.Targets).Actors(), m.Activation); else - AddStacks(module.Raid.WithSlot(true).IncludedInMask(m.Targets).Actors(), m.Activation); + AddStacks(Raid.WithSlot(true).IncludedInMask(m.Targets).Actors(), m.Activation); } } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { var firstMech = Math.Max(ActiveMechanic, 0); if (Mechanics.Count > firstMech) hints.Add(string.Join(" -> ", Mechanics.Skip(firstMech).Select(m => m.Spread ? "Spread" : "Stack"))); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID is SID.HydrofallTarget or SID.HydrobulletTarget && Mechanics.Count > 0) { ref var m = ref Mechanics.AsSpan()[Mechanics.Count - 1]; if (m.Spread != ((SID)status.ID == SID.HydrobulletTarget)) { - module.ReportError(this, $"Unexpected SID: {status.ID}"); + ReportError($"Unexpected SID: {status.ID}"); return; } - m.Targets.Set(module.Raid.FindSlot(actor.InstanceID)); + m.Targets.Set(Raid.FindSlot(actor.InstanceID)); m.Activation = status.ExpireAt; if (ActiveMechanic == Mechanics.Count - 1) { @@ -60,7 +58,7 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { @@ -73,7 +71,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { @@ -86,12 +84,12 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent case AID.NHydrofallAOE: case AID.SHydrofallAOE: if (ActiveMechanic >= 0 && ActiveMechanic < Mechanics.Count && !Mechanics[ActiveMechanic].Spread) - Activate(module, ActiveMechanic + 1); + Activate(ActiveMechanic + 1); break; case AID.NHydrobulletAOE: case AID.SHydrobulletAOE: if (ActiveMechanic >= 0 && ActiveMechanic < Mechanics.Count && Mechanics[ActiveMechanic].Spread) - Activate(module, ActiveMechanic + 1); + Activate(ActiveMechanic + 1); break; } } diff --git a/BossMod/Modules/Endwalker/Criterion/C03AAI/C031Ketuduke/Roar.cs b/BossMod/Modules/Endwalker/Criterion/C03AAI/C031Ketuduke/Roar.cs index 0ceed0aee0..7541e4ebd4 100644 --- a/BossMod/Modules/Endwalker/Criterion/C03AAI/C031Ketuduke/Roar.cs +++ b/BossMod/Modules/Endwalker/Criterion/C03AAI/C031Ketuduke/Roar.cs @@ -1,6 +1,6 @@ namespace BossMod.Endwalker.Criterion.C03AAI.C031Ketuduke; -class Roar : Components.GenericBaitAway +class Roar(BossModule module) : Components.GenericBaitAway(module) { public bool Active; private BitMask _playerBubbles; @@ -9,38 +9,38 @@ class Roar : Components.GenericBaitAway private static readonly AOEShapeCone _shape = new(60, 90.Degrees()); - public override void Update(BossModule module) + public override void Update() { CurrentBaits.Clear(); if (Active) { foreach (var s in _snakes) { - var target = module.Raid.WithoutSlot().Closest(s.actor.Position); + var target = Raid.WithoutSlot().Closest(s.actor.Position); if (target != null) CurrentBaits.Add(new(s.actor, target, _shape)); } } } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - base.DrawArenaForeground(module, pcSlot, pc, arena); + base.DrawArenaForeground(pcSlot, pc); foreach (var s in _snakes) { - arena.Actor(s.actor, ArenaColor.Object, true); + Arena.Actor(s.actor, ArenaColor.Object, true); if (_highlightSnakes && s.bubble != _playerBubbles[pcSlot]) - arena.AddCircle(s.actor.Position, 1, ArenaColor.Safe); + Arena.AddCircle(s.actor.Position, 1, ArenaColor.Safe); } } - public override void OnActorCreated(BossModule module, Actor actor) + public override void OnActorCreated(Actor actor) { if ((OID)actor.OID is OID.NZaratan or OID.SZaratan) _snakes.Add((actor, false)); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { switch ((SID)status.ID) { @@ -51,13 +51,13 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st _highlightSnakes = true; break; case SID.BubbleWeave: - _playerBubbles.Set(module.Raid.FindSlot(actor.InstanceID)); + _playerBubbles.Set(Raid.FindSlot(actor.InstanceID)); _highlightSnakes = true; break; } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.NHundredLashingsNormal or AID.NHundredLashingsBubble or AID.SHundredLashingsNormal or AID.SHundredLashingsBubble) { diff --git a/BossMod/Modules/Endwalker/Criterion/C03AAI/C031Ketuduke/SpringCrystals.cs b/BossMod/Modules/Endwalker/Criterion/C03AAI/C031Ketuduke/SpringCrystals.cs index 97c6ada7f9..d003430c69 100644 --- a/BossMod/Modules/Endwalker/Criterion/C03AAI/C031Ketuduke/SpringCrystals.cs +++ b/BossMod/Modules/Endwalker/Criterion/C03AAI/C031Ketuduke/SpringCrystals.cs @@ -10,23 +10,19 @@ class SpringCrystalsRect : Components.GenericAOEs private static readonly AOEShapeRect _shape = new(38, 5, 38); - public SpringCrystalsRect(bool moveCasters, bool risky, float delay) + public SpringCrystalsRect(BossModule module, bool moveCasters, bool risky, float delay) : base(module) { _moveCasters = moveCasters; _risky = risky; _delay = delay; - } - - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => _aoes; - - public override void Init(BossModule module) - { for (int z = -15; z <= 15; z += 10) for (int x = -15; x <= 15; x += 10) - SafeZoneCenters.Add(module.Bounds.Center + new WDir(x, z)); + SafeZoneCenters.Add(Module.Bounds.Center + new WDir(x, z)); } - public override void OnActorCreated(BossModule module, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) => _aoes; + + public override void OnActorCreated(Actor actor) { if ((OID)actor.OID is OID.NSpringCrystalRect or OID.SSpringCrystalRect) { @@ -35,15 +31,15 @@ public override void OnActorCreated(BossModule module, Actor actor) { // crystals are moved once or twice, but never outside arena bounds // orthogonal movement always happens, movement along direction happens only for half of them - but it doesn't actually affect aoe, so we can ignore it - pos.X += pos.X < module.Bounds.Center.X ? 20 : -20; - pos.Z += pos.Z < module.Bounds.Center.Z ? 20 : -20; + pos.X += pos.X < Module.Bounds.Center.X ? 20 : -20; + pos.Z += pos.Z < Module.Bounds.Center.Z ? 20 : -20; } - _aoes.Add(new(_shape, pos, actor.Rotation, module.WorldState.CurrentTime.AddSeconds(_delay), risky: _risky)); + _aoes.Add(new(_shape, pos, actor.Rotation, WorldState.FutureTime(_delay), risky: _risky)); SafeZoneCenters.RemoveAll(c => _shape.Check(c, pos, actor.Rotation)); } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.NSaturateRect or AID.SSaturateRect) { @@ -52,27 +48,27 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } } -class SpringCrystalsRectMove : SpringCrystalsRect { public SpringCrystalsRectMove() : base(true, false, 40.3f) { } } -class SpringCrystalsRectStay : SpringCrystalsRect { public SpringCrystalsRectStay() : base(false, true, 24.2f) { } } +class SpringCrystalsRectMove(BossModule module) : SpringCrystalsRect(module, true, false, 40.3f); +class SpringCrystalsRectStay(BossModule module) : SpringCrystalsRect(module, false, true, 24.2f); -class SpringCrystalsSphere : Components.GenericAOEs +class SpringCrystalsSphere(BossModule module) : Components.GenericAOEs(module) { private List _aoes = new(); private bool _active; private static readonly AOEShapeCircle _shape = new(8); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => _active ? _aoes : Enumerable.Empty(); + public override IEnumerable ActiveAOEs(int slot, Actor actor) => _active ? _aoes : Enumerable.Empty(); - public override void OnActorCreated(BossModule module, Actor actor) + public override void OnActorCreated(Actor actor) { if ((OID)actor.OID is OID.NSpringCrystalSphere or OID.SSpringCrystalSphere) { - _aoes.Add(new(_shape, actor.Position, default, module.WorldState.CurrentTime.AddSeconds(23.9f))); + _aoes.Add(new(_shape, actor.Position, default, WorldState.FutureTime(23.9f))); } } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((OID)actor.OID is OID.NSpringCrystalSphere or OID.SSpringCrystalSphere && (SID)status.ID == SID.Bubble) { @@ -80,17 +76,17 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st var index = _aoes.FindIndex(aoe => aoe.Origin.AlmostEqual(actor.Position, 1)); if (index >= 0) { - ref var pos = ref _aoes.AsSpan()[index].Origin; - pos.X += pos.X < module.Bounds.Center.X ? 20 : -20; + ref var aoe = ref _aoes.Ref(index); + aoe.Origin += new WDir(aoe.Origin.X < Module.Bounds.Center.X ? 20 : -20, 0); } else { - module.ReportError(this, $"Failed to find aoe for {actor}"); + ReportError($"Failed to find aoe for {actor}"); } } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.NSaturateSphere or AID.SSaturateSphere) { diff --git a/BossMod/Modules/Endwalker/Criterion/C03AAI/C031Ketuduke/StrewnBubbles.cs b/BossMod/Modules/Endwalker/Criterion/C03AAI/C031Ketuduke/StrewnBubbles.cs index b6499dae6f..c91f9ac91b 100644 --- a/BossMod/Modules/Endwalker/Criterion/C03AAI/C031Ketuduke/StrewnBubbles.cs +++ b/BossMod/Modules/Endwalker/Criterion/C03AAI/C031Ketuduke/StrewnBubbles.cs @@ -1,43 +1,43 @@ namespace BossMod.Endwalker.Criterion.C03AAI.C031Ketuduke; -class StrewnBubbles : Components.GenericAOEs +class StrewnBubbles(BossModule module) : Components.GenericAOEs(module) { private List _aoes = new(); private static readonly AOEShapeRect _shape = new(20, 5); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => _aoes.Take(4); + public override IEnumerable ActiveAOEs(int slot, Actor actor) => _aoes.Take(4); - public override void OnActorCreated(BossModule module, Actor actor) + public override void OnActorCreated(Actor actor) { if ((OID)actor.OID == OID.BubbleStrewer) { - _aoes.Add(new(_shape, actor.Position, actor.Rotation, module.WorldState.CurrentTime.AddSeconds(10.7f))); + _aoes.Add(new(_shape, actor.Position, actor.Rotation, WorldState.FutureTime(10.7f))); } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.NSphereShatter or AID.SSphereShatter) { var count = _aoes.RemoveAll(aoe => aoe.Origin.AlmostEqual(caster.Position, 1)); if (count != 1) - module.ReportError(this, $"{spell.Action} removed {count} aoes"); + ReportError($"{spell.Action} removed {count} aoes"); ++NumCasts; } } } -class RecedingEncroachingTwintides : Components.GenericAOEs +class RecedingEncroachingTwintides(BossModule module) : Components.GenericAOEs(module) { private List _aoes = new(); private static readonly AOEShapeCircle _shapeOut = new(14); private static readonly AOEShapeDonut _shapeIn = new(8, 60); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => _aoes.Skip(NumCasts).Take(1); + public override IEnumerable ActiveAOEs(int slot, Actor actor) => _aoes.Skip(NumCasts).Take(1); - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { @@ -54,7 +54,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.NRecedingTwintides or AID.NEncroachingTwintides or AID.NFarTide or AID.NNearTide or AID.SRecedingTwintides or AID.SEncroachingTwintides or AID.SFarTide or AID.SNearTide) ++NumCasts; diff --git a/BossMod/Modules/Endwalker/Criterion/C03AAI/C032Lala/Analysis.cs b/BossMod/Modules/Endwalker/Criterion/C03AAI/C032Lala/Analysis.cs index 1bf7ea4ee6..4b7ff48391 100644 --- a/BossMod/Modules/Endwalker/Criterion/C03AAI/C032Lala/Analysis.cs +++ b/BossMod/Modules/Endwalker/Criterion/C03AAI/C032Lala/Analysis.cs @@ -1,10 +1,10 @@ namespace BossMod.Endwalker.Criterion.C03AAI.C032Lala; -class Analysis : BossComponent +class Analysis(BossModule module) : BossComponent(module) { public Angle[] SafeDir = new Angle[4]; - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { Angle? offset = (SID)status.ID switch { @@ -14,7 +14,7 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st SID.RightUnseen => -90.Degrees(), _ => null }; - if (offset != null && module.Raid.FindSlot(actor.InstanceID) is var slot && slot >= 0 && slot < SafeDir.Length) + if (offset != null && Raid.FindSlot(actor.InstanceID) is var slot && slot >= 0 && slot < SafeDir.Length) SafeDir[slot] = offset.Value; } } @@ -25,28 +25,26 @@ class AnalysisRadiance : Components.GenericGaze private ArcaneArray? _pulse; private List _globes = new(); - public AnalysisRadiance() : base(default, true) { } + public AnalysisRadiance(BossModule module) : base(module, default, true) + { + _analysis = module.FindComponent(); + _pulse = module.FindComponent(); + } - public override IEnumerable ActiveEyes(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveEyes(int slot, Actor actor) { var (nextGlobe, activation) = NextGlobe(); if (_analysis != null && nextGlobe != null && activation != default) yield return new(nextGlobe.Position, activation, _analysis.SafeDir[slot]); } - public override void Init(BossModule module) - { - _analysis = module.FindComponent(); - _pulse = module.FindComponent(); - } - - public override void OnActorCreated(BossModule module, Actor actor) + public override void OnActorCreated(Actor actor) { if ((OID)actor.OID is OID.NArcaneGlobe or OID.SArcaneGlobe) _globes.Add(actor); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.NRadiance1 or AID.SRadiance1) { @@ -68,27 +66,25 @@ class TargetedLight : Components.GenericGaze private int[] _rotationCount = new int[4]; private DateTime _activation; - public TargetedLight() : base(default, true) { } - - public override IEnumerable ActiveEyes(BossModule module, int slot, Actor actor) + public TargetedLight(BossModule module) : base(module, default, true) { - if (Active) - yield return new(module.Bounds.Center, _activation, _safeDir[slot]); + _analysis = module.FindComponent(); } - public override void Init(BossModule module) + public override IEnumerable ActiveEyes(int slot, Actor actor) { - _analysis = module.FindComponent(); + if (Active) + yield return new(Module.Bounds.Center, _activation, _safeDir[slot]); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_rotation[slot] != default) hints.Add($"Rotation: {(_rotation[slot].Rad < 0 ? "CW" : "CCW")}", false); - base.AddHints(module, slot, actor, hints, movementHints); + base.AddHints(slot, actor, hints); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { var count = (SID)status.ID switch { @@ -96,11 +92,11 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st SID.TimesFivePlayer => 1, _ => 0 }; - if (count != 0 && module.Raid.FindSlot(actor.InstanceID) is var slot && slot >= 0 && slot < _rotationCount.Length) + if (count != 0 && Raid.FindSlot(actor.InstanceID) is var slot && slot >= 0 && slot < _rotationCount.Length) _rotationCount[slot] = count; } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { var rot = (IconID)iconID switch { @@ -108,7 +104,7 @@ public override void OnEventIcon(BossModule module, Actor actor, uint iconID) IconID.PlayerRotateCCW => 90.Degrees(), _ => default }; - if (rot != default && module.Raid.FindSlot(actor.InstanceID) is var slot && slot >= 0 && slot < _rotation.Length) + if (rot != default && Raid.FindSlot(actor.InstanceID) is var slot && slot >= 0 && slot < _rotation.Length) { _rotation[slot] = rot * _rotationCount[slot]; if (_analysis != null) @@ -116,13 +112,13 @@ public override void OnEventIcon(BossModule module, Actor actor, uint iconID) } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.NTargetedLightAOE or AID.STargetedLightAOE) _activation = spell.NPCFinishAt; } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.NTargetedLightAOE or AID.STargetedLightAOE) ++NumCasts; diff --git a/BossMod/Modules/Endwalker/Criterion/C03AAI/C032Lala/ArcaneArrayPlot.cs b/BossMod/Modules/Endwalker/Criterion/C03AAI/C032Lala/ArcaneArrayPlot.cs index 81f2f14150..5aac1b1e35 100644 --- a/BossMod/Modules/Endwalker/Criterion/C03AAI/C032Lala/ArcaneArrayPlot.cs +++ b/BossMod/Modules/Endwalker/Criterion/C03AAI/C032Lala/ArcaneArrayPlot.cs @@ -7,16 +7,16 @@ class ArcaneArrayPlot : Components.GenericAOEs public static readonly AOEShapeRect Shape = new(4, 4, 4); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => AOEs; - - public override void Init(BossModule module) + public ArcaneArrayPlot(BossModule module) : base(module) { for (int z = -16; z <= 16; z += 8) for (int x = -16; x <= 16; x += 8) - SafeZoneCenters.Add(module.Bounds.Center + new WDir(x, z)); + SafeZoneCenters.Add(Module.Bounds.Center + new WDir(x, z)); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override IEnumerable ActiveAOEs(int slot, Actor actor) => AOEs; + + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.NBrightPulseFirst or AID.NBrightPulseRest or AID.SBrightPulseFirst or AID.SBrightPulseRest) ++NumCasts; @@ -36,13 +36,13 @@ protected void Advance(ref WPos pos, ref DateTime activation, WDir offset) } } -class ArcaneArray : ArcaneArrayPlot +class ArcaneArray(BossModule module) : ArcaneArrayPlot(module) { - public override void OnActorCreated(BossModule module, Actor actor) + public override void OnActorCreated(Actor actor) { if ((OID)actor.OID == OID.ArrowBright) { - var activation = module.WorldState.CurrentTime.AddSeconds(4.6f); + var activation = WorldState.FutureTime(4.6f); var pos = actor.Position; var offset = 8 * actor.Rotation.ToDirection(); for (int i = 0; i < 5; ++i) @@ -50,7 +50,7 @@ public override void OnActorCreated(BossModule module, Actor actor) Advance(ref pos, ref activation, offset); } pos -= offset; - pos += module.Bounds.Contains(pos + offset.OrthoL()) ? offset.OrthoL() : offset.OrthoR(); + pos += Module.Bounds.Contains(pos + offset.OrthoL()) ? offset.OrthoL() : offset.OrthoR(); for (int i = 0; i < 5; ++i) { Advance(ref pos, ref activation, -offset); @@ -62,22 +62,22 @@ public override void OnActorCreated(BossModule module, Actor actor) } } -class ArcanePlot : ArcaneArrayPlot +class ArcanePlot(BossModule module) : ArcaneArrayPlot(module) { - public override void OnActorCreated(BossModule module, Actor actor) + public override void OnActorCreated(Actor actor) { switch ((OID)actor.OID) { case OID.ArrowBright: - AddLine(module, actor, module.WorldState.CurrentTime.AddSeconds(4.6f), false); + AddLine(actor, WorldState.FutureTime(4.6f), false); break; case OID.ArrowDim: - AddLine(module, actor, module.WorldState.CurrentTime.AddSeconds(8.2f), true); + AddLine(actor, WorldState.FutureTime(8.2f), true); break; } } - private void AddLine(BossModule module, Actor actor, DateTime activation, bool preAdvance) + private void AddLine(Actor actor, DateTime activation, bool preAdvance) { var pos = actor.Position; var offset = 8 * actor.Rotation.ToDirection(); @@ -88,7 +88,7 @@ private void AddLine(BossModule module, Actor actor, DateTime activation, bool p { Advance(ref pos, ref activation, offset); } - while (module.Bounds.Contains(pos)); + while (Module.Bounds.Contains(pos)); AOEs.SortBy(aoe => aoe.Activation); } diff --git a/BossMod/Modules/Endwalker/Criterion/C03AAI/C032Lala/ArcanePoint.cs b/BossMod/Modules/Endwalker/Criterion/C03AAI/C032Lala/ArcanePoint.cs index 7d50014a1f..5399c062c8 100644 --- a/BossMod/Modules/Endwalker/Criterion/C03AAI/C032Lala/ArcanePoint.cs +++ b/BossMod/Modules/Endwalker/Criterion/C03AAI/C032Lala/ArcanePoint.cs @@ -1,47 +1,44 @@ namespace BossMod.Endwalker.Criterion.C03AAI.C032Lala; // TODO: we could detect aoe positions slightly earlier, when golems spawn -class ConstructiveFigure : Components.SelfTargetedAOEs -{ - public ConstructiveFigure(AID aid) : base(ActionID.MakeSpell(aid), new AOEShapeRect(50, 4)) { } -} -class NConstructiveFigure : ConstructiveFigure { public NConstructiveFigure() : base(AID.NAero) { } } -class SConstructiveFigure : ConstructiveFigure { public SConstructiveFigure() : base(AID.SAero) { } } +class ConstructiveFigure(BossModule module, AID aid) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(aid), new AOEShapeRect(50, 4)); +class NConstructiveFigure(BossModule module) : ConstructiveFigure(module, AID.NAero); +class SConstructiveFigure(BossModule module) : ConstructiveFigure(module, AID.SAero); class ArcanePoint : BossComponent { public int NumCasts { get; private set; } private ArcanePlot? _plot; - public override void Init(BossModule module) + public ArcanePoint(BossModule module) : base(module) { _plot = module.FindComponent(); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (NumCasts > 0) return; var spot = CurrentSafeSpot(actor.Position); - if (spot != null && module.Raid.WithoutSlot().Exclude(actor).Any(p => CurrentSafeSpot(p.Position) == spot)) + if (spot != null && Raid.WithoutSlot().Exclude(actor).Any(p => CurrentSafeSpot(p.Position) == spot)) hints.Add("Spread on different squares!"); } - public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) + public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) { return PlayerPriority.Interesting; } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { if (NumCasts > 0) return; var spot = CurrentSafeSpot(pc.Position); if (spot != null) - ArcaneArrayPlot.Shape.Draw(arena, spot.Value, default, ArenaColor.SafeFromAOE); + ArcaneArrayPlot.Shape.Draw(Arena, spot.Value, default, ArenaColor.SafeFromAOE); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.NPowerfulLight or AID.SPowerfulLight) { @@ -59,16 +56,10 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } -class ExplosiveTheorem : Components.SpreadFromCastTargets -{ - public ExplosiveTheorem(AID aid) : base(ActionID.MakeSpell(aid), 8) { } -} -class NExplosiveTheorem : ExplosiveTheorem { public NExplosiveTheorem() : base(AID.NExplosiveTheoremAOE) { } } -class SExplosiveTheorem : ExplosiveTheorem { public SExplosiveTheorem() : base(AID.SExplosiveTheoremAOE) { } } +class ExplosiveTheorem(BossModule module, AID aid) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(aid), 8); +class NExplosiveTheorem(BossModule module) : ExplosiveTheorem(module, AID.NExplosiveTheoremAOE); +class SExplosiveTheorem(BossModule module) : ExplosiveTheorem(module, AID.SExplosiveTheoremAOE); -class TelluricTheorem : Components.LocationTargetedAOEs -{ - public TelluricTheorem(AID aid) : base(ActionID.MakeSpell(aid), 8) { } -} -class NTelluricTheorem : TelluricTheorem { public NTelluricTheorem() : base(AID.NTelluricTheorem) { } } -class STelluricTheorem : TelluricTheorem { public STelluricTheorem() : base(AID.STelluricTheorem) { } } +class TelluricTheorem(BossModule module, AID aid) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(aid), 8); +class NTelluricTheorem(BossModule module) : TelluricTheorem(module, AID.NTelluricTheorem); +class STelluricTheorem(BossModule module) : TelluricTheorem(module, AID.STelluricTheorem); diff --git a/BossMod/Modules/Endwalker/Criterion/C03AAI/C032Lala/C032Lala.cs b/BossMod/Modules/Endwalker/Criterion/C03AAI/C032Lala/C032Lala.cs index 2005d04faf..0967da1023 100644 --- a/BossMod/Modules/Endwalker/Criterion/C03AAI/C032Lala/C032Lala.cs +++ b/BossMod/Modules/Endwalker/Criterion/C03AAI/C032Lala/C032Lala.cs @@ -1,19 +1,13 @@ namespace BossMod.Endwalker.Criterion.C03AAI.C032Lala; -class ArcaneBlight : Components.SelfTargetedAOEs -{ - public ArcaneBlight(AID aid) : base(ActionID.MakeSpell(aid), new AOEShapeCone(60, 135.Degrees())) { } -} -class NArcaneBlight : ArcaneBlight { public NArcaneBlight() : base(AID.NArcaneBlightAOE) { } } -class SArcaneBlight : ArcaneBlight { public SArcaneBlight() : base(AID.SArcaneBlightAOE) { } } +class ArcaneBlight(BossModule module, AID aid) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(aid), new AOEShapeCone(60, 135.Degrees())); +class NArcaneBlight(BossModule module) : ArcaneBlight(module, AID.NArcaneBlightAOE); +class SArcaneBlight(BossModule module) : ArcaneBlight(module, AID.SArcaneBlightAOE); -public abstract class C032Lala : BossModule -{ - public C032Lala(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsSquare(new(200, 0), 20)) { } -} +public abstract class C032Lala(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsSquare(new(200, 0), 20)); [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.NBoss, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 979, NameID = 12639, SortOrder = 8)] -public class C032NLala : C032Lala { public C032NLala(WorldState ws, Actor primary) : base(ws, primary) { } } +public class C032NLala(WorldState ws, Actor primary) : C032Lala(ws, primary); [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.SBoss, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 980, NameID = 12639, SortOrder = 8)] -public class C032SLala : C032Lala { public C032SLala(WorldState ws, Actor primary) : base(ws, primary) { } } +public class C032SLala(WorldState ws, Actor primary) : C032Lala(ws, primary); diff --git a/BossMod/Modules/Endwalker/Criterion/C03AAI/C032Lala/C032LalaStates.cs b/BossMod/Modules/Endwalker/Criterion/C03AAI/C032Lala/C032LalaStates.cs index d3d502ccc4..7def265b67 100644 --- a/BossMod/Modules/Endwalker/Criterion/C03AAI/C032Lala/C032LalaStates.cs +++ b/BossMod/Modules/Endwalker/Criterion/C03AAI/C032Lala/C032LalaStates.cs @@ -151,5 +151,5 @@ private void SymmetricSurge(uint id, float delay) .DeactivateOnExit(); } } -class C032NLalaStates : C032LalaStates { public C032NLalaStates(BossModule module) : base(module, false) { } } -class C032SLalaStates : C032LalaStates { public C032SLalaStates(BossModule module) : base(module, true) { } } +class C032NLalaStates(BossModule module) : C032LalaStates(module, false); +class C032SLalaStates(BossModule module) : C032LalaStates(module, true); diff --git a/BossMod/Modules/Endwalker/Criterion/C03AAI/C032Lala/PlanarTactics.cs b/BossMod/Modules/Endwalker/Criterion/C03AAI/C032Lala/PlanarTactics.cs index d8cd3bf24c..b021eea2db 100644 --- a/BossMod/Modules/Endwalker/Criterion/C03AAI/C032Lala/PlanarTactics.cs +++ b/BossMod/Modules/Endwalker/Criterion/C03AAI/C032Lala/PlanarTactics.cs @@ -1,6 +1,6 @@ namespace BossMod.Endwalker.Criterion.C03AAI.C032Lala; -class PlanarTactics : Components.GenericAOEs +class PlanarTactics(BossModule module) : Components.GenericAOEs(module) { public struct PlayerState { @@ -14,48 +14,48 @@ public struct PlayerState private static readonly AOEShapeRect _shape = new(4, 4, 4); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => Mines; + public override IEnumerable ActiveAOEs(int slot, Actor actor) => Mines; - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { ref var p = ref Players[pcSlot]; if (p.StartingOffsets != null) foreach (var off in p.StartingOffsets) - arena.AddCircle(module.Bounds.Center + off, 1, ArenaColor.Safe); + Arena.AddCircle(Module.Bounds.Center + off, 1, ArenaColor.Safe); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { switch ((SID)status.ID) { case SID.SubtractiveSuppressorAlpha: - if (module.Raid.FindSlot(actor.InstanceID) is var slot3 && slot3 >= 0 && slot3 < Players.Length) + if (Raid.FindSlot(actor.InstanceID) is var slot3 && slot3 >= 0 && slot3 < Players.Length) Players[slot3].SubtractiveStacks = status.Extra; break; case SID.SurgeVector: - if (module.Raid.FindSlot(actor.InstanceID) is var slot4 && slot4 >= 0 && slot4 < Players.Length) + if (Raid.FindSlot(actor.InstanceID) is var slot4 && slot4 >= 0 && slot4 < Players.Length) Players[slot4].StackTarget = true; break; } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.NArcaneMineAOE or AID.SArcaneMineAOE) { Mines.Add(new(_shape, caster.Position, spell.Rotation, spell.NPCFinishAt)); if (Mines.Count == 8) { - InitSafespots(module); + InitSafespots(); } } } - private void InitSafespots(BossModule module) + private void InitSafespots() { WDir safeCornerOffset = default; foreach (var m in Mines) - safeCornerOffset -= m.Origin - module.Bounds.Center; + safeCornerOffset -= m.Origin - Module.Bounds.Center; var relSouth = (safeCornerOffset + safeCornerOffset.OrthoL()) / 16; var relWest = relSouth.OrthoR(); var off1 = 5 * relSouth + 13 * relWest; @@ -84,30 +84,30 @@ class PlanarTacticsForcedMarch : Components.GenericForcedMarch private Angle[] _rotation = new Angle[4]; private DateTime _activation; - public PlanarTacticsForcedMarch() + public PlanarTacticsForcedMarch(BossModule module) : base(module) { MovementSpeed = 4; } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_rotation[slot] != default) hints.Add($"Rotation: {(_rotation[slot].Rad < 0 ? "CW" : "CCW")}", false); - base.AddHints(module, slot, actor, hints, movementHints); + base.AddHints(slot, actor, hints); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { switch ((SID)status.ID) { case SID.TimesThreePlayer: _activation = status.ExpireAt; - if (module.Raid.FindSlot(actor.InstanceID) is var slot1 && slot1 >= 0 && slot1 < _rotationCount.Length) + if (Raid.FindSlot(actor.InstanceID) is var slot1 && slot1 >= 0 && slot1 < _rotationCount.Length) _rotationCount[slot1] = -1; break; case SID.TimesFivePlayer: _activation = status.ExpireAt; - if (module.Raid.FindSlot(actor.InstanceID) is var slot2 && slot2 >= 0 && slot2 < _rotationCount.Length) + if (Raid.FindSlot(actor.InstanceID) is var slot2 && slot2 >= 0 && slot2 < _rotationCount.Length) _rotationCount[slot2] = 1; break; case SID.ForcedMarch: @@ -117,7 +117,7 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st } } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { var rot = (IconID)iconID switch { @@ -125,7 +125,7 @@ public override void OnEventIcon(BossModule module, Actor actor, uint iconID) IconID.PlayerRotateCCW => 90.Degrees(), _ => default }; - if (rot != default && module.Raid.FindSlot(actor.InstanceID) is var slot && slot >= 0 && slot < _rotationCount.Length) + if (rot != default && Raid.FindSlot(actor.InstanceID) is var slot && slot >= 0 && slot < _rotationCount.Length) { _rotation[slot] = rot * _rotationCount[slot]; AddForcedMovement(actor, _rotation[slot], 6, _activation); diff --git a/BossMod/Modules/Endwalker/Criterion/C03AAI/C032Lala/SpatialTactics.cs b/BossMod/Modules/Endwalker/Criterion/C03AAI/C032Lala/SpatialTactics.cs index 3e257f5a9e..6efd6e64f0 100644 --- a/BossMod/Modules/Endwalker/Criterion/C03AAI/C032Lala/SpatialTactics.cs +++ b/BossMod/Modules/Endwalker/Criterion/C03AAI/C032Lala/SpatialTactics.cs @@ -8,7 +8,12 @@ class SpatialTactics : Components.GenericAOEs private static readonly AOEShapeCross _shape = new(50, 4); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public SpatialTactics(BossModule module) : base(module) + { + _array = module.FindComponent(); + } + + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_array == null) yield break; @@ -18,37 +23,32 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, yield return new(ArcaneArrayPlot.Shape, p, default, f.activation, wantMore ? ArenaColor.SafeFromAOE : ArenaColor.AOE, !wantMore); } - public override void Init(BossModule module) - { - _array = module.FindComponent(); - } - - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_remainingStacks[slot] > 0) hints.Add($"Remaining stacks: {_remainingStacks[slot]}", false); - base.AddHints(module, slot, actor, hints, movementHints); + base.AddHints(slot, actor, hints); } - public override void OnActorCreated(BossModule module, Actor actor) + public override void OnActorCreated(Actor actor) { if ((OID)actor.OID is OID.NArcaneFont or OID.SArcaneFont) _fonts.Add(actor); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { - if ((SID)status.ID == SID.SubtractiveSuppressorBeta && module.Raid.FindSlot(actor.InstanceID) is var slot && slot >= 0 && slot < _remainingStacks.Length) + if ((SID)status.ID == SID.SubtractiveSuppressorBeta && Raid.FindSlot(actor.InstanceID) is var slot && slot >= 0 && slot < _remainingStacks.Length) _remainingStacks[slot] = status.Extra; } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { - if ((SID)status.ID == SID.SubtractiveSuppressorBeta && module.Raid.FindSlot(actor.InstanceID) is var slot && slot >= 0 && slot < _remainingStacks.Length) + if ((SID)status.ID == SID.SubtractiveSuppressorBeta && Raid.FindSlot(actor.InstanceID) is var slot && slot >= 0 && slot < _remainingStacks.Length) _remainingStacks[slot] = 0; } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { diff --git a/BossMod/Modules/Endwalker/Criterion/C03AAI/C032Lala/SymmetricSurge.cs b/BossMod/Modules/Endwalker/Criterion/C03AAI/C032Lala/SymmetricSurge.cs index 771b8f73fb..e59c4ed103 100644 --- a/BossMod/Modules/Endwalker/Criterion/C03AAI/C032Lala/SymmetricSurge.cs +++ b/BossMod/Modules/Endwalker/Criterion/C03AAI/C032Lala/SymmetricSurge.cs @@ -1,16 +1,14 @@ namespace BossMod.Endwalker.Criterion.C03AAI.C032Lala; -class SymmetricSurge : Components.UniformStackSpread +class SymmetricSurge(BossModule module) : Components.UniformStackSpread(module, 6, 0) { - public SymmetricSurge() : base(6, 0) { } - - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.SurgeVector) AddStack(actor, status.ExpireAt); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.NSymmetricSurgeAOE or AID.SSymmetricSurgeAOE) Stacks.Clear(); diff --git a/BossMod/Modules/Endwalker/Criterion/C03AAI/C033Statice/C033Statice.cs b/BossMod/Modules/Endwalker/Criterion/C03AAI/C033Statice/C033Statice.cs index 6007ff8844..676d090d5d 100644 --- a/BossMod/Modules/Endwalker/Criterion/C03AAI/C033Statice/C033Statice.cs +++ b/BossMod/Modules/Endwalker/Criterion/C03AAI/C033Statice/C033Statice.cs @@ -1,31 +1,22 @@ namespace BossMod.Endwalker.Criterion.C03AAI.C033Statice; -class SurpriseBalloon : Components.KnockbackFromCastTarget -{ - public SurpriseBalloon(AID aid) : base(ActionID.MakeSpell(aid), 13) { } -} -class NSurpriseBalloon : SurpriseBalloon { public NSurpriseBalloon() : base(AID.NPop) { } } -class SSurpriseBalloon : SurpriseBalloon { public SSurpriseBalloon() : base(AID.SPop) { } } +class SurpriseBalloon(BossModule module, AID aid) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(aid), 13); +class NSurpriseBalloon(BossModule module) : SurpriseBalloon(module, AID.NPop); +class SSurpriseBalloon(BossModule module) : SurpriseBalloon(module, AID.SPop); class BeguilingGlitter : Components.StatusDrivenForcedMarch { - public BeguilingGlitter() : base(2, (uint)SID.ForwardMarch, (uint)SID.AboutFace, (uint)SID.LeftFace, (uint)SID.RightFace) { ActivationLimit = 8; } + public BeguilingGlitter(BossModule module) : base(module, 2, (uint)SID.ForwardMarch, (uint)SID.AboutFace, (uint)SID.LeftFace, (uint)SID.RightFace) { ActivationLimit = 8; } } -class FaerieRing : Components.SelfTargetedAOEs -{ - public FaerieRing(AID aid) : base(ActionID.MakeSpell(aid), new AOEShapeDonut(6, 12)) { } // TODO: verify inner radius -} -class NFaerieRing : FaerieRing { public NFaerieRing() : base(AID.NFaerieRing) { } } -class SFaerieRing : FaerieRing { public SFaerieRing() : base(AID.SFaerieRing) { } } +class FaerieRing(BossModule module, AID aid) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(aid), new AOEShapeDonut(6, 12)); // TODO: verify inner radius +class NFaerieRing(BossModule module) : FaerieRing(module, AID.NFaerieRing); +class SFaerieRing(BossModule module) : FaerieRing(module, AID.SFaerieRing); -public abstract class C033Statice : BossModule -{ - public C033Statice(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(-200, 0), 20)) { } -} +public abstract class C033Statice(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(-200, 0), 20)); [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.NBoss, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 979, NameID = 12506, SortOrder = 9)] -public class C033NStatice : C033Statice { public C033NStatice(WorldState ws, Actor primary) : base(ws, primary) { } } +public class C033NStatice(WorldState ws, Actor primary) : C033Statice(ws, primary); [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.SBoss, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 980, NameID = 12506, SortOrder = 9)] -public class C033SStatice : C033Statice { public C033SStatice(WorldState ws, Actor primary) : base(ws, primary) { } } +public class C033SStatice(WorldState ws, Actor primary) : C033Statice(ws, primary); diff --git a/BossMod/Modules/Endwalker/Criterion/C03AAI/C033Statice/C033StaticeStates.cs b/BossMod/Modules/Endwalker/Criterion/C03AAI/C033Statice/C033StaticeStates.cs index 9d511e8c65..6ab1328642 100644 --- a/BossMod/Modules/Endwalker/Criterion/C03AAI/C033Statice/C033StaticeStates.cs +++ b/BossMod/Modules/Endwalker/Criterion/C03AAI/C033Statice/C033StaticeStates.cs @@ -181,5 +181,5 @@ private void TrickReload3(uint id, float delay) .DeactivateOnExit(); } } -class C033NStaticeStates : C033StaticeStates { public C033NStaticeStates(BossModule module) : base(module, false) { } } -class C033SStaticeStates : C033StaticeStates { public C033SStaticeStates(BossModule module) : base(module, true) { } } +class C033NStaticeStates(BossModule module) : C033StaticeStates(module, false); +class C033SStaticeStates(BossModule module) : C033StaticeStates(module, true); diff --git a/BossMod/Modules/Endwalker/Criterion/C03AAI/C033Statice/Dartboard.cs b/BossMod/Modules/Endwalker/Criterion/C03AAI/C033Statice/Dartboard.cs index 2d091d8a34..23c2240cb0 100644 --- a/BossMod/Modules/Endwalker/Criterion/C03AAI/C033Statice/Dartboard.cs +++ b/BossMod/Modules/Endwalker/Criterion/C03AAI/C033Statice/Dartboard.cs @@ -4,7 +4,7 @@ // - inner/outer rings split is at radius 12 // - there are 12 segments total, meaning 30 degrees per segment // - starting from S (0deg) and CCW (increasing angle), colors are red->blue->yellow on outer segments and yellow->red->blue on inner segments -class Dartboard : BossComponent +class Dartboard(BossModule module) : BossComponent(module) { public enum Color { None, Red, Blue, Yellow } @@ -12,48 +12,45 @@ public enum Color { None, Red, Blue, Yellow } public Color ForbiddenColor { get; private set; } public BitMask Bullseye; - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (Bullseye[slot] || ForbiddenColor != Color.None) { - var color = PosToColor(module, actor.Position); + var color = PosToColor(actor.Position); if (color == ForbiddenColor) hints.Add("GTFO from forbidden color!"); - else if (Bullseye[slot] && module.Raid.WithSlot(true).Exclude(actor).WhereSlot(i => Bullseye[i]).WhereActor(p => PosToColor(module, p.Position) == color).Any()) + else if (Bullseye[slot] && Raid.WithSlot(true).Exclude(actor).WhereSlot(i => Bullseye[i]).WhereActor(p => PosToColor(p.Position) == color).Any()) hints.Add("Stay on different segments!"); } } - public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) - { - return Bullseye[playerSlot] ? PlayerPriority.Danger : PlayerPriority.Interesting; - } + public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) => Bullseye[playerSlot] ? PlayerPriority.Danger : PlayerPriority.Interesting; - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { if (ForbiddenColor != Color.None) - DrawSegmentsOfColor(module, ForbiddenColor, ArenaColor.AOE); + DrawSegmentsOfColor(ForbiddenColor, ArenaColor.AOE); if (Bullseye[pcSlot]) { - var color = PosToColor(module, pc.Position); + var color = PosToColor(pc.Position); if (color != ForbiddenColor) - DrawSegmentsOfColor(module, color, ArenaColor.SafeFromAOE); + DrawSegmentsOfColor(color, ArenaColor.SafeFromAOE); } } - public override void OnActorCreated(BossModule module, Actor actor) + public override void OnActorCreated(Actor actor) { if ((OID)actor.OID is OID.NHomingPattern or OID.SHomingPattern) - ForbiddenColor = PosToColor(module, actor.Position); + ForbiddenColor = PosToColor(actor.Position); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.BullsEye) - Bullseye.Set(module.Raid.FindSlot(actor.InstanceID)); + Bullseye.Set(Raid.FindSlot(actor.InstanceID)); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.NUncommonGroundSuccess or AID.NUncommonGroundFail or AID.SUncommonGroundSuccess or AID.SUncommonGroundFail) { @@ -72,20 +69,20 @@ public Color DirToColor(Angle dir, bool inner) return Color.Red + segIndex % 3; } - private Color PosToColor(BossModule module, WPos pos) + private Color PosToColor(WPos pos) { - var off = pos - module.Bounds.Center; + var off = pos - Module.Bounds.Center; return DirToColor(Angle.FromDirection(off), off.LengthSq() < 144); } - private void DrawSegmentsOfColor(BossModule module, Color color, uint zoneColor) + private void DrawSegmentsOfColor(Color color, uint zoneColor) { int index = (int)color - 1; var dirOut = (15 + index * 30).Degrees(); for (int i = 0; i < 4; ++i) { - module.Arena.ZoneCone(module.Bounds.Center, 0, 12, dirOut + 30.Degrees(), 15.Degrees(), zoneColor); - module.Arena.ZoneCone(module.Bounds.Center, 12, module.Bounds.HalfSize, dirOut, 15.Degrees(), zoneColor); + Arena.ZoneCone(Module.Bounds.Center, 0, 12, dirOut + 30.Degrees(), 15.Degrees(), zoneColor); + Arena.ZoneCone(Module.Bounds.Center, 12, Module.Bounds.HalfSize, dirOut, 15.Degrees(), zoneColor); dirOut += 90.Degrees(); } } diff --git a/BossMod/Modules/Endwalker/Criterion/C03AAI/C033Statice/Fireworks.cs b/BossMod/Modules/Endwalker/Criterion/C03AAI/C033Statice/Fireworks.cs index f55ce61ac0..bb5759f4dc 100644 --- a/BossMod/Modules/Endwalker/Criterion/C03AAI/C033Statice/Fireworks.cs +++ b/BossMod/Modules/Endwalker/Criterion/C03AAI/C033Statice/Fireworks.cs @@ -1,48 +1,46 @@ namespace BossMod.Endwalker.Criterion.C03AAI.C033Statice; -class Fireworks : Components.UniformStackSpread +class Fireworks(BossModule module) : Components.UniformStackSpread(module, 3, 20, 2, 2, true) { public Actor?[] TetheredAdds = new Actor?[4]; - public Fireworks() : base(3, 20, 2, 2, true) { } - - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (TetheredAdds[slot] is var add && add != null) hints.Add($"Tether: {((OID)add.OID is OID.NSurprisingMissile or OID.SSurprisingMissile ? "missile" : "claw")}", false); - base.AddHints(module, slot, actor, hints, movementHints); + base.AddHints(slot, actor, hints); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (TetheredAdds[pcSlot] is var add && add != null) { - arena.Actor(add, ArenaColor.Object, true); - arena.AddLine(add.Position, pc.Position, ArenaColor.Danger); + Arena.Actor(add, ArenaColor.Object, true); + Arena.AddLine(add.Position, pc.Position, ArenaColor.Danger); } - base.DrawArenaForeground(module, pcSlot, pc, arena); + base.DrawArenaForeground(pcSlot, pc); } - public override void OnTethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnTethered(Actor source, ActorTetherInfo tether) { - if ((TetherID)tether.ID == TetherID.Follow && module.Raid.FindSlot(tether.Target) is var slot && slot >= 0 && slot < TetheredAdds.Length) + if ((TetherID)tether.ID == TetherID.Follow && Raid.FindSlot(tether.Target) is var slot && slot >= 0 && slot < TetheredAdds.Length) TetheredAdds[slot] = source; } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { switch ((IconID)iconID) { case IconID.FireworksSpread: - AddSpread(actor, module.WorldState.CurrentTime.AddSeconds(9.1f)); + AddSpread(actor, WorldState.FutureTime(9.1f)); break; case IconID.FireworksEnumeration: - AddStack(actor, module.WorldState.CurrentTime.AddSeconds(8.2f)); + AddStack(actor, WorldState.FutureTime(8.2f)); break; } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { @@ -58,42 +56,42 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } -class BurningChains : BossComponent +class BurningChains(BossModule module) : BossComponent(module) { private BitMask _chains; public bool Active => _chains.Any(); - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_chains[slot]) hints.Add("Break chains!"); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (_chains[pcSlot]) { - var partner = module.Raid[_chains.WithoutBit(pcSlot).LowestSetBit()]; + var partner = Raid[_chains.WithoutBit(pcSlot).LowestSetBit()]; if (partner != null) - arena.AddLine(pc.Position, partner.Position, ArenaColor.Safe, 1); + Arena.AddLine(pc.Position, partner.Position, ArenaColor.Safe, 1); } } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.BurningChains) - _chains.Set(module.Raid.FindSlot(actor.InstanceID)); + _chains.Set(Raid.FindSlot(actor.InstanceID)); } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.BurningChains) - _chains.Clear(module.Raid.FindSlot(actor.InstanceID)); + _chains.Clear(Raid.FindSlot(actor.InstanceID)); } } -class FireSpread : Components.GenericAOEs +class FireSpread(BossModule module) : Components.GenericAOEs(module) { public struct Sequence { @@ -108,7 +106,7 @@ public struct Sequence private static readonly AOEShapeRect _shape = new(20, 2.5f, -8); private static readonly int _maxShownExplosions = 3; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { // future explosions foreach (var s in Sequences) @@ -118,7 +116,7 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, var max = Math.Min(s.RemainingExplosions, _maxShownExplosions); for (int i = 1; i < max; ++i) { - yield return new(_shape, module.Bounds.Center, rot, act); + yield return new(_shape, Module.Bounds.Center, rot, act); rot += _rotation; act = act.AddSeconds(1.1f); } @@ -129,12 +127,12 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, { if (s.RemainingExplosions > 0) { - yield return new(_shape, module.Bounds.Center, s.NextRotation, s.NextActivation, ArenaColor.Danger); + yield return new(_shape, Module.Bounds.Center, s.NextRotation, s.NextActivation, ArenaColor.Danger); } } } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { var rot = (IconID)iconID switch { @@ -146,13 +144,13 @@ public override void OnEventIcon(BossModule module, Actor actor, uint iconID) _rotation = rot; } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.NFireSpreadFirst or AID.SFireSpreadFirst) Sequences.Add(new() { NextRotation = spell.Rotation, RemainingExplosions = 12, NextActivation = spell.NPCFinishAt }); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.NFireSpreadFirst or AID.NFireSpreadRest or AID.SFireSpreadFirst or AID.SFireSpreadRest) { @@ -164,7 +162,7 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent if (--s.RemainingExplosions > 0) { s.NextRotation += _rotation; - s.NextActivation = module.WorldState.CurrentTime.AddSeconds(1.1f); + s.NextActivation = WorldState.FutureTime(1.1f); } else { @@ -173,7 +171,7 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } else { - module.ReportError(this, $"Failed to find sequence with rotation {caster.Rotation}"); + ReportError($"Failed to find sequence with rotation {caster.Rotation}"); } } } @@ -188,13 +186,13 @@ class Fireworks1Hints : BossComponent private List _safeSpotsClaw = new(); private List _safeSpotsMissile = new(); - public override void Init(BossModule module) + public Fireworks1Hints(BossModule module) : base(module) { _bombs = module.FindComponent(); _fireworks = module.FindComponent(); } - public override void Update(BossModule module) + public override void Update() { if (_pattern.Any() || _bombs == null || _bombs.ActiveBombs.Count < 3) return; @@ -208,7 +206,7 @@ public override void Update(BossModule module) // staffs are always in cardinals at radius 8 foreach (var b in _bombs.ActiveBombs) { - var offset = b.Position - module.Bounds.Center; + var offset = b.Position - Module.Bounds.Center; if (offset.Z < -14) _pattern.Set(0); // N else if (offset.Z < -4) @@ -220,75 +218,75 @@ public override void Update(BossModule module) switch (_pattern.Raw) { case 0x3: // 0+1: easy pattern, N + CW - AddSafeSpot(module, _safeSpotsClaw, -45.Degrees()); - AddSafeSpot(module, _safeSpotsMissile, -135.Degrees()); - AddSafeSpot(module, _safeSpotsMissile, 50.Degrees()); + AddSafeSpot(_safeSpotsClaw, -45.Degrees()); + AddSafeSpot(_safeSpotsMissile, -135.Degrees()); + AddSafeSpot(_safeSpotsMissile, 50.Degrees()); break; case 0x11: // 0+4: easy pattern, N + CCW - AddSafeSpot(module, _safeSpotsClaw, 45.Degrees()); - AddSafeSpot(module, _safeSpotsMissile, 135.Degrees()); - AddSafeSpot(module, _safeSpotsMissile, -50.Degrees()); + AddSafeSpot(_safeSpotsClaw, 45.Degrees()); + AddSafeSpot(_safeSpotsMissile, 135.Degrees()); + AddSafeSpot(_safeSpotsMissile, -50.Degrees()); break; case 0x5: // 0+2: hard pattern, N + CW - AddSafeSpot(module, _safeSpotsClaw, -135.Degrees()); - AddSafeSpot(module, _safeSpotsMissile, 125.Degrees()); - AddSafeSpot(module, _safeSpotsMissile, -35.Degrees()); + AddSafeSpot(_safeSpotsClaw, -135.Degrees()); + AddSafeSpot(_safeSpotsMissile, 125.Degrees()); + AddSafeSpot(_safeSpotsMissile, -35.Degrees()); break; case 0x9: // 0+3: hard pattern, N + CCW - AddSafeSpot(module, _safeSpotsClaw, 135.Degrees()); - AddSafeSpot(module, _safeSpotsMissile, -125.Degrees()); - AddSafeSpot(module, _safeSpotsMissile, 35.Degrees()); + AddSafeSpot(_safeSpotsClaw, 135.Degrees()); + AddSafeSpot(_safeSpotsMissile, -125.Degrees()); + AddSafeSpot(_safeSpotsMissile, 35.Degrees()); break; case 0x6: // 1+2: easy pattern, E - AddSafeSpot(module, _safeSpotsClaw, -135.Degrees()); - AddSafeSpot(module, _safeSpotsMissile, 150.Degrees()); - AddSafeSpot(module, _safeSpotsMissile, -45.Degrees()); + AddSafeSpot(_safeSpotsClaw, -135.Degrees()); + AddSafeSpot(_safeSpotsMissile, 150.Degrees()); + AddSafeSpot(_safeSpotsMissile, -45.Degrees()); break; case 0x18: // 3+4: easy pattern, W - AddSafeSpot(module, _safeSpotsClaw, 135.Degrees()); - AddSafeSpot(module, _safeSpotsMissile, -150.Degrees()); - AddSafeSpot(module, _safeSpotsMissile, 45.Degrees()); + AddSafeSpot(_safeSpotsClaw, 135.Degrees()); + AddSafeSpot(_safeSpotsMissile, -150.Degrees()); + AddSafeSpot(_safeSpotsMissile, 45.Degrees()); break; case 0xA: // 1+3: hard pattern, NE + SW - AddSafeSpot(module, _safeSpotsClaw, 150.Degrees()); - AddSafeSpot(module, _safeSpotsMissile, 30.Degrees()); - AddSafeSpot(module, _safeSpotsMissile, -120.Degrees()); + AddSafeSpot(_safeSpotsClaw, 150.Degrees()); + AddSafeSpot(_safeSpotsMissile, 30.Degrees()); + AddSafeSpot(_safeSpotsMissile, -120.Degrees()); break; case 0x14: // 2+4: hard pattern, NW + SE - AddSafeSpot(module, _safeSpotsClaw, -150.Degrees()); - AddSafeSpot(module, _safeSpotsMissile, -30.Degrees()); - AddSafeSpot(module, _safeSpotsMissile, 120.Degrees()); + AddSafeSpot(_safeSpotsClaw, -150.Degrees()); + AddSafeSpot(_safeSpotsMissile, -30.Degrees()); + AddSafeSpot(_safeSpotsMissile, 120.Degrees()); break; case 0x12: // 1+4: never seen case 0xC: // 2+3: never seen default: - module.ReportError(this, $"Unexpected bomb pattern: {_pattern}"); + ReportError($"Unexpected bomb pattern: {_pattern}"); break; } } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (_pattern.Any()) hints.Add($"Pattern: {_pattern}"); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (_fireworks?.TetheredAdds[pcSlot] is var add && add != null) { var safeSpots = (OID)add.OID is OID.NSurprisingClaw or OID.SSurprisingClaw ? _safeSpotsClaw : _safeSpotsMissile; foreach (var p in safeSpots) - arena.AddCircle(p, 1, ArenaColor.Safe); + Arena.AddCircle(p, 1, ArenaColor.Safe); } else { foreach (var p in _safeSpotsClaw) - arena.AddCircle(p, 1, ArenaColor.Enemy); + Arena.AddCircle(p, 1, ArenaColor.Enemy); } } - private void AddSafeSpot(BossModule module, List list, Angle angle) => list.Add(module.Bounds.Center + 19 * angle.ToDirection()); + private void AddSafeSpot(List list, Angle angle) => list.Add(Module.Bounds.Center + 19 * angle.ToDirection()); } // TODO: currently this assumes that DD always go rel-west, supports rel-east @@ -299,14 +297,14 @@ class Fireworks2Hints : BossComponent private FireSpread? _fireSpread; private Angle? _relNorth; - public override void Init(BossModule module) + public Fireworks2Hints(BossModule module) : base(module) { _fireworks = module.FindComponent(); _dartboard = module.FindComponent(); _fireSpread = module.FindComponent(); } - public override void Update(BossModule module) + public override void Update() { if (_relNorth == null && _fireSpread?.Sequences.Count == 3 && _dartboard != null && _dartboard.ForbiddenColor != Dartboard.Color.None) { @@ -315,21 +313,21 @@ public override void Update(BossModule module) } } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (_fireworks?.Spreads.Count > 0) { - foreach (var dir in SafeSpots(module, pcSlot, pc)) - arena.AddCircle(module.Bounds.Center + 19 * dir.ToDirection(), 1, ArenaColor.Safe); + foreach (var dir in SafeSpots(pcSlot, pc)) + Arena.AddCircle(Module.Bounds.Center + 19 * dir.ToDirection(), 1, ArenaColor.Safe); } else if (_relNorth != null) { // show rel north before assignments are done - arena.AddCircle(module.Bounds.Center + 19 * _relNorth.Value.ToDirection(), 1, ArenaColor.Enemy); + Arena.AddCircle(Module.Bounds.Center + 19 * _relNorth.Value.ToDirection(), 1, ArenaColor.Enemy); } } - private IEnumerable SafeSpots(BossModule module, int slot, Actor actor) + private IEnumerable SafeSpots(int slot, Actor actor) { if (_fireworks?.Spreads.Count > 0 && _dartboard != null && _relNorth != null) { @@ -344,7 +342,7 @@ private IEnumerable SafeSpots(BossModule module, int slot, Actor actor) // non-dartboard non-spread should just go north yield return _relNorth.Value; } - else if (module.Raid[_dartboard.Bullseye.WithoutBit(slot).LowestSetBit()] is var partner && partner != null) + else if (Raid[_dartboard.Bullseye.WithoutBit(slot).LowestSetBit()] is var partner && partner != null) { bool west = actor.Class.IsDD(); // note: this is arbitrary if (_fireworks.IsSpreadTarget(partner) && partner.Class.IsDD() == west) diff --git a/BossMod/Modules/Endwalker/Criterion/C03AAI/C033Statice/RingARingOExplosions.cs b/BossMod/Modules/Endwalker/Criterion/C03AAI/C033Statice/RingARingOExplosions.cs index 69f2b75922..78cd4cfac1 100644 --- a/BossMod/Modules/Endwalker/Criterion/C03AAI/C033Statice/RingARingOExplosions.cs +++ b/BossMod/Modules/Endwalker/Criterion/C03AAI/C033Statice/RingARingOExplosions.cs @@ -1,6 +1,6 @@ namespace BossMod.Endwalker.Criterion.C03AAI.C033Statice; -class RingARingOExplosions : Components.GenericAOEs +class RingARingOExplosions(BossModule module) : Components.GenericAOEs(module) { public List ActiveBombs = new(); private List _bombs = new(); @@ -8,9 +8,9 @@ class RingARingOExplosions : Components.GenericAOEs private static readonly AOEShapeCircle _shape = new(12); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => ActiveBombs.Select(b => new AOEInstance(_shape, b.Position, default, _activation)); + public override IEnumerable ActiveAOEs(int slot, Actor actor) => ActiveBombs.Select(b => new AOEInstance(_shape, b.Position, default, _activation)); - public override void Update(BossModule module) + public override void Update() { if (_bombs.Count == 6 && ActiveBombs.Count == 0) { @@ -21,20 +21,20 @@ public override void Update(BossModule module) do { ActiveBombs.Add(cur); - cur = module.WorldState.Actors.Find(cur.Tether.Target); + cur = WorldState.Actors.Find(cur.Tether.Target); } while (cur != null && cur != glowingBomb); - _activation = module.WorldState.CurrentTime.AddSeconds(17.4f); + _activation = WorldState.FutureTime(17.4f); } } } - public override void OnActorCreated(BossModule module, Actor actor) + public override void OnActorCreated(Actor actor) { if ((OID)actor.OID is OID.NBomb or OID.SBomb) _bombs.Add(actor); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.NBombBurst or AID.SBombBurst) { diff --git a/BossMod/Modules/Endwalker/Criterion/C03AAI/C033Statice/TrickReload.cs b/BossMod/Modules/Endwalker/Criterion/C03AAI/C033Statice/TrickReload.cs index b5141c36da..f7d6771b45 100644 --- a/BossMod/Modules/Endwalker/Criterion/C03AAI/C033Statice/TrickReload.cs +++ b/BossMod/Modules/Endwalker/Criterion/C03AAI/C033Statice/TrickReload.cs @@ -1,12 +1,12 @@ namespace BossMod.Endwalker.Criterion.C03AAI.C033Statice; -class TrickReload : BossComponent +class TrickReload(BossModule module) : BossComponent(module) { public bool FirstStack { get; private set; } public int SafeSlice { get; private set; } public int NumLoads { get; private set; } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (SafeSlice > 0) hints.Add($"Order: {(FirstStack ? "stack" : "spread")} -> {SafeSlice} -> {(FirstStack ? "spread" : "stack")}"); @@ -14,7 +14,7 @@ public override void AddGlobalHints(BossModule module, GlobalHints hints) hints.Add($"Order: {(FirstStack ? "stack" : "spread")} -> ???"); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { @@ -37,32 +37,30 @@ class Trapshooting : Components.UniformStackSpread public int NumResolves { get; private set; } private TrickReload? _reload; - public Trapshooting() : base(6, 6, 4, alwaysShowSpreads: true) { } - - public override void Init(BossModule module) + public Trapshooting(BossModule module) : base(module, 6, 6, 4, alwaysShowSpreads: true) { _reload = module.FindComponent(); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.NTrapshooting1 or AID.NTrapshooting2 or AID.STrapshooting1 or AID.STrapshooting2 && _reload != null) { bool stack = NumResolves == 0 ? _reload.FirstStack : !_reload.FirstStack; if (stack) { - var target = module.Raid.WithoutSlot().FirstOrDefault(); // TODO: dunno how target is selected... + var target = Raid.WithoutSlot().FirstOrDefault(); // TODO: dunno how target is selected... if (target != null) AddStack(target, spell.NPCFinishAt.AddSeconds(4.1f)); } else { - AddSpreads(module.Raid.WithoutSlot(true), spell.NPCFinishAt.AddSeconds(4.1f)); + AddSpreads(Raid.WithoutSlot(true), spell.NPCFinishAt.AddSeconds(4.1f)); } } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { @@ -86,9 +84,6 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } -class TriggerHappy : Components.SelfTargetedAOEs -{ - public TriggerHappy(AID aid) : base(ActionID.MakeSpell(aid), new AOEShapeCone(40, 30.Degrees())) { } -} -class NTriggerHappy : TriggerHappy { public NTriggerHappy() : base(AID.NTriggerHappyAOE) { } } -class STriggerHappy : TriggerHappy { public STriggerHappy() : base(AID.STriggerHappyAOE) { } } +class TriggerHappy(BossModule module, AID aid) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(aid), new AOEShapeCone(40, 30.Degrees())); +class NTriggerHappy(BossModule module) : TriggerHappy(module, AID.NTriggerHappyAOE); +class STriggerHappy(BossModule module) : TriggerHappy(module, AID.STriggerHappyAOE); diff --git a/BossMod/Modules/Endwalker/DeepDungeon/EurekaOrthos/DD30TiamatsClone.cs b/BossMod/Modules/Endwalker/DeepDungeon/EurekaOrthos/DD30TiamatsClone.cs index fa95ab4d48..7cced4c424 100644 --- a/BossMod/Modules/Endwalker/DeepDungeon/EurekaOrthos/DD30TiamatsClone.cs +++ b/BossMod/Modules/Endwalker/DeepDungeon/EurekaOrthos/DD30TiamatsClone.cs @@ -27,42 +27,27 @@ public enum IconID : uint ChasingAOE = 197, // player } -class WheiMorn : Components.StandardChasingAOEs -{ - public WheiMorn() : base(new AOEShapeCircle(6), ActionID.MakeSpell(AID.WheiMornFirst), ActionID.MakeSpell(AID.WheiMornRest), 6, 2, 5) { } -} +class WheiMorn(BossModule module) : Components.StandardChasingAOEs(module, new AOEShapeCircle(6), ActionID.MakeSpell(AID.WheiMornFirst), ActionID.MakeSpell(AID.WheiMornRest), 6, 2, 5); +class DarkMegaflare(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.DarkMegaflare2), 6); +class DarkWyrmwing(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.DarkWyrmwing2), new AOEShapeRect(40, 8)); +class DarkWyrmtail(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.DarkWyrmtail2), new AOEShapeRect(40, 8)); -class DarkMegaflare : Components.LocationTargetedAOEs -{ - public DarkMegaflare() : base(ActionID.MakeSpell(AID.DarkMegaflare2), 6) { } -} - -class DarkWyrmwing : Components.SelfTargetedAOEs -{ - public DarkWyrmwing() : base(ActionID.MakeSpell(AID.DarkWyrmwing2), new AOEShapeRect(40, 8)) { } -} - -class DarkWyrmtail : Components.SelfTargetedAOEs -{ - public DarkWyrmtail() : base(ActionID.MakeSpell(AID.DarkWyrmtail2), new AOEShapeRect(40, 8)) { } -} - -class CreatureOfDarkness : Components.GenericAOEs +class CreatureOfDarkness(BossModule module) : Components.GenericAOEs(module) { private readonly List _heads = new(); private static readonly AOEShapeRect rect = new(2, 2, 2); private static readonly AOEShapeRect rect2 = new(6, 2); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { foreach (var c in _heads) { - yield return new(rect, c.Position, c.Rotation, color: ArenaColor.Danger); + yield return new(rect, c.Position, c.Rotation, Color: ArenaColor.Danger); yield return new(rect2, c.Position + 2 * c.Rotation.ToDirection(), c.Rotation); } } - public override void OnActorModelStateChange(BossModule module, Actor actor, byte modelState, byte animState1, byte animState2) + public override void OnActorModelStateChange(Actor actor, byte modelState, byte animState1, byte animState2) { if ((OID)actor.OID == OID.DarkWanderer) { @@ -88,7 +73,4 @@ public DD30TiamatsCloneStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 899, NameID = 12242)] -public class DD30TiamatsClone : BossModule -{ - public DD30TiamatsClone(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsSquare(new(-300, -300), 20)) { } -} +public class DD30TiamatsClone(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsSquare(new(-300, -300), 20)); diff --git a/BossMod/Modules/Endwalker/DeepDungeon/EurekaOrthos/DD70Aeturna.cs b/BossMod/Modules/Endwalker/DeepDungeon/EurekaOrthos/DD70Aeturna.cs index 0c7e9e6d2a..7ab20cb864 100644 --- a/BossMod/Modules/Endwalker/DeepDungeon/EurekaOrthos/DD70Aeturna.cs +++ b/BossMod/Modules/Endwalker/DeepDungeon/EurekaOrthos/DD70Aeturna.cs @@ -35,102 +35,88 @@ public enum TetherID : uint FerocityTetherStretch = 57, // Boss->player } -class SteelClaw : Components.SingleTargetDelayableCast -{ - public SteelClaw() : base(ActionID.MakeSpell(AID.SteelClaw)) { } -} +class SteelClaw(BossModule module) : Components.SingleTargetDelayableCast(module, ActionID.MakeSpell(AID.SteelClaw)); -class FerocityGood : Components.BaitAwayTethers //TODO: consider generalizing stretched tethers? +class FerocityGood(BossModule module) : Components.BaitAwayTethers(module, new AOEShapeCone(0, 0.Degrees()), (uint)TetherID.FerocityTetherGood) // TODO: consider generalizing stretched tethers? { private ulong target; - public FerocityGood() : base(new AOEShapeCone(0, 0.Degrees()), (uint)TetherID.FerocityTetherGood) { } - - public override void OnTethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnTethered(Actor source, ActorTetherInfo tether) { - base.OnTethered(module, source, tether); + base.OnTethered(source, tether); if (tether.ID == (uint)TetherID.FerocityTetherGood) target = tether.Target; } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (DrawTethers && target == pc.InstanceID && CurrentBaits.Count > 0) { foreach (var b in ActiveBaits) { - if (arena.Config.ShowOutlinesAndShadows) - arena.AddLine(b.Source.Position, b.Target.Position, 0xFF000000, 2); - arena.AddLine(b.Source.Position, b.Target.Position, ArenaColor.Safe); + if (Arena.Config.ShowOutlinesAndShadows) + Arena.AddLine(b.Source.Position, b.Target.Position, 0xFF000000, 2); + Arena.AddLine(b.Source.Position, b.Target.Position, ArenaColor.Safe); } } } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (target == actor.InstanceID && CurrentBaits.Count > 0) hints.Add("Tether is stretched!", false); } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { - base.AddAIHints(module, slot, actor, assignment, hints); + base.AddAIHints(slot, actor, assignment, hints); if (target == actor.InstanceID && CurrentBaits.Count > 0) - hints.AddForbiddenZone(ShapeDistance.Circle(module.PrimaryActor.Position, 15)); + hints.AddForbiddenZone(ShapeDistance.Circle(Module.PrimaryActor.Position, 15)); } } -class FerocityBad : Components.BaitAwayTethers +class FerocityBad(BossModule module) : Components.BaitAwayTethers(module, new AOEShapeCone(0, 0.Degrees()), (uint)TetherID.FerocityTetherStretch) { private ulong target; - public FerocityBad() : base(new AOEShapeCone(0, 0.Degrees()), (uint)TetherID.FerocityTetherStretch) { } - - public override void OnTethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnTethered(Actor source, ActorTetherInfo tether) { - base.OnTethered(module, source, tether); + base.OnTethered(source, tether); if (tether.ID == (uint)TetherID.FerocityTetherStretch) target = tether.Target; } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (DrawTethers && target == pc.InstanceID && CurrentBaits.Count > 0) { foreach (var b in ActiveBaits) { - if (arena.Config.ShowOutlinesAndShadows) - arena.AddLine(b.Source.Position, b.Target.Position, 0xFF000000, 2); - arena.AddLine(b.Source.Position, b.Target.Position, ArenaColor.Danger); + if (Arena.Config.ShowOutlinesAndShadows) + Arena.AddLine(b.Source.Position, b.Target.Position, 0xFF000000, 2); + Arena.AddLine(b.Source.Position, b.Target.Position, ArenaColor.Danger); } } } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (target == actor.InstanceID && CurrentBaits.Count > 0) hints.Add("Stretch tether further!"); } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { - base.AddAIHints(module, slot, actor, assignment, hints); + base.AddAIHints(slot, actor, assignment, hints); if (target == actor.InstanceID && CurrentBaits.Count > 0) - hints.AddForbiddenZone(ShapeDistance.Circle(module.PrimaryActor.Position, 15)); + hints.AddForbiddenZone(ShapeDistance.Circle(Module.PrimaryActor.Position, 15)); } } -class PreternaturalTurnCircle : Components.SelfTargetedAOEs -{ - public PreternaturalTurnCircle() : base(ActionID.MakeSpell(AID.PreternaturalTurnCircle), new AOEShapeCircle(15)) { } -} - -class PreternaturalTurnDonut : Components.SelfTargetedAOEs -{ - public PreternaturalTurnDonut() : base(ActionID.MakeSpell(AID.PreternaturalTurnDonut), new AOEShapeDonut(6, 30)) { } -} +class PreternaturalTurnCircle(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PreternaturalTurnCircle), new AOEShapeCircle(15)); +class PreternaturalTurnDonut(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PreternaturalTurnDonut), new AOEShapeDonut(6, 30)); -class Shatter : Components.GenericAOEs +class Shatter(BossModule module) : Components.GenericAOEs(module) { private bool FerocityCasted; private readonly List _crystals = []; @@ -139,15 +125,15 @@ class Shatter : Components.GenericAOEs private static readonly AOEShapeCone cone = new(23.95f, 75.Degrees()); private static readonly AOEShapeCircle circle = new(8); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => _aoes.Take(4); + public override IEnumerable ActiveAOEs(int slot, Actor actor) => _aoes.Take(4); - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (var s in _crystals) - arena.Actor(s, ArenaColor.Object, true); + Arena.Actor(s, ArenaColor.Object, true); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.Impact) _crystals.Add(caster); @@ -155,13 +141,13 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf FerocityCasted = true; if (!FerocityCasted && (AID)spell.Action.ID == AID.PreternaturalTurnDonut) foreach (var c in module.Enemies(OID.AllaganCrystal)) - _aoes.Add(new(circle, c.Position, activation: spell.NPCFinishAt.AddSeconds(0.5f))); + _aoes.Add(new(circle, c.Position, default, spell.NPCFinishAt.AddSeconds(0.5f))); if (!FerocityCasted && (AID)spell.Action.ID == AID.PreternaturalTurnCircle) foreach (var c in module.Enemies(OID.AllaganCrystal)) _aoes.Add(new(cone, c.Position, c.Rotation, spell.NPCFinishAt.AddSeconds(0.5f))); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.ShatterCircle or AID.ShatterCone) { @@ -173,20 +159,9 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn } } -class Roar : Components.RaidwideCast -{ - public Roar() : base(ActionID.MakeSpell(AID.Roar)) { } -} - -class FallingRock : Components.SelfTargetedAOEs -{ - public FallingRock() : base(ActionID.MakeSpell(AID.FallingRock), new AOEShapeCircle(3)) { } -} - -class Impact : Components.SelfTargetedAOEs -{ - public Impact() : base(ActionID.MakeSpell(AID.Impact), new AOEShapeCircle(5)) { } -} +class Roar(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.Roar)); +class FallingRock(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.FallingRock), new AOEShapeCircle(3)); +class Impact(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Impact), new AOEShapeCircle(5)); class DD70AeturnaStates : StateMachineBuilder { @@ -206,7 +181,4 @@ public DD70AeturnaStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "legendoficeman, Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 903, NameID = 12246)] -public class DD70Aeturna : BossModule -{ - public DD70Aeturna(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(-300, -300), 20)) { } -} +public class DD70Aeturna(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(-300, -300), 20)); diff --git a/BossMod/Modules/Endwalker/Dungeon/D01TowerOfZot/D011Minduruva.cs b/BossMod/Modules/Endwalker/Dungeon/D01TowerOfZot/D011Minduruva.cs index 576623d030..0425743644 100644 --- a/BossMod/Modules/Endwalker/Dungeon/D01TowerOfZot/D011Minduruva.cs +++ b/BossMod/Modules/Endwalker/Dungeon/D01TowerOfZot/D011Minduruva.cs @@ -42,28 +42,25 @@ public enum SID : uint FireAlchemy = 2751, // Boss->Boss, extra=0x0 } -class ManusyaBio : Components.SingleTargetCast -{ - public ManusyaBio() : base(ActionID.MakeSpell(AID.ManusyaBio), "Tankbuster + cleansable poison") { } -} +class ManusyaBio(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.ManusyaBio), "Tankbuster + cleansable poison"); -class Poison : BossComponent +class Poison(BossModule module) : BossComponent(module) { private readonly List _poisoned = []; - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Poison) _poisoned.Add(actor); } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Poison) _poisoned.Remove(actor); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_poisoned.Contains(actor) && !(actor.Role == Role.Healer || actor.Class == Class.BRD)) //theoretically only the tank can ge poisoned, this is just in here incase of bad tanks hints.Add("You were poisoned! Get cleansed fast."); @@ -74,9 +71,9 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint hints.Add($"Cleanse {c.Name} (Poison)"); } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { - base.AddAIHints(module, slot, actor, assignment, hints); + base.AddAIHints(slot, actor, assignment, hints); foreach (var c in _poisoned) { if (_poisoned.Count > 0 && actor.Role == Role.Healer) @@ -87,17 +84,18 @@ public override void AddAIHints(BossModule module, int slot, Actor actor, PartyR } } -class Dhrupad : BossComponent +class Dhrupad(BossModule module) : BossComponent(module) { private int NumCasts; private bool active; - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.Dhrupad) active = true; } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.ManusyaFire1 or AID.ManusyaBlizzard or AID.ManusyaThunder) { @@ -109,32 +107,18 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + + public override void AddGlobalHints(GlobalHints hints) { if (active) hints.Add("3 single target hits + DoTs"); } } -class ManusyaThunderIII : Components.SelfTargetedAOEs -{ - public ManusyaThunderIII() : base(ActionID.MakeSpell(AID.ManusyaThunderIII2), new AOEShapeCircle(3)) { } -} - -class ManusyaBioIII : Components.SelfTargetedAOEs -{ - public ManusyaBioIII() : base(ActionID.MakeSpell(AID.ManusyaBioIII2), new AOEShapeCone(40.5f, 90.Degrees())) { } -} - -class ManusyaBlizzardIII : Components.SelfTargetedAOEs -{ - public ManusyaBlizzardIII() : base(ActionID.MakeSpell(AID.ManusyaBlizzardIII2), new AOEShapeCone(40.5f, 10.Degrees())) { } -} - -class ManusyaFireIII : Components.SelfTargetedAOEs -{ - public ManusyaFireIII() : base(ActionID.MakeSpell(AID.ManusyaFireIII2), new AOEShapeDonut(5, 60)) { } -} +class ManusyaThunderIII(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ManusyaThunderIII2), new AOEShapeCircle(3)); +class ManusyaBioIII(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ManusyaBioIII2), new AOEShapeCone(40.5f, 90.Degrees())); +class ManusyaBlizzardIII(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ManusyaBlizzardIII2), new AOEShapeCone(40.5f, 10.Degrees())); +class ManusyaFireIII(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ManusyaFireIII2), new AOEShapeDonut(5, 60)); class D011MinduruvaStates : StateMachineBuilder { @@ -152,7 +136,4 @@ public D011MinduruvaStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "dhoggpt, Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 783, NameID = 10256)] -public class D011Minduruva : BossModule -{ - public D011Minduruva(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(68, -124), 19.5f)) { } -} +public class D011Minduruva(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(68, -124), 19.5f)); diff --git a/BossMod/Modules/Endwalker/Dungeon/D01TowerOfZot/D012Sanduruva.cs b/BossMod/Modules/Endwalker/Dungeon/D01TowerOfZot/D012Sanduruva.cs index 708dde01d6..3ef1cb9b71 100644 --- a/BossMod/Modules/Endwalker/Dungeon/D01TowerOfZot/D012Sanduruva.cs +++ b/BossMod/Modules/Endwalker/Dungeon/D01TowerOfZot/D012Sanduruva.cs @@ -30,37 +30,34 @@ public enum SID : uint WhoIsShe2 = 2654, // none->BerserkerSphere, extra=0x1A8 } -class IsitvaSiddhi : Components.SingleTargetCast -{ - public IsitvaSiddhi() : base(ActionID.MakeSpell(AID.IsitvaSiddhi)) { } -} +class IsitvaSiddhi(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.IsitvaSiddhi)); -class SphereShatter : Components.GenericAOEs +class SphereShatter(BossModule module) : Components.GenericAOEs(module) { private DateTime _activation; private readonly List _casters = []; private static readonly AOEShapeCircle circle = new(15); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_casters.Count > 0) foreach (var c in _casters) - yield return new(circle, c.Position, activation: _activation, risky: _activation.AddSeconds(-7) < module.WorldState.CurrentTime); + yield return new(circle, c.Position, default, _activation, Risky: _activation.AddSeconds(-7) < WorldState.CurrentTime); } - public override void OnActorCreated(BossModule module, Actor actor) + public override void OnActorCreated(Actor actor) { if ((OID)actor.OID == OID.BerserkerSphere) { _casters.Add(actor); if (NumCasts == 0) - _activation = module.WorldState.CurrentTime.AddSeconds(10.8f); + _activation = WorldState.FutureTime(10.8f); else - _activation = module.WorldState.CurrentTime.AddSeconds(20); + _activation = WorldState.FutureTime(20); } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.SphereShatter) { @@ -70,25 +67,10 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn } } -class PraptiSiddhi : Components.SelfTargetedAOEs -{ - public PraptiSiddhi() : base(ActionID.MakeSpell(AID.PraptiSiddhi), new AOEShapeRect(40, 2)) { } -} - -class PrakamyaSiddhi : Components.SelfTargetedAOEs -{ - public PrakamyaSiddhi() : base(ActionID.MakeSpell(AID.PrakamyaSiddhi), new AOEShapeCircle(5)) { } -} - -class ManusyaConfuse : Components.CastHint -{ - public ManusyaConfuse() : base(ActionID.MakeSpell(AID.ManusyaConfuse), "Applies Manyusa Confusion") { } -} - -class ManusyaStop : Components.CastHint -{ - public ManusyaStop() : base(ActionID.MakeSpell(AID.ManusyaStop), "Applies Manyusa Stop") { } -} +class PraptiSiddhi(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PraptiSiddhi), new AOEShapeRect(40, 2)); +class PrakamyaSiddhi(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PrakamyaSiddhi), new AOEShapeCircle(5)); +class ManusyaConfuse(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.ManusyaConfuse), "Applies Manyusa Confusion"); +class ManusyaStop(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.ManusyaStop), "Applies Manyusa Stop"); class D012SanduruvaStates : StateMachineBuilder { @@ -105,10 +87,8 @@ public D012SanduruvaStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "dhoggpt, Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 783, NameID = 10257)] -public class D012Sanduruva : BossModule +public class D012Sanduruva(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(-258, -26), 20)) { - public D012Sanduruva(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(-258, -26), 20)) { } - public override void CalculateAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { base.CalculateAIHints(slot, actor, assignment, hints); diff --git a/BossMod/Modules/Endwalker/Dungeon/D01TowerOfZot/D013MagusSisters.cs b/BossMod/Modules/Endwalker/Dungeon/D01TowerOfZot/D013MagusSisters.cs index 25fb5ed0d5..19bb96cb4d 100644 --- a/BossMod/Modules/Endwalker/Dungeon/D01TowerOfZot/D013MagusSisters.cs +++ b/BossMod/Modules/Endwalker/Dungeon/D01TowerOfZot/D013MagusSisters.cs @@ -57,18 +57,18 @@ public enum SID : uint Electrocution = 2086, // Minduruva->player, extra=0x0 } -class Dhrupad : BossComponent +class Dhrupad(BossModule module) : BossComponent(module) { private int NumCasts; private bool active; - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.Dhrupad) active = true; } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.ManusyaFire1 or AID.ManusyaBlizzard1 or AID.ManusyaThunder1) { @@ -81,35 +81,32 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (active) hints.Add("3 single target hits + DoTs"); } } -class ManusyaBio : Components.SingleTargetCast -{ - public ManusyaBio() : base(ActionID.MakeSpell(AID.ManusyaBio), "Tankbuster + cleansable poison") { } -} +class ManusyaBio(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.ManusyaBio), "Tankbuster + cleansable poison"); -class Poison : BossComponent +class Poison(BossModule module) : BossComponent(module) { private List _poisoned = []; - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Poison) _poisoned.Add(actor); } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Poison) _poisoned.Remove(actor); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_poisoned.Contains(actor) && !(actor.Role == Role.Healer || actor.Class == Class.BRD)) //theoretically only the tank can ge poisoned, this is just in here incase of bad tanks hints.Add("You were poisoned! Get cleansed fast."); @@ -120,9 +117,9 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint hints.Add($"Cleanse {c.Name} (Poison)"); } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { - base.AddAIHints(module, slot, actor, assignment, hints); + base.AddAIHints(slot, actor, assignment, hints); foreach (var c in _poisoned) { if (_poisoned.Count > 0 && actor.Role == Role.Healer) @@ -133,94 +130,43 @@ public override void AddAIHints(BossModule module, int slot, Actor actor, PartyR } } -class IsitvaSiddhi : Components.SingleTargetCast -{ - public IsitvaSiddhi() : base(ActionID.MakeSpell(AID.IsitvaSiddhi)) { } -} - -class Samsara : Components.RaidwideCast -{ - public Samsara() : base(ActionID.MakeSpell(AID.Samsara)) { } -} - -class DeltaThunderIII1 : Components.LocationTargetedAOEs -{ - public DeltaThunderIII1() : base(ActionID.MakeSpell(AID.DeltaThunderIII1), 3) { } -} - -class DeltaThunderIII2 : Components.LocationTargetedAOEs -{ - public DeltaThunderIII2() : base(ActionID.MakeSpell(AID.DeltaThunderIII2), 5) { } -} - -class DeltaThunderIII3 : Components.SelfTargetedAOEs -{ - public DeltaThunderIII3() : base(ActionID.MakeSpell(AID.DeltaThunderIII3), new AOEShapeRect(40, 5)) { } -} - -class DeltaThunderIII4 : Components.StackWithCastTargets -{ - public DeltaThunderIII4() : base(ActionID.MakeSpell(AID.DeltaThunderIII4), 5) { } -} - -class DeltaBlizzardIII1 : Components.SelfTargetedAOEs -{ - public DeltaBlizzardIII1() : base(ActionID.MakeSpell(AID.DeltaBlizzardIII1), new AOEShapeCone(40.5f, 10.Degrees())) { } -} - -class DeltaBlizzardIII2 : Components.SelfTargetedAOEs -{ - public DeltaBlizzardIII2() : base(ActionID.MakeSpell(AID.DeltaBlizzardIII2), new AOEShapeRect(44, 2)) { } -} - -class DeltaBlizzardIII3 : Components.SelfTargetedAOEs -{ - public DeltaBlizzardIII3() : base(ActionID.MakeSpell(AID.DeltaBlizzardIII3), new AOEShapeCircle(15)) { } -} - -class DeltaFireIII1 : Components.SelfTargetedAOEs -{ - public DeltaFireIII1() : base(ActionID.MakeSpell(AID.DeltaFireIII1), new AOEShapeDonut(5, 40)) { } -} - -class DeltaFireIII2 : Components.SelfTargetedAOEs -{ - public DeltaFireIII2() : base(ActionID.MakeSpell(AID.DeltaFireIII2), new AOEShapeRect(44, 5)) { } -} +class IsitvaSiddhi(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.IsitvaSiddhi)); +class Samsara(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.Samsara)); +class DeltaThunderIII1(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.DeltaThunderIII1), 3); +class DeltaThunderIII2(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.DeltaThunderIII2), 5); +class DeltaThunderIII3(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.DeltaThunderIII3), new AOEShapeRect(40, 5)); +class DeltaThunderIII4(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.DeltaThunderIII4), 5); +class DeltaBlizzardIII1(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.DeltaBlizzardIII1), new AOEShapeCone(40.5f, 10.Degrees())); +class DeltaBlizzardIII2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.DeltaBlizzardIII2), new AOEShapeRect(44, 2)); +class DeltaBlizzardIII3(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.DeltaBlizzardIII3), new AOEShapeCircle(15)); +class DeltaFireIII1(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.DeltaFireIII1), new AOEShapeDonut(5, 40)); +class DeltaFireIII2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.DeltaFireIII2), new AOEShapeRect(44, 5)); +class DeltaFireIII3(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.DeltaFireIII3), 6); +class PraptiSiddhi(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PraptiSiddhi), new AOEShapeRect(40, 2)); -class DeltaFireIII3 : Components.SpreadFromCastTargets -{ - public DeltaFireIII3() : base(ActionID.MakeSpell(AID.DeltaFireIII3), 6) { } -} - -class PraptiSiddhi : Components.SelfTargetedAOEs -{ - public PraptiSiddhi() : base(ActionID.MakeSpell(AID.PraptiSiddhi), new AOEShapeRect(40, 2)) { } -} - -class SphereShatter : Components.GenericAOEs +class SphereShatter(BossModule module) : Components.GenericAOEs(module) { private DateTime _activation; private readonly List _casters = []; private static readonly AOEShapeCircle circle = new(15); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_casters.Count > 0) foreach (var c in _casters) - yield return new(circle, c.Position, activation: _activation); + yield return new(circle, c.Position, default, _activation); } - public override void OnActorCreated(BossModule module, Actor actor) + public override void OnActorCreated(Actor actor) { if ((OID)actor.OID == OID.BerserkerSphere) { _casters.Add(actor); - _activation = module.WorldState.CurrentTime.AddSeconds(7.3f); + _activation = WorldState.FutureTime(7.3f); } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.SphereShatter) { @@ -230,15 +176,8 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn } } -class PrakamyaSiddhi : Components.SelfTargetedAOEs -{ - public PrakamyaSiddhi() : base(ActionID.MakeSpell(AID.PrakamyaSiddhi), new AOEShapeCircle(5)) { } -} - -class ManusyaBlizzardIII : Components.SelfTargetedAOEs -{ - public ManusyaBlizzardIII() : base(ActionID.MakeSpell(AID.ManusyaBlizzardIII2), new AOEShapeCone(40.5f, 10.Degrees())) { } -} +class PrakamyaSiddhi(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PrakamyaSiddhi), new AOEShapeCircle(5)); +class ManusyaBlizzardIII(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ManusyaBlizzardIII2), new AOEShapeCone(40.5f, 10.Degrees())); class D013MagusSistersStates : StateMachineBuilder { @@ -269,17 +208,13 @@ public D013MagusSistersStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "dhoggpt, Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 783, NameID = 10265)] -class D013MagusSisters : BossModule +class D013MagusSisters(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(-27.5f, -49.5f), 20)) { - public D013MagusSisters(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(-27.5f, -49.5f), 20)) { } - protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); - foreach (var s in Enemies(OID.Minduruva)) - Arena.Actor(s, ArenaColor.Enemy); - foreach (var s in Enemies(OID.Sanduruva)) - Arena.Actor(s, ArenaColor.Enemy); + Arena.Actors(Enemies(OID.Minduruva), ArenaColor.Enemy); + Arena.Actors(Enemies(OID.Sanduruva), ArenaColor.Enemy); } public override void CalculateAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) diff --git a/BossMod/Modules/Endwalker/Dungeon/D11LapisManalis/D110AlbusGriffin.cs b/BossMod/Modules/Endwalker/Dungeon/D11LapisManalis/D110AlbusGriffin.cs index 16fe697655..38b13bb414 100644 --- a/BossMod/Modules/Endwalker/Dungeon/D11LapisManalis/D110AlbusGriffin.cs +++ b/BossMod/Modules/Endwalker/Dungeon/D11LapisManalis/D110AlbusGriffin.cs @@ -13,20 +13,9 @@ public enum AID : uint GoldenTalons = 32787, // Boss->self, 4,5s cast, range 8 90-degree cone } -class WindsOfWinter : Components.RaidwideCast -{ - public WindsOfWinter() : base(ActionID.MakeSpell(AID.WindsOfWinter), "Stun Albus Griffin, Raidwide") { } -} - -class GoldenTalons : Components.SelfTargetedAOEs -{ - public GoldenTalons() : base(ActionID.MakeSpell(AID.GoldenTalons), new AOEShapeCone(8, 45.Degrees())) { } -} - -class Freefall : Components.LocationTargetedAOEs -{ - public Freefall() : base(ActionID.MakeSpell(AID.Freefall), 8) { } -} +class WindsOfWinter(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.WindsOfWinter), "Stun Albus Griffin, Raidwide"); +class GoldenTalons(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.GoldenTalons), new AOEShapeCone(8, 45.Degrees())); +class Freefall(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Freefall), 8); class D110AlbusGriffinStates : StateMachineBuilder { @@ -41,7 +30,4 @@ public D110AlbusGriffinStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 896, NameID = 12245)] -public class D110AlbusGriffin : BossModule -{ - public D110AlbusGriffin(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsRect(new(47, -570.5f), 8.5f, 11.5f)) { } -} +public class D110AlbusGriffin(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsRect(new(47, -570.5f), 8.5f, 11.5f)); diff --git a/BossMod/Modules/Endwalker/Dungeon/D11LapisManalis/D110CaladriusMaturus.cs b/BossMod/Modules/Endwalker/Dungeon/D11LapisManalis/D110CaladriusMaturus.cs index 0ad0c2caa7..7de95da70c 100644 --- a/BossMod/Modules/Endwalker/Dungeon/D11LapisManalis/D110CaladriusMaturus.cs +++ b/BossMod/Modules/Endwalker/Dungeon/D11LapisManalis/D110CaladriusMaturus.cs @@ -12,10 +12,7 @@ public enum AID : uint TransonicBlast = 32535, // Caladrius->self, 4,0s cast, range 9 90-degree cone } -class TransonicBlast : Components.SelfTargetedAOEs -{ - public TransonicBlast() : base(ActionID.MakeSpell(AID.TransonicBlast), new AOEShapeCone(9, 45.Degrees())) { } -} +class TransonicBlast(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TransonicBlast), new AOEShapeCone(9, 45.Degrees())); class D110CaladriusMaturusStates : StateMachineBuilder { @@ -28,14 +25,11 @@ public D110CaladriusMaturusStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 896, NameID = 12078)] -public class D110CaladriusMaturus : BossModule +public class D110CaladriusMaturus(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsRect(new(47, -570.5f), 8.5f, 11.5f)) { - public D110CaladriusMaturus(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsRect(new(47, -570.5f), 8.5f, 11.5f)) { } - protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); - foreach (var s in Enemies(OID.Caladrius)) - Arena.Actor(s, ArenaColor.Enemy); + Arena.Actors(Enemies(OID.Caladrius), ArenaColor.Enemy); } } diff --git a/BossMod/Modules/Endwalker/Dungeon/D11LapisManalis/D111Albion.cs b/BossMod/Modules/Endwalker/Dungeon/D11LapisManalis/D111Albion.cs index f18cd21107..c9b82c852c 100644 --- a/BossMod/Modules/Endwalker/Dungeon/D11LapisManalis/D111Albion.cs +++ b/BossMod/Modules/Endwalker/Dungeon/D11LapisManalis/D111Albion.cs @@ -38,7 +38,7 @@ public enum IconID : uint Spreadmarker = 139, // player } -class WildlifeCrossing : Components.GenericAOEs +class WildlifeCrossing(BossModule module) : Components.GenericAOEs(module) { private static readonly AOEShapeRect rect = new(20, 5, 20); private static readonly Angle _rot90 = 90.Degrees(); @@ -58,7 +58,7 @@ private readonly (bool, WPos, Angle, int, DateTime, List)[] stampedePosit ]; private bool Newstampede => stampede1 == default; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (stampede1.active && stampede1.beasts.Count > 0) yield return new(new AOEShapeRect(CalculateStampedeLength(stampede1.beasts) + 30, 5), new(stampede1.beasts.Last().Position.X, stampede1.position.Z), stampede1.rotation); @@ -72,7 +72,7 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, private static float CalculateStampedeLength(List beasts) => (beasts.First().Position - beasts.Last().Position).Length(); - public override void OnEventEnvControl(BossModule module, byte index, uint state) + public override void OnEventEnvControl(byte index, uint state) { if (state == 0x00020001) { @@ -119,14 +119,14 @@ public override void OnEventEnvControl(BossModule module, byte index, uint state } } - public override void Update(BossModule module) + public override void Update() { var stampede1Position = new WPos(24, stampede1.position.Z); var stampede2Position = new WPos(24, stampede2.position.Z); foreach (var oid in new[] { OID.WildBeasts4, OID.WildBeasts3, OID.WildBeasts2, OID.WildBeasts1 }) { - var beasts = module.Enemies(oid); + var beasts = Module.Enemies(oid); foreach (var b in beasts) { if (b.Position.InRect(stampede1Position, stampede1.rotation, 33, 33, 5) && !stampede1.beasts.Contains(b)) @@ -136,13 +136,13 @@ public override void Update(BossModule module) } } - if (stampede1.reset != default && module.WorldState.CurrentTime > stampede1.reset) + if (stampede1.reset != default && WorldState.CurrentTime > stampede1.reset) stampede1 = default; - if (stampede2.reset != default && module.WorldState.CurrentTime > stampede2.reset) + if (stampede2.reset != default && WorldState.CurrentTime > stampede2.reset) stampede2 = default; } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.WildlifeCrossing) { @@ -151,28 +151,28 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent if (MathF.Abs(caster.Position.Z - stampede2.position.Z) < 1) ++stampede2.count; if (stampede1.count == 30) //sometimes stampedes only have 30 instead of 31 hits for some reason, so i take the lower value and add a 0,5s reset timer via update - stampede1.reset = module.WorldState.CurrentTime.AddSeconds(0.5f); + stampede1.reset = WorldState.FutureTime(0.5f); if (stampede2.count == 30) - stampede1.reset = module.WorldState.CurrentTime.AddSeconds(0.5f); + stampede1.reset = WorldState.FutureTime(0.5f); } } } -class IcyThroes : Components.GenericBaitAway +class IcyThroes(BossModule module) : Components.GenericBaitAway(module) { private readonly List _targets = []; - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.Spreadmarker) { - CurrentBaits.Add(new(module.PrimaryActor, actor, new AOEShapeCircle(6))); + CurrentBaits.Add(new(Module.PrimaryActor, actor, new AOEShapeCircle(6))); _targets.Add(actor); CenterAtTarget = true; } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.IcyThroes3) { @@ -181,78 +181,57 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_targets.Contains(actor)) hints.Add("Bait away!"); } } -class Icebreaker : Components.GenericAOEs +class Icebreaker(BossModule module) : Components.GenericAOEs(module) { private readonly List _casters = []; private static readonly AOEShapeCircle circle = new(17); private DateTime _activation; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_casters.Count > 0) foreach (var c in _casters) - yield return new(circle, c.Position, activation: _activation); + yield return new(circle, c.Position, default, _activation); } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.Target) { _casters.Add(actor); - _activation = module.WorldState.CurrentTime.AddSeconds(6); + _activation = WorldState.FutureTime(6); } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.Icebreaker) _activation = spell.NPCFinishAt; } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.Icebreaker) _casters.Clear(); } } -class IcyThroes2 : Components.SelfTargetedAOEs -{ - public IcyThroes2() : base(ActionID.MakeSpell(AID.IcyThroes4), new AOEShapeCircle(6)) { } -} - - -class KnockOnIce : Components.SelfTargetedAOEs -{ - public KnockOnIce() : base(ActionID.MakeSpell(AID.KnockOnIce2), new AOEShapeCircle(5)) { } -} - -class RightSlam : Components.SelfTargetedAOEs -{ - public RightSlam() : base(ActionID.MakeSpell(AID.RightSlam), new AOEShapeRect(20, 80, directionOffset: -90.Degrees())) { } //full width = half width in this case + angle is detected incorrectly, length and width are also switched -} +class IcyThroes2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.IcyThroes4), new AOEShapeCircle(6)); +class KnockOnIce(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.KnockOnIce2), new AOEShapeCircle(5)); +class RightSlam(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RightSlam), new AOEShapeRect(20, 80, directionOffset: -90.Degrees())); //full width = half width in this case + angle is detected incorrectly, length and width are also switched +class LeftSlam(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.LeftSlam), new AOEShapeRect(20, 80, directionOffset: 90.Degrees())); //full width = half width in this case + angle is detected incorrectly, length and width are also switched +class AlbionsEmbrace(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.AlbionsEmbrace)); -class LeftSlam : Components.SelfTargetedAOEs +class RoarOfAlbion(BossModule module) : Components.CastLineOfSightAOE(module, ActionID.MakeSpell(AID.RoarOfAlbion), 60, false) { - public LeftSlam() : base(ActionID.MakeSpell(AID.LeftSlam), new AOEShapeRect(20, 80, directionOffset: 90.Degrees())) { } //full width = half width in this case + angle is detected incorrectly, length and width are also switched -} - -class AlbionsEmbrace : Components.SingleTargetCast -{ - public AlbionsEmbrace() : base(ActionID.MakeSpell(AID.AlbionsEmbrace)) { } -} - -class RoarOfAlbion : Components.CastLineOfSightAOE -{ - public RoarOfAlbion() : base(ActionID.MakeSpell(AID.RoarOfAlbion), 60, false) { } - public override IEnumerable BlockerActors(BossModule module) => module.Enemies(OID.IcyCrystal); + public override IEnumerable BlockerActors() => Module.Enemies(OID.IcyCrystal); } class D111AlbionStates : StateMachineBuilder @@ -273,7 +252,4 @@ public D111AlbionStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 896, NameID = 11992)] -public class D111Albion : BossModule -{ - public D111Albion(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsSquare(new(24, -744), 19.5f)) { } -} +public class D111Albion(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsSquare(new(24, -744), 19.5f)); diff --git a/BossMod/Modules/Endwalker/Dungeon/D11LapisManalis/D112GalateaMagna.cs b/BossMod/Modules/Endwalker/Dungeon/D11LapisManalis/D112GalateaMagna.cs index 7f78fecc69..86776f3f5c 100644 --- a/BossMod/Modules/Endwalker/Dungeon/D11LapisManalis/D112GalateaMagna.cs +++ b/BossMod/Modules/Endwalker/Dungeon/D11LapisManalis/D112GalateaMagna.cs @@ -44,14 +44,14 @@ public enum SID : uint GlassyEyed = 3511, // Boss->player, extra=0x0, takes possession of the player after status ends and does a petrifying attack in all direction } -class ScarecrowChase : Components.GenericAOEs +class ScarecrowChase(BossModule module) : Components.GenericAOEs(module) { private readonly List<(Actor actor, uint icon)> _casters = []; private List _casterssorted = []; private static readonly AOEShapeCross cross = new(40, 5); private DateTime _activation; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { var activation = 3 * (_casters.Count - _casterssorted.Count); if (_casterssorted.Count == 1) @@ -63,19 +63,19 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, } } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { var icon = (IconID)iconID; if (icon >= IconID.Icon1 && icon <= IconID.Icon4) { _casters.Add((actor, iconID)); if (_activation == default) - _activation = module.WorldState.CurrentTime.AddSeconds(9.9f); + _activation = WorldState.FutureTime(9.9f); } _casterssorted = _casters.OrderBy(x => x.icon).Select(x => x.actor).ToList(); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if (_casters.Count > 0 && _casterssorted.Count > 0 && (AID)spell.Action.ID == AID.ScarecrowChase3) { @@ -89,19 +89,17 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn } } -class OutInAOE : Components.ConcentricAOEs +class OutInAOE(BossModule module) : Components.ConcentricAOEs(module, _shapes) { private static readonly AOEShape[] _shapes = [new AOEShapeCircle(10), new AOEShapeDonut(10, 40)]; - public OutInAOE() : base(_shapes) { } - - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.WaxingCycle1) - AddSequence(module.Bounds.Center, spell.NPCFinishAt); + AddSequence(Module.Bounds.Center, spell.NPCFinishAt); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if (Sequences.Count > 0) { @@ -111,24 +109,22 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent AID.WaxingCycle2 => 1, _ => -1 }; - AdvanceSequence(order, caster.Position, module.WorldState.CurrentTime.AddSeconds(2.7f)); + AdvanceSequence(order, caster.Position, WorldState.FutureTime(2.7f)); } } } -class InOutAOE : Components.ConcentricAOEs +class InOutAOE(BossModule module) : Components.ConcentricAOEs(module, _shapes) { private static readonly AOEShape[] _shapes = [new AOEShapeDonut(10, 40), new AOEShapeCircle(10)]; - public InOutAOE() : base(_shapes) { } - - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.WaningCycle1) - AddSequence(module.Bounds.Center, spell.NPCFinishAt); + AddSequence(Module.Bounds.Center, spell.NPCFinishAt); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if (Sequences.Count > 0) { @@ -138,24 +134,24 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent AID.WaningCycle2 => 1, _ => -1 }; - AdvanceSequence(order, caster.Position, module.WorldState.CurrentTime.AddSeconds(2)); + AdvanceSequence(order, caster.Position, WorldState.FutureTime(2)); } } } -class GlassyEyed : Components.GenericGaze +class GlassyEyed(BossModule module) : Components.GenericGaze(module) { private DateTime _activation; private readonly List _affected = []; - public override IEnumerable ActiveEyes(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveEyes(int slot, Actor actor) { foreach (var a in _affected) - if (_affected.Count > 0 && module.WorldState.CurrentTime > _activation.AddSeconds(-10)) + if (_affected.Count > 0 && WorldState.CurrentTime > _activation.AddSeconds(-10)) yield return new(a.Position, _activation); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.GlassyEyed) { @@ -164,19 +160,19 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st } } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.GlassyEyed) _affected.Remove(actor); } } -public class TenebrismTowers : Components.GenericTowers +public class TenebrismTowers(BossModule module) : Components.GenericTowers(module) { private WPos position; - public override void OnEventEnvControl(BossModule module, byte index, uint state) - { + public override void OnEventEnvControl(byte index, uint state) + { if (state == 0x00010008) { switch (index) @@ -198,36 +194,36 @@ public override void OnEventEnvControl(BossModule module, byte index, uint state } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.Burst or AID.BigBurst) Towers.RemoveAll(t => t.Position.AlmostEqual(caster.Position, 1)); } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { if (Towers.Count > 0) hints.AddForbiddenZone(ShapeDistance.InvertedCircle(Towers[0].Position, 6)); } } -class Doom : BossComponent +class Doom(BossModule module) : BossComponent(module) { private readonly List _doomed = []; - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Doom) _doomed.Add(actor); } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Doom) _doomed.Remove(actor); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_doomed.Contains(actor) && !(actor.Role == Role.Healer || actor.Class == Class.BRD)) hints.Add("You were doomed! Get cleansed fast."); @@ -238,9 +234,9 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint hints.Add($"Cleanse {c.Name} (Doom)"); } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { - base.AddAIHints(module, slot, actor, assignment, hints); + base.AddAIHints(slot, actor, assignment, hints); foreach (var c in _doomed) { if (_doomed.Count > 0 && actor.Role == Role.Healer) @@ -251,10 +247,7 @@ public override void AddAIHints(BossModule module, int slot, Actor actor, PartyR } } -class SoulScythe : Components.LocationTargetedAOEs -{ - public SoulScythe() : base(ActionID.MakeSpell(AID.SoulScythe), 18) { } -} +class SoulScythe(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.SoulScythe), 18); class D112GalateaMagnaStates : StateMachineBuilder { @@ -272,7 +265,4 @@ public D112GalateaMagnaStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 896, NameID = 10308)] -public class D112GalateaMagna : BossModule -{ - public D112GalateaMagna(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(350, -394), 19.5f)) { } -} +public class D112GalateaMagna(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(350, -394), 19.5f)); diff --git a/BossMod/Modules/Endwalker/Dungeon/D11LapisManalis/D113Cagnazzo.cs b/BossMod/Modules/Endwalker/Dungeon/D11LapisManalis/D113Cagnazzo.cs index 6290ae7cec..02f22b2304 100644 --- a/BossMod/Modules/Endwalker/Dungeon/D11LapisManalis/D113Cagnazzo.cs +++ b/BossMod/Modules/Endwalker/Dungeon/D11LapisManalis/D113Cagnazzo.cs @@ -57,67 +57,24 @@ public enum NPCYell : uint LimitBreakStart = 15175, } -class VoidTorrent : Components.BaitAwayCast -{ - public VoidTorrent() : base(ActionID.MakeSpell(AID.VoidTorrent), new AOEShapeRect(60, 4)) { } -} - -class VoidTorrentHint : Components.SingleTargetCast -{ - public VoidTorrentHint() : base(ActionID.MakeSpell(AID.VoidTorrent), "Tankbuster cleave") { } -} - -class Voidcleaver : Components.RaidwideCast -{ - public Voidcleaver() : base(ActionID.MakeSpell(AID.Voidcleaver)) { } -} - -class VoidMiasmaBait : Components.BaitAwayTethers -{ - public VoidMiasmaBait() : base(new AOEShapeCone(50, 15.Degrees()), (uint)TetherID.BaitAway) { } -} - -class VoidMiasma : Components.SelfTargetedAOEs -{ - public VoidMiasma() : base(ActionID.MakeSpell(AID.VoidMiasma), new AOEShapeCone(50, 15.Degrees())) { } -} - -class Lifescleaver : Components.SelfTargetedAOEs -{ - public Lifescleaver() : base(ActionID.MakeSpell(AID.Lifescleaver2), new AOEShapeCone(50, 15.Degrees())) { } -} - -class Tsunami : Components.RaidwideAfterNPCYell -{ - public Tsunami() : base(ActionID.MakeSpell(AID.Tsunami), (uint)NPCYell.LimitBreakStart, 4.5f) { } -} - -class StygianDeluge : Components.RaidwideCast -{ - public StygianDeluge() : base(ActionID.MakeSpell(AID.StygianDeluge)) { } -} - -class Antediluvian : Components.SelfTargetedAOEs -{ - public Antediluvian() : base(ActionID.MakeSpell(AID.Antediluvian2), new AOEShapeCircle(15)) { } -} - -class BodySlam : Components.SelfTargetedAOEs -{ - public BodySlam() : base(ActionID.MakeSpell(AID.BodySlam3), new AOEShapeCircle(8)) { } -} - -class BodySlamKB : Components.KnockbackFromCastTarget -{ - public BodySlamKB() : base(ActionID.MakeSpell(AID.BodySlam2), 10) { } -} - -class HydraulicRam : Components.GenericAOEs +class VoidTorrent(BossModule module) : Components.BaitAwayCast(module, ActionID.MakeSpell(AID.VoidTorrent), new AOEShapeRect(60, 4)); +class VoidTorrentHint(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.VoidTorrent), "Tankbuster cleave"); +class Voidcleaver(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.Voidcleaver)); +class VoidMiasmaBait(BossModule module) : Components.BaitAwayTethers(module, new AOEShapeCone(50, 15.Degrees()), (uint)TetherID.BaitAway); +class VoidMiasma(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.VoidMiasma), new AOEShapeCone(50, 15.Degrees())); +class Lifescleaver(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Lifescleaver2), new AOEShapeCone(50, 15.Degrees())); +class Tsunami(BossModule module) : Components.RaidwideAfterNPCYell(module, ActionID.MakeSpell(AID.Tsunami), (uint)NPCYell.LimitBreakStart, 4.5f); +class StygianDeluge(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.StygianDeluge)); +class Antediluvian(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Antediluvian2), new AOEShapeCircle(15)); +class BodySlam(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.BodySlam3), new AOEShapeCircle(8)); +class BodySlamKB(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.BodySlam2), 10); + +class HydraulicRam(BossModule module) : Components.GenericAOEs(module) { private readonly List<(WPos source, AOEShape shape, Angle direction)> _casters = []; private DateTime _activation; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_casters.Count > 0) yield return new(_casters[0].shape, _casters[0].source, _casters[0].direction, _activation, ArenaColor.Danger); @@ -125,7 +82,7 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, yield return new(_casters[i].shape, _casters[i].source, _casters[i].direction, _activation); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.HydraulicRamTelegraph) { @@ -136,73 +93,69 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf _activation = spell.NPCFinishAt.AddSeconds(1.5f); //since these are charges of different length with 0s cast time, the activation times are different for each and there are different patterns, so we just pretend that they all start after the telegraphs end } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if (_casters.Count > 0 && (AID)spell.Action.ID == AID.HydraulicRam2) _casters.RemoveAt(0); } } -class Hydrobomb : Components.GenericAOEs +class Hydrobomb(BossModule module) : Components.GenericAOEs(module) { private readonly List _casters = []; private static readonly AOEShapeCircle circle = new(4); private DateTime _activation; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_casters.Count > 1) for (int i = 0; i < 2; ++i) - yield return new(circle, _casters[i], activation: _activation.AddSeconds(6 - _casters.Count / 2), color: ArenaColor.Danger); + yield return new(circle, _casters[i], default, _activation.AddSeconds(6 - _casters.Count / 2), ArenaColor.Danger); for (int i = 2; i < _casters.Count; ++i) - yield return new(circle, _casters[i], activation: _activation.AddSeconds(MathF.Ceiling(i / 2) + 6 - _casters.Count / 2)); + yield return new(circle, _casters[i], default, _activation.AddSeconds(MathF.Ceiling(i / 2) + 6 - _casters.Count / 2)); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.HydrobombTelegraph) _casters.Add(spell.LocXZ); if ((AID)spell.Action.ID == AID.HydraulicRam) _activation = spell.NPCFinishAt.AddSeconds(2.2f); - } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if (_casters.Count > 0 && (AID)spell.Action.ID == AID.Hydrobomb) _casters.RemoveAt(0); } } -class Hydrovent : Components.LocationTargetedAOEs -{ - public Hydrovent() : base(ActionID.MakeSpell(AID.Hydrovent), 6) { } -} +class Hydrovent(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Hydrovent), 6); -class NeapTide : Components.UniformStackSpread +class NeapTide(BossModule module) : Components.UniformStackSpread(module, 0, 6, alwaysShowSpreads: true) { - public NeapTide() : base(0, 6, alwaysShowSpreads: true) { } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.Spreadmarker) AddSpread(actor); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.NeapTide) Spreads.Clear(); } } -class Stackmarkers : Components.UniformStackSpread //Hydrofall and Springtide, both use the same icon +class Stackmarkers(BossModule module) : Components.UniformStackSpread(module, 6, 0) // Hydrofall and Springtide, both use the same icon { - public Stackmarkers() : base(6, 0) { } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.Stackmarker) AddStack(actor); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.SpringTide or AID.Hydrofall2) Stacks.Clear(); @@ -234,13 +187,11 @@ public D113CagnazzoStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 896, NameID = 11995)] -public class D113Cagnazzo : BossModule +public class D113Cagnazzo(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsSquare(new(-250, 130), 20)) { - public D113Cagnazzo(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsSquare(new(-250, 130), 20)) { } protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); - foreach (var s in Enemies(OID.FearsomeFlotsam)) - Arena.Actor(s, ArenaColor.Enemy); + Arena.Actors(Enemies(OID.FearsomeFlotsam), ArenaColor.Enemy); } } diff --git a/BossMod/Modules/Endwalker/Dungeon/D12Aetherfont/D121Lyngbakr.cs b/BossMod/Modules/Endwalker/Dungeon/D12Aetherfont/D121Lyngbakr.cs index 596f7b9931..d33d137635 100644 --- a/BossMod/Modules/Endwalker/Dungeon/D12Aetherfont/D121Lyngbakr.cs +++ b/BossMod/Modules/Endwalker/Dungeon/D12Aetherfont/D121Lyngbakr.cs @@ -22,7 +22,7 @@ public enum AID : uint Waterspout = 33342, // Helper->player, 5.0s cast, range 5 circle, spread } -class Frequencies : Components.GenericAOEs +class Frequencies(BossModule module) : Components.GenericAOEs(module) { private static readonly AOEShapeCircle smallcircle = new(8); private static readonly AOEShapeCircle bigcircle = new(15); @@ -31,17 +31,17 @@ class Frequencies : Components.GenericAOEs private readonly List _bigcrystals = []; private readonly List _smallcrystals = []; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_smallcrystals.Count > 0) foreach (var c in _smallcrystals) - yield return new(smallcircle, c.Position, activation: _activation1); + yield return new(smallcircle, c.Position, default, _activation1); if (_bigcrystals.Count > 0 && _smallcrystals.Count == 0) foreach (var c in _bigcrystals) - yield return new(bigcircle, c.Position, activation: _activation2); + yield return new(bigcircle, c.Position, default, _activation2); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.ResonantFrequency) { @@ -55,7 +55,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.ResonantFrequency or AID.ExplosiveFrequency) { @@ -65,35 +65,12 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn } } -class SonicBloop : Components.SingleTargetCast -{ - public SonicBloop() : base(ActionID.MakeSpell(AID.SonicBloop)) { } -} - -class Waterspout : Components.SpreadFromCastTargets -{ - public Waterspout() : base(ActionID.MakeSpell(AID.Waterspout), 5) { } -} - -class TidalBreath : Components.SelfTargetedAOEs -{ - public TidalBreath() : base(ActionID.MakeSpell(AID.TidalBreath), new AOEShapeCone(40, 90.Degrees())) { } -} - -class Tidalspout : Components.StackWithCastTargets -{ - public Tidalspout() : base(ActionID.MakeSpell(AID.Tidalspout), 6) { } -} - -class Upsweep : Components.RaidwideCast -{ - public Upsweep() : base(ActionID.MakeSpell(AID.Upsweep)) { } -} - -class BodySlam : Components.RaidwideCast -{ - public BodySlam() : base(ActionID.MakeSpell(AID.BodySlam)) { } -} +class SonicBloop(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.SonicBloop)); +class Waterspout(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.Waterspout), 5); +class TidalBreath(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TidalBreath), new AOEShapeCone(40, 90.Degrees())); +class Tidalspout(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.Tidalspout), 6); +class Upsweep(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.Upsweep)); +class BodySlam(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.BodySlam)); class D121LyngbakrStates : StateMachineBuilder { @@ -111,7 +88,4 @@ public D121LyngbakrStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "dhoggpt, Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 822, NameID = 12336)] -public class D121Lyngbakr : BossModule -{ - public D121Lyngbakr(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(-322, 120), 20)) { } -} +public class D121Lyngbakr(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(-322, 120), 20)); diff --git a/BossMod/Modules/Endwalker/Dungeon/D12Aetherfont/D122Arkas.cs b/BossMod/Modules/Endwalker/Dungeon/D12Aetherfont/D122Arkas.cs index 134b6372b9..4f055b85f7 100644 --- a/BossMod/Modules/Endwalker/Dungeon/D12Aetherfont/D122Arkas.cs +++ b/BossMod/Modules/Endwalker/Dungeon/D12Aetherfont/D122Arkas.cs @@ -37,31 +37,24 @@ public enum IconID : uint Stackmarker = 161, // 39D7/3DC2 } -class Voidzone : BossComponent +class Voidzone(BossModule module) : BossComponent(module) { - public override void OnEventEnvControl(BossModule module, byte index, uint state) + public override void OnEventEnvControl(byte index, uint state) { if (index == 0x00) { if (state == 0x00020001) - module.Arena.Bounds = new ArenaBoundsCircle(new(425, -440), 10); + Module.Arena.Bounds = new ArenaBoundsCircle(new(425, -440), 10); if (state == 0x00080004) - module.Arena.Bounds = new ArenaBoundsCircle(new(425, -440), 14.5f); + Module.Arena.Bounds = new ArenaBoundsCircle(new(425, -440), 14.5f); } } } -class SpunLightning : Components.SelfTargetedAOEs -{ - public SpunLightning() : base(ActionID.MakeSpell(AID.SpunLightning), new AOEShapeRect(30, 4)) { } -} - -class LightningClaw : Components.StackWithIcon -{ - public LightningClaw() : base((uint)IconID.Stackmarker, ActionID.MakeSpell(AID.LightningClaw2), 6, 5.2f, 4) { } -} +class SpunLightning(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.SpunLightning), new AOEShapeRect(30, 4)); +class LightningClaw(BossModule module) : Components.StackWithIcon(module, (uint)IconID.Stackmarker, ActionID.MakeSpell(AID.LightningClaw2), 6, 5.2f, 4); -class ForkedFissures : Components.GenericAOEs +class ForkedFissures(BossModule module) : Components.GenericAOEs(module) { private static readonly WPos[] patternIndex04Start = [new(419.293f, -445.661f), new(422.919f, -448.675f), new(419.359f, -445.715f), new(419.333f, -437.25f), new(432.791f, -434.82f), new(423.239f, -442.489f), new(426.377f, -437.596f), new(419.335f, -445.663f), new(417.162f, -442.421f), new(427.274f, -448.618f), new(430.839f, -441.877f), new(419.292f, -445.596f), new(427.482f, -448.548f), new(419.101f, -434.242f), new(424.274f, -433.427f), new(419.326f, -445.681f)]; private static readonly WPos[] patternIndex04End = [new(420.035f, -454.124f), new(427.42f, -448.692f), new(412.039f, -447.562f), new(417.533f, -427.085f), new(433.860f, -427.97f), new(426.993f, -437.034f), new(433.646f, -433.433f), new(411.276f, -434.165f), new(419.394f, -436.118f), new(430.442f, -453.971f), new(439.872f, -438.59f), new(423.667f, -442.039f), new(431.815f, -441.032f), new(425.437f, -432.547f), new(428.824f, -425.528f), new(424.002f, -448.966f)]; @@ -76,9 +69,9 @@ class ForkedFissures : Components.GenericAOEs private readonly List _patternEnd = []; private readonly List _aoes = []; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => _aoes.Take(16); + public override IEnumerable ActiveAOEs(int slot, Actor actor) => _aoes.Take(16); - public override void OnEventEnvControl(BossModule module, byte index, uint state) + public override void OnEventEnvControl(byte index, uint state) { if (state is 0x00200010 or 0x00020001) { @@ -104,74 +97,31 @@ public override void OnEventEnvControl(BossModule module, byte index, uint state } for (int i = _patternStart.Count - 1; i >= 0; i--) { - _aoes.Add(new(new AOEShapeRect((_patternEnd[i] - _patternStart[i]).Length(), 2), _patternStart[i], Angle.FromDirection(_patternEnd[i] - _patternStart[i]), module.WorldState.CurrentTime.AddSeconds(6))); + _aoes.Add(new(new AOEShapeRect((_patternEnd[i] - _patternStart[i]).Length(), 2), _patternStart[i], Angle.FromDirection(_patternEnd[i] - _patternStart[i]), WorldState.FutureTime(6))); _patternStart.RemoveAt(i); _patternEnd.RemoveAt(i); } } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if (_aoes.Count > 0 && (AID)spell.Action.ID == AID.ForkedFissures) _aoes.RemoveAt(0); } } -class ElectricEruption : Components.RaidwideCast -{ - public ElectricEruption() : base(ActionID.MakeSpell(AID.ElectricEruption)) { } -} - -class Electrify : Components.LocationTargetedAOEs -{ - public Electrify() : base(ActionID.MakeSpell(AID.Electrify), 10) { } -} - -class LightningLeap1 : Components.LocationTargetedAOEs -{ - public LightningLeap1() : base(ActionID.MakeSpell(AID.LightningLeap1), 10) { } -} - -class LightningLeap2 : Components.LocationTargetedAOEs -{ - public LightningLeap2() : base(ActionID.MakeSpell(AID.LightningLeap2), 10) { } -} - -class LightningRampage1 : Components.LocationTargetedAOEs -{ - public LightningRampage1() : base(ActionID.MakeSpell(AID.LightningRampage1), 10) { } -} - -class LightningRampage2 : Components.LocationTargetedAOEs -{ - public LightningRampage2() : base(ActionID.MakeSpell(AID.LightningRampage2), 10) { } -} - -class RipperClaw : Components.SingleTargetCast -{ - public RipperClaw() : base(ActionID.MakeSpell(AID.RipperClaw)) { } -} - -class Shock : Components.LocationTargetedAOEs -{ - public Shock() : base(ActionID.MakeSpell(AID.Shock), 6) { } -} - -class SpinningClaw : Components.SelfTargetedAOEs -{ - public SpinningClaw() : base(ActionID.MakeSpell(AID.SpinningClaw), new AOEShapeCircle(10)) { } -} - -class BattleCry1 : Components.RaidwideCast -{ - public BattleCry1() : base(ActionID.MakeSpell(AID.BattleCry1)) { } -} - -class BattleCry2 : Components.RaidwideCast -{ - public BattleCry2() : base(ActionID.MakeSpell(AID.BattleCry2)) { } -} +class ElectricEruption(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.ElectricEruption)); +class Electrify(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Electrify), 10); +class LightningLeap1(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.LightningLeap1), 10); +class LightningLeap2(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.LightningLeap2), 10); +class LightningRampage1(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.LightningRampage1), 10); +class LightningRampage2(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.LightningRampage2), 10); +class RipperClaw(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.RipperClaw)); +class Shock(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Shock), 6); +class SpinningClaw(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.SpinningClaw), new AOEShapeCircle(10)); +class BattleCry1(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.BattleCry1)); +class BattleCry2(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.BattleCry2)); class D122ArkasStates : StateMachineBuilder { @@ -197,7 +147,4 @@ public D122ArkasStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "dhoggpt, Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 822, NameID = 12337)] -public class D122Arkas : BossModule -{ - public D122Arkas(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(425, -440), 14.5f)) { } -} +public class D122Arkas(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(425, -440), 14.5f)); diff --git a/BossMod/Modules/Endwalker/Dungeon/D12Aetherfont/D123Octomammoth.cs b/BossMod/Modules/Endwalker/Dungeon/D12Aetherfont/D123Octomammoth.cs index 2d13663fa0..f6fc96e826 100644 --- a/BossMod/Modules/Endwalker/Dungeon/D12Aetherfont/D123Octomammoth.cs +++ b/BossMod/Modules/Endwalker/Dungeon/D12Aetherfont/D123Octomammoth.cs @@ -26,7 +26,7 @@ public enum AID : uint Wallop = 33346, // MammothTentacle->self, 3.0s cast, range 22 width 8 rect } -class Border : BossComponent +class Border(BossModule module) : BossComponent(module) { private static readonly float _platformOffset = 25; private static readonly float _platformRadius = 8; @@ -38,90 +38,55 @@ class Border : BossComponent private static readonly Angle _offInner = DirToPointAtDistance(_bridgeInner); private static readonly Angle _offOuter = DirToPointAtDistance(_bridgeOuter); - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { hints.AddForbiddenZone(p => { // union of platforms - var res = _platformCenters.Select(off => ShapeDistance.Circle(module.Bounds.Center + off, _platformRadius)(p)).Min(); + var res = _platformCenters.Select(off => ShapeDistance.Circle(Module.Bounds.Center + off, _platformRadius)(p)).Min(); // union of bridges for (int i = 1; i < 5; ++i) - res = Math.Min(res, ShapeDistance.Rect(module.Bounds.Center + _platformCenters[i - 1], module.Bounds.Center + _platformCenters[i], 3)(p)); + res = Math.Min(res, ShapeDistance.Rect(Module.Bounds.Center + _platformCenters[i - 1], Module.Bounds.Center + _platformCenters[i], 3)(p)); // invert return -res; }); - base.AddAIHints(module, slot, actor, assignment, hints); + base.AddAIHints(slot, actor, assignment, hints); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { // draw platforms foreach (var c in _platformCenters) - arena.AddCircle(module.Bounds.Center + c, _platformRadius, ArenaColor.Border); + Arena.AddCircle(Module.Bounds.Center + c, _platformRadius, ArenaColor.Border); // draw bridges for (int i = 1; i < 5; ++i) { - DrawBridgeLine(arena, module.Bounds.Center, _platformDirections[i - 1], _platformDirections[i], _offInner, _bridgeInner); - DrawBridgeLine(arena, module.Bounds.Center, _platformDirections[i - 1], _platformDirections[i], _offOuter, _bridgeOuter); + DrawBridgeLine(_platformDirections[i - 1], _platformDirections[i], _offInner, _bridgeInner); + DrawBridgeLine(_platformDirections[i - 1], _platformDirections[i], _offOuter, _bridgeOuter); } } private static Angle DirToPointAtDistance(float d) => Angle.Acos((_platformOffset * _platformOffset + d * d - _platformRadius * _platformRadius) / (2 * _platformOffset * d)); - private void DrawBridgeLine(MiniArena arena, WPos center, Angle from, Angle to, Angle offset, float distance) + private void DrawBridgeLine(Angle from, Angle to, Angle offset, float distance) { - var p1 = center + distance * (from + offset).ToDirection(); - var p2 = center + distance * (to - offset).ToDirection(); - arena.AddLine(p1, p2, ArenaColor.Border); + var p1 = Module.Bounds.Center + distance * (from + offset).ToDirection(); + var p2 = Module.Bounds.Center + distance * (to - offset).ToDirection(); + Arena.AddLine(p1, p2, ArenaColor.Border); } } -class Wallop : Components.SelfTargetedAOEs -{ - public Wallop() : base(ActionID.MakeSpell(AID.Wallop), new AOEShapeRect(22, 4)) { } -} - -class VividEyes : Components.SelfTargetedAOEs -{ - public VividEyes() : base(ActionID.MakeSpell(AID.VividEyes), new AOEShapeDonut(20, 26)) { } -} - -class Clearout : Components.SelfTargetedAOEs -{ - public Clearout() : base(ActionID.MakeSpell(AID.Clearout), new AOEShapeCone(16, 60.Degrees())) { } -} - -class TidalBreath : Components.SelfTargetedAOEs -{ - public TidalBreath() : base(ActionID.MakeSpell(AID.TidalBreath), new AOEShapeCone(35, 90.Degrees())) { } -} - -class Breathstroke : Components.SelfTargetedAOEs -{ - public Breathstroke() : base(ActionID.MakeSpell(AID.Breathstroke), new AOEShapeCone(35, 90.Degrees())) { } -} - -class TidalRoar : Components.RaidwideCast -{ - public TidalRoar() : base(ActionID.MakeSpell(AID.TidalRoar)) { } -} - -class WaterDrop : Components.SpreadFromCastTargets -{ - public WaterDrop() : base(ActionID.MakeSpell(AID.WaterDrop), 6) { } -} - -class SalineSpit : Components.SelfTargetedAOEs -{ - public SalineSpit() : base(ActionID.MakeSpell(AID.SalineSpit2), new AOEShapeCircle(8)) { } -} - -class Telekinesis : Components.SelfTargetedAOEs -{ - public Telekinesis() : base(ActionID.MakeSpell(AID.Telekinesis2), new AOEShapeCircle(12)) { } -} +class Wallop(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Wallop), new AOEShapeRect(22, 4)); +class VividEyes(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.VividEyes), new AOEShapeDonut(20, 26)); +class Clearout(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Clearout), new AOEShapeCone(16, 60.Degrees())); +class TidalBreath(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TidalBreath), new AOEShapeCone(35, 90.Degrees())); +class Breathstroke(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Breathstroke), new AOEShapeCone(35, 90.Degrees())); +class TidalRoar(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.TidalRoar)); +class WaterDrop(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.WaterDrop), 6); +class SalineSpit(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.SalineSpit2), new AOEShapeCircle(8)); +class Telekinesis(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Telekinesis2), new AOEShapeCircle(12)); class D123OctomammothStates : StateMachineBuilder { diff --git a/BossMod/Modules/Endwalker/Dungeon/D13LunarSubterrane/D131DarkElf.cs b/BossMod/Modules/Endwalker/Dungeon/D13LunarSubterrane/D131DarkElf.cs index cfbe687f31..fd8a093f70 100644 --- a/BossMod/Modules/Endwalker/Dungeon/D13LunarSubterrane/D131DarkElf.cs +++ b/BossMod/Modules/Endwalker/Dungeon/D13LunarSubterrane/D131DarkElf.cs @@ -30,20 +30,20 @@ public enum SID : uint Doom = 3364, // none->player, extra=0x0 } -class HexingStaves : Components.GenericAOEs +class HexingStaves(BossModule module) : Components.GenericAOEs(module) { private readonly List _staves = new(); private static readonly AOEShapeCross cross = new(40, 4); private DateTime _activation; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { - if (module.FindComponent() != null && !module.FindComponent()!.ActiveAOEs(module, slot, actor).Any()) + if (Module.FindComponent() is var explosion && explosion != null && !explosion.ActiveAOEs(slot, actor).Any()) foreach (var c in _staves) - yield return new(cross, c.Position, c.Rotation, _activation, risky: _activation.AddSeconds(-5) < module.WorldState.CurrentTime); + yield return new(cross, c.Position, c.Rotation, _activation, Risky: _activation.AddSeconds(-5) < WorldState.CurrentTime); } - public override void OnActorModelStateChange(BossModule module, Actor actor, byte modelState, byte animState1, byte animState2) + public override void OnActorModelStateChange(Actor actor, byte modelState, byte animState1, byte animState2) { if ((OID)actor.OID == OID.HexingStaff) { @@ -51,62 +51,47 @@ public override void OnActorModelStateChange(BossModule module, Actor actor, byt { _staves.Add(actor); if (NumCasts == 0) - _activation = module.WorldState.CurrentTime.AddSeconds(8.1f); + _activation = WorldState.FutureTime(8.1f); if (NumCasts == 1) - _activation = module.WorldState.CurrentTime.AddSeconds(25.9f); + _activation = WorldState.FutureTime(25.9f); if (NumCasts > 1) - _activation = module.WorldState.CurrentTime.AddSeconds(32); + _activation = WorldState.FutureTime(32); } if (animState2 == 0) _staves.Remove(actor); } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.RuinousConfluence) ++NumCasts; } } -class StaffSmite : Components.SingleTargetCast -{ - public StaffSmite() : base(ActionID.MakeSpell(AID.StaffSmite)) { } -} +class StaffSmite(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.StaffSmite)); +class VoidDarkII(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.VoidDarkII2), 6); +class Explosion(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Explosion), new AOEShapeRect(4, 4, 4)); +class AbyssalOutburst(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.AbyssalOutburst)); -class VoidDarkII : Components.SpreadFromCastTargets -{ - public VoidDarkII() : base(ActionID.MakeSpell(AID.VoidDarkII2), 6) { } -} - -class Explosion : Components.SelfTargetedAOEs -{ - public Explosion() : base(ActionID.MakeSpell(AID.Explosion), new AOEShapeRect(4, 4, 4)) { } -} - -class AbyssalOutburst : Components.RaidwideCast -{ - public AbyssalOutburst() : base(ActionID.MakeSpell(AID.AbyssalOutburst)) { } -} - -class Doom : BossComponent +class Doom(BossModule module) : BossComponent(module) { private List _doomed = new(); public bool Doomed { get; private set; } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Doom) _doomed.Add(actor); } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Doom) _doomed.Remove(actor); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_doomed.Contains(actor) && !(actor.Role == Role.Healer || actor.Class == Class.BRD)) hints.Add("You were doomed! Get cleansed fast."); @@ -117,9 +102,9 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint hints.Add($"Cleanse {c.Name} (Doom)"); } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { - base.AddAIHints(module, slot, actor, assignment, hints); + base.AddAIHints(slot, actor, assignment, hints); foreach (var c in _doomed) { if (_doomed.Count > 0 && actor.Role == Role.Healer) @@ -145,7 +130,4 @@ public D131DarkElfStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 823, NameID = 12500)] -public class D131DarkElf : BossModule -{ - public D131DarkElf(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsSquare(new(-401, -231), 15.5f)) { } -} +public class D131DarkElf(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsSquare(new(-401, -231), 15.5f)); diff --git a/BossMod/Modules/Endwalker/Dungeon/D13LunarSubterrane/D132DamcyanAntilon.cs b/BossMod/Modules/Endwalker/Dungeon/D13LunarSubterrane/D132DamcyanAntilon.cs index 8b62814c42..14c643c4ad 100644 --- a/BossMod/Modules/Endwalker/Dungeon/D13LunarSubterrane/D132DamcyanAntilon.cs +++ b/BossMod/Modules/Endwalker/Dungeon/D13LunarSubterrane/D132DamcyanAntilon.cs @@ -25,32 +25,30 @@ public enum AID : uint PoundSand = 34443, // Boss->location, 6,0s cast, range 12 circle } -class Sandblast : Components.RaidwideCast -{ - public Sandblast() : base(ActionID.MakeSpell(AID.Sandblast)) { } -} +class Sandblast(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.Sandblast)); -class Voidzone : BossComponent +class Voidzone(BossModule module) : BossComponent(module) { - public override void OnEventEnvControl(BossModule module, byte index, uint state) + public override void OnEventEnvControl(byte index, uint state) { if (state == 0x00020001 && index == 0x00) - module.Arena.Bounds = new ArenaBoundsRect(new(0, 60), 19.5f, 20); + Module.Arena.Bounds = new ArenaBoundsRect(new(0, 60), 19.5f, 20); } } -class Landslip : Components.Knockback +class Landslip(BossModule module) : Components.Knockback(module) { private List _casters = new(); private DateTime _activation; private static readonly AOEShapeRect rect = new(40, 5); - public override IEnumerable Sources(BossModule module, int slot, Actor actor) + public override IEnumerable Sources(int slot, Actor actor) { foreach (var c in _casters) yield return new(c.Position, 20, _activation, rect, c.Rotation, Kind.DirForward); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.Landslip2) { @@ -59,44 +57,33 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.Landslip2) _casters.Remove(caster); } - public override bool DestinationUnsafe(BossModule module, int slot, Actor actor, WPos pos) + public override bool DestinationUnsafe(int slot, Actor actor, WPos pos) { - if (module.FindComponent() != null && module.FindComponent()!.ActiveAOEs(module, slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation))) + if (module.FindComponent() is var towerfall && towerfall != null && towerfall.ActiveAOEs(slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation))) return true; - if (!module.Bounds.Contains(pos)) + if (!Module.Bounds.Contains(pos)) return true; else return false; } } -class EarthenGeyser : Components.StackWithCastTargets -{ - public EarthenGeyser() : base(ActionID.MakeSpell(AID.EarthenGeyser2), 10) { } -} +class EarthenGeyser(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.EarthenGeyser2), 10); +class QuicksandVoidzone(BossModule module) : Components.PersistentVoidzone(module, 10, m => m.Enemies(OID.QuicksandVoidzone).Where(z => z.EventState != 7)); +class PoundSand(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.PoundSand), 12); -class QuicksandVoidzone : Components.PersistentVoidzone -{ - public QuicksandVoidzone() : base(10, m => m.Enemies(OID.QuicksandVoidzone).Where(z => z.EventState != 7)) { } -} - -class PoundSand : Components.LocationTargetedAOEs -{ - public PoundSand() : base(ActionID.MakeSpell(AID.PoundSand), 12) { } -} - -class AntlionMarch : Components.GenericAOEs +class AntlionMarch(BossModule module) : Components.GenericAOEs(module) { private List<(WPos source, AOEShape shape, Angle direction)> _casters = new(); private DateTime _activation; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_casters.Count > 0) yield return new(_casters[0].shape, _casters[0].source, _casters[0].direction, _activation, ArenaColor.Danger); @@ -104,7 +91,7 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, yield return new(_casters[i].shape, _casters[i].source, _casters[i].direction, _activation); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.AntilonMarchTelegraph) { @@ -115,21 +102,21 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf _activation = spell.NPCFinishAt.AddSeconds(0.2f); //since these are charges of different length with 0s cast time, the activation times are different for each and there are different patterns, so we just pretend that they all start after the telegraphs end } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if (_casters.Count > 0 && (AID)spell.Action.ID == AID.AntlionMarch2) _casters.RemoveAt(0); } } -class Towerfall : Components.GenericAOEs +class Towerfall(BossModule module) : Components.GenericAOEs(module) { private List<(WPos source, AOEShape shape, Angle direction, DateTime activation)> _casters = new(); private static readonly AOEShapeRect rect = new(40, 5); private static readonly Angle _rot1 = 89.999f.Degrees(); private static readonly Angle _rot2 = -90.004f.Degrees(); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_casters.Count > 0) yield return new(_casters[0].shape, _casters[0].source, _casters[0].direction, _casters[0].activation); @@ -137,30 +124,30 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, yield return new(_casters[1].shape, _casters[1].source, _casters[1].direction, _casters[1].activation); } - public override void OnEventEnvControl(BossModule module, byte index, uint state) + public override void OnEventEnvControl(byte index, uint state) { if (state == 0x00020001) { if (index == 0x01) - _casters.Add((new WPos(-20, 45), rect, _rot1, module.WorldState.CurrentTime.AddSeconds(13 - _casters.Count))); //timings can vary 1-3 seconds depending on Antilonmarch charges duration, so i took the lowest i could find + _casters.Add((new WPos(-20, 45), rect, _rot1, WorldState.FutureTime(13 - _casters.Count))); // timings can vary 1-3 seconds depending on Antilonmarch charges duration, so i took the lowest i could find if (index == 0x02) - _casters.Add((new WPos(-20, 55), rect, _rot1, module.WorldState.CurrentTime.AddSeconds(13 - _casters.Count))); + _casters.Add((new WPos(-20, 55), rect, _rot1, WorldState.FutureTime(13 - _casters.Count))); if (index == 0x03) - _casters.Add((new WPos(-20, 65), rect, _rot1, module.WorldState.CurrentTime.AddSeconds(13 - _casters.Count))); + _casters.Add((new WPos(-20, 65), rect, _rot1, WorldState.FutureTime(13 - _casters.Count))); if (index == 0x04) - _casters.Add((new WPos(-20, 75), rect, _rot1, module.WorldState.CurrentTime.AddSeconds(13 - _casters.Count))); + _casters.Add((new WPos(-20, 75), rect, _rot1, WorldState.FutureTime(13 - _casters.Count))); if (index == 0x05) - _casters.Add((new WPos(20, 45), rect, _rot2, module.WorldState.CurrentTime.AddSeconds(13 - _casters.Count))); + _casters.Add((new WPos(20, 45), rect, _rot2, WorldState.FutureTime(13 - _casters.Count))); if (index == 0x06) - _casters.Add((new WPos(20, 55), rect, _rot2, module.WorldState.CurrentTime.AddSeconds(13 - _casters.Count))); + _casters.Add((new WPos(20, 55), rect, _rot2, WorldState.FutureTime(13 - _casters.Count))); if (index == 0x07) - _casters.Add((new WPos(20, 65), rect, _rot2, module.WorldState.CurrentTime.AddSeconds(13 - _casters.Count))); + _casters.Add((new WPos(20, 65), rect, _rot2, WorldState.FutureTime(13 - _casters.Count))); if (index == 0x08) - _casters.Add((new WPos(20, 75), rect, _rot2, module.WorldState.CurrentTime.AddSeconds(13 - _casters.Count))); + _casters.Add((new WPos(20, 75), rect, _rot2, WorldState.FutureTime(13 - _casters.Count))); } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.Towerfall) _casters.Clear(); @@ -184,7 +171,4 @@ public D132DamcyanAntilonStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 823, NameID = 12484)] -public class D132DamcyanAntilon : BossModule -{ - public D132DamcyanAntilon(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsRect(new(0, 60), 19.5f, 25)) { } -} +public class D132DamcyanAntilon(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsRect(new(0, 60), 19.5f, 25)); diff --git a/BossMod/Modules/Endwalker/Dungeon/D13LunarSubterrane/D133Durante.cs b/BossMod/Modules/Endwalker/Dungeon/D13LunarSubterrane/D133Durante.cs index 41f6a1f9b1..1b6ac851ce 100644 --- a/BossMod/Modules/Endwalker/Dungeon/D13LunarSubterrane/D133Durante.cs +++ b/BossMod/Modules/Endwalker/Dungeon/D13LunarSubterrane/D133Durante.cs @@ -37,139 +37,99 @@ public enum AID : uint DeathsJourney3 = 35872, // Helper->self, 6,5s cast, range 30 30-degree cone, visual } -class Voidzone : BossComponent +class Voidzone(BossModule module) : BossComponent(module) { - public override void OnEventEnvControl(BossModule module, byte index, uint state) + public override void OnEventEnvControl(byte index, uint state) { if (state == 0x00020001 && index == 0x0A) - module.Arena.Bounds = new ArenaBoundsCircle(new(0, -422), 20); + Module.Arena.Bounds = new ArenaBoundsCircle(new(0, -422), 20); } } -class ArcaneEdge : Components.RaidwideCast -{ - public ArcaneEdge() : base(ActionID.MakeSpell(AID.ArcaneEdge)) { } -} - -class OldMagic : Components.RaidwideCast -{ - public OldMagic() : base(ActionID.MakeSpell(AID.OldMagic)) { } -} - -class Contrapasso : Components.RaidwideCast -{ - public Contrapasso() : base(ActionID.MakeSpell(AID.Contrapasso)) { } -} +class ArcaneEdge(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.ArcaneEdge)); +class OldMagic(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.OldMagic)); +class Contrapasso(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.Contrapasso)); -class DuplicitousBattery : Components.GenericAOEs +class DuplicitousBattery(BossModule module) : Components.GenericAOEs(module) { private List<(WPos source, DateTime activation)> _casters = new(); private static readonly AOEShapeCircle circle = new(5); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_casters.Count > 0) for (int i = 0; i < Math.Clamp(_casters.Count, 1, 16); ++i) - yield return new(circle, _casters[i].source, activation: _casters[i].activation, color: ArenaColor.Danger); + yield return new(circle, _casters[i].source, default, _casters[i].activation, ArenaColor.Danger); if (_casters.Count > 16) for (int i = 16; i < Math.Clamp(_casters.Count, 16, 32); ++i) - yield return new(circle, _casters[i].source, activation: _casters[i].activation, risky: false); + yield return new(circle, _casters[i].source, default, _casters[i].activation, Risky: false); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.DuplicitousBatteryTelegraph) - _casters.Add((spell.LocXZ, module.WorldState.CurrentTime.AddSeconds(6.5f))); + _casters.Add((spell.LocXZ, WorldState.FutureTime(6.5f))); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if (_casters.Count > 0 && (AID)spell.Action.ID == AID.DuplicitousBattery2) _casters.RemoveAt(0); } } -class Explosion : Components.SelfTargetedAOEs -{ - public Explosion() : base(ActionID.MakeSpell(AID.Explosion), new AOEShapeCircle(11)) { } -} - -class Explosion2 : Components.SelfTargetedAOEs -{ - public Explosion2() : base(ActionID.MakeSpell(AID.Explosion2), new AOEShapeCircle(9)) { } -} -class FallenGrace : Components.SpreadFromCastTargets -{ - public FallenGrace() : base(ActionID.MakeSpell(AID.FallenGrace), 6) { } -} +class Explosion(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Explosion), new AOEShapeCircle(11)); +class Explosion2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Explosion2), new AOEShapeCircle(9)); +class FallenGrace(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.FallenGrace), 6); // TODO: create and use generic 'line stack' component -class AntipodalAssault : Components.GenericBaitAway +class AntipodalAssault(BossModule module) : Components.GenericBaitAway(module) { private Actor? target; - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.AntipodalAssaultMarker) { - target = module.WorldState.Actors.Find(spell.MainTargetID); - CurrentBaits.Add(new(module.PrimaryActor, target!, new AOEShapeRect(50, 4))); // the actual range is not 50, but just a charge of 8 width, but always goes until the edge of the arena, so we can simplify it + target = WorldState.Actors.Find(spell.MainTargetID); + CurrentBaits.Add(new(Module.PrimaryActor, target!, new AOEShapeRect(50, 4))); // the actual range is not 50, but just a charge of 8 width, but always goes until the edge of the arena, so we can simplify it } if ((AID)spell.Action.ID == AID.AntipodalAssault2) CurrentBaits.Clear(); } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { if (CurrentBaits.Count > 0 && actor != target) - hints.AddForbiddenZone(ShapeDistance.InvertedRect(module.PrimaryActor.Position, (target!.Position - module.PrimaryActor.Position).Normalized(), 50, 0, 4)); + hints.AddForbiddenZone(ShapeDistance.InvertedRect(Module.PrimaryActor.Position, (target!.Position - Module.PrimaryActor.Position).Normalized(), 50, 0, 4)); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (CurrentBaits.Count > 0) { - if (!actor.Position.InRect(module.PrimaryActor.Position, (target!.Position - module.PrimaryActor.Position).Normalized(), 50, 0, 4)) + if (!actor.Position.InRect(Module.PrimaryActor.Position, (target!.Position - Module.PrimaryActor.Position).Normalized(), 50, 0, 4)) hints.Add("Stack!"); else hints.Add("Stack!", false); } } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { foreach (var bait in CurrentBaits) - bait.Shape.Draw(arena, BaitOrigin(bait), bait.Rotation, ArenaColor.SafeFromAOE); + bait.Shape.Draw(Arena, BaitOrigin(bait), bait.Rotation, ArenaColor.SafeFromAOE); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) { } + public override void DrawArenaForeground(int pcSlot, Actor pc) { } } -class HardSlash : Components.SelfTargetedAOEs -{ - public HardSlash() : base(ActionID.MakeSpell(AID.HardSlash), new AOEShapeCone(50, 45.Degrees())) { } -} - -class TwilightPhase : Components.SelfTargetedAOEs -{ - public TwilightPhase() : base(ActionID.MakeSpell(AID.TwilightPhase2), new AOEShapeRect(30, 10, 30)) { } -} - -class DarkImpact : Components.SelfTargetedAOEs -{ - public DarkImpact() : base(ActionID.MakeSpell(AID.DarkImpact2), new AOEShapeCircle(25)) { } -} - -class DeathsJourney : Components.SelfTargetedAOEs -{ - public DeathsJourney() : base(ActionID.MakeSpell(AID.DeathsJourney), new AOEShapeCircle(8)) { } -} - -class DeathsJourney2 : Components.SelfTargetedAOEs -{ - public DeathsJourney2() : base(ActionID.MakeSpell(AID.DeathsJourney2), new AOEShapeCone(30, 15.Degrees())) { } -} +class HardSlash(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HardSlash), new AOEShapeCone(50, 45.Degrees())); +class TwilightPhase(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TwilightPhase2), new AOEShapeRect(30, 10, 30)); +class DarkImpact(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.DarkImpact2), new AOEShapeCircle(25)); +class DeathsJourney(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.DeathsJourney), new AOEShapeCircle(8)); +class DeathsJourney2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.DeathsJourney2), new AOEShapeCone(30, 15.Degrees())); class D133DuranteStates : StateMachineBuilder { @@ -194,7 +154,4 @@ public D133DuranteStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 823, NameID = 12584)] -class D133Durante : BossModule -{ - public D133Durante(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(0, -422), 23)) { } -} +class D133Durante(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(0, -422), 23)); diff --git a/BossMod/Modules/Endwalker/Extreme/Ex1Zodiark/Adikia.cs b/BossMod/Modules/Endwalker/Extreme/Ex1Zodiark/Adikia.cs index 4ea586de3b..c1fd5cabe7 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex1Zodiark/Adikia.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex1Zodiark/Adikia.cs @@ -1,7 +1,7 @@ namespace BossMod.Endwalker.Extreme.Ex1Zodiark; // state related to adikia mechanic -class Adikia : BossComponent +class Adikia(BossModule module) : BossComponent(module) { private List _casters = new(); @@ -9,25 +9,25 @@ class Adikia : BossComponent public bool Done => _casters.Count == 0; - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_casters.Any(c => _shape.Check(actor.Position, c))) hints.Add("GTFO from side smash aoe!"); } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { foreach (var c in _casters) - _shape.Draw(arena, c); + _shape.Draw(Arena, c); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.AdikiaL or AID.AdikiaR) _casters.Add(caster); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.AdikiaL or AID.AdikiaR) _casters.Remove(caster); diff --git a/BossMod/Modules/Endwalker/Extreme/Ex1Zodiark/Algedon.cs b/BossMod/Modules/Endwalker/Extreme/Ex1Zodiark/Algedon.cs index d67d7857f7..8b9a7c3b5c 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex1Zodiark/Algedon.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex1Zodiark/Algedon.cs @@ -1,7 +1,7 @@ namespace BossMod.Endwalker.Extreme.Ex1Zodiark; // state related to algedon mechanic -class Algedon : BossComponent +class Algedon(BossModule module) : BossComponent(module) { private Actor? _caster; @@ -9,24 +9,24 @@ class Algedon : BossComponent public bool Done => _caster == null; - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_shape.Check(actor.Position, _caster)) hints.Add("GTFO from diagonal aoe!"); } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { - _shape.Draw(arena, _caster); + _shape.Draw(Arena, _caster); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.AlgedonAOE) _caster = caster; } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.AlgedonAOE) _caster = null; diff --git a/BossMod/Modules/Endwalker/Extreme/Ex1Zodiark/Ania.cs b/BossMod/Modules/Endwalker/Extreme/Ex1Zodiark/Ania.cs index 506b7cbbed..045e3a85b3 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex1Zodiark/Ania.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex1Zodiark/Ania.cs @@ -1,7 +1,7 @@ namespace BossMod.Endwalker.Extreme.Ex1Zodiark; // state related to ania mechanic -class Ania : BossComponent +class Ania(BossModule module) : BossComponent(module) { private Actor? _target; @@ -9,51 +9,51 @@ class Ania : BossComponent public bool Done => _target == null; - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_target == null) return; if (actor == _target) { - if (module.Raid.WithoutSlot().InRadiusExcluding(actor, _aoeRadius).Any()) + if (Raid.WithoutSlot().InRadiusExcluding(actor, _aoeRadius).Any()) hints.Add("GTFO from raid!"); - if (module.PrimaryActor.TargetID == _target.InstanceID) + if (Module.PrimaryActor.TargetID == _target.InstanceID) hints.Add("Pass aggro!"); } else { if (actor.Position.InCircle(_target.Position, _aoeRadius)) hints.Add("GTFO from tank!"); - if (actor.Role == Role.Tank && module.PrimaryActor.TargetID != actor.InstanceID) + if (actor.Role == Role.Tank && Module.PrimaryActor.TargetID != actor.InstanceID) hints.Add("Taunt!"); } } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (_target == null) return; - arena.AddCircle(_target.Position, _aoeRadius, ArenaColor.Danger); + Arena.AddCircle(_target.Position, _aoeRadius, ArenaColor.Danger); if (pc == _target) { - foreach (var a in module.Raid.WithoutSlot().Exclude(pc)) - arena.Actor(a, a.Position.InCircle(_target.Position, _aoeRadius) ? ArenaColor.PlayerInteresting : ArenaColor.PlayerGeneric); + foreach (var a in Raid.WithoutSlot().Exclude(pc)) + Arena.Actor(a, a.Position.InCircle(_target.Position, _aoeRadius) ? ArenaColor.PlayerInteresting : ArenaColor.PlayerGeneric); } else { - arena.Actor(_target, ArenaColor.Danger); + Arena.Actor(_target, ArenaColor.Danger); } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.AniaAOE) - _target = module.WorldState.Actors.Find(spell.TargetID); + _target = WorldState.Actors.Find(spell.TargetID); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.AniaAOE) _target = null; diff --git a/BossMod/Modules/Endwalker/Extreme/Ex1Zodiark/AstralEclipse.cs b/BossMod/Modules/Endwalker/Extreme/Ex1Zodiark/AstralEclipse.cs index 043f119795..be61cd8427 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex1Zodiark/AstralEclipse.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex1Zodiark/AstralEclipse.cs @@ -4,7 +4,7 @@ // 'pattern' is a mask containing explosion spots; index is 4 bits, with low 2 bits describing world X position and 2 high bits describing world Z position // so NE corner (X=+1, Z=-1) corresponds to index 0b0010 = 2; S corner (X=0, Z=+1) corresponds to index 0b1001 = 9 and so on (0b11 index is unused) // 'completed' or 'not started' is represented as fully safe (all 0) mask, 'unknown' pattern is represented as fully dangerous (all 1) mask -class AstralEclipse : BossComponent +class AstralEclipse(BossModule module) : BossComponent(module) { private int[] _patterns = new int[3]; // W -> S -> E @@ -12,34 +12,36 @@ class AstralEclipse : BossComponent // transform from 'pattern space' (X goes to the right, Y goes to the bottom) to world space private static readonly float _centerOffset = 14; - private static readonly Vector3[] _basisX = new Vector3[3] { -Vector3.UnitZ, -Vector3.UnitX, Vector3.UnitZ }; - private static readonly Vector3[] _basisY = new Vector3[3] { -Vector3.UnitX, Vector3.UnitZ, Vector3.UnitX }; + private static readonly Vector3[] _basisX = [-Vector3.UnitZ, -Vector3.UnitX, Vector3.UnitZ]; + private static readonly Vector3[] _basisY = [-Vector3.UnitX, Vector3.UnitZ, Vector3.UnitX]; - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { int nextPattern = _patterns.SkipWhile(p => p == 0).FirstOrDefault(); - if (PatternSpots(module, nextPattern).Any(p => _aoe.Check(actor.Position, p))) + if (PatternSpots(nextPattern).Any(p => _aoe.Check(actor.Position, p))) hints.Add("GTFO from explosion!"); + } - if (movementHints != null) - foreach (var (from, to) in EnumMovementHints(module, actor.Position)) - movementHints.Add(from, to, ArenaColor.Safe); + public override void AddMovementHints(int slot, Actor actor, MovementHints movementHints) + { + foreach (var (from, to) in EnumMovementHints(actor.Position)) + movementHints.Add(from, to, ArenaColor.Safe); } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { int nextPattern = _patterns.SkipWhile(p => p == 0).FirstOrDefault(); - foreach (var p in PatternSpots(module, nextPattern)) - _aoe.Draw(arena, p); + foreach (var p in PatternSpots(nextPattern)) + _aoe.Draw(Arena, p); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - foreach (var (from, to) in EnumMovementHints(module, pc.Position)) - arena.AddLine(from, to, ArenaColor.Safe); + foreach (var (from, to) in EnumMovementHints(pc.Position)) + Arena.AddLine(from, to, ArenaColor.Safe); } - public override void OnEventEnvControl(BossModule module, byte index, uint state) + public override void OnEventEnvControl(byte index, uint state) { if (index < 6 || index > 8) return; @@ -68,16 +70,16 @@ private int BuildPattern(int seq, Vector2 safe1, Vector2 safe2) return 0x777 & ~BuildMask(seq, safe1) & ~BuildMask(seq, safe2); } - private IEnumerable PatternSpots(BossModule module, int pattern) + private IEnumerable PatternSpots(int pattern) { if (pattern != 0) for (int z = -1; z <= 1; ++z) for (int x = -1; x <= 1; ++x) if ((pattern & (1 << ((z + 1) * 4 + (x + 1)))) != 0) - yield return module.Bounds.Center + _centerOffset * new WDir(x, z); + yield return Module.Bounds.Center + _centerOffset * new WDir(x, z); } - private IEnumerable<(WPos, WPos)> EnumMovementHints(BossModule module, WPos startingPosition) + private IEnumerable<(WPos, WPos)> EnumMovementHints(WPos startingPosition) { WPos prev = startingPosition; foreach (var p in _patterns.Where(p => p != 0)) @@ -85,7 +87,7 @@ private IEnumerable PatternSpots(BossModule module, int pattern) if (p == 0xFFFF) break; - var next = PatternSpots(module, ~p).MinBy(pos => (pos - prev).LengthSq() + (pos - module.PrimaryActor.Position).LengthSq() * 0.2f); // slightly penalize far positions... + var next = PatternSpots(~p).MinBy(pos => (pos - prev).LengthSq() + (pos - Module.PrimaryActor.Position).LengthSq() * 0.2f); // slightly penalize far positions... yield return (prev, next); prev = next; } diff --git a/BossMod/Modules/Endwalker/Extreme/Ex1Zodiark/Ex1Zodiark.cs b/BossMod/Modules/Endwalker/Extreme/Ex1Zodiark/Ex1Zodiark.cs index db165a7672..a45e6d88fc 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex1Zodiark/Ex1Zodiark.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex1Zodiark/Ex1Zodiark.cs @@ -1,24 +1,12 @@ namespace BossMod.Endwalker.Extreme.Ex1Zodiark; // simple component tracking raidwide cast at the end of intermission -public class Apomnemoneumata : Components.CastCounter -{ - public Apomnemoneumata() : base(ActionID.MakeSpell(AID.ApomnemoneumataNormal)) { } -} +public class Apomnemoneumata(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.ApomnemoneumataNormal)); -public class Phlegethon : Components.LocationTargetedAOEs -{ - public Phlegethon() : base(ActionID.MakeSpell(AID.PhlegetonAOE), 5) { } -} +public class Phlegethon(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.PhlegetonAOE), 5); [ConfigDisplay(Order = 0x010, Parent = typeof(EndwalkerConfig))] -public class Ex1ZodiarkConfig : CooldownPlanningConfigNode -{ - public Ex1ZodiarkConfig() : base(90) { } -} +public class Ex1ZodiarkConfig() : CooldownPlanningConfigNode(90); [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 803, NameID = 10456)] -public class Ex1Zodiark : BossModule -{ - public Ex1Zodiark(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsSquare(new(100, 100), 20)) { } -} +public class Ex1Zodiark(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsSquare(new(100, 100), 20)); diff --git a/BossMod/Modules/Endwalker/Extreme/Ex1Zodiark/Exoterikos.cs b/BossMod/Modules/Endwalker/Extreme/Ex1Zodiark/Exoterikos.cs index 37f6ec9799..2e48209370 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex1Zodiark/Exoterikos.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex1Zodiark/Exoterikos.cs @@ -1,7 +1,7 @@ namespace BossMod.Endwalker.Extreme.Ex1Zodiark; // state related to exoterikos, trimorphos exoterikos and triple esoteric ray mechanics -class Exoterikos : BossComponent +class Exoterikos(BossModule module) : BossComponent(module) { private List<(Actor, AOEShape)> _sources= new(); @@ -11,23 +11,23 @@ class Exoterikos : BossComponent public bool Done => _sources.Count == 0; - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { - if (ActiveSources(module).Any(actShape => actShape.Item2.Check(actor.Position, actShape.Item1))) + if (ActiveSources().Any(actShape => actShape.Item2.Check(actor.Position, actShape.Item1))) hints.Add("GTFO from exo aoe!"); } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { - foreach (var (src, shape) in ActiveSources(module)) - shape.Draw(arena, src); + foreach (var (src, shape) in ActiveSources()) + shape.Draw(Arena, src); } - public override void OnTethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnTethered(Actor source, ActorTetherInfo tether) { // tethers appear much earlier than cast start, but not for all sigils - var target = module.WorldState.Actors.Find(tether.Target); - if (source != module.PrimaryActor || target == null) + var target = WorldState.Actors.Find(tether.Target); + if (source != Module.PrimaryActor || target == null) return; var shape = ShapeForSigil(target); @@ -35,14 +35,14 @@ public override void OnTethered(BossModule module, Actor source, ActorTetherInfo _sources.Add((target, shape)); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { var shape = ShapeForSigil(caster); if (shape != null && !_sources.Any(actShape => actShape.Item1 == caster)) _sources.Add((caster, shape)); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { _sources.RemoveAll(actShape => actShape.Item1 == caster); } @@ -58,13 +58,13 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn }; } - private IEnumerable<(Actor, AOEShape)> ActiveSources(BossModule module) + private IEnumerable<(Actor, AOEShape)> ActiveSources() { bool hadSideSquare = false; // we don't show multiple side-squares, since that would cover whole arena and be useless DateTime lastRay = new(); // we only show first rays, otherwise triple rays would cover whole arena and be useless foreach (var (actor, shape) in _sources) { - if (shape == _aoeSquare && MathF.Abs(actor.Position.X - module.Bounds.Center.X) > 10) + if (shape == _aoeSquare && MathF.Abs(actor.Position.X - Module.Bounds.Center.X) > 10) { if (hadSideSquare) continue; diff --git a/BossMod/Modules/Endwalker/Extreme/Ex1Zodiark/Paradeigma.cs b/BossMod/Modules/Endwalker/Extreme/Ex1Zodiark/Paradeigma.cs index 4a0f1b27e0..0ded5d4920 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex1Zodiark/Paradeigma.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex1Zodiark/Paradeigma.cs @@ -1,7 +1,7 @@ namespace BossMod.Endwalker.Extreme.Ex1Zodiark; // state related to paradeigma and astral flow mechanics -class Paradeigma : BossComponent +class Paradeigma(BossModule module) : BossComponent(module) { public enum FlowDirection { None, CW, CCW } @@ -19,35 +19,35 @@ public enum FlowDirection { None, CW, CCW } private static readonly AOEShapeCircle _behemothAOE = new(15); private static readonly AOEShapeRect _snakeAOE = new(42, 5.5f); - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { - if (RotatedBirds(module).Any(b => _birdAOE.Check(actor.Position, b)) || RotatedBehemoths(module).Any(b => _behemothAOE.Check(actor.Position, b))) + if (RotatedBirds().Any(b => _birdAOE.Check(actor.Position, b)) || RotatedBehemoths().Any(b => _behemothAOE.Check(actor.Position, b))) hints.Add("GTFO from bird/behemoth aoe!"); - if (RotatedSnakes(module).Any(s => _snakeAOE.Check(actor.Position, s.Item1, s.Item2))) + if (RotatedSnakes().Any(s => _snakeAOE.Check(actor.Position, s.Item1, s.Item2))) hints.Add("GTFO from snake aoe!"); - if (_fireLine.Any(c => InFireAOE(module, c, actor.Position))) + if (_fireLine.Any(c => InFireAOE(c, actor.Position))) hints.Add("GTFO from fire aoe!"); } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { - foreach (var b in RotatedBirds(module)) - _birdAOE.Draw(arena, b); - foreach (var b in RotatedBehemoths(module)) - _behemothAOE.Draw(arena, b); - foreach (var s in RotatedSnakes(module)) - _snakeAOE.Draw(arena, s.Item1, s.Item2); + foreach (var b in RotatedBirds()) + _birdAOE.Draw(Arena, b); + foreach (var b in RotatedBehemoths()) + _behemothAOE.Draw(Arena, b); + foreach (var s in RotatedSnakes()) + _snakeAOE.Draw(Arena, s.Item1, s.Item2); foreach (var c in _fireLine) - arena.ZoneTri(module.Bounds.Center + c, RotatedPosition(module, c), module.Bounds.Center, ArenaColor.AOE); + Arena.ZoneTri(Module.Bounds.Center + c, RotatedPosition(c), Module.Bounds.Center, ArenaColor.AOE); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (_fireLine.Count == 2) - arena.AddLine(module.Bounds.Center + _fireLine[0], module.Bounds.Center + _fireLine[1], ArenaColor.Danger); + Arena.AddLine(Module.Bounds.Center + _fireLine[0], Module.Bounds.Center + _fireLine[1], ArenaColor.Danger); } - public override void OnEventEnvControl(BossModule module, byte index, uint state) + public override void OnEventEnvControl(byte index, uint state) { // notable env controls that we don't care too much about: // 1: common for all flows, 00020001 = activate, 00080004 = deactivate @@ -66,12 +66,12 @@ public override void OnEventEnvControl(BossModule module, byte index, uint state switch (state) { case 0x00020001: - _fireLine.Add(new(+module.Bounds.HalfSize, -module.Bounds.HalfSize)); - _fireLine.Add(new(-module.Bounds.HalfSize, +module.Bounds.HalfSize)); + _fireLine.Add(new(+Module.Bounds.HalfSize, -Module.Bounds.HalfSize)); + _fireLine.Add(new(-Module.Bounds.HalfSize, +Module.Bounds.HalfSize)); break; case 0x00400020: - _fireLine.Add(new(-module.Bounds.HalfSize, -module.Bounds.HalfSize)); - _fireLine.Add(new(+module.Bounds.HalfSize, +module.Bounds.HalfSize)); + _fireLine.Add(new(-Module.Bounds.HalfSize, -Module.Bounds.HalfSize)); + _fireLine.Add(new(+Module.Bounds.HalfSize, +Module.Bounds.HalfSize)); break; } } @@ -124,36 +124,36 @@ public override void OnEventEnvControl(BossModule module, byte index, uint state } } - private WPos RotatedPosition(BossModule module, WDir offset) + private WPos RotatedPosition(WDir offset) { return _flow switch { - FlowDirection.CW => module.Bounds.Center + offset.OrthoR(), - FlowDirection.CCW => module.Bounds.Center + offset.OrthoL(), - _ => module.Bounds.Center + offset + FlowDirection.CW => Module.Bounds.Center + offset.OrthoR(), + FlowDirection.CCW => Module.Bounds.Center + offset.OrthoL(), + _ => Module.Bounds.Center + offset }; } - private (WPos, Angle) RotatedPosRot(BossModule module, (WDir, Angle) posRot) + private (WPos, Angle) RotatedPosRot((WDir, Angle) posRot) { return _flow switch { - FlowDirection.CW => (module.Bounds.Center + posRot.Item1.OrthoR(), posRot.Item2 - 90.Degrees()), - FlowDirection.CCW => (module.Bounds.Center + posRot.Item1.OrthoL(), posRot.Item2 + 90.Degrees()), - _ => (module.Bounds.Center + posRot.Item1, posRot.Item2) + FlowDirection.CW => (Module.Bounds.Center + posRot.Item1.OrthoR(), posRot.Item2 - 90.Degrees()), + FlowDirection.CCW => (Module.Bounds.Center + posRot.Item1.OrthoL(), posRot.Item2 + 90.Degrees()), + _ => (Module.Bounds.Center + posRot.Item1, posRot.Item2) }; } - private IEnumerable RotatedBirds(BossModule module) => _birds.Select(x => RotatedPosition(module, x)); - private IEnumerable RotatedBehemoths(BossModule module) => _behemoths.Select(x => RotatedPosition(module, x)); - private IEnumerable<(WPos, Angle)> RotatedSnakes(BossModule module) => _snakes.Select(x => RotatedPosRot(module, x)); + private IEnumerable RotatedBirds() => _birds.Select(RotatedPosition); + private IEnumerable RotatedBehemoths() => _behemoths.Select(RotatedPosition); + private IEnumerable<(WPos, Angle)> RotatedSnakes() => _snakes.Select(RotatedPosRot); - private bool InFireAOE(BossModule module, WDir corner, WPos pos) + private bool InFireAOE(WDir corner, WPos pos) { - var p1 = module.Bounds.Center + corner; - var p2 = RotatedPosition(module, corner); + var p1 = Module.Bounds.Center + corner; + var p2 = RotatedPosition(corner); var pMid = WPos.Lerp(p1, p2, 0.5f); - var dirMid = (pMid - module.Bounds.Center).Normalized(); - return pos.InCone(module.Bounds.Center, dirMid, 45.Degrees()); + var dirMid = (pMid - Module.Bounds.Center).Normalized(); + return pos.InCone(Module.Bounds.Center, dirMid, 45.Degrees()); } } diff --git a/BossMod/Modules/Endwalker/Extreme/Ex1Zodiark/Styx.cs b/BossMod/Modules/Endwalker/Extreme/Ex1Zodiark/Styx.cs index bbf0010c14..9aad1e5c1c 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex1Zodiark/Styx.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex1Zodiark/Styx.cs @@ -1,18 +1,16 @@ namespace BossMod.Endwalker.Extreme.Ex1Zodiark; -class Styx : Components.UniformStackSpread +class Styx(BossModule module) : Components.UniformStackSpread(module, 5, 0, 8) { public int NumCasts { get; private set; } - public Styx() : base(5, 0, 8) { } - - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.StyxAOE) ++NumCasts; } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.Styx) AddStack(actor); diff --git a/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/Aureole.cs b/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/Aureole.cs index 6477599170..3b5eca8974 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/Aureole.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/Aureole.cs @@ -6,24 +6,24 @@ class Aureole : BossComponent public bool Done { get; private set; } private AOEShapeCone _aoe = new(40, 75.Degrees()); - public override void Init(BossModule module) + public Aureole(BossModule module) : base(module) { - _aoe.DirectionOffset = (AID)(module.PrimaryActor.CastInfo?.Action.ID ?? 0) is AID.LateralAureole1 or AID.LateralAureole2 ? -90.Degrees() : 0.Degrees(); + _aoe.DirectionOffset = (AID)(Module.PrimaryActor.CastInfo?.Action.ID ?? 0) is AID.LateralAureole1 or AID.LateralAureole2 ? -90.Degrees() : 0.Degrees(); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { - if (_aoe.Check(actor.Position, module.PrimaryActor) || _aoe.Check(actor.Position, module.PrimaryActor.Position, module.PrimaryActor.Rotation + 180.Degrees())) + if (_aoe.Check(actor.Position, Module.PrimaryActor) || _aoe.Check(actor.Position, Module.PrimaryActor.Position, Module.PrimaryActor.Rotation + 180.Degrees())) hints.Add("GTFO from aoe!"); } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { - _aoe.Draw(arena, module.PrimaryActor); - _aoe.Draw(arena, module.PrimaryActor.Position, module.PrimaryActor.Rotation + 180.Degrees()); + _aoe.Draw(Arena, Module.PrimaryActor); + _aoe.Draw(Arena, Module.PrimaryActor.Position, Module.PrimaryActor.Rotation + 180.Degrees()); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.Aureole1AOE or AID.Aureole2AOE or AID.LateralAureole1AOE or AID.LateralAureole2AOE) Done = true; diff --git a/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/Crystallize.cs b/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/Crystallize.cs index be550cb9ab..ccead10c14 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/Crystallize.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/Crystallize.cs @@ -9,9 +9,9 @@ public enum Element { None, Water, Earth, Ice } private static readonly float _earthRadius = 6; private static readonly float _iceRadius = 5; - public override void Init(BossModule module) + public Crystallize(BossModule module) : base(module) { - CurElement = (AID)(module.PrimaryActor.CastInfo?.Action.ID ?? 0) switch + CurElement = (AID)(Module.PrimaryActor.CastInfo?.Action.ID ?? 0) switch { AID.CrystallizeSwordStaffWater or AID.CrystallizeChakramWater => Element.Water, AID.CrystallizeStaffEarth or AID.CrystallizeChakramEarth => Element.Earth, @@ -19,32 +19,32 @@ public override void Init(BossModule module) _ => Element.None }; if (CurElement == Element.None) - module.ReportError(this, $"Unexpected boss cast {module.PrimaryActor.CastInfo?.Action.ID ?? 0}"); + ReportError($"Unexpected boss cast {Module.PrimaryActor.CastInfo?.Action.ID ?? 0}"); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { switch (CurElement) { case Element.Water: - int healersInRange = module.Raid.WithoutSlot().Where(a => a.Role == Role.Healer).InRadius(actor.Position, _waterRadius).Count(); + int healersInRange = Raid.WithoutSlot().Where(a => a.Role == Role.Healer).InRadius(actor.Position, _waterRadius).Count(); if (healersInRange > 1) hints.Add("Hit by two aoes!"); else if (healersInRange == 0) hints.Add("Stack with healer!"); break; case Element.Earth: - if (module.Raid.WithoutSlot().OutOfRadius(actor.Position, _earthRadius).Any()) + if (Raid.WithoutSlot().OutOfRadius(actor.Position, _earthRadius).Any()) hints.Add("Stack!"); break; case Element.Ice: - if (module.Raid.WithoutSlot().InRadiusExcluding(actor, _iceRadius).Any()) + if (Raid.WithoutSlot().InRadiusExcluding(actor, _iceRadius).Any()) hints.Add("Spread!"); break; } } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { string hint = CurElement switch { @@ -57,41 +57,41 @@ public override void AddGlobalHints(BossModule module, GlobalHints hints) hints.Add(hint); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { switch (CurElement) { case Element.Water: - foreach (var player in module.Raid.WithoutSlot()) + foreach (var player in Raid.WithoutSlot()) { if (player.Role == Role.Healer) { - arena.Actor(player, ArenaColor.Danger); - arena.AddCircle(player.Position, _waterRadius, ArenaColor.Safe); + Arena.Actor(player, ArenaColor.Danger); + Arena.AddCircle(player.Position, _waterRadius, ArenaColor.Safe); } else { - arena.Actor(player, ArenaColor.PlayerGeneric); + Arena.Actor(player, ArenaColor.PlayerGeneric); } } break; case Element.Earth: - arena.AddCircle(pc.Position, _earthRadius, ArenaColor.Safe); - foreach (var player in module.Raid.WithoutSlot().Exclude(pc)) - arena.Actor(player, player.Position.InCircle(pc.Position, _earthRadius) ? ArenaColor.PlayerInteresting : ArenaColor.PlayerGeneric); + Arena.AddCircle(pc.Position, _earthRadius, ArenaColor.Safe); + foreach (var player in Raid.WithoutSlot().Exclude(pc)) + Arena.Actor(player, player.Position.InCircle(pc.Position, _earthRadius) ? ArenaColor.PlayerInteresting : ArenaColor.PlayerGeneric); break; case Element.Ice: - arena.AddCircle(pc.Position, _iceRadius, ArenaColor.Danger); - foreach (var player in module.Raid.WithoutSlot().Exclude(pc)) - arena.Actor(player, player.Position.InCircle(pc.Position, _iceRadius) ? ArenaColor.PlayerInteresting : ArenaColor.PlayerGeneric); + Arena.AddCircle(pc.Position, _iceRadius, ArenaColor.Danger); + foreach (var player in Raid.WithoutSlot().Exclude(pc)) + Arena.Actor(player, player.Position.InCircle(pc.Position, _iceRadius) ? ArenaColor.PlayerInteresting : ArenaColor.PlayerGeneric); break; } } // note: this is pure validation, we currently rely on crystallize cast id to determine element... - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { - if (actor != module.PrimaryActor || (SID)status.ID != SID.CrystallizeElement) + if (actor != Module.PrimaryActor || (SID)status.ID != SID.CrystallizeElement) return; var element = status.Extra switch @@ -102,10 +102,10 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st _ => Element.None }; if (element == Element.None || element != CurElement) - module.ReportError(this, $"Unexpected extra of element buff: {status.Extra:X4}, cur element {CurElement}"); + ReportError($"Unexpected extra of element buff: {status.Extra:X4}, cur element {CurElement}"); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if (CurElement == Element.None) return; @@ -122,7 +122,7 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent return; if (element != CurElement) - module.ReportError(this, $"Unexpected element cast: got {spell.Action}, expected {CurElement}"); + ReportError($"Unexpected element cast: got {spell.Action}, expected {CurElement}"); CurElement = Element.None; } } diff --git a/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/Echoes.cs b/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/Echoes.cs index 8982392b03..370ecb2fdc 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/Echoes.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/Echoes.cs @@ -1,18 +1,16 @@ namespace BossMod.Endwalker.Extreme.Ex2Hydaelyn; -class Echoes : Components.UniformStackSpread +class Echoes(BossModule module) : Components.UniformStackSpread(module, 6, 0, 8) { public int NumCasts { get; private set; } - public Echoes() : base(6, 0, 8) { } - - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.EchoesAOE) ++NumCasts; } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.Echoes) AddStack(actor); diff --git a/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/Ex2Hydaelyn.cs b/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/Ex2Hydaelyn.cs index a2c0a4d0fb..79c4ac8a14 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/Ex2Hydaelyn.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/Ex2Hydaelyn.cs @@ -1,31 +1,16 @@ namespace BossMod.Endwalker.Extreme.Ex2Hydaelyn; // state related to mousa scorn mechanic (shared tankbuster) -class MousaScorn : Components.CastSharedTankbuster -{ - public MousaScorn() : base(ActionID.MakeSpell(AID.MousaScorn), 4) { } -} +class MousaScorn(BossModule module) : Components.CastSharedTankbuster(module, ActionID.MakeSpell(AID.MousaScorn), 4); // cast counter for pre-intermission AOE -class PureCrystal : Components.CastCounter -{ - public PureCrystal() : base(ActionID.MakeSpell(AID.PureCrystal)) { } -} +class PureCrystal(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.PureCrystal)); // cast counter for post-intermission AOE -class Exodus : Components.CastCounter -{ - public Exodus() : base(ActionID.MakeSpell(AID.Exodus)) { } -} +class Exodus(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.Exodus)); [ConfigDisplay(Order = 0x020, Parent = typeof(EndwalkerConfig))] -public class Ex2HydaelynConfig : CooldownPlanningConfigNode -{ - public Ex2HydaelynConfig() : base(90) { } -} +public class Ex2HydaelynConfig() : CooldownPlanningConfigNode(90); [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 791, NameID = 10453)] -public class Ex2Hydaelyn : BossModule -{ - public Ex2Hydaelyn(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { } -} +public class Ex2Hydaelyn(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)); diff --git a/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/HerosSundering.cs b/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/HerosSundering.cs index 963ed9f58b..c0da3461f3 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/HerosSundering.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/HerosSundering.cs @@ -7,24 +7,24 @@ class HerosSundering : BossComponent private static readonly AOEShapeCone _aoeShape = new(40, 45.Degrees()); - public override void Init(BossModule module) + public HerosSundering(BossModule module) : base(module) { - _target = module.WorldState.Actors.Find(module.PrimaryActor.CastInfo?.TargetID ?? 0); + _target = WorldState.Actors.Find(Module.PrimaryActor.CastInfo?.TargetID ?? 0); if (_target == null) - module.ReportError(this, $"Failed to determine target for heros sundering: {module.PrimaryActor.CastInfo?.TargetID:X}"); + ReportError($"Failed to determine target for heros sundering: {Module.PrimaryActor.CastInfo?.TargetID:X}"); } - public override void Update(BossModule module) + public override void Update() { _otherHit.Reset(); if (_target != null) { - var dir = Angle.FromDirection(_target.Position - module.PrimaryActor.Position); - _otherHit = module.Raid.WithSlot().Exclude(_target).InShape(_aoeShape, module.PrimaryActor.Position, dir).Mask(); + var dir = Angle.FromDirection(_target.Position - Module.PrimaryActor.Position); + _otherHit = Raid.WithSlot().Exclude(_target).InShape(_aoeShape, Module.PrimaryActor.Position, dir).Mask(); } } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_target == null) return; @@ -41,22 +41,22 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { if (_target != null) - _aoeShape.Draw(arena, module.PrimaryActor.Position, Angle.FromDirection(_target.Position - module.PrimaryActor.Position)); + _aoeShape.Draw(Arena, Module.PrimaryActor.Position, Angle.FromDirection(_target.Position - Module.PrimaryActor.Position)); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (pc == _target) { - foreach (var (slot, player) in module.Raid.WithSlot().Exclude(_target)) - arena.Actor(player, _otherHit[slot] ? ArenaColor.PlayerInteresting : ArenaColor.PlayerGeneric); + foreach (var (slot, player) in Raid.WithSlot().Exclude(_target)) + Arena.Actor(player, _otherHit[slot] ? ArenaColor.PlayerInteresting : ArenaColor.PlayerGeneric); } else { - arena.Actor(_target, ArenaColor.Danger); + Arena.Actor(_target, ArenaColor.Danger); } } } diff --git a/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/InfralateralArc.cs b/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/InfralateralArc.cs index df9f84612a..3221e64dee 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/InfralateralArc.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/InfralateralArc.cs @@ -1,26 +1,24 @@ namespace BossMod.Endwalker.Extreme.Ex2Hydaelyn; // component for infralateral arc mechanic (role stacks) -class InfralateralArc : Components.CastCounter +class InfralateralArc(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.InfralateralArcAOE)) { private static readonly Angle _coneHalfAngle = 45.Degrees(); - public InfralateralArc() : base(ActionID.MakeSpell(AID.InfralateralArcAOE)) { } - - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { var pcRole = EffectiveRole(actor); - var pcDir = Angle.FromDirection(actor.Position - module.PrimaryActor.Position); - if (module.Raid.WithoutSlot().Any(a => EffectiveRole(a) != pcRole && a.Position.InCone(module.PrimaryActor.Position, pcDir, _coneHalfAngle))) + var pcDir = Angle.FromDirection(actor.Position - Module.PrimaryActor.Position); + if (Raid.WithoutSlot().Any(a => EffectiveRole(a) != pcRole && a.Position.InCone(Module.PrimaryActor.Position, pcDir, _coneHalfAngle))) hints.Add("Spread by roles!"); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { var pcRole = EffectiveRole(pc); - var pcDir = Angle.FromDirection(pc.Position - module.PrimaryActor.Position); - foreach (var actor in module.Raid.WithoutSlot().Where(a => EffectiveRole(a) != pcRole)) - arena.Actor(actor, actor.Position.InCone(module.PrimaryActor.Position, pcDir, _coneHalfAngle) ? ArenaColor.Danger : ArenaColor.PlayerGeneric); + var pcDir = Angle.FromDirection(pc.Position - Module.PrimaryActor.Position); + foreach (var actor in Raid.WithoutSlot().Where(a => EffectiveRole(a) != pcRole)) + Arena.Actor(actor, actor.Position.InCone(Module.PrimaryActor.Position, pcDir, _coneHalfAngle) ? ArenaColor.Danger : ArenaColor.PlayerGeneric); } private Role EffectiveRole(Actor a) => a.Role == Role.Ranged ? Role.Melee : a.Role; diff --git a/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/IntermissionAdds.cs b/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/IntermissionAdds.cs index 18cbcab5b1..a04930d91f 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/IntermissionAdds.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/IntermissionAdds.cs @@ -1,31 +1,31 @@ namespace BossMod.Endwalker.Extreme.Ex2Hydaelyn; // component for intermission adds (crystals & echoes) -class IntermissionAdds : BossComponent +class IntermissionAdds(BossModule module) : BossComponent(module) { private HashSet _activeCrystals = new(); - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - foreach (var echo in module.Enemies(OID.Echo)) - arena.Actor(echo, ArenaColor.Enemy); + foreach (var echo in Module.Enemies(OID.Echo)) + Arena.Actor(echo, ArenaColor.Enemy); // note that there are two crystals per position, one targetable and one not - untargetable one can be tethered to second echo - foreach (var crystal in module.Enemies(OID.CrystalOfLight)) + foreach (var crystal in Module.Enemies(OID.CrystalOfLight)) { if (crystal.IsTargetable && !crystal.IsDead) { bool isActive = _activeCrystals.Contains(crystal.InstanceID); - arena.Actor(crystal, isActive ? ArenaColor.Danger : ArenaColor.PlayerGeneric); + Arena.Actor(crystal, isActive ? ArenaColor.Danger : ArenaColor.PlayerGeneric); } - var tether = module.WorldState.Actors.Find(crystal.Tether.Target); + var tether = WorldState.Actors.Find(crystal.Tether.Target); if (tether != null) - arena.AddLine(crystal.Position, tether.Position, ArenaColor.Danger); + Arena.AddLine(crystal.Position, tether.Position, ArenaColor.Danger); } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.IncreaseConviction) _activeCrystals.Add(caster.InstanceID); diff --git a/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/Lightwave1.cs b/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/Lightwave1.cs index 296089ef38..6c30b0bd15 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/Lightwave1.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/Lightwave1.cs @@ -2,19 +2,19 @@ // component for first lightwave (2 waves, 4 crystals) mechanic // first we wait until we find two helpers with Z=70 - these are our lightwaves -class Lightwave1 : LightwaveCommon +class Lightwave1(BossModule module) : LightwaveCommon(module) { private WPos _safeCrystal; private WPos _firstHitCrystal; private WPos _secondHitCrystal; private WPos _thirdHitCrystal; - public override void Update(BossModule module) + public override void Update() { // try to find two helpers with Z=70 before first cast if (Waves.Count == 0) { - foreach (var wave in module.Enemies(OID.Helper).Where(a => a.Position.Z < 71)) + foreach (var wave in Module.Enemies(OID.Helper).Where(a => a.Position.Z < 71)) { Waves.Add(wave); } @@ -30,7 +30,7 @@ public override void Update(BossModule module) } } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (Waves.Count == 0) return; @@ -49,26 +49,26 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint hints.Add("Hide behind crystal!"); } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { if (Waves.Count == 0) return; foreach (var wave in Waves) - WaveAOE.Draw(arena, wave); + WaveAOE.Draw(Arena, wave); switch (NumCasts) { case 0: - DrawSafeCone(arena, _firstHitCrystal, _safeCrystal); + DrawSafeCone(_firstHitCrystal, _safeCrystal); break; case 1: - DrawSafeCone(arena, _secondHitCrystal, _safeCrystal); + DrawSafeCone(_secondHitCrystal, _safeCrystal); break; case 2: - DrawSafeCone(arena, _thirdHitCrystal, _safeCrystal); - DrawSafeCone(arena, _thirdHitCrystal, _firstHitCrystal); - DrawSafeCone(arena, _thirdHitCrystal, _secondHitCrystal); + DrawSafeCone(_thirdHitCrystal, _safeCrystal); + DrawSafeCone(_thirdHitCrystal, _firstHitCrystal); + DrawSafeCone(_thirdHitCrystal, _secondHitCrystal); break; } } diff --git a/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/Lightwave2.cs b/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/Lightwave2.cs index a04100ca37..67ec580b25 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/Lightwave2.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/Lightwave2.cs @@ -1,7 +1,7 @@ namespace BossMod.Endwalker.Extreme.Ex2Hydaelyn; // component for second lightwave (3 waves, 5 crystals) + hero's glory mechanics -class Lightwave2 : LightwaveCommon +class Lightwave2(BossModule module) : LightwaveCommon(module) { private WPos _safeCrystal; private Vector4? _safeCrystalOrigin; @@ -13,18 +13,18 @@ class Lightwave2 : LightwaveCommon private static readonly WPos _crystalBR = new(110, 110); private static readonly AOEShapeCone _gloryAOE = new(40, 90.Degrees()); - public override void Update(BossModule module) + public override void Update() { - if (NumCasts == 4 && (module.PrimaryActor.CastInfo?.IsSpell(AID.HerosGlory) ?? false) && module.PrimaryActor.PosRot != _safeCrystalOrigin) + if (NumCasts == 4 && (Module.PrimaryActor.CastInfo?.IsSpell(AID.HerosGlory) ?? false) && Module.PrimaryActor.PosRot != _safeCrystalOrigin) { - _safeCrystalOrigin = module.PrimaryActor.PosRot; - _safeCrystal = new[] { _crystalTL, _crystalTR, _crystalBL, _crystalBR }.FirstOrDefault(c => !_gloryAOE.Check(c, module.PrimaryActor)); + _safeCrystalOrigin = Module.PrimaryActor.PosRot; + _safeCrystal = new[] { _crystalTL, _crystalTR, _crystalBL, _crystalBR }.FirstOrDefault(c => !_gloryAOE.Check(c, Module.PrimaryActor)); } } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { - if ((module.PrimaryActor.CastInfo?.IsSpell(AID.HerosGlory) ?? false) && _gloryAOE.Check(actor.Position, module.PrimaryActor)) + if ((Module.PrimaryActor.CastInfo?.IsSpell(AID.HerosGlory) ?? false) && _gloryAOE.Check(actor.Position, Module.PrimaryActor)) hints.Add("GTFO from glory aoe!"); (bool inWave, bool inSafeCone) = NumCasts < 4 @@ -37,23 +37,23 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint hints.Add("Hide behind crystal!"); } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { - if (module.PrimaryActor.CastInfo?.IsSpell(AID.HerosGlory) ?? false) - _gloryAOE.Draw(arena, module.PrimaryActor); + if (Module.PrimaryActor.CastInfo?.IsSpell(AID.HerosGlory) ?? false) + _gloryAOE.Draw(Arena, Module.PrimaryActor); if (NumCasts < 4) { - WaveAOE.Draw(arena, Wave1Pos(), 0.Degrees()); - WaveAOE.Draw(arena, Wave2Pos(), 0.Degrees()); - DrawSafeCone(arena, NextSideCrystal(), _crystalCenter); + WaveAOE.Draw(Arena, Wave1Pos(), 0.Degrees()); + WaveAOE.Draw(Arena, Wave2Pos(), 0.Degrees()); + DrawSafeCone(NextSideCrystal(), _crystalCenter); } else { - WaveAOE.Draw(arena, Wave3Pos(), 0.Degrees()); + WaveAOE.Draw(Arena, Wave3Pos(), 0.Degrees()); if (_safeCrystal != new WPos()) { - DrawSafeCone(arena, _crystalCenter, _safeCrystal); + DrawSafeCone(_crystalCenter, _safeCrystal); } } } diff --git a/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/Lightwave3.cs b/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/Lightwave3.cs index bdb64dd485..decd18a3f0 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/Lightwave3.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/Lightwave3.cs @@ -1,21 +1,21 @@ namespace BossMod.Endwalker.Extreme.Ex2Hydaelyn; // component for third lightwave (safe zone) -class Lightwave3 : LightwaveCommon +class Lightwave3(BossModule module) : LightwaveCommon(module) { - public override void Update(BossModule module) + public override void Update() { // try to find two helpers with Z=70 before first cast if (Waves.Count == 0) { - foreach (var wave in module.Enemies(OID.Helper).Where(IsInitialLightwave)) + foreach (var wave in Module.Enemies(OID.Helper).Where(IsInitialLightwave)) { Waves.Add(wave); } } } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (Waves.Count == 0) return; @@ -24,13 +24,13 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint hints.Add("GTFO from wave!"); } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { if (Waves.Count == 0) return; foreach (var wave in Waves) - WaveAOE.Draw(arena, wave); + WaveAOE.Draw(Arena, wave); } private bool IsInitialLightwave(Actor a) diff --git a/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/LightwaveCommon.cs b/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/LightwaveCommon.cs index 5bf36b8da9..1a9926b619 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/LightwaveCommon.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/LightwaveCommon.cs @@ -1,18 +1,16 @@ namespace BossMod.Endwalker.Extreme.Ex2Hydaelyn; // common base for lightwaves components -class LightwaveCommon : Components.CastCounter +class LightwaveCommon(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.LightOfTheCrystal)) { protected List Waves = new(); protected static readonly AOEShapeRect WaveAOE = new(50, 8); // note that actual length is 15, but we want to show aoe for full path private static readonly float _losRadius = 1; - public LightwaveCommon() : base(ActionID.MakeSpell(AID.LightOfTheCrystal)) { } - - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { - base.OnEventCast(module, caster, spell); + base.OnEventCast(caster, spell); if ((AID)spell.Action.ID == AID.RayOfLight && !Waves.Contains(caster)) { Waves.Add(caster); @@ -32,12 +30,12 @@ protected bool InSafeCone(WPos origin, WPos blocking, WPos position) return position.InCone(origin, center, halfAngle); } - protected void DrawSafeCone(MiniArena arena, WPos origin, WPos blocking) + protected void DrawSafeCone(WPos origin, WPos blocking) { var toBlock = blocking - origin; var dist = toBlock.Length(); var center = Angle.FromDirection(toBlock); var halfAngle = Angle.Asin(_losRadius / dist); - arena.ZoneCone(origin, dist, 40, center, halfAngle, ArenaColor.SafeFromAOE); + Arena.ZoneCone(origin, dist, 40, center, halfAngle, ArenaColor.SafeFromAOE); } } diff --git a/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/ParhelicCircle.cs b/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/ParhelicCircle.cs index 698164830c..5aa870518e 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/ParhelicCircle.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/ParhelicCircle.cs @@ -1,6 +1,6 @@ namespace BossMod.Endwalker.Extreme.Ex2Hydaelyn; -class ParhelicCircle : Components.CastCounter +class ParhelicCircle(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.Incandescence)) { private List _positions = new(); @@ -8,19 +8,17 @@ class ParhelicCircle : Components.CastCounter private static readonly float _hexRadius = 17; private static readonly AOEShapeCircle _aoeShape = new(6); - public ParhelicCircle() : base(ActionID.MakeSpell(AID.Incandescence)) { } - - public override void Update(BossModule module) + public override void Update() { if (_positions.Count == 0) { // there are 10 orbs: 1 in center, 3 in vertices of a triangle with radius=8, 6 in vertices of a hexagon with radius=17 // note: i'm not sure how exactly orientation is determined, it seems to be related to eventobj rotations... - var hex = module.Enemies(OID.RefulgenceHexagon).FirstOrDefault(); - var tri = module.Enemies(OID.RefulgenceTriangle).FirstOrDefault(); + var hex = Module.Enemies(OID.RefulgenceHexagon).FirstOrDefault(); + var tri = Module.Enemies(OID.RefulgenceTriangle).FirstOrDefault(); if (hex != null && tri != null) { - var c = module.Bounds.Center; + var c = Module.Bounds.Center; _positions.Add(c); _positions.Add(c + _triRadius * (tri.Rotation + 60.Degrees()).ToDirection()); _positions.Add(c + _triRadius * (tri.Rotation + 180.Degrees()).ToDirection()); @@ -35,15 +33,15 @@ public override void Update(BossModule module) } } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_positions.Any(p => _aoeShape.Check(actor.Position, p))) hints.Add("GTFO from aoe!"); } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { foreach (var p in _positions) - _aoeShape.Draw(arena, p); + _aoeShape.Draw(Arena, p); } } diff --git a/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/Parhelion.cs b/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/Parhelion.cs index dcd815b95b..d0121d4755 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/Parhelion.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/Parhelion.cs @@ -1,25 +1,25 @@ namespace BossMod.Endwalker.Extreme.Ex2Hydaelyn; -class Parhelion : BossComponent +class Parhelion(BossModule module) : BossComponent(module) { private List _completedParhelions = new(); private bool _subparhelions; private static readonly AOEShapeRect _beacon = new(45, 3); - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { - if (ActiveParhelions(module).Any(p => _beacon.Check(actor.Position, p))) + if (ActiveParhelions().Any(p => _beacon.Check(actor.Position, p))) hints.Add("GTFO from aoe!"); } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { - foreach (var p in ActiveParhelions(module)) - _beacon.Draw(arena, p); + foreach (var p in ActiveParhelions()) + _beacon.Draw(Arena, p); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { @@ -33,11 +33,11 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } - private IEnumerable ActiveParhelions(BossModule module) + private IEnumerable ActiveParhelions() { if (_subparhelions) return _completedParhelions.Take(10); else - return module.Enemies(OID.Parhelion).Where(p => p.CastInfo != null); + return Module.Enemies(OID.Parhelion).Where(p => p.CastInfo != null); } } diff --git a/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/ShiningSaber.cs b/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/ShiningSaber.cs index f2173c9bd9..142ead5503 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/ShiningSaber.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/ShiningSaber.cs @@ -1,18 +1,16 @@ namespace BossMod.Endwalker.Extreme.Ex2Hydaelyn; // state related to shining saber mechanic (shared damage) -class ShiningSaber : Components.UniformStackSpread +class ShiningSaber(BossModule module) : Components.UniformStackSpread(module, 6, 0, 8) { - public ShiningSaber() : base(6, 0, 8) { } - - public override void Update(BossModule module) + public override void Update() { - if (module.PrimaryActor.CastInfo != null) + if (Module.PrimaryActor.CastInfo != null) { Stacks.Clear(); - if (module.WorldState.Actors.Find(module.PrimaryActor.TargetID) is var target && target != null) + if (WorldState.Actors.Find(Module.PrimaryActor.TargetID) is var target && target != null) AddStack(target); } - base.Update(module); + base.Update(); } } diff --git a/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/Spectrum.cs b/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/Spectrum.cs index ef327daa34..e6597f9e63 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/Spectrum.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/Spectrum.cs @@ -1,15 +1,13 @@ namespace BossMod.Endwalker.Extreme.Ex2Hydaelyn; -class Spectrum : Components.CastCounter +class Spectrum(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.BrightSpectrum)) { private static readonly float _radius = 5; - public Spectrum() : base(ActionID.MakeSpell(AID.BrightSpectrum)) { } - - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { int tanksInRange = 0, nonTanksInRange = 0; - foreach (var other in module.Raid.WithoutSlot().InRadiusExcluding(actor, _radius)) + foreach (var other in Raid.WithoutSlot().InRadiusExcluding(actor, _radius)) { if (other.Role == Role.Tank) ++tanksInRange; @@ -24,10 +22,10 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint hints.Add("Stack with co-tank"); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - arena.AddCircle(pc.Position, _radius, ArenaColor.Danger); - foreach (var player in module.Raid.WithoutSlot().Exclude(pc)) - arena.Actor(player, player.Position.InCircle(pc.Position, _radius) ? ArenaColor.PlayerInteresting : ArenaColor.PlayerGeneric); + Arena.AddCircle(pc.Position, _radius, ArenaColor.Danger); + foreach (var player in Raid.WithoutSlot().Exclude(pc)) + Arena.Actor(player, player.Position.InCircle(pc.Position, _radius) ? ArenaColor.PlayerInteresting : ArenaColor.PlayerGeneric); } } diff --git a/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/WeaponTracker.cs b/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/WeaponTracker.cs index a0c9df41a4..64d2626c00 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/WeaponTracker.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/WeaponTracker.cs @@ -2,7 +2,7 @@ // component tracking boss weapon/stance switches; also draws imminent aoe after each switch // note: we could rely on invisible buff 2273 to select weapon (n/a for sword, 1B4 for staff, 1B5 for chakram), it appears slightly earlier than 'official' buff -class WeaponTracker : BossComponent +class WeaponTracker(BossModule module) : BossComponent(module) { public enum Stance { None, Sword, Staff, Chakram } public Stance CurStance { get; private set; } @@ -12,23 +12,23 @@ public enum Stance { None, Sword, Staff, Chakram } private static readonly AOEShapeCircle _aoeStaff = new(10); private static readonly AOEShapeDonut _aoeChakram = new(5, 40); - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (!AOEImminent) return; bool inAOE = CurStance switch { - Stance.Sword => _aoeSword.Check(actor.Position, module.PrimaryActor.Position, 0.Degrees()) || _aoeSword.Check(actor.Position, module.PrimaryActor.Position, 90.Degrees()), - Stance.Staff => _aoeStaff.Check(actor.Position, module.PrimaryActor.Position), - Stance.Chakram => _aoeChakram.Check(actor.Position, module.PrimaryActor.Position), + Stance.Sword => _aoeSword.Check(actor.Position, Module.PrimaryActor.Position, 0.Degrees()) || _aoeSword.Check(actor.Position, Module.PrimaryActor.Position, 90.Degrees()), + Stance.Staff => _aoeStaff.Check(actor.Position, Module.PrimaryActor.Position), + Stance.Chakram => _aoeChakram.Check(actor.Position, Module.PrimaryActor.Position), _ => false }; if (inAOE) hints.Add("GTFO from weapon aoe!"); } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { if (!AOEImminent) return; @@ -36,21 +36,21 @@ public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc switch (CurStance) { case Stance.Sword: - _aoeSword.Draw(arena, module.PrimaryActor.Position, 0.Degrees()); - _aoeSword.Draw(arena, module.PrimaryActor.Position, 90.Degrees()); + _aoeSword.Draw(Arena, Module.PrimaryActor.Position, 0.Degrees()); + _aoeSword.Draw(Arena, Module.PrimaryActor.Position, 90.Degrees()); break; case Stance.Staff: - _aoeStaff.Draw(arena, module.PrimaryActor.Position); + _aoeStaff.Draw(Arena, Module.PrimaryActor.Position); break; case Stance.Chakram: - _aoeChakram.Draw(arena, module.PrimaryActor.Position); + _aoeChakram.Draw(Arena, Module.PrimaryActor.Position); break; } } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { - if (actor != module.PrimaryActor) + if (actor != Module.PrimaryActor) return; var newStance = (SID)status.ID switch @@ -68,7 +68,7 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st CurStance = newStance; } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.WeaponChangeAOEChakram or AID.WeaponChangeAOEStaff or AID.WeaponChangeAOESword) AOEImminent = false; diff --git a/BossMod/Modules/Endwalker/Extreme/Ex3Endsinger/DespairUnforgotten.cs b/BossMod/Modules/Endwalker/Extreme/Ex3Endsinger/DespairUnforgotten.cs index ae28d95870..55ac788d70 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex3Endsinger/DespairUnforgotten.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex3Endsinger/DespairUnforgotten.cs @@ -1,6 +1,6 @@ namespace BossMod.Endwalker.Extreme.Ex3Endsigner; -class DespairUnforgotten : BossComponent +class DespairUnforgotten(BossModule module) : BossComponent(module) { private enum State { None, Donut, Spread, Flare, Stack } @@ -8,7 +8,7 @@ private enum State { None, Donut, Spread, Flare, Stack } private State[] _states = new State[PartyState.MaxPartySize * 4]; private int[] _doneCasts = new int[PartyState.MaxPartySize]; - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { // TODO: improve if (_doneCasts[slot] > 3) @@ -26,12 +26,12 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { // TODO: think what to draw here... } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { switch ((SID)status.ID) { @@ -45,30 +45,30 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st }; if (rings == 0) { - module.ReportError(this, $"Unexpected extra {status.Extra:X} for rewind status"); + ReportError($"Unexpected extra {status.Extra:X} for rewind status"); break; } - int slot = module.Raid.FindSlot(actor.InstanceID); + int slot = Raid.FindSlot(actor.InstanceID); if (slot >= 0) _states[slot * 4 + 3] = _states[slot * 4 + 3 - rings]; break; case SID.EchoesOfNausea: - ModifyState(module, actor, State.Donut); + ModifyState(actor, State.Donut); break; case SID.EchoesOfBefoulment: - ModifyState(module, actor, State.Spread); + ModifyState(actor, State.Spread); break; case SID.EchoesOfFuture: - ModifyState(module, actor, State.Flare); + ModifyState(actor, State.Flare); break; case SID.EchoesOfBenevolence: - ModifyState(module, actor, State.Stack); + ModifyState(actor, State.Stack); break; } } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { switch ((SID)status.ID) { @@ -76,20 +76,20 @@ public override void OnStatusLose(BossModule module, Actor actor, ActorStatus st case SID.EchoesOfBefoulment: case SID.EchoesOfFuture: case SID.EchoesOfBenevolence: - int slot = module.WorldState.Party.FindSlot(actor.InstanceID); + int slot = WorldState.Party.FindSlot(actor.InstanceID); if (slot >= 0) Done |= ++_doneCasts[slot] > 3; break; } } - private void ModifyState(BossModule module, Actor actor, State state) + private void ModifyState(Actor actor, State state) { - int slot = module.Raid.FindSlot(actor.InstanceID); + int slot = Raid.FindSlot(actor.InstanceID); if (slot >= 0) { if (_doneCasts[slot] > 3) - module.ReportError(this, $"Unexpected state change after {_doneCasts[slot]} casts"); + ReportError($"Unexpected state change after {_doneCasts[slot]} casts"); else _states[slot * 4 + _doneCasts[slot]] = state; } diff --git a/BossMod/Modules/Endwalker/Extreme/Ex3Endsinger/Elenchos.cs b/BossMod/Modules/Endwalker/Extreme/Ex3Endsinger/Elenchos.cs index 75f4f02baf..9ec9cbe7f2 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex3Endsinger/Elenchos.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex3Endsinger/Elenchos.cs @@ -1,6 +1,6 @@ namespace BossMod.Endwalker.Extreme.Ex3Endsigner; -class Elenchos : BossComponent +class Elenchos(BossModule module) : BossComponent(module) { private Actor? _center; private List _sides = new(); @@ -8,20 +8,20 @@ class Elenchos : BossComponent private static readonly AOEShapeRect _aoeCenter = new(40, 7); private static readonly AOEShapeRect _aoeSides = new(40, 6.5f, 40); - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_aoeCenter.Check(actor.Position, _center) || _sides.Any(s => _aoeSides.Check(actor.Position, s))) hints.Add("GTFO from aoe!"); } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { - _aoeCenter.Draw(arena, _center); + _aoeCenter.Draw(Arena, _center); foreach (var s in _sides) - _aoeSides.Draw(arena, s); + _aoeSides.Draw(Arena, s); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { @@ -34,7 +34,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { diff --git a/BossMod/Modules/Endwalker/Extreme/Ex3Endsinger/Endsong.cs b/BossMod/Modules/Endwalker/Extreme/Ex3Endsinger/Endsong.cs index a0baef3108..5ddf05c756 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex3Endsinger/Endsong.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex3Endsinger/Endsong.cs @@ -1,30 +1,30 @@ namespace BossMod.Endwalker.Extreme.Ex3Endsigner; -class Endsong : BossComponent +class Endsong(BossModule module) : BossComponent(module) { private List _active = new(); private static readonly AOEShapeCircle _aoe = new(15); - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_active.Any(a => _aoe.Check(actor.Position, a))) hints.Add("GTFO from aoe!"); } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { foreach (var a in _active) - _aoe.Draw(arena, a); + _aoe.Draw(Arena, a); } - public override void OnTethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnTethered(Actor source, ActorTetherInfo tether) { if ((TetherID)tether.ID is TetherID.EndsongFirst or TetherID.EndsongNext) _active.Add(source); } - public override void OnUntethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnUntethered(Actor source, ActorTetherInfo tether) { _active.Remove(source); } diff --git a/BossMod/Modules/Endwalker/Extreme/Ex3Endsinger/Ex3Endsinger.cs b/BossMod/Modules/Endwalker/Extreme/Ex3Endsinger/Ex3Endsinger.cs index c8c56b7ca8..f29526d415 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex3Endsinger/Ex3Endsinger.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex3Endsinger/Ex3Endsinger.cs @@ -1,41 +1,20 @@ namespace BossMod.Endwalker.Extreme.Ex3Endsigner; // raidwide is slightly delayed -class Elegeia : Components.CastCounter -{ - public Elegeia() : base(ActionID.MakeSpell(AID.Elegeia)) { } -} +class Elegeia(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.Elegeia)); -class Telomania : Components.CastCounter -{ - public Telomania() : base(ActionID.MakeSpell(AID.TelomaniaLast)) { } -} +class Telomania(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.TelomaniaLast)); -class UltimateFate : Components.CastCounter -{ - public UltimateFate() : base(ActionID.MakeSpell(AID.EnrageAOE)) { } -} +class UltimateFate(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.EnrageAOE)); // TODO: proper tankbuster component... -class Hubris : Components.CastCounter -{ - public Hubris() : base(ActionID.MakeSpell(AID.HubrisAOE)) { } -} +class Hubris(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.HubrisAOE)); // TODO: proper stacks component -class Eironeia : Components.CastCounter -{ - public Eironeia() : base(ActionID.MakeSpell(AID.EironeiaAOE)) { } -} +class Eironeia(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.EironeiaAOE)); [ConfigDisplay(Order = 0x030, Parent = typeof(EndwalkerConfig))] -public class Ex3EndsingerConfig : CooldownPlanningConfigNode -{ - public Ex3EndsingerConfig() : base(90) { } -} +public class Ex3EndsingerConfig() : CooldownPlanningConfigNode(90); [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 846, NameID = 10448)] -public class Ex3Endsinger : BossModule -{ - public Ex3Endsinger(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { } -} +public class Ex3Endsinger(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)); diff --git a/BossMod/Modules/Endwalker/Extreme/Ex3Endsinger/Planets.cs b/BossMod/Modules/Endwalker/Extreme/Ex3Endsinger/Planets.cs index a048ad0063..990e424548 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex3Endsinger/Planets.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex3Endsinger/Planets.cs @@ -1,7 +1,7 @@ namespace BossMod.Endwalker.Extreme.Ex3Endsigner; // used both for single planets (elegeia) and successions (fatalism) -class Planets : BossComponent +class Planets(BossModule module) : BossComponent(module) { private Actor? _head; private List _planetsFiery = new(); @@ -12,7 +12,7 @@ class Planets : BossComponent private static readonly float _knockbackDistance = 25; private static readonly float _planetOffset = 19.8f; // == 14 * sqrt(2) - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_aoeHead.Check(actor.Position, _head)) { @@ -25,82 +25,82 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint if (_planetsAzure.Count > 0) { var offsetLocation = Components.Knockback.AwayFromSource(actor.Position, _planetsAzure[0], _knockbackDistance); - if (!module.Bounds.Contains(offsetLocation)) + if (!Module.Bounds.Contains(offsetLocation)) { hints.Add("About to be knocked into wall!"); } } } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { - _aoeHead.Draw(arena, _head); + _aoeHead.Draw(Arena, _head); if (_planetsFiery.Count > 0) { - _aoePlanet.Draw(arena, _planetsFiery[0]); + _aoePlanet.Draw(Arena, _planetsFiery[0]); } } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (_planetsAzure.Count > 0) { var offsetLocation = Components.Knockback.AwayFromSource(pc.Position, _planetsAzure[0], _knockbackDistance); - arena.AddLine(pc.Position, offsetLocation, ArenaColor.Danger); - arena.Actor(offsetLocation, pc.Rotation, ArenaColor.Danger); + Arena.AddLine(pc.Position, offsetLocation, ArenaColor.Danger); + Arena.Actor(offsetLocation, pc.Rotation, ArenaColor.Danger); } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.DiairesisElegeia) _head = caster; } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if (_head == caster) _head = null; } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { case AID.FatalismFieryStar1: - AddPlanet(module, caster, false, true); + AddPlanet(caster, false, true); break; case AID.FatalismFieryStar2: case AID.FieryStarVisual: - AddPlanet(module, caster, false, false); + AddPlanet(caster, false, false); break; case AID.FatalismAzureStar1: - AddPlanet(module, caster, true, true); + AddPlanet(caster, true, true); break; case AID.FatalismAzureStar2: case AID.AzureStarVisual: - AddPlanet(module, caster, true, false); + AddPlanet(caster, true, false); break; case AID.RubistellarCollision: case AID.FatalismRubistallarCollisionAOE: if (_planetsFiery.Count > 0) _planetsFiery.RemoveAt(0); else - module.ReportError(this, "Unexpected fiery cast, no casters available"); + ReportError("Unexpected fiery cast, no casters available"); break; case AID.CaerustellarCollision: case AID.FatalismCaerustallarCollisionAOE: if (_planetsAzure.Count > 0) _planetsAzure.RemoveAt(0); else - module.ReportError(this, "Unexpected azure cast, no casters available"); + ReportError("Unexpected azure cast, no casters available"); break; } } - private void AddPlanet(BossModule module, Actor caster, bool azure, bool firstOfPair) + private void AddPlanet(Actor caster, bool azure, bool firstOfPair) { - var origin = module.Bounds.Center + _planetOffset * caster.Rotation.ToDirection(); + var origin = Module.Bounds.Center + _planetOffset * caster.Rotation.ToDirection(); var planets = azure ? _planetsAzure : _planetsFiery; int index = firstOfPair ? 0 : planets.Count; planets.Insert(index, origin); diff --git a/BossMod/Modules/Endwalker/Extreme/Ex3Endsinger/TwinsongAporrhoia.cs b/BossMod/Modules/Endwalker/Extreme/Ex3Endsinger/TwinsongAporrhoia.cs index 8379c22ab3..aba93129ef 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex3Endsinger/TwinsongAporrhoia.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex3Endsinger/TwinsongAporrhoia.cs @@ -1,6 +1,6 @@ namespace BossMod.Endwalker.Extreme.Ex3Endsigner; -class TwinsongAporrhoia : BossComponent +class TwinsongAporrhoia(BossModule module) : BossComponent(module) { private enum HeadID { Center, Danger1, Danger2, Safe1, Safe2, Count } @@ -13,7 +13,7 @@ private enum HeadID { Center, Danger1, Danger2, Safe1, Safe2, Count } private static readonly AOEShapeCircle _aoeDanger = new(15); private static readonly AOEShapeDonut _aoeSafe = new(5, 15); - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_castsDone >= 3 && !_ringsAssigned) return; @@ -42,7 +42,7 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint hints.Add("GTFO from aoe!"); } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { if (_castsDone >= 3 && !_ringsAssigned) return; @@ -51,7 +51,7 @@ public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc if (center.Actor != null) { Angle rot = _centerStartingRotation - (_castsDone - center.Rings) * 90.Degrees(); - _aoeCenter.Draw(arena, center.Actor.Position, rot); + _aoeCenter.Draw(Arena, center.Actor.Position, rot); } for (var i = HeadID.Danger1; i < HeadID.Count; ++i) @@ -61,12 +61,12 @@ public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc { int safeCounter = (i >= HeadID.Safe1 ? 1 : 0) + _castsDone - head.Rings; AOEShape aoe = (safeCounter & 1) != 0 ? _aoeSafe : _aoeDanger; - aoe.Draw(arena, head.Actor); + aoe.Draw(Arena, head.Actor); } } } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.RewindTwinsong) { @@ -79,14 +79,14 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st }; if (rings == 0) { - module.ReportError(this, $"Unexpected extra {status.Extra:X} for rewind status"); + ReportError($"Unexpected extra {status.Extra:X} for rewind status"); return; } int slot = Array.FindIndex(_heads, ar => ar.Actor == actor); if (slot == -1) { - module.ReportError(this, $"Unexpected actor for rewind status"); + ReportError($"Unexpected actor for rewind status"); return; } @@ -95,7 +95,7 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { @@ -121,7 +121,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { diff --git a/BossMod/Modules/Endwalker/Extreme/Ex4Barbariccia/BoldBoulderTrample.cs b/BossMod/Modules/Endwalker/Extreme/Ex4Barbariccia/BoldBoulderTrample.cs index 3f3f009262..d15f7bfa36 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex4Barbariccia/BoldBoulderTrample.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex4Barbariccia/BoldBoulderTrample.cs @@ -1,28 +1,26 @@ namespace BossMod.Endwalker.Extreme.Ex4Barbariccia; -class BoldBoulderTrample : Components.UniformStackSpread +class BoldBoulderTrample(BossModule module) : Components.UniformStackSpread(module, 6, 20, 6) { - public BoldBoulderTrample() : base(6, 20, 6) { } - - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { - if ((AID)spell.Action.ID == AID.BoldBoulder && module.WorldState.Actors.Find(spell.TargetID) is var target && target != null) + if ((AID)spell.Action.ID == AID.BoldBoulder && WorldState.Actors.Find(spell.TargetID) is var target && target != null) AddSpread(target); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.BoldBoulder) Spreads.RemoveAll(s => s.Target.InstanceID == spell.TargetID); } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if ((IconID)iconID == IconID.Trample) AddStack(actor); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.Trample) Stacks.RemoveAll(s => s.Target.InstanceID == spell.MainTargetID); diff --git a/BossMod/Modules/Endwalker/Extreme/Ex4Barbariccia/BrutalRush.cs b/BossMod/Modules/Endwalker/Extreme/Ex4Barbariccia/BrutalRush.cs index 75dcfcf415..2c73c13801 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex4Barbariccia/BrutalRush.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex4Barbariccia/BrutalRush.cs @@ -1,21 +1,19 @@ namespace BossMod.Endwalker.Extreme.Ex4Barbariccia; -class BrutalRush : Components.SelfTargetedAOEs +class BrutalRush(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.BrutalGust), new AOEShapeRect(40, 2)) { private BitMask _pendingRushes; public bool HavePendingRushes => _pendingRushes.Any(); - public BrutalRush() : base(ActionID.MakeSpell(AID.BrutalGust), new AOEShapeRect(40, 2)) { } - - public override void OnTethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnTethered(Actor source, ActorTetherInfo tether) { if (tether.ID == (uint)TetherID.BrutalRush) - _pendingRushes.Set(module.Raid.FindSlot(source.InstanceID)); + _pendingRushes.Set(Raid.FindSlot(source.InstanceID)); } - public override void OnUntethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnUntethered(Actor source, ActorTetherInfo tether) { if (tether.ID == (uint)TetherID.BrutalRush) - _pendingRushes.Clear(module.Raid.FindSlot(source.InstanceID)); + _pendingRushes.Clear(Raid.FindSlot(source.InstanceID)); } } diff --git a/BossMod/Modules/Endwalker/Extreme/Ex4Barbariccia/Ex4Barbariccia.cs b/BossMod/Modules/Endwalker/Extreme/Ex4Barbariccia/Ex4Barbariccia.cs index 9da5fb25fa..b376662e80 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex4Barbariccia/Ex4Barbariccia.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex4Barbariccia/Ex4Barbariccia.cs @@ -1,127 +1,29 @@ namespace BossMod.Endwalker.Extreme.Ex4Barbariccia; -class RagingStorm : Components.CastCounter -{ - public RagingStorm() : base(ActionID.MakeSpell(AID.RagingStorm)) { } -} - -class HairFlayUpbraid : Components.CastStackSpread -{ - public HairFlayUpbraid() : base(ActionID.MakeSpell(AID.Upbraid), ActionID.MakeSpell(AID.HairFlay), 3, 10, maxStackSize: 2) { } -} - -class CurlingIron : Components.CastCounter -{ - public CurlingIron() : base(ActionID.MakeSpell(AID.CurlingIronAOE)) { } -} - -class Catabasis : Components.CastCounter -{ - public Catabasis() : base(ActionID.MakeSpell(AID.Catabasis)) { } -} - -class VoidAeroTankbuster : Components.Cleave -{ - public VoidAeroTankbuster() : base(ActionID.MakeSpell(AID.VoidAeroTankbuster), new AOEShapeCircle(5), originAtTarget: true) { } -} - -class SecretBreezeCones : Components.SelfTargetedAOEs -{ - public SecretBreezeCones() : base(ActionID.MakeSpell(AID.SecretBreezeAOE), new AOEShapeCone(40, 22.5f.Degrees())) { } -} - -class SecretBreezeProteans : Components.SimpleProtean -{ - public SecretBreezeProteans() : base(ActionID.MakeSpell(AID.SecretBreezeProtean), new AOEShapeCone(40, 22.5f.Degrees())) { } -} - -class WarningGale : Components.SelfTargetedAOEs -{ - public WarningGale() : base(ActionID.MakeSpell(AID.WarningGale), new AOEShapeCircle(6)) { } -} - -class WindingGaleCharge : Components.ChargeAOEs -{ - public WindingGaleCharge() : base(ActionID.MakeSpell(AID.WindingGaleCharge), 2) { } -} - -class BoulderBreak : Components.CastSharedTankbuster -{ - public BoulderBreak() : base(ActionID.MakeSpell(AID.BoulderBreak), 5) { } -} - -class Boulder : Components.LocationTargetedAOEs -{ - public Boulder() : base(ActionID.MakeSpell(AID.Boulder), 10) { } -} - -class BrittleBoulder : Components.SpreadFromCastTargets -{ - public BrittleBoulder() : base(ActionID.MakeSpell(AID.BrittleBoulder), 5) { } -} - -class TornadoChainInner : Components.SelfTargetedAOEs -{ - public TornadoChainInner() : base(ActionID.MakeSpell(AID.TornadoChainInner), new AOEShapeCircle(11)) { } -} - -class TornadoChainOuter : Components.SelfTargetedAOEs -{ - public TornadoChainOuter() : base(ActionID.MakeSpell(AID.TornadoChainOuter), new AOEShapeDonut(11, 20)) { } -} - -class KnuckleDrum : Components.CastCounter -{ - public KnuckleDrum() : base(ActionID.MakeSpell(AID.KnuckleDrum)) { } -} - -class KnuckleDrumLast : Components.CastCounter -{ - public KnuckleDrumLast() : base(ActionID.MakeSpell(AID.KnuckleDrumLast)) { } -} - -class BlowAwayRaidwide : Components.CastCounter -{ - public BlowAwayRaidwide() : base(ActionID.MakeSpell(AID.BlowAwayRaidwide)) { } -} - -class BlowAwayPuddle : Components.SelfTargetedAOEs -{ - public BlowAwayPuddle() : base(ActionID.MakeSpell(AID.BlowAwayPuddle), new AOEShapeCircle(6)) { } -} - -class ImpactAOE : Components.SelfTargetedAOEs -{ - public ImpactAOE() : base(ActionID.MakeSpell(AID.ImpactAOE), new AOEShapeCircle(6)) { } -} - -class ImpactKnockback : Components.KnockbackFromCastTarget -{ - public ImpactKnockback() : base(ActionID.MakeSpell(AID.ImpactKnockback), 6) { } -} - -class BlusteryRuler : Components.SelfTargetedAOEs -{ - public BlusteryRuler() : base(ActionID.MakeSpell(AID.BlusteryRuler), new AOEShapeCircle(6)) { } -} - -class DryBlowsRaidwide : Components.CastCounter -{ - public DryBlowsRaidwide() : base(ActionID.MakeSpell(AID.DryBlowsRaidwide)) { } -} - -class DryBlowsPuddle : Components.LocationTargetedAOEs -{ - public DryBlowsPuddle() : base(ActionID.MakeSpell(AID.DryBlowsPuddle), 3) { } -} - -class IronOut : Components.CastCounter -{ - public IronOut() : base(ActionID.MakeSpell(AID.IronOutAOE)) { } -} +class RagingStorm(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.RagingStorm)); +class HairFlayUpbraid(BossModule module) : Components.CastStackSpread(module, ActionID.MakeSpell(AID.Upbraid), ActionID.MakeSpell(AID.HairFlay), 3, 10, maxStackSize: 2); +class CurlingIron(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.CurlingIronAOE)); +class Catabasis(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.Catabasis)); +class VoidAeroTankbuster(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.VoidAeroTankbuster), new AOEShapeCircle(5), originAtTarget: true); +class SecretBreezeCones(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.SecretBreezeAOE), new AOEShapeCone(40, 22.5f.Degrees())); +class SecretBreezeProteans(BossModule module) : Components.SimpleProtean(module, ActionID.MakeSpell(AID.SecretBreezeProtean), new AOEShapeCone(40, 22.5f.Degrees())); +class WarningGale(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.WarningGale), new AOEShapeCircle(6)); +class WindingGaleCharge(BossModule module) : Components.ChargeAOEs(module, ActionID.MakeSpell(AID.WindingGaleCharge), 2); +class BoulderBreak(BossModule module) : Components.CastSharedTankbuster(module, ActionID.MakeSpell(AID.BoulderBreak), 5); +class Boulder(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Boulder), 10); +class BrittleBoulder(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.BrittleBoulder), 5); +class TornadoChainInner(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TornadoChainInner), new AOEShapeCircle(11)); +class TornadoChainOuter(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TornadoChainOuter), new AOEShapeDonut(11, 20)); +class KnuckleDrum(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.KnuckleDrum)); +class KnuckleDrumLast(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.KnuckleDrumLast)); +class BlowAwayRaidwide(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.BlowAwayRaidwide)); +class BlowAwayPuddle(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.BlowAwayPuddle), new AOEShapeCircle(6)); +class ImpactAOE(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ImpactAOE), new AOEShapeCircle(6)); +class ImpactKnockback(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.ImpactKnockback), 6); +class BlusteryRuler(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.BlusteryRuler), new AOEShapeCircle(6)); +class DryBlowsRaidwide(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.DryBlowsRaidwide)); +class DryBlowsPuddle(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.DryBlowsPuddle), 3); +class IronOut(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.IronOutAOE)); [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 871, NameID = 11398)] -public class Ex4Barbariccia : BossModule -{ - public Ex4Barbariccia(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { } -} +public class Ex4Barbariccia(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)); diff --git a/BossMod/Modules/Endwalker/Extreme/Ex4Barbariccia/SavageBarberyHairRaid.cs b/BossMod/Modules/Endwalker/Extreme/Ex4Barbariccia/SavageBarberyHairRaid.cs index 8f31c2e1ec..1e83173ac1 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex4Barbariccia/SavageBarberyHairRaid.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex4Barbariccia/SavageBarberyHairRaid.cs @@ -1,18 +1,16 @@ namespace BossMod.Endwalker.Extreme.Ex4Barbariccia; -class SavageBarbery : Components.GenericAOEs +class SavageBarbery(BossModule module) : Components.GenericAOEs(module) { private List<(Actor Caster, AOEShape Shape)> _casts = new(); public int NumActiveCasts => _casts.Count; - public SavageBarbery() : base(new()) { } - - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { return _casts.Select(cs => new AOEInstance(cs.Shape, cs.Caster.Position, cs.Caster.CastInfo!.Rotation, cs.Caster.CastInfo.NPCFinishAt)); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { AOEShape? shape = (AID)spell.Action.ID switch { @@ -25,26 +23,24 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf _casts.Add((caster, shape)); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.SavageBarberyDonutAOE or AID.SavageBarberyRectAOE or AID.SavageBarberyDonutSword or AID.SavageBarberyRectSword) _casts.RemoveAll(cs => cs.Caster == caster); } } -class HairRaid : Components.GenericAOEs +class HairRaid(BossModule module) : Components.GenericAOEs(module) { private List<(Actor Caster, AOEShape Shape)> _casts = new(); public int NumActiveCasts => _casts.Count; - public HairRaid() : base(new()) { } - - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { return _casts.Select(cs => new AOEInstance(cs.Shape, cs.Caster.Position, cs.Caster.CastInfo!.Rotation, cs.Caster.CastInfo.NPCFinishAt)); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { AOEShape? shape = (AID)spell.Action.ID switch { @@ -56,14 +52,11 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf _casts.Add((caster, shape)); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.HairRaidConeAOE or AID.HairRaidDonutAOE) _casts.RemoveAll(cs => cs.Caster == caster); } } -class HairSprayDeadlyTwist : Components.CastStackSpread -{ - public HairSprayDeadlyTwist() : base(ActionID.MakeSpell(AID.DeadlyTwist), ActionID.MakeSpell(AID.HairSpray), 6, 5, 4) { } -} +class HairSprayDeadlyTwist(BossModule module) : Components.CastStackSpread(module, ActionID.MakeSpell(AID.DeadlyTwist), ActionID.MakeSpell(AID.HairSpray), 6, 5, 4); diff --git a/BossMod/Modules/Endwalker/Extreme/Ex4Barbariccia/StiffBreeze.cs b/BossMod/Modules/Endwalker/Extreme/Ex4Barbariccia/StiffBreeze.cs index f495f08e68..98368671fe 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex4Barbariccia/StiffBreeze.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex4Barbariccia/StiffBreeze.cs @@ -1,13 +1,11 @@ namespace BossMod.Endwalker.Extreme.Ex4Barbariccia; -class StiffBreeze : Components.GenericAOEs +class StiffBreeze(BossModule module) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.Tousle)) { private static readonly AOEShape _shape = new AOEShapeCircle(1); // note: actual aoe, if triggered, has radius 2, but we care about triggering radius - public StiffBreeze() : base(ActionID.MakeSpell(AID.Tousle)) { } - - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { - return module.Enemies(OID.StiffBreeze).Select(o => new AOEInstance(_shape, o.Position)); + return Module.Enemies(OID.StiffBreeze).Select(o => new AOEInstance(_shape, o.Position)); } } diff --git a/BossMod/Modules/Endwalker/Extreme/Ex4Barbariccia/Tangle.cs b/BossMod/Modules/Endwalker/Extreme/Ex4Barbariccia/Tangle.cs index 3c39ea0342..ff55faef8a 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex4Barbariccia/Tangle.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex4Barbariccia/Tangle.cs @@ -1,28 +1,26 @@ namespace BossMod.Endwalker.Extreme.Ex4Barbariccia; // initial aoe + tethers -class Tangle : Components.SelfTargetedAOEs +class Tangle(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Tangle), new AOEShapeCircle(6)) { public int NumTethers { get; private set; } private Actor?[] _tethers = new Actor?[PartyState.MaxPartySize]; - public Tangle() : base(ActionID.MakeSpell(AID.Tangle), new AOEShapeCircle(6)) { } - - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { var tether = _tethers[pcSlot]; if (tether != null) { - arena.AddCircle(tether.Position, 8, ArenaColor.Object); + Arena.AddCircle(tether.Position, 8, ArenaColor.Object); } } - public override void OnTethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnTethered(Actor source, ActorTetherInfo tether) { if (tether.ID == (uint)TetherID.Tangle) { - var slot = module.Raid.FindSlot(source.InstanceID); - var target = module.WorldState.Actors.Find(tether.Target); + var slot = Raid.FindSlot(source.InstanceID); + var target = WorldState.Actors.Find(tether.Target); if (slot >= 0 && target != null) { _tethers[slot] = target; @@ -31,11 +29,11 @@ public override void OnTethered(BossModule module, Actor source, ActorTetherInfo } } - public override void OnUntethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnUntethered(Actor source, ActorTetherInfo tether) { if (tether.ID == (uint)TetherID.Tangle) { - var slot = module.Raid.FindSlot(source.InstanceID); + var slot = Raid.FindSlot(source.InstanceID); if (slot >= 0) { _tethers[slot] = null; diff --git a/BossMod/Modules/Endwalker/Extreme/Ex4Barbariccia/WindingGale.cs b/BossMod/Modules/Endwalker/Extreme/Ex4Barbariccia/WindingGale.cs index a4f6ad567f..5f671bae17 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex4Barbariccia/WindingGale.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex4Barbariccia/WindingGale.cs @@ -1,27 +1,25 @@ namespace BossMod.Endwalker.Extreme.Ex4Barbariccia; // TODO: not sure how 'spiral arms' are really implemented -class WindingGale : Components.GenericAOEs +class WindingGale(BossModule module) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.WindingGale)) { private List _casters = new(); private static readonly AOEShapeDonutSector _shape = new(9, 11, 90.Degrees()); - public WindingGale() : base(ActionID.MakeSpell(AID.WindingGale)) { } - - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { foreach (var c in _casters) yield return new(_shape, c.Position + _shape.OuterRadius * c.Rotation.ToDirection(), c.CastInfo!.Rotation, c.CastInfo.NPCFinishAt); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) _casters.Add(caster); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) _casters.Remove(caster); diff --git a/BossMod/Modules/Endwalker/Extreme/Ex5Rubicante/ArchInferno.cs b/BossMod/Modules/Endwalker/Extreme/Ex5Rubicante/ArchInferno.cs index 4d152837e9..44843993a9 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex5Rubicante/ArchInferno.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex5Rubicante/ArchInferno.cs @@ -1,41 +1,10 @@ namespace BossMod.Endwalker.Extreme.Ex5Rubicante; -class ArchInferno : Components.PersistentVoidzoneAtCastTarget -{ - public ArchInferno() : base(5, ActionID.MakeSpell(AID.ArchInferno), m => Enumerable.Repeat(m.PrimaryActor, (m.PrimaryActor.CastInfo?.IsSpell(AID.ArchInferno) ?? false) ? 0 : 1), 0) { } -} - -class InfernoDevilFirst : Components.SelfTargetedAOEs -{ - public InfernoDevilFirst() : base(ActionID.MakeSpell(AID.InfernoDevilFirst), new AOEShapeCircle(10)) { } -} - -class InfernoDevilRest : Components.SelfTargetedAOEs -{ - public InfernoDevilRest() : base(ActionID.MakeSpell(AID.InfernoDevilRest), new AOEShapeCircle(10)) { } -} - -class Conflagration : Components.SelfTargetedAOEs -{ - public Conflagration() : base(ActionID.MakeSpell(AID.Conflagration), new AOEShapeRect(20, 5, 20)) { } -} - -class RadialFlagration : Components.SimpleProtean -{ - public RadialFlagration() : base(ActionID.MakeSpell(AID.RadialFlagrationAOE), new AOEShapeCone(21, 15.Degrees())) { } // TODO: verify angle -} - -class SpikeOfFlame : Components.SpreadFromCastTargets -{ - public SpikeOfFlame() : base(ActionID.MakeSpell(AID.SpikeOfFlame), 5) { } -} - -class FourfoldFlame : Components.StackWithCastTargets -{ - public FourfoldFlame() : base(ActionID.MakeSpell(AID.FourfoldFlame), 6, 4, 4) { } -} - -class TwinfoldFlame : Components.StackWithCastTargets -{ - public TwinfoldFlame() : base(ActionID.MakeSpell(AID.TwinfoldFlame), 4, 2, 2) { } -} +class ArchInferno(BossModule module) : Components.PersistentVoidzoneAtCastTarget(module, 5, ActionID.MakeSpell(AID.ArchInferno), m => Enumerable.Repeat(m.PrimaryActor, (m.PrimaryActor.CastInfo?.IsSpell(AID.ArchInferno) ?? false) ? 0 : 1), 0); +class InfernoDevilFirst(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.InfernoDevilFirst), new AOEShapeCircle(10)); +class InfernoDevilRest(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.InfernoDevilRest), new AOEShapeCircle(10)); +class Conflagration(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Conflagration), new AOEShapeRect(20, 5, 20)); +class RadialFlagration(BossModule module) : Components.SimpleProtean(module, ActionID.MakeSpell(AID.RadialFlagrationAOE), new AOEShapeCone(21, 15.Degrees())); // TODO: verify angle +class SpikeOfFlame(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.SpikeOfFlame), 5); +class FourfoldFlame(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.FourfoldFlame), 6, 4, 4); +class TwinfoldFlame(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.TwinfoldFlame), 4, 2, 2); diff --git a/BossMod/Modules/Endwalker/Extreme/Ex5Rubicante/Dualfire.cs b/BossMod/Modules/Endwalker/Extreme/Ex5Rubicante/Dualfire.cs index 5ae9a48024..410a1b9380 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex5Rubicante/Dualfire.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex5Rubicante/Dualfire.cs @@ -1,14 +1,12 @@ namespace BossMod.Endwalker.Extreme.Ex5Rubicante; -class Dualfire : Components.GenericBaitAway +class Dualfire(BossModule module) : Components.GenericBaitAway(module, ActionID.MakeSpell(AID.DualfireAOE)) { private static readonly AOEShapeCone _shape = new(60, 60.Degrees()); // TODO: verify angle - public Dualfire() : base(ActionID.MakeSpell(AID.DualfireAOE)) { } - - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.Dualfire) - CurrentBaits.Add(new(module.PrimaryActor, actor, _shape)); + CurrentBaits.Add(new(Module.PrimaryActor, actor, _shape)); } } diff --git a/BossMod/Modules/Endwalker/Extreme/Ex5Rubicante/Ex5Rubicante.cs b/BossMod/Modules/Endwalker/Extreme/Ex5Rubicante/Ex5Rubicante.cs index 498a1a65c0..e29d5f09e0 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex5Rubicante/Ex5Rubicante.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex5Rubicante/Ex5Rubicante.cs @@ -1,28 +1,11 @@ namespace BossMod.Endwalker.Extreme.Ex5Rubicante; -class ShatteringHeatBoss : Components.SpreadFromCastTargets -{ - public ShatteringHeatBoss() : base(ActionID.MakeSpell(AID.ShatteringHeatBoss), 4) { } -} - -class BlazingRapture : Components.CastCounter -{ - public BlazingRapture() : base(ActionID.MakeSpell(AID.BlazingRaptureAOE)) { } -} - -class InfernoSpread : Components.SpreadFromCastTargets -{ - public InfernoSpread() : base(ActionID.MakeSpell(AID.InfernoSpreadAOE), 5) { } -} +class ShatteringHeatBoss(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.ShatteringHeatBoss), 4); +class BlazingRapture(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.BlazingRaptureAOE)); +class InfernoSpread(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.InfernoSpreadAOE), 5); [ConfigDisplay(Order = 0x050, Parent = typeof(EndwalkerConfig))] -public class Ex5RubicanteConfig : CooldownPlanningConfigNode -{ - public Ex5RubicanteConfig() : base(90) { } -} +public class Ex5RubicanteConfig() : CooldownPlanningConfigNode(90); [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 924, NameID = 12057)] -public class Ex5Rubicante : BossModule -{ - public Ex5Rubicante(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { } -} +public class Ex5Rubicante(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)); diff --git a/BossMod/Modules/Endwalker/Extreme/Ex5Rubicante/Ex5RubicanteStates.cs b/BossMod/Modules/Endwalker/Extreme/Ex5Rubicante/Ex5RubicanteStates.cs index b67fd496b0..98444b0117 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex5Rubicante/Ex5RubicanteStates.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex5Rubicante/Ex5RubicanteStates.cs @@ -5,7 +5,7 @@ class Ex5RubicanteStates : StateMachineBuilder public Ex5RubicanteStates(BossModule module) : base(module) { SimplePhase(0, Phase1, "Start + adds") - .Raw.Update = () => Module.PrimaryActor.IsDestroyed || Module.PrimaryActor.IsDead || (Module.PrimaryActor.CastInfo?.IsSpell(AID.BlazingRapture) ?? false); + .Raw.Update = () => Module.PrimaryActor.IsDeadOrDestroyed || (Module.PrimaryActor.CastInfo?.IsSpell(AID.BlazingRapture) ?? false); DeathPhase(1, Phase2); } diff --git a/BossMod/Modules/Endwalker/Extreme/Ex5Rubicante/Flamesent.cs b/BossMod/Modules/Endwalker/Extreme/Ex5Rubicante/Flamesent.cs index a8b86d75bf..45efeace4a 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex5Rubicante/Flamesent.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex5Rubicante/Flamesent.cs @@ -1,41 +1,10 @@ namespace BossMod.Endwalker.Extreme.Ex5Rubicante; -class GreaterFlamesent : Components.Adds -{ - public GreaterFlamesent() : base((uint)OID.GreaterFlamesent) { } -} - -class FlamesentNS : Components.Adds -{ - public FlamesentNS() : base((uint)OID.FlamesentNS) { } -} - -class FlamesentSS : Components.Adds -{ - public FlamesentSS() : base((uint)OID.FlamesentSS) { } -} - -class FlamesentNC : Components.Adds -{ - public FlamesentNC() : base((uint)OID.FlamesentNC) { } -} - -class GhastlyTorch : Components.RaidwideCast -{ - public GhastlyTorch() : base(ActionID.MakeSpell(AID.GhastlyTorch)) { } -} - -class ShatteringHeatAdd : Components.TankbusterTether -{ - public ShatteringHeatAdd() : base(ActionID.MakeSpell(AID.ShatteringHeatAdd), (uint)TetherID.ShatteringHeatAdd, 3) { } -} - -class GhastlyWind : Components.BaitAwayTethers -{ - public GhastlyWind() : base(new AOEShapeCone(40, 15.Degrees()), (uint)TetherID.GhastlyWind, ActionID.MakeSpell(AID.GhastlyWind)) { } // TODO: verify angle -} - -class GhastlyFlame : Components.LocationTargetedAOEs -{ - public GhastlyFlame() : base(ActionID.MakeSpell(AID.GhastlyFlameAOE), 5) { } -} +class GreaterFlamesent(BossModule module) : Components.Adds(module, (uint)OID.GreaterFlamesent); +class FlamesentNS(BossModule module) : Components.Adds(module, (uint)OID.FlamesentNS); +class FlamesentSS(BossModule module) : Components.Adds(module, (uint)OID.FlamesentSS); +class FlamesentNC(BossModule module) : Components.Adds(module, (uint)OID.FlamesentNC); +class GhastlyTorch(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.GhastlyTorch)); +class ShatteringHeatAdd(BossModule module) : Components.TankbusterTether(module, ActionID.MakeSpell(AID.ShatteringHeatAdd), (uint)TetherID.ShatteringHeatAdd, 3); +class GhastlyWind(BossModule module) : Components.BaitAwayTethers(module, new AOEShapeCone(40, 15.Degrees()), (uint)TetherID.GhastlyWind, ActionID.MakeSpell(AID.GhastlyWind)); // TODO: verify angle +class GhastlyFlame(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.GhastlyFlameAOE), 5); diff --git a/BossMod/Modules/Endwalker/Extreme/Ex5Rubicante/FlamespireBrand.cs b/BossMod/Modules/Endwalker/Extreme/Ex5Rubicante/FlamespireBrand.cs index b794e1dbf9..ba5471f667 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex5Rubicante/FlamespireBrand.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex5Rubicante/FlamespireBrand.cs @@ -1,14 +1,12 @@ namespace BossMod.Endwalker.Extreme.Ex5Rubicante; -class Welts : Components.GenericStackSpread +class Welts(BossModule module) : Components.GenericStackSpread(module, true) { public enum Mechanic { StackFlare, Spreads, Done } public Mechanic NextMechanic; - public Welts() : base(true) { } - - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { switch ((SID)status.ID) { @@ -21,7 +19,7 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { @@ -29,7 +27,7 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent NextMechanic = Mechanic.Spreads; Stacks.Clear(); Spreads.Clear(); - foreach (var t in module.Raid.WithoutSlot()) + foreach (var t in Raid.WithoutSlot()) Spreads.Add(new(t, 6)); break; case AID.StingingWelt: @@ -40,7 +38,7 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } -class Flamerake : Components.GenericAOEs +class Flamerake(BossModule module) : Components.GenericAOEs(module) { private Angle _offset; private DateTime _activation; @@ -48,14 +46,14 @@ class Flamerake : Components.GenericAOEs private static readonly AOEShapeCross _first = new(20, 6); private static readonly AOEShapeRect _rest = new(8, 20); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_activation == default) yield break; if (NumCasts == 0) { - yield return new(_first, module.Bounds.Center, _offset, _activation); + yield return new(_first, Module.Bounds.Center, _offset, _activation); } else { @@ -63,12 +61,12 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, for (int i = 0; i < 4; ++i) { var dir = i * 90.Degrees() + _offset; - yield return new(_rest, module.Bounds.Center + offset * dir.ToDirection(), dir, _activation); + yield return new(_rest, Module.Bounds.Center + offset * dir.ToDirection(), dir, _activation); } } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { @@ -77,7 +75,7 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent if (NumCasts == 0) { ++NumCasts; - _activation = module.WorldState.CurrentTime.AddSeconds(2.1f); + _activation = WorldState.FutureTime(2.1f); } break; case AID.FlamerakeAOE21: @@ -85,7 +83,7 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent if (NumCasts == 1) { ++NumCasts; - _activation = module.WorldState.CurrentTime.AddSeconds(2.5f); + _activation = WorldState.FutureTime(2.5f); } break; case AID.FlamerakeAOE31: @@ -99,7 +97,7 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } - public override void OnEventEnvControl(BossModule module, byte index, uint state) + public override void OnEventEnvControl(byte index, uint state) { if (index == 4) { @@ -108,12 +106,12 @@ public override void OnEventEnvControl(BossModule module, byte index, uint state case 0x00010001: case 0x00100010: _offset = 45.Degrees(); - _activation = module.WorldState.CurrentTime.AddSeconds(8.5f); + _activation = WorldState.FutureTime(8.5f); break; case 0x00200020: case 0x00800080: _offset = 0.Degrees(); - _activation = module.WorldState.CurrentTime.AddSeconds(8.5f); + _activation = WorldState.FutureTime(8.5f); break; // 00080004 when rotation ends } diff --git a/BossMod/Modules/Endwalker/Extreme/Ex5Rubicante/FlamespireClaw.cs b/BossMod/Modules/Endwalker/Extreme/Ex5Rubicante/FlamespireClaw.cs index 569b4e4b67..40d375c93f 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex5Rubicante/FlamespireClaw.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex5Rubicante/FlamespireClaw.cs @@ -1,17 +1,15 @@ namespace BossMod.Endwalker.Extreme.Ex5Rubicante; -class FlamespireClaw : Components.GenericBaitAway +class FlamespireClaw(BossModule module) : Components.GenericBaitAway(module, ActionID.MakeSpell(AID.FlamespireClawAOE)) { private int[] _order = new int[PartyState.MaxPartySize]; private BitMask _tethers; private static readonly AOEShapeCone _shape = new(20, 45.Degrees()); // TODO: verify angle - public FlamespireClaw() : base(ActionID.MakeSpell(AID.FlamespireClawAOE)) { } - - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { - base.AddHints(module, slot, actor, hints, movementHints); + base.AddHints(slot, actor, hints); var order = _order[slot]; if (order != 0 && NumCasts < 8) @@ -33,48 +31,48 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - base.DrawArenaForeground(module, pcSlot, pc, arena); - foreach (var (_, player) in module.Raid.WithSlot(true).IncludedInMask(_tethers)) - arena.AddLine(player.Position, module.PrimaryActor.Position, ArenaColor.Danger); + base.DrawArenaForeground(pcSlot, pc); + foreach (var (_, player) in Raid.WithSlot(true).IncludedInMask(_tethers)) + Arena.AddLine(player.Position, Module.PrimaryActor.Position, ArenaColor.Danger); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { - base.OnEventCast(module, caster, spell); + base.OnEventCast(caster, spell); if (spell.Action == WatchedAction) { CurrentBaits.Clear(); var nextSlot = Array.IndexOf(_order, NumCasts + 1); - var nextTarget = nextSlot >= 0 ? module.Raid[nextSlot] : null; + var nextTarget = nextSlot >= 0 ? Raid[nextSlot] : null; if (nextTarget != null) - CurrentBaits.Add(new(module.PrimaryActor, nextTarget, _shape)); + CurrentBaits.Add(new(Module.PrimaryActor, nextTarget, _shape)); } } - public override void OnTethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnTethered(Actor source, ActorTetherInfo tether) { if (tether.ID == (uint)TetherID.FlamespireClaw) - _tethers.Set(module.Raid.FindSlot(source.InstanceID)); + _tethers.Set(Raid.FindSlot(source.InstanceID)); } - public override void OnUntethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnUntethered(Actor source, ActorTetherInfo tether) { if (tether.ID == (uint)TetherID.FlamespireClaw) - _tethers.Clear(module.Raid.FindSlot(source.InstanceID)); + _tethers.Clear(Raid.FindSlot(source.InstanceID)); } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID is >= (uint)IconID.FlamespireClaw1 and <= (uint)IconID.FlamespireClaw8) { - var slot = module.Raid.FindSlot(actor.InstanceID); + var slot = Raid.FindSlot(actor.InstanceID); var order = (int)iconID - (int)IconID.FlamespireClaw1 + 1; if (slot >= 0) _order[slot] = order; if (order == 1) - CurrentBaits.Add(new(module.PrimaryActor, actor, _shape)); + CurrentBaits.Add(new(Module.PrimaryActor, actor, _shape)); } } } diff --git a/BossMod/Modules/Endwalker/Extreme/Ex5Rubicante/OrdealOfPurgation.cs b/BossMod/Modules/Endwalker/Extreme/Ex5Rubicante/OrdealOfPurgation.cs index a796cbf11a..beea798644 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex5Rubicante/OrdealOfPurgation.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex5Rubicante/OrdealOfPurgation.cs @@ -10,7 +10,7 @@ // 4. at the same time, all players get 12s penance debuff, which is a deadline to resolve // 5. right after that, boss starts casting visual cast - at this point we start showing the mechanic // 5. penance expires and is replaced with 9s shackles debuff, this happens right before cast end -class OrdealOfPurgation : Components.GenericAOEs +class OrdealOfPurgation(BossModule module) : Components.GenericAOEs(module) { public enum Symbol { Unknown, Tri, Sq } @@ -25,18 +25,18 @@ public enum Symbol { Unknown, Tri, Sq } private static readonly AOEShapeCone _shapeTri = new(60, 30.Degrees()); private static readonly AOEShapeRect _shapeSq = new(20, 40); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_activation != default) { - if (AOEFromDirection(module, _dirInner) is var aoe1 && aoe1 != null) + if (AOEFromDirection(_dirInner) is var aoe1 && aoe1 != null) yield return aoe1.Value; - if (_dirInnerExtra != _dirInner && AOEFromDirection(module, _dirInnerExtra) is var aoe2 && aoe2 != null) + if (_dirInnerExtra != _dirInner && AOEFromDirection(_dirInnerExtra) is var aoe2 && aoe2 != null) yield return aoe2.Value; } } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Pattern) { @@ -59,19 +59,19 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.OrdealOfPurgation) _activation = spell.NPCFinishAt; // note: actual activation is several seconds later, but we need to finish our movements before shackles, so effective activation is around cast end } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.FieryExpiationTri or AID.FieryExpiationSq) ++NumCasts; } - public override void OnActorPlayActionTimelineEvent(BossModule module, Actor actor, ushort id) + public override void OnActorPlayActionTimelineEvent(Actor actor, ushort id) { var symbol = (OID)actor.OID switch { @@ -83,12 +83,12 @@ public override void OnActorPlayActionTimelineEvent(BossModule module, Actor act { var dir = AngleToDirectionIndex(actor.Rotation); if (_symbols[dir] != Symbol.Unknown) - module.ReportError(this, $"Duplicate symbols at {dir}"); + ReportError($"Duplicate symbols at {dir}"); _symbols[dir] = symbol; } } - public override void OnEventEnvControl(BossModule module, byte index, uint state) + public override void OnEventEnvControl(byte index, uint state) { var dir = state switch { @@ -137,11 +137,11 @@ private int TransformByMiddle(int index) _ => null }; - private AOEInstance? AOEFromDirection(BossModule module, int index) + private AOEInstance? AOEFromDirection(int index) { index = TransformByMiddle(index); var shape = ShapeAtDirection(index); var dir = DirectionIndexToAngle(index); - return shape != null ? new(shape, module.Bounds.Center + module.Bounds.HalfSize * dir.ToDirection(), dir + 180.Degrees(), _activation) : null; + return shape != null ? new(shape, Module.Bounds.Center + Module.Bounds.HalfSize * dir.ToDirection(), dir + 180.Degrees(), _activation) : null; } } diff --git a/BossMod/Modules/Endwalker/Extreme/Ex5Rubicante/SweepingImmolation.cs b/BossMod/Modules/Endwalker/Extreme/Ex5Rubicante/SweepingImmolation.cs index 8210df73d1..2bbaf0b196 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex5Rubicante/SweepingImmolation.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex5Rubicante/SweepingImmolation.cs @@ -1,37 +1,11 @@ namespace BossMod.Endwalker.Extreme.Ex5Rubicante; -class SweepingImmolationSpread : Components.SelfTargetedAOEs -{ - public SweepingImmolationSpread() : base(ActionID.MakeSpell(AID.SweepingImmolationSpread), new AOEShapeCone(20, 90.Degrees())) { } -} - -class SweepingImmolationStack : Components.SelfTargetedAOEs -{ - public SweepingImmolationStack() : base(ActionID.MakeSpell(AID.SweepingImmolationStack), new AOEShapeCone(20, 90.Degrees())) { } -} - -class PartialTotalImmolation : Components.CastStackSpread -{ - public PartialTotalImmolation() : base(ActionID.MakeSpell(AID.TotalImmolation), ActionID.MakeSpell(AID.PartialImmolation), 6, 5, 8, 8, true) { } -} - -class ScaldingSignal : Components.SelfTargetedAOEs -{ - public ScaldingSignal() : base(ActionID.MakeSpell(AID.ScaldingSignal), new AOEShapeCircle(10)) { } -} - -class ScaldingRing : Components.SelfTargetedAOEs -{ - public ScaldingRing() : base(ActionID.MakeSpell(AID.ScaldingRing), new AOEShapeDonut(10, 20)) { } -} - -class ScaldingFleetFirst : Components.BaitAwayEveryone -{ - public ScaldingFleetFirst() : base(new AOEShapeRect(40, 3), ActionID.MakeSpell(AID.ScaldingFleetFirst)) { } -} +class SweepingImmolationSpread(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.SweepingImmolationSpread), new AOEShapeCone(20, 90.Degrees())); +class SweepingImmolationStack(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.SweepingImmolationStack), new AOEShapeCone(20, 90.Degrees())); +class PartialTotalImmolation(BossModule module) : Components.CastStackSpread(module, ActionID.MakeSpell(AID.TotalImmolation), ActionID.MakeSpell(AID.PartialImmolation), 6, 5, 8, 8, true); +class ScaldingSignal(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ScaldingSignal), new AOEShapeCircle(10)); +class ScaldingRing(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ScaldingRing), new AOEShapeDonut(10, 20)); +class ScaldingFleetFirst(BossModule module) : Components.BaitAwayEveryone(module, module.PrimaryActor, new AOEShapeRect(40, 3), ActionID.MakeSpell(AID.ScaldingFleetFirst)); // note: it seems to have incorrect target, but acts like self-targeted -class ScaldingFleetSecond : Components.SelfTargetedAOEs -{ - public ScaldingFleetSecond() : base(ActionID.MakeSpell(AID.ScaldingFleetSecond), new AOEShapeRect(60, 3)) { } -} +class ScaldingFleetSecond(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ScaldingFleetSecond), new AOEShapeRect(60, 3)); diff --git a/BossMod/Modules/Endwalker/Extreme/Ex6Golbez/AzdajasShadow.cs b/BossMod/Modules/Endwalker/Extreme/Ex6Golbez/AzdajasShadow.cs index 9463caa16f..7474982d62 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex6Golbez/AzdajasShadow.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex6Golbez/AzdajasShadow.cs @@ -1,18 +1,18 @@ namespace BossMod.Endwalker.Extreme.Ex6Golbez; -class AzdajasShadow : BossComponent +class AzdajasShadow(BossModule module) : BossComponent(module) { public enum Mechanic { Unknown, CircleStack, DonutSpread } public Mechanic CurMechanic { get; private set; } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (CurMechanic != Mechanic.Unknown) hints.Add($"Next mechanic: {(CurMechanic == Mechanic.CircleStack ? "out -> stack" : "in -> spread")}"); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { var mechanic = (AID)spell.Action.ID switch { @@ -25,43 +25,41 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } -class FlamesOfEventide : Components.GenericBaitAway +class FlamesOfEventide(BossModule module) : Components.GenericBaitAway(module, ActionID.MakeSpell(AID.FlamesOfEventide)) { private int[] _playerStacks = new int[PartyState.MaxPartySize]; private static readonly AOEShapeRect _shape = new(50, 3); - public FlamesOfEventide() : base(ActionID.MakeSpell(AID.FlamesOfEventide)) { } - - public override void Update(BossModule module) + public override void Update() { CurrentBaits.Clear(); - var target = module.WorldState.Actors.Find(module.PrimaryActor.TargetID); + var target = WorldState.Actors.Find(Module.PrimaryActor.TargetID); if (target != null) - CurrentBaits.Add(new(module.PrimaryActor, target, _shape)); + CurrentBaits.Add(new(Module.PrimaryActor, target, _shape)); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { - if (module.PrimaryActor.TargetID == actor.InstanceID) + if (Module.PrimaryActor.TargetID == actor.InstanceID) { if (_playerStacks[slot] >= 2) hints.Add("Pass aggro!"); - if (module.Raid.WithoutSlot().Exclude(actor).InShape(_shape, module.PrimaryActor.Position, Angle.FromDirection(actor.Position - module.PrimaryActor.Position)).Any()) + if (Raid.WithoutSlot().Exclude(actor).InShape(_shape, Module.PrimaryActor.Position, Angle.FromDirection(actor.Position - Module.PrimaryActor.Position)).Any()) hints.Add("GTFO from raid!"); } else if (CurrentBaits.Count > 0) { if (IsClippedBy(actor, CurrentBaits[0])) hints.Add("GTFO from tank!"); - if (_playerStacks[slot] < 2 && actor.Role == Role.Tank && module.Raid.FindSlot(module.PrimaryActor.TargetID) is var tankSlot && tankSlot >= 0 && _playerStacks[tankSlot] >= 2) + if (_playerStacks[slot] < 2 && actor.Role == Role.Tank && Raid.FindSlot(Module.PrimaryActor.TargetID) is var tankSlot && tankSlot >= 0 && _playerStacks[tankSlot] >= 2) hints.Add("Taunt!"); } } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { - if ((SID)status.ID == SID.FlamesOfEventide && module.Raid.FindSlot(actor.InstanceID) is var slot && slot >= 0) + if ((SID)status.ID == SID.FlamesOfEventide && Raid.FindSlot(actor.InstanceID) is var slot && slot >= 0) { _playerStacks[slot] = status.Extra; if (status.Extra >= 2) @@ -69,9 +67,9 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st } } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { - if ((SID)status.ID == SID.FlamesOfEventide && module.Raid.FindSlot(actor.InstanceID) is var slot && slot >= 0) + if ((SID)status.ID == SID.FlamesOfEventide && Raid.FindSlot(actor.InstanceID) is var slot && slot >= 0) { _playerStacks[slot] = 0; ForbiddenPlayers.Clear(slot); diff --git a/BossMod/Modules/Endwalker/Extreme/Ex6Golbez/BlackFang.cs b/BossMod/Modules/Endwalker/Extreme/Ex6Golbez/BlackFang.cs index 8af4874b85..e18f3f0151 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex6Golbez/BlackFang.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex6Golbez/BlackFang.cs @@ -1,10 +1,8 @@ namespace BossMod.Endwalker.Extreme.Ex6Golbez; -class BlackFang : Components.CastCounter +class BlackFang(BossModule module) : Components.CastCounter(module, default) { - public BlackFang() : base(default) { } - - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.BlackFangAOE1 or AID.BlackFangAOE2 or AID.BlackFangAOE3) ++NumCasts; diff --git a/BossMod/Modules/Endwalker/Extreme/Ex6Golbez/DoubleMeteor.cs b/BossMod/Modules/Endwalker/Extreme/Ex6Golbez/DoubleMeteor.cs index 0f31ae3881..478a7961c7 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex6Golbez/DoubleMeteor.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex6Golbez/DoubleMeteor.cs @@ -1,66 +1,62 @@ namespace BossMod.Endwalker.Extreme.Ex6Golbez; -class DragonsDescent : Components.Knockback +class DragonsDescent(BossModule module) : Components.Knockback(module, ActionID.MakeSpell(AID.DragonsDescent)) { private Actor? _source; private DateTime _activation; - public DragonsDescent() : base(ActionID.MakeSpell(AID.DragonsDescent)) { } - - public override IEnumerable Sources(BossModule module, int slot, Actor actor) + public override IEnumerable Sources(int slot, Actor actor) { if (_source != null && _source != actor) yield return new(_source.Position, 13, _activation); } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.DragonsDescent) { _source = actor; - _activation = module.WorldState.CurrentTime.AddSeconds(8.2f); + _activation = WorldState.FutureTime(8.2f); } } } -class DoubleMeteor : Components.UniformStackSpread +class DoubleMeteor(BossModule module) : Components.UniformStackSpread(module, 0, 15, alwaysShowSpreads: true) // TODO: verify falloff { - public DoubleMeteor() : base(0, 15, alwaysShowSpreads: true) { } // TODO: verify falloff - - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.DoubleMeteor) - AddSpread(actor, module.WorldState.CurrentTime.AddSeconds(11.1f)); + AddSpread(actor, WorldState.FutureTime(11.1f)); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.DoubleMeteorAOE1 or AID.DoubleMeteorAOE2) Spreads.RemoveAll(s => s.Target.InstanceID == spell.MainTargetID); } } -class Explosion : BossComponent +class Explosion(BossModule module) : BossComponent(module) { public bool Done { get; private set; } private BitMask _forbidden; private Actor? _towerTH; private Actor? _towerDD; - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { var tower = _forbidden[slot] ? null : actor.Class.IsSupport() ? _towerTH : _towerDD; if (tower != null) hints.Add("Soak the tower!", !actor.Position.InCircle(tower.Position, 4)); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - DrawTower(arena, _towerTH, !_forbidden[pcSlot] && pc.Class.IsSupport()); - DrawTower(arena, _towerDD, !_forbidden[pcSlot] && pc.Class.IsDD()); + DrawTower(_towerTH, !_forbidden[pcSlot] && pc.Class.IsSupport()); + DrawTower(_towerDD, !_forbidden[pcSlot] && pc.Class.IsDD()); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { @@ -73,7 +69,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { @@ -88,26 +84,24 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn } } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if ((IconID)iconID is IconID.DoubleMeteor or IconID.DragonsDescent) - _forbidden.Set(module.Raid.FindSlot(actor.InstanceID)); + _forbidden.Set(Raid.FindSlot(actor.InstanceID)); } - private void DrawTower(MiniArena arena, Actor? tower, bool safe) + private void DrawTower(Actor? tower, bool safe) { if (tower != null) - arena.AddCircle(tower.Position, 4, safe ? ArenaColor.Safe : ArenaColor.Danger, 2); + Arena.AddCircle(tower.Position, 4, safe ? ArenaColor.Safe : ArenaColor.Danger, 2); } } -class Cauterize : Components.GenericBaitAway +class Cauterize(BossModule module) : Components.GenericBaitAway(module, ActionID.MakeSpell(AID.Cauterize)) { - public Cauterize() : base(ActionID.MakeSpell(AID.Cauterize)) { } - - public override void OnTethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnTethered(Actor source, ActorTetherInfo tether) { - if (tether.ID == (uint)TetherID.Cauterize && module.WorldState.Actors.Find(tether.Target) is var target && target != null) + if (tether.ID == (uint)TetherID.Cauterize && WorldState.Actors.Find(tether.Target) is var target && target != null) { CurrentBaits.Add(new(source, target, new AOEShapeRect(50, 6))); } diff --git a/BossMod/Modules/Endwalker/Extreme/Ex6Golbez/EventideFallTriad.cs b/BossMod/Modules/Endwalker/Extreme/Ex6Golbez/EventideFallTriad.cs index e1366e81fe..6950dc5588 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex6Golbez/EventideFallTriad.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex6Golbez/EventideFallTriad.cs @@ -1,19 +1,19 @@ namespace BossMod.Endwalker.Extreme.Ex6Golbez; // TODO: improve/generalize -class EventideFallTriad : BossComponent +class EventideFallTriad(BossModule module) : BossComponent(module) { public enum Mechanic { None, Parties, Roles } private Mechanic _curMechanic; - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (_curMechanic != Mechanic.None) hints.Add($"Stack by: {_curMechanic}"); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { var mechanic = (AID)spell.Action.ID switch { diff --git a/BossMod/Modules/Endwalker/Extreme/Ex6Golbez/Ex6Golbez.cs b/BossMod/Modules/Endwalker/Extreme/Ex6Golbez/Ex6Golbez.cs index a255d805f0..3662ac6327 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex6Golbez/Ex6Golbez.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex6Golbez/Ex6Golbez.cs @@ -1,83 +1,22 @@ namespace BossMod.Endwalker.Extreme.Ex6Golbez; -class Terrastorm : Components.SelfTargetedAOEs -{ - public Terrastorm() : base(ActionID.MakeSpell(AID.TerrastormAOE), new AOEShapeCircle(16)) { } -} - -class LingeringSpark : Components.LocationTargetedAOEs -{ - public LingeringSpark() : base(ActionID.MakeSpell(AID.LingeringSparkAOE), 5) { } -} - -class PhasesOfTheBladeFront : Components.SelfTargetedAOEs -{ - public PhasesOfTheBladeFront() : base(ActionID.MakeSpell(AID.PhasesOfTheBlade), new AOEShapeCone(22, 90.Degrees())) { } -} - -class PhasesOfTheBladeBack : Components.SelfTargetedAOEs -{ - public PhasesOfTheBladeBack() : base(ActionID.MakeSpell(AID.PhasesOfTheBladeBack), new AOEShapeCone(22, 90.Degrees())) { } -} - -class PhasesOfTheShadowFront : Components.SelfTargetedAOEs -{ - public PhasesOfTheShadowFront() : base(ActionID.MakeSpell(AID.PhasesOfTheShadow), new AOEShapeCone(22, 90.Degrees())) { } -} - -class PhasesOfTheShadowBack : Components.SelfTargetedAOEs -{ - public PhasesOfTheShadowBack() : base(ActionID.MakeSpell(AID.PhasesOfTheShadowBack), new AOEShapeCone(22, 90.Degrees())) { } -} - -class ArcticAssault : Components.SelfTargetedAOEs -{ - public ArcticAssault() : base(ActionID.MakeSpell(AID.ArcticAssaultAOE), new AOEShapeRect(15, 7.5f)) { } -} - -class RisingBeacon : Components.SelfTargetedAOEs -{ - public RisingBeacon() : base(ActionID.MakeSpell(AID.RisingBeaconAOE), new AOEShapeCircle(10)) { } -} - -class RisingRing : Components.SelfTargetedAOEs -{ - public RisingRing() : base(ActionID.MakeSpell(AID.RisingRingAOE), new AOEShapeDonut(6, 22)) { } -} - -class BurningShade : Components.SpreadFromCastTargets -{ - public BurningShade() : base(ActionID.MakeSpell(AID.BurningShade), 5) { } -} - -class ImmolatingShade : Components.StackWithCastTargets -{ - public ImmolatingShade() : base(ActionID.MakeSpell(AID.ImmolatingShade), 6, 4) { } -} - -class VoidBlizzard : Components.StackWithCastTargets -{ - public VoidBlizzard() : base(ActionID.MakeSpell(AID.VoidBlizzard), 6, 4) { } -} - -class VoidAero : Components.StackWithCastTargets -{ - public VoidAero() : base(ActionID.MakeSpell(AID.VoidAero), 3, 2) { } -} - -class VoidTornado : Components.StackWithCastTargets -{ - public VoidTornado() : base(ActionID.MakeSpell(AID.VoidTornado), 6, 4) { } -} +class Terrastorm(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TerrastormAOE), new AOEShapeCircle(16)); +class LingeringSpark(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.LingeringSparkAOE), 5); +class PhasesOfTheBladeFront(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PhasesOfTheBlade), new AOEShapeCone(22, 90.Degrees())); +class PhasesOfTheBladeBack(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PhasesOfTheBladeBack), new AOEShapeCone(22, 90.Degrees())); +class PhasesOfTheShadowFront(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PhasesOfTheShadow), new AOEShapeCone(22, 90.Degrees())); +class PhasesOfTheShadowBack(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PhasesOfTheShadowBack), new AOEShapeCone(22, 90.Degrees())); +class ArcticAssault(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ArcticAssaultAOE), new AOEShapeRect(15, 7.5f)); +class RisingBeacon(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RisingBeaconAOE), new AOEShapeCircle(10)); +class RisingRing(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RisingRingAOE), new AOEShapeDonut(6, 22)); +class BurningShade(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.BurningShade), 5); +class ImmolatingShade(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.ImmolatingShade), 6, 4); +class VoidBlizzard(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.VoidBlizzard), 6, 4); +class VoidAero(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.VoidAero), 3, 2); +class VoidTornado(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.VoidTornado), 6, 4); [ConfigDisplay(Order = 0x060, Parent = typeof(EndwalkerConfig))] -public class Ex6GolbezConfig : CooldownPlanningConfigNode -{ - public Ex6GolbezConfig() : base(90) { } -} +public class Ex6GolbezConfig() : CooldownPlanningConfigNode(90); [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 950, NameID = 12365)] -public class Ex6Golbez : BossModule -{ - public Ex6Golbez(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsSquare(new(100, 100), 15)) { } -} +public class Ex6Golbez(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsSquare(new(100, 100), 15)); diff --git a/BossMod/Modules/Endwalker/Extreme/Ex6Golbez/GaleSphere.cs b/BossMod/Modules/Endwalker/Extreme/Ex6Golbez/GaleSphere.cs index 0cd26cec4f..e0397b0df4 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex6Golbez/GaleSphere.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex6Golbez/GaleSphere.cs @@ -1,6 +1,6 @@ namespace BossMod.Endwalker.Extreme.Ex6Golbez; -class GaleSphere : Components.GenericAOEs +class GaleSphere(BossModule module) : Components.GenericAOEs(module) { public enum Side { S, E, N, W } // direction = value * 90deg @@ -9,28 +9,28 @@ public enum Side { S, E, N, W } // direction = value * 90deg private static readonly AOEShapeRect _shape = new(30, 2.5f); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (NumCasts < _spheres.Length) foreach (var s in _spheres[NumCasts]) - yield return new(_shape, s.Position, s.CastInfo?.Rotation ?? s.Rotation, s.CastInfo?.NPCFinishAt ?? module.WorldState.CurrentTime); + yield return new(_shape, s.Position, s.CastInfo?.Rotation ?? s.Rotation, s.CastInfo?.NPCFinishAt ?? WorldState.CurrentTime); } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (_sides.Count > NumCasts) hints.Add($"Order: {string.Join(" -> ", _sides.Skip(NumCasts))}"); } // note: PATE 11D5 happens 1.5s before all casts start, but we don't really care - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { var order = CastOrder(spell.Action); if (order >= 0) _spheres[order].Add(caster); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { var order = CastOrder(spell.Action); if (order >= 0) @@ -39,7 +39,7 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn NumCasts = order + 1; } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { diff --git a/BossMod/Modules/Endwalker/Extreme/Ex6Golbez/VoidMeteor.cs b/BossMod/Modules/Endwalker/Extreme/Ex6Golbez/VoidMeteor.cs index a8b73cfe07..d13abf1816 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex6Golbez/VoidMeteor.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex6Golbez/VoidMeteor.cs @@ -1,12 +1,10 @@ namespace BossMod.Endwalker.Extreme.Ex6Golbez; -class VoidMeteor : Components.GenericBaitAway +class VoidMeteor(BossModule module) : Components.GenericBaitAway(module, ActionID.MakeSpell(AID.VoidMeteorAOE), centerAtTarget: true) { - public VoidMeteor() : base(ActionID.MakeSpell(AID.VoidMeteorAOE), centerAtTarget: true) { } - - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.VoidMeteor) - CurrentBaits.Add(new(module.PrimaryActor, actor, new AOEShapeCircle(6))); + CurrentBaits.Add(new(Module.PrimaryActor, actor, new AOEShapeCircle(6))); } } diff --git a/BossMod/Modules/Endwalker/Extreme/Ex6Golbez/VoidStardust.cs b/BossMod/Modules/Endwalker/Extreme/Ex6Golbez/VoidStardust.cs index cc6ceb0b48..c1f60e91e3 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex6Golbez/VoidStardust.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex6Golbez/VoidStardust.cs @@ -1,12 +1,12 @@ namespace BossMod.Endwalker.Extreme.Ex6Golbez; -class VoidStardust : Components.GenericAOEs +class VoidStardust(BossModule module) : Components.GenericAOEs(module) { private List<(WPos pos, DateTime activation)> _aoes = new(); private static readonly AOEShapeCircle _shape = new(6); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { foreach (var aoe in _aoes.Skip(NumCasts + 2).Take(10)) yield return new(_shape, aoe.pos, default, aoe.activation); @@ -14,7 +14,7 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, yield return new(_shape, aoe.pos, default, aoe.activation, ArenaColor.Danger); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { @@ -27,14 +27,11 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.VoidStardustFirst or AID.VoidStardustRestAOE) ++NumCasts; } } -class AbyssalQuasar : Components.StackWithCastTargets -{ - public AbyssalQuasar() : base(ActionID.MakeSpell(AID.AbyssalQuasar), 3, 2) { } -} +class AbyssalQuasar(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.AbyssalQuasar), 3, 2); diff --git a/BossMod/Modules/Endwalker/Extreme/Ex7Zeromus/BlackHole.cs b/BossMod/Modules/Endwalker/Extreme/Ex7Zeromus/BlackHole.cs index 5d3bd7242e..c49f6088b5 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex7Zeromus/BlackHole.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex7Zeromus/BlackHole.cs @@ -1,7 +1,7 @@ namespace BossMod.Endwalker.Extreme.Ex7Zeromus; // TODO: find out starting/ending radius, growth speed, etc -class BlackHole : BossComponent +class BlackHole(BossModule module) : BossComponent(module) { public Actor? Baiter; public Actor? Voidzone; @@ -12,11 +12,11 @@ class BlackHole : BossComponent private static readonly float _maxRadius = 35; private static readonly float _growthPerSecond = 3.3f; - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (Baiter == actor) { - if (module.Raid.WithoutSlot().InRadiusExcluding(actor, _startingRadius).Any()) + if (Raid.WithoutSlot().InRadiusExcluding(actor, _startingRadius).Any()) hints.Add("GTFO from raid!"); } else if (Baiter != null) @@ -26,24 +26,24 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } } - public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) + public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) { return player == Baiter ? PlayerPriority.Danger : PlayerPriority.Irrelevant; } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { if (Voidzone != null) - arena.ZoneCircle(Voidzone.Position, _growthStart == default ? _startingRadius : Math.Min(_maxRadius, _startingRadius + _growthPerSecond * (float)(module.WorldState.CurrentTime - _growthStart).TotalSeconds), ArenaColor.AOE); + Arena.ZoneCircle(Voidzone.Position, _growthStart == default ? _startingRadius : Math.Min(_maxRadius, _startingRadius + _growthPerSecond * (float)(WorldState.CurrentTime - _growthStart).TotalSeconds), ArenaColor.AOE); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (Baiter != null) - arena.AddCircle(Baiter.Position, _startingRadius, ArenaColor.Danger); + Arena.AddCircle(Baiter.Position, _startingRadius, ArenaColor.Danger); } - public override void OnActorCreated(BossModule module, Actor actor) + public override void OnActorCreated(Actor actor) { if ((OID)actor.OID == OID.BlackHole) { @@ -52,7 +52,7 @@ public override void OnActorCreated(BossModule module, Actor actor) } } - public override void OnActorEAnim(BossModule module, Actor actor, uint state) + public override void OnActorEAnim(Actor actor, uint state) { if (actor == Voidzone) { @@ -60,7 +60,7 @@ public override void OnActorEAnim(BossModule module, Actor actor, uint state) { // 00010002 - appear case 0x00100008: - _growthStart = module.WorldState.CurrentTime; + _growthStart = WorldState.CurrentTime; break; case 0x00040020: Voidzone = null; @@ -69,14 +69,14 @@ public override void OnActorEAnim(BossModule module, Actor actor, uint state) } } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.BlackHole) Baiter = actor; } } -class FracturedEventide : Components.GenericAOEs +class FracturedEventide(BossModule module) : Components.GenericAOEs(module) { private Actor? _source; private Angle _startingRotation; @@ -86,7 +86,7 @@ class FracturedEventide : Components.GenericAOEs private static readonly AOEShapeRect _shape = new(60, 4); private static readonly int _maxCasts = 21; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_source == null) yield break; @@ -97,7 +97,7 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, yield return new(_shape, _source.Position, _startingRotation + NumCasts * _increment, _startingActivation.AddSeconds(0.5f * NumCasts), ArenaColor.Danger); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.FracturedEventideAOEFirst) { @@ -108,7 +108,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.FracturedEventideAOEFirst or AID.FracturedEventideAOERest) ++NumCasts; diff --git a/BossMod/Modules/Endwalker/Extreme/Ex7Zeromus/DarkMatter.cs b/BossMod/Modules/Endwalker/Extreme/Ex7Zeromus/DarkMatter.cs index a2701fe854..c345fba592 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex7Zeromus/DarkMatter.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex7Zeromus/DarkMatter.cs @@ -1,6 +1,6 @@ namespace BossMod.Endwalker.Extreme.Ex7Zeromus; -class DarkMatter : Components.GenericBaitAway +class DarkMatter(BossModule module) : Components.GenericBaitAway(module, centerAtTarget: true) { private List _remainingCasts = new(); @@ -8,9 +8,7 @@ class DarkMatter : Components.GenericBaitAway public int RemainingCasts => _remainingCasts.Count > 0 ? _remainingCasts.Min() : 0; - public DarkMatter() : base(centerAtTarget: true) { } - - public override void Update(BossModule module) + public override void Update() { for (int i = CurrentBaits.Count - 1; i >= 0; i--) { @@ -22,16 +20,16 @@ public override void Update(BossModule module) } } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.DarkMatter) { - CurrentBaits.Add(new(module.PrimaryActor, actor, _shape)); + CurrentBaits.Add(new(Module.PrimaryActor, actor, _shape)); _remainingCasts.Add(3); } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.DarkMatterAOE) { @@ -45,31 +43,29 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } -class ForkedLightningDarkBeckons : Components.UniformStackSpread +class ForkedLightningDarkBeckons(BossModule module) : Components.UniformStackSpread(module, 6, 5, 4, alwaysShowSpreads: true) { - public ForkedLightningDarkBeckons() : base(6, 5, 4, alwaysShowSpreads: true) { } - - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.ForkedLightning) AddSpread(actor, status.ExpireAt); } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { switch ((IconID)iconID) { case IconID.DarkBeckonsUmbralRays: - AddStack(actor, module.WorldState.CurrentTime.AddSeconds(5.1f)); + AddStack(actor, WorldState.FutureTime(5.1f)); break; case IconID.DarkMatter: foreach (ref var s in Stacks.AsSpan()) - s.ForbiddenPlayers.Set(module.Raid.FindSlot(actor.InstanceID)); + s.ForbiddenPlayers.Set(Raid.FindSlot(actor.InstanceID)); break; } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.ForkedLightning or AID.DarkBeckons) { diff --git a/BossMod/Modules/Endwalker/Extreme/Ex7Zeromus/Ex7Zeromus.cs b/BossMod/Modules/Endwalker/Extreme/Ex7Zeromus/Ex7Zeromus.cs index d7c3fa5cac..c23a2ef5c7 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex7Zeromus/Ex7Zeromus.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex7Zeromus/Ex7Zeromus.cs @@ -1,38 +1,13 @@ namespace BossMod.Endwalker.Extreme.Ex7Zeromus; -class AbyssalEchoes : Components.SelfTargetedAOEs -{ - public AbyssalEchoes() : base(ActionID.MakeSpell(AID.AbyssalEchoes), new AOEShapeCircle(12), 5) { } -} - -class BigBangPuddle : Components.LocationTargetedAOEs -{ - public BigBangPuddle() : base(ActionID.MakeSpell(AID.BigBangAOE), 5) { } -} - -class BigBangSpread : Components.SpreadFromCastTargets -{ - public BigBangSpread() : base(ActionID.MakeSpell(AID.BigBangSpread), 5) { } -} - -class BigCrunchPuddle : Components.LocationTargetedAOEs -{ - public BigCrunchPuddle() : base(ActionID.MakeSpell(AID.BigCrunchAOE), 5) { } -} - -class BigCrunchSpread : Components.SpreadFromCastTargets -{ - public BigCrunchSpread() : base(ActionID.MakeSpell(AID.BigCrunchSpread), 5) { } -} +class AbyssalEchoes(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.AbyssalEchoes), new AOEShapeCircle(12), 5); +class BigBangPuddle(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.BigBangAOE), 5); +class BigBangSpread(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.BigBangSpread), 5); +class BigCrunchPuddle(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.BigCrunchAOE), 5); +class BigCrunchSpread(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.BigCrunchSpread), 5); [ConfigDisplay(Order = 0x070, Parent = typeof(EndwalkerConfig))] -public class Ex7ZeromusConfig : CooldownPlanningConfigNode -{ - public Ex7ZeromusConfig() : base(90) { } -} +public class Ex7ZeromusConfig() : CooldownPlanningConfigNode(90); [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 965, NameID = 12586)] -public class Ex7Zeromus : BossModule -{ - public Ex7Zeromus(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsSquare(new(100, 100), 20)) { } -} +public class Ex7Zeromus(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsSquare(new(100, 100), 20)); diff --git a/BossMod/Modules/Endwalker/Extreme/Ex7Zeromus/Flare.cs b/BossMod/Modules/Endwalker/Extreme/Ex7Zeromus/Flare.cs index fc083c7ca0..b6da8f2566 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex7Zeromus/Flare.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex7Zeromus/Flare.cs @@ -1,24 +1,21 @@ namespace BossMod.Endwalker.Extreme.Ex7Zeromus; -class FlareTowers : Components.CastTowers -{ - public FlareTowers() : base(ActionID.MakeSpell(AID.FlareAOE), 5, 4, 4) { } -} +class FlareTowers(BossModule module) : Components.CastTowers(module, ActionID.MakeSpell(AID.FlareAOE), 5, 4, 4); -class FlareScald : Components.GenericAOEs +class FlareScald(BossModule module) : Components.GenericAOEs(module) { private List _aoes = new(); private static readonly AOEShapeCircle _shape = new(5); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => _aoes; + public override IEnumerable ActiveAOEs(int slot, Actor actor) => _aoes; - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { case AID.FlareAOE: - _aoes.Add(new(_shape, caster.Position, default, module.WorldState.CurrentTime.AddSeconds(2.1f))); + _aoes.Add(new(_shape, caster.Position, default, WorldState.FutureTime(2.1f))); break; case AID.FlareScald: case AID.FlareKill: @@ -28,25 +25,19 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } -class ProminenceSpine : Components.SelfTargetedAOEs -{ - public ProminenceSpine() : base(ActionID.MakeSpell(AID.ProminenceSpine), new AOEShapeRect(60, 5)) { } -} - -class SparklingBrandingFlare : Components.CastStackSpread -{ - public SparklingBrandingFlare() : base(ActionID.MakeSpell(AID.BrandingFlareAOE), ActionID.MakeSpell(AID.SparkingFlareAOE), 4, 4) { } -} +class ProminenceSpine(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ProminenceSpine), new AOEShapeRect(60, 5)); +class SparklingBrandingFlare(BossModule module) : Components.CastStackSpread(module, ActionID.MakeSpell(AID.BrandingFlareAOE), ActionID.MakeSpell(AID.SparkingFlareAOE), 4, 4); class Nox : Components.StandardChasingAOEs { - public Nox() : base(new AOEShapeCircle(10), ActionID.MakeSpell(AID.NoxAOEFirst), ActionID.MakeSpell(AID.NoxAOERest), 5.5f, 1.6f, 5) { } - - public override void Init(BossModule module) => ExcludedTargets = module.Raid.WithSlot(true).Mask(); + public Nox(BossModule module) : base(module, new AOEShapeCircle(10), ActionID.MakeSpell(AID.NoxAOEFirst), ActionID.MakeSpell(AID.NoxAOERest), 5.5f, 1.6f, 5) + { + ExcludedTargets = Raid.WithSlot(true).Mask(); + } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.Nox) - ExcludedTargets.Clear(module.Raid.FindSlot(actor.InstanceID)); + ExcludedTargets.Clear(Raid.FindSlot(actor.InstanceID)); } } diff --git a/BossMod/Modules/Endwalker/Extreme/Ex7Zeromus/FlowOfTheAbyss.cs b/BossMod/Modules/Endwalker/Extreme/Ex7Zeromus/FlowOfTheAbyss.cs index d1a7354fa7..d3d83ffddc 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex7Zeromus/FlowOfTheAbyss.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex7Zeromus/FlowOfTheAbyss.cs @@ -1,29 +1,26 @@ namespace BossMod.Endwalker.Extreme.Ex7Zeromus; -class FlowOfTheAbyssDimensionalSurge : Components.SelfTargetedAOEs -{ - public FlowOfTheAbyssDimensionalSurge() : base(ActionID.MakeSpell(AID.FlowOfTheAbyssDimensionalSurge), new AOEShapeRect(60, 7)) { } -} +class FlowOfTheAbyssDimensionalSurge(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.FlowOfTheAbyssDimensionalSurge), new AOEShapeRect(60, 7)); -class FlowOfTheAbyssSpreadStack : Components.GenericStackSpread +class FlowOfTheAbyssSpreadStack(BossModule module) : Components.GenericStackSpread(module) { - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { switch ((IconID)iconID) { case IconID.AkhRhai: - Spreads.Add(new(actor, 5, module.WorldState.CurrentTime.AddSeconds(5))); + Spreads.Add(new(actor, 5, WorldState.FutureTime(5))); break; case IconID.DarkBeckonsUmbralRays: - Stacks.Add(new(actor, 6, 8, 8, module.WorldState.CurrentTime.AddSeconds(5))); + Stacks.Add(new(actor, 6, 8, 8, WorldState.FutureTime(5))); break; case IconID.UmbralPrism: - Stacks.Add(new(actor, 5, 2, 2, module.WorldState.CurrentTime.AddSeconds(5))); + Stacks.Add(new(actor, 5, 2, 2, WorldState.FutureTime(5))); break; } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.AkhRhaiStart or AID.UmbralRays or AID.UmbralPrism) { @@ -33,15 +30,15 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } -class FlowOfTheAbyssAkhRhai : Components.GenericAOEs +class FlowOfTheAbyssAkhRhai(BossModule module) : Components.GenericAOEs(module) { private List _aoes = new(); private static readonly AOEShapeCircle _shape = new(5); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => _aoes; + public override IEnumerable ActiveAOEs(int slot, Actor actor) => _aoes; - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { @@ -56,21 +53,21 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } -class ChasmicNails : Components.GenericAOEs +class ChasmicNails(BossModule module) : Components.GenericAOEs(module) { private List<(Angle rot, DateTime activation)> _angles = new(); private static readonly AOEShapeCone _shape = new(60, 20.Degrees()); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { foreach (var a in _angles.Skip(1).Take(2)) - yield return new(_shape, module.PrimaryActor.Position, a.rot, a.activation); + yield return new(_shape, Module.PrimaryActor.Position, a.rot, a.activation); if (_angles.Count > 0) - yield return new(_shape, module.PrimaryActor.Position, _angles[0].rot, _angles[0].activation, ArenaColor.Danger); + yield return new(_shape, Module.PrimaryActor.Position, _angles[0].rot, _angles[0].activation, ArenaColor.Danger); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.ChasmicNailsAOE1 or AID.ChasmicNailsAOE2 or AID.ChasmicNailsAOE3 or AID.ChasmicNailsAOE4 or AID.ChasmicNailsAOE5) { @@ -79,7 +76,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.ChasmicNailsAOE1 or AID.ChasmicNailsAOE2 or AID.ChasmicNailsAOE3 or AID.ChasmicNailsAOE4 or AID.ChasmicNailsAOE5) { diff --git a/BossMod/Modules/Endwalker/Extreme/Ex7Zeromus/Nostalgia.cs b/BossMod/Modules/Endwalker/Extreme/Ex7Zeromus/Nostalgia.cs index 956ae2f2d2..92de04e1fc 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex7Zeromus/Nostalgia.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex7Zeromus/Nostalgia.cs @@ -1,15 +1,10 @@ namespace BossMod.Endwalker.Extreme.Ex7Zeromus; -class NostalgiaDimensionalSurge : Components.LocationTargetedAOEs -{ - public NostalgiaDimensionalSurge() : base(ActionID.MakeSpell(AID.NostalgiaDimensionalSurge), 5) { } -} +class NostalgiaDimensionalSurge(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.NostalgiaDimensionalSurge), 5); -class Nostalgia : Components.CastCounter +class Nostalgia(BossModule module) : Components.CastCounter(module, default) { - public Nostalgia() : base(default) { } - - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.NostalgiaBury1 or AID.NostalgiaBury2 or AID.NostalgiaBury3 or AID.NostalgiaBury4 or AID.NostalgiaRoar1 or AID.NostalgiaRoar2 or AID.NostalgiaPrimalRoar) ++NumCasts; diff --git a/BossMod/Modules/Endwalker/Extreme/Ex7Zeromus/SableThread.cs b/BossMod/Modules/Endwalker/Extreme/Ex7Zeromus/SableThread.cs index 5faaf4a847..81538de399 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex7Zeromus/SableThread.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex7Zeromus/SableThread.cs @@ -1,19 +1,14 @@ namespace BossMod.Endwalker.Extreme.Ex7Zeromus; -class SableThread : Components.GenericWildCharge +class SableThread(BossModule module) : Components.GenericWildCharge(module, 6, ActionID.MakeSpell(AID.SableThreadAOE), 60) { - public SableThread() : base(6, ActionID.MakeSpell(AID.SableThreadAOE)) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { - FixedLength = 60; - } - - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) - { - base.OnEventCast(module, caster, spell); + base.OnEventCast(caster, spell); if ((AID)spell.Action.ID == AID.SableThreadTarget) { Source = caster; - foreach (var (i, p) in module.Raid.WithSlot(true)) + foreach (var (i, p) in Raid.WithSlot(true)) PlayerRoles[i] = p.InstanceID == spell.MainTargetID ? PlayerRole.Target : p.Role == Role.Tank ? PlayerRole.Share : PlayerRole.ShareNotFirst; } } diff --git a/BossMod/Modules/Endwalker/Extreme/Ex7Zeromus/VisceralWhirl.cs b/BossMod/Modules/Endwalker/Extreme/Ex7Zeromus/VisceralWhirl.cs index f29f7051b8..039e90def6 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex7Zeromus/VisceralWhirl.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex7Zeromus/VisceralWhirl.cs @@ -1,7 +1,7 @@ namespace BossMod.Endwalker.Extreme.Ex7Zeromus; // note: apparently there's a slight overlap between aoes in the center, which looks ugly, but at least that's the truth... -class VisceralWhirl : Components.GenericAOEs +class VisceralWhirl(BossModule module) : Components.GenericAOEs(module) { private List _aoes = new(); @@ -10,9 +10,9 @@ class VisceralWhirl : Components.GenericAOEs public bool Active => _aoes.Count > 0; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => _aoes; + public override IEnumerable ActiveAOEs(int slot, Actor actor) => _aoes; - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { @@ -29,61 +29,55 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.VisceralWhirlRAOE1 or AID.VisceralWhirlRAOE2 or AID.VisceralWhirlLAOE1 or AID.VisceralWhirlLAOE2) _aoes.RemoveAll(a => a.Rotation.AlmostEqual(spell.Rotation, 0.05f)); } } -class MiasmicBlast : Components.SelfTargetedAOEs -{ - public MiasmicBlast() : base(ActionID.MakeSpell(AID.MiasmicBlast), new AOEShapeCross(60, 5)) { } -} +class MiasmicBlast(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.MiasmicBlast), new AOEShapeCross(60, 5)); class VoidBio : Components.GenericAOEs { - private IReadOnlyList _bubbles = ActorEnumeration.EmptyList; + private IReadOnlyList _bubbles; private static readonly AOEShapeCircle _shape = new(2); // TODO: verify explosion radius - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => _bubbles.Where(actor => !actor.IsDead).Select(b => new AOEInstance(_shape, b.Position)); - - public override void Init(BossModule module) + public VoidBio(BossModule module) : base(module) { _bubbles = module.Enemies(OID.ToxicBubble); } + + public override IEnumerable ActiveAOEs(int slot, Actor actor) => _bubbles.Where(actor => !actor.IsDead).Select(b => new AOEInstance(_shape, b.Position)); } -class BondsOfDarkness : BossComponent +class BondsOfDarkness(BossModule module) : BossComponent(module) { public int NumTethers { get; private set; } private int[] _partners = Utils.MakeArray(PartyState.MaxPartySize, -1); - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_partners[slot] >= 0) hints.Add("Break tether!"); } - public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) - { - return _partners[pcSlot] == playerSlot ? PlayerPriority.Interesting : PlayerPriority.Irrelevant; - } + public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) => _partners[pcSlot] == playerSlot ? PlayerPriority.Interesting : PlayerPriority.Irrelevant; - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - var partner = module.Raid[_partners[pcSlot]]; + var partner = Raid[_partners[pcSlot]]; if (partner != null) - arena.AddLine(pc.Position, partner.Position, ArenaColor.Danger); + Arena.AddLine(pc.Position, partner.Position, ArenaColor.Danger); } - public override void OnTethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnTethered(Actor source, ActorTetherInfo tether) { if (tether.ID == (uint)TetherID.BondsOfDarkness) { - var slot1 = module.Raid.FindSlot(source.InstanceID); - var slot2 = module.Raid.FindSlot(tether.Target); + var slot1 = Raid.FindSlot(source.InstanceID); + var slot2 = Raid.FindSlot(tether.Target); if (slot1 >= 0 && slot2 >= 0) { ++NumTethers; @@ -93,12 +87,12 @@ public override void OnTethered(BossModule module, Actor source, ActorTetherInfo } } - public override void OnUntethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnUntethered(Actor source, ActorTetherInfo tether) { if (tether.ID == (uint)TetherID.BondsOfDarkness) { - var slot1 = module.Raid.FindSlot(source.InstanceID); - var slot2 = module.Raid.FindSlot(tether.Target); + var slot1 = Raid.FindSlot(source.InstanceID); + var slot2 = Raid.FindSlot(tether.Target); if (slot1 >= 0 && slot2 >= 0) { --NumTethers; @@ -109,17 +103,15 @@ public override void OnUntethered(BossModule module, Actor source, ActorTetherIn } } -class DarkDivides : Components.UniformStackSpread +class DarkDivides(BossModule module) : Components.UniformStackSpread(module, 0, 5) { - public DarkDivides() : base(0, 5) { } - - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.DivisiveDark) AddSpread(actor, status.ExpireAt); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.DarkDivides) Spreads.Clear(); diff --git a/BossMod/Modules/Endwalker/Extreme/Ex7Zeromus/VoidMeteor.cs b/BossMod/Modules/Endwalker/Extreme/Ex7Zeromus/VoidMeteor.cs index 13c11ab745..9f9d0373e9 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex7Zeromus/VoidMeteor.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex7Zeromus/VoidMeteor.cs @@ -1,11 +1,8 @@ namespace BossMod.Endwalker.Extreme.Ex7Zeromus; -class MeteorImpactProximity : Components.SelfTargetedAOEs -{ - public MeteorImpactProximity() : base(ActionID.MakeSpell(AID.MeteorImpactProximity), new AOEShapeCircle(10)) { } // TODO: verify falloff -} +class MeteorImpactProximity(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.MeteorImpactProximity), new AOEShapeCircle(10)); // TODO: verify falloff -class MeteorImpactCharge : BossComponent +class MeteorImpactCharge(BossModule module) : BossComponent(module) { struct PlayerState { @@ -26,7 +23,7 @@ struct PlayerState private static readonly int _otherThickness = 1; private static readonly bool _drawShadows = true; - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (SourceIfActive(slot) != null) { @@ -36,31 +33,28 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint hints.Add("Stretch the tether!"); } - if (IsClippedByOthers(module, actor)) + if (IsClippedByOthers(actor)) hints.Add("GTFO from charges!"); } - public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) - { - return SourceIfActive(playerSlot) != null ? PlayerPriority.Interesting : PlayerPriority.Normal; - } + public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) => SourceIfActive(playerSlot) != null ? PlayerPriority.Interesting : PlayerPriority.Normal; - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { if (_drawShadows && SourceIfActive(pcSlot) is var source && source != null) { ref var state = ref _playerStates.AsSpan()[pcSlot]; - state.DangerZone ??= arena.Bounds.ClipAndTriangulate(new Clip2D().Union(_meteors.Select(m => BuildShadowPolygon(source.Position, m)))); - arena.Zone(state.DangerZone, ArenaColor.AOE); + state.DangerZone ??= Arena.Bounds.ClipAndTriangulate(new Clip2D().Union(_meteors.Select(m => BuildShadowPolygon(source.Position, m)))); + Arena.Zone(state.DangerZone, ArenaColor.AOE); } } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (var m in _meteors) - arena.AddCircle(m, _radius, ArenaColor.Object); + Arena.AddCircle(m, _radius, ArenaColor.Object); - foreach (var (slot, target) in module.Raid.WithSlot(true)) + foreach (var (slot, target) in Raid.WithSlot(true)) { if (SourceIfActive(slot) is var source && source != null) { @@ -69,21 +63,21 @@ public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc { var norm = (target.Position - source.Position).Normalized().OrthoL() * 2; var rot = Angle.FromDirection(target.Position - source.Position); - arena.PathArcTo(target.Position, 2, (rot + 90.Degrees()).Rad, (rot - 90.Degrees()).Rad); - arena.PathLineTo(source.Position - norm); - arena.PathLineTo(source.Position + norm); - arena.PathStroke(true, _playerStates[slot].NonClipping ? ArenaColor.Safe : ArenaColor.Danger, thickness); - arena.AddLine(source.Position, target.Position, _playerStates[slot].Stretched ? ArenaColor.Safe : ArenaColor.Danger, thickness); + Arena.PathArcTo(target.Position, 2, (rot + 90.Degrees()).Rad, (rot - 90.Degrees()).Rad); + Arena.PathLineTo(source.Position - norm); + Arena.PathLineTo(source.Position + norm); + Arena.PathStroke(true, _playerStates[slot].NonClipping ? ArenaColor.Safe : ArenaColor.Danger, thickness); + Arena.AddLine(source.Position, target.Position, _playerStates[slot].Stretched ? ArenaColor.Safe : ArenaColor.Danger, thickness); } } } // circle showing approximate min stretch distance; for second order, we might be forced to drop meteor there and die to avoid wipe if (SourceIfActive(pcSlot) is var pcSource && pcSource != null) - arena.AddCircle(pcSource.Position, 26, ArenaColor.Danger); + Arena.AddCircle(pcSource.Position, 26, ArenaColor.Danger); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { @@ -94,16 +88,16 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent case AID.MeteorImpactChargeClipping: _meteors.Add(spell.TargetXZ); ++NumCasts; - var (closestSlot, closestPlayer) = module.Raid.WithSlot(true).Closest(spell.TargetXZ); + var (closestSlot, closestPlayer) = Raid.WithSlot(true).Closest(spell.TargetXZ); if (closestPlayer != null) _playerStates[closestSlot].TetherSource = null; break; } } - public override void OnTethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnTethered(Actor source, ActorTetherInfo tether) { - if ((TetherID)tether.ID is TetherID.VoidMeteorCloseClipping or TetherID.VoidMeteorCloseGood or TetherID.VoidMeteorStretchedClipping or TetherID.VoidMeteorStretchedGood && module.Raid.FindSlot(tether.Target) is var slot && slot >= 0) + if ((TetherID)tether.ID is TetherID.VoidMeteorCloseClipping or TetherID.VoidMeteorCloseGood or TetherID.VoidMeteorStretchedClipping or TetherID.VoidMeteorStretchedGood && Raid.FindSlot(tether.Target) is var slot && slot >= 0) { if (_playerStates[slot].TetherSource == null) _playerStates[slot].Order = _numTethers++; @@ -136,16 +130,13 @@ private IEnumerable BuildShadowPolygon(WPos source, WPos meteor) private bool IsClipped(WPos source, WPos target, WPos position) => position.InCircle(target, _radius) || position.InRect(source, target - source, _radius); - private bool IsClippedByOthers(BossModule module, Actor player) + private bool IsClippedByOthers(Actor player) { - foreach (var (i, p) in module.Raid.WithSlot(true).Exclude(player)) + foreach (var (i, p) in Raid.WithSlot(true).Exclude(player)) if (SourceIfActive(i) is var src && src != null && IsClipped(src.Position, p.Position, player.Position)) return true; return false; } } -class MeteorImpactExplosion : Components.SelfTargetedAOEs -{ - public MeteorImpactExplosion() : base(ActionID.MakeSpell(AID.MeteorImpactExplosion), new AOEShapeCircle(10)) { } -} +class MeteorImpactExplosion(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.MeteorImpactExplosion), new AOEShapeCircle(10)); diff --git a/BossMod/Modules/Endwalker/FATE/Chi.cs b/BossMod/Modules/Endwalker/FATE/Chi.cs index 89f8dd1335..2cbd8b593f 100644 --- a/BossMod/Modules/Endwalker/FATE/Chi.cs +++ b/BossMod/Modules/Endwalker/FATE/Chi.cs @@ -46,7 +46,7 @@ public enum AID : uint ThermobaricExplosive2 = 25966, // Helper1->location, 10,0s cast, range 55 circle, damage fall off AOE } -class Bunkerbuster : Components.GenericAOEs +class Bunkerbuster(BossModule module) : Components.GenericAOEs(module) { private readonly List _casters = []; private DateTime _activation; @@ -54,7 +54,7 @@ class Bunkerbuster : Components.GenericAOEs private static readonly AOEShapeRect rect = new(10, 10, 10); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_casters.Count >= 3) for (int i = 0; i < 3; ++i) @@ -64,7 +64,7 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, yield return new(rect, _casters[i].Position, _casters[i].Rotation, _activation.AddSeconds(1.9f)); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.BunkerBuster2 && NumCastsStarted == 0) { @@ -78,7 +78,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.BunkerBuster2 or AID.BunkerBuster3) { @@ -95,18 +95,18 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn } } - public override void OnActorCreated(BossModule module, Actor actor) + public override void OnActorCreated(Actor actor) { if ((OID)actor.OID is OID.Helper3 or OID.Helper6) { _casters.Add(actor); if (_casters.Count == 1) - _activation = module.WorldState.CurrentTime.AddSeconds(20); //placeholder value that gets overwritten when cast actually starts + _activation = WorldState.FutureTime(20); //placeholder value that gets overwritten when cast actually starts } } } -class BouncingBomb : Components.GenericAOEs +class BouncingBomb(BossModule module) : Components.GenericAOEs(module) { private readonly List _casters = []; private DateTime _activation; @@ -114,7 +114,7 @@ class BouncingBomb : Components.GenericAOEs private static readonly AOEShapeRect rect = new(10, 10, 10); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (bombcount == 1) { @@ -153,24 +153,24 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, } } - public override void OnActorCreated(BossModule module, Actor actor) + public override void OnActorCreated(Actor actor) { if ((OID)actor.OID == OID.Helper4) { - _activation = module.WorldState.CurrentTime.AddSeconds(10); //placeholder value that gets overwritten when cast actually starts + _activation = WorldState.FutureTime(10); //placeholder value that gets overwritten when cast actually starts ++bombcount; } if ((OID)actor.OID is OID.Helper4 or OID.Helper5) _casters.Add(actor); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.BouncingBomb2) _activation = spell.NPCFinishAt; } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.BouncingBomb2 or AID.BouncingBomb3) { @@ -188,36 +188,36 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn } } -class Combos : Components.GenericAOEs +class Combos(BossModule module) : Components.GenericAOEs(module) { private static readonly AOEShapeCone cone = new(45, 90.Degrees()); private static readonly AOEShapeDonut donut = new(16, 60); private static readonly AOEShapeRect rect = new(60, 16, 60); private (AOEShape shape1, AOEShape shape2, DateTime activation1, DateTime activation2, bool offset, Angle rotation) combo; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (combo != default) { if (NumCasts == 0) { - yield return new(combo.shape1, module.PrimaryActor.Position, combo.rotation, combo.activation1, ArenaColor.Danger); + yield return new(combo.shape1, Module.PrimaryActor.Position, combo.rotation, combo.activation1, ArenaColor.Danger); if (!combo.offset) - yield return new(combo.shape2, module.PrimaryActor.Position, combo.rotation, combo.activation2, risky: combo.shape1 != combo.shape2); + yield return new(combo.shape2, Module.PrimaryActor.Position, combo.rotation, combo.activation2, risky: combo.shape1 != combo.shape2); else - yield return new(combo.shape2, module.PrimaryActor.Position, combo.rotation + 180.Degrees(), combo.activation2, risky: combo.shape1 != combo.shape2); + yield return new(combo.shape2, Module.PrimaryActor.Position, combo.rotation + 180.Degrees(), combo.activation2, risky: combo.shape1 != combo.shape2); } if (NumCasts == 1) { if (!combo.offset) - yield return new(combo.shape2, module.PrimaryActor.Position, combo.rotation, combo.activation2, ArenaColor.Danger); + yield return new(combo.shape2, Module.PrimaryActor.Position, combo.rotation, combo.activation2, ArenaColor.Danger); else - yield return new(combo.shape2, module.PrimaryActor.Position, combo.rotation + 180.Degrees(), combo.activation2, ArenaColor.Danger); + yield return new(combo.shape2, Module.PrimaryActor.Position, combo.rotation + 180.Degrees(), combo.activation2, ArenaColor.Danger); } } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { @@ -240,13 +240,13 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.Carapace_ForeArms2dot0A or AID.Carapace_ForeArms2dot0B or AID.Carapace_RearGuns2dot0A or AID.Carapace_RearGuns2dot0B or AID.RearGuns_ForeArms2dot0 or AID.ForeArms_RearGuns2dot0) ++NumCasts; } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.RearGuns2dot0 or AID.ForeArms2dot0) { @@ -256,65 +256,18 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } -class Hellburner : Components.BaitAwayCast -{ - public Hellburner() : base(ActionID.MakeSpell(AID.Hellburner2), new AOEShapeCircle(5), true) { } -} - -class HellburnerHint : Components.SingleTargetCast -{ - public HellburnerHint() : base(ActionID.MakeSpell(AID.Hellburner2)) { } -} - -class MissileShower : Components.SingleTargetCast -{ - public MissileShower() : base(ActionID.MakeSpell(AID.MissileShower), "Raidwide x2") { } -} - -class ThermobaricExplosive : Components.LocationTargetedAOEs -{ - public ThermobaricExplosive() : base(ActionID.MakeSpell(AID.ThermobaricExplosive2), 25) { } -} - -class AssaultCarapace : Components.SelfTargetedAOEs -{ - public AssaultCarapace() : base(ActionID.MakeSpell(AID.AssaultCarapace), new AOEShapeRect(60, 16, 60)) { } -} - -class AssaultCarapace2 : Components.SelfTargetedAOEs -{ - public AssaultCarapace2() : base(ActionID.MakeSpell(AID.AssaultCarapace2), new AOEShapeRect(60, 16, 60)) { } -} - -class AssaultCarapace3 : Components.SelfTargetedAOEs -{ - public AssaultCarapace3() : base(ActionID.MakeSpell(AID.AssaultCarapace3), new AOEShapeDonut(16, 60)) { } -} - -class ForeArms : Components.SelfTargetedAOEs -{ - public ForeArms() : base(ActionID.MakeSpell(AID.ForeArms), new AOEShapeCone(45, 90.Degrees())) { } -} - -class ForeArms2 : Components.SelfTargetedAOEs -{ - public ForeArms2() : base(ActionID.MakeSpell(AID.ForeArms2), new AOEShapeCone(45, 90.Degrees())) { } -} - -class RearGuns : Components.SelfTargetedAOEs -{ - public RearGuns() : base(ActionID.MakeSpell(AID.RearGuns), new AOEShapeCone(45, 90.Degrees())) { } -} - -class RearGuns2 : Components.SelfTargetedAOEs -{ - public RearGuns2() : base(ActionID.MakeSpell(AID.RearGuns2), new AOEShapeCone(45, 90.Degrees())) { } -} - -class FreeFallBombs : Components.LocationTargetedAOEs -{ - public FreeFallBombs() : base(ActionID.MakeSpell(AID.FreeFallBombs2), 6) { } -} +class Hellburner(BossModule module) : Components.BaitAwayCast(module, ActionID.MakeSpell(AID.Hellburner2), new AOEShapeCircle(5), true); +class HellburnerHint(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.Hellburner2)); +class MissileShower(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.MissileShower), "Raidwide x2"); +class ThermobaricExplosive(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.ThermobaricExplosive2), 25); +class AssaultCarapace(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.AssaultCarapace), new AOEShapeRect(60, 16, 60)); +class AssaultCarapace2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.AssaultCarapace2), new AOEShapeRect(60, 16, 60)); +class AssaultCarapace3(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.AssaultCarapace3), new AOEShapeDonut(16, 60)); +class ForeArms(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ForeArms), new AOEShapeCone(45, 90.Degrees())); +class ForeArms2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ForeArms2), new AOEShapeCone(45, 90.Degrees())); +class RearGuns(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RearGuns), new AOEShapeCone(45, 90.Degrees())); +class RearGuns2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RearGuns2), new AOEShapeCone(45, 90.Degrees())); +class FreeFallBombs(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.FreeFallBombs2), 6); class ChiStates : StateMachineBuilder { @@ -340,7 +293,4 @@ public ChiStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.Fate, GroupID = 1855, NameID = 10400)] -public class Chi : BossModule -{ - public Chi(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsSquare(new(650, 0), 30)) { } -} +public class Chi(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsSquare(new(650, 0), 30)); diff --git a/BossMod/Modules/Endwalker/FATE/Daivadipa.cs b/BossMod/Modules/Endwalker/FATE/Daivadipa.cs index f97d292954..8ab3d8ea8f 100644 --- a/BossMod/Modules/Endwalker/FATE/Daivadipa.cs +++ b/BossMod/Modules/Endwalker/FATE/Daivadipa.cs @@ -51,7 +51,7 @@ public enum SID : uint ForcedMarch = 1257, // Boss->player, extra=0x2/0x8/0x1/0x4 } -class LitPath : Components.GenericAOEs +class LitPath(BossModule module) : Components.GenericAOEs(module) { private static readonly AOEShapeRect rect = new(50, 5); private DateTime _activation; @@ -61,18 +61,18 @@ class LitPath : Components.GenericAOEs private bool bluered2; private const float maxError = MathF.PI / 180; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_activation != default) { - foreach (var o in module.Enemies(OID.OrbOfImmolationBlue)) + foreach (var o in Module.Enemies(OID.OrbOfImmolationBlue)) { if (bluered1 && (o.Rotation.AlmostEqual(90.Degrees(), maxError) || o.Rotation.AlmostEqual(180.Degrees(), maxError))) yield return new(rect, o.Position, o.Rotation, _activation.AddSeconds(1.9f)); if (redblue2 && !redblue1 && (o.Rotation.AlmostEqual(90.Degrees(), maxError) || o.Rotation.AlmostEqual(180.Degrees(), maxError))) yield return new(rect, o.Position, o.Rotation, _activation.AddSeconds(4)); } - foreach (var o in module.Enemies(OID.OrbOfImmolationRed)) + foreach (var o in Module.Enemies(OID.OrbOfImmolationRed)) { if (bluered2 && !bluered1 && (o.Rotation.AlmostEqual(90.Degrees(), maxError) || o.Rotation.AlmostEqual(180.Degrees(), maxError))) yield return new(rect, o.Position, o.Rotation, _activation.AddSeconds(4)); @@ -82,9 +82,9 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { - if (!module.Enemies(OID.OrbOfImmolationRed).All(x => x.IsDead) && !module.Enemies(OID.OrbOfImmolationBlue).All(x => x.IsDead)) + if (!Module.Enemies(OID.OrbOfImmolationRed).All(x => x.IsDead) && !Module.Enemies(OID.OrbOfImmolationBlue).All(x => x.IsDead)) { if ((AID)spell.Action.ID == AID.LoyalFlame) { @@ -101,7 +101,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.LitPath1) { @@ -126,7 +126,7 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn } } -class Burn : Components.GenericAOEs +class Burn(BossModule module) : Components.GenericAOEs(module) { private static readonly AOEShapeCircle circle = new(10); private DateTime _activation; @@ -135,30 +135,30 @@ class Burn : Components.GenericAOEs private bool bluered1; private bool bluered2; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_activation != default) { - foreach (var o in module.Enemies(OID.OrbOfConflagrationBlue)) + foreach (var o in Module.Enemies(OID.OrbOfConflagrationBlue)) { if (bluered1) - yield return new(circle, o.Position, activation: _activation.AddSeconds(2.1f)); + yield return new(circle, o.Position, default, _activation.AddSeconds(2.1f)); if (redblue2 && !redblue1) - yield return new(circle, o.Position, activation: _activation.AddSeconds(6.1f)); + yield return new(circle, o.Position, default, _activation.AddSeconds(6.1f)); } - foreach (var o in module.Enemies(OID.OrbOfConflagrationRed)) + foreach (var o in Module.Enemies(OID.OrbOfConflagrationRed)) { if (bluered2 && !bluered1) - yield return new(circle, o.Position, activation: _activation.AddSeconds(6.1f)); + yield return new(circle, o.Position, default, _activation.AddSeconds(6.1f)); if (redblue1) - yield return new(circle, o.Position, activation: _activation.AddSeconds(2.1f)); + yield return new(circle, o.Position, default, _activation.AddSeconds(2.1f)); } } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { - if (!module.Enemies(OID.OrbOfConflagrationRed).All(x => x.IsDead) && !module.Enemies(OID.OrbOfConflagrationBlue).All(x => x.IsDead)) + if (!Module.Enemies(OID.OrbOfConflagrationRed).All(x => x.IsDead) && !Module.Enemies(OID.OrbOfConflagrationBlue).All(x => x.IsDead)) { if ((AID)spell.Action.ID == AID.LoyalFlame) { @@ -175,7 +175,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.Burn) { @@ -201,88 +201,55 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn } } -class Drumbeat : Components.SingleTargetCast -{ - public Drumbeat() : base(ActionID.MakeSpell(AID.Drumbeat)) { } -} - -class LeftwardTrisula : Components.SelfTargetedAOEs -{ - public LeftwardTrisula() : base(ActionID.MakeSpell(AID.LeftwardTrisula), new AOEShapeCone(65, 90.Degrees())) { } -} - -class RightwardParasu : Components.SelfTargetedAOEs -{ - public RightwardParasu() : base(ActionID.MakeSpell(AID.RightwardParasu), new AOEShapeCone(65, 90.Degrees())) { } -} - -class ErrantAkasa : Components.SelfTargetedAOEs -{ - public ErrantAkasa() : base(ActionID.MakeSpell(AID.ErrantAkasa), new AOEShapeCone(60, 45.Degrees())) { } -} - -class CosmicWeave : Components.SelfTargetedAOEs -{ - public CosmicWeave() : base(ActionID.MakeSpell(AID.CosmicWeave), new AOEShapeCircle(18)) { } -} - -class KarmicFlames : Components.SelfTargetedAOEs -{ - public KarmicFlames() : base(ActionID.MakeSpell(AID.KarmicFlames2), new AOEShapeCircle(20)) { } -} - -class YawningHells : Components.LocationTargetedAOEs -{ - public YawningHells() : base(ActionID.MakeSpell(AID.YawningHells2), 8) { } -} +class Drumbeat(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.Drumbeat)); +class LeftwardTrisula(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.LeftwardTrisula), new AOEShapeCone(65, 90.Degrees())); +class RightwardParasu(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RightwardParasu), new AOEShapeCone(65, 90.Degrees())); +class ErrantAkasa(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ErrantAkasa), new AOEShapeCone(60, 45.Degrees())); +class CosmicWeave(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.CosmicWeave), new AOEShapeCircle(18)); +class KarmicFlames(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.KarmicFlames2), new AOEShapeCircle(20)); +class YawningHells(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.YawningHells2), 8); +class InfernalRedemption(BossModule module) : Components.RaidwideCastDelay(module, ActionID.MakeSpell(AID.InfernalRedemption), ActionID.MakeSpell(AID.InfernalRedemption2), 1); -class InfernalRedemption : Components.RaidwideCastDelay +class DivineCall(BossModule module) : Components.StatusDrivenForcedMarch(module, 2, (uint)SID.ForwardMarch, (uint)SID.AboutFace, (uint)SID.LeftFace, (uint)SID.RightFace) { - public InfernalRedemption() : base(ActionID.MakeSpell(AID.InfernalRedemption), ActionID.MakeSpell(AID.InfernalRedemption2), 1) { } -} - -class DivineCall : Components.StatusDrivenForcedMarch -{ - public DivineCall() : base(2, (uint)SID.ForwardMarch, (uint)SID.AboutFace, (uint)SID.LeftFace, (uint)SID.RightFace) { } - - public override bool DestinationUnsafe(BossModule module, int slot, Actor actor, WPos pos) + public override bool DestinationUnsafe(int slot, Actor actor, WPos pos) { - if (module.FindComponent() != null && module.FindComponent()!.ActiveAOEs(module, slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation))) + if (Module.FindComponent()?.ActiveAOEs(slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false) return true; - if (module.FindComponent() != null && module.FindComponent()!.ActiveAOEs(module, slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation))) + if (module.FindComponent()?.ActiveAOEs(slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false) return true; - if (module.FindComponent() != null && module.FindComponent()!.ActiveAOEs(module, slot, actor).Any() && !module.FindComponent()!.ActiveAOEs(module, slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation))) //safe and non-safe areas reverse by the time forced march runs out + if (module.FindComponent() is var burn && burn != null && burn.ActiveAOEs(slot, actor).Any() && !burn.ActiveAOEs(slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation))) //safe and non-safe areas reverse by the time forced march runs out return true; - if (module.FindComponent() != null && module.FindComponent()!.ActiveAOEs(module, slot, actor).Any() && !module.FindComponent()!.ActiveAOEs(module, slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation))) //safe and non-safe areas reverse by the time forced march runs out + if (module.FindComponent() is var lit && lit != null && lit.ActiveAOEs(slot, actor).Any() && !lit.ActiveAOEs(slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation))) //safe and non-safe areas reverse by the time forced march runs out return true; else return false; } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { - if (module.PrimaryActor.CastInfo?.IsSpell(AID.DivineCall) ?? false) + if (Module.PrimaryActor.CastInfo?.IsSpell(AID.DivineCall) ?? false) hints.Add("Apply backwards march debuff"); - if (module.PrimaryActor.CastInfo?.IsSpell(AID.DivineCall2) ?? false) + if (Module.PrimaryActor.CastInfo?.IsSpell(AID.DivineCall2) ?? false) hints.Add("Apply right march debuff"); - if (module.PrimaryActor.CastInfo?.IsSpell(AID.DivineCall3) ?? false) + if (Module.PrimaryActor.CastInfo?.IsSpell(AID.DivineCall3) ?? false) hints.Add("Apply forwards march debuff"); - if (module.PrimaryActor.CastInfo?.IsSpell(AID.DivineCall4) ?? false) + if (Module.PrimaryActor.CastInfo?.IsSpell(AID.DivineCall4) ?? false) hints.Add("Apply left march debuff"); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { var forward = actor.FindStatus(SID.ForwardMarch) != null; var left = actor.FindStatus(SID.LeftFace) != null; var right = actor.FindStatus(SID.RightFace) != null; var backwards = actor.FindStatus(SID.AboutFace) != null; var marching = actor.FindStatus(SID.ForcedMarch) != null; - var last = ForcedMovements(module, actor).LastOrDefault(); - if (DestinationUnsafe(module, slot, actor, last.to) && !marching && (forward || left || right || backwards) && ((module.FindComponent() != null && module.FindComponent()!.ActiveAOEs(module, slot, actor).Any()) || (module.FindComponent() != null && module.FindComponent()!.ActiveAOEs(module, slot, actor).Any()))) + var last = ForcedMovements(actor).LastOrDefault(); + if (DestinationUnsafe(slot, actor, last.to) && !marching && (forward || left || right || backwards) && ((module.FindComponent()?.ActiveAOEs(slot, actor).Any() ?? false) || (module.FindComponent()?.ActiveAOEs(slot, actor).Any() ?? false))) hints.Add("Aim into AOEs!"); else if (!marching) - base.AddHints(module, slot, actor, hints, movementHints); + base.AddHints(slot, actor, hints); } } @@ -307,7 +274,4 @@ public DaivadipaStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.Fate, GroupID = 1763, NameID = 10269)] -public class Daivadipa : BossModule -{ - public Daivadipa(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsSquare(new(-608, 811), 24.5f)) { } -} +public class Daivadipa(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsSquare(new(-608, 811), 24.5f)); diff --git a/BossMod/Modules/Endwalker/Hunt/RankA/Aegeiros.cs b/BossMod/Modules/Endwalker/Hunt/RankA/Aegeiros.cs index b004903365..3aae822489 100644 --- a/BossMod/Modules/Endwalker/Hunt/RankA/Aegeiros.cs +++ b/BossMod/Modules/Endwalker/Hunt/RankA/Aegeiros.cs @@ -15,50 +15,39 @@ public enum AID : uint BackhandBlow = 27712, // Boss->self, 3.0s cast, range 12 120-degree cone } -class LeafstormRimestorm : Components.GenericAOEs +class LeafstormRimestorm(BossModule module) : Components.GenericAOEs(module) { private DateTime _rimestormExpected; private static readonly AOEShapeCircle _leafstorm = new(10); private static readonly AOEShapeCone _rimestorm = new(40, 90.Degrees()); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { - if (module.PrimaryActor.CastInfo?.IsSpell(AID.Leafstorm) ?? false) - yield return new(_leafstorm, module.PrimaryActor.Position, module.PrimaryActor.CastInfo!.Rotation, module.PrimaryActor.CastInfo.NPCFinishAt); + if (Module.PrimaryActor.CastInfo?.IsSpell(AID.Leafstorm) ?? false) + yield return new(_leafstorm, Module.PrimaryActor.Position, Module.PrimaryActor.CastInfo!.Rotation, Module.PrimaryActor.CastInfo.NPCFinishAt); - if (module.PrimaryActor.CastInfo?.IsSpell(AID.Rimestorm) ?? false) - yield return new(_rimestorm, module.PrimaryActor.Position, module.PrimaryActor.CastInfo!.Rotation, module.PrimaryActor.CastInfo.NPCFinishAt); + if (Module.PrimaryActor.CastInfo?.IsSpell(AID.Rimestorm) ?? false) + yield return new(_rimestorm, Module.PrimaryActor.Position, Module.PrimaryActor.CastInfo!.Rotation, Module.PrimaryActor.CastInfo.NPCFinishAt); else if (_rimestormExpected != default) - yield return new(_rimestorm, module.PrimaryActor.Position, module.PrimaryActor.CastInfo?.Rotation ?? module.PrimaryActor.Rotation, _rimestormExpected); + yield return new(_rimestorm, Module.PrimaryActor.Position, Module.PrimaryActor.CastInfo?.Rotation ?? Module.PrimaryActor.Rotation, _rimestormExpected); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { - if (caster == module.PrimaryActor && (AID)spell.Action.ID == AID.Leafstorm) - _rimestormExpected = module.WorldState.CurrentTime.AddSeconds(9.6f); + if (caster == Module.PrimaryActor && (AID)spell.Action.ID == AID.Leafstorm) + _rimestormExpected = WorldState.FutureTime(9.6f); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { - if (caster == module.PrimaryActor && (AID)spell.Action.ID == AID.Rimestorm) + if (caster == Module.PrimaryActor && (AID)spell.Action.ID == AID.Rimestorm) _rimestormExpected = new(); } } -class Snowball : Components.LocationTargetedAOEs -{ - public Snowball() : base(ActionID.MakeSpell(AID.Snowball), 8) { } -} - -class Canopy : Components.Cleave -{ - public Canopy() : base(ActionID.MakeSpell(AID.Canopy), new AOEShapeCone(12, 60.Degrees()), activeWhileCasting: false) { } -} - -class BackhandBlow : Components.SelfTargetedAOEs -{ - public BackhandBlow() : base(ActionID.MakeSpell(AID.BackhandBlow), new AOEShapeCone(12, 60.Degrees())) { } -} +class Snowball(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Snowball), 8); +class Canopy(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.Canopy), new AOEShapeCone(12, 60.Degrees()), activeWhileCasting: false); +class BackhandBlow(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.BackhandBlow), new AOEShapeCone(12, 60.Degrees())); class AegeirosStates : StateMachineBuilder { @@ -73,7 +62,4 @@ public AegeirosStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.Hunt, GroupID = (uint)BossModuleInfo.HuntRank.A, NameID = 10628)] -public class Aegeiros : SimpleBossModule -{ - public Aegeiros(WorldState ws, Actor primary) : base(ws, primary) { } -} +public class Aegeiros(WorldState ws, Actor primary) : SimpleBossModule(ws, primary); diff --git a/BossMod/Modules/Endwalker/Hunt/RankA/ArchEta.cs b/BossMod/Modules/Endwalker/Hunt/RankA/ArchEta.cs index 313233ecd3..45a47eaafe 100644 --- a/BossMod/Modules/Endwalker/Hunt/RankA/ArchEta.cs +++ b/BossMod/Modules/Endwalker/Hunt/RankA/ArchEta.cs @@ -16,30 +16,11 @@ public enum AID : uint FangedLunge = 27274, // Boss->player, no cast, single-target } -class EnergyWave : Components.SelfTargetedAOEs -{ - public EnergyWave() : base(ActionID.MakeSpell(AID.EnergyWave), new AOEShapeRect(40, 7)) { } -} - -class TailSwipe : Components.SelfTargetedAOEs -{ - public TailSwipe() : base(ActionID.MakeSpell(AID.TailSwipe), new AOEShapeCone(25, 45.Degrees())) { } -} - -class HeavyStomp : Components.SelfTargetedAOEs -{ - public HeavyStomp() : base(ActionID.MakeSpell(AID.HeavyStomp), new AOEShapeCircle(17)) { } -} - -class SonicHowl : Components.RaidwideCast -{ - public SonicHowl() : base(ActionID.MakeSpell(AID.SonicHowl)) { } -} - -class SteelFang : Components.SingleTargetCast -{ - public SteelFang() : base(ActionID.MakeSpell(AID.SteelFang)) { } -} +class EnergyWave(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.EnergyWave), new AOEShapeRect(40, 7)); +class TailSwipe(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TailSwipe), new AOEShapeCone(25, 45.Degrees())); +class HeavyStomp(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HeavyStomp), new AOEShapeCircle(17)); +class SonicHowl(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.SonicHowl)); +class SteelFang(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.SteelFang)); class ArchEtaStates : StateMachineBuilder { @@ -55,7 +36,4 @@ public ArchEtaStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.Hunt, GroupID = (uint)BossModuleInfo.HuntRank.A, NameID = 10634)] -public class ArchEta : SimpleBossModule -{ - public ArchEta(WorldState ws, Actor primary) : base(ws, primary) { } -} +public class ArchEta(WorldState ws, Actor primary) : SimpleBossModule(ws, primary); diff --git a/BossMod/Modules/Endwalker/Hunt/RankA/FanAil.cs b/BossMod/Modules/Endwalker/Hunt/RankA/FanAil.cs index 8382188983..326e38f11a 100644 --- a/BossMod/Modules/Endwalker/Hunt/RankA/FanAil.cs +++ b/BossMod/Modules/Endwalker/Hunt/RankA/FanAil.cs @@ -18,30 +18,12 @@ public enum AID : uint } // TODO: ok, this needs investigation... -class Divebomb : Components.SelfTargetedLegacyRotationAOEs -{ - public Divebomb() : base(ActionID.MakeSpell(AID.Divebomb), new AOEShapeRect(30, 5.5f)) { } -} - -class LiquidHell : Components.LocationTargetedAOEs -{ - public LiquidHell() : base(ActionID.MakeSpell(AID.LiquidHell), 6) { } -} +class Divebomb(BossModule module) : Components.SelfTargetedLegacyRotationAOEs(module, ActionID.MakeSpell(AID.Divebomb), new AOEShapeRect(30, 5.5f)); -class Plummet : Components.SelfTargetedAOEs -{ - public Plummet() : base(ActionID.MakeSpell(AID.Plummet), new AOEShapeCone(8, 45.Degrees())) { } -} - -class DeathSentence : Components.SingleTargetCast -{ - public DeathSentence() : base(ActionID.MakeSpell(AID.DeathSentence)) { } -} - -class CycloneWing : Components.RaidwideCast -{ - public CycloneWing() : base(ActionID.MakeSpell(AID.CycloneWing)) { } -} +class LiquidHell(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.LiquidHell), 6); +class Plummet(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Plummet), new AOEShapeCone(8, 45.Degrees())); +class DeathSentence(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.DeathSentence)); +class CycloneWing(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.CycloneWing)); class FanAilStates : StateMachineBuilder { @@ -57,7 +39,4 @@ public FanAilStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.Hunt, GroupID = (uint)BossModuleInfo.HuntRank.A, NameID = 10633)] -public class FanAil : SimpleBossModule -{ - public FanAil(WorldState ws, Actor primary) : base(ws, primary) { } -} +public class FanAil(WorldState ws, Actor primary) : SimpleBossModule(ws, primary); diff --git a/BossMod/Modules/Endwalker/Hunt/RankA/Gurangatch.cs b/BossMod/Modules/Endwalker/Hunt/RankA/Gurangatch.cs index 2c3aae47d0..4bfedab750 100644 --- a/BossMod/Modules/Endwalker/Hunt/RankA/Gurangatch.cs +++ b/BossMod/Modules/Endwalker/Hunt/RankA/Gurangatch.cs @@ -22,11 +22,11 @@ public enum AID : uint BoneShaker = 27512, // Boss->self, 4.0s cast, range 30 circle } -class Slammer : Components.GenericRotatingAOE +class Slammer(BossModule module) : Components.GenericRotatingAOE(module) { private static readonly AOEShapeCone _shape = new(30, 90.Degrees()); - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { @@ -48,20 +48,17 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { - if (Sequences.Count > 0 && caster == module.PrimaryActor && (AID)spell.Action.ID is AID.LeftHammerSlammer or AID.RightHammerSlammer or AID.LeftHammerSecond or AID.RightHammerSecond + if (Sequences.Count > 0 && caster == Module.PrimaryActor && (AID)spell.Action.ID is AID.LeftHammerSlammer or AID.RightHammerSlammer or AID.LeftHammerSecond or AID.RightHammerSecond or AID.OctupleSlammerLCW or AID.OctupleSlammerRCW or AID.OctupleSlammerRestL or AID.OctupleSlammerRestR or AID.OctupleSlammerLCCW or AID.OctupleSlammerRCCW) { - AdvanceSequence(0, module.WorldState.CurrentTime); + AdvanceSequence(0, WorldState.CurrentTime); } } } -class BoneShaker : Components.RaidwideCast -{ - public BoneShaker() : base(ActionID.MakeSpell(AID.BoneShaker)) { } -} +class BoneShaker(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.BoneShaker)); class GurangatchStates : StateMachineBuilder { @@ -74,7 +71,4 @@ public GurangatchStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.Hunt, GroupID = (uint)BossModuleInfo.HuntRank.A, NameID = 10631)] -public class Gurangatch : SimpleBossModule -{ - public Gurangatch(WorldState ws, Actor primary) : base(ws, primary) { } -} +public class Gurangatch(WorldState ws, Actor primary) : SimpleBossModule(ws, primary); diff --git a/BossMod/Modules/Endwalker/Hunt/RankA/Hulder.cs b/BossMod/Modules/Endwalker/Hunt/RankA/Hulder.cs index bcc4a9d50b..60c43e4448 100644 --- a/BossMod/Modules/Endwalker/Hunt/RankA/Hulder.cs +++ b/BossMod/Modules/Endwalker/Hunt/RankA/Hulder.cs @@ -15,30 +15,11 @@ public enum AID : uint StormOfColor = 27078, // Boss->player, 4.0s cast, single-target } -class LayOfMislaidMemory : Components.SelfTargetedAOEs -{ - public LayOfMislaidMemory() : base(ActionID.MakeSpell(AID.LayOfMislaidMemory), new AOEShapeCone(30, 60.Degrees())) { } -} - -class TempestuousWrath : Components.ChargeAOEs -{ - public TempestuousWrath() : base(ActionID.MakeSpell(AID.TempestuousWrath), 4) { } -} - -class RottingElegy : Components.SelfTargetedAOEs -{ - public RottingElegy() : base(ActionID.MakeSpell(AID.RottingElegy), new AOEShapeDonut(5, 50)) { } -} - -class OdeToLostLove : Components.RaidwideCast -{ - public OdeToLostLove() : base(ActionID.MakeSpell(AID.OdeToLostLove)) { } -} - -class StormOfColor : Components.SingleTargetCast -{ - public StormOfColor() : base(ActionID.MakeSpell(AID.StormOfColor)) { } -} +class LayOfMislaidMemory(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.LayOfMislaidMemory), new AOEShapeCone(30, 60.Degrees())); +class TempestuousWrath(BossModule module) : Components.ChargeAOEs(module, ActionID.MakeSpell(AID.TempestuousWrath), 4); +class RottingElegy(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RottingElegy), new AOEShapeDonut(5, 50)); +class OdeToLostLove(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.OdeToLostLove)); +class StormOfColor(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.StormOfColor)); class HulderStates : StateMachineBuilder { @@ -54,7 +35,4 @@ public HulderStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.Hunt, GroupID = (uint)BossModuleInfo.HuntRank.A, NameID = 10624)] -public class Hulder : SimpleBossModule -{ - public Hulder(WorldState ws, Actor primary) : base(ws, primary) { } -} +public class Hulder(WorldState ws, Actor primary) : SimpleBossModule(ws, primary); diff --git a/BossMod/Modules/Endwalker/Hunt/RankA/LunatenderQueen.cs b/BossMod/Modules/Endwalker/Hunt/RankA/LunatenderQueen.cs index e4e40cdd1f..20842518fe 100644 --- a/BossMod/Modules/Endwalker/Hunt/RankA/LunatenderQueen.cs +++ b/BossMod/Modules/Endwalker/Hunt/RankA/LunatenderQueen.cs @@ -18,45 +18,14 @@ public enum AID : uint AwayWithYouInverted = 27371, // Boss->self, 7.0s cast, range 6-40 donut } -class AvertYourEyes : Components.CastGaze -{ - public AvertYourEyes() : base(ActionID.MakeSpell(AID.AvertYourEyes)) { } -} - -class YouMayApproach : Components.SelfTargetedAOEs -{ - public YouMayApproach() : base(ActionID.MakeSpell(AID.YouMayApproach), new AOEShapeDonut(6, 40)) { } -} - -class AwayWithYou : Components.SelfTargetedAOEs -{ - public AwayWithYou() : base(ActionID.MakeSpell(AID.AwayWithYou), new AOEShapeCircle(15)) { } -} - -class Needles : Components.SelfTargetedAOEs -{ - public Needles() : base(ActionID.MakeSpell(AID.Needles), new AOEShapeCircle(6)) { } -} - -class WickedWhim : Components.CastHint -{ - public WickedWhim() : base(ActionID.MakeSpell(AID.WickedWhim), "Invert next cast") { } -} - -class AvertYourEyesInverted : Components.CastGaze -{ - public AvertYourEyesInverted() : base(ActionID.MakeSpell(AID.AvertYourEyesInverted), true) { } -} - -class YouMayApproachInverted : Components.SelfTargetedAOEs -{ - public YouMayApproachInverted() : base(ActionID.MakeSpell(AID.YouMayApproachInverted), new AOEShapeCircle(15)) { } -} - -class AwayWithYouInverted : Components.SelfTargetedAOEs -{ - public AwayWithYouInverted() : base(ActionID.MakeSpell(AID.AwayWithYouInverted), new AOEShapeDonut(6, 40)) { } -} +class AvertYourEyes(BossModule module) : Components.CastGaze(module, ActionID.MakeSpell(AID.AvertYourEyes)); +class YouMayApproach(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.YouMayApproach), new AOEShapeDonut(6, 40)); +class AwayWithYou(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.AwayWithYou), new AOEShapeCircle(15)); +class Needles(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Needles), new AOEShapeCircle(6)); +class WickedWhim(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.WickedWhim), "Invert next cast"); +class AvertYourEyesInverted(BossModule module) : Components.CastGaze(module, ActionID.MakeSpell(AID.AvertYourEyesInverted), true); +class YouMayApproachInverted(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.YouMayApproachInverted), new AOEShapeCircle(15)); +class AwayWithYouInverted(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.AwayWithYouInverted), new AOEShapeDonut(6, 40)); class LunatenderQueenStates : StateMachineBuilder { @@ -75,7 +44,4 @@ public LunatenderQueenStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.Hunt, GroupID = (uint)BossModuleInfo.HuntRank.A, NameID = 10629)] -public class LunatenderQueen : SimpleBossModule -{ - public LunatenderQueen(WorldState ws, Actor primary) : base(ws, primary) { } -} +public class LunatenderQueen(WorldState ws, Actor primary) : SimpleBossModule(ws, primary); diff --git a/BossMod/Modules/Endwalker/Hunt/RankA/Minerva.cs b/BossMod/Modules/Endwalker/Hunt/RankA/Minerva.cs index a237f56206..d025f51838 100644 --- a/BossMod/Modules/Endwalker/Hunt/RankA/Minerva.cs +++ b/BossMod/Modules/Endwalker/Hunt/RankA/Minerva.cs @@ -20,24 +20,24 @@ public enum AID : uint BallisticMissileDonutWarning = 27518, // Boss->player, 6.5s cast, single-target } -class BallisticMissile : Components.GenericAOEs +class BallisticMissile(BossModule module) : Components.GenericAOEs(module) { private AOEShape? _activeMissile; private Actor? _activeTarget; private WPos _activeLocation = new(); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_activeMissile != null) yield return new(_activeMissile, _activeTarget?.Position ?? _activeLocation); } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { - if (!(module.PrimaryActor.CastInfo?.IsSpell() ?? false)) + if (!(Module.PrimaryActor.CastInfo?.IsSpell() ?? false)) return; - string hint = (AID)module.PrimaryActor.CastInfo.Action.ID switch + string hint = (AID)Module.PrimaryActor.CastInfo.Action.ID switch { AID.AntiPersonnelBuild or AID.RingBuild => "Select next AOE type", AID.BallisticMissileCircleWarning or AID.BallisticMissileDonutWarning => "Select next AOE target", @@ -47,19 +47,19 @@ public override void AddGlobalHints(BossModule module, GlobalHints hints) hints.Add(hint); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { - if (caster != module.PrimaryActor) + if (caster != Module.PrimaryActor) return; switch ((AID)spell.Action.ID) { case AID.BallisticMissileCircleWarning: _activeMissile = new AOEShapeCircle(6); - _activeTarget = module.WorldState.Actors.Find(spell.TargetID); + _activeTarget = WorldState.Actors.Find(spell.TargetID); break; case AID.BallisticMissileDonutWarning: _activeMissile = new AOEShapeDonut(6, 20); - _activeTarget = module.WorldState.Actors.Find(spell.TargetID); + _activeTarget = WorldState.Actors.Find(spell.TargetID); break; case AID.BallisticMissileCircle: case AID.BallisticMissileDonut: @@ -68,9 +68,9 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { - if (caster != module.PrimaryActor) + if (caster != Module.PrimaryActor) return; switch ((AID)spell.Action.ID) { @@ -87,20 +87,9 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn } } -class Hyperflame : Components.SelfTargetedAOEs -{ - public Hyperflame() : base(ActionID.MakeSpell(AID.Hyperflame), new AOEShapeCone(60, 30.Degrees())) { } -} - -class SonicAmplifier : Components.RaidwideCast -{ - public SonicAmplifier() : base(ActionID.MakeSpell(AID.SonicAmplifier)) { } -} - -class HammerKnuckles : Components.SingleTargetCast -{ - public HammerKnuckles() : base(ActionID.MakeSpell(AID.HammerKnuckles)) { } -} +class Hyperflame(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Hyperflame), new AOEShapeCone(60, 30.Degrees())); +class SonicAmplifier(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.SonicAmplifier)); +class HammerKnuckles(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.HammerKnuckles)); class MinervaStates : StateMachineBuilder { @@ -115,7 +104,4 @@ public MinervaStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.Hunt, GroupID = (uint)BossModuleInfo.HuntRank.A, NameID = 10627)] -public class Minerva : SimpleBossModule -{ - public Minerva(WorldState ws, Actor primary) : base(ws, primary) { } -} +public class Minerva(WorldState ws, Actor primary) : SimpleBossModule(ws, primary); diff --git a/BossMod/Modules/Endwalker/Hunt/RankA/MoussePrincess.cs b/BossMod/Modules/Endwalker/Hunt/RankA/MoussePrincess.cs index 26d175717e..0a2d2f4e44 100644 --- a/BossMod/Modules/Endwalker/Hunt/RankA/MoussePrincess.cs +++ b/BossMod/Modules/Endwalker/Hunt/RankA/MoussePrincess.cs @@ -25,20 +25,20 @@ public enum SID : uint ForwardWhimsy = 2958, } -class PrincessThrenody : Components.GenericAOEs +class PrincessThrenody(BossModule module) : Components.GenericAOEs(module) { private Angle _direction; private DateTime _activation; private static readonly AOEShapeCone _shape = new(40, 60.Degrees()); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_activation != default) - yield return new(_shape, module.PrimaryActor.Position, _direction, _activation); + yield return new(_shape, Module.PrimaryActor.Position, _direction, _activation); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.PrincessThrenodyPrepare) { @@ -47,7 +47,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.PrincessThrenodyResolve) _activation = default; @@ -55,7 +55,7 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn private Angle ThrenodyDirection(BossModule module) { - foreach (var s in module.PrimaryActor.Statuses) + foreach (var s in Module.PrimaryActor.Statuses) { switch ((SID)s.ID) { @@ -65,30 +65,15 @@ private Angle ThrenodyDirection(BossModule module) case SID.ForwardWhimsy: return 0.Degrees(); } } - module.ReportError(this, "Failed to find whimsy status"); + ReportError("Failed to find whimsy status"); return default; } } -class WhimsyAlaMode : Components.CastHint -{ - public WhimsyAlaMode() : base(ActionID.MakeSpell(AID.WhimsyAlaMode), "Select direction") { } -} - -class AmorphicFlail : Components.SelfTargetedAOEs -{ - public AmorphicFlail() : base(ActionID.MakeSpell(AID.AmorphicFlail), new AOEShapeCircle(9)) { } -} - -class PrincessCacophony : Components.LocationTargetedAOEs -{ - public PrincessCacophony() : base(ActionID.MakeSpell(AID.PrincessCacophony), 12) { } -} - -class Banish : Components.SingleTargetCast -{ - public Banish() : base(ActionID.MakeSpell(AID.Banish)) { } -} +class WhimsyAlaMode(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.WhimsyAlaMode), "Select direction"); +class AmorphicFlail(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.AmorphicFlail), new AOEShapeCircle(9)); +class PrincessCacophony(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.PrincessCacophony), 12); +class Banish(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.Banish)); class MoussePrincessStates : StateMachineBuilder { @@ -104,7 +89,4 @@ public MoussePrincessStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.Hunt, GroupID = (uint)BossModuleInfo.HuntRank.A, NameID = 10630)] -public class MoussePrincess : SimpleBossModule -{ - public MoussePrincess(WorldState ws, Actor primary) : base(ws, primary) { } -} +public class MoussePrincess(WorldState ws, Actor primary) : SimpleBossModule(ws, primary); diff --git a/BossMod/Modules/Endwalker/Hunt/RankA/Petalodus.cs b/BossMod/Modules/Endwalker/Hunt/RankA/Petalodus.cs index f4835fc91a..9fa50cae37 100644 --- a/BossMod/Modules/Endwalker/Hunt/RankA/Petalodus.cs +++ b/BossMod/Modules/Endwalker/Hunt/RankA/Petalodus.cs @@ -16,25 +16,10 @@ public enum AID : uint AncientBlizzard = 27069, // Boss->self, 4.0s cast, range 40 45-degree cone } -class MarineMayhem : Components.CastInterruptHint -{ - public MarineMayhem() : base(ActionID.MakeSpell(AID.MarineMayhem), hintExtra: "Raidwide x3") { } -} - -class Waterga : Components.SpreadFromCastTargets -{ - public Waterga() : base(ActionID.MakeSpell(AID.Waterga), 6) { } -} - -class TidalGuillotine : Components.SelfTargetedAOEs -{ - public TidalGuillotine() : base(ActionID.MakeSpell(AID.TidalGuillotine), new AOEShapeCircle(13)) { } -} - -class AncientBlizzard : Components.SelfTargetedAOEs -{ - public AncientBlizzard() : base(ActionID.MakeSpell(AID.AncientBlizzard), new AOEShapeCone(40, 22.5f.Degrees())) { } -} +class MarineMayhem(BossModule module) : Components.CastInterruptHint(module, ActionID.MakeSpell(AID.MarineMayhem), hintExtra: "Raidwide x3"); +class Waterga(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.Waterga), 6); +class TidalGuillotine(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TidalGuillotine), new AOEShapeCircle(13)); +class AncientBlizzard(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.AncientBlizzard), new AOEShapeCone(40, 22.5f.Degrees())); class PetalodusStates : StateMachineBuilder { @@ -49,7 +34,4 @@ public PetalodusStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.Hunt, GroupID = (uint)BossModuleInfo.HuntRank.A, NameID = 10632)] -public class Petalodus : SimpleBossModule -{ - public Petalodus(WorldState ws, Actor primary) : base(ws, primary) { } -} +public class Petalodus(WorldState ws, Actor primary) : SimpleBossModule(ws, primary); diff --git a/BossMod/Modules/Endwalker/Hunt/RankA/Storsie.cs b/BossMod/Modules/Endwalker/Hunt/RankA/Storsie.cs index dda775c2a8..02405c54e4 100644 --- a/BossMod/Modules/Endwalker/Hunt/RankA/Storsie.cs +++ b/BossMod/Modules/Endwalker/Hunt/RankA/Storsie.cs @@ -20,20 +20,20 @@ public enum AID : uint AspectLightningApply = 27872, // Boss->self, no cast, single-target } -class Aspect : Components.GenericAOEs +class Aspect(BossModule module) : Components.GenericAOEs(module) { private AOEShape? _imminentAOE; private DateTime _activation; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_imminentAOE != null) - yield return new(_imminentAOE, module.PrimaryActor.Position, module.PrimaryActor.CastInfo?.Rotation ?? module.PrimaryActor.Rotation, _activation); + yield return new(_imminentAOE, Module.PrimaryActor.Position, Module.PrimaryActor.CastInfo?.Rotation ?? Module.PrimaryActor.Rotation, _activation); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { - if (caster != module.PrimaryActor) + if (caster != Module.PrimaryActor) return; AOEShape? shape = (AID)spell.Action.ID switch { @@ -45,21 +45,18 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf if (shape != null) { _imminentAOE = shape; - _activation = module.WorldState.CurrentTime.AddSeconds(10.4f); + _activation = WorldState.FutureTime(10.4f); } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { - if (caster == module.PrimaryActor && (AID)spell.Action.ID is AID.Whorlstorm or AID.Defibrillate or AID.EarthenAugur) + if (caster == Module.PrimaryActor && (AID)spell.Action.ID is AID.Whorlstorm or AID.Defibrillate or AID.EarthenAugur) _imminentAOE = null; } } -class FangsEnd : Components.SingleTargetCast -{ - public FangsEnd() : base(ActionID.MakeSpell(AID.FangsEnd)) { } -} +class FangsEnd(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.FangsEnd)); class StorsieStates : StateMachineBuilder { @@ -72,7 +69,4 @@ public StorsieStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.Hunt, GroupID = (uint)BossModuleInfo.HuntRank.A, NameID = 10623)] -public class Storsie : SimpleBossModule -{ - public Storsie(WorldState ws, Actor primary) : base(ws, primary) { } -} +public class Storsie(WorldState ws, Actor primary) : SimpleBossModule(ws, primary); diff --git a/BossMod/Modules/Endwalker/Hunt/RankA/Sugriva.cs b/BossMod/Modules/Endwalker/Hunt/RankA/Sugriva.cs index 1ddf4633fc..d5b3078233 100644 --- a/BossMod/Modules/Endwalker/Hunt/RankA/Sugriva.cs +++ b/BossMod/Modules/Endwalker/Hunt/RankA/Sugriva.cs @@ -20,93 +20,79 @@ public enum AID : uint ApplyPrey = 27229, // Boss->player, 0.5s cast, single-target } -class Twister : Components.KnockbackFromCastTarget +class Twister(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.Twister), 20, shape: new AOEShapeCircle(8)) { - public Twister() : base(ActionID.MakeSpell(AID.Twister), 20, shape: new AOEShapeCircle(8)) { } - - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (Casters.Count > 0) hints.Add("Stack and knockback"); } - public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) + public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) { return Casters.FirstOrDefault()?.CastInfo?.TargetID == player.InstanceID ? PlayerPriority.Interesting : PlayerPriority.Irrelevant; } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - base.DrawArenaForeground(module, pcSlot, pc, arena); + base.DrawArenaForeground(pcSlot, pc); var caster = Casters.FirstOrDefault(); - var target = caster != null ? module.WorldState.Actors.Find(caster.CastInfo!.TargetID) : null; + var target = caster != null ? WorldState.Actors.Find(caster.CastInfo!.TargetID) : null; if (target != null) - Shape!.Outline(arena, target); + Shape!.Outline(Arena, target); } } -class Spark : Components.SelfTargetedAOEs -{ - public Spark() : base(ActionID.MakeSpell(AID.Spark), new AOEShapeDonut(14, 30)) { } -} - -class ScytheTail : Components.SelfTargetedAOEs -{ - public ScytheTail() : base(ActionID.MakeSpell(AID.ScytheTail), new AOEShapeCircle(17)) { } -} +class Spark(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Spark), new AOEShapeDonut(14, 30)); +class ScytheTail(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ScytheTail), new AOEShapeCircle(17)); class Butcher : Components.BaitAwayCast { - public Butcher() : base(ActionID.MakeSpell(AID.Butcher), new AOEShapeCone(8, 60.Degrees())) + public Butcher(BossModule module) : base(module, ActionID.MakeSpell(AID.Butcher), new AOEShapeCone(8, 60.Degrees())) { EndsOnCastEvent = true; } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (CurrentBaits.Count > 0) hints.Add("Tankbuster cleave"); } } -class Rip : Components.SelfTargetedAOEs -{ - public Rip() : base(ActionID.MakeSpell(AID.Rip), new AOEShapeCone(8, 60.Degrees())) { } -} +class Rip(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Rip), new AOEShapeCone(8, 60.Degrees())); // TODO: generalize to baited aoe -class RockThrow : Components.GenericAOEs +class RockThrow(BossModule module) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.RockThrowRest)) { private Actor? _target; private static readonly AOEShapeCircle _shape = new(6); - public RockThrow() : base(ActionID.MakeSpell(AID.RockThrowRest)) { } - - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { - if (Active(module)) - yield return new(_shape, module.PrimaryActor.CastInfo!.LocXZ, default, module.PrimaryActor.CastInfo.NPCFinishAt); + if (Active()) + yield return new(_shape, Module.PrimaryActor.CastInfo!.LocXZ, default, Module.PrimaryActor.CastInfo.NPCFinishAt); } - public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) + public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) { return player == _target ? PlayerPriority.Interesting : PlayerPriority.Irrelevant; } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (_target != null) - arena.AddCircle(_target.Position, _shape.Radius, ArenaColor.Danger); + Arena.AddCircle(_target.Position, _shape.Radius, ArenaColor.Danger); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { case AID.ApplyPrey: NumCasts = 0; - _target = module.WorldState.Actors.Find(spell.TargetID); + _target = WorldState.Actors.Find(spell.TargetID); if (_target?.Type == ActorType.Chocobo) //Player Chocobos are immune against prey, so mechanic doesn't happen if a chocobo gets selected _target = null; break; @@ -117,13 +103,10 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - private bool Active(BossModule module) => (module.PrimaryActor.CastInfo?.IsSpell() ?? false) && (AID)module.PrimaryActor.CastInfo!.Action.ID is AID.RockThrowFirst or AID.RockThrowRest; + private bool Active() => (Module.PrimaryActor.CastInfo?.IsSpell() ?? false) && (AID)Module.PrimaryActor.CastInfo!.Action.ID is AID.RockThrowFirst or AID.RockThrowRest; } -class Crosswind : Components.RaidwideCast -{ - public Crosswind() : base(ActionID.MakeSpell(AID.Crosswind)) { } -} +class Crosswind(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.Crosswind)); class SugrivaStates : StateMachineBuilder { @@ -141,7 +124,4 @@ public SugrivaStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.Hunt, GroupID = (uint)BossModuleInfo.HuntRank.A, NameID = 10626)] -public class Sugriva : SimpleBossModule -{ - public Sugriva(WorldState ws, Actor primary) : base(ws, primary) { } -} +public class Sugriva(WorldState ws, Actor primary) : SimpleBossModule(ws, primary); diff --git a/BossMod/Modules/Endwalker/Hunt/RankA/Yilan.cs b/BossMod/Modules/Endwalker/Hunt/RankA/Yilan.cs index fbfa48447d..2ecc6dbf47 100644 --- a/BossMod/Modules/Endwalker/Hunt/RankA/Yilan.cs +++ b/BossMod/Modules/Endwalker/Hunt/RankA/Yilan.cs @@ -24,32 +24,30 @@ public enum SID : uint RightFace = 1961, } -class Soundstorm : Components.StatusDrivenForcedMarch +class Soundstorm(BossModule module) : Components.StatusDrivenForcedMarch(module, 2, (uint)SID.ForwardMarch, (uint)SID.AboutFace, (uint)SID.LeftFace, (uint)SID.RightFace) { - public Soundstorm() : base(2, (uint)SID.ForwardMarch, (uint)SID.AboutFace, (uint)SID.LeftFace, (uint)SID.RightFace) { } + public override bool DestinationUnsafe(int slot, Actor actor, WPos pos) => MiniLight.Shape.Check(pos, Module.PrimaryActor); - public override bool DestinationUnsafe(BossModule module, int slot, Actor actor, WPos pos) => MiniLight.Shape.Check(pos, module.PrimaryActor); - - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { - if (module.PrimaryActor.CastInfo?.IsSpell(AID.Soundstorm) ?? false) + if (Module.PrimaryActor.CastInfo?.IsSpell(AID.Soundstorm) ?? false) hints.Add("Apply march debuffs"); } } -class MiniLight : Components.GenericAOEs +class MiniLight(BossModule module) : Components.GenericAOEs(module) { private DateTime _activation; public static readonly AOEShapeCircle Shape = new(18); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_activation != default) - yield return new(Shape, module.PrimaryActor.Position, default, _activation); + yield return new(Shape, Module.PrimaryActor.Position, default, _activation); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { var activation = (AID)spell.Action.ID switch { @@ -61,27 +59,16 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf _activation = activation; } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.MiniLight) _activation = default; } } -class Devour : Components.CastHint -{ - public Devour() : base(ActionID.MakeSpell(AID.Devour), "Harmless unless you got minimized by the previous mechanic") { } -} - -class BogBomb : Components.LocationTargetedAOEs -{ - public BogBomb() : base(ActionID.MakeSpell(AID.BogBomb), 6) { } -} - -class BrackishRain : Components.SelfTargetedAOEs -{ - public BrackishRain() : base(ActionID.MakeSpell(AID.BrackishRain), new AOEShapeCone(10, 45.Degrees())) { } -} +class Devour(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.Devour), "Harmless unless you got minimized by the previous mechanic"); +class BogBomb(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.BogBomb), 6); +class BrackishRain(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.BrackishRain), new AOEShapeCone(10, 45.Degrees())); class YilanStates : StateMachineBuilder { @@ -97,7 +84,4 @@ public YilanStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.Hunt, GroupID = (uint)BossModuleInfo.HuntRank.A, NameID = 10625)] -public class Yilan : SimpleBossModule -{ - public Yilan(WorldState ws, Actor primary) : base(ws, primary) { } -} +public class Yilan(WorldState ws, Actor primary) : SimpleBossModule(ws, primary); diff --git a/BossMod/Modules/Endwalker/Hunt/RankS/Armstrong.cs b/BossMod/Modules/Endwalker/Hunt/RankS/Armstrong.cs index 9a2b8b5d11..468f42952f 100644 --- a/BossMod/Modules/Endwalker/Hunt/RankS/Armstrong.cs +++ b/BossMod/Modules/Endwalker/Hunt/RankS/Armstrong.cs @@ -19,13 +19,13 @@ public enum AID : uint SoporificGas = 27478, // Boss->self, 6.0s cast, range 12 circle } -class MagitekCompressor : Components.GenericRotatingAOE +class MagitekCompressor(BossModule module) : Components.GenericRotatingAOE(module) { private Angle _increment; private static readonly AOEShapeCross _shape = new(50, 3.5f); - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.MagitekCompressorFirst) { @@ -34,7 +34,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { @@ -49,12 +49,12 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent case AID.MagitekCompressorNext: if (Sequences.Count > 0) { - AdvanceSequence(0, module.WorldState.CurrentTime); + AdvanceSequence(0, WorldState.CurrentTime); if (NumCasts == 5) { ref var s = ref Sequences.Ref(0); s.Increment = -s.Increment; - s.NextActivation = module.WorldState.CurrentTime.AddSeconds(3.6f); + s.NextActivation = WorldState.FutureTime(3.6f); } } break; @@ -62,25 +62,10 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } -class AcceleratedLanding : Components.LocationTargetedAOEs -{ - public AcceleratedLanding() : base(ActionID.MakeSpell(AID.AcceleratedLanding), 6) { } -} - -class CalculatedCombustion : Components.RaidwideCast -{ - public CalculatedCombustion() : base(ActionID.MakeSpell(AID.CalculatedCombustion)) { } -} - -class Pummel : Components.SingleTargetCast -{ - public Pummel() : base(ActionID.MakeSpell(AID.Pummel)) { } -} - -class SoporificGas : Components.SelfTargetedAOEs -{ - public SoporificGas() : base(ActionID.MakeSpell(AID.SoporificGas), new AOEShapeCircle(12)) { } -} +class AcceleratedLanding(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.AcceleratedLanding), 6); +class CalculatedCombustion(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.CalculatedCombustion)); +class Pummel(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.Pummel)); +class SoporificGas(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.SoporificGas), new AOEShapeCircle(12)); class ArmstrongStates : StateMachineBuilder { @@ -96,7 +81,4 @@ public ArmstrongStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.Hunt, GroupID = (uint)BossModuleInfo.HuntRank.S, NameID = 10619)] -public class Armstrong : SimpleBossModule -{ - public Armstrong(WorldState ws, Actor primary) : base(ws, primary) { } -} +public class Armstrong(WorldState ws, Actor primary) : SimpleBossModule(ws, primary); diff --git a/BossMod/Modules/Endwalker/Hunt/RankS/Burfurlur.cs b/BossMod/Modules/Endwalker/Hunt/RankS/Burfurlur.cs index fbb0df4c90..a3cdd13aad 100644 --- a/BossMod/Modules/Endwalker/Hunt/RankS/Burfurlur.cs +++ b/BossMod/Modules/Endwalker/Hunt/RankS/Burfurlur.cs @@ -19,7 +19,7 @@ public enum AID : uint RottenSpores = 27313, // Boss->location, 3.0s cast, range 6 circle } -class QuintupleSneeze : Components.GenericAOEs +class QuintupleSneeze(BossModule module) : Components.GenericAOEs(module) { private Angle _referenceAngle; private readonly List _pendingOffsets = []; @@ -27,18 +27,18 @@ class QuintupleSneeze : Components.GenericAOEs private static readonly AOEShapeCone _shape = new(40, 45.Degrees()); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_nextSneeze != default) { if (_pendingOffsets.Count > 1) - yield return new(_shape, module.PrimaryActor.Position, _referenceAngle + _pendingOffsets[1], _nextSneeze.AddSeconds(2.2f)); + yield return new(_shape, Module.PrimaryActor.Position, _referenceAngle + _pendingOffsets[1], _nextSneeze.AddSeconds(2.2f)); if (_pendingOffsets.Count > 0) - yield return new(_shape, module.PrimaryActor.Position, _referenceAngle + _pendingOffsets[0], _nextSneeze, ArenaColor.Danger); + yield return new(_shape, Module.PrimaryActor.Position, _referenceAngle + _pendingOffsets[0], _nextSneeze, ArenaColor.Danger); } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { @@ -59,25 +59,18 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if (_pendingOffsets.Count > 0 && (AID)spell.Action.ID is AID.QuintupleSneeze1 or AID.QuintupleSneeze24 or AID.QuintupleSneeze35) { _pendingOffsets.RemoveAt(0); - _nextSneeze = module.WorldState.CurrentTime.AddSeconds(2.2f); + _nextSneeze = WorldState.FutureTime(2.2f); } } } -class Uppercut : Components.SelfTargetedAOEs -{ - public Uppercut() : base(ActionID.MakeSpell(AID.Uppercut), new AOEShapeCone(15, 60.Degrees())) { } -} - -class RottenSpores : Components.LocationTargetedAOEs -{ - public RottenSpores() : base(ActionID.MakeSpell(AID.RottenSpores), 6) { } -} +class Uppercut(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Uppercut), new AOEShapeCone(15, 60.Degrees())); +class RottenSpores(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.RottenSpores), 6); class BurfurlurStates : StateMachineBuilder { @@ -91,7 +84,4 @@ public BurfurlurStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.Hunt, GroupID = (uint)BossModuleInfo.HuntRank.S, NameID = 10617)] -public class Burfurlur : SimpleBossModule -{ - public Burfurlur(WorldState ws, Actor primary) : base(ws, primary) { } -} +public class Burfurlur(WorldState ws, Actor primary) : SimpleBossModule(ws, primary); diff --git a/BossMod/Modules/Endwalker/Hunt/RankS/Ker.cs b/BossMod/Modules/Endwalker/Hunt/RankS/Ker.cs index 4c770868fd..e51a9009aa 100644 --- a/BossMod/Modules/Endwalker/Hunt/RankS/Ker.cs +++ b/BossMod/Modules/Endwalker/Hunt/RankS/Ker.cs @@ -46,98 +46,31 @@ public enum SID : uint WhispersManifest = 2847, // Boss->Boss, extra=0x0 } -class MinaxGlare : Components.CastHint -{ - public MinaxGlare() : base(ActionID.MakeSpell(AID.MinaxGlare), "Applies temporary misdirection") { } -} - -class Heliovoid : Components.SelfTargetedAOEs -{ - public Heliovoid() : base(ActionID.MakeSpell(AID.Heliovoid), new AOEShapeCircle(12)) { } -} - -class AncientBlizzard : Components.SelfTargetedAOEs -{ - public AncientBlizzard() : base(ActionID.MakeSpell(AID.AncientBlizzard), new AOEShapeDonut(8, 40)) { } -} - -class AncientBlizzard2 : Components.SelfTargetedAOEs -{ - public AncientBlizzard2() : base(ActionID.MakeSpell(AID.AncientBlizzard2), new AOEShapeDonut(8, 40)) { } -} - -class AncientBlizzardWhispersManifest : Components.SelfTargetedAOEs -{ - public AncientBlizzardWhispersManifest() : base(ActionID.MakeSpell(AID.WhispersManifest3), new AOEShapeDonut(8, 40)) { } -} - -class ForeInterment : Components.SelfTargetedAOEs -{ - public ForeInterment() : base(ActionID.MakeSpell(AID.ForeInterment), new AOEShapeCone(40, 90.Degrees())) { } -} - -class RearInterment : Components.SelfTargetedAOEs -{ - public RearInterment() : base(ActionID.MakeSpell(AID.RearInterment), new AOEShapeCone(40, 90.Degrees())) { } -} - -class RightInterment : Components.SelfTargetedAOEs -{ - public RightInterment() : base(ActionID.MakeSpell(AID.RightInterment), new AOEShapeCone(40, 90.Degrees())) { } -} - -class LeftInterment : Components.SelfTargetedAOEs -{ - public LeftInterment() : base(ActionID.MakeSpell(AID.LeftInterment), new AOEShapeCone(40, 90.Degrees())) { } -} - -class Mirrored_ForeInterment : Components.SelfTargetedAOEs -{ - public Mirrored_ForeInterment() : base(ActionID.MakeSpell(AID.Mirrored_ForeInterment), new AOEShapeCone(40, 90.Degrees())) { } -} - -class Mirrored_RearInterment : Components.SelfTargetedAOEs -{ - public Mirrored_RearInterment() : base(ActionID.MakeSpell(AID.Mirrored_RearInterment), new AOEShapeCone(40, 90.Degrees())) { } -} - -class Mirrored_RightInterment : Components.SelfTargetedAOEs -{ - public Mirrored_RightInterment() : base(ActionID.MakeSpell(AID.Mirrored_RightInterment), new AOEShapeCone(40, 90.Degrees())) { } -} - -class Mirrored_LeftInterment : Components.SelfTargetedAOEs -{ - public Mirrored_LeftInterment() : base(ActionID.MakeSpell(AID.Mirrored_LeftInterment), new AOEShapeCone(40, 90.Degrees())) { } -} - -class EternalDamnation : Components.CastGaze -{ - public EternalDamnation() : base(ActionID.MakeSpell(AID.EternalDamnation)) { } -} - -class EternalDamnationWhispersManifest : Components.CastGaze -{ - public EternalDamnationWhispersManifest() : base(ActionID.MakeSpell(AID.WhispersManifest4)) { } -} - -class EternalDamnation2 : Components.CastGaze -{ - public EternalDamnation2() : base(ActionID.MakeSpell(AID.EternalDamnation2)) { } -} - -class WhisperedIncantation : Components.CastHint -{ - public WhisperedIncantation() : base(ActionID.MakeSpell(AID.WhisperedIncantation), "Remembers the next skill and uses it again when casting Whispers Manifest") { } -} - -class MirroredIncantation : BossComponent +class MinaxGlare(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.MinaxGlare), "Applies temporary misdirection"); +class Heliovoid(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Heliovoid), new AOEShapeCircle(12)); +class AncientBlizzard(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.AncientBlizzard), new AOEShapeDonut(8, 40)); +class AncientBlizzard2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.AncientBlizzard2), new AOEShapeDonut(8, 40)); +class AncientBlizzardWhispersManifest(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.WhispersManifest3), new AOEShapeDonut(8, 40)); +class ForeInterment(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ForeInterment), new AOEShapeCone(40, 90.Degrees())); +class RearInterment(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RearInterment), new AOEShapeCone(40, 90.Degrees())); +class RightInterment(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RightInterment), new AOEShapeCone(40, 90.Degrees())); +class LeftInterment(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.LeftInterment), new AOEShapeCone(40, 90.Degrees())); +class Mirrored_ForeInterment(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Mirrored_ForeInterment), new AOEShapeCone(40, 90.Degrees())); +class Mirrored_RearInterment(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Mirrored_RearInterment), new AOEShapeCone(40, 90.Degrees())); +class Mirrored_RightInterment(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Mirrored_RightInterment), new AOEShapeCone(40, 90.Degrees())); +class Mirrored_LeftInterment(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Mirrored_LeftInterment), new AOEShapeCone(40, 90.Degrees())); +class EternalDamnation(BossModule module) : Components.CastGaze(module, ActionID.MakeSpell(AID.EternalDamnation)); +class EternalDamnationWhispersManifest(BossModule module) : Components.CastGaze(module, ActionID.MakeSpell(AID.WhispersManifest4)); +class EternalDamnation2(BossModule module) : Components.CastGaze(module, ActionID.MakeSpell(AID.EternalDamnation2)); +class WhisperedIncantation(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.WhisperedIncantation), "Remembers the next skill and uses it again when casting Whispers Manifest"); + +class MirroredIncantation(BossModule module) : BossComponent(module) { private int Mirrorstacks; public enum Types { None, Mirroredx3, Mirroredx4 } public Types Type { get; private set; } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.MirroredIncantation) Type = Types.Mirroredx3; @@ -145,15 +78,15 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf Type = Types.Mirroredx4; } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.MirroredIncantation || (AID)spell.Action.ID == AID.MirroredIncantation2) Type = Types.None; } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { - if (actor == module.PrimaryActor) + if (actor == Module.PrimaryActor) switch ((SID)status.ID) { case SID.MirroredIncantation: @@ -170,16 +103,16 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st } } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { - if (actor == module.PrimaryActor) + if (actor == Module.PrimaryActor) { if ((SID)status.ID == SID.MirroredIncantation) Mirrorstacks = 0; } } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (Mirrorstacks > 0) hints.Add($"Mirrored interments left: {Mirrorstacks}!"); @@ -190,63 +123,52 @@ public override void AddGlobalHints(BossModule module, GlobalHints hints) } } -class AncientFlare : BossComponent +class AncientFlare(BossModule module) : BossComponent(module) { private BitMask _pyretic; public bool Pyretic { get; private set; } private bool casting; - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.AncientFlare || (AID)spell.Action.ID == AID.AncientFlare2 || (AID)spell.Action.ID == AID.WhispersManifest) casting = true; } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.AncientFlare || (AID)spell.Action.ID == AID.AncientFlare2 || (AID)spell.Action.ID == AID.WhispersManifest) casting = false; } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Pyretic) - _pyretic.Set(module.Raid.FindSlot(actor.InstanceID)); + _pyretic.Set(Raid.FindSlot(actor.InstanceID)); } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Pyretic) - _pyretic.Clear(module.Raid.FindSlot(actor.InstanceID)); + _pyretic.Clear(Raid.FindSlot(actor.InstanceID)); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_pyretic[slot] != Pyretic) hints.Add("Pyretic on you! STOP everything!"); } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (casting) hints.Add("Applies Pyretic - STOP everything until it runs out!"); } } -class AncientHoly : Components.SelfTargetedAOEs -{ - public AncientHoly() : base(ActionID.MakeSpell(AID.AncientHoly), new AOEShapeCircle(20)) { } -} - -class AncientHoly2 : Components.SelfTargetedAOEs -{ - public AncientHoly2() : base(ActionID.MakeSpell(AID.AncientHoly2), new AOEShapeCircle(20)) { } -} - -class AncientHolyWhispersManifest : Components.SelfTargetedAOEs -{ - public AncientHolyWhispersManifest() : base(ActionID.MakeSpell(AID.WhispersManifest2), new AOEShapeCircle(20)) { } -} +class AncientHoly(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.AncientHoly), new AOEShapeCircle(20)); +class AncientHoly2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.AncientHoly2), new AOEShapeCircle(20)); +class AncientHolyWhispersManifest(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.WhispersManifest2), new AOEShapeCircle(20)); // TODO: wicked swipe, check if there are even more skills missing @@ -280,7 +202,4 @@ public KerStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.Hunt, GroupID = (uint)BossModuleInfo.HuntRank.SS, NameID = 10615)] -public class Ker : SimpleBossModule -{ - public Ker(WorldState ws, Actor primary) : base(ws, primary) { } -} +public class Ker(WorldState ws, Actor primary) : SimpleBossModule(ws, primary); diff --git a/BossMod/Modules/Endwalker/Hunt/RankS/KerShroud.cs b/BossMod/Modules/Endwalker/Hunt/RankS/KerShroud.cs index 3aabbddded..ca48c02f69 100644 --- a/BossMod/Modules/Endwalker/Hunt/RankS/KerShroud.cs +++ b/BossMod/Modules/Endwalker/Hunt/RankS/KerShroud.cs @@ -12,15 +12,9 @@ public enum AID : uint EntropicFlame = 27724, // Boss->self, 4.0s cast, range 60 width 8 rect } -class AccursedPox : Components.LocationTargetedAOEs -{ - public AccursedPox() : base(ActionID.MakeSpell(AID.AccursedPox), 8) { } -} +class AccursedPox(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.AccursedPox), 8); -class EntropicFlame : Components.SelfTargetedAOEs -{ - public EntropicFlame() : base(ActionID.MakeSpell(AID.EntropicFlame), new AOEShapeRect(60, 4)) { } -} +class EntropicFlame(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.EntropicFlame), new AOEShapeRect(60, 4)); class KerShroudStates : StateMachineBuilder { @@ -33,7 +27,4 @@ public KerShroudStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.Hunt, GroupID = (uint)BossModuleInfo.HuntRank.SS, NameID = 10616)] -public class KerShroud : SimpleBossModule -{ - public KerShroud(WorldState ws, Actor primary) : base(ws, primary) { } -} +public class KerShroud(WorldState ws, Actor primary) : SimpleBossModule(ws, primary); diff --git a/BossMod/Modules/Endwalker/Hunt/RankS/NarrowRift.cs b/BossMod/Modules/Endwalker/Hunt/RankS/NarrowRift.cs index 60e5023c28..1316ca2fe1 100644 --- a/BossMod/Modules/Endwalker/Hunt/RankS/NarrowRift.cs +++ b/BossMod/Modules/Endwalker/Hunt/RankS/NarrowRift.cs @@ -33,22 +33,22 @@ public enum SID : uint ForcedMarch = 1257, // Boss->player, extra=1 (forward) / 2 (backward) / 4 (left) / 8 (right) } -class EmptyPromise : Components.GenericAOEs +class EmptyPromise (BossModule module): Components.GenericAOEs(module) { private readonly List _pendingShapes = []; private static readonly AOEShapeCircle _shapeCircle = new(10); private static readonly AOEShapeDonut _shapeDonut = new(6, 40); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_pendingShapes.Count > 0) - yield return new(_pendingShapes.First(), module.PrimaryActor.Position, new(), module.PrimaryActor.CastInfo?.NPCFinishAt ?? module.WorldState.CurrentTime); // TODO: activation + yield return new(_pendingShapes.First(), Module.PrimaryActor.Position, new(), Module.PrimaryActor.CastInfo?.NPCFinishAt ?? WorldState.CurrentTime); // TODO: activation } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { - if (caster != module.PrimaryActor) + if (caster != Module.PrimaryActor) return; switch ((AID)spell.Action.ID) { @@ -69,32 +69,32 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf }; } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { - if (caster == module.PrimaryActor && _pendingShapes.Count > 0) + if (caster == Module.PrimaryActor && _pendingShapes.Count > 0) _pendingShapes.RemoveAt(0); } } -class VanishingRay : Components.GenericAOEs +class VanishingRay(BossModule module) : Components.GenericAOEs(module) { private DateTime _activation; private static readonly AOEShapeRect _shape = new(50, 4); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_activation != default) - yield return new(_shape, module.PrimaryActor.Position, module.PrimaryActor.Rotation, _activation); + yield return new(_shape, Module.PrimaryActor.Position, Module.PrimaryActor.Rotation, _activation); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { - if (caster != module.PrimaryActor) + if (caster != Module.PrimaryActor) return; switch ((AID)spell.Action.ID) { case AID.VanishingRayStart: - _activation = module.WorldState.CurrentTime.AddSeconds(4); + _activation = WorldState.FutureTime(4); break; case AID.VanishingRay: _activation = new(); @@ -103,13 +103,11 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } -class ContinualMeddling : Components.StatusDrivenForcedMarch +class ContinualMeddling(BossModule module) : Components.StatusDrivenForcedMarch(module, 2, (uint)SID.ForwardMarch, (uint)SID.AboutFace, (uint)SID.LeftFace, (uint)SID.RightFace) { - public ContinualMeddling() : base(2, (uint)SID.ForwardMarch, (uint)SID.AboutFace, (uint)SID.LeftFace, (uint)SID.RightFace) { } - - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { - if (module.PrimaryActor.CastInfo != null && module.PrimaryActor.CastInfo.IsSpell() && (AID)module.PrimaryActor.CastInfo.Action.ID is AID.ContinualMeddlingFR or AID.ContinualMeddlingFL or AID.ContinualMeddlingBL or AID.ContinualMeddlingBR) + if (Module.PrimaryActor.CastInfo != null && Module.PrimaryActor.CastInfo.IsSpell() && (AID)Module.PrimaryActor.CastInfo.Action.ID is AID.ContinualMeddlingFR or AID.ContinualMeddlingFL or AID.ContinualMeddlingBL or AID.ContinualMeddlingBR) hints.Add("Apply march debuffs"); } } @@ -126,7 +124,4 @@ public NarrowRiftStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.Hunt, GroupID = (uint)BossModuleInfo.HuntRank.S, NameID = 10622)] -public class NarrowRift : SimpleBossModule -{ - public NarrowRift(WorldState ws, Actor primary) : base(ws, primary) { } -} +public class NarrowRift(WorldState ws, Actor primary) : SimpleBossModule(ws, primary); diff --git a/BossMod/Modules/Endwalker/Hunt/RankS/Ophioneus.cs b/BossMod/Modules/Endwalker/Hunt/RankS/Ophioneus.cs index 68eddbc828..2bee9be3eb 100644 --- a/BossMod/Modules/Endwalker/Hunt/RankS/Ophioneus.cs +++ b/BossMod/Modules/Endwalker/Hunt/RankS/Ophioneus.cs @@ -19,26 +19,19 @@ public enum AID : uint Scratch = 27348, // Boss->player, 5.0s cast, single-target } -class RightMaw : Components.SelfTargetedAOEs -{ - public RightMaw() : base(ActionID.MakeSpell(AID.RightMaw), new AOEShapeCone(30, 90.Degrees())) { } -} - -class LeftMaw : Components.SelfTargetedAOEs -{ - public LeftMaw() : base(ActionID.MakeSpell(AID.LeftMaw), new AOEShapeCone(30, 90.Degrees())) { } -} +class RightMaw(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RightMaw), new AOEShapeCone(30, 90.Degrees())); +class LeftMaw(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.LeftMaw), new AOEShapeCone(30, 90.Degrees())); -class PyricCircleBurst : Components.GenericAOEs +class PyricCircleBurst(BossModule module) : Components.GenericAOEs(module) { private AOEInstance? _aoe; private static readonly AOEShapeCircle _shapeCircle = new(10); // TODO: verify falloff private static readonly AOEShapeDonut _shapeDonut = new(5, 40); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => Utils.ZeroOrOne(_aoe); + public override IEnumerable ActiveAOEs(int slot, Actor actor) => Utils.ZeroOrOne(_aoe); - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { @@ -59,17 +52,14 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.PyricCircle or AID.PyricBurst or AID.LeapingPyricCircleAOE or AID.LeapingPyricBurstAOE) _aoe = null; } } -class Scratch : Components.SingleTargetCast -{ - public Scratch() : base(ActionID.MakeSpell(AID.Scratch)) { } -} +class Scratch(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.Scratch)); class OphioneusStates : StateMachineBuilder { @@ -84,7 +74,4 @@ public OphioneusStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.Hunt, GroupID = (uint)BossModuleInfo.HuntRank.S, NameID = 10621)] -public class Ophioneus : SimpleBossModule -{ - public Ophioneus(WorldState ws, Actor primary) : base(ws, primary) { } -} +public class Ophioneus(WorldState ws, Actor primary) : SimpleBossModule(ws, primary); diff --git a/BossMod/Modules/Endwalker/Hunt/RankS/Ruminator.cs b/BossMod/Modules/Endwalker/Hunt/RankS/Ruminator.cs index 03bcc22b98..5150e39039 100644 --- a/BossMod/Modules/Endwalker/Hunt/RankS/Ruminator.cs +++ b/BossMod/Modules/Endwalker/Hunt/RankS/Ruminator.cs @@ -23,20 +23,20 @@ public enum AID : uint StygianVapor = 26882, // Boss->self, 5.0s cast, range 40 circle } -class ChitinousTrace : Components.GenericAOEs +class ChitinousTrace(BossModule module) : Components.GenericAOEs(module) { private bool _active; private readonly List _pendingShapes = []; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_active && _pendingShapes.Count > 0) - yield return new(_pendingShapes.First(), module.PrimaryActor.Position); // TODO: activation + yield return new(_pendingShapes.First(), Module.PrimaryActor.Position); // TODO: activation } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { - if (caster != module.PrimaryActor) + if (caster != Module.PrimaryActor) return; switch ((AID)spell.Action.ID) { @@ -58,9 +58,9 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { - if (caster == module.PrimaryActor && _pendingShapes.Count > 0 && + if (caster == Module.PrimaryActor && _pendingShapes.Count > 0 && (AID)spell.Action.ID is AID.ChitinousAdvanceCircleFirst or AID.ChitinousAdvanceCircleRest or AID.ChitinousAdvanceDonutFirst or AID.ChitinousAdvanceDonutRest or AID.ChitinousReversalCircleFirst or AID.ChitinousReversalCircleRest or AID.ChitinousReversalDonutFirst or AID.ChitinousReversalDonutRest) { @@ -70,10 +70,7 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } -class StygianVapor : Components.RaidwideCast -{ - public StygianVapor() : base(ActionID.MakeSpell(AID.StygianVapor)) { } -} +class StygianVapor(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.StygianVapor)); class RuminatorStates : StateMachineBuilder { @@ -86,7 +83,4 @@ public RuminatorStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.Hunt, GroupID = (uint)BossModuleInfo.HuntRank.S, NameID = 10620)] -public class Ruminator : SimpleBossModule -{ - public Ruminator(WorldState ws, Actor primary) : base(ws, primary) { } -} +public class Ruminator(WorldState ws, Actor primary) : SimpleBossModule(ws, primary); diff --git a/BossMod/Modules/Endwalker/Hunt/RankS/Sphatika.cs b/BossMod/Modules/Endwalker/Hunt/RankS/Sphatika.cs index 9635ee0525..ffba944c9b 100644 --- a/BossMod/Modules/Endwalker/Hunt/RankS/Sphatika.cs +++ b/BossMod/Modules/Endwalker/Hunt/RankS/Sphatika.cs @@ -38,33 +38,26 @@ public enum SID : uint RightwardBearing = 2838, // Boss->Boss, extra=0x0 } -class Gnaw : Components.SingleTargetCast -{ - public Gnaw() : base(ActionID.MakeSpell(AID.Gnaw)) { } -} +class Gnaw(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.Gnaw)); +class Caterwaul(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.Caterwaul)); -class Caterwaul : Components.RaidwideCast -{ - public Caterwaul() : base(ActionID.MakeSpell(AID.Caterwaul)) { } -} - -class Stance : Components.GenericAOEs +class Stance(BossModule module) : Components.GenericAOEs(module) { private List _pendingCleaves = new(); private static readonly AOEShapeCone _shape = new(40, 90.Degrees()); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_pendingCleaves.Count > 0) - yield return new(_shape, module.PrimaryActor.Position, _pendingCleaves.First()); // TODO: activation + yield return new(_shape, Module.PrimaryActor.Position, _pendingCleaves.First()); // TODO: activation } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { - if (!(module.PrimaryActor.CastInfo?.IsSpell() ?? false)) + if (!(Module.PrimaryActor.CastInfo?.IsSpell() ?? false)) return; - var hint = (AID)module.PrimaryActor.CastInfo!.Action.ID switch + var hint = (AID)Module.PrimaryActor.CastInfo!.Action.ID switch { AID.Brace1 or AID.Brace2 or AID.Brace3 or AID.Brace4 => "Select directions", AID.LickwhipStance => "Cleave sides literal", @@ -75,25 +68,25 @@ public override void AddGlobalHints(BossModule module, GlobalHints hints) hints.Add(hint); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { - if (caster != module.PrimaryActor) + if (caster != Module.PrimaryActor) return; switch ((AID)spell.Action.ID) { case AID.LickwhipStance: - InitCleaves(module, spell.Rotation, false); + InitCleaves(spell.Rotation, false); break; case AID.WhiplickStance: - InitCleaves(module, spell.Rotation, true); + InitCleaves(spell.Rotation, true); break; } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { - if (caster == module.PrimaryActor && _pendingCleaves.Count > 0 && + if (caster == Module.PrimaryActor && _pendingCleaves.Count > 0 && (AID)spell.Action.ID is AID.LongLickForward or AID.LongLickBackward or AID.LongLickLeftward or AID.LongLickRightward or AID.LongLickSecond or AID.HindWhipForward or AID.HindWhipBackward or AID.HindWhipLeftward or AID.HindWhipRightward or AID.HindWhipSecond) { @@ -101,11 +94,11 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn } } - private void InitCleaves(BossModule module, Angle reference, bool inverted) + private void InitCleaves(Angle reference, bool inverted) { // bearings are resolved in UI order; it is forward > backward > left > right, see PartyListPriority column List<(Angle offset, int priority)> bearings = new(); - foreach (var s in module.PrimaryActor.Statuses) + foreach (var s in Module.PrimaryActor.Statuses) { switch ((SID)s.ID) { @@ -149,7 +142,4 @@ public SphatikaStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.Hunt, GroupID = (uint)BossModuleInfo.HuntRank.S, NameID = 10618)] -public class Sphatika : SimpleBossModule -{ - public Sphatika(WorldState ws, Actor primary) : base(ws, primary) { } -} +public class Sphatika(WorldState ws, Actor primary) : SimpleBossModule(ws, primary); diff --git a/BossMod/Modules/Endwalker/Quest/Endwalker/AetherialRay.cs b/BossMod/Modules/Endwalker/Quest/Endwalker/AetherialRay.cs index 6a03439cfc..1c73cf81f9 100644 --- a/BossMod/Modules/Endwalker/Quest/Endwalker/AetherialRay.cs +++ b/BossMod/Modules/Endwalker/Quest/Endwalker/AetherialRay.cs @@ -1,36 +1,34 @@ namespace BossMod.Endwalker.Quest.Endwalker; -class AetherialRay : Components.GenericBaitAway +class AetherialRay(BossModule module) : Components.GenericBaitAway(module, centerAtTarget: true) { private DateTime _activation; - public AetherialRay() : base(centerAtTarget: true) { } - - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (_activation != default) hints.Add("Tankbuster 5x"); } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { if (_activation != default) hints.PredictedDamage.Add((new(1), _activation)); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.AetherialRay) _activation = spell.NPCFinishAt; } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.AetherialRay) ++NumCasts; } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.AetherialRayVisual) { diff --git a/BossMod/Modules/Endwalker/Quest/Endwalker/AkhMorn.cs b/BossMod/Modules/Endwalker/Quest/Endwalker/AkhMorn.cs index 67119cdb2c..a3cb90ae33 100644 --- a/BossMod/Modules/Endwalker/Quest/Endwalker/AkhMorn.cs +++ b/BossMod/Modules/Endwalker/Quest/Endwalker/AkhMorn.cs @@ -1,44 +1,42 @@ namespace BossMod.Endwalker.Quest.Endwalker; -class AkhMorn : Components.GenericBaitAway +class AkhMorn(BossModule module) : Components.GenericBaitAway(module, centerAtTarget: true) { private DateTime _activation; - public AkhMorn() : base(centerAtTarget: true) { } - - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (_activation != default) - hints.Add($"Tankbuster x{NumExpectedCasts(module)}"); + hints.Add($"Tankbuster x{NumExpectedCasts()}"); } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { if (_activation != default) hints.PredictedDamage.Add((new(1), _activation)); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.AkhMorn) { - CurrentBaits.Add(new(module.PrimaryActor, module.Raid.Player()!, new AOEShapeCircle(4))); + CurrentBaits.Add(new(Module.PrimaryActor, Raid.Player()!, new AOEShapeCircle(4))); _activation = spell.NPCFinishAt; } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.AkhMorn) ++NumCasts; } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.AkhMornVisual) { ++NumCasts; - if (NumCasts == NumExpectedCasts(module)) + if (NumCasts == NumExpectedCasts()) { CurrentBaits.Clear(); NumCasts = 0; @@ -47,5 +45,5 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } - private int NumExpectedCasts(BossModule module) => module.PrimaryActor.IsDead ? 8 : 6; + private int NumExpectedCasts() => Module.PrimaryActor.IsDead ? 8 : 6; } diff --git a/BossMod/Modules/Endwalker/Quest/Endwalker/Candlewick.cs b/BossMod/Modules/Endwalker/Quest/Endwalker/Candlewick.cs index dfd8d17a40..dd77413502 100644 --- a/BossMod/Modules/Endwalker/Quest/Endwalker/Candlewick.cs +++ b/BossMod/Modules/Endwalker/Quest/Endwalker/Candlewick.cs @@ -1,18 +1,16 @@ namespace BossMod.Endwalker.Quest.Endwalker; -class Candlewick : Components.ConcentricAOEs +class Candlewick(BossModule module) : Components.ConcentricAOEs(module, _shapes) { - private static readonly AOEShape[] _shapes = { new AOEShapeCircle(10), new AOEShapeDonut(10, 30) }; + private static readonly AOEShape[] _shapes = [new AOEShapeCircle(10), new AOEShapeDonut(10, 30)]; - public Candlewick() : base(_shapes) { } - - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.CandlewickPointBlank) AddSequence(caster.Position, spell.NPCFinishAt.AddSeconds(2)); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if (Sequences.Count > 0) { @@ -22,7 +20,7 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent AID.CandlewickDonut => 1, _ => -1 }; - AdvanceSequence(order, caster.Position, module.WorldState.CurrentTime.AddSeconds(2)); + AdvanceSequence(order, caster.Position, WorldState.FutureTime(2)); } } } diff --git a/BossMod/Modules/Endwalker/Quest/Endwalker/Endwalker.cs b/BossMod/Modules/Endwalker/Quest/Endwalker/Endwalker.cs index b9f9c1eb78..e20b70b092 100644 --- a/BossMod/Modules/Endwalker/Quest/Endwalker/Endwalker.cs +++ b/BossMod/Modules/Endwalker/Quest/Endwalker/Endwalker.cs @@ -2,11 +2,8 @@ class EndwalkerStates : StateMachineBuilder { - private Endwalker _module; - public EndwalkerStates(Endwalker module) : base(module) { - _module = module; DeathPhase(0, id => { SimpleState(id, 10000, "Enrage"); }) .ActivateOnEnter() .ActivateOnEnter() @@ -37,104 +34,45 @@ public EndwalkerStates(Endwalker module) : base(module) .ActivateOnEnter() .ActivateOnEnter() .ActivateOnEnter() - .Raw.Update = () => _module.ZenosP2() is var ZenosP2 && ZenosP2 != null && !ZenosP2.IsTargetable && ZenosP2.HP.Cur <= 1; + .Raw.Update = () => module.ZenosP2() is var ZenosP2 && ZenosP2 != null && !ZenosP2.IsTargetable && ZenosP2.HP.Cur <= 1; } } -class Megaflare : Components.LocationTargetedAOEs -{ - public Megaflare() : base(ActionID.MakeSpell(AID.Megaflare), 6) { } -} - -class Puddles : Components.PersistentInvertibleVoidzoneByCast -{ - public Puddles() : base(5, m => m.Enemies(OID.Puddles).Where(e => e.EventState != 7), ActionID.MakeSpell(AID.Hellfire)) { } -} - -class JudgementBolt : Components.RaidwideCast -{ - public JudgementBolt() : base(ActionID.MakeSpell(AID.JudgementBoltVisual)) { } -} - -class Hellfire : Components.RaidwideCast -{ - public Hellfire() : base(ActionID.MakeSpell(AID.HellfireVisual)) { } -} - -class StarBeyondStars : Components.SelfTargetedAOEs -{ - public StarBeyondStars() : base(ActionID.MakeSpell(AID.StarBeyondStarsHelper), new AOEShapeCone(50, 15.Degrees()), 6) { } -} - -class TheEdgeUnbound : Components.SelfTargetedAOEs -{ - public TheEdgeUnbound() : base(ActionID.MakeSpell(AID.TheEdgeUnbound), new AOEShapeCircle(10)) { } -} - -class WyrmsTongue : Components.SelfTargetedAOEs -{ - public WyrmsTongue() : base(ActionID.MakeSpell(AID.WyrmsTongueHelper), new AOEShapeCone(40, 30.Degrees())) { } -} +class Megaflare(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Megaflare), 6); +class Puddles(BossModule module) : Components.PersistentInvertibleVoidzoneByCast(module, 5, m => m.Enemies(OID.Puddles).Where(e => e.EventState != 7), ActionID.MakeSpell(AID.Hellfire)); +class JudgementBolt(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.JudgementBoltVisual)); +class Hellfire(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.HellfireVisual)); +class StarBeyondStars(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.StarBeyondStarsHelper), new AOEShapeCone(50, 15.Degrees()), 6); +class TheEdgeUnbound(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TheEdgeUnbound), new AOEShapeCircle(10)); +class WyrmsTongue(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.WyrmsTongueHelper), new AOEShapeCone(40, 30.Degrees())); class NineNightsAvatar : Components.SelfTargetedAOEs { - public NineNightsAvatar() : base(ActionID.MakeSpell(AID.NineNightsAvatar), new AOEShapeCircle(10)) { Color = ArenaColor.Danger; } + public NineNightsAvatar(BossModule module) : base(module, ActionID.MakeSpell(AID.NineNightsAvatar), new AOEShapeCircle(10)) { Color = ArenaColor.Danger; } } -class NineNightsHelpers : Components.SelfTargetedAOEs +class NineNightsHelpers(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.NineNightsHelpers), new AOEShapeCircle(10), 6) { - public NineNightsHelpers() : base(ActionID.MakeSpell(AID.NineNightsHelpers), new AOEShapeCircle(10), 6) { } - - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) - => ActiveCasters.Select((c, i) => new AOEInstance(Shape, c.Position, c.CastInfo!.Rotation, c.CastInfo.NPCFinishAt, i < 2 ? ArenaColor.Danger : ArenaColor.AOE)); -} - -class VeilAsunder : Components.LocationTargetedAOEs -{ - public VeilAsunder() : base(ActionID.MakeSpell(AID.VeilAsunderHelper), 6) { } + public override IEnumerable ActiveAOEs(int slot, Actor actor) => ActiveCasters.Select((c, i) => new AOEInstance(Shape, c.Position, c.CastInfo!.Rotation, c.CastInfo.NPCFinishAt, i < 2 ? ArenaColor.Danger : ArenaColor.AOE)); } -class MortalCoil : Components.SelfTargetedAOEs -{ - public MortalCoil() : base(ActionID.MakeSpell(AID.MortalCoilVisual), new AOEShapeDonut(8, 20)) { } -} - -class DiamondDust : Components.RaidwideCast -{ - public DiamondDust() : base(ActionID.MakeSpell(AID.DiamondDustVisual), "Raidwide. Turns floor to ice.") { } -} - -class DeadGaze : Components.CastGaze -{ - public DeadGaze() : base(ActionID.MakeSpell(AID.DeadGazeVisual)) { } -} +class VeilAsunder(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.VeilAsunderHelper), 6); +class MortalCoil(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.MortalCoilVisual), new AOEShapeDonut(8, 20)); +class DiamondDust(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.DiamondDustVisual), "Raidwide. Turns floor to ice."); +class DeadGaze(BossModule module) : Components.CastGaze(module, ActionID.MakeSpell(AID.DeadGazeVisual)); class TidalWave2 : Components.KnockbackFromCastTarget { - public TidalWave2() : base(ActionID.MakeSpell(AID.TidalWaveVisual2), 25, kind: Kind.DirForward) { StopAtWall = true; } -} - -class SwiftAsShadow : Components.ChargeAOEs -{ - public SwiftAsShadow() : base(ActionID.MakeSpell(AID.SwiftAsShadow), 1) { } -} - -class Extinguishment : Components.SelfTargetedAOEs -{ - public Extinguishment() : base(ActionID.MakeSpell(AID.ExtinguishmentVisual), new AOEShapeDonut(10, 30)) { } + public TidalWave2(BossModule module) : base(module, ActionID.MakeSpell(AID.TidalWaveVisual2), 25, kind: Kind.DirForward) { StopAtWall = true; } } -class TheEdgeUnbound2 : Components.SelfTargetedAOEs -{ - public TheEdgeUnbound2() : base(ActionID.MakeSpell(AID.TheEdgeUnbound2), new AOEShapeCircle(10)) { } -} +class SwiftAsShadow(BossModule module) : Components.ChargeAOEs(module, ActionID.MakeSpell(AID.SwiftAsShadow), 1); +class Extinguishment(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ExtinguishmentVisual), new AOEShapeDonut(10, 30)); +class TheEdgeUnbound2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TheEdgeUnbound2), new AOEShapeCircle(10)); -class UnmovingDvenadkatik : Components.SelfTargetedAOEs +class UnmovingDvenadkatik(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.UnmovingDvenadkatikVisual), new AOEShapeCone(50, 15.Degrees()), 10) { - public UnmovingDvenadkatik() : base(ActionID.MakeSpell(AID.UnmovingDvenadkatikVisual), new AOEShapeCone(50, 15.Degrees()), 10) { } - - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) - => ActiveCasters.Select((c, i) => new AOEInstance(Shape, c.Position, c.CastInfo!.Rotation, c.CastInfo.NPCFinishAt, i < 2 ? ArenaColor.Danger : ArenaColor.AOE)); + public override IEnumerable ActiveAOEs(int slot, Actor actor) => ActiveCasters.Select((c, i) => new AOEInstance(Shape, c.Position, c.CastInfo!.Rotation, c.CastInfo.NPCFinishAt, i < 2 ? ArenaColor.Danger : ArenaColor.AOE)); } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "croizat", PrimaryActorOID = (uint)OID.ZenosP1, GroupType = BossModuleInfo.GroupType.Quest, GroupID = 70000, NameID = 10393)] diff --git a/BossMod/Modules/Endwalker/Quest/Endwalker/Exaflare.cs b/BossMod/Modules/Endwalker/Quest/Endwalker/Exaflare.cs index dc601c21bc..484f69a6b1 100644 --- a/BossMod/Modules/Endwalker/Quest/Endwalker/Exaflare.cs +++ b/BossMod/Modules/Endwalker/Quest/Endwalker/Exaflare.cs @@ -1,10 +1,8 @@ namespace BossMod.Endwalker.Quest.Endwalker; -class Exaflare : Components.Exaflare +class Exaflare(BossModule module) : Components.Exaflare(module, 6) { - public Exaflare() : base(6) { } - - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.ExaflareFirstHit) { @@ -12,7 +10,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.ExaflareFirstHit or AID.ExaflareRest) { @@ -20,11 +18,11 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent int index = Lines.FindIndex(item => item.Next.AlmostEqual(caster.Position, 1)); if (index == -1) { - module.ReportError(this, $"Failed to find entry for {caster.InstanceID:X}"); + ReportError($"Failed to find entry for {caster.InstanceID:X}"); return; } - AdvanceLine(module, Lines[index], caster.Position); + AdvanceLine(Lines[index], caster.Position); if (Lines[index].ExplosionsLeft == 0) Lines.RemoveAt(index); } diff --git a/BossMod/Modules/Endwalker/Quest/Endwalker/SilveredEdge.cs b/BossMod/Modules/Endwalker/Quest/Endwalker/SilveredEdge.cs index af27d4bac8..91815b22a8 100644 --- a/BossMod/Modules/Endwalker/Quest/Endwalker/SilveredEdge.cs +++ b/BossMod/Modules/Endwalker/Quest/Endwalker/SilveredEdge.cs @@ -1,6 +1,6 @@ namespace BossMod.Endwalker.Quest.Endwalker; -class SilveredEdge : Components.GenericAOEs +class SilveredEdge(BossModule module) : Components.GenericAOEs(module) { private DateTime _activation; private bool active; @@ -8,23 +8,23 @@ class SilveredEdge : Components.GenericAOEs private Angle _rotation; private static readonly AOEShapeRect rect = new(40, 3); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (active && casting) { - yield return new(rect, module.PrimaryActor.Position, Angle.FromDirection(actor.Position - module.PrimaryActor.Position), _activation); - yield return new(rect, module.PrimaryActor.Position, Angle.FromDirection(actor.Position - module.PrimaryActor.Position) + 120.Degrees(), _activation); - yield return new(rect, module.PrimaryActor.Position, Angle.FromDirection(actor.Position - module.PrimaryActor.Position) + 240.Degrees(), _activation); + yield return new(rect, Module.PrimaryActor.Position, Angle.FromDirection(actor.Position - Module.PrimaryActor.Position), _activation); + yield return new(rect, Module.PrimaryActor.Position, Angle.FromDirection(actor.Position - Module.PrimaryActor.Position) + 120.Degrees(), _activation); + yield return new(rect, Module.PrimaryActor.Position, Angle.FromDirection(actor.Position - Module.PrimaryActor.Position) + 240.Degrees(), _activation); } if (active && !casting) { - yield return new(rect, module.PrimaryActor.Position, _rotation, _activation); - yield return new(rect, module.PrimaryActor.Position, _rotation + 120.Degrees(), _activation); - yield return new(rect, module.PrimaryActor.Position, _rotation + 240.Degrees(), _activation); + yield return new(rect, Module.PrimaryActor.Position, _rotation, _activation); + yield return new(rect, Module.PrimaryActor.Position, _rotation + 120.Degrees(), _activation); + yield return new(rect, Module.PrimaryActor.Position, _rotation + 240.Degrees(), _activation); } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.SilveredEdge) { @@ -34,16 +34,16 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.SilveredEdge) { casting = false; - _rotation = Angle.FromDirection(module.Raid.Player()!.Position - caster.Position); + _rotation = Angle.FromDirection(Raid.Player()!.Position - caster.Position); } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.SilveredEdgeVisual) { @@ -56,9 +56,9 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { if (!casting) - base.AddAIHints(module, slot, actor, assignment, hints); + base.AddAIHints(slot, actor, assignment, hints); } } diff --git a/BossMod/Modules/Endwalker/Quest/Endwalker/TidalWave.cs b/BossMod/Modules/Endwalker/Quest/Endwalker/TidalWave.cs index 62aa60f94b..50552dbbfb 100644 --- a/BossMod/Modules/Endwalker/Quest/Endwalker/TidalWave.cs +++ b/BossMod/Modules/Endwalker/Quest/Endwalker/TidalWave.cs @@ -5,9 +5,11 @@ class TidalWave : Components.KnockbackFromCastTarget private Megaflare? _megaflare; // TODO: Make AI function for Destination Unsafe - public TidalWave() : base(ActionID.MakeSpell(AID.TidalWaveVisual), 25, kind: Kind.DirForward) { StopAtWall = true; } + public TidalWave(BossModule module) : base(module, ActionID.MakeSpell(AID.TidalWaveVisual), 25, kind: Kind.DirForward) + { + StopAtWall = true; + _megaflare = module.FindComponent(); + } - public override void Init(BossModule module) => _megaflare = module.FindComponent(); - - public override bool DestinationUnsafe(BossModule module, int slot, Actor actor, WPos pos) => _megaflare?.ActiveAOEs(module, slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false; + public override bool DestinationUnsafe(int slot, Actor actor, WPos pos) => _megaflare?.ActiveAOEs(slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false; } diff --git a/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/Border.cs b/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/Border.cs index 67c61c125d..964f1519e1 100644 --- a/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/Border.cs +++ b/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/Border.cs @@ -1,6 +1,6 @@ namespace BossMod.Endwalker.Savage.P10SPandaemonium; -class Border : BossComponent +class Border(BossModule module) : BossComponent(module) { public bool LBridgeActive { get; private set; } public bool RBridgeActive { get; private set; } @@ -14,18 +14,18 @@ class Border : BossComponent public static bool InsideMainPlatform(BossModule module, WPos pos) => pos.InRect(new(module.Bounds.Center.X, MainPlatformCenterZ), new WDir(1, 0), MainPlatformHalfSize.X, MainPlatformHalfSize.X, MainPlatformHalfSize.Z); - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - DrawPlatform(arena, new(module.Bounds.Center.X, MainPlatformCenterZ), MainPlatformHalfSize); - DrawPlatform(arena, new(module.Bounds.Center.X + SidePlatformOffsetX, SidePlayformCenterZ), SidePlatformHalfSize); - DrawPlatform(arena, new(module.Bounds.Center.X - SidePlatformOffsetX, SidePlayformCenterZ), SidePlatformHalfSize); + DrawPlatform(new(Module.Bounds.Center.X, MainPlatformCenterZ), MainPlatformHalfSize); + DrawPlatform(new(Module.Bounds.Center.X + SidePlatformOffsetX, SidePlayformCenterZ), SidePlatformHalfSize); + DrawPlatform(new(Module.Bounds.Center.X - SidePlatformOffsetX, SidePlayformCenterZ), SidePlatformHalfSize); if (LBridgeActive) - DrawBridge(arena, -1); + DrawBridge(-1); if (RBridgeActive) - DrawBridge(arena, +1); + DrawBridge(+1); } - public override void OnEventEnvControl(BossModule module, byte index, uint state) + public override void OnEventEnvControl(byte index, uint state) { if (state is 0x00020001 or 0x00080004) { @@ -37,18 +37,18 @@ public override void OnEventEnvControl(BossModule module, byte index, uint state } } - private void DrawPlatform(MiniArena arena, WPos center, WDir cornerOffset) + private void DrawPlatform(WPos center, WDir cornerOffset) { var otherCorner = new WDir(cornerOffset.X, -cornerOffset.Z); - arena.AddQuad(center - cornerOffset, center - otherCorner, center + cornerOffset, center + otherCorner, ArenaColor.Border); + Arena.AddQuad(center - cornerOffset, center - otherCorner, center + cornerOffset, center + otherCorner, ArenaColor.Border); } - private void DrawBridge(MiniArena arena, float dir) + private void DrawBridge(float dir) { - var p1 = arena.Bounds.Center + new WDir(MainPlatformHalfSize.X * dir, 0); - var p2 = arena.Bounds.Center + new WDir((SidePlatformOffsetX - SidePlatformHalfSize.X) * dir, 0); + var p1 = Arena.Bounds.Center + new WDir(MainPlatformHalfSize.X * dir, 0); + var p2 = Arena.Bounds.Center + new WDir((SidePlatformOffsetX - SidePlatformHalfSize.X) * dir, 0); var o = new WDir(0, 1); - arena.AddLine(p1 + o, p2 + o, ArenaColor.Border); - arena.AddLine(p1 - o, p2 - o, ArenaColor.Border); + Arena.AddLine(p1 + o, p2 + o, ArenaColor.Border); + Arena.AddLine(p1 - o, p2 - o, ArenaColor.Border); } } diff --git a/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/DaemoniacBonds.cs b/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/DaemoniacBonds.cs index d7d6d09c71..b159ff5c3a 100644 --- a/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/DaemoniacBonds.cs +++ b/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/DaemoniacBonds.cs @@ -1,6 +1,6 @@ namespace BossMod.Endwalker.Savage.P10SPandaemonium; -class DaemoniacBonds : Components.UniformStackSpread +class DaemoniacBonds(BossModule module) : Components.UniformStackSpread(module, 4, 6, alwaysShowSpreads: true) { public int NumMechanics { get; private set; } private List _spreadTargets = new(); @@ -8,8 +8,6 @@ class DaemoniacBonds : Components.UniformStackSpread private DateTime _spreadResolve; private DateTime _stackResolve; - public DaemoniacBonds() : base(4, 6, alwaysShowSpreads: true) { } - public void Show() { if (_spreadResolve < _stackResolve) @@ -18,7 +16,7 @@ public void Show() AddStacks(_stackTargets, _stackResolve); } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (_spreadResolve == default || _stackResolve == default) return; @@ -27,7 +25,7 @@ public override void AddGlobalHints(BossModule module, GlobalHints hints) hints.Add($"Debuff order: {orderHint}"); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { switch ((SID)status.ID) { @@ -44,7 +42,7 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { diff --git a/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/EntanglingWeb.cs b/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/EntanglingWeb.cs index 6f0b6d413c..4b84832cbc 100644 --- a/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/EntanglingWeb.cs +++ b/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/EntanglingWeb.cs @@ -1,23 +1,20 @@ namespace BossMod.Endwalker.Savage.P10SPandaemonium; -class EntanglingWebAOE : Components.LocationTargetedAOEs -{ - public EntanglingWebAOE() : base(ActionID.MakeSpell(AID.EntanglingWebAOE), 5) { } -} +class EntanglingWebAOE(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.EntanglingWebAOE), 5); class EntanglingWebHints : BossComponent { - private IReadOnlyList _pillars = ActorEnumeration.EmptyList; + private IReadOnlyList _pillars; private List _targets = new(); private static readonly float _radius = 5; - public override void Init(BossModule module) + public EntanglingWebHints(BossModule module) : base(module) { _pillars = module.Enemies(OID.Pillar); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_targets.Contains(actor)) { @@ -33,20 +30,20 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - arena.Actors(_pillars, ArenaColor.Object, true); + Arena.Actors(_pillars, ArenaColor.Object, true); foreach (var t in _targets) - arena.AddCircle(t.Position, _radius, ArenaColor.Danger); + Arena.AddCircle(t.Position, _radius, ArenaColor.Danger); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.EntanglingWebAOE && _targets.Count > 0) _targets.RemoveAt(0); } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.EntanglingWeb) _targets.Add(actor); diff --git a/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/HarrowingHell.cs b/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/HarrowingHell.cs index 871e007d4a..9f92a20b1f 100644 --- a/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/HarrowingHell.cs +++ b/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/HarrowingHell.cs @@ -1,17 +1,17 @@ namespace BossMod.Endwalker.Savage.P10SPandaemonium; -class HarrowingHell : BossComponent +class HarrowingHell(BossModule module) : BossComponent(module) { public int NumCasts { get; private set; } private BitMask _closestTargets; - public override void Update(BossModule module) + public override void Update() { // boss always points to (0,1) => offset dot dir == z + const - _closestTargets = module.Raid.WithSlot().OrderBy(ia => ia.Item2.Position.Z).Take(2).Mask(); + _closestTargets = Raid.WithSlot().OrderBy(ia => ia.Item2.Position.Z).Take(2).Mask(); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { bool soaking = _closestTargets[slot]; bool shouldSoak = actor.Role == Role.Tank; @@ -19,7 +19,7 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint hints.Add(shouldSoak ? "Stay in front of the raid!" : "Go behind tanks!"); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.HarrowingHellAOE1 or AID.HarrowingHellAOE2 or AID.HarrowingHellAOE3 or AID.HarrowingHellAOE4 or AID.HarrowingHellAOE5 or AID.HarrowingHellAOE6 or AID.HarrowingHellAOE7 or AID.HarrowingHellAOE8 or AID.HarrowingHellKnockback) ++NumCasts; diff --git a/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/P10SPandaemonium.cs b/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/P10SPandaemonium.cs index 8ec8cef6c1..ea4fa04d51 100644 --- a/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/P10SPandaemonium.cs +++ b/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/P10SPandaemonium.cs @@ -1,55 +1,22 @@ namespace BossMod.Endwalker.Savage.P10SPandaemonium; -class DividingWings : Components.BaitAwayTethers -{ - public DividingWings() : base(new AOEShapeCone(60, 60.Degrees()), (uint)TetherID.DividingWings, ActionID.MakeSpell(AID.DividingWingsAOE)) { } -} - -class PandaemonsHoly : Components.SelfTargetedAOEs -{ - public PandaemonsHoly() : base(ActionID.MakeSpell(AID.PandaemonsHoly), new AOEShapeCircle(36)) { } -} +class DividingWings(BossModule module) : Components.BaitAwayTethers(module, new AOEShapeCone(60, 60.Degrees()), (uint)TetherID.DividingWings, ActionID.MakeSpell(AID.DividingWingsAOE)); +class PandaemonsHoly(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PandaemonsHoly), new AOEShapeCircle(36)); // note: origin seems to be weird? -class CirclesOfPandaemonium : Components.SelfTargetedAOEs -{ - public CirclesOfPandaemonium() : base(ActionID.MakeSpell(AID.CirclesOfPandaemonium), new AOEShapeDonut(12, 40)) { } - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => ActiveCasters.Select(c => new AOEInstance(Shape, new(module.Bounds.Center.X, Border.MainPlatformCenterZ - Border.MainPlatformHalfSize.Z), c.CastInfo!.Rotation, c.CastInfo.NPCFinishAt, Color, Risky)); -} - -class Imprisonment : Components.SelfTargetedAOEs +class CirclesOfPandaemonium(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.CirclesOfPandaemonium), new AOEShapeDonut(12, 40)) { - public Imprisonment() : base(ActionID.MakeSpell(AID.ImprisonmentAOE), new AOEShapeCircle(4)) { } + public override IEnumerable ActiveAOEs(int slot, Actor actor) => ActiveCasters.Select(c => new AOEInstance(Shape, new(Module.Bounds.Center.X, Border.MainPlatformCenterZ - Border.MainPlatformHalfSize.Z), c.CastInfo!.Rotation, c.CastInfo.NPCFinishAt, Color, Risky)); } -class Cannonspawn : Components.SelfTargetedAOEs -{ - public Cannonspawn() : base(ActionID.MakeSpell(AID.CannonspawnAOE), new AOEShapeDonut(3, 8)) { } -} - -class PealOfDamnation : Components.SelfTargetedAOEs -{ - public PealOfDamnation() : base(ActionID.MakeSpell(AID.PealOfDamnation), new AOEShapeRect(50, 3.5f)) { } -} - -class PandaemoniacPillars : Components.CastTowers -{ - public PandaemoniacPillars() : base(ActionID.MakeSpell(AID.Bury), 2) { } -} - -class Touchdown : Components.SelfTargetedAOEs -{ - public Touchdown() : base(ActionID.MakeSpell(AID.TouchdownAOE), new AOEShapeCircle(20)) { } -} +class Imprisonment(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ImprisonmentAOE), new AOEShapeCircle(4)); +class Cannonspawn(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.CannonspawnAOE), new AOEShapeDonut(3, 8)); +class PealOfDamnation(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PealOfDamnation), new AOEShapeRect(50, 3.5f)); +class PandaemoniacPillars(BossModule module) : Components.CastTowers(module, ActionID.MakeSpell(AID.Bury), 2); +class Touchdown(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TouchdownAOE), new AOEShapeCircle(20)); [ConfigDisplay(Order = 0x1A0, Parent = typeof(EndwalkerConfig))] -public class P10SPandaemoniumConfig : CooldownPlanningConfigNode -{ - public P10SPandaemoniumConfig() : base(90) { } -} +public class P10SPandaemoniumConfig() : CooldownPlanningConfigNode(90); [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 939, NameID = 12354)] -public class P10SPandaemonium : BossModule -{ - public P10SPandaemonium(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsRect(new(100, 92.5f), 30, 22.5f)) { } -} +public class P10SPandaemonium(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsRect(new(100, 92.5f), 30, 22.5f)); diff --git a/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/PandaemoniacMeltdown.cs b/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/PandaemoniacMeltdown.cs index 7d4986dbac..fee8cd2f79 100644 --- a/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/PandaemoniacMeltdown.cs +++ b/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/PandaemoniacMeltdown.cs @@ -1,7 +1,7 @@ namespace BossMod.Endwalker.Savage.P10SPandaemonium; // TODO: generalize (line stack/spread) -class PandaemoniacMeltdown : Components.CastCounter +class PandaemoniacMeltdown(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.PandaemoniacMeltdownStack)) { private Actor? _stackTarget; private List _spreadTargets = new(); @@ -9,59 +9,57 @@ class PandaemoniacMeltdown : Components.CastCounter private static readonly AOEShapeRect _shapeStack = new(50, 3); private static readonly AOEShapeRect _shapeSpread = new(50, 2); - public PandaemoniacMeltdown() : base(ActionID.MakeSpell(AID.PandaemoniacMeltdownStack)) { } - - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { bool isSpread = _spreadTargets.Contains(actor); - if (_spreadTargets.Any(t => t != actor && _shapeSpread.Check(actor.Position, module.PrimaryActor.Position, Angle.FromDirection(t.Position - module.PrimaryActor.Position)))) + if (_spreadTargets.Any(t => t != actor && _shapeSpread.Check(actor.Position, Module.PrimaryActor.Position, Angle.FromDirection(t.Position - Module.PrimaryActor.Position)))) hints.Add("GTFO from other spreads!"); - if (isSpread && module.Raid.WithoutSlot().Exclude(actor).InShape(_shapeSpread, module.PrimaryActor.Position, Angle.FromDirection(actor.Position - module.PrimaryActor.Position)).Any()) + if (isSpread && Raid.WithoutSlot().Exclude(actor).InShape(_shapeSpread, Module.PrimaryActor.Position, Angle.FromDirection(actor.Position - Module.PrimaryActor.Position)).Any()) hints.Add("Aim spread away from raid!"); if (_stackTarget == actor) { - if (_spreadTargets.InShape(_shapeStack, module.PrimaryActor.Position, Angle.FromDirection(actor.Position - module.PrimaryActor.Position)).Any()) + if (_spreadTargets.InShape(_shapeStack, Module.PrimaryActor.Position, Angle.FromDirection(actor.Position - Module.PrimaryActor.Position)).Any()) hints.Add("Aim stack away from spreads!"); } else if (_stackTarget != null) { - bool inStack = _shapeStack.Check(actor.Position, module.PrimaryActor.Position, Angle.FromDirection(_stackTarget.Position - module.PrimaryActor.Position)); + bool inStack = _shapeStack.Check(actor.Position, Module.PrimaryActor.Position, Angle.FromDirection(_stackTarget.Position - Module.PrimaryActor.Position)); if (isSpread == inStack) hints.Add(isSpread ? "GTFO from stack!" : "Stack in line!"); } } - public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) + public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) { return player == _stackTarget ? PlayerPriority.Interesting : _spreadTargets.Contains(player) ? PlayerPriority.Danger : PlayerPriority.Irrelevant; } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { bool isSpread = _spreadTargets.Contains(pc); if (_stackTarget != null && _stackTarget != pc) - _shapeStack.Draw(arena, module.PrimaryActor.Position, Angle.FromDirection(_stackTarget.Position - module.PrimaryActor.Position), isSpread ? ArenaColor.AOE : ArenaColor.SafeFromAOE); + _shapeStack.Draw(Arena, Module.PrimaryActor.Position, Angle.FromDirection(_stackTarget.Position - Module.PrimaryActor.Position), isSpread ? ArenaColor.AOE : ArenaColor.SafeFromAOE); foreach (var t in _spreadTargets.Exclude(pc)) - _shapeStack.Draw(arena, module.PrimaryActor.Position, Angle.FromDirection(t.Position - module.PrimaryActor.Position), ArenaColor.AOE); + _shapeStack.Draw(Arena, Module.PrimaryActor.Position, Angle.FromDirection(t.Position - Module.PrimaryActor.Position), ArenaColor.AOE); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (pc == _stackTarget) - _shapeStack.Outline(arena, module.PrimaryActor.Position, Angle.FromDirection(pc.Position - module.PrimaryActor.Position), ArenaColor.Safe); + _shapeStack.Outline(Arena, Module.PrimaryActor.Position, Angle.FromDirection(pc.Position - Module.PrimaryActor.Position), ArenaColor.Safe); else if (_spreadTargets.Contains(pc)) - _shapeSpread.Outline(arena, module.PrimaryActor.Position, Angle.FromDirection(pc.Position - module.PrimaryActor.Position), ArenaColor.Danger); + _shapeSpread.Outline(Arena, Module.PrimaryActor.Position, Angle.FromDirection(pc.Position - Module.PrimaryActor.Position), ArenaColor.Danger); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { - base.OnEventCast(module, caster, spell); + base.OnEventCast(caster, spell); if ((AID)spell.Action.ID == AID.PandaemoniacMeltdownTargetSelect) - _stackTarget = module.WorldState.Actors.Find(spell.MainTargetID); + _stackTarget = WorldState.Actors.Find(spell.MainTargetID); } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.PandaemoniacMeltdownSpread) _spreadTargets.Add(actor); diff --git a/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/PandaemoniacRay.cs b/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/PandaemoniacRay.cs index 4329c38da5..a289f3a5ec 100644 --- a/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/PandaemoniacRay.cs +++ b/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/PandaemoniacRay.cs @@ -1,27 +1,19 @@ namespace BossMod.Endwalker.Savage.P10SPandaemonium; -class PandaemoniacRay : Components.SelfTargetedAOEs -{ - public PandaemoniacRay() : base(ActionID.MakeSpell(AID.PandaemoniacRayAOE), new AOEShapeRect(30, 25)) { } -} +class PandaemoniacRay(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PandaemoniacRayAOE), new AOEShapeRect(30, 25)); class JadePassage : Components.GenericAOEs { - private IReadOnlyList _spheres = ActorEnumeration.EmptyList; + private IReadOnlyList _spheres; private DateTime _activation; private static readonly AOEShapeRect _shape = new(40, 1, 40); - public JadePassage() : base(ActionID.MakeSpell(AID.JadePassage)) { } - - public override void Init(BossModule module) + public JadePassage(BossModule module) : base(module, ActionID.MakeSpell(AID.JadePassage)) { _spheres = module.Enemies(OID.ArcaneSphere); - _activation = module.WorldState.CurrentTime.AddSeconds(3.6f); + _activation = WorldState.FutureTime(3.6f); } - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) - { - return _spheres.Where(s => !s.IsDead).Select(s => new AOEInstance(_shape, s.Position, s.Rotation, s.CastInfo?.NPCFinishAt ?? _activation)); - } + public override IEnumerable ActiveAOEs(int slot, Actor actor) => _spheres.Where(s => !s.IsDead).Select(s => new AOEInstance(_shape, s.Position, s.Rotation, s.CastInfo?.NPCFinishAt ?? _activation)); } diff --git a/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/PartedPlumes.cs b/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/PartedPlumes.cs index 37f2471acd..0c15363eac 100644 --- a/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/PartedPlumes.cs +++ b/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/PartedPlumes.cs @@ -1,22 +1,15 @@ namespace BossMod.Endwalker.Savage.P10SPandaemonium; -class PartedPlumes : Components.SelfTargetedAOEs +class PartedPlumes(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PartedPlumesAOE), new AOEShapeCone(50, 10.Degrees()), 16) { - public PartedPlumes() : base(ActionID.MakeSpell(AID.PartedPlumesAOE), new AOEShapeCone(50, 10.Degrees()), 16) { } - - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) - { - return ActiveCasters.Select((c, i) => new AOEInstance(Shape, c.Position, c.CastInfo!.Rotation, c.CastInfo.NPCFinishAt, i < 2 ? ArenaColor.Danger : ArenaColor.AOE)); - } + public override IEnumerable ActiveAOEs(int slot, Actor actor) => ActiveCasters.Select((c, i) => new AOEInstance(Shape, c.Position, c.CastInfo!.Rotation, c.CastInfo.NPCFinishAt, i < 2 ? ArenaColor.Danger : ArenaColor.AOE)); } -class PartedPlumesVoidzone : Components.GenericAOEs +class PartedPlumesVoidzone(BossModule module) : Components.GenericAOEs(module, default, "GTFO from voidzone!") { private static readonly AOEShapeCircle _shape = new(8); - public PartedPlumesVoidzone() : base(default, "GTFO from voidzone!") { } - - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { yield return new(_shape, new WPos(100, 100)); } diff --git a/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/Silkspit.cs b/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/Silkspit.cs index af3eb5b738..fc25f9cdcb 100644 --- a/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/Silkspit.cs +++ b/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/Silkspit.cs @@ -2,37 +2,35 @@ class Silkspit : Components.UniformStackSpread { - private IReadOnlyList _pillars = ActorEnumeration.EmptyList; + private IReadOnlyList _pillars; - public Silkspit() : base(0, 7) { } - - public override void Init(BossModule module) + public Silkspit(BossModule module) : base(module, 0, 7) { _pillars = module.Enemies(OID.Pillar); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { - base.AddHints(module, slot, actor, hints, movementHints); + base.AddHints(slot, actor, hints); if (IsSpreadTarget(actor) && _pillars.InRadius(actor.Position, SpreadRadius).Any()) hints.Add("GTFO from pillars!"); } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { - base.DrawArenaBackground(module, pcSlot, pc, arena); - arena.Actors(_pillars, ArenaColor.Object, true); + base.DrawArenaBackground(pcSlot, pc); + Arena.Actors(_pillars, ArenaColor.Object, true); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.SilkspitAOE) Spreads.Clear(); } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.Silkspit) - AddSpread(actor, module.WorldState.CurrentTime.AddSeconds(8)); + AddSpread(actor, WorldState.FutureTime(8)); } } diff --git a/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/SoulGrasp.cs b/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/SoulGrasp.cs index 178cd1319e..6398e8badf 100644 --- a/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/SoulGrasp.cs +++ b/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/SoulGrasp.cs @@ -1,16 +1,14 @@ namespace BossMod.Endwalker.Savage.P10SPandaemonium; -class SoulGrasp : Components.GenericSharedTankbuster +class SoulGrasp(BossModule module) : Components.GenericSharedTankbuster(module, ActionID.MakeSpell(AID.SoulGraspAOE), 4) { - public SoulGrasp() : base(ActionID.MakeSpell(AID.SoulGraspAOE), 4) { } - - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.SoulGrasp) { - Source = module.PrimaryActor; + Source = Module.PrimaryActor; Target = actor; - Activation = module.WorldState.CurrentTime.AddSeconds(5.8f); + Activation = WorldState.FutureTime(5.8f); } } } diff --git a/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/SteelWeb.cs b/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/SteelWeb.cs index f590136b46..1a69e30064 100644 --- a/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/SteelWeb.cs +++ b/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/SteelWeb.cs @@ -1,54 +1,52 @@ namespace BossMod.Endwalker.Savage.P10SPandaemonium; -class SteelWebStack : Components.UniformStackSpread +class SteelWebStack(BossModule module) : Components.UniformStackSpread(module, 6, 0, 3) { private BitMask _forbidden; - public SteelWebStack() : base(6, 0, 3) { } - - public override void OnTethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnTethered(Actor source, ActorTetherInfo tether) { if (tether.ID == (uint)TetherID.DividingWings) - _forbidden.Set(module.Raid.FindSlot(tether.Target)); + _forbidden.Set(Raid.FindSlot(tether.Target)); } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { switch ((IconID)iconID) { case IconID.SteelWeb: - AddStack(actor, module.WorldState.CurrentTime.AddSeconds(6.1f), _forbidden); + AddStack(actor, WorldState.FutureTime(6.1f), _forbidden); break; case IconID.EntanglingWeb: - _forbidden.Set(module.Raid.FindSlot(actor.InstanceID)); + _forbidden.Set(Raid.FindSlot(actor.InstanceID)); break; } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.SteelWebAOE) Stacks.RemoveAll(s => s.Target.InstanceID == spell.MainTargetID); } } -class SteelWebTethers : BossComponent +class SteelWebTethers(BossModule module) : BossComponent(module) { private List<(Actor from, Actor to, uint color)> _webs = new(); - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (var w in _webs) - arena.AddLine(w.from.Position, w.to.Position, w.color); + Arena.AddLine(w.from.Position, w.to.Position, w.color); } - public override void OnTethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnTethered(Actor source, ActorTetherInfo tether) { - if ((TetherID)tether.ID is TetherID.Web or TetherID.WebFail && module.WorldState.Actors.Find(tether.Target) is var target && target != null) + if ((TetherID)tether.ID is TetherID.Web or TetherID.WebFail && WorldState.Actors.Find(tether.Target) is var target && target != null) _webs.Add((source, target, (TetherID)tether.ID == TetherID.Web ? ArenaColor.Danger : ArenaColor.Enemy)); } - public override void OnUntethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnUntethered(Actor source, ActorTetherInfo tether) { if ((TetherID)tether.ID is TetherID.Web or TetherID.WebFail) _webs.RemoveAll(w => w.from == source); diff --git a/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/Turrets.cs b/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/Turrets.cs index 2b7e1794da..e4ba2913d5 100644 --- a/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/Turrets.cs +++ b/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/Turrets.cs @@ -1,6 +1,6 @@ namespace BossMod.Endwalker.Savage.P10SPandaemonium; -class Turrets : Components.Knockback +class Turrets(BossModule module) : Components.Knockback(module, ActionID.MakeSpell(AID.PealOfCondemnation), true, 1) // TODO: verify whether it ignores immunes { private Actor?[] _turrets = new Actor?[8]; // pairs in order of activation private DateTime _activation; @@ -9,20 +9,18 @@ class Turrets : Components.Knockback private static readonly float _distance = 17; private static readonly AOEShapeRect _shape = new(50, 2.5f); - public Turrets() : base(ActionID.MakeSpell(AID.PealOfCondemnation), true, 1) { } // TODO: verify whether it ignores immunes - - public override IEnumerable Sources(BossModule module, int slot, Actor actor) + public override IEnumerable Sources(int slot, Actor actor) { - foreach (var t in ImminentTurretsWithTargets(module)) + foreach (var t in ImminentTurretsWithTargets()) if (t.source != null && t.target != null) yield return new(t.source.Position, _distance, _activation, _shape, Angle.FromDirection(t.target.Position - t.source.Position)); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { int inCount = 0; bool outOfBounds = false; - foreach (var t in ImminentTurretsWithTargets(module)) + foreach (var t in ImminentTurretsWithTargets()) { if (t.source == null || t.target == null || !_shape.Check(actor.Position, t.source.Position, Angle.FromDirection(t.target.Position - t.source.Position))) continue; // not in aoe @@ -30,7 +28,7 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint ++inCount; var dir = actor.Position != t.source.Position ? (actor.Position - t.source.Position).Normalized() : new(); var to = actor.Position + _distance * dir; - outOfBounds |= !Border.InsideMainPlatform(module, to); + outOfBounds |= !Border.InsideMainPlatform(Module, to); } if (inCount > 1) @@ -41,33 +39,30 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint hints.Add("About to be knocked off platform!"); } - public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) - { - return ImminentTurretsWithTargets(module).Any(t => t.target == player) ? PlayerPriority.Interesting : PlayerPriority.Irrelevant; - } + public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) => ImminentTurretsWithTargets().Any(t => t.target == player) ? PlayerPriority.Interesting : PlayerPriority.Irrelevant; - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - foreach (var t in ImminentTurretsWithTargets(module)) + foreach (var t in ImminentTurretsWithTargets()) { - arena.Actor(t.source, ArenaColor.Enemy, true); + Arena.Actor(t.source, ArenaColor.Enemy, true); if (t.source != null && t.target != null) - _shape.Outline(arena, t.source.Position, Angle.FromDirection(t.target.Position - t.source.Position)); + _shape.Outline(Arena, t.source.Position, Angle.FromDirection(t.target.Position - t.source.Position)); } foreach (var t in FutureTurrets()) - arena.Actor(t, ArenaColor.Object, true); + Arena.Actor(t, ArenaColor.Object, true); - base.DrawArenaForeground(module, pcSlot, pc, arena); + base.DrawArenaForeground(pcSlot, pc); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.DarkResistanceDown) - _forbidden.Set(module.Raid.FindSlot(actor.InstanceID)); + _forbidden.Set(Raid.FindSlot(actor.InstanceID)); } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { var order = (IconID)iconID switch { @@ -80,15 +75,15 @@ public override void OnEventIcon(BossModule module, Actor actor, uint iconID) if (order < 0) return; - _activation = module.WorldState.CurrentTime.AddSeconds(8.1f); + _activation = WorldState.FutureTime(8.1f); if (_turrets[order * 2] == null) _turrets[order * 2] = actor; else if (_turrets[order * 2 + 1] == null) _turrets[order * 2 + 1] = actor; else - module.ReportError(this, $"More than 2 turrets of order {order}"); + ReportError($"More than 2 turrets of order {order}"); } - private IEnumerable<(Actor? source, Actor? target)> ImminentTurretsWithTargets(BossModule module) => _turrets.Skip(NumCasts).Take(2).Select(t => (t, module.WorldState.Actors.Find(t?.TargetID ?? 0))); + private IEnumerable<(Actor? source, Actor? target)> ImminentTurretsWithTargets() => _turrets.Skip(NumCasts).Take(2).Select(t => (t, WorldState.Actors.Find(t?.TargetID ?? 0))); private IEnumerable FutureTurrets() => _turrets.Skip(NumCasts + 2).Take(2); } diff --git a/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/WickedStep.cs b/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/WickedStep.cs index f83c83270b..d59b5f71ce 100644 --- a/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/WickedStep.cs +++ b/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/WickedStep.cs @@ -1,23 +1,21 @@ namespace BossMod.Endwalker.Savage.P10SPandaemonium; -class WickedStep : Components.Knockback +class WickedStep(BossModule module) : Components.Knockback(module, ignoreImmunes: true) { private Actor?[] _towers = { null, null }; private static readonly float _towerRadius = 4; private static readonly float _knockbackRadius = 36; - public WickedStep() : base(ignoreImmunes: true) { } - - public override IEnumerable Sources(BossModule module, int slot, Actor actor) + public override IEnumerable Sources(int slot, Actor actor) { foreach (var s in _towers.Where(s => s?.Position.InCircle(actor.Position, _towerRadius) ?? false)) yield return new(s!.Position, _knockbackRadius, s!.CastInfo!.NPCFinishAt); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { - base.AddHints(module, slot, actor, hints, movementHints); + base.AddHints(slot, actor, hints); bool soaking = _towers.Any(t => t?.Position.InCircle(actor.Position, _towerRadius) ?? false); bool shouldSoak = actor.Role == Role.Tank; @@ -25,22 +23,22 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint hints.Add(shouldSoak ? "Soak the tower!" : "GTFO from tower!"); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - base.DrawArenaForeground(module, pcSlot, pc, arena); + base.DrawArenaForeground(pcSlot, pc); foreach (var t in _towers) if (t != null) - Components.GenericTowers.DrawTower(arena, t.Position, _towerRadius, pc.Role == Role.Tank); + Components.GenericTowers.DrawTower(Arena, t.Position, _towerRadius, pc.Role == Role.Tank); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { var index = ActionToIndex(spell.Action); if (index >= 0) _towers[index] = caster; } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { var index = ActionToIndex(spell.Action); if (index >= 0) diff --git a/BossMod/Modules/Endwalker/Savage/P11SThemis/ArcaneRevelation.cs b/BossMod/Modules/Endwalker/Savage/P11SThemis/ArcaneRevelation.cs index 127243cfc6..0e502dd9d6 100644 --- a/BossMod/Modules/Endwalker/Savage/P11SThemis/ArcaneRevelation.cs +++ b/BossMod/Modules/Endwalker/Savage/P11SThemis/ArcaneRevelation.cs @@ -1,7 +1,7 @@ namespace BossMod.Endwalker.Savage.P11SThemis; // mirrors & spheres -class ArcaneRevelation : Components.GenericAOEs +class ArcaneRevelation(BossModule module) : Components.GenericAOEs(module) { private uint _activeMirrors; private uint _activeSpheres; @@ -10,9 +10,9 @@ class ArcaneRevelation : Components.GenericAOEs private static readonly AOEShapeRect _shapeMirror = new(50, 5); private static readonly AOEShapeCircle _shapeSphere = new(15); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => _aoes; + public override IEnumerable ActiveAOEs(int slot, Actor actor) => _aoes; - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { var (mirrors, spheres) = (AID)spell.Action.ID switch { @@ -31,7 +31,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.ArcheLight or AID.ArcheDark or AID.UnluckyLotLight or AID.UnluckyLotDark) { @@ -40,34 +40,34 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } - public override void OnActorPlayActionTimelineEvent(BossModule module, Actor actor, ushort id) + public override void OnActorPlayActionTimelineEvent(Actor actor, ushort id) { if (id != 0x1E46) return; if (actor.OID == _activeMirrors) - _aoes.Add(new(_shapeMirror, actor.Position, actor.Rotation, module.WorldState.CurrentTime.AddSeconds(8.7f))); + _aoes.Add(new(_shapeMirror, actor.Position, actor.Rotation, WorldState.FutureTime(8.7f))); else if (actor.OID == _activeSpheres) - _aoes.Add(new(_shapeSphere, actor.Position, actor.Rotation, module.WorldState.CurrentTime.AddSeconds(8.7f))); + _aoes.Add(new(_shapeSphere, actor.Position, actor.Rotation, WorldState.FutureTime(8.7f))); } } -class DismissalOverruling : Components.Knockback +class DismissalOverruling(BossModule module) : Components.Knockback(module) { private Actor? _source; - public override IEnumerable Sources(BossModule module, int slot, Actor actor) + public override IEnumerable Sources(int slot, Actor actor) { if (_source != null) yield return new(_source.Position, 11, _source.CastInfo!.NPCFinishAt); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.DismissalOverrulingLightAOE or AID.DismissalOverrulingDarkAOE) _source = caster; } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.DismissalOverrulingLightAOE or AID.DismissalOverrulingDarkAOE) { @@ -77,12 +77,5 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn } } -class InnerLight : Components.SelfTargetedAOEs -{ - public InnerLight() : base(ActionID.MakeSpell(AID.InnerLight), new AOEShapeCircle(13)) { } -} - -class OuterDark : Components.SelfTargetedAOEs -{ - public OuterDark() : base(ActionID.MakeSpell(AID.OuterDark), new AOEShapeDonut(8, 50)) { } -} +class InnerLight(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.InnerLight), new AOEShapeCircle(13)); +class OuterDark(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.OuterDark), new AOEShapeDonut(8, 50)); diff --git a/BossMod/Modules/Endwalker/Savage/P11SThemis/DarkAndLight.cs b/BossMod/Modules/Endwalker/Savage/P11SThemis/DarkAndLight.cs index e8bb2e2df6..df76accdb6 100644 --- a/BossMod/Modules/Endwalker/Savage/P11SThemis/DarkAndLight.cs +++ b/BossMod/Modules/Endwalker/Savage/P11SThemis/DarkAndLight.cs @@ -1,6 +1,6 @@ namespace BossMod.Endwalker.Savage.P11SThemis; -class DarkAndLight : BossComponent +class DarkAndLight(BossModule module) : BossComponent(module) { public enum TetherType { None, Near, Far } @@ -17,47 +17,51 @@ public struct PlayerState private static readonly float _farOffset = 13; private static readonly float _nearOffset = 7; - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { var state = _states[slot]; if (state.Tether != TetherType.None) hints.Add($"{state.Tether} tether", state.TetherBad); - if (movementHints != null && Safespot(module, slot, actor) is var safespot && safespot != null) + } + + public override void AddMovementHints(int slot, Actor actor, MovementHints movementHints) + { + if (Safespot(slot, actor) is var safespot && safespot != null) movementHints.Add(actor.Position, safespot.Value, ArenaColor.Safe); } - public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) + public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) { var pcState = _states[pcSlot]; return pcState.Tether != TetherType.None && pcState.PartnerSlot == playerSlot ? PlayerPriority.Danger : PlayerPriority.Irrelevant; } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { var pcState = _states[pcSlot]; - if (pcState.Tether != TetherType.None && module.Raid[pcState.PartnerSlot] is var partner && partner != null) - arena.AddLine(pc.Position, partner.Position, pcState.TetherBad ? ArenaColor.Danger : ArenaColor.Safe); - if (Safespot(module, pcSlot, pc) is var safespot && safespot != null) - arena.AddCircle(safespot.Value, 1, ArenaColor.Safe); + if (pcState.Tether != TetherType.None && Raid[pcState.PartnerSlot] is var partner && partner != null) + Arena.AddLine(pc.Position, partner.Position, pcState.TetherBad ? ArenaColor.Danger : ArenaColor.Safe); + if (Safespot(pcSlot, pc) is var safespot && safespot != null) + Arena.AddCircle(safespot.Value, 1, ArenaColor.Safe); } - public override void OnTethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnTethered(Actor source, ActorTetherInfo tether) { switch ((TetherID)tether.ID) { case TetherID.LightLightGood: case TetherID.DarkDarkGood: - UpdateTether(module.Raid.FindSlot(source.InstanceID), module.Raid.FindSlot(tether.Target), TetherType.Far, false); + UpdateTether(Raid.FindSlot(source.InstanceID), Raid.FindSlot(tether.Target), TetherType.Far, false); break; case TetherID.LightLightBad: case TetherID.DarkDarkBad: - UpdateTether(module.Raid.FindSlot(source.InstanceID), module.Raid.FindSlot(tether.Target), TetherType.Far, true); + UpdateTether(Raid.FindSlot(source.InstanceID), Raid.FindSlot(tether.Target), TetherType.Far, true); break; case TetherID.DarkLightGood: - UpdateTether(module.Raid.FindSlot(source.InstanceID), module.Raid.FindSlot(tether.Target), TetherType.Near, false); + UpdateTether(Raid.FindSlot(source.InstanceID), Raid.FindSlot(tether.Target), TetherType.Near, false); break; case TetherID.DarkLightBad: - UpdateTether(module.Raid.FindSlot(source.InstanceID), module.Raid.FindSlot(tether.Target), TetherType.Near, true); + UpdateTether(Raid.FindSlot(source.InstanceID), Raid.FindSlot(tether.Target), TetherType.Near, true); break; } } @@ -71,7 +75,7 @@ private void UpdateTether(int from, int to, TetherType type, bool bad) } // note: this uses default strats (kindred etc) - private WPos? Safespot(BossModule module, int slot, Actor actor) + private WPos? Safespot(int slot, Actor actor) { var tether = _states[slot].Tether; if (!ShowSafespots || tether == TetherType.None) @@ -82,8 +86,8 @@ private void UpdateTether(int from, int to, TetherType type, bool bad) { Role.Tank => isFar ? 180.Degrees() : -90.Degrees(), Role.Healer => isFar ? 0.Degrees() : 90.Degrees(), - _ => module.Raid[_states[slot].PartnerSlot]?.Role == Role.Tank ? (isFar ? -45.Degrees() : -135.Degrees()) : (isFar ? 135.Degrees() : 45.Degrees()) + _ => Raid[_states[slot].PartnerSlot]?.Role == Role.Tank ? (isFar ? -45.Degrees() : -135.Degrees()) : (isFar ? 135.Degrees() : 45.Degrees()) }; - return module.Bounds.Center + (isFar ? _farOffset : _nearOffset) * dir.ToDirection(); + return Module.Bounds.Center + (isFar ? _farOffset : _nearOffset) * dir.ToDirection(); } } diff --git a/BossMod/Modules/Endwalker/Savage/P11SThemis/DarkCurrent.cs b/BossMod/Modules/Endwalker/Savage/P11SThemis/DarkCurrent.cs index 5d4195d807..34a2294a47 100644 --- a/BossMod/Modules/Endwalker/Savage/P11SThemis/DarkCurrent.cs +++ b/BossMod/Modules/Endwalker/Savage/P11SThemis/DarkCurrent.cs @@ -1,12 +1,12 @@ namespace BossMod.Endwalker.Savage.P11SThemis; -class DarkCurrent : Components.GenericAOEs +class DarkCurrent(BossModule module) : Components.GenericAOEs(module) { private List _aoes = new(); private static readonly AOEShapeCircle _shape = new(8); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { foreach (var aoe in _aoes.Skip(3).Take(6)) yield return aoe; @@ -14,7 +14,7 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, yield return aoe; } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.DarkCurrentAOEFirst or AID.DarkCurrentAOERest) { @@ -26,7 +26,7 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } - public override void OnEventEnvControl(BossModule module, byte index, uint state) + public override void OnEventEnvControl(byte index, uint state) { if (index is 1 or 2 && state is 0x00020001 or 0x00200010) { @@ -38,15 +38,12 @@ public override void OnEventEnvControl(BossModule module, byte index, uint state { var offset = 13 * (startingAngle + i * rotation).ToDirection(); var color = i == 0 ? ArenaColor.Danger : ArenaColor.AOE; - _aoes.Add(new(_shape, module.Bounds.Center, default, module.WorldState.CurrentTime.AddSeconds(7.1f + i * 1.1f), color)); - _aoes.Add(new(_shape, module.Bounds.Center + offset, default, module.WorldState.CurrentTime.AddSeconds(7.1f + i * 1.1f), color)); - _aoes.Add(new(_shape, module.Bounds.Center - offset, default, module.WorldState.CurrentTime.AddSeconds(7.1f + i * 1.1f), color)); + _aoes.Add(new(_shape, Module.Bounds.Center, default, WorldState.FutureTime(7.1f + i * 1.1f), color)); + _aoes.Add(new(_shape, Module.Bounds.Center + offset, default, WorldState.FutureTime(7.1f + i * 1.1f), color)); + _aoes.Add(new(_shape, Module.Bounds.Center - offset, default, WorldState.FutureTime(7.1f + i * 1.1f), color)); } } } } -class BlindingLight : Components.SpreadFromCastTargets -{ - public BlindingLight() : base(ActionID.MakeSpell(AID.BlindingLightAOE), 6) { } -} +class BlindingLight(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.BlindingLightAOE), 6); diff --git a/BossMod/Modules/Endwalker/Savage/P11SThemis/Dike.cs b/BossMod/Modules/Endwalker/Savage/P11SThemis/Dike.cs index 59190adcbe..098a961414 100644 --- a/BossMod/Modules/Endwalker/Savage/P11SThemis/Dike.cs +++ b/BossMod/Modules/Endwalker/Savage/P11SThemis/Dike.cs @@ -1,18 +1,16 @@ namespace BossMod.Endwalker.Savage.P11SThemis; -class Dike : Components.CastCounter +class Dike(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.DikeSecond)) { private ulong _firstPrimaryTarget; - public Dike() : base(ActionID.MakeSpell(AID.DikeSecond)) { } - - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { - if (module.PrimaryActor.TargetID == _firstPrimaryTarget && actor.Role == Role.Tank) + if (Module.PrimaryActor.TargetID == _firstPrimaryTarget && actor.Role == Role.Tank) hints.Add(actor.InstanceID != _firstPrimaryTarget ? "Taunt!" : "Pass aggro!"); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.DikeAOE1Primary) _firstPrimaryTarget = spell.TargetID; diff --git a/BossMod/Modules/Endwalker/Savage/P11SThemis/DivisiveOverruling.cs b/BossMod/Modules/Endwalker/Savage/P11SThemis/DivisiveOverruling.cs index 436f23a648..87157a9b94 100644 --- a/BossMod/Modules/Endwalker/Savage/P11SThemis/DivisiveOverruling.cs +++ b/BossMod/Modules/Endwalker/Savage/P11SThemis/DivisiveOverruling.cs @@ -1,19 +1,19 @@ namespace BossMod.Endwalker.Savage.P11SThemis; -class DivisiveOverruling : Components.GenericAOEs +class DivisiveOverruling(BossModule module) : Components.GenericAOEs(module) { public List AOEs = new(); private static readonly AOEShapeRect _shapeNarrow = new(46, 8, 23); // note: boss variants are 23+23, clone variants are 46+0, doesn't matter too much private static readonly AOEShapeRect _shapeWide = new(46, 13, 23); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { var deadline = AOEs.FirstOrDefault().Activation.AddSeconds(1); return AOEs.TakeWhile(a => a.Activation < deadline); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { @@ -40,7 +40,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { diff --git a/BossMod/Modules/Endwalker/Savage/P11SThemis/HeartOfJudgment.cs b/BossMod/Modules/Endwalker/Savage/P11SThemis/HeartOfJudgment.cs index f50d8403a7..f244fef18c 100644 --- a/BossMod/Modules/Endwalker/Savage/P11SThemis/HeartOfJudgment.cs +++ b/BossMod/Modules/Endwalker/Savage/P11SThemis/HeartOfJudgment.cs @@ -2,13 +2,13 @@ class HeartOfJudgment : Components.GenericTowers { - public override void Init(BossModule module) + public HeartOfJudgment(BossModule module) : base(module) { for (int i = 0; i < 4; ++i) - Towers.Add(new(module.Bounds.Center + 11.5f * (45 + i * 90).Degrees().ToDirection(), 4, 2, 2)); + Towers.Add(new(Module.Bounds.Center + 11.5f * (45 + i * 90).Degrees().ToDirection(), 4, 2, 2)); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.Explosion or AID.MassiveExplosion) { diff --git a/BossMod/Modules/Endwalker/Savage/P11SThemis/InevitableLawSentence.cs b/BossMod/Modules/Endwalker/Savage/P11SThemis/InevitableLawSentence.cs index cb9db863d8..b443fe5320 100644 --- a/BossMod/Modules/Endwalker/Savage/P11SThemis/InevitableLawSentence.cs +++ b/BossMod/Modules/Endwalker/Savage/P11SThemis/InevitableLawSentence.cs @@ -1,36 +1,36 @@ namespace BossMod.Endwalker.Savage.P11SThemis; // note: currently we start showing stacks right after previous mechanic ends -class InevitableLawSentence : Components.GenericStackSpread +class InevitableLawSentence(BossModule module) : Components.GenericStackSpread(module) { - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { case AID.DivisiveOverrulingSoloLight: case AID.InnerLight: case AID.DivisiveOverrulingBossLight: - AddPartyStacks(module); + AddPartyStacks(); break; case AID.DivisiveOverrulingSoloDark: case AID.OuterDark: case AID.DivisiveOverrulingBossDark: - AddPairStacks(module); + AddPairStacks(); break; } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { case AID.JuryOverrulingProteanLight: case AID.UpheldOverrulingAOELight: - AddPartyStacks(module); + AddPartyStacks(); break; case AID.JuryOverrulingProteanDark: case AID.UpheldOverrulingAOEDark: - AddPairStacks(module); + AddPairStacks(); break; case AID.InevitableLaw: case AID.InevitableSentence: @@ -39,17 +39,17 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } - private void AddPartyStacks(BossModule module) + private void AddPartyStacks() { Stacks.Clear(); - foreach (var t in module.Raid.WithoutSlot(true).Where(t => t.Role == Role.Healer)) - Stacks.Add(new(t, 6, 4, activation: module.StateMachine.NextTransitionWithFlag(StateMachine.StateHint.Raidwide))); + foreach (var t in Raid.WithoutSlot(true).Where(t => t.Role == Role.Healer)) + Stacks.Add(new(t, 6, 4, Activation: Module.StateMachine.NextTransitionWithFlag(StateMachine.StateHint.Raidwide))); } - private void AddPairStacks(BossModule module) + private void AddPairStacks() { Stacks.Clear(); - foreach (var t in module.Raid.WithoutSlot(true).Where(t => t.Class.IsDD())) - Stacks.Add(new(t, 3, 2, activation: module.StateMachine.NextTransitionWithFlag(StateMachine.StateHint.Raidwide))); + foreach (var t in Raid.WithoutSlot(true).Where(t => t.Class.IsDD())) + Stacks.Add(new(t, 3, 2, Activation: Module.StateMachine.NextTransitionWithFlag(StateMachine.StateHint.Raidwide))); } } diff --git a/BossMod/Modules/Endwalker/Savage/P11SThemis/JuryOverruling.cs b/BossMod/Modules/Endwalker/Savage/P11SThemis/JuryOverruling.cs index a9b669c9f2..80445cfc0b 100644 --- a/BossMod/Modules/Endwalker/Savage/P11SThemis/JuryOverruling.cs +++ b/BossMod/Modules/Endwalker/Savage/P11SThemis/JuryOverruling.cs @@ -1,22 +1,13 @@ namespace BossMod.Endwalker.Savage.P11SThemis; -class JuryOverrulingProtean : Components.BaitAwayEveryone +class JuryOverrulingProtean(BossModule module) : Components.BaitAwayEveryone(module, module.PrimaryActor, new AOEShapeRect(50, 4)) { - public JuryOverrulingProtean() : base(new AOEShapeRect(50, 4)) { } - - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.JuryOverrulingProteanLight or AID.JuryOverrulingProteanDark) ++NumCasts; } } -class IllusoryGlare : Components.SelfTargetedAOEs -{ - public IllusoryGlare() : base(ActionID.MakeSpell(AID.IllusoryGlare), new AOEShapeCircle(5)) { } -} - -class IllusoryGloom : Components.SelfTargetedAOEs -{ - public IllusoryGloom() : base(ActionID.MakeSpell(AID.IllusoryGloom), new AOEShapeDonut(2, 9)) { } -} +class IllusoryGlare(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.IllusoryGlare), new AOEShapeCircle(5)); +class IllusoryGloom(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.IllusoryGloom), new AOEShapeDonut(2, 9)); diff --git a/BossMod/Modules/Endwalker/Savage/P11SThemis/Lightstream.cs b/BossMod/Modules/Endwalker/Savage/P11SThemis/Lightstream.cs index 5d3088112f..8d53c14367 100644 --- a/BossMod/Modules/Endwalker/Savage/P11SThemis/Lightstream.cs +++ b/BossMod/Modules/Endwalker/Savage/P11SThemis/Lightstream.cs @@ -1,14 +1,14 @@ namespace BossMod.Endwalker.Savage.P11SThemis; -class Lightstream : Components.GenericAOEs +class Lightstream(BossModule module) : Components.GenericAOEs(module) { private List _aoes = new(); private static readonly AOEShapeRect _shape = new(50, 5); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => _aoes; + public override IEnumerable ActiveAOEs(int slot, Actor actor) => _aoes; - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.LightstreamAOEFirst or AID.LightstreamAOERest) { @@ -18,7 +18,7 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { var rotation = (IconID)iconID switch { @@ -29,7 +29,7 @@ public override void OnEventIcon(BossModule module, Actor actor, uint iconID) if (rotation != default) { for (int i = 0; i < 7; ++i) - _aoes.Add(new(_shape, actor.Position, actor.Rotation + i * rotation, module.WorldState.CurrentTime.AddSeconds(8 + i * 1.1f))); + _aoes.Add(new(_shape, actor.Position, actor.Rotation + i * rotation, WorldState.FutureTime(8 + i * 1.1f))); _aoes.SortBy(aoe => aoe.Activation); } } diff --git a/BossMod/Modules/Endwalker/Savage/P11SThemis/P11SThemis.cs b/BossMod/Modules/Endwalker/Savage/P11SThemis/P11SThemis.cs index b15575d07d..029a2bf7af 100644 --- a/BossMod/Modules/Endwalker/Savage/P11SThemis/P11SThemis.cs +++ b/BossMod/Modules/Endwalker/Savage/P11SThemis/P11SThemis.cs @@ -1,13 +1,7 @@ namespace BossMod.Endwalker.Savage.P11SThemis; [ConfigDisplay(Order = 0x1B0, Parent = typeof(EndwalkerConfig))] -public class P11SThemisConfig : CooldownPlanningConfigNode -{ - public P11SThemisConfig() : base(90) { } -} +public class P11SThemisConfig() : CooldownPlanningConfigNode(90); [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 941, NameID = 12388)] -public class P11SThemis : BossModule -{ - public P11SThemis(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { } -} +public class P11SThemis(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)); diff --git a/BossMod/Modules/Endwalker/Savage/P11SThemis/Styx.cs b/BossMod/Modules/Endwalker/Savage/P11SThemis/Styx.cs index fa0986363f..a9ab672e18 100644 --- a/BossMod/Modules/Endwalker/Savage/P11SThemis/Styx.cs +++ b/BossMod/Modules/Endwalker/Savage/P11SThemis/Styx.cs @@ -1,18 +1,16 @@ namespace BossMod.Endwalker.Savage.P11SThemis; -class Styx : Components.UniformStackSpread +class Styx(BossModule module) : Components.UniformStackSpread(module, 6, 0, 8) { public int NumCasts { get; private set; } - public Styx() : base(6, 0, 8) { } - - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { - if ((AID)spell.Action.ID == AID.Styx && module.WorldState.Actors.Find(spell.TargetID) is var target && target != null) + if ((AID)spell.Action.ID == AID.Styx && WorldState.Actors.Find(spell.TargetID) is var target && target != null) AddStack(target, spell.NPCFinishAt); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.Styx or AID.StyxAOE) ++NumCasts; diff --git a/BossMod/Modules/Endwalker/Savage/P11SThemis/UpheldOverruling.cs b/BossMod/Modules/Endwalker/Savage/P11SThemis/UpheldOverruling.cs index 9a25100fa2..7cfaf17bf6 100644 --- a/BossMod/Modules/Endwalker/Savage/P11SThemis/UpheldOverruling.cs +++ b/BossMod/Modules/Endwalker/Savage/P11SThemis/UpheldOverruling.cs @@ -1,27 +1,25 @@ namespace BossMod.Endwalker.Savage.P11SThemis; -class UpheldOverruling : Components.UniformStackSpread +class UpheldOverruling(BossModule module) : Components.UniformStackSpread(module, 6, 13, 7, alwaysShowSpreads: true) { - public UpheldOverruling() : base(6, 13, 7, alwaysShowSpreads: true) { } - - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { case AID.UpheldOverrulingLight: case AID.UpheldRulingLight: - if (module.WorldState.Actors.Find(caster.Tether.Target) is var stackTarget && stackTarget != null) + if (WorldState.Actors.Find(caster.Tether.Target) is var stackTarget && stackTarget != null) AddStack(stackTarget, spell.NPCFinishAt.AddSeconds(0.3f)); break; case AID.UpheldOverrulingDark: case AID.UpheldRulingDark: - if (module.WorldState.Actors.Find(caster.Tether.Target) is var spreadTarget && spreadTarget != null) + if (WorldState.Actors.Find(caster.Tether.Target) is var spreadTarget && spreadTarget != null) AddSpread(spreadTarget, spell.NPCFinishAt.AddSeconds(0.3f)); break; } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { @@ -37,22 +35,7 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } -class LightburstBoss : Components.SelfTargetedAOEs -{ - public LightburstBoss() : base(ActionID.MakeSpell(AID.LightburstBoss), new AOEShapeCircle(13)) { } -} - -class LightburstClone : Components.SelfTargetedAOEs -{ - public LightburstClone() : base(ActionID.MakeSpell(AID.LightburstClone), new AOEShapeCircle(13)) { } -} - -class DarkPerimeterBoss : Components.SelfTargetedAOEs -{ - public DarkPerimeterBoss() : base(ActionID.MakeSpell(AID.DarkPerimeterBoss), new AOEShapeDonut(8, 50)) { } -} - -class DarkPerimeterClone : Components.SelfTargetedAOEs -{ - public DarkPerimeterClone() : base(ActionID.MakeSpell(AID.DarkPerimeterClone), new AOEShapeDonut(8, 50)) { } -} +class LightburstBoss(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.LightburstBoss), new AOEShapeCircle(13)); +class LightburstClone(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.LightburstClone), new AOEShapeCircle(13)); +class DarkPerimeterBoss(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.DarkPerimeterBoss), new AOEShapeDonut(8, 50)); +class DarkPerimeterClone(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.DarkPerimeterClone), new AOEShapeDonut(8, 50)); diff --git a/BossMod/Modules/Endwalker/Savage/P12S1Athena/Dialogos.cs b/BossMod/Modules/Endwalker/Savage/P12S1Athena/Dialogos.cs index ecb1628bca..2b73813acf 100644 --- a/BossMod/Modules/Endwalker/Savage/P12S1Athena/Dialogos.cs +++ b/BossMod/Modules/Endwalker/Savage/P12S1Athena/Dialogos.cs @@ -1,6 +1,6 @@ namespace BossMod.Endwalker.Savage.P12S1Athena; -class Dialogos : Components.UniformStackSpread +class Dialogos(BossModule module) : Components.UniformStackSpread(module, 6, 6, 7, alwaysShowSpreads: true) { public enum Type { None, TankOutPartyIn, TankInPartyOut } @@ -8,16 +8,14 @@ public enum Type { None, TankOutPartyIn, TankInPartyOut } private Type _type; private DateTime _tankActivation; // party activation is +1s - public Dialogos() : base(6, 6, 7, alwaysShowSpreads: true) { } - - public override void Update(BossModule module) + public override void Update() { Stacks.Clear(); Spreads.Clear(); if (_type != Type.None && NumCasts < 2) { - var closest = module.Raid.WithoutSlot().Closest(module.PrimaryActor.Position); - var farthest = module.Raid.WithoutSlot().Farthest(module.PrimaryActor.Position); + var closest = Raid.WithoutSlot().Closest(Module.PrimaryActor.Position); + var farthest = Raid.WithoutSlot().Farthest(Module.PrimaryActor.Position); if (closest != null && farthest != null) { if (NumCasts == 0) @@ -26,12 +24,12 @@ public override void Update(BossModule module) AddStack(_type == Type.TankOutPartyIn ? closest : farthest, _tankActivation.AddSeconds(1)); } } - base.Update(module); + base.Update(); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { - base.AddHints(module, slot, actor, hints, movementHints); + base.AddHints(slot, actor, hints); if (Spreads.Count > 0 && Spreads[0].Target.Role != Role.Tank) { if (Spreads[0].Target == actor) @@ -41,13 +39,13 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (_type != Type.None && NumCasts < 2) hints.Add(_type == Type.TankOutPartyIn ? "Tank out, party in" : "Tank in, party out"); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { var type = (AID)spell.Action.ID switch { @@ -62,7 +60,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.ApodialogosAOE or AID.PeridialogosAOE or AID.Dialogos) ++NumCasts; diff --git a/BossMod/Modules/Endwalker/Savage/P12S1Athena/EngravementOfSouls1.cs b/BossMod/Modules/Endwalker/Savage/P12S1Athena/EngravementOfSouls1.cs index 2f251b6bc8..b38c0e01e0 100644 --- a/BossMod/Modules/Endwalker/Savage/P12S1Athena/EngravementOfSouls1.cs +++ b/BossMod/Modules/Endwalker/Savage/P12S1Athena/EngravementOfSouls1.cs @@ -14,26 +14,22 @@ struct PlayerState private EngravementOfSoulsTethers? _tethers; private PlayerState[] _states = new PlayerState[PartyState.MaxPartySize]; - public EngravementOfSouls1Spread() : base(0, 3, alwaysShowSpreads: true, raidwideOnResolve: false, includeDeadTargets: true) + public EngravementOfSouls1Spread(BossModule module) : base(module, 0, 3, alwaysShowSpreads: true, raidwideOnResolve: false, includeDeadTargets: true) { _config = Service.Config.Get(); - } - - public override void Init(BossModule module) - { _tethers = module.FindComponent(); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - base.DrawArenaForeground(module, pcSlot, pc, arena); + base.DrawArenaForeground(pcSlot, pc); - var safespot = CalculateSafeSpot(module, pcSlot); + var safespot = CalculateSafeSpot(pcSlot); if (safespot != default) - arena.AddCircle(safespot, 1, ArenaColor.Safe); + Arena.AddCircle(safespot, 1, ArenaColor.Safe); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { var type = (SID)status.ID switch { @@ -41,20 +37,20 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st SID.AstralbrightSoul => DebuffType.Dark, _ => DebuffType.None }; - if (type != DebuffType.None && module.Raid.FindSlot(actor.InstanceID) is var slot && slot >= 0) + if (type != DebuffType.None && Raid.FindSlot(actor.InstanceID) is var slot && slot >= 0) { _states[slot].Debuff = type; - AddSpread(actor, module.WorldState.CurrentTime.AddSeconds(10.1f)); + AddSpread(actor, WorldState.FutureTime(10.1f)); } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.UmbralGlow or AID.AstralGlow) Spreads.Clear(); } - private WPos CalculateSafeSpot(BossModule module, int slot) + private WPos CalculateSafeSpot(int slot) { if (_states[slot].CachedSafespot == default && _states[slot].Debuff != DebuffType.None && _tethers != null && _tethers.CurrentBaits.Count == 4) { @@ -64,8 +60,8 @@ private WPos CalculateSafeSpot(BossModule module, int slot) WDir[] offsets = { new(+1, -1), new(+1, +1), new(-1, +1), new(-1, -1) }; // CW from N var relevantTether = _states[slot].Debuff == DebuffType.Light ? EngravementOfSoulsTethers.TetherType.Dark : EngravementOfSoulsTethers.TetherType.Light; var expectedPositions = _tethers.States.Where(s => s.Source != null).Select(s => (s.Source!.Position + 40 * s.Source.Rotation.ToDirection(), s.Tether == relevantTether)).ToList(); - var offsetsOrdered = (module.Raid[slot]?.Class.IsSupport() ?? false) ? offsets.AsEnumerable() : offsets.Reverse(); - var positionsOrdered = offsetsOrdered.Select(d => module.Bounds.Center + 7 * d); + var offsetsOrdered = (Raid[slot]?.Class.IsSupport() ?? false) ? offsets.AsEnumerable() : offsets.Reverse(); + var positionsOrdered = offsetsOrdered.Select(d => Module.Bounds.Center + 7 * d); var firstMatch = positionsOrdered.First(p => expectedPositions.MinBy(ep => (ep.Item1 - p).LengthSq()).Item2); _states[slot].CachedSafespot = firstMatch; break; diff --git a/BossMod/Modules/Endwalker/Savage/P12S1Athena/EngravementOfSouls2.cs b/BossMod/Modules/Endwalker/Savage/P12S1Athena/EngravementOfSouls2.cs index 2bf7b90039..10ce5223b6 100644 --- a/BossMod/Modules/Endwalker/Savage/P12S1Athena/EngravementOfSouls2.cs +++ b/BossMod/Modules/Endwalker/Savage/P12S1Athena/EngravementOfSouls2.cs @@ -1,7 +1,7 @@ namespace BossMod.Endwalker.Savage.P12S1Athena; // TODO: generalize (line stack/spread) -class EngravementOfSouls2Lines : BossComponent +class EngravementOfSouls2Lines(BossModule module) : BossComponent(module) { public int NumCasts { get; private set; } private Actor? _lightRay; @@ -11,70 +11,68 @@ class EngravementOfSouls2Lines : BossComponent private static readonly AOEShapeRect _shape = new(100, 3); - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { - if (InAOE(module, _lightRay, actor) != _darkCamp[slot]) + if (InAOE(_lightRay, actor) != _darkCamp[slot]) hints.Add(_darkCamp[slot] ? "Go to dark camp" : "GTFO from dark camp"); - if (InAOE(module, _darkRay, actor) != _lightCamp[slot]) + if (InAOE(_darkRay, actor) != _lightCamp[slot]) hints.Add(_lightCamp[slot] ? "Go to light camp" : "GTFO from light camp"); } - public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) + public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) { return player == _lightRay || player == _darkRay ? PlayerPriority.Interesting : PlayerPriority.Normal; } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - DrawOutline(module, _lightRay, _darkCamp[pcSlot]); - DrawOutline(module, _darkRay, _lightCamp[pcSlot]); + DrawOutline(_lightRay, _darkCamp[pcSlot]); + DrawOutline(_darkRay, _lightCamp[pcSlot]); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { switch ((SID)status.ID) { case SID.UmbralTilt: case SID.UmbralbrightSoul: - _lightCamp.Set(module.Raid.FindSlot(actor.InstanceID)); + _lightCamp.Set(Raid.FindSlot(actor.InstanceID)); break; case SID.AstralTilt: case SID.AstralbrightSoul: - _darkCamp.Set(module.Raid.FindSlot(actor.InstanceID)); + _darkCamp.Set(Raid.FindSlot(actor.InstanceID)); break; case SID.UmbralstrongSoul: _lightRay = actor; - _darkCamp.Set(module.Raid.FindSlot(actor.InstanceID)); + _darkCamp.Set(Raid.FindSlot(actor.InstanceID)); break; case SID.AstralstrongSoul: _darkRay = actor; - _lightCamp.Set(module.Raid.FindSlot(actor.InstanceID)); + _lightCamp.Set(Raid.FindSlot(actor.InstanceID)); break; } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.UmbralImpact or AID.AstralImpact) ++NumCasts; } - private bool InAOE(BossModule module, Actor? target, Actor actor) => target != null && _shape.Check(actor.Position, module.PrimaryActor.Position, Angle.FromDirection(target.Position - module.PrimaryActor.Position)); + private bool InAOE(Actor? target, Actor actor) => target != null && _shape.Check(actor.Position, Module.PrimaryActor.Position, Angle.FromDirection(target.Position - Module.PrimaryActor.Position)); - private void DrawOutline(BossModule module, Actor? target, bool safe) + private void DrawOutline(Actor? target, bool safe) { if (target != null) - _shape.Outline(module.Arena, module.PrimaryActor.Position, Angle.FromDirection(target.Position - module.PrimaryActor.Position), safe ? ArenaColor.Safe : ArenaColor.Danger); + _shape.Outline(Arena, Module.PrimaryActor.Position, Angle.FromDirection(target.Position - Module.PrimaryActor.Position), safe ? ArenaColor.Safe : ArenaColor.Danger); } } -class EngrameventOfSouls2Spread : Components.GenericStackSpread +class EngrameventOfSouls2Spread(BossModule module) : Components.GenericStackSpread(module, true, false) { public int NumCasts { get; private set; } - public EngrameventOfSouls2Spread() : base(true, false) { } - - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { var radius = (SID)status.ID switch { @@ -86,7 +84,7 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st Spreads.Add(new(actor, radius)); // TODO: activation } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { var radius = (AID)spell.Action.ID switch { diff --git a/BossMod/Modules/Endwalker/Savage/P12S1Athena/EngravementOfSouls3.cs b/BossMod/Modules/Endwalker/Savage/P12S1Athena/EngravementOfSouls3.cs index 58fd186b37..9cf4e8b077 100644 --- a/BossMod/Modules/Endwalker/Savage/P12S1Athena/EngravementOfSouls3.cs +++ b/BossMod/Modules/Endwalker/Savage/P12S1Athena/EngravementOfSouls3.cs @@ -1,31 +1,29 @@ namespace BossMod.Endwalker.Savage.P12S1Athena; -class EngravementOfSouls3Shock : Components.CastTowers +class EngravementOfSouls3Shock(BossModule module) : Components.CastTowers(module, ActionID.MakeSpell(AID.Shock), 3) { private BitMask _towers; private BitMask _plus; private BitMask _cross; - public EngravementOfSouls3Shock() : base(ActionID.MakeSpell(AID.Shock), 3) { } - - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { switch ((SID)status.ID) { case SID.UmbralbrightSoul: case SID.AstralbrightSoul: - _towers.Set(module.Raid.FindSlot(actor.InstanceID)); + _towers.Set(Raid.FindSlot(actor.InstanceID)); break; case SID.QuarteredSoul: - _plus.Set(module.Raid.FindSlot(actor.InstanceID)); + _plus.Set(Raid.FindSlot(actor.InstanceID)); break; case SID.XMarkedSoul: - _cross.Set(module.Raid.FindSlot(actor.InstanceID)); + _cross.Set(Raid.FindSlot(actor.InstanceID)); break; } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) { @@ -35,7 +33,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf > 110 => ~_cross, _ => ~_towers // TODO: assign specific towers based on priorities? }; - Towers.Add(new(spell.LocXZ, Radius, forbiddenSoakers: forbidden)); + Towers.Add(new(spell.LocXZ, Radius, ForbiddenSoakers: forbidden)); } } } @@ -45,22 +43,20 @@ class EngravementOfSouls3Spread : Components.UniformStackSpread private EngravementOfSoulsTethers? _tethers; private EngravementOfSoulsTethers.TetherType _soakers; - public EngravementOfSouls3Spread() : base(0, 3, alwaysShowSpreads: true, raidwideOnResolve: false) { } - - public override void Init(BossModule module) + public EngravementOfSouls3Spread(BossModule module) : base(module, 0, 3, alwaysShowSpreads: true, raidwideOnResolve: false) { _tethers = module.FindComponent(); } - public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) + public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) { if (IsSpreadTarget(pc)) return _tethers?.States[playerSlot].Tether == _soakers ? PlayerPriority.Danger : PlayerPriority.Irrelevant; else - return base.CalcPriority(module, pcSlot, pc, playerSlot, player, ref customColor); + return base.CalcPriority(pcSlot, pc, playerSlot, player, ref customColor); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { var soakers = (SID)status.ID switch { @@ -75,25 +71,18 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.UmbralGlow or AID.AstralGlow) Spreads.Clear(); } } -class TheosCross : Components.SelfTargetedAOEs -{ - public TheosCross() : base(ActionID.MakeSpell(AID.TheosCross), new AOEShapeCross(40, 3)) { } -} - -class TheosSaltire : Components.SelfTargetedAOEs -{ - public TheosSaltire() : base(ActionID.MakeSpell(AID.TheosSaltire), new AOEShapeCross(40, 3)) { } -} +class TheosCross(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TheosCross), new AOEShapeCross(40, 3)); +class TheosSaltire(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TheosSaltire), new AOEShapeCross(40, 3)); // TODO: this assumes standard strats, there could be variations i guess... -class EngravementOfSouls3Hints : BossComponent +class EngravementOfSouls3Hints(BossModule module) : BossComponent(module) { public enum PlayerState { None, Tower, Plus, Cross, TetherTL, TetherBL, TetherTR, TetherBR } public enum Mechanic { Start, FixedTowers, Tethers, CrossPlusBait, TowersBait, WhiteFlameBait, TowersResolve } @@ -104,83 +93,80 @@ public enum Mechanic { Start, FixedTowers, Tethers, CrossPlusBait, TowersBait, W private bool _leftTowerMatchTether; private PlayerState[] _playerStates = new PlayerState[PartyState.MaxPartySize]; - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddMovementHints(int slot, Actor actor, MovementHints movementHints) { - if (movementHints != null) + foreach (var chain in PositionHints(slot)) { - foreach (var chain in PositionHints(slot)) + var from = actor.Position; + var color = ArenaColor.Safe; + foreach (var offset in chain) { - var from = actor.Position; - var color = ArenaColor.Safe; - foreach (var offset in chain) - { - var to = module.Bounds.Center + offset; - movementHints.Add(from, to, color); - from = to; - color = ArenaColor.Danger; - } + var to = Module.Bounds.Center + offset; + movementHints.Add(from, to, color); + from = to; + color = ArenaColor.Danger; } } } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (var chain in PositionHints(pcSlot)) foreach (var offset in chain.Take(1)) - arena.AddCircle(module.Bounds.Center + offset, 1, ArenaColor.Safe); + Arena.AddCircle(Module.Bounds.Center + offset, 1, ArenaColor.Safe); } // note: these statuses are assigned before any tethers - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { switch ((SID)status.ID) { case SID.UmbralbrightSoul: _towersLight = true; - SetState(module, module.Raid.FindSlot(actor.InstanceID), PlayerState.Tower); + SetState(Raid.FindSlot(actor.InstanceID), PlayerState.Tower); break; case SID.AstralbrightSoul: _towersLight = false; - SetState(module, module.Raid.FindSlot(actor.InstanceID), PlayerState.Tower); + SetState(Raid.FindSlot(actor.InstanceID), PlayerState.Tower); break; case SID.QuarteredSoul: - SetState(module, module.Raid.FindSlot(actor.InstanceID), PlayerState.Plus); + SetState(Raid.FindSlot(actor.InstanceID), PlayerState.Plus); break; case SID.XMarkedSoul: - SetState(module, module.Raid.FindSlot(actor.InstanceID), PlayerState.Cross); + SetState(Raid.FindSlot(actor.InstanceID), PlayerState.Cross); break; } } - public override void OnTethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnTethered(Actor source, ActorTetherInfo tether) { switch ((TetherID)tether.ID) { case TetherID.LightNear: case TetherID.LightFar: - AssignTether(module, source, module.Raid.FindSlot(tether.Target), true); + AssignTether(source, Raid.FindSlot(tether.Target), true); break; case TetherID.DarkNear: case TetherID.DarkFar: - AssignTether(module, source, module.Raid.FindSlot(tether.Target), false); + AssignTether(source, Raid.FindSlot(tether.Target), false); break; case TetherID.UnnaturalEnchainment: if (source.Position.Z < 90) { - _topLeftSafe = source.Position.X > module.Bounds.Center.X; + _topLeftSafe = source.Position.X > Module.Bounds.Center.X; AdvanceMechanic(Mechanic.FixedTowers); } break; } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.TheosCross or AID.TheosSaltire) AdvanceMechanic(Mechanic.TowersBait); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { @@ -211,23 +197,23 @@ private void AdvanceMechanic(Mechanic next) _nextMechanic = next; } - private void SetState(BossModule module, int slot, PlayerState state) + private void SetState(int slot, PlayerState state) { if (slot < 0) { - module.ReportError(this, "Failed to assign state"); + ReportError("Failed to assign state"); return; } if (_playerStates[slot] != PlayerState.None) - module.ReportError(this, $"State reassignment: {_playerStates[slot]} -> {state}"); + ReportError($"State reassignment: {_playerStates[slot]} -> {state}"); _playerStates[slot] = state; } - private void AssignTether(BossModule module, Actor source, int slot, bool light) + private void AssignTether(Actor source, int slot, bool light) { - bool stayLeft = source.Position.X > module.Bounds.Center.X; - bool stayTop = source.Position.Z > module.Bounds.Center.Z; - SetState(module, slot, stayLeft ? (stayTop ? PlayerState.TetherTL : PlayerState.TetherBL) : (stayTop ? PlayerState.TetherTR : PlayerState.TetherBR)); + bool stayLeft = source.Position.X > Module.Bounds.Center.X; + bool stayTop = source.Position.Z > Module.Bounds.Center.Z; + SetState(slot, stayLeft ? (stayTop ? PlayerState.TetherTL : PlayerState.TetherBL) : (stayTop ? PlayerState.TetherTR : PlayerState.TetherBR)); bool lightStayLeft = stayLeft == light; _leftTowerMatchTether = lightStayLeft == _towersLight; diff --git a/BossMod/Modules/Endwalker/Savage/P12S1Athena/EngravementOfSoulsCommon.cs b/BossMod/Modules/Endwalker/Savage/P12S1Athena/EngravementOfSoulsCommon.cs index 420eadf11f..9fc5d84261 100644 --- a/BossMod/Modules/Endwalker/Savage/P12S1Athena/EngravementOfSoulsCommon.cs +++ b/BossMod/Modules/Endwalker/Savage/P12S1Athena/EngravementOfSoulsCommon.cs @@ -1,6 +1,6 @@ namespace BossMod.Endwalker.Savage.P12S1Athena; -class EngravementOfSoulsTethers : Components.GenericBaitAway +class EngravementOfSoulsTethers(BossModule module) : Components.GenericBaitAway(module) { public enum TetherType { None, Light, Dark } @@ -15,26 +15,26 @@ public struct PlayerState private static readonly AOEShapeRect _shape = new(60, 3); - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { - base.AddHints(module, slot, actor, hints, movementHints); + base.AddHints(slot, actor, hints); if (States[slot].TooClose) hints.Add("Stretch the tether!"); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - base.DrawArenaForeground(module, pcSlot, pc, arena); + base.DrawArenaForeground(pcSlot, pc); foreach (var b in CurrentBaits) - arena.Actor(b.Source, ArenaColor.Object, true); + Arena.Actor(b.Source, ArenaColor.Object, true); // TODO: consider drawing safespot based on configured strategy and mechanic order if (NumCasts == 0 && States[pcSlot] is var state && state.Source != null) - arena.AddLine(state.Source.Position, pc.Position, state.TooClose ? ArenaColor.Danger : ArenaColor.Safe); + Arena.AddLine(state.Source.Position, pc.Position, state.TooClose ? ArenaColor.Danger : ArenaColor.Safe); } - public override void OnTethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnTethered(Actor source, ActorTetherInfo tether) { var (type, tooClose) = (TetherID)tether.ID switch { @@ -44,20 +44,20 @@ public override void OnTethered(BossModule module, Actor source, ActorTetherInfo TetherID.DarkFar => (TetherType.Dark, false), _ => (TetherType.None, false) }; - if (type != TetherType.None && module.Raid.FindSlot(tether.Target) is var slot && slot >= 0) + if (type != TetherType.None && Raid.FindSlot(tether.Target) is var slot && slot >= 0) { if (States[slot].Source == null) { States[slot] = new() { Source = source, Tether = type, TooClose = tooClose }; - CurrentBaits.Add(new(source, module.Raid[slot]!, _shape)); + CurrentBaits.Add(new(source, Raid[slot]!, _shape)); } else if (States[slot].Source != source) { - module.ReportError(this, $"Multiple tethers on same player"); + ReportError($"Multiple tethers on same player"); } else if (States[slot].Tether != type) { - module.ReportError(this, $"Tether type changed"); + ReportError($"Tether type changed"); } else { @@ -66,7 +66,7 @@ public override void OnTethered(BossModule module, Actor source, ActorTetherInfo } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.SearingRadiance or AID.Shadowsear) { @@ -77,66 +77,66 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } // towers can not be soaked by same colored tilt -class EngravementOfSoulsTowers : Components.GenericTowers +class EngravementOfSoulsTowers(BossModule module) : Components.GenericTowers(module) { public bool CastsStarted { get; private set; } private BitMask _globallyForbidden; // these players can't close any of the towers due to vulns private BitMask _lightForbidden; // these players can't close light towers due to light debuff private BitMask _darkForbidden; // these players can't close light towers due to light debuff - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { switch ((SID)status.ID) { case SID.UmbralTilt: // light guy can't close light tower - _lightForbidden.Set(module.Raid.FindSlot(actor.InstanceID)); + _lightForbidden.Set(Raid.FindSlot(actor.InstanceID)); break; case SID.AstralTilt: // dark guy can't close dark tower - _darkForbidden.Set(module.Raid.FindSlot(actor.InstanceID)); + _darkForbidden.Set(Raid.FindSlot(actor.InstanceID)); break; case SID.UmbralbrightSoul: // dropping a tower causes vuln case SID.AstralbrightSoul: case SID.HeavensflameSoul: // dropping a spread causes vuln - _globallyForbidden.Set(module.Raid.FindSlot(actor.InstanceID)); + _globallyForbidden.Set(Raid.FindSlot(actor.InstanceID)); break; } } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { switch ((SID)status.ID) { case SID.UmbralTilt: // light guy can't close light tower - _lightForbidden.Clear(module.Raid.FindSlot(actor.InstanceID)); + _lightForbidden.Clear(Raid.FindSlot(actor.InstanceID)); break; case SID.AstralTilt: // dark guy can't close dark tower - _darkForbidden.Clear(module.Raid.FindSlot(actor.InstanceID)); + _darkForbidden.Clear(Raid.FindSlot(actor.InstanceID)); break; } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { case AID.UmbralAdvance: - AddTower(module, spell.LocXZ, true, true); + AddTower(spell.LocXZ, true, true); break; case AID.AstralAdvance: - AddTower(module, spell.LocXZ, false, true); + AddTower(spell.LocXZ, false, true); break; } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { case AID.UmbralGlow: - AddTower(module, caster.Position, true, false); + AddTower(caster.Position, true, false); break; case AID.AstralGlow: - AddTower(module, caster.Position, false, false); + AddTower(caster.Position, false, false); break; case AID.UmbralAdvance: case AID.AstralAdvance: @@ -146,7 +146,7 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } - private void AddTower(BossModule module, WPos pos, bool isLight, bool realCast) + private void AddTower(WPos pos, bool isLight, bool realCast) { if (realCast != CastsStarted) { @@ -157,11 +157,11 @@ private void AddTower(BossModule module, WPos pos, bool isLight, bool realCast) } else { - module.ReportError(this, "Unexpected predicted tower when real casts are in progress"); + ReportError("Unexpected predicted tower when real casts are in progress"); return; } } - Towers.Add(new(pos, 3, forbiddenSoakers: _globallyForbidden | (isLight ? _lightForbidden : _darkForbidden))); + Towers.Add(new(pos, 3, ForbiddenSoakers: _globallyForbidden | (isLight ? _lightForbidden : _darkForbidden))); } } diff --git a/BossMod/Modules/Endwalker/Savage/P12S1Athena/Glaukopis.cs b/BossMod/Modules/Endwalker/Savage/P12S1Athena/Glaukopis.cs index 3172cd2488..b1aec835c1 100644 --- a/BossMod/Modules/Endwalker/Savage/P12S1Athena/Glaukopis.cs +++ b/BossMod/Modules/Endwalker/Savage/P12S1Athena/Glaukopis.cs @@ -2,33 +2,33 @@ // TODO: not sure how exactly second target is selected, I think it is snapshotted to the current target when first cast happens? I can definitely taunt between casts without dying... // TODO: consider generalizing... -class Glaukopis : Components.GenericBaitAway +class Glaukopis(BossModule module) : Components.GenericBaitAway(module) { private static readonly AOEShapeRect _shape = new(60, 2.5f); - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (CurrentBaits.Any(b => b.Source.TargetID == b.Target.InstanceID) && actor.Role == Role.Tank) - hints.Add(module.PrimaryActor.TargetID != actor.InstanceID ? "Taunt!" : "Pass aggro!"); - base.AddHints(module, slot, actor, hints, movementHints); + hints.Add(Module.PrimaryActor.TargetID != actor.InstanceID ? "Taunt!" : "Pass aggro!"); + base.AddHints(slot, actor, hints); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.Glaukopis) { - var target = module.WorldState.Actors.Find(spell.TargetID); + var target = WorldState.Actors.Find(spell.TargetID); if (target != null) CurrentBaits.Add(new(caster, target, _shape)); } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.Glaukopis or AID.GlaukopisSecond) { CurrentBaits.Clear(); - if (++NumCasts < 2 && module.WorldState.Actors.Find(caster.TargetID) is var target && target != null) + if (++NumCasts < 2 && WorldState.Actors.Find(caster.TargetID) is var target && target != null) CurrentBaits.Add(new(caster, target, _shape)); } } diff --git a/BossMod/Modules/Endwalker/Savage/P12S1Athena/P12S1Athena.cs b/BossMod/Modules/Endwalker/Savage/P12S1Athena/P12S1Athena.cs index 766c65dbc5..afea5ce295 100644 --- a/BossMod/Modules/Endwalker/Savage/P12S1Athena/P12S1Athena.cs +++ b/BossMod/Modules/Endwalker/Savage/P12S1Athena/P12S1Athena.cs @@ -1,22 +1,8 @@ namespace BossMod.Endwalker.Savage.P12S1Athena; -class RayOfLight : Components.SelfTargetedAOEs -{ - public RayOfLight() : base(ActionID.MakeSpell(AID.RayOfLight), new AOEShapeRect(60, 5)) { } -} - -class UltimaBlade : Components.CastCounter -{ - public UltimaBlade() : base(ActionID.MakeSpell(AID.UltimaBladeAOE)) { } -} - -class Parthenos : Components.SelfTargetedAOEs -{ - public Parthenos() : base(ActionID.MakeSpell(AID.Parthenos), new AOEShapeRect(60, 8, 60)) { } -} +class RayOfLight(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RayOfLight), new AOEShapeRect(60, 5)); +class UltimaBlade(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.UltimaBladeAOE)); +class Parthenos(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Parthenos), new AOEShapeRect(60, 8, 60)); [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 943, NameID = 12377, SortOrder = 1)] -public class P12S1Athena : BossModule -{ - public P12S1Athena(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsSquare(new(100, 100), 20)) { } -} +public class P12S1Athena(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsSquare(new(100, 100), 20)); diff --git a/BossMod/Modules/Endwalker/Savage/P12S1Athena/P12S1AthenaConfig.cs b/BossMod/Modules/Endwalker/Savage/P12S1Athena/P12S1AthenaConfig.cs index a4b2f51119..d145d3a1c0 100644 --- a/BossMod/Modules/Endwalker/Savage/P12S1Athena/P12S1AthenaConfig.cs +++ b/BossMod/Modules/Endwalker/Savage/P12S1Athena/P12S1AthenaConfig.cs @@ -1,7 +1,7 @@ namespace BossMod.Endwalker.Savage.P12S1Athena; [ConfigDisplay(Order = 0x1C1, Parent = typeof(EndwalkerConfig))] -public class P12S1AthenaConfig : CooldownPlanningConfigNode +public class P12S1AthenaConfig() : CooldownPlanningConfigNode(90) { public enum EngravementOfSouls1Strategy { @@ -13,6 +13,4 @@ public enum EngravementOfSouls1Strategy [PropertyDisplay("Engravement of Souls 1: resolution hints")] public EngravementOfSouls1Strategy Engravement1Hints = EngravementOfSouls1Strategy.Default; - - public P12S1AthenaConfig() : base(90) { } } diff --git a/BossMod/Modules/Endwalker/Savage/P12S1Athena/Palladion.cs b/BossMod/Modules/Endwalker/Savage/P12S1Athena/Palladion.cs index 8d6d2aaa67..c6052b4875 100644 --- a/BossMod/Modules/Endwalker/Savage/P12S1Athena/Palladion.cs +++ b/BossMod/Modules/Endwalker/Savage/P12S1Athena/Palladion.cs @@ -1,7 +1,7 @@ namespace BossMod.Endwalker.Savage.P12S1Athena; // general mechanic tracking -class Palladion : BossComponent +class Palladion(BossModule module) : BossComponent(module) { public Actor?[] JumpTargets = new Actor?[PartyState.MaxPartySize]; public Actor?[] Partners = new Actor?[PartyState.MaxPartySize]; @@ -10,14 +10,14 @@ class Palladion : BossComponent public int NumBaitsDone; private Dictionary _baitedLight = new(); // key = instance id, value = true if bait, false if center aoe - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { var order = Array.IndexOf(JumpTargets, actor); if (order >= 0) hints.Add($"Order: {order + 1}", false); } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { var (target, partner) = (IconID)iconID switch { @@ -38,7 +38,7 @@ public override void OnEventIcon(BossModule module, Actor actor, uint iconID) } } - public override void OnActorPlayActionTimelineEvent(BossModule module, Actor actor, ushort id) + public override void OnActorPlayActionTimelineEvent(Actor actor, ushort id) { if ((OID)actor.OID == OID.Anthropos) { @@ -58,7 +58,7 @@ public override void OnActorPlayActionTimelineEvent(BossModule module, Actor act } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.ClearCut or AID.WhiteFlame) ++NumBaitsDone; @@ -67,13 +67,13 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent // limited arena for limit cuts // TODO: reconsider - base activation on env controls, show danger zone instead of border?.. -class PalladionArena : BossComponent +class PalladionArena(BossModule module) : BossComponent(module) { - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { for (int i = 0; i < 8; ++i) - arena.PathLineTo(module.Bounds.Center + 14 * (i * 45).Degrees().ToDirection()); - arena.PathStroke(true, ArenaColor.Border, 2); + Arena.PathLineTo(Module.Bounds.Center + 14 * (i * 45).Degrees().ToDirection()); + Arena.PathStroke(true, ArenaColor.Border, 2); } } @@ -84,39 +84,39 @@ class PalladionShockwave : Components.GenericAOEs private WPos _origin; private DateTime _activation; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public PalladionShockwave(BossModule module) : base(module) { - if (_palladion != null && NumCasts < _palladion.JumpTargets.Length && _palladion.JumpTargets[NumCasts] is var target && target != null && actor != target && actor != _palladion.Partners[NumCasts]) - yield return new(BuildShape(target.Position), _origin, default, _activation); + _palladion = module.FindComponent(); + _origin = Module.PrimaryActor.Position; // note: assumed to be activated when cast starts, so boss is in initial jump position; PATE 1E43 happens 1s earlier, but icons only appear right before cast start + _activation = Module.PrimaryActor.CastInfo?.NPCFinishAt.AddSeconds(0.3f) ?? default; } - public override void Init(BossModule module) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { - _palladion = module.FindComponent(); - _origin = module.PrimaryActor.Position; // note: assumed to be activated when cast starts, so boss is in initial jump position; PATE 1E43 happens 1s earlier, but icons only appear right before cast start - _activation = module.PrimaryActor.CastInfo?.NPCFinishAt.AddSeconds(0.3f) ?? default; + if (_palladion != null && NumCasts < _palladion.JumpTargets.Length && _palladion.JumpTargets[NumCasts] is var target && target != null && actor != target && actor != _palladion.Partners[NumCasts]) + yield return new(BuildShape(target.Position), _origin, default, _activation); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { - base.AddHints(module, slot, actor, hints, movementHints); + base.AddHints(slot, actor, hints); if (_palladion != null && NumCasts < _palladion.JumpTargets.Length && _palladion.JumpTargets[NumCasts] is var target && (target == actor || target == _palladion.Partners[NumCasts]) && actor.Position.InCircle(_origin, 23)) hints.Add("Too close!"); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (_palladion != null && NumCasts < _palladion.JumpTargets.Length && _palladion.JumpTargets[NumCasts] is var target && target != null && (pc == target || pc == _palladion.Partners[NumCasts])) - BuildShape(target.Position).Outline(arena, _origin, default, ArenaColor.Safe); + BuildShape(target.Position).Outline(Arena, _origin, default, ArenaColor.Safe); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { // note: shockwave cast happens at exactly the same time, but it targets a player rather than location, making it slightly harder to work with if ((AID)spell.Action.ID == AID.PalladionAOE) { _origin = spell.TargetXZ; - _activation = module.WorldState.CurrentTime.AddSeconds(3); + _activation = WorldState.FutureTime(3); ++NumCasts; } } @@ -134,40 +134,32 @@ class PalladionStack : Components.UniformStackSpread private int _numCasts; private Palladion? _palladion; - public PalladionStack() : base(6, 0, raidwideOnResolve: false) { } - - public override void Init(BossModule module) + public PalladionStack(BossModule module) : base(module, 6, 0, raidwideOnResolve: false) { _palladion = module.FindComponent(); - UpdateStack(module, module.PrimaryActor.CastInfo?.NPCFinishAt.AddSeconds(0.3f) ?? default); + UpdateStack(Module.PrimaryActor.CastInfo?.NPCFinishAt.AddSeconds(0.3f) ?? default); } - public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) - { - return IsStackTarget(player) ? PlayerPriority.Interesting : PlayerPriority.Normal; - } + public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) => IsStackTarget(player) ? PlayerPriority.Interesting : PlayerPriority.Normal; - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.PalladionAOE) { ++_numCasts; - UpdateStack(module, module.WorldState.CurrentTime.AddSeconds(3)); + UpdateStack(WorldState.FutureTime(3)); } } - private void UpdateStack(BossModule module, DateTime activation) + private void UpdateStack(DateTime activation) { Stacks.Clear(); if (_palladion != null && _numCasts < _palladion.JumpTargets.Length && _palladion.JumpTargets[_numCasts] is var target && target != null) - AddStack(target, activation, module.Raid.WithSlot(true).Exclude(_palladion.Partners[_numCasts]).Mask()); + AddStack(target, activation, Raid.WithSlot(true).Exclude(_palladion.Partners[_numCasts]).Mask()); } } -class PalladionVoidzone : Components.PersistentVoidzoneAtCastTarget -{ - public PalladionVoidzone() : base(6, ActionID.MakeSpell(AID.PalladionAOE), m => m.Enemies(OID.PalladionVoidzone).Where(z => z.EventState != 7), 0.9f) { } -} +class PalladionVoidzone(BossModule module) : Components.PersistentVoidzoneAtCastTarget(module, 6, ActionID.MakeSpell(AID.PalladionAOE), m => m.Enemies(OID.PalladionVoidzone).Where(z => z.EventState != 7), 0.9f); class PalladionClearCut : Components.GenericAOEs { @@ -175,15 +167,15 @@ class PalladionClearCut : Components.GenericAOEs private static readonly AOEShapeCircle _shape = new(4); // note: it's really a 270? degree cone, but we don't really know rotation early enough, and we just shouldn't stay in center anyway - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public PalladionClearCut(BossModule module) : base(module) { - if (_palladion != null && _palladion.NumBaitsDone < _palladion.NumBaitsAssigned && !_palladion.BaitOrder[_palladion.NumBaitsDone]) - yield return new(_shape, module.Bounds.Center); + _palladion = module.FindComponent(); } - public override void Init(BossModule module) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { - _palladion = module.FindComponent(); + if (_palladion != null && _palladion.NumBaitsDone < _palladion.NumBaitsAssigned && !_palladion.BaitOrder[_palladion.NumBaitsDone]) + yield return new(_shape, Module.Bounds.Center); } } @@ -195,44 +187,44 @@ class PalladionWhiteFlame : Components.GenericBaitAway private static readonly AOEShapeRect _shape = new(100, 2); - public override void Init(BossModule module) + public PalladionWhiteFlame(BossModule module) : base(module) { _palladion = module.FindComponent(); - UpdateBaiters(module); + UpdateBaiters(); } - public override void Update(BossModule module) + public override void Update() { CurrentBaits.Clear(); if (_palladion != null && _palladion.NumBaitsDone < _palladion.NumBaitsAssigned && _palladion.BaitOrder[_palladion.NumBaitsDone]) - foreach (var t in module.Raid.WithoutSlot().SortedByRange(module.Bounds.Center).Take(2)) + foreach (var t in Raid.WithoutSlot().SortedByRange(Module.Bounds.Center).Take(2)) CurrentBaits.Add(new(_fakeSource, t, _shape)); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (NumCasts < 4 && !ForbiddenPlayers[slot]) hints.Add("Bait next aoe", CurrentBaits.Count > 0 && !ActiveBaitsOn(actor).Any()); - base.AddHints(module, slot, actor, hints, movementHints); + base.AddHints(slot, actor, hints); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (CurrentBaits.Count > 0) - arena.Actor(module.Bounds.Center, default, ArenaColor.Object); - base.DrawArenaForeground(module, pcSlot, pc, arena); + Arena.Actor(Module.Bounds.Center, default, ArenaColor.Object); + base.DrawArenaForeground(pcSlot, pc); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.WhiteFlame) { ++NumCasts; - UpdateBaiters(module); + UpdateBaiters(); } } - private void UpdateBaiters(BossModule module) + private void UpdateBaiters() { // TODO: we assume very strict bait order (5/7, 6/8, 1/3, 2/4), this is not strictly required... ForbiddenPlayers.Reset(); @@ -245,19 +237,17 @@ private void UpdateBaiters(BossModule module) 2 => (0, 2), _ => (1, 3) }; - ForbiddenPlayers = module.Raid.WithSlot(true).Exclude(_palladion.JumpTargets[b1]).Exclude(_palladion.JumpTargets[b2]).Mask(); + ForbiddenPlayers = Raid.WithSlot(true).Exclude(_palladion.JumpTargets[b1]).Exclude(_palladion.JumpTargets[b2]).Mask(); } } } -class PalladionDestroyPlatforms : Components.GenericAOEs +class PalladionDestroyPlatforms(BossModule module) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.PalladionDestroyPlatforms), "Go to safe platform!") { private static readonly AOEShapeRect _shape = new(10, 20, 10); - public PalladionDestroyPlatforms() : base(ActionID.MakeSpell(AID.PalladionDestroyPlatforms), "Go to safe platform!") { } - - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { - yield return new(_shape, module.Bounds.Center); + yield return new(_shape, Module.Bounds.Center); } } diff --git a/BossMod/Modules/Endwalker/Savage/P12S1Athena/SuperchainTheory.cs b/BossMod/Modules/Endwalker/Savage/P12S1Athena/SuperchainTheory.cs index 3df0529799..27908890b3 100644 --- a/BossMod/Modules/Endwalker/Savage/P12S1Athena/SuperchainTheory.cs +++ b/BossMod/Modules/Endwalker/Savage/P12S1Athena/SuperchainTheory.cs @@ -1,7 +1,7 @@ namespace BossMod.Endwalker.Savage.P12S1Athena; // note: no idea how pair targets are selected, assume same role as POV -abstract class SuperchainTheory : BossComponent +abstract class SuperchainTheory(BossModule module) : BossComponent(module) { public enum Shape { Unknown, Circle, Donut, Spread, Pairs } @@ -38,7 +38,7 @@ public IEnumerable ImminentChains() public abstract float ActivationDelay(float distance); - public override void Update(BossModule module) + public override void Update() { for (int i = 0; i < _pendingTethers.Count; ++i) { @@ -57,16 +57,16 @@ public override void Update(BossModule module) // irrelevant, remove _pendingTethers.RemoveAt(i--); } - else if (module.WorldState.Actors.Find(source.Tether.Target) is var origin && origin != null) + else if (WorldState.Actors.Find(source.Tether.Target) is var origin && origin != null) { - Chains.Add(new(origin, source, shape, module.WorldState.CurrentTime.AddSeconds(ActivationDelay((source.Position - origin.Position).Length())))); + Chains.Add(new(origin, source, shape, WorldState.FutureTime(ActivationDelay((source.Position - origin.Position).Length())))); Chains.SortBy(c => c.Activation); _pendingTethers.RemoveAt(i--); } } } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { foreach (var c in ImminentChains()) { @@ -81,12 +81,12 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint hints.Add("GTFO from aoe!"); break; case Shape.Spread: - hints.Add("Spread!", module.Raid.WithoutSlot().Exclude(actor).InShape(_shapeSpread, c.Origin.Position, Angle.FromDirection(actor.Position - c.Origin.Position)).Any()); + hints.Add("Spread!", Raid.WithoutSlot().Exclude(actor).InShape(_shapeSpread, c.Origin.Position, Angle.FromDirection(actor.Position - c.Origin.Position)).Any()); break; case Shape.Pairs: bool actorIsSupport = actor.Class.IsSupport(); int sameRole = 0, diffRole = 0; - foreach (var p in module.Raid.WithoutSlot().Exclude(actor).InShape(_shapePair, c.Origin.Position, Angle.FromDirection(actor.Position - c.Origin.Position))) + foreach (var p in Raid.WithoutSlot().Exclude(actor).InShape(_shapePair, c.Origin.Position, Angle.FromDirection(actor.Position - c.Origin.Position))) if (p.Class.IsSupport() == actorIsSupport) ++sameRole; else @@ -97,58 +97,55 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } } - public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) - { - return PlayerPriority.Normal; - } + public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) => PlayerPriority.Normal; - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { foreach (var c in ImminentChains()) { switch (c.Shape) { case Shape.Circle: - _shapeCircle.Draw(arena, c.Origin); + _shapeCircle.Draw(Arena, c.Origin); break; case Shape.Donut: - _shapeDonut.Draw(arena, c.Origin); + _shapeDonut.Draw(Arena, c.Origin); break; case Shape.Spread: - foreach (var p in module.Raid.WithoutSlot().Exclude(pc)) - _shapeSpread.Draw(arena, c.Origin.Position, Angle.FromDirection(p.Position - c.Origin.Position)); + foreach (var p in Raid.WithoutSlot().Exclude(pc)) + _shapeSpread.Draw(Arena, c.Origin.Position, Angle.FromDirection(p.Position - c.Origin.Position)); break; case Shape.Pairs: bool pcIsSupport = pc.Class.IsSupport(); - foreach (var p in module.Raid.WithoutSlot().Where(p => p != pc && p.Class.IsSupport() == pcIsSupport)) - _shapePair.Draw(arena, c.Origin.Position, Angle.FromDirection(p.Position - c.Origin.Position)); + foreach (var p in Raid.WithoutSlot().Where(p => p != pc && p.Class.IsSupport() == pcIsSupport)) + _shapePair.Draw(Arena, c.Origin.Position, Angle.FromDirection(p.Position - c.Origin.Position)); break; } } } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (var c in ImminentChains()) { switch (c.Shape) { case Shape.Spread: - _shapeSpread.Outline(arena, c.Origin.Position, Angle.FromDirection(pc.Position - c.Origin.Position)); + _shapeSpread.Outline(Arena, c.Origin.Position, Angle.FromDirection(pc.Position - c.Origin.Position)); break; case Shape.Pairs: - _shapePair.Outline(arena, c.Origin.Position, Angle.FromDirection(pc.Position - c.Origin.Position), ArenaColor.Safe); + _shapePair.Outline(Arena, c.Origin.Position, Angle.FromDirection(pc.Position - c.Origin.Position), ArenaColor.Safe); break; } } } - public override void OnTethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnTethered(Actor source, ActorTetherInfo tether) { _pendingTethers.Add(source); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { var shape = (AID)spell.Action.ID switch { @@ -166,7 +163,7 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } -class SuperchainTheory1 : SuperchainTheory +class SuperchainTheory1(BossModule module) : SuperchainTheory(module) { public override float ActivationDelay(float distance) { @@ -180,7 +177,7 @@ public override float ActivationDelay(float distance) } } -class SuperchainTheory2A : SuperchainTheory +class SuperchainTheory2A(BossModule module) : SuperchainTheory(module) { public override float ActivationDelay(float distance) { @@ -194,7 +191,7 @@ public override float ActivationDelay(float distance) } } -class SuperchainTheory2B : SuperchainTheory +class SuperchainTheory2B(BossModule module) : SuperchainTheory(module) { public override float ActivationDelay(float distance) { diff --git a/BossMod/Modules/Endwalker/Savage/P12S1Athena/TrinityOfSouls.cs b/BossMod/Modules/Endwalker/Savage/P12S1Athena/TrinityOfSouls.cs index 5640b613a0..89d80c29b2 100644 --- a/BossMod/Modules/Endwalker/Savage/P12S1Athena/TrinityOfSouls.cs +++ b/BossMod/Modules/Endwalker/Savage/P12S1Athena/TrinityOfSouls.cs @@ -1,6 +1,6 @@ namespace BossMod.Endwalker.Savage.P12S1Athena; -class TrinityOfSouls : Components.GenericAOEs +class TrinityOfSouls(BossModule module) : Components.GenericAOEs(module) { private bool _invertMiddle; private uint _moves; // bit 0 - move after first, bit1 - move after second @@ -8,9 +8,9 @@ class TrinityOfSouls : Components.GenericAOEs private static readonly AOEShapeCone _shape = new(60, 90.Degrees()); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => _aoes.Take(1); + public override IEnumerable ActiveAOEs(int slot, Actor actor) => _aoes.Take(1); - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (_aoes.Count == 3 || NumCasts > 0) { @@ -25,7 +25,7 @@ public override void AddGlobalHints(BossModule module, GlobalHints hints) } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { var (angle, invert) = (AID)spell.Action.ID switch { @@ -42,7 +42,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.TrinityOfSoulsDirectTR or AID.TrinityOfSoulsDirectTL or AID.TrinityOfSoulsDirectMR or AID.TrinityOfSoulsDirectML or AID.TrinityOfSoulsDirectBR or AID.TrinityOfSoulsDirectBL or AID.TrinityOfSoulsInvertBR or AID.TrinityOfSoulsInvertBL or AID.TrinityOfSoulsInvertMR or AID.TrinityOfSoulsInvertML or AID.TrinityOfSoulsInvertTR or AID.TrinityOfSoulsInvertTL) @@ -53,68 +53,68 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { switch ((IconID)iconID) { case IconID.WingTLFirst: - VerifyFirstAOE(module, 90.Degrees(), false); + VerifyFirstAOE(90.Degrees(), false); break; case IconID.WingTRFirst: - VerifyFirstAOE(module, -90.Degrees(), false); + VerifyFirstAOE(-90.Degrees(), false); break; case IconID.WingML: - AddSubsequentAOE(module, 90.Degrees(), false); + AddSubsequentAOE(90.Degrees(), false); break; case IconID.WingMR: - AddSubsequentAOE(module, -90.Degrees(), false); + AddSubsequentAOE(-90.Degrees(), false); break; case IconID.WingBLFirst: - VerifyFirstAOE(module, 90.Degrees(), true); + VerifyFirstAOE(90.Degrees(), true); break; case IconID.WingBRFirst: - VerifyFirstAOE(module, -90.Degrees(), true); + VerifyFirstAOE(-90.Degrees(), true); break; case IconID.WingTLLast: - AddSubsequentAOE(module, 90.Degrees(), true); + AddSubsequentAOE(90.Degrees(), true); break; case IconID.WingTRLast: - AddSubsequentAOE(module, -90.Degrees(), true); + AddSubsequentAOE(-90.Degrees(), true); break; case IconID.WingBLLast: - AddSubsequentAOE(module, 90.Degrees(), true); + AddSubsequentAOE(90.Degrees(), true); break; case IconID.WingBRLast: - AddSubsequentAOE(module, -90.Degrees(), true); + AddSubsequentAOE(-90.Degrees(), true); break; } } - private void VerifyFirstAOE(BossModule module, Angle offset, bool inverted) + private void VerifyFirstAOE(Angle offset, bool inverted) { if (_aoes.Count == 0) { - module.ReportError(this, "No AOEs active"); + ReportError("No AOEs active"); return; } - if (!module.PrimaryActor.Position.AlmostEqual(_aoes[0].Origin, 1)) - module.ReportError(this, $"Unexpected boss position: expected {_aoes[0].Origin}, have {module.PrimaryActor.Position}"); - if (!_aoes[0].Rotation.AlmostEqual(module.PrimaryActor.Rotation + offset, 0.05f)) - module.ReportError(this, $"Unexpected first aoe angle: expected {module.PrimaryActor.Rotation}+{offset}, have {_aoes[0].Rotation}"); + if (!Module.PrimaryActor.Position.AlmostEqual(_aoes[0].Origin, 1)) + ReportError($"Unexpected boss position: expected {_aoes[0].Origin}, have {Module.PrimaryActor.Position}"); + if (!_aoes[0].Rotation.AlmostEqual(Module.PrimaryActor.Rotation + offset, 0.05f)) + ReportError($"Unexpected first aoe angle: expected {Module.PrimaryActor.Rotation}+{offset}, have {_aoes[0].Rotation}"); if (_invertMiddle != inverted) - module.ReportError(this, $"Unexpected invert: expected {inverted}, have {_invertMiddle}"); + ReportError($"Unexpected invert: expected {inverted}, have {_invertMiddle}"); } - private void AddSubsequentAOE(BossModule module, Angle offset, bool last) + private void AddSubsequentAOE(Angle offset, bool last) { var expectedCount = last ? 2 : 1; if (_aoes.Count != expectedCount) - module.ReportError(this, $"Unexpected AOE count: expected {expectedCount}, got {_aoes.Count}"); - if (_aoes.Count > 0 && !module.PrimaryActor.Position.AlmostEqual(_aoes[0].Origin, 1)) - module.ReportError(this, $"Unexpected boss position: expected {_aoes[0].Origin}, have {module.PrimaryActor.Position}"); + ReportError($"Unexpected AOE count: expected {expectedCount}, got {_aoes.Count}"); + if (_aoes.Count > 0 && !Module.PrimaryActor.Position.AlmostEqual(_aoes[0].Origin, 1)) + ReportError($"Unexpected boss position: expected {_aoes[0].Origin}, have {Module.PrimaryActor.Position}"); - var rotation = (!last && _invertMiddle) ? module.PrimaryActor.Rotation - offset : module.PrimaryActor.Rotation + offset; - _aoes.Add(new(_shape, module.PrimaryActor.Position, rotation, _aoes.LastOrDefault().Activation.AddSeconds(2.6f))); + var rotation = (!last && _invertMiddle) ? Module.PrimaryActor.Rotation - offset : Module.PrimaryActor.Rotation + offset; + _aoes.Add(new(_shape, Module.PrimaryActor.Position, rotation, _aoes.LastOrDefault().Activation.AddSeconds(2.6f))); if (_aoes.Count > 1 && !_aoes[_aoes.Count - 1].Rotation.AlmostEqual(_aoes[_aoes.Count - 2].Rotation, 0.05f)) _moves |= last ? 2u : 1u; } diff --git a/BossMod/Modules/Endwalker/Savage/P12S1Athena/UnnaturalEnchainment.cs b/BossMod/Modules/Endwalker/Savage/P12S1Athena/UnnaturalEnchainment.cs index 56deb856ed..315e4b3e88 100644 --- a/BossMod/Modules/Endwalker/Savage/P12S1Athena/UnnaturalEnchainment.cs +++ b/BossMod/Modules/Endwalker/Savage/P12S1Athena/UnnaturalEnchainment.cs @@ -1,19 +1,17 @@ namespace BossMod.Endwalker.Savage.P12S1Athena; // TODO: consider using envcontrols instead -class UnnaturalEnchainment : Components.GenericAOEs +class UnnaturalEnchainment(BossModule module) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.Sample)) { private List _aoes = new(); private static readonly AOEShapeRect _shape = new(5, 10, 5); - public UnnaturalEnchainment() : base(ActionID.MakeSpell(AID.Sample)) { } + public override IEnumerable ActiveAOEs(int slot, Actor actor) => _aoes; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => _aoes; - - public override void OnTethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnTethered(Actor source, ActorTetherInfo tether) { if (tether.ID == (uint)TetherID.UnnaturalEnchainment) - _aoes.Add(new(_shape, source.Position, default, module.WorldState.CurrentTime.AddSeconds(8.2f))); + _aoes.Add(new(_shape, source.Position, default, WorldState.FutureTime(8.2f))); } } diff --git a/BossMod/Modules/Endwalker/Savage/P12S1Athena/WhiteFlame.cs b/BossMod/Modules/Endwalker/Savage/P12S1Athena/WhiteFlame.cs index 0129464ba2..45ef0411fc 100644 --- a/BossMod/Modules/Endwalker/Savage/P12S1Athena/WhiteFlame.cs +++ b/BossMod/Modules/Endwalker/Savage/P12S1Athena/WhiteFlame.cs @@ -2,7 +2,7 @@ // TODO: for first instance, common strategy has tanks baiting everything and invulning - accomodate that // TODO: for second instance, set forbidden baiters -class WhiteFlame : Components.GenericBaitAway +class WhiteFlame(BossModule module) : Components.GenericBaitAway(module) { private bool _enabled; private List _sources = new(); @@ -11,33 +11,33 @@ class WhiteFlame : Components.GenericBaitAway public void Enable() => _enabled = true; - public override void Update(BossModule module) + public override void Update() { CurrentBaits.Clear(); if (_enabled) foreach (var s in _sources.Take(2)) - foreach (var t in module.Raid.WithoutSlot().SortedByRange(s.Position).Take(2)) + foreach (var t in Raid.WithoutSlot().SortedByRange(s.Position).Take(2)) CurrentBaits.Add(new(s, t, _shape)); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - base.DrawArenaForeground(module, pcSlot, pc, arena); - arena.Actors(_sources, ArenaColor.Object, true); + base.DrawArenaForeground(pcSlot, pc); + Arena.Actors(_sources, ArenaColor.Object, true); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.WhiteFlameAOE) { foreach (var t in spell.Targets) - ForbiddenPlayers.Set(module.Raid.FindSlot(t.ID)); + ForbiddenPlayers.Set(Raid.FindSlot(t.ID)); _sources.RemoveAll(p => p.Position.AlmostEqual(caster.Position, 1)); ++NumCasts; } } - public override void OnActorPlayActionTimelineEvent(BossModule module, Actor actor, ushort id) + public override void OnActorPlayActionTimelineEvent(Actor actor, ushort id) { // note: technically we could determine location ~1.1s earlier by looking at TeleportAdd cast location // however, BaitAway component requires source actor, and teleporting actors don't move to target immediately diff --git a/BossMod/Modules/Endwalker/Savage/P12S2PallasAthena/CaloricTheory.cs b/BossMod/Modules/Endwalker/Savage/P12S2PallasAthena/CaloricTheory.cs index 45019039e2..78d565af3b 100644 --- a/BossMod/Modules/Endwalker/Savage/P12S2PallasAthena/CaloricTheory.cs +++ b/BossMod/Modules/Endwalker/Savage/P12S2PallasAthena/CaloricTheory.cs @@ -2,23 +2,21 @@ // note: this assumes rinon strat - initial markers stack center, everyone else spreads // TODO: reconsider visualization (player prios etc - spread part is not real...) -class CaloricTheory1Part1 : Components.UniformStackSpread +class CaloricTheory1Part1(BossModule module) : Components.UniformStackSpread(module, 7, 7, 1) { private BitMask _initialMarkers; // these shouldn't spread - public CaloricTheory1Part1() : base(7, 7, 1) { } - - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { - if ((AID)spell.Action.ID == AID.CaloricTheory1InitialFire && module.WorldState.Actors.Find(spell.TargetID) is var target && target != null) + if ((AID)spell.Action.ID == AID.CaloricTheory1InitialFire && WorldState.Actors.Find(spell.TargetID) is var target && target != null) { AddStack(target, spell.NPCFinishAt); - foreach (var (_, p) in module.Raid.WithSlot(true).ExcludedFromMask(_initialMarkers)) + foreach (var (_, p) in Raid.WithSlot(true).ExcludedFromMask(_initialMarkers)) AddSpread(p, spell.NPCFinishAt); } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.CaloricTheory1InitialFire) { @@ -27,18 +25,16 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn } } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.CaloricTheory1InitialFire) - _initialMarkers.Set(module.Raid.FindSlot(actor.InstanceID)); + _initialMarkers.Set(Raid.FindSlot(actor.InstanceID)); } } -class CaloricTheory1Part2 : Components.UniformStackSpread +class CaloricTheory1Part2(BossModule module) : Components.UniformStackSpread(module, 7, 0, 2) { - public CaloricTheory1Part2() : base(7, 0, 2) { } - - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (IsStackTarget(actor)) { @@ -48,30 +44,28 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint else { // TODO: movement hints for air players (tricky for inner...) - base.AddHints(module, slot, actor, hints, movementHints); + base.AddHints(slot, actor, hints); } } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Pyrefaction) AddStack(actor, status.ExpireAt); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.PyrePulseAOE) Stacks.Clear(); } } -class CaloricTheory1Part3 : Components.UniformStackSpread +class CaloricTheory1Part3(BossModule module) : Components.UniformStackSpread(module, 7, 7, 2) { private BitMask _spreads; - public CaloricTheory1Part3() : base(7, 7, 2) { } - - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (IsSpreadTarget(actor)) { @@ -81,11 +75,11 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint else { hints.Add(IsStackTarget(actor) ? "Stack with non-debuffed!" : "Stack with fire!", false); - base.AddHints(module, slot, actor, hints, movementHints); + base.AddHints(slot, actor, hints); } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { @@ -98,42 +92,40 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { switch ((SID)status.ID) { case SID.Pyrefaction: - if (status.ExpireAt > module.WorldState.CurrentTime.AddSeconds(1)) // don't pick up debuffs from previous part + if (status.ExpireAt > WorldState.FutureTime(1)) // don't pick up debuffs from previous part AddStack(actor, status.ExpireAt, _spreads); break; case SID.Atmosfaction: AddSpread(actor, status.ExpireAt); - _spreads.Set(module.Raid.FindSlot(actor.InstanceID)); + _spreads.Set(Raid.FindSlot(actor.InstanceID)); break; } } } -class CaloricTheory2Part1 : Components.UniformStackSpread +class CaloricTheory2Part1(BossModule module) : Components.UniformStackSpread(module, 7, 7, 1, 1) { - public CaloricTheory2Part1() : base(7, 7, 1, 1) { } - - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { case AID.CaloricTheory2InitialFire: - if (module.WorldState.Actors.Find(spell.TargetID) is var fireTarget && fireTarget != null) + if (WorldState.Actors.Find(spell.TargetID) is var fireTarget && fireTarget != null) AddStack(fireTarget, spell.NPCFinishAt); // fake stack break; case AID.CaloricTheory2InitialWind: - if (module.WorldState.Actors.Find(spell.TargetID) is var windTarget && windTarget != null) + if (WorldState.Actors.Find(spell.TargetID) is var windTarget && windTarget != null) AddSpread(windTarget, spell.NPCFinishAt); break; } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.CaloricTheory2InitialFire or AID.CaloricTheory2InitialWind) { @@ -143,13 +135,11 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn } } -class CaloricTheory2Part2 : Components.UniformStackSpread +class CaloricTheory2Part2(BossModule module) : Components.UniformStackSpread(module, 7, 7, alwaysShowSpreads: true) { public bool Done { get; private set; } - public CaloricTheory2Part2() : base(7, 7, alwaysShowSpreads: true) { } - - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Entropifaction) { @@ -160,7 +150,7 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st } } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Entropifaction) { @@ -169,14 +159,11 @@ public override void OnStatusLose(BossModule module, Actor actor, ActorStatus st } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.DynamicAtmosphere) Done = true; } } -class EntropicExcess : Components.LocationTargetedAOEs -{ - public EntropicExcess() : base(ActionID.MakeSpell(AID.EntropicExcess), 7) { } -} +class EntropicExcess(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.EntropicExcess), 7); diff --git a/BossMod/Modules/Endwalker/Savage/P12S2PallasAthena/ClassicalConcepts.cs b/BossMod/Modules/Endwalker/Savage/P12S2PallasAthena/ClassicalConcepts.cs index 8ae697d7c1..7080bd4c1f 100644 --- a/BossMod/Modules/Endwalker/Savage/P12S2PallasAthena/ClassicalConcepts.cs +++ b/BossMod/Modules/Endwalker/Savage/P12S2PallasAthena/ClassicalConcepts.cs @@ -15,28 +15,24 @@ struct PlayerState public int NumPlayerTethers { get; private set; } public int NumShapeTethers { get; private set; } - private IReadOnlyList _hexa = ActorEnumeration.EmptyList; - private IReadOnlyList _tri = ActorEnumeration.EmptyList; - private IReadOnlyList _sq = ActorEnumeration.EmptyList; + private IReadOnlyList _hexa; + private IReadOnlyList _tri; + private IReadOnlyList _sq; private (WPos hexa, WPos tri, WPos sq)[] _resolvedShapes = new(WPos, WPos, WPos)[4]; private PlayerState[] _states = Utils.MakeArray(PartyState.MaxPartySize, new PlayerState() { Column = -1, PartnerSlot = -1 }); private bool _invert; private bool _showShapes = true; private bool _showTethers = true; - public ClassicalConcepts(bool invert) - { - _invert = invert; - } - - public override void Init(BossModule module) + public ClassicalConcepts(BossModule module, bool invert) : base(module) { _hexa = module.Enemies(OID.ConceptOfWater); _tri = module.Enemies(OID.ConceptOfFire); _sq = module.Enemies(OID.ConceptOfEarth); + _invert = invert; } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (PlayerShapes(slot) is var shapes && shapes.hexa != default && shapes.linked != default) { @@ -49,29 +45,29 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } } - public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) + public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) { return _states[pcSlot].PartnerSlot == playerSlot ? PlayerPriority.Danger : PlayerPriority.Irrelevant; } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (PlayerShapes(pcSlot) is var shapes && shapes.hexa != default && shapes.linked != default) { - arena.Actor(shapes.hexa, default, ArenaColor.Object); - arena.Actor(shapes.linked, default, ArenaColor.Object); + Arena.Actor(shapes.hexa, default, ArenaColor.Object); + Arena.Actor(shapes.linked, default, ArenaColor.Object); var safespot = shapes.hexa + (shapes.linked - shapes.hexa) / 3; - arena.AddCircle(safespot, 1, ArenaColor.Safe); + Arena.AddCircle(safespot, 1, ArenaColor.Safe); if (_invert) - arena.AddCircle(InvertedPos(safespot), 1, ArenaColor.Danger); + Arena.AddCircle(InvertedPos(safespot), 1, ArenaColor.Danger); } - if (_showTethers && module.Raid[_states[pcSlot].PartnerSlot] is var partner && partner != null) + if (_showTethers && Raid[_states[pcSlot].PartnerSlot] is var partner && partner != null) { - arena.AddLine(pc.Position, partner.Position, ArenaColor.Safe); + Arena.AddLine(pc.Position, partner.Position, ArenaColor.Safe); } } - public override void OnActorCreated(BossModule module, Actor actor) + public override void OnActorCreated(Actor actor) { if ((OID)actor.OID is OID.ConceptOfFire or OID.ConceptOfWater or OID.ConceptOfEarth && _hexa.Count + _tri.Count + _sq.Count == 12) { @@ -80,7 +76,7 @@ public override void OnActorCreated(BossModule module, Actor actor) var hexa = _hexa.FirstOrDefault(h => Utils.AlmostEqual(h.PosRot.X, 88 + col * 8, 1)); if (hexa == null) { - module.ReportError(this, $"Failed to find hexagon at column {col}"); + ReportError($"Failed to find hexagon at column {col}"); continue; } @@ -88,12 +84,12 @@ public override void OnActorCreated(BossModule module, Actor actor) var sq = LinkedShape(_sq, hexa); _resolvedShapes[col] = (hexa.Position, tri?.Position ?? default, sq?.Position ?? default); if (tri == null || sq == null) - module.ReportError(this, $"Failed to find neighbour for column {col}"); + ReportError($"Failed to find neighbour for column {col}"); } } } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { var debuff = (SID)status.ID switch { @@ -101,11 +97,11 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st SID.BetaTarget => Debuff.Beta, _ => Debuff.None }; - if (debuff != Debuff.None && module.Raid.FindSlot(actor.InstanceID) is var slot && slot >= 0) + if (debuff != Debuff.None && Raid.FindSlot(actor.InstanceID) is var slot && slot >= 0) _states[slot].Debuff = debuff; } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { var column = (IconID)iconID switch { @@ -115,7 +111,7 @@ public override void OnEventIcon(BossModule module, Actor actor, uint iconID) IconID.ClassicalConceptsTriangle => 3, // G _ => -1 }; - if (column >= 0 && module.Raid.FindSlot(actor.InstanceID) is var slot && slot >= 0) + if (column >= 0 && Raid.FindSlot(actor.InstanceID) is var slot && slot >= 0) { var partner = Array.FindIndex(_states, s => s.Column == column); _states[slot].Column = column; @@ -127,7 +123,7 @@ public override void OnEventIcon(BossModule module, Actor actor, uint iconID) } } - public override void OnTethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnTethered(Actor source, ActorTetherInfo tether) { switch ((TetherID)tether.ID) { @@ -142,7 +138,7 @@ public override void OnTethered(BossModule module, Actor source, ActorTetherInfo } } - public override void OnUntethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnUntethered(Actor source, ActorTetherInfo tether) { switch ((TetherID)tether.ID) { @@ -180,52 +176,38 @@ private static bool ShapesAreNeighbours(Actor l, Actor r) } } -class ClassicalConcepts1 : ClassicalConcepts -{ - public ClassicalConcepts1() : base(false) { } -} - -class ClassicalConcepts2 : ClassicalConcepts -{ - public ClassicalConcepts2() : base(true) { } -} +class ClassicalConcepts1(BossModule module) : ClassicalConcepts(module, false); +class ClassicalConcepts2(BossModule module) : ClassicalConcepts(module, true); -class Implode : Components.SelfTargetedAOEs -{ - public Implode() : base(ActionID.MakeSpell(AID.Implode), new AOEShapeCircle(4)) { } -} +class Implode(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Implode), new AOEShapeCircle(4)); -class PalladianRayBait : Components.GenericBaitAway +class PalladianRayBait(BossModule module) : Components.GenericBaitAway(module, ActionID.MakeSpell(AID.PalladianRayAOEFirst)) { private Actor[] _dummies = { new(0, 0, -1, "L dummy", 0, ActorType.None, Class.None, 0, new(92, 0, 92, 0)), new(0, 0, -1, "R dummy", 0, ActorType.None, Class.None, 0, new(108, 0, 92, 0)) }; private static readonly AOEShapeCone _shape = new(100, 15.Degrees()); - public PalladianRayBait() : base(ActionID.MakeSpell(AID.PalladianRayAOEFirst)) { } - - public override void Update(BossModule module) + public override void Update() { CurrentBaits.Clear(); foreach (var d in _dummies) - foreach (var p in module.Raid.WithoutSlot().SortedByRange(d.Position).Take(4)) + foreach (var p in Raid.WithoutSlot().SortedByRange(d.Position).Take(4)) CurrentBaits.Add(new(d, p, _shape)); } } -class PalladianRayAOE : Components.GenericAOEs +class PalladianRayAOE(BossModule module) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.PalladianRayAOERest)) { private List _aoes = new(); public int NumConcurrentAOEs => _aoes.Count; private static readonly AOEShapeCone _shape = new(100, 15.Degrees()); - public PalladianRayAOE() : base(ActionID.MakeSpell(AID.PalladianRayAOERest)) { } - - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => _aoes; + public override IEnumerable ActiveAOEs(int slot, Actor actor) => _aoes; - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { - base.OnEventCast(module, caster, spell); + base.OnEventCast(caster, spell); if ((AID)spell.Action.ID == AID.PalladianRayAOEFirst) _aoes.Add(new(_shape, caster.Position, caster.Rotation)); } diff --git a/BossMod/Modules/Endwalker/Savage/P12S2PallasAthena/CrushHelm.cs b/BossMod/Modules/Endwalker/Savage/P12S2PallasAthena/CrushHelm.cs index 49e0e85a61..fc6e5a61d9 100644 --- a/BossMod/Modules/Endwalker/Savage/P12S2PallasAthena/CrushHelm.cs +++ b/BossMod/Modules/Endwalker/Savage/P12S2PallasAthena/CrushHelm.cs @@ -1,20 +1,20 @@ namespace BossMod.Endwalker.Savage.P12S2PallasAthena; -class CrushHelm : BossComponent +class CrushHelm(BossModule module) : BossComponent(module) { public int NumSmallHits { get; private set; } public int NumLargeHits { get; private set; } private DateTime _lastSmallHit; - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { case AID.CrushHelmAOEFirst: - if (module.WorldState.CurrentTime > _lastSmallHit.AddSeconds(0.2f)) + if (WorldState.CurrentTime > _lastSmallHit.AddSeconds(0.2f)) { ++NumSmallHits; - _lastSmallHit = module.WorldState.CurrentTime; + _lastSmallHit = WorldState.CurrentTime; } break; case AID.CrushHelmAOERest: diff --git a/BossMod/Modules/Endwalker/Savage/P12S2PallasAthena/Ekpyrosis.cs b/BossMod/Modules/Endwalker/Savage/P12S2PallasAthena/Ekpyrosis.cs index c0fcbcc2d4..62c49300f2 100644 --- a/BossMod/Modules/Endwalker/Savage/P12S2PallasAthena/Ekpyrosis.cs +++ b/BossMod/Modules/Endwalker/Savage/P12S2PallasAthena/Ekpyrosis.cs @@ -1,20 +1,11 @@ namespace BossMod.Endwalker.Savage.P12S2PallasAthena; -class EkpyrosisProximityV : Components.LocationTargetedAOEs -{ - public EkpyrosisProximityV() : base(ActionID.MakeSpell(AID.EkpyrosisProximityV), 19) { } // TODO: verify falloff -} +class EkpyrosisProximityV(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.EkpyrosisProximityV), 19); // TODO: verify falloff +class EkpyrosisProximityH(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.EkpyrosisProximityH), new AOEShapeCircle(19)); // TODO: verify falloff -class EkpyrosisProximityH : Components.SelfTargetedAOEs +class EkpyrosisExaflare(BossModule module) : Components.Exaflare(module, 6) { - public EkpyrosisProximityH() : base(ActionID.MakeSpell(AID.EkpyrosisProximityH), new AOEShapeCircle(19)) { } // TODO: verify falloff -} - -class EkpyrosisExaflare : Components.Exaflare -{ - public EkpyrosisExaflare() : base(6) { } - - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.EkpyrosisExaflareFirst) { @@ -22,7 +13,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.EkpyrosisExaflareFirst or AID.EkpyrosisExaflareRest) { @@ -30,11 +21,11 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent int index = Lines.FindIndex(item => item.Next.AlmostEqual(caster.Position, 1)); if (index == -1) { - module.ReportError(this, $"Failed to find entry for {caster.InstanceID:X}"); + ReportError($"Failed to find entry for {caster.InstanceID:X}"); return; } - AdvanceLine(module, Lines[index], caster.Position); + AdvanceLine(Lines[index], caster.Position); if (Lines[index].ExplosionsLeft == 0) Lines.RemoveAt(index); } @@ -43,15 +34,13 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent class EkpyrosisSpread : Components.UniformStackSpread { - public EkpyrosisSpread() : base(0, 6) { } - - public override void Init(BossModule module) + public EkpyrosisSpread(BossModule module) : base(module, 0, 6) { - foreach (var p in module.Raid.WithoutSlot(true)) + foreach (var p in Raid.WithoutSlot(true)) AddSpread(p, module.StateMachine.NextTransitionWithFlag(StateMachine.StateHint.Raidwide)); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.EkpyrosisSpread) Spreads.Clear(); diff --git a/BossMod/Modules/Endwalker/Savage/P12S2PallasAthena/Gaiaochos.cs b/BossMod/Modules/Endwalker/Savage/P12S2PallasAthena/Gaiaochos.cs index 45ae2ed7d7..26b4493bef 100644 --- a/BossMod/Modules/Endwalker/Savage/P12S2PallasAthena/Gaiaochos.cs +++ b/BossMod/Modules/Endwalker/Savage/P12S2PallasAthena/Gaiaochos.cs @@ -1,27 +1,15 @@ namespace BossMod.Endwalker.Savage.P12S2PallasAthena; -class Gaiaochos : Components.SelfTargetedAOEs -{ - public Gaiaochos() : base(ActionID.MakeSpell(AID.GaiaochosTransition), new AOEShapeDonut(7, 30)) { } -} +class Gaiaochos(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.GaiaochosTransition), new AOEShapeDonut(7, 30)); // TODO: we could show it earlier, casters do PATE 11D2 ~4s before starting cast -class UltimaRay : Components.SelfTargetedAOEs -{ - public UltimaRay() : base(ActionID.MakeSpell(AID.UltimaRay), new AOEShapeRect(20, 3)) { } -} +class UltimaRay(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.UltimaRay), new AOEShapeRect(20, 3)); -class MissingLink : Components.Chains -{ - public MissingLink() : base((uint)TetherID.MissingLink, ActionID.MakeSpell(AID.MissingLink)) { } -} +class MissingLink(BossModule module) : Components.Chains(module, (uint)TetherID.MissingLink, ActionID.MakeSpell(AID.MissingLink)); -class DemiParhelion : Components.SelfTargetedAOEs -{ - public DemiParhelion() : base(ActionID.MakeSpell(AID.DemiParhelionAOE), new AOEShapeCircle(2)) { } -} +class DemiParhelion(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.DemiParhelionAOE), new AOEShapeCircle(2)); -class Geocentrism : Components.GenericAOEs +class Geocentrism(BossModule module) : Components.GenericAOEs(module) { public int NumConcurrentAOEs { get; private set; } private List _aoes = new(); @@ -30,9 +18,9 @@ class Geocentrism : Components.GenericAOEs private static readonly AOEShapeCircle _shapeCircle = new(2); private static readonly AOEShapeDonut _shapeDonut = new(3, 7); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => _aoes; + public override IEnumerable ActiveAOEs(int slot, Actor actor) => _aoes; - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { @@ -56,35 +44,33 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.DemiParhelionGeoLine or AID.DemiParhelionGeoDonut or AID.DemiParhelionGeoCircle) ++NumCasts; } } -class DivineExcoriation : Components.UniformStackSpread +class DivineExcoriation(BossModule module) : Components.UniformStackSpread(module, 0, 1) { - public DivineExcoriation() : base(0, 1) { } - - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.DivineExcoriation) - AddSpread(actor, module.WorldState.CurrentTime.AddSeconds(3.1f)); + AddSpread(actor, WorldState.FutureTime(3.1f)); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.DivineExcoriation) Spreads.Clear(); } } -class GaiaochosEnd : BossComponent +class GaiaochosEnd(BossModule module) : BossComponent(module) { public bool Finished { get; private set; } - public override void OnEventEnvControl(BossModule module, byte index, uint state) + public override void OnEventEnvControl(byte index, uint state) { // note: there are 3 env controls happening at the same time, not sure which is the actual trigger: .9=02000001, .11=00800001, .12=00080004 if (index == 9 && state == 0x02000001) @@ -93,21 +79,19 @@ public override void OnEventEnvControl(BossModule module, byte index, uint state } // TODO: assign pairs, draw wrong pairs as aoes -class UltimaBlow : Components.CastCounter +class UltimaBlow(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.UltimaBlow)) { private List<(Actor source, Actor target)> _tethers = new(); private BitMask _vulnerable; private static readonly AOEShapeRect _shape = new(20, 3); - public UltimaBlow() : base(ActionID.MakeSpell(AID.UltimaBlow)) { } - - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_vulnerable[slot]) { var source = _tethers.Find(t => t.target == actor).source; - var numHit = source != null ? module.Raid.WithoutSlot().Exclude(actor).InShape(_shape, source.Position, Angle.FromDirection(actor.Position - source.Position)).Count() : 0; + var numHit = source != null ? Raid.WithoutSlot().Exclude(actor).InShape(_shape, source.Position, Angle.FromDirection(actor.Position - source.Position)).Count() : 0; if (numHit == 0) hints.Add("Hide behind partner!"); else if (numHit > 1) @@ -123,35 +107,35 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } } - public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) + public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) { return _tethers.Any(t => t.target == player) ? PlayerPriority.Danger : PlayerPriority.Irrelevant; } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { if (_vulnerable[pcSlot]) // TODO: reconsider foreach (var t in _tethers.Where(t => t.target != pc)) - _shape.Draw(arena, t.source.Position, Angle.FromDirection(t.target.Position - t.source.Position)); + _shape.Draw(Arena, t.source.Position, Angle.FromDirection(t.target.Position - t.source.Position)); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (var t in _tethers) { - arena.Actor(t.source, ArenaColor.Object, true); - arena.AddLine(t.source.Position, t.target.Position, ArenaColor.Danger); + Arena.Actor(t.source, ArenaColor.Object, true); + Arena.AddLine(t.source.Position, t.target.Position, ArenaColor.Danger); if (t.target == pc || !_vulnerable[pcSlot]) - _shape.Outline(arena, t.source.Position, Angle.FromDirection(t.target.Position - t.source.Position), t.target == pc ? ArenaColor.Safe : ArenaColor.Danger); // TODO: reconsider... + _shape.Outline(Arena, t.source.Position, Angle.FromDirection(t.target.Position - t.source.Position), t.target == pc ? ArenaColor.Safe : ArenaColor.Danger); // TODO: reconsider... } } - public override void OnTethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnTethered(Actor source, ActorTetherInfo tether) { - if (tether.ID == (uint)TetherID.ClassicalConceptsShapes && module.WorldState.Actors.Find(tether.Target) is var target && target != null) + if (tether.ID == (uint)TetherID.ClassicalConceptsShapes && WorldState.Actors.Find(tether.Target) is var target && target != null) { _tethers.Add((source, target)); - _vulnerable.Set(module.Raid.FindSlot(tether.Target)); + _vulnerable.Set(Raid.FindSlot(tether.Target)); } } } diff --git a/BossMod/Modules/Endwalker/Savage/P12S2PallasAthena/P12S2PallasAthena.cs b/BossMod/Modules/Endwalker/Savage/P12S2PallasAthena/P12S2PallasAthena.cs index b764391c74..33989ad034 100644 --- a/BossMod/Modules/Endwalker/Savage/P12S2PallasAthena/P12S2PallasAthena.cs +++ b/BossMod/Modules/Endwalker/Savage/P12S2PallasAthena/P12S2PallasAthena.cs @@ -1,10 +1,8 @@ namespace BossMod.Endwalker.Savage.P12S2PallasAthena; [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 943, NameID = 12382, SortOrder = 2)] -public class P12S2PallasAthena : BossModule +public class P12S2PallasAthena(WorldState ws, Actor primary) : BossModule(ws, primary, DefaultBounds) { public static ArenaBoundsRect DefaultBounds = new ArenaBoundsRect(new(100, 95), 20, 15); public static ArenaBoundsCircle SmallBounds = new ArenaBoundsCircle(new(100, 90), 7); - - public P12S2PallasAthena(WorldState ws, Actor primary) : base(ws, primary, DefaultBounds) { } } diff --git a/BossMod/Modules/Endwalker/Savage/P12S2PallasAthena/P12S2PallasAthenaConfig.cs b/BossMod/Modules/Endwalker/Savage/P12S2PallasAthena/P12S2PallasAthenaConfig.cs index 8e1f02cfaa..48516fe623 100644 --- a/BossMod/Modules/Endwalker/Savage/P12S2PallasAthena/P12S2PallasAthenaConfig.cs +++ b/BossMod/Modules/Endwalker/Savage/P12S2PallasAthena/P12S2PallasAthenaConfig.cs @@ -1,11 +1,9 @@ namespace BossMod.Endwalker.Savage.P12S2PallasAthena; [ConfigDisplay(Order = 0x1C2, Parent = typeof(EndwalkerConfig))] -public class P12S2PallasAthenaConfig : CooldownPlanningConfigNode +public class P12S2PallasAthenaConfig() : CooldownPlanningConfigNode(90) { [PropertyDisplay("Pangenesis: tower assignment strategy")] [PropertyCombo("2+0: first towers are soaked by short color and 0 unstable; they both then go north for second towers", "2+1: first towers are soaked by short color and 1 unstable; they both then go to different second towers")] public bool PangenesisFirstStack = true; - - public P12S2PallasAthenaConfig() : base(90) { } } diff --git a/BossMod/Modules/Endwalker/Savage/P12S2PallasAthena/PalladianGrasp.cs b/BossMod/Modules/Endwalker/Savage/P12S2PallasAthena/PalladianGrasp.cs index 5f35cfa7f9..e316f79422 100644 --- a/BossMod/Modules/Endwalker/Savage/P12S2PallasAthena/PalladianGrasp.cs +++ b/BossMod/Modules/Endwalker/Savage/P12S2PallasAthena/PalladianGrasp.cs @@ -2,58 +2,53 @@ // TODO: allow invulning instead // TODO: not sure at what point target is snapshotted - assume first hit is on primary target when cast starts, second on current main target?.. -class PalladianGrasp : Components.CastCounter +class PalladianGrasp (BossModule module): Components.CastCounter(module, default) { private ulong _firstPrimaryTarget; private static readonly AOEShapeRect _shape = new(P12S2PallasAthena.DefaultBounds.HalfHeight, P12S2PallasAthena.DefaultBounds.HalfWidth / 2, P12S2PallasAthena.DefaultBounds.HalfHeight); - public PalladianGrasp() : base(default) { } - - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { - if (module.PrimaryActor.TargetID == _firstPrimaryTarget && actor.Role == Role.Tank) + if (Module.PrimaryActor.TargetID == _firstPrimaryTarget && actor.Role == Role.Tank) hints.Add(actor.InstanceID != _firstPrimaryTarget ? "Taunt!" : "Pass aggro!"); - var target = Target(module); + var target = Target(); if (target != null) { if (actor.InstanceID == target.InstanceID) { - if (module.Raid.WithoutSlot().Exclude(actor).InShape(_shape, Origin(module, target), default).Any()) + if (Raid.WithoutSlot().Exclude(actor).InShape(_shape, Origin(target), default).Any()) hints.Add("Bait away from raid!"); } else { - if (_shape.Check(actor.Position, Origin(module, target), default)) + if (_shape.Check(actor.Position, Origin(target), default)) hints.Add("GTFO from cleaved side!"); } } } - public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) - { - return Target(module)?.InstanceID == player.InstanceID ? PlayerPriority.Danger : PlayerPriority.Irrelevant; - } + public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) => Target()?.InstanceID == player.InstanceID ? PlayerPriority.Danger : PlayerPriority.Irrelevant; - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { - if (Target(module) is var target && target != default) - _shape.Draw(arena, Origin(module, target), default, pc.InstanceID == target.InstanceID ? ArenaColor.SafeFromAOE : ArenaColor.AOE); + if (Target() is var target && target != default) + _shape.Draw(Arena, Origin(target), default, pc.InstanceID == target.InstanceID ? ArenaColor.SafeFromAOE : ArenaColor.AOE); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.PalladianGrasp1) _firstPrimaryTarget = caster.TargetID; } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.PalladianGraspL or AID.PalladianGraspR) ++NumCasts; } - private Actor? Target(BossModule module) => module.WorldState.Actors.Find(NumCasts == 0 ? _firstPrimaryTarget : module.PrimaryActor.TargetID); - private WPos Origin(BossModule module, Actor target) => module.Bounds.Center + new WDir(target.Position.X < module.Bounds.Center.X ? -_shape.HalfWidth : +_shape.HalfWidth, 0); + private Actor? Target() => WorldState.Actors.Find(NumCasts == 0 ? _firstPrimaryTarget : Module.PrimaryActor.TargetID); + private WPos Origin(Actor target) => Module.Bounds.Center + new WDir(target.Position.X < Module.Bounds.Center.X ? -_shape.HalfWidth : +_shape.HalfWidth, 0); } diff --git a/BossMod/Modules/Endwalker/Savage/P12S2PallasAthena/Pangenesis.cs b/BossMod/Modules/Endwalker/Savage/P12S2PallasAthena/Pangenesis.cs index 0297776499..283f9a9d49 100644 --- a/BossMod/Modules/Endwalker/Savage/P12S2PallasAthena/Pangenesis.cs +++ b/BossMod/Modules/Endwalker/Savage/P12S2PallasAthena/Pangenesis.cs @@ -3,7 +3,7 @@ // note: this assumes standard strategy, not sure whether alternatives are possible... // TODO: assign sides... // TODO: show biochemical factor tethers - not sure how exactly they work... -class Pangenesis : Components.GenericTowers +class Pangenesis(BossModule module) : Components.GenericTowers(module) { public enum Color { None, Light, Dark } @@ -20,39 +20,44 @@ public struct PlayerState private List _towerColors = new(); // parallel to Towers private Color _firstLeftTower; - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { switch ((SID)status.ID) { case SID.UnstableFactor: - if (module.Raid.FindSlot(actor.InstanceID) is var slotUnstable && slotUnstable >= 0) + if (Raid.FindSlot(actor.InstanceID) is var slotUnstable && slotUnstable >= 0) { _states[slotUnstable].UnstableCount = status.Extra; } break; case SID.UmbralTilt: case SID.AstralTilt: - if (module.Raid.FindSlot(actor.InstanceID) is var slotColor && slotColor >= 0) + if (Raid.FindSlot(actor.InstanceID) is var slotColor && slotColor >= 0) { _states[slotColor].Color = (SID)status.ID == SID.UmbralTilt ? Color.Light : Color.Dark; _states[slotColor].ColorExpire = status.ExpireAt; // update forbidden towers - bool isLeft = actor.Position.X < module.Bounds.Center.X; + bool isLeft = actor.Position.X < Module.Bounds.Center.X; for (int i = 0; i < Towers.Count; ++i) - if ((Towers[i].Position.X < module.Bounds.Center.X) == isLeft) // don't care about towers on other side, keep forbidden - Towers.AsSpan()[i].ForbiddenSoakers[slotColor] = _states[slotColor].Color == _towerColors[i]; + { + ref var tower = ref Towers.Ref(i); + if ((tower.Position.X < Module.Bounds.Center.X) == isLeft) // don't care about towers on other side, keep forbidden + { + tower.ForbiddenSoakers[slotColor] = _states[slotColor].Color == _towerColors[i]; + } + } } break; } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.UmbralAdvent or AID.AstralAdvent) { bool isLight = (AID)spell.Action.ID == AID.UmbralAdvent; - bool isLeft = caster.Position.X < module.Bounds.Center.X; + bool isLeft = caster.Position.X < Module.Bounds.Center.X; bool isPrimary = caster.Position.Z > 90; // first tower at 91, second/third same color is 94, opposite is 88 var towerColor = isLight ? Color.Light : Color.Dark; @@ -91,7 +96,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.UmbralAdvent or AID.AstralAdvent) { @@ -105,11 +110,11 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent // note: tower will assign new color in ~0.4s; clear previous colors immediately, since new towers will start before debuffs are gone foreach (var t in spell.Targets) { - var slot = module.Raid.FindSlot(t.ID); + var slot = Raid.FindSlot(t.ID); if (slot >= 0) { _states[slot].Color = Color.None; - _states[slot].AssignedSide = caster.Position.X < module.Bounds.Center.X ? -1 : 1; // ensure correct side is assigned + _states[slot].AssignedSide = caster.Position.X < Module.Bounds.Center.X ? -1 : 1; // ensure correct side is assigned _states[slot].SoakedPrimary = caster.Position.Z > 90; } } @@ -117,40 +122,38 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } -class FactorIn : Components.GenericBaitAway +class FactorIn(BossModule module) : Components.GenericBaitAway(module, ActionID.MakeSpell(AID.FactorIn), centerAtTarget: true) { private List<(Actor source, Actor target)> _slimes = new(); private static readonly AOEShapeCircle _shape = new(20); - public FactorIn() : base(ActionID.MakeSpell(AID.FactorIn), centerAtTarget: true) { } - - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - base.DrawArenaForeground(module, pcSlot, pc, arena); + base.DrawArenaForeground(pcSlot, pc); foreach (var s in _slimes) { - arena.Actor(s.source, ArenaColor.Object, true); - arena.AddLine(s.source.Position, s.target.Position, ArenaColor.Danger); + Arena.Actor(s.source, ArenaColor.Object, true); + Arena.AddLine(s.source.Position, s.target.Position, ArenaColor.Danger); } } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.CriticalFactor) - ForbiddenPlayers.Set(module.Raid.FindSlot(actor.InstanceID)); + ForbiddenPlayers.Set(Raid.FindSlot(actor.InstanceID)); } - public override void OnTethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnTethered(Actor source, ActorTetherInfo tether) { - if (tether.ID == (uint)TetherID.FactorIn && module.WorldState.Actors.Find(tether.Target) is var target && target != null) + if (tether.ID == (uint)TetherID.FactorIn && WorldState.Actors.Find(tether.Target) is var target && target != null) { _slimes.Add((source, target)); UpdateBaits(); } } - public override void OnUntethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnUntethered(Actor source, ActorTetherInfo tether) { if (tether.ID == (uint)TetherID.FactorIn) { diff --git a/BossMod/Modules/Endwalker/Savage/P1SErichthonios/AetherExplosion.cs b/BossMod/Modules/Endwalker/Savage/P1SErichthonios/AetherExplosion.cs index 17f86de6d6..6b5e1e464e 100644 --- a/BossMod/Modules/Endwalker/Savage/P1SErichthonios/AetherExplosion.cs +++ b/BossMod/Modules/Endwalker/Savage/P1SErichthonios/AetherExplosion.cs @@ -1,7 +1,7 @@ namespace BossMod.Endwalker.Savage.P1SErichthonios; // state related to aether explosion mechanics, done as part of aetherflails, aetherchain and shackles of time abilities -class AetherExplosion : BossComponent +class AetherExplosion(BossModule module) : BossComponent(module) { private enum Cell { None, Red, Blue } @@ -12,47 +12,47 @@ private enum Cell { None, Red, Blue } public bool SOTActive => _memberWithSOT != null; - public override void Update(BossModule module) + public override void Update() { if (_memberWithSOT != null) - _explodingCells = CellFromOffset(_memberWithSOT.Position - module.Bounds.Center); + _explodingCells = CellFromOffset(_memberWithSOT.Position - Module.Bounds.Center); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { - if (actor != _memberWithSOT && _explodingCells != Cell.None && _explodingCells == CellFromOffset(actor.Position - module.Bounds.Center)) + if (actor != _memberWithSOT && _explodingCells != Cell.None && _explodingCells == CellFromOffset(actor.Position - Module.Bounds.Center)) { hints.Add("Hit by aether explosion!"); } } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { if (_explodingCells == Cell.None || pc == _memberWithSOT) return; // nothing to draw - if (module.Bounds is not ArenaBoundsCircle) + if (Module.Bounds is not ArenaBoundsCircle) { - module.ReportError(this, "Trying to draw aether AOE when cells mode is not active..."); + ReportError("Trying to draw aether AOE when cells mode is not active..."); return; } var start = _explodingCells == Cell.Blue ? 0.Degrees() : 45.Degrees(); for (int i = 0; i < 4; ++i) { - arena.ZoneCone(module.Bounds.Center, 0, P1S.InnerCircleRadius, start + 22.5f.Degrees(), 22.5f.Degrees(), ArenaColor.AOE); - arena.ZoneCone(module.Bounds.Center, P1S.InnerCircleRadius, module.Bounds.HalfSize, start + 67.5f.Degrees(), 22.5f.Degrees(), ArenaColor.AOE); + Arena.ZoneCone(Module.Bounds.Center, 0, P1S.InnerCircleRadius, start + 22.5f.Degrees(), 22.5f.Degrees(), ArenaColor.AOE); + Arena.ZoneCone(Module.Bounds.Center, P1S.InnerCircleRadius, Module.Bounds.HalfSize, start + 67.5f.Degrees(), 22.5f.Degrees(), ArenaColor.AOE); start += 90.Degrees(); } } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (_memberWithSOT != pc) - arena.Actor(_memberWithSOT, _colorSOTActor); + Arena.Actor(_memberWithSOT, _colorSOTActor); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { switch ((SID)status.ID) { @@ -65,24 +65,24 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st _ => Cell.None }; if (_explodingCells == Cell.None) - module.ReportError(this, $"Unexpected aether explosion param {status.Extra:X2}"); + ReportError($"Unexpected aether explosion param {status.Extra:X2}"); if (_memberWithSOT != null) { - module.ReportError(this, "Unexpected forced explosion while SOT is active"); + ReportError("Unexpected forced explosion while SOT is active"); _memberWithSOT = null; } break; case SID.ShacklesOfTime: if (_memberWithSOT != null) - module.ReportError(this, "Unexpected ShacklesOfTime: another is already active!"); + ReportError("Unexpected ShacklesOfTime: another is already active!"); _memberWithSOT = actor; _explodingCells = Cell.None; break; } } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { switch ((SID)status.ID) { diff --git a/BossMod/Modules/Endwalker/Savage/P1SErichthonios/Flails.cs b/BossMod/Modules/Endwalker/Savage/P1SErichthonios/Flails.cs index 793b59237a..8da0987a22 100644 --- a/BossMod/Modules/Endwalker/Savage/P1SErichthonios/Flails.cs +++ b/BossMod/Modules/Endwalker/Savage/P1SErichthonios/Flails.cs @@ -14,9 +14,9 @@ class Flails : BossComponent private static readonly AOEShape _aoeInner = new AOEShapeCircle(P1S.InnerCircleRadius); private static readonly AOEShape _aoeOuter = new AOEShapeDonut(P1S.InnerCircleRadius, 60); - public override void Init(BossModule module) + public Flails(BossModule module) : base(module) { - (_first, _second) = (AID)(module.PrimaryActor.CastInfo?.Action.ID ?? 0) switch + (_first, _second) = (AID)(Module.PrimaryActor.CastInfo?.Action.ID ?? 0) switch { AID.GaolerFlailRL => (_aoeRight, _aoeLeft), AID.GaolerFlailLR => (_aoeLeft, _aoeRight), @@ -34,27 +34,27 @@ public override void Init(BossModule module) }; if (_first == null) - module.ReportError(this, "Failed to detect flail zones"); + ReportError("Failed to detect flail zones"); _detectSecond = _first != null && _second == null; _showSecond = _first is AOEShapeCone != _second is AOEShapeCone; } - public override void Update(BossModule module) + public override void Update() { // currently the best way i've found to determine secondary aetherflail attack if first attack is a cone is to watch spawned npcs // these can appear few frames later... if (!_detectSecond) return; - var weaponsBall = module.Enemies(OID.FlailI); - var weaponsChakram = module.Enemies(OID.FlailO); + var weaponsBall = Module.Enemies(OID.FlailI); + var weaponsChakram = Module.Enemies(OID.FlailO); if (weaponsBall.Count + weaponsChakram.Count > 0) { _detectSecond = false; if (weaponsBall.Count > 0 && weaponsChakram.Count > 0) { - module.ReportError(this, $"Failed to determine second aetherflail: there are {weaponsBall.Count} balls and {weaponsChakram.Count} chakrams"); + ReportError($"Failed to determine second aetherflail: there are {weaponsBall.Count} balls and {weaponsChakram.Count} chakrams"); } else { @@ -63,22 +63,22 @@ public override void Update(BossModule module) } } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { - if (_first?.Check(actor.Position, module.PrimaryActor) ?? false) + if (_first?.Check(actor.Position, Module.PrimaryActor) ?? false) hints.Add("Hit by first flail!"); - if (_showSecond && _second != null && _second.Check(actor.Position, module.PrimaryActor)) + if (_showSecond && _second != null && _second.Check(actor.Position, Module.PrimaryActor)) hints.Add("Hit by second flail!"); } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { - _first?.Draw(arena, module.PrimaryActor); + _first?.Draw(Arena, Module.PrimaryActor); if (_showSecond) - _second?.Draw(arena, module.PrimaryActor); + _second?.Draw(Arena, Module.PrimaryActor); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { diff --git a/BossMod/Modules/Endwalker/Savage/P1SErichthonios/Intemperance.cs b/BossMod/Modules/Endwalker/Savage/P1SErichthonios/Intemperance.cs index 72005ad84f..c6a7952700 100644 --- a/BossMod/Modules/Endwalker/Savage/P1SErichthonios/Intemperance.cs +++ b/BossMod/Modules/Endwalker/Savage/P1SErichthonios/Intemperance.cs @@ -8,7 +8,7 @@ // E/W positions: symmetrical = move to center for second explosion, then return; asymmetrical = move to S for second explosion, then return // normal corners: symmetrical = move to S for second explosion, then return; asymmetrical = move to center for second explosion, then return // designated corner: symmetrical = same as normal corner; asymmetrical = move to N or S for second explosion, move to N for last explosion -class Intemperance : BossComponent +class Intemperance(BossModule module) : BossComponent(module) { public enum State { Unknown, TopToBottom, BottomToTop } public enum Pattern { Unknown, Symmetrical, Asymmetrical } @@ -46,7 +46,7 @@ public enum Cube { None, R, B, P } }; private static readonly WDir[] _offsets = { new(-1, -1), new(0, -1), new(1, -1), new(1, 0), new(1, 1), new(0, 1), new(-1, 1), new(-1, 0), new(0, 0) }; - public override void Update(BossModule module) + public override void Update() { if (_patternModified) { @@ -55,7 +55,7 @@ public override void Update(BossModule module) } } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_delimiterCenters.Any(c => _delimiterAOE.Check(actor.Position, c.Item1, c.Item2))) { @@ -63,47 +63,50 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } else { - int actorCell = PositionFromCoords(module, actor.Position); + int actorCell = PositionFromCoords(actor.Position); if (_playerAssignment != null) { - int expectedCell = NumExplosions == 1 ? Position2(module, _playerAssignment[slot]) : Position3(module, _playerAssignment[slot]); + int expectedCell = NumExplosions == 1 ? Position2(_playerAssignment[slot]) : Position3(_playerAssignment[slot]); if (actorCell != expectedCell) { hints.Add("Go to assigned cell!"); } } - else if (module.Raid.WithoutSlot().Exclude(actor).Any(other => PositionFromCoords(module, other.Position) == actorCell)) + else if (Raid.WithoutSlot().Exclude(actor).Any(other => PositionFromCoords(other.Position) == actorCell)) { hints.Add("Stand in own cell!"); } } + } - if (movementHints != null && _playerAssignment != null) - foreach (var (from, to, color) in EnumMovementHints(module, actor.Position, _playerAssignment[slot])) + public override void AddMovementHints(int slot, Actor actor, MovementHints movementHints) + { + if (_playerAssignment != null) + foreach (var (from, to, color) in EnumMovementHints(actor.Position, _playerAssignment[slot])) movementHints.Add(from, to, color); } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { hints.Add($"Order: {_curState}, pattern: {_pattern}."); } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { foreach (var c in _delimiterCenters) - _delimiterAOE.Draw(arena, c.Item1, c.Item2); + _delimiterAOE.Draw(Arena, c.Item1, c.Item2); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (_playerAssignment != null) - foreach (var (from, to, color) in EnumMovementHints(module, pc.Position, _playerAssignment[pcSlot])) - arena.AddLine(from, to, color); + foreach (var (from, to, color) in EnumMovementHints(pc.Position, _playerAssignment[pcSlot])) + Arena.AddLine(from, to, color); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { - if (caster != module.PrimaryActor) + if (caster != Module.PrimaryActor) return; var state = (AID)spell.Action.ID switch { @@ -115,7 +118,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf _curState = state; } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.PainfulFlux) // this is convenient to rely on, since exactly 1 cast happens right after every explosion { @@ -124,22 +127,22 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent // on first explosion, assign players to cubes _playerAssignment = new int[PartyState.MaxPartySize]; int occupiedMask = 0; - foreach (var (slot, player) in module.Raid.WithSlot(true)) + foreach (var (slot, player) in Raid.WithSlot(true)) { - var pos = _playerAssignment[slot] = PositionFromCoords(module, player.Position); + var pos = _playerAssignment[slot] = PositionFromCoords(player.Position); occupiedMask |= 1 << pos; } if (occupiedMask != 0xFF) { - module.ReportError(this, "Failed to determine player assignments"); + ReportError("Failed to determine player assignments"); _playerAssignment = null; } } } } - public override void OnEventEnvControl(BossModule module, byte index, uint state) + public override void OnEventEnvControl(byte index, uint state) { // we get the following env-control messages: // 1. ~2.8s after 26142 cast, we get 25 EnvControl messages with directorID 800375A0 @@ -167,9 +170,9 @@ public override void OnEventEnvControl(BossModule module, byte index, uint state } } - private int PositionFromCoords(BossModule module, WPos coords) + private int PositionFromCoords(WPos coords) { - return (coords - module.Bounds.Center) switch + return (coords - Module.Bounds.Center) switch { { X: < -7, Z: < -7 } => 0, { X: > +7, Z: < -7 } => 2, @@ -183,17 +186,17 @@ private int PositionFromCoords(BossModule module, WPos coords) }; } - private int SwapCorner(BossModule module) + private int SwapCorner() { return 2 * (int)Service.Config.Get().IntemperanceAsymmetricalSwapCorner; } - private WPos PosCenter(BossModule module, int pos) + private WPos PosCenter(int pos) { - return module.Bounds.Center + 14 * _offsets[pos]; + return Module.Bounds.Center + 14 * _offsets[pos]; } - private int Position2(BossModule module, int pos1) + private int Position2(int pos1) { if (_pattern == Pattern.Symmetrical) { @@ -206,7 +209,7 @@ private int Position2(BossModule module, int pos1) }; } - if (pos1 == SwapCorner(module)) + if (pos1 == SwapCorner()) return _curState == State.TopToBottom ? 5 : 1; // swap-corner goes N or S return pos1 switch @@ -218,12 +221,12 @@ private int Position2(BossModule module, int pos1) }; } - private int Position3(BossModule module, int pos1) + private int Position3(int pos1) { if (_pattern == Pattern.Symmetrical) return pos1; // everyone returns to initial spot - int swapCorner = SwapCorner(module); + int swapCorner = SwapCorner(); if (pos1 == swapCorner) return 1; // swap-corner goes N else if (pos1 == 1) @@ -232,17 +235,17 @@ private int Position3(BossModule module, int pos1) return pos1; // others return to initial spot } - private IEnumerable<(WPos, WPos, uint)> EnumMovementHints(BossModule module, WPos startingPosition, int assignment) + private IEnumerable<(WPos, WPos, uint)> EnumMovementHints(WPos startingPosition, int assignment) { switch (NumExplosions) { case 1: - var mid = PosCenter(module, Position2(module, assignment)); - yield return (mid, PosCenter(module, Position3(module, assignment)), ArenaColor.Danger); + var mid = PosCenter(Position2(assignment)); + yield return (mid, PosCenter(Position3(assignment)), ArenaColor.Danger); yield return (startingPosition, mid, ArenaColor.Safe); break; case 2: - yield return (startingPosition, PosCenter(module, Position3(module, assignment)), ArenaColor.Safe); + yield return (startingPosition, PosCenter(Position3(assignment)), ArenaColor.Safe); break; } } diff --git a/BossMod/Modules/Endwalker/Savage/P1SErichthonios/Knockback.cs b/BossMod/Modules/Endwalker/Savage/P1SErichthonios/Knockback.cs index 8d724826bc..6700b8aa0c 100644 --- a/BossMod/Modules/Endwalker/Savage/P1SErichthonios/Knockback.cs +++ b/BossMod/Modules/Endwalker/Savage/P1SErichthonios/Knockback.cs @@ -14,35 +14,35 @@ class Knockback : BossComponent private static readonly float _holyRange = 6; private static readonly uint _colorAOETarget = 0xff8080ff; - public override void Init(BossModule module) + public Knockback(BossModule module) : base(module) { - _isFlare = module.PrimaryActor.CastInfo?.IsSpell(AID.KnockbackPurge) ?? false; - _knockbackTarget = module.WorldState.Actors.Find(module.PrimaryActor.CastInfo?.TargetID ?? 0); + _isFlare = Module.PrimaryActor.CastInfo?.IsSpell(AID.KnockbackPurge) ?? false; + _knockbackTarget = WorldState.Actors.Find(Module.PrimaryActor.CastInfo?.TargetID ?? 0); if (_knockbackTarget == null) - module.ReportError(this, "Failed to determine knockback target"); + ReportError("Failed to determine knockback target"); } - public override void Update(BossModule module) + public override void Update() { if (_knockbackTarget != null) { _knockbackPos = _knockbackTarget.Position; - if (module.PrimaryActor.CastInfo != null) + if (Module.PrimaryActor.CastInfo != null) { - _knockbackPos = Components.Knockback.AwayFromSource(_knockbackPos, module.PrimaryActor, _kbDistance); + _knockbackPos = Components.Knockback.AwayFromSource(_knockbackPos, Module.PrimaryActor, _kbDistance); } } } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { - if (module.PrimaryActor.CastInfo != null && actor == _knockbackTarget && !module.Bounds.Contains(_knockbackPos)) + if (Module.PrimaryActor.CastInfo != null && actor == _knockbackTarget && !Module.Bounds.Contains(_knockbackPos)) { hints.Add("About to be knocked into wall!"); } float aoeRange = _isFlare ? _flareRange : _holyRange; - if (module.PrimaryActor.TargetID == actor.InstanceID) + if (Module.PrimaryActor.TargetID == actor.InstanceID) { // i'm the current tank - i should gtfo from raid if i'll get the flare -or- if i'm vulnerable (assuming i'll pop invul not to die) if (RaidShouldStack(actor)) @@ -52,7 +52,7 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint { hints.Add("GTFO from co-tank!"); } - if (module.Raid.WithoutSlot().InRadiusExcluding(actor, aoeRange).Count() < 7) + if (Raid.WithoutSlot().InRadiusExcluding(actor, aoeRange).Count() < 7) { hints.Add("Stack with raid!"); } @@ -64,7 +64,7 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint { hints.Add("Press invul!"); } - if (module.Raid.WithoutSlot().InRadiusExcluding(actor, aoeRange).Any()) + if (Raid.WithoutSlot().InRadiusExcluding(actor, aoeRange).Any()) { hints.Add("GTFO from raid!"); } @@ -73,7 +73,7 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint else { // i'm not the current tank - I should gtfo if tank is invul soaking, from flare or from holy if i'm vulnerable, otherwise stack to current tank - var target = module.WorldState.Actors.Find(module.PrimaryActor.TargetID); + var target = WorldState.Actors.Find(Module.PrimaryActor.TargetID); if (target == null) return; @@ -97,15 +97,15 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - if (module.PrimaryActor.CastInfo != null && pc == _knockbackTarget && pc.Position != _knockbackPos) + if (Module.PrimaryActor.CastInfo != null && pc == _knockbackTarget && pc.Position != _knockbackPos) { - arena.AddLine(pc.Position, _knockbackPos, ArenaColor.Danger); - arena.Actor(_knockbackPos, pc.Rotation, ArenaColor.Danger); + Arena.AddLine(pc.Position, _knockbackPos, ArenaColor.Danger); + Arena.Actor(_knockbackPos, pc.Rotation, ArenaColor.Danger); } - var target = module.WorldState.Actors.Find(module.PrimaryActor.TargetID); + var target = WorldState.Actors.Find(Module.PrimaryActor.TargetID); if (target == null) return; @@ -114,22 +114,22 @@ public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc if (target == pc) { // there will be AOE around me, draw all players to help with positioning - note that we use position adjusted for knockback - foreach (var player in module.Raid.WithoutSlot()) - arena.Actor(player, player.Position.InCircle(targetPos, aoeRange) ? ArenaColor.PlayerInteresting : ArenaColor.PlayerGeneric); + foreach (var player in Raid.WithoutSlot()) + Arena.Actor(player, player.Position.InCircle(targetPos, aoeRange) ? ArenaColor.PlayerInteresting : ArenaColor.PlayerGeneric); } else { // draw AOE source - arena.Actor(targetPos, target.Rotation, _colorAOETarget); + Arena.Actor(targetPos, target.Rotation, _colorAOETarget); } - arena.AddCircle(targetPos, aoeRange, ArenaColor.Danger); + Arena.AddCircle(targetPos, aoeRange, ArenaColor.Danger); // draw vulnerable target if (_knockbackTarget != pc && _knockbackTarget != target) - arena.Actor(_knockbackTarget, ArenaColor.Vulnerable); + Arena.Actor(_knockbackTarget, ArenaColor.Vulnerable); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.TrueHoly2 or AID.TrueFlare2) AOEDone = true; diff --git a/BossMod/Modules/Endwalker/Savage/P1SErichthonios/P1S.cs b/BossMod/Modules/Endwalker/Savage/P1SErichthonios/P1S.cs index e94407269b..0b527a5618 100644 --- a/BossMod/Modules/Endwalker/Savage/P1SErichthonios/P1S.cs +++ b/BossMod/Modules/Endwalker/Savage/P1SErichthonios/P1S.cs @@ -1,12 +1,10 @@ namespace BossMod.Endwalker.Savage.P1SErichthonios; [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 809, NameID = 10576)] -public class P1S : BossModule +public class P1S(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsSquare(new(100, 100), 20)) { public static readonly float InnerCircleRadius = 12; // this determines in/out flails and cells boundary - public P1S(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsSquare(new(100, 100), 20)) { } - protected override void DrawArenaForeground(int pcSlot, Actor pc) { if (Bounds is ArenaBoundsCircle) diff --git a/BossMod/Modules/Endwalker/Savage/P1SErichthonios/P1SConfig.cs b/BossMod/Modules/Endwalker/Savage/P1SErichthonios/P1SConfig.cs index 1b5b24b03f..128f851810 100644 --- a/BossMod/Modules/Endwalker/Savage/P1SErichthonios/P1SConfig.cs +++ b/BossMod/Modules/Endwalker/Savage/P1SErichthonios/P1SConfig.cs @@ -1,12 +1,10 @@ namespace BossMod.Endwalker.Savage.P1SErichthonios; [ConfigDisplay(Order = 0x110, Parent = typeof(EndwalkerConfig))] -public class P1SConfig : CooldownPlanningConfigNode +public class P1SConfig() : CooldownPlanningConfigNode(90) { public enum Corner { NW, NE, SE, SW } [PropertyDisplay("Intemperance: corner that swaps with N on asymmetrical pattern")] public Corner IntemperanceAsymmetricalSwapCorner = Corner.NW; - - public P1SConfig() : base(90) { } } diff --git a/BossMod/Modules/Endwalker/Savage/P1SErichthonios/Shackles.cs b/BossMod/Modules/Endwalker/Savage/P1SErichthonios/Shackles.cs index c33f000479..e4aa376aa9 100644 --- a/BossMod/Modules/Endwalker/Savage/P1SErichthonios/Shackles.cs +++ b/BossMod/Modules/Endwalker/Savage/P1SErichthonios/Shackles.cs @@ -1,7 +1,7 @@ namespace BossMod.Endwalker.Savage.P1SErichthonios; // state related to normal and fourfold shackles -class Shackles : BossComponent +class Shackles(BossModule module) : BossComponent(module) { public int NumExpiredDebuffs { get; private set; } = 0; private bool _active = false; @@ -19,7 +19,7 @@ class Shackles : BossComponent private static readonly float _redExplosionRadius = 8; private static uint TetherColor(bool blue, bool red) => blue ? (red ? 0xff00ffff : 0xffff0080) : (red ? 0xff8080ff : 0xff808080); - public override void Update(BossModule module) + public override void Update() { _blueTetherMatrix = _redTetherMatrix = _blueExplosionMatrix = _redExplosionMatrix = new(); var blueDebuffs = _debuffsBlueImminent | _debuffsBlueFuture; @@ -29,13 +29,13 @@ public override void Update(BossModule module) return; // nothing to do... // update tether matrices - foreach ((int iSrc, var src) in module.Raid.WithSlot()) + foreach ((int iSrc, var src) in Raid.WithSlot()) { // blue => 3 closest if (blueDebuffs[iSrc]) { _blueTetherMatrix[iSrc, iSrc] = true; - foreach ((int iTgt, _) in module.Raid.WithSlot().Exclude(iSrc).SortedByRange(src.Position).Take(3)) + foreach ((int iTgt, _) in Raid.WithSlot().Exclude(iSrc).SortedByRange(src.Position).Take(3)) _blueTetherMatrix[iTgt, iSrc] = true; } @@ -43,25 +43,25 @@ public override void Update(BossModule module) if (redDebuffs[iSrc]) { _redTetherMatrix[iSrc, iSrc] = true; - foreach ((int iTgt, _) in module.Raid.WithSlot().Exclude(iSrc).SortedByRange(src.Position).TakeLast(3)) + foreach ((int iTgt, _) in Raid.WithSlot().Exclude(iSrc).SortedByRange(src.Position).TakeLast(3)) _redTetherMatrix[iTgt, iSrc] = true; } } // update explosion matrices and detect problems (has to be done in a separate pass) - foreach ((int i, var actor) in module.Raid.WithSlot()) + foreach ((int i, var actor) in Raid.WithSlot()) { if (_blueTetherMatrix[i].Any()) - foreach ((int j, _) in module.Raid.WithSlot().InRadiusExcluding(actor, _blueExplosionRadius)) + foreach ((int j, _) in Raid.WithSlot().InRadiusExcluding(actor, _blueExplosionRadius)) _blueExplosionMatrix[j, i] = true; if (_redTetherMatrix[i].Any()) - foreach ((int j, _) in module.Raid.WithSlot().InRadiusExcluding(actor, _redExplosionRadius)) + foreach ((int j, _) in Raid.WithSlot().InRadiusExcluding(actor, _redExplosionRadius)) _redExplosionMatrix[j, i] = true; } } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_blueTetherMatrix[slot].Any() && _redTetherMatrix[slot].Any()) { @@ -71,35 +71,38 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint { hints.Add("GTFO from explosion!"); } + } - if (movementHints != null && _preferredPositions[slot] != new WPos()) + public override void AddMovementHints(int slot, Actor actor, MovementHints movementHints) + { + if (_preferredPositions[slot] != default) { movementHints.Add(actor.Position, _preferredPositions[slot], ArenaColor.Safe); } } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (!_active) return; bool drawBlueAroundMe = false; bool drawRedAroundMe = false; - foreach ((int i, var actor) in module.Raid.WithSlot()) + foreach ((int i, var actor) in Raid.WithSlot()) { var blueTetheredTo = _blueTetherMatrix[i]; var redTetheredTo = _redTetherMatrix[i]; - arena.Actor(actor, TetherColor(blueTetheredTo.Any(), redTetheredTo.Any())); + Arena.Actor(actor, TetherColor(blueTetheredTo.Any(), redTetheredTo.Any())); // draw tethers - foreach ((int j, var target) in module.Raid.WithSlot(true).Exclude(i).IncludedInMask(blueTetheredTo | redTetheredTo)) - arena.AddLine(actor.Position, target.Position, TetherColor(blueTetheredTo[j], redTetheredTo[j])); + foreach ((int j, var target) in Raid.WithSlot(true).Exclude(i).IncludedInMask(blueTetheredTo | redTetheredTo)) + Arena.AddLine(actor.Position, target.Position, TetherColor(blueTetheredTo[j], redTetheredTo[j])); // draw explosion circles that hit me if (_blueExplosionMatrix[pcSlot, i]) - arena.AddCircle(actor.Position, _blueExplosionRadius, ArenaColor.Danger); + Arena.AddCircle(actor.Position, _blueExplosionRadius, ArenaColor.Danger); if (_redExplosionMatrix[pcSlot, i]) - arena.AddCircle(actor.Position, _redExplosionRadius, ArenaColor.Danger); + Arena.AddCircle(actor.Position, _redExplosionRadius, ArenaColor.Danger); drawBlueAroundMe |= _blueExplosionMatrix[i, pcSlot]; drawRedAroundMe |= _redExplosionMatrix[i, pcSlot]; @@ -107,68 +110,68 @@ public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc // draw explosion circles if I hit anyone if (drawBlueAroundMe) - arena.AddCircle(pc.Position, _blueExplosionRadius, ArenaColor.Danger); + Arena.AddCircle(pc.Position, _blueExplosionRadius, ArenaColor.Danger); if (drawRedAroundMe) - arena.AddCircle(pc.Position, _redExplosionRadius, ArenaColor.Danger); + Arena.AddCircle(pc.Position, _redExplosionRadius, ArenaColor.Danger); // draw assigned spot, if any if (_preferredPositions[pcSlot] != new WPos()) - arena.AddCircle(_preferredPositions[pcSlot], 2, ArenaColor.Safe); + Arena.AddCircle(_preferredPositions[pcSlot], 2, ArenaColor.Safe); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { switch ((SID)status.ID) { case SID.ShacklesOfCompanionship0: - _debuffsBlueFuture.Set(module.Raid.FindSlot(actor.InstanceID)); + _debuffsBlueFuture.Set(Raid.FindSlot(actor.InstanceID)); break; case SID.ShacklesOfCompanionship1: - _debuffsBlueFuture.Set(module.Raid.FindSlot(actor.InstanceID)); - AssignOrder(module, actor, 0, false); + _debuffsBlueFuture.Set(Raid.FindSlot(actor.InstanceID)); + AssignOrder(actor, 0, false); break; case SID.ShacklesOfCompanionship2: - _debuffsBlueFuture.Set(module.Raid.FindSlot(actor.InstanceID)); - AssignOrder(module, actor, 1, false); + _debuffsBlueFuture.Set(Raid.FindSlot(actor.InstanceID)); + AssignOrder(actor, 1, false); break; case SID.ShacklesOfCompanionship3: - _debuffsBlueFuture.Set(module.Raid.FindSlot(actor.InstanceID)); - AssignOrder(module, actor, 2, false); + _debuffsBlueFuture.Set(Raid.FindSlot(actor.InstanceID)); + AssignOrder(actor, 2, false); break; case SID.ShacklesOfCompanionship4: - _debuffsBlueFuture.Set(module.Raid.FindSlot(actor.InstanceID)); - AssignOrder(module, actor, 3, false); + _debuffsBlueFuture.Set(Raid.FindSlot(actor.InstanceID)); + AssignOrder(actor, 3, false); break; case SID.ShacklesOfLoneliness0: - _debuffsRedFuture.Set(module.Raid.FindSlot(actor.InstanceID)); + _debuffsRedFuture.Set(Raid.FindSlot(actor.InstanceID)); break; case SID.ShacklesOfLoneliness1: - _debuffsRedFuture.Set(module.Raid.FindSlot(actor.InstanceID)); - AssignOrder(module, actor, 0, true); + _debuffsRedFuture.Set(Raid.FindSlot(actor.InstanceID)); + AssignOrder(actor, 0, true); break; case SID.ShacklesOfLoneliness2: - _debuffsRedFuture.Set(module.Raid.FindSlot(actor.InstanceID)); - AssignOrder(module, actor, 1, true); + _debuffsRedFuture.Set(Raid.FindSlot(actor.InstanceID)); + AssignOrder(actor, 1, true); break; case SID.ShacklesOfLoneliness3: - _debuffsRedFuture.Set(module.Raid.FindSlot(actor.InstanceID)); - AssignOrder(module, actor, 2, true); + _debuffsRedFuture.Set(Raid.FindSlot(actor.InstanceID)); + AssignOrder(actor, 2, true); break; case SID.ShacklesOfLoneliness4: - _debuffsRedFuture.Set(module.Raid.FindSlot(actor.InstanceID)); - AssignOrder(module, actor, 3, true); + _debuffsRedFuture.Set(Raid.FindSlot(actor.InstanceID)); + AssignOrder(actor, 3, true); break; case SID.InescapableCompanionship: - _debuffsBlueImminent.Set(module.Raid.FindSlot(actor.InstanceID)); + _debuffsBlueImminent.Set(Raid.FindSlot(actor.InstanceID)); break; case SID.InescapableLoneliness: - _debuffsRedImminent.Set(module.Raid.FindSlot(actor.InstanceID)); + _debuffsRedImminent.Set(Raid.FindSlot(actor.InstanceID)); break; } } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { switch ((SID)status.ID) { @@ -177,39 +180,39 @@ public override void OnStatusLose(BossModule module, Actor actor, ActorStatus st case SID.ShacklesOfCompanionship2: case SID.ShacklesOfCompanionship3: case SID.ShacklesOfCompanionship4: - _debuffsBlueFuture.Clear(module.Raid.FindSlot(actor.InstanceID)); + _debuffsBlueFuture.Clear(Raid.FindSlot(actor.InstanceID)); break; case SID.ShacklesOfLoneliness0: case SID.ShacklesOfLoneliness1: case SID.ShacklesOfLoneliness2: case SID.ShacklesOfLoneliness3: case SID.ShacklesOfLoneliness4: - _debuffsRedFuture.Clear(module.Raid.FindSlot(actor.InstanceID)); + _debuffsRedFuture.Clear(Raid.FindSlot(actor.InstanceID)); break; case SID.InescapableCompanionship: - _debuffsBlueImminent.Clear(module.Raid.FindSlot(actor.InstanceID)); + _debuffsBlueImminent.Clear(Raid.FindSlot(actor.InstanceID)); ++NumExpiredDebuffs; break; case SID.InescapableLoneliness: - _debuffsRedImminent.Clear(module.Raid.FindSlot(actor.InstanceID)); + _debuffsRedImminent.Clear(Raid.FindSlot(actor.InstanceID)); ++NumExpiredDebuffs; break; } } - private void AssignOrder(BossModule module, Actor actor, int order, bool far) + private void AssignOrder(Actor actor, int order, bool far) { - var way1 = module.WorldState.Waymarks[(Waymark)((int)Waymark.A + order)]; - var way2 = module.WorldState.Waymarks[(Waymark)((int)Waymark.N1 + order)]; + var way1 = WorldState.Waymarks[(Waymark)((int)Waymark.A + order)]; + var way2 = WorldState.Waymarks[(Waymark)((int)Waymark.N1 + order)]; if (way1 == null || way2 == null) return; var w1 = new WPos(way1.Value.XZ()); var w2 = new WPos(way2.Value.XZ()); - var d1 = (w1 - module.Bounds.Center).LengthSq(); - var d2 = (w2 - module.Bounds.Center).LengthSq(); + var d1 = (w1 - Module.Bounds.Center).LengthSq(); + var d2 = (w2 - Module.Bounds.Center).LengthSq(); bool use1 = far ? d1 > d2 : d1 < d2; - int slot = module.Raid.FindSlot(actor.InstanceID); + int slot = Raid.FindSlot(actor.InstanceID); if (slot >= 0) _preferredPositions[slot] = use1 ? w1 : w2; } diff --git a/BossMod/Modules/Endwalker/Savage/P2SHippokampos/Cataract.cs b/BossMod/Modules/Endwalker/Savage/P2SHippokampos/Cataract.cs index efd554e57f..56f4b1e649 100644 --- a/BossMod/Modules/Endwalker/Savage/P2SHippokampos/Cataract.cs +++ b/BossMod/Modules/Endwalker/Savage/P2SHippokampos/Cataract.cs @@ -6,21 +6,21 @@ class Cataract : BossComponent private AOEShapeRect _aoeBoss = new(50, 7.5f, 50); private AOEShapeRect _aoeHead = new(50, 50); - public override void Init(BossModule module) + public Cataract(BossModule module) : base(module) { - if (module.PrimaryActor.CastInfo?.IsSpell(AID.WingedCataract) ?? false) + if (Module.PrimaryActor.CastInfo?.IsSpell(AID.WingedCataract) ?? false) _aoeHead.DirectionOffset = 180.Degrees(); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { - if (_aoeBoss.Check(actor.Position, module.PrimaryActor) || _aoeHead.Check(actor.Position, module.Enemies(OID.CataractHead).FirstOrDefault())) + if (_aoeBoss.Check(actor.Position, Module.PrimaryActor) || _aoeHead.Check(actor.Position, Module.Enemies(OID.CataractHead).FirstOrDefault())) hints.Add("GTFO from cataract!"); } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { - _aoeBoss.Draw(arena, module.PrimaryActor); - _aoeHead.Draw(arena, module.Enemies(OID.CataractHead).FirstOrDefault()); + _aoeBoss.Draw(Arena, Module.PrimaryActor); + _aoeHead.Draw(Arena, Module.Enemies(OID.CataractHead).FirstOrDefault()); } } diff --git a/BossMod/Modules/Endwalker/Savage/P2SHippokampos/ChannelingFlow.cs b/BossMod/Modules/Endwalker/Savage/P2SHippokampos/ChannelingFlow.cs index a893a67f17..dd48987db2 100644 --- a/BossMod/Modules/Endwalker/Savage/P2SHippokampos/ChannelingFlow.cs +++ b/BossMod/Modules/Endwalker/Savage/P2SHippokampos/ChannelingFlow.cs @@ -1,28 +1,28 @@ namespace BossMod.Endwalker.Savage.P2SHippokampos; // state related to channeling [over]flow mechanics -class ChannelingFlow : BossComponent +class ChannelingFlow(BossModule module) : BossComponent(module) { public int NumStunned { get; private set; } private (WDir, DateTime)[] _arrows = new (WDir, DateTime)[PartyState.MaxPartySize]; private static readonly float _typhoonHalfWidth = 2.5f; - public bool SlotActive(BossModule module, int slot) + public bool SlotActive(int slot) { var (dir, expire) = _arrows[slot]; - return dir != new WDir() && (expire - module.WorldState.CurrentTime).TotalSeconds < 13; + return dir != new WDir() && (expire - WorldState.CurrentTime).TotalSeconds < 13; } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { Actor? partner = null; - if (SlotActive(module, slot)) + if (SlotActive(slot)) { int numPartners = 0, numClipped = 0; var partnerDir = -_arrows[slot].Item1; float minDistance = 50; - foreach (var (otherSlot, otherActor) in ActorsHitBy(module, slot, actor)) + foreach (var (otherSlot, otherActor) in ActorsHitBy(slot, actor)) { if (_arrows[otherSlot].Item1 == partnerDir) { @@ -44,33 +44,33 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint hints.Add("Too close to partner!"); } - if (ActiveArrows(module).Any(pd => pd.Item1 != actor && pd.Item1 != partner && actor.Position.InRect(pd.Item1.Position, pd.Item2, 50, 0, _typhoonHalfWidth))) + if (ActiveArrows().Any(pd => pd.Item1 != actor && pd.Item1 != partner && actor.Position.InRect(pd.Item1.Position, pd.Item2, 50, 0, _typhoonHalfWidth))) hints.Add("GTFO from imminent flow!"); } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { - foreach (var (player, dir) in ActiveArrows(module)) + foreach (var (player, dir) in ActiveArrows()) { - arena.ZoneRect(player.Position, dir, 50, 0, _typhoonHalfWidth, ArenaColor.AOE); + Arena.ZoneRect(player.Position, dir, 50, 0, _typhoonHalfWidth, ArenaColor.AOE); } } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { switch ((SID)status.ID) { case SID.MarkFlowN: - SetArrow(module, actor, new(0, -1), status.ExpireAt); + SetArrow(actor, new(0, -1), status.ExpireAt); break; case SID.MarkFlowS: - SetArrow(module, actor, new(0, +1), status.ExpireAt); + SetArrow(actor, new(0, +1), status.ExpireAt); break; case SID.MarkFlowW: - SetArrow(module, actor, new(-1, 0), status.ExpireAt); + SetArrow(actor, new(-1, 0), status.ExpireAt); break; case SID.MarkFlowE: - SetArrow(module, actor, new(+1, 0), status.ExpireAt); + SetArrow(actor, new(+1, 0), status.ExpireAt); break; case SID.Stun: ++NumStunned; @@ -78,7 +78,7 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st } } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { switch ((SID)status.ID) { @@ -86,7 +86,7 @@ public override void OnStatusLose(BossModule module, Actor actor, ActorStatus st case SID.MarkFlowS: case SID.MarkFlowW: case SID.MarkFlowE: - SetArrow(module, actor, new(), new()); + SetArrow(actor, new(), new()); break; case SID.Stun: --NumStunned; @@ -94,20 +94,20 @@ public override void OnStatusLose(BossModule module, Actor actor, ActorStatus st } } - private void SetArrow(BossModule module, Actor actor, WDir dir, DateTime expire) + private void SetArrow(Actor actor, WDir dir, DateTime expire) { - var slot = module.WorldState.Party.FindSlot(actor.InstanceID); + var slot = WorldState.Party.FindSlot(actor.InstanceID); if (slot >= 0) _arrows[slot] = (dir, expire); } - private IEnumerable<(Actor, WDir)> ActiveArrows(BossModule module) + private IEnumerable<(Actor, WDir)> ActiveArrows() { - return module.Raid.WithSlot().WhereSlot(slot => SlotActive(module, slot)).Select(ia => (ia.Item2, _arrows[ia.Item1].Item1)); + return Raid.WithSlot().WhereSlot(slot => SlotActive(slot)).Select(ia => (ia.Item2, _arrows[ia.Item1].Item1)); } - private IEnumerable<(int, Actor)> ActorsHitBy(BossModule module, int slot, Actor actor) + private IEnumerable<(int, Actor)> ActorsHitBy(int slot, Actor actor) { - return module.Raid.WithSlot().Exclude(slot).WhereActor(a => a.Position.InRect(actor.Position, _arrows[slot].Item1, 50, 0, _typhoonHalfWidth)); + return Raid.WithSlot().Exclude(slot).WhereActor(a => a.Position.InRect(actor.Position, _arrows[slot].Item1, 50, 0, _typhoonHalfWidth)); } } diff --git a/BossMod/Modules/Endwalker/Savage/P2SHippokampos/Coherence.cs b/BossMod/Modules/Endwalker/Savage/P2SHippokampos/Coherence.cs index a8836367a9..68bb683af5 100644 --- a/BossMod/Modules/Endwalker/Savage/P2SHippokampos/Coherence.cs +++ b/BossMod/Modules/Endwalker/Savage/P2SHippokampos/Coherence.cs @@ -2,7 +2,7 @@ // state related to coherence mechanic // TODO: i'm not 100% sure how exactly it selects target for aoe ray, I assume it is closest player except tether target?.. -class Coherence : Components.CastCounter +class Coherence(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.CoherenceRay)) { private Actor? _tetherTarget; private Actor? _rayTarget; @@ -11,20 +11,18 @@ class Coherence : Components.CastCounter private static readonly float _aoeRadius = 10; // not sure about this - actual range is 60, but it has some sort of falloff? i have very few data points < 15 - public Coherence() : base(ActionID.MakeSpell(AID.CoherenceRay)) { } - - public override void Update(BossModule module) + public override void Update() { _inRay.Reset(); - _rayTarget = module.Raid.WithoutSlot().Exclude(_tetherTarget).Closest(module.PrimaryActor.Position); + _rayTarget = Raid.WithoutSlot().Exclude(_tetherTarget).Closest(Module.PrimaryActor.Position); if (_rayTarget != null) { - _rayShape.DirectionOffset = Angle.FromDirection(_rayTarget.Position - module.PrimaryActor.Position); - _inRay = module.Raid.WithSlot().InShape(_rayShape, module.PrimaryActor.Position, 0.Degrees()).Mask(); + _rayShape.DirectionOffset = Angle.FromDirection(_rayTarget.Position - Module.PrimaryActor.Position); + _inRay = Raid.WithSlot().InShape(_rayShape, Module.PrimaryActor.Position, 0.Degrees()).Mask(); } } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (actor == _tetherTarget) { @@ -32,7 +30,7 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint { hints.Add("Pass tether to tank!"); } - else if (module.Raid.WithoutSlot().InRadiusExcluding(actor, _aoeRadius).Any()) + else if (Raid.WithoutSlot().InRadiusExcluding(actor, _aoeRadius).Any()) { hints.Add("GTFO from raid!"); } @@ -61,38 +59,38 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { if (_rayTarget != null) - _rayShape.Draw(arena, module.PrimaryActor.Position, 0.Degrees()); + _rayShape.Draw(Arena, Module.PrimaryActor.Position, 0.Degrees()); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { // TODO: i'm not sure what are the exact mechanics - flare is probably distance-based, and ray is probably shared damage cast at closest target?.. - var head = module.Enemies(OID.CataractHead).FirstOrDefault(); - foreach ((int i, var player) in module.Raid.WithSlot()) + var head = Module.Enemies(OID.CataractHead).FirstOrDefault(); + foreach ((int i, var player) in Raid.WithSlot()) { if (head?.Tether.Target == player.InstanceID) { - arena.AddLine(player.Position, module.PrimaryActor.Position, ArenaColor.Danger); - arena.Actor(player, ArenaColor.Danger); - arena.AddCircle(player.Position, _aoeRadius, ArenaColor.Danger); + Arena.AddLine(player.Position, Module.PrimaryActor.Position, ArenaColor.Danger); + Arena.Actor(player, ArenaColor.Danger); + Arena.AddCircle(player.Position, _aoeRadius, ArenaColor.Danger); } else if (player == _rayTarget) { - arena.Actor(player, ArenaColor.Danger); + Arena.Actor(player, ArenaColor.Danger); } else if (player != _tetherTarget) { - arena.Actor(player, _inRay[i] ? ArenaColor.PlayerInteresting : ArenaColor.PlayerGeneric); + Arena.Actor(player, _inRay[i] ? ArenaColor.PlayerInteresting : ArenaColor.PlayerGeneric); } } } - public override void OnTethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnTethered(Actor source, ActorTetherInfo tether) { if ((TetherID)tether.ID == TetherID.Coherence) - _tetherTarget = module.WorldState.Actors.Find(tether.Target); + _tetherTarget = WorldState.Actors.Find(tether.Target); } } diff --git a/BossMod/Modules/Endwalker/Savage/P2SHippokampos/Dissociation.cs b/BossMod/Modules/Endwalker/Savage/P2SHippokampos/Dissociation.cs index 0ceb0ec386..3b495d0985 100644 --- a/BossMod/Modules/Endwalker/Savage/P2SHippokampos/Dissociation.cs +++ b/BossMod/Modules/Endwalker/Savage/P2SHippokampos/Dissociation.cs @@ -1,14 +1,14 @@ namespace BossMod.Endwalker.Savage.P2SHippokampos; // state related to dissociation mechanic -class Dissociation : BossComponent +class Dissociation(BossModule module) : BossComponent(module) { private AOEShapeRect? _shape = new(50, 10); - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { - var head = module.Enemies(OID.DissociatedHead).FirstOrDefault(); - if (_shape == null || head == null || module.Bounds.Contains(head.Position)) + var head = Module.Enemies(OID.DissociatedHead).FirstOrDefault(); + if (_shape == null || head == null || Module.Bounds.Contains(head.Position)) return; // inactive or head not teleported yet if (_shape.Check(actor.Position, head)) @@ -17,16 +17,16 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { - var head = module.Enemies(OID.DissociatedHead).FirstOrDefault(); - if (_shape == null || head == null || module.Bounds.Contains(head.Position)) + var head = Module.Enemies(OID.DissociatedHead).FirstOrDefault(); + if (_shape == null || head == null || Module.Bounds.Contains(head.Position)) return; // inactive or head not teleported yet - _shape.Draw(arena, head); + _shape.Draw(Arena, head); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if (caster.OID == (uint)OID.DissociatedHead && (AID)spell.Action.ID == AID.DissociationAOE) _shape = null; diff --git a/BossMod/Modules/Endwalker/Savage/P2SHippokampos/KampeosHarma.cs b/BossMod/Modules/Endwalker/Savage/P2SHippokampos/KampeosHarma.cs index 96a729d12d..a4cbcdf97a 100644 --- a/BossMod/Modules/Endwalker/Savage/P2SHippokampos/KampeosHarma.cs +++ b/BossMod/Modules/Endwalker/Savage/P2SHippokampos/KampeosHarma.cs @@ -2,68 +2,71 @@ // state related to kampeos harma mechanic // note that it relies on waymarks to determine safe spots... -class KampeosHarma : Components.CastCounter +class KampeosHarma(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.KampeosHarmaChargeBoss)) { private WDir _startingOffset; private int[] _playerOrder = new int[8]; // 0 if unknown, then sq1 sq2 sq3 sq4 tri1 tri2 tri3 tri4 - public KampeosHarma() : base(ActionID.MakeSpell(AID.KampeosHarmaChargeBoss)) { } - - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { - var safePos = GetSafeZone(module, slot); + var safePos = GetSafeZone(slot); if (safePos != null && !actor.Position.InCircle(safePos.Value, 2)) { hints.Add("Go to safe zone!"); - if (movementHints != null) - { - movementHints.Add(actor.Position, safePos.Value, ArenaColor.Danger); - } } } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void AddMovementHints(int slot, Actor actor, MovementHints movementHints) + { + var safePos = GetSafeZone(slot); + if (safePos != null && !actor.Position.InCircle(safePos.Value, 2)) + { + movementHints.Add(actor.Position, safePos.Value, ArenaColor.Danger); + } + } + + public override void DrawArenaForeground(int pcSlot, Actor pc) { - var pos = GetSafeZone(module, pcSlot); + var pos = GetSafeZone(pcSlot); if (pos != null) - arena.AddCircle(pos.Value, 1, ArenaColor.Safe); + Arena.AddCircle(pos.Value, 1, ArenaColor.Safe); } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID >= 145 && iconID <= 152) { - _startingOffset = module.PrimaryActor.Position - module.Bounds.Center; + _startingOffset = Module.PrimaryActor.Position - Module.Bounds.Center; - int slot = module.Raid.FindSlot(actor.InstanceID); + int slot = Raid.FindSlot(actor.InstanceID); if (slot >= 0) _playerOrder[slot] = (int)(iconID - 144); } } - private WPos? GetSafeZone(BossModule module, int slot) + private WPos? GetSafeZone(int slot) { switch (slot >= 0 ? _playerOrder[slot] : 0) { case 1: // sq 1 - opposite corner, hide after first charge - return module.Bounds.Center + (NumCasts < 1 ? -1.2f : -1.4f) * _startingOffset; + return Module.Bounds.Center + (NumCasts < 1 ? -1.2f : -1.4f) * _startingOffset; case 2: // sq 2 - same corner, hide after second charge - return module.Bounds.Center + (NumCasts < 2 ? +1.2f : +1.4f) * _startingOffset; + return Module.Bounds.Center + (NumCasts < 2 ? +1.2f : +1.4f) * _startingOffset; case 3: // sq 3 - opposite corner, hide before first charge - return module.Bounds.Center + (NumCasts < 1 ? -1.4f : -1.2f) * _startingOffset; + return Module.Bounds.Center + (NumCasts < 1 ? -1.4f : -1.2f) * _startingOffset; case 4: // sq 4 - same corner, hide before second charge - return module.Bounds.Center + (NumCasts < 2 ? +1.4f : +1.2f) * _startingOffset; + return Module.Bounds.Center + (NumCasts < 2 ? +1.4f : +1.2f) * _startingOffset; case 5: // tri 1 - waymark 1 - var wm1 = module.WorldState.Waymarks[Waymark.N1]; + var wm1 = WorldState.Waymarks[Waymark.N1]; return wm1 != null ? new(wm1.Value.XZ()) : null; case 6: // tri 2 - waymark 2 - var wm2 = module.WorldState.Waymarks[Waymark.N2]; + var wm2 = WorldState.Waymarks[Waymark.N2]; return wm2 != null ? new(wm2.Value.XZ()) : null; case 7: // tri 3 - waymark 3 - var wm3 = module.WorldState.Waymarks[Waymark.N3]; + var wm3 = WorldState.Waymarks[Waymark.N3]; return wm3 != null ? new(wm3.Value.XZ()) : null; case 8: // tri 4 - waymark 4 - var wm4 = module.WorldState.Waymarks[Waymark.N4]; + var wm4 = WorldState.Waymarks[Waymark.N4]; return wm4 != null ? new(wm4.Value.XZ()) : null; } return null; diff --git a/BossMod/Modules/Endwalker/Savage/P2SHippokampos/OminousBubbling.cs b/BossMod/Modules/Endwalker/Savage/P2SHippokampos/OminousBubbling.cs index a8b23770f3..f2acb8239b 100644 --- a/BossMod/Modules/Endwalker/Savage/P2SHippokampos/OminousBubbling.cs +++ b/BossMod/Modules/Endwalker/Savage/P2SHippokampos/OminousBubbling.cs @@ -1,32 +1,30 @@ namespace BossMod.Endwalker.Savage.P2SHippokampos; -class OminousBubbling : Components.CastCounter +class OminousBubbling(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.OminousBubblingAOE)) { private static readonly float _radius = 6; - public OminousBubbling() : base(ActionID.MakeSpell(AID.OminousBubblingAOE)) { } - - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { - int healersInRange = module.Raid.WithoutSlot().Where(a => a.Role == Role.Healer).InRadius(actor.Position, _radius).Count(); + int healersInRange = Raid.WithoutSlot().Where(a => a.Role == Role.Healer).InRadius(actor.Position, _radius).Count(); if (healersInRange > 1) hints.Add("Hit by two aoes!"); else if (healersInRange == 0) hints.Add("Stack with healer!"); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - foreach (var player in module.Raid.WithoutSlot()) + foreach (var player in Raid.WithoutSlot()) { if (player.Role == Role.Healer) { - arena.Actor(player, ArenaColor.Danger); - arena.AddCircle(player.Position, _radius, ArenaColor.Danger); + Arena.Actor(player, ArenaColor.Danger); + Arena.AddCircle(player.Position, _radius, ArenaColor.Danger); } else { - arena.Actor(player, ArenaColor.PlayerGeneric); + Arena.Actor(player, ArenaColor.PlayerGeneric); } } } diff --git a/BossMod/Modules/Endwalker/Savage/P2SHippokampos/P2S.cs b/BossMod/Modules/Endwalker/Savage/P2SHippokampos/P2S.cs index 0001a13386..d9fa5a7d81 100644 --- a/BossMod/Modules/Endwalker/Savage/P2SHippokampos/P2S.cs +++ b/BossMod/Modules/Endwalker/Savage/P2SHippokampos/P2S.cs @@ -1,23 +1,10 @@ namespace BossMod.Endwalker.Savage.P2SHippokampos; -class DoubledImpact : Components.CastSharedTankbuster -{ - public DoubledImpact() : base(ActionID.MakeSpell(AID.DoubledImpact), 6) { } -} - -class SewageEruption : Components.LocationTargetedAOEs -{ - public SewageEruption() : base(ActionID.MakeSpell(AID.SewageEruptionAOE), 6) { } -} +class DoubledImpact(BossModule module) : Components.CastSharedTankbuster(module, ActionID.MakeSpell(AID.DoubledImpact), 6); +class SewageEruption(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.SewageEruptionAOE), 6); [ConfigDisplay(Order = 0x120, Parent = typeof(EndwalkerConfig))] -public class P2SConfig : CooldownPlanningConfigNode -{ - public P2SConfig() : base(90) { } -} +public class P2SConfig() : CooldownPlanningConfigNode(90); [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 811, NameID = 10348)] -public class P2S : BossModule -{ - public P2S(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsSquare(new(100, 100), 20)) { } -} +public class P2S(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsSquare(new(100, 100), 20)); diff --git a/BossMod/Modules/Endwalker/Savage/P2SHippokampos/PredatoryAvarice.cs b/BossMod/Modules/Endwalker/Savage/P2SHippokampos/PredatoryAvarice.cs index 61003f3a72..d8085da53e 100644 --- a/BossMod/Modules/Endwalker/Savage/P2SHippokampos/PredatoryAvarice.cs +++ b/BossMod/Modules/Endwalker/Savage/P2SHippokampos/PredatoryAvarice.cs @@ -1,7 +1,7 @@ namespace BossMod.Endwalker.Savage.P2SHippokampos; // state related to predatory avarice mechanic -class PredatoryAvarice : BossComponent +class PredatoryAvarice(BossModule module) : BossComponent(module) { private BitMask _playersWithTides; private BitMask _playersWithDepths; @@ -13,33 +13,33 @@ class PredatoryAvarice : BossComponent public bool Active => (_playersWithTides | _playersWithDepths).Any(); - public override void Update(BossModule module) + public override void Update() { _playersInTides = _playersInDepths = new(); if (!Active) return; - foreach ((int i, var player) in module.Raid.WithSlot()) + foreach ((int i, var player) in Raid.WithSlot()) { if (_playersWithTides[i]) { - _playersInTides |= module.Raid.WithSlot().InRadiusExcluding(player, _tidesRadius).Mask(); + _playersInTides |= Raid.WithSlot().InRadiusExcluding(player, _tidesRadius).Mask(); } else if (_playersWithDepths[i]) { - _playersInDepths |= module.Raid.WithSlot().InRadiusExcluding(player, _depthsRadius).Mask(); + _playersInDepths |= Raid.WithSlot().InRadiusExcluding(player, _depthsRadius).Mask(); } } } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (!Active) return; if (_playersWithTides[slot]) { - if (module.Raid.WithoutSlot().InRadiusExcluding(actor, _tidesRadius).Any()) + if (Raid.WithoutSlot().InRadiusExcluding(actor, _tidesRadius).Any()) { hints.Add("GTFO from raid!"); } @@ -61,58 +61,58 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (!Active) return; bool pcHasTides = _playersWithTides[pcSlot]; bool pcHasDepths = _playersWithDepths[pcSlot]; - foreach ((int i, var actor) in module.Raid.WithSlot()) + foreach ((int i, var actor) in Raid.WithSlot()) { if (_playersWithTides[i]) { // tides are always drawn - arena.AddCircle(actor.Position, _tidesRadius, ArenaColor.Danger); - arena.Actor(actor, ArenaColor.Danger); + Arena.AddCircle(actor.Position, _tidesRadius, ArenaColor.Danger); + Arena.Actor(actor, ArenaColor.Danger); } else if (_playersWithDepths[i] && !pcHasTides) { // depths are drawn only if pc has no tides - otherwise it is to be considered a generic player - arena.AddCircle(actor.Position, _tidesRadius, ArenaColor.Safe); - arena.Actor(actor, ArenaColor.Danger); + Arena.AddCircle(actor.Position, _tidesRadius, ArenaColor.Safe); + Arena.Actor(actor, ArenaColor.Danger); } else if (pcHasTides || pcHasDepths) { // other players are only drawn if pc has some debuff bool playerInteresting = pcHasTides ? _playersInTides[i] : _playersInDepths[i]; - arena.Actor(actor.Position, actor.Rotation, playerInteresting ? ArenaColor.PlayerInteresting : ArenaColor.PlayerGeneric); + Arena.Actor(actor.Position, actor.Rotation, playerInteresting ? ArenaColor.PlayerInteresting : ArenaColor.PlayerGeneric); } } } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { switch ((SID)status.ID) { case SID.MarkOfTides: - _playersWithTides.Set(module.Raid.FindSlot(actor.InstanceID)); + _playersWithTides.Set(Raid.FindSlot(actor.InstanceID)); break; case SID.MarkOfDepths: - _playersWithDepths.Set(module.Raid.FindSlot(actor.InstanceID)); + _playersWithDepths.Set(Raid.FindSlot(actor.InstanceID)); break; } } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { switch ((SID)status.ID) { case SID.MarkOfTides: - _playersWithTides.Clear(module.Raid.FindSlot(actor.InstanceID)); + _playersWithTides.Clear(Raid.FindSlot(actor.InstanceID)); break; case SID.MarkOfDepths: - _playersWithDepths.Clear(module.Raid.FindSlot(actor.InstanceID)); + _playersWithDepths.Clear(Raid.FindSlot(actor.InstanceID)); break; } } diff --git a/BossMod/Modules/Endwalker/Savage/P2SHippokampos/SewageDeluge.cs b/BossMod/Modules/Endwalker/Savage/P2SHippokampos/SewageDeluge.cs index 144d58d81c..5cb55756fe 100644 --- a/BossMod/Modules/Endwalker/Savage/P2SHippokampos/SewageDeluge.cs +++ b/BossMod/Modules/Endwalker/Savage/P2SHippokampos/SewageDeluge.cs @@ -1,7 +1,7 @@ namespace BossMod.Endwalker.Savage.P2SHippokampos; // state related to sewage deluge mechanic -class SewageDeluge : BossComponent +class SewageDeluge(BossModule module) : BossComponent(module) { public enum Corner { None, NW, NE, SW, SE } @@ -17,73 +17,73 @@ public enum Corner { None, NW, NE, SW, SE } private static readonly WDir[] _corners = { new(), new(-1, -1), new(1, -1), new(-1, 1), new(1, 1) }; - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { if (_blockedCorner == Corner.None) return; // central area + H additionals - arena.ZoneRect(module.Bounds.Center, new WDir( 1, 0), _connectInner, _connectInner, _cornerInner, ArenaColor.AOE); + Arena.ZoneRect(Module.Bounds.Center, new WDir( 1, 0), _connectInner, _connectInner, _cornerInner, ArenaColor.AOE); // central V additionals - arena.ZoneRect(module.Bounds.Center, new WDir(0, 1), _connectInner, -_cornerInner, _cornerInner, ArenaColor.AOE); - arena.ZoneRect(module.Bounds.Center, new WDir(0, -1), _connectInner, -_cornerInner, _cornerInner, ArenaColor.AOE); + Arena.ZoneRect(Module.Bounds.Center, new WDir(0, 1), _connectInner, -_cornerInner, _cornerInner, ArenaColor.AOE); + Arena.ZoneRect(Module.Bounds.Center, new WDir(0, -1), _connectInner, -_cornerInner, _cornerInner, ArenaColor.AOE); // outer additionals - arena.ZoneRect(module.Bounds.Center, new WDir( 1, 0), _cornerOuter, -_connectOuter, _cornerInner, ArenaColor.AOE); - arena.ZoneRect(module.Bounds.Center, new WDir(-1, 0), _cornerOuter, -_connectOuter, _cornerInner, ArenaColor.AOE); - arena.ZoneRect(module.Bounds.Center, new WDir(0, 1), _cornerOuter, -_connectOuter, _cornerInner, ArenaColor.AOE); - arena.ZoneRect(module.Bounds.Center, new WDir(0, -1), _cornerOuter, -_connectOuter, _cornerInner, ArenaColor.AOE); + Arena.ZoneRect(Module.Bounds.Center, new WDir( 1, 0), _cornerOuter, -_connectOuter, _cornerInner, ArenaColor.AOE); + Arena.ZoneRect(Module.Bounds.Center, new WDir(-1, 0), _cornerOuter, -_connectOuter, _cornerInner, ArenaColor.AOE); + Arena.ZoneRect(Module.Bounds.Center, new WDir(0, 1), _cornerOuter, -_connectOuter, _cornerInner, ArenaColor.AOE); + Arena.ZoneRect(Module.Bounds.Center, new WDir(0, -1), _cornerOuter, -_connectOuter, _cornerInner, ArenaColor.AOE); // outer area - arena.ZoneRect(module.Bounds.Center, new WDir( 1, 0), module.Bounds.HalfSize, -_cornerOuter, module.Bounds.HalfSize, ArenaColor.AOE); - arena.ZoneRect(module.Bounds.Center, new WDir(-1, 0), module.Bounds.HalfSize, -_cornerOuter, module.Bounds.HalfSize, ArenaColor.AOE); - arena.ZoneRect(module.Bounds.Center, new WDir(0, 1), module.Bounds.HalfSize, -_cornerOuter, _cornerOuter, ArenaColor.AOE); - arena.ZoneRect(module.Bounds.Center, new WDir(0, -1), module.Bounds.HalfSize, -_cornerOuter, _cornerOuter, ArenaColor.AOE); + Arena.ZoneRect(Module.Bounds.Center, new WDir( 1, 0), Module.Bounds.HalfSize, -_cornerOuter, Module.Bounds.HalfSize, ArenaColor.AOE); + Arena.ZoneRect(Module.Bounds.Center, new WDir(-1, 0), Module.Bounds.HalfSize, -_cornerOuter, Module.Bounds.HalfSize, ArenaColor.AOE); + Arena.ZoneRect(Module.Bounds.Center, new WDir(0, 1), Module.Bounds.HalfSize, -_cornerOuter, _cornerOuter, ArenaColor.AOE); + Arena.ZoneRect(Module.Bounds.Center, new WDir(0, -1), Module.Bounds.HalfSize, -_cornerOuter, _cornerOuter, ArenaColor.AOE); - var corner = module.Bounds.Center + _corners[(int)_blockedCorner] * _offsetCorner; - arena.ZoneRect(corner, new WDir(1, 0), _cornerHalfSize, _cornerHalfSize, _cornerHalfSize, ArenaColor.AOE); + var corner = Module.Bounds.Center + _corners[(int)_blockedCorner] * _offsetCorner; + Arena.ZoneRect(corner, new WDir(1, 0), _cornerHalfSize, _cornerHalfSize, _cornerHalfSize, ArenaColor.AOE); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { // inner border - arena.PathLineTo(module.Bounds.Center + new WDir(-_cornerInner, -_cornerInner)); - arena.PathLineTo(module.Bounds.Center + new WDir(-_cornerInner, -_connectInner)); - arena.PathLineTo(module.Bounds.Center + new WDir(+_cornerInner, -_connectInner)); - arena.PathLineTo(module.Bounds.Center + new WDir(+_cornerInner, -_cornerInner)); - arena.PathLineTo(module.Bounds.Center + new WDir(+_connectInner, -_cornerInner)); - arena.PathLineTo(module.Bounds.Center + new WDir(+_connectInner, +_cornerInner)); - arena.PathLineTo(module.Bounds.Center + new WDir(+_cornerInner, +_cornerInner)); - arena.PathLineTo(module.Bounds.Center + new WDir(+_cornerInner, +_connectInner)); - arena.PathLineTo(module.Bounds.Center + new WDir(-_cornerInner, +_connectInner)); - arena.PathLineTo(module.Bounds.Center + new WDir(-_cornerInner, +_cornerInner)); - arena.PathLineTo(module.Bounds.Center + new WDir(-_connectInner, +_cornerInner)); - arena.PathLineTo(module.Bounds.Center + new WDir(-_connectInner, -_cornerInner)); - arena.PathStroke(true, ArenaColor.Border); + Arena.PathLineTo(Module.Bounds.Center + new WDir(-_cornerInner, -_cornerInner)); + Arena.PathLineTo(Module.Bounds.Center + new WDir(-_cornerInner, -_connectInner)); + Arena.PathLineTo(Module.Bounds.Center + new WDir(+_cornerInner, -_connectInner)); + Arena.PathLineTo(Module.Bounds.Center + new WDir(+_cornerInner, -_cornerInner)); + Arena.PathLineTo(Module.Bounds.Center + new WDir(+_connectInner, -_cornerInner)); + Arena.PathLineTo(Module.Bounds.Center + new WDir(+_connectInner, +_cornerInner)); + Arena.PathLineTo(Module.Bounds.Center + new WDir(+_cornerInner, +_cornerInner)); + Arena.PathLineTo(Module.Bounds.Center + new WDir(+_cornerInner, +_connectInner)); + Arena.PathLineTo(Module.Bounds.Center + new WDir(-_cornerInner, +_connectInner)); + Arena.PathLineTo(Module.Bounds.Center + new WDir(-_cornerInner, +_cornerInner)); + Arena.PathLineTo(Module.Bounds.Center + new WDir(-_connectInner, +_cornerInner)); + Arena.PathLineTo(Module.Bounds.Center + new WDir(-_connectInner, -_cornerInner)); + Arena.PathStroke(true, ArenaColor.Border); // outer border - arena.PathLineTo(module.Bounds.Center + new WDir(-_cornerOuter, -_cornerOuter)); - arena.PathLineTo(module.Bounds.Center + new WDir(-_cornerInner, -_cornerOuter)); - arena.PathLineTo(module.Bounds.Center + new WDir(-_cornerInner, -_connectOuter)); - arena.PathLineTo(module.Bounds.Center + new WDir(+_cornerInner, -_connectOuter)); - arena.PathLineTo(module.Bounds.Center + new WDir(+_cornerInner, -_cornerOuter)); - arena.PathLineTo(module.Bounds.Center + new WDir(+_cornerOuter, -_cornerOuter)); - arena.PathLineTo(module.Bounds.Center + new WDir(+_cornerOuter, -_cornerInner)); - arena.PathLineTo(module.Bounds.Center + new WDir(+_connectOuter, -_cornerInner)); - arena.PathLineTo(module.Bounds.Center + new WDir(+_connectOuter, +_cornerInner)); - arena.PathLineTo(module.Bounds.Center + new WDir(+_cornerOuter, +_cornerInner)); - arena.PathLineTo(module.Bounds.Center + new WDir(+_cornerOuter, +_cornerOuter)); - arena.PathLineTo(module.Bounds.Center + new WDir(+_cornerInner, +_cornerOuter)); - arena.PathLineTo(module.Bounds.Center + new WDir(+_cornerInner, +_connectOuter)); - arena.PathLineTo(module.Bounds.Center + new WDir(-_cornerInner, +_connectOuter)); - arena.PathLineTo(module.Bounds.Center + new WDir(-_cornerInner, +_cornerOuter)); - arena.PathLineTo(module.Bounds.Center + new WDir(-_cornerOuter, +_cornerOuter)); - arena.PathLineTo(module.Bounds.Center + new WDir(-_cornerOuter, +_cornerInner)); - arena.PathLineTo(module.Bounds.Center + new WDir(-_connectOuter, +_cornerInner)); - arena.PathLineTo(module.Bounds.Center + new WDir(-_connectOuter, -_cornerInner)); - arena.PathLineTo(module.Bounds.Center + new WDir(-_cornerOuter, -_cornerInner)); - arena.PathStroke(true, ArenaColor.Border); + Arena.PathLineTo(Module.Bounds.Center + new WDir(-_cornerOuter, -_cornerOuter)); + Arena.PathLineTo(Module.Bounds.Center + new WDir(-_cornerInner, -_cornerOuter)); + Arena.PathLineTo(Module.Bounds.Center + new WDir(-_cornerInner, -_connectOuter)); + Arena.PathLineTo(Module.Bounds.Center + new WDir(+_cornerInner, -_connectOuter)); + Arena.PathLineTo(Module.Bounds.Center + new WDir(+_cornerInner, -_cornerOuter)); + Arena.PathLineTo(Module.Bounds.Center + new WDir(+_cornerOuter, -_cornerOuter)); + Arena.PathLineTo(Module.Bounds.Center + new WDir(+_cornerOuter, -_cornerInner)); + Arena.PathLineTo(Module.Bounds.Center + new WDir(+_connectOuter, -_cornerInner)); + Arena.PathLineTo(Module.Bounds.Center + new WDir(+_connectOuter, +_cornerInner)); + Arena.PathLineTo(Module.Bounds.Center + new WDir(+_cornerOuter, +_cornerInner)); + Arena.PathLineTo(Module.Bounds.Center + new WDir(+_cornerOuter, +_cornerOuter)); + Arena.PathLineTo(Module.Bounds.Center + new WDir(+_cornerInner, +_cornerOuter)); + Arena.PathLineTo(Module.Bounds.Center + new WDir(+_cornerInner, +_connectOuter)); + Arena.PathLineTo(Module.Bounds.Center + new WDir(-_cornerInner, +_connectOuter)); + Arena.PathLineTo(Module.Bounds.Center + new WDir(-_cornerInner, +_cornerOuter)); + Arena.PathLineTo(Module.Bounds.Center + new WDir(-_cornerOuter, +_cornerOuter)); + Arena.PathLineTo(Module.Bounds.Center + new WDir(-_cornerOuter, +_cornerInner)); + Arena.PathLineTo(Module.Bounds.Center + new WDir(-_connectOuter, +_cornerInner)); + Arena.PathLineTo(Module.Bounds.Center + new WDir(-_connectOuter, -_cornerInner)); + Arena.PathLineTo(Module.Bounds.Center + new WDir(-_cornerOuter, -_cornerInner)); + Arena.PathStroke(true, ArenaColor.Border); } - public override void OnEventEnvControl(BossModule module, byte index, uint state) + public override void OnEventEnvControl(byte index, uint state) { // 800375A2: we typically get two events for index=0 (global) and index=N (corner) // state 00200010 - "prepare" (show aoe that is still harmless) diff --git a/BossMod/Modules/Endwalker/Savage/P2SHippokampos/TaintedFlood.cs b/BossMod/Modules/Endwalker/Savage/P2SHippokampos/TaintedFlood.cs index 5f70d15913..e77a74df0d 100644 --- a/BossMod/Modules/Endwalker/Savage/P2SHippokampos/TaintedFlood.cs +++ b/BossMod/Modules/Endwalker/Savage/P2SHippokampos/TaintedFlood.cs @@ -7,18 +7,16 @@ class TaintedFlood : Components.CastCounter private static readonly float _radius = 6; - public TaintedFlood() : base(ActionID.MakeSpell(AID.TaintedFloodAOE)) { } - - public override void Init(BossModule module) + public TaintedFlood(BossModule module) : base(module, ActionID.MakeSpell(AID.TaintedFloodAOE)) { var flow = module.FindComponent(); if (flow != null) { - _ignoredTargets = module.Raid.WithSlot().WhereSlot(s => flow.SlotActive(module, s)).Mask(); + _ignoredTargets = Raid.WithSlot().WhereSlot(flow.SlotActive).Mask(); } } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (NumCasts > 0) return; @@ -26,35 +24,35 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint if (_ignoredTargets[slot]) { // player is not a target of flood, so just make sure he is not clipped by others - if (module.Raid.WithSlot().ExcludedFromMask(_ignoredTargets).InRadius(actor.Position, _radius).Any()) + if (Raid.WithSlot().ExcludedFromMask(_ignoredTargets).InRadius(actor.Position, _radius).Any()) hints.Add("GTFO from flood!"); } else { // player is target of flood => make sure no one is in range - if (module.Raid.WithoutSlot().InRadiusExcluding(actor, _radius).Any()) + if (Raid.WithoutSlot().InRadiusExcluding(actor, _radius).Any()) hints.Add("Spread!"); } } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (NumCasts > 0) return; if (_ignoredTargets[pcSlot]) { - foreach ((_, var actor) in module.Raid.WithSlot().ExcludedFromMask(_ignoredTargets)) + foreach ((_, var actor) in Raid.WithSlot().ExcludedFromMask(_ignoredTargets)) { - arena.Actor(actor, ArenaColor.Danger); - arena.AddCircle(actor.Position, _radius, ArenaColor.Danger); + Arena.Actor(actor, ArenaColor.Danger); + Arena.AddCircle(actor.Position, _radius, ArenaColor.Danger); } } else { - arena.AddCircle(pc.Position, _radius, ArenaColor.Danger); - foreach (var player in module.Raid.WithoutSlot().Exclude(pc)) - arena.Actor(player, player.Position.InCircle(pc.Position, _radius) ? ArenaColor.PlayerInteresting : ArenaColor.PlayerGeneric); + Arena.AddCircle(pc.Position, _radius, ArenaColor.Danger); + foreach (var player in Raid.WithoutSlot().Exclude(pc)) + Arena.Actor(player, player.Position.InCircle(pc.Position, _radius) ? ArenaColor.PlayerInteresting : ArenaColor.PlayerGeneric); } } } diff --git a/BossMod/Modules/Endwalker/Savage/P3SPhoinix/Ashplume.cs b/BossMod/Modules/Endwalker/Savage/P3SPhoinix/Ashplume.cs index 1a03a598da..21076be1bc 100644 --- a/BossMod/Modules/Endwalker/Savage/P3SPhoinix/Ashplume.cs +++ b/BossMod/Modules/Endwalker/Savage/P3SPhoinix/Ashplume.cs @@ -12,9 +12,9 @@ public enum State { UnknownGlory, Stack, Spread, Done } private static readonly float _stackRadius = 8; private static readonly float _spreadRadius = 6; - public override void Init(BossModule module) + public Ashplume(BossModule module) : base(module) { - CurState = (AID)(module.PrimaryActor.CastInfo?.Action.ID ?? 0) switch + CurState = (AID)(Module.PrimaryActor.CastInfo?.Action.ID ?? 0) switch { AID.ExperimentalAshplumeStack => State.Stack, AID.ExperimentalAshplumeSpread => State.Spread, @@ -22,10 +22,10 @@ public override void Init(BossModule module) _ => State.Done }; if (CurState == State.Done) - module.ReportError(this, $"Failed to initialize ashplume component, unexpected cast {module.PrimaryActor.CastInfo?.Action}"); + ReportError($"Failed to initialize ashplume component, unexpected cast {Module.PrimaryActor.CastInfo?.Action}"); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (CurState == State.Stack) { @@ -33,7 +33,7 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint int numStacked = 0; bool haveTanks = actor.Role == Role.Tank; bool haveHealers = actor.Role == Role.Healer; - foreach (var pair in module.Raid.WithoutSlot().InRadiusExcluding(actor, _stackRadius)) + foreach (var pair in Raid.WithoutSlot().InRadiusExcluding(actor, _stackRadius)) { ++numStacked; haveTanks |= pair.Role == Role.Tank; @@ -50,14 +50,14 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } else if (CurState == State.Spread) { - if (module.Raid.WithoutSlot().InRadiusExcluding(actor, _spreadRadius).Any()) + if (Raid.WithoutSlot().InRadiusExcluding(actor, _spreadRadius).Any()) { hints.Add("Spread!"); } } } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (CurState == State.Stack) hints.Add("Stack!"); @@ -65,23 +65,23 @@ public override void AddGlobalHints(BossModule module, GlobalHints hints) hints.Add("Spread!"); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (CurState == State.UnknownGlory || CurState == State.Done) return; // draw all raid members, to simplify positioning float aoeRadius = CurState == State.Stack ? _stackRadius : _spreadRadius; - foreach (var player in module.Raid.WithoutSlot().Exclude(pc)) + foreach (var player in Raid.WithoutSlot().Exclude(pc)) { - arena.Actor(player, player.Position.InCircle(pc.Position, aoeRadius) ? ArenaColor.PlayerInteresting : ArenaColor.PlayerGeneric); + Arena.Actor(player, player.Position.InCircle(pc.Position, aoeRadius) ? ArenaColor.PlayerInteresting : ArenaColor.PlayerGeneric); } // draw circle around pc - arena.AddCircle(pc.Position, aoeRadius, ArenaColor.Danger); + Arena.AddCircle(pc.Position, aoeRadius, ArenaColor.Danger); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { diff --git a/BossMod/Modules/Endwalker/Savage/P3SPhoinix/BirdDistance.cs b/BossMod/Modules/Endwalker/Savage/P3SPhoinix/BirdDistance.cs index eaee4423c3..da74f0d911 100644 --- a/BossMod/Modules/Endwalker/Savage/P3SPhoinix/BirdDistance.cs +++ b/BossMod/Modules/Endwalker/Savage/P3SPhoinix/BirdDistance.cs @@ -4,22 +4,17 @@ // when small birds die and large birds appear, they cast 26328, and if it hits any other large bird, they buff // when large birds die and sparkfledgeds appear, they cast 26329, and if it hits any other sparkfledged, they wipe the raid or something // so we show range helper for dead birds -class BirdDistance : BossComponent +class BirdDistance(BossModule module, OID watchedBirdsID) : BossComponent(module) { - private OID _watchedBirdsID; + private OID _watchedBirdsID = watchedBirdsID; private BitMask _birdsAtRisk; private static readonly float _radius = 13; - public BirdDistance(OID watchedBirdsID) - { - _watchedBirdsID = watchedBirdsID; - } - - public override void Update(BossModule module) + public override void Update() { _birdsAtRisk.Reset(); - var watchedBirds = module.Enemies(_watchedBirdsID); + var watchedBirds = Module.Enemies(_watchedBirdsID); for (int i = 0; i < watchedBirds.Count; ++i) { var bird = watchedBirds[i]; @@ -30,9 +25,9 @@ public override void Update(BossModule module) } } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { - var watchedBirds = module.Enemies(_watchedBirdsID); + var watchedBirds = Module.Enemies(_watchedBirdsID); for (int i = 0; i < watchedBirds.Count; ++i) { var bird = watchedBirds[i]; @@ -44,31 +39,24 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { // draw alive birds tanked by PC and circles around dead birds - var watchedBirds = module.Enemies(_watchedBirdsID); + var watchedBirds = Module.Enemies(_watchedBirdsID); for (int i = 0; i < watchedBirds.Count; ++i) { var bird = watchedBirds[i]; if (bird.IsDead) { - arena.AddCircle(bird.Position, _radius, ArenaColor.Danger); + Arena.AddCircle(bird.Position, _radius, ArenaColor.Danger); } else if (bird.TargetID == pc.InstanceID) { - arena.Actor(bird, _birdsAtRisk[i] ? ArenaColor.Enemy : ArenaColor.PlayerGeneric); + Arena.Actor(bird, _birdsAtRisk[i] ? ArenaColor.Enemy : ArenaColor.PlayerGeneric); } } } } -class SmallBirdDistance : BirdDistance -{ - public SmallBirdDistance() : base(OID.SunbirdSmall) { } -} - -class LargeBirdDistance : BirdDistance -{ - public LargeBirdDistance() : base(OID.SunbirdLarge) { } -} +class SmallBirdDistance(BossModule module) : BirdDistance(module, OID.SunbirdSmall); +class LargeBirdDistance(BossModule module) : BirdDistance(module, OID.SunbirdLarge); diff --git a/BossMod/Modules/Endwalker/Savage/P3SPhoinix/BirdTether.cs b/BossMod/Modules/Endwalker/Savage/P3SPhoinix/BirdTether.cs index a6fd115490..fd019d2aeb 100644 --- a/BossMod/Modules/Endwalker/Savage/P3SPhoinix/BirdTether.cs +++ b/BossMod/Modules/Endwalker/Savage/P3SPhoinix/BirdTether.cs @@ -2,7 +2,7 @@ // state related to large bird tethers // TODO: simplify and make more robust, e.g. in case something goes wrong and bird dies without tether update -class BirdTether : BossComponent +class BirdTether(BossModule module) : BossComponent(module) { public int NumFinishedChains { get; private set; } = 0; private (Actor?, Actor?, int)[] _chains = new (Actor?, Actor?, int)[4]; // actor1, actor2, num-charges @@ -11,10 +11,10 @@ class BirdTether : BossComponent private static readonly float _chargeHalfWidth = 3; private static readonly float _chargeMinSafeDistance = 30; - public override void Update(BossModule module) + public override void Update() { _playersInAOE.Reset(); - var birdsLarge = module.Enemies(OID.SunbirdLarge); + var birdsLarge = Module.Enemies(OID.SunbirdLarge); for (int i = 0; i < Math.Min(birdsLarge.Count, _chains.Length); ++i) { if (_chains[i].Item3 == 2) @@ -23,11 +23,11 @@ public override void Update(BossModule module) var bird = birdsLarge[i]; if (_chains[i].Item1 == null && bird.Tether.Target != 0) { - _chains[i].Item1 = module.WorldState.Actors.Find(bird.Tether.Target); // first target found + _chains[i].Item1 = WorldState.Actors.Find(bird.Tether.Target); // first target found } if (_chains[i].Item2 == null && (_chains[i].Item1?.Tether.Target ?? 0) != 0) { - _chains[i].Item2 = module.WorldState.Actors.Find(_chains[i].Item1!.Tether.Target); // second target found + _chains[i].Item2 = WorldState.Actors.Find(_chains[i].Item1!.Tether.Target); // second target found } if (_chains[i].Item3 == 0 && _chains[i].Item1 != null && bird.Tether.Target == 0) { @@ -47,7 +47,7 @@ public override void Update(BossModule module) var fromTo = nextTarget.Position - bird.Position; float len = fromTo.Length(); fromTo /= len; - foreach ((int j, var player) in module.Raid.WithSlot().Exclude(nextTarget)) + foreach ((int j, var player) in Raid.WithSlot().Exclude(nextTarget)) { if (player.Position.InRect(bird.Position, fromTo, len, 0, _chargeHalfWidth)) { @@ -58,9 +58,9 @@ public override void Update(BossModule module) } } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { - var birdsLarge = module.Enemies(OID.SunbirdLarge); + var birdsLarge = Module.Enemies(OID.SunbirdLarge); foreach ((var bird, (var p1, var p2, int numCharges)) in birdsLarge.Zip(_chains)) { if (numCharges == 2) @@ -84,10 +84,10 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { // draw aoe zones for imminent charges, except one towards player - var birdsLarge = module.Enemies(OID.SunbirdLarge); + var birdsLarge = Module.Enemies(OID.SunbirdLarge); foreach ((var bird, (var p1, var p2, int numCharges)) in birdsLarge.Zip(_chains)) { if (numCharges == 2) @@ -98,19 +98,19 @@ public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc { var fromTo = nextTarget.Position - bird.Position; float len = fromTo.Length(); - arena.ZoneRect(bird.Position, fromTo / len, len, 0, _chargeHalfWidth, ArenaColor.AOE); + Arena.ZoneRect(bird.Position, fromTo / len, len, 0, _chargeHalfWidth, ArenaColor.AOE); } } } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { // draw all birds and all players - var birdsLarge = module.Enemies(OID.SunbirdLarge); + var birdsLarge = Module.Enemies(OID.SunbirdLarge); foreach (var bird in birdsLarge) - arena.Actor(bird, ArenaColor.Enemy); - foreach ((int i, var player) in module.Raid.WithSlot()) - arena.Actor(player, _playersInAOE[i] ? ArenaColor.PlayerInteresting : ArenaColor.PlayerGeneric); + Arena.Actor(bird, ArenaColor.Enemy); + foreach ((int i, var player) in Raid.WithSlot()) + Arena.Actor(player, _playersInAOE[i] ? ArenaColor.PlayerInteresting : ArenaColor.PlayerGeneric); // draw chains containing player foreach ((var bird, (var p1, var p2, int numCharges)) in birdsLarge.Zip(_chains)) @@ -123,16 +123,16 @@ public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc // bird -> pc -> other if (numCharges == 0) { - arena.AddLine(bird.Position, pc.Position, (bird.Tether.ID == (uint)TetherID.LargeBirdFar) ? ArenaColor.Safe : ArenaColor.Danger); + Arena.AddLine(bird.Position, pc.Position, (bird.Tether.ID == (uint)TetherID.LargeBirdFar) ? ArenaColor.Safe : ArenaColor.Danger); if (p2 != null) { - arena.AddLine(pc.Position, p2.Position, (pc.Tether.ID == (uint)TetherID.LargeBirdFar) ? ArenaColor.Safe : ArenaColor.Danger); + Arena.AddLine(pc.Position, p2.Position, (pc.Tether.ID == (uint)TetherID.LargeBirdFar) ? ArenaColor.Safe : ArenaColor.Danger); } - if (bird.Position != module.Bounds.Center) + if (bird.Position != Module.Bounds.Center) { - var safespot = bird.Position + (module.Bounds.Center - bird.Position).Normalized() * _chargeMinSafeDistance; - arena.AddCircle(safespot, 1, ArenaColor.Safe); + var safespot = bird.Position + (Module.Bounds.Center - bird.Position).Normalized() * _chargeMinSafeDistance; + Arena.AddCircle(safespot, 1, ArenaColor.Safe); } } // else: don't care, charge to pc already happened @@ -142,19 +142,19 @@ public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc // bird -> other -> pc if (numCharges == 0) { - arena.AddLine(bird.Position, p1.Position, (bird.Tether.ID == (uint)TetherID.LargeBirdFar) ? ArenaColor.Safe : ArenaColor.Danger); - arena.AddLine(p1.Position, pc.Position, (p1.Tether.ID == (uint)TetherID.LargeBirdFar) ? ArenaColor.Safe : ArenaColor.Danger); + Arena.AddLine(bird.Position, p1.Position, (bird.Tether.ID == (uint)TetherID.LargeBirdFar) ? ArenaColor.Safe : ArenaColor.Danger); + Arena.AddLine(p1.Position, pc.Position, (p1.Tether.ID == (uint)TetherID.LargeBirdFar) ? ArenaColor.Safe : ArenaColor.Danger); - arena.AddCircle(bird.Position, 1, ArenaColor.Safe); // draw safespot near bird + Arena.AddCircle(bird.Position, 1, ArenaColor.Safe); // draw safespot near bird } else { - arena.AddLine(bird.Position, pc.Position, (p1.Tether.ID == (uint)TetherID.LargeBirdFar) ? ArenaColor.Safe : ArenaColor.Danger); + Arena.AddLine(bird.Position, pc.Position, (p1.Tether.ID == (uint)TetherID.LargeBirdFar) ? ArenaColor.Safe : ArenaColor.Danger); - if (bird.Position != module.Bounds.Center) + if (bird.Position != Module.Bounds.Center) { - var safespot = bird.Position + (module.Bounds.Center - bird.Position).Normalized() * _chargeMinSafeDistance; - arena.AddCircle(safespot, 1, ArenaColor.Safe); + var safespot = bird.Position + (Module.Bounds.Center - bird.Position).Normalized() * _chargeMinSafeDistance; + Arena.AddCircle(safespot, 1, ArenaColor.Safe); } } } diff --git a/BossMod/Modules/Endwalker/Savage/P3SPhoinix/BrightenedFire.cs b/BossMod/Modules/Endwalker/Savage/P3SPhoinix/BrightenedFire.cs index b5f2a11933..8b0f64cb06 100644 --- a/BossMod/Modules/Endwalker/Savage/P3SPhoinix/BrightenedFire.cs +++ b/BossMod/Modules/Endwalker/Savage/P3SPhoinix/BrightenedFire.cs @@ -2,66 +2,64 @@ // state related to brightened fire mechanic // this helper relies on waymarks 1-4, and assumes they don't change during fight - this is of course quite an assumption, but whatever... -class BrightenedFire : Components.CastCounter +class BrightenedFire(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.BrightenedFireAOE)) { private int[] _playerOrder = new int[8]; // 0 if unknown, 1-8 otherwise private static readonly float _aoeRange = 7; - public BrightenedFire() : base(ActionID.MakeSpell(AID.BrightenedFireAOE)) { } - - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_playerOrder[slot] <= NumCasts) return; - var pos = PositionForOrder(module, _playerOrder[slot]); + var pos = PositionForOrder(_playerOrder[slot]); if (!actor.Position.InCircle(pos, 5)) { hints.Add($"Get to correct position {_playerOrder[slot]}!"); } - int numHitAdds = module.Enemies(OID.DarkenedFire).InRadius(actor.Position, _aoeRange).Count(); + int numHitAdds = Module.Enemies(OID.DarkenedFire).InRadius(actor.Position, _aoeRange).Count(); if (numHitAdds < 2) { hints.Add("Get closer to adds!"); } } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (_playerOrder[pcSlot] <= NumCasts) return; - var pos = PositionForOrder(module, _playerOrder[pcSlot]); - arena.AddCircle(pos, 1, ArenaColor.Safe); + var pos = PositionForOrder(_playerOrder[pcSlot]); + Arena.AddCircle(pos, 1, ArenaColor.Safe); // draw all adds int addIndex = 0; - foreach (var fire in module.Enemies(OID.DarkenedFire).SortedByRange(pos)) + foreach (var fire in Module.Enemies(OID.DarkenedFire).SortedByRange(pos)) { - arena.Actor(fire, addIndex++ < 2 ? ArenaColor.Danger : ArenaColor.PlayerGeneric); + Arena.Actor(fire, addIndex++ < 2 ? ArenaColor.Danger : ArenaColor.PlayerGeneric); } // draw range circle - arena.AddCircle(pc.Position, _aoeRange, ArenaColor.Danger); + Arena.AddCircle(pc.Position, _aoeRange, ArenaColor.Danger); } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID >= 268 && iconID <= 275) { - int slot = module.Raid.FindSlot(actor.InstanceID); + int slot = Raid.FindSlot(actor.InstanceID); if (slot >= 0) _playerOrder[slot] = (int)iconID - 267; } } - private WPos PositionForOrder(BossModule module, int order) + private WPos PositionForOrder(int order) { // TODO: consider how this can be improved... var markID = (Waymark)((int)Waymark.N1 + (order - 1) % 4); - var wm = module.WorldState.Waymarks[markID]; - return wm != null ? new(wm.Value.XZ()) : module.Bounds.Center; + var wm = WorldState.Waymarks[markID]; + return wm != null ? new(wm.Value.XZ()) : Module.Bounds.Center; } } diff --git a/BossMod/Modules/Endwalker/Savage/P3SPhoinix/Cinderwing.cs b/BossMod/Modules/Endwalker/Savage/P3SPhoinix/Cinderwing.cs index 86d529222a..64f93ad12e 100644 --- a/BossMod/Modules/Endwalker/Savage/P3SPhoinix/Cinderwing.cs +++ b/BossMod/Modules/Endwalker/Savage/P3SPhoinix/Cinderwing.cs @@ -5,26 +5,26 @@ class Cinderwing : BossComponent { private AOEShapeCone _aoe = new(60, 90.Degrees()); - public override void Init(BossModule module) + public Cinderwing(BossModule module) : base(module) { - _aoe.DirectionOffset = (AID)(module.PrimaryActor.CastInfo?.Action.ID ?? 0) switch + _aoe.DirectionOffset = (AID)(Module.PrimaryActor.CastInfo?.Action.ID ?? 0) switch { AID.RightCinderwing => -90.Degrees(), AID.LeftCinderwing => 90.Degrees(), _ => 0.Degrees() }; if (_aoe.DirectionOffset.Rad == 0) - module.ReportError(this, $"Failed to initialize cinderwing; unexpected boss cast {module.PrimaryActor.CastInfo?.Action}"); + ReportError($"Failed to initialize cinderwing; unexpected boss cast {Module.PrimaryActor.CastInfo?.Action}"); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { - if (_aoe.Check(actor.Position, module.PrimaryActor)) + if (_aoe.Check(actor.Position, Module.PrimaryActor)) hints.Add("GTFO from wing!"); } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { - _aoe.Draw(arena, module.PrimaryActor); + _aoe.Draw(Arena, Module.PrimaryActor); } } diff --git a/BossMod/Modules/Endwalker/Savage/P3SPhoinix/DarkblazeTwister.cs b/BossMod/Modules/Endwalker/Savage/P3SPhoinix/DarkblazeTwister.cs index 391c51a1e5..2bf1a02c05 100644 --- a/BossMod/Modules/Endwalker/Savage/P3SPhoinix/DarkblazeTwister.cs +++ b/BossMod/Modules/Endwalker/Savage/P3SPhoinix/DarkblazeTwister.cs @@ -1,25 +1,25 @@ namespace BossMod.Endwalker.Savage.P3SPhoinix; // state related to darkblaze twister mechanics -class DarkblazeTwister : BossComponent +class DarkblazeTwister(BossModule module) : BossComponent(module) { private static readonly float _knockbackRange = 17; private static readonly float _aoeInnerRadius = 5; private static readonly float _aoeMiddleRadius = 7; private static readonly float _aoeOuterRadius = 20; - public IEnumerable BurningTwisters(BossModule module) => module.Enemies(OID.DarkblazeTwister).Where(twister => twister.CastInfo?.IsSpell(AID.BurningTwister) ?? false); - public Actor? DarkTwister(BossModule module) => module.Enemies(OID.DarkblazeTwister).FirstOrDefault(twister => twister.CastInfo?.IsSpell(AID.DarkTwister) ?? false); + public IEnumerable BurningTwisters() => Module.Enemies(OID.DarkblazeTwister).Where(twister => twister.CastInfo?.IsSpell(AID.BurningTwister) ?? false); + public Actor? DarkTwister() => Module.Enemies(OID.DarkblazeTwister).FirstOrDefault(twister => twister.CastInfo?.IsSpell(AID.DarkTwister) ?? false); - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { - var adjPos = Components.Knockback.AwayFromSource(actor.Position, DarkTwister(module), _knockbackRange); - if (actor.Position != adjPos && !module.Bounds.Contains(adjPos)) + var adjPos = Components.Knockback.AwayFromSource(actor.Position, DarkTwister(), _knockbackRange); + if (actor.Position != adjPos && !Module.Bounds.Contains(adjPos)) { hints.Add("About to be knocked back into wall!"); } - foreach (var twister in BurningTwisters(module)) + foreach (var twister in BurningTwisters()) { if (adjPos.InCircle(twister.Position, _aoeInnerRadius) || adjPos.InDonut(twister.Position, _aoeMiddleRadius, _aoeOuterRadius)) { @@ -29,36 +29,36 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { - foreach (var twister in BurningTwisters(module)) + foreach (var twister in BurningTwisters()) { - arena.ZoneCircle(twister.Position, _aoeInnerRadius, ArenaColor.AOE); - arena.ZoneDonut(twister.Position, _aoeMiddleRadius, _aoeOuterRadius, ArenaColor.AOE); + Arena.ZoneCircle(twister.Position, _aoeInnerRadius, ArenaColor.AOE); + Arena.ZoneDonut(twister.Position, _aoeMiddleRadius, _aoeOuterRadius, ArenaColor.AOE); } } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - var darkTwister = DarkTwister(module); + var darkTwister = DarkTwister(); if (darkTwister == null) return; var adjPos = Components.Knockback.AwayFromSource(pc.Position, darkTwister, _knockbackRange); if (adjPos != pc.Position) { - arena.AddLine(pc.Position, adjPos, ArenaColor.Danger); - arena.Actor(adjPos, pc.Rotation, ArenaColor.Danger); + Arena.AddLine(pc.Position, adjPos, ArenaColor.Danger); + Arena.Actor(adjPos, pc.Rotation, ArenaColor.Danger); } var safeOffset = _knockbackRange + (_aoeInnerRadius + _aoeMiddleRadius) / 2; var safeRadius = (_aoeMiddleRadius - _aoeInnerRadius) / 2; - foreach (var burningTwister in BurningTwisters(module)) + foreach (var burningTwister in BurningTwisters()) { var dir = burningTwister.Position - darkTwister.Position; var len = dir.Length(); dir /= len; - arena.AddCircle(darkTwister.Position + dir * (len - safeOffset), safeRadius, ArenaColor.Safe); + Arena.AddCircle(darkTwister.Position + dir * (len - safeOffset), safeRadius, ArenaColor.Safe); } } } diff --git a/BossMod/Modules/Endwalker/Savage/P3SPhoinix/DarkenedFire.cs b/BossMod/Modules/Endwalker/Savage/P3SPhoinix/DarkenedFire.cs index d9f23cb5bd..08ff2b4183 100644 --- a/BossMod/Modules/Endwalker/Savage/P3SPhoinix/DarkenedFire.cs +++ b/BossMod/Modules/Endwalker/Savage/P3SPhoinix/DarkenedFire.cs @@ -2,16 +2,16 @@ // state relared to darkened fire add placement mechanic // adds should be neither too close (or they insta explode and wipe raid) nor too far (or during brightened fire someone wouldn't be able to hit two adds) -class DarkenedFire : BossComponent +class DarkenedFire(BossModule module) : BossComponent(module) { private static readonly float _minRange = 11; // note: on one of our pulls adds at (94.14, 105.55) and (94.21, 94.69) (distance=10.860) linked and wiped us private static readonly float _maxRange = 13; // brigthened fire aoe radius is 7, so this is x2 minus some room for positioning - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { bool haveTooClose = false; int numInRange = 0; - foreach (var player in module.Raid.WithoutSlot().Where(player => CanBothBeTargets(player, actor))) + foreach (var player in Raid.WithoutSlot().Where(player => CanBothBeTargets(player, actor))) { haveTooClose |= player.Position.InCircle(actor.Position, _minRange); if (player.Position.InCircle(actor.Position, _maxRange)) @@ -28,20 +28,20 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { // draw other potential targets, to simplify positioning bool healerOrTank = pc.Role == Role.Tank || pc.Role == Role.Healer; - foreach (var player in module.Raid.WithoutSlot().Where(player => CanBothBeTargets(player, pc))) + foreach (var player in Raid.WithoutSlot().Where(player => CanBothBeTargets(player, pc))) { bool tooClose = player.Position.InCircle(pc.Position, _minRange); bool inRange = player.Position.InCircle(pc.Position, _maxRange); - arena.Actor(player, tooClose ? ArenaColor.Danger : (inRange ? ArenaColor.PlayerInteresting : ArenaColor.PlayerGeneric)); + Arena.Actor(player, tooClose ? ArenaColor.Danger : (inRange ? ArenaColor.PlayerInteresting : ArenaColor.PlayerGeneric)); } // draw circles around pc - arena.AddCircle(pc.Position, _minRange, ArenaColor.Danger); - arena.AddCircle(pc.Position, _maxRange, ArenaColor.Safe); + Arena.AddCircle(pc.Position, _minRange, ArenaColor.Danger); + Arena.AddCircle(pc.Position, _maxRange, ArenaColor.Safe); } private bool CanBothBeTargets(Actor one, Actor two) diff --git a/BossMod/Modules/Endwalker/Savage/P3SPhoinix/DevouringBrand.cs b/BossMod/Modules/Endwalker/Savage/P3SPhoinix/DevouringBrand.cs index a894b9b2be..08bc878021 100644 --- a/BossMod/Modules/Endwalker/Savage/P3SPhoinix/DevouringBrand.cs +++ b/BossMod/Modules/Endwalker/Savage/P3SPhoinix/DevouringBrand.cs @@ -1,23 +1,23 @@ namespace BossMod.Endwalker.Savage.P3SPhoinix; // state related to devouring brand mechanic -class DevouringBrand : BossComponent +class DevouringBrand(BossModule module) : BossComponent(module) { private static readonly float _halfWidth = 5; - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { - var offset = actor.Position - module.Bounds.Center; + var offset = actor.Position - Module.Bounds.Center; if (MathF.Abs(offset.X) <= _halfWidth || MathF.Abs(offset.Z) <= _halfWidth) { hints.Add("GTFO from brand!"); } } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { - arena.ZoneRect(module.Bounds.Center, new WDir(1, 0), module.Bounds.HalfSize, module.Bounds.HalfSize, _halfWidth, ArenaColor.AOE); - arena.ZoneRect(module.Bounds.Center, new WDir(0, 1), module.Bounds.HalfSize, -_halfWidth, _halfWidth, ArenaColor.AOE); - arena.ZoneRect(module.Bounds.Center, new WDir(0, -1), module.Bounds.HalfSize, -_halfWidth, _halfWidth, ArenaColor.AOE); + Arena.ZoneRect(Module.Bounds.Center, new WDir(1, 0), Module.Bounds.HalfSize, Module.Bounds.HalfSize, _halfWidth, ArenaColor.AOE); + Arena.ZoneRect(Module.Bounds.Center, new WDir(0, 1), Module.Bounds.HalfSize, -_halfWidth, _halfWidth, ArenaColor.AOE); + Arena.ZoneRect(Module.Bounds.Center, new WDir(0, -1), Module.Bounds.HalfSize, -_halfWidth, _halfWidth, ArenaColor.AOE); } } diff --git a/BossMod/Modules/Endwalker/Savage/P3SPhoinix/Fireplume.cs b/BossMod/Modules/Endwalker/Savage/P3SPhoinix/Fireplume.cs index 622db649fd..975e7985c8 100644 --- a/BossMod/Modules/Endwalker/Savage/P3SPhoinix/Fireplume.cs +++ b/BossMod/Modules/Endwalker/Savage/P3SPhoinix/Fireplume.cs @@ -1,7 +1,7 @@ namespace BossMod.Endwalker.Savage.P3SPhoinix; // state related to 'single' and 'multi' fireplumes (normal or parts of gloryplume) -class Fireplume : BossComponent +class Fireplume(BossModule module) : BossComponent(module) { private WPos? _singlePos = null; private Angle _multiStartingDirection; @@ -12,7 +12,7 @@ class Fireplume : BossComponent private static readonly float _multiRadius = 10; private static readonly float _multiPairOffset = 15; - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_singlePos != null && actor.Position.InCircle(_singlePos.Value, _singleRadius)) { @@ -21,42 +21,42 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint if (_multiStartedCasts > _multiFinishedCasts) { - if (_multiFinishedCasts > 0 && actor.Position.InCircle(module.Bounds.Center, _multiRadius) || - _multiFinishedCasts < 8 && InPair(module, _multiStartingDirection + 45.Degrees(), actor) || - _multiFinishedCasts < 6 && InPair(module, _multiStartingDirection - 90.Degrees(), actor) || - _multiFinishedCasts < 4 && InPair(module, _multiStartingDirection - 45.Degrees(), actor) || - _multiFinishedCasts < 2 && InPair(module, _multiStartingDirection, actor)) + if (_multiFinishedCasts > 0 && actor.Position.InCircle(Module.Bounds.Center, _multiRadius) || + _multiFinishedCasts < 8 && InPair(_multiStartingDirection + 45.Degrees(), actor) || + _multiFinishedCasts < 6 && InPair(_multiStartingDirection - 90.Degrees(), actor) || + _multiFinishedCasts < 4 && InPair(_multiStartingDirection - 45.Degrees(), actor) || + _multiFinishedCasts < 2 && InPair(_multiStartingDirection, actor)) { hints.Add("GTFO from plume!"); } } } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { if (_singlePos != null) { - arena.ZoneCircle(_singlePos.Value, _singleRadius, ArenaColor.AOE); + Arena.ZoneCircle(_singlePos.Value, _singleRadius, ArenaColor.AOE); } if (_multiStartedCasts > _multiFinishedCasts) { if (_multiFinishedCasts > 0) // don't draw center aoe before first explosion, it's confusing - but start drawing it immediately after first explosion, to simplify positioning - arena.ZoneCircle(module.Bounds.Center, _multiRadius, _multiFinishedCasts >= 6 ? ArenaColor.Danger : ArenaColor.AOE); + Arena.ZoneCircle(Module.Bounds.Center, _multiRadius, _multiFinishedCasts >= 6 ? ArenaColor.Danger : ArenaColor.AOE); // don't draw more than two next pairs if (_multiFinishedCasts < 8) - DrawPair(arena, _multiStartingDirection + 45.Degrees(), _multiStartedCasts > 6 && _multiFinishedCasts >= 4); + DrawPair(_multiStartingDirection + 45.Degrees(), _multiStartedCasts > 6 && _multiFinishedCasts >= 4); if (_multiFinishedCasts < 6) - DrawPair(arena, _multiStartingDirection - 90.Degrees(), _multiStartedCasts > 4 && _multiFinishedCasts >= 2); + DrawPair(_multiStartingDirection - 90.Degrees(), _multiStartedCasts > 4 && _multiFinishedCasts >= 2); if (_multiFinishedCasts < 4) - DrawPair(arena, _multiStartingDirection - 45.Degrees(), _multiStartedCasts > 2); + DrawPair(_multiStartingDirection - 45.Degrees(), _multiStartedCasts > 2); if (_multiFinishedCasts < 2) - DrawPair(arena, _multiStartingDirection, true); + DrawPair(_multiStartingDirection, true); } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { @@ -67,12 +67,12 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf case AID.ExperimentalFireplumeMultiAOE: case AID.ExperimentalGloryplumeMultiAOE: if (_multiStartedCasts++ == 0) - _multiStartingDirection = Angle.FromDirection(caster.Position - module.Bounds.Center); + _multiStartingDirection = Angle.FromDirection(caster.Position - Module.Bounds.Center); break; } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { @@ -87,17 +87,17 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn } } - private bool InPair(BossModule module, Angle direction, Actor actor) + private bool InPair(Angle direction, Actor actor) { var offset = _multiPairOffset * direction.ToDirection(); - return actor.Position.InCircle(module.Bounds.Center - offset, _multiRadius) - || actor.Position.InCircle(module.Bounds.Center + offset, _multiRadius); + return actor.Position.InCircle(Module.Bounds.Center - offset, _multiRadius) + || actor.Position.InCircle(Module.Bounds.Center + offset, _multiRadius); } - private void DrawPair(MiniArena arena, Angle direction, bool imminent) + private void DrawPair(Angle direction, bool imminent) { var offset = _multiPairOffset * direction.ToDirection(); - arena.ZoneCircle(arena.Bounds.Center + offset, _multiRadius, imminent ? ArenaColor.Danger : ArenaColor.AOE); - arena.ZoneCircle(arena.Bounds.Center - offset, _multiRadius, imminent ? ArenaColor.Danger : ArenaColor.AOE); + Arena.ZoneCircle(Arena.Bounds.Center + offset, _multiRadius, imminent ? ArenaColor.Danger : ArenaColor.AOE); + Arena.ZoneCircle(Arena.Bounds.Center - offset, _multiRadius, imminent ? ArenaColor.Danger : ArenaColor.AOE); } } diff --git a/BossMod/Modules/Endwalker/Savage/P3SPhoinix/FlamesOfAsphodelos.cs b/BossMod/Modules/Endwalker/Savage/P3SPhoinix/FlamesOfAsphodelos.cs index c784db7d0a..f34042e07c 100644 --- a/BossMod/Modules/Endwalker/Savage/P3SPhoinix/FlamesOfAsphodelos.cs +++ b/BossMod/Modules/Endwalker/Savage/P3SPhoinix/FlamesOfAsphodelos.cs @@ -1,37 +1,37 @@ namespace BossMod.Endwalker.Savage.P3SPhoinix; // state related to flames of asphodelos mechanic -class FlamesOfAsphodelos : BossComponent +class FlamesOfAsphodelos(BossModule module) : BossComponent(module) { private Angle?[] _directions = new Angle?[3]; - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { - if (InAOE(module, _directions[1], actor.Position) || InAOE(module, _directions[0] != null ? _directions[0] : _directions[2], actor.Position)) + if (InAOE(_directions[1], actor.Position) || InAOE(_directions[0] != null ? _directions[0] : _directions[2], actor.Position)) { hints.Add("GTFO from cone!"); } } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { if (_directions[0] != null) { - DrawZone(arena, _directions[0], ArenaColor.Danger); - DrawZone(arena, _directions[1], ArenaColor.AOE); + DrawZone(_directions[0], ArenaColor.Danger); + DrawZone(_directions[1], ArenaColor.AOE); } else if (_directions[1] != null) { - DrawZone(arena, _directions[1], ArenaColor.Danger); - DrawZone(arena, _directions[2], ArenaColor.AOE); + DrawZone(_directions[1], ArenaColor.Danger); + DrawZone(_directions[2], ArenaColor.AOE); } else { - DrawZone(arena, _directions[2], ArenaColor.Danger); + DrawZone(_directions[2], ArenaColor.Danger); } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { @@ -47,7 +47,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { @@ -63,21 +63,21 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn } } - private void DrawZone(MiniArena arena, Angle? dir, uint color) + private void DrawZone(Angle? dir, uint color) { if (dir != null) { - arena.ZoneIsoscelesTri(arena.Bounds.Center, dir.Value, 30.Degrees(), 50, color); - arena.ZoneIsoscelesTri(arena.Bounds.Center, dir.Value + 180.Degrees(), 30.Degrees(), 50, color); + Arena.ZoneIsoscelesTri(Arena.Bounds.Center, dir.Value, 30.Degrees(), 50, color); + Arena.ZoneIsoscelesTri(Arena.Bounds.Center, dir.Value + 180.Degrees(), 30.Degrees(), 50, color); } } - private bool InAOE(BossModule module, Angle? dir, WPos pos) + private bool InAOE(Angle? dir, WPos pos) { if (dir == null) return false; - var toPos = (pos - module.Bounds.Center).Normalized(); + var toPos = (pos - Module.Bounds.Center).Normalized(); return MathF.Abs(dir.Value.ToDirection().Dot(toPos)) >= MathF.Cos(MathF.PI / 6); } } diff --git a/BossMod/Modules/Endwalker/Savage/P3SPhoinix/FledglingFlight.cs b/BossMod/Modules/Endwalker/Savage/P3SPhoinix/FledglingFlight.cs index c64d05424f..fd2d1bc282 100644 --- a/BossMod/Modules/Endwalker/Savage/P3SPhoinix/FledglingFlight.cs +++ b/BossMod/Modules/Endwalker/Savage/P3SPhoinix/FledglingFlight.cs @@ -1,7 +1,7 @@ namespace BossMod.Endwalker.Savage.P3SPhoinix; // state related to fledgling flight & death toll mechanics -class FledglingFlight : BossComponent +class FledglingFlight(BossModule module) : BossComponent(module) { public bool PlacementDone { get; private set; } = false; public bool CastsDone { get; private set; } = false; @@ -12,24 +12,24 @@ class FledglingFlight : BossComponent private static readonly Angle _coneHalfAngle = 45.Degrees(); private static readonly float _eyePlacementOffset = 10; - public override void Update(BossModule module) + public override void Update() { if (_sources.Count == 0) return; - foreach ((int i, var player) in module.Raid.WithSlot()) + foreach ((int i, var player) in Raid.WithSlot()) { _playerDeathTollStacks[i] = player.FindStatus((uint)SID.DeathsToll)?.Extra ?? 0; // TODO: use status events here... _playerAOECount[i] = _sources.Where(srcRot => player.Position.InCone(srcRot.Item1.Position, srcRot.Item2, _coneHalfAngle)).Count(); } } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_sources.Count == 0) return; - var eyePos = GetEyePlacementPosition(module, slot, actor); + var eyePos = GetEyePlacementPosition(slot, actor); if (eyePos != null && !actor.Position.InCircle(eyePos.Value, 5)) { hints.Add("Get closer to eye placement position!"); @@ -45,29 +45,29 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (_sources.Count == 0) return; // draw all players - foreach ((int i, var player) in module.Raid.WithSlot()) - arena.Actor(player, _playerAOECount[i] != _playerDeathTollStacks[i] ? ArenaColor.PlayerInteresting : ArenaColor.PlayerGeneric); + foreach ((int i, var player) in Raid.WithSlot()) + Arena.Actor(player, _playerAOECount[i] != _playerDeathTollStacks[i] ? ArenaColor.PlayerInteresting : ArenaColor.PlayerGeneric); - var eyePos = GetEyePlacementPosition(module, pcSlot, pc); + var eyePos = GetEyePlacementPosition(pcSlot, pc); if (eyePos != null) - arena.AddCircle(eyePos.Value, 1, ArenaColor.Safe); + Arena.AddCircle(eyePos.Value, 1, ArenaColor.Safe); } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { foreach ((var source, var dir) in _sources) { - arena.ZoneIsoscelesTri(source.Position, dir, _coneHalfAngle, 50, ArenaColor.AOE); + Arena.ZoneIsoscelesTri(source.Position, dir, _coneHalfAngle, 50, ArenaColor.AOE); } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.AshenEye) { @@ -80,7 +80,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.AshenEye) { @@ -89,13 +89,13 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn } } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID >= 296 && iconID <= 299) { if (PlacementDone) { - module.ReportError(this, $"Unexpected icon after eyes started casting"); + ReportError($"Unexpected icon after eyes started casting"); return; } @@ -111,7 +111,7 @@ public override void OnEventIcon(BossModule module, Actor actor, uint iconID) } } - private WPos? GetEyePlacementPosition(BossModule module, int slot, Actor player) + private WPos? GetEyePlacementPosition(int slot, Actor player) { if (PlacementDone) return null; @@ -121,6 +121,6 @@ public override void OnEventIcon(BossModule module, Actor actor, uint iconID) return null; var offset = rot.ToDirection() * _eyePlacementOffset; - return _playerDeathTollStacks[slot] > 0 ? module.Bounds.Center - offset : module.Bounds.Center + offset; + return _playerDeathTollStacks[slot] > 0 ? Module.Bounds.Center - offset : Module.Bounds.Center + offset; } } diff --git a/BossMod/Modules/Endwalker/Savage/P3SPhoinix/P3S.cs b/BossMod/Modules/Endwalker/Savage/P3SPhoinix/P3S.cs index d4c90bad8f..8360c3c3c3 100644 --- a/BossMod/Modules/Endwalker/Savage/P3SPhoinix/P3S.cs +++ b/BossMod/Modules/Endwalker/Savage/P3SPhoinix/P3S.cs @@ -1,18 +1,9 @@ namespace BossMod.Endwalker.Savage.P3SPhoinix; -[ConfigDisplay(Order = 0x130, Parent = typeof(EndwalkerConfig))] -public class P3SConfig : CooldownPlanningConfigNode -{ - public P3SConfig() : base(90) { } -} +class HeatOfCondemnation(BossModule module) : Components.TankbusterTether(module, ActionID.MakeSpell(AID.HeatOfCondemnationAOE), (uint)TetherID.HeatOfCondemnation, 6); -class HeatOfCondemnation : Components.TankbusterTether -{ - public HeatOfCondemnation() : base(ActionID.MakeSpell(AID.HeatOfCondemnationAOE), (uint)TetherID.HeatOfCondemnation, 6) { } -} +[ConfigDisplay(Order = 0x130, Parent = typeof(EndwalkerConfig))] +public class P3SConfig() : CooldownPlanningConfigNode(90); [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 807, NameID = 10720)] -public class P3S : BossModule -{ - public P3S(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { } -} +public class P3S(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)); diff --git a/BossMod/Modules/Endwalker/Savage/P3SPhoinix/P3SStates.cs b/BossMod/Modules/Endwalker/Savage/P3SPhoinix/P3SStates.cs index ee9148d78b..03abe6cd9f 100644 --- a/BossMod/Modules/Endwalker/Savage/P3SPhoinix/P3SStates.cs +++ b/BossMod/Modules/Endwalker/Savage/P3SPhoinix/P3SStates.cs @@ -304,9 +304,9 @@ private void DarkblazeTwister(uint id, float delay) .SetHint(StateMachine.StateHint.PositioningStart); Cast(id + 0x1000, AID.SearingBreeze, 4.1f, 3, "SearingBreeze"); AshplumeCast(id + 0x2000, 4.1f); - ComponentCondition(id + 0x3000, 2.8f, comp => comp.DarkTwister(Module) == null, "Knockback") + ComponentCondition(id + 0x3000, 2.8f, comp => comp.DarkTwister() == null, "Knockback") .SetHint(StateMachine.StateHint.Knockback); - ComponentCondition(id + 0x4000, 2, comp => !comp.BurningTwisters(Module).Any(), "AOE") + ComponentCondition(id + 0x4000, 2, comp => !comp.BurningTwisters().Any(), "AOE") .DeactivateOnExit(); AshplumeResolve(id + 0x5000, 2.3f) .SetHint(StateMachine.StateHint.PositioningEnd); diff --git a/BossMod/Modules/Endwalker/Savage/P3SPhoinix/StormsOfAsphodelos.cs b/BossMod/Modules/Endwalker/Savage/P3SPhoinix/StormsOfAsphodelos.cs index b069ea2435..5e5b3fd09b 100644 --- a/BossMod/Modules/Endwalker/Savage/P3SPhoinix/StormsOfAsphodelos.cs +++ b/BossMod/Modules/Endwalker/Savage/P3SPhoinix/StormsOfAsphodelos.cs @@ -1,7 +1,7 @@ namespace BossMod.Endwalker.Savage.P3SPhoinix; // state related to storms of asphodelos mechanics -class StormsOfAsphodelos : BossComponent +class StormsOfAsphodelos(BossModule module) : BossComponent(module) { private AOEShapeCone _windsAOE = new(50, 30.Degrees()); private AOEShapeCircle _beaconAOE = new(6); @@ -11,7 +11,7 @@ class StormsOfAsphodelos : BossComponent private BitMask _closeToTetherTarget; private BitMask _hitByMultipleAOEs; - public override void Update(BossModule module) + public override void Update() { _twisterTargets.Clear(); _tetherTargets = _bossTargets = _closeToTetherTarget = _hitByMultipleAOEs = new(); @@ -21,35 +21,35 @@ public override void Update(BossModule module) // for now, we consider tether target to be a "tank" int[] aoesPerPlayer = new int[PartyState.MaxPartySize]; - foreach ((int i, var player) in module.Raid.WithSlot(true).WhereActor(x => x.Tether.Target == module.PrimaryActor.InstanceID)) + foreach ((int i, var player) in Raid.WithSlot(true).WhereActor(x => x.Tether.Target == Module.PrimaryActor.InstanceID)) { _tetherTargets.Set(i); ++aoesPerPlayer[i]; - foreach ((int j, var other) in module.Raid.WithSlot().InRadiusExcluding(player, _beaconAOE.Radius)) + foreach ((int j, var other) in Raid.WithSlot().InRadiusExcluding(player, _beaconAOE.Radius)) { ++aoesPerPlayer[j]; _closeToTetherTarget.Set(j); } } - foreach ((int i, var player) in module.Raid.WithSlot().SortedByRange(module.PrimaryActor.Position).Take(3)) + foreach ((int i, var player) in Raid.WithSlot().SortedByRange(Module.PrimaryActor.Position).Take(3)) { _bossTargets.Set(i); - foreach ((int j, var other) in FindPlayersInWinds(module, module.PrimaryActor, player)) + foreach ((int j, var other) in FindPlayersInWinds(Module.PrimaryActor, player)) { ++aoesPerPlayer[j]; } } - foreach (var twister in module.Enemies(OID.DarkblazeTwister)) + foreach (var twister in Module.Enemies(OID.DarkblazeTwister)) { - var target = module.Raid.WithoutSlot().Closest(twister.Position); + var target = Raid.WithoutSlot().Closest(twister.Position); if (target == null) continue; // there are no alive players - target list will be left empty _twisterTargets.Add(target); - foreach ((int j, var other) in FindPlayersInWinds(module, twister, target)) + foreach ((int j, var other) in FindPlayersInWinds(twister, target)) { ++aoesPerPlayer[j]; } @@ -60,7 +60,7 @@ public override void Update(BossModule module) _hitByMultipleAOEs.Set(i); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (actor.Role == Role.Tank) { @@ -90,46 +90,46 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { - foreach ((int i, var player) in module.Raid.WithSlot()) + foreach ((int i, var player) in Raid.WithSlot()) { if (_tetherTargets[i]) { - _beaconAOE.Draw(arena, player); + _beaconAOE.Draw(Arena, player); } - if (_bossTargets[i] && player.Position != module.PrimaryActor.Position) + if (_bossTargets[i] && player.Position != Module.PrimaryActor.Position) { - _windsAOE.Draw(arena, module.PrimaryActor.Position, Angle.FromDirection(player.Position - module.PrimaryActor.Position)); + _windsAOE.Draw(Arena, Module.PrimaryActor.Position, Angle.FromDirection(player.Position - Module.PrimaryActor.Position)); } } - foreach (var (twister, target) in module.Enemies(OID.DarkblazeTwister).Zip(_twisterTargets)) + foreach (var (twister, target) in Module.Enemies(OID.DarkblazeTwister).Zip(_twisterTargets)) { - _windsAOE.Draw(arena, twister.Position, Angle.FromDirection(target.Position - twister.Position)); + _windsAOE.Draw(Arena, twister.Position, Angle.FromDirection(target.Position - twister.Position)); } } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - foreach (var twister in module.Enemies(OID.DarkblazeTwister)) + foreach (var twister in Module.Enemies(OID.DarkblazeTwister)) { - arena.Actor(twister, ArenaColor.Enemy, true); + Arena.Actor(twister, ArenaColor.Enemy, true); } - foreach ((int i, var player) in module.Raid.WithSlot()) + foreach ((int i, var player) in Raid.WithSlot()) { bool tethered = _tetherTargets[i]; if (tethered) - arena.AddLine(module.PrimaryActor.Position, player.Position, player.Role == Role.Tank ? ArenaColor.Safe : ArenaColor.Danger); + Arena.AddLine(Module.PrimaryActor.Position, player.Position, player.Role == Role.Tank ? ArenaColor.Safe : ArenaColor.Danger); bool active = tethered || _bossTargets[i] || _twisterTargets.Contains(player); bool failing = (_hitByMultipleAOEs | _closeToTetherTarget)[i]; - arena.Actor(player, active ? ArenaColor.Danger : (failing ? ArenaColor.PlayerInteresting : ArenaColor.PlayerGeneric)); + Arena.Actor(player, active ? ArenaColor.Danger : (failing ? ArenaColor.PlayerInteresting : ArenaColor.PlayerGeneric)); } } - private IEnumerable<(int, Actor)> FindPlayersInWinds(BossModule module, Actor origin, Actor target) + private IEnumerable<(int, Actor)> FindPlayersInWinds(Actor origin, Actor target) { - return module.Raid.WithSlot().InShape(_windsAOE, origin.Position, Angle.FromDirection(target.Position - origin.Position)); + return Raid.WithSlot().InShape(_windsAOE, origin.Position, Angle.FromDirection(target.Position - origin.Position)); } } diff --git a/BossMod/Modules/Endwalker/Savage/P3SPhoinix/SunshadowTether.cs b/BossMod/Modules/Endwalker/Savage/P3SPhoinix/SunshadowTether.cs index 1f8f414ae4..ba4f1256f3 100644 --- a/BossMod/Modules/Endwalker/Savage/P3SPhoinix/SunshadowTether.cs +++ b/BossMod/Modules/Endwalker/Savage/P3SPhoinix/SunshadowTether.cs @@ -1,7 +1,7 @@ namespace BossMod.Endwalker.Savage.P3SPhoinix; // state related to sunshadow tethers during fountain of fire mechanics -class SunshadowTether : BossComponent +class SunshadowTether(BossModule module) : BossComponent(module) { private HashSet _chargedSunshadows = new(); private BitMask _playersInAOE; @@ -10,17 +10,17 @@ class SunshadowTether : BossComponent public int NumCharges => _chargedSunshadows.Count; - public override void Update(BossModule module) + public override void Update() { _playersInAOE.Reset(); - foreach (var bird in ActiveBirds(module)) + foreach (var bird in ActiveBirds()) { ulong targetID = BirdTarget(bird); - var target = targetID != 0 ? module.WorldState.Actors.Find(targetID) : null; + var target = targetID != 0 ? WorldState.Actors.Find(targetID) : null; if (target != null && target.Position != bird.Position) { var dir = (target.Position - bird.Position).Normalized(); - foreach ((int i, var player) in module.Raid.WithSlot().Exclude(target)) + foreach ((int i, var player) in Raid.WithSlot().Exclude(target)) { if (player.Position.InRect(bird.Position, dir, 50, 0, _chargeHalfWidth)) { @@ -31,9 +31,9 @@ public override void Update(BossModule module) } } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { - foreach (var bird in ActiveBirds(module)) + foreach (var bird in ActiveBirds()) { ulong birdTarget = BirdTarget(bird); if (birdTarget == actor.InstanceID && bird.Tether.ID != (uint)TetherID.LargeBirdFar) @@ -48,39 +48,39 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { - foreach (var bird in ActiveBirds(module)) + foreach (var bird in ActiveBirds()) { ulong targetID = BirdTarget(bird); - var target = (targetID != 0 && targetID != pc.InstanceID) ? module.WorldState.Actors.Find(targetID) : null; + var target = (targetID != 0 && targetID != pc.InstanceID) ? WorldState.Actors.Find(targetID) : null; if (target != null && target.Position != bird.Position) { var dir = (target.Position - bird.Position).Normalized(); - arena.ZoneRect(bird.Position, dir, 50, 0, _chargeHalfWidth, ArenaColor.AOE); + Arena.ZoneRect(bird.Position, dir, 50, 0, _chargeHalfWidth, ArenaColor.AOE); } } } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - if (!ActiveBirds(module).Any()) + if (!ActiveBirds().Any()) return; // draw all players - foreach ((int i, var player) in module.Raid.WithSlot()) - arena.Actor(player, _playersInAOE[i] ? ArenaColor.PlayerInteresting : ArenaColor.PlayerGeneric); + foreach ((int i, var player) in Raid.WithSlot()) + Arena.Actor(player, _playersInAOE[i] ? ArenaColor.PlayerInteresting : ArenaColor.PlayerGeneric); // draw my tether - var myBird = module.Enemies(OID.Sunshadow).FirstOrDefault(bird => BirdTarget(bird) == pc.InstanceID); + var myBird = Module.Enemies(OID.Sunshadow).FirstOrDefault(bird => BirdTarget(bird) == pc.InstanceID); if (myBird != null && !_chargedSunshadows.Contains(myBird.InstanceID)) { - arena.AddLine(myBird.Position, pc.Position, myBird.Tether.ID != (uint)TetherID.LargeBirdFar ? ArenaColor.Danger : ArenaColor.Safe); - arena.Actor(myBird, ArenaColor.Enemy); + Arena.AddLine(myBird.Position, pc.Position, myBird.Tether.ID != (uint)TetherID.LargeBirdFar ? ArenaColor.Danger : ArenaColor.Safe); + Arena.Actor(myBird, ArenaColor.Enemy); } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.Fireglide) _chargedSunshadows.Add(caster.InstanceID); @@ -93,8 +93,8 @@ private ulong BirdTarget(Actor bird) return bird.Tether.Target != 0 ? bird.Tether.Target : bird.TargetID; } - private IEnumerable ActiveBirds(BossModule module) + private IEnumerable ActiveBirds() { - return module.Enemies(OID.Sunshadow).Where(bird => !_chargedSunshadows.Contains(bird.InstanceID)); + return Module.Enemies(OID.Sunshadow).Where(bird => !_chargedSunshadows.Contains(bird.InstanceID)); } } diff --git a/BossMod/Modules/Endwalker/Savage/P3SPhoinix/TrailOfCondemnation.cs b/BossMod/Modules/Endwalker/Savage/P3SPhoinix/TrailOfCondemnation.cs index 112b8c733f..8f5172a3ed 100644 --- a/BossMod/Modules/Endwalker/Savage/P3SPhoinix/TrailOfCondemnation.cs +++ b/BossMod/Modules/Endwalker/Savage/P3SPhoinix/TrailOfCondemnation.cs @@ -10,24 +10,24 @@ class TrailOfCondemnation : BossComponent private static readonly float _sidesOffset = 12.5f; private static readonly float _aoeRadius = 6; - public override void Init(BossModule module) + public TrailOfCondemnation(BossModule module) : base(module) { - _isCenter = module.PrimaryActor.CastInfo?.IsSpell(AID.TrailOfCondemnationCenter) ?? false; + _isCenter = Module.PrimaryActor.CastInfo?.IsSpell(AID.TrailOfCondemnationCenter) ?? false; } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { - if (module.PrimaryActor.Position == module.Bounds.Center) + if (Module.PrimaryActor.Position == Module.Bounds.Center) return; - var dir = (module.Bounds.Center - module.PrimaryActor.Position).Normalized(); + var dir = (Module.Bounds.Center - Module.PrimaryActor.Position).Normalized(); if (_isCenter) { - if (actor.Position.InRect(module.PrimaryActor.Position, dir, 2 * module.Bounds.HalfSize, 0, _halfWidth)) + if (actor.Position.InRect(Module.PrimaryActor.Position, dir, 2 * Module.Bounds.HalfSize, 0, _halfWidth)) { hints.Add("GTFO from aoe!"); } - if (module.Raid.WithoutSlot().InRadiusExcluding(actor, _aoeRadius).Any()) + if (Raid.WithoutSlot().InRadiusExcluding(actor, _aoeRadius).Any()) { hints.Add("Spread!"); } @@ -35,15 +35,15 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint else { var offset = _sidesOffset * dir.OrthoR(); - if (actor.Position.InRect(module.PrimaryActor.Position + offset, dir, 2 * module.Bounds.HalfSize, 0, _halfWidth) || - actor.Position.InRect(module.PrimaryActor.Position - offset, dir, 2 * module.Bounds.HalfSize, 0, _halfWidth)) + if (actor.Position.InRect(Module.PrimaryActor.Position + offset, dir, 2 * Module.Bounds.HalfSize, 0, _halfWidth) || + actor.Position.InRect(Module.PrimaryActor.Position - offset, dir, 2 * Module.Bounds.HalfSize, 0, _halfWidth)) { hints.Add("GTFO from aoe!"); } // note: sparks either target all tanks & healers or all dds - so correct pairings are always dd+tank/healer int numStacked = 0; bool goodPair = false; - foreach (var pair in module.Raid.WithoutSlot().InRadiusExcluding(actor, _aoeRadius)) + foreach (var pair in Raid.WithoutSlot().InRadiusExcluding(actor, _aoeRadius)) { ++numStacked; goodPair = (actor.Role == Role.Tank || actor.Role == Role.Healer) != (pair.Role == Role.Tank || pair.Role == Role.Healer); @@ -59,38 +59,38 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { - if (module.PrimaryActor.Position == module.Bounds.Center) + if (Module.PrimaryActor.Position == Module.Bounds.Center) return; - var dir = (module.Bounds.Center - module.PrimaryActor.Position).Normalized(); + var dir = (Module.Bounds.Center - Module.PrimaryActor.Position).Normalized(); if (_isCenter) { - arena.ZoneRect(module.PrimaryActor.Position, dir, 2 * module.Bounds.HalfSize, 0, _halfWidth, ArenaColor.AOE); + Arena.ZoneRect(Module.PrimaryActor.Position, dir, 2 * Module.Bounds.HalfSize, 0, _halfWidth, ArenaColor.AOE); } else { var offset = _sidesOffset * dir.OrthoR(); - arena.ZoneRect(module.PrimaryActor.Position + offset, dir, 2 * module.Bounds.HalfSize, 0, _halfWidth, ArenaColor.AOE); - arena.ZoneRect(module.PrimaryActor.Position - offset, dir, 2 * module.Bounds.HalfSize, 0, _halfWidth, ArenaColor.AOE); + Arena.ZoneRect(Module.PrimaryActor.Position + offset, dir, 2 * Module.Bounds.HalfSize, 0, _halfWidth, ArenaColor.AOE); + Arena.ZoneRect(Module.PrimaryActor.Position - offset, dir, 2 * Module.Bounds.HalfSize, 0, _halfWidth, ArenaColor.AOE); } } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { // draw all raid members, to simplify positioning - foreach (var player in module.Raid.WithoutSlot().Exclude(pc)) + foreach (var player in Raid.WithoutSlot().Exclude(pc)) { bool inRange = player.Position.InCircle(pc.Position, _aoeRadius); - arena.Actor(player, inRange ? ArenaColor.PlayerInteresting : ArenaColor.PlayerGeneric); + Arena.Actor(player, inRange ? ArenaColor.PlayerInteresting : ArenaColor.PlayerGeneric); } // draw circle around pc - arena.AddCircle(pc.Position, _aoeRadius, ArenaColor.Danger); + Arena.AddCircle(pc.Position, _aoeRadius, ArenaColor.Danger); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.FlareOfCondemnation or AID.SparksOfCondemnation) Done = true; diff --git a/BossMod/Modules/Endwalker/Savage/P4S1Hesperos/BeloneCoils.cs b/BossMod/Modules/Endwalker/Savage/P4S1Hesperos/BeloneCoils.cs index 7b09829577..870d37c50d 100644 --- a/BossMod/Modules/Endwalker/Savage/P4S1Hesperos/BeloneCoils.cs +++ b/BossMod/Modules/Endwalker/Savage/P4S1Hesperos/BeloneCoils.cs @@ -1,7 +1,7 @@ namespace BossMod.Endwalker.Savage.P4S1Hesperos; // state related to belone coils mechanic (role towers) -class BeloneCoils : BossComponent +class BeloneCoils(BossModule module) : BossComponent(module) { public enum Soaker { Unknown, TankOrHealer, DamageDealer } @@ -20,7 +20,7 @@ public bool IsValidSoaker(Actor player) }; } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (ActiveSoakers == Soaker.Unknown) return; @@ -36,7 +36,7 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (ActiveSoakers == Soaker.Unknown) return; @@ -44,11 +44,11 @@ public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc bool validSoaker = IsValidSoaker(pc); foreach (var tower in _activeTowers) { - arena.AddCircle(tower.Position, _towerRadius, validSoaker ? ArenaColor.Safe : ArenaColor.Danger); + Arena.AddCircle(tower.Position, _towerRadius, validSoaker ? ArenaColor.Safe : ArenaColor.Danger); } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.BeloneCoilsDPS or AID.BeloneCoilsTH) { @@ -57,7 +57,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.BeloneCoilsDPS or AID.BeloneCoilsTH) { diff --git a/BossMod/Modules/Endwalker/Savage/P4S1Hesperos/DirectorsBelone.cs b/BossMod/Modules/Endwalker/Savage/P4S1Hesperos/DirectorsBelone.cs index deadea434b..e4e98652d3 100644 --- a/BossMod/Modules/Endwalker/Savage/P4S1Hesperos/DirectorsBelone.cs +++ b/BossMod/Modules/Endwalker/Savage/P4S1Hesperos/DirectorsBelone.cs @@ -2,7 +2,7 @@ // state related to director's belone (debuffs) mechanic // note that forbidden targets are selected either from bloodrake tethers (first instance of mechanic) or from tower types (second instance of mechanic) -class DirectorsBelone : BossComponent +class DirectorsBelone(BossModule module) : BossComponent(module) { private bool _assigned = false; private BitMask _debuffForbidden; @@ -11,27 +11,27 @@ class DirectorsBelone : BossComponent private static readonly float _debuffPassRange = 3; // not sure about this... - public override void Update(BossModule module) + public override void Update() { if (!_assigned) { - var coils = module.FindComponent(); + var coils = Module.FindComponent(); if (coils == null) { // assign from bloodrake tethers - _debuffForbidden = module.Raid.WithSlot().Tethered(TetherID.Bloodrake).Mask(); + _debuffForbidden = Raid.WithSlot().Tethered(TetherID.Bloodrake).Mask(); _assigned = true; } else if (coils.ActiveSoakers != BeloneCoils.Soaker.Unknown) { // assign from coils (note that it happens with some delay) - _debuffForbidden = module.Raid.WithSlot().WhereActor(coils.IsValidSoaker).Mask(); + _debuffForbidden = Raid.WithSlot().WhereActor(coils.IsValidSoaker).Mask(); _assigned = true; } } } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_debuffForbidden.None()) return; @@ -42,7 +42,7 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint if (_debuffTargets.None()) { // debuffs not assigned yet => spread and prepare to grab - bool stacked = module.Raid.WithoutSlot().InRadiusExcluding(actor, _debuffPassRange).Any(); + bool stacked = Raid.WithoutSlot().InRadiusExcluding(actor, _debuffPassRange).Any(); hints.Add("Debuffs: spread and prepare to handle!", stacked); } else if (_debuffImmune[slot]) @@ -63,7 +63,7 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint // we should be passing debuff if (_debuffTargets.None()) { - bool badStack = module.Raid.WithSlot().Exclude(slot).IncludedInMask(_debuffForbidden).OutOfRadius(actor.Position, _debuffPassRange).Any(); + bool badStack = Raid.WithSlot().Exclude(slot).IncludedInMask(_debuffForbidden).OutOfRadius(actor.Position, _debuffPassRange).Any(); hints.Add("Debuffs: stack and prepare to pass!", badStack); } else if (_debuffTargets[slot]) @@ -77,54 +77,54 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { - var forbidden = module.Raid.WithSlot(true).IncludedInMask(_debuffForbidden).FirstOrDefault().Item2; + var forbidden = Raid.WithSlot(true).IncludedInMask(_debuffForbidden).FirstOrDefault().Item2; if (forbidden != null) { hints.Add($"Stack: {(forbidden.Role is Role.Tank or Role.Healer ? "Tanks/Healers" : "DD")}"); } } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (_debuffTargets.None()) return; var failingPlayers = _debuffForbidden & _debuffTargets; - foreach ((int i, var player) in module.Raid.WithSlot()) + foreach ((int i, var player) in Raid.WithSlot()) { - arena.Actor(player, failingPlayers[i] ? ArenaColor.Danger : ArenaColor.PlayerGeneric); + Arena.Actor(player, failingPlayers[i] ? ArenaColor.Danger : ArenaColor.PlayerGeneric); } } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { switch ((SID)status.ID) { case SID.RoleCall: - _debuffTargets.Set(module.Raid.FindSlot(actor.InstanceID)); + _debuffTargets.Set(Raid.FindSlot(actor.InstanceID)); break; case SID.Miscast: - _debuffImmune.Set(module.Raid.FindSlot(actor.InstanceID)); + _debuffImmune.Set(Raid.FindSlot(actor.InstanceID)); break; } } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { switch ((SID)status.ID) { case SID.RoleCall: - _debuffTargets.Clear(module.Raid.FindSlot(actor.InstanceID)); + _debuffTargets.Clear(Raid.FindSlot(actor.InstanceID)); break; case SID.Miscast: - _debuffImmune.Clear(module.Raid.FindSlot(actor.InstanceID)); + _debuffImmune.Clear(Raid.FindSlot(actor.InstanceID)); break; } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.CursedCasting1 or AID.CursedCasting2) _debuffForbidden.Reset(); diff --git a/BossMod/Modules/Endwalker/Savage/P4S1Hesperos/ElementalBelone.cs b/BossMod/Modules/Endwalker/Savage/P4S1Hesperos/ElementalBelone.cs index a1b79161b0..5ce7df0d3b 100644 --- a/BossMod/Modules/Endwalker/Savage/P4S1Hesperos/ElementalBelone.cs +++ b/BossMod/Modules/Endwalker/Savage/P4S1Hesperos/ElementalBelone.cs @@ -7,17 +7,17 @@ class ElementalBelone : BossComponent private SettingTheScene.Element _safeElement; private List _imminentExplodingCorners = new(); - public override void Init(BossModule module) + public ElementalBelone(BossModule module) : base(module) { var assignments = module.FindComponent()!; uint forbiddenCorners = 1; // 0 corresponds to 'unknown' corner - foreach (var actor in module.WorldState.Actors.Where(a => a.OID == (uint)OID.Helper).Tethered(TetherID.Bloodrake)) + foreach (var actor in WorldState.Actors.Where(a => a.OID == (uint)OID.Helper).Tethered(TetherID.Bloodrake)) forbiddenCorners |= 1u << (int)assignments.FromPos(module, actor.Position); var safeCorner = (SettingTheScene.Corner)BitOperations.TrailingZeroCount(~forbiddenCorners); _safeElement = assignments.FindElement(safeCorner); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_imminentExplodingCorners.Where(p => actor.Position.InRect(p, new WDir(1, 0), 10, 10, 10)).Any()) { @@ -25,30 +25,30 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { hints.Add($"Safe square: {_safeElement}"); } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { if (Visible) { - var assignments = module.FindComponent()!; + var assignments = Module.FindComponent()!; var safeCorner = assignments.Assignment(_safeElement); if (safeCorner != SettingTheScene.Corner.Unknown) { - var p = module.Bounds.Center + 10 * assignments.Direction(safeCorner); - arena.ZoneRect(p, new WDir(1, 0), 10, 10, 10, ArenaColor.SafeFromAOE); + var p = Module.Bounds.Center + 10 * assignments.Direction(safeCorner); + Arena.ZoneRect(p, new WDir(1, 0), 10, 10, 10, ArenaColor.SafeFromAOE); } } foreach (var p in _imminentExplodingCorners) { - arena.ZoneRect(p, new WDir(1, 0), 10, 10, 10, ArenaColor.AOE); + Arena.ZoneRect(p, new WDir(1, 0), 10, 10, 10, ArenaColor.AOE); } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { diff --git a/BossMod/Modules/Endwalker/Savage/P4S1Hesperos/InversiveChlamys.cs b/BossMod/Modules/Endwalker/Savage/P4S1Hesperos/InversiveChlamys.cs index e0a1997389..77ac2501ff 100644 --- a/BossMod/Modules/Endwalker/Savage/P4S1Hesperos/InversiveChlamys.cs +++ b/BossMod/Modules/Endwalker/Savage/P4S1Hesperos/InversiveChlamys.cs @@ -2,7 +2,7 @@ // state related to inversive chlamys mechanic (tethers) // note that forbidden targets are selected either from bloodrake tethers (first instance of mechanic) or from tower types (second instance of mechanic) -class InversiveChlamys : BossComponent +class InversiveChlamys(BossModule module) : BossComponent(module) { private bool _assigned = false; private BitMask _tetherForbidden; @@ -13,21 +13,21 @@ class InversiveChlamys : BossComponent public bool TethersActive => _tetherTargets.Any(); - public override void Update(BossModule module) + public override void Update() { if (!_assigned) { - var coils = module.FindComponent(); + var coils = Module.FindComponent(); if (coils == null) { // assign from bloodrake tethers - _tetherForbidden = module.Raid.WithSlot().Tethered(TetherID.Bloodrake).Mask(); + _tetherForbidden = Raid.WithSlot().Tethered(TetherID.Bloodrake).Mask(); _assigned = true; } else if (coils.ActiveSoakers != BeloneCoils.Soaker.Unknown) { // assign from coils (note that it happens with some delay) - _tetherForbidden = module.Raid.WithSlot().WhereActor(coils.IsValidSoaker).Mask(); + _tetherForbidden = Raid.WithSlot().WhereActor(coils.IsValidSoaker).Mask(); _assigned = true; } } @@ -36,14 +36,14 @@ public override void Update(BossModule module) if (_tetherForbidden.None()) return; - foreach ((int i, var player) in module.Raid.WithSlot().Tethered(TetherID.Chlamys)) + foreach ((int i, var player) in Raid.WithSlot().Tethered(TetherID.Chlamys)) { _tetherTargets.Set(i); - _tetherInAOE |= module.Raid.WithSlot().InRadiusExcluding(player, _aoeRange).Mask(); + _tetherInAOE |= Raid.WithSlot().InRadiusExcluding(player, _aoeRange).Mask(); } } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_tetherForbidden.None()) return; @@ -59,7 +59,7 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint { hints.Add("Tethers: intercept!"); } - else if (module.Raid.WithoutSlot().InRadiusExcluding(actor, _aoeRange).Any()) + else if (Raid.WithoutSlot().InRadiusExcluding(actor, _aoeRange).Any()) { hints.Add("Tethers: GTFO from others!"); } @@ -90,31 +90,31 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { - var forbidden = module.Raid.WithSlot(true).IncludedInMask(_tetherForbidden).FirstOrDefault().Item2; + var forbidden = Raid.WithSlot(true).IncludedInMask(_tetherForbidden).FirstOrDefault().Item2; if (forbidden != null) { hints.Add($"Intercept: {(forbidden.Role is Role.Tank or Role.Healer ? "DD" : "Tanks/Healers")}"); } } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (_tetherTargets.None()) return; var failingPlayers = _tetherForbidden & _tetherTargets; - foreach ((int i, var player) in module.Raid.WithSlot()) + foreach ((int i, var player) in Raid.WithSlot()) { bool failing = failingPlayers[i]; bool inAOE = _tetherInAOE[i]; - arena.Actor(player, failing ? ArenaColor.Danger : (inAOE ? ArenaColor.PlayerInteresting : ArenaColor.PlayerGeneric)); + Arena.Actor(player, failing ? ArenaColor.Danger : (inAOE ? ArenaColor.PlayerInteresting : ArenaColor.PlayerGeneric)); if (player.Tether.ID == (uint)TetherID.Chlamys) { - arena.AddLine(player.Position, module.PrimaryActor.Position, failing ? ArenaColor.Danger : ArenaColor.Safe); - arena.AddCircle(player.Position, _aoeRange, ArenaColor.Danger); + Arena.AddLine(player.Position, Module.PrimaryActor.Position, failing ? ArenaColor.Danger : ArenaColor.Safe); + Arena.AddCircle(player.Position, _aoeRange, ArenaColor.Danger); } } } diff --git a/BossMod/Modules/Endwalker/Savage/P4S1Hesperos/P4S1.cs b/BossMod/Modules/Endwalker/Savage/P4S1Hesperos/P4S1.cs index 000996f90d..044a774fa6 100644 --- a/BossMod/Modules/Endwalker/Savage/P4S1Hesperos/P4S1.cs +++ b/BossMod/Modules/Endwalker/Savage/P4S1Hesperos/P4S1.cs @@ -2,19 +2,10 @@ // state related to elegant evisceration mechanic (dual hit tankbuster) // TODO: consider showing some tank swap / invul hint... -public class ElegantEvisceration : Components.CastCounter -{ - public ElegantEvisceration() : base(ActionID.MakeSpell(AID.ElegantEviscerationSecond)) { } -} +public class ElegantEvisceration(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.ElegantEviscerationSecond)); [ConfigDisplay(Order = 0x141, Parent = typeof(EndwalkerConfig))] -public class P4S1Config : CooldownPlanningConfigNode -{ - public P4S1Config() : base(90) { } -} +public class P4S1Config() : CooldownPlanningConfigNode(90); [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 801, NameID = 10744, SortOrder = 1)] -public class P4S1 : BossModule -{ - public P4S1(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsSquare(new(100, 100), 20)) { } -} +public class P4S1(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsSquare(new(100, 100), 20)); diff --git a/BossMod/Modules/Endwalker/Savage/P4S1Hesperos/P4S1States.cs b/BossMod/Modules/Endwalker/Savage/P4S1Hesperos/P4S1States.cs index 8ff7344a74..3d4273fa09 100644 --- a/BossMod/Modules/Endwalker/Savage/P4S1Hesperos/P4S1States.cs +++ b/BossMod/Modules/Endwalker/Savage/P4S1Hesperos/P4S1States.cs @@ -5,7 +5,7 @@ class P4S1States : StateMachineBuilder public P4S1States(BossModule module) : base(module) { SimplePhase(0, SinglePhase, "P1") - .Raw.Update = () => module.PrimaryActor.IsDestroyed || !module.PrimaryActor.IsTargetable; + .Raw.Update = () => Module.PrimaryActor.IsDestroyed || !Module.PrimaryActor.IsTargetable; } private void SinglePhase(uint id) diff --git a/BossMod/Modules/Endwalker/Savage/P4S1Hesperos/Pinax.cs b/BossMod/Modules/Endwalker/Savage/P4S1Hesperos/Pinax.cs index 4374ef56b4..94b5bca5de 100644 --- a/BossMod/Modules/Endwalker/Savage/P4S1Hesperos/Pinax.cs +++ b/BossMod/Modules/Endwalker/Savage/P4S1Hesperos/Pinax.cs @@ -1,7 +1,7 @@ namespace BossMod.Endwalker.Savage.P4S1Hesperos; // state related to pinax mechanics -class Pinax : BossComponent +class Pinax(BossModule module) : BossComponent(module) { private enum Order { Unknown, LUWU, WULU, LFWA, LAWF, WFLA, WALF } @@ -17,7 +17,7 @@ private enum Order { Unknown, LUWU, WULU, LFWA, LAWF, WFLA, WALF } private static readonly float _knockbackRadius = 13; private static readonly float _lightingSafeDistance = 16; // linear falloff until 16, then constant (not sure whether it is true distance-based or max-coord-based) - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_acid != null) { @@ -25,7 +25,7 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint { hints.Add("GTFO from acid square!"); } - hints.Add("Spread!", module.Raid.WithoutSlot().InRadiusExcluding(actor, _acidAOERadius).Any()); + hints.Add("Spread!", Raid.WithoutSlot().InRadiusExcluding(actor, _acidAOERadius).Any()); } if (_fire != null) { @@ -33,7 +33,7 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint { hints.Add("GTFO from fire square!"); } - hints.Add("Stack in fours!", module.Raid.WithoutSlot().Where(x => x.Role == Role.Healer).InRadius(actor.Position, _fireAOERadius).Count() != 1); + hints.Add("Stack in fours!", Raid.WithoutSlot().Where(x => x.Role == Role.Healer).InRadius(actor.Position, _fireAOERadius).Count() != 1); } if (_water != null) { @@ -41,7 +41,7 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint { hints.Add("GTFO from water square!"); } - if (!module.Bounds.Contains(Components.Knockback.AwayFromSource(actor.Position, module.Bounds.Center, _knockbackRadius))) + if (!Module.Bounds.Contains(Components.Knockback.AwayFromSource(actor.Position, Module.Bounds.Center, _knockbackRadius))) { hints.Add("About to be knocked into wall!"); } @@ -52,11 +52,11 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint { hints.Add("GTFO from lighting square!"); } - hints.Add("GTFO from center!", actor.Position.InRect(module.Bounds.Center, new WDir(1, 0), _lightingSafeDistance, _lightingSafeDistance, _lightingSafeDistance)); + hints.Add("GTFO from center!", actor.Position.InRect(Module.Bounds.Center, new WDir(1, 0), _lightingSafeDistance, _lightingSafeDistance, _lightingSafeDistance)); } } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { string order = _order switch { @@ -71,62 +71,62 @@ public override void AddGlobalHints(BossModule module, GlobalHints hints) hints.Add($"Pinax order: {order}"); } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { if (_acid != null) { - arena.ZoneRect(_acid.Position, new WDir(1, 0), 10, 10, 10, ArenaColor.AOE); + Arena.ZoneRect(_acid.Position, new WDir(1, 0), 10, 10, 10, ArenaColor.AOE); } if (_fire != null) { - arena.ZoneRect(_fire.Position, new WDir(1, 0), 10, 10, 10, ArenaColor.AOE); + Arena.ZoneRect(_fire.Position, new WDir(1, 0), 10, 10, 10, ArenaColor.AOE); } if (_water != null) { - arena.ZoneRect(_water.Position, new WDir(1, 0), 10, 10, 10, ArenaColor.AOE); + Arena.ZoneRect(_water.Position, new WDir(1, 0), 10, 10, 10, ArenaColor.AOE); } if (_lighting != null) { - arena.ZoneRect(_lighting.Position, new WDir(1, 0), 10, 10, 10, ArenaColor.AOE); - arena.ZoneRect(module.Bounds.Center, new WDir(1, 0), _lightingSafeDistance, _lightingSafeDistance, _lightingSafeDistance, ArenaColor.AOE); + Arena.ZoneRect(_lighting.Position, new WDir(1, 0), 10, 10, 10, ArenaColor.AOE); + Arena.ZoneRect(Module.Bounds.Center, new WDir(1, 0), _lightingSafeDistance, _lightingSafeDistance, _lightingSafeDistance, ArenaColor.AOE); } } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (_acid != null) { - arena.AddCircle(pc.Position, _acidAOERadius, ArenaColor.Danger); - foreach (var player in module.Raid.WithoutSlot().Exclude(pc)) - arena.Actor(player, player.Position.InCircle(pc.Position, _acidAOERadius) ? ArenaColor.PlayerInteresting : ArenaColor.PlayerGeneric); + Arena.AddCircle(pc.Position, _acidAOERadius, ArenaColor.Danger); + foreach (var player in Raid.WithoutSlot().Exclude(pc)) + Arena.Actor(player, player.Position.InCircle(pc.Position, _acidAOERadius) ? ArenaColor.PlayerInteresting : ArenaColor.PlayerGeneric); } if (_fire != null) { - foreach (var player in module.Raid.WithoutSlot()) + foreach (var player in Raid.WithoutSlot()) { if (player.Role == Role.Healer) { - arena.Actor(player, ArenaColor.Danger); - arena.AddCircle(player.Position, _fireAOERadius, ArenaColor.Danger); + Arena.Actor(player, ArenaColor.Danger); + Arena.AddCircle(player.Position, _fireAOERadius, ArenaColor.Danger); } else { - arena.Actor(player, ArenaColor.PlayerGeneric); + Arena.Actor(player, ArenaColor.PlayerGeneric); } } } if (_water != null) { - var adjPos = Components.Knockback.AwayFromSource(pc.Position, module.Bounds.Center, _knockbackRadius); + var adjPos = Components.Knockback.AwayFromSource(pc.Position, Module.Bounds.Center, _knockbackRadius); if (adjPos != pc.Position) { - arena.AddLine(pc.Position, adjPos, ArenaColor.Danger); - arena.Actor(adjPos, pc.Rotation, ArenaColor.Danger); + Arena.AddLine(pc.Position, adjPos, ArenaColor.Danger); + Arena.Actor(adjPos, pc.Rotation, ArenaColor.Danger); } } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { @@ -157,7 +157,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { diff --git a/BossMod/Modules/Endwalker/Savage/P4S1Hesperos/PinaxUptime.cs b/BossMod/Modules/Endwalker/Savage/P4S1Hesperos/PinaxUptime.cs index 3bf1fd5b9c..8ab8e84844 100644 --- a/BossMod/Modules/Endwalker/Savage/P4S1Hesperos/PinaxUptime.cs +++ b/BossMod/Modules/Endwalker/Savage/P4S1Hesperos/PinaxUptime.cs @@ -1,19 +1,19 @@ namespace BossMod.Endwalker.Savage.P4S1Hesperos; // component showing where to drag boss for max pinax uptime -class PinaxUptime : BossComponent +class PinaxUptime(BossModule module) : BossComponent(module) { - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (pc.Role != Role.Tank) return; // draw position between lighting and fire squares - var assignments = module.FindComponent()!; + var assignments = Module.FindComponent()!; var doubleOffset = assignments.Direction(assignments.Assignment(SettingTheScene.Element.Fire)) + assignments.Direction(assignments.Assignment(SettingTheScene.Element.Lightning)); - if (doubleOffset == new WDir()) + if (doubleOffset == default) return; - arena.AddCircle(module.Bounds.Center + 9 * doubleOffset, 2, ArenaColor.Safe); + Arena.AddCircle(Module.Bounds.Center + 9 * doubleOffset, 2, ArenaColor.Safe); } } diff --git a/BossMod/Modules/Endwalker/Savage/P4S1Hesperos/SettingTheScene.cs b/BossMod/Modules/Endwalker/Savage/P4S1Hesperos/SettingTheScene.cs index c8c9206375..633b96cd7d 100644 --- a/BossMod/Modules/Endwalker/Savage/P4S1Hesperos/SettingTheScene.cs +++ b/BossMod/Modules/Endwalker/Savage/P4S1Hesperos/SettingTheScene.cs @@ -1,7 +1,7 @@ namespace BossMod.Endwalker.Savage.P4S1Hesperos; // component detecting corner assignments for 'setting the scene'; it is used by other components to show various warnings -class SettingTheScene : BossComponent +class SettingTheScene(BossModule module) : BossComponent(module) { public enum Corner { Unknown, NE, SE, SW, NW } public enum Element { Fire, Lightning, Acid, Water } @@ -26,34 +26,34 @@ public WDir Direction(Corner corner) }; } - public Corner FromPos(BossModule module, WPos pos) + public Corner FromPos(WPos pos) { - return pos.X > module.Bounds.Center.X - ? (pos.Z > module.Bounds.Center.Z ? Corner.SE : Corner.NE) - : (pos.Z > module.Bounds.Center.Z ? Corner.SW : Corner.NW); + return pos.X > Module.Bounds.Center.X + ? (pos.Z > Module.Bounds.Center.Z ? Corner.SE : Corner.NE) + : (pos.Z > Module.Bounds.Center.Z ? Corner.SW : Corner.NW); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { // this is a fallback in case env-control assignment doesn't work for some reason... switch ((AID)spell.Action.ID) { case AID.PinaxAcid: - AssignFromCast(module, Element.Acid, caster.Position); + AssignFromCast(Element.Acid, caster.Position); break; case AID.PinaxLava: - AssignFromCast(module, Element.Fire, caster.Position); + AssignFromCast(Element.Fire, caster.Position); break; case AID.PinaxWell: - AssignFromCast(module, Element.Water, caster.Position); + AssignFromCast(Element.Water, caster.Position); break; case AID.PinaxLevinstrike: - AssignFromCast(module, Element.Lightning, caster.Position); + AssignFromCast(Element.Lightning, caster.Position); break; } } - public override void OnEventEnvControl(BossModule module, byte index, uint state) + public override void OnEventEnvControl(byte index, uint state) { // 8003759C, state=00020001 // what I've seen so far: @@ -87,13 +87,13 @@ public override void OnEventEnvControl(BossModule module, byte index, uint state } } - private void AssignFromCast(BossModule module, Element elem, WPos pos) + private void AssignFromCast(Element elem, WPos pos) { - var corner = FromPos(module, pos); + var corner = FromPos(pos); var prev = Assignment(elem); if (prev != Corner.Unknown && prev != corner) { - module.ReportError(this, $"Assignment mismatch: {prev} from env-control, {corner} from cast"); + ReportError($"Assignment mismatch: {prev} from env-control, {corner} from cast"); } _assignments[(int)elem] = corner; } diff --git a/BossMod/Modules/Endwalker/Savage/P4S1Hesperos/Shift.cs b/BossMod/Modules/Endwalker/Savage/P4S1Hesperos/Shift.cs index 8b101d151f..61d3898a33 100644 --- a/BossMod/Modules/Endwalker/Savage/P4S1Hesperos/Shift.cs +++ b/BossMod/Modules/Endwalker/Savage/P4S1Hesperos/Shift.cs @@ -1,7 +1,7 @@ namespace BossMod.Endwalker.Savage.P4S1Hesperos; // state related to shift mechanics -class Shift : BossComponent +class Shift(BossModule module) : BossComponent(module) { private AOEShapeCone _swordAOE = new(50, 60.Degrees()); private Actor? _swordCaster; @@ -9,39 +9,39 @@ class Shift : BossComponent private static readonly float _knockbackRange = 30; - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_swordAOE.Check(actor.Position, _swordCaster)) { hints.Add("GTFO from sword!"); } - else if (_cloakCaster != null && !module.Bounds.Contains(Components.Knockback.AwayFromSource(actor.Position, _cloakCaster, _knockbackRange))) + else if (_cloakCaster != null && !Module.Bounds.Contains(Components.Knockback.AwayFromSource(actor.Position, _cloakCaster, _knockbackRange))) { hints.Add("About to be knocked into wall!"); } } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { - _swordAOE.Draw(arena, _swordCaster); + _swordAOE.Draw(Arena, _swordCaster); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (_cloakCaster != null) { - arena.AddCircle(_cloakCaster.Position, 5, ArenaColor.Safe); + Arena.AddCircle(_cloakCaster.Position, 5, ArenaColor.Safe); var adjPos = Components.Knockback.AwayFromSource(pc.Position, _cloakCaster, _knockbackRange); if (adjPos != pc.Position) { - arena.AddLine(pc.Position, adjPos, ArenaColor.Danger); - arena.Actor(adjPos, pc.Rotation, ArenaColor.Danger); + Arena.AddLine(pc.Position, adjPos, ArenaColor.Danger); + Arena.Actor(adjPos, pc.Rotation, ArenaColor.Danger); } } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { @@ -54,7 +54,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { diff --git a/BossMod/Modules/Endwalker/Savage/P4S1Hesperos/VengefulBelone.cs b/BossMod/Modules/Endwalker/Savage/P4S1Hesperos/VengefulBelone.cs index a0c3920691..fce3803c80 100644 --- a/BossMod/Modules/Endwalker/Savage/P4S1Hesperos/VengefulBelone.cs +++ b/BossMod/Modules/Endwalker/Savage/P4S1Hesperos/VengefulBelone.cs @@ -1,7 +1,7 @@ namespace BossMod.Endwalker.Savage.P4S1Hesperos; // state related to vengeful belone mechanic -class VengefulBelone : BossComponent +class VengefulBelone(BossModule module) : BossComponent(module) { private Dictionary _orbTargets = new(); private int _orbsExploded = 0; @@ -12,7 +12,7 @@ class VengefulBelone : BossComponent private Role OrbTarget(ulong instanceID) => _orbTargets.GetValueOrDefault(instanceID, Role.None); - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_orbTargets.Count == 0 || _orbsExploded == _orbTargets.Count) return; // inactive @@ -23,7 +23,7 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint hints.Add("Failed orbs..."); } - if (module.Enemies(OID.Orb).Where(orb => IsOrbLethal(slot, actor, OrbTarget(orb.InstanceID))).InRadius(actor.Position, _burstRadius).Any()) + if (Module.Enemies(OID.Orb).Where(orb => IsOrbLethal(slot, actor, OrbTarget(orb.InstanceID))).InRadius(actor.Position, _burstRadius).Any()) { hints.Add("GTFO from wrong orb!"); } @@ -39,12 +39,12 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (_orbTargets.Count == 0 || _orbsExploded == _orbTargets.Count) return; - var orbs = module.Enemies(OID.Orb); + var orbs = Module.Enemies(OID.Orb); foreach (var orb in orbs) { var orbRole = OrbTarget(orb.InstanceID); @@ -52,16 +52,16 @@ public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc continue; // this orb has already exploded bool lethal = IsOrbLethal(pcSlot, pc, orbRole); - arena.Actor(orb, lethal ? ArenaColor.Enemy : ArenaColor.Danger, true); + Arena.Actor(orb, lethal ? ArenaColor.Enemy : ArenaColor.Danger, true); - var target = module.WorldState.Actors.Find(orb.Tether.Target); + var target = WorldState.Actors.Find(orb.Tether.Target); if (target != null) { - arena.AddLine(orb.Position, target.Position, ArenaColor.Danger); + Arena.AddLine(orb.Position, target.Position, ArenaColor.Danger); } int goodInRange = 0, badInRange = 0; - foreach ((var i, var player) in module.Raid.WithSlot().InRadius(orb.Position, _burstRadius)) + foreach ((var i, var player) in Raid.WithSlot().InRadius(orb.Position, _burstRadius)) { if (IsOrbLethal(i, player, orbRole)) ++badInRange; @@ -70,17 +70,17 @@ public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc } bool goodToExplode = goodInRange == 2 && badInRange == 0; - arena.AddCircle(orb.Position, _burstRadius, goodToExplode ? ArenaColor.Safe : ArenaColor.Danger); + Arena.AddCircle(orb.Position, _burstRadius, goodToExplode ? ArenaColor.Safe : ArenaColor.Danger); } - foreach ((int i, var player) in module.Raid.WithSlot()) + foreach ((int i, var player) in Raid.WithSlot()) { bool nearLethalOrb = orbs.Where(orb => IsOrbLethal(i, player, OrbTarget(orb.InstanceID))).InRadius(player.Position, _burstRadius).Any(); - arena.Actor(player, nearLethalOrb ? ArenaColor.PlayerInteresting : ArenaColor.PlayerGeneric); + Arena.Actor(player, nearLethalOrb ? ArenaColor.PlayerInteresting : ArenaColor.PlayerGeneric); } } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { switch ((SID)status.ID) { @@ -88,36 +88,36 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st _orbTargets[actor.InstanceID] = OrbRoleFromStatusParam(status.Extra); break; case SID.ThriceComeRuin: - ModifyRuinStacks(module, actor, status.Extra); + ModifyRuinStacks(actor, status.Extra); break; case SID.ActingDPS: - ModifyActingRole(module, actor, Role.Melee); + ModifyActingRole(actor, Role.Melee); break; case SID.ActingHealer: - ModifyActingRole(module, actor, Role.Healer); + ModifyActingRole(actor, Role.Healer); break; case SID.ActingTank: - ModifyActingRole(module, actor, Role.Tank); + ModifyActingRole(actor, Role.Tank); break; } } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { switch ((SID)status.ID) { case SID.ThriceComeRuin: - ModifyRuinStacks(module, actor, 0); + ModifyRuinStacks(actor, 0); break; case SID.ActingDPS: case SID.ActingHealer: case SID.ActingTank: - ModifyActingRole(module, actor, Role.None); + ModifyActingRole(actor, Role.None); break; } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.BeloneBurstsAOETank or AID.BeloneBurstsAOEHealer or AID.BeloneBurstsAOEDPS) { @@ -151,16 +151,16 @@ private bool IsOrbLethal(int slot, Actor player, Role orbRole) return orbRole == playerRole; } - private void ModifyRuinStacks(BossModule module, Actor actor, ushort count) + private void ModifyRuinStacks(Actor actor, ushort count) { - int slot = module.Raid.FindSlot(actor.InstanceID); + int slot = Raid.FindSlot(actor.InstanceID); if (slot >= 0) _playerRuinCount[slot] = count; } - private void ModifyActingRole(BossModule module, Actor actor, Role role) + private void ModifyActingRole(Actor actor, Role role) { - int slot = module.Raid.FindSlot(actor.InstanceID); + int slot = Raid.FindSlot(actor.InstanceID); if (slot >= 0) _playerActingRole[slot] = role; } diff --git a/BossMod/Modules/Endwalker/Savage/P4S2Hesperos/CurtainCall.cs b/BossMod/Modules/Endwalker/Savage/P4S2Hesperos/CurtainCall.cs index b49104726e..37e1d61f23 100644 --- a/BossMod/Modules/Endwalker/Savage/P4S2Hesperos/CurtainCall.cs +++ b/BossMod/Modules/Endwalker/Savage/P4S2Hesperos/CurtainCall.cs @@ -1,21 +1,21 @@ namespace BossMod.Endwalker.Savage.P4S2Hesperos; // state related to curtain call mechanic -class CurtainCall : BossComponent +class CurtainCall(BossModule module) : BossComponent(module) { private int[] _playerOrder = new int[8]; private List? _playersInBreakOrder; private int _numCasts = 0; - public override void Update(BossModule module) + public override void Update() { if (_playersInBreakOrder == null) { - _playersInBreakOrder = module.Raid.Members.Zip(_playerOrder).Where(po => po.Item1 != null && po.Item2 != 0).OrderBy(po => po.Item2).Select(po => po.Item1!).ToList(); + _playersInBreakOrder = Raid.Members.Zip(_playerOrder).Where(po => po.Item1 != null && po.Item2 != 0).OrderBy(po => po.Item2).Select(po => po.Item1!).ToList(); } } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_playerOrder[slot] > _numCasts) { @@ -24,32 +24,32 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (_playersInBreakOrder != null) - hints.Add($"Order: {string.Join(" -> ", _playersInBreakOrder.Skip(_numCasts).Select(a => OrderTextForPlayer(module, a)))}"); + hints.Add($"Order: {string.Join(" -> ", _playersInBreakOrder.Skip(_numCasts).Select(OrderTextForPlayer))}"); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { // draw other players - foreach ((int slot, var player) in module.Raid.WithSlot().Exclude(pc)) - arena.Actor(player, _playerOrder[slot] == _numCasts + 1 ? ArenaColor.Danger : ArenaColor.PlayerGeneric); + foreach ((int slot, var player) in Raid.WithSlot().Exclude(pc)) + Arena.Actor(player, _playerOrder[slot] == _numCasts + 1 ? ArenaColor.Danger : ArenaColor.PlayerGeneric); // tether - var tetherTarget = module.WorldState.Actors.Find(pc.Tether.Target); + var tetherTarget = WorldState.Actors.Find(pc.Tether.Target); if (tetherTarget != null) - arena.AddLine(pc.Position, tetherTarget.Position, pc.Tether.ID == (uint)TetherID.WreathOfThorns ? ArenaColor.Danger : ArenaColor.Safe); + Arena.AddLine(pc.Position, tetherTarget.Position, pc.Tether.ID == (uint)TetherID.WreathOfThorns ? ArenaColor.Danger : ArenaColor.Safe); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Thornpricked) { - int slot = module.Raid.FindSlot(actor.InstanceID); + int slot = Raid.FindSlot(actor.InstanceID); if (slot >= 0) { - _playerOrder[slot] = 2 * (int)((status.ExpireAt - module.WorldState.CurrentTime).TotalSeconds / 10); // 2/4/6/8 + _playerOrder[slot] = 2 * (int)((status.ExpireAt - WorldState.CurrentTime).TotalSeconds / 10); // 2/4/6/8 bool ddFirst = Service.Config.Get().CurtainCallDDFirst; if (ddFirst != actor.Role is Role.Tank or Role.Healer) --_playerOrder[slot]; @@ -58,17 +58,17 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st } } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Thornpricked) ++_numCasts; } - private string OrderTextForPlayer(BossModule module, Actor player) + private string OrderTextForPlayer(Actor player) { //return player.Name; var status = player.FindStatus((uint)SID.Thornpricked); - var remaining = status != null ? (status.Value.ExpireAt - module.WorldState.CurrentTime).TotalSeconds : 0; + var remaining = status != null ? (status.Value.ExpireAt - WorldState.CurrentTime).TotalSeconds : 0; return $"{player.Name} ({remaining:f1}s)"; } } diff --git a/BossMod/Modules/Endwalker/Savage/P4S2Hesperos/HellsSting.cs b/BossMod/Modules/Endwalker/Savage/P4S2Hesperos/HellsSting.cs index 4c56c664e1..3ff6ae668f 100644 --- a/BossMod/Modules/Endwalker/Savage/P4S2Hesperos/HellsSting.cs +++ b/BossMod/Modules/Endwalker/Savage/P4S2Hesperos/HellsSting.cs @@ -1,38 +1,38 @@ namespace BossMod.Endwalker.Savage.P4S2Hesperos; // state related to hell's sting mechanic (part of curtain call sequence) -class HellsSting : BossComponent +class HellsSting(BossModule module) : BossComponent(module) { public int NumCasts { get; private set; } = 0; private AOEShapeCone _cone = new(50, 15.Degrees()); private List _directions = new(); - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (NumCasts >= _directions.Count * 2) return; - if (ConeDirections().Any(x => actor.Position.InCone(module.PrimaryActor.Position, x, _cone.HalfAngle))) + if (ConeDirections().Any(x => actor.Position.InCone(Module.PrimaryActor.Position, x, _cone.HalfAngle))) hints.Add("GTFO from cone!"); } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { if (NumCasts >= _directions.Count * 2) return; foreach (var dir in ConeDirections()) - _cone.Draw(arena, module.PrimaryActor.Position, dir); + _cone.Draw(Arena, Module.PrimaryActor.Position, dir); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.HellsStingAOE1) _directions.Add(caster.Rotation); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.HellsStingAOE1 or AID.HellsStingAOE2) ++NumCasts; diff --git a/BossMod/Modules/Endwalker/Savage/P4S2Hesperos/NearFarSight.cs b/BossMod/Modules/Endwalker/Savage/P4S2Hesperos/NearFarSight.cs index 328e3c0256..3050dbdf3e 100644 --- a/BossMod/Modules/Endwalker/Savage/P4S2Hesperos/NearFarSight.cs +++ b/BossMod/Modules/Endwalker/Savage/P4S2Hesperos/NearFarSight.cs @@ -11,33 +11,33 @@ public enum State { Near, Far, Done } private static readonly float _aoeRadius = 5; - public override void Init(BossModule module) + public NearFarSight(BossModule module) : base(module) { - CurState = (AID)(module.PrimaryActor.CastInfo?.Action.ID ?? 0) switch + CurState = (AID)(Module.PrimaryActor.CastInfo?.Action.ID ?? 0) switch { AID.Nearsight => State.Near, AID.Farsight => State.Far, _ => State.Done }; if (CurState == State.Done) - module.ReportError(this, $"Failed to initialize near/far sight, unexpected cast {module.PrimaryActor.CastInfo?.Action}"); + ReportError($"Failed to initialize near/far sight, unexpected cast {Module.PrimaryActor.CastInfo?.Action}"); } - public override void Update(BossModule module) + public override void Update() { _targets = _inAOE = new(); if (CurState == State.Done) return; - var playersByRange = module.Raid.WithSlot().SortedByRange(module.PrimaryActor.Position); + var playersByRange = Raid.WithSlot().SortedByRange(Module.PrimaryActor.Position); foreach ((int i, var player) in CurState == State.Near ? playersByRange.Take(2) : playersByRange.TakeLast(2)) { _targets.Set(i); - _inAOE |= module.Raid.WithSlot().InRadiusExcluding(player, _aoeRadius).Mask(); + _inAOE |= Raid.WithSlot().InRadiusExcluding(player, _aoeRadius).Mask(); } } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_targets.None()) return; @@ -53,26 +53,26 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (_targets.None()) return; - foreach ((int i, var player) in module.Raid.WithSlot()) + foreach ((int i, var player) in Raid.WithSlot()) { if (_targets[i]) { - arena.Actor(player, ArenaColor.Danger); - arena.AddCircle(player.Position, _aoeRadius, ArenaColor.Danger); + Arena.Actor(player, ArenaColor.Danger); + Arena.AddCircle(player.Position, _aoeRadius, ArenaColor.Danger); } else { - arena.Actor(player, _inAOE[i] ? ArenaColor.PlayerInteresting : ArenaColor.PlayerGeneric); + Arena.Actor(player, _inAOE[i] ? ArenaColor.PlayerInteresting : ArenaColor.PlayerGeneric); } } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.NearsightAOE or AID.FarsightAOE) CurState = State.Done; diff --git a/BossMod/Modules/Endwalker/Savage/P4S2Hesperos/P4S2.cs b/BossMod/Modules/Endwalker/Savage/P4S2Hesperos/P4S2.cs index d3d339a348..2bd0831cca 100644 --- a/BossMod/Modules/Endwalker/Savage/P4S2Hesperos/P4S2.cs +++ b/BossMod/Modules/Endwalker/Savage/P4S2Hesperos/P4S2.cs @@ -1,24 +1,16 @@ namespace BossMod.Endwalker.Savage.P4S2Hesperos; // state related to demigod double mechanic (shared tankbuster) -class DemigodDouble : Components.CastSharedTankbuster -{ - public DemigodDouble() : base(ActionID.MakeSpell(AID.DemigodDouble), 6) { } -} +class DemigodDouble(BossModule module) : Components.CastSharedTankbuster(module, ActionID.MakeSpell(AID.DemigodDouble), 6); // state related to heart stake mechanic (dual hit tankbuster with bleed) // TODO: consider showing some tank swap / invul hint... -class HeartStake : Components.CastCounter -{ - public HeartStake() : base(ActionID.MakeSpell(AID.HeartStakeSecond)) { } -} +class HeartStake(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.HeartStakeSecond)); [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 801, NameID = 10744, SortOrder = 2)] -public class P4S2 : BossModule +public class P4S2(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { // common wreath of thorns constants public static readonly float WreathAOERadius = 20; public static readonly float WreathTowerRadius = 4; - - public P4S2(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { } } diff --git a/BossMod/Modules/Endwalker/Savage/P4S2Hesperos/P4S2Config.cs b/BossMod/Modules/Endwalker/Savage/P4S2Hesperos/P4S2Config.cs index cecff2b63b..c5b5be644b 100644 --- a/BossMod/Modules/Endwalker/Savage/P4S2Hesperos/P4S2Config.cs +++ b/BossMod/Modules/Endwalker/Savage/P4S2Hesperos/P4S2Config.cs @@ -1,7 +1,7 @@ namespace BossMod.Endwalker.Savage.P4S2Hesperos; [ConfigDisplay(Order = 0x142, Parent = typeof(EndwalkerConfig))] -public class P4S2Config : CooldownPlanningConfigNode +public class P4S2Config() : CooldownPlanningConfigNode(90) { [PropertyDisplay("Act 4: go 1/8 CCW to soak tower with dark debuff")] public bool Act4DarkSoakCCW = false; @@ -11,6 +11,4 @@ public class P4S2Config : CooldownPlanningConfigNode [PropertyDisplay("Curtain call: DD break debuff first")] public bool CurtainCallDDFirst = false; - - public P4S2Config() : base(90) { } } diff --git a/BossMod/Modules/Endwalker/Savage/P4S2Hesperos/WreathOfThorns1.cs b/BossMod/Modules/Endwalker/Savage/P4S2Hesperos/WreathOfThorns1.cs index 22ce70f466..bb867b1f4f 100644 --- a/BossMod/Modules/Endwalker/Savage/P4S2Hesperos/WreathOfThorns1.cs +++ b/BossMod/Modules/Endwalker/Savage/P4S2Hesperos/WreathOfThorns1.cs @@ -2,7 +2,7 @@ // state related to act 1 wreath of thorns // note: there should be two tethered helpers for aoes on activation -class WreathOfThorns1 : BossComponent +class WreathOfThorns1(BossModule module) : BossComponent(module) { public enum State { FirstAOEs, Towers, LastAOEs, Done } @@ -13,7 +13,7 @@ public enum State { FirstAOEs, Towers, LastAOEs, Done } private IEnumerable _towers => _relevantHelpers.Skip(2).Take(8); private IEnumerable _lastAOEs => _relevantHelpers.Skip(10); - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { switch (CurState) { @@ -30,7 +30,7 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint { hints.Add("Soak the tower!"); } - else if (module.Raid.WithoutSlot().Exclude(actor).InRadius(soakedTower.Position, P4S2.WreathTowerRadius).Any()) + else if (Raid.WithoutSlot().Exclude(actor).InRadius(soakedTower.Position, P4S2.WreathTowerRadius).Any()) { hints.Add("Multiple soakers for the tower!"); } @@ -45,31 +45,31 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { if (CurState == State.FirstAOEs || CurState == State.LastAOEs) foreach (var aoe in CurState == State.FirstAOEs ? _firstAOEs : _lastAOEs) - arena.ZoneCircle(aoe.Position, P4S2.WreathAOERadius, ArenaColor.AOE); + Arena.ZoneCircle(aoe.Position, P4S2.WreathAOERadius, ArenaColor.AOE); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (CurState == State.Towers) { foreach (var tower in _towers) - arena.AddCircle(tower.Position, P4S2.WreathTowerRadius, ArenaColor.Safe); - foreach (var player in module.Raid.WithoutSlot()) - arena.Actor(player, ArenaColor.PlayerGeneric); + Arena.AddCircle(tower.Position, P4S2.WreathTowerRadius, ArenaColor.Safe); + foreach (var player in Raid.WithoutSlot()) + Arena.Actor(player, ArenaColor.PlayerGeneric); } } - public override void OnTethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnTethered(Actor source, ActorTetherInfo tether) { if (source.OID == (uint)OID.Helper && tether.ID == (uint)TetherID.WreathOfThorns) _relevantHelpers.Add(source); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if (CurState == State.FirstAOEs && (AID)spell.Action.ID == AID.AkanthaiExplodeAOE) CurState = State.Towers; diff --git a/BossMod/Modules/Endwalker/Savage/P4S2Hesperos/WreathOfThorns2.cs b/BossMod/Modules/Endwalker/Savage/P4S2Hesperos/WreathOfThorns2.cs index 23aa18a805..46ef6844e1 100644 --- a/BossMod/Modules/Endwalker/Savage/P4S2Hesperos/WreathOfThorns2.cs +++ b/BossMod/Modules/Endwalker/Savage/P4S2Hesperos/WreathOfThorns2.cs @@ -3,7 +3,7 @@ // state related to act 2 wreath of thorns // note: there should be four tethered helpers on activation // note: we assume that (1) dark targets soak all towers, (2) first fire to be broken is tank-healer pair (since their debuff is slightly shorter) -class WreathOfThorns2 : BossComponent +class WreathOfThorns2(BossModule module) : BossComponent(module) { public enum State { DarkDesign, FirstSet, SecondSet, Done } @@ -20,7 +20,7 @@ public enum State { DarkDesign, FirstSet, SecondSet, Done } private static readonly float _fireExplosionRadius = 6; - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { bool isTowerSoaker = actor == _darkTH.Item1 || actor == _darkTH.Item2; if (CurState == State.DarkDesign) @@ -70,25 +70,25 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { if (CurState == State.Done) return; foreach (var aoe in (CurState == State.SecondSet ? _secondSet : _firstSet).Where(IsAOE)) - arena.ZoneCircle(aoe.Position, P4S2.WreathAOERadius, ArenaColor.AOE); + Arena.ZoneCircle(aoe.Position, P4S2.WreathAOERadius, ArenaColor.AOE); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { // draw players - foreach (var player in module.Raid.WithoutSlot().Exclude(pc)) - arena.Actor(player, ArenaColor.PlayerGeneric); + foreach (var player in Raid.WithoutSlot().Exclude(pc)) + Arena.Actor(player, ArenaColor.PlayerGeneric); // draw pc's tether var pcPartner = pc.Tether.Target != 0 - ? module.WorldState.Actors.Find(pc.Tether.Target) - : module.Raid.WithoutSlot().FirstOrDefault(p => p.Tether.Target == pc.InstanceID); + ? WorldState.Actors.Find(pc.Tether.Target) + : Raid.WithoutSlot().FirstOrDefault(p => p.Tether.Target == pc.InstanceID); if (pcPartner != null) { var tetherColor = _playerIcons[pcSlot] switch { @@ -96,14 +96,14 @@ public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc IconID.AkanthaiWind => 0xff00ff00, _ => 0xffff00ff }; - arena.AddLine(pc.Position, pcPartner.Position, tetherColor); + Arena.AddLine(pc.Position, pcPartner.Position, tetherColor); } // draw towers for designated tower soakers bool isTowerSoaker = pc == _darkTH.Item1 || pc == _darkTH.Item2; if (isTowerSoaker && CurState != State.Done) foreach (var tower in (CurState == State.SecondSet ? _secondSet : _firstSet).Where(IsTower)) - arena.AddCircle(tower.Position, P4S2.WreathTowerRadius, CurState == State.DarkDesign ? ArenaColor.Danger : ArenaColor.Safe); + Arena.AddCircle(tower.Position, P4S2.WreathTowerRadius, CurState == State.DarkDesign ? ArenaColor.Danger : ArenaColor.Safe); // draw circles around next imminent fire explosion if (CurState != State.DarkDesign) @@ -111,13 +111,13 @@ public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc var curFirePair = (_fireTH.Item1 != null && _fireTH.Item1.Tether.ID != 0) ? _fireTH : ((_fireDD.Item1 != null && _fireDD.Item1.Tether.ID != 0) ? _fireDD : (null, null)); if (curFirePair.Item1 != null) { - arena.AddCircle(curFirePair.Item1!.Position, _fireExplosionRadius, isTowerSoaker ? ArenaColor.Danger : ArenaColor.Safe); - arena.AddCircle(curFirePair.Item2!.Position, _fireExplosionRadius, isTowerSoaker ? ArenaColor.Danger : ArenaColor.Safe); + Arena.AddCircle(curFirePair.Item1!.Position, _fireExplosionRadius, isTowerSoaker ? ArenaColor.Danger : ArenaColor.Safe); + Arena.AddCircle(curFirePair.Item2!.Position, _fireExplosionRadius, isTowerSoaker ? ArenaColor.Danger : ArenaColor.Safe); } } } - public override void OnTethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnTethered(Actor source, ActorTetherInfo tether) { if (source.OID == (uint)OID.Helper && tether.ID == (uint)TetherID.WreathOfThorns) { @@ -125,11 +125,11 @@ public override void OnTethered(BossModule module, Actor source, ActorTetherInfo } else if (source.Type == ActorType.Player) { - PlayerTetherOrIconAssigned(module, module.Raid.FindSlot(source.InstanceID), source); + PlayerTetherOrIconAssigned(Raid.FindSlot(source.InstanceID), source); } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if (CurState == State.DarkDesign && (AID)spell.Action.ID == AID.DarkDesign) CurState = State.FirstSet; @@ -139,22 +139,22 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn CurState = State.Done; } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { - var slot = module.Raid.FindSlot(actor.InstanceID); + var slot = Raid.FindSlot(actor.InstanceID); if (slot == -1) return; _playerIcons[slot] = (IconID)iconID; - PlayerTetherOrIconAssigned(module, slot, actor); + PlayerTetherOrIconAssigned(slot, actor); } - private void PlayerTetherOrIconAssigned(BossModule module, int slot, Actor actor) + private void PlayerTetherOrIconAssigned(int slot, Actor actor) { if (slot == -1 || _playerIcons[slot] == IconID.None || actor.Tether.Target == 0) return; // icon or tether not assigned yet - var tetherTarget = module.WorldState.Actors.Find(actor.Tether.Target); + var tetherTarget = WorldState.Actors.Find(actor.Tether.Target); if (tetherTarget == null) return; // weird diff --git a/BossMod/Modules/Endwalker/Savage/P4S2Hesperos/WreathOfThorns3.cs b/BossMod/Modules/Endwalker/Savage/P4S2Hesperos/WreathOfThorns3.cs index bbb68d76f6..5f66715b8d 100644 --- a/BossMod/Modules/Endwalker/Savage/P4S2Hesperos/WreathOfThorns3.cs +++ b/BossMod/Modules/Endwalker/Savage/P4S2Hesperos/WreathOfThorns3.cs @@ -2,7 +2,7 @@ // state related to act 3 wreath of thorns // note: there should be four tethered helpers on activation -class WreathOfThorns3 : BossComponent +class WreathOfThorns3(BossModule module) : BossComponent(module) { public enum State { RangedTowers, Knockback, MeleeTowers, Done } @@ -21,29 +21,29 @@ public enum State { RangedTowers, Knockback, MeleeTowers, Done } private static readonly float _jumpAOERadius = 10; - public override void Update(BossModule module) + public override void Update() { _coneTargets = _playersInAOE = new(); if (NumCones == NumJumps) { - _jumpTarget = module.Raid.WithoutSlot().SortedByRange(module.PrimaryActor.Position).LastOrDefault(); - _playersInAOE = _jumpTarget != null ? module.Raid.WithSlot().InRadiusExcluding(_jumpTarget, _jumpAOERadius).Mask() : new(); + _jumpTarget = Raid.WithoutSlot().SortedByRange(Module.PrimaryActor.Position).LastOrDefault(); + _playersInAOE = _jumpTarget != null ? Raid.WithSlot().InRadiusExcluding(_jumpTarget, _jumpAOERadius).Mask() : new(); } else { - foreach ((int i, var player) in module.Raid.WithSlot().SortedByRange(module.PrimaryActor.Position).Take(3)) + foreach ((int i, var player) in Raid.WithSlot().SortedByRange(Module.PrimaryActor.Position).Take(3)) { _coneTargets.Set(i); - if (player.Position != module.PrimaryActor.Position) + if (player.Position != Module.PrimaryActor.Position) { - var direction = (player.Position - module.PrimaryActor.Position).Normalized(); - _playersInAOE |= module.Raid.WithSlot().Exclude(i).WhereActor(p => p.Position.InCone(module.PrimaryActor.Position, direction, _coneAOE.HalfAngle)).Mask(); + var direction = (player.Position - Module.PrimaryActor.Position).Normalized(); + _playersInAOE |= Raid.WithSlot().Exclude(i).WhereActor(p => p.Position.InCone(Module.PrimaryActor.Position, direction, _coneAOE.HalfAngle)).Mask(); } } } } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (CurState != State.Done) { @@ -76,48 +76,48 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { if (_coneTargets.Any()) { - foreach ((_, var player) in module.Raid.WithSlot().IncludedInMask(_coneTargets)) + foreach ((_, var player) in Raid.WithSlot().IncludedInMask(_coneTargets)) { - _coneAOE.Draw(arena, module.PrimaryActor.Position, Angle.FromDirection(player.Position - module.PrimaryActor.Position)); + _coneAOE.Draw(Arena, Module.PrimaryActor.Position, Angle.FromDirection(player.Position - Module.PrimaryActor.Position)); } } } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - foreach ((int i, var player) in module.Raid.WithSlot()) - arena.Actor(player, _playersInAOE[i] ? ArenaColor.PlayerInteresting : ArenaColor.PlayerGeneric); + foreach ((int i, var player) in Raid.WithSlot()) + Arena.Actor(player, _playersInAOE[i] ? ArenaColor.PlayerInteresting : ArenaColor.PlayerGeneric); if (CurState != State.Done) { foreach (var tower in (CurState == State.RangedTowers ? _rangedTowers : _meleeTowers)) - arena.AddCircle(tower.Position, P4S2.WreathTowerRadius, ArenaColor.Safe); + Arena.AddCircle(tower.Position, P4S2.WreathTowerRadius, ArenaColor.Safe); } if (NumCones != NumJumps) { - foreach ((_, var player) in module.Raid.WithSlot().IncludedInMask(_coneTargets)) - arena.Actor(player, ArenaColor.Danger); - arena.Actor(_jumpTarget, ArenaColor.Vulnerable); + foreach ((_, var player) in Raid.WithSlot().IncludedInMask(_coneTargets)) + Arena.Actor(player, ArenaColor.Danger); + Arena.Actor(_jumpTarget, ArenaColor.Vulnerable); } else if (_jumpTarget != null) { - arena.Actor(_jumpTarget, ArenaColor.Danger); - arena.AddCircle(_jumpTarget.Position, _jumpAOERadius, ArenaColor.Danger); + Arena.Actor(_jumpTarget, ArenaColor.Danger); + Arena.AddCircle(_jumpTarget.Position, _jumpAOERadius, ArenaColor.Danger); } } - public override void OnTethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnTethered(Actor source, ActorTetherInfo tether) { if (source.OID == (uint)OID.Helper && tether.ID == (uint)TetherID.WreathOfThorns) _relevantHelpers.Add(source); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if (CurState == State.RangedTowers && (AID)spell.Action.ID == AID.AkanthaiExplodeTower) CurState = State.Knockback; @@ -127,13 +127,13 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn CurState = State.Done; } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { case AID.KothornosKickJump: ++NumJumps; - _jumpTarget = module.WorldState.Actors.Find(spell.MainTargetID); + _jumpTarget = WorldState.Actors.Find(spell.MainTargetID); break; case AID.KothornosQuake1: case AID.KothornosQuake2: diff --git a/BossMod/Modules/Endwalker/Savage/P4S2Hesperos/WreathOfThorns4.cs b/BossMod/Modules/Endwalker/Savage/P4S2Hesperos/WreathOfThorns4.cs index 66208b9811..94d44b1d9d 100644 --- a/BossMod/Modules/Endwalker/Savage/P4S2Hesperos/WreathOfThorns4.cs +++ b/BossMod/Modules/Endwalker/Savage/P4S2Hesperos/WreathOfThorns4.cs @@ -1,7 +1,7 @@ namespace BossMod.Endwalker.Savage.P4S2Hesperos; // state related to act 4 wreath of thorns -class WreathOfThorns4 : BossComponent +class WreathOfThorns4(BossModule module) : BossComponent(module) { public bool ReadyToBreak; private IconID[] _playerIcons = new IconID[8]; @@ -12,14 +12,14 @@ class WreathOfThorns4 : BossComponent private static readonly float _waterExplosionRange = 10; - public override void Update(BossModule module) + public override void Update() { if (_darkOrder == null && _activeTethers == 8) { // build order for dark explosion; TODO: this is quite hacky right now, and probably should be configurable // current logic assumes we break N or NW tether first, and then move clockwise _darkOrder = new(); - var c = module.Bounds.Center; + var c = Module.Bounds.Center; AddAOETargetToOrder(_darkOrder, p => p.Z < c.Z && p.X <= c.X); AddAOETargetToOrder(_darkOrder, p => p.X > c.X && p.Z <= c.Z); AddAOETargetToOrder(_darkOrder, p => p.Z > c.Z && p.X >= c.X); @@ -43,7 +43,7 @@ public override void Update(BossModule module) } } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (!ReadyToBreak) return; @@ -53,7 +53,7 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint if (_playerIcons[slot] == IconID.AkanthaiWater) { hints.Add("Break tether!"); - if (module.Raid.WithoutSlot().InRadiusExcluding(actor, _waterExplosionRange).Any()) + if (Raid.WithoutSlot().InRadiusExcluding(actor, _waterExplosionRange).Any()) { hints.Add("GTFO from others!"); } @@ -81,32 +81,32 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (_darkOrder != null && _activeTethers > 0) { var skip = 4 - Math.Min(_activeTethers, 4); - hints.Add($"Dark order: {string.Join(" -> ", _darkOrder.Skip(skip).Select(src => module.WorldState.Actors.Find(src.Tether.Target)?.Name ?? "???"))}"); + hints.Add($"Dark order: {string.Join(" -> ", _darkOrder.Skip(skip).Select(src => WorldState.Actors.Find(src.Tether.Target)?.Name ?? "???"))}"); } } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { if (_doneTowers < 4) return; var nextAOE = NextAOE(); if (nextAOE != null) - arena.ZoneCircle(nextAOE.Position, P4S2.WreathAOERadius, ArenaColor.AOE); + Arena.ZoneCircle(nextAOE.Position, P4S2.WreathAOERadius, ArenaColor.AOE); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { // draw other players - foreach ((int slot, var player) in module.Raid.WithSlot().Exclude(pc)) + foreach ((int slot, var player) in Raid.WithSlot().Exclude(pc)) { var icon = _playerIcons[slot]; bool nextBreaking = _doneTowers < 4 ? icon == IconID.AkanthaiWater : (icon == IconID.AkanthaiDark && NextAOE()?.Tether.Target == player.InstanceID); - arena.Actor(player, nextBreaking ? ArenaColor.Danger : ArenaColor.PlayerGeneric); + Arena.Actor(player, nextBreaking ? ArenaColor.Danger : ArenaColor.PlayerGeneric); } // tether @@ -115,40 +115,40 @@ public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc return; // pc is not tethered anymore, nothing to draw... var pcIcon = _playerIcons[pcSlot]; - arena.AddLine(pc.Position, pcTetherSource.Position, pcIcon == IconID.AkanthaiWater ? 0xffff8000 : 0xffff00ff); + Arena.AddLine(pc.Position, pcTetherSource.Position, pcIcon == IconID.AkanthaiWater ? 0xffff8000 : 0xffff00ff); if (_doneTowers < 4) { if (pcIcon == IconID.AkanthaiWater) { // if player has blue => show AOE radius around him and single safe spot - arena.AddCircle(pc.Position, _waterExplosionRange, ArenaColor.Danger); - arena.AddCircle(DetermineWaterSafeSpot(module, pcTetherSource), 1, ArenaColor.Safe); + Arena.AddCircle(pc.Position, _waterExplosionRange, ArenaColor.Danger); + Arena.AddCircle(DetermineWaterSafeSpot(pcTetherSource), 1, ArenaColor.Safe); } else { // if player has dark => show AOE radius around blue players and single tower to soak - foreach ((var player, var icon) in module.Raid.Members.Zip(_playerIcons)) + foreach ((var player, var icon) in Raid.Members.Zip(_playerIcons)) { if (icon == IconID.AkanthaiWater && player != null) { - arena.AddCircle(player.Position, _waterExplosionRange, ArenaColor.Danger); + Arena.AddCircle(player.Position, _waterExplosionRange, ArenaColor.Danger); } } - var tower = DetermineTowerToSoak(module, pcTetherSource); + var tower = DetermineTowerToSoak(pcTetherSource); if (tower != null) { - arena.AddCircle(tower.Position, P4S2.WreathTowerRadius, ArenaColor.Safe); + Arena.AddCircle(tower.Position, P4S2.WreathTowerRadius, ArenaColor.Safe); } } } } - public override void OnTethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnTethered(Actor source, ActorTetherInfo tether) { if (source.OID == (uint)OID.Helper) { - var slot = module.Raid.FindSlot(tether.Target); + var slot = Raid.FindSlot(tether.Target); if (slot >= 0) { _playerTetherSource[slot] = source; @@ -157,11 +157,11 @@ public override void OnTethered(BossModule module, Actor source, ActorTetherInfo } } - public override void OnUntethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnUntethered(Actor source, ActorTetherInfo tether) { if (source.OID == (uint)OID.Helper) { - var slot = module.Raid.FindSlot(tether.Target); + var slot = Raid.FindSlot(tether.Target); if (slot >= 0) { _playerTetherSource[slot] = null; @@ -170,15 +170,15 @@ public override void OnUntethered(BossModule module, Actor source, ActorTetherIn } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.AkanthaiExplodeTower) ++_doneTowers; } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { - var slot = module.Raid.FindSlot(actor.InstanceID); + var slot = Raid.FindSlot(actor.InstanceID); if (slot >= 0) _playerIcons[slot] = (IconID)iconID; } @@ -190,23 +190,23 @@ private void AddAOETargetToOrder(List order, Predicate sourcePred) order.Add(source); } - private WPos RotateCW(BossModule module, WPos pos, Angle angle, float radius) + private WPos RotateCW(WPos pos, Angle angle, float radius) { - var dir = Angle.FromDirection(pos - module.Bounds.Center) - angle; - return module.Bounds.Center + radius * dir.ToDirection(); + var dir = Angle.FromDirection(pos - Module.Bounds.Center) - angle; + return Module.Bounds.Center + radius * dir.ToDirection(); } - private WPos DetermineWaterSafeSpot(BossModule module, Actor source) + private WPos DetermineWaterSafeSpot(Actor source) { bool ccw = Service.Config.Get().Act4WaterBreakCCW; Angle dir = (ccw ? -3 : 3) * 45.Degrees(); - return RotateCW(module, source.Position, dir, 18); + return RotateCW(source.Position, dir, 18); } - private Actor? DetermineTowerToSoak(BossModule module, Actor source) + private Actor? DetermineTowerToSoak(Actor source) { bool ccw = Service.Config.Get().Act4DarkSoakCCW; - var pos = RotateCW(module, source.Position, (ccw ? -1 : 1) * 45.Degrees(), 18); + var pos = RotateCW(source.Position, (ccw ? -1 : 1) * 45.Degrees(), 18); return _playerTetherSource.Where(x => x != null && x.Position.InCircle(pos, 4)).FirstOrDefault(); } diff --git a/BossMod/Modules/Endwalker/Savage/P4S2Hesperos/WreathOfThorns5.cs b/BossMod/Modules/Endwalker/Savage/P4S2Hesperos/WreathOfThorns5.cs index 8bf96e7ee4..e3b5bee560 100644 --- a/BossMod/Modules/Endwalker/Savage/P4S2Hesperos/WreathOfThorns5.cs +++ b/BossMod/Modules/Endwalker/Savage/P4S2Hesperos/WreathOfThorns5.cs @@ -1,7 +1,7 @@ namespace BossMod.Endwalker.Savage.P4S2Hesperos; // state related to act 5 (finale) wreath of thorns -class WreathOfThorns5 : BossComponent +class WreathOfThorns5(BossModule module) : BossComponent(module) { private List _playersOrder = new(); private List _towersOrder = new(); @@ -9,7 +9,7 @@ class WreathOfThorns5 : BossComponent private static readonly float _impulseAOERadius = 5; - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { int order = _playersOrder.IndexOf(actor.InstanceID); if (order >= 0) @@ -24,42 +24,42 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint if (_playersOrder.Count < 8) { - hints.Add("Spread!", module.Raid.WithoutSlot().InRadiusExcluding(actor, _impulseAOERadius).Any()); + hints.Add("Spread!", Raid.WithoutSlot().InRadiusExcluding(actor, _impulseAOERadius).Any()); } } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { - hints.Add($"Order: {string.Join(" -> ", _playersOrder.Skip(_castsDone).Select(id => module.WorldState.Actors.Find(id)?.Name ?? "???"))}"); + hints.Add($"Order: {string.Join(" -> ", _playersOrder.Skip(_castsDone).Select(id => WorldState.Actors.Find(id)?.Name ?? "???"))}"); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { int order = _playersOrder.IndexOf(pc.InstanceID); if (order >= _castsDone && order < _towersOrder.Count) - arena.AddCircle(_towersOrder[order].Position, P4S2.WreathTowerRadius, ArenaColor.Safe); + Arena.AddCircle(_towersOrder[order].Position, P4S2.WreathTowerRadius, ArenaColor.Safe); - var pcTetherTarget = module.WorldState.Actors.Find(pc.Tether.Target); + var pcTetherTarget = WorldState.Actors.Find(pc.Tether.Target); if (pcTetherTarget != null) { - arena.AddLine(pc.Position, pcTetherTarget.Position, pc.Tether.ID == (uint)TetherID.WreathOfThorns ? ArenaColor.Danger : ArenaColor.Safe); + Arena.AddLine(pc.Position, pcTetherTarget.Position, pc.Tether.ID == (uint)TetherID.WreathOfThorns ? ArenaColor.Danger : ArenaColor.Safe); } if (_playersOrder.Count < 8) { - arena.AddCircle(pc.Position, _impulseAOERadius, ArenaColor.Danger); - foreach (var player in module.Raid.WithoutSlot().Exclude(pc)) - arena.Actor(player, player.Position.InCircle(pc.Position, _impulseAOERadius) ? ArenaColor.PlayerInteresting : ArenaColor.PlayerGeneric); + Arena.AddCircle(pc.Position, _impulseAOERadius, ArenaColor.Danger); + foreach (var player in Raid.WithoutSlot().Exclude(pc)) + Arena.Actor(player, player.Position.InCircle(pc.Position, _impulseAOERadius) ? ArenaColor.PlayerInteresting : ArenaColor.PlayerGeneric); } } - public override void OnTethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnTethered(Actor source, ActorTetherInfo tether) { if (source.OID == (uint)OID.Helper) _towersOrder.Add(source); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { diff --git a/BossMod/Modules/Endwalker/Savage/P5SProtoCarbuncle/ClawTail.cs b/BossMod/Modules/Endwalker/Savage/P5SProtoCarbuncle/ClawTail.cs index 8e452f893b..861312c078 100644 --- a/BossMod/Modules/Endwalker/Savage/P5SProtoCarbuncle/ClawTail.cs +++ b/BossMod/Modules/Endwalker/Savage/P5SProtoCarbuncle/ClawTail.cs @@ -1,29 +1,27 @@ namespace BossMod.Endwalker.Savage.P5SProtoCarbuncle; -class ClawTail : Components.GenericAOEs +class ClawTail(BossModule module) : Components.GenericAOEs(module) { public int Progress { get; private set; } // 7 claws + 1 tail total private bool _tailFirst; private static readonly AOEShapeCone _shape = new(45, 90.Degrees()); - public ClawTail() : base(new()) { } - - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { - var rotation = module.PrimaryActor.CastInfo?.Rotation ?? module.PrimaryActor.Rotation; + var rotation = Module.PrimaryActor.CastInfo?.Rotation ?? Module.PrimaryActor.Rotation; if (_tailFirst ? Progress == 0 : Progress >= 7) rotation += 180.Degrees(); - yield return new(_shape, module.PrimaryActor.Position, rotation, module.PrimaryActor.CastInfo?.NPCFinishAt ?? module.WorldState.CurrentTime); + yield return new(_shape, Module.PrimaryActor.Position, rotation, Module.PrimaryActor.CastInfo?.NPCFinishAt ?? WorldState.CurrentTime); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.TailToClaw) _tailFirst = true; } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.RagingClawFirst or AID.RagingClawFirstRest or AID.RagingTailSecond or AID.RagingTailFirst or AID.RagingClawSecond or AID.RagingClawSecondRest) ++Progress; diff --git a/BossMod/Modules/Endwalker/Savage/P5SProtoCarbuncle/P5S.cs b/BossMod/Modules/Endwalker/Savage/P5SProtoCarbuncle/P5S.cs index 0ce275ae80..51153ad543 100644 --- a/BossMod/Modules/Endwalker/Savage/P5SProtoCarbuncle/P5S.cs +++ b/BossMod/Modules/Endwalker/Savage/P5SProtoCarbuncle/P5S.cs @@ -1,40 +1,13 @@ namespace BossMod.Endwalker.Savage.P5SProtoCarbuncle; -// TODO: improve component? -class ToxicCrunch : Components.CastCounter -{ - public ToxicCrunch() : base(ActionID.MakeSpell(AID.ToxicCrunchAOE)) { } -} - -class DoubleRush : Components.ChargeAOEs -{ - public DoubleRush() : base(ActionID.MakeSpell(AID.DoubleRush), 50) { } -} - -// TODO: show knockback? -class DoubleRushReturn : Components.CastCounter -{ - public DoubleRushReturn() : base(ActionID.MakeSpell(AID.DoubleRushReturn)) { } -} - -class SonicShatter : Components.CastCounter -{ - public SonicShatter() : base(ActionID.MakeSpell(AID.SonicShatterRest)) { } -} - -class DevourBait : Components.CastCounter -{ - public DevourBait() : base(ActionID.MakeSpell(AID.DevourBait)) { } -} +class ToxicCrunch(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.ToxicCrunchAOE)); // TODO: improve component? +class DoubleRush(BossModule module) : Components.ChargeAOEs(module, ActionID.MakeSpell(AID.DoubleRush), 50); +class DoubleRushReturn(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.DoubleRushReturn)); // TODO: show knockback? +class SonicShatter(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.SonicShatterRest)); +class DevourBait(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.DevourBait)); [ConfigDisplay(Order = 0x150, Parent = typeof(EndwalkerConfig))] -public class P5SConfig : CooldownPlanningConfigNode -{ - public P5SConfig() : base(90) { } -} +public class P5SConfig() : CooldownPlanningConfigNode(90); [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 873, NameID = 11440)] -public class P5S : BossModule -{ - public P5S(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsSquare(new(100, 100), 15)) { } -} +public class P5S(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsSquare(new(100, 100), 15)); diff --git a/BossMod/Modules/Endwalker/Savage/P5SProtoCarbuncle/RubyGlow1.cs b/BossMod/Modules/Endwalker/Savage/P5SProtoCarbuncle/RubyGlow1.cs index c771b5cf64..100f96443a 100644 --- a/BossMod/Modules/Endwalker/Savage/P5SProtoCarbuncle/RubyGlow1.cs +++ b/BossMod/Modules/Endwalker/Savage/P5SProtoCarbuncle/RubyGlow1.cs @@ -1,14 +1,14 @@ namespace BossMod.Endwalker.Savage.P5SProtoCarbuncle; // note: we could determine magic/poison positions even before they are activated (poison are always at +-4/11, magic are at +-1 from one of the axes), but this is not especially useful -class RubyGlow1 : RubyGlowCommon +class RubyGlow1(BossModule module) : RubyGlowCommon(module) { - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { // TODO: correct explosion time foreach (var o in MagicStones) - yield return new(ShapeQuadrant, QuadrantCenter(module, QuadrantForPosition(module, o.Position))); - foreach (var p in ActivePoisonAOEs(module)) + yield return new(ShapeQuadrant, QuadrantCenter(QuadrantForPosition(o.Position))); + foreach (var p in ActivePoisonAOEs()) yield return p; } } diff --git a/BossMod/Modules/Endwalker/Savage/P5SProtoCarbuncle/RubyGlow2.cs b/BossMod/Modules/Endwalker/Savage/P5SProtoCarbuncle/RubyGlow2.cs index 0d9416797e..fb417fa884 100644 --- a/BossMod/Modules/Endwalker/Savage/P5SProtoCarbuncle/RubyGlow2.cs +++ b/BossMod/Modules/Endwalker/Savage/P5SProtoCarbuncle/RubyGlow2.cs @@ -1,41 +1,39 @@ namespace BossMod.Endwalker.Savage.P5SProtoCarbuncle; -class RubyGlow2 : RubyGlowCommon +// note: we start showing magic aoe only after double rush resolve +class RubyGlow2(BossModule module) : RubyGlowCommon(module, ActionID.MakeSpell(AID.DoubleRush)) { private string _hint = ""; - // note: we start showing magic aoe only after double rush resolve - public RubyGlow2() : base(ActionID.MakeSpell(AID.DoubleRush)) { } - - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { // TODO: correct explosion time var magic = NumCasts > 0 ? MagicStones.FirstOrDefault() : null; if (magic != null) - yield return new(ShapeHalf, module.Bounds.Center, Angle.FromDirection(QuadrantDir(QuadrantForPosition(module, magic.Position)))); - foreach (var p in ActivePoisonAOEs(module)) + yield return new(ShapeHalf, Module.Bounds.Center, Angle.FromDirection(QuadrantDir(QuadrantForPosition(magic.Position)))); + foreach (var p in ActivePoisonAOEs()) yield return p; } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (_hint.Length > 0) hints.Add(_hint); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) { var magic = MagicStones.FirstOrDefault(); if (magic != null) { - _hint = QuadrantDir(QuadrantForPosition(module, magic.Position)).Dot(spell.LocXZ - caster.Position) > 0 ? "Stay after charge" : "Swap sides after charge"; + _hint = QuadrantDir(QuadrantForPosition(magic.Position)).Dot(spell.LocXZ - caster.Position) > 0 ? "Stay after charge" : "Swap sides after charge"; } } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) _hint = ""; diff --git a/BossMod/Modules/Endwalker/Savage/P5SProtoCarbuncle/RubyGlow3.cs b/BossMod/Modules/Endwalker/Savage/P5SProtoCarbuncle/RubyGlow3.cs index 48270be813..14f281a45b 100644 --- a/BossMod/Modules/Endwalker/Savage/P5SProtoCarbuncle/RubyGlow3.cs +++ b/BossMod/Modules/Endwalker/Savage/P5SProtoCarbuncle/RubyGlow3.cs @@ -1,14 +1,12 @@ namespace BossMod.Endwalker.Savage.P5SProtoCarbuncle; // note: currently we use visual casts to determine all safespots, these happen much earlier than animation changes... -class RubyGlow3 : RubyGlowCommon +// note: it's somewhat simpler to count casts rather than activating/deactivating stones +class RubyGlow3(BossModule module) : RubyGlowCommon(module, ActionID.MakeSpell(AID.RubyReflectionQuarter)) { private BitMask[] _aoeQuadrants = new BitMask[4]; // [i] = danger quardants at explosion #i, bits: 0=NW, 1=NE, 2=SW, 3=SE - // note: it's somewhat simpler to count casts rather than activating/deactivating stones - public RubyGlow3() : base(ActionID.MakeSpell(AID.RubyReflectionQuarter)) { } - - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { var aoeQuadrants = NumCasts switch { @@ -20,15 +18,15 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, }; // TODO: correct explosion time foreach (var q in aoeQuadrants.SetBits()) - yield return new(ShapeQuadrant, QuadrantCenter(module, q)); + yield return new(ShapeQuadrant, QuadrantCenter(q)); } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (_aoeQuadrants[2].Any()) { var safe = (~_aoeQuadrants[2]).LowestSetBit(); - var safeWaymark = safe < 4 ? WaymarkForQuadrant(module, safe) : Waymark.Count; + var safeWaymark = safe < 4 ? WaymarkForQuadrant(safe) : Waymark.Count; if (safeWaymark != Waymark.Count) { hints.Add($"Safespot for third: {safeWaymark}"); @@ -36,7 +34,7 @@ public override void AddGlobalHints(BossModule module, GlobalHints hints) } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { int order = (AID)spell.Action.ID switch { @@ -48,6 +46,6 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf }; if (order >= 0) - _aoeQuadrants[order].Set(QuadrantForPosition(module, caster.Position)); + _aoeQuadrants[order].Set(QuadrantForPosition(caster.Position)); } } diff --git a/BossMod/Modules/Endwalker/Savage/P5SProtoCarbuncle/RubyGlow4.cs b/BossMod/Modules/Endwalker/Savage/P5SProtoCarbuncle/RubyGlow4.cs index c6ba857906..2874ed376f 100644 --- a/BossMod/Modules/Endwalker/Savage/P5SProtoCarbuncle/RubyGlow4.cs +++ b/BossMod/Modules/Endwalker/Savage/P5SProtoCarbuncle/RubyGlow4.cs @@ -1,20 +1,18 @@ namespace BossMod.Endwalker.Savage.P5SProtoCarbuncle; // this includes venom pools and raging claw/searing ray aoes -class RubyGlow4 : RubyGlowRecolor +class RubyGlow4(BossModule module) : RubyGlowRecolor(module, 5) { - public RubyGlow4() : base(5) { } - - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (CurRecolorState != RecolorState.BeforeStones && MagicStones.Any()) - yield return new(ShapeHalf, module.Bounds.Center, Angle.FromDirection(QuadrantDir(AOEQuadrant))); - foreach (var p in ActivePoisonAOEs(module)) + yield return new(ShapeHalf, Module.Bounds.Center, Angle.FromDirection(QuadrantDir(AOEQuadrant))); + foreach (var p in ActivePoisonAOEs()) yield return p; - if (module.PrimaryActor.CastInfo?.IsSpell(AID.RagingClaw) ?? false) - yield return new(ShapeHalf, module.PrimaryActor.Position, module.PrimaryActor.CastInfo.Rotation, module.PrimaryActor.CastInfo.NPCFinishAt); - if (module.PrimaryActor.CastInfo?.IsSpell(AID.SearingRay) ?? false) - yield return new(ShapeHalf, module.Bounds.Center, module.PrimaryActor.CastInfo.Rotation + 180.Degrees(), module.PrimaryActor.CastInfo.NPCFinishAt); + if (Module.PrimaryActor.CastInfo?.IsSpell(AID.RagingClaw) ?? false) + yield return new(ShapeHalf, Module.PrimaryActor.Position, Module.PrimaryActor.CastInfo.Rotation, Module.PrimaryActor.CastInfo.NPCFinishAt); + if (Module.PrimaryActor.CastInfo?.IsSpell(AID.SearingRay) ?? false) + yield return new(ShapeHalf, Module.Bounds.Center, Module.PrimaryActor.CastInfo.Rotation + 180.Degrees(), Module.PrimaryActor.CastInfo.NPCFinishAt); } } diff --git a/BossMod/Modules/Endwalker/Savage/P5SProtoCarbuncle/RubyGlow5.cs b/BossMod/Modules/Endwalker/Savage/P5SProtoCarbuncle/RubyGlow5.cs index b54c01089e..700e0b4bec 100644 --- a/BossMod/Modules/Endwalker/Savage/P5SProtoCarbuncle/RubyGlow5.cs +++ b/BossMod/Modules/Endwalker/Savage/P5SProtoCarbuncle/RubyGlow5.cs @@ -1,13 +1,13 @@ namespace BossMod.Endwalker.Savage.P5SProtoCarbuncle; -class RubyGlow5 : RubyGlowCommon +class RubyGlow5(BossModule module) : RubyGlowCommon(module) { - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { // TODO: correct explosion time foreach (var o in MagicStones) - yield return new(ShapeQuadrant, QuadrantCenter(module, QuadrantForPosition(module, o.Position))); - foreach (var p in ActivePoisonAOEs(module)) + yield return new(ShapeQuadrant, QuadrantCenter(QuadrantForPosition(o.Position))); + foreach (var p in ActivePoisonAOEs()) yield return p; } } diff --git a/BossMod/Modules/Endwalker/Savage/P5SProtoCarbuncle/RubyGlow6.cs b/BossMod/Modules/Endwalker/Savage/P5SProtoCarbuncle/RubyGlow6.cs index 469a2704f5..1edc56aead 100644 --- a/BossMod/Modules/Endwalker/Savage/P5SProtoCarbuncle/RubyGlow6.cs +++ b/BossMod/Modules/Endwalker/Savage/P5SProtoCarbuncle/RubyGlow6.cs @@ -1,14 +1,12 @@ namespace BossMod.Endwalker.Savage.P5SProtoCarbuncle; -class RubyGlow6 : RubyGlowRecolor +class RubyGlow6(BossModule module) : RubyGlowRecolor(module, 9) { - public RubyGlow6() : base(9) { } - - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (CurRecolorState != RecolorState.BeforeStones && MagicStones.Any()) - yield return new(ShapeQuadrant, QuadrantCenter(module, AOEQuadrant)); - foreach (var p in ActivePoisonAOEs(module)) + yield return new(ShapeQuadrant, QuadrantCenter(AOEQuadrant)); + foreach (var p in ActivePoisonAOEs()) yield return p; } } diff --git a/BossMod/Modules/Endwalker/Savage/P5SProtoCarbuncle/RubyGlowCommon.cs b/BossMod/Modules/Endwalker/Savage/P5SProtoCarbuncle/RubyGlowCommon.cs index 9f539b3270..181e5793fc 100644 --- a/BossMod/Modules/Endwalker/Savage/P5SProtoCarbuncle/RubyGlowCommon.cs +++ b/BossMod/Modules/Endwalker/Savage/P5SProtoCarbuncle/RubyGlowCommon.cs @@ -5,7 +5,7 @@ // 0 1 // 2 3 // for diagonal, quadrant for coordinate is whatever cell is fully contained (so e.g. for DiagNW quadrant is either 1 or 2) -abstract class RubyGlowCommon : Components.GenericAOEs +abstract class RubyGlowCommon(BossModule module, ActionID watchedAction = default) : Components.GenericAOEs(module, watchedAction) { public enum ArenaState { Normal, Cells, DiagNW, DiagNE } // DiagNW == NW to SE, etc @@ -19,11 +19,9 @@ public enum ArenaState { Normal, Cells, DiagNW, DiagNE } // DiagNW == NW to SE, public static readonly AOEShape ShapeHalf = new AOEShapeRect(45, 45); public static readonly AOEShape ShapePoison = new AOEShapeCircle(13); - public RubyGlowCommon(ActionID watchedAction = new()) : base(watchedAction) { } - - public int QuadrantForPosition(BossModule module, WPos pos) + public int QuadrantForPosition(WPos pos) { - var offset = pos - module.Bounds.Center; + var offset = pos - Module.Bounds.Center; return State switch { ArenaState.Cells => (offset.X < 0 ? 0 : 1) | (offset.Z < 0 ? 0 : 2), @@ -34,16 +32,16 @@ public int QuadrantForPosition(BossModule module, WPos pos) } public WDir QuadrantDir(int q) => new WDir((q & 1) != 0 ? +1 : -1, (q & 2) != 0 ? +1 : -1); // both coords are +-1 - public WPos QuadrantCenter(BossModule module, int q) => module.Bounds.Center + module.Bounds.HalfSize * 0.5f * QuadrantDir(q); + public WPos QuadrantCenter(int q) => Module.Bounds.Center + Module.Bounds.HalfSize * 0.5f * QuadrantDir(q); - public Waymark WaymarkForQuadrant(BossModule module, int q) + public Waymark WaymarkForQuadrant(int q) { - var c = QuadrantCenter(module, q); + var c = QuadrantCenter(q); Waymark w = Waymark.Count; float wd = float.MaxValue; for (int i = 0; i < (int)Waymark.Count; i++) { - var pos = module.WorldState.Waymarks[(Waymark)i]; + var pos = WorldState.Waymarks[(Waymark)i]; var dist = pos != null ? (new WPos(pos.Value.XZ()) - c).LengthSq() : float.MaxValue; if (dist < wd) { @@ -54,30 +52,30 @@ public Waymark WaymarkForQuadrant(BossModule module, int q) return w; } - public IEnumerable ActivePoisonAOEs(BossModule module) + public IEnumerable ActivePoisonAOEs() { // TODO: correct explosion time return PoisonStones.Select(o => new AOEInstance(ShapePoison, o.Position)); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { switch (State) { case ArenaState.Cells: - arena.AddLine(module.Bounds.Center - new WDir(module.Bounds.HalfSize, 0), module.Bounds.Center + new WDir(module.Bounds.HalfSize, 0), ArenaColor.Border); - arena.AddLine(module.Bounds.Center - new WDir(0, module.Bounds.HalfSize), module.Bounds.Center + new WDir(0, module.Bounds.HalfSize), ArenaColor.Border); + Arena.AddLine(Module.Bounds.Center - new WDir(Module.Bounds.HalfSize, 0), Module.Bounds.Center + new WDir(Module.Bounds.HalfSize, 0), ArenaColor.Border); + Arena.AddLine(Module.Bounds.Center - new WDir(0, Module.Bounds.HalfSize), Module.Bounds.Center + new WDir(0, Module.Bounds.HalfSize), ArenaColor.Border); break; case ArenaState.DiagNW: - arena.AddLine(module.Bounds.Center - new WDir(module.Bounds.HalfSize, module.Bounds.HalfSize), module.Bounds.Center + new WDir(module.Bounds.HalfSize, module.Bounds.HalfSize), ArenaColor.Border); + Arena.AddLine(Module.Bounds.Center - new WDir(Module.Bounds.HalfSize, Module.Bounds.HalfSize), Module.Bounds.Center + new WDir(Module.Bounds.HalfSize, Module.Bounds.HalfSize), ArenaColor.Border); break; case ArenaState.DiagNE: - arena.AddLine(module.Bounds.Center - new WDir(module.Bounds.HalfSize, -module.Bounds.HalfSize), module.Bounds.Center + new WDir(module.Bounds.HalfSize, -module.Bounds.HalfSize), ArenaColor.Border); + Arena.AddLine(Module.Bounds.Center - new WDir(Module.Bounds.HalfSize, -Module.Bounds.HalfSize), Module.Bounds.Center + new WDir(Module.Bounds.HalfSize, -Module.Bounds.HalfSize), ArenaColor.Border); break; } } - public override void OnActorEAnim(BossModule module, Actor actor, uint state) + public override void OnActorEAnim(Actor actor, uint state) { if ((OID)actor.OID != OID.TopazStoneAny) return; @@ -103,7 +101,7 @@ public override void OnActorEAnim(BossModule module, Actor actor, uint state) } } - public override void OnEventEnvControl(BossModule module, byte index, uint state) + public override void OnEventEnvControl(byte index, uint state) { var astate = index switch { @@ -119,12 +117,12 @@ public override void OnEventEnvControl(BossModule module, byte index, uint state { case 0x00020001: if (State != ArenaState.Normal) - module.ReportError(this, $"Active state {State} while state {astate} is activated"); + ReportError($"Active state {State} while state {astate} is activated"); State = astate; break; case 0x00080004: if (State != astate) - module.ReportError(this, $"Active state {State} while state {astate} is deactivated"); + ReportError($"Active state {State} while state {astate} is deactivated"); State = ArenaState.Normal; break; // 0x00100020 - happens ~1s after activation @@ -134,51 +132,43 @@ public override void OnEventEnvControl(BossModule module, byte index, uint state // common features for ruby glow 4 & 6 (ones that feature recoloring) // this includes venom pools and raging claw/searing ray aoes -abstract class RubyGlowRecolor : RubyGlowCommon +// note: we show circles around healers until cast happens +abstract class RubyGlowRecolor(BossModule module, int expectedMagicStones) : RubyGlowCommon(module, ActionID.MakeSpell(AID.VenomPoolRecolorAOE)) { public enum RecolorState { BeforeStones, BeforeRecolor, Done } public RecolorState CurRecolorState { get; private set; } public int AOEQuadrant { get; private set; } - private int _expectedMagicStones; + private int _expectedMagicStones = expectedMagicStones; private const float _recolorRadius = 5; - // note: we show circles around healers until cast happens - public RubyGlowRecolor(int expectedMagicStones) : base(ActionID.MakeSpell(AID.VenomPoolRecolorAOE)) - { - _expectedMagicStones = expectedMagicStones; - } - - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { - base.AddHints(module, slot, actor, hints, movementHints); - if (VenomPoolActive && module.Raid.WithoutSlot().Where(a => a.Role == Role.Healer).InRadius(actor.Position, _recolorRadius).Count() != 1) + base.AddHints(slot, actor, hints); + if (VenomPoolActive && Raid.WithoutSlot().Where(a => a.Role == Role.Healer).InRadius(actor.Position, _recolorRadius).Count() != 1) hints.Add("Stack with healer!"); } - public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) - { - return VenomPoolActive && player.Role == Role.Healer ? PlayerPriority.Interesting : PlayerPriority.Irrelevant; - } + public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) => VenomPoolActive && player.Role == Role.Healer ? PlayerPriority.Interesting : PlayerPriority.Irrelevant; - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - base.DrawArenaForeground(module, pcSlot, pc, arena); + base.DrawArenaForeground(pcSlot, pc); if (CurRecolorState == RecolorState.BeforeRecolor) foreach (var o in MagicStones) - if (QuadrantForPosition(module, o.Position) != AOEQuadrant) - arena.Actor(o, ArenaColor.Vulnerable, true); + if (QuadrantForPosition(o.Position) != AOEQuadrant) + Arena.Actor(o, ArenaColor.Vulnerable, true); if (VenomPoolActive) - foreach (var a in module.Raid.WithoutSlot().Where(a => a.Role == Role.Healer)) - arena.AddCircle(a.Position, _recolorRadius, ArenaColor.Safe); + foreach (var a in Raid.WithoutSlot().Where(a => a.Role == Role.Healer)) + Arena.AddCircle(a.Position, _recolorRadius, ArenaColor.Safe); } - public override void OnActorEAnim(BossModule module, Actor actor, uint state) + public override void OnActorEAnim(Actor actor, uint state) { - base.OnActorEAnim(module, actor, state); + base.OnActorEAnim(actor, state); switch (CurRecolorState) { case RecolorState.BeforeStones: @@ -186,7 +176,7 @@ public override void OnActorEAnim(BossModule module, Actor actor, uint state) { int[] counts = new int[4]; foreach (var o in MagicStones) - ++counts[QuadrantForPosition(module, o.Position)]; + ++counts[QuadrantForPosition(o.Position)]; AOEQuadrant = Array.IndexOf(counts, 3); CurRecolorState = RecolorState.BeforeRecolor; } diff --git a/BossMod/Modules/Endwalker/Savage/P5SProtoCarbuncle/StarvingStampede.cs b/BossMod/Modules/Endwalker/Savage/P5SProtoCarbuncle/StarvingStampede.cs index dd2cb9bb4a..87f8f73a9f 100644 --- a/BossMod/Modules/Endwalker/Savage/P5SProtoCarbuncle/StarvingStampede.cs +++ b/BossMod/Modules/Endwalker/Savage/P5SProtoCarbuncle/StarvingStampede.cs @@ -8,13 +8,13 @@ class StarvingStampede : Components.GenericAOEs public StarvingStampede() : base(ActionID.MakeSpell(AID.StarvingStampede)) { } - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { // TODO: timings... return _positions.Skip(NumCasts).Take(3).Select(p => new AOEInstance(_shape, p)); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { base.OnEventCast(module, caster, spell); switch ((AID)spell.Action.ID) diff --git a/BossMod/Modules/Endwalker/Savage/P5SProtoCarbuncle/VenomSquallSurge.cs b/BossMod/Modules/Endwalker/Savage/P5SProtoCarbuncle/VenomSquallSurge.cs index c95a881833..9bf5b6341e 100644 --- a/BossMod/Modules/Endwalker/Savage/P5SProtoCarbuncle/VenomSquallSurge.cs +++ b/BossMod/Modules/Endwalker/Savage/P5SProtoCarbuncle/VenomSquallSurge.cs @@ -1,11 +1,8 @@ namespace BossMod.Endwalker.Savage.P5SProtoCarbuncle; -class VenomDrops : Components.LocationTargetedAOEs -{ - public VenomDrops() : base(ActionID.MakeSpell(AID.VenomDrops), 5) { } -} +class VenomDrops(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.VenomDrops), 5); -class VenomSquallSurge : BossComponent +class VenomSquallSurge(BossModule module) : BossComponent(module) { public enum Mechanic { None, Rain, Drops, Pool } @@ -14,50 +11,47 @@ public enum Mechanic { None, Rain, Drops, Pool } private static readonly float _radius = 5; - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { switch (NextMechanic) { case Mechanic.Rain: - if (module.Raid.WithoutSlot().InRadiusExcluding(actor, _radius).Any()) + if (Raid.WithoutSlot().InRadiusExcluding(actor, _radius).Any()) hints.Add("Spread!"); break; case Mechanic.Pool: - if (module.Raid.WithoutSlot().InRadius(actor.Position, _radius).Count(p => p.Role == Role.Healer) != 1) + if (Raid.WithoutSlot().InRadius(actor.Position, _radius).Count(p => p.Role == Role.Healer) != 1) hints.Add("Stack with healer!"); break; } } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { hints.Add(_reverse ? "Order: stack -> mid -> spread" : "Order: spread -> mid -> stack"); } - public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) - { - return NextMechanic == Mechanic.Pool && player.Role == Role.Healer ? PlayerPriority.Interesting : PlayerPriority.Irrelevant; - } + public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) => NextMechanic == Mechanic.Pool && player.Role == Role.Healer ? PlayerPriority.Interesting : PlayerPriority.Irrelevant; - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { switch (NextMechanic) { case Mechanic.Rain: // spreads - arena.AddCircle(pc.Position, _radius, ArenaColor.Danger); + Arena.AddCircle(pc.Position, _radius, ArenaColor.Danger); break; case Mechanic.Drops: // bait - foreach (var p in module.Raid.WithoutSlot()) - arena.AddCircle(p.Position, _radius, ArenaColor.Danger); + foreach (var p in Raid.WithoutSlot()) + Arena.AddCircle(p.Position, _radius, ArenaColor.Danger); break; case Mechanic.Pool: // party stacks - foreach (var p in module.Raid.WithoutSlot().Where(p => p.Role == Role.Healer)) - arena.AddCircle(p.Position, _radius, ArenaColor.Danger); + foreach (var p in Raid.WithoutSlot().Where(p => p.Role == Role.Healer)) + Arena.AddCircle(p.Position, _radius, ArenaColor.Danger); break; } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { @@ -71,7 +65,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { diff --git a/BossMod/Modules/Endwalker/Savage/P5SProtoCarbuncle/VenomTowers.cs b/BossMod/Modules/Endwalker/Savage/P5SProtoCarbuncle/VenomTowers.cs index 6b9ea2a6cd..430a2c25c2 100644 --- a/BossMod/Modules/Endwalker/Savage/P5SProtoCarbuncle/VenomTowers.cs +++ b/BossMod/Modules/Endwalker/Savage/P5SProtoCarbuncle/VenomTowers.cs @@ -1,6 +1,6 @@ namespace BossMod.Endwalker.Savage.P5SProtoCarbuncle; -class VenomTowers : BossComponent +class VenomTowers(BossModule module) : BossComponent(module) { private List _activeTowerOffsets = new(); @@ -10,16 +10,16 @@ class VenomTowers : BossComponent public bool Active => _activeTowerOffsets.Count > 0; - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (var t in _activeTowerOffsets) { - var origin = module.Bounds.Center + t; - arena.AddCircle(origin, _radius, module.Raid.WithoutSlot().InRadius(origin, _radius).Any() ? ArenaColor.Safe : ArenaColor.Danger); + var origin = Module.Bounds.Center + t; + Arena.AddCircle(origin, _radius, Raid.WithoutSlot().InRadius(origin, _radius).Any() ? ArenaColor.Safe : ArenaColor.Danger); } } - public override void OnEventEnvControl(BossModule module, byte index, uint state) + public override void OnEventEnvControl(byte index, uint state) { WDir offset = index switch { diff --git a/BossMod/Modules/Endwalker/Savage/P5SProtoCarbuncle/VenomousMass.cs b/BossMod/Modules/Endwalker/Savage/P5SProtoCarbuncle/VenomousMass.cs index 81d7ef1256..a09e11e0bb 100644 --- a/BossMod/Modules/Endwalker/Savage/P5SProtoCarbuncle/VenomousMass.cs +++ b/BossMod/Modules/Endwalker/Savage/P5SProtoCarbuncle/VenomousMass.cs @@ -1,28 +1,26 @@ namespace BossMod.Endwalker.Savage.P5SProtoCarbuncle; -class VenomousMass : Components.CastCounter +class VenomousMass(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.VenomousMassAOE)) { private Actor? _target; private static readonly float _radius = 6; - public VenomousMass() : base(ActionID.MakeSpell(AID.VenomousMassAOE)) { } - - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_target != null && _target != actor && actor.Position.InCircle(_target.Position, _radius)) hints.Add("GTFO from tankbuster!"); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (_target != null) - arena.AddCircle(_target.Position, _radius, ArenaColor.Danger); + Arena.AddCircle(_target.Position, _radius, ArenaColor.Danger); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.VenomousMass) - _target = module.WorldState.Actors.Find(caster.TargetID); + _target = WorldState.Actors.Find(caster.TargetID); } } diff --git a/BossMod/Modules/Endwalker/Savage/P6SHegemone/AetheronecrosisPredation.cs b/BossMod/Modules/Endwalker/Savage/P6SHegemone/AetheronecrosisPredation.cs index 8c9bedee27..3de1910f1d 100644 --- a/BossMod/Modules/Endwalker/Savage/P6SHegemone/AetheronecrosisPredation.cs +++ b/BossMod/Modules/Endwalker/Savage/P6SHegemone/AetheronecrosisPredation.cs @@ -1,7 +1,7 @@ namespace BossMod.Endwalker.Savage.P6SHegemone; // TODO: improve... -class AetheronecrosisPredation : BossComponent +class AetheronecrosisPredation(BossModule module) : BossComponent(module) { public int NumCastsAetheronecrosis { get; private set; } public int NumCastsDualPredation { get; private set; } @@ -11,27 +11,27 @@ class AetheronecrosisPredation : BossComponent public bool Active => (_vulnSnake | _vulnWing).Any(); - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_orders[slot] > 0) hints.Add($"Order: {_orders[slot]}, side: {(_vulnSnake[slot] ? "wing" : _vulnWing[slot] ? "snake" : "???")}", false); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { switch ((SID)status.ID) { case SID.GlossalResistanceDown: - _vulnSnake.Set(module.Raid.FindSlot(actor.InstanceID)); + _vulnSnake.Set(Raid.FindSlot(actor.InstanceID)); break; case SID.ChelicResistanceDown: - _vulnWing.Set(module.Raid.FindSlot(actor.InstanceID)); + _vulnWing.Set(Raid.FindSlot(actor.InstanceID)); break; case SID.Aetheronecrosis: - var slot = module.Raid.FindSlot(actor.InstanceID); + var slot = Raid.FindSlot(actor.InstanceID); if (slot >= 0) { - _orders[slot] = (status.ExpireAt - module.WorldState.CurrentTime).TotalSeconds switch + _orders[slot] = (status.ExpireAt - WorldState.CurrentTime).TotalSeconds switch { < 10 => 2, < 14 => 3, @@ -43,20 +43,20 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st } } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { switch ((SID)status.ID) { case SID.GlossalResistanceDown: - _vulnSnake.Clear(module.Raid.FindSlot(actor.InstanceID)); + _vulnSnake.Clear(Raid.FindSlot(actor.InstanceID)); break; case SID.ChelicResistanceDown: - _vulnWing.Clear(module.Raid.FindSlot(actor.InstanceID)); + _vulnWing.Clear(Raid.FindSlot(actor.InstanceID)); break; } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { diff --git a/BossMod/Modules/Endwalker/Savage/P6SHegemone/Agonies.cs b/BossMod/Modules/Endwalker/Savage/P6SHegemone/Agonies.cs index 39270f0ba3..409522ffe2 100644 --- a/BossMod/Modules/Endwalker/Savage/P6SHegemone/Agonies.cs +++ b/BossMod/Modules/Endwalker/Savage/P6SHegemone/Agonies.cs @@ -1,23 +1,21 @@ namespace BossMod.Endwalker.Savage.P6SHegemone; -class Agonies : Components.UniformStackSpread +class Agonies(BossModule module) : Components.UniformStackSpread(module, 6, 15, 3) { - public Agonies() : base(6, 15, 3) { } - - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { case AID.AgoniesDarkburst1: case AID.AgoniesDarkburst2: case AID.AgoniesDarkburst3: - if (module.WorldState.Actors.Find(spell.TargetID) is var spreadTarget && spreadTarget != null) + if (WorldState.Actors.Find(spell.TargetID) is var spreadTarget && spreadTarget != null) AddSpread(spreadTarget); break; case AID.AgoniesUnholyDarkness1: case AID.AgoniesUnholyDarkness2: case AID.AgoniesUnholyDarkness3: - if (module.WorldState.Actors.Find(spell.TargetID) is var stackTarget && stackTarget != null) + if (WorldState.Actors.Find(spell.TargetID) is var stackTarget && stackTarget != null) AddStack(stackTarget); break; case AID.AgoniesDarkPerimeter1: @@ -27,7 +25,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { diff --git a/BossMod/Modules/Endwalker/Savage/P6SHegemone/ChorosIxou.cs b/BossMod/Modules/Endwalker/Savage/P6SHegemone/ChorosIxou.cs index bb236b1f3b..1c9939e79f 100644 --- a/BossMod/Modules/Endwalker/Savage/P6SHegemone/ChorosIxou.cs +++ b/BossMod/Modules/Endwalker/Savage/P6SHegemone/ChorosIxou.cs @@ -1,15 +1,13 @@ namespace BossMod.Endwalker.Savage.P6SHegemone; -class ChorosIxou : Components.GenericAOEs +class ChorosIxou(BossModule module) : Components.GenericAOEs(module) { public bool FirstDone { get; private set; } public bool SecondDone { get; private set; } private AOEShapeCone _cone = new(40, 45.Degrees()); private List _directions = new(); - public ChorosIxou() : base(new()) { } - - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (SecondDone) yield break; @@ -17,16 +15,16 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, // TODO: timing var offset = (FirstDone ? 90 : 0).Degrees(); foreach (var dir in _directions) - yield return new(_cone, module.PrimaryActor.Position, dir + offset); + yield return new(_cone, Module.PrimaryActor.Position, dir + offset); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.ChorosIxouFSFrontAOE or AID.ChorosIxouSFSidesAOE) _directions.Add(caster.Rotation); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.ChorosIxouFSFrontAOE or AID.ChorosIxouSFSidesAOE) FirstDone = true; diff --git a/BossMod/Modules/Endwalker/Savage/P6SHegemone/Exocleaver.cs b/BossMod/Modules/Endwalker/Savage/P6SHegemone/Exocleaver.cs index 027c1e98cb..f00bd98ad2 100644 --- a/BossMod/Modules/Endwalker/Savage/P6SHegemone/Exocleaver.cs +++ b/BossMod/Modules/Endwalker/Savage/P6SHegemone/Exocleaver.cs @@ -1,14 +1,12 @@ namespace BossMod.Endwalker.Savage.P6SHegemone; -class Exocleaver : Components.GenericAOEs +class Exocleaver(BossModule module) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.ExocleaverAOE2)) { public bool FirstDone { get; private set; } private AOEShapeCone _cone = new(30, 15.Degrees()); private List _directions = new(); - public Exocleaver() : base(ActionID.MakeSpell(AID.ExocleaverAOE2)) { } - - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (NumCasts > 0) yield break; @@ -16,16 +14,16 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, // TODO: timing var offset = (FirstDone ? 30 : 0).Degrees(); foreach (var dir in _directions) - yield return new(_cone, module.PrimaryActor.Position, dir + offset); + yield return new(_cone, Module.PrimaryActor.Position, dir + offset); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.ExocleaverAOE1) _directions.Add(caster.Rotation); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.ExocleaverAOE1) FirstDone = true; diff --git a/BossMod/Modules/Endwalker/Savage/P6SHegemone/P6S.cs b/BossMod/Modules/Endwalker/Savage/P6SHegemone/P6S.cs index 6407f05dd1..0d04c49d7f 100644 --- a/BossMod/Modules/Endwalker/Savage/P6SHegemone/P6S.cs +++ b/BossMod/Modules/Endwalker/Savage/P6SHegemone/P6S.cs @@ -1,33 +1,12 @@ namespace BossMod.Endwalker.Savage.P6SHegemone; -class UnholyDarkness : Components.StackWithCastTargets -{ - public UnholyDarkness() : base(ActionID.MakeSpell(AID.UnholyDarknessAOE), 6) { } -} - -class DarkDome : Components.LocationTargetedAOEs -{ - public DarkDome() : base(ActionID.MakeSpell(AID.DarkDomeAOE), 5) { } -} - -class DarkAshes : Components.SpreadFromCastTargets -{ - public DarkAshes() : base(ActionID.MakeSpell(AID.DarkAshesAOE), 6) { } -} - -class DarkSphere : Components.SpreadFromCastTargets -{ - public DarkSphere() : base(ActionID.MakeSpell(AID.DarkSphereAOE), 10) { } -} +class UnholyDarkness(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.UnholyDarknessAOE), 6); +class DarkDome(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.DarkDomeAOE), 5); +class DarkAshes(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.DarkAshesAOE), 6); +class DarkSphere(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.DarkSphereAOE), 10); [ConfigDisplay(Order = 0x160, Parent = typeof(EndwalkerConfig))] -public class P6SConfig : CooldownPlanningConfigNode -{ - public P6SConfig() : base(90) { } -} +public class P6SConfig() : CooldownPlanningConfigNode(90); [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 881, NameID = 11381)] -public class P6S : BossModule -{ - public P6S(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsSquare(new(100, 100), 20)) { } -} +public class P6S(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsSquare(new(100, 100), 20)); diff --git a/BossMod/Modules/Endwalker/Savage/P6SHegemone/PathogenicCells.cs b/BossMod/Modules/Endwalker/Savage/P6SHegemone/PathogenicCells.cs index f4145ece4f..aba1ebf25e 100644 --- a/BossMod/Modules/Endwalker/Savage/P6SHegemone/PathogenicCells.cs +++ b/BossMod/Modules/Endwalker/Savage/P6SHegemone/PathogenicCells.cs @@ -1,23 +1,21 @@ namespace BossMod.Endwalker.Savage.P6SHegemone; // TODO: improve... -class PathogenicCells : Components.CastCounter +class PathogenicCells(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.PathogenicCellsAOE)) { private int[] _order = new int[PartyState.MaxPartySize]; - public PathogenicCells() : base(ActionID.MakeSpell(AID.PathogenicCellsAOE)) { } - - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_order[slot] != 0) hints.Add($"Order: {_order[slot]}", false); } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID is >= (uint)IconID.Pathogenic1 and <= (uint)IconID.Pathogenic8) { - var slot = module.Raid.FindSlot(actor.InstanceID); + var slot = Raid.FindSlot(actor.InstanceID); if (slot >= 0) _order[slot] = (int)iconID - (int)IconID.Pathogenic1 + 1; } diff --git a/BossMod/Modules/Endwalker/Savage/P6SHegemone/Polyominoid.cs b/BossMod/Modules/Endwalker/Savage/P6SHegemone/Polyominoid.cs index 60d59afaf4..6535d838f6 100644 --- a/BossMod/Modules/Endwalker/Savage/P6SHegemone/Polyominoid.cs +++ b/BossMod/Modules/Endwalker/Savage/P6SHegemone/Polyominoid.cs @@ -5,7 +5,7 @@ // 4 5 6 7 // 8 9 A B // C D E F -class Polyominoid : Components.GenericAOEs +class Polyominoid(BossModule module) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.PolyominousDark)) { public enum State { None, Plus, Cross } @@ -16,15 +16,13 @@ public enum State { None, Plus, Cross } private static readonly AOEShape _shape = new AOEShapeRect(5, 5, 5); - public Polyominoid() : base(ActionID.MakeSpell(AID.PolyominousDark)) { } - - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { // TODO: timing... return _dangerCells.SetBits().Select(index => new AOEInstance(_shape, IndexToPosition(index))); } - public override void Update(BossModule module) + public override void Update() { if (!_dangerDirty) return; @@ -55,11 +53,11 @@ public override void Update(BossModule module) } } - public override void OnTethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnTethered(Actor source, ActorTetherInfo tether) { if (tether.ID == (uint)TetherID.PolyExchange) { - var target = module.WorldState.Actors.Find(tether.Target); + var target = WorldState.Actors.Find(tether.Target); if (target != null) { _tethers.Add((source, target)); @@ -68,7 +66,7 @@ public override void OnTethered(BossModule module, Actor source, ActorTetherInfo } } - //public override void OnUntethered(BossModule module, Actor source, ActorTetherInfo tether) + //public override void OnUntethered(Actor source, ActorTetherInfo tether) //{ // if (tether.ID == (uint)TetherID.PolyExchange) // { @@ -77,7 +75,7 @@ public override void OnTethered(BossModule module, Actor source, ActorTetherInfo // } //} - public override void OnEventEnvControl(BossModule module, byte index, uint state) + public override void OnEventEnvControl(byte index, uint state) { int square = index switch { diff --git a/BossMod/Modules/Endwalker/Savage/P6SHegemone/PteraIxou.cs b/BossMod/Modules/Endwalker/Savage/P6SHegemone/PteraIxou.cs index adc2739021..4a931e2b69 100644 --- a/BossMod/Modules/Endwalker/Savage/P6SHegemone/PteraIxou.cs +++ b/BossMod/Modules/Endwalker/Savage/P6SHegemone/PteraIxou.cs @@ -1,53 +1,51 @@ namespace BossMod.Endwalker.Savage.P6SHegemone; -class PteraIxou : Components.CastCounter +class PteraIxou(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.PteraIxouAOESnake)) // doesn't matter which spell to track { private BitMask _vulnSnake; private BitMask _vulnWing; private static readonly AOEShapeCone _shape = new(30, 90.Degrees()); - public PteraIxou() : base(ActionID.MakeSpell(AID.PteraIxouAOESnake)) { } // doesn't matter which spell to track - - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { - if (ForbiddenCenters(module, slot).Any(dir => _shape.Check(actor.Position, module.Bounds.Center, dir))) + if (ForbiddenCenters(slot).Any(dir => _shape.Check(actor.Position, Module.Bounds.Center, dir))) hints.Add("GTFO from aoe!"); } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { - foreach (var dir in ForbiddenCenters(module, pcSlot)) - _shape.Draw(arena, module.Bounds.Center, dir); + foreach (var dir in ForbiddenCenters(pcSlot)) + _shape.Draw(Arena, Module.Bounds.Center, dir); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { switch ((SID)status.ID) { case SID.GlossalResistanceDown: - _vulnSnake.Set(module.Raid.FindSlot(actor.InstanceID)); + _vulnSnake.Set(Raid.FindSlot(actor.InstanceID)); break; case SID.ChelicResistanceDown: - _vulnWing.Set(module.Raid.FindSlot(actor.InstanceID)); + _vulnWing.Set(Raid.FindSlot(actor.InstanceID)); break; } } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { switch ((SID)status.ID) { case SID.GlossalResistanceDown: - _vulnSnake.Clear(module.Raid.FindSlot(actor.InstanceID)); + _vulnSnake.Clear(Raid.FindSlot(actor.InstanceID)); break; case SID.ChelicResistanceDown: - _vulnWing.Clear(module.Raid.FindSlot(actor.InstanceID)); + _vulnWing.Clear(Raid.FindSlot(actor.InstanceID)); break; } } - private IEnumerable ForbiddenCenters(BossModule module, int slot) + private IEnumerable ForbiddenCenters(int slot) { if (_vulnSnake[slot]) yield return 90.Degrees(); @@ -56,7 +54,4 @@ private IEnumerable ForbiddenCenters(BossModule module, int slot) } } -class PteraIxouSpreadStack : Components.CastStackSpread -{ - public PteraIxouSpreadStack() : base(ActionID.MakeSpell(AID.PteraIxouUnholyDarkness), ActionID.MakeSpell(AID.PteraIxouDarkSphere), 6, 10, 3) { } -} +class PteraIxouSpreadStack(BossModule module) : Components.CastStackSpread(module, ActionID.MakeSpell(AID.PteraIxouUnholyDarkness), ActionID.MakeSpell(AID.PteraIxouDarkSphere), 6, 10, 3); diff --git a/BossMod/Modules/Endwalker/Savage/P6SHegemone/Synergy.cs b/BossMod/Modules/Endwalker/Savage/P6SHegemone/Synergy.cs index 1ab7ae766c..3e42a48952 100644 --- a/BossMod/Modules/Endwalker/Savage/P6SHegemone/Synergy.cs +++ b/BossMod/Modules/Endwalker/Savage/P6SHegemone/Synergy.cs @@ -1,6 +1,6 @@ namespace BossMod.Endwalker.Savage.P6SHegemone; -class Synergy : BossComponent +class Synergy(BossModule module) : BossComponent(module) { public bool Done { get; private set; } private Actor?[] _targets = { null, null }; // second target is for non-chelic synergy @@ -9,14 +9,14 @@ class Synergy : BossComponent private static readonly AOEShapeCircle _shapeNormal = new(5); private static readonly AOEShapeCone _shapeChelic = new(60, 30.Degrees()); - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (!_chelic) { if (_targets.Any(t => actor != t && _shapeNormal.Check(actor.Position, t))) hints.Add("GTFO from tanks!"); - if (module.PrimaryActor.TargetID == _targets[0]?.InstanceID) + if (Module.PrimaryActor.TargetID == _targets[0]?.InstanceID) { if (actor == _targets[0]) hints.Add("Shirk!"); @@ -30,46 +30,43 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } else { - hints.Add("GTFO from tank!", _shapeChelic.Check(actor.Position, module.PrimaryActor.Position, Angle.FromDirection(_targets[0]!.Position - module.PrimaryActor.Position))); + hints.Add("GTFO from tank!", _shapeChelic.Check(actor.Position, Module.PrimaryActor.Position, Angle.FromDirection(_targets[0]!.Position - Module.PrimaryActor.Position))); } } - public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) - { - return _targets.Contains(player) ? PlayerPriority.Danger : PlayerPriority.Irrelevant; - } + public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) => _targets.Contains(player) ? PlayerPriority.Danger : PlayerPriority.Irrelevant; - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (!_chelic) { foreach (var t in _targets) - _shapeNormal.Outline(arena, t); + _shapeNormal.Outline(Arena, t); } else { - _shapeChelic.Outline(arena, module.PrimaryActor.Position, Angle.FromDirection(_targets[0]!.Position - module.PrimaryActor.Position)); + _shapeChelic.Outline(Arena, Module.PrimaryActor.Position, Angle.FromDirection(_targets[0]!.Position - Module.PrimaryActor.Position)); } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { case AID.SynergyAOE1: - _targets[0] = module.WorldState.Actors.Find(spell.TargetID); + _targets[0] = WorldState.Actors.Find(spell.TargetID); break; case AID.SynergyAOE2: - _targets[1] = module.WorldState.Actors.Find(spell.TargetID); + _targets[1] = WorldState.Actors.Find(spell.TargetID); break; case AID.ChelicSynergy: - _targets[0] = module.WorldState.Actors.Find(spell.TargetID); + _targets[0] = WorldState.Actors.Find(spell.TargetID); _chelic = true; break; } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.SynergyAOE1 or AID.SynergyAOE2 or AID.ChelicSynergy) Done = true; diff --git a/BossMod/Modules/Endwalker/Savage/P6SHegemone/Transmission.cs b/BossMod/Modules/Endwalker/Savage/P6SHegemone/Transmission.cs index cccd265830..305df22cc0 100644 --- a/BossMod/Modules/Endwalker/Savage/P6SHegemone/Transmission.cs +++ b/BossMod/Modules/Endwalker/Savage/P6SHegemone/Transmission.cs @@ -1,6 +1,6 @@ namespace BossMod.Endwalker.Savage.P6SHegemone; -class Transmission : Components.CastCounter +class Transmission(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.ReekHavoc)) { private DateTime[] _infectionExpire = new DateTime[PartyState.MaxPartySize]; // when status expires, it will be replaced with stun - we show aoes for last few seconds only private BitMask _snakeInfection; // hits front @@ -13,84 +13,82 @@ class Transmission : Components.CastCounter public bool StunsActive => _stuns.Any(); - public Transmission() : base(ActionID.MakeSpell(AID.ReekHavoc)) { } - - public override void Update(BossModule module) + public override void Update() { _clips.Reset(); _clippedByOthers.Reset(); - foreach (var e in ActiveAOEs(module)) + foreach (var e in ActiveAOEs()) { - _clippedByOthers |= _clips[e.slot] = module.Raid.WithSlot().Exclude(e.player).InShape(_shape, e.player.Position, e.direction).Mask(); + _clippedByOthers |= _clips[e.slot] = Raid.WithSlot().Exclude(e.player).InShape(_shape, e.player.Position, e.direction).Mask(); } } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_snakeInfection[slot]) hints.Add("Face away from raid", _clips[slot].Any()); if (_wingInfection[slot]) hints.Add("Face raid", _clips[slot].Any()); - if (_clippedByOthers[slot] && ExpireImminent(module, slot)) + if (_clippedByOthers[slot] && ExpireImminent(slot)) hints.Add("Avoid transmission aoe!"); } - public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) + public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) { return _clips[playerSlot, pcSlot] ? PlayerPriority.Danger : _clippedByOthers[playerSlot] ? PlayerPriority.Interesting : PlayerPriority.Normal; } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { - foreach (var e in ActiveAOEs(module)) - if (e.slot == pcSlot || ExpireImminent(module, e.slot)) - _shape.Draw(arena, e.player.Position, e.direction); + foreach (var e in ActiveAOEs()) + if (e.slot == pcSlot || ExpireImminent(e.slot)) + _shape.Draw(Arena, e.player.Position, e.direction); } - public override void OnTethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnTethered(Actor source, ActorTetherInfo tether) { switch ((TetherID)tether.ID) { case TetherID.TransmissionSnake: - _snakeInfection.Set(module.Raid.FindSlot(source.InstanceID)); + _snakeInfection.Set(Raid.FindSlot(source.InstanceID)); break; case TetherID.TransmissionWing: - _wingInfection.Set(module.Raid.FindSlot(source.InstanceID)); + _wingInfection.Set(Raid.FindSlot(source.InstanceID)); break; } } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { switch ((SID)status.ID) { case SID.Glossomorph: case SID.Chelomorph: - var slot = module.Raid.FindSlot(actor.InstanceID); + var slot = Raid.FindSlot(actor.InstanceID); if (slot >= 0) _infectionExpire[slot] = status.ExpireAt; break; case SID.OutOfControlSnake: case SID.OutOfControlWing: - _stuns.Set(module.Raid.FindSlot(actor.InstanceID)); + _stuns.Set(Raid.FindSlot(actor.InstanceID)); break; } } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { switch ((SID)status.ID) { case SID.OutOfControlSnake: case SID.OutOfControlWing: - _stuns.Clear(module.Raid.FindSlot(actor.InstanceID)); + _stuns.Clear(Raid.FindSlot(actor.InstanceID)); break; } } - private IEnumerable<(int slot, Actor player, Angle direction)> ActiveAOEs(BossModule module) + private IEnumerable<(int slot, Actor player, Angle direction)> ActiveAOEs() { - foreach (var (slot, player) in module.Raid.WithSlot(true)) + foreach (var (slot, player) in Raid.WithSlot(true)) { if (_snakeInfection[slot]) yield return (slot, player, player.Rotation); @@ -99,9 +97,9 @@ public override void OnStatusLose(BossModule module, Actor actor, ActorStatus st } } - private bool ExpireImminent(BossModule module, int slot) + private bool ExpireImminent(int slot) { var expire = _infectionExpire[slot]; - return expire != default && (expire - module.WorldState.CurrentTime).TotalSeconds < 2; + return expire != default && (expire - WorldState.CurrentTime).TotalSeconds < 2; } } diff --git a/BossMod/Modules/Endwalker/Savage/P7SAgdistis/BladesOfAttis.cs b/BossMod/Modules/Endwalker/Savage/P7SAgdistis/BladesOfAttis.cs index 197f63ec46..21909cfc7c 100644 --- a/BossMod/Modules/Endwalker/Savage/P7SAgdistis/BladesOfAttis.cs +++ b/BossMod/Modules/Endwalker/Savage/P7SAgdistis/BladesOfAttis.cs @@ -1,6 +1,6 @@ namespace BossMod.Endwalker.Savage.P7SAgdistis; -class BladesOfAttis : Components.Exaflare +class BladesOfAttis(BossModule module) : Components.Exaflare(module, 7) { class LineWithActor : Line { @@ -18,9 +18,7 @@ public LineWithActor(Actor caster) } } - public BladesOfAttis() : base(7) { } - - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.BladesOfAttisFirst) { @@ -28,18 +26,18 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.BladesOfAttisFirst or AID.BladesOfAttisRest) { int index = Lines.FindIndex(item => ((LineWithActor)item).Caster == caster); if (index == -1) { - module.ReportError(this, $"Failed to find entry for {caster.InstanceID:X}"); + ReportError($"Failed to find entry for {caster.InstanceID:X}"); return; } - AdvanceLine(module, Lines[index], caster.Position); + AdvanceLine(Lines[index], caster.Position); if (Lines[index].ExplosionsLeft == 0) Lines.RemoveAt(index); } diff --git a/BossMod/Modules/Endwalker/Savage/P7SAgdistis/Border.cs b/BossMod/Modules/Endwalker/Savage/P7SAgdistis/Border.cs index 61ddbf97b5..3856572968 100644 --- a/BossMod/Modules/Endwalker/Savage/P7SAgdistis/Border.cs +++ b/BossMod/Modules/Endwalker/Savage/P7SAgdistis/Border.cs @@ -2,7 +2,7 @@ // TODO: consider setting up 'real' bounds to match the borders // TODO: consider showing some aoe zone outside bounds?.. -class Border : BossComponent +class Border(BossModule module) : BossComponent(module) { private bool _threePlatforms; private bool _bridgeN; @@ -20,42 +20,42 @@ class Border : BossComponent public static readonly float BridgeStartOffset = MathF.Sqrt(SmallPlatformRadius * SmallPlatformRadius - BridgeHalfWidth * BridgeHalfWidth); public static readonly float BridgeCenterOffset = BridgeHalfWidth / 60.Degrees().Tan(); - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (!_threePlatforms) { - arena.AddCircle(module.Bounds.Center, LargePlatformRadius, ArenaColor.Border); + Arena.AddCircle(Module.Bounds.Center, LargePlatformRadius, ArenaColor.Border); } else { - var cs = module.Bounds.Center + PlatformSOffset; - var ce = module.Bounds.Center + PlatformEOffset; - var cw = module.Bounds.Center + PlatformWOffset; - arena.AddCircle(cs, SmallPlatformRadius, ArenaColor.Border); - arena.AddCircle(ce, SmallPlatformRadius, ArenaColor.Border); - arena.AddCircle(cw, SmallPlatformRadius, ArenaColor.Border); + var cs = Module.Bounds.Center + PlatformSOffset; + var ce = Module.Bounds.Center + PlatformEOffset; + var cw = Module.Bounds.Center + PlatformWOffset; + Arena.AddCircle(cs, SmallPlatformRadius, ArenaColor.Border); + Arena.AddCircle(ce, SmallPlatformRadius, ArenaColor.Border); + Arena.AddCircle(cw, SmallPlatformRadius, ArenaColor.Border); if (_bridgeN) { - DrawBridge(arena, ce, cw, false); + DrawBridge(ce, cw, false); } if (_bridgeE) { - DrawBridge(arena, ce, cs, false); + DrawBridge(ce, cs, false); } if (_bridgeW) { - DrawBridge(arena, cw, cs, false); + DrawBridge(cw, cs, false); } if (_bridgeCenter) { - DrawBridge(arena, cs, module.Bounds.Center, true); - DrawBridge(arena, ce, module.Bounds.Center, true); - DrawBridge(arena, cw, module.Bounds.Center, true); + DrawBridge(cs, Module.Bounds.Center, true); + DrawBridge(ce, Module.Bounds.Center, true); + DrawBridge(cw, Module.Bounds.Center, true); } } } - public override void OnEventEnvControl(BossModule module, byte index, uint state) + public override void OnEventEnvControl(byte index, uint state) { switch (index) { @@ -88,14 +88,14 @@ public override void OnEventEnvControl(BossModule module, byte index, uint state } } - private void DrawBridge(MiniArena arena, WPos p1, WPos p2, bool p2center) + private void DrawBridge(WPos p1, WPos p2, bool p2center) { var dir = (p2 - p1).Normalized(); var p1adj = p1 + dir * BridgeStartOffset; var p2adj = p2 - dir * (p2center ? BridgeCenterOffset : BridgeStartOffset); var ortho = dir.OrthoL() * BridgeHalfWidth; - arena.AddLine(p1adj + ortho, p2adj + ortho, ArenaColor.Border); - arena.AddLine(p1adj - ortho, p2adj - ortho, ArenaColor.Border); + Arena.AddLine(p1adj + ortho, p2adj + ortho, ArenaColor.Border); + Arena.AddLine(p1adj - ortho, p2adj - ortho, ArenaColor.Border); } private void BridgeEnvControl(ref bool bridge, uint state) diff --git a/BossMod/Modules/Endwalker/Savage/P7SAgdistis/DispersedCondensedAero.cs b/BossMod/Modules/Endwalker/Savage/P7SAgdistis/DispersedCondensedAero.cs index c1e731f256..7a7cc14bb4 100644 --- a/BossMod/Modules/Endwalker/Savage/P7SAgdistis/DispersedCondensedAero.cs +++ b/BossMod/Modules/Endwalker/Savage/P7SAgdistis/DispersedCondensedAero.cs @@ -1,7 +1,7 @@ namespace BossMod.Endwalker.Savage.P7SAgdistis; // TODO: currently we don't expose aggro to components, so we just assume tanks are doing their job... -class DispersedCondensedAero : BossComponent +class DispersedCondensedAero(BossModule module) : BossComponent(module) { public bool Done { get; private set; } private bool _condensed; @@ -9,17 +9,17 @@ class DispersedCondensedAero : BossComponent private const float _radiusDispersed = 8; private const float _radiusCondensed = 6; - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_condensed) { - if (module.PrimaryActor.TargetID == actor.InstanceID) + if (Module.PrimaryActor.TargetID == actor.InstanceID) { - hints.Add("Stack with other tank or press invuln!", module.Raid.WithoutSlot().InRadiusExcluding(actor, _radiusCondensed).Any(a => a.Role != Role.Tank)); + hints.Add("Stack with other tank or press invuln!", Raid.WithoutSlot().InRadiusExcluding(actor, _radiusCondensed).Any(a => a.Role != Role.Tank)); } else { - var tank = module.WorldState.Actors.Find(module.PrimaryActor.TargetID); + var tank = WorldState.Actors.Find(Module.PrimaryActor.TargetID); if (tank != null && actor.Position.InCircle(tank.Position, _radiusCondensed)) { hints.Add("GTFO from tank!"); @@ -30,42 +30,40 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint { if (actor.Role == Role.Tank) { - hints.Add("GTFO from raid!", module.Raid.WithoutSlot().InRadiusExcluding(actor, _radiusDispersed).Any()); + hints.Add("GTFO from raid!", Raid.WithoutSlot().InRadiusExcluding(actor, _radiusDispersed).Any()); } - else if (module.Raid.WithoutSlot().Where(a => a.Role == Role.Tank).InRadius(actor.Position, _radiusDispersed).Any()) + else if (Raid.WithoutSlot().Where(a => a.Role == Role.Tank).InRadius(actor.Position, _radiusDispersed).Any()) { hints.Add("GTFO from tanks!"); } } } - public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) - { - return (_condensed ? module.PrimaryActor.TargetID == player.InstanceID : player.Role == Role.Tank) ? PlayerPriority.Danger : PlayerPriority.Irrelevant; - } + public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) + => (_condensed ? Module.PrimaryActor.TargetID == player.InstanceID : player.Role == Role.Tank) ? PlayerPriority.Danger : PlayerPriority.Irrelevant; - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (_condensed) { - var tank = module.WorldState.Actors.Find(module.PrimaryActor.TargetID); + var tank = WorldState.Actors.Find(Module.PrimaryActor.TargetID); if (tank != null) - arena.AddCircle(tank.Position, _radiusCondensed, ArenaColor.Danger); + Arena.AddCircle(tank.Position, _radiusCondensed, ArenaColor.Danger); } else { - foreach (var tank in module.Raid.WithoutSlot().Where(a => a.Role == Role.Tank)) - arena.AddCircle(tank.Position, _radiusDispersed, ArenaColor.Danger); + foreach (var tank in Raid.WithoutSlot().Where(a => a.Role == Role.Tank)) + Arena.AddCircle(tank.Position, _radiusDispersed, ArenaColor.Danger); } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.CondensedAero) _condensed = true; } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.CondensedAeroAOE or AID.DispersedAeroAOE) Done = true; diff --git a/BossMod/Modules/Endwalker/Savage/P7SAgdistis/ForbiddenFruit1.cs b/BossMod/Modules/Endwalker/Savage/P7SAgdistis/ForbiddenFruit1.cs index 504ef83a58..a398276315 100644 --- a/BossMod/Modules/Endwalker/Savage/P7SAgdistis/ForbiddenFruit1.cs +++ b/BossMod/Modules/Endwalker/Savage/P7SAgdistis/ForbiddenFruit1.cs @@ -1,8 +1,6 @@ namespace BossMod.Endwalker.Savage.P7SAgdistis; -class ForbiddenFruit1 : ForbiddenFruitCommon +class ForbiddenFruit1(BossModule module) : ForbiddenFruitCommon(module, ActionID.MakeSpell(AID.StaticMoon)) { - public ForbiddenFruit1() : base(ActionID.MakeSpell(AID.StaticMoon)) { } - - protected override DateTime? PredictUntetheredCastStart(BossModule module, Actor fruit) => module.WorldState.CurrentTime.AddSeconds(12.5); + protected override DateTime? PredictUntetheredCastStart(Actor fruit) => WorldState.FutureTime(12.5); } diff --git a/BossMod/Modules/Endwalker/Savage/P7SAgdistis/ForbiddenFruit10.cs b/BossMod/Modules/Endwalker/Savage/P7SAgdistis/ForbiddenFruit10.cs index bd92799ba1..ede7a2b37a 100644 --- a/BossMod/Modules/Endwalker/Savage/P7SAgdistis/ForbiddenFruit10.cs +++ b/BossMod/Modules/Endwalker/Savage/P7SAgdistis/ForbiddenFruit10.cs @@ -1,30 +1,28 @@ namespace BossMod.Endwalker.Savage.P7SAgdistis; // TODO: implement! -class ForbiddenFruit10 : ForbiddenFruitCommon +class ForbiddenFruit10(BossModule module) : ForbiddenFruitCommon(module, ActionID.MakeSpell(AID.BronzeBellows)) { private BitMask _minotaurPlaforms = ValidPlatformsMask; private BitMask _bullPlatforms; - public ForbiddenFruit10() : base(ActionID.MakeSpell(AID.BronzeBellows)) { } - - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { - base.DrawArenaBackground(module, pcSlot, pc, arena); - foreach (var (slot, target) in module.Raid.WithSlot(true)) + base.DrawArenaBackground(pcSlot, pc); + foreach (var (slot, target) in Raid.WithSlot(true)) { var source = TetherSources[slot]; if (source != null) { AOEShape shape = (OID)source.OID == OID.ImmatureMinotaur ? ShapeMinotaurTethered : ShapeBullBirdTethered; - shape.Draw(arena, source.Position, Angle.FromDirection(target.Position - source.Position)); + shape.Draw(Arena, source.Position, Angle.FromDirection(target.Position - source.Position)); } } } - public override void OnTethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnTethered(Actor source, ActorTetherInfo tether) { - var slot = TryAssignTether(module, source, tether); + var slot = TryAssignTether(source, tether); if (slot < 0) return; var safe = (TetherID)tether.ID switch @@ -36,16 +34,16 @@ public override void OnTethered(BossModule module, Actor source, ActorTetherInfo SafePlatforms[slot] = safe; } - protected override System.DateTime? PredictUntetheredCastStart(BossModule module, Actor fruit) + protected override DateTime? PredictUntetheredCastStart(Actor fruit) { switch ((OID)fruit.OID) { case OID.ForbiddenFruitMinotaur: // minotaurs spawn on bridges, minotaur platform is adjacent => their opposite platform is never minotaur one - _minotaurPlaforms.Clear(PlatformIDFromOffset(module.Bounds.Center - fruit.Position)); + _minotaurPlaforms.Clear(PlatformIDFromOffset(Module.Bounds.Center - fruit.Position)); break; case OID.ForbiddenFruitBull: - _bullPlatforms.Set(PlatformIDFromOffset(fruit.Position - module.Bounds.Center)); + _bullPlatforms.Set(PlatformIDFromOffset(fruit.Position - Module.Bounds.Center)); break; } return null; diff --git a/BossMod/Modules/Endwalker/Savage/P7SAgdistis/ForbiddenFruit2.cs b/BossMod/Modules/Endwalker/Savage/P7SAgdistis/ForbiddenFruit2.cs index f24bad885e..0d1b629664 100644 --- a/BossMod/Modules/Endwalker/Savage/P7SAgdistis/ForbiddenFruit2.cs +++ b/BossMod/Modules/Endwalker/Savage/P7SAgdistis/ForbiddenFruit2.cs @@ -1,8 +1,6 @@ namespace BossMod.Endwalker.Savage.P7SAgdistis; -class ForbiddenFruit2 : ForbiddenFruitCommon +class ForbiddenFruit2(BossModule module) : ForbiddenFruitCommon(module, ActionID.MakeSpell(AID.StymphalianStrike)) { - public ForbiddenFruit2() : base(ActionID.MakeSpell(AID.StymphalianStrike)) { } - - protected override DateTime? PredictUntetheredCastStart(BossModule module, Actor fruit) => module.WorldState.CurrentTime.AddSeconds(12.5); + protected override DateTime? PredictUntetheredCastStart(Actor fruit) => WorldState.FutureTime(12.5f); } diff --git a/BossMod/Modules/Endwalker/Savage/P7SAgdistis/ForbiddenFruit3.cs b/BossMod/Modules/Endwalker/Savage/P7SAgdistis/ForbiddenFruit3.cs index da4594f75a..8ecfbc5601 100644 --- a/BossMod/Modules/Endwalker/Savage/P7SAgdistis/ForbiddenFruit3.cs +++ b/BossMod/Modules/Endwalker/Savage/P7SAgdistis/ForbiddenFruit3.cs @@ -1,8 +1,6 @@ namespace BossMod.Endwalker.Savage.P7SAgdistis; -class ForbiddenFruit3 : ForbiddenFruitCommon +class ForbiddenFruit3(BossModule module) : ForbiddenFruitCommon(module, ActionID.MakeSpell(AID.StaticMoon)) { - public ForbiddenFruit3() : base(ActionID.MakeSpell(AID.StaticMoon)) { } - - protected override DateTime? PredictUntetheredCastStart(BossModule module, Actor fruit) => module.WorldState.CurrentTime.AddSeconds(10.5); + protected override DateTime? PredictUntetheredCastStart(Actor fruit) => WorldState.FutureTime(10.5f); } diff --git a/BossMod/Modules/Endwalker/Savage/P7SAgdistis/ForbiddenFruit4.cs b/BossMod/Modules/Endwalker/Savage/P7SAgdistis/ForbiddenFruit4.cs index 7257181041..56da81d52e 100644 --- a/BossMod/Modules/Endwalker/Savage/P7SAgdistis/ForbiddenFruit4.cs +++ b/BossMod/Modules/Endwalker/Savage/P7SAgdistis/ForbiddenFruit4.cs @@ -1,23 +1,21 @@ namespace BossMod.Endwalker.Savage.P7SAgdistis; -class ForbiddenFruit4 : ForbiddenFruitCommon +class ForbiddenFruit4 (BossModule module): ForbiddenFruitCommon(module, ActionID.MakeSpell(AID.BullishSwipeAOE)) { private int _bullPlatform; - public ForbiddenFruit4() : base(ActionID.MakeSpell(AID.BullishSwipeAOE)) { } - - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - base.DrawArenaForeground(module, pcSlot, pc, arena); + base.DrawArenaForeground(pcSlot, pc); if (NumAssignedTethers > 0 && !MinotaursBaited && TetherSources[pcSlot] == null) { - arena.AddCircle(module.Bounds.Center - 2 * PlatformDirection(_bullPlatform).ToDirection(), 2, ArenaColor.Safe); + Arena.AddCircle(Module.Bounds.Center - 2 * PlatformDirection(_bullPlatform).ToDirection(), 2, ArenaColor.Safe); } } - public override void OnTethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnTethered(Actor source, ActorTetherInfo tether) { - var slot = TryAssignTether(module, source, tether); + var slot = TryAssignTether(source, tether); if (slot < 0) return; switch ((TetherID)tether.ID) @@ -29,16 +27,16 @@ public override void OnTethered(BossModule module, Actor source, ActorTetherInfo case TetherID.MinotaurClose: var safePlatforms = ValidPlatformsMask; safePlatforms.Clear(_bullPlatform); - safePlatforms.Clear(PlatformIDFromOffset(source.Position - module.Bounds.Center)); + safePlatforms.Clear(PlatformIDFromOffset(source.Position - Module.Bounds.Center)); SafePlatforms[slot] = safePlatforms; break; } } - protected override DateTime? PredictUntetheredCastStart(BossModule module, Actor fruit) + protected override DateTime? PredictUntetheredCastStart(Actor fruit) { if ((OID)fruit.OID == OID.ForbiddenFruitBull) - _bullPlatform = PlatformIDFromOffset(fruit.Position - module.Bounds.Center); + _bullPlatform = PlatformIDFromOffset(fruit.Position - Module.Bounds.Center); return null; } } diff --git a/BossMod/Modules/Endwalker/Savage/P7SAgdistis/ForbiddenFruit5.cs b/BossMod/Modules/Endwalker/Savage/P7SAgdistis/ForbiddenFruit5.cs index 69a1d9fb92..cd12605325 100644 --- a/BossMod/Modules/Endwalker/Savage/P7SAgdistis/ForbiddenFruit5.cs +++ b/BossMod/Modules/Endwalker/Savage/P7SAgdistis/ForbiddenFruit5.cs @@ -3,24 +3,22 @@ // TODO: improve! class ForbiddenFruit5 : ForbiddenFruitCommon { - private IReadOnlyList _towers = ActorEnumeration.EmptyList; + private IReadOnlyList _towers; private const float _towerRadius = 5; - public ForbiddenFruit5() : base(ActionID.MakeSpell(AID.Burst)) { } - - public override void Init(BossModule module) + public ForbiddenFruit5(BossModule module) : base(module, ActionID.MakeSpell(AID.Burst)) { _towers = module.Enemies(OID.Tower); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { var tetherSource = TetherSources[pcSlot]; if (tetherSource != null) - arena.AddLine(tetherSource.Position, pc.Position, TetherColor(tetherSource)); + Arena.AddLine(tetherSource.Position, pc.Position, TetherColor(tetherSource)); foreach (var tower in _towers) - arena.AddCircle(tower.Position, _towerRadius, tetherSource == null ? ArenaColor.Safe : ArenaColor.Danger); + Arena.AddCircle(tower.Position, _towerRadius, tetherSource == null ? ArenaColor.Safe : ArenaColor.Danger); } } diff --git a/BossMod/Modules/Endwalker/Savage/P7SAgdistis/ForbiddenFruit6.cs b/BossMod/Modules/Endwalker/Savage/P7SAgdistis/ForbiddenFruit6.cs index 770bcb4e12..ae93bc375f 100644 --- a/BossMod/Modules/Endwalker/Savage/P7SAgdistis/ForbiddenFruit6.cs +++ b/BossMod/Modules/Endwalker/Savage/P7SAgdistis/ForbiddenFruit6.cs @@ -1,8 +1,6 @@ namespace BossMod.Endwalker.Savage.P7SAgdistis; -class ForbiddenFruit6 : ForbiddenFruitCommon +class ForbiddenFruit6(BossModule module) : ForbiddenFruitCommon(module, ActionID.MakeSpell(AID.StaticMoon)) { - public ForbiddenFruit6() : base(ActionID.MakeSpell(AID.StaticMoon)) { } - - protected override DateTime? PredictUntetheredCastStart(BossModule module, Actor fruit) => module.WorldState.CurrentTime.AddSeconds(14.1); + protected override DateTime? PredictUntetheredCastStart(Actor fruit) => WorldState.FutureTime(14.1f); } diff --git a/BossMod/Modules/Endwalker/Savage/P7SAgdistis/ForbiddenFruit7.cs b/BossMod/Modules/Endwalker/Savage/P7SAgdistis/ForbiddenFruit7.cs index acb861fe09..c51186eab7 100644 --- a/BossMod/Modules/Endwalker/Savage/P7SAgdistis/ForbiddenFruit7.cs +++ b/BossMod/Modules/Endwalker/Savage/P7SAgdistis/ForbiddenFruit7.cs @@ -1,8 +1,6 @@ namespace BossMod.Endwalker.Savage.P7SAgdistis; -class ForbiddenFruit7 : ForbiddenFruitCommon +class ForbiddenFruit7(BossModule module) : ForbiddenFruitCommon(module, ActionID.MakeSpell(AID.StymphalianStrike)) { - public ForbiddenFruit7() : base(ActionID.MakeSpell(AID.StymphalianStrike)) { } - - protected override DateTime? PredictUntetheredCastStart(BossModule module, Actor fruit) => module.WorldState.CurrentTime.AddSeconds(16.5); + protected override DateTime? PredictUntetheredCastStart(Actor fruit) => WorldState.FutureTime(16.5f); } diff --git a/BossMod/Modules/Endwalker/Savage/P7SAgdistis/ForbiddenFruit8.cs b/BossMod/Modules/Endwalker/Savage/P7SAgdistis/ForbiddenFruit8.cs index 39a4441f25..b2cab158f6 100644 --- a/BossMod/Modules/Endwalker/Savage/P7SAgdistis/ForbiddenFruit8.cs +++ b/BossMod/Modules/Endwalker/Savage/P7SAgdistis/ForbiddenFruit8.cs @@ -1,28 +1,26 @@ namespace BossMod.Endwalker.Savage.P7SAgdistis; -class ForbiddenFruit8 : ForbiddenFruitCommon +class ForbiddenFruit8(BossModule module) : ForbiddenFruitCommon(module, ActionID.MakeSpell(AID.StymphalianStrike)) { private BitMask _noBirdsPlatforms = ValidPlatformsMask; - public ForbiddenFruit8() : base(ActionID.MakeSpell(AID.StymphalianStrike)) { } - - public override void OnTethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnTethered(Actor source, ActorTetherInfo tether) { - var slot = TryAssignTether(module, source, tether); + var slot = TryAssignTether(source, tether); if (slot < 0) return; var safe = ValidPlatformsMask & ~_noBirdsPlatforms; - safe.Clear(PlatformIDFromOffset(source.Position - module.Bounds.Center)); + safe.Clear(PlatformIDFromOffset(source.Position - Module.Bounds.Center)); SafePlatforms[slot] = safe; } - protected override DateTime? PredictUntetheredCastStart(BossModule module, Actor fruit) + protected override DateTime? PredictUntetheredCastStart(Actor fruit) { if ((OID)fruit.OID != OID.ForbiddenFruitBird) return null; - _noBirdsPlatforms.Clear(PlatformIDFromOffset(fruit.Position - module.Bounds.Center)); + _noBirdsPlatforms.Clear(PlatformIDFromOffset(fruit.Position - Module.Bounds.Center)); Array.Fill(SafePlatforms, _noBirdsPlatforms); - return module.WorldState.CurrentTime.AddSeconds(12.5); + return WorldState.FutureTime(12.5f); } } diff --git a/BossMod/Modules/Endwalker/Savage/P7SAgdistis/ForbiddenFruit9.cs b/BossMod/Modules/Endwalker/Savage/P7SAgdistis/ForbiddenFruit9.cs index 0673027581..5ff52eaf6b 100644 --- a/BossMod/Modules/Endwalker/Savage/P7SAgdistis/ForbiddenFruit9.cs +++ b/BossMod/Modules/Endwalker/Savage/P7SAgdistis/ForbiddenFruit9.cs @@ -1,9 +1,7 @@ namespace BossMod.Endwalker.Savage.P7SAgdistis; // TODO: implement! -class ForbiddenFruit9 : ForbiddenFruitCommon +class ForbiddenFruit9(BossModule module) : ForbiddenFruitCommon(module, ActionID.MakeSpell(AID.StymphalianStrike)) { - public ForbiddenFruit9() : base(ActionID.MakeSpell(AID.StymphalianStrike)) { } - - protected override DateTime? PredictUntetheredCastStart(BossModule module, Actor fruit) => (OID)fruit.OID == OID.ForbiddenFruitBird ? module.WorldState.CurrentTime.AddSeconds(12.5) : null; + protected override DateTime? PredictUntetheredCastStart(Actor fruit) => (OID)fruit.OID == OID.ForbiddenFruitBird ? WorldState.FutureTime(12.5f) : null; } diff --git a/BossMod/Modules/Endwalker/Savage/P7SAgdistis/ForbiddenFruitCommon.cs b/BossMod/Modules/Endwalker/Savage/P7SAgdistis/ForbiddenFruitCommon.cs index 6cdda47636..bc881b3b97 100644 --- a/BossMod/Modules/Endwalker/Savage/P7SAgdistis/ForbiddenFruitCommon.cs +++ b/BossMod/Modules/Endwalker/Savage/P7SAgdistis/ForbiddenFruitCommon.cs @@ -3,7 +3,7 @@ // common parts of various forbidden fruit / harvest mechanics // platform id's: 0 = W, 1 = S, 2 = E // TODO: show knockback for bird tethers, something for bull/minotaur tethers... -class ForbiddenFruitCommon : Components.GenericAOEs +class ForbiddenFruitCommon(BossModule module, ActionID watchedAction) : Components.GenericAOEs(module, watchedAction) { public int NumAssignedTethers { get; private set; } public bool MinotaursBaited { get; private set; } @@ -22,9 +22,7 @@ class ForbiddenFruitCommon : Components.GenericAOEs public bool CastsActive => _activeAOEs.Count > 0; - public ForbiddenFruitCommon(ActionID watchedAction) : base(watchedAction) { } - - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { foreach (var (source, shape, time) in _predictedAOEs) yield return new(shape, source.Position, source.Rotation, time); @@ -32,50 +30,50 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, yield return new(shape, source.Position, source.CastInfo!.Rotation, source.CastInfo.NPCFinishAt); } - public override void Update(BossModule module) + public override void Update() { _tetherClips.Reset(); - foreach (var (slot, player) in module.Raid.WithSlot()) + foreach (var (slot, player) in Raid.WithSlot()) { var tetherSource = TetherSources[slot]; if (tetherSource != null) { AOEShape tetherShape = (OID)tetherSource.OID == OID.ImmatureMinotaur ? ShapeMinotaurTethered : ShapeBullBirdTethered; - _tetherClips[slot] = module.Raid.WithSlot().Exclude(player).InShape(tetherShape, tetherSource.Position, Angle.FromDirection(player.Position - tetherSource.Position)).Mask(); + _tetherClips[slot] = Raid.WithSlot().Exclude(player).InShape(tetherShape, tetherSource.Position, Angle.FromDirection(player.Position - tetherSource.Position)).Mask(); } } } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { - base.AddHints(module, slot, actor, hints, movementHints); + base.AddHints(slot, actor, hints); if (_tetherClips[slot].Any()) hints.Add("Hitting others with tether!"); if (_tetherClips.AnyBitInColumn(slot)) hints.Add("Clipped by other tethers!"); } - public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) + public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) { return _tetherClips[playerSlot, pcSlot] || _tetherClips[pcSlot, playerSlot] ? PlayerPriority.Danger : PlayerPriority.Normal; } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { var tetherSource = TetherSources[pcSlot]; if (tetherSource != null) - arena.AddLine(tetherSource.Position, pc.Position, TetherColor(tetherSource)); + Arena.AddLine(tetherSource.Position, pc.Position, TetherColor(tetherSource)); foreach (var platform in SafePlatforms[pcSlot].SetBits()) - arena.AddCircle(module.Bounds.Center + PlatformDirection(platform).ToDirection() * Border.SmallPlatformOffset, Border.SmallPlatformRadius, ArenaColor.Safe); + Arena.AddCircle(Module.Bounds.Center + PlatformDirection(platform).ToDirection() * Border.SmallPlatformOffset, Border.SmallPlatformRadius, ArenaColor.Safe); } - public override void OnTethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnTethered(Actor source, ActorTetherInfo tether) { - TryAssignTether(module, source, tether); + TryAssignTether(source, tether); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { @@ -94,17 +92,17 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.StaticMoon or AID.StymphalianStrike or AID.BullishSwipeAOE) _activeAOEs.RemoveAll(i => i.Item1 == caster); } - public override void OnActorPlayActionTimelineEvent(BossModule module, Actor actor, ushort id) + public override void OnActorPlayActionTimelineEvent(Actor actor, ushort id) { if (id == 0x11D1) { - var castStart = PredictUntetheredCastStart(module, actor); + var castStart = PredictUntetheredCastStart(actor); if (castStart != null) { AOEShape? shape = (OID)actor.OID switch @@ -122,14 +120,14 @@ public override void OnActorPlayActionTimelineEvent(BossModule module, Actor act } // subclass can override and return non-null if specified fruit will become of untethered variety - protected virtual DateTime? PredictUntetheredCastStart(BossModule module, Actor fruit) => null; + protected virtual DateTime? PredictUntetheredCastStart(Actor fruit) => null; // this is called by default OnTethered, but subclasses might want to call it themselves and use returned info (target slot if tether was assigned) - protected int TryAssignTether(BossModule module, Actor source, ActorTetherInfo tether) + protected int TryAssignTether(Actor source, ActorTetherInfo tether) { if ((TetherID)tether.ID is TetherID.Bull or TetherID.MinotaurClose or TetherID.MinotaurFar or TetherID.Bird) { - int slot = module.Raid.FindSlot(tether.Target); + int slot = Raid.FindSlot(tether.Target); if (slot >= 0) { TetherSources[slot] = source; diff --git a/BossMod/Modules/Endwalker/Savage/P7SAgdistis/P7S.cs b/BossMod/Modules/Endwalker/Savage/P7SAgdistis/P7S.cs index c914ca4c9b..7bca90ffc2 100644 --- a/BossMod/Modules/Endwalker/Savage/P7SAgdistis/P7S.cs +++ b/BossMod/Modules/Endwalker/Savage/P7SAgdistis/P7S.cs @@ -1,58 +1,17 @@ namespace BossMod.Endwalker.Savage.P7SAgdistis; -class HemitheosHoly : Components.StackWithCastTargets -{ - public HemitheosHoly() : base(ActionID.MakeSpell(AID.HemitheosHolyAOE), 6, 4) { } -} - -class BoughOfAttisBack : Components.SelfTargetedAOEs -{ - public BoughOfAttisBack() : base(ActionID.MakeSpell(AID.BoughOfAttisBackAOE), new AOEShapeCircle(25)) { } -} - -class BoughOfAttisFront : Components.SelfTargetedAOEs -{ - public BoughOfAttisFront() : base(ActionID.MakeSpell(AID.BoughOfAttisFrontAOE), new AOEShapeCircle(19)) { } -} - -class BoughOfAttisSide : Components.SelfTargetedAOEs -{ - public BoughOfAttisSide() : base(ActionID.MakeSpell(AID.BoughOfAttisSideAOE), new AOEShapeRect(50, 12.5f)) { } -} - -class HemitheosAeroKnockback1 : Components.KnockbackFromCastTarget -{ - public HemitheosAeroKnockback1() : base(ActionID.MakeSpell(AID.HemitheosAeroKnockback1), 16) { } // TODO: verify distance... -} - -class HemitheosAeroKnockback2 : Components.KnockbackFromCastTarget -{ - public HemitheosAeroKnockback2() : base(ActionID.MakeSpell(AID.HemitheosAeroKnockback2), 16) { } -} - -class HemitheosHolySpread : Components.SpreadFromCastTargets -{ - public HemitheosHolySpread() : base(ActionID.MakeSpell(AID.HemitheosHolySpread), 6) { } -} - -class HemitheosTornado : Components.SelfTargetedAOEs -{ - public HemitheosTornado() : base(ActionID.MakeSpell(AID.HemitheosTornado), new AOEShapeCircle(25)) { } -} - -class HemitheosGlareMine : Components.SelfTargetedAOEs -{ - public HemitheosGlareMine() : base(ActionID.MakeSpell(AID.HemitheosGlareMine), new AOEShapeDonut(5, 30)) { } // TODO: verify inner radius -} +class HemitheosHoly(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.HemitheosHolyAOE), 6, 4); +class BoughOfAttisBack(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.BoughOfAttisBackAOE), new AOEShapeCircle(25)); +class BoughOfAttisFront(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.BoughOfAttisFrontAOE), new AOEShapeCircle(19)); +class BoughOfAttisSide(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.BoughOfAttisSideAOE), new AOEShapeRect(50, 12.5f)); +class HemitheosAeroKnockback1(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.HemitheosAeroKnockback1), 16); // TODO: verify distance... +class HemitheosAeroKnockback2(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.HemitheosAeroKnockback2), 16); +class HemitheosHolySpread(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.HemitheosHolySpread), 6); +class HemitheosTornado(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HemitheosTornado), new AOEShapeCircle(25)); +class HemitheosGlareMine(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HemitheosGlareMine), new AOEShapeDonut(5, 30)); // TODO: verify inner radius [ConfigDisplay(Order = 0x170, Parent = typeof(EndwalkerConfig))] -public class P7SConfig : CooldownPlanningConfigNode -{ - public P7SConfig() : base(90) { } -} +public class P7SConfig() : CooldownPlanningConfigNode(90); [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 877, NameID = 11374)] -public class P7S : BossModule -{ - public P7S(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(100, 100), 27)) { } -} +public class P7S(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(100, 100), 27)); diff --git a/BossMod/Modules/Endwalker/Savage/P7SAgdistis/WindsHoly.cs b/BossMod/Modules/Endwalker/Savage/P7SAgdistis/WindsHoly.cs index 90d8561315..074a623ca9 100644 --- a/BossMod/Modules/Endwalker/Savage/P7SAgdistis/WindsHoly.cs +++ b/BossMod/Modules/Endwalker/Savage/P7SAgdistis/WindsHoly.cs @@ -1,14 +1,12 @@ namespace BossMod.Endwalker.Savage.P7SAgdistis; -class WindsHoly : Components.UniformStackSpread +class WindsHoly(BossModule module) : Components.UniformStackSpread(module, 6, 7, 4) { public int NumCasts { get; private set; } private List[] _futureStacks = { new(), new(), new(), new() }; private List[] _futureSpreads = { new(), new(), new(), new() }; - public WindsHoly() : base(6, 7, 4) { } - - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { switch ((SID)status.ID) { @@ -43,7 +41,7 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.HemitheosHolyExpire) { diff --git a/BossMod/Modules/Endwalker/Savage/P8S1Hephaistos/Centaur1.cs b/BossMod/Modules/Endwalker/Savage/P8S1Hephaistos/Centaur1.cs index 0f2ba77982..4ab9622c04 100644 --- a/BossMod/Modules/Endwalker/Savage/P8S1Hephaistos/Centaur1.cs +++ b/BossMod/Modules/Endwalker/Savage/P8S1Hephaistos/Centaur1.cs @@ -1,14 +1,7 @@ namespace BossMod.Endwalker.Savage.P8S1Hephaistos; -class RearingRampageSecond : Components.CastCounter -{ - public RearingRampageSecond() : base(ActionID.MakeSpell(AID.RearingRampageSecond)) { } -} - -class RearingRampageLast : Components.CastCounter -{ - public RearingRampageLast() : base(ActionID.MakeSpell(AID.RearingRampageLast)) { } -} +class RearingRampageSecond(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.RearingRampageSecond)); +class RearingRampageLast(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.RearingRampageLast)); class UpliftStompDead : Components.UniformStackSpread { @@ -16,25 +9,23 @@ class UpliftStompDead : Components.UniformStackSpread public int NumStomps { get; private set; } public int[] OrderPerSlot = new int[PartyState.MaxPartySize]; // 0 means not yet known - public UpliftStompDead() : base(6, 6, 2, 2, true) { } - - public override void Init(BossModule module) + public UpliftStompDead(BossModule module) : base(module, 6, 6, 2, 2, true) { - AddSpreads(module.Raid.WithoutSlot(true)); + AddSpreads(Raid.WithoutSlot(true)); } - public override void Update(BossModule module) + public override void Update() { if (Spreads.Count == 0) { Stacks.Clear(); - if (module.Raid.WithoutSlot().Farthest(module.PrimaryActor.Position) is var target && target != null) + if (Raid.WithoutSlot().Farthest(Module.PrimaryActor.Position) is var target && target != null) AddStack(target); } - base.Update(module); + base.Update(); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (OrderPerSlot[slot] > 0) { @@ -44,7 +35,7 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint if (Spreads.Count > 0) { // default implementation is fine during uplifts - base.AddHints(module, slot, actor, hints, movementHints); + base.AddHints(slot, actor, hints); } else { @@ -55,13 +46,13 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { case AID.Uplift: Spreads.RemoveAll(s => s.Target.InstanceID == spell.MainTargetID); - int slot = module.Raid.FindSlot(spell.MainTargetID); + int slot = Raid.FindSlot(spell.MainTargetID); if (slot >= 0) { OrderPerSlot[slot] = 4 - Spreads.Count / 2; diff --git a/BossMod/Modules/Endwalker/Savage/P8S1Hephaistos/Centaur2.cs b/BossMod/Modules/Endwalker/Savage/P8S1Hephaistos/Centaur2.cs index 0e9fbbddb8..89a60b0a32 100644 --- a/BossMod/Modules/Endwalker/Savage/P8S1Hephaistos/Centaur2.cs +++ b/BossMod/Modules/Endwalker/Savage/P8S1Hephaistos/Centaur2.cs @@ -1,40 +1,36 @@ namespace BossMod.Endwalker.Savage.P8S1Hephaistos; -class QuadrupedalImpact : Components.Knockback +class QuadrupedalImpact(BossModule module) : Components.Knockback(module, ActionID.MakeSpell(AID.QuadrupedalImpactAOE), true) { private WPos? _source; - public QuadrupedalImpact() : base(ActionID.MakeSpell(AID.QuadrupedalImpactAOE), true) { } - - public override IEnumerable Sources(BossModule module, int slot, Actor actor) + public override IEnumerable Sources(int slot, Actor actor) { if (_source != null) yield return new(_source.Value, 30); // TODO: activation } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.QuadrupedalImpact) _source = spell.LocXZ; } } -class QuadrupedalCrush : Components.GenericAOEs +class QuadrupedalCrush(BossModule module) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.QuadrupedalCrushAOE)) { private WPos? _source; private DateTime _activation; private static readonly AOEShapeCircle _shape = new(30); - public QuadrupedalCrush() : base(ActionID.MakeSpell(AID.QuadrupedalCrushAOE)) { } - - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_source != null) yield return new(_shape, _source.Value, new(), _activation); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.QuadrupedalCrush) { @@ -44,26 +40,24 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } -class CentaurTetraflare : TetraOctaFlareCommon +class CentaurTetraflare(BossModule module) : TetraOctaFlareCommon(module) { - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.ConceptualTetraflareCentaur) - SetupMasks(module, Concept.Tetra); + SetupMasks(Concept.Tetra); } } -class CentaurDiflare : Components.UniformStackSpread +class CentaurDiflare(BossModule module) : Components.UniformStackSpread(module, 6, 0, 4, 4) { - public CentaurDiflare() : base(6, 0, 4, 4) { } - - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.ConceptualDiflare) - AddStacks(module.Raid.WithoutSlot().Where(a => a.Role == Role.Healer)); + AddStacks(Raid.WithoutSlot().Where(a => a.Role == Role.Healer)); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.EmergentDiflare) Stacks.Clear(); @@ -71,7 +65,7 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } // TODO: hints -class BlazingFootfalls : BossComponent +class BlazingFootfalls(BossModule module) : BossComponent(module) { public int NumMechanicsDone { get; private set; } private int _seenVisuals; @@ -86,102 +80,102 @@ class BlazingFootfalls : BossComponent private const float _safespotOffset = 15; private const float _safespotRadius = 3; - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { if (NumMechanicsDone == 0) { // draw first trailblaze - arena.ZoneRect(module.Bounds.Center, new WDir(0, 1), module.Bounds.HalfSize, module.Bounds.HalfSize, _trailblazeHalfWidth, ArenaColor.AOE); + Arena.ZoneRect(Module.Bounds.Center, new WDir(0, 1), Module.Bounds.HalfSize, Module.Bounds.HalfSize, _trailblazeHalfWidth, ArenaColor.AOE); } if (NumMechanicsDone == 2) { // draw second trailblaze - arena.ZoneRect(module.Bounds.Center, new WDir(1, 0), module.Bounds.HalfSize, module.Bounds.HalfSize, _trailblazeHalfWidth, ArenaColor.AOE); + Arena.ZoneRect(Module.Bounds.Center, new WDir(1, 0), Module.Bounds.HalfSize, Module.Bounds.HalfSize, _trailblazeHalfWidth, ArenaColor.AOE); } if (_firstCrush && NumMechanicsDone < 2) { // draw first crush - arena.ZoneCircle(module.Bounds.Center + module.Bounds.HalfSize * new WDir(_firstSafeLeft ? 1 : -1, 0), _crushRadius, ArenaColor.AOE); + Arena.ZoneCircle(Module.Bounds.Center + Module.Bounds.HalfSize * new WDir(_firstSafeLeft ? 1 : -1, 0), _crushRadius, ArenaColor.AOE); } if (!_firstCrush && NumMechanicsDone is >= 2 and < 4) { // draw second crush - arena.ZoneCircle(module.Bounds.Center + module.Bounds.HalfSize * new WDir(0, _secondSafeTop ? 1 : -1), _crushRadius, ArenaColor.AOE); + Arena.ZoneCircle(Module.Bounds.Center + Module.Bounds.HalfSize * new WDir(0, _secondSafeTop ? 1 : -1), _crushRadius, ArenaColor.AOE); } } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (NumMechanicsDone < 2 && _seenVisuals > 0) { // draw first safespot - arena.AddCircle(module.Bounds.Center + _safespotOffset * new WDir(_firstSafeLeft ? -1 : 1, 0), _safespotRadius, ArenaColor.Safe, 2); + Arena.AddCircle(Module.Bounds.Center + _safespotOffset * new WDir(_firstSafeLeft ? -1 : 1, 0), _safespotRadius, ArenaColor.Safe, 2); } if (NumMechanicsDone < 4 && _seenVisuals > 1) { // draw second safespot - arena.AddCircle(module.Bounds.Center + _safespotOffset * new WDir(0, _secondSafeTop ? -1 : 1), _safespotRadius, ArenaColor.Safe, 2); + Arena.AddCircle(Module.Bounds.Center + _safespotOffset * new WDir(0, _secondSafeTop ? -1 : 1), _safespotRadius, ArenaColor.Safe, 2); } if (NumMechanicsDone == 0) { // draw knockback from first trailblaze - var adjPos = pc.Position + _trailblazeKnockbackDistance * new WDir(pc.Position.X < module.Bounds.Center.X ? -1 : 1, 0); - Components.Knockback.DrawKnockback(pc, adjPos, arena); + var adjPos = pc.Position + _trailblazeKnockbackDistance * new WDir(pc.Position.X < Module.Bounds.Center.X ? -1 : 1, 0); + Components.Knockback.DrawKnockback(pc, adjPos, Arena); } if (NumMechanicsDone == 2) { // draw knockback from second trailblaze - var adjPos = pc.Position + _trailblazeKnockbackDistance * new WDir(0, pc.Position.Z < module.Bounds.Center.Z ? -1 : 1); - Components.Knockback.DrawKnockback(pc, adjPos, arena); + var adjPos = pc.Position + _trailblazeKnockbackDistance * new WDir(0, pc.Position.Z < Module.Bounds.Center.Z ? -1 : 1); + Components.Knockback.DrawKnockback(pc, adjPos, Arena); } if (!_firstCrush && NumMechanicsDone == 1) { // draw knockback from first impact - var adjPos = Components.Knockback.AwayFromSource(pc.Position, module.Bounds.Center + module.Bounds.HalfSize * new WDir(_firstSafeLeft ? -1 : 1, 0), _impactKnockbackRadius); - Components.Knockback.DrawKnockback(pc, adjPos, arena); + var adjPos = Components.Knockback.AwayFromSource(pc.Position, Module.Bounds.Center + Module.Bounds.HalfSize * new WDir(_firstSafeLeft ? -1 : 1, 0), _impactKnockbackRadius); + Components.Knockback.DrawKnockback(pc, adjPos, Arena); } if (_firstCrush && NumMechanicsDone == 3) { // draw knockback from second impact - var adjPos = Components.Knockback.AwayFromSource(pc.Position, module.Bounds.Center + module.Bounds.HalfSize * new WDir(0, _secondSafeTop ? -1 : 1), _impactKnockbackRadius); - Components.Knockback.DrawKnockback(pc, adjPos, arena); + var adjPos = Components.Knockback.AwayFromSource(pc.Position, Module.Bounds.Center + Module.Bounds.HalfSize * new WDir(0, _secondSafeTop ? -1 : 1), _impactKnockbackRadius); + Components.Knockback.DrawKnockback(pc, adjPos, Arena); } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { case AID.BlazingFootfallsImpactVisual: if (_seenVisuals > 0) { - _secondSafeTop = spell.LocXZ.Z < module.Bounds.Center.Z; + _secondSafeTop = spell.LocXZ.Z < Module.Bounds.Center.Z; } else { - _firstSafeLeft = spell.LocXZ.X < module.Bounds.Center.X; + _firstSafeLeft = spell.LocXZ.X < Module.Bounds.Center.X; } ++_seenVisuals; break; case AID.BlazingFootfallsCrushVisual: if (_seenVisuals > 0) { - _secondSafeTop = spell.LocXZ.Z > module.Bounds.Center.Z; + _secondSafeTop = spell.LocXZ.Z > Module.Bounds.Center.Z; } else { _firstCrush = true; - _firstSafeLeft = spell.LocXZ.X > module.Bounds.Center.X; + _firstSafeLeft = spell.LocXZ.X > Module.Bounds.Center.X; } ++_seenVisuals; break; } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.BlazingFootfallsTrailblaze or AID.BlazingFootfallsImpact or AID.BlazingFootfallsCrush) ++NumMechanicsDone; diff --git a/BossMod/Modules/Endwalker/Savage/P8S1Hephaistos/CentaurCommon.cs b/BossMod/Modules/Endwalker/Savage/P8S1Hephaistos/CentaurCommon.cs index caee1de9e7..70d06c1a34 100644 --- a/BossMod/Modules/Endwalker/Savage/P8S1Hephaistos/CentaurCommon.cs +++ b/BossMod/Modules/Endwalker/Savage/P8S1Hephaistos/CentaurCommon.cs @@ -1,11 +1,9 @@ namespace BossMod.Endwalker.Savage.P8S1Hephaistos; -class Footprint : Components.Knockback +class Footprint(BossModule module) : Components.Knockback(module, ActionID.MakeSpell(AID.Footprint)) { - public Footprint() : base(ActionID.MakeSpell(AID.Footprint)) { } - - public override IEnumerable Sources(BossModule module, int slot, Actor actor) + public override IEnumerable Sources(int slot, Actor actor) { - yield return new(module.PrimaryActor.Position, 20); // TODO: activation + yield return new(Module.PrimaryActor.Position, 20); // TODO: activation } } diff --git a/BossMod/Modules/Endwalker/Savage/P8S1Hephaistos/ChtonicVent.cs b/BossMod/Modules/Endwalker/Savage/P8S1Hephaistos/ChtonicVent.cs index 42a25a6305..5a765f1535 100644 --- a/BossMod/Modules/Endwalker/Savage/P8S1Hephaistos/ChtonicVent.cs +++ b/BossMod/Modules/Endwalker/Savage/P8S1Hephaistos/ChtonicVent.cs @@ -1,25 +1,25 @@ namespace BossMod.Endwalker.Savage.P8S1Hephaistos; -class CthonicVent : Components.GenericAOEs +class CthonicVent(BossModule module) : Components.GenericAOEs(module) { public int NumTotalCasts { get; private set; } private List _centers = new(); private static readonly AOEShapeCircle _shape = new(23); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { foreach (var c in _centers) yield return new(_shape, c); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { // note: we can determine position ~0.1s earlier by using eobjanim if ((AID)spell.Action.ID == AID.CthonicVentAOE1) _centers.Add(caster.Position); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { diff --git a/BossMod/Modules/Endwalker/Savage/P8S1Hephaistos/Flameviper.cs b/BossMod/Modules/Endwalker/Savage/P8S1Hephaistos/Flameviper.cs index 4c55178ed9..9c47c55998 100644 --- a/BossMod/Modules/Endwalker/Savage/P8S1Hephaistos/Flameviper.cs +++ b/BossMod/Modules/Endwalker/Savage/P8S1Hephaistos/Flameviper.cs @@ -1,21 +1,19 @@ namespace BossMod.Endwalker.Savage.P8S1Hephaistos; -class Flameviper : Components.CastCounter +class Flameviper(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.FlameviperSecond)) { private ulong _firstTarget; - public Flameviper() : base(ActionID.MakeSpell(AID.FlameviperSecond)) { } - - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (actor.Role != Role.Tank) return; - if (module.PrimaryActor.TargetID == _firstTarget) + if (Module.PrimaryActor.TargetID == _firstTarget) hints.Add(actor.InstanceID == _firstTarget ? "Pass aggro to co-tank" : "Taunt!"); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.Flameviper) _firstTarget = spell.TargetID; diff --git a/BossMod/Modules/Endwalker/Savage/P8S1Hephaistos/ManifoldFlames.cs b/BossMod/Modules/Endwalker/Savage/P8S1Hephaistos/ManifoldFlames.cs index 200ac2526c..a603a59494 100644 --- a/BossMod/Modules/Endwalker/Savage/P8S1Hephaistos/ManifoldFlames.cs +++ b/BossMod/Modules/Endwalker/Savage/P8S1Hephaistos/ManifoldFlames.cs @@ -2,49 +2,45 @@ class ManifoldFlames : Components.UniformStackSpread { - public ManifoldFlames() : base(0, 6) { } - - public override void Init(BossModule module) + public ManifoldFlames(BossModule module) : base(module, 0, 6) { - AddSpreads(module.Raid.WithoutSlot(true)); + AddSpreads(Raid.WithoutSlot(true)); } } -class NestOfFlamevipersCommon : Components.CastCounter +class NestOfFlamevipersCommon(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.NestOfFlamevipersAOE)) { protected BitMask BaitingPlayers; private static readonly AOEShapeRect _shape = new(60, 2.5f); - public NestOfFlamevipersCommon() : base(ActionID.MakeSpell(AID.NestOfFlamevipersAOE)) { } - - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { - if (module.Raid.WithSlot().IncludedInMask(BaitingPlayers).WhereActor(p => p != actor && _shape.Check(actor.Position, module.PrimaryActor.Position, Angle.FromDirection(p.Position - module.PrimaryActor.Position))).Any()) + if (Raid.WithSlot().IncludedInMask(BaitingPlayers).WhereActor(p => p != actor && _shape.Check(actor.Position, Module.PrimaryActor.Position, Angle.FromDirection(p.Position - Module.PrimaryActor.Position))).Any()) hints.Add("GTFO from baited aoe!"); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - foreach (var (_, player) in module.Raid.WithSlot().IncludedInMask(BaitingPlayers)) - _shape.Outline(arena, module.PrimaryActor.Position, Angle.FromDirection(player.Position - module.PrimaryActor.Position)); + foreach (var (_, player) in Raid.WithSlot().IncludedInMask(BaitingPlayers)) + _shape.Outline(Arena, Module.PrimaryActor.Position, Angle.FromDirection(player.Position - Module.PrimaryActor.Position)); } } // variant that happens right after manifold flames and baits to 4 closest players -class NestOfFlamevipersBaited : NestOfFlamevipersCommon +class NestOfFlamevipersBaited(BossModule module) : NestOfFlamevipersCommon(module) { private BitMask _forbiddenPlayers; public bool Active => NumCasts == 0 && _forbiddenPlayers.Any(); - public override void Update(BossModule module) + public override void Update() { - BaitingPlayers = Active ? module.Raid.WithSlot().SortedByRange(module.PrimaryActor.Position).Take(4).Mask() : new(); + BaitingPlayers = Active ? Raid.WithSlot().SortedByRange(Module.PrimaryActor.Position).Take(4).Mask() : new(); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { - base.AddHints(module, slot, actor, hints, movementHints); + base.AddHints(slot, actor, hints); if (Active) { bool shouldBait = !_forbiddenPlayers[slot]; @@ -52,22 +48,22 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { - base.OnEventCast(module, caster, spell); + base.OnEventCast(caster, spell); if ((AID)spell.Action.ID == AID.HemitheosFlare) - _forbiddenPlayers.Set(module.Raid.FindSlot(spell.MainTargetID)); + _forbiddenPlayers.Set(Raid.FindSlot(spell.MainTargetID)); } } // variant that happens when cast is started and baits to everyone -class NestOfFlamevipersEveryone : NestOfFlamevipersCommon +class NestOfFlamevipersEveryone(BossModule module) : NestOfFlamevipersCommon(module) { public bool Active => NumCasts == 0 && BaitingPlayers.Any(); - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.NestOfFlamevipers) - BaitingPlayers = module.Raid.WithSlot().Mask(); + BaitingPlayers = Raid.WithSlot().Mask(); } } diff --git a/BossMod/Modules/Endwalker/Savage/P8S1Hephaistos/NFlare.cs b/BossMod/Modules/Endwalker/Savage/P8S1Hephaistos/NFlare.cs index 1945330ef9..4fca57b44d 100644 --- a/BossMod/Modules/Endwalker/Savage/P8S1Hephaistos/NFlare.cs +++ b/BossMod/Modules/Endwalker/Savage/P8S1Hephaistos/NFlare.cs @@ -1,13 +1,11 @@ namespace BossMod.Endwalker.Savage.P8S1Hephaistos; // component dealing with tetra/octaflare mechanics (conceptual or not) -class TetraOctaFlareCommon : Components.UniformStackSpread +class TetraOctaFlareCommon(BossModule module) : Components.UniformStackSpread(module, 3, 6, 2, 2) { public enum Concept { None, Tetra, Octa } - public TetraOctaFlareCommon() : base(3, 6, 2, 2) { } - - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.EmergentOctaflare or AID.EmergentTetraflare) { @@ -16,54 +14,54 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } - protected void SetupMasks(BossModule module, Concept concept) + protected void SetupMasks(Concept concept) { switch (concept) { case Concept.Tetra: // note that targets are either all dps or all tanks/healers, it seems to be unknown until actual cast, so for simplicity assume it will target tanks/healers (not that it matters much in practice) - AddStacks(module.Raid.WithoutSlot().Where(a => a.Role is Role.Tank or Role.Healer)); + AddStacks(Raid.WithoutSlot().Where(a => a.Role is Role.Tank or Role.Healer)); break; case Concept.Octa: - AddSpreads(module.Raid.WithoutSlot()); + AddSpreads(Raid.WithoutSlot()); break; } } } -class TetraOctaFlareImmediate : TetraOctaFlareCommon +class TetraOctaFlareImmediate(BossModule module) : TetraOctaFlareCommon(module) { - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { case AID.Octaflare: - SetupMasks(module, Concept.Octa); + SetupMasks(Concept.Octa); break; case AID.Tetraflare: - SetupMasks(module, Concept.Tetra); + SetupMasks(Concept.Tetra); break; } } } -class TetraOctaFlareConceptual : TetraOctaFlareCommon +class TetraOctaFlareConceptual(BossModule module) : TetraOctaFlareCommon(module) { private Concept _concept; - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (_concept != Concept.None) hints.Add(_concept == Concept.Tetra ? "Prepare to stack in pairs" : "Prepare to spread"); } - public void Show(BossModule module) + public void Show() { - SetupMasks(module, _concept); + SetupMasks(_concept); _concept = Concept.None; } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { diff --git a/BossMod/Modules/Endwalker/Savage/P8S1Hephaistos/P8S1.cs b/BossMod/Modules/Endwalker/Savage/P8S1Hephaistos/P8S1.cs index 5aa3c9e4a2..e6d62479d5 100644 --- a/BossMod/Modules/Endwalker/Savage/P8S1Hephaistos/P8S1.cs +++ b/BossMod/Modules/Endwalker/Savage/P8S1Hephaistos/P8S1.cs @@ -1,17 +1,7 @@ namespace BossMod.Endwalker.Savage.P8S1Hephaistos; -class VolcanicTorches : Components.SelfTargetedAOEs -{ - public VolcanicTorches() : base(ActionID.MakeSpell(AID.TorchFlame), new AOEShapeRect(5, 5, 5)) { } -} - -class AbyssalFires : Components.LocationTargetedAOEs -{ - public AbyssalFires() : base(ActionID.MakeSpell(AID.AbyssalFires), 15) { } // TODO: verify falloff -} +class VolcanicTorches(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TorchFlame), new AOEShapeRect(5, 5, 5)); +class AbyssalFires(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.AbyssalFires), 15); // TODO: verify falloff [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 884, NameID = 11399, SortOrder = 1)] -public class P8S1 : BossModule -{ - public P8S1(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsSquare(new(100, 100), 20)) { } -} +public class P8S1(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsSquare(new(100, 100), 20)); diff --git a/BossMod/Modules/Endwalker/Savage/P8S1Hephaistos/P8S1Config.cs b/BossMod/Modules/Endwalker/Savage/P8S1Hephaistos/P8S1Config.cs index 5ec8a2c360..8a6dee56e2 100644 --- a/BossMod/Modules/Endwalker/Savage/P8S1Hephaistos/P8S1Config.cs +++ b/BossMod/Modules/Endwalker/Savage/P8S1Hephaistos/P8S1Config.cs @@ -1,7 +1,7 @@ namespace BossMod.Endwalker.Savage.P8S1Hephaistos; [ConfigDisplay(Order = 0x181, Parent = typeof(EndwalkerConfig))] -public class P8S1Config : CooldownPlanningConfigNode +public class P8S1Config() : CooldownPlanningConfigNode(90) { [PropertyDisplay("Snake 1: assignments")] [GroupDetails(new string[] { "Prio 1 (always CW from N)", "Prio 2 (flex CW from N)", "Prio 3 (flex CCW from NW)", "Prio 4 (always CCW from NW)" })] @@ -16,6 +16,4 @@ public class P8S1Config : CooldownPlanningConfigNode [PropertyDisplay("Snake 2: use cardinal priorities (G1 N/W, PF strat) instead of ordering (G1 first safe CCW from NW, Hector strat)")] public bool Snake2CardinalPriorities = true; - - public P8S1Config() : base(90) { } } diff --git a/BossMod/Modules/Endwalker/Savage/P8S1Hephaistos/P8S1States.cs b/BossMod/Modules/Endwalker/Savage/P8S1Hephaistos/P8S1States.cs index e3bbd2b998..2a69bde7d6 100644 --- a/BossMod/Modules/Endwalker/Savage/P8S1Hephaistos/P8S1States.cs +++ b/BossMod/Modules/Endwalker/Savage/P8S1Hephaistos/P8S1States.cs @@ -5,7 +5,7 @@ class P8S1States : StateMachineBuilder public P8S1States(BossModule module) : base(module) { SimplePhase(0, SinglePhase, "Single phase") - .Raw.Update = () => module.PrimaryActor.IsDestroyed; + .Raw.Update = () => Module.PrimaryActor.IsDestroyed; } private void SinglePhase(uint id) diff --git a/BossMod/Modules/Endwalker/Savage/P8S1Hephaistos/Snake1.cs b/BossMod/Modules/Endwalker/Savage/P8S1Hephaistos/Snake1.cs index 7989c93c13..07a66717c9 100644 --- a/BossMod/Modules/Endwalker/Savage/P8S1Hephaistos/Snake1.cs +++ b/BossMod/Modules/Endwalker/Savage/P8S1Hephaistos/Snake1.cs @@ -1,7 +1,7 @@ namespace BossMod.Endwalker.Savage.P8S1Hephaistos; // TODO: add various hints for gaze/explode -class Snake1 : PetrifactionCommon +class Snake1(BossModule module) : PetrifactionCommon(module) { struct PlayerState { @@ -12,9 +12,9 @@ struct PlayerState private PlayerState[] _players = Utils.MakeArray(PartyState.MaxPartySize, new PlayerState() { Order = -1, AssignedSnake = -1 }); - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { - base.AddHints(module, slot, actor, hints, movementHints); + base.AddHints(slot, actor, hints); if (_players[slot].Order >= 0) { @@ -22,63 +22,63 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - base.DrawArenaForeground(module, pcSlot, pc, arena); + base.DrawArenaForeground(pcSlot, pc); var state = _players[pcSlot]; if (state.Order >= 0) { // show circle around assigned snake if (state.AssignedSnake >= 0) - arena.AddCircle(ActiveGorgons[state.AssignedSnake].caster.Position, 2, ArenaColor.Safe); + Arena.AddCircle(ActiveGorgons[state.AssignedSnake].caster.Position, 2, ArenaColor.Safe); if (state.IsExplode) - DrawExplode(pc, state.Order == 1 && NumCasts < 2, arena); + DrawExplode(pc, state.Order == 1 && NumCasts < 2); else - DrawPetrify(pc, state.Order == 1 && NumCasts < 2, arena); + DrawPetrify(pc, state.Order == 1 && NumCasts < 2); } } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { switch ((SID)status.ID) { case SID.FirstInLine: - SetPlayerOrder(module.Raid.FindSlot(actor.InstanceID), 0); + SetPlayerOrder(Raid.FindSlot(actor.InstanceID), 0); break; case SID.SecondInLine: - SetPlayerOrder(module.Raid.FindSlot(actor.InstanceID), 1); + SetPlayerOrder(Raid.FindSlot(actor.InstanceID), 1); break; case SID.EyeOfTheGorgon: - SetPlayerExplode(module.Raid.FindSlot(actor.InstanceID), false); + SetPlayerExplode(Raid.FindSlot(actor.InstanceID), false); break; case SID.BloodOfTheGorgon: - SetPlayerExplode(module.Raid.FindSlot(actor.InstanceID), true); + SetPlayerExplode(Raid.FindSlot(actor.InstanceID), true); break; } } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { switch ((SID)status.ID) { case SID.FirstInLine: case SID.SecondInLine: - SetPlayerOrder(module.Raid.FindSlot(actor.InstanceID), -1); + SetPlayerOrder(Raid.FindSlot(actor.InstanceID), -1); break; } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { - base.OnCastStarted(module, caster, spell); + base.OnCastStarted(caster, spell); if ((AID)spell.Action.ID == AID.Petrifaction) { if (ActiveGorgons.Count == 2) - InitAssignments(module, 0); + InitAssignments(0); else if (ActiveGorgons.Count == 4) - InitAssignments(module, 1); + InitAssignments(1); } } @@ -94,10 +94,10 @@ private void SetPlayerExplode(int slot, bool explode) _players[slot].IsExplode = explode; } - private void InitAssignments(BossModule module, int order) + private void InitAssignments(int order) { int[] assignedSlots = { -1, -1, -1, -1 }; - foreach (var a in Service.Config.Get().Snake1Assignments.Resolve(module.Raid)) + foreach (var a in Service.Config.Get().Snake1Assignments.Resolve(Raid)) if (_players[a.slot].Order == order) assignedSlots[a.group] = a.slot; if (assignedSlots[0] == -1) diff --git a/BossMod/Modules/Endwalker/Savage/P8S1Hephaistos/Snake2.cs b/BossMod/Modules/Endwalker/Savage/P8S1Hephaistos/Snake2.cs index e93cc0397b..277b3f1b2b 100644 --- a/BossMod/Modules/Endwalker/Savage/P8S1Hephaistos/Snake2.cs +++ b/BossMod/Modules/Endwalker/Savage/P8S1Hephaistos/Snake2.cs @@ -1,14 +1,12 @@ namespace BossMod.Endwalker.Savage.P8S1Hephaistos; -class Gorgospit : Components.GenericAOEs +class Gorgospit(BossModule module) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.Gorgospit)) { public List<(Actor caster, DateTime finish)> Casters = new(); private static readonly AOEShapeRect _shape = new(60, 5); - public Gorgospit() : base(ActionID.MakeSpell(AID.Gorgospit)) { } - - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { foreach (var c in Casters) { @@ -19,13 +17,13 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, } } - public override void OnActorPlayActionTimelineEvent(BossModule module, Actor actor, ushort id) + public override void OnActorPlayActionTimelineEvent(Actor actor, ushort id) { if ((OID)actor.OID == OID.IllusoryHephaistosSnakes && id == 0x11D2) - Casters.Add((actor, module.WorldState.CurrentTime.AddSeconds(8))); + Casters.Add((actor, WorldState.FutureTime(8))); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) Casters.RemoveAll(c => c.caster == caster); @@ -33,7 +31,7 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn } // TODO: add various hints for gaze/explode -class Snake2 : PetrifactionCommon +class Snake2(BossModule module) : PetrifactionCommon(module) { struct PlayerState { @@ -50,66 +48,63 @@ struct PlayerState private const float _breathRadius = 6; - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { - base.AddHints(module, slot, actor, hints, movementHints); + base.AddHints(slot, actor, hints); var state = _players[slot]; hints.Add($"Petrify order: {(state.LongPetrify ? 2 : 1)}, {(state.HasCrown ? "hide behind snake" : "stack between snakes")}", false); } - public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) - { - return NumCrownCasts == 0 && _players[playerSlot].HasCrown ? PlayerPriority.Danger : PlayerPriority.Irrelevant; - } + public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) => NumCrownCasts == 0 && _players[playerSlot].HasCrown ? PlayerPriority.Danger : PlayerPriority.Irrelevant; - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - base.DrawArenaForeground(module, pcSlot, pc, arena); + base.DrawArenaForeground(pcSlot, pc); if (NumEyeCasts < 8) { if (_players[pcSlot].LongPetrify != (NumEyeCasts < 4)) - DrawPetrify(pc, NumCasts == 0, arena); + DrawPetrify(pc, NumCasts == 0); else - DrawExplode(pc, NumCasts == 0, arena); + DrawExplode(pc, NumCasts == 0); } else if (NumBreathCasts == 0) { // show circle around assigned snake if (_players[pcSlot].AssignedSnake >= 0) - arena.AddCircle(ActiveGorgons[_players[pcSlot].AssignedSnake].caster.Position, 2, ArenaColor.Safe); + Arena.AddCircle(ActiveGorgons[_players[pcSlot].AssignedSnake].caster.Position, 2, ArenaColor.Safe); - foreach (var (slot, player) in module.Raid.WithSlot()) + foreach (var (slot, player) in Raid.WithSlot()) if (_players[slot].HasBreath) - arena.AddCircle(player.Position, _breathRadius, ArenaColor.Safe); + Arena.AddCircle(player.Position, _breathRadius, ArenaColor.Safe); } } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { switch ((SID)status.ID) { case SID.EyeOfTheGorgon: - SetPlayerLongPetrify(module.Raid.FindSlot(actor.InstanceID), (status.ExpireAt - module.WorldState.CurrentTime).TotalSeconds > 25); + SetPlayerLongPetrify(Raid.FindSlot(actor.InstanceID), (status.ExpireAt - WorldState.CurrentTime).TotalSeconds > 25); break; case SID.CrownOfTheGorgon: - SetPlayerCrown(module.Raid.FindSlot(actor.InstanceID), true); + SetPlayerCrown(Raid.FindSlot(actor.InstanceID), true); break; case SID.BreathOfTheGorgon: - SetPlayerBreath(module.Raid.FindSlot(actor.InstanceID), true); + SetPlayerBreath(Raid.FindSlot(actor.InstanceID), true); break; } } - public override void OnActorPlayActionTimelineEvent(BossModule module, Actor actor, ushort id) + public override void OnActorPlayActionTimelineEvent(Actor actor, ushort id) { if ((OID)actor.OID != OID.IllusoryHephaistosSnakes || id != 0x11D2 || _gorgospitCounter++ != 4) return; int[] assignedSlots = { -1, -1, -1, -1, -1, -1, -1, -1 }; // supports then dd - foreach (var a in Service.Config.Get().Snake2Assignments.Resolve(module.Raid)) - assignedSlots[a.group + (module.Raid[a.slot]?.Role is Role.Tank or Role.Healer ? 0 : 4)] = a.slot; + foreach (var a in Service.Config.Get().Snake2Assignments.Resolve(Raid)) + assignedSlots[a.group + (Raid[a.slot]?.Role is Role.Tank or Role.Healer ? 0 : 4)] = a.slot; if (assignedSlots[0] == -1) return; // invalid assignments diff --git a/BossMod/Modules/Endwalker/Savage/P8S1Hephaistos/SnakeCommon.cs b/BossMod/Modules/Endwalker/Savage/P8S1Hephaistos/SnakeCommon.cs index 73bb18fc81..48958e8817 100644 --- a/BossMod/Modules/Endwalker/Savage/P8S1Hephaistos/SnakeCommon.cs +++ b/BossMod/Modules/Endwalker/Savage/P8S1Hephaistos/SnakeCommon.cs @@ -1,19 +1,17 @@ namespace BossMod.Endwalker.Savage.P8S1Hephaistos; -class SnakingKick : Components.GenericAOEs +class SnakingKick(BossModule module) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.SnakingKick)) { private static readonly AOEShapeCircle _shape = new(10); - public SnakingKick() : base(ActionID.MakeSpell(AID.SnakingKick)) { } - - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { - yield return new(_shape, module.PrimaryActor.Position); + yield return new(_shape, Module.PrimaryActor.Position); } } // snake 'priority' depends on position, CW from N: N is 0, NE is 1, and so on -abstract class PetrifactionCommon : Components.GenericGaze +abstract class PetrifactionCommon(BossModule module) : Components.GenericGaze(module, ActionID.MakeSpell(AID.PetrifactionAOE)) { public int NumEyeCasts { get; private set; } public int NumBloodCasts { get; private set; } @@ -21,9 +19,7 @@ abstract class PetrifactionCommon : Components.GenericGaze public int NumBreathCasts { get; private set; } protected List<(Actor caster, DateTime activation, int priority)> ActiveGorgons = new(); - public PetrifactionCommon() : base(ActionID.MakeSpell(AID.PetrifactionAOE)) { } - - public override IEnumerable ActiveEyes(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveEyes(int slot, Actor actor) { if (ActiveGorgons.Count > NumCasts) { @@ -33,26 +29,26 @@ public override IEnumerable ActiveEyes(BossModule module, int slot, Actor a } } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - foreach (var g in module.Enemies(OID.Gorgon).Where(g => !g.IsDead)) - arena.Actor(g, ArenaColor.Enemy, true); - base.DrawArenaForeground(module, pcSlot, pc, arena); + foreach (var g in Module.Enemies(OID.Gorgon).Where(g => !g.IsDead)) + Arena.Actor(g, ArenaColor.Enemy, true); + base.DrawArenaForeground(pcSlot, pc); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.Petrifaction) { - var dir = Angle.FromDirection(caster.Position - module.Bounds.Center); + var dir = Angle.FromDirection(caster.Position - Module.Bounds.Center); var priority = (int)MathF.Round((180 - dir.Deg) / 45) % 8; ActiveGorgons.Add((caster, spell.NPCFinishAt.AddSeconds(1.1f), priority)); } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { - base.OnEventCast(module, caster, spell); + base.OnEventCast(caster, spell); switch ((AID)spell.Action.ID) { case AID.EyeOfTheGorgon: @@ -70,6 +66,6 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } - public void DrawPetrify(Actor source, bool delayed, MiniArena arena) => arena.AddCone(source.Position, 25, source.Rotation, 45.Degrees(), delayed ? ArenaColor.Safe : ArenaColor.Danger); - public void DrawExplode(Actor source, bool delayed, MiniArena arena) => arena.AddCircle(source.Position, 5, delayed ? ArenaColor.Safe : ArenaColor.Danger); + public void DrawPetrify(Actor source, bool delayed) => Arena.AddCone(source.Position, 25, source.Rotation, 45.Degrees(), delayed ? ArenaColor.Safe : ArenaColor.Danger); + public void DrawExplode(Actor source, bool delayed) => Arena.AddCircle(source.Position, 5, delayed ? ArenaColor.Safe : ArenaColor.Danger); } diff --git a/BossMod/Modules/Endwalker/Savage/P8S1Hephaistos/Sunforge.cs b/BossMod/Modules/Endwalker/Savage/P8S1Hephaistos/Sunforge.cs index 0f8590c896..2e65b1e6f7 100644 --- a/BossMod/Modules/Endwalker/Savage/P8S1Hephaistos/Sunforge.cs +++ b/BossMod/Modules/Endwalker/Savage/P8S1Hephaistos/Sunforge.cs @@ -1,48 +1,29 @@ namespace BossMod.Endwalker.Savage.P8S1Hephaistos; -class SunforgeCenterHint : Components.CastHint +class SunforgeCenterHint(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.SunforgeCenter), "Avoid center") { - public SunforgeCenterHint() : base(ActionID.MakeSpell(AID.SunforgeCenter), "Avoid center") { } - - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { if (Active) { - arena.ZoneRect(module.Bounds.Center, new WDir(1, 0), 21, -7, 21, ArenaColor.SafeFromAOE); - arena.ZoneRect(module.Bounds.Center, new WDir(-1, 0), 21, -7, 21, ArenaColor.SafeFromAOE); + Arena.ZoneRect(Module.Bounds.Center, new WDir(1, 0), 21, -7, 21, ArenaColor.SafeFromAOE); + Arena.ZoneRect(Module.Bounds.Center, new WDir(-1, 0), 21, -7, 21, ArenaColor.SafeFromAOE); } } } -class SunforgeSidesHint : Components.CastHint +class SunforgeSidesHint(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.SunforgeSides), "Avoid sides") { - public SunforgeSidesHint() : base(ActionID.MakeSpell(AID.SunforgeSides), "Avoid sides") { } - - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { if (Active) { - arena.ZoneRect(module.Bounds.Center, new WDir(0, 1), 21, 21, 7, ArenaColor.SafeFromAOE); + Arena.ZoneRect(Module.Bounds.Center, new WDir(0, 1), 21, 21, 7, ArenaColor.SafeFromAOE); } } } -class SunforgeCenter : Components.SelfTargetedAOEs -{ - public SunforgeCenter() : base(ActionID.MakeSpell(AID.ScorchingFang), new AOEShapeRect(21, 7, 21)) { } -} - -class SunforgeSides : Components.SelfTargetedAOEs -{ - public SunforgeSides() : base(ActionID.MakeSpell(AID.SunsPinion), new AOEShapeRect(21, 21, -7)) { } -} - -class SunforgeCenterIntermission : Components.SelfTargetedAOEs -{ - public SunforgeCenterIntermission() : base(ActionID.MakeSpell(AID.ScorchingFangIntermission), new AOEShapeRect(42, 7)) { } -} - -class SunforgeSidesIntermission : Components.SelfTargetedAOEs -{ - public SunforgeSidesIntermission() : base(ActionID.MakeSpell(AID.ScorchedPinion), new AOEShapeRect(21, 42, -7)) { } -} +class SunforgeCenter(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ScorchingFang), new AOEShapeRect(21, 7, 21)); +class SunforgeSides(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.SunsPinion), new AOEShapeRect(21, 21, -7)); +class SunforgeCenterIntermission(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ScorchingFangIntermission), new AOEShapeRect(42, 7)); +class SunforgeSidesIntermission(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ScorchedPinion), new AOEShapeRect(21, 42, -7)); diff --git a/BossMod/Modules/Endwalker/Savage/P8S2Hephaistos/AshingBlaze.cs b/BossMod/Modules/Endwalker/Savage/P8S2Hephaistos/AshingBlaze.cs index 8f1de32953..075dfa9bb6 100644 --- a/BossMod/Modules/Endwalker/Savage/P8S2Hephaistos/AshingBlaze.cs +++ b/BossMod/Modules/Endwalker/Savage/P8S2Hephaistos/AshingBlaze.cs @@ -1,17 +1,17 @@ namespace BossMod.Endwalker.Savage.P8S2; -class AshingBlaze : Components.GenericAOEs +class AshingBlaze(BossModule module) : Components.GenericAOEs(module) { private WPos? _origin; private static readonly AOEShapeRect _shape = new(46, 10); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_origin != null) - yield return new(_shape, _origin.Value, 0.Degrees(), module.PrimaryActor.CastInfo?.NPCFinishAt ?? default); + yield return new(_shape, _origin.Value, 0.Degrees(), Module.PrimaryActor.CastInfo?.NPCFinishAt ?? default); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { @@ -24,7 +24,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.AshingBlazeL or AID.AshingBlazeR) _origin = null; diff --git a/BossMod/Modules/Endwalker/Savage/P8S2Hephaistos/Dominion.cs b/BossMod/Modules/Endwalker/Savage/P8S2Hephaistos/Dominion.cs index 17a0ba6571..6539d0bb0b 100644 --- a/BossMod/Modules/Endwalker/Savage/P8S2Hephaistos/Dominion.cs +++ b/BossMod/Modules/Endwalker/Savage/P8S2Hephaistos/Dominion.cs @@ -9,16 +9,14 @@ class Dominion : Components.UniformStackSpread private static readonly float _towerRadius = 3; - public Dominion() : base(0, 6) { } - - public override void Init(BossModule module) + public Dominion(BossModule module) : base(module, 0, 6) { - AddSpreads(module.Raid.WithoutSlot()); + AddSpreads(Raid.WithoutSlot()); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { - base.AddHints(module, slot, actor, hints, movementHints); + base.AddHints(slot, actor, hints); if (NumDeformations >= 4) { @@ -26,16 +24,16 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - base.DrawArenaForeground(module, pcSlot, pc, arena); + base.DrawArenaForeground(pcSlot, pc); if (NumDeformations >= 4 && ShouldSoak(pcSlot)) foreach (var tower in ActiveTowers()) - arena.AddCircle(tower.Position, _towerRadius, ArenaColor.Danger, 2); + Arena.AddCircle(tower.Position, _towerRadius, ArenaColor.Danger, 2); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.OrogenicShift) { @@ -43,7 +41,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.OrogenicShift) { @@ -51,12 +49,12 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.OrogenicDeformation) { Spreads.Clear(); - _secondOrder.Set(module.Raid.FindSlot(spell.MainTargetID)); + _secondOrder.Set(Raid.FindSlot(spell.MainTargetID)); ++NumDeformations; } } diff --git a/BossMod/Modules/Endwalker/Savage/P8S2Hephaistos/EgoDeath.cs b/BossMod/Modules/Endwalker/Savage/P8S2Hephaistos/EgoDeath.cs index babd9d8092..4b2188d813 100644 --- a/BossMod/Modules/Endwalker/Savage/P8S2Hephaistos/EgoDeath.cs +++ b/BossMod/Modules/Endwalker/Savage/P8S2Hephaistos/EgoDeath.cs @@ -1,18 +1,18 @@ namespace BossMod.Endwalker.Savage.P8S2; -class EgoDeath : BossComponent +class EgoDeath(BossModule module) : BossComponent(module) { public BitMask InEventMask; - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.InEvent) - InEventMask.Set(module.Raid.FindSlot(actor.InstanceID)); + InEventMask.Set(Raid.FindSlot(actor.InstanceID)); } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.InEvent) - InEventMask.Clear(module.Raid.FindSlot(actor.InstanceID)); + InEventMask.Clear(Raid.FindSlot(actor.InstanceID)); } } diff --git a/BossMod/Modules/Endwalker/Savage/P8S2Hephaistos/EndOfDays.cs b/BossMod/Modules/Endwalker/Savage/P8S2Hephaistos/EndOfDays.cs index 770f1ae1c7..e5f92e41fe 100644 --- a/BossMod/Modules/Endwalker/Savage/P8S2Hephaistos/EndOfDays.cs +++ b/BossMod/Modules/Endwalker/Savage/P8S2Hephaistos/EndOfDays.cs @@ -1,14 +1,12 @@ namespace BossMod.Endwalker.Savage.P8S2; -class EndOfDays : Components.GenericAOEs +class EndOfDays(BossModule module) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.EndOfDays)) { public List<(Actor caster, DateTime finish)> Casters = new(); private static readonly AOEShapeRect _shape = new(60, 5); - public EndOfDays() : base(ActionID.MakeSpell(AID.EndOfDays)) { } - - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { foreach (var c in Casters.Take(3)) { @@ -19,15 +17,15 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) Casters.RemoveAll(c => c.caster == caster); } - public override void OnActorPlayActionTimelineEvent(BossModule module, Actor actor, ushort id) + public override void OnActorPlayActionTimelineEvent(Actor actor, ushort id) { if ((OID)actor.OID == OID.IllusoryHephaistosLanes && id == 0x11D3) - Casters.Add((actor, module.WorldState.CurrentTime.AddSeconds(8))); // ~2s before cast start + Casters.Add((actor, WorldState.FutureTime(8))); // ~2s before cast start } } diff --git a/BossMod/Modules/Endwalker/Savage/P8S2Hephaistos/EndOfDaysTethered.cs b/BossMod/Modules/Endwalker/Savage/P8S2Hephaistos/EndOfDaysTethered.cs index 322a35d9c9..0e65992c55 100644 --- a/BossMod/Modules/Endwalker/Savage/P8S2Hephaistos/EndOfDaysTethered.cs +++ b/BossMod/Modules/Endwalker/Savage/P8S2Hephaistos/EndOfDaysTethered.cs @@ -1,6 +1,6 @@ namespace BossMod.Endwalker.Savage.P8S2; -class EndOfDaysTethered : BossComponent +class EndOfDaysTethered(BossModule module) : BossComponent(module) { private List<(Actor source, Actor target)> _tethers = new(); // enemy -> player @@ -8,41 +8,41 @@ class EndOfDaysTethered : BossComponent public bool Active => _tethers.Count > 0; - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { var tetheredCaster = _tethers.FirstOrDefault(t => t.target == actor).source; if (tetheredCaster == null) return; // non-tethered players shouldn't need to worry about this mechanic - if (module.Raid.WithoutSlot().Exclude(actor).InShape(_shape, tetheredCaster).Any()) + if (Raid.WithoutSlot().Exclude(actor).InShape(_shape, tetheredCaster).Any()) hints.Add("Bait away from raid!"); if (_tethers.Any(t => t.target != actor && _shape.Check(actor.Position, t.source))) hints.Add("Move away from other baits!"); } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { foreach (var t in _tethers) - _shape.Draw(arena, t.source); + _shape.Draw(Arena, t.source); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (var t in _tethers) - arena.AddLine(t.source.Position, t.target.Position, ArenaColor.Danger); + Arena.AddLine(t.source.Position, t.target.Position, ArenaColor.Danger); } - public override void OnTethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnTethered(Actor source, ActorTetherInfo tether) { if ((OID)source.OID == OID.IllusoryHephaistosMovable) { - var target = module.WorldState.Actors.Find(tether.Target); + var target = WorldState.Actors.Find(tether.Target); if (target != null) _tethers.Add((source, target)); } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.EndOfDaysMovable) _tethers.RemoveAll(e => e.source == caster); diff --git a/BossMod/Modules/Endwalker/Savage/P8S2Hephaistos/HighConcept.cs b/BossMod/Modules/Endwalker/Savage/P8S2Hephaistos/HighConcept.cs index 16ed25dd6d..00fab276a1 100644 --- a/BossMod/Modules/Endwalker/Savage/P8S2Hephaistos/HighConcept.cs +++ b/BossMod/Modules/Endwalker/Savage/P8S2Hephaistos/HighConcept.cs @@ -1,7 +1,7 @@ namespace BossMod.Endwalker.Savage.P8S2; // note: this is currently tailored to strat my static uses... -class HighConceptCommon : BossComponent +class HighConceptCommon(BossModule module) : BossComponent(module) { public enum Mechanic { Explosion1, Towers1, Explosion2, Towers2, Done } public enum PlayerRole { Unassigned, Stack1, Stack2, Stack3, ShortAlpha, ShortBeta, ShortGamma, LongAlpha, LongBeta, LongGamma, Count } @@ -22,18 +22,15 @@ public enum TowerColor { Unknown, Purple, Blue, Green } protected static readonly float SpliceRadius = 6; protected static readonly float TowerRadius = 3; - public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) - { - return NumAssignedRoles < 8 ? PlayerPriority.Irrelevant : PlayerPriority.Normal; - } + public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) => NumAssignedRoles < 8 ? PlayerPriority.Irrelevant : PlayerPriority.Normal; - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { var role = (SID)status.ID switch { - SID.ImperfectionAlpha => (status.ExpireAt - module.WorldState.CurrentTime).TotalSeconds > 15 ? PlayerRole.LongAlpha : PlayerRole.ShortAlpha, - SID.ImperfectionBeta => (status.ExpireAt - module.WorldState.CurrentTime).TotalSeconds > 15 ? PlayerRole.LongBeta : PlayerRole.ShortBeta, - SID.ImperfectionGamma => (status.ExpireAt - module.WorldState.CurrentTime).TotalSeconds > 15 ? PlayerRole.LongGamma : PlayerRole.ShortGamma, + SID.ImperfectionAlpha => (status.ExpireAt - WorldState.CurrentTime).TotalSeconds > 15 ? PlayerRole.LongAlpha : PlayerRole.ShortAlpha, + SID.ImperfectionBeta => (status.ExpireAt - WorldState.CurrentTime).TotalSeconds > 15 ? PlayerRole.LongBeta : PlayerRole.ShortBeta, + SID.ImperfectionGamma => (status.ExpireAt - WorldState.CurrentTime).TotalSeconds > 15 ? PlayerRole.LongGamma : PlayerRole.ShortGamma, SID.Solosplice => PlayerRole.Stack1, SID.Multisplice => PlayerRole.Stack2, SID.Supersplice => PlayerRole.Stack3, @@ -42,7 +39,7 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st if (role != PlayerRole.Unassigned) { - var slot = module.Raid.FindSlot(actor.InstanceID); + var slot = Raid.FindSlot(actor.InstanceID); ++NumAssignedRoles; _roleSlots[(int)role] = slot; if (slot >= 0 && _playerRoles[slot] < role) // priority order: letters > stacks (important for HC2) @@ -50,7 +47,7 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { @@ -70,7 +67,7 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } - public override void OnEventEnvControl(BossModule module, byte index, uint state) + public override void OnEventEnvControl(byte index, uint state) { if (state != 0x00020001) return; @@ -112,33 +109,33 @@ public override void OnEventEnvControl(BossModule module, byte index, uint state _ => (TowerColor.Unknown, new WDir()) }; if (secondColorHC2 != TowerColor.Unknown) - SecondTowersHC2.Add((module.Bounds.Center + secondOffsetHC2, secondColorHC2)); + SecondTowersHC2.Add((Module.Bounds.Center + secondOffsetHC2, secondColorHC2)); } - protected void DrawExplosion(BossModule module, int slot, float radius, bool safe) + protected void DrawExplosion(int slot, float radius, bool safe) { - var source = module.Raid[slot]; + var source = Raid[slot]; if (source != null) - module.Arena.AddCircle(source.Position, radius, safe ? ArenaColor.Safe : ArenaColor.Danger); + Arena.AddCircle(source.Position, radius, safe ? ArenaColor.Safe : ArenaColor.Danger); } - protected void DrawTower(BossModule module, WPos pos, bool assigned) => module.Arena.AddCircle(pos, TowerRadius, assigned ? ArenaColor.Safe : ArenaColor.Danger, 2); - protected void DrawTower(BossModule module, float offsetZ, bool assigned) => DrawTower(module, module.Bounds.Center + new WDir(0, offsetZ), assigned); + protected void DrawTower(WPos pos, bool assigned) => Arena.AddCircle(pos, TowerRadius, assigned ? ArenaColor.Safe : ArenaColor.Danger, 2); + protected void DrawTower(float offsetZ, bool assigned) => DrawTower(Module.Bounds.Center + new WDir(0, offsetZ), assigned); - protected void DrawTether(BossModule module, int slot1, int slot2, int pcSlot) + protected void DrawTether(int slot1, int slot2, int pcSlot) { - var a1 = module.Raid[slot1]; - var a2 = module.Raid[slot2]; + var a1 = Raid[slot1]; + var a2 = Raid[slot2]; if (a1 != null && a2 != null) - module.Arena.AddLine(a1.Position, a2.Position, pcSlot == slot1 || pcSlot == slot2 ? ArenaColor.Safe : ArenaColor.Danger); + Arena.AddLine(a1.Position, a2.Position, pcSlot == slot1 || pcSlot == slot2 ? ArenaColor.Safe : ArenaColor.Danger); } } -class HighConcept1 : HighConceptCommon +class HighConcept1(BossModule module) : HighConceptCommon(module) { public bool LongGoS => Service.Config.Get().HC1LongGoS; - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (NumAssignedRoles < 8) return; @@ -238,7 +235,7 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint hints.Add(hint, false); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { var pcRole = RoleForSlot(pcSlot); switch (NextMechanic) @@ -246,11 +243,11 @@ public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc case Mechanic.Explosion1: if (NumAssignedRoles >= 8) { - DrawExplosion(module, SlotForRole(PlayerRole.ShortAlpha), ShiftRadius, pcRole == PlayerRole.ShortAlpha); - DrawExplosion(module, SlotForRole(PlayerRole.ShortBeta), ShiftRadius, pcRole == PlayerRole.ShortBeta); - DrawExplosion(module, SlotForRole(PlayerRole.ShortGamma), ShiftRadius, pcRole == PlayerRole.ShortGamma); - DrawExplosion(module, SlotForRole(PlayerRole.Stack2), SpliceRadius, pcRole is PlayerRole.Stack2 or PlayerRole.LongAlpha); - DrawExplosion(module, SlotForRole(PlayerRole.Stack3), SpliceRadius, pcRole is PlayerRole.Stack3 or PlayerRole.LongBeta or PlayerRole.LongGamma); + DrawExplosion(SlotForRole(PlayerRole.ShortAlpha), ShiftRadius, pcRole == PlayerRole.ShortAlpha); + DrawExplosion(SlotForRole(PlayerRole.ShortBeta), ShiftRadius, pcRole == PlayerRole.ShortBeta); + DrawExplosion(SlotForRole(PlayerRole.ShortGamma), ShiftRadius, pcRole == PlayerRole.ShortGamma); + DrawExplosion(SlotForRole(PlayerRole.Stack2), SpliceRadius, pcRole is PlayerRole.Stack2 or PlayerRole.LongAlpha); + DrawExplosion(SlotForRole(PlayerRole.Stack3), SpliceRadius, pcRole is PlayerRole.Stack3 or PlayerRole.LongBeta or PlayerRole.LongGamma); } break; case Mechanic.Towers1: @@ -263,26 +260,26 @@ public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc TowerColor.Green => (PlayerRole.ShortAlpha, PlayerRole.ShortBeta), _ => (PlayerRole.Unassigned, PlayerRole.Unassigned) }; - DrawTower(module, -10, pcRole == roleN); - DrawTower(module, +10, pcRole == roleS); - DrawTether(module, SlotForRole(roleN), SlotForRole(roleS), pcSlot); + DrawTower(-10, pcRole == roleN); + DrawTower(+10, pcRole == roleS); + DrawTether(SlotForRole(roleN), SlotForRole(roleS), pcSlot); } break; case Mechanic.Explosion2: - DrawExplosion(module, SlotForRole(PlayerRole.LongAlpha), ShiftRadius, pcRole switch + DrawExplosion(SlotForRole(PlayerRole.LongAlpha), ShiftRadius, pcRole switch { PlayerRole.LongAlpha => true, PlayerRole.Stack2 => FirstTowers != TowerColor.Purple, _ => false }); - DrawExplosion(module, SlotForRole(PlayerRole.LongBeta), ShiftRadius, pcRole switch + DrawExplosion(SlotForRole(PlayerRole.LongBeta), ShiftRadius, pcRole switch { PlayerRole.LongBeta => true, PlayerRole.Stack2 => FirstTowers == TowerColor.Purple, PlayerRole.Stack3 => FirstTowers == TowerColor.Green, _ => false }); - DrawExplosion(module, SlotForRole(PlayerRole.LongGamma), ShiftRadius, pcRole switch + DrawExplosion(SlotForRole(PlayerRole.LongGamma), ShiftRadius, pcRole switch { PlayerRole.LongGamma => true, PlayerRole.Stack3 => FirstTowers != TowerColor.Green, @@ -308,21 +305,21 @@ public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc _ => (PlayerRole.Unassigned, PlayerRole.Unassigned, PlayerRole.Unassigned, PlayerRole.Unassigned) }; var (sOff, lOff) = LongGoS ? (-10, +10) : (+10, -10); - DrawTower(module, lOff - 5, pcRole == roleLN); - DrawTower(module, lOff + 5, pcRole == roleLS); - DrawTower(module, sOff - 5, pcRole == roleSN); - DrawTower(module, sOff + 5, pcRole == roleSS); - DrawTether(module, SlotForRole(roleLN), SlotForRole(roleLS), pcSlot); - DrawTether(module, SlotForRole(roleSN), SlotForRole(roleSS), pcSlot); + DrawTower(lOff - 5, pcRole == roleLN); + DrawTower(lOff + 5, pcRole == roleLS); + DrawTower(sOff - 5, pcRole == roleSN); + DrawTower(sOff + 5, pcRole == roleSS); + DrawTether(SlotForRole(roleLN), SlotForRole(roleLS), pcSlot); + DrawTether(SlotForRole(roleSN), SlotForRole(roleSS), pcSlot); } break; } } } -class HighConcept2 : HighConceptCommon +class HighConcept2(BossModule module) : HighConceptCommon(module) { - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (NumAssignedRoles < 8) return; @@ -384,7 +381,7 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint hints.Add(hint, false); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { var pcRole = RoleForSlot(pcSlot); switch (NextMechanic) @@ -392,11 +389,11 @@ public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc case Mechanic.Explosion1: if (NumAssignedRoles >= 8) { - DrawExplosion(module, SlotForRole(PlayerRole.ShortAlpha), ShiftRadius, pcRole is PlayerRole.ShortAlpha or PlayerRole.Unassigned); - DrawExplosion(module, SlotForRole(PlayerRole.ShortBeta), ShiftRadius, pcRole == PlayerRole.ShortBeta); - DrawExplosion(module, SlotForRole(PlayerRole.ShortGamma), ShiftRadius, pcRole == PlayerRole.ShortGamma); - DrawExplosion(module, SlotForRole(PlayerRole.Stack1), SpliceRadius, pcRole is PlayerRole.LongAlpha or PlayerRole.LongBeta or PlayerRole.LongGamma && SlotForRole(PlayerRole.Stack1) == pcSlot); - DrawExplosion(module, SlotForRole(PlayerRole.Stack2), SpliceRadius, pcRole is PlayerRole.LongAlpha or PlayerRole.LongBeta or PlayerRole.LongGamma && SlotForRole(PlayerRole.Stack1) != pcSlot); + DrawExplosion(SlotForRole(PlayerRole.ShortAlpha), ShiftRadius, pcRole is PlayerRole.ShortAlpha or PlayerRole.Unassigned); + DrawExplosion(SlotForRole(PlayerRole.ShortBeta), ShiftRadius, pcRole == PlayerRole.ShortBeta); + DrawExplosion(SlotForRole(PlayerRole.ShortGamma), ShiftRadius, pcRole == PlayerRole.ShortGamma); + DrawExplosion(SlotForRole(PlayerRole.Stack1), SpliceRadius, pcRole is PlayerRole.LongAlpha or PlayerRole.LongBeta or PlayerRole.LongGamma && SlotForRole(PlayerRole.Stack1) == pcSlot); + DrawExplosion(SlotForRole(PlayerRole.Stack2), SpliceRadius, pcRole is PlayerRole.LongAlpha or PlayerRole.LongBeta or PlayerRole.LongGamma && SlotForRole(PlayerRole.Stack1) != pcSlot); } break; case Mechanic.Towers1: @@ -409,15 +406,15 @@ public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc TowerColor.Green => (PlayerRole.ShortAlpha, PlayerRole.ShortBeta), _ => (PlayerRole.Unassigned, PlayerRole.Unassigned) }; - DrawTower(module, -10, pcRole == roleN); - DrawTower(module, +10, pcRole == roleS); - DrawTether(module, SlotForRole(roleN), SlotForRole(roleS), pcSlot); + DrawTower(-10, pcRole == roleN); + DrawTower(+10, pcRole == roleS); + DrawTether(SlotForRole(roleN), SlotForRole(roleS), pcSlot); } break; case Mechanic.Explosion2: - DrawExplosion(module, SlotForRole(PlayerRole.LongAlpha), ShiftRadius, pcRole == PlayerRole.LongAlpha); - DrawExplosion(module, SlotForRole(PlayerRole.LongBeta), ShiftRadius, pcRole == PlayerRole.LongBeta); - DrawExplosion(module, SlotForRole(PlayerRole.LongGamma), ShiftRadius, pcRole == PlayerRole.LongGamma); + DrawExplosion(SlotForRole(PlayerRole.LongAlpha), ShiftRadius, pcRole == PlayerRole.LongAlpha); + DrawExplosion(SlotForRole(PlayerRole.LongBeta), ShiftRadius, pcRole == PlayerRole.LongBeta); + DrawExplosion(SlotForRole(PlayerRole.LongGamma), ShiftRadius, pcRole == PlayerRole.LongGamma); break; case Mechanic.Towers2: var roleE1 = PlayerRole.LongAlpha; @@ -427,10 +424,10 @@ public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc foreach (var t in SecondTowersHC2) { var (role1, role2) = t.c == TowerColor.Green ? (roleE1, roleE2) : (roleW1, roleW2); - DrawTower(module, t.p, pcRole == role1 || pcRole == role2); + DrawTower(t.p, pcRole == role1 || pcRole == role2); } - DrawTether(module, SlotForRole(roleE1), SlotForRole(roleE2), pcSlot); - DrawTether(module, SlotForRole(roleW1), SlotForRole(roleW2), pcSlot); + DrawTether(SlotForRole(roleE1), SlotForRole(roleE2), pcSlot); + DrawTether(SlotForRole(roleW1), SlotForRole(roleW2), pcSlot); break; } } diff --git a/BossMod/Modules/Endwalker/Savage/P8S2Hephaistos/LimitlessDesolation.cs b/BossMod/Modules/Endwalker/Savage/P8S2Hephaistos/LimitlessDesolation.cs index 61c2a8f84e..5911191108 100644 --- a/BossMod/Modules/Endwalker/Savage/P8S2Hephaistos/LimitlessDesolation.cs +++ b/BossMod/Modules/Endwalker/Savage/P8S2Hephaistos/LimitlessDesolation.cs @@ -14,38 +14,36 @@ class LimitlessDesolation : Components.UniformStackSpread private static readonly float _towerRadius = 4; private static readonly WDir[] _towerOffsets = { new(-15, -15), new(-15, -5), new(-15, 5), new(-5, -15), new(-5, -5), new(-5, 5), new(5, -15), new(5, -5), new(5, 5), new(15, -15), new(15, -5), new(15, 5) }; - public LimitlessDesolation() : base(0, 6, alwaysShowSpreads: true, raidwideOnResolve: false) { } - - public override void Init(BossModule module) + public LimitlessDesolation(BossModule module) : base(module, 0, 6, alwaysShowSpreads: true, raidwideOnResolve: false) { - AddSpreads(module.Raid.WithoutSlot()); + AddSpreads(Raid.WithoutSlot()); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { - base.AddHints(module, slot, actor, hints, movementHints); + base.AddHints(slot, actor, hints); var towerIndex = _towerAssignments[slot]; - if (towerIndex >= 0 && !actor.Position.InCircle(module.Bounds.Center + _towerOffsets[towerIndex], _towerRadius)) + if (towerIndex >= 0 && !actor.Position.InCircle(Module.Bounds.Center + _towerOffsets[towerIndex], _towerRadius)) hints.Add("Soak assigned tower!"); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - base.DrawArenaForeground(module, pcSlot, pc, arena); + base.DrawArenaForeground(pcSlot, pc); var towerIndex = _towerAssignments[pcSlot]; if (towerIndex >= 0) - arena.AddCircle(module.Bounds.Center + _towerOffsets[towerIndex], _towerRadius, ArenaColor.Safe, 2); + Arena.AddCircle(Module.Bounds.Center + _towerOffsets[towerIndex], _towerRadius, ArenaColor.Safe, 2); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { case AID.TyrantsFire: Spreads.RemoveAll(s => s.Target.InstanceID == spell.MainTargetID); - _waitingForTowers.Set(module.Raid.FindSlot(spell.MainTargetID)); + _waitingForTowers.Set(Raid.FindSlot(spell.MainTargetID)); ++NumAOEs; break; case AID.Burst: @@ -54,7 +52,7 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } - public override void OnEventEnvControl(BossModule module, byte index, uint state) + public override void OnEventEnvControl(byte index, uint state) { var towerIndex = index switch { @@ -84,7 +82,7 @@ public override void OnEventEnvControl(BossModule module, byte index, uint state case 0x00020001: // appear _activeTowers.Set(towerIndex); bool towerForTH = _thRight == towerIndex >= 6; - var (slot, player) = module.Raid.WithSlot(true).Where(ia => _waitingForTowers[ia.Item1] && ia.Item2.Class.IsSupport() == towerForTH).FirstOrDefault(); + var (slot, player) = Raid.WithSlot(true).Where(ia => _waitingForTowers[ia.Item1] && ia.Item2.Class.IsSupport() == towerForTH).FirstOrDefault(); if (player != null) { _towerAssignments[slot] = towerIndex; @@ -108,7 +106,4 @@ public override void OnEventEnvControl(BossModule module, byte index, uint state } } -class LimitlessDesolationTyrantsFlare : Components.LocationTargetedAOEs -{ - public LimitlessDesolationTyrantsFlare() : base(ActionID.MakeSpell(AID.TyrantsFlareLimitless), 8) { } -} +class LimitlessDesolationTyrantsFlare(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.TyrantsFlareLimitless), 8); diff --git a/BossMod/Modules/Endwalker/Savage/P8S2Hephaistos/NaturalAlignment.cs b/BossMod/Modules/Endwalker/Savage/P8S2Hephaistos/NaturalAlignment.cs index 19e60c3571..02eb5c92b4 100644 --- a/BossMod/Modules/Endwalker/Savage/P8S2Hephaistos/NaturalAlignment.cs +++ b/BossMod/Modules/Endwalker/Savage/P8S2Hephaistos/NaturalAlignment.cs @@ -1,6 +1,6 @@ namespace BossMod.Endwalker.Savage.P8S2; -class NaturalAlignment : Components.GenericStackSpread +class NaturalAlignment(BossModule module) : Components.GenericStackSpread(module, true) { public enum Mechanic { None, StackSpread, FireIce } @@ -11,9 +11,7 @@ public enum Mechanic { None, StackSpread, FireIce } private bool CurMechanicInverted; public int CurMechanicProgress { get; private set; } - public NaturalAlignment() : base(true) { } - - public override void Update(BossModule module) + public override void Update() { Stacks.Clear(); Spreads.Clear(); @@ -21,7 +19,7 @@ public override void Update(BossModule module) return; bool firstPart = CurMechanicProgress == (CurMechanicInverted ? 1 : 0); - var potentialTargets = module.Raid.WithSlot().ExcludedFromMask(_targets).Actors().ToList(); + var potentialTargets = Raid.WithSlot().ExcludedFromMask(_targets).Actors().ToList(); switch (CurMechanic) { case Mechanic.StackSpread: @@ -51,10 +49,10 @@ public override void Update(BossModule module) } break; } - base.Update(module); + base.Update(); } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (CurMechanicProgress >= 2 || CurMechanicSource == null) return; @@ -69,45 +67,45 @@ public override void AddGlobalHints(BossModule module, GlobalHints hints) hints.Add($"Next NA: {hint}"); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { switch ((SID)status.ID) { case SID.InverseMagicks: - _inverse.Set(module.Raid.FindSlot(actor.InstanceID)); + _inverse.Set(Raid.FindSlot(actor.InstanceID)); break; case SID.NaturalAlignmentMechanic: switch (status.Extra) { case 0x209: // initial application - _targets.Set(module.Raid.FindSlot(actor.InstanceID)); + _targets.Set(Raid.FindSlot(actor.InstanceID)); break; case 0x1E0: // stack->spread filling progress bars case 0x1E1: // stack->spread empty progress bars CurMechanic = Mechanic.StackSpread; CurMechanicSource = actor; - CurMechanicInverted = _inverse[module.Raid.FindSlot(actor.InstanceID)]; + CurMechanicInverted = _inverse[Raid.FindSlot(actor.InstanceID)]; CurMechanicProgress = 0; break; case 0x1E2: // spread->stack filling progress bars case 0x1E3: // spread->stack empty progress bars CurMechanic = Mechanic.StackSpread; CurMechanicSource = actor; - CurMechanicInverted = !_inverse[module.Raid.FindSlot(actor.InstanceID)]; + CurMechanicInverted = !_inverse[Raid.FindSlot(actor.InstanceID)]; CurMechanicProgress = 0; break; case 0x1DC: // fire->ice filling progress bars case 0x1DD: // fire->ice empty progress bars CurMechanic = Mechanic.FireIce; CurMechanicSource = actor; - CurMechanicInverted = _inverse[module.Raid.FindSlot(actor.InstanceID)]; + CurMechanicInverted = _inverse[Raid.FindSlot(actor.InstanceID)]; CurMechanicProgress = 0; break; case 0x1DE: // ice->fire filling progress bars case 0x1DF: // ice->fire empty progress bars CurMechanic = Mechanic.FireIce; CurMechanicSource = actor; - CurMechanicInverted = !_inverse[module.Raid.FindSlot(actor.InstanceID)]; + CurMechanicInverted = !_inverse[Raid.FindSlot(actor.InstanceID)]; CurMechanicProgress = 0; break; } @@ -115,7 +113,7 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { diff --git a/BossMod/Modules/Endwalker/Savage/P8S2Hephaistos/P8S2.cs b/BossMod/Modules/Endwalker/Savage/P8S2Hephaistos/P8S2.cs index 220b6fa8d9..dc4bbc226e 100644 --- a/BossMod/Modules/Endwalker/Savage/P8S2Hephaistos/P8S2.cs +++ b/BossMod/Modules/Endwalker/Savage/P8S2Hephaistos/P8S2.cs @@ -1,14 +1,8 @@ namespace BossMod.Endwalker.Savage.P8S2; -class TyrantsFlare : Components.LocationTargetedAOEs -{ - public TyrantsFlare() : base(ActionID.MakeSpell(AID.TyrantsFlareAOE), 6) { } -} +class TyrantsFlare(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.TyrantsFlareAOE), 6); // TODO: autoattack component // TODO: HC components [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 884, NameID = 11399, SortOrder = 2)] -public class P8S2 : BossModule -{ - public P8S2(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsSquare(new(100, 100), 20)) { } -} +public class P8S2(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsSquare(new(100, 100), 20)); diff --git a/BossMod/Modules/Endwalker/Savage/P8S2Hephaistos/P8S2Config.cs b/BossMod/Modules/Endwalker/Savage/P8S2Hephaistos/P8S2Config.cs index cdddc81745..6f68dd4647 100644 --- a/BossMod/Modules/Endwalker/Savage/P8S2Hephaistos/P8S2Config.cs +++ b/BossMod/Modules/Endwalker/Savage/P8S2Hephaistos/P8S2Config.cs @@ -1,13 +1,11 @@ namespace BossMod.Endwalker.Savage.P8S2; [ConfigDisplay(Order = 0x182, Parent = typeof(EndwalkerConfig))] -public class P8S2Config : CooldownPlanningConfigNode +public class P8S2Config() : CooldownPlanningConfigNode(90) { [PropertyDisplay("Limitless desolation: tanks/healers use right side")] public bool LimitlessDesolationTHRight = false; [PropertyDisplay("High concept 1: long debuffs take S towers")] public bool HC1LongGoS = true; - - public P8S2Config() : base(90) { } } diff --git a/BossMod/Modules/Endwalker/Savage/P8S2Hephaistos/TyrantsUnholyDarkness.cs b/BossMod/Modules/Endwalker/Savage/P8S2Hephaistos/TyrantsUnholyDarkness.cs index dc7ba93f3a..54a9b3af5f 100644 --- a/BossMod/Modules/Endwalker/Savage/P8S2Hephaistos/TyrantsUnholyDarkness.cs +++ b/BossMod/Modules/Endwalker/Savage/P8S2Hephaistos/TyrantsUnholyDarkness.cs @@ -1,34 +1,29 @@ namespace BossMod.Endwalker.Savage.P8S2; -class TyrantsUnholyDarkness : Components.CastCounter +class TyrantsUnholyDarkness(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.TyrantsUnholyDarknessAOE)) { private static readonly float _radius = 6; // TODO: we need some sort of a threat info in worldstate to determine targets properly... public bool IsTarget(Actor actor) => actor.Role == Role.Tank; - public TyrantsUnholyDarkness() : base(ActionID.MakeSpell(AID.TyrantsUnholyDarknessAOE)) { } - - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (IsTarget(actor)) { - hints.Add("GTFO from raid!", module.Raid.WithoutSlot().InRadiusExcluding(actor, _radius).Any()); + hints.Add("GTFO from raid!", Raid.WithoutSlot().InRadiusExcluding(actor, _radius).Any()); } - else if (module.Raid.WithoutSlot().InRadiusExcluding(actor, _radius).Any(IsTarget)) + else if (Raid.WithoutSlot().InRadiusExcluding(actor, _radius).Any(IsTarget)) { hints.Add("GTFO from tanks!"); } } - public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) - { - return IsTarget(player) ? PlayerPriority.Danger : PlayerPriority.Irrelevant; - } + public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) => IsTarget(player) ? PlayerPriority.Danger : PlayerPriority.Irrelevant; - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - foreach (var target in module.Raid.WithoutSlot().Where(IsTarget)) - arena.AddCircle(target.Position, _radius, ArenaColor.Danger); + foreach (var target in Raid.WithoutSlot().Where(IsTarget)) + Arena.AddCircle(target.Position, _radius, ArenaColor.Danger); } } diff --git a/BossMod/Modules/Endwalker/Savage/P9SKokytos/ArchaicRockbreaker.cs b/BossMod/Modules/Endwalker/Savage/P9SKokytos/ArchaicRockbreaker.cs index 2ea1e09453..3ed7f330e1 100644 --- a/BossMod/Modules/Endwalker/Savage/P9SKokytos/ArchaicRockbreaker.cs +++ b/BossMod/Modules/Endwalker/Savage/P9SKokytos/ArchaicRockbreaker.cs @@ -1,61 +1,51 @@ namespace BossMod.Endwalker.Savage.P9SKokytos; -class ArchaicRockbreakerCenter : Components.LocationTargetedAOEs -{ - public ArchaicRockbreakerCenter() : base(ActionID.MakeSpell(AID.ArchaicRockbreakerCenter), 6) { } -} +class ArchaicRockbreakerCenter(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.ArchaicRockbreakerCenter), 6); class ArchaicRockbreakerShockwave : Components.Knockback { private Uplift? _uplift; private DateTime _activation; - public ArchaicRockbreakerShockwave() : base(ActionID.MakeSpell(AID.ArchaicRockbreakerShockwave), true) { } - - public override void Init(BossModule module) + public ArchaicRockbreakerShockwave(BossModule module) : base(module, ActionID.MakeSpell(AID.ArchaicRockbreakerShockwave), true) { _uplift = module.FindComponent(); - _activation = module.WorldState.CurrentTime.AddSeconds(6.5f); + _activation = WorldState.FutureTime(6.5f); } - public override IEnumerable Sources(BossModule module, int slot, Actor actor) + public override IEnumerable Sources(int slot, Actor actor) { float distance = 21; if (_uplift?.WallDirection != null) { - var offset = actor.Position - module.Bounds.Center; + var offset = actor.Position - Module.Bounds.Center; var dot = Math.Abs(_uplift.WallDirection.Value.ToDirection().Dot(offset.Normalized())); bool againstWall = dot > 0.9238795f || dot < 0.3826834f; if (againstWall) - distance = module.Bounds.HalfSize - offset.Length() - 0.5f; + distance = Module.Bounds.HalfSize - offset.Length() - 0.5f; } - yield return new(module.Bounds.Center, distance, _activation); + yield return new(Module.Bounds.Center, distance, _activation); } } class ArchaicRockbreakerPairs : Components.UniformStackSpread { - public ArchaicRockbreakerPairs() : base(6, 0, 2) { } - - public override void Init(BossModule module) + public ArchaicRockbreakerPairs(BossModule module) : base(module, 6, 0, 2) { - foreach (var p in module.Raid.WithoutSlot(true).Where(p => p.Class.IsSupport())) - AddStack(p, module.WorldState.CurrentTime.AddSeconds(7.8f)); + foreach (var p in Raid.WithoutSlot(true).Where(p => p.Class.IsSupport())) + AddStack(p, WorldState.FutureTime(7.8f)); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.ArchaicRockbreakerPairs) Stacks.Clear(); } } -class ArchaicRockbreakerLine : Components.LocationTargetedAOEs -{ - public ArchaicRockbreakerLine() : base(ActionID.MakeSpell(AID.ArchaicRockbreakerLine), 8, maxCasts: 8) { } -} +class ArchaicRockbreakerLine(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.ArchaicRockbreakerLine), 8, maxCasts: 8); -class ArchaicRockbreakerCombination : Components.GenericAOEs +class ArchaicRockbreakerCombination(BossModule module) : Components.GenericAOEs(module) { private List _aoes = new(); @@ -63,20 +53,18 @@ class ArchaicRockbreakerCombination : Components.GenericAOEs private static readonly AOEShapeDonut _shapeIn = new(8, 20); private static readonly AOEShapeCone _shapeCleave = new(40, 90.Degrees()); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { return _aoes.Take(1); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddMovementHints(int slot, Actor actor, MovementHints movementHints) { - base.AddHints(module, slot, actor, hints, movementHints); - if (movementHints != null) - foreach (var p in SafeSpots(module)) - movementHints.Add(actor.Position, p, ArenaColor.Safe); + foreach (var p in SafeSpots()) + movementHints.Add(actor.Position, p, ArenaColor.Safe); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { var (inOutShape, offset) = (AID)spell.Action.ID switch { @@ -88,22 +76,22 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf }; if (inOutShape != null) { - _aoes.Add(new(inOutShape, module.PrimaryActor.Position, default, module.WorldState.CurrentTime.AddSeconds(6.9f))); - _aoes.Add(new(_shapeCleave, module.PrimaryActor.Position, module.PrimaryActor.Rotation + offset, module.WorldState.CurrentTime.AddSeconds(10))); + _aoes.Add(new(inOutShape, Module.PrimaryActor.Position, default, WorldState.FutureTime(6.9f))); + _aoes.Add(new(_shapeCleave, Module.PrimaryActor.Position, Module.PrimaryActor.Rotation + offset, WorldState.FutureTime(10))); } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { case AID.InsideRoundhouseAOE: PopAOE(); - _aoes.Add(new(_shapeIn, module.PrimaryActor.Position, default, module.WorldState.CurrentTime.AddSeconds(6))); + _aoes.Add(new(_shapeIn, Module.PrimaryActor.Position, default, WorldState.FutureTime(6))); break; case AID.OutsideRoundhouseAOE: PopAOE(); - _aoes.Add(new(_shapeOut, module.PrimaryActor.Position, default, module.WorldState.CurrentTime.AddSeconds(6))); + _aoes.Add(new(_shapeOut, Module.PrimaryActor.Position, default, WorldState.FutureTime(6))); break; case AID.SwingingKickFrontAOE: case AID.SwingingKickRearAOE: @@ -119,9 +107,9 @@ private void PopAOE() _aoes.RemoveAt(0); } - private IEnumerable SafeSpots(BossModule module) + private IEnumerable SafeSpots() { - if (NumCasts == 0 && _aoes.Count > 0 && _aoes[0].Shape == _shapeOut && module.FindComponent() is var forbidden && forbidden?.NumCasts == 0) + if (NumCasts == 0 && _aoes.Count > 0 && _aoes[0].Shape == _shapeOut && Module.FindComponent() is var forbidden && forbidden?.NumCasts == 0) { var safespots = new ArcList(_aoes[0].Origin, _shapeOut.Radius + 0.25f); foreach (var f in forbidden.ActiveCasters) @@ -138,17 +126,15 @@ private IEnumerable SafeSpots(BossModule module) } } -class ArchaicDemolish : Components.UniformStackSpread +class ArchaicDemolish(BossModule module) : Components.UniformStackSpread(module, 6, 0, 4) { - public ArchaicDemolish() : base(6, 0, 4) { } - - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.ArchaicDemolish) - AddStacks(module.Raid.WithoutSlot(true).Where(a => a.Role == Role.Healer), spell.NPCFinishAt.AddSeconds(1.2f)); + AddStacks(Raid.WithoutSlot(true).Where(a => a.Role == Role.Healer), spell.NPCFinishAt.AddSeconds(1.2f)); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.ArchaicDemolishAOE) Stacks.Clear(); diff --git a/BossMod/Modules/Endwalker/Savage/P9SKokytos/Charibdys.cs b/BossMod/Modules/Endwalker/Savage/P9SKokytos/Charibdys.cs index 77ade6807f..5173236089 100644 --- a/BossMod/Modules/Endwalker/Savage/P9SKokytos/Charibdys.cs +++ b/BossMod/Modules/Endwalker/Savage/P9SKokytos/Charibdys.cs @@ -1,35 +1,23 @@ namespace BossMod.Endwalker.Savage.P9SKokytos; -class Charibdys : Components.PersistentVoidzoneAtCastTarget -{ - public Charibdys() : base(6, ActionID.MakeSpell(AID.CharybdisAOE), m => m.Enemies(OID.Charybdis).Where(v => v.EventState != 7), 0.6f) { } -} +class Charibdys(BossModule module) : Components.PersistentVoidzoneAtCastTarget(module, 6, ActionID.MakeSpell(AID.CharybdisAOE), m => m.Enemies(OID.Charybdis).Where(v => v.EventState != 7), 0.6f); -class Comet : Components.Adds +class Comet(BossModule module) : Components.Adds(module, (uint)OID.Comet) { public static bool IsActive(Actor c) => c.ModelState.AnimState2 == 1; public static bool IsFinished(Actor c) => c.IsDead || c.CastInfo != null; - public Comet() : base((uint)OID.Comet) { } - - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (var c in Actors.Where(a => !IsFinished(a))) { - arena.Actor(c, IsActive(c) ? ArenaColor.Enemy : ArenaColor.Object, true); + Arena.Actor(c, IsActive(c) ? ArenaColor.Enemy : ArenaColor.Object, true); } } } -class CometImpact : Components.SelfTargetedAOEs -{ - public CometImpact() : base(ActionID.MakeSpell(AID.CometImpact), new AOEShapeCircle(10)) { } // TODO: verify falloff -} - -class CometBurst : Components.SelfTargetedAOEs -{ - public CometBurst() : base(ActionID.MakeSpell(AID.CometBurstLong), new AOEShapeCircle(10)) { } -} +class CometImpact(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.CometImpact), new AOEShapeCircle(10)); // TODO: verify falloff +class CometBurst(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.CometBurstLong), new AOEShapeCircle(10)); class BeastlyBile : Components.UniformStackSpread { @@ -38,17 +26,15 @@ class BeastlyBile : Components.UniformStackSpread private DateTime _activation; private BitMask _forbiddenPlayers; - public BeastlyBile() : base(6, 0, 4) { } - - public override void Init(BossModule module) - { + public BeastlyBile(BossModule module) : base(module, 6, 0, 4) +{ _comet = module.FindComponent(); - _activation = module.WorldState.CurrentTime.AddSeconds(15); // assuming component is activated after proximity + _activation = WorldState.FutureTime(15); // assuming component is activated after proximity } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { - base.AddHints(module, slot, actor, hints, movementHints); + base.AddHints(slot, actor, hints); if (_comet != null && IsStackTarget(actor)) { if (_comet.Actors.Any(c => !Comet.IsActive(c) && c.Position.InCircle(actor.Position, StackRadius))) @@ -58,23 +44,23 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } } - public override void Update(BossModule module) + public override void Update() { Stacks.Clear(); - var target = NumCasts < 2 ? module.Raid.WithoutSlot().Farthest(module.PrimaryActor.Position) : null; + var target = NumCasts < 2 ? Raid.WithoutSlot().Farthest(Module.PrimaryActor.Position) : null; if (target != null) AddStack(target, _activation, _forbiddenPlayers); - base.Update(module); + base.Update(); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.BeastlyBileAOE) { ++NumCasts; - _activation = module.WorldState.CurrentTime.AddSeconds(6); + _activation = WorldState.FutureTime(6); foreach (var t in spell.Targets) - _forbiddenPlayers.Set(module.Raid.FindSlot(t.ID)); + _forbiddenPlayers.Set(Raid.FindSlot(t.ID)); } } } @@ -85,44 +71,40 @@ class Thunderbolt : Components.GenericBaitAway private static readonly AOEShapeCone _shape = new(40, 22.5f.Degrees()); - public Thunderbolt() : base(ActionID.MakeSpell(AID.ThunderboltAOE)) { } - - public override void Init(BossModule module) + public Thunderbolt(BossModule module) : base(module, ActionID.MakeSpell(AID.ThunderboltAOE)) { _comet = module.FindComponent(); } - public override void Update(BossModule module) + public override void Update() { CurrentBaits.Clear(); - foreach (var p in module.Raid.WithoutSlot().SortedByRange(module.PrimaryActor.Position).Take(4)) - CurrentBaits.Add(new(module.PrimaryActor, p, _shape)); + foreach (var p in Raid.WithoutSlot().SortedByRange(Module.PrimaryActor.Position).Take(4)) + CurrentBaits.Add(new(Module.PrimaryActor, p, _shape)); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { - base.AddHints(module, slot, actor, hints, movementHints); + base.AddHints(slot, actor, hints); foreach (var b in ActiveBaitsOn(actor)) if (_comet?.Actors.Any(c => IsClippedBy(c, b)) ?? false) hints.Add("Aim away from comets!"); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if (spell.Action == WatchedAction) { ++NumCasts; foreach (var t in spell.Targets) - ForbiddenPlayers.Set(module.Raid.FindSlot(t.ID)); + ForbiddenPlayers.Set(Raid.FindSlot(t.ID)); } } } -class EclipticMeteor : Components.GenericLineOfSightAOE +class EclipticMeteor(BossModule module) : Components.GenericLineOfSightAOE(module, ActionID.MakeSpell(AID.EclipticMeteorAOE), 60, false) { - public EclipticMeteor() : base(ActionID.MakeSpell(AID.EclipticMeteorAOE), 60, false) { } - - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.EclipticMeteor) { diff --git a/BossMod/Modules/Endwalker/Savage/P9SKokytos/ChimericSuccession.cs b/BossMod/Modules/Endwalker/Savage/P9SKokytos/ChimericSuccession.cs index 503eb216c1..4c2eeaa5b2 100644 --- a/BossMod/Modules/Endwalker/Savage/P9SKokytos/ChimericSuccession.cs +++ b/BossMod/Modules/Endwalker/Savage/P9SKokytos/ChimericSuccession.cs @@ -1,6 +1,6 @@ namespace BossMod.Endwalker.Savage.P9SKokytos; -class ChimericSuccession : Components.UniformStackSpread +class ChimericSuccession(BossModule module) : Components.UniformStackSpread(module, 6, 20, 4, alwaysShowSpreads: true) { public int NumCasts { get; private set; } private Actor?[] _baitOrder = { null, null, null, null }; @@ -9,24 +9,22 @@ class ChimericSuccession : Components.UniformStackSpread public bool JumpActive => _jumpActivation != default; - public ChimericSuccession() : base(6, 20, 4, alwaysShowSpreads: true) { } - - public override void Update(BossModule module) + public override void Update() { Stacks.Clear(); - var target = JumpActive ? module.Raid.WithSlot().ExcludedFromMask(_forbiddenStack).Actors().Farthest(module.PrimaryActor.Position) : null; + var target = JumpActive ? Raid.WithSlot().ExcludedFromMask(_forbiddenStack).Actors().Farthest(Module.PrimaryActor.Position) : null; if (target != null) AddStack(target, _jumpActivation, _forbiddenStack); - base.Update(module); + base.Update(); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.FrontFirestrikes or AID.RearFirestrikes) _jumpActivation = spell.NPCFinishAt.AddSeconds(0.4f); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { @@ -35,7 +33,7 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent case AID.Icemeld3: case AID.Icemeld4: ++NumCasts; - InitBaits(module); + InitBaits(); break; case AID.PyremeldFront: case AID.PyremeldRear: @@ -44,7 +42,7 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { int order = (IconID)iconID switch { @@ -57,26 +55,20 @@ public override void OnEventIcon(BossModule module, Actor actor, uint iconID) if (order < 0) return; _baitOrder[order] = actor; - _forbiddenStack.Set(module.Raid.FindSlot(actor.InstanceID)); + _forbiddenStack.Set(Raid.FindSlot(actor.InstanceID)); if (order == 0) - InitBaits(module); + InitBaits(); } - private void InitBaits(BossModule module) + private void InitBaits() { Spreads.Clear(); var target = NumCasts < _baitOrder.Length ? _baitOrder[NumCasts] : null; if (target != null) - AddSpread(target, module.WorldState.CurrentTime.AddSeconds(NumCasts == 0 ? 10.1f : 3)); + AddSpread(target, WorldState.FutureTime(NumCasts == 0 ? 10.1f : 3)); } } // TODO: think of a way to show baits before cast start to help aiming outside... -class SwingingKickFront : Components.SelfTargetedAOEs -{ - public SwingingKickFront() : base(ActionID.MakeSpell(AID.SwingingKickFront), new AOEShapeCone(40, 90.Degrees())) { } -} -class SwingingKickRear : Components.SelfTargetedAOEs -{ - public SwingingKickRear() : base(ActionID.MakeSpell(AID.SwingingKickRear), new AOEShapeCone(40, 90.Degrees())) { } -} +class SwingingKickFront(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.SwingingKickFront), new AOEShapeCone(40, 90.Degrees())); +class SwingingKickRear(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.SwingingKickRear), new AOEShapeCone(40, 90.Degrees())); diff --git a/BossMod/Modules/Endwalker/Savage/P9SKokytos/DualityOfDeath.cs b/BossMod/Modules/Endwalker/Savage/P9SKokytos/DualityOfDeath.cs index c631b3b4a6..94a427c8b7 100644 --- a/BossMod/Modules/Endwalker/Savage/P9SKokytos/DualityOfDeath.cs +++ b/BossMod/Modules/Endwalker/Savage/P9SKokytos/DualityOfDeath.cs @@ -1,20 +1,18 @@ namespace BossMod.Endwalker.Savage.P9SKokytos; -class DualityOfDeath : Components.GenericBaitAway +class DualityOfDeath(BossModule module) : Components.GenericBaitAway(module, ActionID.MakeSpell(AID.DualityOfDeathFire), centerAtTarget: true) { private ulong _firstFireTarget; private static readonly AOEShapeCircle _shape = new(6); - public DualityOfDeath() : base(ActionID.MakeSpell(AID.DualityOfDeathFire), centerAtTarget: true) { } - - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (ActiveBaitsOn(actor).Any()) { - if (module.Raid.WithoutSlot().InRadiusExcluding(actor, _shape.Radius).Any()) + if (Raid.WithoutSlot().InRadiusExcluding(actor, _shape.Radius).Any()) hints.Add("GTFO from raid!"); - if (module.PrimaryActor.TargetID == _firstFireTarget) + if (Module.PrimaryActor.TargetID == _firstFireTarget) hints.Add(actor.InstanceID != _firstFireTarget ? "Taunt!" : "Pass aggro!"); } else if (ActiveBaits.Any(b => IsClippedBy(actor, b))) @@ -23,12 +21,12 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.DualityOfDeath) { - CurrentBaits.Add(new(module.PrimaryActor, actor, _shape)); - _firstFireTarget = module.PrimaryActor.TargetID; + CurrentBaits.Add(new(Module.PrimaryActor, actor, _shape)); + _firstFireTarget = Module.PrimaryActor.TargetID; } } } diff --git a/BossMod/Modules/Endwalker/Savage/P9SKokytos/Dualspell.cs b/BossMod/Modules/Endwalker/Savage/P9SKokytos/Dualspell.cs index 6058b08570..d9826f7677 100644 --- a/BossMod/Modules/Endwalker/Savage/P9SKokytos/Dualspell.cs +++ b/BossMod/Modules/Endwalker/Savage/P9SKokytos/Dualspell.cs @@ -1,22 +1,22 @@ namespace BossMod.Endwalker.Savage.P9SKokytos; -class DualspellFire : Components.GenericStackSpread +class DualspellFire(BossModule module) : Components.GenericStackSpread(module) { private bool _active; - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (_active) hints.Add("Pairs"); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.DualspellIceFire or AID.TwoMindsIceFire) _active = true; } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { var radius = (AID)spell.Action.ID switch { @@ -27,29 +27,29 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent if (_active && radius != 0) { // assume always targets supports - foreach (var p in module.Raid.WithoutSlot(true).Where(p => p.Class.IsSupport())) - Stacks.Add(new(p, radius, 2, 2, module.WorldState.CurrentTime.AddSeconds(4.5f))); + foreach (var p in Raid.WithoutSlot(true).Where(p => p.Class.IsSupport())) + Stacks.Add(new(p, radius, 2, 2, WorldState.FutureTime(4.5f))); } } } -class DualspellLightning : Components.GenericBaitAway +class DualspellLightning(BossModule module) : Components.GenericBaitAway(module) { private bool _active; - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (_active) hints.Add("Spread"); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.DualspellIceLightning or AID.TwoMindsIceLightning) _active = true; } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { var halfWidth = (AID)spell.Action.ID switch { @@ -60,37 +60,37 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent if (_active && halfWidth != 0) { var shape = new AOEShapeRect(40, halfWidth); - foreach (var p in module.Raid.WithoutSlot(true)) - CurrentBaits.Add(new(module.PrimaryActor, p, shape)); + foreach (var p in Raid.WithoutSlot(true)) + CurrentBaits.Add(new(Module.PrimaryActor, p, shape)); } } } -class DualspellIce : Components.GenericAOEs +class DualspellIce(BossModule module) : Components.GenericAOEs(module) { public enum Mechanic { None, In, Out } private Mechanic _curMechanic; private AOEInstance? _aoe; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => Utils.ZeroOrOne(_aoe); + public override IEnumerable ActiveAOEs(int slot, Actor actor) => Utils.ZeroOrOne(_aoe); - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (_curMechanic != Mechanic.None) hints.Add(_curMechanic.ToString()); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { case AID.DualspellVisualIce: - SetMechanic(module, Mechanic.In); + SetMechanic(Mechanic.In); break; case AID.DualspellVisualFire: case AID.DualspellVisualLightning: - SetMechanic(module, Mechanic.Out); + SetMechanic(Mechanic.Out); break; case AID.DualspellBlizzardOut: case AID.DualspellBlizzardIn: @@ -99,9 +99,9 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } - private void SetMechanic(BossModule module, Mechanic mechanic) + private void SetMechanic(Mechanic mechanic) { _curMechanic = mechanic; - _aoe = new(new AOEShapeDonut(mechanic == Mechanic.In ? 8 : 14, 40), module.PrimaryActor.Position, default, module.WorldState.CurrentTime.AddSeconds(4.5f)); + _aoe = new(new AOEShapeDonut(mechanic == Mechanic.In ? 8 : 14, 40), Module.PrimaryActor.Position, default, WorldState.FutureTime(4.5f)); } } diff --git a/BossMod/Modules/Endwalker/Savage/P9SKokytos/LevinstrikeSummoning.cs b/BossMod/Modules/Endwalker/Savage/P9SKokytos/LevinstrikeSummoning.cs index 051236cdf8..53363853cb 100644 --- a/BossMod/Modules/Endwalker/Savage/P9SKokytos/LevinstrikeSummoning.cs +++ b/BossMod/Modules/Endwalker/Savage/P9SKokytos/LevinstrikeSummoning.cs @@ -2,26 +2,24 @@ // TODO: positioning hints for unmarked players // TODO: or is it a spread?.. one thing i like about bait-away better here is that it better distinguishes bait vs avoid -class LevinstrikeSummoningIcemeld : Components.GenericBaitAway +class LevinstrikeSummoningIcemeld(BossModule module) : Components.GenericBaitAway(module, centerAtTarget: true) { private List _pendingBaiters = new(); // we only want to show max 1 baiter at a time private static readonly AOEShapeCircle _shape = new(20); - public LevinstrikeSummoningIcemeld() : base(centerAtTarget: true) { } - - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.Icemeld) { if (CurrentBaits.Count == 0) - CurrentBaits.Add(new(module.PrimaryActor, actor, _shape)); + CurrentBaits.Add(new(Module.PrimaryActor, actor, _shape)); else _pendingBaiters.Add(actor); } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.Icemeld1 or AID.Icemeld2 or AID.Icemeld3 or AID.Icemeld4) { @@ -29,7 +27,7 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent CurrentBaits.Clear(); if (_pendingBaiters.Count > 0) { - CurrentBaits.Add(new(module.PrimaryActor, _pendingBaiters[0], _shape)); + CurrentBaits.Add(new(Module.PrimaryActor, _pendingBaiters[0], _shape)); _pendingBaiters.RemoveAt(0); } } @@ -38,15 +36,13 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent // TODO: positioning hints for next baiter // TODO: or is it a spread?.. one thing i like about bait-away better here is that it better distinguishes bait vs avoid -class LevinstrikeSummoningFiremeld : Components.GenericBaitAway +class LevinstrikeSummoningFiremeld(BossModule module) : Components.GenericBaitAway(module, ActionID.MakeSpell(AID.Firemeld), centerAtTarget: true) { private Actor?[] _baitOrder = { null, null, null, null }; private static readonly AOEShapeCircle _shape = new(6); - public LevinstrikeSummoningFiremeld() : base(ActionID.MakeSpell(AID.Firemeld), centerAtTarget: true) { } - - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { int order = (IconID)iconID switch { @@ -60,29 +56,29 @@ public override void OnEventIcon(BossModule module, Actor actor, uint iconID) return; _baitOrder[order] = actor; if (order == 0) - InitBaits(module); + InitBaits(); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if (spell.Action == WatchedAction) { ++NumCasts; - InitBaits(module); + InitBaits(); } } - private void InitBaits(BossModule module) + private void InitBaits() { CurrentBaits.Clear(); var target = NumCasts < _baitOrder.Length ? _baitOrder[NumCasts] : null; if (target != null) - CurrentBaits.Add(new(module.PrimaryActor, target, _shape)); + CurrentBaits.Add(new(Module.PrimaryActor, target, _shape)); } } // both explosions and towers -class LevinstrikeSummoningShock : Components.GenericAOEs +class LevinstrikeSummoningShock(BossModule module) : Components.GenericAOEs(module) { public int NumTowers { get; private set; } // NumCasts counts explosions private WPos[] _explodeOrder = { default, default, default, default }; @@ -91,13 +87,13 @@ class LevinstrikeSummoningShock : Components.GenericAOEs private static readonly AOEShapeCircle _shape = new(6); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (NumCasts < _explodeOrder.Length) yield return new(_shape, _explodeOrder[NumCasts], default, _firstExplosion.AddSeconds(NumCasts * 5.6f)); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { var hint = Array.IndexOf(_soakerOrder, actor) switch { @@ -118,16 +114,16 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint hints.Add(shouldSoak ? "Soak the tower!" : "GTFO from tower!"); } - base.AddHints(module, slot, actor, hints, movementHints); + base.AddHints(slot, actor, hints); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (NumTowers < NumCasts) - arena.AddCircle(_explodeOrder[NumTowers], 3, _soakerOrder[NumTowers] == pc ? ArenaColor.Safe : ArenaColor.Danger, 2); + Arena.AddCircle(_explodeOrder[NumTowers], 3, _soakerOrder[NumTowers] == pc ? ArenaColor.Safe : ArenaColor.Danger, 2); } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { var (order, isBall) = (IconID)iconID switch { @@ -145,9 +141,9 @@ public override void OnEventIcon(BossModule module, Actor actor, uint iconID) return; if (isBall) { - var dir = (actor.Position - module.Bounds.Center).Normalized(); - _explodeOrder[order] = module.Bounds.Center - 16 * dir; - _firstExplosion = module.WorldState.CurrentTime.AddSeconds(12.7f); + var dir = (actor.Position - Module.Bounds.Center).Normalized(); + _explodeOrder[order] = Module.Bounds.Center - 16 * dir; + _firstExplosion = WorldState.FutureTime(12.7f); } else { @@ -155,7 +151,7 @@ public override void OnEventIcon(BossModule module, Actor actor, uint iconID) } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { diff --git a/BossMod/Modules/Endwalker/Savage/P9SKokytos/P9SKokytos.cs b/BossMod/Modules/Endwalker/Savage/P9SKokytos/P9SKokytos.cs index 3ebe4d643b..ea7434ae07 100644 --- a/BossMod/Modules/Endwalker/Savage/P9SKokytos/P9SKokytos.cs +++ b/BossMod/Modules/Endwalker/Savage/P9SKokytos/P9SKokytos.cs @@ -1,28 +1,11 @@ namespace BossMod.Endwalker.Savage.P9SKokytos; -class GluttonysAugur : Components.CastCounter -{ - public GluttonysAugur() : base(ActionID.MakeSpell(AID.GluttonysAugurAOE)) { } -} - -class SoulSurge : Components.CastCounter -{ - public SoulSurge() : base(ActionID.MakeSpell(AID.SoulSurge)) { } -} - -class BeastlyFury : Components.CastCounter -{ - public BeastlyFury() : base(ActionID.MakeSpell(AID.BeastlyFuryAOE)) { } -} +class GluttonysAugur(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.GluttonysAugurAOE)); +class SoulSurge(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.SoulSurge)); +class BeastlyFury(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.BeastlyFuryAOE)); [ConfigDisplay(Order = 0x190, Parent = typeof(EndwalkerConfig))] -public class P9SKokytosConfig : CooldownPlanningConfigNode -{ - public P9SKokytosConfig() : base(90) { } -} +public class P9SKokytosConfig() : CooldownPlanningConfigNode(90); [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 937, NameID = 12369)] -public class P9SKokytos : BossModule -{ - public P9SKokytos(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { } -} +public class P9SKokytos(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)); diff --git a/BossMod/Modules/Endwalker/Savage/P9SKokytos/Uplift.cs b/BossMod/Modules/Endwalker/Savage/P9SKokytos/Uplift.cs index 3a66dccd46..0b0b0eab67 100644 --- a/BossMod/Modules/Endwalker/Savage/P9SKokytos/Uplift.cs +++ b/BossMod/Modules/Endwalker/Savage/P9SKokytos/Uplift.cs @@ -1,25 +1,23 @@ namespace BossMod.Endwalker.Savage.P9SKokytos; -class Uplift : Components.SelfTargetedAOEs +class Uplift(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Uplift), new AOEShapeRect(4, 8)) { public Angle? WallDirection { get; private set; } - public Uplift() : base(ActionID.MakeSpell(AID.Uplift), new AOEShapeRect(4, 8)) { } - - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (WallDirection != null) { for (int i = 0; i < 4; ++i) { var center = WallDirection.Value + i * 90.Degrees(); - arena.PathArcTo(module.Bounds.Center, module.Bounds.HalfSize - 0.5f, (center - 22.5f.Degrees()).Rad, (center + 22.5f.Degrees()).Rad); - arena.PathStroke(false, ArenaColor.Border, 2); + Arena.PathArcTo(Module.Bounds.Center, Module.Bounds.HalfSize - 0.5f, (center - 22.5f.Degrees()).Rad, (center + 22.5f.Degrees()).Rad); + Arena.PathStroke(false, ArenaColor.Border, 2); } } } - public override void OnEventEnvControl(BossModule module, byte index, uint state) + public override void OnEventEnvControl(byte index, uint state) { // state 00080004 => remove walls if (index is 2 or 3 && state == 0x00020001) diff --git a/BossMod/Modules/Endwalker/TreasureHunt/TheExcitatron6000/LuckyFace.cs b/BossMod/Modules/Endwalker/TreasureHunt/TheExcitatron6000/LuckyFace.cs index fff453f75c..f73a33be84 100644 --- a/BossMod/Modules/Endwalker/TreasureHunt/TheExcitatron6000/LuckyFace.cs +++ b/BossMod/Modules/Endwalker/TreasureHunt/TheExcitatron6000/LuckyFace.cs @@ -56,102 +56,38 @@ public enum IconID : uint spreadmarker = 194, } -class LeftInTheDark1 : Components.SelfTargetedAOEs -{ - public LeftInTheDark1() : base(ActionID.MakeSpell(AID.LeftInTheDark), new AOEShapeCone(20, 90.Degrees())) { } -} - -class LeftInTheDark2 : Components.SelfTargetedAOEs -{ - public LeftInTheDark2() : base(ActionID.MakeSpell(AID.LeftInTheDark2), new AOEShapeCone(20, 90.Degrees())) { } -} - -class RightInTheDark1 : Components.SelfTargetedAOEs -{ - public RightInTheDark1() : base(ActionID.MakeSpell(AID.RightInTheDark1), new AOEShapeCone(20, 90.Degrees())) { } -} - -class RightInTheDark2 : Components.SelfTargetedAOEs -{ - public RightInTheDark2() : base(ActionID.MakeSpell(AID.RightInTheDark2), new AOEShapeCone(20, 90.Degrees())) { } -} - -class QuakeInYourBoots1 : Components.SelfTargetedAOEs -{ - public QuakeInYourBoots1() : base(ActionID.MakeSpell(AID.QuakeInYourBoots), new AOEShapeCircle(10)) { } -} - -class QuakeInYourBoots2 : Components.SelfTargetedAOEs -{ - public QuakeInYourBoots2() : base(ActionID.MakeSpell(AID.QuakeInYourBoots2), new AOEShapeDonut(10, 20)) { } -} - -class QuakeMeAway1 : Components.SelfTargetedAOEs -{ - public QuakeMeAway1() : base(ActionID.MakeSpell(AID.QuakeMeAway), new AOEShapeDonut(10, 20)) { } -} - -class QuakeMeAway2 : Components.SelfTargetedAOEs -{ - public QuakeMeAway2() : base(ActionID.MakeSpell(AID.QuakeMeAway2), new AOEShapeCircle(10)) { } -} - -class HeartOnFireII : Components.LocationTargetedAOEs -{ - public HeartOnFireII() : base(ActionID.MakeSpell(AID.HeartOnFireII), 6) { } -} - -class HeartOnFireIV : Components.SingleTargetCast -{ - public HeartOnFireIV() : base(ActionID.MakeSpell(AID.HeartOnFireIV)) { } -} - -class HeartOnFireIII : Components.UniformStackSpread -{ - public HeartOnFireIII() : base(0, 6, alwaysShowSpreads: true) { } - - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) +class LeftInTheDark1(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.LeftInTheDark), new AOEShapeCone(20, 90.Degrees())); +class LeftInTheDark2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.LeftInTheDark2), new AOEShapeCone(20, 90.Degrees())); +class RightInTheDark1(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RightInTheDark1), new AOEShapeCone(20, 90.Degrees())); +class RightInTheDark2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RightInTheDark2), new AOEShapeCone(20, 90.Degrees())); +class QuakeInYourBoots1(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.QuakeInYourBoots), new AOEShapeCircle(10)); +class QuakeInYourBoots2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.QuakeInYourBoots2), new AOEShapeDonut(10, 20)); +class QuakeMeAway1(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.QuakeMeAway), new AOEShapeDonut(10, 20)); +class QuakeMeAway2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.QuakeMeAway2), new AOEShapeCircle(10)); +class HeartOnFireII(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.HeartOnFireII), 6); +class HeartOnFireIV(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.HeartOnFireIV)); + +class HeartOnFireIII(BossModule module) : Components.UniformStackSpread(module, 0, 6, alwaysShowSpreads: true) +{ + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.spreadmarker) AddSpread(actor); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.HeartOnFireIII) Spreads.Clear(); } } -class TempersFlare : Components.RaidwideCast -{ - public TempersFlare() : base(ActionID.MakeSpell(AID.TempersFlare)) { } -} - -class PluckAndPrune : Components.SelfTargetedAOEs -{ - public PluckAndPrune() : base(ActionID.MakeSpell(AID.PluckAndPrune), new AOEShapeCircle(6.84f)) { } -} - -class TearyTwirl : Components.SelfTargetedAOEs -{ - public TearyTwirl() : base(ActionID.MakeSpell(AID.TearyTwirl), new AOEShapeCircle(6.84f)) { } -} - -class HeirloomScream : Components.SelfTargetedAOEs -{ - public HeirloomScream() : base(ActionID.MakeSpell(AID.HeirloomScream), new AOEShapeCircle(6.84f)) { } -} - -class PungentPirouette : Components.SelfTargetedAOEs -{ - public PungentPirouette() : base(ActionID.MakeSpell(AID.PungentPirouette), new AOEShapeCircle(6.84f)) { } -} - -class Pollen : Components.SelfTargetedAOEs -{ - public Pollen() : base(ActionID.MakeSpell(AID.Pollen), new AOEShapeCircle(6.84f)) { } -} +class TempersFlare(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.TempersFlare)); +class PluckAndPrune(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PluckAndPrune), new AOEShapeCircle(6.84f)); +class TearyTwirl(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TearyTwirl), new AOEShapeCircle(6.84f)); +class HeirloomScream(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HeirloomScream), new AOEShapeCircle(6.84f)); +class PungentPirouette(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PungentPirouette), new AOEShapeCircle(6.84f)); +class Pollen(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Pollen), new AOEShapeCircle(6.84f)); class LuckyFaceStates : StateMachineBuilder { @@ -180,10 +116,8 @@ public LuckyFaceStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 819, NameID = 10831)] -public class LuckyFace : BossModule +public class LuckyFace(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(0, -460), 20)) { - public LuckyFace(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(0, -460), 20)) { } - protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); diff --git a/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouAcheloios.cs b/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouAcheloios.cs index c9fa08af3a..49e503c2f0 100644 --- a/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouAcheloios.cs +++ b/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouAcheloios.cs @@ -48,14 +48,14 @@ public enum IconID : uint RotateCCW = 168, // Boss } -class Slammer : Components.GenericRotatingAOE +class Slammer(BossModule module) : Components.GenericRotatingAOE(module) { private Angle _increment; private Angle _rotation; private DateTime _activation; private static readonly AOEShapeCone _shape = new(30, 90.Degrees()); - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { // note that boss switches hands, so CW rotation means CCW aoe sequence and vice versa var increment = (IconID)iconID switch @@ -67,11 +67,11 @@ public override void OnEventIcon(BossModule module, Actor actor, uint iconID) if (increment != default) { _increment = increment; - InitIfReady(module, actor); + InitIfReady(actor); } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.DoubleHammer) { @@ -85,16 +85,16 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf _activation = spell.NPCFinishAt; } if (_rotation != default) - InitIfReady(module, caster); + InitIfReady(caster); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if (Sequences.Count > 0 && (AID)spell.Action.ID is AID.QuadrupleHammer2 or AID.LeftHammer2 or AID.RightHammer2 or AID.DoubleHammerA or AID.DoubleHammerB) - AdvanceSequence(0, module.WorldState.CurrentTime); + AdvanceSequence(0, WorldState.CurrentTime); } - private void InitIfReady(BossModule module, Actor source) + private void InitIfReady(Actor source) { if (_rotation != default && _increment != default) { @@ -105,60 +105,17 @@ private void InitIfReady(BossModule module, Actor source) } } -class VolcanicHowl : Components.RaidwideCast -{ - public VolcanicHowl() : base(ActionID.MakeSpell(AID.VolcanicHowl)) { } -} - -class Earthbreak : Components.LocationTargetedAOEs -{ - public Earthbreak() : base(ActionID.MakeSpell(AID.Earthbreak2), 5) { } -} - -class DeadlyHold : Components.SingleTargetCast -{ - public DeadlyHold() : base(ActionID.MakeSpell(AID.DeadlyHold)) { } -} - -class TailSwing : Components.SelfTargetedAOEs -{ - public TailSwing() : base(ActionID.MakeSpell(AID.TailSwing), new AOEShapeCircle(13)) { } -} - -class CriticalBite : Components.SelfTargetedAOEs -{ - public CriticalBite() : base(ActionID.MakeSpell(AID.CriticalBite), new AOEShapeCone(10, 60.Degrees())) { } -} - -class PluckAndPrune : Components.SelfTargetedAOEs -{ - public PluckAndPrune() : base(ActionID.MakeSpell(AID.PluckAndPrune), new AOEShapeCircle(7)) { } -} - -class TearyTwirl : Components.SelfTargetedAOEs -{ - public TearyTwirl() : base(ActionID.MakeSpell(AID.TearyTwirl), new AOEShapeCircle(7)) { } -} - -class HeirloomScream : Components.SelfTargetedAOEs -{ - public HeirloomScream() : base(ActionID.MakeSpell(AID.HeirloomScream), new AOEShapeCircle(7)) { } -} - -class PungentPirouette : Components.SelfTargetedAOEs -{ - public PungentPirouette() : base(ActionID.MakeSpell(AID.PungentPirouette), new AOEShapeCircle(7)) { } -} - -class Pollen : Components.SelfTargetedAOEs -{ - public Pollen() : base(ActionID.MakeSpell(AID.Pollen), new AOEShapeCircle(7)) { } -} - -class HeavySmash : Components.LocationTargetedAOEs -{ - public HeavySmash() : base(ActionID.MakeSpell(AID.HeavySmash), 6) { } -} +class VolcanicHowl(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.VolcanicHowl)); +class Earthbreak(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Earthbreak2), 5); +class DeadlyHold(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.DeadlyHold)); +class TailSwing(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TailSwing), new AOEShapeCircle(13)); +class CriticalBite(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.CriticalBite), new AOEShapeCone(10, 60.Degrees())); +class PluckAndPrune(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PluckAndPrune), new AOEShapeCircle(7)); +class TearyTwirl(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TearyTwirl), new AOEShapeCircle(7)); +class HeirloomScream(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HeirloomScream), new AOEShapeCircle(7)); +class PungentPirouette(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PungentPirouette), new AOEShapeCircle(7)); +class Pollen(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Pollen), new AOEShapeCircle(7)); +class HeavySmash(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.HeavySmash), 6); class AcheloiosStates : StateMachineBuilder { @@ -182,10 +139,8 @@ public AcheloiosStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 909, NameID = 12019)] -public class Acheloios : BossModule +public class Acheloios(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { - public Acheloios(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { } - protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); diff --git a/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouLeon.cs b/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouLeon.cs index 2d7fcba3c6..9fb9e4aa9c 100644 --- a/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouLeon.cs +++ b/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouLeon.cs @@ -22,40 +22,13 @@ public enum AID : uint MarkOfTheBeast = 32205, // 3D28->self, 3,0s cast, range 8 120-degree cone } -class InfernoBlast : Components.SelfTargetedAOEs -{ - public InfernoBlast() : base(ActionID.MakeSpell(AID.InfernoBlast), new AOEShapeRect(46, 20)) { } -} - -class Roar : Components.SelfTargetedAOEs -{ - public Roar() : base(ActionID.MakeSpell(AID.Roar), new AOEShapeCircle(12)) { } -} - -class FlareStar : Components.SelfTargetedAOEs -{ - public FlareStar() : base(ActionID.MakeSpell(AID.FlareStar), new AOEShapeCircle(12)) { } -} - -class MarkOfTheBeast : Components.SelfTargetedAOEs -{ - public MarkOfTheBeast() : base(ActionID.MakeSpell(AID.MarkOfTheBeast), new AOEShapeCone(8, 60.Degrees())) { } -} - -class Pounce : Components.SingleTargetCast -{ - public Pounce() : base(ActionID.MakeSpell(AID.Pounce)) { } -} - -class MagmaChamber : Components.LocationTargetedAOEs -{ - public MagmaChamber() : base(ActionID.MakeSpell(AID.MagmaChamber2), 8) { } -} - -class HeavySmash : Components.LocationTargetedAOEs -{ - public HeavySmash() : base(ActionID.MakeSpell(AID.HeavySmash), 6) { } -} +class InfernoBlast(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.InfernoBlast), new AOEShapeRect(46, 20)); +class Roar(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Roar), new AOEShapeCircle(12)); +class FlareStar(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.FlareStar), new AOEShapeCircle(12)); +class MarkOfTheBeast(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.MarkOfTheBeast), new AOEShapeCone(8, 60.Degrees())); +class Pounce(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.Pounce)); +class MagmaChamber(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.MagmaChamber2), 8); +class HeavySmash(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.HeavySmash), 6); class LeonStates : StateMachineBuilder { @@ -74,10 +47,8 @@ public LeonStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 909, NameID = 11997)] -public class Leon : BossModule +public class Leon(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { - public Leon(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { } - protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); diff --git a/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouMandragoras.cs b/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouMandragoras.cs index e9cec44e80..112f248658 100644 --- a/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouMandragoras.cs +++ b/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouMandragoras.cs @@ -26,45 +26,14 @@ public enum AID : uint Telega = 9630, // bonusadds->self, no cast, single-target, bonus add disappear } -class Ram : Components.SingleTargetCast -{ - public Ram() : base(ActionID.MakeSpell(AID.Ram)) { } -} - -class SaibaiMandragora : Components.CastHint -{ - public SaibaiMandragora() : base(ActionID.MakeSpell(AID.SaibaiMandragora), "Calls adds") { } -} - -class LeafDagger : Components.LocationTargetedAOEs -{ - public LeafDagger() : base(ActionID.MakeSpell(AID.LeafDagger), 3) { } -} - -class PluckAndPrune : Components.SelfTargetedAOEs -{ - public PluckAndPrune() : base(ActionID.MakeSpell(AID.PluckAndPrune), new AOEShapeCircle(7)) { } -} - -class TearyTwirl : Components.SelfTargetedAOEs -{ - public TearyTwirl() : base(ActionID.MakeSpell(AID.TearyTwirl), new AOEShapeCircle(7)) { } -} - -class HeirloomScream : Components.SelfTargetedAOEs -{ - public HeirloomScream() : base(ActionID.MakeSpell(AID.HeirloomScream), new AOEShapeCircle(7)) { } -} - -class PungentPirouette : Components.SelfTargetedAOEs -{ - public PungentPirouette() : base(ActionID.MakeSpell(AID.PungentPirouette), new AOEShapeCircle(7)) { } -} - -class Pollen : Components.SelfTargetedAOEs -{ - public Pollen() : base(ActionID.MakeSpell(AID.Pollen), new AOEShapeCircle(7)) { } -} +class Ram(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.Ram)); +class SaibaiMandragora(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.SaibaiMandragora), "Calls adds"); +class LeafDagger(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.LeafDagger), 3); +class PluckAndPrune(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PluckAndPrune), new AOEShapeCircle(7)); +class TearyTwirl(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TearyTwirl), new AOEShapeCircle(7)); +class HeirloomScream(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HeirloomScream), new AOEShapeCircle(7)); +class PungentPirouette(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PungentPirouette), new AOEShapeCircle(7)); +class Pollen(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Pollen), new AOEShapeCircle(7)); class MandragorasStates : StateMachineBuilder { @@ -84,10 +53,8 @@ public MandragorasStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 909, NameID = 12022)] -public class Mandragoras : BossModule +public class Mandragoras(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { - public Mandragoras(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { } - protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); diff --git a/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouMegakantha.cs b/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouMegakantha.cs index a263408763..a9e3c25ada 100644 --- a/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouMegakantha.cs +++ b/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouMegakantha.cs @@ -30,49 +30,26 @@ public enum AID : uint Telega = 9630, // BonusAdds->self, no cast, single-target, bonus add disappear } -class HeavySmash : Components.LocationTargetedAOEs -{ - public HeavySmash() : base(ActionID.MakeSpell(AID.HeavySmash), 6) { } -} - -class SludgeBomb : Components.LocationTargetedAOEs -{ - public SludgeBomb() : base(ActionID.MakeSpell(AID.SludgeBomb2), 8) { } -} - -class RustlingWind : Components.SelfTargetedAOEs -{ - public RustlingWind() : base(ActionID.MakeSpell(AID.RustlingWind), new AOEShapeRect(15, 2)) { } -} - -class AcidMist : Components.SelfTargetedAOEs -{ - public AcidMist() : base(ActionID.MakeSpell(AID.AcidMist), new AOEShapeCircle(6)) { } -} - -class OdiousAir : Components.SelfTargetedAOEs -{ - public OdiousAir() : base(ActionID.MakeSpell(AID.OdiousAir), new AOEShapeCone(12, 60.Degrees())) { } -} - -class VineWhip : Components.SingleTargetCast -{ - public VineWhip() : base(ActionID.MakeSpell(AID.VineWhip)) { } -} - -class OdiousAtmosphere : Components.GenericAOEs +class HeavySmash(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.HeavySmash), 6); +class SludgeBomb(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.SludgeBomb2), 8); +class RustlingWind(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RustlingWind), new AOEShapeRect(15, 2)); +class AcidMist(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.AcidMist), new AOEShapeCircle(6)); +class OdiousAir(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.OdiousAir), new AOEShapeCone(12, 60.Degrees())); +class VineWhip(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.VineWhip)); + +class OdiousAtmosphere(BossModule module) : Components.GenericAOEs(module) { private AOEInstance? _aoe; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => Utils.ZeroOrOne(_aoe); + public override IEnumerable ActiveAOEs(int slot, Actor actor) => Utils.ZeroOrOne(_aoe); - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.OdiousAtmosphere0) - _aoe = new(new AOEShapeCone(40, 90.Degrees()), caster.Position, spell.Rotation, activation: spell.NPCFinishAt); + _aoe = new(new AOEShapeCone(40, 90.Degrees()), caster.Position, spell.Rotation, spell.NPCFinishAt); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { @@ -107,10 +84,8 @@ public MegakanthaStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 909, NameID = 12009)] -public class Megakantha : BossModule +public class Megakantha(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { - public Megakantha(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { } - protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); diff --git a/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouMeganereis.cs b/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouMeganereis.cs index da0b4973a6..4412258b89 100644 --- a/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouMeganereis.cs +++ b/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouMeganereis.cs @@ -40,80 +40,26 @@ public enum AID : uint HeavySmash = 32317, // 3D4E->location, 3,0s cast, range 6 circle } -class Ceras : Components.SingleTargetCast -{ - public Ceras() : base(ActionID.MakeSpell(AID.Ceras)) { } -} +class Ceras(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.Ceras)); class WaveOfTurmoil : Components.KnockbackFromCastTarget { - public WaveOfTurmoil() : base(ActionID.MakeSpell(AID.WaveOfTurmoil), 20) - { - StopAtWall = true; - } - - public override bool DestinationUnsafe(BossModule module, int slot, Actor actor, WPos pos) => module.FindComponent()?.ActiveAOEs(module, slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false; + public WaveOfTurmoil(BossModule module) : base(module, ActionID.MakeSpell(AID.WaveOfTurmoil), 20) { StopAtWall = true; } + public override bool DestinationUnsafe(int slot, Actor actor, WPos pos) => Module.FindComponent()?.ActiveAOEs(slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false; } -class Hydrobomb : Components.LocationTargetedAOEs -{ - public Hydrobomb() : base(ActionID.MakeSpell(AID.Hydrobomb), 10) { } -} - -class Waterspout : Components.LocationTargetedAOEs -{ - public Waterspout() : base(ActionID.MakeSpell(AID.Waterspout2), 8) { } -} - -class Hydrocannon : Components.SelfTargetedAOEs -{ - public Hydrocannon() : base(ActionID.MakeSpell(AID.Hydrocannon), new AOEShapeRect(17, 1.5f)) { } -} - -class Hydrocannon2 : Components.SelfTargetedAOEs -{ - public Hydrocannon2() : base(ActionID.MakeSpell(AID.Hydrocannon2), new AOEShapeRect(27, 3)) { } -} - -class FallingWater : Components.SpreadFromCastTargets -{ - public FallingWater() : base(ActionID.MakeSpell(AID.FallingWater), 8) { } -} - -class Immersion : Components.RaidwideCast -{ - public Immersion() : base(ActionID.MakeSpell(AID.Immersion)) { } -} - -class PluckAndPrune : Components.SelfTargetedAOEs -{ - public PluckAndPrune() : base(ActionID.MakeSpell(AID.PluckAndPrune), new AOEShapeCircle(7)) { } -} - -class TearyTwirl : Components.SelfTargetedAOEs -{ - public TearyTwirl() : base(ActionID.MakeSpell(AID.TearyTwirl), new AOEShapeCircle(7)) { } -} - -class HeirloomScream : Components.SelfTargetedAOEs -{ - public HeirloomScream() : base(ActionID.MakeSpell(AID.HeirloomScream), new AOEShapeCircle(7)) { } -} - -class PungentPirouette : Components.SelfTargetedAOEs -{ - public PungentPirouette() : base(ActionID.MakeSpell(AID.PungentPirouette), new AOEShapeCircle(7)) { } -} - -class Pollen : Components.SelfTargetedAOEs -{ - public Pollen() : base(ActionID.MakeSpell(AID.Pollen), new AOEShapeCircle(7)) { } -} - -class HeavySmash : Components.LocationTargetedAOEs -{ - public HeavySmash() : base(ActionID.MakeSpell(AID.HeavySmash), 6) { } -} +class Hydrobomb(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Hydrobomb), 10); +class Waterspout(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Waterspout2), 8); +class Hydrocannon(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Hydrocannon), new AOEShapeRect(17, 1.5f)); +class Hydrocannon2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Hydrocannon2), new AOEShapeRect(27, 3)); +class FallingWater(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.FallingWater), 8); +class Immersion(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.Immersion)); +class PluckAndPrune(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PluckAndPrune), new AOEShapeCircle(7)); +class TearyTwirl(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TearyTwirl), new AOEShapeCircle(7)); +class HeirloomScream(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HeirloomScream), new AOEShapeCircle(7)); +class PungentPirouette(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PungentPirouette), new AOEShapeCircle(7)); +class Pollen(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Pollen), new AOEShapeCircle(7)); +class HeavySmash(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.HeavySmash), 6); class MeganereisStates : StateMachineBuilder { @@ -139,10 +85,8 @@ public MeganereisStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 909, NameID = 12014)] -public class Meganereis : BossModule +public class Meganereis(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { - public Meganereis(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { } - protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); diff --git a/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouPithekos.cs b/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouPithekos.cs index fc8c5a581d..3ae17802d1 100644 --- a/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouPithekos.cs +++ b/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouPithekos.cs @@ -28,27 +28,16 @@ public enum IconID : uint Thundercall = 111, // Thundercall marker } -class Spark : Components.SelfTargetedAOEs -{ - public Spark() : base(ActionID.MakeSpell(AID.Spark), new AOEShapeDonut(14, 30)) { } -} - -class SweepingGouge : Components.SingleTargetCast -{ - public SweepingGouge() : base(ActionID.MakeSpell(AID.SweepingGouge)) { } -} +class Spark(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Spark), new AOEShapeDonut(14, 30)); +class SweepingGouge(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.SweepingGouge)); +class Thundercall(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Thundercall), 3); -class Thundercall : Components.LocationTargetedAOEs -{ - public Thundercall() : base(ActionID.MakeSpell(AID.Thundercall), 3) { } -} - -class Thundercall2 : Components.GenericBaitAway +class Thundercall2(BossModule module) : Components.GenericBaitAway(module) { private bool targeted; private Actor? target; - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.Thundercall) { @@ -58,7 +47,7 @@ public override void OnEventIcon(BossModule module, Actor actor, uint iconID) } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.Thundercall) { @@ -67,40 +56,25 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { - base.AddAIHints(module, slot, actor, assignment, hints); + base.AddAIHints(slot, actor, assignment, hints); if (target == actor && targeted) - hints.AddForbiddenZone(ShapeDistance.Circle(module.Bounds.Center, 18)); + hints.AddForbiddenZone(ShapeDistance.Circle(Module.Bounds.Center, 18)); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { - base.AddHints(module, slot, actor, hints, movementHints); + base.AddHints(slot, actor, hints); if (target == actor && targeted) hints.Add("Bait levinorb away!"); } } -class RockThrow : Components.LocationTargetedAOEs -{ - public RockThrow() : base(ActionID.MakeSpell(AID.RockThrow), 6) { } -} - -class LightningBolt2 : Components.LocationTargetedAOEs -{ - public LightningBolt2() : base(ActionID.MakeSpell(AID.LightningBolt2), 6) { } -} - -class ThunderIV : Components.SelfTargetedAOEs -{ - public ThunderIV() : base(ActionID.MakeSpell(AID.ThunderIV), new AOEShapeCircle(18)) { } -} - -class HeavySmash : Components.LocationTargetedAOEs -{ - public HeavySmash() : base(ActionID.MakeSpell(AID.HeavySmash), 6) { } -} +class RockThrow(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.RockThrow), 6); +class LightningBolt2(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.LightningBolt2), 6); +class ThunderIV(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ThunderIV), new AOEShapeCircle(18)); +class HeavySmash(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.HeavySmash), 6); class PithekosStates : StateMachineBuilder { @@ -120,10 +94,8 @@ public PithekosStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 909, NameID = 12001)] -public class Pithekos : BossModule +public class Pithekos(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { - public Pithekos(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { } - protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); diff --git a/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouSatyros.cs b/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouSatyros.cs index 4b9ff57a2c..f04e65aae7 100644 --- a/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouSatyros.cs +++ b/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouSatyros.cs @@ -29,35 +29,12 @@ public enum AID : uint Telega = 9630, // BonusAdds->self, no cast, single-target, bonus add disappear } -class HeavySmash : Components.LocationTargetedAOEs -{ - public HeavySmash() : base(ActionID.MakeSpell(AID.HeavySmash), 6) { } -} - -class StormWing : Components.SelfTargetedAOEs -{ - public StormWing() : base(ActionID.MakeSpell(AID.StormWing2), new AOEShapeCone(40, 45.Degrees())) { } -} - -class FlashGale : Components.LocationTargetedAOEs -{ - public FlashGale() : base(ActionID.MakeSpell(AID.FlashGale), 6) { } -} - -class WindCutter : Components.PersistentVoidzone -{ - public WindCutter() : base(4, m => m.Enemies(OID.StormsGrip)) { } -} - -class Wingblow : Components.SelfTargetedAOEs -{ - public Wingblow() : base(ActionID.MakeSpell(AID.Wingblow2), new AOEShapeCircle(15)) { } -} - -class DreadDive : Components.SingleTargetCast -{ - public DreadDive() : base(ActionID.MakeSpell(AID.DreadDive)) { } -} +class HeavySmash(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.HeavySmash), 6); +class StormWing(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.StormWing2), new AOEShapeCone(40, 45.Degrees())); +class FlashGale(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.FlashGale), 6); +class WindCutter(BossModule module) : Components.PersistentVoidzone(module, 4, m => m.Enemies(OID.StormsGrip)); +class Wingblow(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Wingblow2), new AOEShapeCircle(15)); +class DreadDive(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.DreadDive)); class SatyrosStates : StateMachineBuilder { @@ -75,10 +52,8 @@ public SatyrosStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 909, NameID = 12003)] -public class Satyros : BossModule +public class Satyros(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { - public Satyros(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { } - protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); diff --git a/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouSphinx.cs b/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouSphinx.cs index fa32a0da00..ab6bab4aaa 100644 --- a/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouSphinx.cs +++ b/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouSphinx.cs @@ -39,75 +39,20 @@ public enum AID : uint HeavySmash = 32317, // 3D4E->location, 3,0s cast, range 6 circle } -class Scratch : Components.SingleTargetCast -{ - public Scratch() : base(ActionID.MakeSpell(AID.Scratch)) { } -} - -class Explosion : Components.SelfTargetedAOEs -{ - public Explosion() : base(ActionID.MakeSpell(AID.Explosion), new AOEShapeDonut(3, 12)) { } -} - -class FrigidPulse : Components.SelfTargetedAOEs -{ - public FrigidPulse() : base(ActionID.MakeSpell(AID.FrigidPulse), new AOEShapeDonut(12, 60)) { } -} - -class FervidPulse : Components.SelfTargetedAOEs -{ - public FervidPulse() : base(ActionID.MakeSpell(AID.FervidPulse), new AOEShapeCross(50, 7)) { } -} - -class MoltingPlumage : Components.RaidwideCast -{ - public MoltingPlumage() : base(ActionID.MakeSpell(AID.MoltingPlumage)) { } -} - -class AlpineDraft : Components.SelfTargetedAOEs -{ - public AlpineDraft() : base(ActionID.MakeSpell(AID.AlpineDraft), new AOEShapeRect(45, 2.5f)) { } -} - -class FeatherRain : Components.SpreadFromCastTargets -{ - public FeatherRain() : base(ActionID.MakeSpell(AID.FeatherRain), 6) { } -} - -class AeroII : Components.LocationTargetedAOEs -{ - public AeroII() : base(ActionID.MakeSpell(AID.AeroII2), 4) { } -} - -class PluckAndPrune : Components.SelfTargetedAOEs -{ - public PluckAndPrune() : base(ActionID.MakeSpell(AID.PluckAndPrune), new AOEShapeCircle(7)) { } -} - -class TearyTwirl : Components.SelfTargetedAOEs -{ - public TearyTwirl() : base(ActionID.MakeSpell(AID.TearyTwirl), new AOEShapeCircle(7)) { } -} - -class HeirloomScream : Components.SelfTargetedAOEs -{ - public HeirloomScream() : base(ActionID.MakeSpell(AID.HeirloomScream), new AOEShapeCircle(7)) { } -} - -class PungentPirouette : Components.SelfTargetedAOEs -{ - public PungentPirouette() : base(ActionID.MakeSpell(AID.PungentPirouette), new AOEShapeCircle(7)) { } -} - -class Pollen : Components.SelfTargetedAOEs -{ - public Pollen() : base(ActionID.MakeSpell(AID.Pollen), new AOEShapeCircle(7)) { } -} - -class HeavySmash : Components.LocationTargetedAOEs -{ - public HeavySmash() : base(ActionID.MakeSpell(AID.HeavySmash), 6) { } -} +class Scratch(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.Scratch)); +class Explosion(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Explosion), new AOEShapeDonut(3, 12)); +class FrigidPulse(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.FrigidPulse), new AOEShapeDonut(12, 60)); +class FervidPulse(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.FervidPulse), new AOEShapeCross(50, 7)); +class MoltingPlumage(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.MoltingPlumage)); +class AlpineDraft(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.AlpineDraft), new AOEShapeRect(45, 2.5f)); +class FeatherRain(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.FeatherRain), 6); +class AeroII(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.AeroII2), 4); +class PluckAndPrune(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PluckAndPrune), new AOEShapeCircle(7)); +class TearyTwirl(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TearyTwirl), new AOEShapeCircle(7)); +class HeirloomScream(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HeirloomScream), new AOEShapeCircle(7)); +class PungentPirouette(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PungentPirouette), new AOEShapeCircle(7)); +class Pollen(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Pollen), new AOEShapeCircle(7)); +class HeavySmash(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.HeavySmash), 6); class SphinxStates : StateMachineBuilder { @@ -133,10 +78,8 @@ public SphinxStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 909, NameID = 12016)] -public class Sphinx : BossModule +public class Sphinx(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { - public Sphinx(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { } - protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); diff --git a/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouStyphnolobion.cs b/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouStyphnolobion.cs index fbeeb3894d..e42e413113 100644 --- a/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouStyphnolobion.cs +++ b/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouStyphnolobion.cs @@ -38,42 +38,29 @@ public enum AID : uint HeavySmash = 32317, // 3D4E->location, 3,0s cast, range 6 circle } -class Rake : Components.SingleTargetCast -{ - public Rake() : base(ActionID.MakeSpell(AID.Rake)) { } -} - -class Tiiimbeeer : Components.RaidwideCast -{ - public Tiiimbeeer() : base(ActionID.MakeSpell(AID.Tiiimbeeer)) { } -} - -class StoneIII : Components.LocationTargetedAOEs -{ - public StoneIII() : base(ActionID.MakeSpell(AID.StoneIII2), 6) { } -} +class Rake(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.Rake)); +class Tiiimbeeer(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.Tiiimbeeer)); +class StoneIII(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.StoneIII2), 6); class EarthShaker : Components.BaitAwayCast { - public EarthShaker() : base(ActionID.MakeSpell(AID.EarthShaker2), new AOEShapeCone(60, 15.Degrees())) + public EarthShaker(BossModule module) : base(module, ActionID.MakeSpell(AID.EarthShaker2), new AOEShapeCone(60, 15.Degrees())) { EndsOnCastEvent = true; } } -class EarthQuaker : Components.ConcentricAOEs +class EarthQuaker(BossModule module) : Components.ConcentricAOEs(module, _shapes) { private static readonly AOEShape[] _shapes = [new AOEShapeCircle(10), new AOEShapeDonut(10, 20)]; - public EarthQuaker() : base(_shapes) { } - - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.EarthQuaker) - AddSequence(module.Bounds.Center, spell.NPCFinishAt.AddSeconds(0.5f)); + AddSequence(Module.Bounds.Center, spell.NPCFinishAt.AddSeconds(0.5f)); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if (Sequences.Count > 0) { @@ -83,40 +70,17 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent AID.EarthQuaker2 => 1, _ => -1 }; - AdvanceSequence(order, module.Bounds.Center, module.WorldState.CurrentTime.AddSeconds(1.95f)); + AdvanceSequence(order, Module.Bounds.Center, WorldState.FutureTime(1.95f)); } } } -class PluckAndPrune : Components.SelfTargetedAOEs -{ - public PluckAndPrune() : base(ActionID.MakeSpell(AID.PluckAndPrune), new AOEShapeCircle(7)) { } -} - -class TearyTwirl : Components.SelfTargetedAOEs -{ - public TearyTwirl() : base(ActionID.MakeSpell(AID.TearyTwirl), new AOEShapeCircle(7)) { } -} - -class HeirloomScream : Components.SelfTargetedAOEs -{ - public HeirloomScream() : base(ActionID.MakeSpell(AID.HeirloomScream), new AOEShapeCircle(7)) { } -} - -class PungentPirouette : Components.SelfTargetedAOEs -{ - public PungentPirouette() : base(ActionID.MakeSpell(AID.PungentPirouette), new AOEShapeCircle(7)) { } -} - -class Pollen : Components.SelfTargetedAOEs -{ - public Pollen() : base(ActionID.MakeSpell(AID.Pollen), new AOEShapeCircle(7)) { } -} - -class HeavySmash : Components.LocationTargetedAOEs -{ - public HeavySmash() : base(ActionID.MakeSpell(AID.HeavySmash), 6) { } -} +class PluckAndPrune(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PluckAndPrune), new AOEShapeCircle(7)); +class TearyTwirl(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TearyTwirl), new AOEShapeCircle(7)); +class HeirloomScream(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HeirloomScream), new AOEShapeCircle(7)); +class PungentPirouette(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PungentPirouette), new AOEShapeCircle(7)); +class Pollen(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Pollen), new AOEShapeCircle(7)); +class HeavySmash(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.HeavySmash), 6); class StyphnolobionStates : StateMachineBuilder { @@ -139,10 +103,8 @@ public StyphnolobionStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 909, NameID = 12012)] -public class Styphnolobion : BossModule +public class Styphnolobion(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { - public Styphnolobion(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { } - protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); diff --git a/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouTigris.cs b/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouTigris.cs index 9732ff3f3a..208456d9f1 100644 --- a/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouTigris.cs +++ b/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouTigris.cs @@ -31,60 +31,17 @@ public enum AID : uint HeavySmash = 32317, // BossAdd->location, 3,0s cast, range 6 circle } -class HeavySmash : Components.LocationTargetedAOEs -{ - public HeavySmash() : base(ActionID.MakeSpell(AID.HeavySmash), 6) { } -} - -class AbsoluteZero : Components.SelfTargetedAOEs -{ - public AbsoluteZero() : base(ActionID.MakeSpell(AID.AbsoluteZero), new AOEShapeCone(45, 45.Degrees())) { } -} - -class FrumiousJaws : Components.SingleTargetCast -{ - public FrumiousJaws() : base(ActionID.MakeSpell(AID.FrumiousJaws)) { } -} - -class BlizzardIII : Components.LocationTargetedAOEs -{ - public BlizzardIII() : base(ActionID.MakeSpell(AID.BlizzardIII), 6) { } -} - -class Eyeshine : Components.CastGaze -{ - public Eyeshine() : base(ActionID.MakeSpell(AID.Eyeshine)) { } -} - -class CatchingClaws : Components.SelfTargetedAOEs -{ - public CatchingClaws() : base(ActionID.MakeSpell(AID.CatchingClaws), new AOEShapeCone(12, 45.Degrees())) { } -} - -class PluckAndPrune : Components.SelfTargetedAOEs -{ - public PluckAndPrune() : base(ActionID.MakeSpell(AID.PluckAndPrune), new AOEShapeCircle(7)) { } -} - -class TearyTwirl : Components.SelfTargetedAOEs -{ - public TearyTwirl() : base(ActionID.MakeSpell(AID.TearyTwirl), new AOEShapeCircle(7)) { } -} - -class HeirloomScream : Components.SelfTargetedAOEs -{ - public HeirloomScream() : base(ActionID.MakeSpell(AID.HeirloomScream), new AOEShapeCircle(7)) { } -} - -class PungentPirouette : Components.SelfTargetedAOEs -{ - public PungentPirouette() : base(ActionID.MakeSpell(AID.PungentPirouette), new AOEShapeCircle(7)) { } -} - -class Pollen : Components.SelfTargetedAOEs -{ - public Pollen() : base(ActionID.MakeSpell(AID.Pollen), new AOEShapeCircle(7)) { } -} +class HeavySmash(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.HeavySmash), 6); +class AbsoluteZero(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.AbsoluteZero), new AOEShapeCone(45, 45.Degrees())); +class FrumiousJaws(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.FrumiousJaws)); +class BlizzardIII(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.BlizzardIII), 6); +class Eyeshine(BossModule module) : Components.CastGaze(module, ActionID.MakeSpell(AID.Eyeshine)); +class CatchingClaws(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.CatchingClaws), new AOEShapeCone(12, 45.Degrees())); +class PluckAndPrune(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PluckAndPrune), new AOEShapeCircle(7)); +class TearyTwirl(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TearyTwirl), new AOEShapeCircle(7)); +class HeirloomScream(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HeirloomScream), new AOEShapeCircle(7)); +class PungentPirouette(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PungentPirouette), new AOEShapeCircle(7)); +class Pollen(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Pollen), new AOEShapeCircle(7)); class TigrisStates : StateMachineBuilder { @@ -107,10 +64,8 @@ public TigrisStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 909, NameID = 11999)] -public class Tigris : BossModule +public class Tigris(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { - public Tigris(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { } - protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); diff --git a/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouTriton.cs b/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouTriton.cs index 6f2bdfe3a7..13fe12bd84 100644 --- a/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouTriton.cs +++ b/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouTriton.cs @@ -20,25 +20,10 @@ public enum AID : uint ProtolithicPuncture = 32228, // Boss->player, 5,0s cast, single-target } -class PelagicCleaver : Components.SelfTargetedAOEs -{ - public PelagicCleaver() : base(ActionID.MakeSpell(AID.PelagicCleaver), new AOEShapeCone(40, 30.Degrees())) { } -} - -class FoulWaters : Components.PersistentVoidzoneAtCastTarget -{ - public FoulWaters() : base(5, ActionID.MakeSpell(AID.FoulWaters), m => m.Enemies(OID.Bubble), 0) { } -} - -class AquaticLance : Components.SelfTargetedAOEs -{ - public AquaticLance() : base(ActionID.MakeSpell(AID.AquaticLance), new AOEShapeCircle(13)) { } -} - -class ProtolithicPuncture : Components.SingleTargetCast -{ - public ProtolithicPuncture() : base(ActionID.MakeSpell(AID.ProtolithicPuncture)) { } -} +class PelagicCleaver(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PelagicCleaver), new AOEShapeCone(40, 30.Degrees())); +class FoulWaters(BossModule module) : Components.PersistentVoidzoneAtCastTarget(module, 5, ActionID.MakeSpell(AID.FoulWaters), m => m.Enemies(OID.Bubble), 0); +class AquaticLance(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.AquaticLance), new AOEShapeCircle(13)); +class ProtolithicPuncture(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.ProtolithicPuncture)); class TritonStates : StateMachineBuilder { @@ -54,10 +39,8 @@ public TritonStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 909, NameID = 12006)] -public class Triton : BossModule +public class Triton(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { - public Triton(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { } - protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); diff --git a/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/LampasChrysine.cs b/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/LampasChrysine.cs index 9ee995358d..94e46c12ee 100644 --- a/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/LampasChrysine.cs +++ b/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/LampasChrysine.cs @@ -21,36 +21,25 @@ public enum AID : uint Telega = 9630, // BonusAdds_Lampas->self, no cast, single-target, bonus loot add despawn } -class Shine : Components.LocationTargetedAOEs -{ - public Shine() : base(ActionID.MakeSpell(AID.Shine2), 5) { } -} +class Shine(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Shine2), 5); -class AetherialLight : Components.SelfTargetedAOEs +class AetherialLight(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.AetherialLight2), new AOEShapeCone(40, 30.Degrees()), 4) { - public AetherialLight() : base(ActionID.MakeSpell(AID.AetherialLight2), new AOEShapeCone(40, 30.Degrees()), 4) { } - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { return ActiveCasters.Select((c, i) => new AOEInstance(Shape, c.Position, c.CastInfo!.Rotation, c.CastInfo.NPCFinishAt, (NumCasts > 2 && i < 2) ? ArenaColor.Danger : ArenaColor.AOE)); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { - base.OnCastStarted(module, caster, spell); + base.OnCastStarted(caster, spell); if ((AID)spell.Action.ID == AID.AetherialLight2) ++NumCasts; } } -class Lightburst : Components.SingleTargetCast -{ - public Lightburst() : base(ActionID.MakeSpell(AID.Lightburst2)) { } -} - -class Summon : Components.CastHint -{ - public Summon() : base(ActionID.MakeSpell(AID.Summon), "Calls bonus adds") { } -} +class Lightburst(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.Lightburst2)); +class Summon(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.Summon), "Calls bonus adds"); class LampasStates : StateMachineBuilder { @@ -66,10 +55,8 @@ public LampasStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 909, NameID = 12021)] -public class Lampas : BossModule +public class Lampas(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { - public Lampas(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { } - protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); diff --git a/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/LyssaChrysine.cs b/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/LyssaChrysine.cs index f7164ae3ca..694683a114 100644 --- a/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/LyssaChrysine.cs +++ b/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/LyssaChrysine.cs @@ -28,29 +28,20 @@ public enum AID : uint Telega = 9630, // BonusAdds->self, no cast, single-target, bonus add disappear } -class HeavySmash2 : Components.LocationTargetedAOEs -{ - public HeavySmash2() : base(ActionID.MakeSpell(AID.HeavySmash2), 6) { } -} - -class FrigidStone2 : Components.LocationTargetedAOEs -{ - public FrigidStone2() : base(ActionID.MakeSpell(AID.FrigidStone2), 5) { } -} +class HeavySmash2(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.HeavySmash2), 6); +class FrigidStone2(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.FrigidStone2), 5); -class OutInAOE : Components.ConcentricAOEs +class OutInAOE(BossModule module) : Components.ConcentricAOEs(module, _shapes) { private static readonly AOEShape[] _shapes = { new AOEShapeCircle(10), new AOEShapeDonut(10, 20) }; - public OutInAOE() : base(_shapes) { } - - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.FrigidNeedle) - AddSequence(module.Bounds.Center, spell.NPCFinishAt.AddSeconds(0.45f)); + AddSequence(Module.Bounds.Center, spell.NPCFinishAt.AddSeconds(0.45f)); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if (Sequences.Count > 0) { @@ -60,24 +51,22 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent AID.CircleOfIce2 => 1, _ => -1 }; - AdvanceSequence(order, module.Bounds.Center, module.WorldState.CurrentTime.AddSeconds(2)); + AdvanceSequence(order, Module.Bounds.Center, WorldState.FutureTime(2)); } } } -class InOutAOE : Components.ConcentricAOEs +class InOutAOE(BossModule module) : Components.ConcentricAOEs(module, _shapes) { private static readonly AOEShape[] _shapes = [new AOEShapeDonut(10, 20), new AOEShapeCircle(10)]; - public InOutAOE() : base(_shapes) { } - - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.CircleOfIce) - AddSequence(module.Bounds.Center, spell.NPCFinishAt.AddSeconds(0.45f)); + AddSequence(Module.Bounds.Center, spell.NPCFinishAt.AddSeconds(0.45f)); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if (Sequences.Count > 0) { @@ -87,48 +76,34 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent AID.FrigidNeedle2 => 1, _ => -1 }; - AdvanceSequence(order, module.Bounds.Center, module.WorldState.CurrentTime.AddSeconds(2)); + AdvanceSequence(order, Module.Bounds.Center, WorldState.FutureTime(2)); } } } -class PillarPierce : Components.SelfTargetedAOEs -{ - public PillarPierce() : base(ActionID.MakeSpell(AID.PillarPierce), new AOEShapeRect(80, 2)) { } -} - -class SkullDasher : Components.SingleTargetCast -{ - public SkullDasher() : base(ActionID.MakeSpell(AID.SkullDasher)) { } -} +class PillarPierce(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PillarPierce), new AOEShapeRect(80, 2)); +class SkullDasher(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.SkullDasher)); +class HeavySmash(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.HeavySmash), 6); -class HeavySmash : Components.StackWithCastTargets -{ - public HeavySmash() : base(ActionID.MakeSpell(AID.HeavySmash), 6) { } -} - -class IcePillarSpawn : Components.GenericAOEs +class IcePillarSpawn(BossModule module) : Components.GenericAOEs(module) { private readonly List _aoes = new(); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => _aoes.Take(4); + public override IEnumerable ActiveAOEs(int slot, Actor actor) => _aoes.Take(4); - public override void OnActorCreated(BossModule module, Actor actor) + public override void OnActorCreated(Actor actor) { if ((OID)actor.OID == OID.IcePillars) - _aoes.Add(new(new AOEShapeCircle(6), actor.Position, activation: module.WorldState.CurrentTime.AddSeconds(3.75f))); + _aoes.Add(new(new AOEShapeCircle(6), actor.Position, default, WorldState.FutureTime(3.75f))); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.IcePillar) _aoes.RemoveAt(0); } } -class Howl : Components.CastHint -{ - public Howl() : base(ActionID.MakeSpell(AID.Howl), "Calls adds") { } -} +class Howl(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.Howl), "Calls adds"); class LyssaStates : StateMachineBuilder { @@ -149,10 +124,8 @@ public LyssaStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 909, NameID = 12024)] -public class Lyssa : BossModule +public class Lyssa(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { - public Lyssa(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { } - protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); diff --git a/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/Narkissos.cs b/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/Narkissos.cs index d3385d3dc3..b0b42dc2f1 100644 --- a/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/Narkissos.cs +++ b/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/Narkissos.cs @@ -36,33 +36,21 @@ public enum SID : uint LeftFace = 1960, // Boss->player, extra=0x0 } -class Brainstorm : Components.StatusDrivenForcedMarch +class Brainstorm(BossModule module) : Components.StatusDrivenForcedMarch(module, 2, (uint)SID.ForwardMarch, (uint)SID.AboutFace, (uint)SID.LeftFace, (uint)SID.RightFace) { - public Brainstorm() : base(2, (uint)SID.ForwardMarch, (uint)SID.AboutFace, (uint)SID.LeftFace, (uint)SID.RightFace) { } - - public override bool DestinationUnsafe(BossModule module, int slot, Actor actor, WPos pos) => module.FindComponent()?.ActiveAOEs(module, slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false; + public override bool DestinationUnsafe(int slot, Actor actor, WPos pos) => module.FindComponent()?.ActiveAOEs(slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false; } -class FetchingFulgence : Components.CastGaze -{ - public FetchingFulgence() : base(ActionID.MakeSpell(AID.FetchingFulgence)) { } -} +class FetchingFulgence(BossModule module) : Components.CastGaze(module, ActionID.MakeSpell(AID.FetchingFulgence)); +class Lash(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.Lash)); +class PotentPerfume(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.PotentPerfume), 8); -class Lash : Components.SingleTargetCast -{ - public Lash() : base(ActionID.MakeSpell(AID.Lash)) { } -} - -class PotentPerfume : Components.LocationTargetedAOEs -{ - public PotentPerfume() : base(ActionID.MakeSpell(AID.PotentPerfume), 8) { } -} - -class SapShowerTendrilsHint : BossComponent +class SapShowerTendrilsHint(BossModule module) : BossComponent(module) { private int NumCasts; private bool active; - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.SapShower2) { @@ -71,13 +59,13 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.SapShower2) active = false; } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (active) { @@ -91,36 +79,17 @@ public override void AddGlobalHints(BossModule module, GlobalHints hints) class SapShower : Components.LocationTargetedAOEs { - public SapShower() : base(ActionID.MakeSpell(AID.SapShower2), 8) + public SapShower(BossModule module) : base(module, ActionID.MakeSpell(AID.SapShower2), 8) { Color = ArenaColor.Danger; } } -class ExtensibleTendrils : Components.SelfTargetedAOEs -{ - public ExtensibleTendrils() : base(ActionID.MakeSpell(AID.ExtensibleTendrils), new AOEShapeCross(25, 3)) { } -} - -class PutridBreath : Components.SelfTargetedAOEs -{ - public PutridBreath() : base(ActionID.MakeSpell(AID.PutridBreath), new AOEShapeCone(25, 45.Degrees())) { } -} - -class RockHard : Components.SpreadFromCastTargets -{ - public RockHard() : base(ActionID.MakeSpell(AID.RockHard), 6) { } -} - -class BeguilingGas : Components.CastHint -{ - public BeguilingGas() : base(ActionID.MakeSpell(AID.BeguilingGas), "Raidwide + Temporary Misdirection") { } -} - -class HeavySmash : Components.LocationTargetedAOEs -{ - public HeavySmash() : base(ActionID.MakeSpell(AID.HeavySmash), 6) { } -} +class ExtensibleTendrils(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ExtensibleTendrils), new AOEShapeCross(25, 3)); +class PutridBreath(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PutridBreath), new AOEShapeCone(25, 45.Degrees())); +class RockHard(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.RockHard), 6); +class BeguilingGas(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.BeguilingGas), "Raidwide + Temporary Misdirection"); +class HeavySmash(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.HeavySmash), 6); class NarkissosStates : StateMachineBuilder { @@ -143,10 +112,8 @@ public NarkissosStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 909, NameID = 12029)] -public class Narkissos : BossModule +public class Narkissos(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { - public Narkissos(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { } - protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); diff --git a/BossMod/Modules/Endwalker/Trial/T02Hydaelyn/Echoes.cs b/BossMod/Modules/Endwalker/Trial/T02Hydaelyn/Echoes.cs index d169810517..707998cfc9 100644 --- a/BossMod/Modules/Endwalker/Trial/T02Hydaelyn/Echoes.cs +++ b/BossMod/Modules/Endwalker/Trial/T02Hydaelyn/Echoes.cs @@ -1,12 +1,10 @@ namespace BossMod.Endwalker.Trial.T02Hydaelyn; -class Echoes : Components.UniformStackSpread +class Echoes(BossModule module) : Components.UniformStackSpread(module, 6, 0, 8) { public int NumCasts { get; private set; } - public Echoes() : base(6, 0, 8) { } - - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.Echoes) { @@ -19,7 +17,7 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.Echoes) AddStack(actor); diff --git a/BossMod/Modules/Endwalker/Trial/T02Hydaelyn/Exodus.cs b/BossMod/Modules/Endwalker/Trial/T02Hydaelyn/Exodus.cs index 9055f0da4b..03ba4b214b 100644 --- a/BossMod/Modules/Endwalker/Trial/T02Hydaelyn/Exodus.cs +++ b/BossMod/Modules/Endwalker/Trial/T02Hydaelyn/Exodus.cs @@ -1,33 +1,33 @@ namespace BossMod.Endwalker.Trial.T02Hydaelyn; -class Exodus : BossComponent +class Exodus(BossModule module) : BossComponent(module) { private int _numCrystalsDestroyed; private DateTime _activation; - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (_activation != default) hints.Add("Raidwide"); } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { if (_activation != default) - hints.PredictedDamage.Add((module.Raid.WithSlot().Mask(), _activation)); + hints.PredictedDamage.Add((Raid.WithSlot().Mask(), _activation)); } - public override void OnActorDestroyed(BossModule module, Actor actor) + public override void OnActorDestroyed(Actor actor) { if ((OID)actor.OID == OID.CrystalOfLight) { ++_numCrystalsDestroyed; if (_numCrystalsDestroyed == 6) - _activation = module.WorldState.CurrentTime.AddSeconds(7.2f); + _activation = WorldState.FutureTime(7.2f); } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.Exodus2) _activation = default; diff --git a/BossMod/Modules/Endwalker/Trial/T02Hydaelyn/Lightwave.cs b/BossMod/Modules/Endwalker/Trial/T02Hydaelyn/Lightwave.cs index a59353fe35..fba4b65c3b 100644 --- a/BossMod/Modules/Endwalker/Trial/T02Hydaelyn/Lightwave.cs +++ b/BossMod/Modules/Endwalker/Trial/T02Hydaelyn/Lightwave.cs @@ -1,20 +1,20 @@ namespace BossMod.Endwalker.Trial.T02Hydaelyn; -class Lightwave : Components.GenericAOEs +class Lightwave(BossModule module) : Components.GenericAOEs(module) { private List Waves = new(); private static readonly AOEShapeRect WaveAOE = new(16, 8, 12); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (Waves.Count > 0) foreach (var w in Waves) yield return new(WaveAOE, w.Position, w.Rotation); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { - base.OnEventCast(module, caster, spell); + base.OnEventCast(caster, spell); if ((AID)spell.Action.ID == AID.RayOfLight && !Waves.Contains(caster)) Waves.Add(caster); } diff --git a/BossMod/Modules/Endwalker/Trial/T02Hydaelyn/ParhelicCircle.cs b/BossMod/Modules/Endwalker/Trial/T02Hydaelyn/ParhelicCircle.cs index ff8e6068cf..8f6ac31e1b 100644 --- a/BossMod/Modules/Endwalker/Trial/T02Hydaelyn/ParhelicCircle.cs +++ b/BossMod/Modules/Endwalker/Trial/T02Hydaelyn/ParhelicCircle.cs @@ -1,44 +1,44 @@ namespace BossMod.Endwalker.Trial.T02Hydaelyn; -class ParhelicCircle : Components.GenericAOEs +class ParhelicCircle(BossModule module) : Components.GenericAOEs(module) { private const float _triRadius = 8; private const float _hexRadius = 17; private static readonly AOEShapeCircle _circle = new(6); private DateTime _activation; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_activation != default) { // there are 10 orbs: 1 in center, 3 in vertices of a triangle with radius=8, 6 in vertices of a hexagon with radius=17 // note: i'm not sure how exactly orientation is determined, it seems to be related to eventobj rotations... - var hex = module.Enemies(OID.RefulgenceHexagon).FirstOrDefault(); - var tri = module.Enemies(OID.RefulgenceTriangle).FirstOrDefault(); + var hex = Module.Enemies(OID.RefulgenceHexagon).FirstOrDefault(); + var tri = Module.Enemies(OID.RefulgenceTriangle).FirstOrDefault(); if (hex != null && tri != null) { - var c = module.Bounds.Center; - yield return new(_circle, c, activation: _activation); - yield return new(_circle, c + _triRadius * (tri.Rotation + 60.Degrees()).ToDirection(), activation: _activation); - yield return new(_circle, c + _triRadius * (tri.Rotation + 180.Degrees()).ToDirection(), activation: _activation); - yield return new(_circle, c + _triRadius * (tri.Rotation - 60.Degrees()).ToDirection(), activation: _activation); - yield return new(_circle, c + _hexRadius * hex.Rotation.ToDirection(), activation: _activation); - yield return new(_circle, c + _hexRadius * (hex.Rotation + 60.Degrees()).ToDirection(), activation: _activation); - yield return new(_circle, c + _hexRadius * (hex.Rotation + 120.Degrees()).ToDirection(), activation: _activation); - yield return new(_circle, c + _hexRadius * (hex.Rotation + 180.Degrees()).ToDirection(), activation: _activation); - yield return new(_circle, c + _hexRadius * (hex.Rotation - 120.Degrees()).ToDirection(), activation: _activation); - yield return new(_circle, c + _hexRadius * (hex.Rotation - 60.Degrees()).ToDirection(), activation: _activation); + var c = Module.Bounds.Center; + yield return new(_circle, c, Activation: _activation); + yield return new(_circle, c + _triRadius * (tri.Rotation + 60.Degrees()).ToDirection(), Activation: _activation); + yield return new(_circle, c + _triRadius * (tri.Rotation + 180.Degrees()).ToDirection(), Activation: _activation); + yield return new(_circle, c + _triRadius * (tri.Rotation - 60.Degrees()).ToDirection(), Activation: _activation); + yield return new(_circle, c + _hexRadius * hex.Rotation.ToDirection(), Activation: _activation); + yield return new(_circle, c + _hexRadius * (hex.Rotation + 60.Degrees()).ToDirection(), Activation: _activation); + yield return new(_circle, c + _hexRadius * (hex.Rotation + 120.Degrees()).ToDirection(), Activation: _activation); + yield return new(_circle, c + _hexRadius * (hex.Rotation + 180.Degrees()).ToDirection(), Activation: _activation); + yield return new(_circle, c + _hexRadius * (hex.Rotation - 120.Degrees()).ToDirection(), Activation: _activation); + yield return new(_circle, c + _hexRadius * (hex.Rotation - 60.Degrees()).ToDirection(), Activation: _activation); } } } - public override void OnActorCreated(BossModule module, Actor actor) + public override void OnActorCreated(Actor actor) { if ((OID)actor.OID is OID.RefulgenceHexagon) - _activation = module.WorldState.CurrentTime.AddSeconds(8.9f); + _activation = WorldState.FutureTime(8.9f); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.Incandescence) ++NumCasts; @@ -47,6 +47,5 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn NumCasts = 0; _activation = default; } - } } diff --git a/BossMod/Modules/Endwalker/Trial/T02Hydaelyn/T02Hydaelyn.cs b/BossMod/Modules/Endwalker/Trial/T02Hydaelyn/T02Hydaelyn.cs index 01efa252af..6959ff0ae4 100644 --- a/BossMod/Modules/Endwalker/Trial/T02Hydaelyn/T02Hydaelyn.cs +++ b/BossMod/Modules/Endwalker/Trial/T02Hydaelyn/T02Hydaelyn.cs @@ -1,64 +1,17 @@ namespace BossMod.Endwalker.Trial.T02Hydaelyn; -class MousasScorn : Components.CastSharedTankbuster -{ - public MousasScorn() : base(ActionID.MakeSpell(AID.MousasScorn), 4) { } -} - -class MousasScornHint : Components.SingleTargetCast -{ - public MousasScornHint() : base(ActionID.MakeSpell(AID.MousasScorn), "Shared Tankbuster") { } -} - -class HerossSundering : Components.BaitAwayCast -{ - public HerossSundering() : base(ActionID.MakeSpell(AID.HerossSundering), new AOEShapeCone(40, 45.Degrees())) { } -} - -class HerossSunderingHint : Components.SingleTargetCast -{ - public HerossSunderingHint() : base(ActionID.MakeSpell(AID.HerossSundering), "Tankbuster cleave") { } -} - -class HerossRadiance : Components.RaidwideCast -{ - public HerossRadiance() : base(ActionID.MakeSpell(AID.HerossRadiance)) { } -} - -class MagossRadiance : Components.RaidwideCast -{ - public MagossRadiance() : base(ActionID.MakeSpell(AID.MagossRadiance)) { } -} - -class RadiantHalo : Components.RaidwideCast -{ - public RadiantHalo() : base(ActionID.MakeSpell(AID.RadiantHalo)) { } -} - -class CrystallineStoneIII : Components.StackWithCastTargets -{ - public CrystallineStoneIII() : base(ActionID.MakeSpell(AID.CrystallineStoneIII2), 6, 5) { } -} - -class CrystallineBlizzardIII : Components.SpreadFromCastTargets -{ - public CrystallineBlizzardIII() : base(ActionID.MakeSpell(AID.CrystallineBlizzardIII2), 5) { } -} - -class Beacon : Components.ChargeAOEs -{ - public Beacon() : base(ActionID.MakeSpell(AID.Beacon), 3) { } -} - -class Beacon2 : Components.SelfTargetedAOEs -{ - public Beacon2() : base(ActionID.MakeSpell(AID.Beacon2), new AOEShapeRect(45, 3), 10) { } -} - -class HydaelynsRay : Components.SelfTargetedAOEs -{ - public HydaelynsRay() : base(ActionID.MakeSpell(AID.HydaelynsRay), new AOEShapeRect(45, 15)) { } -} +class MousasScorn(BossModule module) : Components.CastSharedTankbuster(module, ActionID.MakeSpell(AID.MousasScorn), 4); +class MousasScornHint(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.MousasScorn), "Shared Tankbuster"); +class HerossSundering(BossModule module) : Components.BaitAwayCast(module, ActionID.MakeSpell(AID.HerossSundering), new AOEShapeCone(40, 45.Degrees())); +class HerossSunderingHint(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.HerossSundering), "Tankbuster cleave"); +class HerossRadiance(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.HerossRadiance)); +class MagossRadiance(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.MagossRadiance)); +class RadiantHalo(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.RadiantHalo)); +class CrystallineStoneIII(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.CrystallineStoneIII2), 6, 5); +class CrystallineBlizzardIII(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.CrystallineBlizzardIII2), 5); +class Beacon(BossModule module) : Components.ChargeAOEs(module, ActionID.MakeSpell(AID.Beacon), 3); +class Beacon2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Beacon2), new AOEShapeRect(45, 3), 10); +class HydaelynsRay(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HydaelynsRay), new AOEShapeRect(45, 15)); class T02HydaelynStates : StateMachineBuilder { @@ -86,10 +39,8 @@ public T02HydaelynStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 790, NameID = 10453)] -public class T02Hydaelyn : BossModule +public class T02Hydaelyn(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { - public T02Hydaelyn(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { } - protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); diff --git a/BossMod/Modules/Endwalker/Trial/T02Hydaelyn/WeaponTracker.cs b/BossMod/Modules/Endwalker/Trial/T02Hydaelyn/WeaponTracker.cs index efcca27b34..6cc0c6339c 100644 --- a/BossMod/Modules/Endwalker/Trial/T02Hydaelyn/WeaponTracker.cs +++ b/BossMod/Modules/Endwalker/Trial/T02Hydaelyn/WeaponTracker.cs @@ -1,26 +1,26 @@ namespace BossMod.Endwalker.Trial.T02Hydaelyn; -class WeaponTracker : Components.GenericAOEs +class WeaponTracker(BossModule module) : Components.GenericAOEs(module) { private AOEInstance? _aoe; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => Utils.ZeroOrOne(_aoe); + public override IEnumerable ActiveAOEs(int slot, Actor actor) => Utils.ZeroOrOne(_aoe); - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.HydaelynsWeapon && status.Extra == 0x1B4) - _aoe = new(new AOEShapeCircle(10), module.PrimaryActor.Position, activation: module.WorldState.CurrentTime.AddSeconds(6)); + _aoe = new(new AOEShapeCircle(10), Module.PrimaryActor.Position, default, WorldState.FutureTime(6)); if ((SID)status.ID == SID.HydaelynsWeapon && status.Extra == 0x1B5) - _aoe = new(new AOEShapeDonut(5, 40), module.PrimaryActor.Position, activation: module.WorldState.CurrentTime.AddSeconds(6)); + _aoe = new(new AOEShapeDonut(5, 40), Module.PrimaryActor.Position, default, WorldState.FutureTime(6)); } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.HydaelynsWeapon) - _aoe = new(new AOEShapeCross(40, 5), module.PrimaryActor.Position, activation: module.WorldState.CurrentTime.AddSeconds(6.9f)); + _aoe = new(new AOEShapeCross(40, 5), Module.PrimaryActor.Position, default, WorldState.FutureTime(6.9f)); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.Equinox2 or AID.HighestHoly or AID.Anthelion) _aoe = null; diff --git a/BossMod/Modules/Endwalker/Trial/T08Asura/T08Asura.cs b/BossMod/Modules/Endwalker/Trial/T08Asura/T08Asura.cs index 4bacb499de..3816f233a8 100644 --- a/BossMod/Modules/Endwalker/Trial/T08Asura/T08Asura.cs +++ b/BossMod/Modules/Endwalker/Trial/T08Asura/T08Asura.cs @@ -1,70 +1,25 @@ namespace BossMod.Endwalker.Trial.T08Asura; -class LowerRealm : Components.RaidwideCast +class LowerRealm(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.LowerRealm)) { - public LowerRealm() : base(ActionID.MakeSpell(AID.LowerRealm)) { } - - public override void Update(BossModule module) //deathwall appears after 1st cast + public override void Update() //deathwall appears after 1st cast { if (NumCasts > 0) - module.Arena.Bounds = new ArenaBoundsCircle(new(100, 100), 19); + Module.Arena.Bounds = new ArenaBoundsCircle(new(100, 100), 19); } } -class Ephemerality : Components.RaidwideCast -{ - public Ephemerality() : base(ActionID.MakeSpell(AID.Ephemerality)) { } -} - -class CuttingJewel : Components.BaitAwayCast -{ - public CuttingJewel() : base(ActionID.MakeSpell(AID.CuttingJewel), new AOEShapeCircle(4), true) { } -} - -class CuttingJewelHint : Components.SingleTargetCast -{ - public CuttingJewelHint() : base(ActionID.MakeSpell(AID.CuttingJewel)) { } -} - -class IconographyPedestalPurge : Components.SelfTargetedAOEs -{ - public IconographyPedestalPurge() : base(ActionID.MakeSpell(AID.IconographyPedestalPurge), new AOEShapeCircle(10)) { } -} - -class PedestalPurge : Components.SelfTargetedAOEs -{ //Note, this is not a raidwide, origin is outside of the arena - public PedestalPurge() : base(ActionID.MakeSpell(AID.PedestalPurge), new AOEShapeCircle(27)) { } -} - -class IconographyWheelOfDeincarnation : Components.SelfTargetedAOEs -{ - public IconographyWheelOfDeincarnation() : base(ActionID.MakeSpell(AID.IconographyWheelOfDeincarnation), new AOEShapeDonut(8, 40)) { } -} - -class WheelOfDeincarnation : Components.SelfTargetedAOEs -{ - public WheelOfDeincarnation() : base(ActionID.MakeSpell(AID.WheelOfDeincarnation), new AOEShapeDonut(15, 96)) { } -} - -class IconographyBladewise : Components.SelfTargetedAOEs -{ - public IconographyBladewise() : base(ActionID.MakeSpell(AID.IconographyBladewise), new AOEShapeRect(50, 3)) { } -} - -class Bladewise : Components.SelfTargetedAOEs -{ - public Bladewise() : base(ActionID.MakeSpell(AID.Bladewise), new AOEShapeRect(100, 14)) { } -} - -class Scattering : Components.SelfTargetedAOEs -{ - public Scattering() : base(ActionID.MakeSpell(AID.Scattering), new AOEShapeRect(20, 3)) { } -} - -class OrderedChaos : Components.SpreadFromCastTargets -{ - public OrderedChaos() : base(ActionID.MakeSpell(AID.OrderedChaos), 5) { } -} +class Ephemerality(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.Ephemerality)); +class CuttingJewel(BossModule module) : Components.BaitAwayCast(module, ActionID.MakeSpell(AID.CuttingJewel), new AOEShapeCircle(4), true); +class CuttingJewelHint(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.CuttingJewel)); +class IconographyPedestalPurge(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.IconographyPedestalPurge), new AOEShapeCircle(10)); +class PedestalPurge(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PedestalPurge), new AOEShapeCircle(27)); // Note, this is not a raidwide, origin is outside of the arena +class IconographyWheelOfDeincarnation(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.IconographyWheelOfDeincarnation), new AOEShapeDonut(8, 40)); +class WheelOfDeincarnation(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.WheelOfDeincarnation), new AOEShapeDonut(15, 96)); +class IconographyBladewise(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.IconographyBladewise), new AOEShapeRect(50, 3)); +class Bladewise(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Bladewise), new AOEShapeRect(100, 14)); +class Scattering(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Scattering), new AOEShapeRect(20, 3)); +class OrderedChaos(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.OrderedChaos), 5); class T08AsuraStates : StateMachineBuilder { @@ -97,7 +52,4 @@ public T08AsuraStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 944, NameID = 12351)] -public class T08Asura : BossModule -{ - public T08Asura(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { } -} +public class T08Asura(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)); diff --git a/BossMod/Modules/Endwalker/Trial/T08Asura/T08AsuriChakra.cs b/BossMod/Modules/Endwalker/Trial/T08Asura/T08AsuriChakra.cs index a693d9b28e..3d38c86997 100644 --- a/BossMod/Modules/Endwalker/Trial/T08Asura/T08AsuriChakra.cs +++ b/BossMod/Modules/Endwalker/Trial/T08Asura/T08AsuriChakra.cs @@ -1,31 +1,8 @@ namespace BossMod.Endwalker.Trial.T08Asura; -class AsuriChakra : Components.SelfTargetedAOEs -{ - public AsuriChakra() : base(ActionID.MakeSpell(AID.AsuriChakra), new AOEShapeCircle(5)) { } -} - -class Chakra1 : Components.SelfTargetedAOEs -{ - public Chakra1() : base(ActionID.MakeSpell(AID.Chakra1), new AOEShapeDonut(6, 8)) { } -} - -class Chakra2 : Components.SelfTargetedAOEs -{ - public Chakra2() : base(ActionID.MakeSpell(AID.Chakra2), new AOEShapeDonut(9, 11)) { } -} - -class Chakra3 : Components.SelfTargetedAOEs -{ - public Chakra3() : base(ActionID.MakeSpell(AID.Chakra3), new AOEShapeDonut(12, 14)) { } -} - -class Chakra4 : Components.SelfTargetedAOEs -{ - public Chakra4() : base(ActionID.MakeSpell(AID.Chakra4), new AOEShapeDonut(15, 17)) { } -} - -class Chakra5 : Components.SelfTargetedAOEs -{ - public Chakra5() : base(ActionID.MakeSpell(AID.Chakra4), new AOEShapeDonut(18, 20)) { } -} +class AsuriChakra(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.AsuriChakra), new AOEShapeCircle(5)); +class Chakra1(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Chakra1), new AOEShapeDonut(6, 8)); +class Chakra2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Chakra2), new AOEShapeDonut(9, 11)); +class Chakra3(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Chakra3), new AOEShapeDonut(12, 14)); +class Chakra4(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Chakra4), new AOEShapeDonut(15, 17)); +class Chakra5(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Chakra4), new AOEShapeDonut(18, 20)); diff --git a/BossMod/Modules/Endwalker/Trial/T08Asura/T08Laceration.cs b/BossMod/Modules/Endwalker/Trial/T08Asura/T08Laceration.cs index c12049e844..5134bbec68 100644 --- a/BossMod/Modules/Endwalker/Trial/T08Asura/T08Laceration.cs +++ b/BossMod/Modules/Endwalker/Trial/T08Asura/T08Laceration.cs @@ -1,25 +1,25 @@ namespace BossMod.Endwalker.Trial.T08Asura; -class Laceration : Components.GenericAOEs +class Laceration(BossModule module) : Components.GenericAOEs(module) { private static readonly AOEShapeCircle circle = new(9); private DateTime _activation; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { - foreach (var c in module.Enemies(OID.PhantomAsura)) + foreach (var c in Module.Enemies(OID.PhantomAsura)) if (_activation != default) - yield return new(circle, c.Position, activation: _activation); + yield return new(circle, c.Position, default, _activation); } - public override void OnActorPlayActionTimelineEvent(BossModule module, Actor actor, ushort id) + public override void OnActorPlayActionTimelineEvent(Actor actor, ushort id) { if (id == 0x11D6) - _activation = module.WorldState.CurrentTime.AddSeconds(5); //actual time is 5-7s delay, but the AOEs end up getting casted at the same time, so we take the earliest time + _activation = WorldState.FutureTime(5); //actual time is 5-7s delay, but the AOEs end up getting casted at the same time, so we take the earliest time } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.Laceration) _activation = default; diff --git a/BossMod/Modules/Endwalker/Trial/T08Asura/T08ManyFaces.cs b/BossMod/Modules/Endwalker/Trial/T08Asura/T08ManyFaces.cs index d77c134fc4..0e7eff43ee 100644 --- a/BossMod/Modules/Endwalker/Trial/T08Asura/T08ManyFaces.cs +++ b/BossMod/Modules/Endwalker/Trial/T08Asura/T08ManyFaces.cs @@ -1,6 +1,6 @@ namespace BossMod.Endwalker.Trial.T08Asura; -class ManyFaces : Components.GenericAOEs +class ManyFaces(BossModule module) : Components.GenericAOEs(module) { private static readonly AOEShapeCone cone = new(20, 90.Degrees()); private DateTime _activation; @@ -9,15 +9,15 @@ class ManyFaces : Components.GenericAOEs private Angle _rotationWrath; private Angle _rotationDelight; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (delight) - yield return new(cone, module.Bounds.Center, _rotationDelight, activation: _activation); + yield return new(cone, Module.Bounds.Center, _rotationDelight, _activation); if (wrath) - yield return new(cone, module.Bounds.Center, _rotationWrath, activation: _activation); + yield return new(cone, Module.Bounds.Center, _rotationWrath, _activation); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.TheFaceOfWrathA or AID.TheFaceOfWrathB) delight = true; @@ -35,7 +35,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.TheFaceOfDelightSnapshot or AID.TheFaceOfWrathSnapshot) { diff --git a/BossMod/Modules/Endwalker/Trial/T08Asura/T08MyriadAspects.cs b/BossMod/Modules/Endwalker/Trial/T08Asura/T08MyriadAspects.cs index a68dd7cf06..6e8f42b0d5 100644 --- a/BossMod/Modules/Endwalker/Trial/T08Asura/T08MyriadAspects.cs +++ b/BossMod/Modules/Endwalker/Trial/T08Asura/T08MyriadAspects.cs @@ -1,6 +1,6 @@ namespace BossMod.Endwalker.Trial.T08Asura; -class MyriadAspects : Components.GenericAOEs +class MyriadAspects(BossModule module) : Components.GenericAOEs(module) { private static readonly AOEShapeCone cone = new(40, 15.Degrees()); private DateTime _activation1; @@ -8,17 +8,17 @@ class MyriadAspects : Components.GenericAOEs private List _spell1 = new(); private List _spell2 = new(); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (NumCasts < 6 && _spell1.Count > 0) foreach (var c in _spell1) - yield return new(cone, module.Bounds.Center, c.Rotation, activation: _activation1); + yield return new(cone, Module.Bounds.Center, c.Rotation, _activation1); if (NumCasts >= 6 && _spell2.Count > 0) foreach (var c in _spell2) - yield return new(cone, module.Bounds.Center, c.Rotation, activation: _activation2); + yield return new(cone, Module.Bounds.Center, c.Rotation, _activation2); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.MyriadAspects1) { @@ -32,7 +32,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.MyriadAspects1 or AID.MyriadAspects2) ++NumCasts; diff --git a/BossMod/Modules/Endwalker/Trial/T08Asura/T08SixBladedKhadga.cs b/BossMod/Modules/Endwalker/Trial/T08Asura/T08SixBladedKhadga.cs index 238c84c5e7..f721c5e328 100644 --- a/BossMod/Modules/Endwalker/Trial/T08Asura/T08SixBladedKhadga.cs +++ b/BossMod/Modules/Endwalker/Trial/T08Asura/T08SixBladedKhadga.cs @@ -1,30 +1,30 @@ namespace BossMod.Endwalker.Trial.T08Asura; -class SixBladedKhadga : Components.GenericAOEs +class SixBladedKhadga(BossModule module) : Components.GenericAOEs(module) { private List _spell = new(); private DateTime _start; private static readonly AOEShapeCone Cone = new(20, 90.Degrees()); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_spell.Count > 0) - yield return new(Cone, module.PrimaryActor.Position, _spell[0].Rotation, _start, ArenaColor.Danger); + yield return new(Cone, Module.PrimaryActor.Position, _spell[0].Rotation, _start, ArenaColor.Danger); if (_spell.Count > 1) - yield return new(Cone, module.PrimaryActor.Position, _spell[1].Rotation, _start.AddSeconds(2)); + yield return new(Cone, Module.PrimaryActor.Position, _spell[1].Rotation, _start.AddSeconds(2)); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.KhadgaTelegraph1 or AID.KhadgaTelegraph2 or AID.KhadgaTelegraph3) { _spell.Add(spell); if (_start == default) - _start = module.WorldState.CurrentTime.AddSeconds(12.9f); + _start = WorldState.FutureTime(12.9f); } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.Khadga1 or AID.Khadga2 or AID.Khadga3 or AID.Khadga4 or AID.Khadga5 or AID.Khadga6) { diff --git a/BossMod/Modules/Endwalker/Ultimate/DSW1/DSW1.cs b/BossMod/Modules/Endwalker/Ultimate/DSW1/DSW1.cs index 635f55952e..08b01364b3 100644 --- a/BossMod/Modules/Endwalker/Ultimate/DSW1/DSW1.cs +++ b/BossMod/Modules/Endwalker/Ultimate/DSW1/DSW1.cs @@ -1,19 +1,8 @@ namespace BossMod.Endwalker.Ultimate.DSW1; -class EmptyDimension : Components.SelfTargetedAOEs -{ - public EmptyDimension() : base(ActionID.MakeSpell(AID.EmptyDimension), new AOEShapeDonut(6, 70)) {} -} - -class FullDimension : Components.SelfTargetedAOEs -{ - public FullDimension() : base(ActionID.MakeSpell(AID.FullDimension), new AOEShapeCircle(6)) { } -} - -class HoliestHallowing : Components.CastHint -{ - public HoliestHallowing() : base(ActionID.MakeSpell(AID.HoliestHallowing), "Interrupt!") { } -} +class EmptyDimension(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.EmptyDimension), new AOEShapeDonut(6, 70)); +class FullDimension(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.FullDimension), new AOEShapeCircle(6)); +class HoliestHallowing(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.HoliestHallowing), "Interrupt!"); [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.SerAdelphel, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 788)] public class DSW1 : BossModule diff --git a/BossMod/Modules/Endwalker/Ultimate/DSW1/DSW1Config.cs b/BossMod/Modules/Endwalker/Ultimate/DSW1/DSW1Config.cs index f35301d864..7afc8bc8c2 100644 --- a/BossMod/Modules/Endwalker/Ultimate/DSW1/DSW1Config.cs +++ b/BossMod/Modules/Endwalker/Ultimate/DSW1/DSW1Config.cs @@ -1,7 +1,7 @@ namespace BossMod.Endwalker.Ultimate.DSW1; [ConfigDisplay(Order = 0x200, Parent = typeof(EndwalkerConfig))] -public class DSW1Config : CooldownPlanningConfigNode +public class DSW1Config() : CooldownPlanningConfigNode(90) { public enum HeavensflameHints { @@ -17,6 +17,4 @@ public enum HeavensflameHints [PropertyDisplay("Heavensflame resolution hints")] public HeavensflameHints Heavensflame = HeavensflameHints.None; - - public DSW1Config() : base(90) { } } diff --git a/BossMod/Modules/Endwalker/Ultimate/DSW1/Heavensblaze.cs b/BossMod/Modules/Endwalker/Ultimate/DSW1/Heavensblaze.cs index a10c76de97..c6f10fd565 100644 --- a/BossMod/Modules/Endwalker/Ultimate/DSW1/Heavensblaze.cs +++ b/BossMod/Modules/Endwalker/Ultimate/DSW1/Heavensblaze.cs @@ -3,39 +3,31 @@ // TODO: consider adding invuln hint for tether tank?.. class HolyShieldBash : Components.BaitAwayTethers { - public HolyShieldBash() : base(new AOEShapeRect(80, 4), (uint)TetherID.HolyBladedance, ActionID.MakeSpell(AID.HolyShieldBash)) + public HolyShieldBash(BossModule module) : base(module, new AOEShapeRect(80, 4), (uint)TetherID.HolyBladedance, ActionID.MakeSpell(AID.HolyShieldBash)) { BaiterPriority = PlayerPriority.Danger; - } - - public override void Init(BossModule module) - { // TODO: consider selecting specific tank rather than any - ForbiddenPlayers = module.Raid.WithSlot(true).WhereActor(a => a.Role != Role.Tank).Mask(); + ForbiddenPlayers = Raid.WithSlot(true).WhereActor(a => a.Role != Role.Tank).Mask(); } } // note: this is not really a 'bait', but component works well enough -class HolyBladedance : Components.GenericBaitAway +class HolyBladedance(BossModule module) : Components.GenericBaitAway(module, ActionID.MakeSpell(AID.HolyBladedanceAOE)) { - public HolyBladedance() : base(ActionID.MakeSpell(AID.HolyBladedanceAOE)) { } - - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { - if ((AID)spell.Action.ID == AID.HolyShieldBash && module.WorldState.Actors.Find(spell.MainTargetID) is var target && target != null) + if ((AID)spell.Action.ID == AID.HolyShieldBash && WorldState.Actors.Find(spell.MainTargetID) is var target && target != null) CurrentBaits.Add(new(caster, target, new AOEShapeCone(16, 45.Degrees()))); } } -class Heavensblaze : Components.StackWithCastTargets +class Heavensblaze(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.Heavensblaze), 4, 7) { - public Heavensblaze() : base(ActionID.MakeSpell(AID.Heavensblaze), 4, 7) { } - - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { // bladedance target shouldn't stack if ((AID)spell.Action.ID == AID.HolyShieldBash) foreach (ref var s in Stacks.AsSpan()) - s.ForbiddenPlayers.Set(module.Raid.FindSlot(spell.MainTargetID)); + s.ForbiddenPlayers.Set(Raid.FindSlot(spell.MainTargetID)); } } diff --git a/BossMod/Modules/Endwalker/Ultimate/DSW1/Heavensflame.cs b/BossMod/Modules/Endwalker/Ultimate/DSW1/Heavensflame.cs index 235b4acecc..8f9bf23f47 100644 --- a/BossMod/Modules/Endwalker/Ultimate/DSW1/Heavensflame.cs +++ b/BossMod/Modules/Endwalker/Ultimate/DSW1/Heavensflame.cs @@ -1,11 +1,8 @@ namespace BossMod.Endwalker.Ultimate.DSW1; -class HeavensflameAOE : Components.CastCounter -{ - public HeavensflameAOE() : base(ActionID.MakeSpell(AID.HeavensflameAOE)) { } -} +class HeavensflameAOE(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.HeavensflameAOE)); -class HeavensflameKnockback : Components.KnockbackFromCastTarget +class HeavensflameKnockback(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.FaithUnmoving), 16) { private WPos[] _playerAdjustedPositions = new WPos[PartyState.MaxPartySize]; private int[] _playerIcons = new int[PartyState.MaxPartySize]; // 0 = unassigned, 1 = circle/red, 2 = triangle/green, 3 = cross/blue, 4 = square/purple @@ -14,27 +11,25 @@ class HeavensflameKnockback : Components.KnockbackFromCastTarget private static readonly float _aoeRadius = 10; private static readonly float _tetherBreakDistance = 32; // TODO: verify... - public HeavensflameKnockback() : base(ActionID.MakeSpell(AID.FaithUnmoving), 16) { } - - public override void Update(BossModule module) + public override void Update() { - foreach (var (slot, player) in module.Raid.WithSlot()) + foreach (var (slot, player) in Raid.WithSlot()) _playerAdjustedPositions[slot] = AwayFromSource(player.Position, Casters.FirstOrDefault(), Distance); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_playerIcons[slot] == 0) return; - if (Casters.Count > 0 && IsImmune(slot, module.WorldState.CurrentTime)) + if (Casters.Count > 0 && IsImmune(slot, WorldState.CurrentTime)) hints.Add("Cancel knockback immunity!"); var actorAdjPos = _playerAdjustedPositions[slot]; - if (!module.Bounds.Contains(actorAdjPos)) + if (!Module.Bounds.Contains(actorAdjPos)) hints.Add("About to be knocked into wall!"); - if (module.Raid.WithSlot().Exclude(actor).WhereSlot(s => _playerAdjustedPositions[s].InCircle(actorAdjPos, _aoeRadius)).Any()) + if (Raid.WithSlot().Exclude(actor).WhereSlot(s => _playerAdjustedPositions[s].InCircle(actorAdjPos, _aoeRadius)).Any()) hints.Add("Spread!"); int partner = FindTetheredPartner(slot); @@ -42,43 +37,43 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint hints.Add("Aim to break tether!"); } - public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) + public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) { return _playerIcons[pcSlot] == 0 ? PlayerPriority.Irrelevant : !_brokenTethers[pcSlot] && _playerIcons[pcSlot] == _playerIcons[playerSlot] ? PlayerPriority.Interesting : PlayerPriority.Normal; } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (_playerIcons[pcSlot] == 0) return; - foreach (var hint in PositionHints(module, pcSlot)) + foreach (var hint in PositionHints(pcSlot)) { - module.Arena.AddCircle(hint, 1, ArenaColor.Safe); + Arena.AddCircle(hint, 1, ArenaColor.Safe); //var dir = Vector3.Normalize(pos.Value - _knockbackSource.Position); - //var adjPos = module.Arena.ClampToBounds(_knockbackSource.Position + 50 * dir); - //module.Arena.AddLine(module.Bounds.Center, adjPos, ArenaColor.Safe); + //var adjPos = Arena.ClampToBounds(_knockbackSource.Position + 50 * dir); + //Arena.AddLine(Module.Bounds.Center, adjPos, ArenaColor.Safe); } int partner = FindTetheredPartner(pcSlot); if (partner >= 0) - arena.AddLine(pc.Position, module.Raid[partner]!.Position, ArenaColor.Safe); + Arena.AddLine(pc.Position, Raid[partner]!.Position, ArenaColor.Safe); - DrawKnockback(pc, _playerAdjustedPositions[pcSlot], arena); + DrawKnockback(pc, _playerAdjustedPositions[pcSlot], Arena); - foreach (var (slot, _) in module.Raid.WithSlot().Exclude(pc)) - arena.AddCircle(_playerAdjustedPositions[slot], _aoeRadius, ArenaColor.Danger); + foreach (var (slot, _) in Raid.WithSlot().Exclude(pc)) + Arena.AddCircle(_playerAdjustedPositions[slot], _aoeRadius, ArenaColor.Danger); } - public override void OnUntethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnUntethered(Actor source, ActorTetherInfo tether) { - _brokenTethers.Set(module.Raid.FindSlot(source.InstanceID)); - _brokenTethers.Set(module.Raid.FindSlot(tether.Target)); + _brokenTethers.Set(Raid.FindSlot(source.InstanceID)); + _brokenTethers.Set(Raid.FindSlot(tether.Target)); } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { int icon = (IconID)iconID switch { @@ -90,7 +85,7 @@ public override void OnEventIcon(BossModule module, Actor actor, uint iconID) }; if (icon != 0) { - var slot = module.Raid.FindSlot(actor.InstanceID); + var slot = Raid.FindSlot(actor.InstanceID); if (slot >= 0) _playerIcons[slot] = icon; } @@ -108,7 +103,7 @@ private int FindTetheredPartner(int slot) return -1; } - private IEnumerable PositionHints(BossModule module, int slot) + private IEnumerable PositionHints(int slot) { var icon = _playerIcons[slot]; if (icon == 0) @@ -118,9 +113,9 @@ private IEnumerable PositionHints(BossModule module, int slot) { case DSW1Config.HeavensflameHints.Waymarks: { - if (module.WorldState.Waymarks[(Waymark)((int)Waymark.A + (icon - 1))] is var alt1 && alt1 != null) + if (WorldState.Waymarks[(Waymark)((int)Waymark.A + (icon - 1))] is var alt1 && alt1 != null) yield return new(alt1.Value.XZ()); - if (module.WorldState.Waymarks[(Waymark)((int)Waymark.N1 + (icon - 1))] is var alt2 && alt2 != null) + if (WorldState.Waymarks[(Waymark)((int)Waymark.N1 + (icon - 1))] is var alt2 && alt2 != null) yield return new(alt2.Value.XZ()); } break; @@ -131,21 +126,21 @@ private IEnumerable PositionHints(BossModule module, int slot) switch (icon) { case 1: // circle - both on DPS, show both E and W and let players adjust - yield return module.Bounds.Center + offset; - yield return module.Bounds.Center - offset; + yield return Module.Bounds.Center + offset; + yield return Module.Bounds.Center - offset; break; case 2: // triangle - healer SE, dps NW case 3: // cross - healer S, tank N - if (module.Raid[slot]?.Role == Role.Healer) - yield return module.Bounds.Center + offset; + if (Raid[slot]?.Role == Role.Healer) + yield return Module.Bounds.Center + offset; else - yield return module.Bounds.Center - offset; + yield return Module.Bounds.Center - offset; break; case 4: // square - tank NE, dps SW - if (module.Raid[slot]?.Role == Role.Tank) - yield return module.Bounds.Center - offset; + if (Raid[slot]?.Role == Role.Tank) + yield return Module.Bounds.Center - offset; else - yield return module.Bounds.Center + offset; + yield return Module.Bounds.Center + offset; break; } } diff --git a/BossMod/Modules/Endwalker/Ultimate/DSW1/HyperdimensionalSlash.cs b/BossMod/Modules/Endwalker/Ultimate/DSW1/HyperdimensionalSlash.cs index ef546480d0..ca555fe5aa 100644 --- a/BossMod/Modules/Endwalker/Ultimate/DSW1/HyperdimensionalSlash.cs +++ b/BossMod/Modules/Endwalker/Ultimate/DSW1/HyperdimensionalSlash.cs @@ -1,6 +1,6 @@ namespace BossMod.Endwalker.Ultimate.DSW1; -class HyperdimensionalSlash : BossComponent +class HyperdimensionalSlash(BossModule module) : BossComponent(module) { public int NumCasts { get; private set; } private BitMask _laserTargets; @@ -12,13 +12,13 @@ class HyperdimensionalSlash : BossComponent private static readonly AOEShapeRect _aoeLaser = new(70, 4); private static readonly AOEShapeCone _aoeCone = new(40, 60.Degrees()); - public override void Update(BossModule module) + public override void Update() { _tears.Clear(); - foreach (var tear in module.Enemies(OID.AetherialTear)) + foreach (var tear in Module.Enemies(OID.AetherialTear)) _tears.Add((tear.Position, null)); - foreach (var target in module.Raid.WithSlot(true).IncludedInMask(_laserTargets).Actors()) - _tears.Add((TearPosition(module, target), target)); + foreach (var target in Raid.WithSlot(true).IncludedInMask(_laserTargets).Actors()) + _tears.Add((TearPosition(target), target)); _riskyTears.Reset(); for (int i = 0; i < _tears.Count; ++i) @@ -34,11 +34,11 @@ public override void Update(BossModule module) } // TODO: proper targeting (seems to be predefined, charibert's target for first?..) - var coneTarget = module.Raid.WithSlot().ExcludedFromMask(_laserTargets).Actors().Closest(module.Bounds.Center); - _coneDir = coneTarget != null ? Angle.FromDirection(coneTarget.Position - module.Bounds.Center) : 0.Degrees(); + var coneTarget = Raid.WithSlot().ExcludedFromMask(_laserTargets).Actors().Closest(Module.Bounds.Center); + _coneDir = coneTarget != null ? Angle.FromDirection(coneTarget.Position - Module.Bounds.Center) : 0.Degrees(); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_laserTargets.None()) return; @@ -57,37 +57,37 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint // make sure actor is not clipped by any lasers var otherLasers = _laserTargets; otherLasers.Clear(slot); - if (module.Raid.WithSlot().IncludedInMask(otherLasers).WhereActor(target => _aoeLaser.Check(actor.Position, module.Bounds.Center, Angle.FromDirection(target.Position - module.Bounds.Center))).Any()) + if (Raid.WithSlot().IncludedInMask(otherLasers).WhereActor(target => _aoeLaser.Check(actor.Position, Module.Bounds.Center, Angle.FromDirection(target.Position - Module.Bounds.Center))).Any()) hints.Add("GTFO from laser aoe!"); // make sure actor is either not hit by cone (if is target of a laser) or is hit by a cone (otherwise) - bool hitByCone = _aoeCone.Check(actor.Position, module.Bounds.Center, _coneDir); + bool hitByCone = _aoeCone.Check(actor.Position, Module.Bounds.Center, _coneDir); if (tearIndex >= 0 && hitByCone) hints.Add("GTFO from cone aoe!"); else if (tearIndex < 0 && !hitByCone) hints.Add("Stack with others!"); } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { if (_laserTargets.None()) return; - foreach (var t in module.Raid.WithSlot().IncludedInMask(_laserTargets).Actors()) - _aoeLaser.Draw(arena, module.Bounds.Center, Angle.FromDirection(t.Position - module.Bounds.Center)); - _aoeCone.Draw(arena, module.Bounds.Center, _coneDir); + foreach (var t in Raid.WithSlot().IncludedInMask(_laserTargets).Actors()) + _aoeLaser.Draw(Arena, Module.Bounds.Center, Angle.FromDirection(t.Position - Module.Bounds.Center)); + _aoeCone.Draw(Arena, Module.Bounds.Center, _coneDir); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { for (int i = 0; i < _tears.Count; ++i) - arena.AddCircle(_tears[i].Pos, _linkRadius, _riskyTears[i] ? ArenaColor.Danger : ArenaColor.Safe); + Arena.AddCircle(_tears[i].Pos, _linkRadius, _riskyTears[i] ? ArenaColor.Danger : ArenaColor.Safe); if (_laserTargets[pcSlot]) - arena.AddLine(module.Bounds.Center, TearPosition(module, pc), ArenaColor.Danger); + Arena.AddLine(Module.Bounds.Center, TearPosition(pc), ArenaColor.Danger); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.HyperdimensionalSlashAOERest) { @@ -96,16 +96,13 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if ((IconID)iconID == IconID.HyperdimensionalSlash) { - _laserTargets.Set(module.Raid.FindSlot(actor.InstanceID)); + _laserTargets.Set(Raid.FindSlot(actor.InstanceID)); } } - private WPos TearPosition(BossModule module, Actor target) - { - return module.Bounds.ClampToBounds(module.Bounds.Center + 50 * (target.Position - module.Bounds.Center).Normalized()); - } + private WPos TearPosition(Actor target) => Module.Bounds.ClampToBounds(Module.Bounds.Center + 50 * (target.Position - Module.Bounds.Center).Normalized()); } diff --git a/BossMod/Modules/Endwalker/Ultimate/DSW1/PureOfHeart.cs b/BossMod/Modules/Endwalker/Ultimate/DSW1/PureOfHeart.cs index 5025ae2bc8..ceb9cacb4d 100644 --- a/BossMod/Modules/Endwalker/Ultimate/DSW1/PureOfHeart.cs +++ b/BossMod/Modules/Endwalker/Ultimate/DSW1/PureOfHeart.cs @@ -1,66 +1,63 @@ namespace BossMod.Endwalker.Ultimate.DSW1; -class PureOfHeartBrightwing : Components.GenericBaitAway +class PureOfHeartBrightwing(BossModule module) : Components.GenericBaitAway(module) { private static readonly AOEShapeCone _shape = new(18, 15.Degrees()); // TODO: verify angle - public override void Update(BossModule module) + public override void Update() { CurrentBaits.Clear(); if (NumCasts < 8) - foreach (var source in module.Enemies(OID.SerCharibert)) - foreach (var target in module.Raid.WithoutSlot().SortedByRange(source.Position).Take(2)) + foreach (var source in Module.Enemies(OID.SerCharibert)) + foreach (var target in Raid.WithoutSlot().SortedByRange(source.Position).Take(2)) CurrentBaits.Add(new(source, target, _shape)); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.Brightwing) { ++NumCasts; foreach (var t in spell.Targets) - ForbiddenPlayers.Set(module.Raid.FindSlot(t.ID)); + ForbiddenPlayers.Set(Raid.FindSlot(t.ID)); } } } -class PureOfHeartSkyblindBait : BossComponent +class PureOfHeartSkyblindBait(BossModule module) : BossComponent(module) { private BitMask _baiters; private static readonly float _radius = 3; - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { - if (_baiters[slot] && module.Raid.WithSlot().ExcludedFromMask(_baiters).InRadius(actor.Position, _radius).Any()) + if (_baiters[slot] && Raid.WithSlot().ExcludedFromMask(_baiters).InRadius(actor.Position, _radius).Any()) hints.Add("GTFO from raid!"); } - public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) + public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) { return _baiters[playerSlot] ? PlayerPriority.Danger : PlayerPriority.Normal; } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - foreach (var (_, player) in module.Raid.WithSlot().IncludedInMask(_baiters)) - arena.AddCircle(player.Position, _radius, ArenaColor.Danger); + foreach (var (_, player) in Raid.WithSlot().IncludedInMask(_baiters)) + Arena.AddCircle(player.Position, _radius, ArenaColor.Danger); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Skyblind) - _baiters.Set(module.Raid.FindSlot(actor.InstanceID)); + _baiters.Set(Raid.FindSlot(actor.InstanceID)); } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Skyblind) - _baiters.Clear(module.Raid.FindSlot(actor.InstanceID)); + _baiters.Clear(Raid.FindSlot(actor.InstanceID)); } } -class PureOfHeartSkyblind : Components.LocationTargetedAOEs -{ - public PureOfHeartSkyblind() : base(ActionID.MakeSpell(AID.Skyblind), 3) { } -} +class PureOfHeartSkyblind(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Skyblind), 3); diff --git a/BossMod/Modules/Endwalker/Ultimate/DSW1/ShiningBlade.cs b/BossMod/Modules/Endwalker/Ultimate/DSW1/ShiningBlade.cs index c0d60e3b38..f5c5af986c 100644 --- a/BossMod/Modules/Endwalker/Ultimate/DSW1/ShiningBlade.cs +++ b/BossMod/Modules/Endwalker/Ultimate/DSW1/ShiningBlade.cs @@ -3,43 +3,41 @@ class ShiningBladeKnockback : Components.KnockbackFromCastTarget { private WDir _dirToAdelphel; // we don't want to be knocked near adelphel - private IReadOnlyList _tears = ActorEnumeration.EmptyList; // we don't want to be knocked into them + private IReadOnlyList _tears; // we don't want to be knocked into them private static readonly float _tearRadius = 9; // TODO: verify - public ShiningBladeKnockback() : base(ActionID.MakeSpell(AID.FaithUnmoving), 16) { } - - public override void Init(BossModule module) + public ShiningBladeKnockback(BossModule module) : base(module, ActionID.MakeSpell(AID.FaithUnmoving), 16) { var adelphel = module.Enemies(OID.SerAdelphel).FirstOrDefault(); if (adelphel != null) - _dirToAdelphel = adelphel.Position - module.Bounds.Center; + _dirToAdelphel = adelphel.Position - Module.Bounds.Center; _tears = module.Enemies(OID.AetherialTear); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { - foreach (var e in CalculateMovements(module, slot, actor)) + foreach (var e in CalculateMovements(slot, actor)) { - if (!module.Bounds.Contains(e.to)) + if (!Module.Bounds.Contains(e.to)) hints.Add("About to be knocked into wall!"); if (_tears.InRadius(e.to, _tearRadius).Any()) hints.Add("About to be knocked into tear!"); - if (_dirToAdelphel.Dot(e.to - module.Bounds.Center) > 0) + if (_dirToAdelphel.Dot(e.to - Module.Bounds.Center) > 0) hints.Add("Aim away from boss!"); } } // TODO: consider moving that to a separate component? - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { foreach (var p in _tears) - arena.ZoneCircle(p.Position, _tearRadius, ArenaColor.AOE); + Arena.ZoneCircle(p.Position, _tearRadius, ArenaColor.AOE); } } -class ShiningBladeFlares : Components.GenericAOEs +class ShiningBladeFlares(BossModule module) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.BrightFlare), "GTFO from explosion!") { private List _flares = new(); // [0] = initial boss offset from center, [2] = first charge offset, [5] = second charge offset, [7] = third charge offset, [10] = fourth charge offset == [0] @@ -47,32 +45,30 @@ class ShiningBladeFlares : Components.GenericAOEs public bool Done => NumCasts >= _flares.Count; - public ShiningBladeFlares() : base(ActionID.MakeSpell(AID.BrightFlare), "GTFO from explosion!") { } - - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { - return _flares.Skip(NumCasts).Take(7).Select(f => new AOEInstance(_shape, module.Bounds.Center + f)); // TODO: activation + return _flares.Skip(NumCasts).Take(7).Select(f => new AOEInstance(_shape, Module.Bounds.Center + f)); // TODO: activation } - public override void OnActorPlayActionTimelineEvent(BossModule module, Actor actor, ushort id) + public override void OnActorPlayActionTimelineEvent(Actor actor, ushort id) { if ((OID)actor.OID != OID.SerAdelphel || id != 0x1E43 || _flares.Count > 0) return; // add first flare at boss position; we can't determine direction yet - var bossOffset = actor.Position - module.Bounds.Center; - if (!Utils.AlmostEqual(bossOffset.LengthSq(), module.Bounds.HalfSize * module.Bounds.HalfSize, 1)) - module.ReportError(this, "Unexpected boss position"); + var bossOffset = actor.Position - Module.Bounds.Center; + if (!Utils.AlmostEqual(bossOffset.LengthSq(), Module.Bounds.HalfSize * Module.Bounds.HalfSize, 1)) + ReportError("Unexpected boss position"); _flares.Add(bossOffset); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { - base.OnEventCast(module, caster, spell); + base.OnEventCast(caster, spell); if ((AID)spell.Action.ID == AID.ShiningBlade && _flares.Count <= 1) { - var startOffset = caster.Position - module.Bounds.Center; - var endOffset = spell.TargetXZ - module.Bounds.Center; + var startOffset = caster.Position - Module.Bounds.Center; + var endOffset = spell.TargetXZ - Module.Bounds.Center; _flares.Clear(); _flares.Add(startOffset); AddShortFlares(startOffset, endOffset); @@ -97,19 +93,17 @@ private void AddLongFlares(WDir startOffset, WDir endOffset) } } -class ShiningBladeExecution : Components.CastCounter +class ShiningBladeExecution(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.Execution)) { private Actor? _target; private static readonly float _executionRadius = 5; - public ShiningBladeExecution() : base(ActionID.MakeSpell(AID.Execution)) { } - - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_target == actor) { - if (module.Raid.WithoutSlot().InRadiusExcluding(_target, _executionRadius).Any()) + if (Raid.WithoutSlot().InRadiusExcluding(_target, _executionRadius).Any()) hints.Add("GTFO from raid!"); } else if (_target != null) @@ -119,23 +113,23 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } } - public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) + public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) { return player == _target ? PlayerPriority.Danger : PlayerPriority.Irrelevant; } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (_target != null) - arena.AddCircle(_target.Position, _executionRadius, ArenaColor.Danger); + Arena.AddCircle(_target.Position, _executionRadius, ArenaColor.Danger); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { case AID.ShiningBlade: - _target = module.WorldState.Actors.Find(module.Enemies(OID.SerAdelphel).FirstOrDefault()?.TargetID ?? 0); + _target = WorldState.Actors.Find(Module.Enemies(OID.SerAdelphel).FirstOrDefault()?.TargetID ?? 0); break; case AID.Execution: _target = null; diff --git a/BossMod/Modules/Endwalker/Ultimate/DSW2/DSW2.cs b/BossMod/Modules/Endwalker/Ultimate/DSW2/DSW2.cs index 0b3ddd6145..753b63571c 100644 --- a/BossMod/Modules/Endwalker/Ultimate/DSW2/DSW2.cs +++ b/BossMod/Modules/Endwalker/Ultimate/DSW2/DSW2.cs @@ -1,82 +1,23 @@ namespace BossMod.Endwalker.Ultimate.DSW2; -class P2AscalonsMercyConcealed : Components.SelfTargetedAOEs -{ - public P2AscalonsMercyConcealed() : base(ActionID.MakeSpell(AID.AscalonsMercyConcealedAOE), new AOEShapeCone(50, 15.Degrees())) { } -} - -class P2AscalonMight : Components.Cleave -{ - public P2AscalonMight() : base(ActionID.MakeSpell(AID.AscalonsMight), new AOEShapeCone(50, 30.Degrees()), (uint)OID.BossP2) { } -} - -class P2UltimateEnd : Components.CastCounter -{ - public P2UltimateEnd() : base(ActionID.MakeSpell(AID.UltimateEndAOE)) { } -} - -class P3Drachenlance : Components.SelfTargetedAOEs -{ - public P3Drachenlance() : base(ActionID.MakeSpell(AID.DrachenlanceAOE), new AOEShapeCone(13, 45.Degrees())) { } -} - -class P3SoulTether : Components.TankbusterTether -{ - public P3SoulTether() : base(ActionID.MakeSpell(AID.SoulTether), (uint)TetherID.HolyShieldBash, 5) { } -} - -class P4Resentment : Components.CastCounter -{ - public P4Resentment() : base(ActionID.MakeSpell(AID.Resentment)) { } -} - -class P5TwistingDive : Components.SelfTargetedAOEs -{ - public P5TwistingDive() : base(ActionID.MakeSpell(AID.TwistingDive), new AOEShapeRect(60, 5)) { } -} - -class P5Cauterize1 : Components.SelfTargetedAOEs -{ - public P5Cauterize1() : base(ActionID.MakeSpell(AID.Cauterize1), new AOEShapeRect(48, 10)) { } -} - -class P5Cauterize2 : Components.SelfTargetedAOEs -{ - public P5Cauterize2() : base(ActionID.MakeSpell(AID.Cauterize2), new AOEShapeRect(48, 10)) { } -} - -class P5SpearOfTheFury : Components.SelfTargetedAOEs -{ - public P5SpearOfTheFury() : base(ActionID.MakeSpell(AID.SpearOfTheFuryP5), new AOEShapeRect(50, 5)) { } -} - -class P5AscalonMight : Components.Cleave -{ - public P5AscalonMight() : base(ActionID.MakeSpell(AID.AscalonsMight), new AOEShapeCone(50, 30.Degrees()), (uint)OID.BossP5) { } -} - -class P5Surrender : Components.CastCounter -{ - public P5Surrender() : base(ActionID.MakeSpell(AID.Surrender)) { } -} - -class P6SwirlingBlizzard : Components.SelfTargetedAOEs -{ - public P6SwirlingBlizzard() : base(ActionID.MakeSpell(AID.SwirlingBlizzard), new AOEShapeDonut(20, 35)) { } -} - -class P7Shockwave : Components.CastCounter -{ - public P7Shockwave() : base(ActionID.MakeSpell(AID.ShockwaveP7)) { } -} - -class P7AlternativeEnd : Components.CastCounter -{ - public P7AlternativeEnd() : base(ActionID.MakeSpell(AID.AlternativeEnd)) { } -} +class P2AscalonsMercyConcealed(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.AscalonsMercyConcealedAOE), new AOEShapeCone(50, 15.Degrees())); +class P2AscalonMight(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.AscalonsMight), new AOEShapeCone(50, 30.Degrees()), (uint)OID.BossP2); +class P2UltimateEnd(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.UltimateEndAOE)); +class P3Drachenlance(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.DrachenlanceAOE), new AOEShapeCone(13, 45.Degrees())); +class P3SoulTether(BossModule module) : Components.TankbusterTether(module, ActionID.MakeSpell(AID.SoulTether), (uint)TetherID.HolyShieldBash, 5); +class P4Resentment(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.Resentment)); +class P5TwistingDive(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TwistingDive), new AOEShapeRect(60, 5)); +class P5Cauterize1(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Cauterize1), new AOEShapeRect(48, 10)); +class P5Cauterize2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Cauterize2), new AOEShapeRect(48, 10)); +class P5SpearOfTheFury(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.SpearOfTheFuryP5), new AOEShapeRect(50, 5)); +class P5AscalonMight(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.AscalonsMight), new AOEShapeCone(50, 30.Degrees()), (uint)OID.BossP5); +class P5Surrender(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.Surrender)); +class P6SwirlingBlizzard(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.SwirlingBlizzard), new AOEShapeDonut(20, 35)); +class P7Shockwave(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.ShockwaveP7)); +class P7AlternativeEnd(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.AlternativeEnd)); [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.BossP2, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 788)] -public class DSW2 : BossModule +public class DSW2(WorldState ws, Actor primary) : BossModule(ws, primary, BoundsCircle) { public static ArenaBoundsCircle BoundsCircle = new ArenaBoundsCircle(new (100, 100), 21); // p2, intermission public static ArenaBoundsSquare BoundsSquare = new ArenaBoundsSquare(new (100, 100), 21); // p3, p4 @@ -105,8 +46,6 @@ public class DSW2 : BossModule public Actor? HraesvelgrP6() => _hraesvelgrP6; public Actor? BossP7() => _bossP7; - public DSW2(WorldState ws, Actor primary) : base(ws, primary, BoundsCircle) { } - protected override void UpdateModule() { // TODO: this is an ugly hack, think how multi-actor fights can be implemented without it... @@ -137,18 +76,5 @@ protected override void DrawEnemies(int pcSlot, Actor pc) Arena.Actor(_nidhoggP6, ArenaColor.Enemy); Arena.Actor(_hraesvelgrP6, ArenaColor.Enemy); Arena.Actor(_bossP7, ArenaColor.Enemy); - //Arena.Actor(Enemies(OID.SerJanlenoux).FirstOrDefault(), 0xffffffff); - //Arena.Actor(Enemies(OID.SerVellguine).FirstOrDefault(), 0xff0000ff); - //Arena.Actor(Enemies(OID.SerPaulecrain).FirstOrDefault(), 0xff00ff00); - //Arena.Actor(Enemies(OID.SerIgnasse).FirstOrDefault(), 0xffff0000); - //Arena.Actor(Enemies(OID.SerHermenost).FirstOrDefault(), 0xff00ffff); - //Arena.Actor(Enemies(OID.SerGuerrique).FirstOrDefault(), 0xffff00ff); - //Arena.Actor(Enemies(OID.SerHaumeric).FirstOrDefault(), 0xffffff00); - //Arena.Actor(Enemies(OID.SerNoudenet).FirstOrDefault(), 0xffffff80); - //Arena.Actor(Enemies(OID.SerZephirin).FirstOrDefault(), 0xff8080ff); - //Arena.Actor(Enemies(OID.SerAdelphel).FirstOrDefault(), 0xff80ff80); - //Arena.Actor(Enemies(OID.SerGrinnaux).FirstOrDefault(), 0xffff8080); - //Arena.Actor(Enemies(OID.SerCharibert).FirstOrDefault(), 0xff80ffff); - //Arena.AddLine(PrimaryActor.Position, PrimaryActor.Position + GeometryUtils.DirectionToVec3(PrimaryActor.Rotation) * 5, ArenaColor.Enemy); } } diff --git a/BossMod/Modules/Endwalker/Ultimate/DSW2/DSW2Config.cs b/BossMod/Modules/Endwalker/Ultimate/DSW2/DSW2Config.cs index 7bfa29f312..1e2c5dd104 100644 --- a/BossMod/Modules/Endwalker/Ultimate/DSW2/DSW2Config.cs +++ b/BossMod/Modules/Endwalker/Ultimate/DSW2/DSW2Config.cs @@ -1,12 +1,12 @@ namespace BossMod.Endwalker.Ultimate.DSW2; [ConfigDisplay(Order = 0x201, Parent = typeof(EndwalkerConfig))] -public class DSW2Config : CooldownPlanningConfigNode +public class DSW2Config() : CooldownPlanningConfigNode(90) { [PropertyDisplay("P2 Sanctity of the Ward (charges): group assignments")] - [GroupDetails(new string[] { "West/Across", "East/Behind" })] - [GroupPreset("Default light parties", new[] { 0, 1, 0, 1, 0, 1, 0, 1 })] - [GroupPreset("Inverted light parties", new[] { 1, 0, 1, 0, 1, 0, 1, 0 })] + [GroupDetails(["West/Across", "East/Behind"])] + [GroupPreset("Default light parties", [0, 1, 0, 1, 0, 1, 0, 1])] + [GroupPreset("Inverted light parties", [1, 0, 1, 0, 1, 0, 1, 0])] public GroupAssignmentLightParties P2SanctityGroups = GroupAssignmentLightParties.DefaultLightParties(); [PropertyDisplay("P2 Sanctity of the Ward (charges): groups relative to DRK (across/behind) rather than absolute (west/east)")] @@ -16,9 +16,9 @@ public class DSW2Config : CooldownPlanningConfigNode public Role P2SanctitySwapRole; [PropertyDisplay("P2 Sanctity of the Ward (meteors): pair assignments")] - [GroupDetails(new string[] { "North", "East", "South", "West" })] - [GroupPreset("MT/R1 N, OT/R2 S, H1/M1 E, H2/M2 W", new[] { 0, 2, 1, 3, 1, 3, 0, 2 })] - [GroupPreset("MT/R1 N, OT/R2 S, H1/M1 W, H2/M2 E", new[] { 0, 2, 3, 1, 3, 1, 0, 2 })] + [GroupDetails(["North", "East", "South", "West"])] + [GroupPreset("MT/R1 N, OT/R2 S, H1/M1 E, H2/M2 W", [0, 2, 1, 3, 1, 3, 0, 2])] + [GroupPreset("MT/R1 N, OT/R2 S, H1/M1 W, H2/M2 E", [0, 2, 3, 1, 3, 1, 0, 2])] public GroupAssignmentDDSupportPairs P2Sanctity2Pairs = GroupAssignmentDDSupportPairs.DefaultOneMeleePerPair(); public enum P2PreyCardinals @@ -108,9 +108,9 @@ public enum P2InnerTowers public bool P3DiveFromGraceLookWest = false; [PropertyDisplay("P3 enumeration towers: assignments")] - [GroupDetails(new string[] { "NW Flex", "NE Flex", "SE Flex", "SW Flex", "NW Stay", "NE Stay", "SE Stay", "SW Stay" })] - [GroupPreset("LPDU", new[] { 1, 3, 6, 0, 2, 4, 5, 7 })] - [GroupPreset("LPDU but CCW", new[] { 0, 2, 5, 7, 1, 3, 4, 6 })] + [GroupDetails(["NW Flex", "NE Flex", "SE Flex", "SW Flex", "NW Stay", "NE Stay", "SE Stay", "SW Stay"])] + [GroupPreset("LPDU", [1, 3, 6, 0, 2, 4, 5, 7])] + [GroupPreset("LPDU but CCW", [0, 2, 5, 7, 1, 3, 4, 6])] public GroupAssignmentUnique P3DarkdragonDiveCounterGroups = GroupAssignmentUnique.Default(); [PropertyDisplay("P3 enumeration towers: prefer flexing to CCW tower (rather than to CW)")] @@ -130,6 +130,4 @@ public enum P6MortalVow [PropertyDisplay("P6 Mortal Vow pass order")] public P6MortalVow P6MortalVowOrder = P6MortalVow.None; - - public DSW2Config() : base(90) { } } diff --git a/BossMod/Modules/Endwalker/Ultimate/DSW2/DSW2States.cs b/BossMod/Modules/Endwalker/Ultimate/DSW2/DSW2States.cs index eb690c1814..7ed8bbc5d3 100644 --- a/BossMod/Modules/Endwalker/Ultimate/DSW2/DSW2States.cs +++ b/BossMod/Modules/Endwalker/Ultimate/DSW2/DSW2States.cs @@ -4,10 +4,10 @@ class DSW2States : StateMachineBuilder { private DSW2 _module; - private bool IsReset => _module.PrimaryActor.IsDestroyed && (_module.ArenaFeatures?.IsDestroyed ?? true); + private bool IsReset => Module.PrimaryActor.IsDestroyed && (_module.ArenaFeatures?.IsDestroyed ?? true); private bool IsResetOrRewindFailed => IsReset || Module.Enemies(OID.BossP2).Any(); - private bool IsDead(Actor? actor) => actor != null && (actor.IsDestroyed || actor.IsDead); - private bool IsEffectivelyDead(Actor? actor) => actor != null && (actor.IsDestroyed || actor.IsDead || !actor.IsTargetable && actor.HP.Cur <= 1); + private bool IsDead(Actor? actor) => actor != null && actor.IsDeadOrDestroyed; + private bool IsEffectivelyDead(Actor? actor) => actor != null && (actor.IsDeadOrDestroyed || !actor.IsTargetable && actor.HP.Cur <= 1); public DSW2States(DSW2 module) : base(module) { diff --git a/BossMod/Modules/Endwalker/Ultimate/DSW2/DragonsGaze.cs b/BossMod/Modules/Endwalker/Ultimate/DSW2/DragonsGaze.cs index f1fcd0e421..f74ed22456 100644 --- a/BossMod/Modules/Endwalker/Ultimate/DSW2/DragonsGaze.cs +++ b/BossMod/Modules/Endwalker/Ultimate/DSW2/DragonsGaze.cs @@ -1,21 +1,16 @@ namespace BossMod.Endwalker.Ultimate.DSW2; // used by two trio mechanics, in p2 and in p5 -class DragonsGaze : Components.GenericGaze +class DragonsGaze(BossModule module, OID bossOID) : Components.GenericGaze(module, ActionID.MakeSpell(AID.DragonsGazeAOE)) { public bool EnableHints; - private OID _bossOID; + private OID _bossOID = bossOID; private Actor? _boss; private WPos _eyePosition; public bool Active => _boss != null; - public DragonsGaze(OID bossOID) : base(ActionID.MakeSpell(AID.DragonsGazeAOE)) - { - _bossOID = bossOID; - } - - public override IEnumerable ActiveEyes(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveEyes(int slot, Actor actor) { // TODO: activation time if (_boss != null && NumCasts == 0) @@ -25,13 +20,13 @@ public override IEnumerable ActiveEyes(BossModule module, int slot, Actor a } } - public override void OnEventEnvControl(BossModule module, byte index, uint state) + public override void OnEventEnvControl(byte index, uint state) { // seen indices: 2 = E, 5 = SW, 6 = W => inferring 0=N, 1=NE, ... cw order if (state == 0x00020001 && index <= 7) { - _boss = module.Enemies(_bossOID).FirstOrDefault(); - _eyePosition = module.Bounds.Center + 40 * (180 - index * 45).Degrees().ToDirection(); + _boss = Module.Enemies(_bossOID).FirstOrDefault(); + _eyePosition = Module.Bounds.Center + 40 * (180 - index * 45).Degrees().ToDirection(); } } } diff --git a/BossMod/Modules/Endwalker/Ultimate/DSW2/HeavyImpact.cs b/BossMod/Modules/Endwalker/Ultimate/DSW2/HeavyImpact.cs index dc728f0bd1..291159294f 100644 --- a/BossMod/Modules/Endwalker/Ultimate/DSW2/HeavyImpact.cs +++ b/BossMod/Modules/Endwalker/Ultimate/DSW2/HeavyImpact.cs @@ -1,38 +1,33 @@ namespace BossMod.Endwalker.Ultimate.DSW2; // used by two trio mechanics, in p2 and in p5 -class HeavyImpact : Components.GenericAOEs +class HeavyImpact(BossModule module, float activationDelay) : Components.GenericAOEs(module) { private AOEInstance? _aoe; - private float _activationDelay; + private float _activationDelay = activationDelay; private static readonly float _impactRadiusIncrement = 6; public bool Active => _aoe != null; - public HeavyImpact(float activationDelay) - { - _activationDelay = activationDelay; - } - - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => Utils.ZeroOrOne(_aoe); + public override IEnumerable ActiveAOEs(int slot, Actor actor) => Utils.ZeroOrOne(_aoe); - public override void OnActorPlayActionTimelineEvent(BossModule module, Actor actor, ushort id) + public override void OnActorPlayActionTimelineEvent(Actor actor, ushort id) { if (id == 0x1E43 && (OID)actor.OID == OID.SerGuerrique) { - _aoe = new(new AOEShapeCircle(_impactRadiusIncrement), actor.Position, default, module.WorldState.CurrentTime.AddSeconds(_activationDelay)); + _aoe = new(new AOEShapeCircle(_impactRadiusIncrement), actor.Position, default, WorldState.FutureTime(_activationDelay)); } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.HeavyImpactHit1 or AID.HeavyImpactHit2 or AID.HeavyImpactHit3 or AID.HeavyImpactHit4 or AID.HeavyImpactHit5) { if (++NumCasts < 5) { var inner = _impactRadiusIncrement * NumCasts; - _aoe = new(new AOEShapeDonut(inner, inner + _impactRadiusIncrement), caster.Position, default, module.WorldState.CurrentTime.AddSeconds(1.9f)); + _aoe = new(new AOEShapeDonut(inner, inner + _impactRadiusIncrement), caster.Position, default, WorldState.FutureTime(1.9f)); } else { diff --git a/BossMod/Modules/Endwalker/Ultimate/DSW2/P2BroadSwing.cs b/BossMod/Modules/Endwalker/Ultimate/DSW2/P2BroadSwing.cs index 18232504fd..64493c2c64 100644 --- a/BossMod/Modules/Endwalker/Ultimate/DSW2/P2BroadSwing.cs +++ b/BossMod/Modules/Endwalker/Ultimate/DSW2/P2BroadSwing.cs @@ -1,16 +1,14 @@ namespace BossMod.Endwalker.Ultimate.DSW2; -class P2BroadSwing : Components.GenericAOEs +class P2BroadSwing(BossModule module) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.BroadSwingAOE)) { private List _aoes = new(); private static readonly AOEShapeCone _aoe = new(40, 60.Degrees()); - public P2BroadSwing() : base(ActionID.MakeSpell(AID.BroadSwingAOE)) { } + public override IEnumerable ActiveAOEs(int slot, Actor actor) => _aoes.Take(2); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => _aoes.Take(2); - - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { var rot = (AID)spell.Action.ID switch { @@ -26,7 +24,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if (spell.Action == WatchedAction) { diff --git a/BossMod/Modules/Endwalker/Ultimate/DSW2/P2Discomposed.cs b/BossMod/Modules/Endwalker/Ultimate/DSW2/P2Discomposed.cs index 3eac6b1357..dd4f54cf07 100644 --- a/BossMod/Modules/Endwalker/Ultimate/DSW2/P2Discomposed.cs +++ b/BossMod/Modules/Endwalker/Ultimate/DSW2/P2Discomposed.cs @@ -1,10 +1,10 @@ namespace BossMod.Endwalker.Ultimate.DSW2; -class P2Discomposed : BossComponent +class P2Discomposed(BossModule module) : BossComponent(module) { public bool Applied { get; private set; } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Discomposed) Applied = true; diff --git a/BossMod/Modules/Endwalker/Ultimate/DSW2/P2SanctityOfTheWard1.cs b/BossMod/Modules/Endwalker/Ultimate/DSW2/P2SanctityOfTheWard1.cs index 01a5e23a8f..e3c6ea5138 100644 --- a/BossMod/Modules/Endwalker/Ultimate/DSW2/P2SanctityOfTheWard1.cs +++ b/BossMod/Modules/Endwalker/Ultimate/DSW2/P2SanctityOfTheWard1.cs @@ -2,7 +2,7 @@ class P2SanctityOfTheWard1Gaze : DragonsGaze { - public P2SanctityOfTheWard1Gaze() : base(OID.BossP2) + public P2SanctityOfTheWard1Gaze(BossModule module) : base(module, OID.BossP2) { EnableHints = true; } @@ -14,31 +14,29 @@ class P2SanctityOfTheWard1Sever : Components.UniformStackSpread public int NumCasts { get; private set; } public Actor? Source { get; private set; } - public P2SanctityOfTheWard1Sever() : base(6, 0, 4) { } - - public override void Init(BossModule module) + public P2SanctityOfTheWard1Sever(BossModule module) : base(module, 6, 0, 4) { Source = module.Enemies(OID.SerZephirin).FirstOrDefault(); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - base.DrawArenaForeground(module, pcSlot, pc, arena); + base.DrawArenaForeground(pcSlot, pc); if (Stacks.Count == 2 && Source != null) { - arena.Actor(Source, ArenaColor.Enemy, true); - arena.AddLine(Source.Position, Stacks[NumCasts % 2].Target.Position, ArenaColor.Danger); + Arena.Actor(Source, ArenaColor.Enemy, true); + Arena.AddLine(Source.Position, Stacks[NumCasts % 2].Target.Position, ArenaColor.Danger); } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.SacredSever && ++NumCasts >= 4) Stacks.Clear(); } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { switch ((IconID)iconID) { @@ -53,7 +51,7 @@ public override void OnEventIcon(BossModule module, Actor actor, uint iconID) } // shining blade (charges that leave orbs) + flares (their explosions) -class P2SanctityOfTheWard1Flares : Components.GenericAOEs +class P2SanctityOfTheWard1Flares(BossModule module) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.BrightFlare), "GTFO from charges and spheres!") { public class ChargeInfo { @@ -73,9 +71,7 @@ public ChargeInfo(Actor source) private static readonly float _chargeHalfWidth = 3; private static readonly AOEShapeCircle _brightflareShape = new(9); - public P2SanctityOfTheWard1Flares() : base(ActionID.MakeSpell(AID.BrightFlare), "GTFO from charges and spheres!") { } - - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { foreach (var c in Charges) { @@ -86,12 +82,12 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, } } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - arena.Actors(Charges.Where(c => c.ChargeAOEs.Count > 0).Select(c => c.Source), ArenaColor.Enemy, true); + Arena.Actors(Charges.Where(c => c.ChargeAOEs.Count > 0).Select(c => c.Source), ArenaColor.Enemy, true); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { @@ -109,44 +105,44 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } // note: currently we initialize charges when we get sever icons, but we should be able to do that a bit earlier: PATE 1E43 happens ~1.1s before icons - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID != (uint)IconID.SacredSever1) return; - var a1 = BuildChargeInfo(module, OID.SerAdelphel); - var a2 = BuildChargeInfo(module, OID.SerJanlenoux); + var a1 = BuildChargeInfo(OID.SerAdelphel); + var a2 = BuildChargeInfo(OID.SerJanlenoux); if (Charges.Count == 2 && a1 == a2) { ChargeAngle = a1; } else { - module.ReportError(this, "Failed to initialize charges"); + ReportError("Failed to initialize charges"); } } // returns angle between successive charges (>0 if CCW, <0 if CW, 0 on failure) - private Angle BuildChargeInfo(BossModule module, OID oid) + private Angle BuildChargeInfo(OID oid) { - var actor = module.Enemies(oid).FirstOrDefault(); + var actor = Module.Enemies(oid).FirstOrDefault(); if (actor == null) return default; // so far I've only seen both enemies starting at (+-5, 0) - if (!Utils.AlmostEqual(actor.Position.Z, module.Bounds.Center.Z, 1)) + if (!Utils.AlmostEqual(actor.Position.Z, Module.Bounds.Center.Z, 1)) return default; - if (!Utils.AlmostEqual(MathF.Abs(actor.Position.X - module.Bounds.Center.X), 5, 1)) + if (!Utils.AlmostEqual(MathF.Abs(actor.Position.X - Module.Bounds.Center.X), 5, 1)) return default; - bool right = actor.Position.X > module.Bounds.Center.X; + bool right = actor.Position.X > Module.Bounds.Center.X; bool facingSouth = Utils.AlmostEqual(actor.Rotation.Rad, 0, 0.1f); bool cw = right == facingSouth; var res = new ChargeInfo(actor); var firstPointDir = actor.Rotation; var angleBetweenPoints = (cw ? -1 : 1) * 112.5f.Degrees(); - Func posAt = dir => module.Bounds.Center + 21 * dir.ToDirection(); + Func posAt = dir => Module.Bounds.Center + 21 * dir.ToDirection(); var p0 = actor.Position; var p1 = posAt(firstPointDir); var p2 = posAt(firstPointDir + angleBetweenPoints); @@ -183,21 +179,21 @@ class P2SanctityOfTheWard1Hints : BossComponent private BitMask _groupEast; // 0 until initialized private string _groupSwapHints = ""; - public override void Init(BossModule module) + public P2SanctityOfTheWard1Hints(BossModule module) : base(module) { _sever = module.FindComponent(); _flares = module.FindComponent(); } - public override void Update(BossModule module) + public override void Update() { if (!_inited && _sever?.Source != null && _sever.Stacks.Count == 2 && _flares != null && _flares.ChargeAngle != default) { _inited = true; - _severStartDir = Angle.FromDirection(_sever.Source.Position - module.Bounds.Center); + _severStartDir = Angle.FromDirection(_sever.Source.Position - Module.Bounds.Center); var config = Service.Config.Get(); - _groupEast = config.P2SanctityGroups.BuildGroupMask(1, module.Raid); + _groupEast = config.P2SanctityGroups.BuildGroupMask(1, Raid); if (_groupEast.None()) { _groupSwapHints = "unconfigured"; @@ -210,20 +206,20 @@ public override void Update(BossModule module) _groupEast.Raw ^= 0xff; } - var effRoles = Service.Config.Get().EffectiveRolePerSlot(module.Raid); + var effRoles = Service.Config.Get().EffectiveRolePerSlot(Raid); if (config.P2SanctitySwapRole == Role.None) { - AssignmentSwapWithRolePartner(module, effRoles, _sever.Stacks[0].Target, _severStartDir.Rad < 0); - AssignmentSwapWithRolePartner(module, effRoles, _sever.Stacks[1].Target, _severStartDir.Rad > 0); + AssignmentSwapWithRolePartner(effRoles, _sever.Stacks[0].Target, _severStartDir.Rad < 0); + AssignmentSwapWithRolePartner(effRoles, _sever.Stacks[1].Target, _severStartDir.Rad > 0); } else { - AssignmentReassignIfNeeded(module, _sever.Stacks[0].Target, _severStartDir.Rad < 0); - AssignmentReassignIfNeeded(module, _sever.Stacks[1].Target, _severStartDir.Rad > 0); + AssignmentReassignIfNeeded(_sever.Stacks[0].Target, _severStartDir.Rad < 0); + AssignmentReassignIfNeeded(_sever.Stacks[1].Target, _severStartDir.Rad > 0); if (_groupEast.NumSetBits() != 4) { // to balance, unmarked player of designated role should swap - var (swapSlot, swapper) = module.Raid.WithSlot(true).FirstOrDefault(sa => sa.Item2 != _sever.Stacks[0].Target && sa.Item2 != _sever.Stacks[1].Target && effRoles[sa.Item1] == config.P2SanctitySwapRole); + var (swapSlot, swapper) = Raid.WithSlot(true).FirstOrDefault(sa => sa.Item2 != _sever.Stacks[0].Target && sa.Item2 != _sever.Stacks[1].Target && effRoles[sa.Item1] == config.P2SanctitySwapRole); if (swapper != null) { _groupEast.Toggle(swapSlot); @@ -246,15 +242,15 @@ public override void Update(BossModule module) } } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddMovementHints(int slot, Actor actor, MovementHints movementHints) { - if (movementHints != null && _groupEast.Any()) + if (_groupEast.Any()) { var from = actor.Position; var color = ArenaColor.Safe; foreach (var safespot in MovementHintOffsets(slot)) { - var to = module.Bounds.Center + safespot; + var to = Module.Bounds.Center + safespot; movementHints.Add(from, to, color); from = to; color = ArenaColor.Danger; @@ -262,17 +258,7 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) - { - foreach (var safespot in MovementHintOffsets(pcSlot).Take(1)) - { - arena.AddCircle(module.Bounds.Center + safespot, 1, ArenaColor.Safe); - if (_groupEast.None()) - arena.AddCircle(module.Bounds.Center - safespot, 1, ArenaColor.Safe); // if there are no valid assignments, draw spots for both groups - } - } - - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (!_inited) return; @@ -282,21 +268,31 @@ public override void AddGlobalHints(BossModule module, GlobalHints hints) hints.Add($"Move: {(_flares.ChargeAngle.Rad < 0 ? "clockwise" : "counterclockwise")} {(_chargeEarly ? "early" : "late")}"); } - private void AssignmentReassignIfNeeded(BossModule module, Actor player, bool shouldGoEast) + public override void DrawArenaForeground(int pcSlot, Actor pc) + { + foreach (var safespot in MovementHintOffsets(pcSlot).Take(1)) + { + Arena.AddCircle(Module.Bounds.Center + safespot, 1, ArenaColor.Safe); + if (_groupEast.None()) + Arena.AddCircle(Module.Bounds.Center - safespot, 1, ArenaColor.Safe); // if there are no valid assignments, draw spots for both groups + } + } + + private void AssignmentReassignIfNeeded(Actor player, bool shouldGoEast) { - int slot = module.Raid.FindSlot(player.InstanceID); + int slot = Raid.FindSlot(player.InstanceID); if (shouldGoEast == _groupEast[slot]) return; // target is already assigned to correct position, no need to swap _groupEast.Toggle(slot); } - private void AssignmentSwapWithRolePartner(BossModule module, Role[] effRoles, Actor player, bool shouldGoEast) + private void AssignmentSwapWithRolePartner(Role[] effRoles, Actor player, bool shouldGoEast) { - int slot = module.Raid.FindSlot(player.InstanceID); + int slot = Raid.FindSlot(player.InstanceID); if (shouldGoEast == _groupEast[slot]) return; // target is already assigned to correct position, no need to swap var role = effRoles[slot]; - var (partnerSlot, partner) = module.Raid.WithSlot(true).Exclude(slot).FirstOrDefault(sa => effRoles[sa.Item1] == role); + var (partnerSlot, partner) = Raid.WithSlot(true).Exclude(slot).FirstOrDefault(sa => effRoles[sa.Item1] == role); if (partner == null) return; diff --git a/BossMod/Modules/Endwalker/Ultimate/DSW2/P2SanctityOfTheWard2.cs b/BossMod/Modules/Endwalker/Ultimate/DSW2/P2SanctityOfTheWard2.cs index 489a7e0cf0..3f6082ce76 100644 --- a/BossMod/Modules/Endwalker/Ultimate/DSW2/P2SanctityOfTheWard2.cs +++ b/BossMod/Modules/Endwalker/Ultimate/DSW2/P2SanctityOfTheWard2.cs @@ -1,47 +1,28 @@ namespace BossMod.Endwalker.Ultimate.DSW2; -class P2SanctityOfTheWard2HeavensStakeCircles : Components.LocationTargetedAOEs -{ - public P2SanctityOfTheWard2HeavensStakeCircles() : base(ActionID.MakeSpell(AID.HeavensStakeAOE), 7) { } -} - -class P2SanctityOfTheWard2HeavensStakeDonut : Components.SelfTargetedAOEs -{ - public P2SanctityOfTheWard2HeavensStakeDonut() : base(ActionID.MakeSpell(AID.HeavensStakeDonut), new AOEShapeDonut(15, 30)) { } -} +class P2SanctityOfTheWard2HeavensStakeCircles(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.HeavensStakeAOE), 7); +class P2SanctityOfTheWard2HeavensStakeDonut(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HeavensStakeDonut), new AOEShapeDonut(15, 30)); +class P2SanctityOfTheWard2VoidzoneFire(BossModule module) : Components.PersistentVoidzone(module, 7, m => m.Enemies(OID.VoidzoneFire).Where(z => z.EventState != 7)); +class P2SanctityOfTheWard2VoidzoneIce(BossModule module) : Components.PersistentVoidzone(module, 7, m => m.Enemies(OID.VoidzoneIce).Where(z => z.EventState != 7)); -class P2SanctityOfTheWard2VoidzoneFire : Components.PersistentVoidzone +class P2SanctityOfTheWard2Knockback(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.FaithUnmoving), 16) { - public P2SanctityOfTheWard2VoidzoneFire() : base(7, m => m.Enemies(OID.VoidzoneFire).Where(z => z.EventState != 7)) { } -} - -class P2SanctityOfTheWard2VoidzoneIce : Components.PersistentVoidzone -{ - public P2SanctityOfTheWard2VoidzoneIce() : base(7, m => m.Enemies(OID.VoidzoneIce).Where(z => z.EventState != 7)) { } -} - -class P2SanctityOfTheWard2Knockback : Components.KnockbackFromCastTarget -{ - public P2SanctityOfTheWard2Knockback() : base(ActionID.MakeSpell(AID.FaithUnmoving), 16) { } - - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { - if (Casters.Count > 0 && !actor.Position.InCircle(module.Bounds.Center, 12)) + if (Casters.Count > 0 && !actor.Position.InCircle(Module.Bounds.Center, 12)) { var action = actor.Class.GetClassCategory() is ClassCategory.Healer or ClassCategory.Caster ? ActionID.MakeSpell(WHM.AID.Surecast) : ActionID.MakeSpell(WAR.AID.ArmsLength); - hints.PlannedActions.Add((action, actor, (float)((Casters.FirstOrDefault()?.CastInfo?.NPCFinishAt ?? module.WorldState.CurrentTime) - module.WorldState.CurrentTime).TotalSeconds, false)); + hints.PlannedActions.Add((action, actor, (float)((Casters.FirstOrDefault()?.CastInfo?.NPCFinishAt ?? WorldState.CurrentTime) - WorldState.CurrentTime).TotalSeconds, false)); } } } // note: technically it's a 2-man stack, but that is not really helpful here... -class P2SanctityOfTheWard2HiemalStorm : Components.CastCounter +class P2SanctityOfTheWard2HiemalStorm (BossModule module): Components.CastCounter(module, ActionID.MakeSpell(AID.HiemalStormAOE)) { - public P2SanctityOfTheWard2HiemalStorm() : base(ActionID.MakeSpell(AID.HiemalStormAOE)) { } - - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - arena.AddCircle(pc.Position, 7, ArenaColor.Danger); + Arena.AddCircle(pc.Position, 7, ArenaColor.Danger); } } @@ -50,7 +31,7 @@ public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc // - towers 1: [0,11] are outer towers in CW order, starting from '11 o'clock' (CCW tower of N quadrant); [12,15] are inner towers in CCW order, starting from NE (NE-SE-SW-NW) // so, inner towers for quadrant k are [3*k, 3*k+2]; neighbouring inner are 12+k & 12+(k+3)%4 // TODO: move hints for prey (position for new meteor is snapshotted approximately when previous meteors do their aoes; actual actor appears ~0.5s later) -class P2SanctityOfTheWard2Towers1 : Components.CastTowers +class P2SanctityOfTheWard2Towers1(BossModule module) : Components.CastTowers(module, ActionID.MakeSpell(AID.Conviction2AOE), 3) { struct PlayerData { @@ -90,10 +71,8 @@ enum AssignmentDebug public bool Active => Towers.Count == 8; - public P2SanctityOfTheWard2Towers1() : base(ActionID.MakeSpell(AID.Conviction2AOE), 3) { } - // TODO: use some sort of a config update hook to simplify debugging... - //public override void Update(BossModule module) + //public override void Update() //{ // if (Active) // { @@ -101,25 +80,28 @@ public P2SanctityOfTheWard2Towers1() : base(ActionID.MakeSpell(AID.Conviction2AO // _players[i].AssignedTowers.Reset(); // for (int i = 0; i < Towers.Count; ++i) // Towers.AsSpan()[i].ForbiddenSoakers.Reset(); - // InitAssignments(module); + // InitAssignments(); // } //} - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { // note: we're not showing standard 'soak/gtfo' hints, they are useless - player should know where to go based on other hints... if (_players[slot].PreyDistance is var dist && dist > 0) { hints.Add($"Prey distance: {dist}deg", false); } + } - if (Active && movementHints != null && _players[slot].AssignedQuadrant >= 0) + public override void AddMovementHints(int slot, Actor actor, MovementHints movementHints) + { + if (Active && _players[slot].AssignedQuadrant >= 0) { var from = actor.Position; var color = ArenaColor.Safe; if (!_stormsDone) { - var stormPos = StormPlacementPosition(module, _players[slot].AssignedQuadrant); + var stormPos = StormPlacementPosition(_players[slot].AssignedQuadrant); movementHints.Add(from, stormPos, color); from = stormPos; color = ArenaColor.Danger; @@ -132,7 +114,7 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (Active) { @@ -140,68 +122,65 @@ public override void AddGlobalHints(BossModule module, GlobalHints hints) } } - public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) - { - return _preyTargets[playerSlot] ? PlayerPriority.Danger : PlayerPriority.Normal; - } + public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) => _preyTargets[playerSlot] ? PlayerPriority.Danger : PlayerPriority.Normal; - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - base.DrawArenaForeground(module, pcSlot, pc, arena); + base.DrawArenaForeground(pcSlot, pc); if (Active) { - float diag = module.Bounds.HalfSize / 1.414214f; - arena.AddLine(module.Bounds.Center + new WDir(diag, diag), module.Bounds.Center - new WDir(diag, diag), ArenaColor.Border); - arena.AddLine(module.Bounds.Center + new WDir(diag, -diag), module.Bounds.Center - new WDir(diag, -diag), ArenaColor.Border); + float diag = Module.Bounds.HalfSize / 1.414214f; + Arena.AddLine(Module.Bounds.Center + new WDir(diag, diag), Module.Bounds.Center - new WDir(diag, diag), ArenaColor.Border); + Arena.AddLine(Module.Bounds.Center + new WDir(diag, -diag), Module.Bounds.Center - new WDir(diag, -diag), ArenaColor.Border); } // TODO: move to separate comet component... if (_preyTargets[pcSlot]) { - foreach (var comet in module.Enemies(OID.HolyComet)) + foreach (var comet in Module.Enemies(OID.HolyComet)) { - arena.Actor(comet, ArenaColor.Object, true); - arena.AddCircle(comet.Position, _cometLinkRange, ArenaColor.Object); + Arena.Actor(comet, ArenaColor.Object, true); + Arena.AddCircle(comet.Position, _cometLinkRange, ArenaColor.Object); } } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { - base.OnCastStarted(module, caster, spell); + base.OnCastStarted(caster, spell); if (spell.Action == WatchedAction) { // mark tower as active - int index = ClassifyTower(module, spell.LocXZ); + int index = ClassifyTower(spell.LocXZ); _towerIndices[index] = Towers.Count - 1; _activeTowers.Set(index); if (Active) - InitAssignments(module); + InitAssignments(); } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { - base.OnEventCast(module, caster, spell); + base.OnEventCast(caster, spell); if ((AID)spell.Action.ID is AID.HiemalStormAOE) _stormsDone = true; } // note: might as well use statuses... - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.Prey) { _preyOnTH = actor.Class.IsSupport(); - _preyTargets.Set(module.Raid.FindSlot(actor.InstanceID)); + _preyTargets.Set(Raid.FindSlot(actor.InstanceID)); } } - public static int ClassifyTower(BossModule module, WPos tower) + public int ClassifyTower(WPos tower) { - var offset = tower - module.Bounds.Center; + var offset = tower - Module.Bounds.Center; var dir = Angle.FromDirection(offset); if (offset.LengthSq() < 7 * 7) { @@ -233,31 +212,31 @@ private bool TowerUnassigned(int t) return index >= 0 && Towers[index].ForbiddenSoakers.None(); } - private void InitAssignments(BossModule module) + private void InitAssignments() { _preySwap = "unconfigured"; _preyHint = "unknown"; var config = Service.Config.Get(); - if (InitQuadrantAssignments(module, config)) + if (InitQuadrantAssignments(config)) { - InitQuadrantSwaps(module, config); - if (InitOuterTowers(module, config)) + InitQuadrantSwaps(config); + if (InitOuterTowers(config)) { - InitInnerTowers(module, config); + InitInnerTowers(config); } } } // initial assignments, before swaps - private bool InitQuadrantAssignments(BossModule module, DSW2Config config) + private bool InitQuadrantAssignments(DSW2Config config) { bool validAssignments = false; - foreach (var (slot, quadrant) in config.P2Sanctity2Pairs.Resolve(module.Raid)) + foreach (var (slot, quadrant) in config.P2Sanctity2Pairs.Resolve(Raid)) { validAssignments = true; _players[slot].AssignedQuadrant = quadrant; - bool isTH = module.Raid[slot]?.Role is Role.Tank or Role.Healer; + bool isTH = Raid[slot]?.Role is Role.Tank or Role.Healer; if (isTH == _preyOnTH) _quadrants[quadrant].PreySlot = slot; else @@ -267,7 +246,7 @@ private bool InitQuadrantAssignments(BossModule module, DSW2Config config) } // swap quadrants for prey roles according to our strategy - private void InitQuadrantSwaps(BossModule module, DSW2Config config) + private void InitQuadrantSwaps(DSW2Config config) { // preferred prey cardinals var q1 = config.P2Sanctity2PreyCardinals is DSW2Config.P2PreyCardinals.AlwaysEW or DSW2Config.P2PreyCardinals.PreferEW ? 1 : 0; @@ -336,7 +315,7 @@ private void InitQuadrantSwaps(BossModule module, DSW2Config config) if (!_preyTargets[_quadrants[swapQ2].PreySlot]) swapQ2 ^= 2; // we guessed wrong - our prey target to swap with is in remaining quadrant SwapPreyQuadrants(swapQ1, swapQ2); - _preySwap = $"{QuadrantSwapHint(module, swapQ1)}/{QuadrantSwapHint(module, swapQ2)}"; + _preySwap = $"{QuadrantSwapHint(swapQ1)}/{QuadrantSwapHint(swapQ2)}"; } else { @@ -355,7 +334,7 @@ private void SwapPreyQuadrants(int q1, int q2) } // outer tower assignments - private bool InitOuterTowers(BossModule module, DSW2Config config) + private bool InitOuterTowers(DSW2Config config) { if (config.P2Sanctity2OuterTowers == DSW2Config.P2OuterTowers.None) return false; @@ -431,7 +410,7 @@ private bool InitOuterTowers(BossModule module, DSW2Config config) return true; } - private void InitInnerTowers(BossModule module, DSW2Config config) + private void InitInnerTowers(DSW2Config config) { // now assign inner towers, as long as it can be done non-ambiguously switch (config.P2Sanctity2InnerTowers) @@ -538,13 +517,13 @@ private int FindUnassignedUnambiguousInnerTower(int quadrant) return available1 ? candidate1 : candidate2; } - private WPos StormPlacementPosition(BossModule module, int quadrant) + private WPos StormPlacementPosition(int quadrant) { var dir = (180 - quadrant * 90).Degrees(); - return module.Bounds.Center + _stormPlacementOffset * dir.ToDirection(); + return Module.Bounds.Center + _stormPlacementOffset * dir.ToDirection(); } - private string QuadrantSwapHint(BossModule module, int quadrant) + private string QuadrantSwapHint(int quadrant) { return quadrant switch { @@ -555,7 +534,7 @@ private string QuadrantSwapHint(BossModule module, int quadrant) _ => "?" }; - //var pos = StormPlacementPosition(module, quadrant); + //var pos = StormPlacementPosition(quadrant); //Waymark closest = Waymark.Count; //float closestD = float.MaxValue; @@ -563,7 +542,7 @@ private string QuadrantSwapHint(BossModule module, int quadrant) //for (int i = 0; i < (int)Waymark.Count; ++i) //{ // var w = (Waymark)i; - // var p = module.WorldState.Waymarks[w]; + // var p = WorldState.Waymarks[w]; // float d = p != null ? (pos - new WPos(p.Value.XZ())).LengthSq() : float.MaxValue; // if (d < closestD) // { @@ -577,55 +556,53 @@ private string QuadrantSwapHint(BossModule module, int quadrant) // identifiers used by this component: // - towers 2: [0,7] - CW order, starting from N -class P2SanctityOfTheWard2Towers2 : Components.CastTowers +class P2SanctityOfTheWard2Towers2(BossModule module) : Components.CastTowers(module, ActionID.MakeSpell(AID.Conviction3AOE), 3) { private bool _preyOnTH; private BitMask _preyTargets; private int[] _playerTowers = Utils.MakeArray(PartyState.MaxPartySize, -1); - public P2SanctityOfTheWard2Towers2() : base(ActionID.MakeSpell(AID.Conviction3AOE), 3) { } - - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { // note: not drawing any default hints here... } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Prey) { bool first = _preyTargets.None(); _preyOnTH = actor.Class.IsSupport(); - _preyTargets.Set(module.Raid.FindSlot(actor.InstanceID)); + _preyTargets.Set(Raid.FindSlot(actor.InstanceID)); // assign non-prey-role positions here if (first) - InitNonPreyAssignments(module); + InitNonPreyAssignments(); } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) { - var index = ClassifyTower(module, spell.LocXZ); - var forbidden = module.Raid.WithSlot(true).WhereSlot(s => _playerTowers[s] >= 0 && _playerTowers[s] != index).Mask(); - Towers.Add(new(spell.LocXZ, Radius, forbiddenSoakers: forbidden)); + var index = ClassifyTower(spell.LocXZ); + var forbidden = Raid.WithSlot(true).WhereSlot(s => _playerTowers[s] >= 0 && _playerTowers[s] != index).Mask(); + Towers.Add(new(spell.LocXZ, Radius, ForbiddenSoakers: forbidden)); } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { - base.OnEventCast(module, caster, spell); - if ((AID)spell.Action.ID == AID.Conviction2AOE && !spell.TargetXZ.InCircle(module.Bounds.Center, 7)) + base.OnEventCast(caster, spell); + if ((AID)spell.Action.ID == AID.Conviction2AOE && !spell.TargetXZ.InCircle(Module.Bounds.Center, 7)) { // we assign towers to prey role players according to the quadrant they were soaking their tower - this handles unexpected swaps on first towers gracefully foreach (var t in spell.Targets) { - var slot = module.Raid.FindSlot(t.ID); - if (module.Raid[slot]?.Class.IsSupport() == _preyOnTH) + var slot = Raid.FindSlot(t.ID); + if (Raid[slot]?.Class.IsSupport() == _preyOnTH) { - var towerOffset = spell.TargetXZ - module.Bounds.Center; + var towerOffset = spell.TargetXZ - Module.Bounds.Center; var towerIndex = towerOffset.Z switch { < -10 => 0, // N tower @@ -640,19 +617,19 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } - private int ClassifyTower(BossModule module, WPos tower) + private int ClassifyTower(WPos tower) { - var offset = tower - module.Bounds.Center; + var offset = tower - Module.Bounds.Center; var dir = Angle.FromDirection(offset); return (4 - (int)MathF.Round(dir.Rad / MathF.PI * 4)) % 8; } - private void InitNonPreyAssignments(BossModule module) + private void InitNonPreyAssignments() { var config = Service.Config.Get(); - foreach (var (slot, quadrant) in config.P2Sanctity2Pairs.Resolve(module.Raid)) + foreach (var (slot, quadrant) in config.P2Sanctity2Pairs.Resolve(Raid)) { - if (module.Raid[slot]?.Class.IsSupport() != _preyOnTH) + if (Raid[slot]?.Class.IsSupport() != _preyOnTH) { var tower = 2 * quadrant; if (config.P2Sanctity2NonPreyTowerCW) diff --git a/BossMod/Modules/Endwalker/Ultimate/DSW2/P2StrengthOfTheWard1.cs b/BossMod/Modules/Endwalker/Ultimate/DSW2/P2StrengthOfTheWard1.cs index 56c3f73005..9eca3072fc 100644 --- a/BossMod/Modules/Endwalker/Ultimate/DSW2/P2StrengthOfTheWard1.cs +++ b/BossMod/Modules/Endwalker/Ultimate/DSW2/P2StrengthOfTheWard1.cs @@ -3,14 +3,12 @@ // spreads class P2StrengthOfTheWard1LightningStorm : Components.UniformStackSpread { - public P2StrengthOfTheWard1LightningStorm() : base(0, 5) { } - - public override void Init(BossModule module) + public P2StrengthOfTheWard1LightningStorm(BossModule module) : base(module, 0, 5) { - AddSpreads(module.Raid.WithoutSlot(true)); + AddSpreads(Raid.WithoutSlot(true)); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.LightningStormAOE) Spreads.Clear(); @@ -18,27 +16,25 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } // charges -class P2StrengthOfTheWard1SpiralThrust : Components.GenericAOEs +class P2StrengthOfTheWard1SpiralThrust(BossModule module) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.SpiralThrust), "GTFO from charge aoe!") { private List _knights = new(); private static readonly AOEShapeRect _shape = new(52, 8); - public P2StrengthOfTheWard1SpiralThrust() : base(ActionID.MakeSpell(AID.SpiralThrust), "GTFO from charge aoe!") { } - - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { foreach (var k in _knights) yield return new(_shape, k.Position, k.Rotation); // TODO: activation } - public override void OnActorPlayActionTimelineEvent(BossModule module, Actor actor, ushort id) + public override void OnActorPlayActionTimelineEvent(Actor actor, ushort id) { if (id == 0x1E43 && (OID)actor.OID is OID.SerVellguine or OID.SerPaulecrain or OID.SerIgnasse) _knights.Add(actor); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if (spell.Action == WatchedAction) { @@ -49,7 +45,4 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } // rings -class P2StrengthOfTheWard1HeavyImpact : HeavyImpact -{ - public P2StrengthOfTheWard1HeavyImpact() : base(8.2f) { } -} +class P2StrengthOfTheWard1HeavyImpact(BossModule module) : HeavyImpact(module, 8.2f); diff --git a/BossMod/Modules/Endwalker/Ultimate/DSW2/P2StrengthOfTheWard2.cs b/BossMod/Modules/Endwalker/Ultimate/DSW2/P2StrengthOfTheWard2.cs index 8905ace133..463ba7acba 100644 --- a/BossMod/Modules/Endwalker/Ultimate/DSW2/P2StrengthOfTheWard2.cs +++ b/BossMod/Modules/Endwalker/Ultimate/DSW2/P2StrengthOfTheWard2.cs @@ -11,43 +11,39 @@ class P2StrengthOfTheWard2SpreadStack : Components.UniformStackSpread private Actor? _rightCharge; private Angle _dirToStackPos; - public P2StrengthOfTheWard2SpreadStack() : base(8, 24, 5) { } - - public override void Init(BossModule module) + public P2StrengthOfTheWard2SpreadStack(BossModule module) : base(module, 8, 24, 5) { var c1 = module.Enemies(OID.SerAdelphel).FirstOrDefault(); var c2 = module.Enemies(OID.SerJanlenoux).FirstOrDefault(); if (c1 == null || c2 == null) { - module.ReportError(this, $"Failed to find charge sources"); + ReportError($"Failed to find charge sources"); return; } - var offset1 = c1.Position - module.Bounds.Center; - var offset2 = c2.Position - module.Bounds.Center; + var offset1 = c1.Position - Module.Bounds.Center; + var offset2 = c2.Position - Module.Bounds.Center; var toStack = -(offset1 + offset2); (_leftCharge, _rightCharge) = toStack.OrthoL().Dot(offset1) > 0 ? (c1, c2) : (c2, c1); _dirToStackPos = Angle.FromDirection(toStack); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddMovementHints(int slot, Actor actor, MovementHints movementHints) { - base.AddHints(module, slot, actor, hints, movementHints); - if (movementHints != null) - foreach (var safespot in EnumSafeSpots(module, actor)) - movementHints.Add(actor.Position, safespot, ArenaColor.Safe); + foreach (var safespot in EnumSafeSpots(actor)) + movementHints.Add(actor.Position, safespot, ArenaColor.Safe); } - public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) => PlayerPriority.Normal; + public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) => PlayerPriority.Normal; - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - base.DrawArenaForeground(module, pcSlot, pc, arena); - foreach (var safespot in EnumSafeSpots(module, pc)) - arena.AddCircle(safespot, 1, ArenaColor.Safe); + base.DrawArenaForeground(pcSlot, pc); + foreach (var safespot in EnumSafeSpots(pc)) + Arena.AddCircle(safespot, 1, ArenaColor.Safe); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { @@ -62,46 +58,43 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if ((IconID)iconID == IconID.SkywardLeapP2) AddSpread(actor); } - private IEnumerable EnumSafeSpots(BossModule module, Actor player) + private IEnumerable EnumSafeSpots(Actor player) { if (IsSpreadTarget(player)) { if (!LeapsDone) { // TODO: select single safe spot for a player based on some criterion... - yield return SafeSpotAt(module, _dirToStackPos + 100.Degrees()); - yield return SafeSpotAt(module, _dirToStackPos + 180.Degrees()); - yield return SafeSpotAt(module, _dirToStackPos - 100.Degrees()); + yield return SafeSpotAt(_dirToStackPos + 100.Degrees()); + yield return SafeSpotAt(_dirToStackPos + 180.Degrees()); + yield return SafeSpotAt(_dirToStackPos - 100.Degrees()); } } else if (_leftCharge?.Tether.Target == player.InstanceID) { - yield return SafeSpotAt(module, _dirToStackPos - 18.Degrees()); + yield return SafeSpotAt(_dirToStackPos - 18.Degrees()); } else if (_rightCharge?.Tether.Target == player.InstanceID) { - yield return SafeSpotAt(module, _dirToStackPos + 18.Degrees()); + yield return SafeSpotAt(_dirToStackPos + 18.Degrees()); } else if (!RageDone) { - yield return SafeSpotAt(module, _dirToStackPos); + yield return SafeSpotAt(_dirToStackPos); } } - private WPos SafeSpotAt(BossModule module, Angle dir) => module.Bounds.Center + 20 * dir.ToDirection(); + private WPos SafeSpotAt(Angle dir) => Module.Bounds.Center + 20 * dir.ToDirection(); } // growing voidzones -class P2StrengthOfTheWard2Voidzones : Components.LocationTargetedAOEs -{ - public P2StrengthOfTheWard2Voidzones() : base(ActionID.MakeSpell(AID.DimensionalCollapseAOE), 9, "GTFO from voidzone aoe!") { } -} +class P2StrengthOfTheWard2Voidzones(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.DimensionalCollapseAOE), 9, "GTFO from voidzone aoe!"); // charges on tethered targets class P2StrengthOfTheWard2Charges : Components.CastCounter @@ -110,15 +103,13 @@ class P2StrengthOfTheWard2Charges : Components.CastCounter private static readonly float _chargeHalfWidth = 4; - public P2StrengthOfTheWard2Charges() : base(ActionID.MakeSpell(AID.HolyShieldBash)) { } - - public override void Init(BossModule module) + public P2StrengthOfTheWard2Charges(BossModule module) : base(module, ActionID.MakeSpell(AID.HolyShieldBash)) { _chargeSources.AddRange(module.Enemies(OID.SerAdelphel)); _chargeSources.AddRange(module.Enemies(OID.SerJanlenoux)); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (NumCasts > 0) return; @@ -128,43 +119,43 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint { if (tetherSource == null) hints.Add("Grab tether!"); - else if (ChargeHitsNonTanks(module, tetherSource, actor)) + else if (ChargeHitsNonTanks(tetherSource, actor)) hints.Add("Move away from raid!"); } else { if (tetherSource != null) hints.Add("Pass tether!"); - else if (IsInChargeAOE(module, actor)) + else if (IsInChargeAOE(actor)) hints.Add("GTFO from tanks!"); } } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { foreach (var source in _chargeSources) { - var target = module.WorldState.Actors.Find(source.Tether.Target); + var target = WorldState.Actors.Find(source.Tether.Target); if (target != null) { - arena.ZoneRect(source.Position, target.Position, _chargeHalfWidth, ArenaColor.AOE); + Arena.ZoneRect(source.Position, target.Position, _chargeHalfWidth, ArenaColor.AOE); } } } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { // draw tethers foreach (var source in _chargeSources) { - module.Arena.Actor(source, ArenaColor.Enemy, true); - var target = module.WorldState.Actors.Find(source.Tether.Target); + Arena.Actor(source, ArenaColor.Enemy, true); + var target = WorldState.Actors.Find(source.Tether.Target); if (target != null) - module.Arena.AddLine(source.Position, target.Position, ArenaColor.Danger); + Arena.AddLine(source.Position, target.Position, ArenaColor.Danger); } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if (spell.Action == WatchedAction) { @@ -173,19 +164,19 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } - private bool ChargeHitsNonTanks(BossModule module, Actor source, Actor target) + private bool ChargeHitsNonTanks(Actor source, Actor target) { var dir = target.Position - source.Position; var len = dir.Length(); dir /= len; - return module.Raid.WithoutSlot().Any(p => p.Role != Role.Tank && p.Position.InRect(source.Position, dir, len, 0, _chargeHalfWidth)); + return Raid.WithoutSlot().Any(p => p.Role != Role.Tank && p.Position.InRect(source.Position, dir, len, 0, _chargeHalfWidth)); } - private bool IsInChargeAOE(BossModule module, Actor player) + private bool IsInChargeAOE(Actor player) { foreach (var source in _chargeSources) { - var target = module.WorldState.Actors.Find(source.Tether.Target); + var target = WorldState.Actors.Find(source.Tether.Target); if (target != null && player.Position.InRect(source.Position, target.Position - source.Position, _chargeHalfWidth)) return true; } @@ -195,13 +186,11 @@ private bool IsInChargeAOE(BossModule module, Actor player) // towers // TODO: assign tower to proper player -class P2StrengthOfTheWard2Towers : Components.CastTowers +class P2StrengthOfTheWard2Towers(BossModule module) : Components.CastTowers(module, ActionID.MakeSpell(AID.Conviction1AOE), 3) { - public P2StrengthOfTheWard2Towers() : base(ActionID.MakeSpell(AID.Conviction1AOE), 3) { } - - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) - Towers.Add(new(spell.LocXZ, Radius, forbiddenSoakers: module.Raid.WithSlot(true).WhereActor(p => p.Role == Role.Tank).Mask())); + Towers.Add(new(spell.LocXZ, Radius, ForbiddenSoakers: Raid.WithSlot(true).WhereActor(p => p.Role == Role.Tank).Mask())); } } diff --git a/BossMod/Modules/Endwalker/Ultimate/DSW2/P3DarkdragonDiveCounter.cs b/BossMod/Modules/Endwalker/Ultimate/DSW2/P3DarkdragonDiveCounter.cs index e50ef12505..d7959efcb5 100644 --- a/BossMod/Modules/Endwalker/Ultimate/DSW2/P3DarkdragonDiveCounter.cs +++ b/BossMod/Modules/Endwalker/Ultimate/DSW2/P3DarkdragonDiveCounter.cs @@ -1,8 +1,8 @@ namespace BossMod.Endwalker.Ultimate.DSW2; -class P3DarkdragonDiveCounter : Components.GenericTowers +class P3DarkdragonDiveCounter(BossModule module) : Components.GenericTowers(module) { - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { var numSoakers = (AID)spell.Action.ID switch { @@ -17,30 +17,30 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf Towers.Add(new(caster.Position, 5, numSoakers, numSoakers)); if (Towers.Count == 4) - InitAssignments(module); + InitAssignments(); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.DarkdragonDive1 or AID.DarkdragonDive2 or AID.DarkdragonDive3 or AID.DarkdragonDive4) Towers.RemoveAll(t => t.Position.AlmostEqual(caster.Position, 1)); } // 0 = NW, then CW order - private int ClassifyTower(BossModule module, WPos tower) + private int ClassifyTower(WPos tower) { - var offset = tower - module.Bounds.Center; + var offset = tower - Module.Bounds.Center; return offset.Z > 0 ? (offset.X > 0 ? 2 : 3) : (offset.X > 0 ? 1 : 0); } - private void InitAssignments(BossModule module) + private void InitAssignments() { int[] towerIndices = { -1, -1, -1, -1 }; for (int i = 0; i < Towers.Count; ++i) - towerIndices[ClassifyTower(module, Towers[i].Position)] = i; + towerIndices[ClassifyTower(Towers[i].Position)] = i; var config = Service.Config.Get(); - var assign = config.P3DarkdragonDiveCounterGroups.Resolve(module.Raid); + var assign = config.P3DarkdragonDiveCounterGroups.Resolve(Raid); foreach (var (slot, group) in assign) { var pos = group & 3; diff --git a/BossMod/Modules/Endwalker/Ultimate/DSW2/P3DiveFromGrace.cs b/BossMod/Modules/Endwalker/Ultimate/DSW2/P3DiveFromGrace.cs index 552fc532d3..73bdcb49d2 100644 --- a/BossMod/Modules/Endwalker/Ultimate/DSW2/P3DiveFromGrace.cs +++ b/BossMod/Modules/Endwalker/Ultimate/DSW2/P3DiveFromGrace.cs @@ -1,47 +1,45 @@ namespace BossMod.Endwalker.Ultimate.DSW2; -class P3Geirskogul : Components.SelfTargetedAOEs +class P3Geirskogul(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Geirskogul), new AOEShapeRect(62, 4)) { private List _predicted = new(); - public P3Geirskogul() : base(ActionID.MakeSpell(AID.Geirskogul), new AOEShapeRect(62, 4)) { } - - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (var p in _predicted) { - arena.Actor(p, ArenaColor.Object, true); - var target = module.Raid.WithoutSlot().Closest(p.Position); + Arena.Actor(p, ArenaColor.Object, true); + var target = Raid.WithoutSlot().Closest(p.Position); if (target != null) - Shape.Outline(arena, p.Position, Angle.FromDirection(target.Position - p.Position)); + Shape.Outline(Arena, p.Position, Angle.FromDirection(target.Position - p.Position)); } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { - base.OnCastStarted(module, caster, spell); + base.OnCastStarted(caster, spell); if (spell.Action == WatchedAction) _predicted.Clear(); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { - base.OnCastFinished(module, caster, spell); + base.OnCastFinished(caster, spell); if ((AID)spell.Action.ID == AID.DarkdragonDive) _predicted.Add(caster); } } -class P3GnashAndLash : Components.GenericAOEs +class P3GnashAndLash(BossModule module) : Components.GenericAOEs(module) { private List _aoes = new(); private static readonly AOEShapeCircle _aoeGnash = new(8); private static readonly AOEShapeDonut _aoeLash = new(8, 40); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => _aoes.Take(1); + public override IEnumerable ActiveAOEs(int slot, Actor actor) => _aoes.Take(1); - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { (AOEShape? first, AOEShape? second) = (AID)spell.Action.ID switch { @@ -53,12 +51,12 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf { _aoes.Clear(); // just a precaution, in one pull i had unfortunate cast time updates which 'restarted' the spell several times // note: marking aoes as non-risky, so that we don't spam warnings - reconsider (maybe mark as risky when cast ends?) - _aoes.Add(new(first, caster.Position, default, module.WorldState.CurrentTime.AddSeconds(3.7f), risky: false)); - _aoes.Add(new(second, caster.Position, default, module.WorldState.CurrentTime.AddSeconds(6.8f), risky: false)); + _aoes.Add(new(first, caster.Position, default, WorldState.FutureTime(3.7f), Risky: false)); + _aoes.Add(new(second, caster.Position, default, WorldState.FutureTime(6.8f), Risky: false)); } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.GnashingWheel or AID.LashingWheel) { @@ -74,7 +72,7 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent // 2. if there are forward/backward jumps at given order, forward takes W spot, backward takes E spot (center takes S) - this can be changed by config // 3. otherwise, no specific assignments are assumed until player baits or soaks the tower // TODO: split into towers & bait-away? -class P3DiveFromGrace : Components.CastTowers +class P3DiveFromGrace(BossModule module) : Components.CastTowers(module, ActionID.MakeSpell(AID.DarkdragonDive), 5) { private struct PlayerState { @@ -99,9 +97,7 @@ private struct PlayerState private static readonly float _towerOffset = 14; private static readonly float _spotOffset = 7f; - public P3DiveFromGrace() : base(ActionID.MakeSpell(AID.DarkdragonDive), 5) { } - - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { var state = _playerStates[slot]; if (state.JumpOrder > 0) @@ -115,102 +111,101 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint _ => "flex" }}", false); - base.AddHints(module, slot, actor, hints, movementHints); + base.AddHints(slot, actor, hints); + } - if (movementHints != null) - foreach (var s in SafeSpots(module, slot)) - movementHints.Add(actor.Position, s, ArenaColor.Safe); + public override void AddMovementHints(int slot, Actor actor, MovementHints movementHints) + { + foreach (var s in SafeSpots(slot)) + movementHints.Add(actor.Position, s, ArenaColor.Safe); } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (_haveDirections) hints.Add($"Arrows for: {(_ordersWithArrows.Any() ? string.Join(", ", _ordersWithArrows.SetBits()) : "none")}"); } - public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) - { - return _playerStates[playerSlot].JumpOrder == CurrentBaitOrder() ? PlayerPriority.Interesting : PlayerPriority.Normal; - } + public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) => _playerStates[playerSlot].JumpOrder == CurrentBaitOrder() ? PlayerPriority.Interesting : PlayerPriority.Normal; - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - base.DrawArenaForeground(module, pcSlot, pc, arena); + base.DrawArenaForeground(pcSlot, pc); foreach (var t in _predictedTowers) - DrawTower(arena, t.Position, t.Radius, !t.ForbiddenSoakers[pcSlot]); + DrawTower(Arena, t.Position, t.Radius, !t.ForbiddenSoakers[pcSlot]); // draw baited jumps var baitOrder = CurrentBaitOrder(); - foreach (var (slot, player) in module.Raid.WithSlot(true).WhereSlot(i => _playerStates[i].JumpOrder == baitOrder)) + foreach (var (slot, player) in Raid.WithSlot(true).WhereSlot(i => _playerStates[i].JumpOrder == baitOrder)) { var pos = player.Position + _playerStates[slot].JumpDirection * player.Rotation.ToDirection() * _towerOffset; - arena.AddCircle(pos, Radius, ArenaColor.Object); + Arena.AddCircle(pos, Radius, ArenaColor.Object); if (slot == pcSlot) - arena.AddLine(pc.Position, pos, ArenaColor.Object); + Arena.AddLine(pc.Position, pos, ArenaColor.Object); } // safe spots - foreach (var s in SafeSpots(module, pcSlot)) - arena.AddCircle(s, 1, ArenaColor.Safe); + foreach (var s in SafeSpots(pcSlot)) + Arena.AddCircle(s, 1, ArenaColor.Safe); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { switch ((SID)status.ID) { case SID.Jump1: - AssignJumpOrder(module, actor, 1); + AssignJumpOrder(actor, 1); break; case SID.Jump2: - AssignJumpOrder(module, actor, 2); + AssignJumpOrder(actor, 2); break; case SID.Jump3: - AssignJumpOrder(module, actor, 3); + AssignJumpOrder(actor, 3); break; case SID.JumpBackward: - AssignJumpDirection(module, actor, -1); + AssignJumpDirection(actor, -1); break; case SID.JumpCenter: - AssignJumpDirection(module, actor, 0); + AssignJumpDirection(actor, 0); break; case SID.JumpForward: - AssignJumpDirection(module, actor, +1); + AssignJumpDirection(actor, +1); break; } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) { _predictedTowers.Clear(); - Towers.Add(CreateTower(module, caster.Position)); + Towers.Add(CreateTower(caster.Position)); } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { case AID.DarkdragonDive: foreach (var t in spell.Targets) - AssignLateSpot(module, t.ID, caster.Position); + AssignLateSpot(t.ID, caster.Position); ++NumCasts; break; case AID.DarkHighJump: case AID.DarkSpineshatterDive: case AID.DarkElusiveJump: ++NumJumps; - AssignLateSpot(module, spell.MainTargetID, caster.Position); + AssignLateSpot(spell.MainTargetID, caster.Position); var offset = (AID)spell.Action.ID != AID.DarkHighJump ? _towerOffset * caster.Rotation.ToDirection() : new(); - _predictedTowers.Add(CreateTower(module, caster.Position + offset)); + _predictedTowers.Add(CreateTower(caster.Position + offset)); break; } } - private void AssignJumpOrder(BossModule module, Actor actor, int order) + private void AssignJumpOrder(Actor actor, int order) { - int slot = module.Raid.FindSlot(actor.InstanceID); + int slot = Raid.FindSlot(actor.InstanceID); if (slot >= 0) { _playerStates[slot].JumpOrder = order; @@ -218,10 +213,10 @@ private void AssignJumpOrder(BossModule module, Actor actor, int order) } } - private void AssignJumpDirection(BossModule module, Actor actor, int direction) + private void AssignJumpDirection(Actor actor, int direction) { _haveDirections = true; - int slot = module.Raid.FindSlot(actor.InstanceID); + int slot = Raid.FindSlot(actor.InstanceID); if (slot >= 0) { _playerStates[slot].JumpDirection = direction; @@ -236,11 +231,11 @@ private void AssignJumpDirection(BossModule module, Actor actor, int direction) } } - private void AssignLateSpot(BossModule module, ulong target, WPos pos) + private void AssignLateSpot(ulong target, WPos pos) { - var slot = module.Raid.FindSlot(target); + var slot = Raid.FindSlot(target); if (slot >= 0 && _playerStates[slot].AssignedSpot == 0) - _playerStates[slot].AssignedSpot = TowerSpot(module, pos); + _playerStates[slot].AssignedSpot = TowerSpot(pos); } private int CurrentBaitOrder() => _haveDirections ? NumJumps switch @@ -251,17 +246,17 @@ private void AssignLateSpot(BossModule module, ulong target, WPos pos) _ => -1 } : -1; - private int TowerSpot(BossModule module, WPos pos) + private int TowerSpot(WPos pos) { - var towerOffset = pos - module.Bounds.Center; + var towerOffset = pos - Module.Bounds.Center; var toStack = DirectionForStack(); var dotForward = DirectionForForwardArrow().Dot(towerOffset); return -toStack.Dot(towerOffset) > Math.Abs(dotForward) ? 2 : dotForward > 0 ? 3 : 1; } - private Tower CreateTower(BossModule module, WPos pos) + private Tower CreateTower(WPos pos) { - var spot = TowerSpot(module, pos); + var spot = TowerSpot(pos); var soakerOrder = NumCasts switch { < 3 => 3, @@ -269,14 +264,14 @@ private Tower CreateTower(BossModule module, WPos pos) < 8 => spot != 2 ? 2 : 1, _ => -1 }; - var forbidden = module.Raid.WithSlot(true).WhereSlot(i => !_playerStates[i].CanBait(soakerOrder, spot)).Mask(); + var forbidden = Raid.WithSlot(true).WhereSlot(i => !_playerStates[i].CanBait(soakerOrder, spot)).Mask(); return new(pos, Radius, forbiddenSoakers: forbidden); } private WDir DirectionForStack() => new(0, -_spotOffset); // TODO: this is arbitrary private WDir DirectionForForwardArrow() => _config.P3DiveFromGraceLookWest ? DirectionForStack().OrthoR() : DirectionForStack().OrthoL(); - private IEnumerable SafeSpots(BossModule module, int slot) + private IEnumerable SafeSpots(int slot) { if (!_haveDirections) yield break; @@ -285,7 +280,7 @@ private IEnumerable SafeSpots(BossModule module, int slot) var state = _playerStates[slot]; if (state.JumpOrder == CurrentBaitOrder()) { - var origin = module.Bounds.Center; + var origin = Module.Bounds.Center; if (state.JumpOrder == 2) origin += DirectionForStack() * 0.8f; // TODO: the coefficient is arbitrary @@ -298,7 +293,7 @@ private IEnumerable SafeSpots(BossModule module, int slot) } else if (NumJumps < (state.JumpOrder == 3 ? 3 : 8)) { - yield return module.Bounds.Center + DirectionForStack(); + yield return Module.Bounds.Center + DirectionForStack(); } } } diff --git a/BossMod/Modules/Endwalker/Ultimate/DSW2/P4Hatebound.cs b/BossMod/Modules/Endwalker/Ultimate/DSW2/P4Hatebound.cs index 56e0189624..73761314d4 100644 --- a/BossMod/Modules/Endwalker/Ultimate/DSW2/P4Hatebound.cs +++ b/BossMod/Modules/Endwalker/Ultimate/DSW2/P4Hatebound.cs @@ -1,7 +1,7 @@ namespace BossMod.Endwalker.Ultimate.DSW2; // TODO: hints?.. -class P4Hatebound : BossComponent +class P4Hatebound(BossModule module) : BossComponent(module) { public enum Color { None, Red, Blue } @@ -13,7 +13,7 @@ public enum Color { None, Red, Blue } public bool YellowReady => ColorReady(Color.Red); public bool BlueReady => ColorReady(Color.Blue); - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_playerColors[slot] != Color.None) { @@ -21,17 +21,17 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (var o in _orbs.Where(o => !o.exploded)) { - arena.Actor(o.orb, ArenaColor.Object, true); + Arena.Actor(o.orb, ArenaColor.Object, true); if (OrbReady(o.orb)) - arena.AddCircle(o.orb.Position, 6, _playerColors[pcSlot] == Color.Red ? ArenaColor.Safe : ArenaColor.Danger); + Arena.AddCircle(o.orb.Position, 6, _playerColors[pcSlot] == Color.Red ? ArenaColor.Safe : ArenaColor.Danger); } } - public override void OnActorCreated(BossModule module, Actor actor) + public override void OnActorCreated(Actor actor) { Color color = (OID)actor.OID switch { @@ -43,7 +43,7 @@ public override void OnActorCreated(BossModule module, Actor actor) _orbs.Add((actor, color, false)); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { var color = (SID)status.ID switch { @@ -51,14 +51,14 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st SID.Fangbound => Color.Blue, _ => Color.None }; - if (color != Color.None && module.Raid.FindSlot(actor.InstanceID) is var slot && slot >= 0) + if (color != Color.None && Raid.FindSlot(actor.InstanceID) is var slot && slot >= 0) { ColorsAssigned = true; _playerColors[slot] = color; } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.FlareStar or AID.FlareNova or AID.FlareNovaFail && _orbs.FindIndex(o => o.orb == caster) is var index && index >= 0) _orbs.AsSpan()[index].exploded = true; @@ -67,7 +67,7 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent private bool OrbReady(Actor orb) => orb.HitboxRadius > 1.501f; // TODO: verify... } -class P4MirageDive : Components.CastCounter +class P4MirageDive(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.MirageDiveAOE)) { private List _targets = new(); private BitMask _forbidden; @@ -75,57 +75,52 @@ class P4MirageDive : Components.CastCounter private static readonly float _radius = 4; - public P4MirageDive() : base(ActionID.MakeSpell(AID.MirageDiveAOE)) { } - - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_baiters[slot]) { // note: not showing this hint, since typically pc will wait until someone swaps the color //if (_forbidden[slot]) // hints.Add("Pass the tether!"); - if (!_forbidden[slot] && module.Raid.WithoutSlot().InRadiusExcluding(actor, _radius).Any()) + if (!_forbidden[slot] && Raid.WithoutSlot().InRadiusExcluding(actor, _radius).Any()) hints.Add("GTFO from raid!"); } - else if (module.Raid.WithSlot(true).IncludedInMask(_baiters).ExcludedFromMask(_forbidden).InRadius(actor.Position, _radius).Any()) + else if (Raid.WithSlot(true).IncludedInMask(_baiters).ExcludedFromMask(_forbidden).InRadius(actor.Position, _radius).Any()) { hints.Add("GTFO from baiters!"); } } - public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) - { - return _baiters[playerSlot] ? PlayerPriority.Danger : PlayerPriority.Normal; - } + public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) => _baiters[playerSlot] ? PlayerPriority.Danger : PlayerPriority.Normal; - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { bool pcCanSwap = !_forbidden[pcSlot] && !_baiters[pcSlot]; - foreach (var (slot, player) in module.Raid.WithSlot(true).IncludedInMask(_baiters)) + foreach (var (slot, player) in Raid.WithSlot(true).IncludedInMask(_baiters)) { bool canSwap = pcCanSwap && _forbidden[slot]; - arena.AddCircle(player.Position, _radius, canSwap ? ArenaColor.Safe : ArenaColor.Danger); + Arena.AddCircle(player.Position, _radius, canSwap ? ArenaColor.Safe : ArenaColor.Danger); } } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Clawbound) - _baiters.Set(module.Raid.FindSlot(actor.InstanceID)); + _baiters.Set(Raid.FindSlot(actor.InstanceID)); } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Clawbound) - _baiters.Clear(module.Raid.FindSlot(actor.InstanceID)); + _baiters.Clear(Raid.FindSlot(actor.InstanceID)); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { - base.OnEventCast(module, caster, spell); + base.OnEventCast(caster, spell); if (spell.Action == WatchedAction) { - _targets.Add(module.Raid.FindSlot(spell.MainTargetID)); + _targets.Add(Raid.FindSlot(spell.MainTargetID)); _forbidden.Reset(); foreach (int i in _targets.TakeLast(4)) _forbidden.Set(i); diff --git a/BossMod/Modules/Endwalker/Ultimate/DSW2/P4Intermission.cs b/BossMod/Modules/Endwalker/Ultimate/DSW2/P4Intermission.cs index 9cd0117dfa..716e56897c 100644 --- a/BossMod/Modules/Endwalker/Ultimate/DSW2/P4Intermission.cs +++ b/BossMod/Modules/Endwalker/Ultimate/DSW2/P4Intermission.cs @@ -2,15 +2,15 @@ namespace BossMod.Endwalker.Ultimate.DSW2; -class P4IntermissionBrightwing : PureOfHeartBrightwing { } -class P4IntermissionSkyblindBait : PureOfHeartSkyblindBait { } -class P4IntermissionSkyblind : PureOfHeartSkyblind { } +class P4IntermissionBrightwing(BossModule module) : PureOfHeartBrightwing(module) { } +class P4IntermissionSkyblindBait(BossModule module) : PureOfHeartSkyblindBait(module) { } +class P4IntermissionSkyblind(BossModule module) : PureOfHeartSkyblind(module) { } -class P4Haurchefant : BossComponent +class P4Haurchefant(BossModule module) : BossComponent(module) { public bool Appear { get; private set; } - public override void OnActorPlayActionTimelineEvent(BossModule module, Actor actor, ushort id) + public override void OnActorPlayActionTimelineEvent(Actor actor, ushort id) { if ((OID)actor.OID == OID.Haurchefant && id == 0x11D3) Appear = true; diff --git a/BossMod/Modules/Endwalker/Ultimate/DSW2/P5DeathOfTheHeavens.cs b/BossMod/Modules/Endwalker/Ultimate/DSW2/P5DeathOfTheHeavens.cs index 53c9e864f4..7af651a9ba 100644 --- a/BossMod/Modules/Endwalker/Ultimate/DSW2/P5DeathOfTheHeavens.cs +++ b/BossMod/Modules/Endwalker/Ultimate/DSW2/P5DeathOfTheHeavens.cs @@ -1,52 +1,44 @@ namespace BossMod.Endwalker.Ultimate.DSW2; -class P5DeathOfTheHeavensHeavyImpact : HeavyImpact -{ - public P5DeathOfTheHeavensHeavyImpact() : base(10.5f) { } -} +class P5DeathOfTheHeavensHeavyImpact(BossModule module) : HeavyImpact(module, 10.5f); -class P5DeathOfTheHeavensGaze : DragonsGaze -{ - public P5DeathOfTheHeavensGaze() : base(OID.BossP5) { } -} +class P5DeathOfTheHeavensGaze(BossModule module) : DragonsGaze(module, OID.BossP5); // TODO: make more meaningful somehow -class P5DeathOfTheHeavensDooms : BossComponent +class P5DeathOfTheHeavensDooms(BossModule module) : BossComponent(module) { public BitMask Dooms; - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (Dooms[slot]) hints.Add("Doom", false); } // note: we could also use status, but it appears slightly later - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.Deathstorm) foreach (var t in spell.Targets) - Dooms.Set(module.Raid.FindSlot(t.ID)); + Dooms.Set(Raid.FindSlot(t.ID)); } } class P5DeathOfTheHeavensLightningStorm : Components.UniformStackSpread { - public P5DeathOfTheHeavensLightningStorm() : base(0, 5) { } - - public override void Init(BossModule module) + public P5DeathOfTheHeavensLightningStorm(BossModule module) : base(module, 0, 5) { - AddSpreads(module.Raid.WithoutSlot(true)); + AddSpreads(Raid.WithoutSlot(true)); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.LightningStormAOE) Spreads.Clear(); } } -class P5DeathOfTheHeavensHeavensflame : Components.Knockback +class P5DeathOfTheHeavensHeavensflame(BossModule module) : Components.Knockback(module, ActionID.MakeSpell(AID.HeavensflameAOE)) { public bool KnockbackDone { get; private set; } private WPos[] _playerAdjustedPositions = new WPos[PartyState.MaxPartySize]; @@ -60,32 +52,30 @@ class P5DeathOfTheHeavensHeavensflame : Components.Knockback private static readonly float _aoeRadius = 10; private static readonly float _tetherBreakDistance = 32; // TODO: verify... - public P5DeathOfTheHeavensHeavensflame() : base(ActionID.MakeSpell(AID.HeavensflameAOE)) { } - - public override IEnumerable Sources(BossModule module, int slot, Actor actor) + public override IEnumerable Sources(int slot, Actor actor) { - yield return new(module.Bounds.Center, _knockbackDistance); + yield return new(Module.Bounds.Center, _knockbackDistance); } - public override void Update(BossModule module) + public override void Update() { - foreach (var (slot, player) in module.Raid.WithSlot()) - _playerAdjustedPositions[slot] = !KnockbackDone ? AwayFromSource(player.Position, module.Bounds.Center, _knockbackDistance) : player.Position; + foreach (var (slot, player) in Raid.WithSlot()) + _playerAdjustedPositions[slot] = !KnockbackDone ? AwayFromSource(player.Position, Module.Bounds.Center, _knockbackDistance) : player.Position; } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_playerIcons[slot] == 0) return; - if (!KnockbackDone && IsImmune(slot, module.WorldState.CurrentTime)) + if (!KnockbackDone && IsImmune(slot, WorldState.CurrentTime)) hints.Add("Cancel knockback immunity!"); var actorAdjPos = _playerAdjustedPositions[slot]; - if (!module.Bounds.Contains(actorAdjPos)) + if (!Module.Bounds.Contains(actorAdjPos)) hints.Add("About to be knocked into wall!"); - if (module.Raid.WithSlot().Exclude(actor).WhereSlot(s => _playerAdjustedPositions[s].InCircle(actorAdjPos, _aoeRadius)).Any()) + if (Raid.WithSlot().Exclude(actor).WhereSlot(s => _playerAdjustedPositions[s].InCircle(actorAdjPos, _aoeRadius)).Any()) hints.Add("Spread!"); int partner = FindTetheredPartner(slot); @@ -93,60 +83,60 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint hints.Add("Aim to break tether!"); } - public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) + public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) { return _playerIcons[pcSlot] == 0 ? PlayerPriority.Irrelevant : !_brokenTethers[pcSlot] && _playerIcons[pcSlot] == _playerIcons[playerSlot] ? PlayerPriority.Interesting : PlayerPriority.Normal; } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (_playerIcons[pcSlot] == 0) return; - foreach (var hint in PositionHints(module, pcSlot)) - module.Arena.AddCircle(hint, 1, ArenaColor.Safe); + foreach (var hint in PositionHints(pcSlot)) + Arena.AddCircle(hint, 1, ArenaColor.Safe); int partner = FindTetheredPartner(pcSlot); if (partner >= 0) - arena.AddLine(pc.Position, module.Raid[partner]!.Position, ArenaColor.Safe); + Arena.AddLine(pc.Position, Raid[partner]!.Position, ArenaColor.Safe); - DrawKnockback(pc, _playerAdjustedPositions[pcSlot], arena); + DrawKnockback(pc, _playerAdjustedPositions[pcSlot], Arena); - foreach (var (slot, _) in module.Raid.WithSlot().Exclude(pc)) - arena.AddCircle(_playerAdjustedPositions[slot], _aoeRadius, ArenaColor.Danger); + foreach (var (slot, _) in Raid.WithSlot().Exclude(pc)) + Arena.AddCircle(_playerAdjustedPositions[slot], _aoeRadius, ArenaColor.Danger); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.WingsOfSalvationAOE) { _cleanses.Add(spell.LocXZ); - _relSouth += spell.LocXZ - module.Bounds.Center; + _relSouth += spell.LocXZ - Module.Bounds.Center; } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { - base.OnEventCast(module, caster, spell); + base.OnEventCast(caster, spell); if ((AID)spell.Action.ID == AID.FaithUnmoving) KnockbackDone = true; } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Doom) - _dooms.Set(module.Raid.FindSlot(actor.InstanceID)); + _dooms.Set(Raid.FindSlot(actor.InstanceID)); } - public override void OnUntethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnUntethered(Actor source, ActorTetherInfo tether) { - _brokenTethers.Set(module.Raid.FindSlot(source.InstanceID)); - _brokenTethers.Set(module.Raid.FindSlot(tether.Target)); + _brokenTethers.Set(Raid.FindSlot(source.InstanceID)); + _brokenTethers.Set(Raid.FindSlot(tether.Target)); } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { int icon = (IconID)iconID switch { @@ -158,7 +148,7 @@ public override void OnEventIcon(BossModule module, Actor actor, uint iconID) }; if (icon != 0) { - var slot = module.Raid.FindSlot(actor.InstanceID); + var slot = Raid.FindSlot(actor.InstanceID); if (slot >= 0) _playerIcons[slot] = icon; } @@ -178,7 +168,7 @@ private int FindTetheredPartner(int slot) // note: assumes LPDU strat (circles on E/W cleanses, triangles on SE/NW, crosses on N/S, squares on SW/NE) // TODO: handle bad cleanse placements somehow? or even deaths? - private IEnumerable PositionHints(BossModule module, int slot) + private IEnumerable PositionHints(int slot) { var icon = _playerIcons[slot]; if (icon == 0) @@ -189,17 +179,17 @@ private IEnumerable PositionHints(BossModule module, int slot) switch (icon) { case 1: // circle - show two cleanses closest to E and W - yield return ClosestCleanse(module.Bounds.Center + offset); - yield return ClosestCleanse(module.Bounds.Center - offset); + yield return ClosestCleanse(Module.Bounds.Center + offset); + yield return ClosestCleanse(Module.Bounds.Center - offset); break; case 2: // triangle/square - doom to closest cleanse to SE/SW, otherwise opposite case 4: - var cleanseSpot = ClosestCleanse(module.Bounds.Center + offset); - yield return _dooms[slot] ? cleanseSpot : module.Bounds.Center - (cleanseSpot - module.Bounds.Center); + var cleanseSpot = ClosestCleanse(Module.Bounds.Center + offset); + yield return _dooms[slot] ? cleanseSpot : Module.Bounds.Center - (cleanseSpot - Module.Bounds.Center); break; case 3: // cross - show two spots to N and S - yield return module.Bounds.Center + offset; - yield return module.Bounds.Center - offset; + yield return Module.Bounds.Center + offset; + yield return Module.Bounds.Center - offset; break; } } @@ -207,7 +197,4 @@ private IEnumerable PositionHints(BossModule module, int slot) private WPos ClosestCleanse(WPos p) => _cleanses.MinBy(c => (c - p).LengthSq()); } -class P5DeathOfTheHeavensMeteorCircle : Components.Adds -{ - public P5DeathOfTheHeavensMeteorCircle() : base((uint)OID.MeteorCircle) { } -} +class P5DeathOfTheHeavensMeteorCircle(BossModule module) : Components.Adds(module, (uint)OID.MeteorCircle); diff --git a/BossMod/Modules/Endwalker/Ultimate/DSW2/P5WrathOfTheHeavens.cs b/BossMod/Modules/Endwalker/Ultimate/DSW2/P5WrathOfTheHeavens.cs index 9a2134bbe9..9381ad7aaa 100644 --- a/BossMod/Modules/Endwalker/Ultimate/DSW2/P5WrathOfTheHeavens.cs +++ b/BossMod/Modules/Endwalker/Ultimate/DSW2/P5WrathOfTheHeavens.cs @@ -1,65 +1,59 @@ namespace BossMod.Endwalker.Ultimate.DSW2; -class P5WrathOfTheHeavensSkywardLeap : Components.UniformStackSpread +class P5WrathOfTheHeavensSkywardLeap(BossModule module) : Components.UniformStackSpread(module, 0, 24, alwaysShowSpreads: true, raidwideOnResolve: false) { - public P5WrathOfTheHeavensSkywardLeap() : base(0, 24, alwaysShowSpreads: true, raidwideOnResolve: false) { } - - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddMovementHints(int slot, Actor actor, MovementHints movementHints) { - base.AddHints(module, slot, actor, hints, movementHints); - if (movementHints != null && IsSpreadTarget(actor) && SafeSpot(module) is var safespot && safespot != default) + if (IsSpreadTarget(actor) && SafeSpot() is var safespot && safespot != default) movementHints.Add(actor.Position, safespot, ArenaColor.Safe); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - base.DrawArenaForeground(module, pcSlot, pc, arena); - if (IsSpreadTarget(pc) && SafeSpot(module) is var safespot && safespot != default) - arena.AddCircle(safespot, 1, ArenaColor.Safe); + base.DrawArenaForeground(pcSlot, pc); + if (IsSpreadTarget(pc) && SafeSpot() is var safespot && safespot != default) + Arena.AddCircle(safespot, 1, ArenaColor.Safe); } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.SkywardLeapP5) - AddSpread(actor, module.WorldState.CurrentTime.AddSeconds(6.4f)); + AddSpread(actor, WorldState.FutureTime(6.4f)); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.SkywardLeapP5) Spreads.Clear(); } // note: this assumes LPDU strat - private WPos SafeSpot(BossModule module) + private WPos SafeSpot() { - var relNorth = module.Enemies(OID.Vedrfolnir).FirstOrDefault(); + var relNorth = Module.Enemies(OID.Vedrfolnir).FirstOrDefault(); if (relNorth == null) return default; - var dirToNorth = Angle.FromDirection(relNorth.Position - module.Bounds.Center); - return module.Bounds.Center + 20 * (dirToNorth + 60.Degrees()).ToDirection(); + var dirToNorth = Angle.FromDirection(relNorth.Position - Module.Bounds.Center); + return Module.Bounds.Center + 20 * (dirToNorth + 60.Degrees()).ToDirection(); } } -class P5WrathOfTheHeavensSpiralPierce : Components.BaitAwayTethers +class P5WrathOfTheHeavensSpiralPierce(BossModule module) : Components.BaitAwayTethers(module, new AOEShapeRect(50, 8), (uint)TetherID.SpiralPierce, ActionID.MakeSpell(AID.SpiralPierce)) { - public P5WrathOfTheHeavensSpiralPierce() : base(new AOEShapeRect(50, 8), (uint)TetherID.SpiralPierce, ActionID.MakeSpell(AID.SpiralPierce)) { } - - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddMovementHints(int slot, Actor actor, MovementHints movementHints) { - base.AddHints(module, slot, actor, hints, movementHints); - if (movementHints != null && SafeSpot(module, actor) is var safespot && safespot != default) + if (SafeSpot(actor) is var safespot && safespot != default) movementHints.Add(actor.Position, safespot, ArenaColor.Safe); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - base.DrawArenaForeground(module, pcSlot, pc, arena); - if (SafeSpot(module, pc) is var safespot && safespot != default) - arena.AddCircle(safespot, 1, ArenaColor.Safe); + base.DrawArenaForeground(pcSlot, pc); + if (SafeSpot(pc) is var safespot && safespot != default) + Arena.AddCircle(safespot, 1, ArenaColor.Safe); } - private WPos SafeSpot(BossModule module, Actor actor) + private WPos SafeSpot(Actor actor) { // stay as close to twisting dive as possible, while stretching the tether through the center var bait = ActiveBaitsOn(actor).FirstOrDefault(); @@ -67,41 +61,36 @@ private WPos SafeSpot(BossModule module, Actor actor) return default; WDir toMidpoint = default; foreach (var b in CurrentBaits) - toMidpoint += b.Source.Position - module.Bounds.Center; + toMidpoint += b.Source.Position - Module.Bounds.Center; var relSouthDir = Angle.FromDirection(-toMidpoint); - var offset = toMidpoint.OrthoL().Dot(bait.Source.Position - module.Bounds.Center) > 0 ? 20.Degrees() : -20.Degrees(); - return module.Bounds.Center + 20 * (relSouthDir + offset).ToDirection(); + var offset = toMidpoint.OrthoL().Dot(bait.Source.Position - Module.Bounds.Center) > 0 ? 20.Degrees() : -20.Degrees(); + return Module.Bounds.Center + 20 * (relSouthDir + offset).ToDirection(); } } -class P5WrathOfTheHeavensChainLightning : Components.UniformStackSpread +class P5WrathOfTheHeavensChainLightning(BossModule module) : Components.UniformStackSpread(module, 0, 5, alwaysShowSpreads: true) { public BitMask Targets; - public void ShowSpreads(BossModule module, float delay) => AddSpreads(module.Raid.WithSlot(true).IncludedInMask(Targets).Actors(), module.WorldState.CurrentTime.AddSeconds(delay)); + public void ShowSpreads(float delay) => AddSpreads(Raid.WithSlot(true).IncludedInMask(Targets).Actors(), WorldState.FutureTime(delay)); - public P5WrathOfTheHeavensChainLightning() : base(0, 5, alwaysShowSpreads: true) { } - - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (Spreads.Count == 0 && Targets[slot]) hints.Add("Prepare for lightning!", false); - base.AddHints(module, slot, actor, hints, movementHints); + base.AddHints(slot, actor, hints); } - public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) - { - return Targets[playerSlot] ? PlayerPriority.Danger : PlayerPriority.Irrelevant; - } + public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) => Targets[playerSlot] ? PlayerPriority.Danger : PlayerPriority.Irrelevant; // note: this happens about a second before statuses appear - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { case AID.ChainLightning: foreach (var t in spell.Targets) - Targets.Set(module.Raid.FindSlot(t.ID)); + Targets.Set(Raid.FindSlot(t.ID)); break; case AID.ChainLightningAOE: Targets.Reset(); @@ -114,15 +103,19 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent class P5WrathOfTheHeavensTwister : Components.GenericAOEs { private List _predicted = new(); - private IReadOnlyList _voidzones = ActorEnumeration.EmptyList; + private IReadOnlyList _voidzones; private static readonly AOEShapeCircle _shape = new(2); // TODO: verify radius public bool Active => _voidzones.Count > 0; - public P5WrathOfTheHeavensTwister() : base(default, "GTFO from twister!") { } + public P5WrathOfTheHeavensTwister(BossModule module) : base(module, default, "GTFO from twister!") + { + _predicted.AddRange(Raid.WithoutSlot().Select(a => a.Position)); + _voidzones = module.Enemies(OID.VoidzoneTwister); + } - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { foreach (var p in _predicted) yield return new(_shape, p); // TODO: activation @@ -130,13 +123,7 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, yield return new(_shape, p.Position); } - public override void Init(BossModule module) - { - _predicted.AddRange(module.Raid.WithoutSlot().Select(a => a.Position)); - _voidzones = module.Enemies(OID.VoidzoneTwister); - } - - public override void OnActorCreated(BossModule module, Actor actor) + public override void OnActorCreated(Actor actor) { if ((OID)actor.OID == OID.VoidzoneTwister) _predicted.Clear(); @@ -144,78 +131,66 @@ public override void OnActorCreated(BossModule module, Actor actor) } // note: we're not really showing baits here, it's more misleading than helpful... -class P5WrathOfTheHeavensCauterizeBait : BossComponent +class P5WrathOfTheHeavensCauterizeBait(BossModule module) : BossComponent(module) { private Actor? _target; - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_target != actor) return; hints.Add("Prepare for divebomb!", false); - if (movementHints != null) - movementHints.Add(actor.Position, SafeSpot(module), ArenaColor.Safe); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void AddMovementHints(int slot, Actor actor, MovementHints movementHints) + { + if (_target != actor) + return; + movementHints.Add(actor.Position, SafeSpot(), ArenaColor.Safe); + } + + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (_target == pc) - arena.AddCircle(SafeSpot(module), 1, ArenaColor.Safe); + Arena.AddCircle(SafeSpot(), 1, ArenaColor.Safe); } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.Cauterize) _target = actor; } - private WPos SafeSpot(BossModule module) + private WPos SafeSpot() { - var charibert = module.Enemies(OID.SerCharibert).FirstOrDefault(); + var charibert = Module.Enemies(OID.SerCharibert).FirstOrDefault(); if (charibert == null) return default; - return module.Bounds.Center + 20 * (charibert.Position - module.Bounds.Center).Normalized(); + return Module.Bounds.Center + 20 * (charibert.Position - Module.Bounds.Center).Normalized(); } } -class P5WrathOfTheHeavensAscalonsMercyRevealed : Components.BaitAwayEveryone -{ - public P5WrathOfTheHeavensAscalonsMercyRevealed() : base(new AOEShapeCone(50, 15.Degrees()), ActionID.MakeSpell(AID.AscalonsMercyRevealedAOE)) { } - - public override void Init(BossModule module) - { - if (module.Enemies(OID.BossP5).FirstOrDefault() is var source && source != null) - SetSource(module, source); - } -} +class P5WrathOfTheHeavensAscalonsMercyRevealed(BossModule module) : Components.BaitAwayEveryone(module, module.Enemies(OID.BossP5).FirstOrDefault(), new AOEShapeCone(50, 15.Degrees()), ActionID.MakeSpell(AID.AscalonsMercyRevealedAOE)); // TODO: detect baiter -class P5WrathOfTheHeavensLiquidHeaven : Components.PersistentVoidzoneAtCastTarget -{ - public P5WrathOfTheHeavensLiquidHeaven() : base(6, ActionID.MakeSpell(AID.LiquidHeaven), m => m.Enemies(OID.VoidzoneLiquidHeaven).Where(z => z.EventState != 7), 1.1f) { } -} +class P5WrathOfTheHeavensLiquidHeaven(BossModule module) : Components.PersistentVoidzoneAtCastTarget(module, 6, ActionID.MakeSpell(AID.LiquidHeaven), m => m.Enemies(OID.VoidzoneLiquidHeaven).Where(z => z.EventState != 7), 1.1f); // TODO: detect baiter -class P5WrathOfTheHeavensAltarFlare : Components.LocationTargetedAOEs -{ - public P5WrathOfTheHeavensAltarFlare() : base(ActionID.MakeSpell(AID.AltarFlareAOE), 8) { } -} +class P5WrathOfTheHeavensAltarFlare(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.AltarFlareAOE), 8); -class P5WrathOfTheHeavensEmptyDimension : Components.SelfTargetedAOEs +class P5WrathOfTheHeavensEmptyDimension(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.EmptyDimension), new AOEShapeDonut(6, 70)) { private WPos _predicted; public bool KnowPosition => _predicted != default; - public P5WrathOfTheHeavensEmptyDimension() : base(ActionID.MakeSpell(AID.EmptyDimension), new AOEShapeDonut(6, 70)) { } - - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (Casters.Count == 0 && KnowPosition) - arena.AddCircle(_predicted, 6, ArenaColor.Safe, 2); + Arena.AddCircle(_predicted, 6, ArenaColor.Safe, 2); } - public override void OnActorPlayActionTimelineEvent(BossModule module, Actor actor, ushort id) + public override void OnActorPlayActionTimelineEvent(Actor actor, ushort id) { if ((OID)actor.OID == OID.SerGrinnaux && id == 0x1E43) _predicted = actor.Position; diff --git a/BossMod/Modules/Endwalker/Ultimate/DSW2/P6AkhAfah.cs b/BossMod/Modules/Endwalker/Ultimate/DSW2/P6AkhAfah.cs index 71821e1be9..e077b8f685 100644 --- a/BossMod/Modules/Endwalker/Ultimate/DSW2/P6AkhAfah.cs +++ b/BossMod/Modules/Endwalker/Ultimate/DSW2/P6AkhAfah.cs @@ -5,13 +5,13 @@ class P6HPCheck : BossComponent private Actor? _nidhogg; private Actor? _hraesvelgr; - public override void Init(BossModule module) + public P6HPCheck(BossModule module) : base(module) { _nidhogg = module.Enemies(OID.NidhoggP6).FirstOrDefault(); _hraesvelgr = module.Enemies(OID.HraesvelgrP6).FirstOrDefault(); } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (_nidhogg != null && _hraesvelgr != null) { @@ -21,19 +21,17 @@ public override void AddGlobalHints(BossModule module, GlobalHints hints) } } -class P6AkhAfah : Components.UniformStackSpread +class P6AkhAfah(BossModule module) : Components.UniformStackSpread(module, 4, 0, 4) { public bool Done { get; private set; } - public P6AkhAfah() : base(4, 0, 4) { } - - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.AkhAfahN) - AddStacks(module.Raid.WithoutSlot(true).Where(p => p.Role == Role.Healer)); + AddStacks(Raid.WithoutSlot(true).Where(p => p.Role == Role.Healer)); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.AkhAfahHAOE or AID.AkhAfahNAOE) { diff --git a/BossMod/Modules/Endwalker/Ultimate/DSW2/P6HallowedWings.cs b/BossMod/Modules/Endwalker/Ultimate/DSW2/P6HallowedWings.cs index d935ba6cd5..8ef6cc1c64 100644 --- a/BossMod/Modules/Endwalker/Ultimate/DSW2/P6HallowedWings.cs +++ b/BossMod/Modules/Endwalker/Ultimate/DSW2/P6HallowedWings.cs @@ -1,14 +1,14 @@ namespace BossMod.Endwalker.Ultimate.DSW2; -class P6HallowedWings : Components.GenericAOEs +class P6HallowedWings(BossModule module) : Components.GenericAOEs(module) { public AOEInstance? AOE; // origin is always (122, 100 +- 11), direction -90 private static readonly AOEShapeRect _shape = new(50, 11); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => Utils.ZeroOrOne(AOE); + public override IEnumerable ActiveAOEs(int slot, Actor actor) => Utils.ZeroOrOne(AOE); - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { var offset = (AID)spell.Action.ID switch { @@ -22,30 +22,28 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf AOE = new(_shape, origin, spell.Rotation, spell.NPCFinishAt.AddSeconds(0.8f)); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.HallowedWingsAOELeft or AID.HallowedWingsAOERight or AID.CauterizeN) ++NumCasts; } } +// note: we want to show hint much earlier than cast start - we assume component is created right as hallowed wings starts, meaning nidhogg is already in place class P6CauterizeN : Components.GenericAOEs { public AOEInstance? AOE; // origin is always (100 +- 11, 100 +- 34), direction 0/180 private static readonly AOEShapeRect _shape = new(80, 11); - public P6CauterizeN() : base(ActionID.MakeSpell(AID.CauterizeN)) { } - - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => Utils.ZeroOrOne(AOE); - - // note: we want to show hint much earlier than cast start - we assume component is created right as hallowed wings starts, meaning nidhogg is already in place - public override void Init(BossModule module) + public P6CauterizeN(BossModule module) : base(module, ActionID.MakeSpell(AID.CauterizeN)) { var caster = module.Enemies(OID.NidhoggP6).FirstOrDefault(); if (caster != null) - AOE = new(_shape, caster.Position, caster.Rotation, module.WorldState.CurrentTime.AddSeconds(8.6f)); + AOE = new(_shape, caster.Position, caster.Rotation, WorldState.FutureTime(8.6f)); } + + public override IEnumerable ActiveAOEs(int slot, Actor actor) => Utils.ZeroOrOne(AOE); } abstract class P6HallowedPlume : Components.GenericBaitAway @@ -56,23 +54,24 @@ abstract class P6HallowedPlume : Components.GenericBaitAway private static readonly AOEShapeCircle _shape = new(10); - public P6HallowedPlume() : base(ActionID.MakeSpell(AID.HallowedPlume), centerAtTarget: true) { } - - public override void Init(BossModule module) => _wings = module.FindComponent(); + public P6HallowedPlume(BossModule module) : base(module, ActionID.MakeSpell(AID.HallowedPlume), centerAtTarget: true) + { + _wings = module.FindComponent(); + } - public override void Update(BossModule module) + public override void Update() { CurrentBaits.Clear(); if (_caster != null) { - var players = module.Raid.WithoutSlot().SortedByRange(_caster.Position); + var players = Raid.WithoutSlot().SortedByRange(_caster.Position); var targets = _far ? players.TakeLast(2) : players.Take(2); foreach (var t in targets) CurrentBaits.Add(new(_caster, t, _shape)); } } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { bool shouldBait = actor.Role == Role.Tank; bool isBaiting = ActiveBaitsOn(actor).Any(); @@ -83,7 +82,7 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint { if (shouldBait) { - if (ActiveBaitsOn(actor).Any(b => PlayersClippedBy(module, b).Any())) + if (ActiveBaitsOn(actor).Any(b => PlayersClippedBy(b).Any())) hints.Add("Bait away from raid!"); } else @@ -92,26 +91,28 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint hints.Add("GTFO from baited aoe!"); } } + } - if (movementHints != null) - foreach (var p in SafeSpots(module, actor)) - movementHints.Add(actor.Position, p, ArenaColor.Safe); + public override void AddMovementHints(int slot, Actor actor, MovementHints movementHints) + { + foreach (var p in SafeSpots(actor)) + movementHints.Add(actor.Position, p, ArenaColor.Safe); } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (_caster != null) hints.Add($"Tankbuster {(_far ? "far" : "near")}"); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - base.DrawArenaForeground(module, pcSlot, pc, arena); - foreach (var p in SafeSpots(module, pc)) - arena.AddCircle(p, 1, ArenaColor.Safe); + base.DrawArenaForeground(pcSlot, pc); + foreach (var p in SafeSpots(pc)) + Arena.AddCircle(p, 1, ArenaColor.Safe); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { bool? far = (AID)spell.Action.ID switch { @@ -126,27 +127,26 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - protected abstract IEnumerable SafeSpots(BossModule module, Actor actor); + protected abstract IEnumerable SafeSpots(Actor actor); } class P6HallowedPlume1 : P6HallowedPlume { private P6CauterizeN? _cauterize; - public override void Init(BossModule module) + public P6HallowedPlume1(BossModule module) : base(module) { - base.Init(module); _cauterize = module.FindComponent(); } - protected override IEnumerable SafeSpots(BossModule module, Actor actor) + protected override IEnumerable SafeSpots(Actor actor) { if (_wings?.AOE == null || _cauterize?.AOE == null) yield break; - var safeSpotCenter = module.Bounds.Center; - safeSpotCenter.Z -= _wings.AOE.Value.Origin.Z - module.Bounds.Center.Z; - safeSpotCenter.X -= _cauterize.AOE.Value.Origin.X - module.Bounds.Center.X; + var safeSpotCenter = Module.Bounds.Center; + safeSpotCenter.Z -= _wings.AOE.Value.Origin.Z - Module.Bounds.Center.Z; + safeSpotCenter.X -= _cauterize.AOE.Value.Origin.X - Module.Bounds.Center.X; bool shouldBait = actor.Role == Role.Tank; bool stayFar = shouldBait == _far; @@ -168,13 +168,12 @@ class P6HallowedPlume2 : P6HallowedPlume { private P6HotWingTail? _wingTail; - public override void Init(BossModule module) + public P6HallowedPlume2(BossModule module) : base(module) { - base.Init(module); _wingTail = module.FindComponent(); } - protected override IEnumerable SafeSpots(BossModule module, Actor actor) + protected override IEnumerable SafeSpots(Actor actor) { if (_wings?.AOE == null || _wingTail == null) yield break; @@ -185,8 +184,8 @@ protected override IEnumerable SafeSpots(BossModule module, Actor actor) 2 => 4.0f / 11, _ => 1 }; - var safeSpotCenter = module.Bounds.Center; - safeSpotCenter.Z -= zCoeff * (_wings.AOE.Value.Origin.Z - module.Bounds.Center.Z); + var safeSpotCenter = Module.Bounds.Center; + safeSpotCenter.Z -= zCoeff * (_wings.AOE.Value.Origin.Z - Module.Bounds.Center.Z); bool shouldBait = actor.Role == Role.Tank; bool stayFar = shouldBait == _far; diff --git a/BossMod/Modules/Endwalker/Ultimate/DSW2/P6HotWingTail.cs b/BossMod/Modules/Endwalker/Ultimate/DSW2/P6HotWingTail.cs index 0ed41758ec..6fda4655cb 100644 --- a/BossMod/Modules/Endwalker/Ultimate/DSW2/P6HotWingTail.cs +++ b/BossMod/Modules/Endwalker/Ultimate/DSW2/P6HotWingTail.cs @@ -1,6 +1,6 @@ namespace BossMod.Endwalker.Ultimate.DSW2; -class P6HotWingTail : Components.GenericAOEs +class P6HotWingTail(BossModule module) : Components.GenericAOEs(module) { private List _aoes = new(); @@ -9,9 +9,9 @@ class P6HotWingTail : Components.GenericAOEs public int NumAOEs => _aoes.Count; // 0 if not started, 1 if tail, 2 if wings - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => _aoes.Skip(NumCasts); + public override IEnumerable ActiveAOEs(int slot, Actor actor) => _aoes.Skip(NumCasts); - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { AOEShape? shape = (AID)spell.Action.ID switch { @@ -24,7 +24,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } // note: we don't remove aoe's, since that is used e.g. by spreads component - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.HotWingAOE or AID.HotTailAOE) ++NumCasts; diff --git a/BossMod/Modules/Endwalker/Ultimate/DSW2/P6MortalVow.cs b/BossMod/Modules/Endwalker/Ultimate/DSW2/P6MortalVow.cs index 8fdd4778ea..4d27a76950 100644 --- a/BossMod/Modules/Endwalker/Ultimate/DSW2/P6MortalVow.cs +++ b/BossMod/Modules/Endwalker/Ultimate/DSW2/P6MortalVow.cs @@ -3,47 +3,41 @@ class P6MortalVow : Components.UniformStackSpread { public int Progress { get; private set; } // 0 before application, N before Nth pass - private DSW2Config _config; + private DSW2Config _config = Service.Config.Get(); private Actor? _vow; private Actor? _target; private DateTime _vowExpiration; private DateTime[] _atonementExpiration = new DateTime[PartyState.MaxPartySize]; - public P6MortalVow() : base(5, 5, 2, 2, true, false) + public P6MortalVow(BossModule module) : base(module, 5, 5, 2, 2, true, false) { - _config = Service.Config.Get(); + // prepare for initial application on random DD + AddSpreads(Raid.WithoutSlot(true).Where(p => p.Class.IsDD())); // TODO: activation } - public void ShowNextPass(BossModule module) + public void ShowNextPass() { if (_vow == null) return; - _target = DetermineNextPassTarget(module); - var forbidden = _target != null ? module.Raid.WithSlot(true).Exclude(_target).Mask() : module.Raid.WithSlot(true).WhereSlot(i => _atonementExpiration[i] < _vowExpiration).Mask(); + _target = DetermineNextPassTarget(); + var forbidden = _target != null ? Raid.WithSlot(true).Exclude(_target).Mask() : Raid.WithSlot(true).WhereSlot(i => _atonementExpiration[i] < _vowExpiration).Mask(); AddStack(_vow, _vowExpiration, forbidden); } - public override void Init(BossModule module) - { - // prepare for initial application on random DD - AddSpreads(module.Raid.WithoutSlot(true).Where(p => p.Class.IsDD())); // TODO: activation - } - - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddMovementHints(int slot, Actor actor, MovementHints movementHints) { - base.AddHints(module, slot, actor, hints, movementHints); - if (movementHints != null && _vow != null && _target != null && (actor == _vow || actor == _target)) + if (_vow != null && _target != null && (actor == _vow || actor == _target)) movementHints.Add(actor.Position, (actor == _vow ? _target : _vow).Position, ArenaColor.Safe); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - base.DrawArenaForeground(module, pcSlot, pc, arena); + base.DrawArenaForeground(pcSlot, pc); if (_vow != null && _target != null && (pc == _vow || pc == _target)) - arena.AddCircle(module.Bounds.Center, 1, ArenaColor.Safe); + Arena.AddCircle(Module.Bounds.Center, 1, ArenaColor.Safe); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { switch ((SID)status.ID) { @@ -52,14 +46,14 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st _vowExpiration = status.ExpireAt; break; case SID.MortalAtonement: - var slot = module.Raid.FindSlot(actor.InstanceID); + var slot = Raid.FindSlot(actor.InstanceID); if (slot >= 0) _atonementExpiration[slot] = status.ExpireAt; break; } } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { switch ((SID)status.ID) { @@ -68,14 +62,14 @@ public override void OnStatusLose(BossModule module, Actor actor, ActorStatus st _vow = null; break; case SID.MortalAtonement: - var slot = module.Raid.FindSlot(actor.InstanceID); + var slot = Raid.FindSlot(actor.InstanceID); if (slot >= 0) _atonementExpiration[slot] = default; break; } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.MortalVowApply or AID.MortalVowPass) { @@ -86,12 +80,12 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } - private Actor? DetermineNextPassTarget(BossModule module) + private Actor? DetermineNextPassTarget() { if (_config.P6MortalVowOrder == DSW2Config.P6MortalVow.None) return null; - var assignments = Service.Config.Get().SlotsPerAssignment(module.Raid); + var assignments = Service.Config.Get().SlotsPerAssignment(Raid); if (assignments.Length == 0) return null; // if assignments are unset, we can't define pass priority @@ -103,7 +97,7 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent 4 => _config.P6MortalVowOrder == DSW2Config.P6MortalVow.TanksMeleeR1 ? PartyRolesConfig.Assignment.R1 : PartyRolesConfig.Assignment.R2, _ => PartyRolesConfig.Assignment.Unassigned }; - return role != PartyRolesConfig.Assignment.Unassigned && CanPassVowTo(assignments, role) ? module.Raid[assignments[(int)role]] : null; + return role != PartyRolesConfig.Assignment.Unassigned && CanPassVowTo(assignments, role) ? Raid[assignments[(int)role]] : null; } private bool CanPassVowTo(int[] assignments, PartyRolesConfig.Assignment role) => _atonementExpiration[assignments[(int)role]] < _vowExpiration; diff --git a/BossMod/Modules/Endwalker/Ultimate/DSW2/P6Touchdown.cs b/BossMod/Modules/Endwalker/Ultimate/DSW2/P6Touchdown.cs index 398fb07b81..a6d9f68d5b 100644 --- a/BossMod/Modules/Endwalker/Ultimate/DSW2/P6Touchdown.cs +++ b/BossMod/Modules/Endwalker/Ultimate/DSW2/P6Touchdown.cs @@ -1,20 +1,18 @@ namespace BossMod.Endwalker.Ultimate.DSW2; -class P6Touchdown : Components.GenericAOEs +class P6Touchdown(BossModule module) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.TouchdownAOE)) { private static readonly AOEShapeCircle _shape = new(20); // TODO: verify falloff - public P6Touchdown() : base(ActionID.MakeSpell(AID.TouchdownAOE)) { } - - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { // TODO: activation - yield return new(_shape, module.Bounds.Center); - yield return new(_shape, module.Bounds.Center + new WDir(0, 25)); + yield return new(_shape, Module.Bounds.Center); + yield return new(_shape, Module.Bounds.Center + new WDir(0, 25)); } } -class P6TouchdownCauterize : BossComponent +class P6TouchdownCauterize(BossModule module) : BossComponent(module) { private Actor? _nidhogg; private Actor? _hraesvelgr; @@ -23,42 +21,42 @@ class P6TouchdownCauterize : BossComponent private static readonly AOEShapeRect _shape = new(80, 11); - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { - bool nidhoggSide = actor.Position.X < module.Bounds.Center.X; // note: assume nidhogg cleaves whole left side, hraes whole right side + bool nidhoggSide = actor.Position.X < Module.Bounds.Center.X; // note: assume nidhogg cleaves whole left side, hraes whole right side var forbiddenMask = nidhoggSide ? _boiling : _freezing; if (forbiddenMask[slot]) hints.Add("GTFO from wrong side!"); // note: assume both dragons are always at north side - bool isClosest = module.Raid.WithoutSlot().Where(p => (p.Position.X < module.Bounds.Center.X) == nidhoggSide).MinBy(p => p.PosRot.Z) == actor; + bool isClosest = Raid.WithoutSlot().Where(p => (p.Position.X < Module.Bounds.Center.X) == nidhoggSide).MinBy(p => p.PosRot.Z) == actor; bool shouldBeClosest = actor.Role == Role.Tank; if (isClosest != shouldBeClosest) hints.Add(shouldBeClosest ? "Move closer to dragons!" : "Move away from dragons!"); } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { if (_boiling[pcSlot] && _nidhogg != null) - _shape.Draw(arena, _nidhogg); + _shape.Draw(Arena, _nidhogg); if (_freezing[pcSlot] && _hraesvelgr != null) - _shape.Draw(arena, _hraesvelgr); + _shape.Draw(Arena, _hraesvelgr); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { switch ((SID)status.ID) { case SID.Boiling: - _boiling.Set(module.Raid.FindSlot(actor.InstanceID)); + _boiling.Set(Raid.FindSlot(actor.InstanceID)); break; case SID.Freezing: - _freezing.Set(module.Raid.FindSlot(actor.InstanceID)); + _freezing.Set(Raid.FindSlot(actor.InstanceID)); break; } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { diff --git a/BossMod/Modules/Endwalker/Ultimate/DSW2/P6WrothFlames.cs b/BossMod/Modules/Endwalker/Ultimate/DSW2/P6WrothFlames.cs index 00228c24bd..11fde026cc 100644 --- a/BossMod/Modules/Endwalker/Ultimate/DSW2/P6WrothFlames.cs +++ b/BossMod/Modules/Endwalker/Ultimate/DSW2/P6WrothFlames.cs @@ -10,38 +10,37 @@ class P6WrothFlames : Components.GenericAOEs public bool ShowStartingSpot => _startingSpot.X != 0 && _startingSpot.Z != 0 && NumCasts == 0; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => _aoes.Take(NumCasts > 0 ? 3 : 4); - // assume it is activated when hraesvelgr is already in place; could rely on PATE 1E43 instead - public override void Init(BossModule module) + public P6WrothFlames(BossModule module) : base(module) { var cauterizeCaster = module.Enemies(OID.HraesvelgrP6).FirstOrDefault(); if (cauterizeCaster != null) { - _aoes.Add(new(_shapeCauterize, cauterizeCaster.Position, cauterizeCaster.Rotation, module.WorldState.CurrentTime.AddSeconds(8.1f))); + _aoes.Add(new(_shapeCauterize, cauterizeCaster.Position, cauterizeCaster.Rotation, WorldState.FutureTime(8.1f))); _startingSpot.X = cauterizeCaster.Position.X < 95 ? 120 : 80; // assume nidhogg is at 78, prefer uptime if possible } } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override IEnumerable ActiveAOEs(int slot, Actor actor) => _aoes.Take(NumCasts > 0 ? 3 : 4); + + public override void AddMovementHints(int slot, Actor actor, MovementHints movementHints) { - base.AddHints(module, slot, actor, hints, movementHints); - if (movementHints != null && ShowStartingSpot) + if (ShowStartingSpot) movementHints.Add(actor.Position, _startingSpot, ArenaColor.Safe); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (ShowStartingSpot) - arena.AddCircle(_startingSpot, 1, ArenaColor.Safe); + Arena.AddCircle(_startingSpot, 1, ArenaColor.Safe); } - public override void OnActorCreated(BossModule module, Actor actor) + public override void OnActorCreated(Actor actor) { if ((OID)actor.OID == OID.ScarletPrice) { if (_aoes.Count == 4) - _startingSpot.Z = actor.Position.Z < module.Bounds.Center.Z ? 120 : 80; + _startingSpot.Z = actor.Position.Z < Module.Bounds.Center.Z ? 120 : 80; var delay = _aoes.Count switch { @@ -49,11 +48,11 @@ public override void OnActorCreated(BossModule module, Actor actor) < 7 => 9.7f, _ => 6.9f }; - _aoes.Add(new(_shapeBlast, actor.Position, default, module.WorldState.CurrentTime.AddSeconds(delay))); + _aoes.Add(new(_shapeBlast, actor.Position, default, WorldState.FutureTime(delay))); } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.CauterizeH or AID.FlameBlast) { @@ -64,13 +63,11 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } -class P6AkhMorn : Components.StackWithCastTargets +class P6AkhMorn(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.AkhMornFirst), 6, 8) { - public P6AkhMorn() : base(ActionID.MakeSpell(AID.AkhMornFirst), 6, 8) { } - - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) { } // do not clear stacks on first cast + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { } // do not clear stacks on first cast - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.AkhMornFirst or AID.AkhMornRest) if (++NumFinishedStacks >= 4) @@ -78,40 +75,33 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } -class P6AkhMornVoidzone : Components.PersistentVoidzone -{ - public P6AkhMornVoidzone() : base(6, m => m.Enemies(OID.VoidzoneAhkMorn).Where(z => z.EventState != 7)) { } -} +class P6AkhMornVoidzone(BossModule module) : Components.PersistentVoidzone(module, 6, m => m.Enemies(OID.VoidzoneAhkMorn).Where(z => z.EventState != 7)); class P6SpreadingEntangledFlames : Components.UniformStackSpread { private P6HotWingTail? _wingTail; private bool _voidzonesNorth; - public P6SpreadingEntangledFlames() : base(4, 5, 2, alwaysShowSpreads: true) { } - - public override void Init(BossModule module) + public P6SpreadingEntangledFlames(BossModule module) : base(module, 4, 5, 2, alwaysShowSpreads: true) { _wingTail = module.FindComponent(); - _voidzonesNorth = module.Enemies(OID.VoidzoneAhkMorn).Sum(z => z.Position.Z - module.Bounds.Center.Z) < 0; + _voidzonesNorth = module.Enemies(OID.VoidzoneAhkMorn).Sum(z => z.Position.Z - Module.Bounds.Center.Z) < 0; } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddMovementHints(int slot, Actor actor, MovementHints movementHints) { - base.AddHints(module, slot, actor, hints, movementHints); - if (movementHints != null) - foreach (var p in SafeSpots(module, actor)) - movementHints.Add(actor.Position, p, ArenaColor.Safe); + foreach (var p in SafeSpots(actor)) + movementHints.Add(actor.Position, p, ArenaColor.Safe); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - base.DrawArenaForeground(module, pcSlot, pc, arena); - foreach (var p in SafeSpots(module, pc)) - arena.AddCircle(p, 1, ArenaColor.Safe); + base.DrawArenaForeground(pcSlot, pc); + foreach (var p in SafeSpots(pc)) + Arena.AddCircle(p, 1, ArenaColor.Safe); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { // TODO: activation switch ((SID)status.ID) @@ -125,7 +115,7 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { @@ -140,23 +130,23 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent // note: this assumes standard positions (spreads = black debuffs = under black dragon nidhogg, etc) // TODO: consider assigning concrete spots to each player - private IEnumerable SafeSpots(BossModule module, Actor actor) + private IEnumerable SafeSpots(Actor actor) { if (_wingTail == null) yield break; - float z = module.Bounds.Center.Z + (_wingTail.NumAOEs != 1 ? 0 : _voidzonesNorth ? 10 : -10); + float z = Module.Bounds.Center.Z + (_wingTail.NumAOEs != 1 ? 0 : _voidzonesNorth ? 10 : -10); if (IsSpreadTarget(actor)) { - yield return new WPos(module.Bounds.Center.X - 18, z); - yield return new WPos(module.Bounds.Center.X - 12, z); - yield return new WPos(module.Bounds.Center.X - 6, z); - yield return new WPos(module.Bounds.Center.X, z); + yield return new WPos(Module.Bounds.Center.X - 18, z); + yield return new WPos(Module.Bounds.Center.X - 12, z); + yield return new WPos(Module.Bounds.Center.X - 6, z); + yield return new WPos(Module.Bounds.Center.X, z); } else { - yield return new WPos(module.Bounds.Center.X + 9, z); - yield return new WPos(module.Bounds.Center.X + 18, z); + yield return new WPos(Module.Bounds.Center.X + 9, z); + yield return new WPos(Module.Bounds.Center.X + 18, z); } } } diff --git a/BossMod/Modules/Endwalker/Ultimate/DSW2/P6Wyrmsbreath.cs b/BossMod/Modules/Endwalker/Ultimate/DSW2/P6Wyrmsbreath.cs index 85c855270a..04c11c1809 100644 --- a/BossMod/Modules/Endwalker/Ultimate/DSW2/P6Wyrmsbreath.cs +++ b/BossMod/Modules/Endwalker/Ultimate/DSW2/P6Wyrmsbreath.cs @@ -1,22 +1,17 @@ namespace BossMod.Endwalker.Ultimate.DSW2; // baited cones part of the mechanic -class P6Wyrmsbreath : Components.GenericBaitAway +class P6Wyrmsbreath(BossModule module, bool allowIntersect) : Components.GenericBaitAway(module, ActionID.MakeSpell(AID.FlameBreath)) // note: cast is arbitrary { public Actor?[] Dragons = { null, null }; // nidhogg & hraesvelgr public BitMask Glows; - private bool _allowIntersect; + private bool _allowIntersect = allowIntersect; private Actor?[] _tetheredTo = new Actor?[PartyState.MaxPartySize]; private BitMask _tooClose; private static readonly AOEShapeCone _shape = new(100, 10.Degrees()); // TODO: verify angle - public P6Wyrmsbreath(bool allowIntersect) : base(ActionID.MakeSpell(AID.FlameBreath)) // note: cast is arbitrary - { - _allowIntersect = allowIntersect; - } - - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { var b = ActiveBaitsOn(actor).FirstOrDefault(); if (b.Source == null) @@ -29,34 +24,34 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint if (_tooClose[slot]) hints.Add("Stretch the tether!"); - Actor? partner = IgnoredPartner(module, slot, actor); - if (ActiveBaitsOn(actor).Any(b => PlayersClippedBy(module, b).Any(p => p != partner))) + Actor? partner = IgnoredPartner(slot, actor); + if (ActiveBaitsOn(actor).Any(b => PlayersClippedBy(b).Any(p => p != partner))) hints.Add("Bait away from raid!"); if (ActiveBaitsNotOn(actor).Any(b => b.Target != partner && IsClippedBy(actor, b))) hints.Add("GTFO from baited aoe!"); } } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (Glows.Any()) hints.Add(Glows.Raw == 3 ? "Tankbuster: shared" : "Tankbuster: solo"); } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { - Actor? partner = IgnoredPartner(module, pcSlot, pc); + Actor? partner = IgnoredPartner(pcSlot, pc); foreach (var bait in ActiveBaitsNotOn(pc).Where(b => b.Target != partner)) - bait.Shape.Draw(arena, BaitOrigin(bait), bait.Rotation); + bait.Shape.Draw(Arena, BaitOrigin(bait), bait.Rotation); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (var bait in ActiveBaitsOn(pc)) - bait.Shape.Outline(arena, BaitOrigin(bait), bait.Rotation); + bait.Shape.Outline(Arena, BaitOrigin(bait), bait.Rotation); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { @@ -77,12 +72,12 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnTethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnTethered(Actor source, ActorTetherInfo tether) { if ((TetherID)tether.ID is TetherID.FlameBreath or TetherID.IceBreath or TetherID.FlameIceBreathNear) { - var slot = module.Raid.FindSlot(source.InstanceID); - var boss = module.WorldState.Actors.Find(tether.Target); + var slot = Raid.FindSlot(source.InstanceID); + var boss = WorldState.Actors.Find(tether.Target); if (slot >= 0 && boss != null) { if (_tetheredTo[slot] == null) @@ -93,28 +88,29 @@ public override void OnTethered(BossModule module, Actor source, ActorTetherInfo } } - private Actor? IgnoredPartner(BossModule module, int slot, Actor actor) => _allowIntersect && _tetheredTo[slot] != null ? module.Raid.WithSlot().WhereSlot(i => _tetheredTo[i] != null && _tetheredTo[i] != _tetheredTo[slot]).Closest(actor.Position).Item2 : null; + private Actor? IgnoredPartner(int slot, Actor actor) => _allowIntersect && _tetheredTo[slot] != null ? Raid.WithSlot().WhereSlot(i => _tetheredTo[i] != null && _tetheredTo[i] != _tetheredTo[slot]).Closest(actor.Position).Item2 : null; } -class P6Wyrmsbreath1 : P6Wyrmsbreath { public P6Wyrmsbreath1() : base(true) { } } -class P6Wyrmsbreath2 : P6Wyrmsbreath { public P6Wyrmsbreath2() : base(false) { } } +class P6Wyrmsbreath1(BossModule module) : P6Wyrmsbreath(module, true); +class P6Wyrmsbreath2(BossModule module) : P6Wyrmsbreath(module, false); // note: it is actually symmetrical (both tanks get tankbusters), but that is hard to express, so we select one to show arbitrarily (nidhogg) class P6WyrmsbreathTankbusterShared : Components.GenericSharedTankbuster { private P6Wyrmsbreath? _main; - public P6WyrmsbreathTankbusterShared() : base(ActionID.MakeSpell(AID.DarkOrb), 6) { } - - public override void Init(BossModule module) => _main = module.FindComponent(); + public P6WyrmsbreathTankbusterShared(BossModule module) : base(module, ActionID.MakeSpell(AID.DarkOrb), 6) + { + _main = module.FindComponent(); + } - public override void Update(BossModule module) + public override void Update() { Source = Target = null; if (_main?.Glows.Raw == 3) { Source = _main.Dragons[0]; - Target = module.WorldState.Actors.Find(Source?.TargetID ?? 0); - Activation = Source?.CastInfo?.NPCFinishAt ?? module.WorldState.CurrentTime; + Target = WorldState.Actors.Find(Source?.TargetID ?? 0); + Activation = Source?.CastInfo?.NPCFinishAt ?? WorldState.CurrentTime; } } } @@ -125,17 +121,18 @@ class P6WyrmsbreathTankbusterSolo : Components.GenericBaitAway private static readonly AOEShapeCircle _shape = new(15); - public P6WyrmsbreathTankbusterSolo() : base(centerAtTarget: true) { } - - public override void Init(BossModule module) => _main = module.FindComponent(); + public P6WyrmsbreathTankbusterSolo(BossModule module) : base(module, centerAtTarget: true) + { + _main = module.FindComponent(); + } - public override void Update(BossModule module) + public override void Update() { CurrentBaits.Clear(); if (_main?.Glows.Raw is 1 or 2) { var source = _main.Dragons[_main.Glows.Raw == 1 ? 1 : 0]; - var target = module.WorldState.Actors.Find(source?.TargetID ?? 0); + var target = WorldState.Actors.Find(source?.TargetID ?? 0); if (source != null && target != null) CurrentBaits.Add(new(source, target, _shape)); } @@ -148,7 +145,12 @@ class P6WyrmsbreathCone : Components.GenericAOEs private static readonly AOEShapeCone _shape = new(50, 15.Degrees()); // TODO: verify angle - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public P6WyrmsbreathCone(BossModule module) : base(module) + { + _main = module.FindComponent(); + } + + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_main?.Glows.Raw is 1 or 2) { @@ -157,6 +159,4 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, yield return new(_shape, source.Position, source.Rotation); // TODO: activation } } - - public override void Init(BossModule module) => _main = module.FindComponent(); } diff --git a/BossMod/Modules/Endwalker/Ultimate/DSW2/P7AkhMornsEdge.cs b/BossMod/Modules/Endwalker/Ultimate/DSW2/P7AkhMornsEdge.cs index a36cef06c2..c0e3a875f5 100644 --- a/BossMod/Modules/Endwalker/Ultimate/DSW2/P7AkhMornsEdge.cs +++ b/BossMod/Modules/Endwalker/Ultimate/DSW2/P7AkhMornsEdge.cs @@ -1,15 +1,15 @@ namespace BossMod.Endwalker.Ultimate.DSW2; // TODO: assignments? -class P7AkhMornsEdge : Components.GenericTowers +class P7AkhMornsEdge(BossModule module) : Components.GenericTowers(module) { - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.AkhMornsEdgeAOEFirstNormal1 or AID.AkhMornsEdgeAOEFirstNormal2 or AID.AkhMornsEdgeAOEFirstTanks) Towers.Add(new(caster.Position, 4, 1, 6)); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.AkhMornsEdgeAOEFirstTanks or AID.AkhMornsEdgeAOERestTanks) ++NumCasts; diff --git a/BossMod/Modules/Endwalker/Ultimate/DSW2/P7ExaflaresEdge.cs b/BossMod/Modules/Endwalker/Ultimate/DSW2/P7ExaflaresEdge.cs index cd2378a3e5..45007991bf 100644 --- a/BossMod/Modules/Endwalker/Ultimate/DSW2/P7ExaflaresEdge.cs +++ b/BossMod/Modules/Endwalker/Ultimate/DSW2/P7ExaflaresEdge.cs @@ -2,18 +2,18 @@ class P7ExaflaresEdge : Components.Exaflare { - public P7ExaflaresEdge() : base(6) + public P7ExaflaresEdge(BossModule module) : base(module, 6) { ImminentColor = ArenaColor.AOE; } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - foreach (var p in SafeSpots(module)) - arena.AddCircle(p, 1, ArenaColor.Safe); + foreach (var p in SafeSpots()) + Arena.AddCircle(p, 1, ArenaColor.Safe); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.ExaflaresEdgeFirst) { @@ -24,19 +24,19 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.ExaflaresEdgeFirst or AID.ExaflaresEdgeRest) { foreach (var l in Lines.Where(l => l.Next.AlmostEqual(caster.Position, 1))) { - AdvanceLine(module, l, caster.Position); + AdvanceLine(l, caster.Position); } ++NumCasts; } } - private IEnumerable SafeSpots(BossModule module) + private IEnumerable SafeSpots() { if (NumCasts > 0 || Lines.Count < 9) yield break; diff --git a/BossMod/Modules/Endwalker/Ultimate/DSW2/P7FlamesIceOfAscalon.cs b/BossMod/Modules/Endwalker/Ultimate/DSW2/P7FlamesIceOfAscalon.cs index 667e48028c..b156b52e2f 100644 --- a/BossMod/Modules/Endwalker/Ultimate/DSW2/P7FlamesIceOfAscalon.cs +++ b/BossMod/Modules/Endwalker/Ultimate/DSW2/P7FlamesIceOfAscalon.cs @@ -1,21 +1,21 @@ namespace BossMod.Endwalker.Ultimate.DSW2; -class P7FlamesIceOfAscalon : Components.GenericAOEs +class P7FlamesIceOfAscalon(BossModule module) : Components.GenericAOEs(module) { private AOEInstance? _aoe; private static readonly AOEShapeCircle _shapeOut = new(8); private static readonly AOEShapeDonut _shapeIn = new(8, 50); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => Utils.ZeroOrOne(_aoe); + public override IEnumerable ActiveAOEs(int slot, Actor actor) => Utils.ZeroOrOne(_aoe); - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.GenericMechanic && (OID)actor.OID == OID.DragonKingThordan) - _aoe = new(status.Extra == 0x12B ? _shapeIn : _shapeOut, actor.Position, default, module.WorldState.CurrentTime.AddSeconds(6.2f)); + _aoe = new(status.Extra == 0x12B ? _shapeIn : _shapeOut, actor.Position, default, WorldState.FutureTime(6.2f)); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.FlamesOfAscalon or AID.IceOfAscalon) { diff --git a/BossMod/Modules/Endwalker/Ultimate/DSW2/P7GigaflaresEdge.cs b/BossMod/Modules/Endwalker/Ultimate/DSW2/P7GigaflaresEdge.cs index f7ba52cdcf..bd52c9f6d3 100644 --- a/BossMod/Modules/Endwalker/Ultimate/DSW2/P7GigaflaresEdge.cs +++ b/BossMod/Modules/Endwalker/Ultimate/DSW2/P7GigaflaresEdge.cs @@ -1,14 +1,14 @@ namespace BossMod.Endwalker.Ultimate.DSW2; -class P7GigaflaresEdge : Components.GenericAOEs +class P7GigaflaresEdge(BossModule module) : Components.GenericAOEs(module) { private List _aoes = new(); private static readonly AOEShapeCircle _shape = new(20); // TODO: verify falloff - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => _aoes.Take(1); + public override IEnumerable ActiveAOEs(int slot, Actor actor) => _aoes.Take(1); - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.GigaflaresEdgeAOE1 or AID.GigaflaresEdgeAOE2 or AID.GigaflaresEdgeAOE3) { @@ -17,7 +17,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.GigaflaresEdgeAOE1 or AID.GigaflaresEdgeAOE2 or AID.GigaflaresEdgeAOE3) { diff --git a/BossMod/Modules/Endwalker/Ultimate/DSW2/P7MornAfahsEdge.cs b/BossMod/Modules/Endwalker/Ultimate/DSW2/P7MornAfahsEdge.cs index b2058e1515..2ce21a99f3 100644 --- a/BossMod/Modules/Endwalker/Ultimate/DSW2/P7MornAfahsEdge.cs +++ b/BossMod/Modules/Endwalker/Ultimate/DSW2/P7MornAfahsEdge.cs @@ -1,14 +1,14 @@ namespace BossMod.Endwalker.Ultimate.DSW2; -class P7MornAfahsEdge : Components.GenericTowers +class P7MornAfahsEdge(BossModule module) : Components.GenericTowers(module) { - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.MornAfahsEdgeFirst1 or AID.MornAfahsEdgeFirst2 or AID.MornAfahsEdgeFirst3) Towers.Add(new(caster.Position, 4)); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.MornAfahsEdgeFirst1 or AID.MornAfahsEdgeFirst2 or AID.MornAfahsEdgeFirst3 or AID.MornAfahsEdgeRest) ++NumCasts; diff --git a/BossMod/Modules/Endwalker/Ultimate/DSW2/P7Trinity.cs b/BossMod/Modules/Endwalker/Ultimate/DSW2/P7Trinity.cs index 12403d42dd..e0b63b6d83 100644 --- a/BossMod/Modules/Endwalker/Ultimate/DSW2/P7Trinity.cs +++ b/BossMod/Modules/Endwalker/Ultimate/DSW2/P7Trinity.cs @@ -7,27 +7,25 @@ class P7Trinity : Components.GenericBaitAway private static readonly AOEShapeCircle _shape = new(3); - public P7Trinity() : base(centerAtTarget: true) { } - - public override void Init(BossModule module) + public P7Trinity(BossModule module) : base(module, centerAtTarget: true) { _source = module.Enemies(OID.DragonKingThordan).FirstOrDefault(); } - public override void Update(BossModule module) + public override void Update() { CurrentBaits.Clear(); if (_source != null) { - foreach (var target in module.Raid.WithoutSlot().Where(p => p.Role == Role.Tank)) + foreach (var target in Raid.WithoutSlot().Where(p => p.Role == Role.Tank)) CurrentBaits.Add(new(_source, target, _shape)); - var closest = module.Raid.WithoutSlot().Where(p => p.Role != Role.Tank).Closest(_source.Position); + var closest = Raid.WithoutSlot().Where(p => p.Role != Role.Tank).Closest(_source.Position); if (closest != null) CurrentBaits.Add(new(_source, closest, _shape)); } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.TrinityAOE1 or AID.TrinityAOE2 or AID.TrinityAOE3) { diff --git a/BossMod/Modules/Endwalker/Ultimate/TOP/CommonAssignments.cs b/BossMod/Modules/Endwalker/Ultimate/TOP/CommonAssignments.cs index 9311b2590b..0bffd923ba 100644 --- a/BossMod/Modules/Endwalker/Ultimate/TOP/CommonAssignments.cs +++ b/BossMod/Modules/Endwalker/Ultimate/TOP/CommonAssignments.cs @@ -12,14 +12,14 @@ public struct PlayerState public PlayerState[] PlayerStates = new PlayerState[PartyState.MaxPartySize]; private int _numOrdersAssigned; - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { var ps = PlayerStates[slot]; if (ps.Order != 0) hints.Add($"Order: {ps.Order}, group: {ps.Group}", false); } - public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) + public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) { var playerOrder = PlayerStates[playerSlot].Order; return playerOrder == 0 ? PlayerPriority.Irrelevant : playerOrder == PlayerStates[pcSlot].Order ? PlayerPriority.Danger : PlayerPriority.Normal; @@ -31,7 +31,7 @@ protected void Assign(BossModule module, Actor player, int order) { if (order > 0) { - var slot = module.Raid.FindSlot(player.InstanceID); + var slot = Raid.FindSlot(player.InstanceID); if (slot >= 0) PlayerStates[slot].Order = order; if (++_numOrdersAssigned == PartyState.MaxPartySize) @@ -43,7 +43,7 @@ private void InitAssignments(BossModule module) { var (ca, global) = Assignments(); List<(int slot, int group, int priority, int order)> assignments = new(); - foreach (var a in ca.Resolve(module.Raid)) + foreach (var a in ca.Resolve(Raid)) assignments.Add((a.slot, global ? 0 : a.group >> 2, global ? a.group : a.group & 3, PlayerStates[a.slot].Order)); if (assignments.Count == 0) return; // invalid assignments @@ -69,7 +69,7 @@ private void InitAssignments(BossModule module) // common assignments for program loop & pantokrator abstract class P1CommonAssignments : CommonAssignments { - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { int order = (SID)status.ID switch { diff --git a/BossMod/Modules/Endwalker/Ultimate/TOP/P1Pantokrator.cs b/BossMod/Modules/Endwalker/Ultimate/TOP/P1Pantokrator.cs index 55ecdc5eda..73a58a47c3 100644 --- a/BossMod/Modules/Endwalker/Ultimate/TOP/P1Pantokrator.cs +++ b/BossMod/Modules/Endwalker/Ultimate/TOP/P1Pantokrator.cs @@ -1,9 +1,6 @@ namespace BossMod.Endwalker.Ultimate.TOP; -class P1BallisticImpact : Components.LocationTargetedAOEs -{ - public P1BallisticImpact() : base(ActionID.MakeSpell(AID.BallisticImpact), 5) { } -} +class P1BallisticImpact(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.BallisticImpact), 5); class P1FlameThrower : Components.GenericAOEs { @@ -12,7 +9,7 @@ class P1FlameThrower : Components.GenericAOEs private static readonly AOEShapeCone _shape = new(65, 30.Degrees()); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { foreach (var c in Casters.Skip(2)) yield return new(_shape, c.Position, c.CastInfo!.Rotation, c.CastInfo.NPCFinishAt, ArenaColor.AOE, false); @@ -25,7 +22,7 @@ public override void Init(BossModule module) _pantokrator = module.FindComponent(); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (Casters.Count == 0 || NumCasts > 0) return; @@ -33,7 +30,7 @@ public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc var group = _pantokrator != null ? _pantokrator.PlayerStates[pcSlot].Group : 0; if (group > 0) { - var dir = (Casters.First().CastInfo!.Rotation - module.PrimaryActor.Rotation).Normalized().Deg switch + var dir = (Casters.First().CastInfo!.Rotation - Module.PrimaryActor.Rotation).Normalized().Deg switch { (> 15 and < 45) or (> -165 and < -135) => -60.Degrees(), (> 45 and < 75) or (> -135 and < -105) => -30.Degrees(), @@ -42,25 +39,25 @@ public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc (> 135 and < 165) or (> -45 and < -15) => 60.Degrees(), _ => -90.Degrees(), // assume groups go CW }; - var offset = 12 * (module.PrimaryActor.Rotation + dir).ToDirection(); - var pos = group == 1 ? module.Bounds.Center + offset : module.Bounds.Center - offset; + var offset = 12 * (Module.PrimaryActor.Rotation + dir).ToDirection(); + var pos = group == 1 ? Module.Bounds.Center + offset : Module.Bounds.Center - offset; arena.AddCircle(pos, 1, ArenaColor.Safe); } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.FlameThrowerFirst or AID.FlameThrowerRest) Casters.Add(caster); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.FlameThrowerFirst or AID.FlameThrowerRest) Casters.Remove(caster); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.FlameThrowerFirst or AID.FlameThrowerRest) ++NumCasts; @@ -81,7 +78,7 @@ protected override (GroupAssignmentUnique assignment, bool global) Assignments() return (config.P1PantokratorAssignments, config.P1PantokratorGlobalPriority); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { base.AddHints(module, slot, actor, hints, movementHints); @@ -92,23 +89,23 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint var stackOrder = NextStackOrder(); if (ps.Order == NextSpreadOrder()) { - hints.Add("Spread!", module.Raid.WithoutSlot().InRadiusExcluding(actor, _spreadRadius).Any()); + hints.Add("Spread!", Raid.WithoutSlot().InRadiusExcluding(actor, _spreadRadius).Any()); } else if (ps.Order != stackOrder) { var stackTargetSlot = Array.FindIndex(PlayerStates, s => s.Order == stackOrder && s.Group == ps.Group); - var stackTarget = module.Raid[stackTargetSlot]; - if (stackTarget != null && !_stackShape.Check(actor.Position, module.PrimaryActor.Position, Angle.FromDirection(stackTarget.Position - module.PrimaryActor.Position))) + var stackTarget = Raid[stackTargetSlot]; + if (stackTarget != null && !_stackShape.Check(actor.Position, Module.PrimaryActor.Position, Angle.FromDirection(stackTarget.Position - Module.PrimaryActor.Position))) hints.Add("Stack!"); } } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { var spreadOrder = NextSpreadOrder(); var stackOrder = NextStackOrder(); - foreach (var (i, p) in module.Raid.WithSlot(true)) + foreach (var (i, p) in Raid.WithSlot(true)) { var order = PlayerStates[i].Order; if (order == spreadOrder) @@ -117,12 +114,12 @@ public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc } else if (order == stackOrder) { - _stackShape.Outline(arena, module.PrimaryActor.Position, Angle.FromDirection(p.Position - module.PrimaryActor.Position), i == pcSlot ? ArenaColor.Safe : ArenaColor.Danger); + _stackShape.Outline(arena, Module.PrimaryActor.Position, Angle.FromDirection(p.Position - Module.PrimaryActor.Position), i == pcSlot ? ArenaColor.Safe : ArenaColor.Danger); } } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { @@ -156,13 +153,13 @@ public P1DiffuseWaveCannonKyrios() : base(ActionID.MakeSpell(AID.DiffuseWaveCann public override void Init(BossModule module) { - ForbiddenPlayers = module.Raid.WithSlot().WhereActor(a => a.Role != Role.Tank).Mask(); + ForbiddenPlayers = Raid.WithSlot().WhereActor(a => a.Role != Role.Tank).Mask(); } - public override void Update(BossModule module) + public override void Update() { CurrentBaits.Clear(); - CurrentBaits.AddRange(module.Raid.WithoutSlot().SortedByRange(module.PrimaryActor.Position).TakeLast(2).Select(t => new Bait(module.PrimaryActor, t, _shape))); + CurrentBaits.AddRange(Raid.WithoutSlot().SortedByRange(Module.PrimaryActor.Position).TakeLast(2).Select(t => new Bait(Module.PrimaryActor, t, _shape))); } } @@ -170,7 +167,7 @@ class P1WaveCannonKyrios : Components.GenericBaitAway { private static readonly AOEShapeRect _shape = new(50, 3); - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.WaveCannonKyrios) { @@ -179,9 +176,9 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.WaveCannonKyrios) - CurrentBaits.Add(new(module.PrimaryActor, actor, _shape)); + CurrentBaits.Add(new(Module.PrimaryActor, actor, _shape)); } } diff --git a/BossMod/Modules/Endwalker/Ultimate/TOP/P1ProgramLoop.cs b/BossMod/Modules/Endwalker/Ultimate/TOP/P1ProgramLoop.cs index 9d04896e22..38ba991f3d 100644 --- a/BossMod/Modules/Endwalker/Ultimate/TOP/P1ProgramLoop.cs +++ b/BossMod/Modules/Endwalker/Ultimate/TOP/P1ProgramLoop.cs @@ -16,7 +16,7 @@ protected override (GroupAssignmentUnique assignment, bool global) Assignments() return (config.P1ProgramLoopAssignments, config.P1ProgramLoopGlobalPriority); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { base.AddHints(module, slot, actor, hints, movementHints); @@ -35,24 +35,24 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint { if (_tethers[slot]) hints.Add("Pass the tether!"); - if (module.Raid.WithSlot().IncludedInMask(_tethers).InRadiusExcluding(actor, _tetherRadius).Any()) + if (Raid.WithSlot().IncludedInMask(_tethers).InRadiusExcluding(actor, _tetherRadius).Any()) hints.Add("GTFO from tether targets!"); } else if (_tethers.Any()) { if (!_tethers[slot]) hints.Add("Grab the tether!"); - else if (module.Raid.WithoutSlot().InRadiusExcluding(actor, _tetherRadius).Any()) + else if (Raid.WithoutSlot().InRadiusExcluding(actor, _tetherRadius).Any()) hints.Add("GTFO from raid!"); } } - public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) + public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) { return PlayerStates[playerSlot].Order == PlayerStates[pcSlot].Order % 4 + 1 ? PlayerPriority.Interesting : base.CalcPriority(module, pcSlot, pc, playerSlot, player, ref customColor); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { var ps = PlayerStates[pcSlot]; bool soakTowers = ps.Order == NextTowersOrder(); @@ -72,13 +72,13 @@ public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc bool grabThisTether = ps.Order == NextTethersOrder(); bool grabNextTether = ps.Order == NextTethersOrder(1); - foreach (var (s, t) in module.Raid.WithSlot().IncludedInMask(_tethers)) + foreach (var (s, t) in Raid.WithSlot().IncludedInMask(_tethers)) { var ts = PlayerStates[s]; bool correctSoaker = ts.Order == NextTethersOrder(); bool tetherToGrab = ts.Group == ps.Group && (grabNextTether ? correctSoaker : grabThisTether ? NumTethersDone > 0 && ts.Order == NextTethersOrder(-1) : false); arena.AddCircle(t.Position, _tetherRadius, t == pc ? ArenaColor.Safe : ArenaColor.Danger); - arena.AddLine(t.Position, module.PrimaryActor.Position, correctSoaker ? ArenaColor.Safe : ArenaColor.Danger, tetherToGrab ? 2 : 1); + arena.AddLine(t.Position, Module.PrimaryActor.Position, correctSoaker ? ArenaColor.Safe : ArenaColor.Danger, tetherToGrab ? 2 : 1); } if (grabThisTether && NumTethersDone == NumTowersDone) @@ -90,13 +90,13 @@ public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc } } - public override void OnActorCreated(BossModule module, Actor actor) + public override void OnActorCreated(Actor actor) { if ((OID)actor.OID == OID.Tower2) _towers.Add(actor); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { @@ -110,16 +110,16 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } - public override void OnTethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnTethered(Actor source, ActorTetherInfo tether) { if (tether.ID == (uint)TetherID.Blaster) - _tethers.Set(module.Raid.FindSlot(source.InstanceID)); + _tethers.Set(Raid.FindSlot(source.InstanceID)); } - public override void OnUntethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnUntethered(Actor source, ActorTetherInfo tether) { if (tether.ID == (uint)TetherID.Blaster) - _tethers.Clear(module.Raid.FindSlot(source.InstanceID)); + _tethers.Clear(Raid.FindSlot(source.InstanceID)); } private int NextTowersOrder(int skip = 0) @@ -137,7 +137,7 @@ private int NextTethersOrder(int skip = 0) // 0 = N, 1 = E, ... (CW) private int ClassifyTower(BossModule module, Actor tower) { - var offset = tower.Position - module.Bounds.Center; + var offset = tower.Position - Module.Bounds.Center; if (Math.Abs(offset.Z) > Math.Abs(offset.X)) return offset.Z < 0 ? 0 : 2; else @@ -165,6 +165,6 @@ private int ClassifyTower(BossModule module, Actor tower) safeSpots.Clear(ClassifyTower(module, _towers[NumTowersDone])); safeSpots.Clear(ClassifyTower(module, _towers[NumTowersDone + 1])); var spot = group == 1 ? safeSpots.LowestSetBit() : safeSpots.HighestSetBit(); - return module.Bounds.Center + 18 * (180.Degrees() - 90.Degrees() * spot).ToDirection(); + return Module.Bounds.Center + 18 * (180.Degrees() - 90.Degrees() * spot).ToDirection(); } } diff --git a/BossMod/Modules/Endwalker/Ultimate/TOP/P2LimitlessSynergy.cs b/BossMod/Modules/Endwalker/Ultimate/TOP/P2LimitlessSynergy.cs index fe9563fc13..b5a8d66132 100644 --- a/BossMod/Modules/Endwalker/Ultimate/TOP/P2LimitlessSynergy.cs +++ b/BossMod/Modules/Endwalker/Ultimate/TOP/P2LimitlessSynergy.cs @@ -1,9 +1,6 @@ namespace BossMod.Endwalker.Ultimate.TOP; -class P2OptimizedSagittariusArrow : Components.SelfTargetedAOEs -{ - public P2OptimizedSagittariusArrow() : base(ActionID.MakeSpell(AID.OptimizedSagittariusArrow), new AOEShapeRect(100, 5)) { } -} +class P2OptimizedSagittariusArrow(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.OptimizedSagittariusArrow), new AOEShapeRect(100, 5)); class P2OptimizedBladedance : Components.BaitAwayTethers { @@ -11,7 +8,7 @@ public P2OptimizedBladedance() : base(new AOEShapeCone(100, 45.Degrees()), (uint public override void Init(BossModule module) { - ForbiddenPlayers = module.Raid.WithSlot(true).WhereActor(p => p.Role != Role.Tank).Mask(); + ForbiddenPlayers = Raid.WithSlot(true).WhereActor(p => p.Role != Role.Tank).Mask(); } } @@ -26,7 +23,7 @@ public enum Mechanic { None, Spread, Stack } public P2BeyondDefense() : base(6, 5, 3, alwaysShowSpreads: true) { } - public override void Update(BossModule module) + public override void Update() { Stacks.Clear(); Spreads.Clear(); @@ -35,23 +32,23 @@ public override void Update(BossModule module) switch (CurMechanic) { case Mechanic.Spread: - AddSpreads(module.Raid.WithoutSlot().SortedByRange(_source.Position).Take(2), _activation); + AddSpreads(Raid.WithoutSlot().SortedByRange(_source.Position).Take(2), _activation); break; case Mechanic.Stack: - if (module.Raid.WithoutSlot().Closest(_source.Position) is var target && target != null) + if (Raid.WithoutSlot().Closest(_source.Position) is var target && target != null) AddStack(target, _activation, _forbiddenStack); break; } } } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { arena.Actor(_source, ArenaColor.Object, true); base.DrawArenaForeground(module, pcSlot, pc, arena); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { @@ -66,15 +63,15 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { case AID.BeyondDefenseAOE: foreach (var t in spell.Targets) - _forbiddenStack.Set(module.Raid.FindSlot(t.ID)); + _forbiddenStack.Set(Raid.FindSlot(t.ID)); CurMechanic = Mechanic.Stack; - _activation = module.WorldState.CurrentTime.AddSeconds(3.2f); + _activation = WorldState.FutureTime(3.2f); break; case AID.PilePitch: CurMechanic = Mechanic.None; @@ -83,16 +80,13 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } -class P2CosmoMemory : Components.CastCounter -{ - public P2CosmoMemory() : base(ActionID.MakeSpell(AID.CosmoMemoryAOE)) { } -} +class P2CosmoMemory(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.CosmoMemoryAOE)); class P2OptimizedPassageOfArms : BossComponent { public Actor? _invincible; - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { if (_invincible != null) { @@ -104,13 +98,13 @@ public override void AddAIHints(BossModule module, int slot, Actor actor, PartyR } } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Invincibility && (OID)actor.OID == OID.OmegaM) _invincible = actor; } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Invincibility && _invincible == actor) _invincible = null; diff --git a/BossMod/Modules/Endwalker/Ultimate/TOP/P2PartySynergy.cs b/BossMod/Modules/Endwalker/Ultimate/TOP/P2PartySynergy.cs index 291e2999ec..544ee0f1c2 100644 --- a/BossMod/Modules/Endwalker/Ultimate/TOP/P2PartySynergy.cs +++ b/BossMod/Modules/Endwalker/Ultimate/TOP/P2PartySynergy.cs @@ -13,13 +13,13 @@ protected override (GroupAssignmentUnique assignment, bool global) Assignments() return (config.P2PartySynergyAssignments, config.P2PartySynergyGlobalPriority); } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (ActiveGlitch != Glitch.Unknown) hints.Add($"Glitch: {ActiveGlitch}"); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { base.AddHints(module, slot, actor, hints, movementHints); if (EnableDistanceHints && FindPartner(module, slot) is var partner && partner != null) @@ -33,7 +33,7 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { var partner = FindPartner(module, pcSlot); if (partner != null) @@ -44,7 +44,7 @@ public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc } } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { switch ((SID)status.ID) { @@ -57,7 +57,7 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st } } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { // assuming standard 'blue-purple-orange-green' order var order = (IconID)iconID switch @@ -75,7 +75,7 @@ public override void OnEventIcon(BossModule module, Actor actor, uint iconID) { var ps = PlayerStates[slot]; var partnerSlot = ps.Order > 0 ? Array.FindIndex(PlayerStates, s => s.Order == ps.Order && s.Group != ps.Group) : -1; - return module.Raid[partnerSlot]; + return Raid[partnerSlot]; } private (float min, float max) DistanceRange => ActiveGlitch switch @@ -90,15 +90,15 @@ class P2PartySynergyDoubleAOEs : Components.GenericAOEs { public List AOEs = new(); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => AOEs; + public override IEnumerable ActiveAOEs(int slot, Actor actor) => AOEs; - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.BeyondStrength or AID.EfficientBladework or AID.SuperliminalSteel or AID.OptimizedBlizzard) ++NumCasts; } - public override void OnActorPlayActionTimelineEvent(BossModule module, Actor actor, ushort id) + public override void OnActorPlayActionTimelineEvent(Actor actor, ushort id) { if (id != 0x1E43) return; @@ -107,22 +107,22 @@ public override void OnActorPlayActionTimelineEvent(BossModule module, Actor act case OID.OmegaMHelper: if (actor.ModelState.ModelState == 4) { - AOEs.Add(new(new AOEShapeDonut(10, 40), actor.Position, actor.Rotation, module.WorldState.CurrentTime.AddSeconds(5.1f))); + AOEs.Add(new(new AOEShapeDonut(10, 40), actor.Position, actor.Rotation, WorldState.FutureTime(5.1f))); } else { - AOEs.Add(new(new AOEShapeCircle(10), actor.Position, actor.Rotation, module.WorldState.CurrentTime.AddSeconds(5.1f))); + AOEs.Add(new(new AOEShapeCircle(10), actor.Position, actor.Rotation, WorldState.FutureTime(5.1f))); } break; case OID.OmegaFHelper: if (actor.ModelState.ModelState == 4) { - AOEs.Add(new(new AOEShapeRect(40, 40, -4), actor.Position, actor.Rotation + 90.Degrees(), module.WorldState.CurrentTime.AddSeconds(5.1f))); - AOEs.Add(new(new AOEShapeRect(40, 40, -4), actor.Position, actor.Rotation - 90.Degrees(), module.WorldState.CurrentTime.AddSeconds(5.1f))); + AOEs.Add(new(new AOEShapeRect(40, 40, -4), actor.Position, actor.Rotation + 90.Degrees(), WorldState.FutureTime(5.1f))); + AOEs.Add(new(new AOEShapeRect(40, 40, -4), actor.Position, actor.Rotation - 90.Degrees(), WorldState.FutureTime(5.1f))); } else { - AOEs.Add(new(new AOEShapeCross(100, 5), actor.Position, actor.Rotation, module.WorldState.CurrentTime.AddSeconds(5.1f))); + AOEs.Add(new(new AOEShapeCross(100, 5), actor.Position, actor.Rotation, WorldState.FutureTime(5.1f))); } break; } @@ -133,9 +133,9 @@ class P2PartySynergyOptimizedFire : Components.UniformStackSpread { public P2PartySynergyOptimizedFire() : base(0, 7, alwaysShowSpreads: true) { } - public override void Init(BossModule module) => AddSpreads(module.Raid.WithoutSlot(true)); + public override void Init(BossModule module) => AddSpreads(Raid.WithoutSlot(true)); - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.OptimizedFire) Spreads.Clear(); @@ -154,10 +154,10 @@ public P2PartySynergyOpticalLaser() : base(ActionID.MakeSpell(AID.OpticalLaser)) public void Show(BossModule module) { - _activation = module.WorldState.CurrentTime.AddSeconds(6.8f); + _activation = WorldState.FutureTime(6.8f); } - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_activation != default && _source != null) yield return new(_shape, _source.Position, _source.Rotation, _activation); @@ -169,12 +169,12 @@ public override void Init(BossModule module) _source = module.Enemies(OID.OpticalUnit).FirstOrDefault(); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { arena.Actor(_source, ArenaColor.Object, true); var pos = AssignedPosition(module, pcSlot); if (pos != default) - arena.AddCircle(module.Bounds.Center + pos, 1, ArenaColor.Safe); + arena.AddCircle(Module.Bounds.Center + pos, 1, ArenaColor.Safe); } private WDir AssignedPosition(BossModule module, int slot) @@ -186,7 +186,7 @@ private WDir AssignedPosition(BossModule module, int slot) if (ps.Order == 0 || ps.Group == 0) return new(); - var eyeOffset = _source.Position - module.Bounds.Center; + var eyeOffset = _source.Position - Module.Bounds.Center; switch (_synergy.ActiveGlitch) { case P2PartySynergy.Glitch.Mid: @@ -204,9 +204,9 @@ class P2PartySynergyDischarger : Components.Knockback { public P2PartySynergyDischarger() : base(ActionID.MakeSpell(AID.Discharger)) { } - public override IEnumerable Sources(BossModule module, int slot, Actor actor) + public override IEnumerable Sources(int slot, Actor actor) { - yield return new(module.Bounds.Center, 13); // TODO: activation + yield return new(Module.Bounds.Center, 13); // TODO: activation } } @@ -221,7 +221,7 @@ class P2PartySynergyEfficientBladework : Components.GenericAOEs private static readonly AOEShapeCircle _shape = new(10); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_activation != default) foreach (var s in _sources) @@ -234,29 +234,29 @@ public override void Init(BossModule module) _sources.AddRange(module.Enemies(OID.OmegaF)); // by default, use same group as for synergy if (_synergy != null) - _firstGroup = module.Raid.WithSlot(true).WhereSlot(s => _synergy.PlayerStates[s].Group == 1).Mask(); + _firstGroup = Raid.WithSlot(true).WhereSlot(s => _synergy.PlayerStates[s].Group == 1).Mask(); } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (_swaps.Length > 0) hints.Add($"Swaps: {_swaps}"); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { var pos = AssignedPosition(module, pcSlot); if (pos != default) - arena.AddCircle(module.Bounds.Center + pos, 1, ArenaColor.Safe); + arena.AddCircle(Module.Bounds.Center + pos, 1, ArenaColor.Safe); } - public override void OnActorPlayActionTimelineEvent(BossModule module, Actor actor, ushort id) + public override void OnActorPlayActionTimelineEvent(Actor actor, ushort id) { if (id == 0x1E43 && (OID)actor.OID == OID.OmegaMHelper) _sources.Add(actor); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { @@ -264,14 +264,14 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent ++NumCasts; break; case AID.OpticalLaser: - _activation = module.WorldState.CurrentTime.AddSeconds(9.8f); + _activation = WorldState.FutureTime(9.8f); break; } } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { - if (iconID == (uint)IconID.Spotlight && module.Raid.FindSlot(actor.InstanceID) is var slot && slot >= 0 && _synergy != null) + if (iconID == (uint)IconID.Spotlight && Raid.FindSlot(actor.InstanceID) is var slot && slot >= 0 && _synergy != null) { if (_firstStackSlot < 0) { @@ -293,7 +293,7 @@ public override void OnEventIcon(BossModule module, Actor actor, uint iconID) _firstGroup.Toggle(s); if (_swaps.Length > 0) _swaps += ", "; - _swaps += module.Raid[s]?.Name ?? ""; + _swaps += Raid[s]?.Name ?? ""; } } } @@ -311,7 +311,7 @@ private WDir AssignedPosition(BossModule module, int slot) return new(); // assumption: first source (F) is our relative north, G1 always goes to relative west, G2 goes to relative S/E depending on glitch - var relNorth = 1.4f * (_sources[0].Position - module.Bounds.Center); + var relNorth = 1.4f * (_sources[0].Position - Module.Bounds.Center); return _firstGroup[slot] ? relNorth.OrthoL() : _synergy.ActiveGlitch == P2PartySynergy.Glitch.Mid ? -relNorth : relNorth.OrthoR(); } } @@ -322,13 +322,13 @@ class P2PartySynergySpotlight : Components.UniformStackSpread public P2PartySynergySpotlight() : base(6, 0, 4, 4) { } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.Spotlight) _stackTargets.Add(actor); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { diff --git a/BossMod/Modules/Endwalker/Ultimate/TOP/P3HelloWorld.cs b/BossMod/Modules/Endwalker/Ultimate/TOP/P3HelloWorld.cs index 8d6cd270bd..b94c902ca7 100644 --- a/BossMod/Modules/Endwalker/Ultimate/TOP/P3HelloWorld.cs +++ b/BossMod/Modules/Endwalker/Ultimate/TOP/P3HelloWorld.cs @@ -14,7 +14,7 @@ public enum TowerColor { None, Red, Blue } private BitMask _defamationRotDone; private BitMask _stackRotDone; - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_initialRoles[slot] != PlayerRole.None && NumCasts < 16) hints.Add($"Next role: {RoleForNextTowers(slot)}", false); @@ -24,30 +24,30 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint switch (RoleForNextTowers(slot)) { case PlayerRole.Defamation: - if (module.Raid.WithSlot().InRadiusExcluding(actor, 20).WhereSlot(s => RoleForNextTowers(s) != PlayerRole.LocalTether).Any()) + if (Raid.WithSlot().InRadiusExcluding(actor, 20).WhereSlot(s => RoleForNextTowers(s) != PlayerRole.LocalTether).Any()) hints.Add("GTFO from others!"); break; case PlayerRole.RemoteTether: - if (module.Raid.WithSlot().InRadiusExcluding(actor, 20).WhereSlot(s => RoleForNextTowers(s) == PlayerRole.Defamation).Any()) + if (Raid.WithSlot().InRadiusExcluding(actor, 20).WhereSlot(s => RoleForNextTowers(s) == PlayerRole.Defamation).Any()) hints.Add("GTFO from defamation!"); - if (module.Raid.WithSlot().InRadiusExcluding(actor, 5).WhereSlot(s => RoleForNextTowers(s) == PlayerRole.Stack).Count() != 1) + if (Raid.WithSlot().InRadiusExcluding(actor, 5).WhereSlot(s => RoleForNextTowers(s) == PlayerRole.Stack).Count() != 1) hints.Add("Stay near one stack!"); break; case PlayerRole.Stack: - if (module.Raid.WithSlot().InRadiusExcluding(actor, 20).WhereSlot(s => RoleForNextTowers(s) == PlayerRole.Defamation).Any()) + if (Raid.WithSlot().InRadiusExcluding(actor, 20).WhereSlot(s => RoleForNextTowers(s) == PlayerRole.Defamation).Any()) hints.Add("GTFO from defamation!"); - if (module.Raid.WithSlot().InRadiusExcluding(actor, 5).WhereSlot(s => RoleForNextTowers(s) == PlayerRole.RemoteTether).Count() != 1) + if (Raid.WithSlot().InRadiusExcluding(actor, 5).WhereSlot(s => RoleForNextTowers(s) == PlayerRole.RemoteTether).Count() != 1) hints.Add("Stay near one tether!"); break; case PlayerRole.LocalTether: if (NumCasts < 12) { - if (module.Raid.WithSlot().InRadiusExcluding(actor, 20).WhereSlot(s => RoleForNextTowers(s) == PlayerRole.Defamation).Count() != 1) + if (Raid.WithSlot().InRadiusExcluding(actor, 20).WhereSlot(s => RoleForNextTowers(s) == PlayerRole.Defamation).Count() != 1) hints.Add("Stay inside one defamation!"); } else { - if (module.Raid.WithSlot().InRadiusExcluding(actor, 20).WhereSlot(s => RoleForNextTowers(s) == PlayerRole.Defamation).Any()) + if (Raid.WithSlot().InRadiusExcluding(actor, 20).WhereSlot(s => RoleForNextTowers(s) == PlayerRole.Defamation).Any()) hints.Add("GTFO from defamation!"); // TODO: they don't have to share the stack, right? } @@ -58,13 +58,13 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint { if (PendingRot(slot)) { - if (module.Raid.WithoutSlot().InRadiusExcluding(actor, 5).Any()) + if (Raid.WithoutSlot().InRadiusExcluding(actor, 5).Any()) hints.Add("GTFO from raid!"); } else { // TODO: hint to grab rot?.. - if (module.Raid.WithSlot(true).WhereSlot(PendingRot).InRadius(actor.Position, 5).Any()) + if (Raid.WithSlot(true).WhereSlot(PendingRot).InRadius(actor.Position, 5).Any()) hints.Add("GTFO from rots!"); } } @@ -72,13 +72,13 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint base.AddHints(module, slot, actor, hints, movementHints); } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (_defamationTowerColor != TowerColor.None && NumCasts < 16) hints.Add($"Defamation color: {_defamationTowerColor}"); } - public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) + public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) { var initialPCRole = _initialRoles[pcSlot]; var initialPlayerRole = _initialRoles[playerSlot]; @@ -100,7 +100,7 @@ public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor return avoidPlayer ? PlayerPriority.Danger : PlayerPriority.Normal; } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { base.DrawArenaForeground(module, pcSlot, pc, arena); @@ -108,7 +108,7 @@ public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc { // draw defamations & stacks var pcRole = RoleForNextTowers(pcSlot); - foreach (var (i, p) in module.Raid.WithSlot(true)) + foreach (var (i, p) in Raid.WithSlot(true)) { var (radius, share) = RoleForNextTowers(i) switch { @@ -127,7 +127,7 @@ public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc else if (NumRotExplodes < NumCasts) { // draw rot 'spreads' (rots will explode on players who used to have defamation/stack role and thus now have one of the tether roles) - foreach (var (i, p) in module.Raid.WithSlot(true)) + foreach (var (i, p) in Raid.WithSlot(true)) if (PendingRot(i)) arena.AddCircle(p.Position, 5, ArenaColor.Danger); } @@ -139,13 +139,13 @@ public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc //var pcRole = RoleForNextTowers(pcSlot, useRoleForNextTowers ? 0 : -1); //if (pcRole is PlayerRole.RemoteTether or PlayerRole.LocalTether && is var partner && partner != null) // arena.AddLine(pc.Position, partner.Position, ArenaColor.Danger); - var partner = module.Raid[PartnerSlot(pcSlot)]; + var partner = Raid[PartnerSlot(pcSlot)]; if (partner != null && (pc.Tether.Target == partner.InstanceID || partner.Tether.Target == pc.InstanceID)) arena.AddLine(pc.Position, partner.Position, ArenaColor.Danger); } } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { switch ((SID)status.ID) { @@ -162,17 +162,17 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st AssignRot(module, actor, TowerColor.Blue); break; case SID.HWPrepLocalTether: - if ((status.ExpireAt - module.WorldState.CurrentTime).TotalSeconds < 30) + if ((status.ExpireAt - WorldState.CurrentTime).TotalSeconds < 30) AssignRole(module, actor, PlayerRole.LocalTether); break; case SID.HWPrepRemoteTether: - if ((status.ExpireAt - module.WorldState.CurrentTime).TotalSeconds < 30) + if ((status.ExpireAt - WorldState.CurrentTime).TotalSeconds < 30) AssignRole(module, actor, PlayerRole.RemoteTether); break; } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { var color = (AID)spell.Action.ID switch { @@ -185,11 +185,11 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf var isDefamationTower = color == _defamationTowerColor; var soakerRole = isDefamationTower ? PlayerRole.Defamation : PlayerRole.Stack; _defamationTowers[Towers.Count] = isDefamationTower; // note: this works, because tower casts never overlap - Towers.Add(new(caster.Position, 6, forbiddenSoakers: module.Raid.WithSlot(true).WhereSlot(s => RoleForNextTowers(s) != soakerRole).Mask())); + Towers.Add(new(caster.Position, 6, forbiddenSoakers: Raid.WithSlot(true).WhereSlot(s => RoleForNextTowers(s) != soakerRole).Mask())); } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.HWRedTower or AID.HWBlueTower) { @@ -198,22 +198,22 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { case AID.HWRedRot: if (_defamationTowerColor == TowerColor.Red) - _defamationRotDone.Set(module.Raid.FindSlot(spell.MainTargetID)); + _defamationRotDone.Set(Raid.FindSlot(spell.MainTargetID)); else - _stackRotDone.Set(module.Raid.FindSlot(spell.MainTargetID)); + _stackRotDone.Set(Raid.FindSlot(spell.MainTargetID)); ++NumRotExplodes; break; case AID.HWBlueRot: if (_defamationTowerColor == TowerColor.Blue) - _defamationRotDone.Set(module.Raid.FindSlot(spell.MainTargetID)); + _defamationRotDone.Set(Raid.FindSlot(spell.MainTargetID)); else - _stackRotDone.Set(module.Raid.FindSlot(spell.MainTargetID)); + _stackRotDone.Set(Raid.FindSlot(spell.MainTargetID)); ++NumRotExplodes; break; case AID.HWTetherBreak: @@ -225,10 +225,10 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent private void AssignRole(BossModule module, Actor actor, PlayerRole role) { - var slot = module.Raid.FindSlot(actor.InstanceID); + var slot = Raid.FindSlot(actor.InstanceID); if (slot < 0) { - module.ReportError(this, $"Failed to find slot for {actor.InstanceID:X}"); + ReportError($"Failed to find slot for {actor.InstanceID:X}"); return; } @@ -239,16 +239,16 @@ private void AssignRole(BossModule module, Actor actor, PlayerRole role) } else if (_initialRoles[slot] != role) { - module.ReportError(this, $"Unexpected role reassign: #{slot} {_initialRoles[slot]} -> {role}"); + ReportError($"Unexpected role reassign: #{slot} {_initialRoles[slot]} -> {role}"); } } private void AssignRot(BossModule module, Actor actor, TowerColor color) { - var slot = module.Raid.FindSlot(actor.InstanceID); + var slot = Raid.FindSlot(actor.InstanceID); if (slot < 0) { - module.ReportError(this, $"Failed to find slot for {actor.InstanceID:X}"); + ReportError($"Failed to find slot for {actor.InstanceID:X}"); return; } @@ -259,7 +259,7 @@ private void AssignRot(BossModule module, Actor actor, TowerColor color) } else if (_initialRots[slot] != color) { - module.ReportError(this, $"Unexpected rot reassign: #{slot} {_initialRots[slot]} -> {color}"); + ReportError($"Unexpected rot reassign: #{slot} {_initialRots[slot]} -> {color}"); } } @@ -272,7 +272,7 @@ private void InitDefamationTowers(BossModule module, int slot) if (role is PlayerRole.LocalTether or PlayerRole.RemoteTether) { - module.ReportError(this, $"Unexpected rot on tethered player {slot}"); + ReportError($"Unexpected rot on tethered player {slot}"); return; } @@ -283,7 +283,7 @@ private void InitDefamationTowers(BossModule module, int slot) if (_defamationTowerColor == TowerColor.None) _defamationTowerColor = color; else if (_defamationTowerColor != color) - module.ReportError(this, $"Unexpected defamation color change: {_defamationTowerColor} -> {color}"); + ReportError($"Unexpected defamation color change: {_defamationTowerColor} -> {color}"); } private int NextTowerOrder => NumCasts >> 2; @@ -313,38 +313,38 @@ private IEnumerable PositionsForTowers(BossModule module, int slot) // find midpoint for defamation towers WDir defamationMid = default; foreach (int i in _defamationTowers.SetBits()) - defamationMid += Towers[i].Position - module.Bounds.Center; + defamationMid += Towers[i].Position - Module.Bounds.Center; var defamationMidDir = Angle.FromDirection(defamationMid); switch (RoleForNextTowers(slot)) { case PlayerRole.Defamation: // max melee at defamation towers - yield return module.Bounds.Center + 15.5f * (defamationMidDir - 45.Degrees()).ToDirection(); - yield return module.Bounds.Center + 15.5f * (defamationMidDir + 45.Degrees()).ToDirection(); + yield return Module.Bounds.Center + 15.5f * (defamationMidDir - 45.Degrees()).ToDirection(); + yield return Module.Bounds.Center + 15.5f * (defamationMidDir + 45.Degrees()).ToDirection(); break; case PlayerRole.RemoteTether: // hitbox radius, between towers (r=7) => angle delta 2*asin(3.5/12.5f) = 33 degrees - yield return module.Bounds.Center - 12.5f * (defamationMidDir - 12.Degrees()).ToDirection(); - yield return module.Bounds.Center - 12.5f * (defamationMidDir + 12.Degrees()).ToDirection(); + yield return Module.Bounds.Center - 12.5f * (defamationMidDir - 12.Degrees()).ToDirection(); + yield return Module.Bounds.Center - 12.5f * (defamationMidDir + 12.Degrees()).ToDirection(); break; case PlayerRole.Stack: // hitbox radius, at the inner edge of the tower (r=5) => angle delta 2*asin(2.5/12.5f) = 23 degrees - yield return module.Bounds.Center - 12.5f * (defamationMidDir - 25.Degrees()).ToDirection(); - yield return module.Bounds.Center - 12.5f * (defamationMidDir + 25.Degrees()).ToDirection(); + yield return Module.Bounds.Center - 12.5f * (defamationMidDir - 25.Degrees()).ToDirection(); + yield return Module.Bounds.Center - 12.5f * (defamationMidDir + 25.Degrees()).ToDirection(); break; case PlayerRole.LocalTether: if (NumCasts < 12) { // max melee outside defamation towers (assuming 15.5f for both defamation and target and distance 7 between, angle between them is 2*asin(3.5/15.5) = 26 degrees - yield return module.Bounds.Center + 15.5f * (defamationMidDir - 75.Degrees()).ToDirection(); - yield return module.Bounds.Center + 15.5f * (defamationMidDir + 75.Degrees()).ToDirection(); + yield return Module.Bounds.Center + 15.5f * (defamationMidDir - 75.Degrees()).ToDirection(); + yield return Module.Bounds.Center + 15.5f * (defamationMidDir + 75.Degrees()).ToDirection(); } else { // same as tethers sharing stack - yield return module.Bounds.Center - 12.5f * (defamationMidDir - 12.Degrees()).ToDirection(); - yield return module.Bounds.Center - 12.5f * (defamationMidDir + 12.Degrees()).ToDirection(); + yield return Module.Bounds.Center - 12.5f * (defamationMidDir - 12.Degrees()).ToDirection(); + yield return Module.Bounds.Center - 12.5f * (defamationMidDir + 12.Degrees()).ToDirection(); } break; } diff --git a/BossMod/Modules/Endwalker/Ultimate/TOP/P3Intermission.cs b/BossMod/Modules/Endwalker/Ultimate/TOP/P3Intermission.cs index 35e64c0d4a..d7a5318b8e 100644 --- a/BossMod/Modules/Endwalker/Ultimate/TOP/P3Intermission.cs +++ b/BossMod/Modules/Endwalker/Ultimate/TOP/P3Intermission.cs @@ -16,30 +16,30 @@ struct PlayerState public P3SniperCannon() : base(6, 6, alwaysShowSpreads: true) { } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { base.DrawArenaForeground(module, pcSlot, pc, arena); foreach (var s in EnumerateSafeSpots(module, pcSlot)) arena.AddCircle(s, 1, ArenaColor.Safe); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { switch ((SID)status.ID) { case SID.SniperCannonFodder: AddSpread(actor, status.ExpireAt); - Assign(module, module.Raid.FindSlot(actor.InstanceID), PlayerRole.Spread); + Assign(module, Raid.FindSlot(actor.InstanceID), PlayerRole.Spread); break; case SID.HighPoweredSniperCannonFodder: AddStack(actor, status.ExpireAt); - Assign(module, module.Raid.FindSlot(actor.InstanceID), PlayerRole.Stack); + Assign(module, Raid.FindSlot(actor.InstanceID), PlayerRole.Stack); break; } } // note: if player dies, stack/spread immediately hits random target, so we use status loss to end stack/spread - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { switch ((SID)status.ID) { @@ -64,7 +64,7 @@ private void Assign(BossModule module, int slot, PlayerRole role) _haveSafeSpots = true; int[] slotsInPriorityOrder = Utils.MakeArray(PartyState.MaxPartySize, -1); - foreach (var a in _config.P3IntermissionAssignments.Resolve(module.Raid)) + foreach (var a in _config.P3IntermissionAssignments.Resolve(Raid)) slotsInPriorityOrder[a.group] = a.slot; int[] assignedRoles = { 0, 0, 0 }; @@ -98,7 +98,7 @@ private IEnumerable EnumerateSafeSpots(BossModule module, int slot) } } - private WPos SafeSpotAt(BossModule module, Angle dirIfStacksNorth) => module.Bounds.Center + 19 * (_config.P3IntermissionStacksNorth ? dirIfStacksNorth : 180.Degrees() - dirIfStacksNorth).ToDirection(); + private WPos SafeSpotAt(BossModule module, Angle dirIfStacksNorth) => Module.Bounds.Center + 19 * (_config.P3IntermissionStacksNorth ? dirIfStacksNorth : 180.Degrees() - dirIfStacksNorth).ToDirection(); } class P3WaveRepeater : Components.ConcentricAOEs @@ -107,13 +107,13 @@ class P3WaveRepeater : Components.ConcentricAOEs public P3WaveRepeater() : base(_shapes) { } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.WaveRepeater1) AddSequence(caster.Position, spell.NPCFinishAt); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { var order = (AID)spell.Action.ID switch { @@ -123,15 +123,12 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent AID.WaveRepeater4 => 3, _ => -1 }; - if (!AdvanceSequence(order, caster.Position, module.WorldState.CurrentTime.AddSeconds(2.1f))) - module.ReportError(this, $"Unexpected ring {order}"); + if (!AdvanceSequence(order, caster.Position, WorldState.FutureTime(2.1f))) + ReportError($"Unexpected ring {order}"); } } -class P3IntermissionVoidzone : Components.PersistentVoidzone -{ - public P3IntermissionVoidzone() : base(6, m => m.Enemies(OID.P3IntermissionVoidzone).Where(z => z.EventState != 7)) { } -} +class P3IntermissionVoidzone(BossModule module) : Components.PersistentVoidzone(module, 6, m => m.Enemies(OID.P3IntermissionVoidzone).Where(z => z.EventState != 7)); class P3ColossalBlow : Components.GenericAOEs { @@ -139,15 +136,15 @@ class P3ColossalBlow : Components.GenericAOEs private static readonly AOEShapeCircle _shape = new(11); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => AOEs.Take(3); + public override IEnumerable ActiveAOEs(int slot, Actor actor) => AOEs.Take(3); - public override void OnActorPlayActionTimelineEvent(BossModule module, Actor actor, ushort id) + public override void OnActorPlayActionTimelineEvent(Actor actor, ushort id) { if ((OID)actor.OID is OID.LeftArmUnit or OID.RightArmUnit && id is 0x1E43 or 0x1E44) - AOEs.Add(new(_shape, actor.Position, default, module.WorldState.CurrentTime.AddSeconds(13.5f))); + AOEs.Add(new(_shape, actor.Position, default, WorldState.FutureTime(13.5f))); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.ColossalBlow) { diff --git a/BossMod/Modules/Endwalker/Ultimate/TOP/P3OversampledWaveCannon.cs b/BossMod/Modules/Endwalker/Ultimate/TOP/P3OversampledWaveCannon.cs index 284292f12e..bd4d5160c1 100644 --- a/BossMod/Modules/Endwalker/Ultimate/TOP/P3OversampledWaveCannon.cs +++ b/BossMod/Modules/Endwalker/Ultimate/TOP/P3OversampledWaveCannon.cs @@ -11,7 +11,7 @@ class P3OversampledWaveCannon : BossComponent private static readonly AOEShapeRect _shape = new(50, 50); - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_playerOrder[slot] != 0) hints.Add($"Order: {(IsMonitor(slot) != default ? "M" : "N")}{_playerOrder[slot]}", false); @@ -25,19 +25,19 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint movementHints.Add(actor.Position, p.pos, ArenaColor.Safe); } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { foreach (var a in AOEs(module, pcSlot)) _shape.Draw(arena, a.origin, a.rot, a.safe ? ArenaColor.SafeFromAOE : ArenaColor.AOE); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (var p in SafeSpots(module, pcSlot)) arena.AddCircle(p.pos, 1, p.assigned ? ArenaColor.Safe : ArenaColor.Danger); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { var angle = (SID)status.ID switch { @@ -45,13 +45,13 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st SID.OversampledWaveCannonLoadingR => -90.Degrees(), _ => default }; - if (angle != default && module.Raid.FindSlot(actor.InstanceID) is var slot && slot >= 0) + if (angle != default && Raid.FindSlot(actor.InstanceID) is var slot && slot >= 0) { _playerAngles[slot] = angle; if (++_numPlayerAngles == 3) { int n = 0, m = 0; - foreach (var sg in Service.Config.Get().P3MonitorsAssignments.Resolve(module.Raid).OrderBy(sg => sg.group)) + foreach (var sg in Service.Config.Get().P3MonitorsAssignments.Resolve(Raid).OrderBy(sg => sg.group)) { _playerOrder[sg.slot] = IsMonitor(sg.slot) ? ++m : ++n; if (IsMonitor(sg.slot)) @@ -61,7 +61,7 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { var angle = (AID)spell.Action.ID switch { @@ -83,7 +83,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf if (_numPlayerAngles < 3 || _bossAngle == default) yield break; - WPos adjust(float x, float z) => module.Bounds.Center + new WDir(_bossAngle.Rad < 0 ? -x : x, z); + WPos adjust(float x, float z) => Module.Bounds.Center + new WDir(_bossAngle.Rad < 0 ? -x : x, z); if (IsMonitor(slot)) { yield return (adjust(10, -11), _playerOrder[slot] == 1); @@ -121,7 +121,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf for (int i = 0; i < _monitorOrder.Count; ++i) { var slot = _monitorOrder[i]; - yield return (module.Raid[slot], _playerAngles[slot], i + 1); + yield return (Raid[slot], _playerAngles[slot], i + 1); } } } @@ -130,13 +130,13 @@ class P3OversampledWaveCannonSpread : Components.UniformStackSpread { public P3OversampledWaveCannonSpread() : base(0, 7) { } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.OversampledWaveCannonR or AID.OversampledWaveCannonL) - AddSpreads(module.Raid.WithoutSlot(true), spell.NPCFinishAt); + AddSpreads(Raid.WithoutSlot(true), spell.NPCFinishAt); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.OversampledWaveCannonAOE) Spreads.Clear(); diff --git a/BossMod/Modules/Endwalker/Ultimate/TOP/P4WaveCannon.cs b/BossMod/Modules/Endwalker/Ultimate/TOP/P4WaveCannon.cs index 04df19b9e4..819c09ca12 100644 --- a/BossMod/Modules/Endwalker/Ultimate/TOP/P4WaveCannon.cs +++ b/BossMod/Modules/Endwalker/Ultimate/TOP/P4WaveCannon.cs @@ -10,11 +10,11 @@ public void Show(BossModule module) { NumCasts = 0; if (_source != null) - foreach (var p in module.Raid.WithoutSlot(true)) + foreach (var p in Raid.WithoutSlot(true)) CurrentBaits.Add(new(_source, p, _shape)); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.P4WaveCannonVisualStart) { @@ -23,7 +23,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.P4WaveCannonProtean) { @@ -33,10 +33,7 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } -class P4WaveCannonProteanAOE : Components.SelfTargetedAOEs -{ - public P4WaveCannonProteanAOE() : base(ActionID.MakeSpell(AID.P4WaveCannonProteanAOE), new AOEShapeRect(100, 3)) { } -} +class P4WaveCannonProteanAOE(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.P4WaveCannonProteanAOE), new AOEShapeRect(100, 3)); // TODO: generalize (line stack) class P4WaveCannonStack : BossComponent @@ -52,36 +49,36 @@ class P4WaveCannonStack : BossComponent public override void Init(BossModule module) { - foreach (var (s, g) in Service.Config.Get().P4WaveCannonAssignments.Resolve(module.Raid)) + foreach (var (s, g) in Service.Config.Get().P4WaveCannonAssignments.Resolve(Raid)) _playerGroups[s] = g; } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { - if (Imminent && module.Raid.WithSlot(true).IncludedInMask(_targets).WhereActor(p => _shape.Check(actor.Position, module.Bounds.Center, Angle.FromDirection(p.Position - module.Bounds.Center))).Count() is var clips && clips != 1) + if (Imminent && Raid.WithSlot(true).IncludedInMask(_targets).WhereActor(p => _shape.Check(actor.Position, Module.Bounds.Center, Angle.FromDirection(p.Position - Module.Bounds.Center))).Count() is var clips && clips != 1) hints.Add(clips == 0 ? "Share the stack!" : "GTFO from second stack!"); if (movementHints != null && SafeDir(slot) is var safeDir && safeDir != default) - movementHints.Add(actor.Position, module.Bounds.Center + 12 * safeDir.ToDirection(), ArenaColor.Safe); + movementHints.Add(actor.Position, Module.Bounds.Center + 12 * safeDir.ToDirection(), ArenaColor.Safe); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (Imminent) - foreach (var (_, p) in module.Raid.WithSlot(true).IncludedInMask(_targets)) - _shape.Outline(arena, module.Bounds.Center, Angle.FromDirection(p.Position - module.Bounds.Center), ArenaColor.Safe); + foreach (var (_, p) in Raid.WithSlot(true).IncludedInMask(_targets)) + _shape.Outline(arena, Module.Bounds.Center, Angle.FromDirection(p.Position - Module.Bounds.Center), ArenaColor.Safe); var safeDir = SafeDir(pcSlot); if (safeDir != default) - arena.AddCircle(module.Bounds.Center + 12 * safeDir.ToDirection(), 1, ArenaColor.Safe); + arena.AddCircle(Module.Bounds.Center + 12 * safeDir.ToDirection(), 1, ArenaColor.Safe); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { case AID.P4WaveCannonStackTarget: - _targets.Set(module.Raid.FindSlot(spell.MainTargetID)); + _targets.Set(Raid.FindSlot(spell.MainTargetID)); if (_targets.NumSetBits() > 1) InitWestStack(); break; diff --git a/BossMod/Modules/Endwalker/Ultimate/TOP/P5Delta.cs b/BossMod/Modules/Endwalker/Ultimate/TOP/P5Delta.cs index 517e62268a..97e72fc790 100644 --- a/BossMod/Modules/Endwalker/Ultimate/TOP/P5Delta.cs +++ b/BossMod/Modules/Endwalker/Ultimate/TOP/P5Delta.cs @@ -32,7 +32,7 @@ public struct PlayerState private List<(int, int)> _localTethers = new(); private List<(int, int)> _remoteTethers = new(); - public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) + public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) { var pcState = Players[pcSlot]; var playerState = Players[playerSlot]; @@ -41,26 +41,26 @@ public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor : PlayerPriority.Normal; } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { var p = Players[pcSlot]; - var partner = p.TetherBroken ? null : module.Raid[p.PartnerSlot]; + var partner = p.TetherBroken ? null : Raid[p.PartnerSlot]; if (partner != null) arena.AddLine(pc.Position, partner.Position, ArenaColor.Danger); foreach (var safeSpot in SafeSpotOffsets(module, pcSlot)) - arena.AddCircle(module.Bounds.Center + safeSpot, 1, ArenaColor.Safe); + arena.AddCircle(Module.Bounds.Center + safeSpot, 1, ArenaColor.Safe); } - public override void OnActorCreated(BossModule module, Actor actor) + public override void OnActorCreated(Actor actor) { if ((OID)actor.OID is OID.RocketPunch1 or OID.RocketPunch2) { - var (closestSlot, closestPlayer) = module.Raid.WithSlot(true).Closest(actor.Position); + var (closestSlot, closestPlayer) = Raid.WithSlot(true).Closest(actor.Position); if (closestPlayer != null) { if (Players[closestSlot].RocketPunch != null) - module.ReportError(this, $"Multiple punches spawned for player #{closestSlot}"); + ReportError($"Multiple punches spawned for player #{closestSlot}"); Players[closestSlot].RocketPunch = actor; } @@ -71,7 +71,7 @@ public override void OnActorCreated(BossModule module, Actor actor) } } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { switch ((SID)status.ID) { @@ -88,14 +88,14 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st } } - public override void OnTethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnTethered(Actor source, ActorTetherInfo tether) { switch ((TetherID)tether.ID) { case TetherID.HWPrepLocalTether: case TetherID.HWPrepRemoteTether: - var s1 = module.Raid.FindSlot(source.InstanceID); - var s2 = module.Raid.FindSlot(tether.Target); + var s1 = Raid.FindSlot(source.InstanceID); + var s2 = Raid.FindSlot(tether.Target); if (s1 >= 0 && s2 >= 0) { var isLocal = tether.ID == (uint)TetherID.HWPrepLocalTether; @@ -112,12 +112,12 @@ public override void OnTethered(BossModule module, Actor source, ActorTetherInfo } } - public override void OnUntethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnUntethered(Actor source, ActorTetherInfo tether) { if ((TetherID)tether.ID is TetherID.HWLocalTether or TetherID.HWRemoteTether) { - var s1 = module.Raid.FindSlot(source.InstanceID); - var s2 = module.Raid.FindSlot(tether.Target); + var s1 = Raid.FindSlot(source.InstanceID); + var s2 = Raid.FindSlot(tether.Target); if (s1 >= 0 && s2 >= 0) { Players[s1].TetherBroken = Players[s2].TetherBroken = true; @@ -126,7 +126,7 @@ public override void OnUntethered(BossModule module, Actor source, ActorTetherIn } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { @@ -146,29 +146,29 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.BeyondDefenseAOE) - _beyondDefenceTarget = module.WorldState.Actors.Find(spell.MainTargetID); + _beyondDefenceTarget = WorldState.Actors.Find(spell.MainTargetID); } - public override void OnActorPlayActionTimelineEvent(BossModule module, Actor actor, ushort id) + public override void OnActorPlayActionTimelineEvent(Actor actor, ushort id) { if (id == 0x1E43) { switch ((OID)actor.OID) { case OID.BeetleHelper: - _eyeDir = (actor.Position - module.Bounds.Center).Normalized().OrthoR(); + _eyeDir = (actor.Position - Module.Bounds.Center).Normalized().OrthoR(); break; case OID.FinalHelper: - _eyeDir = (actor.Position - module.Bounds.Center).Normalized().OrthoL(); + _eyeDir = (actor.Position - Module.Bounds.Center).Normalized().OrthoL(); break; } } } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if ((OID)actor.OID is OID.LeftArmUnit or OID.RightArmUnit) { @@ -178,7 +178,7 @@ public override void OnEventIcon(BossModule module, Actor actor, uint iconID) _ => default }; if (rotation != default) - ArmRotations[ArmIndex(actor.Position - module.Bounds.Center)] = rotation; + ArmRotations[ArmIndex(actor.Position - Module.Bounds.Center)] = rotation; } } @@ -194,7 +194,7 @@ public override void OnEventIcon(BossModule module, Actor actor, uint iconID) private void InitAssignments(BossModule module) { // 1. assign initial inner/outer - float slotToOffsetX(int slot) => _eyeDir.OrthoR().Dot((module.Raid[slot]?.Position ?? module.Bounds.Center) - module.Bounds.Center); + float slotToOffsetX(int slot) => _eyeDir.OrthoR().Dot((Raid[slot]?.Position ?? Module.Bounds.Center) - Module.Bounds.Center); float pairToOffsetX((int s1, int s2) slots) => MathF.Abs(slotToOffsetX(slots.s1) + slotToOffsetX(slots.s2)); var outerLocal = _localTethers.MaxBy(pairToOffsetX); var outerRemote = _remoteTethers.MaxBy(pairToOffsetX); @@ -206,8 +206,8 @@ private void InitAssignments(BossModule module) // 2. assign initial north/south foreach (var (s1, s2) in _localTethers.Concat(_remoteTethers)) { - var p1 = module.Raid[s1]; - var p2 = module.Raid[s2]; + var p1 = Raid[s1]; + var p2 = Raid[s2]; if (p1 != null && p2 != null) { var p12n = _eyeDir.Dot(p1.Position - p2.Position) > 0; @@ -301,15 +301,15 @@ private IEnumerable SafeSpotOffsets(BossModule module, int slot) var dirX = p.PairAssignment == PairAssignment.Inner ? -1 : +1; yield return TransformRelNorth(7 * dirX, 13 * dirZ); } - else if (module.Raid[slot] != _beyondDefenceTarget) + else if (Raid[slot] != _beyondDefenceTarget) { // central stack - yield return (module.Raid[slot] == _monitorTarget ? 5 : 2.5f) * _monitorSafeDir; + yield return (Raid[slot] == _monitorTarget ? 5 : 2.5f) * _monitorSafeDir; } else { // beyond defense target wants to run outside stack (TODO: select direction that is convenient for monitor target) - var stackPos = (module.Raid[slot] == _monitorTarget ? 5 : 2.5f) * _monitorSafeDir; + var stackPos = (Raid[slot] == _monitorTarget ? 5 : 2.5f) * _monitorSafeDir; var horizOffset = TransformRelNorth(15, 0); yield return stackPos + horizOffset; yield return stackPos - horizOffset; @@ -330,11 +330,11 @@ private IEnumerable SafeSpotOffsets(BossModule module, int slot) else yield return TransformRelNorth(-18, 2 * safeDirZ); } - else if (_distantWorld == module.Raid[slot]) + else if (_distantWorld == Raid[slot]) { yield return TransformRelNorth(0, 19 * safeDirZ); } - else if (_nearWorld == module.Raid[slot]) + else if (_nearWorld == Raid[slot]) { yield return TransformRelNorth(0, 6 * safeDirZ); } @@ -359,19 +359,19 @@ class P5DeltaOpticalLaser : Components.GenericAOEs public P5DeltaOpticalLaser() : base(ActionID.MakeSpell(AID.OpticalLaser)) { } - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (Source != null) yield return new(_shape, Source.Position, Source.Rotation, _activation); } // at this point eye is in correct position - public override void OnActorPlayActionTimelineEvent(BossModule module, Actor actor, ushort id) + public override void OnActorPlayActionTimelineEvent(Actor actor, ushort id) { if ((OID)actor.OID is OID.BeetleHelper or OID.FinalHelper && id == 0x1E43) { Source ??= module.Enemies(OID.OpticalUnit).FirstOrDefault(); - _activation = module.WorldState.CurrentTime.AddSeconds(20); + _activation = WorldState.FutureTime(20); } } } @@ -384,12 +384,12 @@ public P5DeltaExplosion() : base(ActionID.MakeSpell(AID.DeltaExplosion), 3) { } public override void Init(BossModule module) => _delta = module.FindComponent(); - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (_delta == null || Casters.Count > 0) return; var ps = _delta.Players[pcSlot]; - var partner = module.Raid.WithSlot(true).WhereSlot(i => _delta.Players[i].IsLocal == ps.IsLocal && i != ps.PartnerSlot && _delta.Players[i].RocketPunch?.OID != ps.RocketPunch?.OID).FirstOrDefault().Item2; + var partner = Raid.WithSlot(true).WhereSlot(i => _delta.Players[i].IsLocal == ps.IsLocal && i != ps.PartnerSlot && _delta.Players[i].RocketPunch?.OID != ps.RocketPunch?.OID).FirstOrDefault().Item2; if (partner != null) arena.AddCircle(partner.Position, Shape.Radius, ArenaColor.Safe); } @@ -403,7 +403,7 @@ class P5DeltaHyperPulse : Components.GenericAOEs private static readonly AOEShapeRect _shape = new(100, 4); private static readonly int _numRepeats = 6; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_aoes.Count > 0) { @@ -416,8 +416,8 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, { for (int i = 0; i < _delta.ArmRotations.Length; ++i) { - var pos = module.Bounds.Center + _delta.ArmOffset(i); - if (module.Raid.WithoutSlot().Closest(pos) == actor) + var pos = Module.Bounds.Center + _delta.ArmOffset(i); + if (Raid.WithoutSlot().Closest(pos) == actor) { var angle = Angle.FromDirection(actor.Position - pos); for (int j = 0; j < _numRepeats; ++j) @@ -431,11 +431,11 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, public override void Init(BossModule module) => _delta = module.FindComponent(); - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.DeltaHyperPulseFirst && _delta != null) { - var rot = _delta.ArmRotations[_delta.ArmIndex(caster.Position - module.Bounds.Center)]; + var rot = _delta.ArmRotations[_delta.ArmIndex(caster.Position - Module.Bounds.Center)]; for (int i = 0; i < _numRepeats; ++i) { _aoes.Add(new(_shape, caster.Position, (spell.Rotation + i * rot).Normalized(), spell.NPCFinishAt.AddSeconds(i * 0.6))); @@ -443,14 +443,14 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.DeltaHyperPulseFirst or AID.DeltaHyperPulseRest) { ++NumCasts; var count = _aoes.RemoveAll(aoe => aoe.Origin.AlmostEqual(caster.Position, 1) && aoe.Rotation.AlmostEqual(caster.Rotation, 0.1f)); if (count != 1) - module.ReportError(this, $"Single cast removed {count} aoes"); + ReportError($"Single cast removed {count} aoes"); } } } @@ -471,14 +471,14 @@ public P5DeltaOversampledWaveCannon() : base(0, 7) { } public override void Init(BossModule module) => _delta = module.FindComponent(); - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { base.AddHints(module, slot, actor, hints, movementHints); if (_player == actor) { // ensure we hit only two intended targets - hints.Add("Aim monitor!", module.Raid.WithSlot().Exclude(actor).Where(ip => _shape.Check(ip.Item2.Position, actor.Position, actor.Rotation + _playerAngle) != _playerIntendedTargets[ip.Item1]).Any()); + hints.Add("Aim monitor!", Raid.WithSlot().Exclude(actor).Where(ip => _shape.Check(ip.Item2.Position, actor.Position, actor.Rotation + _playerAngle) != _playerIntendedTargets[ip.Item1]).Any()); } else if (_player != null) { @@ -495,7 +495,7 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { if (_boss != null) _shape.Draw(arena, _boss.Position, _boss.Rotation + _bossAngle, _bossIntendedTargets[pcSlot] ? ArenaColor.SafeFromAOE : ArenaColor.AOE); @@ -503,7 +503,7 @@ public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc _shape.Draw(arena, _player.Position, _player.Rotation + _playerAngle, _playerIntendedTargets[pcSlot] ? ArenaColor.SafeFromAOE : ArenaColor.AOE); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { var angle = (SID)status.ID switch { @@ -511,14 +511,14 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st SID.OversampledWaveCannonLoadingR => -90.Degrees(), _ => default }; - if (angle != default && module.Raid.FindSlot(actor.InstanceID) is var slot && slot >= 0) + if (angle != default && Raid.FindSlot(actor.InstanceID) is var slot && slot >= 0) { _player = actor; _playerAngle = angle; } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { var angle = (AID)spell.Action.ID switch { @@ -533,7 +533,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf if (_delta == null) return; var bossSide = angle.Rad > 0 ? P5Delta.SideAssignment.South : P5Delta.SideAssignment.North; - foreach (var (i, p) in module.Raid.WithSlot(true)) + foreach (var (i, p) in Raid.WithSlot(true)) { var ps = _delta.Players[i]; if (ps.IsLocal) @@ -547,7 +547,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.OversampledWaveCannonAOE) Spreads.Clear(); @@ -560,15 +560,15 @@ class P5DeltaSwivelCannon : Components.GenericAOEs private static readonly AOEShapeCone _shape = new(60, 105.Degrees()); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => Utils.ZeroOrOne(AOE); + public override IEnumerable ActiveAOEs(int slot, Actor actor) => Utils.ZeroOrOne(AOE); - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.SwivelCannonR or AID.SwivelCannonL) AOE = new(_shape, caster.Position, spell.Rotation, spell.NPCFinishAt); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.SwivelCannonR or AID.SwivelCannonL) AOE = null; diff --git a/BossMod/Modules/Endwalker/Ultimate/TOP/P5NearDistantWorld.cs b/BossMod/Modules/Endwalker/Ultimate/TOP/P5NearDistantWorld.cs index 5c568dfebb..8730faa920 100644 --- a/BossMod/Modules/Endwalker/Ultimate/TOP/P5NearDistantWorld.cs +++ b/BossMod/Modules/Endwalker/Ultimate/TOP/P5NearDistantWorld.cs @@ -13,7 +13,7 @@ class P5NearDistantWorld : Components.GenericStackSpread public P5NearDistantWorld() : base(true) { } - public override void Update(BossModule module) + public override void Update() { Spreads.Clear(); _risky.Reset(); @@ -24,7 +24,7 @@ public override void Update(BossModule module) base.Update(module); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { base.AddHints(module, slot, actor, hints, movementHints); @@ -32,7 +32,7 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint hints.Add("Avoid baiting jump!"); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { switch ((SID)status.ID) { @@ -47,23 +47,23 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { case AID.HelloNearWorld: case AID.HelloNearWorldJump: ++NumNearJumpsDone; - var nearSlot = module.Raid.FindSlot(spell.MainTargetID); + var nearSlot = Raid.FindSlot(spell.MainTargetID); _completedJumps.Set(nearSlot); - NearWorld = module.Raid[nearSlot]; + NearWorld = Raid[nearSlot]; break; case AID.HelloDistantWorld: case AID.HelloDistantWorldJump: ++NumDistantJumpsDone; - var distantSlot = module.Raid.FindSlot(spell.MainTargetID); + var distantSlot = Raid.FindSlot(spell.MainTargetID); _completedJumps.Set(distantSlot); - DistantWorld = module.Raid[distantSlot]; + DistantWorld = Raid[distantSlot]; break; } } @@ -86,13 +86,13 @@ private void AddChain(BossModule module, Actor? start, int numDone, bool close) } if (numDone <= 1 && start != null) { - start = close ? module.Raid.WithoutSlot().Exclude(start).Closest(start.Position) : module.Raid.WithoutSlot().Exclude(start).Farthest(start.Position); + start = close ? Raid.WithoutSlot().Exclude(start).Closest(start.Position) : Raid.WithoutSlot().Exclude(start).Farthest(start.Position); if (start != null) AddSpread(module, start, 4, 1); } if (numDone <= 2 && start != null) { - start = close ? module.Raid.WithoutSlot().Exclude(start).Closest(start.Position) : module.Raid.WithoutSlot().Exclude(start).Farthest(start.Position); + start = close ? Raid.WithoutSlot().Exclude(start).Closest(start.Position) : Raid.WithoutSlot().Exclude(start).Farthest(start.Position); if (start != null) AddSpread(module, start, 4, 2); } @@ -101,7 +101,7 @@ private void AddChain(BossModule module, Actor? start, int numDone, bool close) private void AddSpread(BossModule module, Actor target, float radius, int order) { Spreads.Add(new(target, radius, _firstActivation.AddSeconds(order * 1.0))); - var slot = module.Raid.FindSlot(target.InstanceID); + var slot = Raid.FindSlot(target.InstanceID); if (_targets[slot]) _risky.Set(slot); else diff --git a/BossMod/Modules/Endwalker/Ultimate/TOP/P5Omega.cs b/BossMod/Modules/Endwalker/Ultimate/TOP/P5Omega.cs index 8db66e64d0..afcda3e88b 100644 --- a/BossMod/Modules/Endwalker/Ultimate/TOP/P5Omega.cs +++ b/BossMod/Modules/Endwalker/Ultimate/TOP/P5Omega.cs @@ -4,19 +4,19 @@ class P5OmegaDoubleAOEs : Components.GenericAOEs { public List AOEs = new(); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { var midpoint = AOEs.FirstOrDefault().Activation.AddSeconds(2); return NumCasts == 0 ? AOEs.TakeWhile(aoe => aoe.Activation <= midpoint) : AOEs.SkipWhile(aoe => aoe.Activation <= midpoint); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.BeyondStrength or AID.EfficientBladework or AID.SuperliminalSteel or AID.OptimizedBlizzard) ++NumCasts; } - public override void OnActorPlayActionTimelineEvent(BossModule module, Actor actor, ushort id) + public override void OnActorPlayActionTimelineEvent(Actor actor, ushort id) { if (id != 0x1E43) return; @@ -25,22 +25,22 @@ public override void OnActorPlayActionTimelineEvent(BossModule module, Actor act case OID.OmegaMP5: if (actor.ModelState.ModelState == 4) { - AOEs.Add(new(new AOEShapeDonut(10, 40), actor.Position, actor.Rotation, module.WorldState.CurrentTime.AddSeconds(13.2f))); + AOEs.Add(new(new AOEShapeDonut(10, 40), actor.Position, actor.Rotation, WorldState.FutureTime(13.2f))); } else { - AOEs.Add(new(new AOEShapeCircle(10), actor.Position, actor.Rotation, module.WorldState.CurrentTime.AddSeconds(13.2f))); + AOEs.Add(new(new AOEShapeCircle(10), actor.Position, actor.Rotation, WorldState.FutureTime(13.2f))); } break; case OID.OmegaFP5: if (actor.ModelState.ModelState == 4) { - AOEs.Add(new(new AOEShapeRect(40, 40, -4), actor.Position, actor.Rotation + 90.Degrees(), module.WorldState.CurrentTime.AddSeconds(13.2f))); - AOEs.Add(new(new AOEShapeRect(40, 40, -4), actor.Position, actor.Rotation - 90.Degrees(), module.WorldState.CurrentTime.AddSeconds(13.2f))); + AOEs.Add(new(new AOEShapeRect(40, 40, -4), actor.Position, actor.Rotation + 90.Degrees(), WorldState.FutureTime(13.2f))); + AOEs.Add(new(new AOEShapeRect(40, 40, -4), actor.Position, actor.Rotation - 90.Degrees(), WorldState.FutureTime(13.2f))); } else { - AOEs.Add(new(new AOEShapeCross(100, 5), actor.Position, actor.Rotation, module.WorldState.CurrentTime.AddSeconds(13.2f))); + AOEs.Add(new(new AOEShapeCross(100, 5), actor.Position, actor.Rotation, WorldState.FutureTime(13.2f))); } break; } @@ -53,9 +53,9 @@ class P5OmegaDiffuseWaveCannon : Components.GenericAOEs private static readonly AOEShapeCone _shape = new(100, 60.Degrees()); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => _aoes.Take(2); + public override IEnumerable ActiveAOEs(int slot, Actor actor) => _aoes.Take(2); - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.OmegaDiffuseWaveCannonFront or AID.OmegaDiffuseWaveCannonSides) { @@ -67,14 +67,14 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.OmegaDiffuseWaveCannonAOE) { ++NumCasts; var count = _aoes.RemoveAll(aoe => aoe.Rotation.AlmostEqual(caster.Rotation, 0.1f)); if (count != 1) - module.ReportError(this, $"Unexpected removed count: {count}"); + ReportError($"Unexpected removed count: {count}"); } } } @@ -90,25 +90,25 @@ class P5OmegaNearDistantWorld : P5NearDistantWorld public bool HaveDebuffs => (_near | _distant | _first | _second).Any(); - public void ShowFirst(BossModule module) => Reset(module.Raid[(_near & _first).LowestSetBit()], module.Raid[(_distant & _first).LowestSetBit()], _firstActivation); - public void ShowSecond(BossModule module) => Reset(module.Raid[(_near & _second).LowestSetBit()], module.Raid[(_distant & _second).LowestSetBit()], _secondActivation); + public void ShowFirst(BossModule module) => Reset(Raid[(_near & _first).LowestSetBit()], Raid[(_distant & _first).LowestSetBit()], _firstActivation); + public void ShowSecond(BossModule module) => Reset(Raid[(_near & _second).LowestSetBit()], Raid[(_distant & _second).LowestSetBit()], _secondActivation); - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { switch ((SID)status.ID) { case SID.HelloNearWorld: - _near.Set(module.Raid.FindSlot(actor.InstanceID)); + _near.Set(Raid.FindSlot(actor.InstanceID)); break; case SID.HelloDistantWorld: - _distant.Set(module.Raid.FindSlot(actor.InstanceID)); + _distant.Set(Raid.FindSlot(actor.InstanceID)); break; case SID.InLine1: - _first.Set(module.Raid.FindSlot(actor.InstanceID)); + _first.Set(Raid.FindSlot(actor.InstanceID)); _firstActivation = status.ExpireAt; break; case SID.InLine2: - _second.Set(module.Raid.FindSlot(actor.InstanceID)); + _second.Set(Raid.FindSlot(actor.InstanceID)); _secondActivation = status.ExpireAt; break; } @@ -130,28 +130,28 @@ public P5OmegaOversampledWaveCannon() : base(0, 7) { } public override void Init(BossModule module) => _ndw = module.FindComponent(); - public override void Update(BossModule module) + public override void Update() { Spreads.Clear(); if (_boss != null) - AddSpreads(module.Raid.WithoutSlot().InShape(_shape, _boss.Position, _boss.Rotation + _bossAngle)); + AddSpreads(Raid.WithoutSlot().InShape(_shape, _boss.Position, _boss.Rotation + _bossAngle)); base.Update(module); } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { if (_boss != null) _shape.Draw(arena, _boss.Position, _boss.Rotation + _bossAngle, ArenaColor.AOE); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { base.DrawArenaForeground(module, pcSlot, pc, arena); foreach (var p in SafeSpots(module, pcSlot, pc)) arena.AddCircle(p, 1, ArenaColor.Safe); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { var angle = (AID)spell.Action.ID switch { @@ -165,7 +165,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf _bossAngle = angle; } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.OversampledWaveCannonAOE) { @@ -181,21 +181,21 @@ private IEnumerable SafeSpots(BossModule module, int slot, Actor actor) if (actor == _ndw.NearWorld) { - yield return module.Bounds.Center + 10 * (_boss.Rotation - _bossAngle).ToDirection(); + yield return Module.Bounds.Center + 10 * (_boss.Rotation - _bossAngle).ToDirection(); } else if (actor == _ndw.DistantWorld) { - yield return module.Bounds.Center + 10 * (_boss.Rotation + 2.05f * _bossAngle).ToDirection(); + yield return Module.Bounds.Center + 10 * (_boss.Rotation + 2.05f * _bossAngle).ToDirection(); } else { // TODO: assignments... - yield return module.Bounds.Center + 19 * (_boss.Rotation - 0.05f * _bossAngle).ToDirection(); // '1' - first distant - yield return module.Bounds.Center + 19 * (_boss.Rotation - 0.95f * _bossAngle).ToDirection(); // '2' - first near - yield return module.Bounds.Center + 19 * (_boss.Rotation - 1.05f * _bossAngle).ToDirection(); // '3' - second near - yield return module.Bounds.Center + 19 * (_boss.Rotation - 1.95f * _bossAngle).ToDirection(); // '4' - second distant - yield return module.Bounds.Center + 15 * (_boss.Rotation + 0.50f * _bossAngle).ToDirection(); // first soaker - yield return module.Bounds.Center + 15 * (_boss.Rotation + 1.50f * _bossAngle).ToDirection(); // second soaker + yield return Module.Bounds.Center + 19 * (_boss.Rotation - 0.05f * _bossAngle).ToDirection(); // '1' - first distant + yield return Module.Bounds.Center + 19 * (_boss.Rotation - 0.95f * _bossAngle).ToDirection(); // '2' - first near + yield return Module.Bounds.Center + 19 * (_boss.Rotation - 1.05f * _bossAngle).ToDirection(); // '3' - second near + yield return Module.Bounds.Center + 19 * (_boss.Rotation - 1.95f * _bossAngle).ToDirection(); // '4' - second distant + yield return Module.Bounds.Center + 15 * (_boss.Rotation + 0.50f * _bossAngle).ToDirection(); // first soaker + yield return Module.Bounds.Center + 15 * (_boss.Rotation + 1.50f * _bossAngle).ToDirection(); // second soaker } } } @@ -214,17 +214,17 @@ public override void Init(BossModule module) _ndw = module.FindComponent(); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { base.DrawArenaForeground(module, pcSlot, pc, arena); foreach (var p in SafeSpots(module, pcSlot, pc)) arena.AddCircle(p, 1, ArenaColor.Safe); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.QuickeningDynamis && status.Extra >= 3) - ForbiddenPlayers.Clear(module.Raid.FindSlot(actor.InstanceID)); + ForbiddenPlayers.Clear(Raid.FindSlot(actor.InstanceID)); } private IEnumerable SafeSpots(BossModule module, int slot, Actor actor) @@ -232,30 +232,30 @@ private IEnumerable SafeSpots(BossModule module, int slot, Actor actor) if (_ndw == null || CurrentBaits.Count == 0) yield break; - var toBoss = (CurrentBaits.First().Source.Position - module.Bounds.Center).Normalized(); + var toBoss = (CurrentBaits.First().Source.Position - Module.Bounds.Center).Normalized(); if (actor == _ndw.NearWorld) { - yield return module.Bounds.Center - 10 * toBoss; + yield return Module.Bounds.Center - 10 * toBoss; } else if (actor == _ndw.DistantWorld) { // TODO: select one of the spots... - yield return module.Bounds.Center + 10 * toBoss.OrthoL(); - yield return module.Bounds.Center + 10 * toBoss.OrthoR(); + yield return Module.Bounds.Center + 10 * toBoss.OrthoL(); + yield return Module.Bounds.Center + 10 * toBoss.OrthoR(); } else if (CurrentBaits.Any(b => b.Target == actor)) { - var p = module.Bounds.Center + 16 * toBoss; + var p = Module.Bounds.Center + 16 * toBoss; yield return p + 10 * toBoss.OrthoL(); yield return p + 10 * toBoss.OrthoR(); } else { // TODO: assignments... - yield return module.Bounds.Center + 19 * toBoss.OrthoL(); // '1' - first distant - yield return module.Bounds.Center - 18 * toBoss + 5 * toBoss.OrthoL(); // '2' - first near - yield return module.Bounds.Center - 18 * toBoss + 5 * toBoss.OrthoR(); // '3' - second near - yield return module.Bounds.Center + 19 * toBoss.OrthoR(); // '4' - second distant + yield return Module.Bounds.Center + 19 * toBoss.OrthoL(); // '1' - first distant + yield return Module.Bounds.Center - 18 * toBoss + 5 * toBoss.OrthoL(); // '2' - first near + yield return Module.Bounds.Center - 18 * toBoss + 5 * toBoss.OrthoR(); // '3' - second near + yield return Module.Bounds.Center + 19 * toBoss.OrthoR(); // '4' - second distant } } } diff --git a/BossMod/Modules/Endwalker/Ultimate/TOP/P5Sigma.cs b/BossMod/Modules/Endwalker/Ultimate/TOP/P5Sigma.cs index 04e83fb9c0..a53d6ef3d1 100644 --- a/BossMod/Modules/Endwalker/Ultimate/TOP/P5Sigma.cs +++ b/BossMod/Modules/Endwalker/Ultimate/TOP/P5Sigma.cs @@ -19,22 +19,22 @@ public struct PlayerState private int _numWaveCannonTargets; private bool _waveCannonsDone; - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { var ps = Players[slot]; if (ps.Order > 0) hints.Add($"Order: {ps.Order}", false); } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (ActiveGlitch != Glitch.Unknown) hints.Add($"Glitch: {ActiveGlitch}"); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - var partner = module.Raid[Players[pcSlot].PartnerSlot]; + var partner = Raid[Players[pcSlot].PartnerSlot]; if (partner != null) { var distSq = (partner.Position - pc.Position).LengthSq(); @@ -43,15 +43,15 @@ public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc } foreach (var safeSpot in SafeSpotOffsets(module, pcSlot)) - arena.AddCircle(module.Bounds.Center + safeSpot, 1, ArenaColor.Safe); + arena.AddCircle(Module.Bounds.Center + safeSpot, 1, ArenaColor.Safe); } - public override void OnTethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnTethered(Actor source, ActorTetherInfo tether) { if (tether.ID == (uint)TetherID.PartySynergy) { - var s1 = module.Raid.FindSlot(source.InstanceID); - var s2 = module.Raid.FindSlot(tether.Target); + var s1 = Raid.FindSlot(source.InstanceID); + var s2 = Raid.FindSlot(tether.Target); if (s1 >= 0 && s2 >= 0) { Players[s1].PartnerSlot = s2; @@ -60,7 +60,7 @@ public override void OnTethered(BossModule module, Actor source, ActorTetherInfo } } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { switch ((SID)status.ID) { @@ -73,15 +73,15 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.SigmaWaveCannonAOE) _waveCannonsDone = true; } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { - var slot = module.Raid.FindSlot(actor.InstanceID); + var slot = Raid.FindSlot(actor.InstanceID); if (slot < 0) return; @@ -106,17 +106,17 @@ public override void OnEventIcon(BossModule module, Actor actor, uint iconID) } } - public override void OnActorPlayActionTimelineEvent(BossModule module, Actor actor, ushort id) + public override void OnActorPlayActionTimelineEvent(Actor actor, ushort id) { switch ((OID)actor.OID) { case OID.RightArmUnit: // TODO: can it be left unit instead?.. if (id == 0x1E43) - _waveCannonNorthDir -= actor.Position - module.Bounds.Center; + _waveCannonNorthDir -= actor.Position - Module.Bounds.Center; break; case OID.BossP5: if (id == 0x1E43) - _waveCannonNorthDir = actor.Position - module.Bounds.Center; // just in case... + _waveCannonNorthDir = actor.Position - Module.Bounds.Center; // just in case... break; } } @@ -146,7 +146,7 @@ private void InitSpreadPositions(BossModule module) { var s1 = mask.LowestSetBit(); var s2 = mask.HighestSetBit(); - var dir = (module.Raid[s2]?.Position ?? default) - (module.Raid[s1]?.Position ?? default); // s1 to s2 + var dir = (Raid[s2]?.Position ?? default) - (Raid[s1]?.Position ?? default); // s1 to s2 if (_waveCannonNorthDir.OrthoL().Dot(dir) > 0) Utils.Swap(ref s1, ref s2); // s1 is now N/W, s2 is S/E if (nextSingle == 0) @@ -209,7 +209,7 @@ class P5SigmaHyperPulse : Components.BaitAwayTethers { public P5SigmaHyperPulse() : base(new AOEShapeRect(100, 3), (uint)TetherID.SigmaHyperPulse, ActionID.MakeSpell(AID.SigmaHyperPulse)) { } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (var b in CurrentBaits) arena.Actor(b.Source, ArenaColor.Object, true); @@ -225,17 +225,17 @@ class P5SigmaWaveCannon : Components.GenericBaitAway public P5SigmaWaveCannon() : base(ActionID.MakeSpell(AID.SigmaWaveCannonAOE)) { } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.SigmaWaveCannon) - foreach (var p in module.Raid.WithSlot(true).IncludedInMask(_waveCannonTargets).Actors()) + foreach (var p in Raid.WithSlot(true).IncludedInMask(_waveCannonTargets).Actors()) CurrentBaits.Add(new(caster, p, _shapeWaveCannon)); } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.SigmaWaveCannon) - _waveCannonTargets.Set(module.Raid.FindSlot(actor.InstanceID)); + _waveCannonTargets.Set(Raid.FindSlot(actor.InstanceID)); } } @@ -243,7 +243,7 @@ class P5SigmaTowers : Components.GenericTowers { private int _soakerSum; - public override void OnActorCreated(BossModule module, Actor actor) + public override void OnActorCreated(Actor actor) { var numSoakers = (OID)actor.OID switch { @@ -260,7 +260,7 @@ public override void OnActorCreated(BossModule module, Actor actor) InitAssignments(module); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.StorageViolation1 or AID.StorageViolation2 or AID.StorageViolationObliteration) { @@ -277,11 +277,11 @@ private void InitAssignments(BossModule module) WDir relNorth = default; foreach (var t in Towers) - relNorth -= t.Position - module.Bounds.Center; + relNorth -= t.Position - Module.Bounds.Center; foreach (ref var tower in Towers.AsSpan()) { - var offset = tower.Position - module.Bounds.Center; + var offset = tower.Position - Module.Bounds.Center; var left = relNorth.OrthoL().Dot(offset) > 0; if (Towers.Count == 5) { @@ -326,17 +326,17 @@ class P5SigmaRearLasers : Components.GenericAOEs public bool Active => Rotation != default; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (!Active) yield break; for (int i = NumCasts + 1; i < 14; ++i) - yield return new(_shape, module.Bounds.Center, StartingDir + i * Rotation, _activation.AddSeconds(0.6 * i), risky: false); + yield return new(_shape, Module.Bounds.Center, StartingDir + i * Rotation, _activation.AddSeconds(0.6 * i), risky: false); if (NumCasts < 14) - yield return new(_shape, module.Bounds.Center, StartingDir + NumCasts * Rotation, _activation.AddSeconds(0.6 * NumCasts), ArenaColor.Danger); + yield return new(_shape, Module.Bounds.Center, StartingDir + NumCasts * Rotation, _activation.AddSeconds(0.6 * NumCasts), ArenaColor.Danger); } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if ((OID)actor.OID != OID.RearPowerUnit) return; @@ -350,10 +350,10 @@ public override void OnEventIcon(BossModule module, Actor actor, uint iconID) return; StartingDir = actor.Rotation; Rotation = rot; - _activation = module.WorldState.CurrentTime.AddSeconds(10.1f); + _activation = WorldState.FutureTime(10.1f); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.RearLasersFirst or AID.RearLasersRest) ++NumCasts; @@ -365,26 +365,26 @@ class P5SigmaDoubleAOEs : Components.GenericAOEs public bool Show; public List AOEs = new(); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => Show ? AOEs : Enumerable.Empty(); + public override IEnumerable ActiveAOEs(int slot, Actor actor) => Show ? AOEs : Enumerable.Empty(); - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.SuperliminalSteel or AID.OptimizedBlizzard) ++NumCasts; } - public override void OnActorPlayActionTimelineEvent(BossModule module, Actor actor, ushort id) + public override void OnActorPlayActionTimelineEvent(Actor actor, ushort id) { if (id != 0x1E43 || (OID)actor.OID != OID.BossP5) return; if (actor.ModelState.ModelState == 4) { - AOEs.Add(new(new AOEShapeRect(40, 40, -4), actor.Position, actor.Rotation + 90.Degrees(), module.WorldState.CurrentTime.AddSeconds(15.1f))); - AOEs.Add(new(new AOEShapeRect(40, 40, -4), actor.Position, actor.Rotation - 90.Degrees(), module.WorldState.CurrentTime.AddSeconds(15.1f))); + AOEs.Add(new(new AOEShapeRect(40, 40, -4), actor.Position, actor.Rotation + 90.Degrees(), WorldState.FutureTime(15.1f))); + AOEs.Add(new(new AOEShapeRect(40, 40, -4), actor.Position, actor.Rotation - 90.Degrees(), WorldState.FutureTime(15.1f))); } else { - AOEs.Add(new(new AOEShapeCross(100, 5), actor.Position, actor.Rotation, module.WorldState.CurrentTime.AddSeconds(15.1f))); + AOEs.Add(new(new AOEShapeCross(100, 5), actor.Position, actor.Rotation, WorldState.FutureTime(15.1f))); Show = true; // cross can be shown from the start } } @@ -397,18 +397,18 @@ class P5SigmaNearDistantWorld : P5NearDistantWorld public override void Init(BossModule module) => _lasers = module.FindComponent(); - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { base.DrawArenaForeground(module, pcSlot, pc, arena); foreach (var p in SafeSpots(module, pcSlot, pc)) arena.AddCircle(p, 1, ArenaColor.Safe); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { base.OnStatusGain(module, actor, status); if ((SID)status.ID == SID.QuickeningDynamis) - _dynamisStacks.Set(module.Raid.FindSlot(actor.InstanceID)); + _dynamisStacks.Set(Raid.FindSlot(actor.InstanceID)); } private IEnumerable SafeSpots(BossModule module, int slot, Actor actor) @@ -418,23 +418,23 @@ private IEnumerable SafeSpots(BossModule module, int slot, Actor actor) if (actor == NearWorld) { - yield return module.Bounds.Center + 10 * (_lasers.StartingDir + 10 * _lasers.Rotation).ToDirection(); + yield return Module.Bounds.Center + 10 * (_lasers.StartingDir + 10 * _lasers.Rotation).ToDirection(); } else if (actor == DistantWorld) { - yield return module.Bounds.Center + 10 * _lasers.StartingDir.ToDirection(); + yield return Module.Bounds.Center + 10 * _lasers.StartingDir.ToDirection(); } else { // TODO: figure out a way to assign safespots - for now, assume no-dynamis always go south (and so can be second far baiters or any near baiters), dynamis can go anywhere - yield return module.Bounds.Center + 19 * _lasers.StartingDir.ToDirection(); // '4' - second far bait spot - yield return module.Bounds.Center + 19 * (_lasers.StartingDir + 9 * _lasers.Rotation).ToDirection(); // '2' - first near bait spot - yield return module.Bounds.Center + 19 * (_lasers.StartingDir + 11 * _lasers.Rotation).ToDirection(); // '3' - second near bait spot + yield return Module.Bounds.Center + 19 * _lasers.StartingDir.ToDirection(); // '4' - second far bait spot + yield return Module.Bounds.Center + 19 * (_lasers.StartingDir + 9 * _lasers.Rotation).ToDirection(); // '2' - first near bait spot + yield return Module.Bounds.Center + 19 * (_lasers.StartingDir + 11 * _lasers.Rotation).ToDirection(); // '3' - second near bait spot if (_dynamisStacks[slot]) { - yield return module.Bounds.Center - 19 * _lasers.StartingDir.ToDirection(); // '1' - first far bait spot - yield return module.Bounds.Center - 19 * (_lasers.StartingDir + 5 * _lasers.Rotation).ToDirection(); // first (far) laser bait spot - yield return module.Bounds.Center - 19 * (_lasers.StartingDir - 5 * _lasers.Rotation).ToDirection(); // second (stay) laser bait spot + yield return Module.Bounds.Center - 19 * _lasers.StartingDir.ToDirection(); // '1' - first far bait spot + yield return Module.Bounds.Center - 19 * (_lasers.StartingDir + 5 * _lasers.Rotation).ToDirection(); // first (far) laser bait spot + yield return Module.Bounds.Center - 19 * (_lasers.StartingDir - 5 * _lasers.Rotation).ToDirection(); // second (stay) laser bait spot } } } diff --git a/BossMod/Modules/Endwalker/Ultimate/TOP/P5SolarRay.cs b/BossMod/Modules/Endwalker/Ultimate/TOP/P5SolarRay.cs index ab890cbd2f..cda7ad3a2b 100644 --- a/BossMod/Modules/Endwalker/Ultimate/TOP/P5SolarRay.cs +++ b/BossMod/Modules/Endwalker/Ultimate/TOP/P5SolarRay.cs @@ -8,29 +8,29 @@ class P5SolarRay : Components.GenericBaitAway public P5SolarRay() : base(centerAtTarget: true) { } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (NumCasts == 0 && CurrentBaits.FirstOrDefault(b => b.Source.TargetID == b.Target.InstanceID) is var b && b.Source != null && actor.Role == Role.Tank) hints.Add(b.Source.TargetID != actor.InstanceID ? "Taunt!" : "Pass aggro!"); base.AddHints(module, slot, actor, hints, movementHints); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.P5SolarRayM or AID.P5SolarRayF) { - var target = module.WorldState.Actors.Find(spell.TargetID); + var target = WorldState.Actors.Find(spell.TargetID); if (target != null) CurrentBaits.Add(new(caster, target, _shape)); } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.P5SolarRayM or AID.P5SolarRayMSecond or AID.P5SolarRayF or AID.P5SolarRayFSecond) { CurrentBaits.Clear(); - if (++NumCasts < 2 && module.WorldState.Actors.Find(caster.TargetID) is var target && target != null) + if (++NumCasts < 2 && WorldState.Actors.Find(caster.TargetID) is var target && target != null) CurrentBaits.Add(new(caster, target, _shape)); } } diff --git a/BossMod/Modules/Endwalker/Ultimate/TOP/P6CosmoArrow.cs b/BossMod/Modules/Endwalker/Ultimate/TOP/P6CosmoArrow.cs index 8f4dd75710..12826876f4 100644 --- a/BossMod/Modules/Endwalker/Ultimate/TOP/P6CosmoArrow.cs +++ b/BossMod/Modules/Endwalker/Ultimate/TOP/P6CosmoArrow.cs @@ -13,24 +13,24 @@ public record struct Line(AOEShapeRect? Shape, WPos Next, Angle Direction, WDir private static readonly AOEShapeRect _shapeFirst = new(40, 5); private static readonly AOEShapeRect _shapeRest = new(100, 2.5f); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { foreach (var l in _lines) if (l.Shape != null && l.ExplosionsLeft > 0) yield return new(l.Shape, l.Next, l.Direction, l.NextExplosion); } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (CurPattern != Pattern.Unknown) hints.Add($"Pattern: {(CurPattern == Pattern.InOut ? "in -> out" : "out -> in")}"); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.CosmoArrowFirst) { - var offset = caster.Position - module.Bounds.Center; + var offset = caster.Position - Module.Bounds.Center; var offsetAbs = offset.Abs(); if (offsetAbs.X < 5) { @@ -64,12 +64,12 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } else { - module.ReportError(this, $"Unexpected exasquare origin: {caster.Position}"); + ReportError($"Unexpected exasquare origin: {caster.Position}"); } } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { var dist = (AID)spell.Action.ID switch { @@ -85,19 +85,19 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent int numLines = 0; foreach (ref var l in _lines.AsSpan()) { - if (!l.Next.AlmostEqual(caster.Position, 1) || !l.Direction.AlmostEqual(caster.Rotation, 0.1f) || (l.NextExplosion - module.WorldState.CurrentTime).TotalSeconds > 1) + if (!l.Next.AlmostEqual(caster.Position, 1) || !l.Direction.AlmostEqual(caster.Rotation, 0.1f) || (l.NextExplosion - WorldState.CurrentTime).TotalSeconds > 1) continue; if (l.ExplosionsLeft <= 0) - module.ReportError(this, $"Too many explosions: {caster.Position}"); + ReportError($"Too many explosions: {caster.Position}"); l.Shape = _shapeRest; l.Next += l.Advance * dist; - l.NextExplosion = module.WorldState.CurrentTime.AddSeconds(2); + l.NextExplosion = WorldState.FutureTime(2); --l.ExplosionsLeft; ++numLines; } if (numLines == 0) - module.ReportError(this, $"Failed to match any lines for {caster}"); + ReportError($"Failed to match any lines for {caster}"); } } diff --git a/BossMod/Modules/Endwalker/Ultimate/TOP/P6CosmoDive.cs b/BossMod/Modules/Endwalker/Ultimate/TOP/P6CosmoDive.cs index 7c21150f19..5bf921266d 100644 --- a/BossMod/Modules/Endwalker/Ultimate/TOP/P6CosmoDive.cs +++ b/BossMod/Modules/Endwalker/Ultimate/TOP/P6CosmoDive.cs @@ -7,19 +7,19 @@ class P6CosmoDive : Components.UniformStackSpread public P6CosmoDive() : base(6, 8, 6, 6, true) { } - public override void Update(BossModule module) + public override void Update() { Spreads.Clear(); Stacks.Clear(); if (_source != null) { BitMask forbidden = new(); - foreach (var (slot, actor) in module.Raid.WithSlot().SortedByRange(_source.Position).Take(2)) + foreach (var (slot, actor) in Raid.WithSlot().SortedByRange(_source.Position).Take(2)) { AddSpread(actor, _activation); forbidden.Set(slot); } - var farthest = module.Raid.WithoutSlot().Farthest(_source.Position); + var farthest = Raid.WithoutSlot().Farthest(_source.Position); if (farthest != null) { AddStack(farthest, _activation, forbidden); @@ -28,7 +28,7 @@ public override void Update(BossModule module) base.Update(module); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.CosmoDive) { @@ -37,7 +37,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.CosmoDiveTankbuster or AID.CosmoDiveStack) { diff --git a/BossMod/Modules/Endwalker/Ultimate/TOP/P6CosmoMeteor.cs b/BossMod/Modules/Endwalker/Ultimate/TOP/P6CosmoMeteor.cs index 6736bcdc9f..c143fc46b2 100644 --- a/BossMod/Modules/Endwalker/Ultimate/TOP/P6CosmoMeteor.cs +++ b/BossMod/Modules/Endwalker/Ultimate/TOP/P6CosmoMeteor.cs @@ -1,19 +1,10 @@ namespace BossMod.Endwalker.Ultimate.TOP; -class P6CosmoMeteorPuddles : Components.SelfTargetedAOEs -{ - public P6CosmoMeteorPuddles() : base(ActionID.MakeSpell(AID.CosmoMeteorAOE), new AOEShapeCircle(10)) { } -} +class P6CosmoMeteorPuddles(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.CosmoMeteorAOE), new AOEShapeCircle(10)); -class P6CosmoMeteorAddComet : Components.Adds -{ - public P6CosmoMeteorAddComet() : base((uint)OID.CosmoComet) { } -} +class P6CosmoMeteorAddComet(BossModule module) : Components.Adds(module, (uint)OID.CosmoComet); -class P6CosmoMeteorAddMeteor : Components.Adds -{ - public P6CosmoMeteorAddMeteor() : base((uint)OID.CosmoMeteor) { } -} +class P6CosmoMeteorAddMeteor(BossModule module) : Components.Adds(module, (uint)OID.CosmoMeteor); class P6CosmoMeteorSpread : Components.UniformStackSpread { @@ -21,9 +12,9 @@ class P6CosmoMeteorSpread : Components.UniformStackSpread public P6CosmoMeteorSpread() : base(0, 5) { } - public override void Init(BossModule module) => AddSpreads(module.Raid.WithoutSlot(true)); + public override void Init(BossModule module) => AddSpreads(Raid.WithoutSlot(true)); - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.CosmoMeteorSpread) ++NumCasts; @@ -34,22 +25,22 @@ class P6CosmoMeteorFlares : Components.UniformStackSpread { public P6CosmoMeteorFlares() : base(6, 20, 5, alwaysShowSpreads: true) { } // TODO: verify flare falloff - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if ((IconID)iconID == IconID.OptimizedMeteor) { - AddSpread(actor, module.WorldState.CurrentTime.AddSeconds(8.1f)); + AddSpread(actor, WorldState.FutureTime(8.1f)); if (Spreads.Count == 3) { // TODO: how is the stack target selected? - var stackTarget = module.Raid.WithoutSlot().FirstOrDefault(p => !IsSpreadTarget(p)); + var stackTarget = Raid.WithoutSlot().FirstOrDefault(p => !IsSpreadTarget(p)); if (stackTarget != null) - AddStack(stackTarget, module.WorldState.CurrentTime.AddSeconds(8.1f)); + AddStack(stackTarget, WorldState.FutureTime(8.1f)); } } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.CosmoMeteorStack or AID.CosmoMeteorFlare) { diff --git a/BossMod/Modules/Endwalker/Ultimate/TOP/P6FlashGale.cs b/BossMod/Modules/Endwalker/Ultimate/TOP/P6FlashGale.cs index bafee26de0..3d964f935d 100644 --- a/BossMod/Modules/Endwalker/Ultimate/TOP/P6FlashGale.cs +++ b/BossMod/Modules/Endwalker/Ultimate/TOP/P6FlashGale.cs @@ -11,16 +11,16 @@ public P6FlashGale() : base(centerAtTarget: true) { } public override void Init(BossModule module) { _source = module.Enemies(OID.BossP6).FirstOrDefault(); - ForbiddenPlayers = module.Raid.WithSlot(true).WhereActor(p => p.Role != Role.Tank).Mask(); + ForbiddenPlayers = Raid.WithSlot(true).WhereActor(p => p.Role != Role.Tank).Mask(); } - public override void Update(BossModule module) + public override void Update() { CurrentBaits.Clear(); if (_source != null) { - var mainTarget = module.WorldState.Actors.Find(_source.TargetID); - var farTarget = module.Raid.WithoutSlot().Farthest(_source.Position); + var mainTarget = WorldState.Actors.Find(_source.TargetID); + var farTarget = Raid.WithoutSlot().Farthest(_source.Position); if (mainTarget != null) CurrentBaits.Add(new(_source, mainTarget, _shape)); if (farTarget != null) @@ -28,7 +28,7 @@ public override void Update(BossModule module) } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.FlashGale) ++NumCasts; diff --git a/BossMod/Modules/Endwalker/Ultimate/TOP/P6WaveCannon.cs b/BossMod/Modules/Endwalker/Ultimate/TOP/P6WaveCannon.cs index 3d2665bc4a..b7278ae55e 100644 --- a/BossMod/Modules/Endwalker/Ultimate/TOP/P6WaveCannon.cs +++ b/BossMod/Modules/Endwalker/Ultimate/TOP/P6WaveCannon.cs @@ -1,15 +1,12 @@ namespace BossMod.Endwalker.Ultimate.TOP; -class P6WaveCannonPuddle : Components.SelfTargetedAOEs -{ - public P6WaveCannonPuddle() : base(ActionID.MakeSpell(AID.P6WaveCannonPuddle), new AOEShapeCircle(6)) { } -} +class P6WaveCannonPuddle(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.P6WaveCannonPuddle), new AOEShapeCircle(6)); class P6WaveCannonExaflare : Components.Exaflare { public P6WaveCannonExaflare() : base(8) { } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.P6WaveCannonExaflareFirst) { @@ -17,7 +14,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.P6WaveCannonExaflareFirst or AID.P6WaveCannonExaflareRest) { @@ -25,7 +22,7 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent int index = Lines.FindIndex(item => item.Next.AlmostEqual(caster.Position, 1)); if (index == -1) { - module.ReportError(this, $"Failed to find entry for {caster.InstanceID:X}"); + ReportError($"Failed to find entry for {caster.InstanceID:X}"); return; } @@ -40,14 +37,14 @@ class P6WaveCannonProteans : Components.GenericBaitAway { private static readonly AOEShapeRect _shape = new(100, 4); - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.P6WaveCannonProtean) - foreach (var p in module.Raid.WithoutSlot(true)) + foreach (var p in Raid.WithoutSlot(true)) CurrentBaits.Add(new(caster, p, _shape)); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.P6WaveCannonProteanAOE) { @@ -65,14 +62,14 @@ public P6WaveCannonWildCharge() : base(4, ActionID.MakeSpell(AID.P6WaveCannonWil FixedLength = 100; } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.P6WaveCannonProtean) { Source = caster; // TODO: find out how it selects target... bool targetAssigned = false; - foreach (var (i, p) in module.Raid.WithSlot(true)) + foreach (var (i, p) in Raid.WithSlot(true)) { PlayerRoles[i] = p.Role == Role.Tank ? PlayerRole.Share : targetAssigned ? PlayerRole.ShareNotFirst : PlayerRole.Target; targetAssigned |= PlayerRoles[i] == PlayerRole.Target; diff --git a/BossMod/Modules/Endwalker/Ultimate/TOP/TOP.cs b/BossMod/Modules/Endwalker/Ultimate/TOP/TOP.cs index ab7fbe2397..be71eec9f6 100644 --- a/BossMod/Modules/Endwalker/Ultimate/TOP/TOP.cs +++ b/BossMod/Modules/Endwalker/Ultimate/TOP/TOP.cs @@ -1,24 +1,12 @@ namespace BossMod.Endwalker.Ultimate.TOP; -class SolarRayM : Components.BaitAwayCast -{ - public SolarRayM() : base(ActionID.MakeSpell(AID.SolarRayM), new AOEShapeCircle(5), true) { } -} +class SolarRayM(BossModule module) : Components.BaitAwayCast(module, ActionID.MakeSpell(AID.SolarRayM), new AOEShapeCircle(5), true); -class SolarRayF : Components.BaitAwayCast -{ - public SolarRayF() : base(ActionID.MakeSpell(AID.SolarRayF), new AOEShapeCircle(5), true) { } -} +class SolarRayF(BossModule module) : Components.BaitAwayCast(module, ActionID.MakeSpell(AID.SolarRayF), new AOEShapeCircle(5), true); -class P4BlueScreen : Components.CastCounter -{ - public P4BlueScreen() : base(ActionID.MakeSpell(AID.BlueScreenAOE)) { } -} +class P4BlueScreen(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.BlueScreenAOE)); -class P5BlindFaith : Components.CastHint -{ - public P5BlindFaith() : base(ActionID.MakeSpell(AID.BlindFaithSuccess), "Intermission") { } -} +class P5BlindFaith(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.BlindFaithSuccess), "Intermission"); [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 908)] public class TOP : BossModule diff --git a/BossMod/Modules/Endwalker/Unreal/Un1Ultima/Garuda.cs b/BossMod/Modules/Endwalker/Unreal/Un1Ultima/Garuda.cs index f0b6f35cee..08cf105067 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un1Ultima/Garuda.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un1Ultima/Garuda.cs @@ -11,11 +11,11 @@ class Garuda : BossComponent private static readonly AOEShapeDonut _aoeEOTS = new(13, 25); // TODO: check inner range private static readonly AOEShapeCircle _aoeGeocrush = new(18); // TODO: check falloff - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_aoeMistralSong != null) { - var adjPos = _vulcanBurstImminent ? module.Bounds.ClampToBounds(Components.Knockback.AwayFromSource(actor.Position, _mistralSong, 30)) : actor.Position; + var adjPos = _vulcanBurstImminent ? Module.Bounds.ClampToBounds(Components.Knockback.AwayFromSource(actor.Position, _mistralSong, 30)) : actor.Position; if (_aoeMistralSong.Check(adjPos, _mistralSong)) hints.Add("GTFO from aoe!"); } @@ -26,7 +26,7 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint hints.Add("Go to edge!"); } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { _aoeMistralSong.Draw(arena, _mistralSong); _aoeEOTS.Draw(arena, _eots); @@ -34,7 +34,7 @@ public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc _aoeGeocrush.Draw(arena, _geocrush); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { var adjPos = _vulcanBurstImminent ? arena.Bounds.ClampToBounds(Components.Knockback.AwayFromSource(pc.Position, _mistralSong, 30)) : pc.Position; if (adjPos != pc.Position) @@ -44,7 +44,7 @@ public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { @@ -61,7 +61,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { @@ -78,7 +78,7 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.VulcanBurst) _vulcanBurstImminent = false; diff --git a/BossMod/Modules/Endwalker/Unreal/Un1Ultima/Mechanics.cs b/BossMod/Modules/Endwalker/Unreal/Un1Ultima/Mechanics.cs index 4dc560e29c..8b3175a3a9 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un1Ultima/Mechanics.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un1Ultima/Mechanics.cs @@ -22,19 +22,19 @@ class Mechanics : BossComponent private static readonly float _orbSharedRange = 8; private static readonly float _orbFixateRange = 6; - public override void Update(BossModule module) + public override void Update() { // TODO: this is bad, we need to find a way to associate orb to kiter... if (_orbKiters.Count > 0 && module.Enemies(OID.Aetheroplasm).Count == 0) _orbKiters.Clear(); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { - var mtSlot = module.WorldState.Party.FindSlot(module.PrimaryActor.TargetID); + var mtSlot = WorldState.Party.FindSlot(Module.PrimaryActor.TargetID); if (actor.Role == Role.Tank) { - if (module.PrimaryActor.TargetID == actor.InstanceID) + if (Module.PrimaryActor.TargetID == actor.InstanceID) { if (_tankStacks[slot] >= 4) hints.Add("Pass aggro to co-tank!"); @@ -46,24 +46,24 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } } - var mt = module.WorldState.Party[mtSlot]; - if (slot != mtSlot && mt != null && (_aoeCleave.Check(actor.Position, mt) || _aoeDiffractive.Check(actor.Position, module.PrimaryActor.Position, Angle.FromDirection(mt.Position - module.PrimaryActor.Position)))) + var mt = WorldState.Party[mtSlot]; + if (slot != mtSlot && mt != null && (_aoeCleave.Check(actor.Position, mt) || _aoeDiffractive.Check(actor.Position, Module.PrimaryActor.Position, Angle.FromDirection(mt.Position - Module.PrimaryActor.Position)))) { hints.Add("GTFO from tank!"); } // TODO: reconsider whether we really care about spread for vents/lasers... - //if (actor.Role is Role.Healer or Role.Ranged && GeometryUtils.InCircle(actor.Position - module.PrimaryActor.Position, _ceruleumVentRange)) + //if (actor.Role is Role.Healer or Role.Ranged && GeometryUtils.InCircle(actor.Position - Module.PrimaryActor.Position, _ceruleumVentRange)) //{ // hints.Add("Move from boss"); //} - //if (module.Raid.WithoutSlot().InRadiusExcluding(actor, _homingLasersRange).Any()) + //if (Raid.WithoutSlot().InRadiusExcluding(actor, _homingLasersRange).Any()) //{ // hints.Add("Spread"); //} - if (_magitekOffset != null && _aoeMagitekRay.Check(actor.Position, module.PrimaryActor.Position, module.PrimaryActor.Rotation + _magitekOffset.Value)) + if (_magitekOffset != null && _aoeMagitekRay.Check(actor.Position, Module.PrimaryActor.Position, Module.PrimaryActor.Rotation + _magitekOffset.Value)) { hints.Add("GTFO from ray aoe!"); } @@ -81,25 +81,25 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint // TODO: large detonations } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { if (_magitekOffset != null) - _aoeMagitekRay.Draw(arena, module.PrimaryActor.Position, module.PrimaryActor.Rotation + _magitekOffset.Value); + _aoeMagitekRay.Draw(arena, Module.PrimaryActor.Position, Module.PrimaryActor.Rotation + _magitekOffset.Value); foreach (var bit in module.Enemies(OID.MagitekBit).Where(bit => bit.CastInfo != null)) _aoeAssaultCannon.Draw(arena, bit); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - var mt = module.WorldState.Actors.Find(module.PrimaryActor.TargetID); - foreach (var player in module.Raid.WithoutSlot().Exclude(pc)) + var mt = WorldState.Actors.Find(Module.PrimaryActor.TargetID); + foreach (var player in Raid.WithoutSlot().Exclude(pc)) arena.Actor(player, _orbKiters.Contains(player.InstanceID) ? ArenaColor.Danger : player == mt ? ArenaColor.PlayerInteresting : ArenaColor.PlayerGeneric); if (mt != null) arena.AddCircle(mt.Position, _aoeCleave.Radius, ArenaColor.Danger); //if (pc.Role is Role.Healer or Role.Ranged) - // arena.AddCircle(module.PrimaryActor.Position, _ceruleumVentRange, ArenaColor.Danger); + // arena.AddCircle(Module.PrimaryActor.Position, _ceruleumVentRange, ArenaColor.Danger); foreach (var orb in module.Enemies(OID.Ultimaplasm).Where(orb => !_orbsSharedExploded.Contains(orb.InstanceID))) { @@ -121,19 +121,19 @@ public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc } } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.ViscousAetheroplasm) SetTankStacks(module, actor, status.Extra); } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.ViscousAetheroplasm) SetTankStacks(module, actor, 0); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { Angle? ray = (AID)spell.Action.ID switch { @@ -145,17 +145,17 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf if (ray == null) return; if (_magitekOffset != null) - module.ReportError(this, "Several concurrent magitek rays"); + ReportError("Several concurrent magitek rays"); _magitekOffset = ray.Value; } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.MagitekRayCenter or AID.MagitekRayLeft or AID.MagitekRayRight) _magitekOffset = null; } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { @@ -173,7 +173,7 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent private void SetTankStacks(BossModule module, Actor actor, int stacks) { - int slot = module.Raid.FindSlot(actor.InstanceID); + int slot = Raid.FindSlot(actor.InstanceID); if (slot >= 0) _tankStacks[slot] = stacks; } diff --git a/BossMod/Modules/Endwalker/Unreal/Un1Ultima/TitanIfrit.cs b/BossMod/Modules/Endwalker/Unreal/Un1Ultima/TitanIfrit.cs index 6ca88163d5..0a249c057d 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un1Ultima/TitanIfrit.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un1Ultima/TitanIfrit.cs @@ -11,13 +11,13 @@ class TitanIfrit : BossComponent private static readonly AOEShapeCircle _aoeEruption = new(8); private static readonly AOEShapeRect _aoeCrimsonCyclone = new(38, 6); - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_activeLocationTargetedAOEs.Any(e => e.Item2.Check(actor.Position, e.Item1.CastInfo!.LocXZ)) || _crimsonCyclone.Any(a => _aoeCrimsonCyclone.Check(actor.Position, a))) hints.Add("GTFO from aoe!"); } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { foreach (var (a, aoe) in _activeLocationTargetedAOEs) aoe.Draw(arena, a.CastInfo!.LocXZ); @@ -25,7 +25,7 @@ public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc _aoeCrimsonCyclone.Draw(arena, a); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { @@ -44,7 +44,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { diff --git a/BossMod/Modules/Endwalker/Unreal/Un1Ultima/Un1Ultima.cs b/BossMod/Modules/Endwalker/Unreal/Un1Ultima/Un1Ultima.cs index 3733b0499a..86bca04fd1 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un1Ultima/Un1Ultima.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un1Ultima/Un1Ultima.cs @@ -3,9 +3,9 @@ // TODO: consider how phase changes could be detected and create different states for them?.. class Phases : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { - var hint = ((float)module.PrimaryActor.HP.Cur / module.PrimaryActor.HP.Max) switch + var hint = ((float)Module.PrimaryActor.HP.Cur / Module.PrimaryActor.HP.Max) switch { > 0.8f => "Garuda -> 80% Titan", > 0.65f => "Titan -> 65% Ifrit", @@ -34,7 +34,4 @@ public Un1UltimaStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.RemovedUnreal, GroupID = 825, NameID = 2137)] -public class Un1Ultima : BossModule -{ - public Un1Ultima(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(0, 0), 20)) { } -} +public class Un1Ultima(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(0, 0), 20)); diff --git a/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/EinSof.cs b/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/EinSof.cs index 1dfa9fb415..c4ca6698f0 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/EinSof.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/EinSof.cs @@ -10,7 +10,7 @@ class EinSof : Components.GenericAOEs public EinSof() : base(ActionID.MakeSpell(AID.EinSofAOE)) { } - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { return _active.Select(p => new AOEInstance(_shape, p.Position)); } diff --git a/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/P1FiendishRage.cs b/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/P1FiendishRage.cs index dba8709dd2..da101f3bdb 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/P1FiendishRage.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/P1FiendishRage.cs @@ -8,12 +8,12 @@ class P1FiendishRage : Components.CastCounter public P1FiendishRage() : base(ActionID.MakeSpell(AID.FiendishRage)) { } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_targets.Any()) { - int numClips = module.Raid.WithSlot(true).IncludedInMask(_targets).InRadius(actor.Position, _range).Count(); - if (module.PrimaryActor.TargetID == actor.InstanceID) + int numClips = Raid.WithSlot(true).IncludedInMask(_targets).InRadius(actor.Position, _range).Count(); + if (Module.PrimaryActor.TargetID == actor.InstanceID) { if (numClips > 0) { @@ -27,20 +27,20 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } } - public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) + public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) { return _targets[playerSlot] ? PlayerPriority.Danger : PlayerPriority.Irrelevant; } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - foreach (var target in module.Raid.WithSlot(true).IncludedInMask(_targets)) + foreach (var target in Raid.WithSlot(true).IncludedInMask(_targets)) arena.AddCircle(target.Item2.Position, _range, ArenaColor.Danger); } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if ((IconID)iconID == IconID.FiendishRage) - _targets.Set(module.Raid.FindSlot(actor.InstanceID)); + _targets.Set(Raid.FindSlot(actor.InstanceID)); } } diff --git a/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/P1Ratzon.cs b/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/P1Ratzon.cs index 3cda311f3c..a8d0f0e4c4 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/P1Ratzon.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/P1Ratzon.cs @@ -9,51 +9,51 @@ class P1Ratzon : BossComponent private static readonly float _greenRadius = 5; private static readonly float _purpleRadius = 10; - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if ((_greenTargets | _purpleTargets).None()) return; - bool clippedByGreen = module.Raid.WithSlot().Exclude(slot).IncludedInMask(_greenTargets).InRadius(actor.Position, _greenRadius).Any(); - bool clippedByPurple = module.Raid.WithSlot().Exclude(slot).IncludedInMask(_purpleTargets).InRadius(actor.Position, _purpleRadius).Any(); + bool clippedByGreen = Raid.WithSlot().Exclude(slot).IncludedInMask(_greenTargets).InRadius(actor.Position, _greenRadius).Any(); + bool clippedByPurple = Raid.WithSlot().Exclude(slot).IncludedInMask(_purpleTargets).InRadius(actor.Position, _purpleRadius).Any(); hints.Add($"Spread! (debuff: {(_greenTargets[slot] ? "green" : _purpleTargets[slot] ? "purple" : "none")})", clippedByGreen || clippedByPurple); } - public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) + public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) { return (_greenTargets | _purpleTargets)[playerSlot] ? PlayerPriority.Interesting : PlayerPriority.Irrelevant; } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - foreach (var (slot, actor) in module.Raid.WithSlot().IncludedInMask(_greenTargets)) + foreach (var (slot, actor) in Raid.WithSlot().IncludedInMask(_greenTargets)) arena.AddCircle(actor.Position, _greenRadius, 0xff00ff00, slot == pcSlot ? 2 : 1); - foreach (var (slot, actor) in module.Raid.WithSlot().IncludedInMask(_purpleTargets)) + foreach (var (slot, actor) in Raid.WithSlot().IncludedInMask(_purpleTargets)) arena.AddCircle(actor.Position, _purpleRadius, 0xffff00ff, slot == pcSlot ? 2 : 1); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { case AID.RatzonAOEGreen: - _greenTargets.Clear(module.Raid.FindSlot(spell.MainTargetID)); + _greenTargets.Clear(Raid.FindSlot(spell.MainTargetID)); break; case AID.RatzonAOEPurple: - _purpleTargets.Clear(module.Raid.FindSlot(spell.MainTargetID)); + _purpleTargets.Clear(Raid.FindSlot(spell.MainTargetID)); break; } } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { switch ((IconID)iconID) { case IconID.RatzonGreen: - _greenTargets.Set(module.Raid.FindSlot(actor.InstanceID)); + _greenTargets.Set(Raid.FindSlot(actor.InstanceID)); break; case IconID.RatzonPurple: - _purpleTargets.Set(module.Raid.FindSlot(actor.InstanceID)); + _purpleTargets.Set(Raid.FindSlot(actor.InstanceID)); break; } } diff --git a/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/P3Daat.cs b/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/P3Daat.cs index 7098730fd0..c820293a2c 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/P3Daat.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/P3Daat.cs @@ -6,13 +6,13 @@ class P3Daat : Components.CastCounter public P3Daat() : base(ActionID.MakeSpell(AID.DaatRandom)) { } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { - if (module.Raid.WithoutSlot().InRadiusExcluding(actor, radius).Any()) + if (Raid.WithoutSlot().InRadiusExcluding(actor, radius).Any()) hints.Add("Spread!"); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { arena.AddCircle(pc.Position, radius, ArenaColor.Danger); } diff --git a/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/P3Earthshaker.cs b/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/P3Earthshaker.cs index 0aaf49b442..a4d03ae713 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/P3Earthshaker.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/P3Earthshaker.cs @@ -10,25 +10,25 @@ class P3Earthshaker : Components.GenericAOEs public P3Earthshaker() : base(ActionID.MakeSpell(AID.EarthShakerAOE)) { } - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { var origin = module.Enemies(OID.BossP3).FirstOrDefault(); if (origin == null) yield break; // TODO: timing... - foreach (var target in module.Raid.WithSlot(true).IncludedInMask(_targets)) + foreach (var target in Raid.WithSlot(true).IncludedInMask(_targets)) yield return new(_shape, origin.Position, Angle.FromDirection(target.Item2.Position - origin.Position)); } - public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) + public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) { return _targets[playerSlot] ? PlayerPriority.Interesting : PlayerPriority.Irrelevant; } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if ((IconID)iconID == IconID.Earthshaker) - _targets.Set(module.Raid.FindSlot(actor.InstanceID)); + _targets.Set(Raid.FindSlot(actor.InstanceID)); } } diff --git a/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/P3FiendishWail.cs b/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/P3FiendishWail.cs index ebccc03fd0..87c94df757 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/P3FiendishWail.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/P3FiendishWail.cs @@ -11,7 +11,7 @@ class P3FiendishWail : Components.CastCounter public P3FiendishWail() : base(ActionID.MakeSpell(AID.FiendishWailAOE)) { } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (!Active) return; @@ -24,25 +24,25 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint hints.Add("GTFO from tower!", soaking); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (var t in _towers) arena.AddCircle(t.Position, _radius, ArenaColor.Danger); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.ForceAgainstMight) - _physResistMask.Set(module.Raid.FindSlot(actor.InstanceID)); + _physResistMask.Set(Raid.FindSlot(actor.InstanceID)); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) _towers.Add(caster); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) _towers.Remove(caster); diff --git a/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/P3GevurahChesed.cs b/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/P3GevurahChesed.cs index fbf7bc4663..7eea8e3b28 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/P3GevurahChesed.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/P3GevurahChesed.cs @@ -9,33 +9,33 @@ class P3GevurahChesed : Components.CastCounter public P3GevurahChesed() : base(ActionID.MakeSpell(AID.LifeForce)) { } // doesn't matter which spell to track - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { var side = ForbiddenSide(slot); if (side != 0 && _shape.Check(actor.Position, Origin(side), 0.Degrees())) hints.Add("GTFO from aoe!"); } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { var side = ForbiddenSide(pcSlot); if (side != 0) _shape.Draw(arena, Origin(side), 0.Degrees()); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.ForceAgainstMight) - _physResistMask.Set(module.Raid.FindSlot(actor.InstanceID)); + _physResistMask.Set(Raid.FindSlot(actor.InstanceID)); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.GevurahChesed or AID.ChesedGevurah) _physSide = (AID)spell.Action.ID == AID.GevurahChesed ? -1 : +1; } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.GevurahChesed or AID.ChesedGevurah) _physSide = 0; diff --git a/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/Un2Sephirot.cs b/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/Un2Sephirot.cs index bf112fe7d0..48d00513f7 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/Un2Sephirot.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/Un2Sephirot.cs @@ -1,60 +1,27 @@ namespace BossMod.Endwalker.Unreal.Un2Sephirot; -class P1TripleTrial : Components.Cleave -{ - public P1TripleTrial() : base(ActionID.MakeSpell(AID.TripleTrial), new AOEShapeCone(18.5f, 30.Degrees())) { } // TODO: verify angle -} +class P1TripleTrial(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.TripleTrial), new AOEShapeCone(18.5f, 30.Degrees())); // TODO: verify angle -class P1Ein : Components.SelfTargetedAOEs -{ - public P1Ein() : base(ActionID.MakeSpell(AID.Ein), new AOEShapeRect(50, 22.5f)) { } -} +class P1Ein(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Ein), new AOEShapeRect(50, 22.5f)); -class P2GenesisCochma : Components.CastCounter -{ - public P2GenesisCochma() : base(ActionID.MakeSpell(AID.GenesisCochma)) { } -} +class P2GenesisCochma(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.GenesisCochma)); -class P2GenesisBinah : Components.CastCounter -{ - public P2GenesisBinah() : base(ActionID.MakeSpell(AID.GenesisBinah)) { } -} +class P2GenesisBinah(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.GenesisBinah)); -class P3EinSofOhr : Components.CastCounter -{ - public P3EinSofOhr() : base(ActionID.MakeSpell(AID.EinSofOhrAOE)) { } -} +class P3EinSofOhr(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.EinSofOhrAOE)); -class P3Yesod : Components.SelfTargetedAOEs -{ - public P3Yesod() : base(ActionID.MakeSpell(AID.Yesod), new AOEShapeCircle(4)) { } -} +class P3Yesod(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Yesod), new AOEShapeCircle(4)); -class P3PillarOfMercyAOE : Components.SelfTargetedAOEs -{ - public P3PillarOfMercyAOE() : base(ActionID.MakeSpell(AID.PillarOfMercyAOE), new AOEShapeCircle(5)) { } -} +class P3PillarOfMercyAOE(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PillarOfMercyAOE), new AOEShapeCircle(5)); -class P3PillarOfMercyKnockback : Components.KnockbackFromCastTarget -{ - public P3PillarOfMercyKnockback() : base(ActionID.MakeSpell(AID.PillarOfMercyAOE), 17) { } -} +class P3PillarOfMercyKnockback(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.PillarOfMercyAOE), 17); -class P3Malkuth : Components.KnockbackFromCastTarget -{ - public P3Malkuth() : base(ActionID.MakeSpell(AID.Malkuth), 25) { } -} +class P3Malkuth(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.Malkuth), 25); // TODO: show safe spot?.. -class P3Ascension : Components.CastCounter -{ - public P3Ascension() : base(ActionID.MakeSpell(AID.Ascension)) { } -} +class P3Ascension(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.Ascension)); -class P3PillarOfSeverity : Components.CastCounter -{ - public P3PillarOfSeverity() : base(ActionID.MakeSpell(AID.PillarOfSeverityAOE)) { } -} +class P3PillarOfSeverity(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.PillarOfSeverityAOE)); [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.BossP1, GroupType = BossModuleInfo.GroupType.RemovedUnreal, GroupID = 875, NameID = 4776)] public class Un2Sephirot : BossModule diff --git a/BossMod/Modules/Endwalker/Unreal/Un3Sophia/ArmsOfWisdom.cs b/BossMod/Modules/Endwalker/Unreal/Un3Sophia/ArmsOfWisdom.cs index fa0f2f98c4..949043157e 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un3Sophia/ArmsOfWisdom.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un3Sophia/ArmsOfWisdom.cs @@ -6,13 +6,13 @@ public ArmsOfWisdom() : base(ActionID.MakeSpell(AID.ArmsOfWisdom)) { } private Actor? _caster; - public override IEnumerable Sources(BossModule module, int slot, Actor actor) + public override IEnumerable Sources(int slot, Actor actor) { if (_caster?.CastInfo?.TargetID == actor.InstanceID) yield return new(_caster.Position, 5, _caster.CastInfo.NPCFinishAt); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { base.AddHints(module, slot, actor, hints, movementHints); @@ -26,13 +26,13 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) _caster = caster; } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) _caster = null; diff --git a/BossMod/Modules/Endwalker/Unreal/Un3Sophia/Demiurges.cs b/BossMod/Modules/Endwalker/Unreal/Un3Sophia/Demiurges.cs index f80e8d775c..18b3728a96 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un3Sophia/Demiurges.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un3Sophia/Demiurges.cs @@ -17,14 +17,14 @@ public override void Init(BossModule module) _third = module.Enemies(OID.Demiurge3); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { base.DrawArenaForeground(module, pcSlot, pc, arena); arena.Actors(_second, ArenaColor.Enemy); arena.Actors(_third, ArenaColor.Enemy); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { var sides = (AID)spell.Action.ID switch { @@ -37,43 +37,31 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } -class DivineSpark : Components.CastGaze -{ - public DivineSpark() : base(ActionID.MakeSpell(AID.DivineSpark)) { } -} +class DivineSpark(BossModule module) : Components.CastGaze(module, ActionID.MakeSpell(AID.DivineSpark)); -class GnosticRant : Components.SelfTargetedAOEs -{ - public GnosticRant() : base(ActionID.MakeSpell(AID.GnosticRant), new AOEShapeCone(40, 135.Degrees())) { } -} +class GnosticRant(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.GnosticRant), new AOEShapeCone(40, 135.Degrees())); -class GnosticSpear : Components.SelfTargetedAOEs -{ - public GnosticSpear() : base(ActionID.MakeSpell(AID.GnosticSpear), new AOEShapeRect(20.75f, 2, 0.75f)) { } -} +class GnosticSpear(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.GnosticSpear), new AOEShapeRect(20.75f, 2, 0.75f)); -class RingOfPain : Components.PersistentVoidzoneAtCastTarget -{ - public RingOfPain() : base(5, ActionID.MakeSpell(AID.RingOfPain), m => m.Enemies(OID.RingOfPain).Where(z => z.EventState != 7), 1.7f) { } -} +class RingOfPain(BossModule module) : Components.PersistentVoidzoneAtCastTarget(module, 5, ActionID.MakeSpell(AID.RingOfPain), m => m.Enemies(OID.RingOfPain).Where(z => z.EventState != 7), 1.7f); class Infusion : Components.GenericWildCharge { public Infusion() : base(5, ActionID.MakeSpell(AID.Infusion)) { } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) { Source = caster; - foreach (var (slot, player) in module.Raid.WithSlot()) + foreach (var (slot, player) in Raid.WithSlot()) { PlayerRoles[slot] = player.InstanceID == spell.TargetID ? PlayerRole.Target : PlayerRole.Share; } } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) Source = null; diff --git a/BossMod/Modules/Endwalker/Unreal/Un3Sophia/Pairs.cs b/BossMod/Modules/Endwalker/Unreal/Un3Sophia/Pairs.cs index cdc0c83f2e..6deb7bc1be 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un3Sophia/Pairs.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un3Sophia/Pairs.cs @@ -11,47 +11,47 @@ class Pairs : BossComponent public bool Active => (_players1 | _players2).Any(); - public override void Update(BossModule module) + public override void Update() { - if (module.WorldState.CurrentTime > _activation && Active) + if (WorldState.CurrentTime > _activation && Active) { _players1.Reset(); _players2.Reset(); } } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { bool atRisk = _players1[slot] ? AtRisk(module, actor, _players1, _players2) : _players2[slot] ? AtRisk(module, actor, _players2, _players1) : false; if (atRisk) hints.Add("Stack with opposite color!"); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - foreach (var p in module.Raid.WithSlot().IncludedInMask(_players1).Exclude(pc)) + foreach (var p in Raid.WithSlot().IncludedInMask(_players1).Exclude(pc)) arena.AddCircle(p.Item2.Position, _radius, _players1[pcSlot] ? ArenaColor.Danger : ArenaColor.Safe); - foreach (var p in module.Raid.WithSlot().IncludedInMask(_players2).Exclude(pc)) + foreach (var p in Raid.WithSlot().IncludedInMask(_players2).Exclude(pc)) arena.AddCircle(p.Item2.Position, _radius, _players2[pcSlot] ? ArenaColor.Danger : ArenaColor.Safe); } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { switch ((IconID)iconID) { case IconID.Pairs1: - _players1.Set(module.Raid.FindSlot(actor.InstanceID)); - _activation = module.WorldState.CurrentTime.AddSeconds(5); // TODO: verify + _players1.Set(Raid.FindSlot(actor.InstanceID)); + _activation = WorldState.FutureTime(5); // TODO: verify break; case IconID.Pairs2: - _players2.Set(module.Raid.FindSlot(actor.InstanceID)); - _activation = module.WorldState.CurrentTime.AddSeconds(5); // TODO: verify + _players2.Set(Raid.FindSlot(actor.InstanceID)); + _activation = WorldState.FutureTime(5); // TODO: verify break; } } private bool AtRisk(BossModule module, Actor actor, BitMask same, BitMask opposite) { - return module.Raid.WithSlot().IncludedInMask(opposite).InRadius(actor.Position, _radius).Any() || !module.Raid.WithSlot().IncludedInMask(same).InRadiusExcluding(actor, _radius).Any(); + return Raid.WithSlot().IncludedInMask(opposite).InRadius(actor.Position, _radius).Any() || !Raid.WithSlot().IncludedInMask(same).InRadiusExcluding(actor, _radius).Any(); } } diff --git a/BossMod/Modules/Endwalker/Unreal/Un3Sophia/Tilt.cs b/BossMod/Modules/Endwalker/Unreal/Un3Sophia/Tilt.cs index 85be0cfb83..3f51c94c4a 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un3Sophia/Tilt.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un3Sophia/Tilt.cs @@ -11,13 +11,13 @@ class Tilt : Components.Knockback public Tilt() : base(ActionID.MakeSpell(AID.QuasarTilt)) { } - public override IEnumerable Sources(BossModule module, int slot, Actor actor) + public override IEnumerable Sources(int slot, Actor actor) { if (Distance > 0) yield return new(new(), Distance, Activation, null, Direction, Kind.DirForward); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { base.OnEventCast(module, caster, spell); if (spell.Action == WatchedAction) @@ -29,7 +29,7 @@ class ScalesOfWisdom : Tilt { public bool RaidwideDone; - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { base.OnEventCast(module, caster, spell); switch ((AID)spell.Action.ID) @@ -38,7 +38,7 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent // prepare for first tilt Distance = DistanceShort; Direction = -90.Degrees(); - Activation = module.WorldState.CurrentTime.AddSeconds(8); + Activation = WorldState.FutureTime(8); break; case AID.QuasarTilt: if (NumCasts == 1) @@ -46,7 +46,7 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent // prepare for second tilt Distance = DistanceShort; Direction = 90.Degrees(); - Activation = module.WorldState.CurrentTime.AddSeconds(4.9f); + Activation = WorldState.FutureTime(4.9f); } break; case AID.ScalesOfWisdomRaidwide: @@ -61,7 +61,7 @@ class Quasar : Tilt public int WeightLeft; public int WeightRight; - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { var weight = (AID)spell.Action.ID switch { diff --git a/BossMod/Modules/Endwalker/Unreal/Un3Sophia/Un3Sophia.cs b/BossMod/Modules/Endwalker/Unreal/Un3Sophia/Un3Sophia.cs index 3bc81e9cd7..1e179b79bd 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un3Sophia/Un3Sophia.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un3Sophia/Un3Sophia.cs @@ -1,79 +1,34 @@ namespace BossMod.Endwalker.Unreal.Un3Sophia; -class ThunderDonut : Components.SelfTargetedAOEs -{ - public ThunderDonut() : base(ActionID.MakeSpell(AID.ThunderDonut), new AOEShapeDonut(5, 20)) { } -} +class ThunderDonut(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ThunderDonut), new AOEShapeDonut(5, 20)); -class ExecuteDonut : Components.SelfTargetedAOEs -{ - public ExecuteDonut() : base(ActionID.MakeSpell(AID.ExecuteDonut), new AOEShapeDonut(5, 20)) { } -} +class ExecuteDonut(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ExecuteDonut), new AOEShapeDonut(5, 20)); -class Aero : Components.SelfTargetedAOEs -{ - public Aero() : base(ActionID.MakeSpell(AID.Aero), new AOEShapeCircle(10)) { } -} +class Aero(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Aero), new AOEShapeCircle(10)); -class ExecuteAero : Components.SelfTargetedAOEs -{ - public ExecuteAero() : base(ActionID.MakeSpell(AID.ExecuteAero), new AOEShapeCircle(10)) { } -} +class ExecuteAero(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ExecuteAero), new AOEShapeCircle(10)); -class ThunderCone : Components.SelfTargetedAOEs -{ - public ThunderCone() : base(ActionID.MakeSpell(AID.ThunderCone), new AOEShapeCone(20, 45.Degrees())) { } -} +class ThunderCone(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ThunderCone), new AOEShapeCone(20, 45.Degrees())); -class ExecuteCone : Components.SelfTargetedAOEs -{ - public ExecuteCone() : base(ActionID.MakeSpell(AID.ExecuteCone), new AOEShapeCone(20, 45.Degrees())) { } -} +class ExecuteCone(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ExecuteCone), new AOEShapeCone(20, 45.Degrees())); -class LightDewShort : Components.SelfTargetedAOEs -{ - public LightDewShort() : base(ActionID.MakeSpell(AID.LightDewShort), new AOEShapeRect(55, 9, 5)) { } -} +class LightDewShort(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.LightDewShort), new AOEShapeRect(55, 9, 5)); -class LightDewLong : Components.SelfTargetedAOEs -{ - public LightDewLong() : base(ActionID.MakeSpell(AID.LightDewLong), new AOEShapeRect(55, 9, 5)) { } -} +class LightDewLong(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.LightDewLong), new AOEShapeRect(55, 9, 5)); -class Onrush : Components.SelfTargetedAOEs -{ - public Onrush() : base(ActionID.MakeSpell(AID.Onrush), new AOEShapeRect(55, 8, 5)) { } -} +class Onrush(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Onrush), new AOEShapeRect(55, 8, 5)); -class Gnosis : Components.KnockbackFromCastTarget -{ - public Gnosis() : base(ActionID.MakeSpell(AID.Gnosis), 25) { } -} +class Gnosis(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.Gnosis), 25); // note: ~4.2s before first cast boss gets model state 5 -class Cintamani : Components.CastCounter -{ - public Cintamani() : base(ActionID.MakeSpell(AID.Cintamani)) { } -} +class Cintamani(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.Cintamani)); -class QuasarProximity1 : Components.LocationTargetedAOEs -{ - public QuasarProximity1() : base(ActionID.MakeSpell(AID.QuasarProximity1), 15) { } -} +class QuasarProximity1(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.QuasarProximity1), 15); -class QuasarProximity2 : Components.LocationTargetedAOEs -{ - public QuasarProximity2() : base(ActionID.MakeSpell(AID.QuasarProximity2), 15) { } // TODO: reconsider distance -} +class QuasarProximity2(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.QuasarProximity2), 15); // TODO: reconsider distance [ConfigDisplay(Order = 0x330, Parent = typeof(EndwalkerConfig))] -public class Un3SophiaConfig : CooldownPlanningConfigNode -{ - public Un3SophiaConfig() : base(90) { } -} +public class Un3SophiaConfig() : CooldownPlanningConfigNode(90); [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.RemovedUnreal, GroupID = 926, NameID = 5199)] -public class Un3Sophia : BossModule -{ - public Un3Sophia(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsRect(new(0, 0), 20, 15)) { } -} +public class Un3Sophia(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsRect(new(0, 0), 20, 15)); diff --git a/BossMod/Modules/Endwalker/Unreal/Un4Zurvan/P1Platforms.cs b/BossMod/Modules/Endwalker/Unreal/Un4Zurvan/P1Platforms.cs index 2f4424871e..99554b5ac7 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un4Zurvan/P1Platforms.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un4Zurvan/P1Platforms.cs @@ -4,7 +4,7 @@ class P1Platforms : Components.GenericAOEs { public List ForbiddenPlatforms = new(); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => ForbiddenPlatforms; + public override IEnumerable ActiveAOEs(int slot, Actor actor) => ForbiddenPlatforms; public override void OnActorEAnim(BossModule module, Actor actor, uint state) { @@ -21,7 +21,7 @@ public override void OnActorEAnim(BossModule module, Actor actor, uint state) switch (state) { case 0x00040008: - ForbiddenPlatforms.Add(new(new AOEShapeCone(20, 45.Degrees()), module.Bounds.Center, dir, module.WorldState.CurrentTime.AddSeconds(5))); + ForbiddenPlatforms.Add(new(new AOEShapeCone(20, 45.Degrees()), Module.Bounds.Center, dir, WorldState.FutureTime(5))); break; case 0x00100020: ++NumCasts; diff --git a/BossMod/Modules/Endwalker/Unreal/Un4Zurvan/P2Adds.cs b/BossMod/Modules/Endwalker/Unreal/Un4Zurvan/P2Adds.cs index 632943af22..833b8dd307 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un4Zurvan/P2Adds.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un4Zurvan/P2Adds.cs @@ -1,35 +1,17 @@ namespace BossMod.Endwalker.Unreal.Un4Zurvan; // hard-hitting add -class P2ExecratedWill : Components.Adds -{ - public P2ExecratedWill() : base((uint)OID.ExecratedWill) { } -} +class P2ExecratedWill(BossModule module) : Components.Adds(module, (uint)OID.ExecratedWill); // high-priority add (casts comets and meteor) -class P2ExecratedWit : Components.Adds -{ - public P2ExecratedWit() : base((uint)OID.ExecratedWit) { } -} +class P2ExecratedWit(BossModule module) : Components.Adds(module, (uint)OID.ExecratedWit); // low-priority add (casts fear, then magical autos) -class P2ExecratedWile : Components.Adds -{ - public P2ExecratedWile() : base((uint)OID.ExecratedWile) { } -} +class P2ExecratedWile(BossModule module) : Components.Adds(module, (uint)OID.ExecratedWile); // small add -class P2ExecratedThew : Components.Adds -{ - public P2ExecratedThew() : base((uint)OID.ExecratedThew) { } -} +class P2ExecratedThew(BossModule module) : Components.Adds(module, (uint)OID.ExecratedThew); -class P2Comet : Components.LocationTargetedAOEs -{ - public P2Comet() : base(ActionID.MakeSpell(AID.Comet), 4) { } -} +class P2Comet(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Comet), 4); -class P2MeracydianFear : Components.CastGaze -{ - public P2MeracydianFear() : base(ActionID.MakeSpell(AID.MeracydianFear)) { } -} +class P2MeracydianFear(BossModule module) : Components.CastGaze(module, ActionID.MakeSpell(AID.MeracydianFear)); diff --git a/BossMod/Modules/Endwalker/Unreal/Un4Zurvan/P2BrokenSeal.cs b/BossMod/Modules/Endwalker/Unreal/Un4Zurvan/P2BrokenSeal.cs index 3cad2137d3..b2e1c8c773 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un4Zurvan/P2BrokenSeal.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un4Zurvan/P2BrokenSeal.cs @@ -23,7 +23,7 @@ public override void Init(BossModule module) _iceTowers = module.Enemies(OID.IceTower); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (NumCasts > 0) return; @@ -41,18 +41,18 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint hints.Add("Soak the tower!"); } - public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) + public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) { return _playerStates[pcSlot].Color != Color.None && _playerStates[pcSlot].Partner == playerSlot ? PlayerPriority.Interesting : PlayerPriority.Irrelevant; } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (NumCasts > 0) return; var state = _playerStates[pcSlot]; - var partner = state.Color != Color.None && state.Partner >= 0 ? module.Raid[state.Partner] : null; + var partner = state.Color != Color.None && state.Partner >= 0 ? Raid[state.Partner] : null; if (partner != null) { arena.AddLine(pc.Position, partner.Position, state.Color == Color.Fire ? 0xff0080ff : 0xffff8000, state.TooFar ? 2 : 1); @@ -64,7 +64,7 @@ public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc arena.AddCircle(t.Position, 2, state.Color == Color.Ice ? ArenaColor.Safe : ArenaColor.Danger); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { @@ -85,12 +85,12 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } - public override void OnTethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnTethered(Actor source, ActorTetherInfo tether) { if ((TetherID)tether.ID is TetherID.InfiniteAnguish or TetherID.InfiniteFire or TetherID.InfiniteIce) { - var from = module.Raid.FindSlot(source.InstanceID); - var to = module.Raid.FindSlot(tether.Target); + var from = Raid.FindSlot(source.InstanceID); + var to = Raid.FindSlot(tether.Target); if (from >= 0 && to >= 0) { _playerStates[from].Partner = to; @@ -103,7 +103,7 @@ public override void OnTethered(BossModule module, Actor source, ActorTetherInfo private void AssignColor(BossModule module, ulong playerID, Color color) { ++NumAssigned; - var slot = module.Raid.FindSlot(playerID); + var slot = Raid.FindSlot(playerID); if (slot >= 0) _playerStates[slot].Color = color; } diff --git a/BossMod/Modules/Endwalker/Unreal/Un4Zurvan/P2DemonsClaw.cs b/BossMod/Modules/Endwalker/Unreal/Un4Zurvan/P2DemonsClaw.cs index 7a48e82d9d..d47849b2f8 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un4Zurvan/P2DemonsClaw.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un4Zurvan/P2DemonsClaw.cs @@ -6,19 +6,19 @@ public P2DemonsClawKnockback() : base(ActionID.MakeSpell(AID.DemonsClaw), true) private Actor? _caster; - public override IEnumerable Sources(BossModule module, int slot, Actor actor) + public override IEnumerable Sources(int slot, Actor actor) { if (_caster?.CastInfo?.TargetID == actor.InstanceID) yield return new(_caster.Position, 17, _caster.CastInfo.NPCFinishAt); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) _caster = caster; } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) _caster = null; @@ -31,23 +31,23 @@ class P2DemonsClawWaveCannon : Components.GenericWildCharge public P2DemonsClawWaveCannon() : base(5, ActionID.MakeSpell(AID.WaveCannonShared)) { } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) { Source = caster; - foreach (var (slot, player) in module.Raid.WithSlot()) + foreach (var (slot, player) in Raid.WithSlot()) { PlayerRoles[slot] = player == Target ? PlayerRole.Target : PlayerRole.Share; } } else if ((AID)spell.Action.ID == AID.DemonsClaw) { - Target = module.WorldState.Actors.Find(spell.TargetID); + Target = WorldState.Actors.Find(spell.TargetID); } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) Source = null; diff --git a/BossMod/Modules/Endwalker/Unreal/Un4Zurvan/P2Eidos.cs b/BossMod/Modules/Endwalker/Unreal/Un4Zurvan/P2Eidos.cs index 88212148e8..0ace8504bb 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un4Zurvan/P2Eidos.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un4Zurvan/P2Eidos.cs @@ -10,7 +10,7 @@ public P2Eidos() KeepOnPhaseChange = true; } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { var nextPhase = (AID)spell.Action.ID switch { diff --git a/BossMod/Modules/Endwalker/Unreal/Un4Zurvan/P2Soar.cs b/BossMod/Modules/Endwalker/Unreal/Un4Zurvan/P2Soar.cs index 3858ad4a3f..29a24c8502 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un4Zurvan/P2Soar.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un4Zurvan/P2Soar.cs @@ -6,9 +6,9 @@ class P2SoarTwinSpirit : Components.GenericAOEs private AOEShapeRect _shape = new(50, 5); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => _pending.Select(p => p.aoe); + public override IEnumerable ActiveAOEs(int slot, Actor actor) => _pending.Select(p => p.aoe); - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.TwinSpiritFirst) { @@ -16,14 +16,14 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { case AID.TwinSpiritFirst: var index = _pending.FindIndex(p => p.caster == caster); if (index >= 0) - _pending[index] = (caster, new(_shape, spell.LocXZ, Angle.FromDirection(module.Bounds.Center - spell.LocXZ), module.WorldState.CurrentTime.AddSeconds(9.2f))); + _pending[index] = (caster, new(_shape, spell.LocXZ, Angle.FromDirection(Module.Bounds.Center - spell.LocXZ), WorldState.FutureTime(9.2f))); break; case AID.TwinSpiritSecond: _pending.RemoveAll(p => p.caster == caster); @@ -37,42 +37,39 @@ class P2SoarFlamingHalberd : Components.UniformStackSpread { public P2SoarFlamingHalberd() : base(0, 12, alwaysShowSpreads: true) { } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.FlamingHalberd) - AddSpread(actor, module.WorldState.CurrentTime.AddSeconds(5.1f)); + AddSpread(actor, WorldState.FutureTime(5.1f)); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.FlamingHalberd) Spreads.Clear(); // don't bother finding proper target, they all happen at the same time } } -class P2SoarFlamingHalberdVoidzone : Components.PersistentVoidzone -{ - public P2SoarFlamingHalberdVoidzone() : base(8, m => m.Enemies(OID.FlamingHalberdVoidzone).Where(z => z.EventState != 7)) { } -} +class P2SoarFlamingHalberdVoidzone(BossModule module) : Components.PersistentVoidzone(module, 8, m => m.Enemies(OID.FlamingHalberdVoidzone).Where(z => z.EventState != 7)); class P2SoarDemonicDiveCoolFlame : Components.UniformStackSpread { public P2SoarDemonicDiveCoolFlame() : base(7, 8, 7, alwaysShowSpreads: true) { } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { switch ((IconID)iconID) { case IconID.DemonicDive: - AddStack(actor, module.WorldState.CurrentTime.AddSeconds(5.1f)); + AddStack(actor, WorldState.FutureTime(5.1f)); break; case IconID.CoolFlame: - AddSpread(actor, module.WorldState.CurrentTime.AddSeconds(5.1f)); + AddSpread(actor, WorldState.FutureTime(5.1f)); break; } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { diff --git a/BossMod/Modules/Endwalker/Unreal/Un4Zurvan/Un4Zurvan.cs b/BossMod/Modules/Endwalker/Unreal/Un4Zurvan/Un4Zurvan.cs index 9a2e9b7b50..b7f87cae33 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un4Zurvan/Un4Zurvan.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un4Zurvan/Un4Zurvan.cs @@ -1,70 +1,31 @@ namespace BossMod.Endwalker.Unreal.Un4Zurvan; -class P1MetalCutter : Components.Cleave -{ - public P1MetalCutter() : base(ActionID.MakeSpell(AID.MetalCutterP1), new AOEShapeCone(37.44f, 45.Degrees()), (uint)OID.BossP1) { } -} +class P1MetalCutter(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.MetalCutterP1), new AOEShapeCone(37.44f, 45.Degrees()), (uint)OID.BossP1); -class P1FlareStar : Components.LocationTargetedAOEs -{ - public P1FlareStar() : base(ActionID.MakeSpell(AID.FlareStarAOE), 6) { } -} +class P1FlareStar(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.FlareStarAOE), 6); -class P1Purge : Components.CastCounter -{ - public P1Purge() : base(ActionID.MakeSpell(AID.Purge)) { } -} +class P1Purge(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.Purge)); -class P2MetalCutter : Components.Cleave -{ - public P2MetalCutter() : base(ActionID.MakeSpell(AID.MetalCutterP2), new AOEShapeCone(37.44f, 45.Degrees()), (uint)OID.BossP2) { } -} +class P2MetalCutter(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.MetalCutterP2), new AOEShapeCone(37.44f, 45.Degrees()), (uint)OID.BossP2); -class P2IcyVoidzone : Components.PersistentVoidzone -{ - public P2IcyVoidzone() : base(5, m => m.Enemies(OID.IcyVoidzone).Where(z => z.EventState != 7)) { } -} +class P2IcyVoidzone(BossModule module) : Components.PersistentVoidzone(module, 5, m => m.Enemies(OID.IcyVoidzone).Where(z => z.EventState != 7)); -class P2BitingHalberd : Components.SelfTargetedAOEs -{ - public P2BitingHalberd() : base(ActionID.MakeSpell(AID.BitingHalberd), new AOEShapeCone(55.27f, 135.Degrees())) { } -} +class P2BitingHalberd(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.BitingHalberd), new AOEShapeCone(55.27f, 135.Degrees())); -class P2TailEnd : Components.SelfTargetedAOEs -{ - public P2TailEnd() : base(ActionID.MakeSpell(AID.TailEnd), new AOEShapeCircle(15)) { } -} +class P2TailEnd(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TailEnd), new AOEShapeCircle(15)); -class P2Ciclicle : Components.SelfTargetedAOEs -{ - public P2Ciclicle() : base(ActionID.MakeSpell(AID.Ciclicle), new AOEShapeDonut(10, 20)) { } // TODO: verify inner radius -} +class P2Ciclicle(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Ciclicle), new AOEShapeDonut(10, 20)); // TODO: verify inner radius -class P2SouthernCross : Components.LocationTargetedAOEs -{ - public P2SouthernCross() : base(ActionID.MakeSpell(AID.SouthernCrossAOE), 6) { } -} +class P2SouthernCross(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.SouthernCrossAOE), 6); -class P2SouthernCrossVoidzone : Components.PersistentVoidzone -{ - public P2SouthernCrossVoidzone() : base(6, m => m.Enemies(OID.SouthernCrossVoidzone).Where(z => z.EventState != 7)) { } -} +class P2SouthernCrossVoidzone(BossModule module) : Components.PersistentVoidzone(module, 6, m => m.Enemies(OID.SouthernCrossVoidzone).Where(z => z.EventState != 7)); -class P2WaveCannon : Components.BaitAwayCast -{ - public P2WaveCannon() : base(ActionID.MakeSpell(AID.WaveCannonSolo), new AOEShapeRect(55.27f, 5)) { } -} +class P2WaveCannon(BossModule module) : Components.BaitAwayCast(module, ActionID.MakeSpell(AID.WaveCannonSolo), new AOEShapeRect(55.27f, 5)); -class P2TyrfingFire : Components.Cleave -{ - public P2TyrfingFire() : base(ActionID.MakeSpell(AID.TyrfingFire), new AOEShapeCircle(5), (uint)OID.BossP2, originAtTarget: true) { } -} +class P2TyrfingFire(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.TyrfingFire), new AOEShapeCircle(5), (uint)OID.BossP2, originAtTarget: true); [ConfigDisplay(Order = 0x340, Parent = typeof(EndwalkerConfig))] -public class Un4ZurvanConfig : CooldownPlanningConfigNode -{ - public Un4ZurvanConfig() : base(90) { } -} +public class Un4ZurvanConfig() : CooldownPlanningConfigNode(90); [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.BossP1, GroupType = BossModuleInfo.GroupType.RemovedUnreal, GroupID = 951, NameID = 5567)] public class Un4Zurvan : BossModule diff --git a/BossMod/Modules/Endwalker/Unreal/Un5Thordan/BurningChains.cs b/BossMod/Modules/Endwalker/Unreal/Un5Thordan/BurningChains.cs index 58fd910ced..c96c03f4ab 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un5Thordan/BurningChains.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un5Thordan/BurningChains.cs @@ -7,25 +7,25 @@ class BurningChains : Components.CastCounter public BurningChains() : base(ActionID.MakeSpell(AID.HolyChain)) { } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_tetherPartners[slot] >= 0) hints.Add("Break chains!"); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - var partner = module.Raid[_tetherPartners[pcSlot]]; + var partner = Raid[_tetherPartners[pcSlot]]; if (partner != null) arena.AddLine(pc.Position, partner.Position, ArenaColor.Danger); } - public override void OnTethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnTethered(Actor source, ActorTetherInfo tether) { if (tether.ID == (uint)TetherID.BurningChains) { - var src = module.Raid.FindSlot(source.InstanceID); - var tgt = module.Raid.FindSlot(tether.Target); + var src = Raid.FindSlot(source.InstanceID); + var tgt = Raid.FindSlot(tether.Target); if (src >= 0 && tgt >= 0) { _tetherPartners[src] = tgt; @@ -34,12 +34,12 @@ public override void OnTethered(BossModule module, Actor source, ActorTetherInfo } } - public override void OnUntethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnUntethered(Actor source, ActorTetherInfo tether) { if (tether.ID == (uint)TetherID.BurningChains) { - var src = module.Raid.FindSlot(source.InstanceID); - var tgt = module.Raid.FindSlot(tether.Target); + var src = Raid.FindSlot(source.InstanceID); + var tgt = Raid.FindSlot(tether.Target); if (src >= 0) _tetherPartners[src] = -1; if (tgt >= 0) diff --git a/BossMod/Modules/Endwalker/Unreal/Un5Thordan/DragonsGaze.cs b/BossMod/Modules/Endwalker/Unreal/Un5Thordan/DragonsGaze.cs index dc7e90fcf7..60c8ddaf76 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un5Thordan/DragonsGaze.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un5Thordan/DragonsGaze.cs @@ -5,16 +5,16 @@ class DragonsGaze : Components.GenericGaze private List _casters = new(); private WPos _posHint; - public override IEnumerable ActiveEyes(BossModule module, int slot, Actor actor) => _casters.Select(c => new Eye(c.Position, c.CastInfo!.NPCFinishAt)); + public override IEnumerable ActiveEyes(int slot, Actor actor) => _casters.Select(c => new Eye(c.Position, c.CastInfo!.NPCFinishAt)); - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { base.DrawArenaForeground(module, pcSlot, pc, arena); if (_posHint != default) arena.AddCircle(_posHint, 1, ArenaColor.Safe); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.DragonsGaze or AID.DragonsGlory) { @@ -23,7 +23,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.DragonsGaze or AID.DragonsGlory) _casters.Remove(caster); @@ -34,7 +34,7 @@ public override void OnActorEAnim(BossModule module, Actor actor, uint state) if (state == 0x00040008 && (OID)actor.OID is >= OID.DragonEyeN and <= OID.DragonEyeNW) { var index = actor.OID - (uint)OID.DragonEyeN; // 0 = N, then CW - _posHint = module.Bounds.Center + 19 * (180 - (int)index * 45).Degrees().ToDirection(); + _posHint = Module.Bounds.Center + 19 * (180 - (int)index * 45).Degrees().ToDirection(); } } } diff --git a/BossMod/Modules/Endwalker/Unreal/Un5Thordan/HolyShieldBash.cs b/BossMod/Modules/Endwalker/Unreal/Un5Thordan/HolyShieldBash.cs index 567483dd8b..75b0234a28 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un5Thordan/HolyShieldBash.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un5Thordan/HolyShieldBash.cs @@ -4,20 +4,20 @@ class HolyShieldBash : Components.GenericWildCharge { public HolyShieldBash() : base(3) { } - public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) + public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) { return PlayerRoles[playerSlot] == PlayerRole.Target ? PlayerPriority.Interesting : PlayerPriority.Irrelevant; } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { case AID.HolyShieldBash: - foreach (var (i, p) in module.Raid.WithSlot(true)) + foreach (var (i, p) in Raid.WithSlot(true)) { // TODO: we don't really account for possible MT changes... - PlayerRoles[i] = p.InstanceID == spell.TargetID ? PlayerRole.Target : p.Role != Role.Tank ? PlayerRole.ShareNotFirst : p.InstanceID != module.PrimaryActor.TargetID ? PlayerRole.Share : PlayerRole.Avoid; + PlayerRoles[i] = p.InstanceID == spell.TargetID ? PlayerRole.Target : p.Role != Role.Tank ? PlayerRole.ShareNotFirst : p.InstanceID != Module.PrimaryActor.TargetID ? PlayerRole.Share : PlayerRole.Avoid; } break; case AID.SpearOfTheFury: @@ -26,7 +26,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { diff --git a/BossMod/Modules/Endwalker/Unreal/Un5Thordan/Intermission2.cs b/BossMod/Modules/Endwalker/Unreal/Un5Thordan/Intermission2.cs index f028899b51..82365ef7a6 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un5Thordan/Intermission2.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un5Thordan/Intermission2.cs @@ -8,13 +8,13 @@ public enum Buff { None, Shield, Sword } public bool Active => _adds.Any(a => AddActive(a.actor)); - public override void OnActorCreated(BossModule module, Actor actor) + public override void OnActorCreated(Actor actor) { if ((OID)actor.OID is OID.Adelphel or OID.Janlenoux) _adds.Add((actor, Buff.None)); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_adds.Any(a => a.buff == Buff.Sword && a.actor.CastInfo?.TargetID == actor.InstanceID && a.actor.CastInfo.IsSpell(AID.HolyBladedance))) hints.Add("Mitigate NOW!"); @@ -22,7 +22,7 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint hints.Add("Swap target!"); } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (_adds.Count(a => !AddActive(a.actor)) == 2 && _adds[0].actor.Position.InCircle(_adds[1].actor.Position, 10)) // TODO: verify range hints.Add("Separate adds!"); @@ -32,13 +32,13 @@ public override void AddGlobalHints(BossModule module, GlobalHints hints) hints.Add($"Focus on {focus.actor.Name}!"); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (var a in _adds) arena.Actor(a.actor, ArenaColor.Enemy); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { var buff = ClassifyStatus(status.ID); if (buff != Buff.None) @@ -49,7 +49,7 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st } } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { var buff = ClassifyStatus(status.ID); if (buff != Buff.None) @@ -70,10 +70,7 @@ public override void OnStatusLose(BossModule module, Actor actor, ActorStatus st private bool AddActive(Actor add) => !add.IsDestroyed && add.IsTargetable; } -class HoliestOfHoly : Components.RaidwideCast -{ - public HoliestOfHoly() : base(ActionID.MakeSpell(AID.HoliestOfHoly)) { } -} +class HoliestOfHoly(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.HoliestOfHoly)); class SkywardLeap : Components.GenericBaitAway { @@ -81,13 +78,13 @@ class SkywardLeap : Components.GenericBaitAway public SkywardLeap() : base(ActionID.MakeSpell(AID.SkywardLeap), centerAtTarget: true) { } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.SkywardLeap) - CurrentBaits.Add(new(module.PrimaryActor, actor, _shape)); + CurrentBaits.Add(new(Module.PrimaryActor, actor, _shape)); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if (spell.Action == WatchedAction) { diff --git a/BossMod/Modules/Endwalker/Unreal/Un5Thordan/Intermission3.cs b/BossMod/Modules/Endwalker/Unreal/Un5Thordan/Intermission3.cs index ae428f56ac..37a0d25274 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un5Thordan/Intermission3.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un5Thordan/Intermission3.cs @@ -4,53 +4,38 @@ class HiemalStormSpread : Components.UniformStackSpread { public HiemalStormSpread() : base(0, 6, alwaysShowSpreads: true) { } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.HiemalStorm) - AddSpread(actor, module.WorldState.CurrentTime.AddSeconds(3)); + AddSpread(actor, WorldState.FutureTime(3)); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.HiemalStormAOE) Spreads.Clear(); } } -class HiemalStormVoidzone : Components.PersistentVoidzone -{ - public HiemalStormVoidzone() : base(6, m => m.Enemies(OID.HiemalStorm).Where(x => x.EventState != 7)) { } -} +class HiemalStormVoidzone(BossModule module) : Components.PersistentVoidzone(module, 6, m => m.Enemies(OID.HiemalStorm).Where(x => x.EventState != 7)); -class SpiralPierce : Components.BaitAwayTethers -{ - public SpiralPierce() : base(new AOEShapeRect(50, 6), (uint)TetherID.SpiralPierce, ActionID.MakeSpell(AID.SpiralPierce)) { } -} +class SpiralPierce(BossModule module) : Components.BaitAwayTethers(module, new AOEShapeRect(50, 6), (uint)TetherID.SpiralPierce, ActionID.MakeSpell(AID.SpiralPierce)); -class DimensionalCollapse : Components.LocationTargetedAOEs -{ - public DimensionalCollapse() : base(ActionID.MakeSpell(AID.DimensionalCollapseAOE), 9) { } -} +class DimensionalCollapse(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.DimensionalCollapseAOE), 9); class FaithUnmoving : Components.Knockback { public FaithUnmoving() : base(ActionID.MakeSpell(AID.FaithUnmoving), true) { } - public override IEnumerable Sources(BossModule module, int slot, Actor actor) + public override IEnumerable Sources(int slot, Actor actor) { - yield return new(module.Bounds.Center, 16); + yield return new(Module.Bounds.Center, 16); } } -class CometCircle : Components.Adds -{ - public CometCircle() : base((uint)OID.CometCircle) { } -} +class CometCircle(BossModule module) : Components.Adds(module, (uint)OID.CometCircle); -class MeteorCircle : Components.Adds -{ - public MeteorCircle() : base((uint)OID.MeteorCircle) { } -} +class MeteorCircle(BossModule module) : Components.Adds(module, (uint)OID.MeteorCircle); class HeavyImpact : Components.ConcentricAOEs { @@ -58,13 +43,13 @@ class HeavyImpact : Components.ConcentricAOEs public HeavyImpact() : base(_shapes) { } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.HeavyImpactAOE1) AddSequence(caster.Position, spell.NPCFinishAt, spell.Rotation); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { var order = (AID)spell.Action.ID switch { @@ -74,7 +59,7 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent AID.HeavyImpactAOE4 => 3, _ => -1 }; - if (!AdvanceSequence(order, caster.Position, module.WorldState.CurrentTime.AddSeconds(2), caster.Rotation)) - module.ReportError(this, $"Unexpected ring {order}"); + if (!AdvanceSequence(order, caster.Position, WorldState.FutureTime(2), caster.Rotation)) + ReportError($"Unexpected ring {order}"); } } diff --git a/BossMod/Modules/Endwalker/Unreal/Un5Thordan/LightningStorm.cs b/BossMod/Modules/Endwalker/Unreal/Un5Thordan/LightningStorm.cs index 9c9e36efff..5eb5695edb 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un5Thordan/LightningStorm.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un5Thordan/LightningStorm.cs @@ -5,13 +5,13 @@ class LightningStorm : Components.UniformStackSpread { public LightningStorm() : base(0, 5, alwaysShowSpreads: true) { } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.LightningStorm) - AddSpread(actor, module.WorldState.CurrentTime.AddSeconds(4)); + AddSpread(actor, WorldState.FutureTime(4)); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.LightningStormAOE) Spreads.Clear(); diff --git a/BossMod/Modules/Endwalker/Unreal/Un5Thordan/SpiralThrust.cs b/BossMod/Modules/Endwalker/Unreal/Un5Thordan/SpiralThrust.cs index 8219adf89b..9d2242b97f 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un5Thordan/SpiralThrust.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un5Thordan/SpiralThrust.cs @@ -12,9 +12,9 @@ public SpiralThrust(float predictionDelay) : base(ActionID.MakeSpell(AID.SpiralT _predictionDelay = predictionDelay; } - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => _aoes; + public override IEnumerable ActiveAOEs(int slot, Actor actor) => _aoes; - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) { @@ -27,15 +27,15 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { case AID.KnightAppear: - if ((OID)caster.OID is OID.Vellguine or OID.Paulecrain or OID.Ignasse && (caster.Position - module.Bounds.Center).LengthSq() > 25 * 25) + if ((OID)caster.OID is OID.Vellguine or OID.Paulecrain or OID.Ignasse && (caster.Position - Module.Bounds.Center).LengthSq() > 25 * 25) { // prediction - _aoes.Add(new(_shape, caster.Position, Angle.FromDirection(module.Bounds.Center - caster.Position), module.WorldState.CurrentTime.AddSeconds(_predictionDelay), risky: false)); + _aoes.Add(new(_shape, caster.Position, Angle.FromDirection(Module.Bounds.Center - caster.Position), WorldState.FutureTime(_predictionDelay), risky: false)); } break; case AID.SpiralThrust: @@ -45,5 +45,5 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } -class SpiralThrust1 : SpiralThrust { public SpiralThrust1() : base(10) { } } -class SpiralThrust2 : SpiralThrust { public SpiralThrust2() : base(12.1f) { } } +class SpiralThrust1(BossModule module) : SpiralThrust(module, 10); +class SpiralThrust2(BossModule module) : SpiralThrust(module, 12.1f); diff --git a/BossMod/Modules/Endwalker/Unreal/Un5Thordan/Un5Thordan.cs b/BossMod/Modules/Endwalker/Unreal/Un5Thordan/Un5Thordan.cs index bd8c22fdd6..711c73e83f 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un5Thordan/Un5Thordan.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un5Thordan/Un5Thordan.cs @@ -1,79 +1,34 @@ namespace BossMod.Endwalker.Unreal.Un5Thordan; -class AscalonsMight : Components.Cleave -{ - public AscalonsMight() : base(ActionID.MakeSpell(AID.AscalonsMight), new AOEShapeCone(8 + 3.8f, 45.Degrees())) { } -} +class AscalonsMight(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.AscalonsMight), new AOEShapeCone(8 + 3.8f, 45.Degrees())); -class Meteorain : Components.LocationTargetedAOEs -{ - public Meteorain() : base(ActionID.MakeSpell(AID.MeteorainAOE), 6) { } -} +class Meteorain(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.MeteorainAOE), 6); -class AscalonsMercy : Components.SelfTargetedAOEs -{ - public AscalonsMercy() : base(ActionID.MakeSpell(AID.AscalonsMercy), new AOEShapeCone(34.8f, 10.Degrees())) { } -} +class AscalonsMercy(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.AscalonsMercy), new AOEShapeCone(34.8f, 10.Degrees())); -class AscalonsMercyHelper : Components.SelfTargetedAOEs -{ - public AscalonsMercyHelper() : base(ActionID.MakeSpell(AID.AscalonsMercyAOE), new AOEShapeCone(34.5f, 10.Degrees())) { } -} +class AscalonsMercyHelper(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.AscalonsMercyAOE), new AOEShapeCone(34.5f, 10.Degrees())); -class DragonsRage : Components.StackWithCastTargets -{ - public DragonsRage() : base(ActionID.MakeSpell(AID.DragonsRage), 6, 6) { } -} +class DragonsRage(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.DragonsRage), 6, 6); -class Heavensflame : Components.LocationTargetedAOEs -{ - public Heavensflame() : base(ActionID.MakeSpell(AID.HeavensflameAOE), 6) { } -} +class Heavensflame(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.HeavensflameAOE), 6); -class Conviction : Components.CastTowers -{ - public Conviction() : base(ActionID.MakeSpell(AID.ConvictionAOE), 3) { } -} +class Conviction(BossModule module) : Components.CastTowers(module, ActionID.MakeSpell(AID.ConvictionAOE), 3); -class SerZephirin : Components.Adds -{ - public SerZephirin() : base((uint)OID.Zephirin) { } -} +class SerZephirin(BossModule module) : Components.Adds(module, (uint)OID.Zephirin); // TODO: show knockback 3 from [-0.8, -16.3] -class LightOfAscalon : Components.CastCounter -{ - public LightOfAscalon() : base(ActionID.MakeSpell(AID.LightOfAscalon)) { } -} +class LightOfAscalon(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.LightOfAscalon)); -class UltimateEnd : Components.CastCounter -{ - public UltimateEnd() : base(ActionID.MakeSpell(AID.UltimateEndAOE)) { } -} +class UltimateEnd(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.UltimateEndAOE)); -class HeavenswardLeap : Components.CastCounter -{ - public HeavenswardLeap() : base(ActionID.MakeSpell(AID.HeavenswardLeap)) { } -} +class HeavenswardLeap(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.HeavenswardLeap)); -class PureOfSoul : Components.CastCounter -{ - public PureOfSoul() : base(ActionID.MakeSpell(AID.PureOfSoul)) { } -} +class PureOfSoul(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.PureOfSoul)); -class AbsoluteConviction : Components.CastCounter -{ - public AbsoluteConviction() : base(ActionID.MakeSpell(AID.AbsoluteConviction)) { } -} +class AbsoluteConviction(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.AbsoluteConviction)); [ConfigDisplay(Order = 0x350, Parent = typeof(EndwalkerConfig))] -public class Un5ThordanConfig : CooldownPlanningConfigNode -{ - public Un5ThordanConfig() : base(90) { } -} +public class Un5ThordanConfig() : CooldownPlanningConfigNode(90); [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 963, NameID = 3632)] -public class Un5Thordan : BossModule -{ - public Un5Thordan(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(0, 0), 21)) { } -} +public class Un5Thordan(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(0, 0), 21)); diff --git a/BossMod/Modules/Global/GoldSaucer/TheSliceIsRight/TheSliceIsRight.cs b/BossMod/Modules/Global/GoldSaucer/TheSliceIsRight/TheSliceIsRight.cs index bfd58b0fa9..5f9788a76c 100644 --- a/BossMod/Modules/Global/GoldSaucer/TheSliceIsRight/TheSliceIsRight.cs +++ b/BossMod/Modules/Global/GoldSaucer/TheSliceIsRight/TheSliceIsRight.cs @@ -52,7 +52,7 @@ class BambooSplits : Components.GenericAOEs private DateTime _activation; private DateTime _time; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { foreach (var b in _doublesidedsplit) yield return new(rectdouble, b.Position, b.Rotation + 90.Degrees(), _activation.AddSeconds(7)); @@ -64,15 +64,15 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, yield return new(bamboospawn, b.Position); //activation time varies a lot (depending on the set?), just avoid entirely } - public override void OnActorCreated(BossModule module, Actor actor) + public override void OnActorCreated(Actor actor) { if ((OID)actor.OID is OID.HelperCircle or OID.HelperDoubleRect or OID.HelperSingleRect) _bamboospawn.Add(actor); } - public override void Update(BossModule module) + public override void Update() { - if (_time != default && module.WorldState.CurrentTime > _time) + if (_time != default && WorldState.CurrentTime > _time) { _time = default; _circle.RemoveAll(_circleToberemoved.Contains); @@ -94,7 +94,7 @@ public override void OnActorEAnim(BossModule module, Actor actor, uint state) _singlesplit.Add(actor); if ((OID)actor.OID == OID.HelperDoubleRect && !_doublesidedsplit.Contains(actor)) _doublesidedsplit.Add(actor); - _activation = module.WorldState.CurrentTime.AddSeconds(7); + _activation = WorldState.FutureTime(7); } if (state == 0x00040008) //bamboo deactivation animation, spell casts end about 0.75s later { @@ -104,31 +104,22 @@ public override void OnActorEAnim(BossModule module, Actor actor, uint state) _singlesplitToberemoved.Add(actor); if ((OID)actor.OID == OID.HelperDoubleRect) _doublesidedsplitToberemoved.Add(actor); - _time = module.WorldState.CurrentTime.AddSeconds(0.75f); + _time = WorldState.FutureTime(0.75f); } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if (_bamboospawn.Count > 0 && (AID)spell.Action.ID == AID.BambooSpawn) _bamboospawn.RemoveAt(0); } } -class DaigoroFirstGilJump : Components.ChargeAOEs -{ - public DaigoroFirstGilJump() : base(ActionID.MakeSpell(AID.FirstGilJump), 3.5f) { } -} +class DaigoroFirstGilJump(BossModule module) : Components.ChargeAOEs(module, ActionID.MakeSpell(AID.FirstGilJump), 3.5f); -class DaigoroNextGilJump : Components.ChargeAOEs -{ - public DaigoroNextGilJump() : base(ActionID.MakeSpell(AID.NextGilJump), 3.5f) { } -} +class DaigoroNextGilJump(BossModule module) : Components.ChargeAOEs(module, ActionID.MakeSpell(AID.NextGilJump), 3.5f); -class DaigoroBadCup : Components.SelfTargetedAOEs -{ - public DaigoroBadCup() : base(ActionID.MakeSpell(AID.BadCup), new AOEShapeCone(17.5f, 60.Degrees())) { } -} +class DaigoroBadCup(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.BadCup), new AOEShapeCone(17.5f, 60.Degrees())); class TheSliceIsRightStates : StateMachineBuilder { diff --git a/BossMod/Modules/Global/MaskedCarnivale/ObstacleLayouts.cs b/BossMod/Modules/Global/MaskedCarnivale/ObstacleLayouts.cs index a4fbb34bc7..27f3ad2d16 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/ObstacleLayouts.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/ObstacleLayouts.cs @@ -32,7 +32,7 @@ public static IEnumerable Wall2B() yield return new WPos(105.5f, 94.5f); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { arena.AddPolygon(Wall1A(), ArenaColor.Border); arena.AddPolygon(Wall1B(), ArenaColor.Border); @@ -40,7 +40,7 @@ public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc arena.AddPolygon(Wall2B(), ArenaColor.Border); } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { base.AddAIHints(module, slot, actor, assignment, hints); hints.AddForbiddenZone(ShapeDistance.ConvexPolygon(Wall1A(), false)); @@ -82,7 +82,7 @@ public static IEnumerable Quad4() yield return new WPos(110, 87); yield return new WPos(107, 90); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { arena.AddPolygon(Quad1(), ArenaColor.Border); arena.AddPolygon(Quad2(), ArenaColor.Border); @@ -90,7 +90,7 @@ public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc arena.AddPolygon(Quad4(), ArenaColor.Border); } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { base.AddAIHints(module, slot, actor, assignment, hints); hints.AddForbiddenZone(ShapeDistance.ConvexPolygon(Quad1(), false)); @@ -109,12 +109,12 @@ public static IEnumerable Quad() yield return new WPos(100, 93); yield return new WPos(93, 100); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { arena.AddPolygon(Quad(), ArenaColor.Border); } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { base.AddAIHints(module, slot, actor, assignment, hints); hints.AddForbiddenZone(ShapeDistance.ConvexPolygon(Quad(), false)); diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage01AllsWellThatStartsWell/Stage01.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage01AllsWellThatStartsWell/Stage01.cs index c52d94b4e2..095260f065 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage01AllsWellThatStartsWell/Stage01.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage01AllsWellThatStartsWell/Stage01.cs @@ -14,14 +14,11 @@ public enum AID : uint IronJustice = 14199, // 25BE->self, 2,5s cast, range 8+R 120-degree cone } -class IronJustice : Components.SelfTargetedAOEs -{ - public IronJustice() : base(ActionID.MakeSpell(AID.IronJustice), new AOEShapeCone(9.5f, 60.Degrees())) { } -} +class IronJustice(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.IronJustice), new AOEShapeCone(9.5f, 60.Degrees())); class Hints : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { hints.Add("This stage is trivial.\nUse whatever skills you have to defeat these opponents."); } diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage02MuchAdoAboutPudding/Stage02Act1.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage02MuchAdoAboutPudding/Stage02Act1.cs index 40fd9b7bcd..eb71191779 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage02MuchAdoAboutPudding/Stage02Act1.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage02MuchAdoAboutPudding/Stage02Act1.cs @@ -15,14 +15,11 @@ public enum AID : uint GoldenTongue = 14265, // 25C0/25C2/25C4->self, 5,0s cast, single-target } -class GoldenTongue : Components.CastHint -{ - public GoldenTongue() : base(ActionID.MakeSpell(AID.GoldenTongue), "Can be interrupted, increase its magic damage") { } -} +class GoldenTongue(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.GoldenTongue), "Can be interrupted, increase its magic damage"); class Hints : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { hints.Add("To beat this stage in a timely manner,\nyou should have at least one spell of each element.\n(Water, Fire, Ice, Lightning, Earth and Wind)"); } @@ -30,7 +27,7 @@ public override void AddGlobalHints(BossModule module, GlobalHints hints) class Hints2 : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { hints.Add("Pudding is weak to wind spells.\nMarshmallow is weak to ice spells.\nBavarois is weak to earth spells."); } diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage02MuchAdoAboutPudding/Stage02Act2.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage02MuchAdoAboutPudding/Stage02Act2.cs index ddb665ea3d..f26b00ccac 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage02MuchAdoAboutPudding/Stage02Act2.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage02MuchAdoAboutPudding/Stage02Act2.cs @@ -16,14 +16,11 @@ public enum AID : uint GoldenTongue = 14265, // 25C5/25C3/25C1->self, 5,0s cast, single-target } -class GoldenTongue : Components.CastHint -{ - public GoldenTongue() : base(ActionID.MakeSpell(AID.GoldenTongue), "Can be interrupted, increases its magic damage.") { } -} +class GoldenTongue(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.GoldenTongue), "Can be interrupted, increases its magic damage."); class Hints : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { hints.Add("Gelato is weak to fire spells.\nFlan is weak to lightning spells.\nLicorice is weak to water spells."); } diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage03WaitingForGolem/Stage03.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage03WaitingForGolem/Stage03.cs index 437bf4ed3e..846c4fc9dc 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage03WaitingForGolem/Stage03.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage03WaitingForGolem/Stage03.cs @@ -14,24 +14,15 @@ public enum AID : uint Obliterate = 14365, // 25D4->self, 6,0s cast, range 60 circle } -class BoulderClap : Components.SelfTargetedAOEs -{ - public BoulderClap() : base(ActionID.MakeSpell(AID.BoulderClap), new AOEShapeCone(14, 60.Degrees())) { } -} +class BoulderClap(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.BoulderClap), new AOEShapeCone(14, 60.Degrees())); -class Dreadstorm : Components.PersistentVoidzoneAtCastTarget -{ - public Dreadstorm() : base(6, ActionID.MakeSpell(AID.EarthenHeart), m => m.Enemies(OID.voidzone), 0) { } -} +class Dreadstorm(BossModule module) : Components.PersistentVoidzoneAtCastTarget(module, 6, ActionID.MakeSpell(AID.EarthenHeart), m => m.Enemies(OID.voidzone), 0); -class Obliterate : Components.RaidwideCast -{ - public Obliterate() : base(ActionID.MakeSpell(AID.Obliterate), "Interruptible raidwide") { } -} +class Obliterate(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.Obliterate), "Interruptible raidwide"); class Hints : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { hints.Add("Zipacna is weak against water based spells.\nFlying Sardine is recommended to interrupt raidwide."); } @@ -39,7 +30,7 @@ public override void AddGlobalHints(BossModule module, GlobalHints hints) class Hints2 : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { hints.Add("Zipacna is weak against water based spells.\nEarth based spells are useless against Zipacna."); } diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage04GentlemanPreferSwords/Stage04Act1.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage04GentlemanPreferSwords/Stage04Act1.cs index b0a83b3e22..6e20c907ee 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage04GentlemanPreferSwords/Stage04Act1.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage04GentlemanPreferSwords/Stage04Act1.cs @@ -16,7 +16,7 @@ public enum AID : uint class Hints : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { hints.Add("Trivial act. Enemies here are weak to lightning and fire.\nIn Act 2 the Ram's Voice and Ultravibration combo can be useful.\nFlying Sardine for interrupts can be beneficial."); } @@ -24,7 +24,7 @@ public override void AddGlobalHints(BossModule module, GlobalHints hints) class Hints2 : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { hints.Add("Bats are weak to lightning.\nThe wolf is weak to fire."); } diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage04GentlemanPreferSwords/Stage04Act2.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage04GentlemanPreferSwords/Stage04Act2.cs index bcee67bca9..976fc31518 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage04GentlemanPreferSwords/Stage04Act2.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage04GentlemanPreferSwords/Stage04Act2.cs @@ -16,24 +16,15 @@ public enum AID : uint MagitekRay = 14368, // 25D5->location, 3,0s cast, range 6 circle } -class GrandStrike : Components.SelfTargetedAOEs -{ - public GrandStrike() : base(ActionID.MakeSpell(AID.GrandStrike), new AOEShapeRect(77.5f, 2)) { } -} +class GrandStrike(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.GrandStrike), new AOEShapeRect(77.5f, 2)); -class MagitekRay : Components.LocationTargetedAOEs -{ - public MagitekRay() : base(ActionID.MakeSpell(AID.MagitekRay), 6) { } -} +class MagitekRay(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.MagitekRay), 6); -class MagitekField : Components.CastHint -{ - public MagitekField() : base(ActionID.MakeSpell(AID.MagitekField), "Interruptible, increases its defenses") { } -} +class MagitekField(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.MagitekField), "Interruptible, increases its defenses"); class Hints : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { hints.Add("Kreios is weak to lightning spells.\nDuring the fight he will spawn 6 beetles.\nIf available use the Ram's Voice + Ultravibration combo for the instant kill."); } @@ -41,7 +32,7 @@ public override void AddGlobalHints(BossModule module, GlobalHints hints) class Hints2 : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { hints.Add("Kreios is weak against lightning spells and can be frozen."); } diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage05TheThreepennyTurtles/Stage05.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage05TheThreepennyTurtles/Stage05.cs index 77ee2dd6a8..9c44903d8d 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage05TheThreepennyTurtles/Stage05.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage05TheThreepennyTurtles/Stage05.cs @@ -7,7 +7,7 @@ public enum OID : uint class Hints : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { hints.Add("These turtles have very high defenses.\nBring 1000 Needles or Doom to defeat them.\nAlternatively you can remove their buff with Eerie Soundwave."); } diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage06EyeSociety/Stage06Act1.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage06EyeSociety/Stage06Act1.cs index d09e7f3a54..00dd5aa8c8 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage06EyeSociety/Stage06Act1.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage06EyeSociety/Stage06Act1.cs @@ -25,19 +25,19 @@ class DemonEye : Components.CastGaze public DemonEye() : base(ActionID.MakeSpell(AID.DemonEye)) { } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Blind) - _blinded.Set(module.Raid.FindSlot(actor.InstanceID)); + _blinded.Set(Raid.FindSlot(actor.InstanceID)); } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Blind) - _blinded.Clear(module.Raid.FindSlot(actor.InstanceID)); + _blinded.Clear(Raid.FindSlot(actor.InstanceID)); } - public override IEnumerable ActiveEyes(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveEyes(int slot, Actor actor) { return _blinded[slot] ? Enumerable.Empty() : base.ActiveEyes(module, slot, actor); } @@ -49,19 +49,19 @@ class ColdStare : Components.SelfTargetedAOEs //TODO: cone based gaze public ColdStare() : base(ActionID.MakeSpell(AID.ColdStare), new AOEShapeCone(42.53f, 45.Degrees())) { } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Blind) - _blinded.Set(module.Raid.FindSlot(actor.InstanceID)); + _blinded.Set(Raid.FindSlot(actor.InstanceID)); } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Blind) - _blinded.Clear(module.Raid.FindSlot(actor.InstanceID)); + _blinded.Clear(Raid.FindSlot(actor.InstanceID)); } - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { return _blinded[slot] ? Enumerable.Empty() : base.ActiveAOEs(module, slot, actor); } @@ -73,19 +73,19 @@ class TearyTwirl : Components.StackWithCastTargets public TearyTwirl() : base(ActionID.MakeSpell(AID.TearyTwirl), 6.3f) { } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Blind) - _blinded.Set(module.Raid.FindSlot(actor.InstanceID)); + _blinded.Set(Raid.FindSlot(actor.InstanceID)); } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Blind) - _blinded.Clear(module.Raid.FindSlot(actor.InstanceID)); + _blinded.Clear(Raid.FindSlot(actor.InstanceID)); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_blinded[slot]) hints.Add("Kill mandragoras last incase you need to get blinded again.", false); @@ -96,7 +96,7 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint class Hints : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { hints.Add("Get blinded by the Teary Twirl AOE from the mandragoras.\nBlindness makes you immune to all the gaze attacks.\nThe eyes in act 2 are weak to lightning damage."); } diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage06EyeSociety/Stage06Act2.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage06EyeSociety/Stage06Act2.cs index 030b49f0ff..56a09fca92 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage06EyeSociety/Stage06Act2.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage06EyeSociety/Stage06Act2.cs @@ -28,19 +28,19 @@ class DemonEye : Components.CastGaze public DemonEye() : base(ActionID.MakeSpell(AID.DemonEye)) { } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Blind) - _blinded.Set(module.Raid.FindSlot(actor.InstanceID)); + _blinded.Set(Raid.FindSlot(actor.InstanceID)); } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Blind) - _blinded.Clear(module.Raid.FindSlot(actor.InstanceID)); + _blinded.Clear(Raid.FindSlot(actor.InstanceID)); } - public override IEnumerable ActiveEyes(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveEyes(int slot, Actor actor) { return _blinded[slot] ? Enumerable.Empty() : base.ActiveEyes(module, slot, actor); } @@ -52,19 +52,19 @@ class ColdStare : Components.SelfTargetedAOEs //TODO: cone based gaze public ColdStare() : base(ActionID.MakeSpell(AID.ColdStare), new AOEShapeCone(42.53f, 45.Degrees())) { } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Blind) - _blinded.Set(module.Raid.FindSlot(actor.InstanceID)); + _blinded.Set(Raid.FindSlot(actor.InstanceID)); } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Blind) - _blinded.Clear(module.Raid.FindSlot(actor.InstanceID)); + _blinded.Clear(Raid.FindSlot(actor.InstanceID)); } - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { return _blinded[slot] ? Enumerable.Empty() : base.ActiveAOEs(module, slot, actor); } @@ -76,19 +76,19 @@ class TearyTwirl : Components.StackWithCastTargets public TearyTwirl() : base(ActionID.MakeSpell(AID.TearyTwirl), 6.3f) { } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Blind) - _blinded.Set(module.Raid.FindSlot(actor.InstanceID)); + _blinded.Set(Raid.FindSlot(actor.InstanceID)); } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Blind) - _blinded.Clear(module.Raid.FindSlot(actor.InstanceID)); + _blinded.Clear(Raid.FindSlot(actor.InstanceID)); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_blinded[slot]) hints.Add("Kill mandragoras last incase you need to get blinded again.", false); @@ -103,19 +103,19 @@ class DreadGaze : Components.SelfTargetedAOEs //TODO: cone based gaze public DreadGaze() : base(ActionID.MakeSpell(AID.DreadGaze), new AOEShapeCone(7.35f, 45.Degrees())) { } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Blind) - _blinded.Set(module.Raid.FindSlot(actor.InstanceID)); + _blinded.Set(Raid.FindSlot(actor.InstanceID)); } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Blind) - _blinded.Clear(module.Raid.FindSlot(actor.InstanceID)); + _blinded.Clear(Raid.FindSlot(actor.InstanceID)); } - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { return _blinded[slot] ? Enumerable.Empty() : base.ActiveAOEs(module, slot, actor); } @@ -123,7 +123,7 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, class Hints : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { hints.Add("The eyes are weak to lightning spells."); } diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage07AChorusSlime/Stage07Act1.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage07AChorusSlime/Stage07Act1.cs index 4654cafa8d..573cddd03d 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage07AChorusSlime/Stage07Act1.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage07AChorusSlime/Stage07Act1.cs @@ -14,26 +14,26 @@ public enum AID : uint class SlimeExplosion : Components.GenericStackSpread { - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - if (!module.PrimaryActor.IsDead) + if (!Module.PrimaryActor.IsDead) { if (arena.Config.ShowOutlinesAndShadows) - arena.AddCircle(module.PrimaryActor.Position, 7.6f, 0xFF000000, 2); - arena.AddCircle(module.PrimaryActor.Position, 7.6f, ArenaColor.Danger); + arena.AddCircle(Module.PrimaryActor.Position, 7.6f, 0xFF000000, 2); + arena.AddCircle(Module.PrimaryActor.Position, 7.6f, ArenaColor.Danger); } } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { - if (!module.PrimaryActor.IsDead) - if (module.PrimaryActor.Position.InCircle(module.PrimaryActor.Position, 7.6f)) + if (!Module.PrimaryActor.IsDead) + if (Module.PrimaryActor.Position.InCircle(Module.PrimaryActor.Position, 7.6f)) hints.Add("In slime explosion radius!"); } } class Hints : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { hints.Add("For this stage the spells Sticky Tongue and Snort are recommended.\nUse them to pull or push Slimes close toIce Sprites.\nThen hit the slime from a distance with anything but fire spells to set of an explosion."); } @@ -41,7 +41,7 @@ public override void AddGlobalHints(BossModule module, GlobalHints hints) class Hints2 : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { hints.Add("Hit the Lava Slime from a safe distance to win this act."); } diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage07AChorusSlime/Stage07Act2.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage07AChorusSlime/Stage07Act2.cs index 24a44bfc4f..f223da6273 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage07AChorusSlime/Stage07Act2.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage07AChorusSlime/Stage07Act2.cs @@ -14,7 +14,7 @@ public enum AID : uint class SlimeExplosion : Components.GenericStackSpread { - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (var p in module.Enemies(OID.Boss).Where(x => !x.IsDead)) { @@ -24,7 +24,7 @@ public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc } } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { foreach (var p in module.Enemies(OID.Boss).Where(x => !x.IsDead)) if (actor.Position.InCircle(p.Position, 7.5f)) @@ -34,7 +34,7 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint class Hints : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { hints.Add("Pull or push the Lava Slimes to the Ice Sprites and then hit the slimes\nfrom a distance to set of the explosions."); } diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage07AChorusSlime/Stage07Act3.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage07AChorusSlime/Stage07Act3.cs index f5d2988697..8362d12cc2 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage07AChorusSlime/Stage07Act3.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage07AChorusSlime/Stage07Act3.cs @@ -13,14 +13,11 @@ public enum AID : uint Object130 = 14711, // 2706->self, no cast, range 30+R circle - instant kill if you do not line of sight the towers when they die } -class LowVoltage : Components.GenericLineOfSightAOE -{ - public LowVoltage() : base(ActionID.MakeSpell(AID.LowVoltage), 35, true) { } //TODO: find a way to use the obstacles on the map and draw proper AOEs, this does nothing right now -} +class LowVoltage(BossModule module) : Components.GenericLineOfSightAOE(module, ActionID.MakeSpell(AID.LowVoltage), 35, true); //TODO: find a way to use the obstacles on the map and draw proper AOEs, this does nothing right now class SlimeExplosion : Components.GenericStackSpread { - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (var p in module.Enemies(OID.Slime).Where(x => !x.IsDead)) { @@ -30,7 +27,7 @@ public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc } } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { foreach (var p in module.Enemies(OID.Slime).Where(x => !x.IsDead)) if (actor.Position.InCircle(p.Position, 7.5f)) @@ -40,7 +37,7 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint class Hints : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { hints.Add("Pull or push the Lava Slimes to the towers and then hit the slimes\nfrom a distance to set off the explosions. The towers create a damage\npulse every 12s and a deadly explosion when they die. Take cover."); } diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage08BombedyOfErrors/Stage08Act1.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage08BombedyOfErrors/Stage08Act1.cs index 7baeee9f24..3e56fea738 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage08BombedyOfErrors/Stage08Act1.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage08BombedyOfErrors/Stage08Act1.cs @@ -17,13 +17,13 @@ public enum AID : uint class Selfdetonations : BossComponent { private static readonly string hint = "In bomb explosion radius!"; - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - if (!module.PrimaryActor.IsDead) + if (!Module.PrimaryActor.IsDead) { if (arena.Config.ShowOutlinesAndShadows) - arena.AddCircle(module.PrimaryActor.Position, 10, 0xFF000000, 2); - arena.AddCircle(module.PrimaryActor.Position, 10, ArenaColor.Danger); + arena.AddCircle(Module.PrimaryActor.Position, 10, 0xFF000000, 2); + arena.AddCircle(Module.PrimaryActor.Position, 10, ArenaColor.Danger); } foreach (var p in module.Enemies(OID.Bomb).Where(x => !x.IsDead)) { @@ -39,9 +39,9 @@ public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc } } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { - if (!module.PrimaryActor.IsDead && actor.Position.InCircle(module.PrimaryActor.Position, 10)) + if (!Module.PrimaryActor.IsDead && actor.Position.InCircle(Module.PrimaryActor.Position, 10)) hints.Add(hint); foreach (var p in module.Enemies(OID.Bomb).Where(x => !x.IsDead)) if (actor.Position.InCircle(p.Position, 6)) @@ -54,7 +54,7 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint class Hints : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { hints.Add("For this stage the spell Flying Sardine to interrupt the Progenitrix in Act 2\nis highly recommended. Hit the Cherry Bomb from a safe distance\nwith anything but fire damage to set of a chain reaction to win this act."); } @@ -62,7 +62,7 @@ public override void AddGlobalHints(BossModule module, GlobalHints hints) class Hints2 : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { hints.Add("Hit the Cherry Bomb from a safe distance to win this act."); } diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage08BombedyOfErrors/Stage08Act2.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage08BombedyOfErrors/Stage08Act2.cs index 5a4daa4b3c..a442b6c8dd 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage08BombedyOfErrors/Stage08Act2.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage08BombedyOfErrors/Stage08Act2.cs @@ -16,20 +16,14 @@ public enum AID : uint Burst = 14680, // 270B->self, 6,0s cast, range 50 circle } -class Sap : Components.LocationTargetedAOEs -{ - public Sap() : base(ActionID.MakeSpell(AID.Sap), 8) { } -} +class Sap(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Sap), 8); -class Burst : Components.CastHint -{ - public Burst() : base(ActionID.MakeSpell(AID.Burst), "Interrupt or wipe!") { } -} +class Burst(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.Burst), "Interrupt or wipe!"); class Selfdetonations : BossComponent { private static readonly string hint = "In bomb explosion radius!"; - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (var p in module.Enemies(OID.Bomb).Where(x => !x.IsDead)) { @@ -45,7 +39,7 @@ public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc } } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { foreach (var p in module.Enemies(OID.Bomb).Where(x => !x.IsDead)) if (actor.Position.InCircle(p.Position, 10)) @@ -58,7 +52,7 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint class Hints : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { hints.Add("Clever activation of cherry bombs will freeze the Progenitrix.\nInterrupt its burst skill or wipe. The Progenitrix is weak to wind spells."); } diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage09ToKillAMockingslime/Stage09.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage09ToKillAMockingslime/Stage09.cs index e625dcebad..79b888d0d2 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage09ToKillAMockingslime/Stage09.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage09ToKillAMockingslime/Stage09.cs @@ -25,24 +25,15 @@ public enum AID : uint Water = 14271, // 2716->player, 1,0s cast, single-target } -class GoldenTongue : Components.CastHint -{ - public GoldenTongue() : base(ActionID.MakeSpell(AID.GoldenTongue), "Can be interrupted, increase its magic damage") { } -} +class GoldenTongue(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.GoldenTongue), "Can be interrupted, increase its magic damage"); -class DarkVoidzone : Components.PersistentVoidzoneAtCastTarget -{ - public DarkVoidzone() : base(4, ActionID.MakeSpell(AID.Dark), m => m.Enemies(OID.DarkVoidzone), 0) { } -} +class DarkVoidzone(BossModule module) : Components.PersistentVoidzoneAtCastTarget(module, 4, ActionID.MakeSpell(AID.Dark), m => m.Enemies(OID.DarkVoidzone), 0); -class Dark : Components.LocationTargetedAOEs -{ - public Dark() : base(ActionID.MakeSpell(AID.Dark), 5) { } -} +class Dark(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Dark), 5); class Hints : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { hints.Add("Guimauve summons a total of 6 adds during the fight, one of each element.\nHealer mimikry can be helpful if you have trouble surviving."); } diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage10ALittleKnightMusic/Stage10.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage10ALittleKnightMusic/Stage10.cs index 0c3210ede4..d9b5a85d6f 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage10ALittleKnightMusic/Stage10.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage10ALittleKnightMusic/Stage10.cs @@ -20,35 +20,17 @@ public enum AID : uint BlackNebula = 14724, // Boss->self, 6,0s cast, range 50+R circle, interruptible enrage after 3 King's Will casts } -class IronJustice1 : Components.SelfTargetedAOEs -{ - public IronJustice1() : base(ActionID.MakeSpell(AID.IronJustice1), new AOEShapeCone(9, 60.Degrees())) { } -} +class IronJustice1(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.IronJustice1), new AOEShapeCone(9, 60.Degrees())); -class IronJustice2 : Components.SelfTargetedAOEs -{ - public IronJustice2() : base(ActionID.MakeSpell(AID.IronJustice2), new AOEShapeCone(9.5f, 60.Degrees())) { } -} +class IronJustice2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.IronJustice2), new AOEShapeCone(9.5f, 60.Degrees())); -class IronJustice3 : Components.SelfTargetedAOEs -{ - public IronJustice3() : base(ActionID.MakeSpell(AID.IronJustice3), new AOEShapeCone(10, 60.Degrees())) { } -} +class IronJustice3(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.IronJustice3), new AOEShapeCone(10, 60.Degrees())); -class IronJustice4 : Components.SelfTargetedAOEs -{ - public IronJustice4() : base(ActionID.MakeSpell(AID.IronJustice4), new AOEShapeCone(10.5f, 60.Degrees())) { } -} +class IronJustice4(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.IronJustice4), new AOEShapeCone(10.5f, 60.Degrees())); -class BlackNebula : Components.CastHint -{ - public BlackNebula() : base(ActionID.MakeSpell(AID.BlackNebula), "Interrupt or wipe!") { } -} +class BlackNebula(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.BlackNebula), "Interrupt or wipe!"); -class Cloudcover1 : Components.LocationTargetedAOEs -{ - public Cloudcover1() : base(ActionID.MakeSpell(AID.Cloudcover1), 6) { } -} +class Cloudcover1(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Cloudcover1), 6); class KingsWill1 : Components.CastHint { @@ -56,23 +38,17 @@ class KingsWill1 : Components.CastHint public KingsWill1() : base(ActionID.MakeSpell(AID.KingsWill), hints) { } } -class KingsWill2 : Components.CastHint -{ - public KingsWill2() : base(ActionID.MakeSpell(AID.KingsWill2), KingsWill1.hints) { } -} +class KingsWill2(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.KingsWill2), KingsWill1.hints); -class KingsWill3 : Components.CastHint -{ - public KingsWill3() : base(ActionID.MakeSpell(AID.KingsWill3), KingsWill1.hints) { } -} +class KingsWill3(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.KingsWill3), KingsWill1.hints); class Hints : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { hints.Add("Crom Dubh will cast King's Will during the fight. Interrupt it with\nFlying Sardine or he will become stronger each time. After 3 casts he\nstarts using the interruptible enrage Black Nebula."); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { hints.Add("Requirement for achievement: Let Crom Dubh cast King's Will 3 times.", false); } diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage11SomeLikeItExcruciatinglyHot/Stage11Act1.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage11SomeLikeItExcruciatinglyHot/Stage11Act1.cs index 5d3330322e..8078b2d535 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage11SomeLikeItExcruciatinglyHot/Stage11Act1.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage11SomeLikeItExcruciatinglyHot/Stage11Act1.cs @@ -12,7 +12,7 @@ public enum AID : uint class Hints : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { hints.Add("These bombs start self-destruction on combat start. Pull them together\nwith Sticky Tongue and attack them with anything to interrupt them.\nThey are weak against wind and strong against fire."); } diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage11SomeLikeItExcruciatinglyHot/Stage11Act2.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage11SomeLikeItExcruciatinglyHot/Stage11Act2.cs index 9db60820ba..c25eba7436 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage11SomeLikeItExcruciatinglyHot/Stage11Act2.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage11SomeLikeItExcruciatinglyHot/Stage11Act2.cs @@ -12,7 +12,7 @@ public enum AID : uint class Hints : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { hints.Add("Same as last act, but this time there are 4 bombs. Pull them to the\nmiddle with Sticky Tongue and attack them with any AOE to keep them\ninterrupted. They are weak against wind and strong against fire."); } diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage12ThePlantomOfTheOpera/Stage12Act1.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage12ThePlantomOfTheOpera/Stage12Act1.cs index 6a75b7bb2d..7f5bc9518b 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage12ThePlantomOfTheOpera/Stage12Act1.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage12ThePlantomOfTheOpera/Stage12Act1.cs @@ -12,7 +12,7 @@ public enum AID : uint class Hints : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { hints.Add("For this stage Ice Spikes and Bomb Toss are recommended spells.\nUse Ice Spikes to instantly kill roselets once they become aggressive.\nHydnora in act 2 is weak against water and strong against earth spells."); } diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage12ThePlantomOfTheOpera/Stage12Act2.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage12ThePlantomOfTheOpera/Stage12Act2.cs index c06688a5a1..7cb3fda4e5 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage12ThePlantomOfTheOpera/Stage12Act2.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage12ThePlantomOfTheOpera/Stage12Act2.cs @@ -15,29 +15,17 @@ public enum AID : uint InflammableFumes = 14753, // 271B->self, 15,0s cast, range 50 circle } -class WildHorn : Components.SelfTargetedAOEs -{ - public WildHorn() : base(ActionID.MakeSpell(AID.WildHorn), new AOEShapeCone(16.96f, 60.Degrees())) { } -} +class WildHorn(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.WildHorn), new AOEShapeCone(16.96f, 60.Degrees())); -class Trounce : Components.SelfTargetedAOEs -{ - public Trounce() : base(ActionID.MakeSpell(AID.Trounce), new AOEShapeCone(46.96f, 30.Degrees())) { } -} +class Trounce(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Trounce), new AOEShapeCone(46.96f, 30.Degrees())); -class SporeSac : Components.CastHint -{ - public SporeSac() : base(ActionID.MakeSpell(AID.SporeSac), "Calls Roselets. Prepare Ice Spikes if available.") { } -} +class SporeSac(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.SporeSac), "Calls Roselets. Prepare Ice Spikes if available."); -class InflammableFumes : Components.CastHint -{ - public InflammableFumes() : base(ActionID.MakeSpell(AID.InflammableFumes), "Stun Boss with Bomb Toss. High damage but suriveable.") { } -} +class InflammableFumes(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.InflammableFumes), "Stun Boss with Bomb Toss. High damage but suriveable."); class Hints : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { hints.Add("Use Bomb Toss to stun Hydnora when he casts Inflammable Fumes.\nUse Ice Spikes to instantly kill roselets once they become aggressive.\nHydnora is weak against water and strong against earth spells."); } diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage13BeautyAndABeast/Stage13Act1.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage13BeautyAndABeast/Stage13Act1.cs index a0893d5c3c..68a6557746 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage13BeautyAndABeast/Stage13Act1.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage13BeautyAndABeast/Stage13Act1.cs @@ -12,14 +12,11 @@ public enum AID : uint Mow = 14879, // Boss->self, 3,0s cast, range 6+R 120-degree cone } -class Mow : Components.SelfTargetedAOEs -{ - public Mow() : base(ActionID.MakeSpell(AID.Mow), new AOEShapeCone(7.4f, 60.Degrees())) { } -} +class Mow(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Mow), new AOEShapeCone(7.4f, 60.Degrees())); class Hints : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { hints.Add("The first act is trivial, almost anything will work.\nFor act 2 having Flying Sardine is recommended."); } diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage13BeautyAndABeast/Stage13Act2.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage13BeautyAndABeast/Stage13Act2.cs index c1b4f147d8..6af1ee5839 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage13BeautyAndABeast/Stage13Act2.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage13BeautyAndABeast/Stage13Act2.cs @@ -25,54 +25,27 @@ public enum AID : uint BloodRain = 14882, // 26F8->location, 3,0s cast, range 50 circle } -class VoidFireII : Components.LocationTargetedAOEs -{ - public VoidFireII() : base(ActionID.MakeSpell(AID.VoidFireII), 5) { } -} +class VoidFireII(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.VoidFireII), 5); -class VoidFireIV : Components.LocationTargetedAOEs -{ - public VoidFireIV() : base(ActionID.MakeSpell(AID.VoidFireIV), 10) { } -} +class VoidFireIV(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.VoidFireIV), 10); -class VoidFireIV3 : Components.LocationTargetedAOEs -{ - public VoidFireIV3() : base(ActionID.MakeSpell(AID.VoidFireIV3), 6) { } -} +class VoidFireIV3(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.VoidFireIV3), 6); -class VoidAero : Components.SelfTargetedAOEs -{ - public VoidAero() : base(ActionID.MakeSpell(AID.VoidAero), new AOEShapeRect(42, 4)) { } -} +class VoidAero(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.VoidAero), new AOEShapeRect(42, 4)); -class DarkSabbath : Components.CastGaze -{ - public DarkSabbath() : base(ActionID.MakeSpell(AID.DarkSabbath)) { } -} +class DarkSabbath(BossModule module) : Components.CastGaze(module, ActionID.MakeSpell(AID.DarkSabbath)); -class DarkMist : Components.SelfTargetedAOEs -{ - public DarkMist() : base(ActionID.MakeSpell(AID.DarkMist), new AOEShapeCircle(10)) { } -} +class DarkMist(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.DarkMist), new AOEShapeCircle(10)); -class CircleOfBlood : Components.SelfTargetedAOEs -{ - public CircleOfBlood() : base(ActionID.MakeSpell(AID.CircleOfBlood2), new AOEShapeDonut(10, 20)) { } -} +class CircleOfBlood(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.CircleOfBlood2), new AOEShapeDonut(10, 20)); -class BeguilingMist : Components.CastHint -{ - public BeguilingMist() : base(ActionID.MakeSpell(AID.BeguilingMist), "Interrupt or run around uncontrollably!") { } -} +class BeguilingMist(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.BeguilingMist), "Interrupt or run around uncontrollably!"); -class BloodRain : Components.RaidwideCast -{ - public BloodRain() : base(ActionID.MakeSpell(AID.BloodRain), "Harmless raidwide unless you failed to kill succubus in time") { } -} +class BloodRain(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.BloodRain), "Harmless raidwide unless you failed to kill succubus in time"); class Hints : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { hints.Add("Camilla will cast various AOEs and summons adds.\nInterrupt the adds with Flying Sardine and kill them fast.\nIf the add is still alive during the next Black Sabbath, you will be wiped."); } diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage14BlobsInTheWoods/Stage14Act1.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage14BlobsInTheWoods/Stage14Act1.cs index 5704433b02..9d4af8443d 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage14BlobsInTheWoods/Stage14Act1.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage14BlobsInTheWoods/Stage14Act1.cs @@ -10,28 +10,25 @@ public enum AID : uint TheLastSong = 14756, // 271D->self, 6,0s cast, range 60 circle } -class LastSong : Components.GenericLineOfSightAOE -{ - public LastSong() : base(ActionID.MakeSpell(AID.TheLastSong), 60, true) { } //TODO: find a way to use the obstacles on the map and draw proper AOEs, this does nothing right now -} +class LastSong(BossModule module) : Components.GenericLineOfSightAOE(module, ActionID.MakeSpell(AID.TheLastSong), 60, true); //TODO: find a way to use the obstacles on the map and draw proper AOEs, this does nothing right now class LastSongHint : BossComponent { public bool casting; - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.TheLastSong) casting = true; } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.TheLastSong) casting = false; } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (casting) hints.Add("Take cover behind a barricade!"); @@ -40,7 +37,7 @@ public override void AddGlobalHints(BossModule module, GlobalHints hints) class Hints : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { hints.Add("These slimes start casting Final Song after death.\nWhile Final Song is not deadly, it does heavy damage and applies silence\nto you. Take cover! For act 2 the spell Loom is strongly recommended.\nThe slimes are strong against blunt melee damage such as J Kick."); } diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage14BlobsInTheWoods/Stage14Act2.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage14BlobsInTheWoods/Stage14Act2.cs index 10c61842f2..73822ccbaf 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage14BlobsInTheWoods/Stage14Act2.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage14BlobsInTheWoods/Stage14Act2.cs @@ -11,27 +11,24 @@ public enum AID : uint TheLastSong = 14756, // 271E->self, 6,0s cast, range 60 circle, heavy dmg, applies silence to player } -class LastSong : Components.GenericLineOfSightAOE -{ - public LastSong() : base(ActionID.MakeSpell(AID.TheLastSong), 60, true) { } //TODO: find a way to use the obstacles on the map and draw proper AOEs, this does nothing right now -} +class LastSong(BossModule module) : Components.GenericLineOfSightAOE(module, ActionID.MakeSpell(AID.TheLastSong), 60, true); //TODO: find a way to use the obstacles on the map and draw proper AOEs, this does nothing right now class LastSongHint : BossComponent { public bool casting; - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.TheLastSong) casting = true; } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.TheLastSong) casting = false; } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (casting) hints.Add("Use the cube to take cover!"); @@ -40,7 +37,7 @@ public override void AddGlobalHints(BossModule module, GlobalHints hints) class Hints : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { hints.Add("Same as first act, but the slimes will apply heavy to you.\nUse Loom to get out of line of sight as soon as Final Song gets casted."); } diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage15TheMeNobodyNodes/Stage15.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage15TheMeNobodyNodes/Stage15.cs index 2ce4a238e0..3b37627348 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage15TheMeNobodyNodes/Stage15.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage15TheMeNobodyNodes/Stage15.cs @@ -26,10 +26,7 @@ public enum AID : uint Disseminate = 14899, // 26FB->self, 2,0s cast, range 6+R circle, casts on death of serpents } -class HighVoltage : Components.CastHint -{ - public HighVoltage() : base(ActionID.MakeSpell(AID.HighVoltage), "Interrupt!") { } -} +class HighVoltage(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.HighVoltage), "Interrupt!"); class Ballast : Components.GenericAOEs { @@ -45,38 +42,38 @@ class Ballast : Components.GenericAOEs private static readonly AOEShapeDonutSector cone2 = new(5.5f, 10.5f, 135.Degrees()); private static readonly AOEShapeDonutSector cone3 = new(10.5f, 15.5f, 135.Degrees()); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (casting2) { - yield return new(cone1, module.PrimaryActor.Position, _rotation, _activation1, ArenaColor.Danger); - yield return new(cone2, module.PrimaryActor.Position, _rotation, _activation2); - yield return new(cone3, module.PrimaryActor.Position, _rotation, _activation3); + yield return new(cone1, Module.PrimaryActor.Position, _rotation, _activation1, ArenaColor.Danger); + yield return new(cone2, Module.PrimaryActor.Position, _rotation, _activation2); + yield return new(cone3, Module.PrimaryActor.Position, _rotation, _activation3); } if (casting3 && !casting2) { - yield return new(cone2, module.PrimaryActor.Position, _rotation, _activation2, ArenaColor.Danger); - yield return new(cone3, module.PrimaryActor.Position, _rotation, _activation3); + yield return new(cone2, Module.PrimaryActor.Position, _rotation, _activation2, ArenaColor.Danger); + yield return new(cone3, Module.PrimaryActor.Position, _rotation, _activation3); } if (casting4 && !casting3) - yield return new(cone3, module.PrimaryActor.Position, _rotation, _activation3, ArenaColor.Danger); + yield return new(cone3, Module.PrimaryActor.Position, _rotation, _activation3, ArenaColor.Danger); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.Ballast0) { casting2 = true; casting3 = true; casting4 = true; - _rotation = module.PrimaryActor.Rotation; - _activation1 = module.WorldState.CurrentTime.AddSeconds(4.6f); - _activation2 = module.WorldState.CurrentTime.AddSeconds(5.2f); - _activation3 = module.WorldState.CurrentTime.AddSeconds(5.8f); + _rotation = Module.PrimaryActor.Rotation; + _activation1 = WorldState.FutureTime(4.6f); + _activation2 = WorldState.FutureTime(5.2f); + _activation3 = WorldState.FutureTime(5.8f); } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.Ballast2) casting2 = false; @@ -87,30 +84,15 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } -class PiercingLaser : Components.SelfTargetedAOEs -{ - public PiercingLaser() : base(ActionID.MakeSpell(AID.PiercingLaser), new AOEShapeRect(32.3f, 4)) { } -} +class PiercingLaser(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PiercingLaser), new AOEShapeRect(32.3f, 4)); -class RepellingCannons : Components.SelfTargetedAOEs -{ - public RepellingCannons() : base(ActionID.MakeSpell(AID.RepellingCannons), new AOEShapeCircle(12.3f)) { } -} +class RepellingCannons(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RepellingCannons), new AOEShapeCircle(12.3f)); -class Superstorm : Components.SelfTargetedAOEs -{ - public Superstorm() : base(ActionID.MakeSpell(AID.Superstorm2), new AOEShapeDonut(8, 20)) { } -} +class Superstorm(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Superstorm2), new AOEShapeDonut(8, 20)); -class Spellsword : Components.SelfTargetedAOEs -{ - public Spellsword() : base(ActionID.MakeSpell(AID.Spellsword), new AOEShapeCone(7.1f, 60.Degrees())) { } -} +class Spellsword(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Spellsword), new AOEShapeCone(7.1f, 60.Degrees())); -class Disseminate : Components.SelfTargetedAOEs -{ - public Disseminate() : base(ActionID.MakeSpell(AID.Disseminate), new AOEShapeCircle(7.2f)) { } -} +class Disseminate(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Disseminate), new AOEShapeCircle(7.2f)); class BallastKB : Components.Knockback //actual knockbacks are 0.274s after snapshot { @@ -126,31 +108,31 @@ class BallastKB : Components.Knockback //actual knockbacks are 0.274s after snap private static readonly AOEShapeDonutSector cone2 = new(5.5f, 10.5f, 135.Degrees()); private static readonly AOEShapeDonutSector cone3 = new(10.5f, 15.5f, 135.Degrees()); - public override IEnumerable Sources(BossModule module, int slot, Actor actor) + public override IEnumerable Sources(int slot, Actor actor) { if (casting2) - yield return new(module.PrimaryActor.Position, 20, _activation1, cone1, _rotation); + yield return new(Module.PrimaryActor.Position, 20, _activation1, cone1, _rotation); if (casting3) - yield return new(module.PrimaryActor.Position, 20, _activation2, cone2, _rotation); + yield return new(Module.PrimaryActor.Position, 20, _activation2, cone2, _rotation); if (casting4) - yield return new(module.PrimaryActor.Position, 20, _activation3, cone3, _rotation); + yield return new(Module.PrimaryActor.Position, 20, _activation3, cone3, _rotation); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.Ballast0) { casting2 = true; casting3 = true; casting4 = true; - _rotation = module.PrimaryActor.Rotation; - _activation1 = module.WorldState.CurrentTime.AddSeconds(4.6f); - _activation2 = module.WorldState.CurrentTime.AddSeconds(5.2f); - _activation3 = module.WorldState.CurrentTime.AddSeconds(5.8f); + _rotation = Module.PrimaryActor.Rotation; + _activation1 = WorldState.FutureTime(4.6f); + _activation2 = WorldState.FutureTime(5.2f); + _activation3 = WorldState.FutureTime(5.8f); } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.Ballast2) casting2 = false; @@ -163,7 +145,7 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent class Hints : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { hints.Add("For this stage Flying Sardine and Acorn Bomb are highly recommended.\nUse Flying Sardine to interrupt High Voltage.\nUse Acorn Bomb to put Shabtis to sleep until their buff runs out."); } diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage16SunsetBullevard/Stage16Act1.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage16SunsetBullevard/Stage16Act1.cs index 272d73ebf6..b5fcbfdb67 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage16SunsetBullevard/Stage16Act1.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage16SunsetBullevard/Stage16Act1.cs @@ -12,7 +12,7 @@ public enum AID : uint class Hints : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { hints.Add("The cyclops are very slow, but will instantly kill you, if they catch you.\nKite them or kill them with the self-destruct combo. (Toad Oil->Bristle->\nMoonflute->Swiftcast->Self-destruct) If you don't use the self-destruct\ncombo in act 1, you can bring the Final Sting combo for act 2.\n(Off-guard->Bristle->Moonflute->Final Sting)\nDiamondback is highly recommended in act 2."); } diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage16SunsetBullevard/Stage16Act2.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage16SunsetBullevard/Stage16Act2.cs index 62eeeee1cd..413c3e74f4 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage16SunsetBullevard/Stage16Act2.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage16SunsetBullevard/Stage16Act2.cs @@ -22,63 +22,39 @@ public enum AID : uint TenTonzeWave2 = 15268, // 233C->self, 4,6s cast, range 10-20 donut } -class OneOneOneOneTonzeSwing : Components.RaidwideCast -{ - public OneOneOneOneTonzeSwing() : base(ActionID.MakeSpell(AID.OneOneOneOneTonzeSwing), "Use Diamondback!") { } -} +class OneOneOneOneTonzeSwing(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.OneOneOneOneTonzeSwing), "Use Diamondback!"); -class TenTonzeSlash : Components.SelfTargetedAOEs -{ - public TenTonzeSlash() : base(ActionID.MakeSpell(AID.TenTonzeSlash), new AOEShapeCone(44, 30.Degrees())) { } -} +class TenTonzeSlash(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TenTonzeSlash), new AOEShapeCone(44, 30.Degrees())); -class OneOneOneTonzeSwing : Components.SelfTargetedAOEs -{ - public OneOneOneTonzeSwing() : base(ActionID.MakeSpell(AID.OneOneOneTonzeSwing), new AOEShapeCircle(12)) { } -} +class OneOneOneTonzeSwing(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.OneOneOneTonzeSwing), new AOEShapeCircle(12)); -class CryOfRage : Components.CastGaze -{ - public CryOfRage() : base(ActionID.MakeSpell(AID.CryOfRage)) { } -} +class CryOfRage(BossModule module) : Components.CastGaze(module, ActionID.MakeSpell(AID.CryOfRage)); -class TenTonzeWave : Components.SelfTargetedAOEs -{ - public TenTonzeWave() : base(ActionID.MakeSpell(AID.TenTonzeWave), new AOEShapeCone(44, 30.Degrees())) { } -} +class TenTonzeWave(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TenTonzeWave), new AOEShapeCone(44, 30.Degrees())); -class TenTonzeWave2 : Components.SelfTargetedAOEs -{ - public TenTonzeWave2() : base(ActionID.MakeSpell(AID.TenTonzeWave2), new AOEShapeDonut(10, 20)) { } -} +class TenTonzeWave2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TenTonzeWave2), new AOEShapeDonut(10, 20)); -class OneOneOneTonzeSwingKB : Components.KnockbackFromCastTarget //actual knockback happens ~1.45s after snapshot -{ - public OneOneOneTonzeSwingKB() : base(ActionID.MakeSpell(AID.OneOneOneTonzeSwing), 20, shape: new AOEShapeCircle(12)) { } -} +class OneOneOneTonzeSwingKB(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.OneOneOneTonzeSwing), 20, shape: new AOEShapeCircle(12)); // actual knockback happens ~1.45s after snapshot -class ZoomIn : Components.BaitAwayChargeCast -{ - public ZoomIn() : base(ActionID.MakeSpell(AID.ZoomIn), 4) { } -} +class ZoomIn(BossModule module) : Components.BaitAwayChargeCast(module, ActionID.MakeSpell(AID.ZoomIn), 4); class ZoomInKB : Components.Knockback //actual knockback happens ~0.7s after snapshot { private DateTime _activation; - public override IEnumerable Sources(BossModule module, int slot, Actor actor) + public override IEnumerable Sources(int slot, Actor actor) { if (_activation != default) - yield return new(module.PrimaryActor.Position, 20, _activation); + yield return new(Module.PrimaryActor.Position, 20, _activation); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.ZoomIn) _activation = spell.NPCFinishAt; } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.ZoomIn) _activation = default; @@ -87,7 +63,7 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn class Hints : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { hints.Add("Tikbalang will spawn a cyclops a few seconds into the fight. Make sure\nto kill it before it reaches you. After that you can just slowly take down the\nboss. Use Diamondback to survive the 1111 Tonze Swing. Alternatively\nyou can try the Final Sting combo when he drops to about 75% health.\n(Off-guard->Bristle->Moonflute->Final Sting)"); } diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage17TheSwordOfMusic/Stage17Act1.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage17TheSwordOfMusic/Stage17Act1.cs index 0c5a80547d..03c483c700 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage17TheSwordOfMusic/Stage17Act1.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage17TheSwordOfMusic/Stage17Act1.cs @@ -13,27 +13,18 @@ public enum AID : uint Shred = 14759, // 2720/271F->self, 2,5s cast, range 4+R width 4 rect, stuns player } -class TheHand : Components.SelfTargetedAOEs -{ - public TheHand() : base(ActionID.MakeSpell(AID.TheHand), new AOEShapeCone(8, 60.Degrees())) { } -} +class TheHand(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TheHand), new AOEShapeCone(8, 60.Degrees())); -class Shred : Components.SelfTargetedAOEs -{ - public Shred() : base(ActionID.MakeSpell(AID.Shred), new AOEShapeRect(6, 2)) { } -} +class Shred(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Shred), new AOEShapeRect(6, 2)); -class TheHandKB : Components.KnockbackFromCastTarget //actual knockback happens a whole 0,9s after snapshot -{ - public TheHandKB() : base(ActionID.MakeSpell(AID.TheHand), 10, shape: new AOEShapeCone(8, 60.Degrees())) { } -} +class TheHandKB(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.TheHand), 10, shape: new AOEShapeCone(8, 60.Degrees())); // actual knockback happens a whole 0,9s after snapshot class Hints2 : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { - if (!module.PrimaryActor.IsDead) - hints.Add($"{module.PrimaryActor.Name} counters magical damage!"); + if (!Module.PrimaryActor.IsDead) + hints.Add($"{Module.PrimaryActor.Name} counters magical damage!"); if (!module.Enemies(OID.RightClaw).All(e => e.IsDead)) hints.Add($"{module.Enemies(OID.RightClaw).FirstOrDefault()!.Name} counters physical damage!"); } @@ -41,9 +32,9 @@ public override void AddGlobalHints(BossModule module, GlobalHints hints) class Hints : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { - hints.Add($"The {module.PrimaryActor.Name} counters magical attacks, the {module.Enemies(OID.RightClaw).FirstOrDefault()!.Name} counters physical\nattacks. If you have healing spells you can just tank the counter damage\nand kill them however you like anyway. All opponents in this stage are\nweak to lightning.\nThe Ram's Voice and Ultravibration combo can be used in Act 2."); + hints.Add($"The {Module.PrimaryActor.Name} counters magical attacks, the {module.Enemies(OID.RightClaw).FirstOrDefault()!.Name} counters physical\nattacks. If you have healing spells you can just tank the counter damage\nand kill them however you like anyway. All opponents in this stage are\nweak to lightning.\nThe Ram's Voice and Ultravibration combo can be used in Act 2."); } } diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage17TheSwordOfMusic/Stage17Act2.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage17TheSwordOfMusic/Stage17Act2.cs index 2bdfca4913..a15fe61f5e 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage17TheSwordOfMusic/Stage17Act2.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage17TheSwordOfMusic/Stage17Act2.cs @@ -19,39 +19,21 @@ public enum AID : uint MagitekRay = 15048, // 2721->location, 3,0s cast, range 6 circle, voidzone, interruptible } -class GrandStrike : Components.SelfTargetedAOEs -{ - public GrandStrike() : base(ActionID.MakeSpell(AID.GrandStrike), new AOEShapeRect(77.5f, 2)) { } -} +class GrandStrike(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.GrandStrike), new AOEShapeRect(77.5f, 2)); -class MagitekField : Components.CastHint -{ - public MagitekField() : base(ActionID.MakeSpell(AID.MagitekField), "Interruptible, increases its defenses") { } -} +class MagitekField(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.MagitekField), "Interruptible, increases its defenses"); -class MagitekRay : Components.PersistentVoidzoneAtCastTarget -{ - public MagitekRay() : base(6, ActionID.MakeSpell(AID.MagitekRay), m => m.Enemies(OID.MagitekRayVoidzone), 0) { } -} +class MagitekRay(BossModule module) : Components.PersistentVoidzoneAtCastTarget(module, 6, ActionID.MakeSpell(AID.MagitekRay), m => m.Enemies(OID.MagitekRayVoidzone), 0); -class TheHand : Components.SelfTargetedAOEs -{ - public TheHand() : base(ActionID.MakeSpell(AID.TheHand), new AOEShapeCone(8, 60.Degrees())) { } -} +class TheHand(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TheHand), new AOEShapeCone(8, 60.Degrees())); -class Shred : Components.SelfTargetedAOEs -{ - public Shred() : base(ActionID.MakeSpell(AID.Shred), new AOEShapeRect(6, 2)) { } -} +class Shred(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Shred), new AOEShapeRect(6, 2)); -class TheHandKB : Components.KnockbackFromCastTarget //actual knockback happens a whole 0,9s after snapshot -{ - public TheHandKB() : base(ActionID.MakeSpell(AID.TheHand), 10, shape: new AOEShapeCone(8, 60.Degrees())) { } -} +class TheHandKB(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.TheHand), 10, shape: new AOEShapeCone(8, 60.Degrees())); // actual knockback happens a whole 0,9s after snapshot class Hints2 : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (!module.Enemies(OID.LeftClaw).All(e => e.IsDead)) hints.Add($"{module.Enemies(OID.LeftClaw).FirstOrDefault()!.Name} counters magical damage!"); @@ -62,9 +44,9 @@ public override void AddGlobalHints(BossModule module, GlobalHints hints) class Hints : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { - hints.Add($"{module.PrimaryActor.Name} is weak to lightning spells.\nDuring the fight he will spawn one of each claws as known from act 1.\nIf available use the Ram's Voice + Ultravibration combo for instant kill."); + hints.Add($"{Module.PrimaryActor.Name} is weak to lightning spells.\nDuring the fight he will spawn one of each claws as known from act 1.\nIf available use the Ram's Voice + Ultravibration combo for instant kill."); } } diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage18MidsummerNightsExplosion/Stage18Act1.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage18MidsummerNightsExplosion/Stage18Act1.cs index 04467ba9cc..4f47c05d95 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage18MidsummerNightsExplosion/Stage18Act1.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage18MidsummerNightsExplosion/Stage18Act1.cs @@ -16,31 +16,19 @@ public enum AID : uint TailSmash = 15052, // 2724->self, 4,0s cast, range 12+R 90-degree cone } -class Explosion : Components.SelfTargetedAOEs -{ - public Explosion() : base(ActionID.MakeSpell(AID.Explosion), new AOEShapeCircle(10)) { } -} +class Explosion(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Explosion), new AOEShapeCircle(10)); -class Fireball : Components.LocationTargetedAOEs -{ - public Fireball() : base(ActionID.MakeSpell(AID.Fireball), 6) { } -} +class Fireball(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Fireball), 6); -class RipperClaw : Components.SelfTargetedAOEs -{ - public RipperClaw() : base(ActionID.MakeSpell(AID.RipperClaw), new AOEShapeCone(8, 45.Degrees())) { } -} +class RipperClaw(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RipperClaw), new AOEShapeCone(8, 45.Degrees())); -class TailSmash : Components.SelfTargetedAOEs -{ - public TailSmash() : base(ActionID.MakeSpell(AID.TailSmash), new AOEShapeCone(15, 45.Degrees())) { } -} +class TailSmash(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TailSmash), new AOEShapeCone(15, 45.Degrees())); class WildCharge : Components.BaitAwayChargeCast { public WildCharge() : base(ActionID.MakeSpell(AID.WildCharge), 4) { } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (CurrentBaits.Count > 0 && !module.Enemies(OID.Keg).All(e => e.IsDead)) hints.Add("Aim charge at a keg!"); @@ -57,7 +45,7 @@ public WildChargeKB() : base(ActionID.MakeSpell(AID.WildCharge), 10, kind: Kind. class KegExplosion : Components.GenericStackSpread { - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (var p in module.Enemies(OID.Keg).Where(x => !x.IsDead)) { @@ -67,7 +55,7 @@ public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc } } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { foreach (var p in module.Enemies(OID.Keg).Where(x => !x.IsDead)) if (actor.Position.InCircle(p.Position, 10)) @@ -77,7 +65,7 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint class Hints : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { hints.Add("Make the manticores run to the kegs and their attacks will make them\nblow up. They take 2500 damage per keg explosion.\nThe Ram's Voice and Ultravibration combo can be used to kill manticores."); } diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage18MidsummerNightsExplosion/Stage18Act2.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage18MidsummerNightsExplosion/Stage18Act2.cs index e11d7f1732..817ee8f90f 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage18MidsummerNightsExplosion/Stage18Act2.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage18MidsummerNightsExplosion/Stage18Act2.cs @@ -16,31 +16,19 @@ public enum AID : uint BoneShaker = 15053, // 2725->self, no cast, range 50 circle, harmless raidwide } -class Explosion : Components.SelfTargetedAOEs -{ - public Explosion() : base(ActionID.MakeSpell(AID.Explosion), new AOEShapeCircle(10)) { } -} +class Explosion(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Explosion), new AOEShapeCircle(10)); -class Fireball : Components.LocationTargetedAOEs -{ - public Fireball() : base(ActionID.MakeSpell(AID.Fireball), 6) { } -} +class Fireball(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Fireball), 6); -class RipperClaw : Components.SelfTargetedAOEs -{ - public RipperClaw() : base(ActionID.MakeSpell(AID.RipperClaw), new AOEShapeCone(8, 45.Degrees())) { } -} +class RipperClaw(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RipperClaw), new AOEShapeCone(8, 45.Degrees())); -class TailSmash : Components.SelfTargetedAOEs -{ - public TailSmash() : base(ActionID.MakeSpell(AID.TailSmash), new AOEShapeCone(15, 45.Degrees())) { } -} +class TailSmash(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TailSmash), new AOEShapeCone(15, 45.Degrees())); class WildCharge : Components.BaitAwayChargeCast { public WildCharge() : base(ActionID.MakeSpell(AID.WildCharge), 4) { } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (CurrentBaits.Count > 0 && !module.Enemies(OID.Keg).All(e => e.IsDead)) hints.Add("Aim charge at a keg!"); @@ -57,7 +45,7 @@ public WildChargeKB() : base(ActionID.MakeSpell(AID.WildCharge), 10, kind: Kind. class KegExplosion : Components.GenericStackSpread { - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (var p in module.Enemies(OID.Keg).Where(x => !x.IsDead)) { @@ -67,7 +55,7 @@ public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc } } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { foreach (var p in module.Enemies(OID.Keg).Where(x => !x.IsDead)) if (actor.Position.InCircle(p.Position, 10)) @@ -77,7 +65,7 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint class Hints : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { hints.Add("Same as last stage. Make the manticores run to the kegs and their attacks\nwill make them blow up. Their attacks will also do friendly fire damage\nto each other.\nThe Ram's Voice and Ultravibration combo can be used to kill manticores."); } diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage19OnAClearDayYouCanSmellForever/Stage19Act1.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage19OnAClearDayYouCanSmellForever/Stage19Act1.cs index 493d5f3340..b904241007 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage19OnAClearDayYouCanSmellForever/Stage19Act1.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage19OnAClearDayYouCanSmellForever/Stage19Act1.cs @@ -30,33 +30,24 @@ public enum SID : uint Stun = 149, // 2729->player, extra=0x0 } -class BadBreath : Components.SelfTargetedAOEs -{ - public BadBreath() : base(ActionID.MakeSpell(AID.BadBreath), new AOEShapeCone(17.775f, 60.Degrees())) { } -} +class BadBreath(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.BadBreath), new AOEShapeCone(17.775f, 60.Degrees())); -class VineProbe : Components.SelfTargetedAOEs -{ - public VineProbe() : base(ActionID.MakeSpell(AID.VineProbe), new AOEShapeRect(11.775f, 4)) { } -} +class VineProbe(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.VineProbe), new AOEShapeRect(11.775f, 4)); -class OffalBreath : Components.PersistentVoidzoneAtCastTarget -{ - public OffalBreath() : base(6, ActionID.MakeSpell(AID.OffalBreath), m => m.Enemies(OID.voidzone), 0) { } -} +class OffalBreath(BossModule module) : Components.PersistentVoidzoneAtCastTarget(module, 6, ActionID.MakeSpell(AID.OffalBreath), m => m.Enemies(OID.voidzone), 0); class Reflect : BossComponent { private bool reflect; private bool casting; - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.Reflect) casting = true; } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.Reflect) { @@ -65,7 +56,7 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn } } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (casting) hints.Add("Boss will reflect all magic damage!"); @@ -76,7 +67,7 @@ public override void AddGlobalHints(BossModule module, GlobalHints hints) class Hints : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { hints.Add("At the start of the fight Rebekkah will cast Reflect. This will reflect all\nmagic damage back to you. Useful skills: Sharpened Knife,\nFlying Sardine, Ink Jet (Act 2), Exuviation (Act 2), potentially a Final Sting\ncombo. (Off-guard->Bristle->Moonflute->Final Sting)"); } diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage19OnAClearDayYouCanSmellForever/Stage19Act2.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage19OnAClearDayYouCanSmellForever/Stage19Act2.cs index 3dc3bf04e4..014e2a0dc3 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage19OnAClearDayYouCanSmellForever/Stage19Act2.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage19OnAClearDayYouCanSmellForever/Stage19Act2.cs @@ -40,37 +40,37 @@ class ExplosiveDehiscence : Components.CastGaze public ExplosiveDehiscence() : base(ActionID.MakeSpell(AID.ExplosiveDehiscence)) { } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (!_blinded[slot] && casting) hints.Add("Cast Ink Jet on boss to get blinded!"); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.Schizocarps) casting = true; } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.ExplosiveDehiscence) casting = false; } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Blind) - _blinded.Set(module.Raid.FindSlot(actor.InstanceID)); + _blinded.Set(Raid.FindSlot(actor.InstanceID)); } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Blind) - _blinded.Clear(module.Raid.FindSlot(actor.InstanceID)); + _blinded.Clear(Raid.FindSlot(actor.InstanceID)); } - public override IEnumerable ActiveEyes(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveEyes(int slot, Actor actor) { return _blinded[slot] ? Enumerable.Empty() : base.ActiveEyes(module, slot, actor); } @@ -81,13 +81,13 @@ class Reflect : BossComponent private bool reflect; private bool casting; - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.Reflect) casting = true; } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.Reflect) { @@ -96,7 +96,7 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn } } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (casting) hints.Add("Boss will reflect all magic damage!"); @@ -105,24 +105,15 @@ public override void AddGlobalHints(BossModule module, GlobalHints hints) } } -class BadBreath : Components.SelfTargetedAOEs -{ - public BadBreath() : base(ActionID.MakeSpell(AID.BadBreath), new AOEShapeCone(17.775f, 60.Degrees())) { } -} +class BadBreath(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.BadBreath), new AOEShapeCone(17.775f, 60.Degrees())); -class VineProbe : Components.SelfTargetedAOEs -{ - public VineProbe() : base(ActionID.MakeSpell(AID.VineProbe), new AOEShapeRect(11.775f, 4)) { } -} +class VineProbe(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.VineProbe), new AOEShapeRect(11.775f, 4)); -class OffalBreath : Components.PersistentVoidzoneAtCastTarget -{ - public OffalBreath() : base(6, ActionID.MakeSpell(AID.OffalBreath), m => m.Enemies(OID.voidzone), 0) { } -} +class OffalBreath(BossModule module) : Components.PersistentVoidzoneAtCastTarget(module, 6, ActionID.MakeSpell(AID.OffalBreath), m => m.Enemies(OID.voidzone), 0); class Hints : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { hints.Add("Same as first act, but this time the boss will cast a gaze from all directions.\nThe easiest counter for this is to blind yourself by casting Ink Jet on the\nboss after it casted Schizocarps.\nThe Final Sting combo window opens at around 75% health.\n(Off-guard->Bristle->Moonflute->Final Sting)"); } diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage20MissTyphon/Stage20Act1.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage20MissTyphon/Stage20Act1.cs index d9cb5d9c26..132e789f02 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage20MissTyphon/Stage20Act1.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage20MissTyphon/Stage20Act1.cs @@ -13,15 +13,9 @@ public enum AID : uint Fireball2 = 14707, // 272A->player, no cast, range 8 circle, 3 casts after snort } -class Fireball : Components.LocationTargetedAOEs -{ - public Fireball() : base(ActionID.MakeSpell(AID.Fireball), 8) { } -} +class Fireball(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Fireball), 8); -class Snort : Components.CastHint -{ - public Snort() : base(ActionID.MakeSpell(AID.Snort), "Use Diamondback!") { } -} +class Snort(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.Snort), "Use Diamondback!"); class SnortKB : Components.KnockbackFromCastTarget { //knockback actually delayed by 0.7s @@ -33,12 +27,12 @@ public SnortKB() : base(ActionID.MakeSpell(AID.Snort), 30, kind: Kind.AwayFromOr class Hints : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { hints.Add("Diamondback and Flying Sardine are essential for this stage. The Final\nSting combo (Off-guard->Bristle->Moonflute->Final Sting) can make act 3\nincluding the achievement much easier. Ultros in act 2 and 3 is weak to\nfire."); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { hints.Add("Requirement for achievement: Don't kill any tentacles in act 3", false); } diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage20MissTyphon/Stage20Act2.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage20MissTyphon/Stage20Act2.cs index cc2c07d4f8..a884038e78 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage20MissTyphon/Stage20Act2.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage20MissTyphon/Stage20Act2.cs @@ -15,34 +15,19 @@ public enum AID : uint LightningBolt = 14717, // 233C->location, 3,0s cast, range 3 circle } -class AquaBreath : Components.SelfTargetedAOEs -{ - public AquaBreath() : base(ActionID.MakeSpell(AID.AquaBreath), new AOEShapeCone(13.1f, 45.Degrees())) { } -} +class AquaBreath(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.AquaBreath), new AOEShapeCone(13.1f, 45.Degrees())); -class Megavolt : Components.SelfTargetedAOEs -{ - public Megavolt() : base(ActionID.MakeSpell(AID.Megavolt), new AOEShapeCircle(11.1f)) { } -} +class Megavolt(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Megavolt), new AOEShapeCircle(11.1f)); -class Waterspout : Components.LocationTargetedAOEs -{ - public Waterspout() : base(ActionID.MakeSpell(AID.Waterspout), 4) { } -} +class Waterspout(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Waterspout), 4); -class LightningBolt : Components.LocationTargetedAOEs -{ - public LightningBolt() : base(ActionID.MakeSpell(AID.LightningBolt), 3) { } -} +class LightningBolt(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.LightningBolt), 3); -class ImpSong : Components.CastHint -{ - public ImpSong() : base(ActionID.MakeSpell(AID.ImpSong), "Interrupt Ultros!") { } -} +class ImpSong(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.ImpSong), "Interrupt Ultros!"); class Hints : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { hints.Add("Ultros is weak to fire. Interrupt Imp Song."); } diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage20MissTyphon/Stage20Act3.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage20MissTyphon/Stage20Act3.cs index e4e1b2273a..f7449c0d6c 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage20MissTyphon/Stage20Act3.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage20MissTyphon/Stage20Act3.cs @@ -21,58 +21,31 @@ public enum AID : uint ImpSong = 14744, // 272D->self, 6,0s cast, range 50+R circle } -class AquaBreath : Components.SelfTargetedAOEs -{ - public AquaBreath() : base(ActionID.MakeSpell(AID.AquaBreath), new AOEShapeCone(13.1f, 45.Degrees())) { } -} +class AquaBreath(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.AquaBreath), new AOEShapeCone(13.1f, 45.Degrees())); -class Megavolt : Components.SelfTargetedAOEs -{ - public Megavolt() : base(ActionID.MakeSpell(AID.Megavolt), new AOEShapeCircle(11.1f)) { } -} +class Megavolt(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Megavolt), new AOEShapeCircle(11.1f)); -class Tentacle : Components.SelfTargetedAOEs -{ - public Tentacle() : base(ActionID.MakeSpell(AID.Tentacle), new AOEShapeCircle(8)) { } -} +class Tentacle(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Tentacle), new AOEShapeCircle(8)); -class Wallop : Components.SelfTargetedAOEs -{ - public Wallop() : base(ActionID.MakeSpell(AID.Wallop), new AOEShapeRect(57.2f, 5)) { } -} +class Wallop(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Wallop), new AOEShapeRect(57.2f, 5)); -class WallopKB : Components.KnockbackFromCastTarget -{ - public WallopKB() : base(ActionID.MakeSpell(AID.Wallop), 20, kind: Kind.AwayFromOrigin) { } //knockback actually delayed by 0.8s -} +class WallopKB(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.Wallop), 20, kind: Kind.AwayFromOrigin); //knockback actually delayed by 0.8s -class Fireball : Components.LocationTargetedAOEs -{ - public Fireball() : base(ActionID.MakeSpell(AID.Fireball), 8) { } -} +class Fireball(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Fireball), 8); -class ImpSong : Components.CastHint -{ - public ImpSong() : base(ActionID.MakeSpell(AID.ImpSong), "Interrupt Ultros!") { } -} +class ImpSong(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.ImpSong), "Interrupt Ultros!"); -class Snort : Components.CastHint -{ - public Snort() : base(ActionID.MakeSpell(AID.Snort), "Use Diamondback!") { } -} +class Snort(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.Snort), "Use Diamondback!"); -class SnortKB : Components.KnockbackFromCastTarget -{ - public SnortKB() : base(ActionID.MakeSpell(AID.Snort), 30, kind: Kind.AwayFromOrigin) { } //knockback actually delayed by 0.7s -} +class SnortKB(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.Snort), 30, kind: Kind.AwayFromOrigin); //knockback actually delayed by 0.7s class Hints : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { hints.Add("This act is act 1+2 combined with tentacles on top.\nThe Final Sting combo (Off-guard->Bristle->Moonflute->Final Sting) makes\nthis act including the achievement much easier. Ultros is weak to fire."); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { hints.Add("Requirement for achievement: Don't kill any tentacles in this act", false); } diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage21ChimeraOnAHotTinRoof/Stage21Act1.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage21ChimeraOnAHotTinRoof/Stage21Act1.cs index 417fe4fb7b..2d090c3152 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage21ChimeraOnAHotTinRoof/Stage21Act1.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage21ChimeraOnAHotTinRoof/Stage21Act1.cs @@ -12,19 +12,13 @@ public enum AID : uint Icefall = 15064, // Boss->location, 2,5s cast, range 5 circle } -class Icefall : Components.LocationTargetedAOEs -{ - public Icefall() : base(ActionID.MakeSpell(AID.Icefall), 5) { } -} +class Icefall(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Icefall), 5); -class VoidBlizzard : Components.CastHint -{ - public VoidBlizzard() : base(ActionID.MakeSpell(AID.VoidBlizzard), "Interrupt") { } -} +class VoidBlizzard(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.VoidBlizzard), "Interrupt"); class Hints : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { hints.Add("The first act is fairly easy. Interrupt the Void Blizzards with Spitting\nSardine and most of the danger is gone. The Imps are weak against fire spells.\nIn the 2nd act you can start the Final Sting combination at about 50%\nhealth left. (Off-guard->Bristle->Moonflute->Final Sting)"); } @@ -32,7 +26,7 @@ public override void AddGlobalHints(BossModule module, GlobalHints hints) class Hints2 : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { hints.Add("The imps are weak to fire spells and strong against ice.\nInterrupt Void Blizzard with Spitting Sardine."); } diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage21ChimeraOnAHotTinRoof/Stage21Act2.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage21ChimeraOnAHotTinRoof/Stage21Act2.cs index a299d694ac..e1cfc64357 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage21ChimeraOnAHotTinRoof/Stage21Act2.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage21ChimeraOnAHotTinRoof/Stage21Act2.cs @@ -19,39 +19,21 @@ public enum AID : uint } -class TheRamsKeeper : Components.PersistentVoidzoneAtCastTarget -{ - public TheRamsKeeper() : base(9, ActionID.MakeSpell(AID.TheRamsKeeper), m => m.Enemies(OID.Voidzone), 0) { } -} +class TheRamsKeeper(BossModule module) : Components.PersistentVoidzoneAtCastTarget(module, 9, ActionID.MakeSpell(AID.TheRamsKeeper), m => m.Enemies(OID.Voidzone), 0); -class TheRamsKeeperHint : Components.CastHint -{ - public TheRamsKeeperHint() : base(ActionID.MakeSpell(AID.TheRamsKeeper), "Interrupt") { } -} +class TheRamsKeeperHint(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.TheRamsKeeper), "Interrupt"); -class TheRamsVoice : Components.SelfTargetedAOEs -{ - public TheRamsVoice() : base(ActionID.MakeSpell(AID.TheRamsVoice), new AOEShapeCircle(9)) { } -} +class TheRamsVoice(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TheRamsVoice), new AOEShapeCircle(9)); -class TheDragonsVoice : Components.SelfTargetedAOEs -{ - public TheDragonsVoice() : base(ActionID.MakeSpell(AID.TheDragonsVoice), new AOEShapeDonut(8, 30)) { } -} +class TheDragonsVoice(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TheDragonsVoice), new AOEShapeDonut(8, 30)); -class Icefall : Components.LocationTargetedAOEs -{ - public Icefall() : base(ActionID.MakeSpell(AID.Icefall), 5) { } -} +class Icefall(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Icefall), 5); -class VoidBlizzard : Components.CastHint -{ - public VoidBlizzard() : base(ActionID.MakeSpell(AID.VoidBlizzard), "Interrupt") { } -} +class VoidBlizzard(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.VoidBlizzard), "Interrupt"); class Hints : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { hints.Add("Interrupt The Rams Keeper with Spitting Sardine. You can start the\nFinal Sting combination at about 50% health left.\n(Off-guard->Bristle->Moonflute->Final Sting).\nThe boss will sometimes spawn an Arena Imp during the fight."); } @@ -59,7 +41,7 @@ public override void AddGlobalHints(BossModule module, GlobalHints hints) class Hints2 : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (!module.Enemies(OID.ArenaImp).All(e => e.IsDead)) hints.Add("The imps are weak to fire spells and strong against ice.\nInterrupt Void Blizzard with Spitting Sardine."); diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage22HereComesTheBoom/Stage22Act1.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage22HereComesTheBoom/Stage22Act1.cs index 25d57a1a9e..d256f2002a 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage22HereComesTheBoom/Stage22Act1.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage22HereComesTheBoom/Stage22Act1.cs @@ -13,7 +13,7 @@ public enum AID : uint class Hints : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { hints.Add($"The first act is easy. Kill the grenades in one hit each or they will wipe you.\nIf you gear is bad consider using 1000 Needles.\nFor the 2nd act you should bring Sticky Tongue. In the 2nd act you can start\nthe Final Sting combination at about 50%\nhealth left. (Off-guard->Bristle->Moonflute->Final Sting)"); } @@ -21,7 +21,7 @@ public override void AddGlobalHints(BossModule module, GlobalHints hints) class Hints2 : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { hints.Add($"Kill the grenades in one hit each or they will wipe you. They got 543 HP."); } diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage22HereComesTheBoom/Stage22Act2.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage22HereComesTheBoom/Stage22Act2.cs index d5e0ba9404..1244a016a8 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage22HereComesTheBoom/Stage22Act2.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage22HereComesTheBoom/Stage22Act2.cs @@ -21,34 +21,19 @@ public enum AID : uint Burst = 14904, // Boss->self, 20,0s cast, range 50 circle } -class Sap : Components.LocationTargetedAOEs -{ - public Sap() : base(ActionID.MakeSpell(AID.Sap), 8) { } -} +class Sap(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Sap), 8); -class Sap2 : Components.LocationTargetedAOEs -{ - public Sap2() : base(ActionID.MakeSpell(AID.Sap2), 8) { } -} +class Sap2(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Sap2), 8); -class ScaldingScolding : Components.SelfTargetedAOEs -{ - public ScaldingScolding() : base(ActionID.MakeSpell(AID.ScaldingScolding), new AOEShapeCone(11.75f, 60.Degrees())) { } -} +class ScaldingScolding(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ScaldingScolding), new AOEShapeCone(11.75f, 60.Degrees())); -class Flashthoom : Components.SelfTargetedAOEs -{ - public Flashthoom() : base(ActionID.MakeSpell(AID.Flashthoom), new AOEShapeCircle(7.2f)) { } -} +class Flashthoom(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Flashthoom), new AOEShapeCircle(7.2f)); -class Ignition : Components.RaidwideCast -{ - public Ignition() : base(ActionID.MakeSpell(AID.Ignition), "Wipe if Grenade is not killed yet, otherwise Raidwide") { } -} +class Ignition(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.Ignition), "Wipe if Grenade is not killed yet, otherwise Raidwide"); class Hints : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { hints.Add($"{module.Enemies(OID.Boss).FirstOrDefault()!.Name} spawns grenades and gas bombs during the fight. Just as in\nact 1 the grenades must be killed in one hit each or they will wipe you.\nUse Sticky Tongue to pull Gas Bombs to the boss so they interrupt the enrage.\nYou can start the Final Sting combination at about 50% health left.\n(Off-guard->Bristle->Moonflute->Final Sting)"); } @@ -56,7 +41,7 @@ public override void AddGlobalHints(BossModule module, GlobalHints hints) class Hints2 : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (!module.Enemies(OID.ArenaGrenade).All(e => e.IsDead)) hints.Add($"Kill the {module.Enemies(OID.ArenaGrenade).FirstOrDefault()!.Name} in one hit or it will wipe you. It got 543 HP."); diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage23BehemothsAndBroomsticks/Stage23.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage23BehemothsAndBroomsticks/Stage23.cs index a6d2f02983..b7486a3f0c 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage23BehemothsAndBroomsticks/Stage23.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage23BehemothsAndBroomsticks/Stage23.cs @@ -19,36 +19,21 @@ public enum AID : uint } -class Charybdis : Components.LocationTargetedAOEs -{ - public Charybdis() : base(ActionID.MakeSpell(AID.Charybdis), 6) { } -} +class Charybdis(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Charybdis), 6); -class Maelstrom : Components.PersistentVoidzone -{ - public Maelstrom() : base(8, m => m.Enemies(OID.Maelstrom)) { } -} +class Maelstrom(BossModule module) : Components.PersistentVoidzone(module, 8, m => m.Enemies(OID.Maelstrom)); -class Trounce : Components.SelfTargetedAOEs -{ - public Trounce() : base(ActionID.MakeSpell(AID.Trounce), new AOEShapeCone(55.8f, 30.Degrees())) { } -} +class Trounce(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Trounce), new AOEShapeCone(55.8f, 30.Degrees())); -class Comet : Components.LocationTargetedAOEs -{ - public Comet() : base(ActionID.MakeSpell(AID.Comet2), 10) { } -} +class Comet(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Comet2), 10); -class EclipticMeteor : Components.RaidwideCast -{ - public EclipticMeteor() : base(ActionID.MakeSpell(AID.EclipticMeteor), "Use Diamondback!") { } -} +class EclipticMeteor(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.EclipticMeteor), "Use Diamondback!"); class Hints : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { - hints.Add($"The {module.PrimaryActor.Name} will use Ecliptic Meteor.\nUse Diamondback to survive it.\nYou can start the Final Sting combination at about 40% health left.\n(Off-guard->Bristle->Moonflute->Final Sting)"); + hints.Add($"The {Module.PrimaryActor.Name} will use Ecliptic Meteor.\nUse Diamondback to survive it.\nYou can start the Final Sting combination at about 40% health left.\n(Off-guard->Bristle->Moonflute->Final Sting)"); } } diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage24AmazingTechnicolorPitFiends/Stage24Act1.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage24AmazingTechnicolorPitFiends/Stage24Act1.cs index e85860b9cb..4cc049b253 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage24AmazingTechnicolorPitFiends/Stage24Act1.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage24AmazingTechnicolorPitFiends/Stage24Act1.cs @@ -15,27 +15,18 @@ public enum AID : uint LightningSpark = 15318, // Boss->player, 6,0s cast, single-target } -class Starstorm : Components.LocationTargetedAOEs -{ - public Starstorm() : base(ActionID.MakeSpell(AID.Starstorm), 5) { } -} +class Starstorm(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Starstorm), 5); -class RagingAxe : Components.SelfTargetedAOEs -{ - public RagingAxe() : base(ActionID.MakeSpell(AID.RagingAxe), new AOEShapeCone(5, 45.Degrees())) { } -} +class RagingAxe(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RagingAxe), new AOEShapeCone(5, 45.Degrees())); -class LightningSpark : Components.CastHint -{ - public LightningSpark() : base(ActionID.MakeSpell(AID.LightningSpark), "Interrupt") { } -} +class LightningSpark(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.LightningSpark), "Interrupt"); class Hints2 : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { - if (!module.PrimaryActor.IsDead) - hints.Add($"{module.PrimaryActor.Name} is immune to magical damage!"); + if (!Module.PrimaryActor.IsDead) + hints.Add($"{Module.PrimaryActor.Name} is immune to magical damage!"); if (!module.Enemies(OID.ArenaViking).All(e => e.IsDead)) hints.Add($"{module.Enemies(OID.ArenaViking).FirstOrDefault()!.Name} is immune to physical damage!"); } @@ -43,9 +34,9 @@ public override void AddGlobalHints(BossModule module, GlobalHints hints) class Hints : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { - hints.Add($"The {module.PrimaryActor.Name} is immune to magic, the {module.Enemies(OID.ArenaViking).FirstOrDefault()!.Name} is immune to\nphysical attacks. For the 2nd act Diamondback is highly recommended.\nFor the 3rd act a ranged physical spell such as Fire Angon\nis highly recommended."); + hints.Add($"The {Module.PrimaryActor.Name} is immune to magic, the {module.Enemies(OID.ArenaViking).FirstOrDefault()!.Name} is immune to\nphysical attacks. For the 2nd act Diamondback is highly recommended.\nFor the 3rd act a ranged physical spell such as Fire Angon\nis highly recommended."); } } diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage24AmazingTechnicolorPitFiends/Stage24Act2.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage24AmazingTechnicolorPitFiends/Stage24Act2.cs index 1fce8879a4..008544b6d2 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage24AmazingTechnicolorPitFiends/Stage24Act2.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage24AmazingTechnicolorPitFiends/Stage24Act2.cs @@ -20,38 +20,20 @@ public enum AID : uint Silence = 15321, // 2736->player, 5,0s cast, single-target } -class Starstorm : Components.LocationTargetedAOEs -{ - public Starstorm() : base(ActionID.MakeSpell(AID.Starstorm), 5) { } -} +class Starstorm(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Starstorm), 5); -class Mechanogravity : Components.LocationTargetedAOEs -{ - public Mechanogravity() : base(ActionID.MakeSpell(AID.Mechanogravity), 6) { } -} +class Mechanogravity(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Mechanogravity), 6); -class RagingAxe : Components.SelfTargetedAOEs -{ - public RagingAxe() : base(ActionID.MakeSpell(AID.RagingAxe), new AOEShapeCone(5, 45.Degrees())) { } -} +class RagingAxe(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RagingAxe), new AOEShapeCone(5, 45.Degrees())); -class CondensedLibra : Components.SingleTargetCast -{ - public CondensedLibra() : base(ActionID.MakeSpell(AID.CondensedLibra), "Use Diamondback!") { } -} -class TripleHit : Components.SingleTargetCast -{ - public TripleHit() : base(ActionID.MakeSpell(AID.TripleHit), "Use Diamondback!") { } -} +class CondensedLibra(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.CondensedLibra), "Use Diamondback!"); +class TripleHit(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.TripleHit), "Use Diamondback!"); -class Silence : Components.CastHint -{ - public Silence() : base(ActionID.MakeSpell(AID.Silence), "Interrupt") { } -} +class Silence(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.Silence), "Interrupt"); class Hints2 : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (!module.Enemies(OID.ArenaMagus).All(e => e.IsDead)) hints.Add($"{module.Enemies(OID.ArenaMagus).FirstOrDefault()!.Name} is immune to magical damage!"); @@ -62,9 +44,9 @@ public override void AddGlobalHints(BossModule module, GlobalHints hints) class Hints : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { - hints.Add($"The {module.PrimaryActor.Name} casts Silence which should be interrupted.\nCondensed Libra puts a debuff on you. Use Diamondback to survive the\nfollowing attack. Alternatively you can cleanse the debuff with Exuviation."); + hints.Add($"The {Module.PrimaryActor.Name} casts Silence which should be interrupted.\nCondensed Libra puts a debuff on you. Use Diamondback to survive the\nfollowing attack. Alternatively you can cleanse the debuff with Exuviation."); } } diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage24AmazingTechnicolorPitFiends/Stage24Act3.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage24AmazingTechnicolorPitFiends/Stage24Act3.cs index 24a7c5ff9a..0d35d7b020 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage24AmazingTechnicolorPitFiends/Stage24Act3.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage24AmazingTechnicolorPitFiends/Stage24Act3.cs @@ -20,48 +20,39 @@ public enum AID : uint SelfDetonate = 15329, // 273A->player, 3,0s cast, single-target } -class MagicHammer : Components.LocationTargetedAOEs -{ - public MagicHammer() : base(ActionID.MakeSpell(AID.MagicHammer), 8) { } -} +class MagicHammer(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.MagicHammer), 8); -class PageTear : Components.SelfTargetedAOEs -{ - public PageTear() : base(ActionID.MakeSpell(AID.PageTear), new AOEShapeCone(8, 45.Degrees())) { } -} +class PageTear(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PageTear), new AOEShapeCone(8, 45.Degrees())); class VacuumBlade : Components.GenericAOEs { private bool activeVacuumWave; private DateTime _activation; private static readonly AOEShapeCircle circle = new(3); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (activeVacuumWave) foreach (var p in module.Enemies(OID.VacuumWave)) yield return new(circle, p.Position, activation: _activation); } - public override void OnActorCreated(BossModule module, Actor actor) + public override void OnActorCreated(Actor actor) { if ((OID)actor.OID == OID.VacuumWave) { activeVacuumWave = true; - _activation = module.WorldState.CurrentTime.AddSeconds(7.7f); + _activation = WorldState.FutureTime(7.7f); } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.VacuumBlade) activeVacuumWave = false; } } -class HeadDown : Components.BaitAwayChargeCast -{ - public HeadDown() : base(ActionID.MakeSpell(AID.HeadDown), 4) { } -} +class HeadDown(BossModule module) : Components.BaitAwayChargeCast(module, ActionID.MakeSpell(AID.HeadDown), 4); class HeadDownKB : Components.KnockbackFromCastTarget { @@ -70,21 +61,18 @@ public override bool DestinationUnsafe(BossModule module, int slot, Actor actor, { if (module.FindComponent() != null && module.FindComponent()!.ActiveAOEs(module, slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation))) return true; - if (!module.Bounds.Contains(pos)) + if (!Module.Bounds.Contains(pos)) return true; else return false; } } -class BoneShaker : Components.RaidwideCast -{ - public BoneShaker() : base(ActionID.MakeSpell(AID.BoneShaker), "Adds + Raidwide") { } -} +class BoneShaker(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.BoneShaker), "Adds + Raidwide"); class Hints2 : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (!module.Enemies(OID.ArenaMagus).All(e => e.IsDead)) hints.Add($"Kill {module.Enemies(OID.ArenaMagus).FirstOrDefault()!.Name} fast or wipe!\nUse ranged physical attacks."); @@ -93,9 +81,9 @@ public override void AddGlobalHints(BossModule module, GlobalHints hints) class Hints : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { - hints.Add($"{module.PrimaryActor.Name} spawns two adds when casting Boneshaker. These should be a\npriority or they will explode and wipe you. To kill them without touching\nthe electric field use a ranged physical attack such as Fire Angon.\nYou can start the Final Sting combination at about 50% health left.\n(Off-guard->Bristle->Moonflute->Final Sting)"); + hints.Add($"{Module.PrimaryActor.Name} spawns two adds when casting Boneshaker. These should be a\npriority or they will explode and wipe you. To kill them without touching\nthe electric field use a ranged physical attack such as Fire Angon.\nYou can start the Final Sting combination at about 50% health left.\n(Off-guard->Bristle->Moonflute->Final Sting)"); } } diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage25DirtyRottenAzulmagia/Stage25Act1.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage25DirtyRottenAzulmagia/Stage25Act1.cs index a7df304c2f..d8e9a8c3ee 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage25DirtyRottenAzulmagia/Stage25Act1.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage25DirtyRottenAzulmagia/Stage25Act1.cs @@ -24,49 +24,28 @@ public enum SID : uint Doom = 910, // Boss->player, extra=0x0 } -class ApocalypticBolt : Components.SelfTargetedAOEs -{ - public ApocalypticBolt() : base(ActionID.MakeSpell(AID.ApocalypticBolt), new AOEShapeRect(51.2f, 4)) { } -} +class ApocalypticBolt(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ApocalypticBolt), new AOEShapeRect(51.2f, 4)); -class ApocalypticRoar : Components.SelfTargetedAOEs -{ - public ApocalypticRoar() : base(ActionID.MakeSpell(AID.ApocalypticRoar), new AOEShapeCone(36.2f, 60.Degrees())) { } -} +class ApocalypticRoar(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ApocalypticRoar), new AOEShapeCone(36.2f, 60.Degrees())); -class TheRamsVoice : Components.SelfTargetedAOEs -{ - public TheRamsVoice() : base(ActionID.MakeSpell(AID.TheRamsVoice), new AOEShapeCircle(8)) { } -} +class TheRamsVoice(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TheRamsVoice), new AOEShapeCircle(8)); -class TheDragonsVoice : Components.SelfTargetedAOEs -{ - public TheDragonsVoice() : base(ActionID.MakeSpell(AID.TheDragonsVoice), new AOEShapeDonut(6, 30)) { } -} +class TheDragonsVoice(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TheDragonsVoice), new AOEShapeDonut(6, 30)); -class Plaincracker : Components.SelfTargetedAOEs -{ - public Plaincracker() : base(ActionID.MakeSpell(AID.Plaincracker), new AOEShapeCircle(7.2f)) { } -} +class Plaincracker(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Plaincracker), new AOEShapeCircle(7.2f)); -class TremblingEarth : Components.SelfTargetedAOEs -{ - public TremblingEarth() : base(ActionID.MakeSpell(AID.TremblingEarth), new AOEShapeDonut(10, 20)) { } -} +class TremblingEarth(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TremblingEarth), new AOEShapeDonut(10, 20)); -class TremblingEarth2 : Components.SelfTargetedAOEs -{ - public TremblingEarth2() : base(ActionID.MakeSpell(AID.TremblingEarth2), new AOEShapeDonut(20, 30)) { } -} +class TremblingEarth2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TremblingEarth2), new AOEShapeDonut(20, 30)); class Hints : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { - hints.Add($"{module.PrimaryActor.Name} will reflect all physical damage in act 1, all magic damage in act 2\nand switch between both in act 3. Loom, Exuviation and Diamondback\nare recommended. In act 3 can start the Final Sting combination\nat about 50% health left. (Off-guard->Bristle->Moonflute->Final Sting)"); + hints.Add($"{Module.PrimaryActor.Name} will reflect all physical damage in act 1, all magic damage in act 2\nand switch between both in act 3. Loom, Exuviation and Diamondback\nare recommended. In act 3 can start the Final Sting combination\nat about 50% health left. (Off-guard->Bristle->Moonflute->Final Sting)"); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { hints.Add("Requirements for achievement: Take no damage, use all 6 magic elements,\nuse all 3 melee types and finish faster than ideal time", false); } @@ -74,14 +53,14 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint class Hints2 : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { var physicalreflect = module.Enemies(OID.Boss).Where(x => x.FindStatus(SID.IceSpikes) != null).FirstOrDefault(); if (physicalreflect != null) - hints.Add($"{module.PrimaryActor.Name} will reflect all physical damage!"); + hints.Add($"{Module.PrimaryActor.Name} will reflect all physical damage!"); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { var doomed = actor.FindStatus(SID.Doom); if (doomed != null) diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage25DirtyRottenAzulmagia/Stage25Act2.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage25DirtyRottenAzulmagia/Stage25Act2.cs index 97d4a277b5..bdb835973a 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage25DirtyRottenAzulmagia/Stage25Act2.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage25DirtyRottenAzulmagia/Stage25Act2.cs @@ -24,46 +24,34 @@ public enum SID : uint Doom = 910, // Boss->player, extra=0x0 } -class ApocalypticBolt : Components.SelfTargetedAOEs -{ - public ApocalypticBolt() : base(ActionID.MakeSpell(AID.ApocalypticBolt), new AOEShapeRect(51.2f, 4)) { } -} +class ApocalypticBolt(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ApocalypticBolt), new AOEShapeRect(51.2f, 4)); -class ApocalypticRoar : Components.SelfTargetedAOEs -{ - public ApocalypticRoar() : base(ActionID.MakeSpell(AID.ApocalypticRoar), new AOEShapeCone(36.2f, 60.Degrees())) { } -} +class ApocalypticRoar(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ApocalypticRoar), new AOEShapeCone(36.2f, 60.Degrees())); -class TheRamsVoice : Components.SelfTargetedAOEs -{ - public TheRamsVoice() : base(ActionID.MakeSpell(AID.TheRamsVoice), new AOEShapeCircle(8)) { } -} +class TheRamsVoice(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TheRamsVoice), new AOEShapeCircle(8)); -class TheDragonsVoice : Components.SelfTargetedAOEs -{ - public TheDragonsVoice() : base(ActionID.MakeSpell(AID.TheDragonsVoice), new AOEShapeDonut(6, 30)) { } -} +class TheDragonsVoice(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TheDragonsVoice), new AOEShapeDonut(6, 30)); class Hints : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { - hints.Add($"In this act {module.PrimaryActor.Name} will reflect all magic attacks.\nHe will also spawn adds that need to be dealed with swiftly\nsince they will spam raidwides. The adds are immune against magic\nand fire attacks."); + hints.Add($"In this act {Module.PrimaryActor.Name} will reflect all magic attacks.\nHe will also spawn adds that need to be dealed with swiftly\nsince they will spam raidwides. The adds are immune against magic\nand fire attacks."); } } class Hints2 : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (!module.Enemies(OID.BlazingAngon).All(e => e.IsDead)) hints.Add($"Kill {module.Enemies(OID.BlazingAngon).FirstOrDefault()!.Name}! Use physical attacks except fire aspected."); var magicreflect = module.Enemies(OID.Boss).Where(x => x.FindStatus(SID.RepellingSpray) != null).FirstOrDefault(); if (magicreflect != null) - hints.Add($"{module.PrimaryActor.Name} will reflect all magic damage!"); + hints.Add($"{Module.PrimaryActor.Name} will reflect all magic damage!"); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { var doomed = actor.FindStatus(SID.Doom); if (doomed != null) diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage25DirtyRottenAzulmagia/Stage25Act3.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage25DirtyRottenAzulmagia/Stage25Act3.cs index 600757709f..c496392fdd 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage25DirtyRottenAzulmagia/Stage25Act3.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage25DirtyRottenAzulmagia/Stage25Act3.cs @@ -33,104 +33,71 @@ public enum SID : uint Doom = 910, // Boss->player, extra=0x0 } -class Charybdis : Components.SelfTargetedAOEs -{ - public Charybdis() : base(ActionID.MakeSpell(AID.Charybdis2), new AOEShapeCircle(8)) { } -} +class Charybdis(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Charybdis2), new AOEShapeCircle(8)); class Web : BossComponent { private bool casting; - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.Web) casting = true; } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.Web) casting = false; } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (casting) hints.Add("Bait the Meteor to the edge of the arena!\nUse Loom to escape or Diamondback to survive."); } } -class Plaincracker : Components.SelfTargetedAOEs -{ - public Plaincracker() : base(ActionID.MakeSpell(AID.Plaincracker), new AOEShapeCircle(7.2f)) { } -} +class Plaincracker(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Plaincracker), new AOEShapeCircle(7.2f)); -class TremblingEarth : Components.SelfTargetedAOEs -{ - public TremblingEarth() : base(ActionID.MakeSpell(AID.TremblingEarth), new AOEShapeDonut(10, 20)) { } -} +class TremblingEarth(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TremblingEarth), new AOEShapeDonut(10, 20)); -class TremblingEarth2 : Components.SelfTargetedAOEs -{ - public TremblingEarth2() : base(ActionID.MakeSpell(AID.TremblingEarth2), new AOEShapeDonut(20, 30)) { } -} +class TremblingEarth2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TremblingEarth2), new AOEShapeDonut(20, 30)); -class ApocalypticBolt : Components.SelfTargetedAOEs -{ - public ApocalypticBolt() : base(ActionID.MakeSpell(AID.ApocalypticBolt), new AOEShapeRect(51.2f, 4)) { } -} +class ApocalypticBolt(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ApocalypticBolt), new AOEShapeRect(51.2f, 4)); -class ApocalypticRoar : Components.SelfTargetedAOEs -{ - public ApocalypticRoar() : base(ActionID.MakeSpell(AID.ApocalypticRoar), new AOEShapeCone(36.2f, 60.Degrees())) { } -} +class ApocalypticRoar(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ApocalypticRoar), new AOEShapeCone(36.2f, 60.Degrees())); -class TheRamsVoice : Components.SelfTargetedAOEs -{ - public TheRamsVoice() : base(ActionID.MakeSpell(AID.TheRamsVoice), new AOEShapeCircle(8)) { } -} +class TheRamsVoice(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TheRamsVoice), new AOEShapeCircle(8)); -class TheDragonsVoice : Components.SelfTargetedAOEs -{ - public TheDragonsVoice() : base(ActionID.MakeSpell(AID.TheDragonsVoice), new AOEShapeDonut(6, 30)) { } -} +class TheDragonsVoice(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TheDragonsVoice), new AOEShapeDonut(6, 30)); -class Maelstrom : Components.PersistentVoidzone -{ - public Maelstrom() : base(8, m => m.Enemies(OID.Maelstrom)) { } -} +class Maelstrom(BossModule module) : Components.PersistentVoidzone(module, 8, m => m.Enemies(OID.Maelstrom)); -class Meteor : Components.LocationTargetedAOEs -{ - public Meteor() : base(ActionID.MakeSpell(AID.Meteor), 15) { } -} +class Meteor(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Meteor), 15); -class MeteorVoidzone : Components.PersistentVoidzoneAtCastTarget -{ - public MeteorVoidzone() : base(10, ActionID.MakeSpell(AID.Meteor), m => m.Enemies(OID.LavaVoidzone).Where(z => z.EventState != 7), 0) { } -} +class MeteorVoidzone(BossModule module) : Components.PersistentVoidzoneAtCastTarget(module, 10, ActionID.MakeSpell(AID.Meteor), m => m.Enemies(OID.LavaVoidzone).Where(z => z.EventState != 7), 0); class Hints : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { - hints.Add($"In this act {module.PrimaryActor.Name} will switch between magic and physical reflects.\nSpend attention to that so you don't accidently kill yourself.\nAs soon as he starts casting Web go to the edge to bait Meteor, then use Loom\nto escape. You can start the Final Sting combination at about 50% health left.\n(Off-guard->Bristle->Moonflute->Final Sting)"); + hints.Add($"In this act {Module.PrimaryActor.Name} will switch between magic and physical reflects.\nSpend attention to that so you don't accidently kill yourself.\nAs soon as he starts casting Web go to the edge to bait Meteor, then use Loom\nto escape. You can start the Final Sting combination at about 50% health left.\n(Off-guard->Bristle->Moonflute->Final Sting)"); } } class Hints2 : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { var magicreflect = module.Enemies(OID.Boss).Where(x => x.FindStatus(SID.RepellingSpray) != null).FirstOrDefault(); var physicalreflect = module.Enemies(OID.Boss).Where(x => x.FindStatus(SID.IceSpikes) != null).FirstOrDefault(); if (magicreflect != null) - hints.Add($"{module.PrimaryActor.Name} will reflect all magic damage!"); + hints.Add($"{Module.PrimaryActor.Name} will reflect all magic damage!"); if (physicalreflect != null) - hints.Add($"{module.PrimaryActor.Name} will reflect all physical damage!"); + hints.Add($"{Module.PrimaryActor.Name} will reflect all physical damage!"); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { var doomed = actor.FindStatus(SID.Doom); if (doomed != null) diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage26PapaMia/Stage26Act1.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage26PapaMia/Stage26Act1.cs index f502e0f6b2..c80fb12e62 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage26PapaMia/Stage26Act1.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage26PapaMia/Stage26Act1.cs @@ -23,39 +23,30 @@ public enum SID : uint } -class Gust : Components.LocationTargetedAOEs -{ - public Gust() : base(ActionID.MakeSpell(AID.Gust), 3) { } -} +class Gust(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Gust), 3); -class AlternatePlumage : Components.CastHint -{ - public AlternatePlumage() : base(ActionID.MakeSpell(AID.AlternatePlumage), "Prepare to dispel buff") { } -} +class AlternatePlumage(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.AlternatePlumage), "Prepare to dispel buff"); -class CaberToss : Components.CastHint -{ - public CaberToss() : base(ActionID.MakeSpell(AID.CaberToss), "Interrupt or wipe!") { } -} +class CaberToss(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.CaberToss), "Interrupt or wipe!"); class Hints : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { - hints.Add($"{module.PrimaryActor.Name} will cast Alternate Plumage, which makes him almost\nimmune to damage. Use Eerie Soundwave to dispel it. Caber Toss must be\ninterrupted or you wipe.\nAdditionally Exuviation and earth spells are recommended for act 2."); + hints.Add($"{Module.PrimaryActor.Name} will cast Alternate Plumage, which makes him almost\nimmune to damage. Use Eerie Soundwave to dispel it. Caber Toss must be\ninterrupted or you wipe.\nAdditionally Exuviation and earth spells are recommended for act 2."); } } class Hints2 : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { var armorbuff = module.Enemies(OID.Boss).Where(x => x.FindStatus(SID.VulnerabilityDown) != null).FirstOrDefault(); if (armorbuff != null) - hints.Add($"Dispel {module.PrimaryActor.Name} with Eerie Soundwave!"); + hints.Add($"Dispel {Module.PrimaryActor.Name} with Eerie Soundwave!"); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { var windburn = actor.FindStatus(SID.Windburn); if (windburn != null) diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage26PapaMia/Stage26Act2.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage26PapaMia/Stage26Act2.cs index e098fbc1ab..805ade4322 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage26PapaMia/Stage26Act2.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage26PapaMia/Stage26Act2.cs @@ -29,28 +29,25 @@ public enum IconID : uint BaitKnockback = 23, // player } -class Thunderhead : Components.PersistentVoidzone -{ - public Thunderhead() : base(8, m => m.Enemies(OID.Thunderhead)) { } -} +class Thunderhead(BossModule module) : Components.PersistentVoidzone(module, 8, m => m.Enemies(OID.Thunderhead)); class DadJoke : Components.Knockback { private DateTime _activation; - public override IEnumerable Sources(BossModule module, int slot, Actor actor) + public override IEnumerable Sources(int slot, Actor actor) { if (_activation != default) - yield return new(module.PrimaryActor.Position, 15, _activation, Direction: Angle.FromDirection(actor.Position - module.PrimaryActor.Position), Kind: Kind.DirForward); + yield return new(Module.PrimaryActor.Position, 15, _activation, Direction: Angle.FromDirection(actor.Position - Module.PrimaryActor.Position), Kind: Kind.DirForward); } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.BaitKnockback) - _activation = module.WorldState.CurrentTime.AddSeconds(5); + _activation = WorldState.FutureTime(5); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.DadJoke) _activation = default; @@ -60,51 +57,39 @@ public override bool DestinationUnsafe(BossModule module, int slot, Actor actor, { if (module.FindComponent() != null && module.FindComponent()!.ActiveAOEs(module, slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation))) return true; - if (!module.Bounds.Contains(pos)) + if (!Module.Bounds.Contains(pos)) return true; else return false; } } -class VoidThunderII : Components.LocationTargetedAOEs -{ - public VoidThunderII() : base(ActionID.MakeSpell(AID.VoidThunderII), 4) { } -} +class VoidThunderII(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.VoidThunderII), 4); -class RawInstinct : Components.CastHint -{ - public RawInstinct() : base(ActionID.MakeSpell(AID.RawInstinct), "Prepare to dispel buff") { } -} +class RawInstinct(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.RawInstinct), "Prepare to dispel buff"); -class VoidThunderIII : Components.RaidwideCast -{ - public VoidThunderIII() : base(ActionID.MakeSpell(AID.VoidThunderIII), "Raidwide + Electrocution") { } -} +class VoidThunderIII(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.VoidThunderIII), "Raidwide + Electrocution"); -class BodyBlow : Components.SingleTargetCast -{ - public BodyBlow() : base(ActionID.MakeSpell(AID.BodyBlow), "Soft Tankbuster") { } -} +class BodyBlow(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.BodyBlow), "Soft Tankbuster"); class Hints : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { - hints.Add($"{module.PrimaryActor.Name} will cast Raw Instinct, which causes all his hits to crit.\nUse Eerie Soundwave to dispel it.\n{module.PrimaryActor.Name} is weak against earth and strong against lightning attacks."); + hints.Add($"{Module.PrimaryActor.Name} will cast Raw Instinct, which causes all his hits to crit.\nUse Eerie Soundwave to dispel it.\n{Module.PrimaryActor.Name} is weak against earth and strong against lightning attacks."); } } class Hints2 : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { var critbuff = module.Enemies(OID.Boss).Where(x => x.FindStatus(SID.CriticalStrikes) != null).FirstOrDefault(); if (critbuff != null) - hints.Add($"Dispel {module.PrimaryActor.Name} with Eerie Soundwave!"); + hints.Add($"Dispel {Module.PrimaryActor.Name} with Eerie Soundwave!"); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { var electrocution = actor.FindStatus(SID.Electrocution); if (electrocution != null) diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage27LockUpYourSnorters/Stage27.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage27LockUpYourSnorters/Stage27.cs index a7bb698281..62e67502d4 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage27LockUpYourSnorters/Stage27.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage27LockUpYourSnorters/Stage27.cs @@ -19,10 +19,7 @@ public enum AID : uint MassiveExplosion = 19261, // 2CEC->self, no cast, range 60 circle, wipe, failed to destroy Magitek Explosive in time } -class Fireball : Components.LocationTargetedAOEs -{ - public Fireball() : base(ActionID.MakeSpell(AID.Fireball), 8) { } -} +class Fireball(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Fireball), 8); class Snort : Components.KnockbackFromCastTarget { @@ -44,27 +41,27 @@ public Fungah() StopAtWall = true; } - public override IEnumerable Sources(BossModule module, int slot, Actor actor) + public override IEnumerable Sources(int slot, Actor actor) { if ((_bombs.Count > 0 && _activation != default) || otherpatterns) - yield return new(module.PrimaryActor.Position, 15, _activation, cone, Direction: Angle.FromDirection(actor.Position - module.PrimaryActor.Position)); + yield return new(Module.PrimaryActor.Position, 15, _activation, cone, Direction: Angle.FromDirection(actor.Position - Module.PrimaryActor.Position)); } - public override void OnActorCreated(BossModule module, Actor actor) + public override void OnActorCreated(Actor actor) { if ((OID)actor.OID == OID.Bomb) _bombs.Add(actor); if (_bombs.Count == 8) - _activation = module.WorldState.CurrentTime.AddSeconds(5); + _activation = WorldState.FutureTime(5); if (module.Enemies(OID.MagitekExplosive).FirstOrDefault() != null) if (module.Enemies(OID.MagitekExplosive).FirstOrDefault()!.Position.AlmostEqual(new(96, 94), 3) || module.Enemies(OID.MagitekExplosive).FirstOrDefault()!.Position.AlmostEqual(new(92, 100), 3) || module.Enemies(OID.MagitekExplosive).FirstOrDefault()!.Position.AlmostEqual(new(96, 106), 3) || module.Enemies(OID.MagitekExplosive).FirstOrDefault()!.Position.AlmostEqual(new(108, 100), 3)) { - _activation = module.WorldState.CurrentTime.AddSeconds(5.3f); + _activation = WorldState.FutureTime(5.3f); otherpatterns = true; } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if (_bombs.Count > 0 && (AID)spell.Action.ID == AID.Explosion) _bombs.Clear(); @@ -86,17 +83,17 @@ class Explosion : Components.GenericAOEs private DateTime _activation; private DateTime _snortingeffectends; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_casters.Count > 0 && _snortingeffectends == default) foreach (var c in _casters) yield return new(circle, c.Position, activation: _activation); - if (_casters.Count > 0 && _snortingeffectends > module.WorldState.CurrentTime) + if (_casters.Count > 0 && _snortingeffectends > WorldState.CurrentTime) foreach (var c in _casters) - yield return new(circle, c.Position + Math.Min(15, module.Bounds.IntersectRay(c.Position, (c.Position - module.PrimaryActor.Position).Normalized()) - c.HitboxRadius / 2) * (c.Position - module.PrimaryActor.Position).Normalized(), activation: _activation); + yield return new(circle, c.Position + Math.Min(15, Module.Bounds.IntersectRay(c.Position, (c.Position - Module.PrimaryActor.Position).Normalized()) - c.HitboxRadius / 2) * (c.Position - Module.PrimaryActor.Position).Normalized(), activation: _activation); } - public override void Update(BossModule module) + public override void Update() { if (_bombs.Count > 0) { @@ -104,20 +101,20 @@ public override void Update(BossModule module) if (glowingBomb != null) { _casters = _bombs; - _activation = module.WorldState.CurrentTime.AddSeconds(6); + _activation = WorldState.FutureTime(6); } } - if (_snortingeffectends < module.WorldState.CurrentTime) + if (_snortingeffectends < WorldState.CurrentTime) _snortingeffectends = default; } - public override void OnActorCreated(BossModule module, Actor actor) + public override void OnActorCreated(Actor actor) { if ((OID)actor.OID == OID.Bomb) _bombs.Add(actor); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if (_casters.Count > 0 && _bombs.Count > 0 && (AID)spell.Action.ID == AID.Explosion) { @@ -126,7 +123,7 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.Snort) _snortingeffectends = spell.NPCFinishAt.AddSeconds(2.5f); @@ -135,31 +132,31 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf class Hints : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { - hints.Add($"{module.PrimaryActor.Name} will spawn Bombs and Magitek Explosives throughout the fight.\nUse Snort to push away Bombs from Magitek Explosives and bait Fireballs\naway from the MEs. Meanwhile destroy the MEs asap because they will blow\nup on their own after about 35s. If any ME detonates you will be wiped.\nThe MEs are weak against water abilities and strong against fire attacks."); + hints.Add($"{Module.PrimaryActor.Name} will spawn Bombs and Magitek Explosives throughout the fight.\nUse Snort to push away Bombs from Magitek Explosives and bait Fireballs\naway from the MEs. Meanwhile destroy the MEs asap because they will blow\nup on their own after about 35s. If any ME detonates you will be wiped.\nThe MEs are weak against water abilities and strong against fire attacks."); } } class Hints2 : BossComponent { private DateTime _activation; - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (!module.Enemies(OID.MagitekExplosive).All(e => e.IsDead)) hints.Add($"A {module.Enemies(OID.MagitekExplosive).FirstOrDefault()!.Name} spawned, destroy it asap."); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (module.Enemies(OID.MagitekExplosive).Any(e => e.IsTargetable)) - hints.Add($"Explosion in ca.: {Math.Max(35 - (module.WorldState.CurrentTime - _activation).TotalSeconds, 0.0f):f1}s"); + hints.Add($"Explosion in ca.: {Math.Max(35 - (WorldState.CurrentTime - _activation).TotalSeconds, 0.0f):f1}s"); } - public override void OnActorCreated(BossModule module, Actor actor) + public override void OnActorCreated(Actor actor) { if ((OID)actor.OID == OID.MagitekExplosive) - _activation = module.WorldState.CurrentTime; + _activation = WorldState.CurrentTime; } } diff --git a/BossMod/Modules/Global/PVP/HiddenGorge/GoblinMercenary.cs b/BossMod/Modules/Global/PVP/HiddenGorge/GoblinMercenary.cs index 29c9f0a91b..d94de40090 100644 --- a/BossMod/Modules/Global/PVP/HiddenGorge/GoblinMercenary.cs +++ b/BossMod/Modules/Global/PVP/HiddenGorge/GoblinMercenary.cs @@ -29,17 +29,17 @@ class GobspinSwipe : Components.GenericAOEs { private AOEInstance? _aoe; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => Utils.ZeroOrOne(_aoe); + public override IEnumerable ActiveAOEs(int slot, Actor actor) => Utils.ZeroOrOne(_aoe); - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.GobspinWhooshdropsTelegraph) - _aoe = new(new AOEShapeCircle(8), module.PrimaryActor.Position, activation: spell.NPCFinishAt.AddSeconds(4)); + _aoe = new(new AOEShapeCircle(8), Module.PrimaryActor.Position, activation: spell.NPCFinishAt.AddSeconds(4)); if ((AID)spell.Action.ID == AID.GobswipeConklopsTelegraph) - _aoe = new(new AOEShapeDonut(5, 30), module.PrimaryActor.Position, activation: spell.NPCFinishAt.AddSeconds(4)); + _aoe = new(new AOEShapeDonut(5, 30), Module.PrimaryActor.Position, activation: spell.NPCFinishAt.AddSeconds(4)); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.GobspinWhooshdrops or AID.GobswipeConklops) _aoe = null; @@ -50,17 +50,17 @@ class Knockbacks : Components.Knockback { private Source? _knockback; - public override IEnumerable Sources(BossModule module, int slot, Actor actor) => Utils.ZeroOrOne(_knockback); + public override IEnumerable Sources(int slot, Actor actor) => Utils.ZeroOrOne(_knockback); - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.GobspinWhooshdropsTelegraph) - _knockback = new(module.PrimaryActor.Position, 15, spell.NPCFinishAt.AddSeconds(4), new AOEShapeCircle(8)); + _knockback = new(Module.PrimaryActor.Position, 15, spell.NPCFinishAt.AddSeconds(4), new AOEShapeCircle(8)); if ((AID)spell.Action.ID == AID.GobswipeConklopsTelegraph) - _knockback = new(module.PrimaryActor.Position, 15, spell.NPCFinishAt.AddSeconds(4), new AOEShapeDonut(5, 30)); + _knockback = new(Module.PrimaryActor.Position, 15, spell.NPCFinishAt.AddSeconds(4), new AOEShapeDonut(5, 30)); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.GobspinWhooshdrops or AID.GobswipeConklops) _knockback = null; @@ -75,7 +75,7 @@ class GobfireShootypops : Components.GenericRotatingAOE private static readonly AOEShapeRect _shape = new AOEShapeRect(32, 3); - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { var increment = (IconID)iconID switch { @@ -90,7 +90,7 @@ public override void OnEventIcon(BossModule module, Actor actor, uint iconID) } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.GobfireShootypopsStart) { @@ -101,10 +101,10 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf InitIfReady(module, caster); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.GobfireShootypopsStart or AID.GobfireShootypops) - AdvanceSequence(0, module.WorldState.CurrentTime); + AdvanceSequence(0, WorldState.CurrentTime); } private void InitIfReady(BossModule module, Actor source) @@ -118,10 +118,7 @@ private void InitIfReady(BossModule module, Actor source) } } -class IronKiss : Components.LocationTargetedAOEs -{ - public IronKiss() : base(ActionID.MakeSpell(AID.IronKiss), 7) { } -} +class IronKiss(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.IronKiss), 7); class GoblinMercenaryStates : StateMachineBuilder { @@ -132,7 +129,7 @@ public GoblinMercenaryStates(BossModule module) : base(module) .ActivateOnEnter() .ActivateOnEnter() .ActivateOnEnter() - .Raw.Update = () => module.PrimaryActor.IsDead || !module.PrimaryActor.IsTargetable; + .Raw.Update = () => Module.PrimaryActor.IsDead || !Module.PrimaryActor.IsTargetable; } } diff --git a/BossMod/Modules/Global/Quest/FF15Collab/Garuda.cs b/BossMod/Modules/Global/Quest/FF15Collab/Garuda.cs index 65feef4d17..303898df11 100644 --- a/BossMod/Modules/Global/Quest/FF15Collab/Garuda.cs +++ b/BossMod/Modules/Global/Quest/FF15Collab/Garuda.cs @@ -36,7 +36,7 @@ class GustFront : Components.UniformStackSpread { public GustFront() : base(1.2f, 0) { } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.GustFront) AddStack(module.Enemies(OID.Noctis).FirstOrDefault()!); @@ -51,30 +51,30 @@ class Microburst : Components.SelfTargetedAOEs public Microburst() : base(ActionID.MakeSpell(AID.Microburst), new AOEShapeCircle(18)) { } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { base.OnCastStarted(module, caster, spell); if ((AID)spell.Action.ID == AID.Microburst) casting = true; } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { base.OnCastFinished(module, caster, spell); if ((AID)spell.Action.ID == AID.Microburst) casting = false; } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (casting) hints.Add($"Keep using duty action on the {module.Enemies(OID.Monolith).FirstOrDefault()!.Name}s to stay out of the AOE!"); } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { base.AddAIHints(module, slot, actor, assignment, hints); - if (casting && actor.Position.AlmostEqual(module.PrimaryActor.Position, 15)) + if (casting && actor.Position.AlmostEqual(Module.PrimaryActor.Position, 15)) hints.PlannedActions.Add((ActionID.MakeSpell(AID.warpstrike), module.Enemies(OID.Monolith).FirstOrDefault()!, 1, false)); } } @@ -86,91 +86,85 @@ class MistralShriek : Components.SelfTargetedAOEs public MistralShriek() : base(ActionID.MakeSpell(AID.MistralShriek), new AOEShapeCircle(30)) { } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { base.OnCastStarted(module, caster, spell); if ((AID)spell.Action.ID == AID.MistralShriek) casting = true; } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { base.OnCastFinished(module, caster, spell); if ((AID)spell.Action.ID == AID.MistralShriek) casting = false; - done = module.WorldState.CurrentTime; + done = WorldState.CurrentTime; } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (casting) hints.Add($"Use duty action to teleport to the {module.Enemies(OID.Monolith).FirstOrDefault()!.Name} at the opposite side of Garuda!"); } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { base.AddAIHints(module, slot, actor, assignment, hints); if (casting) - hints.PlannedActions.Add((ActionID.MakeSpell(AID.warpstrike), module.Enemies(OID.Monolith).Where(p => !p.Position.AlmostEqual(module.PrimaryActor.Position, 5)).FirstOrDefault()!, 1, false)); - if (module.WorldState.CurrentTime > done && module.WorldState.CurrentTime < done.AddSeconds(2)) - hints.PlannedActions.Add((ActionID.MakeSpell(AID.warpstrike), module.PrimaryActor, 1, false)); + hints.PlannedActions.Add((ActionID.MakeSpell(AID.warpstrike), module.Enemies(OID.Monolith).Where(p => !p.Position.AlmostEqual(Module.PrimaryActor.Position, 5)).FirstOrDefault()!, 1, false)); + if (WorldState.CurrentTime > done && WorldState.CurrentTime < done.AddSeconds(2)) + hints.PlannedActions.Add((ActionID.MakeSpell(AID.warpstrike), Module.PrimaryActor, 1, false)); } } -class MistralSong : Components.SelfTargetedAOEs -{ - public MistralSong() : base(ActionID.MakeSpell(AID.MistralSong), new AOEShapeCone(20, 75.Degrees())) { } -} +class MistralSong(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.MistralSong), new AOEShapeCone(20, 75.Degrees())); -class WickedTornado : Components.SelfTargetedAOEs -{ - public WickedTornado() : base(ActionID.MakeSpell(AID.WickedTornado), new AOEShapeDonut(8, 20)) { } -} +class WickedTornado(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.WickedTornado), new AOEShapeDonut(8, 20)); // TODO: create and use generic 'line stack' component class MiniSupercell : Components.GenericBaitAway { private Actor? target; - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.MiniSupercell) { - target = module.WorldState.Actors.Find(spell.MainTargetID); - CurrentBaits.Add(new(module.PrimaryActor, target!, new AOEShapeRect(45, 3))); + target = WorldState.Actors.Find(spell.MainTargetID); + CurrentBaits.Add(new(Module.PrimaryActor, target!, new AOEShapeRect(45, 3))); } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.MiniSupercell2) CurrentBaits.Clear(); } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { if (CurrentBaits.Count > 0 && actor != target) - hints.AddForbiddenZone(ShapeDistance.InvertedRect(module.PrimaryActor.Position, (target!.Position - module.PrimaryActor.Position).Normalized(), 45, 0, 3)); + hints.AddForbiddenZone(ShapeDistance.InvertedRect(Module.PrimaryActor.Position, (target!.Position - Module.PrimaryActor.Position).Normalized(), 45, 0, 3)); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (CurrentBaits.Count > 0) { - if (!actor.Position.InRect(module.PrimaryActor.Position, (target!.Position - module.PrimaryActor.Position).Normalized(), 45, 0, 3)) + if (!actor.Position.InRect(Module.PrimaryActor.Position, (target!.Position - Module.PrimaryActor.Position).Normalized(), 45, 0, 3)) hints.Add("Stack!"); else hints.Add("Stack!", false); } } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { foreach (var bait in CurrentBaits) bait.Shape.Draw(arena, BaitOrigin(bait), bait.Rotation, ArenaColor.SafeFromAOE); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) { } + public override void DrawArenaForeground(int pcSlot, Actor pc) { } } class MiniSupercellKB : Components.KnockbackFromCastTarget @@ -181,15 +175,9 @@ class MiniSupercellKB : Components.KnockbackFromCastTarget } } -class GravitationalForce : Components.PersistentVoidzoneAtCastTarget -{ - public GravitationalForce() : base(5, ActionID.MakeSpell(AID.GravitationalForce2), m => m.Enemies(OID.GravityVoidzone), 0) { } -} +class GravitationalForce(BossModule module) : Components.PersistentVoidzoneAtCastTarget(module, 5, ActionID.MakeSpell(AID.GravitationalForce2), m => m.Enemies(OID.GravityVoidzone), 0); -class MistralGaol : Components.CastHint -{ - public MistralGaol() : base(ActionID.MakeSpell(AID.MistralGaol), "Prepare for Quick Time Event (spam buttons when it starts)") { } -} +class MistralGaol(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.MistralGaol), "Prepare for Quick Time Event (spam buttons when it starts)"); class GarudaStates : StateMachineBuilder { diff --git a/BossMod/Modules/Global/Quest/FF15Collab/Iseultalon.cs b/BossMod/Modules/Global/Quest/FF15Collab/Iseultalon.cs index fd6a9411ed..bae4bda4d4 100644 --- a/BossMod/Modules/Global/Quest/FF15Collab/Iseultalon.cs +++ b/BossMod/Modules/Global/Quest/FF15Collab/Iseultalon.cs @@ -37,12 +37,12 @@ public enum IconID : uint class Thunderbolt : Components.UniformStackSpread { public Thunderbolt() : base(0, 5, alwaysShowSpreads: true) { } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.spread) AddSpread(actor); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.Thunderbolt2) Spreads.Clear(); @@ -51,18 +51,18 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent class Electrocution : Components.GenericTowers { //Noctis always goes to soak this tower, except on first cast as a tutorial - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.Electrocution) { if (NumCasts > 0) - Towers.Add(new(DeterminePosition(module, caster, spell), 3, forbiddenSoakers: module.Raid.WithSlot(true).WhereActor(p => p.InstanceID == module.Raid.Player()!.InstanceID).Mask())); + Towers.Add(new(DeterminePosition(module, caster, spell), 3, forbiddenSoakers: Raid.WithSlot(true).WhereActor(p => p.InstanceID == Raid.Player()!.InstanceID).Mask())); if (NumCasts == 0) Towers.Add(new(DeterminePosition(module, caster, spell), 3)); } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.Electrocution or AID.FatalCurrent) { @@ -71,9 +71,9 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn } } - private WPos DeterminePosition(BossModule module, Actor caster, ActorCastInfo spell) => spell.TargetID == caster.InstanceID ? caster.Position : module.WorldState.Actors.Find(spell.TargetID)?.Position ?? spell.LocXZ; + private WPos DeterminePosition(BossModule module, Actor caster, ActorCastInfo spell) => spell.TargetID == caster.InstanceID ? caster.Position : WorldState.Actors.Find(spell.TargetID)?.Position ?? spell.LocXZ; - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { if (Towers.Count > 0 && NumCasts == 0) // Noctis ignores the first tower as a tutorial hints.AddForbiddenZone(ShapeDistance.InvertedCircle(Towers[0].Position, 3)); @@ -83,17 +83,14 @@ public override void AddAIHints(BossModule module, int slot, Actor actor, PartyR class Electrocution2 : Components.CastTowers { public Electrocution2() : base(ActionID.MakeSpell(AID.Electrocution2), 3) { } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { if (Towers.Count > 0) hints.AddForbiddenZone(ShapeDistance.InvertedCircle(Towers[0].Position, 3)); } } -class Stomp : Components.RaidwideCast -{ - public Stomp() : base(ActionID.MakeSpell(AID.Stomp)) { } -} +class Stomp(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.Stomp)); class DeathRay : Components.SelfTargetedAOEs { @@ -103,39 +100,33 @@ class DeathRay : Components.SelfTargetedAOEs } } -class TailWhip : Components.SelfTargetedAOEs -{ - public TailWhip() : base(ActionID.MakeSpell(AID.TailWhip), new AOEShapeCone(12, 135.Degrees())) { } -} +class TailWhip(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TailWhip), new AOEShapeCone(12, 135.Degrees())); class DeathRay2 : Components.GenericAOEs { private static readonly AOEShapeRect rect = new(40, 11); private DateTime _activation; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_activation != default) - yield return new(rect, module.PrimaryActor.Position, module.PrimaryActor.Rotation, _activation); + yield return new(rect, Module.PrimaryActor.Position, Module.PrimaryActor.Rotation, _activation); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.DeathRay) - _activation = module.WorldState.CurrentTime.AddSeconds(6.1f); + _activation = WorldState.FutureTime(6.1f); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.DeathRay3) _activation = default; } } -class NeedleShot : Components.StackWithCastTargets -{ - public NeedleShot() : base(ActionID.MakeSpell(AID.NeedleShot), 5) { } -} +class NeedleShot(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.NeedleShot), 5); class IseultalonStates : StateMachineBuilder { diff --git a/BossMod/Modules/Global/Quest/FF15Collab/MA-x.cs b/BossMod/Modules/Global/Quest/FF15Collab/MA-x.cs index fb0d2f3bd1..8c055683a1 100644 --- a/BossMod/Modules/Global/Quest/FF15Collab/MA-x.cs +++ b/BossMod/Modules/Global/Quest/FF15Collab/MA-x.cs @@ -20,20 +20,11 @@ public enum AID : uint unknown2 = 14533, // Boss->self, no cast, single-target } -class Chainsaw : Components.SelfTargetedAOEs -{ - public Chainsaw() : base(ActionID.MakeSpell(AID.Chainsaw), new AOEShapeCone(10, 45.Degrees())) { } -} +class Chainsaw(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Chainsaw), new AOEShapeCone(10, 45.Degrees())); -class Shock : Components.SelfTargetedAOEs -{ - public Shock() : base(ActionID.MakeSpell(AID.Shock), new AOEShapeCircle(10)) { } -} +class Shock(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Shock), new AOEShapeCircle(10)); -class MagitekMissile : Components.LocationTargetedAOEs -{ - public MagitekMissile() : base(ActionID.MakeSpell(AID.MagitekMissile2), 5) { } -} +class MagitekMissile(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.MagitekMissile2), 5); class MAxStates : StateMachineBuilder { diff --git a/BossMod/Modules/Global/Quest/FF16Collab/InfernalShadow.cs b/BossMod/Modules/Global/Quest/FF16Collab/InfernalShadow.cs index 86cff28530..69f5419d19 100644 --- a/BossMod/Modules/Global/Quest/FF16Collab/InfernalShadow.cs +++ b/BossMod/Modules/Global/Quest/FF16Collab/InfernalShadow.cs @@ -1,19 +1,10 @@ namespace BossMod.Global.Quest.FF16Collab.InfernalShadow; -class VulcanBurst : Components.RaidwideCast -{ - public VulcanBurst() : base(ActionID.MakeSpell(AID.VulcanBurstReal), "Time your dodge correctly") { } -} +class VulcanBurst(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.VulcanBurstReal), "Time your dodge correctly"); -class Hellfire : Components.RaidwideCastDelay -{ - public Hellfire() : base(ActionID.MakeSpell(AID.HellfireVisual), ActionID.MakeSpell(AID.HellfireRaidwide), 0.6f) { } -} +class Hellfire(BossModule module) : Components.RaidwideCastDelay(module, ActionID.MakeSpell(AID.HellfireVisual), ActionID.MakeSpell(AID.HellfireRaidwide), 0.6f); -class Incinerate : Components.SpreadFromCastTargets -{ - public Incinerate() : base(ActionID.MakeSpell(AID.IncinerateReal), 5) { } -} +class Incinerate(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.IncinerateReal), 5); class SpreadingFire : Components.ConcentricAOEs { @@ -21,13 +12,13 @@ class SpreadingFire : Components.ConcentricAOEs public SpreadingFire() : base(_shapes) { } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.SpreadingFire1st) AddSequence(caster.Position, spell.NPCFinishAt); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if (Sequences.Count > 0) { @@ -39,20 +30,14 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent AID.SpreadingFire4th => 3, _ => -1 }; - AdvanceSequence(order, caster.Position, module.WorldState.CurrentTime.AddSeconds(2)); + AdvanceSequence(order, caster.Position, WorldState.FutureTime(2)); } } } -class SmolderingClaw : Components.SelfTargetedAOEs -{ - public SmolderingClaw() : base(ActionID.MakeSpell(AID.SmolderingClawReal), new AOEShapeCone(40, 75.Degrees())) { } -} +class SmolderingClaw(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.SmolderingClawReal), new AOEShapeCone(40, 75.Degrees())); -class TailStrike : Components.SelfTargetedAOEs -{ - public TailStrike() : base(ActionID.MakeSpell(AID.TailStrikeReal), new AOEShapeCone(40, 75.Degrees())) { } -} +class TailStrike(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TailStrikeReal), new AOEShapeCone(40, 75.Degrees())); class FireRampageCleave : Components.GenericAOEs { @@ -60,13 +45,13 @@ class FireRampageCleave : Components.GenericAOEs private readonly List<(WPos position, Angle rotation, DateTime activation, uint AID)> _castersunsorted = []; private List<(WPos position, Angle rotation, DateTime activation)> _casters = []; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_casters.Count > 0) yield return new(cone, _casters[0].position, _casters[0].rotation, _casters[0].activation); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.FieryRampageCleaveReal or AID.FieryRampageCleaveReal2) { @@ -76,7 +61,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if (_casters.Count > 0 && (AID)spell.Action.ID is AID.FieryRampageCleaveReal or AID.FieryRampageCleaveReal2) { @@ -86,36 +71,21 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn } } -class FieryRampageCircle : Components.SelfTargetedAOEs -{ - public FieryRampageCircle() : base(ActionID.MakeSpell(AID.FieryRampageCircleReal), new AOEShapeCircle(16)) { } -} +class FieryRampageCircle(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.FieryRampageCircleReal), new AOEShapeCircle(16)); -class FieryRampageRaidwide : Components.RaidwideCast -{ - public FieryRampageRaidwide() : base(ActionID.MakeSpell(AID.FieryRampageRaidwideReal), "Time your dodge correctly") { } -} +class FieryRampageRaidwide(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.FieryRampageRaidwideReal), "Time your dodge correctly"); -class PyrosaultReal : Components.SelfTargetedAOEs -{ - public PyrosaultReal() : base(ActionID.MakeSpell(AID.PyrosaultReal), new AOEShapeCircle(10)) { } -} +class PyrosaultReal(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PyrosaultReal), new AOEShapeCircle(10)); -class Fireball : Components.LocationTargetedAOEs -{ - public Fireball() : base(ActionID.MakeSpell(AID.FireballReal), 6) { } -} +class Fireball(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.FireballReal), 6); -class CrimsonRush : Components.ChargeAOEs -{ - public CrimsonRush() : base(ActionID.MakeSpell(AID.CrimsonRushReal), 10) { } -} +class CrimsonRush(BossModule module) : Components.ChargeAOEs(module, ActionID.MakeSpell(AID.CrimsonRushReal), 10); class CrimsonStreak : Components.GenericAOEs { private readonly List<(WPos source, AOEShape shape, Angle direction, DateTime activation)> _casters = []; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_casters.Count > 0) yield return new(_casters[0].shape, _casters[0].source, _casters[0].direction, _casters[0].activation, ArenaColor.Danger); @@ -123,7 +93,7 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, yield return new(_casters[1].shape, _casters[1].source, _casters[1].direction, _casters[1].activation); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.CrimsonStreakReal) { @@ -132,17 +102,14 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if (_casters.Count > 0 && (AID)spell.Action.ID == AID.CrimsonStreakReal) _casters.RemoveAt(0); } } -class Eruption : Components.LocationTargetedAOEs -{ - public Eruption() : base(ActionID.MakeSpell(AID.EruptionReal), 8) { } -} +class Eruption(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.EruptionReal), 8); class Eruption2 : Components.GenericAOEs { @@ -150,7 +117,7 @@ class Eruption2 : Components.GenericAOEs private List<(WPos position, DateTime activation)> _casters = []; private static readonly AOEShapeCircle circle = new(8); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (NumCasts < 10) { @@ -172,7 +139,7 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.EruptionReal2 or AID.EruptionReal3 or AID.EruptionReal4) { @@ -181,7 +148,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if (_casters.Count > 0 && (AID)spell.Action.ID is AID.EruptionReal2 or AID.EruptionReal3 or AID.EruptionReal4) { @@ -196,20 +163,20 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn class BurningStrike : BossComponent { private bool casting; - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.BurningStrikeVisual) casting = true; } - public override void Update(BossModule module) + public override void Update() { var defendtargetable = module.Enemies(OID.DefendClive).Where(x => x.IsTargetable).FirstOrDefault(); if (defendtargetable != null && casting) casting = false; } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { var defendtargetable = module.Enemies(OID.DefendClive).Where(x => x.IsTargetable).FirstOrDefault(); if (casting && defendtargetable == null) @@ -218,7 +185,7 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint hints.Add($"Interact with {module.Enemies(OID.DefendClive).FirstOrDefault()!.Name} and solve a QTE!"); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { var defendtargetable = module.Enemies(OID.DefendClive).Where(x => x.IsTargetable).FirstOrDefault(); if (defendtargetable != null) @@ -231,7 +198,7 @@ class SearingStomp : BossComponent private int NumCasts; private bool casting; - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.InfernalShroud) { @@ -241,13 +208,13 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.InfernalHowlReal) casting = false; } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (casting) hints.Add("Prepare to solve a QTE!"); diff --git a/BossMod/Modules/Global/Quest/FF16Collab/InfernalShadowStates.cs b/BossMod/Modules/Global/Quest/FF16Collab/InfernalShadowStates.cs index 89b5e8d0ea..1dd6373d04 100644 --- a/BossMod/Modules/Global/Quest/FF16Collab/InfernalShadowStates.cs +++ b/BossMod/Modules/Global/Quest/FF16Collab/InfernalShadowStates.cs @@ -21,6 +21,6 @@ public InfernalShadowStates(BossModule module) : base(module) .ActivateOnEnter() .ActivateOnEnter() .ActivateOnEnter() - .Raw.Update = () => module.PrimaryActor.HP.Cur == 1; + .Raw.Update = () => Module.PrimaryActor.HP.Cur == 1; } } diff --git a/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/D60TheBlackRider.cs b/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/D60TheBlackRider.cs index d53520a8a2..80cbd5e7b9 100644 --- a/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/D60TheBlackRider.cs +++ b/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/D60TheBlackRider.cs @@ -17,10 +17,7 @@ public enum AID : uint Valfodr = 7089, // Boss->player, 4.0s cast, width 6 rect charge, knockback 25, dir forward } -class CleaveAuto : Components.Cleave -{ - public CleaveAuto() : base(ActionID.MakeSpell(AID.AutoAttack), new AOEShapeCone(11.92f, 45.Degrees())) { } -} +class CleaveAuto(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.AutoAttack), new AOEShapeCone(11.92f, 45.Degrees())); class Geirrothr : Components.GenericAOEs { @@ -28,28 +25,28 @@ class Geirrothr : Components.GenericAOEs private static readonly AOEShapeCone cone = new(9.92f, 45.Degrees()); private bool Pulled; - public override void Update(BossModule module) + public override void Update() { if (!Pulled) { - _activation = module.WorldState.CurrentTime.AddSeconds(5.1f); + _activation = WorldState.FutureTime(5.1f); Pulled = true; } } - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_activation != default) - yield return new(cone, module.PrimaryActor.Position, module.PrimaryActor.Rotation, _activation); + yield return new(cone, Module.PrimaryActor.Position, Module.PrimaryActor.Rotation, _activation); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.Valfodr) // boss can move after cast started, so we can't use aoe instance, since that would cause outdated position data to be used - _activation = module.WorldState.CurrentTime.AddSeconds(7.1f); + _activation = WorldState.FutureTime(7.1f); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.Geirrothr) _activation = default; @@ -57,37 +54,28 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent { ++NumCasts; if (NumCasts % 2 == 0) - _activation = module.WorldState.CurrentTime.AddSeconds(8.1f); + _activation = WorldState.FutureTime(8.1f); } } } -class Infaturation : Components.SelfTargetedAOEs -{ - public Infaturation() : base(ActionID.MakeSpell(AID.Infaturation), new AOEShapeCircle(7)) { } -} +class Infaturation(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Infaturation), new AOEShapeCircle(7)); -class HallOfSorrow : Components.PersistentVoidzone -{ - public HallOfSorrow() : base(9, m => m.Enemies(OID.Voidzone).Where(z => z.EventState != 7)) { } -} +class HallOfSorrow(BossModule module) : Components.PersistentVoidzone(module, 9, m => m.Enemies(OID.Voidzone).Where(z => z.EventState != 7)); -class Valfodr : Components.BaitAwayChargeCast -{ - public Valfodr() : base(ActionID.MakeSpell(AID.Valfodr), 3) { } -} +class Valfodr(BossModule module) : Components.BaitAwayChargeCast(module, ActionID.MakeSpell(AID.Valfodr), 3); class ValfodrKB : Components.Knockback //note actual knockback is delayed by upto 1.2s in replay { private DateTime _activation; - public override IEnumerable Sources(BossModule module, int slot, Actor actor) + public override IEnumerable Sources(int slot, Actor actor) { if (module.FindComponent()?.CurrentBaits.Count > 0) - yield return new(module.PrimaryActor.Position, 25, _activation, module.FindComponent()!.CurrentBaits[0].Shape, Angle.FromDirection(module.FindComponent()!.CurrentBaits[0].Target.Position - module.PrimaryActor.Position), Kind: Kind.DirForward); + yield return new(Module.PrimaryActor.Position, 25, _activation, module.FindComponent()!.CurrentBaits[0].Shape, Angle.FromDirection(module.FindComponent()!.CurrentBaits[0].Target.Position - Module.PrimaryActor.Position), Kind: Kind.DirForward); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.Valfodr) { @@ -114,7 +102,4 @@ public D60TheBlackRiderStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "legendoficeman, Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 204, NameID = 5309)] -public class D60TheBlackRider : BossModule -{ - public D60TheBlackRider(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(-300, -220), 25)) { } -} +public class D60TheBlackRider(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(-300, -220), 25)); diff --git a/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/D70Yaquaru.cs b/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/D70Yaquaru.cs index 12ceeab425..90e9288624 100644 --- a/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/D70Yaquaru.cs +++ b/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/D70Yaquaru.cs @@ -16,27 +16,24 @@ public enum AID : uint FangsEnd = 7092, // Boss->player, no cast, single-target } -class Douse : Components.PersistentVoidzoneAtCastTarget -{ - public Douse() : base(8, ActionID.MakeSpell(AID.Douse), m => m.Enemies(OID.Voidzone).Where(z => z.EventState != 7), 0.8f) { } -} +class Douse(BossModule module) : Components.PersistentVoidzoneAtCastTarget(module, 8, ActionID.MakeSpell(AID.Douse), m => m.Enemies(OID.Voidzone).Where(z => z.EventState != 7), 0.8f); class DouseHaste : BossComponent { private bool BossInVoidzone; - public override void Update(BossModule module) + public override void Update() { - if (module.FindComponent()?.ActiveAOEs(module, 0, module.PrimaryActor).Any(z => z.Shape.Check(module.PrimaryActor.Position, z.Origin, z.Rotation)) ?? false) + if (module.FindComponent()?.ActiveAOEs(module, 0, Module.PrimaryActor).Any(z => z.Shape.Check(Module.PrimaryActor.Position, z.Origin, z.Rotation)) ?? false) BossInVoidzone = true; else BossInVoidzone = false; } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { - if (BossInVoidzone && module.PrimaryActor.TargetID == actor.InstanceID) + if (BossInVoidzone && Module.PrimaryActor.TargetID == actor.InstanceID) hints.Add("Pull the boss out of the water puddle!"); - if (BossInVoidzone && module.PrimaryActor.TargetID != actor.InstanceID && actor.Role == Role.Tank) + if (BossInVoidzone && Module.PrimaryActor.TargetID != actor.InstanceID && actor.Role == Role.Tank) hints.Add("Consider provoking and pulling the boss out of the water puddle."); } } @@ -47,44 +44,41 @@ class Drench : Components.GenericAOEs private static readonly AOEShapeCone cone = new(15.75f, 45.Degrees()); private bool Pulled; - public override void Update(BossModule module) + public override void Update() { if (!Pulled) { - _activation = module.WorldState.CurrentTime.AddSeconds(5.1f); + _activation = WorldState.FutureTime(5.1f); Pulled = true; } } - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_activation != default) - yield return new(cone, module.PrimaryActor.Position, module.PrimaryActor.Rotation, _activation); + yield return new(cone, Module.PrimaryActor.Position, Module.PrimaryActor.Rotation, _activation); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.Electrogenesis) // boss can move after cast started, so we can't use aoe instance, since that would cause outdated position data to be used { ++NumCasts; if (NumCasts % 2 == 0) - _activation = module.WorldState.CurrentTime.AddSeconds(7.3f); + _activation = WorldState.FutureTime(7.3f); } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.Drench) _activation = default; if ((AID)spell.Action.ID == AID.FangsEnd) - _activation = module.WorldState.CurrentTime.AddSeconds(7.1f); + _activation = WorldState.FutureTime(7.1f); } } -class Electrogenesis : Components.LocationTargetedAOEs -{ - public Electrogenesis() : base(ActionID.MakeSpell(AID.Electrogenesis), 8, "Get out of the AOE") { } -} +class Electrogenesis(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Electrogenesis), 8, "Get out of the AOE"); class D70TaquaruStates : StateMachineBuilder { @@ -99,7 +93,4 @@ public D70TaquaruStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "legendoficeman, Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 205, NameID = 5321)] -public class D70Taquaru : BossModule -{ - public D70Taquaru(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(-300, -220), 25)) { } -} +public class D70Taquaru(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(-300, -220), 25)); diff --git a/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/D80Gudanna.cs b/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/D80Gudanna.cs index 2ccde91a4d..d0dd08233b 100644 --- a/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/D80Gudanna.cs +++ b/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/D80Gudanna.cs @@ -18,36 +18,21 @@ public enum AID : uint Trounce = 7098, // Boss->self, 2.5s cast, range 40+R 60-degree cone } -class Charybdis : Components.LocationTargetedAOEs -{ - public Charybdis() : base(ActionID.MakeSpell(AID.Charybdis), 6) { } -} +class Charybdis(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Charybdis), 6); -class Maelstrom : Components.PersistentVoidzone -{ - public Maelstrom() : base(10, m => m.Enemies(OID.Tornado)) { } -} +class Maelstrom(BossModule module) : Components.PersistentVoidzone(module, 10, m => m.Enemies(OID.Tornado)); -class Trounce : Components.SelfTargetedAOEs -{ - public Trounce() : base(ActionID.MakeSpell(AID.Trounce), new AOEShapeCone(51.6f, 30.Degrees())) { } -} +class Trounce(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Trounce), new AOEShapeCone(51.6f, 30.Degrees())); -class EclipticMeteor : Components.RaidwideCast -{ - public EclipticMeteor() : base(ActionID.MakeSpell(AID.EclipticMeteor), "Kill him before he kills you! 80% max HP damage incoming!") { } -} +class EclipticMeteor(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.EclipticMeteor), "Kill him before he kills you! 80% max HP damage incoming!"); -class Thunderbolt : Components.SelfTargetedAOEs -{ - public Thunderbolt() : base(ActionID.MakeSpell(AID.Thunderbolt), new AOEShapeCone(16.6f, 60.Degrees())) { } -} +class Thunderbolt(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Thunderbolt), new AOEShapeCone(16.6f, 60.Degrees())); class Hints : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { - hints.Add($"{module.PrimaryActor.Name} will use Ecliptic Meteor.\nYou must either kill him before he cast it multiple times, or heal through it."); + hints.Add($"{Module.PrimaryActor.Name} will use Ecliptic Meteor.\nYou must either kill him before he cast it multiple times, or heal through it."); } } diff --git a/BossMod/Modules/RealmReborn/Dungeon/D01Sastasha/D010Switch.cs b/BossMod/Modules/RealmReborn/Dungeon/D01Sastasha/D010Switch.cs index b4756c1566..412ec0bd00 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D01Sastasha/D010Switch.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D01Sastasha/D010Switch.cs @@ -11,11 +11,11 @@ class SwitchHint : BossComponent { private string _hint = ""; - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (_hint.Length == 0) { - var a = module.WorldState.Actors.FirstOrDefault(a => a.IsTargetable && (OID)a.OID is OID.Blue or OID.Red or OID.Green); + var a = WorldState.Actors.FirstOrDefault(a => a.IsTargetable && (OID)a.OID is OID.Blue or OID.Red or OID.Green); if (a != null) _hint = ((OID)a.OID).ToString(); } diff --git a/BossMod/Modules/RealmReborn/Dungeon/D03Copperbell/D031Kottos.cs b/BossMod/Modules/RealmReborn/Dungeon/D03Copperbell/D031Kottos.cs index 97283f9033..b9dc7d4536 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D03Copperbell/D031Kottos.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D03Copperbell/D031Kottos.cs @@ -17,25 +17,13 @@ public enum AID : uint Catapult = 28547, // Boss->player, 5.0s cast, single target damage at random target } -class GrandSlam : Components.SingleTargetCast -{ - public GrandSlam() : base(ActionID.MakeSpell(AID.GrandSlam)) { } -} +class GrandSlam(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.GrandSlam)); -class LumberingLeap : Components.SelfTargetedAOEs -{ - public LumberingLeap() : base(ActionID.MakeSpell(AID.LumberingLeapAOE), new AOEShapeCircle(12)) { } -} +class LumberingLeap(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.LumberingLeapAOE), new AOEShapeCircle(12)); -class ColossalSlam : Components.SelfTargetedLegacyRotationAOEs -{ - public ColossalSlam() : base(ActionID.MakeSpell(AID.ColossalSlam), new AOEShapeCone(30, 30.Degrees())) { } -} +class ColossalSlam(BossModule module) : Components.SelfTargetedLegacyRotationAOEs(module, ActionID.MakeSpell(AID.ColossalSlam), new AOEShapeCone(30, 30.Degrees())); -class Catapult : Components.SingleTargetCast -{ - public Catapult() : base(ActionID.MakeSpell(AID.Catapult), "Single-target damage") { } -} +class Catapult(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.Catapult), "Single-target damage"); class D031KottosStates : StateMachineBuilder { @@ -50,7 +38,4 @@ public D031KottosStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 3, NameID = 548)] -public class D031Kottos : BossModule -{ - public D031Kottos(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(43, -89.56f), 15)) { } -} +public class D031Kottos(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(43, -89.56f), 15)); diff --git a/BossMod/Modules/RealmReborn/Dungeon/D03Copperbell/D032IchorousIre.cs b/BossMod/Modules/RealmReborn/Dungeon/D03Copperbell/D032IchorousIre.cs index cc00fbb539..97dfd6b377 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D03Copperbell/D032IchorousIre.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D03Copperbell/D032IchorousIre.cs @@ -16,20 +16,11 @@ public enum AID : uint Burst = 28465, // IchorousDrip->self, 6.0s cast, range 8 aoe } -class Syrup : Components.LocationTargetedAOEs -{ - public Syrup() : base(ActionID.MakeSpell(AID.Syrup), 4) { } -} +class Syrup(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Syrup), 4); -class FluidSpread : Components.SingleTargetCast -{ - public FluidSpread() : base(ActionID.MakeSpell(AID.FluidSpread)) { } -} +class FluidSpread(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.FluidSpread)); -class Divide : Components.SelfTargetedAOEs -{ - public Divide() : base(ActionID.MakeSpell(AID.Burst), new AOEShapeCircle(8)) { } -} +class Divide(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Burst), new AOEShapeCircle(8)); class D032IchorousIreStates : StateMachineBuilder { @@ -43,7 +34,4 @@ public D032IchorousIreStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 3, NameID = 554)] -public class D032IchorousIre : BossModule -{ - public D032IchorousIre(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(26.97f, 113.97f), 20)) { } -} +public class D032IchorousIre(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(26.97f, 113.97f), 20)); diff --git a/BossMod/Modules/RealmReborn/Dungeon/D03Copperbell/D033Gyges.cs b/BossMod/Modules/RealmReborn/Dungeon/D03Copperbell/D033Gyges.cs index 267cd8195f..8630a6574c 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D03Copperbell/D033Gyges.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D03Copperbell/D033Gyges.cs @@ -16,30 +16,15 @@ public enum AID : uint ColossalSlam = 28763, // Boss->self, 4.0s cast, range 40 60-degree cone aoe } -class GiganticSwing : Components.SelfTargetedAOEs -{ - public GiganticSwing() : base(ActionID.MakeSpell(AID.GiganticSwing), new AOEShapeDonut(4, 40)) { } -} +class GiganticSwing(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.GiganticSwing), new AOEShapeDonut(4, 40)); -class GiganticSmash : Components.LocationTargetedAOEs -{ - public GiganticSmash() : base(ActionID.MakeSpell(AID.GiganticSmash), 10) { } -} +class GiganticSmash(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.GiganticSmash), 10); -class GiganticBlast : Components.SelfTargetedAOEs -{ - public GiganticBlast() : base(ActionID.MakeSpell(AID.GiganticBlast), new AOEShapeCircle(8)) { } -} +class GiganticBlast(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.GiganticBlast), new AOEShapeCircle(8)); -class GrandSlam : Components.SingleTargetCast -{ - public GrandSlam() : base(ActionID.MakeSpell(AID.GrandSlam)) { } -} +class GrandSlam(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.GrandSlam)); -class ColossalSlam : Components.SelfTargetedLegacyRotationAOEs -{ - public ColossalSlam() : base(ActionID.MakeSpell(AID.ColossalSlam), new AOEShapeCone(40, 30.Degrees())) { } -} +class ColossalSlam(BossModule module) : Components.SelfTargetedLegacyRotationAOEs(module, ActionID.MakeSpell(AID.ColossalSlam), new AOEShapeCone(40, 30.Degrees())); class D033GygesStates : StateMachineBuilder { @@ -55,7 +40,4 @@ public D033GygesStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 3, NameID = 101)] -public class D033Gyges : BossModule -{ - public D033Gyges(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(-100.42f, 6.67f), 20)) { } -} +public class D033Gyges(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(-100.42f, 6.67f), 20)); diff --git a/BossMod/Modules/RealmReborn/Dungeon/D05Totorak/D053Graffias.cs b/BossMod/Modules/RealmReborn/Dungeon/D05Totorak/D053Graffias.cs index c5ed6a18bf..6f7f7bb038 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D05Totorak/D053Graffias.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D05Totorak/D053Graffias.cs @@ -20,30 +20,15 @@ public enum AID : uint DeadlyThrust = 702, // Boss->self, 2.0s cast, visual (spawns pollen zone) } -class Silkscreen : Components.SelfTargetedLegacyRotationAOEs -{ - public Silkscreen() : base(ActionID.MakeSpell(AID.Silkscreen), new AOEShapeRect(18, 2)) { } -} +class Silkscreen(BossModule module) : Components.SelfTargetedLegacyRotationAOEs(module, ActionID.MakeSpell(AID.Silkscreen), new AOEShapeRect(18, 2)); -class StickyWeb : Components.CastHint -{ - public StickyWeb() : base(ActionID.MakeSpell(AID.StickyWeb), "Delayed AOE at target") { } -} +class StickyWeb(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.StickyWeb), "Delayed AOE at target"); -class PodBurst : Components.SelfTargetedAOEs -{ - public PodBurst() : base(ActionID.MakeSpell(AID.PodBurst), new AOEShapeCircle(7.050f)) { } -} +class PodBurst(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PodBurst), new AOEShapeCircle(7.050f)); -class DeadlyThrust : Components.CastHint -{ - public DeadlyThrust() : base(ActionID.MakeSpell(AID.DeadlyThrust), "Persistent voidzone at target") { } -} +class DeadlyThrust(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.DeadlyThrust), "Persistent voidzone at target"); -class PollenZone : Components.PersistentVoidzone -{ - public PollenZone() : base(10, m => m.Enemies(OID.PollenZone)) { } -} +class PollenZone(BossModule module) : Components.PersistentVoidzone(module, 10, m => m.Enemies(OID.PollenZone)); class D053GraffiasStates : StateMachineBuilder { diff --git a/BossMod/Modules/RealmReborn/Dungeon/D06Haukke/D061ManorClaviger.cs b/BossMod/Modules/RealmReborn/Dungeon/D06Haukke/D061ManorClaviger.cs index 9e92c79a46..1ee806f71a 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D06Haukke/D061ManorClaviger.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D06Haukke/D061ManorClaviger.cs @@ -13,20 +13,11 @@ public enum AID : uint DarkMist = 705, // Boss->self, 4.0s cast, range 9.4 aoe } -class SweetSteel : Components.Cleave -{ - public SweetSteel() : base(ActionID.MakeSpell(AID.SweetSteel), new AOEShapeCone(7.4f, 45.Degrees())) { } // TODO: verify angle -} +class SweetSteel(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.SweetSteel), new AOEShapeCone(7.4f, 45.Degrees())); // TODO: verify angle -class VoidFire2 : Components.LocationTargetedAOEs -{ - public VoidFire2() : base(ActionID.MakeSpell(AID.VoidFire2), 5) { } -} +class VoidFire2(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.VoidFire2), 5); -class DarkMist : Components.SelfTargetedAOEs -{ - public DarkMist() : base(ActionID.MakeSpell(AID.DarkMist), new AOEShapeCircle(9.4f)) { } -} +class DarkMist(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.DarkMist), new AOEShapeCircle(9.4f)); class D061ManorClavigerStates : StateMachineBuilder { @@ -40,7 +31,4 @@ public D061ManorClavigerStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 6, NameID = 423)] -public class D061ManorClaviger : BossModule -{ - public D061ManorClaviger(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsSquare(new(2.5f, 0), 16)) { } // TODO: really a rect, x=[-25, +20], y=[-16, +16] -} +public class D061ManorClaviger(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsSquare(new(2.5f, 0), 16)); // TODO: really a rect, x=[-25, +20], y=[-16, +16] diff --git a/BossMod/Modules/RealmReborn/Dungeon/D06Haukke/D063LadyAmandine.cs b/BossMod/Modules/RealmReborn/Dungeon/D06Haukke/D063LadyAmandine.cs index ebb38a2dd2..5c4403cfb7 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D06Haukke/D063LadyAmandine.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D06Haukke/D063LadyAmandine.cs @@ -24,25 +24,13 @@ public enum AID : uint Stoneskin = 28641, // Handmaiden->Boss, 5.0s cast, buff target } -class DarkMist : Components.SelfTargetedAOEs -{ - public DarkMist() : base(ActionID.MakeSpell(AID.DarkMist), new AOEShapeCircle(9)) { } -} +class DarkMist(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.DarkMist), new AOEShapeCircle(9)); -class BeguilingMist : Components.CastHint -{ - public BeguilingMist() : base(ActionID.MakeSpell(AID.BeguilingMist), "Forced movement towards boss") { } -} +class BeguilingMist(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.BeguilingMist), "Forced movement towards boss"); -class VoidThunder : Components.SingleTargetCast -{ - public VoidThunder() : base(ActionID.MakeSpell(AID.VoidThunder3), "Interruptible tankbuster") { } -} +class VoidThunder(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.VoidThunder3), "Interruptible tankbuster"); -class PetrifyingEye : Components.CastGaze -{ - public PetrifyingEye() : base(ActionID.MakeSpell(AID.PetrifyingEye)) { } -} +class PetrifyingEye(BossModule module) : Components.CastGaze(module, ActionID.MakeSpell(AID.PetrifyingEye)); class D063LadyAmandineStates : StateMachineBuilder { diff --git a/BossMod/Modules/RealmReborn/Dungeon/D07Brayflox/D074Aiatar.cs b/BossMod/Modules/RealmReborn/Dungeon/D07Brayflox/D074Aiatar.cs index 3d5653e9bb..ca76b12c56 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D07Brayflox/D074Aiatar.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D07Brayflox/D074Aiatar.cs @@ -16,25 +16,13 @@ public enum AID : uint DragonBreath = 28660, // Boss->self, 3.0s cast, range 30 width 8 rect } -class SalivousSnap : Components.SingleTargetCast -{ - public SalivousSnap() : base(ActionID.MakeSpell(AID.SalivousSnap)) { } -} +class SalivousSnap(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.SalivousSnap)); -class ToxicVomit : Components.SelfTargetedAOEs -{ - public ToxicVomit() : base(ActionID.MakeSpell(AID.ToxicVomitAOE), new AOEShapeCircle(2)) { } -} +class ToxicVomit(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ToxicVomitAOE), new AOEShapeCircle(2)); -class Burst : Components.SelfTargetedAOEs -{ - public Burst() : base(ActionID.MakeSpell(AID.Burst), new AOEShapeCircle(10), 4) { } -} +class Burst(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Burst), new AOEShapeCircle(10), 4); -class DragonBreath : Components.SelfTargetedLegacyRotationAOEs -{ - public DragonBreath() : base(ActionID.MakeSpell(AID.DragonBreath), new AOEShapeRect(30, 4)) { } -} +class DragonBreath(BossModule module) : Components.SelfTargetedLegacyRotationAOEs(module, ActionID.MakeSpell(AID.DragonBreath), new AOEShapeRect(30, 4)); class D074AiatarStates : StateMachineBuilder { @@ -49,7 +37,4 @@ public D074AiatarStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 8, NameID = 1279)] -public class D074Aiatar : BossModule -{ - public D074Aiatar(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(-25, -235), 20)) { } -} +public class D074Aiatar(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(-25, -235), 20)); diff --git a/BossMod/Modules/RealmReborn/Dungeon/D08Qarn/D081Teratotaur.cs b/BossMod/Modules/RealmReborn/Dungeon/D08Qarn/D081Teratotaur.cs index 2da047eeb5..562e64f5f0 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D08Qarn/D081Teratotaur.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D08Qarn/D081Teratotaur.cs @@ -26,20 +26,11 @@ public enum SID : uint Doom = 210, // Boss->player, extra=0x0 } -class Triclip : Components.Cleave -{ - public Triclip() : base(ActionID.MakeSpell(AID.Triclip), new AOEShapeRect(5.25f, 2)) { } -} +class Triclip(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.Triclip), new AOEShapeRect(5.25f, 2)); -class Mow : Components.SelfTargetedLegacyRotationAOEs -{ - public Mow() : base(ActionID.MakeSpell(AID.Mow), new AOEShapeCone(8.25f, 60.Degrees())) { } -} +class Mow(BossModule module) : Components.SelfTargetedLegacyRotationAOEs(module, ActionID.MakeSpell(AID.Mow), new AOEShapeCone(8.25f, 60.Degrees())); -class FrightfulRoar : Components.SelfTargetedAOEs -{ - public FrightfulRoar() : base(ActionID.MakeSpell(AID.FrightfulRoar), new AOEShapeCircle(8.25f)) { } -} +class FrightfulRoar(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.FrightfulRoar), new AOEShapeCircle(8.25f)); class MortalRay : BossComponent { @@ -50,20 +41,20 @@ class MortalRay : BossComponent private Actor? ActivePlatform => _platforms.FirstOrDefault(a => a != null && a.EventState == 0); - public override void Update(BossModule module) + public override void Update() { _platforms[0] ??= module.Enemies(OID.Platform1).FirstOrDefault(); _platforms[1] ??= module.Enemies(OID.Platform2).FirstOrDefault(); _platforms[2] ??= module.Enemies(OID.Platform3).FirstOrDefault(); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_dooms[slot]) hints.Add("Go to glowing platform!"); } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { if (_dooms[slot]) { @@ -75,22 +66,22 @@ public override void AddAIHints(BossModule module, int slot, Actor actor, PartyR } } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { if (_dooms[pcSlot]) _platformShape.Draw(arena, ActivePlatform, ArenaColor.SafeFromAOE); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Doom) - _dooms.Set(module.Raid.FindSlot(actor.InstanceID)); + _dooms.Set(Raid.FindSlot(actor.InstanceID)); } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Doom) - _dooms.Clear(module.Raid.FindSlot(actor.InstanceID)); + _dooms.Clear(Raid.FindSlot(actor.InstanceID)); } } diff --git a/BossMod/Modules/RealmReborn/Dungeon/D08Qarn/D082TempleGuardian.cs b/BossMod/Modules/RealmReborn/Dungeon/D08Qarn/D082TempleGuardian.cs index 371cf0619a..d3420d3546 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D08Qarn/D082TempleGuardian.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D08Qarn/D082TempleGuardian.cs @@ -16,20 +16,11 @@ public enum AID : uint Obliterate = 680, // Boss->self, 2.0s cast, range 6? ??? aoe } -class BoulderClap : Components.SelfTargetedLegacyRotationAOEs -{ - public BoulderClap() : base(ActionID.MakeSpell(AID.BoulderClap), new AOEShapeCone(14.2f, 60.Degrees())) { } -} +class BoulderClap(BossModule module) : Components.SelfTargetedLegacyRotationAOEs(module, ActionID.MakeSpell(AID.BoulderClap), new AOEShapeCone(14.2f, 60.Degrees())); -class TrueGrit : Components.SelfTargetedLegacyRotationAOEs -{ - public TrueGrit() : base(ActionID.MakeSpell(AID.TrueGrit), new AOEShapeCone(14.2f, 60.Degrees())) { } -} +class TrueGrit(BossModule module) : Components.SelfTargetedLegacyRotationAOEs(module, ActionID.MakeSpell(AID.TrueGrit), new AOEShapeCone(14.2f, 60.Degrees())); -class Rockslide : Components.SelfTargetedLegacyRotationAOEs -{ - public Rockslide() : base(ActionID.MakeSpell(AID.Rockslide), new AOEShapeRect(16.2f, 4)) { } -} +class Rockslide(BossModule module) : Components.SelfTargetedLegacyRotationAOEs(module, ActionID.MakeSpell(AID.Rockslide), new AOEShapeRect(16.2f, 4)); class D082TempleGuardianStates : StateMachineBuilder { diff --git a/BossMod/Modules/RealmReborn/Dungeon/D08Qarn/D083Adjudicator.cs b/BossMod/Modules/RealmReborn/Dungeon/D08Qarn/D083Adjudicator.cs index 963a002c54..61e9b1c19f 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D08Qarn/D083Adjudicator.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D08Qarn/D083Adjudicator.cs @@ -20,15 +20,9 @@ public enum AID : uint VergePulse = 930, // MythrilVerge->self, 10.0s cast, range 60 ??? } -class Darkness : Components.SelfTargetedLegacyRotationAOEs -{ - public Darkness() : base(ActionID.MakeSpell(AID.Darkness), new AOEShapeCone(7.5f, 60.Degrees())) { } -} +class Darkness(BossModule module) : Components.SelfTargetedLegacyRotationAOEs(module, ActionID.MakeSpell(AID.Darkness), new AOEShapeCone(7.5f, 60.Degrees())); -class VergeLine : Components.SelfTargetedLegacyRotationAOEs -{ - public VergeLine() : base(ActionID.MakeSpell(AID.VergeLine), new AOEShapeRect(60, 2)) { } -} +class VergeLine(BossModule module) : Components.SelfTargetedLegacyRotationAOEs(module, ActionID.MakeSpell(AID.VergeLine), new AOEShapeRect(60, 2)); class D083AdjudicatorStates : StateMachineBuilder { diff --git a/BossMod/Modules/RealmReborn/Dungeon/D09Cutter/D092GiantTunnelWorm.cs b/BossMod/Modules/RealmReborn/Dungeon/D09Cutter/D092GiantTunnelWorm.cs index 4687c84348..f4fb01bb9f 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D09Cutter/D092GiantTunnelWorm.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D09Cutter/D092GiantTunnelWorm.cs @@ -17,10 +17,7 @@ public enum AID : uint SandPillar = 1113, // SandPillarHelper->self, no cast, range 4.5 aoe } -class Sandstorm : Components.Cleave -{ - public Sandstorm() : base(ActionID.MakeSpell(AID.Sandstorm), new AOEShapeCone(10.5f, 45.Degrees())) { } -} +class Sandstorm(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.Sandstorm), new AOEShapeCone(10.5f, 45.Degrees())); // TODO: pillars teleport right before cast, so we don't show them for now... class Submerge : Components.GenericAOEs @@ -29,11 +26,11 @@ class Submerge : Components.GenericAOEs public Submerge() : base(ActionID.MakeSpell(AID.Earthbreak)) { } - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { // TODO: proper timings... - if (!module.PrimaryActor.IsTargetable) - yield return new(_shape, module.PrimaryActor.Position, module.PrimaryActor.Rotation); + if (!Module.PrimaryActor.IsTargetable) + yield return new(_shape, Module.PrimaryActor.Position, Module.PrimaryActor.Rotation); } } @@ -48,7 +45,4 @@ public D092GiantTunnelWormStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 12, NameID = 1589)] -public class D092GiantTunnelWorm : BossModule -{ - public D092GiantTunnelWorm(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(-140, 150), 20)) { } -} +public class D092GiantTunnelWorm(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(-140, 150), 20)); diff --git a/BossMod/Modules/RealmReborn/Dungeon/D09Cutter/D093Chimera.cs b/BossMod/Modules/RealmReborn/Dungeon/D09Cutter/D093Chimera.cs index 8c9b9d7e9a..c854c43dff 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D09Cutter/D093Chimera.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D09Cutter/D093Chimera.cs @@ -20,40 +20,19 @@ public enum AID : uint ChaoticChorus = 1108, // Cacophony->self, no cast, range 6 aoe } -class LionsBreath : Components.Cleave -{ - public LionsBreath() : base(ActionID.MakeSpell(AID.LionsBreath), new AOEShapeCone(9.7f, 60.Degrees())) { } // TODO: verify angle -} +class LionsBreath(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.LionsBreath), new AOEShapeCone(9.7f, 60.Degrees())); // TODO: verify angle -class RamsBreath : Components.SelfTargetedLegacyRotationAOEs -{ - public RamsBreath() : base(ActionID.MakeSpell(AID.RamsBreath), new AOEShapeCone(9.7f, 60.Degrees(), -45.Degrees())) { } -} +class RamsBreath(BossModule module) : Components.SelfTargetedLegacyRotationAOEs(module, ActionID.MakeSpell(AID.RamsBreath), new AOEShapeCone(9.7f, 60.Degrees(), -45.Degrees())); -class DragonsBreath : Components.SelfTargetedLegacyRotationAOEs -{ - public DragonsBreath() : base(ActionID.MakeSpell(AID.DragonsBreath), new AOEShapeCone(9.7f, 60.Degrees(), 45.Degrees())) { } -} +class DragonsBreath(BossModule module) : Components.SelfTargetedLegacyRotationAOEs(module, ActionID.MakeSpell(AID.DragonsBreath), new AOEShapeCone(9.7f, 60.Degrees(), 45.Degrees())); -class RamsVoice : Components.SelfTargetedAOEs -{ - public RamsVoice() : base(ActionID.MakeSpell(AID.RamsVoice), new AOEShapeCircle(9.7f)) { } -} +class RamsVoice(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RamsVoice), new AOEShapeCircle(9.7f)); -class DragonsVoice : Components.SelfTargetedAOEs -{ - public DragonsVoice() : base(ActionID.MakeSpell(AID.DragonsVoice), new AOEShapeDonut(7, 30)) { } -} +class DragonsVoice(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.DragonsVoice), new AOEShapeDonut(7, 30)); -class RamsKeeper : Components.LocationTargetedAOEs -{ - public RamsKeeper() : base(ActionID.MakeSpell(AID.RamsKeeper), 6) { } -} +class RamsKeeper(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.RamsKeeper), 6); -class RamsKeeperVoidzone : Components.PersistentVoidzone -{ - public RamsKeeperVoidzone() : base(6, m => m.Enemies(OID.RamsKeeper)) { } -} +class RamsKeeperVoidzone(BossModule module) : Components.PersistentVoidzone(module, 6, m => m.Enemies(OID.RamsKeeper)); class ChaoticChorus : Components.GenericAOEs { @@ -61,7 +40,7 @@ class ChaoticChorus : Components.GenericAOEs public ChaoticChorus() : base(ActionID.MakeSpell(AID.ChaoticChorus)) { } - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { // TODO: timings return module.Enemies(OID.Cacophony).Where(c => !c.IsDead).Select(c => new AOEInstance(_shape, c.Position, c.Rotation)); @@ -85,7 +64,4 @@ public D093ChimeraStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 12, NameID = 1590)] -public class D093Chimera : BossModule -{ - public D093Chimera(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(-170, -200), 30)) { } -} +public class D093Chimera(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(-170, -200), 30)); diff --git a/BossMod/Modules/RealmReborn/Dungeon/D10StoneVigil/D101ChudoYudo.cs b/BossMod/Modules/RealmReborn/Dungeon/D10StoneVigil/D101ChudoYudo.cs index ce47174580..822dfcf573 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D10StoneVigil/D101ChudoYudo.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D10StoneVigil/D101ChudoYudo.cs @@ -13,23 +13,17 @@ public enum AID : uint Swinge = 903, // Boss->self, 4.0s cast, range 40 ?-degree cone aoe } -class LionsBreath : Components.SelfTargetedLegacyRotationAOEs -{ - public LionsBreath() : base(ActionID.MakeSpell(AID.LionsBreath), new AOEShapeCone(10.25f, 60.Degrees())) { } // TODO: verify angle -} +class LionsBreath(BossModule module) : Components.SelfTargetedLegacyRotationAOEs(module, ActionID.MakeSpell(AID.LionsBreath), new AOEShapeCone(10.25f, 60.Degrees())); // TODO: verify angle -class Swinge : Components.SelfTargetedLegacyRotationAOEs -{ - public Swinge() : base(ActionID.MakeSpell(AID.Swinge), new AOEShapeCone(40, 30.Degrees())) { } // TODO: verify angle -} +class Swinge(BossModule module) : Components.SelfTargetedLegacyRotationAOEs(module, ActionID.MakeSpell(AID.Swinge), new AOEShapeCone(40, 30.Degrees())); // TODO: verify angle // due to relatively short casts and the fact that boss likes moving across arena to cast swinge, we always want non-tanks to be positioned slightly behind class Positioning : BossComponent { - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { if (actor.Role != Role.Tank) - hints.AddForbiddenZone(ShapeDistance.Cone(module.PrimaryActor.Position, 10, module.PrimaryActor.Rotation, 90.Degrees())); + hints.AddForbiddenZone(ShapeDistance.Cone(Module.PrimaryActor.Position, 10, Module.PrimaryActor.Rotation, 90.Degrees())); } } @@ -45,7 +39,4 @@ public D101ChudoYudoStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 11, NameID = 1677)] -public class D101ChudoYudo : BossModule -{ - public D101ChudoYudo(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsSquare(new(0, 115), 20)) { } -} +public class D101ChudoYudo(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsSquare(new(0, 115), 20)); diff --git a/BossMod/Modules/RealmReborn/Dungeon/D10StoneVigil/D102Koshchei.cs b/BossMod/Modules/RealmReborn/Dungeon/D10StoneVigil/D102Koshchei.cs index 4e1c9500cc..199489d46b 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D10StoneVigil/D102Koshchei.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D10StoneVigil/D102Koshchei.cs @@ -16,15 +16,9 @@ public enum AID : uint TyphoonAOE = 28731, // MaelstromHelper->self, no cast, range 3 aoe } -class SpikedTail : Components.SingleTargetCast -{ - public SpikedTail() : base(ActionID.MakeSpell(AID.SpikedTail)) { } -} +class SpikedTail(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.SpikedTail)); -class SonicStorm : Components.LocationTargetedAOEs -{ - public SonicStorm() : base(ActionID.MakeSpell(AID.SonicStorm), 6) { } -} +class SonicStorm(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.SonicStorm), 6); class Typhoon : Components.Exaflare { @@ -37,7 +31,7 @@ public override void Init(BossModule module) _maelstroms = module.Enemies(OID.MaelstromVisual); } - public override void Update(BossModule module) + public override void Update() { foreach (var m in _maelstroms) { @@ -49,14 +43,14 @@ public override void Update(BossModule module) } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.TyphoonAOE && caster.Position.X < 56) { var line = FindLine(caster.Position.Z); if (line == null) { - module.ReportError(this, $"Failed to find entry for {caster.InstanceID:X} @ {caster.Position}"); + ReportError($"Failed to find entry for {caster.InstanceID:X} @ {caster.Position}"); return; } @@ -85,7 +79,4 @@ public D102KoshcheiStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 11, NameID = 1678)] -public class D102Koshchei : BossModule -{ - public D102Koshchei(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsSquare(new(40, -80), 10)) { } -} +public class D102Koshchei(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsSquare(new(40, -80), 10)); diff --git a/BossMod/Modules/RealmReborn/Dungeon/D10StoneVigil/D103Isgebind.cs b/BossMod/Modules/RealmReborn/Dungeon/D10StoneVigil/D103Isgebind.cs index f14999284a..15623e91f5 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D10StoneVigil/D103Isgebind.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D10StoneVigil/D103Isgebind.cs @@ -17,30 +17,15 @@ public enum AID : uint Touchdown = 1027, // Boss->self, no cast, range 5 aoe around center } -class RimeWreath : Components.RaidwideCast -{ - public RimeWreath() : base(ActionID.MakeSpell(AID.RimeWreath)) { } -} +class RimeWreath(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.RimeWreath)); -class FrostBreath : Components.Cleave -{ - public FrostBreath() : base(ActionID.MakeSpell(AID.FrostBreath), new AOEShapeCone(27, 60.Degrees())) { } // TODO: verify angle -} +class FrostBreath(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.FrostBreath), new AOEShapeCone(27, 60.Degrees())); // TODO: verify angle -class SheetOfIce : Components.LocationTargetedAOEs -{ - public SheetOfIce() : base(ActionID.MakeSpell(AID.SheetOfIce), 5) { } -} +class SheetOfIce(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.SheetOfIce), 5); -class SheetOfIce2 : Components.LocationTargetedAOEs -{ - public SheetOfIce2() : base(ActionID.MakeSpell(AID.SheetOfIce2), 5) { } -} +class SheetOfIce2(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.SheetOfIce2), 5); -class Cauterize : Components.SelfTargetedLegacyRotationAOEs -{ - public Cauterize() : base(ActionID.MakeSpell(AID.Cauterize), new AOEShapeRect(48, 10)) { } -} +class Cauterize(BossModule module) : Components.SelfTargetedLegacyRotationAOEs(module, ActionID.MakeSpell(AID.Cauterize), new AOEShapeRect(48, 10)); class Touchdown : Components.GenericAOEs { @@ -48,11 +33,11 @@ class Touchdown : Components.GenericAOEs public Touchdown() : base(ActionID.MakeSpell(AID.Touchdown)) { } - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { // TODO: proper timings... - if (!module.PrimaryActor.IsTargetable && !module.FindComponent()!.ActiveCasters.Any()) - yield return new(_shape, module.Bounds.Center); + if (!Module.PrimaryActor.IsTargetable && !module.FindComponent()!.ActiveCasters.Any()) + yield return new(_shape, Module.Bounds.Center); } } @@ -71,7 +56,4 @@ public D103IsgebindStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 11, NameID = 1680)] -public class D103Isgebind : BossModule -{ - public D103Isgebind(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsSquare(new(0, -248), 20)) { } -} +public class D103Isgebind(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsSquare(new(0, -248), 20)); diff --git a/BossMod/Modules/RealmReborn/Dungeon/D11DzemaelDarkhold/D111AllSeeingEye.cs b/BossMod/Modules/RealmReborn/Dungeon/D11DzemaelDarkhold/D111AllSeeingEye.cs index cd3c342695..d32c4e93b5 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D11DzemaelDarkhold/D111AllSeeingEye.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D11DzemaelDarkhold/D111AllSeeingEye.cs @@ -25,34 +25,22 @@ public enum SID : uint Invincibility = 325, // none->Boss, extra=0x0 } -class CursedGaze : Components.SelfTargetedAOEs -{ - public CursedGaze() : base(ActionID.MakeSpell(AID.CursedGaze), new AOEShapeCone(8.7f, 45.Degrees())) { } -} +class CursedGaze(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.CursedGaze), new AOEShapeCone(8.7f, 45.Degrees())); -class DreadGaze : Components.SelfTargetedAOEs -{ - public DreadGaze() : base(ActionID.MakeSpell(AID.DreadGaze), new AOEShapeCone(8.7f, 45.Degrees())) { } -} +class DreadGaze(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.DreadGaze), new AOEShapeCone(8.7f, 45.Degrees())); -class Thunderstrike : Components.SelfTargetedAOEs -{ - public Thunderstrike() : base(ActionID.MakeSpell(AID.Thunderstrike), new AOEShapeRect(11.2f, 1.5f)) { } -} +class Thunderstrike(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Thunderstrike), new AOEShapeRect(11.2f, 1.5f)); -class Condemnation : Components.SelfTargetedAOEs -{ - public Condemnation() : base(ActionID.MakeSpell(AID.Condemnation), new AOEShapeCone(7.3f, 45.Degrees())) { } -} +class Condemnation(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Condemnation), new AOEShapeCone(7.3f, 45.Degrees())); // try to always stay in active crystal closest to boss class Positioning : BossComponent { - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { - if (module.PrimaryActor.CastInfo == null) // do not restrict zone while boss is casting, to allow avoiding aoe, even if it means temporarily leaving crystal veil + if (Module.PrimaryActor.CastInfo == null) // do not restrict zone while boss is casting, to allow avoiding aoe, even if it means temporarily leaving crystal veil { - var closestCrystal = module.Enemies(OID.Crystal).Closest(module.PrimaryActor.Position); + var closestCrystal = module.Enemies(OID.Crystal).Closest(Module.PrimaryActor.Position); if (closestCrystal != null) hints.AddForbiddenZone(ShapeDistance.InvertedCircle(closestCrystal.Position, 8)); // TODO: verify range } diff --git a/BossMod/Modules/RealmReborn/Dungeon/D11DzemaelDarkhold/D113Batraal.cs b/BossMod/Modules/RealmReborn/Dungeon/D11DzemaelDarkhold/D113Batraal.cs index 177060310a..9c55e5c96c 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D11DzemaelDarkhold/D113Batraal.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D11DzemaelDarkhold/D113Batraal.cs @@ -18,20 +18,11 @@ public enum AID : uint SeaOfPitch = 962, // VoidPitch->location, no cast, range 4 circle } -class GrimFate : Components.Cleave -{ - public GrimFate() : base(ActionID.MakeSpell(AID.GrimFate), new AOEShapeCone(12.6f, 60.Degrees())) { } // TODO: verify angle -} +class GrimFate(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.GrimFate), new AOEShapeCone(12.6f, 60.Degrees())); // TODO: verify angle -class Desolation : Components.SelfTargetedAOEs -{ - public Desolation() : base(ActionID.MakeSpell(AID.Desolation), new AOEShapeRect(60, 3)) { } -} +class Desolation(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Desolation), new AOEShapeRect(60, 3)); -class AetherialSurge : Components.SelfTargetedAOEs -{ - public AetherialSurge() : base(ActionID.MakeSpell(AID.AetherialSurge), new AOEShapeCircle(6)) { } -} +class AetherialSurge(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.AetherialSurge), new AOEShapeCircle(6)); // note: actor 'dies' immediately after casting class SeaOfPitch : Components.GenericAOEs @@ -40,7 +31,7 @@ class SeaOfPitch : Components.GenericAOEs public SeaOfPitch() : base(ActionID.MakeSpell(AID.SeaOfPitch)) { } - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { // TODO: proper timings... return module.Enemies(OID.VoidPitch).Where(a => !a.IsDead).Select(a => new AOEInstance(_shape, a.Position)); diff --git a/BossMod/Modules/RealmReborn/Dungeon/D12AurumVale/D121Locksmith.cs b/BossMod/Modules/RealmReborn/Dungeon/D12AurumVale/D121Locksmith.cs index 8f0957719c..b816bbf00d 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D12AurumVale/D121Locksmith.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D12AurumVale/D121Locksmith.cs @@ -13,20 +13,14 @@ public enum AID : uint GoldDust = 1033, // Boss->location, 3.5s cast, range 8 circle } -class HundredLashings : Components.Cleave -{ - public HundredLashings() : base(ActionID.MakeSpell(AID.HundredLashings), new AOEShapeCone(12, 45.Degrees())) { } // TODO: verify angle -} +class HundredLashings(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.HundredLashings), new AOEShapeCone(12, 45.Degrees())); // TODO: verify angle -class GoldDust : Components.LocationTargetedAOEs -{ - public GoldDust() : base(ActionID.MakeSpell(AID.GoldDust), 8) { } -} +class GoldDust(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.GoldDust), 8); // arena has multiple weirdly-shaped puddles, so just prefer standing in large safe zone class AIPosition : BossComponent { - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { hints.AddForbiddenZone(ShapeDistance.InvertedCircle(new(30, 0), 5)); } @@ -44,7 +38,4 @@ public D121LocksmithStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 5, NameID = 1534)] -public class D121Locksmith : BossModule -{ - public D121Locksmith(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsRect(new(35, 0), 15, 25)) { } -} +public class D121Locksmith(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsRect(new(35, 0), 15, 25)); diff --git a/BossMod/Modules/RealmReborn/Dungeon/D12AurumVale/D122Coincounter.cs b/BossMod/Modules/RealmReborn/Dungeon/D12AurumVale/D122Coincounter.cs index 14e758d15e..4d898090cd 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D12AurumVale/D122Coincounter.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D12AurumVale/D122Coincounter.cs @@ -16,30 +16,15 @@ public enum AID : uint EyeOfTheBeholder = 631, // Boss->self, 2.5s cast, range 8-15+R donut 270-degree cone aoe } -class TenTonzeSwipe : Components.Cleave -{ - public TenTonzeSwipe() : base(ActionID.MakeSpell(AID.TenTonzeSwipe), new AOEShapeCone(10, 60.Degrees())) { } // TODO: verify angle -} +class TenTonzeSwipe(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.TenTonzeSwipe), new AOEShapeCone(10, 60.Degrees())); // TODO: verify angle -class HundredTonzeSwipe : Components.SelfTargetedAOEs -{ - public HundredTonzeSwipe() : base(ActionID.MakeSpell(AID.HundredTonzeSwipe), new AOEShapeCone(10, 60.Degrees())) { } -} +class HundredTonzeSwipe(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HundredTonzeSwipe), new AOEShapeCone(10, 60.Degrees())); -class HundredTonzeSwing : Components.SelfTargetedAOEs -{ - public HundredTonzeSwing() : base(ActionID.MakeSpell(AID.HundredTonzeSwing), new AOEShapeCircle(12)) { } -} +class HundredTonzeSwing(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HundredTonzeSwing), new AOEShapeCircle(12)); -class Glower : Components.SelfTargetedAOEs -{ - public Glower() : base(ActionID.MakeSpell(AID.Glower), new AOEShapeRect(21, 3.5f)) { } -} +class Glower(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Glower), new AOEShapeRect(21, 3.5f)); -class EyeOfTheBeholder : Components.SelfTargetedAOEs -{ - public EyeOfTheBeholder() : base(ActionID.MakeSpell(AID.EyeOfTheBeholder), new AOEShapeDonutSector(8, 19, 135.Degrees())) { } -} +class EyeOfTheBeholder(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.EyeOfTheBeholder), new AOEShapeDonutSector(8, 19, 135.Degrees())); class D122CoincounterStates : StateMachineBuilder { @@ -55,7 +40,4 @@ public D122CoincounterStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 5, NameID = 1533)] -public class D122Coincounter : BossModule -{ - public D122Coincounter(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsSquare(new(-150, -150), 20)) { } -} +public class D122Coincounter(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsSquare(new(-150, -150), 20)); diff --git a/BossMod/Modules/RealmReborn/Dungeon/D12AurumVale/D123MisersMistress.cs b/BossMod/Modules/RealmReborn/Dungeon/D12AurumVale/D123MisersMistress.cs index 02feaf62b1..7709236a3d 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D12AurumVale/D123MisersMistress.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D12AurumVale/D123MisersMistress.cs @@ -16,23 +16,17 @@ public enum AID : uint Sow = 1081, // Boss->player, 3.0s cast, single-target, spawns adds } -class VineProbe : Components.Cleave -{ - public VineProbe() : base(ActionID.MakeSpell(AID.VineProbe), new AOEShapeRect(10, 4)) { } -} +class VineProbe(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.VineProbe), new AOEShapeRect(10, 4)); -class BadBreath : Components.SelfTargetedAOEs -{ - public BadBreath() : base(ActionID.MakeSpell(AID.BadBreath), new AOEShapeCone(16, 60.Degrees())) { } -} +class BadBreath(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.BadBreath), new AOEShapeCone(16, 60.Degrees())); // arena has multiple weirdly-shaped puddles, so just prefer standing in large safe zone class AIPosition : BossComponent { private WPos[] _centers = { new(-395, -130), new(-402, -114) }; - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { - hints.AddForbiddenZone(ShapeDistance.InvertedCircle(_centers.MinBy(p => (p - module.PrimaryActor.Position).LengthSq()), 5)); + hints.AddForbiddenZone(ShapeDistance.InvertedCircle(_centers.MinBy(p => (p - Module.PrimaryActor.Position).LengthSq()), 5)); } } diff --git a/BossMod/Modules/RealmReborn/Dungeon/D13CastrumMeridianum/D131BlackEft.cs b/BossMod/Modules/RealmReborn/Dungeon/D13CastrumMeridianum/D131BlackEft.cs index 2cfcbcde0a..54e6e690cb 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D13CastrumMeridianum/D131BlackEft.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D13CastrumMeridianum/D131BlackEft.cs @@ -19,20 +19,11 @@ public enum AID : uint MagitekCannon = 28775, // Boss->location, 3.0s cast, range 6 circle aoe } -class IncendiarySupport : Components.CastHint -{ - public IncendiarySupport() : base(ActionID.MakeSpell(AID.IncendiarySupport), "Raidwide x3") { } -} +class IncendiarySupport(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.IncendiarySupport), "Raidwide x3"); -class HighPoweredMagitekRay : Components.SelfTargetedAOEs -{ - public HighPoweredMagitekRay() : base(ActionID.MakeSpell(AID.HighPoweredMagitekRay), new AOEShapeRect(50, 2)) { } -} +class HighPoweredMagitekRay(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HighPoweredMagitekRay), new AOEShapeRect(50, 2)); -class MagitekCannon : Components.LocationTargetedAOEs -{ - public MagitekCannon() : base(ActionID.MakeSpell(AID.MagitekCannon), 6) { } -} +class MagitekCannon(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.MagitekCannon), 6); class D131BlackEftStates : StateMachineBuilder { @@ -51,7 +42,4 @@ public D131BlackEftStates(BossModule module) : base(module) // second wave = 2x colossus // third wave = 2x colossus + 2x signifier + 2x laquearius [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 15, NameID = 557)] -public class D131BlackEft : BossModule -{ - public D131BlackEft(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsSquare(new(10, -40), 20)) { } -} +public class D131BlackEft(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsSquare(new(10, -40), 20)); diff --git a/BossMod/Modules/RealmReborn/Dungeon/D13CastrumMeridianum/D132MagitekVanguardF1.cs b/BossMod/Modules/RealmReborn/Dungeon/D13CastrumMeridianum/D132MagitekVanguardF1.cs index 795991df69..0ac6288127 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D13CastrumMeridianum/D132MagitekVanguardF1.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D13CastrumMeridianum/D132MagitekVanguardF1.cs @@ -20,35 +20,17 @@ public enum AID : uint Overcharge = 29146, // Boss->self, 3.0s cast, range 11 120-degree cone aoe } -class ThermobaricCharge : Components.SelfTargetedAOEs -{ - public ThermobaricCharge() : base(ActionID.MakeSpell(AID.ThermobaricCharge), new AOEShapeCircle(20)) { } -} +class ThermobaricCharge(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ThermobaricCharge), new AOEShapeCircle(20)); -class HyperchargeInner : Components.SelfTargetedAOEs -{ - public HyperchargeInner() : base(ActionID.MakeSpell(AID.HyperchargeInner), new AOEShapeCircle(10)) { } -} +class HyperchargeInner(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HyperchargeInner), new AOEShapeCircle(10)); -class HyperchargeOuter : Components.SelfTargetedAOEs -{ - public HyperchargeOuter() : base(ActionID.MakeSpell(AID.HyperchargeOuter), new AOEShapeDonut(12.5f, 30)) { } -} +class HyperchargeOuter(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HyperchargeOuter), new AOEShapeDonut(12.5f, 30)); -class TargetedSupport : Components.SelfTargetedAOEs -{ - public TargetedSupport() : base(ActionID.MakeSpell(AID.TargetedSupportAOE), new AOEShapeCircle(5)) { } -} +class TargetedSupport(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TargetedSupportAOE), new AOEShapeCircle(5)); -class CermetDrill : Components.SingleTargetCast -{ - public CermetDrill() : base(ActionID.MakeSpell(AID.CermetDrill)) { } -} +class CermetDrill(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.CermetDrill)); -class Overcharge : Components.SelfTargetedAOEs -{ - public Overcharge() : base(ActionID.MakeSpell(AID.Overcharge), new AOEShapeCone(11, 60.Degrees())) { } -} +class Overcharge(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Overcharge), new AOEShapeCone(11, 60.Degrees())); class D132MagitekVanguardF1States : StateMachineBuilder { @@ -65,7 +47,4 @@ public D132MagitekVanguardF1States(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 15, NameID = 2116)] -public class D132MagitekVanguardF1 : BossModule -{ - public D132MagitekVanguardF1(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsRect(new(-13, 31), 20, 20, 20.Degrees())) { } -} +public class D132MagitekVanguardF1(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsRect(new(-13, 31), 20, 20, 20.Degrees())); diff --git a/BossMod/Modules/RealmReborn/Dungeon/D13CastrumMeridianum/D133Livia.cs b/BossMod/Modules/RealmReborn/Dungeon/D13CastrumMeridianum/D133Livia.cs index b3db0407fa..4d548b4ea7 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D13CastrumMeridianum/D133Livia.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D13CastrumMeridianum/D133Livia.cs @@ -36,15 +36,9 @@ public enum AID : uint ArtificialPlasmaBoostRest = 29353, // Boss->self, no cast, raidwide } -class AglaeaClimb : Components.SingleTargetCast -{ - public AglaeaClimb() : base(ActionID.MakeSpell(AID.AglaeaClimb)) { } -} +class AglaeaClimb(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.AglaeaClimb)); -class ArtificialPlasma : Components.RaidwideCast -{ - public ArtificialPlasma() : base(ActionID.MakeSpell(AID.ArtificialPlasma)) { } -} +class ArtificialPlasma(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.ArtificialPlasma)); class Roundhouse : Components.GenericAOEs { @@ -56,7 +50,7 @@ class Roundhouse : Components.GenericAOEs public Roundhouse() : base(ActionID.MakeSpell(AID.Roundhouse)) { } - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_castersRoundhouse.Count > 0) return _castersRoundhouse.Select(c => new AOEInstance(_shapeRoundhouse, c.Position, c.CastInfo!.Rotation, c.CastInfo!.NPCFinishAt)); @@ -64,12 +58,12 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, return _castersDischarge.Select(c => new AOEInstance(_shapeDischarge, c.Position, c.CastInfo!.Rotation, c.CastInfo!.NPCFinishAt)); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { CastersForSpell(spell.Action)?.Add(caster); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { CastersForSpell(spell.Action)?.Remove(caster); } @@ -96,7 +90,7 @@ class InfiniteReach : Components.GenericAOEs public InfiniteReach() : base(ActionID.MakeSpell(AID.InfiniteReachDischarge)) { } - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { bool haveSets = false; int currentSet = NumCasts / 6; @@ -119,12 +113,12 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { CastersForSpell(module, spell.Action, false)?.Add(caster); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { var list = CastersForSpell(module, spell.Action, true); if (list != null) @@ -139,7 +133,7 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn { AID.InfiniteReachAOE => _castersRect, AID.InfiniteReachDischarge => _castersDischarge, - AID.AngrySalamanderAOE => forRemove || !module.PrimaryActor.IsTargetable ? _castersSalamander : null, // note: this component cares only about cast when boss is untargetable + AID.AngrySalamanderAOE => forRemove || !Module.PrimaryActor.IsTargetable ? _castersSalamander : null, // note: this component cares only about cast when boss is untargetable _ => null }; } @@ -154,7 +148,7 @@ class StunningSweep : Components.GenericAOEs public StunningSweep() : base(ActionID.MakeSpell(AID.StunningSweep)) { } - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_castersSweepDischarge.Count > 0) return _castersSweepDischarge.Select(c => new AOEInstance(_shapeSweepDischarge, c.Position, c.CastInfo!.Rotation, c.CastInfo!.NPCFinishAt)); @@ -162,12 +156,12 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, return _castersThermobaric.Select(c => new AOEInstance(_shapeThermobaric, c.Position, c.CastInfo!.Rotation, c.CastInfo!.NPCFinishAt)); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { CastersForSpell(module, spell.Action, false)?.Add(caster); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { CastersForSpell(module, spell.Action, true)?.Remove(caster); } @@ -175,7 +169,7 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn private List? CastersForSpell(BossModule module, ActionID spell, bool forRemove) => (AID)spell.ID switch { AID.StunningSweepAOE or AID.StunningSweepDischarge => _castersSweepDischarge, - AID.ThermobaricCharge => forRemove || module.PrimaryActor.CastInfo != null ? _castersThermobaric : null, // note: this component cares about cast while boss is casting + AID.ThermobaricCharge => forRemove || Module.PrimaryActor.CastInfo != null ? _castersThermobaric : null, // note: this component cares about cast while boss is casting _ => null }; } @@ -190,7 +184,7 @@ class AngrySalamander : Components.GenericAOEs public AngrySalamander() : base(ActionID.MakeSpell(AID.AngrySalamander)) { } - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { foreach (var c in _castersSalamander) yield return new(_shapeSalamander, c.Position, c.CastInfo!.Rotation, c.CastInfo!.NPCFinishAt); @@ -198,20 +192,20 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, yield return new(_shapeThermobaric, c.Position, c.CastInfo!.Rotation, c.CastInfo!.NPCFinishAt); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { CastersForSpell(module, spell.Action, false)?.Add(caster); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { CastersForSpell(module, spell.Action, true)?.Remove(caster); } private List? CastersForSpell(BossModule module, ActionID spell, bool forRemove) => (AID)spell.ID switch { - AID.AngrySalamanderAOE => forRemove || module.PrimaryActor.IsTargetable ? _castersSalamander : null, // note: this component cares only about cast when boss is targetable - AID.ThermobaricCharge => forRemove || module.PrimaryActor.CastInfo == null ? _castersThermobaric : null, // note: this component cares about thermobarics while boss is not casting + AID.AngrySalamanderAOE => forRemove || Module.PrimaryActor.IsTargetable ? _castersSalamander : null, // note: this component cares only about cast when boss is targetable + AID.ThermobaricCharge => forRemove || Module.PrimaryActor.CastInfo == null ? _castersThermobaric : null, // note: this component cares about thermobarics while boss is not casting _ => null }; } @@ -231,7 +225,4 @@ public D133LiviaStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 15, NameID = 2118)] -public class D133Livia : BossModule -{ - public D133Livia(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(-98, -33), 20)) { } -} +public class D133Livia(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(-98, -33), 20)); diff --git a/BossMod/Modules/RealmReborn/Dungeon/D14Praetorium/D141Colossus.cs b/BossMod/Modules/RealmReborn/Dungeon/D14Praetorium/D141Colossus.cs index 9d0d7a6f54..52cec644e9 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D14Praetorium/D141Colossus.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D14Praetorium/D141Colossus.cs @@ -19,30 +19,15 @@ public enum AID : uint GrandSword = 28473, // Boss->self, 5.0s cast, range 25 90-degree cone aoe } -class CeruleumVent : Components.RaidwideCast -{ - public CeruleumVent() : base(ActionID.MakeSpell(AID.CeruleumVent)) { } -} +class CeruleumVent(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.CeruleumVent)); -class PrototypeLaserAlpha1 : Components.LocationTargetedAOEs -{ - public PrototypeLaserAlpha1() : base(ActionID.MakeSpell(AID.IronKissAlpha1), 6) { } -} +class PrototypeLaserAlpha1(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.IronKissAlpha1), 6); -class PrototypeLaserAlpha2 : Components.LocationTargetedAOEs -{ - public PrototypeLaserAlpha2() : base(ActionID.MakeSpell(AID.IronKissAlpha2), 6) { } -} +class PrototypeLaserAlpha2(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.IronKissAlpha2), 6); -class PrototypeLaserBeta : Components.SpreadFromCastTargets -{ - public PrototypeLaserBeta() : base(ActionID.MakeSpell(AID.IronKissBeta), 5, false) { } -} +class PrototypeLaserBeta(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.IronKissBeta), 5, false); -class GrandSword : Components.SelfTargetedAOEs -{ - public GrandSword() : base(ActionID.MakeSpell(AID.GrandSword), new AOEShapeCone(25, 45.Degrees())) { } -} +class GrandSword(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.GrandSword), new AOEShapeCone(25, 45.Degrees())); class D141ColossusStates : StateMachineBuilder { @@ -58,7 +43,4 @@ public D141ColossusStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 16, NameID = 2134)] -public class D141Colossus : BossModule -{ - public D141Colossus(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(192, 0), 15)) { } -} +public class D141Colossus(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(192, 0), 15)); diff --git a/BossMod/Modules/RealmReborn/Dungeon/D14Praetorium/D142Nero.cs b/BossMod/Modules/RealmReborn/Dungeon/D14Praetorium/D142Nero.cs index e6713e09a8..20cffbc443 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D14Praetorium/D142Nero.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D14Praetorium/D142Nero.cs @@ -21,41 +21,26 @@ public enum AID : uint WheelOfSuffering = 28481, // Boss->self, 3.5s cast, range 7 circle aoe (knockback 12) } -class IronUprising : Components.SelfTargetedAOEs -{ - public IronUprising() : base(ActionID.MakeSpell(AID.IronUprising), new AOEShapeCone(7, 60.Degrees())) { } -} +class IronUprising(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.IronUprising), new AOEShapeCone(7, 60.Degrees())); -class SpineShatter : Components.SingleTargetCast -{ - public SpineShatter() : base(ActionID.MakeSpell(AID.SpineShatter)) { } -} +class SpineShatter(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.SpineShatter)); class AugmentedSuffering : Components.KnockbackFromCastTarget { public AugmentedSuffering() : base(ActionID.MakeSpell(AID.AugmentedSuffering), 12) { } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { if (Casters.Count > 0) - hints.AddForbiddenZone(ShapeDistance.InvertedCircle(module.Bounds.Center, module.Bounds.HalfSize - Distance), Casters[0].CastInfo!.NPCFinishAt); + hints.AddForbiddenZone(ShapeDistance.InvertedCircle(Module.Bounds.Center, Module.Bounds.HalfSize - Distance), Casters[0].CastInfo!.NPCFinishAt); } } -class AugmentedShatter : Components.StackWithCastTargets -{ - public AugmentedShatter() : base(ActionID.MakeSpell(AID.AugmentedShatter), 6, 4) { } -} +class AugmentedShatter(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.AugmentedShatter), 6, 4); -class AugmentedUprising : Components.SelfTargetedAOEs -{ - public AugmentedUprising() : base(ActionID.MakeSpell(AID.AugmentedUprising), new AOEShapeCone(45, 45.Degrees())) { } -} +class AugmentedUprising(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.AugmentedUprising), new AOEShapeCone(45, 45.Degrees())); -class WheelOfSuffering : Components.SelfTargetedAOEs -{ - public WheelOfSuffering() : base(ActionID.MakeSpell(AID.WheelOfSuffering), new AOEShapeCircle(7)) { } -} +class WheelOfSuffering(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.WheelOfSuffering), new AOEShapeCircle(7)); class D142NeroStates : StateMachineBuilder { diff --git a/BossMod/Modules/RealmReborn/Dungeon/D14Praetorium/D143Gaius.cs b/BossMod/Modules/RealmReborn/Dungeon/D14Praetorium/D143Gaius.cs index e078e89b33..4cdf451c5c 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D14Praetorium/D143Gaius.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D14Praetorium/D143Gaius.cs @@ -36,62 +36,38 @@ public enum AID : uint VeniVidiViciEnrage = 28500, // Boss->self, no cast, enrage (if adds aren't killed in 90s) } -class TerminusEstTriple : Components.SelfTargetedAOEs -{ - public TerminusEstTriple() : base(ActionID.MakeSpell(AID.TerminusEstTriple), new AOEShapeRect(40, 2)) { } -} +class TerminusEstTriple(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TerminusEstTriple), new AOEShapeRect(40, 2)); -class TerminusEstQuintuple : Components.SelfTargetedAOEs -{ - public TerminusEstQuintuple() : base(ActionID.MakeSpell(AID.TerminusEstQuintuple), new AOEShapeRect(40, 2)) { } -} +class TerminusEstQuintuple(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TerminusEstQuintuple), new AOEShapeRect(40, 2)); -class HandOfTheEmpire : Components.SpreadFromCastTargets -{ - public HandOfTheEmpire() : base(ActionID.MakeSpell(AID.HandOfTheEmpireAOE), 5, false) { } -} +class HandOfTheEmpire(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.HandOfTheEmpireAOE), 5, false); -class FestinaLente : Components.StackWithCastTargets -{ - public FestinaLente() : base(ActionID.MakeSpell(AID.FestinaLente), 6, 4) { } -} +class FestinaLente(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.FestinaLente), 6, 4); -class Innocence : Components.SingleTargetCast -{ - public Innocence() : base(ActionID.MakeSpell(AID.Innocence)) { } -} +class Innocence(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.Innocence)); -class HorridaBella : Components.RaidwideCast -{ - public HorridaBella() : base(ActionID.MakeSpell(AID.HorridaBella)) { } -} +class HorridaBella(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.HorridaBella)); -class Ductus : Components.LocationTargetedAOEs -{ - public Ductus() : base(ActionID.MakeSpell(AID.DuctusAOE), 8) { } -} +class Ductus(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.DuctusAOE), 8); class AddEnrage : BossComponent { private DateTime _enrage; - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (_enrage != default) - hints.Add($"Enrage in {(_enrage - module.WorldState.CurrentTime).TotalSeconds:f1}s"); + hints.Add($"Enrage in {(_enrage - WorldState.CurrentTime).TotalSeconds:f1}s"); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.AddPhaseStart) - _enrage = module.WorldState.CurrentTime.AddSeconds(91); + _enrage = WorldState.FutureTime(91); } } -class Heirsbane : Components.SingleTargetCast -{ - public Heirsbane() : base(ActionID.MakeSpell(AID.Innocence), "") { } -} +class Heirsbane(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.Innocence), ""); class D143GaiusStates : StateMachineBuilder { diff --git a/BossMod/Modules/RealmReborn/Dungeon/D15WanderersPalace/D151KeeperOfHalidom.cs b/BossMod/Modules/RealmReborn/Dungeon/D15WanderersPalace/D151KeeperOfHalidom.cs index b2adffd5dd..b5090c8d31 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D15WanderersPalace/D151KeeperOfHalidom.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D15WanderersPalace/D151KeeperOfHalidom.cs @@ -15,10 +15,7 @@ public enum AID : uint MoldyPhlegm = 941, // Boss->location, 2.5s cast, range 6 circle } -class MoldySneeze : Components.Cleave -{ - public MoldySneeze() : base(ActionID.MakeSpell(AID.MoldySneeze), new AOEShapeCone(8.85f, 45.Degrees())) { } -} +class MoldySneeze(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.MoldySneeze), new AOEShapeCone(8.85f, 45.Degrees())); class InhaleGoobbuesGrief : Components.GenericAOEs { @@ -29,15 +26,15 @@ class InhaleGoobbuesGrief : Components.GenericAOEs private static readonly AOEShapeCone _shapeInhale = new(22.85f, 45.Degrees()); private static readonly AOEShapeCircle _shapeGrief = new(8.85f); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_showInhale) - yield return new(_shapeInhale, module.PrimaryActor.Position, module.PrimaryActor.CastInfo!.Rotation, module.PrimaryActor.CastInfo.NPCFinishAt); + yield return new(_shapeInhale, Module.PrimaryActor.Position, Module.PrimaryActor.CastInfo!.Rotation, Module.PrimaryActor.CastInfo.NPCFinishAt); if (_showGrief) - yield return new(_shapeGrief, module.PrimaryActor.Position, new(), _griefActivation); + yield return new(_shapeGrief, Module.PrimaryActor.Position, new(), _griefActivation); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { @@ -51,7 +48,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { @@ -65,10 +62,7 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn } } -class MoldyPhlegm : Components.LocationTargetedAOEs -{ - public MoldyPhlegm() : base(ActionID.MakeSpell(AID.MoldyPhlegm), 6) { } -} +class MoldyPhlegm(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.MoldyPhlegm), 6); class D151KeeperOfHalidomStates : StateMachineBuilder { @@ -82,7 +76,4 @@ public D151KeeperOfHalidomStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 10, NameID = 1548)] -public class D151KeeperOfHalidom : BossModule -{ - public D151KeeperOfHalidom(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsSquare(new(125, 108), 20)) { } -} +public class D151KeeperOfHalidom(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsSquare(new(125, 108), 20)); diff --git a/BossMod/Modules/RealmReborn/Dungeon/D15WanderersPalace/D152GiantBavarois.cs b/BossMod/Modules/RealmReborn/Dungeon/D15WanderersPalace/D152GiantBavarois.cs index 235db7ed9f..bc53a9fda8 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D15WanderersPalace/D152GiantBavarois.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D15WanderersPalace/D152GiantBavarois.cs @@ -25,31 +25,28 @@ public enum IconID : uint AmorphicFlail = 1, // player } -class Fire : Components.SingleTargetCast -{ - public Fire() : base(ActionID.MakeSpell(AID.Fire), "Single-target damage") { } -} +class Fire(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.Fire), "Single-target damage"); // TODO: verify implementation; find a condition for kite end class AmorphicFlail : BossComponent { private Actor? _kiter; - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { if (actor == _kiter) - hints.AddForbiddenZone(ShapeDistance.Circle(module.PrimaryActor.Position, 8)); + hints.AddForbiddenZone(ShapeDistance.Circle(Module.PrimaryActor.Position, 8)); } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.AmorphicFlail) _kiter = actor; } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { - if (caster == module.PrimaryActor && (AID)spell.Action.ID == AID.AmorphicFlail) + if (caster == Module.PrimaryActor && (AID)spell.Action.ID == AID.AmorphicFlail) _kiter = null; } } @@ -65,7 +62,4 @@ public D152GiantBavaroisStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 10, NameID = 1549)] -public class D152GiantBavarois : BossModule -{ - public D152GiantBavarois(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsSquare(new(43, -232), 20)) { } -} +public class D152GiantBavarois(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsSquare(new(43, -232), 20)); diff --git a/BossMod/Modules/RealmReborn/Dungeon/D16Amdapor/D161Psycheflayer.cs b/BossMod/Modules/RealmReborn/Dungeon/D16Amdapor/D161Psycheflayer.cs index 76a08ef88c..1e28ba685a 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D16Amdapor/D161Psycheflayer.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D16Amdapor/D161Psycheflayer.cs @@ -27,45 +27,21 @@ public enum AID : uint Plaincracker = 1087, // MegalithMarionette->self, 7.0s cast, range 25+R circle } -class VoidFireCleave : Components.Cleave -{ - public VoidFireCleave() : base(ActionID.MakeSpell(AID.VoidFireCleave), new AOEShapeCircle(5), originAtTarget: true) { } -} +class VoidFireCleave(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.VoidFireCleave), new AOEShapeCircle(5), originAtTarget: true); -class VoidFireAOE : Components.LocationTargetedAOEs -{ - public VoidFireAOE() : base(ActionID.MakeSpell(AID.VoidFireAOE), 5) { } -} +class VoidFireAOE(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.VoidFireAOE), 5); -class VoidThunder : Components.SingleTargetCast -{ - public VoidThunder() : base(ActionID.MakeSpell(AID.VoidThunder), "Interruptible tankbuster") { } -} +class VoidThunder(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.VoidThunder), "Interruptible tankbuster"); -class MindMelt : Components.RaidwideCast -{ - public MindMelt() : base(ActionID.MakeSpell(AID.MindMelt), "Interruptible raidwide") { } -} +class MindMelt(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.MindMelt), "Interruptible raidwide"); -class Canker : Components.CastHint -{ - public Canker() : base(ActionID.MakeSpell(AID.Canker), "Interruptible debuff") { } -} +class Canker(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.Canker), "Interruptible debuff"); -class Rockslide : Components.SelfTargetedAOEs -{ - public Rockslide() : base(ActionID.MakeSpell(AID.Rockslide), new AOEShapeRect(12.76f, 4)) { } -} +class Rockslide(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Rockslide), new AOEShapeRect(12.76f, 4)); -class Obliterate : Components.RaidwideCast -{ - public Obliterate() : base(ActionID.MakeSpell(AID.Obliterate)) { } -} +class Obliterate(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.Obliterate)); -class Plaincracker : Components.SelfTargetedAOEs -{ - public Plaincracker() : base(ActionID.MakeSpell(AID.Plaincracker), new AOEShapeCircle(30.5f)) { } -} +class Plaincracker(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Plaincracker), new AOEShapeCircle(30.5f)); class D161PsycheflayerStates : StateMachineBuilder { diff --git a/BossMod/Modules/RealmReborn/Dungeon/D16Amdapor/D162DemonWall.cs b/BossMod/Modules/RealmReborn/Dungeon/D16Amdapor/D162DemonWall.cs index a9a2bc1940..a601a258d7 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D16Amdapor/D162DemonWall.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D16Amdapor/D162DemonWall.cs @@ -15,26 +15,20 @@ public enum AID : uint Repel = 1047, // Boss->self, 3.0s cast, range 40+R 180?-degree cone knockback 20 (non-immunable) } -class LiquefyCenter : Components.SelfTargetedAOEs -{ - public LiquefyCenter() : base(ActionID.MakeSpell(AID.LiquefyCenter), new AOEShapeRect(50, 4)) { } -} +class LiquefyCenter(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.LiquefyCenter), new AOEShapeRect(50, 4)); -class LiquefySides : Components.SelfTargetedAOEs -{ - public LiquefySides() : base(ActionID.MakeSpell(AID.LiquefySides), new AOEShapeRect(50, 3.5f)) { } -} +class LiquefySides(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.LiquefySides), new AOEShapeRect(50, 3.5f)); class Repel : Components.KnockbackFromCastTarget { public Repel() : base(ActionID.MakeSpell(AID.Repel), 20, true) { } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { // custom hint: stay in narrow zone in center if (Casters.Count > 0) { - var safe = ShapeDistance.Rect(module.PrimaryActor.Position, 0.Degrees(), 50, -2, 1); + var safe = ShapeDistance.Rect(Module.PrimaryActor.Position, 0.Degrees(), 50, -2, 1); hints.AddForbiddenZone(p => -safe(p)); } } @@ -44,9 +38,9 @@ class ForbiddenZones : Components.GenericAOEs { private static readonly AOEShapeRect _shape = new(50, 10); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { - yield return new(_shape, module.PrimaryActor.Position, 180.Degrees()); // area behind boss + yield return new(_shape, Module.PrimaryActor.Position, 180.Degrees()); // area behind boss var pollen = module.Enemies(OID.Pollen).FirstOrDefault(); if (pollen != null && pollen.EventState == 0) @@ -68,7 +62,4 @@ public D162DemonWallStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 14, NameID = 1694)] -public class D162DemonWall : BossModule -{ - public D162DemonWall(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsRect(new(200, -131), 10, 21)) { } -} +public class D162DemonWall(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsRect(new(200, -131), 10, 21)); diff --git a/BossMod/Modules/RealmReborn/Dungeon/D16Amdapor/D163Anantaboga.cs b/BossMod/Modules/RealmReborn/Dungeon/D16Amdapor/D163Anantaboga.cs index 99ca038807..cba36477f2 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D16Amdapor/D163Anantaboga.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D16Amdapor/D163Anantaboga.cs @@ -29,20 +29,11 @@ public enum TetherID : uint PlagueDance = 1, // Boss->player } -class TheLook : Components.Cleave -{ - public TheLook() : base(ActionID.MakeSpell(AID.TheLook), new AOEShapeCone(11.5f, 45.Degrees())) { } // TODO: verify angle -} +class TheLook(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.TheLook), new AOEShapeCone(11.5f, 45.Degrees())); // TODO: verify angle -class RottenBreath : Components.SelfTargetedAOEs -{ - public RottenBreath() : base(ActionID.MakeSpell(AID.RottenBreath), new AOEShapeCone(11.5f, 45.Degrees())) { } // TODO: verify angle -} +class RottenBreath(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RottenBreath), new AOEShapeCone(11.5f, 45.Degrees())); // TODO: verify angle -class TailDrive : Components.SelfTargetedAOEs -{ - public TailDrive() : base(ActionID.MakeSpell(AID.TailDrive), new AOEShapeCone(35.5f, 45.Degrees())) { } -} +class TailDrive(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TailDrive), new AOEShapeCone(35.5f, 45.Degrees())); class ImminentCatastrophe : Components.CastLineOfSightAOE { @@ -50,10 +41,7 @@ public ImminentCatastrophe() : base(ActionID.MakeSpell(AID.ImminentCatastrophe), public override IEnumerable BlockerActors(BossModule module) => ((D163Anantaboga)module).ActivePillars(); } -class TerrorEye : Components.LocationTargetedAOEs -{ - public TerrorEye() : base(ActionID.MakeSpell(AID.TerrorEye), 6) { } -} +class TerrorEye(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.TerrorEye), 6); class PlagueDance : BossComponent { @@ -62,7 +50,7 @@ class PlagueDance : BossComponent private static readonly AOEShapeCircle _shape = new(11.5f); - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { if (actor == _target) { @@ -75,36 +63,33 @@ public override void AddAIHints(BossModule module, int slot, Actor actor, PartyR } } - public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) + public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) { return player == _target ? PlayerPriority.Danger : PlayerPriority.Irrelevant; } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { _shape.Outline(arena, _target); } - public override void OnTethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnTethered(Actor source, ActorTetherInfo tether) { if (tether.ID == (uint)TetherID.PlagueDance) { - _target = module.WorldState.Actors.Find(tether.Target); - _activation = module.WorldState.CurrentTime.AddSeconds(6.1f); + _target = WorldState.Actors.Find(tether.Target); + _activation = WorldState.FutureTime(6.1f); } } - public override void OnUntethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnUntethered(Actor source, ActorTetherInfo tether) { if (tether.ID == (uint)TetherID.PlagueDance) _target = null; } } -class BubonicCloud : Components.PersistentVoidzone -{ - public BubonicCloud() : base(11.5f, m => m.Enemies(OID.DarkNova)) { } -} +class BubonicCloud(BossModule module) : Components.PersistentVoidzone(module, 11.5f, m => m.Enemies(OID.DarkNova)); class D163AnantabogaStates : StateMachineBuilder { diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/AethericBoom.cs b/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/AethericBoom.cs index 16370ae55b..b71a61d73b 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/AethericBoom.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/AethericBoom.cs @@ -14,7 +14,7 @@ class AethericBoom : Components.CastHint public AethericBoom() : base(ActionID.MakeSpell(AID.AethericBoom), "Knockback + orbs") { } - public override void Update(BossModule module) + public override void Update() { // cleanup _orbsToPop.RemoveAll(a => a.IsDestroyed); @@ -52,12 +52,12 @@ public override void Update(BossModule module) } } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { if (!OrbsActive) return; - if (module.PrimaryActor.TargetID == actor.InstanceID) + if (Module.PrimaryActor.TargetID == actor.InstanceID) { // current MT should not be doing this mechanic foreach (var orb in _activeOrbs) @@ -70,7 +70,7 @@ public override void AddAIHints(BossModule module, int slot, Actor actor, PartyR if (NumCasts < 2) { // first or second cast in progress => stack S of boss to be knocked back roughly in same direction - hints.AddForbiddenZone(ShapeDistance.Cone(module.PrimaryActor.Position, 50, 180.Degrees(), 170.Degrees())); + hints.AddForbiddenZone(ShapeDistance.Cone(Module.PrimaryActor.Position, 50, 180.Degrees(), 170.Degrees())); } else { @@ -89,7 +89,7 @@ public override void AddAIHints(BossModule module, int slot, Actor actor, PartyR { // run to pop next orb var nextOrb = _orbsToPop[0]; - if (actor.Role is Role.Melee or Role.Tank && module.Raid.WithoutSlot().InRadius(nextOrb.Position, _explosionRadius).Count() > 5) + if (actor.Role is Role.Melee or Role.Tank && Raid.WithoutSlot().InRadius(nextOrb.Position, _explosionRadius).Count() > 5) { // pop the orb hints.AddForbiddenZone(ShapeDistance.InvertedCircle(nextOrb.Position, 1.5f)); @@ -102,7 +102,7 @@ public override void AddAIHints(BossModule module, int slot, Actor actor, PartyR } } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (var orb in _activeOrbs) { @@ -111,7 +111,7 @@ public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { base.OnEventCast(module, caster, spell); if ((AID)spell.Action.ID == AID.AetheroplasmBoom) diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/Aetheroplasm.cs b/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/Aetheroplasm.cs index 7a451eb557..c1e9096a4f 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/Aetheroplasm.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/Aetheroplasm.cs @@ -11,13 +11,13 @@ class Aetheroplasm : BossComponent private static readonly float _explosionRadius = 6; - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_kiters[slot]) hints.Add("Kite the orb!", false); } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { foreach (var orb in module.Enemies(OID.Aetheroplasm).Where(a => !_explodedOrbs.Contains(a.InstanceID))) { @@ -29,12 +29,12 @@ public override void AddAIHints(BossModule module, int slot, Actor actor, PartyR } } - public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) + public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) { return _kiters[playerSlot] ? PlayerPriority.Danger : PlayerPriority.Irrelevant; } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (var orb in module.Enemies(OID.Aetheroplasm).Where(a => !_explodedOrbs.Contains(a.InstanceID))) { @@ -46,12 +46,12 @@ public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { case AID.OrbFixate: - _kiters.Set(module.Raid.FindSlot(spell.MainTargetID)); + _kiters.Set(Raid.FindSlot(spell.MainTargetID)); break; case AID.AetheroplasmFixated: _explodedOrbs.Add(caster.InstanceID); @@ -69,6 +69,6 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent if (_kiters.None()) return null; var orbDir = orb.Rotation.ToDirection(); - return module.Raid.WithSlot().IncludedInMask(_kiters).MaxBy(a => (a.Item2.Position - orb.Position).Normalized().Dot(orbDir)).Item2; + return Raid.WithSlot().IncludedInMask(_kiters).MaxBy(a => (a.Item2.Position - orb.Position).Normalized().Dot(orbDir)).Item2; } } diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/CrimsonCyclone.cs b/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/CrimsonCyclone.cs index ebf3636562..b7db5df9fe 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/CrimsonCyclone.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/CrimsonCyclone.cs @@ -11,13 +11,13 @@ class CrimsonCyclone : Components.GenericAOEs public CrimsonCyclone() : base(ActionID.MakeSpell(AID.CrimsonCyclone)) { } - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_ifrit != null) yield return new(_shape, _ifrit.Position, _ifrit.Rotation, _resolve); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) { @@ -26,18 +26,18 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) _ifrit = null; } - public override void OnActorPlayActionTimelineEvent(BossModule module, Actor actor, ushort id) + public override void OnActorPlayActionTimelineEvent(Actor actor, ushort id) { if ((OID)actor.OID == OID.UltimaIfrit && id == 0x008D) { _ifrit = actor; - _resolve = module.WorldState.CurrentTime.AddSeconds(5); + _resolve = WorldState.FutureTime(5); } } } diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/Ex1Ultima.cs b/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/Ex1Ultima.cs index 4918831167..a57c0f2c05 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/Ex1Ultima.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/Ex1Ultima.cs @@ -1,39 +1,18 @@ namespace BossMod.RealmReborn.Extreme.Ex1Ultima; -class RadiantPlume : Components.LocationTargetedAOEs -{ - public RadiantPlume() : base(ActionID.MakeSpell(AID.RadiantPlume), 8) { } -} +class RadiantPlume(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.RadiantPlume), 8); -class WeightOfTheLand : Components.LocationTargetedAOEs -{ - public WeightOfTheLand() : base(ActionID.MakeSpell(AID.WeightOfTheLand), 6) { } -} +class WeightOfTheLand(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.WeightOfTheLand), 6); -class Eruption : Components.LocationTargetedAOEs -{ - public Eruption() : base(ActionID.MakeSpell(AID.Eruption), 8) { } -} +class Eruption(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Eruption), 8); -class MagitekRayCenter : Components.SelfTargetedAOEs -{ - public MagitekRayCenter() : base(ActionID.MakeSpell(AID.MagitekRayCenter), new AOEShapeRect(40, 3)) { } -} +class MagitekRayCenter(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.MagitekRayCenter), new AOEShapeRect(40, 3)); -class MagitekRayLeft : Components.SelfTargetedAOEs -{ - public MagitekRayLeft() : base(ActionID.MakeSpell(AID.MagitekRayLeft), new AOEShapeRect(40, 3)) { } -} +class MagitekRayLeft(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.MagitekRayLeft), new AOEShapeRect(40, 3)); -class MagitekRayRight : Components.SelfTargetedAOEs -{ - public MagitekRayRight() : base(ActionID.MakeSpell(AID.MagitekRayRight), new AOEShapeRect(40, 3)) { } -} +class MagitekRayRight(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.MagitekRayRight), new AOEShapeRect(40, 3)); -class AssaultCannon : Components.SelfTargetedAOEs -{ - public AssaultCannon() : base(ActionID.MakeSpell(AID.AssaultCannon), new AOEShapeRect(45, 1)) { } -} +class AssaultCannon(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.AssaultCannon), new AOEShapeRect(45, 1)); // TODO: homing lasers & ceruleum vent? do we care? damage is not high, and visual clutter sucks // TODO: diffractive laser cleave? do we care?.. it's a bit problematic, since it shouldn't be active when many other mechanics are in progress, and it doesn't really add much value... diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/Ex1UltimaAI.cs b/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/Ex1UltimaAI.cs index 04e36389bc..c050df734f 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/Ex1UltimaAI.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/Ex1UltimaAI.cs @@ -12,9 +12,9 @@ public override void Init(BossModule module) _viscousAetheroplasm = module.FindComponent(); } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { - if (module.PrimaryActor.TargetID != actor.InstanceID && hints.ForbiddenZones.Count == 1 && !module.Enemies(OID.MagitekBit).Any(a => !a.IsDead)) // for non-mt, there is always a cleave + if (Module.PrimaryActor.TargetID != actor.InstanceID && hints.ForbiddenZones.Count == 1 && !module.Enemies(OID.MagitekBit).Any(a => !a.IsDead)) // for non-mt, there is always a cleave { // default positions: tank boss at the edge facing N, OT south of boss, M1/M2 to the left/right (so that they can slightly adjust for positionals), H1/H2/R1/R2 to S outside ceruleum vent range, all spread somewhat to avoid homing lasers // when tanks need to swap, OT moves between boss and MT and taunts; OT needs to ignore diffractive lasers at this point @@ -28,7 +28,7 @@ public override void AddAIHints(BossModule module, int slot, Actor actor, PartyR PartyRolesConfig.Assignment.H2 => _rangedRange * (-10).Degrees().ToDirection(), _ => new(0, _viscousAetheroplasm!.NeedTankSwap ? -2 : _meleeRange) }; - hints.AddForbiddenZone(ShapeDistance.InvertedCircle(module.PrimaryActor.Position + hintOffset, 1.5f), DateTime.MaxValue); + hints.AddForbiddenZone(ShapeDistance.InvertedCircle(Module.PrimaryActor.Position + hintOffset, 1.5f), DateTime.MaxValue); } foreach (var e in hints.PotentialTargets) @@ -41,7 +41,7 @@ public override void AddAIHints(BossModule module, int slot, Actor actor, PartyR e.AttackStrength = 0.25f; e.DesiredPosition = new(0, -10); e.DesiredRotation = 180.Degrees(); - e.PreferProvoking = e.ShouldBeTanked = module.PrimaryActor.TargetID == actor.InstanceID ? !_viscousAetheroplasm!.NeedTankSwap : _viscousAetheroplasm!.NeedTankSwap && actor.Role == Role.Tank && actor.PosRot.Z < module.PrimaryActor.PosRot.Z; + e.PreferProvoking = e.ShouldBeTanked = Module.PrimaryActor.TargetID == actor.InstanceID ? !_viscousAetheroplasm!.NeedTankSwap : _viscousAetheroplasm!.NeedTankSwap && actor.Role == Role.Tank && actor.PosRot.Z < Module.PrimaryActor.PosRot.Z; break; case OID.MagitekBit: e.Priority = 2; diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/EyeOfTheStormGeocrush.cs b/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/EyeOfTheStormGeocrush.cs index 366697b40d..5c3a97ebc6 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/EyeOfTheStormGeocrush.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/EyeOfTheStormGeocrush.cs @@ -10,7 +10,7 @@ class EyeOfTheStormGeocrush : BossComponent private static readonly AOEShapeDonut _aoeEOTS = new(12, 25); private static readonly AOEShapeCircle _aoeGeocrush = new(18); // TODO: check falloff - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_eotsCaster != null) hints.Add("Stand near inner edge", _aoeEOTS.Check(actor.Position, _eotsCaster)); @@ -18,7 +18,7 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint hints.Add("Go to edge!"); } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { if (_eotsCaster != null) { @@ -33,7 +33,7 @@ public override void AddAIHints(BossModule module, int slot, Actor actor, PartyR } } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { if (_eotsCaster != null) _aoeEOTS.Draw(arena, _eotsCaster); @@ -41,7 +41,7 @@ public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc _aoeGeocrush.Draw(arena, _geocrushCaster); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { @@ -54,7 +54,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/Freefire.cs b/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/Freefire.cs index 274a00f428..67ab2217be 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/Freefire.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/Freefire.cs @@ -10,15 +10,15 @@ class Freefire : Components.GenericAOEs public Freefire() : base(ActionID.MakeSpell(AID.Freefire)) { } - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { foreach (var c in _casters) yield return new(_shape, c.Position, new(), _resolve); } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { - if (Active && module.PrimaryActor.TargetID == actor.InstanceID && NumCasts > 0) + if (Active && Module.PrimaryActor.TargetID == actor.InstanceID && NumCasts > 0) { // for second set, let current MT stay in place and use invuln instead of risking cleaving the raid var invuln = actor.Class switch @@ -29,7 +29,7 @@ public override void AddAIHints(BossModule module, int slot, Actor actor, PartyR }; if (invuln) { - hints.PlannedActions.Add((invuln, actor, (float)(_resolve - module.WorldState.CurrentTime).TotalSeconds, false)); + hints.PlannedActions.Add((invuln, actor, (float)(_resolve - WorldState.CurrentTime).TotalSeconds, false)); return; } } @@ -37,16 +37,16 @@ public override void AddAIHints(BossModule module, int slot, Actor actor, PartyR base.AddAIHints(module, slot, actor, assignment, hints); } - public override void OnActorPlayActionTimelineEvent(BossModule module, Actor actor, ushort id) + public override void OnActorPlayActionTimelineEvent(Actor actor, ushort id) { if ((OID)actor.OID == OID.Helper && id == 0x0449) { _casters.Add(actor); - _resolve = module.WorldState.CurrentTime.AddSeconds(6); + _resolve = WorldState.FutureTime(6); } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { base.OnEventCast(module, caster, spell); if (spell.Action == WatchedAction) diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/MistralSongVulcanBurst.cs b/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/MistralSongVulcanBurst.cs index 3e4e581ad5..6fb322fec3 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/MistralSongVulcanBurst.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/MistralSongVulcanBurst.cs @@ -10,18 +10,18 @@ class MistralSongVulcanBurst : Components.GenericAOEs public MistralSongVulcanBurst() : base(ActionID.MakeSpell(AID.MistralSong)) { } - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (Active) yield return new(_shape, _garuda!.Position, _garuda!.Rotation, _resolve); } - public override void Update(BossModule module) + public override void Update() { - Active = _garuda != null && (_resolve - module.WorldState.CurrentTime).TotalSeconds <= 6; // note that garuda continues rotating for next ~0.5s + Active = _garuda != null && (_resolve - WorldState.CurrentTime).TotalSeconds <= 6; // note that garuda continues rotating for next ~0.5s } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { if (!Active) return; @@ -29,13 +29,13 @@ public override void AddAIHints(BossModule module, int slot, Actor actor, PartyR // we have custom shape before burst - we try to make it so that post-knockback position is safe if (_burstImminent) { - var p1 = module.Bounds.Center + module.Bounds.HalfSize * (_garuda!.Rotation + _shape.HalfAngle).ToDirection(); - var p2 = module.Bounds.Center + module.Bounds.HalfSize * (_garuda!.Rotation - _shape.HalfAngle).ToDirection(); - var a1 = Angle.FromDirection(p1 - module.PrimaryActor.Position); - var a2 = Angle.FromDirection(p2 - module.PrimaryActor.Position); + var p1 = Module.Bounds.Center + Module.Bounds.HalfSize * (_garuda!.Rotation + _shape.HalfAngle).ToDirection(); + var p2 = Module.Bounds.Center + Module.Bounds.HalfSize * (_garuda!.Rotation - _shape.HalfAngle).ToDirection(); + var a1 = Angle.FromDirection(p1 - Module.PrimaryActor.Position); + var a2 = Angle.FromDirection(p2 - Module.PrimaryActor.Position); if (a2.Rad > a1.Rad) a2 -= 360.Degrees(); - hints.AddForbiddenZone(ShapeDistance.Cone(module.PrimaryActor.Position, 40, (a1 + a2) / 2, (a1 - a2) / 2), _resolve); + hints.AddForbiddenZone(ShapeDistance.Cone(Module.PrimaryActor.Position, 40, (a1 + a2) / 2, (a1 - a2) / 2), _resolve); } else { @@ -43,15 +43,15 @@ public override void AddAIHints(BossModule module, int slot, Actor actor, PartyR } } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { base.DrawArenaForeground(module, pcSlot, pc, arena); - var adjPos = _burstImminent ? arena.Bounds.ClampToBounds(Components.Knockback.AwayFromSource(pc.Position, module.PrimaryActor, 30)) : pc.Position; + var adjPos = _burstImminent ? arena.Bounds.ClampToBounds(Components.Knockback.AwayFromSource(pc.Position, Module.PrimaryActor, 30)) : pc.Position; Components.Knockback.DrawKnockback(pc, adjPos, arena); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) { @@ -61,25 +61,25 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) _garuda = null; } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { base.OnEventCast(module, caster, spell); if ((AID)spell.Action.ID == AID.VulcanBurst) _burstImminent = false; } - public override void OnActorPlayActionTimelineEvent(BossModule module, Actor actor, ushort id) + public override void OnActorPlayActionTimelineEvent(Actor actor, ushort id) { if ((OID)actor.OID == OID.UltimaGaruda && id == 0x0588) { _garuda = actor; - _resolve = module.WorldState.CurrentTime.AddSeconds(6.6f); + _resolve = WorldState.FutureTime(6.6f); _burstImminent = true; } } diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/TankPurge.cs b/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/TankPurge.cs index 067faeaffb..d0c06c8d13 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/TankPurge.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/TankPurge.cs @@ -4,7 +4,7 @@ class TankPurge : Components.RaidwideCast { public TankPurge() : base(ActionID.MakeSpell(AID.TankPurge)) { } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { base.AddAIHints(module, slot, actor, assignment, hints); @@ -23,19 +23,19 @@ public override void AddAIHints(BossModule module, int slot, Actor actor, PartyR break; case PartyRolesConfig.Assignment.M1: if ((NumCasts & 1) == 0) - hints.PlannedActions.Add((ActionID.MakeSpell(DRG.AID.Feint), module.PrimaryActor, 1, false)); + hints.PlannedActions.Add((ActionID.MakeSpell(DRG.AID.Feint), Module.PrimaryActor, 1, false)); break; case PartyRolesConfig.Assignment.M2: if ((NumCasts & 1) == 1) - hints.PlannedActions.Add((ActionID.MakeSpell(DRG.AID.Feint), module.PrimaryActor, 1, false)); + hints.PlannedActions.Add((ActionID.MakeSpell(DRG.AID.Feint), Module.PrimaryActor, 1, false)); break; case PartyRolesConfig.Assignment.R1: if ((NumCasts & 1) == 0) - hints.PlannedActions.Add((ActionID.MakeSpell(BLM.AID.Addle), module.PrimaryActor, 1, false)); + hints.PlannedActions.Add((ActionID.MakeSpell(BLM.AID.Addle), Module.PrimaryActor, 1, false)); break; case PartyRolesConfig.Assignment.R2: if ((NumCasts & 1) == 1) - hints.PlannedActions.Add((ActionID.MakeSpell(BLM.AID.Addle), module.PrimaryActor, 1, false)); + hints.PlannedActions.Add((ActionID.MakeSpell(BLM.AID.Addle), Module.PrimaryActor, 1, false)); break; } } diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/ViscousAetheroplasm.cs b/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/ViscousAetheroplasm.cs index 1775ba385e..88dcd6d874 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/ViscousAetheroplasm.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/ViscousAetheroplasm.cs @@ -7,27 +7,27 @@ class ViscousAetheroplasm : Components.Cleave public ViscousAetheroplasm() : base(ActionID.MakeSpell(AID.ViscousAetheroplasm), new AOEShapeCircle(2), originAtTarget: true) { } - public override void Update(BossModule module) + public override void Update() { - var tankSlot = module.WorldState.Party.FindSlot(module.PrimaryActor.TargetID); + var tankSlot = WorldState.Party.FindSlot(Module.PrimaryActor.TargetID); NeedTankSwap = tankSlot >= 0 && _stacks[tankSlot] >= 4; } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { base.AddHints(module, slot, actor, hints, movementHints); if (NeedTankSwap && actor.Role == Role.Tank) - hints.Add(module.PrimaryActor.TargetID == actor.InstanceID ? "Pass aggro to co-tank!" : "Taunt boss!"); + hints.Add(Module.PrimaryActor.TargetID == actor.InstanceID ? "Pass aggro to co-tank!" : "Taunt boss!"); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.ViscousAetheroplasm) UpdateStacks(module, actor, status.Extra); } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.ViscousAetheroplasm) UpdateStacks(module, actor, 0); @@ -35,7 +35,7 @@ public override void OnStatusLose(BossModule module, Actor actor, ActorStatus st private void UpdateStacks(BossModule module, Actor actor, int stacks) { - int slot = module.Raid.FindSlot(actor.InstanceID); + int slot = Raid.FindSlot(actor.InstanceID); if (slot >= 0) _stacks[slot] = stacks; } diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/Ex2Garuda.cs b/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/Ex2Garuda.cs index 1f0155b43a..22f779bfa5 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/Ex2Garuda.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/Ex2Garuda.cs @@ -1,54 +1,24 @@ namespace BossMod.RealmReborn.Extreme.Ex2Garuda; -class DownburstBoss : Components.Cleave -{ - public DownburstBoss() : base(ActionID.MakeSpell(AID.Downburst1), new AOEShapeCone(11.7f, 60.Degrees())) { } // TODO: verify angle -} +class DownburstBoss(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.Downburst1), new AOEShapeCone(11.7f, 60.Degrees())); // TODO: verify angle -class DownburstSuparna : Components.Cleave -{ - public DownburstSuparna() : base(ActionID.MakeSpell(AID.Downburst1), new AOEShapeCone(11.36f, 60.Degrees()), (uint)OID.Suparna) { } // TODO: verify angle -} +class DownburstSuparna(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.Downburst1), new AOEShapeCone(11.36f, 60.Degrees()), (uint)OID.Suparna); // TODO: verify angle -class DownburstChirada : Components.Cleave -{ - public DownburstChirada() : base(ActionID.MakeSpell(AID.Downburst2), new AOEShapeCone(11.36f, 60.Degrees()), (uint)OID.Chirada) { } // TODO: verify angle -} +class DownburstChirada(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.Downburst2), new AOEShapeCone(11.36f, 60.Degrees()), (uint)OID.Chirada); // TODO: verify angle -class Slipstream : Components.SelfTargetedAOEs -{ - public Slipstream() : base(ActionID.MakeSpell(AID.Slipstream), new AOEShapeCone(11.7f, 45.Degrees())) { } -} +class Slipstream(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Slipstream), new AOEShapeCone(11.7f, 45.Degrees())); -class FrictionAdds : Components.LocationTargetedAOEs -{ - public FrictionAdds() : base(ActionID.MakeSpell(AID.FrictionAdds), 5) { } -} +class FrictionAdds(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.FrictionAdds), 5); -class FeatherRain : Components.LocationTargetedAOEs -{ - public FeatherRain() : base(ActionID.MakeSpell(AID.FeatherRain), 3) { } -} +class FeatherRain(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.FeatherRain), 3); -class AerialBlast : Components.RaidwideCast -{ - public AerialBlast() : base(ActionID.MakeSpell(AID.AerialBlast)) { } -} +class AerialBlast(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.AerialBlast)); -class MistralShriek : Components.RaidwideCast -{ - public MistralShriek() : base(ActionID.MakeSpell(AID.MistralShriek)) { } -} +class MistralShriek(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.MistralShriek)); -class Gigastorm : Components.SelfTargetedAOEs -{ - public Gigastorm() : base(ActionID.MakeSpell(AID.Gigastorm), new AOEShapeCircle(6.5f)) { } -} +class Gigastorm(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Gigastorm), new AOEShapeCircle(6.5f)); -class GreatWhirlwind : Components.LocationTargetedAOEs -{ - public GreatWhirlwind() : base(ActionID.MakeSpell(AID.GreatWhirlwind), 8) { } -} +class GreatWhirlwind(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.GreatWhirlwind), 8); [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 65, NameID = 1644)] public class Ex2Garuda : BossModule diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/Ex2GarudaAI.cs b/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/Ex2GarudaAI.cs index 310d6d4067..2eaa3272e7 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/Ex2GarudaAI.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/Ex2GarudaAI.cs @@ -10,7 +10,7 @@ public override void Init(BossModule module) _aerialBlast = module.FindComponent(); } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { foreach (var e in hints.PotentialTargets) { @@ -23,12 +23,12 @@ public override void AddAIHints(BossModule module, int slot, Actor actor, PartyR if (_aerialBlast?.NumCasts > 0) { e.DesiredRotation = 135.Degrees(); - e.DesiredPosition = module.Bounds.Center + 18 * e.DesiredRotation.ToDirection(); + e.DesiredPosition = Module.Bounds.Center + 18 * e.DesiredRotation.ToDirection(); } else { e.DesiredRotation = 180.Degrees(); - e.DesiredPosition = module.Bounds.Center + 8 * e.DesiredRotation.ToDirection(); + e.DesiredPosition = Module.Bounds.Center + 8 * e.DesiredRotation.ToDirection(); } break; case OID.Chirada: @@ -40,7 +40,7 @@ public override void AddAIHints(BossModule module, int slot, Actor actor, PartyR e.AttackStrength = 0.15f; e.ShouldBeTanked = assignment == PartyRolesConfig.Assignment.OT; e.DesiredRotation = (_aerialBlast?.NumCasts > 0 ? -45 : 0).Degrees(); - e.DesiredPosition = module.Bounds.Center + 18 * e.DesiredRotation.ToDirection(); + e.DesiredPosition = Module.Bounds.Center + 18 * e.DesiredRotation.ToDirection(); break; case OID.RazorPlume: e.Priority = assignment != PartyRolesConfig.Assignment.MT ? 4 : 0; @@ -53,10 +53,10 @@ public override void AddAIHints(BossModule module, int slot, Actor actor, PartyR e.ShouldBeTanked = false; break; case OID.SpinyPlume: - e.Priority = module.PrimaryActor.IsTargetable ? AIHints.Enemy.PriorityForbidAI : 6; + e.Priority = Module.PrimaryActor.IsTargetable ? AIHints.Enemy.PriorityForbidAI : 6; e.AttackStrength = 0; e.ShouldBeTanked = false; - if (actor.Role == Role.Tank && e.Actor.TargetID != actor.InstanceID && (module.WorldState.Actors.Find(e.Actor.TargetID)?.FindStatus(SID.ThermalLow)?.Extra ?? 0) >= 2) + if (actor.Role == Role.Tank && e.Actor.TargetID != actor.InstanceID && (WorldState.Actors.Find(e.Actor.TargetID)?.FindStatus(SID.ThermalLow)?.Extra ?? 0) >= 2) { e.Priority = 6; e.ShouldBeTanked = e.PreferProvoking = true; @@ -76,7 +76,7 @@ public override void AddAIHints(BossModule module, int slot, Actor actor, PartyR if (haveMonoliths && actor.Role is Role.Healer or Role.Ranged) { // have ranged stay in center to avoid los issues - hints.AddForbiddenZone(ShapeDistance.InvertedCircle(module.Bounds.Center, 7), DateTime.MaxValue); + hints.AddForbiddenZone(ShapeDistance.InvertedCircle(Module.Bounds.Center, 7), DateTime.MaxValue); } } } diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/Ex2GarudaStates.cs b/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/Ex2GarudaStates.cs index 395d006f60..77d0e6c622 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/Ex2GarudaStates.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/Ex2GarudaStates.cs @@ -10,7 +10,7 @@ public Ex2GarudaStates(Ex2Garuda module) : base(module) SimplePhase(0, Phase1, "Plumes") .ActivateOnEnter() .ActivateOnEnter() - .Raw.Update = () => _module.PrimaryActor.IsDestroyed || _module.Chirada.Count + _module.Suparna.Count > 0; + .Raw.Update = () => _Module.PrimaryActor.IsDestroyed || _module.Chirada.Count + _module.Suparna.Count > 0; DeathPhase(1, Phase2) .ActivateOnEnter() .ActivateOnEnter() diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/EyeOfTheStorm.cs b/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/EyeOfTheStorm.cs index 80fcab736f..c8a18c0968 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/EyeOfTheStorm.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/EyeOfTheStorm.cs @@ -8,15 +8,15 @@ class EyeOfTheStorm : Components.GenericAOEs public EyeOfTheStorm() : base(ActionID.MakeSpell(AID.EyeOfTheStorm)) { } - public bool Active(BossModule module) => _caster?.CastInfo != null || _nextCastAt > module.WorldState.CurrentTime; + public bool Active(BossModule module) => _caster?.CastInfo != null || _nextCastAt > WorldState.CurrentTime; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_caster != null) yield return new(_shape, _caster.Position, new(), _nextCastAt); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) { @@ -25,11 +25,11 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) { - _nextCastAt = module.WorldState.CurrentTime.AddSeconds(4.2f); + _nextCastAt = WorldState.FutureTime(4.2f); } } diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/MistralSong.cs b/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/MistralSong.cs index c933e2e974..b8287652fb 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/MistralSong.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/MistralSong.cs @@ -14,13 +14,13 @@ public override void Init(BossModule module) Modify(_predictedPosition, ActiveBlockers(module)); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) Modify(caster.Position, ActiveBlockers(module)); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) Modify(null, ActiveBlockers(module)); @@ -29,12 +29,6 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn private IEnumerable<(WPos, float)> ActiveBlockers(BossModule module) => module.Enemies(OID.Monolith).Where(a => !a.IsDead).Select(a => (a.Position, a.HitboxRadius - 0.5f)); } -class MistralSong1 : MistralSong -{ - public MistralSong1() : base(new(0, -13)) { } -} +class MistralSong1(BossModule module) : MistralSong(module, new(0, -13)); -class MistralSong2 : MistralSong -{ - public MistralSong2() : base(new(13, 0)) { } -} +class MistralSong2(BossModule module) : MistralSong(module, new(13, 0)); diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/SpinyShield.cs b/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/SpinyShield.cs index 4e53b1abad..5e6df61bf1 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/SpinyShield.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/SpinyShield.cs @@ -12,21 +12,21 @@ public override void Init(BossModule module) _shield = module.Enemies(OID.SpinyShield); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { var shield = ActiveShield; if (shield != null && !actor.Position.InCircle(shield.Position, _radius)) hints.Add("Go inside shield"); } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { var shield = ActiveShield; if (shield != null) hints.AddForbiddenZone(ShapeDistance.InvertedCircle(shield.Position, _radius)); } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { var shield = ActiveShield; if (shield != null) diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/WickedWheel.cs b/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/WickedWheel.cs index 6b2d1d009a..7300682bcc 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/WickedWheel.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/WickedWheel.cs @@ -9,35 +9,35 @@ public WickedWheel() : base(ActionID.MakeSpell(AID.WickedWheel)) { } public override void Init(BossModule module) { - _expectedNext = module.WorldState.CurrentTime.AddSeconds(25); + _expectedNext = WorldState.FutureTime(25); } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (_expectedNext != default) - hints.Add($"Wicked wheel in ~{Math.Max((_expectedNext - module.WorldState.CurrentTime).TotalSeconds, 0)}s"); + hints.Add($"Wicked wheel in ~{Math.Max((_expectedNext - WorldState.CurrentTime).TotalSeconds, 0)}s"); } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { // note: suparna also casts this, but we generally ignore it... - if (_expectedNext != default && module.PrimaryActor.TargetID != actor.InstanceID && (_expectedNext - module.WorldState.CurrentTime).TotalSeconds < 3) - hints.AddForbiddenZone(ShapeDistance.Circle(module.PrimaryActor.Position, _radius), _expectedNext); + if (_expectedNext != default && Module.PrimaryActor.TargetID != actor.InstanceID && (_expectedNext - WorldState.CurrentTime).TotalSeconds < 3) + hints.AddForbiddenZone(ShapeDistance.Circle(Module.PrimaryActor.Position, _radius), _expectedNext); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - if (_expectedNext != default && (_expectedNext - module.WorldState.CurrentTime).TotalSeconds < 3) - arena.AddCircle(module.PrimaryActor.Position, _radius, ArenaColor.Danger); + if (_expectedNext != default && (_expectedNext - WorldState.CurrentTime).TotalSeconds < 3) + arena.AddCircle(Module.PrimaryActor.Position, _radius, ArenaColor.Danger); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { base.OnEventCast(module, caster, spell); if (spell.Action == WatchedAction) { // not sure about this ... - _expectedNext = module.Enemies(OID.Suparna).Any(a => a.IsTargetable && !a.IsDead) ? module.WorldState.CurrentTime.AddSeconds(25) : new(); + _expectedNext = module.Enemies(OID.Suparna).Any(a => a.IsTargetable && !a.IsDead) ? WorldState.FutureTime(25) : new(); } } } diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/Ex3Titan.cs b/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/Ex3Titan.cs index d24902799e..4e13b8d265 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/Ex3Titan.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/Ex3Titan.cs @@ -1,20 +1,11 @@ namespace BossMod.RealmReborn.Extreme.Ex3Titan; -class WeightOfTheLand : Components.LocationTargetedAOEs -{ - public WeightOfTheLand() : base(ActionID.MakeSpell(AID.WeightOfTheLandAOE), 6) { } -} +class WeightOfTheLand(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.WeightOfTheLandAOE), 6); -class GaolerVoidzone : Components.PersistentVoidzone -{ - public GaolerVoidzone() : base(5, m => m.Enemies(OID.GaolerVoidzone).Where(e => e.EventState != 7)) { } -} +class GaolerVoidzone(BossModule module) : Components.PersistentVoidzone(module, 5, m => m.Enemies(OID.GaolerVoidzone).Where(e => e.EventState != 7)); [ConfigDisplay(Order = 0x030, Parent = typeof(RealmRebornConfig))] -public class Ex3TitanConfig : CooldownPlanningConfigNode -{ - public Ex3TitanConfig() : base(50) { } -} +public class Ex3TitanConfig() : CooldownPlanningConfigNode(50); [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 64, NameID = 1801)] public class Ex3Titan : BossModule diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/Ex3TitanAI.cs b/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/Ex3TitanAI.cs index d005188e56..9e78d44921 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/Ex3TitanAI.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/Ex3TitanAI.cs @@ -10,13 +10,13 @@ public override void Init(BossModule module) _rockThrow = module.FindComponent(); } - public override void Update(BossModule module) + public override void Update() { if (KillNextBomb && !module.Enemies(OID.BombBoulder).Any()) KillNextBomb = false; } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { bool haveGaolers = module.Enemies(OID.GraniteGaoler).Any(a => a.IsTargetable && !a.IsDead); foreach (var e in hints.PotentialTargets) @@ -28,7 +28,7 @@ public override void AddAIHints(BossModule module, int slot, Actor actor, PartyR case OID.TitansHeart: e.Priority = 1; e.AttackStrength = 0.25f; - e.DesiredPosition = module.Bounds.Center - new WDir(0, module.Arena.Bounds.HalfSize - 6); + e.DesiredPosition = Module.Bounds.Center - new WDir(0, module.Arena.Bounds.HalfSize - 6); e.DesiredRotation = 180.Degrees(); e.TankDistance = 0; if (actor.Role == Role.Tank) @@ -38,22 +38,22 @@ public override void AddAIHints(BossModule module, int slot, Actor actor, PartyR // theoretically we can swap to OT right after 1st buster, then MT's vuln will expire right after 3rd buster and he can taunt back // OT's vuln will expire right before 5th buster, so MT will eat 1/4/7/... and OT will eat 2+3/5+6/... // however, in reality phase is going to be extremely short - 1 or 2 tb's?.. - bool isCurrentTank = actor.InstanceID == module.PrimaryActor.TargetID; + bool isCurrentTank = actor.InstanceID == Module.PrimaryActor.TargetID; bool needTankSwap = !haveGaolers && module.FindComponent() == null && TankVulnStacks(module) >= 2; e.PreferProvoking = e.ShouldBeTanked = isCurrentTank != needTankSwap; } break; case OID.GraniteGaoler: e.Priority = 2; - e.DesiredPosition = module.Bounds.Center + (module.Arena.Bounds.HalfSize - 4) * 30.Degrees().ToDirection(); // move them away from boss, healer gaol spots and upheaval knockback spots - e.ShouldBeTanked = module.PrimaryActor.TargetID != actor.InstanceID && actor.Role == Role.Tank; + e.DesiredPosition = Module.Bounds.Center + (module.Arena.Bounds.HalfSize - 4) * 30.Degrees().ToDirection(); // move them away from boss, healer gaol spots and upheaval knockback spots + e.ShouldBeTanked = Module.PrimaryActor.TargetID != actor.InstanceID && actor.Role == Role.Tank; break; case OID.BombBoulder: - e.Priority = KillNextBomb && e.Actor.Position.AlmostEqual(module.Bounds.Center, 1) ? 3 : 0; // kill center bomb when needed + e.Priority = KillNextBomb && e.Actor.Position.AlmostEqual(Module.Bounds.Center, 1) ? 3 : 0; // kill center bomb when needed e.ShouldBeTanked = false; break; case OID.GraniteGaol: - e.Priority = e.Actor.Position.InCircle(module.PrimaryActor.Position, 5) ? 5 : 4; // prefer killing gaol under boss first + e.Priority = e.Actor.Position.InCircle(Module.PrimaryActor.Position, 5) ? 5 : 4; // prefer killing gaol under boss first e.AttackStrength = 0; e.ShouldBeTanked = false; break; @@ -61,13 +61,13 @@ public override void AddAIHints(BossModule module, int slot, Actor actor, PartyR } // if there are no active mechanics, all except current tank prefer stacking on max melee behind boss, at an angle that allows all positionals - if (!haveGaolers && !KillNextBomb && actor.InstanceID != module.PrimaryActor.TargetID && hints.ForbiddenZones.Count == 0) + if (!haveGaolers && !KillNextBomb && actor.InstanceID != Module.PrimaryActor.TargetID && hints.ForbiddenZones.Count == 0) { if (_rockThrow != null && _rockThrow.PendingFetters[slot]) { var pos = actor.Role == Role.Healer - ? module.Bounds.Center + module.Arena.Bounds.HalfSize * (-30).Degrees().ToDirection() // healers should go to the back; 30 degrees will be safe if landslide is baited straight to south (which it should, since it will follow upheaval) - : module.PrimaryActor.Position + new WDir(0, 1); + ? Module.Bounds.Center + module.Arena.Bounds.HalfSize * (-30).Degrees().ToDirection() // healers should go to the back; 30 degrees will be safe if landslide is baited straight to south (which it should, since it will follow upheaval) + : Module.PrimaryActor.Position + new WDir(0, 1); hints.AddForbiddenZone(ShapeDistance.InvertedCircle(pos, 2), _rockThrow.ResolveAt); } else @@ -81,7 +81,7 @@ public override void AddAIHints(BossModule module, int slot, Actor actor, PartyR private WPos? StackPosition(BossModule module) { - var boss = module.PrimaryActor; + var boss = Module.PrimaryActor; var res = boss.Position + 3 * (boss.Rotation + 135.Degrees()).ToDirection(); if (module.Arena.Bounds.Contains(res)) return res; @@ -91,5 +91,5 @@ public override void AddAIHints(BossModule module, int slot, Actor actor, PartyR return null; } - private int TankVulnStacks(BossModule module) => module.WorldState.Actors.Find(module.PrimaryActor.TargetID)?.FindStatus(SID.PhysicalVulnerabilityUp)?.Extra ?? 0; + private int TankVulnStacks(BossModule module) => WorldState.Actors.Find(Module.PrimaryActor.TargetID)?.FindStatus(SID.PhysicalVulnerabilityUp)?.Extra ?? 0; } diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/Ex3TitanStates.cs b/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/Ex3TitanStates.cs index c01f664329..807070c273 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/Ex3TitanStates.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/Ex3TitanStates.cs @@ -11,27 +11,27 @@ public Ex3TitanStates(Ex3Titan module) : base(module) .ActivateOnEnter() .ActivateOnEnter() // note that these have to be activated before AI .ActivateOnEnter() - .Raw.Update = () => module.PrimaryActor.IsDestroyed || !module.PrimaryActor.IsTargetable; // lasts until first untargetable + .Raw.Update = () => Module.PrimaryActor.IsDestroyed || !Module.PrimaryActor.IsTargetable; // lasts until first untargetable SimplePhase(1, Intermission1, "Intermission 1") - .Raw.Update = () => module.PrimaryActor.IsDestroyed || module.PrimaryActor.IsTargetable; + .Raw.Update = () => Module.PrimaryActor.IsDestroyed || Module.PrimaryActor.IsTargetable; SimplePhase(2, Phase2, "Phase 2") .ActivateOnEnter() .ActivateOnEnter() .ActivateOnEnter() .ActivateOnEnter() .ActivateOnEnter() - .Raw.Update = () => module.PrimaryActor.IsDestroyed || !module.PrimaryActor.IsTargetable; // lasts until second untargetable + .Raw.Update = () => Module.PrimaryActor.IsDestroyed || !Module.PrimaryActor.IsTargetable; // lasts until second untargetable SimplePhase(3, Intermission2, "Intermission 2") - .Raw.Update = () => module.PrimaryActor.IsDestroyed || (module.Heart()?.IsTargetable ?? false); + .Raw.Update = () => Module.PrimaryActor.IsDestroyed || (module.Heart()?.IsTargetable ?? false); SimplePhase(4, Phase3, "Phase 3") .ActivateOnEnter() .ActivateOnEnter() .ActivateOnEnter() .ActivateOnEnter() .ActivateOnEnter() - .Raw.Update = () => module.PrimaryActor.IsDestroyed || !(module.Heart()?.IsTargetable ?? false); + .Raw.Update = () => Module.PrimaryActor.IsDestroyed || !(module.Heart()?.IsTargetable ?? false); SimplePhase(5, Intermission3, "Intermission 3") - .Raw.Update = () => module.PrimaryActor.IsDestroyed || module.PrimaryActor.IsTargetable; + .Raw.Update = () => Module.PrimaryActor.IsDestroyed || Module.PrimaryActor.IsTargetable; DeathPhase(6, Phase4) .ActivateOnEnter() .ActivateOnEnter() diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/Geocrush.cs b/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/Geocrush.cs index 6ef346da32..325147f1ec 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/Geocrush.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/Geocrush.cs @@ -10,25 +10,25 @@ public Geocrush(float radius) : base(ActionID.MakeSpell(AID.Geocrush)) _radius = radius; } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { - if (!actor.Position.InCircle(module.Bounds.Center, _radius)) + if (!actor.Position.InCircle(Module.Bounds.Center, _radius)) hints.Add("Move closer to center!"); - else if (actor.Position.InCircle(module.Bounds.Center, _radius - _ringWidth)) + else if (actor.Position.InCircle(Module.Bounds.Center, _radius - _ringWidth)) hints.Add("Move closer to the edge!"); } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { - var ring = ShapeDistance.Donut(module.Bounds.Center, _radius - _ringWidth, _radius); + var ring = ShapeDistance.Donut(Module.Bounds.Center, _radius - _ringWidth, _radius); hints.AddForbiddenZone(p => -ring(p)); - hints.PredictedDamage.Add((module.Raid.WithSlot().Mask(), new())); + hints.PredictedDamage.Add((Raid.WithSlot().Mask(), new())); } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { - arena.ZoneDonut(module.Bounds.Center, _radius, 25, ArenaColor.AOE); - arena.ZoneDonut(module.Bounds.Center, _radius - _ringWidth, _radius, ArenaColor.SafeFromAOE); + arena.ZoneDonut(Module.Bounds.Center, _radius, 25, ArenaColor.AOE); + arena.ZoneDonut(Module.Bounds.Center, _radius - _ringWidth, _radius, ArenaColor.SafeFromAOE); } } diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/GraniteGaol.cs b/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/GraniteGaol.cs index d903b01d4f..bdec9c8bae 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/GraniteGaol.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/GraniteGaol.cs @@ -5,39 +5,39 @@ class GraniteGaol : BossComponent public BitMask PendingFetters; public DateTime ResolveAt; - public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) + public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) { return PendingFetters[playerSlot] ? PlayerPriority.Interesting : PlayerPriority.Irrelevant; } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Fetters) - PendingFetters.Clear(module.Raid.FindSlot(actor.InstanceID)); + PendingFetters.Clear(Raid.FindSlot(actor.InstanceID)); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.RockThrow or AID.GaolMarkerHealer) { // this generally happens after tethers, so don't bother doing anything if targets are already known - var slot = module.Raid.FindSlot(spell.MainTargetID); + var slot = Raid.FindSlot(spell.MainTargetID); if (!PendingFetters[slot]) { PendingFetters.Set(slot); - ResolveAt = module.WorldState.CurrentTime.AddSeconds(2.9f); + ResolveAt = WorldState.FutureTime(2.9f); } } } - public override void OnTethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnTethered(Actor source, ActorTetherInfo tether) { if ((TetherID)tether.ID == TetherID.Gaol) { // dps -> healer typically - PendingFetters.Set(module.Raid.FindSlot(source.InstanceID)); - PendingFetters.Set(module.Raid.FindSlot(tether.Target)); - ResolveAt = module.WorldState.CurrentTime.AddSeconds(2.9f); + PendingFetters.Set(Raid.FindSlot(source.InstanceID)); + PendingFetters.Set(Raid.FindSlot(tether.Target)); + ResolveAt = WorldState.FutureTime(2.9f); } } } diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/LandslideBurst.cs b/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/LandslideBurst.cs index 3682ad4b1b..f684cef1eb 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/LandslideBurst.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/LandslideBurst.cs @@ -11,7 +11,7 @@ class LandslideBurst : Components.GenericAOEs private static readonly AOEShapeRect _shapeLandslide = new(40.25f, 3); private static readonly AOEShapeCircle _shapeBurst = new(6.3f); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { foreach (var l in _landslides) yield return new(_shapeLandslide, l.Position, l.CastInfo!.Rotation, l.CastInfo.NPCFinishAt); @@ -19,7 +19,7 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, yield return new(_shapeBurst, b.Position, b.CastInfo!.Rotation, b.CastInfo.NPCFinishAt); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { @@ -34,7 +34,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/MountainBuster.cs b/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/MountainBuster.cs index b00f184726..c2b6b64b1e 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/MountainBuster.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/MountainBuster.cs @@ -10,7 +10,7 @@ public override void Init(BossModule module) NextExpected = module.StateMachine.NextTransitionWithFlag(StateMachine.StateHint.Tankbuster); } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { base.AddAIHints(module, slot, actor, assignment, hints); var boss = hints.PotentialTargets.Find(e => (OID)e.Actor.OID == OID.Boss); @@ -29,7 +29,7 @@ public override void Init(BossModule module) NextExpected = module.StateMachine.NextTransitionWithFlag(StateMachine.StateHint.Tankbuster); } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { base.AddAIHints(module, slot, actor, assignment, hints); var boss = hints.PotentialTargets.Find(e => (OID)e.Actor.OID == OID.TitansHeart); diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/Tumult.cs b/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/Tumult.cs index 6a8a98d4db..b61b0cd934 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/Tumult.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/Tumult.cs @@ -11,15 +11,15 @@ public override void Init(BossModule module) _nextExpected = module.StateMachine.NextTransitionWithFlag(StateMachine.StateHint.Raidwide); } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { - hints.PredictedDamage.Add((module.Raid.WithSlot().Mask(), _nextExpected)); + hints.PredictedDamage.Add((Raid.WithSlot().Mask(), _nextExpected)); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { base.OnEventCast(module, caster, spell); if (spell.Action == WatchedAction) - _nextExpected = module.WorldState.CurrentTime.AddSeconds(1.2f); + _nextExpected = WorldState.FutureTime(1.2f); } } diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/Upheaval.cs b/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/Upheaval.cs index a0324a799d..d507e31c43 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/Upheaval.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/Upheaval.cs @@ -7,32 +7,32 @@ class Upheaval : Components.Knockback public Upheaval() : base(ActionID.MakeSpell(AID.Upheaval)) { } - public override IEnumerable Sources(BossModule module, int slot, Actor actor) + public override IEnumerable Sources(int slot, Actor actor) { - if (_remainInPosition > module.WorldState.CurrentTime) - yield return new(module.PrimaryActor.Position, 13); + if (_remainInPosition > WorldState.CurrentTime) + yield return new(Module.PrimaryActor.Position, 13); } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { - if (_remainInPosition > module.WorldState.CurrentTime) + if (_remainInPosition > WorldState.CurrentTime) { // stack just behind boss, this is a good place to bait imminent landslide correctly - var dirToCenter = (module.Bounds.Center - module.PrimaryActor.Position).Normalized(); - var pos = module.PrimaryActor.Position + 2 * dirToCenter; + var dirToCenter = (Module.Bounds.Center - Module.PrimaryActor.Position).Normalized(); + var pos = Module.PrimaryActor.Position + 2 * dirToCenter; hints.AddForbiddenZone(ShapeDistance.InvertedCircle(pos, 1.5f), _remainInPosition); } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) _remainInPosition = spell.NPCFinishAt.AddSeconds(1); // TODO: just wait for effectresult instead... } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) - _remainInPosition = module.WorldState.CurrentTime.AddSeconds(1); // TODO: just wait for effectresult instead... + _remainInPosition = WorldState.FutureTime(1); // TODO: just wait for effectresult instead... } } diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/Eruption.cs b/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/Eruption.cs index c277bccd0d..930a4a17cd 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/Eruption.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/Eruption.cs @@ -10,26 +10,26 @@ class Eruption : Components.LocationTargetedAOEs public Eruption() : base(ActionID.MakeSpell(AID.EruptionAOE), Radius) { } - public override void Update(BossModule module) + public override void Update() { if (Casters.Count == 0) Baiters.Reset(); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { base.OnCastStarted(module, caster, spell); switch ((AID)spell.Action.ID) { case AID.Eruption: - _baitDetectDeadline = module.WorldState.CurrentTime.AddSeconds(1); + _baitDetectDeadline = WorldState.FutureTime(1); break; case AID.EruptionAOE: - if (module.WorldState.CurrentTime < _baitDetectDeadline) + if (WorldState.CurrentTime < _baitDetectDeadline) { - var baiter = module.Raid.WithoutSlot().Closest(spell.LocXZ); + var baiter = Raid.WithoutSlot().Closest(spell.LocXZ); if (baiter != null) - Baiters.Set(module.Raid.FindSlot(baiter.InstanceID)); + Baiters.Set(Raid.FindSlot(baiter.InstanceID)); } break; } diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/Ex4Ifrit.cs b/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/Ex4Ifrit.cs index 9965a88e0c..a1bc1155df 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/Ex4Ifrit.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/Ex4Ifrit.cs @@ -7,16 +7,10 @@ class Incinerate : Components.Cleave public Incinerate() : base(ActionID.MakeSpell(AID.Incinerate), CleaveShape) { } } -class RadiantPlume : Components.LocationTargetedAOEs -{ - public RadiantPlume() : base(ActionID.MakeSpell(AID.RadiantPlumeAOE), 8) { } -} +class RadiantPlume(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.RadiantPlumeAOE), 8); // TODO: consider showing next charge before its cast starts... -class CrimsonCyclone : Components.SelfTargetedAOEs -{ - public CrimsonCyclone() : base(ActionID.MakeSpell(AID.CrimsonCyclone), new AOEShapeRect(49, 9)) { } -} +class CrimsonCyclone(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.CrimsonCyclone), new AOEShapeRect(49, 9)); [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 63, NameID = 1185)] public class Ex4Ifrit : BossModule diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/Ex4IfritAI.cs b/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/Ex4IfritAI.cs index 77393caa0a..faf6e716bf 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/Ex4IfritAI.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/Ex4IfritAI.cs @@ -16,7 +16,7 @@ public override void Init(BossModule module) _eruption = module.FindComponent(); _searingWind = module.FindComponent(); _infernalFetters = module.FindComponent(); - CreatedAt = module.WorldState.CurrentTime; + CreatedAt = WorldState.CurrentTime; } protected bool IsInvincible(Actor actor) => actor.FindStatus(SID.Invincibility) != null; @@ -30,9 +30,9 @@ public override void Init(BossModule module) protected void UpdateBossTankingProperties(BossModule module, AIHints.Enemy boss, Actor player, PartyRolesConfig.Assignment assignment) { boss.AttackStrength = 0.35f; - boss.DesiredRotation = Angle.FromDirection(module.PrimaryActor.Position - module.Bounds.Center); // point to the wall - if (!module.PrimaryActor.Position.InCircle(module.Bounds.Center, 13)) // 13 == radius (20) - tank distance (2) - hitbox (5) - boss.DesiredPosition = module.Bounds.Center + 13 * boss.DesiredRotation.ToDirection(); + boss.DesiredRotation = Angle.FromDirection(Module.PrimaryActor.Position - Module.Bounds.Center); // point to the wall + if (!Module.PrimaryActor.Position.InCircle(Module.Bounds.Center, 13)) // 13 == radius (20) - tank distance (2) - hitbox (5) + boss.DesiredPosition = Module.Bounds.Center + 13 * boss.DesiredRotation.ToDirection(); if (player.Role == Role.Tank) { if (player.InstanceID == boss.Actor.TargetID) @@ -41,11 +41,11 @@ protected void UpdateBossTankingProperties(BossModule module, AIHints.Enemy boss boss.ShouldBeTanked = true; } else if (assignment == BossTankRole) - //else if (TankVulnStacks(player) == 0 && TankVulnStacks(module.WorldState.Actors.Find(boss.Actor.TargetID)) >= 2) + //else if (TankVulnStacks(player) == 0 && TankVulnStacks(WorldState.Actors.Find(boss.Actor.TargetID)) >= 2) { // taunt if safe - var dirIfTaunted = Angle.FromDirection(player.Position - module.PrimaryActor.Position); - boss.PreferProvoking = boss.ShouldBeTanked = !module.Raid.WithoutSlot().Any(a => a.Role != Role.Tank && Incinerate.CleaveShape.Check(a.Position, module.PrimaryActor.Position, dirIfTaunted)); + var dirIfTaunted = Angle.FromDirection(player.Position - Module.PrimaryActor.Position); + boss.PreferProvoking = boss.ShouldBeTanked = !Raid.WithoutSlot().Any(a => a.Role != Role.Tank && Incinerate.CleaveShape.Check(a.Position, Module.PrimaryActor.Position, dirIfTaunted)); } } } @@ -59,7 +59,7 @@ protected void AddDefaultEruptionBaiterHints(BossModule module, AIHints hints) { // avoid non-baiters (TODO: should this be done by eruption component itself?) if (_eruption != null) - foreach (var (i, p) in module.Raid.WithSlot().ExcludedFromMask(_eruption.Baiters)) + foreach (var (i, p) in Raid.WithSlot().ExcludedFromMask(_eruption.Baiters)) hints.AddForbiddenZone(ShapeDistance.Circle(p.Position, _eruption.Shape.Radius)); } @@ -102,12 +102,12 @@ protected void PlanStrongCooldown(AIHints hints, Actor player, float phaseTime, // - for dd eruption baiters, we provide a defined bait spot for second eruption, same distance away from both caster and non-caster locations class Ex4IfritAINormal : Ex4IfritAICommon { - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { - var bossAngle = Angle.FromDirection(module.PrimaryActor.Position - module.Bounds.Center); + var bossAngle = Angle.FromDirection(Module.PrimaryActor.Position - Module.Bounds.Center); var toBoss = bossAngle.ToDirection(); - var boss = hints.PotentialTargets.Find(e => e.Actor == module.PrimaryActor); + var boss = hints.PotentialTargets.Find(e => e.Actor == Module.PrimaryActor); if (boss != null) { boss.Priority = 1; @@ -121,10 +121,10 @@ public override void AddAIHints(BossModule module, int slot, Actor actor, PartyR // eruption bait hints if (IsEruptionBaiter(slot)) { - if (actor.Role is Role.Melee or Role.Ranged && module.PrimaryActor.CastInfo != null) + if (actor.Role is Role.Melee or Role.Ranged && Module.PrimaryActor.CastInfo != null) { // specific spot for first baits - AddPositionHint(hints, module.PrimaryActor.Position - 11.5f * toBoss + 11 * toBoss.OrthoR()); + AddPositionHint(hints, Module.PrimaryActor.Position - 11.5f * toBoss + 11 * toBoss.OrthoR()); } else { @@ -132,7 +132,7 @@ public override void AddAIHints(BossModule module, int slot, Actor actor, PartyR } } } - else if (module.PrimaryActor.TargetID != actor.InstanceID) + else if (Module.PrimaryActor.TargetID != actor.InstanceID) { // default positions: // - MT assumed to point boss along radius (both to avoid own knockbacks and to simplify positioning); others position relative to direction to boss (this will fail if MT positions boss incorrectly, but oh well) @@ -147,27 +147,27 @@ public override void AddAIHints(BossModule module, int slot, Actor actor, PartyR // - at +135 degrees - gives lots of space to OT eruption baits, but can't heal MT // - at +80 degrees - can heal MT, but tight for OT (eruptions, knockbacks...) // - at +100-110 degrees - can heal MT, decent space for OT, but can't possibly fit two targets - that's actually fine?.. - var dir = !actor.Position.InCircle(module.Bounds.Center, 10) ? Angle.FromDirection(actor.Position - module.Bounds.Center) + var dir = !actor.Position.InCircle(Module.Bounds.Center, 10) ? Angle.FromDirection(actor.Position - Module.Bounds.Center) : bossAngle + 105.Degrees(); - AddPositionHint(hints, module.Bounds.Center + 18 * dir.ToDirection()); + AddPositionHint(hints, Module.Bounds.Center + 18 * dir.ToDirection()); } else if (IsFettered(slot)) { var dir = bossAngle + (actor.Role == Role.Tank ? 75 : -135).Degrees(); - AddPositionHint(hints, module.PrimaryActor.Position + 3 * dir.ToDirection()); + AddPositionHint(hints, Module.PrimaryActor.Position + 3 * dir.ToDirection()); } else if (actor.Role == Role.Tank) { - AddPositionHint(hints, module.PrimaryActor.Position + 7.5f * (bossAngle + 75.Degrees()).ToDirection()); + AddPositionHint(hints, Module.PrimaryActor.Position + 7.5f * (bossAngle + 75.Degrees()).ToDirection()); } else if (actor.Role == Role.Healer) { - //AddPositionHint(hints, module.PrimaryActor.Position - 11.5f * toBoss); - AddPositionHint(hints, module.Bounds.Center); + //AddPositionHint(hints, Module.PrimaryActor.Position - 11.5f * toBoss); + AddPositionHint(hints, Module.Bounds.Center); } else { - var pos = module.PrimaryActor.Position + 6 * (bossAngle - 135.Degrees()).ToDirection(); + var pos = Module.PrimaryActor.Position + 6 * (bossAngle - 135.Degrees()).ToDirection(); if (actor.Class.GetClassCategory() == ClassCategory.Caster) pos -= 15 * toBoss; AddPositionHint(hints, pos); @@ -175,12 +175,12 @@ public override void AddAIHints(BossModule module, int slot, Actor actor, PartyR } } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - if (module.PrimaryActor.TargetID == pc.InstanceID) + if (Module.PrimaryActor.TargetID == pc.InstanceID) { // cone to help mt with proper positioning - arena.AddCone(module.PrimaryActor.Position, 2, Angle.FromDirection(module.PrimaryActor.Position - module.Bounds.Center), Incinerate.CleaveShape.HalfAngle, ArenaColor.Safe); + arena.AddCone(Module.PrimaryActor.Position, 2, Angle.FromDirection(Module.PrimaryActor.Position - Module.Bounds.Center), Incinerate.CleaveShape.HalfAngle, ArenaColor.Safe); } } } @@ -208,12 +208,12 @@ public override void Init(BossModule module) { base.Init(module); var smallNails = module.Enemies(OID.InfernalNailSmall); - var startingNail = smallNails.Closest(module.Bounds.Center + new WDir(15, 0)); + var startingNail = smallNails.Closest(Module.Bounds.Center + new WDir(15, 0)); if (startingNail != null) { NailKillOrder.Add(startingNail); - var startingDir = Angle.FromDirection(startingNail.Position - module.Bounds.Center); - NailKillOrder.AddRange(smallNails.Exclude(startingNail).Select(n => (n, NailDirDist(n.Position - module.Bounds.Center, startingDir))).OrderBy(t => t.Item2.Item1).ThenBy(t => t.Item2.Item2).Select(t => t.Item1)); + var startingDir = Angle.FromDirection(startingNail.Position - Module.Bounds.Center); + NailKillOrder.AddRange(smallNails.Exclude(startingNail).Select(n => (n, NailDirDist(n.Position - Module.Bounds.Center, startingDir))).OrderBy(t => t.Item2.Item1).ThenBy(t => t.Item2.Item2).Select(t => t.Item1)); } NailKillOrder.AddRange(module.Enemies(OID.InfernalNailLarge)); } @@ -224,7 +224,7 @@ public override void Update(BossModule module) BossTankRole = OTTankAtIncinerateCounts[IncinerateCount] ? PartyRolesConfig.Assignment.OT : PartyRolesConfig.Assignment.MT; } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { var nextNail = NailKillOrder.FirstOrDefault(); if (nextNail == null) @@ -233,7 +233,7 @@ public override void AddAIHints(BossModule module, int slot, Actor actor, PartyR } else { - var bossAngle = Angle.FromDirection(module.PrimaryActor.Position - module.Bounds.Center); + var bossAngle = Angle.FromDirection(Module.PrimaryActor.Position - Module.Bounds.Center); foreach (var e in hints.PotentialTargets) { e.StayAtLongRange = true; @@ -263,39 +263,39 @@ public override void AddAIHints(BossModule module, int slot, Actor actor, PartyR { AddDefaultEruptionBaiterHints(module, hints); } - else if (module.PrimaryActor.TargetID != actor.InstanceID) + else if (Module.PrimaryActor.TargetID != actor.InstanceID) { bool invertedSW = NailKillOrder.Count <= MinNailsForCWSearingWinds; if (IsSearingWindTarget(actor)) { - var dir = !actor.Position.InCircle(module.Bounds.Center, 10) ? Angle.FromDirection(actor.Position - module.Bounds.Center) + var dir = !actor.Position.InCircle(Module.Bounds.Center, 10) ? Angle.FromDirection(actor.Position - Module.Bounds.Center) : bossAngle + (invertedSW ? -105 : 105).Degrees(); - AddPositionHint(hints, module.Bounds.Center + 18 * dir.ToDirection()); + AddPositionHint(hints, Module.Bounds.Center + 18 * dir.ToDirection()); } else if (assignment == BossTankRole) { var dir = bossAngle + (invertedSW ? 75 : -75).Degrees(); - AddPositionHint(hints, module.PrimaryActor.Position + 7.5f * dir.ToDirection()); + AddPositionHint(hints, Module.PrimaryActor.Position + 7.5f * dir.ToDirection()); } else if (actor.Role == Role.Healer) { - AddPositionHint(hints, module.Bounds.Center); + AddPositionHint(hints, Module.Bounds.Center); } else { // in addition to usual hints, we want to avoid center (so that we don't bait eruption there) if (!EruptionActive) - hints.AddForbiddenZone(ShapeDistance.Circle(module.Bounds.Center, Eruption.Radius)); + hints.AddForbiddenZone(ShapeDistance.Circle(Module.Bounds.Center, Eruption.Radius)); } } // heavy raidwide on large nail death if ((OID)nextNail.OID == OID.InfernalNailLarge && nextNail.HP.Cur < 0.5f * nextNail.HP.Max) - hints.PredictedDamage.Add((module.Raid.WithSlot().Mask(), new())); + hints.PredictedDamage.Add((Raid.WithSlot().Mask(), new())); } } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { base.DrawArenaForeground(module, pcSlot, pc, arena); var nextNail = NailKillOrder.FirstOrDefault(); @@ -316,13 +316,13 @@ class Ex4IfritAINails1 : Ex4IfritAINails { public Ex4IfritAINails1() : base(1, 0x8) { } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { base.AddAIHints(module, slot, actor, assignment, hints); - if (module.PrimaryActor.TargetID == actor.InstanceID) + if (Module.PrimaryActor.TargetID == actor.InstanceID) { - var phaseTime = (float)(module.WorldState.CurrentTime - CreatedAt).TotalSeconds; + var phaseTime = (float)(WorldState.CurrentTime - CreatedAt).TotalSeconds; PlanRampart(hints, actor, phaseTime, 10, 20); } } @@ -332,13 +332,13 @@ class Ex4IfritAINails2 : Ex4IfritAINails { public Ex4IfritAINails2() : base(4, 0x7) { } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { base.AddAIHints(module, slot, actor, assignment, hints); - if (module.PrimaryActor.TargetID == actor.InstanceID) + if (Module.PrimaryActor.TargetID == actor.InstanceID) { - var phaseTime = (float)(module.WorldState.CurrentTime - CreatedAt).TotalSeconds; + var phaseTime = (float)(WorldState.CurrentTime - CreatedAt).TotalSeconds; PlanRampart(hints, actor, phaseTime, 8, 13); } } @@ -348,13 +348,13 @@ class Ex4IfritAINails3 : Ex4IfritAINails { public Ex4IfritAINails3() : base(7, 0x3C70) { } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { base.AddAIHints(module, slot, actor, assignment, hints); - if (module.PrimaryActor.TargetID == actor.InstanceID) + if (Module.PrimaryActor.TargetID == actor.InstanceID) { - var phaseTime = (float)(module.WorldState.CurrentTime - CreatedAt).TotalSeconds; + var phaseTime = (float)(WorldState.CurrentTime - CreatedAt).TotalSeconds; PlanRampart(hints, actor, phaseTime, 9, 13); PlanReprisal(hints, actor, phaseTime, 20, 25); PlanStrongCooldown(hints, actor, phaseTime, 35, 40); @@ -377,37 +377,37 @@ public Ex4IfritAIHellfire(Angle safeSpotDir, PartyRolesConfig.Assignment tankRol BossTankRole = tankRole; } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { - var boss = hints.PotentialTargets.Find(e => e.Actor == module.PrimaryActor); + var boss = hints.PotentialTargets.Find(e => e.Actor == Module.PrimaryActor); if (boss != null) { boss.Priority = 1; boss.StayAtLongRange = true; boss.DesiredRotation = Angle.FromDirection(_safespotOffset); - boss.DesiredPosition = module.Bounds.Center + 13 * boss.DesiredRotation.ToDirection(); + boss.DesiredPosition = Module.Bounds.Center + 13 * boss.DesiredRotation.ToDirection(); boss.PreferProvoking = boss.ShouldBeTanked = assignment == BossTankRole; } if (IsSearingWindTarget(actor)) { - AddPositionHint(hints, module.Bounds.Center - _safespotOffset); + AddPositionHint(hints, Module.Bounds.Center - _safespotOffset); } else if (BossTankRole == assignment) { - AddPositionHint(hints, module.Bounds.Center + _safespotOffset); + AddPositionHint(hints, Module.Bounds.Center + _safespotOffset); } else { - AddPositionHint(hints, module.Bounds.Center); + AddPositionHint(hints, Module.Bounds.Center); } } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - arena.AddCircle(module.Bounds.Center + _safespotOffset, 2, ArenaColor.Safe); + arena.AddCircle(Module.Bounds.Center + _safespotOffset, 2, ArenaColor.Safe); } } -class Ex4IfritAIHellfire1 : Ex4IfritAIHellfire { public Ex4IfritAIHellfire1() : base(150.Degrees(), PartyRolesConfig.Assignment.MT) { } } -class Ex4IfritAIHellfire2 : Ex4IfritAIHellfire { public Ex4IfritAIHellfire2() : base(110.Degrees(), PartyRolesConfig.Assignment.OT) { } } -class Ex4IfritAIHellfire3 : Ex4IfritAIHellfire { public Ex4IfritAIHellfire3() : base(70.Degrees(), PartyRolesConfig.Assignment.MT) { } } +class Ex4IfritAIHellfire1(BossModule module) : Ex4IfritAIHellfire(module, 150.Degrees(), PartyRolesConfig.Assignment.MT); +class Ex4IfritAIHellfire2(BossModule module) : Ex4IfritAIHellfire(module, 110.Degrees(), PartyRolesConfig.Assignment.OT); +class Ex4IfritAIHellfire3(BossModule module) : Ex4IfritAIHellfire(module, 70.Degrees(), PartyRolesConfig.Assignment.MT); diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/Hellfire.cs b/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/Hellfire.cs index 8e3c3a94ba..04370a29db 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/Hellfire.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/Hellfire.cs @@ -9,12 +9,12 @@ public override void Init(BossModule module) _expectedRaidwide = module.StateMachine.NextTransitionWithFlag(StateMachine.StateHint.Raidwide); } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { - hints.PredictedDamage.Add((module.Raid.WithSlot().Mask(), _expectedRaidwide)); + hints.PredictedDamage.Add((Raid.WithSlot().Mask(), _expectedRaidwide)); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.Hellfire) _expectedRaidwide = spell.NPCFinishAt; diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/InfernalFetters.cs b/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/InfernalFetters.cs index 71734c2b3a..219a807d96 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/InfernalFetters.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/InfernalFetters.cs @@ -5,46 +5,46 @@ class InfernalFetters : BossComponent public BitMask Fetters; private int _fettersStrength; - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { if (Fetters[slot] && actor.Role != Role.Tank) { - var partner = module.Raid.WithSlot().Exclude(slot).IncludedInMask(Fetters).FirstOrDefault().Item2; + var partner = Raid.WithSlot().Exclude(slot).IncludedInMask(Fetters).FirstOrDefault().Item2; if (partner != null) hints.AddForbiddenZone(ShapeDistance.InvertedCircle(partner.Position, 10)); // TODO: tweak range... } } - public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) + public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) { return Fetters[playerSlot] ? PlayerPriority.Normal : PlayerPriority.Irrelevant; } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (Fetters.NumSetBits() > 1) { - var from = module.Raid[Fetters.LowestSetBit()]; - var to = module.Raid[Fetters.HighestSetBit()]; + var from = Raid[Fetters.LowestSetBit()]; + var to = Raid[Fetters.HighestSetBit()]; if (from != null && to != null) arena.AddLine(from.Position, to.Position, _fettersStrength > 1 ? ArenaColor.Danger : ArenaColor.Safe); } } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.InfernalFetters) { - Fetters.Set(module.Raid.FindSlot(actor.InstanceID)); + Fetters.Set(Raid.FindSlot(actor.InstanceID)); _fettersStrength = status.Extra; } } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.InfernalFetters) { - Fetters.Clear(module.Raid.FindSlot(actor.InstanceID)); + Fetters.Clear(Raid.FindSlot(actor.InstanceID)); _fettersStrength = 0; } } diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/SearingWind.cs b/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/SearingWind.cs index 40f4320305..738faf0ad4 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/SearingWind.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/SearingWind.cs @@ -14,26 +14,26 @@ public SearingWind() : base(0, 14) KeepOnPhaseChange = true; } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { // we let AI provide soft positioning hints until resolve is imminent - if (module.WorldState.CurrentTime > _showHintsAfter) + if (WorldState.CurrentTime > _showHintsAfter) base.AddAIHints(module, slot, actor, assignment, hints); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.InfernoHowl) { Spreads.Clear(); - if (module.WorldState.Actors.Find(spell.TargetID) is var target && target != null) - AddSpread(target, module.WorldState.CurrentTime.AddSeconds(5.4f)); + if (WorldState.Actors.Find(spell.TargetID) is var target && target != null) + AddSpread(target, WorldState.FutureTime(5.4f)); _searingWindsLeft = 3; - _showHintsAfter = module.WorldState.CurrentTime.AddSeconds(3.4f); + _showHintsAfter = WorldState.FutureTime(3.4f); } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { // note: there are 3 casts total, 6s apart - last one happens ~4.8s before status expires if ((AID)spell.Action.ID == AID.SearingWind) @@ -46,7 +46,7 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent else { foreach (ref var s in Spreads.AsSpan()) - s.Activation = module.WorldState.CurrentTime.AddSeconds(6); + s.Activation = WorldState.FutureTime(6); } } } diff --git a/BossMod/Modules/RealmReborn/Raid/T01Caduceus/Platforms.cs b/BossMod/Modules/RealmReborn/Raid/T01Caduceus/Platforms.cs index 395a971a65..8350060fd2 100644 --- a/BossMod/Modules/RealmReborn/Raid/T01Caduceus/Platforms.cs +++ b/BossMod/Modules/RealmReborn/Raid/T01Caduceus/Platforms.cs @@ -98,7 +98,7 @@ static Platforms() public BitMask ActivePlatforms; public DateTime ExplosionAt { get; private set; } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { Func blockedArea = p => { @@ -111,7 +111,7 @@ public override void AddAIHints(BossModule module, int slot, Actor actor, PartyR hints.AddForbiddenZone(blockedArea); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (int i in (ActivePlatforms ^ AllPlatforms).SetBits()) arena.AddPolygon(PlatformPoly(i), ArenaColor.Border); @@ -129,7 +129,7 @@ public override void OnActorEState(BossModule module, Actor actor, ushort state) bool active = state == 2; ActivePlatforms[i] = active; if (active) - ExplosionAt = module.WorldState.CurrentTime.AddSeconds(6); + ExplosionAt = WorldState.FutureTime(6); } } } diff --git a/BossMod/Modules/RealmReborn/Raid/T01Caduceus/T01ADS.cs b/BossMod/Modules/RealmReborn/Raid/T01Caduceus/T01ADS.cs index d4ab564536..0236a5a7d7 100644 --- a/BossMod/Modules/RealmReborn/Raid/T01Caduceus/T01ADS.cs +++ b/BossMod/Modules/RealmReborn/Raid/T01Caduceus/T01ADS.cs @@ -24,30 +24,15 @@ public enum AID : uint Object199 = 1229, // Boss->self, no cast, enrage } -class HighVoltage : Components.CastHint -{ - public HighVoltage() : base(ActionID.MakeSpell(AID.HighVoltage), "Interruptible") { } -} +class HighVoltage(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.HighVoltage), "Interruptible"); -class RepellingCannons : Components.SelfTargetedAOEs -{ - public RepellingCannons() : base(ActionID.MakeSpell(AID.RepellingCannons), new AOEShapeCircle(8.3f)) { } -} +class RepellingCannons(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RepellingCannons), new AOEShapeCircle(8.3f)); -class PiercingLaser : Components.SelfTargetedAOEs -{ - public PiercingLaser() : base(ActionID.MakeSpell(AID.PiercingLaser), new AOEShapeRect(32.3f, 3)) { } -} +class PiercingLaser(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PiercingLaser), new AOEShapeRect(32.3f, 3)); -class DirtyCannons : Components.SelfTargetedAOEs -{ - public DirtyCannons() : base(ActionID.MakeSpell(AID.DirtyCannons), new AOEShapeCircle(5.15f)) { } -} +class DirtyCannons(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.DirtyCannons), new AOEShapeCircle(5.15f)); -class GravityField : Components.PersistentVoidzoneAtCastTarget -{ - public GravityField() : base(6, ActionID.MakeSpell(AID.GravityField), m => m.Enemies(OID.GravityField), 1) { } -} +class GravityField(BossModule module) : Components.PersistentVoidzoneAtCastTarget(module, 6, ActionID.MakeSpell(AID.GravityField), m => m.Enemies(OID.GravityField), 1); // TODO: chain lightning?.. diff --git a/BossMod/Modules/RealmReborn/Raid/T01Caduceus/T01AI.cs b/BossMod/Modules/RealmReborn/Raid/T01Caduceus/T01AI.cs index 81068473c1..875dd2800f 100644 --- a/BossMod/Modules/RealmReborn/Raid/T01Caduceus/T01AI.cs +++ b/BossMod/Modules/RealmReborn/Raid/T01Caduceus/T01AI.cs @@ -15,7 +15,7 @@ public override void Init(BossModule module) _slimes = module.Enemies(OID.DarkMatterSlime); } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { // note on positioning: // 1. after clone spawns, we just burn bosses and not spawn any slimes (on MINE there is enough DPS to kill boss at ~3 stacks) @@ -24,9 +24,9 @@ public override void AddAIHints(BossModule module, int slot, Actor actor, PartyR // 4. before clone is spawned, R2 (assumed to be caster) stays on platform #0 and spawns slime there // 5. healers stand on platform #5 to be in range of everyone var cloneSpawned = _clone?.Clone != null; - bool cloneSpawningSoon = !cloneSpawned && module.PrimaryActor.HP.Cur < 0.73f * module.PrimaryActor.HP.Max; + bool cloneSpawningSoon = !cloneSpawned && Module.PrimaryActor.HP.Cur < 0.73f * Module.PrimaryActor.HP.Max; var clone = _clone?.CloneIfValid; - var hpDiff = clone != null ? (int)(clone.HP.Cur - module.PrimaryActor.HP.Cur) * 100.0f / module.PrimaryActor.HP.Max : 0; + var hpDiff = clone != null ? (int)(clone.HP.Cur - Module.PrimaryActor.HP.Cur) * 100.0f / Module.PrimaryActor.HP.Max : 0; var activePlatforms = _platforms?.ActivePlatforms ?? new BitMask(); if (module.StateMachine.TimeSincePhaseEnter < 10) @@ -47,9 +47,9 @@ public override void AddAIHints(BossModule module, int slot, Actor actor, PartyR if (kitedSlime != null) { // kiting a slime: bring it near boss until low hp, then into boss - var dest = module.PrimaryActor.Position; + var dest = Module.PrimaryActor.Position; if (kitedSlime.HP.Cur > 0.2f * kitedSlime.HP.Max) - dest += (kitedSlime.Position - module.PrimaryActor.Position).Normalized() * (module.PrimaryActor.HitboxRadius + kitedSlime.HitboxRadius + 6); // 6 to avoid triggering whip back + dest += (kitedSlime.Position - Module.PrimaryActor.Position).Normalized() * (Module.PrimaryActor.HitboxRadius + kitedSlime.HitboxRadius + 6); // 6 to avoid triggering whip back hints.AddForbiddenZone(ShapeDistance.InvertedCircle(dest, 2), DateTime.MaxValue); } else @@ -91,7 +91,7 @@ public override void AddAIHints(BossModule module, int slot, Actor actor, PartyR { if ((OID)e.Actor.OID == OID.Boss) { - if (e.Actor == module.PrimaryActor) + if (e.Actor == Module.PrimaryActor) { e.Priority = 1; // this is a baseline; depending on whether we want to prioritize clone vs boss, clone's priority changes if (cloneSpawningSoon && e.Actor.FindStatus(SID.SteelScales) != null) @@ -103,14 +103,14 @@ public override void AddAIHints(BossModule module, int slot, Actor actor, PartyR { PartyRolesConfig.Assignment.MT => 0, PartyRolesConfig.Assignment.OT => 2, - _ => (module.WorldState.CurrentTime - _clone!.CloneSpawnTime).TotalSeconds < 3 || hpDiff < -5 ? 0 + _ => (WorldState.CurrentTime - _clone!.CloneSpawnTime).TotalSeconds < 3 || hpDiff < -5 ? 0 : hpDiff > 5 ? 2 - : Math.Min(e.Actor.HP.Cur, module.PrimaryActor.HP.Cur) <= 0.3f * e.Actor.HP.Max ? 1 + : Math.Min(e.Actor.HP.Cur, Module.PrimaryActor.HP.Cur) <= 0.3f * e.Actor.HP.Max ? 1 : assignment is PartyRolesConfig.Assignment.H2 or PartyRolesConfig.Assignment.M2 or PartyRolesConfig.Assignment.R2 ? 2 : 0 }; e.ShouldBeTanked = assignment == PartyRolesConfig.Assignment.OT; e.PreferProvoking = true; - if ((e.Actor.Position - module.PrimaryActor.Position).LengthSq() < 625) + if ((e.Actor.Position - Module.PrimaryActor.Position).LengthSq() < 625) e.DesiredPosition = Platforms.HexaPlatformCenters[6]; e.DesiredRotation = -90.Degrees(); } @@ -120,7 +120,7 @@ public override void AddAIHints(BossModule module, int slot, Actor actor, PartyR else if ((OID)e.Actor.OID == OID.DarkMatterSlime) { // for now, let kiter damage it until 20% - var predictedHP = (int)e.Actor.HP.Cur + module.WorldState.PendingEffects.PendingHPDifference(e.Actor.InstanceID); + var predictedHP = (int)e.Actor.HP.Cur + WorldState.PendingEffects.PendingHPDifference(e.Actor.InstanceID); e.Priority = //predictedHP > 0.7f * e.Actor.HP.Max ? (actor.Role is Role.Ranged or Role.Melee ? 3 : AIHints.Enemy.PriorityForbidAI) : predictedHP > 0.2f * e.Actor.HP.Max ? (e.Actor.TargetID == actor.InstanceID ? 3 : AIHints.Enemy.PriorityForbidAI) : diff --git a/BossMod/Modules/RealmReborn/Raid/T01Caduceus/T01Caduceus.cs b/BossMod/Modules/RealmReborn/Raid/T01Caduceus/T01Caduceus.cs index f3f351b933..0788dbc55b 100644 --- a/BossMod/Modules/RealmReborn/Raid/T01Caduceus/T01Caduceus.cs +++ b/BossMod/Modules/RealmReborn/Raid/T01Caduceus/T01Caduceus.cs @@ -33,37 +33,28 @@ public enum SID : uint class HoodSwing : Components.Cleave { private DateTime _lastBossCast; // assume boss/add cleaves are synchronized?.. - public float SecondsUntilNextCast(BossModule module) => Math.Max(0, 18 - (float)(module.WorldState.CurrentTime - _lastBossCast).TotalSeconds); + public float SecondsUntilNextCast(BossModule module) => Math.Max(0, 18 - (float)(WorldState.CurrentTime - _lastBossCast).TotalSeconds); public HoodSwing() : base(ActionID.MakeSpell(AID.HoodSwing), new AOEShapeCone(11, 60.Degrees()), (uint)OID.Boss) { } // TODO: verify angle - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { hints.Add($"Next cleave in ~{SecondsUntilNextCast(module):f1}s"); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { base.OnEventCast(module, caster, spell); - if (spell.Action == WatchedAction && caster == module.PrimaryActor) - _lastBossCast = module.WorldState.CurrentTime; + if (spell.Action == WatchedAction && caster == Module.PrimaryActor) + _lastBossCast = WorldState.CurrentTime; } } -class WhipBack : Components.SelfTargetedAOEs -{ - public WhipBack() : base(ActionID.MakeSpell(AID.WhipBack), new AOEShapeCone(9, 60.Degrees())) { } -} +class WhipBack(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.WhipBack), new AOEShapeCone(9, 60.Degrees())); -class Regorge : Components.PersistentVoidzoneAtCastTarget -{ - public Regorge() : base(4, ActionID.MakeSpell(AID.Regorge), m => m.Enemies(OID.Regorge).Where(z => z.EventState != 7), 2.1f) { } -} +class Regorge(BossModule module) : Components.PersistentVoidzoneAtCastTarget(module, 4, ActionID.MakeSpell(AID.Regorge), m => m.Enemies(OID.Regorge).Where(z => z.EventState != 7), 2.1f); -class Syrup : Components.PersistentVoidzoneAtCastTarget -{ - public Syrup() : base(4, ActionID.MakeSpell(AID.Syrup), m => m.Enemies(OID.Syrup).Where(z => z.EventState != 7), 0.3f) { } -} +class Syrup(BossModule module) : Components.PersistentVoidzoneAtCastTarget(module, 4, ActionID.MakeSpell(AID.Syrup), m => m.Enemies(OID.Syrup).Where(z => z.EventState != 7), 0.3f); // TODO: merge happens if bosses are 'close enough' (threshold is >20.82 at least) or have high enough hp difference (>5% at least) and more than 20s passed since split class CloneMerge : BossComponent @@ -72,27 +63,27 @@ class CloneMerge : BossComponent public DateTime CloneSpawnTime { get; private set; } public Actor? CloneIfValid => Clone != null && !Clone.IsDestroyed && !Clone.IsDead && Clone.IsTargetable ? Clone : null; - public override void Update(BossModule module) + public override void Update() { - if (Clone != null || module.PrimaryActor.HP.Cur > module.PrimaryActor.HP.Max / 2) + if (Clone != null || Module.PrimaryActor.HP.Cur > Module.PrimaryActor.HP.Max / 2) return; - Clone = module.Enemies(OID.Boss).FirstOrDefault(a => a != module.PrimaryActor); + Clone = module.Enemies(OID.Boss).FirstOrDefault(a => a != Module.PrimaryActor); if (Clone != null) - CloneSpawnTime = module.WorldState.CurrentTime; + CloneSpawnTime = WorldState.CurrentTime; } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { var clone = CloneIfValid; - if (clone != null && !module.PrimaryActor.IsDestroyed && !module.PrimaryActor.IsDead && module.PrimaryActor.IsTargetable) + if (clone != null && !Module.PrimaryActor.IsDestroyed && !Module.PrimaryActor.IsDead && Module.PrimaryActor.IsTargetable) { - var hpDiff = (int)(clone.HP.Cur - module.PrimaryActor.HP.Cur) * 100.0f / module.PrimaryActor.HP.Max; - var checkIn = Math.Max(0, 20 - (module.WorldState.CurrentTime - CloneSpawnTime).TotalSeconds); - hints.Add($"Clone HP: {(hpDiff > 0 ? "+" : "")}{hpDiff:f1}%, distance: {(clone.Position - module.PrimaryActor.Position).Length():f2}, check in {checkIn:f1}s"); + var hpDiff = (int)(clone.HP.Cur - Module.PrimaryActor.HP.Cur) * 100.0f / Module.PrimaryActor.HP.Max; + var checkIn = Math.Max(0, 20 - (WorldState.CurrentTime - CloneSpawnTime).TotalSeconds); + hints.Add($"Clone HP: {(hpDiff > 0 ? "+" : "")}{hpDiff:f1}%, distance: {(clone.Position - Module.PrimaryActor.Position).Length():f2}, check in {checkIn:f1}s"); } } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { arena.Actor(Clone, ArenaColor.Enemy); } @@ -109,15 +100,12 @@ public T01CaduceusStates(BossModule module) : base(module) .ActivateOnEnter() .ActivateOnEnter() .ActivateOnEnter() - .Raw.Update = () => (module.PrimaryActor.IsDead || module.PrimaryActor.IsDestroyed) && module.FindComponent()!.CloneIfValid == null; + .Raw.Update = () => (Module.PrimaryActor.IsDead || Module.PrimaryActor.IsDestroyed) && module.FindComponent()!.CloneIfValid == null; } } [ConfigDisplay(Order = 0x110, Parent = typeof(RealmRebornConfig))] -public class T01CaduceusConfig : CooldownPlanningConfigNode -{ - public T01CaduceusConfig() : base(50) { } -} +public class T01CaduceusConfig() : CooldownPlanningConfigNode(50); [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 93, NameID = 1466, SortOrder = 2)] public class T01Caduceus : BossModule diff --git a/BossMod/Modules/RealmReborn/Raid/T02MultiADS/AllaganRot.cs b/BossMod/Modules/RealmReborn/Raid/T02MultiADS/AllaganRot.cs index bd9ee73f73..89c34abfb8 100644 --- a/BossMod/Modules/RealmReborn/Raid/T02MultiADS/AllaganRot.cs +++ b/BossMod/Modules/RealmReborn/Raid/T02MultiADS/AllaganRot.cs @@ -10,18 +10,18 @@ class AllaganRot : BossComponent private static readonly float _rotPassRadius = 3; private static readonly PartyRolesConfig.Assignment[] _rotPriority = { PartyRolesConfig.Assignment.R1, PartyRolesConfig.Assignment.M1, PartyRolesConfig.Assignment.M2, PartyRolesConfig.Assignment.H1, PartyRolesConfig.Assignment.H2, PartyRolesConfig.Assignment.R2 }; - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (_rotHolderSlot >= 0) - hints.Add($"Rot: {(_rotExpiration[_rotHolderSlot] - module.WorldState.CurrentTime).TotalSeconds:f1}s"); + hints.Add($"Rot: {(_rotExpiration[_rotHolderSlot] - WorldState.CurrentTime).TotalSeconds:f1}s"); } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { if (_rotHolderSlot == -1 || _rotHolderSlot == slot) return; // nothing special if there is no rot yet or if we're rot holder (we let other come to us to get it) - var rotHolder = module.Raid[_rotHolderSlot]; + var rotHolder = Raid[_rotHolderSlot]; if (rotHolder == null) return; @@ -31,33 +31,33 @@ public override void AddAIHints(BossModule module, int slot, Actor actor, PartyR hints.AddForbiddenZone(ShapeDistance.Circle(rotHolder.Position, _rotPassRadius + 4), _immunityExpiration[slot]); } - public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) + public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) { return _rotHolderSlot == playerSlot ? PlayerPriority.Danger : PlayerPriority.Irrelevant; } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.AllaganRot) { // predict rot target - _rotHolderSlot = module.Raid.FindSlot(spell.TargetID); + _rotHolderSlot = Raid.FindSlot(spell.TargetID); if (_rotHolderSlot >= 0) _rotExpiration[_rotHolderSlot] = spell.NPCFinishAt.AddSeconds(15); } } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { switch ((SID)status.ID) { case SID.AllaganRot: - _rotHolderSlot = module.Raid.FindSlot(actor.InstanceID); + _rotHolderSlot = Raid.FindSlot(actor.InstanceID); if (_rotHolderSlot >= 0) _rotExpiration[_rotHolderSlot] = status.ExpireAt; break; case SID.AllaganImmunity: - int slot = module.Raid.FindSlot(actor.InstanceID); + int slot = Raid.FindSlot(actor.InstanceID); if (slot >= 0) _immunityExpiration[slot] = status.ExpireAt; break; @@ -67,18 +67,18 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st private bool WantToPickUpRot(BossModule module, PartyRolesConfig.Assignment assignment) { var deadline = _rotExpiration[_rotHolderSlot]; - if ((deadline - module.WorldState.CurrentTime).TotalSeconds > 7) + if ((deadline - WorldState.CurrentTime).TotalSeconds > 7) return false; // let rot tick for a while; note that we start moving a bit early, since getting into position takes some time, sometimes up to ~5s // note: rot timer is 15s, immunity is 40s - so if we pass at <= 5s left, we need 5 people in rotation; currently we hardcode priority to R1 (assumed phys) -> M1 -> M2 -> H1 -> H2 -> R2 (spare, assumed caster) - var assignments = Service.Config.Get().SlotsPerAssignment(module.Raid); + var assignments = Service.Config.Get().SlotsPerAssignment(Raid); if (assignments.Length == 0) return false; // if assignments are unset, we can't define pass priority foreach (var next in _rotPriority) { int nextSlot = assignments[(int)next]; - if (nextSlot != _rotHolderSlot && _immunityExpiration[nextSlot] < deadline && !(module.Raid[nextSlot]?.IsDead ?? true)) + if (nextSlot != _rotHolderSlot && _immunityExpiration[nextSlot] < deadline && !(Raid[nextSlot]?.IsDead ?? true)) return next == assignment; } diff --git a/BossMod/Modules/RealmReborn/Raid/T02MultiADS/T02MultiADS.cs b/BossMod/Modules/RealmReborn/Raid/T02MultiADS/T02MultiADS.cs index 43a50361e0..c18c7c79bc 100644 --- a/BossMod/Modules/RealmReborn/Raid/T02MultiADS/T02MultiADS.cs +++ b/BossMod/Modules/RealmReborn/Raid/T02MultiADS/T02MultiADS.cs @@ -53,64 +53,37 @@ public enum SID : uint AllaganImmunity = 334, // none->player, extra=0x0 } -class CleaveCommon : Components.Cleave -{ - public CleaveCommon(AID aid, float hitboxRadius) : base(ActionID.MakeSpell(aid), new AOEShapeCone(6 + hitboxRadius, 60.Degrees()), activeWhileCasting: false) { } -} -class CleaveADS : CleaveCommon { public CleaveADS() : base(AID.CleaveADS, 2.3f) { } } -class CleaveNode : CleaveCommon { public CleaveNode() : base(AID.CleaveNode, 1.15f) { } } +class CleaveCommon(BossModule module, AID aid, float hitboxRadius) : Components.Cleave(module, ActionID.MakeSpell(aid), new AOEShapeCone(6 + hitboxRadius, 60.Degrees()), activeWhileCasting: false); +class CleaveADS(BossModule module) : CleaveCommon(module, AID.CleaveADS, 2.3f); +class CleaveNode(BossModule module) : CleaveCommon(module, AID.CleaveNode, 1.15f); -class HighVoltage : Components.CastHint -{ - public HighVoltage() : base(ActionID.MakeSpell(AID.HighVoltage), "Interruptible") { } -} +class HighVoltage(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.HighVoltage), "Interruptible"); -class RepellingCannons : Components.SelfTargetedAOEs -{ - public RepellingCannons() : base(ActionID.MakeSpell(AID.RepellingCannons), new AOEShapeCircle(8.3f)) { } -} +class RepellingCannons(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RepellingCannons), new AOEShapeCircle(8.3f)); -class PiercingLaser : Components.SelfTargetedAOEs -{ - public PiercingLaser() : base(ActionID.MakeSpell(AID.PiercingLaser), new AOEShapeRect(32.3f, 3)) { } -} +class PiercingLaser(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PiercingLaser), new AOEShapeRect(32.3f, 3)); // TODO: chain lightning?.. -class Firestream : Components.SelfTargetedAOEs -{ - public Firestream() : base(ActionID.MakeSpell(AID.FirestreamAOE), new AOEShapeRect(35.5f, 3)) { } -} +class Firestream(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.FirestreamAOE), new AOEShapeRect(35.5f, 3)); -class Ballast1 : Components.SelfTargetedAOEs -{ - public Ballast1() : base(ActionID.MakeSpell(AID.BallastAOE1), new AOEShapeCone(5.5f, 135.Degrees())) { } -} +class Ballast1(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.BallastAOE1), new AOEShapeCone(5.5f, 135.Degrees())); -class Ballast2 : Components.SelfTargetedAOEs -{ - public Ballast2() : base(ActionID.MakeSpell(AID.BallastAOE2), new AOEShapeDonutSector(5.5f, 10.5f, 135.Degrees())) { } -} +class Ballast2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.BallastAOE2), new AOEShapeDonutSector(5.5f, 10.5f, 135.Degrees())); -class Ballast3 : Components.SelfTargetedAOEs -{ - public Ballast3() : base(ActionID.MakeSpell(AID.BallastAOE3), new AOEShapeDonutSector(10.5f, 15.5f, 135.Degrees())) { } -} +class Ballast3(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.BallastAOE3), new AOEShapeDonutSector(10.5f, 15.5f, 135.Degrees())); -class GravityField : Components.PersistentVoidzoneAtCastTarget -{ - public GravityField() : base(6, ActionID.MakeSpell(AID.GravityField), m => m.Enemies(OID.GravityField), 1) { } -} +class GravityField(BossModule module) : Components.PersistentVoidzoneAtCastTarget(module, 6, ActionID.MakeSpell(AID.GravityField), m => m.Enemies(OID.GravityField), 1); class T02AI : BossComponent { - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { foreach (var e in hints.PotentialTargets) { - if (e.Actor == module.PrimaryActor) + if (e.Actor == Module.PrimaryActor) { - int targetVulnStacks = module.WorldState.Actors.Find(e.Actor.TargetID)?.FindStatus(SID.VulnerabilityUp)?.Extra ?? 0; + int targetVulnStacks = WorldState.Actors.Find(e.Actor.TargetID)?.FindStatus(SID.VulnerabilityUp)?.Extra ?? 0; e.AttackStrength = 0.2f + 0.05f * targetVulnStacks; e.Priority = 1; e.ShouldBeInterrupted = true; // interrupt every high voltage; TODO consider interrupt rotation @@ -153,16 +126,10 @@ public T02ADSStates(BossModule module) : base(module) } [ConfigDisplay(Order = 0x120, Parent = typeof(RealmRebornConfig))] -public class T02ADSConfig : CooldownPlanningConfigNode -{ - public T02ADSConfig() : base(50) { } -} +public class T02ADSConfig() : CooldownPlanningConfigNode(50); [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.ADS, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 94, NameID = 1459, SortOrder = 1)] -public class T02ADS : BossModule -{ - public T02ADS(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsRect(new(0, 77), 18, 13)) { } -} +public class T02ADS(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsRect(new(0, 77), 18, 13)); class T02QuarantineNodeStates : StateMachineBuilder { diff --git a/BossMod/Modules/RealmReborn/Raid/T04Gauntlet/T04Gauntlet.cs b/BossMod/Modules/RealmReborn/Raid/T04Gauntlet/T04Gauntlet.cs index f449a80264..958596c4d1 100644 --- a/BossMod/Modules/RealmReborn/Raid/T04Gauntlet/T04Gauntlet.cs +++ b/BossMod/Modules/RealmReborn/Raid/T04Gauntlet/T04Gauntlet.cs @@ -27,10 +27,7 @@ public enum AID : uint EmergencyOverride = 1258, // DriveCylinder->self, no cast, soft enrage raidwide } -class Rotoswipe : Components.Cleave -{ - public Rotoswipe() : base(ActionID.MakeSpell(AID.Rotoswipe), new AOEShapeCone(11, 60.Degrees()), (uint)OID.ClockworkDreadnaught) { } // TODO: verify angle -} +class Rotoswipe(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.Rotoswipe), new AOEShapeCone(11, 60.Degrees()), (uint)OID.ClockworkDreadnaught); // TODO: verify angle class GravityThrustPox : Components.GenericAOEs { @@ -38,17 +35,14 @@ class GravityThrustPox : Components.GenericAOEs public GravityThrustPox() : base(new(), "Move behind rook!") { } - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { foreach (var c in ((T04Gauntlet)module).Rooks.Where(a => a.CastInfo?.TargetID == actor.InstanceID)) yield return new(_shape, c.Position, c.CastInfo!.Rotation, c.CastInfo.NPCFinishAt); } } -class EmergencyOverride : Components.CastCounter -{ - public EmergencyOverride() : base(ActionID.MakeSpell(AID.EmergencyOverride)) { } -} +class EmergencyOverride(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.EmergencyOverride)); class T04GauntletStates : StateMachineBuilder { diff --git a/BossMod/Modules/RealmReborn/Raid/T05Twintania/Common.cs b/BossMod/Modules/RealmReborn/Raid/T05Twintania/Common.cs index da254d7f5e..43e2a29491 100644 --- a/BossMod/Modules/RealmReborn/Raid/T05Twintania/Common.cs +++ b/BossMod/Modules/RealmReborn/Raid/T05Twintania/Common.cs @@ -8,25 +8,25 @@ class Plummet : Components.Cleave public override void Init(BossModule module) { base.Init(module); - NextExpected = module.WorldState.CurrentTime.AddSeconds(6.5f); + NextExpected = WorldState.FutureTime(6.5f); } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { base.AddAIHints(module, slot, actor, assignment, hints); - if ((NextExpected - module.WorldState.CurrentTime).TotalSeconds < 3) + if ((NextExpected - WorldState.CurrentTime).TotalSeconds < 3) { - var boss = hints.PotentialTargets.Find(e => e.Actor == module.PrimaryActor); + var boss = hints.PotentialTargets.Find(e => e.Actor == Module.PrimaryActor); if (boss != null) boss.AttackStrength += 0.3f; } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { base.OnEventCast(module, caster, spell); if (spell.Action == WatchedAction) - NextExpected = module.WorldState.CurrentTime.AddSeconds(12.5f); + NextExpected = WorldState.FutureTime(12.5f); } } @@ -43,21 +43,21 @@ public DeathSentence() : base(ActionID.MakeSpell(AID.DeathSentence)) { } public override void Init(BossModule module) { - NextCastStart = module.WorldState.CurrentTime.AddSeconds(18); + NextCastStart = WorldState.FutureTime(18); } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { - hints.Add($"Next death sentence in ~{(NextCastStart - module.WorldState.CurrentTime).TotalSeconds:f1}s"); + hints.Add($"Next death sentence in ~{(NextCastStart - WorldState.CurrentTime).TotalSeconds:f1}s"); } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { - var boss = hints.PotentialTargets.Find(e => e.Actor == module.PrimaryActor); + var boss = hints.PotentialTargets.Find(e => e.Actor == Module.PrimaryActor); if (boss == null) return; - if ((NextCastStart - module.WorldState.CurrentTime).TotalSeconds < 1) + if ((NextCastStart - WorldState.CurrentTime).TotalSeconds < 1) { boss.AttackStrength += 0.3f; } @@ -71,9 +71,9 @@ public override void AddAIHints(BossModule module, int slot, Actor actor, PartyR // - component gets destroyed at the end of P2 and recreated at the beginning of P4 - it takes at least 150s, which is more than any cooldowns we use boss.ShouldBeTanked = TankRole == assignment; boss.PreferProvoking = true; - if (module.PrimaryActor.CastInfo?.Action == WatchedAction) + if (Module.PrimaryActor.CastInfo?.Action == WatchedAction) { - var cooldownWindowEnd = (float)(module.PrimaryActor.CastInfo.NPCFinishAt - module.WorldState.CurrentTime).TotalSeconds; + var cooldownWindowEnd = (float)(Module.PrimaryActor.CastInfo.NPCFinishAt - WorldState.CurrentTime).TotalSeconds; switch (assignment) { case PartyRolesConfig.Assignment.MT: @@ -113,31 +113,31 @@ public override void AddAIHints(BossModule module, int slot, Actor actor, PartyR case PartyRolesConfig.Assignment.M1: if (NumCasts % 3 == 0) { - hints.PlannedActions.Add((ActionID.MakeSpell(DRG.AID.Feint), module.PrimaryActor, cooldownWindowEnd, false)); + hints.PlannedActions.Add((ActionID.MakeSpell(DRG.AID.Feint), Module.PrimaryActor, cooldownWindowEnd, false)); } break; case PartyRolesConfig.Assignment.M2: if (NumCasts % 3 == 1) { - hints.PlannedActions.Add((ActionID.MakeSpell(DRG.AID.Feint), module.PrimaryActor, cooldownWindowEnd, false)); + hints.PlannedActions.Add((ActionID.MakeSpell(DRG.AID.Feint), Module.PrimaryActor, cooldownWindowEnd, false)); } break; case PartyRolesConfig.Assignment.R1: case PartyRolesConfig.Assignment.R2: if (NumCasts % 3 == 2) { - hints.PlannedActions.Add((ActionID.MakeSpell(BLM.AID.Addle), module.PrimaryActor, cooldownWindowEnd, false)); + hints.PlannedActions.Add((ActionID.MakeSpell(BLM.AID.Addle), Module.PrimaryActor, cooldownWindowEnd, false)); } break; } } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) { - NextCastStart = module.WorldState.CurrentTime.AddSeconds(36); + NextCastStart = WorldState.FutureTime(36); TankedByOT = !TankedByOT; } } diff --git a/BossMod/Modules/RealmReborn/Raid/T05Twintania/Phase1.cs b/BossMod/Modules/RealmReborn/Raid/T05Twintania/Phase1.cs index c7d835fb13..5027f6c3b5 100644 --- a/BossMod/Modules/RealmReborn/Raid/T05Twintania/Phase1.cs +++ b/BossMod/Modules/RealmReborn/Raid/T05Twintania/Phase1.cs @@ -1,17 +1,14 @@ namespace BossMod.RealmReborn.Raid.T05Twintania; // P1 mechanics -class P1LiquidHellAdds : Components.PersistentVoidzoneAtCastTarget -{ - public P1LiquidHellAdds() : base(6, ActionID.MakeSpell(AID.LiquidHellAdds), m => m.Enemies(OID.LiquidHell).Where(z => z.EventState != 7), 0) { } // note: voidzone appears ~1.2s after cast ends, but we want to try avoiding initial damage too -} +class P1LiquidHellAdds(BossModule module) : Components.PersistentVoidzoneAtCastTarget(module, 6, ActionID.MakeSpell(AID.LiquidHellAdds), m => m.Enemies(OID.LiquidHell).Where(z => z.EventState != 7), 0); // note: voidzone appears ~1.2s after cast ends, but we want to try avoiding initial damage too // after divebombs (P4), boss reappears at (-6.67, 5) - it is a good idea to drop two neurolinks at melee range to keep uptime // otherwise it's a simple phase - kill adds, then move near boss and focus it // we let plummet & death sentence module handle tanking and healing hints, since they are common to multiple phases class P1AI : BossComponent { - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { bool stillHaveAdds = false; foreach (var e in hints.PotentialTargets) @@ -34,7 +31,7 @@ public override void AddAIHints(BossModule module, int slot, Actor actor, PartyR // after adds are dead, everyone should stay near boss in preparation to P2; don't bother doing it with tanks, so that we don't interfere with positioning if (!stillHaveAdds && actor.Role != Role.Tank) { - hints.AddForbiddenZone(ShapeDistance.InvertedCircle(module.PrimaryActor.Position, 8), DateTime.MaxValue); + hints.AddForbiddenZone(ShapeDistance.InvertedCircle(Module.PrimaryActor.Position, 8), DateTime.MaxValue); } } } diff --git a/BossMod/Modules/RealmReborn/Raid/T05Twintania/Phase2.cs b/BossMod/Modules/RealmReborn/Raid/T05Twintania/Phase2.cs index 6f1f54ea93..cca4dcef8e 100644 --- a/BossMod/Modules/RealmReborn/Raid/T05Twintania/Phase2.cs +++ b/BossMod/Modules/RealmReborn/Raid/T05Twintania/Phase2.cs @@ -11,29 +11,29 @@ class P2Fireball : BossComponent public override void Init(BossModule module) { - NextAt = module.WorldState.CurrentTime.AddSeconds(7.5f); + NextAt = WorldState.FutureTime(7.5f); } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (Target == null) - hints.Add($"Next fireball in ~{(NextAt - module.WorldState.CurrentTime).TotalSeconds:f1}s"); + hints.Add($"Next fireball in ~{(NextAt - WorldState.CurrentTime).TotalSeconds:f1}s"); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (Target != null) arena.AddCircle(Target.Position, Radius, ArenaColor.Safe); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { case AID.FireballMarker: - Target = module.WorldState.Actors.Find(spell.MainTargetID); - ExplosionAt = module.WorldState.CurrentTime.AddSeconds(4.5f); // seen 4.5 to 5 seconds delay - NextAt = module.WorldState.CurrentTime.AddSeconds(25); // TODO: verify... + Target = WorldState.Actors.Find(spell.MainTargetID); + ExplosionAt = WorldState.FutureTime(4.5f); // seen 4.5 to 5 seconds delay + NextAt = WorldState.FutureTime(25); // TODO: verify... break; case AID.FireballAOE: Target = null; @@ -50,28 +50,28 @@ class P2Conflagrate : BossComponent public override void Init(BossModule module) { - NextAt = module.WorldState.CurrentTime.AddSeconds(29); + NextAt = WorldState.FutureTime(29); } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (Target == null) - hints.Add($"Next conflagrate in ~{(NextAt - module.WorldState.CurrentTime).TotalSeconds:f1}s"); + hints.Add($"Next conflagrate in ~{(NextAt - WorldState.CurrentTime).TotalSeconds:f1}s"); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { case AID.FirestormMarker: - Target = module.WorldState.Actors.Find(spell.MainTargetID); - FettersAt = module.WorldState.CurrentTime.AddSeconds(2.5f); // seen 2.3 to 2.8 seconds delay - NextAt = module.WorldState.CurrentTime.AddSeconds(35); // TODO: verify... + Target = WorldState.Actors.Find(spell.MainTargetID); + FettersAt = WorldState.FutureTime(2.5f); // seen 2.3 to 2.8 seconds delay + NextAt = WorldState.FutureTime(35); // TODO: verify... break; } } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if (actor == Target && (SID)status.ID == SID.Fetters) Target = null; @@ -91,7 +91,7 @@ public override void Init(BossModule module) _conflagrate = module.FindComponent(); } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { foreach (var e in hints.PotentialTargets) { @@ -99,7 +99,7 @@ public override void AddAIHints(BossModule module, int slot, Actor actor, PartyR { case OID.Boss: e.Priority = 1; - if (_fireball?.Target == null && (_fireball!.NextAt - module.WorldState.CurrentTime).TotalSeconds > 5 && _conflagrate?.Target == null && (_conflagrate!.NextAt - module.WorldState.CurrentTime).TotalSeconds > 5) + if (_fireball?.Target == null && (_fireball!.NextAt - WorldState.CurrentTime).TotalSeconds > 5 && _conflagrate?.Target == null && (_conflagrate!.NextAt - WorldState.CurrentTime).TotalSeconds > 5) e.DesiredPosition = new(-14, 5); // don't move boss while other mechanics are active or imminent e.DesiredRotation = -90.Degrees(); break; @@ -118,7 +118,7 @@ public override void AddAIHints(BossModule module, int slot, Actor actor, PartyR if (_conflagrate?.Target == actor) { hints.ForbiddenZones.Clear(); // ignore things like cleave - hints.AddForbiddenZone(ShapeDistance.InvertedCircle(module.PrimaryActor.Position, 1), _conflagrate.FettersAt); + hints.AddForbiddenZone(ShapeDistance.InvertedCircle(Module.PrimaryActor.Position, 1), _conflagrate.FettersAt); } else if (_deathSentence?.TankRole != assignment) { @@ -129,20 +129,20 @@ public override void AddAIHints(BossModule module, int slot, Actor actor, PartyR _ => _fireball?.Target?.Role == Role.Healer }; // note that boss rotates when casting fireball - we don't want that to affect positioning - var bossTarget = module.WorldState.Actors.Find(module.PrimaryActor.TargetID); - var dir = bossTarget != null ? Angle.FromDirection(bossTarget.Position - module.PrimaryActor.Position) : module.PrimaryActor.Rotation; + var bossTarget = WorldState.Actors.Find(Module.PrimaryActor.TargetID); + var dir = bossTarget != null ? Angle.FromDirection(bossTarget.Position - Module.PrimaryActor.Position) : Module.PrimaryActor.Rotation; dir += (stayLeft ? 135 : -135).Degrees(); - hints.AddForbiddenZone(ShapeDistance.InvertedCircle(module.PrimaryActor.Position + dir.ToDirection() * 8, P2Fireball.Radius * 0.5f), _fireball?.Target != null ? _fireball.ExplosionAt : DateTime.MaxValue); + hints.AddForbiddenZone(ShapeDistance.InvertedCircle(Module.PrimaryActor.Position + dir.ToDirection() * 8, P2Fireball.Radius * 0.5f), _fireball?.Target != null ? _fireball.ExplosionAt : DateTime.MaxValue); } if (_fireball?.Target != null) { bool hitHealers = _fireball.Target.Role == Role.Healer; - var hitPlayers = module.Raid.WithSlot().WhereActor(a => a.Role switch + var hitPlayers = Raid.WithSlot().WhereActor(a => a.Role switch { Role.Healer => hitHealers, Role.Ranged => !hitHealers, - _ => module.PrimaryActor.TargetID != a.InstanceID + _ => Module.PrimaryActor.TargetID != a.InstanceID }).Mask(); hints.PredictedDamage.Add((hitPlayers, _fireball.ExplosionAt)); } diff --git a/BossMod/Modules/RealmReborn/Raid/T05Twintania/Phase3.cs b/BossMod/Modules/RealmReborn/Raid/T05Twintania/Phase3.cs index 8cfee40d73..06460169b0 100644 --- a/BossMod/Modules/RealmReborn/Raid/T05Twintania/Phase3.cs +++ b/BossMod/Modules/RealmReborn/Raid/T05Twintania/Phase3.cs @@ -9,25 +9,25 @@ class P3Divebomb : Components.GenericAOEs private static readonly AOEShapeRect _shape = new(35, 6); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (Target != null) { - if (module.PrimaryActor.CastInfo == null) - yield return new(_shape, module.PrimaryActor.Position, Angle.FromDirection(Target.Value - module.PrimaryActor.Position), HitAt); + if (Module.PrimaryActor.CastInfo == null) + yield return new(_shape, Module.PrimaryActor.Position, Angle.FromDirection(Target.Value - Module.PrimaryActor.Position), HitAt); else - yield return new(_shape, module.PrimaryActor.Position, module.PrimaryActor.CastInfo.Rotation, module.PrimaryActor.CastInfo.NPCFinishAt); + yield return new(_shape, Module.PrimaryActor.Position, Module.PrimaryActor.CastInfo.Rotation, Module.PrimaryActor.CastInfo.NPCFinishAt); } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { base.OnEventCast(module, caster, spell); switch ((AID)spell.Action.ID) { case AID.DivebombMarker: - Target = module.WorldState.Actors.Find(spell.MainTargetID)?.Position; - HitAt = module.WorldState.CurrentTime.AddSeconds(1.7f); + Target = WorldState.Actors.Find(spell.MainTargetID)?.Position; + HitAt = WorldState.FutureTime(1.7f); break; case AID.DivebombAOE: Target = null; @@ -50,17 +50,17 @@ public override void Init(BossModule module) Asclepius = module.Enemies(OID.Asclepius); } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { var nextHygieia = ActiveHygieia.MinBy(a => a.InstanceID); // select next add to kill by lowest hp var asclepiusVuln = Asclepius.FirstOrDefault()?.FindStatus(SID.Disseminate); - bool killHygieia = asclepiusVuln == null || (asclepiusVuln.Value.ExpireAt - module.WorldState.CurrentTime).TotalSeconds < 10; + bool killHygieia = asclepiusVuln == null || (asclepiusVuln.Value.ExpireAt - WorldState.CurrentTime).TotalSeconds < 10; foreach (var e in hints.PotentialTargets) { switch ((OID)e.Actor.OID) { case OID.Hygieia: - var predictedHP = e.Actor.HP.Cur + module.WorldState.PendingEffects.PendingHPDifference(e.Actor.InstanceID); + var predictedHP = e.Actor.HP.Cur + WorldState.PendingEffects.PendingHPDifference(e.Actor.InstanceID); e.Priority = e.Actor.HP.Cur == 1 ? 0 : killHygieia && e.Actor == nextHygieia ? 2 : predictedHP < 0.3f * e.Actor.HP.Max ? -1 @@ -78,14 +78,14 @@ public override void AddAIHints(BossModule module, int slot, Actor actor, PartyR } } - if (!module.PrimaryActor.IsTargetable && !ActiveHygieia.Any() && !Asclepius.Any(a => !a.IsDead)) + if (!Module.PrimaryActor.IsTargetable && !ActiveHygieia.Any() && !Asclepius.Any(a => !a.IsDead)) { // once all adds are dead, gather where boss will return hints.AddForbiddenZone(ShapeDistance.InvertedCircle(new(-6.67f, 5), 5), DateTime.MaxValue); } } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (var a in ActiveHygieia) { @@ -105,14 +105,14 @@ public P3AethericProfusion() : base(ActionID.MakeSpell(AID.AethericProfusion)) { public override void Init(BossModule module) { - _activation = module.WorldState.CurrentTime.AddSeconds(6.7f); + _activation = WorldState.FutureTime(6.7f); } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { // select neurolinks to stand at; let everyone except MT stay in one closer to boss var neurolinks = module.Enemies(OID.Neurolink); - var closerNeurolink = neurolinks.Closest(module.PrimaryActor.Position); + var closerNeurolink = neurolinks.Closest(Module.PrimaryActor.Position); foreach (var neurolink in neurolinks) { bool isClosest = neurolink == closerNeurolink; @@ -122,17 +122,17 @@ public override void AddAIHints(BossModule module, int slot, Actor actor, PartyR } // let MT taunt boss if needed - var boss = hints.PotentialTargets.Find(e => e.Actor == module.PrimaryActor); + var boss = hints.PotentialTargets.Find(e => e.Actor == Module.PrimaryActor); if (boss != null) boss.PreferProvoking = true; // mitigate heavy raidwide - hints.PredictedDamage.Add((module.Raid.WithSlot().Mask(), _activation)); + hints.PredictedDamage.Add((Raid.WithSlot().Mask(), _activation)); if (actor.Role == Role.Ranged) - hints.PlannedActions.Add((ActionID.MakeSpell(BLM.AID.Addle), module.PrimaryActor, (float)(_activation - module.WorldState.CurrentTime).TotalSeconds, false)); + hints.PlannedActions.Add((ActionID.MakeSpell(BLM.AID.Addle), Module.PrimaryActor, (float)(_activation - WorldState.CurrentTime).TotalSeconds, false)); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (var neurolink in module.Enemies(OID.Neurolink)) arena.AddCircle(neurolink.Position, T05Twintania.NeurolinkRadius, ArenaColor.Safe); diff --git a/BossMod/Modules/RealmReborn/Raid/T05Twintania/Phase4.cs b/BossMod/Modules/RealmReborn/Raid/T05Twintania/Phase4.cs index d80d312d84..c391cd0407 100644 --- a/BossMod/Modules/RealmReborn/Raid/T05Twintania/Phase4.cs +++ b/BossMod/Modules/RealmReborn/Raid/T05Twintania/Phase4.cs @@ -16,29 +16,29 @@ public override void Init(BossModule module) _twisters = module.Enemies(OID.Twister); } - public override void Update(BossModule module) + public override void Update() { - if (_predictedPositions.Count == 0 && (module.PrimaryActor.CastInfo?.IsSpell(AID.Twister) ?? false) && (module.PrimaryActor.CastInfo.NPCFinishAt - module.WorldState.CurrentTime).TotalSeconds <= PredictBeforeCastFinish) - _predictedPositions.AddRange(module.Raid.WithoutSlot().Select(a => a.Position)); + if (_predictedPositions.Count == 0 && (Module.PrimaryActor.CastInfo?.IsSpell(AID.Twister) ?? false) && (Module.PrimaryActor.CastInfo.NPCFinishAt - WorldState.CurrentTime).TotalSeconds <= PredictBeforeCastFinish) + _predictedPositions.AddRange(Raid.WithoutSlot().Select(a => a.Position)); if (_twisters.Count > 0) _predictedPositions.Clear(); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { - if (module.PrimaryActor.CastInfo?.IsSpell(AID.Twister) ?? false) + if (Module.PrimaryActor.CastInfo?.IsSpell(AID.Twister) ?? false) hints.Add("Move!"); } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { foreach (var p in _predictedPositions) - hints.AddForbiddenZone(ShapeDistance.Circle(p, PredictAvoidRadius), module.PrimaryActor.CastInfo?.NPCFinishAt ?? new()); + hints.AddForbiddenZone(ShapeDistance.Circle(p, PredictAvoidRadius), Module.PrimaryActor.CastInfo?.NPCFinishAt ?? new()); foreach (var t in ActiveTwisters) hints.AddForbiddenZone(ShapeDistance.Circle(t.Position, t.HitboxRadius + TwisterCushion)); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (var twister in ActiveTwisters) arena.AddCircle(twister.Position, twister.HitboxRadius, ArenaColor.Danger); @@ -56,13 +56,13 @@ public override void Init(BossModule module) _dreadknights = module.Enemies(OID.Dreadknight); } - public override void Update(BossModule module) + public override void Update() { if (!ActiveDreadknights.Any()) _target = null; } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { if (_target == null) { @@ -84,7 +84,7 @@ public override void AddAIHints(BossModule module, int slot, Actor actor, PartyR } } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (var a in ActiveDreadknights) { @@ -94,10 +94,10 @@ public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.UnwovenWill) - _target = module.WorldState.Actors.Find(spell.MainTargetID); + _target = WorldState.Actors.Find(spell.MainTargetID); } } @@ -110,7 +110,7 @@ public override void Init(BossModule module) _deathSentence = module.FindComponent(); } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { foreach (var e in hints.PotentialTargets) { diff --git a/BossMod/Modules/RealmReborn/Raid/T05Twintania/Phase5.cs b/BossMod/Modules/RealmReborn/Raid/T05Twintania/Phase5.cs index b233ed380f..488515be5e 100644 --- a/BossMod/Modules/RealmReborn/Raid/T05Twintania/Phase5.cs +++ b/BossMod/Modules/RealmReborn/Raid/T05Twintania/Phase5.cs @@ -7,13 +7,13 @@ class P5LiquidHell : Components.PersistentVoidzoneAtCastTarget public P5LiquidHell() : base(6, ActionID.MakeSpell(AID.LiquidHellBoss), m => m.Enemies(OID.LiquidHell).Where(z => z.EventState != 7), 1.5f) { } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { base.OnEventCast(module, caster, spell); switch ((AID)spell.Action.ID) { case AID.LiquidHellMarker: - Target = module.WorldState.Actors.Find(spell.MainTargetID); + Target = WorldState.Actors.Find(spell.MainTargetID); break; case AID.LiquidHellBoss: if (NumCasts % 5 == 0) @@ -35,18 +35,18 @@ public override void Init(BossModule module) Neurolinks = module.Enemies(OID.Neurolink); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (actor == Target) hints.Add("Go to neurolink!", !Neurolinks.InRadius(actor.Position, T05Twintania.NeurolinkRadius).Any()); } - public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) + public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) { return player == Target ? PlayerPriority.Danger : PlayerPriority.Irrelevant; } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (Target != null) foreach (var orb in Orbs) @@ -55,12 +55,12 @@ public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc arena.AddCircle(neurolink.Position, T05Twintania.NeurolinkRadius, Target == pc ? ArenaColor.Safe : ArenaColor.Danger); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { case AID.HatchMarker: - Target = module.WorldState.Actors.Find(spell.MainTargetID); + Target = WorldState.Actors.Find(spell.MainTargetID); break; case AID.Hatch: Target = null; @@ -82,16 +82,16 @@ public override void Init(BossModule module) _hatch = module.FindComponent(); } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { bool forbidNeurolinks = true; // stay out of neurolinks by default if (_hatch?.Target != null) { // see if there is anyone intercepting orb in a neurolink - var neurolinkUnderBoss = _hatch.Neurolinks.FirstOrDefault(n => n.Position.InCircle(module.PrimaryActor.Position, 1)); + var neurolinkUnderBoss = _hatch.Neurolinks.FirstOrDefault(n => n.Position.InCircle(Module.PrimaryActor.Position, 1)); // note: i've used to have extra logic if orb is being intercepted: in such case neither target would move anywhere nor others would give space // however, it's a bit finicky - instead, it's safer to just let everyone move, and if orb ends up being intercepted - oh well... - //var orbIntercepted = neurolinkUnderBoss != null && module.Raid.WithoutSlot().InRadius(neurolinkUnderBoss.Position, T05Twintania.NeurolinkRadius).Any(); + //var orbIntercepted = neurolinkUnderBoss != null && Raid.WithoutSlot().InRadius(neurolinkUnderBoss.Position, T05Twintania.NeurolinkRadius).Any(); if (actor == _hatch.Target) { // hatch target should run to safe neurolink (except for neurolink under boss, this is unsafe) if orb is not being intercepted @@ -131,7 +131,7 @@ public override void AddAIHints(BossModule module, int slot, Actor actor, PartyR if (actor == _liquidHell?.Target) { // liquid hell target should gtfo from raid - foreach (var p in module.Raid.WithoutSlot().Exclude(actor)) + foreach (var p in Raid.WithoutSlot().Exclude(actor)) hints.AddForbiddenZone(ShapeDistance.Circle(p.Position, _liquidHell.Shape.Radius)); } } diff --git a/BossMod/Modules/RealmReborn/Trial/T01IfritN/T01IfritN.cs b/BossMod/Modules/RealmReborn/Trial/T01IfritN/T01IfritN.cs index afe106c7a6..32076ec6e1 100644 --- a/BossMod/Modules/RealmReborn/Trial/T01IfritN/T01IfritN.cs +++ b/BossMod/Modules/RealmReborn/Trial/T01IfritN/T01IfritN.cs @@ -23,34 +23,25 @@ class Hints : BossComponent { private DateTime _nailSpawn; - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { var nail = module.Enemies(OID.InfernalNail).FirstOrDefault(); if (_nailSpawn == default && nail != null && nail.IsTargetable) { - _nailSpawn = module.WorldState.CurrentTime; + _nailSpawn = WorldState.CurrentTime; } if (_nailSpawn != default && nail != null && nail.IsTargetable && !nail.IsDead) { - hints.Add($"Nail enrage in: {Math.Max(35 - (module.WorldState.CurrentTime - _nailSpawn).TotalSeconds, 0.0f):f1}s"); + hints.Add($"Nail enrage in: {Math.Max(35 - (WorldState.CurrentTime - _nailSpawn).TotalSeconds, 0.0f):f1}s"); } } } -class Incinerate : Components.Cleave -{ - public Incinerate() : base(ActionID.MakeSpell(AID.Incinerate), new AOEShapeCone(16, 60.Degrees())) { } // TODO: verify angle -} +class Incinerate(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.Incinerate), new AOEShapeCone(16, 60.Degrees())); // TODO: verify angle -class Eruption : Components.LocationTargetedAOEs -{ - public Eruption() : base(ActionID.MakeSpell(AID.EruptionAOE), 8) { } -} +class Eruption(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.EruptionAOE), 8); -class RadiantPlume : Components.LocationTargetedAOEs -{ - public RadiantPlume() : base(ActionID.MakeSpell(AID.RadiantPlumeAOE), 8) { } -} +class RadiantPlume(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.RadiantPlumeAOE), 8); class T01IfritNStates : StateMachineBuilder { @@ -65,7 +56,4 @@ public T01IfritNStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 56, NameID = 1185)] -public class T01IfritN : BossModule -{ - public T01IfritN(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(-0, 0), 20)) { } -} +public class T01IfritN(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(-0, 0), 20)); diff --git a/BossMod/Modules/RealmReborn/Trial/T02TitanN/T02TitanN.cs b/BossMod/Modules/RealmReborn/Trial/T02TitanN/T02TitanN.cs index 913d032b8c..64bdddc101 100644 --- a/BossMod/Modules/RealmReborn/Trial/T02TitanN/T02TitanN.cs +++ b/BossMod/Modules/RealmReborn/Trial/T02TitanN/T02TitanN.cs @@ -26,39 +26,27 @@ class Hints : BossComponent { private DateTime _heartSpawn; - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { var heartExists = ((T02TitanN)module).ActiveHeart.Any(); if (_heartSpawn == default && heartExists) { - _heartSpawn = module.WorldState.CurrentTime; + _heartSpawn = WorldState.CurrentTime; } if (_heartSpawn != default && heartExists) { - hints.Add($"Heart enrage in: {Math.Max(62 - (module.WorldState.CurrentTime - _heartSpawn).TotalSeconds, 0.0f):f1}s"); + hints.Add($"Heart enrage in: {Math.Max(62 - (WorldState.CurrentTime - _heartSpawn).TotalSeconds, 0.0f):f1}s"); } } } -class RockBuster : Components.Cleave -{ - public RockBuster() : base(ActionID.MakeSpell(AID.RockBuster), new AOEShapeCone(11.25f, 60.Degrees())) { } // TODO: verify angle -} +class RockBuster(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.RockBuster), new AOEShapeCone(11.25f, 60.Degrees())); // TODO: verify angle -class Geocrush : Components.SelfTargetedAOEs -{ - public Geocrush() : base(ActionID.MakeSpell(AID.Geocrush), new AOEShapeCircle(18)) { } // TODO: verify falloff -} +class Geocrush(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Geocrush), new AOEShapeCircle(18)); // TODO: verify falloff -class Landslide : Components.SelfTargetedLegacyRotationAOEs -{ - public Landslide() : base(ActionID.MakeSpell(AID.Landslide), new AOEShapeRect(40, 3)) { } -} +class Landslide(BossModule module) : Components.SelfTargetedLegacyRotationAOEs(module, ActionID.MakeSpell(AID.Landslide), new AOEShapeRect(40, 3)); -class WeightOfTheLand : Components.LocationTargetedAOEs -{ - public WeightOfTheLand() : base(ActionID.MakeSpell(AID.WeightOfTheLandAOE), 6) { } -} +class WeightOfTheLand(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.WeightOfTheLandAOE), 6); class T02TitanNStates : StateMachineBuilder { diff --git a/BossMod/Modules/RealmReborn/Trial/T03GarudaN/T03GarudaN.cs b/BossMod/Modules/RealmReborn/Trial/T03GarudaN/T03GarudaN.cs index 6417e891b1..8368551aad 100644 --- a/BossMod/Modules/RealmReborn/Trial/T03GarudaN/T03GarudaN.cs +++ b/BossMod/Modules/RealmReborn/Trial/T03GarudaN/T03GarudaN.cs @@ -27,23 +27,17 @@ public enum AID : uint // disallow clipping monoliths class Friction : BossComponent { - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { - if (module.PrimaryActor.CastInfo == null) // don't forbid standing near monoliths while boss is casting to allow avoiding aoes + if (Module.PrimaryActor.CastInfo == null) // don't forbid standing near monoliths while boss is casting to allow avoiding aoes foreach (var m in module.Enemies(OID.Monolith)) hints.AddForbiddenZone(ShapeDistance.Circle(m.Position, 5)); } } -class Downburst : Components.Cleave -{ - public Downburst() : base(ActionID.MakeSpell(AID.Downburst), new AOEShapeCone(11.7f, 60.Degrees())) { } -} +class Downburst(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.Downburst), new AOEShapeCone(11.7f, 60.Degrees())); -class Slipstream : Components.SelfTargetedAOEs -{ - public Slipstream() : base(ActionID.MakeSpell(AID.Slipstream), new AOEShapeCone(11.7f, 45.Degrees())) { } -} +class Slipstream(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Slipstream), new AOEShapeCone(11.7f, 45.Degrees())); class MistralSongP1 : Components.CastLineOfSightAOE { @@ -58,7 +52,7 @@ class EyeOfTheStorm : Components.GenericAOEs public EyeOfTheStorm() : base(ActionID.MakeSpell(AID.AerialBlast)) { } - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (NumCasts > 0) foreach (var c in module.Enemies(OID.EyeOfTheStormHelper)) @@ -66,15 +60,9 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, } } -class MistralSongP2 : Components.SelfTargetedAOEs -{ - public MistralSongP2() : base(ActionID.MakeSpell(AID.MistralSongP2), new AOEShapeCone(31.7f, 60.Degrees())) { } -} +class MistralSongP2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.MistralSongP2), new AOEShapeCone(31.7f, 60.Degrees())); -class MistralShriek : Components.SelfTargetedAOEs -{ - public MistralShriek() : base(ActionID.MakeSpell(AID.MistralShriek), new AOEShapeCircle(24.7f)) { } -} +class MistralShriek(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.MistralShriek), new AOEShapeCircle(24.7f)); class T03GarudaNStates : StateMachineBuilder { diff --git a/BossMod/Modules/RealmReborn/Trial/T04PortaDecumana/T04PortaDecumana1.cs b/BossMod/Modules/RealmReborn/Trial/T04PortaDecumana/T04PortaDecumana1.cs index 04dd32d073..ca393b8c85 100644 --- a/BossMod/Modules/RealmReborn/Trial/T04PortaDecumana/T04PortaDecumana1.cs +++ b/BossMod/Modules/RealmReborn/Trial/T04PortaDecumana/T04PortaDecumana1.cs @@ -50,64 +50,34 @@ public enum SID : uint VortexBarrier = 3012, // Boss->Boss, extra=0x0 } -class EarthenFury : Components.RaidwideCast -{ - public EarthenFury() : base(ActionID.MakeSpell(AID.EarthenFuryAOE)) { } -} +class EarthenFury(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.EarthenFuryAOE)); -class Geocrush : Components.SelfTargetedAOEs -{ - public Geocrush() : base(ActionID.MakeSpell(AID.Geocrush), new AOEShapeCircle(25)) { } // TODO: verify falloff... -} +class Geocrush(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Geocrush), new AOEShapeCircle(25)); // TODO: verify falloff... -class Landslide1 : Components.SelfTargetedAOEs -{ - public Landslide1() : base(ActionID.MakeSpell(AID.Landslide1), new AOEShapeRect(40, 3)) { } -} +class Landslide1(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Landslide1), new AOEShapeRect(40, 3)); -class Landslide2 : Components.SelfTargetedAOEs -{ - public Landslide2() : base(ActionID.MakeSpell(AID.Landslide2), new AOEShapeRect(40, 3)) { } -} +class Landslide2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Landslide2), new AOEShapeRect(40, 3)); -class WeightOfTheLand : Components.SelfTargetedAOEs -{ - public WeightOfTheLand() : base(ActionID.MakeSpell(AID.WeightOfTheLand), new AOEShapeCircle(6)) { } -} +class WeightOfTheLand(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.WeightOfTheLand), new AOEShapeCircle(6)); -class AerialBlast : Components.RaidwideCast -{ - public AerialBlast() : base(ActionID.MakeSpell(AID.AerialBlastAOE)) { } -} +class AerialBlast(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.AerialBlastAOE)); -class EyeOfTheStorm : Components.SelfTargetedAOEs -{ - public EyeOfTheStorm() : base(ActionID.MakeSpell(AID.EyeOfTheStormAOE), new AOEShapeDonut(12.5f, 25)) { } -} +class EyeOfTheStorm(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.EyeOfTheStormAOE), new AOEShapeDonut(12.5f, 25)); -class MistralShriek : Components.SelfTargetedAOEs -{ - public MistralShriek() : base(ActionID.MakeSpell(AID.MistralShriek), new AOEShapeCircle(23)) { } -} +class MistralShriek(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.MistralShriek), new AOEShapeCircle(23)); -class Hellfire : Components.RaidwideCast -{ - public Hellfire() : base(ActionID.MakeSpell(AID.HellfireAOE)) { } -} +class Hellfire(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.HellfireAOE)); -class RadiantPlume : Components.SelfTargetedAOEs -{ - public RadiantPlume() : base(ActionID.MakeSpell(AID.RadiantPlumeAOE), new AOEShapeCircle(8)) { } -} +class RadiantPlume(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RadiantPlumeAOE), new AOEShapeCircle(8)); class VulcanBurst : Components.KnockbackFromCastTarget { public VulcanBurst() : base(ActionID.MakeSpell(AID.VulcanBurst), 15) { } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { if (Casters.Count > 0) - hints.AddForbiddenZone(ShapeDistance.InvertedCircle(module.Bounds.Center, module.Bounds.HalfSize - Distance), Casters[0].CastInfo!.NPCFinishAt); + hints.AddForbiddenZone(ShapeDistance.InvertedCircle(Module.Bounds.Center, Module.Bounds.HalfSize - Distance), Casters[0].CastInfo!.NPCFinishAt); } } diff --git a/BossMod/Modules/RealmReborn/Trial/T04PortaDecumana/T04PortaDecumana2.cs b/BossMod/Modules/RealmReborn/Trial/T04PortaDecumana/T04PortaDecumana2.cs index b44ad61def..fbc4dc91c3 100644 --- a/BossMod/Modules/RealmReborn/Trial/T04PortaDecumana/T04PortaDecumana2.cs +++ b/BossMod/Modules/RealmReborn/Trial/T04PortaDecumana/T04PortaDecumana2.cs @@ -41,40 +41,19 @@ public enum AID : uint Ultima = 29024, // Boss->self, 71.0s cast, enrage } -class TankPurge : Components.RaidwideCast -{ - public TankPurge() : base(ActionID.MakeSpell(AID.TankPurge)) { } -} +class TankPurge(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.TankPurge)); -class HomingLasers : Components.SingleTargetCast -{ - public HomingLasers() : base(ActionID.MakeSpell(AID.HomingLasers)) { } -} +class HomingLasers(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.HomingLasers)); -class MagitekRayF : Components.SelfTargetedAOEs -{ - public MagitekRayF() : base(ActionID.MakeSpell(AID.MagitekRayAOEForward), new AOEShapeRect(40, 3)) { } -} +class MagitekRayF(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.MagitekRayAOEForward), new AOEShapeRect(40, 3)); -class MagitekRayR : Components.SelfTargetedAOEs -{ - public MagitekRayR() : base(ActionID.MakeSpell(AID.MagitekRayAOERight), new AOEShapeRect(40, 3)) { } -} +class MagitekRayR(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.MagitekRayAOERight), new AOEShapeRect(40, 3)); -class MagitekRayL : Components.SelfTargetedAOEs -{ - public MagitekRayL() : base(ActionID.MakeSpell(AID.MagitekRayAOELeft), new AOEShapeRect(40, 3)) { } -} +class MagitekRayL(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.MagitekRayAOELeft), new AOEShapeRect(40, 3)); -class HomingRay : Components.SpreadFromCastTargets -{ - public HomingRay() : base(ActionID.MakeSpell(AID.HomingRayAOE), 6) { } -} +class HomingRay(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.HomingRayAOE), 6); -class LaserFocus : Components.StackWithCastTargets -{ - public LaserFocus() : base(ActionID.MakeSpell(AID.LaserFocusAOE), 6) { } -} +class LaserFocus(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.LaserFocusAOE), 6); class AethericBoom : Components.KnockbackFromCastTarget { @@ -83,13 +62,13 @@ public AethericBoom() : base(ActionID.MakeSpell(AID.AethericBoom), 30) StopAtWall = true; } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (Casters.Count > 0) hints.Add("Prepare to soak the orbs!"); } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { if (Casters.Count > 0) { @@ -110,13 +89,13 @@ public override void Init(BossModule module) _orbs = module.Enemies(OID.Aetheroplasm); } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (ActiveOrbs.Any()) hints.Add("Soak the orbs!"); } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { var orb = ActiveOrbs.FirstOrDefault(); if (orb != null) @@ -126,39 +105,30 @@ public override void AddAIHints(BossModule module, int slot, Actor actor, PartyR } } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (var orb in ActiveOrbs) arena.AddCircle(orb.Position, 1.4f, ArenaColor.Safe); } } -class AssaultCannon : Components.SelfTargetedAOEs -{ - public AssaultCannon() : base(ActionID.MakeSpell(AID.AssaultCannon), new AOEShapeRect(40, 2)) { } -} +class AssaultCannon(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.AssaultCannon), new AOEShapeRect(40, 2)); -class CitadelBuster : Components.SelfTargetedAOEs -{ - public CitadelBuster() : base(ActionID.MakeSpell(AID.CitadelBuster), new AOEShapeRect(40, 6)) { } -} +class CitadelBuster(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.CitadelBuster), new AOEShapeRect(40, 6)); class Explosion : Components.SelfTargetedAOEs { public Explosion() : base(ActionID.MakeSpell(AID.Explosion), new AOEShapeCircle(16)) { } // TODO: verify falloff // there is an overlap with another mechanic which has to be resolved first - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { if (module.FindComponent()!.Casters.Count == 0) base.AddAIHints(module, slot, actor, assignment, hints); } } -class Ultima : Components.CastHint -{ - public Ultima() : base(ActionID.MakeSpell(AID.Ultima), "Enrage!", true) { } -} +class Ultima(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.Ultima), "Enrage!", true); class T04PortaDecumana2States : StateMachineBuilder { diff --git a/BossMod/Modules/RealmReborn/Trial/T05IfritH/T05IfritH.cs b/BossMod/Modules/RealmReborn/Trial/T05IfritH/T05IfritH.cs index 55110d9444..d3ba7fabbe 100644 --- a/BossMod/Modules/RealmReborn/Trial/T05IfritH/T05IfritH.cs +++ b/BossMod/Modules/RealmReborn/Trial/T05IfritH/T05IfritH.cs @@ -25,29 +25,23 @@ class Hints : BossComponent { private DateTime _nailSpawn; - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { bool nailsActive = ((T05IfritH)module).ActiveNails.Any(); if (_nailSpawn == default && nailsActive) { - _nailSpawn = module.WorldState.CurrentTime; + _nailSpawn = WorldState.CurrentTime; } if (_nailSpawn != default && nailsActive) { - hints.Add($"Nail enrage in: {Math.Max(55 - (module.WorldState.CurrentTime - _nailSpawn).TotalSeconds, 0.0f):f1}s"); + hints.Add($"Nail enrage in: {Math.Max(55 - (WorldState.CurrentTime - _nailSpawn).TotalSeconds, 0.0f):f1}s"); } } } -class Incinerate : Components.Cleave -{ - public Incinerate() : base(ActionID.MakeSpell(AID.Incinerate), new AOEShapeCone(15, 60.Degrees())) { } -} +class Incinerate(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.Incinerate), new AOEShapeCone(15, 60.Degrees())); -class Eruption : Components.LocationTargetedAOEs -{ - public Eruption() : base(ActionID.MakeSpell(AID.EruptionAOE), 8) { } -} +class Eruption(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.EruptionAOE), 8); class CrimsonCyclone : Components.GenericAOEs { @@ -57,28 +51,25 @@ class CrimsonCyclone : Components.GenericAOEs public CrimsonCyclone() : base(ActionID.MakeSpell(AID.CrimsonCyclone)) { } - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { - return _casters.Select(c => new AOEInstance(_shape, c.Position, c.CastInfo?.Rotation ?? c.Rotation, c.CastInfo?.NPCFinishAt ?? module.WorldState.CurrentTime.AddSeconds(4))); + return _casters.Select(c => new AOEInstance(_shape, c.Position, c.CastInfo?.Rotation ?? c.Rotation, c.CastInfo?.NPCFinishAt ?? WorldState.FutureTime(4))); } - public override void OnActorPlayActionTimelineEvent(BossModule module, Actor actor, ushort id) + public override void OnActorPlayActionTimelineEvent(Actor actor, ushort id) { - if ((OID)actor.OID == OID.Boss && actor != module.PrimaryActor && id == 0x008D) + if ((OID)actor.OID == OID.Boss && actor != Module.PrimaryActor && id == 0x008D) _casters.Add(actor); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) _casters.Remove(caster); } } -class RadiantPlume : Components.LocationTargetedAOEs -{ - public RadiantPlume() : base(ActionID.MakeSpell(AID.RadiantPlumeAOE), 8) { } -} +class RadiantPlume(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.RadiantPlumeAOE), 8); class T05IfritHStates : StateMachineBuilder { diff --git a/BossMod/Modules/RealmReborn/Trial/T06GarudaH/T06GarudaH.cs b/BossMod/Modules/RealmReborn/Trial/T06GarudaH/T06GarudaH.cs index 5d4b4f46ac..d32f95aaa7 100644 --- a/BossMod/Modules/RealmReborn/Trial/T06GarudaH/T06GarudaH.cs +++ b/BossMod/Modules/RealmReborn/Trial/T06GarudaH/T06GarudaH.cs @@ -41,23 +41,17 @@ public enum TetherID : uint // disallow clipping monoliths class Friction : BossComponent { - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { - if (module.PrimaryActor.CastInfo == null) // don't forbid standing near monoliths while boss is casting to allow avoiding aoes + if (Module.PrimaryActor.CastInfo == null) // don't forbid standing near monoliths while boss is casting to allow avoiding aoes foreach (var m in ((T06GarudaH)module).ActiveMonoliths) hints.AddForbiddenZone(ShapeDistance.Circle(m.Position, 5)); } } -class Downburst : Components.Cleave -{ - public Downburst() : base(ActionID.MakeSpell(AID.Downburst), new AOEShapeCone(11.7f, 60.Degrees())) { } -} +class Downburst(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.Downburst), new AOEShapeCone(11.7f, 60.Degrees())); -class Slipstream : Components.SelfTargetedAOEs -{ - public Slipstream() : base(ActionID.MakeSpell(AID.Slipstream), new AOEShapeCone(11.7f, 45.Degrees())) { } -} +class Slipstream(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Slipstream), new AOEShapeCone(11.7f, 45.Degrees())); class MistralShriek : Components.CastLineOfSightAOE { @@ -71,20 +65,11 @@ public MistralSong() : base(ActionID.MakeSpell(AID.MistralSong), 31.7f, true) { public override IEnumerable BlockerActors(BossModule module) => ((T06GarudaH)module).ActiveMonoliths; } -class AerialBlast : Components.RaidwideCast -{ - public AerialBlast() : base(ActionID.MakeSpell(AID.AerialBlast)) { } -} +class AerialBlast(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.AerialBlast)); -class GreatWhirlwind : Components.LocationTargetedAOEs -{ - public GreatWhirlwind() : base(ActionID.MakeSpell(AID.GreatWhirlwind), 8) { } -} +class GreatWhirlwind(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.GreatWhirlwind), 8); -class EyeOfTheStorm : Components.SelfTargetedAOEs -{ - public EyeOfTheStorm() : base(ActionID.MakeSpell(AID.EyeOfTheStorm), new AOEShapeDonut(12, 25)) { } -} +class EyeOfTheStorm(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.EyeOfTheStorm), new AOEShapeDonut(12, 25)); class T06GarudaHStates : StateMachineBuilder { diff --git a/BossMod/Modules/RealmReborn/Trial/T07TitanH/T07TitanH.cs b/BossMod/Modules/RealmReborn/Trial/T07TitanH/T07TitanH.cs index 631341896a..973c70946f 100644 --- a/BossMod/Modules/RealmReborn/Trial/T07TitanH/T07TitanH.cs +++ b/BossMod/Modules/RealmReborn/Trial/T07TitanH/T07TitanH.cs @@ -32,35 +32,26 @@ class Hints : BossComponent { private DateTime _heartSpawn; - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { var heartExists = ((T07TitanH)module).ActiveHeart.Any(); if (_heartSpawn == default && heartExists) { - _heartSpawn = module.WorldState.CurrentTime; + _heartSpawn = WorldState.CurrentTime; } if (_heartSpawn != default && heartExists) { - hints.Add($"Heart enrage in: {Math.Max(62 - (module.WorldState.CurrentTime - _heartSpawn).TotalSeconds, 0.0f):f1}s"); + hints.Add($"Heart enrage in: {Math.Max(62 - (WorldState.CurrentTime - _heartSpawn).TotalSeconds, 0.0f):f1}s"); } } } // also handles rockbuster, which is just a smaller cleave... -class MountainBuster : Components.Cleave -{ - public MountainBuster() : base(ActionID.MakeSpell(AID.MountainBuster), new AOEShapeCone(21.25f, 60.Degrees())) { } // TODO: verify angle -} +class MountainBuster(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.MountainBuster), new AOEShapeCone(21.25f, 60.Degrees())); // TODO: verify angle -class WeightOfTheLand : Components.LocationTargetedAOEs -{ - public WeightOfTheLand() : base(ActionID.MakeSpell(AID.WeightOfTheLandAOE), 6) { } -} +class WeightOfTheLand(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.WeightOfTheLandAOE), 6); -class Landslide : Components.SelfTargetedAOEs -{ - public Landslide() : base(ActionID.MakeSpell(AID.Landslide), new AOEShapeRect(40.25f, 3)) { } -} +class Landslide(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Landslide), new AOEShapeRect(40.25f, 3)); class Geocrush : Components.GenericAOEs { @@ -71,15 +62,15 @@ class Geocrush : Components.GenericAOEs public Geocrush() : base(ActionID.MakeSpell(AID.Geocrush)) { } - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_outer != null) - yield return new(_outer, module.Bounds.Center); + yield return new(_outer, Module.Bounds.Center); if (_inner != null) - yield return new(_inner, module.Bounds.Center, new(), _innerFinish); + yield return new(_inner, Module.Bounds.Center, new(), _innerFinish); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) { @@ -88,15 +79,15 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf 1 => 23, 2 => 20, 3 => 15, - _ => module.Bounds.HalfSize + _ => Module.Bounds.HalfSize }; - _outer = new AOEShapeDonut(outerRadius, module.Bounds.HalfSize); + _outer = new AOEShapeDonut(outerRadius, Module.Bounds.HalfSize); _inner = new AOEShapeCircle(outerRadius - 2); // TODO: check falloff... _innerFinish = spell.NPCFinishAt; } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) { @@ -109,7 +100,7 @@ class Burst : Components.SelfTargetedAOEs { public Burst() : base(ActionID.MakeSpell(AID.Burst), new AOEShapeCircle(6.3f)) { } - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { // pattern 1: one-by-one explosions every ~0.4-0.5s, 8 clockwise then center // pattern 2: center -> 4 cardinals at small offset ~1s later -> 4 intercardinals at bigger offset ~1s later diff --git a/BossMod/Modules/RealmReborn/Trial/T08ThornmarchH/MoogleGoRound.cs b/BossMod/Modules/RealmReborn/Trial/T08ThornmarchH/MoogleGoRound.cs index bf97ada0dc..08cd603752 100644 --- a/BossMod/Modules/RealmReborn/Trial/T08ThornmarchH/MoogleGoRound.cs +++ b/BossMod/Modules/RealmReborn/Trial/T08ThornmarchH/MoogleGoRound.cs @@ -5,12 +5,12 @@ class MoogleGoRound : Components.GenericAOEs private List _casters = new(); private static readonly AOEShape _shape = new AOEShapeCircle(20); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { return _casters.Take(2).Select(c => new AOEInstance(_shape, c.Position, c.CastInfo!.Rotation, c.CastInfo!.NPCFinishAt)); } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { base.AddAIHints(module, slot, actor, assignment, hints); @@ -23,13 +23,13 @@ public override void AddAIHints(BossModule module, int slot, Actor actor, PartyR } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.MoogleGoRoundBoss or AID.MoogleGoRoundAdd) _casters.Add(caster); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.MoogleGoRoundBoss or AID.MoogleGoRoundAdd) _casters.Remove(caster); diff --git a/BossMod/Modules/RealmReborn/Trial/T08ThornmarchH/PomMeteor.cs b/BossMod/Modules/RealmReborn/Trial/T08ThornmarchH/PomMeteor.cs index b482d9d5a3..a4985fc867 100644 --- a/BossMod/Modules/RealmReborn/Trial/T08ThornmarchH/PomMeteor.cs +++ b/BossMod/Modules/RealmReborn/Trial/T08ThornmarchH/PomMeteor.cs @@ -13,7 +13,7 @@ class PomMeteor : BossComponent private static readonly Angle[] _towerAngles = { 180.Degrees(), 90.Degrees(), 0.Degrees(), -90.Degrees(), 135.Degrees(), 45.Degrees(), -45.Degrees(), -135.Degrees() }; private static readonly WDir[] _towerOffsets = _towerAngles.Select(a => 10 * a.ToDirection()).ToArray(); - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { if (_activeTowers.None()) return; @@ -21,7 +21,7 @@ public override void AddAIHints(BossModule module, int slot, Actor actor, PartyR if (_cometsLeft > 0) { foreach (int i in _activeTowers.SetBits()) - hints.AddForbiddenZone(ShapeDistance.Circle(module.Bounds.Center + _towerOffsets[i], _cometAvoidRadius)); + hints.AddForbiddenZone(ShapeDistance.Circle(Module.Bounds.Center + _towerOffsets[i], _cometAvoidRadius)); } else { @@ -38,23 +38,23 @@ public override void AddAIHints(BossModule module, int slot, Actor actor, PartyR { if (!_activeTowers[soakedTower]) soakedTower += 4; - hints.AddForbiddenZone(ShapeDistance.InvertedCircle(module.Bounds.Center + _towerOffsets[soakedTower], _towerRadius), _towerActivation); + hints.AddForbiddenZone(ShapeDistance.InvertedCircle(Module.Bounds.Center + _towerOffsets[soakedTower], _towerRadius), _towerActivation); } else { foreach (int i in _activeTowers.SetBits()) - hints.AddForbiddenZone(ShapeDistance.Circle(module.Bounds.Center + _towerOffsets[i], _towerRadius), _towerActivation); + hints.AddForbiddenZone(ShapeDistance.Circle(Module.Bounds.Center + _towerOffsets[i], _towerRadius), _towerActivation); } } } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (int i in _activeTowers.SetBits()) - arena.AddCircle(module.Bounds.Center + _towerOffsets[i], _towerRadius, _soakedTowers[i] ? ArenaColor.Safe : ArenaColor.Danger); + arena.AddCircle(Module.Bounds.Center + _towerOffsets[i], _towerRadius, _soakedTowers[i] ? ArenaColor.Safe : ArenaColor.Danger); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { @@ -68,7 +68,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnEventEnvControl(BossModule module, byte index, uint state) + public override void OnEventEnvControl(byte index, uint state) { if (index is >= 8 and < 16) { @@ -77,7 +77,7 @@ public override void OnEventEnvControl(BossModule module, byte index, uint state { case 0x00020001: _activeTowers.Set(towerIndex); - _towerActivation = module.WorldState.CurrentTime.AddSeconds(_activationDelay); + _towerActivation = WorldState.FutureTime(_activationDelay); break; case 0x00200010: _soakedTowers.Set(towerIndex); diff --git a/BossMod/Modules/RealmReborn/Trial/T08ThornmarchH/PomStone.cs b/BossMod/Modules/RealmReborn/Trial/T08ThornmarchH/PomStone.cs index e5af16b65b..53fb7ffa48 100644 --- a/BossMod/Modules/RealmReborn/Trial/T08ThornmarchH/PomStone.cs +++ b/BossMod/Modules/RealmReborn/Trial/T08ThornmarchH/PomStone.cs @@ -7,7 +7,7 @@ class PomStone : Components.GenericAOEs private static readonly AOEShapeDonut _shapeMid = new(10, 20); private static readonly AOEShapeDonut _shapeOut = new(20, 30); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_casters.Count > 0) { @@ -18,7 +18,7 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { AOEShape? shape = (AID)spell.Action.ID switch { @@ -31,7 +31,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf _casters.Add((caster, shape)); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.PomStoneIn or AID.PomStoneMid or AID.PomStoneOut) _casters.RemoveAll(c => c.caster == caster); diff --git a/BossMod/Modules/RealmReborn/Trial/T08ThornmarchH/T08ThornmarchH.cs b/BossMod/Modules/RealmReborn/Trial/T08ThornmarchH/T08ThornmarchH.cs index 4790c9cec1..ad72bc0d5d 100644 --- a/BossMod/Modules/RealmReborn/Trial/T08ThornmarchH/T08ThornmarchH.cs +++ b/BossMod/Modules/RealmReborn/Trial/T08ThornmarchH/T08ThornmarchH.cs @@ -60,75 +60,33 @@ public enum AID : uint MogCreation = 29208, // GoodKingMoggleMogXII->self, 3.0s cast, range 50 width 10 rect aoe } -class SpinningMogshield : Components.SelfTargetedAOEs -{ - public SpinningMogshield() : base(ActionID.MakeSpell(AID.SpinningMogshield), new AOEShapeCircle(6)) { } -} +class SpinningMogshield(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.SpinningMogshield), new AOEShapeCircle(6)); -class ThousandKuponzeSwipe : Components.SelfTargetedAOEs -{ - public ThousandKuponzeSwipe() : base(ActionID.MakeSpell(AID.ThousandKuponzeSwipe), new AOEShapeCone(20, 45.Degrees())) { } -} +class ThousandKuponzeSwipe(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ThousandKuponzeSwipe), new AOEShapeCone(20, 45.Degrees())); -class MograinOfDeath : Components.SpreadFromCastTargets -{ - public MograinOfDeath() : base(ActionID.MakeSpell(AID.MograinOfDeathAOE), 6) { } -} +class MograinOfDeath(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.MograinOfDeathAOE), 6); -class PomHoly : Components.RaidwideCast -{ - public PomHoly() : base(ActionID.MakeSpell(AID.PomHoly)) { } -} +class PomHoly(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.PomHoly)); -class MoggledayNightFever : Components.SelfTargetedAOEs -{ - public MoggledayNightFever() : base(ActionID.MakeSpell(AID.MoggledayNightFever), new AOEShapeCone(30, 60.Degrees())) { } -} +class MoggledayNightFever(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.MoggledayNightFever), new AOEShapeCone(30, 60.Degrees())); -class MoogleThrust : Components.SingleTargetCast -{ - public MoogleThrust() : base(ActionID.MakeSpell(AID.MoogleThrust)) { } -} +class MoogleThrust(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.MoogleThrust)); -class MementoMoogle : Components.RaidwideCast -{ - public MementoMoogle() : base(ActionID.MakeSpell(AID.MementoMoogle)) { } -} +class MementoMoogle(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.MementoMoogle)); -class PomHolyBoss : Components.RaidwideCast -{ - public PomHolyBoss() : base(ActionID.MakeSpell(AID.PomHolyBoss)) { } -} +class PomHolyBoss(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.PomHolyBoss)); -class ThousandKuponzeCharge : Components.SingleTargetCast -{ - public ThousandKuponzeCharge() : base(ActionID.MakeSpell(AID.ThousandKuponzeCharge)) { } -} +class ThousandKuponzeCharge(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.ThousandKuponzeCharge)); -class PomBog : Components.PersistentVoidzoneAtCastTarget -{ - public PomBog() : base(8, ActionID.MakeSpell(AID.PomBog), m => m.Enemies(OID.PomBog).Where(a => a.EventState != 7), 0.8f) { } -} +class PomBog(BossModule module) : Components.PersistentVoidzoneAtCastTarget(module, 8, ActionID.MakeSpell(AID.PomBog), m => m.Enemies(OID.PomBog).Where(a => a.EventState != 7), 0.8f); -class MogStone : Components.StackWithCastTargets -{ - public MogStone() : base(ActionID.MakeSpell(AID.MogStoneAOE), 6, 8) { } -} +class MogStone(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.MogStoneAOE), 6, 8); -class TwinPomMeteor : Components.CastSharedTankbuster -{ - public TwinPomMeteor() : base(ActionID.MakeSpell(AID.TwinPomMeteorAOE), 6) { } -} +class TwinPomMeteor(BossModule module) : Components.CastSharedTankbuster(module, ActionID.MakeSpell(AID.TwinPomMeteorAOE), 6); -class MogComet : Components.LocationTargetedAOEs -{ - public MogComet() : base(ActionID.MakeSpell(AID.MogCometAOE), 6) { } -} +class MogComet(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.MogCometAOE), 6); -class MogCreation : Components.SelfTargetedAOEs -{ - public MogCreation() : base(ActionID.MakeSpell(AID.MogCreation), new AOEShapeRect(50, 5)) { } -} +class MogCreation(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.MogCreation), new AOEShapeRect(50, 5)); // note: this fight has well-timed state machine for all phases, but it's just too simple to bother... class T08ThornmarchHStates : StateMachineBuilder diff --git a/BossMod/Modules/RealmReborn/Trial/T09WhorleaterH/T09WhorleaterH.cs b/BossMod/Modules/RealmReborn/Trial/T09WhorleaterH/T09WhorleaterH.cs index 4894b16416..85783b4bec 100644 --- a/BossMod/Modules/RealmReborn/Trial/T09WhorleaterH/T09WhorleaterH.cs +++ b/BossMod/Modules/RealmReborn/Trial/T09WhorleaterH/T09WhorleaterH.cs @@ -1,19 +1,10 @@ namespace BossMod.RealmReborn.Trial.T09WhorleaterH; -class GrandFall : Components.LocationTargetedAOEs -{ - public GrandFall() : base(ActionID.MakeSpell(AID.GrandFall), 8) { } -} +class GrandFall(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.GrandFall), 8); -class Hydroshot : Components.PersistentVoidzoneAtCastTarget -{ - public Hydroshot() : base(5, ActionID.MakeSpell(AID.Hydroshot), m => m.Enemies(OID.HydroshotZone).Where(z => z.EventState != 7), 0) { } -} +class Hydroshot(BossModule module) : Components.PersistentVoidzoneAtCastTarget(module, 5, ActionID.MakeSpell(AID.Hydroshot), m => m.Enemies(OID.HydroshotZone).Where(z => z.EventState != 7), 0); -class Dreadstorm : Components.PersistentVoidzoneAtCastTarget -{ - public Dreadstorm() : base(5, ActionID.MakeSpell(AID.Dreadstorm), m => m.Enemies(OID.DreadstormZone).Where(z => z.EventState != 7), 0) { } -} +class Dreadstorm(BossModule module) : Components.PersistentVoidzoneAtCastTarget(module, 5, ActionID.MakeSpell(AID.Dreadstorm), m => m.Enemies(OID.DreadstormZone).Where(z => z.EventState != 7), 0); class T09WhorleaterHStates : StateMachineBuilder { diff --git a/BossMod/Modules/RealmReborn/Trial/T09WhorleaterH/T09WhorleaterHBodyslam.cs b/BossMod/Modules/RealmReborn/Trial/T09WhorleaterH/T09WhorleaterHBodyslam.cs index a61a4a3361..f634feb6fc 100644 --- a/BossMod/Modules/RealmReborn/Trial/T09WhorleaterH/T09WhorleaterHBodyslam.cs +++ b/BossMod/Modules/RealmReborn/Trial/T09WhorleaterH/T09WhorleaterHBodyslam.cs @@ -10,20 +10,20 @@ public BodySlamKB() StopAtWall = true; } - public override IEnumerable Sources(BossModule module, int slot, Actor actor) => Utils.ZeroOrOne(_knockback); + public override IEnumerable Sources(int slot, Actor actor) => Utils.ZeroOrOne(_knockback); - public override void Update(BossModule module) + public override void Update() { if (LeviathanZ == default) - LeviathanZ = module.PrimaryActor.Position.Z; - if (module.PrimaryActor.Position.Z != LeviathanZ && module.PrimaryActor.Position.Z != 0) + LeviathanZ = Module.PrimaryActor.Position.Z; + if (Module.PrimaryActor.Position.Z != LeviathanZ && Module.PrimaryActor.Position.Z != 0) { - LeviathanZ = module.PrimaryActor.Position.Z; - _knockback = new(module.Bounds.Center, 25, module.WorldState.CurrentTime.AddSeconds(4.8f), Direction: module.PrimaryActor.Position.Z <= 0 ? 180.Degrees() : 0.Degrees(), Kind: Kind.DirForward); + LeviathanZ = Module.PrimaryActor.Position.Z; + _knockback = new(Module.Bounds.Center, 25, WorldState.FutureTime(4.8f), Direction: Module.PrimaryActor.Position.Z <= 0 ? 180.Degrees() : 0.Degrees(), Kind: Kind.DirForward); } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.BodySlamNorth or AID.BodySlamSouth) _knockback = null; @@ -37,20 +37,20 @@ class BodySlamAOE : Components.GenericAOEs private AOEInstance? _aoe; private float LeviathanZ; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => Utils.ZeroOrOne(_aoe); + public override IEnumerable ActiveAOEs(int slot, Actor actor) => Utils.ZeroOrOne(_aoe); - public override void Update(BossModule module) + public override void Update() { if (LeviathanZ == default) - LeviathanZ = module.PrimaryActor.Position.Z; - if (module.PrimaryActor.Position.Z != LeviathanZ && module.PrimaryActor.Position.Z != 0) + LeviathanZ = Module.PrimaryActor.Position.Z; + if (Module.PrimaryActor.Position.Z != LeviathanZ && Module.PrimaryActor.Position.Z != 0) { - LeviathanZ = module.PrimaryActor.Position.Z; - _aoe = new(new AOEShapeRect(30, 5), module.PrimaryActor.Position, module.PrimaryActor.Rotation, module.WorldState.CurrentTime.AddSeconds(2.6f)); + LeviathanZ = Module.PrimaryActor.Position.Z; + _aoe = new(new AOEShapeRect(30, 5), Module.PrimaryActor.Position, Module.PrimaryActor.Rotation, WorldState.FutureTime(2.6f)); } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.BodySlamRectAOE) _aoe = null; diff --git a/BossMod/Modules/RealmReborn/Trial/T09WhorleaterH/T09WhorleaterHHints.cs b/BossMod/Modules/RealmReborn/Trial/T09WhorleaterH/T09WhorleaterHHints.cs index 64a1a2c149..8623f071db 100644 --- a/BossMod/Modules/RealmReborn/Trial/T09WhorleaterH/T09WhorleaterHHints.cs +++ b/BossMod/Modules/RealmReborn/Trial/T09WhorleaterH/T09WhorleaterHHints.cs @@ -2,7 +2,7 @@ namespace BossMod.RealmReborn.Trial.T09WhorleaterH; class Hints : BossComponent { - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { var converter = module.Enemies(OID.Converter).Where(x => x.IsTargetable).FirstOrDefault(); if (converter != null) @@ -13,7 +13,7 @@ public override void AddGlobalHints(BossModule module, GlobalHints hints) hints.Add("Destroy the spumes!"); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { var tail = module.Enemies(OID.Tail).Where(x => x.IsTargetable && x.FindStatus(SID.Invincibility) == null && x.FindStatus(SID.MantleOfTheWhorl) != null).FirstOrDefault(); var TankMimikry = actor.FindStatus(2124); //Bluemage Tank Mimikry @@ -21,12 +21,12 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint { if ((actor.Class.GetClassCategory() is ClassCategory.Caster or ClassCategory.Healer || (actor.Class is Class.BLU && TankMimikry == null)) && actor.TargetID == module.Enemies(OID.Tail).FirstOrDefault()?.InstanceID) hints.Add("Attack the head! (Attacking the tail will reflect damage onto you)"); - if (actor.Class.GetClassCategory() is ClassCategory.PhysRanged && actor.TargetID == module.PrimaryActor.InstanceID) + if (actor.Class.GetClassCategory() is ClassCategory.PhysRanged && actor.TargetID == Module.PrimaryActor.InstanceID) hints.Add("Attack the tail! (Attacking the head will reflect damage onto you)"); } } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { var converter = module.Enemies(OID.Converter).FirstOrDefault(); var convertertargetable = module.Enemies(OID.Converter).Where(x => x.IsTargetable).FirstOrDefault(); diff --git a/BossMod/Modules/RealmReborn/Trial/T09WhorleaterH/T09WhorleaterHSpinningDive.cs b/BossMod/Modules/RealmReborn/Trial/T09WhorleaterH/T09WhorleaterHSpinningDive.cs index bf66b0de8c..f84e32ef6f 100644 --- a/BossMod/Modules/RealmReborn/Trial/T09WhorleaterH/T09WhorleaterHSpinningDive.cs +++ b/BossMod/Modules/RealmReborn/Trial/T09WhorleaterH/T09WhorleaterHSpinningDive.cs @@ -4,16 +4,16 @@ class SpinningDive : Components.GenericAOEs //TODO: Find out how to detect spinn { private AOEInstance? _aoe; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => Utils.ZeroOrOne(_aoe); + public override IEnumerable ActiveAOEs(int slot, Actor actor) => Utils.ZeroOrOne(_aoe); - public override void OnActorCreated(BossModule module, Actor actor) + public override void OnActorCreated(Actor actor) { var SpinningDiveHelper = module.Enemies(OID.SpinningDiveHelper).FirstOrDefault(); if ((OID)actor.OID == OID.SpinningDiveHelper) - _aoe = new(new AOEShapeRect(46, 8), SpinningDiveHelper!.Position, SpinningDiveHelper.Rotation, module.WorldState.CurrentTime.AddSeconds(0.6f)); + _aoe = new(new AOEShapeRect(46, 8), SpinningDiveHelper!.Position, SpinningDiveHelper.Rotation, WorldState.FutureTime(0.6f)); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.SpinningDiveSnapshot) _aoe = null; @@ -29,16 +29,16 @@ public SpinningDiveKB() StopAtWall = true; } - public override IEnumerable Sources(BossModule module, int slot, Actor actor) => Utils.ZeroOrOne(_knockback); + public override IEnumerable Sources(int slot, Actor actor) => Utils.ZeroOrOne(_knockback); - public override void OnActorCreated(BossModule module, Actor actor) + public override void OnActorCreated(Actor actor) { var SpinningDiveHelper = module.Enemies(OID.SpinningDiveHelper).FirstOrDefault(); if ((OID)actor.OID == OID.SpinningDiveHelper) - _knockback = new(SpinningDiveHelper!.Position, 10, module.WorldState.CurrentTime.AddSeconds(1.4f), new AOEShapeRect(46, 8), SpinningDiveHelper!.Rotation); + _knockback = new(SpinningDiveHelper!.Position, 10, WorldState.FutureTime(1.4f), new AOEShapeRect(46, 8), SpinningDiveHelper!.Rotation); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.SpinningDiveEffect) _knockback = null; diff --git a/BossMod/Modules/Shadowbringers/Dungeon/D01Holminster/D011ForgivenDissonance.cs b/BossMod/Modules/Shadowbringers/Dungeon/D01Holminster/D011ForgivenDissonance.cs index ad323ff239..5ddf448d64 100644 --- a/BossMod/Modules/Shadowbringers/Dungeon/D01Holminster/D011ForgivenDissonance.cs +++ b/BossMod/Modules/Shadowbringers/Dungeon/D01Holminster/D011ForgivenDissonance.cs @@ -21,40 +21,19 @@ public enum AID : uint Pillory = 15812, // Boss->player, 5.0s cast, single-target } -class Thumbscrew : Components.ChargeAOEs -{ - public Thumbscrew() : base(ActionID.MakeSpell(AID.Thumbscrew), 4) { } -} +class Thumbscrew(BossModule module) : Components.ChargeAOEs(module, ActionID.MakeSpell(AID.Thumbscrew), 4); -class ThePathofLight : Components.RaidwideCast -{ - public ThePathofLight() : base(ActionID.MakeSpell(AID.ThePathOfLight)) { } -} +class ThePathofLight(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.ThePathOfLight)); -class GibbetCage : Components.SelfTargetedAOEs -{ - public GibbetCage() : base(ActionID.MakeSpell(AID.GibbetCage), new AOEShapeCircle(8)) { } -} +class GibbetCage(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.GibbetCage), new AOEShapeCircle(8)); -class HereticsFork : Components.SelfTargetedAOEs -{ - public HereticsFork() : base(ActionID.MakeSpell(AID.HereticsFork), new AOEShapeCross(40, 3)) { } -} +class HereticsFork(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HereticsFork), new AOEShapeCross(40, 3)); -class LightShot : Components.SelfTargetedAOEs -{ - public LightShot() : base(ActionID.MakeSpell(AID.LightShot), new AOEShapeRect(40, 2)) { } -} +class LightShot(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.LightShot), new AOEShapeRect(40, 2)); -class WoodenHorse : Components.SelfTargetedAOEs -{ - public WoodenHorse() : base(ActionID.MakeSpell(AID.WoodenHorse), new AOEShapeCone(40, 45.Degrees())) { } -} +class WoodenHorse(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.WoodenHorse), new AOEShapeCone(40, 45.Degrees())); -class Pillory : Components.SingleTargetDelayableCast -{ - public Pillory() : base(ActionID.MakeSpell(AID.Pillory)) { } -} +class Pillory(BossModule module) : Components.SingleTargetDelayableCast(module, ActionID.MakeSpell(AID.Pillory)); class D011ForgivenDissonanceStates : StateMachineBuilder { @@ -73,7 +52,4 @@ public D011ForgivenDissonanceStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "legendoficeman, Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 676, NameID = 8299)] -public class D011ForgivenDissonance : BossModule -{ - public D011ForgivenDissonance(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(-15, 240), 19.5f)) { } -} +public class D011ForgivenDissonance(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(-15, 240), 19.5f)); diff --git a/BossMod/Modules/Shadowbringers/Dungeon/D01Holminster/D012TesleentheForgiven.cs b/BossMod/Modules/Shadowbringers/Dungeon/D01Holminster/D012TesleentheForgiven.cs index d29137d0f9..bac338da74 100644 --- a/BossMod/Modules/Shadowbringers/Dungeon/D01Holminster/D012TesleentheForgiven.cs +++ b/BossMod/Modules/Shadowbringers/Dungeon/D01Holminster/D012TesleentheForgiven.cs @@ -33,47 +33,35 @@ public enum IconID : uint Stackmarker = 62, // player } -class TheTickler : Components.SingleTargetDelayableCast -{ - public TheTickler() : base(ActionID.MakeSpell(AID.TheTickler)) { } -} +class TheTickler(BossModule module) : Components.SingleTargetDelayableCast(module, ActionID.MakeSpell(AID.TheTickler)); -class ScoldsBridle : Components.RaidwideCast -{ - public ScoldsBridle() : base(ActionID.MakeSpell(AID.ScoldsBridle)) { } -} +class ScoldsBridle(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.ScoldsBridle)); class FeveredFlagellation : Components.GenericBaitAway { - public override void Update(BossModule module) + public override void Update() { foreach (var b in CurrentBaits) ((AOEShapeRect)b.Shape).LengthFront = (b.Target.Position - b.Source.Position).Length(); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.FeveredFlagellation2) CurrentBaits.RemoveAt(0); } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { var icon = (IconID)iconID; if (icon >= IconID.Icon1 && icon <= IconID.Icon4) - CurrentBaits.Add(new(module.PrimaryActor, actor, new AOEShapeRect(0, 2))); + CurrentBaits.Add(new(Module.PrimaryActor, actor, new AOEShapeRect(0, 2))); } } -class Exorcise : Components.StackWithCastTargets -{ - public Exorcise() : base(ActionID.MakeSpell(AID.ExorciseA), 6) { } -} +class Exorcise(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.ExorciseA), 6); -class HolyWater : Components.PersistentVoidzoneAtCastTarget -{ - public HolyWater() : base(6, ActionID.MakeSpell(AID.HolyWater), m => m.Enemies(OID.HolyWaterVoidzone).Where(z => z.EventState != 7), 0.8f) { } -} +class HolyWater(BossModule module) : Components.PersistentVoidzoneAtCastTarget(module, 6, ActionID.MakeSpell(AID.HolyWater), m => m.Enemies(OID.HolyWaterVoidzone).Where(z => z.EventState != 7), 0.8f); class D012TesleentheForgivenStates : StateMachineBuilder { @@ -89,7 +77,4 @@ public D012TesleentheForgivenStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "legendoficeman, Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 676, NameID = 8300)] -public class D012TesleentheForgiven : BossModule -{ - public D012TesleentheForgiven(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(78, -82), 19.5f)) { } -} +public class D012TesleentheForgiven(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(78, -82), 19.5f)); diff --git a/BossMod/Modules/Shadowbringers/Dungeon/D01Holminster/D013Philia.cs b/BossMod/Modules/Shadowbringers/Dungeon/D01Holminster/D013Philia.cs index 6dca02818c..386058af30 100644 --- a/BossMod/Modules/Shadowbringers/Dungeon/D01Holminster/D013Philia.cs +++ b/BossMod/Modules/Shadowbringers/Dungeon/D01Holminster/D013Philia.cs @@ -53,20 +53,11 @@ public enum SID : uint Sludge = 287, // none->player, extra=0x0 } -class SludgeVoidzone : Components.PersistentVoidzone -{ - public SludgeVoidzone() : base(9.8f, m => m.Enemies(OID.SludgeVoidzone).Where(z => z.EventState != 7)) { } -} +class SludgeVoidzone(BossModule module) : Components.PersistentVoidzone(module, 9.8f, m => m.Enemies(OID.SludgeVoidzone).Where(z => z.EventState != 7)); -class ScavengersDaughter : Components.RaidwideCast -{ - public ScavengersDaughter() : base(ActionID.MakeSpell(AID.ScavengersDaughter)) { } -} +class ScavengersDaughter(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.ScavengersDaughter)); -class HeadCrusher : Components.SingleTargetCast -{ - public HeadCrusher() : base(ActionID.MakeSpell(AID.HeadCrusher)) { } -} +class HeadCrusher(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.HeadCrusher)); class Chains : BossComponent { @@ -75,7 +66,7 @@ class Chains : BossComponent private Actor? chaintarget; private bool casting; - public override void Update(BossModule module) + public override void Update() { var fetters = chaintarget?.FindStatus(SID.Fetters) != null; if (fetters) @@ -90,7 +81,7 @@ public override void Update(BossModule module) } } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (chaintarget != null && !chainsactive) hints.Add($"{chaintarget.Name} is about to be chained!"); @@ -98,7 +89,7 @@ public override void AddGlobalHints(BossModule module, GlobalHints hints) hints.Add($"Destroy chains on {chaintarget.Name}!"); } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { if (chained && actor != chaintarget) foreach (var e in hints.PotentialTargets) @@ -110,7 +101,7 @@ public override void AddAIHints(BossModule module, int slot, Actor actor, PartyR }; } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.ChainTarget) { @@ -119,7 +110,7 @@ public override void OnEventIcon(BossModule module, Actor actor, uint iconID) } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.ChainDown) casting = false; @@ -132,13 +123,13 @@ class Aethersup : Components.GenericAOEs private Angle _rotation; private static readonly AOEShapeCone cone = new(24, 60.Degrees()); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_activation != default) - yield return new(cone, module.PrimaryActor.Position, _rotation, _activation, risky: module.Enemies(OID.IronChain).All(x => x.IsDead)); + yield return new(cone, Module.PrimaryActor.Position, _rotation, _activation, risky: module.Enemies(OID.IronChain).All(x => x.IsDead)); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.Aethersup) { @@ -148,7 +139,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { @@ -169,18 +160,18 @@ class PendulumFlare : Components.GenericBaitAway private bool targeted; private Actor? target; - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.SpreadFlare) { - CurrentBaits.Add(new(module.PrimaryActor, actor, new AOEShapeCircle(20))); + CurrentBaits.Add(new(Module.PrimaryActor, actor, new AOEShapeCircle(20))); targeted = true; target = actor; CenterAtTarget = true; } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.PendulumAOE1) { @@ -189,14 +180,14 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { base.AddAIHints(module, slot, actor, assignment, hints); if (target == actor && targeted) - hints.AddForbiddenZone(ShapeDistance.Rect(module.Bounds.Center, target.Position, 18)); + hints.AddForbiddenZone(ShapeDistance.Rect(Module.Bounds.Center, target.Position, 18)); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { base.AddHints(module, slot, actor, hints, movementHints); if (target == actor && targeted) @@ -204,82 +195,70 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } } -class PendulumAOE : Components.LocationTargetedAOEs -{ - public PendulumAOE() : base(ActionID.MakeSpell(AID.PendulumAOE3), 15) { } -} +class PendulumAOE(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.PendulumAOE3), 15); -class LeftKnout : Components.SelfTargetedAOEs -{ - public LeftKnout() : base(ActionID.MakeSpell(AID.LeftKnout), new AOEShapeCone(24, 105.Degrees())) { } -} +class LeftKnout(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.LeftKnout), new AOEShapeCone(24, 105.Degrees())); -class RightKnout : Components.SelfTargetedAOEs -{ - public RightKnout() : base(ActionID.MakeSpell(AID.RightKnout), new AOEShapeCone(24, 105.Degrees())) { } -} +class RightKnout(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RightKnout), new AOEShapeCone(24, 105.Degrees())); -class Taphephobia : Components.SpreadFromCastTargets -{ - public Taphephobia() : base(ActionID.MakeSpell(AID.Taphephobia2), 6) { } -} +class Taphephobia(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.Taphephobia2), 6); // TODO: create and use generic 'line stack' component class IntoTheLight : Components.GenericBaitAway { private Actor? target; - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.IntoTheLight) { - target = module.WorldState.Actors.Find(spell.MainTargetID); - CurrentBaits.Add(new(module.PrimaryActor, target!, new AOEShapeRect(50, 4))); + target = WorldState.Actors.Find(spell.MainTargetID); + CurrentBaits.Add(new(Module.PrimaryActor, target!, new AOEShapeRect(50, 4))); } if ((AID)spell.Action.ID == AID.IntoTheLight2) CurrentBaits.Clear(); } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { if (CurrentBaits.Count > 0 && actor != target) - hints.AddForbiddenZone(ShapeDistance.InvertedRect(module.PrimaryActor.Position, (target!.Position - module.PrimaryActor.Position).Normalized(), 50, 0, 4)); + hints.AddForbiddenZone(ShapeDistance.InvertedRect(Module.PrimaryActor.Position, (target!.Position - Module.PrimaryActor.Position).Normalized(), 50, 0, 4)); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (CurrentBaits.Count > 0) { - if (!actor.Position.InRect(module.PrimaryActor.Position, (target!.Position - module.PrimaryActor.Position).Normalized(), 50, 0, 4)) + if (!actor.Position.InRect(Module.PrimaryActor.Position, (target!.Position - Module.PrimaryActor.Position).Normalized(), 50, 0, 4)) hints.Add("Stack!"); else hints.Add("Stack!", false); } } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { foreach (var bait in CurrentBaits) bait.Shape.Draw(arena, BaitOrigin(bait), bait.Rotation, ArenaColor.SafeFromAOE); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) { } + public override void DrawArenaForeground(int pcSlot, Actor pc) { } } class CatONineTails : Components.GenericRotatingAOE { private static readonly AOEShapeCone _shape = new(25, 60.Degrees()); - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.FierceBeating1) - Sequences.Add(new(_shape, module.Bounds.Center, spell.Rotation + 180.Degrees(), -45.Degrees(), spell.NPCFinishAt, 2, 8)); + Sequences.Add(new(_shape, Module.Bounds.Center, spell.Rotation + 180.Degrees(), -45.Degrees(), spell.NPCFinishAt, 2, 8)); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.CatONineTails2 && Sequences.Count > 0) - AdvanceSequence(0, module.WorldState.CurrentTime); + AdvanceSequence(0, WorldState.CurrentTime); } } @@ -295,16 +274,16 @@ class FierceBeating : Components.Exaflare public FierceBeating() : base(4) { } - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { - foreach (var (c, t, r) in FutureAOEs(module.WorldState.CurrentTime)) + foreach (var (c, t, r) in FutureAOEs(WorldState.CurrentTime)) yield return new(Shape, c, activation: t, color: FutureColor); foreach (var (c, t, r) in ImminentAOEs()) yield return new(Shape, c, activation: t, color: ImminentColor); if (Lines.Count > 0 && linesstartedcount1 < 8) - yield return new(circle, CalculateCirclePosition(linesstartedcount1, module.Bounds.Center, _casters[0]), activation: _activation.AddSeconds(linesstartedcount1 * 3.7f)); + yield return new(circle, CalculateCirclePosition(linesstartedcount1, Module.Bounds.Center, _casters[0]), activation: _activation.AddSeconds(linesstartedcount1 * 3.7f)); if (Lines.Count > 1 && linesstartedcount2 < 8) - yield return new(circle, CalculateCirclePosition(linesstartedcount2, module.Bounds.Center, _casters[1]), activation: _activation.AddSeconds(linesstartedcount2 * 3.7f)); + yield return new(circle, CalculateCirclePosition(linesstartedcount2, Module.Bounds.Center, _casters[1]), activation: _activation.AddSeconds(linesstartedcount2 * 3.7f)); } private static WPos CalculateCirclePosition(int count, WPos origin, WPos caster) @@ -314,7 +293,7 @@ private static WPos CalculateCirclePosition(int count, WPos origin, WPos caster) return new WPos(origin.X + x, origin.Z + z); } - public override void Update(BossModule module) + public override void Update() { if (linesstartedcount1 != 0 && Lines.Count == 0) { @@ -325,7 +304,7 @@ public override void Update(BossModule module) } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.FierceBeating4) { @@ -341,11 +320,11 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.FierceBeating6) { - Lines.Add(new() { Next = caster.Position, Advance = 2.5f * caster.Rotation.ToDirection(), NextExplosion = module.WorldState.CurrentTime.AddSeconds(1), TimeToMove = 1, ExplosionsLeft = 7, MaxShownExplosions = 3 }); + Lines.Add(new() { Next = caster.Position, Advance = 2.5f * caster.Rotation.ToDirection(), NextExplosion = WorldState.FutureTime(1), TimeToMove = 1, ExplosionsLeft = 7, MaxShownExplosions = 3 }); ++linesstartedcounttotal; if (linesstartedcounttotal % 2 != 0) ++linesstartedcount1; @@ -394,7 +373,4 @@ public D013PhiliaStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 676, NameID = 8301)] -public class D013Philia : BossModule -{ - public D013Philia(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(134, -465), 19.5f)) { } -} +public class D013Philia(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(134, -465), 19.5f)); diff --git a/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D030RonkanDreamer.cs b/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D030RonkanDreamer.cs index 23d7640790..ca00ef1c07 100644 --- a/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D030RonkanDreamer.cs +++ b/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D030RonkanDreamer.cs @@ -28,15 +28,9 @@ public enum TetherID : uint StatueActivate = 37, // 28E8->Boss } -class RonkanFire : Components.SingleTargetCast -{ - public RonkanFire() : base(ActionID.MakeSpell(AID.RonkanFire)) { } -} +class RonkanFire(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.RonkanFire)); -class RonkanAbyss : Components.LocationTargetedAOEs -{ - public RonkanAbyss() : base(ActionID.MakeSpell(AID.RonkanAbyss), 6) { } -} +class RonkanAbyss(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.RonkanAbyss), 6); class WrathOfTheRonka : Components.GenericAOEs { @@ -46,11 +40,11 @@ class WrathOfTheRonka : Components.GenericAOEs private static readonly AOEShapeRect RectLong = new(35, 4); private DateTime _activation; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { foreach (var c in _casters) { - if (module.PrimaryActor.Position.AlmostEqual(new(0, 634), 1)) + if (Module.PrimaryActor.Position.AlmostEqual(new(0, 634), 1)) { if (c.Position.AlmostEqual(new(-17, 657), 1) || c.Position.AlmostEqual(new(-17, 650), 1) || c.Position.AlmostEqual(new(-17, 635), 1) || c.Position.AlmostEqual(new(-17, 620), 1) || c.Position.AlmostEqual(new(17, 657), 1) || c.Position.AlmostEqual(new(17, 650), 1) || c.Position.AlmostEqual(new(17, 635), 1) || c.Position.AlmostEqual(new(17, 620), 1)) yield return new(RectLong, c.Position, c.Rotation, _activation); @@ -59,7 +53,7 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, if (c.Position.AlmostEqual(new(-17, 642), 1) || c.Position.AlmostEqual(new(17, 627), 1)) yield return new(RectShort, c.Position, c.Rotation, _activation); } - if (module.PrimaryActor.Position.AlmostEqual(new(0, 428), 1)) + if (Module.PrimaryActor.Position.AlmostEqual(new(0, 428), 1)) { if (c.Position.AlmostEqual(new(17, 451), 1) || c.Position.AlmostEqual(new(17, 444), 1) || c.Position.AlmostEqual(new(17, 414), 1) || c.Position.AlmostEqual(new(17, 429), 1) || c.Position.AlmostEqual(new(-17, 451), 1) || c.Position.AlmostEqual(new(-17, 444), 1) || c.Position.AlmostEqual(new(-17, 414), 1) || c.Position.AlmostEqual(new(-17, 429), 1)) yield return new(RectLong, c.Position, c.Rotation, _activation); @@ -71,16 +65,16 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, } } - public override void OnTethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnTethered(Actor source, ActorTetherInfo tether) { if (tether.ID == (uint)TetherID.StatueActivate) { _casters.Add(source); - _activation = module.WorldState.CurrentTime.AddSeconds(6); + _activation = WorldState.FutureTime(6); } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.WrathOfTheRonkaShort or AID.WrathOfTheRonkaMedium or AID.WrathOfTheRonkaLong) { @@ -127,29 +121,29 @@ private static IEnumerable Wall4() yield return new WPos(-6, 418); yield return new WPos(-4, 418); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - if (module.PrimaryActor.Position.AlmostEqual(new(0, 634), 1)) + if (Module.PrimaryActor.Position.AlmostEqual(new(0, 634), 1)) { arena.AddPolygon(Wall1(), ArenaColor.Border, 2); arena.AddPolygon(Wall2(), ArenaColor.Border, 2); } - if (module.PrimaryActor.Position.AlmostEqual(new(0, 428), 1)) + if (Module.PrimaryActor.Position.AlmostEqual(new(0, 428), 1)) { arena.AddPolygon(Wall3(), ArenaColor.Border, 2); arena.AddPolygon(Wall4(), ArenaColor.Border, 2); } } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { //Note: this isn't looking natural because the AI is trying to dodge the lasers and the wall at the same time, consider not activating the AI in partyfinder until the AI is improved, for multiboxing it should do ok base.AddAIHints(module, slot, actor, assignment, hints); - if (module.PrimaryActor.Position.AlmostEqual(new(0, 634), 1)) + if (Module.PrimaryActor.Position.AlmostEqual(new(0, 634), 1)) { hints.AddForbiddenZone(ShapeDistance.ConvexPolygon(Wall1(), true)); hints.AddForbiddenZone(ShapeDistance.ConvexPolygon(Wall2(), false)); } - if (module.PrimaryActor.Position.AlmostEqual(new(0, 428), 1)) + if (Module.PrimaryActor.Position.AlmostEqual(new(0, 428), 1)) { hints.AddForbiddenZone(ShapeDistance.ConvexPolygon(Wall3(), false)); hints.AddForbiddenZone(ShapeDistance.ConvexPolygon(Wall4(), true)); @@ -157,10 +151,7 @@ public override void AddAIHints(BossModule module, int slot, Actor actor, PartyR } } -class BurningBeam : Components.SelfTargetedAOEs -{ - public BurningBeam() : base(ActionID.MakeSpell(AID.BurningBeam), new AOEShapeRect(15, 2)) { } -} +class BurningBeam(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.BurningBeam), new AOEShapeRect(15, 2)); class D030RonkanDreamerStates : StateMachineBuilder { diff --git a/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D031Lozatl.cs b/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D031Lozatl.cs index 2aa515e280..973fccae49 100644 --- a/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D031Lozatl.cs +++ b/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D031Lozatl.cs @@ -20,50 +20,35 @@ public enum AID : uint LozatlsFuryB = 15503, // 27AF->self, 4,0s cast, range 60 width 20 rect } -class LozatlsFuryA : Components.SelfTargetedAOEs -{ - public LozatlsFuryA() : base(ActionID.MakeSpell(AID.LozatlsFuryA), new AOEShapeRect(60, 20, directionOffset: 90.Degrees())) { } // TODO: verify; there should not be an offset in reality here..., also double halfwidth is strange -} +class LozatlsFuryA(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.LozatlsFuryA), new AOEShapeRect(60, 20, directionOffset: 90.Degrees())); // TODO: verify; there should not be an offset in reality here..., also double halfwidth is strange -class LozatlsFuryB : Components.SelfTargetedAOEs -{ - public LozatlsFuryB() : base(ActionID.MakeSpell(AID.LozatlsFuryB), new AOEShapeRect(60, 20, directionOffset: -90.Degrees())) { } // TODO: verify; there should not be an offset in reality here..., also double halfwidth is strange -} +class LozatlsFuryB(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.LozatlsFuryB), new AOEShapeRect(60, 20, directionOffset: -90.Degrees())); // TODO: verify; there should not be an offset in reality here..., also double halfwidth is strange -class Stonefist : Components.SingleTargetDelayableCast -{ - public Stonefist() : base(ActionID.MakeSpell(AID.Stonefist)) { } -} +class Stonefist(BossModule module) : Components.SingleTargetDelayableCast(module, ActionID.MakeSpell(AID.Stonefist)); -class LozatlsScorn : Components.RaidwideCast -{ - public LozatlsScorn() : base(ActionID.MakeSpell(AID.LozatlsScorn)) { } -} +class LozatlsScorn(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.LozatlsScorn)); -class SunToss : Components.LocationTargetedAOEs -{ - public SunToss() : base(ActionID.MakeSpell(AID.SunToss), 5) { } -} +class SunToss(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.SunToss), 5); class RonkanLight : Components.GenericAOEs { private static readonly AOEShapeRect rect = new(60, 20); //TODO: double halfwidth is strange private AOEInstance? _aoe; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => Utils.ZeroOrOne(_aoe); + public override IEnumerable ActiveAOEs(int slot, Actor actor) => Utils.ZeroOrOne(_aoe); public override void OnActorEAnim(BossModule module, Actor actor, uint state) { if (state == 0x00040008) { if (actor.Position.AlmostEqual(new(8, 328), 1)) - _aoe = new(rect, module.Bounds.Center, 90.Degrees(), module.WorldState.CurrentTime.AddSeconds(8)); + _aoe = new(rect, Module.Bounds.Center, 90.Degrees(), WorldState.FutureTime(8)); if (actor.Position.AlmostEqual(new(-7, 328), 1)) - _aoe = new(rect, module.Bounds.Center, -90.Degrees(), module.WorldState.CurrentTime.AddSeconds(8)); + _aoe = new(rect, Module.Bounds.Center, -90.Degrees(), WorldState.FutureTime(8)); } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.RonkanLightLeft or AID.RonkanLightRight) _aoe = null; @@ -85,7 +70,4 @@ public D031LozatlStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 651, NameID = 8231)] -public class D031Lozatl : BossModule -{ - public D031Lozatl(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(0, 315), 20)) { } -} +public class D031Lozatl(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(0, 315), 20)); diff --git a/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D032Batsquatch.cs b/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D032Batsquatch.cs index b6545fb8ae..76ecf04d34 100644 --- a/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D032Batsquatch.cs +++ b/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D032Batsquatch.cs @@ -19,40 +19,19 @@ public enum AID : uint Towerfall = 15512, // 233C->self, 3,0s cast, range 15 30-degree cone } -class Towerfall : Components.SelfTargetedAOEs -{ - public Towerfall() : base(ActionID.MakeSpell(AID.Towerfall), new AOEShapeCone(15, 15.Degrees())) { } -} +class Towerfall(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Towerfall), new AOEShapeCone(15, 15.Degrees())); -class Soundwave : Components.RaidwideCast -{ - public Soundwave() : base(ActionID.MakeSpell(AID.Soundwave), "Raidwide + towers fall") { } -} +class Soundwave(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.Soundwave), "Raidwide + towers fall"); -class Subsonics : Components.RaidwideCast -{ - public Subsonics() : base(ActionID.MakeSpell(AID.Subsonics), "Raidwide x11") { } -} +class Subsonics(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.Subsonics), "Raidwide x11"); -class RipperFang : Components.SingleTargetDelayableCast -{ - public RipperFang() : base(ActionID.MakeSpell(AID.RipperFang)) { } -} +class RipperFang(BossModule module) : Components.SingleTargetDelayableCast(module, ActionID.MakeSpell(AID.RipperFang)); -class FallingBoulder : Components.SelfTargetedAOEs -{ - public FallingBoulder() : base(ActionID.MakeSpell(AID.FallingBoulder), new AOEShapeCircle(4)) { } -} +class FallingBoulder(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.FallingBoulder), new AOEShapeCircle(4)); -class FallingRock : Components.SelfTargetedAOEs -{ - public FallingRock() : base(ActionID.MakeSpell(AID.FallingRock), new AOEShapeCircle(3)) { } -} +class FallingRock(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.FallingRock), new AOEShapeCircle(3)); -class FallingRock2 : Components.SelfTargetedAOEs -{ - public FallingRock2() : base(ActionID.MakeSpell(AID.FallingRock2), new AOEShapeCircle(2)) { } -} +class FallingRock2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.FallingRock2), new AOEShapeCircle(2)); class D032BatsquatchStates : StateMachineBuilder { @@ -70,7 +49,4 @@ public D032BatsquatchStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 651, NameID = 8232)] -public class D032Batsquatch : BossModule -{ - public D032Batsquatch(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(62, -35), 15)) { } -} +public class D032Batsquatch(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(62, -35), 15)); diff --git a/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D033Eros.cs b/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D033Eros.cs index 457efe6517..c05e67cb6c 100644 --- a/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D033Eros.cs +++ b/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D033Eros.cs @@ -49,14 +49,14 @@ class HoundOutOfHeavenGood : Components.BaitAwayTethers //TODO: consider genera { private ulong target; public HoundOutOfHeavenGood() : base(new AOEShapeCone(0, 0.Degrees()), (uint)TetherID.HoundOutOfHeavenTetherGood) { } - public override void OnTethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnTethered(Actor source, ActorTetherInfo tether) { base.OnTethered(module, source, tether); if (tether.ID == (uint)TetherID.HoundOutOfHeavenTetherGood) target = tether.Target; } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (DrawTethers && target == pc.InstanceID && CurrentBaits.Count > 0) { @@ -69,17 +69,17 @@ public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc } } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (target == actor.InstanceID && CurrentBaits.Count > 0) hints.Add("Tether is stretched!", false); } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { base.AddAIHints(module, slot, actor, assignment, hints); if (target == actor.InstanceID && CurrentBaits.Count > 0) - hints.AddForbiddenZone(ShapeDistance.Circle(module.PrimaryActor.Position, 15)); + hints.AddForbiddenZone(ShapeDistance.Circle(Module.PrimaryActor.Position, 15)); } } @@ -87,14 +87,14 @@ class HoundOutOfHeavenBad : Components.BaitAwayTethers { private ulong target; public HoundOutOfHeavenBad() : base(new AOEShapeCone(0, 0.Degrees()), (uint)TetherID.HoundOutOfHeavenTetherStretch) { } - public override void OnTethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnTethered(Actor source, ActorTetherInfo tether) { base.OnTethered(module, source, tether); if (tether.ID == (uint)TetherID.HoundOutOfHeavenTetherStretch) target = tether.Target; } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (DrawTethers && target == pc.InstanceID && CurrentBaits.Count > 0) { @@ -107,55 +107,37 @@ public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc } } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (target == actor.InstanceID && CurrentBaits.Count > 0) hints.Add("Stretch tether further!"); } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { base.AddAIHints(module, slot, actor, assignment, hints); if (target == actor.InstanceID && CurrentBaits.Count > 0) - hints.AddForbiddenZone(ShapeDistance.Circle(module.PrimaryActor.Position, 15)); + hints.AddForbiddenZone(ShapeDistance.Circle(Module.PrimaryActor.Position, 15)); } } -class ViperPoisonPatterns : Components.PersistentVoidzoneAtCastTarget -{ - public ViperPoisonPatterns() : base(6, ActionID.MakeSpell(AID.ViperPoisonPatterns), m => m.Enemies(OID.PoisonVoidzone).Where(z => z.EventState != 7), 0) { } -} +class ViperPoisonPatterns(BossModule module) : Components.PersistentVoidzoneAtCastTarget(module, 6, ActionID.MakeSpell(AID.ViperPoisonPatterns), m => m.Enemies(OID.PoisonVoidzone).Where(z => z.EventState != 7), 0); -class ConfessionOfFaithLeft : Components.SelfTargetedAOEs -{ - public ConfessionOfFaithLeft() : base(ActionID.MakeSpell(AID.ConfessionOfFaithLeft), new AOEShapeCone(60, 46.Degrees(), 20.Degrees())) { } // TODO: verify; there should not be an offset in reality here... -} +class ConfessionOfFaithLeft(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ConfessionOfFaithLeft), new AOEShapeCone(60, 46.Degrees(), 20.Degrees())); // TODO: verify; there should not be an offset in reality here... -class ConfessionOfFaithRight : Components.SelfTargetedAOEs -{ - public ConfessionOfFaithRight() : base(ActionID.MakeSpell(AID.ConfessionOfFaithRight), new AOEShapeCone(60, 46.Degrees(), -20.Degrees())) { } // TODO: verify; there should not be an offset in reality here... -} -class ConfessionOfFaithStack : Components.StackWithCastTargets -{ - public ConfessionOfFaithStack() : base(ActionID.MakeSpell(AID.ConfessionOfFaithStack), 6) { } -} +class ConfessionOfFaithRight(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ConfessionOfFaithRight), new AOEShapeCone(60, 46.Degrees(), -20.Degrees())); // TODO: verify; there should not be an offset in reality here... +class ConfessionOfFaithStack(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.ConfessionOfFaithStack), 6); -class ConfessionOfFaithCenter : Components.SelfTargetedAOEs -{ - public ConfessionOfFaithCenter() : base(ActionID.MakeSpell(AID.ConfessionOfFaithCenter), new AOEShapeCone(60, 40.Degrees())) { } -} +class ConfessionOfFaithCenter(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ConfessionOfFaithCenter), new AOEShapeCone(60, 40.Degrees())); -class ConfessionOfFaithSpread : Components.SpreadFromCastTargets -{ - public ConfessionOfFaithSpread() : base(ActionID.MakeSpell(AID.ConfessionOfFaithSpread), 5) { } -} +class ConfessionOfFaithSpread(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.ConfessionOfFaithSpread), 5); class ViperPoisonBait : Components.GenericBaitAway { private bool targeted; private Actor? target; - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.poisonbait) { @@ -165,7 +147,7 @@ public override void OnEventIcon(BossModule module, Actor actor, uint iconID) } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.ViperPoisonBaitAway) { @@ -174,14 +156,14 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn } } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { base.AddHints(module, slot, actor, hints, movementHints); if (target == actor && targeted) hints.Add("Bait voidzone away!"); } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { base.AddAIHints(module, slot, actor, assignment, hints); if (target == actor && targeted) @@ -208,15 +190,9 @@ public HeavingBreath() : base(ActionID.MakeSpell(AID.HeavingBreath), 35, kind: K public override bool DestinationUnsafe(BossModule module, int slot, Actor actor, WPos pos) => module.FindComponent()?.ActiveAOEs(module, slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false; } -class Glossolalia : Components.RaidwideCast -{ - public Glossolalia() : base(ActionID.MakeSpell(AID.Glossolalia)) { } -} +class Glossolalia(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.Glossolalia)); -class Rend : Components.SingleTargetDelayableCast -{ - public Rend() : base(ActionID.MakeSpell(AID.Rend)) { } -} +class Rend(BossModule module) : Components.SingleTargetDelayableCast(module, ActionID.MakeSpell(AID.Rend)); class D033ErosStates : StateMachineBuilder { @@ -240,7 +216,4 @@ public D033ErosStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 651, NameID = 8233)] -public class D033Eros : BossModule -{ - public D033Eros(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsRect(new(17, -538), 15, 20)) { } -} +public class D033Eros(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsRect(new(17, -538), 15, 20)); diff --git a/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D050ForgivenPrejudice.cs b/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D050ForgivenPrejudice.cs index 96ca22cdee..b67a12c5ee 100644 --- a/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D050ForgivenPrejudice.cs +++ b/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D050ForgivenPrejudice.cs @@ -20,20 +20,14 @@ public enum AID : uint Sanctification = 16814, // Boss->self, 5,0s cast, range 12 90-degree cone } -class SanctifiedAero : Components.SelfTargetedAOEs -{ - public SanctifiedAero() : base(ActionID.MakeSpell(AID.SanctifiedAero), new AOEShapeRect(40, 4)) { } -} +class SanctifiedAero(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.SanctifiedAero), new AOEShapeRect(40, 4)); class PunitiveLight : Components.CastInterruptHint { //Note: this attack is a r20 circle, not drawing it because it is too big and the damage not all that high even if interrupt/stun fails public PunitiveLight() : base(ActionID.MakeSpell(AID.PunitiveLight), true, true, "Raidwide", true) { } } -class Sanctification : Components.SelfTargetedAOEs -{ - public Sanctification() : base(ActionID.MakeSpell(AID.Sanctification), new AOEShapeCone(12, 45.Degrees())) { } -} +class Sanctification(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Sanctification), new AOEShapeCone(12, 45.Degrees())); class D050ForgivenPrejudiceStates : StateMachineBuilder { diff --git a/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D051ForgivenCruelty.cs b/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D051ForgivenCruelty.cs index 43c1fadb47..60dcb6d652 100644 --- a/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D051ForgivenCruelty.cs +++ b/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D051ForgivenCruelty.cs @@ -23,35 +23,17 @@ public enum AID : uint HurricaneWing = 15619, // 233C->self, 5,0s cast, range 10 circle } -class Rake : Components.SingleTargetDelayableCast -{ - public Rake() : base(ActionID.MakeSpell(AID.Rake)) { } -} +class Rake(BossModule module) : Components.SingleTargetDelayableCast(module, ActionID.MakeSpell(AID.Rake)); -class CycloneWing : Components.RaidwideCast -{ - public CycloneWing() : base(ActionID.MakeSpell(AID.CycloneWing2)) { } -} +class CycloneWing(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.CycloneWing2)); -class LumenInfinitum : Components.SelfTargetedAOEs -{ - public LumenInfinitum() : base(ActionID.MakeSpell(AID.LumenInfinitum), new AOEShapeRect(40, 2.5f)) { } -} +class LumenInfinitum(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.LumenInfinitum), new AOEShapeRect(40, 2.5f)); -class HurricaneWing : Components.SelfTargetedAOEs -{ - public HurricaneWing() : base(ActionID.MakeSpell(AID.HurricaneWing), new AOEShapeCircle(10)) { } -} +class HurricaneWing(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HurricaneWing), new AOEShapeCircle(10)); -class TyphoonWing : Components.SelfTargetedAOEs -{ - public TyphoonWing() : base(ActionID.MakeSpell(AID.TyphoonWing), new AOEShapeCone(25, 30.Degrees())) { } -} +class TyphoonWing(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TyphoonWing), new AOEShapeCone(25, 30.Degrees())); -class TyphoonWing2 : Components.SelfTargetedAOEs -{ - public TyphoonWing2() : base(ActionID.MakeSpell(AID.TyphoonWing2), new AOEShapeCone(25, 30.Degrees())) { } -} +class TyphoonWing2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TyphoonWing2), new AOEShapeCone(25, 30.Degrees())); class D051ForgivenCrueltyStates : StateMachineBuilder { @@ -68,7 +50,4 @@ public D051ForgivenCrueltyStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 659, NameID = 8260)] -public class D051ForgivenCruelty : BossModule -{ - public D051ForgivenCruelty(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(188, -170), 20)) { } -} +public class D051ForgivenCruelty(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(188, -170), 20)); diff --git a/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D052ForgivenApathy.cs b/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D052ForgivenApathy.cs index 1078651e15..cd49ec4213 100644 --- a/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D052ForgivenApathy.cs +++ b/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D052ForgivenApathy.cs @@ -28,15 +28,9 @@ class PunitiveLight : Components.CastInterruptHint public PunitiveLight() : base(ActionID.MakeSpell(AID.PunitiveLight), true, true, "Raidwide", true) { } } -class Sanctification : Components.SelfTargetedAOEs -{ - public Sanctification() : base(ActionID.MakeSpell(AID.Sanctification), new AOEShapeCone(12, 45.Degrees())) { } -} +class Sanctification(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Sanctification), new AOEShapeCone(12, 45.Degrees())); -class EarthShaker : Components.SelfTargetedAOEs -{ - public EarthShaker() : base(ActionID.MakeSpell(AID.EarthShaker2), new AOEShapeCone(60, 30.Degrees())) { } -} +class EarthShaker(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.EarthShaker2), new AOEShapeCone(60, 30.Degrees())); class D052ForgivenApathyStates : StateMachineBuilder { diff --git a/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D053ForgivenWhimsy.cs b/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D053ForgivenWhimsy.cs index bee67be24f..1d5ab27a79 100644 --- a/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D053ForgivenWhimsy.cs +++ b/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D053ForgivenWhimsy.cs @@ -29,20 +29,11 @@ public enum AID : uint PerfectContrition = 15630, // 27CD->self, 6,0s cast, range 5-15 donut } -class Catechism : Components.SingleTargetCastDelay -{ - public Catechism() : base(ActionID.MakeSpell(AID.Catechism), ActionID.MakeSpell(AID.Catechism2), 0.5f) { } -} +class Catechism(BossModule module) : Components.SingleTargetCastDelay(module, ActionID.MakeSpell(AID.Catechism), ActionID.MakeSpell(AID.Catechism2), 0.5f); -class SacramentOfPenance : Components.RaidwideCastDelay -{ - public SacramentOfPenance() : base(ActionID.MakeSpell(AID.SacramentOfPenance), ActionID.MakeSpell(AID.SacramentOfPenance2), 0.5f) { } -} +class SacramentOfPenance(BossModule module) : Components.RaidwideCastDelay(module, ActionID.MakeSpell(AID.SacramentOfPenance), ActionID.MakeSpell(AID.SacramentOfPenance2), 0.5f); -class PerfectContrition : Components.SelfTargetedAOEs -{ - public PerfectContrition() : base(ActionID.MakeSpell(AID.PerfectContrition), new AOEShapeDonut(5, 15)) { } -} +class PerfectContrition(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PerfectContrition), new AOEShapeDonut(5, 15)); public class JudgmentDay : Components.GenericTowers { @@ -55,13 +46,13 @@ public override void OnActorEState(BossModule module, Actor actor, ushort state) } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.Judged or AID.FoundWanting && Towers.Count > 0) Towers.RemoveAt(0); } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { if (Towers.Count > 0) hints.AddForbiddenZone(ShapeDistance.InvertedCircle(Towers[0].Position, 5)); @@ -77,7 +68,7 @@ public enum Patterns { None, Diagonal, Cross, EastWest, NorthSouth } public Patterns Pattern { get; private set; } private static readonly AOEShapeRect rect = new(5, 5, 5); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (Pattern == Patterns.Diagonal) { @@ -107,7 +98,7 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { @@ -130,7 +121,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.Exegesis) Pattern = Patterns.None; @@ -151,7 +142,4 @@ public D053ForgivenWhimsyStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 659, NameID = 8261)] -public class D053ForgivenWhimsy : BossModule -{ - public D053ForgivenWhimsy(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsSquare(new(-240, -50), 15)) { } -} +public class D053ForgivenWhimsy(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsSquare(new(-240, -50), 15)); diff --git a/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D054ForgivenRevelry.cs b/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D054ForgivenRevelry.cs index 074a9c9152..f60106d41f 100644 --- a/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D054ForgivenRevelry.cs +++ b/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D054ForgivenRevelry.cs @@ -24,32 +24,29 @@ class PalmAttacks : Components.GenericAOEs //Palm Attacks have a wrong origin, s private AOEInstance? _aoe; private static readonly AOEShapeRect rect = new(15, 15); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => Utils.ZeroOrOne(_aoe); + public override IEnumerable ActiveAOEs(int slot, Actor actor) => Utils.ZeroOrOne(_aoe); - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { case AID.LeftPalm2: - _aoe = new(rect, new(module.PrimaryActor.Position.X, module.Bounds.Center.Z), -90.Degrees(), spell.NPCFinishAt); + _aoe = new(rect, new(Module.PrimaryActor.Position.X, Module.Bounds.Center.Z), -90.Degrees(), spell.NPCFinishAt); break; case AID.RightPalm2: - _aoe = new(rect, new(module.PrimaryActor.Position.X, module.Bounds.Center.Z), 90.Degrees(), spell.NPCFinishAt); + _aoe = new(rect, new(Module.PrimaryActor.Position.X, Module.Bounds.Center.Z), 90.Degrees(), spell.NPCFinishAt); break; } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.LeftPalm2 or AID.RightPalm2) _aoe = null; } } -class LightShot : Components.SelfTargetedAOEs -{ - public LightShot() : base(ActionID.MakeSpell(AID.LightShot), new AOEShapeRect(40, 2)) { } -} +class LightShot(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.LightShot), new AOEShapeRect(40, 2)); class D054ForgivenRevelryStates : StateMachineBuilder { @@ -62,7 +59,4 @@ public D054ForgivenRevelryStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 659, NameID = 8270)] -public class D054ForgivenRevelry : BossModule -{ - public D054ForgivenRevelry(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsSquare(new(-240, 176), 15)) { } -} +public class D054ForgivenRevelry(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsSquare(new(-240, 176), 15)); diff --git a/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D055ForgivenObscenity.cs b/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D055ForgivenObscenity.cs index 9d0e09b34c..5ba66f726c 100644 --- a/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D055ForgivenObscenity.cs +++ b/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D055ForgivenObscenity.cs @@ -42,12 +42,12 @@ class Orbs : Components.GenericAOEs private static readonly AOEShapeCircle circle = new(3); public Orbs() : base(new(), "GTFO from voidzone!") { } - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { foreach (var p in _orbs) yield return new(circle, p.Position); } - public override void OnActorCreated(BossModule module, Actor actor) + public override void OnActorCreated(Actor actor) { if ((OID)actor.OID == OID.Orbs) _orbs.Add(actor); @@ -65,7 +65,7 @@ class GoldChaser : Components.GenericAOEs private readonly List _casters = []; private static readonly AOEShapeRect rect = new(100, 2.5f, 100); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_casters.Count > 1 && ((_casters[0].Position.AlmostEqual(new(-227.5f, 253), 1) && _casters[1].Position.AlmostEqual(new(-232.5f, 251.5f), 1)) || (_casters[0].Position.AlmostEqual(new(-252.5f, 253), 1) && _casters[1].Position.AlmostEqual(new(-247.5f, 251.5f), 1)))) { @@ -149,7 +149,7 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, } } - public override void OnActorCreated(BossModule module, Actor actor) + public override void OnActorCreated(Actor actor) { if ((OID)actor.OID == OID.Rings) { @@ -157,10 +157,10 @@ public override void OnActorCreated(BossModule module, Actor actor) } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.Ringsmith) - _activation = module.WorldState.CurrentTime; + _activation = WorldState.CurrentTime; if ((AID)spell.Action.ID == AID.VenaAmoris) { ++NumCasts; @@ -173,55 +173,25 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } -class SacramentSforzando : Components.SingleTargetCastDelay -{ - public SacramentSforzando() : base(ActionID.MakeSpell(AID.SacramentSforzando), ActionID.MakeSpell(AID.SacramentSforzando2), 0.8f) { } -} +class SacramentSforzando(BossModule module) : Components.SingleTargetCastDelay(module, ActionID.MakeSpell(AID.SacramentSforzando), ActionID.MakeSpell(AID.SacramentSforzando2), 0.8f); -class OrisonFortissimo : Components.RaidwideCastDelay -{ - public OrisonFortissimo() : base(ActionID.MakeSpell(AID.OrisonFortissimo), ActionID.MakeSpell(AID.OrisonFortissimo2), 0.8f) { } -} +class OrisonFortissimo(BossModule module) : Components.RaidwideCastDelay(module, ActionID.MakeSpell(AID.OrisonFortissimo), ActionID.MakeSpell(AID.OrisonFortissimo2), 0.8f); -class DivineDiminuendo : Components.SelfTargetedAOEs -{ - public DivineDiminuendo() : base(ActionID.MakeSpell(AID.DivineDiminuendo), new AOEShapeCircle(8)) { } -} +class DivineDiminuendo(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.DivineDiminuendo), new AOEShapeCircle(8)); -class DivineDiminuendo1 : Components.SelfTargetedAOEs -{ - public DivineDiminuendo1() : base(ActionID.MakeSpell(AID.DivineDiminuendo1), new AOEShapeCircle(8)) { } -} +class DivineDiminuendo1(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.DivineDiminuendo1), new AOEShapeCircle(8)); -class DivineDiminuendo2 : Components.SelfTargetedAOEs -{ - public DivineDiminuendo2() : base(ActionID.MakeSpell(AID.DivineDiminuendo2), new AOEShapeDonut(10, 16)) { } -} +class DivineDiminuendo2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.DivineDiminuendo2), new AOEShapeDonut(10, 16)); -class DivineDiminuendo3 : Components.SelfTargetedAOEs -{ - public DivineDiminuendo3() : base(ActionID.MakeSpell(AID.DivineDiminuendo3), new AOEShapeDonut(18, 32)) { } -} +class DivineDiminuendo3(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.DivineDiminuendo3), new AOEShapeDonut(18, 32)); -class DivineDiminuendo4 : Components.SelfTargetedAOEs -{ - public DivineDiminuendo4() : base(ActionID.MakeSpell(AID.DivineDiminuendo4), new AOEShapeCircle(8)) { } -} +class DivineDiminuendo4(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.DivineDiminuendo4), new AOEShapeCircle(8)); -class ConvictionMarcato : Components.SelfTargetedAOEs -{ - public ConvictionMarcato() : base(ActionID.MakeSpell(AID.ConvictionMarcato), new AOEShapeRect(40, 2.5f)) { } -} +class ConvictionMarcato(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ConvictionMarcato), new AOEShapeRect(40, 2.5f)); -class ConvictionMarcato2 : Components.SelfTargetedAOEs -{ - public ConvictionMarcato2() : base(ActionID.MakeSpell(AID.ConvictionMarcato2), new AOEShapeRect(40, 2.5f)) { } -} +class ConvictionMarcato2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ConvictionMarcato2), new AOEShapeRect(40, 2.5f)); -class ConvictionMarcato3 : Components.SelfTargetedAOEs -{ - public ConvictionMarcato3() : base(ActionID.MakeSpell(AID.ConvictionMarcato3), new AOEShapeRect(40, 2.5f)) { } -} +class ConvictionMarcato3(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ConvictionMarcato3), new AOEShapeRect(40, 2.5f)); class Voidzone : BossComponent { @@ -240,7 +210,7 @@ public override void OnActorEAnim(BossModule module, Actor actor, uint state) } } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { base.AddAIHints(module, slot, actor, assignment, hints); if (active) diff --git a/BossMod/Modules/Shadowbringers/FATE/Archaeotania.cs b/BossMod/Modules/Shadowbringers/FATE/Archaeotania.cs index 539c39ae7e..f27b177aae 100644 --- a/BossMod/Modules/Shadowbringers/FATE/Archaeotania.cs +++ b/BossMod/Modules/Shadowbringers/FATE/Archaeotania.cs @@ -48,102 +48,60 @@ public enum IconID : uint Megaflare = 62, // player } -class BlizzardBreath : Components.SelfTargetedAOEs -{ - public BlizzardBreath() : base(ActionID.MakeSpell(AID.BlizzardBreath), new AOEShapeCone(60, 22.5f.Degrees())) { } -} +class BlizzardBreath(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.BlizzardBreath), new AOEShapeCone(60, 22.5f.Degrees())); -class FlamesOfTheApocalypse : Components.SelfTargetedAOEs -{ - public FlamesOfTheApocalypse() : base(ActionID.MakeSpell(AID.FlamesOfTheApocalypse), new AOEShapeDonut(15, 30)) { } -} +class FlamesOfTheApocalypse(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.FlamesOfTheApocalypse), new AOEShapeDonut(15, 30)); -class MindBlast : Components.SelfTargetedAOEs -{ - public MindBlast() : base(ActionID.MakeSpell(AID.MindBlast), new AOEShapeCircle(21)) { } -} +class MindBlast(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.MindBlast), new AOEShapeCircle(21)); // note: helpers target their corresponding target for the duration of their life class Megaflare : Components.UniformStackSpread { public Megaflare() : base(6, 0) { } - public override void Update(BossModule module) + public override void Update() { // fallback if stack target dies before mechanic is resolved // sequence is boss starts casting > icons appear > helpers appear > boss finishes casting > helpers cast their aoe and die - if (module.PrimaryActor.CastInfo == null) + if (Module.PrimaryActor.CastInfo == null) Stacks.RemoveAll(s => !module.Enemies(OID.MegaflareHelper).Any(h => !h.IsDead && h.TargetID == s.Target.InstanceID)); base.Update(module); } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.Megaflare) - AddStack(actor, module.WorldState.CurrentTime.AddSeconds(5)); + AddStack(actor, WorldState.FutureTime(5)); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.MegaflareAOE) Stacks.RemoveAll(s => s.Target.InstanceID == spell.MainTargetID); } } -class TidalWave : Components.KnockbackFromCastTarget -{ - public TidalWave() : base(ActionID.MakeSpell(AID.TidalWaveVisual), 48, kind: Kind.DirForward) { } -} +class TidalWave(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.TidalWaveVisual), 48, kind: Kind.DirForward); -class WindSlash : Components.LocationTargetedAOEs -{ - public WindSlash() : base(ActionID.MakeSpell(AID.WindSlashAOE), 8) { } -} +class WindSlash(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.WindSlashAOE), 8); -class Windwinder : Components.PersistentVoidzone -{ - public Windwinder() : base(5, m => m.Enemies(OID.Twister).Where(a => !a.IsDead)) { } -} +class Windwinder(BossModule module) : Components.PersistentVoidzone(module, 5, m => m.Enemies(OID.Twister).Where(a => !a.IsDead)); -class CivilizationBuster1 : Components.SelfTargetedAOEs -{ - public CivilizationBuster1() : base(ActionID.MakeSpell(AID.CivilizationBuster1), new AOEShapeRect(62, 7.5f)) { } -} +class CivilizationBuster1(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.CivilizationBuster1), new AOEShapeRect(62, 7.5f)); -class CivilizationBuster2 : Components.SelfTargetedAOEs -{ - public CivilizationBuster2() : base(ActionID.MakeSpell(AID.CivilizationBuster2), new AOEShapeRect(62, 7.5f)) { } -} +class CivilizationBuster2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.CivilizationBuster2), new AOEShapeRect(62, 7.5f)); -class Touchdown : Components.SelfTargetedAOEs -{ - public Touchdown() : base(ActionID.MakeSpell(AID.Touchdown), new AOEShapeCircle(30)) { } // TODO: verify falloff -} +class Touchdown(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Touchdown), new AOEShapeCircle(30)); // TODO: verify falloff -class PillarImpact : Components.SelfTargetedAOEs -{ - public PillarImpact() : base(ActionID.MakeSpell(AID.PillarImpact), new AOEShapeCircle(7)) { } -} +class PillarImpact(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PillarImpact), new AOEShapeCircle(7)); -class PillarPierce : Components.SelfTargetedAOEs -{ - public PillarPierce() : base(ActionID.MakeSpell(AID.PillarPierce), new AOEShapeRect(65, 4)) { } -} +class PillarPierce(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PillarPierce), new AOEShapeRect(65, 4)); -class AncientAevis : Components.Adds -{ - public AncientAevis() : base((uint)OID.AncientAevis) { } -} +class AncientAevis(BossModule module) : Components.Adds(module, (uint)OID.AncientAevis); -class HeadlongRush : Components.SelfTargetedAOEs -{ - public HeadlongRush() : base(ActionID.MakeSpell(AID.HeadlongRush), new AOEShapeRect(13.2f, 5, 4.2f)) { } -} +class HeadlongRush(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HeadlongRush), new AOEShapeRect(13.2f, 5, 4.2f)); -class Aether : Components.Adds -{ - public Aether() : base((uint)OID.Aether) { } -} +class Aether(BossModule module) : Components.Adds(module, (uint)OID.Aether); class ArchaeotaniaStates : StateMachineBuilder { @@ -169,7 +127,4 @@ public ArchaeotaniaStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.Fate, GroupID = 1432, NameID = 8234)] -public class Archaeotania : BossModule -{ - public Archaeotania(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsSquare(new(279, 249), 29)) { } -} +public class Archaeotania(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsSquare(new(279, 249), 29)); diff --git a/BossMod/Modules/Shadowbringers/FATE/Formidable.cs b/BossMod/Modules/Shadowbringers/FATE/Formidable.cs index a227807f02..d7e9cfaae9 100644 --- a/BossMod/Modules/Shadowbringers/FATE/Formidable.cs +++ b/BossMod/Modules/Shadowbringers/FATE/Formidable.cs @@ -50,15 +50,9 @@ public enum SID : uint ExtremeCaution = 1269, // Boss->players } -class Spincrush : Components.SelfTargetedAOEs -{ - public Spincrush() : base(ActionID.MakeSpell(AID.Spincrush), new AOEShapeCone(15, 60.Degrees())) { } -} +class Spincrush(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Spincrush), new AOEShapeCone(15, 60.Degrees())); -class FireShot : Components.LocationTargetedAOEs -{ - public FireShot() : base(ActionID.MakeSpell(AID.FireShot), 7) { } -} +class FireShot(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.FireShot), 7); class FiresOfMtGulg : Components.GenericAOEs { @@ -66,13 +60,13 @@ class FiresOfMtGulg : Components.GenericAOEs private DateTime _activation; private static readonly AOEShapeDonut _shape = new(10, 50); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_caster != null) yield return new(_shape, _caster.Position, default, _activation); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.FiresOfMtGulg) { @@ -82,11 +76,11 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.FiresOfMtGulg or AID.FiresOfMtGulgRepeat) { - _activation = module.WorldState.CurrentTime.AddSeconds(3.1f); + _activation = WorldState.FutureTime(3.1f); if (++NumCasts >= 7) _caster = null; } @@ -94,10 +88,7 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } // note: raidwide cast is followed by 7 aoes every ~2.7s -class BarrageFire : Components.RaidwideCast -{ - public BarrageFire() : base(ActionID.MakeSpell(AID.BarrageFire), "Raidwide + 7 repeats after") { } -} +class BarrageFire(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.BarrageFire), "Raidwide + 7 repeats after"); // note: it could have been a simple StackWithCastTargets, however sometimes there is no cast - i assume it happens because actor spawns right before starting a cast, and sometimes due to timings cast-start is missed by the game // because of that, we just use icons & cast events @@ -106,15 +97,15 @@ class DrillShot : Components.StackWithCastTargets { public DrillShot() : base(ActionID.MakeSpell(AID.DrillShot), 6) { } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.DrillShot) - AddStack(actor, module.WorldState.CurrentTime.AddSeconds(5.0f)); + AddStack(actor, WorldState.FutureTime(5.0f)); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) { } + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.DrillShot) Stacks.RemoveAll(s => s.Target.InstanceID == spell.MainTargetID); @@ -125,7 +116,7 @@ class ExplosionMissile : BossComponent { private List _activeMissiles = new(); - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (var m in _activeMissiles) { @@ -134,7 +125,7 @@ public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc } } - public override void OnActorCreated(BossModule module, Actor actor) + public override void OnActorCreated(Actor actor) { if ((OID)actor.OID == OID.DwarvenDynamite) _activeMissiles.Add(actor); @@ -146,17 +137,14 @@ public override void OnActorDestroyed(BossModule module, Actor actor) _activeMissiles.Remove(actor); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.ExplosionMissile) _activeMissiles.Remove(caster); } } -class ExplosionGrenade : Components.SelfTargetedAOEs -{ - public ExplosionGrenade() : base(ActionID.MakeSpell(AID.ExplosionGrenade), new AOEShapeCircle(12)) { } -} +class ExplosionGrenade(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ExplosionGrenade), new AOEShapeCircle(12)); class DwarvenDischarge(AOEShape shape, OID oid, AID aid, float delay) : Components.GenericAOEs { @@ -166,16 +154,16 @@ class DwarvenDischarge(AOEShape shape, OID oid, AID aid, float delay) : Componen private readonly float _delay = delay; private List<(Actor caster, DateTime activation)> _casters = []; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { foreach (var (caster, activation) in _casters) yield return new(_shape, caster.Position, default, caster.CastInfo?.NPCFinishAt ?? activation); } - public override void OnActorCreated(BossModule module, Actor actor) + public override void OnActorCreated(Actor actor) { if ((OID)actor.OID == _oid) - _casters.Add((actor, module.WorldState.CurrentTime.AddSeconds(_delay))); + _casters.Add((actor, WorldState.FutureTime(_delay))); } public override void OnActorDestroyed(BossModule module, Actor actor) @@ -184,32 +172,20 @@ public override void OnActorDestroyed(BossModule module, Actor actor) _casters.RemoveAll(c => c.caster == actor); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == _aid) _casters.RemoveAll(c => c.caster == caster); } } -class DwarvenDischargeDonut : DwarvenDischarge -{ - public DwarvenDischargeDonut() : base(new AOEShapeDonut(9, 60), OID.DwarvenChargeDonut, AID.DwarvenDischargeDonut, 9.3f) { } -} +class DwarvenDischargeDonut(BossModule module) : DwarvenDischarge(module, new AOEShapeDonut(9, 60), OID.DwarvenChargeDonut, AID.DwarvenDischargeDonut, 9.3f); -class DwarvenDischargeCircle : DwarvenDischarge -{ - public DwarvenDischargeCircle() : base(new AOEShapeCircle(8), OID.DwarvenChargeCircle, AID.DwarvenDischargeCircle, 8.1f) { } -} +class DwarvenDischargeCircle(BossModule module) : DwarvenDischarge(module, new AOEShapeCircle(8), OID.DwarvenChargeCircle, AID.DwarvenDischargeCircle, 8.1f); -class AutomatonEscort : Components.Adds -{ - public AutomatonEscort() : base((uint)OID.AutomatonEscort) { } -} +class AutomatonEscort(BossModule module) : Components.Adds(module, (uint)OID.AutomatonEscort); -class SteamDome : Components.KnockbackFromCastTarget -{ - public SteamDome() : base(ActionID.MakeSpell(AID.SteamDome), 15) { } -} +class SteamDome(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.SteamDome), 15); class DynamicSensoryJammer : Components.CastHint { @@ -218,32 +194,32 @@ public DynamicSensoryJammer() : base(ActionID.MakeSpell(AID.DynamicSensoryJammer public bool Ec { get; private set; } private bool casting; - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.DynamicSensoryJammer) casting = true; } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.DynamicSensoryJammer) casting = false; } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.ExtremeCaution) - _ec.Set(module.Raid.FindSlot(actor.InstanceID)); + _ec.Set(Raid.FindSlot(actor.InstanceID)); } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.ExtremeCaution) - _ec.Clear(module.Raid.FindSlot(actor.InstanceID)); + _ec.Clear(Raid.FindSlot(actor.InstanceID)); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_ec[slot] != Ec) hints.Add("Extreme Caution on you! STOP everything or get launched into the air!"); } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (casting) hints.Add("Stop everything including auto attacks or get launched into the air"); diff --git a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE11ShadowOfDeathHand.cs b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE11ShadowOfDeathHand.cs index 41181a93d9..0cabc9cfdb 100644 --- a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE11ShadowOfDeathHand.cs +++ b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE11ShadowOfDeathHand.cs @@ -48,60 +48,27 @@ public enum AID : uint PiercingBarrageCrow = 20191, // TamedCarrionCrow->self, 3.0s cast, range 40 width 8 rect } -class BestialLoyalty : Components.CastHint -{ - public BestialLoyalty() : base(ActionID.MakeSpell(AID.BestialLoyalty), "Summon crows") { } -} +class BestialLoyalty(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.BestialLoyalty), "Summon crows"); -class RunWild : Components.CastHint -{ - public RunWild() : base(ActionID.MakeSpell(AID.RunWild), "Interrupt beastmaster") { } -} +class RunWild(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.RunWild), "Interrupt beastmaster"); -class HardBeak : Components.SingleTargetCast -{ - public HardBeak() : base(ActionID.MakeSpell(AID.HardBeak)) { } -} +class HardBeak(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.HardBeak)); -class PiercingBarrageBoss : Components.SelfTargetedAOEs -{ - public PiercingBarrageBoss() : base(ActionID.MakeSpell(AID.PiercingBarrageBoss), new AOEShapeRect(40, 4)) { } -} +class PiercingBarrageBoss(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PiercingBarrageBoss), new AOEShapeRect(40, 4)); -class Helldive : Components.StackWithCastTargets -{ - public Helldive() : base(ActionID.MakeSpell(AID.Helldive), 6) { } -} +class Helldive(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.Helldive), 6); -class BroadsideBarrage : Components.SelfTargetedAOEs -{ - public BroadsideBarrage() : base(ActionID.MakeSpell(AID.BroadsideBarrage), new AOEShapeRect(40, 20)) { } -} +class BroadsideBarrage(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.BroadsideBarrage), new AOEShapeRect(40, 20)); -class BlindsideBarrage : Components.RaidwideCast -{ - public BlindsideBarrage() : base(ActionID.MakeSpell(AID.BlindsideBarrage), "Raidwide + deathwall appears") { } -} +class BlindsideBarrage(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.BlindsideBarrage), "Raidwide + deathwall appears"); -class RollingBarrage : Components.SelfTargetedAOEs -{ - public RollingBarrage() : base(ActionID.MakeSpell(AID.RollingBarrageAOE), new AOEShapeCircle(8)) { } -} +class RollingBarrage(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RollingBarrageAOE), new AOEShapeCircle(8)); -class Whirlwind : Components.PersistentVoidzone -{ - public Whirlwind() : base(4, m => m.Enemies(OID.Whirlwind)) { } -} +class Whirlwind(BossModule module) : Components.PersistentVoidzone(module, 4, m => m.Enemies(OID.Whirlwind)); -class Wind : Components.KnockbackFromCastTarget -{ - public Wind() : base(ActionID.MakeSpell(AID.WindVisual), 30, kind: Kind.DirForward) { } -} +class Wind(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.WindVisual), 30, kind: Kind.DirForward); -class PiercingBarrageCrow : Components.SelfTargetedAOEs -{ - public PiercingBarrageCrow() : base(ActionID.MakeSpell(AID.PiercingBarrageCrow), new AOEShapeRect(40, 4)) { } -} +class PiercingBarrageCrow(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PiercingBarrageCrow), new AOEShapeRect(40, 4)); class CE11ShadowOfDeathHandStates : StateMachineBuilder { diff --git a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE12BayingOfHounds.cs b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE12BayingOfHounds.cs index 2eea1a5990..0d57e8199c 100644 --- a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE12BayingOfHounds.cs +++ b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE12BayingOfHounds.cs @@ -32,25 +32,13 @@ public enum AID : uint VoidQuakeAOE3 = 20551, // Helper->self, 3.0s cast, range 20-30 donut aoe } -class Hellclaw : Components.SingleTargetCast -{ - public Hellclaw() : base(ActionID.MakeSpell(AID.Hellclaw)) { } -} +class Hellclaw(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.Hellclaw)); -class TailBlow : Components.SelfTargetedAOEs -{ - public TailBlow() : base(ActionID.MakeSpell(AID.TailBlow), new AOEShapeCone(19, 45.Degrees())) { } -} +class TailBlow(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TailBlow), new AOEShapeCone(19, 45.Degrees())); -class LavaSpit : Components.LocationTargetedAOEs -{ - public LavaSpit() : base(ActionID.MakeSpell(AID.LavaSpitAOE), 5) { } -} +class LavaSpit(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.LavaSpitAOE), 5); -class ScorchingLash : Components.SelfTargetedAOEs -{ - public ScorchingLash() : base(ActionID.MakeSpell(AID.ScorchingLash), new AOEShapeRect(50, 5)) { } -} +class ScorchingLash(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ScorchingLash), new AOEShapeRect(50, 5)); class Hellpounce : Components.GenericAOEs { @@ -58,21 +46,21 @@ class Hellpounce : Components.GenericAOEs public Hellpounce() : base(ActionID.MakeSpell(AID.Hellpounce), "GTFO from charge!") { } - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => Utils.ZeroOrOne(_charge); + public override IEnumerable ActiveAOEs(int slot, Actor actor) => Utils.ZeroOrOne(_charge); - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.Hellpounce or AID.HellpounceSecond) Activate(caster.Position, spell.LocXZ, spell.NPCFinishAt); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { case AID.Hellpounce: - var offset = spell.LocXZ - module.Bounds.Center; - Activate(spell.LocXZ, module.Bounds.Center - offset, module.WorldState.CurrentTime.AddSeconds(3.7f)); + var offset = spell.LocXZ - Module.Bounds.Center; + Activate(spell.LocXZ, Module.Bounds.Center - offset, WorldState.FutureTime(3.7f)); break; case AID.HellpounceSecond: _charge = null; @@ -88,36 +76,24 @@ private void Activate(WPos source, WPos target, DateTime activation) } } -class LionsBreath : Components.SelfTargetedAOEs -{ - public LionsBreath() : base(ActionID.MakeSpell(AID.LionsBreathAOE), new AOEShapeCone(60, 45.Degrees())) { } -} +class LionsBreath(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.LionsBreathAOE), new AOEShapeCone(60, 45.Degrees())); -class DragonsBreathR : Components.SelfTargetedAOEs -{ - public DragonsBreathR() : base(ActionID.MakeSpell(AID.DragonsBreathAOER), new AOEShapeCone(60, 36.Degrees(), -10.Degrees())) { } // TODO: verify; there should not be an offset in reality here... -} +class DragonsBreathR(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.DragonsBreathAOER), new AOEShapeCone(60, 36.Degrees(), -10.Degrees())); // TODO: verify; there should not be an offset in reality here... -class DragonsBreathL : Components.SelfTargetedAOEs -{ - public DragonsBreathL() : base(ActionID.MakeSpell(AID.DragonsBreathAOEL), new AOEShapeCone(60, 36.Degrees(), 10.Degrees())) { } // TODO: verify; there should not be an offset in reality here... -} +class DragonsBreathL(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.DragonsBreathAOEL), new AOEShapeCone(60, 36.Degrees(), 10.Degrees())); // TODO: verify; there should not be an offset in reality here... -class VoidTornado : Components.CastHint -{ - public VoidTornado() : base(ActionID.MakeSpell(AID.VoidTornado), "Set hp to 1") { } -} +class VoidTornado(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.VoidTornado), "Set hp to 1"); class VoidQuake : Components.GenericAOEs //this concentric AOE can happen forwards or backwards in order with the same AID as the starter { private readonly List<(Actor caster, AOEShape shape)> _active = []; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { return _active.Take(1).Select(e => new AOEInstance(e.shape, e.caster.Position, e.caster.CastInfo!.Rotation, e.caster.CastInfo.NPCFinishAt)); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { AOEShape? shape = (AID)spell.Action.ID switch { @@ -130,7 +106,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf _active.Add((caster, shape)); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { _active.RemoveAll(c => c.caster == caster); } @@ -155,7 +131,4 @@ public CE12BayingOfHoundsStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.BozjaCE, GroupID = 735, NameID = 2)] // bnpcname=9394 -public class CE12BayingOfHounds : BossModule -{ - public CE12BayingOfHounds(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(154, 785), 25)) { } -} +public class CE12BayingOfHounds(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(154, 785), 25)); diff --git a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE13KillItWithFire.cs b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE13KillItWithFire.cs index 4687065e20..a148c31729 100644 --- a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE13KillItWithFire.cs +++ b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE13KillItWithFire.cs @@ -37,10 +37,7 @@ public enum SID : uint JealousAnaphylaxis = 2302, // Helper->player, extra=0x0 } -class Pheromones : Components.PersistentVoidzone -{ - public Pheromones() : base(4, m => m.Enemies(OID.Pheromones)) { } -} +class Pheromones(BossModule module) : Components.PersistentVoidzone(module, 4, m => m.Enemies(OID.Pheromones)); class DeadLeaves : Components.GenericAOEs { @@ -53,7 +50,7 @@ class DeadLeaves : Components.GenericAOEs public DeadLeaves() : base(new(), "Go to different color!") { } - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_tenderStatuses[slot]) foreach (var c in _tenderCasters) @@ -63,38 +60,38 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, yield return new(_shape, c.Position, c.CastInfo!.Rotation, c.CastInfo.NPCFinishAt); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { switch ((SID)status.ID) { case SID.TenderAnaphylaxis: - _tenderStatuses.Set(module.Raid.FindSlot(actor.InstanceID)); + _tenderStatuses.Set(Raid.FindSlot(actor.InstanceID)); break; case SID.JealousAnaphylaxis: - _jealousStatuses.Set(module.Raid.FindSlot(actor.InstanceID)); + _jealousStatuses.Set(Raid.FindSlot(actor.InstanceID)); break; } } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { switch ((SID)status.ID) { case SID.TenderAnaphylaxis: - _tenderStatuses.Clear(module.Raid.FindSlot(actor.InstanceID)); + _tenderStatuses.Clear(Raid.FindSlot(actor.InstanceID)); break; case SID.JealousAnaphylaxis: - _jealousStatuses.Clear(module.Raid.FindSlot(actor.InstanceID)); + _jealousStatuses.Clear(Raid.FindSlot(actor.InstanceID)); break; } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { CastersForAction(spell.Action)?.Add(caster); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { CastersForAction(spell.Action)?.Remove(caster); } @@ -107,30 +104,15 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn }; } -class AnaphylacticShock : Components.SelfTargetedAOEs -{ - public AnaphylacticShock() : base(ActionID.MakeSpell(AID.AnaphylacticShock), new AOEShapeRect(30, 1)) { } -} +class AnaphylacticShock(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.AnaphylacticShock), new AOEShapeRect(30, 1)); -class SplashBomb : Components.SelfTargetedAOEs -{ - public SplashBomb() : base(ActionID.MakeSpell(AID.SplashBombAOE), new AOEShapeCircle(6)) { } -} +class SplashBomb(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.SplashBombAOE), new AOEShapeCircle(6)); -class SplashGrenade : Components.StackWithCastTargets -{ - public SplashGrenade() : base(ActionID.MakeSpell(AID.SplashGrenadeAOE), 6) { } -} +class SplashGrenade(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.SplashGrenadeAOE), 6); -class PlayfulBreeze : Components.RaidwideCast -{ - public PlayfulBreeze() : base(ActionID.MakeSpell(AID.PlayfulBreeze)) { } -} +class PlayfulBreeze(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.PlayfulBreeze)); -class Budbutt : Components.SingleTargetCast -{ - public Budbutt() : base(ActionID.MakeSpell(AID.Budbutt)) { } -} +class Budbutt(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.Budbutt)); class CE13KillItWithFireStates : StateMachineBuilder { @@ -148,7 +130,4 @@ public CE13KillItWithFireStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.BozjaCE, GroupID = 735, NameID = 1)] // bnpcname=9391 -public class CE13KillItWithFire : BossModule -{ - public CE13KillItWithFire(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(-90, 700), 25)) { } -} +public class CE13KillItWithFire(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(-90, 700), 25)); diff --git a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE14VigilForLost.cs b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE14VigilForLost.cs index f885b0ecde..0744dbd856 100644 --- a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE14VigilForLost.cs +++ b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE14VigilForLost.cs @@ -24,50 +24,23 @@ public enum AID : uint MagitekRay = 21268, // MagitekBit->self, 2.5s cast, range 50 width 4 rect } -class LightLeap : Components.LocationTargetedAOEs -{ - public LightLeap() : base(ActionID.MakeSpell(AID.LightLeap), 10) { } -} +class LightLeap(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.LightLeap), 10); -class ChemicalMissile : Components.SelfTargetedAOEs -{ - public ChemicalMissile() : base(ActionID.MakeSpell(AID.ChemicalMissile), new AOEShapeCircle(12)) { } -} +class ChemicalMissile(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ChemicalMissile), new AOEShapeCircle(12)); -class TailMissile : Components.SelfTargetedAOEs -{ - public TailMissile() : base(ActionID.MakeSpell(AID.TailMissileAOE), new AOEShapeCircle(30)) { } -} +class TailMissile(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TailMissileAOE), new AOEShapeCircle(30)); -class Shockwave : Components.SelfTargetedAOEs -{ - public Shockwave() : base(ActionID.MakeSpell(AID.Shockwave), new AOEShapeCircle(16)) { } -} +class Shockwave(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Shockwave), new AOEShapeCircle(16)); -class ExplosiveFlare : Components.SelfTargetedAOEs -{ - public ExplosiveFlare() : base(ActionID.MakeSpell(AID.ExplosiveFlare), new AOEShapeCircle(10)) { } -} +class ExplosiveFlare(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ExplosiveFlare), new AOEShapeCircle(10)); -class CripplingBlow : Components.SingleTargetCast -{ - public CripplingBlow() : base(ActionID.MakeSpell(AID.CripplingBlow)) { } -} +class CripplingBlow(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.CripplingBlow)); -class PlasmaField : Components.RaidwideCast -{ - public PlasmaField() : base(ActionID.MakeSpell(AID.PlasmaField)) { } -} +class PlasmaField(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.PlasmaField)); -class Towers : Components.CastTowers -{ - public Towers() : base(ActionID.MakeSpell(AID.Explosion), 6) { } -} +class Towers(BossModule module) : Components.CastTowers(module, ActionID.MakeSpell(AID.Explosion), 6); -class MagitekRay : Components.SelfTargetedAOEs -{ - public MagitekRay() : base(ActionID.MakeSpell(AID.MagitekRay), new AOEShapeRect(50, 2)) { } -} +class MagitekRay(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.MagitekRay), new AOEShapeRect(50, 2)); class CE14VigilForLostStates : StateMachineBuilder { @@ -87,7 +60,4 @@ public CE14VigilForLostStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.BozjaCE, GroupID = 735, NameID = 3)] // bnpcname=9396 -public class CE14VigilForLost : BossModule -{ - public CE14VigilForLost(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(451, 830), 30)) { } -} +public class CE14VigilForLost(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(451, 830), 30)); diff --git a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE21FinalFurlong.cs b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE21FinalFurlong.cs index 5c6a315e53..900596fbb9 100644 --- a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE21FinalFurlong.cs +++ b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE21FinalFurlong.cs @@ -54,7 +54,7 @@ public override void Init(BossModule module) _hands = module.Enemies(OID.GraspingRancor); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { base.AddHints(module, slot, actor, hints, movementHints); if (Casters.Count > 0) @@ -69,7 +69,7 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { var hand = _hands.FirstOrDefault(h => h.Tether.Target == pc.InstanceID); if (hand != null) @@ -81,45 +81,21 @@ public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc } } -class HatefulMiasma : Components.StackWithCastTargets -{ - public HatefulMiasma() : base(ActionID.MakeSpell(AID.HatefulMiasma), 6) { } -} +class HatefulMiasma(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.HatefulMiasma), 6); -class PoisonedWords : Components.LocationTargetedAOEs -{ - public PoisonedWords() : base(ActionID.MakeSpell(AID.PoisonedWords), 6) { } -} +class PoisonedWords(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.PoisonedWords), 6); -class TalonedGaze : Components.CastHint -{ - public TalonedGaze() : base(ActionID.MakeSpell(AID.TalonedGaze), "AOE front/back --> sides") { } -} +class TalonedGaze(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.TalonedGaze), "AOE front/back --> sides"); -class TalonedWings : Components.CastHint -{ - public TalonedWings() : base(ActionID.MakeSpell(AID.TalonedWings), "AOE sides --> front/back") { } -} +class TalonedWings(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.TalonedWings), "AOE sides --> front/back"); -class CoffinNails : Components.SelfTargetedAOEs -{ - public CoffinNails() : base(ActionID.MakeSpell(AID.CoffinNails), new AOEShapeCone(60, 45.Degrees()), 2) { } -} +class CoffinNails(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.CoffinNails), new AOEShapeCone(60, 45.Degrees()), 2); -class Stab : Components.SingleTargetCast -{ - public Stab() : base(ActionID.MakeSpell(AID.Stab)) { } -} +class Stab(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.Stab)); -class GripOfPoison : Components.RaidwideCast -{ - public GripOfPoison() : base(ActionID.MakeSpell(AID.GripOfPoison)) { } -} +class GripOfPoison(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.GripOfPoison)); -class StepsOfDestruction : Components.LocationTargetedAOEs -{ - public StepsOfDestruction() : base(ActionID.MakeSpell(AID.StepsOfDestructionAOE), 6) { } -} +class StepsOfDestruction(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.StepsOfDestructionAOE), 6); class CE21FinalFurlongStates : StateMachineBuilder { @@ -139,7 +115,4 @@ public CE21FinalFurlongStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.BozjaCE, GroupID = 735, NameID = 6)] // bnpcname=9405 -public class CE21FinalFurlong : BossModule -{ - public CE21FinalFurlong(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(644, 228), 27)) { } -} +public class CE21FinalFurlong(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(644, 228), 27)); diff --git a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE31MetalFoxChaos.cs b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE31MetalFoxChaos.cs index aa0ef45cf9..486e9f616b 100644 --- a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE31MetalFoxChaos.cs +++ b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE31MetalFoxChaos.cs @@ -29,14 +29,14 @@ public enum Types { None, SatelliteLaser, DiffractiveLaser, LaserShower } private const float maxError = MathF.PI / 180; private static readonly AOEShapeRect rect = new(100, 3); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_times.Count > 0) foreach (var p in module.Enemies(OID.MagitekBit)) { - if (Type == Types.SatelliteLaser && module.WorldState.CurrentTime > _times[0]) + if (Type == Types.SatelliteLaser && WorldState.CurrentTime > _times[0]) yield return new(rect, p.Position, p.Rotation, _times[1]); - if ((Type == Types.DiffractiveLaser && module.WorldState.CurrentTime > _times[0]) || Type == Types.LaserShower) + if ((Type == Types.DiffractiveLaser && WorldState.CurrentTime > _times[0]) || Type == Types.LaserShower) { if (NumCasts < 5 && p.Rotation.AlmostEqual(startrotation, maxError)) yield return new(rect, p.Position, p.Rotation, _times[1], ArenaColor.Danger); @@ -52,9 +52,9 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { - var _time = module.WorldState.CurrentTime; + var _time = WorldState.CurrentTime; if ((AID)spell.Action.ID == AID.SatelliteLaser) { Type = Types.SatelliteLaser; @@ -77,7 +77,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.RefractedLaser) { @@ -92,25 +92,13 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } -class Rush : Components.BaitAwayChargeCast -{ - public Rush() : base(ActionID.MakeSpell(AID.Rush), 7) { } -} +class Rush(BossModule module) : Components.BaitAwayChargeCast(module, ActionID.MakeSpell(AID.Rush), 7); -class LaserShower : Components.LocationTargetedAOEs -{ - public LaserShower() : base(ActionID.MakeSpell(AID.LaserShower2), 10) { } -} +class LaserShower(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.LaserShower2), 10); -class DiffractiveLaser : Components.SelfTargetedAOEs -{ - public DiffractiveLaser() : base(ActionID.MakeSpell(AID.DiffractiveLaser), new AOEShapeCone(60, 75.Degrees())) { } -} +class DiffractiveLaser(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.DiffractiveLaser), new AOEShapeCone(60, 75.Degrees())); -class SatelliteLaser : Components.RaidwideCast -{ - public SatelliteLaser() : base(ActionID.MakeSpell(AID.SatelliteLaser), "Raidwide + all lasers fire at the same time") { } -} +class SatelliteLaser(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.SatelliteLaser), "Raidwide + all lasers fire at the same time"); class CE31MetalFoxChaosStates : StateMachineBuilder { diff --git a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE41WithDiremiteAndMain.cs b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE41WithDiremiteAndMain.cs index d2910d3199..8a5490225d 100644 --- a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE41WithDiremiteAndMain.cs +++ b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE41WithDiremiteAndMain.cs @@ -45,20 +45,11 @@ public enum IconID : uint Hailfire4 = 82, // player } -class CrystallineFracture : Components.SelfTargetedAOEs -{ - public CrystallineFracture() : base(ActionID.MakeSpell(AID.CrystallineFracture), new AOEShapeCircle(4)) { } -} +class CrystallineFracture(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.CrystallineFracture), new AOEShapeCircle(4)); -class ResonantFrequencyDim : Components.SelfTargetedAOEs -{ - public ResonantFrequencyDim() : base(ActionID.MakeSpell(AID.ResonantFrequencyDim), new AOEShapeCircle(6)) { } -} +class ResonantFrequencyDim(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ResonantFrequencyDim), new AOEShapeCircle(6)); -class ResonantFrequencyCorrupted : Components.SelfTargetedAOEs -{ - public ResonantFrequencyCorrupted() : base(ActionID.MakeSpell(AID.ResonantFrequencyCorrupted), new AOEShapeCircle(6)) { } -} +class ResonantFrequencyCorrupted(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ResonantFrequencyCorrupted), new AOEShapeCircle(6)); class CrystallineStingers : Components.CastLineOfSightAOE { @@ -72,22 +63,19 @@ public AetherialStingers() : base(ActionID.MakeSpell(AID.AetherialStingers), 60, public override IEnumerable BlockerActors(BossModule module) => module.Enemies(OID.CorruptedCrystal).Where(a => !a.IsDead); } -class Subduction : Components.SelfTargetedAOEs -{ - public Subduction() : base(ActionID.MakeSpell(AID.Subduction), new AOEShapeCircle(8)) { } -} +class Subduction(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Subduction), new AOEShapeCircle(8)); // next aoe starts casting slightly before previous, so use a custom component class Earthbreaker : Components.GenericAOEs { private readonly List<(Actor caster, AOEShape shape)> _active = []; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { return _active.Take(1).Select(e => new AOEInstance(e.shape, e.caster.Position, e.caster.CastInfo!.Rotation, e.caster.CastInfo.NPCFinishAt)); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { AOEShape? shape = (AID)spell.Action.ID switch { @@ -100,21 +88,15 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf _active.Add((caster, shape)); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { _active.RemoveAll(c => c.caster == caster); } } -class CrystalNeedle : Components.SingleTargetCast -{ - public CrystalNeedle() : base(ActionID.MakeSpell(AID.CrystalNeedle)) { } -} +class CrystalNeedle(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.CrystalNeedle)); -class Shardstrike : Components.SpreadFromCastTargets -{ - public Shardstrike() : base(ActionID.MakeSpell(AID.ShardstrikeAOE), 5) { } -} +class Shardstrike(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.ShardstrikeAOE), 5); // TODO: this should probably be generalized class Hailfire : Components.GenericAOEs @@ -128,29 +110,29 @@ class Hailfire : Components.GenericAOEs public Hailfire() : base(ActionID.MakeSpell(AID.HailfireAOE)) { } - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (NextTarget is var target && target != null && target != actor) - yield return new(_shape, module.PrimaryActor.Position, Angle.FromDirection(target.Position - module.PrimaryActor.Position), _activation); + yield return new(_shape, Module.PrimaryActor.Position, Angle.FromDirection(target.Position - Module.PrimaryActor.Position), _activation); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (NextTarget == pc) - _shape.Outline(arena, module.PrimaryActor.Position, Angle.FromDirection(pc.Position - module.PrimaryActor.Position), ArenaColor.Danger); + _shape.Outline(arena, Module.PrimaryActor.Position, Angle.FromDirection(pc.Position - Module.PrimaryActor.Position), ArenaColor.Danger); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if (spell.Action == WatchedAction && NumCasts < _targets.Length) { _targets[NumCasts] = null; - _activation = module.WorldState.CurrentTime.AddSeconds(2.3f); + _activation = WorldState.FutureTime(2.3f); } base.OnEventCast(module, caster, spell); } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { var order = (IconID)iconID switch { @@ -164,7 +146,7 @@ public override void OnEventIcon(BossModule module, Actor actor, uint iconID) { NumCasts = 0; _targets[order] = actor; - _activation = module.WorldState.CurrentTime.AddSeconds(8.2f); + _activation = WorldState.FutureTime(8.2f); } } } diff --git a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE42FromBeyondTheGrave.cs b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE42FromBeyondTheGrave.cs index 23a7fa73ce..f5a2d3bf6c 100644 --- a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE42FromBeyondTheGrave.cs +++ b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE42FromBeyondTheGrave.cs @@ -63,15 +63,9 @@ public enum SID : uint ForcedMarch = 1257, // Boss->player, extra=0x2/0x1/0x8/0x4 } -class DevourSoul : Components.SingleTargetCast -{ - public DevourSoul() : base(ActionID.MakeSpell(AID.DevourSoul)) { } -} +class DevourSoul(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.DevourSoul)); -class Blight : Components.RaidwideCast -{ - public Blight() : base(ActionID.MakeSpell(AID.Blight)) { } -} +class Blight(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.Blight)); class GallowsMarch : Components.StatusDrivenForcedMarch { @@ -79,17 +73,14 @@ public GallowsMarch() : base(3, (uint)SID.ForwardMarch, (uint)SID.AboutFace, (ui public override bool DestinationUnsafe(BossModule module, int slot, Actor actor, WPos pos) => !module.FindComponent()?.ActiveAOEs(module, slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? true; - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { - if (module.PrimaryActor.CastInfo?.IsSpell(AID.GallowsMarch) ?? false) + if (Module.PrimaryActor.CastInfo?.IsSpell(AID.GallowsMarch) ?? false) hints.Add("Apply doom & march debuffs"); } } -class ShockSphere : Components.PersistentVoidzone -{ - public ShockSphere() : base(7, m => m.Enemies(OID.ShockSphere)) { } -} +class ShockSphere(BossModule module) : Components.PersistentVoidzone(module, 7, m => m.Enemies(OID.ShockSphere)); class SoulPurge : Components.GenericAOEs { @@ -99,9 +90,9 @@ class SoulPurge : Components.GenericAOEs private static readonly AOEShapeCircle _shapeCircle = new(10); private static readonly AOEShapeDonut _shapeDonut = new(10, 30); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => _imminent.Take(1); + public override IEnumerable ActiveAOEs(int slot, Actor actor) => _imminent.Take(1); - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { @@ -117,7 +108,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.SoulPurgeCircle or AID.SoulPurgeCircleDual or AID.SoulPurgeDonut or AID.SoulPurgeDonutDual && _imminent.Count > 0) _imminent.RemoveAt(0); @@ -134,45 +125,21 @@ private void SetupImminentAOEs(AOEShape main, AOEShape dual, WPos center, DateTi } } -class CrimsonBlade : Components.SelfTargetedAOEs -{ - public CrimsonBlade() : base(ActionID.MakeSpell(AID.CrimsonBlade), new AOEShapeCone(50, 90.Degrees())) { } -} +class CrimsonBlade(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.CrimsonBlade), new AOEShapeCone(50, 90.Degrees())); -class BloodCyclone : Components.SelfTargetedAOEs -{ - public BloodCyclone() : base(ActionID.MakeSpell(AID.BloodCyclone), new AOEShapeCircle(5)) { } -} +class BloodCyclone(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.BloodCyclone), new AOEShapeCircle(5)); -class Aethertide : Components.SpreadFromCastTargets -{ - public Aethertide() : base(ActionID.MakeSpell(AID.AethertideAOE), 8) { } -} +class Aethertide(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.AethertideAOE), 8); -class MarchingBreath : Components.CastInterruptHint //heals all allies by 20% of max health (raidwide) -{ - public MarchingBreath() : base(ActionID.MakeSpell(AID.MarchingBreath), showNameInHint: true) { } -} +class MarchingBreath(BossModule module) : Components.CastInterruptHint(module, ActionID.MakeSpell(AID.MarchingBreath), showNameInHint: true); // heals all allies by 20% of max health (raidwide) -class TacticalAero : Components.SelfTargetedAOEs -{ - public TacticalAero() : base(ActionID.MakeSpell(AID.TacticalAero), new AOEShapeRect(40, 4)) { } -} +class TacticalAero(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TacticalAero), new AOEShapeRect(40, 4)); -class EntropicFlame : Components.SelfTargetedAOEs -{ - public EntropicFlame() : base(ActionID.MakeSpell(AID.EntropicFlame), new AOEShapeRect(60, 4)) { } -} +class EntropicFlame(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.EntropicFlame), new AOEShapeRect(60, 4)); -class DarkFlare : Components.LocationTargetedAOEs -{ - public DarkFlare() : base(ActionID.MakeSpell(AID.DarkFlare), 8) { } -} +class DarkFlare(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.DarkFlare), 8); -class SoulSacrifice : Components.CastInterruptHint //WarWraith sacrifices itself to give boss a damage buff -{ - public SoulSacrifice() : base(ActionID.MakeSpell(AID.SoulSacrifice), showNameInHint: true) { } -} +class SoulSacrifice(BossModule module) : Components.CastInterruptHint(module, ActionID.MakeSpell(AID.SoulSacrifice), showNameInHint: true); // WarWraith sacrifices itself to give boss a damage buff class PurifyingLight : Components.LocationTargetedAOEs { diff --git a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE44FamiliarFace.cs b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE44FamiliarFace.cs index 592518d286..27eb9a26a7 100644 --- a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE44FamiliarFace.cs +++ b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE44FamiliarFace.cs @@ -41,38 +41,20 @@ public enum AID : uint Hammerfall = 23825, // Helper->self, 8.0s cast, range 37 circle aoe } -class TectonicEruption : Components.LocationTargetedAOEs -{ - public TectonicEruption() : base(ActionID.MakeSpell(AID.TectonicEruption), 6) { } -} +class TectonicEruption(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.TectonicEruption), 6); -class RockCutter : Components.SingleTargetDelayableCast -{ - public RockCutter() : base(ActionID.MakeSpell(AID.RockCutter)) { } -} +class RockCutter(BossModule module) : Components.SingleTargetDelayableCast(module, ActionID.MakeSpell(AID.RockCutter)); -class AncientQuake : Components.RaidwideCast -{ - public AncientQuake() : base(ActionID.MakeSpell(AID.AncientQuake)) { } -} +class AncientQuake(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.AncientQuake)); -class Roxxor : Components.SpreadFromCastTargets -{ - public Roxxor() : base(ActionID.MakeSpell(AID.Roxxor), 6) { } -} +class Roxxor(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.Roxxor), 6); -class ControlTowerAppear : Components.SelfTargetedAOEs -{ - public ControlTowerAppear() : base(ActionID.MakeSpell(AID.ControlTowerAppear), new AOEShapeCircle(6)) { } -} +class ControlTowerAppear(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ControlTowerAppear), new AOEShapeCircle(6)); // note: we could predict aoes way in advance, when FallingTower actors are created - they immediately have correct rotation // if previous cast was TowerRound, delay is ~24.4s; otherwise if previous cast was ControlTower, delay is ~9.6s; otherwise it is ~13s // however, just watching casts normally gives more than enough time to avoid aoes and does not interfere with mechanics that resolve earlier -class Towerfall : Components.SelfTargetedAOEs -{ - public Towerfall() : base(ActionID.MakeSpell(AID.Towerfall), new AOEShapeRect(40, 5)) { } -} +class Towerfall(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Towerfall), new AOEShapeRect(40, 5)); class ExtremeEdge : Components.GenericAOEs { @@ -80,13 +62,13 @@ class ExtremeEdge : Components.GenericAOEs private static readonly AOEShapeRect _shape = new(60, 18); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { foreach (var c in _casters) yield return new(_shape, c.caster.Position + c.offset * c.caster.CastInfo!.Rotation.ToDirection().OrthoL(), c.caster.CastInfo.Rotation, c.caster.CastInfo.NPCFinishAt); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { var offset = (AID)spell.Action.ID switch { @@ -98,7 +80,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf _casters.Add((caster, offset)); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.ExtremeEdgeL or AID.ExtremeEdgeR) _casters.RemoveAll(c => c.caster == caster); @@ -109,7 +91,7 @@ class IntractableLand : Components.Exaflare { public IntractableLand() : base(8) { } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.IntractableLandFirst) { @@ -117,7 +99,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.IntractableLandFirst or AID.IntractableLandRest) { @@ -125,7 +107,7 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent int index = Lines.FindIndex(item => item.Next.AlmostEqual(pos, 1)); if (index == -1) { - module.ReportError(this, $"Failed to find entry for {caster.InstanceID:X}"); + ReportError($"Failed to find entry for {caster.InstanceID:X}"); return; } @@ -141,15 +123,15 @@ class Hammerfall : Components.GenericAOEs private readonly List _aoes = []; private static readonly AOEShapeCircle _shape = new(37); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => _aoes.Take(2); + public override IEnumerable ActiveAOEs(int slot, Actor actor) => _aoes.Take(2); - public override void OnActorCreated(BossModule module, Actor actor) + public override void OnActorCreated(Actor actor) { if ((OID)actor.OID == OID.Hammer) - _aoes.Add(new(_shape, actor.Position, activation: module.WorldState.CurrentTime.AddSeconds(12.6f))); + _aoes.Add(new(_shape, actor.Position, activation: WorldState.FutureTime(12.6f))); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.Hammerfall && _aoes.Count > 0) _aoes.RemoveAt(0); @@ -174,7 +156,4 @@ public CE44FamiliarFaceStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.BozjaCE, GroupID = 778, NameID = 29)] // bnpcname=9693 -public class CE44FamiliarFace : BossModule -{ - public CE44FamiliarFace(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(330, 390), 30)) { } -} +public class CE44FamiliarFace(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(330, 390), 30)); diff --git a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE51ThereWouldBeBlood.cs b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE51ThereWouldBeBlood.cs index cdf90aa8fb..249e43535e 100644 --- a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE51ThereWouldBeBlood.cs +++ b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE51ThereWouldBeBlood.cs @@ -31,55 +31,25 @@ public enum AID : uint TragicalGaze = 23573, // EmbitteredSoul->self, 7.5s cast, range 55 circle } -class CloudOfLocusts : Components.SelfTargetedAOEs -{ - public CloudOfLocusts() : base(ActionID.MakeSpell(AID.CloudOfLocusts), new AOEShapeCircle(15)) { } -} +class CloudOfLocusts(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.CloudOfLocusts), new AOEShapeCircle(15)); -class PlagueOfLocusts : Components.SelfTargetedAOEs -{ - public PlagueOfLocusts() : base(ActionID.MakeSpell(AID.PlagueOfLocusts), new AOEShapeDonut(6, 40)) { } -} +class PlagueOfLocusts(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PlagueOfLocusts), new AOEShapeDonut(6, 40)); -class DivestingGale : Components.LocationTargetedAOEs -{ - public DivestingGale() : base(ActionID.MakeSpell(AID.DivestingGale), 5) { } -} +class DivestingGale(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.DivestingGale), 5); -class Camisado : Components.SingleTargetCast -{ - public Camisado() : base(ActionID.MakeSpell(AID.Camisado)) { } -} +class Camisado(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.Camisado)); -class DreadWind : Components.RaidwideCast -{ - public DreadWind() : base(ActionID.MakeSpell(AID.DreadWind)) { } -} +class DreadWind(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.DreadWind)); -class GaleCannon : Components.SelfTargetedAOEs -{ - public GaleCannon() : base(ActionID.MakeSpell(AID.GaleCannon), new AOEShapeRect(30, 6)) { } -} +class GaleCannon(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.GaleCannon), new AOEShapeRect(30, 6)); -class FlightOfTheMaleficCone : Components.SelfTargetedAOEs -{ - public FlightOfTheMaleficCone() : base(ActionID.MakeSpell(AID.FlightOfTheMaleficAOECone), new AOEShapeCone(30, 45.Degrees())) { } -} +class FlightOfTheMaleficCone(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.FlightOfTheMaleficAOECone), new AOEShapeCone(30, 45.Degrees())); -class FlightOfTheMaleficCenter : Components.LocationTargetedAOEs -{ - public FlightOfTheMaleficCenter() : base(ActionID.MakeSpell(AID.FlightOfTheMaleficAOECenter), 6) { } -} +class FlightOfTheMaleficCenter(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.FlightOfTheMaleficAOECenter), 6); -class TempestOfAnguish : Components.SelfTargetedAOEs -{ - public TempestOfAnguish() : base(ActionID.MakeSpell(AID.TempestOfAnguish), new AOEShapeRect(55, 5)) { } -} +class TempestOfAnguish(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TempestOfAnguish), new AOEShapeRect(55, 5)); -class TragicalGaze : Components.CastGaze -{ - public TragicalGaze() : base(ActionID.MakeSpell(AID.TragicalGaze)) { } -} +class TragicalGaze(BossModule module) : Components.CastGaze(module, ActionID.MakeSpell(AID.TragicalGaze)); class CE51ThereWouldBeBloodStates : StateMachineBuilder { @@ -100,7 +70,4 @@ public CE51ThereWouldBeBloodStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.BozjaCE, GroupID = 778, NameID = 24)] // bnpcname=10064 -public class CE51ThereWouldBeBlood : BossModule -{ - public CE51ThereWouldBeBlood(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(-390, 230), 25)) { } -} +public class CE51ThereWouldBeBlood(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(-390, 230), 25)); diff --git a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE52TimeToBurn.cs b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE52TimeToBurn.cs index bd46c76e27..0eed322f96 100644 --- a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE52TimeToBurn.cs +++ b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE52TimeToBurn.cs @@ -46,7 +46,7 @@ class TimeEruptionBombReproduce : Components.GenericAOEs private static readonly AOEShapeRect _shapeCyclone = new(60, 10); private static readonly AOEShapeRect _shapeEruption = new(10, 10, 10); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_bombsActivation != default) { @@ -70,31 +70,31 @@ public override void Init(BossModule module) _bombs = module.Enemies(OID.TimeBomb1); // either 1 or 2 works, dunno what's the difference } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { foreach (var p in _eruptionSafeSpots) _shapeEruption.Draw(arena, p, new(), ArenaColor.SafeFromAOE); base.DrawArenaBackground(module, pcSlot, pc, arena); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { case AID.TimeBomb: - if (caster == module.PrimaryActor) - _bombsActivation = module.WorldState.CurrentTime.AddSeconds(23.2f); + if (caster == Module.PrimaryActor) + _bombsActivation = WorldState.FutureTime(23.2f); break; case AID.CrimsonCyclone: _cycloneCasters.Add(caster); break; case AID.StartTime: - _eruptionStart = module.WorldState.CurrentTime; + _eruptionStart = WorldState.CurrentTime; break; } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { @@ -136,20 +136,11 @@ public override void OnActorEAnim(BossModule module, Actor actor, uint state) } } -class Eruption : Components.LocationTargetedAOEs -{ - public Eruption() : base(ActionID.MakeSpell(AID.Eruption), 8) { } -} +class Eruption(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Eruption), 8); -class FireTankbuster : Components.SingleTargetCast -{ - public FireTankbuster() : base(ActionID.MakeSpell(AID.FireTankbuster)) { } -} +class FireTankbuster(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.FireTankbuster)); -class FireRaidwide : Components.RaidwideCast -{ - public FireRaidwide() : base(ActionID.MakeSpell(AID.FireRaidwide)) { } -} +class FireRaidwide(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.FireRaidwide)); class CE52TimeToBurnStates : StateMachineBuilder { @@ -164,7 +155,4 @@ public CE52TimeToBurnStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.BozjaCE, GroupID = 778, NameID = 26)] // bnpcname=9930 -public class CE52TimeToBurn : BossModule -{ - public CE52TimeToBurn(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsSquare(new(-550, 0), 30)) { } -} +public class CE52TimeToBurn(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsSquare(new(-550, 0), 30)); diff --git a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE53HereComesTheCavalry.cs b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE53HereComesTheCavalry.cs index e83fb778fd..67a3bdf2e3 100644 --- a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE53HereComesTheCavalry.cs +++ b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE53HereComesTheCavalry.cs @@ -44,41 +44,20 @@ public enum TetherID : uint RawSteel = 57, // Boss->player } -class StormSlash : Components.SelfTargetedAOEs -{ - public StormSlash() : base(ActionID.MakeSpell(AID.StormSlash), new AOEShapeCone(8, 60.Degrees())) { } -} +class StormSlash(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.StormSlash), new AOEShapeCone(8, 60.Degrees())); -class MagitekBurst : Components.LocationTargetedAOEs -{ - public MagitekBurst() : base(ActionID.MakeSpell(AID.MagitekBurst), 8) { } -} +class MagitekBurst(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.MagitekBurst), 8); -class BurnishedJoust : Components.ChargeAOEs -{ - public BurnishedJoust() : base(ActionID.MakeSpell(AID.BurnishedJoust), 3) { } -} +class BurnishedJoust(BossModule module) : Components.ChargeAOEs(module, ActionID.MakeSpell(AID.BurnishedJoust), 3); // note: there are two casters, probably to avoid 32-target limit - we only want to show one -class GustSlash : Components.KnockbackFromCastTarget -{ - public GustSlash() : base(ActionID.MakeSpell(AID.GustSlashAOE), 35, true, 1, null, Kind.DirForward) { } -} +class GustSlash(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.GustSlashAOE), 35, true, 1, null, Kind.DirForward); -class FireShot : Components.PersistentVoidzoneAtCastTarget -{ - public FireShot() : base(6, ActionID.MakeSpell(AID.FireShot), m => m.Enemies(OID.FireShot).Where(e => e.EventState != 7), 0) { } -} +class FireShot(BossModule module) : Components.PersistentVoidzoneAtCastTarget(module, 6, ActionID.MakeSpell(AID.FireShot), m => m.Enemies(OID.FireShot).Where(e => e.EventState != 7), 0); -class AirborneExplosion : Components.LocationTargetedAOEs -{ - public AirborneExplosion() : base(ActionID.MakeSpell(AID.AirborneExplosion), 10) { } -} +class AirborneExplosion(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.AirborneExplosion), 10); -class RideDownAOE : Components.SelfTargetedAOEs -{ - public RideDownAOE() : base(ActionID.MakeSpell(AID.RideDown), new AOEShapeRect(60, 5)) { } -} +class RideDownAOE(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RideDown), new AOEShapeRect(60, 5)); // note: there are two casters, probably to avoid 32-target limit - we only want to show one // TODO: generalize to reusable component @@ -89,30 +68,27 @@ class RideDownKnockback : Components.Knockback public RideDownKnockback() : base(ActionID.MakeSpell(AID.RideDownAOE), false, 1) { } - public override IEnumerable Sources(BossModule module, int slot, Actor actor) => _sources; + public override IEnumerable Sources(int slot, Actor actor) => _sources; - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) { _sources.Clear(); // charge always happens through center, so create two sources with origin at center looking orthogonally - _sources.Add(new(module.Bounds.Center, 12, spell.NPCFinishAt, _shape, spell.Rotation + 90.Degrees(), Kind.DirForward)); - _sources.Add(new(module.Bounds.Center, 12, spell.NPCFinishAt, _shape, spell.Rotation - 90.Degrees(), Kind.DirForward)); + _sources.Add(new(Module.Bounds.Center, 12, spell.NPCFinishAt, _shape, spell.Rotation + 90.Degrees(), Kind.DirForward)); + _sources.Add(new(Module.Bounds.Center, 12, spell.NPCFinishAt, _shape, spell.Rotation - 90.Degrees(), Kind.DirForward)); } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) _sources.Clear(); } } -class CallRaze : Components.RaidwideCast -{ - public CallRaze() : base(ActionID.MakeSpell(AID.CallRaze), "Multi raidwide") { } -} +class CallRaze(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.CallRaze), "Multi raidwide"); // TODO: find out optimal distance, test results so far: // - distance ~6.4 (inside hitbox) and 1 vuln stack: 79194 damage @@ -124,31 +100,31 @@ class RawSteel : Components.BaitAwayChargeCast public RawSteel() : base(ActionID.MakeSpell(AID.RawSteel), 2) { } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { base.AddHints(module, slot, actor, hints, movementHints); if (ActiveBaitsOn(actor).Any(b => b.Target.Position.InCircle(b.Source.Position, _safeDistance))) hints.Add("Go further away from boss!"); } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (CurrentBaits.Count > 0) hints.Add("Proximity Tankbuster + Charge"); } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { base.AddAIHints(module, slot, actor, assignment, hints); foreach (var b in ActiveBaits) { if (b.Target == actor) hints.AddForbiddenZone(ShapeDistance.Circle(b.Source.Position, _safeDistance)); - hints.PredictedDamage.Add((new BitMask().WithBit(module.Raid.FindSlot(b.Target.InstanceID)), b.Source.CastInfo?.NPCFinishAt ?? default)); + hints.PredictedDamage.Add((new BitMask().WithBit(Raid.FindSlot(b.Target.InstanceID)), b.Source.CastInfo?.NPCFinishAt ?? default)); } } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (var bait in ActiveBaitsOn(pc)) { @@ -157,25 +133,13 @@ public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc } } -class CloseQuarters : Components.SelfTargetedAOEs -{ - public CloseQuarters() : base(ActionID.MakeSpell(AID.CloseQuartersAOE), new AOEShapeCircle(15)) { } -} +class CloseQuarters(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.CloseQuartersAOE), new AOEShapeCircle(15)); -class FarAfield : Components.SelfTargetedAOEs -{ - public FarAfield() : base(ActionID.MakeSpell(AID.FarAfieldAOE), new AOEShapeDonut(10, 30)) { } -} +class FarAfield(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.FarAfieldAOE), new AOEShapeDonut(10, 30)); -class CallControlledBurn : Components.SpreadFromCastTargets -{ - public CallControlledBurn() : base(ActionID.MakeSpell(AID.CallControlledBurnAOE), 6) { } -} +class CallControlledBurn(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.CallControlledBurnAOE), 6); -class MagitekBlaster : Components.StackWithCastTargets -{ - public MagitekBlaster() : base(ActionID.MakeSpell(AID.MagitekBlaster), 8) { } -} +class MagitekBlaster(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.MagitekBlaster), 8); class CE53HereComesTheCavalryStates : StateMachineBuilder { diff --git a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE54NeverCryWolf.cs b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE54NeverCryWolf.cs index 19532956b9..0441594e37 100644 --- a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE54NeverCryWolf.cs +++ b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE54NeverCryWolf.cs @@ -45,28 +45,19 @@ public enum AID : uint ActivateImaginifer = 23623, // Imaginifer->self, no cast, single-target, visual } -class IcePillar : Components.SelfTargetedAOEs -{ - public IcePillar() : base(ActionID.MakeSpell(AID.IcePillarAOE), new AOEShapeCircle(4)) { } -} +class IcePillar(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.IcePillarAOE), new AOEShapeCircle(4)); -class PillarPierce : Components.SelfTargetedAOEs -{ - public PillarPierce() : base(ActionID.MakeSpell(AID.PillarPierce), new AOEShapeRect(80, 2)) { } -} +class PillarPierce(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PillarPierce), new AOEShapeRect(80, 2)); -class Shatter : Components.SelfTargetedAOEs -{ - public Shatter() : base(ActionID.MakeSpell(AID.Shatter), new AOEShapeCircle(8)) { } -} +class Shatter(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Shatter), new AOEShapeCircle(8)); class BracingWind : Components.KnockbackFromCastTarget { public BracingWind() : base(ActionID.MakeSpell(AID.BracingWind), 40, false, 1, new AOEShapeRect(60, 6), Kind.DirForward) { } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { - var length = module.Bounds.HalfSize * 2; // casters are at the border, orthogonal to borders + var length = Module.Bounds.HalfSize * 2; // casters are at the border, orthogonal to borders foreach (var c in Casters) { hints.AddForbiddenZone(ShapeDistance.Rect(c.Position, c.CastInfo!.Rotation, length, Distance - length, 6), c.CastInfo!.NPCFinishAt); @@ -85,20 +76,20 @@ public LunarCry() : base(ActionID.MakeSpell(AID.LunarCry), 80, false) { } public override void Init(BossModule module) => _knockback = module.FindComponent(); - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { if (_knockback?.Casters.Count > 0) return; // resolve knockbacks first base.AddAIHints(module, slot, actor, assignment, hints); } - public override void OnActorCreated(BossModule module, Actor actor) + public override void OnActorCreated(Actor actor) { if ((OID)actor.OID == OID.Icicle) _safePillars.Add(actor); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { base.OnCastStarted(module, caster, spell); if ((AID)spell.Action.ID == AID.PillarPierce) @@ -114,18 +105,18 @@ class ThermalGust : Components.GenericAOEs private static readonly AOEShapeRect _shape = new(60, 2); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => _casters.Select(c => new AOEInstance(_shape, c.Position, c.CastInfo?.Rotation ?? c.Rotation, c.CastInfo?.NPCFinishAt ?? _activation)); + public override IEnumerable ActiveAOEs(int slot, Actor actor) => _casters.Select(c => new AOEInstance(_shape, c.Position, c.CastInfo?.Rotation ?? c.Rotation, c.CastInfo?.NPCFinishAt ?? _activation)); - public override void OnActorCreated(BossModule module, Actor actor) + public override void OnActorCreated(Actor actor) { if ((OID)actor.OID == OID.Imaginifer) { _casters.Add(actor); - _activation = module.WorldState.CurrentTime.AddSeconds(6.5f); + _activation = WorldState.FutureTime(6.5f); } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.ThermalGust) _casters.Remove(caster); @@ -140,12 +131,12 @@ class AgeOfEndlessFrost : Components.GenericAOEs private static readonly AOEShapeCone _shape = new(40, 10.Degrees()); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { - return _angles.Select(a => new AOEInstance(_shape, module.PrimaryActor.Position, a, _nextActivation)); + return _angles.Select(a => new AOEInstance(_shape, Module.PrimaryActor.Position, a, _nextActivation)); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { @@ -164,17 +155,17 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.AgeOfEndlessFrostFirstCCW or AID.AgeOfEndlessFrostFirstCW or AID.AgeOfEndlessFrostRest) { if (NumCasts == 0) { - _nextActivation = module.WorldState.CurrentTime.AddSeconds(2.6); + _nextActivation = WorldState.FutureTime(2.6); } else if (NumCasts < 6) { - _nextActivation = module.WorldState.CurrentTime.AddSeconds(2.1); + _nextActivation = WorldState.FutureTime(2.1); } else { @@ -188,25 +179,13 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } -class StormWithout : Components.SelfTargetedAOEs -{ - public StormWithout() : base(ActionID.MakeSpell(AID.StormWithout), new AOEShapeDonut(10, 40)) { } -} +class StormWithout(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.StormWithout), new AOEShapeDonut(10, 40)); -class StormWithin : Components.SelfTargetedAOEs -{ - public StormWithin() : base(ActionID.MakeSpell(AID.StormWithin), new AOEShapeCircle(10)) { } -} +class StormWithin(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.StormWithin), new AOEShapeCircle(10)); -class AncientGlacier : Components.LocationTargetedAOEs -{ - public AncientGlacier() : base(ActionID.MakeSpell(AID.AncientGlacierAOE), 6) { } -} +class AncientGlacier(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.AncientGlacierAOE), 6); -class Glaciation : Components.RaidwideCast -{ - public Glaciation() : base(ActionID.MakeSpell(AID.Glaciation)) { } -} +class Glaciation(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.Glaciation)); class CE54NeverCryWolfStates : StateMachineBuilder { diff --git a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE62LooksToDieFor.cs b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE62LooksToDieFor.cs index 64ca4b7e52..a59c75912a 100644 --- a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE62LooksToDieFor.cs +++ b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE62LooksToDieFor.cs @@ -38,10 +38,7 @@ public enum AID : uint Deathwall = 24711, // Helper->self, no cast, range 20-30 donut } -class Thundercall : Components.RaidwideCast -{ - public Thundercall() : base(ActionID.MakeSpell(AID.Thundercall), "Raidwide + summon lighting orbs") { } -} +class Thundercall(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.Thundercall), "Raidwide + summon lighting orbs"); class LightningBoltDistantClap : Components.GenericAOEs { @@ -50,21 +47,21 @@ class LightningBoltDistantClap : Components.GenericAOEs private static readonly AOEShapeCircle _shapeBolt = new(4); private static readonly AOEShapeDonut _shapeClap = new(4, 10); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => _aoes; + public override IEnumerable ActiveAOEs(int slot, Actor actor) => _aoes; - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.LightningBoltAOE) _aoes.Add(new(_shapeBolt, spell.LocXZ, spell.Rotation, spell.NPCFinishAt)); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { case AID.LightningBoltAOE: if (_aoes.FindIndex(a => a.Origin.AlmostEqual(spell.TargetXZ, 1)) is var index && index >= 0) - _aoes[index] = new(_shapeClap, spell.TargetXZ, activation: module.WorldState.CurrentTime.AddSeconds(6.1f)); + _aoes[index] = new(_shapeClap, spell.TargetXZ, activation: WorldState.FutureTime(6.1f)); break; case AID.DistantClap: _aoes.RemoveAll(a => a.Origin.AlmostEqual(caster.Position, 1)); @@ -73,16 +70,13 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } -class TwistingWinds : Components.SelfTargetedAOEs -{ - public TwistingWinds() : base(ActionID.MakeSpell(AID.TwistingWinds), new AOEShapeRect(40, 5, 40)) { } -} +class TwistingWinds(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TwistingWinds), new AOEShapeRect(40, 5, 40)); class CloudToGround : Components.Exaflare { public CloudToGround() : base(5) { } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.CloudToGroundFirst) { @@ -90,14 +84,14 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.CloudToGroundFirst or AID.CloudToGroundRest) { int index = Lines.FindIndex(item => item.Next.AlmostEqual(caster.Position, 1)); if (index == -1) { - module.ReportError(this, $"Failed to find entry for {caster.InstanceID:X}"); + ReportError($"Failed to find entry for {caster.InstanceID:X}"); return; } @@ -108,10 +102,7 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } -class Flame : Components.RaidwideCast -{ - public Flame() : base(ActionID.MakeSpell(AID.Flame), "Raidwide + summon flame orbs") { } -} +class Flame(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.Flame), "Raidwide + summon flame orbs"); class Burn : Components.GenericAOEs { @@ -120,7 +111,7 @@ class Burn : Components.GenericAOEs private static readonly AOEShapeCircle _shape = new(8); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { var deadline = new DateTime(); foreach (var c in _casters) @@ -139,50 +130,32 @@ public override void Init(BossModule module) _flames = module.Enemies(OID.BallOfFire); } - public override void Update(BossModule module) + public override void Update() { foreach (var f in _flames.Where(f => f.ModelState.AnimState1 == 1 && _casters.FindIndex(c => c.actor == f) < 0)) { - _casters.Add((f, new (_shape, f.Position, activation: module.WorldState.CurrentTime.AddSeconds(5)))); + _casters.Add((f, new (_shape, f.Position, activation: WorldState.FutureTime(5)))); } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.Burn && _casters.FindIndex(f => f.actor == caster) is var index && index >= 0) _casters[index] = (caster, null); } } -class Forelash : Components.SelfTargetedAOEs -{ - public Forelash() : base(ActionID.MakeSpell(AID.Forelash), new AOEShapeCone(40, 90.Degrees())) { } -} +class Forelash(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Forelash), new AOEShapeCone(40, 90.Degrees())); -class Backlash : Components.SelfTargetedAOEs -{ - public Backlash() : base(ActionID.MakeSpell(AID.Backlash), new AOEShapeCone(40, 90.Degrees())) { } -} +class Backlash(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Backlash), new AOEShapeCone(40, 90.Degrees())); -class Charybdis : Components.CastHint -{ - public Charybdis() : base(ActionID.MakeSpell(AID.Charybdis), "Set hp to 1") { } -} +class Charybdis(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.Charybdis), "Set hp to 1"); -class Roar : Components.RaidwideCast -{ - public Roar() : base(ActionID.MakeSpell(AID.Roar)) { } -} +class Roar(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.Roar)); -class Levinbolt : Components.SpreadFromCastTargets -{ - public Levinbolt() : base(ActionID.MakeSpell(AID.LevinboltAOE), 6) { } -} +class Levinbolt(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.LevinboltAOE), 6); -class SerpentsEdge : Components.SingleTargetCast -{ - public SerpentsEdge() : base(ActionID.MakeSpell(AID.SerpentsEdge)) { } -} +class SerpentsEdge(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.SerpentsEdge)); class CE62LooksToDieForStates : StateMachineBuilder { @@ -205,7 +178,4 @@ public CE62LooksToDieForStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.BozjaCE, GroupID = 778, NameID = 30)] // bnpcname=9925 -public class CE62LooksToDieFor : BossModule -{ - public CE62LooksToDieFor(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(-200, -580), 20)) { } -} +public class CE62LooksToDieFor(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(-200, -580), 20)); diff --git a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE63WornToShadow.cs b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE63WornToShadow.cs index f59c0305a1..2fa073b39b 100644 --- a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE63WornToShadow.cs +++ b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE63WornToShadow.cs @@ -48,48 +48,39 @@ class Stormcall : Components.GenericAOEs public Stormcall() : base(ActionID.MakeSpell(AID.Explosion)) { } - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { return _sources.Take(2).Select(e => new AOEInstance(_shape, e.dest, activation: e.activation)); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.OrbMovement) { - var dest = module.Bounds.Center + 29 * (actor.Position - module.Bounds.Center).Normalized(); - _sources.Add((actor, dest, module.WorldState.CurrentTime.AddSeconds(status.Extra == 0x1E ? 9.7 : 19.9))); + var dest = Module.Bounds.Center + 29 * (actor.Position - Module.Bounds.Center).Normalized(); + _sources.Add((actor, dest, WorldState.FutureTime(status.Extra == 0x1E ? 9.7 : 19.9))); _sources.SortBy(e => e.activation); } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction && _sources.FindIndex(e => e.source == caster) is var index && index >= 0) _sources[index] = (caster, caster.Position, spell.NPCFinishAt); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) _sources.RemoveAll(e => e.source == caster); } } -class BladedBeak : Components.SingleTargetCast -{ - public BladedBeak() : base(ActionID.MakeSpell(AID.BladedBeak)) { } -} +class BladedBeak(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.BladedBeak)); -class NihilitysSong : Components.RaidwideCast -{ - public NihilitysSong() : base(ActionID.MakeSpell(AID.NihilitysSong)) { } -} +class NihilitysSong(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.NihilitysSong)); -class Fantod : Components.LocationTargetedAOEs -{ - public Fantod() : base(ActionID.MakeSpell(AID.FantodAOE), 3) { } -} +class Fantod(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.FantodAOE), 3); class Foreshadowing : Components.GenericAOEs { @@ -101,10 +92,10 @@ class Foreshadowing : Components.GenericAOEs private static readonly AOEShapeCone _shapeStorm = new(36, 65.Degrees()); private static readonly AOEShapeCircle _shapeGust = new(20); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_bossAOE != null) - yield return new(_bossAOE, module.PrimaryActor.Position, module.PrimaryActor.CastInfo!.Rotation, module.PrimaryActor.CastInfo.NPCFinishAt); + yield return new(_bossAOE, Module.PrimaryActor.Position, Module.PrimaryActor.CastInfo!.Rotation, Module.PrimaryActor.CastInfo.NPCFinishAt); if (_addActivation != default) foreach (var add in _addAOEs) @@ -112,7 +103,7 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, yield return new(add.shape, add.caster.Position, add.caster.CastInfo?.Rotation ?? add.caster.Rotation, add.caster.CastInfo?.NPCFinishAt ?? _addActivation); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { @@ -131,7 +122,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { @@ -140,7 +131,7 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn case AID.PainfulGust: _bossAOE = null; if (_addAOEs.Count == 4) - _addActivation = module.WorldState.CurrentTime.AddSeconds(11.1f); + _addActivation = WorldState.FutureTime(11.1f); break; case AID.ForeshadowingPulse: case AID.ForeshadowingStorm: @@ -174,7 +165,4 @@ public CE63WornToShadowStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.BozjaCE, GroupID = 778, NameID = 28)] // bnpcname=9973 -public class CE63WornToShadow : BossModule -{ - public CE63WornToShadow(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(-480, -690), 30)) { } -} +public class CE63WornToShadow(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(-480, -690), 30)); diff --git a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE64FeelingTheBurn.cs b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE64FeelingTheBurn.cs index 49765df563..84da742a68 100644 --- a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE64FeelingTheBurn.cs +++ b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE64FeelingTheBurn.cs @@ -43,10 +43,7 @@ public enum IconID : uint ChainCannon = 164, // player } -class DiveFormation : Components.SelfTargetedAOEs -{ - public DiveFormation() : base(ActionID.MakeSpell(AID.DiveFormation), new AOEShapeRect(60, 3)) { } -} +class DiveFormation(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.DiveFormation), new AOEShapeRect(60, 3)); class AntiPersonnelMissile : Components.GenericAOEs { @@ -55,19 +52,19 @@ class AntiPersonnelMissile : Components.GenericAOEs public AntiPersonnelMissile() : base(ActionID.MakeSpell(AID.BallisticImpact)) { } - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { return _positions.Take(2).Select(p => new AOEInstance(_shape, p)); } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { // TODO: activation time (icon pairs are ~3s apart, but explosion pairs are ~2.6s apart; first explosion is ~2.1s after visual cast end) if ((IconID)iconID == IconID.BallisticImpact) _positions.Add(actor.Position); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if (spell.Action == WatchedAction && _positions.Count > 0) _positions.RemoveAt(0); @@ -79,24 +76,24 @@ class ChainCannonEscort : Components.GenericAOEs private readonly List<(Actor caster, int numCasts, DateTime activation)> _casters = []; private static readonly AOEShapeRect _shape = new(60, 2.5f); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { return _casters.Where(c => !IsTrackingPlayer(c, actor)).Select(c => new AOEInstance(_shape, c.caster.Position, c.caster.Rotation, c.activation)); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (var c in _casters.Where(c => IsTrackingPlayer(c, pc))) _shape.Outline(arena, c.caster); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Tracking) _casters.Add((actor, 0, status.ExpireAt)); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.ChainCannonEscortAOE) { @@ -107,7 +104,7 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent if (numCasts >= 6) _casters.RemoveAt(index); else - _casters[index] = (_casters[index].caster, numCasts, module.WorldState.CurrentTime.AddSeconds(1)); + _casters[index] = (_casters[index].caster, numCasts, WorldState.FutureTime(1)); } } } @@ -120,15 +117,15 @@ class ChainCannonBoss : Components.GenericAOEs private AOEInstance? _instance; private static readonly AOEShapeRect _shape = new(60, 2.5f); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => Utils.ZeroOrOne(_instance); + public override IEnumerable ActiveAOEs(int slot, Actor actor) => Utils.ZeroOrOne(_instance); - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.ChainCannonBoss) _instance = new(_shape, caster.Position, spell.Rotation, spell.NPCFinishAt.AddSeconds(1)); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.ChainCannonBossAOE) { @@ -139,31 +136,19 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } else { - _instance = new(_shape, caster.Position, caster.Rotation, module.WorldState.CurrentTime.AddSeconds(1)); + _instance = new(_shape, caster.Position, caster.Rotation, WorldState.FutureTime(1)); } } } } -class SurfaceMissile : Components.LocationTargetedAOEs -{ - public SurfaceMissile() : base(ActionID.MakeSpell(AID.SurfaceMissileAOE), 6) { } -} +class SurfaceMissile(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.SurfaceMissileAOE), 6); -class SuppressiveMagitekRays : Components.RaidwideCast -{ - public SuppressiveMagitekRays() : base(ActionID.MakeSpell(AID.SuppressiveMagitekRays)) { } -} +class SuppressiveMagitekRays(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.SuppressiveMagitekRays)); -class Analysis : Components.CastHint -{ - public Analysis() : base(ActionID.MakeSpell(AID.Analysis), "Face open weakpoint to charging adds") { } -} +class Analysis(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.Analysis), "Face open weakpoint to charging adds"); -class PreciseStrike : Components.CastWeakpoint -{ - public PreciseStrike() : base(ActionID.MakeSpell(AID.PreciseStrike), new AOEShapeRect(60, 3), (uint)SID.FrontUnseen, (uint)SID.BackUnseen, 0, 0) { } -} +class PreciseStrike(BossModule module) : Components.CastWeakpoint(module, ActionID.MakeSpell(AID.PreciseStrike), new AOEShapeRect(60, 3), (uint)SID.FrontUnseen, (uint)SID.BackUnseen, 0, 0); class CE64FeelingTheBurnStates : StateMachineBuilder { diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/ActOfMercy.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/ActOfMercy.cs index a09a63cf07..6f67932316 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/ActOfMercy.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/ActOfMercy.cs @@ -7,10 +7,10 @@ class ActOfMercy : Components.GenericAOEs public ActOfMercy() : base(ActionID.MakeSpell(AID.ActOfMercy)) { } - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { - yield return new(_shape, module.PrimaryActor.Position, module.PrimaryActor.Rotation, _activation); + yield return new(_shape, Module.PrimaryActor.Position, Module.PrimaryActor.Rotation, _activation); } - public override void Init(BossModule module) => _activation = module.WorldState.CurrentTime.AddSeconds(7.6f); // from verdant path cast start + public override void Init(BossModule module) => _activation = WorldState.FutureTime(7.6f); // from verdant path cast start } diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/BalefulBlade.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/BalefulBlade.cs index 9c57e73573..f2cf34de2e 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/BalefulBlade.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/BalefulBlade.cs @@ -7,22 +7,22 @@ class BalefulBlade : BossComponent private static readonly AOEShapeCone _shapeFront = new(DRS1.BarricadeRadius, 22.5f.Degrees()); private static readonly AOEShapeDonutSector _shapeBehind = new(DRS1.BarricadeRadius, 30, 22.5f.Degrees()); - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { hints.Add(_phantomEdge ? "Stay in front of barricade!" : "Hide behind barricade!", !IsSafe(module, actor)); } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { AOEShape shape = _phantomEdge ? _shapeFront : _shapeBehind; for (int i = 0; i < 4; ++i) { var center = (45 + i * 90).Degrees(); - shape.Draw(arena, module.Bounds.Center, center, ArenaColor.SafeFromAOE); + shape.Draw(arena, Module.Bounds.Center, center, ArenaColor.SafeFromAOE); } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.BalefulBlade2) _phantomEdge = true; @@ -30,7 +30,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf public bool IsSafe(BossModule module, Actor actor) { - var offset = actor.Position - module.Bounds.Center; + var offset = actor.Position - Module.Bounds.Center; var angle = Angle.FromDirection(offset).Rad; // 4 barricades to check, at +-45 and +-135 angle = Math.Abs(angle); // fold around z axis, leaving two barricades to check - at 45 and 135 angle = Math.Abs(angle - 90.Degrees().Rad); // rotate and fold again, leaving one barricade at 45 +- 22.5 diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/BalefulFirestorm.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/BalefulFirestorm.cs index b2bdc7152e..cd5b8e47cf 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/BalefulFirestorm.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/BalefulFirestorm.cs @@ -6,18 +6,18 @@ class BalefulFirestorm : Components.GenericAOEs private List<(Actor caster, AOEInstance aoe)> _casters = new(); private static readonly AOEShapeRect _shape = new(50, 10); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { return _casters.Take(3).Select(c => c.aoe); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { case AID.BalefulComet: var delay = 7.6f + _casters.Count * 1.0f; - _casters.Add((caster, new(_shape, caster.Position, caster.Rotation, module.WorldState.CurrentTime.AddSeconds(delay)))); + _casters.Add((caster, new(_shape, caster.Position, caster.Rotation, WorldState.FutureTime(delay)))); break; case AID.BalefulFirestorm: _casters.RemoveAll(c => c.caster == caster); diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/BalefulSwathe.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/BalefulSwathe.cs index 185fa93b17..0092b8fd2f 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/BalefulSwathe.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/BalefulSwathe.cs @@ -7,11 +7,11 @@ class BalefulSwathe : Components.GenericAOEs public BalefulSwathe() : base(ActionID.MakeSpell(AID.BalefulSwathe)) { } - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { - yield return new(_shape, module.PrimaryActor.Position, module.PrimaryActor.Rotation + 90.Degrees(), _activation); - yield return new(_shape, module.PrimaryActor.Position, module.PrimaryActor.Rotation - 90.Degrees(), _activation); + yield return new(_shape, Module.PrimaryActor.Position, Module.PrimaryActor.Rotation + 90.Degrees(), _activation); + yield return new(_shape, Module.PrimaryActor.Position, Module.PrimaryActor.Rotation - 90.Degrees(), _activation); } - public override void Init(BossModule module) => _activation = module.WorldState.CurrentTime.AddSeconds(7.6f); // from verdant path cast start + public override void Init(BossModule module) => _activation = WorldState.FutureTime(7.6f); // from verdant path cast start } diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/DRS1.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/DRS1.cs index c0ae8f3cb4..3000bed02d 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/DRS1.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/DRS1.cs @@ -1,50 +1,23 @@ namespace BossMod.Shadowbringers.Foray.DelubrumReginae.DRS1TrinitySeeker; -class VerdantTempest : Components.CastCounter -{ - public VerdantTempest() : base(ActionID.MakeSpell(AID.VerdantTempestAOE)) { } -} +class VerdantTempest(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.VerdantTempestAOE)); -class MercifulBreeze : Components.SelfTargetedAOEs -{ - public MercifulBreeze() : base(ActionID.MakeSpell(AID.MercifulBreeze), new AOEShapeRect(50, 2.5f)) { } -} +class MercifulBreeze(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.MercifulBreeze), new AOEShapeRect(50, 2.5f)); -class MercifulBlooms : Components.SelfTargetedAOEs -{ - public MercifulBlooms() : base(ActionID.MakeSpell(AID.MercifulBlooms), new AOEShapeCircle(20)) { } -} +class MercifulBlooms(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.MercifulBlooms), new AOEShapeCircle(20)); -class MercifulArc : Components.BaitAwayIcon -{ - public MercifulArc() : base(new AOEShapeCone(12, 45.Degrees()), (uint)IconID.MercifulArc, ActionID.MakeSpell(AID.MercifulArc)) { } // TODO: verify angle -} +class MercifulArc(BossModule module) : Components.BaitAwayIcon(module, new AOEShapeCone(12, 45.Degrees()), (uint)IconID.MercifulArc, ActionID.MakeSpell(AID.MercifulArc)); // TODO: verify angle // TODO: depending on phantom edge, it's either a shared tankbuster cleave or a weird cleave ignoring closest target (?) -class BalefulOnslaught1 : Components.Cleave -{ - public BalefulOnslaught1() : base(ActionID.MakeSpell(AID.BalefulOnslaughtAOE1), new AOEShapeCone(10, 45.Degrees())) { } // TODO: verify angle -} -class BalefulOnslaught2 : Components.Cleave -{ - public BalefulOnslaught2() : base(ActionID.MakeSpell(AID.BalefulOnslaughtAOE2), new AOEShapeCone(10, 45.Degrees())) { } // TODO: verify angle -} +class BalefulOnslaught1(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.BalefulOnslaughtAOE1), new AOEShapeCone(10, 45.Degrees())); // TODO: verify angle +class BalefulOnslaught2(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.BalefulOnslaughtAOE2), new AOEShapeCone(10, 45.Degrees())); // TODO: verify angle -class BurningChains : Components.Chains -{ - public BurningChains() : base((uint)TetherID.BurningChains, ActionID.MakeSpell(AID.ScorchingShackle)) { } -} +class BurningChains(BossModule module) : Components.Chains(module, (uint)TetherID.BurningChains, ActionID.MakeSpell(AID.ScorchingShackle)); // TODO: it's a line stack, but I don't think there's a way to determine cast target - so everyone should just stack?.. -class IronImpact : Components.CastCounter -{ - public IronImpact() : base(ActionID.MakeSpell(AID.IronImpact)) { } -} +class IronImpact(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.IronImpact)); -class IronRose : Components.SelfTargetedAOEs -{ - public IronRose() : base(ActionID.MakeSpell(AID.IronRose), new AOEShapeRect(50, 4)) { } -} +class IronRose(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.IronRose), new AOEShapeRect(50, 4)); class DeadIron : Components.BaitAwayTethers { diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/DRS1States.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/DRS1States.cs index 82003333db..9f785cead9 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/DRS1States.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/DRS1States.cs @@ -7,13 +7,13 @@ class DRS1States : StateMachineBuilder public DRS1States(BossModule module) : base(module) { SimplePhase(0, Phase1, "P1") - .Raw.Update = () => module.PrimaryActor.IsDestroyed || module.PrimaryActor.HP.Cur <= 1 || (module.PrimaryActor.CastInfo?.IsSpell(AID.VerdantPathSword) ?? false); + .Raw.Update = () => Module.PrimaryActor.IsDestroyed || Module.PrimaryActor.HP.Cur <= 1 || (Module.PrimaryActor.CastInfo?.IsSpell(AID.VerdantPathSword) ?? false); SimplePhase(1, Phase2, "P2") - .Raw.Update = () => module.PrimaryActor.IsDestroyed || module.PrimaryActor.HP.Cur <= 1 || (module.PrimaryActor.CastInfo?.IsSpell(AID.VerdantPathFist) ?? false); + .Raw.Update = () => Module.PrimaryActor.IsDestroyed || Module.PrimaryActor.HP.Cur <= 1 || (Module.PrimaryActor.CastInfo?.IsSpell(AID.VerdantPathFist) ?? false); SimplePhase(2, Phase3, "P3") - .Raw.Update = () => module.PrimaryActor.IsDestroyed || module.PrimaryActor.HP.Cur <= 1 || (module.PrimaryActor.CastInfo?.IsSpell(AID.VerdantPathKatana) ?? false); + .Raw.Update = () => Module.PrimaryActor.IsDestroyed || Module.PrimaryActor.HP.Cur <= 1 || (Module.PrimaryActor.CastInfo?.IsSpell(AID.VerdantPathKatana) ?? false); SimplePhase(3, Phase4, "P4") - .Raw.Update = () => module.PrimaryActor.IsDestroyed || module.PrimaryActor.HP.Cur <= 1; + .Raw.Update = () => Module.PrimaryActor.IsDestroyed || Module.PrimaryActor.HP.Cur <= 1; } private void Phase1(uint id) diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/IronSplitter.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/IronSplitter.cs index 8023f4cda4..ef79ed976c 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/IronSplitter.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/IronSplitter.cs @@ -6,29 +6,29 @@ class IronSplitter : Components.GenericAOEs public IronSplitter() : base(ActionID.MakeSpell(AID.IronSplitter)) { } - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => _aoes; + public override IEnumerable ActiveAOEs(int slot, Actor actor) => _aoes; - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) { - var distance = (caster.Position - module.Bounds.Center).Length(); + var distance = (caster.Position - Module.Bounds.Center).Length(); if (distance is <3 or >9 and <11 or >17 and <19) // tiles { - _aoes.Add(new(new AOEShapeCircle(4), module.Bounds.Center, new(), spell.NPCFinishAt)); - _aoes.Add(new(new AOEShapeDonut(8, 12), module.Bounds.Center, new(), spell.NPCFinishAt)); - _aoes.Add(new(new AOEShapeDonut(16, 20), module.Bounds.Center, new(), spell.NPCFinishAt)); + _aoes.Add(new(new AOEShapeCircle(4), Module.Bounds.Center, new(), spell.NPCFinishAt)); + _aoes.Add(new(new AOEShapeDonut(8, 12), Module.Bounds.Center, new(), spell.NPCFinishAt)); + _aoes.Add(new(new AOEShapeDonut(16, 20), Module.Bounds.Center, new(), spell.NPCFinishAt)); } else { - _aoes.Add(new(new AOEShapeDonut(4, 8), module.Bounds.Center, new(), spell.NPCFinishAt)); - _aoes.Add(new(new AOEShapeDonut(12, 16), module.Bounds.Center, new(), spell.NPCFinishAt)); - _aoes.Add(new(new AOEShapeDonut(20, 25), module.Bounds.Center, new(), spell.NPCFinishAt)); + _aoes.Add(new(new AOEShapeDonut(4, 8), Module.Bounds.Center, new(), spell.NPCFinishAt)); + _aoes.Add(new(new AOEShapeDonut(12, 16), Module.Bounds.Center, new(), spell.NPCFinishAt)); + _aoes.Add(new(new AOEShapeDonut(20, 25), Module.Bounds.Center, new(), spell.NPCFinishAt)); } } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) { diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/MercifulMoon.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/MercifulMoon.cs index 1e223ded57..2973311d25 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/MercifulMoon.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/MercifulMoon.cs @@ -6,11 +6,11 @@ class MercifulMoon : Components.GenericGaze public MercifulMoon() : base(ActionID.MakeSpell(AID.MercifulMoon)) { } - public override IEnumerable ActiveEyes(BossModule module, int slot, Actor actor) => Utils.ZeroOrOne(_eye); + public override IEnumerable ActiveEyes(int slot, Actor actor) => Utils.ZeroOrOne(_eye); - public override void Update(BossModule module) + public override void Update() { if (_eye == null && module.Enemies(OID.AetherialOrb).FirstOrDefault() is var orb && orb != null) - _eye = new(orb.Position, module.WorldState.CurrentTime.AddSeconds(5.8f)); // time from spawn to cast + _eye = new(orb.Position, WorldState.FutureTime(5.8f)); // time from spawn to cast } } diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/MercyFourfold.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/MercyFourfold.cs index 2cde3127f7..a2a3b5b456 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/MercyFourfold.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/MercyFourfold.cs @@ -9,7 +9,7 @@ class MercyFourfold : Components.GenericAOEs public MercyFourfold() : base(ActionID.MakeSpell(AID.MercyFourfoldAOE)) { } - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (AOEs.Count > 0) yield return AOEs[0]; @@ -17,7 +17,7 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, yield return _safezones[0]!.Value; } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID != SID.Mercy) return; @@ -45,10 +45,10 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st } var activationDelay = 15 - 1.3f * AOEs.Count; - AOEs.Add(new(_shapeAOE, actor.Position, dir, module.WorldState.CurrentTime.AddSeconds(activationDelay))); + AOEs.Add(new(_shapeAOE, actor.Position, dir, WorldState.FutureTime(activationDelay))); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { base.OnEventCast(module, caster, spell); if (spell.Action == WatchedAction) diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS2StygimolochWarrior/DRS2.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS2StygimolochWarrior/DRS2.cs index 39b3ebbdae..5be5820fee 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS2StygimolochWarrior/DRS2.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS2StygimolochWarrior/DRS2.cs @@ -1,22 +1,10 @@ namespace BossMod.Shadowbringers.Foray.DelubrumReginae.DRS2StygimolochWarrior; -class ViciousSwipe : Components.SelfTargetedAOEs -{ - public ViciousSwipe() : base(ActionID.MakeSpell(AID.ViciousSwipe), new AOEShapeCircle(15)) { } -} +class ViciousSwipe(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ViciousSwipe), new AOEShapeCircle(15)); -class CrazedRampage : Components.KnockbackFromCastTarget -{ - public CrazedRampage() : base(ActionID.MakeSpell(AID.CrazedRampage), 13) { } -} +class CrazedRampage(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.CrazedRampage), 13); -class Coerce : Components.StatusDrivenForcedMarch -{ - public Coerce() : base(4, (uint)SID.ForwardMarch, (uint)SID.AboutFace, (uint)SID.LeftFace, (uint)SID.RightFace) { } -} +class Coerce(BossModule module) : Components.StatusDrivenForcedMarch(module, 4, (uint)SID.ForwardMarch, (uint)SID.AboutFace, (uint)SID.LeftFace, (uint)SID.RightFace); [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 761, NameID = 9754)] -public class DRS2 : BossModule -{ - public DRS2(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsSquare(new(-160, 78), 17.5f)) { } -} +public class DRS2(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsSquare(new(-160, 78), 17.5f)); diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS2StygimolochWarrior/Entrapment.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS2StygimolochWarrior/Entrapment.cs index e72b5a0444..f1554fc505 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS2StygimolochWarrior/Entrapment.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS2StygimolochWarrior/Entrapment.cs @@ -6,12 +6,12 @@ class EntrapmentAttract : Components.Knockback public EntrapmentAttract() : base(ActionID.MakeSpell(AID.EntrapmentAttract), true) { } - public override IEnumerable Sources(BossModule module, int slot, Actor actor) + public override IEnumerable Sources(int slot, Actor actor) { - yield return new(new(module.Bounds.Center.X, module.Bounds.Center.Z + module.Bounds.HalfSize), 60, _activation, Kind: Kind.TowardsOrigin); + yield return new(new(Module.Bounds.Center.X, Module.Bounds.Center.Z + Module.Bounds.HalfSize), 60, _activation, Kind: Kind.TowardsOrigin); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.Entrapment) _activation = spell.NPCFinishAt.AddSeconds(0.8f); @@ -47,7 +47,7 @@ public Entrapment(Pattern[] allowedPatterns) : base(ActionID.MakeSpell(AID.Massi UpdatePotentiallyUnsafe(); } - public override void Update(BossModule module) + public override void Update() { if (!_possiblePatternsDirty) return; @@ -56,11 +56,11 @@ public override void Update(BossModule module) // TODO: ideally it should not be done here, but when reacting to perception cast... // note that range check is a bit fuzzy - perception range is 15, i've seen traps at ~18.3 uncovered - but sometimes traps at presumably smaller range not uncovered // so we consider a very conservative range - var player = module.Raid.Player(); + var player = Raid.Player(); if (player != null) for (int z = 0; z < 7; ++z) for (int x = 0; x < 7; ++x) - if (player.Position.InCircle(module.Bounds.Center + CellOffset(x, z), 10)) + if (player.Position.InCircle(Module.Bounds.Center + CellOffset(x, z), 10)) _uncovered.Set(IndexFromCell(x, z)); // remove all patterns that have difference with current state in uncovered areas @@ -74,18 +74,18 @@ public override void Update(BossModule module) _possiblePatterns.Clear(ip); } if (_possiblePatterns.None()) - module.ReportError(this, "No matching patterns left..."); + ReportError("No matching patterns left..."); } UpdatePotentiallyUnsafe(); } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { hints.Add($"Matching patterns: {(_possiblePatterns.Any() ? string.Join(", ", _possiblePatterns.SetBits()): "none")}"); } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { DrawTraps(module, _curPattern.Normal, false, true, arena); DrawTraps(module, _curPattern.Toad, TrapToTake == TrapType.Toad, true, arena); @@ -93,7 +93,7 @@ public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc DrawTraps(module, _curPattern.Mini, TrapToTake == TrapType.Mini, true, arena); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { DrawTraps(module, _potentiallyUnsafe.Normal, false, false, arena); DrawTraps(module, _potentiallyUnsafe.Toad, TrapToTake == TrapType.Toad, false, arena); @@ -101,7 +101,7 @@ public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc DrawTraps(module, _potentiallyUnsafe.Mini, TrapToTake == TrapType.Mini, false, arena); } - public override void OnActorCreated(BossModule module, Actor actor) + public override void OnActorCreated(Actor actor) { switch ((OID)actor.OID) { @@ -120,7 +120,7 @@ public override void OnActorCreated(BossModule module, Actor actor) } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { @@ -141,8 +141,8 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent private void AddTrap(ref BitMask mask, BossModule module, WPos position, bool exploded) { - var index = IndexFromOffset(position - module.Bounds.Center); - //module.ReportError(this, $"Trap @ {position} (dist={(position - module.Raid.Player()!.Position).Length()}) = {index}"); + var index = IndexFromOffset(position - Module.Bounds.Center); + //ReportError($"Trap @ {position} (dist={(position - Raid.Player()!.Position).Length()}) = {index}"); mask.Set(index); _uncovered.Set(index); if (exploded) @@ -169,7 +169,7 @@ private void DrawTraps(BossModule module, BitMask mask, bool safe, bool backgrou mask &= ~_exploded; // don't draw already exploded traps foreach (var index in mask.SetBits()) { - var pos = module.Bounds.Center + CellOffset(index); + var pos = Module.Bounds.Center + CellOffset(index); if (background) arena.ZoneCircle(pos, 2.5f, safe ? ArenaColor.SafeFromAOE : ArenaColor.AOE); else @@ -239,7 +239,7 @@ class EntrapmentInescapable : Entrapment public EntrapmentInescapable() : base(_allowedPatterns) { } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { var trap = (AID)spell.Action.ID switch { @@ -253,17 +253,8 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } -class LethalBlow : Components.SelfTargetedAOEs -{ - public LethalBlow() : base(ActionID.MakeSpell(AID.LethalBlow), new AOEShapeRect(44, 24)) { } -} +class LethalBlow(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.LethalBlow), new AOEShapeRect(44, 24)); -class LeapingSpark : Components.CastCounter -{ - public LeapingSpark() : base(ActionID.MakeSpell(AID.LeapingSparkAOE)) { } -} +class LeapingSpark(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.LeapingSparkAOE)); -class Devour : Components.SelfTargetedAOEs -{ - public Devour() : base(ActionID.MakeSpell(AID.Devour), new AOEShapeCone(6, 60.Degrees())) { } -} +class Devour(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Devour), new AOEShapeCone(6, 60.Degrees())); diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS2StygimolochWarrior/FocusedTremor.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS2StygimolochWarrior/FocusedTremor.cs index d988fe5f3b..5e09d06ab6 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS2StygimolochWarrior/FocusedTremor.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS2StygimolochWarrior/FocusedTremor.cs @@ -1,14 +1,8 @@ namespace BossMod.Shadowbringers.Foray.DelubrumReginae.DRS2StygimolochWarrior; -class FocusedTremorLarge : Components.SelfTargetedAOEs -{ - public FocusedTremorLarge() : base(ActionID.MakeSpell(AID.FocusedTremorAOELarge), new AOEShapeRect(10, 10, 10), 2) { } -} +class FocusedTremorLarge(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.FocusedTremorAOELarge), new AOEShapeRect(10, 10, 10), 2); -class ForcefulStrike : Components.SelfTargetedAOEs -{ - public ForcefulStrike() : base(ActionID.MakeSpell(AID.ForcefulStrike), new AOEShapeRect(44, 24)) { } -} +class ForcefulStrike(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ForcefulStrike), new AOEShapeRect(44, 24)); // combined with flailing strike, first bait should be into first square class FocusedTremorSmall : Components.SelfTargetedAOEs @@ -27,16 +21,13 @@ public void Activate() } } -class FlailingStrikeBait : Components.BaitAwayTethers -{ - public FlailingStrikeBait() : base(new AOEShapeCone(40, 30.Degrees()), (uint)TetherID.FlailingStrike) { } -} +class FlailingStrikeBait(BossModule module) : Components.BaitAwayTethers(module, new AOEShapeCone(40, 30.Degrees()), (uint)TetherID.FlailingStrike); class FlailingStrike : Components.GenericRotatingAOE { private static readonly AOEShapeCone _shape = new(60, 30.Degrees()); - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.FlailingStrikeFirst) { @@ -44,11 +35,11 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.FlailingStrikeRest && Sequences.Count > 0) { - AdvanceSequence(0, module.WorldState.CurrentTime); + AdvanceSequence(0, WorldState.CurrentTime); } } } diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS2StygimolochWarrior/UnrelentingCharge.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS2StygimolochWarrior/UnrelentingCharge.cs index 7ae1291179..3dacd385e6 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS2StygimolochWarrior/UnrelentingCharge.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS2StygimolochWarrior/UnrelentingCharge.cs @@ -5,13 +5,13 @@ class UnrelentingCharge : Components.Knockback private Actor? _source; private DateTime _activation; - public override IEnumerable Sources(BossModule module, int slot, Actor actor) + public override IEnumerable Sources(int slot, Actor actor) { if (_source != null) yield return new(_source.Position, 10, _activation); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.UnrelentingCharge) { @@ -20,12 +20,12 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.UnrelentingChargeAOE) { ++NumCasts; - _activation = module.WorldState.CurrentTime.AddSeconds(1.6f); + _activation = WorldState.FutureTime(1.6f); } } } diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS3Dahu/DRS3.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS3Dahu/DRS3.cs index c1fbbe6bce..b60b10ca72 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS3Dahu/DRS3.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS3Dahu/DRS3.cs @@ -1,29 +1,14 @@ namespace BossMod.Shadowbringers.Foray.DelubrumReginae.DRS3Dahu; -class FallingRock : Components.LocationTargetedAOEs -{ - public FallingRock() : base(ActionID.MakeSpell(AID.FallingRock), 4) { } -} +class FallingRock(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.FallingRock), 4); -class HotCharge : Components.ChargeAOEs -{ - public HotCharge() : base(ActionID.MakeSpell(AID.HotCharge), 4) { } -} +class HotCharge(BossModule module) : Components.ChargeAOEs(module, ActionID.MakeSpell(AID.HotCharge), 4); -class Firebreathe : Components.SelfTargetedAOEs -{ - public Firebreathe() : base(ActionID.MakeSpell(AID.Firebreathe), new AOEShapeCone(60, 45.Degrees())) { } -} +class Firebreathe(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Firebreathe), new AOEShapeCone(60, 45.Degrees())); -class HeadDown : Components.ChargeAOEs -{ - public HeadDown() : base(ActionID.MakeSpell(AID.HeadDown), 2) { } -} +class HeadDown(BossModule module) : Components.ChargeAOEs(module, ActionID.MakeSpell(AID.HeadDown), 2); -class HuntersClaw : Components.SelfTargetedAOEs -{ - public HuntersClaw() : base(ActionID.MakeSpell(AID.HuntersClaw), new AOEShapeCircle(8)) { } -} +class HuntersClaw(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HuntersClaw), new AOEShapeCircle(8)); class Burn : Components.BaitAwayIcon { diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS3Dahu/FeralHowlHystericAssault.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS3Dahu/FeralHowlHystericAssault.cs index db1ba0ce2b..71fe3203fe 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS3Dahu/FeralHowlHystericAssault.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS3Dahu/FeralHowlHystericAssault.cs @@ -14,9 +14,9 @@ public FeralHowlHystericAssault(AID aidCast, AID aidAOE, float delay) : base(Act StopAtWall = true; // TODO: not all the wall is safe... } - public override IEnumerable Sources(BossModule module, int slot, Actor actor) => Utils.ZeroOrOne(_source); + public override IEnumerable Sources(int slot, Actor actor) => Utils.ZeroOrOne(_source); - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == _aidCast) _source = new(caster.Position, 30, spell.NPCFinishAt.AddSeconds(_delay)); diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS3Dahu/FirebreatheRotating.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS3Dahu/FirebreatheRotating.cs index 2f5770d399..1a32eaa771 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS3Dahu/FirebreatheRotating.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS3Dahu/FirebreatheRotating.cs @@ -6,7 +6,7 @@ class FirebreatheRotating : Components.GenericRotatingAOE private static readonly AOEShapeCone _shape = new(60, 45.Degrees()); - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.FirebreatheRotating) { @@ -14,15 +14,15 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.FirebreatheRotatingAOE && Sequences.Count > 0) { - AdvanceSequence(0, module.WorldState.CurrentTime); + AdvanceSequence(0, WorldState.CurrentTime); } } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { var angle = (IconID)iconID switch { diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS3Dahu/Shockwave.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS3Dahu/Shockwave.cs index 473e7d5d2e..afc4aed685 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS3Dahu/Shockwave.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS3Dahu/Shockwave.cs @@ -5,9 +5,9 @@ class Shockwave : Components.GenericAOEs private List _aoes = new(); private static readonly AOEShapeCone _shape = new(15, 90.Degrees()); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => _aoes.Take(1); + public override IEnumerable ActiveAOEs(int slot, Actor actor) => _aoes.Take(1); - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.LeftSidedShockwaveFirst or AID.RightSidedShockwaveFirst) { @@ -16,7 +16,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.LeftSidedShockwaveFirst or AID.RightSidedShockwaveFirst or AID.LeftSidedShockwaveSecond or AID.RightSidedShockwaveSecond && _aoes.Count > 0) _aoes.RemoveAt(0); diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS3Dahu/SpitFlame.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS3Dahu/SpitFlame.cs index e60b18938a..1ddde29f25 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS3Dahu/SpitFlame.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS3Dahu/SpitFlame.cs @@ -12,13 +12,13 @@ public override void Init(BossModule module) _adds = module.Enemies(OID.Marchosias); } - public override void Update(BossModule module) + public override void Update() { Spreads.RemoveAll(s => s.Target.IsDead); // if target dies after being marked, cast will be skipped base.Update(module); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { base.AddHints(module, slot, actor, hints, movementHints); if (Array.IndexOf(_targets, actor) is var order && order >= 0) @@ -29,13 +29,13 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { arena.Actors(_adds, ArenaColor.Object, true); base.DrawArenaForeground(module, pcSlot, pc, arena); } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { var order = (IconID)iconID switch { @@ -52,7 +52,7 @@ public override void OnEventIcon(BossModule module, Actor actor, uint iconID) } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.SpitFlameAOE) Spreads.RemoveAll(s => s.Target.InstanceID == spell.MainTargetID); diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS4QueensGuard/AboveBoard.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS4QueensGuard/AboveBoard.cs index a7c66845fa..19b597e54b 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS4QueensGuard/AboveBoard.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS4QueensGuard/AboveBoard.cs @@ -13,7 +13,7 @@ public enum State { Initial, ThrowUpDone, ShortExplosionsDone, LongExplosionsDon private static readonly AOEShapeCircle _shape = new(10); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { var imminentBombs = AreBigBombsDangerous(slot) ? _bigBombs : _smallBombs; return imminentBombs.Select(b => new AOEInstance(_shape, b.Position, new(), _activation)); @@ -23,10 +23,10 @@ public override void Init(BossModule module) { _smallBombs = module.Enemies(OID.AetherialBolt); _bigBombs = module.Enemies(OID.AetherialBurst); - _activation = module.WorldState.CurrentTime.AddSeconds(12); + _activation = WorldState.FutureTime(12); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { switch ((SID)status.ID) { @@ -34,7 +34,7 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st if ((OID)actor.OID is OID.AetherialBolt or OID.AetherialBurst) _invertedBombs = true; else - _invertedPlayers.Set(module.Raid.FindSlot(actor.InstanceID)); + _invertedPlayers.Set(Raid.FindSlot(actor.InstanceID)); break; case SID.AboveBoardPlayerLong: case SID.AboveBoardPlayerShort: @@ -45,7 +45,7 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { @@ -55,7 +55,7 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent break; case AID.LotsCastLong: AdvanceState(State.LongExplosionsDone); - _activation = module.WorldState.CurrentTime.AddSeconds(4.2f); + _activation = WorldState.FutureTime(4.2f); break; } } diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS4QueensGuard/CoatOfArms.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS4QueensGuard/CoatOfArms.cs index 95ec040bc3..5afc4ea53c 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS4QueensGuard/CoatOfArms.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS4QueensGuard/CoatOfArms.cs @@ -4,7 +4,7 @@ class CoatOfArms : Components.DirectionalParry { public CoatOfArms() : base((uint)OID.AetherialWard) { } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { var sides = (AID)spell.Action.ID switch { diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS4QueensGuard/DRS4.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS4QueensGuard/DRS4.cs index 189a5764e0..d95e1d4b6c 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS4QueensGuard/DRS4.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS4QueensGuard/DRS4.cs @@ -1,51 +1,24 @@ namespace BossMod.Shadowbringers.Foray.DelubrumReginae.DRS4QueensGuard; -class OptimalPlaySword : Components.SelfTargetedAOEs -{ - public OptimalPlaySword() : base(ActionID.MakeSpell(AID.OptimalPlaySword), new AOEShapeCircle(10)) { } -} +class OptimalPlaySword(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.OptimalPlaySword), new AOEShapeCircle(10)); -class OptimalPlayShield : Components.SelfTargetedAOEs -{ - public OptimalPlayShield() : base(ActionID.MakeSpell(AID.OptimalPlayShield), new AOEShapeDonut(5, 60)) { } -} +class OptimalPlayShield(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.OptimalPlayShield), new AOEShapeDonut(5, 60)); -class OptimalPlayCone : Components.SelfTargetedAOEs -{ - public OptimalPlayCone() : base(ActionID.MakeSpell(AID.OptimalPlayCone), new AOEShapeCone(60, 135.Degrees())) { } -} +class OptimalPlayCone(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.OptimalPlayCone), new AOEShapeCone(60, 135.Degrees())); // note: apparently there is no 'front unseen' status -class QueensShotUnseen : Components.CastWeakpoint -{ - public QueensShotUnseen() : base(ActionID.MakeSpell(AID.QueensShotUnseen), new AOEShapeCircle(60), 0, (uint)SID.BackUnseen, (uint)SID.LeftUnseen, (uint)SID.RightUnseen) { } -} +class QueensShotUnseen(BossModule module) : Components.CastWeakpoint(module, ActionID.MakeSpell(AID.QueensShotUnseen), new AOEShapeCircle(60), 0, (uint)SID.BackUnseen, (uint)SID.LeftUnseen, (uint)SID.RightUnseen); -class TurretsTourUnseen : Components.CastWeakpoint -{ - public TurretsTourUnseen() : base(ActionID.MakeSpell(AID.TurretsTourUnseen), new AOEShapeRect(50, 2.5f), 0, (uint)SID.BackUnseen, (uint)SID.LeftUnseen, (uint)SID.RightUnseen) { } -} +class TurretsTourUnseen(BossModule module) : Components.CastWeakpoint(module, ActionID.MakeSpell(AID.TurretsTourUnseen), new AOEShapeRect(50, 2.5f), 0, (uint)SID.BackUnseen, (uint)SID.LeftUnseen, (uint)SID.RightUnseen); -class FieryPortent : Components.CastHint -{ - public FieryPortent() : base(ActionID.MakeSpell(AID.FieryPortent), "Stand still!") { } -} +class FieryPortent(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.FieryPortent), "Stand still!"); -class IcyPortent : Components.CastHint -{ - public IcyPortent() : base(ActionID.MakeSpell(AID.IcyPortent), "Move!") { } -} +class IcyPortent(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.IcyPortent), "Move!"); -class PawnOff : Components.SelfTargetedAOEs -{ - public PawnOff() : base(ActionID.MakeSpell(AID.PawnOffReal), new AOEShapeCircle(20)) { } -} +class PawnOff(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PawnOffReal), new AOEShapeCircle(20)); // TODO: consider showing reflect hints -class Fracture : Components.CastCounter -{ - public Fracture() : base(ActionID.MakeSpell(AID.Fracture)) { } -} +class Fracture(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.Fracture)); [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.Knight, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 761, NameID = 9838)] public class DRS4 : BossModule diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS4QueensGuard/GreatBallOfFire.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS4QueensGuard/GreatBallOfFire.cs index 1950d24108..3488fd5863 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS4QueensGuard/GreatBallOfFire.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS4QueensGuard/GreatBallOfFire.cs @@ -9,7 +9,7 @@ class GreatBallOfFire : Components.GenericAOEs private static readonly AOEShapeCircle _shapeSmall = new(10); private static readonly AOEShapeCircle _shapeBig = new(18); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { foreach (var f in _smallFlames) yield return new(_shapeSmall, f.Position, new(), f.CastInfo?.NPCFinishAt ?? _activation); @@ -21,10 +21,10 @@ public override void Init(BossModule module) { _smallFlames = module.Enemies(OID.RagingFlame); _bigFlames = module.Enemies(OID.ImmolatingFlame); - _activation = module.WorldState.CurrentTime.AddSeconds(6.6f); // TODO: this depends on when do we want to start showing hints... + _activation = WorldState.FutureTime(6.6f); // TODO: this depends on when do we want to start showing hints... } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.BurnSmall or AID.BurnBig) ++NumCasts; diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS4QueensGuard/OptimalOffensive.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS4QueensGuard/OptimalOffensive.cs index 62c8cd4e86..2269a781fc 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS4QueensGuard/OptimalOffensive.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS4QueensGuard/OptimalOffensive.cs @@ -1,40 +1,31 @@ namespace BossMod.Shadowbringers.Foray.DelubrumReginae.DRS4QueensGuard; -class OptimalOffensiveSword : Components.ChargeAOEs -{ - public OptimalOffensiveSword() : base(ActionID.MakeSpell(AID.OptimalOffensiveSword), 2.5f) { } -} +class OptimalOffensiveSword(BossModule module) : Components.ChargeAOEs(module, ActionID.MakeSpell(AID.OptimalOffensiveSword), 2.5f); -class OptimalOffensiveShield : Components.ChargeAOEs -{ - public OptimalOffensiveShield() : base(ActionID.MakeSpell(AID.OptimalOffensiveShield), 2.5f) { } -} +class OptimalOffensiveShield(BossModule module) : Components.ChargeAOEs(module, ActionID.MakeSpell(AID.OptimalOffensiveShield), 2.5f); // note: there are two casters (as usual in bozja content for raidwides) // TODO: not sure whether it ignores immunes, I assume so... -class OptimalOffensiveShieldKnockback : Components.KnockbackFromCastTarget -{ - public OptimalOffensiveShieldKnockback() : base(ActionID.MakeSpell(AID.OptimalOffensiveShieldKnockback), 10, true, 1) { } -} +class OptimalOffensiveShieldKnockback(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.OptimalOffensiveShieldKnockback), 10, true, 1); class UnluckyLot : Components.GenericAOEs { private AOEInstance? _aoe; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => Utils.ZeroOrOne(_aoe); + public override IEnumerable ActiveAOEs(int slot, Actor actor) => Utils.ZeroOrOne(_aoe); public override void Init(BossModule module) { - _aoe = new(new AOEShapeCircle(20), module.Bounds.Center, activation: module.WorldState.CurrentTime.AddSeconds(7.6)); + _aoe = new(new AOEShapeCircle(20), Module.Bounds.Center, activation: WorldState.FutureTime(7.6)); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.OptimalOffensiveShieldMoveSphere) - _aoe = new(new AOEShapeCircle(20), caster.Position, activation: module.WorldState.CurrentTime.AddSeconds(8.6)); + _aoe = new(new AOEShapeCircle(20), caster.Position, activation: WorldState.FutureTime(8.6)); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.UnluckyLot) _aoe = null; diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS4QueensGuard/SpellforgeSteelstingHint.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS4QueensGuard/SpellforgeSteelstingHint.cs index c63d4b31cc..7aed91084f 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS4QueensGuard/SpellforgeSteelstingHint.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS4QueensGuard/SpellforgeSteelstingHint.cs @@ -6,13 +6,13 @@ class SpellforgeSteelstingHint : BossComponent private string _hint = ""; public bool Active => _hint.Length > 0; - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (Active) hints.Add(_hint); } - public override void OnTethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnTethered(Actor source, ActorTetherInfo tether) { var hint = (TetherID)tether.ID switch { @@ -24,7 +24,7 @@ public override void OnTethered(BossModule module, Actor source, ActorTetherInfo _hint = hint; } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { if ((SID)status.ID is SID.PhysicalVulnerabilityDown or SID.MagicVulnerabilityDown) _hint = ""; diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS4QueensGuard/WindsOfWeight.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS4QueensGuard/WindsOfWeight.cs index d0bb595a1a..44bd8fe757 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS4QueensGuard/WindsOfWeight.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS4QueensGuard/WindsOfWeight.cs @@ -8,23 +8,23 @@ class WindsOfWeight : Components.GenericAOEs private static readonly AOEShapeCircle _shape = new(20); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { return (_invertedPlayers[slot] ? _purple : _green).Select(c => new AOEInstance(_shape, c.Position, c.CastInfo!.Rotation, c.CastInfo.NPCFinishAt)); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.ReversalOfForces) - _invertedPlayers.Set(module.Raid.FindSlot(actor.InstanceID)); + _invertedPlayers.Set(Raid.FindSlot(actor.InstanceID)); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { CasterList(spell)?.Add(caster); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { CasterList(spell)?.Remove(caster); } diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS5Phantom/DRS5.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS5Phantom/DRS5.cs index 3e8ac01205..81e2816609 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS5Phantom/DRS5.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS5Phantom/DRS5.cs @@ -1,22 +1,10 @@ namespace BossMod.Shadowbringers.Foray.DelubrumReginae.DRS5Phantom; -class MaledictionOfAgony : Components.CastCounter -{ - public MaledictionOfAgony() : base(ActionID.MakeSpell(AID.MaledictionOfAgonyAOE)) { } -} +class MaledictionOfAgony(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.MaledictionOfAgonyAOE)); -class BloodyWraith : Components.Adds -{ - public BloodyWraith() : base((uint)OID.BloodyWraith) { } -} +class BloodyWraith(BossModule module) : Components.Adds(module, (uint)OID.BloodyWraith); -class MistyWraith : Components.Adds -{ - public MistyWraith() : base((uint)OID.MistyWraith) { } -} +class MistyWraith(BossModule module) : Components.Adds(module, (uint)OID.MistyWraith); [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 761, NameID = 9755)] -public class DRS5 : BossModule -{ - public DRS5(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsSquare(new(202, -370), 24)) { } -} +public class DRS5(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsSquare(new(202, -370), 24)); diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS5Phantom/Miasma.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS5Phantom/Miasma.cs index f5b6165359..3a53a30650 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS5Phantom/Miasma.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS5Phantom/Miasma.cs @@ -21,7 +21,7 @@ public struct LaneState private static readonly AOEShapeCircle _shapeCircle = new(8); private static readonly AOEShapeDonut _shapeDonut = new(5, 19); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_order == Order.Unknown) yield break; @@ -38,13 +38,13 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, } } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (_order != Order.Unknown) hints.Add($"Order: {(_order == Order.HighLow ? "high > low" : "low > high")}"); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { var order = (AID)spell.Action.ID switch { @@ -56,7 +56,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf _order = order; } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { AOEShape? shape = (AID)spell.Action.ID switch { @@ -81,7 +81,7 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent ref var l = ref _laneStates[laneIndex, heightIndex]; if (l.Shape != shape || l.NumCasts != 0) { - module.ReportError(this, $"Unexpected state at first-cast end"); + ReportError($"Unexpected state at first-cast end"); } else { @@ -99,7 +99,7 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent ref var l = ref _laneStates[laneIndex, heightIndex]; if (l.Shape != shape) { - module.ReportError(this, $"Unexpected state at rest-cast end"); + ReportError($"Unexpected state at rest-cast end"); } else { @@ -123,10 +123,10 @@ public override void OnActorEAnim(BossModule module, Actor actor, uint state) return; int heightIndex = (OID)actor.OID is OID.MiasmaLowRect or OID.MiasmaLowCircle or OID.MiasmaLowDonut ? 0 : 1; int laneIndex = LaneIndex(module, actor.Position); - _laneStates[laneIndex, heightIndex] = new() { Shape = shape, Activation = module.WorldState.CurrentTime.AddSeconds(16.1f), NextOrigin = new(actor.Position.X, module.Bounds.Center.Z - module.Bounds.HalfSize + (shape == _shapeRect ? 0 : 5)) }; + _laneStates[laneIndex, heightIndex] = new() { Shape = shape, Activation = WorldState.FutureTime(16.1f), NextOrigin = new(actor.Position.X, Module.Bounds.Center.Z - Module.Bounds.HalfSize + (shape == _shapeRect ? 0 : 5)) }; } - private int LaneIndex(BossModule module, WPos pos) => (pos.X - module.Bounds.Center.X) switch + private int LaneIndex(BossModule module, WPos pos) => (pos.X - Module.Bounds.Center.X) switch { < -10 => 0, < 0 => 1, @@ -136,7 +136,7 @@ public override void OnActorEAnim(BossModule module, Actor actor, uint state) private void AdvanceLane(BossModule module, ref LaneState lane) { - lane.Activation = module.WorldState.CurrentTime.AddSeconds(1.6f); + lane.Activation = WorldState.FutureTime(1.6f); ++lane.NumCasts; if (lane.Shape == _shapeRect) { diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS6TrinityAvowed/AllegiantArsenal.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS6TrinityAvowed/AllegiantArsenal.cs index a6f372e564..cdff6476a5 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS6TrinityAvowed/AllegiantArsenal.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS6TrinityAvowed/AllegiantArsenal.cs @@ -14,13 +14,13 @@ public enum Order { Unknown, SwordSecond, BowSecond, StaffSecond, StaffSwordBow, private static readonly AOEShapeCone _shapeBow = new(70, 135.Degrees()); private static readonly AOEShapeCircle _shapeStaff = new(10); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_pendingAOE != null) - yield return new(_pendingAOE, module.PrimaryActor.Position, module.PrimaryActor.Rotation, _activation); + yield return new(_pendingAOE, Module.PrimaryActor.Position, Module.PrimaryActor.Rotation, _activation); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { @@ -54,7 +54,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.InfernalSlash or AID.Flashvane or AID.FuryOfBozja) _pendingAOE = null; diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS6TrinityAvowed/BladeOfEntropy.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS6TrinityAvowed/BladeOfEntropy.cs index 9b3ff49977..ef326e1aa2 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS6TrinityAvowed/BladeOfEntropy.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS6TrinityAvowed/BladeOfEntropy.cs @@ -7,14 +7,14 @@ class BladeOfEntropy : TemperatureAOE private static readonly AOEShapeRect _shapeCell = new(5, 5, 5); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { var playerTemp = Math.Clamp(Temperature(actor), -2, +2); for (int x = -2; x <= +2; ++x) { for (int z = -2; z <= +2; ++z) { - var cellCenter = module.Bounds.Center + 10 * new WDir(x, z); + var cellCenter = Module.Bounds.Center + 10 * new WDir(x, z); int temperature = 0; int numClips = 0; DateTime activation = new(); @@ -37,7 +37,7 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { @@ -60,7 +60,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.BladeOfEntropyAC11 or AID.BladeOfEntropyBC11 or AID.BladeOfEntropyAC21 or AID.BladeOfEntropyBC21 or AID.BladeOfEntropyAH11 or AID.BladeOfEntropyBH11 or AID.BladeOfEntropyAH21 or AID.BladeOfEntropyBH21) _casters.RemoveAll(c => c.caster == caster); diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS6TrinityAvowed/Bow.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS6TrinityAvowed/Bow.cs index 906cd5b6f4..4509c75bbe 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS6TrinityAvowed/Bow.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS6TrinityAvowed/Bow.cs @@ -11,15 +11,15 @@ public FlamesOfBozja(bool risky) : base(ActionID.MakeSpell(AID.FlamesOfBozjaAOE) _risky = risky; } - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => Utils.ZeroOrOne(AOE); + public override IEnumerable ActiveAOEs(int slot, Actor actor) => Utils.ZeroOrOne(AOE); - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) AOE = new(new AOEShapeRect(45, 25), caster.Position, spell.Rotation, spell.NPCFinishAt, risky: _risky); } - public override void OnEventEnvControl(BossModule module, byte index, uint state) + public override void OnEventEnvControl(byte index, uint state) { if (index is 0x12 or 0x13 && state == 0x00080004) // 12/13 for east/west AOE = null; @@ -50,7 +50,7 @@ public ShimmeringShot(float spawnToActivation) _spawnToActivation = spawnToActivation; } - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_arrowsInited.Raw != 0x1B) yield break; @@ -61,10 +61,10 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, var xOffset = _pattern is Pattern.EWNormal or Pattern.EWInverted ? -20 : +20; var zOffset = 10 * (cell - 2); - yield return new(_shapeCell, module.Bounds.Center + new WDir(xOffset, zOffset), new(), _activation, ArenaColor.SafeFromAOE, false); + yield return new(_shapeCell, Module.Bounds.Center + new WDir(xOffset, zOffset), new(), _activation, ArenaColor.SafeFromAOE, false); } - public override void Update(BossModule module) + public override void Update() { InitArrow(module, OID.SparkArrow, +1); InitArrow(module, OID.FlameArrow, +2); @@ -72,13 +72,13 @@ public override void Update(BossModule module) InitArrow(module, OID.GlacierArrow, -2); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.ChillArrow1 or AID.FreezingArrow1 or AID.HeatedArrow1 or AID.SearingArrow1 or AID.ChillArrow2 or AID.FreezingArrow2 or AID.HeatedArrow2 or AID.SearingArrow2) ++NumCasts; } - public override void OnEventEnvControl(BossModule module, byte index, uint state) + public override void OnEventEnvControl(byte index, uint state) { var pattern = (index, state) switch { @@ -94,7 +94,7 @@ public override void OnEventEnvControl(BossModule module, byte index, uint state public bool ActorUnsafeAt(BossModule module, Actor actor, WPos pos) { - var offset = pos - module.Bounds.Center; + var offset = pos - Module.Bounds.Center; bool posInFlames = _pattern switch { Pattern.EWNormal or Pattern.EWInverted => offset.X > -15, @@ -110,7 +110,7 @@ public bool ActorUnsafeAt(BossModule module, Actor actor, WPos pos) return _slotTempAdjustments[row] != -Temperature(actor); } - protected int RowIndex(BossModule module, WPos pos) => (pos.Z - module.Bounds.Center.Z) switch + protected int RowIndex(BossModule module, WPos pos) => (pos.Z - Module.Bounds.Center.Z) switch { < -15 => 0, < -5 => 1, @@ -127,20 +127,17 @@ private void InitArrow(BossModule module, OID oid, int temp) if (arrow == null) return; - if (arrow.Position.X < module.Bounds.Center.X != _pattern is Pattern.WENormal or Pattern.WEInverted) - module.ReportError(this, "Unexpected arrow X coord"); + if (arrow.Position.X < Module.Bounds.Center.X != _pattern is Pattern.WENormal or Pattern.WEInverted) + ReportError("Unexpected arrow X coord"); int srcRow = RowIndex(module, arrow.Position); int destRow = _remap[(int)_pattern, srcRow]; _slotTempAdjustments[destRow] = temp; _arrowsInited.Set(temp + 2); - _activation = module.WorldState.CurrentTime.AddSeconds(_spawnToActivation); + _activation = WorldState.FutureTime(_spawnToActivation); } } -class FlamesOfBozja1 : FlamesOfBozja -{ - public FlamesOfBozja1() : base(false) { } -} +class FlamesOfBozja1(BossModule module) : FlamesOfBozja(module, false); class QuickMarchBow1 : QuickMarch { @@ -148,30 +145,27 @@ class QuickMarchBow1 : QuickMarch public override void Init(BossModule module) => _flames = module.FindComponent(); - public override bool DestinationUnsafe(BossModule module, int slot, Actor actor, WPos pos) => !module.Bounds.Contains(pos) || (_flames?.AOE?.Shape.Check(pos, _flames.AOE.Value.Origin, _flames.AOE.Value.Rotation) ?? false); + public override bool DestinationUnsafe(BossModule module, int slot, Actor actor, WPos pos) => !Module.Bounds.Contains(pos) || (_flames?.AOE?.Shape.Check(pos, _flames.AOE.Value.Origin, _flames.AOE.Value.Rotation) ?? false); } class ShimmeringShot1 : ShimmeringShot { public ShimmeringShot1() : base(12.8f) { } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (ActorUnsafeAt(module, actor, actor.Position)) hints.Add("Go to safe zone!"); } } -class FlamesOfBozja2 : FlamesOfBozja -{ - public FlamesOfBozja2() : base(true) { } -} +class FlamesOfBozja2(BossModule module) : FlamesOfBozja(module, true); class ShimmeringShot2 : ShimmeringShot { public ShimmeringShot2() : base(14.0f) { } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) { } // no need for hints, quick march handles that + public override void AddHints(int slot, Actor actor, TextHints hints) { } // no need for hints, quick march handles that } class QuickMarchBow2 : QuickMarch @@ -180,5 +174,5 @@ class QuickMarchBow2 : QuickMarch public override void Init(BossModule module) => _shimmering = module.FindComponent(); - public override bool DestinationUnsafe(BossModule module, int slot, Actor actor, WPos pos) => !module.Bounds.Contains(pos) || (_shimmering?.ActorUnsafeAt(module, actor, pos) ?? false); + public override bool DestinationUnsafe(BossModule module, int slot, Actor actor, WPos pos) => !Module.Bounds.Contains(pos) || (_shimmering?.ActorUnsafeAt(module, actor, pos) ?? false); } diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS6TrinityAvowed/DRS6.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS6TrinityAvowed/DRS6.cs index 0569a1748e..b840e35ab1 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS6TrinityAvowed/DRS6.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS6TrinityAvowed/DRS6.cs @@ -1,38 +1,17 @@ namespace BossMod.Shadowbringers.Foray.DelubrumReginae.DRS6TrinityAvowed; -class WrathOfBozja : Components.CastSharedTankbuster -{ - public WrathOfBozja() : base(ActionID.MakeSpell(AID.WrathOfBozja), new AOEShapeCone(60, 45.Degrees())) { } // TODO: verify angle -} +class WrathOfBozja(BossModule module) : Components.CastSharedTankbuster(module, ActionID.MakeSpell(AID.WrathOfBozja), new AOEShapeCone(60, 45.Degrees())); // TODO: verify angle -class WrathOfBozjaBow : Components.CastSharedTankbuster -{ - public WrathOfBozjaBow() : base(ActionID.MakeSpell(AID.WrathOfBozjaBow), new AOEShapeCone(60, 45.Degrees())) { } // TODO: verify angle -} +class WrathOfBozjaBow(BossModule module) : Components.CastSharedTankbuster(module, ActionID.MakeSpell(AID.WrathOfBozjaBow), new AOEShapeCone(60, 45.Degrees())); // TODO: verify angle // note: it is combined with different AOEs (bow1, bow2, staff1) -class QuickMarch : Components.StatusDrivenForcedMarch -{ - public QuickMarch() : base(3, (uint)SID.ForwardMarch, (uint)SID.AboutFace, (uint)SID.LeftFace, (uint)SID.RightFace) { } -} +class QuickMarch(BossModule module) : Components.StatusDrivenForcedMarch(module, 3, (uint)SID.ForwardMarch, (uint)SID.AboutFace, (uint)SID.LeftFace, (uint)SID.RightFace); -class ElementalImpact1 : Components.SelfTargetedAOEs -{ - public ElementalImpact1() : base(ActionID.MakeSpell(AID.ElementalImpact1), new AOEShapeCircle(20)) { } -} +class ElementalImpact1(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ElementalImpact1), new AOEShapeCircle(20)); -class ElementalImpact2 : Components.SelfTargetedAOEs -{ - public ElementalImpact2() : base(ActionID.MakeSpell(AID.ElementalImpact2), new AOEShapeCircle(20)) { } -} +class ElementalImpact2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ElementalImpact2), new AOEShapeCircle(20)); -class GleamingArrow : Components.SelfTargetedAOEs -{ - public GleamingArrow() : base(ActionID.MakeSpell(AID.GleamingArrow), new AOEShapeRect(60, 5)) { } -} +class GleamingArrow(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.GleamingArrow), new AOEShapeRect(60, 5)); [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 761, NameID = 9853)] -public class DRS6 : BossModule -{ - public DRS6(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsSquare(new(-272, -82), 25)) { } -} +public class DRS6(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsSquare(new(-272, -82), 25)); diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS6TrinityAvowed/Staff.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS6TrinityAvowed/Staff.cs index d9d7c3bd97..a18290be79 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS6TrinityAvowed/Staff.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS6TrinityAvowed/Staff.cs @@ -13,7 +13,7 @@ public FreedomOfBozja(bool risky) _risky = risky; } - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { var playerTemp = Temperature(actor); foreach (var o in _orbs) @@ -26,10 +26,10 @@ public override void Init(BossModule module) InitOrb(module, OID.TempestuousOrb, -2); InitOrb(module, OID.BlazingOrb, +1); InitOrb(module, OID.RoaringOrb, +2); - _activation = module.WorldState.CurrentTime.AddSeconds(10); + _activation = WorldState.FutureTime(10); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.ChillBlast1 or AID.FreezingBlast1 or AID.HeatedBlast1 or AID.SearingBlast1 or AID.ChillBlast2 or AID.FreezingBlast2 or AID.HeatedBlast2 or AID.SearingBlast2) ++NumCasts; @@ -49,10 +49,7 @@ private void InitOrb(BossModule module, OID oid, int temp) } } -class FreedomOfBozja1 : FreedomOfBozja -{ - public FreedomOfBozja1() : base(false) { } -} +class FreedomOfBozja1(BossModule module) : FreedomOfBozja(module, false); class QuickMarchStaff1 : QuickMarch { @@ -60,10 +57,7 @@ class QuickMarchStaff1 : QuickMarch public override void Init(BossModule module) => _freedom = module.FindComponent(); - public override bool DestinationUnsafe(BossModule module, int slot, Actor actor, WPos pos) => !module.Bounds.Contains(pos) || (_freedom?.ActorUnsafeAt(actor, pos) ?? false); + public override bool DestinationUnsafe(BossModule module, int slot, Actor actor, WPos pos) => !Module.Bounds.Contains(pos) || (_freedom?.ActorUnsafeAt(actor, pos) ?? false); } -class FreedomOfBozja2 : FreedomOfBozja -{ - public FreedomOfBozja2() : base(true) { } -} +class FreedomOfBozja2(BossModule module) : FreedomOfBozja(module, true); diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS6TrinityAvowed/TemperatureAOE.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS6TrinityAvowed/TemperatureAOE.cs index c648523d93..b04980848d 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS6TrinityAvowed/TemperatureAOE.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS6TrinityAvowed/TemperatureAOE.cs @@ -14,7 +14,7 @@ private class PlayerState public int Temperature(Actor player) => _playerState.GetValueOrDefault(player.InstanceID)?.Temperature ?? 0; - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { switch ((SID)status.ID) { @@ -45,7 +45,7 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st } } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { switch ((SID)status.ID) { diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS7StygimolochLord/AddPhaseArena.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS7StygimolochLord/AddPhaseArena.cs index 5c02857a3e..ff84d4e93e 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS7StygimolochLord/AddPhaseArena.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS7StygimolochLord/AddPhaseArena.cs @@ -8,11 +8,11 @@ class AddPhaseArena : BossComponent private float _alcoveDepth = 1; private float _alcoveWidth = 2; - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { - arena.Zone(module.Bounds.ClipAndTriangulate(InDanger(module)), ArenaColor.AOE); - arena.Zone(module.Bounds.ClipAndTriangulate(MidDanger(module)), ArenaColor.AOE); - arena.Zone(module.Bounds.ClipAndTriangulate(OutDanger(module)), ArenaColor.AOE); + arena.Zone(Module.Bounds.ClipAndTriangulate(InDanger(module)), ArenaColor.AOE); + arena.Zone(Module.Bounds.ClipAndTriangulate(MidDanger(module)), ArenaColor.AOE); + arena.Zone(Module.Bounds.ClipAndTriangulate(OutDanger(module)), ArenaColor.AOE); } private IEnumerable RingBorder(BossModule module, Angle centerOffset, float ringRadius, bool innerBorder) @@ -22,9 +22,9 @@ private IEnumerable RingBorder(BossModule module, Angle centerOffset, floa for (int i = 0; i < 8; ++i) { var centerAlcove = centerOffset + i * 45.Degrees(); - foreach (var p in CurveApprox.CircleArc(module.Bounds.Center, ringRadius + offsetMultiplier * (_ringHalfWidth + _alcoveDepth), centerAlcove - halfWidth, centerAlcove + halfWidth, module.Bounds.MaxApproxError)) + foreach (var p in CurveApprox.CircleArc(Module.Bounds.Center, ringRadius + offsetMultiplier * (_ringHalfWidth + _alcoveDepth), centerAlcove - halfWidth, centerAlcove + halfWidth, Module.Bounds.MaxApproxError)) yield return p; - foreach (var p in CurveApprox.CircleArc(module.Bounds.Center, ringRadius + offsetMultiplier * _ringHalfWidth, centerAlcove + halfWidth, centerAlcove + 45.Degrees() - halfWidth, module.Bounds.MaxApproxError)) + foreach (var p in CurveApprox.CircleArc(Module.Bounds.Center, ringRadius + offsetMultiplier * _ringHalfWidth, centerAlcove + halfWidth, centerAlcove + 45.Degrees() - halfWidth, Module.Bounds.MaxApproxError)) yield return p; } } @@ -53,7 +53,7 @@ private IEnumerable MidDanger(BossModule module) private IEnumerable OutDanger(BossModule module) { - foreach (var p in RepeatFirst(CurveApprox.Circle(module.Bounds.Center, module.Bounds.HalfSize, module.Bounds.MaxApproxError))) + foreach (var p in RepeatFirst(CurveApprox.Circle(Module.Bounds.Center, Module.Bounds.HalfSize, Module.Bounds.MaxApproxError))) yield return p; foreach (var p in RepeatFirst(RingBorder(module, 0.Degrees(), _outerRingRadius, false))) yield return p; diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS7StygimolochLord/CrushingHoof.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS7StygimolochLord/CrushingHoof.cs index b7d9d87dfc..ddab78b5e3 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS7StygimolochLord/CrushingHoof.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS7StygimolochLord/CrushingHoof.cs @@ -6,15 +6,15 @@ class CrushingHoof : Components.GenericAOEs public CrushingHoof() : base(ActionID.MakeSpell(AID.CrushingHoofAOE)) { } - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => Utils.ZeroOrOne(_aoe); + public override IEnumerable ActiveAOEs(int slot, Actor actor) => Utils.ZeroOrOne(_aoe); - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.CrushingHoof) _aoe = new(new AOEShapeCircle(25), spell.LocXZ, activation: spell.NPCFinishAt.AddSeconds(1)); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { base.OnEventCast(module, caster, spell); if (spell.Action == WatchedAction) diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS7StygimolochLord/DRS7.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS7StygimolochLord/DRS7.cs index 6ae7867b92..1f9dff1394 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS7StygimolochLord/DRS7.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS7StygimolochLord/DRS7.cs @@ -1,39 +1,18 @@ namespace BossMod.Shadowbringers.Foray.DelubrumReginae.DRS7StygimolochLord; -class FoeSplitter : Components.Cleave -{ - public FoeSplitter() : base(ActionID.MakeSpell(AID.FoeSplitter), new AOEShapeCone(9, 45.Degrees())) { } // TODO: verify angle -} +class FoeSplitter(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.FoeSplitter), new AOEShapeCone(9, 45.Degrees())); // TODO: verify angle -class ThunderousDischarge : Components.CastCounter -{ - public ThunderousDischarge() : base(ActionID.MakeSpell(AID.ThunderousDischargeAOE)) { } -} +class ThunderousDischarge(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.ThunderousDischargeAOE)); -class ThousandTonzeSwing : Components.SelfTargetedAOEs -{ - public ThousandTonzeSwing() : base(ActionID.MakeSpell(AID.ThousandTonzeSwing), new AOEShapeCircle(20)) { } -} +class ThousandTonzeSwing(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ThousandTonzeSwing), new AOEShapeCircle(20)); -class Whack : Components.SelfTargetedAOEs -{ - public Whack() : base(ActionID.MakeSpell(AID.WhackAOE), new AOEShapeCone(40, 30.Degrees())) { } -} +class Whack(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.WhackAOE), new AOEShapeCone(40, 30.Degrees())); -class DevastatingBoltOuter : Components.SelfTargetedAOEs -{ - public DevastatingBoltOuter() : base(ActionID.MakeSpell(AID.DevastatingBoltOuter), new AOEShapeDonut(25, 30)) { } -} +class DevastatingBoltOuter(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.DevastatingBoltOuter), new AOEShapeDonut(25, 30)); -class DevastatingBoltInner : Components.SelfTargetedAOEs -{ - public DevastatingBoltInner() : base(ActionID.MakeSpell(AID.DevastatingBoltInner), new AOEShapeDonut(12, 17)) { } -} +class DevastatingBoltInner(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.DevastatingBoltInner), new AOEShapeDonut(12, 17)); -class Electrocution : Components.LocationTargetedAOEs -{ - public Electrocution() : base(ActionID.MakeSpell(AID.Electrocution), 3) { } -} +class Electrocution(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Electrocution), 3); // TODO: ManaFlame component - show reflect hints [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 761, NameID = 9759)] diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS7StygimolochLord/FatefulWords.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS7StygimolochLord/FatefulWords.cs index b5b24b681a..d189432dfc 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS7StygimolochLord/FatefulWords.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS7StygimolochLord/FatefulWords.cs @@ -6,14 +6,14 @@ class FatefulWords : Components.Knockback public FatefulWords() : base(ActionID.MakeSpell(AID.FatefulWordsAOE), true) { } - public override IEnumerable Sources(BossModule module, int slot, Actor actor) + public override IEnumerable Sources(int slot, Actor actor) { var kind = _mechanics[slot]; if (kind != Kind.None) - yield return new(module.Bounds.Center, 6, module.PrimaryActor.CastInfo?.NPCFinishAt ?? default, Kind: kind); + yield return new(Module.Bounds.Center, 6, Module.PrimaryActor.CastInfo?.NPCFinishAt ?? default, Kind: kind); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { var kind = (SID)status.ID switch { @@ -25,7 +25,7 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st AssignMechanic(module, actor, kind); } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { if ((SID)status.ID is SID.WanderersFate or SID.SacrificesFate) AssignMechanic(module, actor, Kind.None); @@ -33,7 +33,7 @@ public override void OnStatusLose(BossModule module, Actor actor, ActorStatus st private void AssignMechanic(BossModule module, Actor actor, Kind mechanic) { - var slot = module.Raid.FindSlot(actor.InstanceID); + var slot = Raid.FindSlot(actor.InstanceID); if (slot >= 0 && slot < _mechanics.Length) _mechanics[slot] = mechanic; } diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS7StygimolochLord/RapidBolts.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS7StygimolochLord/RapidBolts.cs index 1492e9f806..062e79219b 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS7StygimolochLord/RapidBolts.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS7StygimolochLord/RapidBolts.cs @@ -5,7 +5,7 @@ class RapidBoltsBait : Components.UniformStackSpread { public RapidBoltsBait() : base(0, 5, alwaysShowSpreads: true) { } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.RapidBolts) AddSpread(actor); @@ -17,12 +17,12 @@ class RapidBoltsAOE : Components.GenericAOEs private List<(WPos pos, int numCasts)> _puddles = new(); private static readonly AOEShapeCircle _shape = new(5); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { return _puddles.Select(p => new AOEInstance(_shape, p.pos)); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.RapidBoltsAOE) { diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS7StygimolochLord/ViciousSwipe.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS7StygimolochLord/ViciousSwipe.cs index db04ea9612..ac4653cf76 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS7StygimolochLord/ViciousSwipe.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS7StygimolochLord/ViciousSwipe.cs @@ -9,12 +9,12 @@ class ViciousSwipe : Components.Knockback public ViciousSwipe() : base(ActionID.MakeSpell(AID.ViciousSwipe)) { } - public override IEnumerable Sources(BossModule module, int slot, Actor actor) => Utils.ZeroOrOne(_source); + public override IEnumerable Sources(int slot, Actor actor) => Utils.ZeroOrOne(_source); - public override void Init(BossModule module) => _source = new(module.PrimaryActor.Position, 15, module.WorldState.CurrentTime.AddSeconds(module.StateMachine.ActiveState?.Duration ?? 0), _shape); + public override void Init(BossModule module) => _source = new(Module.PrimaryActor.Position, 15, WorldState.FutureTime(module.StateMachine.ActiveState?.Duration ?? 0), _shape); - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { - arena.AddCircle(module.PrimaryActor.Position, _shape.Radius, ArenaColor.Danger); + arena.AddCircle(Module.PrimaryActor.Position, _shape.Radius, ArenaColor.Danger); } } diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/AboveBoard.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/AboveBoard.cs index 5922df624a..9af2f6cf2b 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/AboveBoard.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/AboveBoard.cs @@ -14,7 +14,7 @@ public enum State { Initial, ThrowUpDone, ShortExplosionsDone, LongExplosionsDon private static readonly AOEShapeCircle _shape = new(10); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { var imminentBombs = AreBigBombsDangerous(slot) ? _bigBombs : _smallBombs; return imminentBombs.Select(b => new AOEInstance(_shape, b.Position, new(), _activation)); @@ -24,10 +24,10 @@ public override void Init(BossModule module) { _smallBombs = module.Enemies(OID.AetherialBolt); _bigBombs = module.Enemies(OID.AetherialBurst); - _activation = module.WorldState.CurrentTime.AddSeconds(14.4f); + _activation = WorldState.FutureTime(14.4f); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { switch ((SID)status.ID) { @@ -35,7 +35,7 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st if ((OID)actor.OID is OID.AetherialBolt or OID.AetherialBurst) _invertedBombs = true; else - _invertedPlayers.Set(module.Raid.FindSlot(actor.InstanceID)); + _invertedPlayers.Set(Raid.FindSlot(actor.InstanceID)); break; case SID.AboveBoardPlayerLong: case SID.AboveBoardPlayerShort: @@ -46,7 +46,7 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { @@ -56,7 +56,7 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent break; case AID.LotsCastLong: AdvanceState(State.LongExplosionsDone); - _activation = module.WorldState.CurrentTime.AddSeconds(4.2f); + _activation = WorldState.FutureTime(4.2f); break; } } diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/Chess.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/Chess.cs index 38f3a2833d..c5131d3040 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/Chess.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/Chess.cs @@ -11,7 +11,7 @@ public struct GuardState protected GuardState[] GuardStates = new GuardState[4]; protected static readonly AOEShapeCross Shape = new(60, 5); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (NumCasts >= 4) yield break; @@ -22,7 +22,7 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, yield return new(Shape, g.FinalPosition, g.Actor.Rotation); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.MovementIndicator) { @@ -41,7 +41,7 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.EndsKnight or AID.MeansWarrior or AID.EndsSoldier or AID.MeansGunner) ++NumCasts; @@ -73,20 +73,20 @@ public class PlayerState private Dictionary _playerStates = new(); private int _safespotZOffset = 0; - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (movementHints != null) foreach (var m in GetSafeSpotMoves(module, actor)) movementHints.Add(m); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (var m in GetSafeSpotMoves(module, pc)) arena.AddLine(m.from, m.to, m.color); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { base.OnStatusGain(module, actor, status); switch ((SID)status.ID) @@ -115,13 +115,13 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st } } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Stun) --NumStuns; } - public override void OnEventEnvControl(BossModule module, byte index, uint state) + public override void OnEventEnvControl(byte index, uint state) { if (index is 0x1C or 0x1D && state == 0x00020001) _safespotZOffset = index == 0x1D ? 2 : -2; @@ -140,10 +140,10 @@ public override void OnEventEnvControl(BossModule module, byte index, uint state yield break; // not ready yet... // initialize second safespot: select cells that are SecondEdict distance from safespot and not in columns clipped by second set of guards - int forbiddenCol1 = OffsetToCell(GuardStates[2].FinalPosition.X - module.Bounds.Center.X); - int forbiddenCol2 = OffsetToCell(GuardStates[3].FinalPosition.X - module.Bounds.Center.X); - int forbiddenRow1 = OffsetToCell(GuardStates[0].FinalPosition.Z - module.Bounds.Center.Z); - int forbiddenRow2 = OffsetToCell(GuardStates[1].FinalPosition.Z - module.Bounds.Center.Z); + int forbiddenCol1 = OffsetToCell(GuardStates[2].FinalPosition.X - Module.Bounds.Center.X); + int forbiddenCol2 = OffsetToCell(GuardStates[3].FinalPosition.X - Module.Bounds.Center.X); + int forbiddenRow1 = OffsetToCell(GuardStates[0].FinalPosition.Z - Module.Bounds.Center.Z); + int forbiddenRow2 = OffsetToCell(GuardStates[1].FinalPosition.Z - Module.Bounds.Center.Z); foreach (var s2 in CellsAtManhattanDistance((0, _safespotZOffset), state.SecondEdict).Where(s2 => s2.x != forbiddenCol1 && s2.x != forbiddenCol2)) { foreach (var s1 in CellsAtManhattanDistance(s2, state.FirstEdict).Where(s1 => s1.z != forbiddenRow1 && s1.z != forbiddenRow2)) @@ -179,7 +179,7 @@ public override void OnEventEnvControl(BossModule module, byte index, uint state _ => 3 }; - private WPos CellCenter(BossModule module, (int x, int z) cell) => module.Bounds.Center + 10 * new WDir(cell.x, cell.z); + private WPos CellCenter(BossModule module, (int x, int z) cell) => Module.Bounds.Center + 10 * new WDir(cell.x, cell.z); private IEnumerable<(int x, int z)> CellsAtManhattanDistance((int x, int z) origin, int distance) { diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/DRS8.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/DRS8.cs index 6413a8aa41..4468f004d6 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/DRS8.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/DRS8.cs @@ -1,65 +1,29 @@ namespace BossMod.Shadowbringers.Foray.DelubrumReginae.DRS8Queen; -class NorthswainsGlow : Components.SelfTargetedAOEs -{ - public NorthswainsGlow() : base(ActionID.MakeSpell(AID.NorthswainsGlowAOE), new AOEShapeCircle(20)) { } -} +class NorthswainsGlow(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.NorthswainsGlowAOE), new AOEShapeCircle(20)); -class CleansingSlashSecond : Components.CastCounter -{ - public CleansingSlashSecond() : base(ActionID.MakeSpell(AID.CleansingSlashSecond)) { } -} +class CleansingSlashSecond(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.CleansingSlashSecond)); -class GodsSaveTheQueen : Components.CastCounter -{ - public GodsSaveTheQueen() : base(ActionID.MakeSpell(AID.GodsSaveTheQueenAOE)) { } -} +class GodsSaveTheQueen(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.GodsSaveTheQueenAOE)); // note: apparently there is no 'front unseen' status -class QueensShot : Components.CastWeakpoint -{ - public QueensShot() : base(ActionID.MakeSpell(AID.QueensShot), new AOEShapeCircle(60), 0, (uint)SID.BackUnseen, (uint)SID.LeftUnseen, (uint)SID.RightUnseen) { } -} +class QueensShot(BossModule module) : Components.CastWeakpoint(module, ActionID.MakeSpell(AID.QueensShot), new AOEShapeCircle(60), 0, (uint)SID.BackUnseen, (uint)SID.LeftUnseen, (uint)SID.RightUnseen); -class TurretsTourUnseen : Components.CastWeakpoint -{ - public TurretsTourUnseen() : base(ActionID.MakeSpell(AID.TurretsTourUnseen), new AOEShapeRect(50, 2.5f), 0, (uint)SID.BackUnseen, (uint)SID.LeftUnseen, (uint)SID.RightUnseen) { } -} +class TurretsTourUnseen(BossModule module) : Components.CastWeakpoint(module, ActionID.MakeSpell(AID.TurretsTourUnseen), new AOEShapeRect(50, 2.5f), 0, (uint)SID.BackUnseen, (uint)SID.LeftUnseen, (uint)SID.RightUnseen); -class OptimalOffensive : Components.ChargeAOEs -{ - public OptimalOffensive() : base(ActionID.MakeSpell(AID.OptimalOffensive), 2.5f) { } -} +class OptimalOffensive(BossModule module) : Components.ChargeAOEs(module, ActionID.MakeSpell(AID.OptimalOffensive), 2.5f); // note: there are two casters (as usual in bozja content for raidwides) // TODO: not sure whether it ignores immunes, I assume so... -class OptimalOffensiveKnockback : Components.KnockbackFromCastTarget -{ - public OptimalOffensiveKnockback() : base(ActionID.MakeSpell(AID.OptimalOffensiveKnockback), 10, true, 1) { } -} +class OptimalOffensiveKnockback(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.OptimalOffensiveKnockback), 10, true, 1); -class PawnOff : Components.SelfTargetedAOEs -{ - public PawnOff() : base(ActionID.MakeSpell(AID.PawnOffReal), new AOEShapeCircle(20)) { } -} +class PawnOff(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PawnOffReal), new AOEShapeCircle(20)); -class OptimalPlaySword : Components.SelfTargetedAOEs -{ - public OptimalPlaySword() : base(ActionID.MakeSpell(AID.OptimalPlaySword), new AOEShapeCircle(10)) { } -} +class OptimalPlaySword(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.OptimalPlaySword), new AOEShapeCircle(10)); -class OptimalPlayShield : Components.SelfTargetedAOEs -{ - public OptimalPlayShield() : base(ActionID.MakeSpell(AID.OptimalPlayShield), new AOEShapeDonut(5, 60)) { } -} +class OptimalPlayShield(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.OptimalPlayShield), new AOEShapeDonut(5, 60)); -class OptimalPlayCone : Components.SelfTargetedAOEs -{ - public OptimalPlayCone() : base(ActionID.MakeSpell(AID.OptimalPlayCone), new AOEShapeCone(60, 135.Degrees())) { } -} +class OptimalPlayCone(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.OptimalPlayCone), new AOEShapeCone(60, 135.Degrees())); [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 761, NameID = 9863)] -public class DRS8 : BossModule -{ - public DRS8(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(-272, -415), 25)) { } // note: initially arena is square, but it quickly changes to circle -} +public class DRS8(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(-272, -415), 25)); // note: initially arena is square, but it quickly changes to circle diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/FieryIcyPortent.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/FieryIcyPortent.cs index 52db6066ce..72ef1fec78 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/FieryIcyPortent.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/FieryIcyPortent.cs @@ -2,7 +2,7 @@ class FieryIcyPortent : Components.StayMove { - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { var req = (AID)spell.Action.ID switch { @@ -16,7 +16,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.FieryPortent or AID.IcyPortent) { diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/HeavensWrath.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/HeavensWrath.cs index fbb377578b..54183b4f8d 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/HeavensWrath.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/HeavensWrath.cs @@ -1,9 +1,6 @@ namespace BossMod.Shadowbringers.Foray.DelubrumReginae.DRS8Queen; -class HeavensWrathAOE : Components.SelfTargetedAOEs -{ - public HeavensWrathAOE() : base(ActionID.MakeSpell(AID.HeavensWrathVisual), new AOEShapeRect(25, 5, 25)) { } -} +class HeavensWrathAOE(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HeavensWrathVisual), new AOEShapeRect(25, 5, 25)); // TODO: generalize class HeavensWrathKnockback : Components.Knockback @@ -11,9 +8,9 @@ class HeavensWrathKnockback : Components.Knockback private List _sources = new(); private static readonly AOEShapeCone _shape = new(30, 90.Degrees()); - public override IEnumerable Sources(BossModule module, int slot, Actor actor) => _sources; + public override IEnumerable Sources(int slot, Actor actor) => _sources; - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.HeavensWrathVisual) { @@ -23,7 +20,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.HeavensWrathVisual) { diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/JudgmentBlade.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/JudgmentBlade.cs index 31d91369e8..803c228c7e 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/JudgmentBlade.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/JudgmentBlade.cs @@ -4,9 +4,9 @@ class JudgmentBlade : Components.GenericAOEs { private AOEInstance? _aoe; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => Utils.ZeroOrOne(_aoe); + public override IEnumerable ActiveAOEs(int slot, Actor actor) => Utils.ZeroOrOne(_aoe); - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { var offset = (AID)spell.Action.ID switch { @@ -18,7 +18,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf _aoe = new(new AOEShapeRect(70, 15), caster.Position + offset * spell.Rotation.ToDirection().OrthoL(), spell.Rotation, spell.NPCFinishAt); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.JudgmentBladeRAOE or AID.JudgmentBladeLAOE) { diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/MaelstromsBolt.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/MaelstromsBolt.cs index 2675458414..881586cca3 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/MaelstromsBolt.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/MaelstromsBolt.cs @@ -14,7 +14,7 @@ public override void Init(BossModule module) _domes = module.Enemies(OID.ProtectiveDome); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (var b in _ballLightnings.Where(b => !b.IsDead)) { diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/TurretsTour.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/TurretsTour.cs index c9d231a4ec..66f15a5a9c 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/TurretsTour.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/TurretsTour.cs @@ -6,7 +6,7 @@ class TurretsTour : Components.GenericAOEs private List<(Actor caster, AOEShapeRect shape)> _casters = new(); private DateTime _activation; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { foreach (var t in _turrets) yield return new(t.shape, t.turret.Position, t.turret.Rotation, _activation); @@ -27,7 +27,7 @@ public override void Init(BossModule module) } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.TurretsTourAOE1) { @@ -38,13 +38,13 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.TurretsTourAOE1) _casters.RemoveAll(c => c.caster == caster); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.TurretsTourAOE2 or AID.TurretsTourAOE3) { diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/UnluckyLotAetherialSphere.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/UnluckyLotAetherialSphere.cs index 290c82512e..9f94788b89 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/UnluckyLotAetherialSphere.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/UnluckyLotAetherialSphere.cs @@ -6,15 +6,15 @@ class UnluckyLotAetherialSphere : Components.GenericAOEs public UnluckyLotAetherialSphere() : base(ActionID.MakeSpell(AID.UnluckyLotAetherialSphere)) { } - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => Utils.ZeroOrOne(_aoe); + public override IEnumerable ActiveAOEs(int slot, Actor actor) => Utils.ZeroOrOne(_aoe); - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.OptimalOffensiveMoveSphere) _aoe = new(new AOEShapeCircle(20), caster.Position, activation: spell.NPCFinishAt.AddSeconds(2.6)); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.UnluckyLotAetherialSphere) _aoe = null; diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/WindsOfWeight.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/WindsOfWeight.cs index 786d95b327..599574dd9c 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/WindsOfWeight.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/WindsOfWeight.cs @@ -9,23 +9,23 @@ class WindsOfWeight : Components.GenericAOEs private static readonly AOEShapeCircle _shape = new(20); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { return (_invertedPlayers[slot] ? _purple : _green).Select(c => new AOEInstance(_shape, c.Position, c.CastInfo!.Rotation, c.CastInfo.NPCFinishAt)); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.ReversalOfForces) - _invertedPlayers.Set(module.Raid.FindSlot(actor.InstanceID)); + _invertedPlayers.Set(Raid.FindSlot(actor.InstanceID)); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { CasterList(spell)?.Add(caster); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { CasterList(spell)?.Remove(caster); } diff --git a/BossMod/Modules/Shadowbringers/Foray/Duel/Duel2Lyon/Duel2LyonGenericAttacks.cs b/BossMod/Modules/Shadowbringers/Foray/Duel/Duel2Lyon/Duel2LyonGenericAttacks.cs index 027ce0044a..797fb959fb 100644 --- a/BossMod/Modules/Shadowbringers/Foray/Duel/Duel2Lyon/Duel2LyonGenericAttacks.cs +++ b/BossMod/Modules/Shadowbringers/Foray/Duel/Duel2Lyon/Duel2LyonGenericAttacks.cs @@ -5,7 +5,7 @@ class Enaero : BossComponent private bool EnaeroBuff; private bool casting; - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (casting) hints.Add("Applies Enaero to Lyon. Use Dispell to remove it"); @@ -13,27 +13,27 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint hints.Add("Enaero on Lyon. Use Dispell to remove it! You only need to do this once per duel, so you can switch to a different action after removing his buff."); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { - if (actor == module.PrimaryActor && (SID)status.ID == SID.Enaero) + if (actor == Module.PrimaryActor && (SID)status.ID == SID.Enaero) EnaeroBuff = true; } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.RagingWinds1) casting = true; } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.RagingWinds1) casting = false; } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { - if (actor == module.PrimaryActor && (SID)status.ID == SID.Enaero) + if (actor == Module.PrimaryActor && (SID)status.ID == SID.Enaero) EnaeroBuff = false; } } @@ -44,13 +44,13 @@ class HeartOfNatureConcentric : Components.ConcentricAOEs public HeartOfNatureConcentric() : base(_shapes) { } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.NaturesPulse1) AddSequence(caster.Position, spell.NPCFinishAt); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if (Sequences.Count > 0) { @@ -66,15 +66,9 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } -class TasteOfBlood : Components.SelfTargetedAOEs -{ - public TasteOfBlood() : base(ActionID.MakeSpell(AID.TasteOfBlood), new AOEShapeCone(40, 90.Degrees())) { } -} +class TasteOfBlood(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TasteOfBlood), new AOEShapeCone(40, 90.Degrees())); -class TasteOfBloodHint : Components.CastHint -{ - public TasteOfBloodHint() : base(ActionID.MakeSpell(AID.TasteOfBlood), "Go behind Lyon!") { } -} +class TasteOfBloodHint(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.TasteOfBlood), "Go behind Lyon!"); class RavenousGale : Components.GenericAOEs { @@ -83,7 +77,7 @@ class RavenousGale : Components.GenericAOEs private DateTime _activation; private static readonly AOEShapeCircle circle = new(0.5f); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (casting) yield return new(circle, actor.Position, default, _activation); @@ -92,13 +86,13 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, yield return new(circle, p.Position, default, _activation); } - public override void OnActorCreated(BossModule module, Actor actor) + public override void OnActorCreated(Actor actor) { if ((OID)actor.OID == OID.RavenousGaleVoidzone) { activeTwister = true; casting = false; - _activation = module.WorldState.CurrentTime.AddSeconds(4.6f); + _activation = WorldState.FutureTime(4.6f); } } @@ -111,13 +105,13 @@ public override void OnActorDestroyed(BossModule module, Actor actor) } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.RavenousGale) casting = true; } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { base.AddGlobalHints(module, hints); if (casting) @@ -125,15 +119,9 @@ public override void AddGlobalHints(BossModule module, GlobalHints hints) } } -class TwinAgonies : Components.SingleTargetCast -{ - public TwinAgonies() : base(ActionID.MakeSpell(AID.TwinAgonies), "Heavy Tankbuster, use Manawall or tank mitigations") { } -} +class TwinAgonies(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.TwinAgonies), "Heavy Tankbuster, use Manawall or tank mitigations"); -class WindsPeak : Components.SelfTargetedAOEs -{ - public WindsPeak() : base(ActionID.MakeSpell(AID.WindsPeak1), new AOEShapeCircle(5)) { } -} +class WindsPeak(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.WindsPeak1), new AOEShapeCircle(5)); class WindsPeakKB : Components.Knockback { @@ -141,32 +129,26 @@ class WindsPeakKB : Components.Knockback private bool watched; private DateTime _activation; - public override IEnumerable Sources(BossModule module, int slot, Actor actor) + public override IEnumerable Sources(int slot, Actor actor) { - if (watched && module.WorldState.CurrentTime < Time.AddSeconds(4.4f)) - yield return new(module.PrimaryActor.Position, 15, _activation); + if (watched && WorldState.CurrentTime < Time.AddSeconds(4.4f)) + yield return new(Module.PrimaryActor.Position, 15, _activation); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.WindsPeak1) { watched = true; - Time = module.WorldState.CurrentTime; + Time = WorldState.CurrentTime; _activation = spell.NPCFinishAt; } } } -class TheKingsNotice : Components.CastGaze -{ - public TheKingsNotice() : base(ActionID.MakeSpell(AID.TheKingsNotice)) { } -} +class TheKingsNotice(BossModule module) : Components.CastGaze(module, ActionID.MakeSpell(AID.TheKingsNotice)); -class SplittingRage : Components.CastHint -{ - public SplittingRage() : base(ActionID.MakeSpell(AID.SplittingRage), "Applies temporary misdirection") { } -} +class SplittingRage(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.SplittingRage), "Applies temporary misdirection"); class NaturesBlood : Components.Exaflare { @@ -188,13 +170,13 @@ public LineWithActor(Actor caster) } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.NaturesBlood1) Lines.Add(new LineWithActor(caster)); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if (Lines.Count > 0 && (AID)spell.Action.ID is AID.NaturesBlood1 or AID.NaturesBlood2) { @@ -212,20 +194,20 @@ class SpitefulFlameCircleVoidzone : Components.GenericAOEs private int casts; private static readonly AOEShapeCircle circle = new(10); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (activeOrb && casts <= 11 && casts != 0) foreach (var p in module.Enemies(OID.VermillionFlame)) yield return new(circle, p.Position); } - public override void OnActorCreated(BossModule module, Actor actor) + public override void OnActorCreated(Actor actor) { if ((OID)actor.OID == OID.VermillionFlame) activeOrb = true; } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.SpitefulFlame1) casts++; @@ -237,10 +219,7 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } -class SpitefulFlameRect : Components.SelfTargetedAOEs -{ - public SpitefulFlameRect() : base(ActionID.MakeSpell(AID.SpitefulFlame2), new AOEShapeRect(80, 2)) { } -} +class SpitefulFlameRect(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.SpitefulFlame2), new AOEShapeRect(80, 2)); class DynasticFlame : Components.BaitAwayTethers { @@ -250,24 +229,24 @@ public DynasticFlame() : base(new AOEShapeCircle(10), (uint)TetherID.fireorbs) { CenterAtTarget = true; } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.DynasticFlame1) target = spell.TargetID; } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { base.AddAIHints(module, slot, actor, assignment, hints); if (target == actor.InstanceID && CurrentBaits.Count > 0) - hints.AddForbiddenZone(ShapeDistance.Circle(module.Bounds.Center, 18)); + hints.AddForbiddenZone(ShapeDistance.Circle(Module.Bounds.Center, 18)); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (target == actor.InstanceID && CurrentBaits.Count > 0) hints.Add("Go to the edge and run until 4 orbs are spawned"); } - public override void OnActorCreated(BossModule module, Actor actor) + public override void OnActorCreated(Actor actor) { if ((OID)actor.OID == OID.VermillionFlame) ++orbcount; @@ -279,7 +258,4 @@ public override void OnActorCreated(BossModule module, Actor actor) } } -class SkyrendingStrike : Components.CastHint -{ - public SkyrendingStrike() : base(ActionID.MakeSpell(AID.SkyrendingStrike), "Enrage!", true) { } -} +class SkyrendingStrike(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.SkyrendingStrike), "Enrage!", true); diff --git a/BossMod/Modules/Shadowbringers/Foray/Duel/Duel4Dabog/Duel4Dabog.cs b/BossMod/Modules/Shadowbringers/Foray/Duel/Duel4Dabog/Duel4Dabog.cs index 88f037ae1b..4002aa0397 100644 --- a/BossMod/Modules/Shadowbringers/Foray/Duel/Duel4Dabog/Duel4Dabog.cs +++ b/BossMod/Modules/Shadowbringers/Foray/Duel/Duel4Dabog/Duel4Dabog.cs @@ -1,27 +1,12 @@ namespace BossMod.Shadowbringers.Foray.Duel.Duel4Dabog; -class RightArmBlasterFragment : Components.SelfTargetedAOEs -{ - public RightArmBlasterFragment() : base(ActionID.MakeSpell(AID.RightArmBlasterFragment), new AOEShapeRect(100, 3)) { } -} +class RightArmBlasterFragment(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RightArmBlasterFragment), new AOEShapeRect(100, 3)); -class RightArmBlasterBoss : Components.SelfTargetedAOEs -{ - public RightArmBlasterBoss() : base(ActionID.MakeSpell(AID.RightArmBlasterBoss), new AOEShapeRect(100, 3)) { } -} +class RightArmBlasterBoss(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RightArmBlasterBoss), new AOEShapeRect(100, 3)); -class LeftArmSlash : Components.SelfTargetedAOEs -{ - public LeftArmSlash() : base(ActionID.MakeSpell(AID.LeftArmSlash), new AOEShapeCone(10, 90.Degrees())) { } // TODO: verify angle -} +class LeftArmSlash(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.LeftArmSlash), new AOEShapeCone(10, 90.Degrees())); // TODO: verify angle -class LeftArmWave : Components.LocationTargetedAOEs -{ - public LeftArmWave() : base(ActionID.MakeSpell(AID.LeftArmWaveAOE), 24) { } -} +class LeftArmWave(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.LeftArmWaveAOE), 24); [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.BozjaDuel, GroupID = 778, NameID = 19)] // bnpcname=9958 -public class Duel4Dabog : BossModule -{ - public Duel4Dabog(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(250, 710), 20)) { } -} +public class Duel4Dabog(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(250, 710), 20)); diff --git a/BossMod/Modules/Shadowbringers/Foray/Duel/Duel4Dabog/LeftArmMetalCutter.cs b/BossMod/Modules/Shadowbringers/Foray/Duel/Duel4Dabog/LeftArmMetalCutter.cs index 97b6b019f2..491a74cddd 100644 --- a/BossMod/Modules/Shadowbringers/Foray/Duel/Duel4Dabog/LeftArmMetalCutter.cs +++ b/BossMod/Modules/Shadowbringers/Foray/Duel/Duel4Dabog/LeftArmMetalCutter.cs @@ -8,15 +8,15 @@ public enum State { FirstAOEs, SecondAOEs, Done } private readonly List _aoes = []; private static readonly AOEShapeCone _shape = new(40, 45.Degrees()); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => _aoes; + public override IEnumerable ActiveAOEs(int slot, Actor actor) => _aoes; - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.LeftArmMetalCutterAOE1) _aoes.Add(new(_shape, caster.Position, spell.Rotation, spell.NPCFinishAt)); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { @@ -27,7 +27,7 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn { var aoe = _aoes[i]; aoe.Rotation += 180.Degrees(); - aoe.Activation = module.WorldState.CurrentTime.AddSeconds(5.1f); + aoe.Activation = WorldState.FutureTime(5.1f); _aoes[i] = aoe; } CurState = State.SecondAOEs; @@ -51,21 +51,15 @@ public LeftArmMetalCutterKnockback(AID aid, float distance) : base(ActionID.Make _distance = distance; } - public override IEnumerable Sources(BossModule module, int slot, Actor actor) => Utils.ZeroOrOne(_instance); + public override IEnumerable Sources(int slot, Actor actor) => Utils.ZeroOrOne(_instance); - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.LeftArmMetalCutter or AID.ArmUnit) _instance = new(caster.Position, _distance, spell.NPCFinishAt.AddSeconds(0.6f)); } } -class LeftArmMetalCutterKnockbackShort : LeftArmMetalCutterKnockback -{ - public LeftArmMetalCutterKnockbackShort() : base(AID.LeftArmMetalCutterKnockbackShort, 5) { } -} +class LeftArmMetalCutterKnockbackShort(BossModule module) : LeftArmMetalCutterKnockback(module, AID.LeftArmMetalCutterKnockbackShort, 5); -class LeftArmMetalCutterKnockbackLong : LeftArmMetalCutterKnockback -{ - public LeftArmMetalCutterKnockbackLong() : base(AID.LeftArmMetalCutterKnockbackLong, 15) { } -} +class LeftArmMetalCutterKnockbackLong(BossModule module) : LeftArmMetalCutterKnockback(module, AID.LeftArmMetalCutterKnockbackLong, 15); diff --git a/BossMod/Modules/Shadowbringers/Foray/Duel/Duel4Dabog/RightArmComet.cs b/BossMod/Modules/Shadowbringers/Foray/Duel/Duel4Dabog/RightArmComet.cs index 8ad459b494..ae74de87f5 100644 --- a/BossMod/Modules/Shadowbringers/Foray/Duel/Duel4Dabog/RightArmComet.cs +++ b/BossMod/Modules/Shadowbringers/Foray/Duel/Duel4Dabog/RightArmComet.cs @@ -6,14 +6,14 @@ class RightArmComet : Components.KnockbackFromCastTarget public RightArmComet(AID aid, float distance) : base(ActionID.MakeSpell(aid), distance, shape: new AOEShapeCircle(_radius)) { } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { base.AddHints(module, slot, actor, hints, movementHints); if (Casters.Any(c => !Shape!.Check(actor.Position, c))) hints.Add("Soak the tower!"); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { base.DrawArenaForeground(module, pcSlot, pc, arena); foreach (var c in Casters) @@ -21,12 +21,6 @@ public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc } } -class RightArmCometShort : RightArmComet -{ - public RightArmCometShort() : base(AID.RightArmCometKnockbackShort, 12) { } -} +class RightArmCometShort(BossModule module) : RightArmComet(module, AID.RightArmCometKnockbackShort, 12); -class RightArmCometLong : RightArmComet -{ - public RightArmCometLong() : base(AID.RightArmCometKnockbackLong, 25) { } -} +class RightArmCometLong(BossModule module) : RightArmComet(module, AID.RightArmCometKnockbackLong, 25); diff --git a/BossMod/Modules/Shadowbringers/Foray/Duel/Duel4Dabog/RightArmRay.cs b/BossMod/Modules/Shadowbringers/Foray/Duel/Duel4Dabog/RightArmRay.cs index 2da25e8045..8d1689fe5d 100644 --- a/BossMod/Modules/Shadowbringers/Foray/Duel/Duel4Dabog/RightArmRay.cs +++ b/BossMod/Modules/Shadowbringers/Foray/Duel/Duel4Dabog/RightArmRay.cs @@ -1,9 +1,6 @@ namespace BossMod.Shadowbringers.Foray.Duel.Duel4Dabog; -class RightArmRayNormal : Components.SelfTargetedAOEs -{ - public RightArmRayNormal() : base(ActionID.MakeSpell(AID.RightArmRayNormalAOE), new AOEShapeCircle(10)) { } -} +class RightArmRayNormal(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RightArmRayNormalAOE), new AOEShapeCircle(10)); class RightArmRayBuffed : Components.GenericAOEs { @@ -29,7 +26,7 @@ public SphereState(Actor sphere, Angle increment) public bool Active => _spheres.Count > 0; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_activation == default) yield break; @@ -40,24 +37,24 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, yield return new(_shape, s.Sphere.Position, s.RotNext, _activation, ArenaColor.Danger); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (_spheres.Count == 4 && NumCasts == 0) { // show positioning hint: find a pair of nearby spheres with opposite rotations, such that CCW is to the left of midpoint (if facing center) foreach (var ccwSphere in _spheres.Where(s => s.RotIncrement.Rad > 0)) { - var ccwOffset = ccwSphere.Sphere.Position - module.Bounds.Center; + var ccwOffset = ccwSphere.Sphere.Position - Module.Bounds.Center; foreach (var cwSphere in _spheres.Where(s => s.RotIncrement.Rad < 0)) { // nearby spheres have distance ~20 - var cwOffset = cwSphere.Sphere.Position - module.Bounds.Center; + var cwOffset = cwSphere.Sphere.Position - Module.Bounds.Center; if ((ccwOffset - cwOffset).LengthSq() < 500) { var midpointOffset = (ccwOffset + cwOffset) * 0.5f; if (midpointOffset.OrthoL().Dot(ccwOffset) < 0) { - arena.AddCircle(module.Bounds.Center + midpointOffset, 1, ArenaColor.Safe); + arena.AddCircle(Module.Bounds.Center + midpointOffset, 1, ArenaColor.Safe); } } } @@ -65,13 +62,13 @@ public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.RightArmRayAOEFirst) _activation = spell.NPCFinishAt; } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.RightArmRayAOEFirst or AID.RightArmRayAOERest) { @@ -84,11 +81,11 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent if (--sphere.NumCastsLeft == 0) _spheres.RemoveAt(sphereIndex); } - _activation = module.WorldState.CurrentTime.AddSeconds(1.6f); + _activation = WorldState.FutureTime(1.6f); } } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { var increment = (IconID)iconID switch { @@ -101,7 +98,4 @@ public override void OnEventIcon(BossModule module, Actor actor, uint iconID) } } -class RightArmRayVoidzone : Components.PersistentVoidzoneAtCastTarget -{ - public RightArmRayVoidzone() : base(5, ActionID.MakeSpell(AID.RightArmRayVoidzone), m => m.Enemies(OID.AtomicSphereVoidzone), 0.9f) { } -} +class RightArmRayVoidzone(BossModule module) : Components.PersistentVoidzoneAtCastTarget(module, 5, ActionID.MakeSpell(AID.RightArmRayVoidzone), m => m.Enemies(OID.AtomicSphereVoidzone), 0.9f); diff --git a/BossMod/Modules/Shadowbringers/Foray/Duel/Duel5Menenius/BlueHiddenMines.cs b/BossMod/Modules/Shadowbringers/Foray/Duel/Duel5Menenius/BlueHiddenMines.cs index 621ced2495..5c6d0a9ccf 100644 --- a/BossMod/Modules/Shadowbringers/Foray/Duel/Duel5Menenius/BlueHiddenMines.cs +++ b/BossMod/Modules/Shadowbringers/Foray/Duel/Duel5Menenius/BlueHiddenMines.cs @@ -2,7 +2,7 @@ internal class BlueHiddenMines : Components.GenericTowers { - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.ActivateBlueMine) { @@ -14,7 +14,7 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (Towers.Count > 0) { diff --git a/BossMod/Modules/Shadowbringers/Foray/Duel/Duel5Menenius/Duel5Menenius.cs b/BossMod/Modules/Shadowbringers/Foray/Duel/Duel5Menenius/Duel5Menenius.cs index f264b9832c..7d43f3d49d 100644 --- a/BossMod/Modules/Shadowbringers/Foray/Duel/Duel5Menenius/Duel5Menenius.cs +++ b/BossMod/Modules/Shadowbringers/Foray/Duel/Duel5Menenius/Duel5Menenius.cs @@ -1,31 +1,25 @@ namespace BossMod.Shadowbringers.Foray.Duel.Duel5Menenius; -class SpiralScourge : Components.SingleTargetCast -{ - public SpiralScourge() : base(ActionID.MakeSpell(AID.SpiralScourge), "Use Manawall, Excellence, or Invuln.") { } -} +class SpiralScourge(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.SpiralScourge), "Use Manawall, Excellence, or Invuln."); -class CallousCrossfire : Components.SingleTargetCast -{ - public CallousCrossfire() : base(ActionID.MakeSpell(AID.CallousCrossfire), "Use Light Curtain / Reflect.") { } -} +class CallousCrossfire(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.CallousCrossfire), "Use Light Curtain / Reflect."); class ReactiveMunition : Components.StayMove { - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID is SID.AccelerationBomb) { - if (module.Raid.FindSlot(actor.InstanceID) is var slot && slot >= 0 && slot < Requirements.Length) + if (Raid.FindSlot(actor.InstanceID) is var slot && slot >= 0 && slot < Requirements.Length) Requirements[slot] = Requirement.Stay; } } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { if ((SID)status.ID is SID.AccelerationBomb) { - if (module.Raid.FindSlot(actor.InstanceID) is var slot && slot >= 0 && slot < Requirements.Length) + if (Raid.FindSlot(actor.InstanceID) is var slot && slot >= 0 && slot < Requirements.Length) Requirements[slot] = Requirement.None; } } @@ -33,20 +27,20 @@ public override void OnStatusLose(BossModule module, Actor actor, ActorStatus st class SenseWeakness : Components.StayMove { - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.SenseWeakness) { - if (module.Raid.FindSlot(caster.TargetID) is var slot && slot >= 0 && slot < Requirements.Length) + if (Raid.FindSlot(caster.TargetID) is var slot && slot >= 0 && slot < Requirements.Length) Requirements[slot] = Requirement.Move; } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.SenseWeakness) { - if (module.Raid.FindSlot(caster.TargetID) is var slot && slot >= 0 && slot < Requirements.Length) + if (Raid.FindSlot(caster.TargetID) is var slot && slot >= 0 && slot < Requirements.Length) Requirements[slot] = Requirement.None; } } @@ -60,13 +54,7 @@ public MagitekImpetus() : base(3, (uint)SID.ForwardMarch, (uint)SID.AboutFace, ( } } -class ProactiveMunition : Components.StandardChasingAOEs -{ - public ProactiveMunition() : base(new AOEShapeCircle(6), ActionID.MakeSpell(AID.ProactiveMunitionTrackingStart), ActionID.MakeSpell(AID.ProactiveMunitionTrackingMove), 6, 1, 5) { } -} +class ProactiveMunition(BossModule module) : Components.StandardChasingAOEs(module, new AOEShapeCircle(6), ActionID.MakeSpell(AID.ProactiveMunitionTrackingStart), ActionID.MakeSpell(AID.ProactiveMunitionTrackingMove), 6, 1, 5); [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "SourP", GroupType = BossModuleInfo.GroupType.BozjaDuel, GroupID = 778, NameID = 23)] // bnpcname=9695 -public class Duel5Menenius : BossModule -{ - public Duel5Menenius(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsSquare(new(-810, 520 /*y=260.3*/), 20)) { } -} +public class Duel5Menenius(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsSquare(new(-810, 520 /*y=260.3*/), 20)); diff --git a/BossMod/Modules/Shadowbringers/Foray/Duel/Duel5Menenius/GigaTempest.cs b/BossMod/Modules/Shadowbringers/Foray/Duel/Duel5Menenius/GigaTempest.cs index c94b340ed6..64bf57524e 100644 --- a/BossMod/Modules/Shadowbringers/Foray/Duel/Duel5Menenius/GigaTempest.cs +++ b/BossMod/Modules/Shadowbringers/Foray/Duel/Duel5Menenius/GigaTempest.cs @@ -7,7 +7,7 @@ public GigaTempest(AOEShapeRect shape) : base(shape) { } public abstract bool IsStart(AID aid); public abstract bool IsMove(AID aid); - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if (IsStart((AID)spell.Action.ID)) { @@ -26,7 +26,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if (Lines.Count > 0 && IsStart((AID)spell.Action.ID) || IsMove((AID)spell.Action.ID)) { diff --git a/BossMod/Modules/Shadowbringers/Foray/Duel/Duel5Menenius/GunberdShot.cs b/BossMod/Modules/Shadowbringers/Foray/Duel/Duel5Menenius/GunberdShot.cs index d50ef49cf7..dc5d426cae 100644 --- a/BossMod/Modules/Shadowbringers/Foray/Duel/Duel5Menenius/GunberdShot.cs +++ b/BossMod/Modules/Shadowbringers/Foray/Duel/Duel5Menenius/GunberdShot.cs @@ -9,7 +9,7 @@ class GunberdShot : BossComponent public bool Gunberding { get; private set; } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (Gunberding) { @@ -27,7 +27,7 @@ public override void AddGlobalHints(BossModule module, GlobalHints hints) } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { @@ -45,7 +45,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { @@ -60,7 +60,7 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn } } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (Gunberding && windslicerLoaded) { diff --git a/BossMod/Modules/Shadowbringers/Foray/Duel/Duel5Menenius/RedHiddenMines.cs b/BossMod/Modules/Shadowbringers/Foray/Duel/Duel5Menenius/RedHiddenMines.cs index 61121871f3..1c4a0c8d98 100644 --- a/BossMod/Modules/Shadowbringers/Foray/Duel/Duel5Menenius/RedHiddenMines.cs +++ b/BossMod/Modules/Shadowbringers/Foray/Duel/Duel5Menenius/RedHiddenMines.cs @@ -6,9 +6,9 @@ class RedHiddenMines : Components.GenericAOEs private static readonly AOEShapeCircle _shapeTrigger = new(3.6f); private static readonly AOEShapeCircle _shapeExplosion = new(8f); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => _mines; + public override IEnumerable ActiveAOEs(int slot, Actor actor) => _mines; - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.ActivateRedMine) { @@ -20,7 +20,7 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.IndiscriminateDetonation) { diff --git a/BossMod/Modules/Shadowbringers/Foray/Duel/Duel5Menenius/Ruination.cs b/BossMod/Modules/Shadowbringers/Foray/Duel/Duel5Menenius/Ruination.cs index 8a042ab92a..81477a1c9f 100644 --- a/BossMod/Modules/Shadowbringers/Foray/Duel/Duel5Menenius/Ruination.cs +++ b/BossMod/Modules/Shadowbringers/Foray/Duel/Duel5Menenius/Ruination.cs @@ -5,9 +5,9 @@ class RuinationCross : Components.GenericAOEs private static readonly AOEShapeRect _aoeShape = new(20, 4, 20); private List _aoes = new(); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => _aoes; + public override IEnumerable ActiveAOEs(int slot, Actor actor) => _aoes; - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.Ruination) { @@ -16,7 +16,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.Ruination) { @@ -45,13 +45,13 @@ public LineWithActor(Actor caster) } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.RuinationExaStart) Lines.Add(new LineWithActor(caster)); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if (Lines.Count > 0 && (AID)spell.Action.ID is AID.RuinationExaStart or AID.RuinationExaMove) { diff --git a/BossMod/Modules/Shadowbringers/Hunt/RankA/Baal.cs b/BossMod/Modules/Shadowbringers/Hunt/RankA/Baal.cs index 96606f49e9..950c1aa524 100644 --- a/BossMod/Modules/Shadowbringers/Hunt/RankA/Baal.cs +++ b/BossMod/Modules/Shadowbringers/Hunt/RankA/Baal.cs @@ -16,15 +16,9 @@ public enum AID : uint SewageWave3 = 17421, // 2854->self, no cast, range 30 180-degree cone } -class SewerWater : Components.SelfTargetedAOEs -{ - public SewerWater() : base(ActionID.MakeSpell(AID.SewerWater), new AOEShapeCone(12, 90.Degrees())) { } -} +class SewerWater(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.SewerWater), new AOEShapeCone(12, 90.Degrees())); -class SewerWater2 : Components.SelfTargetedAOEs -{ - public SewerWater2() : base(ActionID.MakeSpell(AID.SewerWater2), new AOEShapeCone(12, 90.Degrees())) { } -} +class SewerWater2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.SewerWater2), new AOEShapeCone(12, 90.Degrees())); class SewageWave : Components.GenericAOEs { @@ -32,21 +26,21 @@ class SewageWave : Components.GenericAOEs private DateTime _activation; private Angle _rotation; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_activation != default) { if (NumCasts == 0) { - yield return new(cone, module.PrimaryActor.Position, _rotation, _activation, ArenaColor.Danger); - yield return new(cone, module.PrimaryActor.Position, _rotation + 180.Degrees(), _activation.AddSeconds(2.3f), risky: false); + yield return new(cone, Module.PrimaryActor.Position, _rotation, _activation, ArenaColor.Danger); + yield return new(cone, Module.PrimaryActor.Position, _rotation + 180.Degrees(), _activation.AddSeconds(2.3f), risky: false); } if (NumCasts == 1) - yield return new(cone, module.PrimaryActor.Position, _rotation + 180.Degrees(), _activation.AddSeconds(2.3f), ArenaColor.Danger); + yield return new(cone, Module.PrimaryActor.Position, _rotation + 180.Degrees(), _activation.AddSeconds(2.3f), ArenaColor.Danger); } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.SewageWave or AID.SewageWave2) { @@ -55,13 +49,13 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.SewageWave or AID.SewageWave2) ++NumCasts; } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.SewageWave1 or AID.SewageWave3) { diff --git a/BossMod/Modules/Shadowbringers/Hunt/RankA/Grassman.cs b/BossMod/Modules/Shadowbringers/Hunt/RankA/Grassman.cs index a17b568e6a..3e3f09047c 100644 --- a/BossMod/Modules/Shadowbringers/Hunt/RankA/Grassman.cs +++ b/BossMod/Modules/Shadowbringers/Hunt/RankA/Grassman.cs @@ -22,7 +22,7 @@ class ChestThump : BossComponent private bool casting; private DateTime _activation; - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.ChestThump) { @@ -31,7 +31,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.ChestThump) { @@ -41,7 +41,7 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.ChestThump2) { @@ -54,7 +54,7 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (casting && NumCasts == 0) hints.Add($"Raidwide"); @@ -62,26 +62,17 @@ public override void AddGlobalHints(BossModule module, GlobalHints hints) hints.Add($"Raidwide x5"); } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { - hints.PredictedDamage.Add((module.Raid.WithSlot().Mask(), _activation)); + hints.PredictedDamage.Add((Raid.WithSlot().Mask(), _activation)); } } -class StoolPelt : Components.LocationTargetedAOEs -{ - public StoolPelt() : base(ActionID.MakeSpell(AID.StoolPelt), 5) { } -} +class StoolPelt(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.StoolPelt), 5); -class Browbeat : Components.SingleTargetCast -{ - public Browbeat() : base(ActionID.MakeSpell(AID.Browbeat)) { } -} +class Browbeat(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.Browbeat)); -class Streak : Components.ChargeAOEs -{ - public Streak() : base(ActionID.MakeSpell(AID.Streak), 3) { } -} +class Streak(BossModule module) : Components.ChargeAOEs(module, ActionID.MakeSpell(AID.Streak), 3); class GrassmanStates : StateMachineBuilder { diff --git a/BossMod/Modules/Shadowbringers/Hunt/RankA/Huracan.cs b/BossMod/Modules/Shadowbringers/Hunt/RankA/Huracan.cs index f6390c87e5..2f97554c74 100644 --- a/BossMod/Modules/Shadowbringers/Hunt/RankA/Huracan.cs +++ b/BossMod/Modules/Shadowbringers/Hunt/RankA/Huracan.cs @@ -17,15 +17,9 @@ public enum AID : uint AutumnWreath = 17498, // Boss->self, 4,0s cast, range 10-20 donut } -class SpringBreeze : Components.SelfTargetedAOEs -{ - public SpringBreeze() : base(ActionID.MakeSpell(AID.SpringBreeze), new AOEShapeRect(40, 5, 40)) { } -} +class SpringBreeze(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.SpringBreeze), new AOEShapeRect(40, 5, 40)); -class SummerHeat : Components.RaidwideCast -{ - public SummerHeat() : base(ActionID.MakeSpell(AID.SummerHeat)) { } -} +class SummerHeat(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.SummerHeat)); class Combos : Components.GenericAOEs { @@ -37,21 +31,21 @@ class Combos : Components.GenericAOEs private Angle _rotation; private AOEShape? _shape; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_activation != default && _shape != null) { if (NumCasts == 0) { - yield return new(_shape, module.PrimaryActor.Position, _rotation, _activation, ArenaColor.Danger); - yield return new(rect2, module.PrimaryActor.Position, module.PrimaryActor.Rotation, _activation.AddSeconds(3.1f), risky: false); + yield return new(_shape, Module.PrimaryActor.Position, _rotation, _activation, ArenaColor.Danger); + yield return new(rect2, Module.PrimaryActor.Position, Module.PrimaryActor.Rotation, _activation.AddSeconds(3.1f), risky: false); } if (NumCasts == 1) - yield return new(rect2, module.PrimaryActor.Position, module.PrimaryActor.Rotation, _activation.AddSeconds(3.1f), ArenaColor.Danger); + yield return new(rect2, Module.PrimaryActor.Position, Module.PrimaryActor.Rotation, _activation.AddSeconds(3.1f), ArenaColor.Danger); } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.AutumnWreath) { @@ -73,13 +67,13 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.AutumnWreath or AID.DawnsEdge or AID.WinterRain) ++NumCasts; } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.Windburst) { diff --git a/BossMod/Modules/Shadowbringers/Hunt/RankA/LilMurderer.cs b/BossMod/Modules/Shadowbringers/Hunt/RankA/LilMurderer.cs index 8f5b36779d..3a87ccae3b 100644 --- a/BossMod/Modules/Shadowbringers/Hunt/RankA/LilMurderer.cs +++ b/BossMod/Modules/Shadowbringers/Hunt/RankA/LilMurderer.cs @@ -19,45 +19,30 @@ class GoblinSlash : Components.GenericAOEs { private AOEInstance? _aoe; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => Utils.ZeroOrOne(_aoe); + public override IEnumerable ActiveAOEs(int slot, Actor actor) => Utils.ZeroOrOne(_aoe); - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.GobthunderII && spell.LocXZ == caster.Position) - _aoe = new(new AOEShapeCircle(8), module.PrimaryActor.Position, activation: spell.NPCFinishAt.AddSeconds(2.6f)); + _aoe = new(new AOEShapeCircle(8), Module.PrimaryActor.Position, activation: spell.NPCFinishAt.AddSeconds(2.6f)); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.GoblinSlash) _aoe = null; } } -class GobthunderIII : Components.SpreadFromCastTargets -{ - public GobthunderIII() : base(ActionID.MakeSpell(AID.GobthunderIII), 20) { } -} +class GobthunderIII(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.GobthunderIII), 20); -class GobthunderIIIHint : Components.CastInterruptHint -{ - public GobthunderIIIHint() : base(ActionID.MakeSpell(AID.GobthunderIII)) { } -} +class GobthunderIIIHint(BossModule module) : Components.CastInterruptHint(module, ActionID.MakeSpell(AID.GobthunderIII)); -class GoblinPunch : Components.SingleTargetCast -{ - public GoblinPunch() : base(ActionID.MakeSpell(AID.GoblinPunch)) { } -} +class GoblinPunch(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.GoblinPunch)); -class Gobhaste : Components.CastHint -{ - public Gobhaste() : base(ActionID.MakeSpell(AID.Gobhaste), "Attack speed buff") { } -} +class Gobhaste(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.Gobhaste), "Attack speed buff"); -class GobthunderII : Components.LocationTargetedAOEs -{ - public GobthunderII() : base(ActionID.MakeSpell(AID.GobthunderII), 8) { } -} +class GobthunderII(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.GobthunderII), 8); class LilMurdererStates : StateMachineBuilder { diff --git a/BossMod/Modules/Shadowbringers/Hunt/RankA/Maliktender.cs b/BossMod/Modules/Shadowbringers/Hunt/RankA/Maliktender.cs index 904ab862cc..09cf06a116 100644 --- a/BossMod/Modules/Shadowbringers/Hunt/RankA/Maliktender.cs +++ b/BossMod/Modules/Shadowbringers/Hunt/RankA/Maliktender.cs @@ -20,35 +20,26 @@ public enum SID : uint Stun = 149, } -class Sabotendance : Components.SelfTargetedAOEs -{ - public Sabotendance() : base(ActionID.MakeSpell(AID.Sabotendance), new AOEShapeCircle(8)) { } -} +class Sabotendance(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Sabotendance), new AOEShapeCircle(8)); -class TwentyKNeedles : Components.SelfTargetedAOEs -{ - public TwentyKNeedles() : base(ActionID.MakeSpell(AID.TwentyKNeedles), new AOEShapeRect(20, 4)) { } -} +class TwentyKNeedles(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TwentyKNeedles), new AOEShapeRect(20, 4)); class Haste : BossComponent { private bool HasteB; - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.Haste) HasteB = true; } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (HasteB) hints.Add("Getting hit by the needle attack will instantly kill you from now on!"); } } -class NineNineNineKNeedles : Components.SelfTargetedAOEs -{ - public NineNineNineKNeedles() : base(ActionID.MakeSpell(AID.NineNineNineKNeedles), new AOEShapeRect(20, 4)) { } -} +class NineNineNineKNeedles(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.NineNineNineKNeedles), new AOEShapeRect(20, 4)); class MaliktenderStates : StateMachineBuilder { diff --git a/BossMod/Modules/Shadowbringers/Hunt/RankA/Nariphon.cs b/BossMod/Modules/Shadowbringers/Hunt/RankA/Nariphon.cs index d49a4f6b59..31866f5305 100644 --- a/BossMod/Modules/Shadowbringers/Hunt/RankA/Nariphon.cs +++ b/BossMod/Modules/Shadowbringers/Hunt/RankA/Nariphon.cs @@ -25,17 +25,14 @@ public enum IconID : uint Stackmarker = 62, // player } -class OdiousMiasma : Components.SelfTargetedAOEs -{ - public OdiousMiasma() : base(ActionID.MakeSpell(AID.OdiousMiasma), new AOEShapeCone(12, 60.Degrees())) { } -} +class OdiousMiasma(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.OdiousMiasma), new AOEShapeCone(12, 60.Degrees())); class AllergenInjection : Components.GenericBaitAway { private bool targeted; private Actor? target; - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.Baitaway) { @@ -45,7 +42,7 @@ public override void OnEventIcon(BossModule module, Actor actor, uint iconID) } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.AllergenInjection) { @@ -54,7 +51,7 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn } } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { base.AddHints(module, slot, actor, hints, movementHints); if (target == actor && targeted) @@ -66,24 +63,24 @@ class RootsOfAtopy : Components.GenericStackSpread { private BitMask _forbidden; - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.RootsOfAtopy) - Stacks.Add(new(module.WorldState.Actors.Find(spell.TargetID)!, 6, activation: spell.NPCFinishAt, forbiddenPlayers: _forbidden)); + Stacks.Add(new(WorldState.Actors.Find(spell.TargetID)!, 6, activation: spell.NPCFinishAt, forbiddenPlayers: _forbidden)); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.PiercingResistanceDownII) - _forbidden.Set(module.Raid.FindSlot(actor.InstanceID)); + _forbidden.Set(Raid.FindSlot(actor.InstanceID)); } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.PiercingResistanceDownII) - _forbidden.Clear(module.Raid.FindSlot(actor.InstanceID)); + _forbidden.Clear(Raid.FindSlot(actor.InstanceID)); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.RootsOfAtopy) Stacks.RemoveAt(0); diff --git a/BossMod/Modules/Shadowbringers/Hunt/RankA/Nuckelavee.cs b/BossMod/Modules/Shadowbringers/Hunt/RankA/Nuckelavee.cs index 960d909573..ab29093073 100644 --- a/BossMod/Modules/Shadowbringers/Hunt/RankA/Nuckelavee.cs +++ b/BossMod/Modules/Shadowbringers/Hunt/RankA/Nuckelavee.cs @@ -14,29 +14,23 @@ public enum AID : uint Spite = 18037, // 288F->self, no cast, range 8 circle } -class Torpedo : Components.SingleTargetDelayableCast -{ - public Torpedo() : base(ActionID.MakeSpell(AID.Torpedo)) { } -} +class Torpedo(BossModule module) : Components.SingleTargetDelayableCast(module, ActionID.MakeSpell(AID.Torpedo)); -class BogBody : Components.SpreadFromCastTargets -{ - public BogBody() : base(ActionID.MakeSpell(AID.BogBody), 5) { } -} +class BogBody(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.BogBody), 5); class Spite : Components.GenericAOEs { private AOEInstance? _aoe; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => Utils.ZeroOrOne(_aoe); + public override IEnumerable ActiveAOEs(int slot, Actor actor) => Utils.ZeroOrOne(_aoe); - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.Gallop) _aoe = new(new AOEShapeCircle(8), spell.LocXZ, activation: spell.NPCFinishAt); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.Spite) _aoe = null; diff --git a/BossMod/Modules/Shadowbringers/Hunt/RankA/OPoorestPauldia.cs b/BossMod/Modules/Shadowbringers/Hunt/RankA/OPoorestPauldia.cs index db29afa28c..b2375451d6 100644 --- a/BossMod/Modules/Shadowbringers/Hunt/RankA/OPoorestPauldia.cs +++ b/BossMod/Modules/Shadowbringers/Hunt/RankA/OPoorestPauldia.cs @@ -14,25 +14,13 @@ public enum AID : uint TheSpin = 16833, // 2820->self, 3,0s cast, range 40 circle } -class RustingClaw : Components.SelfTargetedAOEs -{ - public RustingClaw() : base(ActionID.MakeSpell(AID.RustingClaw), new AOEShapeCone(12.025f, 60.Degrees())) { } -} +class RustingClaw(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RustingClaw), new AOEShapeCone(12.025f, 60.Degrees())); -class TailDrive : Components.SelfTargetedAOEs -{ - public TailDrive() : base(ActionID.MakeSpell(AID.TailDrive), new AOEShapeCone(34.025f, 60.Degrees())) { } -} +class TailDrive(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TailDrive), new AOEShapeCone(34.025f, 60.Degrees())); -class WordsOfWoe : Components.SelfTargetedAOEs -{ - public WordsOfWoe() : base(ActionID.MakeSpell(AID.WordsOfWoe), new AOEShapeRect(49.025f, 3)) { } -} +class WordsOfWoe(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.WordsOfWoe), new AOEShapeRect(49.025f, 3)); -class TheSpin : Components.RaidwideCast -{ - public TheSpin() : base(ActionID.MakeSpell(AID.TheSpin)) { } -} +class TheSpin(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.TheSpin)); class OPoorestPauldiaStates : StateMachineBuilder { diff --git a/BossMod/Modules/Shadowbringers/Hunt/RankA/Rusalka.cs b/BossMod/Modules/Shadowbringers/Hunt/RankA/Rusalka.cs index 95f13de83d..10bae59ba7 100644 --- a/BossMod/Modules/Shadowbringers/Hunt/RankA/Rusalka.cs +++ b/BossMod/Modules/Shadowbringers/Hunt/RankA/Rusalka.cs @@ -14,15 +14,9 @@ public enum AID : uint Flood = 17369, // Boss->self, no cast, range 8 circle } -class Hydrocannon : Components.LocationTargetedAOEs -{ - public Hydrocannon() : base(ActionID.MakeSpell(AID.Hydrocannon), 8) { } -} +class Hydrocannon(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Hydrocannon), 8); -class AetherialSpark : Components.SelfTargetedAOEs -{ - public AetherialSpark() : base(ActionID.MakeSpell(AID.AetherialSpark), new AOEShapeRect(12, 2)) { } -} +class AetherialSpark(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.AetherialSpark), new AOEShapeRect(12, 2)); class AetherialPull : Components.KnockbackFromCastTarget { @@ -35,15 +29,15 @@ class Flood : Components.GenericAOEs { private AOEInstance? _aoe; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => Utils.ZeroOrOne(_aoe); + public override IEnumerable ActiveAOEs(int slot, Actor actor) => Utils.ZeroOrOne(_aoe); - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.AetherialPull) - _aoe = new(new AOEShapeCircle(8), module.PrimaryActor.Position, activation: spell.NPCFinishAt.AddSeconds(3.6f)); + _aoe = new(new AOEShapeCircle(8), Module.PrimaryActor.Position, activation: spell.NPCFinishAt.AddSeconds(3.6f)); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.Flood) _aoe = null; diff --git a/BossMod/Modules/Shadowbringers/Hunt/RankA/Sugaar.cs b/BossMod/Modules/Shadowbringers/Hunt/RankA/Sugaar.cs index be4fe16add..caada336bd 100644 --- a/BossMod/Modules/Shadowbringers/Hunt/RankA/Sugaar.cs +++ b/BossMod/Modules/Shadowbringers/Hunt/RankA/Sugaar.cs @@ -19,43 +19,34 @@ public enum AID : uint TailSnapAttract = 18101, // rotation, pulls player in from 30 by max 25 units between hitboxes, 3 attacks of TailSnapRotating } -class BodySlam : Components.SelfTargetedAOEs -{ - public BodySlam() : base(ActionID.MakeSpell(AID.BodySlam), new AOEShapeCircle(11)) { } -} +class BodySlam(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.BodySlam), new AOEShapeCircle(11)); -class NumbingNoise : Components.SelfTargetedAOEs -{ - public NumbingNoise() : base(ActionID.MakeSpell(AID.NumbingNoise), new AOEShapeCone(13, 60.Degrees())) { } -} +class NumbingNoise(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.NumbingNoise), new AOEShapeCone(13, 60.Degrees())); -class TailSnap : Components.SelfTargetedAOEs -{ - public TailSnap() : base(ActionID.MakeSpell(AID.TailSnap), new AOEShapeCone(18, 60.Degrees())) { } -} +class TailSnap(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TailSnap), new AOEShapeCone(18, 60.Degrees())); class NumbingNoiseTailSnapRotating : Components.GenericRotatingAOE { private static readonly AOEShapeCone _shapeNumbingNoise = new(13, 60.Degrees()); private static readonly AOEShapeCone _shapeTailSnap = new(18, 60.Degrees()); - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { case AID.NumbingNoiseAttract: // NN always seems to go CCW - Sequences.Add(new(_shapeNumbingNoise, module.PrimaryActor.Position, spell.Rotation, 120.Degrees(), spell.NPCFinishAt.AddSeconds(1.1f), 2.7f, 3)); + Sequences.Add(new(_shapeNumbingNoise, Module.PrimaryActor.Position, spell.Rotation, 120.Degrees(), spell.NPCFinishAt.AddSeconds(1.1f), 2.7f, 3)); break; case AID.TailSnapAttract: // TS always seems to go CW - Sequences.Add(new(_shapeTailSnap, module.PrimaryActor.Position, spell.Rotation + 180.Degrees(), -120.Degrees(), spell.NPCFinishAt.AddSeconds(1.1f), 2.7f, 3)); + Sequences.Add(new(_shapeTailSnap, Module.PrimaryActor.Position, spell.Rotation + 180.Degrees(), -120.Degrees(), spell.NPCFinishAt.AddSeconds(1.1f), 2.7f, 3)); break; } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if (Sequences.Count > 0 && (AID)spell.Action.ID is AID.NumbingNoiseRotating or AID.TailSnapRotating) - AdvanceSequence(0, module.WorldState.CurrentTime); + AdvanceSequence(0, WorldState.CurrentTime); } } @@ -68,23 +59,23 @@ class NumbingNoiseTailSnapAttract : Components.Knockback public override void Init(BossModule module) => _rotating = module.FindComponent(); - public override IEnumerable Sources(BossModule module, int slot, Actor actor) + public override IEnumerable Sources(int slot, Actor actor) { if (_activation != default) - yield return new(module.PrimaryActor.Position, 25, _activation, _shape, default, Kind.TowardsOrigin, module.PrimaryActor.HitboxRadius + actor.HitboxRadius); + yield return new(Module.PrimaryActor.Position, 25, _activation, _shape, default, Kind.TowardsOrigin, Module.PrimaryActor.HitboxRadius + actor.HitboxRadius); } public override bool DestinationUnsafe(BossModule module, int slot, Actor actor, WPos pos) => _rotating?.ActiveAOEs(module, slot, actor).Any(aoe => aoe.Check(pos)) ?? false; - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { - if (caster == module.PrimaryActor && (AID)spell.Action.ID is AID.NumbingNoiseAttract or AID.TailSnapAttract) + if (caster == Module.PrimaryActor && (AID)spell.Action.ID is AID.NumbingNoiseAttract or AID.TailSnapAttract) _activation = spell.NPCFinishAt; } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { - if (caster == module.PrimaryActor && (AID)spell.Action.ID is AID.NumbingNoiseAttract or AID.TailSnapAttract) + if (caster == Module.PrimaryActor && (AID)spell.Action.ID is AID.NumbingNoiseAttract or AID.TailSnapAttract) _activation = default; } } diff --git a/BossMod/Modules/Shadowbringers/Hunt/RankA/Supay.cs b/BossMod/Modules/Shadowbringers/Hunt/RankA/Supay.cs index 1a8d3fde5c..0b70c0163f 100644 --- a/BossMod/Modules/Shadowbringers/Hunt/RankA/Supay.cs +++ b/BossMod/Modules/Shadowbringers/Hunt/RankA/Supay.cs @@ -23,7 +23,7 @@ class BlasphemousHowl : Components.GenericBaitAway private bool targeted; private Actor? target; - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.Baitaway) { @@ -33,7 +33,7 @@ public override void OnEventIcon(BossModule module, Actor actor, uint iconID) } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.BlasphemousHowl) { @@ -42,7 +42,7 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn } } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { base.AddHints(module, slot, actor, hints, movementHints); if (target == actor && targeted) @@ -50,10 +50,7 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } } -class PetroEyes : Components.CastGaze -{ - public PetroEyes() : base(ActionID.MakeSpell(AID.PetroEyes)) { } -} +class PetroEyes(BossModule module) : Components.CastGaze(module, ActionID.MakeSpell(AID.PetroEyes)); class SupayStates : StateMachineBuilder { diff --git a/BossMod/Modules/Shadowbringers/Hunt/RankA/TheMudman.cs b/BossMod/Modules/Shadowbringers/Hunt/RankA/TheMudman.cs index a55f7d9cc4..5a501c7af8 100644 --- a/BossMod/Modules/Shadowbringers/Hunt/RankA/TheMudman.cs +++ b/BossMod/Modules/Shadowbringers/Hunt/RankA/TheMudman.cs @@ -19,27 +19,18 @@ public enum IconID : uint Baitaway = 140, // player } -class BogBequest : Components.SelfTargetedAOEs -{ - public BogBequest() : base(ActionID.MakeSpell(AID.BogBequest), new AOEShapeDonut(5, 20)) { } -} +class BogBequest(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.BogBequest), new AOEShapeDonut(5, 20)); -class FeculentFlood : Components.SelfTargetedAOEs -{ - public FeculentFlood() : base(ActionID.MakeSpell(AID.FeculentFlood), new AOEShapeCone(40, 30.Degrees())) { } -} +class FeculentFlood(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.FeculentFlood), new AOEShapeCone(40, 30.Degrees())); -class RoyalFlush : Components.SelfTargetedAOEs -{ - public RoyalFlush() : base(ActionID.MakeSpell(AID.RoyalFlush), new AOEShapeCircle(8)) { } -} +class RoyalFlush(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RoyalFlush), new AOEShapeCircle(8)); class GravityForce : Components.GenericBaitAway { private bool targeted; private Actor? target; - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.Baitaway) { @@ -49,7 +40,7 @@ public override void OnEventIcon(BossModule module, Actor actor, uint iconID) } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.GravityForce) { @@ -58,7 +49,7 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn } } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { base.AddHints(module, slot, actor, hints, movementHints); if (target == actor && targeted) @@ -66,10 +57,7 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } } -class GravityForceHint : Components.CastInterruptHint -{ - public GravityForceHint() : base(ActionID.MakeSpell(AID.GravityForce)) { } -} +class GravityForceHint(BossModule module) : Components.CastInterruptHint(module, ActionID.MakeSpell(AID.GravityForce)); class TheMudmanStates : StateMachineBuilder { diff --git a/BossMod/Modules/Shadowbringers/Hunt/RankS/Aglaope.cs b/BossMod/Modules/Shadowbringers/Hunt/RankS/Aglaope.cs index 68b86effe2..8e3f1753fe 100644 --- a/BossMod/Modules/Shadowbringers/Hunt/RankS/Aglaope.cs +++ b/BossMod/Modules/Shadowbringers/Hunt/RankS/Aglaope.cs @@ -23,10 +23,7 @@ public enum SID : uint Bleeding = 642, // Boss->player, extra=0x0 } -class SongOfTorment : Components.CastInterruptHint -{ - public SongOfTorment() : base(ActionID.MakeSpell(AID.SongOfTorment), hintExtra: "Raidwide + Bleed") { } -} +class SongOfTorment(BossModule module) : Components.CastInterruptHint(module, ActionID.MakeSpell(AID.SongOfTorment), hintExtra: "Raidwide + Bleed"); //TODO: ideally this AOE should just wait for Effect Results, since they can be delayed by over 2.1s, which would cause unknowning players and AI to run back into the death zone, //not sure how to do this though considering there can be anywhere from 0-32 targets with different time for effect results each @@ -37,13 +34,13 @@ class SeductiveSonata : Components.GenericAOEs private bool casting; private static readonly AOEShapeCircle circle = new(16.2f); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { - if (casting || (_time != default && _time > module.WorldState.CurrentTime)) - yield return new(circle, module.PrimaryActor.Position, activation: _activation); + if (casting || (_time != default && _time > WorldState.CurrentTime)) + yield return new(circle, Module.PrimaryActor.Position, activation: _activation); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.SeductiveSonata) { @@ -53,9 +50,9 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void Update(BossModule module) + public override void Update() { - if (_time != default && _time < module.WorldState.CurrentTime) + if (_time != default && _time < WorldState.CurrentTime) { _time = default; casting = false; @@ -63,35 +60,17 @@ public override void Update(BossModule module) } } -class DeathlyVerse : Components.SelfTargetedAOEs -{ - public DeathlyVerse() : base(ActionID.MakeSpell(AID.DeathlyVerse), new AOEShapeCircle(6)) { } -} +class DeathlyVerse(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.DeathlyVerse), new AOEShapeCircle(6)); -class Tornado : Components.LocationTargetedAOEs -{ - public Tornado() : base(ActionID.MakeSpell(AID.Tornado), 6) { } -} +class Tornado(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Tornado), 6); -class FourfoldSuffering : Components.SelfTargetedAOEs -{ - public FourfoldSuffering() : base(ActionID.MakeSpell(AID.FourfoldSuffering), new AOEShapeDonut(5, 50)) { } -} +class FourfoldSuffering(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.FourfoldSuffering), new AOEShapeDonut(5, 50)); -class AncientAero : Components.SelfTargetedAOEs -{ - public AncientAero() : base(ActionID.MakeSpell(AID.AncientAero), new AOEShapeRect(42.4f, 3)) { } -} +class AncientAero(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.AncientAero), new AOEShapeRect(42.4f, 3)); -class AncientAeroIII : Components.RaidwideCast -{ - public AncientAeroIII() : base(ActionID.MakeSpell(AID.AncientAeroIII)) { } -} +class AncientAeroIII(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.AncientAeroIII)); -class AncientAeroIIIKB : Components.KnockbackFromCastTarget -{ - public AncientAeroIIIKB() : base(ActionID.MakeSpell(AID.AncientAeroIII), 10, shape: new AOEShapeCircle(30)) { } -} +class AncientAeroIIIKB(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.AncientAeroIII), 10, shape: new AOEShapeCircle(30)); class AglaopeStates : StateMachineBuilder { @@ -110,7 +89,4 @@ public AglaopeStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.Hunt, GroupID = (uint)BossModuleInfo.HuntRank.S, NameID = 8653)] -public class Aglaope : SimpleBossModule -{ - public Aglaope(WorldState ws, Actor primary) : base(ws, primary) { } -} +public class Aglaope(WorldState ws, Actor primary) : SimpleBossModule(ws, primary); diff --git a/BossMod/Modules/Shadowbringers/Hunt/RankS/ForgivenGossip.cs b/BossMod/Modules/Shadowbringers/Hunt/RankS/ForgivenGossip.cs index 4b7127971b..2cc5080b0e 100644 --- a/BossMod/Modules/Shadowbringers/Hunt/RankS/ForgivenGossip.cs +++ b/BossMod/Modules/Shadowbringers/Hunt/RankS/ForgivenGossip.cs @@ -12,15 +12,9 @@ public enum AID : uint PetrifyingEye = 18041, // Boss->self, 3,0s cast, range 40 circle } -class Icefall : Components.LocationTargetedAOEs -{ - public Icefall() : base(ActionID.MakeSpell(AID.Icefall), 5) { } -} +class Icefall(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Icefall), 5); -class PetrifyingEye : Components.CastGaze -{ - public PetrifyingEye() : base(ActionID.MakeSpell(AID.PetrifyingEye)) { } -} +class PetrifyingEye(BossModule module) : Components.CastGaze(module, ActionID.MakeSpell(AID.PetrifyingEye)); class ForgivenGossipStates : StateMachineBuilder { @@ -33,7 +27,4 @@ public ForgivenGossipStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.Hunt, GroupID = (uint)BossModuleInfo.HuntRank.SS, NameID = 8916)] -public class ForgivenGossip : SimpleBossModule -{ - public ForgivenGossip(WorldState ws, Actor primary) : base(ws, primary) { } -} +public class ForgivenGossip(WorldState ws, Actor primary) : SimpleBossModule(ws, primary); diff --git a/BossMod/Modules/Shadowbringers/Hunt/RankS/ForgivenPedantry.cs b/BossMod/Modules/Shadowbringers/Hunt/RankS/ForgivenPedantry.cs index ade798aa3f..819bc2fb00 100644 --- a/BossMod/Modules/Shadowbringers/Hunt/RankS/ForgivenPedantry.cs +++ b/BossMod/Modules/Shadowbringers/Hunt/RankS/ForgivenPedantry.cs @@ -28,21 +28,21 @@ class LeftRightCheek : Components.GenericAOEs private DateTime _activation; private Angle _rotation; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_activation != default) { if (NumCasts == 0) { - yield return new(cone, module.PrimaryActor.Position, _rotation, _activation, ArenaColor.Danger); - yield return new(cone, module.PrimaryActor.Position, _rotation + 180.Degrees(), _activation.AddSeconds(3.1f), risky: false); + yield return new(cone, Module.PrimaryActor.Position, _rotation, _activation, ArenaColor.Danger); + yield return new(cone, Module.PrimaryActor.Position, _rotation + 180.Degrees(), _activation.AddSeconds(3.1f), risky: false); } if (NumCasts == 1) - yield return new(cone, module.PrimaryActor.Position, _rotation + 180.Degrees(), _activation.AddSeconds(3.1f), ArenaColor.Danger); + yield return new(cone, Module.PrimaryActor.Position, _rotation + 180.Degrees(), _activation.AddSeconds(3.1f), ArenaColor.Danger); } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.LeftCheek or AID.RightCheek) { @@ -51,13 +51,13 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.LeftCheek or AID.RightCheek) ++NumCasts; } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.LeftCheek2 or AID.RightCheek2) { @@ -67,64 +67,49 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } -class TerrifyingGlance : Components.CastGaze -{ - public TerrifyingGlance() : base(ActionID.MakeSpell(AID.TerrifyingGlance)) { } -} +class TerrifyingGlance(BossModule module) : Components.CastGaze(module, ActionID.MakeSpell(AID.TerrifyingGlance)); -class TheStake : Components.SelfTargetedAOEs -{ - public TheStake() : base(ActionID.MakeSpell(AID.TheStake), new AOEShapeCircle(18)) { } -} +class TheStake(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TheStake), new AOEShapeCircle(18)); -class SecondCircle : Components.SelfTargetedAOEs -{ - public SecondCircle() : base(ActionID.MakeSpell(AID.SecondCircle), new AOEShapeRect(40, 4)) { } -} +class SecondCircle(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.SecondCircle), new AOEShapeRect(40, 4)); -class CleansingFire : Components.CastGaze -{ - public CleansingFire() : base(ActionID.MakeSpell(AID.CleansingFire)) { } -} +class CleansingFire(BossModule module) : Components.CastGaze(module, ActionID.MakeSpell(AID.CleansingFire)); class FeveredFlagellation : Components.BaitAwayCast { public FeveredFlagellation() : base(ActionID.MakeSpell(AID.FeveredFlagellation), new AOEShapeCone(15, 45.Degrees())) { } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) { } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) //tankbuster resolves on cast event, which can be delayed by moving out of tankbuster range + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { } + public override void OnEventCast(Actor caster, ActorCastEvent spell) //tankbuster resolves on cast event, which can be delayed by moving out of tankbuster range { if (spell.Action == WatchedAction) CurrentBaits.RemoveAll(b => b.Source == caster); } } -class FeveredFlagellationHint : Components.SingleTargetCast -{ - public FeveredFlagellationHint() : base(ActionID.MakeSpell(AID.FeveredFlagellation), "Cleave tankbuster") { } -} +class FeveredFlagellationHint(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.FeveredFlagellation), "Cleave tankbuster"); class WitchHunt : Components.GenericBaitAway { private static readonly AOEShapeRect rect = new AOEShapeRect(0, 5); private bool witchHunt1done; - public override void Update(BossModule module) + public override void Update() { foreach (var b in CurrentBaits) ((AOEShapeRect)b.Shape).LengthFront = (b.Target.Position - b.Source.Position).Length(); if (CurrentBaits.Count > 0 && witchHunt1done) //updating WitchHunt2 target incase of sudden tank swap { var Target = CurrentBaits[0]; - Target.Target = module.WorldState.Actors.Find(module.PrimaryActor.TargetID)!; + Target.Target = WorldState.Actors.Find(Module.PrimaryActor.TargetID)!; CurrentBaits[0] = Target; } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.SanctifiedShock) - CurrentBaits.Add(new(module.PrimaryActor, module.WorldState.Actors.Find(spell.MainTargetID)!, rect)); + CurrentBaits.Add(new(Module.PrimaryActor, WorldState.Actors.Find(spell.MainTargetID)!, rect)); if ((AID)spell.Action.ID == AID.WitchHunt2) { CurrentBaits.Clear(); @@ -132,12 +117,12 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.WitchHunt) { CurrentBaits.Clear(); - CurrentBaits.Add(new(module.PrimaryActor, module.WorldState.Actors.Find(module.PrimaryActor.TargetID)!, rect)); + CurrentBaits.Add(new(Module.PrimaryActor, WorldState.Actors.Find(Module.PrimaryActor.TargetID)!, rect)); } } } @@ -159,7 +144,4 @@ public ForgivenPedantryStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.Hunt, GroupID = (uint)BossModuleInfo.HuntRank.S, NameID = 8910)] -public class ForgivenPedantry : SimpleBossModule -{ - public ForgivenPedantry(WorldState ws, Actor primary) : base(ws, primary) { } -} +public class ForgivenPedantry(WorldState ws, Actor primary) : SimpleBossModule(ws, primary); diff --git a/BossMod/Modules/Shadowbringers/Hunt/RankS/ForgivenRebellion.cs b/BossMod/Modules/Shadowbringers/Hunt/RankS/ForgivenRebellion.cs index dcc18c36d2..35627dfb21 100644 --- a/BossMod/Modules/Shadowbringers/Hunt/RankS/ForgivenRebellion.cs +++ b/BossMod/Modules/Shadowbringers/Hunt/RankS/ForgivenRebellion.cs @@ -48,25 +48,25 @@ class SanctifiedBlizzardChain : Components.GenericRotatingAOE private Angle _rot2; private static readonly AOEShapeCone _shape = new(40, 22.5f.Degrees()); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { // direction seems to be server side until after first rotation if (_rot1 != default && Sequences.Count == 0 && NumCasts == 0) { - yield return new(_shape, module.PrimaryActor.Position, _rot1, _activation, ImminentColor); - yield return new(_shape, module.PrimaryActor.Position, _rot1 + 45.Degrees(), _activation, FutureColor); - yield return new(_shape, module.PrimaryActor.Position, _rot1 - 45.Degrees(), _activation, FutureColor); + yield return new(_shape, Module.PrimaryActor.Position, _rot1, _activation, ImminentColor); + yield return new(_shape, Module.PrimaryActor.Position, _rot1 + 45.Degrees(), _activation, FutureColor); + yield return new(_shape, Module.PrimaryActor.Position, _rot1 - 45.Degrees(), _activation, FutureColor); } if (_rot1 != default && Sequences.Count == 0 && NumCasts == 1) { - yield return new(_shape, module.PrimaryActor.Position, _rot1 + 45.Degrees(), _activation, ImminentColor); - yield return new(_shape, module.PrimaryActor.Position, _rot1 - 45.Degrees(), _activation, ImminentColor); + yield return new(_shape, Module.PrimaryActor.Position, _rot1 + 45.Degrees(), _activation, ImminentColor); + yield return new(_shape, Module.PrimaryActor.Position, _rot1 - 45.Degrees(), _activation, ImminentColor); } foreach (var s in Sequences) { int num = Math.Min(s.NumRemainingCasts, s.MaxShownAOEs); var rot = s.Rotation; - var time = s.NextActivation > module.WorldState.CurrentTime ? s.NextActivation : module.WorldState.CurrentTime; + var time = s.NextActivation > WorldState.CurrentTime ? s.NextActivation : WorldState.CurrentTime; for (int i = 1; i < num; ++i) { rot += s.Increment; @@ -79,7 +79,7 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, yield return new(s.Shape, s.Origin, s.Rotation, s.NextActivation, ImminentColor); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.SanctifiedBlizzardChain) { @@ -95,17 +95,17 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf if ((_rot1 - _rot2).Normalized().Rad < 0) _increment = 45.Degrees(); if (Sequences.Count == 0) - Sequences.Add(new(_shape, module.PrimaryActor.Position, _rot2, _increment, _activation, 1.3f, 7)); + Sequences.Add(new(_shape, Module.PrimaryActor.Position, _rot2, _increment, _activation, 1.3f, 7)); } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.SanctifiedBlizzardChain) ++NumCasts; if ((AID)spell.Action.ID is AID.SanctifiedBlizzardChain2 or AID.SanctifiedBlizzardChain3) { if (Sequences.Count > 0) - AdvanceSequence(0, module.WorldState.CurrentTime); + AdvanceSequence(0, WorldState.CurrentTime); if (NumCasts == 8) { NumCasts = 0; @@ -116,10 +116,7 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn } } -class SanctifiedBlizzardChainHint : Components.RaidwideCast -{ - public SanctifiedBlizzardChainHint() : base(ActionID.MakeSpell(AID.SanctifiedBlizzardChain), "Rotation direction undeterminable until start of the 2nd cast") { } -} +class SanctifiedBlizzardChainHint(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.SanctifiedBlizzardChain), "Rotation direction undeterminable until start of the 2nd cast"); class HeavenlyCyclone : Components.GenericRotatingAOE { @@ -128,7 +125,7 @@ class HeavenlyCyclone : Components.GenericRotatingAOE private DateTime _activation; private static readonly AOEShapeCone _shape = new(28, 90.Degrees()); - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { var increment = (IconID)iconID switch { @@ -143,7 +140,7 @@ public override void OnEventIcon(BossModule module, Actor actor, uint iconID) } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.RotateCW or AID.RotateCCW) { @@ -154,10 +151,10 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf InitIfReady(module, caster); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if (Sequences.Count > 0 && (AID)spell.Action.ID is AID.HeavenlyCyclone or AID.HeavenlyCyclone1 or AID.HeavenlyCyclone2) - AdvanceSequence(0, module.WorldState.CurrentTime); + AdvanceSequence(0, WorldState.CurrentTime); } private void InitIfReady(BossModule module, Actor source) @@ -171,30 +168,15 @@ private void InitIfReady(BossModule module, Actor source) } } -class HeavenlyScythe : Components.SelfTargetedAOEs -{ - public HeavenlyScythe() : base(ActionID.MakeSpell(AID.HeavenlyScythe), new AOEShapeCircle(10)) { } -} +class HeavenlyScythe(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HeavenlyScythe), new AOEShapeCircle(10)); -class RagingFire : Components.SelfTargetedAOEs -{ - public RagingFire() : base(ActionID.MakeSpell(AID.RagingFire), new AOEShapeDonut(5, 40)) { } -} +class RagingFire(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RagingFire), new AOEShapeDonut(5, 40)); -class Interference : Components.SelfTargetedAOEs -{ - public Interference() : base(ActionID.MakeSpell(AID.Interference), new AOEShapeCone(28, 90.Degrees())) { } -} +class Interference(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Interference), new AOEShapeCone(28, 90.Degrees())); -class SanctifiedBlizzard : Components.SelfTargetedAOEs -{ - public SanctifiedBlizzard() : base(ActionID.MakeSpell(AID.SanctifiedBlizzard), new AOEShapeCone(40, 22.5f.Degrees())) { } -} +class SanctifiedBlizzard(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.SanctifiedBlizzard), new AOEShapeCone(40, 22.5f.Degrees())); -class RoyalDecree : Components.RaidwideCast -{ - public RoyalDecree() : base(ActionID.MakeSpell(AID.RoyalDecree)) { } -} +class RoyalDecree(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.RoyalDecree)); class MindJack : Components.StatusDrivenForcedMarch { @@ -229,7 +211,4 @@ public ForgivenRebellionStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.Hunt, GroupID = (uint)BossModuleInfo.HuntRank.SS, NameID = 8915)] -public class ForgivenRebellion : SimpleBossModule -{ - public ForgivenRebellion(WorldState ws, Actor primary) : base(ws, primary) { } -} +public class ForgivenRebellion(WorldState ws, Actor primary) : SimpleBossModule(ws, primary); diff --git a/BossMod/Modules/Shadowbringers/Hunt/RankS/Gunitt.cs b/BossMod/Modules/Shadowbringers/Hunt/RankS/Gunitt.cs index a5474e1dfb..337769c4af 100644 --- a/BossMod/Modules/Shadowbringers/Hunt/RankS/Gunitt.cs +++ b/BossMod/Modules/Shadowbringers/Hunt/RankS/Gunitt.cs @@ -30,41 +30,23 @@ public enum IconID : uint } -class TheDeepSeeks : Components.SingleTargetCast -{ - public TheDeepSeeks() : base(ActionID.MakeSpell(AID.TheDeepSeeks)) { } -} +class TheDeepSeeks(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.TheDeepSeeks)); -class TheDeepReaches : Components.SelfTargetedAOEs -{ - public TheDeepReaches() : base(ActionID.MakeSpell(AID.TheDeepReaches), new AOEShapeRect(40, 1)) { } -} +class TheDeepReaches(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TheDeepReaches), new AOEShapeRect(40, 1)); -class TheDeepBeckons : Components.RaidwideCast -{ - public TheDeepBeckons() : base(ActionID.MakeSpell(AID.TheDeepBeckons)) { } -} +class TheDeepBeckons(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.TheDeepBeckons)); -class CoinToss : Components.CastGaze -{ - public CoinToss() : base(ActionID.MakeSpell(AID.CoinToss)) { } -} +class CoinToss(BossModule module) : Components.CastGaze(module, ActionID.MakeSpell(AID.CoinToss)); -class TheDeepRends : Components.SelfTargetedAOEs -{ - public TheDeepRends() : base(ActionID.MakeSpell(AID.TheDeepRends), new AOEShapeCone(20, 30.Degrees())) { } -} +class TheDeepRends(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TheDeepRends), new AOEShapeCone(20, 30.Degrees())); -class TheDeepRendsHint : Components.CastHint -{ - public TheDeepRendsHint() : base(ActionID.MakeSpell(AID.TheDeepRends), "Targets 5 random players after initial hit") { } -} +class TheDeepRendsHint(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.TheDeepRends), "Targets 5 random players after initial hit"); class SwivelGun : Components.GenericStackSpread { private BitMask _forbidden; - public override void Update(BossModule module) + public override void Update() { if (Stacks.Count > 0) //updating forbiddenplayers because debuffs can be applied after new stack marker appears { @@ -74,24 +56,24 @@ public override void Update(BossModule module) } } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.Stackmarker) - Stacks.Add(new(actor, 10, activation: module.WorldState.CurrentTime.AddSeconds(5), forbiddenPlayers: _forbidden)); + Stacks.Add(new(actor, 10, activation: WorldState.FutureTime(5), forbiddenPlayers: _forbidden)); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.MagicVulnerabilityUp) - _forbidden.Set(module.Raid.FindSlot(actor.InstanceID)); + _forbidden.Set(Raid.FindSlot(actor.InstanceID)); } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.MagicVulnerabilityUp) - _forbidden.Clear(module.Raid.FindSlot(actor.InstanceID)); + _forbidden.Clear(Raid.FindSlot(actor.InstanceID)); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.SwivelGun) Stacks.RemoveAt(0); @@ -114,7 +96,4 @@ public GunittStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.Hunt, GroupID = (uint)BossModuleInfo.HuntRank.S, NameID = 8895)] -public class Gunitt : SimpleBossModule -{ - public Gunitt(WorldState ws, Actor primary) : base(ws, primary) { } -} +public class Gunitt(WorldState ws, Actor primary) : SimpleBossModule(ws, primary); diff --git a/BossMod/Modules/Shadowbringers/Hunt/RankS/Ixtab.cs b/BossMod/Modules/Shadowbringers/Hunt/RankS/Ixtab.cs index 634126deb6..73704e7f30 100644 --- a/BossMod/Modules/Shadowbringers/Hunt/RankS/Ixtab.cs +++ b/BossMod/Modules/Shadowbringers/Hunt/RankS/Ixtab.cs @@ -36,10 +36,10 @@ class DualCastTartareanFlameThunder : Components.GenericAOEs private static readonly AOEShapeCircle circle = new(20); private static readonly AOEShapeDonut donut = new(8, 40); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => _aoes.Take(1); - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override IEnumerable ActiveAOEs(int slot, Actor actor) => _aoes.Take(1); + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { - var dualcast = module.PrimaryActor.FindStatus(SID.Dualcast) != null; + var dualcast = Module.PrimaryActor.FindStatus(SID.Dualcast) != null; if ((AID)spell.Action.ID == AID.TartareanThunder) if (!dualcast) _aoes.Add(new(circle, caster.Position, activation: spell.NPCFinishAt)); @@ -58,94 +58,67 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if (_aoes.Count > 0 && (AID)spell.Action.ID is AID.TartareanThunder or AID.TartareanFlame) _aoes.RemoveAt(0); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if (_aoes.Count > 0 && (AID)spell.Action.ID is AID.TartareanThunder2 or AID.TartareanFlame2) _aoes.RemoveAt(0); } } -class TartareanTwister : Components.CastInterruptHint -{ - public TartareanTwister() : base(ActionID.MakeSpell(AID.TartareanTwister)) { } -} +class TartareanTwister(BossModule module) : Components.CastInterruptHint(module, ActionID.MakeSpell(AID.TartareanTwister)); -class TartareanBlizzard : Components.SelfTargetedAOEs -{ - public TartareanBlizzard() : base(ActionID.MakeSpell(AID.TartareanBlizzard), new AOEShapeCone(40, 22.5f.Degrees())) { } -} +class TartareanBlizzard(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TartareanBlizzard), new AOEShapeCone(40, 22.5f.Degrees())); -class TartareanQuake : Components.RaidwideCast -{ - public TartareanQuake() : base(ActionID.MakeSpell(AID.TartareanQuake)) { } -} +class TartareanQuake(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.TartareanQuake)); -class TartareanAbyss : Components.BaitAwayCast -{ - public TartareanAbyss() : base(ActionID.MakeSpell(AID.TartareanAbyss), new AOEShapeCircle(6), true) { } -} +class TartareanAbyss(BossModule module) : Components.BaitAwayCast(module, ActionID.MakeSpell(AID.TartareanAbyss), new AOEShapeCircle(6), true); -class TartareanAbyssHint : Components.SingleTargetCast -{ - public TartareanAbyssHint() : base(ActionID.MakeSpell(AID.TartareanAbyss), "Tankbuster circle") { } -} +class TartareanAbyssHint(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.TartareanAbyss), "Tankbuster circle"); -class TartareanFlare : Components.LocationTargetedAOEs -{ - public TartareanFlare() : base(ActionID.MakeSpell(AID.TartareanFlare), 18) { } -} +class TartareanFlare(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.TartareanFlare), 18); -class TartareanMeteor : Components.StackWithCastTargets -{ - public TartareanMeteor() : base(ActionID.MakeSpell(AID.TartareanMeteor), 10) { } -} +class TartareanMeteor(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.TartareanMeteor), 10); -class ArchaicDualcast : Components.CastHint -{ - public ArchaicDualcast() : base(ActionID.MakeSpell(AID.ArchaicDualcast), "Preparing In/Out or Out/In AOE") { } -} +class ArchaicDualcast(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.ArchaicDualcast), "Preparing In/Out or Out/In AOE"); class Cryptcall : Components.BaitAwayCast { public Cryptcall() : base(ActionID.MakeSpell(AID.Cryptcall), new AOEShapeCone(38.24f, 60.Degrees())) { } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) { } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) //bait resolves on cast event instead of cast finish + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { } + public override void OnEventCast(Actor caster, ActorCastEvent spell) //bait resolves on cast event instead of cast finish { if (spell.Action == WatchedAction) CurrentBaits.RemoveAll(b => b.Source == caster); } } -class CryptcallHint : Components.CastHint -{ - public CryptcallHint() : base(ActionID.MakeSpell(AID.Cryptcall), "Cone reduces health to 1 + applies Doom") { } -} +class CryptcallHint(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.Cryptcall), "Cone reduces health to 1 + applies Doom"); class Doom : BossComponent { private readonly List _doomed = []; public bool Doomed { get; private set; } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Doom) _doomed.Add(actor); } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Doom) _doomed.Remove(actor); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_doomed.Contains(actor) && !(actor.Role == Role.Healer)) hints.Add("You were doomed! Get healed to full fast."); @@ -155,7 +128,7 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint hints.Add($"One or more players are affected by doom. Heal them to full."); } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { base.AddAIHints(module, slot, actor, assignment, hints); foreach (var c in _doomed) @@ -189,7 +162,4 @@ public IxtabStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.Hunt, GroupID = (uint)BossModuleInfo.HuntRank.S, NameID = 8890)] -public class Ixtab : SimpleBossModule -{ - public Ixtab(WorldState ws, Actor primary) : base(ws, primary) { } -} +public class Ixtab(WorldState ws, Actor primary) : SimpleBossModule(ws, primary); diff --git a/BossMod/Modules/Shadowbringers/Hunt/RankS/Tarchia.cs b/BossMod/Modules/Shadowbringers/Hunt/RankS/Tarchia.cs index b64a1a87a7..dc0e4f4646 100644 --- a/BossMod/Modules/Shadowbringers/Hunt/RankS/Tarchia.cs +++ b/BossMod/Modules/Shadowbringers/Hunt/RankS/Tarchia.cs @@ -19,59 +19,38 @@ public enum AID : uint Groundstorm = 18023, // Boss->self, 5,0s cast, range 5-40 donut } -class WildHorn : Components.SelfTargetedAOEs -{ - public WildHorn() : base(ActionID.MakeSpell(AID.WildHorn), new AOEShapeCone(17, 60.Degrees())) { } -} +class WildHorn(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.WildHorn), new AOEShapeCone(17, 60.Degrees())); -class Trounce : Components.SelfTargetedAOEs -{ - public Trounce() : base(ActionID.MakeSpell(AID.Trounce), new AOEShapeCone(40, 30.Degrees())) { } -} +class Trounce(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Trounce), new AOEShapeCone(40, 30.Degrees())); -class Groundstorm : Components.SelfTargetedAOEs -{ - public Groundstorm() : base(ActionID.MakeSpell(AID.Groundstorm), new AOEShapeDonut(5, 40)) { } -} +class Groundstorm(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Groundstorm), new AOEShapeDonut(5, 40)); -class MightySpin : Components.SelfTargetedAOEs -{ - public MightySpin() : base(ActionID.MakeSpell(AID.MightySpin), new AOEShapeCircle(14)) { } -} +class MightySpin(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.MightySpin), new AOEShapeCircle(14)); -class ForestFire : Components.SelfTargetedAOEs -{ - public ForestFire() : base(ActionID.MakeSpell(AID.ForestFire), new AOEShapeCircle(15)) { } -} +class ForestFire(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ForestFire), new AOEShapeCircle(15)); -class BafflementBulb : Components.CastHint -{ - public BafflementBulb() : base(ActionID.MakeSpell(AID.BafflementBulb), "Pull + Temporary Misdirection -> Donut -> Out") { } -} +class BafflementBulb(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.BafflementBulb), "Pull + Temporary Misdirection -> Donut -> Out"); -class MetamorphicBlast : Components.RaidwideCast -{ - public MetamorphicBlast() : base(ActionID.MakeSpell(AID.MetamorphicBlast)) { } -} +class MetamorphicBlast(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.MetamorphicBlast)); class MightySpin2 : Components.GenericAOEs { private DateTime _activation; private static readonly AOEShapeCircle circle = new(14); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_activation != default || NumCasts == 0) - yield return new(circle, module.PrimaryActor.Position, activation: _activation); + yield return new(circle, Module.PrimaryActor.Position, activation: _activation); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.Groundstorm) _activation = spell.NPCFinishAt.AddSeconds(4); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.MightySpin2 or AID.Trounce or AID.AutoAttack or AID.MightySpin or AID.WildHorn or AID.Groundstorm or AID.BafflementBulb or AID.MetamorphicBlast or AID.Groundstorm) //everything but Mightyspin2 is a failsafe incase player joins fight/starts replay record late and Numcasts is 0 because of it ++NumCasts; diff --git a/BossMod/Modules/Shadowbringers/Hunt/RankS/Tyger.cs b/BossMod/Modules/Shadowbringers/Hunt/RankS/Tyger.cs index aa526b8b23..4548198cdd 100644 --- a/BossMod/Modules/Shadowbringers/Hunt/RankS/Tyger.cs +++ b/BossMod/Modules/Shadowbringers/Hunt/RankS/Tyger.cs @@ -17,75 +17,51 @@ public enum AID : uint TheRamsVoice = 16962, // Boss->self, 4,0s cast, range 9 circle } -class TheLionsBreath : Components.SelfTargetedAOEs -{ - public TheLionsBreath() : base(ActionID.MakeSpell(AID.TheLionsBreath), new AOEShapeCone(30, 60.Degrees())) { } -} +class TheLionsBreath(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TheLionsBreath), new AOEShapeCone(30, 60.Degrees())); class TheScorpionsSting : Components.GenericAOEs { private DateTime _activation; private static readonly AOEShapeCone cone = new(18, 45.Degrees()); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_activation != default) - yield return new(cone, module.PrimaryActor.Position, module.PrimaryActor.Rotation + 180.Degrees(), _activation); + yield return new(cone, Module.PrimaryActor.Position, Module.PrimaryActor.Rotation + 180.Degrees(), _activation); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.TheRamsVoice or AID.TheDragonsVoice) _activation = spell.NPCFinishAt.AddSeconds(2.3f); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.TheRamsVoice or AID.TheDragonsVoice) - _activation = module.WorldState.CurrentTime.AddSeconds(2.3f); //timing varies, just used the lowest i could find, probably depends on interrupt status + _activation = WorldState.FutureTime(2.3f); //timing varies, just used the lowest i could find, probably depends on interrupt status } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.TheScorpionsSting) _activation = default; } } -class TheDragonsBreath : Components.SelfTargetedAOEs -{ - public TheDragonsBreath() : base(ActionID.MakeSpell(AID.TheDragonsBreath), new AOEShapeCone(30, 60.Degrees())) { } -} +class TheDragonsBreath(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TheDragonsBreath), new AOEShapeCone(30, 60.Degrees())); -class TheRamsBreath : Components.SelfTargetedAOEs -{ - public TheRamsBreath() : base(ActionID.MakeSpell(AID.TheRamsBreath), new AOEShapeCone(30, 60.Degrees())) { } -} +class TheRamsBreath(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TheRamsBreath), new AOEShapeCone(30, 60.Degrees())); -class TheRamsEmbrace : Components.SelfTargetedAOEs -{ - public TheRamsEmbrace() : base(ActionID.MakeSpell(AID.TheRamsEmbrace), new AOEShapeCircle(9)) { } -} +class TheRamsEmbrace(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TheRamsEmbrace), new AOEShapeCircle(9)); -class TheRamsVoice : Components.SelfTargetedAOEs -{ - public TheRamsVoice() : base(ActionID.MakeSpell(AID.TheRamsVoice), new AOEShapeCircle(9)) { } -} +class TheRamsVoice(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TheRamsVoice), new AOEShapeCircle(9)); -class TheRamsVoiceHint : Components.CastInterruptHint -{ - public TheRamsVoiceHint() : base(ActionID.MakeSpell(AID.TheRamsVoice)) { } -} +class TheRamsVoiceHint(BossModule module) : Components.CastInterruptHint(module, ActionID.MakeSpell(AID.TheRamsVoice)); -class TheDragonsVoice : Components.SelfTargetedAOEs -{ - public TheDragonsVoice() : base(ActionID.MakeSpell(AID.TheDragonsVoice), new AOEShapeDonut(8, 30)) { } -} +class TheDragonsVoice(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TheDragonsVoice), new AOEShapeDonut(8, 30)); -class TheDragonsVoiceHint : Components.CastInterruptHint -{ - public TheDragonsVoiceHint() : base(ActionID.MakeSpell(AID.TheDragonsVoice), hintExtra: "Donut Raidwide") { } -} +class TheDragonsVoiceHint(BossModule module) : Components.CastInterruptHint(module, ActionID.MakeSpell(AID.TheDragonsVoice), hintExtra: "Donut Raidwide"); class TygerStates : StateMachineBuilder { @@ -105,7 +81,4 @@ public TygerStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.Hunt, GroupID = (uint)BossModuleInfo.HuntRank.S, NameID = 8905)] -public class Tyger : SimpleBossModule -{ - public Tyger(WorldState ws, Actor primary) : base(ws, primary) { } -} +public class Tyger(WorldState ws, Actor primary) : SimpleBossModule(ws, primary); diff --git a/BossMod/Modules/Shadowbringers/TreasureHunt/TheDungeonsOfLyheGhiah/Goliath.cs b/BossMod/Modules/Shadowbringers/TreasureHunt/TheDungeonsOfLyheGhiah/Goliath.cs index a37f58fb5c..fc770e9c67 100644 --- a/BossMod/Modules/Shadowbringers/TreasureHunt/TheDungeonsOfLyheGhiah/Goliath.cs +++ b/BossMod/Modules/Shadowbringers/TreasureHunt/TheDungeonsOfLyheGhiah/Goliath.cs @@ -36,80 +36,35 @@ public enum AID : uint Spin = 17854, // 2A05->self, 2,5s cast, range 11 circle } -class Wellbore : Components.SelfTargetedAOEs -{ - public Wellbore() : base(ActionID.MakeSpell(AID.Wellbore), new AOEShapeCircle(15)) { } -} +class Wellbore(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Wellbore), new AOEShapeCircle(15)); -class Compress : Components.SelfTargetedAOEs -{ - public Compress() : base(ActionID.MakeSpell(AID.Compress), new AOEShapeCross(100, 3.5f)) { } -} +class Compress(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Compress), new AOEShapeCross(100, 3.5f)); -class Compress2 : Components.SelfTargetedAOEs -{ - public Compress2() : base(ActionID.MakeSpell(AID.Compress2), new AOEShapeRect(102.1f, 3.5f)) { } -} +class Compress2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Compress2), new AOEShapeRect(102.1f, 3.5f)); -class Accelerate : Components.StackWithCastTargets -{ - public Accelerate() : base(ActionID.MakeSpell(AID.Accelerate), 6) { } -} +class Accelerate(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.Accelerate), 6); -class Incinerate : Components.RaidwideCast -{ - public Incinerate() : base(ActionID.MakeSpell(AID.Incinerate)) { } -} +class Incinerate(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.Incinerate)); -class Fount : Components.LocationTargetedAOEs -{ - public Fount() : base(ActionID.MakeSpell(AID.Fount), 4) { } -} +class Fount(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Fount), 4); -class MechanicalBlow : Components.SingleTargetCast -{ - public MechanicalBlow() : base(ActionID.MakeSpell(AID.MechanicalBlow)) { } -} +class MechanicalBlow(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.MechanicalBlow)); -class PluckAndPrune : Components.SelfTargetedAOEs -{ - public PluckAndPrune() : base(ActionID.MakeSpell(AID.PluckAndPrune), new AOEShapeCircle(6.84f)) { } -} +class PluckAndPrune(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PluckAndPrune), new AOEShapeCircle(6.84f)); -class TearyTwirl : Components.SelfTargetedAOEs -{ - public TearyTwirl() : base(ActionID.MakeSpell(AID.TearyTwirl), new AOEShapeCircle(6.84f)) { } -} +class TearyTwirl(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TearyTwirl), new AOEShapeCircle(6.84f)); -class HeirloomScream : Components.SelfTargetedAOEs -{ - public HeirloomScream() : base(ActionID.MakeSpell(AID.HeirloomScream), new AOEShapeCircle(6.84f)) { } -} +class HeirloomScream(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HeirloomScream), new AOEShapeCircle(6.84f)); -class PungentPirouette : Components.SelfTargetedAOEs -{ - public PungentPirouette() : base(ActionID.MakeSpell(AID.PungentPirouette), new AOEShapeCircle(6.84f)) { } -} +class PungentPirouette(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PungentPirouette), new AOEShapeCircle(6.84f)); -class Pollen : Components.SelfTargetedAOEs -{ - public Pollen() : base(ActionID.MakeSpell(AID.Pollen), new AOEShapeCircle(6.84f)) { } -} +class Pollen(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Pollen), new AOEShapeCircle(6.84f)); -class Spin : Components.SelfTargetedAOEs -{ - public Spin() : base(ActionID.MakeSpell(AID.Spin), new AOEShapeCircle(11)) { } -} +class Spin(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Spin), new AOEShapeCircle(11)); -class Mash : Components.SelfTargetedAOEs -{ - public Mash() : base(ActionID.MakeSpell(AID.Mash), new AOEShapeRect(15.23f, 2)) { } -} +class Mash(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Mash), new AOEShapeRect(15.23f, 2)); -class Scoop : Components.SelfTargetedAOEs -{ - public Scoop() : base(ActionID.MakeSpell(AID.Scoop), new AOEShapeCone(15, 60.Degrees())) { } -} +class Scoop(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Scoop), new AOEShapeCone(15, 60.Degrees())); class GoliathStates : StateMachineBuilder { diff --git a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/FuathTroublemaker.cs b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/FuathTroublemaker.cs index 008bd9e38a..b70735f118 100644 --- a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/FuathTroublemaker.cs +++ b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/FuathTroublemaker.cs @@ -21,30 +21,15 @@ public enum AID : uint Telega = 9630, // BonusAdds->self, no cast, single-target, bonus adds disappear } -class CroakingChorus : Components.CastHint -{ - public CroakingChorus() : base(ActionID.MakeSpell(AID.CroakingChorus), "Calls adds") { } -} +class CroakingChorus(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.CroakingChorus), "Calls adds"); -class FrigidNeedle : Components.SelfTargetedAOEs -{ - public FrigidNeedle() : base(ActionID.MakeSpell(AID.FrigidNeedle2), new AOEShapeCross(40, 2.5f)) { } -} +class FrigidNeedle(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.FrigidNeedle2), new AOEShapeCross(40, 2.5f)); -class Spittle : Components.LocationTargetedAOEs -{ - public Spittle() : base(ActionID.MakeSpell(AID.Spittle2), 8) { } -} +class Spittle(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Spittle2), 8); -class ToyHammer : Components.SingleTargetCast -{ - public ToyHammer() : base(ActionID.MakeSpell(AID.ToyHammer)) { } -} +class ToyHammer(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.ToyHammer)); -class Hydrocannon : Components.StackWithCastTargets -{ - public Hydrocannon() : base(ActionID.MakeSpell(AID.Hydrocannon), 6) { } -} +class Hydrocannon(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.Hydrocannon), 6); class FuathTroublemakerStates : StateMachineBuilder { diff --git a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/GreedyPixie.cs b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/GreedyPixie.cs index 470bb77064..0a097e4f29 100644 --- a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/GreedyPixie.cs +++ b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/GreedyPixie.cs @@ -40,80 +40,35 @@ public enum AID : uint Scoop = 21768, // 3034->self, 4,0s cast, range 15 120-degree cone } -class Windrune : Components.SelfTargetedAOEs -{ - public Windrune() : base(ActionID.MakeSpell(AID.WindRune), new AOEShapeRect(40, 4)) { } -} +class Windrune(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.WindRune), new AOEShapeRect(40, 4)); -class SongRune : Components.LocationTargetedAOEs -{ - public SongRune() : base(ActionID.MakeSpell(AID.SongRune), 6) { } -} +class SongRune(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.SongRune), 6); -class StormRune : Components.RaidwideCast -{ - public StormRune() : base(ActionID.MakeSpell(AID.StormRune)) { } -} +class StormRune(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.StormRune)); -class BushBash : Components.SelfTargetedAOEs -{ - public BushBash() : base(ActionID.MakeSpell(AID.BushBash), new AOEShapeCircle(12)) { } -} +class BushBash(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.BushBash), new AOEShapeCircle(12)); -class BushBash2 : Components.SelfTargetedAOEs -{ - public BushBash2() : base(ActionID.MakeSpell(AID.BushBash2), new AOEShapeCircle(12)) { } -} +class BushBash2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.BushBash2), new AOEShapeCircle(12)); -class NatureCall : Components.SelfTargetedAOEs -{ - public NatureCall() : base(ActionID.MakeSpell(AID.NatureCall), new AOEShapeCone(30, 60.Degrees())) { } -} +class NatureCall(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.NatureCall), new AOEShapeCone(30, 60.Degrees())); -class NatureCall2 : Components.SelfTargetedAOEs -{ - public NatureCall2() : base(ActionID.MakeSpell(AID.NatureCall2), new AOEShapeCone(30, 60.Degrees())) { } -} +class NatureCall2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.NatureCall2), new AOEShapeCone(30, 60.Degrees())); -class PluckAndPrune : Components.SelfTargetedAOEs -{ - public PluckAndPrune() : base(ActionID.MakeSpell(AID.PluckAndPrune), new AOEShapeCircle(6.84f)) { } -} +class PluckAndPrune(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PluckAndPrune), new AOEShapeCircle(6.84f)); -class TearyTwirl : Components.SelfTargetedAOEs -{ - public TearyTwirl() : base(ActionID.MakeSpell(AID.TearyTwirl), new AOEShapeCircle(6.84f)) { } -} +class TearyTwirl(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TearyTwirl), new AOEShapeCircle(6.84f)); -class HeirloomScream : Components.SelfTargetedAOEs -{ - public HeirloomScream() : base(ActionID.MakeSpell(AID.HeirloomScream), new AOEShapeCircle(6.84f)) { } -} +class HeirloomScream(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HeirloomScream), new AOEShapeCircle(6.84f)); -class PungentPirouette : Components.SelfTargetedAOEs -{ - public PungentPirouette() : base(ActionID.MakeSpell(AID.PungentPirouette), new AOEShapeCircle(6.84f)) { } -} +class PungentPirouette(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PungentPirouette), new AOEShapeCircle(6.84f)); -class Pollen : Components.SelfTargetedAOEs -{ - public Pollen() : base(ActionID.MakeSpell(AID.Pollen), new AOEShapeCircle(6.84f)) { } -} +class Pollen(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Pollen), new AOEShapeCircle(6.84f)); -class Spin : Components.SelfTargetedAOEs -{ - public Spin() : base(ActionID.MakeSpell(AID.Spin), new AOEShapeCircle(11)) { } -} +class Spin(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Spin), new AOEShapeCircle(11)); -class Mash : Components.SelfTargetedAOEs -{ - public Mash() : base(ActionID.MakeSpell(AID.Mash), new AOEShapeRect(13, 2)) { } -} +class Mash(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Mash), new AOEShapeRect(13, 2)); -class Scoop : Components.SelfTargetedAOEs -{ - public Scoop() : base(ActionID.MakeSpell(AID.Scoop), new AOEShapeCone(15, 60.Degrees())) { } -} +class Scoop(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Scoop), new AOEShapeCone(15, 60.Degrees())); class GreedyPixieStates : StateMachineBuilder { diff --git a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretBasket.cs b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretBasket.cs index 4337ad04e7..273bd0c606 100644 --- a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretBasket.cs +++ b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretBasket.cs @@ -37,10 +37,7 @@ public enum AID : uint Telega = 9630, // BonusAdds->self, no cast, single-target, bonus adds disappear } -class Earthquake : Components.RaidwideCast -{ - public Earthquake() : base(ActionID.MakeSpell(AID.Earthquake)) { } -} +class Earthquake(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.Earthquake)); class HeavyStrike1 : Components.SelfTargetedAOEs { @@ -54,7 +51,7 @@ class HeavyStrike2 : Components.SelfTargetedAOEs { public HeavyStrike2() : base(ActionID.MakeSpell(AID.HeavyStrike2), new AOEShapeDonutSector(6.5f, 12.5f, 135.Degrees())) { } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { base.OnCastFinished(module, caster, spell); if ((AID)spell.Action.ID == AID.HeavyStrike1) @@ -68,7 +65,7 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn class HeavyStrike3 : Components.SelfTargetedAOEs { public HeavyStrike3() : base(ActionID.MakeSpell(AID.HeavyStrike3), new AOEShapeDonutSector(12.5f, 18.5f, 135.Degrees())) { } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { base.OnCastFinished(module, caster, spell); if ((AID)spell.Action.ID == AID.HeavyStrike2) @@ -78,50 +75,23 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn } } -class PollenCorona : Components.SelfTargetedAOEs -{ - public PollenCorona() : base(ActionID.MakeSpell(AID.PollenCorona), new AOEShapeCircle(8)) { } -} +class PollenCorona(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PollenCorona), new AOEShapeCircle(8)); -class StraightPunch : Components.SingleTargetCast -{ - public StraightPunch() : base(ActionID.MakeSpell(AID.StraightPunch)) { } -} +class StraightPunch(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.StraightPunch)); -class Leafcutter : Components.SelfTargetedAOEs -{ - public Leafcutter() : base(ActionID.MakeSpell(AID.Leafcutter), new AOEShapeRect(15, 2)) { } -} +class Leafcutter(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Leafcutter), new AOEShapeRect(15, 2)); -class EarthCrusher : Components.SelfTargetedAOEs -{ - public EarthCrusher() : base(ActionID.MakeSpell(AID.EarthCrusher2), new AOEShapeDonut(10, 20)) { } -} +class EarthCrusher(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.EarthCrusher2), new AOEShapeDonut(10, 20)); -class PluckAndPrune : Components.SelfTargetedAOEs -{ - public PluckAndPrune() : base(ActionID.MakeSpell(AID.PluckAndPrune), new AOEShapeCircle(6.84f)) { } -} +class PluckAndPrune(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PluckAndPrune), new AOEShapeCircle(6.84f)); -class TearyTwirl : Components.SelfTargetedAOEs -{ - public TearyTwirl() : base(ActionID.MakeSpell(AID.TearyTwirl), new AOEShapeCircle(6.84f)) { } -} +class TearyTwirl(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TearyTwirl), new AOEShapeCircle(6.84f)); -class HeirloomScream : Components.SelfTargetedAOEs -{ - public HeirloomScream() : base(ActionID.MakeSpell(AID.HeirloomScream), new AOEShapeCircle(6.84f)) { } -} +class HeirloomScream(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HeirloomScream), new AOEShapeCircle(6.84f)); -class PungentPirouette : Components.SelfTargetedAOEs -{ - public PungentPirouette() : base(ActionID.MakeSpell(AID.PungentPirouette), new AOEShapeCircle(6.84f)) { } -} +class PungentPirouette(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PungentPirouette), new AOEShapeCircle(6.84f)); -class Pollen : Components.SelfTargetedAOEs -{ - public Pollen() : base(ActionID.MakeSpell(AID.Pollen), new AOEShapeCircle(6.84f)) { } -} +class Pollen(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Pollen), new AOEShapeCircle(6.84f)); class BasketStates : StateMachineBuilder { diff --git a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretCladoselache.cs b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretCladoselache.cs index ac52b0fa63..e60bd544c8 100644 --- a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretCladoselache.cs +++ b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretCladoselache.cs @@ -41,7 +41,7 @@ class PelagicCleaverRotation : Components.GenericRotatingAOE private DateTime _activation; private static readonly AOEShapeCone _shape = new(40, 30.Degrees()); - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { var increment = (IconID)iconID switch { @@ -56,7 +56,7 @@ public override void OnEventIcon(BossModule module, Actor actor, uint iconID) } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.PelagicCleaverRotationStart) { @@ -67,10 +67,10 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf InitIfReady(module, caster); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if (Sequences.Count > 0 && (AID)spell.Action.ID is AID.PelagicCleaverRotationStart or AID.PelagicCleaverDuringRotation) - AdvanceSequence(0, module.WorldState.CurrentTime); + AdvanceSequence(0, WorldState.CurrentTime); } private void InitIfReady(BossModule module, Actor source) @@ -84,45 +84,21 @@ private void InitIfReady(BossModule module, Actor source) } } -class PelagicCleaver : Components.SelfTargetedAOEs -{ - public PelagicCleaver() : base(ActionID.MakeSpell(AID.PelagicCleaver), new AOEShapeCone(40, 30.Degrees())) { } -} +class PelagicCleaver(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PelagicCleaver), new AOEShapeCone(40, 30.Degrees())); -class TidalGuillotine : Components.SelfTargetedAOEs -{ - public TidalGuillotine() : base(ActionID.MakeSpell(AID.TidalGuillotine), new AOEShapeCircle(13)) { } -} +class TidalGuillotine(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TidalGuillotine), new AOEShapeCircle(13)); -class ProtolithicPuncture : Components.SingleTargetCast -{ - public ProtolithicPuncture() : base(ActionID.MakeSpell(AID.ProtolithicPuncture)) { } -} +class ProtolithicPuncture(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.ProtolithicPuncture)); -class BiteAndRun : Components.BaitAwayChargeCast -{ - public BiteAndRun() : base(ActionID.MakeSpell(AID.BiteAndRun), 2.5f) { } -} +class BiteAndRun(BossModule module) : Components.BaitAwayChargeCast(module, ActionID.MakeSpell(AID.BiteAndRun), 2.5f); -class AquaticLance : Components.SpreadFromCastTargets -{ - public AquaticLance() : base(ActionID.MakeSpell(AID.AquaticLance), 8) { } -} +class AquaticLance(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.AquaticLance), 8); -class Spin : Components.SelfTargetedAOEs -{ - public Spin() : base(ActionID.MakeSpell(AID.Spin), new AOEShapeCircle(11)) { } -} +class Spin(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Spin), new AOEShapeCircle(11)); -class Mash : Components.SelfTargetedAOEs -{ - public Mash() : base(ActionID.MakeSpell(AID.Mash), new AOEShapeRect(13, 2)) { } -} +class Mash(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Mash), new AOEShapeRect(13, 2)); -class Scoop : Components.SelfTargetedAOEs -{ - public Scoop() : base(ActionID.MakeSpell(AID.Scoop), new AOEShapeCone(15, 60.Degrees())) { } -} +class Scoop(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Scoop), new AOEShapeCone(15, 60.Degrees())); class CladoselacheStates : StateMachineBuilder { diff --git a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretDjinn.cs b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretDjinn.cs index 214128c816..58d8a130b1 100644 --- a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretDjinn.cs +++ b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretDjinn.cs @@ -25,15 +25,9 @@ public enum AID : uint Scoop = 21768, // 3034->self, 4,0s cast, range 15 120-degree cone } -class Gust : Components.LocationTargetedAOEs -{ - public Gust() : base(ActionID.MakeSpell(AID.Gust), 6) { } -} +class Gust(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Gust), 6); -class ChangelessWinds : Components.SelfTargetedAOEs -{ - public ChangelessWinds() : base(ActionID.MakeSpell(AID.ChangelessWinds), new AOEShapeRect(40, 4)) { } -} +class ChangelessWinds(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ChangelessWinds), new AOEShapeRect(40, 4)); class ChangelessWindsKB : Components.KnockbackFromCastTarget { @@ -43,10 +37,7 @@ class ChangelessWindsKB : Components.KnockbackFromCastTarget } } -class Whipwind : Components.SelfTargetedAOEs -{ - public Whipwind() : base(ActionID.MakeSpell(AID.Whipwind), new AOEShapeRect(55, 20)) { } -} +class Whipwind(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Whipwind), new AOEShapeRect(55, 20)); class WhipwindKB : Components.KnockbackFromCastTarget { @@ -56,15 +47,9 @@ class WhipwindKB : Components.KnockbackFromCastTarget } } -class GentleBreeze : Components.SelfTargetedAOEs -{ - public GentleBreeze() : base(ActionID.MakeSpell(AID.GentleBreeze), new AOEShapeRect(15, 2)) { } -} +class GentleBreeze(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.GentleBreeze), new AOEShapeRect(15, 2)); -class WhirlingGaol : Components.RaidwideCast -{ - public WhirlingGaol() : base(ActionID.MakeSpell(AID.WhirlingGaol), "Raidwide + Knockback") { } -} +class WhirlingGaol(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.WhirlingGaol), "Raidwide + Knockback"); class WhirlingGaolKB : Components.KnockbackFromCastTarget { @@ -74,20 +59,11 @@ public WhirlingGaolKB() : base(ActionID.MakeSpell(AID.WhirlingGaol), 25) } } -class Spin : Components.SelfTargetedAOEs -{ - public Spin() : base(ActionID.MakeSpell(AID.Spin), new AOEShapeCircle(11)) { } -} +class Spin(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Spin), new AOEShapeCircle(11)); -class Mash : Components.SelfTargetedAOEs -{ - public Mash() : base(ActionID.MakeSpell(AID.Mash), new AOEShapeRect(13, 2)) { } -} +class Mash(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Mash), new AOEShapeRect(13, 2)); -class Scoop : Components.SelfTargetedAOEs -{ - public Scoop() : base(ActionID.MakeSpell(AID.Scoop), new AOEShapeCone(15, 60.Degrees())) { } -} +class Scoop(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Scoop), new AOEShapeCone(15, 60.Degrees())); class DjinnStates : StateMachineBuilder { diff --git a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretKeeper.cs b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretKeeper.cs index 9c5a25220e..67c84b9f6b 100644 --- a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretKeeper.cs +++ b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretKeeper.cs @@ -26,49 +26,22 @@ public enum AID : uint Scoop = 21768, // 3034->self, 4,0s cast, range 15 120-degree cone } -class Buffet : Components.SelfTargetedAOEs -{ - public Buffet() : base(ActionID.MakeSpell(AID.Buffet), new AOEShapeCone(11, 60.Degrees())) { } -} +class Buffet(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Buffet), new AOEShapeCone(11, 60.Degrees())); -class Inhale : Components.SelfTargetedAOEs -{ - public Inhale() : base(ActionID.MakeSpell(AID.InhaleBoss), new AOEShapeCone(20, 60.Degrees())) { } -} -class InhalePull : Components.KnockbackFromCastTarget -{ - public InhalePull() : base(ActionID.MakeSpell(AID.InhaleBoss), 20, false, 1, new AOEShapeCone(20, 60.Degrees()), Kind.TowardsOrigin, default, true) { } -} +class Inhale(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.InhaleBoss), new AOEShapeCone(20, 60.Degrees())); +class InhalePull(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.InhaleBoss), 20, false, 1, new AOEShapeCone(20, 60.Degrees()), Kind.TowardsOrigin, default, true); -class HeavyScrapline : Components.SelfTargetedAOEs -{ - public HeavyScrapline() : base(ActionID.MakeSpell(AID.HeavyScrapline), new AOEShapeCircle(11)) { } -} +class HeavyScrapline(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HeavyScrapline), new AOEShapeCircle(11)); -class MoldyPhlegm : Components.PersistentVoidzoneAtCastTarget -{ - public MoldyPhlegm() : base(6, ActionID.MakeSpell(AID.MoldyPhlegm), m => m.Enemies(OID.ResinVoidzone).Where(z => z.EventState != 7), 0) { } -} +class MoldyPhlegm(BossModule module) : Components.PersistentVoidzoneAtCastTarget(module, 6, ActionID.MakeSpell(AID.MoldyPhlegm), m => m.Enemies(OID.ResinVoidzone).Where(z => z.EventState != 7), 0); -class MoldySneeze : Components.Cleave -{ - public MoldySneeze() : base(ActionID.MakeSpell(AID.MoldySneeze), new AOEShapeCone(12, 60.Degrees()), (uint)OID.Boss) { } -} +class MoldySneeze(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.MoldySneeze), new AOEShapeCone(12, 60.Degrees()), (uint)OID.Boss); -class Spin : Components.SelfTargetedAOEs -{ - public Spin() : base(ActionID.MakeSpell(AID.Spin), new AOEShapeCircle(11)) { } -} +class Spin(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Spin), new AOEShapeCircle(11)); -class Mash : Components.SelfTargetedAOEs -{ - public Mash() : base(ActionID.MakeSpell(AID.Mash), new AOEShapeRect(13, 2)) { } -} +class Mash(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Mash), new AOEShapeRect(13, 2)); -class Scoop : Components.SelfTargetedAOEs -{ - public Scoop() : base(ActionID.MakeSpell(AID.Scoop), new AOEShapeCone(15, 60.Degrees())) { } -} +class Scoop(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Scoop), new AOEShapeCone(15, 60.Degrees())); class KeeperStates : StateMachineBuilder { diff --git a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretKorrigan.cs b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretKorrigan.cs index 1bdc087d37..7d73948821 100644 --- a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretKorrigan.cs +++ b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretKorrigan.cs @@ -28,50 +28,23 @@ public enum AID : uint Telega = 9630, // BonusAdds->self, no cast, single-target, bonus adds disappear } -class Hypnotize : Components.CastGaze -{ - public Hypnotize() : base(ActionID.MakeSpell(AID.Hypnotize)) { } -} +class Hypnotize(BossModule module) : Components.CastGaze(module, ActionID.MakeSpell(AID.Hypnotize)); -class Ram : Components.SingleTargetDelayableCast -{ - public Ram() : base(ActionID.MakeSpell(AID.Ram)) { } -} +class Ram(BossModule module) : Components.SingleTargetDelayableCast(module, ActionID.MakeSpell(AID.Ram)); -class SaibaiMandragora : Components.CastHint -{ - public SaibaiMandragora() : base(ActionID.MakeSpell(AID.SaibaiMandragora), "Calls adds") { } -} +class SaibaiMandragora(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.SaibaiMandragora), "Calls adds"); -class LeafDagger : Components.LocationTargetedAOEs -{ - public LeafDagger() : base(ActionID.MakeSpell(AID.LeafDagger), 3) { } -} +class LeafDagger(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.LeafDagger), 3); -class PluckAndPrune : Components.SelfTargetedAOEs -{ - public PluckAndPrune() : base(ActionID.MakeSpell(AID.PluckAndPrune), new AOEShapeCircle(6.84f)) { } -} +class PluckAndPrune(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PluckAndPrune), new AOEShapeCircle(6.84f)); -class TearyTwirl : Components.SelfTargetedAOEs -{ - public TearyTwirl() : base(ActionID.MakeSpell(AID.TearyTwirl), new AOEShapeCircle(6.84f)) { } -} +class TearyTwirl(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TearyTwirl), new AOEShapeCircle(6.84f)); -class HeirloomScream : Components.SelfTargetedAOEs -{ - public HeirloomScream() : base(ActionID.MakeSpell(AID.HeirloomScream), new AOEShapeCircle(6.84f)) { } -} +class HeirloomScream(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HeirloomScream), new AOEShapeCircle(6.84f)); -class PungentPirouette : Components.SelfTargetedAOEs -{ - public PungentPirouette() : base(ActionID.MakeSpell(AID.PungentPirouette), new AOEShapeCircle(6.84f)) { } -} +class PungentPirouette(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PungentPirouette), new AOEShapeCircle(6.84f)); -class Pollen : Components.SelfTargetedAOEs -{ - public Pollen() : base(ActionID.MakeSpell(AID.Pollen), new AOEShapeCircle(6.84f)) { } -} +class Pollen(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Pollen), new AOEShapeCircle(6.84f)); class KorriganStates : StateMachineBuilder { diff --git a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretPegasus.cs b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretPegasus.cs index 4995821e12..2f5ab8a950 100644 --- a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretPegasus.cs +++ b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretPegasus.cs @@ -24,40 +24,19 @@ public enum AID : uint Scoop = 21768, // 3034->self, 4,0s cast, range 15 120-degree cone } -class BurningBright : Components.SelfTargetedAOEs -{ - public BurningBright() : base(ActionID.MakeSpell(AID.BurningBright), new AOEShapeRect(47, 3)) { } -} +class BurningBright(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.BurningBright), new AOEShapeRect(47, 3)); -class Nicker : Components.SelfTargetedAOEs -{ - public Nicker() : base(ActionID.MakeSpell(AID.Nicker), new AOEShapeCircle(12)) { } -} +class Nicker(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Nicker), new AOEShapeCircle(12)); -class CloudCall : Components.CastHint -{ - public CloudCall() : base(ActionID.MakeSpell(AID.CloudCall), "Calls thunderclouds") { } -} +class CloudCall(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.CloudCall), "Calls thunderclouds"); -class LightningBolt : Components.SelfTargetedAOEs -{ - public LightningBolt() : base(ActionID.MakeSpell(AID.LightningBolt), new AOEShapeCircle(8)) { } -} +class LightningBolt(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.LightningBolt), new AOEShapeCircle(8)); -class Spin : Components.SelfTargetedAOEs -{ - public Spin() : base(ActionID.MakeSpell(AID.Spin), new AOEShapeCircle(11)) { } -} +class Spin(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Spin), new AOEShapeCircle(11)); -class Mash : Components.SelfTargetedAOEs -{ - public Mash() : base(ActionID.MakeSpell(AID.Mash), new AOEShapeRect(13, 2)) { } -} +class Mash(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Mash), new AOEShapeRect(13, 2)); -class Scoop : Components.SelfTargetedAOEs -{ - public Scoop() : base(ActionID.MakeSpell(AID.Scoop), new AOEShapeCone(15, 60.Degrees())) { } -} +class Scoop(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Scoop), new AOEShapeCone(15, 60.Degrees())); class PegasusStates : StateMachineBuilder { diff --git a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretPorxie.cs b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretPorxie.cs index 1d3d57a32c..90b1059a26 100644 --- a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretPorxie.cs +++ b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretPorxie.cs @@ -43,32 +43,23 @@ public enum AID : uint PungentPirouette = 6450, // 2A08->self, 3,5s cast, range 6+R circle } -class BrewingStorm : Components.SelfTargetedAOEs -{ - public BrewingStorm() : base(ActionID.MakeSpell(AID.BrewingStorm), new AOEShapeCone(5, 30.Degrees())) { } -} +class BrewingStorm(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.BrewingStorm), new AOEShapeCone(5, 30.Degrees())); -class HarrowingDream : Components.SelfTargetedAOEs -{ - public HarrowingDream() : base(ActionID.MakeSpell(AID.HarrowingDream), new AOEShapeCircle(6)) { } -} +class HarrowingDream(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HarrowingDream), new AOEShapeCircle(6)); -class BecloudingDust : Components.LocationTargetedAOEs -{ - public BecloudingDust() : base(ActionID.MakeSpell(AID.BecloudingDust2), 6) { } -} +class BecloudingDust(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.BecloudingDust2), 6); class Sweep : Components.Exaflare { public Sweep() : base(6) { } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.SweepStart) Lines.Add(new() { Next = caster.Position, Advance = 12 * spell.Rotation.ToDirection(), NextExplosion = spell.NPCFinishAt.AddSeconds(0.9f), TimeToMove = 4.5f, ExplosionsLeft = 4, MaxShownExplosions = 3 }); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if (Lines.Count > 0 && (AID)spell.Action.ID == AID.SweepRest) { @@ -80,45 +71,21 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } -class Spin : Components.SelfTargetedAOEs -{ - public Spin() : base(ActionID.MakeSpell(AID.Spin), new AOEShapeCircle(11)) { } -} +class Spin(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Spin), new AOEShapeCircle(11)); -class Mash : Components.SelfTargetedAOEs -{ - public Mash() : base(ActionID.MakeSpell(AID.Mash), new AOEShapeRect(13, 2)) { } -} +class Mash(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Mash), new AOEShapeRect(13, 2)); -class Scoop : Components.SelfTargetedAOEs -{ - public Scoop() : base(ActionID.MakeSpell(AID.Scoop), new AOEShapeCone(15, 60.Degrees())) { } -} +class Scoop(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Scoop), new AOEShapeCone(15, 60.Degrees())); -class PluckAndPrune : Components.SelfTargetedAOEs -{ - public PluckAndPrune() : base(ActionID.MakeSpell(AID.PluckAndPrune), new AOEShapeCircle(6.84f)) { } -} +class PluckAndPrune(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PluckAndPrune), new AOEShapeCircle(6.84f)); -class TearyTwirl : Components.SelfTargetedAOEs -{ - public TearyTwirl() : base(ActionID.MakeSpell(AID.TearyTwirl), new AOEShapeCircle(6.84f)) { } -} +class TearyTwirl(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TearyTwirl), new AOEShapeCircle(6.84f)); -class HeirloomScream : Components.SelfTargetedAOEs -{ - public HeirloomScream() : base(ActionID.MakeSpell(AID.HeirloomScream), new AOEShapeCircle(6.84f)) { } -} +class HeirloomScream(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HeirloomScream), new AOEShapeCircle(6.84f)); -class PungentPirouette : Components.SelfTargetedAOEs -{ - public PungentPirouette() : base(ActionID.MakeSpell(AID.PungentPirouette), new AOEShapeCircle(6.84f)) { } -} +class PungentPirouette(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PungentPirouette), new AOEShapeCircle(6.84f)); -class Pollen : Components.SelfTargetedAOEs -{ - public Pollen() : base(ActionID.MakeSpell(AID.Pollen), new AOEShapeCircle(6.84f)) { } -} +class Pollen(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Pollen), new AOEShapeCircle(6.84f)); class PorxieStates : StateMachineBuilder { diff --git a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretSerpent.cs b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretSerpent.cs index d9e48fa63c..ea1db1f105 100644 --- a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretSerpent.cs +++ b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretSerpent.cs @@ -31,55 +31,25 @@ public enum AID : uint Telega = 9630, // BonusAdds->self, no cast, single-target, bonus adds disappear } -class Douse : Components.PersistentVoidzoneAtCastTarget -{ - public Douse() : base(8, ActionID.MakeSpell(AID.Douse), m => m.Enemies(OID.WaterVoidzone).Where(z => z.EventState != 7), 0) { } -} +class Douse(BossModule module) : Components.PersistentVoidzoneAtCastTarget(module, 8, ActionID.MakeSpell(AID.Douse), m => m.Enemies(OID.WaterVoidzone).Where(z => z.EventState != 7), 0); -class FangsEnd : Components.SingleTargetCast -{ - public FangsEnd() : base(ActionID.MakeSpell(AID.FangsEnd)) { } -} +class FangsEnd(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.FangsEnd)); -class Drench : Components.SelfTargetedAOEs -{ - public Drench() : base(ActionID.MakeSpell(AID.Drench), new AOEShapeCone(15.29f, 45.Degrees())) { } -} +class Drench(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Drench), new AOEShapeCone(15.29f, 45.Degrees())); -class Drench2 : Components.SelfTargetedAOEs -{ - public Drench2() : base(ActionID.MakeSpell(AID.Drench2), new AOEShapeCone(13.45f, 45.Degrees())) { } -} +class Drench2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Drench2), new AOEShapeCone(13.45f, 45.Degrees())); -class ScaleRipple : Components.SelfTargetedAOEs -{ - public ScaleRipple() : base(ActionID.MakeSpell(AID.ScaleRipple), new AOEShapeCircle(8)) { } -} +class ScaleRipple(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ScaleRipple), new AOEShapeCircle(8)); -class PluckAndPrune : Components.SelfTargetedAOEs -{ - public PluckAndPrune() : base(ActionID.MakeSpell(AID.PluckAndPrune), new AOEShapeCircle(6.84f)) { } -} +class PluckAndPrune(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PluckAndPrune), new AOEShapeCircle(6.84f)); -class TearyTwirl : Components.SelfTargetedAOEs -{ - public TearyTwirl() : base(ActionID.MakeSpell(AID.TearyTwirl), new AOEShapeCircle(6.84f)) { } -} +class TearyTwirl(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TearyTwirl), new AOEShapeCircle(6.84f)); -class HeirloomScream : Components.SelfTargetedAOEs -{ - public HeirloomScream() : base(ActionID.MakeSpell(AID.HeirloomScream), new AOEShapeCircle(6.84f)) { } -} +class HeirloomScream(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HeirloomScream), new AOEShapeCircle(6.84f)); -class PungentPirouette : Components.SelfTargetedAOEs -{ - public PungentPirouette() : base(ActionID.MakeSpell(AID.PungentPirouette), new AOEShapeCircle(6.84f)) { } -} +class PungentPirouette(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PungentPirouette), new AOEShapeCircle(6.84f)); -class Pollen : Components.SelfTargetedAOEs -{ - public Pollen() : base(ActionID.MakeSpell(AID.Pollen), new AOEShapeCircle(6.84f)) { } -} +class Pollen(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Pollen), new AOEShapeCircle(6.84f)); class SerpentStates : StateMachineBuilder { diff --git a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretSwallow.cs b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretSwallow.cs index 1a6490d41e..d69be0d2e2 100644 --- a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretSwallow.cs +++ b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretSwallow.cs @@ -19,35 +19,17 @@ public enum AID : uint PrevailingCurrent = 21717, // 302C->self, 3,0s cast, range 22+R width 6 rect } -class ElectricWhorl : Components.SelfTargetedAOEs -{ - public ElectricWhorl() : base(ActionID.MakeSpell(AID.SeventhWave), new AOEShapeCircle(11)) { } -} +class ElectricWhorl(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.SeventhWave), new AOEShapeCircle(11)); -class PrevailingCurrent : Components.SelfTargetedAOEs -{ - public PrevailingCurrent() : base(ActionID.MakeSpell(AID.PrevailingCurrent), new AOEShapeRect(24, 3)) { } -} +class PrevailingCurrent(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PrevailingCurrent), new AOEShapeRect(24, 3)); -class SeventhWave : Components.SelfTargetedAOEs -{ - public SeventhWave() : base(ActionID.MakeSpell(AID.ElectricWhorl), new AOEShapeDonut(8, 60)) { } -} +class SeventhWave(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ElectricWhorl), new AOEShapeDonut(8, 60)); -class Hydrocannon : Components.LocationTargetedAOEs -{ - public Hydrocannon() : base(ActionID.MakeSpell(AID.Hydrocannon2), 8) { } -} +class Hydrocannon(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Hydrocannon2), 8); -class Ceras : Components.SingleTargetCast -{ - public Ceras() : base(ActionID.MakeSpell(AID.Ceras)) { } -} +class Ceras(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.Ceras)); -class BodySlam : Components.LocationTargetedAOEs -{ - public BodySlam() : base(ActionID.MakeSpell(AID.BodySlam), 10) { } -} +class BodySlam(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.BodySlam), 10); class BodySlamKB : Components.KnockbackFromCastTarget { diff --git a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretUndine.cs b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretUndine.cs index bb36b016a3..e5d1a7abd9 100644 --- a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretUndine.cs +++ b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretUndine.cs @@ -28,50 +28,23 @@ public enum AID : uint Scoop = 21768, // 3034->self, 4,0s cast, range 15 120-degree cone } -class Hydrofan : Components.SelfTargetedAOEs -{ - public Hydrofan() : base(ActionID.MakeSpell(AID.Hydrofan), new AOEShapeCone(44, 15.Degrees())) { } -} +class Hydrofan(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Hydrofan), new AOEShapeCone(44, 15.Degrees())); -class Hypnowave : Components.SelfTargetedAOEs -{ - public Hypnowave() : base(ActionID.MakeSpell(AID.Hypnowave), new AOEShapeCone(30, 60.Degrees())) { } -} +class Hypnowave(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Hypnowave), new AOEShapeCone(30, 60.Degrees())); -class Hydropins : Components.SelfTargetedAOEs -{ - public Hydropins() : base(ActionID.MakeSpell(AID.Hydropins), new AOEShapeRect(12, 2)) { } -} +class Hydropins(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Hydropins), new AOEShapeRect(12, 2)); -class AquaGlobe : Components.LocationTargetedAOEs -{ - public AquaGlobe() : base(ActionID.MakeSpell(AID.AquaGlobe), 8) { } -} +class AquaGlobe(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.AquaGlobe), 8); -class Hydrowhirl : Components.SelfTargetedAOEs -{ - public Hydrowhirl() : base(ActionID.MakeSpell(AID.Hydrowhirl), new AOEShapeCircle(8)) { } -} +class Hydrowhirl(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Hydrowhirl), new AOEShapeCircle(8)); -class Hydrotaph : Components.RaidwideCast -{ - public Hydrotaph() : base(ActionID.MakeSpell(AID.Hydrotaph2)) { } -} +class Hydrotaph(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.Hydrotaph2)); -class Spin : Components.SelfTargetedAOEs -{ - public Spin() : base(ActionID.MakeSpell(AID.Spin), new AOEShapeCircle(11)) { } -} +class Spin(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Spin), new AOEShapeCircle(11)); -class Mash : Components.SelfTargetedAOEs -{ - public Mash() : base(ActionID.MakeSpell(AID.Mash), new AOEShapeRect(13, 2)) { } -} +class Mash(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Mash), new AOEShapeRect(13, 2)); -class Scoop : Components.SelfTargetedAOEs -{ - public Scoop() : base(ActionID.MakeSpell(AID.Scoop), new AOEShapeCone(15, 60.Degrees())) { } -} +class Scoop(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Scoop), new AOEShapeCone(15, 60.Degrees())); class UndineStates : StateMachineBuilder { diff --git a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretWorm.cs b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretWorm.cs index 143a7579a0..2c244d83d1 100644 --- a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretWorm.cs +++ b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretWorm.cs @@ -35,37 +35,22 @@ public enum IconID : uint Baitaway = 23, // player } -class Hydrocannon : Components.LocationTargetedAOEs -{ - public Hydrocannon() : base(ActionID.MakeSpell(AID.Hydrocannon), 8) { } -} +class Hydrocannon(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Hydrocannon), 8); -class FreshwaterCannon : Components.SelfTargetedAOEs -{ - public FreshwaterCannon() : base(ActionID.MakeSpell(AID.FreshwaterCannon), new AOEShapeRect(46, 2)) { } -} +class FreshwaterCannon(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.FreshwaterCannon), new AOEShapeRect(46, 2)); -class AquaBurst : Components.SelfTargetedAOEs -{ - public AquaBurst() : base(ActionID.MakeSpell(AID.AquaBurst), new AOEShapeCircle(10)) { } -} +class AquaBurst(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.AquaBurst), new AOEShapeCircle(10)); -class BrineBreath : Components.SingleTargetCast -{ - public BrineBreath() : base(ActionID.MakeSpell(AID.BrineBreath)) { } -} +class BrineBreath(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.BrineBreath)); -class Hydroburst : Components.PersistentVoidzone -{ - public Hydroburst() : base(8, m => m.Enemies(OID.Bubble).Where(x => !x.IsDead && !(x.CastInfo != null && x.CastInfo.IsSpell(AID.AquaBurst)))) { } -} +class Hydroburst(BossModule module) : Components.PersistentVoidzone(module, 8, m => m.Enemies(OID.Bubble).Where(x => !x.IsDead && !(x.CastInfo != null && x.CastInfo.IsSpell(AID.AquaBurst)))); class Bubble : Components.GenericBaitAway { private bool targeted; private Actor? target; - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.Baitaway) { @@ -75,7 +60,7 @@ public override void OnEventIcon(BossModule module, Actor actor, uint iconID) } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.Hydrocannon) { @@ -84,14 +69,14 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { base.AddAIHints(module, slot, actor, assignment, hints); if (target == actor && targeted) - hints.AddForbiddenZone(ShapeDistance.Circle(module.Bounds.Center, 17.5f)); + hints.AddForbiddenZone(ShapeDistance.Circle(Module.Bounds.Center, 17.5f)); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { base.AddHints(module, slot, actor, hints, movementHints); if (target == actor && targeted) @@ -99,30 +84,15 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } } -class PluckAndPrune : Components.SelfTargetedAOEs -{ - public PluckAndPrune() : base(ActionID.MakeSpell(AID.PluckAndPrune), new AOEShapeCircle(6.84f)) { } -} +class PluckAndPrune(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PluckAndPrune), new AOEShapeCircle(6.84f)); -class TearyTwirl : Components.SelfTargetedAOEs -{ - public TearyTwirl() : base(ActionID.MakeSpell(AID.TearyTwirl), new AOEShapeCircle(6.84f)) { } -} +class TearyTwirl(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TearyTwirl), new AOEShapeCircle(6.84f)); -class HeirloomScream : Components.SelfTargetedAOEs -{ - public HeirloomScream() : base(ActionID.MakeSpell(AID.HeirloomScream), new AOEShapeCircle(6.84f)) { } -} +class HeirloomScream(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HeirloomScream), new AOEShapeCircle(6.84f)); -class PungentPirouette : Components.SelfTargetedAOEs -{ - public PungentPirouette() : base(ActionID.MakeSpell(AID.PungentPirouette), new AOEShapeCircle(6.84f)) { } -} +class PungentPirouette(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PungentPirouette), new AOEShapeCircle(6.84f)); -class Pollen : Components.SelfTargetedAOEs -{ - public Pollen() : base(ActionID.MakeSpell(AID.Pollen), new AOEShapeCircle(6.84f)) { } -} +class Pollen(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Pollen), new AOEShapeCircle(6.84f)); class WormStates : StateMachineBuilder { diff --git a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P2Nisi.cs b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P2Nisi.cs index 23dee461f0..1a2f312644 100644 --- a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P2Nisi.cs +++ b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P2Nisi.cs @@ -14,7 +14,7 @@ public enum Nisi { None, Alpha, Beta, Gamma, Delta } public P2Nisi(BossModule module) : base(module) { int[] firstMembersOfGroup = { -1, -1, -1, -1 }; - foreach (var p in Service.Config.Get().P2NisiPairs.Resolve(module.Raid)) + foreach (var p in Service.Config.Get().P2NisiPairs.Resolve(Raid)) { ref var partner = ref firstMembersOfGroup[p.group]; if (partner < 0) diff --git a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P3Inception2.cs b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P3Inception2.cs index ed2534bcb5..5920daa841 100644 --- a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P3Inception2.cs +++ b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P3Inception2.cs @@ -11,7 +11,7 @@ class P3Inception2 : Components.GenericBaitAway public P3Inception2(BossModule module) : base(module) { // assume first two are baited by tanks - ForbiddenPlayers = module.Raid.WithSlot(true).WhereActor(a => a.Role != Role.Tank).Mask(); + ForbiddenPlayers = Raid.WithSlot(true).WhereActor(a => a.Role != Role.Tank).Mask(); } public override void Update() diff --git a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P4FateCalibrationAlpha.cs b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P4FateCalibrationAlpha.cs index 65fdfa5a2e..30f2ae194d 100644 --- a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P4FateCalibrationAlpha.cs +++ b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P4FateCalibrationAlpha.cs @@ -74,7 +74,7 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) Debuffs[defamationSlot] = Debuff.Defamation; var defamationTarget = Raid[defamationSlot]; if (defamationTarget != null) - AddSpread(defamationTarget, WorldState.CurrentTime.AddSeconds(20.1f)); + AddSpread(defamationTarget, WorldState.FutureTime(20.1f)); } break; case AID.FateCalibrationAlphaSharedSentence: @@ -84,7 +84,7 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) Debuffs[sharedSlot] = Debuff.SharedSentence; var sharedTarget = Raid[sharedSlot]; if (sharedTarget != null) - AddStack(sharedTarget, WorldState.CurrentTime.AddSeconds(20.1f), _avoidMask); // note: avoid mask is typically empty here, since aggravated assaults happen later + AddStack(sharedTarget, WorldState.FutureTime(20.1f), _avoidMask); // note: avoid mask is typically empty here, since aggravated assaults happen later } break; case AID.FateCalibrationAlphaAggravatedAssault: diff --git a/BossMod/Modules/Stormblood/Hunt/RankA/Angada.cs b/BossMod/Modules/Stormblood/Hunt/RankA/Angada.cs index 9280f66bf9..c6c191a3d6 100644 --- a/BossMod/Modules/Stormblood/Hunt/RankA/Angada.cs +++ b/BossMod/Modules/Stormblood/Hunt/RankA/Angada.cs @@ -14,44 +14,35 @@ public enum AID : uint Rip = 8192, // 1AC0->self, no cast, range 6+R 120-degree cone, always happens directly after Butcher } -class ScytheTail : Components.SelfTargetedAOEs -{ - public ScytheTail() : base(ActionID.MakeSpell(AID.ScytheTail), new AOEShapeCircle(9.4f)) { } -} +class ScytheTail(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ScytheTail), new AOEShapeCircle(9.4f)); -class Butcher : Components.SelfTargetedAOEs -{ - public Butcher() : base(ActionID.MakeSpell(AID.Butcher), new AOEShapeCone(11.4f, 60.Degrees())) { } -} +class Butcher(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Butcher), new AOEShapeCone(11.4f, 60.Degrees())); class Rip : Components.GenericAOEs { private DateTime _activation; private static readonly AOEShapeCone cone = new(11.4f, 60.Degrees()); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_activation != default) - yield return new(cone, module.PrimaryActor.Position, module.PrimaryActor.Rotation, _activation); + yield return new(cone, Module.PrimaryActor.Position, Module.PrimaryActor.Rotation, _activation); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.Butcher) // boss can move after cast started, so we can't use aoe instance, since that would cause outdated position data to be used _activation = spell.NPCFinishAt.AddSeconds(1.1f); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.Rip) _activation = default; } } -class RockThrow : Components.LocationTargetedAOEs -{ - public RockThrow() : base(ActionID.MakeSpell(AID.RockThrow), 6) { } -} +class RockThrow(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.RockThrow), 6); class AngadaStates : StateMachineBuilder { @@ -66,7 +57,4 @@ public AngadaStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.Hunt, GroupID = (uint)BossModuleInfo.HuntRank.A, NameID = 5999)] -public class Angada : SimpleBossModule -{ - public Angada(WorldState ws, Actor primary) : base(ws, primary) { } -} +public class Angada(WorldState ws, Actor primary) : SimpleBossModule(ws, primary); diff --git a/BossMod/Modules/Stormblood/Hunt/RankA/Gajasura.cs b/BossMod/Modules/Stormblood/Hunt/RankA/Gajasura.cs index 88d36f0edf..f222017c76 100644 --- a/BossMod/Modules/Stormblood/Hunt/RankA/Gajasura.cs +++ b/BossMod/Modules/Stormblood/Hunt/RankA/Gajasura.cs @@ -13,20 +13,11 @@ public enum AID : uint Buffet = 8189, // 1ABF->none, 3,0s cast, single-target, randomly hits a target that isn't tanking, only happens when at least 2 actors are in combat with Gajasura (chocobos count) } -class Spin : Components.SelfTargetedAOEs -{ - public Spin() : base(ActionID.MakeSpell(AID.Spin), new AOEShapeCone(8.23f, 60.Degrees())) { } -} +class Spin(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Spin), new AOEShapeCone(8.23f, 60.Degrees())); -class Hurl : Components.LocationTargetedAOEs -{ - public Hurl() : base(ActionID.MakeSpell(AID.Hurl), 6) { } -} +class Hurl(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Hurl), 6); -class Buffet : Components.SingleTargetCast -{ - public Buffet() : base(ActionID.MakeSpell(AID.Buffet), "Heavy damage on random target (except tank)") { } -} +class Buffet(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.Buffet), "Heavy damage on random target (except tank)"); class GajasuraStates : StateMachineBuilder { @@ -40,7 +31,4 @@ public GajasuraStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.Hunt, GroupID = (uint)BossModuleInfo.HuntRank.A, NameID = 5998)] -public class Gajasura : SimpleBossModule -{ - public Gajasura(WorldState ws, Actor primary) : base(ws, primary) { } -} +public class Gajasura(WorldState ws, Actor primary) : SimpleBossModule(ws, primary); diff --git a/BossMod/Modules/Stormblood/Hunt/RankS/BoneCrawler.cs b/BossMod/Modules/Stormblood/Hunt/RankS/BoneCrawler.cs index fa460465da..bfbeac966f 100644 --- a/BossMod/Modules/Stormblood/Hunt/RankS/BoneCrawler.cs +++ b/BossMod/Modules/Stormblood/Hunt/RankS/BoneCrawler.cs @@ -19,40 +19,19 @@ public enum AID : uint BoneShaker = 7925, // Boss->self, no cast, range 30+R circle, raidwide player stun } -class HeatBreath : Components.SelfTargetedAOEs -{ - public HeatBreath() : base(ActionID.MakeSpell(AID.HeatBreath), new AOEShapeCone(14.2f, 45.Degrees())) { } -} +class HeatBreath(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HeatBreath), new AOEShapeCone(14.2f, 45.Degrees())); -class RipperClaw : Components.SelfTargetedAOEs -{ - public RipperClaw() : base(ActionID.MakeSpell(AID.RipperClaw), new AOEShapeCone(11.2f, 45.Degrees())) { } -} +class RipperClaw(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RipperClaw), new AOEShapeCone(11.2f, 45.Degrees())); -class WildCharge : Components.ChargeAOEs -{ - public WildCharge() : base(ActionID.MakeSpell(AID.WildCharge), 4) { } -} +class WildCharge(BossModule module) : Components.ChargeAOEs(module, ActionID.MakeSpell(AID.WildCharge), 4); -class HotCharge : Components.ChargeAOEs -{ - public HotCharge() : base(ActionID.MakeSpell(AID.HotCharge), 6) { } -} +class HotCharge(BossModule module) : Components.ChargeAOEs(module, ActionID.MakeSpell(AID.HotCharge), 6); -class TailSwing : Components.SelfTargetedAOEs -{ - public TailSwing() : base(ActionID.MakeSpell(AID.TailSwing), new AOEShapeCircle(10)) { } -} +class TailSwing(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TailSwing), new AOEShapeCircle(10)); -class TailSwingKB : Components.KnockbackFromCastTarget -{ - public TailSwingKB() : base(ActionID.MakeSpell(AID.TailSwing), 20, shape: new AOEShapeCircle(10)) { } -} +class TailSwingKB(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.TailSwing), 20, shape: new AOEShapeCircle(10)); -class TailSmash : Components.SelfTargetedAOEs -{ - public TailSmash() : base(ActionID.MakeSpell(AID.TailSmash), new AOEShapeCone(18.2f, 45.Degrees())) { } -} +class TailSmash(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TailSmash), new AOEShapeCone(18.2f, 45.Degrees())); class BoneCrawlerStates : StateMachineBuilder { @@ -70,7 +49,4 @@ public BoneCrawlerStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.Hunt, GroupID = (uint)BossModuleInfo.HuntRank.S, NameID = 5988)] -public class BoneCrawler : SimpleBossModule -{ - public BoneCrawler(WorldState ws, Actor primary) : base(ws, primary) { } -} +public class BoneCrawler(WorldState ws, Actor primary) : SimpleBossModule(ws, primary); diff --git a/BossMod/Modules/Stormblood/Hunt/RankS/Gamma.cs b/BossMod/Modules/Stormblood/Hunt/RankS/Gamma.cs index 1f5bb8dbd5..6aeda65bd3 100644 --- a/BossMod/Modules/Stormblood/Hunt/RankS/Gamma.cs +++ b/BossMod/Modules/Stormblood/Hunt/RankS/Gamma.cs @@ -21,20 +21,11 @@ public enum SID : uint Haste = 8, // Boss->Boss, extra=0x0 } -class DiffractiveLaser : Components.LocationTargetedAOEs -{ - public DiffractiveLaser() : base(ActionID.MakeSpell(AID.DiffractiveLaser), 5) { } -} +class DiffractiveLaser(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.DiffractiveLaser), 5); -class MagitekFlamehook : Components.RaidwideCast -{ - public MagitekFlamehook() : base(ActionID.MakeSpell(AID.MagitekFlamehook), "Raidwide + Pyretic") { } -} +class MagitekFlamehook(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.MagitekFlamehook), "Raidwide + Pyretic"); -class Launcher : Components.RaidwideCast -{ - public Launcher() : base(ActionID.MakeSpell(AID.Launcher), "Raidwide (%HP based)") { } -} +class Launcher(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.Launcher), "Raidwide (%HP based)"); class MagitekFlamehookPyretic : BossComponent { //Note: boss is lvl 70, so this pyretic can probably be ignored at lvl 90, but we assume the player is also around lvl 70 @@ -42,37 +33,37 @@ class MagitekFlamehookPyretic : BossComponent public bool Pyretic { get; private set; } private bool casting; - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.MagitekFlamehook) casting = true; } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.MagitekFlamehook) casting = false; } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Pyretic) - _pyretic.Set(module.Raid.FindSlot(actor.InstanceID)); + _pyretic.Set(Raid.FindSlot(actor.InstanceID)); } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Pyretic) - _pyretic.Clear(module.Raid.FindSlot(actor.InstanceID)); + _pyretic.Clear(Raid.FindSlot(actor.InstanceID)); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_pyretic[slot] != Pyretic) hints.Add("Pyretic on you! STOP everything!"); } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (casting) hints.Add("Applies Pyretic - STOP everything until it runs out!"); @@ -92,7 +83,4 @@ public GammaStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.Hunt, GroupID = (uint)BossModuleInfo.HuntRank.S, NameID = 5985)] -public class Gamma : SimpleBossModule -{ - public Gamma(WorldState ws, Actor primary) : base(ws, primary) { } -} +public class Gamma(WorldState ws, Actor primary) : SimpleBossModule(ws, primary); diff --git a/BossMod/Modules/Stormblood/Hunt/RankS/Okina.cs b/BossMod/Modules/Stormblood/Hunt/RankS/Okina.cs index 786f2898eb..91c435498b 100644 --- a/BossMod/Modules/Stormblood/Hunt/RankS/Okina.cs +++ b/BossMod/Modules/Stormblood/Hunt/RankS/Okina.cs @@ -17,50 +17,23 @@ public enum AID : uint RubyTide = 7992, // Boss->self, 2,0s cast, single-target, boss gives itself Dmg up buff } -class Hydrocannon : Components.SelfTargetedAOEs -{ - public Hydrocannon() : base(ActionID.MakeSpell(AID.Hydrocannon), new AOEShapeRect(30, 3)) { } -} +class Hydrocannon(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Hydrocannon), new AOEShapeRect(30, 3)); -class ElectricWhorl : Components.SelfTargetedAOEs -{ - public ElectricWhorl() : base(ActionID.MakeSpell(AID.ElectricWhorl), new AOEShapeDonut(8, 60)) { } -} +class ElectricWhorl(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ElectricWhorl), new AOEShapeDonut(8, 60)); -class Expulsion : Components.SelfTargetedAOEs -{ - public Expulsion() : base(ActionID.MakeSpell(AID.Expulsion), new AOEShapeCircle(14)) { } -} +class Expulsion(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Expulsion), new AOEShapeCircle(14)); -class ExpulsionKB : Components.KnockbackFromCastTarget -{ - public ExpulsionKB() : base(ActionID.MakeSpell(AID.Expulsion), 30, shape: new AOEShapeCircle(14)) { } -} +class ExpulsionKB(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.Expulsion), 30, shape: new AOEShapeCircle(14)); -class ElectricSwipe : Components.SelfTargetedAOEs -{ - public ElectricSwipe() : base(ActionID.MakeSpell(AID.ElectricSwipe), new AOEShapeCone(25, 30.Degrees())) { } -} +class ElectricSwipe(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ElectricSwipe), new AOEShapeCone(25, 30.Degrees())); -class BodySlam : Components.LocationTargetedAOEs -{ - public BodySlam() : base(ActionID.MakeSpell(AID.BodySlam), 10) { } -} +class BodySlam(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.BodySlam), 10); -class BodySlamKB : Components.KnockbackFromCastTarget -{ - public BodySlamKB() : base(ActionID.MakeSpell(AID.BodySlam), 20, shape: new AOEShapeCircle(10)) { } -} +class BodySlamKB(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.BodySlam), 20, shape: new AOEShapeCircle(10)); -class Immersion : Components.RaidwideCast -{ - public Immersion() : base(ActionID.MakeSpell(AID.Immersion)) { } -} +class Immersion(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.Immersion)); -class RubyTide : Components.CastHint -{ - public RubyTide() : base(ActionID.MakeSpell(AID.RubyTide), "Applies damage buff to self") { } -} +class RubyTide(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.RubyTide), "Applies damage buff to self"); class OkinaStates : StateMachineBuilder { @@ -80,7 +53,4 @@ public OkinaStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.Hunt, GroupID = (uint)BossModuleInfo.HuntRank.S, NameID = 5984)] -public class Okina : SimpleBossModule -{ - public Okina(WorldState ws, Actor primary) : base(ws, primary) { } -} +public class Okina(WorldState ws, Actor primary) : SimpleBossModule(ws, primary); diff --git a/BossMod/Modules/Stormblood/Hunt/RankS/Orghana.cs b/BossMod/Modules/Stormblood/Hunt/RankS/Orghana.cs index 138bb141d8..58841e20b6 100644 --- a/BossMod/Modules/Stormblood/Hunt/RankS/Orghana.cs +++ b/BossMod/Modules/Stormblood/Hunt/RankS/Orghana.cs @@ -15,20 +15,11 @@ public enum AID : uint Epigraph = 7997, // Boss->self, 3,5s cast, range 50+R width 8 rect } -class TremblingEpigraph : Components.RaidwideCast -{ - public TremblingEpigraph() : base(ActionID.MakeSpell(AID.TremblingEpigraph), "Raidwide x4") { } -} +class TremblingEpigraph(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.TremblingEpigraph), "Raidwide x4"); -class FlaringEpigraph : Components.RaidwideCast -{ - public FlaringEpigraph() : base(ActionID.MakeSpell(AID.FlaringEpigraph)) { } -} +class FlaringEpigraph(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.FlaringEpigraph)); -class Epigraph : Components.SelfTargetedAOEs -{ - public Epigraph() : base(ActionID.MakeSpell(AID.Epigraph), new AOEShapeRect(55.04f, 4)) { } -} +class Epigraph(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Epigraph), new AOEShapeRect(55.04f, 4)); class OrghanaStates : StateMachineBuilder { @@ -42,7 +33,4 @@ public OrghanaStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.Hunt, GroupID = (uint)BossModuleInfo.HuntRank.S, NameID = 5986)] -public class Orghana : SimpleBossModule -{ - public Orghana(WorldState ws, Actor primary) : base(ws, primary) { } -} +public class Orghana(WorldState ws, Actor primary) : SimpleBossModule(ws, primary); diff --git a/BossMod/Modules/Stormblood/TreasureHunt/TheLostCanalsOfUznair/CanalIcebeast.cs b/BossMod/Modules/Stormblood/TreasureHunt/TheLostCanalsOfUznair/CanalIcebeast.cs index 2ea4c430b2..36dc176505 100644 --- a/BossMod/Modules/Stormblood/TreasureHunt/TheLostCanalsOfUznair/CanalIcebeast.cs +++ b/BossMod/Modules/Stormblood/TreasureHunt/TheLostCanalsOfUznair/CanalIcebeast.cs @@ -27,40 +27,19 @@ public enum AID : uint Telega = 9630, // BonusAdds->self, no cast, single-target, bonus adds disappear } -class Eyeshine : Components.CastGaze -{ - public Eyeshine() : base(ActionID.MakeSpell(AID.Eyeshine)) { } -} +class Eyeshine(BossModule module) : Components.CastGaze(module, ActionID.MakeSpell(AID.Eyeshine)); -class AbsoluteZero : Components.SelfTargetedAOEs -{ - public AbsoluteZero() : base(ActionID.MakeSpell(AID.AbsoluteZero), new AOEShapeCone(45.5f, 45.Degrees())) { } -} +class AbsoluteZero(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.AbsoluteZero), new AOEShapeCone(45.5f, 45.Degrees())); -class Freezeover : Components.LocationTargetedAOEs -{ - public Freezeover() : base(ActionID.MakeSpell(AID.Freezeover), 6) { } -} +class Freezeover(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Freezeover), 6); -class PlainPound : Components.SelfTargetedAOEs -{ - public PlainPound() : base(ActionID.MakeSpell(AID.PlainPound), new AOEShapeCircle(4.56f)) { } -} +class PlainPound(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PlainPound), new AOEShapeCircle(4.56f)); -class RaucousScritch : Components.SelfTargetedAOEs -{ - public RaucousScritch() : base(ActionID.MakeSpell(AID.RaucousScritch), new AOEShapeCone(8.42f, 30.Degrees())) { } -} +class RaucousScritch(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RaucousScritch), new AOEShapeCone(8.42f, 30.Degrees())); -class Hurl : Components.LocationTargetedAOEs -{ - public Hurl() : base(ActionID.MakeSpell(AID.Hurl), 6) { } -} +class Hurl(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Hurl), 6); -class Spin : Components.Cleave -{ - public Spin() : base(ActionID.MakeSpell(AID.Spin), new AOEShapeCone(9.42f, 60.Degrees()), (uint)OID.BonusAdd_Abharamu) { } -} +class Spin(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.Spin), new AOEShapeCone(9.42f, 60.Degrees()), (uint)OID.BonusAdd_Abharamu); class IcebeastStates : StateMachineBuilder { diff --git a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarAiravata.cs b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarAiravata.cs index 3b35b053f2..41fd8e64a3 100644 --- a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarAiravata.cs +++ b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarAiravata.cs @@ -30,25 +30,13 @@ public enum IconID : uint BuffetTarget = 23, // player } -class HurlBoss : Components.LocationTargetedAOEs -{ - public HurlBoss() : base(ActionID.MakeSpell(AID.HurlBoss), 6) { } -} +class HurlBoss(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.HurlBoss), 6); -class SpinBoss : Components.SelfTargetedAOEs -{ - public SpinBoss() : base(ActionID.MakeSpell(AID.SpinBoss), new AOEShapeCone(30, 60.Degrees())) { } -} +class SpinBoss(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.SpinBoss), new AOEShapeCone(30, 60.Degrees())); -class BarbarousScream : Components.SelfTargetedAOEs -{ - public BarbarousScream() : base(ActionID.MakeSpell(AID.BarbarousScream), new AOEShapeCircle(13)) { } -} +class BarbarousScream(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.BarbarousScream), new AOEShapeCircle(13)); -class Huff : Components.SingleTargetDelayableCast -{ - public Huff() : base(ActionID.MakeSpell(AID.Huff)) { } -} +class Huff(BossModule module) : Components.SingleTargetDelayableCast(module, ActionID.MakeSpell(AID.Huff)); class Buffet : Components.KnockbackFromCastTarget { @@ -60,7 +48,7 @@ public Buffet() : base(ActionID.MakeSpell(AID.Buffet), 20, kind: Kind.DirForward StopAtWall = true; } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.BuffetTarget) { @@ -69,19 +57,19 @@ public override void OnEventIcon(BossModule module, Actor actor, uint iconID) } } - public override IEnumerable Sources(BossModule module, int slot, Actor actor) + public override IEnumerable Sources(int slot, Actor actor) { return target == actor ? base.Sources(module, slot, actor) : Enumerable.Empty(); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { base.OnCastFinished(module, caster, spell); if ((AID)spell.Action.ID == AID.Buffet) targeted = false; } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { base.AddHints(module, slot, actor, hints, movementHints); if (target == actor && targeted) @@ -90,11 +78,11 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { base.AddAIHints(module, slot, actor, assignment, hints); if (target == actor && targeted) - hints.AddForbiddenZone(ShapeDistance.Circle(module.Bounds.Center, 18)); + hints.AddForbiddenZone(ShapeDistance.Circle(Module.Bounds.Center, 18)); } } @@ -102,45 +90,36 @@ class Buffet2 : Components.BaitAwayCast //Boss jumps on player and does a cone a { public Buffet2() : base(ActionID.MakeSpell(AID.Buffet), new AOEShapeCone(30, 60.Degrees()), true) { } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { foreach (var b in CurrentBaits) if (b.Target.InstanceID != actor.InstanceID && CurrentBaits.Count > 0) - hints.AddForbiddenZone(b.Shape, b.Target.Position + (b.Target.HitboxRadius + module.PrimaryActor.HitboxRadius) * (module.PrimaryActor.Position - b.Target.Position).Normalized(), b.Rotation); + hints.AddForbiddenZone(b.Shape, b.Target.Position + (b.Target.HitboxRadius + Module.PrimaryActor.HitboxRadius) * (Module.PrimaryActor.Position - b.Target.Position).Normalized(), b.Rotation); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (var bait in ActiveBaitsOn(pc)) { - bait.Shape.Outline(arena, bait.Target.Position + (bait.Target.HitboxRadius + module.PrimaryActor.HitboxRadius) * (module.PrimaryActor.Position - bait.Target.Position).Normalized(), bait.Rotation); + bait.Shape.Outline(arena, bait.Target.Position + (bait.Target.HitboxRadius + Module.PrimaryActor.HitboxRadius) * (Module.PrimaryActor.Position - bait.Target.Position).Normalized(), bait.Rotation); } } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { if (!IgnoreOtherBaits) foreach (var bait in ActiveBaitsNotOn(pc)) if (AlwaysDrawOtherBaits || IsClippedBy(pc, bait)) - bait.Shape.Draw(arena, bait.Target.Position + (bait.Target.HitboxRadius + module.PrimaryActor.HitboxRadius) * (module.PrimaryActor.Position - bait.Target.Position).Normalized(), bait.Rotation); + bait.Shape.Draw(arena, bait.Target.Position + (bait.Target.HitboxRadius + Module.PrimaryActor.HitboxRadius) * (Module.PrimaryActor.Position - bait.Target.Position).Normalized(), bait.Rotation); } } -class RaucousScritch : Components.SelfTargetedAOEs -{ - public RaucousScritch() : base(ActionID.MakeSpell(AID.RaucousScritch), new AOEShapeCone(8.42f, 30.Degrees())) { } -} +class RaucousScritch(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RaucousScritch), new AOEShapeCone(8.42f, 30.Degrees())); -class Hurl : Components.LocationTargetedAOEs -{ - public Hurl() : base(ActionID.MakeSpell(AID.Hurl), 6) { } -} +class Hurl(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Hurl), 6); -class Spin : Components.Cleave -{ - public Spin() : base(ActionID.MakeSpell(AID.Spin), new AOEShapeCone(9.42f, 60.Degrees()), (uint)OID.BonusAdd_AltarMatanga) { } -} +class Spin(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.Spin), new AOEShapeCone(9.42f, 60.Degrees()), (uint)OID.BonusAdd_AltarMatanga); class AiravataStates : StateMachineBuilder { diff --git a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarArachne.cs b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarArachne.cs index 8351d148dd..87f91222d2 100644 --- a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarArachne.cs +++ b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarArachne.cs @@ -28,55 +28,25 @@ public enum AID : uint Telega = 9630, // BonusAdds->self, no cast, single-target, bonus adds disappear } -class DarkSpike : Components.SingleTargetDelayableCast -{ - public DarkSpike() : base(ActionID.MakeSpell(AID.DarkSpike)) { } -} +class DarkSpike(BossModule module) : Components.SingleTargetDelayableCast(module, ActionID.MakeSpell(AID.DarkSpike)); -class FrondAffeared : Components.CastGaze -{ - public FrondAffeared() : base(ActionID.MakeSpell(AID.FrondAffeared)) { } -} +class FrondAffeared(BossModule module) : Components.CastGaze(module, ActionID.MakeSpell(AID.FrondAffeared)); -class SilkenSpray : Components.SelfTargetedAOEs -{ - public SilkenSpray() : base(ActionID.MakeSpell(AID.SilkenSpray), new AOEShapeCone(24, 30.Degrees())) { } -} +class SilkenSpray(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.SilkenSpray), new AOEShapeCone(24, 30.Degrees())); -class Implosion : Components.RaidwideCast -{ - public Implosion() : base(ActionID.MakeSpell(AID.Implosion)) { } -} +class Implosion(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.Implosion)); -class Earthquake1 : Components.SelfTargetedAOEs -{ - public Earthquake1() : base(ActionID.MakeSpell(AID.Earthquake1), new AOEShapeCircle(10.5f)) { } -} +class Earthquake1(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Earthquake1), new AOEShapeCircle(10.5f)); -class Earthquake2 : Components.SelfTargetedAOEs -{ - public Earthquake2() : base(ActionID.MakeSpell(AID.Earthquake2), new AOEShapeDonut(10, 20)) { } -} +class Earthquake2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Earthquake2), new AOEShapeDonut(10, 20)); -class Earthquake3 : Components.SelfTargetedAOEs -{ - public Earthquake3() : base(ActionID.MakeSpell(AID.Earthquake3), new AOEShapeDonut(20, 30)) { } -} +class Earthquake3(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Earthquake3), new AOEShapeDonut(20, 30)); -class RaucousScritch : Components.SelfTargetedAOEs -{ - public RaucousScritch() : base(ActionID.MakeSpell(AID.RaucousScritch), new AOEShapeCone(8.42f, 30.Degrees())) { } -} +class RaucousScritch(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RaucousScritch), new AOEShapeCone(8.42f, 30.Degrees())); -class Hurl : Components.LocationTargetedAOEs -{ - public Hurl() : base(ActionID.MakeSpell(AID.Hurl), 6) { } -} +class Hurl(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Hurl), 6); -class Spin : Components.Cleave -{ - public Spin() : base(ActionID.MakeSpell(AID.Spin), new AOEShapeCone(9.42f, 60.Degrees()), (uint)OID.BonusAdd_AltarMatanga) { } -} +class Spin(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.Spin), new AOEShapeCone(9.42f, 60.Degrees()), (uint)OID.BonusAdd_AltarMatanga); class ArachneStates : StateMachineBuilder { diff --git a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarBeast.cs b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarBeast.cs index 6764813142..ce9f37b8f1 100644 --- a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarBeast.cs +++ b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarBeast.cs @@ -37,75 +37,33 @@ public enum AID : uint Hurl = 5352, // BonusAdd_AltarMatanga->location, 3,0s cast, range 6 circle } -class RustingClaw : Components.SelfTargetedAOEs -{ - public RustingClaw() : base(ActionID.MakeSpell(AID.RustingClaw), new AOEShapeCone(12.6f, 60.Degrees())) { } -} +class RustingClaw(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RustingClaw), new AOEShapeCone(12.6f, 60.Degrees())); -class TailDrive : Components.SelfTargetedAOEs -{ - public TailDrive() : base(ActionID.MakeSpell(AID.TailDrive), new AOEShapeCone(34.6f, 60.Degrees())) { } -} +class TailDrive(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TailDrive), new AOEShapeCone(34.6f, 60.Degrees())); -class TheSpin : Components.SelfTargetedAOEs -{ - public TheSpin() : base(ActionID.MakeSpell(AID.TheSpin), new AOEShapeCircle(15)) { } -} +class TheSpin(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TheSpin), new AOEShapeCircle(15)); -class WordsOfWoe : Components.SelfTargetedAOEs -{ - public WordsOfWoe() : base(ActionID.MakeSpell(AID.WordsOfWoe), new AOEShapeRect(49.6f, 3)) { } -} +class WordsOfWoe(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.WordsOfWoe), new AOEShapeRect(49.6f, 3)); -class VengefulSoul : Components.LocationTargetedAOEs -{ - public VengefulSoul() : base(ActionID.MakeSpell(AID.VengefulSoul), 6) { } -} +class VengefulSoul(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.VengefulSoul), 6); -class EyeOfTheFire : Components.CastGaze -{ - public EyeOfTheFire() : base(ActionID.MakeSpell(AID.EyeOfTheFire)) { } -} +class EyeOfTheFire(BossModule module) : Components.CastGaze(module, ActionID.MakeSpell(AID.EyeOfTheFire)); -class PluckAndPrune : Components.SelfTargetedAOEs -{ - public PluckAndPrune() : base(ActionID.MakeSpell(AID.PluckAndPrune), new AOEShapeCircle(6.84f)) { } -} +class PluckAndPrune(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PluckAndPrune), new AOEShapeCircle(6.84f)); -class TearyTwirl : Components.SelfTargetedAOEs -{ - public TearyTwirl() : base(ActionID.MakeSpell(AID.TearyTwirl), new AOEShapeCircle(6.84f)) { } -} +class TearyTwirl(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TearyTwirl), new AOEShapeCircle(6.84f)); -class HeirloomScream : Components.SelfTargetedAOEs -{ - public HeirloomScream() : base(ActionID.MakeSpell(AID.HeirloomScream), new AOEShapeCircle(6.84f)) { } -} +class HeirloomScream(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HeirloomScream), new AOEShapeCircle(6.84f)); -class PungentPirouette : Components.SelfTargetedAOEs -{ - public PungentPirouette() : base(ActionID.MakeSpell(AID.PungentPirouette), new AOEShapeCircle(6.84f)) { } -} +class PungentPirouette(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PungentPirouette), new AOEShapeCircle(6.84f)); -class Pollen : Components.SelfTargetedAOEs -{ - public Pollen() : base(ActionID.MakeSpell(AID.Pollen), new AOEShapeCircle(6.84f)) { } -} +class Pollen(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Pollen), new AOEShapeCircle(6.84f)); -class RaucousScritch : Components.SelfTargetedAOEs -{ - public RaucousScritch() : base(ActionID.MakeSpell(AID.RaucousScritch), new AOEShapeCone(8.42f, 30.Degrees())) { } -} +class RaucousScritch(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RaucousScritch), new AOEShapeCone(8.42f, 30.Degrees())); -class Hurl : Components.LocationTargetedAOEs -{ - public Hurl() : base(ActionID.MakeSpell(AID.Hurl), 6) { } -} +class Hurl(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Hurl), 6); -class Spin : Components.Cleave -{ - public Spin() : base(ActionID.MakeSpell(AID.Spin), new AOEShapeCone(9.42f, 60.Degrees()), (uint)OID.BonusAdd_AltarMatanga) { } -} +class Spin(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.Spin), new AOEShapeCone(9.42f, 60.Degrees()), (uint)OID.BonusAdd_AltarMatanga); class BeastStates : StateMachineBuilder { diff --git a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarChimera.cs b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarChimera.cs index e5e84d4417..10c46553c0 100644 --- a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarChimera.cs +++ b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarChimera.cs @@ -33,52 +33,28 @@ public enum IconID : uint Baitaway = 23, // player } -class TheScorpionsSting : Components.SelfTargetedAOEs -{ - public TheScorpionsSting() : base(ActionID.MakeSpell(AID.TheScorpionsSting), new AOEShapeCone(11.92f, 45.Degrees())) { } -} +class TheScorpionsSting(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TheScorpionsSting), new AOEShapeCone(11.92f, 45.Degrees())); -class TheRamsVoice : Components.SelfTargetedAOEs -{ - public TheRamsVoice() : base(ActionID.MakeSpell(AID.TheRamsVoice), new AOEShapeCircle(9.92f)) { } -} +class TheRamsVoice(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TheRamsVoice), new AOEShapeCircle(9.92f)); -class TheRamsVoiceHint : Components.CastInterruptHint -{ - public TheRamsVoiceHint() : base(ActionID.MakeSpell(AID.TheRamsVoice)) { } -} +class TheRamsVoiceHint(BossModule module) : Components.CastInterruptHint(module, ActionID.MakeSpell(AID.TheRamsVoice)); -class TheLionsBreath : Components.SelfTargetedAOEs -{ - public TheLionsBreath() : base(ActionID.MakeSpell(AID.TheLionsBreath), new AOEShapeCone(11.92f, 60.Degrees())) { } -} +class TheLionsBreath(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TheLionsBreath), new AOEShapeCone(11.92f, 60.Degrees())); -class LanguorousGaze : Components.SelfTargetedAOEs -{ - public LanguorousGaze() : base(ActionID.MakeSpell(AID.LanguorousGaze), new AOEShapeCone(8.07f, 45.Degrees())) { } -} +class LanguorousGaze(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.LanguorousGaze), new AOEShapeCone(8.07f, 45.Degrees())); -class TheDragonsVoice : Components.SelfTargetedAOEs -{ - public TheDragonsVoice() : base(ActionID.MakeSpell(AID.TheDragonsVoice), new AOEShapeDonut(8, 30)) { } -} +class TheDragonsVoice(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TheDragonsVoice), new AOEShapeDonut(8, 30)); -class TheDragonsVoiceHint : Components.CastInterruptHint -{ - public TheDragonsVoiceHint() : base(ActionID.MakeSpell(AID.TheDragonsVoice)) { } -} +class TheDragonsVoiceHint(BossModule module) : Components.CastInterruptHint(module, ActionID.MakeSpell(AID.TheDragonsVoice)); -class TheRamsKeeper : Components.LocationTargetedAOEs -{ - public TheRamsKeeper() : base(ActionID.MakeSpell(AID.TheRamsKeeper), 6) { } -} +class TheRamsKeeper(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.TheRamsKeeper), 6); class TheRamsKeeperBait : Components.GenericBaitAway { private bool targeted; private Actor? target; - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.Baitaway) { @@ -88,7 +64,7 @@ public override void OnEventIcon(BossModule module, Actor actor, uint iconID) } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.TheRamsKeeper) { @@ -97,14 +73,14 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { base.AddAIHints(module, slot, actor, assignment, hints); if (target == actor && targeted) - hints.AddForbiddenZone(ShapeDistance.Circle(module.Bounds.Center, 18)); + hints.AddForbiddenZone(ShapeDistance.Circle(Module.Bounds.Center, 18)); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { base.AddHints(module, slot, actor, hints, movementHints); if (target == actor && targeted) @@ -112,25 +88,13 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint } } -class IceVoidzone : Components.PersistentVoidzone -{ - public IceVoidzone() : base(6, m => m.Enemies(OID.IceVoidzone).Where(z => z.EventState != 7)) { } -} +class IceVoidzone(BossModule module) : Components.PersistentVoidzone(module, 6, m => m.Enemies(OID.IceVoidzone).Where(z => z.EventState != 7)); -class RaucousScritch : Components.SelfTargetedAOEs -{ - public RaucousScritch() : base(ActionID.MakeSpell(AID.RaucousScritch), new AOEShapeCone(8.42f, 30.Degrees())) { } -} +class RaucousScritch(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RaucousScritch), new AOEShapeCone(8.42f, 30.Degrees())); -class Hurl : Components.LocationTargetedAOEs -{ - public Hurl() : base(ActionID.MakeSpell(AID.Hurl), 6) { } -} +class Hurl(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Hurl), 6); -class Spin : Components.Cleave -{ - public Spin() : base(ActionID.MakeSpell(AID.Spin), new AOEShapeCone(9.42f, 60.Degrees()), (uint)OID.BonusAdd_AltarMatanga) { } -} +class Spin(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.Spin), new AOEShapeCone(9.42f, 60.Degrees()), (uint)OID.BonusAdd_AltarMatanga); class ChimeraStates : StateMachineBuilder { diff --git a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarDiresaur.cs b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarDiresaur.cs index 74736f181c..125df17129 100644 --- a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarDiresaur.cs +++ b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarDiresaur.cs @@ -35,47 +35,26 @@ public enum IconID : uint Baitaway = 23, // player } -class DeadlyHold : Components.SingleTargetDelayableCast -{ - public DeadlyHold() : base(ActionID.MakeSpell(AID.DeadlyHold)) { } -} +class DeadlyHold(BossModule module) : Components.SingleTargetDelayableCast(module, ActionID.MakeSpell(AID.DeadlyHold)); -class HeatBreath : Components.SelfTargetedAOEs -{ - public HeatBreath() : base(ActionID.MakeSpell(AID.HeatBreath), new AOEShapeCone(14.6f, 45.Degrees())) { } -} +class HeatBreath(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HeatBreath), new AOEShapeCone(14.6f, 45.Degrees())); -class TailSmash : Components.SelfTargetedAOEs -{ - public TailSmash() : base(ActionID.MakeSpell(AID.TailSmash), new AOEShapeCone(26.6f, 45.Degrees())) { } -} +class TailSmash(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TailSmash), new AOEShapeCone(26.6f, 45.Degrees())); -class RagingInferno : Components.RaidwideCast -{ - public RagingInferno() : base(ActionID.MakeSpell(AID.RagingInferno)) { } -} +class RagingInferno(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.RagingInferno)); -class Comet : Components.LocationTargetedAOEs -{ - public Comet() : base(ActionID.MakeSpell(AID.Comet), 4) { } -} +class Comet(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Comet), 4); -class HardStomp : Components.SelfTargetedAOEs -{ - public HardStomp() : base(ActionID.MakeSpell(AID.HardStomp), new AOEShapeCircle(10)) { } -} +class HardStomp(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HardStomp), new AOEShapeCircle(10)); -class Fireball : Components.LocationTargetedAOEs -{ - public Fireball() : base(ActionID.MakeSpell(AID.Fireball), 6) { } -} +class Fireball(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Fireball), 6); class FireballBait : Components.GenericBaitAway { private bool targeted; private Actor? target; - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.Baitaway) { @@ -85,7 +64,7 @@ public override void OnEventIcon(BossModule module, Actor actor, uint iconID) } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.Fireball) ++NumCasts; @@ -97,39 +76,27 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { base.AddAIHints(module, slot, actor, assignment, hints); if (target == actor && targeted) - hints.AddForbiddenZone(ShapeDistance.Circle(module.Bounds.Center, 18)); + hints.AddForbiddenZone(ShapeDistance.Circle(Module.Bounds.Center, 18)); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (target == actor && targeted) hints.Add("Bait voidzone away! (3 times)"); } } -class FireballVoidzone : Components.PersistentVoidzone -{ - public FireballVoidzone() : base(6, m => m.Enemies(OID.FireVoidzone).Where(z => z.EventState != 7)) { } -} +class FireballVoidzone(BossModule module) : Components.PersistentVoidzone(module, 6, m => m.Enemies(OID.FireVoidzone).Where(z => z.EventState != 7)); -class RaucousScritch : Components.SelfTargetedAOEs -{ - public RaucousScritch() : base(ActionID.MakeSpell(AID.RaucousScritch), new AOEShapeCone(8.42f, 30.Degrees())) { } -} +class RaucousScritch(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RaucousScritch), new AOEShapeCone(8.42f, 30.Degrees())); -class Hurl : Components.LocationTargetedAOEs -{ - public Hurl() : base(ActionID.MakeSpell(AID.Hurl), 6) { } -} +class Hurl(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Hurl), 6); -class Spin : Components.Cleave -{ - public Spin() : base(ActionID.MakeSpell(AID.Spin), new AOEShapeCone(9.42f, 60.Degrees()), (uint)OID.BonusAdd_AltarMatanga) { } -} +class Spin(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.Spin), new AOEShapeCone(9.42f, 60.Degrees()), (uint)OID.BonusAdd_AltarMatanga); class DiresaurStates : StateMachineBuilder { diff --git a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarDullahan.cs b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarDullahan.cs index 65a83852f3..1aaaba7fb9 100644 --- a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarDullahan.cs +++ b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarDullahan.cs @@ -37,55 +37,25 @@ public enum AID : uint Telega = 9630, // bonusadds->self, no cast, single-target, bonus add disappear } -class IronJustice : Components.SelfTargetedAOEs -{ - public IronJustice() : base(ActionID.MakeSpell(AID.IronJustice), new AOEShapeCone(11.8f, 60.Degrees())) { } -} +class IronJustice(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.IronJustice), new AOEShapeCone(11.8f, 60.Degrees())); -class Cloudcover : Components.LocationTargetedAOEs -{ - public Cloudcover() : base(ActionID.MakeSpell(AID.Cloudcover), 6) { } -} +class Cloudcover(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Cloudcover), 6); -class TerrorEye : Components.LocationTargetedAOEs -{ - public TerrorEye() : base(ActionID.MakeSpell(AID.TerrorEye), 6) { } -} +class TerrorEye(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.TerrorEye), 6); -class VillainousRebuke : Components.StackWithCastTargets -{ - public VillainousRebuke() : base(ActionID.MakeSpell(AID.VillainousRebuke), 6) { } -} +class VillainousRebuke(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.VillainousRebuke), 6); -class StygianRelease : Components.RaidwideCast -{ - public StygianRelease() : base(ActionID.MakeSpell(AID.StygianRelease)) { } -} +class StygianRelease(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.StygianRelease)); -class PluckAndPrune : Components.SelfTargetedAOEs -{ - public PluckAndPrune() : base(ActionID.MakeSpell(AID.PluckAndPrune), new AOEShapeCircle(6.84f)) { } -} +class PluckAndPrune(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PluckAndPrune), new AOEShapeCircle(6.84f)); -class TearyTwirl : Components.SelfTargetedAOEs -{ - public TearyTwirl() : base(ActionID.MakeSpell(AID.TearyTwirl), new AOEShapeCircle(6.84f)) { } -} +class TearyTwirl(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TearyTwirl), new AOEShapeCircle(6.84f)); -class HeirloomScream : Components.SelfTargetedAOEs -{ - public HeirloomScream() : base(ActionID.MakeSpell(AID.HeirloomScream), new AOEShapeCircle(6.84f)) { } -} +class HeirloomScream(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HeirloomScream), new AOEShapeCircle(6.84f)); -class PungentPirouette : Components.SelfTargetedAOEs -{ - public PungentPirouette() : base(ActionID.MakeSpell(AID.PungentPirouette), new AOEShapeCircle(6.84f)) { } -} +class PungentPirouette(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PungentPirouette), new AOEShapeCircle(6.84f)); -class Pollen : Components.SelfTargetedAOEs -{ - public Pollen() : base(ActionID.MakeSpell(AID.Pollen), new AOEShapeCircle(6.84f)) { } -} +class Pollen(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Pollen), new AOEShapeCircle(6.84f)); class StygianReleaseKB : Components.KnockbackFromCastTarget { @@ -97,20 +67,11 @@ public StygianReleaseKB() : base(ActionID.MakeSpell(AID.StygianRelease), 20) public override bool DestinationUnsafe(BossModule module, int slot, Actor actor, WPos pos) => module.FindComponent()?.ActiveAOEs(module, slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false; } -class RaucousScritch : Components.SelfTargetedAOEs -{ - public RaucousScritch() : base(ActionID.MakeSpell(AID.RaucousScritch), new AOEShapeCone(8.42f, 30.Degrees())) { } -} +class RaucousScritch(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RaucousScritch), new AOEShapeCone(8.42f, 30.Degrees())); -class Hurl : Components.LocationTargetedAOEs -{ - public Hurl() : base(ActionID.MakeSpell(AID.Hurl), 6) { } -} +class Hurl(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Hurl), 6); -class Spin : Components.Cleave -{ - public Spin() : base(ActionID.MakeSpell(AID.Spin), new AOEShapeCone(9.42f, 60.Degrees()), (uint)OID.BonusAdd_AltarMatanga) { } -} +class Spin(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.Spin), new AOEShapeCone(9.42f, 60.Degrees()), (uint)OID.BonusAdd_AltarMatanga); class DullahanStates : StateMachineBuilder { diff --git a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarKelpie.cs b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarKelpie.cs index b3422a1b3d..b8e3665560 100644 --- a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarKelpie.cs +++ b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarKelpie.cs @@ -37,15 +37,9 @@ public enum AID : uint Telega = 9630, // BonusAdds->self, no cast, single-target, bonus adds disappear } -class Innocence : Components.LocationTargetedAOEs -{ - public Innocence() : base(ActionID.MakeSpell(AID.Innocence), 5) { } -} +class Innocence(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Innocence), 5); -class HydroPush : Components.SelfTargetedAOEs -{ - public HydroPush() : base(ActionID.MakeSpell(AID.HydroPush), new AOEShapeRect(49.4f, 22, 5)) { } -} +class HydroPush(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HydroPush), new AOEShapeRect(49.4f, 22, 5)); class BloodyPuddle : Components.GenericAOEs { @@ -53,37 +47,31 @@ class BloodyPuddle : Components.GenericAOEs private readonly List _spheres = []; private DateTime _activation; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { foreach (var s in _spheres) yield return new(circle, s.Position, activation: _activation); } - public override void OnActorCreated(BossModule module, Actor actor) + public override void OnActorCreated(Actor actor) { if ((OID)actor.OID == OID.Hydrosphere) { _spheres.Add(actor); - _activation = module.WorldState.CurrentTime.AddSeconds(8.6f); + _activation = WorldState.FutureTime(8.6f); } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.BloodyPuddle) _spheres.Clear(); } } -class Torpedo : Components.SingleTargetDelayableCast -{ - public Torpedo() : base(ActionID.MakeSpell(AID.Torpedo)) { } -} +class Torpedo(BossModule module) : Components.SingleTargetDelayableCast(module, ActionID.MakeSpell(AID.Torpedo)); -class RisingSeas : Components.RaidwideCast -{ - public RisingSeas() : base(ActionID.MakeSpell(AID.RisingSeas)) { } -} +class RisingSeas(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.RisingSeas)); class HydroPushKB : Components.KnockbackFromCastTarget { @@ -102,45 +90,21 @@ public RisingSeasKB() : base(ActionID.MakeSpell(AID.RisingSeas), 20) public override bool DestinationUnsafe(BossModule module, int slot, Actor actor, WPos pos) => module.FindComponent()?.ActiveAOEs(module, slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false; } -class RaucousScritch : Components.SelfTargetedAOEs -{ - public RaucousScritch() : base(ActionID.MakeSpell(AID.RaucousScritch), new AOEShapeCone(8.42f, 30.Degrees())) { } -} +class RaucousScritch(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RaucousScritch), new AOEShapeCone(8.42f, 30.Degrees())); -class Hurl : Components.LocationTargetedAOEs -{ - public Hurl() : base(ActionID.MakeSpell(AID.Hurl), 6) { } -} +class Hurl(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Hurl), 6); -class Spin : Components.Cleave -{ - public Spin() : base(ActionID.MakeSpell(AID.Spin), new AOEShapeCone(9.42f, 60.Degrees()), (uint)OID.BonusAdd_AltarMatanga) { } -} +class Spin(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.Spin), new AOEShapeCone(9.42f, 60.Degrees()), (uint)OID.BonusAdd_AltarMatanga); -class PluckAndPrune : Components.SelfTargetedAOEs -{ - public PluckAndPrune() : base(ActionID.MakeSpell(AID.PluckAndPrune), new AOEShapeCircle(6.84f)) { } -} +class PluckAndPrune(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PluckAndPrune), new AOEShapeCircle(6.84f)); -class TearyTwirl : Components.SelfTargetedAOEs -{ - public TearyTwirl() : base(ActionID.MakeSpell(AID.TearyTwirl), new AOEShapeCircle(6.84f)) { } -} +class TearyTwirl(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TearyTwirl), new AOEShapeCircle(6.84f)); -class HeirloomScream : Components.SelfTargetedAOEs -{ - public HeirloomScream() : base(ActionID.MakeSpell(AID.HeirloomScream), new AOEShapeCircle(6.84f)) { } -} +class HeirloomScream(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HeirloomScream), new AOEShapeCircle(6.84f)); -class PungentPirouette : Components.SelfTargetedAOEs -{ - public PungentPirouette() : base(ActionID.MakeSpell(AID.PungentPirouette), new AOEShapeCircle(6.84f)) { } -} +class PungentPirouette(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PungentPirouette), new AOEShapeCircle(6.84f)); -class Pollen : Components.SelfTargetedAOEs -{ - public Pollen() : base(ActionID.MakeSpell(AID.Pollen), new AOEShapeCircle(6.84f)) { } -} +class Pollen(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Pollen), new AOEShapeCircle(6.84f)); class KelpieStates : StateMachineBuilder { diff --git a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarMandragora.cs b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarMandragora.cs index 777fc9ca9c..af700a6996 100644 --- a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarMandragora.cs +++ b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarMandragora.cs @@ -29,50 +29,23 @@ public enum AID : uint Telega = 9630, // bonusadds->self, no cast, single-target, bonus add disappear } -class OpticalIntrusion : Components.SingleTargetDelayableCast -{ - public OpticalIntrusion() : base(ActionID.MakeSpell(AID.OpticalIntrusion)) { } -} +class OpticalIntrusion(BossModule module) : Components.SingleTargetDelayableCast(module, ActionID.MakeSpell(AID.OpticalIntrusion)); -class Hypnotize : Components.SelfTargetedAOEs -{ - public Hypnotize() : base(ActionID.MakeSpell(AID.Hypnotize), new AOEShapeCone(22.85f, 45.Degrees())) { } -} +class Hypnotize(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Hypnotize), new AOEShapeCone(22.85f, 45.Degrees())); -class SaibaiMandragora : Components.CastHint -{ - public SaibaiMandragora() : base(ActionID.MakeSpell(AID.SaibaiMandragora), "Calls adds") { } -} +class SaibaiMandragora(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.SaibaiMandragora), "Calls adds"); -class LeafDagger : Components.LocationTargetedAOEs -{ - public LeafDagger() : base(ActionID.MakeSpell(AID.LeafDagger), 3) { } -} +class LeafDagger(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.LeafDagger), 3); -class PluckAndPrune : Components.SelfTargetedAOEs -{ - public PluckAndPrune() : base(ActionID.MakeSpell(AID.PluckAndPrune), new AOEShapeCircle(6.84f)) { } -} +class PluckAndPrune(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PluckAndPrune), new AOEShapeCircle(6.84f)); -class TearyTwirl : Components.SelfTargetedAOEs -{ - public TearyTwirl() : base(ActionID.MakeSpell(AID.TearyTwirl), new AOEShapeCircle(6.84f)) { } -} +class TearyTwirl(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TearyTwirl), new AOEShapeCircle(6.84f)); -class HeirloomScream : Components.SelfTargetedAOEs -{ - public HeirloomScream() : base(ActionID.MakeSpell(AID.HeirloomScream), new AOEShapeCircle(6.84f)) { } -} +class HeirloomScream(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HeirloomScream), new AOEShapeCircle(6.84f)); -class PungentPirouette : Components.SelfTargetedAOEs -{ - public PungentPirouette() : base(ActionID.MakeSpell(AID.PungentPirouette), new AOEShapeCircle(6.84f)) { } -} +class PungentPirouette(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PungentPirouette), new AOEShapeCircle(6.84f)); -class Pollen : Components.SelfTargetedAOEs -{ - public Pollen() : base(ActionID.MakeSpell(AID.Pollen), new AOEShapeCircle(6.84f)) { } -} +class Pollen(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Pollen), new AOEShapeCircle(6.84f)); class MandragoraStates : StateMachineBuilder { diff --git a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarSkatene.cs b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarSkatene.cs index 3d44b4f84c..9d4d878eee 100644 --- a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarSkatene.cs +++ b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarSkatene.cs @@ -17,25 +17,13 @@ public enum AID : uint Chirp = 13310, // Boss->self, 3,5s cast, range 8+R circle } -class Chirp : Components.SelfTargetedAOEs -{ - public Chirp() : base(ActionID.MakeSpell(AID.Chirp), new AOEShapeCircle(12.48f)) { } -} +class Chirp(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Chirp), new AOEShapeCircle(12.48f)); -class Tornado : Components.LocationTargetedAOEs -{ - public Tornado() : base(ActionID.MakeSpell(AID.Tornado), 6) { } -} +class Tornado(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Tornado), 6); -class VoidCall : Components.CastHint -{ - public VoidCall() : base(ActionID.MakeSpell(AID.VoidCall), "Calls adds") { } -} +class VoidCall(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.VoidCall), "Calls adds"); -class RecklessAbandon : Components.SingleTargetDelayableCast -{ - public RecklessAbandon() : base(ActionID.MakeSpell(AID.RecklessAbandon)) { } -} +class RecklessAbandon(BossModule module) : Components.SingleTargetDelayableCast(module, ActionID.MakeSpell(AID.RecklessAbandon)); class SkateneStates : StateMachineBuilder { diff --git a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarTotem.cs b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarTotem.cs index be877c1720..c314b93039 100644 --- a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarTotem.cs +++ b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarTotem.cs @@ -32,37 +32,22 @@ public enum IconID : uint Baitaway = 23, // player } -class FlurryOfRage : Components.SelfTargetedAOEs -{ - public FlurryOfRage() : base(ActionID.MakeSpell(AID.FlurryOfRage), new AOEShapeCone(13.06f, 60.Degrees())) { } -} +class FlurryOfRage(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.FlurryOfRage), new AOEShapeCone(13.06f, 60.Degrees())); -class WaveOfMalice : Components.LocationTargetedAOEs -{ - public WaveOfMalice() : base(ActionID.MakeSpell(AID.WaveOfMalice), 5) { } -} +class WaveOfMalice(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.WaveOfMalice), 5); -class WhorlOfFrenzy : Components.SelfTargetedAOEs -{ - public WhorlOfFrenzy() : base(ActionID.MakeSpell(AID.WhorlOfFrenzy), new AOEShapeCircle(11.06f)) { } -} +class WhorlOfFrenzy(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.WhorlOfFrenzy), new AOEShapeCircle(11.06f)); -class TheWardensVerdict : Components.SelfTargetedAOEs -{ - public TheWardensVerdict() : base(ActionID.MakeSpell(AID.TheWardensVerdict), new AOEShapeRect(45.06f, 2)) { } -} +class TheWardensVerdict(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TheWardensVerdict), new AOEShapeRect(45.06f, 2)); -class FlamesOfFury : Components.LocationTargetedAOEs -{ - public FlamesOfFury() : base(ActionID.MakeSpell(AID.FlamesOfFury), 10) { } -} +class FlamesOfFury(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.FlamesOfFury), 10); class FlamesOfFuryBait : Components.GenericBaitAway { private bool targeted; private Actor? target; - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.Baitaway) { @@ -72,7 +57,7 @@ public override void OnEventIcon(BossModule module, Actor actor, uint iconID) } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.FlamesOfFury) ++NumCasts; @@ -84,39 +69,27 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void AddAIHints(BossModule module, int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { base.AddAIHints(module, slot, actor, assignment, hints); if (target == actor && targeted) - hints.AddForbiddenZone(ShapeDistance.Circle(module.Bounds.Center, 18)); + hints.AddForbiddenZone(ShapeDistance.Circle(Module.Bounds.Center, 18)); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (target == actor && targeted) hints.Add("Bait voidzone away! (3 times)"); } } -class FlamesOfFuryVoidzone : Components.PersistentVoidzone -{ - public FlamesOfFuryVoidzone() : base(10, m => m.Enemies(OID.FireVoidzone).Where(z => z.EventState != 7)) { } -} +class FlamesOfFuryVoidzone(BossModule module) : Components.PersistentVoidzone(module, 10, m => m.Enemies(OID.FireVoidzone).Where(z => z.EventState != 7)); -class RaucousScritch : Components.SelfTargetedAOEs -{ - public RaucousScritch() : base(ActionID.MakeSpell(AID.RaucousScritch), new AOEShapeCone(8.42f, 30.Degrees())) { } -} +class RaucousScritch(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RaucousScritch), new AOEShapeCone(8.42f, 30.Degrees())); -class Hurl : Components.LocationTargetedAOEs -{ - public Hurl() : base(ActionID.MakeSpell(AID.Hurl), 6) { } -} +class Hurl(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Hurl), 6); -class Spin : Components.Cleave -{ - public Spin() : base(ActionID.MakeSpell(AID.Spin), new AOEShapeCone(9.42f, 60.Degrees()), (uint)OID.BonusAdd_AltarMatanga) { } -} +class Spin(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.Spin), new AOEShapeCone(9.42f, 60.Degrees()), (uint)OID.BonusAdd_AltarMatanga); class TotemStates : StateMachineBuilder { diff --git a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/Hati.cs b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/Hati.cs index 3ce2a7c512..73da088c49 100644 --- a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/Hati.cs +++ b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/Hati.cs @@ -19,30 +19,15 @@ public enum AID : uint PolarRoar = 13360, // Boss->self, 3,0s cast, range 9-40 donut } -class PolarRoar : Components.SelfTargetedAOEs -{ - public PolarRoar() : base(ActionID.MakeSpell(AID.PolarRoar), new AOEShapeDonut(9, 40)) { } -} +class PolarRoar(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PolarRoar), new AOEShapeDonut(9, 40)); -class Hellstorm : Components.LocationTargetedAOEs -{ - public Hellstorm() : base(ActionID.MakeSpell(AID.Hellstorm2), 10) { } -} +class Hellstorm(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Hellstorm2), 10); -class Netherwind : Components.SelfTargetedAOEs -{ - public Netherwind() : base(ActionID.MakeSpell(AID.Netherwind), new AOEShapeRect(18, 2)) { } -} +class Netherwind(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Netherwind), new AOEShapeRect(18, 2)); -class GlassyNova : Components.SelfTargetedAOEs -{ - public GlassyNova() : base(ActionID.MakeSpell(AID.GlassyNova), new AOEShapeRect(45.4f, 4)) { } -} +class GlassyNova(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.GlassyNova), new AOEShapeRect(45.4f, 4)); -class BrainFreeze : Components.SelfTargetedAOEs -{ - public BrainFreeze() : base(ActionID.MakeSpell(AID.BrainFreeze), new AOEShapeCircle(15.4f)) { } -} +class BrainFreeze(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.BrainFreeze), new AOEShapeCircle(15.4f)); class HatiStates : StateMachineBuilder { diff --git a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/TheGreatGoldWhisker.cs b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/TheGreatGoldWhisker.cs index f633f23d3d..8edadcd104 100644 --- a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/TheGreatGoldWhisker.cs +++ b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/TheGreatGoldWhisker.cs @@ -16,20 +16,11 @@ public enum AID : uint Telega = 9630, // BonusAdd_GoldWhisker->self, no cast, single-target } -class TripleTrident : Components.SingleTargetDelayableCast -{ - public TripleTrident() : base(ActionID.MakeSpell(AID.TripleTrident)) { } -} +class TripleTrident(BossModule module) : Components.SingleTargetDelayableCast(module, ActionID.MakeSpell(AID.TripleTrident)); -class FishOutOfWater : Components.CastHint -{ - public FishOutOfWater() : base(ActionID.MakeSpell(AID.FishOutOfWater), "Spawns adds") { } -} +class FishOutOfWater(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.FishOutOfWater), "Spawns adds"); -class Tingle : Components.SelfTargetedAOEs -{ - public Tingle() : base(ActionID.MakeSpell(AID.Tingle), new AOEShapeCircle(12.4f)) { } -} +class Tingle(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Tingle), new AOEShapeCircle(12.4f)); class TheGreatGoldWhiskerStates : StateMachineBuilder { diff --git a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/TheOlderOne.cs b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/TheOlderOne.cs index bc5d77c819..88b7c6108c 100644 --- a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/TheOlderOne.cs +++ b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/TheOlderOne.cs @@ -42,75 +42,33 @@ public enum AID : uint Telega = 9630, // bonusadds->self, no cast, single-target, bonus add disappear } -class MysticLight : Components.SelfTargetedAOEs -{ - public MysticLight() : base(ActionID.MakeSpell(AID.MysticLight), new AOEShapeCone(45.06f, 30.Degrees())) { } -} +class MysticLight(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.MysticLight), new AOEShapeCone(45.06f, 30.Degrees())); -class MysticFlame : Components.LocationTargetedAOEs -{ - public MysticFlame() : base(ActionID.MakeSpell(AID.MysticFlame2), 7) { } -} +class MysticFlame(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.MysticFlame2), 7); -class MysticHeat : Components.SelfTargetedAOEs -{ - public MysticHeat() : base(ActionID.MakeSpell(AID.MysticHeat), new AOEShapeRect(41.72f, 1.5f)) { } -} +class MysticHeat(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.MysticHeat), new AOEShapeRect(41.72f, 1.5f)); -class SelfDetonate : Components.SelfTargetedAOEs -{ - public SelfDetonate() : base(ActionID.MakeSpell(AID.SelfDetonate), new AOEShapeCircle(10.72f)) { } -} +class SelfDetonate(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.SelfDetonate), new AOEShapeCircle(10.72f)); -class MysticLevin : Components.RaidwideCast -{ - public MysticLevin() : base(ActionID.MakeSpell(AID.MysticLevin)) { } -} +class MysticLevin(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.MysticLevin)); -class MysticFlash : Components.SingleTargetDelayableCast -{ - public MysticFlash() : base(ActionID.MakeSpell(AID.MysticFlash)) { } -} +class MysticFlash(BossModule module) : Components.SingleTargetDelayableCast(module, ActionID.MakeSpell(AID.MysticFlash)); -class PluckAndPrune : Components.SelfTargetedAOEs -{ - public PluckAndPrune() : base(ActionID.MakeSpell(AID.PluckAndPrune), new AOEShapeCircle(6.84f)) { } -} +class PluckAndPrune(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PluckAndPrune), new AOEShapeCircle(6.84f)); -class TearyTwirl : Components.SelfTargetedAOEs -{ - public TearyTwirl() : base(ActionID.MakeSpell(AID.TearyTwirl), new AOEShapeCircle(6.84f)) { } -} +class TearyTwirl(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TearyTwirl), new AOEShapeCircle(6.84f)); -class HeirloomScream : Components.SelfTargetedAOEs -{ - public HeirloomScream() : base(ActionID.MakeSpell(AID.HeirloomScream), new AOEShapeCircle(6.84f)) { } -} +class HeirloomScream(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HeirloomScream), new AOEShapeCircle(6.84f)); -class PungentPirouette : Components.SelfTargetedAOEs -{ - public PungentPirouette() : base(ActionID.MakeSpell(AID.PungentPirouette), new AOEShapeCircle(6.84f)) { } -} +class PungentPirouette(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PungentPirouette), new AOEShapeCircle(6.84f)); -class Pollen : Components.SelfTargetedAOEs -{ - public Pollen() : base(ActionID.MakeSpell(AID.Pollen), new AOEShapeCircle(6.84f)) { } -} +class Pollen(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Pollen), new AOEShapeCircle(6.84f)); -class RaucousScritch : Components.SelfTargetedAOEs -{ - public RaucousScritch() : base(ActionID.MakeSpell(AID.RaucousScritch), new AOEShapeCone(8.42f, 30.Degrees())) { } -} +class RaucousScritch(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RaucousScritch), new AOEShapeCone(8.42f, 30.Degrees())); -class Hurl : Components.LocationTargetedAOEs -{ - public Hurl() : base(ActionID.MakeSpell(AID.Hurl), 6) { } -} +class Hurl(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Hurl), 6); -class Spin : Components.Cleave -{ - public Spin() : base(ActionID.MakeSpell(AID.Spin), new AOEShapeCone(9.42f, 60.Degrees()), (uint)OID.BonusAdd_AltarMatanga) { } -} +class Spin(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.Spin), new AOEShapeCone(9.42f, 60.Degrees()), (uint)OID.BonusAdd_AltarMatanga); class TheOlderOneStates : StateMachineBuilder { diff --git a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/TheWinged.cs b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/TheWinged.cs index 4acd780e11..293ff17ca4 100644 --- a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/TheWinged.cs +++ b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/TheWinged.cs @@ -37,15 +37,9 @@ public enum AID : uint Telega = 9630, // BonusAdds->self, no cast, single-target, bonus adds disappear } -class Filoplumes : Components.SelfTargetedAOEs -{ - public Filoplumes() : base(ActionID.MakeSpell(AID.Filoplumes), new AOEShapeRect(11.36f, 2)) { } -} +class Filoplumes(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Filoplumes), new AOEShapeRect(11.36f, 2)); -class Wingbeat : Components.SelfTargetedAOEs -{ - public Wingbeat() : base(ActionID.MakeSpell(AID.Wingbeat), new AOEShapeCone(43.36f, 30.Degrees())) { } -} +class Wingbeat(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Wingbeat), new AOEShapeCone(43.36f, 30.Degrees())); class WingbeatKB : Components.KnockbackFromCastTarget { public WingbeatKB() : base(ActionID.MakeSpell(AID.Wingbeat), 20, false, 1, new AOEShapeCone(43.36f, 30.Degrees())) @@ -54,60 +48,27 @@ class WingbeatKB : Components.KnockbackFromCastTarget } } -class FeatherSquall : Components.LocationTargetedAOEs -{ - public FeatherSquall() : base(ActionID.MakeSpell(AID.FeatherSquall2), 6) { } -} +class FeatherSquall(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.FeatherSquall2), 6); -class Pinion : Components.SelfTargetedAOEs -{ - public Pinion() : base(ActionID.MakeSpell(AID.Pinion), new AOEShapeRect(40.5f, 1.5f)) { } -} +class Pinion(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Pinion), new AOEShapeRect(40.5f, 1.5f)); -class Sideslip : Components.RaidwideCast -{ - public Sideslip() : base(ActionID.MakeSpell(AID.Sideslip)) { } -} +class Sideslip(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.Sideslip)); -class PluckAndPrune : Components.SelfTargetedAOEs -{ - public PluckAndPrune() : base(ActionID.MakeSpell(AID.PluckAndPrune), new AOEShapeCircle(6.84f)) { } -} +class PluckAndPrune(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PluckAndPrune), new AOEShapeCircle(6.84f)); -class TearyTwirl : Components.SelfTargetedAOEs -{ - public TearyTwirl() : base(ActionID.MakeSpell(AID.TearyTwirl), new AOEShapeCircle(6.84f)) { } -} +class TearyTwirl(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TearyTwirl), new AOEShapeCircle(6.84f)); -class HeirloomScream : Components.SelfTargetedAOEs -{ - public HeirloomScream() : base(ActionID.MakeSpell(AID.HeirloomScream), new AOEShapeCircle(6.84f)) { } -} +class HeirloomScream(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HeirloomScream), new AOEShapeCircle(6.84f)); -class PungentPirouette : Components.SelfTargetedAOEs -{ - public PungentPirouette() : base(ActionID.MakeSpell(AID.PungentPirouette), new AOEShapeCircle(6.84f)) { } -} +class PungentPirouette(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PungentPirouette), new AOEShapeCircle(6.84f)); -class Pollen : Components.SelfTargetedAOEs -{ - public Pollen() : base(ActionID.MakeSpell(AID.Pollen), new AOEShapeCircle(6.84f)) { } -} +class Pollen(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Pollen), new AOEShapeCircle(6.84f)); -class RaucousScritch : Components.SelfTargetedAOEs -{ - public RaucousScritch() : base(ActionID.MakeSpell(AID.RaucousScritch), new AOEShapeCone(8.42f, 30.Degrees())) { } -} +class RaucousScritch(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RaucousScritch), new AOEShapeCone(8.42f, 30.Degrees())); -class Hurl : Components.LocationTargetedAOEs -{ - public Hurl() : base(ActionID.MakeSpell(AID.Hurl), 6) { } -} +class Hurl(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Hurl), 6); -class Spin : Components.Cleave -{ - public Spin() : base(ActionID.MakeSpell(AID.Spin), new AOEShapeCone(9.42f, 60.Degrees()), (uint)OID.BonusAdd_AltarMatanga) { } -} +class Spin(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.Spin), new AOEShapeCone(9.42f, 60.Degrees()), (uint)OID.BonusAdd_AltarMatanga); class TheWingedStates : StateMachineBuilder { diff --git a/BossMod/Modules/Stormblood/Ultimate/UCOB/Hatch.cs b/BossMod/Modules/Stormblood/Ultimate/UCOB/Hatch.cs index 8038fef01e..a3cf1f88d1 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UCOB/Hatch.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UCOB/Hatch.cs @@ -23,7 +23,7 @@ public override void Init(BossModule module) _neurolinks = module.Enemies(OID.Neurolink); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (!Active) return; @@ -35,45 +35,45 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint hints.Add("GTFO from neurolink!"); } - public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) + public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) { return Active && _targets[playerSlot] ? PlayerPriority.Danger : PlayerPriority.Irrelevant; } - public override void DrawArenaBackground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaBackground(int pcSlot, Actor pc) { if (Active) foreach (var o in _orbs.Where(o => !o.IsDead)) arena.ZoneCircle(o.Position, 1, ArenaColor.AOE); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (Active) foreach (var neurolink in _neurolinks) arena.AddCircle(neurolink.Position, 2, _targets[pcSlot] ? ArenaColor.Safe : ArenaColor.Danger); } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.Generate) { - _targets.Set(module.Raid.FindSlot(actor.InstanceID)); + _targets.Set(Raid.FindSlot(actor.InstanceID)); ++NumTargetsAssigned; } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if (spell.Action == WatchedAction) { ++NumCasts; foreach (var t in spell.Targets) - _targets.Clear(module.Raid.FindSlot(t.ID)); + _targets.Clear(Raid.FindSlot(t.ID)); } } - public override void OnActorPlayActionTimelineEvent(BossModule module, Actor actor, ushort id) + public override void OnActorPlayActionTimelineEvent(Actor actor, ushort id) { if ((OID)actor.OID == OID.Twintania && id == 0x94) ++NumNeurolinkSpawns; diff --git a/BossMod/Modules/Stormblood/Ultimate/UCOB/P1DeathSentence.cs b/BossMod/Modules/Stormblood/Ultimate/UCOB/P1DeathSentence.cs index 4246d761fd..e1936e9e2f 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UCOB/P1DeathSentence.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UCOB/P1DeathSentence.cs @@ -6,7 +6,7 @@ class P1DeathSentence : BossComponent private Actor? _caster; private ulong _targetId; - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_caster == null || _caster.TargetID != _targetId) return; @@ -17,7 +17,7 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint hints.Add("Taunt!"); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.DeathSentence) { diff --git a/BossMod/Modules/Stormblood/Ultimate/UCOB/P2BahamutsFavor.cs b/BossMod/Modules/Stormblood/Ultimate/UCOB/P2BahamutsFavor.cs index b00aaf9d31..2cb996c0fc 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UCOB/P2BahamutsFavor.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UCOB/P2BahamutsFavor.cs @@ -14,36 +14,36 @@ public void Show() AddStack(Target, _activation, _forbidden); } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Firescorched) { - _forbidden.Set(module.Raid.FindSlot(actor.InstanceID)); + _forbidden.Set(Raid.FindSlot(actor.InstanceID)); foreach (ref var s in Stacks.AsSpan()) s.ForbiddenPlayers = _forbidden; } } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Firescorched) { - _forbidden.Clear(module.Raid.FindSlot(actor.InstanceID)); + _forbidden.Clear(Raid.FindSlot(actor.InstanceID)); foreach (ref var s in Stacks.AsSpan()) s.ForbiddenPlayers = _forbidden; } } - public override void OnTethered(BossModule module, Actor source, ActorTetherInfo tether) + public override void OnTethered(Actor source, ActorTetherInfo tether) { if ((TetherID)tether.ID == TetherID.Fireball) { - Target = module.WorldState.Actors.Find(tether.Target); - _activation = module.WorldState.CurrentTime.AddSeconds(5.1); + Target = WorldState.Actors.Find(tether.Target); + _activation = WorldState.FutureTime(5.1); } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.FireballP2) { @@ -62,9 +62,9 @@ class P2BahamutsFavorChainLightning : Components.UniformStackSpread public P2BahamutsFavorChainLightning() : base(0, 5, alwaysShowSpreads: true) { } - public bool ActiveOrSkipped(BossModule module) => Active || _pendingTargets.Any() && module.WorldState.CurrentTime >= _expectedStatuses && module.Raid.WithSlot(true).IncludedInMask(_pendingTargets).All(ip => ip.Item2.IsDead); + public bool ActiveOrSkipped(BossModule module) => Active || _pendingTargets.Any() && WorldState.CurrentTime >= _expectedStatuses && Raid.WithSlot(true).IncludedInMask(_pendingTargets).All(ip => ip.Item2.IsDead); - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Thunderstruck) { @@ -73,14 +73,14 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { case AID.ChainLightning: - _expectedStatuses = module.WorldState.CurrentTime.AddSeconds(1); + _expectedStatuses = WorldState.FutureTime(1); foreach (var t in spell.Targets) - _pendingTargets.Set(module.Raid.FindSlot(t.ID)); + _pendingTargets.Set(Raid.FindSlot(t.ID)); break; case AID.ChainLightningAOE: Spreads.Clear(); @@ -95,21 +95,21 @@ class P2BahamutsFavorDeathstorm : BossComponent private List<(Actor player, DateTime expiration, bool cleansed)> _dooms = new(); private List<(WPos predicted, Actor? voidzone)> _cleanses = new(); - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { var doomOrder = _dooms.FindIndex(d => d.player == actor); if (doomOrder >= 0 && !_dooms[doomOrder].cleansed) - hints.Add($"Doom {doomOrder + 1}", (_dooms[doomOrder].expiration - module.WorldState.CurrentTime).TotalSeconds < 3); + hints.Add($"Doom {doomOrder + 1}", (_dooms[doomOrder].expiration - WorldState.CurrentTime).TotalSeconds < 3); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { var doomOrder = _dooms.FindIndex(d => d.player == pc); if (doomOrder >= 0 && !_dooms[doomOrder].cleansed && doomOrder < _cleanses.Count) arena.AddCircle(_cleanses[doomOrder].voidzone?.Position ?? _cleanses[doomOrder].predicted, 1, ArenaColor.Safe); } - public override void OnActorCreated(BossModule module, Actor actor) + public override void OnActorCreated(Actor actor) { if ((OID)actor.OID == OID.VoidzoneSalvation) { @@ -117,11 +117,11 @@ public override void OnActorCreated(BossModule module, Actor actor) if (index >= 0) _cleanses.Ref(index).voidzone = actor; else - module.ReportError(this, $"Failed to find voidzone predicted pos for {actor}"); + ReportError($"Failed to find voidzone predicted pos for {actor}"); } } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Doom) { @@ -130,7 +130,7 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st } } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Doom) { @@ -138,17 +138,17 @@ public override void OnStatusLose(BossModule module, Actor actor, ActorStatus st if (index >= 0) _dooms.Ref(index).cleansed = true; else - module.ReportError(this, $"Failed to find doom on {actor}"); + ReportError($"Failed to find doom on {actor}"); } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.WingsOfSalvation) _cleanses.Add((spell.LocXZ, null)); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.Deathstorm) { @@ -159,7 +159,4 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } -class P2BahamutsFavorWingsOfSalvation : Components.LocationTargetedAOEs -{ - public P2BahamutsFavorWingsOfSalvation() : base(ActionID.MakeSpell(AID.WingsOfSalvation), 4) { } -} +class P2BahamutsFavorWingsOfSalvation(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.WingsOfSalvation), 4); diff --git a/BossMod/Modules/Stormblood/Ultimate/UCOB/P2Cauterize.cs b/BossMod/Modules/Stormblood/Ultimate/UCOB/P2Cauterize.cs index 3c72afbb1c..5e43213ba8 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UCOB/P2Cauterize.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UCOB/P2Cauterize.cs @@ -9,19 +9,19 @@ class P2Cauterize : Components.GenericAOEs private static readonly AOEShapeRect _shape = new(52, 10); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { return Casters.Select(c => new AOEInstance(_shape, c.Position, c.CastInfo!.Rotation, c.CastInfo.NPCFinishAt)); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (BaitOrder[slot] >= NextBaitOrder) hints.Add($"Bait {BaitOrder[slot]}", false); base.AddHints(module, slot, actor, hints, movementHints); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (BaitOrder[pcSlot] >= NextBaitOrder) { @@ -34,11 +34,11 @@ public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc } } - public override void OnActorCreated(BossModule module, Actor actor) + public override void OnActorCreated(Actor actor) { if ((OID)actor.OID is OID.Firehorn or OID.Iceclaw or OID.Thunderwing or OID.TailOfDarkness or OID.FangOfLight) { - var dir = 180.Degrees() - Angle.FromDirection(actor.Position - module.Bounds.Center); + var dir = 180.Degrees() - Angle.FromDirection(actor.Position - Module.Bounds.Center); var pos = (int)MathF.Round(dir.Deg / 45) & 7; _dragons.Add((actor, pos)); if (_dragons.Count == 5) @@ -49,7 +49,7 @@ public override void OnActorCreated(BossModule module, Actor actor) } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.Cauterize1 or AID.Cauterize2 or AID.Cauterize3 or AID.Cauterize4 or AID.Cauterize5) { @@ -57,7 +57,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.Cauterize1 or AID.Cauterize2 or AID.Cauterize3 or AID.Cauterize4 or AID.Cauterize5) { @@ -66,9 +66,9 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn } } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { - if ((IconID)iconID is IconID.Cauterize && module.Raid.FindSlot(actor.InstanceID) is var slot && slot >= 0) + if ((IconID)iconID is IconID.Cauterize && Raid.FindSlot(actor.InstanceID) is var slot && slot >= 0) { BaitOrder[slot] = ++NumBaitsAssigned; } @@ -103,7 +103,4 @@ private IEnumerable DragonsForOrder(int order) } } -class P2Hypernova : Components.PersistentVoidzoneAtCastTarget -{ - public P2Hypernova() : base(5, ActionID.MakeSpell(AID.Hypernova), m => m.Enemies(OID.VoidzoneHypernova).Where(z => z.EventState != 7), 1.4f) { } -} +class P2Hypernova(BossModule module) : Components.PersistentVoidzoneAtCastTarget(module, 5, ActionID.MakeSpell(AID.Hypernova), m => m.Enemies(OID.VoidzoneHypernova).Where(z => z.EventState != 7), 1.4f); diff --git a/BossMod/Modules/Stormblood/Ultimate/UCOB/P2Heavensfall.cs b/BossMod/Modules/Stormblood/Ultimate/UCOB/P2Heavensfall.cs index 07d033d290..fea561d5bd 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UCOB/P2Heavensfall.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UCOB/P2Heavensfall.cs @@ -4,9 +4,9 @@ class P2Heavensfall : Components.Knockback { public P2Heavensfall() : base(ActionID.MakeSpell(AID.Heavensfall), true) { } - public override IEnumerable Sources(BossModule module, int slot, Actor actor) + public override IEnumerable Sources(int slot, Actor actor) { - yield return new(module.Bounds.Center, 11); // TODO: activation + yield return new(Module.Bounds.Center, 11); // TODO: activation } } @@ -16,7 +16,7 @@ class P2HeavensfallPillar : Components.GenericAOEs private static readonly AOEShapeRect _shape = new(5, 5, 5); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => Utils.ZeroOrOne(_aoe); + public override IEnumerable ActiveAOEs(int slot, Actor actor) => Utils.ZeroOrOne(_aoe); public override void OnActorEAnim(BossModule module, Actor actor, uint state) { @@ -39,10 +39,7 @@ public override void OnActorEAnim(BossModule module, Actor actor, uint state) } } -class P2ThermionicBurst : Components.SelfTargetedAOEs -{ - public P2ThermionicBurst() : base(ActionID.MakeSpell(AID.ThermionicBurst), new AOEShapeCone(24.5f, 11.25f.Degrees())) { } -} +class P2ThermionicBurst(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ThermionicBurst), new AOEShapeCone(24.5f, 11.25f.Degrees())); class P2MeteorStream : Components.UniformStackSpread { @@ -52,10 +49,10 @@ public P2MeteorStream() : base(0, 4, alwaysShowSpreads: true) { } public override void Init(BossModule module) { - AddSpreads(module.Raid.WithoutSlot(true), module.WorldState.CurrentTime.AddSeconds(5.6f)); + AddSpreads(Raid.WithoutSlot(true), WorldState.FutureTime(5.6f)); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.MeteorStream) { @@ -83,6 +80,6 @@ public void Show() public override void Init(BossModule module) { - _target = module.WorldState.Actors.Find(module.PrimaryActor.TargetID); + _target = WorldState.Actors.Find(Module.PrimaryActor.TargetID); } } diff --git a/BossMod/Modules/Stormblood/Ultimate/UCOB/P2Ravensbeak.cs b/BossMod/Modules/Stormblood/Ultimate/UCOB/P2Ravensbeak.cs index b7cc23c568..65cb7d33f5 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UCOB/P2Ravensbeak.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UCOB/P2Ravensbeak.cs @@ -6,7 +6,7 @@ class P2Ravensbeak : BossComponent private Actor? _caster; private ulong _targetId; - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_caster == null || _caster.TargetID != _targetId) return; @@ -17,7 +17,7 @@ public override void AddHints(BossModule module, int slot, Actor actor, TextHint hints.Add("Taunt!"); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.Ravensbeak) { diff --git a/BossMod/Modules/Stormblood/Ultimate/UCOB/P3BlackfireTrio.cs b/BossMod/Modules/Stormblood/Ultimate/UCOB/P3BlackfireTrio.cs index 1329236611..239286a0e2 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UCOB/P3BlackfireTrio.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UCOB/P3BlackfireTrio.cs @@ -6,12 +6,12 @@ class P3BlackfireTrio : BossComponent public bool Active => _nael != null; - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { arena.Actor(_nael, ArenaColor.Object, true); } - public override void OnActorPlayActionTimelineEvent(BossModule module, Actor actor, ushort id) + public override void OnActorPlayActionTimelineEvent(Actor actor, ushort id) { if ((OID)actor.OID == OID.NaelDeusDarnus && id == 0x1E43) { @@ -26,12 +26,12 @@ public P3ThermionicBeam() : base(4, 0, 8) { } public override void Init(BossModule module) { - var target = module.Raid.Player(); // note: target is random + var target = Raid.Player(); // note: target is random if (target != null) - AddStack(target, module.WorldState.CurrentTime.AddSeconds(5.3f)); // assume it is activated right when downtime starts + AddStack(target, WorldState.FutureTime(5.3f)); // assume it is activated right when downtime starts } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.ThermionicBeam) Stacks.Clear(); @@ -42,11 +42,11 @@ class P3MegaflareTower : Components.CastTowers { public P3MegaflareTower() : base(ActionID.MakeSpell(AID.MegaflareTower), 3) { } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.MegaflareStack) { - var slot = module.Raid.FindSlot(actor.InstanceID); + var slot = Raid.FindSlot(actor.InstanceID); foreach (ref var t in Towers.AsSpan()) t.ForbiddenSoakers.Set(slot); // TODO: consider making per-tower assignments @@ -58,17 +58,17 @@ class P3MegaflareStack : Components.UniformStackSpread { public P3MegaflareStack() : base(5, 0, 4, 4) { } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.MegaflareStack) { if (Stacks.Count == 0) - AddStack(actor, module.WorldState.CurrentTime.AddSeconds(5), new(0xff)); - Stacks.Ref(0).ForbiddenPlayers.Clear(module.Raid.FindSlot(actor.InstanceID)); + AddStack(actor, WorldState.FutureTime(5), new(0xff)); + Stacks.Ref(0).ForbiddenPlayers.Clear(Raid.FindSlot(actor.InstanceID)); } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.MegaflareStack) Stacks.Clear(); diff --git a/BossMod/Modules/Stormblood/Ultimate/UCOB/P3EarthShaker.cs b/BossMod/Modules/Stormblood/Ultimate/UCOB/P3EarthShaker.cs index a85a0ae88f..ac78878777 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UCOB/P3EarthShaker.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UCOB/P3EarthShaker.cs @@ -8,7 +8,7 @@ class P3EarthShaker : Components.GenericBaitAway public P3EarthShaker() : base(ActionID.MakeSpell(AID.EarthShakerAOE)) { } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.Earthshaker && module.Enemies(OID.BahamutPrime).FirstOrDefault() is var source && source != null) { @@ -17,7 +17,7 @@ public override void OnEventIcon(BossModule module, Actor actor, uint iconID) } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { base.OnEventCast(module, caster, spell); if ((AID)spell.Action.ID == AID.EarthShaker) @@ -43,7 +43,7 @@ public override void Init(BossModule module) _voidzones = module.Enemies(OID.VoidzoneEarthShaker); } - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { foreach (var z in _voidzones.Where(z => z.EventState != 7)) yield return new(_shape, z.Position); @@ -51,22 +51,22 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, yield return p; } - public override void OnActorCreated(BossModule module, Actor actor) + public override void OnActorCreated(Actor actor) { if ((OID)actor.OID == OID.VoidzoneEarthShaker) _predicted.Clear(); } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.Earthshaker) - _targets.Set(module.Raid.FindSlot(actor.InstanceID)); + _targets.Set(Raid.FindSlot(actor.InstanceID)); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.EarthShaker) - foreach (var (_, p) in module.Raid.WithSlot().IncludedInMask(_targets)) - _predicted.Add(new(_shape, p.Position, default, module.WorldState.CurrentTime.AddSeconds(1.4f))); + foreach (var (_, p) in Raid.WithSlot().IncludedInMask(_targets)) + _predicted.Add(new(_shape, p.Position, default, WorldState.FutureTime(1.4f))); } } diff --git a/BossMod/Modules/Stormblood/Ultimate/UCOB/P3FellruinTrio.cs b/BossMod/Modules/Stormblood/Ultimate/UCOB/P3FellruinTrio.cs index 93e25f12ee..8e0850111e 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UCOB/P3FellruinTrio.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UCOB/P3FellruinTrio.cs @@ -12,13 +12,13 @@ public override void Init(BossModule module) _neurolinks = module.Enemies(OID.Neurolink); } - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (Active) hints.Add("Go to neurolink!", !_neurolinks.InRadius(actor.Position, 2).Any()); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (var neurolink in _neurolinks) arena.AddCircle(neurolink.Position, 2, ArenaColor.Safe); diff --git a/BossMod/Modules/Stormblood/Ultimate/UCOB/P3GrandOctet.cs b/BossMod/Modules/Stormblood/Ultimate/UCOB/P3GrandOctet.cs index 8f325a171c..1b9ddbc3bf 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UCOB/P3GrandOctet.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UCOB/P3GrandOctet.cs @@ -16,22 +16,22 @@ class P3GrandOctet : Components.GenericAOEs private static readonly AOEShapeRect _shapeBahamut = new(60, 6); private static readonly AOEShapeRect _shapeDrake = new(52, 10); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) => AOEs; + public override IEnumerable ActiveAOEs(int slot, Actor actor) => AOEs; - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (_baitOrder[slot] >= NextBaitOrder) hints.Add($"Bait {_baitOrder[slot]}", false); base.AddHints(module, slot, actor, hints, movementHints); } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (_diveOrder != 0) hints.Add($"Move {(_diveOrder < 0 ? "CW" : "CCW")}"); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { // draw safespot if (NumCasts == 0 && AOEs.Count <= 1 && _initialSafespot != default) @@ -47,13 +47,13 @@ public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc } } - public override void OnActorCreated(BossModule module, Actor actor) + public override void OnActorCreated(Actor actor) { if ((OID)actor.OID is OID.Firehorn or OID.Iceclaw or OID.Thunderwing or OID.TailOfDarkness or OID.FangOfLight) Casters.Add(actor); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { var shape = CastShape(spell.Action); if (shape != null) @@ -62,7 +62,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { var shape = CastShape(spell.Action); if (shape != null) @@ -72,9 +72,9 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn } } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { - var slot = module.Raid.FindSlot(actor.InstanceID); + var slot = Raid.FindSlot(actor.InstanceID); if (slot < 0) return; @@ -96,7 +96,7 @@ public override void OnEventIcon(BossModule module, Actor actor, uint iconID) } } - public override void OnActorPlayActionTimelineEvent(BossModule module, Actor actor, ushort id) + public override void OnActorPlayActionTimelineEvent(Actor actor, ushort id) { if ((OID)actor.OID == OID.NaelDeusDarnus && id == 0x1E43) { @@ -121,15 +121,15 @@ private void InitIfReady(BossModule module) return; // at this point NextCasters should contain 5 drakes, order is not yet known - var dirToNael = Angle.FromDirection(_nael.Position - module.Bounds.Center); - var dirToTwin = Angle.FromDirection(_twin.Position - module.Bounds.Center); - var dirToBaha = Angle.FromDirection(_baha.Position - module.Bounds.Center); + var dirToNael = Angle.FromDirection(_nael.Position - Module.Bounds.Center); + var dirToTwin = Angle.FromDirection(_twin.Position - Module.Bounds.Center); + var dirToBaha = Angle.FromDirection(_baha.Position - Module.Bounds.Center); // bahamut on cardinal => CCW dive order // bahamut on intercardinal => CW dive order bool bahamutIntercardinal = ((int)MathF.Round(dirToBaha.Deg / 45) & 1) != 0; _diveOrder = bahamutIntercardinal ? -1 : +1; - var orders = Casters.Select(c => _diveOrder * CCWDirection(Angle.FromDirection(c.Position - module.Bounds.Center), dirToBaha)).ToList(); + var orders = Casters.Select(c => _diveOrder * CCWDirection(Angle.FromDirection(c.Position - Module.Bounds.Center), dirToBaha)).ToList(); MemoryExtensions.Sort(orders.AsSpan(), Casters.AsSpan()); Casters.Insert(0, _nael); Casters.Add(_baha); @@ -139,7 +139,7 @@ private void InitIfReady(BossModule module) var dirToSafespot = dirToBaha + 180.Degrees(); if (dirToSafespot.AlmostEqual(dirToNael, 0.1f)) dirToSafespot += _diveOrder * 45.Degrees(); - _initialSafespot = module.Bounds.Center + 20 * dirToSafespot.ToDirection(); + _initialSafespot = Module.Bounds.Center + 20 * dirToSafespot.ToDirection(); } private float CCWDirection(Angle direction, Angle reference) diff --git a/BossMod/Modules/Stormblood/Ultimate/UCOB/P3HeavensfallTrio.cs b/BossMod/Modules/Stormblood/Ultimate/UCOB/P3HeavensfallTrio.cs index 3bc61d47db..c8bfe06c9a 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UCOB/P3HeavensfallTrio.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UCOB/P3HeavensfallTrio.cs @@ -12,7 +12,7 @@ class P3HeavensfallTrio : BossComponent private static readonly Angle[] _offsetsNaelCenter = [10.Degrees(), 80.Degrees(), 100.Degrees(), 170.Degrees()]; private static readonly Angle[] _offsetsNaelSide = [60.Degrees(), 80.Degrees(), 100.Degrees(), 120.Degrees()]; - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { arena.Actor(_nael, ArenaColor.Object, true); var safespot = _safeSpots[pcSlot]; @@ -20,7 +20,7 @@ public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc arena.AddCircle(safespot, 1, ArenaColor.Safe); } - public override void OnActorPlayActionTimelineEvent(BossModule module, Actor actor, ushort id) + public override void OnActorPlayActionTimelineEvent(Actor actor, ushort id) { if ((OID)actor.OID == OID.NaelDeusDarnus && id == 0x1E43) { @@ -44,9 +44,9 @@ private void InitIfReady(BossModule module) if (_nael == null || _twin == null || _baha == null) return; - var dirToNael = Angle.FromDirection(_nael.Position - module.Bounds.Center); - var dirToTwin = Angle.FromDirection(_twin.Position - module.Bounds.Center); - var dirToBaha = Angle.FromDirection(_baha.Position - module.Bounds.Center); + var dirToNael = Angle.FromDirection(_nael.Position - Module.Bounds.Center); + var dirToTwin = Angle.FromDirection(_twin.Position - Module.Bounds.Center); + var dirToBaha = Angle.FromDirection(_baha.Position - Module.Bounds.Center); var twinRel = (dirToTwin - dirToNael).Normalized(); var bahaRel = (dirToBaha - dirToNael).Normalized(); @@ -54,13 +54,13 @@ private void InitIfReady(BossModule module) ? (0.Degrees(), _offsetsNaelCenter) : ((twinRel + bahaRel) * 0.5f, _offsetsNaelSide); var dirSymmetry = dirToNael + offsetSymmetry; - foreach (var p in Service.Config.Get().P3QuickmarchTrioAssignments.Resolve(module.Raid)) + foreach (var p in Service.Config.Get().P3QuickmarchTrioAssignments.Resolve(Raid)) { bool left = p.group < 4; int order = p.group & 3; var offset = offsets[order]; var dir = dirSymmetry + (left ? offset : -offset); - _safeSpots[p.slot] = module.Bounds.Center + 20 * dir.ToDirection(); + _safeSpots[p.slot] = Module.Bounds.Center + 20 * dir.ToDirection(); } } } @@ -69,7 +69,7 @@ class P3HeavensfallTowers : Components.CastTowers { public P3HeavensfallTowers() : base(ActionID.MakeSpell(AID.MegaflareTower), 3) { } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { base.OnCastStarted(module, caster, spell); @@ -78,10 +78,10 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf var nael = module.Enemies(OID.NaelDeusDarnus).FirstOrDefault(); if (nael != null) { - var dirToNael = Angle.FromDirection(nael.Position - module.Bounds.Center); - var orders = Towers.Select(t => TowerSortKey(Angle.FromDirection(t.Position - module.Bounds.Center), dirToNael)).ToList(); + var dirToNael = Angle.FromDirection(nael.Position - Module.Bounds.Center); + var orders = Towers.Select(t => TowerSortKey(Angle.FromDirection(t.Position - Module.Bounds.Center), dirToNael)).ToList(); MemoryExtensions.Sort(orders.AsSpan(), Towers.AsSpan()); - foreach (var p in Service.Config.Get().P3HeavensfallTrioTowers.Resolve(module.Raid)) + foreach (var p in Service.Config.Get().P3HeavensfallTrioTowers.Resolve(Raid)) { Towers.Ref(p.group).ForbiddenSoakers = new(~(1ul << p.slot)); } @@ -99,7 +99,4 @@ private float TowerSortKey(Angle tower, Angle reference) } } -class P3HeavensfallFireball : Components.StackWithIcon -{ - public P3HeavensfallFireball() : base((uint)IconID.Fireball, ActionID.MakeSpell(AID.Fireball), 4, 5.3f, 8) { } -} +class P3HeavensfallFireball(BossModule module) : Components.StackWithIcon(module, (uint)IconID.Fireball, ActionID.MakeSpell(AID.Fireball), 4, 5.3f, 8); diff --git a/BossMod/Modules/Stormblood/Ultimate/UCOB/P3QuickmarchTrio.cs b/BossMod/Modules/Stormblood/Ultimate/UCOB/P3QuickmarchTrio.cs index 9b085cfef3..6f35267be4 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UCOB/P3QuickmarchTrio.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UCOB/P3QuickmarchTrio.cs @@ -7,7 +7,7 @@ class P3QuickmarchTrio : BossComponent public bool Active => _relNorth != null; - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { arena.Actor(_relNorth, ArenaColor.Object, true); var safespot = _safeSpots[pcSlot]; @@ -15,43 +15,31 @@ public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc arena.AddCircle(safespot, 1, ArenaColor.Safe); } - public override void OnActorPlayActionTimelineEvent(BossModule module, Actor actor, ushort id) + public override void OnActorPlayActionTimelineEvent(Actor actor, ushort id) { if ((OID)actor.OID == OID.BahamutPrime && id == 0x1E43) { _relNorth = actor; - var dirToNorth = Angle.FromDirection(actor.Position - module.Bounds.Center); - foreach (var p in Service.Config.Get().P3QuickmarchTrioAssignments.Resolve(module.Raid)) + var dirToNorth = Angle.FromDirection(actor.Position - Module.Bounds.Center); + foreach (var p in Service.Config.Get().P3QuickmarchTrioAssignments.Resolve(Raid)) { bool left = p.group < 4; int order = p.group & 3; var offset = (60 + order * 20).Degrees(); var dir = dirToNorth + (left ? offset : -offset); - _safeSpots[p.slot] = module.Bounds.Center + 20 * dir.ToDirection(); + _safeSpots[p.slot] = Module.Bounds.Center + 20 * dir.ToDirection(); } } } } -class P3TwistingDive : Components.SelfTargetedAOEs -{ - public P3TwistingDive() : base(ActionID.MakeSpell(AID.TwistingDive), new AOEShapeRect(60, 4)) { } -} +class P3TwistingDive(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TwistingDive), new AOEShapeRect(60, 4)); -class P3LunarDive : Components.SelfTargetedAOEs -{ - public P3LunarDive() : base(ActionID.MakeSpell(AID.LunarDive), new AOEShapeRect(60, 4)) { } -} +class P3LunarDive(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.LunarDive), new AOEShapeRect(60, 4)); -class P3MegaflareDive : Components.SelfTargetedAOEs -{ - public P3MegaflareDive() : base(ActionID.MakeSpell(AID.MegaflareDive), new AOEShapeRect(60, 6)) { } -} +class P3MegaflareDive(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.MegaflareDive), new AOEShapeRect(60, 6)); -class P3Twister : Components.ImmediateTwister -{ - public P3Twister() : base(2, (uint)OID.VoidzoneTwister, 1.4f) { } // TODO: verify radius -} +class P3Twister(BossModule module) : Components.ImmediateTwister(module, 2, (uint)OID.VoidzoneTwister, 1.4f); // TODO: verify radius class P3MegaflareSpreadStack : Components.UniformStackSpread { @@ -61,24 +49,24 @@ public P3MegaflareSpreadStack() : base(5, 5, 3, 3, alwaysShowSpreads: true) { } public override void Init(BossModule module) { - AddSpreads(module.Raid.WithoutSlot(true), module.WorldState.CurrentTime.AddSeconds(2.6f)); + AddSpreads(Raid.WithoutSlot(true), WorldState.FutureTime(2.6f)); } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.MegaflareStack) - _stackTargets.Set(module.Raid.FindSlot(actor.InstanceID)); + _stackTargets.Set(Raid.FindSlot(actor.InstanceID)); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { case AID.MegaflareSpread: Spreads.Clear(); - var stackTarget = module.Raid.WithSlot().IncludedInMask(_stackTargets).FirstOrDefault().Item2; // random target + var stackTarget = Raid.WithSlot().IncludedInMask(_stackTargets).FirstOrDefault().Item2; // random target if (stackTarget != null) - AddStack(stackTarget, module.WorldState.CurrentTime.AddSeconds(4), ~_stackTargets); + AddStack(stackTarget, WorldState.FutureTime(4), ~_stackTargets); break; case AID.MegaflareStack: Stacks.Clear(); @@ -87,12 +75,6 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } -class P3MegaflarePuddle : Components.LocationTargetedAOEs -{ - public P3MegaflarePuddle() : base(ActionID.MakeSpell(AID.MegaflarePuddle), 6) { } -} +class P3MegaflarePuddle(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.MegaflarePuddle), 6); -class P3TempestWing : Components.TankbusterTether -{ - public P3TempestWing() : base(ActionID.MakeSpell(AID.TempestWing), (uint)TetherID.TempestWing, 5) { } -} +class P3TempestWing(BossModule module) : Components.TankbusterTether(module, ActionID.MakeSpell(AID.TempestWing), (uint)TetherID.TempestWing, 5); diff --git a/BossMod/Modules/Stormblood/Ultimate/UCOB/P3SeventhUmbralEra.cs b/BossMod/Modules/Stormblood/Ultimate/UCOB/P3SeventhUmbralEra.cs index 390fbd549f..b5332b58ee 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UCOB/P3SeventhUmbralEra.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UCOB/P3SeventhUmbralEra.cs @@ -6,20 +6,14 @@ class P3SeventhUmbralEra : Components.Knockback public P3SeventhUmbralEra() : base(ActionID.MakeSpell(AID.SeventhUmbralEra), true) { } - public override void Init(BossModule module) => _activation = module.WorldState.CurrentTime.AddSeconds(5.3f); + public override void Init(BossModule module) => _activation = WorldState.FutureTime(5.3f); - public override IEnumerable Sources(BossModule module, int slot, Actor actor) + public override IEnumerable Sources(int slot, Actor actor) { - yield return new(module.Bounds.Center, 11, _activation); + yield return new(Module.Bounds.Center, 11, _activation); } } -class P3CalamitousFlame : Components.CastCounter -{ - public P3CalamitousFlame() : base(ActionID.MakeSpell(AID.CalamitousFlame)) { } -} +class P3CalamitousFlame(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.CalamitousFlame)); -class P3CalamitousBlaze : Components.CastCounter -{ - public P3CalamitousBlaze() : base(ActionID.MakeSpell(AID.CalamitousBlaze)) { } -} +class P3CalamitousBlaze(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.CalamitousBlaze)); diff --git a/BossMod/Modules/Stormblood/Ultimate/UCOB/P5AhkMorn.cs b/BossMod/Modules/Stormblood/Ultimate/UCOB/P5AhkMorn.cs index 45eb383ccf..3db88de25f 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UCOB/P5AhkMorn.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UCOB/P5AhkMorn.cs @@ -5,9 +5,9 @@ class P5AhkMorn : Components.CastSharedTankbuster public P5AhkMorn() : base(ActionID.MakeSpell(AID.AkhMorn), 4) { } // cast is only a first hit, don't deactivate - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) { } + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.AkhMorn or AID.AkhMornAOE) ++NumCasts; diff --git a/BossMod/Modules/Stormblood/Ultimate/UCOB/P5Enrage.cs b/BossMod/Modules/Stormblood/Ultimate/UCOB/P5Enrage.cs index 4e4092b384..7f24f86b89 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UCOB/P5Enrage.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UCOB/P5Enrage.cs @@ -6,13 +6,13 @@ class P5Enrage : Components.UniformStackSpread public P5Enrage() : base(0, 4) { } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.Enrage) - AddSpreads(module.Raid.WithoutSlot(true), spell.NPCFinishAt); + AddSpreads(Raid.WithoutSlot(true), spell.NPCFinishAt); } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.Enrage or AID.EnrageAOE) ++NumCasts; diff --git a/BossMod/Modules/Stormblood/Ultimate/UCOB/P5Exaflare.cs b/BossMod/Modules/Stormblood/Ultimate/UCOB/P5Exaflare.cs index 9b15a1c898..37ddc860d8 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UCOB/P5Exaflare.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UCOB/P5Exaflare.cs @@ -6,7 +6,7 @@ public P5Exaflare() : base(6) { } public void Reset() => NumCasts = 0; - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.ExaflareFirst) { @@ -14,7 +14,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.ExaflareFirst or AID.ExaflareRest) { @@ -22,7 +22,7 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent int index = Lines.FindIndex(item => item.Next.AlmostEqual(caster.Position, 1)); if (index == -1) { - module.ReportError(this, $"Failed to find entry for {caster.InstanceID:X}"); + ReportError($"Failed to find entry for {caster.InstanceID:X}"); return; } diff --git a/BossMod/Modules/Stormblood/Ultimate/UCOB/P5Teraflare.cs b/BossMod/Modules/Stormblood/Ultimate/UCOB/P5Teraflare.cs index 7183e4f500..619140b3e3 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UCOB/P5Teraflare.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UCOB/P5Teraflare.cs @@ -6,14 +6,11 @@ class P5Teraflare : Components.CastCounter public P5Teraflare() : base(ActionID.MakeSpell(AID.Teraflare)) { } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.DownForTheCount) DownForTheCountAssigned = true; } } -class P5FlamesOfRebirth : Components.CastCounter -{ - public P5FlamesOfRebirth() : base(ActionID.MakeSpell(AID.FlamesOfRebirth)) { } -} +class P5FlamesOfRebirth(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.FlamesOfRebirth)); diff --git a/BossMod/Modules/Stormblood/Ultimate/UCOB/Quote.cs b/BossMod/Modules/Stormblood/Ultimate/UCOB/Quote.cs index 7dbbdefeac..7e1c416331 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UCOB/Quote.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UCOB/Quote.cs @@ -6,7 +6,7 @@ class Quote : BossComponent public List PendingMechanics = new(); public DateTime NextActivation; - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (PendingMechanics.Count > 0) { @@ -46,16 +46,16 @@ public override void OnActorNpcYell(BossModule module, Actor actor, ushort id) { Source = actor; PendingMechanics = aids; - NextActivation = module.WorldState.CurrentTime.AddSeconds(5.1f); + NextActivation = WorldState.FutureTime(5.1f); } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if (PendingMechanics.Count > 0 && (AID)spell.Action.ID == PendingMechanics.First()) { PendingMechanics.RemoveAt(0); - NextActivation = module.WorldState.CurrentTime.AddSeconds(3.1f); + NextActivation = WorldState.FutureTime(3.1f); } } } @@ -67,7 +67,7 @@ class QuoteIronChariotLunarDynamo : Components.GenericAOEs private static readonly AOEShapeCircle _shapeChariot = new(8.55f); private static readonly AOEShapeDonut _shapeDynamo = new(6, 22); // TODO: verify inner radius - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { AOEShape? shape = _quote != null && _quote.PendingMechanics.Count > 0 ? _quote.PendingMechanics[0] switch { @@ -90,10 +90,10 @@ public QuoteThermionicBeam() : base(4, 0, 8) { } public override void Init(BossModule module) => _quote = module.FindComponent(); - public override void Update(BossModule module) + public override void Update() { bool stackImminent = _quote != null && _quote.PendingMechanics.Count > 0 && _quote.PendingMechanics[0] == AID.ThermionicBeam; - if (stackImminent && Stacks.Count == 0 && module.Raid.Player() is var target && target != null) // note: target is random + if (stackImminent && Stacks.Count == 0 && Raid.Player() is var target && target != null) // note: target is random AddStack(target, _quote!.NextActivation); else if (!stackImminent && Stacks.Count > 0) Stacks.Clear(); @@ -109,11 +109,11 @@ public QuoteRavenDive() : base(0, 3, alwaysShowSpreads: true) { } public override void Init(BossModule module) => _quote = module.FindComponent(); - public override void Update(BossModule module) + public override void Update() { bool spreadImminent = _quote != null && _quote.PendingMechanics.Count > 0 && _quote.PendingMechanics[0] == AID.RavenDive; if (spreadImminent && Spreads.Count == 0) - AddSpreads(module.Raid.WithoutSlot(true), _quote!.NextActivation); + AddSpreads(Raid.WithoutSlot(true), _quote!.NextActivation); else if (!spreadImminent && Spreads.Count > 0) Spreads.Clear(); base.Update(module); @@ -128,11 +128,11 @@ public QuoteMeteorStream() : base(0, 4, alwaysShowSpreads: true) { } public override void Init(BossModule module) => _quote = module.FindComponent(); - public override void Update(BossModule module) + public override void Update() { bool spreadImminent = _quote != null && _quote.PendingMechanics.Count > 0 && _quote.PendingMechanics[0] == AID.MeteorStream; if (spreadImminent && Spreads.Count == 0) - AddSpreads(module.Raid.WithoutSlot(true), _quote!.NextActivation); + AddSpreads(Raid.WithoutSlot(true), _quote!.NextActivation); else if (!spreadImminent && Spreads.Count > 0) Spreads.Clear(); base.Update(module); @@ -149,10 +149,10 @@ public QuoteDalamudDive() : base(ActionID.MakeSpell(AID.DalamudDive), true, true public override void Init(BossModule module) => _quote = module.FindComponent(); - public override void Update(BossModule module) + public override void Update() { bool imminent = _quote != null && _quote.PendingMechanics.Count > 0 && _quote.PendingMechanics[0] == AID.DalamudDive; - if (imminent && CurrentBaits.Count == 0 && module.Enemies(OID.NaelDeusDarnus).FirstOrDefault() is var source && module.WorldState.Actors.Find(source?.TargetID ?? 0) is var target && target != null) + if (imminent && CurrentBaits.Count == 0 && module.Enemies(OID.NaelDeusDarnus).FirstOrDefault() is var source && WorldState.Actors.Find(source?.TargetID ?? 0) is var target && target != null) CurrentBaits.Add(new(target, target, _shape)); else if (!imminent && CurrentBaits.Count > 0) CurrentBaits.Clear(); diff --git a/BossMod/Modules/Stormblood/Ultimate/UCOB/Twister.cs b/BossMod/Modules/Stormblood/Ultimate/UCOB/Twister.cs index f6de16f506..ad9f1a28b7 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UCOB/Twister.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UCOB/Twister.cs @@ -1,9 +1,6 @@ namespace BossMod.Stormblood.Ultimate.UCOB; -class Twister : Components.CastTwister -{ - public Twister() : base(2, (uint)OID.VoidzoneTwister, ActionID.MakeSpell(AID.Twister), 0.3f, 0.5f) { } // TODO: verify radius -} +class Twister(BossModule module) : Components.CastTwister(module, 2, (uint)OID.VoidzoneTwister, ActionID.MakeSpell(AID.Twister), 0.3f, 0.5f); // TODO: verify radius class P1Twister : Twister { diff --git a/BossMod/Modules/Stormblood/Ultimate/UCOB/UCOB.cs b/BossMod/Modules/Stormblood/Ultimate/UCOB/UCOB.cs index 1b86bd3dd6..9b7efdf971 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UCOB/UCOB.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UCOB/UCOB.cs @@ -1,29 +1,14 @@ namespace BossMod.Stormblood.Ultimate.UCOB; -class P1Plummet : Components.Cleave -{ - public P1Plummet() : base(ActionID.MakeSpell(AID.Plummet), new AOEShapeCone(12, 60.Degrees()), (uint)OID.Twintania) { } -} +class P1Plummet(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.Plummet), new AOEShapeCone(12, 60.Degrees()), (uint)OID.Twintania); -class P1Fireball : Components.StackWithIcon -{ - public P1Fireball() : base((uint)IconID.Fireball, ActionID.MakeSpell(AID.Fireball), 4, 5.3f, 4) { } -} +class P1Fireball(BossModule module) : Components.StackWithIcon(module, (uint)IconID.Fireball, ActionID.MakeSpell(AID.Fireball), 4, 5.3f, 4); -class P2BahamutsClaw : Components.CastCounter -{ - public P2BahamutsClaw() : base(ActionID.MakeSpell(AID.BahamutsClaw)) { } -} +class P2BahamutsClaw(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.BahamutsClaw)); -class P3FlareBreath : Components.Cleave -{ - public P3FlareBreath() : base(ActionID.MakeSpell(AID.FlareBreath), new AOEShapeCone(29.2f, 45.Degrees()), (uint)OID.BahamutPrime) { } // TODO: verify angle -} +class P3FlareBreath(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.FlareBreath), new AOEShapeCone(29.2f, 45.Degrees()), (uint)OID.BahamutPrime); // TODO: verify angle -class P5MornAfah : Components.StackWithCastTargets -{ - public P5MornAfah() : base(ActionID.MakeSpell(AID.MornAfah), 4, 8) { } // TODO: verify radius -} +class P5MornAfah(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.MornAfah), 4, 8); // TODO: verify radius [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.Twintania, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 280)] public class UCOB : BossModule diff --git a/BossMod/Modules/Stormblood/Ultimate/UWU/P1FeatherRain.cs b/BossMod/Modules/Stormblood/Ultimate/UWU/P1FeatherRain.cs index d49e294fa1..c91b82a0b0 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UWU/P1FeatherRain.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UWU/P1FeatherRain.cs @@ -14,7 +14,7 @@ class P1FeatherRain : Components.GenericAOEs public P1FeatherRain() : base(ActionID.MakeSpell(AID.FeatherRain), "GTFO from puddle!") { } - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { foreach (var p in _predicted) yield return new(_shape, p, new(), _activation); @@ -22,17 +22,17 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, yield return new(_shape, c.CastInfo!.LocXZ, new(), c.CastInfo!.NPCFinishAt); } - public override void OnActorPlayActionTimelineEvent(BossModule module, Actor actor, ushort id) + public override void OnActorPlayActionTimelineEvent(Actor actor, ushort id) { if (id == 0x1E3A && (OID)actor.OID is OID.Garuda or OID.GarudaSister) { _predicted.Clear(); - _predicted.AddRange(module.Raid.WithoutSlot().Select(p => p.Position)); - _activation = module.WorldState.CurrentTime.AddSeconds(2.5f); + _predicted.AddRange(Raid.WithoutSlot().Select(p => p.Position)); + _activation = WorldState.FutureTime(2.5f); } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) { @@ -41,7 +41,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) { diff --git a/BossMod/Modules/Stormblood/Ultimate/UWU/P1Mesohigh.cs b/BossMod/Modules/Stormblood/Ultimate/UWU/P1Mesohigh.cs index 4707141e71..cdb41ab54e 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UWU/P1Mesohigh.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UWU/P1Mesohigh.cs @@ -13,11 +13,11 @@ public override void Init(BossModule module) _sisters = module.Enemies(OID.GarudaSister); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (var s in EnumerateTetherSources(module)) { - var tetherTarget = module.WorldState.Actors.Find(s.Tether.Target); + var tetherTarget = WorldState.Actors.Find(s.Tether.Target); if (tetherTarget != null) { arena.AddLine(s.Position, tetherTarget.Position, ArenaColor.Danger); @@ -26,7 +26,7 @@ public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc } } - public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) + public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) { return _sisters.Any(s => s.Tether.Target == player.InstanceID) ? PlayerPriority.Danger : PlayerPriority.Normal; } @@ -35,7 +35,7 @@ private IEnumerable EnumerateTetherSources(BossModule module) { foreach (var s in _sisters.Tethered(TetherID.Mesohigh)) yield return s; - if (module.PrimaryActor.Tether.ID == (uint)TetherID.Mesohigh) - yield return module.PrimaryActor; + if (Module.PrimaryActor.Tether.ID == (uint)TetherID.Mesohigh) + yield return Module.PrimaryActor; } } diff --git a/BossMod/Modules/Stormblood/Ultimate/UWU/P1Plumes.cs b/BossMod/Modules/Stormblood/Ultimate/UWU/P1Plumes.cs index 93777a6483..c8743f8ece 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UWU/P1Plumes.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UWU/P1Plumes.cs @@ -15,7 +15,7 @@ public override void Init(BossModule module) _satin = module.Enemies(OID.SatinPlume); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { arena.Actors(_razor, ArenaColor.Enemy); arena.Actors(_spiny, ArenaColor.Enemy); diff --git a/BossMod/Modules/Stormblood/Ultimate/UWU/P1WickedWheel.cs b/BossMod/Modules/Stormblood/Ultimate/UWU/P1WickedWheel.cs index d80bae69a9..cc2de1f5a3 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UWU/P1WickedWheel.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UWU/P1WickedWheel.cs @@ -14,12 +14,12 @@ class WickedWheel : Components.GenericAOEs public bool Active => Sources.Count > 0; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { return Sources.Select(s => new AOEInstance(s.shape, s.source.Position, s.source.Rotation, s.activation)); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { switch ((AID)spell.Action.ID) { @@ -37,13 +37,13 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf }; } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { case AID.WickedWheel: Sources.RemoveAll(s => s.source == caster); - AwakenedResolve = module.WorldState.CurrentTime.AddSeconds(2.1f); // for tornado + AwakenedResolve = WorldState.FutureTime(2.1f); // for tornado if (caster.FindStatus(SID.Woken) != null) Sources.Add((caster, ShapeTornado, AwakenedResolve)); ++NumCasts; @@ -64,9 +64,9 @@ class P1WickedWheel : WickedWheel { } class P4WickedWheel : WickedWheel { - public override void OnActorPlayActionTimelineEvent(BossModule module, Actor actor, ushort id) + public override void OnActorPlayActionTimelineEvent(Actor actor, ushort id) { if ((OID)actor.OID == OID.Garuda && id == 0x1E43) - Sources.Add((actor, ShapeCombined, module.WorldState.CurrentTime.AddSeconds(8.1f))); + Sources.Add((actor, ShapeCombined, WorldState.FutureTime(8.1f))); } } diff --git a/BossMod/Modules/Stormblood/Ultimate/UWU/P2CrimsonCyclone.cs b/BossMod/Modules/Stormblood/Ultimate/UWU/P2CrimsonCyclone.cs index 217df89774..ba61d46063 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UWU/P2CrimsonCyclone.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UWU/P2CrimsonCyclone.cs @@ -21,7 +21,7 @@ public CrimsonCyclone(float predictionDelay) : base(ActionID.MakeSpell(AID.Crims _predictionDelay = predictionDelay; } - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_predicted.Count <= 2) // don't draw 4 predicted charges, it is pointless foreach (var p in _predicted) @@ -30,13 +30,13 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, yield return new(_shapeMain, c.Position, c.CastInfo!.Rotation, c.CastInfo.NPCFinishAt); } - public override void OnActorPlayActionTimelineEvent(BossModule module, Actor actor, ushort id) + public override void OnActorPlayActionTimelineEvent(Actor actor, ushort id) { if (NumCasts == 0 && (OID)actor.OID == OID.Ifrit && id == 0x1E43) - _predicted.Add((_shapeMain, actor.Position, actor.Rotation, module.WorldState.CurrentTime.AddSeconds(_predictionDelay))); + _predicted.Add((_shapeMain, actor.Position, actor.Rotation, WorldState.FutureTime(_predictionDelay))); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) { @@ -46,20 +46,20 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) { _casters.Remove(caster); if (caster == ((UWU)module).Ifrit() && caster.FindStatus(SID.Woken) != null) { - _predicted.Add((_shapeCross, module.Bounds.Center - 19.5f * (spell.Rotation + 45.Degrees()).ToDirection(), spell.Rotation + 45.Degrees(), module.WorldState.CurrentTime.AddSeconds(2.2f))); - _predicted.Add((_shapeCross, module.Bounds.Center - 19.5f * (spell.Rotation - 45.Degrees()).ToDirection(), spell.Rotation - 45.Degrees(), module.WorldState.CurrentTime.AddSeconds(2.2f))); + _predicted.Add((_shapeCross, Module.Bounds.Center - 19.5f * (spell.Rotation + 45.Degrees()).ToDirection(), spell.Rotation + 45.Degrees(), WorldState.FutureTime(2.2f))); + _predicted.Add((_shapeCross, Module.Bounds.Center - 19.5f * (spell.Rotation - 45.Degrees()).ToDirection(), spell.Rotation - 45.Degrees(), WorldState.FutureTime(2.2f))); } } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { base.OnEventCast(module, caster, spell); if ((AID)spell.Action.ID == AID.CrimsonCycloneCross) @@ -69,12 +69,6 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent } } -class P2CrimsonCyclone : CrimsonCyclone -{ - public P2CrimsonCyclone() : base(5.2f) { } -} +class P2CrimsonCyclone(BossModule module) : CrimsonCyclone(module, 5.2f); -class P4CrimsonCyclone : CrimsonCyclone -{ - public P4CrimsonCyclone() : base(8.1f) { } -} +class P4CrimsonCyclone(BossModule module) : CrimsonCyclone(module, 8.1f); diff --git a/BossMod/Modules/Stormblood/Ultimate/UWU/P2Eruption.cs b/BossMod/Modules/Stormblood/Ultimate/UWU/P2Eruption.cs index d0bfd39dc4..d0e0a76d3b 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UWU/P2Eruption.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UWU/P2Eruption.cs @@ -9,23 +9,23 @@ class P2Eruption : Components.LocationTargetedAOEs public P2Eruption() : base(ActionID.MakeSpell(AID.EruptionAOE), 8) { } - public override void Update(BossModule module) + public override void Update() { if (NumCastsStarted == 0) { var source = ((UWU)module).Ifrit(); if (source != null) - _baiters = module.Raid.WithSlot().WhereActor(a => a.Class.IsDD()).SortedByRange(source.Position).TakeLast(2).Mask(); + _baiters = Raid.WithSlot().WhereActor(a => a.Class.IsDD()).SortedByRange(source.Position).TakeLast(2).Mask(); } } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (_baiters[pcSlot]) arena.AddCircle(pc.Position, Shape.Radius, ArenaColor.Safe); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { base.OnCastStarted(module, caster, spell); if ((AID)spell.Action.ID == AID.EruptionAOE) @@ -34,7 +34,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf { if (NumCastsStarted == 0) _baiters.Reset(); - var (baiterSlot, baiter) = module.Raid.WithSlot().ExcludedFromMask(_baiters).Closest(spell.LocXZ); + var (baiterSlot, baiter) = Raid.WithSlot().ExcludedFromMask(_baiters).Closest(spell.LocXZ); if (baiter != null) _baiters.Set(baiterSlot); } diff --git a/BossMod/Modules/Stormblood/Ultimate/UWU/P2FlamingCrush.cs b/BossMod/Modules/Stormblood/Ultimate/UWU/P2FlamingCrush.cs index 0dba76a4f5..574985ddc8 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UWU/P2FlamingCrush.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UWU/P2FlamingCrush.cs @@ -6,7 +6,7 @@ class FlamingCrush : Components.UniformStackSpread public FlamingCrush() : base(4, 0, 6) { } - public override void OnEventIcon(BossModule module, Actor actor, uint iconID) + public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.FlamingCrush) { @@ -14,7 +14,7 @@ public override void OnEventIcon(BossModule module, Actor actor, uint iconID) } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.FlamingCrush) { @@ -30,7 +30,7 @@ public override void Init(BossModule module) { if (module.FindComponent() is var searingWind && searingWind != null) foreach (var sw in searingWind.Spreads) - Avoid.Set(module.Raid.FindSlot(sw.Target.InstanceID)); + Avoid.Set(Raid.FindSlot(sw.Target.InstanceID)); } } @@ -42,6 +42,6 @@ class P5FlamingCrush : FlamingCrush { public override void Init(BossModule module) { - Avoid = module.Raid.WithSlot(true).WhereActor(p => p.FindStatus(SID.ThermalLow) != null && p.Role != Role.Healer).Mask(); + Avoid = Raid.WithSlot(true).WhereActor(p => p.FindStatus(SID.ThermalLow) != null && p.Role != Role.Healer).Mask(); } } diff --git a/BossMod/Modules/Stormblood/Ultimate/UWU/P2InfernalFetters.cs b/BossMod/Modules/Stormblood/Ultimate/UWU/P2InfernalFetters.cs index 293360769e..7331e93a55 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UWU/P2InfernalFetters.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UWU/P2InfernalFetters.cs @@ -5,36 +5,36 @@ class P2InfernalFetters : BossComponent public BitMask Fetters; private int _fettersStrength; - public override PlayerPriority CalcPriority(BossModule module, int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) + public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) { return Fetters[playerSlot] ? PlayerPriority.Normal : PlayerPriority.Irrelevant; } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (Fetters.NumSetBits() > 1) { - var from = module.Raid[Fetters.LowestSetBit()]; - var to = module.Raid[Fetters.HighestSetBit()]; + var from = Raid[Fetters.LowestSetBit()]; + var to = Raid[Fetters.HighestSetBit()]; if (from != null && to != null) arena.AddLine(from.Position, to.Position, _fettersStrength > 1 ? ArenaColor.Danger : ArenaColor.Safe); } } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.InfernalFetters) { - Fetters.Set(module.Raid.FindSlot(actor.InstanceID)); + Fetters.Set(Raid.FindSlot(actor.InstanceID)); _fettersStrength = status.Extra; } } - public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusLose(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.InfernalFetters) { - Fetters.Clear(module.Raid.FindSlot(actor.InstanceID)); + Fetters.Clear(Raid.FindSlot(actor.InstanceID)); } } } diff --git a/BossMod/Modules/Stormblood/Ultimate/UWU/P2Nails.cs b/BossMod/Modules/Stormblood/Ultimate/UWU/P2Nails.cs index 2322fdb602..bcf2d706ad 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UWU/P2Nails.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UWU/P2Nails.cs @@ -12,7 +12,7 @@ public override void Init(BossModule module) _nails = module.Enemies(OID.InfernalNail); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { arena.Actors(_nails, ArenaColor.Enemy); } diff --git a/BossMod/Modules/Stormblood/Ultimate/UWU/P2SearingWind.cs b/BossMod/Modules/Stormblood/Ultimate/UWU/P2SearingWind.cs index 7a41fbbcd7..ed13e42e40 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UWU/P2SearingWind.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UWU/P2SearingWind.cs @@ -4,15 +4,15 @@ class P2SearingWind : Components.UniformStackSpread { public P2SearingWind() : base(0, 14, alwaysShowSpreads: true, includeDeadTargets: true) { } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { - if ((AID)spell.Action.ID == AID.InfernoHowl && module.WorldState.Actors.Find(spell.TargetID) is var target && target != null) + if ((AID)spell.Action.ID == AID.InfernoHowl && WorldState.Actors.Find(spell.TargetID) is var target && target != null) { - AddSpread(target, module.WorldState.CurrentTime.AddSeconds(8)); + AddSpread(target, WorldState.FutureTime(8)); } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.SearingWind) { @@ -21,13 +21,13 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent { ref var spread = ref Spreads.Ref(index); var status = spread.Target.FindStatus(SID.SearingWind); - if (status == null || (status.Value.ExpireAt - module.WorldState.CurrentTime).TotalSeconds < 6) + if (status == null || (status.Value.ExpireAt - WorldState.CurrentTime).TotalSeconds < 6) { Spreads.RemoveAt(index); } else { - spread.Activation = module.WorldState.CurrentTime.AddSeconds(6); + spread.Activation = WorldState.FutureTime(6); } } } diff --git a/BossMod/Modules/Stormblood/Ultimate/UWU/P2VulcanBurst.cs b/BossMod/Modules/Stormblood/Ultimate/UWU/P2VulcanBurst.cs index a67a108064..749ee73999 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UWU/P2VulcanBurst.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UWU/P2VulcanBurst.cs @@ -6,7 +6,7 @@ class VulcanBurst : Components.Knockback public VulcanBurst(AID aid) : base(ActionID.MakeSpell(aid)) { } - public override IEnumerable Sources(BossModule module, int slot, Actor actor) + public override IEnumerable Sources(int slot, Actor actor) { if (SourceActor != null) yield return new(SourceActor.Position, 15); // TODO: activation diff --git a/BossMod/Modules/Stormblood/Ultimate/UWU/P3Burst.cs b/BossMod/Modules/Stormblood/Ultimate/UWU/P3Burst.cs index a3fb9b4d1e..3b5aa6da30 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UWU/P3Burst.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UWU/P3Burst.cs @@ -9,7 +9,7 @@ class P3Burst : Components.GenericAOEs public P3Burst() : base(ActionID.MakeSpell(AID.Burst)) { } - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { foreach (var b in _bombs) { @@ -24,13 +24,13 @@ public override void Init(BossModule module) _bombs = module.Enemies(OID.BombBoulder); } - public override void Update(BossModule module) + public override void Update() { foreach (var b in _bombs.Where(b => !_bombActivation.ContainsKey(b.InstanceID))) - _bombActivation[b.InstanceID] = module.WorldState.CurrentTime.AddSeconds(6.5f); + _bombActivation[b.InstanceID] = WorldState.FutureTime(6.5f); } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) _bombActivation[caster.InstanceID] = null; diff --git a/BossMod/Modules/Stormblood/Ultimate/UWU/P3Gaols.cs b/BossMod/Modules/Stormblood/Ultimate/UWU/P3Gaols.cs index dfef17dae9..0814e7263a 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UWU/P3Gaols.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UWU/P3Gaols.cs @@ -10,23 +10,23 @@ public enum State { None, TargetSelection, Fetters, Done } private static readonly AOEShapeCircle _freefireShape = new(6); - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (CurState == State.Fetters && !_targets[slot]) - foreach (var (_, target) in module.Raid.WithSlot(true).IncludedInMask(_targets)) + foreach (var (_, target) in Raid.WithSlot(true).IncludedInMask(_targets)) yield return new(_freefireShape, target.Position); } - public override void AddGlobalHints(BossModule module, GlobalHints hints) + public override void AddGlobalHints(GlobalHints hints) { if (CurState == State.TargetSelection && _targets.Any()) { - var hint = string.Join(" > ", Service.Config.Get().P3GaolPriorities.Resolve(module.Raid).Where(i => _targets[i.slot]).OrderBy(i => i.group).Select(i => module.Raid[i.slot]?.Name)); + var hint = string.Join(" > ", Service.Config.Get().P3GaolPriorities.Resolve(Raid).Where(i => _targets[i.slot]).OrderBy(i => i.group).Select(i => Raid[i.slot]?.Name)); hints.Add($"Gaols: {hint}"); } } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Fetters) { @@ -35,11 +35,11 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st CurState = State.Fetters; _targets.Reset(); // note that if target dies, fetters is applied to random player } - _targets.Set(module.Raid.FindSlot(actor.InstanceID)); + _targets.Set(Raid.FindSlot(actor.InstanceID)); } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { base.OnEventCast(module, caster, spell); switch ((AID)spell.Action.ID) @@ -47,10 +47,10 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent case AID.RockThrowBoss: case AID.RockThrowHelper: CurState = State.TargetSelection; - _targets.Set(module.Raid.FindSlot(spell.MainTargetID)); + _targets.Set(Raid.FindSlot(spell.MainTargetID)); break; case AID.FreefireGaol: - var (closestSlot, closestPlayer) = module.Raid.WithSlot(true).IncludedInMask(_targets).Closest(caster.Position); + var (closestSlot, closestPlayer) = Raid.WithSlot(true).IncludedInMask(_targets).Closest(caster.Position); if (closestPlayer != null) { _targets.Clear(closestSlot); diff --git a/BossMod/Modules/Stormblood/Ultimate/UWU/P3Geocrush.cs b/BossMod/Modules/Stormblood/Ultimate/UWU/P3Geocrush.cs index 5478133246..f401fe4a28 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UWU/P3Geocrush.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UWU/P3Geocrush.cs @@ -1,9 +1,6 @@ namespace BossMod.Stormblood.Ultimate.UWU; -class P3Geocrush1 : Components.SelfTargetedAOEs -{ - public P3Geocrush1() : base(ActionID.MakeSpell(AID.Geocrush1), new AOEShapeCircle(18)) { } -} +class P3Geocrush1(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Geocrush1), new AOEShapeCircle(18)); // TODO: add prediction after PATE xxx - need non-interpolated actor rotation for that... class P3Geocrush2 : Components.GenericAOEs @@ -16,24 +13,24 @@ class P3Geocrush2 : Components.GenericAOEs public P3Geocrush2() : base(ActionID.MakeSpell(AID.Geocrush2)) { } - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_caster != null) yield return new(_shapeCrush, _caster.Position, _caster.CastInfo!.Rotation, _caster.CastInfo.NPCFinishAt); if (_shapeReduced != null) - yield return new(_shapeReduced, module.Bounds.Center); + yield return new(_shapeReduced, Module.Bounds.Center); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) { _caster = caster; - _shapeReduced = new(NumCasts == 0 ? 16 : 12, module.Bounds.HalfSize); // TODO: verify second radius + _shapeReduced = new(NumCasts == 0 ? 16 : 12, Module.Bounds.HalfSize); // TODO: verify second radius } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) { @@ -41,7 +38,7 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn } } - //public override void Update(BossModule module) + //public override void Update() //{ // if (_caster == null || _caster.CastInfo != null) // return; @@ -50,9 +47,9 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn // if (_prevPredictedAngle == _caster.Rotation && ++_numFramesStill > 2) // { // var dir = _caster.Rotation.ToDirection(); - // _predictedPos = module.Bounds.Center + _possibleOffsets.MinBy(o => + // _predictedPos = Module.Bounds.Center + _possibleOffsets.MinBy(o => // { - // var off = module.Bounds.Center + o - _caster.Position; + // var off = Module.Bounds.Center + o - _caster.Position; // var proj = off.Dot(dir); // return proj > 0 ? (off - proj * dir).LengthSq() : float.MaxValue; // }); diff --git a/BossMod/Modules/Stormblood/Ultimate/UWU/P3Landslide.cs b/BossMod/Modules/Stormblood/Ultimate/UWU/P3Landslide.cs index bf8e77f12c..4bf65c0e18 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UWU/P3Landslide.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UWU/P3Landslide.cs @@ -15,7 +15,7 @@ class Landslide : Components.GenericAOEs public bool CastsActive => _casters.Count > 0; - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (PredictedSource != null) { @@ -30,7 +30,7 @@ public override IEnumerable ActiveAOEs(BossModule module, int slot, yield return new((OID)c.OID == OID.Titan ? ShapeBoss : ShapeHelper, c.Position, c.CastInfo!.Rotation, c.CastInfo.NPCFinishAt); } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.LandslideBoss or AID.LandslideBossAwakened or AID.LandslideHelper or AID.LandslideHelperAwakened or AID.LandslideUltima or AID.LandslideUltimaHelper) { @@ -41,14 +41,14 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf } } - public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.LandslideBoss or AID.LandslideBossAwakened or AID.LandslideHelper or AID.LandslideHelperAwakened or AID.LandslideUltima or AID.LandslideUltimaHelper) { _casters.Remove(caster); ++NumCasts; if ((AID)spell.Action.ID == AID.LandslideBoss) - PredictedActivation = module.WorldState.CurrentTime.AddSeconds(2); // used if boss wasn't awakened when it should've been + PredictedActivation = WorldState.FutureTime(2); // used if boss wasn't awakened when it should've been } } } @@ -57,12 +57,12 @@ class P3Landslide : Landslide { } class P4Landslide : Landslide { - public override void OnActorPlayActionTimelineEvent(BossModule module, Actor actor, ushort id) + public override void OnActorPlayActionTimelineEvent(Actor actor, ushort id) { if ((OID)actor.OID == OID.Titan && id == 0x1E43) { PredictedSource = actor; - PredictedActivation = module.WorldState.CurrentTime.AddSeconds(8.1f); + PredictedActivation = WorldState.FutureTime(8.1f); } } } diff --git a/BossMod/Modules/Stormblood/Ultimate/UWU/P4CeruleumVent.cs b/BossMod/Modules/Stormblood/Ultimate/UWU/P4CeruleumVent.cs index bdd9327e39..ca703153f8 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UWU/P4CeruleumVent.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UWU/P4CeruleumVent.cs @@ -11,18 +11,18 @@ class P4CeruleumVent : Components.GenericAOEs public P4CeruleumVent() : base(ActionID.MakeSpell(AID.CeruleumVent)) { } - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_source != null) yield return new(_shape, _source.Position, _source.Rotation, _activation); } - public override void OnActorPlayActionTimelineEvent(BossModule module, Actor actor, ushort id) + public override void OnActorPlayActionTimelineEvent(Actor actor, ushort id) { if ((OID)actor.OID == OID.UltimaWeapon && id == 0x1E43) { _source = actor; - _activation = module.WorldState.CurrentTime.AddSeconds(10.1f); + _activation = WorldState.FutureTime(10.1f); } } } diff --git a/BossMod/Modules/Stormblood/Ultimate/UWU/P4Freefire.cs b/BossMod/Modules/Stormblood/Ultimate/UWU/P4Freefire.cs index 81b823ae77..ae0892e7be 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UWU/P4Freefire.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UWU/P4Freefire.cs @@ -9,17 +9,17 @@ class P4Freefire : Components.GenericAOEs public P4Freefire() : base(ActionID.MakeSpell(AID.FreefireIntermission)) { } - public override IEnumerable ActiveAOEs(BossModule module, int slot, Actor actor) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { return _casters.Select(c => new AOEInstance(_shape, c.Position, 0.Degrees(), _activation)); } - public override void OnActorPlayActionTimelineEvent(BossModule module, Actor actor, ushort id) + public override void OnActorPlayActionTimelineEvent(Actor actor, ushort id) { if ((OID)actor.OID == OID.Helper && id == 0x0449) { _casters.Add(actor); - _activation = module.WorldState.CurrentTime.AddSeconds(5.9f); + _activation = WorldState.FutureTime(5.9f); } } } diff --git a/BossMod/Modules/Stormblood/Ultimate/UWU/P4MagitekBits.cs b/BossMod/Modules/Stormblood/Ultimate/UWU/P4MagitekBits.cs index 19228ce47d..73886ea3e8 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UWU/P4MagitekBits.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UWU/P4MagitekBits.cs @@ -11,7 +11,7 @@ public override void Init(BossModule module) _bits = module.Enemies(OID.MagitekBit); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { arena.Actors(_bits, ArenaColor.Enemy); } diff --git a/BossMod/Modules/Stormblood/Ultimate/UWU/P4UltimateAnnihilation.cs b/BossMod/Modules/Stormblood/Ultimate/UWU/P4UltimateAnnihilation.cs index 8e6957f80a..98e2b510ae 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UWU/P4UltimateAnnihilation.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UWU/P4UltimateAnnihilation.cs @@ -11,7 +11,7 @@ public override void Init(BossModule module) _orbs = module.Enemies(OID.Aetheroplasm); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (var orb in _orbs.Where(o => !o.IsDead)) { diff --git a/BossMod/Modules/Stormblood/Ultimate/UWU/P4UltimatePredation.cs b/BossMod/Modules/Stormblood/Ultimate/UWU/P4UltimatePredation.cs index 717b782df7..28f82dd924 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UWU/P4UltimatePredation.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UWU/P4UltimatePredation.cs @@ -13,20 +13,20 @@ public enum State { Inactive, Predicted, First, Second, Done } private static readonly float _dodgeRadius = 19; private static readonly Angle _dodgeCushion = 2.5f.Degrees(); - public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints) + public override void AddHints(int slot, Actor actor, TextHints hints) { if (movementHints != null) foreach (var h in EnumerateHints(actor.Position)) movementHints.Add(h); } - public override void DrawArenaForeground(BossModule module, int pcSlot, Actor pc, MiniArena arena) + public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (var h in EnumerateHints(pc.Position)) arena.AddLine(h.from, h.to, h.color); } - public override void OnActorPlayActionTimelineEvent(BossModule module, Actor actor, ushort id) + public override void OnActorPlayActionTimelineEvent(Actor actor, ushort id) { if (CurState == State.Inactive && id == 0x1E43) { @@ -35,13 +35,13 @@ public override void OnActorPlayActionTimelineEvent(BossModule module, Actor act } } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if (CurState == State.Predicted && (AID)spell.Action.ID == AID.CrimsonCyclone) CurState = State.First; } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { @@ -76,7 +76,7 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent private void RecalculateHints(BossModule module) { - _first.Center = _second.Center = module.Bounds.Center; + _first.Center = _second.Center = Module.Bounds.Center; _first.Forbidden.Clear(); _second.Forbidden.Clear(); _hints.Clear(); @@ -96,8 +96,8 @@ private void RecalculateHints(BossModule module) _second.ForbidInfiniteRect(titan.Position, titan.Rotation - 22.5f.Degrees(), 3); _second.ForbidInfiniteRect(titan.Position, titan.Rotation + 90.Degrees(), 3); _first.ForbidInfiniteRect(ifrit.Position, ifrit.Rotation, 9); - _second.ForbidInfiniteRect(module.Bounds.Center - new WDir(module.Bounds.HalfSize, 0), 90.Degrees(), 5); - _second.ForbidInfiniteRect(module.Bounds.Center - new WDir(0, module.Bounds.HalfSize), 0.Degrees(), 5); + _second.ForbidInfiniteRect(Module.Bounds.Center - new WDir(Module.Bounds.HalfSize, 0), 90.Degrees(), 5); + _second.ForbidInfiniteRect(Module.Bounds.Center - new WDir(0, Module.Bounds.HalfSize), 0.Degrees(), 5); _first.ForbidCircle(garuda.Position, 20); _second.ForbidCircle(garuda.Position, 20); _second.ForbidCircle(ultima.Position, 14); @@ -108,7 +108,7 @@ private void RecalculateHints(BossModule module) _hints.Add(GetSafePositionAtAngle(module, a2)); } - private WPos GetSafePositionAtAngle(BossModule module, Angle angle) => module.Bounds.Center + _dodgeRadius * angle.ToDirection(); + private WPos GetSafePositionAtAngle(BossModule module, Angle angle) => Module.Bounds.Center + _dodgeRadius * angle.ToDirection(); private IEnumerable<(Angle, Angle)> EnumeratePotentialSafespots() { diff --git a/BossMod/Modules/Stormblood/Ultimate/UWU/P4ViscousAetheroplasm.cs b/BossMod/Modules/Stormblood/Ultimate/UWU/P4ViscousAetheroplasm.cs index 1518636750..c79e9b2c36 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UWU/P4ViscousAetheroplasm.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UWU/P4ViscousAetheroplasm.cs @@ -1,35 +1,32 @@ namespace BossMod.Stormblood.Ultimate.UWU; -class P4ViscousAetheroplasmApply : Components.Cleave -{ - public P4ViscousAetheroplasmApply() : base(ActionID.MakeSpell(AID.ViscousAetheroplasmApply), new AOEShapeCircle(2), (uint)OID.UltimaWeapon, originAtTarget: true) { } -} +class P4ViscousAetheroplasmApply(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.ViscousAetheroplasmApply), new AOEShapeCircle(2), (uint)OID.UltimaWeapon, originAtTarget: true); // TODO: if aetheroplasm target is the same as homing laser target, assume it is being soaked solo; consider merging these two components class P4ViscousAetheroplasmResolve : Components.UniformStackSpread { public P4ViscousAetheroplasmResolve() : base(4, 0, 7) { } - public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell) + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.HomingLasers) { // update avoid target to homing laser target BitMask avoid = new(); - avoid.Set(module.Raid.FindSlot(spell.TargetID)); + avoid.Set(Raid.FindSlot(spell.TargetID)); foreach (ref var s in Stacks.AsSpan()) s.ForbiddenPlayers = avoid; } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) { case AID.ViscousAetheroplasmApply: - var target = module.WorldState.Actors.Find(spell.MainTargetID); + var target = WorldState.Actors.Find(spell.MainTargetID); if (target != null) - AddStack(target, default, module.Raid.WithSlot(true).WhereActor(a => a.InstanceID != spell.MainTargetID && a.Role == Role.Tank).Mask()); + AddStack(target, default, Raid.WithSlot(true).WhereActor(a => a.InstanceID != spell.MainTargetID && a.Role == Role.Tank).Mask()); break; case AID.ViscousAetheroplasmResolve: Stacks.Clear(); @@ -49,7 +46,7 @@ class P5ViscousAetheroplasmTriple : Components.UniformStackSpread public P5ViscousAetheroplasmTriple() : base(4, 0, 8) { } - public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status) + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.ViscousAetheroplasm) { @@ -59,7 +56,7 @@ public override void OnStatusGain(BossModule module, Actor actor, ActorStatus st } } - public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell) + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.ViscousAetheroplasmResolve) { diff --git a/BossMod/Modules/Stormblood/Ultimate/UWU/UWU.cs b/BossMod/Modules/Stormblood/Ultimate/UWU/UWU.cs index 26205dba96..1124feb2f3 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UWU/UWU.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UWU/UWU.cs @@ -1,122 +1,53 @@ namespace BossMod.Stormblood.Ultimate.UWU; -class P1Slipstream : Components.SelfTargetedAOEs -{ - public P1Slipstream() : base(ActionID.MakeSpell(AID.Slipstream), new AOEShapeCone(11.7f, 45.Degrees())) { } -} +class P1Slipstream(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Slipstream), new AOEShapeCone(11.7f, 45.Degrees())); -class P1Downburst : Components.Cleave -{ - public P1Downburst() : base(ActionID.MakeSpell(AID.Downburst), new AOEShapeCone(11.7f, 45.Degrees())) { } -} +class P1Downburst(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.Downburst), new AOEShapeCone(11.7f, 45.Degrees())); // TODO: hints... (use wild charge component? need 'avoid or share-non-first' role?) -class P1MistralSongBoss : Components.CastCounter -{ - public P1MistralSongBoss() : base(ActionID.MakeSpell(AID.MistralSongBoss)) { } -} +class P1MistralSongBoss(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.MistralSongBoss)); // TODO: same as boss variant + multi targets -class P1MistralSongAdds : Components.CastCounter -{ - public P1MistralSongAdds() : base(ActionID.MakeSpell(AID.MistralSongAdds)) { } -} +class P1MistralSongAdds(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.MistralSongAdds)); -class P1GreatWhirlwind : Components.LocationTargetedAOEs -{ - public P1GreatWhirlwind() : base(ActionID.MakeSpell(AID.GreatWhirlwind), 8) { } -} +class P1GreatWhirlwind(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.GreatWhirlwind), 8); -class P1EyeOfTheStorm : Components.SelfTargetedAOEs -{ - public P1EyeOfTheStorm() : base(ActionID.MakeSpell(AID.EyeOfTheStorm), new AOEShapeDonut(12, 25)) { } -} +class P1EyeOfTheStorm(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.EyeOfTheStorm), new AOEShapeDonut(12, 25)); -class P1Gigastorm : Components.SelfTargetedAOEs -{ - public P1Gigastorm() : base(ActionID.MakeSpell(AID.Gigastorm), new AOEShapeCircle(6.5f)) { } -} +class P1Gigastorm(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Gigastorm), new AOEShapeCircle(6.5f)); -class P2RadiantPlume : Components.LocationTargetedAOEs -{ - public P2RadiantPlume() : base(ActionID.MakeSpell(AID.RadiantPlumeAOE), 8) { } -} +class P2RadiantPlume(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.RadiantPlumeAOE), 8); -class P2Incinerate : Components.Cleave -{ - public P2Incinerate() : base(ActionID.MakeSpell(AID.Incinerate), new AOEShapeCone(15, 60.Degrees()), (uint)OID.Ifrit) { } -} +class P2Incinerate(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.Incinerate), new AOEShapeCone(15, 60.Degrees()), (uint)OID.Ifrit); -class P3RockBuster : Components.Cleave -{ - public P3RockBuster() : base(ActionID.MakeSpell(AID.RockBuster), new AOEShapeCone(10.55f, 60.Degrees()), (uint)OID.Titan) { } // TODO: verify angle -} +class P3RockBuster(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.RockBuster), new AOEShapeCone(10.55f, 60.Degrees()), (uint)OID.Titan); // TODO: verify angle -class P3MountainBuster : Components.Cleave -{ - public P3MountainBuster() : base(ActionID.MakeSpell(AID.MountainBuster), new AOEShapeCone(15.55f, 45.Degrees()), (uint)OID.Titan) { } // TODO: verify angle -} +class P3MountainBuster(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.MountainBuster), new AOEShapeCone(15.55f, 45.Degrees()), (uint)OID.Titan); // TODO: verify angle -class P3WeightOfTheLand : Components.LocationTargetedAOEs -{ - public P3WeightOfTheLand() : base(ActionID.MakeSpell(AID.WeightOfTheLandAOE), 6) { } -} +class P3WeightOfTheLand(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.WeightOfTheLandAOE), 6); -class P3Upheaval : Components.KnockbackFromCastTarget -{ - public P3Upheaval() : base(ActionID.MakeSpell(AID.Upheaval), 24, true) { } -} +class P3Upheaval(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.Upheaval), 24, true); -class P3Tumult : Components.CastCounter -{ - public P3Tumult() : base(ActionID.MakeSpell(AID.Tumult)) { } -} +class P3Tumult(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.Tumult)); -class P4Blight : Components.CastCounter -{ - public P4Blight() : base(ActionID.MakeSpell(AID.Blight)) { } -} +class P4Blight(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.Blight)); -class P4HomingLasers : Components.SpreadFromCastTargets -{ - public P4HomingLasers() : base(ActionID.MakeSpell(AID.HomingLasers), 4) { } -} +class P4HomingLasers(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.HomingLasers), 4); -class P4DiffractiveLaser : Components.Cleave -{ - public P4DiffractiveLaser() : base(ActionID.MakeSpell(AID.DiffractiveLaser), new AOEShapeCone(18, 45.Degrees()), (uint)OID.UltimaWeapon) { } // TODO: verify angle -} +class P4DiffractiveLaser(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.DiffractiveLaser), new AOEShapeCone(18, 45.Degrees()), (uint)OID.UltimaWeapon); // TODO: verify angle -class P5MistralSongCone : Components.SelfTargetedAOEs -{ - public P5MistralSongCone() : base(ActionID.MakeSpell(AID.MistralSongCone), new AOEShapeCone(21.7f, 45.Degrees())) { } // TODO: verify angle -} +class P5MistralSongCone(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.MistralSongCone), new AOEShapeCone(21.7f, 45.Degrees())); // TODO: verify angle -class P5AetherochemicalLaserCenter : Components.SelfTargetedAOEs -{ - public P5AetherochemicalLaserCenter() : base(ActionID.MakeSpell(AID.AetherochemicalLaserCenter), new AOEShapeRect(46, 4, 6)) { } -} +class P5AetherochemicalLaserCenter(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.AetherochemicalLaserCenter), new AOEShapeRect(46, 4, 6)); -class P5AetherochemicalLaserRight : Components.SelfTargetedAOEs -{ - public P5AetherochemicalLaserRight() : base(ActionID.MakeSpell(AID.AetherochemicalLaserRight), new AOEShapeRect(46, 4, 6)) { } -} +class P5AetherochemicalLaserRight(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.AetherochemicalLaserRight), new AOEShapeRect(46, 4, 6)); -class P5AetherochemicalLaserLeft : Components.SelfTargetedAOEs -{ - public P5AetherochemicalLaserLeft() : base(ActionID.MakeSpell(AID.AetherochemicalLaserLeft), new AOEShapeRect(46, 4, 6)) { } -} +class P5AetherochemicalLaserLeft(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.AetherochemicalLaserLeft), new AOEShapeRect(46, 4, 6)); // TODO: consider showing circle around baiter -class P5LightPillar : Components.LocationTargetedAOEs -{ - public P5LightPillar() : base(ActionID.MakeSpell(AID.LightPillarAOE), 3) { } -} +class P5LightPillar(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.LightPillarAOE), 3); -class P5AethericBoom : Components.KnockbackFromCastTarget -{ - public P5AethericBoom() : base(ActionID.MakeSpell(AID.AethericBoom), 10) { } -} +class P5AethericBoom(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.AethericBoom), 10); [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.Garuda, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 539)] diff --git a/BossMod/Modules/Stormblood/Ultimate/UWU/UWUStates.cs b/BossMod/Modules/Stormblood/Ultimate/UWU/UWUStates.cs index d620cd5436..ea9f83b181 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UWU/UWUStates.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UWU/UWUStates.cs @@ -139,7 +139,7 @@ private void P1AwakenedWickedWheelDownburst(uint id, float delay) { ActorCast(id, _module.Garuda, AID.WickedWheel, delay, 3, true, "Out") .ActivateOnEnter(); - ComponentCondition(id + 2, 2.1f, comp => comp.NumCasts >= 2 || comp.Sources.Count == 0 && _module.WorldState.CurrentTime >= comp.AwakenedResolve, "In") // complicated condition handles fucked up awakening + ComponentCondition(id + 2, 2.1f, comp => comp.NumCasts >= 2 || comp.Sources.Count == 0 && _WorldState.CurrentTime >= comp.AwakenedResolve, "In") // complicated condition handles fucked up awakening .DeactivateOnExit(); ComponentCondition(id + 0x10, 2.8f, comp => comp.NumCasts > 0, "Cleave") .ActivateOnEnter() diff --git a/BossMod/Modules/StrikingDummy.cs b/BossMod/Modules/StrikingDummy.cs index 6db96c6154..64b9b214ec 100644 --- a/BossMod/Modules/StrikingDummy.cs +++ b/BossMod/Modules/StrikingDummy.cs @@ -14,9 +14,6 @@ public StrikingDummyStates(BossModule module) : base(module) } } - public class StrikingDummy : SimpleBossModule - { - public StrikingDummy(WorldState ws, Actor primary) : base(ws, primary) { } - } + public class StrikingDummy(WorldState ws, Actor primary) : SimpleBossModule(ws, primary); } #endif From 743c294acb029e61dbe4693c29d47d81d3550aa5 Mon Sep 17 00:00:00 2001 From: Andrew Gilewsky Date: Tue, 9 Apr 2024 10:54:38 +0100 Subject: [PATCH 10/18] ARR/SB/ShB to go... --- .../P5SProtoCarbuncle/StarvingStampede.cs | 6 +- .../Ultimate/TOP/CommonAssignments.cs | 12 +-- .../Endwalker/Ultimate/TOP/P1Pantokrator.cs | 18 ++--- .../Endwalker/Ultimate/TOP/P1ProgramLoop.cs | 36 +++++---- .../Ultimate/TOP/P2LimitlessSynergy.cs | 14 ++-- .../Endwalker/Ultimate/TOP/P2PartySynergy.cs | 75 +++++++++---------- .../Endwalker/Ultimate/TOP/P3HelloWorld.cs | 42 +++++------ .../Endwalker/Ultimate/TOP/P3Intermission.cs | 38 +++++----- .../Ultimate/TOP/P3OversampledWaveCannon.cs | 32 ++++---- .../Endwalker/Ultimate/TOP/P4WaveCannon.cs | 17 +++-- .../Modules/Endwalker/Ultimate/TOP/P5Delta.cs | 51 +++++++------ .../Ultimate/TOP/P5NearDistantWorld.cs | 22 +++--- .../Modules/Endwalker/Ultimate/TOP/P5Omega.cs | 41 +++++----- .../Modules/Endwalker/Ultimate/TOP/P5Sigma.cs | 55 +++++++------- .../Endwalker/Ultimate/TOP/P5SolarRay.cs | 6 +- .../Endwalker/Ultimate/TOP/P6CosmoArrow.cs | 2 +- .../Endwalker/Ultimate/TOP/P6CosmoDive.cs | 6 +- .../Endwalker/Ultimate/TOP/P6CosmoMeteor.cs | 11 ++- .../Endwalker/Ultimate/TOP/P6FlashGale.cs | 4 +- .../Endwalker/Ultimate/TOP/P6WaveCannon.cs | 15 +--- BossMod/Modules/Endwalker/Ultimate/TOP/TOP.cs | 7 +- .../Endwalker/Ultimate/TOP/TOPConfig.cs | 4 +- .../Endwalker/Ultimate/TOP/TOPStates.cs | 10 +-- .../Endwalker/Unreal/Un1Ultima/Garuda.cs | 14 ++-- .../Endwalker/Unreal/Un1Ultima/Mechanics.cs | 40 +++++----- .../Endwalker/Unreal/Un1Ultima/TitanIfrit.cs | 6 +- .../Endwalker/Unreal/Un1Ultima/Un1Ultima.cs | 2 +- .../Endwalker/Unreal/Un2Sephirot/EinSof.cs | 6 +- .../Unreal/Un2Sephirot/P1FiendishRage.cs | 6 +- .../Endwalker/Unreal/Un2Sephirot/P1Ratzon.cs | 6 +- .../Endwalker/Unreal/Un2Sephirot/P3Daat.cs | 6 +- .../Unreal/Un2Sephirot/P3Earthshaker.cs | 11 +-- .../Unreal/Un2Sephirot/P3FiendishWail.cs | 6 +- .../Unreal/Un2Sephirot/P3GevurahChesed.cs | 6 +- .../Unreal/Un2Sephirot/Un2Sephirot.cs | 17 +---- .../Unreal/Un3Sophia/ArmsOfWisdom.cs | 6 +- .../Endwalker/Unreal/Un3Sophia/Demiurges.cs | 18 ++--- .../Endwalker/Unreal/Un3Sophia/Pairs.cs | 10 +-- .../Endwalker/Unreal/Un3Sophia/Tilt.cs | 12 ++- .../Endwalker/Unreal/Un3Sophia/Un3Sophia.cs | 15 +--- .../Endwalker/Unreal/Un4Zurvan/P1Platforms.cs | 4 +- .../Endwalker/Unreal/Un4Zurvan/P2Adds.cs | 16 +--- .../Unreal/Un4Zurvan/P2BrokenSeal.cs | 18 ++--- .../Unreal/Un4Zurvan/P2DemonsClaw.cs | 8 +- .../Endwalker/Unreal/Un4Zurvan/P2Eidos.cs | 2 +- .../Endwalker/Unreal/Un4Zurvan/P2Soar.cs | 10 +-- .../Endwalker/Unreal/Un4Zurvan/Un4Zurvan.cs | 15 +--- .../Unreal/Un5Thordan/BurningChains.cs | 49 ------------ .../Unreal/Un5Thordan/DragonsGaze.cs | 8 +- .../Unreal/Un5Thordan/HolyShieldBash.cs | 8 +- .../Unreal/Un5Thordan/Intermission2.cs | 8 +- .../Unreal/Un5Thordan/Intermission3.cs | 15 +--- .../Unreal/Un5Thordan/LightningStorm.cs | 4 +- .../Unreal/Un5Thordan/SpiralThrust.cs | 9 +-- .../Endwalker/Unreal/Un5Thordan/Un5Thordan.cs | 16 +--- .../TheSliceIsRight/TheSliceIsRight.cs | 10 +-- .../Global/MaskedCarnivale/ObstacleLayouts.cs | 30 ++++---- .../Stage01AllsWellThatStartsWell/Stage01.cs | 2 +- .../Stage02MuchAdoAboutPudding/Stage02Act1.cs | 4 +- .../Stage02MuchAdoAboutPudding/Stage02Act2.cs | 2 +- .../Stage03WaitingForGolem/Stage03.cs | 4 +- .../Stage04Act1.cs | 4 +- .../Stage04Act2.cs | 4 +- .../Stage05TheThreepennyTurtles/Stage05.cs | 2 +- .../Stage06EyeSociety/Stage06Act1.cs | 18 ++--- .../Stage06EyeSociety/Stage06Act2.cs | 28 +++---- .../Stage07AChorusSlime/Stage07Act1.cs | 12 +-- .../Stage07AChorusSlime/Stage07Act2.cs | 14 ++-- .../Stage07AChorusSlime/Stage07Act3.cs | 12 +-- .../Stage08BombedyOfErrors/Stage08Act1.cs | 33 ++++---- .../Stage08BombedyOfErrors/Stage08Act2.cs | 26 +++---- .../Stage09ToKillAMockingslime/Stage09.cs | 2 +- .../Stage10ALittleKnightMusic/Stage10.cs | 21 ++---- .../Stage11Act1.cs | 3 +- .../Stage11Act2.cs | 3 +- .../Stage12Act1.cs | 3 +- .../Stage12Act2.cs | 5 +- .../Stage13BeautyAndABeast/Stage13Act1.cs | 2 +- .../Stage13BeautyAndABeast/Stage13Act2.cs | 10 +-- .../Stage14BlobsInTheWoods/Stage14Act1.cs | 4 +- .../Stage14BlobsInTheWoods/Stage14Act2.cs | 4 +- .../Stage15TheMeNobodyNodes/Stage15.cs | 10 +-- .../Stage16SunsetBullevard/Stage16Act1.cs | 2 +- .../Stage16SunsetBullevard/Stage16Act2.cs | 11 +-- .../Stage17TheSwordOfMusic/Stage17Act1.cs | 10 +-- .../Stage17TheSwordOfMusic/Stage17Act2.cs | 17 ++--- .../Stage18Act1.cs | 29 +++---- .../Stage18Act2.cs | 25 +++---- .../Stage19Act1.cs | 6 +- .../Stage19Act2.cs | 12 +-- .../Stage20MissTyphon/Stage20Act1.cs | 5 +- .../Stage20MissTyphon/Stage20Act2.cs | 6 +- .../Stage20MissTyphon/Stage20Act3.cs | 11 +-- .../Stage21Act1.cs | 5 +- .../Stage21Act2.cs | 11 +-- .../Stage22HereComesTheBoom/Stage22Act1.cs | 5 +- .../Stage22HereComesTheBoom/Stage22Act2.cs | 18 ++--- .../Stage23BehemothsAndBroomsticks/Stage23.cs | 7 +- .../Stage24Act1.cs | 12 ++- .../Stage24Act2.cs | 16 ++-- .../Stage24Act3.cs | 23 +++--- .../Stage25Act1.cs | 12 +-- .../Stage25Act2.cs | 14 ++-- .../Stage25Act3.cs | 20 ++--- .../Stage26PapaMia/Stage26Act1.cs | 10 +-- .../Stage26PapaMia/Stage26Act2.cs | 15 ++-- .../Stage27LockUpYourSnorters/Stage27.cs | 28 +++---- .../Global/PVP/HiddenGorge/GoblinMercenary.cs | 20 +++-- .../Modules/Global/Quest/FF15Collab/Garuda.cs | 45 +++++------ .../Global/Quest/FF15Collab/Iseultalon.cs | 24 +++--- .../Modules/Global/Quest/FF15Collab/MA-x.cs | 6 +- .../Global/Quest/FF16Collab/InfernalShadow.cs | 43 +++++------ .../PalaceOfTheDead/D60TheBlackRider.cs | 8 +- .../DeepDungeon/PalaceOfTheDead/D70Yaquaru.cs | 7 +- .../DeepDungeon/PalaceOfTheDead/D80Gudanna.cs | 6 +- .../Extreme/Ex1Ultima/AethericBoom.cs | 2 +- .../RealmReborn/Extreme/Ex1Ultima/Freefire.cs | 4 +- .../Ex1Ultima/MistralSongVulcanBurst.cs | 4 +- .../Extreme/Ex1Ultima/TankPurge.cs | 2 +- .../Extreme/Ex2Garuda/WickedWheel.cs | 2 +- .../Extreme/Ex3Titan/MountainBuster.cs | 4 +- .../RealmReborn/Extreme/Ex3Titan/Tumult.cs | 2 +- .../RealmReborn/Extreme/Ex4Ifrit/Eruption.cs | 2 +- .../Extreme/Ex4Ifrit/Ex4IfritAI.cs | 10 +-- .../Extreme/Ex4Ifrit/SearingWind.cs | 2 +- .../Raid/T01Caduceus/T01Caduceus.cs | 2 +- .../RealmReborn/Raid/T05Twintania/Common.cs | 4 +- .../RealmReborn/Raid/T05Twintania/Phase3.cs | 2 +- .../RealmReborn/Raid/T05Twintania/Phase5.cs | 2 +- .../T04PortaDecumana/T04PortaDecumana2.cs | 2 +- .../Trial/T08ThornmarchH/MoogleGoRound.cs | 2 +- .../Dungeon/D01Holminster/D013Philia.cs | 2 +- .../D03QitanaRavel/D030RonkanDreamer.cs | 2 +- .../Dungeon/D03QitanaRavel/D031Lozatl.cs | 2 +- .../Dungeon/D03QitanaRavel/D033Eros.cs | 6 +- .../D05MtGulg/D055ForgivenObscenity.cs | 6 +- .../CE41WithDiremiteAndMain.cs | 2 +- .../CriticalEngagement/CE52TimeToBurn.cs | 4 +- .../CE53HereComesTheCavalry.cs | 2 +- .../CriticalEngagement/CE54NeverCryWolf.cs | 4 +- .../DelubrumReginae/DRS3Dahu/SpitFlame.cs | 2 +- .../DelubrumReginae/DRS5Phantom/Miasma.cs | 2 +- .../DRS7StygimolochLord/CrushingHoof.cs | 2 +- .../Duel/Duel2Lyon/Duel2LyonGenericAttacks.cs | 2 +- .../Foray/Duel/Duel4Dabog/RightArmComet.cs | 2 +- .../Shadowbringers/Hunt/RankS/Ixtab.cs | 2 +- .../SecretBasket.cs | 4 +- .../SecretWorm.cs | 2 +- .../AltarAiravata.cs | 4 +- .../TheShiftingAltarsOfUznair/AltarChimera.cs | 2 +- .../AltarDiresaur.cs | 2 +- .../TheShiftingAltarsOfUznair/AltarTotem.cs | 2 +- .../Stormblood/Ultimate/UCOB/P2Heavensfall.cs | 2 +- .../Stormblood/Ultimate/UCOB/P3EarthShaker.cs | 2 +- .../Ultimate/UCOB/P3HeavensfallTrio.cs | 2 +- .../Ultimate/UWU/P2CrimsonCyclone.cs | 2 +- .../Stormblood/Ultimate/UWU/P2Eruption.cs | 2 +- TODO | 4 + 158 files changed, 711 insertions(+), 1071 deletions(-) delete mode 100644 BossMod/Modules/Endwalker/Unreal/Un5Thordan/BurningChains.cs diff --git a/BossMod/Modules/Endwalker/Savage/P5SProtoCarbuncle/StarvingStampede.cs b/BossMod/Modules/Endwalker/Savage/P5SProtoCarbuncle/StarvingStampede.cs index 87f8f73a9f..23fbea6058 100644 --- a/BossMod/Modules/Endwalker/Savage/P5SProtoCarbuncle/StarvingStampede.cs +++ b/BossMod/Modules/Endwalker/Savage/P5SProtoCarbuncle/StarvingStampede.cs @@ -1,13 +1,11 @@ namespace BossMod.Endwalker.Savage.P5SProtoCarbuncle; -class StarvingStampede : Components.GenericAOEs +class StarvingStampede(BossModule module) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.StarvingStampede)) { private List _positions = new(); private static readonly AOEShape _shape = new AOEShapeCircle(12); - public StarvingStampede() : base(ActionID.MakeSpell(AID.StarvingStampede)) { } - public override IEnumerable ActiveAOEs(int slot, Actor actor) { // TODO: timings... @@ -16,7 +14,7 @@ public override IEnumerable ActiveAOEs(int slot, Actor actor) public override void OnEventCast(Actor caster, ActorCastEvent spell) { - base.OnEventCast(module, caster, spell); + base.OnEventCast(caster, spell); switch ((AID)spell.Action.ID) { case AID.JawsTeleport: diff --git a/BossMod/Modules/Endwalker/Ultimate/TOP/CommonAssignments.cs b/BossMod/Modules/Endwalker/Ultimate/TOP/CommonAssignments.cs index 0bffd923ba..94cadc8717 100644 --- a/BossMod/Modules/Endwalker/Ultimate/TOP/CommonAssignments.cs +++ b/BossMod/Modules/Endwalker/Ultimate/TOP/CommonAssignments.cs @@ -1,7 +1,7 @@ namespace BossMod.Endwalker.Ultimate.TOP; // common assignments for multiple mechanics in the fight -abstract class CommonAssignments : BossComponent +abstract class CommonAssignments(BossModule module) : BossComponent(module) { public struct PlayerState { @@ -27,7 +27,7 @@ public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot protected abstract (GroupAssignmentUnique assignment, bool global) Assignments(); - protected void Assign(BossModule module, Actor player, int order) + protected void Assign(Actor player, int order) { if (order > 0) { @@ -35,11 +35,11 @@ protected void Assign(BossModule module, Actor player, int order) if (slot >= 0) PlayerStates[slot].Order = order; if (++_numOrdersAssigned == PartyState.MaxPartySize) - InitAssignments(module); + InitAssignments(); } } - private void InitAssignments(BossModule module) + private void InitAssignments() { var (ca, global) = Assignments(); List<(int slot, int group, int priority, int order)> assignments = new(); @@ -67,7 +67,7 @@ private void InitAssignments(BossModule module) } // common assignments for program loop & pantokrator -abstract class P1CommonAssignments : CommonAssignments +abstract class P1CommonAssignments(BossModule module) : CommonAssignments(module) { public override void OnStatusGain(Actor actor, ActorStatus status) { @@ -79,6 +79,6 @@ public override void OnStatusGain(Actor actor, ActorStatus status) SID.InLine4 => 4, _ => 0 }; - Assign(module, actor, order); + Assign(actor, order); } } diff --git a/BossMod/Modules/Endwalker/Ultimate/TOP/P1Pantokrator.cs b/BossMod/Modules/Endwalker/Ultimate/TOP/P1Pantokrator.cs index 73a58a47c3..a2fb963aca 100644 --- a/BossMod/Modules/Endwalker/Ultimate/TOP/P1Pantokrator.cs +++ b/BossMod/Modules/Endwalker/Ultimate/TOP/P1Pantokrator.cs @@ -17,7 +17,7 @@ public override IEnumerable ActiveAOEs(int slot, Actor actor) yield return new(_shape, c.Position, c.CastInfo!.Rotation, c.CastInfo.NPCFinishAt, ArenaColor.Danger, true); } - public override void Init(BossModule module) + public P1FlameThrower(BossModule module) : base(module) { _pantokrator = module.FindComponent(); } @@ -41,7 +41,7 @@ public override void DrawArenaForeground(int pcSlot, Actor pc) }; var offset = 12 * (Module.PrimaryActor.Rotation + dir).ToDirection(); var pos = group == 1 ? Module.Bounds.Center + offset : Module.Bounds.Center - offset; - arena.AddCircle(pos, 1, ArenaColor.Safe); + Arena.AddCircle(pos, 1, ArenaColor.Safe); } } @@ -64,7 +64,7 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } } -class P1Pantokrator : P1CommonAssignments +class P1Pantokrator(BossModule module) : P1CommonAssignments(module) { public int NumSpreadsDone { get; private set; } public int NumStacksDone { get; private set; } @@ -80,7 +80,7 @@ protected override (GroupAssignmentUnique assignment, bool global) Assignments() public override void AddHints(int slot, Actor actor, TextHints hints) { - base.AddHints(module, slot, actor, hints, movementHints); + base.AddHints(slot, actor, hints); var ps = PlayerStates[slot]; if (ps.Order == 0) @@ -110,11 +110,11 @@ public override void DrawArenaForeground(int pcSlot, Actor pc) var order = PlayerStates[i].Order; if (order == spreadOrder) { - arena.AddCircle(p.Position, _spreadRadius, i == pcSlot ? ArenaColor.Safe : ArenaColor.Danger); + Arena.AddCircle(p.Position, _spreadRadius, i == pcSlot ? ArenaColor.Safe : ArenaColor.Danger); } else if (order == stackOrder) { - _stackShape.Outline(arena, Module.PrimaryActor.Position, Angle.FromDirection(p.Position - Module.PrimaryActor.Position), i == pcSlot ? ArenaColor.Safe : ArenaColor.Danger); + _stackShape.Outline(Arena, Module.PrimaryActor.Position, Angle.FromDirection(p.Position - Module.PrimaryActor.Position), i == pcSlot ? ArenaColor.Safe : ArenaColor.Danger); } } } @@ -149,9 +149,7 @@ class P1DiffuseWaveCannonKyrios : Components.GenericBaitAway { private static readonly AOEShape _shape = new AOEShapeCone(60, 60.Degrees()); // TODO: verify angle - public P1DiffuseWaveCannonKyrios() : base(ActionID.MakeSpell(AID.DiffuseWaveCannonKyrios)) { } - - public override void Init(BossModule module) + public P1DiffuseWaveCannonKyrios(BossModule module) : base(module, ActionID.MakeSpell(AID.DiffuseWaveCannonKyrios)) { ForbiddenPlayers = Raid.WithSlot().WhereActor(a => a.Role != Role.Tank).Mask(); } @@ -163,7 +161,7 @@ public override void Update() } } -class P1WaveCannonKyrios : Components.GenericBaitAway +class P1WaveCannonKyrios(BossModule module) : Components.GenericBaitAway(module) { private static readonly AOEShapeRect _shape = new(50, 3); diff --git a/BossMod/Modules/Endwalker/Ultimate/TOP/P1ProgramLoop.cs b/BossMod/Modules/Endwalker/Ultimate/TOP/P1ProgramLoop.cs index 38ba991f3d..c43e8bf8bd 100644 --- a/BossMod/Modules/Endwalker/Ultimate/TOP/P1ProgramLoop.cs +++ b/BossMod/Modules/Endwalker/Ultimate/TOP/P1ProgramLoop.cs @@ -1,6 +1,6 @@ namespace BossMod.Endwalker.Ultimate.TOP; -class P1ProgramLoop : P1CommonAssignments +class P1ProgramLoop(BossModule module) : P1CommonAssignments(module) { public int NumTowersDone { get; private set; } public int NumTethersDone { get; private set; } @@ -18,7 +18,7 @@ protected override (GroupAssignmentUnique assignment, bool global) Assignments() public override void AddHints(int slot, Actor actor, TextHints hints) { - base.AddHints(module, slot, actor, hints, movementHints); + base.AddHints(slot, actor, hints); var order = PlayerStates[slot].Order; if (order == 0) @@ -48,26 +48,24 @@ public override void AddHints(int slot, Actor actor, TextHints hints) } public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) - { - return PlayerStates[playerSlot].Order == PlayerStates[pcSlot].Order % 4 + 1 ? PlayerPriority.Interesting : base.CalcPriority(module, pcSlot, pc, playerSlot, player, ref customColor); - } + => PlayerStates[playerSlot].Order == PlayerStates[pcSlot].Order % 4 + 1 ? PlayerPriority.Interesting : base.CalcPriority(pcSlot, pc, playerSlot, player, ref customColor); public override void DrawArenaForeground(int pcSlot, Actor pc) { var ps = PlayerStates[pcSlot]; bool soakTowers = ps.Order == NextTowersOrder(); - var towerToSoak = soakTowers ? SelectTowerForGroup(module, ps.Group) : null; + var towerToSoak = soakTowers ? SelectTowerForGroup(ps.Group) : null; foreach (var t in _towers.Skip(NumTowersDone).Take(2)) { - arena.AddCircle(t.Position, _towerRadius, soakTowers && (towerToSoak == null || towerToSoak == t) ? ArenaColor.Safe : ArenaColor.Danger, 2); + Arena.AddCircle(t.Position, _towerRadius, soakTowers && (towerToSoak == null || towerToSoak == t) ? ArenaColor.Safe : ArenaColor.Danger, 2); } if (ps.Order == NextTowersOrder(1)) { // show next tower to soak if possible - var futureTowerToSoak = SelectTowerForGroup(module, ps.Group, 1); + var futureTowerToSoak = SelectTowerForGroup(ps.Group, 1); if (futureTowerToSoak != null) - arena.AddCircle(futureTowerToSoak.Position, _towerRadius, ArenaColor.Safe); + Arena.AddCircle(futureTowerToSoak.Position, _towerRadius, ArenaColor.Safe); } bool grabThisTether = ps.Order == NextTethersOrder(); @@ -77,16 +75,16 @@ public override void DrawArenaForeground(int pcSlot, Actor pc) var ts = PlayerStates[s]; bool correctSoaker = ts.Order == NextTethersOrder(); bool tetherToGrab = ts.Group == ps.Group && (grabNextTether ? correctSoaker : grabThisTether ? NumTethersDone > 0 && ts.Order == NextTethersOrder(-1) : false); - arena.AddCircle(t.Position, _tetherRadius, t == pc ? ArenaColor.Safe : ArenaColor.Danger); - arena.AddLine(t.Position, Module.PrimaryActor.Position, correctSoaker ? ArenaColor.Safe : ArenaColor.Danger, tetherToGrab ? 2 : 1); + Arena.AddCircle(t.Position, _tetherRadius, t == pc ? ArenaColor.Safe : ArenaColor.Danger); + Arena.AddLine(t.Position, Module.PrimaryActor.Position, correctSoaker ? ArenaColor.Safe : ArenaColor.Danger, tetherToGrab ? 2 : 1); } if (grabThisTether && NumTethersDone == NumTowersDone) { // show hint for tether position - var spot = GetTetherDropSpot(module, ps.Group); + var spot = GetTetherDropSpot(ps.Group); if (spot != null) - arena.AddCircle(spot.Value, 1, ArenaColor.Safe); + Arena.AddCircle(spot.Value, 1, ArenaColor.Safe); } } @@ -135,7 +133,7 @@ private int NextTethersOrder(int skip = 0) } // 0 = N, 1 = E, ... (CW) - private int ClassifyTower(BossModule module, Actor tower) + private int ClassifyTower(Actor tower) { var offset = tower.Position - Module.Bounds.Center; if (Math.Abs(offset.Z) > Math.Abs(offset.X)) @@ -144,26 +142,26 @@ private int ClassifyTower(BossModule module, Actor tower) return offset.X > 0 ? 1 : 3; } - private Actor? SelectTowerForGroup(BossModule module, int group, int skip = 0) + private Actor? SelectTowerForGroup(int group, int skip = 0) { var firstIndex = NumTowersDone + skip * 2; if (group == 0 || _towers.Count < firstIndex + 2) return null; var t1 = _towers[firstIndex]; var t2 = _towers[firstIndex + 1]; - if (ClassifyTower(module, t2) < ClassifyTower(module, t1)) + if (ClassifyTower(t2) < ClassifyTower(t1)) Utils.Swap(ref t1, ref t2); return group == 1 ? t1 : t2; } - private WPos? GetTetherDropSpot(BossModule module, int group) + private WPos? GetTetherDropSpot(int group) { if (group == 0 || _towers.Count < NumTowersDone + 2) return null; var safeSpots = new BitMask(0xF); - safeSpots.Clear(ClassifyTower(module, _towers[NumTowersDone])); - safeSpots.Clear(ClassifyTower(module, _towers[NumTowersDone + 1])); + safeSpots.Clear(ClassifyTower(_towers[NumTowersDone])); + safeSpots.Clear(ClassifyTower(_towers[NumTowersDone + 1])); var spot = group == 1 ? safeSpots.LowestSetBit() : safeSpots.HighestSetBit(); return Module.Bounds.Center + 18 * (180.Degrees() - 90.Degrees() * spot).ToDirection(); } diff --git a/BossMod/Modules/Endwalker/Ultimate/TOP/P2LimitlessSynergy.cs b/BossMod/Modules/Endwalker/Ultimate/TOP/P2LimitlessSynergy.cs index b5a8d66132..657e971d68 100644 --- a/BossMod/Modules/Endwalker/Ultimate/TOP/P2LimitlessSynergy.cs +++ b/BossMod/Modules/Endwalker/Ultimate/TOP/P2LimitlessSynergy.cs @@ -4,15 +4,13 @@ class P2OptimizedBladedance : Components.BaitAwayTethers { - public P2OptimizedBladedance() : base(new AOEShapeCone(100, 45.Degrees()), (uint)TetherID.OptimizedBladedance, ActionID.MakeSpell(AID.OptimizedBladedanceAOE)) { } - - public override void Init(BossModule module) + public P2OptimizedBladedance(BossModule module) : base(module, new AOEShapeCone(100, 45.Degrees()), (uint)TetherID.OptimizedBladedance, ActionID.MakeSpell(AID.OptimizedBladedanceAOE)) { ForbiddenPlayers = Raid.WithSlot(true).WhereActor(p => p.Role != Role.Tank).Mask(); } } -class P2BeyondDefense : Components.UniformStackSpread +class P2BeyondDefense(BossModule module) : Components.UniformStackSpread(module, 6, 5, 3, alwaysShowSpreads: true) { public enum Mechanic { None, Spread, Stack } @@ -21,8 +19,6 @@ public enum Mechanic { None, Spread, Stack } private DateTime _activation; private BitMask _forbiddenStack; - public P2BeyondDefense() : base(6, 5, 3, alwaysShowSpreads: true) { } - public override void Update() { Stacks.Clear(); @@ -44,8 +40,8 @@ public override void Update() public override void DrawArenaForeground(int pcSlot, Actor pc) { - arena.Actor(_source, ArenaColor.Object, true); - base.DrawArenaForeground(module, pcSlot, pc, arena); + Arena.Actor(_source, ArenaColor.Object, true); + base.DrawArenaForeground(pcSlot, pc); } public override void OnCastStarted(Actor caster, ActorCastInfo spell) @@ -82,7 +78,7 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) class P2CosmoMemory(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.CosmoMemoryAOE)); -class P2OptimizedPassageOfArms : BossComponent +class P2OptimizedPassageOfArms(BossModule module) : BossComponent(module) { public Actor? _invincible; diff --git a/BossMod/Modules/Endwalker/Ultimate/TOP/P2PartySynergy.cs b/BossMod/Modules/Endwalker/Ultimate/TOP/P2PartySynergy.cs index 544ee0f1c2..ba20e4114c 100644 --- a/BossMod/Modules/Endwalker/Ultimate/TOP/P2PartySynergy.cs +++ b/BossMod/Modules/Endwalker/Ultimate/TOP/P2PartySynergy.cs @@ -1,6 +1,6 @@ namespace BossMod.Endwalker.Ultimate.TOP; -class P2PartySynergy : CommonAssignments +class P2PartySynergy(BossModule module) : CommonAssignments(module) { public enum Glitch { Unknown, Mid, Remote } @@ -21,8 +21,8 @@ public override void AddGlobalHints(GlobalHints hints) public override void AddHints(int slot, Actor actor, TextHints hints) { - base.AddHints(module, slot, actor, hints, movementHints); - if (EnableDistanceHints && FindPartner(module, slot) is var partner && partner != null) + base.AddHints(slot, actor, hints); + if (EnableDistanceHints && FindPartner(slot) is var partner && partner != null) { var distSq = (partner.Position - actor.Position).LengthSq(); var range = DistanceRange; @@ -35,12 +35,12 @@ public override void AddHints(int slot, Actor actor, TextHints hints) public override void DrawArenaForeground(int pcSlot, Actor pc) { - var partner = FindPartner(module, pcSlot); + var partner = FindPartner(pcSlot); if (partner != null) { var distSq = (partner.Position - pc.Position).LengthSq(); var range = DistanceRange; - arena.AddLine(pc.Position, partner.Position, distSq < range.min * range.min || distSq > range.max * range.max ? ArenaColor.Danger : ArenaColor.Safe); + Arena.AddLine(pc.Position, partner.Position, distSq < range.min * range.min || distSq > range.max * range.max ? ArenaColor.Danger : ArenaColor.Safe); } } @@ -68,10 +68,10 @@ public override void OnEventIcon(Actor actor, uint iconID) IconID.PartySynergyTriangle => 4, _ => 0 }; - Assign(module, actor, order); + Assign(actor, order); } - private Actor? FindPartner(BossModule module, int slot) + private Actor? FindPartner(int slot) { var ps = PlayerStates[slot]; var partnerSlot = ps.Order > 0 ? Array.FindIndex(PlayerStates, s => s.Order == ps.Order && s.Group != ps.Group) : -1; @@ -86,7 +86,7 @@ public override void OnEventIcon(Actor actor, uint iconID) }; } -class P2PartySynergyDoubleAOEs : Components.GenericAOEs +class P2PartySynergyDoubleAOEs(BossModule module) : Components.GenericAOEs(module) { public List AOEs = new(); @@ -131,9 +131,10 @@ public override void OnActorPlayActionTimelineEvent(Actor actor, ushort id) class P2PartySynergyOptimizedFire : Components.UniformStackSpread { - public P2PartySynergyOptimizedFire() : base(0, 7, alwaysShowSpreads: true) { } - - public override void Init(BossModule module) => AddSpreads(Raid.WithoutSlot(true)); + public P2PartySynergyOptimizedFire(BossModule module) : base(module, 0, 7, alwaysShowSpreads: true) + { + AddSpreads(Raid.WithoutSlot(true)); + } public override void OnEventCast(Actor caster, ActorCastEvent spell) { @@ -150,9 +151,13 @@ class P2PartySynergyOpticalLaser : Components.GenericAOEs private static readonly AOEShapeRect _shape = new(100, 8); - public P2PartySynergyOpticalLaser() : base(ActionID.MakeSpell(AID.OpticalLaser)) { } + public P2PartySynergyOpticalLaser(BossModule module) : base(module, ActionID.MakeSpell(AID.OpticalLaser)) + { + _synergy = module.FindComponent(); + _source = module.Enemies(OID.OpticalUnit).FirstOrDefault(); + } - public void Show(BossModule module) + public void Show() { _activation = WorldState.FutureTime(6.8f); } @@ -163,21 +168,15 @@ public override IEnumerable ActiveAOEs(int slot, Actor actor) yield return new(_shape, _source.Position, _source.Rotation, _activation); } - public override void Init(BossModule module) - { - _synergy = module.FindComponent(); - _source = module.Enemies(OID.OpticalUnit).FirstOrDefault(); - } - public override void DrawArenaForeground(int pcSlot, Actor pc) { - arena.Actor(_source, ArenaColor.Object, true); - var pos = AssignedPosition(module, pcSlot); + Arena.Actor(_source, ArenaColor.Object, true); + var pos = AssignedPosition(pcSlot); if (pos != default) - arena.AddCircle(Module.Bounds.Center + pos, 1, ArenaColor.Safe); + Arena.AddCircle(Module.Bounds.Center + pos, 1, ArenaColor.Safe); } - private WDir AssignedPosition(BossModule module, int slot) + private WDir AssignedPosition(int slot) { if (_synergy == null || _source == null || _activation == default) return new(); @@ -200,10 +199,8 @@ private WDir AssignedPosition(BossModule module, int slot) } } -class P2PartySynergyDischarger : Components.Knockback +class P2PartySynergyDischarger(BossModule module) : Components.Knockback(module, ActionID.MakeSpell(AID.Discharger)) { - public P2PartySynergyDischarger() : base(ActionID.MakeSpell(AID.Discharger)) { } - public override IEnumerable Sources(int slot, Actor actor) { yield return new(Module.Bounds.Center, 13); // TODO: activation @@ -221,14 +218,7 @@ class P2PartySynergyEfficientBladework : Components.GenericAOEs private static readonly AOEShapeCircle _shape = new(10); - public override IEnumerable ActiveAOEs(int slot, Actor actor) - { - if (_activation != default) - foreach (var s in _sources) - yield return new(_shape, s.Position, new(), _activation); - } - - public override void Init(BossModule module) + public P2PartySynergyEfficientBladework(BossModule module) : base(module) { _synergy = module.FindComponent(); _sources.AddRange(module.Enemies(OID.OmegaF)); @@ -237,6 +227,13 @@ public override void Init(BossModule module) _firstGroup = Raid.WithSlot(true).WhereSlot(s => _synergy.PlayerStates[s].Group == 1).Mask(); } + public override IEnumerable ActiveAOEs(int slot, Actor actor) + { + if (_activation != default) + foreach (var s in _sources) + yield return new(_shape, s.Position, new(), _activation); + } + public override void AddGlobalHints(GlobalHints hints) { if (_swaps.Length > 0) @@ -245,9 +242,9 @@ public override void AddGlobalHints(GlobalHints hints) public override void DrawArenaForeground(int pcSlot, Actor pc) { - var pos = AssignedPosition(module, pcSlot); + var pos = AssignedPosition(pcSlot); if (pos != default) - arena.AddCircle(Module.Bounds.Center + pos, 1, ArenaColor.Safe); + Arena.AddCircle(Module.Bounds.Center + pos, 1, ArenaColor.Safe); } public override void OnActorPlayActionTimelineEvent(Actor actor, ushort id) @@ -305,7 +302,7 @@ public override void OnEventIcon(Actor actor, uint iconID) } } - private WDir AssignedPosition(BossModule module, int slot) + private WDir AssignedPosition(int slot) { if (_activation == default || _synergy == null || _sources.Count == 0) return new(); @@ -316,12 +313,10 @@ private WDir AssignedPosition(BossModule module, int slot) } } -class P2PartySynergySpotlight : Components.UniformStackSpread +class P2PartySynergySpotlight(BossModule module) : Components.UniformStackSpread(module, 6, 0, 4, 4) { private List _stackTargets = new(); // don't show anything until knockbacks are done, to reduce visual clutter - public P2PartySynergySpotlight() : base(6, 0, 4, 4) { } - public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.Spotlight) diff --git a/BossMod/Modules/Endwalker/Ultimate/TOP/P3HelloWorld.cs b/BossMod/Modules/Endwalker/Ultimate/TOP/P3HelloWorld.cs index b94c902ca7..191598a274 100644 --- a/BossMod/Modules/Endwalker/Ultimate/TOP/P3HelloWorld.cs +++ b/BossMod/Modules/Endwalker/Ultimate/TOP/P3HelloWorld.cs @@ -1,6 +1,6 @@ namespace BossMod.Endwalker.Ultimate.TOP; -class P3HelloWorld : Components.GenericTowers +class P3HelloWorld(BossModule module) : Components.GenericTowers(module) { public enum PlayerRole { None = -1, Defamation, RemoteTether, Stack, LocalTether } public enum TowerColor { None, Red, Blue } @@ -69,7 +69,7 @@ public override void AddHints(int slot, Actor actor, TextHints hints) } } - base.AddHints(module, slot, actor, hints, movementHints); + base.AddHints(slot, actor, hints); } public override void AddGlobalHints(GlobalHints hints) @@ -102,7 +102,7 @@ public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot public override void DrawArenaForeground(int pcSlot, Actor pc) { - base.DrawArenaForeground(module, pcSlot, pc, arena); + base.DrawArenaForeground(pcSlot, pc); if (Towers.Count == 4) { @@ -117,19 +117,19 @@ public override void DrawArenaForeground(int pcSlot, Actor pc) _ => (0, PlayerRole.None) }; if (radius != 0) - arena.AddCircle(p.Position, radius, pcRole == share ? ArenaColor.Safe : ArenaColor.Danger); + Arena.AddCircle(p.Position, radius, pcRole == share ? ArenaColor.Safe : ArenaColor.Danger); } // draw safespots for next towers - foreach (var p in PositionsForTowers(module, pcSlot)) - arena.AddCircle(p, 1, ArenaColor.Safe); + foreach (var p in PositionsForTowers(pcSlot)) + Arena.AddCircle(p, 1, ArenaColor.Safe); } else if (NumRotExplodes < NumCasts) { // draw rot 'spreads' (rots will explode on players who used to have defamation/stack role and thus now have one of the tether roles) foreach (var (i, p) in Raid.WithSlot(true)) if (PendingRot(i)) - arena.AddCircle(p.Position, 5, ArenaColor.Danger); + Arena.AddCircle(p.Position, 5, ArenaColor.Danger); } if (NumTetherBreaks < 16) @@ -138,10 +138,10 @@ public override void DrawArenaForeground(int pcSlot, Actor pc) //bool useRoleForNextTowers = NumTetherBreaks >= NumCasts; //var pcRole = RoleForNextTowers(pcSlot, useRoleForNextTowers ? 0 : -1); //if (pcRole is PlayerRole.RemoteTether or PlayerRole.LocalTether && is var partner && partner != null) - // arena.AddLine(pc.Position, partner.Position, ArenaColor.Danger); + // Arena.AddLine(pc.Position, partner.Position, ArenaColor.Danger); var partner = Raid[PartnerSlot(pcSlot)]; if (partner != null && (pc.Tether.Target == partner.InstanceID || partner.Tether.Target == pc.InstanceID)) - arena.AddLine(pc.Position, partner.Position, ArenaColor.Danger); + Arena.AddLine(pc.Position, partner.Position, ArenaColor.Danger); } } @@ -150,24 +150,24 @@ public override void OnStatusGain(Actor actor, ActorStatus status) switch ((SID)status.ID) { case SID.HWPrepStack: - AssignRole(module, actor, PlayerRole.Stack); + AssignRole(actor, PlayerRole.Stack); break; case SID.HWPrepDefamation: - AssignRole(module, actor, PlayerRole.Defamation); + AssignRole(actor, PlayerRole.Defamation); break; case SID.HWPrepRedRot: - AssignRot(module, actor, TowerColor.Red); + AssignRot(actor, TowerColor.Red); break; case SID.HWPrepBlueRot: - AssignRot(module, actor, TowerColor.Blue); + AssignRot(actor, TowerColor.Blue); break; case SID.HWPrepLocalTether: if ((status.ExpireAt - WorldState.CurrentTime).TotalSeconds < 30) - AssignRole(module, actor, PlayerRole.LocalTether); + AssignRole(actor, PlayerRole.LocalTether); break; case SID.HWPrepRemoteTether: if ((status.ExpireAt - WorldState.CurrentTime).TotalSeconds < 30) - AssignRole(module, actor, PlayerRole.RemoteTether); + AssignRole(actor, PlayerRole.RemoteTether); break; } } @@ -223,7 +223,7 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } } - private void AssignRole(BossModule module, Actor actor, PlayerRole role) + private void AssignRole(Actor actor, PlayerRole role) { var slot = Raid.FindSlot(actor.InstanceID); if (slot < 0) @@ -235,7 +235,7 @@ private void AssignRole(BossModule module, Actor actor, PlayerRole role) if (_initialRoles[slot] == PlayerRole.None) { _initialRoles[slot] = role; - InitDefamationTowers(module, slot); + InitDefamationTowers(slot); } else if (_initialRoles[slot] != role) { @@ -243,7 +243,7 @@ private void AssignRole(BossModule module, Actor actor, PlayerRole role) } } - private void AssignRot(BossModule module, Actor actor, TowerColor color) + private void AssignRot(Actor actor, TowerColor color) { var slot = Raid.FindSlot(actor.InstanceID); if (slot < 0) @@ -255,7 +255,7 @@ private void AssignRot(BossModule module, Actor actor, TowerColor color) if (_initialRots[slot] == TowerColor.None) { _initialRots[slot] = color; - InitDefamationTowers(module, slot); + InitDefamationTowers(slot); } else if (_initialRots[slot] != color) { @@ -263,7 +263,7 @@ private void AssignRot(BossModule module, Actor actor, TowerColor color) } } - private void InitDefamationTowers(BossModule module, int slot) + private void InitDefamationTowers(int slot) { var role = _initialRoles[slot]; var color = _initialRots[slot]; @@ -308,7 +308,7 @@ private int PartnerSlot(int slot) return -1; } - private IEnumerable PositionsForTowers(BossModule module, int slot) + private IEnumerable PositionsForTowers(int slot) { // find midpoint for defamation towers WDir defamationMid = default; diff --git a/BossMod/Modules/Endwalker/Ultimate/TOP/P3Intermission.cs b/BossMod/Modules/Endwalker/Ultimate/TOP/P3Intermission.cs index d7a5318b8e..847ed34a52 100644 --- a/BossMod/Modules/Endwalker/Ultimate/TOP/P3Intermission.cs +++ b/BossMod/Modules/Endwalker/Ultimate/TOP/P3Intermission.cs @@ -1,6 +1,6 @@ namespace BossMod.Endwalker.Ultimate.TOP; -class P3SniperCannon : Components.UniformStackSpread +class P3SniperCannon(BossModule module) : Components.UniformStackSpread(module, 6, 6, alwaysShowSpreads: true) { enum PlayerRole { None, Stack, Spread } @@ -14,13 +14,11 @@ struct PlayerState private PlayerState[] _playerStates = new PlayerState[PartyState.MaxPartySize]; private bool _haveSafeSpots; - public P3SniperCannon() : base(6, 6, alwaysShowSpreads: true) { } - public override void DrawArenaForeground(int pcSlot, Actor pc) { - base.DrawArenaForeground(module, pcSlot, pc, arena); - foreach (var s in EnumerateSafeSpots(module, pcSlot)) - arena.AddCircle(s, 1, ArenaColor.Safe); + base.DrawArenaForeground(pcSlot, pc); + foreach (var s in EnumerateSafeSpots(pcSlot)) + Arena.AddCircle(s, 1, ArenaColor.Safe); } public override void OnStatusGain(Actor actor, ActorStatus status) @@ -29,11 +27,11 @@ public override void OnStatusGain(Actor actor, ActorStatus status) { case SID.SniperCannonFodder: AddSpread(actor, status.ExpireAt); - Assign(module, Raid.FindSlot(actor.InstanceID), PlayerRole.Spread); + Assign(Raid.FindSlot(actor.InstanceID), PlayerRole.Spread); break; case SID.HighPoweredSniperCannonFodder: AddStack(actor, status.ExpireAt); - Assign(module, Raid.FindSlot(actor.InstanceID), PlayerRole.Stack); + Assign(Raid.FindSlot(actor.InstanceID), PlayerRole.Stack); break; } } @@ -52,7 +50,7 @@ public override void OnStatusLose(Actor actor, ActorStatus status) } } - private void Assign(BossModule module, int slot, PlayerRole role) + private void Assign(int slot, PlayerRole role) { if (slot < 0) return; @@ -72,7 +70,7 @@ private void Assign(BossModule module, int slot, PlayerRole role) _playerStates[s].Order = ++assignedRoles[(int)_playerStates[s].Role]; } - private IEnumerable EnumerateSafeSpots(BossModule module, int slot) + private IEnumerable EnumerateSafeSpots(int slot) { if (!_haveSafeSpots) yield break; @@ -81,32 +79,30 @@ private IEnumerable EnumerateSafeSpots(BossModule module, int slot) if (ps.Role == PlayerRole.Spread) { if (ps.Order is 0 or 1) - yield return SafeSpotAt(module, -90.Degrees()); + yield return SafeSpotAt(-90.Degrees()); if (ps.Order is 0 or 2) - yield return SafeSpotAt(module, -45.Degrees()); + yield return SafeSpotAt(-45.Degrees()); if (ps.Order is 0 or 3) - yield return SafeSpotAt(module, 45.Degrees()); + yield return SafeSpotAt(45.Degrees()); if (ps.Order is 0 or 4) - yield return SafeSpotAt(module, 90.Degrees()); + yield return SafeSpotAt(90.Degrees()); } else { if (ps.Order is 0 or 1) - yield return SafeSpotAt(module, -135.Degrees()); + yield return SafeSpotAt(-135.Degrees()); if (ps.Order is 0 or 2) - yield return SafeSpotAt(module, 135.Degrees()); + yield return SafeSpotAt(135.Degrees()); } } - private WPos SafeSpotAt(BossModule module, Angle dirIfStacksNorth) => Module.Bounds.Center + 19 * (_config.P3IntermissionStacksNorth ? dirIfStacksNorth : 180.Degrees() - dirIfStacksNorth).ToDirection(); + private WPos SafeSpotAt(Angle dirIfStacksNorth) => Module.Bounds.Center + 19 * (_config.P3IntermissionStacksNorth ? dirIfStacksNorth : 180.Degrees() - dirIfStacksNorth).ToDirection(); } -class P3WaveRepeater : Components.ConcentricAOEs +class P3WaveRepeater(BossModule module) : Components.ConcentricAOEs(module, _shapes) { private static readonly AOEShape[] _shapes = { new AOEShapeCircle(6), new AOEShapeDonut(6, 12), new AOEShapeDonut(12, 18), new AOEShapeDonut(18, 24) }; - public P3WaveRepeater() : base(_shapes) { } - public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.WaveRepeater1) @@ -130,7 +126,7 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) class P3IntermissionVoidzone(BossModule module) : Components.PersistentVoidzone(module, 6, m => m.Enemies(OID.P3IntermissionVoidzone).Where(z => z.EventState != 7)); -class P3ColossalBlow : Components.GenericAOEs +class P3ColossalBlow(BossModule module) : Components.GenericAOEs(module) { public List AOEs = new(); diff --git a/BossMod/Modules/Endwalker/Ultimate/TOP/P3OversampledWaveCannon.cs b/BossMod/Modules/Endwalker/Ultimate/TOP/P3OversampledWaveCannon.cs index bd4d5160c1..ec4f2a59bb 100644 --- a/BossMod/Modules/Endwalker/Ultimate/TOP/P3OversampledWaveCannon.cs +++ b/BossMod/Modules/Endwalker/Ultimate/TOP/P3OversampledWaveCannon.cs @@ -1,6 +1,6 @@ namespace BossMod.Endwalker.Ultimate.TOP; -class P3OversampledWaveCannon : BossComponent +class P3OversampledWaveCannon(BossModule module) : BossComponent(module) { private Actor? _boss; private Angle _bossAngle; @@ -16,25 +16,27 @@ public override void AddHints(int slot, Actor actor, TextHints hints) if (_playerOrder[slot] != 0) hints.Add($"Order: {(IsMonitor(slot) != default ? "M" : "N")}{_playerOrder[slot]}", false); - var numHitBy = AOEs(module, slot).Count(a => !a.source && _shape.Check(actor.Position, a.origin, a.rot)); + var numHitBy = AOEs(slot).Count(a => !a.source && _shape.Check(actor.Position, a.origin, a.rot)); if (numHitBy != 1) hints.Add($"Hit by {numHitBy} monitors!"); + } - if (movementHints != null) - foreach (var p in SafeSpots(module, slot).Where(p => p.assigned)) - movementHints.Add(actor.Position, p.pos, ArenaColor.Safe); + public override void AddMovementHints(int slot, Actor actor, MovementHints movementHints) + { + foreach (var p in SafeSpots(slot).Where(p => p.assigned)) + movementHints.Add(actor.Position, p.pos, ArenaColor.Safe); } public override void DrawArenaBackground(int pcSlot, Actor pc) { - foreach (var a in AOEs(module, pcSlot)) - _shape.Draw(arena, a.origin, a.rot, a.safe ? ArenaColor.SafeFromAOE : ArenaColor.AOE); + foreach (var a in AOEs(pcSlot)) + _shape.Draw(Arena, a.origin, a.rot, a.safe ? ArenaColor.SafeFromAOE : ArenaColor.AOE); } public override void DrawArenaForeground(int pcSlot, Actor pc) { - foreach (var p in SafeSpots(module, pcSlot)) - arena.AddCircle(p.pos, 1, p.assigned ? ArenaColor.Safe : ArenaColor.Danger); + foreach (var p in SafeSpots(pcSlot)) + Arena.AddCircle(p.pos, 1, p.assigned ? ArenaColor.Safe : ArenaColor.Danger); } public override void OnStatusGain(Actor actor, ActorStatus status) @@ -78,7 +80,7 @@ public override void OnCastStarted(Actor caster, ActorCastInfo spell) private bool IsMonitor(int slot) => _playerAngles[slot] != default; - private IEnumerable<(WPos pos, bool assigned)> SafeSpots(BossModule module, int slot) + private IEnumerable<(WPos pos, bool assigned)> SafeSpots(int slot) { if (_numPlayerAngles < 3 || _bossAngle == default) yield break; @@ -100,7 +102,7 @@ public override void OnCastStarted(Actor caster, ActorCastInfo spell) } } - private IEnumerable<(WPos origin, Angle rot, bool safe, bool source)> AOEs(BossModule module, int slot) + private IEnumerable<(WPos origin, Angle rot, bool safe, bool source)> AOEs(int slot) { var isMonitor = IsMonitor(slot); var order = (isMonitor, _playerOrder[slot]) switch @@ -110,12 +112,12 @@ public override void OnCastStarted(Actor caster, ActorCastInfo spell) (_, 2 or 3) => 1, // N2/N3 are hit by M1 _ => 3, // N4/N5 are hit by M3 }; - foreach (var aoe in AOEs(module)) + foreach (var aoe in AOEs()) if (aoe.origin != null) yield return (aoe.origin.Position, aoe.origin.Rotation + aoe.offset, aoe.order == order, isMonitor && aoe.order == _playerOrder[slot]); } - private IEnumerable<(Actor? origin, Angle offset, int order)> AOEs(BossModule module) + private IEnumerable<(Actor? origin, Angle offset, int order)> AOEs() { yield return (_boss, _bossAngle, 0); for (int i = 0; i < _monitorOrder.Count; ++i) @@ -126,10 +128,8 @@ public override void OnCastStarted(Actor caster, ActorCastInfo spell) } } -class P3OversampledWaveCannonSpread : Components.UniformStackSpread +class P3OversampledWaveCannonSpread(BossModule module) : Components.UniformStackSpread(module, 0, 7) { - public P3OversampledWaveCannonSpread() : base(0, 7) { } - public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.OversampledWaveCannonR or AID.OversampledWaveCannonL) diff --git a/BossMod/Modules/Endwalker/Ultimate/TOP/P4WaveCannon.cs b/BossMod/Modules/Endwalker/Ultimate/TOP/P4WaveCannon.cs index 819c09ca12..16ffd13621 100644 --- a/BossMod/Modules/Endwalker/Ultimate/TOP/P4WaveCannon.cs +++ b/BossMod/Modules/Endwalker/Ultimate/TOP/P4WaveCannon.cs @@ -1,12 +1,12 @@ namespace BossMod.Endwalker.Ultimate.TOP; -class P4WaveCannonProtean : Components.GenericBaitAway +class P4WaveCannonProtean(BossModule module) : Components.GenericBaitAway(module) { private Actor? _source; private static readonly AOEShapeRect _shape = new(100, 3); - public void Show(BossModule module) + public void Show() { NumCasts = 0; if (_source != null) @@ -19,7 +19,7 @@ public override void OnCastStarted(Actor caster, ActorCastInfo spell) if ((AID)spell.Action.ID == AID.P4WaveCannonVisualStart) { _source = caster; - Show(module); + Show(); } } @@ -47,7 +47,7 @@ class P4WaveCannonStack : BossComponent public bool Active => _targets.Any(); - public override void Init(BossModule module) + public P4WaveCannonStack(BossModule module) : base(module) { foreach (var (s, g) in Service.Config.Get().P4WaveCannonAssignments.Resolve(Raid)) _playerGroups[s] = g; @@ -57,8 +57,11 @@ public override void AddHints(int slot, Actor actor, TextHints hints) { if (Imminent && Raid.WithSlot(true).IncludedInMask(_targets).WhereActor(p => _shape.Check(actor.Position, Module.Bounds.Center, Angle.FromDirection(p.Position - Module.Bounds.Center))).Count() is var clips && clips != 1) hints.Add(clips == 0 ? "Share the stack!" : "GTFO from second stack!"); + } - if (movementHints != null && SafeDir(slot) is var safeDir && safeDir != default) + public override void AddMovementHints(int slot, Actor actor, MovementHints movementHints) + { + if (SafeDir(slot) is var safeDir && safeDir != default) movementHints.Add(actor.Position, Module.Bounds.Center + 12 * safeDir.ToDirection(), ArenaColor.Safe); } @@ -66,11 +69,11 @@ public override void DrawArenaForeground(int pcSlot, Actor pc) { if (Imminent) foreach (var (_, p) in Raid.WithSlot(true).IncludedInMask(_targets)) - _shape.Outline(arena, Module.Bounds.Center, Angle.FromDirection(p.Position - Module.Bounds.Center), ArenaColor.Safe); + _shape.Outline(Arena, Module.Bounds.Center, Angle.FromDirection(p.Position - Module.Bounds.Center), ArenaColor.Safe); var safeDir = SafeDir(pcSlot); if (safeDir != default) - arena.AddCircle(Module.Bounds.Center + 12 * safeDir.ToDirection(), 1, ArenaColor.Safe); + Arena.AddCircle(Module.Bounds.Center + 12 * safeDir.ToDirection(), 1, ArenaColor.Safe); } public override void OnEventCast(Actor caster, ActorCastEvent spell) diff --git a/BossMod/Modules/Endwalker/Ultimate/TOP/P5Delta.cs b/BossMod/Modules/Endwalker/Ultimate/TOP/P5Delta.cs index 97e72fc790..97a73283a9 100644 --- a/BossMod/Modules/Endwalker/Ultimate/TOP/P5Delta.cs +++ b/BossMod/Modules/Endwalker/Ultimate/TOP/P5Delta.cs @@ -1,7 +1,7 @@ namespace BossMod.Endwalker.Ultimate.TOP; // note: this is all very tied to LPDU strat -class P5Delta : BossComponent +class P5Delta(BossModule module) : BossComponent(module) { public enum PairAssignment { None, Inner, Outer } public enum SideAssignment { None, North, South } @@ -46,10 +46,10 @@ public override void DrawArenaForeground(int pcSlot, Actor pc) var p = Players[pcSlot]; var partner = p.TetherBroken ? null : Raid[p.PartnerSlot]; if (partner != null) - arena.AddLine(pc.Position, partner.Position, ArenaColor.Danger); + Arena.AddLine(pc.Position, partner.Position, ArenaColor.Danger); - foreach (var safeSpot in SafeSpotOffsets(module, pcSlot)) - arena.AddCircle(Module.Bounds.Center + safeSpot, 1, ArenaColor.Safe); + foreach (var safeSpot in SafeSpotOffsets(pcSlot)) + Arena.AddCircle(Module.Bounds.Center + safeSpot, 1, ArenaColor.Safe); } public override void OnActorCreated(Actor actor) @@ -66,7 +66,7 @@ public override void OnActorCreated(Actor actor) if (++NumPunchesSpawned == PartyState.MaxPartySize) { - InitAssignments(module); + InitAssignments(); } } } @@ -191,7 +191,7 @@ public override void OnEventIcon(Actor actor, uint iconID) _ => _eyeDir.OrthoL().Dot(offset) > 0 ? 2 : 4, }; - private void InitAssignments(BossModule module) + private void InitAssignments() { // 1. assign initial inner/outer float slotToOffsetX(int slot) => _eyeDir.OrthoR().Dot((Raid[slot]?.Position ?? Module.Bounds.Center) - Module.Bounds.Center); @@ -231,7 +231,7 @@ private void InitAssignments(BossModule module) } } - private IEnumerable SafeSpotOffsets(BossModule module, int slot) + private IEnumerable SafeSpotOffsets(int slot) { var p = Players[slot]; if (p.PartnerSlot < 0 || _eyeDir == default) @@ -350,15 +350,13 @@ private IEnumerable SafeSpotOffsets(BossModule module, int slot) private WDir BaitOffset(int index) => 19 * (Angle.FromDirection(_eyeDir) + index * 60.Degrees() - 0.15f * ArmRotations[index]).ToDirection(); // 5 degrees offset in correct direction } -class P5DeltaOpticalLaser : Components.GenericAOEs +class P5DeltaOpticalLaser(BossModule module) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.OpticalLaser)) { public Actor? Source { get; private set; } private DateTime _activation; private static readonly AOEShapeRect _shape = new(100, 8); - public P5DeltaOpticalLaser() : base(ActionID.MakeSpell(AID.OpticalLaser)) { } - public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (Source != null) @@ -370,7 +368,7 @@ public override void OnActorPlayActionTimelineEvent(Actor actor, ushort id) { if ((OID)actor.OID is OID.BeetleHelper or OID.FinalHelper && id == 0x1E43) { - Source ??= module.Enemies(OID.OpticalUnit).FirstOrDefault(); + Source ??= Module.Enemies(OID.OpticalUnit).FirstOrDefault(); _activation = WorldState.FutureTime(20); } } @@ -380,9 +378,10 @@ class P5DeltaExplosion : Components.LocationTargetedAOEs { private P5Delta? _delta; - public P5DeltaExplosion() : base(ActionID.MakeSpell(AID.DeltaExplosion), 3) { } - - public override void Init(BossModule module) => _delta = module.FindComponent(); + public P5DeltaExplosion(BossModule module) : base(module, ActionID.MakeSpell(AID.DeltaExplosion), 3) + { + _delta = module.FindComponent(); + } public override void DrawArenaForeground(int pcSlot, Actor pc) { @@ -391,7 +390,7 @@ public override void DrawArenaForeground(int pcSlot, Actor pc) var ps = _delta.Players[pcSlot]; var partner = Raid.WithSlot(true).WhereSlot(i => _delta.Players[i].IsLocal == ps.IsLocal && i != ps.PartnerSlot && _delta.Players[i].RocketPunch?.OID != ps.RocketPunch?.OID).FirstOrDefault().Item2; if (partner != null) - arena.AddCircle(partner.Position, Shape.Radius, ArenaColor.Safe); + Arena.AddCircle(partner.Position, Shape.Radius, ArenaColor.Safe); } } @@ -403,6 +402,11 @@ class P5DeltaHyperPulse : Components.GenericAOEs private static readonly AOEShapeRect _shape = new(100, 4); private static readonly int _numRepeats = 6; + public P5DeltaHyperPulse(BossModule module) : base(module) + { + _delta = module.FindComponent(); + } + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_aoes.Count > 0) @@ -429,8 +433,6 @@ public override IEnumerable ActiveAOEs(int slot, Actor actor) } } - public override void Init(BossModule module) => _delta = module.FindComponent(); - public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.DeltaHyperPulseFirst && _delta != null) @@ -467,13 +469,14 @@ class P5DeltaOversampledWaveCannon : Components.UniformStackSpread private static readonly AOEShapeRect _shape = new(50, 50); - public P5DeltaOversampledWaveCannon() : base(0, 7) { } - - public override void Init(BossModule module) => _delta = module.FindComponent(); + public P5DeltaOversampledWaveCannon(BossModule module) : base(module, 0, 7) + { + _delta = module.FindComponent(); + } public override void AddHints(int slot, Actor actor, TextHints hints) { - base.AddHints(module, slot, actor, hints, movementHints); + base.AddHints(slot, actor, hints); if (_player == actor) { @@ -498,9 +501,9 @@ public override void AddHints(int slot, Actor actor, TextHints hints) public override void DrawArenaBackground(int pcSlot, Actor pc) { if (_boss != null) - _shape.Draw(arena, _boss.Position, _boss.Rotation + _bossAngle, _bossIntendedTargets[pcSlot] ? ArenaColor.SafeFromAOE : ArenaColor.AOE); + _shape.Draw(Arena, _boss.Position, _boss.Rotation + _bossAngle, _bossIntendedTargets[pcSlot] ? ArenaColor.SafeFromAOE : ArenaColor.AOE); if (_player != null) - _shape.Draw(arena, _player.Position, _player.Rotation + _playerAngle, _playerIntendedTargets[pcSlot] ? ArenaColor.SafeFromAOE : ArenaColor.AOE); + _shape.Draw(Arena, _player.Position, _player.Rotation + _playerAngle, _playerIntendedTargets[pcSlot] ? ArenaColor.SafeFromAOE : ArenaColor.AOE); } public override void OnStatusGain(Actor actor, ActorStatus status) @@ -554,7 +557,7 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } } -class P5DeltaSwivelCannon : Components.GenericAOEs +class P5DeltaSwivelCannon(BossModule module) : Components.GenericAOEs(module) { public AOEInstance? AOE; diff --git a/BossMod/Modules/Endwalker/Ultimate/TOP/P5NearDistantWorld.cs b/BossMod/Modules/Endwalker/Ultimate/TOP/P5NearDistantWorld.cs index 8730faa920..9412a6ccb0 100644 --- a/BossMod/Modules/Endwalker/Ultimate/TOP/P5NearDistantWorld.cs +++ b/BossMod/Modules/Endwalker/Ultimate/TOP/P5NearDistantWorld.cs @@ -1,6 +1,6 @@ namespace BossMod.Endwalker.Ultimate.TOP; -class P5NearDistantWorld : Components.GenericStackSpread +class P5NearDistantWorld(BossModule module) : Components.GenericStackSpread(module, true) { public int NumNearJumpsDone { get; private set; } public int NumDistantJumpsDone { get; private set; } @@ -11,22 +11,20 @@ class P5NearDistantWorld : Components.GenericStackSpread private BitMask _risky; private DateTime _firstActivation; - public P5NearDistantWorld() : base(true) { } - public override void Update() { Spreads.Clear(); _risky.Reset(); _targets = _completedJumps; - AddChain(module, NearWorld, NumNearJumpsDone, true); - AddChain(module, DistantWorld, NumDistantJumpsDone, false); + AddChain(NearWorld, NumNearJumpsDone, true); + AddChain(DistantWorld, NumDistantJumpsDone, false); - base.Update(module); + base.Update(); } public override void AddHints(int slot, Actor actor, TextHints hints) { - base.AddHints(module, slot, actor, hints, movementHints); + base.AddHints(slot, actor, hints); if (_risky[slot]) hints.Add("Avoid baiting jump!"); @@ -77,28 +75,28 @@ protected void Reset(Actor? near, Actor? distant, DateTime activation) _firstActivation = activation; } - private void AddChain(BossModule module, Actor? start, int numDone, bool close) + private void AddChain(Actor? start, int numDone, bool close) { if (numDone == 0) { if (start != null) - AddSpread(module, start, 8, 0); + AddSpread(start, 8, 0); } if (numDone <= 1 && start != null) { start = close ? Raid.WithoutSlot().Exclude(start).Closest(start.Position) : Raid.WithoutSlot().Exclude(start).Farthest(start.Position); if (start != null) - AddSpread(module, start, 4, 1); + AddSpread(start, 4, 1); } if (numDone <= 2 && start != null) { start = close ? Raid.WithoutSlot().Exclude(start).Closest(start.Position) : Raid.WithoutSlot().Exclude(start).Farthest(start.Position); if (start != null) - AddSpread(module, start, 4, 2); + AddSpread(start, 4, 2); } } - private void AddSpread(BossModule module, Actor target, float radius, int order) + private void AddSpread(Actor target, float radius, int order) { Spreads.Add(new(target, radius, _firstActivation.AddSeconds(order * 1.0))); var slot = Raid.FindSlot(target.InstanceID); diff --git a/BossMod/Modules/Endwalker/Ultimate/TOP/P5Omega.cs b/BossMod/Modules/Endwalker/Ultimate/TOP/P5Omega.cs index afcda3e88b..8837d5099c 100644 --- a/BossMod/Modules/Endwalker/Ultimate/TOP/P5Omega.cs +++ b/BossMod/Modules/Endwalker/Ultimate/TOP/P5Omega.cs @@ -1,6 +1,6 @@ namespace BossMod.Endwalker.Ultimate.TOP; -class P5OmegaDoubleAOEs : Components.GenericAOEs +class P5OmegaDoubleAOEs(BossModule module) : Components.GenericAOEs(module) { public List AOEs = new(); @@ -47,7 +47,7 @@ public override void OnActorPlayActionTimelineEvent(Actor actor, ushort id) } } -class P5OmegaDiffuseWaveCannon : Components.GenericAOEs +class P5OmegaDiffuseWaveCannon(BossModule module) : Components.GenericAOEs(module) { private List _aoes = new(); @@ -79,7 +79,7 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } } -class P5OmegaNearDistantWorld : P5NearDistantWorld +class P5OmegaNearDistantWorld(BossModule module) : P5NearDistantWorld(module) { private BitMask _near; private BitMask _distant; @@ -90,8 +90,8 @@ class P5OmegaNearDistantWorld : P5NearDistantWorld public bool HaveDebuffs => (_near | _distant | _first | _second).Any(); - public void ShowFirst(BossModule module) => Reset(Raid[(_near & _first).LowestSetBit()], Raid[(_distant & _first).LowestSetBit()], _firstActivation); - public void ShowSecond(BossModule module) => Reset(Raid[(_near & _second).LowestSetBit()], Raid[(_distant & _second).LowestSetBit()], _secondActivation); + public void ShowFirst() => Reset(Raid[(_near & _first).LowestSetBit()], Raid[(_distant & _first).LowestSetBit()], _firstActivation); + public void ShowSecond() => Reset(Raid[(_near & _second).LowestSetBit()], Raid[(_distant & _second).LowestSetBit()], _secondActivation); public override void OnStatusGain(Actor actor, ActorStatus status) { @@ -126,29 +126,30 @@ class P5OmegaOversampledWaveCannon : Components.UniformStackSpread public bool IsActive => _boss != null; - public P5OmegaOversampledWaveCannon() : base(0, 7) { } - - public override void Init(BossModule module) => _ndw = module.FindComponent(); + public P5OmegaOversampledWaveCannon(BossModule module) : base(module, 0, 7) + { + _ndw = module.FindComponent(); + } public override void Update() { Spreads.Clear(); if (_boss != null) AddSpreads(Raid.WithoutSlot().InShape(_shape, _boss.Position, _boss.Rotation + _bossAngle)); - base.Update(module); + base.Update(); } public override void DrawArenaBackground(int pcSlot, Actor pc) { if (_boss != null) - _shape.Draw(arena, _boss.Position, _boss.Rotation + _bossAngle, ArenaColor.AOE); + _shape.Draw(Arena, _boss.Position, _boss.Rotation + _bossAngle, ArenaColor.AOE); } public override void DrawArenaForeground(int pcSlot, Actor pc) { - base.DrawArenaForeground(module, pcSlot, pc, arena); - foreach (var p in SafeSpots(module, pcSlot, pc)) - arena.AddCircle(p, 1, ArenaColor.Safe); + base.DrawArenaForeground(pcSlot, pc); + foreach (var p in SafeSpots(pcSlot, pc)) + Arena.AddCircle(p, 1, ArenaColor.Safe); } public override void OnCastStarted(Actor caster, ActorCastInfo spell) @@ -174,7 +175,7 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } } - private IEnumerable SafeSpots(BossModule module, int slot, Actor actor) + private IEnumerable SafeSpots(int slot, Actor actor) { if (_ndw == null || _boss == null) yield break; @@ -205,9 +206,7 @@ class P5OmegaBlaster : Components.BaitAwayTethers { private P5OmegaNearDistantWorld? _ndw; - public P5OmegaBlaster() : base(new AOEShapeCircle(15), (uint)TetherID.Blaster, ActionID.MakeSpell(AID.OmegaBlasterAOE)) { } - - public override void Init(BossModule module) + public P5OmegaBlaster(BossModule module) : base(module, new AOEShapeCircle(15), (uint)TetherID.Blaster, ActionID.MakeSpell(AID.OmegaBlasterAOE)) { CenterAtTarget = true; ForbiddenPlayers = new(0xFF); @@ -216,9 +215,9 @@ public override void Init(BossModule module) public override void DrawArenaForeground(int pcSlot, Actor pc) { - base.DrawArenaForeground(module, pcSlot, pc, arena); - foreach (var p in SafeSpots(module, pcSlot, pc)) - arena.AddCircle(p, 1, ArenaColor.Safe); + base.DrawArenaForeground(pcSlot, pc); + foreach (var p in SafeSpots(pcSlot, pc)) + Arena.AddCircle(p, 1, ArenaColor.Safe); } public override void OnStatusGain(Actor actor, ActorStatus status) @@ -227,7 +226,7 @@ public override void OnStatusGain(Actor actor, ActorStatus status) ForbiddenPlayers.Clear(Raid.FindSlot(actor.InstanceID)); } - private IEnumerable SafeSpots(BossModule module, int slot, Actor actor) + private IEnumerable SafeSpots(int slot, Actor actor) { if (_ndw == null || CurrentBaits.Count == 0) yield break; diff --git a/BossMod/Modules/Endwalker/Ultimate/TOP/P5Sigma.cs b/BossMod/Modules/Endwalker/Ultimate/TOP/P5Sigma.cs index a53d6ef3d1..cdaaacd4bb 100644 --- a/BossMod/Modules/Endwalker/Ultimate/TOP/P5Sigma.cs +++ b/BossMod/Modules/Endwalker/Ultimate/TOP/P5Sigma.cs @@ -1,7 +1,7 @@ namespace BossMod.Endwalker.Ultimate.TOP; // note: this is all very tied to LPDU strat -class P5Sigma : BossComponent +class P5Sigma(BossModule module) : BossComponent(module) { public enum Glitch { Unknown, Mid, Remote } @@ -39,11 +39,11 @@ public override void DrawArenaForeground(int pcSlot, Actor pc) { var distSq = (partner.Position - pc.Position).LengthSq(); var range = DistanceRange; - arena.AddLine(pc.Position, partner.Position, distSq < range.min * range.min || distSq > range.max * range.max ? ArenaColor.Danger : ArenaColor.Safe); + Arena.AddLine(pc.Position, partner.Position, distSq < range.min * range.min || distSq > range.max * range.max ? ArenaColor.Danger : ArenaColor.Safe); } - foreach (var safeSpot in SafeSpotOffsets(module, pcSlot)) - arena.AddCircle(Module.Bounds.Center + safeSpot, 1, ArenaColor.Safe); + foreach (var safeSpot in SafeSpotOffsets(pcSlot)) + Arena.AddCircle(Module.Bounds.Center + safeSpot, 1, ArenaColor.Safe); } public override void OnTethered(Actor source, ActorTetherInfo tether) @@ -102,7 +102,7 @@ public override void OnEventIcon(Actor actor, uint iconID) { Players[slot].WaveCannonTarget = true; if (++_numWaveCannonTargets == 6) - InitSpreadPositions(module); + InitSpreadPositions(); } } @@ -128,7 +128,7 @@ public override void OnActorPlayActionTimelineEvent(Actor actor, ushort id) _ => (0, 50) }; - private void InitSpreadPositions(BossModule module) + private void InitSpreadPositions() { var northAngle = Angle.FromDirection(_waveCannonNorthDir); var waveCannonsPerPair = new BitMask[4]; @@ -183,7 +183,7 @@ private void InitSpreadPositions(BossModule module) p.SpreadAngle = p.SpreadAngle.Normalized(); } - private IEnumerable SafeSpotOffsets(BossModule module, int slot) + private IEnumerable SafeSpotOffsets(int slot) { var p = Players[slot]; if (_waveCannonNorthDir == default) @@ -205,26 +205,22 @@ private IEnumerable SafeSpotOffsets(BossModule module, int slot) } } -class P5SigmaHyperPulse : Components.BaitAwayTethers +class P5SigmaHyperPulse(BossModule module) : Components.BaitAwayTethers(module, new AOEShapeRect(100, 3), (uint)TetherID.SigmaHyperPulse, ActionID.MakeSpell(AID.SigmaHyperPulse)) { - public P5SigmaHyperPulse() : base(new AOEShapeRect(100, 3), (uint)TetherID.SigmaHyperPulse, ActionID.MakeSpell(AID.SigmaHyperPulse)) { } - public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (var b in CurrentBaits) - arena.Actor(b.Source, ArenaColor.Object, true); - base.DrawArenaForeground(module, pcSlot, pc, arena); + Arena.Actor(b.Source, ArenaColor.Object, true); + base.DrawArenaForeground(pcSlot, pc); } } -class P5SigmaWaveCannon : Components.GenericBaitAway +class P5SigmaWaveCannon(BossModule module) : Components.GenericBaitAway(module, ActionID.MakeSpell(AID.SigmaWaveCannonAOE)) { private BitMask _waveCannonTargets; private static readonly AOEShapeCone _shapeWaveCannon = new(100, 22.5f.Degrees()); // TODO: verify angle - public P5SigmaWaveCannon() : base(ActionID.MakeSpell(AID.SigmaWaveCannonAOE)) { } - public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.SigmaWaveCannon) @@ -239,7 +235,7 @@ public override void OnEventIcon(Actor actor, uint iconID) } } -class P5SigmaTowers : Components.GenericTowers +class P5SigmaTowers(BossModule module) : Components.GenericTowers(module) { private int _soakerSum; @@ -257,7 +253,7 @@ public override void OnActorCreated(Actor actor) Towers.Add(new(actor.Position, 3, numSoakers, numSoakers)); _soakerSum += numSoakers; if (_soakerSum == PartyState.MaxPartySize) - InitAssignments(module); + InitAssignments(); } public override void OnEventCast(Actor caster, ActorCastEvent spell) @@ -269,9 +265,9 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } } - private void InitAssignments(BossModule module) + private void InitAssignments() { - var sigma = module.FindComponent(); + var sigma = Module.FindComponent(); if (sigma == null) return; @@ -316,7 +312,7 @@ private void AssignPlayers(P5Sigma sigma, ref Tower tower, params Angle[] angles } } -class P5SigmaRearLasers : Components.GenericAOEs +class P5SigmaRearLasers(BossModule module) : Components.GenericAOEs(module) { public Angle StartingDir { get; private set; } public Angle Rotation { get; private set; } @@ -331,7 +327,7 @@ public override IEnumerable ActiveAOEs(int slot, Actor actor) if (!Active) yield break; for (int i = NumCasts + 1; i < 14; ++i) - yield return new(_shape, Module.Bounds.Center, StartingDir + i * Rotation, _activation.AddSeconds(0.6 * i), risky: false); + yield return new(_shape, Module.Bounds.Center, StartingDir + i * Rotation, _activation.AddSeconds(0.6 * i), Risky: false); if (NumCasts < 14) yield return new(_shape, Module.Bounds.Center, StartingDir + NumCasts * Rotation, _activation.AddSeconds(0.6 * NumCasts), ArenaColor.Danger); } @@ -360,7 +356,7 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } } -class P5SigmaDoubleAOEs : Components.GenericAOEs +class P5SigmaDoubleAOEs(BossModule module) : Components.GenericAOEs(module) { public bool Show; public List AOEs = new(); @@ -395,23 +391,26 @@ class P5SigmaNearDistantWorld : P5NearDistantWorld private P5SigmaRearLasers? _lasers; private BitMask _dynamisStacks; - public override void Init(BossModule module) => _lasers = module.FindComponent(); + public P5SigmaNearDistantWorld(BossModule module) : base(module) + { + _lasers = module.FindComponent(); + } public override void DrawArenaForeground(int pcSlot, Actor pc) { - base.DrawArenaForeground(module, pcSlot, pc, arena); - foreach (var p in SafeSpots(module, pcSlot, pc)) - arena.AddCircle(p, 1, ArenaColor.Safe); + base.DrawArenaForeground(pcSlot, pc); + foreach (var p in SafeSpots(pcSlot, pc)) + Arena.AddCircle(p, 1, ArenaColor.Safe); } public override void OnStatusGain(Actor actor, ActorStatus status) { - base.OnStatusGain(module, actor, status); + base.OnStatusGain(actor, status); if ((SID)status.ID == SID.QuickeningDynamis) _dynamisStacks.Set(Raid.FindSlot(actor.InstanceID)); } - private IEnumerable SafeSpots(BossModule module, int slot, Actor actor) + private IEnumerable SafeSpots(int slot, Actor actor) { if (_lasers == null) // note: we assume StartingDir is relative south, Rotation is +- 9 degrees yield break; diff --git a/BossMod/Modules/Endwalker/Ultimate/TOP/P5SolarRay.cs b/BossMod/Modules/Endwalker/Ultimate/TOP/P5SolarRay.cs index cda7ad3a2b..a3186b2a09 100644 --- a/BossMod/Modules/Endwalker/Ultimate/TOP/P5SolarRay.cs +++ b/BossMod/Modules/Endwalker/Ultimate/TOP/P5SolarRay.cs @@ -2,17 +2,15 @@ // TODO: not sure how exactly second target is selected, I think it is snapshotted to the current target when first cast happens? // TODO: consider generalizing - same as P12S1 Glaukopis and others... -class P5SolarRay : Components.GenericBaitAway +class P5SolarRay(BossModule module) : Components.GenericBaitAway(module, centerAtTarget: true) { private static readonly AOEShapeCircle _shape = new(5); - public P5SolarRay() : base(centerAtTarget: true) { } - public override void AddHints(int slot, Actor actor, TextHints hints) { if (NumCasts == 0 && CurrentBaits.FirstOrDefault(b => b.Source.TargetID == b.Target.InstanceID) is var b && b.Source != null && actor.Role == Role.Tank) hints.Add(b.Source.TargetID != actor.InstanceID ? "Taunt!" : "Pass aggro!"); - base.AddHints(module, slot, actor, hints, movementHints); + base.AddHints(slot, actor, hints); } public override void OnCastStarted(Actor caster, ActorCastInfo spell) diff --git a/BossMod/Modules/Endwalker/Ultimate/TOP/P6CosmoArrow.cs b/BossMod/Modules/Endwalker/Ultimate/TOP/P6CosmoArrow.cs index 12826876f4..a4498a2853 100644 --- a/BossMod/Modules/Endwalker/Ultimate/TOP/P6CosmoArrow.cs +++ b/BossMod/Modules/Endwalker/Ultimate/TOP/P6CosmoArrow.cs @@ -1,6 +1,6 @@ namespace BossMod.Endwalker.Ultimate.TOP; -class P6CosmoArrow : Components.GenericAOEs +class P6CosmoArrow(BossModule module) : Components.GenericAOEs(module) { public enum Pattern { Unknown, InOut, OutIn } public record struct Line(AOEShapeRect? Shape, WPos Next, Angle Direction, WDir Advance, DateTime NextExplosion, int ExplosionsLeft); diff --git a/BossMod/Modules/Endwalker/Ultimate/TOP/P6CosmoDive.cs b/BossMod/Modules/Endwalker/Ultimate/TOP/P6CosmoDive.cs index 5bf921266d..5405107e53 100644 --- a/BossMod/Modules/Endwalker/Ultimate/TOP/P6CosmoDive.cs +++ b/BossMod/Modules/Endwalker/Ultimate/TOP/P6CosmoDive.cs @@ -1,12 +1,10 @@ namespace BossMod.Endwalker.Ultimate.TOP; -class P6CosmoDive : Components.UniformStackSpread +class P6CosmoDive(BossModule module) : Components.UniformStackSpread(module, 6, 8, 6, 6, true) { private Actor? _source; private DateTime _activation; - public P6CosmoDive() : base(6, 8, 6, 6, true) { } - public override void Update() { Spreads.Clear(); @@ -25,7 +23,7 @@ public override void Update() AddStack(farthest, _activation, forbidden); } } - base.Update(module); + base.Update(); } public override void OnCastStarted(Actor caster, ActorCastInfo spell) diff --git a/BossMod/Modules/Endwalker/Ultimate/TOP/P6CosmoMeteor.cs b/BossMod/Modules/Endwalker/Ultimate/TOP/P6CosmoMeteor.cs index c143fc46b2..5f62f5dd47 100644 --- a/BossMod/Modules/Endwalker/Ultimate/TOP/P6CosmoMeteor.cs +++ b/BossMod/Modules/Endwalker/Ultimate/TOP/P6CosmoMeteor.cs @@ -10,9 +10,10 @@ class P6CosmoMeteorSpread : Components.UniformStackSpread { public int NumCasts { get; private set; } - public P6CosmoMeteorSpread() : base(0, 5) { } - - public override void Init(BossModule module) => AddSpreads(Raid.WithoutSlot(true)); + public P6CosmoMeteorSpread(BossModule module) : base(module, 0, 5) + { + AddSpreads(Raid.WithoutSlot(true)); + } public override void OnEventCast(Actor caster, ActorCastEvent spell) { @@ -21,10 +22,8 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } } -class P6CosmoMeteorFlares : Components.UniformStackSpread +class P6CosmoMeteorFlares(BossModule module) : Components.UniformStackSpread(module, 6, 20, 5, alwaysShowSpreads: true) // TODO: verify flare falloff { - public P6CosmoMeteorFlares() : base(6, 20, 5, alwaysShowSpreads: true) { } // TODO: verify flare falloff - public override void OnEventIcon(Actor actor, uint iconID) { if ((IconID)iconID == IconID.OptimizedMeteor) diff --git a/BossMod/Modules/Endwalker/Ultimate/TOP/P6FlashGale.cs b/BossMod/Modules/Endwalker/Ultimate/TOP/P6FlashGale.cs index 3d964f935d..ae03caf1b8 100644 --- a/BossMod/Modules/Endwalker/Ultimate/TOP/P6FlashGale.cs +++ b/BossMod/Modules/Endwalker/Ultimate/TOP/P6FlashGale.cs @@ -6,9 +6,7 @@ class P6FlashGale : Components.GenericBaitAway private static readonly AOEShapeCircle _shape = new(5); - public P6FlashGale() : base(centerAtTarget: true) { } - - public override void Init(BossModule module) + public P6FlashGale(BossModule module) : base(module, centerAtTarget: true) { _source = module.Enemies(OID.BossP6).FirstOrDefault(); ForbiddenPlayers = Raid.WithSlot(true).WhereActor(p => p.Role != Role.Tank).Mask(); diff --git a/BossMod/Modules/Endwalker/Ultimate/TOP/P6WaveCannon.cs b/BossMod/Modules/Endwalker/Ultimate/TOP/P6WaveCannon.cs index b7278ae55e..f7e5911d46 100644 --- a/BossMod/Modules/Endwalker/Ultimate/TOP/P6WaveCannon.cs +++ b/BossMod/Modules/Endwalker/Ultimate/TOP/P6WaveCannon.cs @@ -2,10 +2,8 @@ class P6WaveCannonPuddle(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.P6WaveCannonPuddle), new AOEShapeCircle(6)); -class P6WaveCannonExaflare : Components.Exaflare +class P6WaveCannonExaflare(BossModule module) : Components.Exaflare(module, 8) { - public P6WaveCannonExaflare() : base(8) { } - public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.P6WaveCannonExaflareFirst) @@ -26,14 +24,14 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) return; } - AdvanceLine(module, Lines[index], caster.Position); + AdvanceLine(Lines[index], caster.Position); if (Lines[index].ExplosionsLeft == 0) Lines.RemoveAt(index); } } } -class P6WaveCannonProteans : Components.GenericBaitAway +class P6WaveCannonProteans(BossModule module) : Components.GenericBaitAway(module) { private static readonly AOEShapeRect _shape = new(100, 4); @@ -55,13 +53,8 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } } -class P6WaveCannonWildCharge : Components.GenericWildCharge +class P6WaveCannonWildCharge(BossModule module) : Components.GenericWildCharge(module, 4, ActionID.MakeSpell(AID.P6WaveCannonWildCharge), 100) { - public P6WaveCannonWildCharge() : base(4, ActionID.MakeSpell(AID.P6WaveCannonWildCharge)) - { - FixedLength = 100; - } - public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.P6WaveCannonProtean) diff --git a/BossMod/Modules/Endwalker/Ultimate/TOP/TOP.cs b/BossMod/Modules/Endwalker/Ultimate/TOP/TOP.cs index be71eec9f6..98990c71ef 100644 --- a/BossMod/Modules/Endwalker/Ultimate/TOP/TOP.cs +++ b/BossMod/Modules/Endwalker/Ultimate/TOP/TOP.cs @@ -1,15 +1,12 @@ namespace BossMod.Endwalker.Ultimate.TOP; class SolarRayM(BossModule module) : Components.BaitAwayCast(module, ActionID.MakeSpell(AID.SolarRayM), new AOEShapeCircle(5), true); - class SolarRayF(BossModule module) : Components.BaitAwayCast(module, ActionID.MakeSpell(AID.SolarRayF), new AOEShapeCircle(5), true); - class P4BlueScreen(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.BlueScreenAOE)); - class P5BlindFaith(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.BlindFaithSuccess), "Intermission"); [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 908)] -public class TOP : BossModule +public class TOP(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { private Actor? _opticalUnit; private Actor? _omegaM; @@ -25,8 +22,6 @@ public class TOP : BossModule public Actor? BossP5() => _bossP5; public Actor? BossP6() => _bossP6; - public TOP(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { } - protected override void UpdateModule() { // TODO: this is an ugly hack, think how multi-actor fights can be implemented without it... diff --git a/BossMod/Modules/Endwalker/Ultimate/TOP/TOPConfig.cs b/BossMod/Modules/Endwalker/Ultimate/TOP/TOPConfig.cs index ce3dac53e4..175070a962 100644 --- a/BossMod/Modules/Endwalker/Ultimate/TOP/TOPConfig.cs +++ b/BossMod/Modules/Endwalker/Ultimate/TOP/TOPConfig.cs @@ -1,7 +1,7 @@ namespace BossMod.Endwalker.Ultimate.TOP; [ConfigDisplay(Order = 0x210, Parent = typeof(EndwalkerConfig))] -public class TOPConfig : CooldownPlanningConfigNode +public class TOPConfig() : CooldownPlanningConfigNode(90) { [PropertyDisplay("P1 Program Loop: assignments (G1 CW from NW, G2 CCW by default, in case of conflict 'lower' number flexes)")] [GroupDetails(new string[] { "G1 prio1", "G1 prio2", "G1 prio3", "G1 prio4", "G2 prio1", "G2 prio2", "G2 prio3", "G2 prio4" })] @@ -45,6 +45,4 @@ public class TOPConfig : CooldownPlanningConfigNode [GroupDetails(new string[] { "W1", "E1", "W2", "E2", "W3", "E3", "W4", "E4" })] [GroupPreset("LPDU (TRHM)", new[] { 0, 1, 4, 5, 6, 7, 2, 3 })] public GroupAssignmentUnique P4WaveCannonAssignments = new() { Assignments = new[] { 0, 1, 4, 5, 6, 7, 2, 3 } }; - - public TOPConfig() : base(90) { } } diff --git a/BossMod/Modules/Endwalker/Ultimate/TOP/TOPStates.cs b/BossMod/Modules/Endwalker/Ultimate/TOP/TOPStates.cs index 0d9b672999..f4b1d6420e 100644 --- a/BossMod/Modules/Endwalker/Ultimate/TOP/TOPStates.cs +++ b/BossMod/Modules/Endwalker/Ultimate/TOP/TOPStates.cs @@ -153,7 +153,7 @@ private void P2PartySynergy(uint id, float delay) ComponentCondition(id + 0x30, 6.4f, comp => !comp.Active, "Spreads") .ActivateOnEnter() - .ExecOnEnter(comp => comp.Show(_module)) + .ExecOnEnter(comp => comp.Show()) .ExecOnEnter(comp => comp.EnableDistanceHints = true) .ActivateOnEnter() // PATEs happen 0.8s after double aoes .DeactivateOnExit(); @@ -287,7 +287,7 @@ private void P4WaveCannon(uint id, float delay) ComponentCondition(id + 0x40, 0.2f, comp => !comp.Active, "Stacks 1"); // +2.1s: targets for stacks 2 ComponentCondition(id + 0x50, 2.5f, comp => comp.NumCasts > 0) - .ExecOnEnter(comp => comp.Show(Module)); + .ExecOnEnter(comp => comp.Show()); ComponentCondition(id + 0x51, 2.1f, comp => comp.NumCasts > 1); ComponentCondition(id + 0x52, 0.7f, comp => comp.NumCasts > 0, "Proteans 2"); ComponentCondition(id + 0x53, 1.4f, comp => comp.NumCasts > 2) @@ -299,7 +299,7 @@ private void P4WaveCannon(uint id, float delay) ComponentCondition(id + 0x56, 0.2f, comp => !comp.Active, "Stack 2"); // +2.2s: targets for stacks 3 ComponentCondition(id + 0x60, 5.3f, comp => comp.NumCasts > 0, "Proteans 3") - .ExecOnEnter(comp => comp.Show(Module)) + .ExecOnEnter(comp => comp.Show()) .DeactivateOnExit(); ComponentCondition(id + 0x61, 4.5f, comp => comp.NumCasts > 4) .ActivateOnEnter() @@ -447,7 +447,7 @@ private void P5RunMiOmega(uint id, float delay) .SetHint(StateMachine.StateHint.DowntimeStart); ComponentCondition(id + 0x100, 0.2f, comp => comp.IsActive) - .ExecOnEnter(comp => comp.ShowFirst(_module)) + .ExecOnEnter(comp => comp.ShowFirst()) .ActivateOnEnter(); ComponentCondition(id + 0x110, 9.6f, comp => comp.NumNearJumpsDone > 0, "Near/far 1"); ComponentCondition(id + 0x112, 1.0f, comp => comp.NumNearJumpsDone > 1, "Near/far 2"); @@ -455,7 +455,7 @@ private void P5RunMiOmega(uint id, float delay) .DeactivateOnExit(); // note: resolves between first and second jumps ComponentCondition(id + 0x200, 2.1f, comp => comp.CurrentBaits.Count > 0) - .ExecOnEnter(comp => comp.ShowSecond(_module)) + .ExecOnEnter(comp => comp.ShowSecond()) .ActivateOnEnter(); ComponentCondition(id + 0x210, 12.2f, comp => comp.NumCasts > 0, "Tethers") .DeactivateOnExit(); diff --git a/BossMod/Modules/Endwalker/Unreal/Un1Ultima/Garuda.cs b/BossMod/Modules/Endwalker/Unreal/Un1Ultima/Garuda.cs index 08cf105067..f19c2b24e0 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un1Ultima/Garuda.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un1Ultima/Garuda.cs @@ -1,6 +1,6 @@ namespace BossMod.Endwalker.Unreal.Un1Ultima; -class Garuda : BossComponent +class Garuda(BossModule module) : BossComponent(module) { private bool _vulcanBurstImminent; private Actor? _mistralSong; @@ -28,19 +28,19 @@ public override void AddHints(int slot, Actor actor, TextHints hints) public override void DrawArenaBackground(int pcSlot, Actor pc) { - _aoeMistralSong.Draw(arena, _mistralSong); - _aoeEOTS.Draw(arena, _eots); + _aoeMistralSong.Draw(Arena, _mistralSong); + _aoeEOTS.Draw(Arena, _eots); if (_eots == null) - _aoeGeocrush.Draw(arena, _geocrush); + _aoeGeocrush.Draw(Arena, _geocrush); } public override void DrawArenaForeground(int pcSlot, Actor pc) { - var adjPos = _vulcanBurstImminent ? arena.Bounds.ClampToBounds(Components.Knockback.AwayFromSource(pc.Position, _mistralSong, 30)) : pc.Position; + var adjPos = _vulcanBurstImminent ? Arena.Bounds.ClampToBounds(Components.Knockback.AwayFromSource(pc.Position, _mistralSong, 30)) : pc.Position; if (adjPos != pc.Position) { - arena.AddLine(pc.Position, adjPos, ArenaColor.Danger); - arena.Actor(adjPos, 0.Degrees(), ArenaColor.Danger); + Arena.AddLine(pc.Position, adjPos, ArenaColor.Danger); + Arena.Actor(adjPos, 0.Degrees(), ArenaColor.Danger); } } diff --git a/BossMod/Modules/Endwalker/Unreal/Un1Ultima/Mechanics.cs b/BossMod/Modules/Endwalker/Unreal/Un1Ultima/Mechanics.cs index 8b3175a3a9..d15d1c4e77 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un1Ultima/Mechanics.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un1Ultima/Mechanics.cs @@ -2,7 +2,7 @@ // common mechanics that are used for entire fight // TODO: consider splitting into multiple components, at least for mechanics that start in later phases... -class Mechanics : BossComponent +class Mechanics(BossModule module) : BossComponent(module) { private int[] _tankStacks = new int[PartyState.MaxPartySize]; @@ -25,7 +25,7 @@ class Mechanics : BossComponent public override void Update() { // TODO: this is bad, we need to find a way to associate orb to kiter... - if (_orbKiters.Count > 0 && module.Enemies(OID.Aetheroplasm).Count == 0) + if (_orbKiters.Count > 0 && Module.Enemies(OID.Aetheroplasm).Count == 0) _orbKiters.Clear(); } @@ -73,7 +73,7 @@ public override void AddHints(int slot, Actor actor, TextHints hints) hints.Add("Kite the orb!"); } - if (module.Enemies(OID.MagitekBit).Any(bit => bit.CastInfo != null && _aoeAssaultCannon.Check(actor.Position, bit))) + if (Module.Enemies(OID.MagitekBit).Any(bit => bit.CastInfo != null && _aoeAssaultCannon.Check(actor.Position, bit))) { hints.Add("GTFO from bit aoe!"); } @@ -84,53 +84,53 @@ public override void AddHints(int slot, Actor actor, TextHints hints) public override void DrawArenaBackground(int pcSlot, Actor pc) { if (_magitekOffset != null) - _aoeMagitekRay.Draw(arena, Module.PrimaryActor.Position, Module.PrimaryActor.Rotation + _magitekOffset.Value); + _aoeMagitekRay.Draw(Arena, Module.PrimaryActor.Position, Module.PrimaryActor.Rotation + _magitekOffset.Value); - foreach (var bit in module.Enemies(OID.MagitekBit).Where(bit => bit.CastInfo != null)) - _aoeAssaultCannon.Draw(arena, bit); + foreach (var bit in Module.Enemies(OID.MagitekBit).Where(bit => bit.CastInfo != null)) + _aoeAssaultCannon.Draw(Arena, bit); } public override void DrawArenaForeground(int pcSlot, Actor pc) { var mt = WorldState.Actors.Find(Module.PrimaryActor.TargetID); foreach (var player in Raid.WithoutSlot().Exclude(pc)) - arena.Actor(player, _orbKiters.Contains(player.InstanceID) ? ArenaColor.Danger : player == mt ? ArenaColor.PlayerInteresting : ArenaColor.PlayerGeneric); + Arena.Actor(player, _orbKiters.Contains(player.InstanceID) ? ArenaColor.Danger : player == mt ? ArenaColor.PlayerInteresting : ArenaColor.PlayerGeneric); if (mt != null) - arena.AddCircle(mt.Position, _aoeCleave.Radius, ArenaColor.Danger); + Arena.AddCircle(mt.Position, _aoeCleave.Radius, ArenaColor.Danger); //if (pc.Role is Role.Healer or Role.Ranged) - // arena.AddCircle(Module.PrimaryActor.Position, _ceruleumVentRange, ArenaColor.Danger); + // Arena.AddCircle(Module.PrimaryActor.Position, _ceruleumVentRange, ArenaColor.Danger); - foreach (var orb in module.Enemies(OID.Ultimaplasm).Where(orb => !_orbsSharedExploded.Contains(orb.InstanceID))) + foreach (var orb in Module.Enemies(OID.Ultimaplasm).Where(orb => !_orbsSharedExploded.Contains(orb.InstanceID))) { // TODO: line between paired orbs - arena.Actor(orb, ArenaColor.Danger, true); - arena.AddCircle(orb.Position, _orbSharedRange, ArenaColor.Safe); + Arena.Actor(orb, ArenaColor.Danger, true); + Arena.AddCircle(orb.Position, _orbSharedRange, ArenaColor.Safe); } - foreach (var orb in module.Enemies(OID.Aetheroplasm).Where(orb => !_orbsKitedExploded.Contains(orb.InstanceID))) + foreach (var orb in Module.Enemies(OID.Aetheroplasm).Where(orb => !_orbsKitedExploded.Contains(orb.InstanceID))) { // TODO: line from corresponding target - arena.Actor(orb, ArenaColor.Danger, true); - arena.AddCircle(orb.Position, _orbFixateRange, ArenaColor.Danger); + Arena.Actor(orb, ArenaColor.Danger, true); + Arena.AddCircle(orb.Position, _orbFixateRange, ArenaColor.Danger); } - foreach (var bit in module.Enemies(OID.MagitekBit)) + foreach (var bit in Module.Enemies(OID.MagitekBit)) { - arena.Actor(bit, ArenaColor.Danger); + Arena.Actor(bit, ArenaColor.Danger); } } public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.ViscousAetheroplasm) - SetTankStacks(module, actor, status.Extra); + SetTankStacks(actor, status.Extra); } public override void OnStatusLose(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.ViscousAetheroplasm) - SetTankStacks(module, actor, 0); + SetTankStacks(actor, 0); } public override void OnCastStarted(Actor caster, ActorCastInfo spell) @@ -171,7 +171,7 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } } - private void SetTankStacks(BossModule module, Actor actor, int stacks) + private void SetTankStacks(Actor actor, int stacks) { int slot = Raid.FindSlot(actor.InstanceID); if (slot >= 0) diff --git a/BossMod/Modules/Endwalker/Unreal/Un1Ultima/TitanIfrit.cs b/BossMod/Modules/Endwalker/Unreal/Un1Ultima/TitanIfrit.cs index 0a249c057d..b3cdc332d9 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un1Ultima/TitanIfrit.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un1Ultima/TitanIfrit.cs @@ -1,7 +1,7 @@ namespace BossMod.Endwalker.Unreal.Un1Ultima; // both phases use radiant plumes -class TitanIfrit : BossComponent +class TitanIfrit(BossModule module) : BossComponent(module) { private List<(Actor, AOEShapeCircle)> _activeLocationTargetedAOEs = new(); private List _crimsonCyclone = new(); @@ -20,9 +20,9 @@ public override void AddHints(int slot, Actor actor, TextHints hints) public override void DrawArenaBackground(int pcSlot, Actor pc) { foreach (var (a, aoe) in _activeLocationTargetedAOEs) - aoe.Draw(arena, a.CastInfo!.LocXZ); + aoe.Draw(Arena, a.CastInfo!.LocXZ); foreach (var a in _crimsonCyclone) - _aoeCrimsonCyclone.Draw(arena, a); + _aoeCrimsonCyclone.Draw(Arena, a); } public override void OnCastStarted(Actor caster, ActorCastInfo spell) diff --git a/BossMod/Modules/Endwalker/Unreal/Un1Ultima/Un1Ultima.cs b/BossMod/Modules/Endwalker/Unreal/Un1Ultima/Un1Ultima.cs index 86bca04fd1..a0ec5bed70 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un1Ultima/Un1Ultima.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un1Ultima/Un1Ultima.cs @@ -1,7 +1,7 @@ namespace BossMod.Endwalker.Unreal.Un1Ultima; // TODO: consider how phase changes could be detected and create different states for them?.. -class Phases : BossComponent +class Phases(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { diff --git a/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/EinSof.cs b/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/EinSof.cs index c4ca6698f0..f30eac15fc 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/EinSof.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/EinSof.cs @@ -1,6 +1,6 @@ namespace BossMod.Endwalker.Unreal.Un2Sephirot; -class EinSof : Components.GenericAOEs +class EinSof(BossModule module) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.EinSofAOE)) { private List _active = new(); @@ -8,14 +8,12 @@ class EinSof : Components.GenericAOEs public bool Active => _active.Count > 0; - public EinSof() : base(ActionID.MakeSpell(AID.EinSofAOE)) { } - public override IEnumerable ActiveAOEs(int slot, Actor actor) { return _active.Select(p => new AOEInstance(_shape, p.Position)); } - public override void OnActorEAnim(BossModule module, Actor actor, uint state) + public override void OnActorEAnim(Actor actor, uint state) { switch (state) { diff --git a/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/P1FiendishRage.cs b/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/P1FiendishRage.cs index da101f3bdb..eb0761d4ac 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/P1FiendishRage.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/P1FiendishRage.cs @@ -1,13 +1,11 @@ namespace BossMod.Endwalker.Unreal.Un2Sephirot; -class P1FiendishRage : Components.CastCounter +class P1FiendishRage(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.FiendishRage)) { private BitMask _targets; private static readonly float _range = 6; - public P1FiendishRage() : base(ActionID.MakeSpell(AID.FiendishRage)) { } - public override void AddHints(int slot, Actor actor, TextHints hints) { if (_targets.Any()) @@ -35,7 +33,7 @@ public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (var target in Raid.WithSlot(true).IncludedInMask(_targets)) - arena.AddCircle(target.Item2.Position, _range, ArenaColor.Danger); + Arena.AddCircle(target.Item2.Position, _range, ArenaColor.Danger); } public override void OnEventIcon(Actor actor, uint iconID) diff --git a/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/P1Ratzon.cs b/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/P1Ratzon.cs index a8d0f0e4c4..8736b4d19b 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/P1Ratzon.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/P1Ratzon.cs @@ -1,7 +1,7 @@ namespace BossMod.Endwalker.Unreal.Un2Sephirot; // TODO: generalize -class P1Ratzon : BossComponent +class P1Ratzon(BossModule module) : BossComponent(module) { private BitMask _greenTargets; private BitMask _purpleTargets; @@ -27,9 +27,9 @@ public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (var (slot, actor) in Raid.WithSlot().IncludedInMask(_greenTargets)) - arena.AddCircle(actor.Position, _greenRadius, 0xff00ff00, slot == pcSlot ? 2 : 1); + Arena.AddCircle(actor.Position, _greenRadius, 0xff00ff00, slot == pcSlot ? 2 : 1); foreach (var (slot, actor) in Raid.WithSlot().IncludedInMask(_purpleTargets)) - arena.AddCircle(actor.Position, _purpleRadius, 0xffff00ff, slot == pcSlot ? 2 : 1); + Arena.AddCircle(actor.Position, _purpleRadius, 0xffff00ff, slot == pcSlot ? 2 : 1); } public override void OnEventCast(Actor caster, ActorCastEvent spell) diff --git a/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/P3Daat.cs b/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/P3Daat.cs index c820293a2c..8b6f179cec 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/P3Daat.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/P3Daat.cs @@ -1,11 +1,9 @@ namespace BossMod.Endwalker.Unreal.Un2Sephirot; -class P3Daat : Components.CastCounter +class P3Daat(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.DaatRandom)) { private static readonly float radius = 5; - public P3Daat() : base(ActionID.MakeSpell(AID.DaatRandom)) { } - public override void AddHints(int slot, Actor actor, TextHints hints) { if (Raid.WithoutSlot().InRadiusExcluding(actor, radius).Any()) @@ -14,6 +12,6 @@ public override void AddHints(int slot, Actor actor, TextHints hints) public override void DrawArenaForeground(int pcSlot, Actor pc) { - arena.AddCircle(pc.Position, radius, ArenaColor.Danger); + Arena.AddCircle(pc.Position, radius, ArenaColor.Danger); } } diff --git a/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/P3Earthshaker.cs b/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/P3Earthshaker.cs index a4d03ae713..f58385ee31 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/P3Earthshaker.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/P3Earthshaker.cs @@ -1,6 +1,6 @@ namespace BossMod.Endwalker.Unreal.Un2Sephirot; -class P3Earthshaker : Components.GenericAOEs +class P3Earthshaker(BossModule module) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.EarthShakerAOE)) { private BitMask _targets; @@ -8,11 +8,9 @@ class P3Earthshaker : Components.GenericAOEs private static readonly AOEShape _shape = new AOEShapeCone(60, 15.Degrees()); - public P3Earthshaker() : base(ActionID.MakeSpell(AID.EarthShakerAOE)) { } - public override IEnumerable ActiveAOEs(int slot, Actor actor) { - var origin = module.Enemies(OID.BossP3).FirstOrDefault(); + var origin = Module.Enemies(OID.BossP3).FirstOrDefault(); if (origin == null) yield break; @@ -21,10 +19,7 @@ public override IEnumerable ActiveAOEs(int slot, Actor actor) yield return new(_shape, origin.Position, Angle.FromDirection(target.Item2.Position - origin.Position)); } - public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) - { - return _targets[playerSlot] ? PlayerPriority.Interesting : PlayerPriority.Irrelevant; - } + public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) => _targets[playerSlot] ? PlayerPriority.Interesting : PlayerPriority.Irrelevant; public override void OnEventIcon(Actor actor, uint iconID) { diff --git a/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/P3FiendishWail.cs b/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/P3FiendishWail.cs index 87c94df757..f1cdef0415 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/P3FiendishWail.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/P3FiendishWail.cs @@ -1,6 +1,6 @@ namespace BossMod.Endwalker.Unreal.Un2Sephirot; -class P3FiendishWail : Components.CastCounter +class P3FiendishWail(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.FiendishWailAOE)) { private BitMask _physResistMask; private List _towers = new(); @@ -9,8 +9,6 @@ class P3FiendishWail : Components.CastCounter private static readonly float _radius = 5; - public P3FiendishWail() : base(ActionID.MakeSpell(AID.FiendishWailAOE)) { } - public override void AddHints(int slot, Actor actor, TextHints hints) { if (!Active) @@ -27,7 +25,7 @@ public override void AddHints(int slot, Actor actor, TextHints hints) public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (var t in _towers) - arena.AddCircle(t.Position, _radius, ArenaColor.Danger); + Arena.AddCircle(t.Position, _radius, ArenaColor.Danger); } public override void OnStatusGain(Actor actor, ActorStatus status) diff --git a/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/P3GevurahChesed.cs b/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/P3GevurahChesed.cs index 7eea8e3b28..3a5e445adf 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/P3GevurahChesed.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/P3GevurahChesed.cs @@ -1,14 +1,12 @@ namespace BossMod.Endwalker.Unreal.Un2Sephirot; -class P3GevurahChesed : Components.CastCounter +class P3GevurahChesed(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.LifeForce)) // doesn't matter which spell to track { private BitMask _physResistMask; private int _physSide; // 0 if not active, -1 if left, +1 if right private static readonly AOEShape _shape = new AOEShapeRect(40, 10); - public P3GevurahChesed() : base(ActionID.MakeSpell(AID.LifeForce)) { } // doesn't matter which spell to track - public override void AddHints(int slot, Actor actor, TextHints hints) { var side = ForbiddenSide(slot); @@ -20,7 +18,7 @@ public override void DrawArenaBackground(int pcSlot, Actor pc) { var side = ForbiddenSide(pcSlot); if (side != 0) - _shape.Draw(arena, Origin(side), 0.Degrees()); + _shape.Draw(Arena, Origin(side), 0.Degrees()); } public override void OnStatusGain(Actor actor, ActorStatus status) diff --git a/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/Un2Sephirot.cs b/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/Un2Sephirot.cs index 48d00513f7..475ac448f6 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/Un2Sephirot.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un2Sephirot/Un2Sephirot.cs @@ -1,38 +1,25 @@ namespace BossMod.Endwalker.Unreal.Un2Sephirot; class P1TripleTrial(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.TripleTrial), new AOEShapeCone(18.5f, 30.Degrees())); // TODO: verify angle - class P1Ein(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Ein), new AOEShapeRect(50, 22.5f)); - class P2GenesisCochma(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.GenesisCochma)); - class P2GenesisBinah(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.GenesisBinah)); - class P3EinSofOhr(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.EinSofOhrAOE)); - class P3Yesod(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Yesod), new AOEShapeCircle(4)); - class P3PillarOfMercyAOE(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PillarOfMercyAOE), new AOEShapeCircle(5)); - class P3PillarOfMercyKnockback(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.PillarOfMercyAOE), 17); - class P3Malkuth(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.Malkuth), 25); - -// TODO: show safe spot?.. -class P3Ascension(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.Ascension)); - +class P3Ascension(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.Ascension)); // TODO: show safe spot?.. class P3PillarOfSeverity(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.PillarOfSeverityAOE)); [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.BossP1, GroupType = BossModuleInfo.GroupType.RemovedUnreal, GroupID = 875, NameID = 4776)] -public class Un2Sephirot : BossModule +public class Un2Sephirot(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(0, 0), 20)) { public Actor? BossP1() => PrimaryActor.IsDestroyed ? null : PrimaryActor; private Actor? _bossP3; public Actor? BossP3() => _bossP3; - public Un2Sephirot(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(0, 0), 20)) { } - protected override void UpdateModule() { // TODO: this is an ugly hack, think how multi-actor fights can be implemented without it... diff --git a/BossMod/Modules/Endwalker/Unreal/Un3Sophia/ArmsOfWisdom.cs b/BossMod/Modules/Endwalker/Unreal/Un3Sophia/ArmsOfWisdom.cs index 949043157e..9d4f8fff00 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un3Sophia/ArmsOfWisdom.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un3Sophia/ArmsOfWisdom.cs @@ -1,9 +1,7 @@ namespace BossMod.Endwalker.Unreal.Un3Sophia; -class ArmsOfWisdom : Components.Knockback +class ArmsOfWisdom(BossModule module) : Components.Knockback(module, ActionID.MakeSpell(AID.ArmsOfWisdom)) { - public ArmsOfWisdom() : base(ActionID.MakeSpell(AID.ArmsOfWisdom)) { } - private Actor? _caster; public override IEnumerable Sources(int slot, Actor actor) @@ -14,7 +12,7 @@ public override IEnumerable Sources(int slot, Actor actor) public override void AddHints(int slot, Actor actor, TextHints hints) { - base.AddHints(module, slot, actor, hints, movementHints); + base.AddHints(slot, actor, hints); if (_caster != null && _caster.CastInfo?.TargetID == _caster.TargetID) { diff --git a/BossMod/Modules/Endwalker/Unreal/Un3Sophia/Demiurges.cs b/BossMod/Modules/Endwalker/Unreal/Un3Sophia/Demiurges.cs index 18b3728a96..89770d51fe 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un3Sophia/Demiurges.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un3Sophia/Demiurges.cs @@ -8,20 +8,17 @@ class Demiurges : Components.DirectionalParry public bool AddsActive => ActiveActors.Any() || _second.Any(a => a.IsTargetable && !a.IsDead) || _third.Any(a => a.IsTargetable && !a.IsDead); - public Demiurges() : base((uint)OID.Demiurge1) { } - - public override void Init(BossModule module) + public Demiurges(BossModule module) : base(module, (uint)OID.Demiurge1) { - base.Init(module); _second = module.Enemies(OID.Demiurge2); _third = module.Enemies(OID.Demiurge3); } public override void DrawArenaForeground(int pcSlot, Actor pc) { - base.DrawArenaForeground(module, pcSlot, pc, arena); - arena.Actors(_second, ArenaColor.Enemy); - arena.Actors(_third, ArenaColor.Enemy); + base.DrawArenaForeground(pcSlot, pc); + Arena.Actors(_second, ArenaColor.Enemy); + Arena.Actors(_third, ArenaColor.Enemy); } public override void OnCastStarted(Actor caster, ActorCastInfo spell) @@ -38,17 +35,12 @@ public override void OnCastStarted(Actor caster, ActorCastInfo spell) } class DivineSpark(BossModule module) : Components.CastGaze(module, ActionID.MakeSpell(AID.DivineSpark)); - class GnosticRant(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.GnosticRant), new AOEShapeCone(40, 135.Degrees())); - class GnosticSpear(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.GnosticSpear), new AOEShapeRect(20.75f, 2, 0.75f)); - class RingOfPain(BossModule module) : Components.PersistentVoidzoneAtCastTarget(module, 5, ActionID.MakeSpell(AID.RingOfPain), m => m.Enemies(OID.RingOfPain).Where(z => z.EventState != 7), 1.7f); -class Infusion : Components.GenericWildCharge +class Infusion(BossModule module) : Components.GenericWildCharge(module, 5, ActionID.MakeSpell(AID.Infusion)) { - public Infusion() : base(5, ActionID.MakeSpell(AID.Infusion)) { } - public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) diff --git a/BossMod/Modules/Endwalker/Unreal/Un3Sophia/Pairs.cs b/BossMod/Modules/Endwalker/Unreal/Un3Sophia/Pairs.cs index 6deb7bc1be..4727d7b2cc 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un3Sophia/Pairs.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un3Sophia/Pairs.cs @@ -1,7 +1,7 @@ namespace BossMod.Endwalker.Unreal.Un3Sophia; // TODO: there doesn't seem to be any event if mechanic is resolved correctly?.. -class Pairs : BossComponent +class Pairs(BossModule module) : BossComponent(module) { private BitMask _players1; private BitMask _players2; @@ -22,7 +22,7 @@ public override void Update() public override void AddHints(int slot, Actor actor, TextHints hints) { - bool atRisk = _players1[slot] ? AtRisk(module, actor, _players1, _players2) : _players2[slot] ? AtRisk(module, actor, _players2, _players1) : false; + bool atRisk = _players1[slot] ? AtRisk(actor, _players1, _players2) : _players2[slot] ? AtRisk(actor, _players2, _players1) : false; if (atRisk) hints.Add("Stack with opposite color!"); } @@ -30,9 +30,9 @@ public override void AddHints(int slot, Actor actor, TextHints hints) public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (var p in Raid.WithSlot().IncludedInMask(_players1).Exclude(pc)) - arena.AddCircle(p.Item2.Position, _radius, _players1[pcSlot] ? ArenaColor.Danger : ArenaColor.Safe); + Arena.AddCircle(p.Item2.Position, _radius, _players1[pcSlot] ? ArenaColor.Danger : ArenaColor.Safe); foreach (var p in Raid.WithSlot().IncludedInMask(_players2).Exclude(pc)) - arena.AddCircle(p.Item2.Position, _radius, _players2[pcSlot] ? ArenaColor.Danger : ArenaColor.Safe); + Arena.AddCircle(p.Item2.Position, _radius, _players2[pcSlot] ? ArenaColor.Danger : ArenaColor.Safe); } public override void OnEventIcon(Actor actor, uint iconID) @@ -50,7 +50,7 @@ public override void OnEventIcon(Actor actor, uint iconID) } } - private bool AtRisk(BossModule module, Actor actor, BitMask same, BitMask opposite) + private bool AtRisk(Actor actor, BitMask same, BitMask opposite) { return Raid.WithSlot().IncludedInMask(opposite).InRadius(actor.Position, _radius).Any() || !Raid.WithSlot().IncludedInMask(same).InRadiusExcluding(actor, _radius).Any(); } diff --git a/BossMod/Modules/Endwalker/Unreal/Un3Sophia/Tilt.cs b/BossMod/Modules/Endwalker/Unreal/Un3Sophia/Tilt.cs index 3f51c94c4a..a9398011e6 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un3Sophia/Tilt.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un3Sophia/Tilt.cs @@ -1,6 +1,6 @@ namespace BossMod.Endwalker.Unreal.Un3Sophia; -class Tilt : Components.Knockback +class Tilt(BossModule module) : Components.Knockback(module, ActionID.MakeSpell(AID.QuasarTilt)) { public static readonly float DistanceShort = 28; public static readonly float DistanceLong = 37; @@ -9,8 +9,6 @@ class Tilt : Components.Knockback public Angle Direction; public DateTime Activation; - public Tilt() : base(ActionID.MakeSpell(AID.QuasarTilt)) { } - public override IEnumerable Sources(int slot, Actor actor) { if (Distance > 0) @@ -19,19 +17,19 @@ public override IEnumerable Sources(int slot, Actor actor) public override void OnEventCast(Actor caster, ActorCastEvent spell) { - base.OnEventCast(module, caster, spell); + base.OnEventCast(caster, spell); if (spell.Action == WatchedAction) Distance = 0; } } -class ScalesOfWisdom : Tilt +class ScalesOfWisdom(BossModule module) : Tilt(module) { public bool RaidwideDone; public override void OnEventCast(Actor caster, ActorCastEvent spell) { - base.OnEventCast(module, caster, spell); + base.OnEventCast(caster, spell); switch ((AID)spell.Action.ID) { case AID.ScalesOfWisdomStart: @@ -56,7 +54,7 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } } -class Quasar : Tilt +class Quasar(BossModule module) : Tilt(module) { public int WeightLeft; public int WeightRight; diff --git a/BossMod/Modules/Endwalker/Unreal/Un3Sophia/Un3Sophia.cs b/BossMod/Modules/Endwalker/Unreal/Un3Sophia/Un3Sophia.cs index 1e179b79bd..7060b11d1e 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un3Sophia/Un3Sophia.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un3Sophia/Un3Sophia.cs @@ -1,30 +1,17 @@ namespace BossMod.Endwalker.Unreal.Un3Sophia; class ThunderDonut(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ThunderDonut), new AOEShapeDonut(5, 20)); - class ExecuteDonut(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ExecuteDonut), new AOEShapeDonut(5, 20)); - class Aero(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Aero), new AOEShapeCircle(10)); - class ExecuteAero(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ExecuteAero), new AOEShapeCircle(10)); - class ThunderCone(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ThunderCone), new AOEShapeCone(20, 45.Degrees())); - class ExecuteCone(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ExecuteCone), new AOEShapeCone(20, 45.Degrees())); - class LightDewShort(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.LightDewShort), new AOEShapeRect(55, 9, 5)); - class LightDewLong(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.LightDewLong), new AOEShapeRect(55, 9, 5)); - class Onrush(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Onrush), new AOEShapeRect(55, 8, 5)); - class Gnosis(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.Gnosis), 25); - -// note: ~4.2s before first cast boss gets model state 5 -class Cintamani(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.Cintamani)); - +class Cintamani(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.Cintamani)); // note: ~4.2s before first cast boss gets model state 5 class QuasarProximity1(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.QuasarProximity1), 15); - class QuasarProximity2(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.QuasarProximity2), 15); // TODO: reconsider distance [ConfigDisplay(Order = 0x330, Parent = typeof(EndwalkerConfig))] diff --git a/BossMod/Modules/Endwalker/Unreal/Un4Zurvan/P1Platforms.cs b/BossMod/Modules/Endwalker/Unreal/Un4Zurvan/P1Platforms.cs index 99554b5ac7..997713e1ee 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un4Zurvan/P1Platforms.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un4Zurvan/P1Platforms.cs @@ -1,12 +1,12 @@ namespace BossMod.Endwalker.Unreal.Un4Zurvan; -class P1Platforms : Components.GenericAOEs +class P1Platforms(BossModule module) : Components.GenericAOEs(module) { public List ForbiddenPlatforms = new(); public override IEnumerable ActiveAOEs(int slot, Actor actor) => ForbiddenPlatforms; - public override void OnActorEAnim(BossModule module, Actor actor, uint state) + public override void OnActorEAnim(Actor actor, uint state) { var dir = (OID)actor.OID switch { diff --git a/BossMod/Modules/Endwalker/Unreal/Un4Zurvan/P2Adds.cs b/BossMod/Modules/Endwalker/Unreal/Un4Zurvan/P2Adds.cs index 833b8dd307..ac982dbb1c 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un4Zurvan/P2Adds.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un4Zurvan/P2Adds.cs @@ -1,17 +1,9 @@ namespace BossMod.Endwalker.Unreal.Un4Zurvan; -// hard-hitting add -class P2ExecratedWill(BossModule module) : Components.Adds(module, (uint)OID.ExecratedWill); - -// high-priority add (casts comets and meteor) -class P2ExecratedWit(BossModule module) : Components.Adds(module, (uint)OID.ExecratedWit); - -// low-priority add (casts fear, then magical autos) -class P2ExecratedWile(BossModule module) : Components.Adds(module, (uint)OID.ExecratedWile); - -// small add -class P2ExecratedThew(BossModule module) : Components.Adds(module, (uint)OID.ExecratedThew); +class P2ExecratedWill(BossModule module) : Components.Adds(module, (uint)OID.ExecratedWill); // hard-hitting add +class P2ExecratedWit(BossModule module) : Components.Adds(module, (uint)OID.ExecratedWit); // high-priority add (casts comets and meteor) +class P2ExecratedWile(BossModule module) : Components.Adds(module, (uint)OID.ExecratedWile); // low-priority add (casts fear, then magical autos) +class P2ExecratedThew(BossModule module) : Components.Adds(module, (uint)OID.ExecratedThew); // small add class P2Comet(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Comet), 4); - class P2MeracydianFear(BossModule module) : Components.CastGaze(module, ActionID.MakeSpell(AID.MeracydianFear)); diff --git a/BossMod/Modules/Endwalker/Unreal/Un4Zurvan/P2BrokenSeal.cs b/BossMod/Modules/Endwalker/Unreal/Un4Zurvan/P2BrokenSeal.cs index b2e1c8c773..b5e6bc3698 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un4Zurvan/P2BrokenSeal.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un4Zurvan/P2BrokenSeal.cs @@ -17,7 +17,7 @@ public struct PlayerState private IReadOnlyList _fireTowers = ActorEnumeration.EmptyList; private IReadOnlyList _iceTowers = ActorEnumeration.EmptyList; - public override void Init(BossModule module) + public P2BrokenSeal(BossModule module) : base(module) { _fireTowers = module.Enemies(OID.FireTower); _iceTowers = module.Enemies(OID.IceTower); @@ -42,9 +42,7 @@ public override void AddHints(int slot, Actor actor, TextHints hints) } public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) - { - return _playerStates[pcSlot].Color != Color.None && _playerStates[pcSlot].Partner == playerSlot ? PlayerPriority.Interesting : PlayerPriority.Irrelevant; - } + => _playerStates[pcSlot].Color != Color.None && _playerStates[pcSlot].Partner == playerSlot ? PlayerPriority.Interesting : PlayerPriority.Irrelevant; public override void DrawArenaForeground(int pcSlot, Actor pc) { @@ -55,13 +53,13 @@ public override void DrawArenaForeground(int pcSlot, Actor pc) var partner = state.Color != Color.None && state.Partner >= 0 ? Raid[state.Partner] : null; if (partner != null) { - arena.AddLine(pc.Position, partner.Position, state.Color == Color.Fire ? 0xff0080ff : 0xffff8000, state.TooFar ? 2 : 1); + Arena.AddLine(pc.Position, partner.Position, state.Color == Color.Fire ? 0xff0080ff : 0xffff8000, state.TooFar ? 2 : 1); } foreach (var t in _fireTowers) - arena.AddCircle(t.Position, 2, state.Color == Color.Fire ? ArenaColor.Safe : ArenaColor.Danger); + Arena.AddCircle(t.Position, 2, state.Color == Color.Fire ? ArenaColor.Safe : ArenaColor.Danger); foreach (var t in _iceTowers) - arena.AddCircle(t.Position, 2, state.Color == Color.Ice ? ArenaColor.Safe : ArenaColor.Danger); + Arena.AddCircle(t.Position, 2, state.Color == Color.Ice ? ArenaColor.Safe : ArenaColor.Danger); } public override void OnEventCast(Actor caster, ActorCastEvent spell) @@ -69,10 +67,10 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) switch ((AID)spell.Action.ID) { case AID.InfiniteFire: - AssignColor(module, spell.MainTargetID, Color.Fire); + AssignColor(spell.MainTargetID, Color.Fire); break; case AID.InfiniteIce: - AssignColor(module, spell.MainTargetID, Color.Ice); + AssignColor(spell.MainTargetID, Color.Ice); break; case AID.SouthStar: case AID.NorthStar: @@ -100,7 +98,7 @@ public override void OnTethered(Actor source, ActorTetherInfo tether) } } - private void AssignColor(BossModule module, ulong playerID, Color color) + private void AssignColor(ulong playerID, Color color) { ++NumAssigned; var slot = Raid.FindSlot(playerID); diff --git a/BossMod/Modules/Endwalker/Unreal/Un4Zurvan/P2DemonsClaw.cs b/BossMod/Modules/Endwalker/Unreal/Un4Zurvan/P2DemonsClaw.cs index d47849b2f8..7ca53ab443 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un4Zurvan/P2DemonsClaw.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un4Zurvan/P2DemonsClaw.cs @@ -1,9 +1,7 @@ namespace BossMod.Endwalker.Unreal.Un4Zurvan; -class P2DemonsClawKnockback : Components.Knockback +class P2DemonsClawKnockback(BossModule module) : Components.Knockback(module, ActionID.MakeSpell(AID.DemonsClaw), true) { - public P2DemonsClawKnockback() : base(ActionID.MakeSpell(AID.DemonsClaw), true) { } - private Actor? _caster; public override IEnumerable Sources(int slot, Actor actor) @@ -25,12 +23,10 @@ public override void OnCastFinished(Actor caster, ActorCastInfo spell) } } -class P2DemonsClawWaveCannon : Components.GenericWildCharge +class P2DemonsClawWaveCannon(BossModule module) : Components.GenericWildCharge(module, 5, ActionID.MakeSpell(AID.WaveCannonShared)) { public Actor? Target { get; private set; } - public P2DemonsClawWaveCannon() : base(5, ActionID.MakeSpell(AID.WaveCannonShared)) { } - public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) diff --git a/BossMod/Modules/Endwalker/Unreal/Un4Zurvan/P2Eidos.cs b/BossMod/Modules/Endwalker/Unreal/Un4Zurvan/P2Eidos.cs index 0ace8504bb..11300f62c3 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un4Zurvan/P2Eidos.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un4Zurvan/P2Eidos.cs @@ -5,7 +5,7 @@ class P2Eidos : BossComponent { public int PhaseIndex { get; private set; } - public P2Eidos() + public P2Eidos(BossModule module) : base(module) { KeepOnPhaseChange = true; } diff --git a/BossMod/Modules/Endwalker/Unreal/Un4Zurvan/P2Soar.cs b/BossMod/Modules/Endwalker/Unreal/Un4Zurvan/P2Soar.cs index 29a24c8502..3c3548578d 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un4Zurvan/P2Soar.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un4Zurvan/P2Soar.cs @@ -1,6 +1,6 @@ namespace BossMod.Endwalker.Unreal.Un4Zurvan; -class P2SoarTwinSpirit : Components.GenericAOEs +class P2SoarTwinSpirit(BossModule module) : Components.GenericAOEs(module) { private List<(Actor caster, AOEInstance aoe)> _pending = new(); @@ -33,10 +33,8 @@ public override void OnCastFinished(Actor caster, ActorCastInfo spell) } } -class P2SoarFlamingHalberd : Components.UniformStackSpread +class P2SoarFlamingHalberd(BossModule module) : Components.UniformStackSpread(module, 0, 12, alwaysShowSpreads: true) { - public P2SoarFlamingHalberd() : base(0, 12, alwaysShowSpreads: true) { } - public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.FlamingHalberd) @@ -52,10 +50,8 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) class P2SoarFlamingHalberdVoidzone(BossModule module) : Components.PersistentVoidzone(module, 8, m => m.Enemies(OID.FlamingHalberdVoidzone).Where(z => z.EventState != 7)); -class P2SoarDemonicDiveCoolFlame : Components.UniformStackSpread +class P2SoarDemonicDiveCoolFlame(BossModule module) : Components.UniformStackSpread(module, 7, 8, 7, alwaysShowSpreads: true) { - public P2SoarDemonicDiveCoolFlame() : base(7, 8, 7, alwaysShowSpreads: true) { } - public override void OnEventIcon(Actor actor, uint iconID) { switch ((IconID)iconID) diff --git a/BossMod/Modules/Endwalker/Unreal/Un4Zurvan/Un4Zurvan.cs b/BossMod/Modules/Endwalker/Unreal/Un4Zurvan/Un4Zurvan.cs index b7f87cae33..2bc3cb8591 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un4Zurvan/Un4Zurvan.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un4Zurvan/Un4Zurvan.cs @@ -1,42 +1,29 @@ namespace BossMod.Endwalker.Unreal.Un4Zurvan; class P1MetalCutter(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.MetalCutterP1), new AOEShapeCone(37.44f, 45.Degrees()), (uint)OID.BossP1); - class P1FlareStar(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.FlareStarAOE), 6); - class P1Purge(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.Purge)); - class P2MetalCutter(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.MetalCutterP2), new AOEShapeCone(37.44f, 45.Degrees()), (uint)OID.BossP2); - class P2IcyVoidzone(BossModule module) : Components.PersistentVoidzone(module, 5, m => m.Enemies(OID.IcyVoidzone).Where(z => z.EventState != 7)); - class P2BitingHalberd(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.BitingHalberd), new AOEShapeCone(55.27f, 135.Degrees())); - class P2TailEnd(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TailEnd), new AOEShapeCircle(15)); - class P2Ciclicle(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Ciclicle), new AOEShapeDonut(10, 20)); // TODO: verify inner radius - class P2SouthernCross(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.SouthernCrossAOE), 6); - class P2SouthernCrossVoidzone(BossModule module) : Components.PersistentVoidzone(module, 6, m => m.Enemies(OID.SouthernCrossVoidzone).Where(z => z.EventState != 7)); - class P2WaveCannon(BossModule module) : Components.BaitAwayCast(module, ActionID.MakeSpell(AID.WaveCannonSolo), new AOEShapeRect(55.27f, 5)); - class P2TyrfingFire(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.TyrfingFire), new AOEShapeCircle(5), (uint)OID.BossP2, originAtTarget: true); [ConfigDisplay(Order = 0x340, Parent = typeof(EndwalkerConfig))] public class Un4ZurvanConfig() : CooldownPlanningConfigNode(90); [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.BossP1, GroupType = BossModuleInfo.GroupType.RemovedUnreal, GroupID = 951, NameID = 5567)] -public class Un4Zurvan : BossModule +public class Un4Zurvan(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(0, 0), 20)) { private Actor? _bossP2; public Actor? BossP1() => PrimaryActor.IsDestroyed ? null : PrimaryActor; public Actor? BossP2() => _bossP2; - public Un4Zurvan(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(0, 0), 20)) { } - protected override void UpdateModule() { // TODO: this is an ugly hack, think how multi-actor fights can be implemented without it... diff --git a/BossMod/Modules/Endwalker/Unreal/Un5Thordan/BurningChains.cs b/BossMod/Modules/Endwalker/Unreal/Un5Thordan/BurningChains.cs deleted file mode 100644 index c96c03f4ab..0000000000 --- a/BossMod/Modules/Endwalker/Unreal/Un5Thordan/BurningChains.cs +++ /dev/null @@ -1,49 +0,0 @@ -namespace BossMod.Endwalker.Unreal.Un5Thordan; - -// TODO: consider showing tethers only if distance is too small?.. -class BurningChains : Components.CastCounter -{ - private int[] _tetherPartners = Utils.MakeArray(PartyState.MaxPartySize, -1); - - public BurningChains() : base(ActionID.MakeSpell(AID.HolyChain)) { } - - public override void AddHints(int slot, Actor actor, TextHints hints) - { - if (_tetherPartners[slot] >= 0) - hints.Add("Break chains!"); - } - - public override void DrawArenaForeground(int pcSlot, Actor pc) - { - var partner = Raid[_tetherPartners[pcSlot]]; - if (partner != null) - arena.AddLine(pc.Position, partner.Position, ArenaColor.Danger); - } - - public override void OnTethered(Actor source, ActorTetherInfo tether) - { - if (tether.ID == (uint)TetherID.BurningChains) - { - var src = Raid.FindSlot(source.InstanceID); - var tgt = Raid.FindSlot(tether.Target); - if (src >= 0 && tgt >= 0) - { - _tetherPartners[src] = tgt; - _tetherPartners[tgt] = src; - } - } - } - - public override void OnUntethered(Actor source, ActorTetherInfo tether) - { - if (tether.ID == (uint)TetherID.BurningChains) - { - var src = Raid.FindSlot(source.InstanceID); - var tgt = Raid.FindSlot(tether.Target); - if (src >= 0) - _tetherPartners[src] = -1; - if (tgt >= 0) - _tetherPartners[tgt] = -1; - } - } -} diff --git a/BossMod/Modules/Endwalker/Unreal/Un5Thordan/DragonsGaze.cs b/BossMod/Modules/Endwalker/Unreal/Un5Thordan/DragonsGaze.cs index 60c8ddaf76..7a93189ac8 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un5Thordan/DragonsGaze.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un5Thordan/DragonsGaze.cs @@ -1,6 +1,6 @@ namespace BossMod.Endwalker.Unreal.Un5Thordan; -class DragonsGaze : Components.GenericGaze +class DragonsGaze(BossModule module) : Components.GenericGaze(module) { private List _casters = new(); private WPos _posHint; @@ -9,9 +9,9 @@ class DragonsGaze : Components.GenericGaze public override void DrawArenaForeground(int pcSlot, Actor pc) { - base.DrawArenaForeground(module, pcSlot, pc, arena); + base.DrawArenaForeground(pcSlot, pc); if (_posHint != default) - arena.AddCircle(_posHint, 1, ArenaColor.Safe); + Arena.AddCircle(_posHint, 1, ArenaColor.Safe); } public override void OnCastStarted(Actor caster, ActorCastInfo spell) @@ -29,7 +29,7 @@ public override void OnCastFinished(Actor caster, ActorCastInfo spell) _casters.Remove(caster); } - public override void OnActorEAnim(BossModule module, Actor actor, uint state) + public override void OnActorEAnim(Actor actor, uint state) { if (state == 0x00040008 && (OID)actor.OID is >= OID.DragonEyeN and <= OID.DragonEyeNW) { diff --git a/BossMod/Modules/Endwalker/Unreal/Un5Thordan/HolyShieldBash.cs b/BossMod/Modules/Endwalker/Unreal/Un5Thordan/HolyShieldBash.cs index 75b0234a28..6960743777 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un5Thordan/HolyShieldBash.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un5Thordan/HolyShieldBash.cs @@ -1,13 +1,9 @@ namespace BossMod.Endwalker.Unreal.Un5Thordan; -class HolyShieldBash : Components.GenericWildCharge +class HolyShieldBash(BossModule module) : Components.GenericWildCharge(module, 3) { - public HolyShieldBash() : base(3) { } - public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) - { - return PlayerRoles[playerSlot] == PlayerRole.Target ? PlayerPriority.Interesting : PlayerPriority.Irrelevant; - } + => PlayerRoles[playerSlot] == PlayerRole.Target ? PlayerPriority.Interesting : PlayerPriority.Irrelevant; public override void OnCastStarted(Actor caster, ActorCastInfo spell) { diff --git a/BossMod/Modules/Endwalker/Unreal/Un5Thordan/Intermission2.cs b/BossMod/Modules/Endwalker/Unreal/Un5Thordan/Intermission2.cs index 82365ef7a6..c82e2f640a 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un5Thordan/Intermission2.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un5Thordan/Intermission2.cs @@ -1,6 +1,6 @@ namespace BossMod.Endwalker.Unreal.Un5Thordan; -class SwordShieldOfTheHeavens : BossComponent +class SwordShieldOfTheHeavens(BossModule module) : BossComponent(module) { public enum Buff { None, Shield, Sword } @@ -35,7 +35,7 @@ public override void AddGlobalHints(GlobalHints hints) public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (var a in _adds) - arena.Actor(a.actor, ArenaColor.Enemy); + Arena.Actor(a.actor, ArenaColor.Enemy); } public override void OnStatusGain(Actor actor, ActorStatus status) @@ -72,12 +72,10 @@ public override void OnStatusLose(Actor actor, ActorStatus status) class HoliestOfHoly(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.HoliestOfHoly)); -class SkywardLeap : Components.GenericBaitAway +class SkywardLeap(BossModule module) : Components.GenericBaitAway(module, ActionID.MakeSpell(AID.SkywardLeap), centerAtTarget: true) { private static readonly AOEShapeCircle _shape = new(20); // not sure about the spread radius, 15 seems to be enough but damage goes up to 20 - public SkywardLeap() : base(ActionID.MakeSpell(AID.SkywardLeap), centerAtTarget: true) { } - public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.SkywardLeap) diff --git a/BossMod/Modules/Endwalker/Unreal/Un5Thordan/Intermission3.cs b/BossMod/Modules/Endwalker/Unreal/Un5Thordan/Intermission3.cs index 37a0d25274..53393dfecc 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un5Thordan/Intermission3.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un5Thordan/Intermission3.cs @@ -1,9 +1,7 @@ namespace BossMod.Endwalker.Unreal.Un5Thordan; -class HiemalStormSpread : Components.UniformStackSpread +class HiemalStormSpread(BossModule module) : Components.UniformStackSpread(module, 0, 6, alwaysShowSpreads: true) { - public HiemalStormSpread() : base(0, 6, alwaysShowSpreads: true) { } - public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.HiemalStorm) @@ -18,15 +16,11 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } class HiemalStormVoidzone(BossModule module) : Components.PersistentVoidzone(module, 6, m => m.Enemies(OID.HiemalStorm).Where(x => x.EventState != 7)); - class SpiralPierce(BossModule module) : Components.BaitAwayTethers(module, new AOEShapeRect(50, 6), (uint)TetherID.SpiralPierce, ActionID.MakeSpell(AID.SpiralPierce)); - class DimensionalCollapse(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.DimensionalCollapseAOE), 9); -class FaithUnmoving : Components.Knockback +class FaithUnmoving(BossModule module) : Components.Knockback(module, ActionID.MakeSpell(AID.FaithUnmoving), true) { - public FaithUnmoving() : base(ActionID.MakeSpell(AID.FaithUnmoving), true) { } - public override IEnumerable Sources(int slot, Actor actor) { yield return new(Module.Bounds.Center, 16); @@ -34,15 +28,12 @@ public override IEnumerable Sources(int slot, Actor actor) } class CometCircle(BossModule module) : Components.Adds(module, (uint)OID.CometCircle); - class MeteorCircle(BossModule module) : Components.Adds(module, (uint)OID.MeteorCircle); -class HeavyImpact : Components.ConcentricAOEs +class HeavyImpact(BossModule module) : Components.ConcentricAOEs(module, _shapes) { private static readonly AOEShape[] _shapes = { new AOEShapeCone(6.5f, 135.Degrees()), new AOEShapeDonutSector(6.5f, 12.5f, 135.Degrees()), new AOEShapeDonutSector(12.5f, 18.5f, 135.Degrees()), new AOEShapeDonutSector(18.5f, 27.5f, 135.Degrees()) }; - public HeavyImpact() : base(_shapes) { } - public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.HeavyImpactAOE1) diff --git a/BossMod/Modules/Endwalker/Unreal/Un5Thordan/LightningStorm.cs b/BossMod/Modules/Endwalker/Unreal/Un5Thordan/LightningStorm.cs index 5eb5695edb..d8d8c9e6a2 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un5Thordan/LightningStorm.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un5Thordan/LightningStorm.cs @@ -1,10 +1,8 @@ namespace BossMod.Endwalker.Unreal.Un5Thordan; // note: we don't use simple 'spread from cast targets', because casts are staggered a bit, which is ugly -class LightningStorm : Components.UniformStackSpread +class LightningStorm(BossModule module) : Components.UniformStackSpread(module, 0, 5, alwaysShowSpreads: true) { - public LightningStorm() : base(0, 5, alwaysShowSpreads: true) { } - public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.LightningStorm) diff --git a/BossMod/Modules/Endwalker/Unreal/Un5Thordan/SpiralThrust.cs b/BossMod/Modules/Endwalker/Unreal/Un5Thordan/SpiralThrust.cs index 9d2242b97f..e14d7679ce 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un5Thordan/SpiralThrust.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un5Thordan/SpiralThrust.cs @@ -1,17 +1,12 @@ namespace BossMod.Endwalker.Unreal.Un5Thordan; -abstract class SpiralThrust : Components.GenericAOEs +abstract class SpiralThrust(BossModule module, float predictionDelay) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.SpiralThrust)) { - private float _predictionDelay; + private float _predictionDelay = predictionDelay; private List _aoes = new(); private static readonly AOEShapeRect _shape = new(54.2f, 6); - public SpiralThrust(float predictionDelay) : base(ActionID.MakeSpell(AID.SpiralThrust)) - { - _predictionDelay = predictionDelay; - } - public override IEnumerable ActiveAOEs(int slot, Actor actor) => _aoes; public override void OnCastStarted(Actor caster, ActorCastInfo spell) diff --git a/BossMod/Modules/Endwalker/Unreal/Un5Thordan/Un5Thordan.cs b/BossMod/Modules/Endwalker/Unreal/Un5Thordan/Un5Thordan.cs index 711c73e83f..85347f3fea 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un5Thordan/Un5Thordan.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un5Thordan/Un5Thordan.cs @@ -1,30 +1,18 @@ namespace BossMod.Endwalker.Unreal.Un5Thordan; class AscalonsMight(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.AscalonsMight), new AOEShapeCone(8 + 3.8f, 45.Degrees())); - class Meteorain(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.MeteorainAOE), 6); - class AscalonsMercy(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.AscalonsMercy), new AOEShapeCone(34.8f, 10.Degrees())); - class AscalonsMercyHelper(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.AscalonsMercyAOE), new AOEShapeCone(34.5f, 10.Degrees())); - class DragonsRage(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.DragonsRage), 6, 6); - class Heavensflame(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.HeavensflameAOE), 6); - class Conviction(BossModule module) : Components.CastTowers(module, ActionID.MakeSpell(AID.ConvictionAOE), 3); - +class BurningChains(BossModule module) : Components.Chains(module, (uint)TetherID.BurningChains, ActionID.MakeSpell(AID.HolyChain)); class SerZephirin(BossModule module) : Components.Adds(module, (uint)OID.Zephirin); - -// TODO: show knockback 3 from [-0.8, -16.3] -class LightOfAscalon(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.LightOfAscalon)); - +class LightOfAscalon(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.LightOfAscalon)); // TODO: show knockback 3 from [-0.8, -16.3] class UltimateEnd(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.UltimateEndAOE)); - class HeavenswardLeap(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.HeavenswardLeap)); - class PureOfSoul(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.PureOfSoul)); - class AbsoluteConviction(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.AbsoluteConviction)); [ConfigDisplay(Order = 0x350, Parent = typeof(EndwalkerConfig))] diff --git a/BossMod/Modules/Global/GoldSaucer/TheSliceIsRight/TheSliceIsRight.cs b/BossMod/Modules/Global/GoldSaucer/TheSliceIsRight/TheSliceIsRight.cs index 5f9788a76c..bcdfcb36ad 100644 --- a/BossMod/Modules/Global/GoldSaucer/TheSliceIsRight/TheSliceIsRight.cs +++ b/BossMod/Modules/Global/GoldSaucer/TheSliceIsRight/TheSliceIsRight.cs @@ -36,7 +36,7 @@ public enum AID : uint BadCup = 18337, // 25AC->self, 1.0s cast, range 15+R 120-degree cone } -class BambooSplits : Components.GenericAOEs +class BambooSplits(BossModule module) : Components.GenericAOEs(module) { private readonly List _doublesidedsplit = []; private readonly List _singlesplit = []; @@ -84,7 +84,7 @@ public override void Update() } } - public override void OnActorEAnim(BossModule module, Actor actor, uint state) + public override void OnActorEAnim(Actor actor, uint state) { if (state == 0x00010002) //bamboo gets activated, technically we could draw the AOEs before, but then we could see different sets overlap { @@ -116,9 +116,7 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } class DaigoroFirstGilJump(BossModule module) : Components.ChargeAOEs(module, ActionID.MakeSpell(AID.FirstGilJump), 3.5f); - class DaigoroNextGilJump(BossModule module) : Components.ChargeAOEs(module, ActionID.MakeSpell(AID.NextGilJump), 3.5f); - class DaigoroBadCup(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.BadCup), new AOEShapeCone(17.5f, 60.Degrees())); class TheSliceIsRightStates : StateMachineBuilder @@ -133,9 +131,7 @@ public TheSliceIsRightStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.GoldSaucer, GroupID = 181, NameID = 9066)] -public class TheSliceIsRight : BossModule +public class TheSliceIsRight(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(70.5f, -36), 15)) { - public TheSliceIsRight(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(70.5f, -36), 15)) { } - protected override bool CheckPull() { return PrimaryActor != null; } } diff --git a/BossMod/Modules/Global/MaskedCarnivale/ObstacleLayouts.cs b/BossMod/Modules/Global/MaskedCarnivale/ObstacleLayouts.cs index 27f3ad2d16..3ca81c79c3 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/ObstacleLayouts.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/ObstacleLayouts.cs @@ -1,6 +1,6 @@ namespace BossMod.Global.MaskedCarnivale; -public class Layout2Corners : BossComponent +public class Layout2Corners(BossModule module) : BossComponent(module) { public static IEnumerable Wall1A() { @@ -34,15 +34,15 @@ public static IEnumerable Wall2B() public override void DrawArenaForeground(int pcSlot, Actor pc) { - arena.AddPolygon(Wall1A(), ArenaColor.Border); - arena.AddPolygon(Wall1B(), ArenaColor.Border); - arena.AddPolygon(Wall2A(), ArenaColor.Border); - arena.AddPolygon(Wall2B(), ArenaColor.Border); + Arena.AddPolygon(Wall1A(), ArenaColor.Border); + Arena.AddPolygon(Wall1B(), ArenaColor.Border); + Arena.AddPolygon(Wall2A(), ArenaColor.Border); + Arena.AddPolygon(Wall2B(), ArenaColor.Border); } public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { - base.AddAIHints(module, slot, actor, assignment, hints); + base.AddAIHints(slot, actor, assignment, hints); hints.AddForbiddenZone(ShapeDistance.ConvexPolygon(Wall1A(), false)); hints.AddForbiddenZone(ShapeDistance.ConvexPolygon(Wall1B(), false)); hints.AddForbiddenZone(ShapeDistance.ConvexPolygon(Wall2A(), false)); @@ -50,7 +50,7 @@ public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignme } } -public class Layout4Quads : BossComponent +public class Layout4Quads(BossModule module) : BossComponent(module) { public static IEnumerable Quad1() { @@ -84,15 +84,15 @@ public static IEnumerable Quad4() } public override void DrawArenaForeground(int pcSlot, Actor pc) { - arena.AddPolygon(Quad1(), ArenaColor.Border); - arena.AddPolygon(Quad2(), ArenaColor.Border); - arena.AddPolygon(Quad3(), ArenaColor.Border); - arena.AddPolygon(Quad4(), ArenaColor.Border); + Arena.AddPolygon(Quad1(), ArenaColor.Border); + Arena.AddPolygon(Quad2(), ArenaColor.Border); + Arena.AddPolygon(Quad3(), ArenaColor.Border); + Arena.AddPolygon(Quad4(), ArenaColor.Border); } public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { - base.AddAIHints(module, slot, actor, assignment, hints); + base.AddAIHints(slot, actor, assignment, hints); hints.AddForbiddenZone(ShapeDistance.ConvexPolygon(Quad1(), false)); hints.AddForbiddenZone(ShapeDistance.ConvexPolygon(Quad2(), false)); hints.AddForbiddenZone(ShapeDistance.ConvexPolygon(Quad3(), false)); @@ -100,7 +100,7 @@ public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignme } } -public class LayoutBigQuad : BossComponent +public class LayoutBigQuad(BossModule module) : BossComponent(module) { public static IEnumerable Quad() { @@ -111,12 +111,12 @@ public static IEnumerable Quad() } public override void DrawArenaForeground(int pcSlot, Actor pc) { - arena.AddPolygon(Quad(), ArenaColor.Border); + Arena.AddPolygon(Quad(), ArenaColor.Border); } public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { - base.AddAIHints(module, slot, actor, assignment, hints); + base.AddAIHints(slot, actor, assignment, hints); hints.AddForbiddenZone(ShapeDistance.ConvexPolygon(Quad(), false)); } } diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage01AllsWellThatStartsWell/Stage01.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage01AllsWellThatStartsWell/Stage01.cs index 095260f065..4441feddf8 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage01AllsWellThatStartsWell/Stage01.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage01AllsWellThatStartsWell/Stage01.cs @@ -16,7 +16,7 @@ public enum AID : uint class IronJustice(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.IronJustice), new AOEShapeCone(9.5f, 60.Degrees())); -class Hints : BossComponent +class Hints(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage02MuchAdoAboutPudding/Stage02Act1.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage02MuchAdoAboutPudding/Stage02Act1.cs index eb71191779..af115140f4 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage02MuchAdoAboutPudding/Stage02Act1.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage02MuchAdoAboutPudding/Stage02Act1.cs @@ -17,7 +17,7 @@ public enum AID : uint class GoldenTongue(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.GoldenTongue), "Can be interrupted, increase its magic damage"); -class Hints : BossComponent +class Hints(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { @@ -25,7 +25,7 @@ public override void AddGlobalHints(GlobalHints hints) } } -class Hints2 : BossComponent +class Hints2(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage02MuchAdoAboutPudding/Stage02Act2.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage02MuchAdoAboutPudding/Stage02Act2.cs index f26b00ccac..54a0683a8e 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage02MuchAdoAboutPudding/Stage02Act2.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage02MuchAdoAboutPudding/Stage02Act2.cs @@ -18,7 +18,7 @@ public enum AID : uint class GoldenTongue(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.GoldenTongue), "Can be interrupted, increases its magic damage."); -class Hints : BossComponent +class Hints(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage03WaitingForGolem/Stage03.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage03WaitingForGolem/Stage03.cs index 846c4fc9dc..65985459df 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage03WaitingForGolem/Stage03.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage03WaitingForGolem/Stage03.cs @@ -20,7 +20,7 @@ class Dreadstorm(BossModule module) : Components.PersistentVoidzoneAtCastTarget( class Obliterate(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.Obliterate), "Interruptible raidwide"); -class Hints : BossComponent +class Hints(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { @@ -28,7 +28,7 @@ public override void AddGlobalHints(GlobalHints hints) } } -class Hints2 : BossComponent +class Hints2(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage04GentlemanPreferSwords/Stage04Act1.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage04GentlemanPreferSwords/Stage04Act1.cs index 6e20c907ee..585d4e3fab 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage04GentlemanPreferSwords/Stage04Act1.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage04GentlemanPreferSwords/Stage04Act1.cs @@ -14,7 +14,7 @@ public enum AID : uint SanguineBite = 14361, // 25C8->self, no cast, range 3+R width 2 rect } -class Hints : BossComponent +class Hints(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { @@ -22,7 +22,7 @@ public override void AddGlobalHints(GlobalHints hints) } } -class Hints2 : BossComponent +class Hints2(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage04GentlemanPreferSwords/Stage04Act2.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage04GentlemanPreferSwords/Stage04Act2.cs index 976fc31518..ca96004ae9 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage04GentlemanPreferSwords/Stage04Act2.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage04GentlemanPreferSwords/Stage04Act2.cs @@ -22,7 +22,7 @@ class MagitekRay(BossModule module) : Components.LocationTargetedAOEs(module, Ac class MagitekField(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.MagitekField), "Interruptible, increases its defenses"); -class Hints : BossComponent +class Hints(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { @@ -30,7 +30,7 @@ public override void AddGlobalHints(GlobalHints hints) } } -class Hints2 : BossComponent +class Hints2(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage05TheThreepennyTurtles/Stage05.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage05TheThreepennyTurtles/Stage05.cs index 9c44903d8d..39fa20775c 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage05TheThreepennyTurtles/Stage05.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage05TheThreepennyTurtles/Stage05.cs @@ -5,7 +5,7 @@ public enum OID : uint Boss = 0x25CC, //R=5.0 } -class Hints : BossComponent +class Hints(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage06EyeSociety/Stage06Act1.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage06EyeSociety/Stage06Act1.cs index 00dd5aa8c8..c3babb3014 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage06EyeSociety/Stage06Act1.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage06EyeSociety/Stage06Act1.cs @@ -19,12 +19,10 @@ public enum SID : uint Blind = 571, // Mandragora->player, extra=0x0 } -class DemonEye : Components.CastGaze +class DemonEye(BossModule module) : Components.CastGaze(module, ActionID.MakeSpell(AID.DemonEye)) { private BitMask _blinded; - public DemonEye() : base(ActionID.MakeSpell(AID.DemonEye)) { } - public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Blind) @@ -39,16 +37,14 @@ public override void OnStatusLose(Actor actor, ActorStatus status) public override IEnumerable ActiveEyes(int slot, Actor actor) { - return _blinded[slot] ? Enumerable.Empty() : base.ActiveEyes(module, slot, actor); + return _blinded[slot] ? Enumerable.Empty() : base.ActiveEyes(slot, actor); } } -class ColdStare : Components.SelfTargetedAOEs //TODO: cone based gaze +class ColdStare(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ColdStare), new AOEShapeCone(42.53f, 45.Degrees())) //TODO: cone based gaze { private BitMask _blinded; - public ColdStare() : base(ActionID.MakeSpell(AID.ColdStare), new AOEShapeCone(42.53f, 45.Degrees())) { } - public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Blind) @@ -63,16 +59,14 @@ public override void OnStatusLose(Actor actor, ActorStatus status) public override IEnumerable ActiveAOEs(int slot, Actor actor) { - return _blinded[slot] ? Enumerable.Empty() : base.ActiveAOEs(module, slot, actor); + return _blinded[slot] ? Enumerable.Empty() : base.ActiveAOEs(slot, actor); } } -class TearyTwirl : Components.StackWithCastTargets +class TearyTwirl(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.TearyTwirl), 6.3f) { private BitMask _blinded; - public TearyTwirl() : base(ActionID.MakeSpell(AID.TearyTwirl), 6.3f) { } - public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Blind) @@ -94,7 +88,7 @@ public override void AddHints(int slot, Actor actor, TextHints hints) } } -class Hints : BossComponent +class Hints(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage06EyeSociety/Stage06Act2.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage06EyeSociety/Stage06Act2.cs index 56a09fca92..607fd4c144 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage06EyeSociety/Stage06Act2.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage06EyeSociety/Stage06Act2.cs @@ -15,19 +15,17 @@ public enum AID : uint ColdStare = 14692, // 26FF->self, 2,5s cast, range 40+R 90-degree cone Stone = 14695, // 25CE->player, 1,0s cast, single-target DreadGaze = 14694, // 25CE->self, 3,0s cast, range 6+R ?-degree cone - } + public enum SID : uint { Blind = 571, // Mandragora->player, extra=0x0 - } -class DemonEye : Components.CastGaze + +class DemonEye(BossModule module) : Components.CastGaze(module, ActionID.MakeSpell(AID.DemonEye)) { private BitMask _blinded; - public DemonEye() : base(ActionID.MakeSpell(AID.DemonEye)) { } - public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Blind) @@ -42,16 +40,14 @@ public override void OnStatusLose(Actor actor, ActorStatus status) public override IEnumerable ActiveEyes(int slot, Actor actor) { - return _blinded[slot] ? Enumerable.Empty() : base.ActiveEyes(module, slot, actor); + return _blinded[slot] ? Enumerable.Empty() : base.ActiveEyes(slot, actor); } } -class ColdStare : Components.SelfTargetedAOEs //TODO: cone based gaze +class ColdStare(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ColdStare), new AOEShapeCone(42.53f, 45.Degrees())) //TODO: cone based gaze { private BitMask _blinded; - public ColdStare() : base(ActionID.MakeSpell(AID.ColdStare), new AOEShapeCone(42.53f, 45.Degrees())) { } - public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Blind) @@ -66,16 +62,14 @@ public override void OnStatusLose(Actor actor, ActorStatus status) public override IEnumerable ActiveAOEs(int slot, Actor actor) { - return _blinded[slot] ? Enumerable.Empty() : base.ActiveAOEs(module, slot, actor); + return _blinded[slot] ? Enumerable.Empty() : base.ActiveAOEs(slot, actor); } } -class TearyTwirl : Components.StackWithCastTargets +class TearyTwirl(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.TearyTwirl), 6.3f) { private BitMask _blinded; - public TearyTwirl() : base(ActionID.MakeSpell(AID.TearyTwirl), 6.3f) { } - public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Blind) @@ -97,12 +91,10 @@ public override void AddHints(int slot, Actor actor, TextHints hints) } } -class DreadGaze : Components.SelfTargetedAOEs //TODO: cone based gaze +class DreadGaze(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.DreadGaze), new AOEShapeCone(7.35f, 45.Degrees())) //TODO: cone based gaze { private BitMask _blinded; - public DreadGaze() : base(ActionID.MakeSpell(AID.DreadGaze), new AOEShapeCone(7.35f, 45.Degrees())) { } - public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.Blind) @@ -117,11 +109,11 @@ public override void OnStatusLose(Actor actor, ActorStatus status) public override IEnumerable ActiveAOEs(int slot, Actor actor) { - return _blinded[slot] ? Enumerable.Empty() : base.ActiveAOEs(module, slot, actor); + return _blinded[slot] ? Enumerable.Empty() : base.ActiveAOEs(slot, actor); } } -class Hints : BossComponent +class Hints(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage07AChorusSlime/Stage07Act1.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage07AChorusSlime/Stage07Act1.cs index 573cddd03d..583a3a9baf 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage07AChorusSlime/Stage07Act1.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage07AChorusSlime/Stage07Act1.cs @@ -12,15 +12,15 @@ public enum AID : uint Blizzard = 14709, // 2702->player, 1,0s cast, single-target } -class SlimeExplosion : Components.GenericStackSpread +class SlimeExplosion(BossModule module) : Components.GenericStackSpread(module) { public override void DrawArenaForeground(int pcSlot, Actor pc) { if (!Module.PrimaryActor.IsDead) { - if (arena.Config.ShowOutlinesAndShadows) - arena.AddCircle(Module.PrimaryActor.Position, 7.6f, 0xFF000000, 2); - arena.AddCircle(Module.PrimaryActor.Position, 7.6f, ArenaColor.Danger); + if (Arena.Config.ShowOutlinesAndShadows) + Arena.AddCircle(Module.PrimaryActor.Position, 7.6f, 0xFF000000, 2); + Arena.AddCircle(Module.PrimaryActor.Position, 7.6f, ArenaColor.Danger); } } public override void AddHints(int slot, Actor actor, TextHints hints) @@ -31,7 +31,7 @@ public override void AddHints(int slot, Actor actor, TextHints hints) } } -class Hints : BossComponent +class Hints(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { @@ -39,7 +39,7 @@ public override void AddGlobalHints(GlobalHints hints) } } -class Hints2 : BossComponent +class Hints2(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage07AChorusSlime/Stage07Act2.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage07AChorusSlime/Stage07Act2.cs index f223da6273..6eb70b60bf 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage07AChorusSlime/Stage07Act2.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage07AChorusSlime/Stage07Act2.cs @@ -12,15 +12,15 @@ public enum AID : uint Blizzard = 14709, // 2704->player, 1,0s cast, single-target } -class SlimeExplosion : Components.GenericStackSpread +class SlimeExplosion(BossModule module) : Components.GenericStackSpread(module) { public override void DrawArenaForeground(int pcSlot, Actor pc) { - foreach (var p in module.Enemies(OID.Boss).Where(x => !x.IsDead)) + foreach (var p in Module.Enemies(OID.Boss).Where(x => !x.IsDead)) { - if (arena.Config.ShowOutlinesAndShadows) - arena.AddCircle(p.Position, 7.6f, 0xFF000000, 2); - arena.AddCircle(p.Position, 7.6f, ArenaColor.Danger); + if (Arena.Config.ShowOutlinesAndShadows) + Arena.AddCircle(p.Position, 7.6f, 0xFF000000, 2); + Arena.AddCircle(p.Position, 7.6f, ArenaColor.Danger); } } @@ -32,7 +32,7 @@ public override void AddHints(int slot, Actor actor, TextHints hints) } } -class Hints : BossComponent +class Hints(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { @@ -40,7 +40,7 @@ public override void AddGlobalHints(GlobalHints hints) } } -class Layout : Layout4Quads { } +class Layout(BossModule module) : Layout4Quads(module); class Stage07Act2States : StateMachineBuilder { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage07AChorusSlime/Stage07Act3.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage07AChorusSlime/Stage07Act3.cs index 8362d12cc2..fc312d1149 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage07AChorusSlime/Stage07Act3.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage07AChorusSlime/Stage07Act3.cs @@ -15,15 +15,15 @@ public enum AID : uint class LowVoltage(BossModule module) : Components.GenericLineOfSightAOE(module, ActionID.MakeSpell(AID.LowVoltage), 35, true); //TODO: find a way to use the obstacles on the map and draw proper AOEs, this does nothing right now -class SlimeExplosion : Components.GenericStackSpread +class SlimeExplosion(BossModule module) : Components.GenericStackSpread(module) { public override void DrawArenaForeground(int pcSlot, Actor pc) { - foreach (var p in module.Enemies(OID.Slime).Where(x => !x.IsDead)) + foreach (var p in Module.Enemies(OID.Slime).Where(x => !x.IsDead)) { - if (arena.Config.ShowOutlinesAndShadows) - arena.AddCircle(p.Position, 7.6f, 0xFF000000, 2); - arena.AddCircle(p.Position, 7.6f, ArenaColor.Danger); + if (Arena.Config.ShowOutlinesAndShadows) + Arena.AddCircle(p.Position, 7.6f, 0xFF000000, 2); + Arena.AddCircle(p.Position, 7.6f, ArenaColor.Danger); } } @@ -35,7 +35,7 @@ public override void AddHints(int slot, Actor actor, TextHints hints) } } -class Hints : BossComponent +class Hints(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage08BombedyOfErrors/Stage08Act1.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage08BombedyOfErrors/Stage08Act1.cs index 3e56fea738..385dacd9e8 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage08BombedyOfErrors/Stage08Act1.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage08BombedyOfErrors/Stage08Act1.cs @@ -14,28 +14,29 @@ public enum AID : uint SelfDestruct2 = 14688, // 2709->self, no cast, range 6 circle } -class Selfdetonations : BossComponent +class Selfdetonations(BossModule module) : BossComponent(module) { private static readonly string hint = "In bomb explosion radius!"; + public override void DrawArenaForeground(int pcSlot, Actor pc) { if (!Module.PrimaryActor.IsDead) { - if (arena.Config.ShowOutlinesAndShadows) - arena.AddCircle(Module.PrimaryActor.Position, 10, 0xFF000000, 2); - arena.AddCircle(Module.PrimaryActor.Position, 10, ArenaColor.Danger); + if (Arena.Config.ShowOutlinesAndShadows) + Arena.AddCircle(Module.PrimaryActor.Position, 10, 0xFF000000, 2); + Arena.AddCircle(Module.PrimaryActor.Position, 10, ArenaColor.Danger); } - foreach (var p in module.Enemies(OID.Bomb).Where(x => !x.IsDead)) + foreach (var p in Module.Enemies(OID.Bomb).Where(x => !x.IsDead)) { - if (arena.Config.ShowOutlinesAndShadows) - arena.AddCircle(p.Position, 6, 0xFF000000, 2); - arena.AddCircle(p.Position, 6, ArenaColor.Danger); + if (Arena.Config.ShowOutlinesAndShadows) + Arena.AddCircle(p.Position, 6, 0xFF000000, 2); + Arena.AddCircle(p.Position, 6, ArenaColor.Danger); } - foreach (var p in module.Enemies(OID.Snoll).Where(x => !x.IsDead)) + foreach (var p in Module.Enemies(OID.Snoll).Where(x => !x.IsDead)) { - if (arena.Config.ShowOutlinesAndShadows) - arena.AddCircle(p.Position, 6, 0xFF000000, 2); - arena.AddCircle(p.Position, 6, ArenaColor.Danger); + if (Arena.Config.ShowOutlinesAndShadows) + Arena.AddCircle(p.Position, 6, 0xFF000000, 2); + Arena.AddCircle(p.Position, 6, ArenaColor.Danger); } } @@ -43,16 +44,16 @@ public override void AddHints(int slot, Actor actor, TextHints hints) { if (!Module.PrimaryActor.IsDead && actor.Position.InCircle(Module.PrimaryActor.Position, 10)) hints.Add(hint); - foreach (var p in module.Enemies(OID.Bomb).Where(x => !x.IsDead)) + foreach (var p in Module.Enemies(OID.Bomb).Where(x => !x.IsDead)) if (actor.Position.InCircle(p.Position, 6)) hints.Add(hint); - foreach (var p in module.Enemies(OID.Snoll).Where(x => !x.IsDead)) + foreach (var p in Module.Enemies(OID.Snoll).Where(x => !x.IsDead)) if (actor.Position.InCircle(p.Position, 6)) hints.Add(hint); } } -class Hints : BossComponent +class Hints(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { @@ -60,7 +61,7 @@ public override void AddGlobalHints(GlobalHints hints) } } -class Hints2 : BossComponent +class Hints2(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage08BombedyOfErrors/Stage08Act2.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage08BombedyOfErrors/Stage08Act2.cs index a442b6c8dd..25d8434ab7 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage08BombedyOfErrors/Stage08Act2.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage08BombedyOfErrors/Stage08Act2.cs @@ -17,40 +17,40 @@ public enum AID : uint } class Sap(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Sap), 8); - class Burst(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.Burst), "Interrupt or wipe!"); -class Selfdetonations : BossComponent +class Selfdetonations(BossModule module) : BossComponent(module) { private static readonly string hint = "In bomb explosion radius!"; + public override void DrawArenaForeground(int pcSlot, Actor pc) { - foreach (var p in module.Enemies(OID.Bomb).Where(x => !x.IsDead)) + foreach (var p in Module.Enemies(OID.Bomb).Where(x => !x.IsDead)) { - if (arena.Config.ShowOutlinesAndShadows) - arena.AddCircle(p.Position, 10, 0xFF000000, 2); - arena.AddCircle(p.Position, 10, ArenaColor.Danger); + if (Arena.Config.ShowOutlinesAndShadows) + Arena.AddCircle(p.Position, 10, 0xFF000000, 2); + Arena.AddCircle(p.Position, 10, ArenaColor.Danger); } - foreach (var p in module.Enemies(OID.Snoll).Where(x => !x.IsDead)) + foreach (var p in Module.Enemies(OID.Snoll).Where(x => !x.IsDead)) { - if (arena.Config.ShowOutlinesAndShadows) - arena.AddCircle(p.Position, 6, 0xFF000000, 2); - arena.AddCircle(p.Position, 6, ArenaColor.Danger); + if (Arena.Config.ShowOutlinesAndShadows) + Arena.AddCircle(p.Position, 6, 0xFF000000, 2); + Arena.AddCircle(p.Position, 6, ArenaColor.Danger); } } public override void AddHints(int slot, Actor actor, TextHints hints) { - foreach (var p in module.Enemies(OID.Bomb).Where(x => !x.IsDead)) + foreach (var p in Module.Enemies(OID.Bomb).Where(x => !x.IsDead)) if (actor.Position.InCircle(p.Position, 10)) hints.Add(hint); - foreach (var p in module.Enemies(OID.Snoll).Where(x => !x.IsDead)) + foreach (var p in Module.Enemies(OID.Snoll).Where(x => !x.IsDead)) if (actor.Position.InCircle(p.Position, 6)) hints.Add(hint); } } -class Hints : BossComponent +class Hints(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage09ToKillAMockingslime/Stage09.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage09ToKillAMockingslime/Stage09.cs index 79b888d0d2..9579376ff6 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage09ToKillAMockingslime/Stage09.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage09ToKillAMockingslime/Stage09.cs @@ -31,7 +31,7 @@ class DarkVoidzone(BossModule module) : Components.PersistentVoidzoneAtCastTarge class Dark(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Dark), 5); -class Hints : BossComponent +class Hints(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage10ALittleKnightMusic/Stage10.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage10ALittleKnightMusic/Stage10.cs index d9b5a85d6f..eaf790acd4 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage10ALittleKnightMusic/Stage10.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage10ALittleKnightMusic/Stage10.cs @@ -21,33 +21,22 @@ public enum AID : uint } class IronJustice1(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.IronJustice1), new AOEShapeCone(9, 60.Degrees())); - class IronJustice2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.IronJustice2), new AOEShapeCone(9.5f, 60.Degrees())); - class IronJustice3(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.IronJustice3), new AOEShapeCone(10, 60.Degrees())); - class IronJustice4(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.IronJustice4), new AOEShapeCone(10.5f, 60.Degrees())); - class BlackNebula(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.BlackNebula), "Interrupt or wipe!"); - class Cloudcover1(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Cloudcover1), 6); +class KingsWill1(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.KingsWill), "Interrupt if not going for the achievement"); +class KingsWill2(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.KingsWill2), "Interrupt if not going for the achievement"); +class KingsWill3(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.KingsWill3), "Interrupt if not going for the achievement"); -class KingsWill1 : Components.CastHint -{ - public static readonly string hints = "Interrupt if not going for the achievement"; - public KingsWill1() : base(ActionID.MakeSpell(AID.KingsWill), hints) { } -} - -class KingsWill2(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.KingsWill2), KingsWill1.hints); - -class KingsWill3(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.KingsWill3), KingsWill1.hints); - -class Hints : BossComponent +class Hints(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { hints.Add("Crom Dubh will cast King's Will during the fight. Interrupt it with\nFlying Sardine or he will become stronger each time. After 3 casts he\nstarts using the interruptible enrage Black Nebula."); } + public override void AddHints(int slot, Actor actor, TextHints hints) { hints.Add("Requirement for achievement: Let Crom Dubh cast King's Will 3 times.", false); diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage11SomeLikeItExcruciatinglyHot/Stage11Act1.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage11SomeLikeItExcruciatinglyHot/Stage11Act1.cs index 8078b2d535..274ea5bb75 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage11SomeLikeItExcruciatinglyHot/Stage11Act1.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage11SomeLikeItExcruciatinglyHot/Stage11Act1.cs @@ -10,7 +10,7 @@ public enum AID : uint Fulmination = 14583, // 2718->self, 23,0s cast, range 60 circle } -class Hints : BossComponent +class Hints(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { @@ -35,6 +35,7 @@ public class Stage11Act1 : BossModule { ActivateComponent(); } + protected override void DrawEnemies(int pcSlot, Actor pc) { foreach (var s in Enemies(OID.Boss)) diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage11SomeLikeItExcruciatinglyHot/Stage11Act2.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage11SomeLikeItExcruciatinglyHot/Stage11Act2.cs index c25eba7436..0ce43ea3d6 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage11SomeLikeItExcruciatinglyHot/Stage11Act2.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage11SomeLikeItExcruciatinglyHot/Stage11Act2.cs @@ -10,7 +10,7 @@ public enum AID : uint Fulmination = 14583, // 2719->self, 23,0s cast, range 60 circle } -class Hints : BossComponent +class Hints(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { @@ -36,6 +36,7 @@ public class Stage11Act2 : BossModule ActivateComponent(); ActivateComponent(); } + protected override void DrawEnemies(int pcSlot, Actor pc) { foreach (var s in Enemies(OID.Boss)) diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage12ThePlantomOfTheOpera/Stage12Act1.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage12ThePlantomOfTheOpera/Stage12Act1.cs index 7f5bc9518b..553ff38deb 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage12ThePlantomOfTheOpera/Stage12Act1.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage12ThePlantomOfTheOpera/Stage12Act1.cs @@ -10,7 +10,7 @@ public enum AID : uint Seedvolley = 14750, // 271A->player, no cast, single-target } -class Hints : BossComponent +class Hints(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { @@ -34,6 +34,7 @@ public class Stage12Act1 : BossModule { ActivateComponent(); } + protected override void DrawEnemies(int pcSlot, Actor pc) { foreach (var s in Enemies(OID.Boss)) diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage12ThePlantomOfTheOpera/Stage12Act2.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage12ThePlantomOfTheOpera/Stage12Act2.cs index 7cb3fda4e5..048dd8db5a 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage12ThePlantomOfTheOpera/Stage12Act2.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage12ThePlantomOfTheOpera/Stage12Act2.cs @@ -16,14 +16,11 @@ public enum AID : uint } class WildHorn(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.WildHorn), new AOEShapeCone(16.96f, 60.Degrees())); - class Trounce(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Trounce), new AOEShapeCone(46.96f, 30.Degrees())); - class SporeSac(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.SporeSac), "Calls Roselets. Prepare Ice Spikes if available."); - class InflammableFumes(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.InflammableFumes), "Stun Boss with Bomb Toss. High damage but suriveable."); -class Hints : BossComponent +class Hints(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage13BeautyAndABeast/Stage13Act1.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage13BeautyAndABeast/Stage13Act1.cs index 68a6557746..c88e4d2455 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage13BeautyAndABeast/Stage13Act1.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage13BeautyAndABeast/Stage13Act1.cs @@ -14,7 +14,7 @@ public enum AID : uint class Mow(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Mow), new AOEShapeCone(7.4f, 60.Degrees())); -class Hints : BossComponent +class Hints(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage13BeautyAndABeast/Stage13Act2.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage13BeautyAndABeast/Stage13Act2.cs index 6af1ee5839..763ecdb64c 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage13BeautyAndABeast/Stage13Act2.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage13BeautyAndABeast/Stage13Act2.cs @@ -26,24 +26,16 @@ public enum AID : uint } class VoidFireII(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.VoidFireII), 5); - class VoidFireIV(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.VoidFireIV), 10); - class VoidFireIV3(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.VoidFireIV3), 6); - class VoidAero(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.VoidAero), new AOEShapeRect(42, 4)); - class DarkSabbath(BossModule module) : Components.CastGaze(module, ActionID.MakeSpell(AID.DarkSabbath)); - class DarkMist(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.DarkMist), new AOEShapeCircle(10)); - class CircleOfBlood(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.CircleOfBlood2), new AOEShapeDonut(10, 20)); - class BeguilingMist(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.BeguilingMist), "Interrupt or run around uncontrollably!"); - class BloodRain(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.BloodRain), "Harmless raidwide unless you failed to kill succubus in time"); -class Hints : BossComponent +class Hints(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage14BlobsInTheWoods/Stage14Act1.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage14BlobsInTheWoods/Stage14Act1.cs index 9d4af8443d..9667531c7c 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage14BlobsInTheWoods/Stage14Act1.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage14BlobsInTheWoods/Stage14Act1.cs @@ -12,7 +12,7 @@ public enum AID : uint class LastSong(BossModule module) : Components.GenericLineOfSightAOE(module, ActionID.MakeSpell(AID.TheLastSong), 60, true); //TODO: find a way to use the obstacles on the map and draw proper AOEs, this does nothing right now -class LastSongHint : BossComponent +class LastSongHint(BossModule module) : BossComponent(module) { public bool casting; @@ -35,7 +35,7 @@ public override void AddGlobalHints(GlobalHints hints) } } -class Hints : BossComponent +class Hints(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage14BlobsInTheWoods/Stage14Act2.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage14BlobsInTheWoods/Stage14Act2.cs index 73822ccbaf..07d1df62e1 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage14BlobsInTheWoods/Stage14Act2.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage14BlobsInTheWoods/Stage14Act2.cs @@ -13,7 +13,7 @@ public enum AID : uint class LastSong(BossModule module) : Components.GenericLineOfSightAOE(module, ActionID.MakeSpell(AID.TheLastSong), 60, true); //TODO: find a way to use the obstacles on the map and draw proper AOEs, this does nothing right now -class LastSongHint : BossComponent +class LastSongHint(BossModule module) : BossComponent(module) { public bool casting; @@ -35,7 +35,7 @@ public override void AddGlobalHints(GlobalHints hints) } } -class Hints : BossComponent +class Hints(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage15TheMeNobodyNodes/Stage15.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage15TheMeNobodyNodes/Stage15.cs index 3b37627348..da80c38352 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage15TheMeNobodyNodes/Stage15.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage15TheMeNobodyNodes/Stage15.cs @@ -28,7 +28,7 @@ public enum AID : uint class HighVoltage(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.HighVoltage), "Interrupt!"); -class Ballast : Components.GenericAOEs +class Ballast(BossModule module) : Components.GenericAOEs(module) { private bool casting2; private bool casting3; @@ -85,16 +85,12 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } class PiercingLaser(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PiercingLaser), new AOEShapeRect(32.3f, 4)); - class RepellingCannons(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RepellingCannons), new AOEShapeCircle(12.3f)); - class Superstorm(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Superstorm2), new AOEShapeDonut(8, 20)); - class Spellsword(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Spellsword), new AOEShapeCone(7.1f, 60.Degrees())); - class Disseminate(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Disseminate), new AOEShapeCircle(7.2f)); -class BallastKB : Components.Knockback //actual knockbacks are 0.274s after snapshot +class BallastKB(BossModule module) : Components.Knockback(module) //actual knockbacks are 0.274s after snapshot { private bool casting2; private bool casting3; @@ -143,7 +139,7 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } } -class Hints : BossComponent +class Hints(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage16SunsetBullevard/Stage16Act1.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage16SunsetBullevard/Stage16Act1.cs index b5fcbfdb67..52a37a04e8 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage16SunsetBullevard/Stage16Act1.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage16SunsetBullevard/Stage16Act1.cs @@ -10,7 +10,7 @@ public enum AID : uint Attack = 6497, // 26F2->player, no cast, single-target } -class Hints : BossComponent +class Hints(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage16SunsetBullevard/Stage16Act2.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage16SunsetBullevard/Stage16Act2.cs index 413c3e74f4..bc22db336a 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage16SunsetBullevard/Stage16Act2.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage16SunsetBullevard/Stage16Act2.cs @@ -23,22 +23,15 @@ public enum AID : uint } class OneOneOneOneTonzeSwing(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.OneOneOneOneTonzeSwing), "Use Diamondback!"); - class TenTonzeSlash(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TenTonzeSlash), new AOEShapeCone(44, 30.Degrees())); - class OneOneOneTonzeSwing(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.OneOneOneTonzeSwing), new AOEShapeCircle(12)); - class CryOfRage(BossModule module) : Components.CastGaze(module, ActionID.MakeSpell(AID.CryOfRage)); - class TenTonzeWave(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TenTonzeWave), new AOEShapeCone(44, 30.Degrees())); - class TenTonzeWave2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TenTonzeWave2), new AOEShapeDonut(10, 20)); - class OneOneOneTonzeSwingKB(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.OneOneOneTonzeSwing), 20, shape: new AOEShapeCircle(12)); // actual knockback happens ~1.45s after snapshot - class ZoomIn(BossModule module) : Components.BaitAwayChargeCast(module, ActionID.MakeSpell(AID.ZoomIn), 4); -class ZoomInKB : Components.Knockback //actual knockback happens ~0.7s after snapshot +class ZoomInKB(BossModule module) : Components.Knockback(module) // actual knockback happens ~0.7s after snapshot { private DateTime _activation; @@ -61,7 +54,7 @@ public override void OnCastFinished(Actor caster, ActorCastInfo spell) } } -class Hints : BossComponent +class Hints(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage17TheSwordOfMusic/Stage17Act1.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage17TheSwordOfMusic/Stage17Act1.cs index 03c483c700..70120b136f 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage17TheSwordOfMusic/Stage17Act1.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage17TheSwordOfMusic/Stage17Act1.cs @@ -14,27 +14,25 @@ public enum AID : uint } class TheHand(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TheHand), new AOEShapeCone(8, 60.Degrees())); - class Shred(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Shred), new AOEShapeRect(6, 2)); - class TheHandKB(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.TheHand), 10, shape: new AOEShapeCone(8, 60.Degrees())); // actual knockback happens a whole 0,9s after snapshot -class Hints2 : BossComponent +class Hints2(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { if (!Module.PrimaryActor.IsDead) hints.Add($"{Module.PrimaryActor.Name} counters magical damage!"); - if (!module.Enemies(OID.RightClaw).All(e => e.IsDead)) + if (!Module.Enemies(OID.RightClaw).All(e => e.IsDead)) hints.Add($"{module.Enemies(OID.RightClaw).FirstOrDefault()!.Name} counters physical damage!"); } } -class Hints : BossComponent +class Hints(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { - hints.Add($"The {Module.PrimaryActor.Name} counters magical attacks, the {module.Enemies(OID.RightClaw).FirstOrDefault()!.Name} counters physical\nattacks. If you have healing spells you can just tank the counter damage\nand kill them however you like anyway. All opponents in this stage are\nweak to lightning.\nThe Ram's Voice and Ultravibration combo can be used in Act 2."); + hints.Add($"The {Module.PrimaryActor.Name} counters magical attacks, the {Module.Enemies(OID.RightClaw).FirstOrDefault()!.Name} counters physical\nattacks. If you have healing spells you can just tank the counter damage\nand kill them however you like anyway. All opponents in this stage are\nweak to lightning.\nThe Ram's Voice and Ultravibration combo can be used in Act 2."); } } diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage17TheSwordOfMusic/Stage17Act2.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage17TheSwordOfMusic/Stage17Act2.cs index a15fe61f5e..9c8d57e883 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage17TheSwordOfMusic/Stage17Act2.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage17TheSwordOfMusic/Stage17Act2.cs @@ -20,29 +20,24 @@ public enum AID : uint } class GrandStrike(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.GrandStrike), new AOEShapeRect(77.5f, 2)); - class MagitekField(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.MagitekField), "Interruptible, increases its defenses"); - class MagitekRay(BossModule module) : Components.PersistentVoidzoneAtCastTarget(module, 6, ActionID.MakeSpell(AID.MagitekRay), m => m.Enemies(OID.MagitekRayVoidzone), 0); - class TheHand(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TheHand), new AOEShapeCone(8, 60.Degrees())); - class Shred(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Shred), new AOEShapeRect(6, 2)); - class TheHandKB(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.TheHand), 10, shape: new AOEShapeCone(8, 60.Degrees())); // actual knockback happens a whole 0,9s after snapshot -class Hints2 : BossComponent +class Hints2(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { - if (!module.Enemies(OID.LeftClaw).All(e => e.IsDead)) - hints.Add($"{module.Enemies(OID.LeftClaw).FirstOrDefault()!.Name} counters magical damage!"); - if (!module.Enemies(OID.RightClaw).All(e => e.IsDead)) - hints.Add($"{module.Enemies(OID.RightClaw).FirstOrDefault()!.Name} counters physical damage!"); + if (!Module.Enemies(OID.LeftClaw).All(e => e.IsDead)) + hints.Add($"{Module.Enemies(OID.LeftClaw).FirstOrDefault()!.Name} counters magical damage!"); + if (!Module.Enemies(OID.RightClaw).All(e => e.IsDead)) + hints.Add($"{Module.Enemies(OID.RightClaw).FirstOrDefault()!.Name} counters physical damage!"); } } -class Hints : BossComponent +class Hints(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage18MidsummerNightsExplosion/Stage18Act1.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage18MidsummerNightsExplosion/Stage18Act1.cs index 4f47c05d95..03a8a1135f 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage18MidsummerNightsExplosion/Stage18Act1.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage18MidsummerNightsExplosion/Stage18Act1.cs @@ -17,53 +17,48 @@ public enum AID : uint } class Explosion(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Explosion), new AOEShapeCircle(10)); - class Fireball(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Fireball), 6); - class RipperClaw(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RipperClaw), new AOEShapeCone(8, 45.Degrees())); - class TailSmash(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TailSmash), new AOEShapeCone(15, 45.Degrees())); -class WildCharge : Components.BaitAwayChargeCast +class WildCharge(BossModule module) : Components.BaitAwayChargeCast(module, ActionID.MakeSpell(AID.WildCharge), 4) { - public WildCharge() : base(ActionID.MakeSpell(AID.WildCharge), 4) { } - public override void AddHints(int slot, Actor actor, TextHints hints) { - if (CurrentBaits.Count > 0 && !module.Enemies(OID.Keg).All(e => e.IsDead)) + if (CurrentBaits.Count > 0 && !Module.Enemies(OID.Keg).All(e => e.IsDead)) hints.Add("Aim charge at a keg!"); } } -class WildChargeKB : Components.KnockbackFromCastTarget -{ //knockback actually delayed by 0.5s to 1s, maybe it depends on the rectangle length of the charge - public WildChargeKB() : base(ActionID.MakeSpell(AID.WildCharge), 10, kind: Kind.DirForward) +class WildChargeKB : Components.KnockbackFromCastTarget // knockback actually delayed by 0.5s to 1s, maybe it depends on the rectangle length of the charge +{ + public WildChargeKB(BossModule module) : base(module, ActionID.MakeSpell(AID.WildCharge), 10, kind: Kind.DirForward) { StopAtWall = true; } } -class KegExplosion : Components.GenericStackSpread +class KegExplosion(BossModule module) : Components.GenericStackSpread(module) { public override void DrawArenaForeground(int pcSlot, Actor pc) { - foreach (var p in module.Enemies(OID.Keg).Where(x => !x.IsDead)) + foreach (var p in Module.Enemies(OID.Keg).Where(x => !x.IsDead)) { - if (arena.Config.ShowOutlinesAndShadows) - arena.AddCircle(p.Position, 10, 0xFF000000, 2); - arena.AddCircle(p.Position, 10, ArenaColor.Danger); + if (Arena.Config.ShowOutlinesAndShadows) + Arena.AddCircle(p.Position, 10, 0xFF000000, 2); + Arena.AddCircle(p.Position, 10, ArenaColor.Danger); } } public override void AddHints(int slot, Actor actor, TextHints hints) { - foreach (var p in module.Enemies(OID.Keg).Where(x => !x.IsDead)) + foreach (var p in Module.Enemies(OID.Keg).Where(x => !x.IsDead)) if (actor.Position.InCircle(p.Position, 10)) hints.Add("In keg explosion radius!"); } } -class Hints : BossComponent +class Hints(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage18MidsummerNightsExplosion/Stage18Act2.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage18MidsummerNightsExplosion/Stage18Act2.cs index 817ee8f90f..83541cc185 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage18MidsummerNightsExplosion/Stage18Act2.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage18MidsummerNightsExplosion/Stage18Act2.cs @@ -17,53 +17,48 @@ public enum AID : uint } class Explosion(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Explosion), new AOEShapeCircle(10)); - class Fireball(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Fireball), 6); - class RipperClaw(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RipperClaw), new AOEShapeCone(8, 45.Degrees())); - class TailSmash(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TailSmash), new AOEShapeCone(15, 45.Degrees())); -class WildCharge : Components.BaitAwayChargeCast +class WildCharge(BossModule module) : Components.BaitAwayChargeCast(module, ActionID.MakeSpell(AID.WildCharge), 4) { - public WildCharge() : base(ActionID.MakeSpell(AID.WildCharge), 4) { } - public override void AddHints(int slot, Actor actor, TextHints hints) { - if (CurrentBaits.Count > 0 && !module.Enemies(OID.Keg).All(e => e.IsDead)) + if (CurrentBaits.Count > 0 && !Module.Enemies(OID.Keg).All(e => e.IsDead)) hints.Add("Aim charge at a keg!"); } } class WildChargeKB : Components.KnockbackFromCastTarget { //knockback actually delayed by 0.5s to 1s, maybe it depends on the rectangle length of the charge - public WildChargeKB() : base(ActionID.MakeSpell(AID.WildCharge), 10, kind: Kind.DirForward) + public WildChargeKB(BossModule module) : base(module, ActionID.MakeSpell(AID.WildCharge), 10, kind: Kind.DirForward) { StopAtWall = true; } } -class KegExplosion : Components.GenericStackSpread +class KegExplosion(BossModule module) : Components.GenericStackSpread(module) { public override void DrawArenaForeground(int pcSlot, Actor pc) { - foreach (var p in module.Enemies(OID.Keg).Where(x => !x.IsDead)) + foreach (var p in Module.Enemies(OID.Keg).Where(x => !x.IsDead)) { - if (arena.Config.ShowOutlinesAndShadows) - arena.AddCircle(p.Position, 10, 0xFF000000, 2); - arena.AddCircle(p.Position, 10, ArenaColor.Danger); + if (Arena.Config.ShowOutlinesAndShadows) + Arena.AddCircle(p.Position, 10, 0xFF000000, 2); + Arena.AddCircle(p.Position, 10, ArenaColor.Danger); } } public override void AddHints(int slot, Actor actor, TextHints hints) { - foreach (var p in module.Enemies(OID.Keg).Where(x => !x.IsDead)) + foreach (var p in Module.Enemies(OID.Keg).Where(x => !x.IsDead)) if (actor.Position.InCircle(p.Position, 10)) hints.Add("In keg explosion radius!"); } } -class Hints : BossComponent +class Hints(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage19OnAClearDayYouCanSmellForever/Stage19Act1.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage19OnAClearDayYouCanSmellForever/Stage19Act1.cs index b904241007..e7ee777b40 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage19OnAClearDayYouCanSmellForever/Stage19Act1.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage19OnAClearDayYouCanSmellForever/Stage19Act1.cs @@ -31,12 +31,10 @@ public enum SID : uint } class BadBreath(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.BadBreath), new AOEShapeCone(17.775f, 60.Degrees())); - class VineProbe(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.VineProbe), new AOEShapeRect(11.775f, 4)); - class OffalBreath(BossModule module) : Components.PersistentVoidzoneAtCastTarget(module, 6, ActionID.MakeSpell(AID.OffalBreath), m => m.Enemies(OID.voidzone), 0); -class Reflect : BossComponent +class Reflect(BossModule module) : BossComponent(module) { private bool reflect; private bool casting; @@ -65,7 +63,7 @@ public override void AddGlobalHints(GlobalHints hints) } } -class Hints : BossComponent +class Hints(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage19OnAClearDayYouCanSmellForever/Stage19Act2.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage19OnAClearDayYouCanSmellForever/Stage19Act2.cs index 014e2a0dc3..a0ed2cf6cb 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage19OnAClearDayYouCanSmellForever/Stage19Act2.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage19OnAClearDayYouCanSmellForever/Stage19Act2.cs @@ -33,13 +33,11 @@ public enum SID : uint Stun = 149, // 2729->player, extra=0x0 } -class ExplosiveDehiscence : Components.CastGaze +class ExplosiveDehiscence(BossModule module) : Components.CastGaze(module, ActionID.MakeSpell(AID.ExplosiveDehiscence)) { public bool casting; public BitMask _blinded; - public ExplosiveDehiscence() : base(ActionID.MakeSpell(AID.ExplosiveDehiscence)) { } - public override void AddHints(int slot, Actor actor, TextHints hints) { if (!_blinded[slot] && casting) @@ -72,11 +70,11 @@ public override void OnStatusLose(Actor actor, ActorStatus status) public override IEnumerable ActiveEyes(int slot, Actor actor) { - return _blinded[slot] ? Enumerable.Empty() : base.ActiveEyes(module, slot, actor); + return _blinded[slot] ? Enumerable.Empty() : base.ActiveEyes(slot, actor); } } -class Reflect : BossComponent +class Reflect(BossModule module) : BossComponent(module) { private bool reflect; private bool casting; @@ -106,12 +104,10 @@ public override void AddGlobalHints(GlobalHints hints) } class BadBreath(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.BadBreath), new AOEShapeCone(17.775f, 60.Degrees())); - class VineProbe(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.VineProbe), new AOEShapeRect(11.775f, 4)); - class OffalBreath(BossModule module) : Components.PersistentVoidzoneAtCastTarget(module, 6, ActionID.MakeSpell(AID.OffalBreath), m => m.Enemies(OID.voidzone), 0); -class Hints : BossComponent +class Hints(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage20MissTyphon/Stage20Act1.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage20MissTyphon/Stage20Act1.cs index 132e789f02..232d884503 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage20MissTyphon/Stage20Act1.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage20MissTyphon/Stage20Act1.cs @@ -14,18 +14,17 @@ public enum AID : uint } class Fireball(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Fireball), 8); - class Snort(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.Snort), "Use Diamondback!"); class SnortKB : Components.KnockbackFromCastTarget { //knockback actually delayed by 0.7s - public SnortKB() : base(ActionID.MakeSpell(AID.Snort), 30, kind: Kind.AwayFromOrigin) + public SnortKB(BossModule module) : base(module, ActionID.MakeSpell(AID.Snort), 30, kind: Kind.AwayFromOrigin) { StopAtWall = true; } } -class Hints : BossComponent +class Hints(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage20MissTyphon/Stage20Act2.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage20MissTyphon/Stage20Act2.cs index a884038e78..0119a42208 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage20MissTyphon/Stage20Act2.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage20MissTyphon/Stage20Act2.cs @@ -16,16 +16,12 @@ public enum AID : uint } class AquaBreath(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.AquaBreath), new AOEShapeCone(13.1f, 45.Degrees())); - class Megavolt(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Megavolt), new AOEShapeCircle(11.1f)); - class Waterspout(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Waterspout), 4); - class LightningBolt(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.LightningBolt), 3); - class ImpSong(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.ImpSong), "Interrupt Ultros!"); -class Hints : BossComponent +class Hints(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage20MissTyphon/Stage20Act3.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage20MissTyphon/Stage20Act3.cs index f7449c0d6c..3f6267a7ae 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage20MissTyphon/Stage20Act3.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage20MissTyphon/Stage20Act3.cs @@ -22,29 +22,22 @@ public enum AID : uint } class AquaBreath(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.AquaBreath), new AOEShapeCone(13.1f, 45.Degrees())); - class Megavolt(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Megavolt), new AOEShapeCircle(11.1f)); - class Tentacle(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Tentacle), new AOEShapeCircle(8)); - class Wallop(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Wallop), new AOEShapeRect(57.2f, 5)); - class WallopKB(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.Wallop), 20, kind: Kind.AwayFromOrigin); //knockback actually delayed by 0.8s - class Fireball(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Fireball), 8); - class ImpSong(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.ImpSong), "Interrupt Ultros!"); - class Snort(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.Snort), "Use Diamondback!"); - class SnortKB(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.Snort), 30, kind: Kind.AwayFromOrigin); //knockback actually delayed by 0.7s -class Hints : BossComponent +class Hints(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { hints.Add("This act is act 1+2 combined with tentacles on top.\nThe Final Sting combo (Off-guard->Bristle->Moonflute->Final Sting) makes\nthis act including the achievement much easier. Ultros is weak to fire."); } + public override void AddHints(int slot, Actor actor, TextHints hints) { hints.Add("Requirement for achievement: Don't kill any tentacles in this act", false); diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage21ChimeraOnAHotTinRoof/Stage21Act1.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage21ChimeraOnAHotTinRoof/Stage21Act1.cs index 2d090c3152..dd48178546 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage21ChimeraOnAHotTinRoof/Stage21Act1.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage21ChimeraOnAHotTinRoof/Stage21Act1.cs @@ -13,10 +13,9 @@ public enum AID : uint } class Icefall(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Icefall), 5); - class VoidBlizzard(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.VoidBlizzard), "Interrupt"); -class Hints : BossComponent +class Hints(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { @@ -24,7 +23,7 @@ public override void AddGlobalHints(GlobalHints hints) } } -class Hints2 : BossComponent +class Hints2(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage21ChimeraOnAHotTinRoof/Stage21Act2.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage21ChimeraOnAHotTinRoof/Stage21Act2.cs index e1cfc64357..1bf6c9f61c 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage21ChimeraOnAHotTinRoof/Stage21Act2.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage21ChimeraOnAHotTinRoof/Stage21Act2.cs @@ -20,18 +20,13 @@ public enum AID : uint } class TheRamsKeeper(BossModule module) : Components.PersistentVoidzoneAtCastTarget(module, 9, ActionID.MakeSpell(AID.TheRamsKeeper), m => m.Enemies(OID.Voidzone), 0); - class TheRamsKeeperHint(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.TheRamsKeeper), "Interrupt"); - class TheRamsVoice(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TheRamsVoice), new AOEShapeCircle(9)); - class TheDragonsVoice(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TheDragonsVoice), new AOEShapeDonut(8, 30)); - class Icefall(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Icefall), 5); - class VoidBlizzard(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.VoidBlizzard), "Interrupt"); -class Hints : BossComponent +class Hints(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { @@ -39,11 +34,11 @@ public override void AddGlobalHints(GlobalHints hints) } } -class Hints2 : BossComponent +class Hints2(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { - if (!module.Enemies(OID.ArenaImp).All(e => e.IsDead)) + if (!Module.Enemies(OID.ArenaImp).All(e => e.IsDead)) hints.Add("The imps are weak to fire spells and strong against ice.\nInterrupt Void Blizzard with Spitting Sardine."); } } diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage22HereComesTheBoom/Stage22Act1.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage22HereComesTheBoom/Stage22Act1.cs index d256f2002a..4b60c4c5e2 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage22HereComesTheBoom/Stage22Act1.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage22HereComesTheBoom/Stage22Act1.cs @@ -11,7 +11,7 @@ public enum AID : uint Fulmination = 14901, // 26FC->self, no cast, range 50+R circle, wipe if failed to kill grenade in one hit } -class Hints : BossComponent +class Hints(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { @@ -19,7 +19,7 @@ public override void AddGlobalHints(GlobalHints hints) } } -class Hints2 : BossComponent +class Hints2(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { @@ -51,5 +51,6 @@ protected override void DrawEnemies(int pcSlot, Actor pc) foreach (var s in Enemies(OID.Boss)) Arena.Actor(s, ArenaColor.Enemy); } + protected override bool CheckPull() { return (PrimaryActor.IsTargetable && PrimaryActor.InCombat || Enemies(OID.Boss).Any(e => e.IsDead)) && !Enemies(OID.BossAct2).Any(e => e.InCombat); } } diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage22HereComesTheBoom/Stage22Act2.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage22HereComesTheBoom/Stage22Act2.cs index 1244a016a8..d8532cc5ac 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage22HereComesTheBoom/Stage22Act2.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage22HereComesTheBoom/Stage22Act2.cs @@ -22,31 +22,27 @@ public enum AID : uint } class Sap(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Sap), 8); - class Sap2(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Sap2), 8); - class ScaldingScolding(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ScaldingScolding), new AOEShapeCone(11.75f, 60.Degrees())); - class Flashthoom(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Flashthoom), new AOEShapeCircle(7.2f)); - class Ignition(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.Ignition), "Wipe if Grenade is not killed yet, otherwise Raidwide"); -class Hints : BossComponent +class Hints(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { - hints.Add($"{module.Enemies(OID.Boss).FirstOrDefault()!.Name} spawns grenades and gas bombs during the fight. Just as in\nact 1 the grenades must be killed in one hit each or they will wipe you.\nUse Sticky Tongue to pull Gas Bombs to the boss so they interrupt the enrage.\nYou can start the Final Sting combination at about 50% health left.\n(Off-guard->Bristle->Moonflute->Final Sting)"); + hints.Add($"{Module.Enemies(OID.Boss).FirstOrDefault()!.Name} spawns grenades and gas bombs during the fight. Just as in\nact 1 the grenades must be killed in one hit each or they will wipe you.\nUse Sticky Tongue to pull Gas Bombs to the boss so they interrupt the enrage.\nYou can start the Final Sting combination at about 50% health left.\n(Off-guard->Bristle->Moonflute->Final Sting)"); } } -class Hints2 : BossComponent +class Hints2(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { - if (!module.Enemies(OID.ArenaGrenade).All(e => e.IsDead)) - hints.Add($"Kill the {module.Enemies(OID.ArenaGrenade).FirstOrDefault()!.Name} in one hit or it will wipe you. It got 543 HP."); - if (!module.Enemies(OID.ArenaGasBomb).All(e => e.IsDead)) - hints.Add($"Use Sticky Tongue to pull the {module.Enemies(OID.ArenaGasBomb).FirstOrDefault()!.Name} to the bos\nto interrupt the enrage!"); + if (!Module.Enemies(OID.ArenaGrenade).All(e => e.IsDead)) + hints.Add($"Kill the {Module.Enemies(OID.ArenaGrenade).FirstOrDefault()!.Name} in one hit or it will wipe you. It got 543 HP."); + if (!Module.Enemies(OID.ArenaGasBomb).All(e => e.IsDead)) + hints.Add($"Use Sticky Tongue to pull the {Module.Enemies(OID.ArenaGasBomb).FirstOrDefault()!.Name} to the bos\nto interrupt the enrage!"); } } diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage23BehemothsAndBroomsticks/Stage23.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage23BehemothsAndBroomsticks/Stage23.cs index b7486a3f0c..5a3dae98ad 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage23BehemothsAndBroomsticks/Stage23.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage23BehemothsAndBroomsticks/Stage23.cs @@ -18,18 +18,13 @@ public enum AID : uint EclipticMeteor = 15257, // Boss->location, 10,0s cast, range 50 circle } - class Charybdis(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Charybdis), 6); - class Maelstrom(BossModule module) : Components.PersistentVoidzone(module, 8, m => m.Enemies(OID.Maelstrom)); - class Trounce(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Trounce), new AOEShapeCone(55.8f, 30.Degrees())); - class Comet(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Comet2), 10); - class EclipticMeteor(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.EclipticMeteor), "Use Diamondback!"); -class Hints : BossComponent +class Hints(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage24AmazingTechnicolorPitFiends/Stage24Act1.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage24AmazingTechnicolorPitFiends/Stage24Act1.cs index 4cc049b253..67bf632a8f 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage24AmazingTechnicolorPitFiends/Stage24Act1.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage24AmazingTechnicolorPitFiends/Stage24Act1.cs @@ -16,27 +16,25 @@ public enum AID : uint } class Starstorm(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Starstorm), 5); - class RagingAxe(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RagingAxe), new AOEShapeCone(5, 45.Degrees())); - class LightningSpark(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.LightningSpark), "Interrupt"); -class Hints2 : BossComponent +class Hints2(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { if (!Module.PrimaryActor.IsDead) hints.Add($"{Module.PrimaryActor.Name} is immune to magical damage!"); - if (!module.Enemies(OID.ArenaViking).All(e => e.IsDead)) - hints.Add($"{module.Enemies(OID.ArenaViking).FirstOrDefault()!.Name} is immune to physical damage!"); + if (!Module.Enemies(OID.ArenaViking).All(e => e.IsDead)) + hints.Add($"{Module.Enemies(OID.ArenaViking).FirstOrDefault()!.Name} is immune to physical damage!"); } } -class Hints : BossComponent +class Hints(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { - hints.Add($"The {Module.PrimaryActor.Name} is immune to magic, the {module.Enemies(OID.ArenaViking).FirstOrDefault()!.Name} is immune to\nphysical attacks. For the 2nd act Diamondback is highly recommended.\nFor the 3rd act a ranged physical spell such as Fire Angon\nis highly recommended."); + hints.Add($"The {Module.PrimaryActor.Name} is immune to magic, the {Module.Enemies(OID.ArenaViking).FirstOrDefault()!.Name} is immune to\nphysical attacks. For the 2nd act Diamondback is highly recommended.\nFor the 3rd act a ranged physical spell such as Fire Angon\nis highly recommended."); } } diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage24AmazingTechnicolorPitFiends/Stage24Act2.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage24AmazingTechnicolorPitFiends/Stage24Act2.cs index 008544b6d2..66d1a62175 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage24AmazingTechnicolorPitFiends/Stage24Act2.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage24AmazingTechnicolorPitFiends/Stage24Act2.cs @@ -21,28 +21,24 @@ public enum AID : uint } class Starstorm(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Starstorm), 5); - class Mechanogravity(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Mechanogravity), 6); - class RagingAxe(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RagingAxe), new AOEShapeCone(5, 45.Degrees())); - class CondensedLibra(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.CondensedLibra), "Use Diamondback!"); class TripleHit(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.TripleHit), "Use Diamondback!"); - class Silence(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.Silence), "Interrupt"); -class Hints2 : BossComponent +class Hints2(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { - if (!module.Enemies(OID.ArenaMagus).All(e => e.IsDead)) - hints.Add($"{module.Enemies(OID.ArenaMagus).FirstOrDefault()!.Name} is immune to magical damage!"); - if (!module.Enemies(OID.ArenaViking).All(e => e.IsDead)) - hints.Add($"{module.Enemies(OID.ArenaViking).FirstOrDefault()!.Name} is immune to physical damage!"); + if (!Module.Enemies(OID.ArenaMagus).All(e => e.IsDead)) + hints.Add($"{Module.Enemies(OID.ArenaMagus).FirstOrDefault()!.Name} is immune to magical damage!"); + if (!Module.Enemies(OID.ArenaViking).All(e => e.IsDead)) + hints.Add($"{Module.Enemies(OID.ArenaViking).FirstOrDefault()!.Name} is immune to physical damage!"); } } -class Hints : BossComponent +class Hints(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage24AmazingTechnicolorPitFiends/Stage24Act3.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage24AmazingTechnicolorPitFiends/Stage24Act3.cs index 0d35d7b020..1cbf7a682f 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage24AmazingTechnicolorPitFiends/Stage24Act3.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage24AmazingTechnicolorPitFiends/Stage24Act3.cs @@ -21,19 +21,19 @@ public enum AID : uint } class MagicHammer(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.MagicHammer), 8); - class PageTear(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PageTear), new AOEShapeCone(8, 45.Degrees())); -class VacuumBlade : Components.GenericAOEs +class VacuumBlade(BossModule module) : Components.GenericAOEs(module) { private bool activeVacuumWave; private DateTime _activation; private static readonly AOEShapeCircle circle = new(3); + public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (activeVacuumWave) - foreach (var p in module.Enemies(OID.VacuumWave)) - yield return new(circle, p.Position, activation: _activation); + foreach (var p in Module.Enemies(OID.VacuumWave)) + yield return new(circle, p.Position, default, _activation); } public override void OnActorCreated(Actor actor) @@ -54,12 +54,11 @@ public override void OnCastFinished(Actor caster, ActorCastInfo spell) class HeadDown(BossModule module) : Components.BaitAwayChargeCast(module, ActionID.MakeSpell(AID.HeadDown), 4); -class HeadDownKB : Components.KnockbackFromCastTarget +class HeadDownKB(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.HeadDown), 10, kind: Kind.DirForward) { - public HeadDownKB() : base(ActionID.MakeSpell(AID.HeadDown), 10, kind: Kind.DirForward) { } - public override bool DestinationUnsafe(BossModule module, int slot, Actor actor, WPos pos) + public override bool DestinationUnsafe(int slot, Actor actor, WPos pos) { - if (module.FindComponent() != null && module.FindComponent()!.ActiveAOEs(module, slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation))) + if (Module.FindComponent()?.ActiveAOEs(slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false) return true; if (!Module.Bounds.Contains(pos)) return true; @@ -70,16 +69,16 @@ public override bool DestinationUnsafe(BossModule module, int slot, Actor actor, class BoneShaker(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.BoneShaker), "Adds + Raidwide"); -class Hints2 : BossComponent +class Hints2(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { - if (!module.Enemies(OID.ArenaMagus).All(e => e.IsDead)) - hints.Add($"Kill {module.Enemies(OID.ArenaMagus).FirstOrDefault()!.Name} fast or wipe!\nUse ranged physical attacks."); + if (!Module.Enemies(OID.ArenaMagus).All(e => e.IsDead)) + hints.Add($"Kill {Module.Enemies(OID.ArenaMagus).FirstOrDefault()!.Name} fast or wipe!\nUse ranged physical attacks."); } } -class Hints : BossComponent +class Hints(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage25DirtyRottenAzulmagia/Stage25Act1.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage25DirtyRottenAzulmagia/Stage25Act1.cs index d8e9a8c3ee..fc7d41f2b9 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage25DirtyRottenAzulmagia/Stage25Act1.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage25DirtyRottenAzulmagia/Stage25Act1.cs @@ -25,20 +25,14 @@ public enum SID : uint } class ApocalypticBolt(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ApocalypticBolt), new AOEShapeRect(51.2f, 4)); - class ApocalypticRoar(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ApocalypticRoar), new AOEShapeCone(36.2f, 60.Degrees())); - class TheRamsVoice(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TheRamsVoice), new AOEShapeCircle(8)); - class TheDragonsVoice(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TheDragonsVoice), new AOEShapeDonut(6, 30)); - class Plaincracker(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Plaincracker), new AOEShapeCircle(7.2f)); - class TremblingEarth(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TremblingEarth), new AOEShapeDonut(10, 20)); - class TremblingEarth2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TremblingEarth2), new AOEShapeDonut(20, 30)); -class Hints : BossComponent +class Hints(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { @@ -51,11 +45,11 @@ public override void AddHints(int slot, Actor actor, TextHints hints) } } -class Hints2 : BossComponent +class Hints2(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { - var physicalreflect = module.Enemies(OID.Boss).Where(x => x.FindStatus(SID.IceSpikes) != null).FirstOrDefault(); + var physicalreflect = Module.Enemies(OID.Boss).Where(x => x.FindStatus(SID.IceSpikes) != null).FirstOrDefault(); if (physicalreflect != null) hints.Add($"{Module.PrimaryActor.Name} will reflect all physical damage!"); } diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage25DirtyRottenAzulmagia/Stage25Act2.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage25DirtyRottenAzulmagia/Stage25Act2.cs index bdb835973a..0c2a2e01a7 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage25DirtyRottenAzulmagia/Stage25Act2.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage25DirtyRottenAzulmagia/Stage25Act2.cs @@ -25,14 +25,11 @@ public enum SID : uint } class ApocalypticBolt(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ApocalypticBolt), new AOEShapeRect(51.2f, 4)); - class ApocalypticRoar(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ApocalypticRoar), new AOEShapeCone(36.2f, 60.Degrees())); - class TheRamsVoice(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TheRamsVoice), new AOEShapeCircle(8)); - class TheDragonsVoice(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TheDragonsVoice), new AOEShapeDonut(6, 30)); -class Hints : BossComponent +class Hints(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { @@ -40,13 +37,13 @@ public override void AddGlobalHints(GlobalHints hints) } } -class Hints2 : BossComponent +class Hints2(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { - if (!module.Enemies(OID.BlazingAngon).All(e => e.IsDead)) - hints.Add($"Kill {module.Enemies(OID.BlazingAngon).FirstOrDefault()!.Name}! Use physical attacks except fire aspected."); - var magicreflect = module.Enemies(OID.Boss).Where(x => x.FindStatus(SID.RepellingSpray) != null).FirstOrDefault(); + if (!Module.Enemies(OID.BlazingAngon).All(e => e.IsDead)) + hints.Add($"Kill {Module.Enemies(OID.BlazingAngon).FirstOrDefault()!.Name}! Use physical attacks except fire aspected."); + var magicreflect = Module.Enemies(OID.Boss).Where(x => x.FindStatus(SID.RepellingSpray) != null).FirstOrDefault(); if (magicreflect != null) hints.Add($"{Module.PrimaryActor.Name} will reflect all magic damage!"); } @@ -101,5 +98,4 @@ protected override void DrawEnemies(int pcSlot, Actor pc) foreach (var s in Enemies(OID.BlazingAngon)) Arena.Actor(s, ArenaColor.Object); } - } diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage25DirtyRottenAzulmagia/Stage25Act3.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage25DirtyRottenAzulmagia/Stage25Act3.cs index c496392fdd..1c75a3260e 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage25DirtyRottenAzulmagia/Stage25Act3.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage25DirtyRottenAzulmagia/Stage25Act3.cs @@ -35,9 +35,10 @@ public enum SID : uint class Charybdis(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Charybdis2), new AOEShapeCircle(8)); -class Web : BossComponent +class Web(BossModule module) : BossComponent(module) { private bool casting; + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.Web) @@ -58,26 +59,17 @@ public override void AddHints(int slot, Actor actor, TextHints hints) } class Plaincracker(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Plaincracker), new AOEShapeCircle(7.2f)); - class TremblingEarth(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TremblingEarth), new AOEShapeDonut(10, 20)); - class TremblingEarth2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TremblingEarth2), new AOEShapeDonut(20, 30)); - class ApocalypticBolt(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ApocalypticBolt), new AOEShapeRect(51.2f, 4)); - class ApocalypticRoar(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ApocalypticRoar), new AOEShapeCone(36.2f, 60.Degrees())); - class TheRamsVoice(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TheRamsVoice), new AOEShapeCircle(8)); - class TheDragonsVoice(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TheDragonsVoice), new AOEShapeDonut(6, 30)); - class Maelstrom(BossModule module) : Components.PersistentVoidzone(module, 8, m => m.Enemies(OID.Maelstrom)); - class Meteor(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Meteor), 15); - class MeteorVoidzone(BossModule module) : Components.PersistentVoidzoneAtCastTarget(module, 10, ActionID.MakeSpell(AID.Meteor), m => m.Enemies(OID.LavaVoidzone).Where(z => z.EventState != 7), 0); -class Hints : BossComponent +class Hints(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { @@ -85,12 +77,12 @@ public override void AddGlobalHints(GlobalHints hints) } } -class Hints2 : BossComponent +class Hints2(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { - var magicreflect = module.Enemies(OID.Boss).Where(x => x.FindStatus(SID.RepellingSpray) != null).FirstOrDefault(); - var physicalreflect = module.Enemies(OID.Boss).Where(x => x.FindStatus(SID.IceSpikes) != null).FirstOrDefault(); + var magicreflect = Module.Enemies(OID.Boss).Where(x => x.FindStatus(SID.RepellingSpray) != null).FirstOrDefault(); + var physicalreflect = Module.Enemies(OID.Boss).Where(x => x.FindStatus(SID.IceSpikes) != null).FirstOrDefault(); if (magicreflect != null) hints.Add($"{Module.PrimaryActor.Name} will reflect all magic damage!"); if (physicalreflect != null) diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage26PapaMia/Stage26Act1.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage26PapaMia/Stage26Act1.cs index c80fb12e62..ec5b8865f4 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage26PapaMia/Stage26Act1.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage26PapaMia/Stage26Act1.cs @@ -19,17 +19,13 @@ public enum SID : uint { VulnerabilityDown = 63, // Boss->Boss, extra=0x0 Windburn = 269, // Boss->player, extra=0x0 - } - class Gust(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Gust), 3); - class AlternatePlumage(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.AlternatePlumage), "Prepare to dispel buff"); - class CaberToss(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.CaberToss), "Interrupt or wipe!"); -class Hints : BossComponent +class Hints(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { @@ -37,11 +33,11 @@ public override void AddGlobalHints(GlobalHints hints) } } -class Hints2 : BossComponent +class Hints2(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { - var armorbuff = module.Enemies(OID.Boss).Where(x => x.FindStatus(SID.VulnerabilityDown) != null).FirstOrDefault(); + var armorbuff = Module.Enemies(OID.Boss).Where(x => x.FindStatus(SID.VulnerabilityDown) != null).FirstOrDefault(); if (armorbuff != null) hints.Add($"Dispel {Module.PrimaryActor.Name} with Eerie Soundwave!"); } diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage26PapaMia/Stage26Act2.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage26PapaMia/Stage26Act2.cs index 805ade4322..3be605d0e7 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage26PapaMia/Stage26Act2.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage26PapaMia/Stage26Act2.cs @@ -31,7 +31,7 @@ public enum IconID : uint class Thunderhead(BossModule module) : Components.PersistentVoidzone(module, 8, m => m.Enemies(OID.Thunderhead)); -class DadJoke : Components.Knockback +class DadJoke(BossModule module) : Components.Knockback(module) { private DateTime _activation; @@ -53,9 +53,9 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) _activation = default; } - public override bool DestinationUnsafe(BossModule module, int slot, Actor actor, WPos pos) + public override bool DestinationUnsafe(int slot, Actor actor, WPos pos) { - if (module.FindComponent() != null && module.FindComponent()!.ActiveAOEs(module, slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation))) + if (module.FindComponent()?.ActiveAOEs(slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false) return true; if (!Module.Bounds.Contains(pos)) return true; @@ -65,14 +65,11 @@ public override bool DestinationUnsafe(BossModule module, int slot, Actor actor, } class VoidThunderII(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.VoidThunderII), 4); - class RawInstinct(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.RawInstinct), "Prepare to dispel buff"); - class VoidThunderIII(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.VoidThunderIII), "Raidwide + Electrocution"); - class BodyBlow(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.BodyBlow), "Soft Tankbuster"); -class Hints : BossComponent +class Hints(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { @@ -80,11 +77,11 @@ public override void AddGlobalHints(GlobalHints hints) } } -class Hints2 : BossComponent +class Hints2(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { - var critbuff = module.Enemies(OID.Boss).Where(x => x.FindStatus(SID.CriticalStrikes) != null).FirstOrDefault(); + var critbuff = Module.Enemies(OID.Boss).Where(x => x.FindStatus(SID.CriticalStrikes) != null).FirstOrDefault(); if (critbuff != null) hints.Add($"Dispel {Module.PrimaryActor.Name} with Eerie Soundwave!"); } diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage27LockUpYourSnorters/Stage27.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage27LockUpYourSnorters/Stage27.cs index 62e67502d4..2c6d7bfa38 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage27LockUpYourSnorters/Stage27.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage27LockUpYourSnorters/Stage27.cs @@ -23,7 +23,7 @@ class Fireball(BossModule module) : Components.LocationTargetedAOEs(module, Acti class Snort : Components.KnockbackFromCastTarget { - public Snort() : base(ActionID.MakeSpell(AID.Snort), 15) + public Snort(BossModule module) : base(module, ActionID.MakeSpell(AID.Snort), 15) { StopAtWall = true; } @@ -36,7 +36,7 @@ class Fungah : Components.Knockback private bool otherpatterns; private static readonly AOEShapeCone cone = new(12.5f, 45.Degrees()); - public Fungah() + public Fungah(BossModule module) : base(module) { StopAtWall = true; } @@ -53,8 +53,8 @@ public override void OnActorCreated(Actor actor) _bombs.Add(actor); if (_bombs.Count == 8) _activation = WorldState.FutureTime(5); - if (module.Enemies(OID.MagitekExplosive).FirstOrDefault() != null) - if (module.Enemies(OID.MagitekExplosive).FirstOrDefault()!.Position.AlmostEqual(new(96, 94), 3) || module.Enemies(OID.MagitekExplosive).FirstOrDefault()!.Position.AlmostEqual(new(92, 100), 3) || module.Enemies(OID.MagitekExplosive).FirstOrDefault()!.Position.AlmostEqual(new(96, 106), 3) || module.Enemies(OID.MagitekExplosive).FirstOrDefault()!.Position.AlmostEqual(new(108, 100), 3)) + if (Module.Enemies(OID.MagitekExplosive).FirstOrDefault() != null) + if (Module.Enemies(OID.MagitekExplosive).FirstOrDefault()!.Position.AlmostEqual(new(96, 94), 3) || Module.Enemies(OID.MagitekExplosive).FirstOrDefault()!.Position.AlmostEqual(new(92, 100), 3) || Module.Enemies(OID.MagitekExplosive).FirstOrDefault()!.Position.AlmostEqual(new(96, 106), 3) || Module.Enemies(OID.MagitekExplosive).FirstOrDefault()!.Position.AlmostEqual(new(108, 100), 3)) { _activation = WorldState.FutureTime(5.3f); otherpatterns = true; @@ -72,10 +72,10 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } } - public override bool DestinationUnsafe(BossModule module, int slot, Actor actor, WPos pos) => module.FindComponent()?.ActiveAOEs(module, slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false; + public override bool DestinationUnsafe(int slot, Actor actor, WPos pos) => Module.FindComponent()?.ActiveAOEs(slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false; } -class Explosion : Components.GenericAOEs +class Explosion(BossModule module) : Components.GenericAOEs(module) { private List _bombs = new(); private List _casters = new(); @@ -87,10 +87,10 @@ public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_casters.Count > 0 && _snortingeffectends == default) foreach (var c in _casters) - yield return new(circle, c.Position, activation: _activation); + yield return new(circle, c.Position, default, _activation); if (_casters.Count > 0 && _snortingeffectends > WorldState.CurrentTime) foreach (var c in _casters) - yield return new(circle, c.Position + Math.Min(15, Module.Bounds.IntersectRay(c.Position, (c.Position - Module.PrimaryActor.Position).Normalized()) - c.HitboxRadius / 2) * (c.Position - Module.PrimaryActor.Position).Normalized(), activation: _activation); + yield return new(circle, c.Position + Math.Min(15, Module.Bounds.IntersectRay(c.Position, (c.Position - Module.PrimaryActor.Position).Normalized()) - c.HitboxRadius / 2) * (c.Position - Module.PrimaryActor.Position).Normalized(), Activation: _activation); } public override void Update() @@ -130,7 +130,7 @@ public override void OnCastStarted(Actor caster, ActorCastInfo spell) } } -class Hints : BossComponent +class Hints(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { @@ -138,18 +138,19 @@ public override void AddGlobalHints(GlobalHints hints) } } -class Hints2 : BossComponent +class Hints2(BossModule module) : BossComponent(module) { private DateTime _activation; + public override void AddGlobalHints(GlobalHints hints) { - if (!module.Enemies(OID.MagitekExplosive).All(e => e.IsDead)) - hints.Add($"A {module.Enemies(OID.MagitekExplosive).FirstOrDefault()!.Name} spawned, destroy it asap."); + if (!Module.Enemies(OID.MagitekExplosive).All(e => e.IsDead)) + hints.Add($"A {Module.Enemies(OID.MagitekExplosive).FirstOrDefault()!.Name} spawned, destroy it asap."); } public override void AddHints(int slot, Actor actor, TextHints hints) { - if (module.Enemies(OID.MagitekExplosive).Any(e => e.IsTargetable)) + if (Module.Enemies(OID.MagitekExplosive).Any(e => e.IsTargetable)) hints.Add($"Explosion in ca.: {Math.Max(35 - (WorldState.CurrentTime - _activation).TotalSeconds, 0.0f):f1}s"); } @@ -157,7 +158,6 @@ public override void OnActorCreated(Actor actor) { if ((OID)actor.OID == OID.MagitekExplosive) _activation = WorldState.CurrentTime; - } } diff --git a/BossMod/Modules/Global/PVP/HiddenGorge/GoblinMercenary.cs b/BossMod/Modules/Global/PVP/HiddenGorge/GoblinMercenary.cs index d94de40090..3fc94b86c0 100644 --- a/BossMod/Modules/Global/PVP/HiddenGorge/GoblinMercenary.cs +++ b/BossMod/Modules/Global/PVP/HiddenGorge/GoblinMercenary.cs @@ -25,7 +25,7 @@ public enum IconID : uint RotateCW = 167, // Boss } -class GobspinSwipe : Components.GenericAOEs +class GobspinSwipe(BossModule module) : Components.GenericAOEs(module) { private AOEInstance? _aoe; @@ -34,9 +34,9 @@ class GobspinSwipe : Components.GenericAOEs public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.GobspinWhooshdropsTelegraph) - _aoe = new(new AOEShapeCircle(8), Module.PrimaryActor.Position, activation: spell.NPCFinishAt.AddSeconds(4)); + _aoe = new(new AOEShapeCircle(8), Module.PrimaryActor.Position, default, spell.NPCFinishAt.AddSeconds(4)); if ((AID)spell.Action.ID == AID.GobswipeConklopsTelegraph) - _aoe = new(new AOEShapeDonut(5, 30), Module.PrimaryActor.Position, activation: spell.NPCFinishAt.AddSeconds(4)); + _aoe = new(new AOEShapeDonut(5, 30), Module.PrimaryActor.Position, default, spell.NPCFinishAt.AddSeconds(4)); } public override void OnEventCast(Actor caster, ActorCastEvent spell) @@ -46,7 +46,7 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } } -class Knockbacks : Components.Knockback +class Knockbacks(BossModule module) : Components.Knockback(module) { private Source? _knockback; @@ -67,7 +67,7 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } } -class GobfireShootypops : Components.GenericRotatingAOE +class GobfireShootypops(BossModule module) : Components.GenericRotatingAOE(module) { private Angle _increment; private Angle _rotation; @@ -86,7 +86,7 @@ public override void OnEventIcon(Actor actor, uint iconID) if (increment != default) { _increment = increment; - InitIfReady(module, actor); + InitIfReady(actor); } } @@ -98,7 +98,7 @@ public override void OnCastStarted(Actor caster, ActorCastInfo spell) _activation = spell.NPCFinishAt; } if (_rotation != default) - InitIfReady(module, caster); + InitIfReady(caster); } public override void OnEventCast(Actor caster, ActorCastEvent spell) @@ -107,7 +107,7 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) AdvanceSequence(0, WorldState.CurrentTime); } - private void InitIfReady(BossModule module, Actor source) + private void InitIfReady(Actor source) { if (_rotation != default && _increment != default) { @@ -134,10 +134,8 @@ public GoblinMercenaryStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 599, NameID = 7906)] -public class GoblinMercenary : BossModule +public class GoblinMercenary(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(0, 0), 0)) { - public GoblinMercenary(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(0, 0), 0)) { } - protected override void UpdateModule() { if (Enemies(OID.Boss).Any(e => e.Position.AlmostEqual(new(0, -125), 1))) diff --git a/BossMod/Modules/Global/Quest/FF15Collab/Garuda.cs b/BossMod/Modules/Global/Quest/FF15Collab/Garuda.cs index 303898df11..8194c700cd 100644 --- a/BossMod/Modules/Global/Quest/FF15Collab/Garuda.cs +++ b/BossMod/Modules/Global/Quest/FF15Collab/Garuda.cs @@ -32,35 +32,31 @@ public enum AID : uint warpstrike = 14597, //duty action for player } -class GustFront : Components.UniformStackSpread +class GustFront(BossModule module) : Components.UniformStackSpread(module, 1.2f, 0) { - public GustFront() : base(1.2f, 0) { } - public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.GustFront) - AddStack(module.Enemies(OID.Noctis).FirstOrDefault()!); + AddStack(Module.Enemies(OID.Noctis).FirstOrDefault()!); if ((AID)spell.Action.ID == AID.GustFront2) Stacks.Clear(); } } -class Microburst : Components.SelfTargetedAOEs +class Microburst(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Microburst), new AOEShapeCircle(18)) { private bool casting; - public Microburst() : base(ActionID.MakeSpell(AID.Microburst), new AOEShapeCircle(18)) { } - public override void OnCastStarted(Actor caster, ActorCastInfo spell) { - base.OnCastStarted(module, caster, spell); + base.OnCastStarted(caster, spell); if ((AID)spell.Action.ID == AID.Microburst) casting = true; } public override void OnCastFinished(Actor caster, ActorCastInfo spell) { - base.OnCastFinished(module, caster, spell); + base.OnCastFinished(caster, spell); if ((AID)spell.Action.ID == AID.Microburst) casting = false; } @@ -68,34 +64,32 @@ public override void OnCastFinished(Actor caster, ActorCastInfo spell) public override void AddGlobalHints(GlobalHints hints) { if (casting) - hints.Add($"Keep using duty action on the {module.Enemies(OID.Monolith).FirstOrDefault()!.Name}s to stay out of the AOE!"); + hints.Add($"Keep using duty action on the {Module.Enemies(OID.Monolith).FirstOrDefault()!.Name}s to stay out of the AOE!"); } public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { - base.AddAIHints(module, slot, actor, assignment, hints); + base.AddAIHints(slot, actor, assignment, hints); if (casting && actor.Position.AlmostEqual(Module.PrimaryActor.Position, 15)) - hints.PlannedActions.Add((ActionID.MakeSpell(AID.warpstrike), module.Enemies(OID.Monolith).FirstOrDefault()!, 1, false)); + hints.PlannedActions.Add((ActionID.MakeSpell(AID.warpstrike), Module.Enemies(OID.Monolith).FirstOrDefault()!, 1, false)); } } -class MistralShriek : Components.SelfTargetedAOEs +class MistralShriek(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.MistralShriek), new AOEShapeCircle(30)) { private bool casting; private DateTime done; - public MistralShriek() : base(ActionID.MakeSpell(AID.MistralShriek), new AOEShapeCircle(30)) { } - public override void OnCastStarted(Actor caster, ActorCastInfo spell) { - base.OnCastStarted(module, caster, spell); + base.OnCastStarted(caster, spell); if ((AID)spell.Action.ID == AID.MistralShriek) casting = true; } public override void OnCastFinished(Actor caster, ActorCastInfo spell) { - base.OnCastFinished(module, caster, spell); + base.OnCastFinished(caster, spell); if ((AID)spell.Action.ID == AID.MistralShriek) casting = false; done = WorldState.CurrentTime; @@ -104,25 +98,24 @@ public override void OnCastFinished(Actor caster, ActorCastInfo spell) public override void AddGlobalHints(GlobalHints hints) { if (casting) - hints.Add($"Use duty action to teleport to the {module.Enemies(OID.Monolith).FirstOrDefault()!.Name} at the opposite side of Garuda!"); + hints.Add($"Use duty action to teleport to the {Module.Enemies(OID.Monolith).FirstOrDefault()!.Name} at the opposite side of Garuda!"); } public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { - base.AddAIHints(module, slot, actor, assignment, hints); + base.AddAIHints(slot, actor, assignment, hints); if (casting) - hints.PlannedActions.Add((ActionID.MakeSpell(AID.warpstrike), module.Enemies(OID.Monolith).Where(p => !p.Position.AlmostEqual(Module.PrimaryActor.Position, 5)).FirstOrDefault()!, 1, false)); + hints.PlannedActions.Add((ActionID.MakeSpell(AID.warpstrike), Module.Enemies(OID.Monolith).Where(p => !p.Position.AlmostEqual(Module.PrimaryActor.Position, 5)).FirstOrDefault()!, 1, false)); if (WorldState.CurrentTime > done && WorldState.CurrentTime < done.AddSeconds(2)) hints.PlannedActions.Add((ActionID.MakeSpell(AID.warpstrike), Module.PrimaryActor, 1, false)); } } class MistralSong(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.MistralSong), new AOEShapeCone(20, 75.Degrees())); - class WickedTornado(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.WickedTornado), new AOEShapeDonut(8, 20)); // TODO: create and use generic 'line stack' component -class MiniSupercell : Components.GenericBaitAway +class MiniSupercell(BossModule module) : Components.GenericBaitAway(module) { private Actor? target; @@ -161,7 +154,7 @@ public override void AddHints(int slot, Actor actor, TextHints hints) public override void DrawArenaBackground(int pcSlot, Actor pc) { foreach (var bait in CurrentBaits) - bait.Shape.Draw(arena, BaitOrigin(bait), bait.Rotation, ArenaColor.SafeFromAOE); + bait.Shape.Draw(Arena, BaitOrigin(bait), bait.Rotation, ArenaColor.SafeFromAOE); } public override void DrawArenaForeground(int pcSlot, Actor pc) { } @@ -169,14 +162,13 @@ public override void DrawArenaForeground(int pcSlot, Actor pc) { } class MiniSupercellKB : Components.KnockbackFromCastTarget { - public MiniSupercellKB() : base(ActionID.MakeSpell(AID.MiniSupercell2), 50, shape: new AOEShapeRect(45, 3)) + public MiniSupercellKB(BossModule module) : base(module, ActionID.MakeSpell(AID.MiniSupercell2), 50, shape: new AOEShapeRect(45, 3)) { StopAtWall = true; } } class GravitationalForce(BossModule module) : Components.PersistentVoidzoneAtCastTarget(module, 5, ActionID.MakeSpell(AID.GravitationalForce2), m => m.Enemies(OID.GravityVoidzone), 0); - class MistralGaol(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.MistralGaol), "Prepare for Quick Time Event (spam buttons when it starts)"); class GarudaStates : StateMachineBuilder @@ -197,9 +189,8 @@ public GarudaStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.Quest, GroupID = 68696, NameID = 7893)] // also: CFC 646 -public class Garuda : BossModule +public class Garuda(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(0, 0), 22)) { - public Garuda(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(0, 0), 22)) { } protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); diff --git a/BossMod/Modules/Global/Quest/FF15Collab/Iseultalon.cs b/BossMod/Modules/Global/Quest/FF15Collab/Iseultalon.cs index bae4bda4d4..5e558a185e 100644 --- a/BossMod/Modules/Global/Quest/FF15Collab/Iseultalon.cs +++ b/BossMod/Modules/Global/Quest/FF15Collab/Iseultalon.cs @@ -34,14 +34,14 @@ public enum IconID : uint spread = 129, // player/2650 } -class Thunderbolt : Components.UniformStackSpread +class Thunderbolt(BossModule module) : Components.UniformStackSpread(module, 0, 5, alwaysShowSpreads: true) { - public Thunderbolt() : base(0, 5, alwaysShowSpreads: true) { } public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.spread) AddSpread(actor); } + public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.Thunderbolt2) @@ -49,16 +49,16 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } } -class Electrocution : Components.GenericTowers +class Electrocution(BossModule module) : Components.GenericTowers(module) { //Noctis always goes to soak this tower, except on first cast as a tutorial public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.Electrocution) { if (NumCasts > 0) - Towers.Add(new(DeterminePosition(module, caster, spell), 3, forbiddenSoakers: Raid.WithSlot(true).WhereActor(p => p.InstanceID == Raid.Player()!.InstanceID).Mask())); + Towers.Add(new(DeterminePosition(caster, spell), 3, forbiddenSoakers: Raid.WithSlot(true).WhereActor(p => p.InstanceID == Raid.Player()!.InstanceID).Mask())); if (NumCasts == 0) - Towers.Add(new(DeterminePosition(module, caster, spell), 3)); + Towers.Add(new(DeterminePosition(caster, spell), 3)); } } @@ -66,12 +66,12 @@ public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.Electrocution or AID.FatalCurrent) { - Towers.RemoveAll(t => t.Position.AlmostEqual(DeterminePosition(module, caster, spell), 1)); + Towers.RemoveAll(t => t.Position.AlmostEqual(DeterminePosition(caster, spell), 1)); ++NumCasts; } } - private WPos DeterminePosition(BossModule module, Actor caster, ActorCastInfo spell) => spell.TargetID == caster.InstanceID ? caster.Position : WorldState.Actors.Find(spell.TargetID)?.Position ?? spell.LocXZ; + private WPos DeterminePosition(Actor caster, ActorCastInfo spell) => spell.TargetID == caster.InstanceID ? caster.Position : WorldState.Actors.Find(spell.TargetID)?.Position ?? spell.LocXZ; public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { @@ -80,9 +80,8 @@ public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignme } } -class Electrocution2 : Components.CastTowers +class Electrocution2(BossModule module) : Components.CastTowers(module, ActionID.MakeSpell(AID.Electrocution2), 3) { - public Electrocution2() : base(ActionID.MakeSpell(AID.Electrocution2), 3) { } public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { if (Towers.Count > 0) @@ -94,7 +93,7 @@ class Stomp(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSp class DeathRay : Components.SelfTargetedAOEs { - public DeathRay() : base(ActionID.MakeSpell(AID.DeathRay2), new AOEShapeRect(40, 1)) + public DeathRay(BossModule module) : base(module, ActionID.MakeSpell(AID.DeathRay2), new AOEShapeRect(40, 1)) { Color = ArenaColor.Danger; } @@ -102,7 +101,7 @@ class DeathRay : Components.SelfTargetedAOEs class TailWhip(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TailWhip), new AOEShapeCone(12, 135.Degrees())); -class DeathRay2 : Components.GenericAOEs +class DeathRay2(BossModule module) : Components.GenericAOEs(module) { private static readonly AOEShapeRect rect = new(40, 11); private DateTime _activation; @@ -145,9 +144,8 @@ public IseultalonStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.Quest, GroupID = 68695, NameID = 7895)] -public class Iseultalon : BossModule +public class Iseultalon(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(-289, -30), 25)) // note the arena is actually a 6 sided polygon { - public Iseultalon(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(-289, -30), 25)) { } //note the arena is actually a 6 sided polygon protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); diff --git a/BossMod/Modules/Global/Quest/FF15Collab/MA-x.cs b/BossMod/Modules/Global/Quest/FF15Collab/MA-x.cs index 8c055683a1..43789e240e 100644 --- a/BossMod/Modules/Global/Quest/FF15Collab/MA-x.cs +++ b/BossMod/Modules/Global/Quest/FF15Collab/MA-x.cs @@ -21,9 +21,7 @@ public enum AID : uint } class Chainsaw(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Chainsaw), new AOEShapeCone(10, 45.Degrees())); - class Shock(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Shock), new AOEShapeCircle(10)); - class MagitekMissile(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.MagitekMissile2), 5); class MAxStates : StateMachineBuilder @@ -38,10 +36,8 @@ public MAxStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.Quest, GroupID = 68694, NameID = 7898)] // also: fate 1409 -public class MAx : BossModule +public class MAx(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(295, -22), 25)) { - public MAx(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(295, -22), 25)) { } - protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); diff --git a/BossMod/Modules/Global/Quest/FF16Collab/InfernalShadow.cs b/BossMod/Modules/Global/Quest/FF16Collab/InfernalShadow.cs index 69f5419d19..9c8d2035ea 100644 --- a/BossMod/Modules/Global/Quest/FF16Collab/InfernalShadow.cs +++ b/BossMod/Modules/Global/Quest/FF16Collab/InfernalShadow.cs @@ -1,17 +1,13 @@ namespace BossMod.Global.Quest.FF16Collab.InfernalShadow; class VulcanBurst(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.VulcanBurstReal), "Time your dodge correctly"); - class Hellfire(BossModule module) : Components.RaidwideCastDelay(module, ActionID.MakeSpell(AID.HellfireVisual), ActionID.MakeSpell(AID.HellfireRaidwide), 0.6f); - class Incinerate(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.IncinerateReal), 5); -class SpreadingFire : Components.ConcentricAOEs +class SpreadingFire(BossModule module) : Components.ConcentricAOEs(module, _shapes) { private static readonly AOEShape[] _shapes = [new AOEShapeCircle(10), new AOEShapeDonut(10, 20), new AOEShapeDonut(20, 30), new AOEShapeDonut(30, 40)]; - public SpreadingFire() : base(_shapes) { } - public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.SpreadingFire1st) @@ -36,13 +32,12 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } class SmolderingClaw(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.SmolderingClawReal), new AOEShapeCone(40, 75.Degrees())); - class TailStrike(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TailStrikeReal), new AOEShapeCone(40, 75.Degrees())); -class FireRampageCleave : Components.GenericAOEs +class FireRampageCleave(BossModule module) : Components.GenericAOEs(module) { private static readonly AOEShapeCone cone = new(40, 90.Degrees()); - private readonly List<(WPos position, Angle rotation, DateTime activation, uint AID)> _castersunsorted = []; + private readonly List<(WPos position, Angle rotation, DateTime activation, uint AID)> _castersunsorted = []; private List<(WPos position, Angle rotation, DateTime activation)> _casters = []; public override IEnumerable ActiveAOEs(int slot, Actor actor) @@ -60,7 +55,6 @@ public override void OnCastStarted(Actor caster, ActorCastInfo spell) } } - public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if (_casters.Count > 0 && (AID)spell.Action.ID is AID.FieryRampageCleaveReal or AID.FieryRampageCleaveReal2) @@ -72,16 +66,12 @@ public override void OnCastFinished(Actor caster, ActorCastInfo spell) } class FieryRampageCircle(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.FieryRampageCircleReal), new AOEShapeCircle(16)); - class FieryRampageRaidwide(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.FieryRampageRaidwideReal), "Time your dodge correctly"); - class PyrosaultReal(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PyrosaultReal), new AOEShapeCircle(10)); - class Fireball(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.FireballReal), 6); - class CrimsonRush(BossModule module) : Components.ChargeAOEs(module, ActionID.MakeSpell(AID.CrimsonRushReal), 10); -class CrimsonStreak : Components.GenericAOEs +class CrimsonStreak(BossModule module) : Components.GenericAOEs(module) { private readonly List<(WPos source, AOEShape shape, Angle direction, DateTime activation)> _casters = []; @@ -111,7 +101,7 @@ public override void OnCastFinished(Actor caster, ActorCastInfo spell) class Eruption(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.EruptionReal), 8); -class Eruption2 : Components.GenericAOEs +class Eruption2(BossModule module) : Components.GenericAOEs(module) { private readonly List<(WPos position, DateTime activation, uint AID)> _castersunsorted = []; private List<(WPos position, DateTime activation)> _casters = []; @@ -123,19 +113,19 @@ public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (NumCasts < 6 ? _casters.Count > 2 : _casters.Count > 3) for (int i = 0; NumCasts < 6 ? i < 3 : i < 4; ++i) - yield return new(circle, _casters[i].position, activation: _casters[i].activation, color: ArenaColor.Danger); + yield return new(circle, _casters[i].position, default, _casters[i].activation, ArenaColor.Danger); if (NumCasts < 3 ? _casters.Count > 5 : _casters.Count > 6) for (int i = 3; NumCasts < 3 ? i < 6 : i < 7; ++i) - yield return new(circle, _casters[i].position, activation: _casters[i].activation); + yield return new(circle, _casters[i].position, default, _casters[i].activation); } if (NumCasts >= 10) { if (_casters.Count > 3) for (int i = 0; _casters.Count > 6 ? i < 4 : i < 6; ++i) - yield return new(circle, _casters[i].position, activation: _casters[i].activation, color: ArenaColor.Danger); + yield return new(circle, _casters[i].position, default, _casters[i].activation, ArenaColor.Danger); if (_casters.Count > 7) for (int i = 4; _casters.Count > 10 ? i < 8 : i < 10; ++i) - yield return new(circle, _casters[i].position, activation: _casters[i].activation); + yield return new(circle, _casters[i].position, default, _casters[i].activation); } } @@ -160,9 +150,10 @@ public override void OnCastFinished(Actor caster, ActorCastInfo spell) } } -class BurningStrike : BossComponent +class BurningStrike(BossModule module) : BossComponent(module) { private bool casting; + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.BurningStrikeVisual) @@ -171,29 +162,29 @@ public override void OnCastStarted(Actor caster, ActorCastInfo spell) public override void Update() { - var defendtargetable = module.Enemies(OID.DefendClive).Where(x => x.IsTargetable).FirstOrDefault(); + var defendtargetable = Module.Enemies(OID.DefendClive).Where(x => x.IsTargetable).FirstOrDefault(); if (defendtargetable != null && casting) casting = false; } public override void AddHints(int slot, Actor actor, TextHints hints) { - var defendtargetable = module.Enemies(OID.DefendClive).Where(x => x.IsTargetable).FirstOrDefault(); + var defendtargetable = Module.Enemies(OID.DefendClive).Where(x => x.IsTargetable).FirstOrDefault(); if (casting && defendtargetable == null) hints.Add("Prepare to defend Clive!"); if (defendtargetable != null) - hints.Add($"Interact with {module.Enemies(OID.DefendClive).FirstOrDefault()!.Name} and solve a QTE!"); + hints.Add($"Interact with {Module.Enemies(OID.DefendClive).FirstOrDefault()!.Name} and solve a QTE!"); } public override void DrawArenaForeground(int pcSlot, Actor pc) { - var defendtargetable = module.Enemies(OID.DefendClive).Where(x => x.IsTargetable).FirstOrDefault(); + var defendtargetable = Module.Enemies(OID.DefendClive).Where(x => x.IsTargetable).FirstOrDefault(); if (defendtargetable != null) - arena.AddCircle(defendtargetable.Position, 1.4f, ArenaColor.Safe); + Arena.AddCircle(defendtargetable.Position, 1.4f, ArenaColor.Safe); } } -class SearingStomp : BossComponent +class SearingStomp(BossModule module) : BossComponent(module) { private int NumCasts; private bool casting; diff --git a/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/D60TheBlackRider.cs b/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/D60TheBlackRider.cs index 80cbd5e7b9..498a1b92a0 100644 --- a/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/D60TheBlackRider.cs +++ b/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/D60TheBlackRider.cs @@ -19,7 +19,7 @@ public enum AID : uint class CleaveAuto(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.AutoAttack), new AOEShapeCone(11.92f, 45.Degrees())); -class Geirrothr : Components.GenericAOEs +class Geirrothr(BossModule module) : Components.GenericAOEs(module) { private DateTime _activation; private static readonly AOEShapeCone cone = new(9.92f, 45.Degrees()); @@ -60,12 +60,10 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } class Infaturation(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Infaturation), new AOEShapeCircle(7)); - class HallOfSorrow(BossModule module) : Components.PersistentVoidzone(module, 9, m => m.Enemies(OID.Voidzone).Where(z => z.EventState != 7)); - class Valfodr(BossModule module) : Components.BaitAwayChargeCast(module, ActionID.MakeSpell(AID.Valfodr), 3); -class ValfodrKB : Components.Knockback //note actual knockback is delayed by upto 1.2s in replay +class ValfodrKB(BossModule module) : Components.Knockback(module) // note actual knockback is delayed by upto 1.2s in replay { private DateTime _activation; @@ -84,7 +82,7 @@ public override void OnCastStarted(Actor caster, ActorCastInfo spell) } } - public override bool DestinationUnsafe(BossModule module, int slot, Actor actor, WPos pos) => (module.FindComponent()?.ActiveAOEs(module, slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false) || (module.FindComponent()?.ActiveAOEs(module, slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false); + public override bool DestinationUnsafe(int slot, Actor actor, WPos pos) => (module.FindComponent()?.ActiveAOEs(slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false) || (module.FindComponent()?.ActiveAOEs(slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false); } class D60TheBlackRiderStates : StateMachineBuilder diff --git a/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/D70Yaquaru.cs b/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/D70Yaquaru.cs index 90e9288624..e3bbf949b9 100644 --- a/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/D70Yaquaru.cs +++ b/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/D70Yaquaru.cs @@ -18,12 +18,13 @@ public enum AID : uint class Douse(BossModule module) : Components.PersistentVoidzoneAtCastTarget(module, 8, ActionID.MakeSpell(AID.Douse), m => m.Enemies(OID.Voidzone).Where(z => z.EventState != 7), 0.8f); -class DouseHaste : BossComponent +class DouseHaste(BossModule module) : BossComponent(module) { private bool BossInVoidzone; + public override void Update() { - if (module.FindComponent()?.ActiveAOEs(module, 0, Module.PrimaryActor).Any(z => z.Shape.Check(Module.PrimaryActor.Position, z.Origin, z.Rotation)) ?? false) + if (Module.FindComponent()?.ActiveAOEs(0, Module.PrimaryActor).Any(z => z.Shape.Check(Module.PrimaryActor.Position, z.Origin, z.Rotation)) ?? false) BossInVoidzone = true; else BossInVoidzone = false; @@ -38,7 +39,7 @@ public override void AddHints(int slot, Actor actor, TextHints hints) } } -class Drench : Components.GenericAOEs +class Drench(BossModule module) : Components.GenericAOEs(module) { private DateTime _activation; private static readonly AOEShapeCone cone = new(15.75f, 45.Degrees()); diff --git a/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/D80Gudanna.cs b/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/D80Gudanna.cs index d0dd08233b..8decaabdc3 100644 --- a/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/D80Gudanna.cs +++ b/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/D80Gudanna.cs @@ -19,16 +19,12 @@ public enum AID : uint } class Charybdis(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Charybdis), 6); - class Maelstrom(BossModule module) : Components.PersistentVoidzone(module, 10, m => m.Enemies(OID.Tornado)); - class Trounce(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Trounce), new AOEShapeCone(51.6f, 30.Degrees())); - class EclipticMeteor(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.EclipticMeteor), "Kill him before he kills you! 80% max HP damage incoming!"); - class Thunderbolt(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Thunderbolt), new AOEShapeCone(16.6f, 60.Degrees())); -class Hints : BossComponent +class Hints(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/AethericBoom.cs b/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/AethericBoom.cs index b71a61d73b..d32a5d58bf 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/AethericBoom.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/AethericBoom.cs @@ -113,7 +113,7 @@ public override void DrawArenaForeground(int pcSlot, Actor pc) public override void OnEventCast(Actor caster, ActorCastEvent spell) { - base.OnEventCast(module, caster, spell); + base.OnEventCast(caster, spell); if ((AID)spell.Action.ID == AID.AetheroplasmBoom) { _activeOrbs.Remove(caster); diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/Freefire.cs b/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/Freefire.cs index 67ab2217be..001b4714d2 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/Freefire.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/Freefire.cs @@ -34,7 +34,7 @@ public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignme } } - base.AddAIHints(module, slot, actor, assignment, hints); + base.AddAIHints(slot, actor, assignment, hints); } public override void OnActorPlayActionTimelineEvent(Actor actor, ushort id) @@ -48,7 +48,7 @@ public override void OnActorPlayActionTimelineEvent(Actor actor, ushort id) public override void OnEventCast(Actor caster, ActorCastEvent spell) { - base.OnEventCast(module, caster, spell); + base.OnEventCast(caster, spell); if (spell.Action == WatchedAction) _casters.Remove(caster); } diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/MistralSongVulcanBurst.cs b/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/MistralSongVulcanBurst.cs index 6fb322fec3..de7ea316d8 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/MistralSongVulcanBurst.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/MistralSongVulcanBurst.cs @@ -45,7 +45,7 @@ public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignme public override void DrawArenaForeground(int pcSlot, Actor pc) { - base.DrawArenaForeground(module, pcSlot, pc, arena); + base.DrawArenaForeground(pcSlot, pc); var adjPos = _burstImminent ? arena.Bounds.ClampToBounds(Components.Knockback.AwayFromSource(pc.Position, Module.PrimaryActor, 30)) : pc.Position; Components.Knockback.DrawKnockback(pc, adjPos, arena); @@ -69,7 +69,7 @@ public override void OnCastFinished(Actor caster, ActorCastInfo spell) public override void OnEventCast(Actor caster, ActorCastEvent spell) { - base.OnEventCast(module, caster, spell); + base.OnEventCast(caster, spell); if ((AID)spell.Action.ID == AID.VulcanBurst) _burstImminent = false; } diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/TankPurge.cs b/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/TankPurge.cs index d0c06c8d13..9a0541c5a8 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/TankPurge.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/TankPurge.cs @@ -6,7 +6,7 @@ public TankPurge() : base(ActionID.MakeSpell(AID.TankPurge)) { } public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { - base.AddAIHints(module, slot, actor, assignment, hints); + base.AddAIHints(slot, actor, assignment, hints); // execute raid saves; it happens every ~45s, so 2 people in reprisal/feint/addle rotation if (Active) diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/WickedWheel.cs b/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/WickedWheel.cs index 7300682bcc..45abc50c3c 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/WickedWheel.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/WickedWheel.cs @@ -33,7 +33,7 @@ public override void DrawArenaForeground(int pcSlot, Actor pc) public override void OnEventCast(Actor caster, ActorCastEvent spell) { - base.OnEventCast(module, caster, spell); + base.OnEventCast(caster, spell); if (spell.Action == WatchedAction) { // not sure about this ... diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/MountainBuster.cs b/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/MountainBuster.cs index c2b6b64b1e..199206f964 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/MountainBuster.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/MountainBuster.cs @@ -12,7 +12,7 @@ public override void Init(BossModule module) public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { - base.AddAIHints(module, slot, actor, assignment, hints); + base.AddAIHints(slot, actor, assignment, hints); var boss = hints.PotentialTargets.Find(e => (OID)e.Actor.OID == OID.Boss); if (boss != null) boss.AttackStrength += 0.25f; @@ -31,7 +31,7 @@ public override void Init(BossModule module) public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { - base.AddAIHints(module, slot, actor, assignment, hints); + base.AddAIHints(slot, actor, assignment, hints); var boss = hints.PotentialTargets.Find(e => (OID)e.Actor.OID == OID.TitansHeart); if (boss != null) boss.AttackStrength += 0.25f; diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/Tumult.cs b/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/Tumult.cs index b61b0cd934..b9fde1d2ee 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/Tumult.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/Tumult.cs @@ -18,7 +18,7 @@ public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignme public override void OnEventCast(Actor caster, ActorCastEvent spell) { - base.OnEventCast(module, caster, spell); + base.OnEventCast(caster, spell); if (spell.Action == WatchedAction) _nextExpected = WorldState.FutureTime(1.2f); } diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/Eruption.cs b/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/Eruption.cs index 930a4a17cd..807dd929b9 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/Eruption.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/Eruption.cs @@ -18,7 +18,7 @@ public override void Update() public override void OnCastStarted(Actor caster, ActorCastInfo spell) { - base.OnCastStarted(module, caster, spell); + base.OnCastStarted(caster, spell); switch ((AID)spell.Action.ID) { case AID.Eruption: diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/Ex4IfritAI.cs b/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/Ex4IfritAI.cs index faf6e716bf..cf1de11cbc 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/Ex4IfritAI.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/Ex4IfritAI.cs @@ -229,7 +229,7 @@ public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignme var nextNail = NailKillOrder.FirstOrDefault(); if (nextNail == null) { - base.AddAIHints(module, slot, actor, assignment, hints); + base.AddAIHints(slot, actor, assignment, hints); } else { @@ -297,7 +297,7 @@ public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignme public override void DrawArenaForeground(int pcSlot, Actor pc) { - base.DrawArenaForeground(module, pcSlot, pc, arena); + base.DrawArenaForeground(pcSlot, pc); var nextNail = NailKillOrder.FirstOrDefault(); if (nextNail != null) arena.AddCircle(nextNail.Position, 2, ArenaColor.Safe); @@ -318,7 +318,7 @@ public Ex4IfritAINails1() : base(1, 0x8) { } public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { - base.AddAIHints(module, slot, actor, assignment, hints); + base.AddAIHints(slot, actor, assignment, hints); if (Module.PrimaryActor.TargetID == actor.InstanceID) { @@ -334,7 +334,7 @@ public Ex4IfritAINails2() : base(4, 0x7) { } public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { - base.AddAIHints(module, slot, actor, assignment, hints); + base.AddAIHints(slot, actor, assignment, hints); if (Module.PrimaryActor.TargetID == actor.InstanceID) { @@ -350,7 +350,7 @@ public Ex4IfritAINails3() : base(7, 0x3C70) { } public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { - base.AddAIHints(module, slot, actor, assignment, hints); + base.AddAIHints(slot, actor, assignment, hints); if (Module.PrimaryActor.TargetID == actor.InstanceID) { diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/SearingWind.cs b/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/SearingWind.cs index 738faf0ad4..15524721f6 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/SearingWind.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/SearingWind.cs @@ -18,7 +18,7 @@ public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignme { // we let AI provide soft positioning hints until resolve is imminent if (WorldState.CurrentTime > _showHintsAfter) - base.AddAIHints(module, slot, actor, assignment, hints); + base.AddAIHints(slot, actor, assignment, hints); } public override void OnCastStarted(Actor caster, ActorCastInfo spell) diff --git a/BossMod/Modules/RealmReborn/Raid/T01Caduceus/T01Caduceus.cs b/BossMod/Modules/RealmReborn/Raid/T01Caduceus/T01Caduceus.cs index 0788dbc55b..690ac3efe7 100644 --- a/BossMod/Modules/RealmReborn/Raid/T01Caduceus/T01Caduceus.cs +++ b/BossMod/Modules/RealmReborn/Raid/T01Caduceus/T01Caduceus.cs @@ -44,7 +44,7 @@ public override void AddGlobalHints(GlobalHints hints) public override void OnEventCast(Actor caster, ActorCastEvent spell) { - base.OnEventCast(module, caster, spell); + base.OnEventCast(caster, spell); if (spell.Action == WatchedAction && caster == Module.PrimaryActor) _lastBossCast = WorldState.CurrentTime; } diff --git a/BossMod/Modules/RealmReborn/Raid/T05Twintania/Common.cs b/BossMod/Modules/RealmReborn/Raid/T05Twintania/Common.cs index 43e2a29491..f95b85d67c 100644 --- a/BossMod/Modules/RealmReborn/Raid/T05Twintania/Common.cs +++ b/BossMod/Modules/RealmReborn/Raid/T05Twintania/Common.cs @@ -13,7 +13,7 @@ public override void Init(BossModule module) public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { - base.AddAIHints(module, slot, actor, assignment, hints); + base.AddAIHints(slot, actor, assignment, hints); if ((NextExpected - WorldState.CurrentTime).TotalSeconds < 3) { var boss = hints.PotentialTargets.Find(e => e.Actor == Module.PrimaryActor); @@ -24,7 +24,7 @@ public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignme public override void OnEventCast(Actor caster, ActorCastEvent spell) { - base.OnEventCast(module, caster, spell); + base.OnEventCast(caster, spell); if (spell.Action == WatchedAction) NextExpected = WorldState.FutureTime(12.5f); } diff --git a/BossMod/Modules/RealmReborn/Raid/T05Twintania/Phase3.cs b/BossMod/Modules/RealmReborn/Raid/T05Twintania/Phase3.cs index 06460169b0..52a355a3e8 100644 --- a/BossMod/Modules/RealmReborn/Raid/T05Twintania/Phase3.cs +++ b/BossMod/Modules/RealmReborn/Raid/T05Twintania/Phase3.cs @@ -22,7 +22,7 @@ public override IEnumerable ActiveAOEs(int slot, Actor actor) public override void OnEventCast(Actor caster, ActorCastEvent spell) { - base.OnEventCast(module, caster, spell); + base.OnEventCast(caster, spell); switch ((AID)spell.Action.ID) { case AID.DivebombMarker: diff --git a/BossMod/Modules/RealmReborn/Raid/T05Twintania/Phase5.cs b/BossMod/Modules/RealmReborn/Raid/T05Twintania/Phase5.cs index 488515be5e..5d3d3d259c 100644 --- a/BossMod/Modules/RealmReborn/Raid/T05Twintania/Phase5.cs +++ b/BossMod/Modules/RealmReborn/Raid/T05Twintania/Phase5.cs @@ -9,7 +9,7 @@ public P5LiquidHell() : base(6, ActionID.MakeSpell(AID.LiquidHellBoss), m => m.E public override void OnEventCast(Actor caster, ActorCastEvent spell) { - base.OnEventCast(module, caster, spell); + base.OnEventCast(caster, spell); switch ((AID)spell.Action.ID) { case AID.LiquidHellMarker: diff --git a/BossMod/Modules/RealmReborn/Trial/T04PortaDecumana/T04PortaDecumana2.cs b/BossMod/Modules/RealmReborn/Trial/T04PortaDecumana/T04PortaDecumana2.cs index fbc4dc91c3..7242b8b959 100644 --- a/BossMod/Modules/RealmReborn/Trial/T04PortaDecumana/T04PortaDecumana2.cs +++ b/BossMod/Modules/RealmReborn/Trial/T04PortaDecumana/T04PortaDecumana2.cs @@ -124,7 +124,7 @@ class Explosion : Components.SelfTargetedAOEs public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { if (module.FindComponent()!.Casters.Count == 0) - base.AddAIHints(module, slot, actor, assignment, hints); + base.AddAIHints(slot, actor, assignment, hints); } } diff --git a/BossMod/Modules/RealmReborn/Trial/T08ThornmarchH/MoogleGoRound.cs b/BossMod/Modules/RealmReborn/Trial/T08ThornmarchH/MoogleGoRound.cs index 08cd603752..1fbaf1983f 100644 --- a/BossMod/Modules/RealmReborn/Trial/T08ThornmarchH/MoogleGoRound.cs +++ b/BossMod/Modules/RealmReborn/Trial/T08ThornmarchH/MoogleGoRound.cs @@ -12,7 +12,7 @@ public override IEnumerable ActiveAOEs(int slot, Actor actor) public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { - base.AddAIHints(module, slot, actor, assignment, hints); + base.AddAIHints(slot, actor, assignment, hints); // if there is a third cast, add a smaller shape to ensure people stay closer to eventual safespot if (_casters.Count > 2) diff --git a/BossMod/Modules/Shadowbringers/Dungeon/D01Holminster/D013Philia.cs b/BossMod/Modules/Shadowbringers/Dungeon/D01Holminster/D013Philia.cs index 386058af30..c6464745c9 100644 --- a/BossMod/Modules/Shadowbringers/Dungeon/D01Holminster/D013Philia.cs +++ b/BossMod/Modules/Shadowbringers/Dungeon/D01Holminster/D013Philia.cs @@ -182,7 +182,7 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { - base.AddAIHints(module, slot, actor, assignment, hints); + base.AddAIHints(slot, actor, assignment, hints); if (target == actor && targeted) hints.AddForbiddenZone(ShapeDistance.Rect(Module.Bounds.Center, target.Position, 18)); } diff --git a/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D030RonkanDreamer.cs b/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D030RonkanDreamer.cs index ca00ef1c07..7aa3737231 100644 --- a/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D030RonkanDreamer.cs +++ b/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D030RonkanDreamer.cs @@ -137,7 +137,7 @@ public override void DrawArenaForeground(int pcSlot, Actor pc) public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { //Note: this isn't looking natural because the AI is trying to dodge the lasers and the wall at the same time, consider not activating the AI in partyfinder until the AI is improved, for multiboxing it should do ok - base.AddAIHints(module, slot, actor, assignment, hints); + base.AddAIHints(slot, actor, assignment, hints); if (Module.PrimaryActor.Position.AlmostEqual(new(0, 634), 1)) { hints.AddForbiddenZone(ShapeDistance.ConvexPolygon(Wall1(), true)); diff --git a/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D031Lozatl.cs b/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D031Lozatl.cs index 973fccae49..533c9e091d 100644 --- a/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D031Lozatl.cs +++ b/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D031Lozatl.cs @@ -37,7 +37,7 @@ class RonkanLight : Components.GenericAOEs public override IEnumerable ActiveAOEs(int slot, Actor actor) => Utils.ZeroOrOne(_aoe); - public override void OnActorEAnim(BossModule module, Actor actor, uint state) + public override void OnActorEAnim(Actor actor, uint state) { if (state == 0x00040008) { diff --git a/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D033Eros.cs b/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D033Eros.cs index c05e67cb6c..39ebe850dc 100644 --- a/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D033Eros.cs +++ b/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D033Eros.cs @@ -77,7 +77,7 @@ public override void AddHints(int slot, Actor actor, TextHints hints) public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { - base.AddAIHints(module, slot, actor, assignment, hints); + base.AddAIHints(slot, actor, assignment, hints); if (target == actor.InstanceID && CurrentBaits.Count > 0) hints.AddForbiddenZone(ShapeDistance.Circle(Module.PrimaryActor.Position, 15)); } @@ -115,7 +115,7 @@ public override void AddHints(int slot, Actor actor, TextHints hints) public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { - base.AddAIHints(module, slot, actor, assignment, hints); + base.AddAIHints(slot, actor, assignment, hints); if (target == actor.InstanceID && CurrentBaits.Count > 0) hints.AddForbiddenZone(ShapeDistance.Circle(Module.PrimaryActor.Position, 15)); } @@ -165,7 +165,7 @@ public override void AddHints(int slot, Actor actor, TextHints hints) public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { - base.AddAIHints(module, slot, actor, assignment, hints); + base.AddAIHints(slot, actor, assignment, hints); if (target == actor && targeted) hints.AddForbiddenZone(ShapeDistance.Rect(new(17, -518), new(17, -558), 13)); } diff --git a/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D055ForgivenObscenity.cs b/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D055ForgivenObscenity.cs index 5ba66f726c..7bb1009915 100644 --- a/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D055ForgivenObscenity.cs +++ b/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D055ForgivenObscenity.cs @@ -52,7 +52,7 @@ public override void OnActorCreated(Actor actor) if ((OID)actor.OID == OID.Orbs) _orbs.Add(actor); } - public override void OnActorEAnim(BossModule module, Actor actor, uint state) + public override void OnActorEAnim(Actor actor, uint state) { if (state == 0x00040008) _orbs.RemoveAll(t => t.Position.AlmostEqual(actor.Position, 4)); @@ -196,7 +196,7 @@ class OrisonFortissimo(BossModule module) : Components.RaidwideCastDelay(module, class Voidzone : BossComponent { private bool active; - public override void OnActorEAnim(BossModule module, Actor actor, uint state) + public override void OnActorEAnim(Actor actor, uint state) { if (state == 0x00040008) { @@ -212,7 +212,7 @@ public override void OnActorEAnim(BossModule module, Actor actor, uint state) public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { - base.AddAIHints(module, slot, actor, assignment, hints); + base.AddAIHints(slot, actor, assignment, hints); if (active) hints.PlannedActions.Add((ActionID.MakeSpell(WAR.AID.Sprint), actor, 1, false)); } diff --git a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE41WithDiremiteAndMain.cs b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE41WithDiremiteAndMain.cs index 8a5490225d..8fca4fe33e 100644 --- a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE41WithDiremiteAndMain.cs +++ b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE41WithDiremiteAndMain.cs @@ -129,7 +129,7 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) _targets[NumCasts] = null; _activation = WorldState.FutureTime(2.3f); } - base.OnEventCast(module, caster, spell); + base.OnEventCast(caster, spell); } public override void OnEventIcon(Actor actor, uint iconID) diff --git a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE52TimeToBurn.cs b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE52TimeToBurn.cs index 0eed322f96..380b11b6ec 100644 --- a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE52TimeToBurn.cs +++ b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE52TimeToBurn.cs @@ -74,7 +74,7 @@ public override void DrawArenaBackground(int pcSlot, Actor pc) { foreach (var p in _eruptionSafeSpots) _shapeEruption.Draw(arena, p, new(), ArenaColor.SafeFromAOE); - base.DrawArenaBackground(module, pcSlot, pc, arena); + base.DrawArenaBackground(pcSlot, pc); } public override void OnCastStarted(Actor caster, ActorCastInfo spell) @@ -113,7 +113,7 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } } - public override void OnActorEAnim(BossModule module, Actor actor, uint state) + public override void OnActorEAnim(Actor actor, uint state) { if ((OID)actor.OID != OID.Clock) return; diff --git a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE53HereComesTheCavalry.cs b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE53HereComesTheCavalry.cs index 67a3bdf2e3..b96e04b3ce 100644 --- a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE53HereComesTheCavalry.cs +++ b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE53HereComesTheCavalry.cs @@ -115,7 +115,7 @@ public override void AddGlobalHints(GlobalHints hints) public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { - base.AddAIHints(module, slot, actor, assignment, hints); + base.AddAIHints(slot, actor, assignment, hints); foreach (var b in ActiveBaits) { if (b.Target == actor) diff --git a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE54NeverCryWolf.cs b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE54NeverCryWolf.cs index 0441594e37..094cf5b828 100644 --- a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE54NeverCryWolf.cs +++ b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE54NeverCryWolf.cs @@ -80,7 +80,7 @@ public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignme { if (_knockback?.Casters.Count > 0) return; // resolve knockbacks first - base.AddAIHints(module, slot, actor, assignment, hints); + base.AddAIHints(slot, actor, assignment, hints); } public override void OnActorCreated(Actor actor) @@ -91,7 +91,7 @@ public override void OnActorCreated(Actor actor) public override void OnCastStarted(Actor caster, ActorCastInfo spell) { - base.OnCastStarted(module, caster, spell); + base.OnCastStarted(caster, spell); if ((AID)spell.Action.ID == AID.PillarPierce) _safePillars.Remove(caster); } diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS3Dahu/SpitFlame.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS3Dahu/SpitFlame.cs index 1ddde29f25..c19daf574c 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS3Dahu/SpitFlame.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS3Dahu/SpitFlame.cs @@ -32,7 +32,7 @@ public override void AddHints(int slot, Actor actor, TextHints hints) public override void DrawArenaForeground(int pcSlot, Actor pc) { arena.Actors(_adds, ArenaColor.Object, true); - base.DrawArenaForeground(module, pcSlot, pc, arena); + base.DrawArenaForeground(pcSlot, pc); } public override void OnEventIcon(Actor actor, uint iconID) diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS5Phantom/Miasma.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS5Phantom/Miasma.cs index 3a53a30650..f9daada243 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS5Phantom/Miasma.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS5Phantom/Miasma.cs @@ -108,7 +108,7 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } } - public override void OnActorEAnim(BossModule module, Actor actor, uint state) + public override void OnActorEAnim(Actor actor, uint state) { if (state != 0x00010002) return; // other states: 00080010 - start glowing, 00040020 - disappear diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS7StygimolochLord/CrushingHoof.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS7StygimolochLord/CrushingHoof.cs index ddab78b5e3..9c637e043d 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS7StygimolochLord/CrushingHoof.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS7StygimolochLord/CrushingHoof.cs @@ -16,7 +16,7 @@ public override void OnCastStarted(Actor caster, ActorCastInfo spell) public override void OnEventCast(Actor caster, ActorCastEvent spell) { - base.OnEventCast(module, caster, spell); + base.OnEventCast(caster, spell); if (spell.Action == WatchedAction) _aoe = null; } diff --git a/BossMod/Modules/Shadowbringers/Foray/Duel/Duel2Lyon/Duel2LyonGenericAttacks.cs b/BossMod/Modules/Shadowbringers/Foray/Duel/Duel2Lyon/Duel2LyonGenericAttacks.cs index 797fb959fb..1d53941c50 100644 --- a/BossMod/Modules/Shadowbringers/Foray/Duel/Duel2Lyon/Duel2LyonGenericAttacks.cs +++ b/BossMod/Modules/Shadowbringers/Foray/Duel/Duel2Lyon/Duel2LyonGenericAttacks.cs @@ -236,7 +236,7 @@ public override void OnCastStarted(Actor caster, ActorCastInfo spell) } public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { - base.AddAIHints(module, slot, actor, assignment, hints); + base.AddAIHints(slot, actor, assignment, hints); if (target == actor.InstanceID && CurrentBaits.Count > 0) hints.AddForbiddenZone(ShapeDistance.Circle(Module.Bounds.Center, 18)); } diff --git a/BossMod/Modules/Shadowbringers/Foray/Duel/Duel4Dabog/RightArmComet.cs b/BossMod/Modules/Shadowbringers/Foray/Duel/Duel4Dabog/RightArmComet.cs index ae74de87f5..55167bf894 100644 --- a/BossMod/Modules/Shadowbringers/Foray/Duel/Duel4Dabog/RightArmComet.cs +++ b/BossMod/Modules/Shadowbringers/Foray/Duel/Duel4Dabog/RightArmComet.cs @@ -15,7 +15,7 @@ public override void AddHints(int slot, Actor actor, TextHints hints) public override void DrawArenaForeground(int pcSlot, Actor pc) { - base.DrawArenaForeground(module, pcSlot, pc, arena); + base.DrawArenaForeground(pcSlot, pc); foreach (var c in Casters) arena.AddCircle(c.Position, _radius, pc.Position.InCircle(c.Position, _radius) ? ArenaColor.Safe : ArenaColor.Danger, 2); } diff --git a/BossMod/Modules/Shadowbringers/Hunt/RankS/Ixtab.cs b/BossMod/Modules/Shadowbringers/Hunt/RankS/Ixtab.cs index 73704e7f30..2e793448bd 100644 --- a/BossMod/Modules/Shadowbringers/Hunt/RankS/Ixtab.cs +++ b/BossMod/Modules/Shadowbringers/Hunt/RankS/Ixtab.cs @@ -130,7 +130,7 @@ public override void AddHints(int slot, Actor actor, TextHints hints) public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { - base.AddAIHints(module, slot, actor, assignment, hints); + base.AddAIHints(slot, actor, assignment, hints); foreach (var c in _doomed) { if (_doomed.Count > 0 && actor.Role == Role.Healer) diff --git a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretBasket.cs b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretBasket.cs index 273bd0c606..3b9409ea00 100644 --- a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretBasket.cs +++ b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretBasket.cs @@ -53,7 +53,7 @@ class HeavyStrike2 : Components.SelfTargetedAOEs public override void OnCastFinished(Actor caster, ActorCastInfo spell) { - base.OnCastFinished(module, caster, spell); + base.OnCastFinished(caster, spell); if ((AID)spell.Action.ID == AID.HeavyStrike1) Color = ArenaColor.Danger; else @@ -67,7 +67,7 @@ class HeavyStrike3 : Components.SelfTargetedAOEs public HeavyStrike3() : base(ActionID.MakeSpell(AID.HeavyStrike3), new AOEShapeDonutSector(12.5f, 18.5f, 135.Degrees())) { } public override void OnCastFinished(Actor caster, ActorCastInfo spell) { - base.OnCastFinished(module, caster, spell); + base.OnCastFinished(caster, spell); if ((AID)spell.Action.ID == AID.HeavyStrike2) Color = ArenaColor.Danger; else diff --git a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretWorm.cs b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretWorm.cs index 2c244d83d1..187d2cfd9e 100644 --- a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretWorm.cs +++ b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretWorm.cs @@ -71,7 +71,7 @@ public override void OnCastStarted(Actor caster, ActorCastInfo spell) public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { - base.AddAIHints(module, slot, actor, assignment, hints); + base.AddAIHints(slot, actor, assignment, hints); if (target == actor && targeted) hints.AddForbiddenZone(ShapeDistance.Circle(Module.Bounds.Center, 17.5f)); } diff --git a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarAiravata.cs b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarAiravata.cs index 41fd8e64a3..f78b60a457 100644 --- a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarAiravata.cs +++ b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarAiravata.cs @@ -64,7 +64,7 @@ public override IEnumerable Sources(int slot, Actor actor) public override void OnCastFinished(Actor caster, ActorCastInfo spell) { - base.OnCastFinished(module, caster, spell); + base.OnCastFinished(caster, spell); if ((AID)spell.Action.ID == AID.Buffet) targeted = false; } @@ -80,7 +80,7 @@ public override void AddHints(int slot, Actor actor, TextHints hints) public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { - base.AddAIHints(module, slot, actor, assignment, hints); + base.AddAIHints(slot, actor, assignment, hints); if (target == actor && targeted) hints.AddForbiddenZone(ShapeDistance.Circle(Module.Bounds.Center, 18)); } diff --git a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarChimera.cs b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarChimera.cs index 10c46553c0..3ffb18394b 100644 --- a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarChimera.cs +++ b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarChimera.cs @@ -75,7 +75,7 @@ public override void OnCastStarted(Actor caster, ActorCastInfo spell) public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { - base.AddAIHints(module, slot, actor, assignment, hints); + base.AddAIHints(slot, actor, assignment, hints); if (target == actor && targeted) hints.AddForbiddenZone(ShapeDistance.Circle(Module.Bounds.Center, 18)); } diff --git a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarDiresaur.cs b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarDiresaur.cs index 125df17129..3226786d5d 100644 --- a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarDiresaur.cs +++ b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarDiresaur.cs @@ -78,7 +78,7 @@ public override void OnCastStarted(Actor caster, ActorCastInfo spell) public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { - base.AddAIHints(module, slot, actor, assignment, hints); + base.AddAIHints(slot, actor, assignment, hints); if (target == actor && targeted) hints.AddForbiddenZone(ShapeDistance.Circle(Module.Bounds.Center, 18)); } diff --git a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarTotem.cs b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarTotem.cs index c314b93039..de4029a115 100644 --- a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarTotem.cs +++ b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarTotem.cs @@ -71,7 +71,7 @@ public override void OnCastStarted(Actor caster, ActorCastInfo spell) public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { - base.AddAIHints(module, slot, actor, assignment, hints); + base.AddAIHints(slot, actor, assignment, hints); if (target == actor && targeted) hints.AddForbiddenZone(ShapeDistance.Circle(Module.Bounds.Center, 18)); } diff --git a/BossMod/Modules/Stormblood/Ultimate/UCOB/P2Heavensfall.cs b/BossMod/Modules/Stormblood/Ultimate/UCOB/P2Heavensfall.cs index fea561d5bd..9643af686b 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UCOB/P2Heavensfall.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UCOB/P2Heavensfall.cs @@ -18,7 +18,7 @@ class P2HeavensfallPillar : Components.GenericAOEs public override IEnumerable ActiveAOEs(int slot, Actor actor) => Utils.ZeroOrOne(_aoe); - public override void OnActorEAnim(BossModule module, Actor actor, uint state) + public override void OnActorEAnim(Actor actor, uint state) { if ((OID)actor.OID != OID.EventHelper) return; diff --git a/BossMod/Modules/Stormblood/Ultimate/UCOB/P3EarthShaker.cs b/BossMod/Modules/Stormblood/Ultimate/UCOB/P3EarthShaker.cs index ac78878777..8ddce25651 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UCOB/P3EarthShaker.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UCOB/P3EarthShaker.cs @@ -19,7 +19,7 @@ public override void OnEventIcon(Actor actor, uint iconID) public override void OnEventCast(Actor caster, ActorCastEvent spell) { - base.OnEventCast(module, caster, spell); + base.OnEventCast(caster, spell); if ((AID)spell.Action.ID == AID.EarthShaker) { CurrentBaits.Clear(); diff --git a/BossMod/Modules/Stormblood/Ultimate/UCOB/P3HeavensfallTrio.cs b/BossMod/Modules/Stormblood/Ultimate/UCOB/P3HeavensfallTrio.cs index c8bfe06c9a..7f4f953c5b 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UCOB/P3HeavensfallTrio.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UCOB/P3HeavensfallTrio.cs @@ -71,7 +71,7 @@ public P3HeavensfallTowers() : base(ActionID.MakeSpell(AID.MegaflareTower), 3) { public override void OnCastStarted(Actor caster, ActorCastInfo spell) { - base.OnCastStarted(module, caster, spell); + base.OnCastStarted(caster, spell); if (spell.Action == WatchedAction && Towers.Count == 8) { diff --git a/BossMod/Modules/Stormblood/Ultimate/UWU/P2CrimsonCyclone.cs b/BossMod/Modules/Stormblood/Ultimate/UWU/P2CrimsonCyclone.cs index ba61d46063..5097632423 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UWU/P2CrimsonCyclone.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UWU/P2CrimsonCyclone.cs @@ -61,7 +61,7 @@ public override void OnCastFinished(Actor caster, ActorCastInfo spell) public override void OnEventCast(Actor caster, ActorCastEvent spell) { - base.OnEventCast(module, caster, spell); + base.OnEventCast(caster, spell); if ((AID)spell.Action.ID == AID.CrimsonCycloneCross) { _predicted.Clear(); diff --git a/BossMod/Modules/Stormblood/Ultimate/UWU/P2Eruption.cs b/BossMod/Modules/Stormblood/Ultimate/UWU/P2Eruption.cs index d0e0a76d3b..1b90f5cd35 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UWU/P2Eruption.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UWU/P2Eruption.cs @@ -27,7 +27,7 @@ public override void DrawArenaForeground(int pcSlot, Actor pc) public override void OnCastStarted(Actor caster, ActorCastInfo spell) { - base.OnCastStarted(module, caster, spell); + base.OnCastStarted(caster, spell); if ((AID)spell.Action.ID == AID.EruptionAOE) { if (NumCastsStarted < 2) diff --git a/TODO b/TODO index a45e0615c5..e47a0eb1d7 100644 --- a/TODO +++ b/TODO @@ -1,3 +1,7 @@ +components refactor checklist +- config should all use primary ctor +- bitmasks in record structs! + autorotation rework: - priority action suggestions - control panel w/ presets and bindings From d65080d36135a58e867c34bfdb53148fcb3ac522 Mon Sep 17 00:00:00 2001 From: Andrew Gilewsky Date: Tue, 9 Apr 2024 11:10:45 +0100 Subject: [PATCH 11/18] ARR wip --- .../Dungeon/D01Sastasha/D010Switch.cs | 2 +- .../Dungeon/D03Copperbell/D031Kottos.cs | 3 -- .../Dungeon/D03Copperbell/D032IchorousIre.cs | 2 -- .../Dungeon/D03Copperbell/D033Gyges.cs | 4 --- .../Dungeon/D05Totorak/D053Graffias.cs | 8 +---- .../Dungeon/D06Haukke/D061ManorClaviger.cs | 2 -- .../Dungeon/D06Haukke/D063LadyAmandine.cs | 7 +--- .../Dungeon/D07Brayflox/D074Aiatar.cs | 3 -- .../Dungeon/D08Qarn/D081Teratotaur.cs | 16 ++++----- .../Dungeon/D08Qarn/D082TempleGuardian.cs | 6 +--- .../Dungeon/D08Qarn/D083Adjudicator.cs | 5 +-- .../Dungeon/D09Cutter/D092GiantTunnelWorm.cs | 4 +-- .../Dungeon/D09Cutter/D093Chimera.cs | 12 ++----- .../Dungeon/D10StoneVigil/D101ChudoYudo.cs | 3 +- .../Dungeon/D10StoneVigil/D102Koshchei.cs | 7 ++-- .../Dungeon/D10StoneVigil/D103Isgebind.cs | 10 ++---- .../D11DzemaelDarkhold/D111AllSeeingEye.cs | 11 ++---- .../Dungeon/D11DzemaelDarkhold/D113Batraal.cs | 12 ++----- .../Dungeon/D12AurumVale/D121Locksmith.cs | 3 +- .../Dungeon/D12AurumVale/D122Coincounter.cs | 4 --- .../D12AurumVale/D123MisersMistress.cs | 8 ++--- .../D13CastrumMeridianum/D131BlackEft.cs | 2 -- .../D132MagitekVanguardF1.cs | 5 --- .../Dungeon/D13CastrumMeridianum/D133Livia.cs | 35 +++++++------------ .../Dungeon/D14Praetorium/D141Colossus.cs | 4 --- .../Dungeon/D14Praetorium/D142Nero.cs | 11 ++---- .../Dungeon/D14Praetorium/D143Gaius.cs | 12 ++----- .../D15WanderersPalace/D151KeeperOfHalidom.cs | 2 +- .../D15WanderersPalace/D152GiantBavarois.cs | 2 +- .../D15WanderersPalace/D153TonberryKing.cs | 4 +-- .../Dungeon/D16Amdapor/D161Psycheflayer.cs | 7 ---- .../Dungeon/D16Amdapor/D162DemonWall.cs | 9 ++--- .../Dungeon/D16Amdapor/D163Anantaboga.cs | 17 ++++----- 33 files changed, 58 insertions(+), 184 deletions(-) diff --git a/BossMod/Modules/RealmReborn/Dungeon/D01Sastasha/D010Switch.cs b/BossMod/Modules/RealmReborn/Dungeon/D01Sastasha/D010Switch.cs index 412ec0bd00..9c9c25acd5 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D01Sastasha/D010Switch.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D01Sastasha/D010Switch.cs @@ -7,7 +7,7 @@ public enum OID : uint Green = 0x1E8A8D, } -class SwitchHint : BossComponent +class SwitchHint(BossModule module) : BossComponent(module) { private string _hint = ""; diff --git a/BossMod/Modules/RealmReborn/Dungeon/D03Copperbell/D031Kottos.cs b/BossMod/Modules/RealmReborn/Dungeon/D03Copperbell/D031Kottos.cs index b9dc7d4536..4b83b6e9f9 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D03Copperbell/D031Kottos.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D03Copperbell/D031Kottos.cs @@ -18,11 +18,8 @@ public enum AID : uint } class GrandSlam(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.GrandSlam)); - class LumberingLeap(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.LumberingLeapAOE), new AOEShapeCircle(12)); - class ColossalSlam(BossModule module) : Components.SelfTargetedLegacyRotationAOEs(module, ActionID.MakeSpell(AID.ColossalSlam), new AOEShapeCone(30, 30.Degrees())); - class Catapult(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.Catapult), "Single-target damage"); class D031KottosStates : StateMachineBuilder diff --git a/BossMod/Modules/RealmReborn/Dungeon/D03Copperbell/D032IchorousIre.cs b/BossMod/Modules/RealmReborn/Dungeon/D03Copperbell/D032IchorousIre.cs index 97dfd6b377..01b96fdee5 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D03Copperbell/D032IchorousIre.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D03Copperbell/D032IchorousIre.cs @@ -17,9 +17,7 @@ public enum AID : uint } class Syrup(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Syrup), 4); - class FluidSpread(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.FluidSpread)); - class Divide(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Burst), new AOEShapeCircle(8)); class D032IchorousIreStates : StateMachineBuilder diff --git a/BossMod/Modules/RealmReborn/Dungeon/D03Copperbell/D033Gyges.cs b/BossMod/Modules/RealmReborn/Dungeon/D03Copperbell/D033Gyges.cs index 8630a6574c..762cc1e121 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D03Copperbell/D033Gyges.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D03Copperbell/D033Gyges.cs @@ -17,13 +17,9 @@ public enum AID : uint } class GiganticSwing(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.GiganticSwing), new AOEShapeDonut(4, 40)); - class GiganticSmash(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.GiganticSmash), 10); - class GiganticBlast(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.GiganticBlast), new AOEShapeCircle(8)); - class GrandSlam(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.GrandSlam)); - class ColossalSlam(BossModule module) : Components.SelfTargetedLegacyRotationAOEs(module, ActionID.MakeSpell(AID.ColossalSlam), new AOEShapeCone(40, 30.Degrees())); class D033GygesStates : StateMachineBuilder diff --git a/BossMod/Modules/RealmReborn/Dungeon/D05Totorak/D053Graffias.cs b/BossMod/Modules/RealmReborn/Dungeon/D05Totorak/D053Graffias.cs index 6f7f7bb038..2275157441 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D05Totorak/D053Graffias.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D05Totorak/D053Graffias.cs @@ -21,13 +21,9 @@ public enum AID : uint } class Silkscreen(BossModule module) : Components.SelfTargetedLegacyRotationAOEs(module, ActionID.MakeSpell(AID.Silkscreen), new AOEShapeRect(18, 2)); - class StickyWeb(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.StickyWeb), "Delayed AOE at target"); - class PodBurst(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PodBurst), new AOEShapeCircle(7.050f)); - class DeadlyThrust(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.DeadlyThrust), "Persistent voidzone at target"); - class PollenZone(BossModule module) : Components.PersistentVoidzone(module, 10, m => m.Enemies(OID.PollenZone)); class D053GraffiasStates : StateMachineBuilder @@ -44,10 +40,8 @@ public D053GraffiasStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 1, NameID = 444)] -public class D053Graffias : BossModule +public class D053Graffias(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(215, -145), 20)) { - public D053Graffias(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(215, -145), 20)) { } - public override void CalculateAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { base.CalculateAIHints(slot, actor, assignment, hints); diff --git a/BossMod/Modules/RealmReborn/Dungeon/D06Haukke/D061ManorClaviger.cs b/BossMod/Modules/RealmReborn/Dungeon/D06Haukke/D061ManorClaviger.cs index 1ee806f71a..e62fbbd7c5 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D06Haukke/D061ManorClaviger.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D06Haukke/D061ManorClaviger.cs @@ -14,9 +14,7 @@ public enum AID : uint } class SweetSteel(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.SweetSteel), new AOEShapeCone(7.4f, 45.Degrees())); // TODO: verify angle - class VoidFire2(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.VoidFire2), 5); - class DarkMist(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.DarkMist), new AOEShapeCircle(9.4f)); class D061ManorClavigerStates : StateMachineBuilder diff --git a/BossMod/Modules/RealmReborn/Dungeon/D06Haukke/D063LadyAmandine.cs b/BossMod/Modules/RealmReborn/Dungeon/D06Haukke/D063LadyAmandine.cs index 5c4403cfb7..c144ca4547 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D06Haukke/D063LadyAmandine.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D06Haukke/D063LadyAmandine.cs @@ -25,11 +25,8 @@ public enum AID : uint } class DarkMist(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.DarkMist), new AOEShapeCircle(9)); - class BeguilingMist(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.BeguilingMist), "Forced movement towards boss"); - class VoidThunder(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.VoidThunder3), "Interruptible tankbuster"); - class PetrifyingEye(BossModule module) : Components.CastGaze(module, ActionID.MakeSpell(AID.PetrifyingEye)); class D063LadyAmandineStates : StateMachineBuilder @@ -45,10 +42,8 @@ public D063LadyAmandineStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 6, NameID = 422)] -public class D063LadyAmandine : BossModule +public class D063LadyAmandine(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsSquare(new(0, 4), 20)) { - public D063LadyAmandine(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsSquare(new(0, 4), 20)) { } - public override void CalculateAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { base.CalculateAIHints(slot, actor, assignment, hints); diff --git a/BossMod/Modules/RealmReborn/Dungeon/D07Brayflox/D074Aiatar.cs b/BossMod/Modules/RealmReborn/Dungeon/D07Brayflox/D074Aiatar.cs index ca76b12c56..bb5d763fa0 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D07Brayflox/D074Aiatar.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D07Brayflox/D074Aiatar.cs @@ -17,11 +17,8 @@ public enum AID : uint } class SalivousSnap(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.SalivousSnap)); - class ToxicVomit(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ToxicVomitAOE), new AOEShapeCircle(2)); - class Burst(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Burst), new AOEShapeCircle(10), 4); - class DragonBreath(BossModule module) : Components.SelfTargetedLegacyRotationAOEs(module, ActionID.MakeSpell(AID.DragonBreath), new AOEShapeRect(30, 4)); class D074AiatarStates : StateMachineBuilder diff --git a/BossMod/Modules/RealmReborn/Dungeon/D08Qarn/D081Teratotaur.cs b/BossMod/Modules/RealmReborn/Dungeon/D08Qarn/D081Teratotaur.cs index 562e64f5f0..d21b70750a 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D08Qarn/D081Teratotaur.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D08Qarn/D081Teratotaur.cs @@ -27,12 +27,10 @@ public enum SID : uint } class Triclip(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.Triclip), new AOEShapeRect(5.25f, 2)); - class Mow(BossModule module) : Components.SelfTargetedLegacyRotationAOEs(module, ActionID.MakeSpell(AID.Mow), new AOEShapeCone(8.25f, 60.Degrees())); - class FrightfulRoar(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.FrightfulRoar), new AOEShapeCircle(8.25f)); -class MortalRay : BossComponent +class MortalRay(BossModule module) : BossComponent(module) { private BitMask _dooms; private Actor?[] _platforms = { null, null, null }; @@ -43,9 +41,9 @@ class MortalRay : BossComponent public override void Update() { - _platforms[0] ??= module.Enemies(OID.Platform1).FirstOrDefault(); - _platforms[1] ??= module.Enemies(OID.Platform2).FirstOrDefault(); - _platforms[2] ??= module.Enemies(OID.Platform3).FirstOrDefault(); + _platforms[0] ??= Module.Enemies(OID.Platform1).FirstOrDefault(); + _platforms[1] ??= Module.Enemies(OID.Platform2).FirstOrDefault(); + _platforms[2] ??= Module.Enemies(OID.Platform3).FirstOrDefault(); } public override void AddHints(int slot, Actor actor, TextHints hints) @@ -69,7 +67,7 @@ public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignme public override void DrawArenaBackground(int pcSlot, Actor pc) { if (_dooms[pcSlot]) - _platformShape.Draw(arena, ActivePlatform, ArenaColor.SafeFromAOE); + _platformShape.Draw(Arena, ActivePlatform, ArenaColor.SafeFromAOE); } public override void OnStatusGain(Actor actor, ActorStatus status) @@ -98,10 +96,8 @@ public D081TeratotaurStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 9, NameID = 1567)] -public class D081Teratotaur : BossModule +public class D081Teratotaur(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsSquare(new(-70, -60), 20)) { - public D081Teratotaur(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsSquare(new(-70, -60), 20)) { } - public override void CalculateAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { base.CalculateAIHints(slot, actor, assignment, hints); diff --git a/BossMod/Modules/RealmReborn/Dungeon/D08Qarn/D082TempleGuardian.cs b/BossMod/Modules/RealmReborn/Dungeon/D08Qarn/D082TempleGuardian.cs index d3420d3546..124cee6dd4 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D08Qarn/D082TempleGuardian.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D08Qarn/D082TempleGuardian.cs @@ -17,9 +17,7 @@ public enum AID : uint } class BoulderClap(BossModule module) : Components.SelfTargetedLegacyRotationAOEs(module, ActionID.MakeSpell(AID.BoulderClap), new AOEShapeCone(14.2f, 60.Degrees())); - class TrueGrit(BossModule module) : Components.SelfTargetedLegacyRotationAOEs(module, ActionID.MakeSpell(AID.TrueGrit), new AOEShapeCone(14.2f, 60.Degrees())); - class Rockslide(BossModule module) : Components.SelfTargetedLegacyRotationAOEs(module, ActionID.MakeSpell(AID.Rockslide), new AOEShapeRect(16.2f, 4)); class D082TempleGuardianStates : StateMachineBuilder @@ -34,10 +32,8 @@ public D082TempleGuardianStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 9, NameID = 1569)] -public class D082TempleGuardian : BossModule +public class D082TempleGuardian(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(50, -10), 15)) { - public D082TempleGuardian(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(50, -10), 15)) { } - public override void CalculateAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { base.CalculateAIHints(slot, actor, assignment, hints); diff --git a/BossMod/Modules/RealmReborn/Dungeon/D08Qarn/D083Adjudicator.cs b/BossMod/Modules/RealmReborn/Dungeon/D08Qarn/D083Adjudicator.cs index 61e9b1c19f..852e72a8a8 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D08Qarn/D083Adjudicator.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D08Qarn/D083Adjudicator.cs @@ -21,7 +21,6 @@ public enum AID : uint } class Darkness(BossModule module) : Components.SelfTargetedLegacyRotationAOEs(module, ActionID.MakeSpell(AID.Darkness), new AOEShapeCone(7.5f, 60.Degrees())); - class VergeLine(BossModule module) : Components.SelfTargetedLegacyRotationAOEs(module, ActionID.MakeSpell(AID.VergeLine), new AOEShapeRect(60, 2)); class D083AdjudicatorStates : StateMachineBuilder @@ -35,10 +34,8 @@ public D083AdjudicatorStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 9, NameID = 1570)] -public class D083Adjudicator : BossModule +public class D083Adjudicator(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(238, 0), 20)) { - public D083Adjudicator(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(238, 0), 20)) { } - public override void CalculateAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { base.CalculateAIHints(slot, actor, assignment, hints); diff --git a/BossMod/Modules/RealmReborn/Dungeon/D09Cutter/D092GiantTunnelWorm.cs b/BossMod/Modules/RealmReborn/Dungeon/D09Cutter/D092GiantTunnelWorm.cs index f4fb01bb9f..d68c163847 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D09Cutter/D092GiantTunnelWorm.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D09Cutter/D092GiantTunnelWorm.cs @@ -20,12 +20,10 @@ public enum AID : uint class Sandstorm(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.Sandstorm), new AOEShapeCone(10.5f, 45.Degrees())); // TODO: pillars teleport right before cast, so we don't show them for now... -class Submerge : Components.GenericAOEs +class Submerge(BossModule module) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.Earthbreak)) { private AOEShapeCircle _shape = new(14.5f); - public Submerge() : base(ActionID.MakeSpell(AID.Earthbreak)) { } - public override IEnumerable ActiveAOEs(int slot, Actor actor) { // TODO: proper timings... diff --git a/BossMod/Modules/RealmReborn/Dungeon/D09Cutter/D093Chimera.cs b/BossMod/Modules/RealmReborn/Dungeon/D09Cutter/D093Chimera.cs index c854c43dff..c0c26b2311 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D09Cutter/D093Chimera.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D09Cutter/D093Chimera.cs @@ -21,29 +21,21 @@ public enum AID : uint } class LionsBreath(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.LionsBreath), new AOEShapeCone(9.7f, 60.Degrees())); // TODO: verify angle - class RamsBreath(BossModule module) : Components.SelfTargetedLegacyRotationAOEs(module, ActionID.MakeSpell(AID.RamsBreath), new AOEShapeCone(9.7f, 60.Degrees(), -45.Degrees())); - class DragonsBreath(BossModule module) : Components.SelfTargetedLegacyRotationAOEs(module, ActionID.MakeSpell(AID.DragonsBreath), new AOEShapeCone(9.7f, 60.Degrees(), 45.Degrees())); - class RamsVoice(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RamsVoice), new AOEShapeCircle(9.7f)); - class DragonsVoice(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.DragonsVoice), new AOEShapeDonut(7, 30)); - class RamsKeeper(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.RamsKeeper), 6); - class RamsKeeperVoidzone(BossModule module) : Components.PersistentVoidzone(module, 6, m => m.Enemies(OID.RamsKeeper)); -class ChaoticChorus : Components.GenericAOEs +class ChaoticChorus(BossModule module) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.ChaoticChorus)) { private AOEShape _shape = new AOEShapeCircle(6); - public ChaoticChorus() : base(ActionID.MakeSpell(AID.ChaoticChorus)) { } - public override IEnumerable ActiveAOEs(int slot, Actor actor) { // TODO: timings - return module.Enemies(OID.Cacophony).Where(c => !c.IsDead).Select(c => new AOEInstance(_shape, c.Position, c.Rotation)); + return Module.Enemies(OID.Cacophony).Where(c => !c.IsDead).Select(c => new AOEInstance(_shape, c.Position, c.Rotation)); } } diff --git a/BossMod/Modules/RealmReborn/Dungeon/D10StoneVigil/D101ChudoYudo.cs b/BossMod/Modules/RealmReborn/Dungeon/D10StoneVigil/D101ChudoYudo.cs index 822dfcf573..9b0b005d21 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D10StoneVigil/D101ChudoYudo.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D10StoneVigil/D101ChudoYudo.cs @@ -14,11 +14,10 @@ public enum AID : uint } class LionsBreath(BossModule module) : Components.SelfTargetedLegacyRotationAOEs(module, ActionID.MakeSpell(AID.LionsBreath), new AOEShapeCone(10.25f, 60.Degrees())); // TODO: verify angle - class Swinge(BossModule module) : Components.SelfTargetedLegacyRotationAOEs(module, ActionID.MakeSpell(AID.Swinge), new AOEShapeCone(40, 30.Degrees())); // TODO: verify angle // due to relatively short casts and the fact that boss likes moving across arena to cast swinge, we always want non-tanks to be positioned slightly behind -class Positioning : BossComponent +class Positioning(BossModule module) : BossComponent(module) { public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { diff --git a/BossMod/Modules/RealmReborn/Dungeon/D10StoneVigil/D102Koshchei.cs b/BossMod/Modules/RealmReborn/Dungeon/D10StoneVigil/D102Koshchei.cs index 199489d46b..87db0c1011 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D10StoneVigil/D102Koshchei.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D10StoneVigil/D102Koshchei.cs @@ -17,16 +17,13 @@ public enum AID : uint } class SpikedTail(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.SpikedTail)); - class SonicStorm(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.SonicStorm), 6); class Typhoon : Components.Exaflare { private IReadOnlyList _maelstroms = ActorEnumeration.EmptyList; - public Typhoon() : base(3) { } - - public override void Init(BossModule module) + public Typhoon(BossModule module) : base(module, 3) { _maelstroms = module.Enemies(OID.MaelstromVisual); } @@ -60,7 +57,7 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) line.MaxShownExplosions = 10; line.ExplosionsLeft = 15; } - AdvanceLine(module, line, caster.Position); + AdvanceLine(line, caster.Position); } } diff --git a/BossMod/Modules/RealmReborn/Dungeon/D10StoneVigil/D103Isgebind.cs b/BossMod/Modules/RealmReborn/Dungeon/D10StoneVigil/D103Isgebind.cs index 15623e91f5..30637db852 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D10StoneVigil/D103Isgebind.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D10StoneVigil/D103Isgebind.cs @@ -18,25 +18,19 @@ public enum AID : uint } class RimeWreath(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.RimeWreath)); - class FrostBreath(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.FrostBreath), new AOEShapeCone(27, 60.Degrees())); // TODO: verify angle - class SheetOfIce(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.SheetOfIce), 5); - class SheetOfIce2(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.SheetOfIce2), 5); - class Cauterize(BossModule module) : Components.SelfTargetedLegacyRotationAOEs(module, ActionID.MakeSpell(AID.Cauterize), new AOEShapeRect(48, 10)); -class Touchdown : Components.GenericAOEs +class Touchdown(BossModule module) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.Touchdown)) { private AOEShapeCircle _shape = new(5); - public Touchdown() : base(ActionID.MakeSpell(AID.Touchdown)) { } - public override IEnumerable ActiveAOEs(int slot, Actor actor) { // TODO: proper timings... - if (!Module.PrimaryActor.IsTargetable && !module.FindComponent()!.ActiveCasters.Any()) + if (!Module.PrimaryActor.IsTargetable && !Module.FindComponent()!.ActiveCasters.Any()) yield return new(_shape, Module.Bounds.Center); } } diff --git a/BossMod/Modules/RealmReborn/Dungeon/D11DzemaelDarkhold/D111AllSeeingEye.cs b/BossMod/Modules/RealmReborn/Dungeon/D11DzemaelDarkhold/D111AllSeeingEye.cs index d32c4e93b5..620ac28c19 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D11DzemaelDarkhold/D111AllSeeingEye.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D11DzemaelDarkhold/D111AllSeeingEye.cs @@ -26,21 +26,18 @@ public enum SID : uint } class CursedGaze(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.CursedGaze), new AOEShapeCone(8.7f, 45.Degrees())); - class DreadGaze(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.DreadGaze), new AOEShapeCone(8.7f, 45.Degrees())); - class Thunderstrike(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Thunderstrike), new AOEShapeRect(11.2f, 1.5f)); - class Condemnation(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Condemnation), new AOEShapeCone(7.3f, 45.Degrees())); // try to always stay in active crystal closest to boss -class Positioning : BossComponent +class Positioning(BossModule module) : BossComponent(module) { public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { if (Module.PrimaryActor.CastInfo == null) // do not restrict zone while boss is casting, to allow avoiding aoe, even if it means temporarily leaving crystal veil { - var closestCrystal = module.Enemies(OID.Crystal).Closest(Module.PrimaryActor.Position); + var closestCrystal = Module.Enemies(OID.Crystal).Closest(Module.PrimaryActor.Position); if (closestCrystal != null) hints.AddForbiddenZone(ShapeDistance.InvertedCircle(closestCrystal.Position, 8)); // TODO: verify range } @@ -61,10 +58,8 @@ public D111AllSeeingEyeStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 13, NameID = 1397)] -public class D111AllSeeingEye : BossModule +public class D111AllSeeingEye(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsSquare(new(40, 70), 30)) { - public D111AllSeeingEye(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsSquare(new(40, 70), 30)) { } - public override void CalculateAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { base.CalculateAIHints(slot, actor, assignment, hints); diff --git a/BossMod/Modules/RealmReborn/Dungeon/D11DzemaelDarkhold/D113Batraal.cs b/BossMod/Modules/RealmReborn/Dungeon/D11DzemaelDarkhold/D113Batraal.cs index 9c55e5c96c..c7ca5db091 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D11DzemaelDarkhold/D113Batraal.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D11DzemaelDarkhold/D113Batraal.cs @@ -19,22 +19,18 @@ public enum AID : uint } class GrimFate(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.GrimFate), new AOEShapeCone(12.6f, 60.Degrees())); // TODO: verify angle - class Desolation(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Desolation), new AOEShapeRect(60, 3)); - class AetherialSurge(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.AetherialSurge), new AOEShapeCircle(6)); // note: actor 'dies' immediately after casting -class SeaOfPitch : Components.GenericAOEs +class SeaOfPitch(BossModule module) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.SeaOfPitch)) { private AOEShape _shape = new AOEShapeCircle(4); - public SeaOfPitch() : base(ActionID.MakeSpell(AID.SeaOfPitch)) { } - public override IEnumerable ActiveAOEs(int slot, Actor actor) { // TODO: proper timings... - return module.Enemies(OID.VoidPitch).Where(a => !a.IsDead).Select(a => new AOEInstance(_shape, a.Position)); + return Module.Enemies(OID.VoidPitch).Where(a => !a.IsDead).Select(a => new AOEInstance(_shape, a.Position)); } } @@ -51,10 +47,8 @@ public D113BatraalStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 13, NameID = 1396)] -public class D113Batraal : BossModule +public class D113Batraal(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsSquare(new(85, -180), 25)) { - public D113Batraal(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsSquare(new(85, -180), 25)) { } - public override void CalculateAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { base.CalculateAIHints(slot, actor, assignment, hints); diff --git a/BossMod/Modules/RealmReborn/Dungeon/D12AurumVale/D121Locksmith.cs b/BossMod/Modules/RealmReborn/Dungeon/D12AurumVale/D121Locksmith.cs index b816bbf00d..20799c64b9 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D12AurumVale/D121Locksmith.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D12AurumVale/D121Locksmith.cs @@ -14,11 +14,10 @@ public enum AID : uint } class HundredLashings(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.HundredLashings), new AOEShapeCone(12, 45.Degrees())); // TODO: verify angle - class GoldDust(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.GoldDust), 8); // arena has multiple weirdly-shaped puddles, so just prefer standing in large safe zone -class AIPosition : BossComponent +class AIPosition(BossModule module) : BossComponent(module) { public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { diff --git a/BossMod/Modules/RealmReborn/Dungeon/D12AurumVale/D122Coincounter.cs b/BossMod/Modules/RealmReborn/Dungeon/D12AurumVale/D122Coincounter.cs index 4d898090cd..64d27f6480 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D12AurumVale/D122Coincounter.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D12AurumVale/D122Coincounter.cs @@ -17,13 +17,9 @@ public enum AID : uint } class TenTonzeSwipe(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.TenTonzeSwipe), new AOEShapeCone(10, 60.Degrees())); // TODO: verify angle - class HundredTonzeSwipe(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HundredTonzeSwipe), new AOEShapeCone(10, 60.Degrees())); - class HundredTonzeSwing(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HundredTonzeSwing), new AOEShapeCircle(12)); - class Glower(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Glower), new AOEShapeRect(21, 3.5f)); - class EyeOfTheBeholder(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.EyeOfTheBeholder), new AOEShapeDonutSector(8, 19, 135.Degrees())); class D122CoincounterStates : StateMachineBuilder diff --git a/BossMod/Modules/RealmReborn/Dungeon/D12AurumVale/D123MisersMistress.cs b/BossMod/Modules/RealmReborn/Dungeon/D12AurumVale/D123MisersMistress.cs index 7709236a3d..04829a3250 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D12AurumVale/D123MisersMistress.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D12AurumVale/D123MisersMistress.cs @@ -17,13 +17,13 @@ public enum AID : uint } class VineProbe(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.VineProbe), new AOEShapeRect(10, 4)); - class BadBreath(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.BadBreath), new AOEShapeCone(16, 60.Degrees())); // arena has multiple weirdly-shaped puddles, so just prefer standing in large safe zone -class AIPosition : BossComponent +class AIPosition(BossModule module) : BossComponent(module) { private WPos[] _centers = { new(-395, -130), new(-402, -114) }; + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { hints.AddForbiddenZone(ShapeDistance.InvertedCircle(_centers.MinBy(p => (p - Module.PrimaryActor.Position).LengthSq()), 5)); @@ -42,10 +42,8 @@ public D123MisersMistressStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 5, NameID = 1532)] -public class D123MisersMistress : BossModule +public class D123MisersMistress(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsSquare(new(-400, -130), 25)) { - public D123MisersMistress(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsSquare(new(-400, -130), 25)) { } - public override void CalculateAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { base.CalculateAIHints(slot, actor, assignment, hints); diff --git a/BossMod/Modules/RealmReborn/Dungeon/D13CastrumMeridianum/D131BlackEft.cs b/BossMod/Modules/RealmReborn/Dungeon/D13CastrumMeridianum/D131BlackEft.cs index 54e6e690cb..86cf57fe37 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D13CastrumMeridianum/D131BlackEft.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D13CastrumMeridianum/D131BlackEft.cs @@ -20,9 +20,7 @@ public enum AID : uint } class IncendiarySupport(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.IncendiarySupport), "Raidwide x3"); - class HighPoweredMagitekRay(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HighPoweredMagitekRay), new AOEShapeRect(50, 2)); - class MagitekCannon(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.MagitekCannon), 6); class D131BlackEftStates : StateMachineBuilder diff --git a/BossMod/Modules/RealmReborn/Dungeon/D13CastrumMeridianum/D132MagitekVanguardF1.cs b/BossMod/Modules/RealmReborn/Dungeon/D13CastrumMeridianum/D132MagitekVanguardF1.cs index 0ac6288127..b17d1892d8 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D13CastrumMeridianum/D132MagitekVanguardF1.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D13CastrumMeridianum/D132MagitekVanguardF1.cs @@ -21,15 +21,10 @@ public enum AID : uint } class ThermobaricCharge(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ThermobaricCharge), new AOEShapeCircle(20)); - class HyperchargeInner(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HyperchargeInner), new AOEShapeCircle(10)); - class HyperchargeOuter(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HyperchargeOuter), new AOEShapeDonut(12.5f, 30)); - class TargetedSupport(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TargetedSupportAOE), new AOEShapeCircle(5)); - class CermetDrill(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.CermetDrill)); - class Overcharge(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Overcharge), new AOEShapeCone(11, 60.Degrees())); class D132MagitekVanguardF1States : StateMachineBuilder diff --git a/BossMod/Modules/RealmReborn/Dungeon/D13CastrumMeridianum/D133Livia.cs b/BossMod/Modules/RealmReborn/Dungeon/D13CastrumMeridianum/D133Livia.cs index 4d548b4ea7..86579e8ef3 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D13CastrumMeridianum/D133Livia.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D13CastrumMeridianum/D133Livia.cs @@ -37,10 +37,9 @@ public enum AID : uint } class AglaeaClimb(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.AglaeaClimb)); - class ArtificialPlasma(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.ArtificialPlasma)); -class Roundhouse : Components.GenericAOEs +class Roundhouse(BossModule module) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.Roundhouse)) { private List _castersRoundhouse = new(); private List _castersDischarge = new(); @@ -48,8 +47,6 @@ class Roundhouse : Components.GenericAOEs private static readonly AOEShape _shapeRoundhouse = new AOEShapeCircle(10); private static readonly AOEShape _shapeDischarge = new AOEShapeCircle(8); - public Roundhouse() : base(ActionID.MakeSpell(AID.Roundhouse)) { } - public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_castersRoundhouse.Count > 0) @@ -78,7 +75,7 @@ public override void OnCastFinished(Actor caster, ActorCastInfo spell) // note: casts are staggered in a slightly complicated way, so we don't remove actors immediately when cast finishes // a 'set' is always considered finished when 6th discharge finishes -class InfiniteReach : Components.GenericAOEs +class InfiniteReach(BossModule module) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.InfiniteReachDischarge) { private List _castersRect = new(); private List _castersDischarge = new(); @@ -88,8 +85,6 @@ class InfiniteReach : Components.GenericAOEs private static readonly AOEShapeCircle _shapeDischarge = new(8); private static readonly AOEShapeCross _shapeSalamander = new(20, 2); - public InfiniteReach() : base(ActionID.MakeSpell(AID.InfiniteReachDischarge)) { } - public override IEnumerable ActiveAOEs(int slot, Actor actor) { bool haveSets = false; @@ -115,12 +110,12 @@ public override IEnumerable ActiveAOEs(int slot, Actor actor) public override void OnCastStarted(Actor caster, ActorCastInfo spell) { - CastersForSpell(module, spell.Action, false)?.Add(caster); + CastersForSpell(spell.Action, false)?.Add(caster); } public override void OnCastFinished(Actor caster, ActorCastInfo spell) { - var list = CastersForSpell(module, spell.Action, true); + var list = CastersForSpell(spell.Action, true); if (list != null) { var index = list.IndexOf(caster); @@ -129,7 +124,7 @@ public override void OnCastFinished(Actor caster, ActorCastInfo spell) } } - private List? CastersForSpell(BossModule module, ActionID spell, bool forRemove) => (AID)spell.ID switch + private List? CastersForSpell(ActionID spell, bool forRemove) => (AID)spell.ID switch { AID.InfiniteReachAOE => _castersRect, AID.InfiniteReachDischarge => _castersDischarge, @@ -138,7 +133,7 @@ public override void OnCastFinished(Actor caster, ActorCastInfo spell) }; } -class StunningSweep : Components.GenericAOEs +class StunningSweep(BossModule module) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.StunningSweep)) { private List _castersSweepDischarge = new(); private List _castersThermobaric = new(); @@ -146,8 +141,6 @@ class StunningSweep : Components.GenericAOEs private static readonly AOEShape _shapeSweepDischarge = new AOEShapeCircle(8); private static readonly AOEShape _shapeThermobaric = new AOEShapeCircle(13); // TODO: verify falloff - public StunningSweep() : base(ActionID.MakeSpell(AID.StunningSweep)) { } - public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_castersSweepDischarge.Count > 0) @@ -158,15 +151,15 @@ public override IEnumerable ActiveAOEs(int slot, Actor actor) public override void OnCastStarted(Actor caster, ActorCastInfo spell) { - CastersForSpell(module, spell.Action, false)?.Add(caster); + CastersForSpell(spell.Action, false)?.Add(caster); } public override void OnCastFinished(Actor caster, ActorCastInfo spell) { - CastersForSpell(module, spell.Action, true)?.Remove(caster); + CastersForSpell(spell.Action, true)?.Remove(caster); } - private List? CastersForSpell(BossModule module, ActionID spell, bool forRemove) => (AID)spell.ID switch + private List? CastersForSpell(ActionID spell, bool forRemove) => (AID)spell.ID switch { AID.StunningSweepAOE or AID.StunningSweepDischarge => _castersSweepDischarge, AID.ThermobaricCharge => forRemove || Module.PrimaryActor.CastInfo != null ? _castersThermobaric : null, // note: this component cares about cast while boss is casting @@ -174,7 +167,7 @@ public override void OnCastFinished(Actor caster, ActorCastInfo spell) }; } -class AngrySalamander : Components.GenericAOEs +class AngrySalamander(BossModule module) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.AngrySalamander)) { private List _castersSalamander = new(); private List _castersThermobaric = new(); @@ -182,8 +175,6 @@ class AngrySalamander : Components.GenericAOEs private static readonly AOEShape _shapeSalamander = new AOEShapeCross(20, 2); private static readonly AOEShape _shapeThermobaric = new AOEShapeCircle(13); // TODO: verify falloff - public AngrySalamander() : base(ActionID.MakeSpell(AID.AngrySalamander)) { } - public override IEnumerable ActiveAOEs(int slot, Actor actor) { foreach (var c in _castersSalamander) @@ -194,15 +185,15 @@ public override IEnumerable ActiveAOEs(int slot, Actor actor) public override void OnCastStarted(Actor caster, ActorCastInfo spell) { - CastersForSpell(module, spell.Action, false)?.Add(caster); + CastersForSpell(spell.Action, false)?.Add(caster); } public override void OnCastFinished(Actor caster, ActorCastInfo spell) { - CastersForSpell(module, spell.Action, true)?.Remove(caster); + CastersForSpell(spell.Action, true)?.Remove(caster); } - private List? CastersForSpell(BossModule module, ActionID spell, bool forRemove) => (AID)spell.ID switch + private List? CastersForSpell(ActionID spell, bool forRemove) => (AID)spell.ID switch { AID.AngrySalamanderAOE => forRemove || Module.PrimaryActor.IsTargetable ? _castersSalamander : null, // note: this component cares only about cast when boss is targetable AID.ThermobaricCharge => forRemove || Module.PrimaryActor.CastInfo == null ? _castersThermobaric : null, // note: this component cares about thermobarics while boss is not casting diff --git a/BossMod/Modules/RealmReborn/Dungeon/D14Praetorium/D141Colossus.cs b/BossMod/Modules/RealmReborn/Dungeon/D14Praetorium/D141Colossus.cs index 52cec644e9..bdc8e511e0 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D14Praetorium/D141Colossus.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D14Praetorium/D141Colossus.cs @@ -20,13 +20,9 @@ public enum AID : uint } class CeruleumVent(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.CeruleumVent)); - class PrototypeLaserAlpha1(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.IronKissAlpha1), 6); - class PrototypeLaserAlpha2(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.IronKissAlpha2), 6); - class PrototypeLaserBeta(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.IronKissBeta), 5, false); - class GrandSword(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.GrandSword), new AOEShapeCone(25, 45.Degrees())); class D141ColossusStates : StateMachineBuilder diff --git a/BossMod/Modules/RealmReborn/Dungeon/D14Praetorium/D142Nero.cs b/BossMod/Modules/RealmReborn/Dungeon/D14Praetorium/D142Nero.cs index 20cffbc443..4992a2b199 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D14Praetorium/D142Nero.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D14Praetorium/D142Nero.cs @@ -22,13 +22,10 @@ public enum AID : uint } class IronUprising(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.IronUprising), new AOEShapeCone(7, 60.Degrees())); - class SpineShatter(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.SpineShatter)); -class AugmentedSuffering : Components.KnockbackFromCastTarget +class AugmentedSuffering(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.AugmentedSuffering), 12) { - public AugmentedSuffering() : base(ActionID.MakeSpell(AID.AugmentedSuffering), 12) { } - public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { if (Casters.Count > 0) @@ -37,9 +34,7 @@ public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignme } class AugmentedShatter(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.AugmentedShatter), 6, 4); - class AugmentedUprising(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.AugmentedUprising), new AOEShapeCone(45, 45.Degrees())); - class WheelOfSuffering(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.WheelOfSuffering), new AOEShapeCircle(7)); class D142NeroStates : StateMachineBuilder @@ -57,10 +52,8 @@ public D142NeroStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 16, NameID = 2135)] -public class D142Nero : BossModule +public class D142Nero(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(-164, 0), 20)) { - public D142Nero(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(-164, 0), 20)) { } - public override void CalculateAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { base.CalculateAIHints(slot, actor, assignment, hints); diff --git a/BossMod/Modules/RealmReborn/Dungeon/D14Praetorium/D143Gaius.cs b/BossMod/Modules/RealmReborn/Dungeon/D14Praetorium/D143Gaius.cs index 4cdf451c5c..51da97f9ef 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D14Praetorium/D143Gaius.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D14Praetorium/D143Gaius.cs @@ -37,20 +37,14 @@ public enum AID : uint } class TerminusEstTriple(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TerminusEstTriple), new AOEShapeRect(40, 2)); - class TerminusEstQuintuple(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TerminusEstQuintuple), new AOEShapeRect(40, 2)); - class HandOfTheEmpire(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.HandOfTheEmpireAOE), 5, false); - class FestinaLente(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.FestinaLente), 6, 4); - class Innocence(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.Innocence)); - class HorridaBella(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.HorridaBella)); - class Ductus(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.DuctusAOE), 8); -class AddEnrage : BossComponent +class AddEnrage(BossModule module) : BossComponent(module) { private DateTime _enrage; @@ -87,10 +81,8 @@ public D143GaiusStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 16, NameID = 2136)] -public class D143Gaius : BossModule +public class D143Gaius(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsRect(new(-562, 220), 15, 20)) { - public D143Gaius(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsRect(new(-562, 220), 15, 20)) { } - protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); diff --git a/BossMod/Modules/RealmReborn/Dungeon/D15WanderersPalace/D151KeeperOfHalidom.cs b/BossMod/Modules/RealmReborn/Dungeon/D15WanderersPalace/D151KeeperOfHalidom.cs index b5090c8d31..133a190255 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D15WanderersPalace/D151KeeperOfHalidom.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D15WanderersPalace/D151KeeperOfHalidom.cs @@ -17,7 +17,7 @@ public enum AID : uint class MoldySneeze(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.MoldySneeze), new AOEShapeCone(8.85f, 45.Degrees())); -class InhaleGoobbuesGrief : Components.GenericAOEs +class InhaleGoobbuesGrief(BossModule module) : Components.GenericAOEs(module) { private bool _showInhale; private bool _showGrief; diff --git a/BossMod/Modules/RealmReborn/Dungeon/D15WanderersPalace/D152GiantBavarois.cs b/BossMod/Modules/RealmReborn/Dungeon/D15WanderersPalace/D152GiantBavarois.cs index bc53a9fda8..6a0493f955 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D15WanderersPalace/D152GiantBavarois.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D15WanderersPalace/D152GiantBavarois.cs @@ -28,7 +28,7 @@ public enum IconID : uint class Fire(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.Fire), "Single-target damage"); // TODO: verify implementation; find a condition for kite end -class AmorphicFlail : BossComponent +class AmorphicFlail(BossModule module) : BossComponent(module) { private Actor? _kiter; diff --git a/BossMod/Modules/RealmReborn/Dungeon/D15WanderersPalace/D153TonberryKing.cs b/BossMod/Modules/RealmReborn/Dungeon/D15WanderersPalace/D153TonberryKing.cs index 89bcf63a78..33c5b64b7c 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D15WanderersPalace/D153TonberryKing.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D15WanderersPalace/D153TonberryKing.cs @@ -33,10 +33,8 @@ public D153TonberryKingStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 10, NameID = 1547)] -public class D153TonberryKing : BossModule +public class D153TonberryKing(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(73, -435), 30)) { - public D153TonberryKing(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(73, -435), 30)) { } - public override void CalculateAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { base.CalculateAIHints(slot, actor, assignment, hints); diff --git a/BossMod/Modules/RealmReborn/Dungeon/D16Amdapor/D161Psycheflayer.cs b/BossMod/Modules/RealmReborn/Dungeon/D16Amdapor/D161Psycheflayer.cs index 1e28ba685a..10ee0563ff 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D16Amdapor/D161Psycheflayer.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D16Amdapor/D161Psycheflayer.cs @@ -28,19 +28,12 @@ public enum AID : uint } class VoidFireCleave(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.VoidFireCleave), new AOEShapeCircle(5), originAtTarget: true); - class VoidFireAOE(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.VoidFireAOE), 5); - class VoidThunder(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.VoidThunder), "Interruptible tankbuster"); - class MindMelt(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.MindMelt), "Interruptible raidwide"); - class Canker(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.Canker), "Interruptible debuff"); - class Rockslide(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Rockslide), new AOEShapeRect(12.76f, 4)); - class Obliterate(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.Obliterate)); - class Plaincracker(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Plaincracker), new AOEShapeCircle(30.5f)); class D161PsycheflayerStates : StateMachineBuilder diff --git a/BossMod/Modules/RealmReborn/Dungeon/D16Amdapor/D162DemonWall.cs b/BossMod/Modules/RealmReborn/Dungeon/D16Amdapor/D162DemonWall.cs index a601a258d7..4326e1130e 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D16Amdapor/D162DemonWall.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D16Amdapor/D162DemonWall.cs @@ -16,13 +16,10 @@ public enum AID : uint } class LiquefyCenter(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.LiquefyCenter), new AOEShapeRect(50, 4)); - class LiquefySides(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.LiquefySides), new AOEShapeRect(50, 3.5f)); -class Repel : Components.KnockbackFromCastTarget +class Repel(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.Repel), 20, true) { - public Repel() : base(ActionID.MakeSpell(AID.Repel), 20, true) { } - public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { // custom hint: stay in narrow zone in center @@ -34,7 +31,7 @@ public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignme } } -class ForbiddenZones : Components.GenericAOEs +class ForbiddenZones(BossModule module) : Components.GenericAOEs(module) { private static readonly AOEShapeRect _shape = new(50, 10); @@ -42,7 +39,7 @@ public override IEnumerable ActiveAOEs(int slot, Actor actor) { yield return new(_shape, Module.PrimaryActor.Position, 180.Degrees()); // area behind boss - var pollen = module.Enemies(OID.Pollen).FirstOrDefault(); + var pollen = Module.Enemies(OID.Pollen).FirstOrDefault(); if (pollen != null && pollen.EventState == 0) yield return new(_shape, new(200, -122)); } diff --git a/BossMod/Modules/RealmReborn/Dungeon/D16Amdapor/D163Anantaboga.cs b/BossMod/Modules/RealmReborn/Dungeon/D16Amdapor/D163Anantaboga.cs index cba36477f2..c9a7bd1c49 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D16Amdapor/D163Anantaboga.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D16Amdapor/D163Anantaboga.cs @@ -30,20 +30,17 @@ public enum TetherID : uint } class TheLook(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.TheLook), new AOEShapeCone(11.5f, 45.Degrees())); // TODO: verify angle - class RottenBreath(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RottenBreath), new AOEShapeCone(11.5f, 45.Degrees())); // TODO: verify angle - class TailDrive(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TailDrive), new AOEShapeCone(35.5f, 45.Degrees())); -class ImminentCatastrophe : Components.CastLineOfSightAOE +class ImminentCatastrophe(BossModule module) : Components.CastLineOfSightAOE(module, ActionID.MakeSpell(AID.ImminentCatastrophe), 100, true { - public ImminentCatastrophe() : base(ActionID.MakeSpell(AID.ImminentCatastrophe), 100, true) { } - public override IEnumerable BlockerActors(BossModule module) => ((D163Anantaboga)module).ActivePillars(); + public override IEnumerable BlockerActors() => ((D163Anantaboga)Module).ActivePillars(); } class TerrorEye(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.TerrorEye), 6); -class PlagueDance : BossComponent +class PlagueDance(BossModule module) : BossComponent(module) { private Actor? _target; private DateTime _activation; @@ -54,7 +51,7 @@ public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignme { if (actor == _target) { - foreach (var p in ((D163Anantaboga)module).ActivePillars()) + foreach (var p in ((D163Anantaboga)Module).ActivePillars()) hints.AddForbiddenZone(_shape, p.Position, new(), _activation); } else if (_target != null) @@ -70,7 +67,7 @@ public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot public override void DrawArenaForeground(int pcSlot, Actor pc) { - _shape.Outline(arena, _target); + _shape.Outline(Arena, _target); } public override void OnTethered(Actor source, ActorTetherInfo tether) @@ -107,10 +104,8 @@ public D163AnantabogaStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 14, NameID = 1696)] -public class D163Anantaboga : BossModule +public class D163Anantaboga(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsSquare(new(10, 0), 25)) { - public D163Anantaboga(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsSquare(new(10, 0), 25)) { } - public override void CalculateAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { base.CalculateAIHints(slot, actor, assignment, hints); From a444c4bb8f66429a3f3891143d93c266db5f274b Mon Sep 17 00:00:00 2001 From: Andrew Gilewsky Date: Tue, 9 Apr 2024 11:30:14 +0100 Subject: [PATCH 12/18] WIP --- .../RealmReborn/Dungeon/D13CastrumMeridianum/D133Livia.cs | 2 +- .../Modules/RealmReborn/Dungeon/D16Amdapor/D163Anantaboga.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/BossMod/Modules/RealmReborn/Dungeon/D13CastrumMeridianum/D133Livia.cs b/BossMod/Modules/RealmReborn/Dungeon/D13CastrumMeridianum/D133Livia.cs index 86579e8ef3..b614c266ad 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D13CastrumMeridianum/D133Livia.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D13CastrumMeridianum/D133Livia.cs @@ -75,7 +75,7 @@ public override void OnCastFinished(Actor caster, ActorCastInfo spell) // note: casts are staggered in a slightly complicated way, so we don't remove actors immediately when cast finishes // a 'set' is always considered finished when 6th discharge finishes -class InfiniteReach(BossModule module) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.InfiniteReachDischarge) +class InfiniteReach(BossModule module) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.InfiniteReachDischarge)) { private List _castersRect = new(); private List _castersDischarge = new(); diff --git a/BossMod/Modules/RealmReborn/Dungeon/D16Amdapor/D163Anantaboga.cs b/BossMod/Modules/RealmReborn/Dungeon/D16Amdapor/D163Anantaboga.cs index c9a7bd1c49..5056c31975 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D16Amdapor/D163Anantaboga.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D16Amdapor/D163Anantaboga.cs @@ -33,7 +33,7 @@ public enum TetherID : uint class RottenBreath(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RottenBreath), new AOEShapeCone(11.5f, 45.Degrees())); // TODO: verify angle class TailDrive(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TailDrive), new AOEShapeCone(35.5f, 45.Degrees())); -class ImminentCatastrophe(BossModule module) : Components.CastLineOfSightAOE(module, ActionID.MakeSpell(AID.ImminentCatastrophe), 100, true +class ImminentCatastrophe(BossModule module) : Components.CastLineOfSightAOE(module, ActionID.MakeSpell(AID.ImminentCatastrophe), 100, true) { public override IEnumerable BlockerActors() => ((D163Anantaboga)Module).ActivePillars(); } From 37adeda979cfc30eebe1dba18f8e5a62c9e6d56d Mon Sep 17 00:00:00 2001 From: Olga Kichakova Date: Tue, 9 Apr 2024 23:36:56 +0100 Subject: [PATCH 13/18] ARR done, SB/ShB to go --- .../Extreme/Ex1Ultima/AethericBoom.cs | 10 ++- .../Extreme/Ex1Ultima/Aetheroplasm.cs | 22 +++---- .../Extreme/Ex1Ultima/CrimsonCyclone.cs | 4 +- .../Extreme/Ex1Ultima/Ex1Ultima.cs | 10 +-- .../Extreme/Ex1Ultima/Ex1UltimaAI.cs | 11 +--- .../Ex1Ultima/EyeOfTheStormGeocrush.cs | 6 +- .../RealmReborn/Extreme/Ex1Ultima/Freefire.cs | 4 +- .../Ex1Ultima/MistralSongVulcanBurst.cs | 8 +-- .../Extreme/Ex1Ultima/TankPurge.cs | 4 +- .../Extreme/Ex1Ultima/ViscousAetheroplasm.cs | 12 ++-- .../Extreme/Ex2Garuda/Ex2Garuda.cs | 9 --- .../Extreme/Ex2Garuda/Ex2GarudaAI.cs | 11 +--- .../Extreme/Ex2Garuda/Ex2GarudaStates.cs | 2 +- .../Extreme/Ex2Garuda/EyeOfTheStorm.cs | 6 +- .../Extreme/Ex2Garuda/MistralSong.cs | 16 ++--- .../Extreme/Ex2Garuda/SpinyShield.cs | 11 +--- .../Extreme/Ex2Garuda/WickedWheel.cs | 15 ++--- .../RealmReborn/Extreme/Ex3Titan/Ex3Titan.cs | 1 - .../Extreme/Ex3Titan/Ex3TitanAI.cs | 31 ++++----- .../RealmReborn/Extreme/Ex3Titan/Geocrush.cs | 19 ++---- .../Extreme/Ex3Titan/GraniteGaol.cs | 6 +- .../Extreme/Ex3Titan/LandslideBurst.cs | 2 +- .../Extreme/Ex3Titan/MountainBuster.cs | 10 +-- .../RealmReborn/Extreme/Ex3Titan/Tumult.cs | 11 +--- .../RealmReborn/Extreme/Ex3Titan/Upheaval.cs | 4 +- .../RealmReborn/Extreme/Ex4Ifrit/Eruption.cs | 4 +- .../RealmReborn/Extreme/Ex4Ifrit/Ex4Ifrit.cs | 4 +- .../Extreme/Ex4Ifrit/Ex4IfritAI.cs | 63 +++++++------------ .../Extreme/Ex4Ifrit/Ex4IfritStates.cs | 4 +- .../RealmReborn/Extreme/Ex4Ifrit/Hellfire.cs | 9 +-- .../Extreme/Ex4Ifrit/InfernalFetters.cs | 9 +-- .../Extreme/Ex4Ifrit/SearingWind.cs | 2 +- .../RealmReborn/Raid/T01Caduceus/Platforms.cs | 8 +-- .../RealmReborn/Raid/T01Caduceus/T01ADS.cs | 8 +-- .../RealmReborn/Raid/T01Caduceus/T01AI.cs | 22 +++---- .../Raid/T01Caduceus/T01Caduceus.cs | 16 ++--- .../Raid/T02MultiADS/AllaganRot.cs | 10 ++- .../Raid/T02MultiADS/T02MultiADS.cs | 28 +++------ .../Raid/T04Gauntlet/T04Gauntlet.cs | 4 +- .../RealmReborn/Raid/T05Twintania/Common.cs | 16 +---- .../RealmReborn/Raid/T05Twintania/Phase1.cs | 2 +- .../RealmReborn/Raid/T05Twintania/Phase2.cs | 35 +++-------- .../RealmReborn/Raid/T05Twintania/Phase3.cs | 31 +++------ .../RealmReborn/Raid/T05Twintania/Phase4.cs | 33 +++------- .../RealmReborn/Raid/T05Twintania/Phase5.cs | 37 ++++------- .../RealmReborn/Trial/T01IfritN/T01IfritN.cs | 6 +- .../RealmReborn/Trial/T02TitanN/T02TitanN.cs | 7 +-- .../Trial/T03GarudaN/T03GarudaN.cs | 15 ++--- .../T04PortaDecumana/T04PortaDecumana1.cs | 17 +---- .../T04PortaDecumana/T04PortaDecumana2.cs | 29 +++------ .../RealmReborn/Trial/T05IfritH/T05IfritH.cs | 9 +-- .../Trial/T06GarudaH/T06GarudaH.cs | 17 ++--- .../RealmReborn/Trial/T07TitanH/T07TitanH.cs | 13 ++-- .../Trial/T08ThornmarchH/MoogleGoRound.cs | 2 +- .../Trial/T08ThornmarchH/PomMeteor.cs | 4 +- .../Trial/T08ThornmarchH/PomStone.cs | 2 +- .../Trial/T08ThornmarchH/T08ThornmarchH.cs | 17 +---- .../Trial/T09WhorleaterH/T09WhorleaterH.cs | 2 - .../T09WhorleaterH/T09WhorleaterHBodyslam.cs | 6 +- .../T09WhorleaterH/T09WhorleaterHHints.cs | 18 +++--- .../T09WhorleaterHSpinningDive.cs | 10 +-- .../Dungeon/D01Holminster/D013Philia.cs | 2 +- .../Dungeon/D03QitanaRavel/D033Eros.cs | 2 +- .../CriticalEngagement/CE21FinalFurlong.cs | 2 +- .../CE53HereComesTheCavalry.cs | 2 +- .../DelubrumReginae/DRS3Dahu/SpitFlame.cs | 2 +- .../Foray/Duel/Duel4Dabog/RightArmComet.cs | 2 +- .../Shadowbringers/Hunt/RankA/Nariphon.cs | 2 +- .../Shadowbringers/Hunt/RankA/Supay.cs | 2 +- .../Shadowbringers/Hunt/RankA/TheMudman.cs | 2 +- .../SecretWorm.cs | 2 +- .../AltarAiravata.cs | 2 +- .../TheShiftingAltarsOfUznair/AltarChimera.cs | 2 +- .../Stormblood/Ultimate/UCOB/P2Cauterize.cs | 2 +- .../Stormblood/Ultimate/UCOB/P3GrandOctet.cs | 2 +- TODO | 1 + 76 files changed, 249 insertions(+), 544 deletions(-) diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/AethericBoom.cs b/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/AethericBoom.cs index d32a5d58bf..88665570fa 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/AethericBoom.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/AethericBoom.cs @@ -3,7 +3,7 @@ // AI idea: we want to run as a group and pop all orbs, without necessarily involving tanks // for 1/2 casts, we first try to stack S of boss, since everyone is somewhat close to that point, to get knocked back to the south edge; we then pop S orb and E orb(s) in order S->N // for 3 cast, we immune knockbacks and stack where two south orbs spawn to immediately handle two pairs; we then run to pop N orbs -class AethericBoom : Components.CastHint +class AethericBoom(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.AethericBoom), "Knockback + orbs") { private bool _waitingForOrbs; private List _activeOrbs = new(); @@ -12,8 +12,6 @@ class AethericBoom : Components.CastHint private static readonly float _explosionRadius = 8; - public AethericBoom() : base(ActionID.MakeSpell(AID.AethericBoom), "Knockback + orbs") { } - public override void Update() { // cleanup @@ -25,7 +23,7 @@ public override void Update() if (_waitingForOrbs) { - var orbs = module.Enemies(OID.Ultimaplasm); + var orbs = Module.Enemies(OID.Ultimaplasm); if (orbs.Count == 2 * (NumCasts + 1)) // 4/6/8 orbs should spawn after 1/2/3 casts { _activeOrbs.AddRange(orbs); @@ -106,8 +104,8 @@ public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (var orb in _activeOrbs) { - arena.Actor(orb, ArenaColor.Object, true); - arena.AddCircle(orb.Position, _explosionRadius, ArenaColor.Danger); + Arena.Actor(orb, ArenaColor.Object, true); + Arena.AddCircle(orb.Position, _explosionRadius, ArenaColor.Danger); } } diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/Aetheroplasm.cs b/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/Aetheroplasm.cs index c1e9096a4f..cf9abd2d74 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/Aetheroplasm.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/Aetheroplasm.cs @@ -4,7 +4,7 @@ // so currently I do the following hack: // - assume any created orb will eventually explode; whenever explosion counter matches kiter count, reset both // - any existing orb that hasn't exploded yet is assumed to target kiter with smallest angular distance -class Aetheroplasm : BossComponent +class Aetheroplasm(BossModule module) : BossComponent(module) { private BitMask _kiters; private HashSet _explodedOrbs = new(); @@ -19,30 +19,28 @@ public override void AddHints(int slot, Actor actor, TextHints hints) public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { - foreach (var orb in module.Enemies(OID.Aetheroplasm).Where(a => !_explodedOrbs.Contains(a.InstanceID))) + foreach (var orb in Module.Enemies(OID.Aetheroplasm).Where(a => !_explodedOrbs.Contains(a.InstanceID))) { // TODO: + line to kiter hints.AddForbiddenZone(ShapeDistance.Circle(orb.Position, _explosionRadius + 1)); - var kiter = MostLikelyKiter(module, orb); + var kiter = MostLikelyKiter(orb); if (kiter != null && kiter != actor) hints.AddForbiddenZone(ShapeDistance.Rect(orb.Position, kiter.Position, 2)); } } public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) - { - return _kiters[playerSlot] ? PlayerPriority.Danger : PlayerPriority.Irrelevant; - } + => _kiters[playerSlot] ? PlayerPriority.Danger : PlayerPriority.Irrelevant; public override void DrawArenaForeground(int pcSlot, Actor pc) { - foreach (var orb in module.Enemies(OID.Aetheroplasm).Where(a => !_explodedOrbs.Contains(a.InstanceID))) + foreach (var orb in Module.Enemies(OID.Aetheroplasm).Where(a => !_explodedOrbs.Contains(a.InstanceID))) { - arena.Actor(orb, ArenaColor.Object, true); - arena.AddCircle(orb.Position, _explosionRadius, ArenaColor.Danger); - var kiter = MostLikelyKiter(module, orb); + Arena.Actor(orb, ArenaColor.Object, true); + Arena.AddCircle(orb.Position, _explosionRadius, ArenaColor.Danger); + var kiter = MostLikelyKiter(orb); if (kiter != null) - arena.AddLine(orb.Position, kiter.Position, ArenaColor.Danger); + Arena.AddLine(orb.Position, kiter.Position, ArenaColor.Danger); } } @@ -64,7 +62,7 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } } - private Actor? MostLikelyKiter(BossModule module, Actor orb) + private Actor? MostLikelyKiter(Actor orb) { if (_kiters.None()) return null; diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/CrimsonCyclone.cs b/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/CrimsonCyclone.cs index b7db5df9fe..94a6cbc797 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/CrimsonCyclone.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/CrimsonCyclone.cs @@ -1,6 +1,6 @@ namespace BossMod.RealmReborn.Extreme.Ex1Ultima; -class CrimsonCyclone : Components.GenericAOEs +class CrimsonCyclone(BossModule module) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.CrimsonCyclone)) { private Actor? _ifrit; // non-null while mechanic is active private DateTime _resolve; @@ -9,8 +9,6 @@ class CrimsonCyclone : Components.GenericAOEs private static readonly AOEShapeRect _shape = new(43, 6, 5); - public CrimsonCyclone() : base(ActionID.MakeSpell(AID.CrimsonCyclone)) { } - public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_ifrit != null) diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/Ex1Ultima.cs b/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/Ex1Ultima.cs index a57c0f2c05..974206df84 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/Ex1Ultima.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/Ex1Ultima.cs @@ -1,17 +1,11 @@ namespace BossMod.RealmReborn.Extreme.Ex1Ultima; class RadiantPlume(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.RadiantPlume), 8); - class WeightOfTheLand(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.WeightOfTheLand), 6); - class Eruption(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Eruption), 8); - class MagitekRayCenter(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.MagitekRayCenter), new AOEShapeRect(40, 3)); - class MagitekRayLeft(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.MagitekRayLeft), new AOEShapeRect(40, 3)); - class MagitekRayRight(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.MagitekRayRight), new AOEShapeRect(40, 3)); - class AssaultCannon(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.AssaultCannon), new AOEShapeRect(45, 1)); // TODO: homing lasers & ceruleum vent? do we care? damage is not high, and visual clutter sucks @@ -46,10 +40,8 @@ public Ex1UltimaStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 68, NameID = 2137)] -public class Ex1Ultima : BossModule +public class Ex1Ultima(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(0, 0), 20)) { - public Ex1Ultima(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(0, 0), 20)) { } - protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/Ex1UltimaAI.cs b/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/Ex1UltimaAI.cs index c050df734f..e9ce8c9f8e 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/Ex1UltimaAI.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/Ex1UltimaAI.cs @@ -1,20 +1,15 @@ namespace BossMod.RealmReborn.Extreme.Ex1Ultima; -class Ex1UltimaAI : BossComponent +class Ex1UltimaAI(BossModule module) : BossComponent(module) { - private ViscousAetheroplasm? _viscousAetheroplasm; + private ViscousAetheroplasm? _viscousAetheroplasm = module.FindComponent(); private static readonly float _meleeRange = 7; private static readonly float _rangedRange = 15; // outside ceruleum vent range, which is 14 - public override void Init(BossModule module) - { - _viscousAetheroplasm = module.FindComponent(); - } - public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { - if (Module.PrimaryActor.TargetID != actor.InstanceID && hints.ForbiddenZones.Count == 1 && !module.Enemies(OID.MagitekBit).Any(a => !a.IsDead)) // for non-mt, there is always a cleave + if (Module.PrimaryActor.TargetID != actor.InstanceID && hints.ForbiddenZones.Count == 1 && !Module.Enemies(OID.MagitekBit).Any(a => !a.IsDead)) // for non-mt, there is always a cleave { // default positions: tank boss at the edge facing N, OT south of boss, M1/M2 to the left/right (so that they can slightly adjust for positionals), H1/H2/R1/R2 to S outside ceruleum vent range, all spread somewhat to avoid homing lasers // when tanks need to swap, OT moves between boss and MT and taunts; OT needs to ignore diffractive lasers at this point diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/EyeOfTheStormGeocrush.cs b/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/EyeOfTheStormGeocrush.cs index 5c3a97ebc6..ff7767f1d1 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/EyeOfTheStormGeocrush.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/EyeOfTheStormGeocrush.cs @@ -1,7 +1,7 @@ namespace BossMod.RealmReborn.Extreme.Ex1Ultima; // note that it could be a GenericAOEs, but we customize everything anyway... -class EyeOfTheStormGeocrush : BossComponent +class EyeOfTheStormGeocrush(BossModule module) : BossComponent(module) { private Actor? _eotsCaster; private Actor? _geocrushCaster; @@ -36,9 +36,9 @@ public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignme public override void DrawArenaBackground(int pcSlot, Actor pc) { if (_eotsCaster != null) - _aoeEOTS.Draw(arena, _eotsCaster); + _aoeEOTS.Draw(Arena, _eotsCaster); else if (_geocrushCaster != null) - _aoeGeocrush.Draw(arena, _geocrushCaster); + _aoeGeocrush.Draw(Arena, _geocrushCaster); } public override void OnCastStarted(Actor caster, ActorCastInfo spell) diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/Freefire.cs b/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/Freefire.cs index 001b4714d2..f1648b0605 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/Freefire.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/Freefire.cs @@ -1,6 +1,6 @@ namespace BossMod.RealmReborn.Extreme.Ex1Ultima; -class Freefire : Components.GenericAOEs +class Freefire(BossModule module) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.Freefire)) { private List _casters = new(); private DateTime _resolve; @@ -8,8 +8,6 @@ class Freefire : Components.GenericAOEs private static readonly AOEShapeCircle _shape = new(15); - public Freefire() : base(ActionID.MakeSpell(AID.Freefire)) { } - public override IEnumerable ActiveAOEs(int slot, Actor actor) { foreach (var c in _casters) diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/MistralSongVulcanBurst.cs b/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/MistralSongVulcanBurst.cs index de7ea316d8..b490609ca3 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/MistralSongVulcanBurst.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/MistralSongVulcanBurst.cs @@ -1,6 +1,6 @@ namespace BossMod.RealmReborn.Extreme.Ex1Ultima; -class MistralSongVulcanBurst : Components.GenericAOEs +class MistralSongVulcanBurst(BossModule module) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.MistralSong)) { public bool Active { get; private set; } private Actor? _garuda; // non-null while mechanic is active @@ -8,8 +8,6 @@ class MistralSongVulcanBurst : Components.GenericAOEs private bool _burstImminent; private static readonly AOEShapeCone _shape = new(23.4f, 75.Degrees()); - public MistralSongVulcanBurst() : base(ActionID.MakeSpell(AID.MistralSong)) { } - public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (Active) @@ -47,8 +45,8 @@ public override void DrawArenaForeground(int pcSlot, Actor pc) { base.DrawArenaForeground(pcSlot, pc); - var adjPos = _burstImminent ? arena.Bounds.ClampToBounds(Components.Knockback.AwayFromSource(pc.Position, Module.PrimaryActor, 30)) : pc.Position; - Components.Knockback.DrawKnockback(pc, adjPos, arena); + var adjPos = _burstImminent ? Arena.Bounds.ClampToBounds(Components.Knockback.AwayFromSource(pc.Position, Module.PrimaryActor, 30)) : pc.Position; + Components.Knockback.DrawKnockback(pc, adjPos, Arena); } public override void OnCastStarted(Actor caster, ActorCastInfo spell) diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/TankPurge.cs b/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/TankPurge.cs index 9a0541c5a8..61b946e248 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/TankPurge.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/TankPurge.cs @@ -1,9 +1,7 @@ namespace BossMod.RealmReborn.Extreme.Ex1Ultima; -class TankPurge : Components.RaidwideCast +class TankPurge(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.TankPurge)) { - public TankPurge() : base(ActionID.MakeSpell(AID.TankPurge)) { } - public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { base.AddAIHints(slot, actor, assignment, hints); diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/ViscousAetheroplasm.cs b/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/ViscousAetheroplasm.cs index 88dcd6d874..6cc8a851a0 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/ViscousAetheroplasm.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex1Ultima/ViscousAetheroplasm.cs @@ -1,12 +1,10 @@ namespace BossMod.RealmReborn.Extreme.Ex1Ultima; -class ViscousAetheroplasm : Components.Cleave +class ViscousAetheroplasm(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.ViscousAetheroplasm), new AOEShapeCircle(2), originAtTarget: true) { public bool NeedTankSwap { get; private set; } private int[] _stacks = new int[PartyState.MaxPartySize]; - public ViscousAetheroplasm() : base(ActionID.MakeSpell(AID.ViscousAetheroplasm), new AOEShapeCircle(2), originAtTarget: true) { } - public override void Update() { var tankSlot = WorldState.Party.FindSlot(Module.PrimaryActor.TargetID); @@ -15,7 +13,7 @@ public override void Update() public override void AddHints(int slot, Actor actor, TextHints hints) { - base.AddHints(module, slot, actor, hints, movementHints); + base.AddHints(slot, actor, hints); if (NeedTankSwap && actor.Role == Role.Tank) hints.Add(Module.PrimaryActor.TargetID == actor.InstanceID ? "Pass aggro to co-tank!" : "Taunt boss!"); @@ -24,16 +22,16 @@ public override void AddHints(int slot, Actor actor, TextHints hints) public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.ViscousAetheroplasm) - UpdateStacks(module, actor, status.Extra); + UpdateStacks(actor, status.Extra); } public override void OnStatusLose(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.ViscousAetheroplasm) - UpdateStacks(module, actor, 0); + UpdateStacks(actor, 0); } - private void UpdateStacks(BossModule module, Actor actor, int stacks) + private void UpdateStacks(Actor actor, int stacks) { int slot = Raid.FindSlot(actor.InstanceID); if (slot >= 0) diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/Ex2Garuda.cs b/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/Ex2Garuda.cs index 22f779bfa5..472cca6262 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/Ex2Garuda.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/Ex2Garuda.cs @@ -1,23 +1,14 @@ namespace BossMod.RealmReborn.Extreme.Ex2Garuda; class DownburstBoss(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.Downburst1), new AOEShapeCone(11.7f, 60.Degrees())); // TODO: verify angle - class DownburstSuparna(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.Downburst1), new AOEShapeCone(11.36f, 60.Degrees()), (uint)OID.Suparna); // TODO: verify angle - class DownburstChirada(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.Downburst2), new AOEShapeCone(11.36f, 60.Degrees()), (uint)OID.Chirada); // TODO: verify angle - class Slipstream(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Slipstream), new AOEShapeCone(11.7f, 45.Degrees())); - class FrictionAdds(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.FrictionAdds), 5); - class FeatherRain(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.FeatherRain), 3); - class AerialBlast(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.AerialBlast)); - class MistralShriek(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.MistralShriek)); - class Gigastorm(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Gigastorm), new AOEShapeCircle(6.5f)); - class GreatWhirlwind(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.GreatWhirlwind), 8); [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 65, NameID = 1644)] diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/Ex2GarudaAI.cs b/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/Ex2GarudaAI.cs index 2eaa3272e7..7200c636f2 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/Ex2GarudaAI.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/Ex2GarudaAI.cs @@ -1,14 +1,9 @@ namespace BossMod.RealmReborn.Extreme.Ex2Garuda; // common AI for all phases -class Ex2GarudaAI : BossComponent +class Ex2GarudaAI(BossModule module) : BossComponent(module) { - private AerialBlast? _aerialBlast; - - public override void Init(BossModule module) - { - _aerialBlast = module.FindComponent(); - } + private AerialBlast? _aerialBlast = module.FindComponent(); public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { @@ -67,7 +62,7 @@ public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignme // don't stand near monoliths to avoid clipping them with friction bool haveMonoliths = false; - foreach (var monolith in module.Enemies(OID.Monolith).Where(a => !a.IsDead)) + foreach (var monolith in Module.Enemies(OID.Monolith).Where(a => !a.IsDead)) { hints.AddForbiddenZone(ShapeDistance.Circle(monolith.Position, 5)); haveMonoliths = true; diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/Ex2GarudaStates.cs b/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/Ex2GarudaStates.cs index 77d0e6c622..0649e3b917 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/Ex2GarudaStates.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/Ex2GarudaStates.cs @@ -30,7 +30,7 @@ private void Phase1(uint id) SimpleState(id + 0x20000, 37.6f, "Forced phase end"); } - private void MistralSong(uint id, float delay) where Song : MistralSong, new() + private void MistralSong(uint id, float delay) where Song : MistralSong { Targetable(id, false, delay, "Disappear") .ActivateOnEnter() diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/EyeOfTheStorm.cs b/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/EyeOfTheStorm.cs index c8a18c0968..4927b29b1e 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/EyeOfTheStorm.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/EyeOfTheStorm.cs @@ -1,14 +1,12 @@ namespace BossMod.RealmReborn.Extreme.Ex2Garuda; -class EyeOfTheStorm : Components.GenericAOEs +class EyeOfTheStorm(BossModule module) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.EyeOfTheStorm)) { private Actor? _caster; private DateTime _nextCastAt; private static readonly AOEShapeDonut _shape = new(12, 25); // TODO: verify inner radius - public EyeOfTheStorm() : base(ActionID.MakeSpell(AID.EyeOfTheStorm)) { } - - public bool Active(BossModule module) => _caster?.CastInfo != null || _nextCastAt > WorldState.CurrentTime; + public bool Active() => _caster?.CastInfo != null || _nextCastAt > WorldState.CurrentTime; public override IEnumerable ActiveAOEs(int slot, Actor actor) { diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/MistralSong.cs b/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/MistralSong.cs index b8287652fb..1e4fc213c0 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/MistralSong.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/MistralSong.cs @@ -4,31 +4,25 @@ class MistralSong : Components.GenericLineOfSightAOE { private WPos _predictedPosition; - public MistralSong(WPos predictedPosition) : base(ActionID.MakeSpell(AID.MistralSong), 31.7f, true) + public MistralSong(BossModule module, WPos predictedPosition) : base(module, ActionID.MakeSpell(AID.MistralSong), 31.7f, true) { _predictedPosition = predictedPosition; - } - - public override void Init(BossModule module) - { - Modify(_predictedPosition, ActiveBlockers(module)); + Modify(_predictedPosition, ActiveBlockers()); } public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) - Modify(caster.Position, ActiveBlockers(module)); + Modify(caster.Position, ActiveBlockers()); } public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) - Modify(null, ActiveBlockers(module)); + Modify(null, ActiveBlockers()); } - private IEnumerable<(WPos, float)> ActiveBlockers(BossModule module) => module.Enemies(OID.Monolith).Where(a => !a.IsDead).Select(a => (a.Position, a.HitboxRadius - 0.5f)); + private IEnumerable<(WPos, float)> ActiveBlockers() => Module.Enemies(OID.Monolith).Where(a => !a.IsDead).Select(a => (a.Position, a.HitboxRadius - 0.5f)); } - class MistralSong1(BossModule module) : MistralSong(module, new(0, -13)); - class MistralSong2(BossModule module) : MistralSong(module, new(13, 0)); diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/SpinyShield.cs b/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/SpinyShield.cs index 5e6df61bf1..bd61788df0 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/SpinyShield.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/SpinyShield.cs @@ -1,17 +1,12 @@ namespace BossMod.RealmReborn.Extreme.Ex2Garuda; -class SpinyShield : BossComponent +class SpinyShield(BossModule module) : BossComponent(module) { - private IReadOnlyList _shield = ActorEnumeration.EmptyList; + private IReadOnlyList _shield = module.Enemies(OID.SpinyShield); public Actor? ActiveShield => _shield.FirstOrDefault(a => a.EventState != 7); private static readonly float _radius = 6; // TODO: verify - public override void Init(BossModule module) - { - _shield = module.Enemies(OID.SpinyShield); - } - public override void AddHints(int slot, Actor actor, TextHints hints) { var shield = ActiveShield; @@ -30,6 +25,6 @@ public override void DrawArenaBackground(int pcSlot, Actor pc) { var shield = ActiveShield; if (shield != null) - arena.ZoneCircle(shield.Position, _radius, ArenaColor.SafeFromAOE); + Arena.ZoneCircle(shield.Position, _radius, ArenaColor.SafeFromAOE); } } diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/WickedWheel.cs b/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/WickedWheel.cs index 45abc50c3c..dd20ffbee4 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/WickedWheel.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/WickedWheel.cs @@ -1,17 +1,10 @@ namespace BossMod.RealmReborn.Extreme.Ex2Garuda; -class WickedWheel : Components.CastCounter +class WickedWheel(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.WickedWheel)) { - private DateTime _expectedNext; + private DateTime _expectedNext = module.WorldState.FutureTime(25); private static readonly float _radius = 8.7f; - public WickedWheel() : base(ActionID.MakeSpell(AID.WickedWheel)) { } - - public override void Init(BossModule module) - { - _expectedNext = WorldState.FutureTime(25); - } - public override void AddGlobalHints(GlobalHints hints) { if (_expectedNext != default) @@ -28,7 +21,7 @@ public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignme public override void DrawArenaForeground(int pcSlot, Actor pc) { if (_expectedNext != default && (_expectedNext - WorldState.CurrentTime).TotalSeconds < 3) - arena.AddCircle(Module.PrimaryActor.Position, _radius, ArenaColor.Danger); + Arena.AddCircle(Module.PrimaryActor.Position, _radius, ArenaColor.Danger); } public override void OnEventCast(Actor caster, ActorCastEvent spell) @@ -37,7 +30,7 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) if (spell.Action == WatchedAction) { // not sure about this ... - _expectedNext = module.Enemies(OID.Suparna).Any(a => a.IsTargetable && !a.IsDead) ? WorldState.FutureTime(25) : new(); + _expectedNext = Module.Enemies(OID.Suparna).Any(a => a.IsTargetable && !a.IsDead) ? WorldState.FutureTime(25) : new(); } } } diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/Ex3Titan.cs b/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/Ex3Titan.cs index 4e13b8d265..b18e92b769 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/Ex3Titan.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/Ex3Titan.cs @@ -1,7 +1,6 @@ namespace BossMod.RealmReborn.Extreme.Ex3Titan; class WeightOfTheLand(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.WeightOfTheLandAOE), 6); - class GaolerVoidzone(BossModule module) : Components.PersistentVoidzone(module, 5, m => m.Enemies(OID.GaolerVoidzone).Where(e => e.EventState != 7)); [ConfigDisplay(Order = 0x030, Parent = typeof(RealmRebornConfig))] diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/Ex3TitanAI.cs b/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/Ex3TitanAI.cs index 9e78d44921..aebecc49d3 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/Ex3TitanAI.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/Ex3TitanAI.cs @@ -1,24 +1,19 @@ namespace BossMod.RealmReborn.Extreme.Ex3Titan; -class Ex3TitanAI : BossComponent +class Ex3TitanAI(BossModule module) : BossComponent(module) { public bool KillNextBomb; - private GraniteGaol? _rockThrow; - - public override void Init(BossModule module) - { - _rockThrow = module.FindComponent(); - } + private GraniteGaol? _rockThrow = module.FindComponent(); public override void Update() { - if (KillNextBomb && !module.Enemies(OID.BombBoulder).Any()) + if (KillNextBomb && !Module.Enemies(OID.BombBoulder).Any()) KillNextBomb = false; } public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { - bool haveGaolers = module.Enemies(OID.GraniteGaoler).Any(a => a.IsTargetable && !a.IsDead); + bool haveGaolers = Module.Enemies(OID.GraniteGaoler).Any(a => a.IsTargetable && !a.IsDead); foreach (var e in hints.PotentialTargets) { e.StayAtLongRange = true; @@ -28,7 +23,7 @@ public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignme case OID.TitansHeart: e.Priority = 1; e.AttackStrength = 0.25f; - e.DesiredPosition = Module.Bounds.Center - new WDir(0, module.Arena.Bounds.HalfSize - 6); + e.DesiredPosition = Module.Bounds.Center - new WDir(0, Arena.Bounds.HalfSize - 6); e.DesiredRotation = 180.Degrees(); e.TankDistance = 0; if (actor.Role == Role.Tank) @@ -39,13 +34,13 @@ public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignme // OT's vuln will expire right before 5th buster, so MT will eat 1/4/7/... and OT will eat 2+3/5+6/... // however, in reality phase is going to be extremely short - 1 or 2 tb's?.. bool isCurrentTank = actor.InstanceID == Module.PrimaryActor.TargetID; - bool needTankSwap = !haveGaolers && module.FindComponent() == null && TankVulnStacks(module) >= 2; + bool needTankSwap = !haveGaolers && Module.FindComponent() == null && TankVulnStacks() >= 2; e.PreferProvoking = e.ShouldBeTanked = isCurrentTank != needTankSwap; } break; case OID.GraniteGaoler: e.Priority = 2; - e.DesiredPosition = Module.Bounds.Center + (module.Arena.Bounds.HalfSize - 4) * 30.Degrees().ToDirection(); // move them away from boss, healer gaol spots and upheaval knockback spots + e.DesiredPosition = Module.Bounds.Center + (Module.Bounds.HalfSize - 4) * 30.Degrees().ToDirection(); // move them away from boss, healer gaol spots and upheaval knockback spots e.ShouldBeTanked = Module.PrimaryActor.TargetID != actor.InstanceID && actor.Role == Role.Tank; break; case OID.BombBoulder: @@ -66,30 +61,30 @@ public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignme if (_rockThrow != null && _rockThrow.PendingFetters[slot]) { var pos = actor.Role == Role.Healer - ? Module.Bounds.Center + module.Arena.Bounds.HalfSize * (-30).Degrees().ToDirection() // healers should go to the back; 30 degrees will be safe if landslide is baited straight to south (which it should, since it will follow upheaval) + ? Module.Bounds.Center + Module.Bounds.HalfSize * (-30).Degrees().ToDirection() // healers should go to the back; 30 degrees will be safe if landslide is baited straight to south (which it should, since it will follow upheaval) : Module.PrimaryActor.Position + new WDir(0, 1); hints.AddForbiddenZone(ShapeDistance.InvertedCircle(pos, 2), _rockThrow.ResolveAt); } else { - var pos = StackPosition(module); + var pos = StackPosition(); if (pos != null) hints.AddForbiddenZone(ShapeDistance.InvertedCircle(pos.Value, 2), /*module.StateMachine.NextTransitionWithFlag(StateMachine.StateHint.BossCastStart)*/DateTime.MaxValue); } } } - private WPos? StackPosition(BossModule module) + private WPos? StackPosition() { var boss = Module.PrimaryActor; var res = boss.Position + 3 * (boss.Rotation + 135.Degrees()).ToDirection(); - if (module.Arena.Bounds.Contains(res)) + if (Arena.Bounds.Contains(res)) return res; res = boss.Position + 3 * (boss.Rotation - 135.Degrees()).ToDirection(); - if (module.Arena.Bounds.Contains(res)) + if (Arena.Bounds.Contains(res)) return res; return null; } - private int TankVulnStacks(BossModule module) => WorldState.Actors.Find(Module.PrimaryActor.TargetID)?.FindStatus(SID.PhysicalVulnerabilityUp)?.Extra ?? 0; + private int TankVulnStacks() => WorldState.Actors.Find(Module.PrimaryActor.TargetID)?.FindStatus(SID.PhysicalVulnerabilityUp)?.Extra ?? 0; } diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/Geocrush.cs b/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/Geocrush.cs index 325147f1ec..a423024932 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/Geocrush.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/Geocrush.cs @@ -1,15 +1,10 @@ namespace BossMod.RealmReborn.Extreme.Ex3Titan; -class Geocrush : Components.CastCounter +class Geocrush(BossModule module, float radius) : Components.CastCounter(module, ActionID.MakeSpell(AID.Geocrush)) { - private float _radius; + private float _radius = radius; private static readonly float _ringWidth = 2; - public Geocrush(float radius) : base(ActionID.MakeSpell(AID.Geocrush)) - { - _radius = radius; - } - public override void AddHints(int slot, Actor actor, TextHints hints) { if (!actor.Position.InCircle(Module.Bounds.Center, _radius)) @@ -27,19 +22,17 @@ public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignme public override void DrawArenaBackground(int pcSlot, Actor pc) { - arena.ZoneDonut(Module.Bounds.Center, _radius, 25, ArenaColor.AOE); - arena.ZoneDonut(Module.Bounds.Center, _radius - _ringWidth, _radius, ArenaColor.SafeFromAOE); + Arena.ZoneDonut(Module.Bounds.Center, _radius, 25, ArenaColor.AOE); + Arena.ZoneDonut(Module.Bounds.Center, _radius - _ringWidth, _radius, ArenaColor.SafeFromAOE); } } -class Geocrush1 : Geocrush +class Geocrush1(BossModule module) : Geocrush(module, Radius) { public const float Radius = 15; - public Geocrush1() : base(Radius) { } } -class Geocrush2 : Geocrush +class Geocrush2(BossModule module) : Geocrush(module, Radius) { public const float Radius = 12; - public Geocrush2() : base(Radius) { } } diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/GraniteGaol.cs b/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/GraniteGaol.cs index bdec9c8bae..1995c2c3e4 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/GraniteGaol.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/GraniteGaol.cs @@ -1,14 +1,12 @@ namespace BossMod.RealmReborn.Extreme.Ex3Titan; -class GraniteGaol : BossComponent +class GraniteGaol(BossModule module) : BossComponent(module) { public BitMask PendingFetters; public DateTime ResolveAt; public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) - { - return PendingFetters[playerSlot] ? PlayerPriority.Interesting : PlayerPriority.Irrelevant; - } + => PendingFetters[playerSlot] ? PlayerPriority.Interesting : PlayerPriority.Irrelevant; public override void OnStatusGain(Actor actor, ActorStatus status) { diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/LandslideBurst.cs b/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/LandslideBurst.cs index f684cef1eb..b8e415afaf 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/LandslideBurst.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/LandslideBurst.cs @@ -1,7 +1,7 @@ namespace BossMod.RealmReborn.Extreme.Ex3Titan; // burst (bomb explosion) needs to be shown in particular moment (different for different patterns) so that ai can avoid them nicely -class LandslideBurst : Components.GenericAOEs +class LandslideBurst(BossModule module) : Components.GenericAOEs(module) { public int MaxBombs = 9; private List _landslides = new(); diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/MountainBuster.cs b/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/MountainBuster.cs index 199206f964..e735f1ca5b 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/MountainBuster.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/MountainBuster.cs @@ -2,11 +2,8 @@ class MountainBuster : Components.Cleave { - public MountainBuster() : base(ActionID.MakeSpell(AID.MountainBuster), new AOEShapeCone(21.25f, 60.Degrees())) { } // TODO: verify angle - - public override void Init(BossModule module) + public MountainBuster(BossModule module) : base(module, ActionID.MakeSpell(AID.MountainBuster), new AOEShapeCone(21.25f, 60.Degrees())) // TODO: verify angle { - base.Init(module); NextExpected = module.StateMachine.NextTransitionWithFlag(StateMachine.StateHint.Tankbuster); } @@ -21,11 +18,8 @@ public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignme class RockBuster : Components.Cleave { - public RockBuster() : base(ActionID.MakeSpell(AID.RockBuster), new AOEShapeCone(11.25f, 60.Degrees())) { } // TODO: verify angle - - public override void Init(BossModule module) + public RockBuster(BossModule module) : base(module, ActionID.MakeSpell(AID.RockBuster), new AOEShapeCone(11.25f, 60.Degrees())) // TODO: verify angle { - base.Init(module); NextExpected = module.StateMachine.NextTransitionWithFlag(StateMachine.StateHint.Tankbuster); } diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/Tumult.cs b/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/Tumult.cs index b9fde1d2ee..fb4e13cbad 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/Tumult.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/Tumult.cs @@ -1,15 +1,8 @@ namespace BossMod.RealmReborn.Extreme.Ex3Titan; -class Tumult : Components.CastCounter +class Tumult(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.TumultBoss)) { - private DateTime _nextExpected; - - public Tumult() : base(ActionID.MakeSpell(AID.TumultBoss)) { } - - public override void Init(BossModule module) - { - _nextExpected = module.StateMachine.NextTransitionWithFlag(StateMachine.StateHint.Raidwide); - } + private DateTime _nextExpected = module.StateMachine.NextTransitionWithFlag(StateMachine.StateHint.Raidwide); public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/Upheaval.cs b/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/Upheaval.cs index d507e31c43..ffcf5dff90 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/Upheaval.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/Upheaval.cs @@ -1,12 +1,10 @@ namespace BossMod.RealmReborn.Extreme.Ex3Titan; // TODO: most of what's here should be handled by KnockbackFromCastTarget component... -class Upheaval : Components.Knockback +class Upheaval(BossModule module) : Components.Knockback(module, ActionID.MakeSpell(AID.Upheaval)) { private DateTime _remainInPosition; - public Upheaval() : base(ActionID.MakeSpell(AID.Upheaval)) { } - public override IEnumerable Sources(int slot, Actor actor) { if (_remainInPosition > WorldState.CurrentTime) diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/Eruption.cs b/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/Eruption.cs index 807dd929b9..d3d5a35660 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/Eruption.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/Eruption.cs @@ -1,15 +1,13 @@ namespace BossMod.RealmReborn.Extreme.Ex4Ifrit; // TODO: revise & generalize to 'baited aoe' component, with nice utilities for AI -class Eruption : Components.LocationTargetedAOEs +class Eruption(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.EruptionAOE), Radius) { private DateTime _baitDetectDeadline; public BitMask Baiters; public static readonly float Radius = 8; - public Eruption() : base(ActionID.MakeSpell(AID.EruptionAOE), Radius) { } - public override void Update() { if (Casters.Count == 0) diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/Ex4Ifrit.cs b/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/Ex4Ifrit.cs index a1bc1155df..665156d910 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/Ex4Ifrit.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/Ex4Ifrit.cs @@ -1,10 +1,8 @@ namespace BossMod.RealmReborn.Extreme.Ex4Ifrit; -class Incinerate : Components.Cleave +class Incinerate(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.Incinerate), CleaveShape) { public static readonly AOEShapeCone CleaveShape = new(21, 60.Degrees()); - - public Incinerate() : base(ActionID.MakeSpell(AID.Incinerate), CleaveShape) { } } class RadiantPlume(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.RadiantPlumeAOE), 8); diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/Ex4IfritAI.cs b/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/Ex4IfritAI.cs index cf1de11cbc..9d1d90c23c 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/Ex4IfritAI.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/Ex4IfritAI.cs @@ -1,24 +1,15 @@ namespace BossMod.RealmReborn.Extreme.Ex4Ifrit; // common ai features for whole fight -class Ex4IfritAICommon : BossComponent +class Ex4IfritAICommon(BossModule module) : BossComponent(module) { - private Incinerate? _incinerate; - private Eruption? _eruption; - private SearingWind? _searingWind; - private InfernalFetters? _infernalFetters; - protected DateTime CreatedAt; + private Incinerate? _incinerate = module.FindComponent(); + private Eruption? _eruption = module.FindComponent(); + private SearingWind? _searingWind = module.FindComponent(); + private InfernalFetters? _infernalFetters = module.FindComponent(); + protected DateTime CreatedAt = module.WorldState.CurrentTime; public PartyRolesConfig.Assignment BossTankRole = PartyRolesConfig.Assignment.Unassigned; - public override void Init(BossModule module) - { - _incinerate = module.FindComponent(); - _eruption = module.FindComponent(); - _searingWind = module.FindComponent(); - _infernalFetters = module.FindComponent(); - CreatedAt = WorldState.CurrentTime; - } - protected bool IsInvincible(Actor actor) => actor.FindStatus(SID.Invincibility) != null; protected int TankVulnStacks(Actor? tank) => tank?.FindStatus(SID.Suppuration)?.Extra ?? 0; protected bool EruptionActive => _eruption?.Casters.Count > 0; @@ -27,7 +18,7 @@ public override void Init(BossModule module) protected bool IsFettered(int slot) => _infernalFetters != null && _infernalFetters.Fetters[slot]; protected int IncinerateCount => _incinerate?.NumCasts ?? 0; - protected void UpdateBossTankingProperties(BossModule module, AIHints.Enemy boss, Actor player, PartyRolesConfig.Assignment assignment) + protected void UpdateBossTankingProperties(AIHints.Enemy boss, Actor player, PartyRolesConfig.Assignment assignment) { boss.AttackStrength = 0.35f; boss.DesiredRotation = Angle.FromDirection(Module.PrimaryActor.Position - Module.Bounds.Center); // point to the wall @@ -55,7 +46,7 @@ protected void AddPositionHint(AIHints hints, WPos target, bool asap = true, flo hints.AddForbiddenZone(ShapeDistance.InvertedCircle(target, radius), asap ? new() : DateTime.MaxValue); } - protected void AddDefaultEruptionBaiterHints(BossModule module, AIHints hints) + protected void AddDefaultEruptionBaiterHints(AIHints hints) { // avoid non-baiters (TODO: should this be done by eruption component itself?) if (_eruption != null) @@ -100,7 +91,7 @@ protected void PlanStrongCooldown(AIHints hints, Actor player, float phaseTime, // - non-caster dd stand in a clump near right leg (45 degrees, to allow both types of positionals for melees) // - casters (typically 1) stand farther away - this way they are out of vulcan burst range and won't have to move if not targeted by eruptions // - for dd eruption baiters, we provide a defined bait spot for second eruption, same distance away from both caster and non-caster locations -class Ex4IfritAINormal : Ex4IfritAICommon +class Ex4IfritAINormal(BossModule module) : Ex4IfritAICommon(module) { public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { @@ -112,7 +103,7 @@ public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignme { boss.Priority = 1; boss.StayAtLongRange = true; - UpdateBossTankingProperties(module, boss, actor, assignment); + UpdateBossTankingProperties(boss, actor, assignment); } // position hints @@ -128,7 +119,7 @@ public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignme } else { - AddDefaultEruptionBaiterHints(module, hints); + AddDefaultEruptionBaiterHints(hints); } } } @@ -180,7 +171,7 @@ public override void DrawArenaForeground(int pcSlot, Actor pc) if (Module.PrimaryActor.TargetID == pc.InstanceID) { // cone to help mt with proper positioning - arena.AddCone(Module.PrimaryActor.Position, 2, Angle.FromDirection(Module.PrimaryActor.Position - Module.Bounds.Center), Incinerate.CleaveShape.HalfAngle, ArenaColor.Safe); + Arena.AddCone(Module.PrimaryActor.Position, 2, Angle.FromDirection(Module.PrimaryActor.Position - Module.Bounds.Center), Incinerate.CleaveShape.HalfAngle, ArenaColor.Safe); } } } @@ -198,15 +189,11 @@ class Ex4IfritAINails : Ex4IfritAINormal private int MinNailsForCWSearingWinds; private BitMask OTTankAtIncinerateCounts; - public Ex4IfritAINails(int minNailsForCWSearingWinds, ulong otTankAtIncinerateCounts) + public Ex4IfritAINails(BossModule module, int minNailsForCWSearingWinds, ulong otTankAtIncinerateCounts) : base(module) { MinNailsForCWSearingWinds = minNailsForCWSearingWinds; OTTankAtIncinerateCounts = new(otTankAtIncinerateCounts); - } - public override void Init(BossModule module) - { - base.Init(module); var smallNails = module.Enemies(OID.InfernalNailSmall); var startingNail = smallNails.Closest(Module.Bounds.Center + new WDir(15, 0)); if (startingNail != null) @@ -218,7 +205,7 @@ public override void Init(BossModule module) NailKillOrder.AddRange(module.Enemies(OID.InfernalNailLarge)); } - public override void Update(BossModule module) + public override void Update() { NailKillOrder.RemoveAll(a => a.IsDestroyed || a.IsDead); BossTankRole = OTTankAtIncinerateCounts[IncinerateCount] ? PartyRolesConfig.Assignment.OT : PartyRolesConfig.Assignment.MT; @@ -241,7 +228,7 @@ public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignme { case OID.Boss: e.Priority = 1; // attack only if it's the only thing to do... - UpdateBossTankingProperties(module, e, actor, assignment); + UpdateBossTankingProperties(e, actor, assignment); if (nextNail.Position.InCone(e.Actor.Position, e.DesiredRotation, Incinerate.CleaveShape.HalfAngle)) { var bossToNail = Angle.FromDirection(nextNail.Position - e.Actor.Position); @@ -261,7 +248,7 @@ public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignme // position hints if (IsEruptionBaiter(slot)) { - AddDefaultEruptionBaiterHints(module, hints); + AddDefaultEruptionBaiterHints(hints); } else if (Module.PrimaryActor.TargetID != actor.InstanceID) { @@ -300,7 +287,7 @@ public override void DrawArenaForeground(int pcSlot, Actor pc) base.DrawArenaForeground(pcSlot, pc); var nextNail = NailKillOrder.FirstOrDefault(); if (nextNail != null) - arena.AddCircle(nextNail.Position, 2, ArenaColor.Safe); + Arena.AddCircle(nextNail.Position, 2, ArenaColor.Safe); } private (float, float) NailDirDist(WDir offset, Angle startingDir) @@ -312,10 +299,8 @@ public override void DrawArenaForeground(int pcSlot, Actor pc) } } -class Ex4IfritAINails1 : Ex4IfritAINails +class Ex4IfritAINails1(BossModule module) : Ex4IfritAINails(module, 1, 0x8) { - public Ex4IfritAINails1() : base(1, 0x8) { } - public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { base.AddAIHints(slot, actor, assignment, hints); @@ -328,10 +313,8 @@ public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignme } } -class Ex4IfritAINails2 : Ex4IfritAINails +class Ex4IfritAINails2(BossModule module) : Ex4IfritAINails(module, 4, 0x7) { - public Ex4IfritAINails2() : base(4, 0x7) { } - public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { base.AddAIHints(slot, actor, assignment, hints); @@ -344,10 +327,8 @@ public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignme } } -class Ex4IfritAINails3 : Ex4IfritAINails +class Ex4IfritAINails3(BossModule module) : Ex4IfritAINails(module, 7, 0x3C70) { - public Ex4IfritAINails3() : base(7, 0x3C70) { } - public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { base.AddAIHints(slot, actor, assignment, hints); @@ -371,7 +352,7 @@ class Ex4IfritAIHellfire : Ex4IfritAICommon { private WDir _safespotOffset; - public Ex4IfritAIHellfire(Angle safeSpotDir, PartyRolesConfig.Assignment tankRole) + public Ex4IfritAIHellfire(BossModule module, Angle safeSpotDir, PartyRolesConfig.Assignment tankRole) : base(module) { _safespotOffset = 18 * safeSpotDir.ToDirection(); BossTankRole = tankRole; @@ -405,7 +386,7 @@ public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignme public override void DrawArenaForeground(int pcSlot, Actor pc) { - arena.AddCircle(Module.Bounds.Center + _safespotOffset, 2, ArenaColor.Safe); + Arena.AddCircle(Module.Bounds.Center + _safespotOffset, 2, ArenaColor.Safe); } } class Ex4IfritAIHellfire1(BossModule module) : Ex4IfritAIHellfire(module, 150.Degrees(), PartyRolesConfig.Assignment.MT); diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/Ex4IfritStates.cs b/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/Ex4IfritStates.cs index 2736ae7d0e..4a6090b165 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/Ex4IfritStates.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/Ex4IfritStates.cs @@ -31,8 +31,8 @@ private void SinglePhase(uint id) } private void NailsSubphase(uint id, string name, bool withFetters, bool startWithOT, float nailEnrage) - where AINails : Ex4IfritAINails, new() - where AIHellfire : Ex4IfritAIHellfire, new() + where AINails : Ex4IfritAINails + where AIHellfire : Ex4IfritAIHellfire { Condition(id, 1000, () => _module.SmallNails.Any(a => a.IsTargetable && !a.IsDead), name) .ActivateOnEnter() diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/Hellfire.cs b/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/Hellfire.cs index 04370a29db..549e50a5c5 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/Hellfire.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/Hellfire.cs @@ -1,13 +1,8 @@ namespace BossMod.RealmReborn.Extreme.Ex4Ifrit; -class Hellfire : BossComponent +class Hellfire(BossModule module) : BossComponent(module) { - private DateTime _expectedRaidwide; - - public override void Init(BossModule module) - { - _expectedRaidwide = module.StateMachine.NextTransitionWithFlag(StateMachine.StateHint.Raidwide); - } + private DateTime _expectedRaidwide = module.StateMachine.NextTransitionWithFlag(StateMachine.StateHint.Raidwide); public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/InfernalFetters.cs b/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/InfernalFetters.cs index 219a807d96..c8edf5f2fc 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/InfernalFetters.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/InfernalFetters.cs @@ -1,6 +1,6 @@ namespace BossMod.RealmReborn.Extreme.Ex4Ifrit; -class InfernalFetters : BossComponent +class InfernalFetters(BossModule module) : BossComponent(module) { public BitMask Fetters; private int _fettersStrength; @@ -15,10 +15,7 @@ public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignme } } - public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) - { - return Fetters[playerSlot] ? PlayerPriority.Normal : PlayerPriority.Irrelevant; - } + public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) => Fetters[playerSlot] ? PlayerPriority.Normal : PlayerPriority.Irrelevant; public override void DrawArenaForeground(int pcSlot, Actor pc) { @@ -27,7 +24,7 @@ public override void DrawArenaForeground(int pcSlot, Actor pc) var from = Raid[Fetters.LowestSetBit()]; var to = Raid[Fetters.HighestSetBit()]; if (from != null && to != null) - arena.AddLine(from.Position, to.Position, _fettersStrength > 1 ? ArenaColor.Danger : ArenaColor.Safe); + Arena.AddLine(from.Position, to.Position, _fettersStrength > 1 ? ArenaColor.Danger : ArenaColor.Safe); } } diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/SearingWind.cs b/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/SearingWind.cs index 15524721f6..1574dd67f2 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/SearingWind.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex4Ifrit/SearingWind.cs @@ -9,7 +9,7 @@ class SearingWind : Components.UniformStackSpread private int _searingWindsLeft; private DateTime _showHintsAfter = DateTime.MaxValue; - public SearingWind() : base(0, 14) + public SearingWind(BossModule module) : base(module, 0, 14) { KeepOnPhaseChange = true; } diff --git a/BossMod/Modules/RealmReborn/Raid/T01Caduceus/Platforms.cs b/BossMod/Modules/RealmReborn/Raid/T01Caduceus/Platforms.cs index 8350060fd2..2d9f1b670e 100644 --- a/BossMod/Modules/RealmReborn/Raid/T01Caduceus/Platforms.cs +++ b/BossMod/Modules/RealmReborn/Raid/T01Caduceus/Platforms.cs @@ -1,7 +1,7 @@ namespace BossMod.RealmReborn.Raid.T01Caduceus; // we have 12 hexagonal platforms and 1 octagonal; sorted S to N, then E to W - so entrance platform has index 0, octagonal (NW) platform has index 12 -class Platforms : BossComponent +class Platforms(BossModule module) : BossComponent(module) { public const float HexaPlatformSide = 9; public const float OctaPlatformLong = 13; @@ -114,12 +114,12 @@ public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignme public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (int i in (ActivePlatforms ^ AllPlatforms).SetBits()) - arena.AddPolygon(PlatformPoly(i), ArenaColor.Border); + Arena.AddPolygon(PlatformPoly(i), ArenaColor.Border); foreach (int i in ActivePlatforms.SetBits()) - arena.AddPolygon(PlatformPoly(i), ArenaColor.Enemy); + Arena.AddPolygon(PlatformPoly(i), ArenaColor.Enemy); } - public override void OnActorEState(BossModule module, Actor actor, ushort state) + public override void OnActorEState(Actor actor, ushort state) { if (actor.OID == (uint)OID.Platform) { diff --git a/BossMod/Modules/RealmReborn/Raid/T01Caduceus/T01ADS.cs b/BossMod/Modules/RealmReborn/Raid/T01Caduceus/T01ADS.cs index 0236a5a7d7..c35e415367 100644 --- a/BossMod/Modules/RealmReborn/Raid/T01Caduceus/T01ADS.cs +++ b/BossMod/Modules/RealmReborn/Raid/T01Caduceus/T01ADS.cs @@ -25,13 +25,9 @@ public enum AID : uint } class HighVoltage(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.HighVoltage), "Interruptible"); - class RepellingCannons(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RepellingCannons), new AOEShapeCircle(8.3f)); - class PiercingLaser(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PiercingLaser), new AOEShapeRect(32.3f, 3)); - class DirtyCannons(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.DirtyCannons), new AOEShapeCircle(5.15f)); - class GravityField(BossModule module) : Components.PersistentVoidzoneAtCastTarget(module, 6, ActionID.MakeSpell(AID.GravityField), m => m.Enemies(OID.GravityField), 1); // TODO: chain lightning?.. @@ -52,10 +48,8 @@ public T01ADSStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 93, NameID = 1459, SortOrder = 1)] -public class T01ADS : BossModule +public class T01ADS(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsRect(new(-3, 27), 7, 28)) { - public T01ADS(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsRect(new(-3, 27), 7, 28)) { } - public override void CalculateAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { base.CalculateAIHints(slot, actor, assignment, hints); diff --git a/BossMod/Modules/RealmReborn/Raid/T01Caduceus/T01AI.cs b/BossMod/Modules/RealmReborn/Raid/T01Caduceus/T01AI.cs index 875dd2800f..059202f8de 100644 --- a/BossMod/Modules/RealmReborn/Raid/T01Caduceus/T01AI.cs +++ b/BossMod/Modules/RealmReborn/Raid/T01Caduceus/T01AI.cs @@ -1,19 +1,11 @@ namespace BossMod.RealmReborn.Raid.T01Caduceus; -class T01AI : BossComponent +class T01AI(BossModule module) : BossComponent(module) { - private Platforms? _platforms; - private HoodSwing? _hoodSwing; - private CloneMerge? _clone; - private IReadOnlyList _slimes = ActorEnumeration.EmptyList; - - public override void Init(BossModule module) - { - _platforms = module.FindComponent(); - _hoodSwing = module.FindComponent(); - _clone = module.FindComponent(); - _slimes = module.Enemies(OID.DarkMatterSlime); - } + private Platforms? _platforms = module.FindComponent(); + private HoodSwing? _hoodSwing = module.FindComponent(); + private CloneMerge? _clone = module.FindComponent(); + private IReadOnlyList _slimes = module.Enemies(OID.DarkMatterSlime); public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { @@ -29,7 +21,7 @@ public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignme var hpDiff = clone != null ? (int)(clone.HP.Cur - Module.PrimaryActor.HP.Cur) * 100.0f / Module.PrimaryActor.HP.Max : 0; var activePlatforms = _platforms?.ActivePlatforms ?? new BitMask(); - if (module.StateMachine.TimeSincePhaseEnter < 10) + if (Module.StateMachine.TimeSincePhaseEnter < 10) { // do nothing for first few seconds to let MT position the boss } @@ -114,7 +106,7 @@ public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignme e.DesiredPosition = Platforms.HexaPlatformCenters[6]; e.DesiredRotation = -90.Degrees(); } - e.AttackStrength = _hoodSwing!.SecondsUntilNextCast(module) < 3 ? 0.5f : 0.2f; + e.AttackStrength = _hoodSwing!.SecondsUntilNextCast() < 3 ? 0.5f : 0.2f; e.StayAtLongRange = true; } else if ((OID)e.Actor.OID == OID.DarkMatterSlime) diff --git a/BossMod/Modules/RealmReborn/Raid/T01Caduceus/T01Caduceus.cs b/BossMod/Modules/RealmReborn/Raid/T01Caduceus/T01Caduceus.cs index 690ac3efe7..4161334af8 100644 --- a/BossMod/Modules/RealmReborn/Raid/T01Caduceus/T01Caduceus.cs +++ b/BossMod/Modules/RealmReborn/Raid/T01Caduceus/T01Caduceus.cs @@ -30,16 +30,14 @@ public enum SID : uint SteelScales = 349, // Boss->Boss, extra=1-8 (num stacks) } -class HoodSwing : Components.Cleave +class HoodSwing(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.HoodSwing), new AOEShapeCone(11, 60.Degrees()), (uint)OID.Boss) // TODO: verify angle { private DateTime _lastBossCast; // assume boss/add cleaves are synchronized?.. - public float SecondsUntilNextCast(BossModule module) => Math.Max(0, 18 - (float)(WorldState.CurrentTime - _lastBossCast).TotalSeconds); - - public HoodSwing() : base(ActionID.MakeSpell(AID.HoodSwing), new AOEShapeCone(11, 60.Degrees()), (uint)OID.Boss) { } // TODO: verify angle + public float SecondsUntilNextCast() => Math.Max(0, 18 - (float)(WorldState.CurrentTime - _lastBossCast).TotalSeconds); public override void AddGlobalHints(GlobalHints hints) { - hints.Add($"Next cleave in ~{SecondsUntilNextCast(module):f1}s"); + hints.Add($"Next cleave in ~{SecondsUntilNextCast():f1}s"); } public override void OnEventCast(Actor caster, ActorCastEvent spell) @@ -51,13 +49,11 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } class WhipBack(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.WhipBack), new AOEShapeCone(9, 60.Degrees())); - class Regorge(BossModule module) : Components.PersistentVoidzoneAtCastTarget(module, 4, ActionID.MakeSpell(AID.Regorge), m => m.Enemies(OID.Regorge).Where(z => z.EventState != 7), 2.1f); - class Syrup(BossModule module) : Components.PersistentVoidzoneAtCastTarget(module, 4, ActionID.MakeSpell(AID.Syrup), m => m.Enemies(OID.Syrup).Where(z => z.EventState != 7), 0.3f); // TODO: merge happens if bosses are 'close enough' (threshold is >20.82 at least) or have high enough hp difference (>5% at least) and more than 20s passed since split -class CloneMerge : BossComponent +class CloneMerge(BossModule module) : BossComponent(module) { public Actor? Clone { get; private set; } public DateTime CloneSpawnTime { get; private set; } @@ -67,7 +63,7 @@ public override void Update() { if (Clone != null || Module.PrimaryActor.HP.Cur > Module.PrimaryActor.HP.Max / 2) return; - Clone = module.Enemies(OID.Boss).FirstOrDefault(a => a != Module.PrimaryActor); + Clone = Module.Enemies(OID.Boss).FirstOrDefault(a => a != Module.PrimaryActor); if (Clone != null) CloneSpawnTime = WorldState.CurrentTime; } @@ -85,7 +81,7 @@ public override void AddGlobalHints(GlobalHints hints) public override void DrawArenaForeground(int pcSlot, Actor pc) { - arena.Actor(Clone, ArenaColor.Enemy); + Arena.Actor(Clone, ArenaColor.Enemy); } } diff --git a/BossMod/Modules/RealmReborn/Raid/T02MultiADS/AllaganRot.cs b/BossMod/Modules/RealmReborn/Raid/T02MultiADS/AllaganRot.cs index 89c34abfb8..ff61a7e52f 100644 --- a/BossMod/Modules/RealmReborn/Raid/T02MultiADS/AllaganRot.cs +++ b/BossMod/Modules/RealmReborn/Raid/T02MultiADS/AllaganRot.cs @@ -1,7 +1,7 @@ namespace BossMod.RealmReborn.Raid.T02MultiADS; // note: currently we assume that there is max 1 rot being passed around -class AllaganRot : BossComponent +class AllaganRot(BossModule module) : BossComponent(module) { private DateTime[] _rotExpiration = new DateTime[PartyState.MaxPartySize]; private DateTime[] _immunityExpiration = new DateTime[PartyState.MaxPartySize]; @@ -25,16 +25,14 @@ public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignme if (rotHolder == null) return; - if (WantToPickUpRot(module, assignment)) + if (WantToPickUpRot(assignment)) hints.AddForbiddenZone(ShapeDistance.InvertedCircle(rotHolder.Position, _rotPassRadius - 1), _rotExpiration[_rotHolderSlot]); else hints.AddForbiddenZone(ShapeDistance.Circle(rotHolder.Position, _rotPassRadius + 4), _immunityExpiration[slot]); } public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) - { - return _rotHolderSlot == playerSlot ? PlayerPriority.Danger : PlayerPriority.Irrelevant; - } + => _rotHolderSlot == playerSlot ? PlayerPriority.Danger : PlayerPriority.Irrelevant; public override void OnCastStarted(Actor caster, ActorCastInfo spell) { @@ -64,7 +62,7 @@ public override void OnStatusGain(Actor actor, ActorStatus status) } } - private bool WantToPickUpRot(BossModule module, PartyRolesConfig.Assignment assignment) + private bool WantToPickUpRot(PartyRolesConfig.Assignment assignment) { var deadline = _rotExpiration[_rotHolderSlot]; if ((deadline - WorldState.CurrentTime).TotalSeconds > 7) diff --git a/BossMod/Modules/RealmReborn/Raid/T02MultiADS/T02MultiADS.cs b/BossMod/Modules/RealmReborn/Raid/T02MultiADS/T02MultiADS.cs index c18c7c79bc..c2737046ad 100644 --- a/BossMod/Modules/RealmReborn/Raid/T02MultiADS/T02MultiADS.cs +++ b/BossMod/Modules/RealmReborn/Raid/T02MultiADS/T02MultiADS.cs @@ -58,24 +58,16 @@ class CleaveADS(BossModule module) : CleaveCommon(module, AID.CleaveADS, 2.3f); class CleaveNode(BossModule module) : CleaveCommon(module, AID.CleaveNode, 1.15f); class HighVoltage(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.HighVoltage), "Interruptible"); - class RepellingCannons(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RepellingCannons), new AOEShapeCircle(8.3f)); - class PiercingLaser(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PiercingLaser), new AOEShapeRect(32.3f, 3)); - // TODO: chain lightning?.. - class Firestream(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.FirestreamAOE), new AOEShapeRect(35.5f, 3)); - class Ballast1(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.BallastAOE1), new AOEShapeCone(5.5f, 135.Degrees())); - class Ballast2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.BallastAOE2), new AOEShapeDonutSector(5.5f, 10.5f, 135.Degrees())); - class Ballast3(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.BallastAOE3), new AOEShapeDonutSector(10.5f, 15.5f, 135.Degrees())); - class GravityField(BossModule module) : Components.PersistentVoidzoneAtCastTarget(module, 6, ActionID.MakeSpell(AID.GravityField), m => m.Enemies(OID.GravityField), 1); -class T02AI : BossComponent +class T02AI(BossModule module) : BossComponent(module) { public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { @@ -145,9 +137,8 @@ public T02QuarantineNodeStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.QuarantineNode, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 94, NameID = 1468, SortOrder = 2)] -public class T02QuarantineNode : BossModule +public class T02QuarantineNode(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsRect(new(0, 112), 14, 13)) { - public T02QuarantineNode(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsRect(new(0, 112), 14, 13)) { } protected override bool CheckPull() => base.CheckPull() && !Enemies(OID.ADS).Any(e => e.InCombat); // don't start modules for temporary node actors spawned during main boss fight } @@ -165,9 +156,8 @@ public T02AttackNodeStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.AttackNode, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 94, NameID = 1469, SortOrder = 3)] -public class T02AttackNode : BossModule +public class T02AttackNode(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsSquare(new(-44, 94), 17)) { - public T02AttackNode(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsSquare(new(-44, 94), 17)) { } protected override bool CheckPull() => base.CheckPull() && !Enemies(OID.ADS).Any(e => e.InCombat); // don't start modules for temporary node actors spawned during main boss fight } @@ -187,9 +177,8 @@ public T02SanitaryNodeStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.SanitaryNode, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 94, NameID = 1470, SortOrder = 4)] -public class T02SanitaryNode : BossModule +public class T02SanitaryNode(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsRect(new(-43, 52), 18, 15)) { - public T02SanitaryNode(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsRect(new(-43, 52), 18, 15)) { } protected override bool CheckPull() => base.CheckPull() && !Enemies(OID.ADS).Any(e => e.InCombat); // don't start modules for temporary node actors spawned during main boss fight } @@ -206,9 +195,8 @@ public T02MonitoringNodeStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.MonitoringNode, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 94, NameID = 1471, SortOrder = 5)] -public class T02MonitoringNode : BossModule +public class T02MonitoringNode(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsRect(new(0, 39), 17, 15)) { - public T02MonitoringNode(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsRect(new(0, 39), 17, 15)) { } protected override bool CheckPull() => base.CheckPull() && !Enemies(OID.ADS).Any(e => e.InCombat); // don't start modules for temporary node actors spawned during main boss fight } @@ -225,9 +213,8 @@ public T02DefenseNodeStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.DefenseNode, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 94, NameID = 1472, SortOrder = 6)] -public class T02DefenseNode : BossModule +public class T02DefenseNode(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsRect(new(46, 52), 17, 14)) { - public T02DefenseNode(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsRect(new(46, 52), 17, 14)) { } protected override bool CheckPull() => base.CheckPull() && !Enemies(OID.ADS).Any(e => e.InCombat); // don't start modules for temporary node actors spawned during main boss fight } @@ -245,8 +232,7 @@ public T02DisposalNodeStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.DisposalNode, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 94, NameID = 1473, SortOrder = 7)] -public class T02DisposalNode : BossModule +public class T02DisposalNode(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsRect(new(41, 94), 14, 20)) { - public T02DisposalNode(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsRect(new(41, 94), 14, 20)) { } protected override bool CheckPull() => base.CheckPull() && !Enemies(OID.ADS).Any(e => e.InCombat); // don't start modules for temporary node actors spawned during main boss fight } diff --git a/BossMod/Modules/RealmReborn/Raid/T04Gauntlet/T04Gauntlet.cs b/BossMod/Modules/RealmReborn/Raid/T04Gauntlet/T04Gauntlet.cs index 958596c4d1..e0f9c255d2 100644 --- a/BossMod/Modules/RealmReborn/Raid/T04Gauntlet/T04Gauntlet.cs +++ b/BossMod/Modules/RealmReborn/Raid/T04Gauntlet/T04Gauntlet.cs @@ -29,12 +29,10 @@ public enum AID : uint class Rotoswipe(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.Rotoswipe), new AOEShapeCone(11, 60.Degrees()), (uint)OID.ClockworkDreadnaught); // TODO: verify angle -class GravityThrustPox : Components.GenericAOEs +class GravityThrustPox(BossModule module) : Components.GenericAOEs(module, default, "Move behind rook!") { private static readonly AOEShape _shape = new AOEShapeRect(50, 50); - public GravityThrustPox() : base(new(), "Move behind rook!") { } - public override IEnumerable ActiveAOEs(int slot, Actor actor) { foreach (var c in ((T04Gauntlet)module).Rooks.Where(a => a.CastInfo?.TargetID == actor.InstanceID)) diff --git a/BossMod/Modules/RealmReborn/Raid/T05Twintania/Common.cs b/BossMod/Modules/RealmReborn/Raid/T05Twintania/Common.cs index f95b85d67c..d8e4315b92 100644 --- a/BossMod/Modules/RealmReborn/Raid/T05Twintania/Common.cs +++ b/BossMod/Modules/RealmReborn/Raid/T05Twintania/Common.cs @@ -3,11 +3,8 @@ // mechanics used for the whole fight class Plummet : Components.Cleave { - public Plummet() : base(ActionID.MakeSpell(AID.Plummet), new AOEShapeRect(20, 6)) { } // TODO: verify shape - - public override void Init(BossModule module) + public Plummet(BossModule module) : base(module, ActionID.MakeSpell(AID.Plummet), new AOEShapeRect(20, 6)) // TODO: verify shape { - base.Init(module); NextExpected = WorldState.FutureTime(6.5f); } @@ -33,19 +30,12 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) // note: happens every ~36s; various other mechanics can delay it somewhat - it seems that e.g. phase transitions don't affect the running timer... // note: actual hit happens ~0.2s after watched cast end and has different IDs on different phases (P2+ is stronger and inflicts debuff) // TODO: is it true that taunt mid cast makes OT eat debuff? is it true that boss can be single-tanked in p2+? -class DeathSentence : Components.CastCounter +class DeathSentence(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.DeathSentence)) { - public DateTime NextCastStart { get; private set; } + public DateTime NextCastStart { get; private set; } = module.WorldState.FutureTime(18); public bool TankedByOT { get; private set; } public PartyRolesConfig.Assignment TankRole => TankedByOT ? PartyRolesConfig.Assignment.OT : PartyRolesConfig.Assignment.MT; - public DeathSentence() : base(ActionID.MakeSpell(AID.DeathSentence)) { } - - public override void Init(BossModule module) - { - NextCastStart = WorldState.FutureTime(18); - } - public override void AddGlobalHints(GlobalHints hints) { hints.Add($"Next death sentence in ~{(NextCastStart - WorldState.CurrentTime).TotalSeconds:f1}s"); diff --git a/BossMod/Modules/RealmReborn/Raid/T05Twintania/Phase1.cs b/BossMod/Modules/RealmReborn/Raid/T05Twintania/Phase1.cs index 5027f6c3b5..fd01e39ee1 100644 --- a/BossMod/Modules/RealmReborn/Raid/T05Twintania/Phase1.cs +++ b/BossMod/Modules/RealmReborn/Raid/T05Twintania/Phase1.cs @@ -6,7 +6,7 @@ class P1LiquidHellAdds(BossModule module) : Components.PersistentVoidzoneAtCastT // after divebombs (P4), boss reappears at (-6.67, 5) - it is a good idea to drop two neurolinks at melee range to keep uptime // otherwise it's a simple phase - kill adds, then move near boss and focus it // we let plummet & death sentence module handle tanking and healing hints, since they are common to multiple phases -class P1AI : BossComponent +class P1AI(BossModule module) : BossComponent(module) { public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { diff --git a/BossMod/Modules/RealmReborn/Raid/T05Twintania/Phase2.cs b/BossMod/Modules/RealmReborn/Raid/T05Twintania/Phase2.cs index cca4dcef8e..47d77483a6 100644 --- a/BossMod/Modules/RealmReborn/Raid/T05Twintania/Phase2.cs +++ b/BossMod/Modules/RealmReborn/Raid/T05Twintania/Phase2.cs @@ -1,19 +1,14 @@ namespace BossMod.RealmReborn.Raid.T05Twintania; // P2 mechanics -class P2Fireball : BossComponent +class P2Fireball(BossModule module) : BossComponent(module) { public Actor? Target { get; private set; } public DateTime ExplosionAt { get; private set; } - public DateTime NextAt { get; private set; } + public DateTime NextAt { get; private set; } = module.WorldState.FutureTime(7.5f); public const float Radius = 4; - public override void Init(BossModule module) - { - NextAt = WorldState.FutureTime(7.5f); - } - public override void AddGlobalHints(GlobalHints hints) { if (Target == null) @@ -23,7 +18,7 @@ public override void AddGlobalHints(GlobalHints hints) public override void DrawArenaForeground(int pcSlot, Actor pc) { if (Target != null) - arena.AddCircle(Target.Position, Radius, ArenaColor.Safe); + Arena.AddCircle(Target.Position, Radius, ArenaColor.Safe); } public override void OnEventCast(Actor caster, ActorCastEvent spell) @@ -42,16 +37,11 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } } -class P2Conflagrate : BossComponent +class P2Conflagrate(BossModule module) : BossComponent(module) { public Actor? Target { get; private set; } public DateTime FettersAt { get; private set; } - public DateTime NextAt { get; private set; } - - public override void Init(BossModule module) - { - NextAt = WorldState.FutureTime(29); - } + public DateTime NextAt { get; private set; } = module.WorldState.FutureTime(29); public override void AddGlobalHints(GlobalHints hints) { @@ -78,18 +68,11 @@ public override void OnStatusGain(Actor actor, ActorStatus status) } } -class P2AI : BossComponent +class P2AI(BossModule module) : BossComponent(module) { - private DeathSentence? _deathSentence; - private P2Fireball? _fireball; - private P2Conflagrate? _conflagrate; - - public override void Init(BossModule module) - { - _deathSentence = module.FindComponent(); - _fireball = module.FindComponent(); - _conflagrate = module.FindComponent(); - } + private DeathSentence? _deathSentence = module.FindComponent(); + private P2Fireball? _fireball = module.FindComponent(); + private P2Conflagrate? _conflagrate = module.FindComponent(); public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { diff --git a/BossMod/Modules/RealmReborn/Raid/T05Twintania/Phase3.cs b/BossMod/Modules/RealmReborn/Raid/T05Twintania/Phase3.cs index 52a355a3e8..8ec7fc3c89 100644 --- a/BossMod/Modules/RealmReborn/Raid/T05Twintania/Phase3.cs +++ b/BossMod/Modules/RealmReborn/Raid/T05Twintania/Phase3.cs @@ -2,7 +2,7 @@ // P3 mechanics // TODO: preposition for divebombs? it seems that boss spawns in one of the fixed spots that is closest to target... -class P3Divebomb : Components.GenericAOEs +class P3Divebomb(BossModule module) : Components.GenericAOEs(module) { public WPos? Target { get; private set; } public DateTime HitAt { get; private set; } @@ -36,20 +36,14 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } } -class P3Adds : BossComponent +class P3Adds(BossModule module) : BossComponent(module) { - private IReadOnlyList _hygieia = ActorEnumeration.EmptyList; - public IReadOnlyList Asclepius { get; private set; } = ActorEnumeration.EmptyList; + private IReadOnlyList _hygieia = module.Enemies(OID.Hygieia); + public IReadOnlyList Asclepius { get; private set; } = module.Enemies(OID.Asclepius); public IEnumerable ActiveHygieia => _hygieia.Where(a => !a.IsDead); private const float _explosionRadius = 8; - public override void Init(BossModule module) - { - _hygieia = module.Enemies(OID.Hygieia); - Asclepius = module.Enemies(OID.Asclepius); - } - public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { var nextHygieia = ActiveHygieia.MinBy(a => a.InstanceID); // select next add to kill by lowest hp @@ -97,21 +91,14 @@ public override void DrawArenaForeground(int pcSlot, Actor pc) } } -class P3AethericProfusion : Components.CastCounter +class P3AethericProfusion(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.AethericProfusion)) { - private DateTime _activation; - - public P3AethericProfusion() : base(ActionID.MakeSpell(AID.AethericProfusion)) { } - - public override void Init(BossModule module) - { - _activation = WorldState.FutureTime(6.7f); - } + private DateTime _activation = module.WorldState.FutureTime(6.7f); public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { // select neurolinks to stand at; let everyone except MT stay in one closer to boss - var neurolinks = module.Enemies(OID.Neurolink); + var neurolinks = Module.Enemies(OID.Neurolink); var closerNeurolink = neurolinks.Closest(Module.PrimaryActor.Position); foreach (var neurolink in neurolinks) { @@ -134,7 +121,7 @@ public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignme public override void DrawArenaForeground(int pcSlot, Actor pc) { - foreach (var neurolink in module.Enemies(OID.Neurolink)) - arena.AddCircle(neurolink.Position, T05Twintania.NeurolinkRadius, ArenaColor.Safe); + foreach (var neurolink in Module.Enemies(OID.Neurolink)) + Arena.AddCircle(neurolink.Position, T05Twintania.NeurolinkRadius, ArenaColor.Safe); } } diff --git a/BossMod/Modules/RealmReborn/Raid/T05Twintania/Phase4.cs b/BossMod/Modules/RealmReborn/Raid/T05Twintania/Phase4.cs index c391cd0407..d48fe54880 100644 --- a/BossMod/Modules/RealmReborn/Raid/T05Twintania/Phase4.cs +++ b/BossMod/Modules/RealmReborn/Raid/T05Twintania/Phase4.cs @@ -1,9 +1,9 @@ namespace BossMod.RealmReborn.Raid.T05Twintania; // P4 mechanics -class P4Twisters : BossComponent +class P4Twisters(BossModule module) : BossComponent(module) { - private IReadOnlyList _twisters = ActorEnumeration.EmptyList; + private IReadOnlyList _twisters = module.Enemies(OID.Twister); private List _predictedPositions = new(); private IEnumerable ActiveTwisters => _twisters.Where(t => t.EventState != 7); @@ -11,11 +11,6 @@ class P4Twisters : BossComponent private const float PredictAvoidRadius = 2; // 5 private const float TwisterCushion = 1; // 1 - public override void Init(BossModule module) - { - _twisters = module.Enemies(OID.Twister); - } - public override void Update() { if (_predictedPositions.Count == 0 && (Module.PrimaryActor.CastInfo?.IsSpell(AID.Twister) ?? false) && (Module.PrimaryActor.CastInfo.NPCFinishAt - WorldState.CurrentTime).TotalSeconds <= PredictBeforeCastFinish) @@ -41,21 +36,16 @@ public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignme public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (var twister in ActiveTwisters) - arena.AddCircle(twister.Position, twister.HitboxRadius, ArenaColor.Danger); + Arena.AddCircle(twister.Position, twister.HitboxRadius, ArenaColor.Danger); } } -class P4Dreadknights : BossComponent +class P4Dreadknights(BossModule module) : BossComponent(module) { private Actor? _target; - private IReadOnlyList _dreadknights = ActorEnumeration.EmptyList; + private IReadOnlyList _dreadknights = module.Enemies(OID.Dreadknight); public IEnumerable ActiveDreadknights => _dreadknights.Where(a => !a.IsDead); - public override void Init(BossModule module) - { - _dreadknights = module.Enemies(OID.Dreadknight); - } - public override void Update() { if (!ActiveDreadknights.Any()) @@ -88,9 +78,9 @@ public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (var a in ActiveDreadknights) { - arena.Actor(a, ArenaColor.Enemy); + Arena.Actor(a, ArenaColor.Enemy); if (_target != null) - arena.AddLine(a.Position, _target.Position, ArenaColor.Danger); + Arena.AddLine(a.Position, _target.Position, ArenaColor.Danger); } } @@ -101,14 +91,9 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } } -class P4AI : BossComponent +class P4AI(BossModule module) : BossComponent(module) { - private DeathSentence? _deathSentence; - - public override void Init(BossModule module) - { - _deathSentence = module.FindComponent(); - } + private DeathSentence? _deathSentence = module.FindComponent(); public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { diff --git a/BossMod/Modules/RealmReborn/Raid/T05Twintania/Phase5.cs b/BossMod/Modules/RealmReborn/Raid/T05Twintania/Phase5.cs index 5d3d3d259c..992ceb9614 100644 --- a/BossMod/Modules/RealmReborn/Raid/T05Twintania/Phase5.cs +++ b/BossMod/Modules/RealmReborn/Raid/T05Twintania/Phase5.cs @@ -1,12 +1,10 @@ namespace BossMod.RealmReborn.Raid.T05Twintania; // what happens here is marker appears -> 5 liquid hells drop at (0.6 + 1.7*N)s; each liquid hell cast does small damage and spawns voidzone 1.2s later -class P5LiquidHell : Components.PersistentVoidzoneAtCastTarget +class P5LiquidHell(BossModule module) : Components.PersistentVoidzoneAtCastTarget(module, 6, ActionID.MakeSpell(AID.LiquidHellBoss), m => m.Enemies(OID.LiquidHell).Where(z => z.EventState != 7), 1.5f) { public Actor? Target { get; private set; } - public P5LiquidHell() : base(6, ActionID.MakeSpell(AID.LiquidHellBoss), m => m.Enemies(OID.LiquidHell).Where(z => z.EventState != 7), 1.5f) { } - public override void OnEventCast(Actor caster, ActorCastEvent spell) { base.OnEventCast(caster, spell); @@ -23,17 +21,11 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } } -class P5Hatch : BossComponent +class P5Hatch(BossModule module) : BossComponent(module) { public Actor? Target { get; private set; } - public IReadOnlyList Orbs { get; private set; } = ActorEnumeration.EmptyList; - public IReadOnlyList Neurolinks { get; private set; } = ActorEnumeration.EmptyList; - - public override void Init(BossModule module) - { - Orbs = module.Enemies(OID.Oviform); - Neurolinks = module.Enemies(OID.Neurolink); - } + public IReadOnlyList Orbs { get; private set; } = module.Enemies(OID.Oviform); + public IReadOnlyList Neurolinks { get; private set; } = module.Enemies(OID.Neurolink); public override void AddHints(int slot, Actor actor, TextHints hints) { @@ -50,9 +42,9 @@ public override void DrawArenaForeground(int pcSlot, Actor pc) { if (Target != null) foreach (var orb in Orbs) - arena.AddLine(orb.Position, Target.Position, ArenaColor.Danger); + Arena.AddLine(orb.Position, Target.Position, ArenaColor.Danger); foreach (var neurolink in Neurolinks) - arena.AddCircle(neurolink.Position, T05Twintania.NeurolinkRadius, Target == pc ? ArenaColor.Safe : ArenaColor.Danger); + Arena.AddCircle(neurolink.Position, T05Twintania.NeurolinkRadius, Target == pc ? ArenaColor.Safe : ArenaColor.Danger); } public override void OnEventCast(Actor caster, ActorCastEvent spell) @@ -69,18 +61,11 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } } -class P5AI : BossComponent +class P5AI(BossModule module) : BossComponent(module) { - private DeathSentence? _deathSentence; - private P5LiquidHell? _liquidHell; - private P5Hatch? _hatch; - - public override void Init(BossModule module) - { - _deathSentence = module.FindComponent(); - _liquidHell = module.FindComponent(); - _hatch = module.FindComponent(); - } + private DeathSentence? _deathSentence = module.FindComponent(); + private P5LiquidHell? _liquidHell = module.FindComponent(); + private P5Hatch? _hatch = module.FindComponent(); public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { @@ -105,7 +90,7 @@ public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignme else if (assignment == ((_deathSentence?.TankedByOT ?? false) ? PartyRolesConfig.Assignment.MT : PartyRolesConfig.Assignment.OT) && neurolinkUnderBoss != null && actor != _liquidHell?.Target) { // current offtank should try to intercept orb by standing in a neurolink under boss, unless it is covered by liquid hells or tank is baiting liquid hells away - bool neurolinkUnsafe = _liquidHell != null && _liquidHell.Sources(module).Any(z => neurolinkUnderBoss.Position.InCircle(z.Position, _liquidHell.Shape.Radius)); + bool neurolinkUnsafe = _liquidHell != null && _liquidHell.Sources(Module).Any(z => neurolinkUnderBoss.Position.InCircle(z.Position, _liquidHell.Shape.Radius)); if (!neurolinkUnsafe) { forbidNeurolinks = false; diff --git a/BossMod/Modules/RealmReborn/Trial/T01IfritN/T01IfritN.cs b/BossMod/Modules/RealmReborn/Trial/T01IfritN/T01IfritN.cs index 32076ec6e1..3505fcdebb 100644 --- a/BossMod/Modules/RealmReborn/Trial/T01IfritN/T01IfritN.cs +++ b/BossMod/Modules/RealmReborn/Trial/T01IfritN/T01IfritN.cs @@ -19,13 +19,13 @@ public enum AID : uint RadiantPlumeAOE = 734, // Helper->location, 3.0s cast, range 8 aoe } -class Hints : BossComponent +class Hints(BossModule module) : BossComponent(module) { private DateTime _nailSpawn; public override void AddGlobalHints(GlobalHints hints) { - var nail = module.Enemies(OID.InfernalNail).FirstOrDefault(); + var nail = Module.Enemies(OID.InfernalNail).FirstOrDefault(); if (_nailSpawn == default && nail != null && nail.IsTargetable) { _nailSpawn = WorldState.CurrentTime; @@ -38,9 +38,7 @@ public override void AddGlobalHints(GlobalHints hints) } class Incinerate(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.Incinerate), new AOEShapeCone(16, 60.Degrees())); // TODO: verify angle - class Eruption(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.EruptionAOE), 8); - class RadiantPlume(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.RadiantPlumeAOE), 8); class T01IfritNStates : StateMachineBuilder diff --git a/BossMod/Modules/RealmReborn/Trial/T02TitanN/T02TitanN.cs b/BossMod/Modules/RealmReborn/Trial/T02TitanN/T02TitanN.cs index 64bdddc101..d9584dce47 100644 --- a/BossMod/Modules/RealmReborn/Trial/T02TitanN/T02TitanN.cs +++ b/BossMod/Modules/RealmReborn/Trial/T02TitanN/T02TitanN.cs @@ -22,13 +22,13 @@ public enum AID : uint WeightOfTheLandAOE = 973, // Helper->location, 3.5s cast, range 6 puddle } -class Hints : BossComponent +class Hints(BossModule module) : BossComponent(module) { private DateTime _heartSpawn; public override void AddGlobalHints(GlobalHints hints) { - var heartExists = ((T02TitanN)module).ActiveHeart.Any(); + var heartExists = ((T02TitanN)Module).ActiveHeart.Any(); if (_heartSpawn == default && heartExists) { _heartSpawn = WorldState.CurrentTime; @@ -41,11 +41,8 @@ public override void AddGlobalHints(GlobalHints hints) } class RockBuster(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.RockBuster), new AOEShapeCone(11.25f, 60.Degrees())); // TODO: verify angle - class Geocrush(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Geocrush), new AOEShapeCircle(18)); // TODO: verify falloff - class Landslide(BossModule module) : Components.SelfTargetedLegacyRotationAOEs(module, ActionID.MakeSpell(AID.Landslide), new AOEShapeRect(40, 3)); - class WeightOfTheLand(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.WeightOfTheLandAOE), 6); class T02TitanNStates : StateMachineBuilder diff --git a/BossMod/Modules/RealmReborn/Trial/T03GarudaN/T03GarudaN.cs b/BossMod/Modules/RealmReborn/Trial/T03GarudaN/T03GarudaN.cs index 8368551aad..a5b9077192 100644 --- a/BossMod/Modules/RealmReborn/Trial/T03GarudaN/T03GarudaN.cs +++ b/BossMod/Modules/RealmReborn/Trial/T03GarudaN/T03GarudaN.cs @@ -25,33 +25,29 @@ public enum AID : uint } // disallow clipping monoliths -class Friction : BossComponent +class Friction(BossModule module) : BossComponent(module) { public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { if (Module.PrimaryActor.CastInfo == null) // don't forbid standing near monoliths while boss is casting to allow avoiding aoes - foreach (var m in module.Enemies(OID.Monolith)) + foreach (var m in Module.Enemies(OID.Monolith)) hints.AddForbiddenZone(ShapeDistance.Circle(m.Position, 5)); } } class Downburst(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.Downburst), new AOEShapeCone(11.7f, 60.Degrees())); - class Slipstream(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Slipstream), new AOEShapeCone(11.7f, 45.Degrees())); -class MistralSongP1 : Components.CastLineOfSightAOE +class MistralSongP1(BossModule module) : Components.CastLineOfSightAOE(module, ActionID.MakeSpell(AID.MistralSongP1), 31.7f, true) { - public MistralSongP1() : base(ActionID.MakeSpell(AID.MistralSongP1), 31.7f, true) { } - public override IEnumerable BlockerActors(BossModule module) => module.Enemies(OID.Monolith); + public override IEnumerable BlockerActors() => Module.Enemies(OID.Monolith); } // actual casts happen every ~6s after aerial blast cast -class EyeOfTheStorm : Components.GenericAOEs +class EyeOfTheStorm(BossModule module) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.AerialBlast)) { private AOEShapeDonut _shape = new(12, 25); - public EyeOfTheStorm() : base(ActionID.MakeSpell(AID.AerialBlast)) { } - public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (NumCasts > 0) @@ -61,7 +57,6 @@ public override IEnumerable ActiveAOEs(int slot, Actor actor) } class MistralSongP2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.MistralSongP2), new AOEShapeCone(31.7f, 60.Degrees())); - class MistralShriek(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.MistralShriek), new AOEShapeCircle(24.7f)); class T03GarudaNStates : StateMachineBuilder diff --git a/BossMod/Modules/RealmReborn/Trial/T04PortaDecumana/T04PortaDecumana1.cs b/BossMod/Modules/RealmReborn/Trial/T04PortaDecumana/T04PortaDecumana1.cs index ca393b8c85..92adfdfa0b 100644 --- a/BossMod/Modules/RealmReborn/Trial/T04PortaDecumana/T04PortaDecumana1.cs +++ b/BossMod/Modules/RealmReborn/Trial/T04PortaDecumana/T04PortaDecumana1.cs @@ -51,29 +51,18 @@ public enum SID : uint } class EarthenFury(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.EarthenFuryAOE)); - class Geocrush(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Geocrush), new AOEShapeCircle(25)); // TODO: verify falloff... - class Landslide1(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Landslide1), new AOEShapeRect(40, 3)); - class Landslide2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Landslide2), new AOEShapeRect(40, 3)); - class WeightOfTheLand(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.WeightOfTheLand), new AOEShapeCircle(6)); - class AerialBlast(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.AerialBlastAOE)); - class EyeOfTheStorm(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.EyeOfTheStormAOE), new AOEShapeDonut(12.5f, 25)); - class MistralShriek(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.MistralShriek), new AOEShapeCircle(23)); - class Hellfire(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.HellfireAOE)); - class RadiantPlume(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RadiantPlumeAOE), new AOEShapeCircle(8)); -class VulcanBurst : Components.KnockbackFromCastTarget +class VulcanBurst(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.VulcanBurst), 15) { - public VulcanBurst() : base(ActionID.MakeSpell(AID.VulcanBurst), 15) { } - public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { if (Casters.Count > 0) @@ -101,10 +90,8 @@ public T04PortaDecumana1States(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 830, NameID = 2137, SortOrder = 1)] -public class T04PortaDecumana1 : BossModule +public class T04PortaDecumana1(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(-772, -600), 20)) { - public T04PortaDecumana1(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(-772, -600), 20)) { } - public override void CalculateAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { base.CalculateAIHints(slot, actor, assignment, hints); diff --git a/BossMod/Modules/RealmReborn/Trial/T04PortaDecumana/T04PortaDecumana2.cs b/BossMod/Modules/RealmReborn/Trial/T04PortaDecumana/T04PortaDecumana2.cs index 7242b8b959..a151c2e861 100644 --- a/BossMod/Modules/RealmReborn/Trial/T04PortaDecumana/T04PortaDecumana2.cs +++ b/BossMod/Modules/RealmReborn/Trial/T04PortaDecumana/T04PortaDecumana2.cs @@ -42,22 +42,16 @@ public enum AID : uint } class TankPurge(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.TankPurge)); - class HomingLasers(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.HomingLasers)); - class MagitekRayF(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.MagitekRayAOEForward), new AOEShapeRect(40, 3)); - class MagitekRayR(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.MagitekRayAOERight), new AOEShapeRect(40, 3)); - class MagitekRayL(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.MagitekRayAOELeft), new AOEShapeRect(40, 3)); - class HomingRay(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.HomingRayAOE), 6); - class LaserFocus(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.LaserFocusAOE), 6); class AethericBoom : Components.KnockbackFromCastTarget { - public AethericBoom() : base(ActionID.MakeSpell(AID.AethericBoom), 30) + public AethericBoom(BossModule module) : base(module, ActionID.MakeSpell(AID.AethericBoom), 30) { StopAtWall = true; } @@ -78,17 +72,12 @@ public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignme } } -class Aetheroplasm : BossComponent +class Aetheroplasm(BossModule module) : BossComponent(module) { - private IReadOnlyList _orbs = ActorEnumeration.EmptyList; + private IReadOnlyList _orbs = module.Enemies(OID.Aetheroplasm); public IEnumerable ActiveOrbs => _orbs.Where(orb => !orb.IsDead); - public override void Init(BossModule module) - { - _orbs = module.Enemies(OID.Aetheroplasm); - } - public override void AddGlobalHints(GlobalHints hints) { if (ActiveOrbs.Any()) @@ -108,22 +97,19 @@ public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignme public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (var orb in ActiveOrbs) - arena.AddCircle(orb.Position, 1.4f, ArenaColor.Safe); + Arena.AddCircle(orb.Position, 1.4f, ArenaColor.Safe); } } class AssaultCannon(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.AssaultCannon), new AOEShapeRect(40, 2)); - class CitadelBuster(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.CitadelBuster), new AOEShapeRect(40, 6)); -class Explosion : Components.SelfTargetedAOEs +class Explosion(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Explosion), new AOEShapeCircle(16)) // TODO: verify falloff { - public Explosion() : base(ActionID.MakeSpell(AID.Explosion), new AOEShapeCircle(16)) { } // TODO: verify falloff - // there is an overlap with another mechanic which has to be resolved first public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { - if (module.FindComponent()!.Casters.Count == 0) + if (Module.FindComponent()!.Casters.Count == 0) base.AddAIHints(slot, actor, assignment, hints); } } @@ -152,9 +138,8 @@ public T04PortaDecumana2States(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 830, NameID = 2137, SortOrder = 2)] -public class T04PortaDecumana2 : BossModule +public class T04PortaDecumana2(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(-704, 480), 20)) { - public T04PortaDecumana2(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(-704, 480), 20)) { } protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy, true); diff --git a/BossMod/Modules/RealmReborn/Trial/T05IfritH/T05IfritH.cs b/BossMod/Modules/RealmReborn/Trial/T05IfritH/T05IfritH.cs index d3ba7fabbe..70ce8d7de8 100644 --- a/BossMod/Modules/RealmReborn/Trial/T05IfritH/T05IfritH.cs +++ b/BossMod/Modules/RealmReborn/Trial/T05IfritH/T05IfritH.cs @@ -21,13 +21,13 @@ public enum AID : uint Hellfire = 1357, // Boss->self, 2.0s cast, infernal nail 'enrage' (raidwide if killed) } -class Hints : BossComponent +class Hints(BossModule module) : BossComponent(module) { private DateTime _nailSpawn; public override void AddGlobalHints(GlobalHints hints) { - bool nailsActive = ((T05IfritH)module).ActiveNails.Any(); + bool nailsActive = ((T05IfritH)Module).ActiveNails.Any(); if (_nailSpawn == default && nailsActive) { _nailSpawn = WorldState.CurrentTime; @@ -40,17 +40,14 @@ public override void AddGlobalHints(GlobalHints hints) } class Incinerate(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.Incinerate), new AOEShapeCone(15, 60.Degrees())); - class Eruption(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.EruptionAOE), 8); -class CrimsonCyclone : Components.GenericAOEs +class CrimsonCyclone(BossModule module) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.CrimsonCyclone)) { private List _casters = new(); private static readonly AOEShape _shape = new AOEShapeRect(43, 6); - public CrimsonCyclone() : base(ActionID.MakeSpell(AID.CrimsonCyclone)) { } - public override IEnumerable ActiveAOEs(int slot, Actor actor) { return _casters.Select(c => new AOEInstance(_shape, c.Position, c.CastInfo?.Rotation ?? c.Rotation, c.CastInfo?.NPCFinishAt ?? WorldState.FutureTime(4))); diff --git a/BossMod/Modules/RealmReborn/Trial/T06GarudaH/T06GarudaH.cs b/BossMod/Modules/RealmReborn/Trial/T06GarudaH/T06GarudaH.cs index d32f95aaa7..5e16f526ce 100644 --- a/BossMod/Modules/RealmReborn/Trial/T06GarudaH/T06GarudaH.cs +++ b/BossMod/Modules/RealmReborn/Trial/T06GarudaH/T06GarudaH.cs @@ -39,36 +39,31 @@ public enum TetherID : uint } // disallow clipping monoliths -class Friction : BossComponent +class Friction(BossModule module) : BossComponent(module) { public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { if (Module.PrimaryActor.CastInfo == null) // don't forbid standing near monoliths while boss is casting to allow avoiding aoes - foreach (var m in ((T06GarudaH)module).ActiveMonoliths) + foreach (var m in ((T06GarudaH)Module).ActiveMonoliths) hints.AddForbiddenZone(ShapeDistance.Circle(m.Position, 5)); } } class Downburst(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.Downburst), new AOEShapeCone(11.7f, 60.Degrees())); - class Slipstream(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Slipstream), new AOEShapeCone(11.7f, 45.Degrees())); -class MistralShriek : Components.CastLineOfSightAOE +class MistralShriek(BossModule module) : Components.CastLineOfSightAOE(module, ActionID.MakeSpell(AID.MistralShriek), 24.7f, true) { - public MistralShriek() : base(ActionID.MakeSpell(AID.MistralShriek), 24.7f, true) { } - public override IEnumerable BlockerActors(BossModule module) => ((T06GarudaH)module).ActiveMonoliths; + public override IEnumerable BlockerActors() => ((T06GarudaH)Module).ActiveMonoliths; } -class MistralSong : Components.CastLineOfSightAOE +class MistralSong(BossModule module) : Components.CastLineOfSightAOE(module, ActionID.MakeSpell(AID.MistralSong), 31.7f, true) { - public MistralSong() : base(ActionID.MakeSpell(AID.MistralSong), 31.7f, true) { } - public override IEnumerable BlockerActors(BossModule module) => ((T06GarudaH)module).ActiveMonoliths; + public override IEnumerable BlockerActors() => ((T06GarudaH)Module).ActiveMonoliths; } class AerialBlast(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.AerialBlast)); - class GreatWhirlwind(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.GreatWhirlwind), 8); - class EyeOfTheStorm(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.EyeOfTheStorm), new AOEShapeDonut(12, 25)); class T06GarudaHStates : StateMachineBuilder diff --git a/BossMod/Modules/RealmReborn/Trial/T07TitanH/T07TitanH.cs b/BossMod/Modules/RealmReborn/Trial/T07TitanH/T07TitanH.cs index 973c70946f..115ece876f 100644 --- a/BossMod/Modules/RealmReborn/Trial/T07TitanH/T07TitanH.cs +++ b/BossMod/Modules/RealmReborn/Trial/T07TitanH/T07TitanH.cs @@ -28,13 +28,13 @@ public enum AID : uint MountainBuster = 643, // Boss->self, no cast, range 16+R ?-degree cone cleave } -class Hints : BossComponent +class Hints(BossModule module) : BossComponent(module) { private DateTime _heartSpawn; public override void AddGlobalHints(GlobalHints hints) { - var heartExists = ((T07TitanH)module).ActiveHeart.Any(); + var heartExists = ((T07TitanH)Module).ActiveHeart.Any(); if (_heartSpawn == default && heartExists) { _heartSpawn = WorldState.CurrentTime; @@ -50,18 +50,15 @@ public override void AddGlobalHints(GlobalHints hints) class MountainBuster(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.MountainBuster), new AOEShapeCone(21.25f, 60.Degrees())); // TODO: verify angle class WeightOfTheLand(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.WeightOfTheLandAOE), 6); - class Landslide(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Landslide), new AOEShapeRect(40.25f, 3)); -class Geocrush : Components.GenericAOEs +class Geocrush(BossModule module) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.Geocrush)) { private int _currentCast; private AOEShapeDonut? _outer; private AOEShapeCircle? _inner; private DateTime _innerFinish; - public Geocrush() : base(ActionID.MakeSpell(AID.Geocrush)) { } - public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_outer != null) @@ -96,10 +93,8 @@ public override void OnCastFinished(Actor caster, ActorCastInfo spell) } } -class Burst : Components.SelfTargetedAOEs +class Burst(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Burst), new AOEShapeCircle(6.3f)) { - public Burst() : base(ActionID.MakeSpell(AID.Burst), new AOEShapeCircle(6.3f)) { } - public override IEnumerable ActiveAOEs(int slot, Actor actor) { // pattern 1: one-by-one explosions every ~0.4-0.5s, 8 clockwise then center diff --git a/BossMod/Modules/RealmReborn/Trial/T08ThornmarchH/MoogleGoRound.cs b/BossMod/Modules/RealmReborn/Trial/T08ThornmarchH/MoogleGoRound.cs index 1fbaf1983f..f64d6b0529 100644 --- a/BossMod/Modules/RealmReborn/Trial/T08ThornmarchH/MoogleGoRound.cs +++ b/BossMod/Modules/RealmReborn/Trial/T08ThornmarchH/MoogleGoRound.cs @@ -1,6 +1,6 @@ namespace BossMod.RealmReborn.Trial.T08ThornmarchH; -class MoogleGoRound : Components.GenericAOEs +class MoogleGoRound(BossModule module) : Components.GenericAOEs(module) { private List _casters = new(); private static readonly AOEShape _shape = new AOEShapeCircle(20); diff --git a/BossMod/Modules/RealmReborn/Trial/T08ThornmarchH/PomMeteor.cs b/BossMod/Modules/RealmReborn/Trial/T08ThornmarchH/PomMeteor.cs index a4985fc867..5ba338d959 100644 --- a/BossMod/Modules/RealmReborn/Trial/T08ThornmarchH/PomMeteor.cs +++ b/BossMod/Modules/RealmReborn/Trial/T08ThornmarchH/PomMeteor.cs @@ -1,6 +1,6 @@ namespace BossMod.RealmReborn.Trial.T08ThornmarchH; -class PomMeteor : BossComponent +class PomMeteor(BossModule module) : BossComponent(module) { private BitMask _activeTowers; private BitMask _soakedTowers; @@ -51,7 +51,7 @@ public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignme public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (int i in _activeTowers.SetBits()) - arena.AddCircle(Module.Bounds.Center + _towerOffsets[i], _towerRadius, _soakedTowers[i] ? ArenaColor.Safe : ArenaColor.Danger); + Arena.AddCircle(Module.Bounds.Center + _towerOffsets[i], _towerRadius, _soakedTowers[i] ? ArenaColor.Safe : ArenaColor.Danger); } public override void OnCastStarted(Actor caster, ActorCastInfo spell) diff --git a/BossMod/Modules/RealmReborn/Trial/T08ThornmarchH/PomStone.cs b/BossMod/Modules/RealmReborn/Trial/T08ThornmarchH/PomStone.cs index 53fb7ffa48..55b11a3264 100644 --- a/BossMod/Modules/RealmReborn/Trial/T08ThornmarchH/PomStone.cs +++ b/BossMod/Modules/RealmReborn/Trial/T08ThornmarchH/PomStone.cs @@ -1,6 +1,6 @@ namespace BossMod.RealmReborn.Trial.T08ThornmarchH; -class PomStone : Components.GenericAOEs +class PomStone(BossModule module) : Components.GenericAOEs(module) { private List<(Actor caster, AOEShape shape)> _casters = new(); private static readonly AOEShapeCircle _shapeIn = new(10); diff --git a/BossMod/Modules/RealmReborn/Trial/T08ThornmarchH/T08ThornmarchH.cs b/BossMod/Modules/RealmReborn/Trial/T08ThornmarchH/T08ThornmarchH.cs index ad72bc0d5d..6a544b46e1 100644 --- a/BossMod/Modules/RealmReborn/Trial/T08ThornmarchH/T08ThornmarchH.cs +++ b/BossMod/Modules/RealmReborn/Trial/T08ThornmarchH/T08ThornmarchH.cs @@ -61,31 +61,18 @@ public enum AID : uint } class SpinningMogshield(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.SpinningMogshield), new AOEShapeCircle(6)); - class ThousandKuponzeSwipe(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ThousandKuponzeSwipe), new AOEShapeCone(20, 45.Degrees())); - class MograinOfDeath(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.MograinOfDeathAOE), 6); - class PomHoly(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.PomHoly)); - class MoggledayNightFever(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.MoggledayNightFever), new AOEShapeCone(30, 60.Degrees())); - class MoogleThrust(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.MoogleThrust)); - class MementoMoogle(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.MementoMoogle)); - class PomHolyBoss(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.PomHolyBoss)); - class ThousandKuponzeCharge(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.ThousandKuponzeCharge)); - class PomBog(BossModule module) : Components.PersistentVoidzoneAtCastTarget(module, 8, ActionID.MakeSpell(AID.PomBog), m => m.Enemies(OID.PomBog).Where(a => a.EventState != 7), 0.8f); - class MogStone(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.MogStoneAOE), 6, 8); - class TwinPomMeteor(BossModule module) : Components.CastSharedTankbuster(module, ActionID.MakeSpell(AID.TwinPomMeteorAOE), 6); - class MogComet(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.MogCometAOE), 6); - class MogCreation(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.MogCreation), new AOEShapeRect(50, 5)); // note: this fight has well-timed state machine for all phases, but it's just too simple to bother... @@ -116,10 +103,8 @@ public T08ThornmarchHStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.WhiskerwallKupdiKoop, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 66, NameID = 725)] -public class T08ThornmarchH : BossModule +public class T08ThornmarchH(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(0, 0), 21)) { - public T08ThornmarchH(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(0, 0), 21)) { } - protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); diff --git a/BossMod/Modules/RealmReborn/Trial/T09WhorleaterH/T09WhorleaterH.cs b/BossMod/Modules/RealmReborn/Trial/T09WhorleaterH/T09WhorleaterH.cs index 85783b4bec..ab3145f2c5 100644 --- a/BossMod/Modules/RealmReborn/Trial/T09WhorleaterH/T09WhorleaterH.cs +++ b/BossMod/Modules/RealmReborn/Trial/T09WhorleaterH/T09WhorleaterH.cs @@ -1,9 +1,7 @@ namespace BossMod.RealmReborn.Trial.T09WhorleaterH; class GrandFall(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.GrandFall), 8); - class Hydroshot(BossModule module) : Components.PersistentVoidzoneAtCastTarget(module, 5, ActionID.MakeSpell(AID.Hydroshot), m => m.Enemies(OID.HydroshotZone).Where(z => z.EventState != 7), 0); - class Dreadstorm(BossModule module) : Components.PersistentVoidzoneAtCastTarget(module, 5, ActionID.MakeSpell(AID.Dreadstorm), m => m.Enemies(OID.DreadstormZone).Where(z => z.EventState != 7), 0); class T09WhorleaterHStates : StateMachineBuilder diff --git a/BossMod/Modules/RealmReborn/Trial/T09WhorleaterH/T09WhorleaterHBodyslam.cs b/BossMod/Modules/RealmReborn/Trial/T09WhorleaterH/T09WhorleaterHBodyslam.cs index f634feb6fc..05fef3b25d 100644 --- a/BossMod/Modules/RealmReborn/Trial/T09WhorleaterH/T09WhorleaterHBodyslam.cs +++ b/BossMod/Modules/RealmReborn/Trial/T09WhorleaterH/T09WhorleaterHBodyslam.cs @@ -5,7 +5,7 @@ class BodySlamKB : Components.Knockback private Source? _knockback; private float LeviathanZ; - public BodySlamKB() + public BodySlamKB(BossModule module) : base(module) { StopAtWall = true; } @@ -28,11 +28,11 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) if ((AID)spell.Action.ID is AID.BodySlamNorth or AID.BodySlamSouth) _knockback = null; } - public override bool DestinationUnsafe(BossModule module, int slot, Actor actor, WPos pos) => (module.FindComponent()?.ActiveAOEs(module, slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false) || (module.FindComponent()?.ActiveAOEs(module, slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false); + public override bool DestinationUnsafe(int slot, Actor actor, WPos pos) => (Module.FindComponent()?.ActiveAOEs(slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false) || (Module.FindComponent()?.ActiveAOEs(slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false); } -class BodySlamAOE : Components.GenericAOEs +class BodySlamAOE(BossModule module) : Components.GenericAOEs(module) { private AOEInstance? _aoe; private float LeviathanZ; diff --git a/BossMod/Modules/RealmReborn/Trial/T09WhorleaterH/T09WhorleaterHHints.cs b/BossMod/Modules/RealmReborn/Trial/T09WhorleaterH/T09WhorleaterHHints.cs index 8623f071db..a694bde96b 100644 --- a/BossMod/Modules/RealmReborn/Trial/T09WhorleaterH/T09WhorleaterHHints.cs +++ b/BossMod/Modules/RealmReborn/Trial/T09WhorleaterH/T09WhorleaterHHints.cs @@ -1,25 +1,25 @@ namespace BossMod.RealmReborn.Trial.T09WhorleaterH; -class Hints : BossComponent +class Hints(BossModule module) : BossComponent(module) { public override void AddGlobalHints(GlobalHints hints) { - var converter = module.Enemies(OID.Converter).Where(x => x.IsTargetable).FirstOrDefault(); + var converter = Module.Enemies(OID.Converter).Where(x => x.IsTargetable).FirstOrDefault(); if (converter != null) hints.Add($"Activate the {converter.Name} or wipe!"); - if (module.Enemies(OID.DangerousSahagins).Any(x => x.IsTargetable && !x.IsDead)) + if (Module.Enemies(OID.DangerousSahagins).Any(x => x.IsTargetable && !x.IsDead)) hints.Add("Kill Sahagins or lose control!"); - if (module.Enemies(OID.Spume).Any(x => x.IsTargetable && !x.IsDead)) + if (Module.Enemies(OID.Spume).Any(x => x.IsTargetable && !x.IsDead)) hints.Add("Destroy the spumes!"); } public override void AddHints(int slot, Actor actor, TextHints hints) { - var tail = module.Enemies(OID.Tail).Where(x => x.IsTargetable && x.FindStatus(SID.Invincibility) == null && x.FindStatus(SID.MantleOfTheWhorl) != null).FirstOrDefault(); + var tail = Module.Enemies(OID.Tail).Where(x => x.IsTargetable && x.FindStatus(SID.Invincibility) == null && x.FindStatus(SID.MantleOfTheWhorl) != null).FirstOrDefault(); var TankMimikry = actor.FindStatus(2124); //Bluemage Tank Mimikry if (tail != null) { - if ((actor.Class.GetClassCategory() is ClassCategory.Caster or ClassCategory.Healer || (actor.Class is Class.BLU && TankMimikry == null)) && actor.TargetID == module.Enemies(OID.Tail).FirstOrDefault()?.InstanceID) + if ((actor.Class.GetClassCategory() is ClassCategory.Caster or ClassCategory.Healer || (actor.Class is Class.BLU && TankMimikry == null)) && actor.TargetID == Module.Enemies(OID.Tail).FirstOrDefault()?.InstanceID) hints.Add("Attack the head! (Attacking the tail will reflect damage onto you)"); if (actor.Class.GetClassCategory() is ClassCategory.PhysRanged && actor.TargetID == Module.PrimaryActor.InstanceID) hints.Add("Attack the tail! (Attacking the head will reflect damage onto you)"); @@ -28,9 +28,9 @@ public override void AddHints(int slot, Actor actor, TextHints hints) public override void DrawArenaForeground(int pcSlot, Actor pc) { - var converter = module.Enemies(OID.Converter).FirstOrDefault(); - var convertertargetable = module.Enemies(OID.Converter).Where(x => x.IsTargetable).FirstOrDefault(); + var converter = Module.Enemies(OID.Converter).FirstOrDefault(); + var convertertargetable = Module.Enemies(OID.Converter).Where(x => x.IsTargetable).FirstOrDefault(); if (converter != null && convertertargetable != null) - arena.AddCircle(converter.Position, 1.4f, ArenaColor.Safe); + Arena.AddCircle(converter.Position, 1.4f, ArenaColor.Safe); } } diff --git a/BossMod/Modules/RealmReborn/Trial/T09WhorleaterH/T09WhorleaterHSpinningDive.cs b/BossMod/Modules/RealmReborn/Trial/T09WhorleaterH/T09WhorleaterHSpinningDive.cs index f84e32ef6f..3a02f2b0c8 100644 --- a/BossMod/Modules/RealmReborn/Trial/T09WhorleaterH/T09WhorleaterHSpinningDive.cs +++ b/BossMod/Modules/RealmReborn/Trial/T09WhorleaterH/T09WhorleaterHSpinningDive.cs @@ -1,6 +1,6 @@ namespace BossMod.RealmReborn.Trial.T09WhorleaterH; -class SpinningDive : Components.GenericAOEs //TODO: Find out how to detect spinning dives earlier eg. the water column telegraph +class SpinningDive(BossModule module) : Components.GenericAOEs(module) //TODO: Find out how to detect spinning dives earlier eg. the water column telegraph { private AOEInstance? _aoe; @@ -8,7 +8,7 @@ class SpinningDive : Components.GenericAOEs //TODO: Find out how to detect spinn public override void OnActorCreated(Actor actor) { - var SpinningDiveHelper = module.Enemies(OID.SpinningDiveHelper).FirstOrDefault(); + var SpinningDiveHelper = Module.Enemies(OID.SpinningDiveHelper).FirstOrDefault(); if ((OID)actor.OID == OID.SpinningDiveHelper) _aoe = new(new AOEShapeRect(46, 8), SpinningDiveHelper!.Position, SpinningDiveHelper.Rotation, WorldState.FutureTime(0.6f)); } @@ -24,7 +24,7 @@ class SpinningDiveKB : Components.Knockback //TODO: Find out how to detect spinn { private Source? _knockback; - public SpinningDiveKB() + public SpinningDiveKB(BossModule module) : base(module) { StopAtWall = true; } @@ -33,7 +33,7 @@ public SpinningDiveKB() public override void OnActorCreated(Actor actor) { - var SpinningDiveHelper = module.Enemies(OID.SpinningDiveHelper).FirstOrDefault(); + var SpinningDiveHelper = Module.Enemies(OID.SpinningDiveHelper).FirstOrDefault(); if ((OID)actor.OID == OID.SpinningDiveHelper) _knockback = new(SpinningDiveHelper!.Position, 10, WorldState.FutureTime(1.4f), new AOEShapeRect(46, 8), SpinningDiveHelper!.Rotation); } @@ -44,5 +44,5 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) _knockback = null; } - public override bool DestinationUnsafe(BossModule module, int slot, Actor actor, WPos pos) => (module.FindComponent()?.ActiveAOEs(module, slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false) || (module.FindComponent()?.ActiveAOEs(module, slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false); + public override bool DestinationUnsafe(int slot, Actor actor, WPos pos) => (Module.FindComponent()?.ActiveAOEs(slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false) || (Module.FindComponent()?.ActiveAOEs(slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false); } diff --git a/BossMod/Modules/Shadowbringers/Dungeon/D01Holminster/D013Philia.cs b/BossMod/Modules/Shadowbringers/Dungeon/D01Holminster/D013Philia.cs index c6464745c9..c016e675ad 100644 --- a/BossMod/Modules/Shadowbringers/Dungeon/D01Holminster/D013Philia.cs +++ b/BossMod/Modules/Shadowbringers/Dungeon/D01Holminster/D013Philia.cs @@ -189,7 +189,7 @@ public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignme public override void AddHints(int slot, Actor actor, TextHints hints) { - base.AddHints(module, slot, actor, hints, movementHints); + base.AddHints(slot, actor, hints); if (target == actor && targeted) hints.Add("Bait away!"); } diff --git a/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D033Eros.cs b/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D033Eros.cs index 39ebe850dc..13de297bb8 100644 --- a/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D033Eros.cs +++ b/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D033Eros.cs @@ -158,7 +158,7 @@ public override void OnCastFinished(Actor caster, ActorCastInfo spell) public override void AddHints(int slot, Actor actor, TextHints hints) { - base.AddHints(module, slot, actor, hints, movementHints); + base.AddHints(slot, actor, hints); if (target == actor && targeted) hints.Add("Bait voidzone away!"); } diff --git a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE21FinalFurlong.cs b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE21FinalFurlong.cs index 900596fbb9..7ed5967a7b 100644 --- a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE21FinalFurlong.cs +++ b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE21FinalFurlong.cs @@ -56,7 +56,7 @@ public override void Init(BossModule module) public override void AddHints(int slot, Actor actor, TextHints hints) { - base.AddHints(module, slot, actor, hints, movementHints); + base.AddHints(slot, actor, hints); if (Casters.Count > 0) { var hand = _hands.FirstOrDefault(h => h.Tether.Target == actor.InstanceID); diff --git a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE53HereComesTheCavalry.cs b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE53HereComesTheCavalry.cs index b96e04b3ce..377642eeb4 100644 --- a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE53HereComesTheCavalry.cs +++ b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE53HereComesTheCavalry.cs @@ -102,7 +102,7 @@ public RawSteel() : base(ActionID.MakeSpell(AID.RawSteel), 2) { } public override void AddHints(int slot, Actor actor, TextHints hints) { - base.AddHints(module, slot, actor, hints, movementHints); + base.AddHints(slot, actor, hints); if (ActiveBaitsOn(actor).Any(b => b.Target.Position.InCircle(b.Source.Position, _safeDistance))) hints.Add("Go further away from boss!"); } diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS3Dahu/SpitFlame.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS3Dahu/SpitFlame.cs index c19daf574c..9d166cbfb5 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS3Dahu/SpitFlame.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS3Dahu/SpitFlame.cs @@ -20,7 +20,7 @@ public override void Update() public override void AddHints(int slot, Actor actor, TextHints hints) { - base.AddHints(module, slot, actor, hints, movementHints); + base.AddHints(slot, actor, hints); if (Array.IndexOf(_targets, actor) is var order && order >= 0) { hints.Add($"Order: {order + 1}", false); diff --git a/BossMod/Modules/Shadowbringers/Foray/Duel/Duel4Dabog/RightArmComet.cs b/BossMod/Modules/Shadowbringers/Foray/Duel/Duel4Dabog/RightArmComet.cs index 55167bf894..055ef17106 100644 --- a/BossMod/Modules/Shadowbringers/Foray/Duel/Duel4Dabog/RightArmComet.cs +++ b/BossMod/Modules/Shadowbringers/Foray/Duel/Duel4Dabog/RightArmComet.cs @@ -8,7 +8,7 @@ class RightArmComet : Components.KnockbackFromCastTarget public override void AddHints(int slot, Actor actor, TextHints hints) { - base.AddHints(module, slot, actor, hints, movementHints); + base.AddHints(slot, actor, hints); if (Casters.Any(c => !Shape!.Check(actor.Position, c))) hints.Add("Soak the tower!"); } diff --git a/BossMod/Modules/Shadowbringers/Hunt/RankA/Nariphon.cs b/BossMod/Modules/Shadowbringers/Hunt/RankA/Nariphon.cs index 31866f5305..9cbd52f322 100644 --- a/BossMod/Modules/Shadowbringers/Hunt/RankA/Nariphon.cs +++ b/BossMod/Modules/Shadowbringers/Hunt/RankA/Nariphon.cs @@ -53,7 +53,7 @@ public override void OnCastFinished(Actor caster, ActorCastInfo spell) public override void AddHints(int slot, Actor actor, TextHints hints) { - base.AddHints(module, slot, actor, hints, movementHints); + base.AddHints(slot, actor, hints); if (target == actor && targeted) hints.Add("Bait away!"); } diff --git a/BossMod/Modules/Shadowbringers/Hunt/RankA/Supay.cs b/BossMod/Modules/Shadowbringers/Hunt/RankA/Supay.cs index 0b70c0163f..7cd5c04583 100644 --- a/BossMod/Modules/Shadowbringers/Hunt/RankA/Supay.cs +++ b/BossMod/Modules/Shadowbringers/Hunt/RankA/Supay.cs @@ -44,7 +44,7 @@ public override void OnCastFinished(Actor caster, ActorCastInfo spell) public override void AddHints(int slot, Actor actor, TextHints hints) { - base.AddHints(module, slot, actor, hints, movementHints); + base.AddHints(slot, actor, hints); if (target == actor && targeted) hints.Add("Bait away + look away!"); } diff --git a/BossMod/Modules/Shadowbringers/Hunt/RankA/TheMudman.cs b/BossMod/Modules/Shadowbringers/Hunt/RankA/TheMudman.cs index 5a501c7af8..a0579ea249 100644 --- a/BossMod/Modules/Shadowbringers/Hunt/RankA/TheMudman.cs +++ b/BossMod/Modules/Shadowbringers/Hunt/RankA/TheMudman.cs @@ -51,7 +51,7 @@ public override void OnCastFinished(Actor caster, ActorCastInfo spell) public override void AddHints(int slot, Actor actor, TextHints hints) { - base.AddHints(module, slot, actor, hints, movementHints); + base.AddHints(slot, actor, hints); if (target == actor && targeted) hints.Add("Bait away or interrupt!"); } diff --git a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretWorm.cs b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretWorm.cs index 187d2cfd9e..f60d41b2e0 100644 --- a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretWorm.cs +++ b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretWorm.cs @@ -78,7 +78,7 @@ public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignme public override void AddHints(int slot, Actor actor, TextHints hints) { - base.AddHints(module, slot, actor, hints, movementHints); + base.AddHints(slot, actor, hints); if (target == actor && targeted) hints.Add("Bait bubble away!"); } diff --git a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarAiravata.cs b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarAiravata.cs index f78b60a457..2a4ff9af41 100644 --- a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarAiravata.cs +++ b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarAiravata.cs @@ -71,7 +71,7 @@ public override void OnCastFinished(Actor caster, ActorCastInfo spell) public override void AddHints(int slot, Actor actor, TextHints hints) { - base.AddHints(module, slot, actor, hints, movementHints); + base.AddHints(slot, actor, hints); if (target == actor && targeted) { hints.Add("Bait away!"); diff --git a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarChimera.cs b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarChimera.cs index 3ffb18394b..f0e86d63f0 100644 --- a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarChimera.cs +++ b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarChimera.cs @@ -82,7 +82,7 @@ public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignme public override void AddHints(int slot, Actor actor, TextHints hints) { - base.AddHints(module, slot, actor, hints, movementHints); + base.AddHints(slot, actor, hints); if (target == actor && targeted) hints.Add("Bait voidzone away!"); } diff --git a/BossMod/Modules/Stormblood/Ultimate/UCOB/P2Cauterize.cs b/BossMod/Modules/Stormblood/Ultimate/UCOB/P2Cauterize.cs index 5e43213ba8..01e64a9196 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UCOB/P2Cauterize.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UCOB/P2Cauterize.cs @@ -18,7 +18,7 @@ public override void AddHints(int slot, Actor actor, TextHints hints) { if (BaitOrder[slot] >= NextBaitOrder) hints.Add($"Bait {BaitOrder[slot]}", false); - base.AddHints(module, slot, actor, hints, movementHints); + base.AddHints(slot, actor, hints); } public override void DrawArenaForeground(int pcSlot, Actor pc) diff --git a/BossMod/Modules/Stormblood/Ultimate/UCOB/P3GrandOctet.cs b/BossMod/Modules/Stormblood/Ultimate/UCOB/P3GrandOctet.cs index 1b9ddbc3bf..863e80bc6a 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UCOB/P3GrandOctet.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UCOB/P3GrandOctet.cs @@ -22,7 +22,7 @@ public override void AddHints(int slot, Actor actor, TextHints hints) { if (_baitOrder[slot] >= NextBaitOrder) hints.Add($"Bait {_baitOrder[slot]}", false); - base.AddHints(module, slot, actor, hints, movementHints); + base.AddHints(slot, actor, hints); } public override void AddGlobalHints(GlobalHints hints) diff --git a/TODO b/TODO index e47a0eb1d7..b06943adee 100644 --- a/TODO +++ b/TODO @@ -1,6 +1,7 @@ components refactor checklist - config should all use primary ctor - bitmasks in record structs! +- reverify primary ctors for components, add base class args if needed autorotation rework: - priority action suggestions From 157ad9a83350cadbb47c48f7d809cd02e51a1408 Mon Sep 17 00:00:00 2001 From: Olga Kichakova Date: Thu, 11 Apr 2024 01:44:26 +0100 Subject: [PATCH 14/18] All done. --- BossMod/BossModule/ArenaColor.cs | 2 +- BossMod/Components/BaitAway.cs | 2 +- .../Endwalker/Alliance/A13Azeyma/SolarFans.cs | 9 +-- .../Alliance/A14Naldthal/FortuneFlux.cs | 9 +-- .../C01ASS/C011Silkie/PuffTethers.cs | 12 +--- .../C02AMR/C022Gorai/RousingReincarnation.cs | 2 +- .../C03AAI/C031Ketuduke/C031KetudukeStates.cs | 10 +-- .../C03AAI/C031Ketuduke/SpringCrystals.cs | 2 +- .../DeepDungeon/EurekaOrthos/DD70Aeturna.cs | 4 +- .../D13LunarSubterrane/D132DamcyanAntilon.cs | 2 +- BossMod/Modules/Endwalker/FATE/Chi.cs | 8 +-- BossMod/Modules/Endwalker/FATE/Daivadipa.cs | 8 +-- .../Endwalker/Hunt/RankA/MoussePrincess.cs | 4 +- .../P11SThemis/InevitableLawSentence.cs | 4 +- .../Savage/P12S1Athena/EngravementOfSouls3.cs | 2 +- .../P12S1Athena/EngravementOfSoulsCommon.cs | 2 +- .../Savage/P4S1Hesperos/ElementalBelone.cs | 2 +- .../Savage/P7SAgdistis/ForbiddenFruit1.cs | 2 +- .../Savage/P8S1Hephaistos/P8S1States.cs | 4 +- .../Endwalker/Savage/P9SKokytos/Charibdys.cs | 2 +- .../TheShiftingGymnasionAgonon/Narkissos.cs | 2 +- .../Endwalker/Ultimate/DSW2/DSW2States.cs | 10 +-- .../Ultimate/DSW2/P2SanctityOfTheWard2.cs | 2 +- .../Ultimate/DSW2/P2StrengthOfTheWard2.cs | 2 +- .../Modules/Endwalker/Ultimate/TOP/P5Delta.cs | 2 +- .../Unreal/Un5Thordan/SpiralThrust.cs | 2 +- .../Stage07AChorusSlime/Stage07Act2.cs | 2 +- .../Stage07AChorusSlime/Stage07Act3.cs | 2 +- .../Stage17TheSwordOfMusic/Stage17Act1.cs | 2 +- .../Stage26PapaMia/Stage26Act2.cs | 2 +- .../PalaceOfTheDead/D60TheBlackRider.cs | 6 +- .../Extreme/Ex2Garuda/Ex2GarudaStates.cs | 2 +- .../Extreme/Ex3Titan/Ex3TitanStates.cs | 2 +- .../Raid/T04Gauntlet/T04Gauntlet.cs | 2 +- .../RealmReborn/Raid/T05Twintania/Phase3.cs | 6 +- .../Trial/T03GarudaN/T03GarudaN.cs | 2 +- .../D01Holminster/D011ForgivenDissonance.cs | 6 -- .../D01Holminster/D012TesleentheForgiven.cs | 4 +- .../Dungeon/D01Holminster/D013Philia.cs | 37 +++++------ .../D03QitanaRavel/D030RonkanDreamer.cs | 16 ++--- .../Dungeon/D03QitanaRavel/D031Lozatl.cs | 6 +- .../Dungeon/D03QitanaRavel/D032Batsquatch.cs | 6 -- .../Dungeon/D03QitanaRavel/D033Eros.cs | 41 +++++------- .../D05MtGulg/D050ForgivenPrejudice.cs | 11 ++-- .../Dungeon/D05MtGulg/D051ForgivenCruelty.cs | 5 -- .../Dungeon/D05MtGulg/D052ForgivenApathy.cs | 11 ++-- .../Dungeon/D05MtGulg/D053ForgivenWhimsy.cs | 8 +-- .../Dungeon/D05MtGulg/D054ForgivenRevelry.cs | 4 +- .../D05MtGulg/D055ForgivenObscenity.cs | 64 ++++++++---------- .../Shadowbringers/FATE/Archaeotania.cs | 20 +----- .../Modules/Shadowbringers/FATE/Formidable.cs | 25 +++---- .../CE11ShadowOfDeathHand.cs | 14 +--- .../CriticalEngagement/CE12BayingOfHounds.cs | 14 +--- .../CriticalEngagement/CE13KillItWithFire.cs | 8 +-- .../CriticalEngagement/CE14VigilForLost.cs | 8 --- .../CriticalEngagement/CE21FinalFurlong.cs | 19 ++---- .../CriticalEngagement/CE31MetalFoxChaos.cs | 10 +-- .../CE41WithDiremiteAndMain.cs | 21 ++---- .../CE42FromBeyondTheGrave.cs | 26 ++------ .../CriticalEngagement/CE44FamiliarFace.cs | 16 ++--- .../CE51ThereWouldBeBlood.cs | 9 --- .../CriticalEngagement/CE52TimeToBurn.cs | 13 +--- .../CE53HereComesTheCavalry.cs | 21 ++---- .../CriticalEngagement/CE54NeverCryWolf.cs | 27 +++----- .../CriticalEngagement/CE62LooksToDieFor.cs | 26 ++------ .../CriticalEngagement/CE63WornToShadow.cs | 12 ++-- .../CriticalEngagement/CE64FeelingTheBurn.cs | 17 ++--- .../DRS1TrinitySeeker/ActOfMercy.cs | 8 +-- .../DRS1TrinitySeeker/BalefulBlade.cs | 8 +-- .../DRS1TrinitySeeker/BalefulFirestorm.cs | 2 +- .../DRS1TrinitySeeker/BalefulSwathe.cs | 8 +-- .../DelubrumReginae/DRS1TrinitySeeker/DRS1.cs | 10 +-- .../DRS1TrinitySeeker/IronSplitter.cs | 4 +- .../DRS1TrinitySeeker/MercifulMoon.cs | 6 +- .../DRS1TrinitySeeker/MercyFourfold.cs | 6 +- .../DRS2StygimolochWarrior/DRS2.cs | 2 - .../DRS2StygimolochWarrior/Entrapment.cs | 55 +++++++--------- .../DRS2StygimolochWarrior/FocusedTremor.cs | 5 +- .../UnrelentingCharge.cs | 2 +- .../Foray/DelubrumReginae/DRS3Dahu/DRS3.cs | 10 +-- .../DRS3Dahu/FeralHowlHystericAssault.cs | 6 +- .../DRS3Dahu/FirebreatheRotating.cs | 2 +- .../DelubrumReginae/DRS3Dahu/Shockwave.cs | 2 +- .../DelubrumReginae/DRS3Dahu/SpitFlame.cs | 15 ++--- .../DRS4QueensGuard/AboveBoard.cs | 15 ++--- .../DRS4QueensGuard/CoatOfArms.cs | 4 +- .../DelubrumReginae/DRS4QueensGuard/DRS4.cs | 9 +-- .../DRS4QueensGuard/GreatBallOfFire.cs | 15 ++--- .../DRS4QueensGuard/OptimalOffensive.cs | 12 +--- .../SpellforgeSteelstingHint.cs | 2 +- .../DRS4QueensGuard/WindsOfWeight.cs | 2 +- .../Foray/DelubrumReginae/DRS5Phantom/DRS5.cs | 2 - .../DelubrumReginae/DRS5Phantom/Miasma.cs | 14 ++-- .../DRS6TrinityAvowed/AllegiantArsenal.cs | 2 +- .../DRS6TrinityAvowed/BladeOfEntropy.cs | 2 +- .../DelubrumReginae/DRS6TrinityAvowed/Bow.cs | 66 +++++++------------ .../DelubrumReginae/DRS6TrinityAvowed/DRS6.cs | 3 - .../DRS6TrinityAvowed/Staff.cs | 28 ++++---- .../DRS6TrinityAvowed/TemperatureAOE.cs | 2 +- .../DRS7StygimolochLord/AddPhaseArena.cs | 22 +++---- .../DRS7StygimolochLord/CrushingHoof.cs | 6 +- .../DRS7StygimolochLord/DRS7.cs | 6 -- .../DRS7StygimolochLord/FatefulWords.cs | 10 ++- .../DRS7StygimolochLord/RapidBolts.cs | 6 +- .../DRS7StygimolochLord/ViciousSwipe.cs | 13 ++-- .../DelubrumReginae/DRS8Queen/AboveBoard.cs | 15 ++--- .../Foray/DelubrumReginae/DRS8Queen/Chess.cs | 29 ++++---- .../Foray/DelubrumReginae/DRS8Queen/DRS8.cs | 8 +-- .../DRS8Queen/FieryIcyPortent.cs | 2 +- .../DelubrumReginae/DRS8Queen/HeavensWrath.cs | 2 +- .../DRS8Queen/JudgmentBlade.cs | 2 +- .../DRS8Queen/MaelstromsBolt.cs | 20 ++---- .../DelubrumReginae/DRS8Queen/TurretsTour.cs | 18 ++--- .../DRS8Queen/UnluckyLotAetherialSphere.cs | 6 +- .../DRS8Queen/WindsOfWeight.cs | 2 +- .../Foray/Duel/Duel2Lyon/Duel2Lyon.cs | 6 +- .../Duel/Duel2Lyon/Duel2LyonGenericAttacks.cs | 35 +++++----- .../Foray/Duel/Duel4Dabog/Duel4Dabog.cs | 3 - .../Duel/Duel4Dabog/LeftArmMetalCutter.cs | 13 +--- .../Foray/Duel/Duel4Dabog/RightArmComet.cs | 8 +-- .../Foray/Duel/Duel4Dabog/RightArmRay.cs | 6 +- .../Duel/Duel5Menenius/BlueHiddenMines.cs | 2 +- .../Foray/Duel/Duel5Menenius/Duel5Menenius.cs | 7 +- .../Foray/Duel/Duel5Menenius/GigaTempest.cs | 51 +++----------- .../Foray/Duel/Duel5Menenius/GunberdShot.cs | 4 +- .../Duel/Duel5Menenius/RedHiddenMines.cs | 6 +- .../Foray/Duel/Duel5Menenius/Ruination.cs | 10 ++- .../Modules/Shadowbringers/Hunt/RankA/Baal.cs | 5 +- .../Shadowbringers/Hunt/RankA/Grassman.cs | 4 +- .../Shadowbringers/Hunt/RankA/Huracan.cs | 5 +- .../Shadowbringers/Hunt/RankA/LilMurderer.cs | 8 +-- .../Shadowbringers/Hunt/RankA/Maliktender.cs | 5 +- .../Shadowbringers/Hunt/RankA/Nariphon.cs | 4 +- .../Shadowbringers/Hunt/RankA/Nuckelavee.cs | 5 +- .../Hunt/RankA/OPoorestPauldia.cs | 3 - .../Shadowbringers/Hunt/RankA/Rusalka.cs | 11 ++-- .../Shadowbringers/Hunt/RankA/Sugaar.cs | 12 ++-- .../Shadowbringers/Hunt/RankA/Supay.cs | 2 +- .../Shadowbringers/Hunt/RankA/TheMudman.cs | 4 +- .../Shadowbringers/Hunt/RankS/Aglaope.cs | 9 +-- .../Hunt/RankS/ForgivenGossip.cs | 1 - .../Hunt/RankS/ForgivenPedantry.cs | 13 ++-- .../Hunt/RankS/ForgivenRebellion.cs | 24 +++---- .../Shadowbringers/Hunt/RankS/Gunitt.cs | 9 +-- .../Shadowbringers/Hunt/RankS/Ixtab.cs | 28 +++----- .../Shadowbringers/Hunt/RankS/Tarchia.cs | 10 +-- .../Shadowbringers/Hunt/RankS/Tyger.cs | 8 +-- .../TheDungeonsOfLyheGhiah/Goliath.cs | 18 +---- .../FuathTroublemaker.cs | 8 +-- .../GreedyPixie.cs | 18 +---- .../SecretBasket.cs | 22 ++----- .../SecretCladoselache.cs | 19 ++---- .../SecretDjinn.cs | 14 ++-- .../SecretKeeper.cs | 11 +--- .../SecretKorrigan.cs | 12 +--- .../SecretPegasus.cs | 10 +-- .../SecretPorxie.cs | 19 +----- .../SecretSerpent.cs | 13 +--- .../SecretSwallow.cs | 13 +--- .../SecretUndine.cs | 12 +--- .../SecretWorm.cs | 14 +--- .../Modules/Stormblood/Hunt/RankA/Angada.cs | 3 +- .../Modules/Stormblood/Hunt/RankA/Gajasura.cs | 2 - .../Stormblood/Hunt/RankS/BoneCrawler.cs | 6 -- .../Modules/Stormblood/Hunt/RankS/Gamma.cs | 4 +- .../Modules/Stormblood/Hunt/RankS/Okina.cs | 8 --- .../Modules/Stormblood/Hunt/RankS/Orghana.cs | 2 - .../TheLostCanalsOfUznair/CanalIcebeast.cs | 10 +-- .../AltarAiravata.cs | 22 ++----- .../TheShiftingAltarsOfUznair/AltarArachne.cs | 13 +--- .../TheShiftingAltarsOfUznair/AltarBeast.cs | 17 +---- .../TheShiftingAltarsOfUznair/AltarChimera.cs | 16 +---- .../AltarDiresaur.cs | 15 +---- .../AltarDullahan.cs | 19 +----- .../TheShiftingAltarsOfUznair/AltarKelpie.cs | 23 ++----- .../AltarMandragora.cs | 12 +--- .../TheShiftingAltarsOfUznair/AltarSkatene.cs | 7 +- .../TheShiftingAltarsOfUznair/AltarTotem.cs | 13 +--- .../TheShiftingAltarsOfUznair/Hati.cs | 8 +-- .../TheGreatGoldWhisker.cs | 6 +- .../TheShiftingAltarsOfUznair/TheOlderOne.cs | 17 +---- .../TheShiftingAltarsOfUznair/TheWinged.cs | 16 +---- .../Modules/Stormblood/Ultimate/UCOB/Hatch.cs | 21 +++--- .../Stormblood/Ultimate/UCOB/LiquidHell.cs | 5 +- .../Ultimate/UCOB/P1DeathSentence.cs | 2 +- .../Ultimate/UCOB/P2BahamutsFavor.cs | 16 ++--- .../Stormblood/Ultimate/UCOB/P2Cauterize.cs | 6 +- .../Stormblood/Ultimate/UCOB/P2Heavensfall.cs | 21 ++---- .../Stormblood/Ultimate/UCOB/P2Ravensbeak.cs | 2 +- .../Ultimate/UCOB/P3BlackfireTrio.cs | 16 ++--- .../Stormblood/Ultimate/UCOB/P3EarthShaker.cs | 17 ++--- .../Ultimate/UCOB/P3FellruinTrio.cs | 13 +--- .../Stormblood/Ultimate/UCOB/P3GrandOctet.cs | 16 ++--- .../Ultimate/UCOB/P3HeavensfallTrio.cs | 20 +++--- .../Ultimate/UCOB/P3QuickmarchTrio.cs | 16 ++--- .../Ultimate/UCOB/P3SeventhUmbralEra.cs | 9 +-- .../Ultimate/UCOB/P3TenstrikeTrio.cs | 3 - .../Stormblood/Ultimate/UCOB/P5AhkMorn.cs | 4 +- .../Stormblood/Ultimate/UCOB/P5Enrage.cs | 4 +- .../Stormblood/Ultimate/UCOB/P5Exaflare.cs | 6 +- .../Stormblood/Ultimate/UCOB/P5Teraflare.cs | 4 +- .../Modules/Stormblood/Ultimate/UCOB/Quote.cs | 50 +++++--------- .../Stormblood/Ultimate/UCOB/Twister.cs | 2 +- .../Modules/Stormblood/Ultimate/UCOB/UCOB.cs | 8 +-- .../Stormblood/Ultimate/UCOB/UCOBConfig.cs | 4 +- .../Stormblood/Ultimate/UCOB/UCOBStates.cs | 10 +-- .../Stormblood/Ultimate/UWU/P1FeatherRain.cs | 4 +- .../Stormblood/Ultimate/UWU/P1Mesohigh.cs | 19 ++---- .../Stormblood/Ultimate/UWU/P1Plumes.cs | 21 ++---- .../Stormblood/Ultimate/UWU/P1WickedWheel.cs | 6 +- .../Ultimate/UWU/P2CrimsonCyclone.cs | 12 +--- .../Stormblood/Ultimate/UWU/P2Eruption.cs | 8 +-- .../Stormblood/Ultimate/UWU/P2FlamingCrush.cs | 10 ++- .../Ultimate/UWU/P2InfernalFetters.cs | 4 +- .../Stormblood/Ultimate/UWU/P2Nails.cs | 11 +--- .../Stormblood/Ultimate/UWU/P2SearingWind.cs | 4 +- .../Stormblood/Ultimate/UWU/P2VulcanBurst.cs | 27 ++------ .../Stormblood/Ultimate/UWU/P3Burst.cs | 11 +--- .../Stormblood/Ultimate/UWU/P3Gaols.cs | 4 +- .../Stormblood/Ultimate/UWU/P3Geocrush.cs | 4 +- .../Stormblood/Ultimate/UWU/P3Landslide.cs | 6 +- .../Stormblood/Ultimate/UWU/P4CeruleumVent.cs | 4 +- .../Stormblood/Ultimate/UWU/P4Freefire.cs | 4 +- .../Stormblood/Ultimate/UWU/P4MagitekBits.cs | 11 +--- .../Ultimate/UWU/P4UltimateAnnihilation.cs | 13 ++-- .../Ultimate/UWU/P4UltimatePredation.cs | 23 ++++--- .../Ultimate/UWU/P4ViscousAetheroplasm.cs | 8 +-- .../Modules/Stormblood/Ultimate/UWU/UWU.cs | 32 +-------- .../Stormblood/Ultimate/UWU/UWUConfig.cs | 4 +- .../Stormblood/Ultimate/UWU/UWUStates.cs | 2 +- 230 files changed, 726 insertions(+), 1725 deletions(-) delete mode 100644 BossMod/Modules/Stormblood/Ultimate/UCOB/P3TenstrikeTrio.cs diff --git a/BossMod/BossModule/ArenaColor.cs b/BossMod/BossModule/ArenaColor.cs index b7629dee40..bb9ee1870f 100644 --- a/BossMod/BossModule/ArenaColor.cs +++ b/BossMod/BossModule/ArenaColor.cs @@ -9,7 +9,7 @@ public static class ArenaColor public const uint SafeFromAOE = 0x80008000; public const uint Danger = 0xff00ffff; public const uint Safe = 0xff00ff00; - public const uint Trap = 0x80000080; + public const uint Trap = 0x80000080; // TODO: reconsider? public const uint PC = 0xff00ff00; public const uint Enemy = 0xff0000ff; public const uint Object = 0xff0080ff; diff --git a/BossMod/Components/BaitAway.cs b/BossMod/Components/BaitAway.cs index a4b2869baf..e67a0a4480 100644 --- a/BossMod/Components/BaitAway.cs +++ b/BossMod/Components/BaitAway.cs @@ -30,7 +30,7 @@ public Bait(Actor source, Actor target, AOEShape shape, DateTime activation = de public bool IgnoreOtherBaits = false; // if true, don't show hints/aoes for baits by others public PlayerPriority BaiterPriority = PlayerPriority.Interesting; public BitMask ForbiddenPlayers; // these players should avoid baiting - public readonly List CurrentBaits = new(); + public List CurrentBaits = new(); public IEnumerable ActiveBaits => AllowDeadTargets ? CurrentBaits : CurrentBaits.Where(b => !b.Target.IsDead); public IEnumerable ActiveBaitsOn(Actor target) => ActiveBaits.Where(b => b.Target == target); diff --git a/BossMod/Modules/Endwalker/Alliance/A13Azeyma/SolarFans.cs b/BossMod/Modules/Endwalker/Alliance/A13Azeyma/SolarFans.cs index 78a8cde725..4a7792ef3c 100644 --- a/BossMod/Modules/Endwalker/Alliance/A13Azeyma/SolarFans.cs +++ b/BossMod/Modules/Endwalker/Alliance/A13Azeyma/SolarFans.cs @@ -2,17 +2,12 @@ class SolarFans(BossModule module) : Components.ChargeAOEs(module, ActionID.MakeSpell(AID.SolarFansAOE), 5); // TODO: or SolarFansCharge? not sure which one deals damage... -class RadiantRhythm : Components.GenericAOEs +class RadiantRhythm(BossModule module) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.RadiantFlight)) { - private IReadOnlyList _flames; + private IReadOnlyList _flames = module.Enemies(OID.WardensFlame); private static readonly AOEShapeDonutSector _shape = new(20, 30, 45.Degrees()); - public RadiantRhythm(BossModule module) : base(module, ActionID.MakeSpell(AID.RadiantFlight)) - { - _flames = module.Enemies(OID.WardensFlame); - } - public override IEnumerable ActiveAOEs(int slot, Actor actor) => NextCenterDirections(Module.Bounds.Center).Select(d => new AOEInstance(_shape, Module.Bounds.Center, d)); private IEnumerable NextCenterDirections(WPos center) => _flames.Where(f => (f.Position - center).LengthSq() > 25).Select(f => Angle.FromDirection(f.Position - center) + 45.Degrees()); diff --git a/BossMod/Modules/Endwalker/Alliance/A14Naldthal/FortuneFlux.cs b/BossMod/Modules/Endwalker/Alliance/A14Naldthal/FortuneFlux.cs index ff8341a8b6..3981a3f480 100644 --- a/BossMod/Modules/Endwalker/Alliance/A14Naldthal/FortuneFlux.cs +++ b/BossMod/Modules/Endwalker/Alliance/A14Naldthal/FortuneFlux.cs @@ -107,17 +107,12 @@ private void UpdateActivation(int order, Mechanic mechanic, ActorCastInfo spell) } } -class FortuneFluxAOE : Components.GenericAOEs +class FortuneFluxAOE(BossModule module) : Components.GenericAOEs(module) { - private FortuneFluxOrder? _order; + private FortuneFluxOrder? _order = module.FindComponent(); private static readonly AOEShapeCircle _shape = new(20); - public FortuneFluxAOE(BossModule module) : base(module) - { - _order = module.FindComponent(); - } - public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_order != null) diff --git a/BossMod/Modules/Endwalker/Criterion/C01ASS/C011Silkie/PuffTethers.cs b/BossMod/Modules/Endwalker/Criterion/C01ASS/C011Silkie/PuffTethers.cs index adced315f1..80b739410b 100644 --- a/BossMod/Modules/Endwalker/Criterion/C01ASS/C011Silkie/PuffTethers.cs +++ b/BossMod/Modules/Endwalker/Criterion/C01ASS/C011Silkie/PuffTethers.cs @@ -1,19 +1,13 @@ namespace BossMod.Endwalker.Criterion.C01ASS.C011Silkie; -class PuffTethers : BossComponent +class PuffTethers(BossModule module, bool originAtBoss) : BossComponent(module) { - private bool _originAtBoss; - private PuffTracker? _tracker; + private bool _originAtBoss = originAtBoss; + private PuffTracker? _tracker = module.FindComponent(); private SlipperySoap.Color _bossColor; private static readonly uint _hintColor = 0x40008080; - public PuffTethers(BossModule module, bool originAtBoss) : base(module) - { - _originAtBoss = originAtBoss; - _tracker = module.FindComponent(); - } - public override void DrawArenaBackground(int pcSlot, Actor pc) { if (_tracker == null) diff --git a/BossMod/Modules/Endwalker/Criterion/C02AMR/C022Gorai/RousingReincarnation.cs b/BossMod/Modules/Endwalker/Criterion/C02AMR/C022Gorai/RousingReincarnation.cs index 5a6c53fcd4..056588c952 100644 --- a/BossMod/Modules/Endwalker/Criterion/C02AMR/C022Gorai/RousingReincarnation.cs +++ b/BossMod/Modules/Endwalker/Criterion/C02AMR/C022Gorai/RousingReincarnation.cs @@ -76,7 +76,7 @@ private void UpdateTowers() BitMask forbidden = new(0xf); var soakerSlot = (index & 1) != 0 ? orangeSoaker : blueSoaker; forbidden.Clear(soakerSlot); - Towers.Add(new(Module.Bounds.Center + 11 * (180.Degrees() - index * 45.Degrees()).ToDirection(), 4, ForbiddenSoakers: forbidden)); + Towers.Add(new(Module.Bounds.Center + 11 * (180.Degrees() - index * 45.Degrees()).ToDirection(), 4, forbiddenSoakers: forbidden)); } } } diff --git a/BossMod/Modules/Endwalker/Criterion/C03AAI/C031Ketuduke/C031KetudukeStates.cs b/BossMod/Modules/Endwalker/Criterion/C03AAI/C031Ketuduke/C031KetudukeStates.cs index 8982c6eefe..739229c6eb 100644 --- a/BossMod/Modules/Endwalker/Criterion/C03AAI/C031Ketuduke/C031KetudukeStates.cs +++ b/BossMod/Modules/Endwalker/Criterion/C03AAI/C031Ketuduke/C031KetudukeStates.cs @@ -59,7 +59,7 @@ private void FlukeGale(uint id, float delay) .SetHint(StateMachine.StateHint.PositioningStart); ComponentCondition(id + 0x50, 8, comp => comp.NumCasts >= 2, "Knockbacks 1"); ComponentCondition(id + 0x51, 2, comp => comp.NumCasts >= 4, "Knockbacks 2") - .ExecOnEnter(comp => comp.Activate(Module, 0)) // TODO: consider activating earlier?.. + .ExecOnEnter(comp => comp.Activate(0)) // TODO: consider activating earlier?.. .DeactivateOnExit() .SetHint(StateMachine.StateHint.PositioningEnd); ComponentCondition(id + 0x60, 3.1f, comp => comp.NumCasts > 0) @@ -72,7 +72,7 @@ private void BlowingBubbles(uint id, float delay) { CastMulti(id, [AID.Hydrofall, AID.Hydrobullet], delay, 4) .ActivateOnEnter() - .ExecOnEnter(comp => comp.Activate(Module, 0)); + .ExecOnEnter(comp => comp.Activate(0)); ComponentCondition(id + 0x10, 3.1f, comp => comp.Mechanics.Count > 1); Cast(id + 0x20, AID.BlowingBubbles, 3.1f, 4.2f) .ActivateOnEnter(); @@ -94,7 +94,7 @@ private void StrewnBubbles(uint id, float delay) { Cast(id, AID.Hydrofall, delay, 4) .ActivateOnEnter() - .ExecOnEnter(comp => comp.Activate(Module, 0)); + .ExecOnEnter(comp => comp.Activate(0)); Cast(id + 0x10, AID.StrewnBubbles, 3.2f, 2.2f) .ActivateOnEnter(); // first set appears ~1.4s after cast end CastStartMulti(id + 0x20, [_savage ? AID.SRecedingTwintides : AID.NRecedingTwintides, _savage ? AID.SEncroachingTwintides : AID.NEncroachingTwintides], 6.5f) @@ -115,7 +115,7 @@ private void Roar(uint id, float delay) { Cast(id, AID.Hydrobullet, delay, 4) .ActivateOnEnter() - .ExecOnEnter(comp => comp.Activate(Module, 0)); + .ExecOnEnter(comp => comp.Activate(0)); Cast(id + 0x10, AID.Roar, 3.2f, 3) .ActivateOnEnter(); // zaratans spawn ~1.2s after cast ends Cast(id + 0x20, AID.SpringCrystals, 2.6f, 2.2f) @@ -137,7 +137,7 @@ private void AngrySeas(uint id, float delay) { CastMulti(id, [AID.Hydrofall, AID.Hydrobullet], delay, 4) .ActivateOnEnter() - .ExecOnEnter(comp => comp.Activate(Module, 0)); + .ExecOnEnter(comp => comp.Activate(0)); ComponentCondition(id + 0x10, 3.1f, comp => comp.Mechanics.Count > 1); Cast(id + 0x20, AID.AngrySeas, 3.1f, 4.2f) .ActivateOnEnter() diff --git a/BossMod/Modules/Endwalker/Criterion/C03AAI/C031Ketuduke/SpringCrystals.cs b/BossMod/Modules/Endwalker/Criterion/C03AAI/C031Ketuduke/SpringCrystals.cs index d003430c69..1e2480a061 100644 --- a/BossMod/Modules/Endwalker/Criterion/C03AAI/C031Ketuduke/SpringCrystals.cs +++ b/BossMod/Modules/Endwalker/Criterion/C03AAI/C031Ketuduke/SpringCrystals.cs @@ -34,7 +34,7 @@ public override void OnActorCreated(Actor actor) pos.X += pos.X < Module.Bounds.Center.X ? 20 : -20; pos.Z += pos.Z < Module.Bounds.Center.Z ? 20 : -20; } - _aoes.Add(new(_shape, pos, actor.Rotation, WorldState.FutureTime(_delay), risky: _risky)); + _aoes.Add(new(_shape, pos, actor.Rotation, WorldState.FutureTime(_delay), Risky: _risky)); SafeZoneCenters.RemoveAll(c => _shape.Check(c, pos, actor.Rotation)); } } diff --git a/BossMod/Modules/Endwalker/DeepDungeon/EurekaOrthos/DD70Aeturna.cs b/BossMod/Modules/Endwalker/DeepDungeon/EurekaOrthos/DD70Aeturna.cs index 7ab20cb864..b738b7b16a 100644 --- a/BossMod/Modules/Endwalker/DeepDungeon/EurekaOrthos/DD70Aeturna.cs +++ b/BossMod/Modules/Endwalker/DeepDungeon/EurekaOrthos/DD70Aeturna.cs @@ -140,10 +140,10 @@ public override void OnCastStarted(Actor caster, ActorCastInfo spell) if ((AID)spell.Action.ID == AID.Ferocity) FerocityCasted = true; if (!FerocityCasted && (AID)spell.Action.ID == AID.PreternaturalTurnDonut) - foreach (var c in module.Enemies(OID.AllaganCrystal)) + foreach (var c in Module.Enemies(OID.AllaganCrystal)) _aoes.Add(new(circle, c.Position, default, spell.NPCFinishAt.AddSeconds(0.5f))); if (!FerocityCasted && (AID)spell.Action.ID == AID.PreternaturalTurnCircle) - foreach (var c in module.Enemies(OID.AllaganCrystal)) + foreach (var c in Module.Enemies(OID.AllaganCrystal)) _aoes.Add(new(cone, c.Position, c.Rotation, spell.NPCFinishAt.AddSeconds(0.5f))); } diff --git a/BossMod/Modules/Endwalker/Dungeon/D13LunarSubterrane/D132DamcyanAntilon.cs b/BossMod/Modules/Endwalker/Dungeon/D13LunarSubterrane/D132DamcyanAntilon.cs index 14c643c4ad..4fdf8c29fa 100644 --- a/BossMod/Modules/Endwalker/Dungeon/D13LunarSubterrane/D132DamcyanAntilon.cs +++ b/BossMod/Modules/Endwalker/Dungeon/D13LunarSubterrane/D132DamcyanAntilon.cs @@ -65,7 +65,7 @@ public override void OnCastFinished(Actor caster, ActorCastInfo spell) public override bool DestinationUnsafe(int slot, Actor actor, WPos pos) { - if (module.FindComponent() is var towerfall && towerfall != null && towerfall.ActiveAOEs(slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation))) + if (Module.FindComponent() is var towerfall && towerfall != null && towerfall.ActiveAOEs(slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation))) return true; if (!Module.Bounds.Contains(pos)) return true; diff --git a/BossMod/Modules/Endwalker/FATE/Chi.cs b/BossMod/Modules/Endwalker/FATE/Chi.cs index 2cbd8b593f..d5e50d7953 100644 --- a/BossMod/Modules/Endwalker/FATE/Chi.cs +++ b/BossMod/Modules/Endwalker/FATE/Chi.cs @@ -140,13 +140,13 @@ public override IEnumerable ActiveAOEs(int slot, Actor actor) yield return new(rect, _casters[i].Position, _casters[i].Rotation, _activation, ArenaColor.Danger); if (_casters.Count >= 7 && NumCasts == 0) for (int i = 2; i < 7; ++i) - yield return new(rect, _casters[i].Position, _casters[i].Rotation, _activation.AddSeconds(2.8f), risky: false); + yield return new(rect, _casters[i].Position, _casters[i].Rotation, _activation.AddSeconds(2.8f), Risky: false); if (_casters.Count >= 5 && NumCasts == 2) for (int i = 0; i < 5; ++i) yield return new(rect, _casters[i].Position, _casters[i].Rotation, _activation, ArenaColor.Danger); if (_casters.Count >= 13 && NumCasts == 2) for (int i = 5; i < 13; ++i) - yield return new(rect, _casters[i].Position, _casters[i].Rotation, _activation.AddSeconds(2.8f), risky: false); + yield return new(rect, _casters[i].Position, _casters[i].Rotation, _activation.AddSeconds(2.8f), Risky: false); if (_casters.Count >= 8 && NumCasts == 7) for (int i = 0; i < 8; ++i) yield return new(rect, _casters[i].Position, _casters[i].Rotation, _activation, ArenaColor.Danger); @@ -203,9 +203,9 @@ public override IEnumerable ActiveAOEs(int slot, Actor actor) { yield return new(combo.shape1, Module.PrimaryActor.Position, combo.rotation, combo.activation1, ArenaColor.Danger); if (!combo.offset) - yield return new(combo.shape2, Module.PrimaryActor.Position, combo.rotation, combo.activation2, risky: combo.shape1 != combo.shape2); + yield return new(combo.shape2, Module.PrimaryActor.Position, combo.rotation, combo.activation2, Risky: combo.shape1 != combo.shape2); else - yield return new(combo.shape2, Module.PrimaryActor.Position, combo.rotation + 180.Degrees(), combo.activation2, risky: combo.shape1 != combo.shape2); + yield return new(combo.shape2, Module.PrimaryActor.Position, combo.rotation + 180.Degrees(), combo.activation2, Risky: combo.shape1 != combo.shape2); } if (NumCasts == 1) { diff --git a/BossMod/Modules/Endwalker/FATE/Daivadipa.cs b/BossMod/Modules/Endwalker/FATE/Daivadipa.cs index 8ab3d8ea8f..22fa9de21d 100644 --- a/BossMod/Modules/Endwalker/FATE/Daivadipa.cs +++ b/BossMod/Modules/Endwalker/FATE/Daivadipa.cs @@ -216,11 +216,11 @@ public override bool DestinationUnsafe(int slot, Actor actor, WPos pos) { if (Module.FindComponent()?.ActiveAOEs(slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false) return true; - if (module.FindComponent()?.ActiveAOEs(slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false) + if (Module.FindComponent()?.ActiveAOEs(slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false) return true; - if (module.FindComponent() is var burn && burn != null && burn.ActiveAOEs(slot, actor).Any() && !burn.ActiveAOEs(slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation))) //safe and non-safe areas reverse by the time forced march runs out + if (Module.FindComponent() is var burn && burn != null && burn.ActiveAOEs(slot, actor).Any() && !burn.ActiveAOEs(slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation))) //safe and non-safe areas reverse by the time forced march runs out return true; - if (module.FindComponent() is var lit && lit != null && lit.ActiveAOEs(slot, actor).Any() && !lit.ActiveAOEs(slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation))) //safe and non-safe areas reverse by the time forced march runs out + if (Module.FindComponent() is var lit && lit != null && lit.ActiveAOEs(slot, actor).Any() && !lit.ActiveAOEs(slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation))) //safe and non-safe areas reverse by the time forced march runs out return true; else return false; @@ -246,7 +246,7 @@ public override void AddHints(int slot, Actor actor, TextHints hints) var backwards = actor.FindStatus(SID.AboutFace) != null; var marching = actor.FindStatus(SID.ForcedMarch) != null; var last = ForcedMovements(actor).LastOrDefault(); - if (DestinationUnsafe(slot, actor, last.to) && !marching && (forward || left || right || backwards) && ((module.FindComponent()?.ActiveAOEs(slot, actor).Any() ?? false) || (module.FindComponent()?.ActiveAOEs(slot, actor).Any() ?? false))) + if (DestinationUnsafe(slot, actor, last.to) && !marching && (forward || left || right || backwards) && ((Module.FindComponent()?.ActiveAOEs(slot, actor).Any() ?? false) || (Module.FindComponent()?.ActiveAOEs(slot, actor).Any() ?? false))) hints.Add("Aim into AOEs!"); else if (!marching) base.AddHints(slot, actor, hints); diff --git a/BossMod/Modules/Endwalker/Hunt/RankA/MoussePrincess.cs b/BossMod/Modules/Endwalker/Hunt/RankA/MoussePrincess.cs index 0a2d2f4e44..03f39ebbbf 100644 --- a/BossMod/Modules/Endwalker/Hunt/RankA/MoussePrincess.cs +++ b/BossMod/Modules/Endwalker/Hunt/RankA/MoussePrincess.cs @@ -42,7 +42,7 @@ public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.PrincessThrenodyPrepare) { - _direction = spell.Rotation + ThrenodyDirection(module); + _direction = spell.Rotation + ThrenodyDirection(); _activation = spell.NPCFinishAt.AddSeconds(2); //saw delays of upto ~0.3s higher because delay between Prepare and Resolve can vary } } @@ -53,7 +53,7 @@ public override void OnCastFinished(Actor caster, ActorCastInfo spell) _activation = default; } - private Angle ThrenodyDirection(BossModule module) + private Angle ThrenodyDirection() { foreach (var s in Module.PrimaryActor.Statuses) { diff --git a/BossMod/Modules/Endwalker/Savage/P11SThemis/InevitableLawSentence.cs b/BossMod/Modules/Endwalker/Savage/P11SThemis/InevitableLawSentence.cs index b443fe5320..cc77b335ce 100644 --- a/BossMod/Modules/Endwalker/Savage/P11SThemis/InevitableLawSentence.cs +++ b/BossMod/Modules/Endwalker/Savage/P11SThemis/InevitableLawSentence.cs @@ -43,13 +43,13 @@ private void AddPartyStacks() { Stacks.Clear(); foreach (var t in Raid.WithoutSlot(true).Where(t => t.Role == Role.Healer)) - Stacks.Add(new(t, 6, 4, Activation: Module.StateMachine.NextTransitionWithFlag(StateMachine.StateHint.Raidwide))); + Stacks.Add(new(t, 6, 4, activation: Module.StateMachine.NextTransitionWithFlag(StateMachine.StateHint.Raidwide))); } private void AddPairStacks() { Stacks.Clear(); foreach (var t in Raid.WithoutSlot(true).Where(t => t.Class.IsDD())) - Stacks.Add(new(t, 3, 2, Activation: Module.StateMachine.NextTransitionWithFlag(StateMachine.StateHint.Raidwide))); + Stacks.Add(new(t, 3, 2, activation: Module.StateMachine.NextTransitionWithFlag(StateMachine.StateHint.Raidwide))); } } diff --git a/BossMod/Modules/Endwalker/Savage/P12S1Athena/EngravementOfSouls3.cs b/BossMod/Modules/Endwalker/Savage/P12S1Athena/EngravementOfSouls3.cs index 9cf4e8b077..fc91b0f450 100644 --- a/BossMod/Modules/Endwalker/Savage/P12S1Athena/EngravementOfSouls3.cs +++ b/BossMod/Modules/Endwalker/Savage/P12S1Athena/EngravementOfSouls3.cs @@ -33,7 +33,7 @@ public override void OnCastStarted(Actor caster, ActorCastInfo spell) > 110 => ~_cross, _ => ~_towers // TODO: assign specific towers based on priorities? }; - Towers.Add(new(spell.LocXZ, Radius, ForbiddenSoakers: forbidden)); + Towers.Add(new(spell.LocXZ, Radius, forbiddenSoakers: forbidden)); } } } diff --git a/BossMod/Modules/Endwalker/Savage/P12S1Athena/EngravementOfSoulsCommon.cs b/BossMod/Modules/Endwalker/Savage/P12S1Athena/EngravementOfSoulsCommon.cs index 9fc5d84261..b6f4dd263e 100644 --- a/BossMod/Modules/Endwalker/Savage/P12S1Athena/EngravementOfSoulsCommon.cs +++ b/BossMod/Modules/Endwalker/Savage/P12S1Athena/EngravementOfSoulsCommon.cs @@ -162,6 +162,6 @@ private void AddTower(WPos pos, bool isLight, bool realCast) } } - Towers.Add(new(pos, 3, ForbiddenSoakers: _globallyForbidden | (isLight ? _lightForbidden : _darkForbidden))); + Towers.Add(new(pos, 3, forbiddenSoakers: _globallyForbidden | (isLight ? _lightForbidden : _darkForbidden))); } } diff --git a/BossMod/Modules/Endwalker/Savage/P4S1Hesperos/ElementalBelone.cs b/BossMod/Modules/Endwalker/Savage/P4S1Hesperos/ElementalBelone.cs index 5ce7df0d3b..f49816fa2d 100644 --- a/BossMod/Modules/Endwalker/Savage/P4S1Hesperos/ElementalBelone.cs +++ b/BossMod/Modules/Endwalker/Savage/P4S1Hesperos/ElementalBelone.cs @@ -12,7 +12,7 @@ public ElementalBelone(BossModule module) : base(module) var assignments = module.FindComponent()!; uint forbiddenCorners = 1; // 0 corresponds to 'unknown' corner foreach (var actor in WorldState.Actors.Where(a => a.OID == (uint)OID.Helper).Tethered(TetherID.Bloodrake)) - forbiddenCorners |= 1u << (int)assignments.FromPos(module, actor.Position); + forbiddenCorners |= 1u << (int)assignments.FromPos(actor.Position); var safeCorner = (SettingTheScene.Corner)BitOperations.TrailingZeroCount(~forbiddenCorners); _safeElement = assignments.FindElement(safeCorner); } diff --git a/BossMod/Modules/Endwalker/Savage/P7SAgdistis/ForbiddenFruit1.cs b/BossMod/Modules/Endwalker/Savage/P7SAgdistis/ForbiddenFruit1.cs index a398276315..ce97b0370d 100644 --- a/BossMod/Modules/Endwalker/Savage/P7SAgdistis/ForbiddenFruit1.cs +++ b/BossMod/Modules/Endwalker/Savage/P7SAgdistis/ForbiddenFruit1.cs @@ -2,5 +2,5 @@ class ForbiddenFruit1(BossModule module) : ForbiddenFruitCommon(module, ActionID.MakeSpell(AID.StaticMoon)) { - protected override DateTime? PredictUntetheredCastStart(Actor fruit) => WorldState.FutureTime(12.5); + protected override DateTime? PredictUntetheredCastStart(Actor fruit) => WorldState.FutureTime(12.5f); } diff --git a/BossMod/Modules/Endwalker/Savage/P8S1Hephaistos/P8S1States.cs b/BossMod/Modules/Endwalker/Savage/P8S1Hephaistos/P8S1States.cs index 2a69bde7d6..ff093c8996 100644 --- a/BossMod/Modules/Endwalker/Savage/P8S1Hephaistos/P8S1States.cs +++ b/BossMod/Modules/Endwalker/Savage/P8S1Hephaistos/P8S1States.cs @@ -70,7 +70,7 @@ private void VolcanicTorchesSunforge(uint id, float delay) CastEnd(id + 0x40, 1.4f) .ActivateOnEnter() .ActivateOnEnter() - .Raw.Enter.Add(() => Module.FindComponent()?.Show(Module)); + .ExecOnEnter(comp => comp.Show()); // note: sunforge aoe happens ~0.1s before flares ComponentCondition(id + 0x50, 1.1f, comp => !comp.Active, "Sunforge + stack/spread") .DeactivateOnExit() @@ -158,7 +158,7 @@ private void FourfoldFires(uint id, float delay) CastEnd(id + 0x90, 4.7f) .ActivateOnEnter() .ActivateOnEnter() - .Raw.Enter.Add(() => Module.FindComponent()?.Show(Module)); + .ExecOnEnter(comp => comp.Show()); // note: sunforge aoe happens ~0.1s before flares ComponentCondition(id + 0xA0, 1.1f, comp => !comp.Active, "Sunforge + stack/spread") .DeactivateOnExit() diff --git a/BossMod/Modules/Endwalker/Savage/P9SKokytos/Charibdys.cs b/BossMod/Modules/Endwalker/Savage/P9SKokytos/Charibdys.cs index 5173236089..93f8d9da1c 100644 --- a/BossMod/Modules/Endwalker/Savage/P9SKokytos/Charibdys.cs +++ b/BossMod/Modules/Endwalker/Savage/P9SKokytos/Charibdys.cs @@ -108,7 +108,7 @@ public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.EclipticMeteor) { - Modify(actor.Position, module.Enemies(OID.Comet).Where(c => c != actor && !Comet.IsFinished(c)).Select(c => (c.Position, c.HitboxRadius))); + Modify(actor.Position, Module.Enemies(OID.Comet).Where(c => c != actor && !Comet.IsFinished(c)).Select(c => (c.Position, c.HitboxRadius))); } } } diff --git a/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/Narkissos.cs b/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/Narkissos.cs index b0b42dc2f1..0121d1cc45 100644 --- a/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/Narkissos.cs +++ b/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/Narkissos.cs @@ -38,7 +38,7 @@ public enum SID : uint class Brainstorm(BossModule module) : Components.StatusDrivenForcedMarch(module, 2, (uint)SID.ForwardMarch, (uint)SID.AboutFace, (uint)SID.LeftFace, (uint)SID.RightFace) { - public override bool DestinationUnsafe(int slot, Actor actor, WPos pos) => module.FindComponent()?.ActiveAOEs(slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false; + public override bool DestinationUnsafe(int slot, Actor actor, WPos pos) => Module.FindComponent()?.ActiveAOEs(slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false; } class FetchingFulgence(BossModule module) : Components.CastGaze(module, ActionID.MakeSpell(AID.FetchingFulgence)); diff --git a/BossMod/Modules/Endwalker/Ultimate/DSW2/DSW2States.cs b/BossMod/Modules/Endwalker/Ultimate/DSW2/DSW2States.cs index 7ed8bbc5d3..f46dadb4da 100644 --- a/BossMod/Modules/Endwalker/Ultimate/DSW2/DSW2States.cs +++ b/BossMod/Modules/Endwalker/Ultimate/DSW2/DSW2States.cs @@ -404,7 +404,7 @@ private void P5WrathOfHeavens(uint id, float delay) .DeactivateOnExit() .DeactivateOnExit(); // twisters disappear together with protean hits ComponentCondition(id + 0x210, 0.9f, comp => comp.Casters.Count > 0, "Green marker bait") - .ExecOnEnter(comp => comp.ShowSpreads(Module, 5.2f)) + .ExecOnEnter(comp => comp.ShowSpreads(5.2f)) .ActivateOnEnter() .ActivateOnEnter() .ActivateOnEnter() // first cast starts right as proteans resolve @@ -552,7 +552,7 @@ private void P6HallowedWingsPlume1(uint id, float delay) .SetHint(StateMachine.StateHint.Tankbuster); ComponentCondition(id + 0x100, 8.7f, comp => comp.Progress > 1, "Mortal vow pass 1") - .ExecOnEnter(comp => comp.ShowNextPass(_module)); + .ExecOnEnter(comp => comp.ShowNextPass()); } private void P6HallowedWingsPlume2(uint id, float delay) @@ -567,7 +567,7 @@ private void P6HallowedWingsPlume2(uint id, float delay) .DeactivateOnExit(); // tankbusters happen at the same time as wings ComponentCondition(id + 0x100, 8.7f, comp => comp.Progress > 3, "Mortal vow pass 3") - .ExecOnEnter(comp => comp.ShowNextPass(_module)); + .ExecOnEnter(comp => comp.ShowNextPass()); } private void P6WrothFlames(uint id, float delay) @@ -601,7 +601,7 @@ private void P6WrothFlames(uint id, float delay) .DeactivateOnExit(); ComponentCondition(id + 0x100, 4.0f, comp => comp.Progress > 2, "Mortal vow pass 2") - .ExecOnEnter(comp => comp.ShowNextPass(_module)); + .ExecOnEnter(comp => comp.ShowNextPass()); // note: voidzones disappear slightly later... } @@ -617,7 +617,7 @@ private void P6Touchdown(uint id, float delay) .DeactivateOnExit(); ActorCastStart(id + 0x100, _module.NidhoggP6, AID.RevengeOfTheHordeP6, 1.2f, true) - .ExecOnEnter(comp => comp.ShowNextPass(_module)); + .ExecOnEnter(comp => comp.ShowNextPass()); ComponentCondition(id + 0x101, 2.3f, comp => comp.Progress > 4, "Mortal vow pass 4") .DeactivateOnExit(); ActorCastEnd(id + 0x102, _module.NidhoggP6, 22.7f, true, "Enrage"); diff --git a/BossMod/Modules/Endwalker/Ultimate/DSW2/P2SanctityOfTheWard2.cs b/BossMod/Modules/Endwalker/Ultimate/DSW2/P2SanctityOfTheWard2.cs index 3f6082ce76..ad3e3a9432 100644 --- a/BossMod/Modules/Endwalker/Ultimate/DSW2/P2SanctityOfTheWard2.cs +++ b/BossMod/Modules/Endwalker/Ultimate/DSW2/P2SanctityOfTheWard2.cs @@ -587,7 +587,7 @@ public override void OnCastStarted(Actor caster, ActorCastInfo spell) { var index = ClassifyTower(spell.LocXZ); var forbidden = Raid.WithSlot(true).WhereSlot(s => _playerTowers[s] >= 0 && _playerTowers[s] != index).Mask(); - Towers.Add(new(spell.LocXZ, Radius, ForbiddenSoakers: forbidden)); + Towers.Add(new(spell.LocXZ, Radius, forbiddenSoakers: forbidden)); } } diff --git a/BossMod/Modules/Endwalker/Ultimate/DSW2/P2StrengthOfTheWard2.cs b/BossMod/Modules/Endwalker/Ultimate/DSW2/P2StrengthOfTheWard2.cs index 463ba7acba..b807268a92 100644 --- a/BossMod/Modules/Endwalker/Ultimate/DSW2/P2StrengthOfTheWard2.cs +++ b/BossMod/Modules/Endwalker/Ultimate/DSW2/P2StrengthOfTheWard2.cs @@ -191,6 +191,6 @@ class P2StrengthOfTheWard2Towers(BossModule module) : Components.CastTowers(modu public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) - Towers.Add(new(spell.LocXZ, Radius, ForbiddenSoakers: Raid.WithSlot(true).WhereActor(p => p.Role == Role.Tank).Mask())); + Towers.Add(new(spell.LocXZ, Radius, forbiddenSoakers: Raid.WithSlot(true).WhereActor(p => p.Role == Role.Tank).Mask())); } } diff --git a/BossMod/Modules/Endwalker/Ultimate/TOP/P5Delta.cs b/BossMod/Modules/Endwalker/Ultimate/TOP/P5Delta.cs index 97a73283a9..ebda79e5e3 100644 --- a/BossMod/Modules/Endwalker/Ultimate/TOP/P5Delta.cs +++ b/BossMod/Modules/Endwalker/Ultimate/TOP/P5Delta.cs @@ -426,7 +426,7 @@ public override IEnumerable ActiveAOEs(int slot, Actor actor) var angle = Angle.FromDirection(actor.Position - pos); for (int j = 0; j < _numRepeats; ++j) { - yield return new(_shape, pos, angle + j * _delta.ArmRotations[i], risky: false); + yield return new(_shape, pos, angle + j * _delta.ArmRotations[i], Risky: false); } } } diff --git a/BossMod/Modules/Endwalker/Unreal/Un5Thordan/SpiralThrust.cs b/BossMod/Modules/Endwalker/Unreal/Un5Thordan/SpiralThrust.cs index e14d7679ce..4e3992fc0c 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un5Thordan/SpiralThrust.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un5Thordan/SpiralThrust.cs @@ -30,7 +30,7 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) if ((OID)caster.OID is OID.Vellguine or OID.Paulecrain or OID.Ignasse && (caster.Position - Module.Bounds.Center).LengthSq() > 25 * 25) { // prediction - _aoes.Add(new(_shape, caster.Position, Angle.FromDirection(Module.Bounds.Center - caster.Position), WorldState.FutureTime(_predictionDelay), risky: false)); + _aoes.Add(new(_shape, caster.Position, Angle.FromDirection(Module.Bounds.Center - caster.Position), WorldState.FutureTime(_predictionDelay), Risky: false)); } break; case AID.SpiralThrust: diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage07AChorusSlime/Stage07Act2.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage07AChorusSlime/Stage07Act2.cs index 6eb70b60bf..0a8fe4ca13 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage07AChorusSlime/Stage07Act2.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage07AChorusSlime/Stage07Act2.cs @@ -26,7 +26,7 @@ public override void DrawArenaForeground(int pcSlot, Actor pc) public override void AddHints(int slot, Actor actor, TextHints hints) { - foreach (var p in module.Enemies(OID.Boss).Where(x => !x.IsDead)) + foreach (var p in Module.Enemies(OID.Boss).Where(x => !x.IsDead)) if (actor.Position.InCircle(p.Position, 7.5f)) hints.Add("In slime explosion radius!"); } diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage07AChorusSlime/Stage07Act3.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage07AChorusSlime/Stage07Act3.cs index fc312d1149..f9e4312001 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage07AChorusSlime/Stage07Act3.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage07AChorusSlime/Stage07Act3.cs @@ -29,7 +29,7 @@ public override void DrawArenaForeground(int pcSlot, Actor pc) public override void AddHints(int slot, Actor actor, TextHints hints) { - foreach (var p in module.Enemies(OID.Slime).Where(x => !x.IsDead)) + foreach (var p in Module.Enemies(OID.Slime).Where(x => !x.IsDead)) if (actor.Position.InCircle(p.Position, 7.5f)) hints.Add("In slime explosion radius!"); } diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage17TheSwordOfMusic/Stage17Act1.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage17TheSwordOfMusic/Stage17Act1.cs index 70120b136f..da8f75e3b1 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage17TheSwordOfMusic/Stage17Act1.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage17TheSwordOfMusic/Stage17Act1.cs @@ -24,7 +24,7 @@ public override void AddGlobalHints(GlobalHints hints) if (!Module.PrimaryActor.IsDead) hints.Add($"{Module.PrimaryActor.Name} counters magical damage!"); if (!Module.Enemies(OID.RightClaw).All(e => e.IsDead)) - hints.Add($"{module.Enemies(OID.RightClaw).FirstOrDefault()!.Name} counters physical damage!"); + hints.Add($"{Module.Enemies(OID.RightClaw).FirstOrDefault()!.Name} counters physical damage!"); } } diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage26PapaMia/Stage26Act2.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage26PapaMia/Stage26Act2.cs index 3be605d0e7..d58f904b84 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage26PapaMia/Stage26Act2.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage26PapaMia/Stage26Act2.cs @@ -55,7 +55,7 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) public override bool DestinationUnsafe(int slot, Actor actor, WPos pos) { - if (module.FindComponent()?.ActiveAOEs(slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false) + if (Module.FindComponent()?.ActiveAOEs(slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false) return true; if (!Module.Bounds.Contains(pos)) return true; diff --git a/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/D60TheBlackRider.cs b/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/D60TheBlackRider.cs index 498a1b92a0..12509650cd 100644 --- a/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/D60TheBlackRider.cs +++ b/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/D60TheBlackRider.cs @@ -69,8 +69,8 @@ class ValfodrKB(BossModule module) : Components.Knockback(module) // note actual public override IEnumerable Sources(int slot, Actor actor) { - if (module.FindComponent()?.CurrentBaits.Count > 0) - yield return new(Module.PrimaryActor.Position, 25, _activation, module.FindComponent()!.CurrentBaits[0].Shape, Angle.FromDirection(module.FindComponent()!.CurrentBaits[0].Target.Position - Module.PrimaryActor.Position), Kind: Kind.DirForward); + if (Module.FindComponent()?.CurrentBaits.Count > 0) + yield return new(Module.PrimaryActor.Position, 25, _activation, Module.FindComponent()!.CurrentBaits[0].Shape, Angle.FromDirection(Module.FindComponent()!.CurrentBaits[0].Target.Position - Module.PrimaryActor.Position), Kind: Kind.DirForward); } public override void OnCastStarted(Actor caster, ActorCastInfo spell) @@ -82,7 +82,7 @@ public override void OnCastStarted(Actor caster, ActorCastInfo spell) } } - public override bool DestinationUnsafe(int slot, Actor actor, WPos pos) => (module.FindComponent()?.ActiveAOEs(slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false) || (module.FindComponent()?.ActiveAOEs(slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false); + public override bool DestinationUnsafe(int slot, Actor actor, WPos pos) => (Module.FindComponent()?.ActiveAOEs(slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false) || (Module.FindComponent()?.ActiveAOEs(slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false); } class D60TheBlackRiderStates : StateMachineBuilder diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/Ex2GarudaStates.cs b/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/Ex2GarudaStates.cs index 0649e3b917..6de2797d70 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/Ex2GarudaStates.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex2Garuda/Ex2GarudaStates.cs @@ -10,7 +10,7 @@ public Ex2GarudaStates(Ex2Garuda module) : base(module) SimplePhase(0, Phase1, "Plumes") .ActivateOnEnter() .ActivateOnEnter() - .Raw.Update = () => _Module.PrimaryActor.IsDestroyed || _module.Chirada.Count + _module.Suparna.Count > 0; + .Raw.Update = () => _module.PrimaryActor.IsDestroyed || _module.Chirada.Count + _module.Suparna.Count > 0; DeathPhase(1, Phase2) .ActivateOnEnter() .ActivateOnEnter() diff --git a/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/Ex3TitanStates.cs b/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/Ex3TitanStates.cs index 807070c273..6ad4863a31 100644 --- a/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/Ex3TitanStates.cs +++ b/BossMod/Modules/RealmReborn/Extreme/Ex3Titan/Ex3TitanStates.cs @@ -184,7 +184,7 @@ private void Tumult(uint id, float delay) .SetHint(StateMachine.StateHint.Raidwide); } - private void Geocrush(uint id, float delay, float newRadius = 0) where Crush : Geocrush, new() + private void Geocrush(uint id, float delay, float newRadius = 0) where Crush : Geocrush { Targetable(id, false, delay, "Disappear") .ActivateOnEnter(); diff --git a/BossMod/Modules/RealmReborn/Raid/T04Gauntlet/T04Gauntlet.cs b/BossMod/Modules/RealmReborn/Raid/T04Gauntlet/T04Gauntlet.cs index e0f9c255d2..dcc4611e57 100644 --- a/BossMod/Modules/RealmReborn/Raid/T04Gauntlet/T04Gauntlet.cs +++ b/BossMod/Modules/RealmReborn/Raid/T04Gauntlet/T04Gauntlet.cs @@ -35,7 +35,7 @@ class GravityThrustPox(BossModule module) : Components.GenericAOEs(module, defau public override IEnumerable ActiveAOEs(int slot, Actor actor) { - foreach (var c in ((T04Gauntlet)module).Rooks.Where(a => a.CastInfo?.TargetID == actor.InstanceID)) + foreach (var c in ((T04Gauntlet)Module).Rooks.Where(a => a.CastInfo?.TargetID == actor.InstanceID)) yield return new(_shape, c.Position, c.CastInfo!.Rotation, c.CastInfo.NPCFinishAt); } } diff --git a/BossMod/Modules/RealmReborn/Raid/T05Twintania/Phase3.cs b/BossMod/Modules/RealmReborn/Raid/T05Twintania/Phase3.cs index 8ec7fc3c89..3280f3fdf4 100644 --- a/BossMod/Modules/RealmReborn/Raid/T05Twintania/Phase3.cs +++ b/BossMod/Modules/RealmReborn/Raid/T05Twintania/Phase3.cs @@ -83,11 +83,11 @@ public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (var a in ActiveHygieia) { - arena.Actor(a, ArenaColor.Enemy); - arena.AddCircle(a.Position, _explosionRadius, ArenaColor.Danger); + Arena.Actor(a, ArenaColor.Enemy); + Arena.AddCircle(a.Position, _explosionRadius, ArenaColor.Danger); } foreach (var a in Asclepius) - arena.Actor(a, ArenaColor.Enemy); + Arena.Actor(a, ArenaColor.Enemy); } } diff --git a/BossMod/Modules/RealmReborn/Trial/T03GarudaN/T03GarudaN.cs b/BossMod/Modules/RealmReborn/Trial/T03GarudaN/T03GarudaN.cs index a5b9077192..9a922ac839 100644 --- a/BossMod/Modules/RealmReborn/Trial/T03GarudaN/T03GarudaN.cs +++ b/BossMod/Modules/RealmReborn/Trial/T03GarudaN/T03GarudaN.cs @@ -51,7 +51,7 @@ class EyeOfTheStorm(BossModule module) : Components.GenericAOEs(module, ActionID public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (NumCasts > 0) - foreach (var c in module.Enemies(OID.EyeOfTheStormHelper)) + foreach (var c in Module.Enemies(OID.EyeOfTheStormHelper)) yield return new(_shape, c.Position); } } diff --git a/BossMod/Modules/Shadowbringers/Dungeon/D01Holminster/D011ForgivenDissonance.cs b/BossMod/Modules/Shadowbringers/Dungeon/D01Holminster/D011ForgivenDissonance.cs index 5ddf448d64..5365f25b03 100644 --- a/BossMod/Modules/Shadowbringers/Dungeon/D01Holminster/D011ForgivenDissonance.cs +++ b/BossMod/Modules/Shadowbringers/Dungeon/D01Holminster/D011ForgivenDissonance.cs @@ -22,17 +22,11 @@ public enum AID : uint } class Thumbscrew(BossModule module) : Components.ChargeAOEs(module, ActionID.MakeSpell(AID.Thumbscrew), 4); - class ThePathofLight(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.ThePathOfLight)); - class GibbetCage(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.GibbetCage), new AOEShapeCircle(8)); - class HereticsFork(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HereticsFork), new AOEShapeCross(40, 3)); - class LightShot(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.LightShot), new AOEShapeRect(40, 2)); - class WoodenHorse(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.WoodenHorse), new AOEShapeCone(40, 45.Degrees())); - class Pillory(BossModule module) : Components.SingleTargetDelayableCast(module, ActionID.MakeSpell(AID.Pillory)); class D011ForgivenDissonanceStates : StateMachineBuilder diff --git a/BossMod/Modules/Shadowbringers/Dungeon/D01Holminster/D012TesleentheForgiven.cs b/BossMod/Modules/Shadowbringers/Dungeon/D01Holminster/D012TesleentheForgiven.cs index bac338da74..cc784ba74c 100644 --- a/BossMod/Modules/Shadowbringers/Dungeon/D01Holminster/D012TesleentheForgiven.cs +++ b/BossMod/Modules/Shadowbringers/Dungeon/D01Holminster/D012TesleentheForgiven.cs @@ -34,10 +34,9 @@ public enum IconID : uint } class TheTickler(BossModule module) : Components.SingleTargetDelayableCast(module, ActionID.MakeSpell(AID.TheTickler)); - class ScoldsBridle(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.ScoldsBridle)); -class FeveredFlagellation : Components.GenericBaitAway +class FeveredFlagellation(BossModule module) : Components.GenericBaitAway(module) { public override void Update() { @@ -60,7 +59,6 @@ public override void OnEventIcon(Actor actor, uint iconID) } class Exorcise(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.ExorciseA), 6); - class HolyWater(BossModule module) : Components.PersistentVoidzoneAtCastTarget(module, 6, ActionID.MakeSpell(AID.HolyWater), m => m.Enemies(OID.HolyWaterVoidzone).Where(z => z.EventState != 7), 0.8f); class D012TesleentheForgivenStates : StateMachineBuilder diff --git a/BossMod/Modules/Shadowbringers/Dungeon/D01Holminster/D013Philia.cs b/BossMod/Modules/Shadowbringers/Dungeon/D01Holminster/D013Philia.cs index c016e675ad..0520a91547 100644 --- a/BossMod/Modules/Shadowbringers/Dungeon/D01Holminster/D013Philia.cs +++ b/BossMod/Modules/Shadowbringers/Dungeon/D01Holminster/D013Philia.cs @@ -54,12 +54,10 @@ public enum SID : uint } class SludgeVoidzone(BossModule module) : Components.PersistentVoidzone(module, 9.8f, m => m.Enemies(OID.SludgeVoidzone).Where(z => z.EventState != 7)); - class ScavengersDaughter(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.ScavengersDaughter)); - class HeadCrusher(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.HeadCrusher)); -class Chains : BossComponent +class Chains(BossModule module) : BossComponent(module) { private bool chained; private bool chainsactive; @@ -117,7 +115,7 @@ public override void OnCastFinished(Actor caster, ActorCastInfo spell) } } -class Aethersup : Components.GenericAOEs +class Aethersup(BossModule module) : Components.GenericAOEs(module) { private DateTime _activation; private Angle _rotation; @@ -126,7 +124,7 @@ class Aethersup : Components.GenericAOEs public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_activation != default) - yield return new(cone, Module.PrimaryActor.Position, _rotation, _activation, risky: module.Enemies(OID.IronChain).All(x => x.IsDead)); + yield return new(cone, Module.PrimaryActor.Position, _rotation, _activation, Risky: Module.Enemies(OID.IronChain).All(x => x.IsDead)); } public override void OnCastStarted(Actor caster, ActorCastInfo spell) @@ -155,7 +153,7 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } } -class PendulumFlare : Components.GenericBaitAway +class PendulumFlare(BossModule module) : Components.GenericBaitAway(module) { private bool targeted; private Actor? target; @@ -196,15 +194,12 @@ public override void AddHints(int slot, Actor actor, TextHints hints) } class PendulumAOE(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.PendulumAOE3), 15); - class LeftKnout(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.LeftKnout), new AOEShapeCone(24, 105.Degrees())); - class RightKnout(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RightKnout), new AOEShapeCone(24, 105.Degrees())); - class Taphephobia(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.Taphephobia2), 6); // TODO: create and use generic 'line stack' component -class IntoTheLight : Components.GenericBaitAway +class IntoTheLight(BossModule module) : Components.GenericBaitAway(module) { private Actor? target; @@ -239,13 +234,13 @@ public override void AddHints(int slot, Actor actor, TextHints hints) public override void DrawArenaBackground(int pcSlot, Actor pc) { foreach (var bait in CurrentBaits) - bait.Shape.Draw(arena, BaitOrigin(bait), bait.Rotation, ArenaColor.SafeFromAOE); + bait.Shape.Draw(Arena, BaitOrigin(bait), bait.Rotation, ArenaColor.SafeFromAOE); } public override void DrawArenaForeground(int pcSlot, Actor pc) { } } -class CatONineTails : Components.GenericRotatingAOE +class CatONineTails(BossModule module) : Components.GenericRotatingAOE(module) { private static readonly AOEShapeCone _shape = new(25, 60.Degrees()); @@ -262,7 +257,7 @@ public override void OnCastFinished(Actor caster, ActorCastInfo spell) } } -class FierceBeating : Components.Exaflare +class FierceBeating(BossModule module) : Components.Exaflare(module, 4) { private readonly List _casters = []; private int linesstartedcounttotal; @@ -272,18 +267,16 @@ class FierceBeating : Components.Exaflare private DateTime _activation; private const float RadianConversion = 45 * (MathF.PI / 180); - public FierceBeating() : base(4) { } - public override IEnumerable ActiveAOEs(int slot, Actor actor) { - foreach (var (c, t, r) in FutureAOEs(WorldState.CurrentTime)) - yield return new(Shape, c, activation: t, color: FutureColor); + foreach (var (c, t, r) in FutureAOEs()) + yield return new(Shape, c, r, t, FutureColor); foreach (var (c, t, r) in ImminentAOEs()) - yield return new(Shape, c, activation: t, color: ImminentColor); + yield return new(Shape, c, r, t, ImminentColor); if (Lines.Count > 0 && linesstartedcount1 < 8) - yield return new(circle, CalculateCirclePosition(linesstartedcount1, Module.Bounds.Center, _casters[0]), activation: _activation.AddSeconds(linesstartedcount1 * 3.7f)); + yield return new(circle, CalculateCirclePosition(linesstartedcount1, Module.Bounds.Center, _casters[0]), default, _activation.AddSeconds(linesstartedcount1 * 3.7f)); if (Lines.Count > 1 && linesstartedcount2 < 8) - yield return new(circle, CalculateCirclePosition(linesstartedcount2, Module.Bounds.Center, _casters[1]), activation: _activation.AddSeconds(linesstartedcount2 * 3.7f)); + yield return new(circle, CalculateCirclePosition(linesstartedcount2, Module.Bounds.Center, _casters[1]), default, _activation.AddSeconds(linesstartedcount2 * 3.7f)); } private static WPos CalculateCirclePosition(int count, WPos origin, WPos caster) @@ -336,14 +329,14 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) if ((AID)spell.Action.ID is AID.FierceBeating4 or AID.FierceBeating6) { int index = Lines.FindIndex(item => item.Next.AlmostEqual(caster.Position, 1)); - AdvanceLine(module, Lines[index], caster.Position); + AdvanceLine(Lines[index], caster.Position); if (Lines[index].ExplosionsLeft == 0) Lines.RemoveAt(index); } if ((AID)spell.Action.ID == AID.FierceBeating5) { int index = Lines.FindIndex(item => item.Next.AlmostEqual(spell.TargetXZ, 1)); - AdvanceLine(module, Lines[index], spell.TargetXZ); + AdvanceLine(Lines[index], spell.TargetXZ); if (Lines[index].ExplosionsLeft == 0) Lines.RemoveAt(index); } diff --git a/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D030RonkanDreamer.cs b/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D030RonkanDreamer.cs index 7aa3737231..4942262a53 100644 --- a/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D030RonkanDreamer.cs +++ b/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D030RonkanDreamer.cs @@ -29,10 +29,9 @@ public enum TetherID : uint } class RonkanFire(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.RonkanFire)); - class RonkanAbyss(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.RonkanAbyss), 6); -class WrathOfTheRonka : Components.GenericAOEs +class WrathOfTheRonka(BossModule module) : Components.GenericAOEs(module) { private List _casters = new(); private static readonly AOEShapeRect RectShort = new(12, 4); @@ -88,7 +87,7 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } } -public class Layout : BossComponent +public class Layout(BossModule module) : BossComponent(module) { private static IEnumerable Wall1() { @@ -125,13 +124,13 @@ public override void DrawArenaForeground(int pcSlot, Actor pc) { if (Module.PrimaryActor.Position.AlmostEqual(new(0, 634), 1)) { - arena.AddPolygon(Wall1(), ArenaColor.Border, 2); - arena.AddPolygon(Wall2(), ArenaColor.Border, 2); + Arena.AddPolygon(Wall1(), ArenaColor.Border, 2); + Arena.AddPolygon(Wall2(), ArenaColor.Border, 2); } if (Module.PrimaryActor.Position.AlmostEqual(new(0, 428), 1)) { - arena.AddPolygon(Wall3(), ArenaColor.Border, 2); - arena.AddPolygon(Wall4(), ArenaColor.Border, 2); + Arena.AddPolygon(Wall3(), ArenaColor.Border, 2); + Arena.AddPolygon(Wall4(), ArenaColor.Border, 2); } } @@ -167,9 +166,8 @@ public D030RonkanDreamerStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 651, NameID = 8639)] -public class D030RonkanDreamer : BossModule +public class D030RonkanDreamer(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(0, 0), 0)) { - public D030RonkanDreamer(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(0, 0), 0)) { } protected override void UpdateModule() { if (PrimaryActor.Position.AlmostEqual(new(0, 634), 1)) diff --git a/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D031Lozatl.cs b/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D031Lozatl.cs index 533c9e091d..13e3a7d713 100644 --- a/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D031Lozatl.cs +++ b/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D031Lozatl.cs @@ -21,16 +21,12 @@ public enum AID : uint } class LozatlsFuryA(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.LozatlsFuryA), new AOEShapeRect(60, 20, directionOffset: 90.Degrees())); // TODO: verify; there should not be an offset in reality here..., also double halfwidth is strange - class LozatlsFuryB(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.LozatlsFuryB), new AOEShapeRect(60, 20, directionOffset: -90.Degrees())); // TODO: verify; there should not be an offset in reality here..., also double halfwidth is strange - class Stonefist(BossModule module) : Components.SingleTargetDelayableCast(module, ActionID.MakeSpell(AID.Stonefist)); - class LozatlsScorn(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.LozatlsScorn)); - class SunToss(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.SunToss), 5); -class RonkanLight : Components.GenericAOEs +class RonkanLight(BossModule module) : Components.GenericAOEs(module) { private static readonly AOEShapeRect rect = new(60, 20); //TODO: double halfwidth is strange private AOEInstance? _aoe; diff --git a/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D032Batsquatch.cs b/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D032Batsquatch.cs index 76ecf04d34..98fbcf4d37 100644 --- a/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D032Batsquatch.cs +++ b/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D032Batsquatch.cs @@ -20,17 +20,11 @@ public enum AID : uint } class Towerfall(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Towerfall), new AOEShapeCone(15, 15.Degrees())); - class Soundwave(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.Soundwave), "Raidwide + towers fall"); - class Subsonics(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.Subsonics), "Raidwide x11"); - class RipperFang(BossModule module) : Components.SingleTargetDelayableCast(module, ActionID.MakeSpell(AID.RipperFang)); - class FallingBoulder(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.FallingBoulder), new AOEShapeCircle(4)); - class FallingRock(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.FallingRock), new AOEShapeCircle(3)); - class FallingRock2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.FallingRock2), new AOEShapeCircle(2)); class D032BatsquatchStates : StateMachineBuilder diff --git a/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D033Eros.cs b/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D033Eros.cs index 13de297bb8..d4a3898ae5 100644 --- a/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D033Eros.cs +++ b/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D033Eros.cs @@ -45,13 +45,13 @@ public enum TetherID : uint HoundOutOfHeavenTetherStretch = 57, // Boss->player } -class HoundOutOfHeavenGood : Components.BaitAwayTethers //TODO: consider generalizing stretched tethers? +class HoundOutOfHeavenGood(BossModule module) : Components.BaitAwayTethers(module, new AOEShapeCone(0, 0.Degrees()), (uint)TetherID.HoundOutOfHeavenTetherGood) // TODO: consider generalizing stretched tethers? { private ulong target; - public HoundOutOfHeavenGood() : base(new AOEShapeCone(0, 0.Degrees()), (uint)TetherID.HoundOutOfHeavenTetherGood) { } + public override void OnTethered(Actor source, ActorTetherInfo tether) { - base.OnTethered(module, source, tether); + base.OnTethered(source, tether); if (tether.ID == (uint)TetherID.HoundOutOfHeavenTetherGood) target = tether.Target; } @@ -62,9 +62,9 @@ public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (var b in ActiveBaits) { - if (arena.Config.ShowOutlinesAndShadows) - arena.AddLine(b.Source.Position, b.Target.Position, 0xFF000000, 2); - arena.AddLine(b.Source.Position, b.Target.Position, ArenaColor.Safe); + if (Arena.Config.ShowOutlinesAndShadows) + Arena.AddLine(b.Source.Position, b.Target.Position, 0xFF000000, 2); + Arena.AddLine(b.Source.Position, b.Target.Position, ArenaColor.Safe); } } } @@ -83,13 +83,13 @@ public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignme } } -class HoundOutOfHeavenBad : Components.BaitAwayTethers +class HoundOutOfHeavenBad(BossModule module) : Components.BaitAwayTethers(module, new AOEShapeCone(0, 0.Degrees()), (uint)TetherID.HoundOutOfHeavenTetherStretch) { private ulong target; - public HoundOutOfHeavenBad() : base(new AOEShapeCone(0, 0.Degrees()), (uint)TetherID.HoundOutOfHeavenTetherStretch) { } + public override void OnTethered(Actor source, ActorTetherInfo tether) { - base.OnTethered(module, source, tether); + base.OnTethered(source, tether); if (tether.ID == (uint)TetherID.HoundOutOfHeavenTetherStretch) target = tether.Target; } @@ -100,9 +100,9 @@ public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (var b in ActiveBaits) { - if (arena.Config.ShowOutlinesAndShadows) - arena.AddLine(b.Source.Position, b.Target.Position, 0xFF000000, 2); - arena.AddLine(b.Source.Position, b.Target.Position, ArenaColor.Danger); + if (Arena.Config.ShowOutlinesAndShadows) + Arena.AddLine(b.Source.Position, b.Target.Position, 0xFF000000, 2); + Arena.AddLine(b.Source.Position, b.Target.Position, ArenaColor.Danger); } } } @@ -122,17 +122,13 @@ public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignme } class ViperPoisonPatterns(BossModule module) : Components.PersistentVoidzoneAtCastTarget(module, 6, ActionID.MakeSpell(AID.ViperPoisonPatterns), m => m.Enemies(OID.PoisonVoidzone).Where(z => z.EventState != 7), 0); - class ConfessionOfFaithLeft(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ConfessionOfFaithLeft), new AOEShapeCone(60, 46.Degrees(), 20.Degrees())); // TODO: verify; there should not be an offset in reality here... - class ConfessionOfFaithRight(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ConfessionOfFaithRight), new AOEShapeCone(60, 46.Degrees(), -20.Degrees())); // TODO: verify; there should not be an offset in reality here... class ConfessionOfFaithStack(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.ConfessionOfFaithStack), 6); - class ConfessionOfFaithCenter(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ConfessionOfFaithCenter), new AOEShapeCone(60, 40.Degrees())); - class ConfessionOfFaithSpread(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.ConfessionOfFaithSpread), 5); -class ViperPoisonBait : Components.GenericBaitAway +class ViperPoisonBait(BossModule module) : Components.GenericBaitAway(module) { private bool targeted; private Actor? target; @@ -171,27 +167,24 @@ public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignme } } -class Inhale : Components.KnockbackFromCastTarget +class Inhale(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.Inhale), 50, kind: Kind.TowardsOrigin) { - public Inhale() : base(ActionID.MakeSpell(AID.Inhale), 50, kind: Kind.TowardsOrigin) { } - //TODO: consider testing if path is unsafe in addition to destination - public override bool DestinationUnsafe(BossModule module, int slot, Actor actor, WPos pos) => module.FindComponent()?.ActiveAOEs(module, slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false; + public override bool DestinationUnsafe(int slot, Actor actor, WPos pos) => Module.FindComponent()?.ActiveAOEs(slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false; } class HeavingBreath : Components.KnockbackFromCastTarget { - public HeavingBreath() : base(ActionID.MakeSpell(AID.HeavingBreath), 35, kind: Kind.DirForward) + public HeavingBreath(BossModule module) : base(module, ActionID.MakeSpell(AID.HeavingBreath), 35, kind: Kind.DirForward) { StopAtWall = true; } //TODO: consider testing if path is unsafe in addition to destination - public override bool DestinationUnsafe(BossModule module, int slot, Actor actor, WPos pos) => module.FindComponent()?.ActiveAOEs(module, slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false; + public override bool DestinationUnsafe(int slot, Actor actor, WPos pos) => Module.FindComponent()?.ActiveAOEs(slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false; } class Glossolalia(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.Glossolalia)); - class Rend(BossModule module) : Components.SingleTargetDelayableCast(module, ActionID.MakeSpell(AID.Rend)); class D033ErosStates : StateMachineBuilder diff --git a/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D050ForgivenPrejudice.cs b/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D050ForgivenPrejudice.cs index b67a12c5ee..73a9a87036 100644 --- a/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D050ForgivenPrejudice.cs +++ b/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D050ForgivenPrejudice.cs @@ -22,10 +22,8 @@ public enum AID : uint class SanctifiedAero(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.SanctifiedAero), new AOEShapeRect(40, 4)); -class PunitiveLight : Components.CastInterruptHint -{ //Note: this attack is a r20 circle, not drawing it because it is too big and the damage not all that high even if interrupt/stun fails - public PunitiveLight() : base(ActionID.MakeSpell(AID.PunitiveLight), true, true, "Raidwide", true) { } -} +//Note: this attack is a r20 circle, not drawing it because it is too big and the damage not all that high even if interrupt/stun fails +class PunitiveLight(BossModule module) : Components.CastInterruptHint(module, ActionID.MakeSpell(AID.PunitiveLight), true, true, "Raidwide", true); class Sanctification(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Sanctification), new AOEShapeCone(12, 45.Degrees())); @@ -42,9 +40,8 @@ public D050ForgivenPrejudiceStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 659, NameID = 8269)] -public class D050ForgivenPrejudice : SimpleBossModule +public class D050ForgivenPrejudice(WorldState ws, Actor primary) : SimpleBossModule(ws, primary) { - public D050ForgivenPrejudice(WorldState ws, Actor primary) : base(ws, primary) { } protected override void DrawEnemies(int pcSlot, Actor pc) { foreach (var s in Enemies(OID.Boss)) @@ -55,7 +52,7 @@ protected override void DrawEnemies(int pcSlot, Actor pc) Arena.Actor(s, ArenaColor.Enemy); foreach (var s in Enemies(OID.ForgivenVenery)) Arena.Actor(s, ArenaColor.Enemy); - } + protected override bool CheckPull() { return (!Enemies(OID.ForgivenApathy).Any(e => e.InCombat) || !Enemies(OID.ForgivenApathy).Any(e => e.IsTargetable)) && PrimaryActor.IsTargetable && PrimaryActor.InCombat || Enemies(OID.ForgivenExtortion).Any(e => e.InCombat) || Enemies(OID.ForgivenConformity).Any(e => e.InCombat) || Enemies(OID.ForgivenVenery).Any(e => e.InCombat); } } diff --git a/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D051ForgivenCruelty.cs b/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D051ForgivenCruelty.cs index 60dcb6d652..57df699265 100644 --- a/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D051ForgivenCruelty.cs +++ b/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D051ForgivenCruelty.cs @@ -24,15 +24,10 @@ public enum AID : uint } class Rake(BossModule module) : Components.SingleTargetDelayableCast(module, ActionID.MakeSpell(AID.Rake)); - class CycloneWing(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.CycloneWing2)); - class LumenInfinitum(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.LumenInfinitum), new AOEShapeRect(40, 2.5f)); - class HurricaneWing(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HurricaneWing), new AOEShapeCircle(10)); - class TyphoonWing(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TyphoonWing), new AOEShapeCone(25, 30.Degrees())); - class TyphoonWing2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TyphoonWing2), new AOEShapeCone(25, 30.Degrees())); class D051ForgivenCrueltyStates : StateMachineBuilder diff --git a/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D052ForgivenApathy.cs b/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D052ForgivenApathy.cs index cd49ec4213..5bf7303191 100644 --- a/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D052ForgivenApathy.cs +++ b/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D052ForgivenApathy.cs @@ -23,13 +23,10 @@ public enum AID : uint PunitiveLight = 16815, // 28F2->self, 5,0s cast, range 20 circle } -class PunitiveLight : Components.CastInterruptHint -{ //Note: this attack is a r20 circle, not drawing it because it is too big and the damage not all that high even if interrupt/stun fails - public PunitiveLight() : base(ActionID.MakeSpell(AID.PunitiveLight), true, true, "Raidwide", true) { } -} +//Note: this attack is a r20 circle, not drawing it because it is too big and the damage not all that high even if interrupt/stun fails +class PunitiveLight(BossModule module) : Components.CastInterruptHint(module, ActionID.MakeSpell(AID.PunitiveLight), true, true, "Raidwide", true); class Sanctification(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Sanctification), new AOEShapeCone(12, 45.Degrees())); - class EarthShaker(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.EarthShaker2), new AOEShapeCone(60, 30.Degrees())); class D052ForgivenApathyStates : StateMachineBuilder @@ -44,9 +41,8 @@ public D052ForgivenApathyStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 659, NameID = 8267)] -public class D052ForgivenApathy : BossModule +public class D052ForgivenApathy(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(0, 0), 0)) { - public D052ForgivenApathy(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(0, 0), 0)) { } protected override void UpdateModule() { if (PrimaryActor.Position.AlmostEqual(new(-11, -193), 1)) @@ -54,6 +50,7 @@ protected override void UpdateModule() if (PrimaryActor.Position.AlmostEqual(new(-204, -106), 1)) Arena.Bounds = new ArenaBoundsRect(new(-187.5f, -118), 12, 21, 120.Degrees()); } + protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); diff --git a/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D053ForgivenWhimsy.cs b/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D053ForgivenWhimsy.cs index 1d5ab27a79..6c5f2424e0 100644 --- a/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D053ForgivenWhimsy.cs +++ b/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D053ForgivenWhimsy.cs @@ -30,14 +30,12 @@ public enum AID : uint } class Catechism(BossModule module) : Components.SingleTargetCastDelay(module, ActionID.MakeSpell(AID.Catechism), ActionID.MakeSpell(AID.Catechism2), 0.5f); - class SacramentOfPenance(BossModule module) : Components.RaidwideCastDelay(module, ActionID.MakeSpell(AID.SacramentOfPenance), ActionID.MakeSpell(AID.SacramentOfPenance2), 0.5f); - class PerfectContrition(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PerfectContrition), new AOEShapeDonut(5, 15)); -public class JudgmentDay : Components.GenericTowers +class JudgmentDay(BossModule module) : Components.GenericTowers(module) { - public override void OnActorEState(BossModule module, Actor actor, ushort state) + public override void OnActorEState(Actor actor, ushort state) { if (state is 0x01C or 0x02C) { @@ -61,7 +59,7 @@ public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignme } } -class Exegesis : Components.GenericAOEs +class Exegesis(BossModule module) : Components.GenericAOEs(module) { private DateTime _activation; public enum Patterns { None, Diagonal, Cross, EastWest, NorthSouth } diff --git a/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D054ForgivenRevelry.cs b/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D054ForgivenRevelry.cs index f60106d41f..b62a15a685 100644 --- a/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D054ForgivenRevelry.cs +++ b/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D054ForgivenRevelry.cs @@ -18,12 +18,12 @@ public enum AID : uint RightPalm2 = 16248, // 233C->self, 4,5s cast, range 30 width 15 rect } -class PalmAttacks : Components.GenericAOEs //Palm Attacks have a wrong origin, so i made a custom solution +class PalmAttacks(BossModule module) : Components.GenericAOEs(module) //Palm Attacks have a wrong origin, so i made a custom solution { - private AOEInstance? _aoe; private static readonly AOEShapeRect rect = new(15, 15); + public override IEnumerable ActiveAOEs(int slot, Actor actor) => Utils.ZeroOrOne(_aoe); public override void OnCastStarted(Actor caster, ActorCastInfo spell) diff --git a/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D055ForgivenObscenity.cs b/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D055ForgivenObscenity.cs index 7bb1009915..759fa82d8a 100644 --- a/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D055ForgivenObscenity.cs +++ b/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D055ForgivenObscenity.cs @@ -36,11 +36,10 @@ public enum AID : uint SanctifiedStaccato = 15654, // 233C->self, no cast, range 3 circle, sort of a voidzone around the light orbs, only triggers if you get too close } -class Orbs : Components.GenericAOEs +class Orbs(BossModule module) : Components.GenericAOEs(module, default, "GTFO from voidzone!") { private readonly List _orbs = []; private static readonly AOEShapeCircle circle = new(3); - public Orbs() : base(new(), "GTFO from voidzone!") { } public override IEnumerable ActiveAOEs(int slot, Actor actor) { @@ -59,7 +58,7 @@ public override void OnActorEAnim(Actor actor, uint state) } } -class GoldChaser : Components.GenericAOEs +class GoldChaser(BossModule module) : Components.GenericAOEs(module) { private DateTime _activation; private readonly List _casters = []; @@ -72,39 +71,39 @@ public override IEnumerable ActiveAOEs(int slot, Actor actor) if (_casters.Count > 2) { if (NumCasts == 0) - yield return new(rect, _casters[0].Position, activation: _activation.AddSeconds(7.1f), color: ArenaColor.Danger); + yield return new(rect, _casters[0].Position, default, _activation.AddSeconds(7.1f), ArenaColor.Danger); if (NumCasts is 0 or 1) - yield return new(rect, _casters[1].Position, activation: _activation.AddSeconds(7.6f), color: ArenaColor.Danger); + yield return new(rect, _casters[1].Position, default, _activation.AddSeconds(7.6f), ArenaColor.Danger); } if (_casters.Count > 4) { if (NumCasts is 0 or 1) { - yield return new(rect, _casters[2].Position, activation: _activation.AddSeconds(8.1f)); - yield return new(rect, _casters[3].Position, activation: _activation.AddSeconds(8.6f)); + yield return new(rect, _casters[2].Position, default, _activation.AddSeconds(8.1f)); + yield return new(rect, _casters[3].Position, default, _activation.AddSeconds(8.6f)); } } if (_casters.Count > 4) { if (NumCasts == 2) - yield return new(rect, _casters[2].Position, activation: _activation.AddSeconds(8.1f), color: ArenaColor.Danger); + yield return new(rect, _casters[2].Position, default, _activation.AddSeconds(8.1f), ArenaColor.Danger); if (NumCasts is 2 or 3) - yield return new(rect, _casters[3].Position, activation: _activation.AddSeconds(8.6f), color: ArenaColor.Danger); + yield return new(rect, _casters[3].Position, default, _activation.AddSeconds(8.6f), ArenaColor.Danger); } if (_casters.Count == 6) { if (NumCasts is 2 or 3) { - yield return new(rect, _casters[4].Position, activation: _activation.AddSeconds(9.1f)); - yield return new(rect, _casters[5].Position, activation: _activation.AddSeconds(11.1f)); + yield return new(rect, _casters[4].Position, default, _activation.AddSeconds(9.1f)); + yield return new(rect, _casters[5].Position, default, _activation.AddSeconds(11.1f)); } } if (_casters.Count == 6) { if (NumCasts == 4) - yield return new(rect, _casters[4].Position, activation: _activation.AddSeconds(9.1f), color: ArenaColor.Danger); + yield return new(rect, _casters[4].Position, default, _activation.AddSeconds(9.1f), ArenaColor.Danger); if (NumCasts is 4 or 5) - yield return new(rect, _casters[5].Position, activation: _activation.AddSeconds(11.1f), color: ArenaColor.Danger); + yield return new(rect, _casters[5].Position, default, _activation.AddSeconds(11.1f), ArenaColor.Danger); } } if (_casters.Count > 1 && ((_casters[0].Position.AlmostEqual(new(-242.5f, 253), 1) && _casters[1].Position.AlmostEqual(new(-237.5f, 253), 1)) || (_casters[0].Position.AlmostEqual(new(-252.5f, 253), 1) && _casters[1].Position.AlmostEqual(new(-227.5f, 253), 1)))) @@ -112,39 +111,39 @@ public override IEnumerable ActiveAOEs(int slot, Actor actor) if (_casters.Count > 2) { if (NumCasts == 0) - yield return new(rect, _casters[0].Position, activation: _activation.AddSeconds(7.1f), color: ArenaColor.Danger); + yield return new(rect, _casters[0].Position, default, _activation.AddSeconds(7.1f), ArenaColor.Danger); if (NumCasts is 0 or 1) - yield return new(rect, _casters[1].Position, activation: _activation.AddSeconds(7.1f), color: ArenaColor.Danger); + yield return new(rect, _casters[1].Position, default, _activation.AddSeconds(7.1f), ArenaColor.Danger); } if (_casters.Count > 4) { if (NumCasts is 0 or 1) { - yield return new(rect, _casters[2].Position, activation: _activation.AddSeconds(8.1f)); - yield return new(rect, _casters[3].Position, activation: _activation.AddSeconds(8.1f)); + yield return new(rect, _casters[2].Position, default, _activation.AddSeconds(8.1f)); + yield return new(rect, _casters[3].Position, default, _activation.AddSeconds(8.1f)); } } if (_casters.Count > 4) { if (NumCasts == 2) - yield return new(rect, _casters[2].Position, activation: _activation.AddSeconds(8.1f), color: ArenaColor.Danger); + yield return new(rect, _casters[2].Position, default, _activation.AddSeconds(8.1f), ArenaColor.Danger); if (NumCasts is 2 or 3) - yield return new(rect, _casters[3].Position, activation: _activation.AddSeconds(8.1f), color: ArenaColor.Danger); + yield return new(rect, _casters[3].Position, default, _activation.AddSeconds(8.1f), ArenaColor.Danger); } if (_casters.Count == 6) { if (NumCasts is 2 or 3) { - yield return new(rect, _casters[4].Position, activation: _activation.AddSeconds(11.1f)); - yield return new(rect, _casters[5].Position, activation: _activation.AddSeconds(11.1f)); + yield return new(rect, _casters[4].Position, default, _activation.AddSeconds(11.1f)); + yield return new(rect, _casters[5].Position, default, _activation.AddSeconds(11.1f)); } } if (_casters.Count == 6) { if (NumCasts == 4) - yield return new(rect, _casters[4].Position, activation: _activation.AddSeconds(11.1f), color: ArenaColor.Danger); + yield return new(rect, _casters[4].Position, default, _activation.AddSeconds(11.1f), ArenaColor.Danger); if (NumCasts is 4 or 5) - yield return new(rect, _casters[5].Position, activation: _activation.AddSeconds(11.1f), color: ArenaColor.Danger); + yield return new(rect, _casters[5].Position, default, _activation.AddSeconds(11.1f), ArenaColor.Danger); } } } @@ -174,39 +173,31 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } class SacramentSforzando(BossModule module) : Components.SingleTargetCastDelay(module, ActionID.MakeSpell(AID.SacramentSforzando), ActionID.MakeSpell(AID.SacramentSforzando2), 0.8f); - class OrisonFortissimo(BossModule module) : Components.RaidwideCastDelay(module, ActionID.MakeSpell(AID.OrisonFortissimo), ActionID.MakeSpell(AID.OrisonFortissimo2), 0.8f); - class DivineDiminuendo(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.DivineDiminuendo), new AOEShapeCircle(8)); - class DivineDiminuendo1(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.DivineDiminuendo1), new AOEShapeCircle(8)); - class DivineDiminuendo2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.DivineDiminuendo2), new AOEShapeDonut(10, 16)); - class DivineDiminuendo3(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.DivineDiminuendo3), new AOEShapeDonut(18, 32)); - class DivineDiminuendo4(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.DivineDiminuendo4), new AOEShapeCircle(8)); - class ConvictionMarcato(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ConvictionMarcato), new AOEShapeRect(40, 2.5f)); - class ConvictionMarcato2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ConvictionMarcato2), new AOEShapeRect(40, 2.5f)); - class ConvictionMarcato3(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ConvictionMarcato3), new AOEShapeRect(40, 2.5f)); -class Voidzone : BossComponent +class Voidzone(BossModule module) : BossComponent(module) { private bool active; + public override void OnActorEAnim(Actor actor, uint state) { if (state == 0x00040008) { - module.Arena.Bounds = new ArenaBoundsRect(new(-240, 237), 15, 20); + Module.Arena.Bounds = new ArenaBoundsRect(new(-240, 237), 15, 20); active = false; } if (state == 0x00010002) { active = true; - module.Arena.Bounds = new ArenaBoundsCircle(new(-240, 237), 15); + Module.Arena.Bounds = new ArenaBoundsCircle(new(-240, 237), 15); } } @@ -240,9 +231,8 @@ public D055ForgivenObscenityStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 659, NameID = 8262)] -public class D055ForgivenObscenity : BossModule +public class D055ForgivenObscenity(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsRect(new(-240, 237), 15, 20)) { - public D055ForgivenObscenity(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsRect(new(-240, 237), 15, 20)) { } protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy, true); diff --git a/BossMod/Modules/Shadowbringers/FATE/Archaeotania.cs b/BossMod/Modules/Shadowbringers/FATE/Archaeotania.cs index f27b177aae..c1e0cb38bb 100644 --- a/BossMod/Modules/Shadowbringers/FATE/Archaeotania.cs +++ b/BossMod/Modules/Shadowbringers/FATE/Archaeotania.cs @@ -49,23 +49,19 @@ public enum IconID : uint } class BlizzardBreath(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.BlizzardBreath), new AOEShapeCone(60, 22.5f.Degrees())); - class FlamesOfTheApocalypse(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.FlamesOfTheApocalypse), new AOEShapeDonut(15, 30)); - class MindBlast(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.MindBlast), new AOEShapeCircle(21)); // note: helpers target their corresponding target for the duration of their life -class Megaflare : Components.UniformStackSpread +class Megaflare(BossModule module) : Components.UniformStackSpread(module, 6, 0) { - public Megaflare() : base(6, 0) { } - public override void Update() { // fallback if stack target dies before mechanic is resolved // sequence is boss starts casting > icons appear > helpers appear > boss finishes casting > helpers cast their aoe and die if (Module.PrimaryActor.CastInfo == null) - Stacks.RemoveAll(s => !module.Enemies(OID.MegaflareHelper).Any(h => !h.IsDead && h.TargetID == s.Target.InstanceID)); - base.Update(module); + Stacks.RemoveAll(s => !Module.Enemies(OID.MegaflareHelper).Any(h => !h.IsDead && h.TargetID == s.Target.InstanceID)); + base.Update(); } public override void OnEventIcon(Actor actor, uint iconID) @@ -82,25 +78,15 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } class TidalWave(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.TidalWaveVisual), 48, kind: Kind.DirForward); - class WindSlash(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.WindSlashAOE), 8); - class Windwinder(BossModule module) : Components.PersistentVoidzone(module, 5, m => m.Enemies(OID.Twister).Where(a => !a.IsDead)); - class CivilizationBuster1(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.CivilizationBuster1), new AOEShapeRect(62, 7.5f)); - class CivilizationBuster2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.CivilizationBuster2), new AOEShapeRect(62, 7.5f)); - class Touchdown(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Touchdown), new AOEShapeCircle(30)); // TODO: verify falloff - class PillarImpact(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PillarImpact), new AOEShapeCircle(7)); - class PillarPierce(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PillarPierce), new AOEShapeRect(65, 4)); - class AncientAevis(BossModule module) : Components.Adds(module, (uint)OID.AncientAevis); - class HeadlongRush(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HeadlongRush), new AOEShapeRect(13.2f, 5, 4.2f)); - class Aether(BossModule module) : Components.Adds(module, (uint)OID.Aether); class ArchaeotaniaStates : StateMachineBuilder diff --git a/BossMod/Modules/Shadowbringers/FATE/Formidable.cs b/BossMod/Modules/Shadowbringers/FATE/Formidable.cs index d7e9cfaae9..11194da97b 100644 --- a/BossMod/Modules/Shadowbringers/FATE/Formidable.cs +++ b/BossMod/Modules/Shadowbringers/FATE/Formidable.cs @@ -51,10 +51,9 @@ public enum SID : uint } class Spincrush(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Spincrush), new AOEShapeCone(15, 60.Degrees())); - class FireShot(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.FireShot), 7); -class FiresOfMtGulg : Components.GenericAOEs +class FiresOfMtGulg(BossModule module) : Components.GenericAOEs(module) { private Actor? _caster; private DateTime _activation; @@ -93,10 +92,8 @@ class BarrageFire(BossModule module) : Components.RaidwideCast(module, ActionID. // note: it could have been a simple StackWithCastTargets, however sometimes there is no cast - i assume it happens because actor spawns right before starting a cast, and sometimes due to timings cast-start is missed by the game // because of that, we just use icons & cast events // i've also seen player getting rez, immediately getting stack later than others, but then caster gets destroyed without finishing the cast -class DrillShot : Components.StackWithCastTargets +class DrillShot(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.DrillShot), 6) { - public DrillShot() : base(ActionID.MakeSpell(AID.DrillShot), 6) { } - public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.DrillShot) @@ -112,7 +109,7 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } } -class ExplosionMissile : BossComponent +class ExplosionMissile(BossModule module) : BossComponent(module) { private List _activeMissiles = new(); @@ -120,8 +117,8 @@ public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (var m in _activeMissiles) { - arena.Actor(m, ArenaColor.Object, true); - arena.AddCircle(m.Position, 6, ArenaColor.Danger); + Arena.Actor(m, ArenaColor.Object, true); + Arena.AddCircle(m.Position, 6, ArenaColor.Danger); } } @@ -131,7 +128,7 @@ public override void OnActorCreated(Actor actor) _activeMissiles.Add(actor); } - public override void OnActorDestroyed(BossModule module, Actor actor) + public override void OnActorDestroyed(Actor actor) { if ((OID)actor.OID == OID.DwarvenDynamite) _activeMissiles.Remove(actor); @@ -146,7 +143,7 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) class ExplosionGrenade(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ExplosionGrenade), new AOEShapeCircle(12)); -class DwarvenDischarge(AOEShape shape, OID oid, AID aid, float delay) : Components.GenericAOEs +class DwarvenDischarge(BossModule module, AOEShape shape, OID oid, AID aid, float delay) : Components.GenericAOEs(module) { private readonly AOEShape _shape = shape; private readonly OID _oid = oid; @@ -166,7 +163,7 @@ public override void OnActorCreated(Actor actor) _casters.Add((actor, WorldState.FutureTime(_delay))); } - public override void OnActorDestroyed(BossModule module, Actor actor) + public override void OnActorDestroyed(Actor actor) { if ((OID)actor.OID == _oid) _casters.RemoveAll(c => c.caster == actor); @@ -178,18 +175,14 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) _casters.RemoveAll(c => c.caster == caster); } } - class DwarvenDischargeDonut(BossModule module) : DwarvenDischarge(module, new AOEShapeDonut(9, 60), OID.DwarvenChargeDonut, AID.DwarvenDischargeDonut, 9.3f); - class DwarvenDischargeCircle(BossModule module) : DwarvenDischarge(module, new AOEShapeCircle(8), OID.DwarvenChargeCircle, AID.DwarvenDischargeCircle, 8.1f); class AutomatonEscort(BossModule module) : Components.Adds(module, (uint)OID.AutomatonEscort); - class SteamDome(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.SteamDome), 15); -class DynamicSensoryJammer : Components.CastHint +class DynamicSensoryJammer(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.DynamicSensoryJammer), "") { - public DynamicSensoryJammer() : base(ActionID.MakeSpell(AID.DynamicSensoryJammer), "") { } private BitMask _ec; public bool Ec { get; private set; } private bool casting; diff --git a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE11ShadowOfDeathHand.cs b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE11ShadowOfDeathHand.cs index 0cabc9cfdb..8b5f2b3020 100644 --- a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE11ShadowOfDeathHand.cs +++ b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE11ShadowOfDeathHand.cs @@ -49,25 +49,15 @@ public enum AID : uint } class BestialLoyalty(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.BestialLoyalty), "Summon crows"); - class RunWild(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.RunWild), "Interrupt beastmaster"); - class HardBeak(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.HardBeak)); - class PiercingBarrageBoss(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PiercingBarrageBoss), new AOEShapeRect(40, 4)); - class Helldive(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.Helldive), 6); - class BroadsideBarrage(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.BroadsideBarrage), new AOEShapeRect(40, 20)); - class BlindsideBarrage(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.BlindsideBarrage), "Raidwide + deathwall appears"); - class RollingBarrage(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RollingBarrageAOE), new AOEShapeCircle(8)); - class Whirlwind(BossModule module) : Components.PersistentVoidzone(module, 4, m => m.Enemies(OID.Whirlwind)); - class Wind(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.WindVisual), 30, kind: Kind.DirForward); - class PiercingBarrageCrow(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PiercingBarrageCrow), new AOEShapeRect(40, 4)); class CE11ShadowOfDeathHandStates : StateMachineBuilder @@ -90,10 +80,8 @@ public CE11ShadowOfDeathHandStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.BozjaCE, GroupID = 735, NameID = 5)] // bnpcname=9400 -public class CE11ShadowOfDeathHand : BossModule +public class CE11ShadowOfDeathHand(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(825, 640), 20)) { - public CE11ShadowOfDeathHand(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(825, 640), 20)) { } - protected override void DrawEnemies(int pcSlot, Actor pc) { base.DrawEnemies(pcSlot, pc); diff --git a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE12BayingOfHounds.cs b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE12BayingOfHounds.cs index 0d57e8199c..afa421d6b9 100644 --- a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE12BayingOfHounds.cs +++ b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE12BayingOfHounds.cs @@ -33,19 +33,14 @@ public enum AID : uint } class Hellclaw(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.Hellclaw)); - class TailBlow(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TailBlow), new AOEShapeCone(19, 45.Degrees())); - class LavaSpit(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.LavaSpitAOE), 5); - class ScorchingLash(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ScorchingLash), new AOEShapeRect(50, 5)); -class Hellpounce : Components.GenericAOEs +class Hellpounce(BossModule module) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.Hellpounce), "GTFO from charge!") { private AOEInstance? _charge; - public Hellpounce() : base(ActionID.MakeSpell(AID.Hellpounce), "GTFO from charge!") { } - public override IEnumerable ActiveAOEs(int slot, Actor actor) => Utils.ZeroOrOne(_charge); public override void OnCastStarted(Actor caster, ActorCastInfo spell) @@ -72,19 +67,16 @@ private void Activate(WPos source, WPos target, DateTime activation) { var shape = new AOEShapeRect(0, 5); shape.SetEndPoint(target, source, new()); - _charge = new(shape, source, activation: activation); + _charge = new(shape, source, default, activation); } } class LionsBreath(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.LionsBreathAOE), new AOEShapeCone(60, 45.Degrees())); - class DragonsBreathR(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.DragonsBreathAOER), new AOEShapeCone(60, 36.Degrees(), -10.Degrees())); // TODO: verify; there should not be an offset in reality here... - class DragonsBreathL(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.DragonsBreathAOEL), new AOEShapeCone(60, 36.Degrees(), 10.Degrees())); // TODO: verify; there should not be an offset in reality here... - class VoidTornado(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.VoidTornado), "Set hp to 1"); -class VoidQuake : Components.GenericAOEs //this concentric AOE can happen forwards or backwards in order with the same AID as the starter +class VoidQuake(BossModule module) : Components.GenericAOEs(module) //this concentric AOE can happen forwards or backwards in order with the same AID as the starter { private readonly List<(Actor caster, AOEShape shape)> _active = []; diff --git a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE13KillItWithFire.cs b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE13KillItWithFire.cs index a148c31729..3f1070b5c6 100644 --- a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE13KillItWithFire.cs +++ b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE13KillItWithFire.cs @@ -39,7 +39,7 @@ public enum SID : uint class Pheromones(BossModule module) : Components.PersistentVoidzone(module, 4, m => m.Enemies(OID.Pheromones)); -class DeadLeaves : Components.GenericAOEs +class DeadLeaves(BossModule module) : Components.GenericAOEs(module, default, "Go to different color!") { private BitMask _tenderStatuses; private BitMask _jealousStatuses; @@ -48,8 +48,6 @@ class DeadLeaves : Components.GenericAOEs private static readonly AOEShapeCone _shape = new(30, 45.Degrees()); - public DeadLeaves() : base(new(), "Go to different color!") { } - public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_tenderStatuses[slot]) @@ -105,13 +103,9 @@ public override void OnCastFinished(Actor caster, ActorCastInfo spell) } class AnaphylacticShock(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.AnaphylacticShock), new AOEShapeRect(30, 1)); - class SplashBomb(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.SplashBombAOE), new AOEShapeCircle(6)); - class SplashGrenade(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.SplashGrenadeAOE), 6); - class PlayfulBreeze(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.PlayfulBreeze)); - class Budbutt(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.Budbutt)); class CE13KillItWithFireStates : StateMachineBuilder diff --git a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE14VigilForLost.cs b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE14VigilForLost.cs index 0744dbd856..ee0b95d050 100644 --- a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE14VigilForLost.cs +++ b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE14VigilForLost.cs @@ -25,21 +25,13 @@ public enum AID : uint } class LightLeap(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.LightLeap), 10); - class ChemicalMissile(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ChemicalMissile), new AOEShapeCircle(12)); - class TailMissile(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TailMissileAOE), new AOEShapeCircle(30)); - class Shockwave(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Shockwave), new AOEShapeCircle(16)); - class ExplosiveFlare(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ExplosiveFlare), new AOEShapeCircle(10)); - class CripplingBlow(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.CripplingBlow)); - class PlasmaField(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.PlasmaField)); - class Towers(BossModule module) : Components.CastTowers(module, ActionID.MakeSpell(AID.Explosion), 6); - class MagitekRay(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.MagitekRay), new AOEShapeRect(50, 2)); class CE14VigilForLostStates : StateMachineBuilder diff --git a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE21FinalFurlong.cs b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE21FinalFurlong.cs index 7ed5967a7b..6a2e0d9d72 100644 --- a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE21FinalFurlong.cs +++ b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE21FinalFurlong.cs @@ -41,16 +41,12 @@ public enum TetherID : uint class GraspingRancor : Components.LocationTargetedAOEs { - private IReadOnlyList _hands = ActorEnumeration.EmptyList; + private IReadOnlyList _hands; - public GraspingRancor() : base(ActionID.MakeSpell(AID.PurifyingLight), 12) + public GraspingRancor(BossModule module) : base(module, ActionID.MakeSpell(AID.PurifyingLight), 12) { Color = ArenaColor.SafeFromAOE; Risky = false; - } - - public override void Init(BossModule module) - { _hands = module.Enemies(OID.GraspingRancor); } @@ -75,26 +71,19 @@ public override void DrawArenaForeground(int pcSlot, Actor pc) if (hand != null) { bool isFrozen = hand.Tether.ID == (uint)TetherID.Frozen; - arena.Actor(hand, ArenaColor.Object, true); - arena.AddLine(hand.Position, pc.Position, isFrozen ? ArenaColor.Safe : ArenaColor.Danger); + Arena.Actor(hand, ArenaColor.Object, true); + Arena.AddLine(hand.Position, pc.Position, isFrozen ? ArenaColor.Safe : ArenaColor.Danger); } } } class HatefulMiasma(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.HatefulMiasma), 6); - class PoisonedWords(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.PoisonedWords), 6); - class TalonedGaze(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.TalonedGaze), "AOE front/back --> sides"); - class TalonedWings(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.TalonedWings), "AOE sides --> front/back"); - class CoffinNails(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.CoffinNails), new AOEShapeCone(60, 45.Degrees()), 2); - class Stab(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.Stab)); - class GripOfPoison(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.GripOfPoison)); - class StepsOfDestruction(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.StepsOfDestructionAOE), 6); class CE21FinalFurlongStates : StateMachineBuilder diff --git a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE31MetalFoxChaos.cs b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE31MetalFoxChaos.cs index 486e9f616b..6faeb47c9b 100644 --- a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE31MetalFoxChaos.cs +++ b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE31MetalFoxChaos.cs @@ -19,7 +19,7 @@ public enum AID : uint SatelliteLaser = 20137, // Boss->self, 10,0s cast, range 100 circle } -class MagitekBitLasers : Components.GenericAOEs +class MagitekBitLasers(BossModule module) : Components.GenericAOEs(module) { private static readonly Angle[] rotations = [0.Degrees(), 90.Degrees(), 180.Degrees(), -90.Degrees()]; private readonly List _times = []; @@ -32,7 +32,7 @@ public enum Types { None, SatelliteLaser, DiffractiveLaser, LaserShower } public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_times.Count > 0) - foreach (var p in module.Enemies(OID.MagitekBit)) + foreach (var p in Module.Enemies(OID.MagitekBit)) { if (Type == Types.SatelliteLaser && WorldState.CurrentTime > _times[0]) yield return new(rect, p.Position, p.Rotation, _times[1]); @@ -93,11 +93,8 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } class Rush(BossModule module) : Components.BaitAwayChargeCast(module, ActionID.MakeSpell(AID.Rush), 7); - class LaserShower(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.LaserShower2), 10); - class DiffractiveLaser(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.DiffractiveLaser), new AOEShapeCone(60, 75.Degrees())); - class SatelliteLaser(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.SatelliteLaser), "Raidwide + all lasers fire at the same time"); class CE31MetalFoxChaosStates : StateMachineBuilder @@ -114,9 +111,8 @@ public CE31MetalFoxChaosStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.BozjaCE, GroupID = 735, NameID = 13)] // bnpcname=9424 -public class CE31MetalFoxChaos : BossModule +public class CE31MetalFoxChaos(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsSquare(new(-234, 262), 30.2f)) { - public CE31MetalFoxChaos(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsSquare(new(-234, 262), 30.2f)) { } protected override void DrawEnemies(int pcSlot, Actor pc) { foreach (var s in Enemies(OID.Boss)) diff --git a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE41WithDiremiteAndMain.cs b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE41WithDiremiteAndMain.cs index 8fca4fe33e..46d2a0d2b5 100644 --- a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE41WithDiremiteAndMain.cs +++ b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE41WithDiremiteAndMain.cs @@ -46,27 +46,23 @@ public enum IconID : uint } class CrystallineFracture(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.CrystallineFracture), new AOEShapeCircle(4)); - class ResonantFrequencyDim(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ResonantFrequencyDim), new AOEShapeCircle(6)); - class ResonantFrequencyCorrupted(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ResonantFrequencyCorrupted), new AOEShapeCircle(6)); -class CrystallineStingers : Components.CastLineOfSightAOE +class CrystallineStingers(BossModule module) : Components.CastLineOfSightAOE(module, ActionID.MakeSpell(AID.CrystallineStingers), 60, false) { - public CrystallineStingers() : base(ActionID.MakeSpell(AID.CrystallineStingers), 60, false) { } - public override IEnumerable BlockerActors(BossModule module) => module.Enemies(OID.DimCrystal).Where(a => !a.IsDead); + public override IEnumerable BlockerActors() => Module.Enemies(OID.DimCrystal).Where(a => !a.IsDead); } -class AetherialStingers : Components.CastLineOfSightAOE +class AetherialStingers(BossModule module) : Components.CastLineOfSightAOE(module, ActionID.MakeSpell(AID.AetherialStingers), 60, false) { - public AetherialStingers() : base(ActionID.MakeSpell(AID.AetherialStingers), 60, false) { } - public override IEnumerable BlockerActors(BossModule module) => module.Enemies(OID.CorruptedCrystal).Where(a => !a.IsDead); + public override IEnumerable BlockerActors() => Module.Enemies(OID.CorruptedCrystal).Where(a => !a.IsDead); } class Subduction(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Subduction), new AOEShapeCircle(8)); // next aoe starts casting slightly before previous, so use a custom component -class Earthbreaker : Components.GenericAOEs +class Earthbreaker(BossModule module) : Components.GenericAOEs(module) { private readonly List<(Actor caster, AOEShape shape)> _active = []; @@ -95,11 +91,10 @@ public override void OnCastFinished(Actor caster, ActorCastInfo spell) } class CrystalNeedle(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.CrystalNeedle)); - class Shardstrike(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.ShardstrikeAOE), 5); // TODO: this should probably be generalized -class Hailfire : Components.GenericAOEs +class Hailfire(BossModule module) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.HailfireAOE)) { private readonly Actor?[] _targets = new Actor?[4]; private DateTime _activation; @@ -108,8 +103,6 @@ class Hailfire : Components.GenericAOEs private Actor? NextTarget => NumCasts < _targets.Length ? _targets[NumCasts] : null; - public Hailfire() : base(ActionID.MakeSpell(AID.HailfireAOE)) { } - public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (NextTarget is var target && target != null && target != actor) @@ -119,7 +112,7 @@ public override IEnumerable ActiveAOEs(int slot, Actor actor) public override void DrawArenaForeground(int pcSlot, Actor pc) { if (NextTarget == pc) - _shape.Outline(arena, Module.PrimaryActor.Position, Angle.FromDirection(pc.Position - Module.PrimaryActor.Position), ArenaColor.Danger); + _shape.Outline(Arena, Module.PrimaryActor.Position, Angle.FromDirection(pc.Position - Module.PrimaryActor.Position), ArenaColor.Danger); } public override void OnEventCast(Actor caster, ActorCastEvent spell) diff --git a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE42FromBeyondTheGrave.cs b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE42FromBeyondTheGrave.cs index f5a2d3bf6c..b7501322fa 100644 --- a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE42FromBeyondTheGrave.cs +++ b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE42FromBeyondTheGrave.cs @@ -64,14 +64,11 @@ public enum SID : uint } class DevourSoul(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.DevourSoul)); - class Blight(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.Blight)); -class GallowsMarch : Components.StatusDrivenForcedMarch +class GallowsMarch(BossModule module) : Components.StatusDrivenForcedMarch(module, 3, (uint)SID.ForwardMarch, (uint)SID.AboutFace, (uint)SID.LeftFace, (uint)SID.RightFace) { - public GallowsMarch() : base(3, (uint)SID.ForwardMarch, (uint)SID.AboutFace, (uint)SID.LeftFace, (uint)SID.RightFace) { } - - public override bool DestinationUnsafe(BossModule module, int slot, Actor actor, WPos pos) => !module.FindComponent()?.ActiveAOEs(module, slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? true; + public override bool DestinationUnsafe(int slot, Actor actor, WPos pos) => !Module.FindComponent()?.ActiveAOEs(slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? true; public override void AddGlobalHints(GlobalHints hints) { @@ -82,7 +79,7 @@ public override void AddGlobalHints(GlobalHints hints) class ShockSphere(BossModule module) : Components.PersistentVoidzone(module, 7, m => m.Enemies(OID.ShockSphere)); -class SoulPurge : Components.GenericAOEs +class SoulPurge(BossModule module) : Components.GenericAOEs(module) { private bool _dualcast; private readonly List _imminent = []; @@ -116,34 +113,27 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) private void SetupImminentAOEs(AOEShape main, AOEShape dual, WPos center, DateTime activation) { - _imminent.Add(new(main, center, activation: activation)); + _imminent.Add(new(main, center, default, activation)); if (_dualcast) { - _imminent.Add(new(dual, center, activation: activation.AddSeconds(2.1f))); + _imminent.Add(new(dual, center, default, activation.AddSeconds(2.1f))); _dualcast = false; } } } class CrimsonBlade(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.CrimsonBlade), new AOEShapeCone(50, 90.Degrees())); - class BloodCyclone(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.BloodCyclone), new AOEShapeCircle(5)); - class Aethertide(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.AethertideAOE), 8); - class MarchingBreath(BossModule module) : Components.CastInterruptHint(module, ActionID.MakeSpell(AID.MarchingBreath), showNameInHint: true); // heals all allies by 20% of max health (raidwide) - class TacticalAero(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TacticalAero), new AOEShapeRect(40, 4)); - class EntropicFlame(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.EntropicFlame), new AOEShapeRect(60, 4)); - class DarkFlare(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.DarkFlare), 8); - class SoulSacrifice(BossModule module) : Components.CastInterruptHint(module, ActionID.MakeSpell(AID.SoulSacrifice), showNameInHint: true); // WarWraith sacrifices itself to give boss a damage buff class PurifyingLight : Components.LocationTargetedAOEs { - public PurifyingLight() : base(ActionID.MakeSpell(AID.PurifyingLight), 12) + public PurifyingLight(BossModule module) : base(module, ActionID.MakeSpell(AID.PurifyingLight), 12) { Color = ArenaColor.SafeFromAOE; Risky = false; @@ -173,10 +163,8 @@ public CE42FromBeyondTheGraveStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.BozjaCE, GroupID = 778, NameID = 20)] // bnpcname=9931 -public class CE42FromBeyondTheGrave : BossModule +public class CE42FromBeyondTheGrave(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(-60, 800), 30)) { - public CE42FromBeyondTheGrave(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(-60, 800), 30)) { } - protected override void DrawEnemies(int pcSlot, Actor pc) { base.DrawEnemies(pcSlot, pc); diff --git a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE44FamiliarFace.cs b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE44FamiliarFace.cs index 27eb9a26a7..b0ec903e26 100644 --- a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE44FamiliarFace.cs +++ b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE44FamiliarFace.cs @@ -42,13 +42,9 @@ public enum AID : uint } class TectonicEruption(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.TectonicEruption), 6); - class RockCutter(BossModule module) : Components.SingleTargetDelayableCast(module, ActionID.MakeSpell(AID.RockCutter)); - class AncientQuake(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.AncientQuake)); - class Roxxor(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.Roxxor), 6); - class ControlTowerAppear(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ControlTowerAppear), new AOEShapeCircle(6)); // note: we could predict aoes way in advance, when FallingTower actors are created - they immediately have correct rotation @@ -56,7 +52,7 @@ class Roxxor(BossModule module) : Components.SpreadFromCastTargets(module, Actio // however, just watching casts normally gives more than enough time to avoid aoes and does not interfere with mechanics that resolve earlier class Towerfall(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Towerfall), new AOEShapeRect(40, 5)); -class ExtremeEdge : Components.GenericAOEs +class ExtremeEdge(BossModule module) : Components.GenericAOEs(module) { private List<(Actor caster, float offset)> _casters = new(); @@ -87,10 +83,8 @@ public override void OnCastFinished(Actor caster, ActorCastInfo spell) } } -class IntractableLand : Components.Exaflare +class IntractableLand(BossModule module) : Components.Exaflare(module, 8) { - public IntractableLand() : base(8) { } - public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.IntractableLandFirst) @@ -111,14 +105,14 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) return; } - AdvanceLine(module, Lines[index], pos); + AdvanceLine(Lines[index], pos); if (Lines[index].ExplosionsLeft == 0) Lines.RemoveAt(index); } } } -class Hammerfall : Components.GenericAOEs +class Hammerfall(BossModule module) : Components.GenericAOEs(module) { private readonly List _aoes = []; private static readonly AOEShapeCircle _shape = new(37); @@ -128,7 +122,7 @@ class Hammerfall : Components.GenericAOEs public override void OnActorCreated(Actor actor) { if ((OID)actor.OID == OID.Hammer) - _aoes.Add(new(_shape, actor.Position, activation: WorldState.FutureTime(12.6f))); + _aoes.Add(new(_shape, actor.Position, default, WorldState.FutureTime(12.6f))); } public override void OnCastFinished(Actor caster, ActorCastInfo spell) diff --git a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE51ThereWouldBeBlood.cs b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE51ThereWouldBeBlood.cs index 249e43535e..fa465aaa74 100644 --- a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE51ThereWouldBeBlood.cs +++ b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE51ThereWouldBeBlood.cs @@ -32,23 +32,14 @@ public enum AID : uint } class CloudOfLocusts(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.CloudOfLocusts), new AOEShapeCircle(15)); - class PlagueOfLocusts(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PlagueOfLocusts), new AOEShapeDonut(6, 40)); - class DivestingGale(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.DivestingGale), 5); - class Camisado(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.Camisado)); - class DreadWind(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.DreadWind)); - class GaleCannon(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.GaleCannon), new AOEShapeRect(30, 6)); - class FlightOfTheMaleficCone(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.FlightOfTheMaleficAOECone), new AOEShapeCone(30, 45.Degrees())); - class FlightOfTheMaleficCenter(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.FlightOfTheMaleficAOECenter), 6); - class TempestOfAnguish(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TempestOfAnguish), new AOEShapeRect(55, 5)); - class TragicalGaze(BossModule module) : Components.CastGaze(module, ActionID.MakeSpell(AID.TragicalGaze)); class CE51ThereWouldBeBloodStates : StateMachineBuilder diff --git a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE52TimeToBurn.cs b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE52TimeToBurn.cs index 380b11b6ec..5a4fa5c401 100644 --- a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE52TimeToBurn.cs +++ b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE52TimeToBurn.cs @@ -33,11 +33,11 @@ public enum AID : uint // - bombs only (x3 instead of x2) // - complex: eruption visual -> 9 eruption eobjanims -> pause cast -> bomb visual -> spawn bombs -> reproduce visual & bomb countdown -> cyclone cast start -> bomb resolve -> cyclone resolve -> start cast -> eruption resolve // => rules: show bombs if active (activate by visual, deactivate by resolve, show for each object); otherwise show cyclone cast if active; otherwise show eruptions -class TimeEruptionBombReproduce : Components.GenericAOEs +class TimeEruptionBombReproduce(BossModule module) : Components.GenericAOEs(module) { private DateTime _bombsActivation; private DateTime _eruptionStart; // timestamp of StartTime cast start - private IReadOnlyList _bombs = ActorEnumeration.EmptyList; + private IReadOnlyList _bombs = module.Enemies(OID.TimeBomb1); // either 1 or 2 works, dunno what's the difference private readonly List _cycloneCasters = []; private readonly List<(WPos pos, TimeSpan delay)> _clocks = []; private readonly List _eruptionSafeSpots = []; @@ -65,15 +65,10 @@ public override IEnumerable ActiveAOEs(int slot, Actor actor) } } - public override void Init(BossModule module) - { - _bombs = module.Enemies(OID.TimeBomb1); // either 1 or 2 works, dunno what's the difference - } - public override void DrawArenaBackground(int pcSlot, Actor pc) { foreach (var p in _eruptionSafeSpots) - _shapeEruption.Draw(arena, p, new(), ArenaColor.SafeFromAOE); + _shapeEruption.Draw(Arena, p, new(), ArenaColor.SafeFromAOE); base.DrawArenaBackground(pcSlot, pc); } @@ -137,9 +132,7 @@ public override void OnActorEAnim(Actor actor, uint state) } class Eruption(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Eruption), 8); - class FireTankbuster(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.FireTankbuster)); - class FireRaidwide(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.FireRaidwide)); class CE52TimeToBurnStates : StateMachineBuilder diff --git a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE53HereComesTheCavalry.cs b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE53HereComesTheCavalry.cs index 377642eeb4..d95d0991ff 100644 --- a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE53HereComesTheCavalry.cs +++ b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE53HereComesTheCavalry.cs @@ -45,29 +45,23 @@ public enum TetherID : uint } class StormSlash(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.StormSlash), new AOEShapeCone(8, 60.Degrees())); - class MagitekBurst(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.MagitekBurst), 8); - class BurnishedJoust(BossModule module) : Components.ChargeAOEs(module, ActionID.MakeSpell(AID.BurnishedJoust), 3); // note: there are two casters, probably to avoid 32-target limit - we only want to show one class GustSlash(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.GustSlashAOE), 35, true, 1, null, Kind.DirForward); class FireShot(BossModule module) : Components.PersistentVoidzoneAtCastTarget(module, 6, ActionID.MakeSpell(AID.FireShot), m => m.Enemies(OID.FireShot).Where(e => e.EventState != 7), 0); - class AirborneExplosion(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.AirborneExplosion), 10); - class RideDownAOE(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RideDown), new AOEShapeRect(60, 5)); // note: there are two casters, probably to avoid 32-target limit - we only want to show one // TODO: generalize to reusable component -class RideDownKnockback : Components.Knockback +class RideDownKnockback(BossModule module) : Components.Knockback(module, ActionID.MakeSpell(AID.RideDownAOE), false, 1) { private readonly List _sources = []; private static readonly AOEShapeCone _shape = new(30, 90.Degrees()); - public RideDownKnockback() : base(ActionID.MakeSpell(AID.RideDownAOE), false, 1) { } - public override IEnumerable Sources(int slot, Actor actor) => _sources; public override void OnCastStarted(Actor caster, ActorCastInfo spell) @@ -94,12 +88,10 @@ class CallRaze(BossModule module) : Components.RaidwideCast(module, ActionID.Mak // - distance ~6.4 (inside hitbox) and 1 vuln stack: 79194 damage // - distance ~22.2 and 4 vuln stacks: 21083 damage // since hitbox is 7.2 it is probably starting to be optimal around distance 15 -class RawSteel : Components.BaitAwayChargeCast +class RawSteel(BossModule module) : Components.BaitAwayChargeCast(module, ActionID.MakeSpell(AID.RawSteel), 2) { private static readonly float _safeDistance = 15; - public RawSteel() : base(ActionID.MakeSpell(AID.RawSteel), 2) { } - public override void AddHints(int slot, Actor actor, TextHints hints) { base.AddHints(slot, actor, hints); @@ -128,17 +120,14 @@ public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (var bait in ActiveBaitsOn(pc)) { - bait.Shape.Outline(arena, BaitOrigin(bait), bait.Rotation, bait.Target.Position.InCircle(bait.Source.Position, 15) ? ArenaColor.Danger : ArenaColor.Safe); + bait.Shape.Outline(Arena, BaitOrigin(bait), bait.Rotation, bait.Target.Position.InCircle(bait.Source.Position, 15) ? ArenaColor.Danger : ArenaColor.Safe); } } } class CloseQuarters(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.CloseQuartersAOE), new AOEShapeCircle(15)); - class FarAfield(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.FarAfieldAOE), new AOEShapeDonut(10, 30)); - class CallControlledBurn(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.CallControlledBurnAOE), 6); - class MagitekBlaster(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.MagitekBlaster), 8); class CE53HereComesTheCavalryStates : StateMachineBuilder @@ -164,10 +153,8 @@ public CE53HereComesTheCavalryStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.BozjaCE, GroupID = 778, NameID = 22)] // bnpcname=9929 -public class CE53HereComesTheCavalry : BossModule +public class CE53HereComesTheCavalry(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(-750, 790), 25)) { - public CE53HereComesTheCavalry(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(-750, 790), 25)) { } - protected override bool CheckPull() => PrimaryActor.InCombat; // not targetable at start protected override void DrawEnemies(int pcSlot, Actor pc) diff --git a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE54NeverCryWolf.cs b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE54NeverCryWolf.cs index 094cf5b828..5239d956dc 100644 --- a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE54NeverCryWolf.cs +++ b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE54NeverCryWolf.cs @@ -46,15 +46,11 @@ public enum AID : uint } class IcePillar(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.IcePillarAOE), new AOEShapeCircle(4)); - class PillarPierce(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PillarPierce), new AOEShapeRect(80, 2)); - class Shatter(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Shatter), new AOEShapeCircle(8)); -class BracingWind : Components.KnockbackFromCastTarget +class BracingWind(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.BracingWind), 40, false, 1, new AOEShapeRect(60, 6), Kind.DirForward) { - public BracingWind() : base(ActionID.MakeSpell(AID.BracingWind), 40, false, 1, new AOEShapeRect(60, 6), Kind.DirForward) { } - public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { var length = Module.Bounds.HalfSize * 2; // casters are at the border, orthogonal to borders @@ -65,16 +61,12 @@ public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignme } } -class LunarCry : Components.CastLineOfSightAOE +class LunarCry(BossModule module) : Components.CastLineOfSightAOE(module, ActionID.MakeSpell(AID.LunarCry), 80, false) { private readonly List _safePillars = []; - private BracingWind? _knockback; - - public LunarCry() : base(ActionID.MakeSpell(AID.LunarCry), 80, false) { } + private BracingWind? _knockback = module.FindComponent(); - public override IEnumerable BlockerActors(BossModule module) => _safePillars; - - public override void Init(BossModule module) => _knockback = module.FindComponent(); + public override IEnumerable BlockerActors() => _safePillars; public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { @@ -98,7 +90,7 @@ public override void OnCastStarted(Actor caster, ActorCastInfo spell) } // this AOE only got 2s cast time, but the actors already spawn 4.5s earlier, so we can use that to our advantage -class ThermalGust : Components.GenericAOEs +class ThermalGust(BossModule module) : Components.GenericAOEs(module) { private readonly List _casters = []; private DateTime _activation; @@ -123,7 +115,7 @@ public override void OnCastFinished(Actor caster, ActorCastInfo spell) } } -class AgeOfEndlessFrost : Components.GenericAOEs +class AgeOfEndlessFrost(BossModule module) : Components.GenericAOEs(module) { private Angle _increment; private readonly List _angles = []; @@ -161,11 +153,11 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) { if (NumCasts == 0) { - _nextActivation = WorldState.FutureTime(2.6); + _nextActivation = WorldState.FutureTime(2.6f); } else if (NumCasts < 6) { - _nextActivation = WorldState.FutureTime(2.1); + _nextActivation = WorldState.FutureTime(2.1f); } else { @@ -180,11 +172,8 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } class StormWithout(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.StormWithout), new AOEShapeDonut(10, 40)); - class StormWithin(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.StormWithin), new AOEShapeCircle(10)); - class AncientGlacier(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.AncientGlacierAOE), 6); - class Glaciation(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.Glaciation)); class CE54NeverCryWolfStates : StateMachineBuilder diff --git a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE62LooksToDieFor.cs b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE62LooksToDieFor.cs index a59c75912a..e722ad9fe2 100644 --- a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE62LooksToDieFor.cs +++ b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE62LooksToDieFor.cs @@ -40,7 +40,7 @@ public enum AID : uint class Thundercall(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.Thundercall), "Raidwide + summon lighting orbs"); -class LightningBoltDistantClap : Components.GenericAOEs +class LightningBoltDistantClap(BossModule module) : Components.GenericAOEs(module) { private readonly List _aoes = []; @@ -61,7 +61,7 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) { case AID.LightningBoltAOE: if (_aoes.FindIndex(a => a.Origin.AlmostEqual(spell.TargetXZ, 1)) is var index && index >= 0) - _aoes[index] = new(_shapeClap, spell.TargetXZ, activation: WorldState.FutureTime(6.1f)); + _aoes[index] = new(_shapeClap, spell.TargetXZ, default, WorldState.FutureTime(6.1f)); break; case AID.DistantClap: _aoes.RemoveAll(a => a.Origin.AlmostEqual(caster.Position, 1)); @@ -72,10 +72,8 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) class TwistingWinds(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TwistingWinds), new AOEShapeRect(40, 5, 40)); -class CloudToGround : Components.Exaflare +class CloudToGround(BossModule module) : Components.Exaflare(module, 5) { - public CloudToGround() : base(5) { } - public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.CloudToGroundFirst) @@ -95,7 +93,7 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) return; } - AdvanceLine(module, Lines[index], caster.Position); + AdvanceLine(Lines[index], caster.Position); if (Lines[index].ExplosionsLeft == 0) Lines.RemoveAt(index); } @@ -104,9 +102,9 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) class Flame(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.Flame), "Raidwide + summon flame orbs"); -class Burn : Components.GenericAOEs +class Burn(BossModule module) : Components.GenericAOEs(module) { - private IReadOnlyList _flames = ActorEnumeration.EmptyList; + private IReadOnlyList _flames = module.Enemies(OID.BallOfFire); private List<(Actor actor, AOEInstance? aoe)> _casters = []; private static readonly AOEShapeCircle _shape = new(8); @@ -125,16 +123,11 @@ public override IEnumerable ActiveAOEs(int slot, Actor actor) } } - public override void Init(BossModule module) - { - _flames = module.Enemies(OID.BallOfFire); - } - public override void Update() { foreach (var f in _flames.Where(f => f.ModelState.AnimState1 == 1 && _casters.FindIndex(c => c.actor == f) < 0)) { - _casters.Add((f, new (_shape, f.Position, activation: WorldState.FutureTime(5)))); + _casters.Add((f, new (_shape, f.Position, default, WorldState.FutureTime(5)))); } } @@ -146,15 +139,10 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } class Forelash(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Forelash), new AOEShapeCone(40, 90.Degrees())); - class Backlash(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Backlash), new AOEShapeCone(40, 90.Degrees())); - class Charybdis(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.Charybdis), "Set hp to 1"); - class Roar(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.Roar)); - class Levinbolt(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.LevinboltAOE), 6); - class SerpentsEdge(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.SerpentsEdge)); class CE62LooksToDieForStates : StateMachineBuilder diff --git a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE63WornToShadow.cs b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE63WornToShadow.cs index 2fa073b39b..ecadd1e4c7 100644 --- a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE63WornToShadow.cs +++ b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE63WornToShadow.cs @@ -41,16 +41,14 @@ public enum TetherID : uint Foreshadowing = 45, // AlkonostsShadow->Boss } -class Stormcall : Components.GenericAOEs +class Stormcall(BossModule module) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.Explosion)) { private readonly List<(Actor source, WPos dest, DateTime activation)> _sources = []; private static readonly AOEShapeCircle _shape = new(35); - public Stormcall() : base(ActionID.MakeSpell(AID.Explosion)) { } - public override IEnumerable ActiveAOEs(int slot, Actor actor) { - return _sources.Take(2).Select(e => new AOEInstance(_shape, e.dest, activation: e.activation)); + return _sources.Take(2).Select(e => new AOEInstance(_shape, e.dest, default, e.activation)); } public override void OnStatusGain(Actor actor, ActorStatus status) @@ -58,7 +56,7 @@ public override void OnStatusGain(Actor actor, ActorStatus status) if ((SID)status.ID == SID.OrbMovement) { var dest = Module.Bounds.Center + 29 * (actor.Position - Module.Bounds.Center).Normalized(); - _sources.Add((actor, dest, WorldState.FutureTime(status.Extra == 0x1E ? 9.7 : 19.9))); + _sources.Add((actor, dest, WorldState.FutureTime(status.Extra == 0x1E ? 9.7f : 19.9f))); _sources.SortBy(e => e.activation); } } @@ -77,12 +75,10 @@ public override void OnCastFinished(Actor caster, ActorCastInfo spell) } class BladedBeak(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.BladedBeak)); - class NihilitysSong(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.NihilitysSong)); - class Fantod(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.FantodAOE), 3); -class Foreshadowing : Components.GenericAOEs +class Foreshadowing(BossModule module) : Components.GenericAOEs(module) { private AOEShape? _bossAOE; private List<(Actor caster, AOEShape? shape)> _addAOEs = []; // shape is null if add starts cast slightly before boss diff --git a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE64FeelingTheBurn.cs b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE64FeelingTheBurn.cs index 84da742a68..7dac2740a7 100644 --- a/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE64FeelingTheBurn.cs +++ b/BossMod/Modules/Shadowbringers/Foray/CriticalEngagement/CE64FeelingTheBurn.cs @@ -1,4 +1,6 @@ -namespace BossMod.Shadowbringers.Foray.CriticalEngagement.CE64FeelingTheBurn; +using Dalamud.Logging.Internal; + +namespace BossMod.Shadowbringers.Foray.CriticalEngagement.CE64FeelingTheBurn; public enum OID : uint { @@ -45,13 +47,11 @@ public enum IconID : uint class DiveFormation(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.DiveFormation), new AOEShapeRect(60, 3)); -class AntiPersonnelMissile : Components.GenericAOEs +class AntiPersonnelMissile(BossModule module) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.BallisticImpact)) { private readonly List _positions = []; private static readonly AOEShapeRect _shape = new(12, 12, 12); - public AntiPersonnelMissile() : base(ActionID.MakeSpell(AID.BallisticImpact)) { } - public override IEnumerable ActiveAOEs(int slot, Actor actor) { return _positions.Take(2).Select(p => new AOEInstance(_shape, p)); @@ -71,7 +71,7 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } } -class ChainCannonEscort : Components.GenericAOEs +class ChainCannonEscort(BossModule module) : Components.GenericAOEs(module) { private readonly List<(Actor caster, int numCasts, DateTime activation)> _casters = []; private static readonly AOEShapeRect _shape = new(60, 2.5f); @@ -84,7 +84,7 @@ public override IEnumerable ActiveAOEs(int slot, Actor actor) public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (var c in _casters.Where(c => IsTrackingPlayer(c, pc))) - _shape.Outline(arena, c.caster); + _shape.Outline(Arena, c.caster); } public override void OnStatusGain(Actor actor, ActorStatus status) @@ -112,7 +112,7 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) private bool IsTrackingPlayer((Actor caster, int numCasts, DateTime activation) c, Actor actor) => c.numCasts == 0 && c.caster.CastInfo == null && c.caster.TargetID == actor.InstanceID; } -class ChainCannonBoss : Components.GenericAOEs +class ChainCannonBoss(BossModule module) : Components.GenericAOEs(module) { private AOEInstance? _instance; private static readonly AOEShapeRect _shape = new(60, 2.5f); @@ -143,11 +143,8 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } class SurfaceMissile(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.SurfaceMissileAOE), 6); - class SuppressiveMagitekRays(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.SuppressiveMagitekRays)); - class Analysis(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.Analysis), "Face open weakpoint to charging adds"); - class PreciseStrike(BossModule module) : Components.CastWeakpoint(module, ActionID.MakeSpell(AID.PreciseStrike), new AOEShapeRect(60, 3), (uint)SID.FrontUnseen, (uint)SID.BackUnseen, 0, 0); class CE64FeelingTheBurnStates : StateMachineBuilder diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/ActOfMercy.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/ActOfMercy.cs index 6f67932316..d84af24c04 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/ActOfMercy.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/ActOfMercy.cs @@ -1,16 +1,12 @@ namespace BossMod.Shadowbringers.Foray.DelubrumReginae.DRS1TrinitySeeker; -class ActOfMercy : Components.GenericAOEs +class ActOfMercy(BossModule module) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.ActOfMercy)) { - private DateTime _activation; + private DateTime _activation = module.WorldState.FutureTime(7.6f); // from verdant path cast start private static readonly AOEShapeCross _shape = new(50, 4); - public ActOfMercy() : base(ActionID.MakeSpell(AID.ActOfMercy)) { } - public override IEnumerable ActiveAOEs(int slot, Actor actor) { yield return new(_shape, Module.PrimaryActor.Position, Module.PrimaryActor.Rotation, _activation); } - - public override void Init(BossModule module) => _activation = WorldState.FutureTime(7.6f); // from verdant path cast start } diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/BalefulBlade.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/BalefulBlade.cs index f2cf34de2e..4a0d3a22e3 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/BalefulBlade.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/BalefulBlade.cs @@ -1,6 +1,6 @@ namespace BossMod.Shadowbringers.Foray.DelubrumReginae.DRS1TrinitySeeker; -class BalefulBlade : BossComponent +class BalefulBlade(BossModule module) : BossComponent(module) { private bool _phantomEdge; @@ -9,7 +9,7 @@ class BalefulBlade : BossComponent public override void AddHints(int slot, Actor actor, TextHints hints) { - hints.Add(_phantomEdge ? "Stay in front of barricade!" : "Hide behind barricade!", !IsSafe(module, actor)); + hints.Add(_phantomEdge ? "Stay in front of barricade!" : "Hide behind barricade!", !IsSafe(actor)); } public override void DrawArenaBackground(int pcSlot, Actor pc) @@ -18,7 +18,7 @@ public override void DrawArenaBackground(int pcSlot, Actor pc) for (int i = 0; i < 4; ++i) { var center = (45 + i * 90).Degrees(); - shape.Draw(arena, Module.Bounds.Center, center, ArenaColor.SafeFromAOE); + shape.Draw(Arena, Module.Bounds.Center, center, ArenaColor.SafeFromAOE); } } @@ -28,7 +28,7 @@ public override void OnCastStarted(Actor caster, ActorCastInfo spell) _phantomEdge = true; } - public bool IsSafe(BossModule module, Actor actor) + public bool IsSafe(Actor actor) { var offset = actor.Position - Module.Bounds.Center; var angle = Angle.FromDirection(offset).Rad; // 4 barricades to check, at +-45 and +-135 diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/BalefulFirestorm.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/BalefulFirestorm.cs index cd5b8e47cf..233edc3043 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/BalefulFirestorm.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/BalefulFirestorm.cs @@ -1,7 +1,7 @@ namespace BossMod.Shadowbringers.Foray.DelubrumReginae.DRS1TrinitySeeker; // TODO: consider showing something before clones jump? -class BalefulFirestorm : Components.GenericAOEs +class BalefulFirestorm(BossModule module) : Components.GenericAOEs(module) { private List<(Actor caster, AOEInstance aoe)> _casters = new(); private static readonly AOEShapeRect _shape = new(50, 10); diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/BalefulSwathe.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/BalefulSwathe.cs index 0092b8fd2f..a057f0715d 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/BalefulSwathe.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/BalefulSwathe.cs @@ -1,17 +1,13 @@ namespace BossMod.Shadowbringers.Foray.DelubrumReginae.DRS1TrinitySeeker; -class BalefulSwathe : Components.GenericAOEs +class BalefulSwathe(BossModule module) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.BalefulSwathe)) { - private DateTime _activation; + private DateTime _activation = module.WorldState.FutureTime(7.6f); // from verdant path cast start private static readonly AOEShapeRect _shape = new(50, 50, -5); - public BalefulSwathe() : base(ActionID.MakeSpell(AID.BalefulSwathe)) { } - public override IEnumerable ActiveAOEs(int slot, Actor actor) { yield return new(_shape, Module.PrimaryActor.Position, Module.PrimaryActor.Rotation + 90.Degrees(), _activation); yield return new(_shape, Module.PrimaryActor.Position, Module.PrimaryActor.Rotation - 90.Degrees(), _activation); } - - public override void Init(BossModule module) => _activation = WorldState.FutureTime(7.6f); // from verdant path cast start } diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/DRS1.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/DRS1.cs index 3000bed02d..652afca0e4 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/DRS1.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/DRS1.cs @@ -1,11 +1,8 @@ namespace BossMod.Shadowbringers.Foray.DelubrumReginae.DRS1TrinitySeeker; class VerdantTempest(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.VerdantTempestAOE)); - class MercifulBreeze(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.MercifulBreeze), new AOEShapeRect(50, 2.5f)); - class MercifulBlooms(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.MercifulBlooms), new AOEShapeCircle(20)); - class MercifulArc(BossModule module) : Components.BaitAwayIcon(module, new AOEShapeCone(12, 45.Degrees()), (uint)IconID.MercifulArc, ActionID.MakeSpell(AID.MercifulArc)); // TODO: verify angle // TODO: depending on phantom edge, it's either a shared tankbuster cleave or a weird cleave ignoring closest target (?) @@ -16,21 +13,18 @@ class BurningChains(BossModule module) : Components.Chains(module, (uint)TetherI // TODO: it's a line stack, but I don't think there's a way to determine cast target - so everyone should just stack?.. class IronImpact(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.IronImpact)); - class IronRose(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.IronRose), new AOEShapeRect(50, 4)); class DeadIron : Components.BaitAwayTethers { - public DeadIron() : base(new AOEShapeCone(50, 15.Degrees()), (uint)TetherID.DeadIron, ActionID.MakeSpell(AID.DeadIronAOE)) { DrawTethers = false; } + public DeadIron(BossModule module) : base(module, new AOEShapeCone(50, 15.Degrees()), (uint)TetherID.DeadIron, ActionID.MakeSpell(AID.DeadIronAOE)) { DrawTethers = false; } } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 761, NameID = 9834)] -public class DRS1 : BossModule +public class DRS1(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(0, 278), 25)) { public static readonly float BarricadeRadius = 20; - public DRS1(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(0, 278), 25)) { } - protected override void DrawArenaForeground(int pcSlot, Actor pc) { for (int i = 0; i < 4; ++i) diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/IronSplitter.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/IronSplitter.cs index ef79ed976c..f9bf86d5fa 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/IronSplitter.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/IronSplitter.cs @@ -1,11 +1,9 @@ namespace BossMod.Shadowbringers.Foray.DelubrumReginae.DRS1TrinitySeeker; -class IronSplitter : Components.GenericAOEs +class IronSplitter(BossModule module) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.IronSplitter)) { private List _aoes = new(); - public IronSplitter() : base(ActionID.MakeSpell(AID.IronSplitter)) { } - public override IEnumerable ActiveAOEs(int slot, Actor actor) => _aoes; public override void OnCastStarted(Actor caster, ActorCastInfo spell) diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/MercifulMoon.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/MercifulMoon.cs index 2973311d25..ec86f6748d 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/MercifulMoon.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/MercifulMoon.cs @@ -1,16 +1,14 @@ namespace BossMod.Shadowbringers.Foray.DelubrumReginae.DRS1TrinitySeeker; -class MercifulMoon : Components.GenericGaze +class MercifulMoon(BossModule module) : Components.GenericGaze(module, ActionID.MakeSpell(AID.MercifulMoon)) { private Eye? _eye; - public MercifulMoon() : base(ActionID.MakeSpell(AID.MercifulMoon)) { } - public override IEnumerable ActiveEyes(int slot, Actor actor) => Utils.ZeroOrOne(_eye); public override void Update() { - if (_eye == null && module.Enemies(OID.AetherialOrb).FirstOrDefault() is var orb && orb != null) + if (_eye == null && Module.Enemies(OID.AetherialOrb).FirstOrDefault() is var orb && orb != null) _eye = new(orb.Position, WorldState.FutureTime(5.8f)); // time from spawn to cast } } diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/MercyFourfold.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/MercyFourfold.cs index a2a3b5b456..7f8576a924 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/MercyFourfold.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/MercyFourfold.cs @@ -1,14 +1,12 @@ namespace BossMod.Shadowbringers.Foray.DelubrumReginae.DRS1TrinitySeeker; -class MercyFourfold : Components.GenericAOEs +class MercyFourfold(BossModule module) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.MercyFourfoldAOE)) { public readonly List AOEs = new(); private readonly List _safezones = new(); private static readonly AOEShapeCone _shapeAOE = new(50, 90.Degrees()); private static readonly AOEShapeCone _shapeSafe = new(50, 45.Degrees()); - public MercyFourfold() : base(ActionID.MakeSpell(AID.MercyFourfoldAOE)) { } - public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (AOEs.Count > 0) @@ -50,7 +48,7 @@ public override void OnStatusGain(Actor actor, ActorStatus status) public override void OnEventCast(Actor caster, ActorCastEvent spell) { - base.OnEventCast(module, caster, spell); + base.OnEventCast(caster, spell); if (spell.Action == WatchedAction) { if (AOEs.Count > 0) diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS2StygimolochWarrior/DRS2.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS2StygimolochWarrior/DRS2.cs index 5be5820fee..9444bacfe1 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS2StygimolochWarrior/DRS2.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS2StygimolochWarrior/DRS2.cs @@ -1,9 +1,7 @@ namespace BossMod.Shadowbringers.Foray.DelubrumReginae.DRS2StygimolochWarrior; class ViciousSwipe(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ViciousSwipe), new AOEShapeCircle(15)); - class CrazedRampage(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.CrazedRampage), 13); - class Coerce(BossModule module) : Components.StatusDrivenForcedMarch(module, 4, (uint)SID.ForwardMarch, (uint)SID.AboutFace, (uint)SID.LeftFace, (uint)SID.RightFace); [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 761, NameID = 9754)] diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS2StygimolochWarrior/Entrapment.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS2StygimolochWarrior/Entrapment.cs index f1554fc505..1e1159ea8a 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS2StygimolochWarrior/Entrapment.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS2StygimolochWarrior/Entrapment.cs @@ -1,11 +1,9 @@ namespace BossMod.Shadowbringers.Foray.DelubrumReginae.DRS2StygimolochWarrior; -class EntrapmentAttract : Components.Knockback +class EntrapmentAttract(BossModule module) : Components.Knockback(module, ActionID.MakeSpell(AID.EntrapmentAttract), true) { private DateTime _activation; - public EntrapmentAttract() : base(ActionID.MakeSpell(AID.EntrapmentAttract), true) { } - public override IEnumerable Sources(int slot, Actor actor) { yield return new(new(Module.Bounds.Center.X, Module.Bounds.Center.Z + Module.Bounds.HalfSize), 60, _activation, Kind: Kind.TowardsOrigin); @@ -40,7 +38,7 @@ public struct Pattern private Pattern _potentiallyUnsafe; private bool _possiblePatternsDirty; - public Entrapment(Pattern[] allowedPatterns) : base(ActionID.MakeSpell(AID.MassiveExplosion)) + public Entrapment(BossModule module, Pattern[] allowedPatterns) : base(module, ActionID.MakeSpell(AID.MassiveExplosion)) { _allowedPatterns = allowedPatterns; _possiblePatterns = new((1u << allowedPatterns.Length) - 1); @@ -87,18 +85,18 @@ public override void AddGlobalHints(GlobalHints hints) public override void DrawArenaBackground(int pcSlot, Actor pc) { - DrawTraps(module, _curPattern.Normal, false, true, arena); - DrawTraps(module, _curPattern.Toad, TrapToTake == TrapType.Toad, true, arena); - DrawTraps(module, _curPattern.Ice, TrapToTake == TrapType.Ice, true, arena); - DrawTraps(module, _curPattern.Mini, TrapToTake == TrapType.Mini, true, arena); + DrawTraps(_curPattern.Normal, false, true); + DrawTraps(_curPattern.Toad, TrapToTake == TrapType.Toad, true); + DrawTraps(_curPattern.Ice, TrapToTake == TrapType.Ice, true); + DrawTraps(_curPattern.Mini, TrapToTake == TrapType.Mini, true); } public override void DrawArenaForeground(int pcSlot, Actor pc) { - DrawTraps(module, _potentiallyUnsafe.Normal, false, false, arena); - DrawTraps(module, _potentiallyUnsafe.Toad, TrapToTake == TrapType.Toad, false, arena); - DrawTraps(module, _potentiallyUnsafe.Ice, TrapToTake == TrapType.Ice, false, arena); - DrawTraps(module, _potentiallyUnsafe.Mini, TrapToTake == TrapType.Mini, false, arena); + DrawTraps(_potentiallyUnsafe.Normal, false, false); + DrawTraps(_potentiallyUnsafe.Toad, TrapToTake == TrapType.Toad, false); + DrawTraps(_potentiallyUnsafe.Ice, TrapToTake == TrapType.Ice, false); + DrawTraps(_potentiallyUnsafe.Mini, TrapToTake == TrapType.Mini, false); } public override void OnActorCreated(Actor actor) @@ -106,16 +104,16 @@ public override void OnActorCreated(Actor actor) switch ((OID)actor.OID) { case OID.TrapNormal: - AddTrap(ref _curPattern.Normal, module, actor.Position, false); + AddTrap(ref _curPattern.Normal, actor.Position, false); break; case OID.TrapToad: - AddTrap(ref _curPattern.Toad, module, actor.Position, false); + AddTrap(ref _curPattern.Toad, actor.Position, false); break; case OID.TrapIce: - AddTrap(ref _curPattern.Ice, module, actor.Position, false); + AddTrap(ref _curPattern.Ice, actor.Position, false); break; case OID.TrapMini: - AddTrap(ref _curPattern.Mini, module, actor.Position, false); + AddTrap(ref _curPattern.Mini, actor.Position, false); break; } } @@ -125,21 +123,21 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) switch ((AID)spell.Action.ID) { case AID.MassiveExplosion: - AddTrap(ref _curPattern.Normal, module, spell.TargetXZ, true); + AddTrap(ref _curPattern.Normal, spell.TargetXZ, true); break; case AID.Toad: - AddTrap(ref _curPattern.Toad, module, spell.TargetXZ, true); + AddTrap(ref _curPattern.Toad, spell.TargetXZ, true); break; case AID.TrappedUnderIce: - AddTrap(ref _curPattern.Ice, module, spell.TargetXZ, true); + AddTrap(ref _curPattern.Ice, spell.TargetXZ, true); break; case AID.Mini: - AddTrap(ref _curPattern.Mini, module, spell.TargetXZ, true); + AddTrap(ref _curPattern.Mini, spell.TargetXZ, true); break; } } - private void AddTrap(ref BitMask mask, BossModule module, WPos position, bool exploded) + private void AddTrap(ref BitMask mask, WPos position, bool exploded) { var index = IndexFromOffset(position - Module.Bounds.Center); //ReportError($"Trap @ {position} (dist={(position - Raid.Player()!.Position).Length()}) = {index}"); @@ -164,16 +162,16 @@ private int IndexFromOffset(WDir offset) private WDir CellOffset(int x, int z) => 5 * new WDir(x - 3, z - 3); private WDir CellOffset(int index) => CellOffset(index & 7, index >> 3); - private void DrawTraps(BossModule module, BitMask mask, bool safe, bool background, MiniArena arena) + private void DrawTraps(BitMask mask, bool safe, bool background) { mask &= ~_exploded; // don't draw already exploded traps foreach (var index in mask.SetBits()) { var pos = Module.Bounds.Center + CellOffset(index); if (background) - arena.ZoneCircle(pos, 2.5f, safe ? ArenaColor.SafeFromAOE : ArenaColor.AOE); + Arena.ZoneCircle(pos, 2.5f, safe ? ArenaColor.SafeFromAOE : ArenaColor.AOE); else - arena.AddCircle(pos, 2.5f, safe ? ArenaColor.Safe : ArenaColor.Danger); + Arena.AddCircle(pos, 2.5f, safe ? ArenaColor.Safe : ArenaColor.Danger); } } @@ -216,7 +214,7 @@ protected static BitMask BuildMask(params int[] bits) } } -class EntrapmentNormal : Entrapment +class EntrapmentNormal(BossModule module) : Entrapment(module, _allowedPatterns) { private readonly static Pattern[] _allowedPatterns = [ new() { Normal = BuildMask( 8, 9, 10, 11, 12, 13, 18, 20, 34, 35, 36, 37, 38, 40, 42, 45) }, @@ -225,10 +223,9 @@ class EntrapmentNormal : Entrapment new() { Normal = BuildMask( 9, 11, 12, 13, 14, 16, 17, 27, 28, 32, 33, 38, 41, 42, 44, 46) }, // TODO: i'm not sure whether this pattern is real new() { Normal = BuildMask(10, 11, 13, 14, 19, 20, 21, 24, 25, 30, 33, 34, 35, 36, 44, 45) }, ]; - public EntrapmentNormal() : base(_allowedPatterns) { } } -class EntrapmentInescapable : Entrapment +class EntrapmentInescapable(BossModule module) : Entrapment(module, _allowedPatterns) { private readonly static Pattern[] _allowedPatterns = [ new() { Normal = BuildMask(3, 4, 5, 8, 20, 25, 38, 43, 46, 49, 52), Toad = BuildMask(10, 50, 54), Ice = BuildMask(40), Mini = BuildMask(29) }, @@ -237,8 +234,6 @@ class EntrapmentInescapable : Entrapment new() { Normal = BuildMask(5, 8, 11, 25, 30, 32, 38, 43, 49, 50, 54), Toad = BuildMask(16, 21, 48), Ice = BuildMask(36), Mini = BuildMask( 1) }, ]; - public EntrapmentInescapable() : base(_allowedPatterns) { } - public override void OnCastStarted(Actor caster, ActorCastInfo spell) { var trap = (AID)spell.Action.ID switch @@ -254,7 +249,5 @@ public override void OnCastStarted(Actor caster, ActorCastInfo spell) } class LethalBlow(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.LethalBlow), new AOEShapeRect(44, 24)); - class LeapingSpark(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.LeapingSparkAOE)); - class Devour(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Devour), new AOEShapeCone(6, 60.Degrees())); diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS2StygimolochWarrior/FocusedTremor.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS2StygimolochWarrior/FocusedTremor.cs index 5e09d06ab6..30a23c056d 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS2StygimolochWarrior/FocusedTremor.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS2StygimolochWarrior/FocusedTremor.cs @@ -1,13 +1,12 @@ namespace BossMod.Shadowbringers.Foray.DelubrumReginae.DRS2StygimolochWarrior; class FocusedTremorLarge(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.FocusedTremorAOELarge), new AOEShapeRect(10, 10, 10), 2); - class ForcefulStrike(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ForcefulStrike), new AOEShapeRect(44, 24)); // combined with flailing strike, first bait should be into first square class FocusedTremorSmall : Components.SelfTargetedAOEs { - public FocusedTremorSmall() : base(ActionID.MakeSpell(AID.FocusedTremorAOESmall), new AOEShapeRect(5, 5, 5), 1) + public FocusedTremorSmall(BossModule module) : base(module, ActionID.MakeSpell(AID.FocusedTremorAOESmall), new AOEShapeRect(5, 5, 5), 1) { Color = ArenaColor.SafeFromAOE; Risky = false; @@ -23,7 +22,7 @@ public void Activate() class FlailingStrikeBait(BossModule module) : Components.BaitAwayTethers(module, new AOEShapeCone(40, 30.Degrees()), (uint)TetherID.FlailingStrike); -class FlailingStrike : Components.GenericRotatingAOE +class FlailingStrike(BossModule module) : Components.GenericRotatingAOE(module) { private static readonly AOEShapeCone _shape = new(60, 30.Degrees()); diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS2StygimolochWarrior/UnrelentingCharge.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS2StygimolochWarrior/UnrelentingCharge.cs index 3dacd385e6..8bbdbfeaac 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS2StygimolochWarrior/UnrelentingCharge.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS2StygimolochWarrior/UnrelentingCharge.cs @@ -1,6 +1,6 @@ namespace BossMod.Shadowbringers.Foray.DelubrumReginae.DRS2StygimolochWarrior; -class UnrelentingCharge : Components.Knockback +class UnrelentingCharge(BossModule module) : Components.Knockback(module) { private Actor? _source; private DateTime _activation; diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS3Dahu/DRS3.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS3Dahu/DRS3.cs index b60b10ca72..cd7ebc1571 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS3Dahu/DRS3.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS3Dahu/DRS3.cs @@ -1,25 +1,19 @@ namespace BossMod.Shadowbringers.Foray.DelubrumReginae.DRS3Dahu; class FallingRock(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.FallingRock), 4); - class HotCharge(BossModule module) : Components.ChargeAOEs(module, ActionID.MakeSpell(AID.HotCharge), 4); - class Firebreathe(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Firebreathe), new AOEShapeCone(60, 45.Degrees())); - class HeadDown(BossModule module) : Components.ChargeAOEs(module, ActionID.MakeSpell(AID.HeadDown), 2); - class HuntersClaw(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HuntersClaw), new AOEShapeCircle(8)); class Burn : Components.BaitAwayIcon { - public Burn() : base(new AOEShapeCircle(30), (uint)IconID.Burn, ActionID.MakeSpell(AID.Burn), 8.2f) { CenterAtTarget = true; } + public Burn(BossModule module) : base(module, new AOEShapeCircle(30), (uint)IconID.Burn, ActionID.MakeSpell(AID.Burn), 8.2f) { CenterAtTarget = true; } } [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 761, NameID = 9751)] -public class DRS3 : BossModule +public class DRS3(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(82, 138), 30)) { - public DRS3(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(82, 138), 30)) { } - protected override void DrawEnemies(int pcSlot, Actor pc) { base.DrawEnemies(pcSlot, pc); diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS3Dahu/FeralHowlHystericAssault.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS3Dahu/FeralHowlHystericAssault.cs index 71fe3203fe..01805cbf4c 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS3Dahu/FeralHowlHystericAssault.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS3Dahu/FeralHowlHystericAssault.cs @@ -7,7 +7,7 @@ class FeralHowlHystericAssault : Components.Knockback private float _delay; private Source? _source; - public FeralHowlHystericAssault(AID aidCast, AID aidAOE, float delay) : base(ActionID.MakeSpell(aidAOE), true) + public FeralHowlHystericAssault(BossModule module, AID aidCast, AID aidAOE, float delay) : base(module, ActionID.MakeSpell(aidAOE), true) { _aidCast = aidCast; _delay = delay; @@ -23,5 +23,5 @@ public override void OnCastStarted(Actor caster, ActorCastInfo spell) } } -class FeralHowl() : FeralHowlHystericAssault(AID.FeralHowl, AID.FeralHowlAOE, 2.1f) { } -class HystericAssault() : FeralHowlHystericAssault(AID.HystericAssault, AID.HystericAssaultAOE, 0.9f) { } +class FeralHowl(BossModule module) : FeralHowlHystericAssault(module, AID.FeralHowl, AID.FeralHowlAOE, 2.1f) { } +class HystericAssault(BossModule module) : FeralHowlHystericAssault(module, AID.HystericAssault, AID.HystericAssaultAOE, 0.9f) { } diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS3Dahu/FirebreatheRotating.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS3Dahu/FirebreatheRotating.cs index 1a32eaa771..d2cb06824a 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS3Dahu/FirebreatheRotating.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS3Dahu/FirebreatheRotating.cs @@ -1,6 +1,6 @@ namespace BossMod.Shadowbringers.Foray.DelubrumReginae.DRS3Dahu; -class FirebreatheRotating : Components.GenericRotatingAOE +class FirebreatheRotating(BossModule module) : Components.GenericRotatingAOE(module) { private Angle _increment; diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS3Dahu/Shockwave.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS3Dahu/Shockwave.cs index afc4aed685..d638b7d075 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS3Dahu/Shockwave.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS3Dahu/Shockwave.cs @@ -1,6 +1,6 @@ namespace BossMod.Shadowbringers.Foray.DelubrumReginae.DRS3Dahu; -class Shockwave : Components.GenericAOEs +class Shockwave(BossModule module) : Components.GenericAOEs(module) { private List _aoes = new(); private static readonly AOEShapeCone _shape = new(15, 90.Degrees()); diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS3Dahu/SpitFlame.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS3Dahu/SpitFlame.cs index 9d166cbfb5..218666af2d 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS3Dahu/SpitFlame.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS3Dahu/SpitFlame.cs @@ -1,21 +1,14 @@ namespace BossMod.Shadowbringers.Foray.DelubrumReginae.DRS3Dahu; -class SpitFlame : Components.UniformStackSpread +class SpitFlame(BossModule module) : Components.UniformStackSpread(module, 0, 4, alwaysShowSpreads: true, raidwideOnResolve: false) { private Actor?[] _targets = { null, null, null, null }; - private IReadOnlyList _adds = ActorEnumeration.EmptyList; - - public SpitFlame() : base(0, 4, alwaysShowSpreads: true, raidwideOnResolve: false) { } - - public override void Init(BossModule module) - { - _adds = module.Enemies(OID.Marchosias); - } + private IReadOnlyList _adds = module.Enemies(OID.Marchosias); public override void Update() { Spreads.RemoveAll(s => s.Target.IsDead); // if target dies after being marked, cast will be skipped - base.Update(module); + base.Update(); } public override void AddHints(int slot, Actor actor, TextHints hints) @@ -31,7 +24,7 @@ public override void AddHints(int slot, Actor actor, TextHints hints) public override void DrawArenaForeground(int pcSlot, Actor pc) { - arena.Actors(_adds, ArenaColor.Object, true); + Arena.Actors(_adds, ArenaColor.Object, true); base.DrawArenaForeground(pcSlot, pc); } diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS4QueensGuard/AboveBoard.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS4QueensGuard/AboveBoard.cs index 19b597e54b..5c650aa083 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS4QueensGuard/AboveBoard.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS4QueensGuard/AboveBoard.cs @@ -1,15 +1,15 @@ namespace BossMod.Shadowbringers.Foray.DelubrumReginae.DRS4QueensGuard; -class AboveBoard : Components.GenericAOEs +class AboveBoard(BossModule module) : Components.GenericAOEs(module) { public enum State { Initial, ThrowUpDone, ShortExplosionsDone, LongExplosionsDone } public State CurState { get; private set; } - private IReadOnlyList _smallBombs = ActorEnumeration.EmptyList; - private IReadOnlyList _bigBombs = ActorEnumeration.EmptyList; + private IReadOnlyList _smallBombs = module.Enemies(OID.AetherialBolt); + private IReadOnlyList _bigBombs = module.Enemies(OID.AetherialBurst); private bool _invertedBombs; // bombs are always either all normal (big=short) or all inverted private BitMask _invertedPlayers; // default for player is 'long', short is considered inverted (has visible status) - private DateTime _activation; + private DateTime _activation = module.WorldState.FutureTime(12); private static readonly AOEShapeCircle _shape = new(10); @@ -19,13 +19,6 @@ public override IEnumerable ActiveAOEs(int slot, Actor actor) return imminentBombs.Select(b => new AOEInstance(_shape, b.Position, new(), _activation)); } - public override void Init(BossModule module) - { - _smallBombs = module.Enemies(OID.AetherialBolt); - _bigBombs = module.Enemies(OID.AetherialBurst); - _activation = WorldState.FutureTime(12); - } - public override void OnStatusGain(Actor actor, ActorStatus status) { switch ((SID)status.ID) diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS4QueensGuard/CoatOfArms.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS4QueensGuard/CoatOfArms.cs index 5afc4ea53c..8cf8b744e6 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS4QueensGuard/CoatOfArms.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS4QueensGuard/CoatOfArms.cs @@ -1,9 +1,7 @@ namespace BossMod.Shadowbringers.Foray.DelubrumReginae.DRS4QueensGuard; -class CoatOfArms : Components.DirectionalParry +class CoatOfArms(BossModule module) : Components.DirectionalParry(module, (uint)OID.AetherialWard) { - public CoatOfArms() : base((uint)OID.AetherialWard) { } - public override void OnCastStarted(Actor caster, ActorCastInfo spell) { var sides = (AID)spell.Action.ID switch diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS4QueensGuard/DRS4.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS4QueensGuard/DRS4.cs index d95e1d4b6c..693777dc8b 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS4QueensGuard/DRS4.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS4QueensGuard/DRS4.cs @@ -1,24 +1,17 @@ namespace BossMod.Shadowbringers.Foray.DelubrumReginae.DRS4QueensGuard; class OptimalPlaySword(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.OptimalPlaySword), new AOEShapeCircle(10)); - class OptimalPlayShield(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.OptimalPlayShield), new AOEShapeDonut(5, 60)); - class OptimalPlayCone(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.OptimalPlayCone), new AOEShapeCone(60, 135.Degrees())); // note: apparently there is no 'front unseen' status class QueensShotUnseen(BossModule module) : Components.CastWeakpoint(module, ActionID.MakeSpell(AID.QueensShotUnseen), new AOEShapeCircle(60), 0, (uint)SID.BackUnseen, (uint)SID.LeftUnseen, (uint)SID.RightUnseen); - class TurretsTourUnseen(BossModule module) : Components.CastWeakpoint(module, ActionID.MakeSpell(AID.TurretsTourUnseen), new AOEShapeRect(50, 2.5f), 0, (uint)SID.BackUnseen, (uint)SID.LeftUnseen, (uint)SID.RightUnseen); class FieryPortent(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.FieryPortent), "Stand still!"); - class IcyPortent(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.IcyPortent), "Move!"); - class PawnOff(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PawnOffReal), new AOEShapeCircle(20)); - -// TODO: consider showing reflect hints -class Fracture(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.Fracture)); +class Fracture(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.Fracture)); // TODO: consider showing reflect hints [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.Knight, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 761, NameID = 9838)] public class DRS4 : BossModule diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS4QueensGuard/GreatBallOfFire.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS4QueensGuard/GreatBallOfFire.cs index 3488fd5863..32b460fc42 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS4QueensGuard/GreatBallOfFire.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS4QueensGuard/GreatBallOfFire.cs @@ -1,10 +1,10 @@ namespace BossMod.Shadowbringers.Foray.DelubrumReginae.DRS4QueensGuard; -class GreatBallOfFire : Components.GenericAOEs +class GreatBallOfFire(BossModule module) : Components.GenericAOEs(module) { - private IReadOnlyList _smallFlames = ActorEnumeration.EmptyList; - private IReadOnlyList _bigFlames = ActorEnumeration.EmptyList; - private DateTime _activation; + private IReadOnlyList _smallFlames = module.Enemies(OID.RagingFlame); + private IReadOnlyList _bigFlames = module.Enemies(OID.ImmolatingFlame); + private DateTime _activation = module.WorldState.FutureTime(6.6f); private static readonly AOEShapeCircle _shapeSmall = new(10); private static readonly AOEShapeCircle _shapeBig = new(18); @@ -17,13 +17,6 @@ public override IEnumerable ActiveAOEs(int slot, Actor actor) yield return new(_shapeBig, f.Position, new(), f.CastInfo?.NPCFinishAt ?? _activation); } - public override void Init(BossModule module) - { - _smallFlames = module.Enemies(OID.RagingFlame); - _bigFlames = module.Enemies(OID.ImmolatingFlame); - _activation = WorldState.FutureTime(6.6f); // TODO: this depends on when do we want to start showing hints... - } - public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.BurnSmall or AID.BurnBig) diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS4QueensGuard/OptimalOffensive.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS4QueensGuard/OptimalOffensive.cs index 2269a781fc..d2846e284e 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS4QueensGuard/OptimalOffensive.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS4QueensGuard/OptimalOffensive.cs @@ -1,28 +1,22 @@ namespace BossMod.Shadowbringers.Foray.DelubrumReginae.DRS4QueensGuard; class OptimalOffensiveSword(BossModule module) : Components.ChargeAOEs(module, ActionID.MakeSpell(AID.OptimalOffensiveSword), 2.5f); - class OptimalOffensiveShield(BossModule module) : Components.ChargeAOEs(module, ActionID.MakeSpell(AID.OptimalOffensiveShield), 2.5f); // note: there are two casters (as usual in bozja content for raidwides) // TODO: not sure whether it ignores immunes, I assume so... class OptimalOffensiveShieldKnockback(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.OptimalOffensiveShieldKnockback), 10, true, 1); -class UnluckyLot : Components.GenericAOEs +class UnluckyLot(BossModule module) : Components.GenericAOEs(module) { - private AOEInstance? _aoe; + private AOEInstance? _aoe = new(new AOEShapeCircle(20), module.Bounds.Center, default, module.WorldState.FutureTime(7.6f)); public override IEnumerable ActiveAOEs(int slot, Actor actor) => Utils.ZeroOrOne(_aoe); - public override void Init(BossModule module) - { - _aoe = new(new AOEShapeCircle(20), Module.Bounds.Center, activation: WorldState.FutureTime(7.6)); - } - public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.OptimalOffensiveShieldMoveSphere) - _aoe = new(new AOEShapeCircle(20), caster.Position, activation: WorldState.FutureTime(8.6)); + _aoe = new(new AOEShapeCircle(20), caster.Position, default, WorldState.FutureTime(8.6f)); } public override void OnCastFinished(Actor caster, ActorCastInfo spell) diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS4QueensGuard/SpellforgeSteelstingHint.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS4QueensGuard/SpellforgeSteelstingHint.cs index 7aed91084f..0a75c9d5c0 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS4QueensGuard/SpellforgeSteelstingHint.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS4QueensGuard/SpellforgeSteelstingHint.cs @@ -1,7 +1,7 @@ namespace BossMod.Shadowbringers.Foray.DelubrumReginae.DRS4QueensGuard; // TODO: improve hints (check player's class; for healers, hints for party members having incorrect buff) -class SpellforgeSteelstingHint : BossComponent +class SpellforgeSteelstingHint(BossModule module) : BossComponent(module) { private string _hint = ""; public bool Active => _hint.Length > 0; diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS4QueensGuard/WindsOfWeight.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS4QueensGuard/WindsOfWeight.cs index 44bd8fe757..4f31c3d125 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS4QueensGuard/WindsOfWeight.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS4QueensGuard/WindsOfWeight.cs @@ -1,6 +1,6 @@ namespace BossMod.Shadowbringers.Foray.DelubrumReginae.DRS4QueensGuard; -class WindsOfWeight : Components.GenericAOEs +class WindsOfWeight(BossModule module) : Components.GenericAOEs(module) { private List _green = new(); private List _purple = new(); diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS5Phantom/DRS5.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS5Phantom/DRS5.cs index 81e2816609..6bde0144e6 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS5Phantom/DRS5.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS5Phantom/DRS5.cs @@ -1,9 +1,7 @@ namespace BossMod.Shadowbringers.Foray.DelubrumReginae.DRS5Phantom; class MaledictionOfAgony(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.MaledictionOfAgonyAOE)); - class BloodyWraith(BossModule module) : Components.Adds(module, (uint)OID.BloodyWraith); - class MistyWraith(BossModule module) : Components.Adds(module, (uint)OID.MistyWraith); [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 761, NameID = 9755)] diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS5Phantom/Miasma.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS5Phantom/Miasma.cs index f9daada243..3b3f7b173c 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS5Phantom/Miasma.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS5Phantom/Miasma.cs @@ -1,7 +1,7 @@ namespace BossMod.Shadowbringers.Foray.DelubrumReginae.DRS5Phantom; // TODO: improve hints, currently they are not good... we probably don't need a fully generic implementation, since there are few possible patterns -class Miasma : Components.GenericAOEs +class Miasma(BossModule module) : Components.GenericAOEs(module) { public enum Order { Unknown, LowHigh, HighLow } @@ -68,7 +68,7 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) if (shape == null) return; - int laneIndex = LaneIndex(module, shape == _shapeRect ? caster.Position : spell.TargetXZ); + int laneIndex = LaneIndex(shape == _shapeRect ? caster.Position : spell.TargetXZ); if ((AID)spell.Action.ID is AID.CreepingMiasmaFirst or AID.LingeringMiasmaFirst or AID.SwirlingMiasmaFirst) { int heightIndex = (_laneStates[laneIndex, 0].NumCasts, _laneStates[laneIndex, 1].NumCasts) switch @@ -85,7 +85,7 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } else { - AdvanceLane(module, ref l); + AdvanceLane(ref l); } } else @@ -103,7 +103,7 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } else { - AdvanceLane(module, ref l); + AdvanceLane(ref l); } } } @@ -122,11 +122,11 @@ public override void OnActorEAnim(Actor actor, uint state) if (shape == null) return; int heightIndex = (OID)actor.OID is OID.MiasmaLowRect or OID.MiasmaLowCircle or OID.MiasmaLowDonut ? 0 : 1; - int laneIndex = LaneIndex(module, actor.Position); + int laneIndex = LaneIndex(actor.Position); _laneStates[laneIndex, heightIndex] = new() { Shape = shape, Activation = WorldState.FutureTime(16.1f), NextOrigin = new(actor.Position.X, Module.Bounds.Center.Z - Module.Bounds.HalfSize + (shape == _shapeRect ? 0 : 5)) }; } - private int LaneIndex(BossModule module, WPos pos) => (pos.X - Module.Bounds.Center.X) switch + private int LaneIndex(WPos pos) => (pos.X - Module.Bounds.Center.X) switch { < -10 => 0, < 0 => 1, @@ -134,7 +134,7 @@ public override void OnActorEAnim(Actor actor, uint state) _ => 3, }; - private void AdvanceLane(BossModule module, ref LaneState lane) + private void AdvanceLane(ref LaneState lane) { lane.Activation = WorldState.FutureTime(1.6f); ++lane.NumCasts; diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS6TrinityAvowed/AllegiantArsenal.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS6TrinityAvowed/AllegiantArsenal.cs index cdff6476a5..48d448703d 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS6TrinityAvowed/AllegiantArsenal.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS6TrinityAvowed/AllegiantArsenal.cs @@ -1,6 +1,6 @@ namespace BossMod.Shadowbringers.Foray.DelubrumReginae.DRS6TrinityAvowed; -class AllegiantArsenal : Components.GenericAOEs +class AllegiantArsenal(BossModule module) : Components.GenericAOEs(module) { public enum Order { Unknown, SwordSecond, BowSecond, StaffSecond, StaffSwordBow, BowSwordStaff, SwordBowStaff, StaffBowSword, SwordStaffBow, BowStaffSword } diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS6TrinityAvowed/BladeOfEntropy.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS6TrinityAvowed/BladeOfEntropy.cs index ef326e1aa2..6f9b1106eb 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS6TrinityAvowed/BladeOfEntropy.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS6TrinityAvowed/BladeOfEntropy.cs @@ -1,7 +1,7 @@ namespace BossMod.Shadowbringers.Foray.DelubrumReginae.DRS6TrinityAvowed; // note: instead of trying to figure out cone intersections and shit, we use the fact that clones are always positioned on grid and just check each cell -class BladeOfEntropy : TemperatureAOE +class BladeOfEntropy(BossModule module) : TemperatureAOE(module) { private List<(Actor caster, WDir dir, int temperature)> _casters = new(); diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS6TrinityAvowed/Bow.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS6TrinityAvowed/Bow.cs index 4509c75bbe..a8770d6f80 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS6TrinityAvowed/Bow.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS6TrinityAvowed/Bow.cs @@ -1,22 +1,17 @@ namespace BossMod.Shadowbringers.Foray.DelubrumReginae.DRS6TrinityAvowed; // aoe starts at cast and ends with envcontrol; it's not considered 'risky' when paired with quick march -class FlamesOfBozja : Components.GenericAOEs +class FlamesOfBozja(BossModule module, bool risky) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.FlamesOfBozjaAOE)) { public AOEInstance? AOE { get; private set; } - private bool _risky; - - public FlamesOfBozja(bool risky) : base(ActionID.MakeSpell(AID.FlamesOfBozjaAOE)) - { - _risky = risky; - } + private bool _risky = risky; public override IEnumerable ActiveAOEs(int slot, Actor actor) => Utils.ZeroOrOne(AOE); public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if (spell.Action == WatchedAction) - AOE = new(new AOEShapeRect(45, 25), caster.Position, spell.Rotation, spell.NPCFinishAt, risky: _risky); + AOE = new(new AOEShapeRect(45, 25), caster.Position, spell.Rotation, spell.NPCFinishAt, Risky: _risky); } public override void OnEventEnvControl(byte index, uint state) @@ -32,24 +27,19 @@ public override void OnEventEnvControl(byte index, uint state) // ENVC 16.00200010; arrows spawn at X=-247 (E) aimed -90 (W); N to S we have Spark > None > Frost > Glacier > Flame; exploding N to S Glacier > Flame > None > Frost > Spark ==> 'normal' pattern // ENVC 17.00200010; arrows spawn at X=-297 (W) aimed +90 (E); N to S we have Glacier > Frost > Spark > Flame > None; exploding N to S None > Spark > Flame > Glacier > Frost ==> 'normal' pattern // so, assumption: 16 is W->E, 17 is E->W; 00020001 is inverted, 00200010 is normal -class ShimmeringShot : TemperatureAOE +class ShimmeringShot(BossModule module, float spawnToActivation) : TemperatureAOE(module) { public enum Pattern { Unknown, EWNormal, EWInverted, WENormal, WEInverted } private int[] _slotTempAdjustments = new int[5]; private BitMask _arrowsInited; private Pattern _pattern; - private float _spawnToActivation; + private float _spawnToActivation = spawnToActivation; private DateTime _activation; private static readonly AOEShapeRect _shapeCell = new(5, 5, 5); private static readonly int[,] _remap = { { 0, 1, 2, 3, 4 }, { 4, 2, 3, 0, 1 }, { 3, 4, 1, 2, 0 }, { 3, 4, 1, 2, 0 }, { 4, 2, 3, 0, 1 } }; - public ShimmeringShot(float spawnToActivation) - { - _spawnToActivation = spawnToActivation; - } - public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_arrowsInited.Raw != 0x1B) @@ -66,10 +56,10 @@ public override IEnumerable ActiveAOEs(int slot, Actor actor) public override void Update() { - InitArrow(module, OID.SparkArrow, +1); - InitArrow(module, OID.FlameArrow, +2); - InitArrow(module, OID.FrostArrow, -1); - InitArrow(module, OID.GlacierArrow, -2); + InitArrow(OID.SparkArrow, +1); + InitArrow(OID.FlameArrow, +2); + InitArrow(OID.FrostArrow, -1); + InitArrow(OID.GlacierArrow, -2); } public override void OnEventCast(Actor caster, ActorCastEvent spell) @@ -92,7 +82,7 @@ public override void OnEventEnvControl(byte index, uint state) _pattern = pattern; } - public bool ActorUnsafeAt(BossModule module, Actor actor, WPos pos) + public bool ActorUnsafeAt(Actor actor, WPos pos) { var offset = pos - Module.Bounds.Center; bool posInFlames = _pattern switch @@ -106,11 +96,11 @@ public bool ActorUnsafeAt(BossModule module, Actor actor, WPos pos) if (_arrowsInited.Raw != 0x1B) return false; // no arrows yet, any position is safe - int row = RowIndex(module, pos); + int row = RowIndex(pos); return _slotTempAdjustments[row] != -Temperature(actor); } - protected int RowIndex(BossModule module, WPos pos) => (pos.Z - Module.Bounds.Center.Z) switch + protected int RowIndex(WPos pos) => (pos.Z - Module.Bounds.Center.Z) switch { < -15 => 0, < -5 => 1, @@ -119,17 +109,17 @@ public bool ActorUnsafeAt(BossModule module, Actor actor, WPos pos) _ => 4 }; - private void InitArrow(BossModule module, OID oid, int temp) + private void InitArrow(OID oid, int temp) { if (_arrowsInited[temp + 2]) return; - var arrow = module.Enemies(oid).FirstOrDefault(); + var arrow = Module.Enemies(oid).FirstOrDefault(); if (arrow == null) return; if (arrow.Position.X < Module.Bounds.Center.X != _pattern is Pattern.WENormal or Pattern.WEInverted) ReportError("Unexpected arrow X coord"); - int srcRow = RowIndex(module, arrow.Position); + int srcRow = RowIndex(arrow.Position); int destRow = _remap[(int)_pattern, srcRow]; _slotTempAdjustments[destRow] = temp; _arrowsInited.Set(temp + 2); @@ -139,40 +129,32 @@ private void InitArrow(BossModule module, OID oid, int temp) class FlamesOfBozja1(BossModule module) : FlamesOfBozja(module, false); -class QuickMarchBow1 : QuickMarch +class QuickMarchBow1(BossModule module) : QuickMarch(module) { - private FlamesOfBozja1? _flames; - - public override void Init(BossModule module) => _flames = module.FindComponent(); + private FlamesOfBozja1? _flames = module.FindComponent(); - public override bool DestinationUnsafe(BossModule module, int slot, Actor actor, WPos pos) => !Module.Bounds.Contains(pos) || (_flames?.AOE?.Shape.Check(pos, _flames.AOE.Value.Origin, _flames.AOE.Value.Rotation) ?? false); + public override bool DestinationUnsafe(int slot, Actor actor, WPos pos) => !Module.Bounds.Contains(pos) || (_flames?.AOE?.Shape.Check(pos, _flames.AOE.Value.Origin, _flames.AOE.Value.Rotation) ?? false); } -class ShimmeringShot1 : ShimmeringShot +class ShimmeringShot1(BossModule module) : ShimmeringShot(module, 12.8f) { - public ShimmeringShot1() : base(12.8f) { } - public override void AddHints(int slot, Actor actor, TextHints hints) { - if (ActorUnsafeAt(module, actor, actor.Position)) + if (ActorUnsafeAt(actor, actor.Position)) hints.Add("Go to safe zone!"); } } class FlamesOfBozja2(BossModule module) : FlamesOfBozja(module, true); -class ShimmeringShot2 : ShimmeringShot +class ShimmeringShot2(BossModule module) : ShimmeringShot(module, 14.0f) { - public ShimmeringShot2() : base(14.0f) { } - public override void AddHints(int slot, Actor actor, TextHints hints) { } // no need for hints, quick march handles that } -class QuickMarchBow2 : QuickMarch +class QuickMarchBow2(BossModule module) : QuickMarch(module) { - private ShimmeringShot2? _shimmering; - - public override void Init(BossModule module) => _shimmering = module.FindComponent(); + private ShimmeringShot2? _shimmering = module.FindComponent(); - public override bool DestinationUnsafe(BossModule module, int slot, Actor actor, WPos pos) => !Module.Bounds.Contains(pos) || (_shimmering?.ActorUnsafeAt(module, actor, pos) ?? false); + public override bool DestinationUnsafe(int slot, Actor actor, WPos pos) => !Module.Bounds.Contains(pos) || (_shimmering?.ActorUnsafeAt(actor, pos) ?? false); } diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS6TrinityAvowed/DRS6.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS6TrinityAvowed/DRS6.cs index b840e35ab1..c812585826 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS6TrinityAvowed/DRS6.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS6TrinityAvowed/DRS6.cs @@ -1,16 +1,13 @@ namespace BossMod.Shadowbringers.Foray.DelubrumReginae.DRS6TrinityAvowed; class WrathOfBozja(BossModule module) : Components.CastSharedTankbuster(module, ActionID.MakeSpell(AID.WrathOfBozja), new AOEShapeCone(60, 45.Degrees())); // TODO: verify angle - class WrathOfBozjaBow(BossModule module) : Components.CastSharedTankbuster(module, ActionID.MakeSpell(AID.WrathOfBozjaBow), new AOEShapeCone(60, 45.Degrees())); // TODO: verify angle // note: it is combined with different AOEs (bow1, bow2, staff1) class QuickMarch(BossModule module) : Components.StatusDrivenForcedMarch(module, 3, (uint)SID.ForwardMarch, (uint)SID.AboutFace, (uint)SID.LeftFace, (uint)SID.RightFace); class ElementalImpact1(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ElementalImpact1), new AOEShapeCircle(20)); - class ElementalImpact2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ElementalImpact2), new AOEShapeCircle(20)); - class GleamingArrow(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.GleamingArrow), new AOEShapeRect(60, 5)); [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 761, NameID = 9853)] diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS6TrinityAvowed/Staff.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS6TrinityAvowed/Staff.cs index a18290be79..6017e6717e 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS6TrinityAvowed/Staff.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS6TrinityAvowed/Staff.cs @@ -8,9 +8,14 @@ class FreedomOfBozja : TemperatureAOE private static readonly AOEShapeCircle _shape = new(22); - public FreedomOfBozja(bool risky) + public FreedomOfBozja(BossModule module, bool risky) : base(module) { _risky = risky; + _activation = WorldState.FutureTime(10); + InitOrb(OID.SwirlingOrb, -1); + InitOrb(OID.TempestuousOrb, -2); + InitOrb(OID.BlazingOrb, +1); + InitOrb(OID.RoaringOrb, +2); } public override IEnumerable ActiveAOEs(int slot, Actor actor) @@ -20,15 +25,6 @@ public override IEnumerable ActiveAOEs(int slot, Actor actor) yield return new(_shape, o.orb.Position, o.orb.Rotation, _activation, o.temperature == -playerTemp ? ArenaColor.SafeFromAOE : ArenaColor.AOE, _risky); } - public override void Init(BossModule module) - { - InitOrb(module, OID.SwirlingOrb, -1); - InitOrb(module, OID.TempestuousOrb, -2); - InitOrb(module, OID.BlazingOrb, +1); - InitOrb(module, OID.RoaringOrb, +2); - _activation = WorldState.FutureTime(10); - } - public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.ChillBlast1 or AID.FreezingBlast1 or AID.HeatedBlast1 or AID.SearingBlast1 or AID.ChillBlast2 or AID.FreezingBlast2 or AID.HeatedBlast2 or AID.SearingBlast2) @@ -41,9 +37,9 @@ public bool ActorUnsafeAt(Actor actor, WPos pos) return _orbs.Any(o => _shape.Check(pos, o.orb.Position) != (o.temperature == -playerTemp)); } - private void InitOrb(BossModule module, OID oid, int temp) + private void InitOrb(OID oid, int temp) { - var orb = module.Enemies(oid).FirstOrDefault(); + var orb = Module.Enemies(oid).FirstOrDefault(); if (orb != null) _orbs.Add((orb, temp)); } @@ -51,13 +47,11 @@ private void InitOrb(BossModule module, OID oid, int temp) class FreedomOfBozja1(BossModule module) : FreedomOfBozja(module, false); -class QuickMarchStaff1 : QuickMarch +class QuickMarchStaff1(BossModule module) : QuickMarch(module) { - private FreedomOfBozja1? _freedom; - - public override void Init(BossModule module) => _freedom = module.FindComponent(); + private FreedomOfBozja1? _freedom = module.FindComponent(); - public override bool DestinationUnsafe(BossModule module, int slot, Actor actor, WPos pos) => !Module.Bounds.Contains(pos) || (_freedom?.ActorUnsafeAt(actor, pos) ?? false); + public override bool DestinationUnsafe(int slot, Actor actor, WPos pos) => !Module.Bounds.Contains(pos) || (_freedom?.ActorUnsafeAt(actor, pos) ?? false); } class FreedomOfBozja2(BossModule module) : FreedomOfBozja(module, true); diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS6TrinityAvowed/TemperatureAOE.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS6TrinityAvowed/TemperatureAOE.cs index b04980848d..fa92982ec2 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS6TrinityAvowed/TemperatureAOE.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS6TrinityAvowed/TemperatureAOE.cs @@ -1,6 +1,6 @@ namespace BossMod.Shadowbringers.Foray.DelubrumReginae.DRS6TrinityAvowed; -abstract class TemperatureAOE : Components.GenericAOEs +abstract class TemperatureAOE(BossModule module) : Components.GenericAOEs(module) { private class PlayerState { diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS7StygimolochLord/AddPhaseArena.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS7StygimolochLord/AddPhaseArena.cs index ff84d4e93e..33a2884179 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS7StygimolochLord/AddPhaseArena.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS7StygimolochLord/AddPhaseArena.cs @@ -1,6 +1,6 @@ namespace BossMod.Shadowbringers.Foray.DelubrumReginae.DRS7StygimolochLord; -class AddPhaseArena : BossComponent +class AddPhaseArena(BossModule module) : BossComponent(module) { private float _innerRingRadius = 14.5f; private float _outerRingRadius = 27.5f; @@ -10,12 +10,12 @@ class AddPhaseArena : BossComponent public override void DrawArenaBackground(int pcSlot, Actor pc) { - arena.Zone(Module.Bounds.ClipAndTriangulate(InDanger(module)), ArenaColor.AOE); - arena.Zone(Module.Bounds.ClipAndTriangulate(MidDanger(module)), ArenaColor.AOE); - arena.Zone(Module.Bounds.ClipAndTriangulate(OutDanger(module)), ArenaColor.AOE); + Arena.Zone(Module.Bounds.ClipAndTriangulate(InDanger()), ArenaColor.AOE); + Arena.Zone(Module.Bounds.ClipAndTriangulate(MidDanger()), ArenaColor.AOE); + Arena.Zone(Module.Bounds.ClipAndTriangulate(OutDanger()), ArenaColor.AOE); } - private IEnumerable RingBorder(BossModule module, Angle centerOffset, float ringRadius, bool innerBorder) + private IEnumerable RingBorder(Angle centerOffset, float ringRadius, bool innerBorder) { float offsetMultiplier = innerBorder ? -1 : 1; Angle halfWidth = (_alcoveWidth / ringRadius).Radians(); @@ -41,21 +41,21 @@ private IEnumerable RepeatFirst(IEnumerable pts) yield return first.Value; } - private IEnumerable InDanger(BossModule module) => RingBorder(module, 22.5f.Degrees(), _innerRingRadius, true); + private IEnumerable InDanger() => RingBorder(22.5f.Degrees(), _innerRingRadius, true); - private IEnumerable MidDanger(BossModule module) + private IEnumerable MidDanger() { - foreach (var p in RepeatFirst(RingBorder(module, 0.Degrees(), _outerRingRadius, true))) + foreach (var p in RepeatFirst(RingBorder(0.Degrees(), _outerRingRadius, true))) yield return p; - foreach (var p in RepeatFirst(RingBorder(module, 22.5f.Degrees(), _innerRingRadius, false))) + foreach (var p in RepeatFirst(RingBorder(22.5f.Degrees(), _innerRingRadius, false))) yield return p; } - private IEnumerable OutDanger(BossModule module) + private IEnumerable OutDanger() { foreach (var p in RepeatFirst(CurveApprox.Circle(Module.Bounds.Center, Module.Bounds.HalfSize, Module.Bounds.MaxApproxError))) yield return p; - foreach (var p in RepeatFirst(RingBorder(module, 0.Degrees(), _outerRingRadius, false))) + foreach (var p in RepeatFirst(RingBorder(0.Degrees(), _outerRingRadius, false))) yield return p; } } diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS7StygimolochLord/CrushingHoof.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS7StygimolochLord/CrushingHoof.cs index 9c637e043d..41cf194b87 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS7StygimolochLord/CrushingHoof.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS7StygimolochLord/CrushingHoof.cs @@ -1,17 +1,15 @@ namespace BossMod.Shadowbringers.Foray.DelubrumReginae.DRS7StygimolochLord; -class CrushingHoof : Components.GenericAOEs +class CrushingHoof(BossModule module) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.CrushingHoofAOE)) { private AOEInstance? _aoe; - public CrushingHoof() : base(ActionID.MakeSpell(AID.CrushingHoofAOE)) { } - public override IEnumerable ActiveAOEs(int slot, Actor actor) => Utils.ZeroOrOne(_aoe); public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.CrushingHoof) - _aoe = new(new AOEShapeCircle(25), spell.LocXZ, activation: spell.NPCFinishAt.AddSeconds(1)); + _aoe = new(new AOEShapeCircle(25), spell.LocXZ, default, spell.NPCFinishAt.AddSeconds(1)); } public override void OnEventCast(Actor caster, ActorCastEvent spell) diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS7StygimolochLord/DRS7.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS7StygimolochLord/DRS7.cs index 1f9dff1394..64de8942cc 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS7StygimolochLord/DRS7.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS7StygimolochLord/DRS7.cs @@ -1,17 +1,11 @@ namespace BossMod.Shadowbringers.Foray.DelubrumReginae.DRS7StygimolochLord; class FoeSplitter(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.FoeSplitter), new AOEShapeCone(9, 45.Degrees())); // TODO: verify angle - class ThunderousDischarge(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.ThunderousDischargeAOE)); - class ThousandTonzeSwing(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ThousandTonzeSwing), new AOEShapeCircle(20)); - class Whack(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.WhackAOE), new AOEShapeCone(40, 30.Degrees())); - class DevastatingBoltOuter(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.DevastatingBoltOuter), new AOEShapeDonut(25, 30)); - class DevastatingBoltInner(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.DevastatingBoltInner), new AOEShapeDonut(12, 17)); - class Electrocution(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Electrocution), 3); // TODO: ManaFlame component - show reflect hints diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS7StygimolochLord/FatefulWords.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS7StygimolochLord/FatefulWords.cs index d189432dfc..481353ee8f 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS7StygimolochLord/FatefulWords.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS7StygimolochLord/FatefulWords.cs @@ -1,11 +1,9 @@ namespace BossMod.Shadowbringers.Foray.DelubrumReginae.DRS7StygimolochLord; -class FatefulWords : Components.Knockback +class FatefulWords(BossModule module) : Components.Knockback(module, ActionID.MakeSpell(AID.FatefulWordsAOE), true) { private Kind[] _mechanics = new Kind[PartyState.MaxPartySize]; - public FatefulWords() : base(ActionID.MakeSpell(AID.FatefulWordsAOE), true) { } - public override IEnumerable Sources(int slot, Actor actor) { var kind = _mechanics[slot]; @@ -22,16 +20,16 @@ public override void OnStatusGain(Actor actor, ActorStatus status) _ => Kind.None }; if (kind != Kind.None) - AssignMechanic(module, actor, kind); + AssignMechanic(actor, kind); } public override void OnStatusLose(Actor actor, ActorStatus status) { if ((SID)status.ID is SID.WanderersFate or SID.SacrificesFate) - AssignMechanic(module, actor, Kind.None); + AssignMechanic(actor, Kind.None); } - private void AssignMechanic(BossModule module, Actor actor, Kind mechanic) + private void AssignMechanic(Actor actor, Kind mechanic) { var slot = Raid.FindSlot(actor.InstanceID); if (slot >= 0 && slot < _mechanics.Length) diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS7StygimolochLord/RapidBolts.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS7StygimolochLord/RapidBolts.cs index 062e79219b..900b574b97 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS7StygimolochLord/RapidBolts.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS7StygimolochLord/RapidBolts.cs @@ -1,10 +1,8 @@ namespace BossMod.Shadowbringers.Foray.DelubrumReginae.DRS7StygimolochLord; // TODO: generalize to 'baited puddles' component -class RapidBoltsBait : Components.UniformStackSpread +class RapidBoltsBait(BossModule module) : Components.UniformStackSpread(module, 0, 5, alwaysShowSpreads: true) { - public RapidBoltsBait() : base(0, 5, alwaysShowSpreads: true) { } - public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.RapidBolts) @@ -12,7 +10,7 @@ public override void OnEventIcon(Actor actor, uint iconID) } } -class RapidBoltsAOE : Components.GenericAOEs +class RapidBoltsAOE(BossModule module) : Components.GenericAOEs(module) { private List<(WPos pos, int numCasts)> _puddles = new(); private static readonly AOEShapeCircle _shape = new(5); diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS7StygimolochLord/ViciousSwipe.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS7StygimolochLord/ViciousSwipe.cs index ac4653cf76..7eba743d5a 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS7StygimolochLord/ViciousSwipe.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS7StygimolochLord/ViciousSwipe.cs @@ -1,20 +1,15 @@ - -namespace BossMod.Shadowbringers.Foray.DelubrumReginae.DRS7StygimolochLord; +namespace BossMod.Shadowbringers.Foray.DelubrumReginae.DRS7StygimolochLord; -class ViciousSwipe : Components.Knockback +class ViciousSwipe(BossModule module) : Components.Knockback(module, ActionID.MakeSpell(AID.ViciousSwipe)) { - private Source? _source; + private Source? _source = new(module.PrimaryActor.Position, 15, module.WorldState.FutureTime(module.StateMachine.ActiveState?.Duration ?? 0), _shape); private static readonly AOEShapeCircle _shape = new(8); - public ViciousSwipe() : base(ActionID.MakeSpell(AID.ViciousSwipe)) { } - public override IEnumerable Sources(int slot, Actor actor) => Utils.ZeroOrOne(_source); - public override void Init(BossModule module) => _source = new(Module.PrimaryActor.Position, 15, WorldState.FutureTime(module.StateMachine.ActiveState?.Duration ?? 0), _shape); - public override void DrawArenaForeground(int pcSlot, Actor pc) { - arena.AddCircle(Module.PrimaryActor.Position, _shape.Radius, ArenaColor.Danger); + Arena.AddCircle(Module.PrimaryActor.Position, _shape.Radius, ArenaColor.Danger); } } diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/AboveBoard.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/AboveBoard.cs index 9af2f6cf2b..1fe2118185 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/AboveBoard.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/AboveBoard.cs @@ -1,16 +1,16 @@ namespace BossMod.Shadowbringers.Foray.DelubrumReginae.DRS8Queen; // note: this is exactly the same as queen's guard component -class AboveBoard : Components.GenericAOEs +class AboveBoard(BossModule module) : Components.GenericAOEs(module) { public enum State { Initial, ThrowUpDone, ShortExplosionsDone, LongExplosionsDone } public State CurState { get; private set; } - private IReadOnlyList _smallBombs = ActorEnumeration.EmptyList; - private IReadOnlyList _bigBombs = ActorEnumeration.EmptyList; + private IReadOnlyList _smallBombs = module.Enemies(OID.AetherialBolt); + private IReadOnlyList _bigBombs = module.Enemies(OID.AetherialBurst); private bool _invertedBombs; // bombs are always either all normal (big=short) or all inverted private BitMask _invertedPlayers; // default for player is 'long', short is considered inverted (has visible status) - private DateTime _activation; + private DateTime _activation = module.WorldState.FutureTime(14.4f); private static readonly AOEShapeCircle _shape = new(10); @@ -20,13 +20,6 @@ public override IEnumerable ActiveAOEs(int slot, Actor actor) return imminentBombs.Select(b => new AOEInstance(_shape, b.Position, new(), _activation)); } - public override void Init(BossModule module) - { - _smallBombs = module.Enemies(OID.AetherialBolt); - _bigBombs = module.Enemies(OID.AetherialBurst); - _activation = WorldState.FutureTime(14.4f); - } - public override void OnStatusGain(Actor actor, ActorStatus status) { switch ((SID)status.ID) diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/Chess.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/Chess.cs index c5131d3040..b1a542cb1d 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/Chess.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/Chess.cs @@ -1,6 +1,6 @@ namespace BossMod.Shadowbringers.Foray.DelubrumReginae.DRS8Queen; -abstract class Chess : Components.GenericAOEs +abstract class Chess(BossModule module) : Components.GenericAOEs(module) { public struct GuardState { @@ -57,10 +57,10 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) }; } -class QueensWill : Chess { } +class QueensWill(BossModule module) : Chess(module) { } // TODO: enumerate all possible safespots instead? after first pair of casts, select still suitable second safespots -class QueensEdict : Chess +class QueensEdict(BossModule module) : Chess(module) { public class PlayerState { @@ -73,22 +73,21 @@ public class PlayerState private Dictionary _playerStates = new(); private int _safespotZOffset = 0; - public override void AddHints(int slot, Actor actor, TextHints hints) + public override void AddMovementHints(int slot, Actor actor, MovementHints movementHints) { - if (movementHints != null) - foreach (var m in GetSafeSpotMoves(module, actor)) - movementHints.Add(m); + foreach (var m in GetSafeSpotMoves(actor)) + movementHints.Add(m); } public override void DrawArenaForeground(int pcSlot, Actor pc) { - foreach (var m in GetSafeSpotMoves(module, pc)) - arena.AddLine(m.from, m.to, m.color); + foreach (var m in GetSafeSpotMoves(pc)) + Arena.AddLine(m.from, m.to, m.color); } public override void OnStatusGain(Actor actor, ActorStatus status) { - base.OnStatusGain(module, actor, status); + base.OnStatusGain(actor, status); switch ((SID)status.ID) { case SID.Stun: @@ -127,7 +126,7 @@ public override void OnEventEnvControl(byte index, uint state) _safespotZOffset = index == 0x1D ? 2 : -2; } - private IEnumerable<(WPos from, WPos to, uint color)> GetSafeSpotMoves(BossModule module, Actor actor) + private IEnumerable<(WPos from, WPos to, uint color)> GetSafeSpotMoves(Actor actor) { var state = _playerStates.GetValueOrDefault(actor.InstanceID); if (state == null) @@ -148,9 +147,9 @@ public override void OnEventEnvControl(byte index, uint state) { foreach (var s1 in CellsAtManhattanDistance(s2, state.FirstEdict).Where(s1 => s1.z != forbiddenRow1 && s1.z != forbiddenRow2)) { - state.Safespots.Add(CellCenter(module, s1)); - state.Safespots.Add(CellCenter(module, s2)); - state.Safespots.Add(CellCenter(module, (0, _safespotZOffset))); + state.Safespots.Add(CellCenter(s1)); + state.Safespots.Add(CellCenter(s2)); + state.Safespots.Add(CellCenter((0, _safespotZOffset))); break; } if (state.Safespots.Count > 0) @@ -179,7 +178,7 @@ public override void OnEventEnvControl(byte index, uint state) _ => 3 }; - private WPos CellCenter(BossModule module, (int x, int z) cell) => Module.Bounds.Center + 10 * new WDir(cell.x, cell.z); + private WPos CellCenter((int x, int z) cell) => Module.Bounds.Center + 10 * new WDir(cell.x, cell.z); private IEnumerable<(int x, int z)> CellsAtManhattanDistance((int x, int z) origin, int distance) { diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/DRS8.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/DRS8.cs index 4468f004d6..0da06fba61 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/DRS8.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/DRS8.cs @@ -1,14 +1,11 @@ namespace BossMod.Shadowbringers.Foray.DelubrumReginae.DRS8Queen; class NorthswainsGlow(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.NorthswainsGlowAOE), new AOEShapeCircle(20)); - class CleansingSlashSecond(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.CleansingSlashSecond)); - class GodsSaveTheQueen(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.GodsSaveTheQueenAOE)); // note: apparently there is no 'front unseen' status class QueensShot(BossModule module) : Components.CastWeakpoint(module, ActionID.MakeSpell(AID.QueensShot), new AOEShapeCircle(60), 0, (uint)SID.BackUnseen, (uint)SID.LeftUnseen, (uint)SID.RightUnseen); - class TurretsTourUnseen(BossModule module) : Components.CastWeakpoint(module, ActionID.MakeSpell(AID.TurretsTourUnseen), new AOEShapeRect(50, 2.5f), 0, (uint)SID.BackUnseen, (uint)SID.LeftUnseen, (uint)SID.RightUnseen); class OptimalOffensive(BossModule module) : Components.ChargeAOEs(module, ActionID.MakeSpell(AID.OptimalOffensive), 2.5f); @@ -17,13 +14,10 @@ class OptimalOffensive(BossModule module) : Components.ChargeAOEs(module, Action // TODO: not sure whether it ignores immunes, I assume so... class OptimalOffensiveKnockback(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.OptimalOffensiveKnockback), 10, true, 1); -class PawnOff(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PawnOffReal), new AOEShapeCircle(20)); - class OptimalPlaySword(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.OptimalPlaySword), new AOEShapeCircle(10)); - class OptimalPlayShield(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.OptimalPlayShield), new AOEShapeDonut(5, 60)); - class OptimalPlayCone(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.OptimalPlayCone), new AOEShapeCone(60, 135.Degrees())); +class PawnOff(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PawnOffReal), new AOEShapeCircle(20)); [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 761, NameID = 9863)] public class DRS8(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(-272, -415), 25)); // note: initially arena is square, but it quickly changes to circle diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/FieryIcyPortent.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/FieryIcyPortent.cs index 72ef1fec78..361db488bd 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/FieryIcyPortent.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/FieryIcyPortent.cs @@ -1,6 +1,6 @@ namespace BossMod.Shadowbringers.Foray.DelubrumReginae.DRS8Queen; -class FieryIcyPortent : Components.StayMove +class FieryIcyPortent(BossModule module) : Components.StayMove(module) { public override void OnCastStarted(Actor caster, ActorCastInfo spell) { diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/HeavensWrath.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/HeavensWrath.cs index 54183b4f8d..d5c9fbaa1b 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/HeavensWrath.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/HeavensWrath.cs @@ -3,7 +3,7 @@ class HeavensWrathAOE(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HeavensWrathVisual), new AOEShapeRect(25, 5, 25)); // TODO: generalize -class HeavensWrathKnockback : Components.Knockback +class HeavensWrathKnockback(BossModule module) : Components.Knockback(module) { private List _sources = new(); private static readonly AOEShapeCone _shape = new(30, 90.Degrees()); diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/JudgmentBlade.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/JudgmentBlade.cs index 803c228c7e..69ac70bca1 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/JudgmentBlade.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/JudgmentBlade.cs @@ -1,6 +1,6 @@ namespace BossMod.Shadowbringers.Foray.DelubrumReginae.DRS8Queen; -class JudgmentBlade : Components.GenericAOEs +class JudgmentBlade(BossModule module) : Components.GenericAOEs(module) { private AOEInstance? _aoe; diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/MaelstromsBolt.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/MaelstromsBolt.cs index 881586cca3..85209e70bf 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/MaelstromsBolt.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/MaelstromsBolt.cs @@ -1,29 +1,21 @@ namespace BossMod.Shadowbringers.Foray.DelubrumReginae.DRS8Queen; // TODO: show reflect hints, show stay under dome hints -class MaelstromsBolt : Components.CastCounter +class MaelstromsBolt(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.MaelstromsBoltAOE)) { - private IReadOnlyList _ballLightnings = ActorEnumeration.EmptyList; - private IReadOnlyList _domes = ActorEnumeration.EmptyList; - - public MaelstromsBolt() : base(ActionID.MakeSpell(AID.MaelstromsBoltAOE)) { } - - public override void Init(BossModule module) - { - _ballLightnings = module.Enemies(OID.BallLightning); - _domes = module.Enemies(OID.ProtectiveDome); - } + private IReadOnlyList _ballLightnings = module.Enemies(OID.BallLightning); + private IReadOnlyList _domes = module.Enemies(OID.ProtectiveDome); public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (var b in _ballLightnings.Where(b => !b.IsDead)) { - arena.Actor(b, ArenaColor.Object, true); - arena.AddCircle(b.Position, 8, ArenaColor.Object); + Arena.Actor(b, ArenaColor.Object, true); + Arena.AddCircle(b.Position, 8, ArenaColor.Object); } foreach (var d in _domes) { - arena.AddCircle(d.Position, 8, ArenaColor.Safe); + Arena.AddCircle(d.Position, 8, ArenaColor.Safe); } } } diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/TurretsTour.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/TurretsTour.cs index 66f15a5a9c..445f4bf4a7 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/TurretsTour.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/TurretsTour.cs @@ -6,15 +6,7 @@ class TurretsTour : Components.GenericAOEs private List<(Actor caster, AOEShapeRect shape)> _casters = new(); private DateTime _activation; - public override IEnumerable ActiveAOEs(int slot, Actor actor) - { - foreach (var t in _turrets) - yield return new(t.shape, t.turret.Position, t.turret.Rotation, _activation); - foreach (var c in _casters) - yield return new(c.shape, c.caster.Position, c.caster.CastInfo!.Rotation, c.caster.CastInfo.NPCFinishAt); - } - - public override void Init(BossModule module) + public TurretsTour(BossModule module) : base(module) { var turrets = module.Enemies(OID.AutomaticTurret); foreach (var t in turrets) @@ -27,6 +19,14 @@ public override void Init(BossModule module) } } + public override IEnumerable ActiveAOEs(int slot, Actor actor) + { + foreach (var t in _turrets) + yield return new(t.shape, t.turret.Position, t.turret.Rotation, _activation); + foreach (var c in _casters) + yield return new(c.shape, c.caster.Position, c.caster.CastInfo!.Rotation, c.caster.CastInfo.NPCFinishAt); + } + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.TurretsTourAOE1) diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/UnluckyLotAetherialSphere.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/UnluckyLotAetherialSphere.cs index 9f94788b89..a51df1e1aa 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/UnluckyLotAetherialSphere.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/UnluckyLotAetherialSphere.cs @@ -1,17 +1,15 @@ namespace BossMod.Shadowbringers.Foray.DelubrumReginae.DRS8Queen; -class UnluckyLotAetherialSphere : Components.GenericAOEs +class UnluckyLotAetherialSphere(BossModule module) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.UnluckyLotAetherialSphere)) { private AOEInstance? _aoe; - public UnluckyLotAetherialSphere() : base(ActionID.MakeSpell(AID.UnluckyLotAetherialSphere)) { } - public override IEnumerable ActiveAOEs(int slot, Actor actor) => Utils.ZeroOrOne(_aoe); public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.OptimalOffensiveMoveSphere) - _aoe = new(new AOEShapeCircle(20), caster.Position, activation: spell.NPCFinishAt.AddSeconds(2.6)); + _aoe = new(new AOEShapeCircle(20), caster.Position, default, spell.NPCFinishAt.AddSeconds(2.6)); } public override void OnCastFinished(Actor caster, ActorCastInfo spell) diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/WindsOfWeight.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/WindsOfWeight.cs index 599574dd9c..f56cac87d3 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/WindsOfWeight.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS8Queen/WindsOfWeight.cs @@ -1,7 +1,7 @@ namespace BossMod.Shadowbringers.Foray.DelubrumReginae.DRS8Queen; // TODO: this is essentialy copy-paste of DRS4 component, generalize?.. the only different thing is AIDs -class WindsOfWeight : Components.GenericAOEs +class WindsOfWeight(BossModule module) : Components.GenericAOEs(module) { private List _green = new(); private List _purple = new(); diff --git a/BossMod/Modules/Shadowbringers/Foray/Duel/Duel2Lyon/Duel2Lyon.cs b/BossMod/Modules/Shadowbringers/Foray/Duel/Duel2Lyon/Duel2Lyon.cs index f620ef0edb..f5f235eebb 100644 --- a/BossMod/Modules/Shadowbringers/Foray/Duel/Duel2Lyon/Duel2Lyon.cs +++ b/BossMod/Modules/Shadowbringers/Foray/Duel/Duel2Lyon/Duel2Lyon.cs @@ -22,8 +22,6 @@ public Duel2LyonStates(BossModule module) : base(module) .ActivateOnEnter(); } } + [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.BozjaDuel, GroupID = 735, NameID = 8)] // bnpcname=9409 -public class Duel2Lyon: BossModule -{ - public Duel2Lyon(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(211, 380), 20)) {} -} +public class Duel2Lyon(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(211, 380), 20)); diff --git a/BossMod/Modules/Shadowbringers/Foray/Duel/Duel2Lyon/Duel2LyonGenericAttacks.cs b/BossMod/Modules/Shadowbringers/Foray/Duel/Duel2Lyon/Duel2LyonGenericAttacks.cs index 1d53941c50..462d4063a8 100644 --- a/BossMod/Modules/Shadowbringers/Foray/Duel/Duel2Lyon/Duel2LyonGenericAttacks.cs +++ b/BossMod/Modules/Shadowbringers/Foray/Duel/Duel2Lyon/Duel2LyonGenericAttacks.cs @@ -1,6 +1,6 @@ namespace BossMod.Shadowbringers.Foray.Duel.Duel2Lyon; -class Enaero : BossComponent +class Enaero(BossModule module) : BossComponent(module) { private bool EnaeroBuff; private bool casting; @@ -38,12 +38,10 @@ public override void OnStatusLose(Actor actor, ActorStatus status) } } -class HeartOfNatureConcentric : Components.ConcentricAOEs +class HeartOfNatureConcentric(BossModule module) : Components.ConcentricAOEs(module, _shapes) { private static readonly AOEShape[] _shapes = [new AOEShapeCircle(10), new AOEShapeDonut(10, 20), new AOEShapeDonut(20, 30)]; - public HeartOfNatureConcentric() : base(_shapes) { } - public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.NaturesPulse1) @@ -67,10 +65,9 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } class TasteOfBlood(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TasteOfBlood), new AOEShapeCone(40, 90.Degrees())); - class TasteOfBloodHint(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.TasteOfBlood), "Go behind Lyon!"); -class RavenousGale : Components.GenericAOEs +class RavenousGale(BossModule module) : Components.GenericAOEs(module) { private bool activeTwister; private bool casting; @@ -82,7 +79,7 @@ public override IEnumerable ActiveAOEs(int slot, Actor actor) if (casting) yield return new(circle, actor.Position, default, _activation); if (activeTwister) - foreach (var p in module.Enemies(OID.RavenousGaleVoidzone)) + foreach (var p in Module.Enemies(OID.RavenousGaleVoidzone)) yield return new(circle, p.Position, default, _activation); } @@ -96,7 +93,7 @@ public override void OnActorCreated(Actor actor) } } - public override void OnActorDestroyed(BossModule module, Actor actor) + public override void OnActorDestroyed(Actor actor) { if ((OID)actor.OID == OID.RavenousGaleVoidzone) { @@ -113,17 +110,16 @@ public override void OnCastStarted(Actor caster, ActorCastInfo spell) public override void AddGlobalHints(GlobalHints hints) { - base.AddGlobalHints(module, hints); + base.AddGlobalHints(hints); if (casting) hints.Add("Move a little to avoid voidzone spawning under you"); } } class TwinAgonies(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.TwinAgonies), "Heavy Tankbuster, use Manawall or tank mitigations"); - class WindsPeak(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.WindsPeak1), new AOEShapeCircle(5)); -class WindsPeakKB : Components.Knockback +class WindsPeakKB(BossModule module) : Components.Knockback(module) { private DateTime Time; private bool watched; @@ -147,13 +143,10 @@ public override void OnCastStarted(Actor caster, ActorCastInfo spell) } class TheKingsNotice(BossModule module) : Components.CastGaze(module, ActionID.MakeSpell(AID.TheKingsNotice)); - class SplittingRage(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.SplittingRage), "Applies temporary misdirection"); -class NaturesBlood : Components.Exaflare +class NaturesBlood(BossModule module) : Components.Exaflare(module, 4) { - public NaturesBlood() : base(4) { } - class LineWithActor : Line { public Actor Caster; @@ -181,14 +174,14 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) if (Lines.Count > 0 && (AID)spell.Action.ID is AID.NaturesBlood1 or AID.NaturesBlood2) { int index = Lines.FindIndex(item => ((LineWithActor)item).Caster == caster); - AdvanceLine(module, Lines[index], caster.Position); + AdvanceLine(Lines[index], caster.Position); if (Lines[index].ExplosionsLeft == 0) Lines.RemoveAt(index); } } } -class SpitefulFlameCircleVoidzone : Components.GenericAOEs +class SpitefulFlameCircleVoidzone(BossModule module) : Components.GenericAOEs(module) { private bool activeOrb; private int casts; @@ -197,7 +190,7 @@ class SpitefulFlameCircleVoidzone : Components.GenericAOEs public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (activeOrb && casts <= 11 && casts != 0) - foreach (var p in module.Enemies(OID.VermillionFlame)) + foreach (var p in Module.Enemies(OID.VermillionFlame)) yield return new(circle, p.Position); } @@ -225,15 +218,18 @@ class DynasticFlame : Components.BaitAwayTethers { private ulong target; private int orbcount; - public DynasticFlame() : base(new AOEShapeCircle(10), (uint)TetherID.fireorbs) + + public DynasticFlame(BossModule module) : base(module, new AOEShapeCircle(10), (uint)TetherID.fireorbs) { CenterAtTarget = true; } + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.DynasticFlame1) target = spell.TargetID; } + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { base.AddAIHints(slot, actor, assignment, hints); @@ -246,6 +242,7 @@ public override void AddHints(int slot, Actor actor, TextHints hints) if (target == actor.InstanceID && CurrentBaits.Count > 0) hints.Add("Go to the edge and run until 4 orbs are spawned"); } + public override void OnActorCreated(Actor actor) { if ((OID)actor.OID == OID.VermillionFlame) diff --git a/BossMod/Modules/Shadowbringers/Foray/Duel/Duel4Dabog/Duel4Dabog.cs b/BossMod/Modules/Shadowbringers/Foray/Duel/Duel4Dabog/Duel4Dabog.cs index 4002aa0397..4609f4961f 100644 --- a/BossMod/Modules/Shadowbringers/Foray/Duel/Duel4Dabog/Duel4Dabog.cs +++ b/BossMod/Modules/Shadowbringers/Foray/Duel/Duel4Dabog/Duel4Dabog.cs @@ -1,11 +1,8 @@ namespace BossMod.Shadowbringers.Foray.Duel.Duel4Dabog; class RightArmBlasterFragment(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RightArmBlasterFragment), new AOEShapeRect(100, 3)); - class RightArmBlasterBoss(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RightArmBlasterBoss), new AOEShapeRect(100, 3)); - class LeftArmSlash(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.LeftArmSlash), new AOEShapeCone(10, 90.Degrees())); // TODO: verify angle - class LeftArmWave(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.LeftArmWaveAOE), 24); [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.BozjaDuel, GroupID = 778, NameID = 19)] // bnpcname=9958 diff --git a/BossMod/Modules/Shadowbringers/Foray/Duel/Duel4Dabog/LeftArmMetalCutter.cs b/BossMod/Modules/Shadowbringers/Foray/Duel/Duel4Dabog/LeftArmMetalCutter.cs index 491a74cddd..a4d92974bb 100644 --- a/BossMod/Modules/Shadowbringers/Foray/Duel/Duel4Dabog/LeftArmMetalCutter.cs +++ b/BossMod/Modules/Shadowbringers/Foray/Duel/Duel4Dabog/LeftArmMetalCutter.cs @@ -1,6 +1,6 @@ namespace BossMod.Shadowbringers.Foray.Duel.Duel4Dabog; -class LeftArmMetalCutterAOE : Components.GenericAOEs +class LeftArmMetalCutterAOE(BossModule module) : Components.GenericAOEs(module) { public enum State { FirstAOEs, SecondAOEs, Done } @@ -41,16 +41,11 @@ public override void OnCastFinished(Actor caster, ActorCastInfo spell) } } -class LeftArmMetalCutterKnockback : Components.Knockback +class LeftArmMetalCutterKnockback(BossModule module, AID aid, float distance) : Components.Knockback(module, ActionID.MakeSpell(aid)) { - private float _distance; + private float _distance = distance; private Source? _instance; - public LeftArmMetalCutterKnockback(AID aid, float distance) : base(ActionID.MakeSpell(aid)) - { - _distance = distance; - } - public override IEnumerable Sources(int slot, Actor actor) => Utils.ZeroOrOne(_instance); public override void OnCastStarted(Actor caster, ActorCastInfo spell) @@ -59,7 +54,5 @@ public override void OnCastStarted(Actor caster, ActorCastInfo spell) _instance = new(caster.Position, _distance, spell.NPCFinishAt.AddSeconds(0.6f)); } } - class LeftArmMetalCutterKnockbackShort(BossModule module) : LeftArmMetalCutterKnockback(module, AID.LeftArmMetalCutterKnockbackShort, 5); - class LeftArmMetalCutterKnockbackLong(BossModule module) : LeftArmMetalCutterKnockback(module, AID.LeftArmMetalCutterKnockbackLong, 15); diff --git a/BossMod/Modules/Shadowbringers/Foray/Duel/Duel4Dabog/RightArmComet.cs b/BossMod/Modules/Shadowbringers/Foray/Duel/Duel4Dabog/RightArmComet.cs index 055ef17106..2d35a8fe9d 100644 --- a/BossMod/Modules/Shadowbringers/Foray/Duel/Duel4Dabog/RightArmComet.cs +++ b/BossMod/Modules/Shadowbringers/Foray/Duel/Duel4Dabog/RightArmComet.cs @@ -1,11 +1,9 @@ namespace BossMod.Shadowbringers.Foray.Duel.Duel4Dabog; -class RightArmComet : Components.KnockbackFromCastTarget +class RightArmComet(BossModule module, AID aid, float distance) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(aid), distance, shape: new AOEShapeCircle(_radius)) { private static readonly float _radius = 5; - public RightArmComet(AID aid, float distance) : base(ActionID.MakeSpell(aid), distance, shape: new AOEShapeCircle(_radius)) { } - public override void AddHints(int slot, Actor actor, TextHints hints) { base.AddHints(slot, actor, hints); @@ -17,10 +15,8 @@ public override void DrawArenaForeground(int pcSlot, Actor pc) { base.DrawArenaForeground(pcSlot, pc); foreach (var c in Casters) - arena.AddCircle(c.Position, _radius, pc.Position.InCircle(c.Position, _radius) ? ArenaColor.Safe : ArenaColor.Danger, 2); + Arena.AddCircle(c.Position, _radius, pc.Position.InCircle(c.Position, _radius) ? ArenaColor.Safe : ArenaColor.Danger, 2); } } - class RightArmCometShort(BossModule module) : RightArmComet(module, AID.RightArmCometKnockbackShort, 12); - class RightArmCometLong(BossModule module) : RightArmComet(module, AID.RightArmCometKnockbackLong, 25); diff --git a/BossMod/Modules/Shadowbringers/Foray/Duel/Duel4Dabog/RightArmRay.cs b/BossMod/Modules/Shadowbringers/Foray/Duel/Duel4Dabog/RightArmRay.cs index 8d1689fe5d..24e74f8275 100644 --- a/BossMod/Modules/Shadowbringers/Foray/Duel/Duel4Dabog/RightArmRay.cs +++ b/BossMod/Modules/Shadowbringers/Foray/Duel/Duel4Dabog/RightArmRay.cs @@ -2,7 +2,7 @@ class RightArmRayNormal(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RightArmRayNormalAOE), new AOEShapeCircle(10)); -class RightArmRayBuffed : Components.GenericAOEs +class RightArmRayBuffed(BossModule module) : Components.GenericAOEs(module) { public class SphereState { @@ -32,7 +32,7 @@ public override IEnumerable ActiveAOEs(int slot, Actor actor) yield break; foreach (var s in _spheres.Where(s => s.NumCastsLeft > 1)) - yield return new(_shape, s.Sphere.Position, s.RotNext + s.RotIncrement, _activation, risky: false); + yield return new(_shape, s.Sphere.Position, s.RotNext + s.RotIncrement, _activation, Risky: false); foreach (var s in _spheres) yield return new(_shape, s.Sphere.Position, s.RotNext, _activation, ArenaColor.Danger); } @@ -54,7 +54,7 @@ public override void DrawArenaForeground(int pcSlot, Actor pc) var midpointOffset = (ccwOffset + cwOffset) * 0.5f; if (midpointOffset.OrthoL().Dot(ccwOffset) < 0) { - arena.AddCircle(Module.Bounds.Center + midpointOffset, 1, ArenaColor.Safe); + Arena.AddCircle(Module.Bounds.Center + midpointOffset, 1, ArenaColor.Safe); } } } diff --git a/BossMod/Modules/Shadowbringers/Foray/Duel/Duel5Menenius/BlueHiddenMines.cs b/BossMod/Modules/Shadowbringers/Foray/Duel/Duel5Menenius/BlueHiddenMines.cs index 5c6d0a9ccf..190d897dff 100644 --- a/BossMod/Modules/Shadowbringers/Foray/Duel/Duel5Menenius/BlueHiddenMines.cs +++ b/BossMod/Modules/Shadowbringers/Foray/Duel/Duel5Menenius/BlueHiddenMines.cs @@ -1,6 +1,6 @@ namespace BossMod.Shadowbringers.Foray.Duel.Duel5Menenius; -internal class BlueHiddenMines : Components.GenericTowers +class BlueHiddenMines(BossModule module) : Components.GenericTowers(module) { public override void OnEventCast(Actor caster, ActorCastEvent spell) { diff --git a/BossMod/Modules/Shadowbringers/Foray/Duel/Duel5Menenius/Duel5Menenius.cs b/BossMod/Modules/Shadowbringers/Foray/Duel/Duel5Menenius/Duel5Menenius.cs index 7d43f3d49d..bd23fdfb03 100644 --- a/BossMod/Modules/Shadowbringers/Foray/Duel/Duel5Menenius/Duel5Menenius.cs +++ b/BossMod/Modules/Shadowbringers/Foray/Duel/Duel5Menenius/Duel5Menenius.cs @@ -1,10 +1,9 @@ namespace BossMod.Shadowbringers.Foray.Duel.Duel5Menenius; class SpiralScourge(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.SpiralScourge), "Use Manawall, Excellence, or Invuln."); - class CallousCrossfire(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.CallousCrossfire), "Use Light Curtain / Reflect."); -class ReactiveMunition : Components.StayMove +class ReactiveMunition(BossModule module) : Components.StayMove(module) { public override void OnStatusGain(Actor actor, ActorStatus status) { @@ -25,7 +24,7 @@ public override void OnStatusLose(Actor actor, ActorStatus status) } } -class SenseWeakness : Components.StayMove +class SenseWeakness(BossModule module) : Components.StayMove(module) { public override void OnCastStarted(Actor caster, ActorCastInfo spell) { @@ -48,7 +47,7 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) class MagitekImpetus : Components.StatusDrivenForcedMarch { - public MagitekImpetus() : base(3, (uint)SID.ForwardMarch, (uint)SID.AboutFace, (uint)SID.LeftFace, (uint)SID.RightFace) + public MagitekImpetus(BossModule module) : base(module, 3, (uint)SID.ForwardMarch, (uint)SID.AboutFace, (uint)SID.LeftFace, (uint)SID.RightFace) { ActivationLimit = 1; } diff --git a/BossMod/Modules/Shadowbringers/Foray/Duel/Duel5Menenius/GigaTempest.cs b/BossMod/Modules/Shadowbringers/Foray/Duel/Duel5Menenius/GigaTempest.cs index 64bf57524e..d94537d2f5 100644 --- a/BossMod/Modules/Shadowbringers/Foray/Duel/Duel5Menenius/GigaTempest.cs +++ b/BossMod/Modules/Shadowbringers/Foray/Duel/Duel5Menenius/GigaTempest.cs @@ -1,15 +1,13 @@ namespace BossMod.Shadowbringers.Foray.Duel.Duel5Menenius; -abstract class GigaTempest : Components.Exaflare +abstract class GigaTempest(BossModule module, AOEShapeRect shape, AID aidFirst, AID aidRest) : Components.Exaflare(module, shape) { - public GigaTempest(AOEShapeRect shape) : base(shape) { } - - public abstract bool IsStart(AID aid); - public abstract bool IsMove(AID aid); + private AID _aidStart = aidFirst; + private AID _aidRest = aidRest; public override void OnCastStarted(Actor caster, ActorCastInfo spell) { - if (IsStart((AID)spell.Action.ID)) + if ((AID)spell.Action.ID == _aidStart) { WDir? advance = GetExaDirection(caster); if (advance == null) return; @@ -28,11 +26,12 @@ public override void OnCastStarted(Actor caster, ActorCastInfo spell) public override void OnEventCast(Actor caster, ActorCastEvent spell) { - if (Lines.Count > 0 && IsStart((AID)spell.Action.ID) || IsMove((AID)spell.Action.ID)) + if (Lines.Count > 0 && (AID)spell.Action.ID == _aidStart || (AID)spell.Action.ID == _aidRest) { int index = Lines.FindIndex(item => item.Next.AlmostEqual(caster.Position, 1)); - if (index < 0) return; - AdvanceLine(module, Lines[index], caster.Position); + if (index < 0) + return; + AdvanceLine(Lines[index], caster.Position); if (Lines[index].ExplosionsLeft == 0) Lines.RemoveAt(index); } @@ -67,35 +66,5 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } } -class SmallGigaTempest : GigaTempest -{ - private static readonly AOEShapeRect _aoeShapeSmall = new(10, 6.5f, 0); - - public SmallGigaTempest() : base(_aoeShapeSmall) { } - - public override bool IsStart(AID aid) - { - return aid is AID.GigaTempestSmallStart; - } - public override bool IsMove(AID aid) - { - return aid is AID.GigaTempestSmallMove; - } - -} - -class LargeGigaTempest : GigaTempest -{ - private static readonly AOEShapeRect _aoeShapeLarge = new(35, 6.5f, 0); - - public LargeGigaTempest() : base(_aoeShapeLarge) { } - - public override bool IsStart(AID aid) - { - return aid is AID.GigaTempestLargeStart; - } - public override bool IsMove(AID aid) - { - return aid is AID.GigaTempestLargeMove; - } -} +class SmallGigaTempest(BossModule module) : GigaTempest(module, new AOEShapeRect(10, 6.5f), AID.GigaTempestSmallStart, AID.GigaTempestSmallMove); +class LargeGigaTempest(BossModule module) : GigaTempest(module, new AOEShapeRect(35, 6.5f), AID.GigaTempestLargeStart, AID.GigaTempestLargeMove); diff --git a/BossMod/Modules/Shadowbringers/Foray/Duel/Duel5Menenius/GunberdShot.cs b/BossMod/Modules/Shadowbringers/Foray/Duel/Duel5Menenius/GunberdShot.cs index dc5d426cae..b5e3d097df 100644 --- a/BossMod/Modules/Shadowbringers/Foray/Duel/Duel5Menenius/GunberdShot.cs +++ b/BossMod/Modules/Shadowbringers/Foray/Duel/Duel5Menenius/GunberdShot.cs @@ -1,6 +1,6 @@ namespace BossMod.Shadowbringers.Foray.Duel.Duel5Menenius; -class GunberdShot : BossComponent +class GunberdShot(BossModule module) : BossComponent(module) { private Actor? _gunberdCaster; @@ -65,7 +65,7 @@ public override void DrawArenaForeground(int pcSlot, Actor pc) if (Gunberding && windslicerLoaded) { var adjPos = Components.Knockback.AwayFromSource(pc.Position, _gunberdCaster, 10); - Components.Knockback.DrawKnockback(pc, adjPos, arena); + Components.Knockback.DrawKnockback(pc, adjPos, Arena); } } } diff --git a/BossMod/Modules/Shadowbringers/Foray/Duel/Duel5Menenius/RedHiddenMines.cs b/BossMod/Modules/Shadowbringers/Foray/Duel/Duel5Menenius/RedHiddenMines.cs index 1c4a0c8d98..502542662f 100644 --- a/BossMod/Modules/Shadowbringers/Foray/Duel/Duel5Menenius/RedHiddenMines.cs +++ b/BossMod/Modules/Shadowbringers/Foray/Duel/Duel5Menenius/RedHiddenMines.cs @@ -1,6 +1,6 @@ namespace BossMod.Shadowbringers.Foray.Duel.Duel5Menenius; -class RedHiddenMines : Components.GenericAOEs +class RedHiddenMines(BossModule module) : Components.GenericAOEs(module) { private List _mines = new(); private static readonly AOEShapeCircle _shapeTrigger = new(3.6f); @@ -12,7 +12,7 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID is AID.ActivateRedMine) { - _mines.Add(new(_shapeTrigger, caster.Position, color: ArenaColor.Trap)); + _mines.Add(new(_shapeTrigger, caster.Position, Color: ArenaColor.Trap)); } if ((AID)spell.Action.ID is AID.DetonateRedMine) { @@ -27,7 +27,7 @@ public override void OnCastStarted(Actor caster, ActorCastInfo spell) List _detonatingMines = new(); for (int i = 0; i < _mines.Count; i++) { - _detonatingMines.Add(new(_shapeExplosion, _mines[i].Origin, color: ArenaColor.AOE)); + _detonatingMines.Add(new(_shapeExplosion, _mines[i].Origin, Color: ArenaColor.AOE)); } _mines = _detonatingMines; } diff --git a/BossMod/Modules/Shadowbringers/Foray/Duel/Duel5Menenius/Ruination.cs b/BossMod/Modules/Shadowbringers/Foray/Duel/Duel5Menenius/Ruination.cs index 81477a1c9f..650a89d4a2 100644 --- a/BossMod/Modules/Shadowbringers/Foray/Duel/Duel5Menenius/Ruination.cs +++ b/BossMod/Modules/Shadowbringers/Foray/Duel/Duel5Menenius/Ruination.cs @@ -1,6 +1,6 @@ namespace BossMod.Shadowbringers.Foray.Duel.Duel5Menenius; -class RuinationCross : Components.GenericAOEs +class RuinationCross(BossModule module) : Components.GenericAOEs(module) { private static readonly AOEShapeRect _aoeShape = new(20, 4, 20); private List _aoes = new(); @@ -12,7 +12,7 @@ public override void OnCastStarted(Actor caster, ActorCastInfo spell) if ((AID)spell.Action.ID is AID.Ruination) { _aoes.Add(new(_aoeShape, caster.Position)); - _aoes.Add(new(_aoeShape, caster.Position, rotation: 90.Degrees())); + _aoes.Add(new(_aoeShape, caster.Position, 90.Degrees())); } } @@ -25,10 +25,8 @@ public override void OnCastFinished(Actor caster, ActorCastInfo spell) } } -class RuinationExaflare : Components.Exaflare +class RuinationExaflare(BossModule module) : Components.Exaflare(module, 4) { - public RuinationExaflare() : base(4) { } - class LineWithActor : Line { public Actor Caster; @@ -57,7 +55,7 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) { int index = Lines.FindIndex(item => ((LineWithActor)item).Caster == caster); if (index < 0) return; - AdvanceLine(module, Lines[index], caster.Position); + AdvanceLine(Lines[index], caster.Position); if (Lines[index].ExplosionsLeft == 0) Lines.RemoveAt(index); } diff --git a/BossMod/Modules/Shadowbringers/Hunt/RankA/Baal.cs b/BossMod/Modules/Shadowbringers/Hunt/RankA/Baal.cs index 950c1aa524..88cd72b238 100644 --- a/BossMod/Modules/Shadowbringers/Hunt/RankA/Baal.cs +++ b/BossMod/Modules/Shadowbringers/Hunt/RankA/Baal.cs @@ -17,10 +17,9 @@ public enum AID : uint } class SewerWater(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.SewerWater), new AOEShapeCone(12, 90.Degrees())); - class SewerWater2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.SewerWater2), new AOEShapeCone(12, 90.Degrees())); -class SewageWave : Components.GenericAOEs +class SewageWave(BossModule module) : Components.GenericAOEs(module) { private static readonly AOEShapeCone cone = new(30, 90.Degrees()); private DateTime _activation; @@ -33,7 +32,7 @@ public override IEnumerable ActiveAOEs(int slot, Actor actor) if (NumCasts == 0) { yield return new(cone, Module.PrimaryActor.Position, _rotation, _activation, ArenaColor.Danger); - yield return new(cone, Module.PrimaryActor.Position, _rotation + 180.Degrees(), _activation.AddSeconds(2.3f), risky: false); + yield return new(cone, Module.PrimaryActor.Position, _rotation + 180.Degrees(), _activation.AddSeconds(2.3f), Risky: false); } if (NumCasts == 1) yield return new(cone, Module.PrimaryActor.Position, _rotation + 180.Degrees(), _activation.AddSeconds(2.3f), ArenaColor.Danger); diff --git a/BossMod/Modules/Shadowbringers/Hunt/RankA/Grassman.cs b/BossMod/Modules/Shadowbringers/Hunt/RankA/Grassman.cs index 3e3f09047c..281100d129 100644 --- a/BossMod/Modules/Shadowbringers/Hunt/RankA/Grassman.cs +++ b/BossMod/Modules/Shadowbringers/Hunt/RankA/Grassman.cs @@ -15,7 +15,7 @@ public enum AID : uint Streak = 17862, // 283A->location, 3,0s cast, width 6 rect charge, knockback 10, away from source } -class ChestThump : BossComponent +class ChestThump(BossModule module) : BossComponent(module) { private int NumCasts; private int NumCasts2; @@ -69,9 +69,7 @@ public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignme } class StoolPelt(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.StoolPelt), 5); - class Browbeat(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.Browbeat)); - class Streak(BossModule module) : Components.ChargeAOEs(module, ActionID.MakeSpell(AID.Streak), 3); class GrassmanStates : StateMachineBuilder diff --git a/BossMod/Modules/Shadowbringers/Hunt/RankA/Huracan.cs b/BossMod/Modules/Shadowbringers/Hunt/RankA/Huracan.cs index 2f97554c74..6515c8438c 100644 --- a/BossMod/Modules/Shadowbringers/Hunt/RankA/Huracan.cs +++ b/BossMod/Modules/Shadowbringers/Hunt/RankA/Huracan.cs @@ -18,10 +18,9 @@ public enum AID : uint } class SpringBreeze(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.SpringBreeze), new AOEShapeRect(40, 5, 40)); - class SummerHeat(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.SummerHeat)); -class Combos : Components.GenericAOEs +class Combos(BossModule module) : Components.GenericAOEs(module) { private static readonly AOEShapeDonut donut = new(10, 20); private static readonly AOEShapeCircle circle = new(6); @@ -38,7 +37,7 @@ public override IEnumerable ActiveAOEs(int slot, Actor actor) if (NumCasts == 0) { yield return new(_shape, Module.PrimaryActor.Position, _rotation, _activation, ArenaColor.Danger); - yield return new(rect2, Module.PrimaryActor.Position, Module.PrimaryActor.Rotation, _activation.AddSeconds(3.1f), risky: false); + yield return new(rect2, Module.PrimaryActor.Position, Module.PrimaryActor.Rotation, _activation.AddSeconds(3.1f), Risky: false); } if (NumCasts == 1) yield return new(rect2, Module.PrimaryActor.Position, Module.PrimaryActor.Rotation, _activation.AddSeconds(3.1f), ArenaColor.Danger); diff --git a/BossMod/Modules/Shadowbringers/Hunt/RankA/LilMurderer.cs b/BossMod/Modules/Shadowbringers/Hunt/RankA/LilMurderer.cs index 3a87ccae3b..18cbab577c 100644 --- a/BossMod/Modules/Shadowbringers/Hunt/RankA/LilMurderer.cs +++ b/BossMod/Modules/Shadowbringers/Hunt/RankA/LilMurderer.cs @@ -15,7 +15,7 @@ public enum AID : uint GoblinSlash = 17489, // Boss->self, no cast, range 8 circle, sometimes boss uses Gobthunder II on itself, next attack after is this } -class GoblinSlash : Components.GenericAOEs +class GoblinSlash(BossModule module) : Components.GenericAOEs(module) { private AOEInstance? _aoe; @@ -24,7 +24,7 @@ class GoblinSlash : Components.GenericAOEs public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.GobthunderII && spell.LocXZ == caster.Position) - _aoe = new(new AOEShapeCircle(8), Module.PrimaryActor.Position, activation: spell.NPCFinishAt.AddSeconds(2.6f)); + _aoe = new(new AOEShapeCircle(8), Module.PrimaryActor.Position, default, spell.NPCFinishAt.AddSeconds(2.6f)); } public override void OnEventCast(Actor caster, ActorCastEvent spell) @@ -35,13 +35,9 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } class GobthunderIII(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.GobthunderIII), 20); - class GobthunderIIIHint(BossModule module) : Components.CastInterruptHint(module, ActionID.MakeSpell(AID.GobthunderIII)); - class GoblinPunch(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.GoblinPunch)); - class Gobhaste(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.Gobhaste), "Attack speed buff"); - class GobthunderII(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.GobthunderII), 8); class LilMurdererStates : StateMachineBuilder diff --git a/BossMod/Modules/Shadowbringers/Hunt/RankA/Maliktender.cs b/BossMod/Modules/Shadowbringers/Hunt/RankA/Maliktender.cs index 09cf06a116..9161a91da9 100644 --- a/BossMod/Modules/Shadowbringers/Hunt/RankA/Maliktender.cs +++ b/BossMod/Modules/Shadowbringers/Hunt/RankA/Maliktender.cs @@ -21,17 +21,18 @@ public enum SID : uint } class Sabotendance(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Sabotendance), new AOEShapeCircle(8)); - class TwentyKNeedles(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TwentyKNeedles), new AOEShapeRect(20, 4)); -class Haste : BossComponent +class Haste(BossModule module) : BossComponent(module) { private bool HasteB; + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.Haste) HasteB = true; } + public override void AddGlobalHints(GlobalHints hints) { if (HasteB) diff --git a/BossMod/Modules/Shadowbringers/Hunt/RankA/Nariphon.cs b/BossMod/Modules/Shadowbringers/Hunt/RankA/Nariphon.cs index 9cbd52f322..1f64049d6a 100644 --- a/BossMod/Modules/Shadowbringers/Hunt/RankA/Nariphon.cs +++ b/BossMod/Modules/Shadowbringers/Hunt/RankA/Nariphon.cs @@ -27,7 +27,7 @@ public enum IconID : uint class OdiousMiasma(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.OdiousMiasma), new AOEShapeCone(12, 60.Degrees())); -class AllergenInjection : Components.GenericBaitAway +class AllergenInjection(BossModule module) : Components.GenericBaitAway(module) { private bool targeted; private Actor? target; @@ -59,7 +59,7 @@ public override void AddHints(int slot, Actor actor, TextHints hints) } } -class RootsOfAtopy : Components.GenericStackSpread +class RootsOfAtopy(BossModule module) : Components.GenericStackSpread(module) { private BitMask _forbidden; diff --git a/BossMod/Modules/Shadowbringers/Hunt/RankA/Nuckelavee.cs b/BossMod/Modules/Shadowbringers/Hunt/RankA/Nuckelavee.cs index ab29093073..6ecfc0e9a4 100644 --- a/BossMod/Modules/Shadowbringers/Hunt/RankA/Nuckelavee.cs +++ b/BossMod/Modules/Shadowbringers/Hunt/RankA/Nuckelavee.cs @@ -15,10 +15,9 @@ public enum AID : uint } class Torpedo(BossModule module) : Components.SingleTargetDelayableCast(module, ActionID.MakeSpell(AID.Torpedo)); - class BogBody(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.BogBody), 5); -class Spite : Components.GenericAOEs +class Spite(BossModule module) : Components.GenericAOEs(module) { private AOEInstance? _aoe; @@ -27,7 +26,7 @@ class Spite : Components.GenericAOEs public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.Gallop) - _aoe = new(new AOEShapeCircle(8), spell.LocXZ, activation: spell.NPCFinishAt); + _aoe = new(new AOEShapeCircle(8), spell.LocXZ, default, spell.NPCFinishAt); } public override void OnEventCast(Actor caster, ActorCastEvent spell) diff --git a/BossMod/Modules/Shadowbringers/Hunt/RankA/OPoorestPauldia.cs b/BossMod/Modules/Shadowbringers/Hunt/RankA/OPoorestPauldia.cs index b2375451d6..84093f6142 100644 --- a/BossMod/Modules/Shadowbringers/Hunt/RankA/OPoorestPauldia.cs +++ b/BossMod/Modules/Shadowbringers/Hunt/RankA/OPoorestPauldia.cs @@ -15,11 +15,8 @@ public enum AID : uint } class RustingClaw(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RustingClaw), new AOEShapeCone(12.025f, 60.Degrees())); - class TailDrive(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TailDrive), new AOEShapeCone(34.025f, 60.Degrees())); - class WordsOfWoe(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.WordsOfWoe), new AOEShapeRect(49.025f, 3)); - class TheSpin(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.TheSpin)); class OPoorestPauldiaStates : StateMachineBuilder diff --git a/BossMod/Modules/Shadowbringers/Hunt/RankA/Rusalka.cs b/BossMod/Modules/Shadowbringers/Hunt/RankA/Rusalka.cs index 10bae59ba7..6d59c32fa6 100644 --- a/BossMod/Modules/Shadowbringers/Hunt/RankA/Rusalka.cs +++ b/BossMod/Modules/Shadowbringers/Hunt/RankA/Rusalka.cs @@ -15,17 +15,14 @@ public enum AID : uint } class Hydrocannon(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Hydrocannon), 8); - class AetherialSpark(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.AetherialSpark), new AOEShapeRect(12, 2)); -class AetherialPull : Components.KnockbackFromCastTarget +class AetherialPull(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.AetherialPull), 30, shape: new AOEShapeCircle(30), kind: Kind.TowardsOrigin) { - public AetherialPull() : base(ActionID.MakeSpell(AID.AetherialPull), 30, shape: new AOEShapeCircle(30), kind: Kind.TowardsOrigin) { } - - public override bool DestinationUnsafe(BossModule module, int slot, Actor actor, WPos pos) => module.FindComponent()?.ActiveAOEs(module, slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false; + public override bool DestinationUnsafe(int slot, Actor actor, WPos pos) => Module.FindComponent()?.ActiveAOEs(slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false; } -class Flood : Components.GenericAOEs +class Flood(BossModule module) : Components.GenericAOEs(module) { private AOEInstance? _aoe; @@ -34,7 +31,7 @@ class Flood : Components.GenericAOEs public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.AetherialPull) - _aoe = new(new AOEShapeCircle(8), Module.PrimaryActor.Position, activation: spell.NPCFinishAt.AddSeconds(3.6f)); + _aoe = new(new AOEShapeCircle(8), Module.PrimaryActor.Position, default, spell.NPCFinishAt.AddSeconds(3.6f)); } public override void OnEventCast(Actor caster, ActorCastEvent spell) diff --git a/BossMod/Modules/Shadowbringers/Hunt/RankA/Sugaar.cs b/BossMod/Modules/Shadowbringers/Hunt/RankA/Sugaar.cs index caada336bd..210cc1bb5b 100644 --- a/BossMod/Modules/Shadowbringers/Hunt/RankA/Sugaar.cs +++ b/BossMod/Modules/Shadowbringers/Hunt/RankA/Sugaar.cs @@ -20,12 +20,10 @@ public enum AID : uint } class BodySlam(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.BodySlam), new AOEShapeCircle(11)); - class NumbingNoise(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.NumbingNoise), new AOEShapeCone(13, 60.Degrees())); - class TailSnap(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TailSnap), new AOEShapeCone(18, 60.Degrees())); -class NumbingNoiseTailSnapRotating : Components.GenericRotatingAOE +class NumbingNoiseTailSnapRotating(BossModule module) : Components.GenericRotatingAOE(module) { private static readonly AOEShapeCone _shapeNumbingNoise = new(13, 60.Degrees()); private static readonly AOEShapeCone _shapeTailSnap = new(18, 60.Degrees()); @@ -50,22 +48,20 @@ public override void OnCastFinished(Actor caster, ActorCastInfo spell) } } -class NumbingNoiseTailSnapAttract : Components.Knockback +class NumbingNoiseTailSnapAttract(BossModule module) : Components.Knockback(module) { - private NumbingNoiseTailSnapRotating? _rotating; + private NumbingNoiseTailSnapRotating? _rotating = module.FindComponent(); private DateTime _activation; private static readonly AOEShapeCircle _shape = new(30); - public override void Init(BossModule module) => _rotating = module.FindComponent(); - public override IEnumerable Sources(int slot, Actor actor) { if (_activation != default) yield return new(Module.PrimaryActor.Position, 25, _activation, _shape, default, Kind.TowardsOrigin, Module.PrimaryActor.HitboxRadius + actor.HitboxRadius); } - public override bool DestinationUnsafe(BossModule module, int slot, Actor actor, WPos pos) => _rotating?.ActiveAOEs(module, slot, actor).Any(aoe => aoe.Check(pos)) ?? false; + public override bool DestinationUnsafe(int slot, Actor actor, WPos pos) => _rotating?.ActiveAOEs(slot, actor).Any(aoe => aoe.Check(pos)) ?? false; public override void OnCastStarted(Actor caster, ActorCastInfo spell) { diff --git a/BossMod/Modules/Shadowbringers/Hunt/RankA/Supay.cs b/BossMod/Modules/Shadowbringers/Hunt/RankA/Supay.cs index 7cd5c04583..f40ea0e0ee 100644 --- a/BossMod/Modules/Shadowbringers/Hunt/RankA/Supay.cs +++ b/BossMod/Modules/Shadowbringers/Hunt/RankA/Supay.cs @@ -18,7 +18,7 @@ public enum IconID : uint Baitaway = 159, // player } -class BlasphemousHowl : Components.GenericBaitAway +class BlasphemousHowl(BossModule module) : Components.GenericBaitAway(module) { private bool targeted; private Actor? target; diff --git a/BossMod/Modules/Shadowbringers/Hunt/RankA/TheMudman.cs b/BossMod/Modules/Shadowbringers/Hunt/RankA/TheMudman.cs index a0579ea249..a794665413 100644 --- a/BossMod/Modules/Shadowbringers/Hunt/RankA/TheMudman.cs +++ b/BossMod/Modules/Shadowbringers/Hunt/RankA/TheMudman.cs @@ -20,12 +20,10 @@ public enum IconID : uint } class BogBequest(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.BogBequest), new AOEShapeDonut(5, 20)); - class FeculentFlood(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.FeculentFlood), new AOEShapeCone(40, 30.Degrees())); - class RoyalFlush(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RoyalFlush), new AOEShapeCircle(8)); -class GravityForce : Components.GenericBaitAway +class GravityForce(BossModule module) : Components.GenericBaitAway(module) { private bool targeted; private Actor? target; diff --git a/BossMod/Modules/Shadowbringers/Hunt/RankS/Aglaope.cs b/BossMod/Modules/Shadowbringers/Hunt/RankS/Aglaope.cs index 8e3f1753fe..b10578116a 100644 --- a/BossMod/Modules/Shadowbringers/Hunt/RankS/Aglaope.cs +++ b/BossMod/Modules/Shadowbringers/Hunt/RankS/Aglaope.cs @@ -27,7 +27,7 @@ class SongOfTorment(BossModule module) : Components.CastInterruptHint(module, Ac //TODO: ideally this AOE should just wait for Effect Results, since they can be delayed by over 2.1s, which would cause unknowning players and AI to run back into the death zone, //not sure how to do this though considering there can be anywhere from 0-32 targets with different time for effect results each -class SeductiveSonata : Components.GenericAOEs +class SeductiveSonata(BossModule module) : Components.GenericAOEs(module) { private DateTime _activation; private DateTime _time; @@ -37,7 +37,7 @@ class SeductiveSonata : Components.GenericAOEs public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (casting || (_time != default && _time > WorldState.CurrentTime)) - yield return new(circle, Module.PrimaryActor.Position, activation: _activation); + yield return new(circle, Module.PrimaryActor.Position, default, _activation); } public override void OnCastStarted(Actor caster, ActorCastInfo spell) @@ -61,15 +61,10 @@ public override void Update() } class DeathlyVerse(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.DeathlyVerse), new AOEShapeCircle(6)); - class Tornado(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Tornado), 6); - class FourfoldSuffering(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.FourfoldSuffering), new AOEShapeDonut(5, 50)); - class AncientAero(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.AncientAero), new AOEShapeRect(42.4f, 3)); - class AncientAeroIII(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.AncientAeroIII)); - class AncientAeroIIIKB(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.AncientAeroIII), 10, shape: new AOEShapeCircle(30)); class AglaopeStates : StateMachineBuilder diff --git a/BossMod/Modules/Shadowbringers/Hunt/RankS/ForgivenGossip.cs b/BossMod/Modules/Shadowbringers/Hunt/RankS/ForgivenGossip.cs index 2cc5080b0e..8986f2cb8c 100644 --- a/BossMod/Modules/Shadowbringers/Hunt/RankS/ForgivenGossip.cs +++ b/BossMod/Modules/Shadowbringers/Hunt/RankS/ForgivenGossip.cs @@ -13,7 +13,6 @@ public enum AID : uint } class Icefall(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Icefall), 5); - class PetrifyingEye(BossModule module) : Components.CastGaze(module, ActionID.MakeSpell(AID.PetrifyingEye)); class ForgivenGossipStates : StateMachineBuilder diff --git a/BossMod/Modules/Shadowbringers/Hunt/RankS/ForgivenPedantry.cs b/BossMod/Modules/Shadowbringers/Hunt/RankS/ForgivenPedantry.cs index 819bc2fb00..a97f94453e 100644 --- a/BossMod/Modules/Shadowbringers/Hunt/RankS/ForgivenPedantry.cs +++ b/BossMod/Modules/Shadowbringers/Hunt/RankS/ForgivenPedantry.cs @@ -22,7 +22,7 @@ public enum AID : uint WitchHunt2 = 17445, // 298A->players, no cast, width 10 rect charge, targets main tank } -class LeftRightCheek : Components.GenericAOEs +class LeftRightCheek(BossModule module) : Components.GenericAOEs(module) { private static readonly AOEShapeCone cone = new(60, 90.Degrees()); private DateTime _activation; @@ -35,7 +35,7 @@ public override IEnumerable ActiveAOEs(int slot, Actor actor) if (NumCasts == 0) { yield return new(cone, Module.PrimaryActor.Position, _rotation, _activation, ArenaColor.Danger); - yield return new(cone, Module.PrimaryActor.Position, _rotation + 180.Degrees(), _activation.AddSeconds(3.1f), risky: false); + yield return new(cone, Module.PrimaryActor.Position, _rotation + 180.Degrees(), _activation.AddSeconds(3.1f), Risky: false); } if (NumCasts == 1) yield return new(cone, Module.PrimaryActor.Position, _rotation + 180.Degrees(), _activation.AddSeconds(3.1f), ArenaColor.Danger); @@ -68,17 +68,12 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } class TerrifyingGlance(BossModule module) : Components.CastGaze(module, ActionID.MakeSpell(AID.TerrifyingGlance)); - class TheStake(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TheStake), new AOEShapeCircle(18)); - class SecondCircle(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.SecondCircle), new AOEShapeRect(40, 4)); - class CleansingFire(BossModule module) : Components.CastGaze(module, ActionID.MakeSpell(AID.CleansingFire)); -class FeveredFlagellation : Components.BaitAwayCast +class FeveredFlagellation(BossModule module) : Components.BaitAwayCast(module, ActionID.MakeSpell(AID.FeveredFlagellation), new AOEShapeCone(15, 45.Degrees())) { - public FeveredFlagellation() : base(ActionID.MakeSpell(AID.FeveredFlagellation), new AOEShapeCone(15, 45.Degrees())) { } - public override void OnCastFinished(Actor caster, ActorCastInfo spell) { } public override void OnEventCast(Actor caster, ActorCastEvent spell) //tankbuster resolves on cast event, which can be delayed by moving out of tankbuster range { @@ -89,7 +84,7 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) //tankbuste class FeveredFlagellationHint(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.FeveredFlagellation), "Cleave tankbuster"); -class WitchHunt : Components.GenericBaitAway +class WitchHunt(BossModule module) : Components.GenericBaitAway(module) { private static readonly AOEShapeRect rect = new AOEShapeRect(0, 5); private bool witchHunt1done; diff --git a/BossMod/Modules/Shadowbringers/Hunt/RankS/ForgivenRebellion.cs b/BossMod/Modules/Shadowbringers/Hunt/RankS/ForgivenRebellion.cs index 35627dfb21..d54f73476c 100644 --- a/BossMod/Modules/Shadowbringers/Hunt/RankS/ForgivenRebellion.cs +++ b/BossMod/Modules/Shadowbringers/Hunt/RankS/ForgivenRebellion.cs @@ -40,7 +40,7 @@ public enum IconID : uint RotateCW = 167, // Boss } -class SanctifiedBlizzardChain : Components.GenericRotatingAOE +class SanctifiedBlizzardChain(BossModule module) : Components.GenericRotatingAOE(module) { private Angle _increment; private DateTime _activation; @@ -118,7 +118,7 @@ public override void OnCastFinished(Actor caster, ActorCastInfo spell) class SanctifiedBlizzardChainHint(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.SanctifiedBlizzardChain), "Rotation direction undeterminable until start of the 2nd cast"); -class HeavenlyCyclone : Components.GenericRotatingAOE +class HeavenlyCyclone(BossModule module) : Components.GenericRotatingAOE(module) { private Angle _increment; private Angle _rotation; @@ -136,7 +136,7 @@ public override void OnEventIcon(Actor actor, uint iconID) if (increment != default) { _increment = increment; - InitIfReady(module, actor); + InitIfReady(actor); } } @@ -148,7 +148,7 @@ public override void OnCastStarted(Actor caster, ActorCastInfo spell) _activation = spell.NPCFinishAt.AddSeconds(5.2f); } if (_rotation != default) - InitIfReady(module, caster); + InitIfReady(caster); } public override void OnEventCast(Actor caster, ActorCastEvent spell) @@ -157,7 +157,7 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) AdvanceSequence(0, WorldState.CurrentTime); } - private void InitIfReady(BossModule module, Actor source) + private void InitIfReady(Actor source) { if (_rotation != default && _increment != default) { @@ -169,24 +169,18 @@ private void InitIfReady(BossModule module, Actor source) } class HeavenlyScythe(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HeavenlyScythe), new AOEShapeCircle(10)); - class RagingFire(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RagingFire), new AOEShapeDonut(5, 40)); - class Interference(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Interference), new AOEShapeCone(28, 90.Degrees())); - class SanctifiedBlizzard(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.SanctifiedBlizzard), new AOEShapeCone(40, 22.5f.Degrees())); - class RoyalDecree(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.RoyalDecree)); -class MindJack : Components.StatusDrivenForcedMarch +class MindJack(BossModule module) : Components.StatusDrivenForcedMarch(module, 2, (uint)SID.ForwardMarch, (uint)SID.AboutFace, (uint)SID.LeftFace, (uint)SID.RightFace) { - public MindJack() : base(2, (uint)SID.ForwardMarch, (uint)SID.AboutFace, (uint)SID.LeftFace, (uint)SID.RightFace) { } - - public override bool DestinationUnsafe(BossModule module, int slot, Actor actor, WPos pos) + public override bool DestinationUnsafe(int slot, Actor actor, WPos pos) { - if (module.FindComponent() != null && module.FindComponent()!.ActiveAOEs(module, slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation))) + if (Module.FindComponent()?.ActiveAOEs(slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false) return true; - if (module.FindComponent() != null && module.FindComponent()!.ActiveAOEs(module, slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation))) + if (Module.FindComponent()?.ActiveAOEs(slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false) return true; else return false; diff --git a/BossMod/Modules/Shadowbringers/Hunt/RankS/Gunitt.cs b/BossMod/Modules/Shadowbringers/Hunt/RankS/Gunitt.cs index 337769c4af..7511016634 100644 --- a/BossMod/Modules/Shadowbringers/Hunt/RankS/Gunitt.cs +++ b/BossMod/Modules/Shadowbringers/Hunt/RankS/Gunitt.cs @@ -29,20 +29,14 @@ public enum IconID : uint Stackmarker = 93, // player } - class TheDeepSeeks(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.TheDeepSeeks)); - class TheDeepReaches(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TheDeepReaches), new AOEShapeRect(40, 1)); - class TheDeepBeckons(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.TheDeepBeckons)); - class CoinToss(BossModule module) : Components.CastGaze(module, ActionID.MakeSpell(AID.CoinToss)); - class TheDeepRends(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TheDeepRends), new AOEShapeCone(20, 30.Degrees())); - class TheDeepRendsHint(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.TheDeepRends), "Targets 5 random players after initial hit"); -class SwivelGun : Components.GenericStackSpread +class SwivelGun(BossModule module) : Components.GenericStackSpread(module) { private BitMask _forbidden; @@ -61,6 +55,7 @@ public override void OnEventIcon(Actor actor, uint iconID) if (iconID == (uint)IconID.Stackmarker) Stacks.Add(new(actor, 10, activation: WorldState.FutureTime(5), forbiddenPlayers: _forbidden)); } + public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.MagicVulnerabilityUp) diff --git a/BossMod/Modules/Shadowbringers/Hunt/RankS/Ixtab.cs b/BossMod/Modules/Shadowbringers/Hunt/RankS/Ixtab.cs index 2e793448bd..a2eef12a42 100644 --- a/BossMod/Modules/Shadowbringers/Hunt/RankS/Ixtab.cs +++ b/BossMod/Modules/Shadowbringers/Hunt/RankS/Ixtab.cs @@ -30,31 +30,32 @@ public enum SID : uint Doom = 1769, // Boss->player, extra=0x0 } -class DualCastTartareanFlameThunder : Components.GenericAOEs +class DualCastTartareanFlameThunder(BossModule module) : Components.GenericAOEs(module) { private readonly List _aoes = new(); private static readonly AOEShapeCircle circle = new(20); private static readonly AOEShapeDonut donut = new(8, 40); public override IEnumerable ActiveAOEs(int slot, Actor actor) => _aoes.Take(1); + public override void OnCastStarted(Actor caster, ActorCastInfo spell) { var dualcast = Module.PrimaryActor.FindStatus(SID.Dualcast) != null; if ((AID)spell.Action.ID == AID.TartareanThunder) if (!dualcast) - _aoes.Add(new(circle, caster.Position, activation: spell.NPCFinishAt)); + _aoes.Add(new(circle, caster.Position, default, spell.NPCFinishAt)); else { - _aoes.Add(new(circle, caster.Position, activation: spell.NPCFinishAt)); - _aoes.Add(new(donut, caster.Position, activation: spell.NPCFinishAt.AddSeconds(5.1f))); + _aoes.Add(new(circle, caster.Position, default, spell.NPCFinishAt)); + _aoes.Add(new(donut, caster.Position, default, spell.NPCFinishAt.AddSeconds(5.1f))); } if ((AID)spell.Action.ID == AID.TartareanFlame) if (!dualcast) - _aoes.Add(new(donut, caster.Position, activation: spell.NPCFinishAt)); + _aoes.Add(new(donut, caster.Position, default, spell.NPCFinishAt)); else { - _aoes.Add(new(donut, caster.Position, activation: spell.NPCFinishAt)); - _aoes.Add(new(circle, caster.Position, activation: spell.NPCFinishAt.AddSeconds(5.1f))); + _aoes.Add(new(donut, caster.Position, default, spell.NPCFinishAt)); + _aoes.Add(new(circle, caster.Position, default, spell.NPCFinishAt.AddSeconds(5.1f))); } } @@ -72,25 +73,16 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } class TartareanTwister(BossModule module) : Components.CastInterruptHint(module, ActionID.MakeSpell(AID.TartareanTwister)); - class TartareanBlizzard(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TartareanBlizzard), new AOEShapeCone(40, 22.5f.Degrees())); - class TartareanQuake(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.TartareanQuake)); - class TartareanAbyss(BossModule module) : Components.BaitAwayCast(module, ActionID.MakeSpell(AID.TartareanAbyss), new AOEShapeCircle(6), true); - class TartareanAbyssHint(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.TartareanAbyss), "Tankbuster circle"); - class TartareanFlare(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.TartareanFlare), 18); - class TartareanMeteor(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.TartareanMeteor), 10); - class ArchaicDualcast(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.ArchaicDualcast), "Preparing In/Out or Out/In AOE"); -class Cryptcall : Components.BaitAwayCast +class Cryptcall(BossModule module) : Components.BaitAwayCast(module, ActionID.MakeSpell(AID.Cryptcall), new AOEShapeCone(38.24f, 60.Degrees())) { - public Cryptcall() : base(ActionID.MakeSpell(AID.Cryptcall), new AOEShapeCone(38.24f, 60.Degrees())) { } - public override void OnCastFinished(Actor caster, ActorCastInfo spell) { } public override void OnEventCast(Actor caster, ActorCastEvent spell) //bait resolves on cast event instead of cast finish { @@ -101,7 +93,7 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) //bait reso class CryptcallHint(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.Cryptcall), "Cone reduces health to 1 + applies Doom"); -class Doom : BossComponent +class Doom(BossModule module) : BossComponent(module) { private readonly List _doomed = []; public bool Doomed { get; private set; } diff --git a/BossMod/Modules/Shadowbringers/Hunt/RankS/Tarchia.cs b/BossMod/Modules/Shadowbringers/Hunt/RankS/Tarchia.cs index dc0e4f4646..211411cd41 100644 --- a/BossMod/Modules/Shadowbringers/Hunt/RankS/Tarchia.cs +++ b/BossMod/Modules/Shadowbringers/Hunt/RankS/Tarchia.cs @@ -20,20 +20,14 @@ public enum AID : uint } class WildHorn(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.WildHorn), new AOEShapeCone(17, 60.Degrees())); - class Trounce(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Trounce), new AOEShapeCone(40, 30.Degrees())); - class Groundstorm(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Groundstorm), new AOEShapeDonut(5, 40)); - class MightySpin(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.MightySpin), new AOEShapeCircle(14)); - class ForestFire(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ForestFire), new AOEShapeCircle(15)); - class BafflementBulb(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.BafflementBulb), "Pull + Temporary Misdirection -> Donut -> Out"); - class MetamorphicBlast(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.MetamorphicBlast)); -class MightySpin2 : Components.GenericAOEs +class MightySpin2(BossModule module) : Components.GenericAOEs(module) { private DateTime _activation; private static readonly AOEShapeCircle circle = new(14); @@ -41,7 +35,7 @@ class MightySpin2 : Components.GenericAOEs public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_activation != default || NumCasts == 0) - yield return new(circle, Module.PrimaryActor.Position, activation: _activation); + yield return new(circle, Module.PrimaryActor.Position, default, _activation); } public override void OnCastFinished(Actor caster, ActorCastInfo spell) diff --git a/BossMod/Modules/Shadowbringers/Hunt/RankS/Tyger.cs b/BossMod/Modules/Shadowbringers/Hunt/RankS/Tyger.cs index 4548198cdd..20cf296a77 100644 --- a/BossMod/Modules/Shadowbringers/Hunt/RankS/Tyger.cs +++ b/BossMod/Modules/Shadowbringers/Hunt/RankS/Tyger.cs @@ -19,7 +19,7 @@ public enum AID : uint class TheLionsBreath(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TheLionsBreath), new AOEShapeCone(30, 60.Degrees())); -class TheScorpionsSting : Components.GenericAOEs +class TheScorpionsSting(BossModule module) : Components.GenericAOEs(module) { private DateTime _activation; private static readonly AOEShapeCone cone = new(18, 45.Degrees()); @@ -50,17 +50,11 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } class TheDragonsBreath(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TheDragonsBreath), new AOEShapeCone(30, 60.Degrees())); - class TheRamsBreath(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TheRamsBreath), new AOEShapeCone(30, 60.Degrees())); - class TheRamsEmbrace(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TheRamsEmbrace), new AOEShapeCircle(9)); - class TheRamsVoice(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TheRamsVoice), new AOEShapeCircle(9)); - class TheRamsVoiceHint(BossModule module) : Components.CastInterruptHint(module, ActionID.MakeSpell(AID.TheRamsVoice)); - class TheDragonsVoice(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TheDragonsVoice), new AOEShapeDonut(8, 30)); - class TheDragonsVoiceHint(BossModule module) : Components.CastInterruptHint(module, ActionID.MakeSpell(AID.TheDragonsVoice), hintExtra: "Donut Raidwide"); class TygerStates : StateMachineBuilder diff --git a/BossMod/Modules/Shadowbringers/TreasureHunt/TheDungeonsOfLyheGhiah/Goliath.cs b/BossMod/Modules/Shadowbringers/TreasureHunt/TheDungeonsOfLyheGhiah/Goliath.cs index fc770e9c67..1ad8bd4c4a 100644 --- a/BossMod/Modules/Shadowbringers/TreasureHunt/TheDungeonsOfLyheGhiah/Goliath.cs +++ b/BossMod/Modules/Shadowbringers/TreasureHunt/TheDungeonsOfLyheGhiah/Goliath.cs @@ -37,33 +37,19 @@ public enum AID : uint } class Wellbore(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Wellbore), new AOEShapeCircle(15)); - class Compress(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Compress), new AOEShapeCross(100, 3.5f)); - class Compress2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Compress2), new AOEShapeRect(102.1f, 3.5f)); - class Accelerate(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.Accelerate), 6); - class Incinerate(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.Incinerate)); - class Fount(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Fount), 4); - class MechanicalBlow(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.MechanicalBlow)); - class PluckAndPrune(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PluckAndPrune), new AOEShapeCircle(6.84f)); - class TearyTwirl(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TearyTwirl), new AOEShapeCircle(6.84f)); - class HeirloomScream(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HeirloomScream), new AOEShapeCircle(6.84f)); - class PungentPirouette(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PungentPirouette), new AOEShapeCircle(6.84f)); - class Pollen(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Pollen), new AOEShapeCircle(6.84f)); - class Spin(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Spin), new AOEShapeCircle(11)); - class Mash(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Mash), new AOEShapeRect(15.23f, 2)); - class Scoop(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Scoop), new AOEShapeCone(15, 60.Degrees())); class GoliathStates : StateMachineBuilder @@ -87,10 +73,8 @@ public GoliathStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 688, NameID = 8953)] -public class Goliath : BossModule +public class Goliath(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(0, -390), 20)) { - public Goliath(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(0, -390), 20)) { } - protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); diff --git a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/FuathTroublemaker.cs b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/FuathTroublemaker.cs index b70735f118..60d87d48e2 100644 --- a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/FuathTroublemaker.cs +++ b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/FuathTroublemaker.cs @@ -22,13 +22,9 @@ public enum AID : uint } class CroakingChorus(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.CroakingChorus), "Calls adds"); - class FrigidNeedle(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.FrigidNeedle2), new AOEShapeCross(40, 2.5f)); - class Spittle(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Spittle2), 8); - class ToyHammer(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.ToyHammer)); - class Hydrocannon(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.Hydrocannon), 6); class FuathTroublemakerStates : StateMachineBuilder @@ -46,10 +42,8 @@ public FuathTroublemakerStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 745, NameID = 9786)] -public class FuathTroublemaker : BossModule +public class FuathTroublemaker(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(100, 100), 19)) { - public FuathTroublemaker(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(100, 100), 19)) { } - protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); diff --git a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/GreedyPixie.cs b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/GreedyPixie.cs index 0a097e4f29..6098347e8b 100644 --- a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/GreedyPixie.cs +++ b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/GreedyPixie.cs @@ -41,33 +41,19 @@ public enum AID : uint } class Windrune(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.WindRune), new AOEShapeRect(40, 4)); - class SongRune(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.SongRune), 6); - class StormRune(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.StormRune)); - class BushBash(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.BushBash), new AOEShapeCircle(12)); - class BushBash2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.BushBash2), new AOEShapeCircle(12)); - class NatureCall(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.NatureCall), new AOEShapeCone(30, 60.Degrees())); - class NatureCall2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.NatureCall2), new AOEShapeCone(30, 60.Degrees())); - class PluckAndPrune(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PluckAndPrune), new AOEShapeCircle(6.84f)); - class TearyTwirl(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TearyTwirl), new AOEShapeCircle(6.84f)); - class HeirloomScream(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HeirloomScream), new AOEShapeCircle(6.84f)); - class PungentPirouette(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PungentPirouette), new AOEShapeCircle(6.84f)); - class Pollen(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Pollen), new AOEShapeCircle(6.84f)); - class Spin(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Spin), new AOEShapeCircle(11)); - class Mash(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Mash), new AOEShapeRect(13, 2)); - class Scoop(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Scoop), new AOEShapeCone(15, 60.Degrees())); class GreedyPixieStates : StateMachineBuilder @@ -95,10 +81,8 @@ public GreedyPixieStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 745, NameID = 9797)] -public class GreedyPixie : BossModule +public class GreedyPixie(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(100, 100), 19)) { - public GreedyPixie(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(100, 100), 19)) { } - protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); diff --git a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretBasket.cs b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretBasket.cs index 3b9409ea00..1db9060ba3 100644 --- a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretBasket.cs +++ b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretBasket.cs @@ -41,16 +41,14 @@ class Earthquake(BossModule module) : Components.RaidwideCast(module, ActionID.M class HeavyStrike1 : Components.SelfTargetedAOEs { - public HeavyStrike1() : base(ActionID.MakeSpell(AID.HeavyStrike1), new AOEShapeDonutSector(0.5f, 6.5f, 135.Degrees())) + public HeavyStrike1(BossModule module) : base(module, ActionID.MakeSpell(AID.HeavyStrike1), new AOEShapeDonutSector(0.5f, 6.5f, 135.Degrees())) { Color = ArenaColor.Danger; } } -class HeavyStrike2 : Components.SelfTargetedAOEs +class HeavyStrike2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HeavyStrike2), new AOEShapeDonutSector(6.5f, 12.5f, 135.Degrees())) { - public HeavyStrike2() : base(ActionID.MakeSpell(AID.HeavyStrike2), new AOEShapeDonutSector(6.5f, 12.5f, 135.Degrees())) { } - public override void OnCastFinished(Actor caster, ActorCastInfo spell) { base.OnCastFinished(caster, spell); @@ -59,12 +57,10 @@ public override void OnCastFinished(Actor caster, ActorCastInfo spell) else Color = ArenaColor.AOE; } - } -class HeavyStrike3 : Components.SelfTargetedAOEs +class HeavyStrike3(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HeavyStrike3), new AOEShapeDonutSector(12.5f, 18.5f, 135.Degrees())) { - public HeavyStrike3() : base(ActionID.MakeSpell(AID.HeavyStrike3), new AOEShapeDonutSector(12.5f, 18.5f, 135.Degrees())) { } public override void OnCastFinished(Actor caster, ActorCastInfo spell) { base.OnCastFinished(caster, spell); @@ -76,21 +72,13 @@ public override void OnCastFinished(Actor caster, ActorCastInfo spell) } class PollenCorona(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PollenCorona), new AOEShapeCircle(8)); - class StraightPunch(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.StraightPunch)); - class Leafcutter(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Leafcutter), new AOEShapeRect(15, 2)); - class EarthCrusher(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.EarthCrusher2), new AOEShapeDonut(10, 20)); - class PluckAndPrune(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PluckAndPrune), new AOEShapeCircle(6.84f)); - class TearyTwirl(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TearyTwirl), new AOEShapeCircle(6.84f)); - class HeirloomScream(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HeirloomScream), new AOEShapeCircle(6.84f)); - class PungentPirouette(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PungentPirouette), new AOEShapeCircle(6.84f)); - class Pollen(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Pollen), new AOEShapeCircle(6.84f)); class BasketStates : StateMachineBuilder @@ -116,10 +104,8 @@ public BasketStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 745, NameID = 9784)] -public class Basket : BossModule +public class Basket(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(100, 100), 19)) { - public Basket(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(100, 100), 19)) { } - protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); diff --git a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretCladoselache.cs b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretCladoselache.cs index e60bd544c8..2a84216793 100644 --- a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretCladoselache.cs +++ b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretCladoselache.cs @@ -34,7 +34,7 @@ public enum IconID : uint RotateCW = 167, // Boss } -class PelagicCleaverRotation : Components.GenericRotatingAOE +class PelagicCleaverRotation(BossModule module) : Components.GenericRotatingAOE(module) { private Angle _increment; private Angle _rotation; @@ -52,7 +52,7 @@ public override void OnEventIcon(Actor actor, uint iconID) if (increment != default) { _increment = increment; - InitIfReady(module, actor); + InitIfReady(actor); } } @@ -64,7 +64,7 @@ public override void OnCastStarted(Actor caster, ActorCastInfo spell) _activation = spell.NPCFinishAt; } if (_rotation != default) - InitIfReady(module, caster); + InitIfReady(caster); } public override void OnEventCast(Actor caster, ActorCastEvent spell) @@ -73,7 +73,7 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) AdvanceSequence(0, WorldState.CurrentTime); } - private void InitIfReady(BossModule module, Actor source) + private void InitIfReady(Actor source) { if (_rotation != default && _increment != default) { @@ -85,19 +85,12 @@ private void InitIfReady(BossModule module, Actor source) } class PelagicCleaver(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PelagicCleaver), new AOEShapeCone(40, 30.Degrees())); - class TidalGuillotine(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TidalGuillotine), new AOEShapeCircle(13)); - class ProtolithicPuncture(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.ProtolithicPuncture)); - class BiteAndRun(BossModule module) : Components.BaitAwayChargeCast(module, ActionID.MakeSpell(AID.BiteAndRun), 2.5f); - class AquaticLance(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.AquaticLance), 8); - class Spin(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Spin), new AOEShapeCircle(11)); - class Mash(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Mash), new AOEShapeRect(13, 2)); - class Scoop(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Scoop), new AOEShapeCone(15, 60.Degrees())); class CladoselacheStates : StateMachineBuilder @@ -119,10 +112,8 @@ public CladoselacheStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 745, NameID = 9778)] -public class Cladoselache : BossModule +public class Cladoselache(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(100, 100), 19)) { - public Cladoselache(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(100, 100), 19)) { } - protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); diff --git a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretDjinn.cs b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretDjinn.cs index 58d8a130b1..cd7ef56bf1 100644 --- a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretDjinn.cs +++ b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretDjinn.cs @@ -26,12 +26,11 @@ public enum AID : uint } class Gust(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Gust), 6); - class ChangelessWinds(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ChangelessWinds), new AOEShapeRect(40, 4)); class ChangelessWindsKB : Components.KnockbackFromCastTarget { - public ChangelessWindsKB() : base(ActionID.MakeSpell(AID.ChangelessWinds), 10, shape: new AOEShapeRect(40, 4), kind: Kind.DirForward) + public ChangelessWindsKB(BossModule module) : base(module, ActionID.MakeSpell(AID.ChangelessWinds), 10, shape: new AOEShapeRect(40, 4), kind: Kind.DirForward) { StopAtWall = true; } @@ -41,28 +40,25 @@ class ChangelessWindsKB : Components.KnockbackFromCastTarget class WhipwindKB : Components.KnockbackFromCastTarget { - public WhipwindKB() : base(ActionID.MakeSpell(AID.Whipwind), 25, shape: new AOEShapeRect(55, 20), kind: Kind.DirForward) + public WhipwindKB(BossModule module) : base(module, ActionID.MakeSpell(AID.Whipwind), 25, shape: new AOEShapeRect(55, 20), kind: Kind.DirForward) { StopAtWall = true; } } class GentleBreeze(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.GentleBreeze), new AOEShapeRect(15, 2)); - class WhirlingGaol(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.WhirlingGaol), "Raidwide + Knockback"); class WhirlingGaolKB : Components.KnockbackFromCastTarget { - public WhirlingGaolKB() : base(ActionID.MakeSpell(AID.WhirlingGaol), 25) + public WhirlingGaolKB(BossModule module) : base(module, ActionID.MakeSpell(AID.WhirlingGaol), 25) { StopAtWall = true; } } class Spin(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Spin), new AOEShapeCircle(11)); - class Mash(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Mash), new AOEShapeRect(13, 2)); - class Scoop(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Scoop), new AOEShapeCone(15, 60.Degrees())); class DjinnStates : StateMachineBuilder @@ -86,10 +82,8 @@ public DjinnStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 745, NameID = 9788)] -public class Djinn : BossModule +public class Djinn(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(100, 100), 19)) { - public Djinn(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(100, 100), 19)) { } - protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); diff --git a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretKeeper.cs b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretKeeper.cs index 67c84b9f6b..6ba28d4648 100644 --- a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretKeeper.cs +++ b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretKeeper.cs @@ -27,20 +27,13 @@ public enum AID : uint } class Buffet(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Buffet), new AOEShapeCone(11, 60.Degrees())); - class Inhale(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.InhaleBoss), new AOEShapeCone(20, 60.Degrees())); class InhalePull(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.InhaleBoss), 20, false, 1, new AOEShapeCone(20, 60.Degrees()), Kind.TowardsOrigin, default, true); - class HeavyScrapline(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HeavyScrapline), new AOEShapeCircle(11)); - class MoldyPhlegm(BossModule module) : Components.PersistentVoidzoneAtCastTarget(module, 6, ActionID.MakeSpell(AID.MoldyPhlegm), m => m.Enemies(OID.ResinVoidzone).Where(z => z.EventState != 7), 0); - class MoldySneeze(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.MoldySneeze), new AOEShapeCone(12, 60.Degrees()), (uint)OID.Boss); - class Spin(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Spin), new AOEShapeCircle(11)); - class Mash(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Mash), new AOEShapeRect(13, 2)); - class Scoop(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Scoop), new AOEShapeCone(15, 60.Degrees())); class KeeperStates : StateMachineBuilder @@ -62,10 +55,8 @@ public KeeperStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 745, NameID = 9807)] -public class Keeper : BossModule +public class Keeper(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(100, 100), 19)) { - public Keeper(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(100, 100), 19)) { } - protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); diff --git a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretKorrigan.cs b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretKorrigan.cs index 7d73948821..1389ea839c 100644 --- a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretKorrigan.cs +++ b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretKorrigan.cs @@ -29,21 +29,13 @@ public enum AID : uint } class Hypnotize(BossModule module) : Components.CastGaze(module, ActionID.MakeSpell(AID.Hypnotize)); - class Ram(BossModule module) : Components.SingleTargetDelayableCast(module, ActionID.MakeSpell(AID.Ram)); - class SaibaiMandragora(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.SaibaiMandragora), "Calls adds"); - class LeafDagger(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.LeafDagger), 3); - class PluckAndPrune(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PluckAndPrune), new AOEShapeCircle(6.84f)); - class TearyTwirl(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TearyTwirl), new AOEShapeCircle(6.84f)); - class HeirloomScream(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HeirloomScream), new AOEShapeCircle(6.84f)); - class PungentPirouette(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PungentPirouette), new AOEShapeCircle(6.84f)); - class Pollen(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Pollen), new AOEShapeCircle(6.84f)); class KorriganStates : StateMachineBuilder @@ -65,10 +57,8 @@ public KorriganStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 745, NameID = 9806)] -public class Korrigan : BossModule +public class Korrigan(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(100, 100), 19)) { - public Korrigan(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(100, 100), 19)) { } - protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); diff --git a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretPegasus.cs b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretPegasus.cs index 2f5ab8a950..226edac935 100644 --- a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretPegasus.cs +++ b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretPegasus.cs @@ -25,17 +25,11 @@ public enum AID : uint } class BurningBright(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.BurningBright), new AOEShapeRect(47, 3)); - class Nicker(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Nicker), new AOEShapeCircle(12)); - class CloudCall(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.CloudCall), "Calls thunderclouds"); - class LightningBolt(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.LightningBolt), new AOEShapeCircle(8)); - class Spin(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Spin), new AOEShapeCircle(11)); - class Mash(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Mash), new AOEShapeRect(13, 2)); - class Scoop(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Scoop), new AOEShapeCone(15, 60.Degrees())); class PegasusStates : StateMachineBuilder @@ -55,10 +49,8 @@ public PegasusStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 745, NameID = 9793)] -public class Pegasus : BossModule +public class Pegasus(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(100, 100), 19)) { - public Pegasus(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(100, 100), 19)) { } - protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); diff --git a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretPorxie.cs b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretPorxie.cs index 90b1059a26..7c0a483973 100644 --- a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretPorxie.cs +++ b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretPorxie.cs @@ -44,15 +44,11 @@ public enum AID : uint } class BrewingStorm(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.BrewingStorm), new AOEShapeCone(5, 30.Degrees())); - class HarrowingDream(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HarrowingDream), new AOEShapeCircle(6)); - class BecloudingDust(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.BecloudingDust2), 6); -class Sweep : Components.Exaflare +class Sweep(BossModule module) : Components.Exaflare(module, 6) { - public Sweep() : base(6) { } - public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.SweepStart) @@ -64,7 +60,7 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) if (Lines.Count > 0 && (AID)spell.Action.ID == AID.SweepRest) { int index = Lines.FindIndex(item => item.Next.AlmostEqual(caster.Position, 1)); - AdvanceLine(module, Lines[index], caster.Position); + AdvanceLine(Lines[index], caster.Position); if (Lines[index].ExplosionsLeft == 0) Lines.RemoveAt(index); } @@ -72,19 +68,12 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } class Spin(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Spin), new AOEShapeCircle(11)); - class Mash(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Mash), new AOEShapeRect(13, 2)); - class Scoop(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Scoop), new AOEShapeCone(15, 60.Degrees())); - class PluckAndPrune(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PluckAndPrune), new AOEShapeCircle(6.84f)); - class TearyTwirl(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TearyTwirl), new AOEShapeCircle(6.84f)); - class HeirloomScream(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HeirloomScream), new AOEShapeCircle(6.84f)); - class PungentPirouette(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PungentPirouette), new AOEShapeCircle(6.84f)); - class Pollen(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Pollen), new AOEShapeCircle(6.84f)); class PorxieStates : StateMachineBuilder @@ -109,10 +98,8 @@ public PorxieStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 745, NameID = 9795)] -public class Porxie : BossModule +public class Porxie(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(100, 100), 19)) { - public Porxie(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(100, 100), 19)) { } - protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); diff --git a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretSerpent.cs b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretSerpent.cs index ea1db1f105..d90b7a3c1c 100644 --- a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretSerpent.cs +++ b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretSerpent.cs @@ -32,23 +32,14 @@ public enum AID : uint } class Douse(BossModule module) : Components.PersistentVoidzoneAtCastTarget(module, 8, ActionID.MakeSpell(AID.Douse), m => m.Enemies(OID.WaterVoidzone).Where(z => z.EventState != 7), 0); - class FangsEnd(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.FangsEnd)); - class Drench(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Drench), new AOEShapeCone(15.29f, 45.Degrees())); - class Drench2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Drench2), new AOEShapeCone(13.45f, 45.Degrees())); - class ScaleRipple(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ScaleRipple), new AOEShapeCircle(8)); - class PluckAndPrune(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PluckAndPrune), new AOEShapeCircle(6.84f)); - class TearyTwirl(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TearyTwirl), new AOEShapeCircle(6.84f)); - class HeirloomScream(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HeirloomScream), new AOEShapeCircle(6.84f)); - class PungentPirouette(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PungentPirouette), new AOEShapeCircle(6.84f)); - class Pollen(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Pollen), new AOEShapeCircle(6.84f)); class SerpentStates : StateMachineBuilder @@ -71,10 +62,8 @@ public SerpentStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 745, NameID = 9776)] -public class Serpent : BossModule +public class Serpent(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(100, 100), 19)) { - public Serpent(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(100, 100), 19)) { } - protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); diff --git a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretSwallow.cs b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretSwallow.cs index d69be0d2e2..fc43053dd6 100644 --- a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretSwallow.cs +++ b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretSwallow.cs @@ -20,25 +20,20 @@ public enum AID : uint } class ElectricWhorl(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.SeventhWave), new AOEShapeCircle(11)); - class PrevailingCurrent(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PrevailingCurrent), new AOEShapeRect(24, 3)); - class SeventhWave(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ElectricWhorl), new AOEShapeDonut(8, 60)); - class Hydrocannon(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Hydrocannon2), 8); - class Ceras(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.Ceras)); - class BodySlam(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.BodySlam), 10); class BodySlamKB : Components.KnockbackFromCastTarget { - public BodySlamKB() : base(ActionID.MakeSpell(AID.BodySlam), 20, shape: new AOEShapeCircle(10)) + public BodySlamKB(BossModule module) : base(module, ActionID.MakeSpell(AID.BodySlam), 20, shape: new AOEShapeCircle(10)) { StopAtWall = true; } - public override bool DestinationUnsafe(BossModule module, int slot, Actor actor, WPos pos) => module.FindComponent()?.ActiveAOEs(module, slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false; + public override bool DestinationUnsafe(int slot, Actor actor, WPos pos) => Module.FindComponent()?.ActiveAOEs(slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false; } class SwallowStates : StateMachineBuilder @@ -58,10 +53,8 @@ public SwallowStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 745, NameID = 9782)] -public class Swallow : BossModule +public class Swallow(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(100, 100), 19)) { - public Swallow(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(100, 100), 19)) { } - protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); diff --git a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretUndine.cs b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretUndine.cs index e5d1a7abd9..aa23e77b57 100644 --- a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretUndine.cs +++ b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretUndine.cs @@ -29,21 +29,13 @@ public enum AID : uint } class Hydrofan(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Hydrofan), new AOEShapeCone(44, 15.Degrees())); - class Hypnowave(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Hypnowave), new AOEShapeCone(30, 60.Degrees())); - class Hydropins(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Hydropins), new AOEShapeRect(12, 2)); - class AquaGlobe(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.AquaGlobe), 8); - class Hydrowhirl(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Hydrowhirl), new AOEShapeCircle(8)); - class Hydrotaph(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.Hydrotaph2)); - class Spin(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Spin), new AOEShapeCircle(11)); - class Mash(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Mash), new AOEShapeRect(13, 2)); - class Scoop(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Scoop), new AOEShapeCone(15, 60.Degrees())); class UndineStates : StateMachineBuilder @@ -65,10 +57,8 @@ public UndineStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 745, NameID = 9790)] -public class Undine : BossModule +public class Undine(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(100, 100), 19)) { - public Undine(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(100, 100), 19)) { } - protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); diff --git a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretWorm.cs b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretWorm.cs index f60d41b2e0..ecc4dd6356 100644 --- a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretWorm.cs +++ b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretWorm.cs @@ -36,16 +36,12 @@ public enum IconID : uint } class Hydrocannon(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Hydrocannon), 8); - class FreshwaterCannon(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.FreshwaterCannon), new AOEShapeRect(46, 2)); - class AquaBurst(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.AquaBurst), new AOEShapeCircle(10)); - class BrineBreath(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.BrineBreath)); - class Hydroburst(BossModule module) : Components.PersistentVoidzone(module, 8, m => m.Enemies(OID.Bubble).Where(x => !x.IsDead && !(x.CastInfo != null && x.CastInfo.IsSpell(AID.AquaBurst)))); -class Bubble : Components.GenericBaitAway +class Bubble(BossModule module) : Components.GenericBaitAway(module) { private bool targeted; private Actor? target; @@ -85,13 +81,9 @@ public override void AddHints(int slot, Actor actor, TextHints hints) } class PluckAndPrune(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PluckAndPrune), new AOEShapeCircle(6.84f)); - class TearyTwirl(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TearyTwirl), new AOEShapeCircle(6.84f)); - class HeirloomScream(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HeirloomScream), new AOEShapeCircle(6.84f)); - class PungentPirouette(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PungentPirouette), new AOEShapeCircle(6.84f)); - class Pollen(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Pollen), new AOEShapeCircle(6.84f)); class WormStates : StateMachineBuilder @@ -116,10 +108,8 @@ public WormStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 745, NameID = 9780)] -public class Worm : BossModule +public class Worm(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(100, 100), 19)) { - public Worm(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(100, 100), 19)) { } - protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); diff --git a/BossMod/Modules/Stormblood/Hunt/RankA/Angada.cs b/BossMod/Modules/Stormblood/Hunt/RankA/Angada.cs index c6c191a3d6..a43e8a87d7 100644 --- a/BossMod/Modules/Stormblood/Hunt/RankA/Angada.cs +++ b/BossMod/Modules/Stormblood/Hunt/RankA/Angada.cs @@ -15,10 +15,9 @@ public enum AID : uint } class ScytheTail(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ScytheTail), new AOEShapeCircle(9.4f)); - class Butcher(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Butcher), new AOEShapeCone(11.4f, 60.Degrees())); -class Rip : Components.GenericAOEs +class Rip(BossModule module) : Components.GenericAOEs(module) { private DateTime _activation; private static readonly AOEShapeCone cone = new(11.4f, 60.Degrees()); diff --git a/BossMod/Modules/Stormblood/Hunt/RankA/Gajasura.cs b/BossMod/Modules/Stormblood/Hunt/RankA/Gajasura.cs index f222017c76..961288c6cc 100644 --- a/BossMod/Modules/Stormblood/Hunt/RankA/Gajasura.cs +++ b/BossMod/Modules/Stormblood/Hunt/RankA/Gajasura.cs @@ -14,9 +14,7 @@ public enum AID : uint } class Spin(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Spin), new AOEShapeCone(8.23f, 60.Degrees())); - class Hurl(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Hurl), 6); - class Buffet(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.Buffet), "Heavy damage on random target (except tank)"); class GajasuraStates : StateMachineBuilder diff --git a/BossMod/Modules/Stormblood/Hunt/RankS/BoneCrawler.cs b/BossMod/Modules/Stormblood/Hunt/RankS/BoneCrawler.cs index bfbeac966f..ca50cc7ed8 100644 --- a/BossMod/Modules/Stormblood/Hunt/RankS/BoneCrawler.cs +++ b/BossMod/Modules/Stormblood/Hunt/RankS/BoneCrawler.cs @@ -20,17 +20,11 @@ public enum AID : uint } class HeatBreath(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HeatBreath), new AOEShapeCone(14.2f, 45.Degrees())); - class RipperClaw(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RipperClaw), new AOEShapeCone(11.2f, 45.Degrees())); - class WildCharge(BossModule module) : Components.ChargeAOEs(module, ActionID.MakeSpell(AID.WildCharge), 4); - class HotCharge(BossModule module) : Components.ChargeAOEs(module, ActionID.MakeSpell(AID.HotCharge), 6); - class TailSwing(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TailSwing), new AOEShapeCircle(10)); - class TailSwingKB(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.TailSwing), 20, shape: new AOEShapeCircle(10)); - class TailSmash(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TailSmash), new AOEShapeCone(18.2f, 45.Degrees())); class BoneCrawlerStates : StateMachineBuilder diff --git a/BossMod/Modules/Stormblood/Hunt/RankS/Gamma.cs b/BossMod/Modules/Stormblood/Hunt/RankS/Gamma.cs index 6aeda65bd3..31adc14c48 100644 --- a/BossMod/Modules/Stormblood/Hunt/RankS/Gamma.cs +++ b/BossMod/Modules/Stormblood/Hunt/RankS/Gamma.cs @@ -22,12 +22,10 @@ public enum SID : uint } class DiffractiveLaser(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.DiffractiveLaser), 5); - class MagitekFlamehook(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.MagitekFlamehook), "Raidwide + Pyretic"); - class Launcher(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.Launcher), "Raidwide (%HP based)"); -class MagitekFlamehookPyretic : BossComponent +class MagitekFlamehookPyretic(BossModule module) : BossComponent(module) { //Note: boss is lvl 70, so this pyretic can probably be ignored at lvl 90, but we assume the player is also around lvl 70 private BitMask _pyretic; public bool Pyretic { get; private set; } diff --git a/BossMod/Modules/Stormblood/Hunt/RankS/Okina.cs b/BossMod/Modules/Stormblood/Hunt/RankS/Okina.cs index 91c435498b..932b34b8f8 100644 --- a/BossMod/Modules/Stormblood/Hunt/RankS/Okina.cs +++ b/BossMod/Modules/Stormblood/Hunt/RankS/Okina.cs @@ -18,21 +18,13 @@ public enum AID : uint } class Hydrocannon(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Hydrocannon), new AOEShapeRect(30, 3)); - class ElectricWhorl(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ElectricWhorl), new AOEShapeDonut(8, 60)); - class Expulsion(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Expulsion), new AOEShapeCircle(14)); - class ExpulsionKB(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.Expulsion), 30, shape: new AOEShapeCircle(14)); - class ElectricSwipe(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ElectricSwipe), new AOEShapeCone(25, 30.Degrees())); - class BodySlam(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.BodySlam), 10); - class BodySlamKB(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.BodySlam), 20, shape: new AOEShapeCircle(10)); - class Immersion(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.Immersion)); - class RubyTide(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.RubyTide), "Applies damage buff to self"); class OkinaStates : StateMachineBuilder diff --git a/BossMod/Modules/Stormblood/Hunt/RankS/Orghana.cs b/BossMod/Modules/Stormblood/Hunt/RankS/Orghana.cs index 58841e20b6..13fb180e7d 100644 --- a/BossMod/Modules/Stormblood/Hunt/RankS/Orghana.cs +++ b/BossMod/Modules/Stormblood/Hunt/RankS/Orghana.cs @@ -16,9 +16,7 @@ public enum AID : uint } class TremblingEpigraph(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.TremblingEpigraph), "Raidwide x4"); - class FlaringEpigraph(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.FlaringEpigraph)); - class Epigraph(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Epigraph), new AOEShapeRect(55.04f, 4)); class OrghanaStates : StateMachineBuilder diff --git a/BossMod/Modules/Stormblood/TreasureHunt/TheLostCanalsOfUznair/CanalIcebeast.cs b/BossMod/Modules/Stormblood/TreasureHunt/TheLostCanalsOfUznair/CanalIcebeast.cs index 36dc176505..607dd3e1a5 100644 --- a/BossMod/Modules/Stormblood/TreasureHunt/TheLostCanalsOfUznair/CanalIcebeast.cs +++ b/BossMod/Modules/Stormblood/TreasureHunt/TheLostCanalsOfUznair/CanalIcebeast.cs @@ -28,17 +28,11 @@ public enum AID : uint } class Eyeshine(BossModule module) : Components.CastGaze(module, ActionID.MakeSpell(AID.Eyeshine)); - class AbsoluteZero(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.AbsoluteZero), new AOEShapeCone(45.5f, 45.Degrees())); - class Freezeover(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Freezeover), 6); - class PlainPound(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PlainPound), new AOEShapeCircle(4.56f)); - class RaucousScritch(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RaucousScritch), new AOEShapeCone(8.42f, 30.Degrees())); - class Hurl(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Hurl), 6); - class Spin(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.Spin), new AOEShapeCone(9.42f, 60.Degrees()), (uint)OID.BonusAdd_Abharamu); class IcebeastStates : StateMachineBuilder @@ -58,10 +52,8 @@ public IcebeastStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 268, NameID = 6650)] -public class Icebeast : BossModule +public class Icebeast(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(0, -420), 20)) { - public Icebeast(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(0, -420), 20)) { } - protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); diff --git a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarAiravata.cs b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarAiravata.cs index 2a4ff9af41..85e9897c7d 100644 --- a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarAiravata.cs +++ b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarAiravata.cs @@ -31,11 +31,8 @@ public enum IconID : uint } class HurlBoss(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.HurlBoss), 6); - class SpinBoss(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.SpinBoss), new AOEShapeCone(30, 60.Degrees())); - class BarbarousScream(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.BarbarousScream), new AOEShapeCircle(13)); - class Huff(BossModule module) : Components.SingleTargetDelayableCast(module, ActionID.MakeSpell(AID.Huff)); class Buffet : Components.KnockbackFromCastTarget @@ -43,7 +40,7 @@ class Buffet : Components.KnockbackFromCastTarget private bool targeted; private Actor? target; - public Buffet() : base(ActionID.MakeSpell(AID.Buffet), 20, kind: Kind.DirForward) + public Buffet(BossModule module) : base(module, ActionID.MakeSpell(AID.Buffet), 20, kind: Kind.DirForward) { StopAtWall = true; } @@ -59,7 +56,7 @@ public override void OnEventIcon(Actor actor, uint iconID) public override IEnumerable Sources(int slot, Actor actor) { - return target == actor ? base.Sources(module, slot, actor) : Enumerable.Empty(); + return target == actor ? base.Sources(slot, actor) : Enumerable.Empty(); } public override void OnCastFinished(Actor caster, ActorCastInfo spell) @@ -86,10 +83,8 @@ public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignme } } -class Buffet2 : Components.BaitAwayCast //Boss jumps on player and does a cone attack, this is supposed to predict the position of the cone attack +class Buffet2(BossModule module) : Components.BaitAwayCast(module, ActionID.MakeSpell(AID.Buffet), new AOEShapeCone(30, 60.Degrees()), true) //Boss jumps on player and does a cone attack, this is supposed to predict the position of the cone attack { - public Buffet2() : base(ActionID.MakeSpell(AID.Buffet), new AOEShapeCone(30, 60.Degrees()), true) { } - public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { foreach (var b in CurrentBaits) @@ -101,7 +96,7 @@ public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (var bait in ActiveBaitsOn(pc)) { - bait.Shape.Outline(arena, bait.Target.Position + (bait.Target.HitboxRadius + Module.PrimaryActor.HitboxRadius) * (Module.PrimaryActor.Position - bait.Target.Position).Normalized(), bait.Rotation); + bait.Shape.Outline(Arena, bait.Target.Position + (bait.Target.HitboxRadius + Module.PrimaryActor.HitboxRadius) * (Module.PrimaryActor.Position - bait.Target.Position).Normalized(), bait.Rotation); } } @@ -110,15 +105,12 @@ public override void DrawArenaBackground(int pcSlot, Actor pc) if (!IgnoreOtherBaits) foreach (var bait in ActiveBaitsNotOn(pc)) if (AlwaysDrawOtherBaits || IsClippedBy(pc, bait)) - bait.Shape.Draw(arena, bait.Target.Position + (bait.Target.HitboxRadius + Module.PrimaryActor.HitboxRadius) * (Module.PrimaryActor.Position - bait.Target.Position).Normalized(), bait.Rotation); + bait.Shape.Draw(Arena, bait.Target.Position + (bait.Target.HitboxRadius + Module.PrimaryActor.HitboxRadius) * (Module.PrimaryActor.Position - bait.Target.Position).Normalized(), bait.Rotation); } } - class RaucousScritch(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RaucousScritch), new AOEShapeCone(8.42f, 30.Degrees())); - class Hurl(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Hurl), 6); - class Spin(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.Spin), new AOEShapeCone(9.42f, 60.Degrees()), (uint)OID.BonusAdd_AltarMatanga); class AiravataStates : StateMachineBuilder @@ -140,10 +132,8 @@ public AiravataStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 586, NameID = 7601)] -public class Airavata : BossModule +public class Airavata(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { - public Airavata(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { } - protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); diff --git a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarArachne.cs b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarArachne.cs index 87f91222d2..b5a27161ac 100644 --- a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarArachne.cs +++ b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarArachne.cs @@ -29,23 +29,14 @@ public enum AID : uint } class DarkSpike(BossModule module) : Components.SingleTargetDelayableCast(module, ActionID.MakeSpell(AID.DarkSpike)); - class FrondAffeared(BossModule module) : Components.CastGaze(module, ActionID.MakeSpell(AID.FrondAffeared)); - class SilkenSpray(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.SilkenSpray), new AOEShapeCone(24, 30.Degrees())); - class Implosion(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.Implosion)); - class Earthquake1(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Earthquake1), new AOEShapeCircle(10.5f)); - class Earthquake2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Earthquake2), new AOEShapeDonut(10, 20)); - class Earthquake3(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Earthquake3), new AOEShapeDonut(20, 30)); - class RaucousScritch(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RaucousScritch), new AOEShapeCone(8.42f, 30.Degrees())); - class Hurl(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Hurl), 6); - class Spin(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.Spin), new AOEShapeCone(9.42f, 60.Degrees()), (uint)OID.BonusAdd_AltarMatanga); class ArachneStates : StateMachineBuilder @@ -68,10 +59,8 @@ public ArachneStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 586, NameID = 7623)] -public class Arachne : BossModule +public class Arachne(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { - public Arachne(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { } - protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); diff --git a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarBeast.cs b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarBeast.cs index ce9f37b8f1..0565db71b2 100644 --- a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarBeast.cs +++ b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarBeast.cs @@ -38,31 +38,18 @@ public enum AID : uint } class RustingClaw(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RustingClaw), new AOEShapeCone(12.6f, 60.Degrees())); - class TailDrive(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TailDrive), new AOEShapeCone(34.6f, 60.Degrees())); - class TheSpin(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TheSpin), new AOEShapeCircle(15)); - class WordsOfWoe(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.WordsOfWoe), new AOEShapeRect(49.6f, 3)); - class VengefulSoul(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.VengefulSoul), 6); - class EyeOfTheFire(BossModule module) : Components.CastGaze(module, ActionID.MakeSpell(AID.EyeOfTheFire)); - class PluckAndPrune(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PluckAndPrune), new AOEShapeCircle(6.84f)); - class TearyTwirl(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TearyTwirl), new AOEShapeCircle(6.84f)); - class HeirloomScream(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HeirloomScream), new AOEShapeCircle(6.84f)); - class PungentPirouette(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PungentPirouette), new AOEShapeCircle(6.84f)); - class Pollen(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Pollen), new AOEShapeCircle(6.84f)); - class RaucousScritch(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RaucousScritch), new AOEShapeCone(8.42f, 30.Degrees())); - class Hurl(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Hurl), 6); - class Spin(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.Spin), new AOEShapeCone(9.42f, 60.Degrees()), (uint)OID.BonusAdd_AltarMatanga); class BeastStates : StateMachineBuilder @@ -89,10 +76,8 @@ public BeastStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 586, NameID = 7588)] -public class Beast : BossModule +public class Beast(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { - public Beast(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { } - protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); diff --git a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarChimera.cs b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarChimera.cs index f0e86d63f0..b95732b558 100644 --- a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarChimera.cs +++ b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarChimera.cs @@ -34,22 +34,15 @@ public enum IconID : uint } class TheScorpionsSting(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TheScorpionsSting), new AOEShapeCone(11.92f, 45.Degrees())); - class TheRamsVoice(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TheRamsVoice), new AOEShapeCircle(9.92f)); - class TheRamsVoiceHint(BossModule module) : Components.CastInterruptHint(module, ActionID.MakeSpell(AID.TheRamsVoice)); - class TheLionsBreath(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TheLionsBreath), new AOEShapeCone(11.92f, 60.Degrees())); - class LanguorousGaze(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.LanguorousGaze), new AOEShapeCone(8.07f, 45.Degrees())); - class TheDragonsVoice(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TheDragonsVoice), new AOEShapeDonut(8, 30)); - class TheDragonsVoiceHint(BossModule module) : Components.CastInterruptHint(module, ActionID.MakeSpell(AID.TheDragonsVoice)); - class TheRamsKeeper(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.TheRamsKeeper), 6); -class TheRamsKeeperBait : Components.GenericBaitAway +class TheRamsKeeperBait(BossModule module) : Components.GenericBaitAway(module) { private bool targeted; private Actor? target; @@ -89,11 +82,8 @@ public override void AddHints(int slot, Actor actor, TextHints hints) } class IceVoidzone(BossModule module) : Components.PersistentVoidzone(module, 6, m => m.Enemies(OID.IceVoidzone).Where(z => z.EventState != 7)); - class RaucousScritch(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RaucousScritch), new AOEShapeCone(8.42f, 30.Degrees())); - class Hurl(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Hurl), 6); - class Spin(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.Spin), new AOEShapeCone(9.42f, 60.Degrees()), (uint)OID.BonusAdd_AltarMatanga); class ChimeraStates : StateMachineBuilder @@ -119,10 +109,8 @@ public ChimeraStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 586, NameID = 7591)] -public class Chimera : BossModule +public class Chimera(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { - public Chimera(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { } - protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); diff --git a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarDiresaur.cs b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarDiresaur.cs index 3226786d5d..03a8c7a0c2 100644 --- a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarDiresaur.cs +++ b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarDiresaur.cs @@ -36,20 +36,14 @@ public enum IconID : uint } class DeadlyHold(BossModule module) : Components.SingleTargetDelayableCast(module, ActionID.MakeSpell(AID.DeadlyHold)); - class HeatBreath(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HeatBreath), new AOEShapeCone(14.6f, 45.Degrees())); - class TailSmash(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TailSmash), new AOEShapeCone(26.6f, 45.Degrees())); - class RagingInferno(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.RagingInferno)); - class Comet(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Comet), 4); - class HardStomp(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HardStomp), new AOEShapeCircle(10)); - class Fireball(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Fireball), 6); -class FireballBait : Components.GenericBaitAway +class FireballBait(BossModule module) : Components.GenericBaitAway(module) { private bool targeted; private Actor? target; @@ -91,11 +85,8 @@ public override void AddHints(int slot, Actor actor, TextHints hints) } class FireballVoidzone(BossModule module) : Components.PersistentVoidzone(module, 6, m => m.Enemies(OID.FireVoidzone).Where(z => z.EventState != 7)); - class RaucousScritch(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RaucousScritch), new AOEShapeCone(8.42f, 30.Degrees())); - class Hurl(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Hurl), 6); - class Spin(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.Spin), new AOEShapeCone(9.42f, 60.Degrees()), (uint)OID.BonusAdd_AltarMatanga); class DiresaurStates : StateMachineBuilder @@ -120,10 +111,8 @@ public DiresaurStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 586, NameID = 7627)] -public class Diresaur : BossModule +public class Diresaur(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { - public Diresaur(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { } - protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); diff --git a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarDullahan.cs b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarDullahan.cs index 1aaaba7fb9..25acaa53dd 100644 --- a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarDullahan.cs +++ b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarDullahan.cs @@ -38,39 +38,28 @@ public enum AID : uint } class IronJustice(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.IronJustice), new AOEShapeCone(11.8f, 60.Degrees())); - class Cloudcover(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Cloudcover), 6); - class TerrorEye(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.TerrorEye), 6); - class VillainousRebuke(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.VillainousRebuke), 6); - class StygianRelease(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.StygianRelease)); - class PluckAndPrune(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PluckAndPrune), new AOEShapeCircle(6.84f)); - class TearyTwirl(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TearyTwirl), new AOEShapeCircle(6.84f)); - class HeirloomScream(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HeirloomScream), new AOEShapeCircle(6.84f)); - class PungentPirouette(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PungentPirouette), new AOEShapeCircle(6.84f)); - class Pollen(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Pollen), new AOEShapeCircle(6.84f)); class StygianReleaseKB : Components.KnockbackFromCastTarget { - public StygianReleaseKB() : base(ActionID.MakeSpell(AID.StygianRelease), 20) + public StygianReleaseKB(BossModule module) : base(module, ActionID.MakeSpell(AID.StygianRelease), 20) { StopAtWall = true; } - public override bool DestinationUnsafe(BossModule module, int slot, Actor actor, WPos pos) => module.FindComponent()?.ActiveAOEs(module, slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false; + public override bool DestinationUnsafe(int slot, Actor actor, WPos pos) => Module.FindComponent()?.ActiveAOEs(slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false; } class RaucousScritch(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RaucousScritch), new AOEShapeCone(8.42f, 30.Degrees())); - class Hurl(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Hurl), 6); - class Spin(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.Spin), new AOEShapeCone(9.42f, 60.Degrees()), (uint)OID.BonusAdd_AltarMatanga); class DullahanStates : StateMachineBuilder @@ -97,10 +86,8 @@ public DullahanStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 586, NameID = 7585)] -public class Dullahan : BossModule +public class Dullahan(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { - public Dullahan(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { } - protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); diff --git a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarKelpie.cs b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarKelpie.cs index b8e3665560..5b9cd2e7c1 100644 --- a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarKelpie.cs +++ b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarKelpie.cs @@ -38,10 +38,9 @@ public enum AID : uint } class Innocence(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Innocence), 5); - class HydroPush(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HydroPush), new AOEShapeRect(49.4f, 22, 5)); -class BloodyPuddle : Components.GenericAOEs +class BloodyPuddle(BossModule module) : Components.GenericAOEs(module) { private static readonly AOEShapeCircle circle = new(11.2f); private readonly List _spheres = []; @@ -50,7 +49,7 @@ class BloodyPuddle : Components.GenericAOEs public override IEnumerable ActiveAOEs(int slot, Actor actor) { foreach (var s in _spheres) - yield return new(circle, s.Position, activation: _activation); + yield return new(circle, s.Position, default, _activation); } public override void OnActorCreated(Actor actor) @@ -70,12 +69,11 @@ public override void OnCastFinished(Actor caster, ActorCastInfo spell) } class Torpedo(BossModule module) : Components.SingleTargetDelayableCast(module, ActionID.MakeSpell(AID.Torpedo)); - class RisingSeas(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.RisingSeas)); class HydroPushKB : Components.KnockbackFromCastTarget { - public HydroPushKB() : base(ActionID.MakeSpell(AID.HydroPush), 20, shape: new AOEShapeRect(49.4f, 22, 5), kind: Kind.DirForward) + public HydroPushKB(BossModule module) : base(module, ActionID.MakeSpell(AID.HydroPush), 20, shape: new AOEShapeRect(49.4f, 22, 5), kind: Kind.DirForward) { StopAtWall = true; } @@ -83,27 +81,20 @@ class HydroPushKB : Components.KnockbackFromCastTarget class RisingSeasKB : Components.KnockbackFromCastTarget { - public RisingSeasKB() : base(ActionID.MakeSpell(AID.RisingSeas), 20) + public RisingSeasKB(BossModule module) : base(module, ActionID.MakeSpell(AID.RisingSeas), 20) { StopAtWall = true; } - public override bool DestinationUnsafe(BossModule module, int slot, Actor actor, WPos pos) => module.FindComponent()?.ActiveAOEs(module, slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false; + public override bool DestinationUnsafe(int slot, Actor actor, WPos pos) => Module.FindComponent()?.ActiveAOEs(slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false; } class RaucousScritch(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RaucousScritch), new AOEShapeCone(8.42f, 30.Degrees())); - class Hurl(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Hurl), 6); - class Spin(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.Spin), new AOEShapeCone(9.42f, 60.Degrees()), (uint)OID.BonusAdd_AltarMatanga); - class PluckAndPrune(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PluckAndPrune), new AOEShapeCircle(6.84f)); - class TearyTwirl(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TearyTwirl), new AOEShapeCircle(6.84f)); - class HeirloomScream(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HeirloomScream), new AOEShapeCircle(6.84f)); - class PungentPirouette(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PungentPirouette), new AOEShapeCircle(6.84f)); - class Pollen(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Pollen), new AOEShapeCircle(6.84f)); class KelpieStates : StateMachineBuilder @@ -131,10 +122,8 @@ public KelpieStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 586, NameID = 7589)] -public class Kelpie : BossModule +public class Kelpie(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { - public Kelpie(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { } - protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); diff --git a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarMandragora.cs b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarMandragora.cs index af700a6996..ec7a0d2191 100644 --- a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarMandragora.cs +++ b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarMandragora.cs @@ -30,21 +30,13 @@ public enum AID : uint } class OpticalIntrusion(BossModule module) : Components.SingleTargetDelayableCast(module, ActionID.MakeSpell(AID.OpticalIntrusion)); - class Hypnotize(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Hypnotize), new AOEShapeCone(22.85f, 45.Degrees())); - class SaibaiMandragora(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.SaibaiMandragora), "Calls adds"); - class LeafDagger(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.LeafDagger), 3); - class PluckAndPrune(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PluckAndPrune), new AOEShapeCircle(6.84f)); - class TearyTwirl(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TearyTwirl), new AOEShapeCircle(6.84f)); - class HeirloomScream(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HeirloomScream), new AOEShapeCircle(6.84f)); - class PungentPirouette(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PungentPirouette), new AOEShapeCircle(6.84f)); - class Pollen(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Pollen), new AOEShapeCircle(6.84f)); class MandragoraStates : StateMachineBuilder @@ -66,10 +58,8 @@ public MandragoraStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 586, NameID = 7600)] -public class Mandragora : BossModule +public class Mandragora(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { - public Mandragora(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { } - protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); diff --git a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarSkatene.cs b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarSkatene.cs index 9d4d878eee..82d19d34b7 100644 --- a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarSkatene.cs +++ b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarSkatene.cs @@ -18,11 +18,8 @@ public enum AID : uint } class Chirp(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Chirp), new AOEShapeCircle(12.48f)); - class Tornado(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Tornado), 6); - class VoidCall(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.VoidCall), "Calls adds"); - class RecklessAbandon(BossModule module) : Components.SingleTargetDelayableCast(module, ActionID.MakeSpell(AID.RecklessAbandon)); class SkateneStates : StateMachineBuilder @@ -39,10 +36,8 @@ public SkateneStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 586, NameID = 7587)] -public class Skatene : BossModule +public class Skatene(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { - public Skatene(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { } - protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); diff --git a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarTotem.cs b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarTotem.cs index de4029a115..f71475cee8 100644 --- a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarTotem.cs +++ b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarTotem.cs @@ -33,16 +33,12 @@ public enum IconID : uint } class FlurryOfRage(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.FlurryOfRage), new AOEShapeCone(13.06f, 60.Degrees())); - class WaveOfMalice(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.WaveOfMalice), 5); - class WhorlOfFrenzy(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.WhorlOfFrenzy), new AOEShapeCircle(11.06f)); - class TheWardensVerdict(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TheWardensVerdict), new AOEShapeRect(45.06f, 2)); - class FlamesOfFury(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.FlamesOfFury), 10); -class FlamesOfFuryBait : Components.GenericBaitAway +class FlamesOfFuryBait(BossModule module) : Components.GenericBaitAway(module) { private bool targeted; private Actor? target; @@ -84,11 +80,8 @@ public override void AddHints(int slot, Actor actor, TextHints hints) } class FlamesOfFuryVoidzone(BossModule module) : Components.PersistentVoidzone(module, 10, m => m.Enemies(OID.FireVoidzone).Where(z => z.EventState != 7)); - class RaucousScritch(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RaucousScritch), new AOEShapeCone(8.42f, 30.Degrees())); - class Hurl(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Hurl), 6); - class Spin(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.Spin), new AOEShapeCone(9.42f, 60.Degrees()), (uint)OID.BonusAdd_AltarMatanga); class TotemStates : StateMachineBuilder @@ -111,10 +104,8 @@ public TotemStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 586, NameID = 7586)] -public class Totem : BossModule +public class Totem(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { - public Totem(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { } - protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); diff --git a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/Hati.cs b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/Hati.cs index 73da088c49..410f742d65 100644 --- a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/Hati.cs +++ b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/Hati.cs @@ -20,13 +20,9 @@ public enum AID : uint } class PolarRoar(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PolarRoar), new AOEShapeDonut(9, 40)); - class Hellstorm(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Hellstorm2), 10); - class Netherwind(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Netherwind), new AOEShapeRect(18, 2)); - class GlassyNova(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.GlassyNova), new AOEShapeRect(45.4f, 4)); - class BrainFreeze(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.BrainFreeze), new AOEShapeCircle(15.4f)); class HatiStates : StateMachineBuilder @@ -44,10 +40,8 @@ public HatiStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 586, NameID = 7590)] -public class Hati : BossModule +public class Hati(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { - public Hati(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { } - protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); diff --git a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/TheGreatGoldWhisker.cs b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/TheGreatGoldWhisker.cs index 8edadcd104..23ed8d6a0f 100644 --- a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/TheGreatGoldWhisker.cs +++ b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/TheGreatGoldWhisker.cs @@ -17,9 +17,7 @@ public enum AID : uint } class TripleTrident(BossModule module) : Components.SingleTargetDelayableCast(module, ActionID.MakeSpell(AID.TripleTrident)); - class FishOutOfWater(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.FishOutOfWater), "Spawns adds"); - class Tingle(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Tingle), new AOEShapeCircle(12.4f)); class TheGreatGoldWhiskerStates : StateMachineBuilder @@ -35,10 +33,8 @@ public TheGreatGoldWhiskerStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 586, NameID = 7599)] -public class TheGreatGoldWhisker : BossModule +public class TheGreatGoldWhisker(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { - public TheGreatGoldWhisker(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { } - protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); diff --git a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/TheOlderOne.cs b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/TheOlderOne.cs index 88b7c6108c..92b76cc6aa 100644 --- a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/TheOlderOne.cs +++ b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/TheOlderOne.cs @@ -43,31 +43,18 @@ public enum AID : uint } class MysticLight(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.MysticLight), new AOEShapeCone(45.06f, 30.Degrees())); - class MysticFlame(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.MysticFlame2), 7); - class MysticHeat(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.MysticHeat), new AOEShapeRect(41.72f, 1.5f)); - class SelfDetonate(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.SelfDetonate), new AOEShapeCircle(10.72f)); - class MysticLevin(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.MysticLevin)); - class MysticFlash(BossModule module) : Components.SingleTargetDelayableCast(module, ActionID.MakeSpell(AID.MysticFlash)); - class PluckAndPrune(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PluckAndPrune), new AOEShapeCircle(6.84f)); - class TearyTwirl(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TearyTwirl), new AOEShapeCircle(6.84f)); - class HeirloomScream(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HeirloomScream), new AOEShapeCircle(6.84f)); - class PungentPirouette(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PungentPirouette), new AOEShapeCircle(6.84f)); - class Pollen(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Pollen), new AOEShapeCircle(6.84f)); - class RaucousScritch(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RaucousScritch), new AOEShapeCone(8.42f, 30.Degrees())); - class Hurl(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Hurl), 6); - class Spin(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.Spin), new AOEShapeCone(9.42f, 60.Degrees()), (uint)OID.BonusAdd_AltarMatanga); class TheOlderOneStates : StateMachineBuilder @@ -94,10 +81,8 @@ public TheOlderOneStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 586, NameID = 7597)] -public class TheOlderOne : BossModule +public class TheOlderOne(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { - public TheOlderOne(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { } - protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); diff --git a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/TheWinged.cs b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/TheWinged.cs index 293ff17ca4..e43a2d4278 100644 --- a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/TheWinged.cs +++ b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/TheWinged.cs @@ -42,32 +42,22 @@ public enum AID : uint class Wingbeat(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Wingbeat), new AOEShapeCone(43.36f, 30.Degrees())); class WingbeatKB : Components.KnockbackFromCastTarget { - public WingbeatKB() : base(ActionID.MakeSpell(AID.Wingbeat), 20, false, 1, new AOEShapeCone(43.36f, 30.Degrees())) + public WingbeatKB(BossModule module) : base(module, ActionID.MakeSpell(AID.Wingbeat), 20, false, 1, new AOEShapeCone(43.36f, 30.Degrees())) { StopAtWall = true; } } class FeatherSquall(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.FeatherSquall2), 6); - class Pinion(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Pinion), new AOEShapeRect(40.5f, 1.5f)); - class Sideslip(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.Sideslip)); - class PluckAndPrune(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PluckAndPrune), new AOEShapeCircle(6.84f)); - class TearyTwirl(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TearyTwirl), new AOEShapeCircle(6.84f)); - class HeirloomScream(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HeirloomScream), new AOEShapeCircle(6.84f)); - class PungentPirouette(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PungentPirouette), new AOEShapeCircle(6.84f)); - class Pollen(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Pollen), new AOEShapeCircle(6.84f)); - class RaucousScritch(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RaucousScritch), new AOEShapeCone(8.42f, 30.Degrees())); - class Hurl(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Hurl), 6); - class Spin(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.Spin), new AOEShapeCone(9.42f, 60.Degrees()), (uint)OID.BonusAdd_AltarMatanga); class TheWingedStates : StateMachineBuilder @@ -94,10 +84,8 @@ public TheWingedStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 586, NameID = 7595)] -public class TheWinged : BossModule +public class TheWinged(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { - public TheWinged(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)) { } - protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); diff --git a/BossMod/Modules/Stormblood/Ultimate/UCOB/Hatch.cs b/BossMod/Modules/Stormblood/Ultimate/UCOB/Hatch.cs index a3cf1f88d1..525540fa0a 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UCOB/Hatch.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UCOB/Hatch.cs @@ -5,11 +5,16 @@ class Hatch : Components.CastCounter public bool Active = true; public int NumNeurolinkSpawns { get; private set; } public int NumTargetsAssigned { get; private set; } - private IReadOnlyList _orbs = ActorEnumeration.EmptyList; - private IReadOnlyList _neurolinks = ActorEnumeration.EmptyList; + private IReadOnlyList _orbs; + private IReadOnlyList _neurolinks; private BitMask _targets; - public Hatch() : base(ActionID.MakeSpell(AID.Hatch)) { KeepOnPhaseChange = true; } + public Hatch(BossModule module) : base(module, ActionID.MakeSpell(AID.Hatch)) + { + _orbs = module.Enemies(OID.Oviform); + _neurolinks = module.Enemies(OID.Neurolink); + KeepOnPhaseChange = true; + } public void Reset() { @@ -17,12 +22,6 @@ public void Reset() NumTargetsAssigned = NumCasts = 0; } - public override void Init(BossModule module) - { - _orbs = module.Enemies(OID.Oviform); - _neurolinks = module.Enemies(OID.Neurolink); - } - public override void AddHints(int slot, Actor actor, TextHints hints) { if (!Active) @@ -44,14 +43,14 @@ public override void DrawArenaBackground(int pcSlot, Actor pc) { if (Active) foreach (var o in _orbs.Where(o => !o.IsDead)) - arena.ZoneCircle(o.Position, 1, ArenaColor.AOE); + Arena.ZoneCircle(o.Position, 1, ArenaColor.AOE); } public override void DrawArenaForeground(int pcSlot, Actor pc) { if (Active) foreach (var neurolink in _neurolinks) - arena.AddCircle(neurolink.Position, 2, _targets[pcSlot] ? ArenaColor.Safe : ArenaColor.Danger); + Arena.AddCircle(neurolink.Position, 2, _targets[pcSlot] ? ArenaColor.Safe : ArenaColor.Danger); } public override void OnEventIcon(Actor actor, uint iconID) diff --git a/BossMod/Modules/Stormblood/Ultimate/UCOB/LiquidHell.cs b/BossMod/Modules/Stormblood/Ultimate/UCOB/LiquidHell.cs index 86f6424030..fd76d95fa2 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UCOB/LiquidHell.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UCOB/LiquidHell.cs @@ -1,12 +1,11 @@ namespace BossMod.Stormblood.Ultimate.UCOB; -class LiquidHell : Components.PersistentVoidzoneAtCastTarget +class LiquidHell(BossModule module) : Components.PersistentVoidzoneAtCastTarget(module, 6, ActionID.MakeSpell(AID.LiquidHell), m => m.Enemies(OID.VoidzoneLiquidHell).Where(z => z.EventState != 7), 1.3f) { - public LiquidHell() : base(6, ActionID.MakeSpell(AID.LiquidHell), m => m.Enemies(OID.VoidzoneLiquidHell).Where(z => z.EventState != 7), 1.3f) { } public void Reset() => NumCasts = 0; } class P1LiquidHell : LiquidHell { - public P1LiquidHell() { KeepOnPhaseChange = true; } + public P1LiquidHell(BossModule module) : base(module) { KeepOnPhaseChange = true; } } diff --git a/BossMod/Modules/Stormblood/Ultimate/UCOB/P1DeathSentence.cs b/BossMod/Modules/Stormblood/Ultimate/UCOB/P1DeathSentence.cs index e1936e9e2f..a110faa628 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UCOB/P1DeathSentence.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UCOB/P1DeathSentence.cs @@ -1,7 +1,7 @@ namespace BossMod.Stormblood.Ultimate.UCOB; // TODO: generalize to tankswap -class P1DeathSentence : BossComponent +class P1DeathSentence(BossModule module) : BossComponent(module) { private Actor? _caster; private ulong _targetId; diff --git a/BossMod/Modules/Stormblood/Ultimate/UCOB/P2BahamutsFavor.cs b/BossMod/Modules/Stormblood/Ultimate/UCOB/P2BahamutsFavor.cs index 2cb996c0fc..5272e049a2 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UCOB/P2BahamutsFavor.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UCOB/P2BahamutsFavor.cs @@ -1,13 +1,11 @@ namespace BossMod.Stormblood.Ultimate.UCOB; -class P2BahamutsFavorFireball : Components.UniformStackSpread +class P2BahamutsFavorFireball(BossModule module) : Components.UniformStackSpread(module, 4, 0, 1) { public Actor? Target; private BitMask _forbidden; private DateTime _activation; - public P2BahamutsFavorFireball() : base(4, 0, 1) { } - public void Show() { if (Target != null) @@ -39,7 +37,7 @@ public override void OnTethered(Actor source, ActorTetherInfo tether) if ((TetherID)tether.ID == TetherID.Fireball) { Target = WorldState.Actors.Find(tether.Target); - _activation = WorldState.FutureTime(5.1); + _activation = WorldState.FutureTime(5.1f); } } @@ -55,14 +53,12 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } // note: if player dies immediately after chain lightning cast, he won't get a status or have aoe cast; if he dies after status application, aoe will be triggered immediately -class P2BahamutsFavorChainLightning : Components.UniformStackSpread +class P2BahamutsFavorChainLightning(BossModule module) : Components.UniformStackSpread(module, 0, 5, alwaysShowSpreads: true) { private BitMask _pendingTargets; private DateTime _expectedStatuses; - public P2BahamutsFavorChainLightning() : base(0, 5, alwaysShowSpreads: true) { } - - public bool ActiveOrSkipped(BossModule module) => Active || _pendingTargets.Any() && WorldState.CurrentTime >= _expectedStatuses && Raid.WithSlot(true).IncludedInMask(_pendingTargets).All(ip => ip.Item2.IsDead); + public bool ActiveOrSkipped() => Active || _pendingTargets.Any() && WorldState.CurrentTime >= _expectedStatuses && Raid.WithSlot(true).IncludedInMask(_pendingTargets).All(ip => ip.Item2.IsDead); public override void OnStatusGain(Actor actor, ActorStatus status) { @@ -89,7 +85,7 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } } -class P2BahamutsFavorDeathstorm : BossComponent +class P2BahamutsFavorDeathstorm(BossModule module) : BossComponent(module) { public int NumDeathstorms { get; private set; } private List<(Actor player, DateTime expiration, bool cleansed)> _dooms = new(); @@ -106,7 +102,7 @@ public override void DrawArenaForeground(int pcSlot, Actor pc) { var doomOrder = _dooms.FindIndex(d => d.player == pc); if (doomOrder >= 0 && !_dooms[doomOrder].cleansed && doomOrder < _cleanses.Count) - arena.AddCircle(_cleanses[doomOrder].voidzone?.Position ?? _cleanses[doomOrder].predicted, 1, ArenaColor.Safe); + Arena.AddCircle(_cleanses[doomOrder].voidzone?.Position ?? _cleanses[doomOrder].predicted, 1, ArenaColor.Safe); } public override void OnActorCreated(Actor actor) diff --git a/BossMod/Modules/Stormblood/Ultimate/UCOB/P2Cauterize.cs b/BossMod/Modules/Stormblood/Ultimate/UCOB/P2Cauterize.cs index 01e64a9196..04e9929f1d 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UCOB/P2Cauterize.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UCOB/P2Cauterize.cs @@ -1,6 +1,6 @@ namespace BossMod.Stormblood.Ultimate.UCOB; -class P2Cauterize : Components.GenericAOEs +class P2Cauterize(BossModule module) : Components.GenericAOEs(module) { public int[] BaitOrder = new int[PartyState.MaxPartySize]; public int NumBaitsAssigned; @@ -27,8 +27,8 @@ public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (var d in DragonsForOrder(BaitOrder[pcSlot])) { - arena.Actor(d, ArenaColor.Object, true); - _shape.Outline(arena, d.Position, Angle.FromDirection(pc.Position - d.Position)); + Arena.Actor(d, ArenaColor.Object, true); + _shape.Outline(Arena, d.Position, Angle.FromDirection(pc.Position - d.Position)); } // TODO: safe spots } diff --git a/BossMod/Modules/Stormblood/Ultimate/UCOB/P2Heavensfall.cs b/BossMod/Modules/Stormblood/Ultimate/UCOB/P2Heavensfall.cs index 9643af686b..cc8390ccb1 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UCOB/P2Heavensfall.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UCOB/P2Heavensfall.cs @@ -1,16 +1,14 @@ namespace BossMod.Stormblood.Ultimate.UCOB; -class P2Heavensfall : Components.Knockback +class P2Heavensfall(BossModule module) : Components.Knockback(module, ActionID.MakeSpell(AID.Heavensfall), true) { - public P2Heavensfall() : base(ActionID.MakeSpell(AID.Heavensfall), true) { } - public override IEnumerable Sources(int slot, Actor actor) { yield return new(Module.Bounds.Center, 11); // TODO: activation } } -class P2HeavensfallPillar : Components.GenericAOEs +class P2HeavensfallPillar(BossModule module) : Components.GenericAOEs(module) { private AOEInstance? _aoe; @@ -45,9 +43,7 @@ class P2MeteorStream : Components.UniformStackSpread { public int NumCasts; - public P2MeteorStream() : base(0, 4, alwaysShowSpreads: true) { } - - public override void Init(BossModule module) + public P2MeteorStream(BossModule module) : base(module, 0, 4, alwaysShowSpreads: true) { AddSpreads(Raid.WithoutSlot(true), WorldState.FutureTime(5.6f)); } @@ -62,14 +58,12 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } } -class P2HeavensfallDalamudDive : Components.GenericBaitAway +class P2HeavensfallDalamudDive(BossModule module) : Components.GenericBaitAway(module, ActionID.MakeSpell(AID.DalamudDive), true, true) { - private Actor? _target; + private Actor? _target = module.WorldState.Actors.Find(module.PrimaryActor.TargetID); private static readonly AOEShapeCircle _shape = new(5); - public P2HeavensfallDalamudDive() : base(ActionID.MakeSpell(AID.DalamudDive), true, true) { } - public void Show() { if (_target != null) @@ -77,9 +71,4 @@ public void Show() CurrentBaits.Add(new(_target, _target, _shape)); } } - - public override void Init(BossModule module) - { - _target = WorldState.Actors.Find(Module.PrimaryActor.TargetID); - } } diff --git a/BossMod/Modules/Stormblood/Ultimate/UCOB/P2Ravensbeak.cs b/BossMod/Modules/Stormblood/Ultimate/UCOB/P2Ravensbeak.cs index 65cb7d33f5..50709f32c9 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UCOB/P2Ravensbeak.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UCOB/P2Ravensbeak.cs @@ -1,7 +1,7 @@ namespace BossMod.Stormblood.Ultimate.UCOB; // TODO: generalize to tankswap -class P2Ravensbeak : BossComponent +class P2Ravensbeak(BossModule module) : BossComponent(module) { private Actor? _caster; private ulong _targetId; diff --git a/BossMod/Modules/Stormblood/Ultimate/UCOB/P3BlackfireTrio.cs b/BossMod/Modules/Stormblood/Ultimate/UCOB/P3BlackfireTrio.cs index 239286a0e2..f0ffe985d4 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UCOB/P3BlackfireTrio.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UCOB/P3BlackfireTrio.cs @@ -1,6 +1,6 @@ namespace BossMod.Stormblood.Ultimate.UCOB; -class P3BlackfireTrio : BossComponent +class P3BlackfireTrio(BossModule module) : BossComponent(module) { private Actor? _nael; @@ -8,7 +8,7 @@ class P3BlackfireTrio : BossComponent public override void DrawArenaForeground(int pcSlot, Actor pc) { - arena.Actor(_nael, ArenaColor.Object, true); + Arena.Actor(_nael, ArenaColor.Object, true); } public override void OnActorPlayActionTimelineEvent(Actor actor, ushort id) @@ -22,9 +22,7 @@ public override void OnActorPlayActionTimelineEvent(Actor actor, ushort id) class P3ThermionicBeam : Components.UniformStackSpread { - public P3ThermionicBeam() : base(4, 0, 8) { } - - public override void Init(BossModule module) + public P3ThermionicBeam(BossModule module) : base(module, 4, 0, 8) { var target = Raid.Player(); // note: target is random if (target != null) @@ -38,10 +36,8 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } } -class P3MegaflareTower : Components.CastTowers +class P3MegaflareTower(BossModule module) : Components.CastTowers(module, ActionID.MakeSpell(AID.MegaflareTower), 3) { - public P3MegaflareTower() : base(ActionID.MakeSpell(AID.MegaflareTower), 3) { } - public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.MegaflareStack) @@ -54,10 +50,8 @@ public override void OnEventIcon(Actor actor, uint iconID) } } -class P3MegaflareStack : Components.UniformStackSpread +class P3MegaflareStack(BossModule module) : Components.UniformStackSpread(module, 5, 0, 4, 4) { - public P3MegaflareStack() : base(5, 0, 4, 4) { } - public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.MegaflareStack) diff --git a/BossMod/Modules/Stormblood/Ultimate/UCOB/P3EarthShaker.cs b/BossMod/Modules/Stormblood/Ultimate/UCOB/P3EarthShaker.cs index 8ddce25651..7aba7e105b 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UCOB/P3EarthShaker.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UCOB/P3EarthShaker.cs @@ -1,16 +1,14 @@ namespace BossMod.Stormblood.Ultimate.UCOB; -class P3EarthShaker : Components.GenericBaitAway +class P3EarthShaker(BossModule module) : Components.GenericBaitAway(module, ActionID.MakeSpell(AID.EarthShakerAOE)) { private List _futureBaits = new(); private static readonly AOEShapeCone _shape = new(60, 45.Degrees()); - public P3EarthShaker() : base(ActionID.MakeSpell(AID.EarthShakerAOE)) { } - public override void OnEventIcon(Actor actor, uint iconID) { - if (iconID == (uint)IconID.Earthshaker && module.Enemies(OID.BahamutPrime).FirstOrDefault() is var source && source != null) + if (iconID == (uint)IconID.Earthshaker && Module.Enemies(OID.BahamutPrime).FirstOrDefault() is var source && source != null) { var list = CurrentBaits.Count < 4 ? CurrentBaits : _futureBaits; list.Add(new(source, actor, _shape)); @@ -28,21 +26,14 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } } -class P3EarthShakerVoidzone : Components.GenericAOEs +class P3EarthShakerVoidzone(BossModule module) : Components.GenericAOEs(module, default, "GTFO from voidzone!") { - private IReadOnlyList _voidzones = ActorEnumeration.EmptyList; + private IReadOnlyList _voidzones = module.Enemies(OID.VoidzoneEarthShaker); private List _predicted = new(); private BitMask _targets; private static readonly AOEShapeCircle _shape = new(5); // TODO: verify radius - public P3EarthShakerVoidzone() : base(default, "GTFO from voidzone!") { } - - public override void Init(BossModule module) - { - _voidzones = module.Enemies(OID.VoidzoneEarthShaker); - } - public override IEnumerable ActiveAOEs(int slot, Actor actor) { foreach (var z in _voidzones.Where(z => z.EventState != 7)) diff --git a/BossMod/Modules/Stormblood/Ultimate/UCOB/P3FellruinTrio.cs b/BossMod/Modules/Stormblood/Ultimate/UCOB/P3FellruinTrio.cs index 8e0850111e..0b2cfccd86 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UCOB/P3FellruinTrio.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UCOB/P3FellruinTrio.cs @@ -1,16 +1,9 @@ namespace BossMod.Stormblood.Ultimate.UCOB; -class P3AethericProfusion : Components.CastCounter +class P3AethericProfusion(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.AethericProfusion)) { public bool Active; - private IReadOnlyList _neurolinks = ActorEnumeration.EmptyList; - - public P3AethericProfusion() : base(ActionID.MakeSpell(AID.AethericProfusion)) { } - - public override void Init(BossModule module) - { - _neurolinks = module.Enemies(OID.Neurolink); - } + private IReadOnlyList _neurolinks = module.Enemies(OID.Neurolink); public override void AddHints(int slot, Actor actor, TextHints hints) { @@ -21,6 +14,6 @@ public override void AddHints(int slot, Actor actor, TextHints hints) public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (var neurolink in _neurolinks) - arena.AddCircle(neurolink.Position, 2, ArenaColor.Safe); + Arena.AddCircle(neurolink.Position, 2, ArenaColor.Safe); } } diff --git a/BossMod/Modules/Stormblood/Ultimate/UCOB/P3GrandOctet.cs b/BossMod/Modules/Stormblood/Ultimate/UCOB/P3GrandOctet.cs index 863e80bc6a..71b79af208 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UCOB/P3GrandOctet.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UCOB/P3GrandOctet.cs @@ -1,6 +1,6 @@ namespace BossMod.Stormblood.Ultimate.UCOB; -class P3GrandOctet : Components.GenericAOEs +class P3GrandOctet(BossModule module) : Components.GenericAOEs(module) { public List Casters = new(); private Actor? _nael; @@ -35,15 +35,15 @@ public override void DrawArenaForeground(int pcSlot, Actor pc) { // draw safespot if (NumCasts == 0 && AOEs.Count <= 1 && _initialSafespot != default) - arena.AddCircle(_initialSafespot, 1, ArenaColor.Safe); + Arena.AddCircle(_initialSafespot, 1, ArenaColor.Safe); // draw bait var order = _baitOrder[pcSlot]; if (order >= NextBaitOrder && order <= Casters.Count) { var source = Casters[order - 1]; - arena.Actor(source, ArenaColor.Object, true); - BaitShape(order).Outline(arena, source.Position, Angle.FromDirection(pc.Position - source.Position)); + Arena.Actor(source, ArenaColor.Object, true); + BaitShape(order).Outline(Arena, source.Position, Angle.FromDirection(pc.Position - source.Position)); } } @@ -101,21 +101,21 @@ public override void OnActorPlayActionTimelineEvent(Actor actor, ushort id) if ((OID)actor.OID == OID.NaelDeusDarnus && id == 0x1E43) { _nael = actor; - InitIfReady(module); + InitIfReady(); } else if ((OID)actor.OID == OID.Twintania && id == 0x1E44) { _twin = actor; - InitIfReady(module); + InitIfReady(); } else if ((OID)actor.OID == OID.BahamutPrime && id == 0x1E43) { _baha = actor; - InitIfReady(module); + InitIfReady(); } } - private void InitIfReady(BossModule module) + private void InitIfReady() { if (_nael == null || _twin == null || _baha == null) return; diff --git a/BossMod/Modules/Stormblood/Ultimate/UCOB/P3HeavensfallTrio.cs b/BossMod/Modules/Stormblood/Ultimate/UCOB/P3HeavensfallTrio.cs index 7f4f953c5b..f612bc7243 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UCOB/P3HeavensfallTrio.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UCOB/P3HeavensfallTrio.cs @@ -1,6 +1,6 @@ namespace BossMod.Stormblood.Ultimate.UCOB; -class P3HeavensfallTrio : BossComponent +class P3HeavensfallTrio(BossModule module) : BossComponent(module) { private Actor? _nael; private Actor? _twin; @@ -14,10 +14,10 @@ class P3HeavensfallTrio : BossComponent public override void DrawArenaForeground(int pcSlot, Actor pc) { - arena.Actor(_nael, ArenaColor.Object, true); + Arena.Actor(_nael, ArenaColor.Object, true); var safespot = _safeSpots[pcSlot]; if (safespot != default) - arena.AddCircle(safespot, 1, ArenaColor.Safe); + Arena.AddCircle(safespot, 1, ArenaColor.Safe); } public override void OnActorPlayActionTimelineEvent(Actor actor, ushort id) @@ -25,21 +25,21 @@ public override void OnActorPlayActionTimelineEvent(Actor actor, ushort id) if ((OID)actor.OID == OID.NaelDeusDarnus && id == 0x1E43) { _nael = actor; - InitIfReady(module); + InitIfReady(); } else if ((OID)actor.OID == OID.Twintania && id == 0x1E44) { _twin = actor; - InitIfReady(module); + InitIfReady(); } else if ((OID)actor.OID == OID.BahamutPrime && id == 0x1E43) { _baha = actor; - InitIfReady(module); + InitIfReady(); } } - private void InitIfReady(BossModule module) + private void InitIfReady() { if (_nael == null || _twin == null || _baha == null) return; @@ -65,17 +65,15 @@ private void InitIfReady(BossModule module) } } -class P3HeavensfallTowers : Components.CastTowers +class P3HeavensfallTowers(BossModule module) : Components.CastTowers(module, ActionID.MakeSpell(AID.MegaflareTower), 3) { - public P3HeavensfallTowers() : base(ActionID.MakeSpell(AID.MegaflareTower), 3) { } - public override void OnCastStarted(Actor caster, ActorCastInfo spell) { base.OnCastStarted(caster, spell); if (spell.Action == WatchedAction && Towers.Count == 8) { - var nael = module.Enemies(OID.NaelDeusDarnus).FirstOrDefault(); + var nael = Module.Enemies(OID.NaelDeusDarnus).FirstOrDefault(); if (nael != null) { var dirToNael = Angle.FromDirection(nael.Position - Module.Bounds.Center); diff --git a/BossMod/Modules/Stormblood/Ultimate/UCOB/P3QuickmarchTrio.cs b/BossMod/Modules/Stormblood/Ultimate/UCOB/P3QuickmarchTrio.cs index 6f35267be4..26c7dfc827 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UCOB/P3QuickmarchTrio.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UCOB/P3QuickmarchTrio.cs @@ -1,6 +1,6 @@ namespace BossMod.Stormblood.Ultimate.UCOB; -class P3QuickmarchTrio : BossComponent +class P3QuickmarchTrio(BossModule module) : BossComponent(module) { private Actor? _relNorth; private WPos[] _safeSpots = new WPos[PartyState.MaxPartySize]; @@ -9,10 +9,10 @@ class P3QuickmarchTrio : BossComponent public override void DrawArenaForeground(int pcSlot, Actor pc) { - arena.Actor(_relNorth, ArenaColor.Object, true); + Arena.Actor(_relNorth, ArenaColor.Object, true); var safespot = _safeSpots[pcSlot]; if (safespot != default) - arena.AddCircle(safespot, 1, ArenaColor.Safe); + Arena.AddCircle(safespot, 1, ArenaColor.Safe); } public override void OnActorPlayActionTimelineEvent(Actor actor, ushort id) @@ -34,21 +34,16 @@ public override void OnActorPlayActionTimelineEvent(Actor actor, ushort id) } class P3TwistingDive(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TwistingDive), new AOEShapeRect(60, 4)); - class P3LunarDive(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.LunarDive), new AOEShapeRect(60, 4)); - class P3MegaflareDive(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.MegaflareDive), new AOEShapeRect(60, 6)); - class P3Twister(BossModule module) : Components.ImmediateTwister(module, 2, (uint)OID.VoidzoneTwister, 1.4f); // TODO: verify radius class P3MegaflareSpreadStack : Components.UniformStackSpread { private BitMask _stackTargets; - public P3MegaflareSpreadStack() : base(5, 5, 3, 3, alwaysShowSpreads: true) { } - - public override void Init(BossModule module) - { + public P3MegaflareSpreadStack(BossModule module) : base(module, 5, 5, 3, 3, alwaysShowSpreads: true) +{ AddSpreads(Raid.WithoutSlot(true), WorldState.FutureTime(2.6f)); } @@ -76,5 +71,4 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } class P3MegaflarePuddle(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.MegaflarePuddle), 6); - class P3TempestWing(BossModule module) : Components.TankbusterTether(module, ActionID.MakeSpell(AID.TempestWing), (uint)TetherID.TempestWing, 5); diff --git a/BossMod/Modules/Stormblood/Ultimate/UCOB/P3SeventhUmbralEra.cs b/BossMod/Modules/Stormblood/Ultimate/UCOB/P3SeventhUmbralEra.cs index b5332b58ee..dc81d1acfa 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UCOB/P3SeventhUmbralEra.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UCOB/P3SeventhUmbralEra.cs @@ -1,12 +1,8 @@ namespace BossMod.Stormblood.Ultimate.UCOB; -class P3SeventhUmbralEra : Components.Knockback +class P3SeventhUmbralEra(BossModule module) : Components.Knockback(module, ActionID.MakeSpell(AID.SeventhUmbralEra), true) { - private DateTime _activation; - - public P3SeventhUmbralEra() : base(ActionID.MakeSpell(AID.SeventhUmbralEra), true) { } - - public override void Init(BossModule module) => _activation = WorldState.FutureTime(5.3f); + private DateTime _activation = module.WorldState.FutureTime(5.3f); public override IEnumerable Sources(int slot, Actor actor) { @@ -15,5 +11,4 @@ public override IEnumerable Sources(int slot, Actor actor) } class P3CalamitousFlame(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.CalamitousFlame)); - class P3CalamitousBlaze(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.CalamitousBlaze)); diff --git a/BossMod/Modules/Stormblood/Ultimate/UCOB/P3TenstrikeTrio.cs b/BossMod/Modules/Stormblood/Ultimate/UCOB/P3TenstrikeTrio.cs deleted file mode 100644 index da303f68a8..0000000000 --- a/BossMod/Modules/Stormblood/Ultimate/UCOB/P3TenstrikeTrio.cs +++ /dev/null @@ -1,3 +0,0 @@ -namespace BossMod.Stormblood.Ultimate.UCOB; - -class P3TenstrikeTrio : BossComponent { } diff --git a/BossMod/Modules/Stormblood/Ultimate/UCOB/P5AhkMorn.cs b/BossMod/Modules/Stormblood/Ultimate/UCOB/P5AhkMorn.cs index 3db88de25f..bb14de71ed 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UCOB/P5AhkMorn.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UCOB/P5AhkMorn.cs @@ -1,9 +1,7 @@ namespace BossMod.Stormblood.Ultimate.UCOB; -class P5AhkMorn : Components.CastSharedTankbuster +class P5AhkMorn(BossModule module) : Components.CastSharedTankbuster(module, ActionID.MakeSpell(AID.AkhMorn), 4) { - public P5AhkMorn() : base(ActionID.MakeSpell(AID.AkhMorn), 4) { } - // cast is only a first hit, don't deactivate public override void OnCastFinished(Actor caster, ActorCastInfo spell) { } diff --git a/BossMod/Modules/Stormblood/Ultimate/UCOB/P5Enrage.cs b/BossMod/Modules/Stormblood/Ultimate/UCOB/P5Enrage.cs index 7f24f86b89..a3f1989f1b 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UCOB/P5Enrage.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UCOB/P5Enrage.cs @@ -1,11 +1,9 @@ namespace BossMod.Stormblood.Ultimate.UCOB; -class P5Enrage : Components.UniformStackSpread +class P5Enrage(BossModule module) : Components.UniformStackSpread(module, 0, 4) { public int NumCasts; - public P5Enrage() : base(0, 4) { } - public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.Enrage) diff --git a/BossMod/Modules/Stormblood/Ultimate/UCOB/P5Exaflare.cs b/BossMod/Modules/Stormblood/Ultimate/UCOB/P5Exaflare.cs index 37ddc860d8..c193a7d9cd 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UCOB/P5Exaflare.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UCOB/P5Exaflare.cs @@ -1,9 +1,7 @@ namespace BossMod.Stormblood.Ultimate.UCOB; -class P5Exaflare : Components.Exaflare +class P5Exaflare(BossModule module) : Components.Exaflare(module, 6) { - public P5Exaflare() : base(6) { } - public void Reset() => NumCasts = 0; public override void OnCastStarted(Actor caster, ActorCastInfo spell) @@ -26,7 +24,7 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) return; } - AdvanceLine(module, Lines[index], caster.Position); + AdvanceLine(Lines[index], caster.Position); if (Lines[index].ExplosionsLeft == 0) Lines.RemoveAt(index); } diff --git a/BossMod/Modules/Stormblood/Ultimate/UCOB/P5Teraflare.cs b/BossMod/Modules/Stormblood/Ultimate/UCOB/P5Teraflare.cs index 619140b3e3..4e65304098 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UCOB/P5Teraflare.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UCOB/P5Teraflare.cs @@ -1,11 +1,9 @@ namespace BossMod.Stormblood.Ultimate.UCOB; -class P5Teraflare : Components.CastCounter +class P5Teraflare(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.Teraflare)) { public bool DownForTheCountAssigned; - public P5Teraflare() : base(ActionID.MakeSpell(AID.Teraflare)) { } - public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.DownForTheCount) diff --git a/BossMod/Modules/Stormblood/Ultimate/UCOB/Quote.cs b/BossMod/Modules/Stormblood/Ultimate/UCOB/Quote.cs index 7e1c416331..aca50b3fea 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UCOB/Quote.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UCOB/Quote.cs @@ -1,6 +1,6 @@ namespace BossMod.Stormblood.Ultimate.UCOB; -class Quote : BossComponent +class Quote(BossModule module) : BossComponent(module) { public Actor? Source; public List PendingMechanics = new(); @@ -22,7 +22,7 @@ public override void AddGlobalHints(GlobalHints hints) } } - public override void OnActorNpcYell(BossModule module, Actor actor, ushort id) + public override void OnActorNpcYell(Actor actor, ushort id) { List aids = id switch { @@ -60,9 +60,9 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } } -class QuoteIronChariotLunarDynamo : Components.GenericAOEs +class QuoteIronChariotLunarDynamo(BossModule module) : Components.GenericAOEs(module) { - private Quote? _quote; + private Quote? _quote = module.FindComponent(); private static readonly AOEShapeCircle _shapeChariot = new(8.55f); private static readonly AOEShapeDonut _shapeDynamo = new(6, 22); // TODO: verify inner radius @@ -78,17 +78,11 @@ public override IEnumerable ActiveAOEs(int slot, Actor actor) if (shape != null && _quote?.Source != null) yield return new(shape, _quote.Source.Position, default, _quote.NextActivation); } - - public override void Init(BossModule module) => _quote = module.FindComponent(); } -class QuoteThermionicBeam : Components.UniformStackSpread +class QuoteThermionicBeam(BossModule module) : Components.UniformStackSpread(module, 4, 0, 8) { - private Quote? _quote; - - public QuoteThermionicBeam() : base(4, 0, 8) { } - - public override void Init(BossModule module) => _quote = module.FindComponent(); + private Quote? _quote = module.FindComponent(); public override void Update() { @@ -97,17 +91,13 @@ public override void Update() AddStack(target, _quote!.NextActivation); else if (!stackImminent && Stacks.Count > 0) Stacks.Clear(); - base.Update(module); + base.Update(); } } -class QuoteRavenDive : Components.UniformStackSpread +class QuoteRavenDive(BossModule module) : Components.UniformStackSpread(module, 0, 3, alwaysShowSpreads: true) { - private Quote? _quote; - - public QuoteRavenDive() : base(0, 3, alwaysShowSpreads: true) { } - - public override void Init(BossModule module) => _quote = module.FindComponent(); + private Quote? _quote = module.FindComponent(); public override void Update() { @@ -116,17 +106,13 @@ public override void Update() AddSpreads(Raid.WithoutSlot(true), _quote!.NextActivation); else if (!spreadImminent && Spreads.Count > 0) Spreads.Clear(); - base.Update(module); + base.Update(); } } -class QuoteMeteorStream : Components.UniformStackSpread +class QuoteMeteorStream(BossModule module) : Components.UniformStackSpread(module, 0, 4, alwaysShowSpreads: true) { - private Quote? _quote; - - public QuoteMeteorStream() : base(0, 4, alwaysShowSpreads: true) { } - - public override void Init(BossModule module) => _quote = module.FindComponent(); + private Quote? _quote = module.FindComponent(); public override void Update() { @@ -135,24 +121,20 @@ public override void Update() AddSpreads(Raid.WithoutSlot(true), _quote!.NextActivation); else if (!spreadImminent && Spreads.Count > 0) Spreads.Clear(); - base.Update(module); + base.Update(); } } -class QuoteDalamudDive : Components.GenericBaitAway +class QuoteDalamudDive(BossModule module) : Components.GenericBaitAway(module, ActionID.MakeSpell(AID.DalamudDive), true, true) { - private Quote? _quote; + private Quote? _quote = module.FindComponent(); private static readonly AOEShapeCircle _shape = new(5); - public QuoteDalamudDive() : base(ActionID.MakeSpell(AID.DalamudDive), true, true) { } - - public override void Init(BossModule module) => _quote = module.FindComponent(); - public override void Update() { bool imminent = _quote != null && _quote.PendingMechanics.Count > 0 && _quote.PendingMechanics[0] == AID.DalamudDive; - if (imminent && CurrentBaits.Count == 0 && module.Enemies(OID.NaelDeusDarnus).FirstOrDefault() is var source && WorldState.Actors.Find(source?.TargetID ?? 0) is var target && target != null) + if (imminent && CurrentBaits.Count == 0 && Module.Enemies(OID.NaelDeusDarnus).FirstOrDefault() is var source && WorldState.Actors.Find(source?.TargetID ?? 0) is var target && target != null) CurrentBaits.Add(new(target, target, _shape)); else if (!imminent && CurrentBaits.Count > 0) CurrentBaits.Clear(); diff --git a/BossMod/Modules/Stormblood/Ultimate/UCOB/Twister.cs b/BossMod/Modules/Stormblood/Ultimate/UCOB/Twister.cs index ad9f1a28b7..fce8e55e3d 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UCOB/Twister.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UCOB/Twister.cs @@ -4,5 +4,5 @@ class Twister(BossModule module) : Components.CastTwister(module, 2, (uint)OID.V class P1Twister : Twister { - public P1Twister() { KeepOnPhaseChange = true; } + public P1Twister(BossModule module) : base(module) { KeepOnPhaseChange = true; } } diff --git a/BossMod/Modules/Stormblood/Ultimate/UCOB/UCOB.cs b/BossMod/Modules/Stormblood/Ultimate/UCOB/UCOB.cs index 9b7efdf971..14e01b31d2 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UCOB/UCOB.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UCOB/UCOB.cs @@ -1,17 +1,13 @@ namespace BossMod.Stormblood.Ultimate.UCOB; class P1Plummet(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.Plummet), new AOEShapeCone(12, 60.Degrees()), (uint)OID.Twintania); - class P1Fireball(BossModule module) : Components.StackWithIcon(module, (uint)IconID.Fireball, ActionID.MakeSpell(AID.Fireball), 4, 5.3f, 4); - class P2BahamutsClaw(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.BahamutsClaw)); - class P3FlareBreath(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.FlareBreath), new AOEShapeCone(29.2f, 45.Degrees()), (uint)OID.BahamutPrime); // TODO: verify angle - class P5MornAfah(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.MornAfah), 4, 8); // TODO: verify radius [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.Twintania, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 280)] -public class UCOB : BossModule +public class UCOB(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(0, 0), 21)) { private Actor? _nael; private Actor? _bahamutPrime; @@ -20,8 +16,6 @@ public class UCOB : BossModule public Actor? Nael() => _nael; public Actor? BahamutPrime() => _bahamutPrime; - public UCOB(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(0, 0), 21)) { } - protected override void UpdateModule() { // TODO: this is an ugly hack, think how multi-actor fights can be implemented without it... diff --git a/BossMod/Modules/Stormblood/Ultimate/UCOB/UCOBConfig.cs b/BossMod/Modules/Stormblood/Ultimate/UCOB/UCOBConfig.cs index 45cd26f7d3..83aca70a2f 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UCOB/UCOBConfig.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UCOB/UCOBConfig.cs @@ -1,10 +1,8 @@ namespace BossMod.Stormblood.Ultimate.UCOB; [ConfigDisplay(Order = 0x200, Parent = typeof(StormbloodConfig))] -public class UCOBConfig : CooldownPlanningConfigNode +public class UCOBConfig() : CooldownPlanningConfigNode(70) { - public UCOBConfig() : base(70) { } - [PropertyDisplay("P3 Quickmarch/Heavensfall Trio: safespot assignments (assuming bahamut is relative north/up, group L goes left; L1/R1 closest to bosses)")] [GroupDetails(["L1", "L2", "L3", "L4", "R1", "R2", "R3", "R4"])] [GroupPreset("Hector: THMR", [0, 4, 1, 5, 2, 6, 3, 7])] diff --git a/BossMod/Modules/Stormblood/Ultimate/UCOB/UCOBStates.cs b/BossMod/Modules/Stormblood/Ultimate/UCOB/UCOBStates.cs index 561f91aab6..c6cc313971 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UCOB/UCOBStates.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UCOB/UCOBStates.cs @@ -1,6 +1,6 @@ namespace BossMod.Stormblood.Ultimate.UCOB; -class P2BlockTransition : BossComponent { } +class P2BlockTransition(BossModule module) : BossComponent(module); class UCOBStates : StateMachineBuilder { @@ -261,7 +261,7 @@ private void P2BahamutsFavor(uint id, float delay) { // there are 24 iceballs total; first 4 groups of 4 are 2s apart, and have fireball after each one; then the last 8 are fired in quick succession (1s apart) ActorCast(id, _module.Nael, AID.BahamutsFavor, delay, 3, true); - ComponentCondition(id + 0x10, 8, comp => comp.ActiveOrSkipped(Module)) + ComponentCondition(id + 0x10, 8, comp => comp.ActiveOrSkipped()) .ActivateOnEnter() .ActivateOnEnter(); ComponentCondition(id + 0x11, 0.1f, comp => comp.PendingMechanics.Count > 0); // first quote @@ -305,7 +305,7 @@ private void P2BahamutsFavor(uint id, float delay) .DeactivateOnExit(); // +0.6s: iceball 8 - ComponentCondition(id + 0x200, 2.5f, comp => comp.ActiveOrSkipped(Module)) + ComponentCondition(id + 0x200, 2.5f, comp => comp.ActiveOrSkipped()) .ActivateOnEnter(); ComponentCondition(id + 0x210, 1.0f, comp => !comp.Active, "Fireball 2") .DeactivateOnExit(); @@ -327,7 +327,7 @@ private void P2BahamutsFavor(uint id, float delay) ComponentCondition(id + 0x303, 2.2f, comp => comp.NumCasts > 0); ComponentCondition(id + 0x310, 1.2f, comp => comp.Casters.Count > 0); // wings of salvation 2 bait // +2.1s: iceball 9 - ComponentCondition(id + 0x312, 2.8f, comp => comp.ActiveOrSkipped(Module)) + ComponentCondition(id + 0x312, 2.8f, comp => comp.ActiveOrSkipped()) .ActivateOnEnter(); ComponentCondition(id + 0x313, 0.2f, comp => comp.NumCasts > 1); ComponentCondition(id + 0x320, 1.2f, comp => comp.Casters.Count > 0); // wings of salvation 3 bait @@ -361,7 +361,7 @@ private void P2BahamutsFavor(uint id, float delay) .DeactivateOnExit() .DeactivateOnExit(); // +0.9s: iceball 16 - ComponentCondition(id + 0x530, 1.4f, comp => comp.ActiveOrSkipped(Module)) + ComponentCondition(id + 0x530, 1.4f, comp => comp.ActiveOrSkipped()) .ActivateOnEnter(); ComponentCondition(id + 0x540, 2.1f, comp => !comp.Active, "Fireball 4") .DeactivateOnExit(); diff --git a/BossMod/Modules/Stormblood/Ultimate/UWU/P1FeatherRain.cs b/BossMod/Modules/Stormblood/Ultimate/UWU/P1FeatherRain.cs index c91b82a0b0..ccb8e1639f 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UWU/P1FeatherRain.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UWU/P1FeatherRain.cs @@ -1,7 +1,7 @@ namespace BossMod.Stormblood.Ultimate.UWU; // predict puddles under all players until actual casts start -class P1FeatherRain : Components.GenericAOEs +class P1FeatherRain(BossModule module) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.FeatherRain), "GTFO from puddle!") { private List _predicted = new(); private List _casters = new(); @@ -12,8 +12,6 @@ class P1FeatherRain : Components.GenericAOEs public bool CastsPredicted => _predicted.Count > 0; public bool CastsActive => _casters.Count > 0; - public P1FeatherRain() : base(ActionID.MakeSpell(AID.FeatherRain), "GTFO from puddle!") { } - public override IEnumerable ActiveAOEs(int slot, Actor actor) { foreach (var p in _predicted) diff --git a/BossMod/Modules/Stormblood/Ultimate/UWU/P1Mesohigh.cs b/BossMod/Modules/Stormblood/Ultimate/UWU/P1Mesohigh.cs index cdb41ab54e..8fc98166af 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UWU/P1Mesohigh.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UWU/P1Mesohigh.cs @@ -1,27 +1,20 @@ namespace BossMod.Stormblood.Ultimate.UWU; // TODO :implement hints... -class P1Mesohigh : Components.CastCounter +class P1Mesohigh(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.Mesohigh)) { - private IReadOnlyList _sisters = ActorEnumeration.EmptyList; + private IReadOnlyList _sisters = module.Enemies(OID.GarudaSister); private static readonly float _radius = 3; - public P1Mesohigh() : base(ActionID.MakeSpell(AID.Mesohigh)) { } - - public override void Init(BossModule module) - { - _sisters = module.Enemies(OID.GarudaSister); - } - public override void DrawArenaForeground(int pcSlot, Actor pc) { - foreach (var s in EnumerateTetherSources(module)) + foreach (var s in EnumerateTetherSources()) { var tetherTarget = WorldState.Actors.Find(s.Tether.Target); if (tetherTarget != null) { - arena.AddLine(s.Position, tetherTarget.Position, ArenaColor.Danger); - arena.AddCircle(tetherTarget.Position, _radius, ArenaColor.Danger); + Arena.AddLine(s.Position, tetherTarget.Position, ArenaColor.Danger); + Arena.AddCircle(tetherTarget.Position, _radius, ArenaColor.Danger); } } } @@ -31,7 +24,7 @@ public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot return _sisters.Any(s => s.Tether.Target == player.InstanceID) ? PlayerPriority.Danger : PlayerPriority.Normal; } - private IEnumerable EnumerateTetherSources(BossModule module) + private IEnumerable EnumerateTetherSources() { foreach (var s in _sisters.Tethered(TetherID.Mesohigh)) yield return s; diff --git a/BossMod/Modules/Stormblood/Ultimate/UWU/P1Plumes.cs b/BossMod/Modules/Stormblood/Ultimate/UWU/P1Plumes.cs index c8743f8ece..632f632710 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UWU/P1Plumes.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UWU/P1Plumes.cs @@ -1,24 +1,17 @@ namespace BossMod.Stormblood.Ultimate.UWU; -class P1Plumes : BossComponent +class P1Plumes(BossModule module) : BossComponent(module) { - private IReadOnlyList _razor = ActorEnumeration.EmptyList; - private IReadOnlyList _spiny = ActorEnumeration.EmptyList; - private IReadOnlyList _satin = ActorEnumeration.EmptyList; + private IReadOnlyList _razor = module.Enemies(OID.RazorPlume); + private IReadOnlyList _spiny = module.Enemies(OID.SpinyPlume); + private IReadOnlyList _satin = module.Enemies(OID.SatinPlume); public bool Active => _razor.Any(p => p.IsTargetable) || _spiny.Any(p => p.IsTargetable) || _satin.Any(p => p.IsTargetable); - public override void Init(BossModule module) - { - _razor = module.Enemies(OID.RazorPlume); - _spiny = module.Enemies(OID.SpinyPlume); - _satin = module.Enemies(OID.SatinPlume); - } - public override void DrawArenaForeground(int pcSlot, Actor pc) { - arena.Actors(_razor, ArenaColor.Enemy); - arena.Actors(_spiny, ArenaColor.Enemy); - arena.Actors(_satin, ArenaColor.Enemy); + Arena.Actors(_razor, ArenaColor.Enemy); + Arena.Actors(_spiny, ArenaColor.Enemy); + Arena.Actors(_satin, ArenaColor.Enemy); } } diff --git a/BossMod/Modules/Stormblood/Ultimate/UWU/P1WickedWheel.cs b/BossMod/Modules/Stormblood/Ultimate/UWU/P1WickedWheel.cs index cc2de1f5a3..194d12e446 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UWU/P1WickedWheel.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UWU/P1WickedWheel.cs @@ -2,7 +2,7 @@ // wicked wheel is used in phase 1 (depending on 'woken' status, it can be used with followup wicked tornado - this can happen with low dps late in the phase) - it is triggered by cast start // it is also used during phase 4 as part of some mechanics (ultimate predation, ???) - in such case we typically want to show it earlier (based on PATE) -class WickedWheel : Components.GenericAOEs +class WickedWheel(BossModule module) : Components.GenericAOEs(module) { public DateTime AwakenedResolve { get; private set; } public List<(Actor source, AOEShape shape, DateTime activation)> Sources = new(); @@ -60,9 +60,9 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } } -class P1WickedWheel : WickedWheel { } +class P1WickedWheel(BossModule module) : WickedWheel(module) { } -class P4WickedWheel : WickedWheel +class P4WickedWheel(BossModule module) : WickedWheel(module) { public override void OnActorPlayActionTimelineEvent(Actor actor, ushort id) { diff --git a/BossMod/Modules/Stormblood/Ultimate/UWU/P2CrimsonCyclone.cs b/BossMod/Modules/Stormblood/Ultimate/UWU/P2CrimsonCyclone.cs index 5097632423..c79c790dbd 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UWU/P2CrimsonCyclone.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UWU/P2CrimsonCyclone.cs @@ -5,9 +5,9 @@ // p2 second cast is two charges along both cardinals // p2 third cast is four staggered charges, with different patterns depending on whether awakening happened (TODO: we can predict that very early) // p4 predation is a single awakened charge along intercardinal -class CrimsonCyclone : Components.GenericAOEs +class CrimsonCyclone(BossModule module, float predictionDelay) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.CrimsonCyclone)) { - private float _predictionDelay; + private float _predictionDelay = predictionDelay; private List<(AOEShape shape, WPos pos, Angle rot, DateTime activation)> _predicted = new(); // note: there could be 1/2/4 predicted normal charges and 0 or 2 'cross' charges private List _casters = new(); @@ -16,11 +16,6 @@ class CrimsonCyclone : Components.GenericAOEs public bool CastsPredicted => _predicted.Count > 0; - public CrimsonCyclone(float predictionDelay) : base(ActionID.MakeSpell(AID.CrimsonCyclone)) - { - _predictionDelay = predictionDelay; - } - public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_predicted.Count <= 2) // don't draw 4 predicted charges, it is pointless @@ -51,7 +46,7 @@ public override void OnCastFinished(Actor caster, ActorCastInfo spell) if (spell.Action == WatchedAction) { _casters.Remove(caster); - if (caster == ((UWU)module).Ifrit() && caster.FindStatus(SID.Woken) != null) + if (caster == ((UWU)Module).Ifrit() && caster.FindStatus(SID.Woken) != null) { _predicted.Add((_shapeCross, Module.Bounds.Center - 19.5f * (spell.Rotation + 45.Degrees()).ToDirection(), spell.Rotation + 45.Degrees(), WorldState.FutureTime(2.2f))); _predicted.Add((_shapeCross, Module.Bounds.Center - 19.5f * (spell.Rotation - 45.Degrees()).ToDirection(), spell.Rotation - 45.Degrees(), WorldState.FutureTime(2.2f))); @@ -70,5 +65,4 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } class P2CrimsonCyclone(BossModule module) : CrimsonCyclone(module, 5.2f); - class P4CrimsonCyclone(BossModule module) : CrimsonCyclone(module, 8.1f); diff --git a/BossMod/Modules/Stormblood/Ultimate/UWU/P2Eruption.cs b/BossMod/Modules/Stormblood/Ultimate/UWU/P2Eruption.cs index 1b90f5cd35..4ea2927e6d 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UWU/P2Eruption.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UWU/P2Eruption.cs @@ -2,18 +2,16 @@ // TODO: is it baited on farthest dps or any roles? can subsequent eruptions bait on other targets? // casts are 3s long and 2s apart (overlapping) -class P2Eruption : Components.LocationTargetedAOEs +class P2Eruption(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.EruptionAOE), 8) { public int NumCastsStarted { get; private set; } private BitMask _baiters; - public P2Eruption() : base(ActionID.MakeSpell(AID.EruptionAOE), 8) { } - public override void Update() { if (NumCastsStarted == 0) { - var source = ((UWU)module).Ifrit(); + var source = ((UWU)Module).Ifrit(); if (source != null) _baiters = Raid.WithSlot().WhereActor(a => a.Class.IsDD()).SortedByRange(source.Position).TakeLast(2).Mask(); } @@ -22,7 +20,7 @@ public override void Update() public override void DrawArenaForeground(int pcSlot, Actor pc) { if (_baiters[pcSlot]) - arena.AddCircle(pc.Position, Shape.Radius, ArenaColor.Safe); + Arena.AddCircle(pc.Position, Shape.Radius, ArenaColor.Safe); } public override void OnCastStarted(Actor caster, ActorCastInfo spell) diff --git a/BossMod/Modules/Stormblood/Ultimate/UWU/P2FlamingCrush.cs b/BossMod/Modules/Stormblood/Ultimate/UWU/P2FlamingCrush.cs index 574985ddc8..760b56cbbb 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UWU/P2FlamingCrush.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UWU/P2FlamingCrush.cs @@ -1,11 +1,9 @@ namespace BossMod.Stormblood.Ultimate.UWU; -class FlamingCrush : Components.UniformStackSpread +class FlamingCrush(BossModule module) : Components.UniformStackSpread(module, 4, 0, 6) { protected BitMask Avoid; - public FlamingCrush() : base(4, 0, 6) { } - public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.FlamingCrush) @@ -26,7 +24,7 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) // during P2, everyone except searing wind targets (typically two healers) should stack class P2FlamingCrush : FlamingCrush { - public override void Init(BossModule module) + public P2FlamingCrush(BossModule module) : base(module) { if (module.FindComponent() is var searingWind && searingWind != null) foreach (var sw in searingWind.Spreads) @@ -35,12 +33,12 @@ public override void Init(BossModule module) } // during P4 (annihilation), everyone should stack (except maybe ranged/caster that will handle mesohigh) -class P4FlamingCrush : FlamingCrush { } +class P4FlamingCrush(BossModule module) : FlamingCrush(module) { } // during P5 (suppression), everyone except mesohigh handler (typically tank) should stack class P5FlamingCrush : FlamingCrush { - public override void Init(BossModule module) + public P5FlamingCrush(BossModule module) : base(module) { Avoid = Raid.WithSlot(true).WhereActor(p => p.FindStatus(SID.ThermalLow) != null && p.Role != Role.Healer).Mask(); } diff --git a/BossMod/Modules/Stormblood/Ultimate/UWU/P2InfernalFetters.cs b/BossMod/Modules/Stormblood/Ultimate/UWU/P2InfernalFetters.cs index 7331e93a55..5b09875e42 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UWU/P2InfernalFetters.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UWU/P2InfernalFetters.cs @@ -1,6 +1,6 @@ namespace BossMod.Stormblood.Ultimate.UWU; -class P2InfernalFetters : BossComponent +class P2InfernalFetters(BossModule module) : BossComponent(module) { public BitMask Fetters; private int _fettersStrength; @@ -17,7 +17,7 @@ public override void DrawArenaForeground(int pcSlot, Actor pc) var from = Raid[Fetters.LowestSetBit()]; var to = Raid[Fetters.HighestSetBit()]; if (from != null && to != null) - arena.AddLine(from.Position, to.Position, _fettersStrength > 1 ? ArenaColor.Danger : ArenaColor.Safe); + Arena.AddLine(from.Position, to.Position, _fettersStrength > 1 ? ArenaColor.Danger : ArenaColor.Safe); } } diff --git a/BossMod/Modules/Stormblood/Ultimate/UWU/P2Nails.cs b/BossMod/Modules/Stormblood/Ultimate/UWU/P2Nails.cs index bcf2d706ad..7b4b8668e0 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UWU/P2Nails.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UWU/P2Nails.cs @@ -1,19 +1,14 @@ namespace BossMod.Stormblood.Ultimate.UWU; // TODO: kill priorities -class P2Nails : BossComponent +class P2Nails(BossModule module) : BossComponent(module) { - private IReadOnlyList _nails = ActorEnumeration.EmptyList; + private IReadOnlyList _nails = module.Enemies(OID.InfernalNail); public bool Active => _nails.Any(a => a.IsTargetable); - public override void Init(BossModule module) - { - _nails = module.Enemies(OID.InfernalNail); - } - public override void DrawArenaForeground(int pcSlot, Actor pc) { - arena.Actors(_nails, ArenaColor.Enemy); + Arena.Actors(_nails, ArenaColor.Enemy); } } diff --git a/BossMod/Modules/Stormblood/Ultimate/UWU/P2SearingWind.cs b/BossMod/Modules/Stormblood/Ultimate/UWU/P2SearingWind.cs index ed13e42e40..db638c7144 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UWU/P2SearingWind.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UWU/P2SearingWind.cs @@ -1,9 +1,7 @@ namespace BossMod.Stormblood.Ultimate.UWU; -class P2SearingWind : Components.UniformStackSpread +class P2SearingWind(BossModule module) : Components.UniformStackSpread(module, 0, 14, alwaysShowSpreads: true, includeDeadTargets: true) { - public P2SearingWind() : base(0, 14, alwaysShowSpreads: true, includeDeadTargets: true) { } - public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.InfernoHowl && WorldState.Actors.Find(spell.TargetID) is var target && target != null) diff --git a/BossMod/Modules/Stormblood/Ultimate/UWU/P2VulcanBurst.cs b/BossMod/Modules/Stormblood/Ultimate/UWU/P2VulcanBurst.cs index 749ee73999..ffbeba1700 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UWU/P2VulcanBurst.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UWU/P2VulcanBurst.cs @@ -1,10 +1,8 @@ namespace BossMod.Stormblood.Ultimate.UWU; -class VulcanBurst : Components.Knockback +class VulcanBurst(BossModule module, AID aid, Actor? source) : Components.Knockback(module, ActionID.MakeSpell(aid)) { - protected Actor? SourceActor; - - public VulcanBurst(AID aid) : base(ActionID.MakeSpell(aid)) { } + protected Actor? SourceActor = source; public override IEnumerable Sources(int slot, Actor actor) { @@ -13,22 +11,5 @@ public override IEnumerable Sources(int slot, Actor actor) } } -class P2VulcanBurst : VulcanBurst -{ - public P2VulcanBurst() : base(AID.VulcanBurst) { } - - public override void Init(BossModule module) - { - SourceActor = ((UWU)module).Ifrit(); - } -} - -class P4VulcanBurst : VulcanBurst -{ - public P4VulcanBurst() : base(AID.VulcanBurstUltima) { } - - public override void Init(BossModule module) - { - SourceActor = ((UWU)module).Ultima(); - } -} +class P2VulcanBurst(BossModule module) : VulcanBurst(module, AID.VulcanBurst, ((UWU)module).Ifrit()); +class P4VulcanBurst(BossModule module) : VulcanBurst(module, AID.VulcanBurstUltima, ((UWU)module).Ultima()); diff --git a/BossMod/Modules/Stormblood/Ultimate/UWU/P3Burst.cs b/BossMod/Modules/Stormblood/Ultimate/UWU/P3Burst.cs index 3b5aa6da30..a046dffbb4 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UWU/P3Burst.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UWU/P3Burst.cs @@ -1,14 +1,12 @@ namespace BossMod.Stormblood.Ultimate.UWU; -class P3Burst : Components.GenericAOEs +class P3Burst(BossModule module) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.Burst)) { - private IReadOnlyList _bombs = ActorEnumeration.EmptyList; + private IReadOnlyList _bombs = module.Enemies(OID.BombBoulder); private Dictionary _bombActivation = new(); private static readonly AOEShape _shape = new AOEShapeCircle(6.3f); - public P3Burst() : base(ActionID.MakeSpell(AID.Burst)) { } - public override IEnumerable ActiveAOEs(int slot, Actor actor) { foreach (var b in _bombs) @@ -19,11 +17,6 @@ public override IEnumerable ActiveAOEs(int slot, Actor actor) } } - public override void Init(BossModule module) - { - _bombs = module.Enemies(OID.BombBoulder); - } - public override void Update() { foreach (var b in _bombs.Where(b => !_bombActivation.ContainsKey(b.InstanceID))) diff --git a/BossMod/Modules/Stormblood/Ultimate/UWU/P3Gaols.cs b/BossMod/Modules/Stormblood/Ultimate/UWU/P3Gaols.cs index 0814e7263a..8aef66221b 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UWU/P3Gaols.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UWU/P3Gaols.cs @@ -1,7 +1,7 @@ namespace BossMod.Stormblood.Ultimate.UWU; // TODO: add sludge voidzones?.. -class P3Gaols : Components.GenericAOEs +class P3Gaols(BossModule module) : Components.GenericAOEs(module) { public enum State { None, TargetSelection, Fetters, Done } @@ -41,7 +41,7 @@ public override void OnStatusGain(Actor actor, ActorStatus status) public override void OnEventCast(Actor caster, ActorCastEvent spell) { - base.OnEventCast(module, caster, spell); + base.OnEventCast(caster, spell); switch ((AID)spell.Action.ID) { case AID.RockThrowBoss: diff --git a/BossMod/Modules/Stormblood/Ultimate/UWU/P3Geocrush.cs b/BossMod/Modules/Stormblood/Ultimate/UWU/P3Geocrush.cs index f401fe4a28..3692bcb37a 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UWU/P3Geocrush.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UWU/P3Geocrush.cs @@ -3,7 +3,7 @@ class P3Geocrush1(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Geocrush1), new AOEShapeCircle(18)); // TODO: add prediction after PATE xxx - need non-interpolated actor rotation for that... -class P3Geocrush2 : Components.GenericAOEs +class P3Geocrush2(BossModule module) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.Geocrush2)) { private Actor? _caster; private AOEShapeDonut? _shapeReduced; @@ -11,8 +11,6 @@ class P3Geocrush2 : Components.GenericAOEs //private static WDir[] _possibleOffsets = { new(14, 0), new(0, 14), new(-14, 0), new(0, -14) }; private static readonly AOEShapeCircle _shapeCrush = new(24); - public P3Geocrush2() : base(ActionID.MakeSpell(AID.Geocrush2)) { } - public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_caster != null) diff --git a/BossMod/Modules/Stormblood/Ultimate/UWU/P3Landslide.cs b/BossMod/Modules/Stormblood/Ultimate/UWU/P3Landslide.cs index 4bf65c0e18..c2d1141f1f 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UWU/P3Landslide.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UWU/P3Landslide.cs @@ -3,7 +3,7 @@ // in p3, landslide is baited on a random (?) target (rotation phi for main cast); helpers cast their casts at phi +- 45 and phi +- 135 // if boss is awakened, these 5 landslides are followed by another 5 landslides at phi +- 22.5, phi +- 90 and phi + 180; there is no point predicting them, since corresponding casts start almost immediately (<0.1s) // in p4, landslides are cast at predetermined angles (ultimate predation, ???) -class Landslide : Components.GenericAOEs +class Landslide(BossModule module) : Components.GenericAOEs(module) { public bool Awakened { get; private set; } public DateTime PredictedActivation; @@ -53,9 +53,9 @@ public override void OnCastFinished(Actor caster, ActorCastInfo spell) } } -class P3Landslide : Landslide { } +class P3Landslide(BossModule module) : Landslide(module); -class P4Landslide : Landslide +class P4Landslide(BossModule module) : Landslide(module) { public override void OnActorPlayActionTimelineEvent(Actor actor, ushort id) { diff --git a/BossMod/Modules/Stormblood/Ultimate/UWU/P4CeruleumVent.cs b/BossMod/Modules/Stormblood/Ultimate/UWU/P4CeruleumVent.cs index ca703153f8..6c670b6a10 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UWU/P4CeruleumVent.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UWU/P4CeruleumVent.cs @@ -1,6 +1,6 @@ namespace BossMod.Stormblood.Ultimate.UWU; -class P4CeruleumVent : Components.GenericAOEs +class P4CeruleumVent(BossModule module) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.CeruleumVent)) { private Actor? _source; private DateTime _activation; @@ -9,8 +9,6 @@ class P4CeruleumVent : Components.GenericAOEs public bool Active => _source != null; - public P4CeruleumVent() : base(ActionID.MakeSpell(AID.CeruleumVent)) { } - public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_source != null) diff --git a/BossMod/Modules/Stormblood/Ultimate/UWU/P4Freefire.cs b/BossMod/Modules/Stormblood/Ultimate/UWU/P4Freefire.cs index ae0892e7be..6dd4044bc2 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UWU/P4Freefire.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UWU/P4Freefire.cs @@ -1,14 +1,12 @@ namespace BossMod.Stormblood.Ultimate.UWU; -class P4Freefire : Components.GenericAOEs +class P4Freefire(BossModule module) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.FreefireIntermission)) { private List _casters = new(); private DateTime _activation; private static readonly AOEShape _shape = new AOEShapeCircle(15); // TODO: verify falloff - public P4Freefire() : base(ActionID.MakeSpell(AID.FreefireIntermission)) { } - public override IEnumerable ActiveAOEs(int slot, Actor actor) { return _casters.Select(c => new AOEInstance(_shape, c.Position, 0.Degrees(), _activation)); diff --git a/BossMod/Modules/Stormblood/Ultimate/UWU/P4MagitekBits.cs b/BossMod/Modules/Stormblood/Ultimate/UWU/P4MagitekBits.cs index 73886ea3e8..47c0c4f72d 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UWU/P4MagitekBits.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UWU/P4MagitekBits.cs @@ -1,18 +1,13 @@ namespace BossMod.Stormblood.Ultimate.UWU; -class P4MagitekBits : BossComponent +class P4MagitekBits(BossModule module) : BossComponent(module) { - private IReadOnlyList _bits = ActorEnumeration.EmptyList; + private IReadOnlyList _bits = module.Enemies(OID.MagitekBit); public bool Active => _bits.Any(b => b.IsTargetable); - public override void Init(BossModule module) - { - _bits = module.Enemies(OID.MagitekBit); - } - public override void DrawArenaForeground(int pcSlot, Actor pc) { - arena.Actors(_bits, ArenaColor.Enemy); + Arena.Actors(_bits, ArenaColor.Enemy); } } diff --git a/BossMod/Modules/Stormblood/Ultimate/UWU/P4UltimateAnnihilation.cs b/BossMod/Modules/Stormblood/Ultimate/UWU/P4UltimateAnnihilation.cs index 98e2b510ae..8dc6e1f7c1 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UWU/P4UltimateAnnihilation.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UWU/P4UltimateAnnihilation.cs @@ -1,22 +1,17 @@ namespace BossMod.Stormblood.Ultimate.UWU; -class P4UltimateAnnihilation : BossComponent +class P4UltimateAnnihilation(BossModule module) : BossComponent(module) { - private IReadOnlyList _orbs = ActorEnumeration.EmptyList; + private IReadOnlyList _orbs = module.Enemies(OID.Aetheroplasm); private static readonly float _radius = 6; - public override void Init(BossModule module) - { - _orbs = module.Enemies(OID.Aetheroplasm); - } - public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (var orb in _orbs.Where(o => !o.IsDead)) { - arena.Actor(orb, ArenaColor.Object, true); - arena.AddCircle(orb.Position, _radius, ArenaColor.Object); + Arena.Actor(orb, ArenaColor.Object, true); + Arena.AddCircle(orb.Position, _radius, ArenaColor.Object); } } } diff --git a/BossMod/Modules/Stormblood/Ultimate/UWU/P4UltimatePredation.cs b/BossMod/Modules/Stormblood/Ultimate/UWU/P4UltimatePredation.cs index 28f82dd924..fef3664bf8 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UWU/P4UltimatePredation.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UWU/P4UltimatePredation.cs @@ -1,7 +1,7 @@ namespace BossMod.Stormblood.Ultimate.UWU; // select best safespot for all predation patterns -class P4UltimatePredation : BossComponent +class P4UltimatePredation(BossModule module) : BossComponent(module) { public enum State { Inactive, Predicted, First, Second, Done } @@ -13,24 +13,23 @@ public enum State { Inactive, Predicted, First, Second, Done } private static readonly float _dodgeRadius = 19; private static readonly Angle _dodgeCushion = 2.5f.Degrees(); - public override void AddHints(int slot, Actor actor, TextHints hints) + public override void AddMovementHints(int slot, Actor actor, MovementHints movementHints) { - if (movementHints != null) - foreach (var h in EnumerateHints(actor.Position)) - movementHints.Add(h); + foreach (var h in EnumerateHints(actor.Position)) + movementHints.Add(h); } public override void DrawArenaForeground(int pcSlot, Actor pc) { foreach (var h in EnumerateHints(pc.Position)) - arena.AddLine(h.from, h.to, h.color); + Arena.AddLine(h.from, h.to, h.color); } public override void OnActorPlayActionTimelineEvent(Actor actor, ushort id) { if (CurState == State.Inactive && id == 0x1E43) { - RecalculateHints(module); + RecalculateHints(); CurState = State.Predicted; } } @@ -74,14 +73,14 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } } - private void RecalculateHints(BossModule module) + private void RecalculateHints() { _first.Center = _second.Center = Module.Bounds.Center; _first.Forbidden.Clear(); _second.Forbidden.Clear(); _hints.Clear(); - var castModule = (UWU)module; + var castModule = (UWU)Module; var garuda = castModule.Garuda(); var titan = castModule.Titan(); var ifrit = castModule.Ifrit(); @@ -104,11 +103,11 @@ private void RecalculateHints(BossModule module) var safespots = EnumeratePotentialSafespots(); var (a1, a2) = safespots.MinBy(AngularDistance); - _hints.Add(GetSafePositionAtAngle(module, a1)); - _hints.Add(GetSafePositionAtAngle(module, a2)); + _hints.Add(GetSafePositionAtAngle(a1)); + _hints.Add(GetSafePositionAtAngle(a2)); } - private WPos GetSafePositionAtAngle(BossModule module, Angle angle) => Module.Bounds.Center + _dodgeRadius * angle.ToDirection(); + private WPos GetSafePositionAtAngle(Angle angle) => Module.Bounds.Center + _dodgeRadius * angle.ToDirection(); private IEnumerable<(Angle, Angle)> EnumeratePotentialSafespots() { diff --git a/BossMod/Modules/Stormblood/Ultimate/UWU/P4ViscousAetheroplasm.cs b/BossMod/Modules/Stormblood/Ultimate/UWU/P4ViscousAetheroplasm.cs index c79e9b2c36..7ab6d8dad7 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UWU/P4ViscousAetheroplasm.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UWU/P4ViscousAetheroplasm.cs @@ -3,10 +3,8 @@ class P4ViscousAetheroplasmApply(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.ViscousAetheroplasmApply), new AOEShapeCircle(2), (uint)OID.UltimaWeapon, originAtTarget: true); // TODO: if aetheroplasm target is the same as homing laser target, assume it is being soaked solo; consider merging these two components -class P4ViscousAetheroplasmResolve : Components.UniformStackSpread +class P4ViscousAetheroplasmResolve(BossModule module) : Components.UniformStackSpread(module, 4, 0, 7) { - public P4ViscousAetheroplasmResolve() : base(4, 0, 7) { } - public override void OnCastStarted(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.HomingLasers) @@ -39,13 +37,11 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } } -class P5ViscousAetheroplasmTriple : Components.UniformStackSpread +class P5ViscousAetheroplasmTriple(BossModule module) : Components.UniformStackSpread(module, 4, 0, 8) { public int NumCasts { get; private set; } private List<(Actor target, DateTime resolve)> _aetheroplasms = new(); - public P5ViscousAetheroplasmTriple() : base(4, 0, 8) { } - public override void OnStatusGain(Actor actor, ActorStatus status) { if ((SID)status.ID == SID.ViscousAetheroplasm) diff --git a/BossMod/Modules/Stormblood/Ultimate/UWU/UWU.cs b/BossMod/Modules/Stormblood/Ultimate/UWU/UWU.cs index 1124feb2f3..42c5fc741b 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UWU/UWU.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UWU/UWU.cs @@ -1,55 +1,29 @@ namespace BossMod.Stormblood.Ultimate.UWU; class P1Slipstream(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Slipstream), new AOEShapeCone(11.7f, 45.Degrees())); - class P1Downburst(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.Downburst), new AOEShapeCone(11.7f, 45.Degrees())); - -// TODO: hints... (use wild charge component? need 'avoid or share-non-first' role?) -class P1MistralSongBoss(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.MistralSongBoss)); - -// TODO: same as boss variant + multi targets -class P1MistralSongAdds(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.MistralSongAdds)); - +class P1MistralSongBoss(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.MistralSongBoss)); // TODO: hints... (use wild charge component? need 'avoid or share-non-first' role?) +class P1MistralSongAdds(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.MistralSongAdds)); // TODO: same as boss variant + multi targets class P1GreatWhirlwind(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.GreatWhirlwind), 8); - class P1EyeOfTheStorm(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.EyeOfTheStorm), new AOEShapeDonut(12, 25)); - class P1Gigastorm(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Gigastorm), new AOEShapeCircle(6.5f)); - class P2RadiantPlume(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.RadiantPlumeAOE), 8); - class P2Incinerate(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.Incinerate), new AOEShapeCone(15, 60.Degrees()), (uint)OID.Ifrit); - class P3RockBuster(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.RockBuster), new AOEShapeCone(10.55f, 60.Degrees()), (uint)OID.Titan); // TODO: verify angle - class P3MountainBuster(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.MountainBuster), new AOEShapeCone(15.55f, 45.Degrees()), (uint)OID.Titan); // TODO: verify angle - class P3WeightOfTheLand(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.WeightOfTheLandAOE), 6); - class P3Upheaval(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.Upheaval), 24, true); - class P3Tumult(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.Tumult)); - class P4Blight(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.Blight)); - class P4HomingLasers(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.HomingLasers), 4); - class P4DiffractiveLaser(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.DiffractiveLaser), new AOEShapeCone(18, 45.Degrees()), (uint)OID.UltimaWeapon); // TODO: verify angle - class P5MistralSongCone(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.MistralSongCone), new AOEShapeCone(21.7f, 45.Degrees())); // TODO: verify angle - class P5AetherochemicalLaserCenter(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.AetherochemicalLaserCenter), new AOEShapeRect(46, 4, 6)); - class P5AetherochemicalLaserRight(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.AetherochemicalLaserRight), new AOEShapeRect(46, 4, 6)); - class P5AetherochemicalLaserLeft(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.AetherochemicalLaserLeft), new AOEShapeRect(46, 4, 6)); - -// TODO: consider showing circle around baiter -class P5LightPillar(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.LightPillarAOE), 3); - +class P5LightPillar(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.LightPillarAOE), 3); // TODO: consider showing circle around baiter class P5AethericBoom(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.AethericBoom), 10); - [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.Garuda, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 539)] public class UWU : BossModule { diff --git a/BossMod/Modules/Stormblood/Ultimate/UWU/UWUConfig.cs b/BossMod/Modules/Stormblood/Ultimate/UWU/UWUConfig.cs index d4b2ad1694..73fda3af6c 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UWU/UWUConfig.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UWU/UWUConfig.cs @@ -1,11 +1,9 @@ namespace BossMod.Stormblood.Ultimate.UWU; [ConfigDisplay(Order = 0x210, Parent = typeof(StormbloodConfig))] -public class UWUConfig : CooldownPlanningConfigNode +public class UWUConfig() : CooldownPlanningConfigNode(70) { [PropertyDisplay("Titan gaols priorities (close < far)")] [GroupDetails(new string[] { "0", "1", "2", "3", "4", "5", "6", "7" })] public GroupAssignmentUnique P3GaolPriorities = GroupAssignmentUnique.Default(); - - public UWUConfig() : base(70) { } } diff --git a/BossMod/Modules/Stormblood/Ultimate/UWU/UWUStates.cs b/BossMod/Modules/Stormblood/Ultimate/UWU/UWUStates.cs index ea9f83b181..d620cd5436 100644 --- a/BossMod/Modules/Stormblood/Ultimate/UWU/UWUStates.cs +++ b/BossMod/Modules/Stormblood/Ultimate/UWU/UWUStates.cs @@ -139,7 +139,7 @@ private void P1AwakenedWickedWheelDownburst(uint id, float delay) { ActorCast(id, _module.Garuda, AID.WickedWheel, delay, 3, true, "Out") .ActivateOnEnter(); - ComponentCondition(id + 2, 2.1f, comp => comp.NumCasts >= 2 || comp.Sources.Count == 0 && _WorldState.CurrentTime >= comp.AwakenedResolve, "In") // complicated condition handles fucked up awakening + ComponentCondition(id + 2, 2.1f, comp => comp.NumCasts >= 2 || comp.Sources.Count == 0 && _module.WorldState.CurrentTime >= comp.AwakenedResolve, "In") // complicated condition handles fucked up awakening .DeactivateOnExit(); ComponentCondition(id + 0x10, 2.8f, comp => comp.NumCasts > 0, "Cleave") .ActivateOnEnter() From 4fd801abdc9dd5661143a262e3f679d73c29c23a Mon Sep 17 00:00:00 2001 From: Olga Kichakova Date: Thu, 11 Apr 2024 12:37:41 +0100 Subject: [PATCH 15/18] Finished refactoring. --- BossMod/Components/BaitAway.cs | 4 +-- BossMod/Components/ForcedMarch.cs | 6 ++-- BossMod/Components/Knockback.cs | 8 ++--- .../Alliance/A14Naldthal/FortuneFlux.cs | 9 ++---- .../Alliance/A21Nophica/A21Nophica.cs | 1 + .../Alliance/A21Nophica/FloralHaze.cs | 9 ------ .../Alliance/A21Nophica/MatronsBreath.cs | 12 ++------ .../Alliance/A22AlthykNymeia/SpinnersWheel.cs | 12 ++------ .../Criterion/C01ASS/C011Silkie/C011Silkie.cs | 4 +-- .../C01ASS/C013Shadowcaster/Portals.cs | 15 +++------- .../C02AMR/C021Shishio/RokujoRevel.cs | 10 ++----- .../Criterion/C02AMR/C023Moko/Giri.cs | 12 ++------ .../C02AMR/C023Moko/SoldiersOfDeath.cs | 9 ++---- .../C03AAI/C031Ketuduke/FlukeGale.cs | 9 ++---- .../C03AAI/C031Ketuduke/SpringCrystals.cs | 19 ++++++------ .../Criterion/C03AAI/C032Lala/Analysis.cs | 23 ++++---------- .../Criterion/C03AAI/C032Lala/ArcanePoint.cs | 9 ++---- .../C03AAI/C032Lala/SpatialTactics.cs | 9 ++---- .../C03AAI/C033Statice/C033Statice.cs | 5 +--- .../Criterion/C03AAI/C033Statice/Fireworks.cs | 27 +++++------------ .../C03AAI/C033Statice/TrickReload.cs | 9 ++---- BossMod/Modules/Endwalker/EndwalkerConfig.cs | 4 +-- .../Endwalker/Extreme/Ex2Hydaelyn/Aureole.cs | 9 ++---- .../Extreme/Ex7Zeromus/VisceralWhirl.cs | 9 ++---- .../Modules/Endwalker/Hunt/RankA/Sugriva.cs | 7 +---- .../Endwalker/Quest/Endwalker/Endwalker.cs | 7 +---- .../Endwalker/Quest/Endwalker/TidalWave.cs | 12 ++------ .../Savage/P10SPandaemonium/EntanglingWeb.cs | 9 ++---- .../P10SPandaemonium/PandaemoniacRay.cs | 12 ++------ .../Savage/P10SPandaemonium/Silkspit.cs | 9 ++---- .../Savage/P12S1Athena/EngravementOfSouls1.cs | 12 ++------ .../Savage/P12S1Athena/EngravementOfSouls3.cs | 9 ++---- .../Endwalker/Savage/P12S1Athena/Palladion.cs | 24 ++++----------- .../P12S2PallasAthena/ClassicalConcepts.cs | 18 ++++------- .../Savage/P3SPhoinix/TrailOfCondemnation.cs | 9 ++---- .../Savage/P7SAgdistis/ForbiddenFruit5.cs | 9 ++---- .../Savage/P9SKokytos/ArchaicRockbreaker.cs | 12 ++------ .../Endwalker/Savage/P9SKokytos/Charibdys.cs | 21 ++++--------- .../GymnasiouMeganereis.cs | 3 +- .../GymnasiouStyphnolobion.cs | 9 +----- .../Endwalker/Ultimate/DSW1/ShiningBlade.cs | 15 ++-------- .../Ultimate/DSW2/P2SanctityOfTheWard1.cs | 21 ++++--------- .../Ultimate/DSW2/P2StrengthOfTheWard2.cs | 10 ++----- .../Ultimate/DSW2/P5WrathOfTheHeavens.cs | 12 ++------ .../Endwalker/Ultimate/DSW2/P6AkhAfah.cs | 12 ++------ .../Ultimate/DSW2/P6HallowedWings.cs | 27 ++++------------- .../Endwalker/Ultimate/DSW2/P6WrothFlames.cs | 12 ++------ .../Endwalker/Ultimate/DSW2/P6Wyrmsbreath.cs | 27 ++++------------- .../Endwalker/Ultimate/DSW2/P7Trinity.cs | 9 ++---- .../Endwalker/Ultimate/TOP/P1Pantokrator.cs | 9 ++---- .../Endwalker/Ultimate/TOP/P2PartySynergy.cs | 12 ++------ .../Modules/Endwalker/Ultimate/TOP/P5Delta.cs | 27 ++++------------- .../Modules/Endwalker/Ultimate/TOP/P5Omega.cs | 9 ++---- .../Modules/Endwalker/Ultimate/TOP/P5Sigma.cs | 9 ++---- .../Endwalker/Unreal/Un3Sophia/Demiurges.cs | 12 ++------ .../Unreal/Un4Zurvan/P2BrokenSeal.cs | 12 ++------ .../Stage18Act1.cs | 9 ++---- .../Stage18Act2.cs | 9 ++---- .../Stage20MissTyphon/Stage20Act1.cs | 9 +----- .../Stage27LockUpYourSnorters/Stage27.cs | 16 ++-------- .../Modules/Global/Quest/FF15Collab/Garuda.cs | 8 +---- BossMod/Modules/ModuleConfig.cs | 4 +-- .../Dungeon/D10StoneVigil/D102Koshchei.cs | 9 ++---- .../Modules/RealmReborn/RealmRebornConfig.cs | 4 +-- .../T04PortaDecumana/T04PortaDecumana2.cs | 7 +---- .../T09WhorleaterH/T09WhorleaterHBodyslam.cs | 7 +---- .../T09WhorleaterHSpinningDive.cs | 7 +---- .../Dungeon/D03QitanaRavel/D033Eros.cs | 7 +---- .../DRS3Dahu/FeralHowlHystericAssault.cs | 14 +++------ .../Foray/Duel/Duel5Menenius/Duel5Menenius.cs | 9 +----- .../Shadowbringers/ShadowbringersConfig.cs | 4 +-- .../SecretDjinn.cs | 30 ++----------------- .../SecretSwallow.cs | 7 +---- .../Ultimate/TEA/P1JagdDolls.cs | 9 ++---- .../Ultimate/TEA/P1ProteanWaveLiquid.cs | 18 +++-------- .../Ultimate/TEA/P3Inception3.cs | 14 +++------ .../Shadowbringers/Ultimate/TEA/P3Wormhole.cs | 9 ++---- .../Ultimate/TEA/P4FateCalibrationAlpha.cs | 9 ++---- .../Ultimate/TEA/P4FateCalibrationBeta.cs | 9 ++---- .../Modules/Stormblood/StormbloodConfig.cs | 4 +-- .../AltarAiravata.cs | 7 +---- .../AltarDullahan.cs | 7 +---- .../TheShiftingAltarsOfUznair/AltarKelpie.cs | 15 ++-------- .../TheShiftingAltarsOfUznair/TheWinged.cs | 10 +------ TODO | 6 +--- 85 files changed, 211 insertions(+), 726 deletions(-) delete mode 100644 BossMod/Modules/Endwalker/Alliance/A21Nophica/FloralHaze.cs diff --git a/BossMod/Components/BaitAway.cs b/BossMod/Components/BaitAway.cs index e67a0a4480..1d34241f44 100644 --- a/BossMod/Components/BaitAway.cs +++ b/BossMod/Components/BaitAway.cs @@ -180,10 +180,10 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } // component for mechanics requiring cast targets to gtfo from raid (aoe tankbusters etc) -public class BaitAwayCast(BossModule module, ActionID aid, AOEShape shape, bool centerAtTarget = false) : GenericBaitAway(module, aid, centerAtTarget: centerAtTarget) +public class BaitAwayCast(BossModule module, ActionID aid, AOEShape shape, bool centerAtTarget = false, bool endsOnCastEvent = false) : GenericBaitAway(module, aid, centerAtTarget: centerAtTarget) { public AOEShape Shape = shape; - public bool EndsOnCastEvent; + public bool EndsOnCastEvent = endsOnCastEvent; public override void OnCastStarted(Actor caster, ActorCastInfo spell) { diff --git a/BossMod/Components/ForcedMarch.cs b/BossMod/Components/ForcedMarch.cs index e5c095d9a0..c0a1b17f17 100644 --- a/BossMod/Components/ForcedMarch.cs +++ b/BossMod/Components/ForcedMarch.cs @@ -3,7 +3,7 @@ // generic component dealing with 'forced march' mechanics // these mechanics typically feature 'march left/right/forward/backward' debuffs, which rotate player and apply 'forced march' on expiration // if there are several active march debuffs, we assume they are chained together -public class GenericForcedMarch(BossModule module) : BossComponent(module) +public class GenericForcedMarch(BossModule module, float activationLimit = float.MaxValue) : BossComponent(module) { public class PlayerState { @@ -16,7 +16,7 @@ public class PlayerState public int NumActiveForcedMarches { get; private set; } public Dictionary State = new(); // key = instance ID public float MovementSpeed = 6; // default movement speed, can be overridden if necessary - public float ActivationLimit = float.MaxValue; // do not show pending moves that activate later than this limit + public float ActivationLimit = activationLimit; // do not show pending moves that activate later than this limit // called to determine whether we need to show hint public virtual bool DestinationUnsafe(int slot, Actor actor, WPos pos) => !Module.Bounds.Contains(pos); @@ -89,7 +89,7 @@ public void DeactivateForcedMovement(Actor player) } // typical forced march is driven by statuses -public class StatusDrivenForcedMarch(BossModule module, float duration, uint statusForward, uint statusBackward, uint statusLeft, uint statusRight, uint statusForced = 1257) : GenericForcedMarch(module) +public class StatusDrivenForcedMarch(BossModule module, float duration, uint statusForward, uint statusBackward, uint statusLeft, uint statusRight, uint statusForced = 1257, float activationLimit = float.MaxValue) : GenericForcedMarch(module, activationLimit) { public float Duration = duration; public readonly uint[] Statuses = [statusForward, statusLeft, statusBackward, statusRight, statusForced]; // 5 elements: fwd, left, back, right, forced diff --git a/BossMod/Components/Knockback.cs b/BossMod/Components/Knockback.cs index b401aed8d9..100dc89719 100644 --- a/BossMod/Components/Knockback.cs +++ b/BossMod/Components/Knockback.cs @@ -3,7 +3,7 @@ namespace BossMod.Components; // generic knockback/attract component; it's a cast counter for convenience -public abstract class Knockback(BossModule module, ActionID aid = new(), bool ignoreImmunes = false, int maxCasts = int.MaxValue) : CastCounter(module, aid) +public abstract class Knockback(BossModule module, ActionID aid = new(), bool ignoreImmunes = false, int maxCasts = int.MaxValue, bool stopAtWall = false) : CastCounter(module, aid) { public enum Kind { @@ -35,7 +35,7 @@ protected struct PlayerImmuneState } public bool IgnoreImmunes { get; init; } = ignoreImmunes; - public bool StopAtWall; // use if wall is solid rather than deadly + public bool StopAtWall = stopAtWall; // use if wall is solid rather than deadly public int MaxCasts = maxCasts; // use to limit number of drawn knockbacks protected PlayerImmuneState[] PlayerImmunes = new PlayerImmuneState[PartyState.MaxAllianceSize]; @@ -171,8 +171,8 @@ public override void OnStatusLose(Actor actor, ActorStatus status) // generic 'knockback from/attract to cast target' component // TODO: knockback is really applied when effectresult arrives rather than when actioneffect arrives, this is important for ai hints (they can reposition too early otherwise) -public class KnockbackFromCastTarget(BossModule module, ActionID aid, float distance, bool ignoreImmunes = false, int maxCasts = int.MaxValue, AOEShape? shape = null, Kind kind = Kind.AwayFromOrigin, float minDistance = 0, bool minDistanceBetweenHitboxes = false) - : Knockback(module, aid, ignoreImmunes, maxCasts) +public class KnockbackFromCastTarget(BossModule module, ActionID aid, float distance, bool ignoreImmunes = false, int maxCasts = int.MaxValue, AOEShape? shape = null, Kind kind = Kind.AwayFromOrigin, float minDistance = 0, bool minDistanceBetweenHitboxes = false, bool stopAtWall = false) + : Knockback(module, aid, ignoreImmunes, maxCasts, stopAtWall) { public float Distance = distance; public AOEShape? Shape = shape; diff --git a/BossMod/Modules/Endwalker/Alliance/A14Naldthal/FortuneFlux.cs b/BossMod/Modules/Endwalker/Alliance/A14Naldthal/FortuneFlux.cs index 3981a3f480..361992a2cf 100644 --- a/BossMod/Modules/Endwalker/Alliance/A14Naldthal/FortuneFlux.cs +++ b/BossMod/Modules/Endwalker/Alliance/A14Naldthal/FortuneFlux.cs @@ -121,14 +121,9 @@ public override IEnumerable ActiveAOEs(int slot, Actor actor) } } -class FortuneFluxKnockback : Components.Knockback +class FortuneFluxKnockback(BossModule module) : Components.Knockback(module) { - private FortuneFluxOrder? _order; - - public FortuneFluxKnockback(BossModule module) : base(module) - { - _order = module.FindComponent(); - } + private FortuneFluxOrder? _order = module.FindComponent(); public override IEnumerable Sources(int slot, Actor actor) { diff --git a/BossMod/Modules/Endwalker/Alliance/A21Nophica/A21Nophica.cs b/BossMod/Modules/Endwalker/Alliance/A21Nophica/A21Nophica.cs index d620e30a77..fe5a633e90 100644 --- a/BossMod/Modules/Endwalker/Alliance/A21Nophica/A21Nophica.cs +++ b/BossMod/Modules/Endwalker/Alliance/A21Nophica/A21Nophica.cs @@ -1,5 +1,6 @@ namespace BossMod.Endwalker.Alliance.A21Nophica; +class FloralHaze(BossModule module) : Components.StatusDrivenForcedMarch(module, 2, (uint)SID.ForwardMarch, (uint)SID.AboutFace, (uint)SID.LeftFace, (uint)SID.RightFace, activationLimit: 8); class SummerShade(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.SummerShade), new AOEShapeDonut(12, 40)); class SpringFlowers(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.SpringFlowers), new AOEShapeCircle(12)); class ReapersGale(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ReapersGaleAOE), new AOEShapeRect(36, 4, 36), 9); diff --git a/BossMod/Modules/Endwalker/Alliance/A21Nophica/FloralHaze.cs b/BossMod/Modules/Endwalker/Alliance/A21Nophica/FloralHaze.cs deleted file mode 100644 index 9c4783e933..0000000000 --- a/BossMod/Modules/Endwalker/Alliance/A21Nophica/FloralHaze.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace BossMod.Endwalker.Alliance.A21Nophica; - -class FloralHaze : Components.StatusDrivenForcedMarch -{ - public FloralHaze(BossModule module) : base(module, 2, (uint)SID.ForwardMarch, (uint)SID.AboutFace, (uint)SID.LeftFace, (uint)SID.RightFace) - { - ActivationLimit = 8; - } -} diff --git a/BossMod/Modules/Endwalker/Alliance/A21Nophica/MatronsBreath.cs b/BossMod/Modules/Endwalker/Alliance/A21Nophica/MatronsBreath.cs index a68151dd46..f4adece804 100644 --- a/BossMod/Modules/Endwalker/Alliance/A21Nophica/MatronsBreath.cs +++ b/BossMod/Modules/Endwalker/Alliance/A21Nophica/MatronsBreath.cs @@ -1,20 +1,14 @@ namespace BossMod.Endwalker.Alliance.A21Nophica; -class MatronsBreath : BossComponent +class MatronsBreath(BossModule module) : BossComponent(module) { public int NumCasts { get; private set; } - private IReadOnlyList _blueSafe; - private IReadOnlyList _goldSafe; + private IReadOnlyList _blueSafe = module.Enemies(OID.BlueSafeZone); + private IReadOnlyList _goldSafe = module.Enemies(OID.GoldSafeZone); private List _towers = new(); private static readonly AOEShapeDonut _shape = new(8, 40); // TODO: verify safe zone radius - public MatronsBreath(BossModule module) : base(module) - { - _blueSafe = module.Enemies(OID.BlueSafeZone); - _goldSafe = module.Enemies(OID.GoldSafeZone); - } - public override void AddHints(int slot, Actor actor, TextHints hints) { if (_shape.Check(actor.Position, NextSafeZone)) diff --git a/BossMod/Modules/Endwalker/Alliance/A22AlthykNymeia/SpinnersWheel.cs b/BossMod/Modules/Endwalker/Alliance/A22AlthykNymeia/SpinnersWheel.cs index a2c6fcf35b..712a20ac5a 100644 --- a/BossMod/Modules/Endwalker/Alliance/A22AlthykNymeia/SpinnersWheel.cs +++ b/BossMod/Modules/Endwalker/Alliance/A22AlthykNymeia/SpinnersWheel.cs @@ -19,19 +19,13 @@ public override void OnStatusGain(Actor actor, ActorStatus status) } } -class SpinnersWheelGaze : Components.GenericGaze +class SpinnersWheelGaze(BossModule module, bool inverted, AID aid, SID sid) : Components.GenericGaze(module, ActionID.MakeSpell(aid), inverted) { - private SID _sid; - private Actor? _source; + private SID _sid = sid; + private Actor? _source = module.Enemies(OID.Nymeia).FirstOrDefault(); private DateTime _activation; private BitMask _affected; - public SpinnersWheelGaze(BossModule module, bool inverted, AID aid, SID sid) : base(module, ActionID.MakeSpell(aid), inverted) - { - _sid = sid; - _source = module.Enemies(OID.Nymeia).FirstOrDefault(); - } - public override IEnumerable ActiveEyes(int slot, Actor actor) { if (_source != null && _affected[slot]) diff --git a/BossMod/Modules/Endwalker/Criterion/C01ASS/C011Silkie/C011Silkie.cs b/BossMod/Modules/Endwalker/Criterion/C01ASS/C011Silkie/C011Silkie.cs index bb75e273fe..f40208c687 100644 --- a/BossMod/Modules/Endwalker/Criterion/C01ASS/C011Silkie/C011Silkie.cs +++ b/BossMod/Modules/Endwalker/Criterion/C01ASS/C011Silkie/C011Silkie.cs @@ -28,13 +28,11 @@ class FizzlingDusterPuff(BossModule module, AID aid) : Components.SelfTargetedAO class NFizzlingDusterPuff(BossModule module) : FizzlingDusterPuff(module, AID.NFizzlingDusterPuff); class SFizzlingDusterPuff(BossModule module) : FizzlingDusterPuff(module, AID.SFizzlingDusterPuff); -public abstract class C011Silkie : BossModule +public abstract class C011Silkie(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsSquare(new(-335, -155), 20)) { public static readonly AOEShapeCross ShapeBlue = new(60, 5); public static readonly AOEShapeDonut ShapeGreen = new(5, 60); public static readonly AOEShapeCone ShapeYellow = new(60, 22.5f.Degrees()); - - public C011Silkie(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsSquare(new(-335, -155), 20)) { } } [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.NBoss, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 878, NameID = 11369, SortOrder = 5)] diff --git a/BossMod/Modules/Endwalker/Criterion/C01ASS/C013Shadowcaster/Portals.cs b/BossMod/Modules/Endwalker/Criterion/C01ASS/C013Shadowcaster/Portals.cs index 29d4c62e60..2d57dc63ea 100644 --- a/BossMod/Modules/Endwalker/Criterion/C01ASS/C013Shadowcaster/Portals.cs +++ b/BossMod/Modules/Endwalker/Criterion/C01ASS/C013Shadowcaster/Portals.cs @@ -23,20 +23,13 @@ static class Portals } } -class PortalsAOE : Components.GenericAOEs +class PortalsAOE(BossModule module, AID aid, OID movedOID, float activationDelay, AOEShape shape) : Components.GenericAOEs(module, ActionID.MakeSpell(aid)) { - private IReadOnlyList _movedActors; - private float _activationDelay; - private AOEShape _shape; + private IReadOnlyList _movedActors = module.Enemies(movedOID); + private float _activationDelay = activationDelay; + private AOEShape _shape = shape; private List<(WPos pos, Angle rot, DateTime activation)> _origins = new(); - public PortalsAOE(BossModule module, AID aid, OID movedOID, float activationDelay, AOEShape shape) : base(module, ActionID.MakeSpell(aid)) - { - _movedActors = module.Enemies(movedOID); - _activationDelay = activationDelay; - _shape = shape; - } - public override IEnumerable ActiveAOEs(int slot, Actor actor) { return _origins.Select(o => new AOEInstance(_shape, o.pos, o.rot, o.activation)); diff --git a/BossMod/Modules/Endwalker/Criterion/C02AMR/C021Shishio/RokujoRevel.cs b/BossMod/Modules/Endwalker/Criterion/C02AMR/C021Shishio/RokujoRevel.cs index ac8f43a4e9..c0b90de12e 100644 --- a/BossMod/Modules/Endwalker/Criterion/C02AMR/C021Shishio/RokujoRevel.cs +++ b/BossMod/Modules/Endwalker/Criterion/C02AMR/C021Shishio/RokujoRevel.cs @@ -1,9 +1,9 @@ namespace BossMod.Endwalker.Criterion.C02AMR.C021Shishio; -class RokujoRevel : Components.GenericAOEs +class RokujoRevel(BossModule module) : Components.GenericAOEs(module) { private int _numBreaths; - private List _clouds = new(); + private List _clouds = [.. module.Enemies(OID.NRaiun), .. module.Enemies(OID.SRaiun)]; private List<(Angle dir, DateTime activation)> _pendingLines = new(); private List<(WPos origin, DateTime activation)> _pendingCircles = new(); @@ -14,12 +14,6 @@ class RokujoRevel : Components.GenericAOEs public bool Active => _pendingLines.Count + _pendingCircles.Count > 0; - public RokujoRevel(BossModule module) : base(module) - { - _clouds.AddRange(module.Enemies(OID.NRaiun)); - _clouds.AddRange(module.Enemies(OID.SRaiun)); - } - public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_pendingLines.Count > 1) diff --git a/BossMod/Modules/Endwalker/Criterion/C02AMR/C023Moko/Giri.cs b/BossMod/Modules/Endwalker/Criterion/C02AMR/C023Moko/Giri.cs index 7235afc3a6..bb3b9b5a6a 100644 --- a/BossMod/Modules/Endwalker/Criterion/C02AMR/C023Moko/Giri.cs +++ b/BossMod/Modules/Endwalker/Criterion/C02AMR/C023Moko/Giri.cs @@ -136,19 +136,13 @@ public override void OnCastFinished(Actor caster, ActorCastInfo spell) class IaiGiriBait : Components.GenericBaitAway { - public class Instance + public class Instance(Actor source) { - public Actor Source; - public Actor FakeSource; + public Actor Source = source; + public Actor FakeSource = new(0, 0, -1, "", 0, ActorType.None, Class.None, 0, new()); public Actor? Target; public List DirOffsets = new(); public List Hints = new(); - - public Instance(Actor source) - { - Source = source; - FakeSource = new(0, 0, -1, "", 0, ActorType.None, Class.None, 0, new()); - } } public float Distance; diff --git a/BossMod/Modules/Endwalker/Criterion/C02AMR/C023Moko/SoldiersOfDeath.cs b/BossMod/Modules/Endwalker/Criterion/C02AMR/C023Moko/SoldiersOfDeath.cs index 628e424850..31eaa8ffc3 100644 --- a/BossMod/Modules/Endwalker/Criterion/C02AMR/C023Moko/SoldiersOfDeath.cs +++ b/BossMod/Modules/Endwalker/Criterion/C02AMR/C023Moko/SoldiersOfDeath.cs @@ -1,19 +1,14 @@ namespace BossMod.Endwalker.Criterion.C02AMR.C023Moko; -class IronRainStorm : Components.GenericAOEs +class IronRainStorm(BossModule module) : Components.GenericAOEs(module) { public List AOEs = new(); - private IaiGiriBait? _bait; + private IaiGiriBait? _bait = module.FindComponent(); private static readonly AOEShapeCircle _shapeRain = new(10); private static readonly AOEShapeCircle _shapeStorm = new(20); private static readonly WDir[] _safespotDirections = { new(1, 0), new(-1, 0), new(0, 1), new(0, -1) }; - public IronRainStorm(BossModule module) : base(module) - { - _bait = module.FindComponent(); - } - public override IEnumerable ActiveAOEs(int slot, Actor actor) => AOEs; public override void DrawArenaForeground(int pcSlot, Actor pc) diff --git a/BossMod/Modules/Endwalker/Criterion/C03AAI/C031Ketuduke/FlukeGale.cs b/BossMod/Modules/Endwalker/Criterion/C03AAI/C031Ketuduke/FlukeGale.cs index 5edebfa5ca..f884061788 100644 --- a/BossMod/Modules/Endwalker/Criterion/C03AAI/C031Ketuduke/FlukeGale.cs +++ b/BossMod/Modules/Endwalker/Criterion/C03AAI/C031Ketuduke/FlukeGale.cs @@ -1,23 +1,18 @@ namespace BossMod.Endwalker.Criterion.C03AAI.C031Ketuduke; -class FlukeGale : Components.Knockback +class FlukeGale(BossModule module) : Components.Knockback(module) { public enum Debuff { None, BubbleWeave, FoamyFetters } public enum Resolve { None, Stack, Spread } public List Gales = new(); - private SpringCrystalsRect? _crystals; + private SpringCrystalsRect? _crystals = module.FindComponent(); private Debuff[] _debuffs = new Debuff[PartyState.MaxPartySize]; private Resolve _resolution; private static readonly AOEShapeRect _shape = new(20, 10); private static readonly AOEShapeRect _safeZone = new(5, 5, 5); - public FlukeGale(BossModule module) : base(module) - { - _crystals = module.FindComponent(); - } - public override IEnumerable Sources(int slot, Actor actor) => _debuffs[slot] != Debuff.FoamyFetters ? Gales : Enumerable.Empty(); public override void AddHints(int slot, Actor actor, TextHints hints) diff --git a/BossMod/Modules/Endwalker/Criterion/C03AAI/C031Ketuduke/SpringCrystals.cs b/BossMod/Modules/Endwalker/Criterion/C03AAI/C031Ketuduke/SpringCrystals.cs index 1e2480a061..624f7e98fe 100644 --- a/BossMod/Modules/Endwalker/Criterion/C03AAI/C031Ketuduke/SpringCrystals.cs +++ b/BossMod/Modules/Endwalker/Criterion/C03AAI/C031Ketuduke/SpringCrystals.cs @@ -1,23 +1,22 @@ namespace BossMod.Endwalker.Criterion.C03AAI.C031Ketuduke; -class SpringCrystalsRect : Components.GenericAOEs +class SpringCrystalsRect(BossModule module, bool moveCasters, bool risky, float delay) : Components.GenericAOEs(module) { - public List SafeZoneCenters = new(); + public List SafeZoneCenters = InitialSafeZoneCenters(module.Bounds.Center); private List _aoes = new(); - private bool _moveCasters; - private bool _risky; - private float _delay; + private bool _moveCasters = moveCasters; + private bool _risky = risky; + private float _delay = delay; private static readonly AOEShapeRect _shape = new(38, 5, 38); - public SpringCrystalsRect(BossModule module, bool moveCasters, bool risky, float delay) : base(module) + private static List InitialSafeZoneCenters(WPos origin) { - _moveCasters = moveCasters; - _risky = risky; - _delay = delay; + List res = []; for (int z = -15; z <= 15; z += 10) for (int x = -15; x <= 15; x += 10) - SafeZoneCenters.Add(Module.Bounds.Center + new WDir(x, z)); + res.Add(origin + new WDir(x, z)); + return res; } public override IEnumerable ActiveAOEs(int slot, Actor actor) => _aoes; diff --git a/BossMod/Modules/Endwalker/Criterion/C03AAI/C032Lala/Analysis.cs b/BossMod/Modules/Endwalker/Criterion/C03AAI/C032Lala/Analysis.cs index 4b7ff48391..3d3337dc03 100644 --- a/BossMod/Modules/Endwalker/Criterion/C03AAI/C032Lala/Analysis.cs +++ b/BossMod/Modules/Endwalker/Criterion/C03AAI/C032Lala/Analysis.cs @@ -19,17 +19,11 @@ public override void OnStatusGain(Actor actor, ActorStatus status) } } -class AnalysisRadiance : Components.GenericGaze +class AnalysisRadiance(BossModule module) : Components.GenericGaze(module, default, true) { - private Analysis? _analysis; - private ArcaneArray? _pulse; - private List _globes = new(); - - public AnalysisRadiance(BossModule module) : base(module, default, true) - { - _analysis = module.FindComponent(); - _pulse = module.FindComponent(); - } + private Analysis? _analysis = module.FindComponent(); + private ArcaneArray? _pulse = module.FindComponent(); + private List _globes = []; public override IEnumerable ActiveEyes(int slot, Actor actor) { @@ -57,20 +51,15 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) private (Actor? actor, DateTime activation) NextGlobe() => _globes.Select(g => (g, GlobeActivation(g))).MinBy(ga => ga.Item2); } -class TargetedLight : Components.GenericGaze +class TargetedLight(BossModule module) : Components.GenericGaze(module, default, true) { public bool Active; - private Analysis? _analysis; + private Analysis? _analysis = module.FindComponent(); private Angle[] _rotation = new Angle[4]; private Angle[] _safeDir = new Angle[4]; private int[] _rotationCount = new int[4]; private DateTime _activation; - public TargetedLight(BossModule module) : base(module, default, true) - { - _analysis = module.FindComponent(); - } - public override IEnumerable ActiveEyes(int slot, Actor actor) { if (Active) diff --git a/BossMod/Modules/Endwalker/Criterion/C03AAI/C032Lala/ArcanePoint.cs b/BossMod/Modules/Endwalker/Criterion/C03AAI/C032Lala/ArcanePoint.cs index 5399c062c8..c4e8dd52c7 100644 --- a/BossMod/Modules/Endwalker/Criterion/C03AAI/C032Lala/ArcanePoint.cs +++ b/BossMod/Modules/Endwalker/Criterion/C03AAI/C032Lala/ArcanePoint.cs @@ -5,15 +5,10 @@ class NConstructiveFigure(BossModule module) : ConstructiveFigure(module, AID.NAero); class SConstructiveFigure(BossModule module) : ConstructiveFigure(module, AID.SAero); -class ArcanePoint : BossComponent +class ArcanePoint(BossModule module) : BossComponent(module) { public int NumCasts { get; private set; } - private ArcanePlot? _plot; - - public ArcanePoint(BossModule module) : base(module) - { - _plot = module.FindComponent(); - } + private ArcanePlot? _plot = module.FindComponent(); public override void AddHints(int slot, Actor actor, TextHints hints) { diff --git a/BossMod/Modules/Endwalker/Criterion/C03AAI/C032Lala/SpatialTactics.cs b/BossMod/Modules/Endwalker/Criterion/C03AAI/C032Lala/SpatialTactics.cs index 6efd6e64f0..68e3fded32 100644 --- a/BossMod/Modules/Endwalker/Criterion/C03AAI/C032Lala/SpatialTactics.cs +++ b/BossMod/Modules/Endwalker/Criterion/C03AAI/C032Lala/SpatialTactics.cs @@ -1,18 +1,13 @@ namespace BossMod.Endwalker.Criterion.C03AAI.C032Lala; -class SpatialTactics : Components.GenericAOEs +class SpatialTactics(BossModule module) : Components.GenericAOEs(module) { - private ArcaneArray? _array; + private ArcaneArray? _array = module.FindComponent(); private List _fonts = new(); private int[] _remainingStacks = new int[4]; private static readonly AOEShapeCross _shape = new(50, 4); - public SpatialTactics(BossModule module) : base(module) - { - _array = module.FindComponent(); - } - public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_array == null) diff --git a/BossMod/Modules/Endwalker/Criterion/C03AAI/C033Statice/C033Statice.cs b/BossMod/Modules/Endwalker/Criterion/C03AAI/C033Statice/C033Statice.cs index 676d090d5d..5b059afbc8 100644 --- a/BossMod/Modules/Endwalker/Criterion/C03AAI/C033Statice/C033Statice.cs +++ b/BossMod/Modules/Endwalker/Criterion/C03AAI/C033Statice/C033Statice.cs @@ -4,10 +4,7 @@ class SurpriseBalloon(BossModule module, AID aid) : Components.KnockbackFromCast class NSurpriseBalloon(BossModule module) : SurpriseBalloon(module, AID.NPop); class SSurpriseBalloon(BossModule module) : SurpriseBalloon(module, AID.SPop); -class BeguilingGlitter : Components.StatusDrivenForcedMarch -{ - public BeguilingGlitter(BossModule module) : base(module, 2, (uint)SID.ForwardMarch, (uint)SID.AboutFace, (uint)SID.LeftFace, (uint)SID.RightFace) { ActivationLimit = 8; } -} +class BeguilingGlitter(BossModule module) : Components.StatusDrivenForcedMarch(module, 2, (uint)SID.ForwardMarch, (uint)SID.AboutFace, (uint)SID.LeftFace, (uint)SID.RightFace, activationLimit: 8); class FaerieRing(BossModule module, AID aid) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(aid), new AOEShapeDonut(6, 12)); // TODO: verify inner radius class NFaerieRing(BossModule module) : FaerieRing(module, AID.NFaerieRing); diff --git a/BossMod/Modules/Endwalker/Criterion/C03AAI/C033Statice/Fireworks.cs b/BossMod/Modules/Endwalker/Criterion/C03AAI/C033Statice/Fireworks.cs index bb5759f4dc..d1dd66a5aa 100644 --- a/BossMod/Modules/Endwalker/Criterion/C03AAI/C033Statice/Fireworks.cs +++ b/BossMod/Modules/Endwalker/Criterion/C03AAI/C033Statice/Fireworks.cs @@ -178,20 +178,14 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } // TODO: assign spread safespots based on initial missile position -class Fireworks1Hints : BossComponent +class Fireworks1Hints(BossModule module) : BossComponent(module) { - private RingARingOExplosions? _bombs; - private Fireworks? _fireworks; + private RingARingOExplosions? _bombs = module.FindComponent(); + private Fireworks? _fireworks = module.FindComponent(); private BitMask _pattern; private List _safeSpotsClaw = new(); private List _safeSpotsMissile = new(); - public Fireworks1Hints(BossModule module) : base(module) - { - _bombs = module.FindComponent(); - _fireworks = module.FindComponent(); - } - public override void Update() { if (_pattern.Any() || _bombs == null || _bombs.ActiveBombs.Count < 3) @@ -290,20 +284,13 @@ public override void DrawArenaForeground(int pcSlot, Actor pc) } // TODO: currently this assumes that DD always go rel-west, supports rel-east -class Fireworks2Hints : BossComponent +class Fireworks2Hints(BossModule module) : BossComponent(module) { - private Fireworks? _fireworks; - private Dartboard? _dartboard; - private FireSpread? _fireSpread; + private Fireworks? _fireworks = module.FindComponent(); + private Dartboard? _dartboard = module.FindComponent(); + private FireSpread? _fireSpread = module.FindComponent(); private Angle? _relNorth; - public Fireworks2Hints(BossModule module) : base(module) - { - _fireworks = module.FindComponent(); - _dartboard = module.FindComponent(); - _fireSpread = module.FindComponent(); - } - public override void Update() { if (_relNorth == null && _fireSpread?.Sequences.Count == 3 && _dartboard != null && _dartboard.ForbiddenColor != Dartboard.Color.None) diff --git a/BossMod/Modules/Endwalker/Criterion/C03AAI/C033Statice/TrickReload.cs b/BossMod/Modules/Endwalker/Criterion/C03AAI/C033Statice/TrickReload.cs index f7d6771b45..2c8246fedd 100644 --- a/BossMod/Modules/Endwalker/Criterion/C03AAI/C033Statice/TrickReload.cs +++ b/BossMod/Modules/Endwalker/Criterion/C03AAI/C033Statice/TrickReload.cs @@ -32,15 +32,10 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } } -class Trapshooting : Components.UniformStackSpread +class Trapshooting(BossModule module) : Components.UniformStackSpread(module, 6, 6, 4, alwaysShowSpreads: true) { public int NumResolves { get; private set; } - private TrickReload? _reload; - - public Trapshooting(BossModule module) : base(module, 6, 6, 4, alwaysShowSpreads: true) - { - _reload = module.FindComponent(); - } + private TrickReload? _reload = module.FindComponent(); public override void OnCastStarted(Actor caster, ActorCastInfo spell) { diff --git a/BossMod/Modules/Endwalker/EndwalkerConfig.cs b/BossMod/Modules/Endwalker/EndwalkerConfig.cs index 559c6b2621..69683596b8 100644 --- a/BossMod/Modules/Endwalker/EndwalkerConfig.cs +++ b/BossMod/Modules/Endwalker/EndwalkerConfig.cs @@ -1,6 +1,4 @@ namespace BossMod.Endwalker; [ConfigDisplay(Order = 4, Parent = typeof(ModuleConfig))] -public class EndwalkerConfig : ConfigNode -{ -} +public class EndwalkerConfig() : ConfigNode(); diff --git a/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/Aureole.cs b/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/Aureole.cs index 3b5eca8974..c0770debce 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/Aureole.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex2Hydaelyn/Aureole.cs @@ -1,15 +1,10 @@ namespace BossMod.Endwalker.Extreme.Ex2Hydaelyn; // component tracking [lateral] aureole mechanic -class Aureole : BossComponent +class Aureole(BossModule module) : BossComponent(module) { public bool Done { get; private set; } - private AOEShapeCone _aoe = new(40, 75.Degrees()); - - public Aureole(BossModule module) : base(module) - { - _aoe.DirectionOffset = (AID)(Module.PrimaryActor.CastInfo?.Action.ID ?? 0) is AID.LateralAureole1 or AID.LateralAureole2 ? -90.Degrees() : 0.Degrees(); - } + private AOEShapeCone _aoe = new(40, 75.Degrees(), (AID)(module.PrimaryActor.CastInfo?.Action.ID ?? 0) is AID.LateralAureole1 or AID.LateralAureole2 ? -90.Degrees() : 0.Degrees()); public override void AddHints(int slot, Actor actor, TextHints hints) { diff --git a/BossMod/Modules/Endwalker/Extreme/Ex7Zeromus/VisceralWhirl.cs b/BossMod/Modules/Endwalker/Extreme/Ex7Zeromus/VisceralWhirl.cs index 039e90def6..26a0e49e16 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex7Zeromus/VisceralWhirl.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex7Zeromus/VisceralWhirl.cs @@ -38,17 +38,12 @@ public override void OnCastFinished(Actor caster, ActorCastInfo spell) class MiasmicBlast(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.MiasmicBlast), new AOEShapeCross(60, 5)); -class VoidBio : Components.GenericAOEs +class VoidBio(BossModule module) : Components.GenericAOEs(module) { - private IReadOnlyList _bubbles; + private IReadOnlyList _bubbles = module.Enemies(OID.ToxicBubble); private static readonly AOEShapeCircle _shape = new(2); // TODO: verify explosion radius - public VoidBio(BossModule module) : base(module) - { - _bubbles = module.Enemies(OID.ToxicBubble); - } - public override IEnumerable ActiveAOEs(int slot, Actor actor) => _bubbles.Where(actor => !actor.IsDead).Select(b => new AOEInstance(_shape, b.Position)); } diff --git a/BossMod/Modules/Endwalker/Hunt/RankA/Sugriva.cs b/BossMod/Modules/Endwalker/Hunt/RankA/Sugriva.cs index d5b3078233..f3be75018f 100644 --- a/BossMod/Modules/Endwalker/Hunt/RankA/Sugriva.cs +++ b/BossMod/Modules/Endwalker/Hunt/RankA/Sugriva.cs @@ -47,13 +47,8 @@ public override void DrawArenaForeground(int pcSlot, Actor pc) class Spark(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Spark), new AOEShapeDonut(14, 30)); class ScytheTail(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ScytheTail), new AOEShapeCircle(17)); -class Butcher : Components.BaitAwayCast +class Butcher(BossModule module) : Components.BaitAwayCast(module, ActionID.MakeSpell(AID.Butcher), new AOEShapeCone(8, 60.Degrees()), endsOnCastEvent: true) { - public Butcher(BossModule module) : base(module, ActionID.MakeSpell(AID.Butcher), new AOEShapeCone(8, 60.Degrees())) - { - EndsOnCastEvent = true; - } - public override void AddGlobalHints(GlobalHints hints) { if (CurrentBaits.Count > 0) diff --git a/BossMod/Modules/Endwalker/Quest/Endwalker/Endwalker.cs b/BossMod/Modules/Endwalker/Quest/Endwalker/Endwalker.cs index e20b70b092..6ccbbff9db 100644 --- a/BossMod/Modules/Endwalker/Quest/Endwalker/Endwalker.cs +++ b/BossMod/Modules/Endwalker/Quest/Endwalker/Endwalker.cs @@ -60,12 +60,7 @@ class VeilAsunder(BossModule module) : Components.LocationTargetedAOEs(module, A class MortalCoil(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.MortalCoilVisual), new AOEShapeDonut(8, 20)); class DiamondDust(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.DiamondDustVisual), "Raidwide. Turns floor to ice."); class DeadGaze(BossModule module) : Components.CastGaze(module, ActionID.MakeSpell(AID.DeadGazeVisual)); - -class TidalWave2 : Components.KnockbackFromCastTarget -{ - public TidalWave2(BossModule module) : base(module, ActionID.MakeSpell(AID.TidalWaveVisual2), 25, kind: Kind.DirForward) { StopAtWall = true; } -} - +class TidalWave2(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.TidalWaveVisual2), 25, kind: Kind.DirForward, stopAtWall: true); class SwiftAsShadow(BossModule module) : Components.ChargeAOEs(module, ActionID.MakeSpell(AID.SwiftAsShadow), 1); class Extinguishment(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ExtinguishmentVisual), new AOEShapeDonut(10, 30)); class TheEdgeUnbound2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TheEdgeUnbound2), new AOEShapeCircle(10)); diff --git a/BossMod/Modules/Endwalker/Quest/Endwalker/TidalWave.cs b/BossMod/Modules/Endwalker/Quest/Endwalker/TidalWave.cs index 50552dbbfb..5a6e3ac7ae 100644 --- a/BossMod/Modules/Endwalker/Quest/Endwalker/TidalWave.cs +++ b/BossMod/Modules/Endwalker/Quest/Endwalker/TidalWave.cs @@ -1,15 +1,9 @@ namespace BossMod.Endwalker.Quest.Endwalker; -class TidalWave : Components.KnockbackFromCastTarget +// TODO: Make AI function for Destination Unsafe +class TidalWave(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.TidalWaveVisual), 25, kind: Kind.DirForward, stopAtWall: true) { - private Megaflare? _megaflare; - - // TODO: Make AI function for Destination Unsafe - public TidalWave(BossModule module) : base(module, ActionID.MakeSpell(AID.TidalWaveVisual), 25, kind: Kind.DirForward) - { - StopAtWall = true; - _megaflare = module.FindComponent(); - } + private Megaflare? _megaflare = module.FindComponent(); public override bool DestinationUnsafe(int slot, Actor actor, WPos pos) => _megaflare?.ActiveAOEs(slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false; } diff --git a/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/EntanglingWeb.cs b/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/EntanglingWeb.cs index 4b84832cbc..b506630635 100644 --- a/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/EntanglingWeb.cs +++ b/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/EntanglingWeb.cs @@ -2,18 +2,13 @@ class EntanglingWebAOE(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.EntanglingWebAOE), 5); -class EntanglingWebHints : BossComponent +class EntanglingWebHints(BossModule module) : BossComponent(module) { - private IReadOnlyList _pillars; + private IReadOnlyList _pillars = module.Enemies(OID.Pillar); private List _targets = new(); private static readonly float _radius = 5; - public EntanglingWebHints(BossModule module) : base(module) - { - _pillars = module.Enemies(OID.Pillar); - } - public override void AddHints(int slot, Actor actor, TextHints hints) { if (_targets.Contains(actor)) diff --git a/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/PandaemoniacRay.cs b/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/PandaemoniacRay.cs index a289f3a5ec..2da53c8c1e 100644 --- a/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/PandaemoniacRay.cs +++ b/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/PandaemoniacRay.cs @@ -2,18 +2,12 @@ class PandaemoniacRay(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PandaemoniacRayAOE), new AOEShapeRect(30, 25)); -class JadePassage : Components.GenericAOEs +class JadePassage(BossModule module) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.JadePassage)) { - private IReadOnlyList _spheres; - private DateTime _activation; + private IReadOnlyList _spheres = module.Enemies(OID.ArcaneSphere); + private DateTime _activation = module.WorldState.FutureTime(3.6f); private static readonly AOEShapeRect _shape = new(40, 1, 40); - public JadePassage(BossModule module) : base(module, ActionID.MakeSpell(AID.JadePassage)) - { - _spheres = module.Enemies(OID.ArcaneSphere); - _activation = WorldState.FutureTime(3.6f); - } - public override IEnumerable ActiveAOEs(int slot, Actor actor) => _spheres.Where(s => !s.IsDead).Select(s => new AOEInstance(_shape, s.Position, s.Rotation, s.CastInfo?.NPCFinishAt ?? _activation)); } diff --git a/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/Silkspit.cs b/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/Silkspit.cs index fc25f9cdcb..4b6e1e0d80 100644 --- a/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/Silkspit.cs +++ b/BossMod/Modules/Endwalker/Savage/P10SPandaemonium/Silkspit.cs @@ -1,13 +1,8 @@ namespace BossMod.Endwalker.Savage.P10SPandaemonium; -class Silkspit : Components.UniformStackSpread +class Silkspit(BossModule module) : Components.UniformStackSpread(module, 0, 7) { - private IReadOnlyList _pillars; - - public Silkspit(BossModule module) : base(module, 0, 7) - { - _pillars = module.Enemies(OID.Pillar); - } + private IReadOnlyList _pillars = module.Enemies(OID.Pillar); public override void AddHints(int slot, Actor actor, TextHints hints) { diff --git a/BossMod/Modules/Endwalker/Savage/P12S1Athena/EngravementOfSouls1.cs b/BossMod/Modules/Endwalker/Savage/P12S1Athena/EngravementOfSouls1.cs index b38c0e01e0..a4fefdb420 100644 --- a/BossMod/Modules/Endwalker/Savage/P12S1Athena/EngravementOfSouls1.cs +++ b/BossMod/Modules/Endwalker/Savage/P12S1Athena/EngravementOfSouls1.cs @@ -1,6 +1,6 @@ namespace BossMod.Endwalker.Savage.P12S1Athena; -class EngravementOfSouls1Spread : Components.UniformStackSpread +class EngravementOfSouls1Spread(BossModule module) : Components.UniformStackSpread(module, 0, 3, alwaysShowSpreads: true, raidwideOnResolve: false, includeDeadTargets: true) { public enum DebuffType { None, Light, Dark } @@ -10,16 +10,10 @@ struct PlayerState public WPos CachedSafespot; } - private P12S1AthenaConfig _config; - private EngravementOfSoulsTethers? _tethers; + private P12S1AthenaConfig _config = Service.Config.Get(); + private EngravementOfSoulsTethers? _tethers = module.FindComponent(); private PlayerState[] _states = new PlayerState[PartyState.MaxPartySize]; - public EngravementOfSouls1Spread(BossModule module) : base(module, 0, 3, alwaysShowSpreads: true, raidwideOnResolve: false, includeDeadTargets: true) - { - _config = Service.Config.Get(); - _tethers = module.FindComponent(); - } - public override void DrawArenaForeground(int pcSlot, Actor pc) { base.DrawArenaForeground(pcSlot, pc); diff --git a/BossMod/Modules/Endwalker/Savage/P12S1Athena/EngravementOfSouls3.cs b/BossMod/Modules/Endwalker/Savage/P12S1Athena/EngravementOfSouls3.cs index fc91b0f450..81f127350b 100644 --- a/BossMod/Modules/Endwalker/Savage/P12S1Athena/EngravementOfSouls3.cs +++ b/BossMod/Modules/Endwalker/Savage/P12S1Athena/EngravementOfSouls3.cs @@ -38,16 +38,11 @@ public override void OnCastStarted(Actor caster, ActorCastInfo spell) } } -class EngravementOfSouls3Spread : Components.UniformStackSpread +class EngravementOfSouls3Spread(BossModule module) : Components.UniformStackSpread(module, 0, 3, alwaysShowSpreads: true, raidwideOnResolve: false) { - private EngravementOfSoulsTethers? _tethers; + private EngravementOfSoulsTethers? _tethers = module.FindComponent(); private EngravementOfSoulsTethers.TetherType _soakers; - public EngravementOfSouls3Spread(BossModule module) : base(module, 0, 3, alwaysShowSpreads: true, raidwideOnResolve: false) - { - _tethers = module.FindComponent(); - } - public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) { if (IsSpreadTarget(pc)) diff --git a/BossMod/Modules/Endwalker/Savage/P12S1Athena/Palladion.cs b/BossMod/Modules/Endwalker/Savage/P12S1Athena/Palladion.cs index c6052b4875..4adb4ef063 100644 --- a/BossMod/Modules/Endwalker/Savage/P12S1Athena/Palladion.cs +++ b/BossMod/Modules/Endwalker/Savage/P12S1Athena/Palladion.cs @@ -78,18 +78,11 @@ public override void DrawArenaForeground(int pcSlot, Actor pc) } // shockwave is targeted at next jump target; everyone except target and partner should avoid it -class PalladionShockwave : Components.GenericAOEs +class PalladionShockwave(BossModule module) : Components.GenericAOEs(module) { - private Palladion? _palladion; - private WPos _origin; - private DateTime _activation; - - public PalladionShockwave(BossModule module) : base(module) - { - _palladion = module.FindComponent(); - _origin = Module.PrimaryActor.Position; // note: assumed to be activated when cast starts, so boss is in initial jump position; PATE 1E43 happens 1s earlier, but icons only appear right before cast start - _activation = Module.PrimaryActor.CastInfo?.NPCFinishAt.AddSeconds(0.3f) ?? default; - } + private Palladion? _palladion = module.FindComponent(); + private WPos _origin = module.PrimaryActor.Position; + private DateTime _activation = module.PrimaryActor.CastInfo?.NPCFinishAt.AddSeconds(0.3f) ?? default; public override IEnumerable ActiveAOEs(int slot, Actor actor) { @@ -161,17 +154,12 @@ private void UpdateStack(DateTime activation) class PalladionVoidzone(BossModule module) : Components.PersistentVoidzoneAtCastTarget(module, 6, ActionID.MakeSpell(AID.PalladionAOE), m => m.Enemies(OID.PalladionVoidzone).Where(z => z.EventState != 7), 0.9f); -class PalladionClearCut : Components.GenericAOEs +class PalladionClearCut(BossModule module) : Components.GenericAOEs(module) { - private Palladion? _palladion; + private Palladion? _palladion = module.FindComponent(); private static readonly AOEShapeCircle _shape = new(4); // note: it's really a 270? degree cone, but we don't really know rotation early enough, and we just shouldn't stay in center anyway - public PalladionClearCut(BossModule module) : base(module) - { - _palladion = module.FindComponent(); - } - public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_palladion != null && _palladion.NumBaitsDone < _palladion.NumBaitsAssigned && !_palladion.BaitOrder[_palladion.NumBaitsDone]) diff --git a/BossMod/Modules/Endwalker/Savage/P12S2PallasAthena/ClassicalConcepts.cs b/BossMod/Modules/Endwalker/Savage/P12S2PallasAthena/ClassicalConcepts.cs index 7080bd4c1f..967581449e 100644 --- a/BossMod/Modules/Endwalker/Savage/P12S2PallasAthena/ClassicalConcepts.cs +++ b/BossMod/Modules/Endwalker/Savage/P12S2PallasAthena/ClassicalConcepts.cs @@ -2,7 +2,7 @@ // note: rows at Z=100, 92, 84; columns at X=88, 96, 104, 112 // note: assumes standard assignments (BPOG columns, alpha to tri, beta to square) -class ClassicalConcepts : BossComponent +class ClassicalConcepts(BossModule module, bool invert) : BossComponent(module) { enum Debuff { None, Alpha, Beta } @@ -15,23 +15,15 @@ struct PlayerState public int NumPlayerTethers { get; private set; } public int NumShapeTethers { get; private set; } - private IReadOnlyList _hexa; - private IReadOnlyList _tri; - private IReadOnlyList _sq; + private IReadOnlyList _hexa = module.Enemies(OID.ConceptOfWater); + private IReadOnlyList _tri = module.Enemies(OID.ConceptOfFire); + private IReadOnlyList _sq = module.Enemies(OID.ConceptOfEarth); private (WPos hexa, WPos tri, WPos sq)[] _resolvedShapes = new(WPos, WPos, WPos)[4]; private PlayerState[] _states = Utils.MakeArray(PartyState.MaxPartySize, new PlayerState() { Column = -1, PartnerSlot = -1 }); - private bool _invert; + private bool _invert = invert; private bool _showShapes = true; private bool _showTethers = true; - public ClassicalConcepts(BossModule module, bool invert) : base(module) - { - _hexa = module.Enemies(OID.ConceptOfWater); - _tri = module.Enemies(OID.ConceptOfFire); - _sq = module.Enemies(OID.ConceptOfEarth); - _invert = invert; - } - public override void AddHints(int slot, Actor actor, TextHints hints) { if (PlayerShapes(slot) is var shapes && shapes.hexa != default && shapes.linked != default) diff --git a/BossMod/Modules/Endwalker/Savage/P3SPhoinix/TrailOfCondemnation.cs b/BossMod/Modules/Endwalker/Savage/P3SPhoinix/TrailOfCondemnation.cs index 8f5172a3ed..ce43508f86 100644 --- a/BossMod/Modules/Endwalker/Savage/P3SPhoinix/TrailOfCondemnation.cs +++ b/BossMod/Modules/Endwalker/Savage/P3SPhoinix/TrailOfCondemnation.cs @@ -1,20 +1,15 @@ namespace BossMod.Endwalker.Savage.P3SPhoinix; // state related to trail of condemnation mechanic -class TrailOfCondemnation : BossComponent +class TrailOfCondemnation(BossModule module) : BossComponent(module) { public bool Done { get; private set; } = false; - private bool _isCenter; + private bool _isCenter = module.PrimaryActor.CastInfo?.IsSpell(AID.TrailOfCondemnationCenter) ?? false; private static readonly float _halfWidth = 7.5f; private static readonly float _sidesOffset = 12.5f; private static readonly float _aoeRadius = 6; - public TrailOfCondemnation(BossModule module) : base(module) - { - _isCenter = Module.PrimaryActor.CastInfo?.IsSpell(AID.TrailOfCondemnationCenter) ?? false; - } - public override void AddHints(int slot, Actor actor, TextHints hints) { if (Module.PrimaryActor.Position == Module.Bounds.Center) diff --git a/BossMod/Modules/Endwalker/Savage/P7SAgdistis/ForbiddenFruit5.cs b/BossMod/Modules/Endwalker/Savage/P7SAgdistis/ForbiddenFruit5.cs index cd12605325..9ed56ebdf3 100644 --- a/BossMod/Modules/Endwalker/Savage/P7SAgdistis/ForbiddenFruit5.cs +++ b/BossMod/Modules/Endwalker/Savage/P7SAgdistis/ForbiddenFruit5.cs @@ -1,17 +1,12 @@ namespace BossMod.Endwalker.Savage.P7SAgdistis; // TODO: improve! -class ForbiddenFruit5 : ForbiddenFruitCommon +class ForbiddenFruit5(BossModule module) : ForbiddenFruitCommon(module, ActionID.MakeSpell(AID.Burst)) { - private IReadOnlyList _towers; + private IReadOnlyList _towers = module.Enemies(OID.Tower); private const float _towerRadius = 5; - public ForbiddenFruit5(BossModule module) : base(module, ActionID.MakeSpell(AID.Burst)) - { - _towers = module.Enemies(OID.Tower); - } - public override void DrawArenaForeground(int pcSlot, Actor pc) { var tetherSource = TetherSources[pcSlot]; diff --git a/BossMod/Modules/Endwalker/Savage/P9SKokytos/ArchaicRockbreaker.cs b/BossMod/Modules/Endwalker/Savage/P9SKokytos/ArchaicRockbreaker.cs index 3ed7f330e1..274d1bc129 100644 --- a/BossMod/Modules/Endwalker/Savage/P9SKokytos/ArchaicRockbreaker.cs +++ b/BossMod/Modules/Endwalker/Savage/P9SKokytos/ArchaicRockbreaker.cs @@ -2,16 +2,10 @@ class ArchaicRockbreakerCenter(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.ArchaicRockbreakerCenter), 6); -class ArchaicRockbreakerShockwave : Components.Knockback +class ArchaicRockbreakerShockwave(BossModule module) : Components.Knockback(module, ActionID.MakeSpell(AID.ArchaicRockbreakerShockwave), true) { - private Uplift? _uplift; - private DateTime _activation; - - public ArchaicRockbreakerShockwave(BossModule module) : base(module, ActionID.MakeSpell(AID.ArchaicRockbreakerShockwave), true) - { - _uplift = module.FindComponent(); - _activation = WorldState.FutureTime(6.5f); - } + private Uplift? _uplift = module.FindComponent(); + private DateTime _activation = module.WorldState.FutureTime(6.5f); public override IEnumerable Sources(int slot, Actor actor) { diff --git a/BossMod/Modules/Endwalker/Savage/P9SKokytos/Charibdys.cs b/BossMod/Modules/Endwalker/Savage/P9SKokytos/Charibdys.cs index 93f8d9da1c..a081224884 100644 --- a/BossMod/Modules/Endwalker/Savage/P9SKokytos/Charibdys.cs +++ b/BossMod/Modules/Endwalker/Savage/P9SKokytos/Charibdys.cs @@ -19,19 +19,13 @@ public override void DrawArenaForeground(int pcSlot, Actor pc) class CometImpact(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.CometImpact), new AOEShapeCircle(10)); // TODO: verify falloff class CometBurst(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.CometBurstLong), new AOEShapeCircle(10)); -class BeastlyBile : Components.UniformStackSpread +class BeastlyBile(BossModule module) : Components.UniformStackSpread(module, 6, 0, 4) { public int NumCasts { get; private set; } - private Comet? _comet; - private DateTime _activation; + private Comet? _comet = module.FindComponent(); + private DateTime _activation = module.WorldState.FutureTime(15); // assuming component is activated after proximity private BitMask _forbiddenPlayers; - public BeastlyBile(BossModule module) : base(module, 6, 0, 4) -{ - _comet = module.FindComponent(); - _activation = WorldState.FutureTime(15); // assuming component is activated after proximity - } - public override void AddHints(int slot, Actor actor, TextHints hints) { base.AddHints(slot, actor, hints); @@ -65,17 +59,12 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } } -class Thunderbolt : Components.GenericBaitAway +class Thunderbolt(BossModule module) : Components.GenericBaitAway(module, ActionID.MakeSpell(AID.ThunderboltAOE)) { - private Comet? _comet; + private Comet? _comet = module.FindComponent(); private static readonly AOEShapeCone _shape = new(40, 22.5f.Degrees()); - public Thunderbolt(BossModule module) : base(module, ActionID.MakeSpell(AID.ThunderboltAOE)) - { - _comet = module.FindComponent(); - } - public override void Update() { CurrentBaits.Clear(); diff --git a/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouMeganereis.cs b/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouMeganereis.cs index 4412258b89..6007efb977 100644 --- a/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouMeganereis.cs +++ b/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouMeganereis.cs @@ -42,9 +42,8 @@ public enum AID : uint class Ceras(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.Ceras)); -class WaveOfTurmoil : Components.KnockbackFromCastTarget +class WaveOfTurmoil(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.WaveOfTurmoil), 20, stopAtWall: true) { - public WaveOfTurmoil(BossModule module) : base(module, ActionID.MakeSpell(AID.WaveOfTurmoil), 20) { StopAtWall = true; } public override bool DestinationUnsafe(int slot, Actor actor, WPos pos) => Module.FindComponent()?.ActiveAOEs(slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false; } diff --git a/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouStyphnolobion.cs b/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouStyphnolobion.cs index e42e413113..546ef5ec23 100644 --- a/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouStyphnolobion.cs +++ b/BossMod/Modules/Endwalker/TreasureHunt/TheShiftingGymnasionAgonon/GymnasiouStyphnolobion.cs @@ -41,14 +41,7 @@ public enum AID : uint class Rake(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.Rake)); class Tiiimbeeer(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.Tiiimbeeer)); class StoneIII(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.StoneIII2), 6); - -class EarthShaker : Components.BaitAwayCast -{ - public EarthShaker(BossModule module) : base(module, ActionID.MakeSpell(AID.EarthShaker2), new AOEShapeCone(60, 15.Degrees())) - { - EndsOnCastEvent = true; - } -} +class EarthShaker(BossModule module) : Components.BaitAwayCast(module, ActionID.MakeSpell(AID.EarthShaker2), new AOEShapeCone(60, 15.Degrees()), endsOnCastEvent: true); class EarthQuaker(BossModule module) : Components.ConcentricAOEs(module, _shapes) { diff --git a/BossMod/Modules/Endwalker/Ultimate/DSW1/ShiningBlade.cs b/BossMod/Modules/Endwalker/Ultimate/DSW1/ShiningBlade.cs index f5c5af986c..250093c4e8 100644 --- a/BossMod/Modules/Endwalker/Ultimate/DSW1/ShiningBlade.cs +++ b/BossMod/Modules/Endwalker/Ultimate/DSW1/ShiningBlade.cs @@ -1,21 +1,12 @@ namespace BossMod.Endwalker.Ultimate.DSW1; -class ShiningBladeKnockback : Components.KnockbackFromCastTarget +class ShiningBladeKnockback(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.FaithUnmoving), 16) { - private WDir _dirToAdelphel; // we don't want to be knocked near adelphel - private IReadOnlyList _tears; // we don't want to be knocked into them + private WDir _dirToAdelphel = (module.Enemies(OID.SerAdelphel).FirstOrDefault()?.Position ?? module.Bounds.Center) - module.Bounds.Center; // we don't want to be knocked near adelphel + private IReadOnlyList _tears = module.Enemies(OID.AetherialTear); // we don't want to be knocked into them private static readonly float _tearRadius = 9; // TODO: verify - public ShiningBladeKnockback(BossModule module) : base(module, ActionID.MakeSpell(AID.FaithUnmoving), 16) - { - var adelphel = module.Enemies(OID.SerAdelphel).FirstOrDefault(); - if (adelphel != null) - _dirToAdelphel = adelphel.Position - Module.Bounds.Center; - - _tears = module.Enemies(OID.AetherialTear); - } - public override void AddHints(int slot, Actor actor, TextHints hints) { foreach (var e in CalculateMovements(slot, actor)) diff --git a/BossMod/Modules/Endwalker/Ultimate/DSW2/P2SanctityOfTheWard1.cs b/BossMod/Modules/Endwalker/Ultimate/DSW2/P2SanctityOfTheWard1.cs index e3c6ea5138..26b53d2957 100644 --- a/BossMod/Modules/Endwalker/Ultimate/DSW2/P2SanctityOfTheWard1.cs +++ b/BossMod/Modules/Endwalker/Ultimate/DSW2/P2SanctityOfTheWard1.cs @@ -9,15 +9,10 @@ public P2SanctityOfTheWard1Gaze(BossModule module) : base(module, OID.BossP2) } // sacred sever - distance-based shared damage on 1/2/1/2 markers -class P2SanctityOfTheWard1Sever : Components.UniformStackSpread +class P2SanctityOfTheWard1Sever(BossModule module) : Components.UniformStackSpread(module, 6, 0, 4) { public int NumCasts { get; private set; } - public Actor? Source { get; private set; } - - public P2SanctityOfTheWard1Sever(BossModule module) : base(module, 6, 0, 4) - { - Source = module.Enemies(OID.SerZephirin).FirstOrDefault(); - } + public Actor? Source { get; private set; } = module.Enemies(OID.SerZephirin).FirstOrDefault(); public override void DrawArenaForeground(int pcSlot, Actor pc) { @@ -169,22 +164,16 @@ private Angle BuildChargeInfo(OID oid) } // hints & assignments -class P2SanctityOfTheWard1Hints : BossComponent +class P2SanctityOfTheWard1Hints(BossModule module) : BossComponent(module) { - private P2SanctityOfTheWard1Sever? _sever; - private P2SanctityOfTheWard1Flares? _flares; + private P2SanctityOfTheWard1Sever? _sever = module.FindComponent(); + private P2SanctityOfTheWard1Flares? _flares = module.FindComponent(); private bool _inited; private Angle _severStartDir; private bool _chargeEarly; private BitMask _groupEast; // 0 until initialized private string _groupSwapHints = ""; - public P2SanctityOfTheWard1Hints(BossModule module) : base(module) - { - _sever = module.FindComponent(); - _flares = module.FindComponent(); - } - public override void Update() { if (!_inited && _sever?.Source != null && _sever.Stacks.Count == 2 && _flares != null && _flares.ChargeAngle != default) diff --git a/BossMod/Modules/Endwalker/Ultimate/DSW2/P2StrengthOfTheWard2.cs b/BossMod/Modules/Endwalker/Ultimate/DSW2/P2StrengthOfTheWard2.cs index b807268a92..632165fba6 100644 --- a/BossMod/Modules/Endwalker/Ultimate/DSW2/P2StrengthOfTheWard2.cs +++ b/BossMod/Modules/Endwalker/Ultimate/DSW2/P2StrengthOfTheWard2.cs @@ -97,18 +97,12 @@ private IEnumerable EnumSafeSpots(Actor player) class P2StrengthOfTheWard2Voidzones(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.DimensionalCollapseAOE), 9, "GTFO from voidzone aoe!"); // charges on tethered targets -class P2StrengthOfTheWard2Charges : Components.CastCounter +class P2StrengthOfTheWard2Charges(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.HolyShieldBash)) { - private List _chargeSources = new(); + private List _chargeSources = [.. module.Enemies(OID.SerAdelphel), .. module.Enemies(OID.SerJanlenoux)]; private static readonly float _chargeHalfWidth = 4; - public P2StrengthOfTheWard2Charges(BossModule module) : base(module, ActionID.MakeSpell(AID.HolyShieldBash)) - { - _chargeSources.AddRange(module.Enemies(OID.SerAdelphel)); - _chargeSources.AddRange(module.Enemies(OID.SerJanlenoux)); - } - public override void AddHints(int slot, Actor actor, TextHints hints) { if (NumCasts > 0) diff --git a/BossMod/Modules/Endwalker/Ultimate/DSW2/P5WrathOfTheHeavens.cs b/BossMod/Modules/Endwalker/Ultimate/DSW2/P5WrathOfTheHeavens.cs index 9381ad7aaa..76ba9be821 100644 --- a/BossMod/Modules/Endwalker/Ultimate/DSW2/P5WrathOfTheHeavens.cs +++ b/BossMod/Modules/Endwalker/Ultimate/DSW2/P5WrathOfTheHeavens.cs @@ -100,21 +100,15 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } } -class P5WrathOfTheHeavensTwister : Components.GenericAOEs +class P5WrathOfTheHeavensTwister(BossModule module) : Components.GenericAOEs(module, default, "GTFO from twister!") { - private List _predicted = new(); - private IReadOnlyList _voidzones; + private List _predicted = [.. module.Raid.WithoutSlot().Select(a => a.Position)]; + private IReadOnlyList _voidzones = module.Enemies(OID.VoidzoneTwister); private static readonly AOEShapeCircle _shape = new(2); // TODO: verify radius public bool Active => _voidzones.Count > 0; - public P5WrathOfTheHeavensTwister(BossModule module) : base(module, default, "GTFO from twister!") - { - _predicted.AddRange(Raid.WithoutSlot().Select(a => a.Position)); - _voidzones = module.Enemies(OID.VoidzoneTwister); - } - public override IEnumerable ActiveAOEs(int slot, Actor actor) { foreach (var p in _predicted) diff --git a/BossMod/Modules/Endwalker/Ultimate/DSW2/P6AkhAfah.cs b/BossMod/Modules/Endwalker/Ultimate/DSW2/P6AkhAfah.cs index e077b8f685..2421549f97 100644 --- a/BossMod/Modules/Endwalker/Ultimate/DSW2/P6AkhAfah.cs +++ b/BossMod/Modules/Endwalker/Ultimate/DSW2/P6AkhAfah.cs @@ -1,15 +1,9 @@ namespace BossMod.Endwalker.Ultimate.DSW2; -class P6HPCheck : BossComponent +class P6HPCheck(BossModule module) : BossComponent(module) { - private Actor? _nidhogg; - private Actor? _hraesvelgr; - - public P6HPCheck(BossModule module) : base(module) - { - _nidhogg = module.Enemies(OID.NidhoggP6).FirstOrDefault(); - _hraesvelgr = module.Enemies(OID.HraesvelgrP6).FirstOrDefault(); - } + private Actor? _nidhogg = module.Enemies(OID.NidhoggP6).FirstOrDefault(); + private Actor? _hraesvelgr = module.Enemies(OID.HraesvelgrP6).FirstOrDefault(); public override void AddGlobalHints(GlobalHints hints) { diff --git a/BossMod/Modules/Endwalker/Ultimate/DSW2/P6HallowedWings.cs b/BossMod/Modules/Endwalker/Ultimate/DSW2/P6HallowedWings.cs index 8ef6cc1c64..9b2b1ec413 100644 --- a/BossMod/Modules/Endwalker/Ultimate/DSW2/P6HallowedWings.cs +++ b/BossMod/Modules/Endwalker/Ultimate/DSW2/P6HallowedWings.cs @@ -46,19 +46,14 @@ public P6CauterizeN(BossModule module) : base(module, ActionID.MakeSpell(AID.Cau public override IEnumerable ActiveAOEs(int slot, Actor actor) => Utils.ZeroOrOne(AOE); } -abstract class P6HallowedPlume : Components.GenericBaitAway +abstract class P6HallowedPlume(BossModule module) : Components.GenericBaitAway(module, ActionID.MakeSpell(AID.HallowedPlume), centerAtTarget: true) { - protected P6HallowedWings? _wings; + protected P6HallowedWings? _wings = module.FindComponent(); protected bool _far; private Actor? _caster; private static readonly AOEShapeCircle _shape = new(10); - public P6HallowedPlume(BossModule module) : base(module, ActionID.MakeSpell(AID.HallowedPlume), centerAtTarget: true) - { - _wings = module.FindComponent(); - } - public override void Update() { CurrentBaits.Clear(); @@ -130,14 +125,9 @@ public override void OnCastStarted(Actor caster, ActorCastInfo spell) protected abstract IEnumerable SafeSpots(Actor actor); } -class P6HallowedPlume1 : P6HallowedPlume +class P6HallowedPlume1(BossModule module) : P6HallowedPlume(module) { - private P6CauterizeN? _cauterize; - - public P6HallowedPlume1(BossModule module) : base(module) - { - _cauterize = module.FindComponent(); - } + private P6CauterizeN? _cauterize = module.FindComponent(); protected override IEnumerable SafeSpots(Actor actor) { @@ -164,14 +154,9 @@ protected override IEnumerable SafeSpots(Actor actor) } } -class P6HallowedPlume2 : P6HallowedPlume +class P6HallowedPlume2(BossModule module) : P6HallowedPlume(module) { - private P6HotWingTail? _wingTail; - - public P6HallowedPlume2(BossModule module) : base(module) - { - _wingTail = module.FindComponent(); - } + private P6HotWingTail? _wingTail = module.FindComponent(); protected override IEnumerable SafeSpots(Actor actor) { diff --git a/BossMod/Modules/Endwalker/Ultimate/DSW2/P6WrothFlames.cs b/BossMod/Modules/Endwalker/Ultimate/DSW2/P6WrothFlames.cs index 11fde026cc..1c1bc408e6 100644 --- a/BossMod/Modules/Endwalker/Ultimate/DSW2/P6WrothFlames.cs +++ b/BossMod/Modules/Endwalker/Ultimate/DSW2/P6WrothFlames.cs @@ -77,16 +77,10 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) class P6AkhMornVoidzone(BossModule module) : Components.PersistentVoidzone(module, 6, m => m.Enemies(OID.VoidzoneAhkMorn).Where(z => z.EventState != 7)); -class P6SpreadingEntangledFlames : Components.UniformStackSpread +class P6SpreadingEntangledFlames(BossModule module) : Components.UniformStackSpread(module, 4, 5, 2, alwaysShowSpreads: true) { - private P6HotWingTail? _wingTail; - private bool _voidzonesNorth; - - public P6SpreadingEntangledFlames(BossModule module) : base(module, 4, 5, 2, alwaysShowSpreads: true) - { - _wingTail = module.FindComponent(); - _voidzonesNorth = module.Enemies(OID.VoidzoneAhkMorn).Sum(z => z.Position.Z - Module.Bounds.Center.Z) < 0; - } + private P6HotWingTail? _wingTail = module.FindComponent(); + private bool _voidzonesNorth = module.Enemies(OID.VoidzoneAhkMorn).Sum(z => z.Position.Z - module.Bounds.Center.Z) < 0; public override void AddMovementHints(int slot, Actor actor, MovementHints movementHints) { diff --git a/BossMod/Modules/Endwalker/Ultimate/DSW2/P6Wyrmsbreath.cs b/BossMod/Modules/Endwalker/Ultimate/DSW2/P6Wyrmsbreath.cs index 04c11c1809..9c5003599d 100644 --- a/BossMod/Modules/Endwalker/Ultimate/DSW2/P6Wyrmsbreath.cs +++ b/BossMod/Modules/Endwalker/Ultimate/DSW2/P6Wyrmsbreath.cs @@ -94,14 +94,9 @@ class P6Wyrmsbreath1(BossModule module) : P6Wyrmsbreath(module, true); class P6Wyrmsbreath2(BossModule module) : P6Wyrmsbreath(module, false); // note: it is actually symmetrical (both tanks get tankbusters), but that is hard to express, so we select one to show arbitrarily (nidhogg) -class P6WyrmsbreathTankbusterShared : Components.GenericSharedTankbuster +class P6WyrmsbreathTankbusterShared(BossModule module) : Components.GenericSharedTankbuster(module, ActionID.MakeSpell(AID.DarkOrb), 6) { - private P6Wyrmsbreath? _main; - - public P6WyrmsbreathTankbusterShared(BossModule module) : base(module, ActionID.MakeSpell(AID.DarkOrb), 6) - { - _main = module.FindComponent(); - } + private P6Wyrmsbreath? _main = module.FindComponent(); public override void Update() { @@ -115,17 +110,12 @@ public override void Update() } } -class P6WyrmsbreathTankbusterSolo : Components.GenericBaitAway +class P6WyrmsbreathTankbusterSolo(BossModule module) : Components.GenericBaitAway(module, centerAtTarget: true) { - private P6Wyrmsbreath? _main; + private P6Wyrmsbreath? _main = module.FindComponent(); private static readonly AOEShapeCircle _shape = new(15); - public P6WyrmsbreathTankbusterSolo(BossModule module) : base(module, centerAtTarget: true) - { - _main = module.FindComponent(); - } - public override void Update() { CurrentBaits.Clear(); @@ -139,17 +129,12 @@ public override void Update() } } -class P6WyrmsbreathCone : Components.GenericAOEs +class P6WyrmsbreathCone(BossModule module) : Components.GenericAOEs(module) { - private P6Wyrmsbreath? _main; + private P6Wyrmsbreath? _main = module.FindComponent(); private static readonly AOEShapeCone _shape = new(50, 15.Degrees()); // TODO: verify angle - public P6WyrmsbreathCone(BossModule module) : base(module) - { - _main = module.FindComponent(); - } - public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_main?.Glows.Raw is 1 or 2) diff --git a/BossMod/Modules/Endwalker/Ultimate/DSW2/P7Trinity.cs b/BossMod/Modules/Endwalker/Ultimate/DSW2/P7Trinity.cs index e0b63b6d83..62698fdaed 100644 --- a/BossMod/Modules/Endwalker/Ultimate/DSW2/P7Trinity.cs +++ b/BossMod/Modules/Endwalker/Ultimate/DSW2/P7Trinity.cs @@ -1,17 +1,12 @@ namespace BossMod.Endwalker.Ultimate.DSW2; // TODO: improve... -class P7Trinity : Components.GenericBaitAway +class P7Trinity(BossModule module) : Components.GenericBaitAway(module, centerAtTarget: true) { - private Actor? _source; + private Actor? _source = module.Enemies(OID.DragonKingThordan).FirstOrDefault(); private static readonly AOEShapeCircle _shape = new(3); - public P7Trinity(BossModule module) : base(module, centerAtTarget: true) - { - _source = module.Enemies(OID.DragonKingThordan).FirstOrDefault(); - } - public override void Update() { CurrentBaits.Clear(); diff --git a/BossMod/Modules/Endwalker/Ultimate/TOP/P1Pantokrator.cs b/BossMod/Modules/Endwalker/Ultimate/TOP/P1Pantokrator.cs index a2fb963aca..1892109799 100644 --- a/BossMod/Modules/Endwalker/Ultimate/TOP/P1Pantokrator.cs +++ b/BossMod/Modules/Endwalker/Ultimate/TOP/P1Pantokrator.cs @@ -2,10 +2,10 @@ class P1BallisticImpact(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.BallisticImpact), 5); -class P1FlameThrower : Components.GenericAOEs +class P1FlameThrower(BossModule module) : Components.GenericAOEs(module) { public List Casters = new(); - private P1Pantokrator? _pantokrator; + private P1Pantokrator? _pantokrator = module.FindComponent(); private static readonly AOEShapeCone _shape = new(65, 30.Degrees()); @@ -17,11 +17,6 @@ public override IEnumerable ActiveAOEs(int slot, Actor actor) yield return new(_shape, c.Position, c.CastInfo!.Rotation, c.CastInfo.NPCFinishAt, ArenaColor.Danger, true); } - public P1FlameThrower(BossModule module) : base(module) - { - _pantokrator = module.FindComponent(); - } - public override void DrawArenaForeground(int pcSlot, Actor pc) { if (Casters.Count == 0 || NumCasts > 0) diff --git a/BossMod/Modules/Endwalker/Ultimate/TOP/P2PartySynergy.cs b/BossMod/Modules/Endwalker/Ultimate/TOP/P2PartySynergy.cs index ba20e4114c..429ac23035 100644 --- a/BossMod/Modules/Endwalker/Ultimate/TOP/P2PartySynergy.cs +++ b/BossMod/Modules/Endwalker/Ultimate/TOP/P2PartySynergy.cs @@ -143,20 +143,14 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } } -class P2PartySynergyOpticalLaser : Components.GenericAOEs +class P2PartySynergyOpticalLaser(BossModule module) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.OpticalLaser)) { - private P2PartySynergy? _synergy; - private Actor? _source; + private P2PartySynergy? _synergy = module.FindComponent(); + private Actor? _source = module.Enemies(OID.OpticalUnit).FirstOrDefault(); private DateTime _activation; private static readonly AOEShapeRect _shape = new(100, 8); - public P2PartySynergyOpticalLaser(BossModule module) : base(module, ActionID.MakeSpell(AID.OpticalLaser)) - { - _synergy = module.FindComponent(); - _source = module.Enemies(OID.OpticalUnit).FirstOrDefault(); - } - public void Show() { _activation = WorldState.FutureTime(6.8f); diff --git a/BossMod/Modules/Endwalker/Ultimate/TOP/P5Delta.cs b/BossMod/Modules/Endwalker/Ultimate/TOP/P5Delta.cs index ebda79e5e3..5ea71e11be 100644 --- a/BossMod/Modules/Endwalker/Ultimate/TOP/P5Delta.cs +++ b/BossMod/Modules/Endwalker/Ultimate/TOP/P5Delta.cs @@ -374,14 +374,9 @@ public override void OnActorPlayActionTimelineEvent(Actor actor, ushort id) } } -class P5DeltaExplosion : Components.LocationTargetedAOEs +class P5DeltaExplosion(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.DeltaExplosion), 3) { - private P5Delta? _delta; - - public P5DeltaExplosion(BossModule module) : base(module, ActionID.MakeSpell(AID.DeltaExplosion), 3) - { - _delta = module.FindComponent(); - } + private P5Delta? _delta = module.FindComponent(); public override void DrawArenaForeground(int pcSlot, Actor pc) { @@ -394,19 +389,14 @@ public override void DrawArenaForeground(int pcSlot, Actor pc) } } -class P5DeltaHyperPulse : Components.GenericAOEs +class P5DeltaHyperPulse(BossModule module) : Components.GenericAOEs(module) { - private P5Delta? _delta; + private P5Delta? _delta = module.FindComponent(); private List _aoes = new(); private static readonly AOEShapeRect _shape = new(100, 4); private static readonly int _numRepeats = 6; - public P5DeltaHyperPulse(BossModule module) : base(module) - { - _delta = module.FindComponent(); - } - public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_aoes.Count > 0) @@ -457,9 +447,9 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } } -class P5DeltaOversampledWaveCannon : Components.UniformStackSpread +class P5DeltaOversampledWaveCannon(BossModule module) : Components.UniformStackSpread(module, 0, 7) { - private P5Delta? _delta; + private P5Delta? _delta = module.FindComponent(); private Actor? _boss; private Angle _bossAngle; private BitMask _bossIntendedTargets; @@ -469,11 +459,6 @@ class P5DeltaOversampledWaveCannon : Components.UniformStackSpread private static readonly AOEShapeRect _shape = new(50, 50); - public P5DeltaOversampledWaveCannon(BossModule module) : base(module, 0, 7) - { - _delta = module.FindComponent(); - } - public override void AddHints(int slot, Actor actor, TextHints hints) { base.AddHints(slot, actor, hints); diff --git a/BossMod/Modules/Endwalker/Ultimate/TOP/P5Omega.cs b/BossMod/Modules/Endwalker/Ultimate/TOP/P5Omega.cs index 8837d5099c..b3e3c54b18 100644 --- a/BossMod/Modules/Endwalker/Ultimate/TOP/P5Omega.cs +++ b/BossMod/Modules/Endwalker/Ultimate/TOP/P5Omega.cs @@ -116,9 +116,9 @@ public override void OnStatusGain(Actor actor, ActorStatus status) } // TODO: assign soakers -class P5OmegaOversampledWaveCannon : Components.UniformStackSpread +class P5OmegaOversampledWaveCannon(BossModule module) : Components.UniformStackSpread(module, 0, 7) { - private P5OmegaNearDistantWorld? _ndw; + private P5OmegaNearDistantWorld? _ndw = module.FindComponent(); private Actor? _boss; private Angle _bossAngle; @@ -126,11 +126,6 @@ class P5OmegaOversampledWaveCannon : Components.UniformStackSpread public bool IsActive => _boss != null; - public P5OmegaOversampledWaveCannon(BossModule module) : base(module, 0, 7) - { - _ndw = module.FindComponent(); - } - public override void Update() { Spreads.Clear(); diff --git a/BossMod/Modules/Endwalker/Ultimate/TOP/P5Sigma.cs b/BossMod/Modules/Endwalker/Ultimate/TOP/P5Sigma.cs index cdaaacd4bb..c4d2b34e87 100644 --- a/BossMod/Modules/Endwalker/Ultimate/TOP/P5Sigma.cs +++ b/BossMod/Modules/Endwalker/Ultimate/TOP/P5Sigma.cs @@ -386,16 +386,11 @@ public override void OnActorPlayActionTimelineEvent(Actor actor, ushort id) } } -class P5SigmaNearDistantWorld : P5NearDistantWorld +class P5SigmaNearDistantWorld(BossModule module) : P5NearDistantWorld(module) { - private P5SigmaRearLasers? _lasers; + private P5SigmaRearLasers? _lasers = module.FindComponent(); private BitMask _dynamisStacks; - public P5SigmaNearDistantWorld(BossModule module) : base(module) - { - _lasers = module.FindComponent(); - } - public override void DrawArenaForeground(int pcSlot, Actor pc) { base.DrawArenaForeground(pcSlot, pc); diff --git a/BossMod/Modules/Endwalker/Unreal/Un3Sophia/Demiurges.cs b/BossMod/Modules/Endwalker/Unreal/Un3Sophia/Demiurges.cs index 89770d51fe..788bb9ae23 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un3Sophia/Demiurges.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un3Sophia/Demiurges.cs @@ -1,19 +1,13 @@ namespace BossMod.Endwalker.Unreal.Un3Sophia; // shows all three demiurges + handles directional parry from first; the reason is to simplify condition checks -class Demiurges : Components.DirectionalParry +class Demiurges(BossModule module) : Components.DirectionalParry(module, (uint)OID.Demiurge1) { - private IReadOnlyList _second = ActorEnumeration.EmptyList; - private IReadOnlyList _third = ActorEnumeration.EmptyList; + private IReadOnlyList _second = module.Enemies(OID.Demiurge2); + private IReadOnlyList _third = module.Enemies(OID.Demiurge3); public bool AddsActive => ActiveActors.Any() || _second.Any(a => a.IsTargetable && !a.IsDead) || _third.Any(a => a.IsTargetable && !a.IsDead); - public Demiurges(BossModule module) : base(module, (uint)OID.Demiurge1) - { - _second = module.Enemies(OID.Demiurge2); - _third = module.Enemies(OID.Demiurge3); - } - public override void DrawArenaForeground(int pcSlot, Actor pc) { base.DrawArenaForeground(pcSlot, pc); diff --git a/BossMod/Modules/Endwalker/Unreal/Un4Zurvan/P2BrokenSeal.cs b/BossMod/Modules/Endwalker/Unreal/Un4Zurvan/P2BrokenSeal.cs index b5e6bc3698..c68091da47 100644 --- a/BossMod/Modules/Endwalker/Unreal/Un4Zurvan/P2BrokenSeal.cs +++ b/BossMod/Modules/Endwalker/Unreal/Un4Zurvan/P2BrokenSeal.cs @@ -1,6 +1,6 @@ namespace BossMod.Endwalker.Unreal.Un4Zurvan; -class P2BrokenSeal : BossComponent +class P2BrokenSeal(BossModule module) : BossComponent(module) { public enum Color { None, Fire, Ice } @@ -14,14 +14,8 @@ public struct PlayerState public int NumAssigned { get; private set; } public int NumCasts { get; private set; } private PlayerState[] _playerStates = Utils.MakeArray(PartyState.MaxPartySize, new PlayerState() { Partner = -1 }); - private IReadOnlyList _fireTowers = ActorEnumeration.EmptyList; - private IReadOnlyList _iceTowers = ActorEnumeration.EmptyList; - - public P2BrokenSeal(BossModule module) : base(module) - { - _fireTowers = module.Enemies(OID.FireTower); - _iceTowers = module.Enemies(OID.IceTower); - } + private IReadOnlyList _fireTowers = module.Enemies(OID.FireTower); + private IReadOnlyList _iceTowers = module.Enemies(OID.IceTower); public override void AddHints(int slot, Actor actor, TextHints hints) { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage18MidsummerNightsExplosion/Stage18Act1.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage18MidsummerNightsExplosion/Stage18Act1.cs index 03a8a1135f..27fa831735 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage18MidsummerNightsExplosion/Stage18Act1.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage18MidsummerNightsExplosion/Stage18Act1.cs @@ -30,13 +30,8 @@ public override void AddHints(int slot, Actor actor, TextHints hints) } } -class WildChargeKB : Components.KnockbackFromCastTarget // knockback actually delayed by 0.5s to 1s, maybe it depends on the rectangle length of the charge -{ - public WildChargeKB(BossModule module) : base(module, ActionID.MakeSpell(AID.WildCharge), 10, kind: Kind.DirForward) - { - StopAtWall = true; - } -} +// knockback actually delayed by 0.5s to 1s, maybe it depends on the rectangle length of the charge +class WildChargeKB(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.WildCharge), 10, kind: Kind.DirForward, stopAtWall: true); class KegExplosion(BossModule module) : Components.GenericStackSpread(module) { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage18MidsummerNightsExplosion/Stage18Act2.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage18MidsummerNightsExplosion/Stage18Act2.cs index 83541cc185..8d898847dc 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage18MidsummerNightsExplosion/Stage18Act2.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage18MidsummerNightsExplosion/Stage18Act2.cs @@ -30,13 +30,8 @@ public override void AddHints(int slot, Actor actor, TextHints hints) } } -class WildChargeKB : Components.KnockbackFromCastTarget -{ //knockback actually delayed by 0.5s to 1s, maybe it depends on the rectangle length of the charge - public WildChargeKB(BossModule module) : base(module, ActionID.MakeSpell(AID.WildCharge), 10, kind: Kind.DirForward) - { - StopAtWall = true; - } -} +// knockback actually delayed by 0.5s to 1s, maybe it depends on the rectangle length of the charge +class WildChargeKB(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.WildCharge), 10, kind: Kind.DirForward, stopAtWall: true); class KegExplosion(BossModule module) : Components.GenericStackSpread(module) { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage20MissTyphon/Stage20Act1.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage20MissTyphon/Stage20Act1.cs index 232d884503..3c73d419d2 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage20MissTyphon/Stage20Act1.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage20MissTyphon/Stage20Act1.cs @@ -15,14 +15,7 @@ public enum AID : uint class Fireball(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Fireball), 8); class Snort(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.Snort), "Use Diamondback!"); - -class SnortKB : Components.KnockbackFromCastTarget -{ //knockback actually delayed by 0.7s - public SnortKB(BossModule module) : base(module, ActionID.MakeSpell(AID.Snort), 30, kind: Kind.AwayFromOrigin) - { - StopAtWall = true; - } -} +class SnortKB(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.Snort), 30, kind: Kind.AwayFromOrigin, stopAtWall: true); // knockback actually delayed by 0.7s class Hints(BossModule module) : BossComponent(module) { diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage27LockUpYourSnorters/Stage27.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage27LockUpYourSnorters/Stage27.cs index 2c6d7bfa38..9eecd2c23c 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage27LockUpYourSnorters/Stage27.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage27LockUpYourSnorters/Stage27.cs @@ -20,27 +20,15 @@ public enum AID : uint } class Fireball(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Fireball), 8); +class Snort(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.Snort), 15, stopAtWall: true); -class Snort : Components.KnockbackFromCastTarget -{ - public Snort(BossModule module) : base(module, ActionID.MakeSpell(AID.Snort), 15) - { - StopAtWall = true; - } -} - -class Fungah : Components.Knockback +class Fungah(BossModule module) : Components.Knockback(module, stopAtWall: true) { private DateTime _activation; private List _bombs = new(); private bool otherpatterns; private static readonly AOEShapeCone cone = new(12.5f, 45.Degrees()); - public Fungah(BossModule module) : base(module) - { - StopAtWall = true; - } - public override IEnumerable Sources(int slot, Actor actor) { if ((_bombs.Count > 0 && _activation != default) || otherpatterns) diff --git a/BossMod/Modules/Global/Quest/FF15Collab/Garuda.cs b/BossMod/Modules/Global/Quest/FF15Collab/Garuda.cs index 8194c700cd..fdc140d801 100644 --- a/BossMod/Modules/Global/Quest/FF15Collab/Garuda.cs +++ b/BossMod/Modules/Global/Quest/FF15Collab/Garuda.cs @@ -160,13 +160,7 @@ public override void DrawArenaBackground(int pcSlot, Actor pc) public override void DrawArenaForeground(int pcSlot, Actor pc) { } } -class MiniSupercellKB : Components.KnockbackFromCastTarget -{ - public MiniSupercellKB(BossModule module) : base(module, ActionID.MakeSpell(AID.MiniSupercell2), 50, shape: new AOEShapeRect(45, 3)) - { - StopAtWall = true; - } -} +class MiniSupercellKB(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.MiniSupercell2), 50, shape: new AOEShapeRect(45, 3), stopAtWall: true); class GravitationalForce(BossModule module) : Components.PersistentVoidzoneAtCastTarget(module, 5, ActionID.MakeSpell(AID.GravitationalForce2), m => m.Enemies(OID.GravityVoidzone), 0); class MistralGaol(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.MistralGaol), "Prepare for Quick Time Event (spam buttons when it starts)"); diff --git a/BossMod/Modules/ModuleConfig.cs b/BossMod/Modules/ModuleConfig.cs index 06449b92af..568d532527 100644 --- a/BossMod/Modules/ModuleConfig.cs +++ b/BossMod/Modules/ModuleConfig.cs @@ -1,6 +1,4 @@ namespace BossMod; [ConfigDisplay(Name = "Encounter-specific settings", Order = 3)] -public class ModuleConfig : ConfigNode -{ -} +public class ModuleConfig() : ConfigNode(); diff --git a/BossMod/Modules/RealmReborn/Dungeon/D10StoneVigil/D102Koshchei.cs b/BossMod/Modules/RealmReborn/Dungeon/D10StoneVigil/D102Koshchei.cs index 87db0c1011..883b5c1782 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D10StoneVigil/D102Koshchei.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D10StoneVigil/D102Koshchei.cs @@ -19,14 +19,9 @@ public enum AID : uint class SpikedTail(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.SpikedTail)); class SonicStorm(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.SonicStorm), 6); -class Typhoon : Components.Exaflare +class Typhoon(BossModule module) : Components.Exaflare(module, 3) { - private IReadOnlyList _maelstroms = ActorEnumeration.EmptyList; - - public Typhoon(BossModule module) : base(module, 3) - { - _maelstroms = module.Enemies(OID.MaelstromVisual); - } + private IReadOnlyList _maelstroms = module.Enemies(OID.MaelstromVisual); public override void Update() { diff --git a/BossMod/Modules/RealmReborn/RealmRebornConfig.cs b/BossMod/Modules/RealmReborn/RealmRebornConfig.cs index cbd7bc2a85..63f01a3605 100644 --- a/BossMod/Modules/RealmReborn/RealmRebornConfig.cs +++ b/BossMod/Modules/RealmReborn/RealmRebornConfig.cs @@ -1,6 +1,4 @@ namespace BossMod.RealmReborn; [ConfigDisplay(Order = 0, Parent = typeof(ModuleConfig))] -public class RealmRebornConfig : ConfigNode -{ -} +public class RealmRebornConfig() : ConfigNode(); diff --git a/BossMod/Modules/RealmReborn/Trial/T04PortaDecumana/T04PortaDecumana2.cs b/BossMod/Modules/RealmReborn/Trial/T04PortaDecumana/T04PortaDecumana2.cs index a151c2e861..6d9dadd5d7 100644 --- a/BossMod/Modules/RealmReborn/Trial/T04PortaDecumana/T04PortaDecumana2.cs +++ b/BossMod/Modules/RealmReborn/Trial/T04PortaDecumana/T04PortaDecumana2.cs @@ -49,13 +49,8 @@ class HomingLasers(BossModule module) : Components.SingleTargetCast(module, Acti class HomingRay(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.HomingRayAOE), 6); class LaserFocus(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.LaserFocusAOE), 6); -class AethericBoom : Components.KnockbackFromCastTarget +class AethericBoom(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.AethericBoom), 30, stopAtWall: true) { - public AethericBoom(BossModule module) : base(module, ActionID.MakeSpell(AID.AethericBoom), 30) - { - StopAtWall = true; - } - public override void AddGlobalHints(GlobalHints hints) { if (Casters.Count > 0) diff --git a/BossMod/Modules/RealmReborn/Trial/T09WhorleaterH/T09WhorleaterHBodyslam.cs b/BossMod/Modules/RealmReborn/Trial/T09WhorleaterH/T09WhorleaterHBodyslam.cs index 05fef3b25d..d3d892d6d5 100644 --- a/BossMod/Modules/RealmReborn/Trial/T09WhorleaterH/T09WhorleaterHBodyslam.cs +++ b/BossMod/Modules/RealmReborn/Trial/T09WhorleaterH/T09WhorleaterHBodyslam.cs @@ -1,15 +1,10 @@ namespace BossMod.RealmReborn.Trial.T09WhorleaterH; -class BodySlamKB : Components.Knockback +class BodySlamKB(BossModule module) : Components.Knockback(module, stopAtWall: true) { private Source? _knockback; private float LeviathanZ; - public BodySlamKB(BossModule module) : base(module) - { - StopAtWall = true; - } - public override IEnumerable Sources(int slot, Actor actor) => Utils.ZeroOrOne(_knockback); public override void Update() diff --git a/BossMod/Modules/RealmReborn/Trial/T09WhorleaterH/T09WhorleaterHSpinningDive.cs b/BossMod/Modules/RealmReborn/Trial/T09WhorleaterH/T09WhorleaterHSpinningDive.cs index 3a02f2b0c8..39daa11465 100644 --- a/BossMod/Modules/RealmReborn/Trial/T09WhorleaterH/T09WhorleaterHSpinningDive.cs +++ b/BossMod/Modules/RealmReborn/Trial/T09WhorleaterH/T09WhorleaterHSpinningDive.cs @@ -20,15 +20,10 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } } -class SpinningDiveKB : Components.Knockback //TODO: Find out how to detect spinning dives earlier eg. the water column telegraph +class SpinningDiveKB(BossModule module) : Components.Knockback(module, stopAtWall: true) //TODO: Find out how to detect spinning dives earlier eg. the water column telegraph { private Source? _knockback; - public SpinningDiveKB(BossModule module) : base(module) - { - StopAtWall = true; - } - public override IEnumerable Sources(int slot, Actor actor) => Utils.ZeroOrOne(_knockback); public override void OnActorCreated(Actor actor) diff --git a/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D033Eros.cs b/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D033Eros.cs index d4a3898ae5..b39b03a0ec 100644 --- a/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D033Eros.cs +++ b/BossMod/Modules/Shadowbringers/Dungeon/D03QitanaRavel/D033Eros.cs @@ -173,13 +173,8 @@ class Inhale(BossModule module) : Components.KnockbackFromCastTarget(module, Act public override bool DestinationUnsafe(int slot, Actor actor, WPos pos) => Module.FindComponent()?.ActiveAOEs(slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false; } -class HeavingBreath : Components.KnockbackFromCastTarget +class HeavingBreath(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.HeavingBreath), 35, kind: Kind.DirForward, stopAtWall: true) { - public HeavingBreath(BossModule module) : base(module, ActionID.MakeSpell(AID.HeavingBreath), 35, kind: Kind.DirForward) - { - StopAtWall = true; - } - //TODO: consider testing if path is unsafe in addition to destination public override bool DestinationUnsafe(int slot, Actor actor, WPos pos) => Module.FindComponent()?.ActiveAOEs(slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false; } diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS3Dahu/FeralHowlHystericAssault.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS3Dahu/FeralHowlHystericAssault.cs index 01805cbf4c..d81d29a65c 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS3Dahu/FeralHowlHystericAssault.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS3Dahu/FeralHowlHystericAssault.cs @@ -1,19 +1,13 @@ namespace BossMod.Shadowbringers.Foray.DelubrumReginae.DRS3Dahu; // these two abilities are very similar, only differ by activation delay and action id -class FeralHowlHystericAssault : Components.Knockback +// TODO: not all the wall is safe... +class FeralHowlHystericAssault(BossModule module, AID aidCast, AID aidAOE, float delay) : Components.Knockback(module, ActionID.MakeSpell(aidAOE), true, stopAtWall: true) { - private AID _aidCast; - private float _delay; + private AID _aidCast = aidCast; + private float _delay = delay; private Source? _source; - public FeralHowlHystericAssault(BossModule module, AID aidCast, AID aidAOE, float delay) : base(module, ActionID.MakeSpell(aidAOE), true) - { - _aidCast = aidCast; - _delay = delay; - StopAtWall = true; // TODO: not all the wall is safe... - } - public override IEnumerable Sources(int slot, Actor actor) => Utils.ZeroOrOne(_source); public override void OnCastStarted(Actor caster, ActorCastInfo spell) diff --git a/BossMod/Modules/Shadowbringers/Foray/Duel/Duel5Menenius/Duel5Menenius.cs b/BossMod/Modules/Shadowbringers/Foray/Duel/Duel5Menenius/Duel5Menenius.cs index bd23fdfb03..6d2f4b516d 100644 --- a/BossMod/Modules/Shadowbringers/Foray/Duel/Duel5Menenius/Duel5Menenius.cs +++ b/BossMod/Modules/Shadowbringers/Foray/Duel/Duel5Menenius/Duel5Menenius.cs @@ -45,14 +45,7 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } } -class MagitekImpetus : Components.StatusDrivenForcedMarch -{ - public MagitekImpetus(BossModule module) : base(module, 3, (uint)SID.ForwardMarch, (uint)SID.AboutFace, (uint)SID.LeftFace, (uint)SID.RightFace) - { - ActivationLimit = 1; - } -} - +class MagitekImpetus(BossModule module) : Components.StatusDrivenForcedMarch(module, 3, (uint)SID.ForwardMarch, (uint)SID.AboutFace, (uint)SID.LeftFace, (uint)SID.RightFace, activationLimit: 1); class ProactiveMunition(BossModule module) : Components.StandardChasingAOEs(module, new AOEShapeCircle(6), ActionID.MakeSpell(AID.ProactiveMunitionTrackingStart), ActionID.MakeSpell(AID.ProactiveMunitionTrackingMove), 6, 1, 5); [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "SourP", GroupType = BossModuleInfo.GroupType.BozjaDuel, GroupID = 778, NameID = 23)] // bnpcname=9695 diff --git a/BossMod/Modules/Shadowbringers/ShadowbringersConfig.cs b/BossMod/Modules/Shadowbringers/ShadowbringersConfig.cs index e58c8b2f63..3a9dccf371 100644 --- a/BossMod/Modules/Shadowbringers/ShadowbringersConfig.cs +++ b/BossMod/Modules/Shadowbringers/ShadowbringersConfig.cs @@ -1,6 +1,4 @@ namespace BossMod.Shadowbringers; [ConfigDisplay(Order = 3, Parent = typeof(ModuleConfig))] -public class ShadowbringersConfig : ConfigNode -{ -} +public class ShadowbringersConfig() : ConfigNode(); diff --git a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretDjinn.cs b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretDjinn.cs index cd7ef56bf1..c56b31d4ef 100644 --- a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretDjinn.cs +++ b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretDjinn.cs @@ -27,36 +27,12 @@ public enum AID : uint class Gust(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Gust), 6); class ChangelessWinds(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ChangelessWinds), new AOEShapeRect(40, 4)); - -class ChangelessWindsKB : Components.KnockbackFromCastTarget -{ - public ChangelessWindsKB(BossModule module) : base(module, ActionID.MakeSpell(AID.ChangelessWinds), 10, shape: new AOEShapeRect(40, 4), kind: Kind.DirForward) - { - StopAtWall = true; - } -} - +class ChangelessWindsKB(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.ChangelessWinds), 10, shape: new AOEShapeRect(40, 4), kind: Kind.DirForward, stopAtWall: true); class Whipwind(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Whipwind), new AOEShapeRect(55, 20)); - -class WhipwindKB : Components.KnockbackFromCastTarget -{ - public WhipwindKB(BossModule module) : base(module, ActionID.MakeSpell(AID.Whipwind), 25, shape: new AOEShapeRect(55, 20), kind: Kind.DirForward) - { - StopAtWall = true; - } -} - +class WhipwindKB(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.Whipwind), 25, shape: new AOEShapeRect(55, 20), kind: Kind.DirForward, stopAtWall: true); class GentleBreeze(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.GentleBreeze), new AOEShapeRect(15, 2)); class WhirlingGaol(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.WhirlingGaol), "Raidwide + Knockback"); - -class WhirlingGaolKB : Components.KnockbackFromCastTarget -{ - public WhirlingGaolKB(BossModule module) : base(module, ActionID.MakeSpell(AID.WhirlingGaol), 25) - { - StopAtWall = true; - } -} - +class WhirlingGaolKB(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.WhirlingGaol), 25, stopAtWall: true); class Spin(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Spin), new AOEShapeCircle(11)); class Mash(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Mash), new AOEShapeRect(13, 2)); class Scoop(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Scoop), new AOEShapeCone(15, 60.Degrees())); diff --git a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretSwallow.cs b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretSwallow.cs index fc43053dd6..1599606ba8 100644 --- a/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretSwallow.cs +++ b/BossMod/Modules/Shadowbringers/TreasureHunt/TheShiftingOubliettesOfLyheGhiah/SecretSwallow.cs @@ -26,13 +26,8 @@ class Hydrocannon(BossModule module) : Components.LocationTargetedAOEs(module, A class Ceras(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.Ceras)); class BodySlam(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.BodySlam), 10); -class BodySlamKB : Components.KnockbackFromCastTarget +class BodySlamKB(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.BodySlam), 20, shape: new AOEShapeCircle(10), stopAtWall: true) { - public BodySlamKB(BossModule module) : base(module, ActionID.MakeSpell(AID.BodySlam), 20, shape: new AOEShapeCircle(10)) - { - StopAtWall = true; - } - public override bool DestinationUnsafe(int slot, Actor actor, WPos pos) => Module.FindComponent()?.ActiveAOEs(slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false; } diff --git a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P1JagdDolls.cs b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P1JagdDolls.cs index 36105bbcff..3d97616bc9 100644 --- a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P1JagdDolls.cs +++ b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P1JagdDolls.cs @@ -1,9 +1,9 @@ namespace BossMod.Shadowbringers.Ultimate.TEA; -class P1JagdDolls : BossComponent +class P1JagdDolls(BossModule module) : BossComponent(module) { public int NumExhausts { get; private set; } - private IReadOnlyList _dolls; + private IReadOnlyList _dolls = module.Enemies(OID.JagdDoll); private HashSet _exhaustsDone = new(); private static readonly float _exhaustRadius = 8.8f; @@ -11,11 +11,6 @@ class P1JagdDolls : BossComponent private IEnumerable ActiveDolls => _dolls.Where(d => d.IsTargetable && !d.IsDead); public bool Active => ActiveDolls.Any(); - public P1JagdDolls(BossModule module) : base(module) - { - _dolls = module.Enemies(OID.JagdDoll); - } - public override void AddHints(int slot, Actor actor, TextHints hints) { if (NumExhausts < 2 && ActiveDolls.InRadius(actor.Position, _exhaustRadius).Count() > 1) diff --git a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P1ProteanWaveLiquid.cs b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P1ProteanWaveLiquid.cs index f4fa1c5aac..536bd10c11 100644 --- a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P1ProteanWaveLiquid.cs +++ b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P1ProteanWaveLiquid.cs @@ -4,17 +4,12 @@ class P1ProteanWaveLiquidVisHelper(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ProteanWaveLiquidVisHelper), new AOEShapeCone(40, 15.Degrees())); // single protean ("shadow") that fires in the direction the boss is facing -class P1ProteanWaveLiquidInvisFixed : Components.GenericAOEs +class P1ProteanWaveLiquidInvisFixed(BossModule module) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.ProteanWaveLiquidInvisBoss)) { - private Actor? _source; + private Actor? _source = module.Enemies(OID.BossP1).FirstOrDefault(); private static readonly AOEShapeCone _shape = new(40, 15.Degrees()); - public P1ProteanWaveLiquidInvisFixed(BossModule module) : base(module, ActionID.MakeSpell(AID.ProteanWaveLiquidInvisBoss)) - { - _source = module.Enemies(OID.BossP1).FirstOrDefault(); - } - public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_source != null) @@ -23,17 +18,12 @@ public override IEnumerable ActiveAOEs(int slot, Actor actor) } // proteans baited on 4 closest targets -class P1ProteanWaveLiquidInvisBaited : Components.GenericBaitAway +class P1ProteanWaveLiquidInvisBaited(BossModule module) : Components.GenericBaitAway(module, ActionID.MakeSpell(AID.ProteanWaveLiquidInvisHelper)) { - private Actor? _source; + private Actor? _source = module.Enemies(OID.BossP1).FirstOrDefault(); private static readonly AOEShapeCone _shape = new(40, 15.Degrees()); - public P1ProteanWaveLiquidInvisBaited(BossModule module) : base(module, ActionID.MakeSpell(AID.ProteanWaveLiquidInvisHelper)) - { - _source = module.Enemies(OID.BossP1).FirstOrDefault(); - } - public override void Update() { CurrentBaits.Clear(); diff --git a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P3Inception3.cs b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P3Inception3.cs index 069f565dcc..7e267070f2 100644 --- a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P3Inception3.cs +++ b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P3Inception3.cs @@ -1,20 +1,14 @@ namespace BossMod.Shadowbringers.Ultimate.TEA; -class P3Inception3Sacrament : Components.GenericAOEs +// note: boss moves to position around the component activation time +class P3Inception3Sacrament(BossModule module) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.SacramentInception)) { public bool Active => _source != null; - private Actor? _source; - private DateTime _activation; + private Actor? _source = ((TEA)module).AlexPrime(); + private DateTime _activation = module.WorldState.FutureTime(4.1f); private static readonly AOEShapeCross _shape = new(100, 8); - public P3Inception3Sacrament(BossModule module) : base(module, ActionID.MakeSpell(AID.SacramentInception)) - { - // note: boss moves to position around the component activation time - _source = ((TEA)module).AlexPrime(); - _activation = WorldState.FutureTime(4.1f); - } - public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_source != null) diff --git a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P3Wormhole.cs b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P3Wormhole.cs index 7ebee79b9b..ceb6b1d564 100644 --- a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P3Wormhole.cs +++ b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P3Wormhole.cs @@ -3,20 +3,15 @@ class P3WormholeLimitCut(BossModule module) : LimitCut(module, 2.7f); class P3WormholeSacrament(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.SacramentWormhole), new AOEShapeCross(100, 8)); -class P3WormholeRepentance : BossComponent +class P3WormholeRepentance(BossModule module) : BossComponent(module) { public int NumSoaks { get; private set; } private bool _chakramsDone; - private LimitCut? _limitCut; + private LimitCut? _limitCut = module.FindComponent(); private List _wormholes = new(); private static readonly float[] _radiuses = { 8, 6, 3 }; - public P3WormholeRepentance(BossModule module) : base(module) - { - _limitCut = module.FindComponent(); - } - public override void AddHints(int slot, Actor actor, TextHints hints) { var alex = ((TEA)Module).AlexPrime(); diff --git a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P4FateCalibrationAlpha.cs b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P4FateCalibrationAlpha.cs index 30f2ae194d..eef8e79d0b 100644 --- a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P4FateCalibrationAlpha.cs +++ b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P4FateCalibrationAlpha.cs @@ -49,19 +49,14 @@ public void ApplyNextRequirement() } } -class P4FateCalibrationAlphaDebuffs : Components.UniformStackSpread +class P4FateCalibrationAlphaDebuffs(BossModule module) : Components.UniformStackSpread(module, 4, 30, 3, alwaysShowSpreads: true) { public enum Debuff { None, Defamation, SharedSentence, AggravatedAssault } public Debuff[] Debuffs = new Debuff[PartyState.MaxPartySize]; - private P4FateProjection? _proj; + private P4FateProjection? _proj = module.FindComponent(); private BitMask _avoidMask; - public P4FateCalibrationAlphaDebuffs(BossModule module) : base(module, 4, 30, 3, alwaysShowSpreads: true) - { - _proj = module.FindComponent(); - } - public override void OnEventCast(Actor caster, ActorCastEvent spell) { switch ((AID)spell.Action.ID) diff --git a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P4FateCalibrationBeta.cs b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P4FateCalibrationBeta.cs index af75fcaac0..8568bb5fc1 100644 --- a/BossMod/Modules/Shadowbringers/Ultimate/TEA/P4FateCalibrationBeta.cs +++ b/BossMod/Modules/Shadowbringers/Ultimate/TEA/P4FateCalibrationBeta.cs @@ -1,21 +1,16 @@ namespace BossMod.Shadowbringers.Ultimate.TEA; // TODO: consider drawing tethers & shared sentence?.. -class P4FateCalibrationBetaDebuffs : P4ForcedMarchDebuffs +class P4FateCalibrationBetaDebuffs(BossModule module) : P4ForcedMarchDebuffs(module) { private enum Color { Unknown, Light, Dark } - private P4FateProjection? _proj; + private P4FateProjection? _proj = module.FindComponent(); private Color[] _colors = new Color[PartyState.MaxPartySize]; private int[] _farTethers = { -1, -1 }; private int[] _nearTethers = { -1, -1 }; private int _sharedSentence = -1; - public P4FateCalibrationBetaDebuffs(BossModule module) : base(module) - { - _proj = module.FindComponent(); - } - public override void OnStatusGain(Actor actor, ActorStatus status) { switch ((SID)status.ID) diff --git a/BossMod/Modules/Stormblood/StormbloodConfig.cs b/BossMod/Modules/Stormblood/StormbloodConfig.cs index 56b60a6240..834f0911ee 100644 --- a/BossMod/Modules/Stormblood/StormbloodConfig.cs +++ b/BossMod/Modules/Stormblood/StormbloodConfig.cs @@ -1,6 +1,4 @@ namespace BossMod.Stormblood; [ConfigDisplay(Order = 2, Parent = typeof(ModuleConfig))] -public class StormbloodConfig : ConfigNode -{ -} +public class StormbloodConfig() : ConfigNode(); diff --git a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarAiravata.cs b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarAiravata.cs index 85e9897c7d..d0a8e866a9 100644 --- a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarAiravata.cs +++ b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarAiravata.cs @@ -35,16 +35,11 @@ class HurlBoss(BossModule module) : Components.LocationTargetedAOEs(module, Acti class BarbarousScream(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.BarbarousScream), new AOEShapeCircle(13)); class Huff(BossModule module) : Components.SingleTargetDelayableCast(module, ActionID.MakeSpell(AID.Huff)); -class Buffet : Components.KnockbackFromCastTarget +class Buffet(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.Buffet), 20, kind: Kind.DirForward, stopAtWall: true) { private bool targeted; private Actor? target; - public Buffet(BossModule module) : base(module, ActionID.MakeSpell(AID.Buffet), 20, kind: Kind.DirForward) - { - StopAtWall = true; - } - public override void OnEventIcon(Actor actor, uint iconID) { if (iconID == (uint)IconID.BuffetTarget) diff --git a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarDullahan.cs b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarDullahan.cs index 25acaa53dd..9e64c9db20 100644 --- a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarDullahan.cs +++ b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarDullahan.cs @@ -48,13 +48,8 @@ class StygianRelease(BossModule module) : Components.RaidwideCast(module, Action class PungentPirouette(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PungentPirouette), new AOEShapeCircle(6.84f)); class Pollen(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Pollen), new AOEShapeCircle(6.84f)); -class StygianReleaseKB : Components.KnockbackFromCastTarget +class StygianReleaseKB(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.StygianRelease), 20, stopAtWall: true) { - public StygianReleaseKB(BossModule module) : base(module, ActionID.MakeSpell(AID.StygianRelease), 20) - { - StopAtWall = true; - } - public override bool DestinationUnsafe(int slot, Actor actor, WPos pos) => Module.FindComponent()?.ActiveAOEs(slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false; } diff --git a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarKelpie.cs b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarKelpie.cs index 5b9cd2e7c1..56992ee276 100644 --- a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarKelpie.cs +++ b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/AltarKelpie.cs @@ -70,21 +70,10 @@ public override void OnCastFinished(Actor caster, ActorCastInfo spell) class Torpedo(BossModule module) : Components.SingleTargetDelayableCast(module, ActionID.MakeSpell(AID.Torpedo)); class RisingSeas(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.RisingSeas)); +class HydroPushKB(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.HydroPush), 20, shape: new AOEShapeRect(49.4f, 22, 5), kind: Kind.DirForward, stopAtWall: true); -class HydroPushKB : Components.KnockbackFromCastTarget +class RisingSeasKB(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.RisingSeas), 20, stopAtWall: true) { - public HydroPushKB(BossModule module) : base(module, ActionID.MakeSpell(AID.HydroPush), 20, shape: new AOEShapeRect(49.4f, 22, 5), kind: Kind.DirForward) - { - StopAtWall = true; - } -} - -class RisingSeasKB : Components.KnockbackFromCastTarget -{ - public RisingSeasKB(BossModule module) : base(module, ActionID.MakeSpell(AID.RisingSeas), 20) - { - StopAtWall = true; - } public override bool DestinationUnsafe(int slot, Actor actor, WPos pos) => Module.FindComponent()?.ActiveAOEs(slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false; } diff --git a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/TheWinged.cs b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/TheWinged.cs index e43a2d4278..7a1f8095ed 100644 --- a/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/TheWinged.cs +++ b/BossMod/Modules/Stormblood/TreasureHunt/TheShiftingAltarsOfUznair/TheWinged.cs @@ -38,16 +38,8 @@ public enum AID : uint } class Filoplumes(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Filoplumes), new AOEShapeRect(11.36f, 2)); - class Wingbeat(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Wingbeat), new AOEShapeCone(43.36f, 30.Degrees())); -class WingbeatKB : Components.KnockbackFromCastTarget -{ - public WingbeatKB(BossModule module) : base(module, ActionID.MakeSpell(AID.Wingbeat), 20, false, 1, new AOEShapeCone(43.36f, 30.Degrees())) - { - StopAtWall = true; - } -} - +class WingbeatKB(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.Wingbeat), 20, false, 1, new AOEShapeCone(43.36f, 30.Degrees()), stopAtWall: true); class FeatherSquall(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.FeatherSquall2), 6); class Pinion(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Pinion), new AOEShapeRect(40.5f, 1.5f)); class Sideslip(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.Sideslip)); diff --git a/TODO b/TODO index b06943adee..70e00749b5 100644 --- a/TODO +++ b/TODO @@ -1,8 +1,3 @@ -components refactor checklist -- config should all use primary ctor -- bitmasks in record structs! -- reverify primary ctors for components, add base class args if needed - autorotation rework: - priority action suggestions - control panel w/ presets and bindings @@ -21,6 +16,7 @@ network rework: - utility to inject custom ipcs to the stream for debugging? general: +- verify use of bitmasks in properties (eg in record structs) - knockback/forced movement projected actor - along line rather than from center - autoreplay improvements - react to module manager transitions? - better timing tracking for: statuses, gauges, cooldowns, cast times, anim lock, ... From 0a315d4c55282774ccb9d2922291b2722bca9a5b Mon Sep 17 00:00:00 2001 From: Olga Kichakova Date: Thu, 11 Apr 2024 12:54:36 +0100 Subject: [PATCH 16/18] Few remaining missed changes. --- BossMod/Components/Adds.cs | 9 ++------- BossMod/Components/Cleave.cs | 23 +++++++---------------- BossMod/Components/Twister.cs | 15 ++++----------- 3 files changed, 13 insertions(+), 34 deletions(-) diff --git a/BossMod/Components/Adds.cs b/BossMod/Components/Adds.cs index 944ba97c5c..cafbd2e0d3 100644 --- a/BossMod/Components/Adds.cs +++ b/BossMod/Components/Adds.cs @@ -1,16 +1,11 @@ namespace BossMod.Components; // generic component used for drawing adds -public class Adds : BossComponent +public class Adds(BossModule module, uint oid) : BossComponent(module) { - public readonly IReadOnlyList Actors; + public readonly IReadOnlyList Actors = module.Enemies(oid); public IEnumerable ActiveActors => Actors.Where(a => a.IsTargetable && !a.IsDead); - public Adds(BossModule module, uint oid) : base(module) - { - Actors = module.Enemies(oid); - } - public override void DrawArenaForeground(int pcSlot, Actor pc) { Arena.Actors(Actors, ArenaColor.Enemy); diff --git a/BossMod/Components/Cleave.cs b/BossMod/Components/Cleave.cs index 5fcc52d377..745213a6cf 100644 --- a/BossMod/Components/Cleave.cs +++ b/BossMod/Components/Cleave.cs @@ -1,24 +1,15 @@ namespace BossMod.Components; // generic component for cleaving autoattacks; shows shape outline and warns when anyone other than main target is inside -public class Cleave : CastCounter +// enemy OID == 0 means 'primary actor' +public class Cleave(BossModule module, ActionID aid, AOEShape shape, uint enemyOID = 0, bool activeForUntargetable = false, bool originAtTarget = false, bool activeWhileCasting = true) : CastCounter(module, aid) { - public AOEShape Shape { get; init; } - public bool ActiveForUntargetable { get; init; } - public bool ActiveWhileCasting { get; init; } - public bool OriginAtTarget { get; init; } + public AOEShape Shape { get; init; } = shape; + public bool ActiveForUntargetable { get; init; } = activeForUntargetable; + public bool ActiveWhileCasting { get; init; } = activeWhileCasting; + public bool OriginAtTarget { get; init; } = originAtTarget; public DateTime NextExpected; - private readonly IReadOnlyList _enemies; - - // enemy OID == 0 means 'primary actor' - public Cleave(BossModule module, ActionID aid, AOEShape shape, uint enemyOID = 0, bool activeForUntargetable = false, bool originAtTarget = false, bool activeWhileCasting = true) : base(module, aid) - { - Shape = shape; - ActiveForUntargetable = activeForUntargetable; - ActiveWhileCasting = activeWhileCasting; - OriginAtTarget = originAtTarget; - _enemies = module.Enemies(enemyOID != 0 ? enemyOID : module.PrimaryActor.OID); - } + private readonly IReadOnlyList _enemies = module.Enemies(enemyOID != 0 ? enemyOID : module.PrimaryActor.OID); public override void AddHints(int slot, Actor actor, TextHints hints) { diff --git a/BossMod/Components/Twister.cs b/BossMod/Components/Twister.cs index b35edc6408..0cefa5f905 100644 --- a/BossMod/Components/Twister.cs +++ b/BossMod/Components/Twister.cs @@ -2,24 +2,17 @@ // generic 'twister' component: a set of aoes that appear under players, but can't be accurately predicted until it's too late // normally you'd predict them at the end (or slightly before the end) of some cast, or on component creation -public class GenericTwister : GenericAOEs +public class GenericTwister(BossModule module, float radius, uint oid, ActionID aid = default) : GenericAOEs(module, aid, "GTFO from twister!") { - private AOEShapeCircle _shape; - private uint _twisterOID; - protected IReadOnlyList Twisters; + private AOEShapeCircle _shape = new(radius); + private uint _twisterOID = oid; + protected IReadOnlyList Twisters = module.Enemies(oid); protected DateTime PredictedActivation; protected List PredictedPositions = new(); public IEnumerable ActiveTwisters => Twisters.Where(v => v.EventState != 7); public bool Active => ActiveTwisters.Count() > 0; - public GenericTwister(BossModule module, float radius, uint oid, ActionID aid = default) : base(module, aid, "GTFO from twister!") - { - _shape = new(radius); - _twisterOID = oid; - Twisters = module.Enemies(oid); - } - public void AddPredicted(float activationDelay) { PredictedPositions.Clear(); From 73b00308e9ece4dffbe0d20d60bdd42fe89aaf95 Mon Sep 17 00:00:00 2001 From: CarnifexOptimus Date: Sun, 14 Apr 2024 01:39:51 +0200 Subject: [PATCH 17/18] WIP --- BossMod/BossModule/AOEShapes.cs | 144 +++------- BossMod/BossModule/ArenaBounds.cs | 272 +++++++++++++++--- BossMod/BossModule/BossModule.cs | 2 +- BossMod/BossModule/MiniArena.cs | 6 +- BossMod/Components/DirectionalParry.cs | 2 +- BossMod/Components/Gaze.cs | 2 +- .../Endwalker/Alliance/A10Lions/A10Lions.cs | 2 +- .../Alliance/A10Lions/RoaringBlaze.cs | 2 +- .../Alliance/A10Lions/SlashAndBurn.cs | 2 +- .../Alliance/A10RhalgrEmissary/Boltloop.cs | 4 +- .../A10RhalgrEmissary/DestructiveCharge.cs | 2 +- .../Endwalker/Alliance/A11Byregot/Hammers.cs | 6 +- .../Endwalker/Alliance/A12Rhalgr/A12Rhalgr.cs | 29 +- .../Alliance/A12Rhalgr/HandOfTheDestroyer.cs | 8 +- .../Alliance/A12Rhalgr/RhalgrBeacon.cs | 11 +- .../Alliance/A13Azeyma/A13AzeymaEnums.cs | 4 +- .../Alliance/A13Azeyma/A13AzeymaStates.cs | 11 +- .../Alliance/A13Azeyma/DancingFlame.cs | 2 +- .../Endwalker/Alliance/A13Azeyma/SolarFans.cs | 89 +++++- .../Alliance/A13Azeyma/SolarWings.cs | 2 +- .../Alliance/A13Azeyma/WildfireWard.cs | 24 +- .../Alliance/A14Naldthal/FarAboveDeepBelow.cs | 4 +- .../Alliance/A14Naldthal/FortuneFlux.cs | 6 +- .../A14Naldthal/HeatAboveFlamesBelow.cs | 4 +- .../Alliance/A21Nophica/A21Nophica.cs | 14 + .../Alliance/A21Nophica/A21NophicaEnums.cs | 4 +- .../Alliance/A21Nophica/A21NophicaStates.cs | 3 +- .../Alliance/A21Nophica/MatronsBreath.cs | 33 +-- .../A22AlthykNymeia/A22AlthykNymeiaStates.cs | 10 +- .../Alliance/A22AlthykNymeia/Hydrostasis.cs | 2 +- .../Alliance/A22AlthykNymeia/SpinnersWheel.cs | 4 +- .../Alliance/A23Halone/A23HaloneStates.cs | 3 +- .../Endwalker/Alliance/A23Halone/Lochos.cs | 4 +- .../Endwalker/Alliance/A23Halone/Octagons.cs | 78 +++++ .../Alliance/A23Halone/Tetrapagos.cs | 10 +- .../Alliance/A24Menphina/A24Menphina.cs | 2 +- .../Alliance/A24Menphina/MidnightFrost.cs | 2 +- .../Alliance/A31Thaliak/A31Thaliak.cs | 9 +- .../A31Thaliak/ThaliakHieroglyphika.cs | 23 +- .../Alliance/A31Thaliak/ThaliakTetraktys.cs | 25 +- .../A32Llymlaen/LlymlaenDireStraits.cs | 7 +- .../A32Llymlaen/LlymlaenFrothingSea.cs | 2 +- .../A32Llymlaen/LlymlaenSurgingWave.cs | 2 +- .../Endwalker/Alliance/A33Oschon/A33Oschon.cs | 4 + .../Alliance/A33Oschon/A33OschonStates.cs | 6 +- .../A33Oschon/OschonP2WanderingShot.cs | 4 +- .../Alliance/A34Eulogia/A34Eulogia.cs | 10 +- .../Alliance/A34Eulogia/A34EulogiaEnums.cs | 21 +- .../Alliance/A34Eulogia/A34EulogiaStates.cs | 13 +- .../A34Eulogia/EulogiaClimbingShot.cs | 2 +- .../A34Eulogia/EulogiaHieroglyphika.cs | 12 +- .../A34Eulogia/EulogiaQuintessence.cs | 100 +++---- .../A34Eulogia/EulogiaRadiantRhythm.cs | 2 + ...Below.cs => EurlogiaEverFireOnceBurned.cs} | 2 +- .../D11LapisManalis/D110AlbusGriffin.cs | 41 ++- .../D11LapisManalis/D110CaladriusMaturus.cs | 35 --- .../Dungeon/D12Aetherfont/D122Arkas.cs | 4 +- .../Extreme/Ex7Zeromus/VoidMeteor.cs | 2 +- .../Endwalker/Savage/P12S1Athena/Palladion.cs | 2 +- .../Savage/P2SHippokampos/SewageDeluge.cs | 4 +- .../Endwalker/Savage/P9SKokytos/Uplift.cs | 2 +- .../Endwalker/Trial/T08Asura/T08Asura.cs | 12 +- .../Endwalker/Trial/T08Asura/T08Laceration.cs | 14 +- .../Trial/T08Asura/T08MyriadAspects.cs | 18 +- .../Trial/T08Asura/T08SixBladedKhadga.cs | 6 +- .../Global/Quest/FF16Collab/InfernalShadow.cs | 2 +- .../Quest/FF16Collab/InfernalShadowStates.cs | 3 +- .../Dungeon/D01Holminster/D013Philia.cs | 12 +- .../D05MtGulg/D050ForgivenPrejudice.cs | 35 ++- .../Dungeon/D05MtGulg/D051ForgivenCruelty.cs | 2 +- .../Dungeon/D05MtGulg/D052ForgivenApathy.cs | 34 ++- .../Dungeon/D05MtGulg/D053ForgivenWhimsy.cs | 63 ++-- .../D05MtGulg/D055ForgivenObscenity.cs | 4 +- .../DelubrumReginae/DRS1TrinitySeeker/DRS1.cs | 2 +- .../Hunt/RankS/ForgivenPedantry.cs | 4 +- .../Shadowbringers/Hunt/RankS/Tyger.cs | 2 +- BossMod/Util/HelperMethods.cs | 45 +++ BossMod/Util/ShapeDistance.cs | 43 ++- BossMod/Util/WPosDir.cs | 73 +++-- UIDev/MiniArenaTest.cs | 4 +- 80 files changed, 899 insertions(+), 622 deletions(-) create mode 100644 BossMod/Modules/Endwalker/Alliance/A23Halone/Octagons.cs rename BossMod/Modules/Endwalker/Alliance/A34Eulogia/{EulogiaAsAboveSoBelow.cs => EurlogiaEverFireOnceBurned.cs} (96%) delete mode 100644 BossMod/Modules/Endwalker/Dungeon/D11LapisManalis/D110CaladriusMaturus.cs create mode 100644 BossMod/Util/HelperMethods.cs diff --git a/BossMod/BossModule/AOEShapes.cs b/BossMod/BossModule/AOEShapes.cs index 7c49fe83e4..7d02c3ce8c 100644 --- a/BossMod/BossModule/AOEShapes.cs +++ b/BossMod/BossModule/AOEShapes.cs @@ -10,7 +10,7 @@ public abstract class AOEShape public bool Check(WPos position, Actor? origin) { - return origin != null ? Check(position, origin.Position, origin.Rotation) : false; + return origin != null && Check(position, origin.Position, origin.Rotation); } public void Draw(MiniArena arena, Actor? origin, uint color = ArenaColor.AOE) @@ -26,18 +26,11 @@ public void Outline(MiniArena arena, Actor? origin, uint color = ArenaColor.Dang } } -public class AOEShapeCone : AOEShape +public class AOEShapeCone(float radius, Angle halfAngle, Angle directionOffset = new()) : AOEShape { - public float Radius; - public Angle DirectionOffset; - public Angle HalfAngle; - - public AOEShapeCone(float radius, Angle halfAngle, Angle directionOffset = new()) - { - Radius = radius; - DirectionOffset = directionOffset; - HalfAngle = halfAngle; - } + public float Radius = radius; + public Angle DirectionOffset = directionOffset; + public Angle HalfAngle = halfAngle; public override string ToString() => $"Cone: r={Radius:f3}, angle={HalfAngle * 2}, off={DirectionOffset}"; public override bool Check(WPos position, WPos origin, Angle rotation) => position.InCircleCone(origin, Radius, rotation + DirectionOffset, HalfAngle); @@ -52,14 +45,9 @@ public override IEnumerable> Contour(WPos origin, Angle rotati public override Func Distance(WPos origin, Angle rotation) => ShapeDistance.Cone(origin, Radius, rotation + DirectionOffset, HalfAngle); } -public class AOEShapeCircle : AOEShape +public class AOEShapeCircle(float radius) : AOEShape { - public float Radius; - - public AOEShapeCircle(float radius) - { - Radius = radius; - } + public float Radius = radius; public override string ToString() => $"Circle: r={Radius:f3}"; public override bool Check(WPos position, WPos origin, Angle rotation = new()) => position.InCircle(origin, Radius); @@ -72,16 +60,10 @@ public override IEnumerable> Contour(WPos origin, Angle rotati public override Func Distance(WPos origin, Angle rotation) => ShapeDistance.Circle(origin, Radius); } -public class AOEShapeDonut : AOEShape +public class AOEShapeDonut(float innerRadius, float outerRadius) : AOEShape { - public float InnerRadius; - public float OuterRadius; - - public AOEShapeDonut(float innerRadius, float outerRadius) - { - InnerRadius = innerRadius; - OuterRadius = outerRadius; - } + public float InnerRadius = innerRadius; + public float OuterRadius = outerRadius; public override string ToString() => $"Donut: r={InnerRadius:f3}-{OuterRadius:f3}"; public override bool Check(WPos position, WPos origin, Angle rotation = new()) => position.InDonut(origin, InnerRadius, OuterRadius); @@ -99,20 +81,12 @@ public override IEnumerable> Contour(WPos origin, Angle rotati public override Func Distance(WPos origin, Angle rotation) => ShapeDistance.Donut(origin, InnerRadius, OuterRadius); } -public class AOEShapeDonutSector : AOEShape +public class AOEShapeDonutSector(float innerRadius, float outerRadius, Angle halfAngle, Angle directionOffset = new()) : AOEShape { - public float InnerRadius; - public float OuterRadius; - public Angle DirectionOffset; - public Angle HalfAngle; - - public AOEShapeDonutSector(float innerRadius, float outerRadius, Angle halfAngle, Angle directionOffset = new()) - { - InnerRadius = innerRadius; - OuterRadius = outerRadius; - DirectionOffset = directionOffset; - HalfAngle = halfAngle; - } + public float InnerRadius = innerRadius; + public float OuterRadius = outerRadius; + public Angle DirectionOffset = directionOffset; + public Angle HalfAngle = halfAngle; public override string ToString() => $"Donut sector: r={InnerRadius:f3}-{OuterRadius:f3}, angle={HalfAngle * 2}, off={DirectionOffset}"; public override bool Check(WPos position, WPos origin, Angle rotation) => position.InDonutCone(origin, InnerRadius, OuterRadius, rotation + DirectionOffset, HalfAngle); @@ -127,20 +101,12 @@ public override IEnumerable> Contour(WPos origin, Angle rotati public override Func Distance(WPos origin, Angle rotation) => ShapeDistance.DonutSector(origin, InnerRadius, OuterRadius, rotation + DirectionOffset, HalfAngle); } -public class AOEShapeRect : AOEShape +public class AOEShapeRect(float lengthFront, float halfWidth, float lengthBack = 0, Angle directionOffset = new()) : AOEShape { - public float LengthFront; - public float LengthBack; - public float HalfWidth; - public Angle DirectionOffset; - - public AOEShapeRect(float lengthFront, float halfWidth, float lengthBack = 0, Angle directionOffset = new()) - { - LengthFront = lengthFront; - LengthBack = lengthBack; - HalfWidth = halfWidth; - DirectionOffset = directionOffset; - } + public float LengthFront = lengthFront; + public float LengthBack = lengthBack; + public float HalfWidth = halfWidth; + public Angle DirectionOffset = directionOffset; public override string ToString() => $"Rect: l={LengthFront:f3}+{LengthBack:f3}, w={HalfWidth * 2}, off={DirectionOffset}"; public override bool Check(WPos position, WPos origin, Angle rotation) => position.InRect(origin, rotation + DirectionOffset, LengthFront, LengthBack, HalfWidth); @@ -178,18 +144,11 @@ public void SetEndPointFromCastLocation(Actor caster) } } -public class AOEShapeCross : AOEShape +public class AOEShapeCross(float length, float halfWidth, Angle directionOffset = new()) : AOEShape { - public float Length; - public float HalfWidth; - public Angle DirectionOffset; - - public AOEShapeCross(float length, float halfWidth, Angle directionOffset = new()) - { - Length = length; - HalfWidth = halfWidth; - DirectionOffset = directionOffset; - } + public float Length = length; + public float HalfWidth = halfWidth; + public Angle DirectionOffset = directionOffset; public override string ToString() => $"Cross: l={Length:f3}, w={HalfWidth * 2}, off={DirectionOffset}"; public override bool Check(WPos position, WPos origin, Angle rotation) => position.InRect(origin, rotation + DirectionOffset, Length, Length, HalfWidth) || position.InRect(origin, rotation + DirectionOffset, HalfWidth, HalfWidth, Length); @@ -199,7 +158,7 @@ public override void Outline(MiniArena arena, WPos origin, Angle rotation, uint { foreach (var p in ContourPoints(origin, rotation)) arena.PathLineTo(p); - arena.PathStroke(true, color); + MiniArena.PathStroke(true, color); } public override IEnumerable> Contour(WPos origin, Angle rotation, float offset, float maxError) @@ -232,60 +191,35 @@ private IEnumerable ContourPoints(WPos origin, Angle rotation, float offse } } -// TODO: revise and reconsider, not convinced it needs to be here, and it's not well implemented -public class AOEShapeTriangle : AOEShape +// for equilateral triangles that have an origin point similar to circles +public class AOEShapeEquilateralTriangle(float sideLength, Angle directionOffset = new()) : AOEShape { - public float SideLength; - public Angle DirectionOffset; - - public AOEShapeTriangle(float sideLength, Angle directionOffset = new()) - { - SideLength = sideLength; - DirectionOffset = directionOffset; - } + public float SideLength = sideLength; + public Angle DirectionOffset = directionOffset; public override bool Check(WPos position, WPos origin, Angle rotation) { - var vertices = CalculateVertices(origin, rotation + DirectionOffset); - return position.InTri(vertices.p1, vertices.p2, vertices.p3); + var (p1, p2, p3) = Helpers.CalculateEquilateralTriangleVertices(origin, rotation + DirectionOffset, SideLength); + return position.InTri(p1, p2, p3); } public override void Draw(MiniArena arena, WPos origin, Angle rotation, uint color = ArenaColor.AOE) { - var vertices = CalculateVertices(origin, rotation + DirectionOffset); - arena.AddTriangleFilled(vertices.p1, vertices.p2, vertices.p3, color); + var (p1, p2, p3) = Helpers.CalculateEquilateralTriangleVertices(origin, rotation + DirectionOffset, SideLength); + var clippedVertices = arena.Bounds.ClipAndTriangulate([p1, p2, p3]); + arena.Zone(clippedVertices, color); } - public override void Outline(MiniArena arena, WPos origin, Angle rotation, uint color = ArenaColor.Danger) { - var vertices = CalculateVertices(origin, rotation + DirectionOffset); - arena.AddTriangle(vertices.p1, vertices.p2, vertices.p3, color); + var (p1, p2, p3) = Helpers.CalculateEquilateralTriangleVertices(origin, rotation + DirectionOffset, SideLength); + arena.AddTriangle(p1, p2, p3, color); } public override IEnumerable> Contour(WPos origin, Angle rotation, float offset = 0, float maxError = 1) { - var vertices = CalculateVertices(origin, rotation + DirectionOffset, offset); - return new List> { new[] { vertices.p1, vertices.p2, vertices.p3 } }; + var (p1, p2, p3) = Helpers.CalculateEquilateralTriangleVertices(origin, rotation + DirectionOffset, offset); + return [[p1, p2, p3]]; } - public override Func Distance(WPos origin, Angle rotation) - { - // Implementing an exact distance calculation for a triangle shape might be complex and is beyond the scope of this basic implementation. - return p => (p - origin).Length(); // Simplified placeholder - } - - private (WPos p1, WPos p2, WPos p3) CalculateVertices(WPos origin, Angle rotation, float offset = 0) - { - // Calculate vertex positions for an equilateral triangle with origin as one vertex - var sideOffset = (SideLength + offset) / 2; - var height = MathF.Sqrt(3) / 2 * (SideLength + offset); - var direction = rotation.ToDirection(); - var ortho = direction.OrthoR(); - - var p1 = origin; // The origin is one of the vertices - var p2 = origin + direction * height - ortho * sideOffset; - var p3 = origin + direction * height + ortho * sideOffset; - - return (p1, p2, p3); - } + public override Func Distance(WPos origin, Angle rotation) => ShapeDistance.EquilateralTriangle(origin, rotation, SideLength, true); } diff --git a/BossMod/BossModule/ArenaBounds.cs b/BossMod/BossModule/ArenaBounds.cs index ff1e7ce11f..2de16ea8ec 100644 --- a/BossMod/BossModule/ArenaBounds.cs +++ b/BossMod/BossModule/ArenaBounds.cs @@ -11,7 +11,7 @@ public abstract class ArenaBounds // fields below are used for clipping public float MaxApproxError { get; private set; } - private Clip2D _clipper = new(); + private readonly Clip2D _clipper = new(); public IEnumerable ClipPoly => _clipper.ClipPoly; public List<(WPos, WPos, WPos)> ClipAndTriangulate(ClipperLib.PolyTree poly) => _clipper.ClipAndTriangulate(poly); public List<(WPos, WPos, WPos)> ClipAndTriangulate(IEnumerable poly) => _clipper.ClipAndTriangulate(poly); @@ -49,7 +49,7 @@ protected ArenaBounds(WPos center, float halfSize) { // TODO: think of a better way to do that (analytical clipping?) if (innerRadius >= outerRadius || innerRadius < 0 || halfAngle.Rad <= 0) - return new(); + return []; bool fullCircle = halfAngle.Rad >= MathF.PI; bool donut = innerRadius > 0; @@ -71,13 +71,13 @@ protected ArenaBounds(WPos center, float halfSize) public List<(WPos, WPos, WPos)> ClipAndTriangulateDonut(WPos center, float innerRadius, float outerRadius) { if (innerRadius >= outerRadius || innerRadius < 0) - return new(); + return []; return ClipAndTriangulate(CurveApprox.Donut(center, innerRadius, outerRadius, MaxApproxError)); } public List<(WPos, WPos, WPos)> ClipAndTriangulateTri(WPos a, WPos b, WPos c) { - return ClipAndTriangulate(new[] { a, b, c }); + return ClipAndTriangulate([a, b, c]); } public List<(WPos, WPos, WPos)> ClipAndTriangulateIsoscelesTri(WPos apex, WDir height, WDir halfBase) @@ -97,7 +97,7 @@ protected ArenaBounds(WPos center, float halfSize) var side = halfWidth * direction.OrthoR(); var front = origin + lenFront * direction; var back = origin - lenBack * direction; - return ClipAndTriangulate(new[] { front + side, front - side, back - side, back + side }); + return ClipAndTriangulate([front + side, front - side, back - side, back + side]); } public List<(WPos, WPos, WPos)> ClipAndTriangulateRect(WPos origin, Angle direction, float lenFront, float lenBack, float halfWidth) @@ -109,7 +109,35 @@ protected ArenaBounds(WPos center, float halfSize) { var dir = (end - start).Normalized(); var side = halfWidth * dir.OrthoR(); - return ClipAndTriangulate(new[] { start + side, start - side, end - side, end + side }); + return ClipAndTriangulate([start + side, start - side, end - side, end + side]); + } + + public static float Area(List points) + { + float a = 0; + int len = points.Count; + + for (int i = 0; i < len; i++) + { + int j = (i + 1) % len; + a += points[i].X * points[j].Z - points[j].X * points[i].Z; + } + + return a / 2; + } + + public static bool IsInside(WPos point, List edge) + { + var d = (edge[1].X - edge[0].X) * (point.Z - edge[0].Z) - (edge[1].Z - edge[0].Z) * (point.X - edge[0].X); + return d >= 0; + } + + public static WPos IntersectLineSegment(WPos p1, WPos p2, WPos p3, WPos p4) + { + var d = (p4.Z - p3.Z) * (p1.X - p3.X) + (-p4.X + p3.X) * (p1.Z - p3.Z); + var n = (p4.Z - p3.Z) * (p2.X - p1.X) + (-p4.X + p3.X) * (p2.Z - p1.Z); + var u = d / n; + return new WPos(p1.X + u * (p2.X - p1.X), p1.Z + u * (p2.Z - p1.Z)); } } @@ -207,65 +235,223 @@ public override WDir ClampToBounds(WDir offset, float scale) } } -// TODO: revise and reconsider, not convinced it needs to be here, and it's not well implemented -public class ArenaBoundsTri : ArenaBounds +//should work for any non self-intersecting polygon with a list of points, ClampToBounds does not deliver accurate results for positions outside of bounds yet +public class ArenaBoundsPolygon : ArenaBounds { - private static readonly float sqrt3 = MathF.Sqrt(3); + public float HalfWidth { get; private set; } + public float HalfHeight { get; private set; } + public readonly List Points; - public ArenaBoundsTri(WPos center, float sideLength) : base(center, sideLength * sqrt3 / 3) { } // HalfSize is the radius of the circumscribed circle + public ArenaBoundsPolygon(List points) : base(CalculateHalfSizeAndCenter(points).Item3, MathF.Max(CalculateHalfSizeAndCenter(points).Item1, CalculateHalfSizeAndCenter(points).Item2)) + { + Points = points; + (HalfWidth, HalfHeight, Center) = CalculateHalfSizeAndCenter(points); + } - public override IEnumerable BuildClipPoly(float offset = 0) + private static (float, float, WPos) CalculateHalfSizeAndCenter(List points) { - // Calculate the vertices of the equilateral triangle - var height = HalfSize * sqrt3; // Height of the equilateral triangle - var halfSide = HalfSize; - yield return Center + new WDir(-halfSide, height / 3); - yield return Center + new WDir(halfSide, height / 3); - yield return Center + new WDir(0, -2 * height / 3); + float minX = float.MaxValue; + float maxX = float.MinValue; + float minY = float.MaxValue; + float maxY = float.MinValue; + + foreach (var point in points) + { + minX = MathF.Min(minX, point.X); + maxX = MathF.Max(maxX, point.X); + minY = MathF.Min(minY, point.Z); + maxY = MathF.Max(maxY, point.Z); + } + + float halfWidth = (maxX - minX) / 2; + float halfHeight = (maxY - minY) / 2; + WPos center = new((minX + maxX) / 2, (minY + maxY) / 2); + + return (halfWidth, halfHeight, center); } - public override Pathfinding.Map BuildMap(float resolution = 0.5f) + public override IEnumerable BuildClipPoly(float offset = 0) { - // BuildMap implementation for equilateral triangle - // This is a simplified example and would need to be adapted based on specific pathfinding requirements - throw new NotImplementedException(); + var clippedPolygon = new List(Points); + + for (int i = 0; i < 4; i++) + { + var edge = new List { Center + new WDir(HalfSize + offset, -HalfSize - offset), Center + new WDir(HalfSize + offset, HalfSize + offset), Center + new WDir(-HalfSize - offset, HalfSize + offset), Center + new WDir(-HalfSize - offset, -HalfSize - offset) }; + var input = clippedPolygon; + clippedPolygon = []; + + for (int j = 0; j < input.Count; j++) + { + var v1 = input[j]; + var v2 = input[(j + 1) % input.Count]; + + if (IsInside(v1, edge)) + clippedPolygon.Add(v1); + if (!IsInside(v1, edge) && IsInside(v2, edge)) + { + var intersection = IntersectLineSegment(v1, v2, edge[0], edge[1]); + clippedPolygon.Add(intersection); + } + } + + if (!IsInside(input[^1], edge) && IsInside(input[0], edge)) + { + var intersection = IntersectLineSegment(input[^1], input[0], edge[0], edge[1]); + clippedPolygon.Add(intersection); + } + } + + return clippedPolygon; } - public override bool Contains(WPos p) + public override bool Contains(WPos position) { - var a = Center + new WDir(-HalfSize, HalfSize * sqrt3 / 3); - var b = Center + new WDir(HalfSize, HalfSize * sqrt3 / 3); - var c = Center + new WDir(0, -2 * HalfSize * sqrt3 / 3); + bool inside = false; + int j = Points.Count - 1; + float area = Area(Points); - bool b1 = Sign(p, a, b) < 0; - bool b2 = Sign(p, b, c) < 0; - bool b3 = Sign(p, c, a) < 0; + if (area > 0) + { + for (int i = 0; i < Points.Count; i++) + { + if (Points[i].Z > position.Z) + { + if (Points[j].Z <= position.Z && position.X <= (Points[j].X - Points[i].X) * (position.Z - Points[i].Z) / (Points[j].Z - Points[i].Z) + Points[i].X) + inside = !inside; + } + else if (Points[j].Z > position.Z && position.X <= (Points[j].X - Points[i].X) * (position.Z - Points[i].Z) / (Points[j].Z - Points[i].Z) + Points[i].X) + inside = !inside; + j = i; + } + } + else + { + for (int i = 0; i < Points.Count; i++) + { + if (Points[i].Z < position.Z) + { + if (Points[j].Z >= position.Z && position.X <= (Points[j].X - Points[i].X) * (position.Z - Points[i].Z) / (Points[j].Z - Points[i].Z) + Points[i].X) + inside = !inside; + } + else if (Points[j].Z < position.Z && position.X <= (Points[j].X - Points[i].X) * (position.Z - Points[i].Z) / (Points[j].Z - Points[i].Z) + Points[i].X) + inside = !inside; + j = i; + } + } - return (b1 == b2) && (b2 == b3); + return inside; } - private float Sign(WPos p1, WPos p2, WPos p3) + public override Pathfinding.Map BuildMap(float resolution) { - return (p1.X - p3.X) * (p2.Z - p3.Z) - (p2.X - p3.X) * (p1.Z - p3.Z); + float minX = float.MaxValue; + float maxX = float.MinValue; + float minY = float.MaxValue; + float maxY = float.MinValue; + + foreach (var point in Points) + { + minX = MathF.Min(minX, point.X); + maxX = MathF.Max(maxX, point.X); + minY = MathF.Min(minY, point.Z); + maxY = MathF.Max(maxY, point.Z); + } + + var center = new WPos((minX + maxX) / 2, (minY + maxY) / 2); + var map = new Pathfinding.Map(resolution, center, (maxX - minX) / 2, (maxY - minY) / 2); + + float shape(WPos p) + { + bool inside = false; + int j = Points.Count - 1; + float area = Area(Points); + + if (area > 0) + { + for (int i = 0; i < Points.Count; i++) + { + if (Points[i].Z > p.Z) + { + if (Points[j].Z <= p.Z && p.X <= (Points[j].X - Points[i].X) * (p.Z - Points[i].Z) / (Points[j].Z - Points[i].Z) + Points[i].X) + inside = !inside; + } + else if (Points[j].Z > p.Z && p.X <= (Points[j].X - Points[i].X) * (p.Z - Points[i].Z) / (Points[j].Z - Points[i].Z) + Points[i].X) + inside = !inside; + j = i; + } + } + else + { + for (int i = 0; i < Points.Count; i++) + { + if (Points[i].Z < p.Z) + { + if (Points[j].Z >= p.Z && p.X <= (Points[j].X - Points[i].X) * (p.Z - Points[i].Z) / (Points[j].Z - Points[i].Z) + Points[i].X) + inside = !inside; + } + else if (Points[j].Z < p.Z && p.X <= (Points[j].X - Points[i].X) * (p.Z - Points[i].Z) / (Points[j].Z - Points[i].Z) + Points[i].X) + inside = !inside; + j = i; + } + } + + return inside ? float.PositiveInfinity : 0; + } + map.BlockPixelsInside(shape, 0, 0); + return map; } public override float IntersectRay(WPos origin, WDir dir) { - // Define triangle vertices - var a = Center + new WDir(-HalfSize, HalfSize * sqrt3 / 3); - var b = Center + new WDir(HalfSize, HalfSize * sqrt3 / 3); - var c = Center + new WDir(0, -2 * HalfSize * sqrt3 / 3); - - // Ray-triangle intersection algorithm goes here - // This is a complex topic and requires a bit of math - // Placeholder for the actual intersection calculation - return float.NaN; // Return NaN to indicate that this method needs proper implementation + float minDistance = float.MaxValue; + for (int i = 0; i < Points.Count; i++) + { + int j = (i + 1) % Points.Count; + WPos p0 = Points[i]; + WPos p1 = Points[j]; + float distance = Intersect.RaySegment(origin, dir, p0, p1); + if (distance < minDistance) + minDistance = distance; + } + return minDistance; } public override WDir ClampToBounds(WDir offset, float scale = 1) { - // Clamping within a triangle is highly context-dependent - // This method needs a detailed implementation based on specific requirements - return new WDir(0, 0); // Placeholder to indicate that clamping logic is needed + WDir clampedOffset = offset; + + int windingNumber = 0; + + for (int i = 0; i < Points.Count; i++) + { + int j = (i + 1) % Points.Count; + WPos p1 = Points[i]; + WPos p2 = Points[j]; + + if (p1.Z <= Center.Z) + { + if (p2.Z > Center.Z) + { + float x = (Center.Z - p1.Z) / (p2.Z - p1.Z); + if (Center.X < p1.X + x * (p2.X - p1.X)) + windingNumber++; + } + } + else + { + if (p2.Z <= Center.Z) + { + float x = (Center.Z - p1.Z) / (p2.Z - p1.Z); + if (Center.X >= p1.X + x * (p2.X - p1.X)) + windingNumber--; + } + } + } + + float scaledHalfSize = HalfSize * scale; + if (clampedOffset.LengthSq() > scaledHalfSize * scaledHalfSize) + clampedOffset *= scaledHalfSize / clampedOffset.Length(); + + return clampedOffset; } } diff --git a/BossMod/BossModule/BossModule.cs b/BossMod/BossModule/BossModule.cs index b75522582e..ea7036271e 100644 --- a/BossMod/BossModule/BossModule.cs +++ b/BossMod/BossModule/BossModule.cs @@ -194,7 +194,7 @@ public void Draw(float cameraAzimuth, int pcSlot, bool includeText, bool include { Arena.Begin(cameraAzimuth); DrawArena(pcSlot, pc, pcHints.Any(h => h.Item2)); - Arena.End(); + MiniArena.End(); } } diff --git a/BossMod/BossModule/MiniArena.cs b/BossMod/BossModule/MiniArena.cs index ef8c37c5d6..571cd0bce1 100644 --- a/BossMod/BossModule/MiniArena.cs +++ b/BossMod/BossModule/MiniArena.cs @@ -154,12 +154,12 @@ public void PathArcTo(WPos center, float radius, float amin, float amax) ImGui.GetWindowDrawList().PathArcTo(WorldPositionToScreenPosition(center), radius / Bounds.HalfSize * ScreenHalfSize, MathF.PI / 2 - amin + _cameraAzimuth, MathF.PI / 2 - amax + _cameraAzimuth); } - public void PathStroke(bool closed, uint color, float thickness = 1) + public static void PathStroke(bool closed, uint color, float thickness = 1) { ImGui.GetWindowDrawList().PathStroke(color, closed ? ImDrawFlags.Closed : ImDrawFlags.None, thickness); } - public void PathFillConvex(uint color) + public static void PathFillConvex(uint color) { ImGui.GetWindowDrawList().PathFillConvex(color); } @@ -247,7 +247,7 @@ public void Actors(IEnumerable actors, uint color, bool allowDeadAndUntar Actor(a, color, allowDeadAndUntargetable); } - public void End() + public static void End() { ImGui.GetWindowDrawList().PopClipRect(); } diff --git a/BossMod/Components/DirectionalParry.cs b/BossMod/Components/DirectionalParry.cs index be566c64c9..15e12928a3 100644 --- a/BossMod/Components/DirectionalParry.cs +++ b/BossMod/Components/DirectionalParry.cs @@ -93,7 +93,7 @@ private void DrawParry(Actor actor, Angle offset, uint color) { var dir = actor.Rotation + offset; Arena.PathArcTo(actor.Position, 1.5f, (dir - 45.Degrees()).Rad, (dir + 45.Degrees()).Rad); - Arena.PathStroke(false, color); + MiniArena.PathStroke(false, color); } private int ActorState(ulong instanceID) => _actorStates.GetValueOrDefault(instanceID, 0); diff --git a/BossMod/Components/Gaze.cs b/BossMod/Components/Gaze.cs index b9b7277656..4da5205259 100644 --- a/BossMod/Components/Gaze.cs +++ b/BossMod/Components/Gaze.cs @@ -68,7 +68,7 @@ public override void DrawArenaForeground(int pcSlot, Actor pc) { var (min, max) = Inverted ? (45, 315) : (-45, 45); Arena.PathArcTo(pc.Position, 1, (pc.Rotation + eye.Forward + min.Degrees()).Rad, (pc.Rotation + eye.Forward + max.Degrees()).Rad); - Arena.PathStroke(false, ArenaColor.Enemy); + MiniArena.PathStroke(false, ArenaColor.Enemy); } } } diff --git a/BossMod/Modules/Endwalker/Alliance/A10Lions/A10Lions.cs b/BossMod/Modules/Endwalker/Alliance/A10Lions/A10Lions.cs index 0521144cb7..268c449900 100644 --- a/BossMod/Modules/Endwalker/Alliance/A10Lions/A10Lions.cs +++ b/BossMod/Modules/Endwalker/Alliance/A10Lions/A10Lions.cs @@ -15,7 +15,7 @@ public A10LionsStates(A10Lions module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, PrimaryActorOID = (uint)OID.Lion, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 866, NameID = 11294, SortOrder = 4)] -public class A10Lions(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(-677.25f, -606.25f), 20)) +public class A10Lions(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(-677.25f, -606.25f), 25)) { private Actor? _lioness; diff --git a/BossMod/Modules/Endwalker/Alliance/A10Lions/RoaringBlaze.cs b/BossMod/Modules/Endwalker/Alliance/A10Lions/RoaringBlaze.cs index fa4e2647cc..546ff6767a 100644 --- a/BossMod/Modules/Endwalker/Alliance/A10Lions/RoaringBlaze.cs +++ b/BossMod/Modules/Endwalker/Alliance/A10Lions/RoaringBlaze.cs @@ -2,7 +2,7 @@ class RoaringBlaze(BossModule module) : Components.GenericAOEs(module) { - private List _aoes = new(); + private readonly List _aoes = []; private static readonly AOEShapeCone _shape = new(50, 90.Degrees()); diff --git a/BossMod/Modules/Endwalker/Alliance/A10Lions/SlashAndBurn.cs b/BossMod/Modules/Endwalker/Alliance/A10Lions/SlashAndBurn.cs index 955e93bea9..eba5f9e919 100644 --- a/BossMod/Modules/Endwalker/Alliance/A10Lions/SlashAndBurn.cs +++ b/BossMod/Modules/Endwalker/Alliance/A10Lions/SlashAndBurn.cs @@ -2,7 +2,7 @@ class SlashAndBurn(BossModule module) : Components.GenericAOEs(module) { - private List _aoes = new(); + private readonly List _aoes = []; private static readonly AOEShapeCircle _shapeOut = new(14); private static readonly AOEShapeDonut _shapeIn = new(6, 30); diff --git a/BossMod/Modules/Endwalker/Alliance/A10RhalgrEmissary/Boltloop.cs b/BossMod/Modules/Endwalker/Alliance/A10RhalgrEmissary/Boltloop.cs index 98dcdb6204..973dfca192 100644 --- a/BossMod/Modules/Endwalker/Alliance/A10RhalgrEmissary/Boltloop.cs +++ b/BossMod/Modules/Endwalker/Alliance/A10RhalgrEmissary/Boltloop.cs @@ -2,9 +2,9 @@ class Boltloop(BossModule module) : Components.GenericAOEs(module) { - private List _aoes = new(); + private readonly List _aoes = []; - private static readonly AOEShape[] _shapes = { new AOEShapeCircle(10), new AOEShapeDonut(10, 20), new AOEShapeDonut(20, 30) }; + private static readonly AOEShape[] _shapes = [new AOEShapeCircle(10), new AOEShapeDonut(10, 20), new AOEShapeDonut(20, 30)]; public override IEnumerable ActiveAOEs(int slot, Actor actor) => _aoes.Skip(NumCasts).Take(2); diff --git a/BossMod/Modules/Endwalker/Alliance/A10RhalgrEmissary/DestructiveCharge.cs b/BossMod/Modules/Endwalker/Alliance/A10RhalgrEmissary/DestructiveCharge.cs index 3473a89d56..6b7531b9b0 100644 --- a/BossMod/Modules/Endwalker/Alliance/A10RhalgrEmissary/DestructiveCharge.cs +++ b/BossMod/Modules/Endwalker/Alliance/A10RhalgrEmissary/DestructiveCharge.cs @@ -2,7 +2,7 @@ class DestructiveCharge(BossModule module) : Components.GenericAOEs(module) { - public List AOEs = new(); + public readonly List AOEs = []; private static readonly AOEShapeCone _shape = new(25, 45.Degrees()); diff --git a/BossMod/Modules/Endwalker/Alliance/A11Byregot/Hammers.cs b/BossMod/Modules/Endwalker/Alliance/A11Byregot/Hammers.cs index a8a67af021..c4eac49362 100644 --- a/BossMod/Modules/Endwalker/Alliance/A11Byregot/Hammers.cs +++ b/BossMod/Modules/Endwalker/Alliance/A11Byregot/Hammers.cs @@ -4,8 +4,8 @@ class HammersCells(BossModule module) : Components.GenericAOEs(module, ActionID. { public bool Active { get; private set; } public bool MovementPending { get; private set; } - private int[] _lineOffset = new int[5]; - private int[] _lineMovement = new int[5]; + private readonly int[] _lineOffset = new int[5]; + private readonly int[] _lineMovement = new int[5]; private static readonly AOEShapeRect _shape = new(5, 5, 5); @@ -93,4 +93,4 @@ private bool CellDangerous(int x, int z, bool future) } class HammersLevinforge(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Levinforge), new AOEShapeRect(50, 5)); -class HammersSpire(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ByregotSpire), new AOEShapeRect(50, 15)); +class HammersSpire(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ByregotSpire), new AOEShapeRect(50, 15, 2)); diff --git a/BossMod/Modules/Endwalker/Alliance/A12Rhalgr/A12Rhalgr.cs b/BossMod/Modules/Endwalker/Alliance/A12Rhalgr/A12Rhalgr.cs index c059d00f12..5002b1b6b7 100644 --- a/BossMod/Modules/Endwalker/Alliance/A12Rhalgr/A12Rhalgr.cs +++ b/BossMod/Modules/Endwalker/Alliance/A12Rhalgr/A12Rhalgr.cs @@ -5,27 +5,12 @@ class StrikingMeteor(BossModule module) : Components.LocationTargetedAOEs(module class BronzeLightning(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.BronzeLightning), new AOEShapeCone(50, 22.5f.Degrees()), 4); [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 866, NameID = 11273, SortOrder = 3)] -public class A12Rhalgr(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsSquare(new(-15, 275), 30)) // note: arena has a really complex shape... +public class A12Rhalgr(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsPolygon(arenacoords)) { - protected override void DrawArenaForeground(int pcSlot, Actor pc) - { - Arena.PathLineTo(new(2.5f, 245)); - Arena.PathLineTo(new(2.6f, 275)); - Arena.PathLineTo(new(7.3f, 295)); - Arena.PathLineTo(new(3, 297)); - Arena.PathLineTo(new(-1, 286)); - Arena.PathLineTo(new(-6.5f, 288)); - Arena.PathLineTo(new(-6.5f, 305)); - Arena.PathLineTo(new(-13, 305)); - Arena.PathLineTo(new(-13, 288)); - Arena.PathLineTo(new(-21.5f, 288)); - Arena.PathLineTo(new(-21.5f, 305)); - Arena.PathLineTo(new(-28, 305)); - Arena.PathLineTo(new(-28, 283)); - Arena.PathLineTo(new(-42, 300)); - Arena.PathLineTo(new(-45.5f, 297)); - Arena.PathLineTo(new(-34, 271.5f)); - Arena.PathLineTo(new(-37, 245)); - Arena.PathStroke(true, ArenaColor.Border); - } + private static readonly List arenacoords = [new (-29.2f, 235.5f), new (-40.3f, 248f), new (-47.5f, 260f), new (-53.8f, 273.7f), new (-46.4f, 276f), new (-45.1f, 274.8f), + new (-43.2f, 272.1f), new (-40.4f, 270.7f), new (-38.8f, 271.4f), new (-38.3f, 272.6f), new (-38.2f, 275f), new (-39.1f, 278.5f), new (-40.7f, 282.4f), new (-46.1f, 291.3f), + new (-49.2f, 296.8f), new (-41f, 300.2f), new (-37.1f, 293.4f), new (-34.9f, 291f), new (-32.5f, 290.2f), new (-30.7f, 291.1f), new (-30.5f, 295.8f), new (-31.2f, 305f), + new (-22.6f, 306f), new (-19.8f, 290.5f), new (-18f, 288.7f), new (-16f, 289.2f), new (-14f, 290.9f), new (-13.7f, 303.7f), new (-6.3f, 304.7f), new (-4.5f, 288.2f), + new (-3.7f, 287f), new (-1.3f, 287.8f), new (-0.1f, 289.2f), new (3.4f, 297.15f), new (8.9f, 294f), new (6.4f, 286.6f), new (6.2f, 283.2f), new (7.3f, 276.4f), + new (7.7f, 267.2f), new (6.8f, 253f), new (4.5f, 242.7f), new (2.23f, 235.6f)]; } diff --git a/BossMod/Modules/Endwalker/Alliance/A12Rhalgr/HandOfTheDestroyer.cs b/BossMod/Modules/Endwalker/Alliance/A12Rhalgr/HandOfTheDestroyer.cs index 6a92c92d1e..f587f0f57a 100644 --- a/BossMod/Modules/Endwalker/Alliance/A12Rhalgr/HandOfTheDestroyer.cs +++ b/BossMod/Modules/Endwalker/Alliance/A12Rhalgr/HandOfTheDestroyer.cs @@ -2,7 +2,7 @@ class HandOfTheDestroyer(BossModule module) : Components.GenericAOEs(module) { - private List _aoes = new(); + private readonly List _aoes = []; private static readonly AOEShapeRect _shape = new(90, 20); @@ -29,10 +29,10 @@ public override void OnCastFinished(Actor caster, ActorCastInfo spell) // this is not an official mechanic name - it refers to broken world + hand of the destroyer combo, which creates multiple small aoes class BrokenShards(BossModule module) : Components.GenericAOEs(module) { - private List _aoes = new(); + private readonly List _aoes = []; - private static readonly WPos[] _eastLocations = { new(-30.0f, 266.9f), new(-46.5f, 269.6f), new(-26.2f, 292.9f), new(-2.8f, 283.5f), new(-37.4f, 283.7f), new(1.6f, 271.5f), new(-18.8f, 278.8f), new(-12.3f, 298.3f), new(-34.1f, 250.5f) }; - private static readonly WPos[] _westLocations = { new(-6.9f, 268.0f), new(-0.2f, 285.0f), new(-25.6f, 298.5f), new(-34.2f, 283.5f), new(-11.6f, 293.5f), new(-46.1f, 270.5f), new(-18.1f, 279.0f), new(-40.3f, 290.5f), new(-2.1f, 252.0f) }; + private static readonly WPos[] _eastLocations = [new(-30.0f, 266.9f), new(-46.5f, 269.6f), new(-26.2f, 292.9f), new(-2.8f, 283.5f), new(-37.4f, 283.7f), new(1.6f, 271.5f), new(-18.8f, 278.8f), new(-12.3f, 298.3f), new(-34.1f, 250.5f)]; + private static readonly WPos[] _westLocations = [new(-6.9f, 268.0f), new(-0.2f, 285.0f), new(-25.6f, 298.5f), new(-34.2f, 283.5f), new(-11.6f, 293.5f), new(-46.1f, 270.5f), new(-18.1f, 279.0f), new(-40.3f, 290.5f), new(-2.1f, 252.0f)]; private static readonly AOEShapeCircle _shape = new(20); public override IEnumerable ActiveAOEs(int slot, Actor actor) => _aoes; diff --git a/BossMod/Modules/Endwalker/Alliance/A12Rhalgr/RhalgrBeacon.cs b/BossMod/Modules/Endwalker/Alliance/A12Rhalgr/RhalgrBeacon.cs index 53a26bdac2..51225c8d3b 100644 --- a/BossMod/Modules/Endwalker/Alliance/A12Rhalgr/RhalgrBeacon.cs +++ b/BossMod/Modules/Endwalker/Alliance/A12Rhalgr/RhalgrBeacon.cs @@ -4,7 +4,7 @@ class RhalgrBeaconShock(BossModule module) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.Shock)) { - private List _aoes = new(); + private readonly List _aoes = []; private static readonly AOEShapeCircle _shape = new(8); @@ -19,4 +19,11 @@ public override void OnActorCreated(Actor actor) // TODO: this is a knockback 50, ignores immunities - but need to clamp to correct fingers // there are two possible source locations ([-10.12, 268.50] and [-24.12, 266.50]), two potential fingers for each - one of them is sometimes covered by lightning aoes -class RhalgrBeaconKnockback(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.RhalgrsBeaconKnockback)); +class RhalgrBeaconKnockback(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.RhalgrsBeaconKnockback), 50, true) +{ + public override void AddHints(int slot, Actor actor, TextHints hints) + { + if (Sources(slot, actor).Any()) + hints.Add("Get knocked to a correct finger!"); + } +} diff --git a/BossMod/Modules/Endwalker/Alliance/A13Azeyma/A13AzeymaEnums.cs b/BossMod/Modules/Endwalker/Alliance/A13Azeyma/A13AzeymaEnums.cs index 97745fc448..23d058d260 100644 --- a/BossMod/Modules/Endwalker/Alliance/A13Azeyma/A13AzeymaEnums.cs +++ b/BossMod/Modules/Endwalker/Alliance/A13Azeyma/A13AzeymaEnums.cs @@ -31,8 +31,8 @@ public enum AID : uint MoveSunstorm = 28807, // Helper->Sunstorm, no cast, attract SolarFans = 28813, // Boss->self, 4.0s cast, visual - SolarFansAOE = 29374, // Helper->location, 4.0s cast, 5 half-width rect between source and target ? - SolarFansCharge = 28814, // WardensFlame->location, 4.5s cast, 5 half-width rect between source and target ? + SolarFansAOE = 29374, // Helper->location, 4.0s cast, 5 half-width rect between source and target + SolarFansCharge = 28814, // WardensFlame->location, 4.5s cast, 5 half-width rect RadiantRhythmFirst = 28815, // Boss->self, 5.0s cast, visual RadiantRhythmRest = 28816, // Boss->self, no cast, visual RadiantFlight = 28819, // Helper->self, no cast, range 20?-30 donut 90-degree cone, starting from flame and CCW diff --git a/BossMod/Modules/Endwalker/Alliance/A13Azeyma/A13AzeymaStates.cs b/BossMod/Modules/Endwalker/Alliance/A13Azeyma/A13AzeymaStates.cs index 29ebeec069..1df756e32f 100644 --- a/BossMod/Modules/Endwalker/Alliance/A13Azeyma/A13AzeymaStates.cs +++ b/BossMod/Modules/Endwalker/Alliance/A13Azeyma/A13AzeymaStates.cs @@ -4,7 +4,8 @@ public class A13AzeymaStates : StateMachineBuilder { public A13AzeymaStates(BossModule module) : base(module) { - DeathPhase(0, SinglePhase); + DeathPhase(0, SinglePhase) + .ActivateOnEnter(); } private void SinglePhase(uint id) @@ -76,18 +77,18 @@ private void SolarWingsSunShine(uint id, float delay) private void SolarFans(uint id, float delay) { Cast(id, AID.SolarFans, delay, 4, "Fans start") + .ActivateOnEnter() .ActivateOnEnter() + .ActivateOnEnter() .DeactivateOnExit(); // +0.5s: charge cast end - CastStart(id + 0x10, AID.RadiantRhythmFirst, 3.2f) - .ActivateOnEnter(); + CastStart(id + 0x10, AID.RadiantRhythmFirst, 3.2f); CastEnd(id + 0x11, 5); ComponentCondition(id + 0x12, 0.1f, comp => comp.NumCasts >= 2); // first cast; after that there are 3 or 4 rhythm casts, 1.4s apart CastStart(id + 0x20, AID.RadiantFinish, 5.4f) // or 6.8, depending on number of rhythm casts .DeactivateOnExit(); CastEnd(id + 0x21, 3, "Fans resolve") - .ActivateOnEnter() - .DeactivateOnExit(); + .DeactivateOnExit(); } private void FleetingSpark(uint id, float delay) diff --git a/BossMod/Modules/Endwalker/Alliance/A13Azeyma/DancingFlame.cs b/BossMod/Modules/Endwalker/Alliance/A13Azeyma/DancingFlame.cs index 376788877c..61398e2f0e 100644 --- a/BossMod/Modules/Endwalker/Alliance/A13Azeyma/DancingFlame.cs +++ b/BossMod/Modules/Endwalker/Alliance/A13Azeyma/DancingFlame.cs @@ -2,7 +2,7 @@ class DancingFlame(BossModule module) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.DancingFlameFirst)) { - public List AOEs = new(); + public List AOEs = []; private static readonly AOEShapeRect _shape = new(17.5f, 17.5f, 17.5f); // 15 for diagonal 'squares' + 2.5 for central cross diff --git a/BossMod/Modules/Endwalker/Alliance/A13Azeyma/SolarFans.cs b/BossMod/Modules/Endwalker/Alliance/A13Azeyma/SolarFans.cs index 4a7792ef3c..adfb7c0985 100644 --- a/BossMod/Modules/Endwalker/Alliance/A13Azeyma/SolarFans.cs +++ b/BossMod/Modules/Endwalker/Alliance/A13Azeyma/SolarFans.cs @@ -1,16 +1,93 @@ namespace BossMod.Endwalker.Alliance.A13Azeyma; -class SolarFans(BossModule module) : Components.ChargeAOEs(module, ActionID.MakeSpell(AID.SolarFansAOE), 5); // TODO: or SolarFansCharge? not sure which one deals damage... +class SolarFans(BossModule module) : Components.ChargeAOEs(module, ActionID.MakeSpell(AID.SolarFansAOE), 5); class RadiantRhythm(BossModule module) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.RadiantFlight)) { - private IReadOnlyList _flames = module.Enemies(OID.WardensFlame); - private static readonly AOEShapeDonutSector _shape = new(20, 30, 45.Degrees()); + private readonly List _aoes = []; + private readonly List _aoes2 = []; + + public override IEnumerable ActiveAOEs(int slot, Actor actor) + { + if (_aoes.Count > 0) + { + yield return new(_aoes[0].Shape, _aoes[0].Origin, _aoes[0].Rotation, _aoes[0].Activation, ArenaColor.Danger); + yield return new(_aoes2[0].Shape, _aoes2[0].Origin, _aoes2[0].Rotation, _aoes2[0].Activation, ArenaColor.Danger); + } + if (_aoes.Count > 1) + { + yield return new(_aoes[1].Shape, _aoes[1].Origin, _aoes[1].Rotation, _aoes[1].Activation); + yield return new(_aoes2[1].Shape, _aoes2[1].Origin, _aoes2[1].Rotation, _aoes2[1].Activation); + } + } - public override IEnumerable ActiveAOEs(int slot, Actor actor) => NextCenterDirections(Module.Bounds.Center).Select(d => new AOEInstance(_shape, Module.Bounds.Center, d)); + public override void OnCastStarted(Actor caster, ActorCastInfo spell) + { + var _activation = spell.NPCFinishAt.AddSeconds(7.7f); + if ((AID)spell.Action.ID == AID.SolarFansCharge) //since it seems impossible to determine early enough if 5 or 6 casts happen, we draw one extra one just incase + { + if (spell.LocXZ.AlmostEqual(new(-775, -750), 10)) + for (int i = 1; i < 6; ++i) + { + _aoes.Add(new(_shape, Module.Bounds.Center, (225 + i * 90).Degrees(), _activation.AddSeconds(1.3f * (i - 1)))); + _aoes2.Add(new(_shape, Module.Bounds.Center, (45 + i * 90).Degrees(), _activation.AddSeconds(1.3f * (i - 1)))); + } + if (spell.LocXZ.AlmostEqual(new(-750, -775), 1)) + for (int i = 1; i < 6; ++i) + { + _aoes.Add(new(_shape, Module.Bounds.Center, (135 + i * 90).Degrees(), _activation.AddSeconds(1.3f * (i - 1)))); + _aoes2.Add(new(_shape, Module.Bounds.Center, (-45 + i * 90).Degrees(), _activation.AddSeconds(1.3f * (i - 1)))); + } + } + } - private IEnumerable NextCenterDirections(WPos center) => _flames.Where(f => (f.Position - center).LengthSq() > 25).Select(f => Angle.FromDirection(f.Position - center) + 45.Degrees()); + public override void OnEventCast(Actor caster, ActorCastEvent spell) + { + if ((AID)spell.Action.ID == AID.RadiantFinish) + { + _aoes.Clear(); + _aoes2.Clear(); + } + if (_aoes.Count > 0 && (AID)spell.Action.ID == AID.RadiantFlight && ++NumCasts % 2 == 0) + { + _aoes.RemoveAt(0); + _aoes2.RemoveAt(0); + } + } } -class RadiantFinish(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RadiantFlourish), new AOEShapeCircle(25)); +class RadiantFlourish(BossModule module) : Components.GenericAOEs(module) +{ + private int teleportcounter; + private static readonly AOEShapeCircle circle = new(25); + private readonly List _aoes = []; + + public override IEnumerable ActiveAOEs(int slot, Actor actor) => _aoes; + + public override void OnCastFinished(Actor caster, ActorCastInfo spell) + { + if ((AID)spell.Action.ID == AID.SolarFansAOE) + _aoes.Add(new(circle, spell.LocXZ, Activation: WorldState.FutureTime(16.6f))); + if ((AID)spell.Action.ID == AID.RadiantFlourish) + { + _aoes.Clear(); + teleportcounter = 0; + } + } + + public override void OnEventCast(Actor caster, ActorCastEvent spell) + { + if ((AID)spell.Action.ID == AID.TeleportFlame) //correct circle location if Flight happens 10 times instead of 8 times, ugly hack but i couldn't find a better difference in logs + { + if (++teleportcounter > 8) + { + teleportcounter = 0; + _aoes.Add(new(circle, Helpers.RotateAroundOrigin(90, Module.Bounds.Center, _aoes[0].Origin), Activation: _aoes[0].Activation.AddSeconds(1.4f))); + _aoes.Add(new(circle, Helpers.RotateAroundOrigin(90, Module.Bounds.Center, _aoes[1].Origin), Activation: _aoes[1].Activation.AddSeconds(1.4f))); + _aoes.RemoveAt(0); + _aoes.RemoveAt(0); + } + } + } +} \ No newline at end of file diff --git a/BossMod/Modules/Endwalker/Alliance/A13Azeyma/SolarWings.cs b/BossMod/Modules/Endwalker/Alliance/A13Azeyma/SolarWings.cs index cd01dafcaf..332ad628b4 100644 --- a/BossMod/Modules/Endwalker/Alliance/A13Azeyma/SolarWings.cs +++ b/BossMod/Modules/Endwalker/Alliance/A13Azeyma/SolarWings.cs @@ -5,7 +5,7 @@ class SolarFlair(BossModule module) : Components.GenericAOEs(module) { - private List _sunstorms = new(); + private readonly List _sunstorms = []; private BitMask _adjusted; private static readonly float _kickDistance = 18; diff --git a/BossMod/Modules/Endwalker/Alliance/A13Azeyma/WildfireWard.cs b/BossMod/Modules/Endwalker/Alliance/A13Azeyma/WildfireWard.cs index 1e3cf52414..b93245fda3 100644 --- a/BossMod/Modules/Endwalker/Alliance/A13Azeyma/WildfireWard.cs +++ b/BossMod/Modules/Endwalker/Alliance/A13Azeyma/WildfireWard.cs @@ -1,19 +1,17 @@ namespace BossMod.Endwalker.Alliance.A13Azeyma; -class WildfireWard(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.IlluminatingGlimpse), 15, false, 1, kind: Kind.DirLeft) +class Voidzone(BossModule module) : BossComponent(module) { - private static readonly WPos[] _tri = { new(-750, -762), new(-760.392f, -744), new(-739.608f, -744) }; - - public override void AddHints(int slot, Actor actor, TextHints hints) + public override void OnEventEnvControl(byte index, uint state) { - if (!actor.Position.InTri(_tri[0], _tri[1], _tri[2])) - hints.Add("Go to safe zone!"); - if (CalculateMovements(slot, actor).Any(e => !e.to.InTri(_tri[0], _tri[1], _tri[2]))) - hints.Add("About to be knocked into fire!"); - } - - public override void DrawArenaBackground(int pcSlot, Actor pc) - { - Arena.ZoneTri(_tri[0], _tri[1], _tri[2], ArenaColor.SafeFromAOE); + if (index == 0x1C) + { + if (state == 0x00020001) + Arena.Bounds = new ArenaBoundsPolygon(Helpers.CalculateEquilateralTriangleVertices(new(-750, -756.25f), 11)); + if (state == 0x00080004) + Arena.Bounds = new ArenaBoundsCircle(new(-750, -750), 30); + } } } + +class WildfireWard(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.IlluminatingGlimpse), 15, false, 1, kind: Kind.DirLeft); diff --git a/BossMod/Modules/Endwalker/Alliance/A14Naldthal/FarAboveDeepBelow.cs b/BossMod/Modules/Endwalker/Alliance/A14Naldthal/FarAboveDeepBelow.cs index 2aefff790c..fed624912f 100644 --- a/BossMod/Modules/Endwalker/Alliance/A14Naldthal/FarAboveDeepBelow.cs +++ b/BossMod/Modules/Endwalker/Alliance/A14Naldthal/FarAboveDeepBelow.cs @@ -43,8 +43,8 @@ private void InitIfReal() class DeepestPit(BossModule module) : Components.GenericAOEs(module, default, "GTFO from puddle!") { private bool _real; - private List _targets = new(); - private List _casters = new(); + private readonly List _targets = []; + private readonly List _casters = []; public bool Active => _casters.Count > 0; diff --git a/BossMod/Modules/Endwalker/Alliance/A14Naldthal/FortuneFlux.cs b/BossMod/Modules/Endwalker/Alliance/A14Naldthal/FortuneFlux.cs index 361992a2cf..9e08650d9d 100644 --- a/BossMod/Modules/Endwalker/Alliance/A14Naldthal/FortuneFlux.cs +++ b/BossMod/Modules/Endwalker/Alliance/A14Naldthal/FortuneFlux.cs @@ -4,7 +4,7 @@ class FortuneFluxOrder(BossModule module) : BossComponent(module) { public enum Mechanic { None, AOE, Knockback } - public List<(WPos source, Mechanic mechanic, DateTime activation)> Mechanics = new(); + public List<(WPos source, Mechanic mechanic, DateTime activation)> Mechanics = []; public int NumComplete; private WPos _currentTethered; private Mechanic _currentMechanic; @@ -109,7 +109,7 @@ private void UpdateActivation(int order, Mechanic mechanic, ActorCastInfo spell) class FortuneFluxAOE(BossModule module) : Components.GenericAOEs(module) { - private FortuneFluxOrder? _order = module.FindComponent(); + private readonly FortuneFluxOrder? _order = module.FindComponent(); private static readonly AOEShapeCircle _shape = new(20); @@ -123,7 +123,7 @@ public override IEnumerable ActiveAOEs(int slot, Actor actor) class FortuneFluxKnockback(BossModule module) : Components.Knockback(module) { - private FortuneFluxOrder? _order = module.FindComponent(); + private readonly FortuneFluxOrder? _order = module.FindComponent(); public override IEnumerable Sources(int slot, Actor actor) { diff --git a/BossMod/Modules/Endwalker/Alliance/A14Naldthal/HeatAboveFlamesBelow.cs b/BossMod/Modules/Endwalker/Alliance/A14Naldthal/HeatAboveFlamesBelow.cs index 4873c1792f..a69b2dafb5 100644 --- a/BossMod/Modules/Endwalker/Alliance/A14Naldthal/HeatAboveFlamesBelow.cs +++ b/BossMod/Modules/Endwalker/Alliance/A14Naldthal/HeatAboveFlamesBelow.cs @@ -2,7 +2,7 @@ class HeatAboveFlamesBelow(BossModule module) : Components.GenericAOEs(module) { - public List _aoes = new(); + public readonly List _aoes = []; private static readonly AOEShapeCircle _shapeOut = new(8); private static readonly AOEShapeDonut _shapeIn = new(8, 30); @@ -30,7 +30,7 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) ++NumCasts; } - private AOEShape? ShapeForAction(ActionID action) => (AID)action.ID switch + private static AOEShape? ShapeForAction(ActionID action) => (AID)action.ID switch { AID.FlamesOfTheDeadReal => _shapeIn, AID.LivingHeatReal => _shapeOut, diff --git a/BossMod/Modules/Endwalker/Alliance/A21Nophica/A21Nophica.cs b/BossMod/Modules/Endwalker/Alliance/A21Nophica/A21Nophica.cs index fe5a633e90..8553d1226d 100644 --- a/BossMod/Modules/Endwalker/Alliance/A21Nophica/A21Nophica.cs +++ b/BossMod/Modules/Endwalker/Alliance/A21Nophica/A21Nophica.cs @@ -1,5 +1,19 @@ namespace BossMod.Endwalker.Alliance.A21Nophica; +class Voidzone(BossModule module) : BossComponent(module) +{ + public override void OnEventEnvControl(byte index, uint state) + { + if (index == 0x39) + { + if (state == 0x02000200) + Arena.Bounds = new ArenaBoundsCircle(Module.Bounds.Center, 28); + if (state == 0x00400004) + Arena.Bounds = new ArenaBoundsCircle(Module.Bounds.Center, 34); + } + } +} + class FloralHaze(BossModule module) : Components.StatusDrivenForcedMarch(module, 2, (uint)SID.ForwardMarch, (uint)SID.AboutFace, (uint)SID.LeftFace, (uint)SID.RightFace, activationLimit: 8); class SummerShade(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.SummerShade), new AOEShapeDonut(12, 40)); class SpringFlowers(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.SpringFlowers), new AOEShapeCircle(12)); diff --git a/BossMod/Modules/Endwalker/Alliance/A21Nophica/A21NophicaEnums.cs b/BossMod/Modules/Endwalker/Alliance/A21Nophica/A21NophicaEnums.cs index 272c4edc1d..f4adc599c8 100644 --- a/BossMod/Modules/Endwalker/Alliance/A21Nophica/A21NophicaEnums.cs +++ b/BossMod/Modules/Endwalker/Alliance/A21Nophica/A21NophicaEnums.cs @@ -7,8 +7,8 @@ public enum OID : uint Tower = 0x3E73, // R1.350, spawn during fight BlueSafeZone = 0x1EB845, // R0.500, EventObj type, spawn during fight GoldSafeZone = 0x1EB846, // R0.500, EventObj type, spawn during fight - BlueTower = 0x1EB843, // R0.500, EventObj type, spawn during fight - GoldTower = 0x1EB844, // R0.500, EventObj type, spawn during fight + BlueFlowers = 0x1EB843, // R0.500, EventObj type, spawn during fight + GoldFlowers = 0x1EB844, // R0.500, EventObj type, spawn during fight } public enum AID : uint diff --git a/BossMod/Modules/Endwalker/Alliance/A21Nophica/A21NophicaStates.cs b/BossMod/Modules/Endwalker/Alliance/A21Nophica/A21NophicaStates.cs index e9c346b33d..79243b758f 100644 --- a/BossMod/Modules/Endwalker/Alliance/A21Nophica/A21NophicaStates.cs +++ b/BossMod/Modules/Endwalker/Alliance/A21Nophica/A21NophicaStates.cs @@ -4,7 +4,8 @@ class A21NophicaStates : StateMachineBuilder { public A21NophicaStates(BossModule module) : base(module) { - DeathPhase(0, SinglePhase); + DeathPhase(0, SinglePhase) + .ActivateOnEnter(); } private void SinglePhase(uint id) diff --git a/BossMod/Modules/Endwalker/Alliance/A21Nophica/MatronsBreath.cs b/BossMod/Modules/Endwalker/Alliance/A21Nophica/MatronsBreath.cs index f4adece804..5d441d823c 100644 --- a/BossMod/Modules/Endwalker/Alliance/A21Nophica/MatronsBreath.cs +++ b/BossMod/Modules/Endwalker/Alliance/A21Nophica/MatronsBreath.cs @@ -1,40 +1,31 @@ namespace BossMod.Endwalker.Alliance.A21Nophica; -class MatronsBreath(BossModule module) : BossComponent(module) +class MatronsBreath(BossModule module) : Components.GenericAOEs(module) { - public int NumCasts { get; private set; } - private IReadOnlyList _blueSafe = module.Enemies(OID.BlueSafeZone); - private IReadOnlyList _goldSafe = module.Enemies(OID.GoldSafeZone); - private List _towers = new(); + private readonly List<(Actor actor, DateTime activation)> _flowers = []; - private static readonly AOEShapeDonut _shape = new(8, 40); // TODO: verify safe zone radius + private static readonly AOEShapeDonut _shape = new(8, 50); - public override void AddHints(int slot, Actor actor, TextHints hints) + public override IEnumerable ActiveAOEs(int slot, Actor actor) { - if (_shape.Check(actor.Position, NextSafeZone)) - hints.Add("Go to correct safe zone!"); - } - - public override void DrawArenaBackground(int pcSlot, Actor pc) - { - _shape.Draw(Arena, NextSafeZone); + var _blueFlowers = Module.Enemies(OID.BlueSafeZone).FirstOrDefault(); + var _goldFlowers = Module.Enemies(OID.GoldSafeZone).FirstOrDefault(); + if (_flowers.Count > 0) + yield return new(_shape, _flowers[0].actor.OID == (uint)OID.BlueFlowers ? _blueFlowers!.Position : _goldFlowers!.Position, Activation: _flowers[0].activation); } public override void OnActorCreated(Actor actor) { - if ((OID)actor.OID is OID.BlueTower or OID.GoldTower) - _towers.Add(actor); + if ((OID)actor.OID is OID.BlueFlowers or OID.GoldFlowers) + _flowers.Add((actor, WorldState.FutureTime(11.1f))); } public override void OnEventCast(Actor caster, ActorCastEvent spell) { - if ((AID)spell.Action.ID is AID.Blueblossoms or AID.Giltblossoms) + if (_flowers.Count > 0 && (AID)spell.Action.ID is AID.Blueblossoms or AID.Giltblossoms) { ++NumCasts; - if (_towers.Count > 0) - _towers.RemoveAt(0); + _flowers.RemoveAt(0); } } - - private Actor? NextSafeZone => _towers.Count == 0 ? null : (OID)_towers[0].OID == OID.BlueTower ? _blueSafe.FirstOrDefault() : _goldSafe.FirstOrDefault(); } diff --git a/BossMod/Modules/Endwalker/Alliance/A22AlthykNymeia/A22AlthykNymeiaStates.cs b/BossMod/Modules/Endwalker/Alliance/A22AlthykNymeia/A22AlthykNymeiaStates.cs index 1fa81dc262..3685e34c2a 100644 --- a/BossMod/Modules/Endwalker/Alliance/A22AlthykNymeia/A22AlthykNymeiaStates.cs +++ b/BossMod/Modules/Endwalker/Alliance/A22AlthykNymeia/A22AlthykNymeiaStates.cs @@ -2,7 +2,7 @@ class A22AlthykNymeiaStates : StateMachineBuilder { - private A22AlthykNymeia _module; + private readonly A22AlthykNymeia _module; public A22AlthykNymeiaStates(A22AlthykNymeia module) : base(module) { @@ -15,9 +15,11 @@ public A22AlthykNymeiaStates(A22AlthykNymeia module) : base(module) private void SinglePhase(uint id) { ActorCast(id, _module.Nymeia, AID.SpinnersWheel, 10.3f, 4.5f); - Dictionary buildState)> dispatch = new(); - dispatch[SpinnersWheelSelect.Branch.Gaze] = ((id >> 24) + 1, ForkGaze); - dispatch[SpinnersWheelSelect.Branch.StayMove] = ((id >> 24) + 2, ForkStayMove); + Dictionary buildState)> dispatch = new() + { + [SpinnersWheelSelect.Branch.Gaze] = ((id >> 24) + 1, ForkGaze), + [SpinnersWheelSelect.Branch.StayMove] = ((id >> 24) + 2, ForkStayMove) + }; ComponentConditionFork(id + 0x10, 0.9f, comp => comp.SelectedBranch != SpinnersWheelSelect.Branch.None, comp => comp.SelectedBranch, dispatch, "Gaze -or- stay/move") .ActivateOnEnter() .DeactivateOnExit(); diff --git a/BossMod/Modules/Endwalker/Alliance/A22AlthykNymeia/Hydrostasis.cs b/BossMod/Modules/Endwalker/Alliance/A22AlthykNymeia/Hydrostasis.cs index 07a05386cc..95de1e8f5e 100644 --- a/BossMod/Modules/Endwalker/Alliance/A22AlthykNymeia/Hydrostasis.cs +++ b/BossMod/Modules/Endwalker/Alliance/A22AlthykNymeia/Hydrostasis.cs @@ -2,7 +2,7 @@ class Hydrostasis(BossModule module) : Components.Knockback(module) { - private List _sources = new(); + private readonly List _sources = []; public bool Active => _sources.Count == 3 || NumCasts > 0; diff --git a/BossMod/Modules/Endwalker/Alliance/A22AlthykNymeia/SpinnersWheel.cs b/BossMod/Modules/Endwalker/Alliance/A22AlthykNymeia/SpinnersWheel.cs index 712a20ac5a..14ad3ababb 100644 --- a/BossMod/Modules/Endwalker/Alliance/A22AlthykNymeia/SpinnersWheel.cs +++ b/BossMod/Modules/Endwalker/Alliance/A22AlthykNymeia/SpinnersWheel.cs @@ -21,8 +21,8 @@ public override void OnStatusGain(Actor actor, ActorStatus status) class SpinnersWheelGaze(BossModule module, bool inverted, AID aid, SID sid) : Components.GenericGaze(module, ActionID.MakeSpell(aid), inverted) { - private SID _sid = sid; - private Actor? _source = module.Enemies(OID.Nymeia).FirstOrDefault(); + private readonly SID _sid = sid; + private readonly Actor? _source = module.Enemies(OID.Nymeia).FirstOrDefault(); private DateTime _activation; private BitMask _affected; diff --git a/BossMod/Modules/Endwalker/Alliance/A23Halone/A23HaloneStates.cs b/BossMod/Modules/Endwalker/Alliance/A23Halone/A23HaloneStates.cs index 0ddfa6bd5b..3ea7cfae4c 100644 --- a/BossMod/Modules/Endwalker/Alliance/A23Halone/A23HaloneStates.cs +++ b/BossMod/Modules/Endwalker/Alliance/A23Halone/A23HaloneStates.cs @@ -6,7 +6,8 @@ public A23HaloneStates(BossModule module) : base(module) { SimplePhase(0, Phase1, "Before adds") .Raw.Update = () => Module.PrimaryActor.IsDestroyed || Module.PrimaryActor.IsDead || Module.PrimaryActor.HP.Cur < 1 || !Module.PrimaryActor.IsTargetable; - DeathPhase(1, Phase2); + DeathPhase(1, Phase2) + .ActivateOnEnter(); } private void Phase1(uint id) diff --git a/BossMod/Modules/Endwalker/Alliance/A23Halone/Lochos.cs b/BossMod/Modules/Endwalker/Alliance/A23Halone/Lochos.cs index 8a723179ba..3ba716c09f 100644 --- a/BossMod/Modules/Endwalker/Alliance/A23Halone/Lochos.cs +++ b/BossMod/Modules/Endwalker/Alliance/A23Halone/Lochos.cs @@ -2,8 +2,8 @@ class Lochos(BossModule module, float activationDelay) : Components.GenericAOEs(module) { - private List _aoes = new(); - private float _activationDelay = activationDelay; + private readonly List _aoes = []; + private readonly float _activationDelay = activationDelay; private static readonly AOEShapeRect _shape = new(60, 15); diff --git a/BossMod/Modules/Endwalker/Alliance/A23Halone/Octagons.cs b/BossMod/Modules/Endwalker/Alliance/A23Halone/Octagons.cs new file mode 100644 index 0000000000..5783c42ebb --- /dev/null +++ b/BossMod/Modules/Endwalker/Alliance/A23Halone/Octagons.cs @@ -0,0 +1,78 @@ +namespace BossMod.Endwalker.Alliance.A23Halone; + +// TODO: assign alliances members to a specific octagon. in duty finder it is usually: +// NW (Octagon3): Alliance A +// NE (Octagon1): Alliance C +// S (Octagon2): Alliance B +class Octagons(BossModule module) : BossComponent(module) +{ + private static readonly WPos[] spears = [new(-686, 592), new(-700, 616.2f), new(-714, 592)]; + + private static IEnumerable Octagon1() + { + for (int i = 0; i < 9; ++i) + yield return Helpers.RotateAroundOrigin(37.5f + i * 45, spears[0], new(spears[0].X + 11.5f, spears[0].Z)); + } + + private static IEnumerable Octagon2() + { + for (int i = 0; i < 9; ++i) + yield return Helpers.RotateAroundOrigin(22.5f + i * 45, spears[1], new(spears[1].X + 11.5f, spears[1].Z)); + } + + private static IEnumerable Octagon3() + { + for (int i = 0; i < 9; ++i) + yield return Helpers.RotateAroundOrigin(-37.5f + i * 45, spears[2], new(spears[2].X + 11.5f, spears[2].Z)); + } + + public override void DrawArenaForeground(int pcSlot, Actor pc) + { + if (Module.Enemies(OID.GlacialSpearSmall).Any(x => x.Position.AlmostEqual(spears[0], 1) && !x.IsDead)) + foreach (var c in Octagon1()) + Arena.PathLineTo(c); + MiniArena.PathStroke(false, ArenaColor.Border, 2); + if (Module.Enemies(OID.GlacialSpearSmall).Any(x => x.Position.AlmostEqual(spears[1], 1) && !x.IsDead)) + foreach (var c in Octagon2()) + Arena.PathLineTo(c); + MiniArena.PathStroke(false, ArenaColor.Border, 2); + if (Module.Enemies(OID.GlacialSpearSmall).Any(x => x.Position.AlmostEqual(spears[2], 1) && !x.IsDead)) + foreach (var c in Octagon3()) + Arena.PathLineTo(c); + MiniArena.PathStroke(false, ArenaColor.Border, 2); + } + + public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + { + var octagons = new List>(); //inverted octagons + var octagons2 = new List>(); //octagons + + base.AddAIHints(slot, actor, assignment, hints); + + if (Module.Enemies(OID.GlacialSpearSmall).Count(x => !x.IsDead) == 3) + { + octagons.Add(ShapeDistance.InvertedConvexPolygon(Octagon1(), true)); + octagons.Add(ShapeDistance.InvertedConvexPolygon(Octagon2(), true)); + octagons.Add(ShapeDistance.InvertedConvexPolygon(Octagon3(), true)); + } + else if (Module.Enemies(OID.GlacialSpearSmall).Any(x => x.Position.AlmostEqual(spears[0], 1) && !x.IsDead) && actor.Position.InPolygon(Octagon1())) + octagons.Add(ShapeDistance.InvertedConvexPolygon(Octagon1(), true)); + else if (Module.Enemies(OID.GlacialSpearSmall).Any(x => x.Position.AlmostEqual(spears[1], 1) && !x.IsDead) && actor.Position.InPolygon(Octagon2())) + octagons.Add(ShapeDistance.InvertedConvexPolygon(Octagon2(), true)); + else if (Module.Enemies(OID.GlacialSpearSmall).Any(x => x.Position.AlmostEqual(spears[2], 1) && !x.IsDead) && actor.Position.InPolygon(Octagon3())) + octagons.Add(ShapeDistance.InvertedConvexPolygon(Octagon3(), true)); + if (octagons.Count == 0) + { + if (Module.Enemies(OID.GlacialSpearSmall).Any(x => x.Position.AlmostEqual(spears[0], 1) && !x.IsDead) && !actor.Position.InPolygon(Octagon1())) + octagons2.Add(ShapeDistance.ConvexPolygon(Octagon1(), true)); + if (Module.Enemies(OID.GlacialSpearSmall).Any(x => x.Position.AlmostEqual(spears[1], 1) && !x.IsDead) && !actor.Position.InPolygon(Octagon2())) + octagons2.Add(ShapeDistance.ConvexPolygon(Octagon2(), true)); + if (Module.Enemies(OID.GlacialSpearSmall).Any(x => x.Position.AlmostEqual(spears[2], 1) && !x.IsDead) && !actor.Position.InPolygon(Octagon3())) + octagons2.Add(ShapeDistance.ConvexPolygon(Octagon3(), true)); + } + if (octagons.Count > 0) + hints.AddForbiddenZone(p => octagons.Select(f => f(p)).Max()); + if (octagons2.Count > 0) + hints.AddForbiddenZone(p => octagons2.Select(f => f(p)).Min()); + } +} \ No newline at end of file diff --git a/BossMod/Modules/Endwalker/Alliance/A23Halone/Tetrapagos.cs b/BossMod/Modules/Endwalker/Alliance/A23Halone/Tetrapagos.cs index c86d8ee524..88ff01fd23 100644 --- a/BossMod/Modules/Endwalker/Alliance/A23Halone/Tetrapagos.cs +++ b/BossMod/Modules/Endwalker/Alliance/A23Halone/Tetrapagos.cs @@ -2,9 +2,15 @@ class Tetrapagos(BossModule module) : Components.GenericAOEs(module) { - private List _aoes = new(); + private readonly List _aoes = []; - public override IEnumerable ActiveAOEs(int slot, Actor actor) => _aoes.Take(1); + public override IEnumerable ActiveAOEs(int slot, Actor actor) + { + if (_aoes.Count > 0) + yield return new(_aoes[0].Shape, _aoes[0].Origin, _aoes[0].Rotation, _aoes[0].Activation, ArenaColor.Danger); + if (_aoes.Count > 1) + yield return new(_aoes[1].Shape, _aoes[1].Origin, _aoes[1].Rotation, _aoes[1].Activation, Risky: false); + } public override void OnCastStarted(Actor caster, ActorCastInfo spell) { diff --git a/BossMod/Modules/Endwalker/Alliance/A24Menphina/A24Menphina.cs b/BossMod/Modules/Endwalker/Alliance/A24Menphina/A24Menphina.cs index a8efcc8460..89f7a4841c 100644 --- a/BossMod/Modules/Endwalker/Alliance/A24Menphina/A24Menphina.cs +++ b/BossMod/Modules/Endwalker/Alliance/A24Menphina/A24Menphina.cs @@ -14,4 +14,4 @@ class RiseOfTheTwinMoons(BossModule module) : Components.CastCounter(module, Act class MoonsetRays(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.MoonsetRaysAOE), 6, 4); [ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 911, NameID = 12063)] -public class A24Menphina(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(800, 750), 30)); +public class A24Menphina(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(800, 750), 25)); diff --git a/BossMod/Modules/Endwalker/Alliance/A24Menphina/MidnightFrost.cs b/BossMod/Modules/Endwalker/Alliance/A24Menphina/MidnightFrost.cs index cf8d14d2ae..b4b3ddaade 100644 --- a/BossMod/Modules/Endwalker/Alliance/A24Menphina/MidnightFrost.cs +++ b/BossMod/Modules/Endwalker/Alliance/A24Menphina/MidnightFrost.cs @@ -2,7 +2,7 @@ class MidnightFrostWaxingClaw(BossModule module) : Components.GenericAOEs(module) { - private List _aoes = new(); + private readonly List _aoes = []; private static readonly AOEShapeCone _shape = new(60, 90.Degrees()); diff --git a/BossMod/Modules/Endwalker/Alliance/A31Thaliak/A31Thaliak.cs b/BossMod/Modules/Endwalker/Alliance/A31Thaliak/A31Thaliak.cs index b77f6c7ded..051007b8d2 100644 --- a/BossMod/Modules/Endwalker/Alliance/A31Thaliak/A31Thaliak.cs +++ b/BossMod/Modules/Endwalker/Alliance/A31Thaliak/A31Thaliak.cs @@ -3,6 +3,10 @@ namespace BossMod.Endwalker.Alliance.A31Thaliak; class Katarraktes(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.KatarraktesAOE), "Raidwide + Bleed"); class Thlipsis(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.ThlipsisStack), 6); class Hydroptosis(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.HydroptosisSpread), 6); +class LeftBank(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.LeftBank), new AOEShapeCone(60, 90.Degrees())); +class LeftBank2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.LeftBank2), new AOEShapeCone(60, 90.Degrees())); +class RightBank(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RightBank), new AOEShapeCone(60, 90.Degrees())); +class RightBank2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RightBank2), new AOEShapeCone(60, 90.Degrees())); class Rhyton(BossModule module) : Components.GenericBaitAway(module) { @@ -30,10 +34,5 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) } } -class LeftBank(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.LeftBank), new AOEShapeCone(60, 90.Degrees())); -class LeftBank2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.LeftBank2), new AOEShapeCone(60, 90.Degrees())); -class RightBank(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RightBank), new AOEShapeCone(60, 90.Degrees())); -class RightBank2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.RightBank2), new AOEShapeCone(60, 90.Degrees())); - [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus, LTS", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 962, NameID = 11298, SortOrder = 2)] public class A31Thaliak(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsSquare(new(-945, 945), 24)); diff --git a/BossMod/Modules/Endwalker/Alliance/A31Thaliak/ThaliakHieroglyphika.cs b/BossMod/Modules/Endwalker/Alliance/A31Thaliak/ThaliakHieroglyphika.cs index cb945fe0f6..496c1b8c59 100644 --- a/BossMod/Modules/Endwalker/Alliance/A31Thaliak/ThaliakHieroglyphika.cs +++ b/BossMod/Modules/Endwalker/Alliance/A31Thaliak/ThaliakHieroglyphika.cs @@ -4,28 +4,15 @@ class Hieroglyphika(BossModule module) : Components.GenericAOEs(module) { private static readonly AOEShapeRect rect = new(6, 6, 6); private readonly List _aoes = []; - private const float RadianConversion = MathF.PI / 180; private static readonly WPos[] StartingCoords = [new(-963, 939), new(-963, 963), new(-939, 927), new(-951, 939), new(-951, 927), new(-939, 963), new(-927, 939), new(-939, 951), new(-939, 939), new(-927, 963), new(-963, 951), new(-927, 951), new(-951, 951), new(-963, 927)]; private byte currentIndex; public override IEnumerable ActiveAOEs(int slot, Actor actor) => _aoes.Take(14); - private static WPos RotateAroundOrigin(float rotatebydegrees, WPos origin, WPos caster) //TODO: consider moving to utils for future use - { - float x = MathF.Cos(rotatebydegrees * RadianConversion) * (caster.X - origin.X) - MathF.Sin(rotatebydegrees * RadianConversion) * (caster.Z - origin.Z); - float z = MathF.Sin(rotatebydegrees * RadianConversion) * (caster.X - origin.X) + MathF.Cos(rotatebydegrees * RadianConversion) * (caster.Z - origin.Z); - return new WPos(origin.X + x, origin.Z + z); - } - public override void OnEventEnvControl(byte index, uint state) { if (state == 0x00020001) - { - if (index == 0x17) - currentIndex = 0x17; - if (index == 0x4A) - currentIndex = 0x4A; - } + currentIndex = index; } public override void OnEventIcon(Actor actor, uint iconID) @@ -36,19 +23,19 @@ public override void OnEventIcon(Actor actor, uint iconID) { if (currentIndex == 0x17) foreach (var r in StartingCoords) - _aoes.Add(new(rect, RotateAroundOrigin(0, origin, r), default, _activation)); + _aoes.Add(new(rect, Helpers.RotateAroundOrigin(0, origin, r), Activation: _activation)); if (currentIndex == 0x4A) foreach (var r in StartingCoords) - _aoes.Add(new(rect, RotateAroundOrigin(-90, origin, r), default, _activation)); + _aoes.Add(new(rect, Helpers.RotateAroundOrigin(-90, origin, r), Activation: _activation)); } if (iconID == (uint)IconID.CounterClockwiseHieroglyphika) { if (currentIndex == 0x4A) foreach (var r in StartingCoords) - _aoes.Add(new(rect, RotateAroundOrigin(90, origin, r), default, _activation)); + _aoes.Add(new(rect, Helpers.RotateAroundOrigin(90, origin, r), Activation: _activation)); if (currentIndex == 0x17) foreach (var r in StartingCoords) - _aoes.Add(new(rect, RotateAroundOrigin(180, origin, r), default, _activation)); + _aoes.Add(new(rect, Helpers.RotateAroundOrigin(180, origin, r), Activation: _activation)); } } diff --git a/BossMod/Modules/Endwalker/Alliance/A31Thaliak/ThaliakTetraktys.cs b/BossMod/Modules/Endwalker/Alliance/A31Thaliak/ThaliakTetraktys.cs index 19443f959f..707b1d2835 100644 --- a/BossMod/Modules/Endwalker/Alliance/A31Thaliak/ThaliakTetraktys.cs +++ b/BossMod/Modules/Endwalker/Alliance/A31Thaliak/ThaliakTetraktys.cs @@ -7,25 +7,24 @@ public override void OnEventEnvControl(byte index, uint state) if (state == 0x00080004 && index == 0x04) // 02, 03, 04 always activate at the same time Module.Arena.Bounds = new ArenaBoundsSquare(new(-945, 945), 24); if (state == 0x00200010 && index == 0x04) // 02, 03, 04 always deactivate at the same time - Module.Arena.Bounds = new ArenaBoundsTri(new(-945, 948.5f), 41); + Arena.Bounds = new ArenaBoundsPolygon(Helpers.CalculateEquilateralTriangleVertices(new(-945, 934.5f), 24)); } } class TetraTriangles(BossModule module) : Components.GenericAOEs(module) { private readonly List _aoes = []; - private static readonly AOEShapeTriangle tri = new(16); - private static readonly AOEShapeTriangle triBig = new(32); + private static readonly AOEShapeEquilateralTriangle tri = new(16); + private static readonly AOEShapeEquilateralTriangle triBig = new(32); private static readonly AOEShapeRect rect = new(30, 8); private static readonly Angle _rot1 = -0.003f.Degrees(); private static readonly Angle _rot2 = -180.Degrees(); private static readonly Angle _rot3 = 179.995f.Degrees(); private static readonly Angle _rot4 = 59.995f.Degrees(); private static readonly Angle _rot5 = -60.Degrees(); - private static readonly Angle _rot6 = 179.995f.Degrees(); - private static readonly Angle _rot7 = 119.997f.Degrees(); - private static readonly Angle _rot8 = -120.003f.Degrees(); - private static readonly Angle _rot9 = 60.Degrees(); + private static readonly Angle _rot6 = 119.997f.Degrees(); + private static readonly Angle _rot7 = -120.003f.Degrees(); + private static readonly Angle _rot8 = 60.Degrees(); private bool TutorialDone; public override IEnumerable ActiveAOEs(int slot, Actor actor) @@ -68,18 +67,18 @@ public override void OnEventEnvControl(byte index, uint state) if (index == 0x13 && TutorialDone) //pair 13+15 always happen together after tutorial { _aoes.Add(new(tri, new WPos(-961, 948.7f), _rot1, _activation2)); - _aoes.Add(new(tri, new WPos(-937, 962.356f), _rot6, _activation2)); + _aoes.Add(new(tri, new WPos(-937, 962.356f), _rot3, _activation2)); _aoes.Add(new(rect, new WPos(-933, 955.428f), _rot4, _activation2)); _aoes.Add(new(rect, new WPos(-941, 955.428f), _rot5, _activation2)); _aoes.Add(new(rect, new WPos(-937, 948.5f), _rot2, _activation2)); - _aoes.Add(new(rect, new WPos(-957, 955.428f), _rot7, _activation2)); + _aoes.Add(new(rect, new WPos(-957, 955.428f), _rot6, _activation2)); } if (index == 0x12 && TutorialDone) //pair 12+16 always happen together after tutorial { _aoes.Add(new(tri, new WPos(-945, 948.5f), _rot2, _activation2)); _aoes.Add(new(tri, new WPos(-929, 948.7f), _rot1, _activation2)); - _aoes.Add(new(rect, new WPos(-933, 955.428f), _rot8, _activation2)); - _aoes.Add(new(rect, new WPos(-941.173f, 941.828f), _rot9, _activation2)); + _aoes.Add(new(rect, new WPos(-933, 955.428f), _rot7, _activation2)); + _aoes.Add(new(rect, new WPos(-941.173f, 941.828f), _rot8, _activation2)); _aoes.Add(new(rect, new WPos(-948.827f, 941.828f), _rot5, _activation2)); _aoes.Add(new(rect, new WPos(-945, 935), _rot2, _activation2)); } @@ -102,7 +101,7 @@ public override void OnEventEnvControl(byte index, uint state) } if (index == 0x15 && !TutorialDone) { - _aoes.Add(new(tri, new WPos(-937, 962.356f), _rot6, _activation)); + _aoes.Add(new(tri, new WPos(-937, 962.356f), _rot3, _activation)); _aoes.Add(new(rect, new WPos(-937, 948.5f), _rot2, _activation)); _aoes.Add(new(rect, new WPos(-933, 955.428f), _rot4, _activation)); _aoes.Add(new(rect, new WPos(-941, 955.428f), _rot5, _activation)); @@ -113,7 +112,7 @@ public override void OnEventEnvControl(byte index, uint state) _aoes.Add(new(tri, new WPos(-945, 948.5f), _rot2, _activation)); _aoes.Add(new(rect, new WPos(-945, 935), _rot2, _activation)); _aoes.Add(new(rect, new WPos(-948.827f, 941.828f), _rot5, _activation)); - _aoes.Add(new(rect, new WPos(-941.173f, 941.828f), _rot9, _activation)); + _aoes.Add(new(rect, new WPos(-941.173f, 941.828f), _rot8, _activation)); TutorialDone = true; } } diff --git a/BossMod/Modules/Endwalker/Alliance/A32Llymlaen/LlymlaenDireStraits.cs b/BossMod/Modules/Endwalker/Alliance/A32Llymlaen/LlymlaenDireStraits.cs index 429a94ea9d..67dc5b9126 100644 --- a/BossMod/Modules/Endwalker/Alliance/A32Llymlaen/LlymlaenDireStraits.cs +++ b/BossMod/Modules/Endwalker/Alliance/A32Llymlaen/LlymlaenDireStraits.cs @@ -7,13 +7,10 @@ class DireStraits(BossModule module) : Components.GenericAOEs(module) public override IEnumerable ActiveAOEs(int slot, Actor actor) { - if (_aoes.Count == 2) - { + if (_aoes.Count > 0) yield return new(_aoes[0].Shape, _aoes[0].Origin, _aoes[0].Rotation, _aoes[0].Activation, ArenaColor.Danger); + if (_aoes.Count > 1) yield return new(_aoes[1].Shape, _aoes[1].Origin, _aoes[1].Rotation, _aoes[1].Activation, Risky: false); - } - if (_aoes.Count == 1) - yield return new(_aoes[0].Shape, _aoes[0].Origin, _aoes[0].Rotation, _aoes[0].Activation, ArenaColor.Danger); } public override void OnCastStarted(Actor caster, ActorCastInfo spell) diff --git a/BossMod/Modules/Endwalker/Alliance/A32Llymlaen/LlymlaenFrothingSea.cs b/BossMod/Modules/Endwalker/Alliance/A32Llymlaen/LlymlaenFrothingSea.cs index 56f06a566f..aa3dcd4687 100644 --- a/BossMod/Modules/Endwalker/Alliance/A32Llymlaen/LlymlaenFrothingSea.cs +++ b/BossMod/Modules/Endwalker/Alliance/A32Llymlaen/LlymlaenFrothingSea.cs @@ -7,7 +7,7 @@ namespace BossMod.Endwalker.Alliance.A32Llymlaen; public override void OnEventEnvControl(byte index, uint state) { - var _activation = WorldState.FutureTime(0.15f); + var _activation = WorldState.FutureTime(30); if (state == 0x00800040 && index == 0x49) Lines.Add(new() { Next = new(-80, -900), Advance = 2.2f * _rot1.ToDirection(), NextExplosion = _activation, TimeToMove = 0.9f, ExplosionsLeft = 13, MaxShownExplosions = 2, Rotation = _rot1 }); if (state == 0x08000400 && index == 0x49) diff --git a/BossMod/Modules/Endwalker/Alliance/A32Llymlaen/LlymlaenSurgingWave.cs b/BossMod/Modules/Endwalker/Alliance/A32Llymlaen/LlymlaenSurgingWave.cs index a00b650915..c656c8483e 100644 --- a/BossMod/Modules/Endwalker/Alliance/A32Llymlaen/LlymlaenSurgingWave.cs +++ b/BossMod/Modules/Endwalker/Alliance/A32Llymlaen/LlymlaenSurgingWave.cs @@ -46,7 +46,7 @@ public override void DrawArenaForeground(int pcSlot, Actor pc) Arena.PathLineTo(new(c * 19, -929)); Arena.PathLineTo(new(c * -19, -929)); Arena.PathLineTo(new(c * -19, -910)); - Arena.PathStroke(false, ArenaColor.Border, 2); + MiniArena.PathStroke(false, ArenaColor.Border, 2); if (Module.FindComponent()!.Sources(pcSlot, pc).Any()) Arena.ZoneCone(new(-6 * c, -900), 0, 6, c * -90.Degrees(), 22.5f.Degrees(), ArenaColor.SafeFromAOE); } diff --git a/BossMod/Modules/Endwalker/Alliance/A33Oschon/A33Oschon.cs b/BossMod/Modules/Endwalker/Alliance/A33Oschon/A33Oschon.cs index cd9764ca9d..5639110538 100644 --- a/BossMod/Modules/Endwalker/Alliance/A33Oschon/A33Oschon.cs +++ b/BossMod/Modules/Endwalker/Alliance/A33Oschon/A33Oschon.cs @@ -4,6 +4,10 @@ class DownhillP1(BossModule module) : Components.LocationTargetedAOEs(module, Ac class SoaringMinuet1(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.SoaringMinuet1), new AOEShapeCone(65, 135.Degrees())); class SoaringMinuet2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.SoaringMinuet2), new AOEShapeCone(65, 135.Degrees())); class SuddenDownpour(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.SuddenDownpour2)); +class ClimbingShotRaidwide(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.ClimbingShot), "Raidwide + Knockback"); +class ClimbingShotRaidwide2(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.ClimbingShot2), "Raidwide + Knockback"); +class ClimbingShotRaidwide3(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.ClimbingShot3), "Raidwide + Knockback"); +class ClimbingShotRaidwide4(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.ClimbingShot4), "Raidwide + Knockback"); class LoftyPeaks(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.LoftyPeaks), "Raidwide x5 coming"); class TrekShot(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TrekShot), new AOEShapeCone(65, 60.Degrees())); class TrekShot2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TrekShot2), new AOEShapeCone(65, 60.Degrees())); diff --git a/BossMod/Modules/Endwalker/Alliance/A33Oschon/A33OschonStates.cs b/BossMod/Modules/Endwalker/Alliance/A33Oschon/A33OschonStates.cs index 3fb28ff77e..5ac1fa7489 100644 --- a/BossMod/Modules/Endwalker/Alliance/A33Oschon/A33OschonStates.cs +++ b/BossMod/Modules/Endwalker/Alliance/A33Oschon/A33OschonStates.cs @@ -5,7 +5,7 @@ class Phase2ArenaUpdate(BossModule module) : BossComponent(module) public override void OnEventEnvControl(byte index, uint state) { if (state == 0x00200010 && index == 0x42) - Module.Arena.Bounds = new ArenaBoundsSquare(new(0, 750), 20); + Module.Arena.Bounds = new ArenaBoundsSquare(Module.Bounds.Center, 20); } } @@ -22,6 +22,10 @@ public A33OschonStates(A33Oschon module) : base(module) .ActivateOnEnter() .ActivateOnEnter() .ActivateOnEnter() + .ActivateOnEnter() + .ActivateOnEnter() + .ActivateOnEnter() + .ActivateOnEnter() .ActivateOnEnter() .ActivateOnEnter() .ActivateOnEnter() diff --git a/BossMod/Modules/Endwalker/Alliance/A33Oschon/OschonP2WanderingShot.cs b/BossMod/Modules/Endwalker/Alliance/A33Oschon/OschonP2WanderingShot.cs index 60c21b2415..10eeff0b13 100644 --- a/BossMod/Modules/Endwalker/Alliance/A33Oschon/OschonP2WanderingShot.cs +++ b/BossMod/Modules/Endwalker/Alliance/A33Oschon/OschonP2WanderingShot.cs @@ -14,9 +14,9 @@ public override void OnEventEnvControl(byte index, uint state) if (index == 0x48) { if (state == 0x00200010) - _aoe = new(circle, new WPos(-0.015f, 759.975f), default, _activation); + _aoe = new(circle, new WPos(-0.015f, 759.975f), Activation: _activation); if (state == 0x00020001) - _aoe = new(circle, new WPos(-0.015f, 739.986f), default, _activation); + _aoe = new(circle, new WPos(-0.015f, 739.986f), Activation: _activation); } } diff --git a/BossMod/Modules/Endwalker/Alliance/A34Eulogia/A34Eulogia.cs b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/A34Eulogia.cs index b710ee5f3e..5fd27dc48c 100644 --- a/BossMod/Modules/Endwalker/Alliance/A34Eulogia/A34Eulogia.cs +++ b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/A34Eulogia.cs @@ -1,11 +1,18 @@ namespace BossMod.Endwalker.Alliance.A34Eulogia; -class EudaimonEorzea(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.EudaimonEorzea2), "Raidwide x12"); +class EudaimonEorzea(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.EudaimonEorzea2), "Raidwide x13"); class TheWhorl(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.TheWhorl)); class DawnOfTime(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.DawnOfTime)); +class ClimbingShotRaidwide(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.ClimbingShotVisual), "Raidwide + Knockback"); +class ClimbingShotRaidwide2(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.ClimbingShotVisual2), "Raidwide + Knockback"); +class ClimbingShotRaidwide3(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.ClimbingShotVisual2), "Raidwide + Knockback"); +class ClimbingShotRaidwide4(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.ClimbingShotVisual), "Raidwide + Knockback"); +class AsAboveSoBelow(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.AsAboveSoBelow)); +class AsAboveSoBelow2(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.AsAboveSoBelow2)); class SoaringMinuet(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.SoaringMinuet), new AOEShapeCone(40, 135.Degrees())); class HandOfTheDestroyerJudgment(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HandOfTheDestroyerJudgmentAOE), new AOEShapeRect(90, 20)); class HandOfTheDestroyerWrath(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.HandOfTheDestroyerWrathAOE), new AOEShapeRect(90, 20)); +class DestructiveBoltStack(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.DestructiveBoltStack), 6); class Sunbeam(BossModule module) : Components.BaitAwayCast(module, ActionID.MakeSpell(AID.SunbeamTankBuster), new AOEShapeCircle(6), true) { @@ -16,7 +23,6 @@ public override void AddGlobalHints(GlobalHints hints) } } -class DestructiveBoltStack(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.DestructiveBoltStack), 6); [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus, LTS", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 962, NameID = 11301, SortOrder = 7)] public class A34Eulogia(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(945, -945), 35)); diff --git a/BossMod/Modules/Endwalker/Alliance/A34Eulogia/A34EulogiaEnums.cs b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/A34EulogiaEnums.cs index 8aa2ffaa73..944c52ebd7 100644 --- a/BossMod/Modules/Endwalker/Alliance/A34Eulogia/A34EulogiaEnums.cs +++ b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/A34EulogiaEnums.cs @@ -36,32 +36,34 @@ public enum AID : uint QuintessenceVisual5 = 35357, // Avatar->self, 0.5s cast, single-target FirstFormRight = 35338, // Eulogia->self, 7.0s cast, single-target FirstFormLeft = 35341, // Eulogia->self, 7.0s cast, single-target - FirstFormAOE = 35344, // Eulogia->self, 7.0s cast, single-target + FirstFormDonut = 35344, // Eulogia->self, 7.0s cast, single-target SecondFormRight = 35339, // Eulogia->self, 7.0s cast, single-target SecondFormLeft = 35342, // Eulogia->self, 7.0s cast, single-target - SecondFormAOE = 35345, // Eulogia->self, 7.0s cast, single-target + SecondFormDonut = 35345, // Eulogia->self, 7.0s cast, single-target ThirdFormRight = 35340, // Eulogia->self, 7.0s cast, single-target ThirdFormLeft = 35343, // Eulogia->self, 7.0s cast, single-target - ThirdFormAOE = 35346, // Eulogia->self, 7.0s cast, single-target + ThirdFormDonut = 35346, // Eulogia->self, 7.0s cast, single-target QuintessenceSetup = 35350, // Eulogia->self, 4.0s cast, single-target Quintessence1stSpot = 35351, // Eulogia->location, no cast, single-target, teleport to 1st spot Quintessence2ndSpot = 35352, // Eulogia->location, no cast, single-target, teleport to 2st spot Quintessence3rdSpot = 35353, // Eulogia->location, no cast, single-target, teleport to 3rd spot QuintessenceFirstRight = 35354, // Helper->self, 4.8s cast, range 50 180-degree cone QuintessenceFirstLeft = 35355, // Helper->self, 4.8s cast, range 50 180-degree cone - QuintessenceFirstAOE = 35356, // Helper->self, 4.8s cast, range 8-50 donut + QuintessenceFirstDonut = 35356, // Helper->self, 4.8s cast, range 8-50 donut QuintessenceSecondRight = 36069, // Helper->self, 8.3s cast, range 50 180-degree cone QuintessenceSecondLeft = 36070, // Helper->self, 8.3s cast, range 50 180-degree cone - QuintessenceSecondAOE = 36071, // Helper->self, 8.3s cast, range 8-50 donut + QuintessenceSecondDonut = 36071, // Helper->self, 8.3s cast, range 8-50 donut QuintessenceThirdRight = 36072, // Helper->self, 11.9s cast, range 50 180-degree cone QuintessenceThirdLeft = 36073, // Helper->self, 11.9s cast, range 50 180-degree cone - QuintessenceThirdAOE = 36074, // Helper->self, 11.9s cast, range 8-50 donut + QuintessenceThirdDonut = 36074, // Helper->self, 11.9s cast, range 8-50 donut SunbeamSelf = 35328, // Eulogia->self, 5.0s cast, single-target, visual SunbeamTankBuster = 35329, // Helper->players, 5.0s cast, range 6 circle, tankbusters DawnOfTime = 35331, // Eulogia->self, 5.0s cast, range 70 circle - TheWhorl = 35375, // Eulogia->self, 7.0s cast, range 40 circle, raidwide + TheWhorl = 35375, // Eulogia->self, 7.0s cast, range 40 circle + AsAboveSoBelow = 35419, // Eulogia->self, 5.0s cast, range 40 circle + AsAboveSoBelow2 = 35420, // Eulogia->self, 5.0s cast, range 40 circle LovesLight = 35376, // Eulogia->self, 4.0s cast, single-target FullBright = 35377, // Eulogia->self, 3.0s cast, single-target @@ -113,10 +115,7 @@ public enum AID : uint ThousandfoldThrustAOEFirst = 35417, // Helper->self, 6.3s cast, range 60 180-degree cone ThousandfoldThrustAOERest = 35418, // Helper->self, no cast, range 60 180-degree cone - AsAboveSoBelow = 35419, // Eulogia->self, 5.0s cast, range 40 circle - AsAboveSoBelowAlt = 35420, // Eulogia->self, 5.0s cast, range 40 circle - - ClimbingShotVisual = 36106, // Eulogia->self, 8.0s cast, range 40 circle, visual + ClimbingShotVisual = 36106, // Eulogia->self, 8.0s cast, range 40 circle, visual, it seems like any combination of visual + actual knockback/raidwide can happen, ~0.2s delay ClimbingShotVisual2 = 36107, // Eulogia->self, 8.0s cast, range 40 circle, visual ClimbingShot1 = 35431, // Eulogia->self, no cast, range 40 circle, knockback 20, away from source ClimbingShot2 = 35429, // Eulogia->self, no cast, range 40 circle, knockback 20, away from source diff --git a/BossMod/Modules/Endwalker/Alliance/A34Eulogia/A34EulogiaStates.cs b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/A34EulogiaStates.cs index 3831843e76..0668d13dfc 100644 --- a/BossMod/Modules/Endwalker/Alliance/A34Eulogia/A34EulogiaStates.cs +++ b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/A34EulogiaStates.cs @@ -7,11 +7,11 @@ public override void OnEventEnvControl(byte index, uint state) if (index == 0x1B) { if (state == 0x00080004) - Module.Arena.Bounds = new ArenaBoundsCircle(new(945, -945), 35); + Module.Arena.Bounds = new ArenaBoundsCircle(Module.Bounds.Center, 35); if (state is 0x00020001 or 0x00100001) - Module.Arena.Bounds = new ArenaBoundsCircle(new(945, -945), 30); + Module.Arena.Bounds = new ArenaBoundsCircle(Module.Bounds.Center, 30); if (state == 0x00400020) - Module.Arena.Bounds = new ArenaBoundsSquare(new(945, -945), 24); + Module.Arena.Bounds = new ArenaBoundsSquare(Module.Bounds.Center, 24); } } } @@ -35,15 +35,22 @@ public A34EulogiaStates(BossModule module) : base(module) .ActivateOnEnter() .ActivateOnEnter() .ActivateOnEnter() + .ActivateOnEnter() + .ActivateOnEnter() .ActivateOnEnter() .ActivateOnEnter() .ActivateOnEnter() .ActivateOnEnter() .ActivateOnEnter() .ActivateOnEnter() + .ActivateOnEnter() .ActivateOnEnter() .ActivateOnEnter() .ActivateOnEnter() + .ActivateOnEnter() + .ActivateOnEnter() + .ActivateOnEnter() + .ActivateOnEnter() .ActivateOnEnter(); } } diff --git a/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaClimbingShot.cs b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaClimbingShot.cs index a3b7eff512..e972919a14 100644 --- a/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaClimbingShot.cs +++ b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaClimbingShot.cs @@ -18,5 +18,5 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) _knockback = null; } - public override bool DestinationUnsafe(int slot, Actor actor, WPos pos) => Module.FindComponent()?.ActiveAOEs(slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false || !Module.Bounds.Contains(pos); + public override bool DestinationUnsafe(int slot, Actor actor, WPos pos) => Module.FindComponent()?.ActiveAOEs(slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false || !Module.Bounds.Contains(pos); } diff --git a/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaHieroglyphika.cs b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaHieroglyphika.cs index 6a7e455577..6d7878be41 100644 --- a/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaHieroglyphika.cs +++ b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaHieroglyphika.cs @@ -4,28 +4,20 @@ class Hieroglyphika(BossModule module) : Components.GenericAOEs(module) { private static readonly AOEShapeRect rect = new(12, 6); private readonly List _aoes = []; - private const float RadianConversion = MathF.PI / 180; private static readonly WPos[] StartingCoords = [new(951, -933), new(939, -933), new(951, -957), new(939, -957), new(927, -933), new(963, -957), new(963, -933), new(951, -945), new(939, -945), new(927, -921), new(939, -921), new(927, -945), new(963, -945), new(963, -921)]; public override IEnumerable ActiveAOEs(int slot, Actor actor) => _aoes.Take(14); - private static WPos RotateAroundOrigin(float rotatebydegrees, WPos origin, WPos caster) //TODO: consider moving to utils for future use - { - float x = MathF.Cos(rotatebydegrees * RadianConversion) * (caster.X - origin.X) - MathF.Sin(rotatebydegrees * RadianConversion) * (caster.Z - origin.Z); - float z = MathF.Sin(rotatebydegrees * RadianConversion) * (caster.X - origin.X) + MathF.Cos(rotatebydegrees * RadianConversion) * (caster.Z - origin.Z); - return new WPos(origin.X + x, origin.Z + z); - } - public override void OnEventIcon(Actor actor, uint iconID) { var _activation = WorldState.FutureTime(16); var origin = Module.Bounds.Center; if (iconID == (uint)IconID.ClockwiseHieroglyphika) foreach (var r in StartingCoords) - _aoes.Add(new(rect, RotateAroundOrigin(0, origin, r), 180.Degrees(), _activation)); + _aoes.Add(new(rect, Helpers.RotateAroundOrigin(0, origin, r), 180.Degrees(), _activation)); if (iconID == (uint)IconID.CounterClockwiseHieroglyphika) foreach (var r in StartingCoords) - _aoes.Add(new(rect, RotateAroundOrigin(180, origin, r), default, _activation)); + _aoes.Add(new(rect, Helpers.RotateAroundOrigin(180, origin, r), Activation: _activation)); } public override void OnEventCast(Actor caster, ActorCastEvent spell) diff --git a/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaQuintessence.cs b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaQuintessence.cs index 1283fd592a..aab6ac222e 100644 --- a/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaQuintessence.cs +++ b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaQuintessence.cs @@ -4,14 +4,11 @@ class Quintessence(BossModule module) : Components.GenericAOEs(module) { private static readonly AOEShapeCone cone = new(50, 90.Degrees()); private static readonly AOEShapeDonut donut = new(8, 60); - private static readonly Angle _rot1 = -135.Degrees(); + private static readonly Angle _rot1 = 135.Degrees(); private static readonly Angle _rot2 = 180.Degrees(); private static readonly Angle _rot3 = 90.Degrees(); - private static readonly Angle _rot4 = -45.Degrees(); - private static readonly Angle _rot5 = 135.Degrees(); - private static readonly Angle _rot6 = 0.Degrees(); - private static readonly Angle _rot7 = -90.Degrees(); - private static readonly Angle _rot8 = 45.Degrees(); + private static readonly Angle _rot4 = 45.Degrees(); + private static readonly Angle _rot5 = 0.Degrees(); private byte _index; private WPos position; @@ -29,110 +26,77 @@ public override void OnEventEnvControl(byte index, uint state) { if (state == 0x00020001) { + _index = index; if (index is 0x4F or 0x54 or 0x51) - { - _index = index; position = new WPos(954, -954); - } if (index is 0x52 or 0x57 or 0x4E) - { - _index = index; position = new WPos(936, -954); - } if (index is 0x55 or 0x4D or 0x50) - { - _index = index; position = new WPos(936, -936); - } if (index is 0x56 or 0x53 or 0x4C) - { - _index = index; position = new WPos(954, -936); - } } } public override void OnCastStarted(Actor caster, ActorCastInfo spell) { - var _activation1 = spell.NPCFinishAt.AddSeconds(19.4f); - var _activation2 = spell.NPCFinishAt.AddSeconds(15.7f); - var _activation3 = spell.NPCFinishAt.AddSeconds(12.1f); + var _activation = _aoes.Count == 0 ? spell.NPCFinishAt.AddSeconds(19.4f) : _aoes.Count == 1 ? spell.NPCFinishAt.AddSeconds(15.7f) : spell.NPCFinishAt.AddSeconds(12.1f); if ((AID)spell.Action.ID == AID.FirstFormRight) { if (_index == 0x4F) - _aoes.Add(new(cone, position, _rot8, _activation1)); + _aoes.Add(new(cone, position, _rot4, _activation)); if (_index == 0x4D) - _aoes.Add(new(cone, position, _rot1, _activation1)); + _aoes.Add(new(cone, position, -_rot1, _activation)); if (_index == 0x4C) - _aoes.Add(new(cone, position, _rot4, _activation1)); + _aoes.Add(new(cone, position, -_rot4, _activation)); if (_index == 0x4E) - _aoes.Add(new(cone, position, _rot5, _activation1)); + _aoes.Add(new(cone, position, _rot1, _activation)); } if ((AID)spell.Action.ID == AID.FirstFormLeft) { if (_index == 0x4E) - _aoes.Add(new(cone, position, _rot4, _activation1)); + _aoes.Add(new(cone, position, -_rot4, _activation)); if (_index == 0x4F) - _aoes.Add(new(cone, position, _rot1, _activation1)); + _aoes.Add(new(cone, position, -_rot1, _activation)); if (_index == 0x4C) - _aoes.Add(new(cone, position, _rot5, _activation1)); + _aoes.Add(new(cone, position, _rot1, _activation)); if (_index == 0x4D) - _aoes.Add(new(cone, position, _rot8, _activation1)); + _aoes.Add(new(cone, position, _rot4, _activation)); } - if ((AID)spell.Action.ID == AID.FirstFormAOE) - { - if (_index is 0x4F or 0x4C or 0x4E) - _aoes.Add(new(donut, position, default, _activation1)); - } - if ((AID)spell.Action.ID == AID.SecondFormRight) + // known donut indices: + // 1st form: 0x4F, 0x4C, 0x4E + // 2nd form: 0x56, 0x51 + // 3rd form: 0x53, 0x54, 0x55, 0x57, 0x56, 0x51, 0x50 + // but since we don't need a direction for donuts, we dont need to check it + if ((AID)spell.Action.ID is AID.FirstFormDonut or AID.SecondFormDonut or AID.ThirdFormDonut) + _aoes.Add(new(donut, position, Activation: _activation)); + if ((AID)spell.Action.ID is AID.SecondFormRight or AID.ThirdFormRight) { + if (_index == 0x52) + _aoes.Add(new(cone, position, _rot3, _activation)); if (_index is 0x57 or 0x50) - _aoes.Add(new(cone, position, _rot2, _activation2)); + _aoes.Add(new(cone, position, _rot2, _activation)); if (_index is 0x54 or 0x53) - _aoes.Add(new(cone, position, _rot6, _activation2)); + _aoes.Add(new(cone, position, _rot5, _activation)); if (_index is 0x56 or 0x55) - _aoes.Add(new(cone, position, _rot7, _activation2)); + _aoes.Add(new(cone, position, -_rot3, _activation)); } - if ((AID)spell.Action.ID == AID.SecondFormLeft) - { - if (_index is 0x55 or 0x56) - _aoes.Add(new(cone, position, _rot3, _activation2)); - if (_index is 0x52 or 0x51) - _aoes.Add(new(cone, position, _rot7, _activation2)); - } - if ((AID)spell.Action.ID == AID.SecondFormAOE) - { - if (_index is 0x56 or 0x51) - _aoes.Add(new(donut, position, default, _activation2)); - } - if ((AID)spell.Action.ID == AID.ThirdFormRight) - { - if (_index is 0x50 or 0x57) - _aoes.Add(new(cone, position, _rot2, _activation3)); - if (_index is 0x53 or 0x54) - _aoes.Add(new(cone, position, _rot6, _activation3)); - } - if ((AID)spell.Action.ID == AID.ThirdFormLeft) + if ((AID)spell.Action.ID is AID.SecondFormLeft or AID.ThirdFormLeft) { if (_index is 0x50 or 0x57) - _aoes.Add(new(cone, position, _rot6, _activation3)); + _aoes.Add(new(cone, position, _rot5, _activation)); if (_index is 0x55 or 0x56) - _aoes.Add(new(cone, position, _rot3, _activation3)); + _aoes.Add(new(cone, position, _rot3, _activation)); if (_index is 0x52 or 0x51) - _aoes.Add(new(cone, position, _rot7, _activation3)); + _aoes.Add(new(cone, position, -_rot3, _activation)); if (_index == 0x53) - _aoes.Add(new(cone, position, _rot2, _activation3)); - } - if ((AID)spell.Action.ID == AID.ThirdFormAOE) - { - if (_index is 0x53 or 0x54 or 0x57 or 0x56 or 0x51 or 0x50) - _aoes.Add(new(donut, position, default, _activation3)); + _aoes.Add(new(cone, position, _rot2, _activation)); } } public override void OnCastFinished(Actor caster, ActorCastInfo spell) { - if (_aoes.Count > 0 && (AID)spell.Action.ID is AID.QuintessenceFirstRight or AID.QuintessenceFirstLeft or AID.QuintessenceFirstAOE or AID.QuintessenceSecondRight or AID.QuintessenceSecondLeft or AID.QuintessenceSecondAOE or AID.QuintessenceThirdRight or AID.QuintessenceThirdLeft or AID.QuintessenceThirdAOE) + if (_aoes.Count > 0 && (AID)spell.Action.ID is AID.QuintessenceFirstRight or AID.QuintessenceFirstLeft or AID.QuintessenceFirstDonut or AID.QuintessenceSecondRight or AID.QuintessenceSecondLeft or AID.QuintessenceSecondDonut or AID.QuintessenceThirdRight or AID.QuintessenceThirdLeft or AID.QuintessenceThirdDonut) { ++NumCasts; _aoes.RemoveAt(0); diff --git a/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaRadiantRhythm.cs b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaRadiantRhythm.cs index 0b48c48fad..6f818f7486 100644 --- a/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaRadiantRhythm.cs +++ b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaRadiantRhythm.cs @@ -1,5 +1,7 @@ namespace BossMod.Endwalker.Alliance.A34Eulogia; +class SolarFans(BossModule module) : Components.ChargeAOEs(module, ActionID.MakeSpell(AID.SolarFansAOE), 5); + class RadiantFlourish(BossModule module) : Components.GenericAOEs(module) { private static readonly AOEShapeCircle circle = new(27); diff --git a/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaAsAboveSoBelow.cs b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EurlogiaEverFireOnceBurned.cs similarity index 96% rename from BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaAsAboveSoBelow.cs rename to BossMod/Modules/Endwalker/Alliance/A34Eulogia/EurlogiaEverFireOnceBurned.cs index c83c85841d..06ddc6b2c6 100644 --- a/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaAsAboveSoBelow.cs +++ b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EurlogiaEverFireOnceBurned.cs @@ -1,6 +1,6 @@ namespace BossMod.Endwalker.Alliance.A34Eulogia; -class AsAboveSoBelow(BossModule module) : Components.Exaflare(module, 6) +class EverFireOnceBurned(BossModule module) : Components.Exaflare(module, 6) { public override void OnCastStarted(Actor caster, ActorCastInfo spell) { diff --git a/BossMod/Modules/Endwalker/Dungeon/D11LapisManalis/D110AlbusGriffin.cs b/BossMod/Modules/Endwalker/Dungeon/D11LapisManalis/D110AlbusGriffin.cs index 38b13bb414..3ed5cb4246 100644 --- a/BossMod/Modules/Endwalker/Dungeon/D11LapisManalis/D110AlbusGriffin.cs +++ b/BossMod/Modules/Endwalker/Dungeon/D11LapisManalis/D110AlbusGriffin.cs @@ -2,32 +2,57 @@ namespace BossMod.Endwalker.Dungeon.D11LapisManalis.D110AlbusGriffin; public enum OID : uint { - Boss = 0x3E9F, //R=4.6 + Boss = 0x3D56, //R=3.96 + Caladrius = 0x3CE2, //R=1.8 + AlbusGriffin = 0x3E9F, //R=4.6 } public enum AID : uint { - AutoAttack = 870, // Boss->player, no cast, single-target - WindsOfWinter = 32785, // Boss->self, 5,0s cast, range 40 circle - Freefall = 32786, // Boss->location, 3,5s cast, range 8 circle - GoldenTalons = 32787, // Boss->self, 4,5s cast, range 8 90-degree cone + AutoAttack = 872, // Caladrius/Boss->player, no cast, single-target + AutoAttack2 = 870, // AlbusGriffin->player, no cast, single-target + TransonicBlast = 32535, // Caladrius->self, 4,0s cast, range 9 90-degree cone + WindsOfWinter = 32785, // AlbusGriffin->self, 5,0s cast, range 40 circle + Freefall = 32786, // AlbusGriffin->location, 3,5s cast, range 8 circle + GoldenTalons = 32787, // AlbusGriffin->self, 4,5s cast, range 8 90-degree cone } +class TransonicBlast(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TransonicBlast), new AOEShapeCone(9, 45.Degrees())); class WindsOfWinter(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.WindsOfWinter), "Stun Albus Griffin, Raidwide"); class GoldenTalons(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.GoldenTalons), new AOEShapeCone(8, 45.Degrees())); class Freefall(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Freefall), 8); class D110AlbusGriffinStates : StateMachineBuilder { - public D110AlbusGriffinStates(BossModule module) : base(module) + public D110AlbusGriffinStates(D110AlbusGriffin module) : base(module) { TrivialPhase() + .ActivateOnEnter() + .Raw.Update = () => module.Caladrius.All(e => e.IsDeadOrDestroyed) && module.PrimaryActor.IsDeadOrDestroyed; + TrivialPhase(1) .ActivateOnEnter() .ActivateOnEnter() .ActivateOnEnter() - .Raw.Update = () => module.Enemies(OID.Boss).All(e => e.IsDead); + .Raw.Update = () => module.Caladrius.All(e => e.IsDestroyed) && module.PrimaryActor.IsDestroyed && module.AlbusGriffin.All(e => e.IsDead); } } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 896, NameID = 12245)] -public class D110AlbusGriffin(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsRect(new(47, -570.5f), 8.5f, 11.5f)); +public class D110AlbusGriffin : BossModule +{ + public readonly IReadOnlyList Caladrius; // available from start + public readonly IReadOnlyList AlbusGriffin; // spawned after all Caladrius are dead + + public D110AlbusGriffin(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsRect(new(47, -570.5f), 8.5f, 11.5f)) + { + Caladrius = Enemies(OID.Caladrius); + AlbusGriffin = Enemies(OID.AlbusGriffin); + } + + protected override void DrawEnemies(int pcSlot, Actor pc) + { + Arena.Actors(AlbusGriffin, ArenaColor.Enemy); + Arena.Actors(Caladrius, ArenaColor.Enemy); + Arena.Actor(PrimaryActor, ArenaColor.Enemy); + } +} diff --git a/BossMod/Modules/Endwalker/Dungeon/D11LapisManalis/D110CaladriusMaturus.cs b/BossMod/Modules/Endwalker/Dungeon/D11LapisManalis/D110CaladriusMaturus.cs deleted file mode 100644 index 7de95da70c..0000000000 --- a/BossMod/Modules/Endwalker/Dungeon/D11LapisManalis/D110CaladriusMaturus.cs +++ /dev/null @@ -1,35 +0,0 @@ -namespace BossMod.Endwalker.Dungeon.D11LapisManalis.D110CaladriusMaturus; - -public enum OID : uint -{ - Boss = 0x3D56, //R=3.96 - Caladrius = 0x3CE2, //R=1.8 -} - -public enum AID : uint -{ - AutoAttack = 872, // Caladrius/Boss->player, no cast, single-target - TransonicBlast = 32535, // Caladrius->self, 4,0s cast, range 9 90-degree cone -} - -class TransonicBlast(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TransonicBlast), new AOEShapeCone(9, 45.Degrees())); - -class D110CaladriusMaturusStates : StateMachineBuilder -{ - public D110CaladriusMaturusStates(BossModule module) : base(module) - { - TrivialPhase() - .ActivateOnEnter() - .Raw.Update = () => module.Enemies(OID.Boss).All(e => e.IsDead) && module.Enemies(OID.Caladrius).All(e => e.IsDead); - } -} - -[ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 896, NameID = 12078)] -public class D110CaladriusMaturus(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsRect(new(47, -570.5f), 8.5f, 11.5f)) -{ - protected override void DrawEnemies(int pcSlot, Actor pc) - { - Arena.Actor(PrimaryActor, ArenaColor.Enemy); - Arena.Actors(Enemies(OID.Caladrius), ArenaColor.Enemy); - } -} diff --git a/BossMod/Modules/Endwalker/Dungeon/D12Aetherfont/D122Arkas.cs b/BossMod/Modules/Endwalker/Dungeon/D12Aetherfont/D122Arkas.cs index 4f055b85f7..57353ee382 100644 --- a/BossMod/Modules/Endwalker/Dungeon/D12Aetherfont/D122Arkas.cs +++ b/BossMod/Modules/Endwalker/Dungeon/D12Aetherfont/D122Arkas.cs @@ -44,9 +44,9 @@ public override void OnEventEnvControl(byte index, uint state) if (index == 0x00) { if (state == 0x00020001) - Module.Arena.Bounds = new ArenaBoundsCircle(new(425, -440), 10); + Arena.Bounds = new ArenaBoundsCircle(Arena.Bounds.Center, 10); if (state == 0x00080004) - Module.Arena.Bounds = new ArenaBoundsCircle(new(425, -440), 14.5f); + Arena.Bounds = new ArenaBoundsCircle(Arena.Bounds.Center, 14.5f); } } } diff --git a/BossMod/Modules/Endwalker/Extreme/Ex7Zeromus/VoidMeteor.cs b/BossMod/Modules/Endwalker/Extreme/Ex7Zeromus/VoidMeteor.cs index 9f9d0373e9..9c3b330be6 100644 --- a/BossMod/Modules/Endwalker/Extreme/Ex7Zeromus/VoidMeteor.cs +++ b/BossMod/Modules/Endwalker/Extreme/Ex7Zeromus/VoidMeteor.cs @@ -66,7 +66,7 @@ public override void DrawArenaForeground(int pcSlot, Actor pc) Arena.PathArcTo(target.Position, 2, (rot + 90.Degrees()).Rad, (rot - 90.Degrees()).Rad); Arena.PathLineTo(source.Position - norm); Arena.PathLineTo(source.Position + norm); - Arena.PathStroke(true, _playerStates[slot].NonClipping ? ArenaColor.Safe : ArenaColor.Danger, thickness); + MiniArena.PathStroke(true, _playerStates[slot].NonClipping ? ArenaColor.Safe : ArenaColor.Danger, thickness); Arena.AddLine(source.Position, target.Position, _playerStates[slot].Stretched ? ArenaColor.Safe : ArenaColor.Danger, thickness); } } diff --git a/BossMod/Modules/Endwalker/Savage/P12S1Athena/Palladion.cs b/BossMod/Modules/Endwalker/Savage/P12S1Athena/Palladion.cs index 4adb4ef063..f23e8fb373 100644 --- a/BossMod/Modules/Endwalker/Savage/P12S1Athena/Palladion.cs +++ b/BossMod/Modules/Endwalker/Savage/P12S1Athena/Palladion.cs @@ -73,7 +73,7 @@ public override void DrawArenaForeground(int pcSlot, Actor pc) { for (int i = 0; i < 8; ++i) Arena.PathLineTo(Module.Bounds.Center + 14 * (i * 45).Degrees().ToDirection()); - Arena.PathStroke(true, ArenaColor.Border, 2); + MiniArena.PathStroke(true, ArenaColor.Border, 2); } } diff --git a/BossMod/Modules/Endwalker/Savage/P2SHippokampos/SewageDeluge.cs b/BossMod/Modules/Endwalker/Savage/P2SHippokampos/SewageDeluge.cs index 5cb55756fe..768808b665 100644 --- a/BossMod/Modules/Endwalker/Savage/P2SHippokampos/SewageDeluge.cs +++ b/BossMod/Modules/Endwalker/Savage/P2SHippokampos/SewageDeluge.cs @@ -57,7 +57,7 @@ public override void DrawArenaForeground(int pcSlot, Actor pc) Arena.PathLineTo(Module.Bounds.Center + new WDir(-_cornerInner, +_cornerInner)); Arena.PathLineTo(Module.Bounds.Center + new WDir(-_connectInner, +_cornerInner)); Arena.PathLineTo(Module.Bounds.Center + new WDir(-_connectInner, -_cornerInner)); - Arena.PathStroke(true, ArenaColor.Border); + MiniArena.PathStroke(true, ArenaColor.Border); // outer border Arena.PathLineTo(Module.Bounds.Center + new WDir(-_cornerOuter, -_cornerOuter)); @@ -80,7 +80,7 @@ public override void DrawArenaForeground(int pcSlot, Actor pc) Arena.PathLineTo(Module.Bounds.Center + new WDir(-_connectOuter, +_cornerInner)); Arena.PathLineTo(Module.Bounds.Center + new WDir(-_connectOuter, -_cornerInner)); Arena.PathLineTo(Module.Bounds.Center + new WDir(-_cornerOuter, -_cornerInner)); - Arena.PathStroke(true, ArenaColor.Border); + MiniArena.PathStroke(true, ArenaColor.Border); } public override void OnEventEnvControl(byte index, uint state) diff --git a/BossMod/Modules/Endwalker/Savage/P9SKokytos/Uplift.cs b/BossMod/Modules/Endwalker/Savage/P9SKokytos/Uplift.cs index 0b0b0eab67..84b4d85397 100644 --- a/BossMod/Modules/Endwalker/Savage/P9SKokytos/Uplift.cs +++ b/BossMod/Modules/Endwalker/Savage/P9SKokytos/Uplift.cs @@ -12,7 +12,7 @@ public override void DrawArenaForeground(int pcSlot, Actor pc) { var center = WallDirection.Value + i * 90.Degrees(); Arena.PathArcTo(Module.Bounds.Center, Module.Bounds.HalfSize - 0.5f, (center - 22.5f.Degrees()).Rad, (center + 22.5f.Degrees()).Rad); - Arena.PathStroke(false, ArenaColor.Border, 2); + MiniArena.PathStroke(false, ArenaColor.Border, 2); } } } diff --git a/BossMod/Modules/Endwalker/Trial/T08Asura/T08Asura.cs b/BossMod/Modules/Endwalker/Trial/T08Asura/T08Asura.cs index 3816f233a8..24a8ce77c3 100644 --- a/BossMod/Modules/Endwalker/Trial/T08Asura/T08Asura.cs +++ b/BossMod/Modules/Endwalker/Trial/T08Asura/T08Asura.cs @@ -1,14 +1,6 @@ namespace BossMod.Endwalker.Trial.T08Asura; -class LowerRealm(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.LowerRealm)) -{ - public override void Update() //deathwall appears after 1st cast - { - if (NumCasts > 0) - Module.Arena.Bounds = new ArenaBoundsCircle(new(100, 100), 19); - } -} - +class LowerRealm(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.LowerRealm)); class Ephemerality(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.Ephemerality)); class CuttingJewel(BossModule module) : Components.BaitAwayCast(module, ActionID.MakeSpell(AID.CuttingJewel), new AOEShapeCircle(4), true); class CuttingJewelHint(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.CuttingJewel)); @@ -52,4 +44,4 @@ public T08AsuraStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 944, NameID = 12351)] -public class T08Asura(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(100, 100), 20)); +public class T08Asura(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(100, 100), 19)); diff --git a/BossMod/Modules/Endwalker/Trial/T08Asura/T08Laceration.cs b/BossMod/Modules/Endwalker/Trial/T08Asura/T08Laceration.cs index 5134bbec68..14ea40a467 100644 --- a/BossMod/Modules/Endwalker/Trial/T08Asura/T08Laceration.cs +++ b/BossMod/Modules/Endwalker/Trial/T08Asura/T08Laceration.cs @@ -3,25 +3,19 @@ namespace BossMod.Endwalker.Trial.T08Asura; class Laceration(BossModule module) : Components.GenericAOEs(module) { private static readonly AOEShapeCircle circle = new(9); + private readonly List aoes = []; - private DateTime _activation; - - public override IEnumerable ActiveAOEs(int slot, Actor actor) - { - foreach (var c in Module.Enemies(OID.PhantomAsura)) - if (_activation != default) - yield return new(circle, c.Position, default, _activation); - } + public override IEnumerable ActiveAOEs(int slot, Actor actor) => aoes; public override void OnActorPlayActionTimelineEvent(Actor actor, ushort id) { if (id == 0x11D6) - _activation = WorldState.FutureTime(5); //actual time is 5-7s delay, but the AOEs end up getting casted at the same time, so we take the earliest time + aoes.Add(new(circle, actor.Position, default, WorldState.FutureTime(7.1f - (0.5f * aoes.Count)))); } public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.Laceration) - _activation = default; + aoes.Clear(); } } diff --git a/BossMod/Modules/Endwalker/Trial/T08Asura/T08MyriadAspects.cs b/BossMod/Modules/Endwalker/Trial/T08Asura/T08MyriadAspects.cs index 6e8f42b0d5..c6d5b2afe3 100644 --- a/BossMod/Modules/Endwalker/Trial/T08Asura/T08MyriadAspects.cs +++ b/BossMod/Modules/Endwalker/Trial/T08Asura/T08MyriadAspects.cs @@ -5,8 +5,8 @@ class MyriadAspects(BossModule module) : Components.GenericAOEs(module) private static readonly AOEShapeCone cone = new(40, 15.Degrees()); private DateTime _activation1; private DateTime _activation2; - private List _spell1 = new(); - private List _spell2 = new(); + private readonly List _spell1 = []; + private readonly List _spell2 = []; public override IEnumerable ActiveAOEs(int slot, Actor actor) { @@ -35,12 +35,12 @@ public override void OnCastStarted(Actor caster, ActorCastInfo spell) public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID is AID.MyriadAspects1 or AID.MyriadAspects2) - ++NumCasts; - if (NumCasts == 12) - { - NumCasts = 0; - _spell1.Clear(); - _spell2.Clear(); - } + if (++NumCasts == 12) + { + NumCasts = 0; + _spell1.Clear(); + _spell2.Clear(); + } } } + diff --git a/BossMod/Modules/Endwalker/Trial/T08Asura/T08SixBladedKhadga.cs b/BossMod/Modules/Endwalker/Trial/T08Asura/T08SixBladedKhadga.cs index f721c5e328..d6266a44a2 100644 --- a/BossMod/Modules/Endwalker/Trial/T08Asura/T08SixBladedKhadga.cs +++ b/BossMod/Modules/Endwalker/Trial/T08Asura/T08SixBladedKhadga.cs @@ -2,16 +2,16 @@ namespace BossMod.Endwalker.Trial.T08Asura; class SixBladedKhadga(BossModule module) : Components.GenericAOEs(module) { - private List _spell = new(); + private readonly List _spell = []; private DateTime _start; private static readonly AOEShapeCone Cone = new(20, 90.Degrees()); public override IEnumerable ActiveAOEs(int slot, Actor actor) { if (_spell.Count > 0) - yield return new(Cone, Module.PrimaryActor.Position, _spell[0].Rotation, _start, ArenaColor.Danger); + yield return new(Cone, Module.PrimaryActor.Position, _spell[0].Rotation, _start.AddSeconds(NumCasts * 2), ArenaColor.Danger); if (_spell.Count > 1) - yield return new(Cone, Module.PrimaryActor.Position, _spell[1].Rotation, _start.AddSeconds(2)); + yield return new(Cone, Module.PrimaryActor.Position, _spell[1].Rotation, _start.AddSeconds(2 + NumCasts * 2), Risky: !_spell[1].Rotation.AlmostEqual(_spell[0].Rotation + 180.Degrees(), Helpers.RadianConversion)); } public override void OnCastStarted(Actor caster, ActorCastInfo spell) diff --git a/BossMod/Modules/Global/Quest/FF16Collab/InfernalShadow.cs b/BossMod/Modules/Global/Quest/FF16Collab/InfernalShadow.cs index 9c8d2035ea..47c966423b 100644 --- a/BossMod/Modules/Global/Quest/FF16Collab/InfernalShadow.cs +++ b/BossMod/Modules/Global/Quest/FF16Collab/InfernalShadow.cs @@ -67,7 +67,7 @@ public override void OnCastFinished(Actor caster, ActorCastInfo spell) class FieryRampageCircle(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.FieryRampageCircleReal), new AOEShapeCircle(16)); class FieryRampageRaidwide(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.FieryRampageRaidwideReal), "Time your dodge correctly"); -class PyrosaultReal(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PyrosaultReal), new AOEShapeCircle(10)); +class Pyrosault(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PyrosaultReal), new AOEShapeCircle(10)); class Fireball(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.FireballReal), 6); class CrimsonRush(BossModule module) : Components.ChargeAOEs(module, ActionID.MakeSpell(AID.CrimsonRushReal), 10); diff --git a/BossMod/Modules/Global/Quest/FF16Collab/InfernalShadowStates.cs b/BossMod/Modules/Global/Quest/FF16Collab/InfernalShadowStates.cs index 1dd6373d04..4db1b404ec 100644 --- a/BossMod/Modules/Global/Quest/FF16Collab/InfernalShadowStates.cs +++ b/BossMod/Modules/Global/Quest/FF16Collab/InfernalShadowStates.cs @@ -6,6 +6,7 @@ public InfernalShadowStates(BossModule module) : base(module) { TrivialPhase() .ActivateOnEnter() + .ActivateOnEnter() .ActivateOnEnter() .ActivateOnEnter() .ActivateOnEnter() @@ -21,6 +22,6 @@ public InfernalShadowStates(BossModule module) : base(module) .ActivateOnEnter() .ActivateOnEnter() .ActivateOnEnter() - .Raw.Update = () => Module.PrimaryActor.HP.Cur == 1; + .Raw.Update = () => Module.PrimaryActor.HP.Cur == 1 || Module.PrimaryActor.IsDeadOrDestroyed; } } diff --git a/BossMod/Modules/Shadowbringers/Dungeon/D01Holminster/D013Philia.cs b/BossMod/Modules/Shadowbringers/Dungeon/D01Holminster/D013Philia.cs index 0520a91547..ae9cd14d33 100644 --- a/BossMod/Modules/Shadowbringers/Dungeon/D01Holminster/D013Philia.cs +++ b/BossMod/Modules/Shadowbringers/Dungeon/D01Holminster/D013Philia.cs @@ -265,7 +265,6 @@ class FierceBeating(BossModule module) : Components.Exaflare(module, 4) private int linesstartedcount2; private static readonly AOEShapeCircle circle = new(4); private DateTime _activation; - private const float RadianConversion = 45 * (MathF.PI / 180); public override IEnumerable ActiveAOEs(int slot, Actor actor) { @@ -274,16 +273,9 @@ public override IEnumerable ActiveAOEs(int slot, Actor actor) foreach (var (c, t, r) in ImminentAOEs()) yield return new(Shape, c, r, t, ImminentColor); if (Lines.Count > 0 && linesstartedcount1 < 8) - yield return new(circle, CalculateCirclePosition(linesstartedcount1, Module.Bounds.Center, _casters[0]), default, _activation.AddSeconds(linesstartedcount1 * 3.7f)); + yield return new(circle, Helpers.RotateAroundOrigin(linesstartedcount1 * 45, Module.Bounds.Center, _casters[0]), default, _activation.AddSeconds(linesstartedcount1 * 3.7f)); if (Lines.Count > 1 && linesstartedcount2 < 8) - yield return new(circle, CalculateCirclePosition(linesstartedcount2, Module.Bounds.Center, _casters[1]), default, _activation.AddSeconds(linesstartedcount2 * 3.7f)); - } - - private static WPos CalculateCirclePosition(int count, WPos origin, WPos caster) - { - float x = MathF.Cos(count * RadianConversion) * (caster.X - origin.X) - MathF.Sin(count * RadianConversion) * (caster.Z - origin.Z); - float z = MathF.Sin(count * RadianConversion) * (caster.X - origin.X) + MathF.Cos(count * RadianConversion) * (caster.Z - origin.Z); - return new WPos(origin.X + x, origin.Z + z); + yield return new(circle, Helpers.RotateAroundOrigin(linesstartedcount2 * 45, Module.Bounds.Center, _casters[1]), default, _activation.AddSeconds(linesstartedcount2 * 3.7f)); } public override void Update() diff --git a/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D050ForgivenPrejudice.cs b/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D050ForgivenPrejudice.cs index 73a9a87036..b7f694b38a 100644 --- a/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D050ForgivenPrejudice.cs +++ b/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D050ForgivenPrejudice.cs @@ -21,10 +21,7 @@ public enum AID : uint } class SanctifiedAero(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.SanctifiedAero), new AOEShapeRect(40, 4)); - -//Note: this attack is a r20 circle, not drawing it because it is too big and the damage not all that high even if interrupt/stun fails class PunitiveLight(BossModule module) : Components.CastInterruptHint(module, ActionID.MakeSpell(AID.PunitiveLight), true, true, "Raidwide", true); - class Sanctification(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Sanctification), new AOEShapeCone(12, 45.Degrees())); class D050ForgivenPrejudiceStates : StateMachineBuilder @@ -40,19 +37,31 @@ public D050ForgivenPrejudiceStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 659, NameID = 8269)] -public class D050ForgivenPrejudice(WorldState ws, Actor primary) : SimpleBossModule(ws, primary) + +public class D050ForgivenPrejudice : SimpleBossModule { + public readonly IReadOnlyList ForgivenPrejudice; + public readonly IReadOnlyList ForgivenExtortion; + public readonly IReadOnlyList ForgivenConformity; + public readonly IReadOnlyList ForgivenVenery; + public readonly IReadOnlyList ForgivenApathy; + + public D050ForgivenPrejudice(WorldState ws, Actor primary) : base(ws, primary) + { + ForgivenPrejudice = Enemies(OID.Boss); + ForgivenExtortion = Enemies(OID.ForgivenExtortion); + ForgivenConformity = Enemies(OID.ForgivenConformity); + ForgivenVenery = Enemies(OID.ForgivenVenery); + ForgivenApathy = Enemies(OID.ForgivenApathy); + } + protected override void DrawEnemies(int pcSlot, Actor pc) { - foreach (var s in Enemies(OID.Boss)) - Arena.Actor(s, ArenaColor.Enemy); - foreach (var s in Enemies(OID.ForgivenExtortion)) - Arena.Actor(s, ArenaColor.Enemy); - foreach (var s in Enemies(OID.ForgivenConformity)) - Arena.Actor(s, ArenaColor.Enemy); - foreach (var s in Enemies(OID.ForgivenVenery)) - Arena.Actor(s, ArenaColor.Enemy); + Arena.Actors(ForgivenPrejudice, ArenaColor.Enemy); + Arena.Actors(ForgivenConformity, ArenaColor.Enemy); + Arena.Actors(ForgivenExtortion, ArenaColor.Enemy); + Arena.Actors(ForgivenVenery, ArenaColor.Enemy); } - protected override bool CheckPull() { return (!Enemies(OID.ForgivenApathy).Any(e => e.InCombat) || !Enemies(OID.ForgivenApathy).Any(e => e.IsTargetable)) && PrimaryActor.IsTargetable && PrimaryActor.InCombat || Enemies(OID.ForgivenExtortion).Any(e => e.InCombat) || Enemies(OID.ForgivenConformity).Any(e => e.InCombat) || Enemies(OID.ForgivenVenery).Any(e => e.InCombat); } + protected override bool CheckPull() { return (!ForgivenApathy.Any(e => e.InCombat) || !ForgivenApathy.Any(e => e.IsTargetable)) && PrimaryActor.IsTargetable && PrimaryActor.InCombat || ForgivenExtortion.Any(e => e.InCombat) || ForgivenPrejudice.Any(e => e.InCombat) || ForgivenVenery.Any(e => e.InCombat); } } diff --git a/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D051ForgivenCruelty.cs b/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D051ForgivenCruelty.cs index 57df699265..11c8b55001 100644 --- a/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D051ForgivenCruelty.cs +++ b/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D051ForgivenCruelty.cs @@ -45,4 +45,4 @@ public D051ForgivenCrueltyStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 659, NameID = 8260)] -public class D051ForgivenCruelty(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(188, -170), 20)); +public class D051ForgivenCruelty(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(188, -170), 19.5f)); diff --git a/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D052ForgivenApathy.cs b/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D052ForgivenApathy.cs index 5bf7303191..0cc4f68781 100644 --- a/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D052ForgivenApathy.cs +++ b/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D052ForgivenApathy.cs @@ -23,7 +23,6 @@ public enum AID : uint PunitiveLight = 16815, // 28F2->self, 5,0s cast, range 20 circle } -//Note: this attack is a r20 circle, not drawing it because it is too big and the damage not all that high even if interrupt/stun fails class PunitiveLight(BossModule module) : Components.CastInterruptHint(module, ActionID.MakeSpell(AID.PunitiveLight), true, true, "Raidwide", true); class Sanctification(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Sanctification), new AOEShapeCone(12, 45.Degrees())); @@ -41,24 +40,39 @@ public D052ForgivenApathyStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 659, NameID = 8267)] -public class D052ForgivenApathy(WorldState ws, Actor primary) : BossModule(ws, primary, new ArenaBoundsCircle(new(0, 0), 0)) +public class D052ForgivenApathy : BossModule { + private static readonly List arenacoords1 = [new(21, -215.1f), new(16.3f, -213.2f), new(9.8f, -208.8f), new(4.4f, -206.3f), new(0.2f, -204.8f), new(-9.6f, -202.8f), new(-10, -202.5f), + new(-10.7f, -201.9f), new(-11.5f, -201.4f), new(-13.2f, -200.9f), new(-8.1f, -186.8f), new(-3.7f, -188.5f), new(-1.9f, -188.7f), new(2.5f, -190f), new(9.3f, -193.5f), new(18.8f, -198.8f), + new(27.1f, -203.2f)]; + private static readonly List arenacoords2 = [new(-176, -138.1f), new(-199.1f, -124.8f), new(-197.3f, -121.5f), new(-204.15f, -117.3f), new(-204f, -116.1f), new(-205, -114.5f), + new(-205.3f, -114.3f), new(-205.2f, -112.4f), new(-205.5f, -111.9f), new(-206.6f, -111f), new(-207f, -110.6f), new(-198.8f, -98.4f), new(-190, -103.5f), new(-190, -104.5f), + new(-187.1f, -106.1f), new(-186.3f, -105.7f), new(-177.1f, -111.1f), new(-177.2f, -111.7f), new(-174, -113.6f), new(-173.3f, -113.2f), new(-164.1f, -118.5f)]; + + public readonly IReadOnlyList ForgivenPrejudice; + public readonly IReadOnlyList ForgivenExtortion; + public readonly IReadOnlyList ForgivenConformity; + + public D052ForgivenApathy(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(default, default)) + { + ForgivenPrejudice = Enemies(OID.ForgivenPrejudice); + ForgivenExtortion = Enemies(OID.ForgivenExtortion); + ForgivenConformity = Enemies(OID.ForgivenConformity); + } + protected override void UpdateModule() { if (PrimaryActor.Position.AlmostEqual(new(-11, -193), 1)) - Arena.Bounds = new ArenaBoundsRect(new(5, -198.5f), 8, 17, 105.Degrees()); + Arena.Bounds = new ArenaBoundsPolygon(arenacoords1); if (PrimaryActor.Position.AlmostEqual(new(-204, -106), 1)) - Arena.Bounds = new ArenaBoundsRect(new(-187.5f, -118), 12, 21, 120.Degrees()); + Arena.Bounds = new ArenaBoundsPolygon(arenacoords2); } protected override void DrawEnemies(int pcSlot, Actor pc) { Arena.Actor(PrimaryActor, ArenaColor.Enemy); - foreach (var s in Enemies(OID.ForgivenExtortion)) - Arena.Actor(s, ArenaColor.Object); - foreach (var e in Enemies(OID.ForgivenConformity)) - Arena.Actor(e, ArenaColor.Object); - foreach (var e in Enemies(OID.ForgivenPrejudice)) - Arena.Actor(e, ArenaColor.Object); + Arena.Actors(ForgivenPrejudice, ArenaColor.Enemy); + Arena.Actors(ForgivenConformity, ArenaColor.Enemy); + Arena.Actors(ForgivenExtortion, ArenaColor.Enemy); } } diff --git a/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D053ForgivenWhimsy.cs b/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D053ForgivenWhimsy.cs index 6c5f2424e0..03fc525439 100644 --- a/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D053ForgivenWhimsy.cs +++ b/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D053ForgivenWhimsy.cs @@ -61,60 +61,33 @@ public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignme class Exegesis(BossModule module) : Components.GenericAOEs(module) { - private DateTime _activation; - public enum Patterns { None, Diagonal, Cross, EastWest, NorthSouth } - public Patterns Pattern { get; private set; } + private readonly List _aoes = []; private static readonly AOEShapeRect rect = new(5, 5, 5); + private static readonly AOEShapeCross cross = new(15, 5); + private static readonly WPos[] diagonalPositions = [new(-240, -50), new(-250, -40), new(-230, -40), new(-250, -60), new(-230, -60)]; + + public override IEnumerable ActiveAOEs(int slot, Actor actor) => _aoes; - public override IEnumerable ActiveAOEs(int slot, Actor actor) - { - if (Pattern == Patterns.Diagonal) - { - yield return new(rect, new(-240, -50), default, _activation); - yield return new(rect, new(-250, -40), default, _activation); - yield return new(rect, new(-230, -40), default, _activation); - yield return new(rect, new(-250, -60), default, _activation); - yield return new(rect, new(-230, -60), default, _activation); - } - if (Pattern == Patterns.EastWest) - { - yield return new(rect, new(-250, -50), default, _activation); - yield return new(rect, new(-230, -50), default, _activation); - } - if (Pattern == Patterns.NorthSouth) - { - yield return new(rect, new(-240, -60), default, _activation); - yield return new(rect, new(-240, -40), default, _activation); - } - if (Pattern == Patterns.Cross) - { - yield return new(rect, new(-230, -50), default, _activation); - yield return new(rect, new(-240, -60), default, _activation); - yield return new(rect, new(-240, -40), default, _activation); - yield return new(rect, new(-250, -50), default, _activation); - yield return new(rect, new(-240, -50), default, _activation); - } - } public override void OnCastStarted(Actor caster, ActorCastInfo spell) { + var _activation = spell.NPCFinishAt.AddSeconds(0.4f); switch ((AID)spell.Action.ID) { - case AID.ExegesisA: - Pattern = Patterns.Diagonal; - _activation = spell.NPCFinishAt; + case AID.ExegesisA: //diagonal + foreach (var p in diagonalPositions) + _aoes.Add(new(rect, p, default, _activation)); break; - case AID.ExegesisB: - Pattern = Patterns.EastWest; - _activation = spell.NPCFinishAt; + case AID.ExegesisB: //east+west + _aoes.Add(new(rect, new(-250, -50), default, _activation)); + _aoes.Add(new(rect, new(-230, -50), default, _activation)); break; - case AID.ExegesisC: - Pattern = Patterns.NorthSouth; - _activation = spell.NPCFinishAt; + case AID.ExegesisC: //north+south + _aoes.Add(new(rect, new(-240, -60), default, _activation)); + _aoes.Add(new(rect, new(-240, -40), default, _activation)); break; - case AID.ExegesisD: - Pattern = Patterns.Cross; - _activation = spell.NPCFinishAt; + case AID.ExegesisD: //cross + _aoes.Add(new(cross, new(-240, -50), default, _activation)); break; } } @@ -122,7 +95,7 @@ public override void OnCastStarted(Actor caster, ActorCastInfo spell) public override void OnEventCast(Actor caster, ActorCastEvent spell) { if ((AID)spell.Action.ID == AID.Exegesis) - Pattern = Patterns.None; + _aoes.Clear(); } } diff --git a/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D055ForgivenObscenity.cs b/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D055ForgivenObscenity.cs index 759fa82d8a..e462088c6b 100644 --- a/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D055ForgivenObscenity.cs +++ b/BossMod/Modules/Shadowbringers/Dungeon/D05MtGulg/D055ForgivenObscenity.cs @@ -191,13 +191,13 @@ public override void OnActorEAnim(Actor actor, uint state) { if (state == 0x00040008) { - Module.Arena.Bounds = new ArenaBoundsRect(new(-240, 237), 15, 20); + Module.Arena.Bounds = new ArenaBoundsRect(Module.Bounds.Center, 15, 20); active = false; } if (state == 0x00010002) { active = true; - Module.Arena.Bounds = new ArenaBoundsCircle(new(-240, 237), 15); + Module.Arena.Bounds = new ArenaBoundsCircle(Module.Bounds.Center, 15); } } diff --git a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/DRS1.cs b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/DRS1.cs index 652afca0e4..0815392d65 100644 --- a/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/DRS1.cs +++ b/BossMod/Modules/Shadowbringers/Foray/DelubrumReginae/DRS1TrinitySeeker/DRS1.cs @@ -31,7 +31,7 @@ protected override void DrawArenaForeground(int pcSlot, Actor pc) { var center = (45 + i * 90).Degrees(); Arena.PathArcTo(Bounds.Center, BarricadeRadius, (center - 22.5f.Degrees()).Rad, (center + 22.5f.Degrees()).Rad); - Arena.PathStroke(false, ArenaColor.Border, 2); + MiniArena.PathStroke(false, ArenaColor.Border, 2); } } } diff --git a/BossMod/Modules/Shadowbringers/Hunt/RankS/ForgivenPedantry.cs b/BossMod/Modules/Shadowbringers/Hunt/RankS/ForgivenPedantry.cs index a97f94453e..92ba2a953b 100644 --- a/BossMod/Modules/Shadowbringers/Hunt/RankS/ForgivenPedantry.cs +++ b/BossMod/Modules/Shadowbringers/Hunt/RankS/ForgivenPedantry.cs @@ -70,7 +70,7 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) class TerrifyingGlance(BossModule module) : Components.CastGaze(module, ActionID.MakeSpell(AID.TerrifyingGlance)); class TheStake(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TheStake), new AOEShapeCircle(18)); class SecondCircle(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.SecondCircle), new AOEShapeRect(40, 4)); -class CleansingFire(BossModule module) : Components.CastGaze(module, ActionID.MakeSpell(AID.CleansingFire)); +class CleansingFire(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.CleansingFire)); class FeveredFlagellation(BossModule module) : Components.BaitAwayCast(module, ActionID.MakeSpell(AID.FeveredFlagellation), new AOEShapeCone(15, 45.Degrees())) { @@ -86,7 +86,7 @@ class FeveredFlagellationHint(BossModule module) : Components.SingleTargetCast(m class WitchHunt(BossModule module) : Components.GenericBaitAway(module) { - private static readonly AOEShapeRect rect = new AOEShapeRect(0, 5); + private static readonly AOEShapeRect rect = new(0, 5); private bool witchHunt1done; public override void Update() diff --git a/BossMod/Modules/Shadowbringers/Hunt/RankS/Tyger.cs b/BossMod/Modules/Shadowbringers/Hunt/RankS/Tyger.cs index 20cf296a77..72dbe3b7aa 100644 --- a/BossMod/Modules/Shadowbringers/Hunt/RankS/Tyger.cs +++ b/BossMod/Modules/Shadowbringers/Hunt/RankS/Tyger.cs @@ -51,7 +51,7 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) class TheDragonsBreath(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TheDragonsBreath), new AOEShapeCone(30, 60.Degrees())); class TheRamsBreath(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TheRamsBreath), new AOEShapeCone(30, 60.Degrees())); -class TheRamsEmbrace(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TheRamsEmbrace), new AOEShapeCircle(9)); +class TheRamsEmbrace(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.TheRamsEmbrace), 9); class TheRamsVoice(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TheRamsVoice), new AOEShapeCircle(9)); class TheRamsVoiceHint(BossModule module) : Components.CastInterruptHint(module, ActionID.MakeSpell(AID.TheRamsVoice)); class TheDragonsVoice(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.TheDragonsVoice), new AOEShapeDonut(8, 30)); diff --git a/BossMod/Util/HelperMethods.cs b/BossMod/Util/HelperMethods.cs new file mode 100644 index 0000000000..d5fc3e1a87 --- /dev/null +++ b/BossMod/Util/HelperMethods.cs @@ -0,0 +1,45 @@ +namespace BossMod; + +// a bunch of helper methods that can potentially be reused for different things + +public static class Helpers +{ + public const float RadianConversion = MathF.PI / 180; + public static readonly float sqrt3 = MathF.Sqrt(3); + + public static (WPos p1, WPos p2, WPos p3) CalculateEquilateralTriangleVertices(WPos origin, Angle rotation, float SideLength, float offset = 0) + { + var sideOffset = (SideLength + offset) / 2; + var height = MathF.Sqrt(3) / 2 * (SideLength + offset); + var direction = rotation.ToDirection(); + var ortho = direction.OrthoR(); + + var p1 = origin; + var p2 = origin + direction * height - ortho * sideOffset; + var p3 = origin + direction * height + ortho * sideOffset; + + return (p1, p2, p3); + } + + public static List CalculateEquilateralTriangleVertices(WPos Center, float HalfSize) + { + var halfSide = HalfSize; + var height = halfSide * sqrt3; + var center = Center + new WDir(0, height / 3); + + var points = new List + { + center + new WDir(-halfSide, height / 3), + center + new WDir(halfSide, height / 3), + center + new WDir(0, -2 * height / 3) + }; + return points; + } + + public static WPos RotateAroundOrigin(float rotatebydegrees, WPos origin, WPos caster) + { + float x = MathF.Cos(rotatebydegrees * RadianConversion) * (caster.X - origin.X) - MathF.Sin(rotatebydegrees * RadianConversion) * (caster.Z - origin.Z); + float z = MathF.Sin(rotatebydegrees * RadianConversion) * (caster.X - origin.X) + MathF.Cos(rotatebydegrees * RadianConversion) * (caster.Z - origin.Z); + return new WPos(origin.X + x, origin.Z + z); + } +} \ No newline at end of file diff --git a/BossMod/Util/ShapeDistance.cs b/BossMod/Util/ShapeDistance.cs index a853c911e2..66fa77782e 100644 --- a/BossMod/Util/ShapeDistance.cs +++ b/BossMod/Util/ShapeDistance.cs @@ -102,19 +102,8 @@ public static Func Rect(WPos from, WPos to, float halfWidth) public static Func InvertedRect(WPos origin, WDir dir, float lenFront, float lenBack, float halfWidth) { - // dir points outside far side - var normal = dir.OrthoL(); // points outside left side - return p => - { - var offset = p - origin; - var distParr = offset.Dot(dir); - var distOrtho = offset.Dot(normal); - var distFront = distParr - lenFront; - var distBack = -distParr - lenBack; - var distLeft = distOrtho - halfWidth; - var distRight = -distOrtho - halfWidth; - return -Math.Max(Math.Max(distFront, distBack), Math.Max(distLeft, distRight)); - }; + var rect = Rect(origin, dir, lenFront, lenBack, halfWidth); + return p => -rect(p); } public static Func InvertedRect(WPos origin, Angle direction, float lenFront, float lenBack, float halfWidth) => InvertedRect(origin, direction.ToDirection(), lenFront, lenBack, halfWidth); public static Func InvertedRect(WPos from, WPos to, float halfWidth) @@ -150,7 +139,7 @@ public static Func Cross(WPos origin, Angle direction, float length // positive offset increases area public static Func ConvexPolygon(IEnumerable vertices, bool cw, float offset = 0) { - List<(WPos point, WDir normal)> edges = new(); + List<(WPos point, WDir normal)> edges = []; Action addEdge = (p1, p2) => { if (p1 != p2) @@ -175,4 +164,30 @@ public static Func ConvexPolygon(IEnumerable vertices, bool c return p => edges.Max(e => e.normal.Dot(p - e.point)) - offset; } + + public static Func InvertedConvexPolygon(IEnumerable vertices, bool cw, float offset = 0) + { + var convexpolygon = ConvexPolygon(vertices, cw, offset); + return p => -convexpolygon(p); + } + + public static Func Triangle(WPos p1, WPos p2, WPos p3, bool cw, float offset = 0) + { + var vertices = new List { p1, p2, p3 }; + return ConvexPolygon(vertices, cw, offset); + } + + public static Func InvertedTriangle(WPos p1, WPos p2, WPos p3, bool cw, float offset = 0) + { + var vertices = new List { p1, p2, p3 }; + var convexpolygon = ConvexPolygon(vertices, cw, offset); + return p => -convexpolygon(p); + } + + public static Func EquilateralTriangle(WPos origin, Angle rotation, float sideLength, bool cw) + { + var (p1, p2, p3) = Helpers.CalculateEquilateralTriangleVertices(origin, rotation, sideLength); + var vertices = new List { p1, p2, p3 }; + return ConvexPolygon(vertices, cw); + } } diff --git a/BossMod/Util/WPosDir.cs b/BossMod/Util/WPosDir.cs index a6afbd9366..5c29677194 100644 --- a/BossMod/Util/WPosDir.cs +++ b/BossMod/Util/WPosDir.cs @@ -8,9 +8,9 @@ public struct WDir public WDir(float x = 0, float z = 0) { X = x; Z = z; } public WDir(Vector2 v) { X = v.X; Z = v.Y; } - public Vector2 ToVec2() => new(X, Z); - public Vector3 ToVec3() => new(X, 0, Z); - public Vector4 ToVec4() => new(X, 0, Z, 0); + public readonly Vector2 ToVec2() => new(X, Z); + public readonly Vector3 ToVec3() => new(X, 0, Z); + public readonly Vector4 ToVec4() => new(X, 0, Z, 0); public static WDir operator +(WDir a, WDir b) => new(a.X + b.X, a.Z + b.Z); public static WDir operator -(WDir a, WDir b) => new(a.X - b.X, a.Z - b.Z); @@ -18,26 +18,26 @@ public struct WDir public static WDir operator *(WDir a, float b) => new(a.X * b, a.Z * b); public static WDir operator *(float a, WDir b) => new(a * b.X, a * b.Z); public static WDir operator /(WDir a, float b) => new(a.X / b, a.Z / b); - public WDir Abs() => new(Math.Abs(X), Math.Abs(Z)); - public WDir Sign() => new(Math.Sign(X), Math.Sign(Z)); - public WDir OrthoL() => new(Z, -X); // CCW, same length - public WDir OrthoR() => new(-Z, X); // CW, same length + public readonly WDir Abs() => new(Math.Abs(X), Math.Abs(Z)); + public readonly WDir Sign() => new(Math.Sign(X), Math.Sign(Z)); + public readonly WDir OrthoL() => new(Z, -X); // CCW, same length + public readonly WDir OrthoR() => new(-Z, X); // CW, same length public static float Dot(WDir a, WDir b) => a.X * b.X + a.Z * b.Z; - public float Dot(WDir a) => X * a.X + Z * a.Z; - public float LengthSq() => X * X + Z * Z; + public readonly float Dot(WDir a) => X * a.X + Z * a.Z; + public readonly float LengthSq() => X * X + Z * Z; public float Length() => MathF.Sqrt(LengthSq()); public static WDir Normalize(WDir a) => a / a.Length(); public WDir Normalized() => this / Length(); public static bool AlmostZero(WDir a, float eps) => Math.Abs(a.X) <= eps && Math.Abs(a.Z) <= eps; - public bool AlmostZero(float eps) => AlmostZero(this, eps); + public readonly bool AlmostZero(float eps) => AlmostZero(this, eps); public static bool AlmostEqual(WDir a, WDir b, float eps) => AlmostZero(a - b, eps); - public bool AlmostEqual(WDir b, float eps) => AlmostZero(this - b, eps); + public readonly bool AlmostEqual(WDir b, float eps) => AlmostZero(this - b, eps); public static bool operator ==(WDir l, WDir r) => l.X == r.X && l.Z == r.Z; public static bool operator !=(WDir l, WDir r) => l.X != r.X || l.Z != r.Z; - public override bool Equals(object? obj) => obj is WDir && this == (WDir)obj; - public override int GetHashCode() => (X, Z).GetHashCode(); - public override string ToString() => $"({X:f3}, {Z:f3})"; + public override readonly bool Equals(object? obj) => obj is WDir && this == (WDir)obj; + public override readonly int GetHashCode() => (X, Z).GetHashCode(); + public override readonly string ToString() => $"({X:f3}, {Z:f3})"; } // 2d vector that represents world-space position on XZ plane @@ -48,24 +48,24 @@ public struct WPos public WPos(float x = 0, float z = 0) { X = x; Z = z; } public WPos(Vector2 v) { X = v.X; Z = v.Y; } - public Vector2 ToVec2() => new(X, Z); + public readonly Vector2 ToVec2() => new(X, Z); public static WPos operator +(WPos a, WDir b) => new(a.X + b.X, a.Z + b.Z); public static WPos operator +(WDir a, WPos b) => new(a.X + b.X, a.Z + b.Z); public static WPos operator -(WPos a, WDir b) => new(a.X - b.X, a.Z - b.Z); public static WDir operator -(WPos a, WPos b) => new(a.X - b.X, a.Z - b.Z); public static bool AlmostEqual(WPos a, WPos b, float eps) => (a - b).AlmostZero(eps); - public bool AlmostEqual(WPos b, float eps) => (this - b).AlmostZero(eps); + public readonly bool AlmostEqual(WPos b, float eps) => (this - b).AlmostZero(eps); public static WPos Lerp(WPos from, WPos to, float progress) => new(from.ToVec2() * (1 - progress) + to.ToVec2() * progress); public static bool operator ==(WPos l, WPos r) => l.X == r.X && l.Z == r.Z; public static bool operator !=(WPos l, WPos r) => l.X != r.X || l.Z != r.Z; - public override bool Equals(object? obj) => obj is WPos && this == (WPos)obj; - public override int GetHashCode() => (X, Z).GetHashCode(); - public override string ToString() => $"[{X:f3}, {Z:f3}]"; + public override readonly bool Equals(object? obj) => obj is WPos pos && this == pos; + public override readonly int GetHashCode() => (X, Z).GetHashCode(); + public override readonly string ToString() => $"[{X:f3}, {Z:f3}]"; // area checks - public bool InTri(WPos v1, WPos v2, WPos v3) + public readonly bool InTri(WPos v1, WPos v2, WPos v3) { var s = (v2.X - v1.X) * (Z - v1.Z) - (v2.Z - v1.Z) * (X - v1.X); var t = (v3.X - v2.X) * (Z - v2.Z) - (v3.Z - v2.Z) * (X - v2.X); @@ -75,7 +75,7 @@ public bool InTri(WPos v1, WPos v2, WPos v3) return d == 0 || (d < 0) == (s + t <= 0); } - public bool InRect(WPos origin, WDir direction, float lenFront, float lenBack, float halfWidth) + public readonly bool InRect(WPos origin, WDir direction, float lenFront, float lenBack, float halfWidth) { var offset = this - origin; var normal = direction.OrthoL(); @@ -84,54 +84,65 @@ public bool InRect(WPos origin, WDir direction, float lenFront, float lenBack, f return dotDir >= -lenBack && dotDir <= lenFront && MathF.Abs(dotNormal) <= halfWidth; } - public bool InRect(WPos origin, Angle direction, float lenFront, float lenBack, float halfWidth) + public readonly bool InRect(WPos origin, Angle direction, float lenFront, float lenBack, float halfWidth) { return InRect(origin, direction.ToDirection(), lenFront, lenBack, halfWidth); } - public bool InRect(WPos origin, WDir startToEnd, float halfWidth) + public readonly bool InRect(WPos origin, WDir startToEnd, float halfWidth) { var len = startToEnd.Length(); return InRect(origin, startToEnd / len, len, 0, halfWidth); } - public bool InCircle(WPos origin, float radius) + public readonly bool InCircle(WPos origin, float radius) { return (this - origin).LengthSq() <= radius * radius; } - public bool InDonut(WPos origin, float innerRadius, float outerRadius) + public readonly bool InDonut(WPos origin, float innerRadius, float outerRadius) { return InCircle(origin, outerRadius) && !InCircle(origin, innerRadius); } - public bool InCone(WPos origin, WDir direction, Angle halfAngle) + public readonly bool InCone(WPos origin, WDir direction, Angle halfAngle) { return (this - origin).Normalized().Dot(direction) >= halfAngle.Cos(); } - public bool InCone(WPos origin, Angle direction, Angle halfAngle) + public readonly bool InCone(WPos origin, Angle direction, Angle halfAngle) { return InCone(origin, direction.ToDirection(), halfAngle); } - public bool InCircleCone(WPos origin, float radius, WDir direction, Angle halfAngle) + public readonly bool InCircleCone(WPos origin, float radius, WDir direction, Angle halfAngle) { return InCircle(origin, radius) && InCone(origin, direction, halfAngle); } - public bool InCircleCone(WPos origin, float radius, Angle direction, Angle halfAngle) + public readonly bool InCircleCone(WPos origin, float radius, Angle direction, Angle halfAngle) { return InCircle(origin, radius) && InCone(origin, direction, halfAngle); } - public bool InDonutCone(WPos origin, float innerRadius, float outerRadius, WDir direction, Angle halfAngle) + public readonly bool InDonutCone(WPos origin, float innerRadius, float outerRadius, WDir direction, Angle halfAngle) { return InDonut(origin, innerRadius, outerRadius) && InCone(origin, direction, halfAngle); } - public bool InDonutCone(WPos origin, float innerRadius, float outerRadius, Angle direction, Angle halfAngle) + public readonly bool InDonutCone(WPos origin, float innerRadius, float outerRadius, Angle direction, Angle halfAngle) { return InDonut(origin, innerRadius, outerRadius) && InCone(origin, direction, halfAngle); } + + public readonly bool InPolygon(IEnumerable vertices) + { + int i, j; + bool c = false; + WPos[] verticesArray = vertices.ToArray(); + for (i = 0, j = verticesArray.Length - 1; i < verticesArray.Length; j = i++) + if (((verticesArray[i].Z > Z)!= (verticesArray[j].Z > Z)) && (X < (verticesArray[j].X - verticesArray[i].X) * (Z - verticesArray[i].Z) / (verticesArray[j].Z - verticesArray[i].Z) + verticesArray[i].X)) + c =!c; + return c; + } } diff --git a/UIDev/MiniArenaTest.cs b/UIDev/MiniArenaTest.cs index 4c7519419c..746da7f2a3 100644 --- a/UIDev/MiniArenaTest.cs +++ b/UIDev/MiniArenaTest.cs @@ -42,10 +42,10 @@ public override void Draw() { foreach (var p in KBContour()) _arena.PathLineTo(p); - _arena.PathStroke(true, 0xffff00ff); + MiniArena.PathStroke(true, 0xffff00ff); } _arena.Actor(new(_playerPos), 0.Degrees(), 0xff00ff00); - _arena.End(); + MiniArena.End(); // arena config ImGui.DragFloat2("Player pos", ref _playerPos); From 54826d75a57793330f7e47514fac150e8c79a086 Mon Sep 17 00:00:00 2001 From: CarnifexOptimus Date: Sun, 14 Apr 2024 01:56:48 +0200 Subject: [PATCH 18/18] converted stage 28, 29 to refactored code --- BossMod/Components/PersistentVoidzone.cs | 4 +- .../Endwalker/Alliance/A13Azeyma/SolarFans.cs | 6 +- .../Alliance/A21Nophica/MatronsBreath.cs | 2 +- .../A31Thaliak/ThaliakHieroglyphika.cs | 8 +- .../A33Oschon/OschonP2WanderingShot.cs | 4 +- .../A34Eulogia/EulogiaHieroglyphika.cs | 2 +- .../A34Eulogia/EulogiaQuintessence.cs | 2 +- .../Trial/T02Hydaelyn/ParhelicCircle.cs | 20 +- .../Stage27LockUpYourSnorters/Stage27.cs | 2 +- .../Stage28DangerousWhenDead/Stage28.cs | 135 +++++++++++++ .../Stage29RedFraughtAndBlue/Stage29Act1.cs | 102 ++++++++++ .../Stage29RedFraughtAndBlue/Stage29Act2.cs | 185 ++++++++++++++++++ 12 files changed, 447 insertions(+), 25 deletions(-) create mode 100644 BossMod/Modules/Global/MaskedCarnivale/Stage28DangerousWhenDead/Stage28.cs create mode 100644 BossMod/Modules/Global/MaskedCarnivale/Stage29RedFraughtAndBlue/Stage29Act1.cs create mode 100644 BossMod/Modules/Global/MaskedCarnivale/Stage29RedFraughtAndBlue/Stage29Act2.cs diff --git a/BossMod/Components/PersistentVoidzone.cs b/BossMod/Components/PersistentVoidzone.cs index b59b08a120..77c5a65b71 100644 --- a/BossMod/Components/PersistentVoidzone.cs +++ b/BossMod/Components/PersistentVoidzone.cs @@ -28,9 +28,9 @@ public class PersistentVoidzoneAtCastTarget(BossModule module, float radius, Act public override IEnumerable ActiveAOEs(int slot, Actor actor) { foreach (var p in _predictedByEvent) - yield return new(Shape, p.pos, Activation: p.time); + yield return new(Shape, p.pos, default, p.time); foreach (var p in _predictedByCast) - yield return new(Shape, WorldState.Actors.Find(p.caster.CastInfo!.TargetID)?.Position ?? p.caster.CastInfo.LocXZ, Activation: p.time); + yield return new(Shape, WorldState.Actors.Find(p.caster.CastInfo!.TargetID)?.Position ?? p.caster.CastInfo.LocXZ, default, p.time); foreach (var z in Sources(Module)) yield return new(Shape, z.Position); } diff --git a/BossMod/Modules/Endwalker/Alliance/A13Azeyma/SolarFans.cs b/BossMod/Modules/Endwalker/Alliance/A13Azeyma/SolarFans.cs index adfb7c0985..a129f75788 100644 --- a/BossMod/Modules/Endwalker/Alliance/A13Azeyma/SolarFans.cs +++ b/BossMod/Modules/Endwalker/Alliance/A13Azeyma/SolarFans.cs @@ -68,7 +68,7 @@ class RadiantFlourish(BossModule module) : Components.GenericAOEs(module) public override void OnCastFinished(Actor caster, ActorCastInfo spell) { if ((AID)spell.Action.ID == AID.SolarFansAOE) - _aoes.Add(new(circle, spell.LocXZ, Activation: WorldState.FutureTime(16.6f))); + _aoes.Add(new(circle, spell.LocXZ, default, WorldState.FutureTime(16.6f))); if ((AID)spell.Action.ID == AID.RadiantFlourish) { _aoes.Clear(); @@ -83,8 +83,8 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell) if (++teleportcounter > 8) { teleportcounter = 0; - _aoes.Add(new(circle, Helpers.RotateAroundOrigin(90, Module.Bounds.Center, _aoes[0].Origin), Activation: _aoes[0].Activation.AddSeconds(1.4f))); - _aoes.Add(new(circle, Helpers.RotateAroundOrigin(90, Module.Bounds.Center, _aoes[1].Origin), Activation: _aoes[1].Activation.AddSeconds(1.4f))); + _aoes.Add(new(circle, Helpers.RotateAroundOrigin(90, Module.Bounds.Center, _aoes[0].Origin), default, _aoes[0].Activation.AddSeconds(1.4f))); + _aoes.Add(new(circle, Helpers.RotateAroundOrigin(90, Module.Bounds.Center, _aoes[1].Origin), default, _aoes[1].Activation.AddSeconds(1.4f))); _aoes.RemoveAt(0); _aoes.RemoveAt(0); } diff --git a/BossMod/Modules/Endwalker/Alliance/A21Nophica/MatronsBreath.cs b/BossMod/Modules/Endwalker/Alliance/A21Nophica/MatronsBreath.cs index 5d441d823c..c236050de7 100644 --- a/BossMod/Modules/Endwalker/Alliance/A21Nophica/MatronsBreath.cs +++ b/BossMod/Modules/Endwalker/Alliance/A21Nophica/MatronsBreath.cs @@ -11,7 +11,7 @@ public override IEnumerable ActiveAOEs(int slot, Actor actor) var _blueFlowers = Module.Enemies(OID.BlueSafeZone).FirstOrDefault(); var _goldFlowers = Module.Enemies(OID.GoldSafeZone).FirstOrDefault(); if (_flowers.Count > 0) - yield return new(_shape, _flowers[0].actor.OID == (uint)OID.BlueFlowers ? _blueFlowers!.Position : _goldFlowers!.Position, Activation: _flowers[0].activation); + yield return new(_shape, _flowers[0].actor.OID == (uint)OID.BlueFlowers ? _blueFlowers!.Position : _goldFlowers!.Position, default, _flowers[0].activation); } public override void OnActorCreated(Actor actor) diff --git a/BossMod/Modules/Endwalker/Alliance/A31Thaliak/ThaliakHieroglyphika.cs b/BossMod/Modules/Endwalker/Alliance/A31Thaliak/ThaliakHieroglyphika.cs index 496c1b8c59..7e454f0514 100644 --- a/BossMod/Modules/Endwalker/Alliance/A31Thaliak/ThaliakHieroglyphika.cs +++ b/BossMod/Modules/Endwalker/Alliance/A31Thaliak/ThaliakHieroglyphika.cs @@ -23,19 +23,19 @@ public override void OnEventIcon(Actor actor, uint iconID) { if (currentIndex == 0x17) foreach (var r in StartingCoords) - _aoes.Add(new(rect, Helpers.RotateAroundOrigin(0, origin, r), Activation: _activation)); + _aoes.Add(new(rect, Helpers.RotateAroundOrigin(0, origin, r), default, _activation)); if (currentIndex == 0x4A) foreach (var r in StartingCoords) - _aoes.Add(new(rect, Helpers.RotateAroundOrigin(-90, origin, r), Activation: _activation)); + _aoes.Add(new(rect, Helpers.RotateAroundOrigin(-90, origin, r), default, _activation)); } if (iconID == (uint)IconID.CounterClockwiseHieroglyphika) { if (currentIndex == 0x4A) foreach (var r in StartingCoords) - _aoes.Add(new(rect, Helpers.RotateAroundOrigin(90, origin, r), Activation: _activation)); + _aoes.Add(new(rect, Helpers.RotateAroundOrigin(90, origin, r), default, _activation)); if (currentIndex == 0x17) foreach (var r in StartingCoords) - _aoes.Add(new(rect, Helpers.RotateAroundOrigin(180, origin, r), Activation: _activation)); + _aoes.Add(new(rect, Helpers.RotateAroundOrigin(180, origin, r), default, _activation)); } } diff --git a/BossMod/Modules/Endwalker/Alliance/A33Oschon/OschonP2WanderingShot.cs b/BossMod/Modules/Endwalker/Alliance/A33Oschon/OschonP2WanderingShot.cs index 10eeff0b13..60c21b2415 100644 --- a/BossMod/Modules/Endwalker/Alliance/A33Oschon/OschonP2WanderingShot.cs +++ b/BossMod/Modules/Endwalker/Alliance/A33Oschon/OschonP2WanderingShot.cs @@ -14,9 +14,9 @@ public override void OnEventEnvControl(byte index, uint state) if (index == 0x48) { if (state == 0x00200010) - _aoe = new(circle, new WPos(-0.015f, 759.975f), Activation: _activation); + _aoe = new(circle, new WPos(-0.015f, 759.975f), default, _activation); if (state == 0x00020001) - _aoe = new(circle, new WPos(-0.015f, 739.986f), Activation: _activation); + _aoe = new(circle, new WPos(-0.015f, 739.986f), default, _activation); } } diff --git a/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaHieroglyphika.cs b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaHieroglyphika.cs index 6d7878be41..fce741521c 100644 --- a/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaHieroglyphika.cs +++ b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaHieroglyphika.cs @@ -17,7 +17,7 @@ public override void OnEventIcon(Actor actor, uint iconID) _aoes.Add(new(rect, Helpers.RotateAroundOrigin(0, origin, r), 180.Degrees(), _activation)); if (iconID == (uint)IconID.CounterClockwiseHieroglyphika) foreach (var r in StartingCoords) - _aoes.Add(new(rect, Helpers.RotateAroundOrigin(180, origin, r), Activation: _activation)); + _aoes.Add(new(rect, Helpers.RotateAroundOrigin(180, origin, r), default, _activation)); } public override void OnEventCast(Actor caster, ActorCastEvent spell) diff --git a/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaQuintessence.cs b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaQuintessence.cs index aab6ac222e..b3da00f187 100644 --- a/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaQuintessence.cs +++ b/BossMod/Modules/Endwalker/Alliance/A34Eulogia/EulogiaQuintessence.cs @@ -69,7 +69,7 @@ public override void OnCastStarted(Actor caster, ActorCastInfo spell) // 3rd form: 0x53, 0x54, 0x55, 0x57, 0x56, 0x51, 0x50 // but since we don't need a direction for donuts, we dont need to check it if ((AID)spell.Action.ID is AID.FirstFormDonut or AID.SecondFormDonut or AID.ThirdFormDonut) - _aoes.Add(new(donut, position, Activation: _activation)); + _aoes.Add(new(donut, position, default, _activation)); if ((AID)spell.Action.ID is AID.SecondFormRight or AID.ThirdFormRight) { if (_index == 0x52) diff --git a/BossMod/Modules/Endwalker/Trial/T02Hydaelyn/ParhelicCircle.cs b/BossMod/Modules/Endwalker/Trial/T02Hydaelyn/ParhelicCircle.cs index 8f6ac31e1b..1b4826cdc1 100644 --- a/BossMod/Modules/Endwalker/Trial/T02Hydaelyn/ParhelicCircle.cs +++ b/BossMod/Modules/Endwalker/Trial/T02Hydaelyn/ParhelicCircle.cs @@ -18,16 +18,16 @@ public override IEnumerable ActiveAOEs(int slot, Actor actor) if (hex != null && tri != null) { var c = Module.Bounds.Center; - yield return new(_circle, c, Activation: _activation); - yield return new(_circle, c + _triRadius * (tri.Rotation + 60.Degrees()).ToDirection(), Activation: _activation); - yield return new(_circle, c + _triRadius * (tri.Rotation + 180.Degrees()).ToDirection(), Activation: _activation); - yield return new(_circle, c + _triRadius * (tri.Rotation - 60.Degrees()).ToDirection(), Activation: _activation); - yield return new(_circle, c + _hexRadius * hex.Rotation.ToDirection(), Activation: _activation); - yield return new(_circle, c + _hexRadius * (hex.Rotation + 60.Degrees()).ToDirection(), Activation: _activation); - yield return new(_circle, c + _hexRadius * (hex.Rotation + 120.Degrees()).ToDirection(), Activation: _activation); - yield return new(_circle, c + _hexRadius * (hex.Rotation + 180.Degrees()).ToDirection(), Activation: _activation); - yield return new(_circle, c + _hexRadius * (hex.Rotation - 120.Degrees()).ToDirection(), Activation: _activation); - yield return new(_circle, c + _hexRadius * (hex.Rotation - 60.Degrees()).ToDirection(), Activation: _activation); + yield return new(_circle, c, default, _activation); + yield return new(_circle, c + _triRadius * (tri.Rotation + 60.Degrees()).ToDirection(), default, _activation); + yield return new(_circle, c + _triRadius * (tri.Rotation + 180.Degrees()).ToDirection(), default, _activation); + yield return new(_circle, c + _triRadius * (tri.Rotation - 60.Degrees()).ToDirection(), default, _activation); + yield return new(_circle, c + _hexRadius * hex.Rotation.ToDirection(), default, _activation); + yield return new(_circle, c + _hexRadius * (hex.Rotation + 60.Degrees()).ToDirection(), default, _activation); + yield return new(_circle, c + _hexRadius * (hex.Rotation + 120.Degrees()).ToDirection(), default, _activation); + yield return new(_circle, c + _hexRadius * (hex.Rotation + 180.Degrees()).ToDirection(), default, _activation); + yield return new(_circle, c + _hexRadius * (hex.Rotation - 120.Degrees()).ToDirection(), default, _activation); + yield return new(_circle, c + _hexRadius * (hex.Rotation - 60.Degrees()).ToDirection(), default, _activation); } } } diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage27LockUpYourSnorters/Stage27.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage27LockUpYourSnorters/Stage27.cs index 9eecd2c23c..9cb1d6edbf 100644 --- a/BossMod/Modules/Global/MaskedCarnivale/Stage27LockUpYourSnorters/Stage27.cs +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage27LockUpYourSnorters/Stage27.cs @@ -78,7 +78,7 @@ public override IEnumerable ActiveAOEs(int slot, Actor actor) yield return new(circle, c.Position, default, _activation); if (_casters.Count > 0 && _snortingeffectends > WorldState.CurrentTime) foreach (var c in _casters) - yield return new(circle, c.Position + Math.Min(15, Module.Bounds.IntersectRay(c.Position, (c.Position - Module.PrimaryActor.Position).Normalized()) - c.HitboxRadius / 2) * (c.Position - Module.PrimaryActor.Position).Normalized(), Activation: _activation); + yield return new(circle, c.Position + Math.Min(15, Module.Bounds.IntersectRay(c.Position, (c.Position - Module.PrimaryActor.Position).Normalized()) - c.HitboxRadius / 2) * (c.Position - Module.PrimaryActor.Position).Normalized(), default, _activation); } public override void Update() diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage28DangerousWhenDead/Stage28.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage28DangerousWhenDead/Stage28.cs new file mode 100644 index 0000000000..3683bb8654 --- /dev/null +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage28DangerousWhenDead/Stage28.cs @@ -0,0 +1,135 @@ +namespace BossMod.Global.MaskedCarnivale.Stage28; + +public enum OID : uint +{ + Boss = 0x2CD2, //R=2.6 + UndeadSerf = 0x2CD4, // R=0.5 + UndeadSerf2 = 0x2CD3, // R=0.5 + UndeadSoldier = 0x2CD5, // R=0.5 + UndeadWarrior = 0x2CD6, // R=1.9 + UndeadGravekeeper = 0x2CD7, // R=0.75 + NecrobaneVoidzone = 0x1EA9FA, + MagitekExplosive = 0x2CEC, //R=0.8 + Helper = 0x233C, +} + +public enum AID : uint +{ + AutoAttack = 19052, // Boss->player, no cast, single-target + AutoAttack2 = 6499, // 2CD4/2CD6/2CD7->player, no cast, single-target + AutoAttack3 = 19068, // 2CD5->player, no cast, single-target + DoomImpending = 19051, // Boss->self, 8,0s cast, range 80 circle, heal to full before cast ends + MarchOfTheDraugar = 19057, // Boss->self, 3,0s cast, single-target, summons 4 different sets of adds + DeathThroes = 19061, // 2CD3->player, no cast, single-target, pull 20 between hitboxes, player becomes unable to move + DeathThroesRecover = 19062, // 2CD3->self, no cast, range 100 circle + Necrobane = 19059, // Boss->location, 4,0s cast, range 6 circle + MegaDeath = 19055, // Boss->self, 6,0s cast, range 80 circle, deadly if not in voidzone + HelblarShriek = 19084, // Boss->self, 4,0s cast, range 50 circle, high dmg if in Necrobane voidzone + FireIII = 19069, // 2CD5->player, 5,0s cast, single-target + FuneralPyre = 19056, // Boss->self, 6,0s cast, range 40 circle, deadly if in Necrobane voidzone + ButterflyFloat = 19065, // 2CD6->player, 3,0s cast, single-target + GlassPunch = 19063, // 2CD6->self, no cast, range 6+R 90-degree cone + Brainstorm = 19054, // Boss->self, 4,0s cast, range 60 circle, forced march debuffs + BilrostSquallVisual = 19081, // Boss->self, 9,0s cast, single-target + BilrostSquall = 19082, // Helper->location, 9,0s cast, range 10 circle + NailInTheCoffin = 19066, // 2CD7->player, no cast, single-target + VengefulSoul = 19067, // 2CD7->location, 3,0s cast, range 6 circle + Cackle = 19053, // Boss->player, 4,0s cast, single-target, high dmg, interruptible + Catapult = 19064, // 2CD6->location, 3,0s cast, range 6 circle +} + +public enum SID : uint +{ + Doom = 1769, // Boss->player, extra=0x0 + Incurable = 1488, // Boss->player, extra=0x0 + DeathThroes = 608, // 2CD3->player, extra=0x0 + DeathBecomesYou = 2197, // none->player, extra=0x0 + Bleeding = 320, // none->player, extra=0x0 + RightFace = 1961, // Boss->player, extra=0x0 + LeftFace = 1960, // Boss->player, extra=0x0 + ForwardMarch = 1958, // Boss->player, extra=0x0 + AboutFace = 1959, // Boss->player, extra=0x0 + ForcedMarch = 1257, // Boss->player, extra=0x8/0x4/0x2/0x1 +} + +class DoomImpending(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.DoomImpending), "Heal to full before cast ends!"); +class MarchOfTheDraugar(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.MarchOfTheDraugar), "Summons adds! (Kill with fire!)"); +class NecrobaneVoidzone(BossModule module) : Components.PersistentInvertibleVoidzoneByCast(module, 6, m => m.Enemies(OID.NecrobaneVoidzone).Where(z => z.EventState != 7), ActionID.MakeSpell(AID.MegaDeath)); +class Necrobane(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Necrobane), 6); +class HelblarShriek(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.HelblarShriek)); +class FuneralPyre(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.FuneralPyre)); +class Catapult(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Catapult), 6); +class VengefulSoul(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.VengefulSoul), 6); +class BilrostSquall(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.BilrostSquall), 10); +class Cackle(BossModule module) : Components.CastInterruptHint(module, ActionID.MakeSpell(AID.Cackle)); + +class Brainstorm(BossModule module) : Components.StatusDrivenForcedMarch(module, 2, (uint)SID.ForwardMarch, (uint)SID.AboutFace, (uint)SID.LeftFace, (uint)SID.RightFace) +{ + public override bool DestinationUnsafe(int slot, Actor actor, WPos pos) => Module.FindComponent()?.ActiveAOEs(slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false || !Module.Bounds.Contains(pos); +} + +class Hints(BossModule module) : BossComponent(module) +{ + public override void AddGlobalHints(GlobalHints hints) + { + hints.Add($"{Module.PrimaryActor.Name} will spawn upto 4 waves of adds which are weak to fire.\nA way to quickly heal yourself to full is mandatory and a ranged fire\nability such as Mustard Bomb and Flying Sardine for interrupts\nare highly recommended."); + } +} + +class Stage28States : StateMachineBuilder +{ + public Stage28States(BossModule module) : base(module) + { + TrivialPhase() + .ActivateOnEnter() + .ActivateOnEnter() + .ActivateOnEnter() + .ActivateOnEnter() + .ActivateOnEnter() + .ActivateOnEnter() + .ActivateOnEnter() + .ActivateOnEnter() + .ActivateOnEnter() + .ActivateOnEnter() + .ActivateOnEnter() + .DeactivateOnEnter(); + } +} + +[ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.MaskedCarnivale, GroupID = 697, NameID = 9233)] +public class Stage28 : BossModule +{ + public Stage28(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(100, 100), 16)) + { + ActivateComponent(); + } + + protected override void DrawEnemies(int pcSlot, Actor pc) + { + Arena.Actor(PrimaryActor, ArenaColor.Enemy); + foreach (var s in Enemies(OID.UndeadSerf)) + Arena.Actor(s, ArenaColor.Enemy); + foreach (var s in Enemies(OID.UndeadSerf2)) + Arena.Actor(s, ArenaColor.Enemy); + foreach (var s in Enemies(OID.UndeadGravekeeper)) + Arena.Actor(s, ArenaColor.Enemy); + foreach (var s in Enemies(OID.UndeadSoldier)) + Arena.Actor(s, ArenaColor.Enemy); + foreach (var s in Enemies(OID.UndeadWarrior)) + Arena.Actor(s, ArenaColor.Enemy); + } + + public override void CalculateAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) + { + base.CalculateAIHints(slot, actor, assignment, hints); + foreach (var e in hints.PotentialTargets) + { + e.Priority = (OID)e.Actor.OID switch + { + OID.UndeadSerf or OID.UndeadSerf2 or OID.UndeadSoldier or OID.UndeadGravekeeper or OID.UndeadWarrior => 2, + OID.Boss => 1, + _ => 0 + }; + } + } +} diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage29RedFraughtAndBlue/Stage29Act1.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage29RedFraughtAndBlue/Stage29Act1.cs new file mode 100644 index 0000000000..f4293f7895 --- /dev/null +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage29RedFraughtAndBlue/Stage29Act1.cs @@ -0,0 +1,102 @@ +namespace BossMod.Global.MaskedCarnivale.Stage29.Act1; + +public enum OID : uint +{ + Boss = 0x2C5B, //R=3.0 + FireTornado = 0x2C5C, // R=4.0 + Helper = 0x233C, +} + +public enum AID : uint +{ + AutoAttack = 6499, // Boss->player, no cast, single-target + Unknown = 18872, // Boss->self, no cast, single-target + FluidSwing = 18689, // Boss->self/player, 4,0s cast, range 11 30-degree cone, interruptible, knockback 50, source forward + SeaOfFlamesVisual = 18693, // Boss->self, 3,0s cast, single-target + SeaOfFlames = 18694, // Helper->location, 3,0s cast, range 6 circle + Pyretic = 18691, // Boss->self, 4,0s cast, range 80 circle, applies pyretic + FireII = 18692, // Boss->location, 4,0s cast, range 5 circle + PillarOfFlameVisual = 18695, // Boss->self, 3,0s cast, single-target + PillarOfFlame = 18696, // Helper->location, 3,0s cast, range 8 circle + PillarOfFlameVisual2 = 18894, // Boss->self, 6,0s cast, single-target + PillarOfFlame2 = 18895, // Helper->location, 6,0s cast, range 8 circle + Rush = 18690, // Boss->player, 5,0s cast, width 4 rect charge, does distance based damage, seems to scale all the way until the other side of the arena + FlareStarVisual = 18697, // Boss->self, 5,0s cast, single-target + FlareStar = 18698, // Helper->location, 5,0s cast, range 40 circle, distance based AOE, radius 10 seems to be a good compromise + FireBlast = 18699, // FireTornado->self, 3,0s cast, range 70+R width 4 rect +} + +public enum SID : uint +{ + Pyretic = 960, // Boss->player, extra=0x0 + +} + +class FluidSwing(BossModule module) : Components.CastInterruptHint(module, ActionID.MakeSpell(AID.FluidSwing)); +class FluidSwingKnockback(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.FluidSwing), 50, kind: Kind.DirForward); +class SeaOfFlames(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.SeaOfFlames), 6); +class FireII(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.FireII), 5); +class PillarOfFlame(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.PillarOfFlame), 8); +class PillarOfFlame2(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.PillarOfFlame2), 8); +class Rush(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.Rush), "GTFO from boss! (Distance based charge)"); +class FlareStar(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.FlareStar), 10); +class FireBlast(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.FireBlast), new AOEShapeRect(74, 2)); +class PyreticHint(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.Pyretic), "Pyretic, stop everything! Dodge the AOE after it runs out."); + +class Pyretic(BossModule module) : Components.StayMove(module) +{ + public override void OnStatusGain(Actor actor, ActorStatus status) + { + if ((SID)status.ID is SID.Pyretic) + { + if (Raid.FindSlot(actor.InstanceID) is var slot && slot >= 0 && slot < Requirements.Length) + Requirements[slot] = Requirement.Stay; + } + } + + public override void OnStatusLose(Actor actor, ActorStatus status) + { + if ((SID)status.ID is SID.Pyretic) + { + if (Raid.FindSlot(actor.InstanceID) is var slot && slot >= 0 && slot < Requirements.Length) + Requirements[slot] = Requirement.None; + } + } +} + +class Hints(BossModule module) : BossComponent(module) +{ + public override void AddGlobalHints(GlobalHints hints) + { + hints.Add($"For this act Excuviation and Diamondback are mandatory.\nBringing Flying Sardine, lightning and wind spells is higly recommended."); + } +} + +class Stage29Act1States : StateMachineBuilder +{ + public Stage29Act1States(BossModule module) : base(module) + { + TrivialPhase() + .ActivateOnEnter() + .ActivateOnEnter() + .ActivateOnEnter() + .ActivateOnEnter() + .ActivateOnEnter() + .ActivateOnEnter() + .ActivateOnEnter() + .ActivateOnEnter() + .ActivateOnEnter() + .ActivateOnEnter() + .ActivateOnEnter() + .DeactivateOnEnter(); + } +} + +[ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.MaskedCarnivale, GroupID = 698, NameID = 9239)] +public class Stage29Act1 : BossModule +{ + public Stage29Act1(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(100, 100), 16)) + { + ActivateComponent(); + } +} \ No newline at end of file diff --git a/BossMod/Modules/Global/MaskedCarnivale/Stage29RedFraughtAndBlue/Stage29Act2.cs b/BossMod/Modules/Global/MaskedCarnivale/Stage29RedFraughtAndBlue/Stage29Act2.cs new file mode 100644 index 0000000000..4de0ff994a --- /dev/null +++ b/BossMod/Modules/Global/MaskedCarnivale/Stage29RedFraughtAndBlue/Stage29Act2.cs @@ -0,0 +1,185 @@ +namespace BossMod.Global.MaskedCarnivale.Stage29.Act2; + +public enum OID : uint +{ + Boss = 0x2C5D, //R=3.0 + FireTornado = 0x2C60, // R=4.0 + LeftHand = 0x2C5F, // R=1.3 + RightHand = 0x2C5E, // R=1.8 + Helper = 0x233C, +} + +public enum AID : uint +{ + AutoAttack = 6499, // 2C5D->player, no cast, single-target + AutoAttack2 = 18980, // 2C5F->player, no cast, single-target + AutoAttack3 = 18976, // 2C5E->player, no cast, single-target + Unknown = 18975, // 2C5D->self, no cast, single-target + ProteanWave = 18971, // 2C5D->self, 3,0s cast, range 39 30-degree cone, knockback 40, away from source (only first wave) + ProteanWave2 = 18972, // 2C5D->self, no cast, range 39 30-degree cone, hits player position, but can be dodged. angle snapshot sometime between cast event of wave 1 and wave 2, not sure if its possible to predict accurately + ProteanWave3 = 18984, // 2C60->self, 3,0s cast, range 50 30-degree cone + Throttle = 18964, // 2C5D->player, no cast, range 5 circle + FerrofluidKB = 18963, // 2C5D->self, 5,0s cast, range 80 circle, knockback 6, away from source + FluidConvection = 18974, // 2C5D->self, no cast, range 10-40 donut + FerrofluidAttract = 18962, // Boss->self, 5,0s cast, range 80 circle, pull 6, between centers + FluidDynamic = 18973, // Boss->self, no cast, range 6 circle + FluidBallVisual = 18968, // 2C5D->self, 3,0s cast, single-target + FluidBall = 18969, // 233C->location, 3,0s cast, range 5 circle + WateryGrasp = 19028, // 2C5D->self, 5,0s cast, single-target, calls left/right hand, happens at 70% max hp + FluidStrike = 18981, // 2C5F->self, no cast, range 12 90-degree cone + FluidStrike2 = 18977, // 2C5E->self, no cast, range 12 90-degree cone + BigSplashFirst = 18965, // 2C5D->self, 8,0s cast, range 80 circle, knockback 25, away from source, use diamondback to survive + BigSplashRepeat = 18966, // 2C5D->self, no cast, range 80 circle, knockback 25, away from source + Cascade = 19022, // 2C5D->self, 4,0s cast, range 80 circle, raidwide, summons water tornados + Unwind = 18985, // 2C60->self, 5,0s cast, range 80 circle, damage fall of AOE, about 10 distance is fine + FluidSwing = 18961, // 2C5D->player, 4,0s cast, range 11 30-degree cone, interruptible, knockback 50, source forward + Palmistry = 18982, // 2C5F->player, 3,0s cast, single-target, drains 5000 MP + WashAwayFirst = 18978, // 2C5E->self, 5,0s cast, range 80 circle, multiple raidwides, add should be killed before cast finishes + WashAwayRest = 18979, // 2C5E->self, no cast, range 80 circle +} + +public enum SID : uint +{ + Throttle = 700, // Boss->player, extra=0x0, player dies when debuff runs out if not cleansed before + Stun = 149, // Boss->player, extra=0x0 +} + +class BigSplash(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.BigSplashFirst), "Diamondback! (Multiple raidwides + knockbacks)"); +class BigSplashKB(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.BigSplashFirst), 25); +class Cascade(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.Cascade), "Raidwide + Tornados spawn"); +class WateryGrasp(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.WateryGrasp), "Spawns hands. Focus left hand first."); +class Throttle(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.Throttle), "Prepare to use Excuviation to remove debuff"); +class FluidSwing(BossModule module) : Components.CastInterruptHint(module, ActionID.MakeSpell(AID.FluidSwing)); +class FluidSwingKnockback(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.FluidSwing), 50, kind: Kind.DirForward); +class ProteanWave(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ProteanWave), new AOEShapeCone(39, 15.Degrees())); +class ProteanWave3(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ProteanWave3), new AOEShapeCone(39, 15.Degrees())); + +class KnockbackPull(BossModule module) : Components.Knockback(module) +{ + private Source? _knockback; + + public override IEnumerable Sources(int slot, Actor actor) => Utils.ZeroOrOne(_knockback); + + public override void OnCastStarted(Actor caster, ActorCastInfo spell) + { + if ((AID)spell.Action.ID == AID.FerrofluidKB) + _knockback = new(Module.PrimaryActor.Position, 6, spell.NPCFinishAt); + if ((AID)spell.Action.ID == AID.FerrofluidAttract) + _knockback = new(Module.PrimaryActor.Position, 6, spell.NPCFinishAt, Kind: Kind.TowardsOrigin); + } + + public override void OnCastFinished(Actor caster, ActorCastInfo spell) + { + if ((AID)spell.Action.ID is AID.FerrofluidKB or AID.FerrofluidAttract) + _knockback = null; + } + + public override bool DestinationUnsafe(int slot, Actor actor, WPos pos) => Module.FindComponent()?.ActiveAOEs(slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false || !Module.Bounds.Contains(pos); +} + +class Unwind(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Unwind), new AOEShapeCircle(10)); +class FluidBall(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.FluidBall), 5); + +class FluidConvectionDynamic(BossModule module) : Components.GenericAOEs(module) +{ + private static readonly AOEShapeDonut donut = new(10, 40); + private static readonly AOEShapeCircle circle = new(6); + private DateTime _activation; + private AOEShape? shape; + + public override IEnumerable ActiveAOEs(int slot, Actor actor) + { + if (shape != default) + yield return new(shape, Module.PrimaryActor.Position, Module.PrimaryActor.Rotation, _activation); + } + + public override void OnCastStarted(Actor caster, ActorCastInfo spell) + { + // boss can move after cast started, so we can't use aoe instance, since that would cause outdated position data to be used + if ((AID)spell.Action.ID == AID.FerrofluidKB) + { + shape = donut; + _activation = spell.NPCFinishAt; + } + if ((AID)spell.Action.ID == AID.FerrofluidAttract) + { + shape = circle; + _activation = spell.NPCFinishAt; + } + } + + public override void OnEventCast(Actor caster, ActorCastEvent spell) + { + if ((AID)spell.Action.ID is AID.FluidConvection or AID.FluidDynamic) + shape = null; + } +} + +class Hints2(BossModule module) : BossComponent(module) +{ + public override void AddGlobalHints(GlobalHints hints) + { + var lefthand = Module.Enemies(OID.LeftHand).Where(x => !x.IsDead).FirstOrDefault(); + var righthand = Module.Enemies(OID.RightHand).Where(x => !x.IsDead).FirstOrDefault(); + if (lefthand != null) + hints.Add($"{lefthand.Name} will drain all your MP, kill it fast!"); + if (lefthand == null && righthand != null) + hints.Add($"{righthand.Name} will do multiple raidwides, kill it fast!"); + } + + public override void AddHints(int slot, Actor actor, TextHints hints) + { + var doomed = actor.FindStatus(SID.Throttle); //it is called throttle, but works exactly like any cleansable doom + if (doomed != null) + hints.Add("You were doomed! Cleanse it with Exuviation."); + } +} + +class Hints(BossModule module) : BossComponent(module) +{ + public override void AddGlobalHints(GlobalHints hints) + { + hints.Add($"{Module.PrimaryActor.Name} will cast Throttle on you which needs to be\ncleansed with Excuviation. It will also spawn two hands which need to be\nkilled asap. Focus the left hand first because it will drain all your MP."); + } +} + +class Stage29Act2States : StateMachineBuilder +{ + public Stage29Act2States(BossModule module) : base(module) + { + TrivialPhase() + .ActivateOnEnter() + .ActivateOnEnter() + .ActivateOnEnter() + .ActivateOnEnter() + .ActivateOnEnter() + .ActivateOnEnter() + .ActivateOnEnter() + .ActivateOnEnter() + .ActivateOnEnter() + .ActivateOnEnter() + .ActivateOnEnter() + .ActivateOnEnter() + .ActivateOnEnter() + .ActivateOnEnter() + .DeactivateOnEnter(); + } +} + +[ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Malediktus", GroupType = BossModuleInfo.GroupType.MaskedCarnivale, GroupID = 698, NameID = 9241)] +public class Stage29Act2 : BossModule +{ + public Stage29Act2(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(100, 100), 16)) + { + ActivateComponent(); + } + + protected override void DrawEnemies(int pcSlot, Actor pc) + { + Arena.Actor(PrimaryActor, ArenaColor.Enemy); + foreach (var s in Enemies(OID.LeftHand)) + Arena.Actor(s, ArenaColor.Enemy); + foreach (var s in Enemies(OID.RightHand)) + Arena.Actor(s, ArenaColor.Enemy); + } +} \ No newline at end of file