Skip to content

Commit

Permalink
Chaotic stuff.
Browse files Browse the repository at this point in the history
  • Loading branch information
awgil committed Dec 29, 2024
1 parent c0148ee commit a7f1716
Show file tree
Hide file tree
Showing 17 changed files with 627 additions and 163 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ public override void OnCastStarted(Actor caster, ActorCastInfo spell)
public override void OnCastFinished(Actor caster, ActorCastInfo spell)
{
if ((AID)spell.Action.ID is AID.BladeOfDarknessLAOE or AID.BladeOfDarknessRAOE or AID.BladeOfDarknessCAOE)
{
_aoe = null;
++NumCasts;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@

class Break(BossModule module) : Components.GenericGaze(module)
{
private readonly List<Eye> _eyes = [];
public readonly List<Eye> Eyes = [];

public override IEnumerable<Eye> ActiveEyes(int slot, Actor actor) => _eyes;//_casters.Where(c => c.CastInfo?.TargetID != actor.InstanceID).Select(c => new Eye(EyePosition(c), Module.CastFinishAt(c.CastInfo), Range: range));
public override IEnumerable<Eye> ActiveEyes(int slot, Actor actor) => Eyes;//_casters.Where(c => c.CastInfo?.TargetID != actor.InstanceID).Select(c => new Eye(EyePosition(c), Module.CastFinishAt(c.CastInfo), Range: range));

public override void OnCastStarted(Actor caster, ActorCastInfo spell)
{
if ((AID)spell.Action.ID is AID.BreakBoss or AID.BreakEye)
_eyes.Add(new(caster.Position, Module.CastFinishAt(spell, 0.9f)));
Eyes.Add(new(caster.Position, Module.CastFinishAt(spell, 0.9f)));
}

public override void OnEventCast(Actor caster, ActorCastEvent spell)
{
if ((AID)spell.Action.ID is AID.BreakBossAOE or AID.BreakEyeAOE)
_eyes.RemoveAll(eye => eye.Position.AlmostEqual(caster.Position, 1));
Eyes.RemoveAll(eye => eye.Position.AlmostEqual(caster.Position, 1));
}
}
Original file line number Diff line number Diff line change
@@ -1,69 +1,18 @@
namespace BossMod.Dawntrail.Chaotic.Ch01CloudOfDarkness;

class DelugeOfDarkness1(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.DelugeOfDarkness1));
class Flare(BossModule module) : Components.BaitAwayIcon(module, new AOEShapeCircle(25), (uint)IconID.Flare, ActionID.MakeSpell(AID.FlareAOE), 8.1f, true);
class FloodOfDarkness(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.FloodOfDarkness));
class DelugeOfDarkness2(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.DelugeOfDarkness2));
class StygianShadow(BossModule module) : Components.Adds(module, (uint)OID.StygianShadow);
class Atomos(BossModule module) : Components.Adds(module, (uint)OID.Atomos);
class DarkDominion(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.DarkDominion));
class GhastlyGloomCross(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.GhastlyGloomCross), new AOEShapeCross(40, 15));
class GhastlyGloomDonut(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.GhastlyGloomDonut), new AOEShapeDonut(21, 40));
class GhastlyGloomCross(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.GhastlyGloomCrossAOE), new AOEShapeCross(40, 15));
class GhastlyGloomDonut(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.GhastlyGloomDonutAOE), new AOEShapeDonut(21, 40));
class FloodOfDarknessAdd(BossModule module) : Components.CastInterruptHint(module, ActionID.MakeSpell(AID.FloodOfDarknessAdd)); // TODO: only if add is player's?..
class Excruciate(BossModule module) : Components.BaitAwayCast(module, ActionID.MakeSpell(AID.Excruciate), new AOEShapeCircle(4), true);
class LoomingChaos(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.LoomingChaosAOE), "Raidwide + swap positions");
class LoomingChaos(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.LoomingChaosAOE));

