Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.*;
- public class SemProject1
- {
- public static void main(String[] args)
- {
- Scanner scan = new Scanner(System.in);
- System.out.println("What is your name?");
- String name = scan.nextLine();
- int strength =0;
- int health = 100;
- int magic =100;
- int attackSpeed =5;
- Random Warriorcombat = new Random ();
- Random Magecombat = new Random();
- Random Rougecombat = new Random();
- Random Bowmencombat = new Random();
- while (name.equals(name))
- {
- System.out.println("Welcome to the game: " +name);
- System.out.println("The rules for this game is as follows: \n"
- + "I will give you the options you can choose. Type the number that corresponds to the option you want. "
- +"You can make your own path to this game");
- System.out.println("==================================================================================================="
- + "=========================================");
- System.out.println();
- System.out.println();
- System.out.println("You awake at a cell. You have no idea how you got there or who you are.");
- System.out.println("Suddenly, you meet a strange, lonely man. The strange man approaches you");
- System.out.println("He says to you, \"The invasion has started. Are you ready for it?\"");
- Scanner Class = new Scanner(System.in);
- System.out.println("Suddenly, a strange light approaches you. You got blinded by the light and fall in deep sleep again.");
- System.out.println("Out of game: What class do you want to be?");
- System.out.println("1: Warrior");
- System.out.println("2: Mage");
- System.out.println("3. Rouge");
- System.out.println("4. Bowmen");
- int number = Class.nextInt();
- System.out.println("As you wake up, you see that the old man has dissapeared and left you some equipment for your class");
- if (number ==1)
- { System.out.println("You chose to be a Warrior.");
- System.out.println("You see a sword, heavy armor, shield. You have: " +(strength + 20) + " Strength, " + ( health + 20) + " Health, " +( magic -50) + " Magic, "+ ( attackSpeed) + " Attack Speed");
- }
- else if (number==2)
- {
- System.out.println("You chose to be a Mage");
- System.out.println("You see a staff, robes, book. You have: " +(strength + 5) + " Strength, " + ( health + -25) + " Health, " +( magic+ 100) + " Magic, "+ ( attackSpeed - 2) +" Attack Speed");
- }
- else if (number==3)
- {
- System.out.println("You chose to be a Rouge");
- System.out.println("You see 2 daggers, light armor and a cloak. You have: "+(strength +10) + " Strength, " +(health -50) + " Health, "+(magic +20) + " Magic, "+ (attackSpeed + 5) +" Attack Speed");
- }
- else
- {
- System.out.println("You chose to be a Bowman");
- System.out.println("You see a bow, light armor and a quiver of arrows. You have: "+(strength +15) + " Strength, " +(health -60) + " Health, "+(magic-30) + " Magic, "+ (attackSpeed + 13) +" Attack Speed");
- }
- System.out.println("As you stand up, you hear a zombie-like voice. As you look where the voice is coming from, a boney like figure is approcuhing you with a sword aimed at your heart.");
- System.out.println("What will you do?");
- System.out.println("1. Raise your weapons and attack back");
- System.out.println("2. Put your weapons down and try to talk with him.");
- int question1=scan.nextInt();
- if (number==1 && question1 ==1)
- {
- System.out.println("You raise your sword and kill the goblin warrior.");
- System.out.println("As you kill him, you feel stronger. Almost as if you've leveled up.");
- ;
- }
- else if (number==2 && question1==1)
- {
- System.out.println("You raise your staff and wack the goblin warrior at the back of his head and kill him");
- System.out.println("As you kill him, you feel stronger. Almost as if you've leveled up.");
- }
- else if (number==3 && question1==1)
- {
- System.out.println("You raise your dagger and stab the goblin warrior at the back of his head and kill him");
- System.out.println("As you kill him, you feel stronger. Almost as if you've leveled up.");
- }
- else if (number==4 && question1==1)
- {
- System.out.println("You raise your bow, grab an arrow from your quiver and kill th the goblin warrior");
- System.out.println("As you kill him, you feel stronger. Almost as if you've leveled up.");
- }
- else
- {
- System.out.println("The goblin warrior charges at you and stabs you in the heart. You bleed out and die");
- System.out.println("What'd you expect?");
- health =0;
- if (health ==0)
- {
- System.out.println("Game over. Try again next time and make sure you pick the right choice.");
- }
- System.exit(0);
- }
- System.out.println("You leave the dungeon and open a huge door.");
- System.out.println("You see a stair case going in opposite directions. One leads downward and the other stair case leads upwards. What will you do?");
- System.out.println("1. Go downward");
- System.out.println("2. Go upwards");
- int stair= scan.nextInt();
- if (stair ==1)
- {
- System.out.println("You traverse down the stairs");
- System.out.println("You walk down for 10 minutes and finally reach a door.");
- System.out.println("You open the door and see a bunch of golbin warriors and archers chilling. At the end of the room, you see another door.");
- System.out.println("They don't seem to notice you. Most are asleep or day dreaming. You could easily kill a few before the rest wake up or ignore them and go for the door. Enter the number 1 to stealh kill");
- System.out.println("1. Stealth kill a few goblins before they wake up.");
- int killorstealth= scan.nextInt();
- if (killorstealth == 1)
- {
- System.out.println("You stealth kill 3 of the 8 goblins");
- System.out.println("As you grab the 4th goblin, another goblin wakes up and shanks you from the back.");
- if (number == 1 && killorstealth ==1)
- {
- System.out.println("You cry out in pain and push the warrior aside. Your cry wakes everyone up.");
- System.out.println("You realize that you are forced to fight them in order to leave this room alive.");
- System.out.println("You pick up your sword and engage in combat.");
- int WarriorFirstFight = Warriorcombat.nextInt(6) * 1;
- if (WarriorFirstFight == 1)
- {
- System.out.println("You kill all of the goblins without a scratch");
- System.out.println("You grab a key hanging from a goblin's neck and open the door");
- System.out.println("As you step outside, you see that everything is in shambles and chaos everywhere.");
- System.out.println("You also see a purple beam erupting from a castle. As you look at the prple light, a flashback occurs in your mind.");
- System.out.println("You remember that you were a a loyal knight for this kingdom that is now in ruins. You recently found out that someone from far away planned to overtake"
- + " the kingdom ");
- System.out.println("When you told the king that, he felt furiated and threw you into the dungeon.");
- System.out.println("Even though you felt backstabbed, you realize that you have a duty to fulfill and to protect the king at all costs. So you begin traveling to reach the castle.");
- }
- if (WarriorFirstFight == 3)
- {
- System.out.println("You kill all of the goblins without a scratch");
- System.out.println("You grab a key hanging from a goblin's neck and open the door");
- System.out.println("As you step outside, you see that everything is in shambles and chaos everywhere.");
- System.out.println("You also see a purple beam erupting from a castle. As you look at the prple light, a flashback occurs in your mind.");
- System.out.println("You remember that you were a a loyal knight for this kingdom that is now in ruins. You recently found out that someone from far away planned to overtake"
- + " the kingdom ");
- System.out.println("When you told the king that, he felt furiated and threw you into the dungeon.");
- System.out.println("Even though you felt backstabbed, you realize that you have a duty to fulfill and to protect the king at all costs. So you begin traveling to reach the castle.");
- }
- if (WarriorFirstFight == 4)
- {
- System.out.println("You kill all of the goblins without a scratch");
- System.out.println("You grab a key hanging from a goblin's neck and open the door");
- System.out.println("As you step outside, you see that everything is in shambles and chaos everywhere.");
- System.out.println("You also see a purple beam erupting from a castle. As you look at the prple light, a flashback occurs in your mind.");
- System.out.println("You remember that you were a a loyal knight for this kingdom that is now in ruins. You recently found out that someone from far away planned to overtake"
- + " the kingdom ");
- System.out.println("When you told the king that, he felt furiated and threw you into the dungeon.");
- System.out.println("Even though you felt backstabbed, you realize that you have a duty to fulfill and to protect the king at all costs. So you begin traveling to reach the castle.");
- }
- if (WarriorFirstFight == 5)
- {
- System.out.println("You kill all of the goblins without a scratch");
- System.out.println("You grab a key hanging from a goblin's neck and open the door");
- System.out.println("As you step outside, you see that everything is in shambles and chaos everywhere.");
- System.out.println("You also see a purple beam erupting from a castle. As you look at the prple light, a flashback occurs in your mind.");
- System.out.println("You remember that you were a a loyal knight for this kingdom that is now in ruins. You recently found out that someone from far away planned to overtake"
- + " the kingdom");
- System.out.println("When you told the king that, he felt furiated and threw you into the dungeon.");
- System.out.println("Even though you felt backstabbed, you realize that you have a duty to fulfill and to protect the king at all costs. So you begin traveling to reach the castle.");
- }
- if (WarriorFirstFight ==2)
- {
- System.out.println("You grab a key hanging from a goblin's neck and open the door");
- System.out.println("As you step outside, you see that everything is in shambles and chaos everywhere.");
- System.out.println("You also see a purple beam erupting from a castle. As you look at the prple light, a flashback occurs in your mind.");
- System.out.println("You remember that you were a a loyal knight for this kingdom that is now in ruins. You recently found out that someone from far away planned to overtake"
- + " the kingdom ");
- System.out.println("When you told the king that, he felt furiated and threw you into the dungeon.");
- System.out.println("Even though you felt backstabbed, you realize that you have a duty to fulfill and to protect the king at all costs. So you begin traveling to reach the castle.");
- }
- if (WarriorFirstFight ==6)
- {
- System.out.println("You grab a key hanging from a goblin's neck and open the door");
- System.out.println("As you step outside, you see that everything is in shambles and chaos everywhere.");
- System.out.println("You also see a purple beam erupting from a castle. As you look at the prple light, a flashback occurs in your mind.");
- System.out.println("You remember that you were a a loyal knight for this kingdom that is now in ruins. You recently found out that someone from far away planned to overtake"
- + " the kingdom");
- System.out.println("When you told the king that, he felt furiated and threw you into the dungeon.");
- System.out.println("Even though you felt backstabbed, you realize that you have a duty to fulfill and to protect the king at all costs. So you begin traveling to reach the castle.");
- }
- System.out.println("You see a big goblin with 2 axes.");
- System.out.println("The goblin charges at you. You are forced to fight.");
- }
- if (number ==2 && killorstealth ==1)
- {
- System.out.println("You cry out in pain and push the warrior aside. Your cry wakes everyone up.");
- System.out.println("You realize that you are forced to fight them in order to leave this room alive.");
- System.out.println("You pick up your staff and start fighting.");
- int MageFirstFight = Magecombat.nextInt(6) * 1;
- if (MageFirstFight == 1)
- {
- System.out.println("You kill all of the goblins without a scratch");
- System.out.println("You grab a key hanging from a goblin's neck and open the door");
- System.out.println("As you step outside, you see that everything is in shambles and chaos everywhere.");
- System.out.println("You also see a purple beam erupting from a castle. As you look at the prple light, a flashback occurs in your mind.");
- System.out.println("You remember that you were a a loyal knight for this kingdom that is now in ruins. You recently found out that someone from far away planned to overtake"
- + " the kingdom");
- System.out.println("When you told the king that, he felt furiated and threw you into the dungeon.");
- System.out.println("Even though you felt backstabbed, you realize that you have a duty to fulfill and to protect the king at all costs. So you begin traveling to reach the castle.");
- }
- if (MageFirstFight == 2)
- {
- System.out.println("You kill all of the goblins without a scratch");
- System.out.println("You grab a key hanging from a goblin's neck and open the door");
- System.out.println("As you step outside, you see that everything is in shambles and chaos everywhere.");
- System.out.println("You also see a purple beam erupting from a castle. As you look at the prple light, a flashback occurs in your mind.");
- System.out.println("You remember that you were a a loyal knight for this kingdom that is now in ruins. You recently found out that someone from far away planned to overtake"
- + " the kingdom ");
- System.out.println("When you told the king that, he felt furiated and threw you into the dungeon.");
- System.out.println("Even though you felt backstabbed, you realize that you have a duty to fulfill and to protect the king at all costs. So you begin traveling to reach the castle.");
- }
- if (MageFirstFight == 3)
- {
- System.out.println("You kill all of the goblins without a scratch");
- System.out.println("You grab a key hanging from a goblin's neck and open the door");
- System.out.println("As you step outside, you see that everything is in shambles and chaos everywhere.");
- System.out.println("You also see a purple beam erupting from a castle. As you look at the prple light, a flashback occurs in your mind.");
- System.out.println("You remember that you were a a loyal knight for this kingdom that is now in ruins. You recently found out that someone from far away planned to overtake"
- + " the kingdom ");
- System.out.println("When you told the king that, he felt furiated and threw you into the dungeon.");
- System.out.println("Even though you felt backstabbed, you realize that you have a duty to fulfill and to protect the king at all costs. So you begin traveling to reach the castle.");
- }
- if (MageFirstFight == 4)
- {
- System.out.println("You kill all of the goblins without a scratch");
- System.out.println("You grab a key hanging from a goblin's neck and open the door");
- System.out.println("As you step outside, you see that everything is in shambles and chaos everywhere.");
- System.out.println("You also see a purple beam erupting from a castle. As you look at the prple light, a flashback occurs in your mind.");
- System.out.println("You remember that you were a a loyal knight for this kingdom that is now in ruins. You recently found out that someone from far away planned to overtake"
- + " the kingdom ");
- System.out.println("When you told the king that, he felt furiated and threw you into the dungeon.");
- System.out.println("Even though you felt backstabbed, you realize that you have a duty to fulfill and to protect the king at all costs. So you begin traveling to reach the castle.");
- }
- if (MageFirstFight == 5)
- {
- System.out.println("You kill all of the goblins without a scratch");
- System.out.println("You grab a key hanging from a goblin's neck and open the door");
- System.out.println("As you step outside, you see that everything is in shambles and chaos everywhere.");
- System.out.println("You also see a purple beam erupting from a castle. As you look at the prple light, a flashback occurs in your mind.");
- System.out.println("You remember that you were a a loyal knight for this kingdom that is now in ruins. You recently found out that someone from far away planned to overtake"
- + " the kingdom");
- System.out.println("When you told the king that, he felt furiated and threw you into the dungeon.");
- System.out.println("Even though you felt backstabbed, you realize that you have a duty to fulfill and to protect the king at all costs. So you begin traveling to reach the castle.");
- }
- if (MageFirstFight ==2)
- {
- System.out.println("You kill all of the goblins without a scratch");
- System.out.println("You grab a key hanging from a goblin's neck and open the door");
- System.out.println("As you step outside, you see that everything is in shambles and chaos everywhere.");
- System.out.println("You also see a purple beam erupting from a castle. As you look at the prple light, a flashback occurs in your mind.");
- System.out.println("You remember that you were a a loyal knight for this kingdom that is now in ruins. You recently found out that someone from far away planned to overtake"
- + " the kingdom with the help of the king's son");
- System.out.println("When you told the king that, he felt furiated and threw you into the dungeon.");
- System.out.println("Even though you felt backstabbed, you realize that you have a duty to fulfill and to protect the king at all costs. So you begin traveling to reach the castle.");
- }
- if (MageFirstFight ==6)
- {
- System.out.println("You kill all of the goblins without a scratch ");
- System.out.println("You grab a key hanging from a goblin's neck and open the door");
- System.out.println("As you step outside, you see that everything is in shambles and chaos everywhere.");
- System.out.println("You also see a purple beam erupting from a castle. As you look at the prple light, a flashback occurs in your mind.");
- System.out.println("You remember that you were a a loyal knight for this kingdom that is now in ruins. You recently found out that someone from far away planned to overtake"
- + " the kingdom with the help of the king's son");
- System.out.println("When you told the king that, he felt furiated and threw you into the dungeon.");
- System.out.println("Even though you felt backstabbed, you realize that you have a duty to fulfill and to protect the king at all costs. So you begin traveling to reach the castle.");
- }
- System.out.println("You see a big goblin with 2 axes.");
- System.out.println("The goblin charges at you. You are forced to fight.");
- }
- if (number ==3 && killorstealth == 1)
- {
- System.out.println("You cry out in pain and push the warrior aside. Your cry wakes everyone up.");
- System.out.println("You realize that you are forced to fight them in order to leave this room alive.");
- System.out.println("You pick up your daggers and start fighting.");
- int RougeFirstfight =Rougecombat.nextInt(6)*1;
- if (RougeFirstfight ==2)
- {
- System.out.println("You kill all of the goblins");
- System.out.println("You grab a key hanging from a goblin's neck and open the door");
- System.out.println("As you step outside, you see that everything is in shambles and chaos everywhere.");
- System.out.println("You also see a purple beam erupting from a castle. As you look at the prple light, a flashback occurs in your mind.");
- System.out.println("You remember that you were a a loyal knight for this kingdom that is now in ruins. You recently found out that someone from far away planned to overtake"
- + " the kingdom with the help of the king's son");
- System.out.println("When you told the king that, he felt furiated and threw you into the dungeon.");
- System.out.println("Even though you felt backstabbed, you realize that you have a duty to fulfill and to protect the king at all costs. So you begin traveling to reach the castle.");
- }
- if (RougeFirstfight ==6)
- {
- System.out.println("You kill all of the goblins");
- System.out.println("You grab a key hanging from a goblin's neck and open the door");
- System.out.println("As you step outside, you see that everything is in shambles and chaos everywhere.");
- System.out.println("You also see a purple beam erupting from a castle. As you look at the prple light, a flashback occurs in your mind.");
- System.out.println("You remember that you were a a loyal knight for this kingdom that is now in ruins. You recently found out that someone from far away planned to overtake"
- + " the kingdom with the help of the king's son");
- System.out.println("When you told the king that, he felt furiated and threw you into the dungeon.");
- System.out.println("Even though you felt backstabbed, you realize that you have a duty to fulfill and to protect the king at all costs. So you begin traveling to reach the castle.");
- }
- if (RougeFirstfight == 1)
- {
- System.out.println("You kill all of the goblins without a scratch");
- System.out.println("You grab a key hanging from a goblin's neck and open the door");
- System.out.println("As you step outside, you see that everything is in shambles and chaos everywhere.");
- System.out.println("You also see a purple beam erupting from a castle. As you look at the prple light, a flashback occurs in your mind.");
- System.out.println("You remember that you were a a loyal knight for this kingdom that is now in ruins. You recently found out that someone from far away planned to overtake"
- + " the kingdom with the help of the king's son");
- System.out.println("When you told the king that, he felt furiated and threw you into the dungeon.");
- System.out.println("Even though you felt backstabbed, you realize that you have a duty to fulfill and to protect the king at all costs. So you begin traveling to reach the castle.");
- }
- if (RougeFirstfight == 3)
- {
- System.out.println("You kill all of the goblins without a scratch");
- System.out.println("You grab a key hanging from a goblin's neck and open the door");
- System.out.println("As you step outside, you see that everything is in shambles and chaos everywhere.");
- System.out.println("You also see a purple beam erupting from a castle. As you look at the prple light, a flashback occurs in your mind.");
- System.out.println("You remember that you were a a loyal knight for this kingdom that is now in ruins. You recently found out that someone from far away planned to overtake"
- + " the kingdom");
- System.out.println("When you told the king that, he felt furiated and threw you into the dungeon.");
- System.out.println("Even though you felt backstabbed, you realize that you have a duty to fulfill and to protect the king at all costs. So you begin traveling to reach the castle.");
- }
- if (RougeFirstfight == 4)
- {
- System.out.println("You kill all of the goblins without a scratch");
- System.out.println("You grab a key hanging from a goblin's neck and open the door");
- System.out.println("As you step outside, you see that everything is in shambles and chaos everywhere.");
- System.out.println("You also see a purple beam erupting from a castle. As you look at the prple light, a flashback occurs in your mind.");
- System.out.println("You remember that you were a a loyal knight for this kingdom that is now in ruins. You recently found out that someone from far away planned to overtake"
- + " the kingdom");
- System.out.println("When you told the king that, he felt furiated and threw you into the dungeon.");
- System.out.println("Even though you felt backstabbed, you realize that you have a duty to fulfill and to protect the king at all costs. So you begin traveling to reach the castle.");
- }
- if (RougeFirstfight == 5)
- {
- System.out.println("You kill all of the goblins without a scratch");
- System.out.println("You grab a key hanging from a goblin's neck and open the door");
- System.out.println("As you step outside, you see that everything is in shambles and chaos everywhere.");
- System.out.println("You also see a purple beam erupting from a castle. As you look at the prple light, a flashback occurs in your mind.");
- System.out.println("You remember that you were a a loyal knight for this kingdom that is now in ruins. You recently found out that someone from far away planned to overtake"
- + " the kingdom");
- System.out.println("When you told the king that, he felt furiated and threw you into the dungeon.");
- System.out.println("Even though you felt backstabbed, you realize that you have a duty to fulfill and to protect the king at all costs. So you begin traveling to reach the castle.");
- }
- System.out.println("You see a big goblin with 2 axes.");
- System.out.println("The goblin charges at you. You are forced to fight.");
- }
- if (number ==4 && killorstealth ==1)
- {
- System.out.println("You cry out in pain and push the warrior aside. Your cry wakes everyone up.");
- System.out.println("You realize that you are forced to fight them in order to leave this room alive.");
- System.out.println("You pick up your bow and start fighting.");
- int BowmanFirstFight = Bowmencombat.nextInt(6) * 1;
- if (BowmanFirstFight== 1)
- {
- System.out.println("You kill all of the goblins without a scratch");
- System.out.println("You grab a key hanging from a goblin's neck and open the door");
- System.out.println("As you step outside, you see that everything is in shambles and chaos everywhere.");
- System.out.println("You also see a purple beam erupting from a castle. As you look at the prple light, a flashback occurs in your mind.");
- System.out.println("You remember that you were a a loyal knight for this kingdom that is now in ruins. You recently found out that someone from far away planned to overtake"
- + " the kingdom");
- System.out.println("When you told the king that, he felt furiated and threw you into the dungeon.");
- System.out.println("Even though you felt backstabbed, you realize that you have a duty to fulfill and to protect the king at all costs. So you begin traveling to reach the castle.");
- }
- if (BowmanFirstFight == 3)
- {
- System.out.println("You kill all of the goblins without a scratch");
- System.out.println("You grab a key hanging from a goblin's neck and open the door");
- System.out.println("As you step outside, you see that everything is in shambles and chaos everywhere.");
- System.out.println("You also see a purple beam erupting from a castle. As you look at the prple light, a flashback occurs in your mind.");
- System.out.println("You remember that you were a a loyal knight for this kingdom that is now in ruins. You recently found out that someone from far away planned to overtake"
- + " the kingdom");
- System.out.println("When you told the king that, he felt furiated and threw you into the dungeon.");
- System.out.println("Even though you felt backstabbed, you realize that you have a duty to fulfill and to protect the king at all costs. So you begin traveling to reach the castle.");
- }
- if (BowmanFirstFight == 4)
- {
- System.out.println("You kill all of the goblins");
- System.out.println("You grab a key hanging from a goblin's neck and open the door");
- System.out.println("As you step outside, you see that everything is in shambles and chaos everywhere.");
- System.out.println("You also see a purple beam erupting from a castle. As you look at the prple light, a flashback occurs in your mind.");
- System.out.println("You remember that you were a a loyal knight for this kingdom that is now in ruins. You recently found out that someone from far away planned to overtake"
- + " the kingdom");
- System.out.println("When you told the king that, he felt furiated and threw you into the dungeon.");
- System.out.println("Even though you felt backstabbed, you realize that you have a duty to fulfill and to protect the king at all costs. So you begin traveling to reach the castle.");
- }
- if (BowmanFirstFight == 5)
- {
- System.out.println("You kill all of the goblins");
- System.out.println("You grab a key hanging from a goblin's neck and open the door");
- System.out.println("As you step outside, you see that everything is in shambles and chaos everywhere.");
- System.out.println("You also see a purple beam erupting from a castle. As you look at the prple light, a flashback occurs in your mind.");
- System.out.println("You remember that you were a a loyal knight for this kingdom that is now in ruins. You recently found out that someone from far away planned to overtake"
- + " the kingdom");
- System.out.println("When you told the king that, he felt furiated and threw you into the dungeon.");
- System.out.println("Even though you felt backstabbed, you realize that you have a duty to fulfill and to protect the king at all costs. So you begin traveling to reach the castle.");
- }
- if (BowmanFirstFight ==2)
- {
- System.out.println("You kill all of the goblins");
- System.out.println("You grab a key hanging from a goblin's neck and open the door");
- System.out.println("As you step outside, you see that everything is in shambles and chaos everywhere.");
- System.out.println("You also see a purple beam erupting from a castle. As you look at the prple light, a flashback occurs in your mind.");
- System.out.println("You remember that you were a a loyal knight for this kingdom that is now in ruins. You recently found out that someone from far away planned to overtake"
- + " the kingdom");
- System.out.println("When you told the king that, he felt furiated and threw you into the dungeon.");
- System.out.println("Even though you felt backstabbed, you realize that you have a duty to fulfill and to protect the king at all costs. So you begin traveling to reach the castle.");
- }
- if (BowmanFirstFight ==6)
- {
- System.out.println("You kill all of the goblins");
- System.out.println("You grab a key hanging from a goblin's neck and open the door");
- System.out.println("As you step outside, you see that everything is in shambles and chaos everywhere.");
- System.out.println("You also see a purple beam erupting from a castle. As you look at the prple light, a flashback occurs in your mind.");
- System.out.println("You remember that you were a a loyal knight for this kingdom that is now in ruins. You recently found out that someone from far away planned to overtake"
- + " the kingdom");
- System.out.println("When you told the king that, he felt furiated and threw you into the dungeon.");
- System.out.println("Even though you felt backstabbed, you realize that you have a duty to fulfill and to protect the king at all costs. So you begin traveling to reach the castle.");
- }
- System.out.println("You see a big goblin with 2 axes.");
- System.out.println("The goblin charges at you. You are forced to fight.");
- }
- }
- }
- health =100;
- int goblinhealth=700;
- while (goblinhealth >0 && goblinhealth <=700)
- {
- if (number==1)
- {
- int WarriorSecondFight = Warriorcombat.nextInt (6)*1;
- health = 100;
- if (WarriorSecondFight == 1 || WarriorSecondFight == 3 || WarriorSecondFight ==5)
- { System.out.println("You damage the big goblin for 100 health");
- System.out.println("Goblins remaiing health: "+goblinhealth);
- goblinhealth -=100;
- if (goblinhealth==0)
- { System.out.println("You just beat the game. GJ.");
- System.exit(0);
- }
- }
- if (WarriorSecondFight == 2 || WarriorSecondFight == 4 || WarriorSecondFight ==6)
- { System.out.println("The goblin evades your attacks and damages you.");
- health-= 10;
- System.out.println("Your remaining health: "+health);
- if (health ==0)
- { System.out.println("You died.");
- System.exit(0);
- }
- }
- }
- if (number ==2)
- {
- int MageSecondFight = Magecombat.nextInt (4)*1;
- health = 90;
- if (MageSecondFight == 1 || MageSecondFight == 3 || MageSecondFight ==4)
- { System.out.println("You damage the big goblin for 20 health");
- goblinhealth -=20;
- System.out.println("Goblins remaiing health: "+goblinhealth);
- if (goblinhealth ==0 )
- {
- System.out.println("Congrats you won.");
- System.exit(0);
- }
- }
- if (MageSecondFight == 2)
- { System.out.println("The goblin evades your attacks and damages you.");
- health-= 10;
- System.out.println("Your remaining health: "+health);
- if (health ==0)
- { System.out.println("You died.");
- System.exit(0);
- }
- }
- }
- if (number ==3)
- {
- int RougeSecondFight = Rougecombat.nextInt (6)*1;
- health = 80;
- if (RougeSecondFight == 1 || RougeSecondFight == 3 || RougeSecondFight ==4 || RougeSecondFight ==5)
- { System.out.println("You damage the big goblin for 25 health");
- goblinhealth -=25;
- System.out.println("Goblins remaiing health: "+goblinhealth);
- if (goblinhealth ==0 )
- {
- System.out.println("Congrats you won.");
- System.exit(0);
- }
- }
- if (RougeSecondFight == 2 || RougeSecondFight == 6)
- { System.out.println("The goblin evades your attacks and damages you.");
- health-= 10;
- System.out.println("Your remaining health: "+health);
- if (health ==0)
- { System.out.println("You died.");
- System.exit(0);
- }
- }
- }
- if (number ==4)
- {
- int BowmenSecondFight = Bowmencombat.nextInt (5)*1;
- health = 60;
- if (BowmenSecondFight == 1 || BowmenSecondFight == 3 || BowmenSecondFight ==4)
- { System.out.println("You damage the big goblin for 50 health");
- goblinhealth -=50;
- System.out.println("Goblins remaiing health: "+goblinhealth);
- if (goblinhealth ==0 )
- {
- System.out.println("Congrats you won.");
- System.exit(0);
- }
- }
- if ( BowmenSecondFight== 2 || BowmenSecondFight==5)
- { System.out.println("The goblin evades your attacks and damages you.");
- health-= 10;
- System.out.println("Your remaining health: "+health);
- if (health ==0)
- { System.out.println("You died.");
- System.exit(0);
- }
- }
- }
- }
- if (stair ==2)
- {
- System.out.println("You went up the stairs");
- System.out.println("As you go up the stairs, you see that everything is in shambles and chaos everywhere.");
- System.out.println("You also see a purple beam erupting from a castle. As you look at the prple light, a flashback occurs in your mind.");
- System.out.println("You remember that you were a a loyal solider for this kingdom that is now in ruins. You recently found out that someone from far away planned to overtake"
- + " the kingdom with the help of the king's son");
- System.out.println("When you told the king that, he felt furiated and threw you into the dungeon.");
- System.out.println("Even though you felt backstabbed, you realize that you have a duty to fulfill and to protect the king at all costs. So you begin traveling to reach the castle.");
- System.out.println("At the corner of your eye, you see a tiny music box that only looks like it can be played once. You take it and store it in your pockets");
- System.out.println("You jump down and start to head to the purple beam.");
- System.out.println ("You start to walk for an hour. You are really close to reaching the castle and the purple beam. Suddenly, you are stopped by a large goblin holding 2 axes.");
- System.out.println("He notices you, so there is no way out and starts charging at you");
- System.out.println("You remember that old music box you found. Do you want to use it?. ");
- System.out.println("1. Yes.");
- System.out.println("2. No.");
- int answer=scan.nextInt();
- if (answer==1)
- {
- System.out.println("The goblin shrieks in pain. You damage it for 200 health. Total goblin health: 300");
- goblinhealth =300;
- System.out.println("The goblin wakes up from the pain and starts to furiously attacking you.");
- System.out.println("You engage combat with the big goblin.");
- while (goblinhealth >0 && goblinhealth<=300)
- {
- if (number ==1)
- {
- int WarriorSecondFight = Warriorcombat.nextInt (6)*1;
- health = 100;
- if (WarriorSecondFight == 1 || WarriorSecondFight == 3 || WarriorSecondFight ==5)
- { System.out.println("You damage the big goblin for 100 health");
- goblinhealth -=100;
- System.out.println("Goblins remaiing health: "+goblinhealth);
- if (goblinhealth ==0 )
- {
- System.out.println("Congrats you won.");
- System.exit(0);
- }
- }
- if (WarriorSecondFight == 2 || WarriorSecondFight == 4 || WarriorSecondFight ==6)
- { System.out.println("The goblin evades your attacks and damages you.");
- health-= 10;
- System.out.println("Your remaining health: "+health);
- if (health ==0)
- { System.out.println("You died.");
- System.exit(0);
- }
- }
- }
- if (number ==2)
- {
- int MageSecondFight = Magecombat.nextInt (4)*1;
- health = 90;
- if (MageSecondFight == 1 || MageSecondFight == 3 || MageSecondFight ==4)
- { System.out.println("You damage the big goblin for 20 health");
- goblinhealth -=20;
- System.out.println("Goblins remaiing health: "+goblinhealth);
- if (goblinhealth ==0 )
- {
- System.out.println("Congrats you won.");
- System.exit(0);
- }
- }
- if (MageSecondFight == 2)
- { System.out.println("The goblin evades your attacks and damages you.");
- health-= 10;
- System.out.println("Your remaining health: "+health);
- if (health ==0)
- { System.out.println("You died.");
- System.exit(0);
- }
- }
- }
- if (number ==3)
- {
- int RougeSecondFight = Rougecombat.nextInt (6)*1;
- health = 80;
- if (RougeSecondFight == 1 || RougeSecondFight == 3 || RougeSecondFight ==4 || RougeSecondFight==5)
- { System.out.println("You damage the big goblin for 25 health");
- goblinhealth -=25;
- System.out.println("Goblins remaiing health: "+goblinhealth);
- if (goblinhealth ==0 )
- {
- System.out.println("Congrats you won.");
- System.exit(0);
- }
- }
- if (RougeSecondFight == 2 || RougeSecondFight ==6)
- { System.out.println("The goblin evades your attacks and damages you.");
- health-= 10;
- System.out.println("Your remaining health: "+health);
- if (health ==0)
- { System.out.println("You died.");
- System.exit(0);
- }
- }
- }
- if (number ==4)
- {
- int BowmenSecondFight = Bowmencombat.nextInt (5)*1;
- health = 60;
- if (BowmenSecondFight == 1 || BowmenSecondFight == 3 || BowmenSecondFight ==4)
- { System.out.println("You damage the big goblin for 50 health");
- goblinhealth -=50;
- System.out.println("Goblins remaiing health: "+goblinhealth);
- if (goblinhealth ==0 )
- {
- System.out.println("Congrats you won.");
- System.exit(0);
- }
- }
- if (BowmenSecondFight == 2 || BowmenSecondFight == 5)
- { System.out.println("The goblin evades your attacks and damages you.");
- health-= 10;
- System.out.println("Your remaining health: "+health);
- if (health ==0)
- { System.out.println("You died.");
- System.exit(0);
- }
- }
- }
- }
- }
- if (answer ==2)
- {
- System.out.println("The goblin charges at you.");
- goblinhealth=500;
- while (goblinhealth >0 && goblinhealth <=500)
- {
- int WarriorSecondFight = Warriorcombat.nextInt (6)*1;
- if (number==1)
- if (WarriorSecondFight == 1 || WarriorSecondFight == 3 || WarriorSecondFight ==5)
- { System.out.println("You damage the big goblin for 100 health");
- System.out.println("Goblins remaiing health: "+goblinhealth);
- goblinhealth -=100;
- }
- if (WarriorSecondFight == 2 || WarriorSecondFight == 4 || WarriorSecondFight ==6)
- { System.out.println("The goblin evades your attacks and damages you.");
- health-= 10;
- System.out.println("Your remaining health: "+health);
- if (health ==0)
- { System.out.println("You died.");
- System.exit(0);
- }
- }
- if (number ==2)
- {
- int MageSecondFight = Magecombat.nextInt (4)*1;
- health = 90;
- if (MageSecondFight == 1 || MageSecondFight == 3 || MageSecondFight ==4)
- { System.out.println("You damage the big goblin for 20 health");
- goblinhealth -=20;
- System.out.println("Goblins remaiing health: "+goblinhealth);
- if (goblinhealth ==0 )
- {
- System.out.println("Congrats you won.");
- System.exit(0);
- }
- }
- if (MageSecondFight == 2)
- { System.out.println("The goblin evades your attacks and damages you.");
- health-= 10;
- System.out.println("Your remaining health: "+health);
- if (health ==0)
- { System.out.println("You died.");
- System.exit(0);
- }
- }
- }
- if (number ==3)
- {
- int RougeSecondFight = Rougecombat.nextInt (6)*1;
- health = 80;
- if (RougeSecondFight == 1 || RougeSecondFight == 3 || RougeSecondFight ==4 || RougeSecondFight ==5)
- { System.out.println("You damage the big goblin for 25 health");
- goblinhealth -=25;
- System.out.println("Goblins remaiing health: "+goblinhealth);
- if (goblinhealth ==0 )
- {
- System.out.println("Congrats you won.");
- System.exit(0);
- }
- }
- if (RougeSecondFight == 2 || RougeSecondFight == 6)
- { System.out.println("The goblin evades your attacks and damages you.");
- health-= 10;
- System.out.println("Your remaining health: "+health);
- if (health ==0)
- { System.out.println("You died.");
- System.exit(0);
- }
- }
- }
- if (number ==4)
- {
- int BowmenSecondFight = Bowmencombat.nextInt (5)*1;
- health = 60;
- if (BowmenSecondFight == 1 || BowmenSecondFight == 3 || BowmenSecondFight ==4)
- { System.out.println("You damage the big goblin for 50 health");
- goblinhealth -=50;
- System.out.println("Goblins remaiing health: "+goblinhealth);
- if (goblinhealth ==0 )
- {
- System.out.println("Congrats you won.");
- System.exit(0);
- }
- }
- if ( BowmenSecondFight== 2 || BowmenSecondFight==5)
- { System.out.println("The goblin evades your attacks and damages you.");
- health-= 10;
- System.out.println("Your remaining health: "+health);
- if (health ==0)
- { System.out.println("You died.");
- System.exit(0);
- }
- }
- }
- }
- if (goblinhealth ==0)
- {
- System.out.println("Congrats you just beat the Goblin. You beat the game.");
- System.exit(0);
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement