/Trivia_Dungeon

Student project for GA SEIR: A dungeon crawler for trivia fans! Built with vanilla JS/HTML/CSS

Primary LanguageJavaScript

Trivia Dungeon

Premise

You find yourself at the bottom of a dark dungeon, populated by rabid beasts (who happen to be trivia fans). Proceed through the dungeon, answering questions to make it out alive!

A dark and mysterious dungeon...


Gameplay

The game lasts a total of 10 rounds, with each round including a question phase, and a trap phase if you answer incorrectly.


Trap Room

Traps are the penalty phase for a wrong answer. You will be presented with a series of items, most with a penalty, and one safe item that will bring you back to the answer phase.

Item List:

  • [Just a rock] Safe item
  • [Tonic of Forgetfulness] Remove a random answer choice for 3 rounds. This may include the correct answer.
  • [Energy Dampening Cloak] Forfeit your powers for 3 rounds
  • [Poison-coated Goblet] Deal 5 damage per round for 3 rounds

HP

Players start with 100 HP. For an incorrect answer, the encounter will inflict 10 damage. Reaching 0 will kill the player, ending the game. Keep your HP above 0!


Powers

Powers may be used at the start of a phase. Number of uses vary per player class.


class selection

Classes

Classes are grouped into two categories: Light and Dark.

  • Light-attuned classes have powers that affect the question phase or the player directly
  • Dark-attuned classes have powers that influence the trap phase

Choose your toolkit carefully! Your powers may be the difference between life and death.

Class Name Type Uses Power
🛡️ Paladin Light 3 [Divine Blessing] Pray to the gods for guidance and omit 2 wrong answers
🏹 Archer Light 2 [Lightning Reflexes] Evade a monster to skip a question entirely
🗡️ Rogue Dark 3 [Trap Sense] Use your uncanny intuition to narrow down item choices to 1 safe item, 1 cursed
🪄 Wizard Dark 2 [Chronomancer] Alter time to skip 1 trap phase, with no item penalty

Ideas for Features to be Added

Trello Board

  • More traps!
  • Trap room element randomizer
  • Game Progression converted to game board
  • Dice rolls for moves along game board
  • Trap spaces, Power-up spaces
  • Passive bonuses for classes
  • Trap and question phase power for all classes
  • Multiplayer

Known Bugs:

  • If questions aren't being fetched, it means I need to get a new link from the API. I believe they expire after a certain amount of time

  • Rarely, the Tonic of Forgetfulness will not remove random answers. I have not been able to replicate this reliably.

  • Answering incorrectly still triggers a new question (not visible because of trap room). Removing the new question function call from phaseCheck() breaks the game

  • If you give an incorrect answer that kills you, the traps still show before starting a new game


Credits:

Class & Trap Icons (Game): openmoji

Class Icons (Readme): github

Background Images: imgur album from the game Darkest Dungeon

Image Hosting: svgur imgur

Trivia Questions: Open Trivia Database

Tools for Colors: HEX codes HEX to RGBA

HTML Element Shuffle (used in game.js, line 96): StackOverflow