summaryrefslogtreecommitdiff
path: root/resources/js/main.js
diff options
context:
space:
mode:
Diffstat (limited to 'resources/js/main.js')
-rw-r--r--resources/js/main.js21
1 files changed, 13 insertions, 8 deletions
diff --git a/resources/js/main.js b/resources/js/main.js
index d5bf6fe..a3568bf 100644
--- a/resources/js/main.js
+++ b/resources/js/main.js
@@ -3,10 +3,13 @@
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))]);
+ Memory.state.opponent = new Trainer();
+ Memory.state.opponent.monsters = [
+ await fetchMonster(possibleStarterMonsters[Math.round(Math.random() * (possibleStarterMonsters.length - 1))])
+ ];
- state.partyMonsters = [
+ Memory.state.player = new Trainer();
+ Memory.state.player.monsters = [
await fetchMonster('dollfin'),
await fetchMonster(possibleStarterMonsters[Math.round(Math.random() * (possibleStarterMonsters.length - 1))]),
await fetchMonster('corvix'),
@@ -19,12 +22,10 @@
await fetchMonster('dragarbor'),
await fetchMonster('mk01_omega'),
await fetchMonster('jelillow'),
+ await fetchMonster('picc'),
];
- state.activeMonster = state.partyMonsters[0];
- state.activeTechnique = state.activeMonster.activeTechniques[0];
-
- state.inventory = [
+ Memory.state.player.inventory = [
new InventoryItem(await fetchItem('tuxeball')),
new InventoryItem(await fetchItem('ancient_egg')),
new InventoryItem(await fetchItem('sweet_sand')),
@@ -41,7 +42,11 @@
new InventoryItem(await fetchItem('revive')),
];
- UI.drawEnemyMonster();
+ 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];
+
+ UI.drawOpponentMonster();
UI.drawActiveMonster();
UI.drawActiveTechniques();
})();