diff --git a/debug_loot_capture.png b/debug_loot_capture.png index a66cec5..0ad3f8b 100644 Binary files a/debug_loot_capture.png and b/debug_loot_capture.png differ diff --git a/debug_loot_detected.png b/debug_loot_detected.png index 128d063..877f929 100644 Binary files a/debug_loot_detected.png and b/debug_loot_detected.png differ diff --git a/debug_loot_edges.png b/debug_loot_edges.png index 5d058fd..3191a8e 100644 Binary files a/debug_loot_edges.png and b/debug_loot_edges.png differ diff --git a/src/Poe2Trade.Bot/BossRunExecutor.cs b/src/Poe2Trade.Bot/BossRunExecutor.cs index 8b675d5..9630330 100644 --- a/src/Poe2Trade.Bot/BossRunExecutor.cs +++ b/src/Poe2Trade.Bot/BossRunExecutor.cs @@ -390,7 +390,7 @@ public class BossRunExecutor : GameExecutor } // Wait for death animation + loot settle, keep updating fight position from YOLO - var deathPos = await PollYoloDuringWait(3000); + var deathPos = await PollYoloDuringWait(2000); if (deathPos != null) { fightWorldX = deathPos.Value.X; @@ -399,7 +399,7 @@ public class BossRunExecutor : GameExecutor // Walk to well and click the closest match to screen center Log.Information("Phase {Phase} done, walking to well", phase); - await Sleep(1500); + await Sleep(500); await WalkToWorldPosition(wellWorldX, wellWorldY); await Sleep(500); await ClickClosestTemplateToCenter(CathedralWellTemplate); @@ -461,8 +461,8 @@ public class BossRunExecutor : GameExecutor Log.Information("Walking to fight position ({X:F0},{Y:F0})", fightWorldX, fightWorldY); await WalkToWorldPosition(fightWorldX, fightWorldY, cancelWhen: IsBossAlive); await Sleep(300); - Log.Information("Attacking at ring fight position"); - await AttackBossUntilGone(fightWorldX, fightWorldY); + Log.Information("Attacking at ring fight position (no chase — boss will come to us)"); + await AttackBossUntilGone(fightWorldX, fightWorldY, chase: false); if (_stopped) return; StopBossDetection(); @@ -625,7 +625,8 @@ public class BossRunExecutor : GameExecutor /// Returns the last world position where YOLO spotted the boss, or null. /// private async Task<(double X, double Y)?> AttackBossUntilGone( - double fightAreaX = double.NaN, double fightAreaY = double.NaN, int timeoutMs = 120_000) + double fightAreaX = double.NaN, double fightAreaY = double.NaN, + int timeoutMs = 120_000, bool chase = true) { // Wait for boss to actually appear before attacking if (!await WaitForBossSpawn()) @@ -637,15 +638,14 @@ public class BossRunExecutor : GameExecutor (double X, double Y)? lastBossWorldPos = null; var yoloLogCount = 0; - // Subscribe to YOLO events for real-time chase updates - // (main loop is too slow due to template matching to effectively track boss) + // Subscribe to YOLO events — aim mouse at boss, optionally chase with WASD void OnBossDetected(BossSnapshot snapshot) { if (snapshot.Bosses.Count == 0) return; var boss = snapshot.Bosses[0]; _combatTargetX = boss.Cx; _combatTargetY = boss.Cy; - _combat.SetChaseTarget(boss.Cx, boss.Cy); + if (chase) _combat.SetChaseTarget(boss.Cx, boss.Cy); } _bossDetector.BossDetected += OnBossDetected;