From d3e65b98ca932aef1e05e33d74eaf62be520cdd4 Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Fri, 18 Aug 2023 16:07:39 +0200 Subject: inventory and items --- resources/js/game.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'resources/js/game.js') diff --git a/resources/js/game.js b/resources/js/game.js index 140f9d5..e383677 100644 --- a/resources/js/game.js +++ b/resources/js/game.js @@ -462,6 +462,7 @@ UI.elements.menuCatch.addEventListener('click', Game.catchMonster); state.enemy.monster = await fetchMonster(possibleStarterMonsters[Math.round(Math.random() * (possibleStarterMonsters.length - 1))]); state.partyMonsters = [ + await fetchMonster('dollfin'), await fetchMonster(possibleStarterMonsters[Math.round(Math.random() * (possibleStarterMonsters.length - 1))]), await fetchMonster('corvix'), await fetchMonster('lunight'), @@ -477,6 +478,22 @@ UI.elements.menuCatch.addEventListener('click', Game.catchMonster); state.activeMonster = state.partyMonsters[0]; state.activeTechnique = state.activeMonster.activeTechniques[0]; + state.inventory = [ + new InventoryItem(await fetchItem('tuxeball')), + new InventoryItem(await fetchItem('ancient_egg')), + new InventoryItem(await fetchItem('sweet_sand')), + new InventoryItem(await fetchItem('tectonic_drill')), + new InventoryItem(await fetchItem('surfboard')), + new InventoryItem(await fetchItem('sledgehammer')), + new InventoryItem(await fetchItem('raise_melee')), + new InventoryItem(await fetchItem('raise_speed')), + new InventoryItem(await fetchItem('mm_fire')), + new InventoryItem(await fetchItem('mm_water')), + new InventoryItem(await fetchItem('cureall')), + new InventoryItem(await fetchItem('potion')), + new InventoryItem(await fetchItem('super_potion')), + ]; + UI.drawEnemyMonster(); UI.drawActiveMonster(); UI.drawActiveTechniques(); -- cgit v1.2.3