public void createCurrentArea()
	{
		if(Battle.IMPORTED)
		{
			bgm.stop();
		}

		bikeSong.stop();
		forceBike=false;

		int levelBoost=0;

		boolean omgBoolean = false;
		for (int i = 0; i<trainer.length; i++)
			trainer[i] = null;
		switch(area)
		{
			case Stringville:
				tileSet = OUTDOORS;
				widthHeight.x = 50;
				widthHeight.y = 50;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("Stringville.tilemap");
				URL url=JokemonDriver.class.getResource("Music/Locations/1_stringville.mid");
				bgm=JApplet.newAudioClip(url);

				//Trainer Declaration
				numTrainers=8;
				trainer=new Trainer[numTrainers];

				trainer[0]=new Trainer(Trainer.TrainerType.BABE,"Jillian",Pokemon.Species.PIDGEY,Pokemon.Species.RATTATA,5);
				trainer[0].setHostile(false);
				trainer[0].setPostMessage("You must be another contest winner! Welcome to Joe's Island!");
				trainer[0].setLocation(11,12);
				trainer[0].setDirection(0);

				trainer[1]=new Trainer(Trainer.TrainerType.CODER,"Peter",Pokemon.Species.WEEDLE,Pokemon.Species.CATERPIE,5);
				trainer[1].setHostile(false);
				trainer[1].setLocation(13,21);
				trainer[1].setPostMessage("Joe is one rich kid. He bought this island and filled it with Pokemon.");
				trainer[1].setDirection(180);

				trainer[2]=new Trainer(Trainer.TrainerType.NEWB,"Billy",Pokemon.Species.WEEDLE,Pokemon.Species.CATERPIE,5);
				trainer[2].setHostile(false);
				trainer[2].setLocation(21,10);
				trainer[2].setPostMessage("I just came here too! I need to go see Babb, Joe's uncle. He'll help me get started!");
				trainer[2].setDirection(270);
				trainer[2].setViewRange(1);

				trainer[3]=new Trainer(Trainer.TrainerType.PROFESSOR,"Roderick III",true);
				trainer[3].setHostile(false);
				trainer[3].setLocation(20,18);
				trainer[3].setPostMessage("Welcome young one. Enjoy your time on the island. Take this fishing rod and you can catch Pokemon. It's a bit old, but who cares, it works.");

				trainer[4]=new Trainer(Trainer.TrainerType.DEBUGGER,"Percy",Pokemon.Species.WEEDLE,Pokemon.Species.CATERPIE,5);
				trainer[4].setHostile(false);
				trainer[4].setLocation(42,17);
				trainer[4].setPostMessage("This island is so big! I'm going to battle everyone to get a chance to fight Joe!");
				trainer[4].setDirection(270);

				if(badges<2)
				{
					trainer[5]=new Trainer(Trainer.TrainerType.PROGRAMMER,"Jamal",Pokemon.Species.WEEDLE,Pokemon.Species.CATERPIE,5);
					trainer[5].setHostile(false);
					trainer[5].setLocation(10,1);
					trainer[5].setPostMessage("Watch out! We're having an epic battle!");
					trainer[5].setDirection(0);

					trainer[6]=new Trainer(Trainer.TrainerType.HACKER,"Javier",Pokemon.Species.WEEDLE,Pokemon.Species.CATERPIE,5);
					trainer[6].setHostile(false);
					trainer[6].setLocation(11,1);
					trainer[6].setPostMessage("Don't distract me! I'm busy battling!");
					trainer[6].setDirection(180);
				}
				else
				{
					trainer[5]=new Trainer(Trainer.TrainerType.PROGRAMMER,"Jamal",Pokemon.Species.WEEDLE,Pokemon.Species.CATERPIE,5);
					trainer[5].setHostile(false);
					trainer[5].setLocation(8,4);
					trainer[5].setPostMessage("Don't talk to me, I just lost a battle...");
					trainer[5].setDirection(180);

					trainer[6]=new Trainer(Trainer.TrainerType.HACKER,"Javier",Pokemon.Species.WEEDLE,Pokemon.Species.CATERPIE,5);
					trainer[6].setHostile(false);
					trainer[6].setLocation(12,4);
					trainer[6].setPostMessage("See that guy over there? He's sad because I beat him! You can take the path now.");
					trainer[6].setDirection(270);
				}

				if(objectiveComplete[0]&&timesBeatRival==0)
				{
					trainer[7]=new Trainer(Trainer.TrainerType.RIVAL,rivalName,Pokemon.Species.PIKACHU,Mechanics.getHighestLevel(partyPokemon,pcPokemon));
					trainer[7].setHostile(true);
					trainer[7].setLocation(28,38);
					trainer[7].setPreMessage("Well, if it isn't "+name+". Nice to see you made it to the island. How about a battle my dearest rival? That would be exquisite.");
					trainer[7].setPostMessage("Wow. You got pretty lucky. Next time you won't be so lucky "+name+". I'd train some more if I were you.");
					trainer[7].setDirection(270);
				}
				else
				{
					trainer[7]=new Trainer(Trainer.TrainerType.CYPHER,"Jill",Pokemon.Species.WEEDLE,Pokemon.Species.CATERPIE,5);
					trainer[7].setHostile(false);
					trainer[7].setLocation(28,38);
					trainer[7].setPostMessage("This is a Pokemon Gym. If you win at each one on the island, you can go challenge strong trainers!");
					trainer[7].setDirection(270);
				}

				//Item Declaration
				numItems=2;
				mapItems=new Item[numItems];
				foundItem=new boolean[numItems];

				mapItems[0]=new Item(Item.Type.POTION,new Point(37,4));
				mapItems[1]=new Item(Item.Type.ANTIDOTE,new Point(4,40));

				loadItemData();
				for(int i=0; i<foundItem.length; i++)
				{
					mapItems[i].found=foundItem[i];
				}
				break;
			case Route_0:
				tileSet = OUTDOORS;
				widthHeight.x = 60;
				widthHeight.y = 50;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("Route0.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/0d_routes.mid");
				bgm=JApplet.newAudioClip(url);

				if (badges == 0)
				numTrainers=7;
				else
				numTrainers=5;
				trainer=new Trainer[numTrainers];
				numItems=1;
				mapItems=new Item[numItems];
				foundItem=new boolean[numItems];

				trainer[0]=new Trainer(Trainer.TrainerType.NEWB,"Buford",Pokemon.Species.CATERPIE,5);
				trainer[0].setHostile(true);
				trainer[0].setLocation(6,11);
				trainer[0].setPreMessage("Hey Trainer! When you see another trainer, you have to battle! Let's go!");
				trainer[0].setPostMessage("You just had beginner's luck, that's all.");
				trainer[0].setDirection(270);
				trainer[0].setViewRange(2);

				trainer[1]=new Trainer(Trainer.TrainerType.PROGRAMMER,"Todd",Pokemon.Species.CATERPIE,5);
				trainer[1].setHostile(false);
				trainer[1].setLocation(11,13);
				trainer[1].setPostMessage("Be careful walking in grass. Wild Pokemon are roaming around.");
				trainer[1].setDirection(180);

				trainer[2]=new Trainer(Trainer.TrainerType.KEYBOARDER,"Mac",Pokemon.Species.MAGIKARP,Pokemon.Species.MAGIKARP,5);
				trainer[2].setHostile(true);
				trainer[2].setLocation(14,30);
				trainer[2].setPreMessage("Hey kid, let's battle. I just caught some Pokemon.");
				trainer[2].setPostMessage("Darn it. Magikarp are weak.");
				trainer[2].setDirection(270);
				trainer[2].setViewRange(1);

				trainer[3]=new Trainer(Trainer.TrainerType.CYPHER,"Penelope",Pokemon.Species.MAGIKARP,10);
				trainer[3].setHostile(true);
				trainer[3].setLocation(23,39);
				trainer[3].setPreMessage("Girls like to fish too you know!");
				trainer[3].setPostMessage("I think I'll stick to tanning.");
				trainer[3].setDirection(180);
				trainer[3].setViewRange(1);

				trainer[4]=new Trainer(Trainer.TrainerType.ENGINEER,"Juan",Pokemon.Species.CATERPIE,5);
				trainer[4].setHostile(false);
				trainer[4].setLocation(43,11);
				trainer[4].setPostMessage("I caught a few Pokemon! Make sure you have Poke Balls and you can too!");
				trainer[4].setDirection(270);

				if(badges==0)
				{
					trainer[5]=new Trainer(Trainer.TrainerType.NEWB,"Timmy",Pokemon.Species.WEEDLE,Pokemon.Species.CATERPIE,5);
					trainer[5].setHostile(false);
					trainer[5].setLocation(14,23);
					trainer[5].setPostMessage("We're having a staring contest! Then afterwards we are leaving this island for Kanto. It's so much nicer there.");
					trainer[5].setDirection(0);

					trainer[6]=new Trainer(Trainer.TrainerType.NERDY_BIKER,"Tim",Pokemon.Species.WEEDLE,Pokemon.Species.CATERPIE,5);
					trainer[6].setHostile(false);
					trainer[6].setLocation(15,23);
					trainer[6].setPostMessage("Don't distract me! I must stare!");
					trainer[6].setDirection(180);
				}

				mapItems[0]=new Item(Item.Type.POTION,new Point(43,19));

				loadItemData();
				for(int i=0; i<foundItem.length; i++)
				{
					mapItems[i].found=foundItem[i];
				}
				break;
			case Args_Harbor:
				tileSet = OUTDOORS;
				widthHeight.x = 60;
				widthHeight.y = 68;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("ArgsHarbor.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/2_args_harbor.mid");
				bgm=JApplet.newAudioClip(url);

				numTrainers=5;
				trainer=new Trainer[numTrainers];
				numItems=1;
				mapItems=new Item[numItems];
				foundItem=new boolean[numItems];

				trainer[0]=new Trainer(Trainer.TrainerType.BABE,"Nikki",Pokemon.Species.CATERPIE,5);
				trainer[0].setHostile(false);
				trainer[0].setLocation(6,32);
				//trainer[0].setPreMessage("Hey Trainer! When you see another trainer, you have to battle! Let's go!");
				trainer[0].setPostMessage("I just love Args Harbor. It's so beautiful.");
				trainer[0].setDirection(270);
				trainer[0].setViewRange(2);

				trainer[1]=new Trainer(Trainer.TrainerType.PROGRAMMER,"Noah",Pokemon.Species.CATERPIE,5);
				trainer[1].setHostile(false);
				trainer[1].setLocation(13,47);
				trainer[1].setPostMessage("You can see water for miles from here! This island must be in the middle of nowhere.");
				trainer[1].setDirection(270);

				trainer[2]=new Trainer(Trainer.TrainerType.NEWB,"Timmy",Pokemon.Species.MAGIKARP,Pokemon.Species.MAGIKARP,5);
				trainer[2].setHostile(false);
				trainer[2].setLocation(45,22);
				//trainer[2].setPreMessage("Hey kid, let's battle. I just caught some Pokemon.");
				trainer[2].setPostMessage("This is my special spot. It's really cozy. Don't try to take it from me!");
				trainer[2].setDirection(270);
				trainer[2].setViewRange(1);

				trainer[3]=new Trainer(Trainer.TrainerType.CYPHER,"Olivia",Pokemon.Species.MAGIKARP,10);
				trainer[3].setHostile(false);
				trainer[3].setLocation(16,21);
				//trainer[3].setPreMessage("Girls like to fish too you know!");
				trainer[3].setPostMessage("That lighthouse is so tall! I wonder what's in there?");
				trainer[3].setDirection(0);
				trainer[3].setViewRange(1);

				if(badges<1)
				{
					trainer[4]=new Trainer(Trainer.TrainerType.ENGINEER,"Scotty",Pokemon.Species.CATERPIE,5);
					trainer[4].setHostile(false);
					trainer[4].setLocation(38,24);
					trainer[4].setPostMessage("You should get the Stringville Badge first. Jimmy is too strong for you right now.");
					trainer[4].setDirection(270);
				}
				else
				{
					trainer[4]=new Trainer(Trainer.TrainerType.ENGINEER,"Scotty",Pokemon.Species.CATERPIE,5);
					trainer[4].setHostile(false);
					trainer[4].setLocation(28,25);
					trainer[4].setPostMessage("I wonder if Joe and Babb visit the lighthouse often.");
					trainer[4].setDirection(270);
				}

				mapItems[0]=new Item(Item.Type.SUPER_POTION,new Point(47,34));

				loadItemData();
				for(int i=0; i<foundItem.length; i++)
				{
					mapItems[i].found=foundItem[i];
				}
				break;
			case Route_1:
				tileSet = OUTDOORS;
				widthHeight.x = 40;
				widthHeight.y = 60;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("Route1.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/0d_routes.mid");
				bgm=JApplet.newAudioClip(url);

				if(badges>7)
				{
					numTrainers=5;
					trainer=new Trainer[numTrainers];
				}
				else
				{
					numTrainers=7;
					trainer=new Trainer[numTrainers];

					trainer[5]=new Trainer(Trainer.TrainerType.JAVA,"ELITE",Pokemon.Species.CATERPIE,5);
					trainer[5].setHostile(false);
					trainer[5].setLocation(4,20);
					trainer[5].setPostMessage("Out of the way pissant!");
					trainer[5].setDirection(0);

					trainer[6]=new Trainer(Trainer.TrainerType.JAVA,"ELITE",Pokemon.Species.CATERPIE,5);
					trainer[6].setHostile(false);
					trainer[6].setLocation(4,21);
					trainer[6].setPostMessage("Scram!");
					trainer[6].setDirection(0);
				}
				numItems=2;
				mapItems=new Item[numItems];
				foundItem=new boolean[numItems];

				trainer[0]=new Trainer(Trainer.TrainerType.DEBUGGER,"Ishmael",Pokemon.Species.CATERPIE,5);
				trainer[0].setHostile(false);
				trainer[0].setLocation(11,50);
				//trainer[0].setPreMessage("Hey Trainer! When you see another trainer, you have to battle! Let's go!");
				trainer[0].setPostMessage("See that ledge? You can jump over it. Only from one way though.");
				trainer[0].setDirection(180);
				//trainer[0].setViewRange(2);

				trainer[1]=new Trainer(Trainer.TrainerType.PROGRAMMER,"Zeke",Pokemon.Species.PIDGEY,Pokemon.Species.RATTATA,15);
				trainer[1].setHostile(true);
				trainer[1].setLocation(11,13);
				trainer[1].setPreMessage("You have badges! You must be good!");
				trainer[1].setPostMessage("Too good for my taste.");
				trainer[1].setDirection(0);
				trainer[1].setViewRange(4);

				trainer[2]=new Trainer(Trainer.TrainerType.NERDY_BIKER,"Mike",Pokemon.Species.METAPOD,Pokemon.Species.BULBASAUR,15);
				trainer[2].setHostile(true);
				trainer[2].setLocation(22,36);
				trainer[2].setPreMessage("I like to ride my bicycle.");
				trainer[2].setPostMessage("Looks like I need a tune-up.");
				trainer[2].setDirection(180);
				trainer[2].setViewRange(4);

				trainer[3]=new Trainer(Trainer.TrainerType.BABE,"Isabella",Pokemon.Species.PIKACHU,18);
				trainer[3].setHostile(true);
				trainer[3].setLocation(11,33);
				trainer[3].setPreMessage("Check out my cuddly Pokemon!");
				trainer[3].setPostMessage("Ugh. You're no fun.");
				trainer[3].setDirection(180);
				trainer[3].setViewRange(3);

				trainer[4]=new Trainer(Trainer.TrainerType.CODER,"Jimbo",Pokemon.Species.SLOWPOKE,14);
				trainer[4].setHostile(true);
				trainer[4].setLocation(30,5);
				trainer[4].setPreMessage("Don't act like you didn't see me.");
				trainer[4].setPostMessage("Maybe I shouldn't have looked at you.");
				trainer[4].setDirection(270);
				trainer[4].setViewRange(4);

				mapItems[0]=new Item(Item.Type.POKE_BALL,new Point(25,50));
				mapItems[1]=new Item(Item.Type.BURN_HEAL,new Point(4,46));

				loadItemData();
				for(int i=0; i<foundItem.length; i++)
				{
					mapItems[i].found=foundItem[i];
				}
				break;
			case Route_2:
				tileSet = OUTDOORS;
				widthHeight.x = 48;
				widthHeight.y = 60;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("Route2.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/0d_routes2.mid");
				bgm=JApplet.newAudioClip(url);

				numTrainers=5;
				trainer=new Trainer[numTrainers];
				numItems=4;
				mapItems=new Item[numItems];
				foundItem=new boolean[numItems];

				trainer[0]=new Trainer(Trainer.TrainerType.DEBUGGER,"Tobey",Pokemon.Species.PIDGEY,16);
				trainer[0].setHostile(true);
				trainer[0].setLocation(6,31);
				trainer[0].setPreMessage("My name really is Tobey.");
				trainer[0].setPostMessage("I'm calling my mom!");
				trainer[0].setDirection(180);
				trainer[0].setViewRange(2);

				trainer[1]=new Trainer(Trainer.TrainerType.NEWB,"Brian Healy",Pokemon.Species.FARFETCH_D,Pokemon.Species.FARFETCH_D,Pokemon.Species.FARFETCH_D,Pokemon.Species.FARFETCH_D,10);
				trainer[1].setHostile(true);
				trainer[1].setLocation(7,38);
				trainer[1].setPreMessage("Is there such a thing as beginner's luck?");
				trainer[1].setPostMessage("I guess not...");
				trainer[1].setDirection(90);
				trainer[1].setViewRange(2);

				trainer[2]=new Trainer(Trainer.TrainerType.JAVA,"GRUNT",Pokemon.Species.RATTATA,Pokemon.Species.BULBASAUR,15);
				trainer[2].setHostile(true);
				trainer[2].setLocation(23,38);
				trainer[2].setPreMessage("Have you heard of Team Java?");
				trainer[2].setPostMessage("You'd better fear us.");
				trainer[2].setDirection(90);
				trainer[2].setViewRange(2);

				trainer[3]=new Trainer(Trainer.TrainerType.CYPHER,"Bella",Pokemon.Species.RATTATA,Pokemon.Species.BELLSPROUT,18);
				trainer[3].setHostile(true);
				trainer[3].setLocation(28,31);
				trainer[3].setPreMessage("HEY KID! LET'S BATTLE!!!");
				trainer[3].setPostMessage("...You made me lose my voice.");
				trainer[3].setDirection(180);
				trainer[3].setViewRange(4);

				trainer[4]=new Trainer(Trainer.TrainerType.NERDY_BIKER,"Lancelot",Pokemon.Species.DODUO,Pokemon.Species.PIDGEY,14);
				trainer[4].setHostile(true);
				trainer[4].setLocation(44,43);
				trainer[4].setPreMessage("I almost got my bike stuck! Good thing you saw me.");
				trainer[4].setPostMessage("I think you're a cheater.");
				trainer[4].setDirection(180);
				trainer[4].setViewRange(5);

				mapItems[0]=new Item(Item.Type.GREAT_BALL,new Point(7,52));
				mapItems[1]=new Item(Item.Type.PARALYZE_HEAL,new Point(38,52));
				mapItems[2]=new Item(Item.Type.AWAKENING,new Point(43,37));
				mapItems[3]=new Item(Item.Type.ANTIDOTE,new Point(18,33));

				loadItemData();
				for(int i=0; i<foundItem.length; i++)
				{
					mapItems[i].found=foundItem[i];
				}
				break;
			case Pokecenter:
				tileSet = INDOORS;
				widthHeight.x = 15;
				widthHeight.y = 9;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("Pokecenter.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/0b_pokemon_center.mid");
				bgm=JApplet.newAudioClip(url);
				break;
			case Nested_Village:
				tileSet = OUTDOORS;
				widthHeight.x = 50;
				widthHeight.y = 46;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("NestedVillage.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/0d_routes2.mid");
				bgm=JApplet.newAudioClip(url);

				numTrainers=5;
				trainer=new Trainer[numTrainers];
				numItems=0;
				mapItems=new Item[numItems];
				foundItem=new boolean[numItems];

				trainer[0]=new Trainer(Trainer.TrainerType.KEYBOARDER,"Zell",Pokemon.Species.CATERPIE,5);
				trainer[0].setHostile(false);
				trainer[0].setLocation(25,32);
				//trainer[0].setPreMessage("Hey Trainer! When you see another trainer, you have to battle! Let's go!");
				trainer[0].setPostMessage("Welcome to Nested Village! It's nice and cozy here.");
				trainer[0].setDirection(270);
				//trainer[0].setViewRange(2);

				trainer[1]=new Trainer(Trainer.TrainerType.PROGRAMMER,"Chaka",Pokemon.Species.CATERPIE,5);
				trainer[1].setHostile(false);
				trainer[1].setLocation(19,10);
				trainer[1].setPostMessage("I wonder what Joe looks like...");
				trainer[1].setDirection(90);

				trainer[2]=new Trainer(Trainer.TrainerType.CODER,"Bruce",Pokemon.Species.MAGIKARP,Pokemon.Species.MAGIKARP,5);
				trainer[2].setHostile(false);
				trainer[2].setLocation(37,18);
				//trainer[2].setPreMessage("Hey kid, let's battle. I just caught some Pokemon.");
				trainer[2].setPostMessage("I bet you could teach a Pokemon some moves that could be used outside of battle...");
				trainer[2].setDirection(180);
				trainer[2].setViewRange(1);

				trainer[3]=new Trainer(Trainer.TrainerType.CYPHER,"Penny",Pokemon.Species.MAGIKARP,10);
				trainer[3].setHostile(false);
				trainer[3].setLocation(30,16);
				//trainer[3].setPreMessage("Girls like to fish too you know!");
				trainer[3].setPostMessage("This village is handy for trainers passing by!");
				trainer[3].setDirection(270);
				trainer[3].setViewRange(1);

				if(timesBeatRival==1)
				{
					trainer[4]=new Trainer(Trainer.TrainerType.RIVAL,rivalName,Pokemon.Species.PIKACHU,Pokemon.Species.IVYSAUR,Pokemon.Species.CHARMELEON,Mechanics.getHighestLevel(partyPokemon,pcPokemon));
					trainer[4].setHostile(true);
					trainer[4].setLocation(1,22);
					trainer[4].setPreMessage(name+"? You again huh? How quaint. Have you taken my advice and leveled up your Pokemon like I told you? If not, I'm going to obliterate you. You silly goose. Let us dance!");
					trainer[4].setPostMessage("Well, well, well. You have definitely gotten stronger. You may have heard of a 'Team Java' on the island. They are old associates of Joe's. They've come looking for revenge or something. No matter. I'll crush them all.");
					trainer[4].setDirection(270);
					trainer[4].setViewRange(3);
				}
				else
				{
					trainer[4]=new Trainer(Trainer.TrainerType.HACKER,"Zachariah",Pokemon.Species.PIKACHU,5);
					trainer[4].setHostile(false);
					trainer[4].setLocation(1,22);
					trainer[4].setPreMessage("");
					trainer[4].setPostMessage("Hey dude, you're going to need a Pokemon that knows CUT if you want to keep going.");
					trainer[4].setDirection(270);
					trainer[4].setViewRange(3);
				}

				loadItemData();
				break;
			case Mart:
				tileSet = INDOORS;
				widthHeight.x = 11;
				widthHeight.y = 9;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("Mart.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/0c_shop.mid");
				bgm=JApplet.newAudioClip(url);

				numTrainers=2;
				trainer=new Trainer[numTrainers];
				numItems=0;
				mapItems=new Item[numItems];

				trainer[0]=new Trainer(Trainer.TrainerType.HACKER,"Marty",Pokemon.Species.MEOWTH,5);
				trainer[0].setHostile(false);
				trainer[0].setLocation(1,4);
				//trainer[0].setPreMessage("");
				trainer[0].setPostMessage("Welcome!");
				trainer[0].setDirection(0);
				trainer[0].setViewRange(1);

				trainer[1]=new Trainer(Trainer.TrainerType.NEWB,"Braxton",Pokemon.Species.CATERPIE,5);
				trainer[1].setHostile(false);
				trainer[1].setLocation(8,2);
				//trainer[0].setPreMessage("");
				trainer[1].setPostMessage("I shop all the time! I love this island!");
				trainer[1].setDirection(270);
				trainer[1].setViewRange(1);
				break;
			case Route_3:
				tileSet = OUTDOORS;
				widthHeight.x = 50;
				widthHeight.y = 48;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("Route3.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/0d_routes2.mid");
				bgm=JApplet.newAudioClip(url);

				numTrainers=5;
				trainer=new Trainer[numTrainers];
				numItems=2;
				mapItems=new Item[numItems];
				foundItem=new boolean[numItems];

				trainer[0]=new Trainer(Trainer.TrainerType.NEWB,"Tony",Pokemon.Species.TAUROS,Pokemon.Species.RATTATA,14);
				trainer[0].setHostile(true);
				trainer[0].setLocation(44,33);
				trainer[0].setPreMessage("Did that old guy give you HM 1 too?");
				trainer[0].setPostMessage("I'm scared of old people.");
				trainer[0].setDirection(270);
				trainer[0].setViewRange(2);

				trainer[1]=new Trainer(Trainer.TrainerType.PROGRAMMER,"Mateo",Pokemon.Species.CATERPIE,5);
				trainer[1].setHostile(false);
				trainer[1].setLocation(3,37);
				trainer[1].setPostMessage("You're going to need a Pokemon that can SURF to cross Route 11.");
				trainer[1].setDirection(90);

				trainer[2]=new Trainer(Trainer.TrainerType.KEYBOARDER,"Melvin",Pokemon.Species.PIKACHU,Pokemon.Species.PIDGEOTTO,18);
				trainer[2].setHostile(true);
				trainer[2].setLocation(14,27);
				trainer[2].setPreMessage("The sun is really bright here.");
				trainer[2].setPostMessage("Good thing I wore my sunscreen.");
				trainer[2].setDirection(180);
				trainer[2].setViewRange(4);

				trainer[3]=new Trainer(Trainer.TrainerType.NERDY_BIKER,"Hombre",Pokemon.Species.ODDISH,16);
				trainer[3].setHostile(true);
				trainer[3].setLocation(39,18);
				trainer[3].setPreMessage("I'm going to run you over!");
				trainer[3].setPostMessage("Drats! Stopped dead in my tracks.");
				trainer[3].setDirection(180);
				trainer[3].setViewRange(5);

				if (badges < 4)
				{
					trainer[4]=new Trainer(Trainer.TrainerType.ENGINEER,"Toto",Pokemon.Species.CATERPIE,5);
					trainer[4].setHostile(false);
					trainer[4].setLocation(37,6);
					trainer[4].setPostMessage("You're going to have to be careful if you're going into this cave.");
					trainer[4].setDirection(270);
				}
				else
				{
					trainer[4]=new Trainer(Trainer.TrainerType.ENGINEER,"Toto",Pokemon.Species.CATERPIE,5);
					trainer[4].setHostile(false);
					trainer[4].setLocation(36,6);
					trainer[4].setPostMessage("You're going to have to be careful if you're going into this cave.");
					trainer[4].setDirection(270);
				}


				mapItems[0]=new Item(Item.Type.SUPER_POTION,new Point(44,15));
				mapItems[1]=new Item(Item.Type.GREAT_BALL,new Point(11,2));

				loadItemData();
				for(int i=0; i<foundItem.length; i++)
				{
					mapItems[i].found=foundItem[i];
				}
				break;
			case Villa_Del_Joe:
				tileSet = OUTDOORS;
				widthHeight.x = 76;
				widthHeight.y = 62;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("VillaDelJoe.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/4_joe_villa.mid");
				bgm=JApplet.newAudioClip(url);

				numTrainers=5;
				trainer=new Trainer[numTrainers];
				numItems=1;
				mapItems=new Item[numItems];
				foundItem=new boolean[numItems];

				trainer[0]=new Trainer(Trainer.TrainerType.CYPHER,"Nala",Pokemon.Species.CATERPIE,5);
				trainer[0].setHostile(false);
				trainer[0].setLocation(64,51);
				//trainer[0].setPreMessage("Hey Trainer! When you see another trainer, you have to battle! Let's go!");
				trainer[0].setPostMessage("This is Joe's own personal villa! He converted it into a trainer hot-spot!");
				trainer[0].setDirection(270);
				trainer[0].setViewRange(2);

				trainer[1]=new Trainer(Trainer.TrainerType.PROGRAMMER,"Kwame",Pokemon.Species.CATERPIE,5);
				trainer[1].setHostile(false);
				trainer[1].setLocation(48,58);
				trainer[1].setPostMessage("Everybody loves passing through Joe's Villa. It's so exciting!");
				trainer[1].setDirection(0);

				trainer[2]=new Trainer(Trainer.TrainerType.NEWB,"Dante",Pokemon.Species.MAGIKARP,Pokemon.Species.MAGIKARP,5);
				trainer[2].setHostile(false);
				trainer[2].setLocation(19,55);
				//trainer[2].setPreMessage("Hey kid, let's battle. I just caught some Pokemon.");
				trainer[2].setPostMessage("I'm going to battle Jace soon. I hope I win!");
				trainer[2].setDirection(90);
				trainer[2].setViewRange(1);

				trainer[3]=new Trainer(Trainer.TrainerType.CYPHER,"Trish",Pokemon.Species.MAGIKARP,10);
				trainer[3].setHostile(false);
				trainer[3].setLocation(30,9);
				//trainer[3].setPreMessage("Girls like to fish too you know!");
				trainer[3].setPostMessage("I heard that Jace trains by shocking himself!");
				trainer[3].setDirection(270);
				trainer[3].setViewRange(1);

				trainer[4]=new Trainer(Trainer.TrainerType.ENGINEER,"Ace",Pokemon.Species.CATERPIE,5);
				trainer[4].setHostile(false);
				trainer[4].setLocation(5,3);
				trainer[4].setPostMessage("Hey man, don't bother me. I'm busy.");
				trainer[4].setDirection(90);

				mapItems[0]=new Item(Item.Type.GREAT_BALL,new Point(19,60));

				loadItemData();
				for(int i=0; i<foundItem.length; i++)
				{
					mapItems[i].found=foundItem[i];
				}
				break;
			case YourHouse:
				tileSet = INDOORS;
				widthHeight.x = 12;
				widthHeight.y = 9;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("YourHouse.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/house.mid");
				bgm=JApplet.newAudioClip(url);
				break;
			case Route_4:
				tileSet = OUTDOORS;
				widthHeight.x = 40;
				widthHeight.y = 100;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("Route4.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/0d_routes3.mid");
				bgm=JApplet.newAudioClip(url);

				numTrainers=5;
				trainer=new Trainer[numTrainers];
				numItems=2;
				mapItems=new Item[numItems];
				foundItem=new boolean[numItems];

				trainer[0]=new Trainer(Trainer.TrainerType.NEWB,"Copycat",Pokemon.Species.DITTO,Pokemon.Species.DITTO,Pokemon.Species.DITTO,20);
				trainer[0].setHostile(true);
				trainer[0].setLocation(20,68);
				trainer[0].setPreMessage("Let's battle!");
				trainer[0].setPostMessage("...");
				trainer[0].setDirection(180);
				trainer[0].setViewRange(2);

				trainer[1]=new Trainer(Trainer.TrainerType.NERDY_BIKER,"Miguel",Pokemon.Species.GEODUDE,Pokemon.Species.TAUROS,20);
				trainer[1].setHostile(true);
				trainer[1].setLocation(4,58);
				trainer[1].setPreMessage("On your way to Mount Java?");
				trainer[1].setPostMessage("I was too, but now I have to heal my Pokemon.");
				trainer[1].setDirection(0);
				trainer[1].setViewRange(5);

				trainer[2]=new Trainer(Trainer.TrainerType.NERDY_BIKER,"Lucien",Pokemon.Species.RATICATE,Pokemon.Species.PIDGEOTTO,22);
				trainer[2].setHostile(true);
				trainer[2].setLocation(2,49);
				trainer[2].setPreMessage("I'm tired, but not too tired for a battle!");
				trainer[2].setPostMessage("Now I'm too tired to do anything.");
				trainer[2].setDirection(0);
				trainer[2].setViewRange(3);

				trainer[3]=new Trainer(Trainer.TrainerType.NERDY_BIKER,"Otto",Pokemon.Species.GLOOM,Pokemon.Species.FEAROW,24);
				trainer[3].setHostile(true);
				trainer[3].setLocation(17,35);
				trainer[3].setPreMessage("This bike definitely helps for long travels!");
				trainer[3].setPostMessage("Wipeout!");
				trainer[3].setDirection(90);
				trainer[3].setViewRange(3);

				trainer[4]=new Trainer(Trainer.TrainerType.NERDY_BIKER,"Melvin",Pokemon.Species.CATERPIE,5);
				trainer[4].setHostile(false);
				trainer[4].setLocation(15,4);
				trainer[4].setPostMessage("Mount Java is still a ways away. Keep going!");
				trainer[4].setDirection(270);

				mapItems[0]=new Item(Item.Type.IRON,new Point(36,54));
				mapItems[1]=new Item(Item.Type.REVIVE,new Point(32,42));

				loadItemData();
				for(int i=0; i<foundItem.length; i++)
				{
					mapItems[i].found=foundItem[i];
				}
				break;
			case Mount_Java:
				tileSet = OUTDOORS;
				widthHeight.x = 50;
				widthHeight.y = 50;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("MountJava.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/3_mount_java.mid");
				bgm=JApplet.newAudioClip(url);

				numTrainers=5;
				trainer=new Trainer[numTrainers];
				numItems=1;
				mapItems=new Item[numItems];
				foundItem=new boolean[numItems];

				trainer[0]=new Trainer(Trainer.TrainerType.CYPHER,"Stephanie",Pokemon.Species.CATERPIE,5);
				trainer[0].setHostile(false);
				trainer[0].setLocation(15,43);
				//trainer[0].setPreMessage("Hey Trainer! When you see another trainer, you have to battle! Let's go!");
				trainer[0].setPostMessage("Mount Java is one of the island's most notable landmarks.");
				trainer[0].setDirection(270);
				trainer[0].setViewRange(0);

				trainer[1]=new Trainer(Trainer.TrainerType.PROGRAMMER,"Trent",Pokemon.Species.CATERPIE,5);
				trainer[1].setHostile(false);
				trainer[1].setLocation(39,22);
				trainer[1].setPostMessage("It looks like a fat Pokemon is sleeping over there...");
				trainer[1].setDirection(0);

				trainer[2]=new Trainer(Trainer.TrainerType.NEWB,"Nolan",Pokemon.Species.MAGIKARP,Pokemon.Species.MAGIKARP,5);
				trainer[2].setHostile(false);
				trainer[2].setLocation(32,11);
				//trainer[2].setPreMessage("Hey kid, let's battle. I just caught some Pokemon.");
				trainer[2].setPostMessage("Jin is one insane martial artist. He toppled me like nothing!");
				trainer[2].setDirection(270);
				trainer[2].setViewRange(1);

				trainer[3]=new Trainer(Trainer.TrainerType.BABE,"Veronica",Pokemon.Species.MAGIKARP,10);
				trainer[3].setHostile(false);
				trainer[3].setLocation(9,19);
				//trainer[3].setPreMessage("Girls like to fish too you know!");
				trainer[3].setPostMessage("I've heard stories of a mighty Pokemon that sleeps all day. It is fearsome.");
				trainer[3].setDirection(270);
				trainer[3].setViewRange(1);

				trainer[4]=new Trainer(Trainer.TrainerType.ENGINEER,"Zane",Pokemon.Species.CATERPIE,5);
				trainer[4].setHostile(false);
				trainer[4].setLocation(9,9);
				trainer[4].setPostMessage("Dude, I really hate caves.");
				trainer[4].setDirection(270);

				mapItems[0]=new Item(Item.Type.ULTRA_BALL,new Point(30,42));

				loadItemData();
				for(int i=0; i<foundItem.length; i++)
				{
					mapItems[i].found=foundItem[i];
				}
				break;
			case Route_5:
				tileSet = OUTDOORS;
				widthHeight.x = 76;
				widthHeight.y = 40;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("Route5.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/0d_routes3.mid");
				bgm=JApplet.newAudioClip(url);

				numTrainers=5;
				trainer=new Trainer[numTrainers];
				numItems=3;
				mapItems=new Item[numItems];
				foundItem=new boolean[numItems];

				trainer[0]=new Trainer(Trainer.TrainerType.ENGINEER,"Trevor",Pokemon.Species.NINETALES,Pokemon.Species.PINSIR,Pokemon.Species.DRATINI,20);
				trainer[0].setHostile(true);
				trainer[0].setLocation(21,36);
				trainer[0].setPreMessage("Ahh...so we meet again my young padawan.");
				trainer[0].setPostMessage("Hmm...the force is strong in this one.");
				trainer[0].setDirection(0);
				trainer[0].setViewRange(4);

				trainer[1]=new Trainer(Trainer.TrainerType.NERDY_BIKER,"Bart",Pokemon.Species.RATTATA,Pokemon.Species.PIKACHU,20);
				trainer[1].setHostile(true);
				trainer[1].setLocation(14,22);
				trainer[1].setPreMessage("Mount Java is close! I'll beat you there!");
				trainer[1].setPostMessage("Darn it! Looks like you win this time.");
				trainer[1].setDirection(180);
				trainer[1].setViewRange(3);

				trainer[2]=new Trainer(Trainer.TrainerType.NERDY_BIKER,"Lucien",Pokemon.Species.RATICATE,Pokemon.Species.PIDGEOTTO,22);
				trainer[2].setHostile(true);
				trainer[2].setLocation(2,49);
				trainer[2].setPreMessage("I'm tired, but not too tired for a battle!");
				trainer[2].setPostMessage("Now I'm too tired to do anything.");
				trainer[2].setDirection(0);
				trainer[2].setViewRange(3);

				trainer[3]=new Trainer(Trainer.TrainerType.NERDY_BIKER,"Oscar",Pokemon.Species.WEEPINBELL,Pokemon.Species.PIDGEOTTO,Pokemon.Species.RATTATA,24);
				trainer[3].setHostile(true);
				trainer[3].setLocation(27,12);
				trainer[3].setPreMessage("I saw a spikey red-head nearby. You know him?");
				trainer[3].setPostMessage("That red-haired kid beat me too.");
				trainer[3].setDirection(270);
				trainer[3].setViewRange(3);

				if(timesBeatRival==2)
				{
					trainer[4]=new Trainer(Trainer.TrainerType.RIVAL,rivalName,Pokemon.Species.RAICHU,Pokemon.Species.VENUSAUR,Pokemon.Species.WARTORTLE,Pokemon.Species.CHARMELEON,Mechanics.getHighestLevel(partyPokemon,pcPokemon));
					trainer[4].setHostile(true);
					trainer[4].setLocation(60,7);
					trainer[4].setPreMessage("About time you showed up "+name+". You must be heading to Mount Java. I see you have a few badges now. Does that mean you have been training? Let's take a gander at your progress shall we?");
					trainer[4].setPostMessage("I shouldn't have expected anything less. You still have a lot of training to do though "+name+". I can only imagine our enemies will be stronger. I sure hope so. They are pathetic to me. Joe is my target.");
					trainer[4].setDirection(0);
					trainer[4].setViewRange(7);
				}
				else
				{
					trainer[4]=new Trainer(Trainer.TrainerType.NERDY_BIKER,"Jacob",Pokemon.Species.CHARMELEON,partyPokemon[0].level);
					trainer[4].setHostile(false);
					trainer[4].setLocation(60,7);
					trainer[4].setPostMessage("Mount Java scares me a little.");
					//trainer[4].setPostMessage("I shouldn't have expected anything less. You still have a lot of training to do though "+name+". I can only imagine our enemies will be stronger. I sure hope so. They are pathetic to me. Joe is my target.");
					trainer[4].setDirection(270);
					trainer[4].setViewRange(7);
				}

				mapItems[0]=new Item(Item.Type.PROTEIN,new Point(69,27));
				mapItems[1]=new Item(Item.Type.ULTRA_BALL,new Point(68,2));
				mapItems[2]=new Item(Item.Type.AWAKENING,new Point(46,4));

				loadItemData();
				for(int i=0; i<foundItem.length; i++)
				{
					mapItems[i].found=foundItem[i];
				}
				break;
			case Route_6:
				tileSet = OUTDOORS;
				widthHeight.x = 60;
				widthHeight.y = 44;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("Route6.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/0d_routes4.mid");
				bgm=JApplet.newAudioClip(url);

				numTrainers=5;
				trainer=new Trainer[numTrainers];
				numItems=3;
				mapItems=new Item[numItems];
				foundItem=new boolean[numItems];

				trainer[0]=new Trainer(Trainer.TrainerType.ENGINEER,"Bradley S.",Pokemon.Species.MAGNETON,Pokemon.Species.DROWZEE,Pokemon.Species.DUGTRIO,25);
				trainer[0].setHostile(true);
				trainer[0].setLocation(57,11);
				trainer[0].setPreMessage("Whazup loser?");
				trainer[0].setPostMessage("Okay, best out of 3?");
				trainer[0].setDirection(270);
				trainer[0].setViewRange(4);

				trainer[1]=new Trainer(Trainer.TrainerType.NERDY_BIKER,"Thomas",Pokemon.Species.RATICATE,Pokemon.Species.TAUROS,26);
				trainer[1].setHostile(true);
				trainer[1].setLocation(45,9);
				trainer[1].setPreMessage("Hey! Did you see? This route has a Pokemon Center!");
				trainer[1].setPostMessage("And now I have to use it...again.");
				trainer[1].setDirection(90);
				trainer[1].setViewRange(3);

				trainer[2]=new Trainer(Trainer.TrainerType.CODER,"Lando",Pokemon.Species.RATICATE,Pokemon.Species.PIDGEOTTO,27);
				trainer[2].setHostile(true);
				trainer[2].setLocation(29,7);
				trainer[2].setPreMessage("I'm on my way to battle Joe! Outta my way!");
				trainer[2].setPostMessage("Darn you! Maybe I should go home.");
				trainer[2].setDirection(0);
				trainer[2].setViewRange(1);

				trainer[3]=new Trainer(Trainer.TrainerType.HACKER,"Riley",Pokemon.Species.WEEPINBELL,Pokemon.Species.PIDGEOTTO,Pokemon.Species.RATICATE,24);
				trainer[3].setHostile(true);
				trainer[3].setLocation(28,20);
				trainer[3].setPreMessage("This sun is giving me a sunburn!");
				trainer[3].setPostMessage("Maybe I should get a hat like you.");
				trainer[3].setDirection(270);
				trainer[3].setViewRange(3);

				trainer[4]=new Trainer(Trainer.TrainerType.KEYBOARDER,"Huey",Pokemon.Species.CHARIZARD,38);
				trainer[4].setHostile(true);
				trainer[4].setLocation(31,29);
				trainer[4].setPreMessage("Check out my Pokemon!");
				trainer[4].setPostMessage("Perhaps I should have caught some more.");
				//trainer[4].setPostMessage("I shouldn't have expected anything less. You still have a lot of training to do though "+name+". I can only imagine our enemies will be stronger. I sure hope so. They are pathetic to me. Joe is my target.");
				trainer[4].setDirection(270);
				trainer[4].setViewRange(2);

				mapItems[0]=new Item(Item.Type.WATER_STONE,new Point(25,7));
				mapItems[1]=new Item(Item.Type.ULTRA_BALL,new Point(48,28));
				mapItems[2]=new Item(Item.Type.EXPERIENCE_ALL,new Point(35,10));

				loadItemData();
				for(int i=0; i<foundItem.length; i++)
				{
					mapItems[i].found=foundItem[i];
				}
				break;
			case Streamreader_Hotel:
				tileSet = OUTDOORS;
				widthHeight.x = 50;
				widthHeight.y = 44;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("StreamReaderHotel.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/5_streamreader_hotel.mid");
				bgm=JApplet.newAudioClip(url);

				numTrainers=3;
				trainer=new Trainer[numTrainers];
				numItems=0;
				mapItems=new Item[numItems];
				foundItem=new boolean[numItems];

				trainer[0]=new Trainer(Trainer.TrainerType.CYPHER,"Bebe",Pokemon.Species.CATERPIE,5);
				trainer[0].setHostile(false);
				trainer[0].setLocation(21,7);
				//trainer[0].setPreMessage("Hey Trainer! When you see another trainer, you have to battle! Let's go!");
				trainer[0].setPostMessage("Jordan the gym leader is so kind to everyone!");
				trainer[0].setDirection(270);
				trainer[0].setViewRange(0);

				trainer[1]=new Trainer(Trainer.TrainerType.PROGRAMMER,"Yacob",Pokemon.Species.CATERPIE,5);
				trainer[1].setHostile(false);
				trainer[1].setLocation(19,26);
				trainer[1].setPostMessage("This place is so soothing...");
				trainer[1].setDirection(90);

				trainer[2]=new Trainer(Trainer.TrainerType.PROFESSOR,"Brutus",true);
				trainer[2].setHostile(false);
				trainer[2].setLocation(6,17);
				trainer[2].setPostMessage("Hello there son. Let me ask you a question. Have you ever wanted to push boulders out of the way? Or punch Pokemon in their stomachs? With STRENGTH you can.");
				trainer[2].setDirection(270);
				loadItemData();
				break;
			case Route_8:
				tileSet = OUTDOORS;
				widthHeight.x = 56;
				widthHeight.y = 64;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("Route8.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/0d_routes4.mid");
				bgm=JApplet.newAudioClip(url);

				numTrainers=0;
				trainer=new Trainer[numTrainers];
				numItems=0;
				mapItems=new Item[numItems];
				foundItem=new boolean[numItems];
				loadItemData();
				break;
			case Route_ARRAYINDEXOUTOFBOUNDSEXCEPTION:
				tileSet = OUTDOORS;
				widthHeight.x = 50;
				widthHeight.y = 30;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("Articuno.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/0d_routes4.mid");
				bgm=JApplet.newAudioClip(url);
				loadItemData();
				break;
			case Route_9:
				tileSet = OUTDOORS;
				widthHeight.x = 40;
				widthHeight.y = 90;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("Route9.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/0d_routes3.mid");
				bgm=JApplet.newAudioClip(url);

				numTrainers=5;
				trainer=new Trainer[numTrainers];
				numItems=3;
				mapItems=new Item[numItems];
				foundItem=new boolean[numItems];

				trainer[0]=new Trainer(Trainer.TrainerType.ENGINEER,"Smithy",Pokemon.Species.GEODUDE,Pokemon.Species.MEOWTH,Pokemon.Species.ABRA,25);
				trainer[0].setHostile(true);
				trainer[0].setLocation(9,20);
				trainer[0].setPreMessage("I jumped over Snorlax to get here. What about you?");
				trainer[0].setPostMessage("Maybe I should have caught it instead.");
				trainer[0].setDirection(90);
				trainer[0].setViewRange(2);

				trainer[1]=new Trainer(Trainer.TrainerType.JAVA,"GRUNT",Pokemon.Species.RATICATE,Pokemon.Species.EKANS,26);
				trainer[1].setHostile(true);
				trainer[1].setLocation(17,15);
				trainer[1].setPreMessage("You insolent brat! Bow to Team Java! We will take this island!");
				trainer[1].setPostMessage("Curses. It's only a matter of time now!");
				trainer[1].setDirection(0);
				trainer[1].setViewRange(3);

				trainer[2]=new Trainer(Trainer.TrainerType.CODER,"Luke",Pokemon.Species.PONYTA,Pokemon.Species.PIDGEOTTO,27);
				trainer[2].setHostile(true);
				trainer[2].setLocation(32,23);
				trainer[2].setPreMessage("I think that Pokemon battles are like chess matches.");
				trainer[2].setPostMessage("I'm much better at chess. We should play that instead.");
				trainer[2].setDirection(180);
				trainer[2].setViewRange(4);

				trainer[3]=new Trainer(Trainer.TrainerType.HACKER,"Rick",Pokemon.Species.WEEPINBELL,Pokemon.Species.PIDGEOTTO,Pokemon.Species.HORSEA,24);
				trainer[3].setHostile(true);
				trainer[3].setLocation(23,32);
				trainer[3].setPreMessage("Om nom nom. Do you eat sushi?");
				trainer[3].setPostMessage("You made me drop it!!!");
				trainer[3].setDirection(0);
				trainer[3].setViewRange(3);

				trainer[4]=new Trainer(Trainer.TrainerType.BABE,"Sandra",Pokemon.Species.HYPNO,Pokemon.Species.BEEDRILL,26);
				trainer[4].setHostile(true);
				trainer[4].setLocation(18,79);
				trainer[4].setPreMessage("Hey guess what?!?!");
				trainer[4].setPostMessage("Well now I'm not telling you!");
				//trainer[4].setPostMessage("I shouldn't have expected anything less. You still have a lot of training to do though "+name+". I can only imagine our enemies will be stronger. I sure hope so. They are pathetic to me. Joe is my target.");
				trainer[4].setDirection(180);
				trainer[4].setViewRange(4);

				mapItems[0]=new Item(Item.Type.FIRE_STONE,new Point(35,63));
				mapItems[1]=new Item(Item.Type.MAX_POTION,new Point(28,85));
				mapItems[2]=new Item(Item.Type.LEAF_STONE,new Point(4,78));

				loadItemData();
				for(int i=0; i<foundItem.length; i++)
				{
					mapItems[i].found=foundItem[i];
				}
				break;
			case Recursive_Hot_Springs:
				tileSet = OUTDOORS;
				widthHeight.x = 40;
				widthHeight.y = 60;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("Recursive.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/6_recursive_hot_springs.mid");
				bgm=JApplet.newAudioClip(url);

				numTrainers=5;
				trainer=new Trainer[numTrainers];
				numItems=3;
				mapItems=new Item[numItems];
				foundItem=new boolean[numItems];

				trainer[0]=new Trainer(Trainer.TrainerType.PROFESSOR,"Surfer",true);
				trainer[0].setHostile(false);
				trainer[0].setLocation(16,52);
				//trainer[0].setPreMessage("Ahh...so we meet again my young padawan.");
				trainer[0].setPostMessage("Hello there sonny. It looks like you have no way to heal your Pokemon in the hot springs. Here, take this HM for SURF so you can heal your Pokemon here. And you can SURF other places too!");
				trainer[0].setDirection(270);
				trainer[0].setViewRange(0);

				trainer[1]=new Trainer(Trainer.TrainerType.PROGRAMMER,"Hansel",Pokemon.Species.RATTATA,Pokemon.Species.PIKACHU,20);
				trainer[1].setHostile(false);
				trainer[1].setLocation(10,34);
				//trainer[1].setPreMessage("Mount Java is close! I'll beat you there!");
				trainer[1].setPostMessage("SURF is such a handy move to have! Prof. Surfer is too nice!");
				trainer[1].setDirection(270);
				trainer[1].setViewRange(3);

				trainer[2]=new Trainer(Trainer.TrainerType.NERDY_BIKER,"Lucas",Pokemon.Species.RATICATE,Pokemon.Species.PIDGEOTTO,22);
				trainer[2].setHostile(false);
				trainer[2].setLocation(21,20);
				//trainer[2].setPreMessage("I'm tired, but not too tired for a battle!");
				trainer[2].setPostMessage("I visit the hot springs every day to heal my Pokemon!");
				trainer[2].setDirection(180);
				trainer[2].setViewRange(0);

				trainer[3]=new Trainer(Trainer.TrainerType.BABE,"Lulu",Pokemon.Species.WEEPINBELL,Pokemon.Species.PIDGEOTTO,Pokemon.Species.RATTATA,24);
				trainer[3].setHostile(false);
				trainer[3].setLocation(27,12);
				//trainer[3].setPreMessage("I saw a spikey red-head nearby. You know him?");
				trainer[3].setPostMessage("They don't allow people in the hot spring. Only Pokemon.");
				trainer[3].setDirection(270);
				trainer[3].setViewRange(0);

				if(timesBeatRival==3)
				{
					trainer[4]=new Trainer(Trainer.TrainerType.RIVAL,rivalName,Pokemon.Species.RAICHU,Pokemon.Species.VENUSAUR,Pokemon.Species.BLASTOISE,Pokemon.Species.CHARMELEON,Pokemon.Species.LAPRAS,Mechanics.getHighestLevel(partyPokemon,pcPokemon));
					trainer[4].setHostile(true);
					trainer[4].setLocation(23,37);
					trainer[4].setPreMessage("Oh "+name+". You're so predictable. I knew you'd show up here. Everyone on this island is beginning to talk about us. They fear our awesome power. However, you seem to be more liked than me. Heh, no matter. Popularity doesn't win Pokemon battles!");
					trainer[4].setPostMessage("Confound it. How do you always best me "+name+"? Your Pokemon must really love you. There is no doubt about it. Well I'm going to find a legendary Pokemon. The next time we fight, you'll feel its awesome might!");
					trainer[4].setDirection(90);
					trainer[4].setViewRange(1);
				}
				else
				{
					trainer[4]=new Trainer(Trainer.TrainerType.NEWB,"Jacobin",Pokemon.Species.CHARMELEON,partyPokemon[0].level);
					trainer[4].setHostile(false);
					trainer[4].setLocation(23,37);
					trainer[4].setPostMessage("This icy gym gives me goosebumps! I'm not going in there anymore.");
					//trainer[4].setPostMessage("I shouldn't have expected anything less. You still have a lot of training to do though "+name+". I can only imagine our enemies will be stronger. I sure hope so. They are pathetic to me. Joe is my target.");
					trainer[4].setDirection(90);
					trainer[4].setViewRange(0);
				}

				mapItems[0]=new Item(Item.Type.FULL_RESTORE,new Point(7,12));
				mapItems[1]=new Item(Item.Type.REVIVE,new Point(31,25));
				mapItems[2]=new Item(Item.Type.FRESH_WATER,new Point(24,41));

				loadItemData();
				for(int i=0; i<foundItem.length; i++)
				{
					mapItems[i].found=foundItem[i];
				}
				break;
			case Route_10:
				tileSet = OUTDOORS;
				widthHeight.x = 40;
				widthHeight.y = 50;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("Route10.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/0d_routes2.mid");
				bgm=JApplet.newAudioClip(url);

				numTrainers=5;
				trainer=new Trainer[numTrainers];
				numItems=0;
				mapItems=new Item[numItems];
				foundItem=new boolean[numItems];

				trainer[0]=new Trainer(Trainer.TrainerType.DEBUGGER,"Metro",Pokemon.Species.SEEL,Pokemon.Species.PERSIAN,Pokemon.Species.CLEFAIRY,32);
				trainer[0].setHostile(true);
				trainer[0].setLocation(20,14);
				trainer[0].setPreMessage("You say get 'em?");
				trainer[0].setPostMessage("...I would have said got 'em.");
				trainer[0].setDirection(180);
				trainer[0].setViewRange(2);

				trainer[1]=new Trainer(Trainer.TrainerType.JAVA,"GRUNT",Pokemon.Species.RATICATE,Pokemon.Species.WEEZING,34);
				trainer[1].setHostile(true);
				trainer[1].setLocation(17,18);
				trainer[1].setPreMessage("Team Java is getting this island back. Get out of our way!");
				trainer[1].setPostMessage("Our leader will know about this!!!");
				trainer[1].setDirection(0);
				trainer[1].setViewRange(2);

				trainer[2]=new Trainer(Trainer.TrainerType.CODER,"Lex",Pokemon.Species.HITMONLEE,Pokemon.Species.GRAVELER,36);
				trainer[2].setHostile(true);
				trainer[2].setLocation(32,23);
				trainer[2].setPreMessage("I'm your Kryptonite!");
				trainer[2].setPostMessage("You're not Superman are you?");
				trainer[2].setDirection(0);
				trainer[2].setViewRange(4);

				trainer[3]=new Trainer(Trainer.TrainerType.HACKER,"Wayne",Pokemon.Species.POLIWHIRL,Pokemon.Species.CHANSEY,Pokemon.Species.PINSIR,32);
				trainer[3].setHostile(true);
				trainer[3].setLocation(17,26);
				trainer[3].setPreMessage("Dude, we have to battle! ");
				trainer[3].setPostMessage("Dang it. Rematch?");
				trainer[3].setDirection(0);
				trainer[3].setViewRange(2);

				trainer[4]=new Trainer(Trainer.TrainerType.CYPHER,"Shelley",Pokemon.Species.GROWLITHE,Pokemon.Species.VENONAT,31);
				trainer[4].setHostile(true);
				trainer[4].setLocation(16,34);
				trainer[4].setPreMessage("I see you!!!");
				trainer[4].setPostMessage("Don't look at me like that!");
				//trainer[4].setPostMessage("I shouldn't have expected anything less. You still have a lot of training to do though "+name+". I can only imagine our enemies will be stronger. I sure hope so. They are pathetic to me. Joe is my target.");
				trainer[4].setDirection(0);
				trainer[4].setViewRange(5);

				loadItemData();
				break;
			case Route_11:
				tileSet = OUTDOORS;
				widthHeight.x = 70;
				widthHeight.y = 40;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("Route11.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/0d_routes5.mid");
				bgm=JApplet.newAudioClip(url);

				numTrainers=4;
				trainer=new Trainer[numTrainers];
				numItems=3;
				mapItems=new Item[numItems];
				foundItem=new boolean[numItems];

				trainer[0]=new Trainer(Trainer.TrainerType.PROFESSOR,"Smith",Pokemon.Species.DRATINI,35);
				trainer[0].setHostile(true);
				trainer[0].setLocation(10,2);
				trainer[0].setPreMessage("Would you like to see my rare Pokemon?");
				trainer[0].setPostMessage("I guess rarity and power aren't exactly correlated.");
				trainer[0].setDirection(270);
				trainer[0].setViewRange(3);

				trainer[1]=new Trainer(Trainer.TrainerType.PROGRAMMER,"Zimmer",Pokemon.Species.RATTATA,Pokemon.Species.PIKACHU,38);
				trainer[1].setHostile(true);
				trainer[1].setLocation(10,34);
				trainer[1].setPreMessage("Enumville is nearby. You're not stopping me!");
				trainer[1].setPostMessage("Grr. You sidetracked me.");
				trainer[1].setDirection(90);
				trainer[1].setViewRange(3);

				trainer[2]=new Trainer(Trainer.TrainerType.NERDY_BIKER,"Letty",Pokemon.Species.RATICATE,Pokemon.Species.PIDGEOTTO,34);
				trainer[2].setHostile(true);
				trainer[2].setLocation(21,20);
				trainer[2].setPreMessage("Hey kid, give me your money.");
				trainer[2].setPostMessage("Crap. Don't beat me up!");
				trainer[2].setDirection(180);
				trainer[2].setViewRange(3);

				trainer[3]=new Trainer(Trainer.TrainerType.BABE,"Lucy",Pokemon.Species.NIDORINO,Pokemon.Species.NIDORINA,Pokemon.Species.OMASTAR,36);
				trainer[3].setHostile(true);
				trainer[3].setLocation(62,26);
				trainer[3].setPreMessage("Hey there cutie. Let's battle.");
				trainer[3].setPostMessage("Darn it! I'm not giving you my phone number now!");
				trainer[3].setDirection(270);
				trainer[3].setViewRange(3);

				mapItems[0]=new Item(Item.Type.REVIVE,new Point(9,35));
				mapItems[1]=new Item(Item.Type.ANTIDOTE,new Point(3,10));
				mapItems[2]=new Item(Item.Type.NUGGET,new Point(19,3));

				loadItemData();
				for(int i=0; i<foundItem.length; i++)
				{
					mapItems[i].found=foundItem[i];
				}
				break;
			case Enumville:
				tileSet = OUTDOORS;
				widthHeight.x = 50;
				widthHeight.y = 40;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("Enumville.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/0d_routes5.mid");
				bgm=JApplet.newAudioClip(url);

				numTrainers=3;
				trainer=new Trainer[numTrainers];
				numItems=1;
				mapItems=new Item[numItems];
				foundItem=new boolean[numItems];

				trainer[0]=new Trainer(Trainer.TrainerType.NEWB,"Smith",Pokemon.Species.DRATINI,35);
				trainer[0].setHostile(false);
				trainer[0].setLocation(8,17);
				trainer[0].setPreMessage("Would you like to see my rare Pokemon?");
				trainer[0].setPostMessage("I wonder what this town is named after...");
				trainer[0].setDirection(270);
				trainer[0].setViewRange(3);

				trainer[1]=new Trainer(Trainer.TrainerType.PROGRAMMER,"Zidane",Pokemon.Species.RATTATA,Pokemon.Species.PIKACHU,38);
				trainer[1].setHostile(false);
				trainer[1].setLocation(13,34);
				trainer[1].setPreMessage("Enumville is nearby. You're not stopping me!");
				trainer[1].setPostMessage("I think Polymorph Town is supposed to be here somewhere...");
				trainer[1].setDirection(90);
				trainer[1].setViewRange(3);

				trainer[2]=new Trainer(Trainer.TrainerType.ENGINEER,"Jasau",Pokemon.Species.RATICATE,Pokemon.Species.PIDGEOTTO,34);
				trainer[2].setHostile(true);
				trainer[2].setLocation(29,27);
				trainer[2].setPreMessage("Hey kid, give me your money.");
				trainer[2].setPostMessage("Hey dude. Look at these flowers. They're so pink.");
				trainer[2].setDirection(180);
				trainer[2].setViewRange(3);

				mapItems[0]=new Item(Item.Type.MAX_REPEL,new Point(20,9));

				loadItemData();
				for(int i=0; i<foundItem.length; i++)
				{
					mapItems[i].found=foundItem[i];
				}
				break;
			case Route_12:
				tileSet = OUTDOORS;
				widthHeight.x = 50;
				widthHeight.y = 72;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("Route12.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/0d_routes4.mid");
				bgm=JApplet.newAudioClip(url);

				numTrainers=0;
				trainer=new Trainer[numTrainers];
				numItems=0;
				mapItems=new Item[numItems];
				foundItem=new boolean[numItems];

				loadItemData();
				break;
			case Polymorph_Town:
				tileSet = OUTDOORS;
				widthHeight.x = 50;
				widthHeight.y = 60;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("Polymorph.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/7_polymorph_town.mid");
				bgm=JApplet.newAudioClip(url);

				numTrainers=5;
				trainer=new Trainer[numTrainers];
				numItems=1;
				mapItems=new Item[numItems];
				foundItem=new boolean[numItems];

				trainer[0]=new Trainer(Trainer.TrainerType.PROFESSOR,"Roderick Jr.",true);
				trainer[0].setHostile(false);
				trainer[0].setLocation(22,51);
				//trainer[0].setPreMessage("Ahh...so we meet again my young padawan.");
				trainer[0].setPostMessage("Hello hello! You look like you like to fish. Take this GOOD ROD. It will make you a pretty good fisherman, laddie.");
				trainer[0].setDirection(270);
				trainer[0].setViewRange(0);

				trainer[1]=new Trainer(Trainer.TrainerType.DEBUGGER,"Perry",Pokemon.Species.RATTATA,Pokemon.Species.PIKACHU,20);
				trainer[1].setHostile(false);
				trainer[1].setLocation(30,44);
				//trainer[1].setPreMessage("Mount Java is close! I'll beat you there!");
				trainer[1].setPostMessage("You know, Polymorph Town always was my favorite town. No lie!");
				trainer[1].setDirection(270);
				trainer[1].setViewRange(3);

				trainer[2]=new Trainer(Trainer.TrainerType.NERDY_BIKER,"Bobbo",Pokemon.Species.RATICATE,Pokemon.Species.PIDGEOTTO,22);
				trainer[2].setHostile(false);
				trainer[2].setLocation(37,37);
				//trainer[2].setPreMessage("I'm tired, but not too tired for a battle!");
				trainer[2].setPostMessage("I flew here on my FEAROW to challenge James! I hear he's really good!");
				trainer[2].setDirection(90);
				trainer[2].setViewRange(0);

				trainer[3]=new Trainer(Trainer.TrainerType.CYPHER,"Ruth",Pokemon.Species.WEEPINBELL,Pokemon.Species.PIDGEOTTO,Pokemon.Species.RATTATA,24);
				trainer[3].setHostile(false);
				trainer[3].setLocation(27,9);
				//trainer[3].setPreMessage("I saw a spikey red-head nearby. You know him?");
				trainer[3].setPostMessage("I love smelling these wonderful flowers!");
				trainer[3].setDirection(270);
				trainer[3].setViewRange(0);

				trainer[4]=new Trainer(Trainer.TrainerType.NEWB,"Cody",Pokemon.Species.CHARMELEON,partyPokemon[0].level);
				trainer[4].setHostile(false);
				trainer[4].setLocation(21,31);
				trainer[4].setPostMessage("This is such an odd body of water...");
				//trainer[4].setPostMessage("I shouldn't have expected anything less. You still have a lot of training to do though "+name+". I can only imagine our enemies will be stronger. I sure hope so. They are pathetic to me. Joe is my target.");
				trainer[4].setDirection(0);
				trainer[4].setViewRange(0);

				mapItems[0]=new Item(Item.Type.MAX_REVIVE,new Point(13,28));

				loadItemData();
				for(int i=0; i<foundItem.length; i++)
				{
					mapItems[i].found=foundItem[i];
				}
				break;
			case Binary_City:
				tileSet = OUTDOORS;
				widthHeight.x = 60;
				widthHeight.y = 50;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("Binary.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/8_binary_city.mid");
				bgm=JApplet.newAudioClip(url);

				numTrainers=0;
				trainer=new Trainer[numTrainers];
				numItems=0;
				mapItems=new Item[numItems];
				loadItemData();
				break;
			case Route_13:
				tileSet = OUTDOORS;
				widthHeight.x = 60;
				widthHeight.y = 50;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("Route13.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/0d_routes.mid");
				bgm=JApplet.newAudioClip(url);

				numTrainers=0;
				trainer=new Trainer[numTrainers];
				numItems=0;
				mapItems=new Item[numItems];
				loadItemData();
				break;
			case Route_7:
				tileSet = OUTDOORS;
				widthHeight.x = 60;
				widthHeight.y = 50;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("Route7.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/0d_routes3.mid");
				bgm=JApplet.newAudioClip(url);
				numTrainers=3;
				trainer=new Trainer[numTrainers];
				numItems=0;
				mapItems=new Item[numItems];

				if(badges!=8)
				{
					numTrainers=3;
					trainer=new Trainer[numTrainers];
					trainer[0]=new Trainer(Trainer.TrainerType.JAVA,"GRUNT",Pokemon.Species.CHARMELEON,2);
					trainer[0].setHostile(false);
					trainer[0].setLocation(35,4);
					trainer[0].setPostMessage("Get out of here you blithering swine!");
					trainer[0].setDirection(0);
					trainer[0].setViewRange(0);

					trainer[1]=new Trainer(Trainer.TrainerType.JAVA,"GRUNT",Pokemon.Species.CHARMELEON,2);
					trainer[1].setHostile(false);
					trainer[1].setLocation(36,5);
					trainer[1].setPostMessage("Get out of here you blithering swine!");
					trainer[1].setDirection(90);
					trainer[1].setViewRange(0);

					trainer[2]=new Trainer(Trainer.TrainerType.JAVA,"GRUNT",Pokemon.Species.CHARMELEON,2);
					trainer[2].setHostile(false);
					trainer[2].setLocation(37,4);
					trainer[2].setPostMessage("Get out of here you blithering swine!");
					trainer[2].setDirection(180);
					trainer[2].setViewRange(0);
				}
				else if(!objectiveComplete[9])
				{
					numTrainers=2;
					trainer=new Trainer[numTrainers];

					numTrainers=3;
					trainer=new Trainer[numTrainers];
					trainer[0]=new Trainer(Trainer.TrainerType.JAVA,"GRUNT",Pokemon.Species.CHARMELEON,2);
					trainer[0].setHostile(false);
					trainer[0].setLocation(2,44);
					trainer[0].setPostMessage("Get out of here you blithering swine!");
					trainer[0].setDirection(0);
					trainer[0].setViewRange(0);

					trainer[1]=new Trainer(Trainer.TrainerType.JAVA,"GRUNT",Pokemon.Species.CHARMELEON,2);
					trainer[1].setHostile(false);
					trainer[1].setLocation(2,45);
					trainer[1].setPostMessage("Get out of here you blithering swine!");
					trainer[1].setDirection(0);
					trainer[1].setViewRange(0);

				}
				else
				{
					numTrainers=0;
					trainer=new Trainer[numTrainers];
				}

				loadItemData();
				break;
			case Null_Zone:
				tileSet = OUTDOORS;
				widthHeight.x = 25;
				widthHeight.y = 25;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("Null.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/0d_routes3.mid");
				bgm=JApplet.newAudioClip(url);
				loadItemData();
				break;
			case Champions_Walk:
				tileSet = OUTDOORS;
				widthHeight.x = 100;
				widthHeight.y = 40;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("Champion.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/0g_champions_walk.mid");
				bgm=JApplet.newAudioClip(url);
				loadItemData();
				break;
			case Victory_Road:
				tileSet = OUTDOORS;
				widthHeight.x = 40;
				widthHeight.y = 60;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("VictoryRoad.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/0g_champions_walk.mid");
				bgm=JApplet.newAudioClip(url);

				if(timesBeatRival==4)
				{
					numTrainers=1;
					trainer=new Trainer[numTrainers];
					trainer[0]=new Trainer(Trainer.TrainerType.RIVAL,rivalName,Pokemon.Species.RAICHU,Pokemon.Species.VENUSAUR,Pokemon.Species.BLASTOISE,Pokemon.Species.CHARIZARD,Pokemon.Species.SNORLAX,Pokemon.Species.LAPRAS,Mechanics.getHighestLevel(partyPokemon,pcPokemon));
					trainer[0].setHostile(true);
					trainer[0].setLocation(14,20);
					trainer[0].setPreMessage(name+". You're always around, aren't you. I'm through playing games with you, you silly boy. I have a secret Pokemon with me now. "+name+"! Let this be our final battle!");
					trainer[0].setPostMessage("Fine. Take on Joe. You've earned it. I'll be rooting for you...in secret.");
					trainer[0].setDirection(0);
					trainer[0].setViewRange(2);
				}

				numItems=0;
				mapItems=new Item[numItems];

				loadItemData();
				break;
			case Peach_City:
				tileSet = OUTDOORS;
				widthHeight.x = 80;
				widthHeight.y = 48;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("VersionCityP.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/10_peachcream_city.mid");
				bgm=JApplet.newAudioClip(url);
				loadItemData();
				break;
			case Cream_City:
				tileSet = OUTDOORS;
				widthHeight.x = 80;
				widthHeight.y = 48;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("VersionCityC.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/10_peachcream_city.mid");
				bgm=JApplet.newAudioClip(url);
				loadItemData();
				break;
			case Babbs_Lab:
				tileSet = INDOORS;
				widthHeight.x = 10;
				widthHeight.y = 13;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("Babb.tilemap");
				url=JokemonDriver.class.getResource("Music/oak-s-lab.mid");
				bgm=JApplet.newAudioClip(url);

				numTrainers=3;
				trainer=new Trainer[numTrainers];
				numItems=0;
				mapItems=new Item[numItems];

				if(!objectiveComplete[10])
				{
					trainer[0]=new Trainer(Trainer.TrainerType.BABB,"",Pokemon.Species.MEWTWO,105);
					trainer[0].setHostile(false);
					trainer[0].setLocation(5,1);
					//trainer[0].setPreMessage("");
					trainer[0].setPostMessage("Welcome to Joe's Island "+name+"! My name is Babb! I'm Joe's uncle. He is an entrepreneur that bought this"+
						" island and put Pokemon on it. Since you won a trip here like many others, your goals while here are to catch all 151 Pokemon, defeat"+
						" the eight Gym Leaders, defeat Joe's Elite 4, and ultimately defeat Joe. Good luck "+name+"!");
					trainer[0].setDirection(270);
					trainer[0].setViewRange(2);
				}
				else
				{
					trainer[0]=new Trainer(Trainer.TrainerType.BABB,"",Pokemon.Species.MEWTWO,Pokemon.Species.MEW,Pokemon.Species.MISSINGNO,Pokemon.Species.ARTICUNO,Pokemon.Species.ZAPDOS,Pokemon.Species.MOLTRES,105);
					trainer[0].setHostile(true);
					trainer[0].setLocation(5,1);
					trainer[0].setPreMessage(name+"! You've come a long way since I first spoke with you! You and your Pokemon must be very strong now! How about battling me? If you thought Joe was difficult, you haven't seen anything yet. Hahaha!");
					trainer[0].setPostMessage("Congratulations "+name+"! You've beaten me! Even with my incredible team, your team proved to be more incredible. Well, there's not much left for you to do, except complete the Pokedex. Ideally, you'd have that done by now! Slacking are you? Here, watch the credits!");
					trainer[0].setDirection(270);
					trainer[0].setViewRange(0);
				}

				trainer[1]=new Trainer(Trainer.TrainerType.CODER,"Ryan",Pokemon.Species.CATERPIE,5);
				trainer[1].setHostile(false);
				trainer[1].setLocation(7,9);
				//trainer[0].setPreMessage("");
				trainer[1].setPostMessage("I'm one of Babb's assistants! He's really smart!");
				trainer[1].setDirection(180);
				trainer[1].setViewRange(2);

				trainer[2]=new Trainer(Trainer.TrainerType.BABE,"Chelsey",Pokemon.Species.CATERPIE,5);
				trainer[2].setHostile(false);
				trainer[2].setLocation(1,11);
				//trainer[0].setPreMessage("");
				trainer[2].setPostMessage("Babb is the authority on Pokemon here on the island! He's also a tough battler!");
				trainer[2].setDirection(0);
				trainer[2].setViewRange(2);
				break;
			case Generic_1:
				tileSet = INDOORS;
				widthHeight.x = 8;
				widthHeight.y = 8;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("Generic1.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/house.mid");
				bgm=JApplet.newAudioClip(url);

				numTrainers=1;
				trainer=new Trainer[numTrainers];
				numItems=0;
				mapItems=new Item[numItems];

				if(returnArea==Area.Villa_Del_Joe&&houseInt%5==0)
				{
					trainer[0]=new Trainer(Trainer.TrainerType.NERDY_BIKER,"Bike Enthusiast",true);
					trainer[0].setHostile(false);
					trainer[0].setLocation(3,2);
					//trainer[0].setPreMessage("");
					trainer[0].setPostMessage("Vroom vrooom!!! I love bicycles! If you've got 3 badges, you've got a bike too, dude!");
					trainer[0].setDirection(270);
					trainer[0].setViewRange(0);
				}
				else
				switch(houseInt%5)
				{
					default:
						trainer[0]=new Trainer(Trainer.TrainerType.CODER,"Krillin",Pokemon.Species.CATERPIE,5);
						trainer[0].setHostile(false);
						trainer[0].setLocation(3,2);
						//trainer[0].setPreMessage("");
						trainer[0].setPostMessage("How can Joe afford all of these houses?");
						trainer[0].setDirection(270);
						trainer[0].setViewRange(0);
						break;
					case 0:
						trainer[0]=new Trainer(Trainer.TrainerType.NEWB,"Bud",Pokemon.Species.CATERPIE,5);
						trainer[0].setHostile(false);
						trainer[0].setLocation(3,2);
						//trainer[0].setPreMessage("");
						trainer[0].setPostMessage("I got this house for free! Babb gave it to me!");
						trainer[0].setDirection(270);
						trainer[0].setViewRange(0);
						break;
					case 1:
						trainer[0]=new Trainer(Trainer.TrainerType.NEWB,"Timothy",Pokemon.Species.CATERPIE,5);
						trainer[0].setHostile(false);
						trainer[0].setLocation(3,2);
						//trainer[0].setPreMessage("");
						trainer[0].setPostMessage("Joe is my role model!");
						trainer[0].setDirection(270);
						trainer[0].setViewRange(0);
						break;
					case 2:
						trainer[0]=new Trainer(Trainer.TrainerType.PROFESSOR,"Desmond",Pokemon.Species.CATERPIE,5);
						trainer[0].setHostile(false);
						trainer[0].setLocation(3,2);
						//trainer[0].setPreMessage("");
						trainer[0].setPostMessage("I've learned many things over the years, but Joe may have surpassed my knowledge.");
						trainer[0].setDirection(270);
						trainer[0].setViewRange(0);
						break;
					case 3:
						trainer[0]=new Trainer(Trainer.TrainerType.HACKER,"Kurt",Pokemon.Species.CATERPIE,5);
						trainer[0].setHostile(false);
						trainer[0].setLocation(3,2);
						//trainer[0].setPreMessage("");
						trainer[0].setPostMessage("I wonder if there is a Pokemon Olympics...");
						trainer[0].setDirection(270);
						trainer[0].setViewRange(0);
						break;
				}
				break;
			case Rival_House:
				tileSet = INDOORS;
				widthHeight.x = 12;
				widthHeight.y = 9;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("RivalHouse.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/house.mid");
				bgm=JApplet.newAudioClip(url);

				numTrainers=1;
				trainer=new Trainer[numTrainers];
				numItems=0;
				mapItems=new Item[numItems];

				trainer[0]=new Trainer(Trainer.TrainerType.CYPHER,rivalName+"'s Sister",Pokemon.Species.CATERPIE,5);
				trainer[0].setHostile(false);
				trainer[0].setLocation(5,5);
				//trainer[0].setPreMessage("");
				trainer[0].setPostMessage("Hey "+name+"! "+rivalName+" isn't here right now.");
				trainer[0].setDirection(270);
				trainer[0].setViewRange(0);
				break;
			case Gym_1:
				tileSet = INDOORS;
				widthHeight.x = 15;
				widthHeight.y = 15;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("Gym1.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/0f_gym.mid");
				bgm=JApplet.newAudioClip(url);

				numTrainers=4;
				trainer=new Trainer[numTrainers];
				numItems=0;
				mapItems=new Item[numItems];

				if(objectiveComplete[10])
					levelBoost=50;

				trainer[0]=new Trainer(Trainer.TrainerType.ENGINEER,"Jeffery",Pokemon.Species.CATERPIE,5);
				trainer[0].setHostile(false);
				trainer[0].setLocation(8,12);
				//trainer[0].setPreMessage("");
				trainer[0].setPostMessage("Welcome to the Stringville Gym! You may need to train on Route 0 first.");
				trainer[0].setDirection(270);
				trainer[0].setViewRange(0);

				trainer[1]=new Trainer(Trainer.TrainerType.DEBUGGER,"Dustin",Pokemon.Species.METAPOD,Pokemon.Species.KAKUNA,8+levelBoost);
				trainer[1].setHostile(true);
				trainer[1].setLocation(5,11);
				trainer[1].setPreMessage("Gyms are for hardcore trainers! Are you ready to battle?");
				trainer[1].setPostMessage("Looks like you're hardcore enough!");
				trainer[1].setDirection(90);
				trainer[1].setViewRange(3);

				trainer[2]=new Trainer(Trainer.TrainerType.DEBUGGER,"Rex",Pokemon.Species.WEEDLE,Pokemon.Species.CATERPIE,8+levelBoost);
				trainer[2].setHostile(true);
				trainer[2].setLocation(1,4);
				trainer[2].setPreMessage("Jenny is tough, but I'm tough too!");
				trainer[2].setPostMessage("You're tough as nails!");
				trainer[2].setDirection(0);
				trainer[2].setViewRange(1);

				if(objectiveComplete[10]||badges==0&&objectiveComplete[0])
				{
					trainer[3]=new Trainer(Trainer.TrainerType.GYM_LEADER,"Jenny",Pokemon.Species.BUTTERFREE,Pokemon.Species.BEEDRILL,Pokemon.Species.SCYTHER,Pokemon.Species.PINSIR,12+levelBoost);
					trainer[3].setHostile(true);
					trainer[3].setLocation(9,1);
					trainer[3].setPreMessage("Hello "+name+"! I've heard a lot about you! Apparently you're one of the better trainers to come to the island. Bug Pokemon are my specialty! They are very powerful. Do you have what it takes to win? Let's find out!");
					trainer[3].setPostMessage("Excellent job "+name+"! I award you the ABSTRACT BADGE and this TM containing RAZOR WIND! Head on to the next Gym! Good luck with your journey!");
					trainer[3].setDirection(270);
					trainer[3].setViewRange(0);
				}
				else
				{
					trainer[3]=new Trainer(Trainer.TrainerType.DEBUGGER,"Chauncey",Pokemon.Species.BUTTERFREE,Pokemon.Species.BEEDRILL,Pokemon.Species.SCYTHER,Pokemon.Species.PINSIR,12);
					trainer[3].setHostile(false);
					trainer[3].setLocation(9,1);
					//trainer[3].setPreMessage("");
					trainer[3].setPostMessage("Jenny went out to catch more bugs I think.");
					trainer[3].setDirection(270);
					trainer[3].setViewRange(3);
				}
				break;
			case Gym_2:
				tileSet = INDOORS;
				widthHeight.x = 25;
				widthHeight.y = 15;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("Gym2.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/0f_gym.mid");
				bgm=JApplet.newAudioClip(url);

				numTrainers=4;
				trainer=new Trainer[numTrainers];
				numItems=0;
				mapItems=new Item[numItems];

				if(objectiveComplete[10])
					levelBoost=50;

				trainer[0]=new Trainer(Trainer.TrainerType.ENGINEER,"Jeffery",Pokemon.Species.CATERPIE,5);
				trainer[0].setHostile(false);
				trainer[0].setLocation(11,12);
				//trainer[0].setPreMessage("");
				trainer[0].setPostMessage("Welcome to the Args Harbor Gym! The prefered type here is GRASS. Be careful!");
				trainer[0].setDirection(270);
				trainer[0].setViewRange(0);

				trainer[1]=new Trainer(Trainer.TrainerType.KEYBOARDER,"William",Pokemon.Species.PARAS,Pokemon.Species.BELLSPROUT,15+levelBoost);
				trainer[1].setHostile(true);
				trainer[1].setLocation(10,10);
				trainer[1].setPreMessage("Grass Pokemon are superior! Don't you think so?");
				trainer[1].setPostMessage("I still think Grass Pokemon are better.");
				trainer[1].setDirection(0);
				trainer[1].setViewRange(3);

				trainer[2]=new Trainer(Trainer.TrainerType.HACKER,"Hal",Pokemon.Species.EXEGGCUTE,Pokemon.Species.PARAS,Pokemon.Species.BELLSPROUT,15+levelBoost);
				trainer[2].setHostile(true);
				trainer[2].setLocation(15,5);
				trainer[2].setPreMessage("You just had to come over here didn't you. Oh well, let's battle.");
				trainer[2].setPostMessage("Wowsers! You're too good.");
				trainer[2].setDirection(180);
				trainer[2].setViewRange(2);

				if(objectiveComplete[10]||badges==1)
				{
					trainer[3]=new Trainer(Trainer.TrainerType.GYM_LEADER,"Jimmy",Pokemon.Species.TANGELA,Pokemon.Species.PARAS,Pokemon.Species.EXEGGUTOR,Pokemon.Species.BELLSPROUT,Pokemon.Species.ODDISH,18+levelBoost);
					trainer[3].setHostile(true);
					trainer[3].setLocation(18,3);
					trainer[3].setPreMessage("Ah "+name+". Jenny told me that you are a formidable opponent. You bested her with Pokemon prowess. I won't be toppled so easily though. Grass Pokemon are very majestic. Let me show you!");
					trainer[3].setPostMessage("Congrats "+name+"! Here, take the NATIVE BADGE! It is a sign of your bond with your Pokemon! Take this TM containing SOLARBEAM as well. It should help you on the remainder of your quest.");
					trainer[3].setDirection(0);
					trainer[3].setViewRange(0);
				}
				else
				{
					trainer[3]=new Trainer(Trainer.TrainerType.DEBUGGER,"Chauncey",Pokemon.Species.BUTTERFREE,Pokemon.Species.BEEDRILL,Pokemon.Species.SCYTHER,Pokemon.Species.PINSIR,12);
					trainer[3].setHostile(false);
					trainer[3].setLocation(18,3);
					//trainer[3].setPreMessage("");
					trainer[3].setPostMessage("Jimmy went to sail around the island. He's not here.");
					trainer[3].setDirection(0);
					trainer[3].setViewRange(3);
				}
				break;
			case Gym_3:
				tileSet = INDOORS;
				widthHeight.x = 20;
				widthHeight.y = 20;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("Gym3.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/0f_gym.mid");
				bgm=JApplet.newAudioClip(url);

				numTrainers=4;
				trainer=new Trainer[numTrainers];
				numItems=0;
				mapItems=new Item[numItems];

				if(objectiveComplete[10])
					levelBoost=50;

				trainer[0]=new Trainer(Trainer.TrainerType.ENGINEER,"Jeffery",Pokemon.Species.CATERPIE,5);
				trainer[0].setHostile(false);
				trainer[0].setLocation(10,13);
				//trainer[0].setPreMessage("");
				trainer[0].setPostMessage("Welcome Joe's personal Gym! You need to be able to beat ELECTRIC Pokemon to win here!");
				trainer[0].setDirection(270);
				trainer[0].setViewRange(0);

				trainer[1]=new Trainer(Trainer.TrainerType.HACKER,"Dusty",Pokemon.Species.PIKACHU,Pokemon.Species.VOLTORB,20+levelBoost);
				trainer[1].setHostile(true);
				trainer[1].setLocation(5,8);
				trainer[1].setPreMessage("I'm going to shock you up!");
				trainer[1].setPostMessage("Are you wearing rubber?");
				trainer[1].setDirection(0);
				trainer[1].setViewRange(2);

				trainer[2]=new Trainer(Trainer.TrainerType.PROGRAMMER,"Rufus",Pokemon.Species.MAGNEMITE,Pokemon.Species.PIKACHU,20+levelBoost);
				trainer[2].setHostile(true);
				trainer[2].setLocation(14,4);
				trainer[2].setPreMessage("Wait! I'll battle you!");
				trainer[2].setPostMessage("You may have beaten me, but Jace will electrocute you!");
				trainer[2].setDirection(180);
				trainer[2].setViewRange(2);

				if(objectiveComplete[10]||badges==2)
				{
					trainer[3]=new Trainer(Trainer.TrainerType.GYM_LEADER,"Jace",Pokemon.Species.RAICHU,Pokemon.Species.ELECTABUZZ,Pokemon.Species.VOLTORB,Pokemon.Species.JOLTEON,Pokemon.Species.MAGNETON,24+levelBoost);
					trainer[3].setHostile(true);
					trainer[3].setLocation(10,1);
					trainer[3].setPreMessage(name+"! You're becoming a very popular trainer on this island! Many other trainers are beginning to talk about you! Some think you'll even get an opportunity to battle Joe! Not if I can help it! I'll put a shock to your system!");
					trainer[3].setPostMessage("You short circuited me "+name+"! Great job! I'll award you the STATIC BADGE and TM 24 with THUNDERBOLT. Use it well. Go all the way to Joe kiddo. I believe in you.");
					trainer[3].setDirection(270);
					trainer[3].setViewRange(0);
				}
				else
				{
					trainer[3]=new Trainer(Trainer.TrainerType.DEBUGGER,"Manchy",Pokemon.Species.RAICHU,12);
					trainer[3].setHostile(false);
					trainer[3].setLocation(10,1);
					//trainer[3].setPreMessage("");
					trainer[3].setPostMessage("Jace is rarely here now. He must be somewhere close though.");
					trainer[3].setDirection(270);
					trainer[3].setViewRange(3);
				}
				break;
			case Gym_4:
				tileSet = INDOORS;
				widthHeight.x = 20;
				widthHeight.y = 20;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("Gym4.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/0f_gym.mid");
				bgm=JApplet.newAudioClip(url);

				numTrainers=4;
				trainer=new Trainer[numTrainers];
				numItems=0;
				mapItems=new Item[numItems];

				if(objectiveComplete[10])
					levelBoost=50;

				trainer[0]=new Trainer(Trainer.TrainerType.ENGINEER,"Jeffery",Pokemon.Species.CATERPIE,5);
				trainer[0].setHostile(false);
				trainer[0].setLocation(9,16);
				//trainer[0].setPreMessage("");
				trainer[0].setPostMessage("Welcome to Mount Java Gym! Fists of fury and fast kicks rule here.");
				trainer[0].setDirection(270);
				trainer[0].setViewRange(0);

				trainer[1]=new Trainer(Trainer.TrainerType.CODER,"Jackie",Pokemon.Species.MANKEY,Pokemon.Species.MACHOP,27+levelBoost);
				trainer[1].setHostile(true);
				trainer[1].setLocation(14,11);
				trainer[1].setPreMessage("Karate is my favorite fighting style. What's yours?");
				trainer[1].setPostMessage("I have brought dishonor to this gym.");
				trainer[1].setDirection(180);
				trainer[1].setViewRange(1);

				trainer[2]=new Trainer(Trainer.TrainerType.HACKER,"Chan",Pokemon.Species.POLIWHIRL,Pokemon.Species.MACHOKE,27+levelBoost);
				trainer[2].setHostile(true);
				trainer[2].setLocation(5,13);
				trainer[2].setPreMessage("My master will have to wait. Let's battle!");
				trainer[2].setPostMessage("I have failed you my master...");
				trainer[2].setDirection(270);
				trainer[2].setViewRange(4);

				if(objectiveComplete[10]||badges==3)
				{
					trainer[3]=new Trainer(Trainer.TrainerType.GYM_LEADER,"Jin",Pokemon.Species.PRIMEAPE,Pokemon.Species.MACHAMP,Pokemon.Species.HITMONLEE,Pokemon.Species.HITMONCHAN,Pokemon.Species.POLIWRATH,32+levelBoost);
					trainer[3].setHostile(true);
					trainer[3].setLocation(9,4);
					trainer[3].setPreMessage(name+"! Your reputation grows ever higher! Just like the grass after a long rain! I will show you the power of physical strength. My Pokemon's bodies have undergone heavy training. Bring it on! Hyaaah!!!");
					trainer[3].setPostMessage(name+"! You are very strong young one! I don't know what your training routine is, but it seems to work! Here take the SUPER BADGE and this TM containing SUBMISSION! Hyaaah!");
					trainer[3].setDirection(270);
					trainer[3].setViewRange(0);
				}
				else
				{
					trainer[3]=new Trainer(Trainer.TrainerType.DEBUGGER,"Tyrus",Pokemon.Species.RAICHU,12);
					trainer[3].setHostile(false);
					trainer[3].setLocation(9,4);
					//trainer[3].setPreMessage("");
					trainer[3].setPostMessage("I bet that Jin is out training right now. In fact, I know it.");
					trainer[3].setDirection(270);
					trainer[3].setViewRange(3);
				}
				break;
			case Gym_5:
				tileSet = INDOORS;
				widthHeight.x = 20;
				widthHeight.y = 20;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("Gym5.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/0f_gym.mid");
				bgm=JApplet.newAudioClip(url);

				numTrainers=4;
				trainer=new Trainer[numTrainers];
				numItems=0;
				mapItems=new Item[numItems];

				if(objectiveComplete[10])
					levelBoost=50;

				trainer[0]=new Trainer(Trainer.TrainerType.ENGINEER,"Jeffery",Pokemon.Species.CATERPIE,5);
				trainer[0].setHostile(false);
				trainer[0].setLocation(9,14);
				//trainer[0].setPreMessage("");
				trainer[0].setPostMessage("Welcome to Streamreader Gym! Jordan and her friends use NORMAL Pokemon here!");
				trainer[0].setDirection(270);
				trainer[0].setViewRange(0);

				trainer[1]=new Trainer(Trainer.TrainerType.CYPHER,"Jenna",Pokemon.Species.JIGGLYPUFF,Pokemon.Species.CLEFAIRY,Pokemon.Species.MEOWTH,35+levelBoost);
				trainer[1].setHostile(true);
				trainer[1].setLocation(4,11);
				trainer[1].setPreMessage("My cute Pokemon will surprise you!");
				trainer[1].setPostMessage("Your Pokemon are ugly.");
				trainer[1].setDirection(180);
				trainer[1].setViewRange(2);

				trainer[2]=new Trainer(Trainer.TrainerType.BABE,"Lexi",Pokemon.Species.DITTO,Pokemon.Species.TAUROS,35+levelBoost);
				trainer[2].setHostile(true);
				trainer[2].setLocation(11,10);
				trainer[2].setPreMessage("I think my Pokemon are tough enough to take you on!");
				trainer[2].setPostMessage("Oh no! My Pokemon!");
				trainer[2].setDirection(180);
				trainer[2].setViewRange(4);

				if(objectiveComplete[10]||badges==4)
				{
					trainer[3]=new Trainer(Trainer.TrainerType.GYM_LEADER,"Jordan",Pokemon.Species.CLEFABLE,Pokemon.Species.WIGGLYTUFF,Pokemon.Species.PERSIAN,Pokemon.Species.LICKITUNG,Pokemon.Species.CHANSEY,39+levelBoost);
					trainer[3].setHostile(true);
					trainer[3].setLocation(9,6);
					trainer[3].setPreMessage("Is that you, "+name+"? Hehehe. You're cuter than I thought you'd be. I'm Jordan. I love NORMAL type Pokemon. They're so cuddly, but strong too! But enough talk, let's battle!");
					trainer[3].setPostMessage("Oh pooh. You beat me "+name+". Your Pokemon must have really strong bonds with you. I adore that! Well, here. Take the NULL BADGE and this TM for HYPER BEAM. Come see me again sometime cutie!");
					trainer[3].setDirection(270);
					trainer[3].setViewRange(0);
				}
				else
				{
					trainer[3]=new Trainer(Trainer.TrainerType.BABE,"Jordan?",Pokemon.Species.RAICHU,12);
					trainer[3].setHostile(false);
					trainer[3].setLocation(9,6);
					//trainer[3].setPreMessage("");
					trainer[3].setPostMessage("I'm not Jordan, but I sure do look like her huh?");
					trainer[3].setDirection(270);
					trainer[3].setViewRange(3);
				}
				break;
			case Gym_6:
				tileSet = INDOORS;
				widthHeight.x = 20;
				widthHeight.y = 20;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("Gym6.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/0f_gym.mid");
				bgm=JApplet.newAudioClip(url);

				numTrainers=4;
				trainer=new Trainer[numTrainers];
				numItems=0;
				mapItems=new Item[numItems];

				if(objectiveComplete[10])
					levelBoost=50;

				trainer[0]=new Trainer(Trainer.TrainerType.ENGINEER,"Jeffery",Pokemon.Species.CATERPIE,5);
				trainer[0].setHostile(false);
				trainer[0].setLocation(13,13);
				//trainer[0].setPreMessage("");
				trainer[0].setPostMessage("Welcome to the Recursive Gym! ICE is this gym's specialty!");
				trainer[0].setDirection(180);
				trainer[0].setViewRange(0);

				trainer[1]=new Trainer(Trainer.TrainerType.KEYBOARDER,"Stanley",Pokemon.Species.SEEL,Pokemon.Species.SHELLDER,Pokemon.Species.SEEL,38+levelBoost);
				trainer[1].setHostile(true);
				trainer[1].setLocation(12,0);
				trainer[1].setPreMessage("It's so slippery in here!");
				trainer[1].setPostMessage("I'm going to get some cleats for sure.");
				trainer[1].setDirection(270);
				trainer[1].setViewRange(1);

				trainer[2]=new Trainer(Trainer.TrainerType.BABE,"Martha",Pokemon.Species.DEWGONG,Pokemon.Species.SHELLDER,37+levelBoost);
				trainer[2].setHostile(true);
				trainer[2].setLocation(5,8);
				trainer[2].setPreMessage("Ouch! Did you just slide into me?");
				trainer[2].setPostMessage("Oh well. I kinda liked it...");
				trainer[2].setDirection(90);
				trainer[2].setViewRange(1);

				if(objectiveComplete[10]||badges==5)
				{
					trainer[3]=new Trainer(Trainer.TrainerType.GYM_LEADER,"Joy",Pokemon.Species.DEWGONG,Pokemon.Species.CLOYSTER,Pokemon.Species.LAPRAS,Pokemon.Species.JYNX,43+levelBoost);
					trainer[3].setHostile(true);
					trainer[3].setLocation(10,5);
					trainer[3].setPreMessage(name+". Hello. It's a pleasure to finally meet you. I heard you were very strong. Is that true? My ICE Pokemon are extremely strong. They will pose a challenge for you. We'll freeze you to the bone.");
					trainer[3].setPostMessage("Darn it. You really are as good as everyone says. I guess I should give you some rewards, huh? Ok. Here. Take the TRANSIENT BADGE and this TM for ICE BEAM. Ok. Be on your way.");
					trainer[3].setDirection(270);
					trainer[3].setViewRange(0);
				}
				else
				{
					trainer[3]=new Trainer(Trainer.TrainerType.NEWB,"Eric",Pokemon.Species.RAICHU,12);
					trainer[3].setHostile(false);
					trainer[3].setLocation(10,5);
					//trainer[3].setPreMessage("");
					trainer[3].setPostMessage("Joy isn't here. She got sick of the cold and decided to warm up.");
					trainer[3].setDirection(270);
					trainer[3].setViewRange(0);
				}
				break;
			case Gym_7:
				tileSet = INDOORS;
				widthHeight.x = 20;
				widthHeight.y = 20;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("Gym7.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/0f_gym.mid");
				bgm=JApplet.newAudioClip(url);

				numTrainers=4;
				trainer=new Trainer[numTrainers];
				numItems=0;
				mapItems=new Item[numItems];

				if(objectiveComplete[10])
					levelBoost=50;

				trainer[0]=new Trainer(Trainer.TrainerType.ENGINEER,"Jeffery",Pokemon.Species.CATERPIE,5);
				trainer[0].setHostile(false);
				trainer[0].setLocation(9,13);
				//trainer[0].setPreMessage("");
				trainer[0].setPostMessage("Welcome to Polymorph Town Gym! Beware the mental power here!");
				trainer[0].setDirection(270);
				trainer[0].setViewRange(0);

				trainer[1]=new Trainer(Trainer.TrainerType.ENGINEER,"Bill",Pokemon.Species.DROWZEE,Pokemon.Species.KADABRA,Pokemon.Species.DROWZEE,43+levelBoost);
				trainer[1].setHostile(true);
				trainer[1].setLocation(4,12);
				trainer[1].setPreMessage("You want to match wits?");
				trainer[1].setPostMessage("I concede defeat.");
				trainer[1].setDirection(180);
				trainer[1].setViewRange(1);

				trainer[2]=new Trainer(Trainer.TrainerType.PROFESSOR,"Steve",Pokemon.Species.HYPNO,Pokemon.Species.KADABRA,43+levelBoost);
				trainer[2].setHostile(true);
				trainer[2].setLocation(11,10);
				trainer[2].setPreMessage("Professors are brilliant battlers. Let me show you.");
				trainer[2].setPostMessage("...It seems that you are more brilliant.");
				trainer[2].setDirection(180);
				trainer[2].setViewRange(2);

				if(objectiveComplete[10]||badges==6)
				{
					trainer[3]=new Trainer(Trainer.TrainerType.GYM_LEADER,"James",Pokemon.Species.MR_MIME,Pokemon.Species.HYPNO,Pokemon.Species.ALAKAZAM,Pokemon.Species.JYNX,48+levelBoost);
					trainer[3].setHostile(true);
					trainer[3].setLocation(9,4);
					trainer[3].setPreMessage("Wait. Don't say anything. You're "+name+". I can read your brain waves. You've come to battle me for a badge. Don't act surprised. When you train with PSYCHIC Pokemon as much as I do, you learn a thing or two. Anyhoo, let's battle. Mind will always prevail over matter.");
					trainer[3].setPostMessage("...I did not see that coming. Wow. Congratulations. Here is the INTERFACE BADGE and this TM for PSYCHIC. Let me leave you with one more prediction. I sense that you will beat the great Joe.");
					trainer[3].setDirection(270);
					trainer[3].setViewRange(0);
				}
				else
				{
					trainer[3]=new Trainer(Trainer.TrainerType.CYPHER,"Erika",Pokemon.Species.RAICHU,12);
					trainer[3].setHostile(false);
					trainer[3].setLocation(9,4);
					//trainer[3].setPreMessage("");
					trainer[3].setPostMessage("James is out 'mental training.' Or something like that.");
					trainer[3].setDirection(270);
					trainer[3].setViewRange(0);
				}
				break;
			case Gym_8:
				tileSet = INDOORS;
				widthHeight.x = 20;
				widthHeight.y = 20;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("Gym8.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/0f_gym.mid");
				bgm=JApplet.newAudioClip(url);

				numTrainers=4;
				trainer=new Trainer[numTrainers];
				numItems=0;
				mapItems=new Item[numItems];

				if(objectiveComplete[10])
					levelBoost=50;

				trainer[0]=new Trainer(Trainer.TrainerType.ENGINEER,"Jeffery",Pokemon.Species.CATERPIE,5);
				trainer[0].setHostile(false);
				trainer[0].setLocation(7,17);
				//trainer[0].setPreMessage("");
				trainer[0].setPostMessage("Welcome to Binary City Gym! GHOST and POISON Pokemon rule here! Invisible floors too!");
				trainer[0].setDirection(270);
				trainer[0].setViewRange(0);

				trainer[1]=new Trainer(Trainer.TrainerType.HACKER,"Richard",Pokemon.Species.GASTLY,Pokemon.Species.GRIMER,Pokemon.Species.HAUNTER,45+levelBoost);
				trainer[1].setHostile(true);
				trainer[1].setLocation(7,14);
				trainer[1].setPreMessage("The undead are mighty. Can you stop them?");
				trainer[1].setPostMessage("You must already be dead.");
				trainer[1].setDirection(0);
				trainer[1].setViewRange(1);

				trainer[2]=new Trainer(Trainer.TrainerType.CODER,"Hercule",Pokemon.Species.NIDORINO,Pokemon.Species.KOFFING,45+levelBoost);
				trainer[2].setHostile(true);
				trainer[2].setLocation(12,12);
				trainer[2].setPreMessage("Bret Michaels hit it spot on.");
				trainer[2].setPostMessage("Poison Pokemon are still the best in my book.");
				trainer[2].setDirection(90);
				trainer[2].setViewRange(1);

				if(objectiveComplete[10]||badges==7)
				{
					trainer[3]=new Trainer(Trainer.TrainerType.GYM_LEADER,"Jessica",Pokemon.Species.NIDOKING,Pokemon.Species.NIDOQUEEN,Pokemon.Species.WEEZING,Pokemon.Species.ARBOK,Pokemon.Species.GENGAR,Pokemon.Species.MUK,52+levelBoost);
					trainer[3].setHostile(true);
					trainer[3].setLocation(9,2);
					trainer[3].setPreMessage(name+"! Your quest is drawing near its end! You now have seven of Joe's eight required badges! I hold the last one. You may feel that the other gym leaders posed little or no threat. Not me. If you want this badge, you're going to have to earn it!");
					trainer[3].setPostMessage("Incredible! You fainted all of my Pokemon! You really are something! I must give you the FINAL BADGE and the TM for TOXIC. Go now "+name+" to take on the Elite Four and Joe!...Or at least you should, but there's something about Team Java screwing stuff up.");
					trainer[3].setDirection(270);
					trainer[3].setViewRange(0);
				}
				else
				{
					trainer[3]=new Trainer(Trainer.TrainerType.NEWB,"Luther",Pokemon.Species.RAICHU,12);
					trainer[3].setHostile(false);
					trainer[3].setLocation(9,2);
					//trainer[3].setPreMessage("");
					trainer[3].setPostMessage("Jessica is out drinking snake venom. Yuck.");
					trainer[3].setDirection(270);
					trainer[3].setViewRange(0);
				}
				break;
			case J_Inc_Radio_Tower:
				tileSet = INDOORS;
				widthHeight.x = 18;
				widthHeight.y = 10;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("Jincradiotower.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/house.mid");
				bgm=JApplet.newAudioClip(url);
				
				numTrainers=6;
				trainer=new Trainer[numTrainers];
				numItems=0;
				mapItems=new Item[numItems];
				
				trainer[0]=new Trainer(Trainer.TrainerType.ENGINEER,"Hans",Pokemon.Species.CATERPIE,5);
				trainer[0].setHostile(false);
				trainer[0].setLocation(15,1);
				//trainer[0].setPreMessage("");
				trainer[0].setPostMessage("Sorry, but we've banned everyone from our broadcasting tower in case Team Java were to break in.");
				trainer[0].setDirection(270);
				trainer[0].setViewRange(0);
				
				trainer[1]=new Trainer(Trainer.TrainerType.HACKER,"Plant Dude",Pokemon.Species.CATERPIE,5);
				trainer[1].setHostile(false);
				trainer[1].setLocation(10,1);
				//trainer[0].setPreMessage("");
				trainer[1].setPostMessage("These plants are so pretty!");
				trainer[1].setDirection(180);
				trainer[1].setViewRange(0);
				
				trainer[2]=new Trainer(Trainer.TrainerType.BABE,"Courtney",Pokemon.Species.CATERPIE,5);
				trainer[2].setHostile(false);
				trainer[2].setLocation(3,4);
				//trainer[0].setPreMessage("");
				trainer[2].setPostMessage("Welcome to the J.Inc Radio Tower! Sorry we aren't allowing anyone to be above this floor.");
				trainer[2].setDirection(270);
				trainer[2].setViewRange(0);
				
				trainer[3]=new Trainer(Trainer.TrainerType.CYPHER,"Janet",Pokemon.Species.CATERPIE,5);
				trainer[3].setHostile(false);
				trainer[3].setLocation(0,2);
				//trainer[0].setPreMessage("");
				trainer[3].setPostMessage("What girls can't use computers?");
				trainer[3].setDirection(90);
				trainer[3].setViewRange(0);
				
				trainer[4]=new Trainer(Trainer.TrainerType.BABE,"Janet",Pokemon.Species.CATERPIE,5);
				trainer[4].setHostile(false);
				trainer[4].setLocation(8,7);
				//trainer[0].setPreMessage("");
				trainer[4].setPostMessage("What girls can't use computers?");
				trainer[4].setDirection(90);
				trainer[4].setViewRange(0);
				
				trainer[5]=new Trainer(Trainer.TrainerType.BABE,"Janet",Pokemon.Species.CATERPIE,5);
				trainer[5].setHostile(false);
				trainer[5].setLocation(12,7);
				//trainer[0].setPreMessage("");
				trainer[5].setPostMessage("What girls can't use computers?");
				trainer[5].setDirection(90);
				trainer[5].setViewRange(0);
				
				break;
			case Intville:
				tileSet = OUTDOORS;
				widthHeight.x = 26;
				widthHeight.y = 26;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("Intville.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/10_peachcream_city.mid");
				bgm=JApplet.newAudioClip(url);

				numTrainers=4;
				trainer=new Trainer[numTrainers];
				numItems=0;
				mapItems=new Item[numItems];

				trainer[0]=new Trainer(Trainer.TrainerType.NEWB,"Failsauce",Pokemon.Species.PIDGEY,Pokemon.Species.RATTATA,5);
				trainer[0].setLocation(6,9);
				trainer[0].setHostile(false);
				trainer[0].postBattleMSG = "You stupid hacker, your not supposed to be here!";

				trainer[1]=new Trainer(Trainer.TrainerType.DEBUGGER,"Cameron",Pokemon.Species.PIDGEY,Pokemon.Species.RATTATA,5);
				trainer[1].setLocation(14,12);
				trainer[1].setDirection(180);
				trainer[1].setHostile(false);
				trainer[1].postBattleMSG = "Dude, how the heck do I remove this?";

				trainer[2]=new Trainer(Trainer.TrainerType.PRODIGY,"Gold",Pokemon.Species.PIDGEY,Pokemon.Species.RATTATA,5);
				trainer[2].setLocation(13,8);
				trainer[2].setDirection(90);
				trainer[2].setHostile(false);
				trainer[2].postBattleMSG = "I can't get in my house?";

				trainer[3]=new Trainer(Trainer.TrainerType.ENGINEER,"Trollface",Pokemon.Species.PIDGEY,Pokemon.Species.RATTATA,5);
				trainer[3].setLocation(3,9);
				trainer[3].setDirection(270);
				trainer[3].setHostile(false);
				trainer[3].postBattleMSG = "Wow, a gold and silver rip off. How freaking unique.";
				loadItemData();
				break;
			case H_Border:
				tileSet = INDOORS;
				widthHeight.x = 10;
				widthHeight.y = 8;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("HBorder.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/0d_routes.mid");
				bgm=JApplet.newAudioClip(url);

				numTrainers=1;
				trainer=new Trainer[numTrainers];
				numItems=0;
				mapItems=new Item[numItems];

				trainer[0]=new Trainer(Trainer.TrainerType.ENGINEER,"Jeffery",Pokemon.Species.CATERPIE,5);
				trainer[0].setHostile(false);
				trainer[0].setLocation(6,2);
				//trainer[0].setPreMessage("");
				trainer[0].setPostMessage("Safe Travels!");
				trainer[0].setDirection(270);
				trainer[0].setViewRange(0);
				loadItemData();
				break;
			case V_Border:
				tileSet = INDOORS;
				widthHeight.x = 10;
				widthHeight.y = 8;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("VBorder.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/0d_routes.mid");
				bgm=JApplet.newAudioClip(url);

				numTrainers=2;
				trainer=new Trainer[numTrainers];
				numItems=0;
				mapItems=new Item[numItems];

				trainer[0]=new Trainer(Trainer.TrainerType.ENGINEER,"Jeffery",Pokemon.Species.CATERPIE,5);
				trainer[0].setHostile(false);
				trainer[0].setLocation(0,3);
				//trainer[0].setPreMessage("");
				trainer[0].setPostMessage("Safe Travels!");
				trainer[0].setDirection(0);
				trainer[0].setViewRange(0);

				switch(houseInt)
				{
					case 0:
						trainer[1]=new Trainer(Trainer.TrainerType.NERDY_BIKER,"Percy",Pokemon.Species.CATERPIE,5);
						trainer[1].setHostile(false);
						trainer[1].setLocation(7,1);
						//trainer[0].setPreMessage("");
						trainer[1].setPostMessage("You're going to need a BICYCLE in order to go up to Mount Java!");
						trainer[1].setDirection(270);
						trainer[1].setViewRange(0);
						break;
					case 1:
						trainer[1]=new Trainer(Trainer.TrainerType.NERDY_BIKER,"Donny",Pokemon.Species.CATERPIE,5);
						trainer[1].setHostile(false);
						trainer[1].setLocation(7,1);
						//trainer[0].setPreMessage("");
						trainer[1].setPostMessage("I don't think I'm supposed to have my bike in here...");
						trainer[1].setDirection(270);
						trainer[1].setViewRange(0);
						break;
					case 2:
						trainer[1]=new Trainer(Trainer.TrainerType.HACKER,"Ronald",Pokemon.Species.CATERPIE,5);
						trainer[1].setHostile(false);
						trainer[1].setLocation(7,1);
						//trainer[0].setPreMessage("");
						trainer[1].setPostMessage("There is a rumor that legendary Pokemon exist on the island.");
						trainer[1].setDirection(270);
						trainer[1].setViewRange(0);
						break;
					default:
						trainer[1]=new Trainer(Trainer.TrainerType.ENGINEER,"Pepe",Pokemon.Species.CATERPIE,5);
						trainer[1].setHostile(false);
						trainer[1].setLocation(7,1);
						//trainer[0].setPreMessage("");
						trainer[1].setPostMessage("Some people say that Babb was more powerful than Joe.");
						trainer[1].setDirection(270);
						trainer[1].setViewRange(0);
						break;
				}
				loadItemData();
				break;
			case Slipspace:
				tileSet = INDOORS;
				widthHeight.x = 20;
				widthHeight.y = 20;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("Slipspace.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/0d_routes.mid");
				bgm=JApplet.newAudioClip(url);
				loadItemData();
				break;
			case Route_14:
				tileSet = OUTDOORS;
				widthHeight.x = 50;
				widthHeight.y = 30;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("Route14.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/0d_routes4.mid");
				bgm=JApplet.newAudioClip(url);

				numTrainers=0;
				trainer=new Trainer[numTrainers];
				numItems=0;
				mapItems=new Item[numItems];
				foundItem=new boolean[numItems];
				loadItemData();
				break;
			case Hexadecimal_Forest:
				tileSet = OUTDOORS;
				widthHeight.x = 40;
				widthHeight.y = 40;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("HexForest.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/0e_cave.mid");
				bgm=JApplet.newAudioClip(url);

				numTrainers=5;
				trainer=new Trainer[numTrainers];
				numItems=4;
				mapItems=new Item[numItems];
				foundItem=new boolean[numItems];

				trainer[0]=new Trainer(Trainer.TrainerType.DEBUGGER,"Moose",Pokemon.Species.WEEDLE,16);
				trainer[0].setHostile(true);
				trainer[0].setLocation(20,30);
				trainer[0].setPreMessage("I love catching bugs, but I'll take a break to battle.");
				trainer[0].setPostMessage("...Back to bug catching.");
				trainer[0].setDirection(270);
				trainer[0].setViewRange(3);

				trainer[1]=new Trainer(Trainer.TrainerType.NEWB,"Quincy",Pokemon.Species.WEEDLE,Pokemon.Species.CATERPIE,Pokemon.Species.METAPOD,10);
				trainer[1].setHostile(true);
				trainer[1].setLocation(28,28);
				trainer[1].setPreMessage("I think I'm lost...");
				trainer[1].setPostMessage("I knew I should have just stayed home.");
				trainer[1].setDirection(0);
				trainer[1].setViewRange(2);

				trainer[2]=new Trainer(Trainer.TrainerType.CODER,"Grant",Pokemon.Species.RATTATA,Pokemon.Species.BEEDRILL,15);
				trainer[2].setHostile(true);
				trainer[2].setLocation(24,22);
				trainer[2].setPreMessage("I bet I can beat you in a battle.");
				trainer[2].setPostMessage("Darn. Now where is the exit...");
				trainer[2].setDirection(0);
				trainer[2].setViewRange(2);

				trainer[3]=new Trainer(Trainer.TrainerType.NEWB,"Kid",Pokemon.Species.RATTATA,Pokemon.Species.METAPOD,17);
				trainer[3].setHostile(true);
				trainer[3].setLocation(16,7);
				trainer[3].setPreMessage("BOOOO!!!");
				trainer[3].setPostMessage("...Did I scare you?");
				trainer[3].setDirection(90);
				trainer[3].setViewRange(4);

				trainer[4]=new Trainer(Trainer.TrainerType.HACKER,"Benji",Pokemon.Species.EKANS,Pokemon.Species.PIDGEY,14);
				trainer[4].setHostile(true);
				trainer[4].setLocation(24,4);
				trainer[4].setPreMessage("I really hate this dumb forest.");
				trainer[4].setPostMessage("I'm going home.");
				trainer[4].setDirection(180);
				trainer[4].setViewRange(3);

				mapItems[0]=new Item(Item.Type.ANTIDOTE,new Point(12,15));
				mapItems[1]=new Item(Item.Type.X_SPECIAL,new Point(16,16));
				mapItems[2]=new Item(Item.Type.PROTEIN,new Point(25,18));
				mapItems[3]=new Item(Item.Type.RARE_CANDY,new Point(22,7));

				loadItemData();
				for(int i=0; i<foundItem.length; i++)
				{
					mapItems[i].found=foundItem[i];
				}
				break;
			case Generic_2:
				tileSet = INDOORS;
				widthHeight.x = 8;
				widthHeight.y = 8;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("Generic2.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/house.mid");
				bgm=JApplet.newAudioClip(url);

				numTrainers=1;
				trainer=new Trainer[numTrainers];
				numItems=0;
				mapItems=new Item[numItems];
				
				switch(houseInt%5)
				{
					default:
						trainer[0]=new Trainer(Trainer.TrainerType.CODER,"Krillin",Pokemon.Species.CATERPIE,5);
						trainer[0].setHostile(false);
						trainer[0].setLocation(3,2);
						//trainer[0].setPreMessage("");
						trainer[0].setPostMessage("How can Joe afford all of these houses?");
						trainer[0].setDirection(270);
						trainer[0].setViewRange(0);
						break;
					case 0:
						trainer[0]=new Trainer(Trainer.TrainerType.CYPHER,"Torrie",Pokemon.Species.CATERPIE,5);
						trainer[0].setHostile(false);
						trainer[0].setLocation(3,2);
						//trainer[0].setPreMessage("");
						trainer[0].setPostMessage("Do you always just walk into random houses?");
						trainer[0].setDirection(270);
						trainer[0].setViewRange(0);
						break;
					case 1:
						trainer[0]=new Trainer(Trainer.TrainerType.NEWB,"Nigel",Pokemon.Species.CATERPIE,5);
						trainer[0].setHostile(false);
						trainer[0].setLocation(3,2);
						//trainer[0].setPreMessage("");
						trainer[0].setPostMessage("I'm so sleepy, but there's no bed in here!");
						trainer[0].setDirection(270);
						trainer[0].setViewRange(0);
						break;
					case 2:
						trainer[0]=new Trainer(Trainer.TrainerType.PROFESSOR,"Erwin",Pokemon.Species.CATERPIE,5);
						trainer[0].setHostile(false);
						trainer[0].setLocation(3,2);
						//trainer[0].setPreMessage("");
						trainer[0].setPostMessage("This island is a bit much on an old man like me.");
						trainer[0].setDirection(270);
						trainer[0].setViewRange(0);
						break;
					case 3:
						trainer[0]=new Trainer(Trainer.TrainerType.HACKER,"Bischoff",Pokemon.Species.CATERPIE,5);
						trainer[0].setHostile(false);
						trainer[0].setLocation(3,2);
						//trainer[0].setPreMessage("");
						trainer[0].setPostMessage("Joe is way too rich. I heard that he is only a kid too. So lucky.");
						trainer[0].setDirection(270);
						trainer[0].setViewRange(0);
						break;
					case 4:
						trainer[0]=new Trainer(Trainer.TrainerType.PROGRAMMER,"Mr. Flashy",true);
						trainer[0].setHostile(false);
						trainer[0].setLocation(3,2);
						//trainer[0].setPreMessage("");
						trainer[0].setPostMessage("Take this so you can flash other people!");
						trainer[0].setDirection(270);
						trainer[0].setViewRange(0);
						break;
				}
				if (houseInt >= 9000)
				{
					trainer[0]=new Trainer(Trainer.TrainerType.HACKER,"Glitchmaster",Pokemon.Species.MISSINGNO,Pokemon.Species.MISSINGNO,Pokemon.Species.MISSINGNO,100);
					trainer[0].setHostile(true);
					trainer[0].setLocation(3,2);
					trainer[0].setPreMessage("I AM THE GLITCHMASTER");
					trainer[0].setPostMessage("Apparently I can also be defeated... sad day. Thought this action replay would make me stronger.");
					trainer[0].setDirection(270);
					trainer[0].setViewRange(9);
					return;
				}
				break;
			case Generic_3:
				tileSet = INDOORS;
				widthHeight.x = 8;
				widthHeight.y = 8;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("Generic3.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/house.mid");
				bgm=JApplet.newAudioClip(url);

				numTrainers=1;
				trainer=new Trainer[numTrainers];
				numItems=0;
				mapItems=new Item[numItems];

				if(returnArea==Area.Nested_Village&&houseInt%5==0)
				{
						trainer[0]=new Trainer(Trainer.TrainerType.PROFESSOR,"Cutter",true);
						trainer[0].setHostile(false);
						trainer[0].setLocation(3,2);
						//trainer[0].setPreMessage("");
						trainer[0].setPostMessage("Hello sonny. I think you should take this HM. It contains CUT. Press SPACEBAR next to a small tree and your Pokemon will cut it down. It will help you go further. Whenever you feel that you are stuck on your journey, talk to everyone. Who knows what you'll find.");
						trainer[0].setDirection(270);
						trainer[0].setViewRange(0);
				}
				else if(returnArea==Area.Mount_Java&&houseInt%5==0)
				{
						trainer[0]=new Trainer(Trainer.TrainerType.PROFESSOR,"Flyer",true);
						trainer[0].setHostile(false);
						trainer[0].setLocation(3,2);
						//trainer[0].setPreMessage("");
						trainer[0].setPostMessage("Hello sonny. Back in my day, I used to take to the skies with Pokemon. I want to share that with you. Here, take this HM. Press 'F' to activate the Fly Menu after teaching a Pokemon.");
						trainer[0].setDirection(270);
						trainer[0].setViewRange(0);
				}
				else if(houseInt==14&&returnArea==Area.Route_9)
				{
						trainer[0]=new Trainer(Trainer.TrainerType.PROFESSOR,"Name Rater",true);
						trainer[0].setHostile(false);
						trainer[0].setLocation(3,2);
						//trainer[0].setPreMessage("");
						trainer[0].setPostMessage("Hello there lad. If the first Pokemon in your party was caught by you, I can change its nickname for you.");
						trainer[0].setDirection(270);
						trainer[0].setViewRange(0);
				}
				else

				switch(houseInt%5)
				{
					case 3:
						trainer[0]=new Trainer(Trainer.TrainerType.CODER,"Krillin",Pokemon.Species.CATERPIE,5);
						trainer[0].setHostile(false);
						trainer[0].setLocation(3,2);
						//trainer[0].setPreMessage("");
						trainer[0].setPostMessage("How can Joe afford all of these houses?");
						trainer[0].setDirection(270);
						trainer[0].setViewRange(0);
						break;
					case 2:
						trainer[0]=new Trainer(Trainer.TrainerType.CYPHER,"Torrie",Pokemon.Species.CATERPIE,5);
						trainer[0].setHostile(false);
						trainer[0].setLocation(3,2);
						//trainer[0].setPreMessage("");
						trainer[0].setPostMessage("Do you always just walk into random houses?");
						trainer[0].setDirection(270);
						trainer[0].setViewRange(0);
						break;
					case 1:
						trainer[0]=new Trainer(Trainer.TrainerType.NEWB,"Nigel",Pokemon.Species.CATERPIE,5);
						trainer[0].setHostile(false);
						trainer[0].setLocation(3,2);
						//trainer[0].setPreMessage("");
						trainer[0].setPostMessage("I'm so sleepy, but there's no bed in here!");
						trainer[0].setDirection(270);
						trainer[0].setViewRange(0);
						break;
					case 0:
						trainer[0]=new Trainer(Trainer.TrainerType.PROFESSOR,"Erwin",Pokemon.Species.CATERPIE,5);
						trainer[0].setHostile(false);
						trainer[0].setLocation(3,2);
						//trainer[0].setPreMessage("");
						trainer[0].setPostMessage("This island is a bit much on an old man like me.");
						trainer[0].setDirection(270);
						trainer[0].setViewRange(0);
						break;
					default:
						trainer[0]=new Trainer(Trainer.TrainerType.HACKER,"Bischoff",Pokemon.Species.CATERPIE,5);
						trainer[0].setHostile(false);
						trainer[0].setLocation(3,2);
						//trainer[0].setPreMessage("");
						trainer[0].setPostMessage("Joe is way too rich. I heard that he is only a kid too. So lucky.");
						trainer[0].setDirection(270);
						trainer[0].setViewRange(0);
						break;
				}
				break;
			case J_Inc_Building:
				tileSet = INDOORS;
				widthHeight.x = 100;
				widthHeight.y = 100;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("Jinc.tilemap");
				url=JokemonDriver.class.getResource("titlemusic.mid");
				bgm=JApplet.newAudioClip(url);
				numTrainers=13;
				trainer=new Trainer[numTrainers];
				numItems=0;
				mapItems=new Item[numItems];

				trainer[0]=new Trainer(Trainer.TrainerType.PROGRAMMER,"Slave",Pokemon.Species.CATERPIE,5);
				trainer[0].setHostile(false);
				trainer[0].setLocation(14,23);
				//trainer[0].setPreMessage("");
				trainer[0].setPostMessage("This is J Inc's building. Find a seat and press spacebar!.");
				trainer[0].setDirection(270);
				trainer[0].setViewRange(0);

				trainer[1]=new Trainer(Trainer.TrainerType.PROGRAMMER,"Slave too!",Pokemon.Species.CATERPIE,5);
				trainer[1].setHostile(false);
				trainer[1].setLocation(13,38);
				//trainer[1].setPreMessage("");
				trainer[1].setPostMessage("No newbs allowed up here man.");
				trainer[1].setDirection(270);
				trainer[1].setViewRange(0);
				
				trainer[2]=new Trainer(Trainer.TrainerType.ELITE,"Patches",Pokemon.Species.CATERPIE,5);
				trainer[2].setHostile(false);
				trainer[2].setLocation(13,45);
				//trainer[1].setPreMessage("");
				trainer[2].setPostMessage("Tron is so much better than this game. You should play it. NOW!");
				trainer[2].setDirection(0);
				trainer[2].setViewRange(0);
				
				trainer[3]=new Trainer(Trainer.TrainerType.HACKER,"John",Pokemon.Species.CATERPIE,5);
				trainer[3].setHostile(false);
				trainer[3].setLocation(10,43);
				//trainer[1].setPreMessage("");
				trainer[3].setPostMessage("Dang it, I can't hack into this.");
				trainer[3].setDirection(180);
				trainer[3].setViewRange(0);
				
				trainer[4]=new Trainer(Trainer.TrainerType.NEWB,"Beta Tester",Pokemon.Species.CATERPIE,5);
				trainer[4].setHostile(false);
				trainer[4].setLocation(7,45);
				//trainer[1].setPreMessage("");
				trainer[4].setPostMessage("Exploiting glitches before the game is even made is fun and annoying to the developers!");
				trainer[4].setDirection(0);
				trainer[4].setViewRange(0);
				
				trainer[5]=new Trainer(Trainer.TrainerType.ELITE,"Camtendo",Pokemon.Species.CATERPIE,5);
				trainer[5].setHostile(false);
				trainer[5].setLocation(8,26);
				//trainer[1].setPreMessage("");
				trainer[5].setPostMessage("It's so awesome that we finally got this game made!");
				trainer[5].setDirection(90);
				trainer[5].setViewRange(0);
				
				trainer[6]=new Trainer(Trainer.TrainerType.ELITE,"Justinian",Pokemon.Species.CATERPIE,5);
				trainer[6].setHostile(false);
				trainer[6].setLocation(8,29);
				//trainer[1].setPreMessage("");
				trainer[6].setPostMessage("I programmed our AI's to fight in the Elite 4 without us! Pretty genious huh?");
				trainer[6].setDirection(90);
				trainer[6].setViewRange(0);
				
				trainer[7]=new Trainer(Trainer.TrainerType.BABE,"Natalie",Pokemon.Species.CATERPIE,5);
				trainer[7].setHostile(false);
				trainer[7].setLocation(7,29);
				//trainer[1].setPreMessage("");
				trainer[7].setPostMessage("Justinian is always busy programming, but when he is I study Eevee's. Isn't he amazing?");
				trainer[7].setDirection(0);
				trainer[7].setViewRange(0);
				
				trainer[8]=new Trainer(Trainer.TrainerType.ELITE,"WasabiSauce",Pokemon.Species.CATERPIE,5);
				trainer[8].setHostile(false);
				trainer[8].setLocation(14,29);
				//trainer[1].setPreMessage("");
				trainer[8].setPostMessage("Why is Patches so obsessed with Tron?");
				trainer[8].setDirection(90);
				trainer[8].setViewRange(0);
				
				trainer[9]=new Trainer(Trainer.TrainerType.BABE,"WasabiSauce",Pokemon.Species.CATERPIE,5);
				trainer[9].setHostile(false);
				trainer[9].setLocation(10,8);
				//trainer[1].setPreMessage("");
				trainer[9].setPostMessage("Why is Patches so obsessed with Tron?");
				trainer[9].setDirection(270);
				trainer[9].setViewRange(0);
				
				trainer[10]=new Trainer(Trainer.TrainerType.BABE,"Nicole",Pokemon.Species.CATERPIE,5);
				trainer[10].setHostile(false);
				trainer[10].setLocation(6,11);
				//trainer[1].setPreMessage("");
				trainer[10].setPostMessage("Hello! Welcome to the J.Inc tower! Home and workplace of all the members of J.Inc!");
				trainer[10].setDirection(0);
				trainer[10].setViewRange(0);
				
				trainer[11]=new Trainer(Trainer.TrainerType.NEWB,"Nazi",Pokemon.Species.CATERPIE,5);
				trainer[11].setHostile(false);
				trainer[11].setLocation(15,11);
				//trainer[1].setPreMessage("");
				trainer[11].setPostMessage("ICH HABE EINE KATZE IN MEINE HOSE!");
				trainer[11].setDirection(0);
				trainer[11].setViewRange(0);
				
				trainer[12]=new Trainer(Trainer.TrainerType.DEBUGGER,"Hobo",Pokemon.Species.CATERPIE,5);
				trainer[12].setHostile(false);
				trainer[12].setLocation(15,10);
				//trainer[1].setPreMessage("");
				trainer[12].setPostMessage("This guy is obviously a Nazi since he's speaking German!");
				trainer[12].setDirection(270);
				trainer[12].setViewRange(0);


				loadItemData();
				break;
			case Generic_4:
				tileSet = INDOORS;
				widthHeight.x = 8;
				widthHeight.y = 8;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("Generic4.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/house.mid");
				bgm=JApplet.newAudioClip(url);

				numTrainers=1;
				trainer=new Trainer[numTrainers];
				numItems=0;
				mapItems=new Item[numItems];

				if(returnArea==Area.Villa_Del_Joe&&houseInt%5==0)
				{
					trainer[0]=new Trainer(Trainer.TrainerType.NERDY_BIKER,"Bike Enthusiast",true);
					trainer[0].setHostile(false);
					trainer[0].setLocation(3,2);
					//trainer[0].setPreMessage("");
					trainer[0].setPostMessage("Vroom vrooom!!! I love bicycles! If you've got 3 badges, you've got a bike too, dude!");
					trainer[0].setDirection(270);
					trainer[0].setViewRange(0);
				}
				else
				switch(houseInt%5)
				{
					default:
						trainer[0]=new Trainer(Trainer.TrainerType.CODER,"Kobe",Pokemon.Species.CATERPIE,5);
						trainer[0].setHostile(false);
						trainer[0].setLocation(3,2);
						//trainer[0].setPreMessage("");
						trainer[0].setPostMessage("I play basketball more than Pokemon.");
						trainer[0].setDirection(270);
						trainer[0].setViewRange(0);
						break;
					case 0:
						trainer[0]=new Trainer(Trainer.TrainerType.NEWB,"Lebron",Pokemon.Species.CATERPIE,5);
						trainer[0].setHostile(false);
						trainer[0].setLocation(3,2);
						//trainer[0].setPreMessage("");
						trainer[0].setPostMessage("I think that CATERPIE is my favorite Pokemon.");
						trainer[0].setDirection(270);
						trainer[0].setViewRange(0);
						break;
					case 1:
						trainer[0]=new Trainer(Trainer.TrainerType.NEWB,"Stewie",Pokemon.Species.CATERPIE,5);
						trainer[0].setHostile(false);
						trainer[0].setLocation(3,2);
						//trainer[0].setPreMessage("");
						trainer[0].setPostMessage("I heard that Joe has a shady past. Is that true?");
						trainer[0].setDirection(270);
						trainer[0].setViewRange(0);
						break;
					case 2:
						trainer[0]=new Trainer(Trainer.TrainerType.PROFESSOR,"Locke",Pokemon.Species.CATERPIE,5);
						trainer[0].setHostile(false);
						trainer[0].setLocation(3,2);
						//trainer[0].setPreMessage("");
						trainer[0].setPostMessage("If you give a Pokemon some vitamins, it will grow faster.");
						trainer[0].setDirection(270);
						trainer[0].setViewRange(0);
						break;
					case 3:
						trainer[0]=new Trainer(Trainer.TrainerType.HACKER,"Klark",Pokemon.Species.CATERPIE,5);
						trainer[0].setHostile(false);
						trainer[0].setLocation(3,2);
						//trainer[0].setPreMessage("");
						trainer[0].setPostMessage("My stomach hurts...");
						trainer[0].setDirection(270);
						trainer[0].setViewRange(0);
						break;
				}
				break;
			case Generic_5:
				tileSet = INDOORS;
				widthHeight.x = 8;
				widthHeight.y = 8;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("Generic5.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/house.mid");
				bgm=JApplet.newAudioClip(url);

				numTrainers=1;
				trainer=new Trainer[numTrainers];
				numItems=0;
				mapItems=new Item[numItems];

				if(returnArea==Area.Villa_Del_Joe&&houseInt%5==0)
				{
					trainer[0]=new Trainer(Trainer.TrainerType.NERDY_BIKER,"Bike Enthusiast",true);
					trainer[0].setHostile(false);
					trainer[0].setLocation(3,2);
					//trainer[0].setPreMessage("");
					trainer[0].setPostMessage("Vroom vrooom!!! I love bicycles! If you've got 3 badges, you've got a bike too, dude!");
					trainer[0].setDirection(270);
					trainer[0].setViewRange(0);
				}
				else
				switch(houseInt%5)
				{
					default:
						trainer[0]=new Trainer(Trainer.TrainerType.CODER,"Rondell",Pokemon.Species.CATERPIE,5);
						trainer[0].setHostile(false);
						trainer[0].setLocation(3,2);
						//trainer[0].setPreMessage("");
						trainer[0].setPostMessage("I think I saw an ICE bird flying around somewhere.");
						trainer[0].setDirection(270);
						trainer[0].setViewRange(0);
						break;
					case 0:
						trainer[0]=new Trainer(Trainer.TrainerType.NEWB,"Eustace",Pokemon.Species.CATERPIE,5);
						trainer[0].setHostile(false);
						trainer[0].setLocation(3,2);
						//trainer[0].setPreMessage("");
						trainer[0].setPostMessage("Hey dude, get outta here!");
						trainer[0].setDirection(270);
						trainer[0].setViewRange(0);
						break;
					case 1:
						trainer[0]=new Trainer(Trainer.TrainerType.NEWB,"Jimmeh",Pokemon.Species.CATERPIE,5);
						trainer[0].setHostile(false);
						trainer[0].setLocation(3,2);
						//trainer[0].setPreMessage("");
						trainer[0].setPostMessage("Joe is cooler than you dude.");
						trainer[0].setDirection(270);
						trainer[0].setViewRange(0);
						break;
					case 2:
						trainer[0]=new Trainer(Trainer.TrainerType.PROFESSOR,"Binji",Pokemon.Species.CATERPIE,5);
						trainer[0].setHostile(false);
						trainer[0].setLocation(3,2);
						//trainer[0].setPreMessage("");
						trainer[0].setPostMessage("Somewhere, there is a man who is crazy about bicycles.");
						trainer[0].setDirection(270);
						trainer[0].setViewRange(0);
						break;
					case 3:
						trainer[0]=new Trainer(Trainer.TrainerType.HACKER,"Koopa",Pokemon.Species.CATERPIE,5);
						trainer[0].setHostile(false);
						trainer[0].setLocation(3,2);
						//trainer[0].setPreMessage("");
						trainer[0].setPostMessage("I heard that there is a Battle Tower somewhere.");
						trainer[0].setDirection(270);
						trainer[0].setViewRange(0);
						break;
				}
				break;
			case Generic_6:
				tileSet = INDOORS;
				widthHeight.x = 8;
				widthHeight.y = 8;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("Generic6.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/house.mid");
				bgm=JApplet.newAudioClip(url);

				numTrainers=1;
				trainer=new Trainer[numTrainers];
				numItems=0;
				mapItems=new Item[numItems];

				if(returnArea==Area.Villa_Del_Joe&&houseInt%5==0)
				{
					trainer[0]=new Trainer(Trainer.TrainerType.NERDY_BIKER,"Bike Enthusiast",true);
					trainer[0].setHostile(false);
					trainer[0].setLocation(3,2);
					//trainer[0].setPreMessage("");
					trainer[0].setPostMessage("Vroom vrooom!!! I love bicycles! If you've got 3 badges, you've got a bike too, dude!");
					trainer[0].setDirection(270);
					trainer[0].setViewRange(0);
				}
				else
				switch(houseInt%5)
				{
					default:
						trainer[0]=new Trainer(Trainer.TrainerType.CODER,"Kris",Pokemon.Species.CATERPIE,5);
						trainer[0].setHostile(false);
						trainer[0].setLocation(3,2);
						//trainer[0].setPreMessage("");
						trainer[0].setPostMessage("I think I need a new Pokemon.");
						trainer[0].setDirection(270);
						trainer[0].setViewRange(0);
						break;
					case 0:
						trainer[0]=new Trainer(Trainer.TrainerType.NEWB,"Brucey",Pokemon.Species.CATERPIE,5);
						trainer[0].setHostile(false);
						trainer[0].setLocation(3,2);
						//trainer[0].setPreMessage("");
						trainer[0].setPostMessage("Babb is an esteemed programmer too!");
						trainer[0].setDirection(270);
						trainer[0].setViewRange(0);
						break;
					case 1:
						trainer[0]=new Trainer(Trainer.TrainerType.NEWB,"Yancy",Pokemon.Species.CATERPIE,5);
						trainer[0].setHostile(false);
						trainer[0].setLocation(3,2);
						//trainer[0].setPreMessage("");
						trainer[0].setPostMessage("I think I want to go home.");
						trainer[0].setDirection(270);
						trainer[0].setViewRange(0);
						break;
					case 2:
						trainer[0]=new Trainer(Trainer.TrainerType.PROFESSOR,"Sheruf",Pokemon.Species.CATERPIE,5);
						trainer[0].setHostile(false);
						trainer[0].setLocation(3,2);
						//trainer[0].setPreMessage("");
						trainer[0].setPostMessage("Do you see the door? Get out!");
						trainer[0].setDirection(270);
						trainer[0].setViewRange(0);
						break;
					case 3:
						trainer[0]=new Trainer(Trainer.TrainerType.HACKER,"Hans",Pokemon.Species.CATERPIE,5);
						trainer[0].setHostile(false);
						trainer[0].setLocation(3,2);
						//trainer[0].setPreMessage("");
						trainer[0].setPostMessage("It never rains here!");
						trainer[0].setDirection(270);
						trainer[0].setViewRange(0);
						break;
				}
				break;
			case Public_Cave:
				tileSet = INDOORS;
				widthHeight.x = 100;
				widthHeight.y = 100;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("Public.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/0e_cave.mid");
				bgm=JApplet.newAudioClip(url);

				numTrainers=0;
				trainer=new Trainer[numTrainers];
				numItems=2;
				mapItems=new Item[numItems];
				foundItem=new boolean[numItems];

				mapItems[0]=new Item(Item.Type.REDBULL,new Point(11,60));
				mapItems[1]=new Item(Item.Type.MOUNTAIN_DEW,new Point(12,60));

				loadItemData();
				for(int i=0; i<foundItem.length; i++)
				{
					mapItems[i].found=foundItem[i];
				}

				break;
			case Class_Cave:
				tileSet = INDOORS;
				widthHeight.x = 30;
				widthHeight.y = 30;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("Class.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/0e_cave.mid");
				bgm=JApplet.newAudioClip(url);

				numTrainers=0;
				trainer=new Trainer[numTrainers];
				numItems=0;
				mapItems=new Item[numItems];
				loadItemData();
				break;
			case Moltres_Cave:
				tileSet = INDOORS;
				widthHeight.x = 20;
				widthHeight.y = 20;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("Moltres.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/0e_cave.mid");
				bgm=JApplet.newAudioClip(url);

				numTrainers=0;
				trainer=new Trainer[numTrainers];
				numItems=0;
				mapItems=new Item[numItems];
				loadItemData();
				break;
			case Articuno_Cave:
				tileSet = INDOORS;
				widthHeight.x = 20;
				widthHeight.y = 20;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("ArticunoCave.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/0e_cave.mid");
				bgm=JApplet.newAudioClip(url);

				numTrainers=0;
				trainer=new Trainer[numTrainers];
				numItems=0;
				mapItems=new Item[numItems];
				loadItemData();
				break;
			case Primal_Cave:
				tileSet = INDOORS;
				widthHeight.x = 20;
				widthHeight.y = 20;
				currentArea = new int[widthHeight.x][widthHeight.y];
				if(VERSION.equals("Peaches"))
					createMap("PrimalP.tilemap");
				else
					createMap("PrimalC.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/0e_cave.mid");
				bgm=JApplet.newAudioClip(url);

				numTrainers=0;
				trainer=new Trainer[numTrainers];
				numItems=0;
				mapItems=new Item[numItems];
				loadItemData();
				break;
			case Java_Cave:
				tileSet = INDOORS;
				widthHeight.x = 30;
				widthHeight.y = 30;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("JavaCave.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/0e_cave.mid");
				bgm=JApplet.newAudioClip(url);

				numTrainers=0;
				trainer=new Trainer[numTrainers];
				numItems=0;
				mapItems=new Item[numItems];
				loadItemData();
				break;
			case Diglett_Cave:
				tileSet = INDOORS;
				widthHeight.x = 25;
				widthHeight.y = 80;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("DiglettCave.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/0e_cave.mid");
				bgm=JApplet.newAudioClip(url);

				numTrainers=0;
				trainer=new Trainer[numTrainers];
				numItems=0;
				mapItems=new Item[numItems];
				loadItemData();
				break;
			case Victory_Road_Cave:
				tileSet = INDOORS;
				widthHeight.x = 90;
				widthHeight.y = 90;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("VictoryRoadCave.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/0e_cave.mid");
				bgm=JApplet.newAudioClip(url);

				numTrainers=10;
				trainer=new Trainer[numTrainers];
				numItems=0;
				mapItems=new Item[numItems];

				trainer[0]=new Trainer(Trainer.TrainerType.ENGINEER,"Samuel",Pokemon.Species.CHARIZARD,Pokemon.Species.RAICHU,Pokemon.Species.PIDGEOTTO,Pokemon.Species.GOLDUCK,50);
				trainer[0].setHostile(true);
				trainer[0].setLocation(14,73);
				trainer[0].setPreMessage("What up right now? Are you finna finna?");
				trainer[0].setPostMessage("...Gonna sit up here and be rude to me?!");
				trainer[0].setDirection(270);
				trainer[0].setViewRange(1);

				trainer[1]=new Trainer(Trainer.TrainerType.KEYBOARDER,"Jack",Pokemon.Species.HAUNTER,Pokemon.Species.ARCANINE,Pokemon.Species.KADABRA,Pokemon.Species.ARBOK,50);
				trainer[1].setHostile(true);
				trainer[1].setLocation(9,61);
				trainer[1].setPreMessage("Hey! Listen!");
				trainer[1].setPostMessage("Snake? Snake?! Snaaake!?!");
				trainer[1].setDirection(270);
				trainer[1].setViewRange(2);

				trainer[2]=new Trainer(Trainer.TrainerType.CODER,"Jeff",Pokemon.Species.ONIX,Pokemon.Species.HYPNO,Pokemon.Species.DRAGONAIR,Pokemon.Species.DRAGONITE,56);
				trainer[2].setHostile(true);
				trainer[2].setLocation(26,72);
				trainer[2].setPreMessage("Cower in fear at my Pokemon's power!");
				trainer[2].setPostMessage("It seems I underestimated your power...");
				trainer[2].setDirection(180);
				trainer[2].setViewRange(1);

				trainer[3]=new Trainer(Trainer.TrainerType.PROGRAMMER,"Triixster",Pokemon.Species.CHARMELEON,Pokemon.Species.WARTORTLE,Pokemon.Species.IVYSAUR,50);
				trainer[3].setHostile(true);
				trainer[3].setLocation(31,62);
				trainer[3].setPreMessage("Whatever.");
				trainer[3].setPostMessage("Whatever.");
				trainer[3].setDirection(180);
				trainer[3].setViewRange(2);

				trainer[4]=new Trainer(Trainer.TrainerType.CODER,"Cloward",Pokemon.Species.NIDORINO,Pokemon.Species.PIDGEOT,Pokemon.Species.ARCANINE,Pokemon.Species.GYARADOS,50);
				trainer[4].setHostile(true);
				trainer[4].setLocation(22,49);
				trainer[4].setPreMessage("Get ready for the fight of your life.");
				trainer[4].setPostMessage("You beat me! Well some people get lucky.");
				trainer[4].setDirection(270);
				trainer[4].setViewRange(1);

				trainer[5]=new Trainer(Trainer.TrainerType.HACKER,"Devin F.",Pokemon.Species.MACHAMP,Pokemon.Species.GRAVELER,Pokemon.Species.MACHOKE,Pokemon.Species.GYARADOS,50);
				trainer[5].setHostile(true);
				trainer[5].setLocation(20,42);
				trainer[5].setPreMessage("Get ready to lose.");
				trainer[5].setPostMessage("I know we're in a cave, but the sun was in my eyes.");
				trainer[5].setDirection(270);
				trainer[5].setViewRange(1);

				trainer[6]=new Trainer(Trainer.TrainerType.CYPHER,"Bigge",Pokemon.Species.CLOYSTER,Pokemon.Species.CLEFAIRY,Pokemon.Species.NINETALES,Pokemon.Species.GASTLY,50);
				trainer[6].setHostile(true);
				trainer[6].setLocation(23,30);
				trainer[6].setPreMessage("Feel the dent in my head!");
				trainer[6].setPostMessage("...Well this is awkward, but you're still going to touch it!");
				trainer[6].setDirection(270);
				trainer[6].setViewRange(1);

				trainer[7]=new Trainer(Trainer.TrainerType.CODER,"Stevenson",Pokemon.Species.CUBONE,Pokemon.Species.MAROWAK,Pokemon.Species.KANGASKHAN,50);
				trainer[7].setHostile(true);
				trainer[7].setLocation(43,31);
				trainer[7].setPreMessage("Feel the rage!");
				trainer[7].setPostMessage("Maybe they needed more juice...");
				trainer[7].setDirection(90);
				trainer[7].setViewRange(1);

				trainer[8]=new Trainer(Trainer.TrainerType.ENGINEER,"Grey",Pokemon.Species.KABUTOPS,Pokemon.Species.HITMONLEE,Pokemon.Species.HAUNTER,Pokemon.Species.GYARADOS,50);
				trainer[8].setHostile(true);
				trainer[8].setLocation(43,22);
				trainer[8].setPreMessage("Leave.");
				trainer[8].setPostMessage("How?");
				trainer[8].setDirection(0);
				trainer[8].setViewRange(1);

				trainer[9]=new Trainer(Trainer.TrainerType.PROGRAMMER,"Scoticus",Pokemon.Species.IVYSAUR,Pokemon.Species.GROWLITHE,Pokemon.Species.CUBONE,Pokemon.Species.MAGNETON,Pokemon.Species.TAUROS,Pokemon.Species.AERODACTYL,55);
				trainer[9].setHostile(true);
				trainer[9].setLocation(36,19);
				trainer[9].setPreMessage("I've got 99 problems but a glitch ain't one!");
				trainer[9].setPostMessage("Well...now I have a bug to report...");
				trainer[9].setDirection(180);
				trainer[9].setViewRange(1);

				loadItemData();
				break;
			case Mountain_Dew_Paradise:
				tileSet = INDOORS;
				widthHeight.x = 20;
				widthHeight.y = 20;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("Mountain_Dew_Paradise.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/0e_cave.mid");
				bgm=JApplet.newAudioClip(url);

				numTrainers=0;
				trainer=new Trainer[numTrainers];
				numItems=60;
				mapItems=new Item[numItems];

				int index=0;
				for(int i=0; i<6; i++)
				{
					for(int j=0; j<10; j++)
					{
						mapItems[index]=new Item(Item.Type.MOUNTAIN_DEW,new Point(9+i,5+j));
						index++;
					}
				}

				loadItemData();
				for(int i=0; i<foundItem.length; i++)
				{
					mapItems[i].found=foundItem[i];
				}
				break;
			case Rocket_Right_Tower:
				tileSet = INDOORS;
				widthHeight.x = 40;
				widthHeight.y = 40;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("Rocket_Right_Tower.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/0a_java_hideout.mid");
				bgm=JApplet.newAudioClip(url);

				if(!objectiveComplete[9])
				{
					numTrainers=5;
					trainer=new Trainer[numTrainers];

					trainer[0]=new Trainer(Trainer.TrainerType.JAVA,"GRUNT",Pokemon.Species.RATICATE,Pokemon.Species.EKANS,Pokemon.Species.KOFFING,30);
				trainer[0].setHostile(true);
				trainer[0].setLocation(17,4);
				trainer[0].setPreMessage("You snot nosed brat! Where was security?");
				trainer[0].setPostMessage("Don't get cocky. Our Boss will beat you!");
				trainer[0].setDirection(270);
				trainer[0].setViewRange(2);

				trainer[1]=new Trainer(Trainer.TrainerType.JAVA,"GRUNT",Pokemon.Species.WEEZING,Pokemon.Species.RATTATA,40);
				trainer[1].setHostile(true);
				trainer[1].setLocation(12,32);
				trainer[1].setPreMessage("Why are you here little boy?");
				trainer[1].setPostMessage("Skedaddle before you are slaughtered!");
				trainer[1].setDirection(90);
				trainer[1].setViewRange(3);

				trainer[2]=new Trainer(Trainer.TrainerType.JAVA,"GRUNT",Pokemon.Species.MUK,Pokemon.Species.GRIMER,50);
				trainer[2].setHostile(true);
				trainer[2].setLocation(8,26);
				trainer[2].setPreMessage("Joe is having his island taken back!");
				trainer[2].setPostMessage("You'll never get out of here alive maggot!");
				trainer[2].setDirection(90);
				trainer[2].setViewRange(4);

				trainer[3]=new Trainer(Trainer.TrainerType.JAVA,"Karl",Pokemon.Species.MUK,Pokemon.Species.MUK,Pokemon.Species.MUK,40);
				trainer[3].setHostile(true);
				trainer[3].setLocation(7,4);
				trainer[3].setPreMessage("My Pokemon backwards are too cool.");
				trainer[3].setPostMessage("Oh no. I've made a mess...");
				trainer[3].setDirection(180);
				trainer[3].setViewRange(3);

				trainer[4]=new Trainer(Trainer.TrainerType.JAVA,"ELITE",Pokemon.Species.RATICATE,Pokemon.Species.WEEZING,50);
				trainer[4].setHostile(true);
				trainer[4].setLocation(11,13);
				trainer[4].setPreMessage("You're not getting out of this tower kiddy!");
				trainer[4].setPostMessage("Curses! No matter. Our boss knows you are coming!");
				trainer[4].setDirection(180);
				trainer[4].setViewRange(2);
				}
				else
				{
					numTrainers=0;
					trainer=new Trainer[numTrainers];
				}
				numItems=2;
				mapItems=new Item[numItems];

				mapItems[0]=new Item(Item.Type.MAX_REVIVE,new Point(12,6));
				mapItems[1]=new Item(Item.Type.SUPER_POTION,new Point(4,30));

				loadItemData();
				for(int i=0; i<foundItem.length; i++)
				{
					mapItems[i].found=foundItem[i];
				}
				break;
			case Rocket_Left_Tower:
				tileSet = INDOORS;
				widthHeight.x = 40;
				widthHeight.y = 80;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("Rocket_Left_Tower.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/0a_java_hideout.mid");
				bgm=JApplet.newAudioClip(url);

				if(!objectiveComplete[9])
				{
					numTrainers=5;
					trainer=new Trainer[numTrainers];

					trainer[0]=new Trainer(Trainer.TrainerType.JAVA,"GRUNT",Pokemon.Species.RATICATE,Pokemon.Species.ARBOK,Pokemon.Species.KOFFING,30);
				trainer[0].setHostile(true);
				trainer[0].setLocation(5,12);
				trainer[0].setPreMessage("Joe was once a member of Team Java!");
				trainer[0].setPostMessage("He quit us! Now our boss wants this island!");
				trainer[0].setDirection(0);
				trainer[0].setViewRange(2);

				trainer[1]=new Trainer(Trainer.TrainerType.JAVA,"GRUNT",Pokemon.Species.WEEZING,Pokemon.Species.RATICATE,40);
				trainer[1].setHostile(true);
				trainer[1].setLocation(13,31);
				trainer[1].setPreMessage("Would you like to join us? Too bad!");
				trainer[1].setPostMessage("Pokemon are meant to be sold!!");
				trainer[1].setDirection(180);
				trainer[1].setViewRange(5);

				trainer[2]=new Trainer(Trainer.TrainerType.JAVA,"GRUNT",Pokemon.Species.MUK,Pokemon.Species.GRIMER,40);
				trainer[2].setHostile(true);
				trainer[2].setLocation(8,45);
				trainer[2].setPreMessage("Joe was soft! He isn't good enough for Java!");
				trainer[2].setPostMessage("You're not good enough either!!!");
				trainer[2].setDirection(180);
				trainer[2].setViewRange(1);

				trainer[3]=new Trainer(Trainer.TrainerType.JAVA,"GRUNT",Pokemon.Species.RAPIDASH,Pokemon.Species.MUK,Pokemon.Species.RATICATE,40);
				trainer[3].setHostile(true);
				trainer[3].setLocation(5,51);
				trainer[3].setPreMessage("You're not getting to Joe the traitor!");
				trainer[3].setPostMessage("Foolish little boy!");
				trainer[3].setDirection(270);
				trainer[3].setViewRange(2);

				trainer[4]=new Trainer(Trainer.TrainerType.JAVA,"ELITE",Pokemon.Species.MUK,Pokemon.Species.WEEZING,50);
				trainer[4].setHostile(true);
				trainer[4].setLocation(11,4);
				trainer[4].setPreMessage("Our boss will inflict pain on his enemies!");
				trainer[4].setPostMessage("You can't save Joe!");
				trainer[4].setDirection(270);
				trainer[4].setViewRange(1);
				}
				else
				{
					numTrainers=0;
					trainer=new Trainer[numTrainers];
				}
				numItems=2;
				mapItems=new Item[numItems];

				mapItems[0]=new Item(Item.Type.FULL_RESTORE,new Point(9,11));
				mapItems[1]=new Item(Item.Type.ELIXER,new Point(5,49));

				loadItemData();
				for(int i=0; i<foundItem.length; i++)
				{
					mapItems[i].found=foundItem[i];
				}

				loadItemData();
				break;
			case Rocket_Central_Tower:
				tileSet = INDOORS;
				widthHeight.x = 80;
				widthHeight.y = 80;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("Rocket_Central_Tower.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/0a_java_hideout.mid");
				bgm=JApplet.newAudioClip(url);

				numTrainers=1;
				trainer=new Trainer[numTrainers];
				numItems=0;
				mapItems=new Item[numItems];

				if(!objectiveComplete[9])
				{
					trainer[0]=new Trainer(Trainer.TrainerType.JAVA,"BOSS",Pokemon.Species.RATICATE,Pokemon.Species.ARBOK,Pokemon.Species.WEEZING,Pokemon.Species.MUK,60);
					trainer[0].setHostile(true);
					trainer[0].setLocation(12,40);
					trainer[0].setPreMessage("You repugnant slime. I'm here for Joe. He betrayed Team Java. He called the police on us for selling Pokemon. He claimed that our business of selling Pokemon is evil. Then he bought this island. Well let me tell you something, NO ONE will stop my revenge!");
					trainer[0].setPostMessage("INSOLENT SWINE! How dare you beat me! Fine. I see the error in our business. Perhaps we must change our ways. Cursed Joe. He always was good at making money. We'll unblock the building to Joe now. I'm sorry. Take this MASTER BALL too. Just because.");
					trainer[0].setDirection(270);
					trainer[0].setViewRange(0);
				}
				else
				{
					numTrainers=0;
					trainer=new Trainer[numTrainers];
				}
				loadItemData();
				break;
			case Hotel_Lobby:
				tileSet = INDOORS;
				widthHeight.x = 12;
				widthHeight.y = 12;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("Lobby.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/house.mid");
				bgm=JApplet.newAudioClip(url);

				numTrainers=4;
				trainer=new Trainer[numTrainers];
				numItems=0;
				mapItems=new Item[numItems];
				foundItem=new boolean[numItems];

				trainer[0]=new Trainer(Trainer.TrainerType.BABE,"Melissa",Pokemon.Species.CATERPIE,5);
				trainer[0].setHostile(false);
				trainer[0].setLocation(2,8);
				//trainer[0].setPreMessage("");
				trainer[0].setPostMessage("They aren't taking reservations anymore!");
				trainer[0].setDirection(270);
				trainer[0].setViewRange(0);

				trainer[1]=new Trainer(Trainer.TrainerType.ENGINEER,"Security Dude",Pokemon.Species.CATERPIE,5);
				trainer[1].setHostile(false);
				trainer[1].setLocation(0,1);
				trainer[1].setPostMessage("Sorry, you aren't allowed up here.");
				trainer[1].setDirection(270);
				trainer[1].setViewRange(0);

				trainer[2]=new Trainer(Trainer.TrainerType.ENGINEER,"Security Dude",Pokemon.Species.CATERPIE,5);
				trainer[2].setHostile(false);
				trainer[2].setLocation(11,1);
				trainer[2].setPostMessage("Sorry, you aren't allowed up here.");
				trainer[2].setDirection(270);
				trainer[2].setViewRange(0);

				trainer[3]=new Trainer(Trainer.TrainerType.CYPHER,"Security Dude",Pokemon.Species.CATERPIE,5);
				trainer[3].setHostile(false);
				trainer[3].setLocation(6,2);
				trainer[3].setPostMessage("HACKZZZZZ!!!!!");
				trainer[3].setDirection(90);
				trainer[3].setViewRange(0);

				loadItemData();
				break;
			case Lighthouse:
				tileSet = INDOORS;
				widthHeight.x = 12;
				widthHeight.y = 12;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("Lighthouse.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/1_stringville.mid");
				bgm=JApplet.newAudioClip(url);
				break;
			case Lighthouse_F2:
				tileSet = INDOORS;
				widthHeight.x = 12;
				widthHeight.y = 12;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("Lighthouse2.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/1_stringville.mid");
				bgm=JApplet.newAudioClip(url);
				break;
			case MegaMart:
				tileSet = INDOORS;
				widthHeight.x = 80;
				widthHeight.y = 80;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("MegaMart.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/1_stringville.mid");
				bgm=JApplet.newAudioClip(url);
				numTrainers=0;
				trainer=new Trainer[numTrainers];
				numItems=0;
				mapItems=new Item[numItems];
				loadItemData();
				break;
			case Power_Plant:
				tileSet = INDOORS;
				widthHeight.x = 25;
				widthHeight.y = 20;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("Power_Plant.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/1_stringville.mid");
				bgm=JApplet.newAudioClip(url);
				numTrainers=0;
				trainer=new Trainer[numTrainers];
				numItems=0;
				mapItems=new Item[numItems];
				loadItemData();
				break;
			case Challenge_Cave:
				tileSet = INDOORS;
				widthHeight.x = 120;
				widthHeight.y = 120;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("Challenge_Cave.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/0e_cave.mid");
				bgm=JApplet.newAudioClip(url);
				numTrainers=0;
				trainer=new Trainer[numTrainers];
				numItems=0;
				mapItems=new Item[numItems];
				loadItemData();
				break;
			case Elite_4:
				tileSet = INDOORS;
				widthHeight.x = 120;
				widthHeight.y = 120;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("Elite_4.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/9_hall_of_champions.mid");
				bgm=JApplet.newAudioClip(url);

				numTrainers=5;
				trainer=new Trainer[numTrainers];
				numItems=0;
				mapItems=new Item[numItems];

				trainer[0]=new Trainer(Trainer.TrainerType.ELITE,"Camtendo",Pokemon.Species.STARMIE,Pokemon.Species.SLOWBRO,Pokemon.Species.CLOYSTER,Pokemon.Species.VAPOREON,Pokemon.Species.RHYDON,Pokemon.Species.LAPRAS,60);
				trainer[0].setHostile(true);
				trainer[0].setLocation(27,86);
				trainer[0].setPreMessage("Howdy there "+name+"! You've come quite a long way, haven't you? How are you enjoying the island so far? Hopefully you have. My name is Camtendo. I'm one of Joe's top trainers. Do you have what it takes to win 4 battles in a row to get to Joe? Let's find out shall we?");
				trainer[0].setPostMessage("I figured as much. You're definitely worth your weight in gold. Continue on to the next trainer! Be careful, the door locks behind you!");
				trainer[0].setDirection(270);
				trainer[0].setViewRange(0);

				trainer[1]=new Trainer(Trainer.TrainerType.ELITE,"WasabiSause",Pokemon.Species.ALAKAZAM,Pokemon.Species.ALAKAZAM,Pokemon.Species.EXEGGUTOR,Pokemon.Species.HYPNO,Pokemon.Species.ALAKAZAM,Pokemon.Species.ALAKAZAM,64);
				trainer[1].setHostile(true);
				trainer[1].setLocation(27,62);
				trainer[1].setPreMessage("Something I don't know. I haven't really thought of what to say.");
				trainer[1].setPostMessage("Oh darn. Kajigga!");
				trainer[1].setDirection(270);
				trainer[1].setViewRange(0);

				trainer[2]=new Trainer(Trainer.TrainerType.ELITE,"Patches",Pokemon.Species.CHARIZARD,Pokemon.Species.GYARADOS,Pokemon.Species.BUTTERFREE,Pokemon.Species.DRAGONITE,Pokemon.Species.PIDGEOT,Pokemon.Species.DODRIO,68);
				trainer[2].setHostile(true);
				trainer[2].setLocation(27,31);
				trainer[2].setPreMessage("Have you played Tron yet? I made it myself!");
				trainer[2].setPostMessage("Crap now go play Tron, it's so much better than this game.");
				trainer[2].setDirection(270);
				trainer[2].setViewRange(0);

				trainer[3]=new Trainer(Trainer.TrainerType.ELITE,"Justinian",Pokemon.Species.CHARIZARD,Pokemon.Species.GYARADOS,Pokemon.Species.DRAGONITE,Pokemon.Species.DRAGONITE,Pokemon.Species.DRAGONAIR,Pokemon.Species.ARCANINE,70);
				trainer[3].setHostile(true);
				trainer[3].setLocation(28,8);
				trainer[3].setPreMessage("How did you even get to me? Did you hack or something?");
				trainer[3].setPostMessage("Well... good luck against Joe. You'll need it.");
				trainer[3].setDirection(270);
				trainer[3].setViewRange(0);

				trainer[4]=new Trainer(Trainer.TrainerType.ELITE,"Joe",Pokemon.Species.ALAKAZAM,Pokemon.Species.STARMIE,Pokemon.Species.DRAGONITE,Pokemon.Species.CHANSEY,Pokemon.Species.LAPRAS,Pokemon.Species.SNORLAX,75);
				trainer[4].setHostile(true);
				trainer[4].setLocation(49,10);
				trainer[4].setPreMessage("Welcome challenger! You must be the great "+name+"! I'm honored to meet you. You have done well to get this far! Your Pokemon must be really strong now. Are you ready for a battle? This will be an epic showdown! May the best trainer win!");
				trainer[4].setPostMessage("You have trumped me! Congratulations! I hearby recognize your greatness by allowing you to "+VERSION+" City! You can continue your Pokemon enlightenment there. Just move behind me, "+name+". Job well done!");
				trainer[4].setDirection(270);
				trainer[4].setViewRange(0);

				loadItemData();
				break;
			case Battle_Tower:
				tileSet = INDOORS;
				widthHeight.x = 15;
				widthHeight.y = 15;
				currentArea = new int[widthHeight.x][widthHeight.y];
				createMap("Battle_Tower.tilemap");
				url=JokemonDriver.class.getResource("Music/Locations/9_hall_of_champions.mid");
				bgm=JApplet.newAudioClip(url);
				numTrainers=0;
				trainer=new Trainer[numTrainers];
				numItems=0;
				mapItems=new Item[numItems];
				loadItemData();
				break;
		}

		if(transition)
		{
			try
			{
				repaint();
				Thread.sleep(2000);
			}
			catch(Exception e){e.printStackTrace();}
		}

		if(tileSet!=OUTDOORS)
		{
			bicycling=false;
		}
		else if((area==Area.Route_4&&location.y<74)||area==Area.Route_5)
		{
			forceBike=true;
			bicycling=true;
		}

		if(surfing)
			surfSong.loop();
		else if(bicycling&&!forceBike)
		{
			bikeSong.loop();
		}
		else
		{
			bgm.loop();
		}

		checkLegendaries();

		transition=false;
		justBeatRival=false;
		loadPokemonImages();
		System.out.println();
		System.out.println("Loaded "+area);
		System.out.println();
	}