Giter VIP home page Giter VIP logo

adventure-combat-starter's Introduction

App Academy Adventure Combat

Welcome to App Academy Adventure! For this project, you will be extending your original adventure game with an enemy class and asynchronous combat.

Running the code

Type node game.js to run the project.

Type npm install to install the test packages, then mocha to run tests.

Tasks

  1. Create a Character class which is the parent of Player and Enemy classes
  2. Create an Enemy class which performs actions on a cooldown timer
  3. Fill in the appropriate code gaps (look at the test specs) until you see the goblin scratching its nose every 3 seconds
  4. Implement the ability for the goblin to move to a different room on a cooldown timer
  5. Implement the ability for the player to hit the goblin for damage
  6. Implement the ability for the goblin to attack the player back after being hit once
  7. The goblin should attack the player on sight once hit
  8. All enemy actions should increase the cooldown timer, and the enemy should not act unless cooldown is 0
  9. The player and enemies should die once their health is at or below 0

Tips

  • Copy your Item code from the previous project. Do test specs still pass? Did the OOP principles make this process easy or difficult?
  • Take a look at the Enemy.rest() setTimeout loop. There is a bug in this code. Can you find it?
  • Use the tests to your advantage! They will give you many hints about how the code should work.

Bonus tasks

  1. Make the goblin pick up food when in the same room
  2. Modify strength and health values for the player and goblin
  3. Create a Weapon class that inherits from Item that can be wielded for more strength
  4. Create an Armor class that can be worn to reduce damage
  5. Increase health when Food is eaten
  6. Create new combat abilities and scenarios
  7. Grow the world and enemies for more complex scenarios
  8. Create a friendly Shopkeeper character that cannot be attacked and will sell you items
  9. Use your imagination! The sky is the limit.

adventure-combat-starter's People

Contributors

amalyam avatar maxwellainatchi avatar jb923 avatar br80 avatar

Forkers

maxwellainatchi

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.