PROJECT TITLE: Dragon Slayer RPG VERSION 1.1
CHANGELOG
V 1.1: Updated font family, font size, and text descriptions.
V 1.0: Original release
PROJECT DESCRIPTION: A text-based adventure role-playing game (RPG) that is meant to showcase my understanding of basic HTML, CSS, and vanilla JavaScript (JS). I completed this project as part of FreeCodeCamp's JavaScript certification course.
TECHNOLOGIES USED:
- VSCode Editor
- HTML
- CSS
- JavaScript
CHALLENGES: Since this is my first JavaScript project, I had to fully grasp the fundamental concepts such as:
- naming and calling variables
- arrays and methods
- different function types
- generating random number values
QUICK PLAY GUIDE:
- Go to live version of game (Netlify): https://rpg-dragon-slayer.netlify.app/
MAIN OBJECTIVE: Defeat the dragon to win the game.
GAME DETAILS:
- Health: The number of "life points" you have. As long as you have more than 0 Health, you can continue playing.
- XP: The number of "experience points" you have. The more XP you get, the more daamage you deal to monsters.
- Gold: The amount of currency you can use to buy Health or Weapons. Earn more Gold by killing monsters.
- Weapon: Items used to deal damage to monsters. From weakest to strongest, the weapons in this game are Stick, Dagger, Claw Hammer, and Sword. Each weapon costs 30 Gold.
- Monsters: From strongest to weakest, the monsters in this game are Slime, Fanged Beast, and Dragon. Each monster deals a random amount of damage based on their level.
HOW TO PLAY:
- You start the game in Town Square with 100 Health and 50 Gold.
- From the Town Square, you can choose to go the "Store", "Cave", or "Fight the Dragon".
- Collect more Gold by choosing the "Go to cave" button. You will then get to choose whether to fight a weak monster (slim), strong monster (fanged beast), or return to Town Square.
- Everytime you choose to fight a monster, you can either "Attack" to deal damage to it, "Dodge" to avoid getting damage to yourself, or "Run" to escape the fight.
- Attacking a monster deals damage to it based on your currently equipped weapon. I added code that randomizes the damage you deal and the chance to actually hit the monster.
- After you attack, the monster will retaliate if it is still alive. The damage it deals will be a randomly generated number.
- If you receive damage, your Health decreases. When you reach 0 Health, you die and the game is over.
- If you kill a monster, you will return to Town Square.
- You can buy a new weapon more more health by choosing "Go to Store". If you have the strongest weapon, the option to sell the other ones will become available.
- When you are ready, choose "Fight the Dragon" from the Town Square to face the final boss.
- If you defeat the dragon, you win the game.
- Restart the game anytime after winning or losing.
TIPS TO WIN:
- You can have more than 100 Health. The more you have when facing the dragon, the better the odds of surviving its massive amounts of damage.
- Your weapon has a chance to break while attacking a monster. If it does, the next strongest one in your inventory will be used.
- Sometimes it's better to run from a fight when you are low on Health. Live and fight another day.
FUTURE CHANGES: I will continue to review and improve upon my code blocks to make them more readable and enforce the DRY policy ("Don't Repeat Yourself"). Whenever I update the game, I will add a changelog of revisions. I am also planning to add more features like Armor, more weapons, new monsters and encounters, and hidden secrets. Updating the game to use React.js insetad of vanilla JavaScript.
I hope you enjoy and please don't hesitate to leave feedback. I would really appreciated all the advice I could get to become a better developer!