From 9f414739e47af67dcede7163cefff5446b3e3bf5 Mon Sep 17 00:00:00 2001 From: CarnifexOptimus <156172553+CarnifexOptimus@users.noreply.github.com> Date: Sun, 27 Oct 2024 21:07:02 +0100 Subject: [PATCH] small sphene improvement --- .../Trial/T02ZoraalJa/T02ZoraalJaEnums.cs | 7 +++---- .../Trial/T02ZoraalJa/T02ZoraalJaP2Enums.cs | 5 +---- .../Trial/T03QueenEternal/DivideAndConquer.cs | 21 ++++++++++++++----- .../Trial/T03QueenEternal/T03QueenEternal.cs | 2 +- .../Dungeon/D10StoneVigil/D101ChudoYudo.cs | 6 ++++-- 5 files changed, 25 insertions(+), 16 deletions(-) diff --git a/BossMod/Modules/Dawntrail/Trial/T02ZoraalJa/T02ZoraalJaEnums.cs b/BossMod/Modules/Dawntrail/Trial/T02ZoraalJa/T02ZoraalJaEnums.cs index 841a98c582..bed4753334 100644 --- a/BossMod/Modules/Dawntrail/Trial/T02ZoraalJa/T02ZoraalJaEnums.cs +++ b/BossMod/Modules/Dawntrail/Trial/T02ZoraalJa/T02ZoraalJaEnums.cs @@ -3,8 +3,7 @@ public enum OID : uint { Boss = 0x42A9, // R2.500 - Fang1 = 0x42AA, // R1.0 - Fang2 = 0x42B6, // R1.0 + Fang = 0x42AA, // R1.0 ShadowOfTural1 = 0x43A8, // R0.5 ShadowOfTural2 = 0x42AC, // R1.0 ShadowOfTural3 = 0x42AD, // R1.0 @@ -27,8 +26,8 @@ public enum AID : uint Burst = 37709, // ShadowOfTural1->self, 8.0s cast, range 8 circle VorpalTrailVisual1 = 37710, // Boss->self, 3.7+0.3s cast, single-target - VorpalTrailVisual2 = 38183, // Fang1->location, no cast, width 4 rect charge - VorpalTrailVisual3 = 37711, // Fang1->location, 1.0s cast, width 4 rect charge + VorpalTrailVisual2 = 38183, // Fang->location, no cast, width 4 rect charge + VorpalTrailVisual3 = 37711, // Fang->location, 1.0s cast, width 4 rect charge VorpalTrail1 = 38184, // Helper->location, 4.3s cast, width 4 rect charge VorpalTrail2 = 37712 // Helper->location, 2.3s cast, width 4 rect charge } diff --git a/BossMod/Modules/Dawntrail/Trial/T02ZoraalJa/T02ZoraalJaP2Enums.cs b/BossMod/Modules/Dawntrail/Trial/T02ZoraalJa/T02ZoraalJaP2Enums.cs index 01973e91ce..a896435d88 100644 --- a/BossMod/Modules/Dawntrail/Trial/T02ZoraalJa/T02ZoraalJaP2Enums.cs +++ b/BossMod/Modules/Dawntrail/Trial/T02ZoraalJa/T02ZoraalJaP2Enums.cs @@ -5,12 +5,9 @@ public enum OID : uint Boss = 0x42B4, // R10.05 Fang1 = 0x42AA, // R1.0 Fang2 = 0x42B6, // R1.0 - ShadowOfTural1 = 0x43A8, // R0.5 - ShadowOfTural2 = 0x42AC, // R1.0 - ShadowOfTural3 = 0x42AD, // R1.0 HalfCircuitHelper = 0x42B9, // R10.05 ForgedTrackHelper = 0x19A, // R0.5 - Helper = 0x233C, // R0.5 + Helper = 0x233C } public enum AID : uint diff --git a/BossMod/Modules/Dawntrail/Trial/T03QueenEternal/DivideAndConquer.cs b/BossMod/Modules/Dawntrail/Trial/T03QueenEternal/DivideAndConquer.cs index 62a7425856..50e0a56023 100644 --- a/BossMod/Modules/Dawntrail/Trial/T03QueenEternal/DivideAndConquer.cs +++ b/BossMod/Modules/Dawntrail/Trial/T03QueenEternal/DivideAndConquer.cs @@ -4,22 +4,33 @@ class DivideAndConquer(BossModule module) : Components.GenericBaitAway(module) { // for some reason the icon is detected on the boss instead of the player // so we will have to make a hack, line baits can be staggered so we can't use BaitAwayIcon which clears all at the same time + // staggered waves always got 8 casts even if some players are dead, simultan waves got line baits on all alive players private static readonly AOEShapeRect rect = new(100, 2.5f); + private int counter; public override void OnEventIcon(Actor actor, uint iconID) { if ((IconID)iconID == IconID.LineBaits && CurrentBaits.Count == 0) - foreach (var p in Raid.WithoutSlot()) + { + foreach (var p in Raid.WithoutSlot(true)) CurrentBaits.Add(new(Module.PrimaryActor, p, rect, WorldState.FutureTime(3))); + counter = 8; + } } public override void OnEventCast(Actor caster, ActorCastEvent spell) { if (CurrentBaits.Count == 0) return; - if ((AID)spell.Action.ID == AID.DivideAndConquer) // this is a hack and could remove a wrong or no line bait... - CurrentBaits.RemoveAll(x => x.Target == Raid.WithoutSlot().FirstOrDefault(x => x.Position.InRect(Module.PrimaryActor.Position, spell.Rotation, rect.LengthFront, 0, 2))); - else if ((AID)spell.Action.ID == AID.AutoAttack) // safeguard, might be needed if target dies before cast event or if no target was found in rect - CurrentBaits.Clear(); + if ((AID)spell.Action.ID == AID.DivideAndConquer) + { + if (--counter == 0) + CurrentBaits.Clear(); + if (++NumCasts > 8) + { + CurrentBaits.Clear(); + NumCasts = 0; + } + } } } diff --git a/BossMod/Modules/Dawntrail/Trial/T03QueenEternal/T03QueenEternal.cs b/BossMod/Modules/Dawntrail/Trial/T03QueenEternal/T03QueenEternal.cs index 03c2250d42..5e6cecff39 100644 --- a/BossMod/Modules/Dawntrail/Trial/T03QueenEternal/T03QueenEternal.cs +++ b/BossMod/Modules/Dawntrail/Trial/T03QueenEternal/T03QueenEternal.cs @@ -56,6 +56,6 @@ public class T03QueenEternal(WorldState ws, Actor primary) : BossModule(ws, prim public static readonly ArenaBoundsRect FinalBounds = new(20, 15); public static readonly ArenaBoundsRect SplitGravityBounds = new(12, 8); public static readonly ArenaBoundsSquare DefaultBounds = new(20); - public static readonly ArenaBoundsComplex XArena = new([new Rectangle(new(100, 82.5f), 12.5f, 2.5f), new Rectangle(new(100, 102.5f), 12.5f, 2.5f), new Cross(new(100, 92.5f), 15, 2.5f, 45.Degrees())]); + public static readonly ArenaBoundsComplex XArena = new([new Rectangle(new(100, 82.5f), 12.5f, 2.5f), new Rectangle(new(100, 102.5f), 12.5f, 2.5f), new Cross(new(100, 92.5f), 15, 2.5f, 45.Degrees())], Offset: -0.5f); public static readonly ArenaBoundsComplex SplitArena = new([new Rectangle(LeftSplitCenter, 4, 8), new Rectangle(RightSplitCenter, 4, 8)]); } diff --git a/BossMod/Modules/RealmReborn/Dungeon/D10StoneVigil/D101ChudoYudo.cs b/BossMod/Modules/RealmReborn/Dungeon/D10StoneVigil/D101ChudoYudo.cs index 5867b8580c..0fb1dd061b 100644 --- a/BossMod/Modules/RealmReborn/Dungeon/D10StoneVigil/D101ChudoYudo.cs +++ b/BossMod/Modules/RealmReborn/Dungeon/D10StoneVigil/D101ChudoYudo.cs @@ -14,8 +14,9 @@ public enum AID : uint Swinge = 903 // Boss->self, 4.0s cast, range 40+R 60-degree cone aoe } -class LionsBreath(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.LionsBreath), new AOEShapeCone(10.24f, 60.Degrees()), activeWhileCasting: false); -class Swinge(BossModule module) : Components.SelfTargetedLegacyRotationAOEs(module, ActionID.MakeSpell(AID.Swinge), new AOEShapeCone(40, 30.Degrees())); +class LionsBreathCleave(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.LionsBreath), new AOEShapeCone(10.24f, 60.Degrees()), activeWhileCasting: false); +class LionsBreath(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.LionsBreath), new AOEShapeCone(10.24f, 60.Degrees())); +class Swinge(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Swinge), new AOEShapeCone(40, 30.Degrees())); class D101ChudoYudoStates : StateMachineBuilder { @@ -23,6 +24,7 @@ public D101ChudoYudoStates(BossModule module) : base(module) { TrivialPhase() .ActivateOnEnter() + .ActivateOnEnter() .ActivateOnEnter(); } }