diff options
author | Daniel Weipert <code@drogueronin.de> | 2023-09-02 22:55:55 +0200 |
---|---|---|
committer | Daniel Weipert <code@drogueronin.de> | 2023-09-02 22:55:55 +0200 |
commit | 32b19aa9504ce24fe0e98a5c9e2fa2be9612fa88 (patch) | |
tree | e0e9be8a056ba498f2998fcc85495e6641d34af6 /resources/js/story.js | |
parent | 2030caa0c85102b1cf6131dd9eefef4a347cda42 (diff) |
item drops!
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; |