Browse Source

Adjust monster spawn limits and make flee remove monsters

- Max monsters now equals player level (capped at 4)
  - Level 1: 1 monster
  - Level 2: 2 monsters
  - Level 3: 3 monsters
  - Level 4+: 4 monsters
- Previously was 2x player level (uncapped)
- Fleeing from combat now removes all monsters (they scatter)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
master
HikeMap User 4 weeks ago
parent
commit
897105c8fc
  1. 10
      index.html

10
index.html

@ -6410,8 +6410,9 @@
return nearestDist <= maxDistanceMeters ? { monster: nearest, distance: nearestDist } : null; return nearestDist <= maxDistanceMeters ? { monster: nearest, distance: nearestDist } : null;
} }
// Max monsters = 2 per player level
const getMaxMonsters = () => 2 * (playerStats?.level || 1);
// Max monsters = player level, capped at 4
// Level 1: 1 monster, Level 2: 2, Level 3: 3, Level 4+: 4
const getMaxMonsters = () => Math.min(playerStats?.level || 1, 4);
// ========================================== // ==========================================
// END RPG COMBAT SYSTEM DEFINITIONS // END RPG COMBAT SYSTEM DEFINITIONS
@ -17015,6 +17016,11 @@
playerStats.hp = combatState.player.hp; playerStats.hp = combatState.player.hp;
playerStats.mp = combatState.player.mp; playerStats.mp = combatState.player.mp;
savePlayerStats(); savePlayerStats();
// Remove all monsters when fleeing - they scatter and disappear
const monsterIds = combatState.monsters.map(m => m.id);
monsterIds.forEach(id => removeMonster(id));
updateRpgHud(); updateRpgHud();
setTimeout(closeCombatUI, 1000); setTimeout(closeCombatUI, 1000);

Loading…
Cancel
Save