(async function () { await initializeDB(); // Start Game const possibleStarterMonsters = ['budaye', 'dollfin', 'grintot', 'ignibus', 'memnomnom']; Memory.state.player = new Trainer({ monsters: [ await fetchMonster(possibleStarterMonsters[Math.round(Math.random() * (possibleStarterMonsters.length - 1))]), ], inventory: [ new InventoryItem(await fetchItem('tuxeball'), 5), new InventoryItem(await fetchItem('potion')), ] }); await Memory.state.player.initialize(); Game.setActivePlayerMonster(Memory.state.player.monsters[0]); Memory.state.activeBall = Memory.state.player.inventory[0]; // tuxeball Memory.state.rivalMonster = await fetchMonster(possibleStarterMonsters[Math.round(Math.random() * (possibleStarterMonsters.length - 1))]); const area = await fetchArea('paper-town'); await Game.jumpToArea(area); await Game.encounterTrainer(); UI.drawStatus(); UI.drawActiveMonster(); UI.drawActiveTechniques(); })();