Skip to content

Commit

Permalink
fix names in new modules
Browse files Browse the repository at this point in the history
  • Loading branch information
xanunderscore committed Feb 24, 2025
1 parent fb899e7 commit 0c09afa
Show file tree
Hide file tree
Showing 13 changed files with 178 additions and 242 deletions.
4 changes: 2 additions & 2 deletions BossMod/Components/BaitAway.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
// otherwise we show own bait as as outline (and warn if player is clipping someone) and other baits as filled (and warn if player is being clipped)
public class GenericBaitAway(BossModule module, ActionID aid = default, bool alwaysDrawOtherBaits = true, bool centerAtTarget = false) : CastCounter(module, aid)
{
public record struct Bait(Actor Source, Actor Target, AOEShape Shape, DateTime Activation = default)
public record struct Bait(Actor Source, Actor Target, AOEShape Shape, DateTime Activation = default, bool IgnoreRotation = false)
{
public readonly Angle Rotation => Source != Target ? Angle.FromDirection(Target.Position - Source.Position) : Source.Rotation;
public readonly Angle Rotation => IgnoreRotation ? default : Source != Target ? Angle.FromDirection(Target.Position - Source.Position) : Source.Rotation;
}

public bool AlwaysDrawOtherBaits = alwaysDrawOtherBaits; // if false, other baits are drawn only if they are clipping a player
Expand Down
29 changes: 13 additions & 16 deletions BossMod/Modules/Shadowbringers/Dungeon/D02DohnMheg/D021AencThon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,19 @@ public enum OID : uint

public enum AID : uint
{
_AutoAttack_Attack = 872, // Boss->player, no cast, single-target
_Weaponskill_CandyCane = 8857, // Boss->player, 4.0s cast, single-target
_Weaponskill_Hydrofall = 8871, // Boss->self, 3.0s cast, single-target
_Weaponskill_Hydrofall1 = 8893, // Helper->location, 3.0s cast, range 6 circle
_Weaponskill_LaughingLeap = 8852, // Boss->location, 4.0s cast, range 4 circle
_Weaponskill_LaughingLeap1 = 8840, // Boss->players, no cast, range 4 circle
_Weaponskill_Landsblood = 7822, // Boss->self, 3.0s cast, range 40 circle
_Weaponskill_Landsblood1 = 7899, // Boss->self, no cast, range 40 circle
_Weaponskill_Geyser = 8800, // Helper->self, no cast, range 6 circle
CandyCane = 8857, // Boss->player, 4.0s cast, single-target
Hydrofall = 8893, // Helper->location, 3.0s cast, range 6 circle
LaughingLeap = 8852, // Boss->location, 4.0s cast, range 4 circle
LaughingLeapStack = 8840, // Boss->players, no cast, range 4 circle
Landsblood = 7822, // Boss->self, 3.0s cast, range 40 circle
Geyser = 8800, // Helper->self, no cast, range 6 circle
}

class CandyCane(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID._Weaponskill_CandyCane));
class Hydrofall(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID._Weaponskill_Hydrofall1), 6);
class LaughingLeap(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID._Weaponskill_LaughingLeap), 4);
class LaughingLeap2(BossModule module) : Components.StackWithIcon(module, 62, ActionID.MakeSpell(AID._Weaponskill_LaughingLeap1), 4, 5.15f);
class Landsblood(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID._Weaponskill_Landsblood));
class CandyCane(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.CandyCane));
class Hydrofall(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Hydrofall), 6);
class LaughingLeap(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.LaughingLeap), 4);
class LaughingLeapStack(BossModule module) : Components.StackWithIcon(module, 62, ActionID.MakeSpell(AID.LaughingLeapStack), 4, 5.15f);
class Landsblood(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.Landsblood));

class Geyser(BossModule module) : Components.GenericAOEs(module)
{
Expand Down Expand Up @@ -54,7 +51,7 @@ public override void OnActorEAnim(Actor actor, uint state)

public override void OnEventCast(Actor caster, ActorCastEvent spell)
{
if (spell.Action.ID == (uint)AID._Weaponskill_Geyser)
if (spell.Action.ID == (uint)AID.Geyser)
Geysers.RemoveAll(g => g.Origin.AlmostEqual(caster.Position, 1));
}
}
Expand All @@ -67,7 +64,7 @@ public AencThonLordOfTheLingeringGazeStates(BossModule module) : base(module)
.ActivateOnEnter<CandyCane>()
.ActivateOnEnter<Hydrofall>()
.ActivateOnEnter<LaughingLeap>()
.ActivateOnEnter<LaughingLeap2>()
.ActivateOnEnter<LaughingLeapStack>()
.ActivateOnEnter<Landsblood>()
.ActivateOnEnter<Geyser>();
}
Expand Down
20 changes: 10 additions & 10 deletions BossMod/Modules/Shadowbringers/Dungeon/D06Amaurot/D063Therion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ public enum AID : uint

