diff options
author | Daniel Weipert <code@drogueronin.de> | 2023-08-18 23:19:13 +0200 |
---|---|---|
committer | Daniel Weipert <code@drogueronin.de> | 2023-08-18 23:19:13 +0200 |
commit | 91d048ef0f994446aaee91e3afcbd99788e439d7 (patch) | |
tree | 30063656343d7c3c0f9ebd37b2eb1896bfa76820 /resources/js/main.js | |
parent | f9b00e47e04eac414d892a08136a90833abeefd6 (diff) |
item effects,conditions
Diffstat (limited to 'resources/js/main.js')
-rw-r--r-- | resources/js/main.js | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/resources/js/main.js b/resources/js/main.js new file mode 100644 index 0000000..d5bf6fe --- /dev/null +++ b/resources/js/main.js @@ -0,0 +1,47 @@ +(async function () { + await initializeDB(); + + const possibleStarterMonsters = ['budaye', 'dollfin', 'grintot', 'ignibus', 'memnomnom']; + + // state.enemy.monster = await fetchMonster('grintot'); + 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'), + 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'), + ]; + + 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')), + new InventoryItem(await fetchItem('revive')), + ]; + + UI.drawEnemyMonster(); + UI.drawActiveMonster(); + UI.drawActiveTechniques(); +})(); |