class Ch01CloudOfDarknessStates : StateMachineBuilder
{
public Ch01CloudOfDarknessStates(BossModule module) : base(module)
{
DeathPhase(0, SinglePhase);
}

private void SinglePhase(uint id)
{
SimpleState(id + 0xFF0000, 10000, "???")
.ActivateOnEnter<BladeOfDarkness>()
.ActivateOnEnter<DelugeOfDarkness1>()
.ActivateOnEnter<GrimEmbraceBait>()
.ActivateOnEnter<GrimEmbraceAOE>()
.ActivateOnEnter<RazingVolleyParticleBeam>()
.ActivateOnEnter<RapidSequenceParticleBeam>()
.ActivateOnEnter<EndeathVortex>()
.ActivateOnEnter<EndeathAOE>()
.ActivateOnEnter<EnaeroKnockback>()
.ActivateOnEnter<EnaeroAOE>()
.ActivateOnEnter<Break>()
.ActivateOnEnter<Flare>()
.ActivateOnEnter<UnholyDarkness>()
.ActivateOnEnter<FloodOfDarkness>()
.ActivateOnEnter<DelugeOfDarkness2>()
.ActivateOnEnter<StygianShadow>()
.ActivateOnEnter<Atomos>()
.ActivateOnEnter<DarkDominion>()
.ActivateOnEnter<ThirdArtOfDarknessCleave>()
.ActivateOnEnter<ThirdArtOfDarknessHyperFocusedParticleBeam>()
.ActivateOnEnter<ThirdArtOfDarknessMultiProngedParticleBeam>()
.ActivateOnEnter<GhastlyGloomCross>()
.ActivateOnEnter<GhastlyGloomDonut>()
.ActivateOnEnter<CurseOfDarkness>()
.ActivateOnEnter<DarkEnergyParticleBeam>()
.ActivateOnEnter<FloodOfDarknessAdd>()
.ActivateOnEnter<ChaosCondensedParticleBeam>()
.ActivateOnEnter<DiffusiveForceParticleBeam>()
.ActivateOnEnter<Phaser>()
.ActivateOnEnter<Excruciate>()
.ActivateOnEnter<ActivePivotParticleBeam>()
.ActivateOnEnter<LoomingChaos>();
}
}

// TODO: mechanic phase bounds
// TODO: flood bounds & squares
// TODO: tankswap hints component for phase1
// TODO: phase 2 squares, break timer, teleport zones
// TODO: particle concentration towers
// TODO: evil seed
// TODO: chaser beam
// TODO: tankswap hints?
[ModuleInfo(BossModuleInfo.Maturity.WIP, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 1010, NameID = 13624)]
public class Ch01CloudOfDarkness(WorldState ws, Actor primary) : BossModule(ws, primary, DefaultCenter, InitialBounds)
{
Expand Down Expand Up @@ -118,72 +67,3 @@ public static RelSimplifiedComplexPolygon BuildPhase2BoundsPoly()
return InitialBounds.Clipper.Union(op1, op2);
}
}

// envcontrols:
// 00 = main bounds telegraph
// - 00200010 - phase 1
// - 00020001 - phase 2
// - 00040004 - remove telegraph (note that actual bounds are controlled by something else!)
// 02 = outer ring
// - 00020001 - become dangerous
// - 00080004 - restore to normal
// 03-1E = mid squares
// - 08000001 - init
// - 00200010 - become occupied
// - 02000001 - become free
// - 00800040 - player is standing for too long, will break soon
// - 00080004 - break
// - 00020001 - repair
// - arrangement:
// 04 0B
// 03 05 06 07 0E 0D 0C 0A
// 08 0F
// 09 10
// 17 1E
// 16 1D
// 11 13 14 15 1C 1B 1A 18
// 12 19
// 1F-2E = 1-man towers
// - 00020001 - appear
// - 00200010 - occupied
// - 00080004 - disappear
// - 08000001 - ? (spot animation)
// - arrangement:
// 25 26
// 21 xx 1F xx xx 20 xx 22
// 23 24
// xx xx
// xx xx
// 2B 2C
// 29 xx 27 xx xx 28 xx 2A
// 2D 2E
// 2F-3E = 2-man towers
// - 00020001 - appear
// - 00200010 - occupied by 1
// - 00800040 - occupied by 2
// - 00080004 - disappear
// - 08000001 - ? (spot animations)
// - arrangement (also covers intersecting square):
// 35 36
// 31 xx 2F xx xx 30 xx 32
// 33 34
// xx xx
// xx xx
// 3B 3C
// 39 xx 37 xx xx 38 xx 3A
// 3D 3E
// 3F-46 = 3-man towers
// - 00020001 - appear
// - 00200010 - occupied by 1
// - 00800040 - occupied by 2
// - 02000100 - occupied by 3
// - 00080004 - disappear
// - 08000001 - ? (spot animations)
// - arrangement:
// 3F 43
// 42 40 44 46
// 41 45
// 47-56 = 1-man tower falling orb
// 57-66 = 2-man tower falling orb
// 67-6E = 3-man tower falling orb

Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ public enum AID : uint
GrimEmbraceVisual = 40507, // DeathsHand->self, no cast, single-target, visual (hand spawn)
GrimEmbraceAOE = 40508, // Helper->self, 1.0s cast, range 8 width 8 rect
RazingVolleyParticleBeam = 40511, // CloudletOfDarkness->self, 8.0s cast, range 45 width 8 rect, criss-cross

