4.3.1 Turn Based Game

Objectives

Learning Objectives

After completing this assignment, you should

  • Understand how and why to use prototypical inheritance

Performance Objectives

After completing this assignment, you will be able to effectively use

  • Constructors and prototypes

Details

Deliverables

  • A repo containing your project
  • A link to the project deployed and running on the internet

Requirements

  • No JSHint warnings or errors

I'm a Web Developer Mode

You will be building a turn based battle game. If you're familiar with older video games, think of Pokemon or Final Fantasy. The UI can be very very basic, just some headings for names and info, a dropdown, and a couple of buttons. If you have no idea what any of this means, read through this and/or watch this.

  • The gameplay should go back and forth between an enemy and the player, each inflicting damage on the other when they launch a successful attack.
  • There should be multiple player types.
  • There should be multiple enemy types.
  • You should be able to select the player type from a dropdown.
  • The enemy type should be randomly generated.
  • The player should manually select the "Fight" action to attack.
  • The enemy should automatically attack when it is its turn.
  • You should use constructors and prototypes for the players and enemies.
  • The player's health should be visible.
  • The enemies health may be visible, at your discretion.

Hey, Mikey, I Think He Likes It Mode

  • The player should be able to either "Fight" or "Use Magic", or some similar setup. Each player type should have different types of attack and/or magic.
  • Give the player the ability to use items, such as items that regain health or increase attack
  • Make the game play cycle between two players Player 1 -> Enemy -> Player 2 -> Enemy
  • Implement "ailments", e.g. being poisoned makes you weaker, being put to sleep makes you skip your turn

Additional Resources

  • Artwork is not required, but if you'd like to include artwork, this might help. Maybe this too. Get your game working before you introduce artwork. If you have a beautiful page that doesn't work, it will be considered an incomplete assignment.