Colossal Adventure (Console RPG)

The year is 1985. Your job is to build a text-based (console) RPG game.

The point of this exercise is to better master Javascript functions, loops, conditionals, and some data types.

Project Requirements:

  1. Console must greet player with a fun message
  2. Console must ask for the player's name and store it
  3. Walking:
  • The console will ask the user to enter a "w" to walk
  • Every time the player walks, a random algorithm will be run that determines if a wild enemy has appeared (A 1/3 or 1/4 chance of being attacked)
  1. If a wild enemy appears:
  • The enemy is random (can be chosen out of a minimum of 3 different enemy names)
  • The user can decide to attack or run
  • If attacking, you will choose a random attack power between a min and max
  • If running, you will choose a random number between 1 and 2 - meaning a 50% chance of escaping
  • After the player attacks or runs the enemy attacks back for a random damage amount
  • If the player kills the enemy you can give the Player some HP and a special item that is stored in the inventory
  • If the enemy kills the player the console prints an cool death message and the game ends
  1. Inventory
  • When the player kills enemies, they are awarded with items
  • If the user enters 'Print' in the console, the console will print the players name, HP, and each item in their inventory
Passing Criteria: Demo to the Instructor/TA & Code Review

An instructor or TA will look through your code with you and make sure you have a solid grasp on using functions, loops, and conditionals in JavaScript, as well as to verify that you're following JavaScript code standards and good general programming practices.

This project passes off the following levels of the Skills Tree:

  • Programming Principles, Level 2