Skip to content

Commit

Permalink
TOP P6 WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
awgil committed Jan 6, 2024
1 parent 5e36f69 commit d6e77d1
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 6 deletions.
32 changes: 32 additions & 0 deletions BossMod/Modules/Endwalker/Ultimate/TOP/P6CosmoMeteor.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
namespace BossMod.Endwalker.Ultimate.TOP
{
class P6CosmoMeteorPuddles : Components.SelfTargetedAOEs
{
public P6CosmoMeteorPuddles() : base(ActionID.MakeSpell(AID.CosmoMeteorAOE), new AOEShapeCircle(10)) { }
}

class P6CosmoMeteorAddComet : Components.Adds
{
public P6CosmoMeteorAddComet() : base((uint)OID.CosmoComet) { }
}

class P6CosmoMeteorAddMeteor : Components.Adds
{
public P6CosmoMeteorAddMeteor() : base((uint)OID.CosmoMeteor) { }
}

class P6CosmoMeteorSpread : Components.UniformStackSpread
{
public int NumCasts { get; private set; }

public P6CosmoMeteorSpread() : base(0, 5) { }

public override void Init(BossModule module) => AddSpreads(module.Raid.WithoutSlot(true));

public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell)
{
if ((AID)spell.Action.ID == AID.CosmoMeteorSpread)
++NumCasts;
}
}
}
6 changes: 6 additions & 0 deletions BossMod/Modules/Endwalker/Ultimate/TOP/TOPEnums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ public enum OID : uint
IntermissionAlpha = 0x3E75, // R0.900, spawn during fight (purely visual during pre-p6 intermission)
IntermissionOmegaF = 0x3E76, // R0.500, spawn during fight (purely visual during pre-p6 intermission)
BossP6 = 0x3D6D, // R13.000, spawn during fight
CosmoMeteor = 0x3D6E, // R3.000, spawn during fight (p6 big meteor)
CosmoComet = 0x3D6F, // R1.000, spawn during fight (p6 small comet)

//_Gen_Actor1ea1a1 = 0x1EA1A1, // R2.000, x1, EventObj type
//_Gen_Exit = 0x1E850B, // R0.500, x1, EventObj type
Expand Down Expand Up @@ -227,6 +229,10 @@ public enum AID : uint
P6WaveCannonProtean = 31657, // BossP6->self, 10.9s cast, single-target, visual (proteans + wild charge)
P6WaveCannonWildCharge = 31658, // BossP6->self, no cast, range 100 width 8 rect wild charge
P6WaveCannonProteanAOE = 31659, // Helper->self, no cast, range 100 width 8 rect
CosmoMeteor = 31664, // BossP6->self, 5.0s cast, single-target, visual (big puddles + meteors/comets spawn)
CosmoMeteorAOE = 31666, // Helper->self, 4.0s cast, range 10 circle puddle
CosmoMeteorSpread = 32699, // Helper->player, no cast, range 5 circle spread
CosmoMeteorCometEnrage = 31669, // CosmoComet->self, no cast, range 100 circle, wipe if comets not killed in time

//_Ability_LatentSynchronizationDefect = 31576, // Helper->player, no cast, single-target
};
Expand Down
29 changes: 23 additions & 6 deletions BossMod/Modules/Endwalker/Ultimate/TOP/TOPStates.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ private void Phase6(uint id)
P6CosmoArrowWaveCannon(id + 0x60000, 0.3f);
P6FlashGales(id + 0x70000, 4.9f);
P6UnlimitedWaveCannonCosmoDive(id + 0x80000, 0.3f);
// not sure about timings below...
P6FlashGales(id + 0x90000, 7.5f);
P6CosmoMeteor(id + 0xA0000, 3.5f);
// meteors, flares, magic numbers, enrage
SimpleState(id + 0xFF0000, 100, "???");
}
Expand Down Expand Up @@ -496,10 +496,10 @@ private void P6CosmoArrowCosmoDive(uint id, float delay)
ComponentCondition<P6CosmoArrow>(id + 0x13, 2, comp => comp.NumCasts >= 26, "Exasquare 4");

