summaryrefslogtreecommitdiff
path: root/resources/js/main.js
blob: a3568bf2c97f6754ceecd3b0e2dba49267d68c2c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
(async function () {
  await initializeDB();

  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();
  Memory.state.player.monsters = [
    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'),
    await fetchMonster('picc'),
  ];

  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.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();
})();