DeathlyRayVisualFaces1 = 15579, // Boss->self, 3.0s cast, single-target
DeathlyRayVisualFaces2 = 16786, // Boss->self, no cast, single-target
DeathlyRayVisualThereion1 = 17107, // Helper->self, 5.0s cast, range 80 width 6 rect
DeathlyRayVisualThereion2 = 15582, // Boss->self, 3.0s cast, single-target
DeathlyRayVisualThereion3 = 16785, // Boss->self, no cast, single-target
DeathlyRayVisualTherion1 = 17107, // Helper->self, 5.0s cast, range 80 width 6 rect
DeathlyRayVisualTherion2 = 15582, // Boss->self, 3.0s cast, single-target
DeathlyRayVisualTherion3 = 16785, // Boss->self, no cast, single-target

DeathlyRayFacesFirst = 15580, // TheFaceOfTheBeast->self, no cast, range 60 width 6 rect
DeathlyRayFacesRest = 15581, // Helper->self, no cast, range 60 width 6 rect
DeathlyRayThereionFirst = 15583, // Helper->self, no cast, range 60 width 6 rect
DeathlyRayThereionRest = 15585, // Helper->self, no cast, range 60 width 6 rect
DeathlyRayTherionFirst = 15583, // Helper->self, no cast, range 60 width 6 rect
DeathlyRayTherionRest = 15585, // Helper->self, no cast, range 60 width 6 rect
Misfortune = 15586, // Helper->location, 3.0s cast, range 6 circle
}

Expand Down Expand Up @@ -106,16 +106,16 @@ class DeathlyRayTherion(BossModule module) : Components.GenericAOEs(module)

public override void OnCastStarted(Actor caster, ActorCastInfo spell)
{
if ((AID)spell.Action.ID == AID.DeathlyRayVisualThereion1)
if ((AID)spell.Action.ID == AID.DeathlyRayVisualTherion1)
_aoe = new(new AOEShapeRect(60, 3), caster.Position, spell.Rotation, Module.CastFinishAt(spell));
}

public override void OnEventCast(Actor caster, ActorCastEvent spell)
{
switch ((AID)spell.Action.ID)
{
case AID.DeathlyRayThereionFirst:
case AID.DeathlyRayThereionRest:
case AID.DeathlyRayTherionFirst:
case AID.DeathlyRayTherionRest:
if (++NumCasts >= 5)
{
_aoe = null;
Expand Down Expand Up @@ -163,8 +163,8 @@ class Border : Components.GenericAOEs

public int Stage { get; private set; }

private BitMask MissingPlatforms = new();
private BitMask UnsafePlatforms = new();
private BitMask MissingPlatforms;
private BitMask UnsafePlatforms;

public IEnumerable<WPos> UnsafePlatformPositions => SidePlatforms.Where((_, i) => UnsafePlatforms[i]).Select(p => OriginalCenter + p);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,12 @@

public enum AID : uint
{
_AutoAttack_ = 18280, // Boss->player, no cast, single-target
_Spell_Shadowbolt = 18281, // Boss->player, 4.0s cast, single-target
_Spell_ImmortalAnathema = 18851, // Boss->self, 4.0s cast, range 60 circle
_Spell_Tribulation1 = 18283, // Boss->self, 3.0s cast, single-target
_Spell_Tribulation = 18852, // Helper->location, 3.0s cast, range 3 circle
_Spell_DarkShock = 18286, // Boss->self, 3.0s cast, single-target
_Spell_DarkShock1 = 18287, // Helper->location, 3.0s cast, range 6 circle
_Ability_Sweep = 18288, // Helper->player, no cast, single-target
_Ability_DeepClean = 18289, // Helper->player, no cast, single-target
_Spell_DarkPulse = 18282, // Boss->players, 5.0s cast, range 6 circle
_Spell_DarkWell = 18285, // Helper->player, 5.0s cast, range 5 circle
_Spell_DarkWell1 = 18284, // Boss->self, no cast, single-target
_Spell_MovementMagick = 18713, // Boss->self, 3.0s cast, single-target
Shadowbolt = 18281, // Boss->player, 4.0s cast, single-target
ImmortalAnathema = 18851, // Boss->self, 4.0s cast, range 60 circle
Tribulation = 18852, // Helper->location, 3.0s cast, range 3 circle
DarkShock = 18287, // Helper->location, 3.0s cast, range 6 circle
DarkPulse = 18282, // Boss->players, 5.0s cast, range 6 circle
DarkWell = 18285, // Helper->player, 5.0s cast, range 5 circle
}

public enum OID : uint
Expand All @@ -25,12 +18,12 @@ public enum OID : uint
DirtPile = 0x1EAEAE
}

class Tribulation(BossModule module) : Components.PersistentVoidzoneAtCastTarget(module, 3, ActionID.MakeSpell(AID._Spell_Tribulation), m => m.Enemies(OID.DirtPile).Where(x => x.EventState != 7), 0);
class ImmortalAnathema(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID._Spell_ImmortalAnathema));
class DarkPulse(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID._Spell_DarkPulse), 6);
class DarkWell(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID._Spell_DarkWell), 5);
class DarkShock(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID._Spell_DarkShock1), 6);
class Shadowbolt(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID._Spell_Shadowbolt));
class Tribulation(BossModule module) : Components.PersistentVoidzoneAtCastTarget(module, 3, ActionID.MakeSpell(AID.Tribulation), m => m.Enemies(OID.DirtPile).Where(x => x.EventState != 7), 0);
class ImmortalAnathema(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.ImmortalAnathema));
class DarkPulse(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.DarkPulse), 6);
class DarkWell(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.DarkWell), 5);
class DarkShock(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.DarkShock), 6);
class Shadowbolt(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.Shadowbolt));

