Increase NPC interaction radius to 200px for easier triggering

This commit is contained in:
justin committed 2026-05-20 21:44:31 -07:00
1 parent 63ba5e9fc0
commit a4b357c680
1 file changed
+2 -2
+2 -2
View File
@@ -430,7 +430,7 @@ class Game {
const dx = this.state.npcWorldX - this.state.worldX; const dx = this.state.npcWorldX - this.state.worldX;
const dy = this.state.npcWorldY - this.state.worldY; const dy = this.state.npcWorldY - this.state.worldY;
const dist = Math.sqrt(dx * dx + dy * dy); const dist = Math.sqrt(dx * dx + dy * dy);
const near = !(this.state.npcWorldX === 0 && this.state.npcWorldY === 0) && dist < 120; const near = !(this.state.npcWorldX === 0 && this.state.npcWorldY === 0) && dist < 200;
const hint = document.getElementById('map-talk-hint'); const hint = document.getElementById('map-talk-hint');
const bub = document.getElementById('npc-bubble'); const bub = document.getElementById('npc-bubble');
@@ -492,7 +492,7 @@ class Game {
if (this.state.npcWorldX === 0 && this.state.npcWorldY === 0) return false; if (this.state.npcWorldX === 0 && this.state.npcWorldY === 0) return false;
const dx = this.state.npcWorldX - this.state.worldX; const dx = this.state.npcWorldX - this.state.worldX;
const dy = this.state.npcWorldY - this.state.worldY; const dy = this.state.npcWorldY - this.state.worldY;
return Math.sqrt(dx * dx + dy * dy) < 120; return Math.sqrt(dx * dx + dy * dy) < 200;
} }
_talkToNPC() { _talkToNPC() {