Skip to content

Commit

Permalink
Fixed M1S mouser bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
awgil committed Sep 25, 2024
1 parent 448bc83 commit 9f4eca5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
12 changes: 7 additions & 5 deletions BossMod/Modules/Dawntrail/Savage/RM01SBlackCat/Mouser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public int CellIndex(WPos pos)
class ElevateAndEviscerate(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.ElevateAndEviscerateShockwave))
{
private readonly Mouser? _mouser = module.FindComponent<Mouser>();
private Actor? _nextTarget; // target selection icon appears before cast start
private Actor? _nextTarget; // target selection icon appears in random order compared to cast start
public Actor? CurrentTarget; // for current mechanic
private DateTime _currentDeadline; // for current target - expected time when stun starts, which is deadline for positioning
private int _currentKnockbackDistance;
Expand Down Expand Up @@ -162,23 +162,25 @@ public override void OnEventIcon(Actor actor, uint iconID)
return;
if (_nextTarget != null)
ReportError($"Next target icon before previous was consumed");

_nextTarget = actor;
if (_currentDeadline != default)
CurrentTarget = actor;
}

public override void OnCastStarted(Actor caster, ActorCastInfo spell)
{
if ((AID)spell.Action.ID is AID.ElevateAndEviscerateKnockback or AID.ElevateAndEviscerateHit)
{
if (_nextTarget == null)
if (_currentDeadline != default)
{
ReportError("Cast started before target selection");
ReportError("Cast started before previous jump is resolved");
return;
}

CurrentTarget = _nextTarget;
_currentDeadline = Module.CastFinishAt(spell, 1.8f);
_currentKnockbackDistance = (AID)spell.Action.ID == AID.ElevateAndEviscerateKnockback ? 10 : 0;
_nextTarget = null;
}
}

Expand All @@ -187,7 +189,7 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell)
if (spell.Action == WatchedAction)
{
++NumCasts;
CurrentTarget = null;
_nextTarget = CurrentTarget = null;
_currentDeadline = default;
_currentKnockbackDistance = 0;
}
Expand Down
1 change: 0 additions & 1 deletion TODO
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
immediate plans
- fate modules
- m1s mouser bug
- war no target actions
- merge prs!
- downtime etc hints at phase start
Expand Down

0 comments on commit 9f4eca5

Please sign in to comment.