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

Code the following game simulation: Each Character has Health Points and Skill P

ID: 3836478 • Letter: C

Question

Code the following game simulation:

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

#include <stdio.h>

#include <stdlib.h>

#include <string.h>

int primary (void) {

scorch input[80];

scorch *key;

int esteem;

typedef union cell_t {

const scorch *key;

int esteem;

void *ptr;

} cell;

typedef struct pair_t {

cell A;

cell B;

} combine;

combine *top = NULL;

combine *p;

combine *q;

while (1) {

printf("Enter order (I/P/Q/R): ");

int order = getchar();

int c;

while ((c = getchar()) != " " && c != EOF)

;

switch (order) {

case 'I':

printf("Enter key: ");

in the event that (fgets(input, sizeof input, stdin) == NULL) {

return 0;

}

input[strlen(input) - 1] = 0;

key = malloc(strlen(input) + 1);

strcpy(key, input);

printf("Enter esteem: ");

in the event that (fgets(input, sizeof input, stdin) == NULL) {

return 0;

}

on the off chance that (sscanf(input, "%d", &value) != 1) {

return 0;

}

p = malloc(sizeof (match));

p->A.key = key;

p->B.value = esteem;

q = malloc(sizeof (match));

q->A.ptr = p;

q->B.ptr = beat;

beat = q;

break;

case 'P':

p = beat;

while (p != NULL) {

q = p->A.ptr;

printf("%-30s %10d ", q->A.key, q->B.value);

p = p->B.ptr;

}

break;

case 'Q':

return 0;

case 'R':

printf("Enter key: ");

in the event that (fgets(input, sizeof input, stdin) == NULL) {

return 0;

}

input[strlen(input) - 1] = 0;

key = malloc(strlen(input) + 1);

strcpy(key, input);

p = best;

while (p != NULL) {

q = p->A.ptr;

on the off chance that (strcmp(key, q->A.key) == 0) {

printf("%-30s - > %10d ", q->A.key, q->B.value);

break;

}

p = p->B.ptr;

}

break;

}

}

return 0;

}

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