public void actionHandler()
	{
		System.out.println("Requesting action handling...");

		if (makeTheArea)
		{
			System.out.println("Constructing area via game over...");
			createCurrentArea();
			makeTheArea=false;
		}

		if(invokeBicycle)
		{
			System.out.println("Invoking Bicycle...");
			rideBike();

			invokeBicycle=false;
			performingAction=false;
			return;
		}
		
		if(invokeMap)
		{
			System.out.println("Invoking Town Map...");
			map.displayMap();
			while(map.isVisible())
			{
				try
				{
					Thread.sleep(10);
				}
				catch(Exception ignored){}
			}
			
			invokeMap=false;
			performingAction=false;
			return;
		}

		if(invokeMinigame)
		{
			System.out.println("Invoking true minigame...");
			save();
			bgm.stop();
			URL url=JokemonDriver.class.getResource("Music/minigame.mid");
			AudioClip mgm=JApplet.newAudioClip(url);
			mgm.loop();

			jf.setVisible(false);

			switch(minigameInt)
			{
				case 0:
					Escape minigame=new Escape();
					while(minigame.isVisible())
					{

					}
					break;
				case 1:
					Frogger minigame2=new Frogger();
					while(minigame2.isVisible())
					{

					}
					break;
				case 2:
					Tron minigame3=new Tron();
					while(minigame3.isVisible())
					{

					}
					break;
			}

			System.exit(0);
		}

		if(flyMenu)
		{
			performingAction=false;
			useFly();
		}

		if(tileSet==OUTDOORS&&getRodType()!=null&&canFish())
		{
			System.out.println("Invoking Fishing...");
			useRod(getRodType());
			performingAction=false;
			return;
		}

		try
		{
			talk();
		}
		catch(Exception ignored){}

		try
		{
			pickUp();
		}
		catch(Exception ignored){}

		try
		{
			readSign();
		}
		catch(Exception ignored){}

		try
		{
			if(Inventory.hasItem(new Item(Item.Type.HM,1,1)))
			useCut();
		}
		catch(Exception ignored){}

		try
		{
			if(Inventory.hasItem(new Item(Item.Type.HM,1,4)))
			useStrength();
		}
		catch(Exception ignored){}

		//Pokemon Center
		if((area==Area.Pokecenter&&location.x==4&&location.y==3&&direction==90)||(area==Area.Elite_4&&location.x==24&&location.y==109&&direction==90))
		{
			System.out.println("Invoking Pokemon Center Healing...");

			try
			{
				healPokemon();

				repaint();
				messageBox=new ErrorWindow();
				messageBox.addMessage("All healed! Have a good day!","Pokemon Center");

				messageBox.repaint();
				while(messageBox.isVisible())
				{
					try
					{
						repaint();
						Thread.sleep(10);
					}
					catch(Exception e){e.printStackTrace();}
				}

				jf.toFront();
			}
			catch(Exception e){e.printStackTrace();}
		}

		//Battle Tower
		if((area==Area.Battle_Tower&&location.x==7&&location.y==9&&direction==90))
		{
			System.out.println("Invoking BattleTower");

			try
			{
				healPokemonNoPrompt();

				repaint();
				messageBox=new ErrorWindow();
				messageBox.addMessage("Earn money and exp! Fight until you lose!","Battle Tower");

				messageBox.repaint();
				while(messageBox.isVisible())
				{
					try
					{
						repaint();
						Thread.sleep(10);
					}
					catch(Exception e){e.printStackTrace();}
				}

				jf.toFront();
				jf.setVisible(false);

				int levels=50;
				int wins=0;

				int numPo=0;
				for(int i=0; i<6; i++)
				{
					if(partyPokemon[i]!=null)
					{
						numPo++;
					}
				}

				while(Mechanics.hasRemainingPokemon(partyPokemon,numPo))
				{
					bgm.stop();
					Trainer btTrainer=new Trainer(Trainer.TrainerType.PROGRAMMER,"Battle Tower",Pokedex.getSpecies((int)(Math.random()*151+1)),Pokedex.getSpecies((int)(Math.random()*151+1)),Pokedex.getSpecies((int)(Math.random()*151+1)),Pokedex.getSpecies((int)(Math.random()*151+1)),Pokedex.getSpecies((int)(Math.random()*151+1)),Pokedex.getSpecies((int)(Math.random()*151+1)),levels);
					for(int i=0; i<6; i++)
					{
						enemy[i]=btTrainer.getPokemon(i);
					}

					BattleWindow bwin;

					bwin=new BattleWindow(partyPokemon,enemy,"TRAINER",btTrainer);

					for(int i=0; i<6; i++)
					{
						partyPokemon[i]=Battle.getPokemon(i);
					}

					jf.setVisible(true);
					jf.toFront();
					bgm.loop();

					wins++;

					messageBox=new ErrorWindow();
					messageBox.addMessage("Wins: "+wins+" Begin next battle!","Battle Tower");

					messageBox.repaint();
					while(messageBox.isVisible())
					{
						try
						{
							repaint();
							Thread.sleep(10);
						}
						catch(Exception e){e.printStackTrace();}
					}

					jf.toFront();

					levels+=5;
				}
			}
			catch(Exception e){e.printStackTrace();}
		}

		//Computer
		if(tileSet==INDOORS&&(currentArea[location.x][location.y-1]==141||currentArea[location.x][location.y-1]==19||currentArea[location.x][location.y-1]==350)&&direction==90)
		{
			System.out.println("Invoking Computer...");
			onComp=true;
			compMode="";
		}

		//Minigames
		if(area==Area.J_Inc_Building&&currentArea[location.x][location.y]==211)
		{
			System.out.println("Invoking Minigame initialization...");
			playingMinigame=true;
			minigameInt=0;
		}

		//LAN Trade
		if(area==Area.Pokecenter&&location.x==11&&location.y==3&&direction==90)
		{
			System.out.println("Invoking Trade...");
			if(tWin==null||!tWin.jf.isVisible())
			tradePokemon();
		}

		//Mart
		if((area==Area.Elite_4&&location.x==33&&location.y==109&&direction==90)||(area==Area.Mart&&location.x==3&&location.y==4&&direction==180)||(area==Area.MegaMart&&location.x==12&&location.y==8&&direction==90)||(area==Area.MegaMart&&location.x==14&&location.y==26&&direction==0)||(area==Area.MegaMart&&location.x==14&&location.y==39&&direction==180)||(area==Area.MegaMart&&location.x==14&&location.y==59&&direction==0))
		{
			System.out.println("Invoking Mart...");
			try
			{
				mart=new Mart();
				System.out.println(""+returnArea);
				if(area!=Area.Elite_4)
				mart.setUpMart(returnArea,1);
				else
				mart.setUpMart(Area.Elite_4,1);

				while (mart.visible)
				{
					thread.sleep(10);
					repaint();
				}
				jf.toFront();
			}
			catch(Exception e){e.printStackTrace();}
		}

		System.out.println("Ending action handling...");
		performingAction=false;
	}