Question: Individual Assignment #1 (12.5 points) Create a program that will take the user through an attempted dungeon escape. The user will represent a player and

Individual Assignment #1 (12.5 points)

Create a program that will take the user through an attempted dungeon escape.

The user will represent a player and the player will have a variable to represent t

he HP (Hit Points) which

will default to 50.

The program will start with the following menu:

Welcome to dungeon escape.

1)

Play the game

2)

Exit the game

If option 1 is chosen, the game is played, if not the program will end

.

First Set of Doors

If option 1 is chosen, the following message will display:

Welcome player. You wake up in a dark hallway, and three doors

appear to be your way out.

Which door will you choose? 1, 2, or 3.

prompt>

You will choose one door to be a trap door. Create a constant variable

to hold the value of the door that

will be the trap door.

If the player chooses the trap door, you will display a game over message an

d exit the program

Example message:

You open the door and are instantly thrown into an abyss

. Better luck next time. GAME OVER.

If the player chooses the other 2 doors, the player will have their HP i

ncreased by 50 and move on to the

next set of doors, while displaying the following message

You pass through the door and a sense of strength comes over y

ou. Your new HP is

[HP value]

Second Set of Doors

You will give the player the following prompt:

You see another set of three doors.

Which door will you choose? 1, 2, or 3.

Prompt>

This time two doors will be trap door. Create two constants to hold th

e value of the doors that will be

trap doors.

If the player chooses the either trap door constant you will display a

distinct message for each trap door

and decrease the HP by 50.

Example message for Trap 1:

You open the door and are attacked by an Ogre. You escape b

ut your HP is now [HP value].

Example message for Trap 2:

Yo

u open the door and are attacked by a banshee. Your escape bu

t your HP is now [HP value].

If the player chooses the last door, display the following message:

You open the door and

...

. nothing happens. Lucky you!

Boss Fight

If a player makes it this far, Display the message:

You see no obstacles and your HP is now [HP value]. Press R when rea

dy

If the user enters R, you will have to compare the user

s HP.

If the user does not enter R, prompt again to

Press R when ready

.

If the user

s HP is greater than 50 display the following message:

You see a dragon appear before you. It breathes fire upon you

but you managed to escape with

small wounds. Congratulations, you

ve escaped the dungeon!

If the user

s HP is equal or less than 50 display the following message:

You see a dragon appear before you. It breathes fire upon you

and your weak body is engulfed

immediately. Game over!

Make sure that after escaping or a game over, you send the player b

ack to the following menu:

Welcome to dungeon escape.

1)

Play the game

2)

Exit the game

Make sure all your constants are declared as global constants.

Example message for Trap 1: You open the door and are attacked by an Ogre. You escape but your HP is now [HP value] Example message for Trap 2: You open the door and are attacked by a banshee. Your escape but your HP is now [HP value] If the player chooses the last door, display the following message: You open the door and.... nothing happens. Lucky you! Boss Fight If a player makes it this far, Display the message: You see no obstacles and your HP is now [HP value]. Press R when ready If the user enters R, you will have to compare the user's HP. If the user does not enter R, prompt again to "Press R when ready". If the user's HP is greater than 50 display the following message: You see a dragon appear before you. It breathes fire upon you but you managed to escape with small wounds. Congratulations, you've escaped the dungeon! If the user's HP is equal or less than 50 display the following message: You see a dragon appear before you. It breathes fire upon you and your weak body is engulfed immediately. Game over! Make sure that after escaping or a game over, you send the player back to the following menu: Welcome to dungeon escape. 1) 2) Play the game Exit the game Make sure all your constants are declared as global constants. Grading Criteria: 1. Loop for play game/exit (1.5 points) 2. Door Set 1 Implementation (3) 3. Door Set 2 Implementation (4) 4. Boss Fight Implementation (3) 5. Proper use of constants (1)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!