Question: Create this code using c++ using any terminals (xterm, term) RPG Inheritance Code: * Create a new class that inherits the character class for an
Create this code using c++ using any terminals (xterm, term)
RPG Inheritance Code:
* Create a new class that inherits the character class for an enemy
- e.g., a Dragon class that extends the character class.
* In the new class, create a function that provides an alternate attack for this enemy
- e.g., a breathe fire attack that inflicts extra damage
* In your class' getAction() implementation, have the new enemy class use its alternate attack 30% of the time
- Set up rand() to generate a number 1-100 and if the value is below 30, have the enemy use its special move
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
