From 59981518db26799e170ef24147f74c8b04a8d6f3 Mon Sep 17 00:00:00 2001 From: CarnifexOptimus <156172553+CarnifexOptimus@users.noreply.github.com> Date: Wed, 17 Jul 2024 15:35:36 +0200 Subject: [PATCH] M1N module updated --- .../Dungeon/D05Origenics/D051Herpekaris.cs | 2 +- .../Raid/M1NBIackCat/BlackCatCrossing.cs | 69 +++++++++ .../Raid/M1NBIackCat/ElevateAndEviscerate.cs | 34 ++++ .../Dawntrail/Raid/M1NBIackCat/M1NBIackCat.cs | 138 +---------------- .../Raid/M1NBIackCat/M1NBIackCatEnums.cs | 145 +++++++++--------- .../Raid/M1NBIackCat/M1NBIackCatStates.cs | 15 +- .../Dawntrail/Raid/M1NBIackCat/Mouser.cs | 35 +++++ .../Dawntrail/Raid/M1NBIackCat/OneTwoPaw.cs | 69 +++++++++ .../Raid/M1NBIackCat/PredaceousPounce.cs | 70 +++++++++ .../Dawntrail/Raid/M2NHoneyB/M2NHoneyB.cs | 2 +- .../Raid/M3NBruteBomber/M3NBruteBomber.cs | 2 +- .../Visualization/ReplayDetailsWindow.cs | 2 +- 12 files changed, 361 insertions(+), 222 deletions(-) create mode 100644 BossMod/Modules/Dawntrail/Raid/M1NBIackCat/BlackCatCrossing.cs create mode 100644 BossMod/Modules/Dawntrail/Raid/M1NBIackCat/ElevateAndEviscerate.cs create mode 100644 BossMod/Modules/Dawntrail/Raid/M1NBIackCat/Mouser.cs create mode 100644 BossMod/Modules/Dawntrail/Raid/M1NBIackCat/OneTwoPaw.cs create mode 100644 BossMod/Modules/Dawntrail/Raid/M1NBIackCat/PredaceousPounce.cs diff --git a/BossMod/Modules/Dawntrail/Dungeon/D05Origenics/D051Herpekaris.cs b/BossMod/Modules/Dawntrail/Dungeon/D05Origenics/D051Herpekaris.cs index 03adb8e044..391b8ffed0 100644 --- a/BossMod/Modules/Dawntrail/Dungeon/D05Origenics/D051Herpekaris.cs +++ b/BossMod/Modules/Dawntrail/Dungeon/D05Origenics/D051Herpekaris.cs @@ -79,7 +79,7 @@ public override void OnCastStarted(Actor caster, ActorCastInfo spell) private void AddAOE(AOEShape shape, WPos position, Angle rotation, DateTime activation) { - _aoes.Add(new AOEInstance(shape, position, rotation, activation)); + _aoes.Add(new(shape, position, rotation, activation)); } public override void OnEventCast(Actor caster, ActorCastEvent spell) diff --git a/BossMod/Modules/Dawntrail/Raid/M1NBIackCat/BlackCatCrossing.cs b/BossMod/Modules/Dawntrail/Raid/M1NBIackCat/BlackCatCrossing.cs new file mode 100644 index 0000000000..075437ec3e --- /dev/null +++ b/BossMod/Modules/Dawntrail/Raid/M1NBIackCat/BlackCatCrossing.cs @@ -0,0 +1,69 @@ +namespace BossMod.Dawntrail.Raid.M1NBlackCat; + +public class BlackCatCrossing(BossModule module) : Components.GenericAOEs(module) +{ + private readonly List _aoes = []; + private static readonly Angle[] anglesIntercardinals = [-45.003f.Degrees(), 44.998f.Degrees(), 134.999f.Degrees(), -135.005f.Degrees()]; + private static readonly Angle[] anglesCardinals = [-90.004f.Degrees(), -0.003f.Degrees(), 180.Degrees(), 89.999f.Degrees()]; + private static readonly AOEShapeCone cone = new(60, 22.5f.Degrees()); + private enum Pattern { None, Cardinals, Intercardinals } + private Pattern _currentPattern; + + public override IEnumerable ActiveAOEs(int slot, Actor actor) + { + if (_aoes.Count > 3) + for (var i = 0; i < 4; i++) + yield return _aoes[i] with { Color = ArenaColor.Danger }; + if (_aoes.Count > 7) + for (var i = 4; i < 8; i++) + yield return _aoes[i] with { Risky = false }; + } + + public override void OnCastStarted(Actor caster, ActorCastInfo spell) + { + switch ((AID)spell.Action.ID) + { + case AID.BlackCatCrossingFirst: + case AID.BlackCatCrossingRest: + _aoes.Add(new(cone, caster.Position, spell.Rotation, spell.NPCFinishAt)); + _aoes.SortBy(x => x.Activation); + break; + case AID.LeapingBlackCatCrossingVisual1: + _currentPattern = Pattern.Cardinals; + break; + case AID.LeapingBlackCatCrossingVisual2: + _currentPattern = Pattern.Intercardinals; + break; + } + } + + public override void OnActorCreated(Actor actor) + { + if ((OID)actor.OID == OID.LeapingAttacks && _currentPattern != Pattern.None) + { + AddLeapingAOEs(actor, _currentPattern == Pattern.Cardinals ? anglesCardinals : anglesIntercardinals, 9); + AddLeapingAOEs(actor, _currentPattern == Pattern.Cardinals ? anglesIntercardinals : anglesCardinals, 11); + _currentPattern = Pattern.None; + } + } + + public override void OnCastFinished(Actor caster, ActorCastInfo spell) + { + if (_aoes.Count > 0) + switch ((AID)spell.Action.ID) + { + case AID.BlackCatCrossingFirst: + case AID.BlackCatCrossingRest: + case AID.LeapingBlackCatCrossingFirst: + case AID.LeapingBlackCatCrossingRest: + _aoes.RemoveAt(0); + break; + } + } + + private void AddLeapingAOEs(Actor actor, Angle[] angles, int futureTime) + { + foreach (var angle in angles) + _aoes.Add(new(cone, actor.Position, angle, Module.WorldState.FutureTime(futureTime))); + } +} diff --git a/BossMod/Modules/Dawntrail/Raid/M1NBIackCat/ElevateAndEviscerate.cs b/BossMod/Modules/Dawntrail/Raid/M1NBIackCat/ElevateAndEviscerate.cs new file mode 100644 index 0000000000..8d2fb5b243 --- /dev/null +++ b/BossMod/Modules/Dawntrail/Raid/M1NBIackCat/ElevateAndEviscerate.cs @@ -0,0 +1,34 @@ +namespace BossMod.Dawntrail.Raid.M1NBlackCat; + +class ElevateAndEvisverate(BossModule module) : Components.Knockback(module) +{ + private DateTime activation; + private (Actor source, Actor target) _tether; + + public override IEnumerable Sources(int slot, Actor actor) + { + if (_tether != default && actor == _tether.target) + yield return new(_tether.source.Position, 10, activation); + } + + public override void OnCastStarted(Actor caster, ActorCastInfo spell) + { + if ((AID)spell.Action.ID == AID.ElevateAndEviscerate) + activation = spell.NPCFinishAt; + } + + public override void OnTethered(Actor source, ActorTetherInfo tether) + { + if (tether.ID is (uint)TetherID.ElevateAndEviscerateGood or (uint)TetherID.ElevateAndEviscerateBad) + _tether = (source, WorldState.Actors.Find(tether.Target)!); + } + + public override void OnCastFinished(Actor caster, ActorCastInfo spell) + { + if ((AID)spell.Action.ID == AID.ElevateAndEviscerate) + { + _tether = default; + ++NumCasts; + } + } +} diff --git a/BossMod/Modules/Dawntrail/Raid/M1NBIackCat/M1NBIackCat.cs b/BossMod/Modules/Dawntrail/Raid/M1NBIackCat/M1NBIackCat.cs index c32a1691db..a9b0e96377 100644 --- a/BossMod/Modules/Dawntrail/Raid/M1NBIackCat/M1NBIackCat.cs +++ b/BossMod/Modules/Dawntrail/Raid/M1NBIackCat/M1NBIackCat.cs @@ -1,141 +1,11 @@ namespace BossMod.Dawntrail.Raid.M1NBlackCat; -class BlackCatCrossing3(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.BlackCatCrossing3), new AOEShapeCone(60, 22.5f.Degrees())); -class BlackCatCrossing4(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.BlackCatCrossing4), new AOEShapeCone(60, 22.5f.Degrees())); class BloodyScratch(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.BloodyScratch)); - -class OneTwoPaw(BossModule module) : Components.GenericAOEs(module) -{ - private readonly List _aoes = []; - - private static readonly AOEShapeCone cone = new(60, 90.Degrees()); - - public override IEnumerable ActiveAOEs(int slot, Actor actor) - { - if (_aoes.Count > 0) - yield return _aoes[0] with { Color = ArenaColor.Danger }; - if (_aoes.Count > 1) - yield return _aoes[1] with { Risky = false }; - } - - public override void OnCastStarted(Actor caster, ActorCastInfo spell) - { - if ((AID)spell.Action.ID is AID.OneTwoPaw2 or AID.OneTwoPaw3 or AID.OneTwoPaw5 or AID.OneTwoPaw6) - { - _aoes.Add(new(cone, caster.Position, spell.Rotation, spell.NPCFinishAt)); - _aoes.SortBy(x => x.Activation); - } - } - - public override void OnCastFinished(Actor caster, ActorCastInfo spell) - { - if (_aoes.Count > 0 && (AID)spell.Action.ID is AID.OneTwoPaw2 or AID.OneTwoPaw3 or AID.OneTwoPaw5 or AID.OneTwoPaw6) - _aoes.RemoveAt(0); - } -} - -class BlackCatCrossing(BossModule module) : Components.GenericAOEs(module) -{ - private readonly List _aoes = []; - - private static readonly AOEShapeCone cone = new(60, 22.5f.Degrees()); - - public override IEnumerable ActiveAOEs(int slot, Actor actor) - { - if (_aoes.Count > 0) - yield return _aoes[0] with { Color = ArenaColor.Danger }; - if (_aoes.Count > 1) - yield return _aoes[1] with { Risky = false }; - } - - public override void OnCastStarted(Actor caster, ActorCastInfo spell) - { - if ((AID)spell.Action.ID is AID.BlackCatCrossing3 or AID.BlackCatCrossing4) - { - _aoes.Add(new(cone, caster.Position, spell.Rotation, spell.NPCFinishAt)); - _aoes.SortBy(x => x.Activation); - } - } - - public override void OnCastFinished(Actor caster, ActorCastInfo spell) - { - if (_aoes.Count > 0 && (AID)spell.Action.ID is AID.BlackCatCrossing3 or AID.BlackCatCrossing4) - _aoes.RemoveAt(0); - } -} - class BiscuitMaker(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.BiscuitMaker)); -class Clawful2(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.Clawful2), 5, 8); -class Shockwave2(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.Shockwave2), 18, stopAtWall: true, kind: Kind.AwayFromOrigin); - -class PredaceousPounce2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PredaceousPounce2), new AOEShapeCircle(11)); -class PredaceousPounce3(BossModule module) : Components.ChargeAOEs(module, ActionID.MakeSpell(AID.PredaceousPounce3), 3); -class PredaceousPounce5(BossModule module) : Components.ChargeAOEs(module, ActionID.MakeSpell(AID.PredaceousPounce5), 3); -class PredaceousPounce6(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.PredaceousPounce6), new AOEShapeCircle(11)); - +class Clawful(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.Clawful), 5, 8); +class Shockwave(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.Shockwave), 18, stopAfterWall: true); class GrimalkinGale2(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.GrimalkinGale2), 5); +class Overshadow(BossModule module) : Components.LineStack(module, ActionID.MakeSpell(AID.OverShadowMarker), ActionID.MakeSpell(AID.Overshadow), 5.3f, 60, 2.5f); -class LeapingOneTwoPaw(BossModule module) : Components.GenericAOEs(module) -{ - private readonly List _aoes = []; - - private static readonly AOEShapeCone cone = new(60, 90.Degrees()); - - public override IEnumerable ActiveAOEs(int slot, Actor actor) - { - if (_aoes.Count > 0) - yield return _aoes[0] with { Color = ArenaColor.Danger }; - if (_aoes.Count > 1) - yield return _aoes[1] with { Risky = false }; - } - - public override void OnCastStarted(Actor caster, ActorCastInfo spell) - { - if ((AID)spell.Action.ID is AID.LeapingOneTwoPaw6 or AID.LeapingOneTwoPaw7 or AID.LeapingOneTwoPaw9 or AID.LeapingOneTwoPaw10) - { - _aoes.Add(new(cone, caster.Position, spell.Rotation, spell.NPCFinishAt)); - _aoes.SortBy(x => x.Activation); - } - } - - public override void OnCastFinished(Actor caster, ActorCastInfo spell) - { - if (_aoes.Count > 0 && (AID)spell.Action.ID is AID.LeapingOneTwoPaw6 or AID.LeapingOneTwoPaw7 or AID.LeapingOneTwoPaw9 or AID.LeapingOneTwoPaw10) - _aoes.RemoveAt(0); - } -} - -class LeapingBlackCatCrossing(BossModule module) : Components.GenericAOEs(module) -{ - private readonly List _aoes = []; - - private static readonly AOEShapeCone cone = new(60, 22.5f.Degrees()); - - public override IEnumerable ActiveAOEs(int slot, Actor actor) - { - if (_aoes.Count > 0) - yield return _aoes[0] with { Color = ArenaColor.Danger }; - if (_aoes.Count > 1) - yield return _aoes[1] with { Risky = false }; - } - - public override void OnCastStarted(Actor caster, ActorCastInfo spell) - { - if ((AID)spell.Action.ID is AID.LeapingBlackCatCrossing4 or AID.LeapingBlackCatCrossing5) - { - _aoes.Add(new(cone, caster.Position, spell.Rotation, spell.NPCFinishAt)); - _aoes.SortBy(x => x.Activation); - } - } - - public override void OnCastFinished(Actor caster, ActorCastInfo spell) - { - if (_aoes.Count > 0 && (AID)spell.Action.ID is AID.LeapingBlackCatCrossing4 or AID.LeapingBlackCatCrossing5) - _aoes.RemoveAt(0); - } -} - -class Overshadow(BossModule module) : Components.LineStack(module, ActionID.MakeSpell(AID.Overshadow1), ActionID.MakeSpell(AID.Overshadow2), 5.2f); - -[ModuleInfo(BossModuleInfo.Maturity.WIP, Contributors = "The Combat Reborn Team", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 985, NameID = 12686)] +[ModuleInfo(BossModuleInfo.Maturity.Verified, Contributors = "The Combat Reborn Team (Malediktus, LTS)", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 985, NameID = 12686)] public class M1NBlackCat(WorldState ws, Actor primary) : BossModule(ws, primary, new(100, 100), new ArenaBoundsSquare(20)); diff --git a/BossMod/Modules/Dawntrail/Raid/M1NBIackCat/M1NBIackCatEnums.cs b/BossMod/Modules/Dawntrail/Raid/M1NBIackCat/M1NBIackCatEnums.cs index f3ba050586..63b52a72fc 100644 --- a/BossMod/Modules/Dawntrail/Raid/M1NBIackCat/M1NBIackCatEnums.cs +++ b/BossMod/Modules/Dawntrail/Raid/M1NBIackCat/M1NBIackCatEnums.cs @@ -2,11 +2,10 @@ public enum OID : uint { - Boss = 0x429C, // R3.993, x1 - Helper = 0x233C, // R0.500, x40, 523 type - CopyCat = 0x429D, // R3.993, x1 - Actor1ea1a1 = 0x1EA1A1, // R2.000, x1, EventObj type - UnknownActor = 0x429E, // R1.000, x0 (spawn during fight) + Boss = 0x429C, // R3.993 + CopyCat = 0x429D, // R3.993 + LeapingAttacks = 0x429E, // R1.0 + Helper = 0x233C } public enum AID : uint @@ -14,17 +13,17 @@ public enum AID : uint AutoAttack = 39151, // Boss->player, no cast, single-target Teleport = 37640, // Boss->location, no cast, single-target - BiscuitMaker = 37706, // Boss->player, 5.0s cast, single-target + BiscuitMaker = 37706, // Boss->player, 5.0s cast, single-target, tankbuster - BlackCatCrossing1 = 37647, // Boss->self, 6.0s cast, single-target - BlackCatCrossing2 = 37648, // Boss->self, 1.0s cast, single-target - BlackCatCrossing3 = 37649, // Helper->self, 7.0s cast, range 60 45.000-degree cone - BlackCatCrossing4 = 37650, // Helper->self, 7.0s cast, range 60 45.000-degree cone + BlackCatCrossingVisual1 = 37647, // Boss->self, 6.0s cast, single-target + BlackCatCrossingVisual2 = 37648, // Boss->self, 1.0s cast, single-target + BlackCatCrossingFirst = 37649, // Helper->self, 7.0s cast, range 60 45-degree cone + BlackCatCrossingRest = 37650, // Helper->self, 7.0s cast, range 60 45-degree cone - BloodyScratch = 37696, // Boss->self, 5.0s cast, range 60 circle + BloodyScratch = 37696, // Boss->self, 5.0s cast, range 60 circlel, raidwide - Clawful1 = 37692, // Boss->self, 4.0+1.0s cast, single-target - Clawful2 = 37693, // Helper->players, 5.0s cast, range 5 circle + ClawfulVisual = 37692, // Boss->self, 4.0+1.0s cast, single-target + Clawful = 37693, // Helper->players, 5.0s cast, range 5 circle, stack Copycat = 37656, // Boss->self, 3.0s cast, single-target ElevateAndEviscerate = 37655, // Boss/CopyCat->player, 8.0s cast, single-target @@ -34,65 +33,63 @@ public enum AID : uint Impact = 39250, // Helper->self, no cast, range 10 width 10 rect - LeapingBlackCatCrossing1 = 37673, // Boss->self, 7.0s cast, single-target - LeapingBlackCatCrossing2 = 37674, // Boss->self, no cast, single-target - LeapingBlackCatCrossing3 = 37675, // Boss->self, no cast, single-target - LeapingBlackCatCrossing4 = 37676, // Helper->self, 1.0s cast, range 60 45.000-degree cone - LeapingBlackCatCrossing5 = 37677, // Helper->self, 3.0s cast, range 60 45.000-degree cone - LeapingBlackCatCrossing6 = 38928, // Boss->self, 7.0s cast, single-target - - LeapingOneTwoPaw1 = 37663, // Boss->self, 7.0s cast, single-target - LeapingOneTwoPaw2 = 37664, // Boss->self, 7.0s cast, single-target - LeapingOneTwoPaw3 = 37665, // Boss->self, 7.0s cast, single-target - LeapingOneTwoPaw4 = 37666, // Boss->self, 7.0s cast, single-target - LeapingOneTwoPaw5 = 37667, // Boss->self, no cast, single-target - LeapingOneTwoPaw6 = 37668, // Helper->self, 0.8s cast, range 60 180.000-degree cone - LeapingOneTwoPaw7 = 37669, // Helper->self, 2.8s cast, range 60 180.000-degree cone - LeapingOneTwoPaw8 = 37670, // Boss->self, no cast, single-target - LeapingOneTwoPaw9 = 37671, // Helper->self, 2.8s cast, range 60 180.000-degree cone - LeapingOneTwoPaw10 = 37672, // Helper->self, 0.8s cast, range 60 180.000-degree cone - - Mouser1 = 37651, // Boss->self, 9.0s cast, single-target - Mouser2 = 37654, // Helper->location, no cast, single-target - Mouser3 = 38053, // Helper->self, no cast, range 10 width 10 rect - - OneTwoPaw1 = 37641, // Boss->self, 6.0s cast, single-target - OneTwoPaw2 = 37642, // Helper->self, 6.8s cast, range 60 180.000-degree cone - OneTwoPaw3 = 37643, // Helper->self, 9.8s cast, range 60 180.000-degree cone - OneTwoPaw4 = 37644, // Boss->self, 6.0s cast, single-target - OneTwoPaw5 = 37645, // Helper->self, 9.8s cast, range 60 180.000-degree cone - OneTwoPaw6 = 37646, // Helper->self, 6.8s cast, range 60 180.000-degree cone - - Overshadow1 = 37657, // Boss->player, 5.0s cast, single-target - Overshadow2 = 37658, // Boss->players, no cast, range 60 width 5 rect - - PredaceousPounce1 = 37680, // Boss/CopyCat->location, no cast, single-target - PredaceousPounce2 = 37681, // Helper->self, 1.5s cast, range 11 circle - PredaceousPounce3 = 39268, // Helper->location, 1.0s cast, width 6 rect charge - PredaceousPounce4 = 39634, // Boss/CopyCat->location, 13.0s cast, single-target - PredaceousPounce5 = 39702, // Helper->location, 13.5s cast, width 6 rect charge - PredaceousPounce6 = 39703, // Helper->self, 14.0s cast, range 11 circle - - Shockwave1 = 37661, // Boss->self, 6.0+1.0s cast, single-target - Shockwave2 = 37662, // Helper->self, 7.0s cast, range 30 circle - - UnknownAbility = 26708, // Helper->player, no cast, single-target - - UnknownWeaponskill1 = 37652, // Boss->self, no cast, single-target - UnknownWeaponskill2 = 37653, // Helper->self, 1.0s cast, range 10 width 10 rect - UnknownWeaponskill3 = 37682, // Helper->location, 2.0s cast, width 6 rect charge - UnknownWeaponskill4 = 37683, // Helper->self, 3.0s cast, range 11 circle - UnknownWeaponskill5 = 37684, // Helper->location, 4.0s cast, width 6 rect charge - UnknownWeaponskill6 = 37685, // Helper->self, 5.0s cast, range 11 circle - UnknownWeaponskill7 = 37686, // Helper->location, 6.0s cast, width 6 rect charge - UnknownWeaponskill8 = 37687, // Helper->self, 7.0s cast, range 11 circle - UnknownWeaponskill9 = 37688, // Helper->location, 8.0s cast, width 6 rect charge - UnknownWeaponskill10 = 37689, // Helper->self, 9.0s cast, range 11 circle - UnknownWeaponskill11 = 37690, // Helper->location, 10.0s cast, width 6 rect charge - UnknownWeaponskill12 = 37691, // Helper->self, 11.0s cast, range 11 circle - UnknownWeaponskill13 = 39275, // Helper->self, 1.0s cast, range 10 width 10 rect - UnknownWeaponskill14 = 39630, // Helper->location, 12.0s cast, width 6 rect charge - UnknownWeaponskill15 = 39631, // Helper->self, 13.0s cast, range 11 circle + LeapingBlackCatCrossingVisual1 = 37673, // Boss->self, 7.0s cast, single-target, cardinals first + LeapingBlackCatCrossingVisual2 = 38928, // Boss->self, 7.0s cast, single-target, intercardinals first + LeapingBlackCatCrossingVisual3 = 37674, // Boss->self, no cast, single-target + LeapingBlackCatCrossingVisual4 = 37675, // Boss->self, no cast, single-target + LeapingBlackCatCrossingFirst = 37676, // Helper->self, 1.0s cast, range 60 45-degree cone + LeapingBlackCatCrossingRest = 37677, // Helper->self, 3.0s cast, range 60 45-degree cone + + LeapingOneTwoPawVisual1 = 37663, // Boss->self, 7.0s cast, single-target (90 -> -90 degrees) + LeapingOneTwoPawVisual2 = 37664, // Boss->self, 7.0s cast, single-target (-90 -> 90 degrees) + LeapingOneTwoPawVisual3 = 37665, // Boss->self, 7.0s cast, single-target (90 -> -90 degrees) + LeapingOneTwoPawVisual4 = 37666, // Boss->self, 7.0s cast, single-target (-90 -> 90 degrees) + LeapingOneTwoPawVisual5 = 37670, // Boss->self, no cast, single-target + LeapingOneTwoPawVisual6 = 37667, // Boss->self, no cast, single-target + LeapingOneTwoPaw1 = 37668, // Helper->self, 0.8s cast, range 60 180-degree cone + LeapingOneTwoPaw2 = 37669, // Helper->self, 2.8s cast, range 60 180-degree cone + LeapingOneTwoPaw3 = 37671, // Helper->self, 2.8s cast, range 60 180-degree cone + LeapingOneTwoPaw4 = 37672, // Helper->self, 0.8s cast, range 60 180-degree cone + + MouserVisual1 = 37651, // Boss->self, 9.0s cast, single-target + MouserVisual2 = 37654, // Helper->location, no cast, single-target + MouserVisual3 = 37652, // Boss->self, no cast, single-target + MouserTelegraphFirst = 37653, // Helper->self, 1.0s cast, range 10 width 10 rect + MouserTelegraphSecond = 39275, // Helper->self, 1.0s cast, range 10 width 10 rect + Mouser = 38053, // Helper->self, no cast, range 10 width 10 rect + + OneTwoPawVisual1 = 37641, // Boss->self, 6.0s cast, single-target + OneTwoPawVisual2 = 37644, // Boss->self, 6.0s cast, single-target + OneTwoPaw1 = 37642, // Helper->self, 6.8s cast, range 60 180-degree cone + OneTwoPaw2 = 37643, // Helper->self, 9.8s cast, range 60 180-degree cone + OneTwoPaw3 = 37645, // Helper->self, 9.8s cast, range 60 180-degree cone + OneTwoPaw4 = 37646, // Helper->self, 6.8s cast, range 60 180-degree cone + + OvershadowVisual = 37657, // Boss->player, 5.0s cast, single-target + OverShadowMarker = 26708, // Helper->player, no cast, single-target + Overshadow = 37658, // Boss->players, no cast, range 60 width 5 rect, line stack + + PredaceousPounceVisual1 = 39634, // Boss/CopyCat->location, 13.0s cast, single-target + PredaceousPounceVisual2 = 37680, // Boss/CopyCat->location, no cast, single-target + PredaceousPounceTelegraphCharge1 = 37682, // Helper->location, 2.0s cast, width 6 rect charge + PredaceousPounceTelegraphCircle1 = 37683, // Helper->self, 3.0s cast, range 11 circle + PredaceousPounceTelegraphCharge2 = 37684, // Helper->location, 4.0s cast, width 6 rect charge + PredaceousPounceTelegraphCircle2 = 37685, // Helper->self, 5.0s cast, range 11 circle + PredaceousPounceTelegraphCharge3 = 37686, // Helper->location, 6.0s cast, width 6 rect charge + PredaceousPounceTelegraphCircle3 = 37687, // Helper->self, 7.0s cast, range 11 circle + PredaceousPounceTelegraphCharge4 = 37688, // Helper->location, 8.0s cast, width 6 rect charge + PredaceousPounceTelegraphCircle4 = 37689, // Helper->self, 9.0s cast, range 11 circle + PredaceousPounceTelegraphCharge5 = 37690, // Helper->location, 10.0s cast, width 6 rect charge + PredaceousPounceTelegraphCircle5 = 37691, // Helper->self, 11.0s cast, range 11 circle + PredaceousPounceTelegraphCharge6 = 39630, // Helper->location, 12.0s cast, width 6 rect charge + PredaceousPounceTelegraphCircle6 = 39631, // Helper->self, 13.0s cast, range 11 circle + PredaceousPounceCircle1 = 37681, // Helper->self, 1.5s cast, range 11 circle + PredaceousPounceCircle2 = 39703, // Helper->self, 14.0s cast, range 11 circle + PredaceousPounceCharge1 = 39268, // Helper->location, 1.0s cast, width 6 rect charge + PredaceousPounceCharge2 = 39702, // Helper->location, 13.5s cast, width 6 rect charge + + ShockwaveVisual = 37661, // Boss->self, 6.0+1.0s cast, single-target + Shockwave = 37662, // Helper->self, 7.0s cast, range 30 circle, knockback 18, away from source } public enum SID : uint @@ -113,7 +110,7 @@ public enum IconID : uint public enum TetherID : uint { - Tether267 = 267, // Boss/CopyCat->player - Tether268 = 268, // Boss/CopyCat->player + ElevateAndEviscerateGood = 267, // Boss/CopyCat->player + ElevateAndEviscerateBad = 268, // Boss/CopyCat->player Tether12 = 12, // Boss->UnknownActor } diff --git a/BossMod/Modules/Dawntrail/Raid/M1NBIackCat/M1NBIackCatStates.cs b/BossMod/Modules/Dawntrail/Raid/M1NBIackCat/M1NBIackCatStates.cs index 1037660ad8..9d04c72e1f 100644 --- a/BossMod/Modules/Dawntrail/Raid/M1NBIackCat/M1NBIackCatStates.cs +++ b/BossMod/Modules/Dawntrail/Raid/M1NBIackCat/M1NBIackCatStates.cs @@ -5,21 +5,16 @@ class M1NBlackCatStates : StateMachineBuilder public M1NBlackCatStates(BossModule module) : base(module) { TrivialPhase() - .ActivateOnEnter() - .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/Dawntrail/Raid/M1NBIackCat/Mouser.cs b/BossMod/Modules/Dawntrail/Raid/M1NBIackCat/Mouser.cs new file mode 100644 index 0000000000..c9f9970c1a --- /dev/null +++ b/BossMod/Modules/Dawntrail/Raid/M1NBIackCat/Mouser.cs @@ -0,0 +1,35 @@ +namespace BossMod.Dawntrail.Raid.M1NBlackCat; + +class Mouser(BossModule module) : Components.GenericAOEs(module) +{ + private readonly List _aoes = []; + private static readonly AOEShapeRect rect = new(5, 5, 5); + + public override IEnumerable ActiveAOEs(int slot, Actor actor) + { + if (_aoes.Count > 0) + { + var aoeCount = Math.Clamp(_aoes.Count, 0, NumCasts > 2 ? 2 : 3); + for (var i = aoeCount; i < _aoes.Count; i++) + yield return _aoes[i]; + for (var i = 0; i < aoeCount; i++) + yield return _aoes[i] with { Color = ArenaColor.Danger }; + } + } + + public override void OnCastStarted(Actor caster, ActorCastInfo spell) + { + if ((AID)spell.Action.ID is AID.MouserTelegraphFirst or AID.MouserTelegraphSecond) + _aoes.Add(new(rect, caster.Position, spell.Rotation, Module.WorldState.FutureTime(9.7f))); + } + + public override void OnEventCast(Actor caster, ActorCastEvent spell) + { + if (_aoes.Count > 0 && (AID)spell.Action.ID == AID.Mouser) + { + _aoes.RemoveAt(0); + if (++NumCasts == 19) + NumCasts = 0; + } + } +} diff --git a/BossMod/Modules/Dawntrail/Raid/M1NBIackCat/OneTwoPaw.cs b/BossMod/Modules/Dawntrail/Raid/M1NBIackCat/OneTwoPaw.cs new file mode 100644 index 0000000000..3b4ac17e6e --- /dev/null +++ b/BossMod/Modules/Dawntrail/Raid/M1NBIackCat/OneTwoPaw.cs @@ -0,0 +1,69 @@ +namespace BossMod.Dawntrail.Raid.M1NBlackCat; + +class OneTwoPaw(BossModule module) : Components.GenericAOEs(module) +{ + private readonly List _aoes = []; + private enum Pattern { None, WestEast, EastWest } + private Pattern _currentPattern; + private static readonly AOEShapeCone cone = new(60, 90.Degrees()); + private static readonly List angles = [89.999f.Degrees(), -90.004f.Degrees()]; + + public override IEnumerable ActiveAOEs(int slot, Actor actor) + { + if (_aoes.Count > 0) + yield return _aoes[0] with { Color = ArenaColor.Danger }; + if (_aoes.Count > 1) + yield return _aoes[1] with { Risky = false }; + } + + public override void OnActorCreated(Actor actor) + { + if ((OID)actor.OID == OID.LeapingAttacks && _currentPattern != Pattern.None) + { + var angle = _currentPattern == Pattern.EastWest ? angles : angles.AsEnumerable().Reverse().ToList(); + _aoes.Add(new(cone, actor.Position, angle[0], Module.WorldState.FutureTime(8.7f))); + _aoes.Add(new(cone, actor.Position, angle[1], Module.WorldState.FutureTime(10.7f))); + _currentPattern = Pattern.None; + } + } + + public override void OnCastStarted(Actor caster, ActorCastInfo spell) + { + switch ((AID)spell.Action.ID) + { + case AID.OneTwoPaw1: + case AID.OneTwoPaw2: + case AID.OneTwoPaw3: + case AID.OneTwoPaw4: + _aoes.Add(new(cone, caster.Position, spell.Rotation, spell.NPCFinishAt)); + _aoes.SortBy(x => x.Activation); + break; + case AID.LeapingOneTwoPawVisual1: + case AID.LeapingOneTwoPawVisual3: + _currentPattern = Pattern.EastWest; + break; + case AID.LeapingOneTwoPawVisual2: + case AID.LeapingOneTwoPawVisual4: + _currentPattern = Pattern.WestEast; + break; + } + } + + public override void OnCastFinished(Actor caster, ActorCastInfo spell) + { + if (_aoes.Count > 0) + switch ((AID)spell.Action.ID) + { + case AID.OneTwoPaw1: + case AID.OneTwoPaw2: + case AID.OneTwoPaw3: + case AID.OneTwoPaw4: + case AID.LeapingOneTwoPaw1: + case AID.LeapingOneTwoPaw2: + case AID.LeapingOneTwoPaw3: + case AID.LeapingOneTwoPaw4: + _aoes.RemoveAt(0); + break; + } + } +} diff --git a/BossMod/Modules/Dawntrail/Raid/M1NBIackCat/PredaceousPounce.cs b/BossMod/Modules/Dawntrail/Raid/M1NBIackCat/PredaceousPounce.cs new file mode 100644 index 0000000000..9840316963 --- /dev/null +++ b/BossMod/Modules/Dawntrail/Raid/M1NBIackCat/PredaceousPounce.cs @@ -0,0 +1,70 @@ +namespace BossMod.Dawntrail.Raid.M1NBlackCat; + +class PredaceousPounce(BossModule module) : Components.GenericAOEs(module) +{ + private static readonly AOEShapeCircle circle = new(11); + private bool sorted; + private readonly List _aoes = []; + + public override IEnumerable ActiveAOEs(int slot, Actor actor) + { + if (_aoes.Count > 0) + { + var aoeCount = Math.Clamp(_aoes.Count, 0, 2); + for (var i = aoeCount; i < _aoes.Count; i++) + yield return _aoes[i]; + for (var i = 0; i < aoeCount; i++) + yield return _aoes[i] with { Color = ArenaColor.Danger }; + } + } + + public override void OnCastStarted(Actor caster, ActorCastInfo spell) + { + switch ((AID)spell.Action.ID) + { + case AID.PredaceousPounceTelegraphCharge1: + case AID.PredaceousPounceTelegraphCharge2: + case AID.PredaceousPounceTelegraphCharge3: + case AID.PredaceousPounceTelegraphCharge4: + case AID.PredaceousPounceTelegraphCharge5: + case AID.PredaceousPounceTelegraphCharge6: + var dir = spell.LocXZ - caster.Position; + _aoes.Add(new(new AOEShapeRect(dir.Length(), 3), caster.Position, Angle.FromDirection(dir), spell.NPCFinishAt)); + break; + case AID.PredaceousPounceTelegraphCircle1: + case AID.PredaceousPounceTelegraphCircle2: + case AID.PredaceousPounceTelegraphCircle3: + case AID.PredaceousPounceTelegraphCircle4: + case AID.PredaceousPounceTelegraphCircle5: + case AID.PredaceousPounceTelegraphCircle6: + _aoes.Add(new(circle, caster.Position, default, spell.NPCFinishAt)); + break; + } + if (_aoes.Count == 12 && !sorted) + { + _aoes.SortBy(x => x.Activation); + for (var i = 0; i < _aoes.Count; i++) + { + var aoe = _aoes[i]; + aoe.Activation = Module.WorldState.FutureTime(13.5f + i * 0.5f); + _aoes[i] = aoe; + } + sorted = true; + } + } + + public override void OnCastFinished(Actor caster, ActorCastInfo spell) + { + if (_aoes.Count > 0) + switch ((AID)spell.Action.ID) + { + case AID.PredaceousPounceCharge1: + case AID.PredaceousPounceCharge2: + case AID.PredaceousPounceCircle1: + case AID.PredaceousPounceCircle2: + _aoes.RemoveAt(0); + sorted = false; + break; + } + } +} diff --git a/BossMod/Modules/Dawntrail/Raid/M2NHoneyB/M2NHoneyB.cs b/BossMod/Modules/Dawntrail/Raid/M2NHoneyB/M2NHoneyB.cs index a896b3f544..acf65a3088 100644 --- a/BossMod/Modules/Dawntrail/Raid/M2NHoneyB/M2NHoneyB.cs +++ b/BossMod/Modules/Dawntrail/Raid/M2NHoneyB/M2NHoneyB.cs @@ -32,4 +32,4 @@ class HeartStruck2(BossModule module) : Components.LocationTargetedAOEs(module, class HeartStruck3(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.HeartStruck3), 10); [ModuleInfo(BossModuleInfo.Maturity.WIP, Contributors = "The Combat Reborn Team", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 987, NameID = 12685)] -public class M2NHoneyB(WorldState ws, Actor primary) : BossModule(ws, primary, new(100, 100), new ArenaBoundsSquare(20)); +public class M2NHoneyB(WorldState ws, Actor primary) : BossModule(ws, primary, new(100, 100), new ArenaBoundsCircle(20)); diff --git a/BossMod/Modules/Dawntrail/Raid/M3NBruteBomber/M3NBruteBomber.cs b/BossMod/Modules/Dawntrail/Raid/M3NBruteBomber/M3NBruteBomber.cs index c1c34c0f20..60f9bfcd86 100644 --- a/BossMod/Modules/Dawntrail/Raid/M3NBruteBomber/M3NBruteBomber.cs +++ b/BossMod/Modules/Dawntrail/Raid/M3NBruteBomber/M3NBruteBomber.cs @@ -76,4 +76,4 @@ public override void OnCastFinished(Actor caster, ActorCastInfo spell) class BrutalBurn2(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.BrutalBurn2), 6, 8); [ModuleInfo(BossModuleInfo.Maturity.WIP, Contributors = "The Combat Reborn Team", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 989, NameID = 13356)] -public class M3NBruteBomber(WorldState ws, Actor primary) : BossModule(ws, primary, new(100, 100), new ArenaBoundsSquare(20)); +public class M3NBruteBomber(WorldState ws, Actor primary) : BossModule(ws, primary, new(100, 100), new ArenaBoundsSquare(15)); diff --git a/BossMod/Replay/Visualization/ReplayDetailsWindow.cs b/BossMod/Replay/Visualization/ReplayDetailsWindow.cs index 6e874e1c26..4db717bd11 100644 --- a/BossMod/Replay/Visualization/ReplayDetailsWindow.cs +++ b/BossMod/Replay/Visualization/ReplayDetailsWindow.cs @@ -15,7 +15,7 @@ class ReplayDetailsWindow : UIWindow private DateTime _prevFrame; private float _playSpeed; private float _azimuth; - private bool _azimuthOverride; + private bool _azimuthOverride = true; private int _povSlot = PartyState.PlayerSlot; private readonly ConfigUI _config; private bool _showConfig;