Add combat debug logging (gameMode, target id, distance)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
roberts 2026-03-30 14:25:24 -05:00
parent 513507e941
commit b60cc8a987

View file

@ -583,6 +583,7 @@ async function handleAction(action, params = {}) {
if (hostiles.length === 0) return { attacked: false, reason: 'no_hostiles' };
hostiles.sort((a, b) => a.dist - b.dist);
const target = hostiles[0].entity;
log('client', 'INFO', `Engaging ${target.name || target.type} (id=${target.id}, dist=${hostiles[0].dist.toFixed(1)}, gameMode=${bot.game?.gameMode})`);
// Sustained combat: keep attacking until target is dead or out of range
let hits = 0;