|
1 | 1 | namespace BossMod.RealmReborn.Dungeon.D09CuttersCry.D092GiantTunnelWorm;
|
2 |
| -// TODO: Revist when it gets duty support to finish. |
| 2 | + |
3 | 3 | public enum OID : uint
|
4 | 4 | {
|
5 |
| - Boss = 0x536, // x1 |
6 |
| - BottomlessDesertHelper = 0x64A, // x1 |
7 |
| - SandPillarHelper = 0x64B // x7 |
| 5 | + GiantTunnelWorm = 0x48FF, // R4.5 |
| 6 | + Helper = 0x233C |
8 | 7 | }
|
9 | 8 |
|
10 | 9 | public enum AID : uint
|
11 | 10 | {
|
12 |
| - AutoAttack = 870, // Boss->player, no cast |
| 11 | + AutoAttack = 870, // GiantTunnelWorm->player, no cast, single-target |
| 12 | + |
| 13 | + Sandstorm = 44235, // GiantTunnelWorm->player, no cast, single-target |
| 14 | + SandCyclone = 44236, // GiantTunnelWorm->player, no cast, single-target, applies sludge |
| 15 | + SandPillar = 44232, // Helper->self, no cast, range 4 circle |
| 16 | + Earthbreak = 44233, // GiantTunnelWorm->self, no cast, range 10 circle |
| 17 | + BottomlessDesert = 44234, // Helper->self, no cast, range 65 circle, pull 32 between hitboxes, raidwide |
| 18 | +} |
| 19 | + |
| 20 | +public enum SID : uint |
| 21 | +{ |
| 22 | + Sludge = 270 // GiantTunnelWorm->player, extra=0x0 |
13 | 23 |
|
14 |
| - Sandstorm = 529, // Boss->self, no cast, range 10.5 90-degree cleave |
15 |
| - SandCyclone = 1111, // Boss->player, no cast, random single-target |
16 |
| - Earthbreak = 531, // Boss->self, no cast, range 14.5 aoe |
17 |
| - BottomlessDesert = 1112, // BottomlessDesertHelper->self, no cast, raidwide drawin |
18 |
| - SandPillar = 1113 // SandPillarHelper->self, no cast, range 4.5 aoe |
19 | 24 | }
|
20 | 25 |
|
21 |
| -class Sandstorm(BossModule module) : Components.Cleave(module, (uint)AID.Sandstorm, new AOEShapeCone(10.5f, 45f.Degrees())); |
| 26 | +sealed class Sludge(BossModule module) : Components.CleansableDebuff(module, (uint)SID.Sludge, "Sludge", "muddied"); |
22 | 27 |
|
23 |
| -// TODO: pillars teleport right before cast, so we don't show them for now... |
24 |
| -class Submerge(BossModule module) : Components.GenericAOEs(module, (uint)AID.Earthbreak) |
| 28 | +sealed class SandPillarEarthbreak(BossModule module) : Components.GenericAOEs(module) |
25 | 29 | {
|
26 |
| - private readonly AOEShapeCircle _shape = new(14.5f); |
| 30 | + private readonly AOEShapeCircle circleSmall = new(4f), circleBig = new(10f); |
| 31 | + private readonly List<AOEInstance> _aoes = new(7); |
| 32 | + private static readonly (WPos initialPos, Angle rotation)[] positions = |
| 33 | + [ |
| 34 | + (new(-135.623f, 147.871f), -45f.Degrees()), |
| 35 | + (new(-142.695f, 144.942f), default), |
| 36 | + (new(-149.766f, 162.013f), 135f.Degrees()), |
| 37 | + (new(-142.695f, 164.942f), 180f.Degrees()), |
| 38 | + (new(-152.695f, 154.942f), 90f.Degrees()), |
| 39 | + (new(-135.623f, 162.013f), -135f.Degrees()), |
| 40 | + (new(-149.766f, 147.871f), 45f.Degrees()), |
| 41 | + (new(-132.694f, 154.942f), -90f.Degrees()), |
| 42 | + ]; |
27 | 43 |
|
28 | 44 | public override ReadOnlySpan<AOEInstance> ActiveAOEs(int slot, Actor actor)
|
29 | 45 | {
|
30 |
| - // TODO: proper timings... |
31 |
| - if (!Module.PrimaryActor.IsTargetable) |
32 |
| - return new AOEInstance[1] { new(_shape, Module.PrimaryActor.Position, Module.PrimaryActor.Rotation) }; |
33 |
| - return []; |
| 46 | + var count = _aoes.Count; |
| 47 | + if (count == 0) |
| 48 | + { |
| 49 | + return []; |
| 50 | + } |
| 51 | + var aoes = CollectionsMarshal.AsSpan(_aoes); |
| 52 | + if (count > 1) |
| 53 | + { |
| 54 | + ref var aoe = ref aoes[0]; |
| 55 | + aoe.Color = Colors.Danger; |
| 56 | + } |
| 57 | + return aoes; |
| 58 | + } |
| 59 | + |
| 60 | + public override void OnEventCast(Actor caster, ActorCastEvent spell) |
| 61 | + { |
| 62 | + switch (spell.Action.ID) |
| 63 | + { |
| 64 | + case (uint)AID.SandPillar: |
| 65 | + var count = _aoes.Count; |
| 66 | + if (count == 0) |
| 67 | + { |
| 68 | + var cPos = caster.Position; |
| 69 | + for (var i = 0; i < 8; ++i) |
| 70 | + { |
| 71 | + ref readonly var pos = ref positions[i]; |
| 72 | + var initialPosition = pos.initialPos; |
| 73 | + if (initialPosition.AlmostEqual(cPos, 1f)) |
| 74 | + { |
| 75 | + var dir = 4f * pos.rotation.ToDirection(); |
| 76 | + for (var j = 1; j < 8; ++j) |
| 77 | + { |
| 78 | + _aoes.Add(new(j != 7 ? circleSmall : circleBig, (initialPosition + j * dir).Quantized(), default, WorldState.FutureTime(0.9d * j))); |
| 79 | + } |
| 80 | + return; |
| 81 | + } |
| 82 | + } |
| 83 | + } |
| 84 | + else |
| 85 | + { |
| 86 | + _aoes.RemoveAt(0); |
| 87 | + } |
| 88 | + break; |
| 89 | + case (uint)AID.Earthbreak: |
| 90 | + if (_aoes.Count != 0) |
| 91 | + { |
| 92 | + _aoes.RemoveAt(0); |
| 93 | + } |
| 94 | + break; |
| 95 | + case (uint)AID.BottomlessDesert: |
| 96 | + _aoes.Add(new(circleBig, caster.Position.Quantized(), default, WorldState.FutureTime(3.1d))); |
| 97 | + break; |
| 98 | + } |
34 | 99 | }
|
35 | 100 | }
|
36 | 101 |
|
37 |
| -class D092GiantTunnelWormStates : StateMachineBuilder |
| 102 | +sealed class D092GiantTunnelWormStates : StateMachineBuilder |
38 | 103 | {
|
39 | 104 | public D092GiantTunnelWormStates(BossModule module) : base(module)
|
40 | 105 | {
|
41 | 106 | TrivialPhase()
|
42 |
| - .ActivateOnEnter<Sandstorm>() |
43 |
| - .ActivateOnEnter<Submerge>(); |
| 107 | + .ActivateOnEnter<Sludge>() |
| 108 | + .ActivateOnEnter<SandPillarEarthbreak>(); |
44 | 109 | }
|
45 | 110 | }
|
46 | 111 |
|
47 |
| -[ModuleInfo(BossModuleInfo.Maturity.Verified, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 12, NameID = 1589)] |
48 |
| -public class D092GiantTunnelWorm(WorldState ws, Actor primary) : BossModule(ws, primary, new(-140f, 150f), new ArenaBoundsCircle(35f)); |
| 112 | +[ModuleInfo(BossModuleInfo.Maturity.Verified, Contributors = "The Combat Reborn Team (Malediktus)", PrimaryActorOID = (uint)OID.GiantTunnelWorm, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 12u, NameID = 1589u, Category = BossModuleInfo.Category.Dungeon, Expansion = BossModuleInfo.Expansion.RealmReborn, SortOrder = 2)] |
| 113 | +public sealed class D092GiantTunnelWorm(WorldState ws, Actor primary) : BossModule(ws, primary, arena.Center, arena) |
| 114 | +{ |
| 115 | + private static readonly ArenaBoundsComplex arena = new([new PolygonCustom([new(-152.42f, 127.49f), new(-152.01f, 127.81f), |
| 116 | + new(-151.04f, 128.76f), new(-150.49f, 128.97f), new(-150.04f, 129.24f), |
| 117 | + new(-149.53f, 129.72f), new(-148.43f, 130.37f), new(-147.83f, 130.49f), new(-147.34f, 130.23f), new(-146.91f, 129.77f), |
| 118 | + new(-145.89f, 128.91f), new(-145.29f, 128.62f), new(-144.64f, 128.5f), new(-143.06f, 128.46f), new(-142.42f, 128.59f), |
| 119 | + new(-141.78f, 128.78f), new(-140.75f, 129.67f), new(-140.41f, 130.16f), new(-139.92f, 130.63f), new(-139.39f, 130.62f), |
| 120 | + new(-138.69f, 130.38f), new(-138.24f, 130.86f), new(-137.62f, 131.16f), new(-137.02f, 131.01f), new(-136.37f, 130.95f), |
| 121 | + new(-134.29f, 131.24f), new(-133.92f, 130.6f), new(-133.55f, 130.26f), new(-133.04f, 129.9f), new(-132.42f, 130.03f), |
| 122 | + new(-130.86f, 131.94f), new(-130.38f, 132.3f), new(-129.76f, 132.47f), new(-127.15f, 132.38f), new(-125.27f, 132.7f), |
| 123 | + new(-124.59f, 132.9f), new(-123.15f, 134.26f), new(-122.68f, 134.84f), new(-122.04f, 136.61f), new(-121.75f, 137.79f), |
| 124 | + new(-120.71f, 138.45f), new(-120.18f, 138.96f), new(-119.75f, 139.52f), new(-118.46f, 142.06f), new(-117.85f, 144.61f), |
| 125 | + new(-117.96f, 145.96f), new(-117.81f, 146.54f), new(-117.44f, 146.99f), new(-116.93f, 146.92f), new(-115.62f, 146.9f), |
| 126 | + new(-115.7f, 147.55f), new(-117.3f, 148.8f), new(-117.77f, 149.26f), new(-118.03f, 149.83f), new(-118.11f, 150.47f), |
| 127 | + new(-117.91f, 151.08f), new(-117.35f, 152.27f), new(-117.18f, 152.75f), new(-117.58f, 153.84f), new(-118.04f, 154.36f), |
| 128 | + new(-118.4f, 154.88f), new(-118.49f, 155.49f), new(-118.21f, 156.01f), new(-117.77f, 156.47f), new(-116.69f, 157.27f), |
| 129 | + new(-116.49f, 157.73f), new(-116.63f, 158.4f), new(-117.71f, 160.77f), new(-118.75f, 161.67f), new(-119.11f, 162.16f), |
| 130 | + new(-118.94f, 163.41f), new(-118.97f, 164.11f), new(-119.16f, 165.38f), new(-119.37f, 166.03f), new(-119.79f, 166.52f), |
| 131 | + new(-120.35f, 166.9f), new(-121.05f, 166.87f), new(-121.68f, 166.66f), new(-122.84f, 166.11f), new(-123.41f, 165.99f), |
| 132 | + new(-127.02f, 167.29f), new(-128.27f, 168.87f), new(-128.58f, 169.4f), new(-128.34f, 171.92f), new(-128.41f, 172.55f), |
| 133 | + new(-128.61f, 173.19f), new(-128.88f, 173.8f), new(-129.14f, 174.23f), new(-130.47f, 174.31f), new(-131.06f, 174.52f), |
| 134 | + new(-131.14f, 175.05f), new(-130.84f, 175.64f), new(-130.79f, 176.3f), new(-132.03f, 178.66f), new(-132.52f, 179.15f), |
| 135 | + new(-133.08f, 179.57f), new(-133.51f, 180.05f), new(-134.02f, 180.51f), new(-135.19f, 181.09f), new(-135.8f, 181.17f), |
| 136 | + new(-136.42f, 181.39f), new(-138.11f, 182.43f), new(-138.73f, 182.27f), new(-139.32f, 182.37f), new(-148.32f, 182.55f), |
| 137 | + new(-148.89f, 182.23f), new(-149.43f, 181.8f), new(-149.71f, 181.34f), new(-151.22f, 181.05f), new(-151.84f, 181.06f), |
| 138 | + new(-152.49f, 180.97f), new(-153.09f, 180.71f), new(-153.73f, 180.63f), new(-154.39f, 180.38f), new(-155.54f, 179.77f), |
| 139 | + new(-155.61f, 179.09f), new(-155.41f, 178.42f), new(-155.05f, 177.82f), new(-154.94f, 177.12f), new(-155.07f, 176.6f), |
| 140 | + new(-157.42f, 175.56f), new(-157.95f, 175.2f), new(-158.44f, 174.74f), new(-159.73f, 172.52f), new(-160.3f, 172.17f), |
| 141 | + new(-162.25f, 172.07f), new(-162.26f, 171.39f), new(-162.17f, 170.74f), new(-161.92f, 170.09f), new(-161.95f, 169.42f), |
| 142 | + new(-162.35f, 169.01f), new(-162.96f, 168.85f), new(-163.48f, 169.16f), new(-164.11f, 169.41f), new(-164.76f, 169.56f), |
| 143 | + new(-165.27f, 169.51f), new(-166.39f, 169.27f), new(-166.97f, 169.25f), new(-167.46f, 169.12f), new(-167.54f, 168.49f), |
| 144 | + new(-168.15f, 167.34f), new(-168.3f, 166.73f), new(-168.49f, 165.44f), new(-168.23f, 164.11f), new(-167.77f, 163.59f), |
| 145 | + new(-167.13f, 163.24f), new(-166.61f, 162.8f), new(-166.31f, 162.22f), new(-167.23f, 160.62f), new(-167.73f, 159.4f), |
| 146 | + new(-167.9f, 158.74f), new(-167.97f, 158.1f), new(-168.23f, 157.64f), new(-171.29f, 155.25f), new(-171.36f, 154.54f), |
| 147 | + new(-171.03f, 153.95f), new(-170.57f, 153.45f), new(-168.4f, 151.96f), new(-167.85f, 151.69f), new(-167.65f, 151.15f), |
| 148 | + new(-167.32f, 149.94f), new(-167.07f, 149.33f), new(-166.28f, 148.24f), new(-165.3f, 147.32f), new(-164.62f, 147.2f), |
| 149 | + new(-163.94f, 147.42f), new(-163.25f, 147.48f), new(-162.57f, 147.35f), new(-162.06f, 147.04f), new(-161.76f, 145.78f), |
| 150 | + new(-161.54f, 145.15f), new(-160.58f, 143.39f), new(-160.17f, 142.92f), new(-160.53f, 141.02f), new(-160.58f, 139.67f), |
| 151 | + new(-159.62f, 138.68f), new(-158.96f, 138.44f), new(-158.28f, 138.47f), new(-157.65f, 138.25f), new(-157.16f, 137.78f), |
| 152 | + new(-156.85f, 137.23f), new(-157.01f, 136.72f), new(-157.29f, 136.13f), new(-157.48f, 135.52f), new(-157.56f, 134.84f), |
| 153 | + new(-157.26f, 133.59f), new(-157.03f, 132.89f), new(-156.77f, 132.3f), new(-155.87f, 131.23f), new(-155.11f, 129.42f), |
| 154 | + new(-154.53f, 128.98f), new(-153.87f, 128.71f), new(-153.35f, 128.36f), new(-152.99f, 127.81f), new(-152.42f, 127.49f)])]); |
| 155 | +} |
0 commit comments