diff options
Diffstat (limited to 'resources/js/story.js')
-rw-r--r-- | resources/js/story.js | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/resources/js/story.js b/resources/js/story.js index bb6fc4b..9d64a2a 100644 --- a/resources/js/story.js +++ b/resources/js/story.js @@ -134,6 +134,36 @@ const Story = { return didWin; }, + 'battle-rival-three': async () => { + const story = await fetchStory('battle-rival-three'); + const characterRival = story.characters.rival; + const npcRival = await fetchNpc(story.characters.rival.slug); + + await UI.buildAndShowStoryPopup({ speaker: npcRival, text: translate(characterRival.text[0]) }); + await Story.setupBattle(npcRival, characterRival.monsters); + const didWin = await Story.battle(); + if (didWin) { + await UI.buildAndShowStoryPopup({ speaker: npcRival, text: translate(characterRival.text[1]) }); + } + + return didWin; + }, + + 'battle-rival-four': async () => { + const story = await fetchStory('battle-rival-four'); + const characterRival = story.characters.rival; + const npcRival = await fetchNpc(story.characters.rival.slug); + + await UI.buildAndShowStoryPopup({ speaker: npcRival, text: translate(characterRival.text[0]) }); + await Story.setupBattle(npcRival, characterRival.monsters); + const didWin = await Story.battle(); + if (didWin) { + await UI.buildAndShowStoryPopup({ speaker: npcRival, text: translate(characterRival.text[1]) }); + } + + return didWin; + }, + 'hospital-floor-1': async () => { const story = await fetchStory('hospital-floor-1'); const characterAurora = story.characters.aurora; |