Menu

[Solved]Description Gameplay Opening Game User Chooses One Four Character Roles Play Knight Healer Q37263328

Description of Gameplay: At the opening of the game, the userchooses one of four character roles to play (Knight, Healer,Wizard, or Thief). All characters start with 10 Health points and aScore of 0. Each character also has a special move, as follows: Knight – “Slash with Sword”  Healer – “Use Sleeping Powder” Wizard – “Cast a Spell”  Thief – “Sneak By” The main menu (seeSample Output 1) consists of six options: Status Report; Move 1Space either North, South, East, or West; Quit. The user enters theletter/symbol for the chosen option, and the associated eventoccurs:  Status Report – Simply print the player’s current state(Hint: Use toString() method)  Move – A move will either (a) takethe player to one of four benign scenes, or (b) cause the player tobe attacked by one of three foes. Here are the details for eachscenario (see Sample Outputs 2 and 3): o (a) For the benign sceneevent, the player’s score increases by 1, and a short descriptionof the scene is displayed. The possible scenes are “Nothing here…”,“Nice trees around here…”, “Interesting cottage there…”, and “Pottybreak…” (see Sample Output 2). After that, the main menu willappear and ask for another choice. o (b) If the player is attacked,a message is displayed saying they are being attacked by one ofthree possible foes – “zombie”, “bandit”, or “lobbyist”. Then,another menu pops up asking if the player would like to use his/herspecial move, or run. If running is successful, the score isincreased by 1 and gameplay continues with the main menu. Ifrunning is unsuccessful or the user selects “Special Move”, abattle message is displayed and the game waits for the user toenter any letter. Then, the outcome of the battle is displayed. Ifthe player wins, 2 points are added to the score. If the playerloses, 1 Health point is deducted. The player’s status isdisplayed, and the gameplay continues with the main menu.  Quit –If the user selects “q”, the game ends with an appropriate message,as well as a printout of the player’s final state. Note: the gameshould also end if the player’s health drops to zero. ProgrammingRequirements: Your program should meet the following implementationrequirements, the rest is up to you:  Player should be an abstractclass, with subclasses Knight, Healer, Wizard, Thief.  Playershould have two private instance variables, health and score, aswell at least the following two abstract methods:  public abstractString getSpecialMove();  public abstract void useSpecialMove();Player can have other methods.  I highly recommend each subclassoverrides the toString() method (see Status Report, above).  Yourmain program must make use of a sentinel loop structure. Thatshould be obvious by now!  You will also want to make use of theRandom class to choose random scenes and foes from the list ofpossible values (see above), as well as to decide if an attack ishappening and if so, the winner of the battle. My implementationchooses a foe/attack scenario 20% of the time, decides that“running” from a battle is successful 50% of the time, and decidesthat the player wins the battle 60% of the time.  Validation: Ifthe user enters a choice that does not appear in the menu, youshould print a message saying so and ask for another choice.

Sample Output 1-Opening Screen run: Welcome to JavaQuest! Stay alive and increase your score Choose a character.. (k)Knight I

Sample Output 3-Move Results in Being Attacked What would you 1ike to do? )status Report [nlsHe) w Move 1 Space North, South,

Sample Output 1-Opening Screen run: Welcome to JavaQuest! Stay alive and increase your score Choose a character.. (k)Knight I (h)Healer (wwizard I1 (t]Thief >W Welcome, Wizard! What would you like to do (2)status Report (n)s)(e(w) Move 1 Space North, South, East, or West >2 q)Quit Sample Output 2 – Move Results in Benign Scene What would you like to do? (2)Status Report I1 (nHs)(e)/w) Move 1 Space North, South, East, or West I1 IglQuit Interesting cottage there… Sample Output 3-Move Results in Being Attacked What would you 1ike to do? )status Report [nlsHe) w Move 1 Space North, South, East, or West I q)Quit >W Oh no! You are being attacked by a bandit! How would you like to handle this (s Special Move (rRun! Prepare for battle! Press any letter then ENTER to continue… 2 The Wizard casts a spel1! Player wins! Increase score by 2 points! Wizard Status: Health: 10 Score: 7 The Wizard’s special move is Cast Spell What would you 1ike to do? (2)status Report II (n) (s) e) (w Move 1 Space North, South, East, or West q)Quit Sample Output 4- End Screen ル The game has come to an end! Your final stats: Wizard Status: Health: 10 Score: 7 The Wizard’s special move is ‘Cast Spell’ Thanks for playing! BUILD SUCCESSFUL (total time: 29 minutes 0 seconds) Show transcribed image text Sample Output 1-Opening Screen run: Welcome to JavaQuest! Stay alive and increase your score Choose a character.. (k)Knight I (h)Healer (wwizard I1 (t]Thief >W Welcome, Wizard! What would you like to do (2)status Report (n)s)(e(w) Move 1 Space North, South, East, or West >2 q)Quit Sample Output 2 – Move Results in Benign Scene What would you like to do? (2)Status Report I1 (nHs)(e)/w) Move 1 Space North, South, East, or West I1 IglQuit Interesting cottage there…
Sample Output 3-Move Results in Being Attacked What would you 1ike to do? )status Report [nlsHe) w Move 1 Space North, South, East, or West I q)Quit >W Oh no! You are being attacked by a bandit! How would you like to handle this (s Special Move (rRun! Prepare for battle! Press any letter then ENTER to continue… 2 The Wizard casts a spel1! Player wins! Increase score by 2 points! Wizard Status: Health: 10 Score: 7 The Wizard’s special move is Cast Spell What would you 1ike to do? (2)status Report II (n) (s) e) (w Move 1 Space North, South, East, or West q)Quit Sample Output 4- End Screen ル The game has come to an end! Your final stats: Wizard Status: Health: 10 Score: 7 The Wizard’s special move is ‘Cast Spell’ Thanks for playing! BUILD SUCCESSFUL (total time: 29 minutes 0 seconds)

Expert Answer


Answer to Description of Gameplay: At the opening of the game, the user chooses one of four character roles to play (Knight, Heale… . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *