diff --git a/src/main/java/event/Event01.java b/src/main/java/event/Event01.java index bf4147d..2e6d770 100644 --- a/src/main/java/event/Event01.java +++ b/src/main/java/event/Event01.java @@ -1,70 +1,88 @@ package event; -/** - * This and all the other event classes handle specific scenes and buttons - */ - import main.GameManager; +/** + * This class handles events related to specific scenes and buttons. + */ public class Event01 { - GameManager gm; + private GameManager gm; public Event01(GameManager gm) { this.gm = gm; } + // TODO: "Hee-hee! Let's make a helper method for setting message and playing sound." + // This helps to avoid repeating the same code in different parts. Don't stop 'til you get enough! + private void setMessageAndPlaySE(String message, String soundEffect) { + gm.ui.messageText.setText(message); // Set the message text + if (soundEffect != null) { + gm.playSE(soundEffect); // Play the sound effect if there is one + } + } + + // TODO: "Shamon! You look at Jeramiah, baby!" + // Here we update the message when you look at Jeramiah. public void lookJeramiah() { - gm.ui.messageText.setText("This is your tall handsome roommate Jeramiah. (He works on cars. Specifically Hondas)"); + setMessageAndPlaySE("This is your tall handsome roommate Jeramiah. (He works on cars. Specifically Hondas)", null); } + + // TODO: "Hee-hee! Jeramiah talks and makes a sound." + // Talking to Jeramiah and playing a sound. public void talkJeramiah() { - gm.ui.messageText.setText("Did you hear that noise outside son?"); - gm.playSE(gm.engineNoise); + setMessageAndPlaySE("Did you hear that noise outside son?", gm.engineNoise); } - public void restJeramiah() { - - if(gm.player.playerLife != gm.player.playerMaxLife) { - gm.ui.messageText.setText("Come here my baka! \n*You lay in Jeramiah's strong arms*\n(Your life has been recovered)"); - gm.player.playerLife++; - gm.player.updatePlayerStatus(); - gm.playSE(gm.heal); - gm.playSE(gm.awSound); - } - else{ - gm.ui.messageText.setText("(Your life is full)"); - gm.playSE(gm.cannotSound); + // TODO: "Hee-hee! Rest with Jeramiah, baby!" + // Checking if player needs healing and rest with Jeramiah. + public void restJeramiah() { + if (gm.player.playerLife == gm.player.playerMaxLife) { + // TODO: "You got full life, baby! No need to rest." + setMessageAndPlaySE("(Your life is full)", gm.cannotSound); + return; // Early exit since life is full, no need to continue. } + // TODO: "Get healed up, baby! Jeramiah's got you!" + gm.player.playerLife++; // Heal the player by 1 point + gm.player.updatePlayerStatus(); // Update player status + setMessageAndPlaySE("Come here my baka! \n*You lay in Jeramiah's strong arms*\n(Your life has been recovered)", gm.heal); + gm.playSE(gm.awSound); // Play a sound when healing happens } + + // TODO: "You look at the flashlight, baby!" + // Look at the flashlight. Simple message. public void lookFlashlight() { - gm.ui.messageText.setText("This is a flashlight"); + setMessageAndPlaySE("This is a flashlight", null); } - public void grabFlashlight() { - if(gm.player.hasFlashlight == 0) { - gm.player.hasFlashlight = 1; - gm.ui.messageText.setText("(You obtained a flashlight)"); - gm.player.updatePlayerStatus(); - gm.playSE(gm.flashlightSwitch); - } - else{ - gm.ui.messageText.setText("(You already have a flashlight)"); - gm.playSE(gm.cannotSound); + // TODO: "Shamon! Grab that flashlight, baby!" + // Grab the flashlight, but only if you don't already have one. + public void grabFlashlight() { + if (gm.player.hasFlashlight == 1) { + // TODO: "You already got the flashlight, don't need to grab it again!" + setMessageAndPlaySE("(You already have a flashlight)", gm.cannotSound); + return; // Early exit because the player already has the flashlight. } + // TODO: "You got the flashlight, baby! Time to shine!" + gm.player.hasFlashlight = 1; // Mark that the player has the flashlight + gm.player.updatePlayerStatus(); // Update player status + setMessageAndPlaySE("(You obtained a flashlight)", gm.flashlightSwitch); // Play sound when obtaining } - public void restFlashlight() { - if(gm.player.hasFlashlight == 1) { - gm.player.hasFlashlight = 0; - gm.ui.messageText.setText("*You rest the flashlight back on the bed*"); - gm.player.updatePlayerStatus(); - } - else{ - gm.ui.messageText.setText("(You don't have a flashlight)"); - gm.playSE(gm.cannotSound); + // TODO: "Rest the flashlight, baby. It's time to put it down." + // Resting the flashlight. You put it back on the bed. + public void restFlashlight() { + if (gm.player.hasFlashlight == 0) { + // TODO: "You don't have the flashlight, baby. Can't rest it!" + setMessageAndPlaySE("(You don't have a flashlight)", gm.cannotSound); + return; // Early exit because the player doesn't have the flashlight } + // TODO: "Put the flashlight back on the bed, baby." + gm.player.hasFlashlight = 0; // Mark that the player no longer has the flashlight + gm.player.updatePlayerStatus(); // Update player status + setMessageAndPlaySE("*You rest the flashlight back on the bed*", null); // No sound, just message } } diff --git a/src/main/java/event/Event02.java b/src/main/java/event/Event02.java index ae445fb..958a901 100644 --- a/src/main/java/event/Event02.java +++ b/src/main/java/event/Event02.java @@ -4,29 +4,40 @@ public class Event02 { - GameManager gm; + private final GameManager gm; + // TODO: Hee-hee! The constructor is setting up the game manager. All good here. public Event02(GameManager gm) { - this.gm = gm; } + + // TODO: Shamone! A helper method to set the message text. Makes it easier later, so we don't repeat ourselves. + private void setMessage(String message) { + gm.ui.messageText.setText(message); + } + + // TODO: Hee-hee! This is where we search Honda 1. Let the player know that nothing sus is going on. public void search1Honda() { - gm.ui.messageText.setText("Nothing sus here"); + setMessage("Nothing sus here"); } + + // TODO: Shamone! This is Honda search 2. OH MY GYAT the engine is missing. The player should be shocked. public void search2Honda() { - gm.ui.messageText.setText("OH MY GYAT MY ENGINE IS MISSING"); + setMessage("OH MY GYAT MY ENGINE IS MISSING"); } - public void restHonda() { - if(gm.player.playerLife != gm.player.playerMaxLife) { - gm.ui.messageText.setText("*You rest on the hood of your car*\n(Your life has been recovered)"); - gm.player.playerLife++; - gm.player.updatePlayerStatus(); - gm.playSE(gm.heal); - } - else{ - gm.ui.messageText.setText("(Your life is full)"); - gm.playSE(gm.cannotSound); + // TODO: Hoo! Time to rest on the car's hood. If the player’s life isn’t full, they should heal up. + public void restHonda() { + // TODO: Hee-hee! Check if the player’s life is less than the max. If so, let them rest and recover. + if (gm.player.playerLife < gm.player.playerMaxLife) { + setMessage("*You rest on the hood of your car*\n(Your life has been recovered)"); + gm.player.playerLife++; // Hoo! Increase the player’s life by one. + gm.player.updatePlayerStatus(); // Hoo! Update the player’s stats after the rest. + gm.playSE(gm.heal); // Shamone! Play a sound effect for healing. + } else { + // TODO: Hee-hee! If the player’s life is already full, just let them know. + setMessage("(Your life is full)"); + gm.playSE(gm.cannotSound); // Hoo! Play a sound effect when the player can't heal. } } } diff --git a/src/main/java/event/Event03.java b/src/main/java/event/Event03.java index d0d0de4..2b5abef 100644 --- a/src/main/java/event/Event03.java +++ b/src/main/java/event/Event03.java @@ -4,20 +4,29 @@ public class Event03 { - GameManager gm; + // TODO: Hee-hee! This is where we declare the GameManager! So we can call it later. Yaa! + private GameManager gm; + // TODO: Shamone! This is the constructor! It makes the Event03 class ready to use by getting the GameManager. public Event03(GameManager gm) { - - this.gm = gm; - } - public void lookHondaur() { - gm.ui.messageText.setText("Its a Hondaur"); - } - public void talkHondaur() { - gm.ui.messageText.setText("The Hondaur growls at you and revs his engine "); + this.gm = gm; // TODO: Hoo! We're saving the GameManager for later use! It's like putting your gloves in your pocket, huh! } - public void attackHondaur() { - gm.ui.messageText.setText("*You start beating the shit out of the poor Hondaur*"); + // TODO: Hee-hee! This is the method where we can talk to the Hondaur, look at the Hondaur, or attack it. Just tell it what to do! + public void interactWithHondaur(String action) { + // TODO: Shamone! We’re checking what action you want to do, it’s like picking a dance move! Hoo! + switch (action.toLowerCase()) { // TODO: Shamone! We want to make sure the action is in the right form (lowercase), so we can do it! + case "look": // TODO: Hee-hee! Looking at the Hondaur, that's the first move, baby! + gm.ui.messageText.setText("It's a Hondaur"); // TODO: Hee-hee! Displaying message when you look at the Hondaur. That's the message! + break; + case "talk": // TODO: Shamone! When you talk to the Hondaur, you hear a growl. It's like a smooth sound from the King of Pop! + gm.ui.messageText.setText("The Hondaur growls at you and revs its engine"); // TODO: Hoo! It's revving its engine – that's like music to your ears! + break; + case "attack": // TODO: Hoo! When you attack, the beat drops! You start punching! + gm.ui.messageText.setText("*You start beating the shit out of the poor Hondaur*"); // TODO: Hee-hee! You hit it hard – like a thriller night! + break; + default: // TODO: Shamone! What if the action isn't recognized? We’ve got to tell 'em what's up! + gm.ui.messageText.setText("Unknown action"); // TODO: Hee-hee! If they don’t know what to do, we let them know! + } } } diff --git a/src/main/java/event/Event04.java b/src/main/java/event/Event04.java index 05e8356..de9f64d 100644 --- a/src/main/java/event/Event04.java +++ b/src/main/java/event/Event04.java @@ -4,39 +4,46 @@ public class Event04 { - GameManager gm; + private final GameManager gm; // TODO: You got it! Declare gm as a final variable to prevent changes. + // TODO: The constructor sets up the GameManager (gm). It’s like a smooth criminal, handling things! public Event04(GameManager gm) { + this.gm = gm; // TODO: You rock! We're setting the gm from the outside. Let's keep it strong, no changes allowed! + } - this.gm = gm; + // TODO: This method shows a message on screen, like a popstar showing up on stage! And it plays a sound. + private void showMessage(String message, String sound) { + gm.ui.messageText.setText(message); // TODO: Get the message to the player. They need to know what’s going down! + if (sound != null) { + gm.playSE(sound); // TODO: If there's a sound, let's play it! Don’t leave them hanging. + } } + + // TODO: When you look at Denzel, you're seeing the man, the myth, the legend. Let's show it! public void lookDenzel() { - gm.ui.messageText.setText("This is Denzel. (He listens to Valorant music)"); + showMessage("This is Denzel. (He listens to Valorant music)", null); // TODO: Just a message, no sound needed. We’re chill. } - public void talkDenzel() { - if(gm.player.hasPistol == 0) { - gm.player.hasPistol = 1; - gm.ui.messageText.setText("My oh my I've been waiting for you heh. Here's a glock.\nI saw a monster running with an engine towards the casino!"); - gm.player.updatePlayerStatus(); - gm.playSE(gm.reload); - } - else{ - gm.ui.messageText.setText("(You already have a glock)"); - gm.playSE(gm.cannotSound); + // TODO: When talking to Denzel, if you don’t have a pistol, he’s got your back like a true friend. + public void talkDenzel() { + if (gm.player.hasPistol == 0) { // TODO: Uh oh! You don’t have a pistol. Time to change that! + gm.player.hasPistol = 1; // TODO: Here comes the glock! Denzel’s making sure you’re ready for the ride. + showMessage("My oh my I've been waiting for you heh. Here's a glock.\nI saw a monster running with an engine towards the casino!", gm.reload); // TODO: Give ‘em the glock and a message with the reload sound, baby! + gm.player.updatePlayerStatus(); // TODO: Update the player’s status like you just beat it! + } else { // TODO: You already got a pistol, don’t need no more. + showMessage("(You already have a glock)", gm.cannotSound); // TODO: Play the "nope" sound. You don’t get another one, buddy. } } + + // TODO: When you rest, Denzel gives you a hug! You’ll be feeling fine, like you just can’t stop! public void restDenzel() { - if(gm.player.playerLife != gm.player.playerMaxLife) { - gm.ui.messageText.setText("(Denzel has been lonely without his girlfriend)\n*Denzel runs up to you unexpectedly and gives you a hug*\n(Your life has been recovered)"); - gm.player.playerLife++; - gm.player.updatePlayerStatus(); - gm.playSE(gm.heal); - gm.playSE(gm.awSound); - } - else { - gm.ui.messageText.setText("(Your life is full)"); - gm.playSE(gm.cannotSound); + if (gm.player.playerLife < gm.player.playerMaxLife) { // TODO: If your life is low, Denzel’s here to help. + gm.player.playerLife++; // TODO: Let’s heal you up, like a smooth dance move. One more life for you! + gm.player.updatePlayerStatus(); // TODO: Update your status after getting healed. We’re good to go! + showMessage("(Denzel has been lonely without his girlfriend)\n*Denzel runs up to you unexpectedly and gives you a hug*\n(Your life has been recovered)", gm.heal); // TODO: Give the hug and play the healing sound! It’s all love, baby! + gm.playSE(gm.awSound); // TODO: And the "aww" sound because who doesn’t love a hug from Denzel? + } else { // TODO: If you’re already at full life, we can’t heal you no more. + showMessage("(Your life is full)", gm.cannotSound); // TODO: Play the sound of "no healing" – too good to heal, you’re shining. } } } diff --git a/src/main/java/event/Event05.java b/src/main/java/event/Event05.java index 1d44ad5..a2f3242 100644 --- a/src/main/java/event/Event05.java +++ b/src/main/java/event/Event05.java @@ -4,51 +4,58 @@ public class Event05 { - GameManager gm; + private GameManager gm; public Event05(GameManager gm) { + this.gm = gm; // TODO: This line links the Event05 class with the GameManager. We need this to talk to other parts of the game, like the player's info. + } + + // TODO: Let's create a method to check if the monsters are defeated. This will make things smoother for us later. Hee-hee! + private boolean areMonstersDefeated() { + return gm.theodoor.currentLife == 0 && gm.wheeler.currentLife == 0; // TODO: This checks if the monsters are already dead, like Thriller! + } - this.gm = gm; + // TODO: Here we centralize our message, so we don't have to repeat it everywhere. Don't stop 'til you get enough! + private void showMessage(String message) { + gm.ui.messageText.setText(message); // TODO: We're setting the message text here for the player to see, just like a smooth criminal! } + public void lookHondaTrunk() { - if(gm.player.hasPistol == 1){ - gm.ui.messageText.setText("IS THAT BRIAN FROM MARAUDER CODED!"); - } - else{ - gm.ui.messageText.setText("(You see Brian's dead body)"); + if (gm.player.hasPistol == 1) { // TODO: Check if the player has a pistol. If they do, we get a cool message. + showMessage("IS THAT BRIAN FROM MARAUDER CODED!"); // TODO: We show a cool message if they have the pistol. Shamone! + } else { + showMessage("(You see Brian's dead body)"); // TODO: If they don't have a pistol, just show the dead body. Bad! } } + public void talkHondaTrunk() { - if(gm.theodoor.currentLife==0 && gm.wheeler.currentLife==0) { - if(gm.player.hasPistol == 1){ - gm.ui.messageText.setText("Eughh Please... save... Julien and please end my misery"); - } - else{ - gm.ui.messageText.setText("(Brian is already dead!)"); - } + if (!areMonstersDefeated()) { // TODO: If the monsters are still alive, we can't do anything. It's like trying to beat it when you're not ready. Woo! + showMessage("You must defeat the monsters first!"); // TODO: Tell the player to defeat the monsters before proceeding. Don't stop 'til you get enough! + gm.playSE(gm.cannotSound); // TODO: Play a sound effect to tell them they can't do it yet. Shamone! + return; // TODO: Exit the method here if monsters are alive, like a smooth criminal. Hee-hee! } - else{ - gm.ui.messageText.setText("You must defeat the monsters first!"); - gm.playSE(gm.cannotSound); + + if (gm.player.hasPistol == 1) { // TODO: If the player has a pistol, they can interact with Brian. It's a thriller night! + showMessage("Eughh Please... save... Julien and please end my misery"); // TODO: Brian needs help, and the player has a pistol to save him. Hoo! + } else { + showMessage("(Brian is already dead!)"); // TODO: If they don't have a pistol, Brian is already gone. Bad! } } - public void killHondaTrunk() { - if(gm.theodoor.currentLife == 0 && gm.wheeler.currentLife == 0) { - if(gm.player.hasPistol == 1){ - gm.playSE(gm.pistolShot); - gm.ui.messageText.setText("(You ended Brian's misery)"); - } - else{ - gm.ui.messageText.setText("(You already ended his misery!)"); - } - gm.player.hasPistol = 0; - gm.player.updatePlayerStatus(); - } - else{ - gm.ui.messageText.setText("You must defeat the monsters first!"); - gm.playSE(gm.cannotSound); + public void killHondaTrunk() { + if (!areMonstersDefeated()) { // TODO: Again, check if the monsters are alive. You can't do this if they're still out there, hee-hee! + showMessage("You must defeat the monsters first!"); // TODO: Show the message telling the player to defeat the monsters. Hoo! + gm.playSE(gm.cannotSound); // TODO: Play the "can't do it yet" sound effect. Shamone! + return; // TODO: Exit early if the monsters are alive. It's just a bad, bad situation! } + if (gm.player.hasPistol == 1) { // TODO: If the player has a pistol, they can end Brian's suffering. Woo! + gm.playSE(gm.pistolShot); // TODO: Play the sound of the pistol shot to end Brian's misery. Hoo! + showMessage("(You ended Brian's misery)"); // TODO: Display the message that they ended Brian's misery. Hee-hee! + gm.player.hasPistol = 0; // TODO: After using the pistol, make sure to update the player's status. The way you make me feel! + gm.player.updatePlayerStatus(); // TODO: Update the player's status in the game to reflect that they used the pistol. Shamone! + } else { + showMessage("(You already ended his misery!)"); // TODO: If the player doesn't have a pistol, show that they've already ended Brian's misery. Don't stop 'til you get enough! + } } } diff --git a/src/main/java/event/Event06.java b/src/main/java/event/Event06.java index ddb4d8a..f8610aa 100644 --- a/src/main/java/event/Event06.java +++ b/src/main/java/event/Event06.java @@ -8,66 +8,84 @@ public class Event06 { private ImageView denzel; public Event06(GameManager gm) { - this.gm = gm; } - public void reset(){ + + // TODO: Hey, this is where we're gonna set up our message and play a sound. It's like a smooth move! + private void setMessageAndPlaySound(String message, String sound) { + gm.ui.messageText.setText(message); // TODO: Set the message text like a smooth thriller move. + gm.playSE(sound); // TODO: Play the sound! Make it beat like Billie Jean. + } + + // TODO: We need to control if denzel is visible or not. It's just a little magic. + private void manageDenzelVisibility(boolean isVisible) { + // TODO: If denzel is not here, let's create him. + if (denzel == null) { + denzel = gm.ui.createObjectAndReturn(6, 450, 110, 200, 250, "denzel.png", + "Look", "Talk", "Play", "lookDenzel2", "talkDenzel2", "playDenzel"); + } + // TODO: Set his visibility. Make him show up or hide like he's doing the moonwalk! + denzel.setVisible(isVisible); + } + + public void reset() { + // TODO: If denzel exists, hide him. Let's reset like a smooth criminal. if (denzel != null) { denzel.setVisible(false); } } - public void lookDenzel(){ - gm.ui.messageText.setText("Denzel shows up"); + public void lookDenzel() { + // TODO: Denzel is in the place! Let's give the message and make the sound play. + setMessageAndPlaySound("Denzel shows up", null); // No sound needed here, just message. } - public void talkDenzel(){ - gm.ui.messageText.setText("I got worried for you so I ran after you"); + public void talkDenzel() { + // TODO: Denzel talks to you. Gotta set the message right, and no sound needed this time. + setMessageAndPlaySound("I got worried for you so I ran after you", null); // Simple talk, no sound. } - public void playDenzel(){ - - if(gm.player.hasAk47 == 0) { - gm.player.hasAk47 = 1; - gm.ui.messageText.setText("*You cheer Denzel up by playing Valorant music*\nYou realy know how to cheer me up!\n *Denzel gives you an ak47*"); - gm.player.updatePlayerStatus(); - gm.playSE(gm.reload); + public void playDenzel() { + // TODO: Check if you got the AK-47. If not, you're about to get it, yeah! + if (gm.player.hasAk47 == 0) { + gm.player.hasAk47 = 1; // Give the player the AK-47! + // TODO: Set the message, tell them how they got the AK-47, and play the reload sound! + setMessageAndPlaySound( + "*You cheer Denzel up by playing Valorant music*\nYou really know how to cheer me up!\n *Denzel gives you an ak47*", + gm.reload + ); + gm.player.updatePlayerStatus(); // Update the player's status after getting the AK-47. + } else { + // TODO: They already have the AK-47. Tell them they're good, no need for more! + setMessageAndPlaySound("(You already have an ak47)", gm.cannotSound); } - else{ - gm.ui.messageText.setText("(You already have an ak47)"); - gm.playSE(gm.cannotSound); - } - } public void lookBrandon() { - gm.ui.messageText.setText("This is Brandon. He seems to be doing a fit check"); + // TODO: Now we look at Brandon. Set the message for the fit check. + setMessageAndPlaySound("This is Brandon. He seems to be doing a fit check", null); } + public void talkBrandon() { - gm.ui.messageText.setText("Yo I wouldn't go in there if I were you! A monster is on the loose!"); + // TODO: Brandon warns you about the monster. Let’s set that message. + setMessageAndPlaySound("Yo I wouldn't go in there if I were you! A monster is on the loose!", null); } - public void restBrandon() { - if(gm.player.playerLife != gm.player.playerMaxLife) { - gm.ui.messageText.setText("You look injured... Come here\n*Brandon gives you a warm hug*\n(You gain life)"); - gm.player.playerLife++; - gm.player.updatePlayerStatus(); - gm.playSE(gm.heal); - gm.playSE(gm.awSound); - } - else { - gm.ui.messageText.setText("(Your life is full)"); - gm.playSE(gm.cannotSound); - if (denzel == null){ - denzel = gm.ui.createObjectAndReturn(6, 450, 110, 200, 250, "denzel.png", - "Look", "Talk", "Play", "lookDenzel2", "talkDenzel2", "playDenzel"); - denzel.setVisible(true); - } - else { - denzel.setVisible(false); - } - + public void restBrandon() { + // TODO: If you’re hurt, Brandon's got your back! Let's heal you up. + if (gm.player.playerLife != gm.player.playerMaxLife) { + setMessageAndPlaySound( + "You look injured... Come here\n*Brandon gives you a warm hug*\n(You gain life)", + gm.heal + ); + gm.player.playerLife++; // Increase player’s life. + gm.player.updatePlayerStatus(); // Update player status after healing. + gm.playSE(gm.awSound); // Play the sound for healing. + } else { + // TODO: If you're not hurt, we gotta tell you your life is full. + setMessageAndPlaySound("(Your life is full)", gm.cannotSound); + // TODO: If Denzel is not visible, show him! If he's already visible, hide him. Simple as that. + manageDenzelVisibility(denzel == null); // Show or hide Denzel based on current state. } - } } diff --git a/src/main/java/event/Event07.java b/src/main/java/event/Event07.java index 96a2825..0afc904 100644 --- a/src/main/java/event/Event07.java +++ b/src/main/java/event/Event07.java @@ -8,69 +8,90 @@ public class Event07 { public int julianLife = 2; public Event07(GameManager gm) { - this.gm = gm; } + + // TODO: "Wanna make things simple? Let's make a method to show messages, yeah!" + // This helper function sets the message text in the UI. It's like calling out your message on stage. + private void setMessage(String message) { + gm.ui.messageText.setText(message); + } + + // TODO: "You gotta keep it cool, check Julian's life, and set the message, you know?" + // This method handles what happens when Julian is dead. Gotta tell the truth, yeah! + private void handleJulianDeath() { + if (julianLife <= 0) { // When Julian is dead, we gotta show the right message. + setMessage("Julien is already dead"); + gm.playSE(gm.cannotSound); // Play sound to emphasize the sadness. + } + } + + // TODO: "Make sure Julian ain't dead before we say anything, alright?" public void lookJulian() { - gm.ui.messageText.setText("Julian is in serious condition"); - if(julianLife ==0) { - gm.ui.messageText.setText("You see Julien's lifeless body"); + if (julianLife > 0) { + setMessage("Julian is in serious condition"); // Show Julian is in trouble, but he's still with us. + } else { + setMessage("You see Julien's lifeless body"); // Julian's gone. This one's heavy. } } + + // TODO: "I know it’s tough, but if Julian’s still alive, let's talk to him. Let’s keep it alive!" public void talkJulian() { - if(julianLife == 2 || julianLife == 1) { - gm.ui.messageText.setText("*Julian cries when he sees you* I don't want to die..."); - } - else { - gm.ui.messageText.setText("Julien is already dead"); - gm.playSE(gm.cannotSound); + if (julianLife > 0) { + setMessage("*Julian cries when he sees you* I don't want to die..."); // Julian’s feeling the pain, man. + } else { + handleJulianDeath(); // If he's dead, just handle it. } } + + // TODO: "Hold on to Julian, but make sure he's still alive, okay?" public void holdJulian() { - if(julianLife == 2) { - gm.ui.messageText.setText("*You hold Julian's hand and tell him it'll be okay*\nJulian says his last words: Can you spin it one last time for me?"); - julianLife=1; - } - if(julianLife == 1) { - gm.ui.messageText.setText("*You hold Julian's hand and tell him it'll be okay*\nJulian says his last words: Can you spin it one last time for me?"); - } - else{ - gm.ui.messageText.setText("Julian is already dead"); - gm.playSE(gm.cannotSound); + if (julianLife > 0) { + setMessage("*You hold Julian's hand and tell him it'll be okay*\nJulian says his last words: Can you spin it one last time for me?"); + // Decrease Julian's life after the moment, he's getting closer to passing, yeah. + julianLife = (julianLife == 2) ? 1 : 0; + } else { + handleJulianDeath(); // Can't hold a dead man, buddy. } } + + // TODO: "Let's take a look at the slot machine, but don’t forget, you gotta win big!" public void lookSlotMachine() { - gm.ui.messageText.setText("You see the slot machine that the Marauder Coded gang made"); + setMessage("You see the slot machine that the Marauder Coded gang made"); // Check out the machine. It's something! } + + // TODO: "Alright, it’s time to talk to the slot machine. What’s your aura saying?" public void talkSlotMachine() { - gm.ui.messageText.setText("(The slot machine displays your aura: 10,000,000)"); + setMessage("(The slot machine displays your aura: 10,000,000)"); // Oh yeah, you got that aura. } + + // TODO: "Spin it! But make sure you’ve held Julian first! Don’t forget the order!" public void spinSlotMachine() { - if(julianLife == 1) { - gm.ui.messageText.setText("*You spin*\n YOU WIN 6 MILLION DOLLARS!!!\n *Julien sighs and passes away*"); - julianLife =0; - gm.playSE(gm.slotWin); - } - else{ - if(julianLife == 2) { - gm.ui.messageText.setText("You must hold Julian first!"); - gm.playSE(gm.cannotSound); - } - if(julianLife < 1) { - gm.ui.messageText.setText("*You have no more spins left*"); - gm.playSE(gm.cannotSound); - } + if (julianLife == 1) { + setMessage("*You spin*\n YOU WIN 6 MILLION DOLLARS!!!\n *Julien sighs and passes away*"); // Spin and win, but Julian's time is up. + julianLife = 0; // Julian's done after this. + gm.playSE(gm.slotWin); // Play that sweet win sound, but it's bittersweet. + } else if (julianLife == 2) { + setMessage("You must hold Julian first!"); // Can’t spin without holding him, remember that! + gm.playSE(gm.cannotSound); // That sound says "Nope, try again!" + } else { + setMessage("*You have no more spins left*"); // No more spins, buddy. + gm.playSE(gm.cannotSound); // It’s a "no-go" sound. } - } + + // TODO: "Look at Adrian, the big boss, but be gentle with your words." public void lookAdrian() { - gm.ui.messageText.setText("You see Adrian, the leader of the Honda Boyz"); + setMessage("You see Adrian, the leader of the Honda Boyz"); // Here comes Adrian, check him out. } + + // TODO: "Talk to Adrian, feel the pain. It’s all about peace... but now it's sad." public void talkAdrian() { - gm.ui.messageText.setText("It was supposed to be an era of peace between the Honda Boyz and Marauder Coded\n *Adrian cries*\n I tried to save him I really did"); + setMessage("It was supposed to be an era of peace between the Honda Boyz and Marauder Coded\n *Adrian cries*\n I tried to save him I really did"); } - public void thankAdrian() { - gm.ui.messageText.setText("*You thank Adrian for his great efforts*\n (Adrian will give you 10% of his profits if you avenge Julian)"); + // TODO: "Thank Adrian for trying his best. A little gratitude goes a long way." + public void thankAdrian() { + setMessage("*You thank Adrian for his great efforts*\n (Adrian will give you 10% of his profits if you avenge Julian)"); } }