diff options
author | Daniel Weipert <code@drogueronin.de> | 2023-08-20 14:32:40 +0200 |
---|---|---|
committer | Daniel Weipert <code@drogueronin.de> | 2023-08-20 14:32:40 +0200 |
commit | b227fc9c2ef361f8aa5ee2f24aa1ade6bc972a73 (patch) | |
tree | 8fdd7e980107bfd8fcd58ffe21f2299b37d310c8 /resources/js/main.js | |
parent | 2c7890e90e1aad371854cfe60ad63eaa88e64fec (diff) |
area progress
Diffstat (limited to 'resources/js/main.js')
-rw-r--r-- | resources/js/main.js | 54 |
1 files changed, 15 insertions, 39 deletions
diff --git a/resources/js/main.js b/resources/js/main.js index 12d1475..815d734 100644 --- a/resources/js/main.js +++ b/resources/js/main.js @@ -1,51 +1,27 @@ (async function () { await initializeDB(); + // Start Game const possibleStarterMonsters = ['budaye', 'dollfin', 'grintot', 'ignibus', 'memnomnom']; - Memory.state.opponent = new Trainer(); - Memory.state.opponent.monsters = [ - await fetchMonster(possibleStarterMonsters[Math.round(Math.random() * (possibleStarterMonsters.length - 1))]) - ]; + Memory.state.player = new Trainer( + [ + await fetchMonster(possibleStarterMonsters[Math.round(Math.random() * (possibleStarterMonsters.length - 1))]), + ], + [ + new InventoryItem(await fetchItem('tuxeball')), + new InventoryItem(await fetchItem('potion')), + ] + ); + await Memory.state.player.initialize(); - Memory.state.player = new Trainer(); - Memory.state.player.monsters = [ - await fetchMonster(possibleStarterMonsters[Math.round(Math.random() * (possibleStarterMonsters.length - 1))]), - await fetchMonster('corvix'), - await fetchMonster('lunight'), - await fetchMonster('prophetoise'), - await fetchMonster('drashimi'), - await fetchMonster('glombroc'), - await fetchMonster('uneye'), - await fetchMonster('nostray'), - await fetchMonster('dragarbor'), - await fetchMonster('mk01_omega'), - await fetchMonster('jelillow'), - await fetchMonster('picc'), - ]; + Memory.state.activeTechnique = Memory.state.player.activeMonster.activeTechniques[0]; - Memory.state.player.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')), - new InventoryItem(await fetchItem('revive')), - ]; + Memory.state.rivalMonster = await fetchMonster(possibleStarterMonsters[Math.round(Math.random() * (possibleStarterMonsters.length - 1))]); - Memory.state.opponent.activeMonster = Memory.state.opponent.monsters[0]; - Memory.state.player.activeMonster = Memory.state.player.monsters[0]; - Memory.state.activeTechnique = Memory.state.player.activeMonster.activeTechniques[0]; + const area = await fetchArea('paper-town'); + await Game.progressToArea(area); - UI.drawOpponentMonster(); UI.drawActiveMonster(); UI.drawActiveTechniques(); })(); |