Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Case Studies In Business Data Bases

Authors: James Bradley

1st Edition

0030141346, 978-0030141348

More Books

Students also viewed these Databases questions