RapidSequenceParticleBeam = 40512, // Boss->self, 7.0+0.7s cast, single-target, visual (party line stacks)
RapidSequenceParticleBeamRepeat = 40513, // Boss->self, no cast, single-target, visual (repeat)
RapidSequenceParticleBeamAOE = 40514, // Helper->self, no cast, range 50 width 6 rect
Expand All @@ -64,13 +63,14 @@ public enum AID : uint
FlareAOE = 40537, // Helper->players, no cast, range 60 circle with 25 falloff
UnholyDarkness = 41261, // Boss->self, 5.0s cast, single-target, visual (4-man stacks on healers)
UnholyDarknessAOE = 41262, // Helper->players, no cast, range 6 circle, 4-man stack
FloodOfDarkness1 = 40510, // Boss->location, 7.0s cast, range 60 circle, raidwide + arena transition to normal

FloodOfDarkness = 40510, // Boss->location, 7.0s cast, range 60 circle, raidwide + arena transition to normal
DelugeOfDarkness2 = 40449, // Boss->location, 8.0s cast, range 60 circle, raidwide + arena transition
Teleport2 = 40450, // Boss->location, no cast, single-target
AutoAttackAdd = 40501, // StygianShadow->player, no cast, single-target
DarkDominion = 40456, // Boss->self, 5.0s cast, range 60 circle, raidwide
TeleportAdd = 40494, // StygianShadow->location, no cast, single-target
Excruciate = 40502, // StygianShadow->player, 5.0s cast, range 4 circle, tankbuster
FloodOfDarknessAdd = 40503, // StygianShadow->self, 6.0s cast, range 40 circle, interruptible raidwide

ThirdArtOfDarknessR = 40480, // StygianShadow->self, 10.0+0.4s cast, single-target, visual (right first)
Expand Down Expand Up @@ -123,41 +123,36 @@ public enum AID : uint
ActivePivotParticleBeamCCWRepeat = 40470, // Boss->self, no cast, single-target
ActivePivotParticleBeamAOE = 40471, // Helper->self, no cast, range 80 width 18 rect

Excruciate = 40502, // StygianShadow->player, 5.0s cast, range 4 circle, tankbuster
LoomingChaosAdd = 41673, // StygianShadow->self, 7.0s cast, single-target, visual (position swaps)
LoomingChaosBoss = 41674, // Boss->self, 7.0s cast, single-target, visual (position swaps)
LoomingChaosAOE = 41675, // Helper->self, 7.7s cast, range 50 circle, raidwide + position swaps

//_Weaponskill_FeintParticleBeam = 40477, // Boss->self, 6.0+0.7s cast, single-target
FeintParticleBeam = 40477, // Boss->self, 6.0+0.7s cast, single-target, visual (chasers)
FeintParticleBeamAOEFirst = 40478, // Helper->location, 4.0s cast, range 3 circle
FeintParticleBeamAOERest = 40479, // Helper->location, no cast, range 3 circle

Evaporation = 40454, // StygianShadow->Boss, 2.0s cast, single-target, destroy add and transfer damage done to boss
FloodOfDarkness2 = 40455, // Boss->location, 7.0s cast, range 60 circle, raidwide + arena transition to normal

Enrage = 40533, // Boss->location, 12.0s cast, range 100 circle, enrage
}

