You will be enhancing assignment 2 to have include the following:
You will create a base class called Enemy. This class will have the following configuration
Player XP Enemy HP
1 Random value (1-5)
2 Random value (1-10)
3 Random value (1-15) …etc
You will then use your base class to implement subclasses of the following enemies as derived classes:
Raging Reapers:
The Reaper class will have the following implementation of attack (Player Obj):
If the player has an alignment of "Good", the attack will be half the player's current HP. Otherwise the attack will be a random number from 1 to 25% of the players HP. Round up or down to the nearest point as necessary.
Brute Trolls:
The Troll class will have the following implementation of attack (Player Obj):
If the player has an equipped weapon of a "broad sword", Mace or Flail the attack will be equal to the player's HP. Otherwise the attack will be a random number from 1 to 25% of the players HP. Round up or down to the nearest point as necessary.
Winged Demon Knights:
The Knight class will have the following implementation of attack (Player Obj):
If the player is in one of the following spaces "Cathedral" or Well of reflection the attack will be 60% of the player's HP. Otherwise the attack will be a random number from 1 to 25% of the players HP. Round up or down to the nearest point as necessary.
You will separate your Enemy and Player class into an implementation file (.cpp) and a specification file (.h)
When you land in a space you will have a random chance (1 in 3) to encounter a new space, "The Mystic Blacksmith". The blacksmith has a stack which will allow you to leave multiple weapons in the stack to increase their modifier value. You may choose to leave your weapon with the Blacksmith until you next encounter him
When you retrieve the weapon in from the blacksmith, the modifier will be + the number of turns that weapon has been with the blacksmith. A turn is defined by every time you roll your dice to move.
Example:
On turn 5, you left a Mace with modifier 4. During turn 10, you find the Blacksmith again and retrieve the Mace. The Mace will now have a modifier of 9 (4 plus 5 turn difference).
Use the STL's implementation of a Stack to do this.
You will add the following custom Exception:
WeaponsLimit: Limit the Weapons that can be carried to 5. If more than 5 weapons are attempted to be carried, throw the WeaponsLimit exception, which will display a message to the user that they have reached their max.
ItemLimit: Limit the Items that can be carried to 10. If more than 10 items are attempted to be carried, throw the ItemsLimit exception, which will display a message to the user that they have reached their max.
If in the menu:
1) Travel to another space on the board
2) Dismount and explore the current space
3) Save your game
You choose #1, there will be a 1 in 4 chance you will fall into the Lake of Despair. You will create a recursive function called leaveDespair() which will roll the dice. A value of 1,2,4, and 5 will keep you in the Lake of despair and cause you to roll again. A value of 3 and 6 will let you exit.
You will create leaveDespair() to be a recursive function, such that it will call itself if you don't roll a 3 or a 6 and rolls again.