From 3390ed2af8d66a687e2fc76c93ed9e35b18b1e50 Mon Sep 17 00:00:00 2001 From: CarnifexOptimus <156172553+CarnifexOptimus@users.noreply.github.com> Date: Sun, 16 Feb 2025 22:21:19 +0100 Subject: [PATCH 1/2] update PotD arena bounds --- .../DD100NybethObdilord.cs | 13 +++++- .../DD10PalaceDeathgaze.cs | 9 ++-- .../{PalaceOfTheDead => }/DD110Alicanto.cs | 2 +- .../{PalaceOfTheDead => }/DD120Kirtimukha.cs | 4 +- .../{PalaceOfTheDead => }/DD130Alfard.cs | 4 +- .../{PalaceOfTheDead => }/DD140AhPuch.cs | 2 +- .../{PalaceOfTheDead => }/DD150Tisiphone.cs | 6 +-- .../{PalaceOfTheDead => }/DD160Todesritter.cs | 16 +++---- .../{PalaceOfTheDead => }/DD170Yulunggu.cs | 7 ++-- .../DD180Dendainsonne.cs | 6 +-- .../DD190TheGodfather.cs | 18 ++++---- .../{PalaceOfTheDead => }/DD20Spurge.cs | 6 +-- .../{PalaceOfTheDead => }/DD30Ningishzida.cs | 18 ++++++-- .../{PalaceOfTheDead => }/DD40Ixtab.cs | 5 ++- .../DD50EddaBlackbosom.cs | 13 +++--- .../DD60TheBlackRider.cs | 17 ++++---- .../{PalaceOfTheDead => }/DD70Yaquaru.cs | 15 ++++--- .../{PalaceOfTheDead => }/DD80Gudanna.cs | 2 +- .../{PalaceOfTheDead => }/DD90TheGodmother.cs | 10 ++--- .../PalaceFloorModule.cs | 0 .../Heavensward/DeepDungeon/SharedBounds.cs | 42 +++++++++++++++++++ 21 files changed, 142 insertions(+), 73 deletions(-) rename BossMod/Modules/Heavensward/DeepDungeon/{PalaceOfTheDead => }/DD100NybethObdilord.cs (72%) rename BossMod/Modules/Heavensward/DeepDungeon/{PalaceOfTheDead => }/DD10PalaceDeathgaze.cs (83%) rename BossMod/Modules/Heavensward/DeepDungeon/{PalaceOfTheDead => }/DD110Alicanto.cs (94%) rename BossMod/Modules/Heavensward/DeepDungeon/{PalaceOfTheDead => }/DD120Kirtimukha.cs (95%) rename BossMod/Modules/Heavensward/DeepDungeon/{PalaceOfTheDead => }/DD130Alfard.cs (94%) rename BossMod/Modules/Heavensward/DeepDungeon/{PalaceOfTheDead => }/DD140AhPuch.cs (96%) rename BossMod/Modules/Heavensward/DeepDungeon/{PalaceOfTheDead => }/DD150Tisiphone.cs (97%) rename BossMod/Modules/Heavensward/DeepDungeon/{PalaceOfTheDead => }/DD160Todesritter.cs (89%) rename BossMod/Modules/Heavensward/DeepDungeon/{PalaceOfTheDead => }/DD170Yulunggu.cs (91%) rename BossMod/Modules/Heavensward/DeepDungeon/{PalaceOfTheDead => }/DD180Dendainsonne.cs (96%) rename BossMod/Modules/Heavensward/DeepDungeon/{PalaceOfTheDead => }/DD190TheGodfather.cs (82%) rename BossMod/Modules/Heavensward/DeepDungeon/{PalaceOfTheDead => }/DD20Spurge.cs (94%) rename BossMod/Modules/Heavensward/DeepDungeon/{PalaceOfTheDead => }/DD30Ningishzida.cs (73%) rename BossMod/Modules/Heavensward/DeepDungeon/{PalaceOfTheDead => }/DD40Ixtab.cs (93%) rename BossMod/Modules/Heavensward/DeepDungeon/{PalaceOfTheDead => }/DD50EddaBlackbosom.cs (81%) rename BossMod/Modules/Heavensward/DeepDungeon/{PalaceOfTheDead => }/DD60TheBlackRider.cs (90%) rename BossMod/Modules/Heavensward/DeepDungeon/{PalaceOfTheDead => }/DD70Yaquaru.cs (87%) rename BossMod/Modules/Heavensward/DeepDungeon/{PalaceOfTheDead => }/DD80Gudanna.cs (98%) rename BossMod/Modules/Heavensward/DeepDungeon/{PalaceOfTheDead => }/DD90TheGodmother.cs (93%) rename BossMod/Modules/Heavensward/DeepDungeon/{PalaceOfTheDead => }/PalaceFloorModule.cs (100%) create mode 100644 BossMod/Modules/Heavensward/DeepDungeon/SharedBounds.cs diff --git a/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/DD100NybethObdilord.cs b/BossMod/Modules/Heavensward/DeepDungeon/DD100NybethObdilord.cs similarity index 72% rename from BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/DD100NybethObdilord.cs rename to BossMod/Modules/Heavensward/DeepDungeon/DD100NybethObdilord.cs index c250288b2..a695bf0d8 100644 --- a/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/DD100NybethObdilord.cs +++ b/BossMod/Modules/Heavensward/DeepDungeon/DD100NybethObdilord.cs @@ -55,8 +55,19 @@ public DD100NybethObdilordStates(BossModule module) : base(module) [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "LegendofIceman", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 208, NameID = 5356)] public class DD100NybethObdilord : BossModule { - public DD100NybethObdilord(WorldState ws, Actor primary) : base(ws, primary, new(300f, 300f), new ArenaBoundsCircle(24f)) + public DD100NybethObdilord(WorldState ws, Actor primary) : base(ws, primary, arena.Center, arena) { ActivateComponent(); } + + private static readonly WPos[] vertices = [new(302.11f, 276.34f), new(307.39f, 276.36f), new(308.04f, 276.58f), new(309.51f, 278.03f), new(310.04f, 278.17f), + new(311.94f, 278.24f), new(312.52f, 278.61f), new(321.65f, 287.79f), new(321.81f, 288.44f), new(321.9f, 290.34f), + new(324.01f, 292.58f), new(324.28f, 293.17f), new(324.29f, 306.71f), new(324.08f, 307.35f), new(321.86f, 309.64f), + new(321.77f, 312.15f), new(312.3f, 321.62f), new(311.60f, 321.80f), new(309.56f, 321.92f), new(307.32f, 324.12f), + new(306.66f, 324.29f), new(300.1f, 324.22f), new(293.11f, 324.29f), new(292.52f, 323.96f), new(290.57f, 322.02f), + new(290.01f, 321.88f), new(288.08f, 321.81f), new(287.52f, 321.42f), new(278.22f, 312.13f), new(278.14f, 310.01f), + new(278f, 309.45f), new(275.71f, 307.13f), new(275.73f, 293.36f), new(275.86f, 292.68f), new(277.75f, 290.77f), + new(278.12f, 290.27f), new(278.20f, 288.37f), new(278.33f, 287.73f), new(287.51f, 278.59f), new(288.05f, 278.21f), + new(290.12f, 278.13f), new(290.61f, 277.91f), new(291.97f, 276.56f), new(302.11f, 276.34f)]; + private static readonly ArenaBoundsComplex arena = new([new PolygonCustom(vertices)]); } diff --git a/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/DD10PalaceDeathgaze.cs b/BossMod/Modules/Heavensward/DeepDungeon/DD10PalaceDeathgaze.cs similarity index 83% rename from BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/DD10PalaceDeathgaze.cs rename to BossMod/Modules/Heavensward/DeepDungeon/DD10PalaceDeathgaze.cs index 297512ce0..fb41c108b 100644 --- a/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/DD10PalaceDeathgaze.cs +++ b/BossMod/Modules/Heavensward/DeepDungeon/DD10PalaceDeathgaze.cs @@ -2,7 +2,7 @@ namespace BossMod.Heavensward.DeepDungeon.PalaceOfTheDead.DD10PalaceDeathgaze; public enum OID : uint { - Boss = 0x1692, // R6.000, x1 + Boss = 0x1692 // R6.0 } public enum AID : uint @@ -13,7 +13,7 @@ public enum AID : uint Bombination = 6418, // Boss->self, 3.0s cast, range 6+R circle Lumisphere = 6419, // Boss->location, 3.0s cast, range 6 circle Stormwind = 6417, // Boss->self, 3.0s cast, range 12+R 90-degree cone - Whipcrack = 6416, // Boss->player, no cast, single-target + Whipcrack = 6416 // Boss->player, no cast, single-target } class AeroBlast(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.AeroBlast)); @@ -34,4 +34,7 @@ public DD10PalaceDeathgazeStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "LegendofIceman", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 174, NameID = 4986)] -public class DD10PalaceDeathgaze(WorldState ws, Actor primary) : BossModule(ws, primary, new(-300f, -220f), new ArenaBoundsCircle(24f)); +public class DD10PalaceDeathgaze(WorldState ws, Actor primary) : BossModule(ws, primary, arena.Center, arena) +{ + private static readonly ArenaBoundsComplex arena = new([new Polygon(new(-300f, -220f), 24.65f, 48)], [new Rectangle(new(-300f, -245f), 20f, 1.25f)]); +} diff --git a/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/DD110Alicanto.cs b/BossMod/Modules/Heavensward/DeepDungeon/DD110Alicanto.cs similarity index 94% rename from BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/DD110Alicanto.cs rename to BossMod/Modules/Heavensward/DeepDungeon/DD110Alicanto.cs index 79793f253..30fa33967 100644 --- a/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/DD110Alicanto.cs +++ b/BossMod/Modules/Heavensward/DeepDungeon/DD110Alicanto.cs @@ -34,4 +34,4 @@ public DD110AlicantoStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "LegendofIceman", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 209, NameID = 5371)] -public class DD110Alicanto(WorldState ws, Actor primary) : BossModule(ws, primary, new(-300f, -235f), new ArenaBoundsCircle(24f)); +public class DD110Alicanto(WorldState ws, Actor primary) : BossModule(ws, primary, SharedBounds.ArenaBounds2090110.Center, SharedBounds.ArenaBounds2090110); diff --git a/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/DD120Kirtimukha.cs b/BossMod/Modules/Heavensward/DeepDungeon/DD120Kirtimukha.cs similarity index 95% rename from BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/DD120Kirtimukha.cs rename to BossMod/Modules/Heavensward/DeepDungeon/DD120Kirtimukha.cs index 304f19202..9468a817e 100644 --- a/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/DD120Kirtimukha.cs +++ b/BossMod/Modules/Heavensward/DeepDungeon/DD120Kirtimukha.cs @@ -43,7 +43,7 @@ public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignme } class BloodyCaress(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.BloodyCaress), new AOEShapeCone(11.6f, 60f.Degrees()), activeWhileCasting: false); class FinalSting(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.FinalSting), "Final sting is being cast! \nKill the add or take 98% of your hp!"); -class GoldDust(BossModule module) : Components.SimpleAOEs(module, ActionID.MakeSpell(AID.GoldDust), 8); +class GoldDust(BossModule module) : Components.SimpleAOEs(module, ActionID.MakeSpell(AID.GoldDust), 8f); class Leafstorm(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.Leafstorm)); class RottenStench(BossModule module) : Components.SimpleAOEs(module, ActionID.MakeSpell(AID.RottenStench), new AOEShapeRect(48.6f, 6f)); @@ -63,4 +63,4 @@ public DD120KirtimukhaStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "LegendofIceman", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 210, NameID = 5384)] -public class DD120Kirtimukha(WorldState ws, Actor primary) : BossModule(ws, primary, new(-300f, -235f), new ArenaBoundsCircle(24f)); +public class DD120Kirtimukha(WorldState ws, Actor primary) : BossModule(ws, primary, SharedBounds.ArenaBounds120130.Center, SharedBounds.ArenaBounds120130); diff --git a/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/DD130Alfard.cs b/BossMod/Modules/Heavensward/DeepDungeon/DD130Alfard.cs similarity index 94% rename from BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/DD130Alfard.cs rename to BossMod/Modules/Heavensward/DeepDungeon/DD130Alfard.cs index b305e76d7..18a594590 100644 --- a/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/DD130Alfard.cs +++ b/BossMod/Modules/Heavensward/DeepDungeon/DD130Alfard.cs @@ -19,7 +19,7 @@ public enum AID : uint class Dissever(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.Dissever), new AOEShapeCone(10.8f, 45f.Degrees()), activeWhileCasting: false); -abstract class Voidzones(BossModule module, AID aid, uint oid) : Components.PersistentVoidzoneAtCastTarget(module, 6, ActionID.MakeSpell(aid), m => GetVoidzones(m, oid), 2.1f) +abstract class Voidzones(BossModule module, AID aid, uint oid) : Components.PersistentVoidzoneAtCastTarget(module, 6f, ActionID.MakeSpell(aid), m => GetVoidzones(m, oid), 2.1f) { private static Actor[] GetVoidzones(BossModule module, uint oid) { @@ -92,4 +92,4 @@ public DD130AlfardStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "LegendofIceman", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 211, NameID = 5397)] -public class DD130Alfard(WorldState ws, Actor primary) : BossModule(ws, primary, new(-300f, -237f), new ArenaBoundsCircle(24f)); +public class DD130Alfard(WorldState ws, Actor primary) : BossModule(ws, primary, SharedBounds.ArenaBounds120130.Center, SharedBounds.ArenaBounds120130); diff --git a/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/DD140AhPuch.cs b/BossMod/Modules/Heavensward/DeepDungeon/DD140AhPuch.cs similarity index 96% rename from BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/DD140AhPuch.cs rename to BossMod/Modules/Heavensward/DeepDungeon/DD140AhPuch.cs index b6ce6799e..6e8b8b3f1 100644 --- a/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/DD140AhPuch.cs +++ b/BossMod/Modules/Heavensward/DeepDungeon/DD140AhPuch.cs @@ -62,4 +62,4 @@ public DD140AhPuchStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "LegendofIceman", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 212, NameID = 5410)] -public class DD140AhPuch(WorldState ws, Actor primary) : BossModule(ws, primary, new(-300f, -237f), new ArenaBoundsCircle(24f)); +public class DD140AhPuch(WorldState ws, Actor primary) : BossModule(ws, primary, SharedBounds.ArenaBounds140150.Center, SharedBounds.ArenaBounds140150); diff --git a/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/DD150Tisiphone.cs b/BossMod/Modules/Heavensward/DeepDungeon/DD150Tisiphone.cs similarity index 97% rename from BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/DD150Tisiphone.cs rename to BossMod/Modules/Heavensward/DeepDungeon/DD150Tisiphone.cs index 56c9ea1c4..b9f02f9b5 100644 --- a/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/DD150Tisiphone.cs +++ b/BossMod/Modules/Heavensward/DeepDungeon/DD150Tisiphone.cs @@ -40,8 +40,8 @@ public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignme for (var i = 0; i < count; ++i) { var zombie = zombies[i]; - hints.AddForbiddenZone(ShapeDistance.Circle(zombie.Position, 3)); - hints.AddForbiddenZone(ShapeDistance.Circle(zombie.Position, 8), WorldState.FutureTime(5d)); + hints.AddForbiddenZone(ShapeDistance.Circle(zombie.Position, 3f)); + hints.AddForbiddenZone(ShapeDistance.Circle(zombie.Position, 8f), WorldState.FutureTime(5d)); } } else @@ -92,7 +92,7 @@ public DD150TisiphoneStates(BossModule module) : base(module) [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "LegendofIceman", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 213, NameID = 5424)] public class DD150Tisiphone : BossModule { - public DD150Tisiphone(WorldState ws, Actor primary) : base(ws, primary, new(-300f, -237.17f), new ArenaBoundsCircle(24f)) + public DD150Tisiphone(WorldState ws, Actor primary) : base(ws, primary, SharedBounds.ArenaBounds140150.Center, SharedBounds.ArenaBounds140150) { ActivateComponent(); } diff --git a/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/DD160Todesritter.cs b/BossMod/Modules/Heavensward/DeepDungeon/DD160Todesritter.cs similarity index 89% rename from BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/DD160Todesritter.cs rename to BossMod/Modules/Heavensward/DeepDungeon/DD160Todesritter.cs index 3e9c6cec7..a1c49a9ad 100644 --- a/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/DD160Todesritter.cs +++ b/BossMod/Modules/Heavensward/DeepDungeon/DD160Todesritter.cs @@ -17,8 +17,8 @@ public enum AID : uint Valfodr = 7156, // Boss->player, 4.0s cast, width 6 rect charge + kb } -class CleaveAuto(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.AutoAttack), new AOEShapeCone(11.92f, 45.Degrees()), activeWhileCasting: false); -class HallOfSorrow(BossModule module) : Components.PersistentVoidzoneAtCastTarget(module, 9, ActionID.MakeSpell(AID.HallOfSorrow), GetVoidzones, 1.3f) +class CleaveAuto(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.AutoAttack), new AOEShapeCone(11.92f, 45f.Degrees()), activeWhileCasting: false); +class HallOfSorrow(BossModule module) : Components.PersistentVoidzoneAtCastTarget(module, 9f, ActionID.MakeSpell(AID.HallOfSorrow), GetVoidzones, 1.3f) { private static Actor[] GetVoidzones(BossModule module) { @@ -39,8 +39,8 @@ private static Actor[] GetVoidzones(BossModule module) } } -class Infatuation(BossModule module) : Components.SimpleAOEs(module, ActionID.MakeSpell(AID.Infatuation), 7); -class Valfodr(BossModule module) : Components.BaitAwayChargeCast(module, ActionID.MakeSpell(AID.Valfodr), 3); +class Infatuation(BossModule module) : Components.SimpleAOEs(module, ActionID.MakeSpell(AID.Infatuation), 7f); +class Valfodr(BossModule module) : Components.BaitAwayChargeCast(module, ActionID.MakeSpell(AID.Valfodr), 3f); class ValfodrKB(BossModule module) : Components.Knockback(module, ActionID.MakeSpell(AID.Valfodr), stopAtWall: true) // note actual knockback is delayed by upto 1.2s in replay { private int _target; @@ -80,11 +80,11 @@ public override void OnCastFinished(Actor caster, ActorCastInfo spell) return null; var forbidden = new Func[count]; for (var i = 0; i < count; ++i) - forbidden[i] = ShapeDistance.Circle(_aoe.Casters[i].Origin, 7); + forbidden[i] = ShapeDistance.Circle(_aoe.Casters[i].Origin, 7f); return ShapeDistance.Union(forbidden); } - public override bool DestinationUnsafe(int slot, Actor actor, WPos pos) => GetFireballZone() is var z && z != null && z(pos) < 0; + public override bool DestinationUnsafe(int slot, Actor actor, WPos pos) => GetFireballZone() is var z && z != null && z(pos) < 0f; public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { @@ -100,7 +100,7 @@ public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignme hints.AddForbiddenZone(p => { var dir = (p - kbSource).Normalized(); - var proj = Arena.ClampToBounds(p + dir * 25); + var proj = Arena.ClampToBounds(p + dir * 25f); return dangerZone(proj); }, _source.Value.Activation); } @@ -120,4 +120,4 @@ public DD160TodesritterStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "LegendofIceman", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 214, NameID = 5438)] -public class DD160Todesritter(WorldState ws, Actor primary) : BossModule(ws, primary, new(-300f, -300f), new ArenaBoundsCircle(25f)); +public class DD160Todesritter(WorldState ws, Actor primary) : BossModule(ws, primary, SharedBounds.ArenaBounds160170180190.Center, SharedBounds.ArenaBounds160170180190); diff --git a/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/DD170Yulunggu.cs b/BossMod/Modules/Heavensward/DeepDungeon/DD170Yulunggu.cs similarity index 91% rename from BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/DD170Yulunggu.cs rename to BossMod/Modules/Heavensward/DeepDungeon/DD170Yulunggu.cs index 06754b8ea..382631494 100644 --- a/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/DD170Yulunggu.cs +++ b/BossMod/Modules/Heavensward/DeepDungeon/DD170Yulunggu.cs @@ -16,7 +16,7 @@ public enum AID : uint FangsEnd = 7159 // Boss->player, no cast, single-target } -class Douse(BossModule module) : Components.PersistentVoidzoneAtCastTarget(module, 8, ActionID.MakeSpell(AID.Douse), GetVoidzones, 0.8f) +class Douse(BossModule module) : Components.PersistentVoidzoneAtCastTarget(module, 8f, ActionID.MakeSpell(AID.Douse), GetVoidzones, 0.8f) { public static Actor[] GetVoidzones(BossModule module) { @@ -73,7 +73,7 @@ public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignme { var effPuddleSize = 8 + Module.PrimaryActor.HitboxRadius; var tankDist = hints.FindEnemy(Module.PrimaryActor)?.TankDistance ?? 2; - // yaquaru tank distance seems to be around 2-2.5y, but from testing, 3y minimum is needed to move it out of the puddle, either because of rasterization shenanigans or netcode + // yulunggu tank distance seems to be around 2-2.5y, but from testing, 3y minimum is needed to move it out of the puddle, either because of rasterization shenanigans or netcode var effTankDist = Module.PrimaryActor.HitboxRadius + tankDist + 1; var len = puddles.Length; @@ -87,7 +87,6 @@ public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignme } class Drench(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.Drench), new AOEShapeCone(15.75f, 45f.Degrees()), activeWhileCasting: false); - class Electrogenesis(BossModule module) : Components.SimpleAOEs(module, ActionID.MakeSpell(AID.Electrogenesis), 8f); class DD170YulungguStates : StateMachineBuilder @@ -103,4 +102,4 @@ public DD170YulungguStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "LegendofIceman", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 215, NameID = 5449)] -public class DD170Yulunggu(WorldState ws, Actor primary) : BossModule(ws, primary, new(-300f, -300f), new ArenaBoundsCircle(25f)); +public class DD170Yulunggu(WorldState ws, Actor primary) : BossModule(ws, primary, SharedBounds.ArenaBounds160170180190.Center, SharedBounds.ArenaBounds160170180190); diff --git a/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/DD180Dendainsonne.cs b/BossMod/Modules/Heavensward/DeepDungeon/DD180Dendainsonne.cs similarity index 96% rename from BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/DD180Dendainsonne.cs rename to BossMod/Modules/Heavensward/DeepDungeon/DD180Dendainsonne.cs index c11860846..bfaeb4ee5 100644 --- a/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/DD180Dendainsonne.cs +++ b/BossMod/Modules/Heavensward/DeepDungeon/DD180Dendainsonne.cs @@ -38,9 +38,9 @@ public EncounterHints(BossModule module) : base(module) public override void OnEventCast(Actor caster, ActorCastEvent spell) { - if ((AID)spell.Action.ID is AID.CharybdisCast or AID.Trounce or AID.Thunderbolt) + if (spell.Action.ID is (uint)AID.CharybdisCast or (uint)AID.Trounce or (uint)AID.Thunderbolt) ++NumCast; - else if ((AID)spell.Action.ID is AID.EclipticMeteor) + else if (spell.Action.ID == (uint)AID.EclipticMeteor) NumCast = 11; if (NumCast == 10) @@ -153,7 +153,7 @@ private Action StateCommon(string name, float duration = 10000f) [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "LegendofIceman", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 216, NameID = 5461, PlanLevel = 60)] public class DD180Dendainsonne : BossModule { - public DD180Dendainsonne(WorldState ws, Actor primary) : base(ws, primary, new(-300f, -300f), new ArenaBoundsCircle(25f)) + public DD180Dendainsonne(WorldState ws, Actor primary) : base(ws, primary, SharedBounds.ArenaBounds160170180190.Center, SharedBounds.ArenaBounds160170180190) { ActivateComponent(); } diff --git a/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/DD190TheGodfather.cs b/BossMod/Modules/Heavensward/DeepDungeon/DD190TheGodfather.cs similarity index 82% rename from BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/DD190TheGodfather.cs rename to BossMod/Modules/Heavensward/DeepDungeon/DD190TheGodfather.cs index 039bfc02e..394ce4f98 100644 --- a/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/DD190TheGodfather.cs +++ b/BossMod/Modules/Heavensward/DeepDungeon/DD190TheGodfather.cs @@ -3,9 +3,9 @@ public enum OID : uint { Boss = 0x1820, // R3.750, x1 - GiddyBomb = 0x18F3, // R0.600, x0 (spawn during fight), small bombs that are untargetable, multiple spawn up and explode at once - LavaBomb = 0x18F2, // R1.200, x0 (spawn during fight), (also known as greybomb) cast a pbaoe that stuns needs to be on top of the boss's hitbox to stun - RemedyBomb = 0x18F1 // R1.200, x0 (spawn during fight), cast a roomwide aoe that will hit for 80% of max hp + inflicts a dot + GiddyBomb = 0x18F3, // R0.6, small bombs that are untargetable, multiple spawn up and explode at once + LavaBomb = 0x18F2, // R1.2, (also known as greybomb) cast a pbaoe that stuns needs to be on top of the boss's hitbox to stun + RemedyBomb = 0x18F1 // R1.2, cast a roomwide aoe that will hit for 80% of max hp + inflicts a dot } public enum AID : uint @@ -33,7 +33,7 @@ public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignme hints.SetPriority(g, AIHints.Enemy.PriorityForbidden); } } -class Sap(BossModule module) : Components.SimpleAOEs(module, ActionID.MakeSpell(AID.Sap), 8); +class Sap(BossModule module) : Components.SimpleAOEs(module, ActionID.MakeSpell(AID.Sap), 8f); class ScaldingScoldingCleave(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.ScaldingScolding), new AOEShapeCone(11.75f, 45f.Degrees()), activeWhileCasting: false); class RemedyBombEnrage(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.HypothermalCombustionRemedyBomb), "Remedy bomb is enraging!", true); class MassiveBurstEnrage(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID.MassiveBurst), "Enrage! Stun boss with the Lavabomb!", true); @@ -41,19 +41,19 @@ class MassiveBurstEnrage(BossModule module) : Components.CastHint(module, Action class HypothermalMinion(BossModule module) : Components.GenericAOEs(module) { private readonly List _aoes = []; - private static readonly AOEShapeCircle Circle = new(6.6f); + private static readonly AOEShapeCircle circle = new(6.6f); public override IEnumerable ActiveAOEs(int slot, Actor actor) => _aoes; public override void OnActorCreated(Actor actor) { - if ((OID)actor.OID == OID.GiddyBomb) - _aoes.Add(new(Circle, actor.Position, default, WorldState.FutureTime(10))); + if (actor.OID == (uint)OID.GiddyBomb) + _aoes.Add(new(circle, WPos.ClampToGrid(actor.Position), default, WorldState.FutureTime(10d))); } public override void OnCastFinished(Actor caster, ActorCastInfo spell) { - if ((AID)spell.Action.ID == AID.HypothermalCombustionMinionCast) + if (spell.Action.ID == (uint)AID.HypothermalCombustionMinionCast) _aoes.Clear(); } } @@ -74,4 +74,4 @@ public DD190TheGodfatherStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "LegendofIceman", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 217, NameID = 5471)] -public class DD190TheGodfather(WorldState ws, Actor primary) : BossModule(ws, primary, new(-300, -300), new ArenaBoundsCircle(25)); +public class DD190TheGodfather(WorldState ws, Actor primary) : BossModule(ws, primary, SharedBounds.ArenaBounds160170180190.Center, SharedBounds.ArenaBounds160170180190); diff --git a/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/DD20Spurge.cs b/BossMod/Modules/Heavensward/DeepDungeon/DD20Spurge.cs similarity index 94% rename from BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/DD20Spurge.cs rename to BossMod/Modules/Heavensward/DeepDungeon/DD20Spurge.cs index 147f09e58..56c850f78 100644 --- a/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/DD20Spurge.cs +++ b/BossMod/Modules/Heavensward/DeepDungeon/DD20Spurge.cs @@ -2,8 +2,8 @@ namespace BossMod.Heavensward.DeepDungeon.PalaceOfTheDead.DD20Spurge; public enum OID : uint { - Boss = 0x169F, // R3.600, x1 - PalaceHornet = 0x1763 // R0.400, x0 (spawn during fight) + Boss = 0x169F, // R3.6 + PalaceHornet = 0x1763 // R0.4 } public enum AID : uint @@ -60,4 +60,4 @@ public DD20SpurgeStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "LegendofIceman", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 175, NameID = 4999)] -public class DD20Spurge(WorldState ws, Actor primary) : BossModule(ws, primary, new(-300f, -235f), new ArenaBoundsCircle(24f)); +public class DD20Spurge(WorldState ws, Actor primary) : BossModule(ws, primary, SharedBounds.ArenaBounds2090110.Center, SharedBounds.ArenaBounds2090110); diff --git a/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/DD30Ningishzida.cs b/BossMod/Modules/Heavensward/DeepDungeon/DD30Ningishzida.cs similarity index 73% rename from BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/DD30Ningishzida.cs rename to BossMod/Modules/Heavensward/DeepDungeon/DD30Ningishzida.cs index 6969102ad..0a25ba835 100644 --- a/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/DD30Ningishzida.cs +++ b/BossMod/Modules/Heavensward/DeepDungeon/DD30Ningishzida.cs @@ -65,16 +65,16 @@ public override void AddGlobalHints(GlobalHints hints) { if (NumCasts < 4) hints.Add($"Bait the boss away from the middle of the arena. \n{Module.PrimaryActor.Name} will cast x2 Fire Puddles & x2 Ice Puddles. \nAfter the 4th puddle is dropped, run to the middle."); - if (NumCasts >= 4) + else if (NumCasts >= 4) hints.Add($"Run to the middle of the arena! \n{Module.PrimaryActor.Name} is about to cast a donut AOE!"); } public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { if (NumCasts < 4) - hints.AddForbiddenZone(ShapeDistance.Circle(FearCastSource, 11), WorldState.FutureTime(10d)); + hints.AddForbiddenZone(ShapeDistance.Circle(FearCastSource, 11f), WorldState.FutureTime(10d)); else - hints.AddForbiddenZone(ShapeDistance.InvertedCircle(FearCastSource, 5), WorldState.FutureTime(10d)); + hints.AddForbiddenZone(ShapeDistance.InvertedCircle(FearCastSource, 5f), WorldState.FutureTime(10d)); } } @@ -92,4 +92,14 @@ public DD30NingishzidaStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "LegendofIceman", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 176, NameID = 5012)] -public class DD30Ningishzida(WorldState ws, Actor primary) : BossModule(ws, primary, new(-300f, -237f), new ArenaBoundsCircle(24f)); +public class DD30Ningishzida(WorldState ws, Actor primary) : BossModule(ws, primary, arena.Center, arena) +{ + private static readonly WPos[] vertices = [new(-292.06f, -260.52f), new(-291.70f, -259.98f), new(-283f, -253.77f), new(-278.9f, -248.62f), new(-276.9f, -243.92f), + new(-276.7f, -243.32f), new(-275.95f, -237.58f), new(-275.96f, -236.90f), new(-276.71f, -231.18f), new(-279.11f, -225.31f), + new(-282.9f, -220.35f), new(-283.44f, -219.89f), new(-287.65f, -216.66f), new(-288.24f, -216.30f), new(-293.88f, -214f), + new(-299.76f, -213.22f), new(-300.41f, -213.24f), new(-306.18f, -214f), new(-312.06f, -216.44f), new(-316.71f, -220.01f), + new(-317.2f, -220.47f), new(-320.75f, -225.10f), new(-321.04f, -225.68f), new(-323.28f, -231.07f), new(-324.03f, -236.80f), + new(-324.06f, -237.44f), new(-323.29f, -243.30f), new(-323.08f, -243.94f), new(-321.31f, -248.22f), new(-317.93f, -252.79f), + new(-317.48f, -253.28f), new(-312.6f, -257.12f), new(-307.27f, -259.75f), new(-307.11f, -260.30f), new(-292.06f, -260.52f)]; + private static readonly ArenaBoundsComplex arena = new([new PolygonCustom(vertices)], [new Rectangle(new(-299.312f, -261.765f), 20f, 1.325f)]); +} diff --git a/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/DD40Ixtab.cs b/BossMod/Modules/Heavensward/DeepDungeon/DD40Ixtab.cs similarity index 93% rename from BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/DD40Ixtab.cs rename to BossMod/Modules/Heavensward/DeepDungeon/DD40Ixtab.cs index d28ff6935..543e95d1d 100644 --- a/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/DD40Ixtab.cs +++ b/BossMod/Modules/Heavensward/DeepDungeon/DD40Ixtab.cs @@ -63,4 +63,7 @@ public DD40IxtabStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "LegendofIceman", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 177, NameID = 5025)] -public class DD40Ixtab(WorldState ws, Actor primary) : BossModule(ws, primary, new(-300f, -226f), new ArenaBoundsCircle(24f)); +public class DD40Ixtab(WorldState ws, Actor primary) : BossModule(ws, primary, arena.Center, arena) +{ + private static readonly ArenaBoundsComplex arena = new([new Polygon(new(-300f, -226f), 24.18f, 32)], [new Rectangle(new(-300f, -250.954f), 20f, 1.25f)]); +} diff --git a/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/DD50EddaBlackbosom.cs b/BossMod/Modules/Heavensward/DeepDungeon/DD50EddaBlackbosom.cs similarity index 81% rename from BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/DD50EddaBlackbosom.cs rename to BossMod/Modules/Heavensward/DeepDungeon/DD50EddaBlackbosom.cs index 69177e632..e0176fb3e 100644 --- a/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/DD50EddaBlackbosom.cs +++ b/BossMod/Modules/Heavensward/DeepDungeon/DD50EddaBlackbosom.cs @@ -12,20 +12,20 @@ public enum AID : uint AutoAttack = 6497, // Boss->player, no cast, single-target BlackHoneymoon = 6402, // Boss->location, 3.0s cast, range 40 circle - ColdFeet = 6403, // Boss->self, 3.0s cast, range 40 circle // gaze mechanic + ColdFeet = 6403, // Boss->self, 3.0s cast, range 40 circle, gaze mechanic DarkHarvest = 6400, // Boss->player, 2.0s cast, single-target Desolation = 6404, // GargoyleSteward->self, 4.0s cast, range 55+R width 6 rect InHealthCircle = 6398, // Boss->self, 4.5s cast, range 16 circle - InHealthDonut = 6399, // Boss->self, 4.5s cast, range 50+R circle // actually a donut, inner is ~2.5f + InHealthDonut = 6399, // Boss->self, 4.5s cast, range 3+R-50+R donut TerrorEye = 6405 // DemonButler->location, 4.0s cast, range 6 circle } class BlackHoneymoon(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.BlackHoneymoon)); class ColdFeet(BossModule module) : Components.CastGaze(module, ActionID.MakeSpell(AID.ColdFeet)); -class DarkHarvest(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.DarkHarvest), "Tankbuster"); +class DarkHarvest(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.DarkHarvest)); class Desolation(BossModule module) : Components.SimpleAOEs(module, ActionID.MakeSpell(AID.Desolation), new AOEShapeRect(57.3f, 3f)); class InHeathCircle(BossModule module) : Components.SimpleAOEs(module, ActionID.MakeSpell(AID.InHealthCircle), 16f); -class InHeathDonut(BossModule module) : Components.SimpleAOEs(module, ActionID.MakeSpell(AID.InHealthDonut), new AOEShapeDonut(2.5f, 50f)); +class InHeathDonut(BossModule module) : Components.SimpleAOEs(module, ActionID.MakeSpell(AID.InHealthDonut), new AOEShapeDonut(4.5f, 50f)); class TerrorEye(BossModule module) : Components.SimpleAOEs(module, ActionID.MakeSpell(AID.TerrorEye), 6f); class DD50EddaBlackbosomStates : StateMachineBuilder @@ -44,4 +44,7 @@ public DD50EddaBlackbosomStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "LegendofIceman", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 178, NameID = 5038)] -public class DD50EddaBlackbosom(WorldState ws, Actor primary) : BossModule(ws, primary, new(300f, 375f), new ArenaBoundsCircle(24f)); +public class DD50EddaBlackbosom(WorldState ws, Actor primary) : BossModule(ws, primary, arena.Center, arena) +{ + private static readonly ArenaBoundsComplex arena = new([new Polygon(new(300f, 374f), 24.18f, 32)], [new Rectangle(new(300f, 349.299f), 20f, 1.25f)]); +} diff --git a/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/DD60TheBlackRider.cs b/BossMod/Modules/Heavensward/DeepDungeon/DD60TheBlackRider.cs similarity index 90% rename from BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/DD60TheBlackRider.cs rename to BossMod/Modules/Heavensward/DeepDungeon/DD60TheBlackRider.cs index 96663d342..6fcaabd22 100644 --- a/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/DD60TheBlackRider.cs +++ b/BossMod/Modules/Heavensward/DeepDungeon/DD60TheBlackRider.cs @@ -2,10 +2,9 @@ namespace BossMod.Heavensward.DeepDungeon.PalaceOfTheDead.DD60TheBlackRider; public enum OID : uint { - Boss = 0x1814, // R3.920, x1 - Voidzone = 0x1E858E, // R0.500, EventObj type, spawn during fight - VoidsentDiscarnate = 0x18E6, // R1.000, spawn during fight - Helper = 0x233C + Boss = 0x1814, // R3.92 + Voidzone = 0x1E858E, // R0.5 + VoidsentDiscarnate = 0x18E6 // R1.0 } public enum AID : uint @@ -19,8 +18,8 @@ public enum AID : uint } class CleaveAuto(BossModule module) : Components.Cleave(module, default, new AOEShapeCone(11.92f, 45f.Degrees()), activeWhileCasting: false); -class Infatuation(BossModule module) : Components.SimpleAOEs(module, ActionID.MakeSpell(AID.Infatuation), 7); -class HallOfSorrow(BossModule module) : Components.PersistentVoidzoneAtCastTarget(module, 9, ActionID.MakeSpell(AID.HallOfSorrow), GetVoidzones, 1.3f) +class Infatuation(BossModule module) : Components.SimpleAOEs(module, ActionID.MakeSpell(AID.Infatuation), 7f); +class HallOfSorrow(BossModule module) : Components.PersistentVoidzoneAtCastTarget(module, 9f, ActionID.MakeSpell(AID.HallOfSorrow), GetVoidzones, 1.3f) { private static Actor[] GetVoidzones(BossModule module) { @@ -80,11 +79,11 @@ public override void OnCastFinished(Actor caster, ActorCastInfo spell) return null; var forbidden = new Func[count]; for (var i = 0; i < count; ++i) - forbidden[i] = ShapeDistance.Circle(_aoe.Casters[i].Origin, 7); + forbidden[i] = ShapeDistance.Circle(_aoe.Casters[i].Origin, 7f); return ShapeDistance.Union(forbidden); } - public override bool DestinationUnsafe(int slot, Actor actor, WPos pos) => GetFireballZone() is var z && z != null && z(pos) < 0; + public override bool DestinationUnsafe(int slot, Actor actor, WPos pos) => GetFireballZone() is var z && z != null && z(pos) < 0f; public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints) { @@ -120,4 +119,4 @@ public DD60TheBlackRiderStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, Contributors = "legendoficeman, Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 204, NameID = 5309)] -public class DD60TheBlackRider(WorldState ws, Actor primary) : BossModule(ws, primary, new(-300f, -220f), new ArenaBoundsCircle(25f)); +public class DD60TheBlackRider(WorldState ws, Actor primary) : BossModule(ws, primary, SharedBounds.ArenaBounds607080.Center, SharedBounds.ArenaBounds607080); diff --git a/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/DD70Yaquaru.cs b/BossMod/Modules/Heavensward/DeepDungeon/DD70Yaquaru.cs similarity index 87% rename from BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/DD70Yaquaru.cs rename to BossMod/Modules/Heavensward/DeepDungeon/DD70Yaquaru.cs index bd9e7f671..896607d1f 100644 --- a/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/DD70Yaquaru.cs +++ b/BossMod/Modules/Heavensward/DeepDungeon/DD70Yaquaru.cs @@ -1,10 +1,9 @@ -namespace BossMod.Heavensward.DeepDungeon.PalaceOfTheDead.DD70Taquaru; +namespace BossMod.Heavensward.DeepDungeon.PalaceOfTheDead.DD70Yaquaru; public enum OID : uint { - Boss = 0x1815, // R5.750, x1 - Voidzone = 0x1E9998, // R0.500, EventObj type, spawn during fight - Helper = 0x233C + Boss = 0x1815, // R5.75 + Voidzone = 0x1E9998 // R0.5 } public enum AID : uint @@ -17,7 +16,7 @@ public enum AID : uint FangsEnd = 7092 // Boss->player, no cast, single-target } -class Douse(BossModule module) : Components.PersistentVoidzoneAtCastTarget(module, 8, ActionID.MakeSpell(AID.Douse), GetVoidzones, 0.8f) +class Douse(BossModule module) : Components.PersistentVoidzoneAtCastTarget(module, 8f, ActionID.MakeSpell(AID.Douse), GetVoidzones, 0.8f) { public static Actor[] GetVoidzones(BossModule module) { @@ -90,9 +89,9 @@ public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignme class Electrogenesis(BossModule module) : Components.SimpleAOEs(module, ActionID.MakeSpell(AID.Electrogenesis), 8f); -class DD70TaquaruStates : StateMachineBuilder +class DD70YaquaruStates : StateMachineBuilder { - public DD70TaquaruStates(BossModule module) : base(module) + public DD70YaquaruStates(BossModule module) : base(module) { TrivialPhase() .ActivateOnEnter() @@ -102,4 +101,4 @@ public DD70TaquaruStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Verified, Contributors = "legendoficeman, Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 205, NameID = 5321)] -public class DD70Taquaru(WorldState ws, Actor primary) : BossModule(ws, primary, new(-300f, -220f), new ArenaBoundsCircle(25f)); +public class DD70Yaquaru(WorldState ws, Actor primary) : BossModule(ws, primary, SharedBounds.ArenaBounds607080.Center, SharedBounds.ArenaBounds607080); diff --git a/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/DD80Gudanna.cs b/BossMod/Modules/Heavensward/DeepDungeon/DD80Gudanna.cs similarity index 98% rename from BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/DD80Gudanna.cs rename to BossMod/Modules/Heavensward/DeepDungeon/DD80Gudanna.cs index 29fd7f0be..fd91492f6 100644 --- a/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/DD80Gudanna.cs +++ b/BossMod/Modules/Heavensward/DeepDungeon/DD80Gudanna.cs @@ -158,7 +158,7 @@ public DD80GudannaStates(BossModule module) : base(module) [ModuleInfo(BossModuleInfo.Maturity.Verified, Contributors = "legendoficeman, Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 206, NameID = 5333)] public class DD80Gudanna : BossModule { - public DD80Gudanna(WorldState ws, Actor primary) : base(ws, primary, new(-300f, -220f), new ArenaBoundsCircle(25f)) + public DD80Gudanna(WorldState ws, Actor primary) : base(ws, primary, SharedBounds.ArenaBounds607080.Center, SharedBounds.ArenaBounds607080) { ActivateComponent(); } diff --git a/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/DD90TheGodmother.cs b/BossMod/Modules/Heavensward/DeepDungeon/DD90TheGodmother.cs similarity index 93% rename from BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/DD90TheGodmother.cs rename to BossMod/Modules/Heavensward/DeepDungeon/DD90TheGodmother.cs index cd38248c7..7d30e52e1 100644 --- a/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/DD90TheGodmother.cs +++ b/BossMod/Modules/Heavensward/DeepDungeon/DD90TheGodmother.cs @@ -2,10 +2,10 @@ namespace BossMod.Heavensward.DeepDungeon.PalaceOfTheDead.DD90TheGodmother; public enum OID : uint { - Boss = 0x1817, // R3.750, x1 - LavaBomb = 0x18E9, // R0.600, x0 (spawn during fight) - GreyBomb = 0x18E8, // R1.200, x0 (spawn during fight) - GiddyBomb = 0x18EA // R1.200, x0 (spawn during fight) + Boss = 0x1817, // R3.75 + LavaBomb = 0x18E9, // R0.6 + GreyBomb = 0x18E8, // R1.2 + GiddyBomb = 0x18EA // R1.2 } public enum AID : uint @@ -95,4 +95,4 @@ public DD90TheGodmotherStates(BossModule module) : base(module) } [ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "LegendofIceman", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 207, NameID = 5345)] -public class DD90TheGodmother(WorldState ws, Actor primary) : BossModule(ws, primary, new(-300f, -235f), new ArenaBoundsCircle(25f)); +public class DD90TheGodmother(WorldState ws, Actor primary) : BossModule(ws, primary, SharedBounds.ArenaBounds2090110.Center, SharedBounds.ArenaBounds2090110); diff --git a/BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/PalaceFloorModule.cs b/BossMod/Modules/Heavensward/DeepDungeon/PalaceFloorModule.cs similarity index 100% rename from BossMod/Modules/Heavensward/DeepDungeon/PalaceOfTheDead/PalaceFloorModule.cs rename to BossMod/Modules/Heavensward/DeepDungeon/PalaceFloorModule.cs diff --git a/BossMod/Modules/Heavensward/DeepDungeon/SharedBounds.cs b/BossMod/Modules/Heavensward/DeepDungeon/SharedBounds.cs new file mode 100644 index 000000000..86cd90bf5 --- /dev/null +++ b/BossMod/Modules/Heavensward/DeepDungeon/SharedBounds.cs @@ -0,0 +1,42 @@ +namespace BossMod.Heavensward.DeepDungeon.PalaceOfTheDead; + +public static class SharedBounds +{ + public static readonly ArenaBoundsComplex ArenaBounds607080 = new([new Polygon(new(-300f, -220f), 24.94f, 48)], [new Rectangle(new(-300f, -245.68f), 20f, 1.55f)]); + public static readonly ArenaBoundsComplex ArenaBounds2090110 = new([new Polygon(new(-300f, -236f), 24.5f, 24)], [new Rectangle(new(-298.763f, -261.119f), 20f, 1.55f)]); + private static readonly WPos[] vertices120130 = [new(-290.26f, -259.65f), new(-289.73f, -259.2f), new(-288.76f, -258.22f), new(-288.25f, -257.85f), new(-284.66f, -255.87f), + new(-284.15f, -255.44f), new(-282.3f, -252.9f), new(-280.65f, -251.85f), new(-280.23f, -251.36f), new(-279.47f, -250.25f), + new(-278.54f, -249.28f), new(-278.25f, -248.68f), new(-277.55f, -245.63f), new(-276.36f, -243.41f), new(-275.84f, -241.48f), + new(-275.28f, -232.23f), new(-275.59f, -230.28f), new(-276.77f, -227.32f), new(-277.83f, -225.62f), new(-277.95f, -224.33f), + new(-278.1f, -223.7f), new(-279.39f, -221.36f), new(-279.83f, -220.85f), new(-280.9f, -220.21f), new(-281.89f, -218.63f), + new(-283.28f, -217.17f), new(-288.34f, -213.95f), new(-290.24f, -213.48f), new(-295.71f, -211.32f), new(-296.39f, -211.21f), + new(-297.68f, -211.29f), new(-298.33f, -211.27f), new(-300.34f, -211.04f), new(-303.69f, -211.33f), new(-305.68f, -211.77f), + new(-307.7f, -212.09f), new(-309.55f, -212.77f), new(-310.66f, -213.4f), new(-311.62f, -214.33f), new(-316.43f, -217.31f), + new(-317.33f, -218.08f), new(-317.98f, -219.25f), new(-318.42f, -219.61f), new(-319f, -219.93f), new(-319.4f, -220.49f), + new(-319.62f, -221.13f), new(-319.97f, -221.66f), new(-320.42f, -222.15f), new(-320.8f, -222.73f), new(-321.29f, -223.91f), + new(-321.64f, -224.43f), new(-322.48f, -225.44f), new(-324.76f, -234.26f), new(-324.34f, -240.62f), new(-324.21f, -241.3f), + new(-323.76f, -242.46f), new(-322.69f, -246.47f), new(-320.62f, -248.97f), new(-319.69f, -250.83f), new(-319.32f, -251.38f), + new(-317.59f, -253.47f), new(-313.43f, -256.21f), new(-312.98f, -256.61f), new(-312.12f, -257.62f), new(-311.61f, -258.06f), + new(-308.02f, -259.6f), new(-290.26f, -259.65f)]; + public static readonly ArenaBoundsComplex ArenaBounds120130 = new([new PolygonCustom(vertices120130)]); + private static readonly WPos[] vertices140150 = [new(-289.68f, -259.66f), new(-289.06f, -259.36f), new(-285.88f, -257.19f), new(-283.86f, -255.6f), new(-281.04f, -252.7f), + new(-280.77f, -252.07f), new(-278.87f, -250.28f), new(-278.04f, -249.24f), new(-278.14f, -247.41f), new(-277.98f, -246.78f), + new(-277.25f, -244.87f), new(-276.94f, -244.36f), new(-276.19f, -243.32f), new(-275.96f, -242.68f), new(-275.92f, -241.34f), + new(-275.78f, -240.75f), new(-275.33f, -239.55f), new(-275.29f, -238.86f), new(-275.6f, -237.62f), new(-275.65f, -237.01f), + new(-275.62f, -235.77f), new(-275.7f, -235.09f), new(-276.09f, -233.81f), new(-276.21f, -233.2f), new(-276.13f, -231.95f), + new(-276.17f, -231.28f), new(-279.76f, -223.87f), new(-280.65f, -222.97f), new(-281.01f, -222.51f), new(-281.31f, -220.71f), + new(-282.75f, -219.31f), new(-284.52f, -218.47f), new(-285.02f, -218.13f), new(-286.34f, -216.8f), new(-286.89f, -216.4f), + new(-288.05f, -215.96f), new(-288.69f, -215.81f), new(-290.06f, -215.67f), new(-290.6f, -215.46f), new(-293.81f, -213.31f), + new(-294.4f, -213.05f), new(-296.26f, -212.86f), new(-298.16f, -212.46f), new(-300.13f, -212.43f), new(-302.04f, -212.64f), + new(-305.96f, -213.71f), new(-307.29f, -213.74f), new(-307.94f, -213.82f), new(-309.72f, -214.46f), new(-310.38f, -214.57f), + new(-311.02f, -214.87f), new(-311.59f, -215.27f), new(-312.45f, -216.22f), new(-315.35f, -218.04f), new(-317.22f, -220.02f), + new(-319.38f, -221.39f), new(-320.88f, -223.48f), new(-321.21f, -224.04f), new(-321.43f, -225.45f), new(-321.65f, -226f), + new(-322.85f, -228.25f), new(-323.03f, -228.9f), new(-323.01f, -229.49f), new(-323.71f, -231.17f), new(-323.89f, -231.8f), + new(-324.12f, -233.77f), new(-324.28f, -234.4f), new(-324.38f, -235.08f), new(-324.25f, -236.32f), new(-324.67f, -237.5f), + new(-324.59f, -238.9f), new(-324.06f, -240.96f), new(-324.03f, -241.58f), new(-324.1f, -242.86f), new(-323.94f, -243.51f), + new(-323.24f, -245.28f), new(-323.12f, -245.93f), new(-321.47f, -248.78f), new(-321.06f, -249.98f), new(-320.8f, -250.57f), + new(-319.71f, -252.23f), new(-316.45f, -254.46f), new(-314.86f, -256.49f), new(-313.24f, -257.64f), new(-312.55f, -258.64f), + new(-312.09f, -259.12f), new(-311.56f, -259.5f), new(-310.91f, -259.67f)]; + public static readonly ArenaBoundsComplex ArenaBounds140150 = new([new PolygonCustom(vertices140150)]); + public static readonly ArenaBoundsComplex ArenaBounds160170180190 = new([new Polygon(new(-300f, -300f), 24.256f, 64)], [new Rectangle(new(-300f, -325.134f), 20f, 1.55f)]); +} From 46514d71ab2e4f29adf3d125a7787b42827d8c4f Mon Sep 17 00:00:00 2001 From: CarnifexOptimus <156172553+CarnifexOptimus@users.noreply.github.com> Date: Sun, 16 Feb 2025 23:25:23 +0100 Subject: [PATCH 2/2] setting to disable obstacle maps --- BossMod/AI/AIConfig.cs | 4 +-- BossMod/AI/AIManagementWindow.cs | 2 +- BossMod/AI/AIManager.cs | 20 ++++++------ BossMod/BossModule/AIHints.cs | 3 +- BossMod/Config/ConfigUI.cs | 4 +-- BossMod/Pathfinding/NavigationDecision.cs | 37 +---------------------- 6 files changed, 18 insertions(+), 52 deletions(-) diff --git a/BossMod/AI/AIConfig.cs b/BossMod/AI/AIConfig.cs index 4654b175a..f2632bfd7 100644 --- a/BossMod/AI/AIConfig.cs +++ b/BossMod/AI/AIConfig.cs @@ -55,8 +55,8 @@ sealed class AIConfig : ConfigNode [PropertyDisplay("Auto AFK timer", tooltip: "Time in seconds out of combat until AFK mode enables. Any movement will reset timer or disable AFK mode if already active.")] public float AFKModeTimer = 10; - [PropertyDisplay("Allow AI to be out of pathfinding map bounds")] - public bool AllowAIToBeOutsideBounds = false; + [PropertyDisplay("Disable loading obstacle maps", tooltip: "Might be required to be enabled for some some content such as deep dungeons.")] + public bool DisableObstacleMaps = false; [PropertyDisplay("Movement decision delay", tooltip: "Only change this at your own risk and keep this value low! Too high and it won't move in time for some mechanics. Make sure to readjust the value for different content.")] public double MoveDelay = 0; diff --git a/BossMod/AI/AIManagementWindow.cs b/BossMod/AI/AIManagementWindow.cs index 29f26c494..b5bf24045 100644 --- a/BossMod/AI/AIManagementWindow.cs +++ b/BossMod/AI/AIManagementWindow.cs @@ -60,7 +60,7 @@ public override void Draw() ImGui.Spacing(); configModified |= ImGui.Checkbox("Manual targeting", ref _config.ManualTarget); ImGui.SameLine(); - configModified |= ImGui.Checkbox("Allow outside bounds", ref _config.AllowAIToBeOutsideBounds); + configModified |= ImGui.Checkbox("Disable loading obstacle maps", ref _config.DisableObstacleMaps); ImGui.Text("Follow party slot"); ImGui.SameLine(); diff --git a/BossMod/AI/AIManager.cs b/BossMod/AI/AIManager.cs index 8c3c99f27..bf6d480f1 100644 --- a/BossMod/AI/AIManager.cs +++ b/BossMod/AI/AIManager.cs @@ -159,10 +159,10 @@ private void OnCommand(string cmd, string message) ToggleFollowTarget(messageData); configModified = cfgFollowT != _config.FollowTarget; break; - case "OUTOFBOUNDS": - var cfgOOB = _config.AllowAIToBeOutsideBounds; - ToggleOutOfBounds(messageData); - configModified = cfgOOB != _config.AllowAIToBeOutsideBounds; + case "OBSTACLEMAPS": + var cfgOM = _config.DisableObstacleMaps; + ToggleObstacleMaps(messageData); + configModified = cfgOM != _config.DisableObstacleMaps; break; case "POSITIONAL": @@ -229,26 +229,26 @@ private bool ToggleFocusTargetMaster() return true; } - private void ToggleOutOfBounds(string[] messageData) + private void ToggleObstacleMaps(string[] messageData) { if (messageData.Length == 1) - _config.AllowAIToBeOutsideBounds = !_config.AllowAIToBeOutsideBounds; + _config.DisableObstacleMaps = !_config.DisableObstacleMaps; else { switch (messageData[1].ToUpperInvariant()) { case "ON": - _config.AllowAIToBeOutsideBounds = true; + _config.DisableObstacleMaps = false; break; case "OFF": - _config.AllowAIToBeOutsideBounds = false; + _config.DisableObstacleMaps = true; break; default: - Service.ChatGui.Print($"[AI] Unknown follow target command: {messageData[1]}"); + Service.ChatGui.Print($"[AI] Unknown obstacle map command: {messageData[1]}"); return; } } - Service.Log($"[AI] Following targets is now {(_config.AllowAIToBeOutsideBounds ? "enabled" : "disabled")}"); + Service.Log($"[AI] Obstacle maps are now {(_config.DisableObstacleMaps ? "disabled" : "enabled")}"); } private void ToggleIdleWhileMounted(string[] messageData) diff --git a/BossMod/BossModule/AIHints.cs b/BossMod/BossModule/AIHints.cs index 683a15017..ef04ae2d9 100644 --- a/BossMod/BossModule/AIHints.cs +++ b/BossMod/BossModule/AIHints.cs @@ -41,6 +41,7 @@ public enum SpecialMode public WPos PathfindMapCenter; public ArenaBounds PathfindMapBounds = DefaultBounds; public Bitmap.Region PathfindMapObstacles; + private static readonly AI.AIConfig _config = Service.Config.Get(); // list of potential targets public readonly Enemy?[] Enemies = new Enemy?[100]; @@ -200,7 +201,7 @@ public void Normalize() public void InitPathfindMap(Pathfinding.Map map) { PathfindMapBounds.PathfindMap(map, PathfindMapCenter); - if (PathfindMapObstacles.Bitmap != null) + if (PathfindMapObstacles.Bitmap != null && !_config.DisableObstacleMaps) { var offX = -PathfindMapObstacles.Rect.Left; var offY = -PathfindMapObstacles.Rect.Top; diff --git a/BossMod/Config/ConfigUI.cs b/BossMod/Config/ConfigUI.cs index 9bbc1d6b0..80eb89be9 100644 --- a/BossMod/Config/ConfigUI.cs +++ b/BossMod/Config/ConfigUI.cs @@ -102,8 +102,8 @@ public void Draw() { "maxdistancetarget X", "Sets max distance to target. (default = 2.6)" }, { "maxdistanceslot X", "Sets max distance to slot. (default = 1)" }, { "movedelay X", "Sets AI movement decision delay. (default = 0)" }, - { "outofbounds", "Toggles the allow AI to be out of arena bounds setting." }, - { "outofbounds on/off", "Sets the allow AI to be out of arena bounds setting to on or off." }, + { "obstaclemaps", "Toggles loading obstacle maps." }, + { "obstaclemaps on/off", "Sets the loading of obstacle maps to on or off." }, { "setpresetname X", "Sets an autorotation preset for the AI, eg. setpresetname vbm default." } }; diff --git a/BossMod/Pathfinding/NavigationDecision.cs b/BossMod/Pathfinding/NavigationDecision.cs index 83d89213d..792d6fa14 100644 --- a/BossMod/Pathfinding/NavigationDecision.cs +++ b/BossMod/Pathfinding/NavigationDecision.cs @@ -22,7 +22,6 @@ public class Context public WPos? NextWaypoint; public float LeewaySeconds; // can be used for finishing casts / slidecasting etc. public float TimeToGoal; - private static readonly AI.AIConfig _config = Service.Config.Get(); public const float ActivationTimeCushion = 1f; // reduce time between now and activation by this value in seconds; increase for more conservativeness @@ -39,10 +38,7 @@ public static NavigationDecision Build(Context ctx, WorldState ws, AIHints hints RasterizeGoalZones(ctx.Map, localGoalZones); // execute pathfinding - if (!_config.AllowAIToBeOutsideBounds && IsOutsideBounds(player.Position, ctx)) - return FindPathFromOutsideBounds(ctx, player.Position, playerSpeed); - else - ctx.ThetaStar.Start(ctx.Map, player.Position, 1.0f / playerSpeed); + ctx.ThetaStar.Start(ctx.Map, player.Position, 1.0f / playerSpeed); var bestNodeIndex = ctx.ThetaStar.Execute(); ref var bestNode = ref ctx.ThetaStar.NodeByIndex(bestNodeIndex); var waypoints = GetFirstWaypoints(ctx.ThetaStar, ctx.Map, bestNodeIndex, player.Position); @@ -396,35 +392,4 @@ private static (WPos? first, WPos? second) GetFirstWaypoints(ThetaStar pf, Map m } while (true); } - - public static bool IsOutsideBounds(WPos position, Context ctx) - { - var map = ctx.Map; - var (x, y) = map.WorldToGrid(position); - if (x < 0 || x >= map.Width || y < 0 || y >= map.Height) - return true; // outside current pathfinding map - return map.PixelMaxG[y * map.Width + x] == -1; // inside pathfinding map, but outside actual walkable bounds - } - - public static NavigationDecision FindPathFromOutsideBounds(Context ctx, WPos startPos, float speed = 6) - { - WPos? closest = null; - var closestDistance = float.MaxValue; - var pixels = ctx.Map.EnumeratePixels(); - var len = pixels.Length; - for (var i = 0; i < len; ++i) - { - ref var p = ref pixels[i]; - if (ctx.Map.PixelMaxG[p.y * ctx.Map.Width + p.x] > 0f) // assume any pixel not marked as blocked is better than being outside of bounds - { - var distance = (p.center - startPos).LengthSq(); - if (distance < closestDistance) - { - closest = p.center; - closestDistance = distance; - } - } - } - return new() { Destination = closest, LeewaySeconds = 0f, TimeToGoal = MathF.Sqrt(closestDistance) / speed }; - } }