public enum SID : uint
{
//_Gen_ArcaneDesign = 4180, // Boss->Boss, extra=0x0
//_Gen_LightningResistanceDown = 4386, // Helper/Boss->player, extra=0x1/0x2/0x3/0x4/0x5/0x6/0x7/0x8/0x9/0xA/0xB/0xC/0xD/0xE/0xF/0x10
DeadlyEmbrace = 4181, // none->player, extra=0x0
//_Gen_ = 2970, // none->player, extra=0x358
//_Gen_Heavy = 1595, // none->player, extra=0x4B
AbyssalEdge = 4182, // Boss->Boss, extra=0x0 (endeath/enaero stored)
//_Gen_Doom = 3364, // Helper/BallOfNaught->player, extra=0x0
//_Gen_MagicVulnerabilityUp = 2941, // Helper->player, extra=0x0
//_Gen_BrinkOfDeath = 44, // none->player, extra=0x0
//_Gen_Petrification = 3007, // Helper->player, extra=0x0
//_Gen_VeilOfDarkness = 4179, // Boss->Boss, extra=0x0
//_Gen_CloyingCondensation = 2532, // none->player, extra=0x0
//_Gen_ = 4388, // none->StygianShadow, extra=0x1052
//_Gen_ = 4387, // none->Boss, extra=0x1051
//_Gen_InnerDarkness = 4177, // none->player, extra=0x0
//_Gen_OuterDarkness = 4178, // none->player, extra=0x0
//_Gen_VulnerabilityDown = 2198, // none->StygianShadow/Boss, extra=0x0
//_Gen_DamageUp = 3129, // none->StygianShadow/Boss, extra=0x0
InnerDarkness = 4177, // none->player, extra=0x0, on main platform
OuterDarkness = 4178, // none->player, extra=0x0, on side platform
//_Gen_Rehabilitation = 4191, // none->Boss, extra=0x1/0x4/0x3/0x2
//_Gen_LifeDrain = 1377, // none->player, extra=0x0
//_Gen_CraftersGrace = 45, // player->player, extra=0x50
//_Gen_VulnerabilityUp = 4375, // none->player, extra=0x10/0x2/0xA/0x7/0x6/0x1/0x3/0x5/0x4/0x9/0x8/0xF
//_Gen_Terror = 66, // Helper->player, extra=0x0
CurseOfDarkness = 2387, // none->player, extra=0x0
//_Gen_SustainedDamage = 4149, // Helper/StygianTendrils/StygianShadow->player, extra=0x1/0x2/0x3
//_Gen_StabWound = 3061, // none->player, extra=0x0
//_Gen_StabWound = 3062, // none->player, extra=0x0
//_Gen_ThornyVine = 445, // none->player, extra=0x0
Expand All @@ -167,7 +162,6 @@ public enum SID : uint
//_Gen_LeftWithThee = 2242, // none->player, extra=0x341
//_Gen_Stun = 2656, // none->player, extra=0x0
//_Gen_RightWithThee = 2243, // none->player, extra=0x342
//_Gen_Bleeding = 3077, // none->player, extra=0x0
}

public enum IconID : uint
Expand All @@ -180,20 +174,21 @@ public enum IconID : uint
ThirdArtOfDarknessStack = 241, // StygianShadow->self
ThirdArtOfDarknessSpread = 242, // StygianShadow->self
EvilSeed = 551, // player->self
ThornyVine = 569, // StygianTendrils->self
//_Gen_Icon_12 = 12, // player->self
ThornyVineHatch = 569, // StygianTendrils->self
ThornyVineBait = 12, // player->self
RotateCW = 564, // Boss->self
RotateCCW = 565, // Boss->self
Excruciate = 342, // player->self
FeintParticleBeam = 197, // player->self
}

public enum TetherID : uint
{
GrimEmbraceForward = 300, // player->Boss
GrimEmbraceBackward = 301, // player->Boss
//_Gen_Tether_14 = 14, // Boss/StygianShadow->StygianShadow/Boss
//_Gen_Tether_165 = 165, // 4620->player
//_Gen_Tether_165 = 165, // Atomos->player
ThornyVine = 18, // StygianTendrils/player->player
//_Gen_Tether_38 = 38, // player->player
LoomingChaos = 38, // player->player
//_Gen_Tether_1 = 1, // StygianTendrils->StygianTendrils
}
Loading

0 comments on commit a7f1716

Please sign in to comment.