Menu

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

I need help creating this game in Java.

Description of Gameplay: At the opening of the game, the user chooses one of four character roles to play (Knight, Healer, Wi

Programming Requirements Your program should meet the following implementation requirements, the rest is up to you . Player s

. Player should have two private instance variables, health and score, as well at least the following two abstract methods pu

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

What would you 1ike to do? )status Report [nHs)le) (w Move 1 Space North, South, East, or West I1 Iq)Quit >w Oh no! You are b

Description of Gameplay: At the opening of the game, the user chooses one of four character roles to play (Knight, Healer, Wizard, or Thief). All characters start with 10 Health points and a Score 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 (see Sample Output 1) consists of six options: Status Report; Move 1 Space either North, South, East, or West; Quit. The user enters the letter/symbol for the chosen option, and the associated event occurs: Status Report-Simply print the player’s current state (Hint: Use toString() method) Move-A move will either (a) take the player to one of four benign scenes, or (b) cause the player to be attacked by one of three foes. Here are the details for each scenario (see Sample Outputs 2 and 3) (a) For the benign scene event, the player’s score increases by 1, and a short description of the scene is displayed. The possible scenes are “Nothing here…” “Nice trees around here…” “Interesting cottage there.., and “Potty break…” (see Sample Output 2). After that, the main menu will appear and ask for another choice (b) If the player is attacked, a message is displayed saying they are being attacked by one of three possible foes- “zombie”, “bandit”, or “lobbyist”. Then, another menu pops up asking if the player would like to use his/her special move, or run. If running is successful, the score is increased by 1 and gameplay continues with the main menu o o If running is unsuccessful or the user selects “Special Move”, a battle message is displayed and the game waits for the user to enter any letter. Then, the outcome of the battle is displayed. If the player wins, 2 points are added to the score. If the player loses, 1 Health point is deducted. The player’s status is displayed, 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 game should also end if the player’s health drops to zero . Programming Requirements Your program should meet the following implementation requirements, the rest is up to you . Player should be an abstract class, with subclasses Knight, Healer, Wizard, Thief. . Player should have two private instance variables, health and score, as well at least the following two abstract methods public abstract String getSpecialMove); ‘ public abstract void useSpecialMove(); Player can have other methods . I highly recommend each subclass overrides the toString() method (see Status Report, above) Your main program must make use of a sentinel loop structure. That should be obvious by now! You will also want to make use of the Random class to choose random scenes and foes from the list of possible values (see above), as well as to decide if an attack is happening and if so, the winner of the battle. My implementation chooses a foe/attack scenario 20% of the time, decides that “running” from a battle is successful 50% of the time, and decides that the player wins the battle 60% of the time Validation: If the user enters a choice that does not appear in the menu, you should 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 I1 (hjHealer 11 (wjwizard I (t) Thief Welcome, Wizard! What would you like to do2 (21Status Report I1 (n)(s)(e(w) Move 1 Space North, South, East, or West I1 q)Quit >2 Sample Output 2 – Move Results in Benign Scene What would you like to do? (2)Status Report II (nHs)few) Move 1 Space North, South, East, or West 11 (giQuit Interesting cottage there… What would you 1ike to do? )status Report [nHs)le) (w Move 1 Space North, South, East, or West I1 Iq)Quit >w Oh no! You are being attacked by a bandit! How (s Special Move (rRun! would you like to handle this? Prepare for battle! Press any letter then ENTER to continue… 2 The Wizard casts a spel1! Player wins! Increase core by 2 points! Wizard Status: Health: 10 Score: 7 The Wizard’s special move is ‘Cast Spell’ What would you like 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 Description of Gameplay: At the opening of the game, the user chooses one of four character roles to play (Knight, Healer, Wizard, or Thief). All characters start with 10 Health points and a Score 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 (see Sample Output 1) consists of six options: Status Report; Move 1 Space either North, South, East, or West; Quit. The user enters the letter/symbol for the chosen option, and the associated event occurs: Status Report-Simply print the player’s current state (Hint: Use toString() method) Move-A move will either (a) take the player to one of four benign scenes, or (b) cause the player to be attacked by one of three foes. Here are the details for each scenario (see Sample Outputs 2 and 3) (a) For the benign scene event, the player’s score increases by 1, and a short description of the scene is displayed. The possible scenes are “Nothing here…” “Nice trees around here…” “Interesting cottage there.., and “Potty break…” (see Sample Output 2). After that, the main menu will appear and ask for another choice (b) If the player is attacked, a message is displayed saying they are being attacked by one of three possible foes- “zombie”, “bandit”, or “lobbyist”. Then, another menu pops up asking if the player would like to use his/her special move, or run. If running is successful, the score is increased by 1 and gameplay continues with the main menu o o If running is unsuccessful or the user selects “Special Move”, a battle message is displayed and the game waits for the user to enter any letter. Then, the outcome of the battle is displayed. If the player wins, 2 points are added to the score. If the player loses, 1 Health point is deducted. The player’s status is displayed, 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 game should also end if the player’s health drops to zero .
Programming Requirements Your program should meet the following implementation requirements, the rest is up to you . Player should be an abstract class, with subclasses Knight, Healer, Wizard, Thief.
. Player should have two private instance variables, health and score, as well at least the following two abstract methods public abstract String getSpecialMove); ‘ public abstract void useSpecialMove(); Player can have other methods . I highly recommend each subclass overrides the toString() method (see Status Report, above) Your main program must make use of a sentinel loop structure. That should be obvious by now! You will also want to make use of the Random class to choose random scenes and foes from the list of possible values (see above), as well as to decide if an attack is happening and if so, the winner of the battle. My implementation chooses a foe/attack scenario 20% of the time, decides that “running” from a battle is successful 50% of the time, and decides that the player wins the battle 60% of the time Validation: If the user enters a choice that does not appear in the menu, you should 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 I1 (hjHealer 11 (wjwizard I (t) Thief Welcome, Wizard! What would you like to do2 (21Status Report I1 (n)(s)(e(w) Move 1 Space North, South, East, or West I1 q)Quit >2 Sample Output 2 – Move Results in Benign Scene What would you like to do? (2)Status Report II (nHs)few) Move 1 Space North, South, East, or West 11 (giQuit Interesting cottage there…
What would you 1ike to do? )status Report [nHs)le) (w Move 1 Space North, South, East, or West I1 Iq)Quit >w Oh no! You are being attacked by a bandit! How (s Special Move (rRun! would you like to handle this? Prepare for battle! Press any letter then ENTER to continue… 2 The Wizard casts a spel1! Player wins! Increase core by 2 points! Wizard Status: Health: 10 Score: 7 The Wizard’s special move is ‘Cast Spell’ What would you like 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 *