public static boolean caughtPokemon(Pokemon p, Item item)
	{
		int catchRate=256;

		//Catch Rate Algorithm (Camtendo)
		//CR=256-(255(Base Stats/590.0))
		catchRate=(int)(256-(255*(p.getBaseStatTotal()/590.0)));
		//CR+=76(1-((HP/HPMAX)(LVL/100))
		catchRate+=76*(1-(((double)p.health/(double)p.healthMax)*(p.level/5.0)));
		//Mewtwo and Mew's Catch Rates are always 1.
		if(p.species==Pokemon.Species.MEW||p.species==Pokemon.Species.MEWTWO||catchRate<1)
			catchRate=1;
		if (p.species==Pokemon.Species.MEWTWO && p.nickname.equalsIgnoreCase("Mewtrix"))
			catchRate=0;
		//CR Multipliers
		//Status
		switch(p.status)
		{
			case SLP:
			case FRZ:
				catchRate*=1.5;
				break;
			case PAR:
				catchRate*=1.25;
				break;
			case BRN:
			case PSN:
				catchRate*=1.1;
				break;
			default:
				break;
		}

		//Ball Type
		switch(item.type)
		{
			case POKE_BALL:
				catchRate*=.75;
				break;
			case GREAT_BALL:
				catchRate*=1.5;
				break;
			case ULTRA_BALL:
				catchRate*=3;
				break;
			case MASTER_BALL:
			case OMEGA_BALL:
				catchRate*=256;
				break;
		}

		int randy=(int)(Math.random()*256);

		System.out.println("Odds of Catching: "+randy);
		System.out.println("Pokemon's Catch Rate: "+catchRate);

		return randy<catchRate;
	}