Skip to content

Commit

Permalink
Merge pull request #418 from FFXIV-CombatReborn/mergeWIP
Browse files Browse the repository at this point in the history
small sphene improvement
  • Loading branch information
CarnifexOptimus authored Oct 27, 2024
2 parents 335212c + 9f41473 commit 779e5d9
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
}
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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)]);
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,17 @@ 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
{
public D101ChudoYudoStates(BossModule module) : base(module)
{
TrivialPhase()
.ActivateOnEnter<LionsBreath>()
.ActivateOnEnter<LionsBreathCleave>()
.ActivateOnEnter<Swinge>();
}
}
Expand Down

0 comments on commit 779e5d9

Please sign in to comment.