Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Create a C++ program that fulfills the requirements of the following prompt: Thi

ID: 3848524 • Letter: C

Question

Create a C++ program that fulfills the requirements of the following prompt:

This program will create a text-based squad versus squad battling game. The game will be set up so that two players can play and each player will control a squad. Each member of the squad will have basic and special abilities. When one squad has been fully defeated, that player will be declared the loser. The program will then exit.

The basis of this program will require the use of parallel arrays. You should maintain a set of parallel arrays for each squad. The arrays are as follows:

Squad members’ names

Squad members’ health values

Squad members’ mana values

Squad members’ attack values

Each member of the squad should be able to take the following actions:

Attack

Defend

Special Ability

You will create the special abilities as you see fit. It is okay to allow each squad to have the same special abilities. Each time the player uses a Special Ability, that squad member’s mana should be decremented by some amount. If there isn’t enough mana left to use the ability, the player should be informed and the player should be allowed to choose another action to take. For an example, a special ability might look like this:

A squad member is a cleric. The cleric’s special ability is Heal. When I select Heal, I select a squad member. I then heal that squad member for 10 health points.

Play will proceed like this:

Squad A’s player takes their turn

Player A selects a squad member

Player A selects an action for that squad member

That action is carried out and whatever values should be updated, are

Squad B’s player takes their turn

Player B selects a squad member

Player B selects an action for that squad member

That action is carried out and whatever values should be updated, are

Play then loops back to Squad A’s player

The game is considered “done” when each member of a squad is at 0 heath or less.

Your program should be sectioned up using loops and functions. Specifically, special abilities should be in functions. If you need to pass a value to a function, do so using pointers ONLY (remember, passing an array to a function automatically works like a pointer). You should have appropriate validation when choosing what squad member to use (you shouldn’t be able to use squad members with zero health).

Make your program run automatically without any player needing to make input by using randomization. That means all squad member choices are made by the program and all action choices are made by the program. Play will execute the exact same as outlined above.

Explanation / Answer

I am working on code. give me 2 Hrs.

for(int index = 0; index < dogname.length( ); index++)
{
     cout<<setw(10)<<dogname[index]
            <<setw(10)<<round1[index]
            <<setw(10)<<round2[index]<<endl;
}