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

Code the following game simulation in java: Each Character has Health Points and

ID: 3839202 • Letter: C

Question

Code the following game simulation in java:

Each Character has Health Points and Skill Points, Items(to be equipped), Techniques(to be acquired orlearned), Elemental Strengths and weaknesses(based on their type) and a Level based on Experience points XP. In a team where the party contains 2 or more of the same type of elemental character, each character of that given type earns a 10% bonus in attack power and health. If a party member has a greater elemental type, partners with a weaker elemental type earn 10% bonus in defense and skill points for each partner with a stronger element.

Elements:

Water[stronger] douses Fire[weaker]

Fire Scorches Earth

Earth withstands Thunder

Thunder pierces the Atmosphere(Wind)

Wind moves the Tide(Water)

Engineer, Android– Thunder

Soldier, Commander– Fire

Huntress, Assassin– Wind

Beastmaster, Swordsman – Earth

Healer, Mariner – Water

Specific Character types should inherit from the common base character. The level-up system should work as follows:

Level 1 health = 500 hp, xp needed for next level = (hp/20)^2.

Write methods that customize all other character details. In your javadoc comments, include the exact formula. Each character should have an additional field for battlefield advantage and Item equipment bonuses. Party member must also have a field for money earned that can later be spent on upgrades.

Here are your lifelines (they must be split between parts 1 and 2):

Minor intervention(1) – 12 times (small hints on how to proceed)

Medium intervention(3) – 5 times (better hints leading you halfway to a given answer)

Major intervention(5) – 3 times (leading you just short of an actual answer)

You may use a total provision of 20 cumulative intervention points (the number next to the intervention type times the number of times you used that particular in tervention type). You MAY NOT surpass the total allotment of a given intervention, for instance 4 Major or 20 Minor. You may combine them, however, as follows: 3 Major + 1 Medium + 2 Minor = 5*3 + 3*1 +1*2 = 20 as an example.

Explanation / Answer

