Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Create an array where each slot is 2 integers. These represent the health and strength of an object in our game. The first pair of
Create an array where each slot is integers. These represent the health and strength of an object in our game. The first pair of integers will be the health and strength of our player.
We are going to use MIPS syscall instruction or to randomly assign values for these integers. The player should have a random strength between and and a random health of between and
There will be three monsters in our array. They will also have a random strength and health with a range from of the players healthstrength up to the players healthstrength respectively.
This means the array will have a total of slots.
The main game loop will the commence and will have the following characteristics:
Display the player and monster strengthhealth only for monsters whose health
The player will be able to attack or heal.
If attacking, the player will attack the first monster whose health is by subtracting the players strength from the monsters health.
if healing, you will add the players strength to their health.
The monster will have a chance of attacking by using instruction or between any two number ranges. With a result of one of those numbers meaning they will attack.
The loop ends when the players health or ALL the monsters health
You will want to make extensive use of subroutines!
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