// not sure about radius, sweep trigger is incredibly janky
// filter out brooms who are too far outside the arena since they don't affect players and the AOE lingering on minimap is annoying
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class DirectSeeding(BossModule module) : BossComponent(module)
new(-5, -15), new(5, -15), new(-15, -5), new(15, -5),
new(-15, 5), new(5, 5), new(-5, 15), new(15, 15)
];
private Angle? CurrentTileset = null;
private Angle? CurrentTileset;
private IEnumerable<Actor> Seeds => WorldState.Actors.Where(x => (OID)x.OID is OID.LeannanSeed1 or OID.LeannanSeed2 or OID.LeannanSeed3 or OID.LeannanSeed4);
private IEnumerable<WPos> TileCenters => CurrentTileset == null ? [] : Tileset.Select(t => t.Rotate(CurrentTileset.Value) + Arena.Center);

Expand Down Expand Up @@ -118,7 +118,7 @@ public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignme
if (zone(actor.Position) > 0)
{
// normally the position of the seed we're carrying will lag behind our actual position in accordance with standard server latency
// jumping forces the server to acknowledge our current position, so we jump as soon as we enter a safe tile and then drop the seed
// jumping forces the server to acknowledge our current position (i think???) so we jump as soon as we enter a safe tile and then drop the seed
hints.WantJump = true;
if (actor.PosRot.Y > -11)
hints.StatusesToCancel.Add(((uint)SID.Transporting, default));
Expand Down
49 changes: 23 additions & 26 deletions BossMod/Modules/Shadowbringers/Dungeon/D09GrandCosmos/D093Lugus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,24 @@ public enum OID : uint

public enum AID : uint
{
_AutoAttack_Attack = 870, // Boss->player, no cast, single-target
_Weaponskill_ScorchingRight = 18274, // Boss->self, 5.0s cast, range 40 180-degree cone
_Spell_BlackFlame = 18269, // Helper->players, no cast, range 6 circle
_Weaponskill_OtherworldlyHeat = 18267, // Boss->self, 5.0s cast, single-target
_Weaponskill_OtherworldlyHeat1 = 18268, // Helper->self, 2.5s cast, range 10 width 4 cross
_Weaponskill_CaptiveBolt = 18276, // Boss->player, 5.0s cast, single-target
_Weaponskill_MortalFlame = 18265, // Boss->self, 5.0s cast, single-target
_Weaponskill_MortalFlame1 = 18266, // Helper->player, 5.5s cast, single-target
_Weaponskill_FiresDomain = 18270, // Boss->self, 8.0s cast, single-target
ScorchingRight = 18274, // Boss->self, 5.0s cast, range 40 180-degree cone
ScorchingLeft = 18275, // Boss->self, 5.0s cast, range 40 180-degree cone
BlackFlame = 18269, // Helper->players, no cast, range 6 circle
OtherworldlyHeat1 = 18268, // Helper->self, 2.5s cast, range 10 width 4 cross
CaptiveBolt = 18276, // Boss->player, 5.0s cast, single-target

// no idea what the difference is between these
FiresDomain1 = 18272, // Boss->player, no cast, width 4 rect charge
FiresDomain2 = 18271, // Boss->player, no cast, width 4 rect charge
_Weaponskill_FiresIre = 18273, // Boss->self, 2.0s cast, range 20 90-degree cone
_Weaponskill_CullingBlade = 18277, // Boss->self, 6.0s cast, range 80 circle
_Ability_ = 18278, // Helper->self, no cast, range 80 circle
_Weaponskill_Plummet = 18279, // Helper->self, 1.6s cast, range 3 circle
_Weaponskill_ScorchingLeft = 18275, // Boss->self, 5.0s cast, range 40 180-degree cone

FiresIre = 18273, // Boss->self, 2.0s cast, range 20 90-degree cone
CullingBlade = 18277, // Boss->self, 6.0s cast, range 80 circle
Plummet = 18279, // Helper->self, 1.6s cast, range 3 circle
}

public enum SID : uint
{
_Gen_VulnerabilityUp = 1789, // Helper/Boss->player, extra=0x1/0x2/0x3/0x4/0x5/0x6/0x7/0x8
_Gen_MortalFlame = 2136, // Helper->player, extra=0x0/0x50/0xA0/0xF0/0x140
MortalFlame = 2136, // Helper->player, extra=0x0/0x50/0xA0/0xF0/0x140
}

public enum IconID : uint
Expand All @@ -43,13 +39,13 @@ public enum IconID : uint
Tankbuster = 218 // player
}