ActorCastStart(id + 0x20, _module.BossP6, AID.CosmoDive, 1.1f, true);
ComponentCondition<P6CosmoArrow>(id + 0x21, 0.9f, comp => comp.NumCasts >= (comp.CurPattern == Ultimate.TOP.P6CosmoArrow.Pattern.OutIn ? 34 : 30), "Exasquare 5") // depending on pattern, lines expanding outwards could have finished
ComponentCondition<P6CosmoArrow>(id + 0x21, 0.9f, comp => comp.NumCasts >= (comp.CurPattern == P6CosmoArrow.Pattern.OutIn ? 34 : 30), "Exasquare 5") // depending on pattern, lines expanding outwards could have finished
.ActivateOnEnter<P6CosmoDive>();
ComponentCondition<P6CosmoArrow>(id + 0x22, 2, comp => comp.NumCasts >= (comp.CurPattern == Ultimate.TOP.P6CosmoArrow.Pattern.OutIn ? 38 : 34), "Exasquare 6");
ComponentCondition<P6CosmoArrow>(id + 0x23, 2, comp => comp.NumCasts >= (comp.CurPattern == Ultimate.TOP.P6CosmoArrow.Pattern.OutIn ? 42 : 38), "Exasquare 7"); // will get one more for in-out pattern
ComponentCondition<P6CosmoArrow>(id + 0x22, 2, comp => comp.NumCasts >= (comp.CurPattern == P6CosmoArrow.Pattern.OutIn ? 38 : 34), "Exasquare 6");
ComponentCondition<P6CosmoArrow>(id + 0x23, 2, comp => comp.NumCasts >= (comp.CurPattern == P6CosmoArrow.Pattern.OutIn ? 42 : 38), "Exasquare 7"); // will get one more for in-out pattern
ActorCastEnd(id + 0x24, _module.BossP6, 0.7f, true);

ComponentCondition<P6CosmoDive>(id + 0x30, 2.5f, comp => !comp.Active, "Tankbusters + Stack")
Expand Down Expand Up @@ -551,7 +551,6 @@ private void P6CosmoArrowWaveCannon(uint id, float delay)
.SetHint(StateMachine.StateHint.Raidwide | StateMachine.StateHint.Tankbuster);
}

// TODO: timings..
private void P6UnlimitedWaveCannonCosmoDive(uint id, float delay)
{
ActorCast(id, _module.BossP6, AID.UnlimitedWaveCannon, delay, 5, true)
Expand All @@ -560,13 +559,31 @@ private void P6UnlimitedWaveCannonCosmoDive(uint id, float delay)
.ActivateOnEnter<P6WaveCannonPuddle>();
ComponentCondition<P6WaveCannonExaflare>(id + 0x11, 1.9f, comp => comp.NumCasts > 0, "Exaflares start");

ActorCast(id + 0x20, _module.BossP6, AID.CosmoDive, 6, 5.6f, true)
ActorCast(id + 0x20, _module.BossP6, AID.CosmoDive, 6.1f, 5.6f, true)
.ActivateOnEnter<P6CosmoDive>();
ComponentCondition<P6CosmoDive>(id + 0x30, 2.5f, comp => !comp.Active, "Tankbusters + Stack")
.DeactivateOnExit<P6CosmoDive>()
.DeactivateOnExit<P6WaveCannonExaflare>()
.DeactivateOnExit<P6WaveCannonPuddle>()
.SetHint(StateMachine.StateHint.Raidwide | StateMachine.StateHint.Tankbuster);
}

private void P6CosmoMeteor(uint id, float delay)
{
ActorCast(id, _module.BossP6, AID.CosmoMeteor, delay, 5, true);
ComponentCondition<P6CosmoMeteorPuddles>(id + 0x10, 0.1f, comp => comp.Casters.Count > 0, "Puddles bait")
.ActivateOnEnter<P6CosmoMeteorPuddles>();
ComponentCondition<P6CosmoMeteorPuddles>(id + 0x20, 4.0f, comp => comp.NumCasts > 0)
.ActivateOnEnter<P6CosmoMeteorSpread>()
.ActivateOnEnter<P6CosmoMeteorAddComet>() // adds become targetable ~3.2s after puddle casts start
.ActivateOnEnter<P6CosmoMeteorAddMeteor>()
.DeactivateOnExit<P6CosmoMeteorPuddles>();
ComponentCondition<P6CosmoMeteorSpread>(id + 0x30, 1.2f, comp => comp.NumCasts > 0, "Spreads 1");
ComponentCondition<P6CosmoMeteorSpread>(id + 0x31, 1.0f, comp => comp.NumCasts > 4, "Spreads 2");
ComponentCondition<P6CosmoMeteorSpread>(id + 0x32, 5.0f, comp => comp.NumCasts > 8, "Spreads 3");
ComponentCondition<P6CosmoMeteorSpread>(id + 0x33, 1.0f, comp => comp.NumCasts > 12, "Spreads 4")
.DeactivateOnExit<P6CosmoMeteorSpread>();
// +3.2s: comet enrage
}
}
}

0 comments on commit d6e77d1

Please sign in to comment.