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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started