From 4dd1a344c6474087a3f8782dd54f5c7b4acc67ed Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Wed, 23 Aug 2023 00:24:50 +0200 Subject: area connections and town maps --- resources/js/game.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'resources/js/game.js') diff --git a/resources/js/game.js b/resources/js/game.js index 7b40015..9370382 100644 --- a/resources/js/game.js +++ b/resources/js/game.js @@ -111,6 +111,7 @@ const Game = { } else if (Memory.state.opponent.type === 'trainer') { if (Memory.state.opponent.activeMonster === Memory.state.opponent.monsters[Memory.state.opponent.monsters.length - 1]) { Memory.state.currentArea.trainerProgress++; + Memory.state.currentArea.monsterProgress = 0; if (Memory.state.currentArea.encounters.length > 0) { await Game.encounterWildMonster(); } else { @@ -708,6 +709,8 @@ const Game = { if (Game.isTown(Memory.state.currentArea)) { UI.elements.sceneBattle.classList.add('hidden'); UI.elements.sceneTown.classList.remove('hidden'); + + UI.drawTown(); } else { UI.elements.sceneTown.classList.add('hidden'); UI.elements.sceneBattle.classList.remove('hidden'); -- cgit v1.2.3