class CullingBlade(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID._Weaponskill_CullingBlade));
class CaptiveBolt(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID._Weaponskill_CaptiveBolt));
class Plummet(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID._Weaponskill_Plummet), new AOEShapeCircle(3));
class ScorchingRight(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID._Weaponskill_ScorchingRight), new AOEShapeCone(40, 90.Degrees()));
class ScorchingLeft(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID._Weaponskill_ScorchingLeft), new AOEShapeCone(40, 90.Degrees()));
class OtherworldlyHeat(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID._Weaponskill_OtherworldlyHeat1), new AOEShapeCross(10, 2));
class FiresIre(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID._Weaponskill_FiresIre), new AOEShapeCone(20, 45.Degrees()));
class CullingBlade(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.CullingBlade));
class CaptiveBolt(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.CaptiveBolt));
class Plummet(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Plummet), new AOEShapeCircle(3));
class ScorchingRight(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ScorchingRight), new AOEShapeCone(40, 90.Degrees()));
class ScorchingLeft(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.ScorchingLeft), new AOEShapeCone(40, 90.Degrees()));
class OtherworldlyHeat(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.OtherworldlyHeat1), new AOEShapeCross(10, 2));
class FiresIre(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.FiresIre), new AOEShapeCone(20, 45.Degrees()));
class BlackFlame(BossModule module) : BossComponent(module)
{
private BitMask targets;
Expand All @@ -71,7 +67,7 @@ public override void OnEventIcon(Actor actor, uint iconID, ulong targetID)

public override void OnEventCast(Actor caster, ActorCastEvent spell)
{
if ((AID)spell.Action.ID == AID._Spell_BlackFlame)
if ((AID)spell.Action.ID == AID.BlackFlame)
{
targets.Clear(Raid.FindSlot(spell.MainTargetID));
if (!targets.Any())
Expand Down Expand Up @@ -110,6 +106,7 @@ public override void AddHints(int slot, Actor actor, TextHints hints)

private bool IntersectFurniture(Actor furniture, WPos player) => IntersectBubble(furniture, player, 2, 10) || IntersectBubble(furniture, player, 10, 2);

// TODO replace with Intersect.CircleAARect
private bool IntersectBubble(Actor furniture, WPos rectCenter, float halfWidth, float halfHeight)
{
var radius = furniture.HitboxRadius;
Expand Down Expand Up @@ -142,13 +139,13 @@ private void SetTimer(int slot, float timer)

public override void OnStatusGain(Actor actor, ActorStatus status)
{
if ((SID)status.ID == SID._Gen_MortalFlame && actor.Type != ActorType.Enemy)
if ((SID)status.ID == SID.MortalFlame && actor.Type != ActorType.Enemy)
SetTimer(Raid.FindSlot(actor.InstanceID), (float)(status.ExpireAt - WorldState.CurrentTime).TotalSeconds);
}

public override void OnStatusLose(Actor actor, ActorStatus status)
{
if ((SID)status.ID == SID._Gen_MortalFlame)
if ((SID)status.ID == SID.MortalFlame)
SetTimer(Raid.FindSlot(actor.InstanceID), 0);
}

Expand Down
Loading

0 comments on commit 0c09afa

Please sign in to comment.