public class Java
{

public static void main(String[] args)
{

int hero, match, restart;

Duel valon = new Duel();
Duel rintar = new Duel();
Duel zersious = new Duel();
Duel balrock = new Duel();
Duel hawkeye = new Duel();
Duel yusef = new Duel();


System.out.println("Choose your HERO");
System.out.println("Press 1 for the Mage Lord Valon Press 2 for the Warrior Rintar");
System.out.println("Attack 6 Attack 8");
System.out.println("Defense 0 Defense 1");
System.out.println("Health 19 Health 16");
System.out.println("");
System.out.println("");
System.out.println("Press 3 for the Paladin Prince Zersious Press 4 for the Orc Balrock");
System.out.println("Attack 5 Attack 10");
System.out.println("Defense 2 Defense 0");
System.out.println("Health 18 Health 15");   
System.out.println("");
System.out.println("");
System.out.println("Press 5 for the Elf Hawkeye Press 6 for the Dragon Summoner Yusef");
System.out.println("Attack 7 Attack 13");
System.out.println("Defense 1 Defense 2");
System.out.println("Health 17 Health 10");
hero = input.nextInt();
if(hero == 1){System.out.println("You have chosen Lord Valon!");
for(hero = 1;;){
System.out.println("Your battle is against....");
System.out.println("");
match = 1+battle.nextInt(5);
if(match == 1){
System.out.println("Rintar!");
System.out.println("");
valon.attack1 = 8;
valon.defense1 = 1;
valon.health1 = 16;
valon.calculateWinner();
}else if(match == 2){
System.out.println("Prince Zersious!");
System.out.println("");
valon.attack1 = 5;
valon.defense1 = 2;
valon.health1 = 18;
valon.calculateWinner();
}else if(match == 3){
System.out.println("Balrock!");
System.out.println("");
valon.attack1 = 10;
valon.defense1 = 0;
valon.health1 = 15;
valon.calculateWinner();
}else if(match == 4){
System.out.println("Hawkeye!");
System.out.println("");
valon.attack1 = 7;
valon.defense1 = 1;
valon.health1 = 17;
valon.calculateWinner();
}else if(match == 5){
System.out.println("Yusef!");
System.out.println("");
valon.attack1 = 13;
valon.defense1 = 2;
valon.health1 = 10;
valon.calculateWinner();}
System.out.println("");
System.out.println("Fight again?");
System.out.println("1 for Yes");
System.out.println("2 for No");
restart = input.nextInt();
if(restart == 1){
System.out.println("");
}else if(restart == 2){
System.out.println("Thank you for playing!");
break;}
}
}
if(hero == 2){System.out.println("You have chosen Rintar!");
for(hero = 2;;){
System.out.println("Your battle is against....");
System.out.println("");
match = 1+battle.nextInt(5);
if(match == 1){
System.out.println("Lord Valon!");
System.out.println("");
rintar.attack1 = 6;
rintar.defense1 = 0;
rintar.health1 = 19;
rintar.calculateWinner();
}else if(match == 2){
System.out.println("Prince Zersious!");
System.out.println("");
rintar.attack1 = 5;
rintar.defense1 = 2;
rintar.health1 = 18;
rintar.calculateWinner();
}else if(match == 3){
System.out.println("Balrock!");
System.out.println("");
rintar.attack1 = 10;
rintar.defense1 = 0;
rintar.health1 = 15;
rintar.calculateWinner();
}else if(match == 4){
System.out.println("Hawkeye!");
System.out.println("");
rintar.attack1 = 7;
rintar.defense1 = 1;
rintar.health1 = 17;
rintar.calculateWinner();
}else if(match == 5){
System.out.println("Yusef!");
System.out.println("");
rintar.attack1 = 13;
rintar.defense1 = 2;
rintar.health1 = 10;
rintar.calculateWinner();}
System.out.println("");
System.out.println("Fight again?");
System.out.println("1 for Yes");
System.out.println("2 for No");
restart = input.nextInt();
if(restart == 1){
System.out.println("");
}else if(restart == 2){
System.out.println("Thank you for playing!");
break;}
}
}
if(hero == 3){System.out.println("You have chosen Prince Zersious!");
for(hero = 3;;){
System.out.println("Your battle is against....");
System.out.println("");
match = 1+battle.nextInt(5);
if(match == 1){
System.out.println("Lord Valon!");
System.out.println("");
zersious.attack1 = 6;
zersious.defense1 = 0;
zersious.health1 = 19;
zersious.calculateWinner();
}else if(match == 2){
System.out.println("Rintar!");
System.out.println("");
zersious.attack1 = 8;
zersious.defense1 = 1;
zersious.health1 = 16;
zersious.calculateWinner();
}else if(match == 3){
System.out.println("Balrock!");
System.out.println("");
zersious.attack1 = 10;
zersious.defense1 = 0;
zersious.health1 = 15;
zersious.calculateWinner();
}else if(match == 4){
System.out.println("Hawkeye!");
System.out.println("");
zersious.attack1 = 7;
zersious.defense1 = 1;
zersious.health1 = 17;
zersious.calculateWinner();
}else if(match == 5){
System.out.println("Yusef!");
System.out.println("");
zersious.attack1 = 13;
zersious.defense1 = 2;
zersious.health1 = 10;
zersious.calculateWinner();}
System.out.println("");
System.out.println("Fight again?");
System.out.println("1 for Yes");
System.out.println("2 for No");
restart = input.nextInt();
if(restart == 1){
System.out.println("");
}else if(restart == 2){
System.out.println("Thank you for playing!");
break;}
}
}
if(hero == 4){System.out.println("You have chosen Balrock!");
for(hero = 4;;){
System.out.println("Your battle is against....");
System.out.println("");
match = 1+battle.nextInt(5);
if(match == 1){
System.out.println("Lord Valon!");
System.out.println("");
balrock.attack1 = 6;
balrock.defense1 =0;
balrock.health1 = 19;
balrock.calculateWinner();
}else if(match == 2){
System.out.println("Prince Zersious!");
System.out.println("");
balrock.attack1 = 5;
balrock.defense1 =2;
balrock.health1 = 18;
balrock.calculateWinner();
}else if(match == 3){
System.out.println("Rintar!");
System.out.println("");
balrock.attack1 = 8;
balrock.defense1 =1;
balrock.health1 = 16;
balrock.calculateWinner();
}else if(match == 4){
System.out.println("Hawkeye!");
System.out.println("");
balrock.attack1 = 7;
balrock.defense1 =1;
balrock.health1 = 17;
balrock.calculateWinner();
}else if(match == 5){
System.out.println("Yusef!");
System.out.println("");
balrock.attack1 = 13;
balrock.defense1 =2;
balrock.health1 = 10;
balrock.calculateWinner();}
System.out.println("");
System.out.println("Fight again?");
System.out.println("1 for Yes");
System.out.println("2 for No");
restart = input.nextInt();
if(restart == 1){
System.out.println("");
}else if(restart == 2){
System.out.println("Thank you for playing!");
break;}
}
}
if(hero == 5){System.out.println("You have chosen Hawkeye!");
for(hero = 5;;){
System.out.println("Your battle is against....");
System.out.println("");
match = 1+battle.nextInt(5);
if(match == 1){
System.out.println("Lord Valon!");
System.out.println("");
hawkeye.attack1 = 6;
hawkeye.defense1 = 0;
hawkeye.health1 = 19;
hawkeye.calculateWinner();
}else if(match == 2){
System.out.println("Prince Zersious!");
System.out.println("");
hawkeye.attack1 = 5;
hawkeye.defense1 = 2;
hawkeye.health1 = 18;
hawkeye.calculateWinner();
}else if(match == 3){
System.out.println("Balrock!");
System.out.println("");
hawkeye.attack1 = 10;
hawkeye.defense1 = 0;
hawkeye.health1= 15;
hawkeye.calculateWinner();
}else if(match == 4){
System.out.println("Rintar!");
System.out.println("");
hawkeye.attack1 = 8;
hawkeye.defense1 = 1;
hawkeye.health1 = 16;
hawkeye.calculateWinner();
}else if(match == 5){
System.out.println("Yusef!");
System.out.println("");
hawkeye.attack1 = 13;
hawkeye.defense1 = 2;
hawkeye.health1 = 10;
hawkeye.calculateWinner();}
System.out.println("");
System.out.println("Fight again?");
System.out.println("1 for Yes");
System.out.println("2 for No");
restart = input.nextInt();
if(restart == 1){
System.out.println("");
}else if(restart == 2){
System.out.println("Thank you for playing!");
break;}
}
}
if(hero == 6){System.out.println("You have chosen Yusef!");
for(hero = 6;;){
System.out.println("Your battle is against....");
System.out.println("");
match = 1+battle.nextInt(5);
if(match == 1){
System.out.println("Lord Valon!");
System.out.println("");
yusef.attack1 = 6;
yusef.defense1 = 0;
yusef.health1 = 19;
yusef.calculateWinner();
}else if(match == 2){
System.out.println("Prince Zersious!");
System.out.println("");
yusef.attack1 = 5;
yusef.defense1 = 2;
yusef.health1 = 18;
yusef.calculateWinner();
}else if(match == 3){
System.out.println("Balrock!");
System.out.println("");
yusef.attack1 = 10;
yusef.defense1 = 0;
yusef.health1 = 15;
yusef.calculateWinner();
}else if(match == 4){
System.out.println("Rintar!");
System.out.println("");
yusef.attack1 = 8;
yusef.defense1 = 1;
yusef.health1 = 16;
yusef.calculateWinner();
}else if(match == 5){
System.out.println("Hawkeye!");
System.out.println("");
yusef.attack1 = 13;
yusef.defense1 = 2;
yusef.health1 = 10;
yusef.calculateWinner();}
System.out.println("");
System.out.println("Fight again?");
System.out.println("1 for Yes");
System.out.println("2 for No");
restart = input.nextInt();
if(restart == 1){
System.out.println("");
}else if(restart == 2){
System.out.println("Thank you for playing!");
break;}
}
}
}
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote