This commit is contained in:
Boki 2026-02-22 11:38:24 -05:00
parent 011269acab
commit bb8f50116a
5 changed files with 98 additions and 89 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 MiB

After

Width:  |  Height:  |  Size: 7.2 MiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 MiB

After

Width:  |  Height:  |  Size: 6.2 MiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 352 KiB

After

Width:  |  Height:  |  Size: 332 KiB

Before After
Before After

View file

@ -58,6 +58,8 @@ public class BossRunExecutor : GameExecutor
public override void Stop() public override void Stop()
{ {
base.Stop(); base.Stop();
_nav.Frozen = false;
FightPosition = null;
Log.Information("Boss run executor stop requested"); Log.Information("Boss run executor stop requested");
} }
@ -358,7 +360,10 @@ public class BossRunExecutor : GameExecutor
FightPosition = (fightWorldX, fightWorldY); FightPosition = (fightWorldX, fightWorldY);
await WalkToWorldPosition(fightWorldX, fightWorldY, cancelWhen: IsBossAlive); await WalkToWorldPosition(fightWorldX, fightWorldY, cancelWhen: IsBossAlive);
_nav.Frozen = true; // Lock canvas — position tracking only _nav.Frozen = true; // Lock canvas — position tracking only
if (_stopped) { _nav.Frozen = false; return; }
try
{
if (_stopped) return;
// 3x fight-then-well loop // 3x fight-then-well loop
for (var phase = 1; phase <= 3; phase++) for (var phase = 1; phase <= 3; phase++)
@ -455,9 +460,13 @@ public class BossRunExecutor : GameExecutor
if (_stopped) return; if (_stopped) return;
StopBossDetection(); StopBossDetection();
Log.Information("Fight complete");
}
finally
{
_nav.Frozen = false; _nav.Frozen = false;
FightPosition = null; FightPosition = null;
Log.Information("Fight complete"); }
} }
/// <summary> /// <summary>

View file

@ -87,7 +87,7 @@ internal sealed class D2dEnemyBoxLayer : ID2dOverlayLayer, IDisposable
if (state.FightPosition is var (fx, fy)) if (state.FightPosition is var (fx, fy))
{ {
const double worldToScreen = 835.0 / 97.0; // inverse of screenToWorld const double worldToScreen = 835.0 / 97.0; // inverse of screenToWorld
const int screenCx = 1280, screenCy = 720; const int screenCx = 1280, screenCy = 660; // player character screen position
var wp = state.NavPosition; var wp = state.NavPosition;
var sx = (float)(screenCx + (fx - wp.X) * worldToScreen); var sx = (float)(screenCx + (fx - wp.X) * worldToScreen);
var sy = (float)(screenCy + (fy - wp.Y) * worldToScreen); var sy = (float)(screenCy + (fy - wp.Y) * worldToScreen);