Welcome to App Academy Adventure! For this project, you will be extending your original adventure game with an enemy class and asynchronous combat.
Type node game.js
to run the project.
Type npm install
to install the test packages, then mocha
to run tests.
- Create a
Character
class which is the parent ofPlayer
andEnemy
classes - Create an
Enemy
class which performs actions on a cooldown timer - Fill in the appropriate code gaps (look at the test specs) until you see the goblin scratching its nose every 3 seconds
- Implement the ability for the goblin to move to a different room on a cooldown timer
- Implement the ability for the player to hit the goblin for damage
- Implement the ability for the goblin to attack the player back after being hit once
- The goblin should attack the player on sight once hit
- All enemy actions should increase the cooldown timer, and the enemy should not act unless cooldown is 0
- The player and enemies should die once their health is at or below 0
- 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.
- Make the goblin pick up food when in the same room
- Modify strength and health values for the player and goblin
- Create a
Weapon
class that inherits fromItem
that can be wielded for more strength - Create an
Armor
class that can be worn to reduce damage - Increase health when
Food
is eaten - Create new combat abilities and scenarios
- Grow the world and enemies for more complex scenarios
- Create a friendly
Shopkeeper
character that cannot be attacked and will sell you items - Use your imagination! The sky is the limit.