+ Reply to Thread
Results 1 to 11 of 11

Thread: Worst coding ever (long)     submit to reddit submit to twitter

  1. #1
    Relic Weapons
    Join Date
    Jan 2006
    Posts
    335
    BG Level
    4

    Worst coding ever (long)

    [i]// ************************************************** **************
    // Richter.java
    //
    // Version 0.3
    // By ****** *****
    // 12/03 - 1/03
    // ************************************************** **************
    import cs1.Keyboard;
    import java.util.Random;
    /*Start: Class--------------------------------------------------------------------------------------------*/
    public class Richter
    {
    /*Start: PSVM(S[]A)---------------------------------------------------------------------------------------*/
    public static void main(String[] args)
    {
    /*Assigning Variables-------------------------------------------------------------------------------------*/
    String battlechoice = "null"; //Represents choice in battle
    String buychoice = "null"; //Represents choice for buying something at xp store
    String churchstring = "null"; //Represents choice for the church
    String correctchoice = "null"; //Represents choice to confirm original choices
    String enemy = "null"; //name of enemy for battle purpouses
    String eqparmr = "Fists"; //Used to print equipped armor
    String eqpwpn = "Fists"; //Used to print equipped weapon
    String gender = "null"; //Represents the option for character's gender
    String itemchoice = "null";
    String itemuse = "null"; //choice for choosing items in battle
    String mainchoice = "null"; //Choice at the main menu
    String name = "null"; //Stores your name
    String nameconfirm = "null"; //confirms selection of name
    String okprompt = "null"; //governs ok prompts
    String open = "null"; //Represents the option at the opening screen
    String race = "null"; //Represents the option for choosing race
    String skilluse = "null"; //choice for choosing skills in battle
    String spelluse = "null"; //choice for choosing spells in battle
    String whereto = "null"; //Represents the option for choosing adventuring area
    String xpchoice = "null"; //Represents option at the exp store
    int adv = 2; //governs adventure forth loop
    int agility = 0; //Character's agility
    int agicost = 100; //cost for agility
    int agilityplus = 0; //how much agility raises at level up
    int agiX = 0; //Represents the purchased AGI +1 exp packs
    int area2 = 1; //Area int for the hills, 1 = not opened, 2 = opened
    int area3 = 1; //Area int for the deep valley, 1 = not opened, 2 = opened
    int area4 = 1; //Area int for the darkness cave, 1 = not opened, 2 = opened
    int area5 = 1; //Area int for the richter's srine, 1 = not opened, 2 = opened
    int battle = 2; //determines whether or not to enter battle
    int battleloop = 1; //governs first battleloop
    int benchmark = 0; //Governs who goes when during battles
    int bmgcost = 100; //cost for Battle Mage Level
    int bmgspl1 = 0; //All of these are the ints used to represent the
    int bmgspl2 = 0; //battlemage spells. 0 means that the character does
    int bmgspl3 = 0; //not know the spell, once they have the correct BMG
    int bmgspl4 = 0; //level to learn the spell, change it to a 1, and once
    int bmgspl5 = 0; //they learn it, it becomes a 2
    int bmgspl6 = 0;
    int bmgspl7 = 0;
    int bmgspl8 = 0;
    int bmgspl9 = 0;
    int bmgspl10 = 0;
    int bmglvl = 0; //Character's Battle Mage level
    int church = 0; //church loop
    int concost = 100; //cost for constitution
    int connorm = 0; //used to redetermine constitution for defend
    int conres = 0; //damage resisted by constitution
    int constitution = 0; //Character's constitution
    int constitutionplus = 0; //how much constitution raises at level up
    int curhp = 0; //Character's current HP
    int curmp = 0; //Character's current MP
    int dexcost = 100; //cost for dexterity
    int dexterity = 0; //Character's dexterity
    int dexterityplus = 0; //how much dexterity raises at level up
    int dmg = 0; //damage dealt before conres
    int economy = 1; //determines the healing price at the church
    int economycd = 3; //the value for the three free heals
    int enmagi = 0;
    int enmcon = 0;
    int enmcurhp = 0;
    int enmcurmp = 0;
    int enmdangerhp = 0;
    int enmdex = 0;
    int enmexp = 0;
    int enmgold = 0;
    int enmgold2 = 0;
    int enmhalfhp = 0;
    int enmhp = 0;
    int enmmp = 0;
    int enmspd = 0;
    int enmstr = 0;
    int enmwis = 0;
    int enmxp = 0;
    int escapechance = 0; //uh, chance to escape
    int exp = 0; //Character's current XP
    int expgain = 0; //Character's gained exp
    int exploop = 2; //governs xp while loop
    int fgtcost = 100; //cost for Fighter Level
    int fgtskl1 = 0;
    int fgtskl1u = 0;
    int fgtskl2 = 0;
    int fgtskl2u = 0;
    int fgtskl3 = 0;
    int fgtskl3u = 0;
    int fgtskl4 = 0;
    int fgtskl4u = 0;
    int fgtlvl = 0; //Character's Fighter level
    int flp = 0; //full potion, if 1, char owns at least one
    int flpnum = 0; //number of potions char owns
    int flt = 0; //full tonic, if 1, char owns at least one
    int fltnum = 0; //number of full tonics char owns
    int genderC = 2; //governs while statement
    int genderS = 0; //stores actual gender, 1 = male, 2 = female
    int genstats = 1; //governs stats if statement
    int goblinknife = 0; //int for goblin knife
    int gold = 0; //Character's current gold
    int goldgain = 0; //Character's gold gained
    int healamt = 0; //how much the character wishes to be healed
    int hip = 0; //high potion, if 1, char owns at least one
    int hipnum = 0; //number of potions char owns
    int hit = 0; //high tonic, if 1, char owns at least one
    int hitnum = 0; //number of high tonics char owns
    int howmany = 0; //how many of an item char wants
    int hp = 0; //Character's hp
    int hpplus = 0; //how much hp raises at level up
    int hpcost = 100; //cost for hp
    int hrp = 0; //higher potion, if 1, char owns at least one
    int hrt = 0; //higher tonic, if 1, char owns at least one
    int hrtnum = 0; //number of higher tonics char owns
    int hrpnum = 0; //number of potions char own
    int itemshop = 1; //governs while loop for the item shop
    int length = 0; //length of name
    int mainC = 2; //governs while statement
    int missChance = 0; //value of missChance in battles
    int mdwadv = 0; //Meadow adventure happenings
    int mdwevn = 1; //Meadow Event, if 1 will show the opening to the meadow
    int mp = 0; //Character's mp
    int mpplus = 0; //how much mp raises at level up
    int mpcost = 100; //cost for mp
    int nameC = 2; //governs while statement
    int nameConfirm = 0; //confirms selection of name
    int openC = 2; //governs while statement
    int pot = 0; //potion, if 1, char owns at least one
    int potnum = 0; //number of potions char owns
    int raceS = 0; //stores actual race, 1 = human
    int raceC = 2; //governs while statement
    int rwpnstr = 1; //Random strength of equipped weapon
    int rwpnstr2 = 1; //the second way of making sure you don't deal no damage
    int speed = 0; //compared against benchmark to see who goes first
    int stp = 0; //strong potion, if 1, char owns at least one
    int stpnum = 0; //number of potions char owns
    int strcost = 100; //cost for strength
    int strength = 0; //Character's strength
    int strengthplus = 0; //how much strength raises at level up
    int stt = 0; //strong tonic, if 1, char owns at least one
    int sttnum = 0; //number of strong tonics char owns
    int thfcost = 100; //cost for Thief Level
    int thflvl = 0; //Character's Theif Level
    int thfskl1 = 0;
    int thfskl1u = 0;
    int thfskl2 = 0;
    int thfskl2u = 0;
    int thfskl3 = 0;
    int thfskl3u = 0;
    int thfskl4 = 0;
    int thfskl4u = 0;
    int ttllvl = 0;
    int toHit = 0; //value of toHit in battles
    int ton = 0; //tonic, if 1, char owns at least one
    int tonnum = 0; //number of tonics char owns
    int ttldmg = 0; //total damage integer
    int wiscost = 100; //cost for wisdom
    int wisdom = 0; //Character's wisdom
    int wisdomplus = 0; //how much wisdom raises at level up
    int wisres = 0; //how much an enemy deflects with their wisdom!
    int wpnstr = 0; //strength of equipped weapon
    int xpC = 3; //governs while statement
    Random generator = new Random(); //Random roller for stats
    /*End: Assigning Variables--------------------------------------------------------------------------------*/
    /*Start: Welcome Screen-----------------------------------------------------------------------------------*/
    System.out.print((char)27 + "[2J");
    System.out.println("/////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ");
    System.out.println("/// Welcome to Der Richter \\\\\\");
    System.out.println("\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\/////////////////////////");
    System.out.println("\n\n\n\n\n\n\n\n\n\n\n\n");
    System.out.println("{Press any key then enter to continue.}");
    okprompt = Keyboard.readString();
    /*End: Welcome Screen-------------------------------------------------------------------------------------*/
    /*Start: Game Settings------------------------------------------------------------------------------------*/
    do
    {
    System.out.print((char)27 + "[2J");
    System.out.println("/////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ");
    System.out.println("/// Welcome to Der Richter \\\\\\");
    System.out.println("\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\/////////////////////////\n\n\n\n\n\n\n\n");
    System.out.println("Please choose one of the given options.\n");
    System.out.println("What would you like to do?\n");
    System.out.println("1. New Game\n");
    open = Keyboard.readString();
    if (open.equalsIgnoreCase("new game") || open.equals("1"))
    {
    openC = 3;
    }
    }while (!(openC==3));
    /*End: Game Settings--------------------------------------------------------------------------------------*/
    /*Start: Character Creation--------------------------------------------------------------------------------------*/
    do
    {
    System.out.print((char)27 + "[2J");
    System.out.println("/////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ");
    System.out.println("/// Character Creation \\\\\\");
    System.out.println("\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\/////////////////////////");
    //CHOOSING RACE
    System.out.println("\n\n\n\n\n\n\n\n\nPlease choose your race:\n");
    System.out.println("1. Human\n\n");
    race = Keyboard.readString();
    if (race.equalsIgnoreCase("human") || race.equals("1"))
    {
    raceC = 3;
    raceS = 1;
    }
    while (raceC==2)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("/////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ");
    System.out.println("/// Character Creation \\\\\\");
    System.out.println("\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\/////////////////////////");
    System.out.println("\n\n\n\n\n\n\n\n\nPlease choose your race:\n");
    System.out.println("1. Human\n\n");
    race = Keyboard.readString();
    if (race.equalsIgnoreCase("human") || race.equals("1"))
    {
    raceC = 3;
    raceS = 1;
    }
    }
    System.out.print((char)27 + "[2J");
    }while (!(raceC==3));
    // CHOOSING GENDER
    do
    {
    System.out.println("/////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ");
    System.out.println("/// Character Creation \\\\\\");
    System.out.println("\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\/////////////////////////");
    System.out.println("\n\n\n\n\n\n\n\nPlease choose your gender:\n\n");
    System.out.println("1. Male");
    System.out.println("2. Female\n");
    gender = Keyboard.readString();
    if (gender.equalsIgnoreCase("male") || gender.equals("1"))
    {
    genderS = 1;
    genderC = 3;
    }
    if (gender.equalsIgnoreCase("female") || gender.equals("2"))
    {
    genderS = 2;
    genderC = 3;
    }
    } while (genderC==2);
    System.out.print((char)27 + "[2J");
    // CHOOSING NAME
    do
    {
    System.out.print((char)27 + "[2J");
    System.out.println("/////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ");
    System.out.println("/// Character Creation \\\\\\");
    System.out.println("\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\/////////////////////////");
    System.out.println("\n\n\n\n\n\n\n\n\n\n\n\nPlease choose your name (8 characters or less):\n");
    name = Keyboard.readString();
    System.out.print((char)27 + "[2J");
    length = name.length();
    if (length<=8)
    {
    System.out.println("/////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ");
    System.out.println("/// Character Creation \\\\\\");
    System.out.println("\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\/////////////////////////");
    System.out.println("\n\n\n\n\n\n\n\nYour chosen name is: " + name + ".");
    System.out.println("Is this correct?\n");
    System.out.println("1. Yes");
    System.out.println("2. No\n");
    nameconfirm = Keyboard.readString();
    if (nameconfirm.equalsIgnoreCase("yes") || nameconfirm.equals("1"))
    {
    nameC = 3;
    }
    }
    } while (!(nameC==3));
    //ASKS IF OUTPUT IS CORRECT
    System.out.print((char)27 + "[2J");
    System.out.println("/////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ");
    System.out.println("/// Character Creation \\\\\\");
    System.out.println("\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\/////////////////////////");
    System.out.print("\n\n\n\n\n\n\n\n\nYour character is a ");
    if (raceS==1)
    {
    System.out.print("human ");
    }
    if (genderS==1)
    {
    System.out.print("male ");
    }
    if (genderS==2)
    {
    System.out.print("female ");
    }
    System.out.println("named " + name + ".");
    System.out.println("Congratulations, you've made your character!\n\n");
    System.out.println("{Press any key then enter to continue.}");
    okprompt = Keyboard.readString();
    /*End: Character Creation---------------------------------------------------------------------------------*/
    /*Start: Main Console--------------------------------------------------------------------------------------------*/
    while (mainC==2)
    {
    exploop = 2;
    adv = 2;

    if (genstats == 1)
    {
    /*Start: Generates The Stats Here--------------------------------------------------------------------------------*/
    strength = generator.nextInt(3);
    strength += 3;
    dexterity = generator.nextInt(3);
    dexterity += 3;
    agility = generator.nextInt(3);
    agility += 3;
    constitution = generator.nextInt(3);
    constitution += 3;
    wisdom = generator.nextInt(3);
    wisdom += 3;
    hp = generator.nextInt(4);
    hp += 8;
    mp = generator.nextInt(3);
    mp += 3;
    curhp = hp;
    curmp = mp;
    genstats = 2;
    /*End: Generates The Stats Here--------------------------------------------------------------------------*/
    /*Start: Print Stats Out Here------------------------------------------------------------------------------------*/
    System.out.print((char)27 + "[2J");
    System.out.println("/////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ");
    System.out.println("/// Character Creation \\\\\\");
    System.out.println("\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\/////////////////////////\n");
    System.out.println("Your character's statistics are as follows:\n");
    System.out.println("Strength: " + strength);
    System.out.println("Dexterity: " + dexterity);
    System.out.println("Agility: " + agility);
    System.out.println("Constitution: " + constitution);
    System.out.println("Wisdom: " + wisdom);
    System.out.println("HP: " + hp);
    System.out.println("MP: " + mp);
    System.out.println("\n\n\n{Press any key then enter to continue.}");
    okprompt = Keyboard.readString();
    /*End: Print Stats Out Here-------------------------------------------------------------------------------*/
    }
    System.out.print((char)27 + "[2J");
    if (exp > 1500)
    {
    exp = 1500;
    }
    ttllvl = bmglvl + thflvl + fgtlvl;
    church = 2;
    itemshop = 2;
    System.out.println("/////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ");
    System.out.println("/// Main Menu \\\\\\");
    System.out.println("\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\/////////////////////////\n");
    System.out.println("\n\nPlease choose what you would like to do:");
    System.out.println("1. Status");
    System.out.println("2. Equip **/UNDER CONSTRUCTION\\**");
    System.out.println("3. Exp Store");
    System.out.println("4. Adventure Forth **/UNDER CONTSTRUCTION\\**");
    System.out.println("5. Item Shop **/UNDER CONTSTRUCTION\\**");
    System.out.println("6. Weapon Shop **/UNDER CONTSTRUCTION\\**");
    System.out.println("7. Your House **/UNDER CONTSTRUCTION\\**");
    System.out.println("8. Church\n\n");
    mainchoice = Keyboard.readString();
    /*Start: Stat Screen--------------------------------------------------------------------------------------*/
    if (mainchoice.equalsIgnoreCase("status") || mainchoice.equals("1"))
    {
    System.out.print((char)27 + "[2J");
    System.out.println("//////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\");
    System.out.println(" Statistics Screen");
    System.out.println("\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\//////////////////////////////");
    System.out.println("\n" + name + "'s statistics:");
    System.out.println("Fighter Level: " + fgtlvl);
    System.out.println("Thief Level: " + thflvl);
    System.out.println("Battle Mage Level: " + bmglvl);
    System.out.println("HP: " + curhp + "/" + hp);
    System.out.println("MP: " + curmp + "/" + mp);
    System.out.println("Strength: " + strength);
    System.out.println("Dexterity: " + dexterity);
    System.out.println("Agility: " + agility);
    System.out.println("Constition: " + constitution);
    System.out.println("Wisdom: " + wisdom);
    System.out.println("Gold: " + gold);
    System.out.println("Experience: " + exp);
    System.out.println("\n\nHeading to next page, ok?");
    okprompt = Keyboard.readString();
    System.out.print((char)27 + "[2J");
    System.out.println("//////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\");
    System.out.println(" Statistics Screen (Page 2)");
    System.out.println("\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\//////////////////////////////");
    System.out.println("Weapon: " + eqpwpn);
    System.out.println("Armor: " + eqparmr);
    System.out.println("\nKnown Skills and Spells:\n");
    if (bmgspl1==2)
    {System.out.println("Flame Cantrip");}
    if (bmgspl2==2)
    {System.out.println("Blazing Sword");}
    if (bmgspl3==2)
    {System.out.println("Ignite");}
    if (bmgspl4==2)
    {System.out.println("Fireball");}
    if (bmgspl5==2)
    {System.out.println("Magma Blast");}
    if (bmgspl6==2)
    {System.out.println("Demonic Fireball");}
    if (bmgspl7==2)
    {System.out.println("Flame Wave");}
    if (bmgspl8==2)
    {System.out.println("Rain of Meteors");}
    if (bmgspl9==2)
    {System.out.println("Pyre Explosion");}
    if (bmgspl10==2)
    {System.out.println("Pyreball");}
    if (fgtskl1==2)
    {System.out.println("Stab");}
    if (fgtskl2==2)
    {System.out.println("Gravity Bash");}
    if (fgtskl3==2)
    {System.out.println("The Impaler");}
    if (fgtskl4==2)
    {System.out.println("Dual Strike");}
    if (thfskl1==2)
    {System.out.println("Steal");}
    if (thfskl2==2)
    {System.out.println("Rob");}
    if (thfskl3==2)
    {System.out.println("Mug");}
    if (thfskl4==2)
    {System.out.println("Sneak Attack");}
    System.out.println("\n\nReturning to Main Menu, ok?");
    okprompt = Keyboard.readString();
    System.out.print((char)27 + "[2J");
    }
    /*End: Stat Screen----------------------------------------------------------------------------------------*/
    /*Start: EXP Store----------------------------------------------------------------------------------------*/
    /*Start: EXP Store Selection Screen-----------------------------------------------------------------------*/
    if (mainchoice.equalsIgnoreCase("exp store") || mainchoice.equals("3"))
    {
    while (exploop==2)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("//////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\");
    System.out.println(" Experience Store");
    System.out.println("\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\//////////////////////////////");
    System.out.println("Please choose one of the options below by typing the corresponding");
    System.out.println("code. Type exit to leave)");
    System.out.println("\nCurrent Exp: " + exp);
    System.out.println("\nCode Exp Cost Name ");
    System.out.println("AGI " + agicost + " Agility +1");
    if (bmglvl<10)
    {System.out.println("BMG " + bmgcost + " Battle Mage Level "+ (bmglvl+1));}
    if (bmgspl1==1)
    {System.out.println("SP1 100 Spell: Flame Cantrip");}
    if (bmgspl2==1)
    {System.out.println("SP2 200 Spell: Blazing Sword");}
    if (bmgspl3==1)
    {System.out.println("SP3 300 Spell: Ignite");}
    if (bmgspl4==1)
    {System.out.println("SP4 400 Spell: Fireball");}
    if (bmgspl5==1)
    {System.out.println("SP5 500 Spell: Magma Blast");}
    if (bmgspl6==1)
    {System.out.println("SP6 600 Spell: Demonic Fireball");}
    if (bmgspl7==1)
    {System.out.println("SP7 700 Spell: Flame Wave");}
    if (bmgspl8==1)
    {System.out.println("SP8 800 Spell: Rain of Meteors");}
    if (bmgspl9==1)
    {System.out.println("SP9 900 Spell: Pyre Explosion");}
    if (bmgspl10==1)
    {System.out.println("SP10 1000 Spell: Pyreball");}
    System.out.println("CON " + concost + " Constitution +1");
    System.out.println("DEX " + dexcost + " Dexterity +1");
    if (fgtlvl<10)
    {System.out.println("FGT " + fgtcost + " Fighter Level "+ (fgtlvl+1));}
    if (fgtskl1==1)
    {System.out.println("SK1 250 Skill: Stab");}
    if (fgtskl2==1)
    {System.out.println("SK2 500 Skill: Gravity Bash");}
    if (fgtskl3==1)
    {System.out.println("SK3 750 Skill: The Impaler");}
    if (fgtskl4==1)
    {System.out.println("SK4 1000 Skill: Dual Strike");}
    System.out.println("HP " + hpcost + " Hit Points +2");
    System.out.println("MP " + mpcost + " Magic Points +2");
    System.out.println("STR " + strcost + " Strength +1");
    if (thflvl<10)
    {System.out.println("THF " + thfcost + " Thief Level Level "+ (thflvl+1));}
    if (thfskl1==1)
    {System.out.println("SK5 250 Skill: Steal");}
    if (thfskl2==1)
    {System.out.println("SK6 500 Skill: Rob");}
    if (thfskl3==1)
    {System.out.println("SK7 750 Skill: Mug");}
    if (thfskl4==1)
    {System.out.println("SK8 1000 Skill: Sneak Attack");}
    System.out.println("WIS " + wiscost + " Wisdom +1");
    /*End: EXP Store Selection Screen-----------------------------------------------------------------------*/
    xpchoice = "null";
    System.out.println("\n\n");
    xpchoice = Keyboard.readString();
    /*Start: Exit Choice--------------------------------------------------------------------------------*/
    if (xpchoice.equalsIgnoreCase("exit"))
    {
    exploop = 3;
    System.out.print((char)27 + "[2J");
    }
    /*End: Exit Choice--------------------------------------------------------------------------------*/
    /*Start: Agility Choice--------------------------------------------------------------------------------*/
    if (xpchoice.equalsIgnoreCase("agi"))
    {
    System.out.print((char)27 + "[2J");
    System.out.println("Purchase \"Agility +1\", correct? [y/n]");
    buychoice = Keyboard.readString();
    if (buychoice.equalsIgnoreCase("yes"))
    {
    if (exp>=agicost)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("You recieved a +1 increase to your agility!\n\n");
    exp = exp-agicost;
    agility += 1;
    agicost += 100;
    if (agicost>1000)
    {
    agicost = 1000;
    }
    System.out.print("Press any key to continue: ");
    okprompt = Keyboard.readString();
    }
    if (exp<agicost)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("Sorry, you don't have enough exp for that purchase");
    System.out.print("Press any key to continue: ");
    okprompt = Keyboard.readString();
    }
    }
    }
    /*End: Agility Choice----------------------------------------------------------------------------------*/
    /*Start: Battle Mage Level Up--------------------------------------------------------------------------*/
    if (xpchoice.equalsIgnoreCase("bmg"))
    {
    if (bmglvl<10)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("Purchase Battle Mage Level " + (bmglvl + 1) + ", correct? [y/n]");
    buychoice = Keyboard.readString();
    if (buychoice.equalsIgnoreCase("yes"))
    {
    if (exp>=bmgcost)
    {
    if (bmglvl==0)
    {bmgspl1 = 1;}
    if (bmglvl==1)
    {bmgspl2 = 1;}
    if (bmglvl==2)
    {bmgspl3 = 1;}
    if (bmglvl==3)
    {bmgspl4 = 1;}
    if (bmglvl==4)
    {bmgspl5 = 1;}
    if (bmglvl==5)
    {bmgspl6 = 1;}
    if (bmglvl==6)
    {bmgspl7 = 1;}
    if (bmglvl==7)
    {bmgspl8 = 1;}
    if (bmglvl==8)
    {bmgspl9 = 1;}
    if (bmglvl==9)
    {bmgspl10 = 1;}
    System.out.print((char)27 + "[2J");
    System.out.println("Your battle mage level increased by 1!\n");
    strengthplus = generator.nextInt(2);
    strength += strengthplus;
    dexterityplus = generator.nextInt(3);
    dexterity += dexterityplus;
    agilityplus = generator.nextInt(3);
    agility += agilityplus;
    constitutionplus = generator.nextInt(2);
    constitution += constitutionplus;
    wisdomplus = generator.nextInt(5);
    wisdom += wisdomplus + 2;
    hpplus = generator.nextInt(4);
    hp += hpplus;
    mpplus = generator.nextInt(3);
    mp += mpplus + 4;
    exp = exp-bmgcost;
    bmgcost += 100;
    bmglvl += 1;
    System.out.println("Your character's stats increased as follows:");
    System.out.println("Strength: " + strengthplus);
    System.out.println("Dexterity: " + dexterityplus);
    System.out.println("Agility: " + agilityplus);
    System.out.println("Constitution: " + constitutionplus);
    System.out.println("Wisdom: " + wisdomplus);
    System.out.println("HP: " + hpplus);
    System.out.println("MP: " + mpplus);
    System.out.print("Press any key to continue: ");
    okprompt = Keyboard.readString();
    }
    if (exp<bmgcost)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("Sorry, you don't have enough exp for that purchase");
    System.out.print("Press any key to continue: ");
    okprompt = Keyboard.readString();
    }
    }
    }
    }
    /*End: Battle Mage Level Up--------------------------------------------------------------------------*/
    /*Start: Battle Mage Spell selection-----------------------------------------------------------------*/
    /*Start: Battle Mage Spell selection Lvl1------------------------------------------------------------*/
    if (xpchoice.equalsIgnoreCase("sp1"))
    {
    if (bmgspl1==1)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("Purchase \"Flame Cantrip\", correct? [y/n]");
    buychoice = Keyboard.readString();
    if (buychoice.equalsIgnoreCase("yes"))
    {
    if (exp>=100)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("You learned Flame Cantrip!\n\n");
    exp = exp-100;
    bmgspl1 = 2;
    System.out.print("Press any key to continue: ");
    okprompt = Keyboard.readString();
    }
    if (exp<100)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("Sorry, you don't have enough exp for that purchase");
    System.out.print("Press any key to continue: ");
    okprompt = Keyboard.readString();
    }
    }
    }
    }
    /*End: Battle Mage Spell selection Lvl1--------------------------------------------------------------*/
    /*Start: Battle Mage Spell selection Lvl2------------------------------------------------------------*/
    if (xpchoice.equalsIgnoreCase("sp2"))
    {
    if (bmgspl2==1)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("Purchase \"Blazing Sword\", correct? [y/n]");
    buychoice = Keyboard.readString();
    if (buychoice.equalsIgnoreCase("yes"))
    {
    if (exp>=200)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("You learned Blazing Sword!\n\n");
    exp = exp-200;
    bmgspl2 = 2;
    System.out.print("Press any key to continue: ");
    okprompt = Keyboard.readString();
    }
    if (exp<200)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("Sorry, you don't have enough exp for that purchase");
    System.out.print("Press any key to continue: ");
    okprompt = Keyboard.readString();
    }
    }
    }
    }
    /*End: Battle Mage Spell selection Lvl2--------------------------------------------------------------*/
    /*Start: Battle Mage Spell selection Lvl3------------------------------------------------------------*/
    if (xpchoice.equalsIgnoreCase("sp3"))
    {
    if (bmgspl3==1)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("Purchase \"Ignite\", correct? [y/n]");
    buychoice = Keyboard.readString();
    if (buychoice.equalsIgnoreCase("yes"))
    {
    if (exp>=300)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("You learned Ignite!\n\n");
    exp = exp-300;
    bmgspl3 = 2;
    System.out.print("Press any key to continue: ");
    okprompt = Keyboard.readString();
    }
    if (exp<300)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("Sorry, you don't have enough exp for that purchase");
    System.out.print("Press any key to continue: ");
    okprompt = Keyboard.readString();
    }
    }
    }
    }
    /*End: Battle Mage Spell selection Lvl3--------------------------------------------------------------*/
    /*Start: Battle Mage Spell selection Lvl4------------------------------------------------------------*/
    if (xpchoice.equalsIgnoreCase("sp4"))
    {
    if (bmgspl4==1)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("Purchase \"Fireball\", correct? [y/n]");
    buychoice = Keyboard.readString();
    if (buychoice.equalsIgnoreCase("yes"))
    {
    if (exp>=400)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("You learned Blazing Sword!\n\n");
    exp = exp-400;
    bmgspl4 = 2;
    System.out.print("Press any key to continue: ");
    okprompt = Keyboard.readString();
    }
    if (exp<400)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("Sorry, you don't have enough exp for that purchase");
    System.out.print("Press any key to continue: ");
    okprompt = Keyboard.readString();
    }
    }
    }
    }
    /*End: Battle Mage Spell selection Lvl4--------------------------------------------------------------*/
    /*Start: Battle Mage Spell selection Lvl5------------------------------------------------------------*/
    if (xpchoice.equalsIgnoreCase("sp5"))
    {
    if (bmgspl5==1)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("Purchase \"Magma Blast\", correct? [y/n]");
    buychoice = Keyboard.readString();
    if (buychoice.equalsIgnoreCase("yes"))
    {
    if (exp>=500)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("You learned Magma Blast!\n\n");
    exp = exp-500;
    bmgspl5 = 2;
    System.out.print("Press any key to continue: ");
    okprompt = Keyboard.readString();
    }
    if (exp<500)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("Sorry, you don't have enough exp for that purchase");
    System.out.print("Press any key to continue: ");
    okprompt = Keyboard.readString();
    }
    }
    }
    }
    /*End: Battle Mage Spell selection Lvl5--------------------------------------------------------------*/
    /*Start: Battle Mage Spell selection Lvl6------------------------------------------------------------*/
    if (xpchoice.equalsIgnoreCase("sp6"))
    {
    if (bmgspl6==1)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("Purchase \"Demonic Fireball\", correct? [y/n]");
    buychoice = Keyboard.readString();
    if (buychoice.equalsIgnoreCase("yes"))
    {
    if (exp>=600)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("You learned Demonic Fireball!\n\n");
    exp = exp-600;
    bmgspl6 = 2;
    System.out.print("Press any key to continue: ");
    okprompt = Keyboard.readString();
    }
    if (exp<600)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("Sorry, you don't have enough exp for that purchase");
    System.out.print("Press any key to continue: ");
    okprompt = Keyboard.readString();
    }
    }
    }
    }
    /*End: Battle Mage Spell selection Lvl6--------------------------------------------------------------*/
    /*Start: Battle Mage Spell selection Lvl7------------------------------------------------------------*/
    if (xpchoice.equalsIgnoreCase("sp7"))
    {
    if (bmgspl7==1)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("Purchase \"Flame Wave\", correct? [y/n]");
    buychoice = Keyboard.readString();
    if (buychoice.equalsIgnoreCase("yes"))
    {
    if (exp>=700)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("You learned Flame Wave!\n\n");
    exp = exp-700;
    bmgspl7 = 2;
    System.out.print("Press any key to continue: ");
    okprompt = Keyboard.readString();
    }
    if (exp<700)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("Sorry, you don't have enough exp for that purchase");
    System.out.print("Press any key to continue: ");
    okprompt = Keyboard.readString();
    }
    }
    }
    }
    /*End: Battle Mage Spell selection Lvl7--------------------------------------------------------------*/
    /*Start: Battle Mage Spell selection Lvl8------------------------------------------------------------*/
    if (xpchoice.equalsIgnoreCase("sp8"))
    {
    if (bmgspl8==1)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("Purchase \"Rain of Meteors\", correct? [y/n]");
    buychoice = Keyboard.readString();
    if (buychoice.equalsIgnoreCase("yes"))
    {
    if (exp>=800)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("You learned Flame Wave!\n\n");
    exp = exp-800;
    bmgspl8 = 2;
    System.out.print("Press any key to continue: ");
    okprompt = Keyboard.readString();
    }
    if (exp<800)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("Sorry, you don't have enough exp for that purchase");
    System.out.print("Press any key to continue: ");
    okprompt = Keyboard.readString();
    }
    }
    }
    }
    /*End: Battle Mage Spell selection Lvl8--------------------------------------------------------------*/
    /*Start: Battle Mage Spell selection Lvl9------------------------------------------------------------*/
    if (xpchoice.equalsIgnoreCase("sp9"))
    {
    if (bmgspl9==1)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("Purchase \"Pyre Explosion\", correct? [y/n]");
    buychoice = Keyboard.readString();
    if (buychoice.equalsIgnoreCase("yes"))
    {
    if (exp>=900)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("You learned Pyre Explosion!\n\n");
    exp = exp-900;
    bmgspl9 = 2;
    System.out.print("Press any key to continue: ");
    okprompt = Keyboard.readString();
    }
    if (exp<900)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("Sorry, you don't have enough exp for that purchase");
    System.out.print("Press any key to continue: ");
    okprompt = Keyboard.readString();
    }
    }
    }
    }
    /*End: Battle Mage Spell selection Lvl9--------------------------------------------------------------*/
    /*Start: Battle Mage Spell selection Lvl10-----------------------------------------------------------*/
    if (xpchoice.equalsIgnoreCase("sp10"))
    {
    if (bmgspl10==1)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("Purchase \"Pyreball\", correct? [y/n]");
    buychoice = Keyboard.readString();
    if (buychoice.equalsIgnoreCase("yes"))
    {
    if (exp>=1000)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("You learned Pyre Explosion!\n\n");
    exp = exp-1000;
    bmgspl10 = 2;
    System.out.print("Press any key to continue: ");
    okprompt = Keyboard.readString();
    }
    if (exp<1000)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("Sorry, you don't have enough exp for that purchase");
    System.out.print("Press any key to continue: ");
    okprompt = Keyboard.readString();
    }
    }
    }
    }
    /*End: Battle Mage Spell selection Lvl10--------------------------------------------------------------*/
    /*Start: Constitution Choice--------------------------------------------------------------------------*/
    if (xpchoice.equalsIgnoreCase("con"))
    {
    System.out.print((char)27 + "[2J");
    System.out.println("Purchase \"Constitution +1\", correct? [y/n]");
    buychoice = Keyboard.readString();
    if (buychoice.equalsIgnoreCase("yes"))
    {
    if (exp>=concost)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("You recieved a +1 increase to your constitution!\n\n");
    exp = exp-concost;
    constitution += 1;
    concost += 100;
    if (concost>1000)
    {
    concost = 1000;
    }
    System.out.print("Press any key to continue: ");
    okprompt = Keyboard.readString();
    }
    if (exp<concost)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("Sorry, you don't have enough exp for that purchase");
    System.out.print("Press any key to continue: ");
    okprompt = Keyboard.readString();
    }
    }
    }
    /*End: Constitution Choice----------------------------------------------------------------------------*/
    /*Start: Dexterity Choice----------------------------------------------------------------------------*/
    if (xpchoice.equalsIgnoreCase("dex"))
    {
    System.out.print((char)27 + "[2J");
    System.out.println("Purchase \"Dexterity +1\", correct? [y/n]");
    buychoice = Keyboard.readString();
    if (buychoice.equalsIgnoreCase("yes"))
    {
    if (exp>=dexcost)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("You recieved a +1 increase to your dexterity!\n\n");
    exp = exp-dexcost;
    dexterity += 1;
    dexcost += 100;
    if (dexcost>1000)
    {
    dexcost = 1000;
    }
    System.out.print("Press any key to continue: ");
    okprompt = Keyboard.readString();
    }
    if (exp<dexcost)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("Sorry, you don't have enough exp for that purchase");
    System.out.print("Press any key to continue: ");
    okprompt = Keyboard.readString();
    }
    }
    }
    /*End: Dexterity Choice-------------------------------------------------------------------------------------*/
    /*Start: Fighter Level up Choice----------------------------------------------------------------------------*/
    if (xpchoice.equalsIgnoreCase("fgt"))
    {
    if (fgtlvl<10)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("Purchase Fighter Level " + (fgtlvl + 1) + ", correct? [y/n]");
    buychoice = Keyboard.readString();
    if (buychoice.equalsIgnoreCase("yes"))
    {
    if (exp>=fgtcost)
    {
    if (fgtlvl==2)
    {fgtskl1 = 1;}
    if (fgtlvl==4)
    {fgtskl2 = 1;}
    if (fgtlvl==6)
    {fgtskl3 = 1;}
    if (fgtlvl==8)
    {fgtskl4 = 1;}
    System.out.print((char)27 + "[2J");
    System.out.println("Your fighter level increased by 1!\n");
    strengthplus = generator.nextInt(3) + 3;
    strength += strengthplus;
    dexterityplus = generator.nextInt(3);
    dexterity += dexterityplus;
    agilityplus = generator.nextInt(3) + 1;
    agility += agilityplus;
    constitutionplus = generator.nextInt(3) + 1;
    constitution += constitutionplus;
    wisdomplus = generator.nextInt(3);
    wisdom += wisdomplus;
    hpplus = generator.nextInt(4) + 2;
    hp += hpplus;
    mpplus = generator.nextInt(3);
    mp += mpplus;
    exp = exp-fgtcost;
    fgtcost += 100;
    fgtlvl += 1;
    System.out.println("Your character's stats increased as follows:");
    System.out.println("Strength: " + strengthplus);
    System.out.println("Dexterity: " + dexterityplus);
    System.out.println("Agility: " + agilityplus);
    System.out.println("Constitution: " + constitutionplus);
    System.out.println("Wisdom: " + wisdomplus);
    System.out.println("HP: " + hpplus);
    System.out.println("MP: " + mpplus);
    System.out.print("Press any key to continue: ");
    okprompt = Keyboard.readString();
    }
    if (exp<fgtcost)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("Sorry, you don't have enough exp for that purchase");
    System.out.print("Press any key to continue: ");
    okprompt = Keyboard.readString();
    }
    }
    }
    }
    /*End: Fighter Level up Choice----------------------------------------------------------------------------*/
    /*Start: Fighter Skill selection Lvl1------------------------------------------------------------*/
    if (xpchoice.equalsIgnoreCase("sk1"))
    {
    if (fgtskl1==1)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("Purchase \"Stab\", correct? [y/n]");
    buychoice = Keyboard.readString();
    if (buychoice.equalsIgnoreCase("yes"))
    {
    if (exp>=250)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("You learned Stab!\n\n");
    exp = exp-250;
    fgtskl1 = 2;
    System.out.print("Press any key to continue: ");
    okprompt = Keyboard.readString();
    }
    if (exp<250)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("Sorry, you don't have enough exp for that purchase");
    System.out.print("Press any key to continue: ");
    okprompt = Keyboard.readString();
    }
    }
    }
    }
    /*End: Fighter Skill selection Lvl1--------------------------------------------------------------*/
    /*Start: Fighter skill selection Lvl2------------------------------------------------------------*/
    if (xpchoice.equalsIgnoreCase("sk2"))
    {
    if (fgtskl2==1)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("Purchase \"Gravity Bash\", correct? [y/n]");
    buychoice = Keyboard.readString();
    if (buychoice.equalsIgnoreCase("yes"))
    {
    if (exp>=500)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("You learned Gravity Bash!\n\n");
    exp = exp-500;
    fgtskl2 = 2;
    System.out.print("Press any key to continue: ");
    okprompt = Keyboard.readString();
    }
    if (exp<500)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("Sorry, you don't have enough exp for that purchase");
    System.out.print("Press any key to continue: ");
    okprompt = Keyboard.readString();
    }
    }
    }
    }
    /*End: Fighter Skill selection Lvl2--------------------------------------------------------------*/
    /*Start: Fighter skill selection Lvl3------------------------------------------------------------*/
    if (xpchoice.equalsIgnoreCase("sk3"))
    {
    if (fgtskl3==1)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("Purchase \"The Impaler\", correct? [y/n]");
    buychoice = Keyboard.readString();
    if (buychoice.equalsIgnoreCase("yes"))
    {
    if (exp>=750)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("You learned The Impaler!\n\n");
    exp = exp-750;
    fgtskl3 = 2;
    System.out.print("Press any key to continue: ");
    okprompt = Keyboard.readString();
    }
    if (exp<750)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("Sorry, you don't have enough exp for that purchase");
    System.out.print("Press any key to continue: ");
    okprompt = Keyboard.readString();
    }
    }
    }
    }
    /*End: Fighter Skill selection Lvl3--------------------------------------------------------------*/
    /*Start: Fighter skill selection Lvl4------------------------------------------------------------*/
    if (xpchoice.equalsIgnoreCase("sk4"))
    {
    if (fgtskl4==1)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("Purchase \"Dual Strike\", correct? [y/n]");
    buychoice = Keyboard.readString();
    if (buychoice.equalsIgnoreCase("yes"))
    {
    if (exp>=1000)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("You learned Dual Strike!\n\n");
    exp = exp-1000;
    fgtskl4 = 2;
    System.out.print("Press any key to continue: ");
    okprompt = Keyboard.readString();
    }
    if (exp<1000)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("Sorry, you don't have enough exp for that purchase");
    System.out.print("Press any key to continue: ");
    okprompt = Keyboard.readString();
    }
    }
    }
    }
    /*End: Fighter Skill selection Lvl4--------------------------------------------------------------*/
    /*Start: HP Choice----------------------------------------------------------------------------*/
    if (xpchoice.equalsIgnoreCase("hp"))
    {
    System.out.print((char)27 + "[2J");
    System.out.println("Purchase \"HP +2\", correct? [y/n]");
    buychoice = Keyboard.readString();
    if (buychoice.equalsIgnoreCase("yes"))
    {
    if (exp>=hpcost)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("You recieved a +2 increase to your hit points!\n\n");
    exp = exp-agicost;
    hp += 2;
    hpcost += 100;
    if (hpcost>1000)
    {
    hpcost = 1000;
    }
    System.out.print("Press any key to continue: ");
    okprompt = Keyboard.readString();
    }
    if (exp<hpcost)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("Sorry, you don't have enough exp for that purchase");
    System.out.print("Press any key to continue: ");
    okprompt = Keyboard.readString();
    }
    }
    }
    /*End: HP Choice-------------------------------------------------------------------------------------*/
    /*Start: MP Choice----------------------------------------------------------------------------*/
    if (xpchoice.equalsIgnoreCase("MP"))
    {
    System.out.print((char)27 + "[2J");
    System.out.println("Purchase \"Magic Points +2\", correct? [y/n]");
    buychoice = Keyboard.readString();
    if (buychoice.equalsIgnoreCase("yes"))
    {
    if (exp>=mpcost)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("You recieved a +2 increase to your magic points!\n\n");
    exp = exp-mpcost;
    mp += 2;
    mpcost += 100;
    if (mpcost>1000)
    {
    mpcost = 1000;
    }
    System.out.print("Press any key to continue: ");
    okprompt = Keyboard.readString();
    }
    if (exp<mpcost)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("Sorry, you don't have enough exp for that purchase");
    System.out.print("Press any key to continue: ");
    okprompt = Keyboard.readString();
    }
    }
    }
    /*End: MP Choice-------------------------------------------------------------------------------------*/
    /*Start: Strength Choice----------------------------------------------------------------------------*/
    if (xpchoice.equalsIgnoreCase("str"))
    {
    System.out.print((char)27 + "[2J");
    System.out.println("Purchase \"Strength +1\", correct? [y/n]");
    buychoice = Keyboard.readString();
    if (buychoice.equalsIgnoreCase("yes"))
    {
    if (exp>=strcost)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("You recieved a +1 increase to your strength!\n\n");
    exp = exp-strcost;
    strength += 1;
    strcost += 100;
    if (strcost>1000)
    {
    strcost = 1000;
    }
    System.out.print("Press any key to continue: ");
    okprompt = Keyboard.readString();
    }
    if (exp<strcost)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("Sorry, you don't have enough exp for that purchase");
    System.out.print("Press any key to continue: ");
    okprompt = Keyboard.readString();
    }
    }
    }
    /*End: Strength Choice-------------------------------------------------------------------------------------*/
    /*Start: Thief Level Up Choice----------------------------------------------------------------------------*/
    if (xpchoice.equalsIgnoreCase("thf"))
    {
    if (thflvl<10)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("Purchase Thief Level " + thflvl+1 + ", correct? [y/n]");
    buychoice = Keyboard.readString();
    if (buychoice.equalsIgnoreCase("yes"))
    {
    if (exp>=thfcost)
    {
    if (thflvl==2)
    {thfskl1 = 1;}
    if (thflvl==4)
    {thfskl2 = 1;}
    if (thflvl==6)
    {thfskl3 = 1;}
    if (thflvl==8)
    {thfskl4 = 1;}
    System.out.print((char)27 + "[2J");
    System.out.println("Your theif level increased by 1!\n");
    strengthplus = generator.nextInt(3);
    strength += strengthplus + 1;
    dexterityplus = generator.nextInt(5);
    dexterity += dexterityplus + 2;
    agilityplus = generator.nextInt(5);
    agility += agilityplus + 2;
    constitutionplus = generator.nextInt(2);
    constitution += constitutionplus;
    wisdomplus = generator.nextInt(2);
    wisdom += wisdomplus;
    hpplus = generator.nextInt(5);
    hp += hpplus + 1;
    mpplus = generator.nextInt(3);
    mp += mpplus;
    exp = exp-thfcost;
    thfcost += 100;
    thflvl += 1;
    System.out.println("Your character's stats increased as follows:");
    System.out.println("Strength: " + strengthplus);
    System.out.println("Dexterity: " + dexterityplus);
    System.out.println("Agility: " + agilityplus);
    System.out.println("Constitution: " + constitutionplus);
    System.out.println("Wisdom: " + wisdomplus);
    System.out.println("HP: " + hpplus);
    System.out.println("MP: " + mpplus);
    System.out.print("Press any key to continue: ");
    okprompt = Keyboard.readString();
    }
    if (exp<thfcost)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("Sorry, you don't have enough exp for that purchase");
    System.out.print("Press any key to continue: ");
    okprompt = Keyboard.readString();
    }
    }
    }
    }
    /*End: Thief Level up Choice----------------------------------------------------------------------------*/
    /*Start: Thief Skill selection Lvl1------------------------------------------------------------*/
    if (xpchoice.equalsIgnoreCase("sk5"))
    {
    if (thfskl1==1)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("Purchase \"Steal\", correct? [y/n]");
    buychoice = Keyboard.readString();
    if (buychoice.equalsIgnoreCase("yes"))
    {
    if (exp>=250)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("You learned Steal!\n\n");
    exp = exp-250;
    thfskl1 = 2;
    System.out.print("Press any key to continue: ");
    okprompt = Keyboard.readString();
    }
    if (exp<250)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("Sorry, you don't have enough exp for that purchase");
    System.out.print("Press any key to continue: ");
    okprompt = Keyboard.readString();
    }
    }
    }
    }
    /*End: Thief Skill selection Lvl1--------------------------------------------------------------*/
    /*Start: Thief skill selection Lvl2------------------------------------------------------------*/
    if (xpchoice.equalsIgnoreCase("sk6"))
    {
    if (fgtskl2==1)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("Purchase \"Rob\", correct? [y/n]");
    buychoice = Keyboard.readString();
    if (buychoice.equalsIgnoreCase("yes"))
    {
    if (exp>=500)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("You learned Rob!\n\n");
    exp = exp-500;
    thfskl2 = 2;
    System.out.print("Press any key to continue: ");
    okprompt = Keyboard.readString();
    }
    if (exp<500)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("Sorry, you don't have enough exp for that purchase");
    System.out.print("Press any key to continue: ");
    okprompt = Keyboard.readString();
    }
    }
    }
    }
    /*End: Thief Skill selection Lvl2--------------------------------------------------------------*/
    /*Start: Thief skill selection Lvl3------------------------------------------------------------*/
    if (xpchoice.equalsIgnoreCase("sk7"))
    {
    if (thfskl3==1)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("Purchase \"Mug\", correct? [y/n]");
    buychoice = Keyboard.readString();
    if (buychoice.equalsIgnoreCase("yes"))
    {
    if (exp>=750)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("You learned Mug!\n\n");
    exp = exp-750;
    fgtskl3 = 2;
    System.out.print("Press any key to continue: ");
    okprompt = Keyboard.readString();
    }
    if (exp<750)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("Sorry, you don't have enough exp for that purchase");
    System.out.print("Press any key to continue: ");
    okprompt = Keyboard.readString();
    }
    }
    }
    }
    /*End: Thief Skill selection Lvl3--------------------------------------------------------------*/
    /*Start: Thief skill selection Lvl4------------------------------------------------------------*/
    if (xpchoice.equalsIgnoreCase("sk8"))
    {
    if (thfskl4==1)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("Purchase \"Sneak Attack\", correct? [y/n]");
    buychoice = Keyboard.readString();
    if (buychoice.equalsIgnoreCase("yes"))
    {
    if (exp>=1000)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("You learned Sneak Attack!\n\n");
    exp = exp-1000;
    thfskl4 = 2;
    System.out.print("Press any key to continue: ");
    okprompt = Keyboard.readString();
    }
    if (exp<1000)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("Sorry, you don't have enough exp for that purchase");
    System.out.print("Press any key to continue: ");
    okprompt = Keyboard.readString();
    }
    }
    }
    }
    /*End: Thief Skill selection Lvl4--------------------------------------------------------------*/
    /*Start: Wisdom Choice----------------------------------------------------------------------------*/
    if (xpchoice.equalsIgnoreCase("wis"))
    {
    System.out.print((char)27 + "[2J");
    System.out.println("Purchase \"Wisdom +1\", correct? [y/n]");
    buychoice = Keyboard.readString();
    if (buychoice.equalsIgnoreCase("yes"))
    {
    if (exp>=wiscost)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("You recieved a +1 increase to your wisdom!\n\n");
    exp = exp-wiscost;
    wisdom += 1;
    wiscost += 100;
    if (wiscost>1000)
    {
    wiscost = 1000;
    }
    System.out.print("Press any key to continue: ");
    okprompt = Keyboard.readString();
    }
    if (exp<wiscost)
    {
    System.out.print((char)27 + "[2J");
    System.out.println("Sorry, you don't have enough exp for that purchase");
    System.out.print("Press any key to continue: ");
    okprompt = Keyboard.readString();
    }
    }
    }
    if (xpchoice.equalsIgnoreCase("exit"))
    {
    System.out.println("Returning to main menu, ok?");
    okprompt = Keyboard.readString();
    System.out.print((char)27 + "[2J");
    exploop = 3;
    }
    /*End: Wisdom Choice-------------------------------------------------------------------------------------*/
    }
    /*End: EXP Store------------------------------------------------------------------------------------------*/
    }
    if (mainchoice.equalsIgnoreCase("item shop") || mainchoice.equalsIgnoreCase("5"))
    {
    while (itemshop==2)
    {
    System.out.print((char)27 + "[2J");
    System.out.println(name + " slowly steps into the musty old shop. Shelves line the walls, filled");
    System.out.println("with many strange bottles and pitchers filled with liquid of all colors. Fr

  2. #2
    The God Damn Kuno
    Join Date
    Dec 2004
    Posts
    13,676
    BG Level
    9
    FFXIV Character
    Kuno Sedai
    FFXIV Server
    Gilgamesh
    FFXI Server
    Bahamut

    Aw its not finished I wanted to try it out. XD

  3. #3
    Relic Weapons
    Join Date
    Jan 2006
    Posts
    335
    BG Level
    4

    It'll run, you can only fight two things though.

  4. #4
    The God Damn Kuno
    Join Date
    Dec 2004
    Posts
    13,676
    BG Level
    9
    FFXIV Character
    Kuno Sedai
    FFXIV Server
    Gilgamesh
    FFXI Server
    Bahamut

    No, I mean the code doesn't end. It cuts off.

    Why is this the worst coding ever anyway?

  5. #5
    Relic Weapons
    Join Date
    Jan 2006
    Posts
    335
    BG Level
    4

    Oh, it cuts off, there's more but I didn't see that i reached the limit.

    The entire game is one gigantic 'while' loop.

  6. #6
    Salvage Bans
    Join Date
    Apr 2005
    Posts
    946
    BG Level
    5

    Quote Originally Posted by Chreman
    Oh, it cuts off, there's more but I didn't see that i reached the limit.

    The entire game is one gigantic 'while' loop.
    Techicly arn't most games just one giant loop >.>

  7. #7
    blax n gunz
    Join Date
    May 2005
    Posts
    11,161
    BG Level
    9

    most games are

    while (GameNotOver()) RunGame();

    But this guy didn'tt write the 'RunGame()' function, he put all his lines of code within the main function.

    It's just unmaintainable

  8. #8
    Banned.

    Join Date
    Jul 2005
    Posts
    17,472
    BG Level
    9
    FFXI Server
    Ifrit
    WoW Realm
    Area 52

    Wall of Code!



    How could anyone write so much code using only "printf" and "if". I guess he got excited after his first programming class, but still, it's not something someone would do normally. >_>

    I wonder how long he would last if he had to code a graphical interface for his program.

  9. #9

    lol wall o code
    *crash!*

  10. #10

    lol wanna save yourself alot of typing?
    make a static import for system then you dont have to type system.out.println(); everytime you wanna outprint, you can just type out.println(); instead if its static.

  11. #11
    Banned.

    Join Date
    Jul 2005
    Posts
    17,472
    BG Level
    9
    FFXI Server
    Ifrit
    WoW Realm
    Area 52

    Quote Originally Posted by cloud1489
    lol wanna save yourself alot of typing?
    make a static import for system then you dont have to type system.out.println(); everytime you wanna outprint, you can just type out.println(); instead if its static.

    You should explain the concept of function and code organisation instead ;p

Similar Threads

  1. Worst Movies Ever
    By Hitoshura in forum General Discussion
    Replies: 79
    Last Post: 2007-07-27, 02:13
  2. Quite possibly the worst movie ever?
    By Chumbelina in forum General Discussion
    Replies: 31
    Last Post: 2006-03-31, 18:41