Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A Father First tiny changes #149

Merged
merged 1 commit into from
Jul 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions BossMod/Modules/Dawntrail/Quests/MSQ/AFatherFirst.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,10 @@ public override IEnumerable<AOEInstance> ActiveAOEs(int slot, Actor actor)
public override void OnCastStarted(Actor caster, ActorCastInfo spell)
{
if ((AID)spell.Action.ID is AID.DualBlows1 or AID.DualBlows2 or AID.DualBlows3 or AID.DualBlows4)
{
_aoes.Add(new(cone, caster.Position, spell.Rotation, spell.NPCFinishAt));
_aoes.SortBy(x => x.Activation);
}
if ((AID)spell.Action.ID is AID.SteeledStrike1 or AID.SteeledStrike2)
_aoes.Add(new(cross, caster.Position, spell.Rotation, spell.NPCFinishAt));
}
Expand Down Expand Up @@ -107,7 +110,7 @@ public override IEnumerable<AOEInstance> ActiveAOEs(int slot, Actor actor)
yield return new(_aoes[i].Shape, _aoes[i].Origin, default, _aoes[i].Activation, ArenaColor.Danger);
if (_aoes.Count > 9)
for (var i = 9; i < _aoes.Count; ++i)
yield return new(_aoes[i].Shape, _aoes[i].Origin, default, _aoes[i].Activation, Risky: false);
yield return new(_aoes[i].Shape, _aoes[i].Origin, default, _aoes[i].Activation);
}

public override void OnCastStarted(Actor caster, ActorCastInfo spell)
Expand All @@ -125,7 +128,7 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell)
}
}

class BrawlEnder(BossModule module) : Components.Knockback(module)
class BrawlEnder(BossModule module) : Components.Knockback(module, stopAtWall: true)
{
private DateTime activation;

Expand All @@ -135,6 +138,8 @@ public override IEnumerable<Source> Sources(int slot, Actor actor)
yield return new(actor.Position, 20, activation, default, actor.Rotation, Kind.DirForward);
}

public override bool DestinationUnsafe(int slot, Actor actor, WPos pos) => Module.FindComponent<FireVoidzone>()?.ActiveAOEs(slot, actor).Any(z => z.Shape.Check(pos, z.Origin, z.Rotation)) ?? false;

public override void OnCastStarted(Actor caster, ActorCastInfo spell)
{
if ((AID)spell.Action.ID == AID.BrawlEnder)
Expand Down