c programming magic points

Add an integer data member to the Player class that describes the number of magic points the player currently has. Additionally, add a “max magic points” data member that describes the maximum number of magic points the player can have at his/her current level. Be sure to also modify the Player: : viewStats () method to display the current amount of magic points the player has. Also, be sure to increase the amount of magic points when the character levels up-and a “wizard” should gain more hit points than a “fighter.”

After you have added magic points to the system, create a Spell structure and then instantiate a few types of spell objects, such as “magic missile,” “fireball,” and “shield.” You may want to implement the Spell structure like so:

struct Spell

{

std::string mName;

Range mDamageRange;

int mMagicPointsRequired;

};

·mName: The name of the spell (e.g., “Fireball”).

·mDamageRange: The range of damage the spell inflicts.

·mMagicPointsRequired: The number of magic points required to cast the spell.

Finally, add a “cast spell” option to the combat menu, which allows the player to select and cast a spell from a list of spells in his/her spell book. Be sure to verify that the player has enough magic points to cast the spell. And also be sure to deduct the magic points required to cast the spell from the player’s magic point count, after a spell is cast.

 
Do you need a similar assignment done for you from scratch? We have qualified writers to help you. We assure you an A+ quality paper that is free from plagiarism. Order now for an Amazing Discount!
Use Discount Code "Newclient" for a 15% Discount!

NB: We do not resell papers. Upon ordering, we do an original paper exclusively for you.