Skip to content

Commit

Permalink
merge fix
Browse files Browse the repository at this point in the history
  • Loading branch information
CarnifexOptimus committed Jan 22, 2025
1 parent 034d507 commit 4696ca0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
16 changes: 8 additions & 8 deletions BossMod/Modules/Dawntrail/Ultimate/FRU/P2MirrorMirror.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignme
// main tank should drag the boss away
// note: before mirror appears, we want to stay near center (to minimize movement no matter where mirror appears), so this works fine if blue mirror is zero
// TODO: verify distance calculation - we want boss to be at least 4m away from center
hints.AddForbiddenZone(ShapeDistance.InvertedCircle(Module.Center - 16 * _blueMirror, 1), DateTime.MaxValue);
hints.AddForbiddenZone(ShapeDistance.InvertedCircle(Arena.Center - 16 * _blueMirror, 1), DateTime.MaxValue);
}
}

Expand Down Expand Up @@ -111,7 +111,7 @@ public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignme
}
else
{
dir = Angle.FromDirection(origin.Actor.Position - Module.Center) + group switch
dir = Angle.FromDirection(origin.Actor.Position - Arena.Center) + group switch
{
0 => (RedRangedLeftOfMelee ? -90 : 90).Degrees(),
1 => (RedRangedLeftOfMelee ? 90 : -90).Degrees(),
Expand Down Expand Up @@ -142,7 +142,7 @@ public override void OnCastStarted(Actor caster, ActorCastInfo spell)
case AID.ScytheKick:
var activation = Module.CastFinishAt(spell, 0.7f);
FirstSources.Add(new(caster, activation));
var mirror = _blueMirror != null ? Module.Enemies(OID.FrozenMirror).Closest(Module.Center + 20 * _blueMirror.Value.ToDirection()) : null;
var mirror = _blueMirror != null ? Module.Enemies(OID.FrozenMirror).Closest(Arena.Center + 20 * _blueMirror.Value.ToDirection()) : null;
if (mirror != null)
FirstSources.Add(new(mirror, activation));
break;
Expand All @@ -151,8 +151,8 @@ public override void OnCastStarted(Actor caster, ActorCastInfo spell)
if (SecondSources.Count == 2 && _blueMirror != null)
{
// order two red mirrors so that first one is closer to boss and second one closer to blue mirror; if both are same distance, select CW ones (arbitrary)
var d1 = (Angle.FromDirection(SecondSources[0].Actor.Position - Module.Center) - _blueMirror.Value).Normalized();
var d2 = (Angle.FromDirection(SecondSources[1].Actor.Position - Module.Center) - _blueMirror.Value).Normalized();
var d1 = (Angle.FromDirection(SecondSources[0].Actor.Position - Arena.Center) - _blueMirror.Value).Normalized();
var d2 = (Angle.FromDirection(SecondSources[1].Actor.Position - Arena.Center) - _blueMirror.Value).Normalized();
var d1abs = d1.Abs();
var d2abs = d2.Abs();
var swap = d2abs.AlmostEqual(d1abs, 0.1f)
Expand All @@ -161,7 +161,7 @@ public override void OnCastStarted(Actor caster, ActorCastInfo spell)
if (swap)
(SecondSources[1], SecondSources[0]) = (SecondSources[0], SecondSources[1]);

RedRangedLeftOfMelee = (SecondSources[0].Actor.Position - Module.Center).OrthoL().Dot(SecondSources[1].Actor.Position - Module.Center) > 0;
RedRangedLeftOfMelee = (SecondSources[0].Actor.Position - Arena.Center).OrthoL().Dot(SecondSources[1].Actor.Position - Arena.Center) > 0;
}
break;
}
Expand All @@ -182,7 +182,7 @@ public P2MirrorMirrorBanish(BossModule module) : base(module)
if (proteans != null && proteans.FirstSources.Count == 2 && proteans.SecondSources.Count == 2)
{
_anchorMelee = proteans.FirstSources[0].Actor.Position;
_anchorRanged = module.Center + 0.5f * (proteans.SecondSources[1].Actor.Position - module.Center);
_anchorRanged = Arena.Center + 0.5f * (proteans.SecondSources[1].Actor.Position - Arena.Center);
foreach (var (slot, group) in Service.Config.Get<FRUConfig>().P2MirrorMirror2SpreadSpots.Resolve(Raid))
{
_aroundRanged[slot] = group >= 4;
Expand Down Expand Up @@ -220,7 +220,7 @@ public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignme
private WPos CalculatePrepositionLocation(bool aroundRanged, bool leftSide, Angle angle)
{
var anchor = aroundRanged ? _anchorRanged : _anchorMelee;
var offset = Angle.FromDirection(anchor - Module.Center) + (leftSide ? angle : -angle);
var offset = Angle.FromDirection(anchor - Arena.Center) + (leftSide ? angle : -angle);
return anchor + 6 * offset.ToDirection();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -354,8 +354,8 @@ public override void DrawArenaForeground(int pcSlot, Actor pc)
var dir = (bait.Rotation + i * rot).ToDirection();
var side = _shape.HalfWidth * dir.OrthoR();
var end = bait.Source.Position + _shape.LengthFront * dir;
Arena.AddLine(bait.Source.Position + side, end + side, ArenaColor.Danger);
Arena.AddLine(bait.Source.Position - side, end - side, ArenaColor.Danger);
Arena.AddLine(bait.Source.Position + side, end + side, Colors.Danger);
Arena.AddLine(bait.Source.Position - side, end - side, Colors.Danger);
}
}
else
Expand Down
4 changes: 2 additions & 2 deletions BossMod/Modules/Dawntrail/Ultimate/FRU/P4Preposition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot
{
if (playerSlot >= PartyState.MaxPartySize)
{
customColor = ArenaColor.Object;
customColor = Colors.Object;
return PlayerPriority.Danger;
}
return PlayerPriority.Irrelevant;
Expand All @@ -36,6 +36,6 @@ public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot
public override void DrawArenaForeground(int pcSlot, Actor pc)
{
foreach (var f in _fragment)
Arena.AddCircle(f.Position, f.HitboxRadius, ArenaColor.Object);
Arena.AddCircle(f.Position, f.HitboxRadius, Colors.Object);
}
}

0 comments on commit 4696ca0

Please sign in to comment.