Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- import java.util.Random;
- public class Game {
- static Scanner i = new Scanner(System.in);
- static Random r = new Random();
- static String name, option;
- static String items[] = {"[P]otion", "[D]agger", "[T]orch\t", "[S]hield"};
- static String items2[] = {"[Hi]gh Potion", "+[HP] Potion", "+[ST]R Potion"};
- static String mons[] = {"\nA wolf attacks you!\n", "\nA bear attacks you!\n", "\nAn orc attacks you!\n", "\nA spider attacks you!\n", "\nA snake attacks you!\n",
- "\nA troll attacks you!\n", "\nA unicorn attacks you!\n", "\nA tree monster attacks you!\n", "\nA phoenix attacks you!\n", "\nA white shark attacks you!\n",
- "\nA baby dragon attacks you!\n", "\nThe dragon attacks you!\n"};
- public static int hp, hpMax, lvl, exp, totalExp, nextLvl, gold, goldDrop, potionCount, medPotionCount, highPotionCount, hpPotionCount, strPotionCount,
- q_bearClawCount, monsterDrop, chest, pool, chestLoot, str, dmg, m_dmg, m_hp, poison, poisondmg, heal, healAmount, healSelf, healSelfAmount, fireBreath, tailWhip;
- static int price[] = {25, 50, 100, 125};
- static int price2[] = {75, 350, 700};
- static boolean area, quest, fight, potion, medPotion, highPotion, dagger, torch, daggerEquipped, torchEquipped, shield, shieldEquipped, q_bearClaw, questComplete,
- crystalHelm, crystalGloves, crystalBoots, crystalHelmEquipped, crystalGlovesEquipped, crystalBootsEquipped, poisonRing, poisonRingEquipped,
- rockHammer, rockHammerEquipped, hpPotion, strPotion, holyAmulet, holyAmuletEquipped, leafShield, leafShieldEquipped, phoenixPet, phoenixPetEquipped,
- dragonWings, dragonWingsEquipped, dragonPants, dragonBody, dragonPantsEquipped, dragonBodyEquipped, flying;
- public static void main(String[] args) throws InterruptedException {
- hp = 10;
- hpMax = 10;
- lvl = 1;
- exp = 0;
- totalExp = 0;
- nextLvl = 35;
- gold = 0;
- potionCount = 0;
- medPotionCount = 0;
- q_bearClawCount = 0;
- str = 5;
- area = true;
- fight = true;
- System.out.println("###########################################################");
- System.out.println("# #");
- System.out.println("# $$$$ $$$$$ $$ $$$$$ $$$ $$ $ #");
- System.out.println("# $ $ $ $ $ $ $ $ $ $ $ $ #");
- System.out.println("# $ $ $ $$$ $$$$$$ $ $$$ $ $ $ $ $ #");
- System.out.println("# $$$$ $ $ $ $ $$$$$$ $$$ $ $$ #");
- System.out.println("# #");
- System.out.println("# $$ $$ $$ $$$ $$$$$ $$ $$$$ #");
- System.out.println("# $ $$ $ $ $ $ $ $$ $ $ #");
- System.out.println("# $ $ $ $ $ $ $ $$$ $$ $ $ #");
- System.out.println("# $$ $$ $$$ $ $ $$$$$ $$$$ #");
- System.out.println("# #");
- System.out.println("###########################################################");
- Thread.sleep(2000);
- System.out.println("\n\n[P]lay\n[Q]uit");
- option = i.nextLine().toLowerCase();
- while(area == true){
- if(option.equals("p")){
- System.out.print("\nName: ");
- name = i.nextLine();
- System.out.println("\nAfter witnessing your whole family slaughtered by the dragon...");
- Thread.sleep(3000);
- System.out.println("\nYou, known as " + name + ", swore to take revenge.");
- Thread.sleep(3000);
- System.out.println("\nYour quest to kill the dragon begins now.");
- Thread.sleep(3000);
- home();
- }else if(option.equals("q")){
- area = false;
- }else{
- option = i.nextLine().toLowerCase();
- }
- }
- }
- public static void home() throws InterruptedException{
- System.out.println("\nYou are in your home.");
- System.out.println("Options: [E]xit, [R]est, [I]nventory, [S]tats");
- option = i.nextLine().toLowerCase();
- while(area == true){
- if(option.equals("e")){
- town();
- }else if(option.equals("r")){
- if(hp < 5){
- hp = hpMax;
- System.out.println("\nYou rested well!");
- option = i.nextLine().toLowerCase();
- }else{
- System.out.println("\nYou don't feel like resting.");
- option = i.nextLine().toLowerCase();
- }
- }else if(option.equals("i")){
- System.out.println("\nInventory\n\nItems\t\t\t\tDescription\n");
- if(potion == false && dagger == false && torch == false && shield == false && crystalHelm == false && crystalGloves == false &&
- crystalBoots == false && poisonRing == false && medPotion == false && highPotion == false && hpPotion == false && strPotion == false
- && holyAmulet == false && leafShield == false && phoenixPet == false && dragonWings == false && dragonPants == false
- && dragonBody == false && gold == 0){
- System.out.println("Empty");
- option = i.nextLine().toLowerCase();
- }else{
- if(gold >= 10){
- System.out.println("Gold x" + gold + "\t\t\tGold is always welcome.");
- }else if(gold < 10){
- System.out.println("Gold x" + gold + "\t\t\t\tGold is always welcome.");
- }
- if(potion == true){
- System.out.println(items[0] + " x" + potionCount + "\t\t\tHeals 5 HP");
- }
- if(medPotion == true){
- System.out.println("[M]edium Potion x" + medPotionCount + "\t\tHeals 15 HP");
- }
- if(highPotion == true){
- System.out.println(items2[0] + " x" + highPotionCount + "\t\tHeals 30 HP");
- }
- if(hpPotion == true){
- System.out.println(items2[1] + " x" + hpPotionCount + "\t\t\t+10 HP");
- }
- if(strPotion == true){
- System.out.println(items2[2] + " x" + strPotionCount + "\t\t+10 STR");
- }
- if(dagger == true){
- if(daggerEquipped == true){
- System.out.println(items[1] + " [Equipped]\t\t+3 STR");
- }else{
- System.out.println(items[1] + "\t\t\t+3 STR");
- }
- }
- if(torch == true){
- if(torchEquipped == true){
- System.out.println(items[2] + " [Equipped]\t\tLights up dark areas.");
- }else{
- System.out.println(items[2] + "\t\t\tLights up dark areas.");
- }
- }
- if(shield == true){
- if(shieldEquipped == true){
- System.out.println(items[3] + " [Equipped]\t\t+10 HP");
- }else{
- System.out.println(items[3] + "\t\t\t+10 HP");
- }
- }
- if(crystalHelm == true){
- if(crystalHelmEquipped == true){
- System.out.println("Crystal [h]elm [Equipped]\t+25 HP");
- }else{
- System.out.println("Crystal [h]elm\t\t\t+25 HP");
- }
- }
- if(crystalGloves == true){
- if(crystalGlovesEquipped == true){
- System.out.println("Crystal [g]loves [Equipped]\t+15 HP");
- }else{
- System.out.println("Crystal [g]loves\t\t+15 HP");
- }
- }
- if(crystalBoots == true){
- if(crystalBootsEquipped == true){
- System.out.println("Crystal [b]oots [Equipped]\t+20 HP");
- }else{
- System.out.println("Crystal [b]oots\t\t\t+20 HP");
- }
- }
- if(poisonRing == true){
- if(poisonRingEquipped == true){
- System.out.println("Poison [ri]ng [Equipped]\t+5 HP, +5 STR");
- }else{
- System.out.println("Poison [ri]ng \t\t\t+5 HP, +5 STR");
- }
- }
- if(rockHammer == true){
- if(rockHammerEquipped == true){
- System.out.println("[R]ock hammer [Equipped]\t+10 STR");
- }else{
- System.out.println("[R]ock hammer\t\t\t+10 STR");
- }
- }
- if(holyAmulet == true){
- if(holyAmuletEquipped == true){
- System.out.println("Holy [a]mulet [Equipped]\t+15 HP, +7 STR");
- }else{
- System.out.println("Holy [a]mulet\t\t\t+15 HP, +7 STR");
- }
- }
- if(leafShield == true){
- if(leafShieldEquipped == true){
- System.out.println("Lea[f] Shield [Equipped]\t+30 HP, +5 STR");
- }else{
- System.out.println("Lea[f] Shield\t\t\t+30 HP, +5 STR");
- }
- }
- if(phoenixPet == true){
- if(phoenixPetEquipped == true){
- System.out.println("Phoeni[x] Pet [Equipped]\tHeals you in combat.");
- }else{
- System.out.println("Phoeni[x] Pet\t\t\tHeals you in combat.");
- }
- }
- if(dragonWings == true){
- if(dragonWingsEquipped == true){
- System.out.println("Dragon [w]ings [Equipped]\t+25 HP, +10 STR, FLY");
- }else{
- System.out.println("Dragon [w]ings\t\t\t+25 HP, +10 STR, FLY");
- }
- }
- if(dragonPants == true){
- if(dragonPantsEquipped == true){
- System.out.println("Dragon [pa]nts [Equipped]\t+35 HP, +15 STR");
- }else{
- System.out.println("Dragon [pa]nts\t\t\t+35 HP, +15 STR");
- }
- }
- if(dragonBody == true){
- if(dragonBodyEquipped == true){
- System.out.println("Dragon [bo]dy [Equipped]\t+50 HP, +25 STR");
- }else{
- System.out.println("Dragon [bo]dy\t\t\t+50 HP, +25 STR");
- }
- }
- System.out.println("[E]xit");
- option = i.nextLine().toLowerCase();
- while(area == true){
- if(option.equals("p") && potion == true){
- if(hp == hpMax){
- System.out.println("\nYou don't need to drink this right now.");
- }else{
- System.out.println("\nYou drink the Potion... some HP was restored!");
- hp += 5;
- potionCount -= 1;
- if(hp > hpMax){
- hp = hpMax;
- }
- if(potionCount == 0){
- potion = false;
- }
- home();
- }
- option = i.nextLine().toLowerCase();
- }else if(option.equals("m") && medPotion == true){
- if(hp == hpMax){
- System.out.println("\nYou don't need to drink this right now.");
- }else{
- System.out.println("\nYou drink the Medium Potion... some HP was restored!");
- hp += 15;
- medPotionCount -= 1;
- if(hp > hpMax){
- hp = hpMax;
- }
- if(medPotionCount == 0){
- medPotion = false;
- }
- home();
- }
- option = i.nextLine().toLowerCase();
- }else if(option.equals("hi") && highPotion == true){
- if(hp == hpMax){
- System.out.println("\nYou don't need to drink this right now.");
- }else{
- System.out.println("\nYou drink the High Potion... some HP was restored!");
- hp += 30;
- highPotionCount -= 1;
- if(hp > hpMax){
- hp = hpMax;
- }
- if(highPotionCount == 0){
- highPotion = false;
- }
- home();
- }
- option = i.nextLine().toLowerCase();
- }else if(option.equals("hp") && hpPotion == true){
- System.out.println("\nYou drink the +HP Potion... HP increased!");
- hp += 10;
- hpMax += 10;
- hpPotionCount -= 1;
- if(hpPotionCount == 0){
- hpPotion = false;
- }
- home();
- }else if(option.equals("st") && strPotion == true){
- System.out.println("\nYou drink the +STR Potion... STR increased!");
- str += 10;
- strPotionCount -= 1;
- if(strPotionCount == 0){
- strPotion = false;
- }
- home();
- }else if(option.equals("d") && dagger == true){
- if(rockHammerEquipped == true){
- System.out.println("\nPlease unequip the other weapon first!");
- option = i.nextLine().toLowerCase();
- }else if(daggerEquipped == false){
- System.out.println("\nYou equip the dagger.");
- daggerEquipped = true;
- str += 3;
- home();
- }else if(daggerEquipped == true){
- System.out.println("\nYou unequip the dagger.");
- daggerEquipped = false;
- str -= 3;
- home();
- }
- }else if(option.equals("t") && torch == true){
- if(torchEquipped == false){
- System.out.println("\nYou equip the torch.");
- torchEquipped = true;
- home();
- }else if(torchEquipped == true){
- System.out.println("\nYou unequip the torch.");
- torchEquipped = false;
- home();
- }
- }else if(option.equals("s") && shield == true){
- if(leafShieldEquipped == true){
- System.out.println("\nPlease unequip the other shield first!");
- option = i.nextLine().toLowerCase();
- }else if(shieldEquipped == false){
- System.out.println("\nYou equip the shield.");
- shieldEquipped = true;
- hp += 10;
- hpMax += 10;
- home();
- }else if(shieldEquipped == true){
- System.out.println("\nYou unequip the shield.");
- shieldEquipped = false;
- hp -= 10;
- hpMax -= 10;
- home();
- }
- }else if(option.equals("h") && crystalHelm == true){
- if(crystalHelmEquipped == false){
- System.out.println("\nYou equip the crystal helm.");
- crystalHelmEquipped = true;
- hp += 25;
- hpMax += 25;
- home();
- }else if(crystalHelmEquipped == true){
- System.out.println("\nYou unequip the crystal helm.");
- crystalHelmEquipped = false;
- hp -= 25;
- hpMax -= 25;
- home();
- }
- }else if(option.equals("g") && crystalGloves == true){
- if(crystalGlovesEquipped == false){
- System.out.println("\nYou equip the crystal gloves.");
- crystalGlovesEquipped = true;
- hp += 15;
- hpMax += 15;
- home();
- }else if(crystalGlovesEquipped == true){
- System.out.println("\nYou unequip the crystal gloves.");
- crystalGlovesEquipped = false;
- hp -= 15;
- hpMax -= 15;
- home();
- }
- }else if(option.equals("b") && crystalBoots == true){
- if(crystalBootsEquipped == false){
- System.out.println("\nYou equip the crystal boots.");
- crystalBootsEquipped = true;
- hp += 20;
- hpMax += 20;
- home();
- }else if(crystalBootsEquipped == true){
- System.out.println("\nYou unequip the crystal boots.");
- crystalBootsEquipped = false;
- hp -= 20;
- hpMax -= 20;
- home();
- }
- }else if(option.equals("ri") && poisonRing == true){
- if(poisonRingEquipped == false){
- System.out.println("\nYou equip the poison ring.");
- poisonRingEquipped = true;
- hp += 5;
- hpMax += 5;
- str += 5;
- home();
- }else if(poisonRingEquipped == true){
- System.out.println("\nYou unequip the poison ring.");
- poisonRingEquipped = false;
- hp -= 5;
- hpMax -= 5;
- str -= 5;
- home();
- }
- }else if(option.equals("r") && rockHammer == true){
- if(daggerEquipped == true){
- System.out.println("\nPlease unequip the other weapon first!");
- option = i.nextLine().toLowerCase();
- }else if(rockHammerEquipped == false){
- System.out.println("\nYou equip the rock hammer.");
- rockHammerEquipped = true;
- str += 10;
- home();
- }else if(rockHammerEquipped == true){
- System.out.println("\nYou unequip the rock hammer.");
- rockHammerEquipped = false;
- str -= 10;
- home();
- }
- }else if(option.equals("a") && holyAmulet == true){
- if(holyAmuletEquipped == false){
- System.out.println("\nYou equip the holy amulet.");
- holyAmuletEquipped = true;
- hp += 15;
- hpMax += 15;
- str += 7;
- home();
- }else if(holyAmuletEquipped == true){
- System.out.println("\nYou unequip the holy amulet.");
- holyAmuletEquipped = false;
- hp -= 15;
- hpMax -= 15;
- str -= 7;
- home();
- }
- }else if(option.equals("f") && leafShield == true){
- if(shieldEquipped == true){
- System.out.println("\nPlease unequip the other shield first!");
- option = i.nextLine().toLowerCase();
- }else if(leafShieldEquipped == false){
- System.out.println("\nYou equip the leaf shield.");
- leafShieldEquipped = true;
- hp += 30;
- hpMax += 30;
- str += 5;
- home();
- }else if(leafShieldEquipped == true){
- System.out.println("\nYou unequip the leaf shield.");
- leafShieldEquipped = false;
- hp -= 30;
- hpMax -= 30;
- str -= 5;
- home();
- }
- }else if(option.equals("x") && phoenixPet == true){
- if(phoenixPetEquipped == false){
- System.out.println("\nYou equip the phoenix pet.");
- phoenixPetEquipped = true;
- home();
- }else if(phoenixPetEquipped == true){
- System.out.println("\nYou unequip the phoenix pet.");
- phoenixPetEquipped = false;
- home();
- }
- }else if(option.equals("w") && dragonWings == true){
- if(dragonWingsEquipped == false){
- System.out.println("\nYou equip the dragon wings.");
- dragonWingsEquipped = true;
- hp += 25;
- hpMax += 25;
- str += 10;
- home();
- }else if(dragonWingsEquipped == true){
- System.out.println("\nYou unequip the dragon wings.");
- dragonWingsEquipped = false;
- hp -= 25;
- hpMax -= 25;
- str -= 10;
- home();
- }
- }else if(option.equals("pa") && dragonPants == true){
- if(dragonPantsEquipped == false){
- System.out.println("\nYou equip the dragon pants.");
- dragonPantsEquipped = true;
- hp += 35;
- hpMax += 35;
- str += 15;
- home();
- }else if(dragonPantsEquipped == true){
- System.out.println("\nYou unequip the dragon pants.");
- dragonPantsEquipped = false;
- hp -= 35;
- hpMax -= 35;
- str -= 15;
- home();
- }
- }else if(option.equals("bo") && dragonBody == true){
- if(dragonBodyEquipped == false){
- System.out.println("\nYou equip the dragon body.");
- dragonBodyEquipped = true;
- hp += 50;
- hpMax += 50;
- str += 25;
- home();
- }else if(dragonBodyEquipped == true){
- System.out.println("\nYou unequip the dragon body.");
- dragonBodyEquipped = false;
- hp -= 50;
- hpMax -= 50;
- str -= 25;
- home();
- }
- }else if(option.equals("e")){
- home();
- }else{
- option = i.nextLine().toLowerCase();
- }
- }
- }
- }else if(option.equals("s")){
- System.out.println("\nStats\n");
- System.out.println("Name: " + name);
- System.out.println("LVL: " + lvl);
- System.out.println("HP: " + hp + "/" + hpMax);
- System.out.println("STR: " + str);
- System.out.println("Next LVL in: " + nextLvl + " exp");
- System.out.println("Total exp: " + totalExp);
- option = i.nextLine().toLowerCase();
- }else{
- option = i.nextLine().toLowerCase();
- }
- }
- }
- public static void town() throws InterruptedException{
- System.out.println("\nYou are in the town.");
- System.out.println("Options: [H]ome, [S]hop, [F]orest");
- option = i.nextLine().toLowerCase();
- while(area == true){
- if(option.equals("h")){
- home();
- }else if(option.equals("s")){
- shop();
- }else if(option.equals("f")){
- forest();
- }else{
- option = i.nextLine().toLowerCase();
- }
- }
- }
- public static void shop() throws InterruptedException{
- System.out.println("\nYou are in the shop.");
- System.out.println("Options: [B]uy, [E]xit");
- option = i.nextLine().toLowerCase();
- while(area == true){
- if(option.equals("b")){
- System.out.println("\nShop keeper: Hello, how can I help you?\nYou have " + gold + " gold.");
- System.out.println("\nItems\t\tPrice");
- for(int x = 0; x < items.length && x < price.length; x++){
- System.out.println(items[x] + "\t" + price[x]);
- }
- System.out.println("[E]xit");
- option = i.nextLine().toLowerCase();
- while(area == true){
- if(option.equals("p")){
- if(gold >= 25){
- gold -= 25;
- System.out.println("\nYou buy a potion.");
- option = i.nextLine().toLowerCase();
- potionCount++;
- potion = true;
- }else{
- System.out.println("\nNot enough money!");
- option = i.nextLine().toLowerCase();
- }
- }else if(option.equals("d")){
- if(dagger == true){
- System.out.println("\nYou already have a dagger!");
- option = i.nextLine().toLowerCase();
- }else if(gold >= 50){
- gold -= 50;
- System.out.println("\nYou buy the dagger.");
- option = i.nextLine().toLowerCase();
- dagger = true;
- }else{
- System.out.println("\nNot enough money!");
- option = i.nextLine().toLowerCase();
- }
- }else if(option.equals("s")){
- if(shield == true){
- System.out.println("\nYou already have a shield!");
- option = i.nextLine().toLowerCase();
- }else if(gold >= 125){
- gold -= 125;
- System.out.println("\nYou buy the shield.");
- option = i.nextLine().toLowerCase();
- shield = true;
- }else{
- System.out.println("\nNot enough money!");
- option = i.nextLine().toLowerCase();
- }
- }else if(option.equals("t")){
- if(torch == true){
- System.out.println("\nYou already have a torch!");
- option = i.nextLine().toLowerCase();
- }else if(gold >= 100){
- gold -= 100;
- System.out.println("\nYou buy the torch.");
- option = i.nextLine().toLowerCase();
- torch = true;
- }else{
- System.out.println("\nNot enough money!");
- option = i.nextLine().toLowerCase();
- }
- }else if(option.equals("e")){
- System.out.println("\nYou exit the shop.");
- town();
- }else{
- option = i.nextLine().toLowerCase();
- }
- }
- }else if(option.equals("e")){
- System.out.println("\nYou exit the shop.");
- town();
- }else{
- option = i.nextLine().toLowerCase();
- }
- }
- }
- public static void forest() throws InterruptedException{
- System.out.println("\nYou are in the forest.");
- System.out.println("Options: [E]ast, [W]est, [N]orth, [S]outh");
- option = i.nextLine().toLowerCase();
- while(area == true){
- if(option.equals("e")){
- forestMonsters();
- System.out.println("\nYou went east.");
- System.out.println("You are in the forest.");
- System.out.println("You see a small house.");
- System.out.println("Options: [E]nter, [W]est");
- option = i.nextLine().toLowerCase();
- while(area == true){
- if(option.equals("w")){
- forestMonsters();
- System.out.println("\nYou went west.");
- forest();
- }else if(option.equals("e")){
- System.out.println("\nYou enter the small house.");
- System.out.println("You see an old woman.");
- System.out.println("Options: [T]alk, [E]xit");
- option = i.nextLine().toLowerCase();
- while(area == true){
- if(option.equals("t")){
- if(quest == true && questComplete == false){
- if(q_bearClaw == true){
- q_bearClawCount = 0;
- System.out.println("\nOld Woman: Wonderful, thank you!");
- System.out.println("\nQuest Complete!\nReward:\n50 gold\n125 exp");
- gold += 50;
- exp += 125;
- questComplete = true;
- lvlsystem();
- System.out.println("\nYou left the house.");
- forest();
- }else{
- System.out.println("\nOld Woman: Please bring me some bear claws.");
- System.out.println("\nYou left the house.");
- forest();
- }
- }else if(quest == false){
- System.out.println("\nOld Woman: Hello, young one.");
- System.out.println("Old Woman: What brings you here?");
- System.out.println("Options: [Q]uest, [N]ever mind");
- option = i.nextLine().toLowerCase();
- while(quest == false){
- if(option.equals("q")){
- quest = true;
- System.out.println("\nOld Woman: Please bring me some bear claws.");
- System.out.println("\nYou left the house.");
- forest();
- }else if(option.equals("n")){
- System.out.println("\nYou left the house.");
- forest();
- }else{
- option = i.nextLine().toLowerCase();
- }
- }
- }else if(questComplete == true){
- System.out.println("\nOld Woman: I don't need help right now.");
- System.out.println("\nYou left the house.");
- forest();
- }
- }else if(option.equals("e")){
- System.out.println("\nYou left the house.");
- forest();
- }else{
- option = i.nextLine().toLowerCase();
- }
- }
- }else{
- option = i.nextLine().toLowerCase();
- }
- }
- }else if(option.equals("w")){
- forestMonsters();
- System.out.println("\nYou went west.");
- System.out.println("You are in the forest.");
- System.out.println("You see a crystal chest and a warning sign.");
- System.out.println("Options: [E]ast, [R]ead, [O]pen");
- option = i.nextLine().toLowerCase();
- while(area == true){
- if(option.equals("e")){
- forestMonsters();
- System.out.println("\nYou went east.");
- forest();
- }else if(option.equals("o")){
- chest = 1+r.nextInt(15);
- chestLoot = 100+r.nextInt(300);
- System.out.println("\nYou attempt to open the chest...");
- Thread.sleep(1000);
- if(chest == 1){
- if(crystalHelm == true && crystalGloves == true && crystalBoots == true){
- System.out.println("...You find " + chestLoot + " gold!");
- gold += chestLoot;
- forest();
- }else if(crystalHelm == false && crystalGloves == false && crystalBoots == false){
- System.out.println("...You find a crystal helm!");
- crystalHelm = true;
- forest();
- }else if(crystalHelm == true && crystalGloves == false && crystalBoots == false){
- System.out.println("...You find a pair of crystal gloves!");
- crystalGloves = true;
- forest();
- }else if(crystalHelm == true && crystalGloves == true && crystalBoots == false){
- System.out.println("...You find a pair of crystal boots!");
- crystalBoots = true;
- forest();
- }
- }else{
- orc();
- }
- }else if(option.equals("r")){
- System.out.println("\nYou read the sign, it says:");
- System.out.println("\"Beware! Strong orcs!\"");
- option = i.nextLine().toLowerCase();
- }else{
- option = i.nextLine().toLowerCase();
- }
- }
- }else if(option.equals("n")){
- forestMonsters();
- System.out.println("\nYou went north.");
- System.out.println("You are in the forest.");
- System.out.println("You see a cave.");
- System.out.println("Options: [E]nter, [S]outh");
- option = i.nextLine().toLowerCase();
- while(area == true){
- if(option.equals("e")){
- if(torchEquipped == true){
- System.out.println("\nYou enter the cave.");
- cave();
- }else{
- System.out.println("\nIt's too dark, I need to get a lightsource first.");
- option = i.nextLine().toLowerCase();
- }
- }else if(option.equals("s")){
- forestMonsters();
- System.out.println("\nYou went south.");
- forest();
- }else{
- option = i.nextLine().toLowerCase();
- }
- }
- }else if(option.equals("s")){
- forestMonsters();
- System.out.println("\nYou went south.");
- town();
- }else{
- option = i.nextLine().toLowerCase();
- }
- }
- }
- public static void cave() throws InterruptedException{
- System.out.println("\nYou are in the cave.");
- System.out.println("Options: [W]est, [E]ast, [N]orth, [S]outh");
- option = i.nextLine().toLowerCase();
- while(area == true){
- if(option.equals("w")){
- caveMonsters();
- System.out.println("\nYou went west.");
- System.out.println("You are in the cave.");
- System.out.println("You see a warning sign.");
- System.out.println("Options: [E]ast, [R]ead");
- option = i.nextLine().toLowerCase();
- while(area == true){
- if(option.equals("e")){
- System.out.println("\nYou went east.");
- cave();
- }else if(option.equals("r")){
- System.out.println("\nYou read the sign, it says:");
- System.out.println("\"Beware! Poisonous monsters!\"");
- option = i.nextLine().toLowerCase();
- }else{
- option = i.nextLine().toLowerCase();
- }
- }
- }else if(option.equals("e")){
- caveMonsters();
- System.out.println("\nYou went east.");
- System.out.println("You are in the cave.");
- System.out.println("You see a pool with strange looking liquid.");
- System.out.println("Options: [W]est, [D]rink");
- option = i.nextLine().toLowerCase();
- while(area == true){
- if(option.equals("w")){
- System.out.println("\nYou went west.");
- cave();
- }else if(option.equals("d")){
- pool = 1+r.nextInt(3);
- if(pool == 1){
- System.out.println("\nYou feel refreshed!");
- System.out.println("You went west.");
- hp = hpMax;
- cave();
- }else{
- snake();
- System.out.println("\nDamn snake caught me by surprise.");
- System.out.println("You went west.");
- cave();
- }
- }else{
- option = i.nextLine().toLowerCase();
- }
- }
- }else if(option.equals("n")){
- caveMonsters();
- System.out.println("\nYou went north.");
- System.out.println("You are in the cave.");
- System.out.println("You see a strange portal and a wizard.");
- System.out.println("Options: [T]alk, [S]outh");
- option = i.nextLine().toLowerCase();
- while(area == true){
- if(option.equals("s")){
- System.out.println("\nYou went south.");
- cave();
- }else if(option.equals("t")){
- System.out.println("\nWizard: Hello, would you like to go DragonWorld?");
- System.out.println("Wizard: It only costs 200 gold!");
- System.out.println("Options: [Y]es, [N]o");
- option = i.nextLine().toLowerCase();
- while(area == true){
- if(option.equals("y")){
- if(gold >= 200){
- System.out.println("\nYou walk into the portal...");
- dragonWorld();
- }else{
- System.out.println("\nWizard: You don't have enough gold...");
- caveMonsters();
- System.out.println("\nYou went south.");
- cave();
- }
- }else if(option.equals("n")){
- caveMonsters();
- System.out.println("\nYou went south.");
- cave();
- }else{
- option = i.nextLine().toLowerCase();
- }
- }
- }else{
- option = i.nextLine().toLowerCase();
- }
- }
- }else if(option.equals("s")){
- caveMonsters();
- System.out.println("\nYou exit the cave.");
- forest();
- }else{
- option = i.nextLine().toLowerCase();
- }
- }
- }
- public static void forestMonsters() throws InterruptedException{
- int fm = r.nextInt(5);
- if(fm == 1){
- wolf();
- }else if(fm == 2){
- bear();
- }
- }
- public static void caveMonsters() throws InterruptedException{
- int cm = 1+r.nextInt(5);
- if(cm == 1){
- spider();
- }else if(cm == 2){
- snake();
- }else if(cm == 3){
- troll();
- }
- }
- public static void lvlsystem(){
- totalExp += exp;
- if(exp >= nextLvl){
- exp = 0;
- nextLvl *= 1.2;
- lvl++;
- hp += 3;
- hpMax += 3;
- str += 1;
- System.out.println("\nYou are now LVL " + lvl + "!");
- }
- }
- public static void wolf() throws InterruptedException{
- fight = true;
- m_hp = 5;
- System.out.println(mons[0]);
- while(fight == true){
- m_dmg = r.nextInt(2);
- goldDrop = 1+r.nextInt(5);
- monsterDrop = 1+r.nextInt(5);
- dmg = r.nextInt(str);
- dmg *= 0.5;
- healSelf = 1+r.nextInt(3);
- healSelfAmount = 1+r.nextInt(5);
- System.out.println("Wolf (HP:" + m_hp + "/5) does " + m_dmg + " damage");
- hp -= m_dmg;
- System.out.println(name + " (HP:" + hp + "/" + hpMax + ") does " + dmg + " damage");
- m_hp -= dmg;
- if(phoenixPetEquipped == true && hp < hpMax && healSelf == 1){
- System.out.println(healSelfAmount + "+ heal!");
- hp += healSelfAmount;
- if(hp > hpMax){
- hp = hpMax;
- }
- }
- System.out.println();
- Thread.sleep(1500);
- if(m_hp <= 0){
- fight = false;
- System.out.println("You killed the wolf\nGained 15 exp\nDrops:\nGold x" + goldDrop);
- if(monsterDrop == 1){
- System.out.println("Potion");
- potion = true;
- potionCount += 1;
- }
- gold += goldDrop;
- exp += 15;
- lvlsystem();
- }else if(hp <= 0){
- fight = false;
- System.out.println("\nYou died!");
- System.out.println("Lost some gold.");
- gold *= 0.5;
- hp = hpMax;
- home();
- }else if(hp <= 0 && m_hp <= 0){
- fight = false;
- System.out.println("\nYou died!");
- System.out.println("Lost some gold.");
- gold *= 0.5;
- hp = hpMax;
- home();
- }
- }
- }
- public static void bear() throws InterruptedException{
- fight = true;
- m_hp = 7;
- System.out.println(mons[1]);
- while(fight == true){
- m_dmg = r.nextInt(3);
- goldDrop = 1+r.nextInt(15);
- dmg = r.nextInt(str);
- dmg *= 0.5;
- healSelf = 1+r.nextInt(3);
- healSelfAmount = 1+r.nextInt(5);
- System.out.println("Bear (HP:" + m_hp + "/7) does " + m_dmg + " damage");
- hp -= m_dmg;
- System.out.println(name + " (HP:" + hp + "/" + hpMax + ") does " + dmg + " damage");
- m_hp -= dmg;
- if(phoenixPetEquipped == true && hp < hpMax && healSelf == 1){
- System.out.println(healSelfAmount + "+ heal!");
- hp += healSelfAmount;
- if(hp > hpMax){
- hp = hpMax;
- }
- }
- System.out.println();
- Thread.sleep(1500);
- if(m_hp <= 0){
- fight = false;
- System.out.println("You killed the bear\nGained 25 exp\nDrops:\nGold x" + goldDrop);
- if(quest == true && q_bearClaw == false){
- if(q_bearClawCount == 3){
- System.out.println("\nI have the bear claws, I should go to the Old Woman now.");
- q_bearClaw = true;
- }else{
- q_bearClawCount++;
- System.out.println("Bear claw");
- }
- }
- gold += goldDrop;
- exp += 25;
- lvlsystem();
- }else if(hp <= 0){
- fight = false;
- System.out.println("\nYou died!");
- System.out.println("Lost some gold.");
- gold *= 0.5;
- hp = hpMax;
- home();
- }else if(hp <= 0 && m_hp <= 0){
- fight = false;
- System.out.println("\nYou died!");
- System.out.println("Lost some gold.");
- gold *= 0.5;
- hp = hpMax;
- home();
- }
- }
- }
- public static void orc() throws InterruptedException{
- fight = true;
- m_hp = 20;
- System.out.println(mons[2]);
- while(fight == true){
- m_dmg = r.nextInt(11);
- goldDrop = 1+r.nextInt(80);
- monsterDrop = 1+r.nextInt(3);
- dmg = r.nextInt(str);
- dmg *= 0.5;
- healSelf = 1+r.nextInt(3);
- healSelfAmount = 1+r.nextInt(5);
- System.out.println("Orc (HP:" + m_hp + "/20) does " + m_dmg + " damage");
- hp -= m_dmg;
- System.out.println(name + " (HP:" + hp + "/" + hpMax + ") does " + dmg + " damage");
- m_hp -= dmg;
- if(phoenixPetEquipped == true && hp < hpMax && healSelf == 1){
- System.out.println(healSelfAmount + "+ heal!");
- hp += healSelfAmount;
- if(hp > hpMax){
- hp = hpMax;
- }
- }
- System.out.println();
- Thread.sleep(1500);
- if(m_hp <= 0){
- fight = false;
- System.out.println("You killed the orc\nGained 50 exp\nDrops:\nGold x" + goldDrop);
- if(monsterDrop == 1){
- System.out.println("Medium Potion");
- medPotion = true;
- medPotionCount += 1;
- }
- gold += goldDrop;
- exp += 50;
- lvlsystem();
- forest();
- }else if(hp <= 0){
- fight = false;
- System.out.println("\nYou died!");
- System.out.println("Lost some gold.");
- gold *= 0.5;
- hp = hpMax;
- home();
- }else if(hp <= 0 && m_hp <= 0){
- fight = false;
- System.out.println("\nYou died!");
- System.out.println("Lost some gold.");
- gold *= 0.5;
- hp = hpMax;
- home();
- }
- }
- }
- public static void spider() throws InterruptedException{
- fight = true;
- m_hp = 15;
- System.out.println(mons[3]);
- while(fight == true){
- m_dmg = r.nextInt(5);
- goldDrop = 1+r.nextInt(30);
- monsterDrop = 1+r.nextInt(5);
- poison = 1+r.nextInt(5);
- poisondmg = 1+r.nextInt(5);
- dmg = r.nextInt(str);
- dmg *= 0.5;
- healSelf = 1+r.nextInt(3);
- healSelfAmount = 1+r.nextInt(5);
- System.out.println("Spider (HP:" + m_hp + "/15) does " + m_dmg + " damage");
- if(poison == 1){
- System.out.println("+" + poisondmg + " poison damage!");
- hp -= poisondmg;
- }
- hp -= m_dmg;
- System.out.println(name + " (HP:" + hp + "/" + hpMax + ") does " + dmg + " damage");
- m_hp -= dmg;
- if(phoenixPetEquipped == true && hp < hpMax && healSelf == 1){
- System.out.println(healSelfAmount + "+ heal!");
- hp += healSelfAmount;
- if(hp > hpMax){
- hp = hpMax;
- }
- }
- System.out.println();
- Thread.sleep(1500);
- if(m_hp <= 0){
- fight = false;
- System.out.println("You killed the spider\nGained 30 exp\nDrops:\nGold x" + goldDrop);
- if(monsterDrop == 1){
- System.out.println("Potion");
- potion = true;
- potionCount += 1;
- }
- gold += goldDrop;
- exp += 30;
- lvlsystem();
- }else if(hp <= 0){
- fight = false;
- System.out.println("\nYou died!");
- System.out.println("Lost some gold.");
- gold *= 0.5;
- hp = hpMax;
- home();
- }else if(hp <= 0 && m_hp <= 0){
- fight = false;
- System.out.println("\nYou died!");
- System.out.println("Lost some gold.");
- gold *= 0.5;
- hp = hpMax;
- home();
- }
- }
- }
- public static void snake() throws InterruptedException{
- fight = true;
- m_hp = 15;
- System.out.println(mons[4]);
- while(fight == true){
- m_dmg = r.nextInt(5);
- goldDrop = 1+r.nextInt(30);
- monsterDrop = 1+r.nextInt(10);
- poison = 1+r.nextInt(5);
- poisondmg = 1+r.nextInt(5);
- dmg = r.nextInt(str);
- dmg *= 0.5;
- healSelf = 1+r.nextInt(3);
- healSelfAmount = 1+r.nextInt(5);
- System.out.println("Snake (HP:" + m_hp + "/15) does " + m_dmg + " damage");
- if(poison == 1){
- System.out.println("+" + poisondmg + " poison damage!");
- hp -= poisondmg;
- }
- hp -= m_dmg;
- System.out.println(name + " (HP:" + hp + "/" + hpMax + ") does " + dmg + " damage");
- m_hp -= dmg;
- if(phoenixPetEquipped == true && hp < hpMax && healSelf == 1){
- System.out.println(healSelfAmount + "+ heal!");
- hp += healSelfAmount;
- if(hp > hpMax){
- hp = hpMax;
- }
- }
- System.out.println();
- Thread.sleep(1500);
- if(m_hp <= 0){
- fight = false;
- System.out.println("You killed the snake\nGained 30 exp\nDrops:\nGold x" + goldDrop);
- if(monsterDrop == 1 && poisonRing == false){
- System.out.println("Poison ring");
- poisonRing = true;
- }
- gold += goldDrop;
- exp += 30;
- lvlsystem();
- }else if(hp <= 0){
- fight = false;
- System.out.println("\nYou died!");
- System.out.println("Lost some gold.");
- gold *= 0.5;
- hp = hpMax;
- home();
- }else if(hp <= 0 && m_hp <= 0){
- fight = false;
- System.out.println("\nYou died!");
- System.out.println("Lost some gold.");
- gold *= 0.5;
- hp = hpMax;
- home();
- }
- }
- }
- public static void troll() throws InterruptedException{
- fight = true;
- m_hp = 20;
- System.out.println(mons[5]);
- while(fight == true){
- m_dmg = r.nextInt(6);
- goldDrop = 1+r.nextInt(40);
- monsterDrop = 1+r.nextInt(15);
- dmg = r.nextInt(str);
- dmg *= 0.5;
- healSelf = 1+r.nextInt(3);
- healSelfAmount = 1+r.nextInt(5);
- System.out.println("Troll (HP:" + m_hp + "/20) does " + m_dmg + " damage");
- hp -= m_dmg;
- System.out.println(name + " (HP:" + hp + "/" + hpMax + ") does " + dmg + " damage");
- m_hp -= dmg;
- if(phoenixPetEquipped == true && hp < hpMax && healSelf == 1){
- System.out.println(healSelfAmount + "+ heal!");
- hp += healSelfAmount;
- if(hp > hpMax){
- hp = hpMax;
- }
- }
- System.out.println();
- Thread.sleep(1500);
- if(m_hp <= 0){
- fight = false;
- System.out.println("You killed the troll\nGained 35 exp\nDrops:\nGold x" + goldDrop);
- if(monsterDrop == 1 && rockHammer == false){
- System.out.println("Rock hammer");
- rockHammer = true;
- }
- gold += goldDrop;
- exp += 35;
- lvlsystem();
- }else if(hp <= 0){
- fight = false;
- System.out.println("\nYou died!");
- System.out.println("Lost some gold.");
- gold *= 0.5;
- hp = hpMax;
- home();
- }else if(hp <= 0 && m_hp <= 0){
- fight = false;
- System.out.println("\nYou died!");
- System.out.println("Lost some gold.");
- gold *= 0.5;
- hp = hpMax;
- home();
- }
- }
- }
- public static void dragonWorld() throws InterruptedException{
- System.out.println("\nYou are in DragonWorld.");
- System.out.println("You see a strange portal and a wizard.");
- System.out.println("Options: [T]alk, [N]orth, [E]ast");
- option = i.nextLine().toLowerCase();
- while(area == true){
- if(option.equals("t")){
- System.out.println("\nWizard: Would you like to go back?");
- System.out.println("Wizard: Don't worry, it's free to go back.");
- System.out.println("Options: [Y]es, [N]o");
- option = i.nextLine().toLowerCase();
- while(area == true){
- if(option.equals("y")){
- System.out.println("\nYou walk into the portal...");
- cave();
- }else if(option.equals("n")){
- System.out.println("\nWizard: If you ever want to go back, feel free to talk to me.");
- dragonWorld();
- }else{
- option = i.nextLine().toLowerCase();
- }
- }
- }else if(option.equals("n")){
- System.out.println("\nYou went north.");
- dragonWorld2();
- }else if(option.equals("e")){
- System.out.println("\nYou went east.");
- System.out.println("You see a magical looking forest and a sign.");
- System.out.println("Options: [E]nter, [R]ead, [W]est");
- option = i.nextLine().toLowerCase();
- while(area == true){
- if(option.equals("e")){
- System.out.println("\nYou enter the forest...");
- magicForest();
- }else if(option.equals("r")){
- System.out.println("\nYou read the sign, it says:");
- System.out.println("\"Beware! Powerful monsters!\"");
- option = i.nextLine().toLowerCase();
- }else if(option.equals("w")){
- System.out.println("\nYou went west.");
- dragonWorld();
- }else{
- option = i.nextLine().toLowerCase();
- }
- }
- }else{
- option = i.nextLine().toLowerCase();
- }
- }
- }
- public static void dragonWorld2() throws InterruptedException{
- System.out.println("\nYou are in DragonWorld");
- System.out.println("Options: [I]nn, [S]hop, [N]orth, S[o]uth");
- option = i.nextLine().toLowerCase();
- while(area == true){
- if(option.equals("i")){
- inn();
- }else if(option.equals("s")){
- shop2();
- }else if(option.equals("n")){
- System.out.println("\nYou went north.");
- toSkyIsland();
- }else if(option.equals("o")){
- System.out.println("\nYou went south.");
- dragonWorld();
- }else{
- option = i.nextLine().toLowerCase();
- }
- }
- }
- public static void inn() throws InterruptedException{
- System.out.println("\nYou are in the inn.");
- System.out.println("Options: [E]xit, [T]alk, [I]nventory, [S]tats");
- option = i.nextLine().toLowerCase();
- while(area == true){
- if(option.equals("e")){
- dragonWorld2();
- }else if(option.equals("t")){
- System.out.println("\nInn keeper: Hello, how can I help you?");
- System.out.println("Options: [R]est, [N]ever mind");
- option = i.nextLine().toLowerCase();
- while(area == true){
- if(option.equals("r")){
- if(hp < hpMax){
- System.out.println("\nInn keeper: That will be 175 gold.");
- System.out.println("Options: [O]K, [N]ever mind");
- option = i.nextLine().toLowerCase();
- while(area == true){
- if(option.equals("o")){
- if(gold >= 175){
- System.out.println("\nYou rested well!");
- gold -= 175;
- hp = hpMax;
- inn();
- }else{
- System.out.println("\nInn keeper: You don't have enough, come back later.");
- inn();
- }
- }else if(option.equals("n")){
- inn();
- }else{
- option = i.nextLine().toLowerCase();
- }
- }
- }else{
- System.out.println("\nI don't feel like resting right now.");
- inn();
- }
- }else if(option.equals("n")){
- inn();
- }else{
- option = i.nextLine().toLowerCase();
- }
- }
- }else if(option.equals("i")){
- System.out.println("\nInventory\n\nItems\t\t\t\tDescription\n");
- if(potion == false && dagger == false && torch == false && shield == false && crystalHelm == false && crystalGloves == false &&
- crystalBoots == false && poisonRing == false && medPotion == false && highPotion == false && hpPotion == false && strPotion == false
- && holyAmulet == false && leafShield == false && phoenixPet == false && dragonWings == false && dragonPants == false
- && dragonBody == false && gold == 0){
- System.out.println("Empty");
- option = i.nextLine().toLowerCase();
- }else{
- if(gold >= 10){
- System.out.println("Gold x" + gold + "\t\t\tGold is always welcome.");
- }else if(gold < 10){
- System.out.println("Gold x" + gold + "\t\t\t\tGold is always welcome.");
- }
- if(potion == true){
- System.out.println(items[0] + " x" + potionCount + "\t\t\tHeals 5 HP");
- }
- if(medPotion == true){
- System.out.println("[M]edium Potion x" + medPotionCount + "\t\tHeals 15 HP");
- }
- if(highPotion == true){
- System.out.println(items2[0] + " x" + highPotionCount + "\t\tHeals 30 HP");
- }
- if(hpPotion == true){
- System.out.println(items2[1] + " x" + hpPotionCount + "\t\t\t+10 HP");
- }
- if(strPotion == true){
- System.out.println(items2[2] + " x" + strPotionCount + "\t\t+10 STR");
- }
- if(dagger == true){
- if(daggerEquipped == true){
- System.out.println(items[1] + " [Equipped]\t\t+3 STR");
- }else{
- System.out.println(items[1] + "\t\t\t+3 STR");
- }
- }
- if(torch == true){
- if(torchEquipped == true){
- System.out.println(items[2] + " [Equipped]\t\tLights up dark areas.");
- }else{
- System.out.println(items[2] + "\t\t\tLights up dark areas.");
- }
- }
- if(shield == true){
- if(shieldEquipped == true){
- System.out.println(items[3] + " [Equipped]\t\t+10 HP");
- }else{
- System.out.println(items[3] + "\t\t\t+10 HP");
- }
- }
- if(crystalHelm == true){
- if(crystalHelmEquipped == true){
- System.out.println("Crystal [h]elm [Equipped]\t+25 HP");
- }else{
- System.out.println("Crystal [h]elm\t\t\t+25 HP");
- }
- }
- if(crystalGloves == true){
- if(crystalGlovesEquipped == true){
- System.out.println("Crystal [g]loves [Equipped]\t+15 HP");
- }else{
- System.out.println("Crystal [g]loves\t\t+15 HP");
- }
- }
- if(crystalBoots == true){
- if(crystalBootsEquipped == true){
- System.out.println("Crystal [b]oots [Equipped]\t+20 HP");
- }else{
- System.out.println("Crystal [b]oots\t\t\t+20 HP");
- }
- }
- if(poisonRing == true){
- if(poisonRingEquipped == true){
- System.out.println("Poison [ri]ng [Equipped]\t+5 HP, +5 STR");
- }else{
- System.out.println("Poison [ri]ng\t\t\t+5 HP, +5 STR");
- }
- }
- if(rockHammer == true){
- if(rockHammerEquipped == true){
- System.out.println("[R]ock hammer [Equipped]\t+10 STR");
- }else{
- System.out.println("[R]ock hammer\t\t\t+10 STR");
- }
- }
- if(holyAmulet == true){
- if(holyAmuletEquipped == true){
- System.out.println("Holy [a]mulet [Equipped]\t+15 HP, +7 STR");
- }else{
- System.out.println("Holy [a]mulet\t\t\t+15 HP, +7 STR");
- }
- }
- if(leafShield == true){
- if(leafShieldEquipped == true){
- System.out.println("Lea[f] Shield [Equipped]\t+30 HP, +5 STR");
- }else{
- System.out.println("Lea[f] Shield\t\t\t+30 HP, +5 STR");
- }
- }
- if(phoenixPet == true){
- if(phoenixPetEquipped == true){
- System.out.println("Phoeni[x] Pet [Equipped]\tHeals you in combat.");
- }else{
- System.out.println("Phoeni[x] Pet\t\t\tHeals you in combat.");
- }
- }
- if(dragonWings == true){
- if(dragonWingsEquipped == true){
- System.out.println("Dragon [w]ings [Equipped]\t+25 HP, +10 STR, FLY");
- }else{
- System.out.println("Dragon [w]ings\t\t\t+25 HP, +10 STR, FLY");
- }
- }
- if(dragonPants == true){
- if(dragonPantsEquipped == true){
- System.out.println("Dragon [pa]nts [Equipped]\t+35 HP, +15 STR");
- }else{
- System.out.println("Dragon [pa]nts\t\t\t+35 HP, +15 STR");
- }
- }
- if(dragonBody == true){
- if(dragonBodyEquipped == true){
- System.out.println("Dragon [bo]dy [Equipped]\t+50 HP, +25 STR");
- }else{
- System.out.println("Dragon [bo]dy\t\t\t+50 HP, +25 STR");
- }
- }
- System.out.println("[E]xit");
- option = i.nextLine().toLowerCase();
- while(area == true){
- if(option.equals("p") && potion == true){
- if(hp == hpMax){
- System.out.println("\nYou don't need to drink this right now.");
- }else{
- System.out.println("\nYou drink the Potion... some HP was restored!");
- hp += 5;
- potionCount -= 1;
- if(hp > hpMax){
- hp = hpMax;
- }
- if(potionCount == 0){
- potion = false;
- }
- inn();
- }
- option = i.nextLine().toLowerCase();
- }else if(option.equals("m") && medPotion == true){
- if(hp == hpMax){
- System.out.println("\nYou don't need to drink this right now.");
- }else{
- System.out.println("\nYou drink the Medium Potion... some HP was restored!");
- hp += 15;
- medPotionCount -= 1;
- if(hp > hpMax){
- hp = hpMax;
- }
- if(medPotionCount == 0){
- medPotion = false;
- }
- inn();
- }
- option = i.nextLine().toLowerCase();
- }else if(option.equals("hi") && highPotion == true){
- if(hp == hpMax){
- System.out.println("\nYou don't need to drink this right now.");
- }else{
- System.out.println("\nYou drink the High Potion... some HP was restored!");
- hp += 30;
- highPotionCount -= 1;
- if(hp > hpMax){
- hp = hpMax;
- }
- if(highPotionCount == 0){
- highPotion = false;
- }
- inn();
- }
- option = i.nextLine().toLowerCase();
- }else if(option.equals("hp") && hpPotion == true){
- System.out.println("\nYou drink the +HP Potion... HP increased!");
- hp += 10;
- hpMax += 10;
- hpPotionCount -= 1;
- if(hpPotionCount == 0){
- hpPotion = false;
- }
- inn();
- }else if(option.equals("st") && strPotion == true){
- System.out.println("\nYou drink the +STR Potion... STR increased!");
- str += 10;
- strPotionCount -= 1;
- if(strPotionCount == 0){
- strPotion = false;
- }
- inn();
- }else if(option.equals("d") && dagger == true){
- if(rockHammerEquipped == true){
- System.out.println("\nPlease unequip the other weapon first!");
- option = i.nextLine().toLowerCase();
- }else if(daggerEquipped == false){
- System.out.println("\nYou equip the dagger.");
- daggerEquipped = true;
- str += 3;
- inn();
- }else if(daggerEquipped == true){
- System.out.println("\nYou unequip the dagger.");
- daggerEquipped = false;
- str -= 3;
- inn();
- }
- }else if(option.equals("t") && torch == true){
- if(torchEquipped == false){
- System.out.println("\nYou equip the torch.");
- torchEquipped = true;
- inn();
- }else if(torchEquipped == true){
- System.out.println("\nYou unequip the torch.");
- torchEquipped = false;
- inn();
- }
- }else if(option.equals("s") && shield == true){
- if(leafShieldEquipped == true){
- System.out.println("\nPlease unequip the other shield first!");
- option = i.nextLine().toLowerCase();
- }else if(shieldEquipped == false){
- System.out.println("\nYou equip the shield.");
- shieldEquipped = true;
- hp += 10;
- hpMax += 10;
- inn();
- }else if(shieldEquipped == true){
- System.out.println("\nYou unequip the shield.");
- shieldEquipped = false;
- hp -= 10;
- hpMax -= 10;
- inn();
- }
- }else if(option.equals("h") && crystalHelm == true){
- if(crystalHelmEquipped == false){
- System.out.println("\nYou equip the crystal helm.");
- crystalHelmEquipped = true;
- hp += 25;
- hpMax += 25;
- inn();
- }else if(crystalHelmEquipped == true){
- System.out.println("\nYou unequip the crystal helm.");
- crystalHelmEquipped = false;
- hp -= 25;
- hpMax -= 25;
- inn();
- }
- }else if(option.equals("g") && crystalGloves == true){
- if(crystalGlovesEquipped == false){
- System.out.println("\nYou equip the crystal gloves.");
- crystalGlovesEquipped = true;
- hp += 15;
- hpMax += 15;
- inn();
- }else if(crystalGlovesEquipped == true){
- System.out.println("\nYou unequip the crystal gloves.");
- crystalGlovesEquipped = false;
- hp -= 15;
- hpMax -= 15;
- inn();
- }
- }else if(option.equals("b") && crystalBoots == true){
- if(crystalBootsEquipped == false){
- System.out.println("\nYou equip the crystal boots.");
- crystalBootsEquipped = true;
- hp += 20;
- hpMax += 20;
- inn();
- }else if(crystalBootsEquipped == true){
- System.out.println("\nYou unequip the crystal boots.");
- crystalBootsEquipped = false;
- hp -= 20;
- hpMax -= 20;
- inn();
- }
- }else if(option.equals("ri") && poisonRing == true){
- if(poisonRingEquipped == false){
- System.out.println("\nYou equip the poison ring.");
- poisonRingEquipped = true;
- hp += 5;
- hpMax += 5;
- str += 5;
- inn();
- }else if(poisonRingEquipped == true){
- System.out.println("\nYou unequip the poison ring.");
- poisonRingEquipped = false;
- hp -= 5;
- hpMax -= 5;
- str -= 5;
- inn();
- }
- }else if(option.equals("r") && rockHammer == true){
- if(daggerEquipped == true){
- System.out.println("\nPlease unequip the other weapon first!");
- option = i.nextLine().toLowerCase();
- }else if(rockHammerEquipped == false){
- System.out.println("\nYou equip the rock hammer.");
- rockHammerEquipped = true;
- str += 10;
- inn();
- }else if(rockHammerEquipped == true){
- System.out.println("\nYou unequip the rock hammer.");
- rockHammerEquipped = false;
- str -= 10;
- inn();
- }
- }else if(option.equals("a") && holyAmulet == true){
- if(holyAmuletEquipped == false){
- System.out.println("\nYou equip the holy amulet.");
- holyAmuletEquipped = true;
- hp += 15;
- hpMax += 15;
- str += 7;
- inn();
- }else if(holyAmuletEquipped == true){
- System.out.println("\nYou unequip the holy amulet.");
- holyAmuletEquipped = false;
- hp -= 15;
- hpMax -= 15;
- str -= 7;
- inn();
- }
- }else if(option.equals("f") && leafShield == true){
- if(shieldEquipped == true){
- System.out.println("\nPlease unequip the other shield first!");
- option = i.nextLine().toLowerCase();
- }else if(leafShieldEquipped == false){
- System.out.println("\nYou equip the leaf shield.");
- leafShieldEquipped = true;
- hp += 30;
- hpMax += 30;
- str += 5;
- inn();
- }else if(leafShieldEquipped == true){
- System.out.println("\nYou unequip the leaf shield.");
- leafShieldEquipped = false;
- hp -= 30;
- hpMax -= 30;
- str -= 5;
- inn();
- }
- }else if(option.equals("x") && phoenixPet == true){
- if(phoenixPetEquipped == false){
- System.out.println("\nYou equip the phoenix pet.");
- phoenixPetEquipped = true;
- inn();
- }else if(phoenixPetEquipped == true){
- System.out.println("\nYou unequip the phoenix pet.");
- phoenixPetEquipped = false;
- inn();
- }
- }else if(option.equals("w") && dragonWings == true){
- if(dragonWingsEquipped == false){
- System.out.println("\nYou equip the dragon wings.");
- dragonWingsEquipped = true;
- hp += 25;
- hpMax += 25;
- str += 10;
- inn();
- }else if(dragonWingsEquipped == true){
- System.out.println("\nYou unequip the dragon wings.");
- dragonWingsEquipped = false;
- hp -= 25;
- hpMax -= 25;
- str -= 10;
- inn();
- }
- }else if(option.equals("pa") && dragonPants == true){
- if(dragonPantsEquipped == false){
- System.out.println("\nYou equip the dragon pants.");
- dragonPantsEquipped = true;
- hp += 35;
- hpMax += 35;
- str += 15;
- inn();
- }else if(dragonPantsEquipped == true){
- System.out.println("\nYou unequip the dragon pants.");
- dragonPantsEquipped = false;
- hp -= 35;
- hpMax -= 35;
- str -= 15;
- inn();
- }
- }else if(option.equals("e")){
- inn();
- }else if(option.equals("bo") && dragonBody == true){
- if(dragonBodyEquipped == false){
- System.out.println("\nYou equip the dragon body.");
- dragonBodyEquipped = true;
- hp += 50;
- hpMax += 50;
- str += 25;
- inn();
- }else if(dragonBodyEquipped == true){
- System.out.println("\nYou unequip the dragon body.");
- dragonBodyEquipped = false;
- hp -= 50;
- hpMax -= 50;
- str -= 25;
- inn();
- }
- }else{
- option = i.nextLine().toLowerCase();
- }
- }
- }
- }else if(option.equals("s")){
- System.out.println("\nStats\n");
- System.out.println("Name: " + name);
- System.out.println("LVL: " + lvl);
- System.out.println("HP: " + hp + "/" + hpMax);
- System.out.println("STR: " + str);
- System.out.println("Next LVL in: " + nextLvl + " exp");
- System.out.println("Total exp: " + totalExp);
- option = i.nextLine().toLowerCase();
- }else{
- option = i.nextLine().toLowerCase();
- }
- }
- }
- public static void shop2() throws InterruptedException{
- System.out.println("\nYou are in the shop.");
- System.out.println("Options: [B]uy, [E]xit");
- option = i.nextLine().toLowerCase();
- while(area == true){
- if(option.equals("b")){
- System.out.println("\nShop keeper: Hello, how can I help you?\nYou have " + gold + " gold.");
- System.out.println("\nItems\t\tPrice");
- for(int y = 0; y < items2.length && y < price2.length; y++){
- System.out.println(items2[y] + "\t" + price2[y]);
- }
- System.out.println("[E]xit");
- option = i.nextLine().toLowerCase();
- while(area == true){
- if(option.equals("hi")){
- if(gold >= 75){
- gold -= 75;
- System.out.println("\nYou buy a high potion.");
- option = i.nextLine().toLowerCase();
- highPotionCount++;
- highPotion = true;
- }else{
- System.out.println("\nNot enough money!");
- option = i.nextLine().toLowerCase();
- }
- }else if(option.equals("hp")){
- if(gold >= 350){
- gold -= 350;
- System.out.println("\nYou buy a +HP potion.");
- option = i.nextLine().toLowerCase();
- hpPotionCount++;
- hpPotion = true;
- }else{
- System.out.println("\nNot enough money!");
- option = i.nextLine().toLowerCase();
- }
- }else if(option.equals("st")){
- if(gold >= 700){
- gold -= 700;
- System.out.println("\nYou buy a +STR potion.");
- option = i.nextLine().toLowerCase();
- strPotionCount++;
- strPotion = true;
- }else{
- System.out.println("\nNot enough money!");
- option = i.nextLine().toLowerCase();
- }
- }else if(option.equals("e")){
- System.out.println("\nYou exit the shop.");
- dragonWorld2();
- }else{
- option = i.nextLine().toLowerCase();
- }
- }
- }else if(option.equals("e")){
- System.out.println("\nYou exit the shop.");
- dragonWorld2();
- }else{
- option = i.nextLine().toLowerCase();
- }
- }
- }
- public static void unicorn() throws InterruptedException{
- fight = true;
- m_hp = 35;
- System.out.println(mons[6]);
- while(fight == true){
- m_dmg = r.nextInt(10);
- goldDrop = 1+r.nextInt(75);
- monsterDrop = 1+r.nextInt(15);
- dmg = r.nextInt(str);
- dmg *= 0.5;
- healSelf = 1+r.nextInt(3);
- healSelfAmount = 1+r.nextInt(5);
- System.out.println("Unicorn (HP:" + m_hp + "/35) does " + m_dmg + " damage");
- hp -= m_dmg;
- System.out.println(name + " (HP:" + hp + "/" + hpMax + ") does " + dmg + " damage\n");
- m_hp -= dmg;
- if(phoenixPetEquipped == true && hp < hpMax && healSelf == 1){
- System.out.println(healSelfAmount + "+ heal!");
- hp += healSelfAmount;
- if(hp > hpMax){
- hp = hpMax;
- }
- }
- System.out.println();
- Thread.sleep(1500);
- if(m_hp <= 0){
- fight = false;
- System.out.println("You killed the unicorn\nGained 65 exp\nDrops:\nGold x" + goldDrop);
- if(monsterDrop == 1 && holyAmulet == false){
- System.out.println("Holy amulet");
- holyAmulet = true;
- }
- gold += goldDrop;
- exp += 65;
- lvlsystem();
- }else if(hp <= 0){
- fight = false;
- System.out.println("\nYou died!");
- System.out.println("Lost some gold.");
- gold *= 0.5;
- hp = hpMax;
- home();
- }else if(hp <= 0 && m_hp <= 0){
- fight = false;
- System.out.println("\nYou died!");
- System.out.println("Lost some gold.");
- gold *= 0.5;
- hp = hpMax;
- home();
- }
- }
- }
- public static void treeMonster() throws InterruptedException{
- fight = true;
- m_hp = 60;
- System.out.println(mons[7]);
- while(fight == true){
- m_dmg = r.nextInt(6);
- goldDrop = 1+r.nextInt(50);
- monsterDrop = 1+r.nextInt(15);
- dmg = r.nextInt(str);
- dmg *= 0.5;
- healSelf = 1+r.nextInt(3);
- healSelfAmount = 1+r.nextInt(5);
- System.out.println("Tree monster (HP:" + m_hp + "/60) does " + m_dmg + " damage");
- hp -= m_dmg;
- System.out.println(name + " (HP:" + hp + "/" + hpMax + ") does " + dmg + " damage");
- m_hp -= dmg;
- if(phoenixPetEquipped == true && hp < hpMax && healSelf == 1){
- System.out.println(healSelfAmount + "+ heal!");
- hp += healSelfAmount;
- if(hp > hpMax){
- hp = hpMax;
- }
- }
- System.out.println();
- Thread.sleep(1500);
- if(m_hp <= 0){
- fight = false;
- System.out.println("You killed the tree monster\nGained 80 exp\nDrops:\nGold x" + goldDrop);
- if(monsterDrop == 1 && leafShield == false){
- System.out.println("Leaf shield");
- leafShield = true;
- }
- gold += goldDrop;
- exp += 80;
- lvlsystem();
- }else if(hp <= 0){
- fight = false;
- System.out.println("\nYou died!");
- System.out.println("Lost some gold.");
- gold *= 0.5;
- hp = hpMax;
- home();
- }else if(hp <= 0 && m_hp <= 0){
- fight = false;
- System.out.println("\nYou died!");
- System.out.println("Lost some gold.");
- gold *= 0.5;
- hp = hpMax;
- home();
- }
- }
- }
- public static void phoenix() throws InterruptedException{
- fight = true;
- m_hp = 50;
- System.out.println(mons[8]);
- while(fight == true){
- m_dmg = r.nextInt(5);
- goldDrop = 1+r.nextInt(100);
- monsterDrop = 1+r.nextInt(15);
- heal = 1+r.nextInt(4);
- healAmount = 1+r.nextInt(7);
- dmg = r.nextInt(str);
- dmg *= 0.5;
- healSelf = 1+r.nextInt(3);
- healSelfAmount = 1+r.nextInt(5);
- System.out.println("Phoenix (HP:" + m_hp + "/50) does " + m_dmg + " damage");
- if(heal == 1){
- System.out.println("+" + healAmount + " heal!");
- }
- hp -= m_dmg;
- System.out.println(name + " (HP:" + hp + "/" + hpMax + ") does " + dmg + " damage");
- m_hp -= dmg;
- if(phoenixPetEquipped == true && hp < hpMax && healSelf == 1){
- System.out.println(healSelfAmount + "+ heal!");
- hp += healSelfAmount;
- if(hp > hpMax){
- hp = hpMax;
- }
- }
- System.out.println();
- Thread.sleep(1500);
- if(m_hp <= 0){
- fight = false;
- System.out.println("You killed the phoenix\nGained 100 exp\nDrops:\nGold x" + goldDrop);
- if(monsterDrop == 1 && phoenixPet == false){
- System.out.println("Phoenix pet");
- phoenixPet = true;
- }
- gold += goldDrop;
- exp += 100;
- lvlsystem();
- }else if(hp <= 0){
- fight = false;
- System.out.println("\nYou died!");
- System.out.println("Lost some gold.");
- gold *= 0.5;
- hp = hpMax;
- home();
- }else if(hp <= 0 && m_hp <= 0){
- fight = false;
- System.out.println("\nYou died!");
- System.out.println("Lost some gold.");
- gold *= 0.5;
- hp = hpMax;
- home();
- }
- }
- }
- public static void toSkyIsland() throws InterruptedException{
- System.out.println("You see a sign and a boat.");
- System.out.println("Options: [R]ead, R[i]de, [S]outh");
- option = i.nextLine().toLowerCase();
- while(area == true){
- if(option.equals("r")){
- System.out.println("\nYou read the sign, it says:");
- System.out.println("\"Ride the boat to the dragon island\"");
- option = i.nextLine().toLowerCase();
- }else if(option.equals("i")){
- System.out.println("\nYou ride the boat...");
- Thread.sleep(1500);
- whiteShark();
- dragonIsland();
- }else if(option.equals("s")){
- System.out.println("\nYou went south.");
- dragonWorld2();
- }else{
- option = i.nextLine().toLowerCase();
- }
- }
- }
- public static void whiteShark() throws InterruptedException{
- fight = true;
- m_hp = 80;
- System.out.println(mons[9]);
- while(fight == true){
- m_dmg = r.nextInt(10);
- goldDrop = 25+r.nextInt(150);
- monsterDrop = 1+r.nextInt(15);
- dmg = r.nextInt(str);
- dmg *= 0.5;
- healSelf = 1+r.nextInt(3);
- healSelfAmount = 1+r.nextInt(5);
- System.out.println("White shark (HP:" + m_hp + "/75) does " + m_dmg + " damage");
- hp -= m_dmg;
- System.out.println(name + " (HP:" + hp + "/" + hpMax + ") does " + dmg + " damage");
- m_hp -= dmg;
- if(phoenixPetEquipped == true && hp < hpMax && healSelf == 1){
- System.out.println(healSelfAmount + "+ heal!");
- hp += healSelfAmount;
- if(hp > hpMax){
- hp = hpMax;
- }
- }
- System.out.println();
- Thread.sleep(1500);
- if(m_hp <= 0){
- fight = false;
- System.out.println("You killed the white shark\nGained 120 exp\nDrops:\nGold x" + goldDrop);
- gold += goldDrop;
- exp += 120;
- lvlsystem();
- }else if(hp <= 0){
- fight = false;
- System.out.println("\nYou died!");
- System.out.println("Lost some gold.");
- gold *= 0.5;
- hp = hpMax;
- home();
- }else if(hp <= 0 && m_hp <= 0){
- fight = false;
- System.out.println("\nYou died!");
- System.out.println("Lost some gold.");
- gold *= 0.5;
- hp = hpMax;
- home();
- }
- }
- }
- public static void dragonIsland() throws InterruptedException{
- System.out.println("\nYou are in the dragon island");
- System.out.println("You see a sign and a boat.");
- System.out.println("Options: [R]ead, R[i]de, [N]orth, [E]ast");
- option = i.nextLine().toLowerCase();
- while(area == true){
- if(option.equals("i")){
- System.out.println("\nYou ride the boat back...");
- Thread.sleep(1500);
- whiteShark();
- toSkyIsland();
- }else if(option.equals("r")){
- System.out.println("\nYou read the sign, it says:");
- System.out.println("\"Welcome to the dragon island\"");
- option = i.nextLine().toLowerCase();
- }else if(option.equals("e")){
- System.out.println("\nYou went east.");
- System.out.println("\nYou are in the dragon island.");
- System.out.println("You see a cave and a warning sign.");
- System.out.println("Options: [R]ead, [E]nter, [W]est");
- option = i.nextLine().toLowerCase();
- while(area == true){
- if(option.equals("r")){
- System.out.println("\nYou read the sign, it says:");
- System.out.println("\"Beware! Baby dragons!\"");
- option = i.nextLine().toLowerCase();
- }else if(option.equals("e")){
- System.out.println("\nYou enter the cave...");
- dragonCave();
- }else if(option.equals("w")){
- System.out.println("\nYou went west.");
- dragonIsland();
- }else{
- option = i.nextLine().toLowerCase();
- }
- }
- }else if(option.equals("n")){
- System.out.println("\nYou went north.");
- System.out.println("\nYou are in the dragon island.");
- System.out.println("You see an old man.");
- System.out.println("Options: [T]alk, [F]ly, [S]outh");
- option = i.nextLine().toLowerCase();
- while(area == true){
- if(option.equals("t")){
- System.out.println("\nOld Man: See that island above us? That's the Sky Island.");
- System.out.println("Old Man: I hear the dragon is up there...");
- System.out.println("Old Man: There's no way to get up there, unless you can fly. HAHAHA!");
- option = i.nextLine().toLowerCase();
- }else if(option.equals("f")){
- if(dragonWings == true && dragonWingsEquipped == true){
- System.out.println("\nYou fly upwards...");
- Thread.sleep(1500);
- skyIsland();
- }else{
- System.out.println("\n..How am I going to fly?");
- option = i.nextLine().toLowerCase();
- }
- }else if(option.equals("s")){
- System.out.println("\nYou went south.");
- dragonIsland();
- }else{
- option = i.nextLine().toLowerCase();
- }
- }
- }else{
- option = i.nextLine().toLowerCase();
- }
- }
- }
- public static void skyIsland() throws InterruptedException{
- System.out.println("\nYou arrive at the Sky Island.");
- System.out.println("You see a huge dragon in front of you.");
- System.out.println("Options: [F]ight, [L]eave");
- option = i.nextLine().toLowerCase();
- while(area == true){
- if(option.equals("f")){
- System.out.println("\nYou charge the dragon...");
- Thread.sleep(1500);
- dragon();
- }else if(option.equals("l")){
- System.out.println("\nYou fly back down...");
- Thread.sleep(1500);
- dragonIsland();
- }else{
- option = i.nextLine().toLowerCase();
- }
- }
- }
- public static void dragonCave() throws InterruptedException{
- System.out.println("\nYou are in the dragon cave.");
- System.out.println("Options: [E]xit, [N]orth, [S]outh");
- option = i.nextLine().toLowerCase();
- while(area == true){
- if(option.equals("e")){
- babyDragon();
- System.out.println("\nYou exit the dragon cave...");
- dragonIsland();
- }else if(option.equals("n")){
- babyDragon();
- System.out.println("\nYou went north.");
- System.out.println("You are in the dragon cave.");
- System.out.println("Options: [S]outh");
- while(area == true){
- if(option.equals("s")){
- babyDragon();
- System.out.println("\nYou went south.");
- dragonCave();
- }
- }
- }else if(option.equals("s")){
- babyDragon();
- System.out.println("\nYou went south.");
- System.out.println("You are in the dragon cave.");
- System.out.println("Options: [N]orth");
- option = i.nextLine().toLowerCase();
- while(area == true){
- if(option.equals("n")){
- babyDragon();
- System.out.println("\nYou went north.");
- dragonCave();
- }else{
- option = i.nextLine().toLowerCase();
- }
- }
- }else{
- option = i.nextLine().toLowerCase();
- }
- }
- }
- public static void babyDragon() throws InterruptedException{
- fight = true;
- m_hp = 100;
- System.out.println(mons[10]);
- while(fight == true){
- m_dmg = r.nextInt(10);
- goldDrop = 25+r.nextInt(250);
- monsterDrop = 1+r.nextInt(15);
- dmg = r.nextInt(str);
- dmg *= 0.5;
- healSelf = 1+r.nextInt(3);
- healSelfAmount = 1+r.nextInt(5);
- System.out.println("Baby dragon (HP:" + m_hp + "/100) does " + m_dmg + " damage");
- hp -= m_dmg;
- System.out.println(name + " (HP:" + hp + "/" + hpMax + ") does " + dmg + " damage");
- m_hp -= dmg;
- if(phoenixPetEquipped == true && hp < hpMax && healSelf == 1){
- System.out.println(healSelfAmount + "+ heal!");
- hp += healSelfAmount;
- if(hp > hpMax){
- hp = hpMax;
- }
- }
- System.out.println();
- Thread.sleep(1500);
- if(m_hp <= 0){
- fight = false;
- System.out.println("You killed the baby dragon\nGained 180 exp\nDrops:\nGold x" + goldDrop);
- gold += goldDrop;
- exp += 180;
- if(monsterDrop == 1 && dragonWings == false){
- dragonWings = true;
- System.out.println("Dragon wings");
- }
- if(monsterDrop == 2 && dragonPants == false){
- dragonPants = true;
- System.out.println("Dragon pants");
- }
- if(monsterDrop == 3 && dragonBody == false){
- dragonBody = true;
- System.out.println("Dragon body");
- }
- lvlsystem();
- }else if(hp <= 0){
- fight = false;
- System.out.println("\nYou died!");
- System.out.println("Lost some gold.");
- gold *= 0.5;
- hp = hpMax;
- home();
- }else if(hp <= 0 && m_hp <= 0){
- fight = false;
- System.out.println("\nYou died!");
- System.out.println("Lost some gold.");
- gold *= 0.5;
- hp = hpMax;
- home();
- }
- }
- }
- public static void magicForest() throws InterruptedException{
- System.out.println("\nYou are in the magic forest.");
- System.out.println("Options: [W]est, [E]ast, [N]orth, [S]outh");
- option = i.nextLine().toLowerCase();
- while(area == true){
- if(option.equals("w")){
- magicForestMonsters();
- System.out.println("\nYou went west.");
- dragonWorld();
- }else if(option.equals("e")){
- magicForestMonsters();
- System.out.println("\nYou went east.");
- System.out.println("You are in the magic forest.");
- System.out.println("Options: [W]est");
- option = i.nextLine().toLowerCase();
- while(area == true){
- if(option.equals("w")){
- magicForestMonsters();
- System.out.println("\nYou went west.");
- magicForest();
- }else{
- option = i.nextLine().toLowerCase();
- }
- }
- }else if(option.equals("n")){
- magicForestMonsters();
- System.out.println("\nYou went north.");
- System.out.println("You are in the magic forest.");
- System.out.println("Options: [S]outh");
- option = i.nextLine().toLowerCase();
- while(area == true){
- if(option.equals("s")){
- magicForestMonsters();
- System.out.println("\nYou went south.");
- magicForest();
- }else{
- option = i.nextLine().toLowerCase();
- }
- }
- }else if(option.equals("s")){
- magicForestMonsters();
- System.out.println("\nYou went south.");
- System.out.println("You are in the magic forest.");
- System.out.println("Options: [N]orth");
- option = i.nextLine().toLowerCase();
- while(area == true){
- if(option.equals("n")){
- magicForestMonsters();
- System.out.println("\nYou went north.");
- magicForest();
- }else{
- option = i.nextLine().toLowerCase();
- }
- }
- }else{
- option = i.nextLine().toLowerCase();
- }
- }
- }
- public static void magicForestMonsters() throws InterruptedException{
- int mfm = 1+r.nextInt(5);
- if(mfm == 1){
- unicorn();
- }else if(mfm == 2){
- treeMonster();
- }else if(mfm == 3){
- phoenix();
- }
- }
- public static void dragon() throws InterruptedException{
- fight = true;
- m_hp = 350;
- int attStyle;
- System.out.println(mons[11]);
- while(fight == true){
- m_dmg = r.nextInt(15);
- dmg = r.nextInt(str);
- dmg *= 0.5;
- healSelf = 1+r.nextInt(3);
- healSelfAmount = 1+r.nextInt(5);
- attStyle = 1+r.nextInt(4);
- fireBreath = 5+r.nextInt(10);
- tailWhip = 3+r.nextInt(5);
- System.out.println("Dragon (HP:" + m_hp + "/350) does " + m_dmg + " damage");
- if(attStyle == 1){
- System.out.println("+" + fireBreath + " fire breath damage!");
- hp -= fireBreath;
- }else if(attStyle == 2){
- System.out.println("+" + tailWhip + " tail whip damage!");
- hp -= tailWhip;
- }
- hp -= m_dmg;
- System.out.println(name + " (HP:" + hp + "/" + hpMax + ") does " + dmg + " damage");
- m_hp -= dmg;
- if(phoenixPetEquipped == true && hp < hpMax && healSelf == 1){
- System.out.println(healSelfAmount + "+ heal!");
- hp += healSelfAmount;
- if(hp > hpMax){
- hp = hpMax;
- }
- }
- System.out.println();
- Thread.sleep(1500);
- if(m_hp <= 0){
- fight = false;
- System.out.println("\nYou defeat the dragon...");
- Thread.sleep(2500);
- System.out.println("\nYou finally had your revenge...");
- Thread.sleep(2500);
- System.out.println("\nYour quest is finally over...");
- Thread.sleep(2500);
- System.out.println("\nYou're now known as...");
- Thread.sleep(2500);
- System.out.println("\n" + name + " the DragonSlayer...");
- Thread.sleep(2500);
- System.out.println("\nThe one and only DragonSlayer...");
- Thread.sleep(2500);
- System.out.println("\nEnd");
- Thread.sleep(2500);
- area = false;
- }else if(hp <= 0){
- fight = false;
- System.out.println("\nYou died!");
- System.out.println("Lost some gold.");
- gold *= 0.5;
- hp = hpMax;
- home();
- }else if(hp <= 0 && m_hp <= 0){
- fight = false;
- System.out.println("\nYou died!");
- System.out.println("Lost some gold.");
- gold *= 0.5;
- hp = hpMax;
- home();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment