public static void useMove(int theUser, int index)
	{
		if(theUser==0)
			System.out.println("Move used: "+user[userIndex].move[index]);
		else
			System.out.println("Move used: "+enemy[enemyIndex].move[index]);

		//User Set
		if(theUser==0)
		{
			switch(user[userIndex].move[index].mainEffect)
			{
				case DAMAGE:
					if(user[userIndex].move[index].pp>0)
					{
						hasPP=true;
						//Checks if move is Special or not, then uses correct formula to calculate
						//damage.
						if(Mechanics.isSpecial(user[userIndex].move[index].moveType))
							Mechanics.calcDamage(user[userIndex].move[index].basePower,
							user[userIndex].level,user[userIndex].spcl,enemy[enemyIndex].spcl,1);
						else
							Mechanics.calcDamage(user[userIndex].move[index].basePower,
							user[userIndex].level,user[userIndex].atk,enemy[enemyIndex].def,1);

						//Adds type multiplier to damage
						Mechanics.damage*=Mechanics.typeMultiplier(user[userIndex].move[index].moveType,
						enemy[enemyIndex].type1,enemy[enemyIndex].type2);

						//Multiplies damage by 1.5 for Same Type Attack Bonus
						if(Mechanics.isSTAB(user[userIndex].type1,user[userIndex].type2,user[userIndex].move[index].moveType))
							Mechanics.damage*=1.5;

						//Multiplies damage by 2 for critical hit
						if(user[userIndex].move[index].sideEffect==Pokemon.Side_Effect.HIGH_CRIT)
							Mechanics.isHighCritical[0]=true;
						if(Mechanics.checkCritical(user[userIndex].baseSPEED,1)&&Mechanics.effective!=Mechanics.Effective.NONE)
						{
							crit=true;
							Mechanics.damage*=2;
						}

						//Reduces physical damage due to burn
						if(!Mechanics.isSpecial(user[userIndex].move[index].moveType)&&
							user[userIndex].status==Pokemon.Status.BRN)
							{
								Mechanics.damage*=0.75;
							}

						//Reduces damage when Light Screen or Reflect are up
						if(!Mechanics.isSpecial(user[userIndex].move[index].moveType)&&Mechanics.turnsReflect[1]>0)
						{
							Mechanics.damage/=2;
						}
						else if(Mechanics.isSpecial(user[userIndex].move[index].moveType)&&Mechanics.turnsLightScreen[1]>0)
						{
							Mechanics.damage/=2;
						}

						//Checks if move hit or not
						if(!Mechanics.checkHit(user[userIndex],index,enemy[enemyIndex].eva)||
							(Mechanics.awayFromBattle[1]&&user[userIndex].move[index]!=Pokemon.Move.SWIFT)&&Mechanics.turnsMultiTurn[0]<1)
						{
							Mechanics.damage=0;
							hit=false;
						}
						else
						{
							hit=true;
							if(Mechanics.damage<1&&Mechanics.effective!=Mechanics.Effective.NONE)
								Mechanics.damage=1;
						}

						if(hit&&Mechanics.hasSubstitute[1])
						{
							Mechanics.substituteHealth[1]-=Mechanics.damage;
							Mechanics.damage=0;
						}
						if (Mechanics.damage > enemy[enemyIndex].health)
						{
							Mechanics.damage = enemy[enemyIndex].health;
						}

						switch(user[userIndex].move[index].sideEffect)
						{
							case HIGH_CRIT:
							case QUICK_ATTACK:
							case SWIFT:
							case NONE:
								enemy[enemyIndex].health-=Mechanics.damage;
								  user[userIndex].TRUE_PP[index]--;
								break;
							case ABSORB:
								if(user[userIndex].move[index]==Pokemon.Move.DREAM_EATER)
								{
									if(enemy[enemyIndex].status!=Pokemon.Status.SLP)
									{
										Mechanics.damage=0;
										hit=false;
									}
								}
								user[userIndex].health=Mechanics.recover(user[userIndex],Mechanics.damage/2);
								enemy[enemyIndex].health-=Mechanics.damage;
								  user[userIndex].TRUE_PP[index]--;
								break;
							case STAT:
								if(Mechanics.checkSideEffect(user[userIndex].move[index])&&Mechanics.damage>0)
									sideHit=true;
								if(sideHit)
								{
									switch(user[userIndex].move[index])
									{
										case ACID:
											enemy[enemyIndex].defStage--;
											enemy[enemyIndex].def=(int)((Mechanics.calcOtherStat(enemy[enemyIndex].baseDEF,enemy[enemyIndex].DEF_IV,enemy[enemyIndex].DEF_EV,enemy[enemyIndex].level))*
											Mechanics.stageMultiplier(enemy[enemyIndex].defStage));
											break;
										case BUBBLE:
										case BUBBLEBEAM:
										case CONSTRICT:
											enemy[enemyIndex].speedStage--;
											enemy[enemyIndex].speed=(int)((Mechanics.calcOtherStat(enemy[enemyIndex].baseSPEED,enemy[enemyIndex].SPEED_IV,enemy[enemyIndex].SPEED_EV,enemy[enemyIndex].level))*
											Mechanics.stageMultiplier(enemy[enemyIndex].speedStage));
											break;
										case PSYCHIC:
											enemy[enemyIndex].spclStage--;
											enemy[enemyIndex].spcl=(int)((Mechanics.calcOtherStat(enemy[enemyIndex].baseSPCL,enemy[enemyIndex].SPCL_IV,enemy[enemyIndex].SPCL_EV,enemy[enemyIndex].level))*
											Mechanics.stageMultiplier(enemy[enemyIndex].spclStage));
											break;
									}
								}
								enemy[enemyIndex].health-=Mechanics.damage;
								  user[userIndex].TRUE_PP[index]--;
								break;
							case STATUS:
								if(Mechanics.checkSideEffect(user[userIndex].move[index])
									&&enemy[enemyIndex].status==Pokemon.Status.OK&&Mechanics.damage>0
										&&!Mechanics.awayFromBattle[1])
									{
										enemy[enemyIndex].status=user[userIndex].move[index].status;
										sideHit=true;
									}
								enemy[enemyIndex].health-=Mechanics.damage;
								  user[userIndex].TRUE_PP[index]--;
								break;
							case SUBSTATUS:
								if(Mechanics.checkSideEffect(user[userIndex].move[index])
									&&enemy[enemyIndex].substatus==Pokemon.Substatus.OK&&Mechanics.damage>0
										&&!Mechanics.awayFromBattle[1])
								{
									enemy[enemyIndex].substatus=user[userIndex].move[index].substatus;
									sideHit=true;
								}
								enemy[enemyIndex].health-=Mechanics.damage;
								  user[userIndex].TRUE_PP[index]--;
								break;
							case MULTI_HIT:
								int rand=(int)(Math.random()*3)+2;
								Mechanics.damage*=rand;
								timesHit=rand;
								enemy[enemyIndex].health-=Mechanics.damage;
								  user[userIndex].TRUE_PP[index]--;
								break;
							case MULTI_TURN:
								if(Mechanics.turnsMultiTurn[0]==0&&hit)
								{
									int rand2=(int)(Math.random()*4)+2;
									Mechanics.turnsMultiTurn[0]=rand2;
									enemy[enemyIndex].health-=Mechanics.damage;
									Mechanics.canAttack[1]=false;
									userLockedMove=index;
									  user[userIndex].TRUE_PP[index]--;
								}
								else if(Mechanics.turnsMultiTurn[0]==1)
								{
									enemy[enemyIndex].health-=Mechanics.damage;
									Mechanics.turnsMultiTurn[0]=0;
									Mechanics.canAttack[1]=true;
									userLockedMove=-1;
									hit=true;
								}
								else if(Mechanics.turnsMultiTurn[0]>1)
								{
									hit=true;
									enemy[enemyIndex].health-=Mechanics.damage;
									Mechanics.turnsMultiTurn[0]--;
								}
								break;
							case OHKO:
								crit=false;
								if(Mechanics.damage!=0)
								{
									if(user[userIndex].speed>enemy[enemyIndex].speed)
									{
										Mechanics.damage=Integer.MAX_VALUE;
										//Mechanics.damage=enemy[enemyIndex].health;
									}
									else
									{
										hit=false;
										Mechanics.damage=0;
									}
								}
								enemy[enemyIndex].health-=Mechanics.damage;
								  user[userIndex].TRUE_PP[index]--;
								break;
							case CHARGE:
								switch(user[userIndex].move[index])
								{
									case RAZOR_WIND:
									case SKY_ATTACK:
									case SKULL_BASH:
									case SOLARBEAM:
										if(!Mechanics.charging[0])
										{
											Mechanics.charging[0]=true;
											Mechanics.damage=0;

											userLockedMove=index;
										}
										else
										{
											Mechanics.charging[0]=false;
											enemy[enemyIndex].health-=Mechanics.damage;
											userLockedMove=-1;
											  user[userIndex].TRUE_PP[index]--;
										}
										break;
									case HYPER_BEAM:
										if(!Mechanics.charging[0])
										{
											Mechanics.charging[0]=true;
											enemy[enemyIndex].health-=Mechanics.damage;
											userLockedMove=index;
											  user[userIndex].TRUE_PP[index]--;
										}
										else
										{
											Mechanics.charging[0]=false;
											userLockedMove=-1;
											Mechanics.damage=0;
										}
										break;

								}
								break;
							case FAINT:
								enemy[enemyIndex].health-=Mechanics.damage;
								  user[userIndex].TRUE_PP[index]--;
								user[userIndex].health=0;
								break;
							case RECOIL:
								switch(user[userIndex].move[index])
								{
									case STRUGGLE:
										enemy[enemyIndex].health-=Mechanics.damage;
										user[userIndex].health-=Mechanics.damage/2;
										break;
									default:
										enemy[enemyIndex].health-=Mechanics.damage;
										user[userIndex].health-=Mechanics.damage/4;
										  user[userIndex].TRUE_PP[index]--;
										break;
								}
								break;
							case COLLECT_DAMAGE:
								switch(user[userIndex].move[index])
								{
									case BIDE:
										if(Mechanics.turnsMultiTurn[0]==0)
										{
											int rand2=(int)(Math.random()*2)+2;
											Mechanics.turnsMultiTurn[0]=rand2;
											Mechanics.storedDamage[0]=0;
											userLockedMove=index;
											Mechanics.damage=0;
										}
										else if(Mechanics.turnsMultiTurn[0]==1)
										{
											enemy[enemyIndex].health-=Mechanics.storedDamage[0];
											Mechanics.turnsMultiTurn[0]=0;
											Mechanics.storedDamage[0]=0;
											userLockedMove=-1;
											Mechanics.damage=0;
											  user[userIndex].TRUE_PP[index]--;
										}
										else if(Mechanics.turnsMultiTurn[0]>1)
										{
											Mechanics.turnsMultiTurn[0]--;
										}
										break;
									case COUNTER:
										if(enemy[enemyIndex].move[enemyCmd].moveType==Pokemon.Type.NORMAL||
											enemy[enemyIndex].move[enemyCmd].moveType==Pokemon.Type.FIGHTING)
										{
											enemy[enemyIndex].health-=Mechanics.damage*2;
										}
										else
											hit=false;
										  user[userIndex].TRUE_PP[index]--;
										break;
								}
								break;
							case FIXED_DAMAGE:
								if(!Mechanics.awayFromBattle[1])
									hit=true;
								if(hit)
								switch(user[userIndex].move[index])
								{
									case DRAGON_RAGE:
										enemy[enemyIndex].health-=40;
										  user[userIndex].TRUE_PP[index]--;
										break;
									case SONIC_BOOM:
										enemy[enemyIndex].health-=20;
										  user[userIndex].TRUE_PP[index]--;
										break;
									case NIGHT_SHADE:
									case SEISMIC_TOSS:
										enemy[enemyIndex].health-=user[userIndex].level;
										  user[userIndex].TRUE_PP[index]--;
										break;
									case PSYWAVE:
										int rand3=(int)(Math.random()*1.5*user[userIndex].level)+1;
										//Ensures that damage is at least 1
										if(rand3<1)
											rand3=1;
										enemy[enemyIndex].health-=rand3;
										  user[userIndex].TRUE_PP[index]--;
										break;
									case SUPER_FANG:
										enemy[enemyIndex].health/=2;
										  user[userIndex].TRUE_PP[index]--;
										break;
								}
								else
									  user[userIndex].TRUE_PP[index]--;
								break;
							case HIDE:
								if(!Mechanics.awayFromBattle[0])
								{
									Mechanics.awayFromBattle[0]=true;
									userLockedMove=index;
								}
								else
								{
									Mechanics.awayFromBattle[0]=false;
									enemy[enemyIndex].health-=Mechanics.damage;
									userLockedMove=-1;
									  user[userIndex].TRUE_PP[index]--;
								}
								break;
							case FURY:
								if(Mechanics.turnsMultiTurn[0]==0&&hit)
								{
									int rand2=(int)(Math.random()*2)+2;
									if(user[userIndex].move[userCmd]==Pokemon.Move.RAGE)
										rand2=Integer.MAX_VALUE;
									Mechanics.turnsMultiTurn[0]=rand2;
									enemy[enemyIndex].health-=Mechanics.damage;
									userLockedMove=index;
									  user[userIndex].TRUE_PP[index]--;
								}
								else if(Mechanics.turnsMultiTurn[0]==1)
								{
									enemy[enemyIndex].health-=Mechanics.damage;
									Mechanics.turnsMultiTurn[0]=0;
									userLockedMove=-1;
									hit=true;
									if(user[userIndex].move[userCmd]!=Pokemon.Move.RAGE)
										user[userIndex].substatus=Pokemon.Substatus.CONFU;
								}
								else if(Mechanics.turnsMultiTurn[0]>1)
								{
									hit=true;
									enemy[enemyIndex].health-=Mechanics.damage;
									Mechanics.turnsMultiTurn[0]--;
								}
						}
					}
					else
					{
						hasPP=false;

						if(!Mechanics.hasPPAtAll(user[userIndex]))
						{
							//Stores Current PP
							int pp1=user[userIndex].move[0].pp;
							int pp2=user[userIndex].move[1].pp;
							int pp3=user[userIndex].move[2].pp;
							int pp4=user[userIndex].move[3].pp;

							Pokemon.Move savedMove=user[userIndex].move[index];
							user[userIndex].move[index]=Pokemon.Move.STRUGGLE;

							//Initializes move
							user[userIndex].createMoves();
							//Uses move
							useMove(0,index);
							//Writes Move Info
							postAttackInfo(0);
							//Reassigns Moves
							user[userIndex].move[index]=savedMove;
							user[userIndex].createMoves();

							//Assigns Previous PP
							user[userIndex].move[0].pp=pp1;
							user[userIndex].move[1].pp=pp2;
							user[userIndex].move[2].pp=pp3;
							user[userIndex].move[3].pp=pp4;
						}
					}
					break;
			case RAISE_STAT:
				hit=true;

				if(user[userIndex].move[index].pp>0)
				{
					hasPP=true;
					switch(user[userIndex].move[index])
					{
						case SHARPEN:
						case MEDITATE:
							user[userIndex].atkStage--;
						case SWORDS_DANCE:
							user[userIndex].atkStage+=2;
							user[userIndex].atk=(int)((Mechanics.calcOtherStat(user[userIndex].baseATK,user[userIndex].ATK_IV,user[userIndex].ATK_EV,user[userIndex].level))*
							Mechanics.stageMultiplier(user[userIndex].atkStage));
							  user[userIndex].TRUE_PP[index]--;
							break;
						case DEFENSE_CURL:
						case HARDEN:
						case WITHDRAW:
							user[userIndex].defStage--;
						case ACID_ARMOR:
						case BARRIER:
							user[userIndex].defStage+=2;
							user[userIndex].def=(int)((Mechanics.calcOtherStat(user[userIndex].baseDEF,user[userIndex].DEF_IV,user[userIndex].DEF_EV,user[userIndex].level))*
							Mechanics.stageMultiplier(user[userIndex].defStage));
							  user[userIndex].TRUE_PP[index]--;
							break;
						case AGILITY:
							user[userIndex].speedStage+=2;
							user[userIndex].speed=(int)((Mechanics.calcOtherStat(user[userIndex].baseSPEED,user[userIndex].SPEED_IV,user[userIndex].SPEED_EV,user[userIndex].level))*
							Mechanics.stageMultiplier(user[userIndex].speedStage));
							  user[userIndex].TRUE_PP[index]--;
							break;
						case GROWTH:
							user[userIndex].spclStage--;
						case AMNESIA:
							user[userIndex].spclStage+=2;
							user[userIndex].spcl=(int)((Mechanics.calcOtherStat(user[userIndex].baseSPCL,user[userIndex].SPCL_IV,user[userIndex].SPCL_EV,user[userIndex].level))*
							Mechanics.stageMultiplier(user[userIndex].spclStage));
							  user[userIndex].TRUE_PP[index]--;
							break;
						case DOUBLE_TEAM:
						case MINIMIZE:
							user[userIndex].evaStage++;
							user[userIndex].eva=1*Mechanics.stageMultiplier(user[userIndex].evaStage);
							  user[userIndex].TRUE_PP[index]--;
							break;
					}
				}
				else
				{
					hasPP=false;
					if(!Mechanics.hasPPAtAll(user[userIndex]))
						{
							//Stores Current PP
							int pp1=user[userIndex].move[0].pp;
							int pp2=user[userIndex].move[1].pp;
							int pp3=user[userIndex].move[2].pp;
							int pp4=user[userIndex].move[3].pp;

							Pokemon.Move savedMove=user[userIndex].move[index];
							user[userIndex].move[index]=Pokemon.Move.STRUGGLE;

							//Initializes move
							user[userIndex].createMoves();
							//Uses move
							useMove(0,index);
							//Writes Move Info
							postAttackInfo(0);
							//Reassigns Moves
							user[userIndex].move[index]=savedMove;
							user[userIndex].createMoves();

							//Assigns Previous PP
							user[userIndex].move[0].pp=pp1;
							user[userIndex].move[1].pp=pp2;
							user[userIndex].move[2].pp=pp3;
							user[userIndex].move[3].pp=pp4;
						}
				}
				break;
			case LOWER_STAT:
				if(user[userIndex].move[index].pp>0)
				{
					if(!Mechanics.awayFromBattle[1])
						hit=true;
					if(Mechanics.turnsMist[1]>0)
						hit=false;

					if(hit)
					{
					switch(user[userIndex].move[index])
					{
						case GROWL:
							enemy[enemyIndex].atkStage--;
							enemy[enemyIndex].atk=(int)((Mechanics.calcOtherStat(enemy[enemyIndex].baseATK,enemy[enemyIndex].ATK_IV,enemy[enemyIndex].ATK_EV,enemy[enemyIndex].level))*
							Mechanics.stageMultiplier(enemy[enemyIndex].atkStage));
							  user[userIndex].TRUE_PP[index]--;
							break;
						case SCREECH:
							enemy[enemyIndex].defStage--;
						case LEER:
						case TAIL_WHIP:
							enemy[enemyIndex].defStage--;
							enemy[enemyIndex].def=(int)((Mechanics.calcOtherStat(enemy[enemyIndex].baseDEF,enemy[enemyIndex].DEF_IV,enemy[enemyIndex].DEF_EV,enemy[enemyIndex].level))*
							Mechanics.stageMultiplier(enemy[enemyIndex].defStage));
							  user[userIndex].TRUE_PP[index]--;
							break;
						case FLASH:
						case KINESIS:
						case SAND_ATTACK:
							enemy[enemyIndex].accuracyStage--;
							  user[userIndex].TRUE_PP[index]--;
							break;
						case STRING_SHOT:
							enemy[enemyIndex].speedStage--;
							enemy[enemyIndex].speed=(int)((Mechanics.calcOtherStat(enemy[enemyIndex].baseSPEED,enemy[enemyIndex].SPEED_IV,enemy[enemyIndex].SPEED_EV,enemy[enemyIndex].level))*
							Mechanics.stageMultiplier(enemy[enemyIndex].speedStage));
							  user[userIndex].TRUE_PP[index]--;
							break;
					}
				}
					else
						  user[userIndex].TRUE_PP[index]--;
				}
				else
				{
					hasPP=false;
					if(!Mechanics.hasPPAtAll(user[userIndex]))
						{
							//Stores Current PP
							int pp1=user[userIndex].move[0].pp;
							int pp2=user[userIndex].move[1].pp;
							int pp3=user[userIndex].move[2].pp;
							int pp4=user[userIndex].move[3].pp;

							Pokemon.Move savedMove=user[userIndex].move[index];
							user[userIndex].move[index]=Pokemon.Move.STRUGGLE;

							//Initializes move
							user[userIndex].createMoves();
							//Uses move
							useMove(0,index);
							//Writes Move Info
							postAttackInfo(0);
							//Reassigns Moves
							user[userIndex].move[index]=savedMove;
							user[userIndex].createMoves();

							//Assigns Previous PP
							user[userIndex].move[0].pp=pp1;
							user[userIndex].move[1].pp=pp2;
							user[userIndex].move[2].pp=pp3;
							user[userIndex].move[3].pp=pp4;
						}
				}
				break;
			case INFLICT_STATUS:
				if(user[userIndex].move[index].pp>0)
				{
					hasPP=true;
					//Checks if move hit or not
					if(Mechanics.checkHit(user[userIndex],index,enemy[enemyIndex].eva)&&!Mechanics.awayFromBattle[1])
						hit=true;
					else
						hit=false;

					boolean sleep=false;

					switch(user[userIndex].move[index])
					{
						case LEECH_SEED:
						case CONFUSE_RAY:
						case SUPERSONIC:
							if(hit&&enemy[enemyIndex].substatus==Pokemon.Substatus.OK&&!Mechanics.awayFromBattle[1])
							{
								Mechanics.turnsConfused[1]=(int)(Math.random()*4)+1;
								Mechanics.isConfused[1]=true;
								enemy[enemyIndex].substatus=user[userIndex].move[index].substatus;
								sideHit=true;
							}
							  user[userIndex].TRUE_PP[index]--;
							break;
						case HYPNOSIS:
						case LOVELY_KISS:
						case SING:
						case SLEEP_POWDER:
						case SPORE:
							sleep=true;
							Mechanics.turnsAsleep[1]=(int)(Math.random()*5)+1;
						case POISON_GAS:
						case POISONPOWDER:
						case TOXIC:
						case GLARE:
						case STUN_SPORE:
						case THUNDER_WAVE:
							if(hit&&enemy[enemyIndex].status==Pokemon.Status.OK&&!Mechanics.awayFromBattle[1])
							{
								if(sleep)
								{
									if(!Mechanics.sleepClauseActive(user,userNumOfPokemon))
									{
										enemy[enemyIndex].status=user[userIndex].move[index].status;
										sideHit=true;
									}
								}
								else
								{
									enemy[enemyIndex].status=user[userIndex].move[index].status;
									sideHit=true;
								}
							}
							  user[userIndex].TRUE_PP[index]--;
							break;
					}
				}
				else
				{
					hasPP=false;

					if(!Mechanics.hasPPAtAll(user[userIndex]))
						{
							//Stores Current PP
							int pp1=user[userIndex].move[0].pp;
							int pp2=user[userIndex].move[1].pp;
							int pp3=user[userIndex].move[2].pp;
							int pp4=user[userIndex].move[3].pp;

							Pokemon.Move savedMove=user[userIndex].move[index];
							user[userIndex].move[index]=Pokemon.Move.STRUGGLE;

							//Initializes move
							user[userIndex].createMoves();
							//Uses move
							useMove(0,index);
							//Writes Move Info
							postAttackInfo(0);
							//Reassigns Moves
							user[userIndex].move[index]=savedMove;
							user[userIndex].createMoves();

							//Assigns Previous PP
							user[userIndex].move[0].pp=pp1;
							user[userIndex].move[1].pp=pp2;
							user[userIndex].move[2].pp=pp3;
							user[userIndex].move[3].pp=pp4;
						}
				}
				break;
			case SPECIAL:
				if(user[userIndex].move[index].pp>0)
				{
					hasPP=true;

					switch(user[userIndex].move[index])
					{
						case CONVERSION:
							hit=true;
							user[userIndex].type1=enemy[enemyIndex].type1;
							user[userIndex].type2=enemy[enemyIndex].type2;
							  user[userIndex].TRUE_PP[index]--;
							break;
						case DISABLE:
							if(Mechanics.turnsDisabled[1]==0&&Mechanics.checkHit(user[userIndex],index,enemy[enemyIndex].eva)
								&&!Mechanics.awayFromBattle[1])
								hit=true;
							if(hit)
							{
								Mechanics.turnsDisabled[1]=(int)(Math.random()*3)+2;
								Mechanics.moveDisabled[1]=(int)(Math.random()*4);
							}
							  user[userIndex].TRUE_PP[index]--;
							break;
						case FOCUS_ENERGY:
							  user[userIndex].TRUE_PP[index]--;
							break;
						case HAZE:
							user[userIndex].status=Pokemon.Status.OK;
							user[userIndex].substatus=Pokemon.Substatus.OK;
							enemy[enemyIndex].status=Pokemon.Status.OK;
							enemy[enemyIndex].substatus=Pokemon.Substatus.OK;
							  user[userIndex].TRUE_PP[index]--;
							break;
						case LIGHT_SCREEN:
							Mechanics.turnsLightScreen[0]=5;
							  user[userIndex].TRUE_PP[index]--;
							break;
						case REFLECT:
							Mechanics.turnsReflect[0]=5;
							  user[userIndex].TRUE_PP[index]--;
							break;
						case METRONOME:
							//Declares Move Use Here
							b1.addText(user[userIndex].nickname+" used "+user[userIndex].move[userCmd]);
							  user[userIndex].TRUE_PP[index]--;

							//Stores Current PP
							int pp1=user[userIndex].TRUE_PP[0];
							int pp2=user[userIndex].TRUE_PP[1];
							int pp3=user[userIndex].TRUE_PP[2];
							int pp4=user[userIndex].TRUE_PP[3];

							//Chooses a random move
							int randy=(int)(Math.random()*163);
							user[userIndex].move[index]=user[userIndex].randomMove(randy);


							//Initializes move
							user[userIndex].createMoves();
							//Uses move
							useMove(0,index);
							//Writes Move Info
							postAttackInfo(0);
							//Reassigns Moves
							user[userIndex].move[index]=Pokemon.Move.METRONOME;
							user[userIndex].createMoves();

							//Assigns Previous PP
							user[userIndex].TRUE_PP[0]=pp1;
							user[userIndex].TRUE_PP[1]=pp2;
							user[userIndex].TRUE_PP[2]=pp3;
							user[userIndex].TRUE_PP[3]=pp4;
							break;
						case MIMIC:
							b1.addText(user[userIndex].nickname+" used "+user[userIndex].move[userCmd]);
							//Stores Current PP
							int pp11=user[userIndex].TRUE_PP[0];
							int pp22=user[userIndex].TRUE_PP[1];
							int pp33=user[userIndex].TRUE_PP[2];
							int pp44=user[userIndex].TRUE_PP[3];

							revert[userIndex]=user[userIndex];

							//Chooses a random move
							int randy2=(int)(Math.random()*4);
							user[userIndex].move[index]=enemy[enemyIndex].move[randy2];

							//Initializes moves
							user[userIndex].createMoves();

							//Assigns Previous PP
							if(index!=0)
							user[userIndex].TRUE_PP[0]=pp11;
							if(index!=1)
							user[userIndex].TRUE_PP[1]=pp22;
							if(index!=2)
							user[userIndex].TRUE_PP[2]=pp33;
							if(index!=3)
							user[userIndex].TRUE_PP[3]=pp44;

							b1.addText(user[userIndex].nickname+" learned "+user[userIndex].move[userCmd]+"!");
							nonPostingCase[0]=true;
							break;
						case MIRROR_MOVE:
							//Declares Move Use Here
							b1.addText(user[userIndex].nickname+" used "+user[userIndex].move[userCmd]);
							  user[userIndex].TRUE_PP[index]--;

							//Uses move if move is not Mirror Move (Infinite Recursion) or out of range(ArrayIndexOutOfBounds)
							if(enemyCmd<0||enemyCmd>3)
							{
								b1.addText("The move failed!");
							}
							else if(enemy[enemyIndex].move[enemyCmd]!=Pokemon.Move.MIRROR_MOVE)
							{
								//Stores Current PP
								int pp111=user[userIndex].TRUE_PP[0];
								int pp222=user[userIndex].TRUE_PP[1];
								int pp333=user[userIndex].TRUE_PP[2];
								int pp444=user[userIndex].TRUE_PP[3];

								//Chooses most recent enemy move
								if(enemyCmd>=0&&enemyCmd<4)
								user[userIndex].move[index]=enemy[enemyIndex].move[enemyCmd];

								//Initializes move
								user[userIndex].createMoves();

								useMove(0,index);

								//Writes Move Info
								postAttackInfo(0);

								//Reassigns Moves
								user[userIndex].move[index]=Pokemon.Move.MIRROR_MOVE;
								user[userIndex].createMoves();

								//Assigns Previous PP
								user[userIndex].TRUE_PP[0]=pp111;
								user[userIndex].TRUE_PP[1]=pp222;
								user[userIndex].TRUE_PP[2]=pp333;
								user[userIndex].TRUE_PP[3]=pp444;
							}
							else
							{
								b1.addText("The move failed!");
							}
							break;
						case MIST:
							if(Mechanics.turnsMist[0]==0)
							{
								Mechanics.turnsMist[0]=5;
								hit=true;
							}
							else
								hit=false;
							  user[userIndex].TRUE_PP[index]--;
							break;
						case RECOVER:
						case SOFTBOILED:
							if(user[userIndex].health<user[userIndex].healthMax)
							{
								hit=true;
								user[userIndex].health=Mechanics.recover(user[userIndex],user[userIndex].healthMax/2);
							}
							else
								hit=false;
							  user[userIndex].TRUE_PP[index]--;
							break;
						case REST:
							if(user[userIndex].health<user[userIndex].healthMax)
							{
								hit=true;
								user[userIndex].health=Mechanics.recover(user[userIndex],user[userIndex].healthMax);
								user[userIndex].status=Pokemon.Status.SLP;
								Mechanics.turnsAsleep[0]=2;
							}
							else
								hit=false;
							  user[userIndex].TRUE_PP[index]--;
							break;
						case SPLASH:
							hit=true;
							  user[userIndex].TRUE_PP[index]--;
							break;
						case SUBSTITUTE:
							  user[userIndex].TRUE_PP[index]--;
							if(Mechanics.canCreateSubstitute(user[userIndex])&&!Mechanics.hasSubstitute[0])
							{
								Mechanics.createSubstitute(user[userIndex].healthMax/4,0);
								user[userIndex].health-=user[userIndex].healthMax/4;
								hit=true;
							}
							else
								hit=false;
							break;
						case TRANSFORM:
							b1.addText(user[userIndex].nickname+" used "+user[userIndex].move[userCmd]);
							user[userIndex].TRUE_PP[index]--;

							Pokemon.Species s=user[userIndex].species;

							//Stores data for reference
							String str=user[userIndex].nickname;
							revert[userIndex]=user[userIndex];
							revert[userIndex].species=s;

							//Assigns Pokemon Species
							user[userIndex].species=enemy[enemyIndex].species;

							//Creates Pokemon with enemy moves
							user[userIndex]=new Pokemon(user[userIndex].species,enemy[enemyIndex].move[0],enemy[enemyIndex].move[1],
							enemy[enemyIndex].move[2],enemy[enemyIndex].move[3],user[userIndex].level);

							b1.createPokemonImages();

							//Assigns 5 PP to all moves
							for(int i=0; i<4; i++)
							{
								user[userIndex].move[i].pp=5;
								user[userIndex].TRUE_PP[i]=5;
							}
							//Assigns former nickname
							user[userIndex].nickname=str;

							b1.addText(user[userIndex].nickname+" transformed into "+user[userIndex].species);

							nonPostingCase[0]=true;
							break;
						case ROAR:
						case TELEPORT:
						case WHIRLWIND:
							if(!BATTLE_TYPE.equals("WILD")&&!Mechanics.awayFromBattle[1])
								hit=false;
							else
							{
								hit=true;
								BATTLE_OVER=true;
								Mechanics.canAttack[1]=false;
							}
							  user[userIndex].TRUE_PP[index]--;
							break;
					}
				}
				else
				{
					hasPP=false;

					if(!Mechanics.hasPPAtAll(user[userIndex]))
						{
							//Stores Current PP
							int pp1=user[userIndex].move[0].pp;
							int pp2=user[userIndex].move[1].pp;
							int pp3=user[userIndex].move[2].pp;
							int pp4=user[userIndex].move[3].pp;

							Pokemon.Move savedMove=user[userIndex].move[index];
							user[userIndex].move[index]=Pokemon.Move.STRUGGLE;

							//Initializes move
							user[userIndex].createMoves();
							//Uses move
							useMove(0,index);
							//Writes Move Info
							postAttackInfo(0);
							//Reassigns Moves
							user[userIndex].move[index]=savedMove;
							user[userIndex].createMoves();

							//Assigns Previous PP
							user[userIndex].move[0].pp=pp1;
							user[userIndex].move[1].pp=pp2;
							user[userIndex].move[2].pp=pp3;
							user[userIndex].move[3].pp=pp4;
						}
				}
				break;
			}
		}
		//Enemy Set/////////////////////////////////////////////////////////////////////////////////////////////////////////////
		////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
		////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
		else
		{
			switch(enemy[enemyIndex].move[index].mainEffect)
			{
				case DAMAGE:
					if(enemy[enemyIndex].move[index].pp>0)
					{
						hasPP=true;
						//Checks if move is Special or not, then uses correct formula to calculate
						//damage.
						if(Mechanics.isSpecial(enemy[enemyIndex].move[index].moveType))
							Mechanics.calcDamage(enemy[enemyIndex].move[index].basePower,
							enemy[enemyIndex].level,enemy[enemyIndex].spcl,user[userIndex].spcl,0);
						else
							Mechanics.calcDamage(enemy[enemyIndex].move[index].basePower,
							enemy[enemyIndex].level,enemy[enemyIndex].atk,user[userIndex].def,0);

						//Adds type multiplier to damage
						Mechanics.damage*=Mechanics.typeMultiplier(enemy[enemyIndex].move[index].moveType,
						user[userIndex].type1,user[userIndex].type2);

						//Multiplies damage by 1.5 for Same Type Attack Bonus
						if(Mechanics.isSTAB(enemy[enemyIndex].type1,enemy[enemyIndex].type2,enemy[enemyIndex].move[index].moveType))
							Mechanics.damage*=1.5;

						//Multiplies damage by 2 for critical hit
						if(enemy[enemyIndex].move[index].sideEffect==Pokemon.Side_Effect.HIGH_CRIT)
							Mechanics.isHighCritical[1]=true;
						if(Mechanics.checkCritical(enemy[enemyIndex].baseSPEED,1)&&Mechanics.effective!=Mechanics.Effective.NONE)
						{
							crit=true;
							Mechanics.damage*=2;
						}

						//Reduces physical damage due to burn
						if(!Mechanics.isSpecial(enemy[enemyIndex].move[index].moveType)&&
							enemy[enemyIndex].status==Pokemon.Status.BRN)
							{
								Mechanics.damage*=0.75;
							}

						//Reduces damage when Light Screen or Reflect are up
						if(!Mechanics.isSpecial(enemy[enemyIndex].move[index].moveType)&&Mechanics.turnsReflect[0]>0)
						{
							Mechanics.damage/=2;
						}
						else if(Mechanics.isSpecial(enemy[enemyIndex].move[index].moveType)&&Mechanics.turnsLightScreen[0]>0)
						{
							Mechanics.damage/=2;
						}

						//Checks if move hit or not
						if(!Mechanics.checkHit(enemy[enemyIndex],index,user[userIndex].eva)||
							(Mechanics.awayFromBattle[0]&&enemy[enemyIndex].move[index]!=Pokemon.Move.SWIFT)&&Mechanics.turnsMultiTurn[1]<1)
						{
							Mechanics.damage=0;
							hit=false;
						}
						else
						{
							hit=true;
							if(Mechanics.damage<1&&Mechanics.effective!=Mechanics.Effective.NONE)
								Mechanics.damage=1;
						}

						if(hit&&Mechanics.hasSubstitute[0])
						{
							Mechanics.substituteHealth[0]-=Mechanics.damage;
							Mechanics.damage=0;
						}
						if (Mechanics.damage > user[userIndex].health)
						{
							Mechanics.damage = user[userIndex].health;
						}

						switch(enemy[enemyIndex].move[index].sideEffect)
						{
							case HIGH_CRIT:
							case QUICK_ATTACK:
							case SWIFT:
							case NONE:
								user[userIndex].health-=Mechanics.damage;
								enemy[enemyIndex].move[index].pp--;
								break;
							case ABSORB:
								if(enemy[enemyIndex].move[index]==Pokemon.Move.DREAM_EATER)
								{
									if(user[userIndex].status!=Pokemon.Status.SLP)
									{
										Mechanics.damage=0;
										hit=false;
									}
								}
								enemy[enemyIndex].health=Mechanics.recover(enemy[enemyIndex],Mechanics.damage/2);
								user[userIndex].health-=Mechanics.damage;
								enemy[enemyIndex].move[index].pp--;
								break;
							case STAT:
								if(Mechanics.checkSideEffect(enemy[enemyIndex].move[index])&&Mechanics.damage>0)
									sideHit=true;
								if(sideHit)
								{
									switch(enemy[enemyIndex].move[index])
									{
										case ACID:
											user[userIndex].defStage--;
											user[userIndex].def=(int)((Mechanics.calcOtherStat(user[userIndex].baseDEF,user[userIndex].DEF_IV,user[userIndex].DEF_EV,user[userIndex].level))*
											Mechanics.stageMultiplier(user[userIndex].defStage));
											break;
										case BUBBLE:
										case BUBBLEBEAM:
										case CONSTRICT:
											user[userIndex].speedStage--;
											user[userIndex].speed=(int)((Mechanics.calcOtherStat(user[userIndex].baseSPEED,user[userIndex].SPEED_IV,user[userIndex].SPEED_EV,user[userIndex].level))*
											Mechanics.stageMultiplier(user[userIndex].speedStage));
											break;
										case PSYCHIC:
											user[userIndex].spclStage--;
											user[userIndex].spcl=(int)((Mechanics.calcOtherStat(user[userIndex].baseSPCL,user[userIndex].SPCL_IV,user[userIndex].SPCL_EV,user[userIndex].level))*
											Mechanics.stageMultiplier(user[userIndex].spclStage));
											break;
									}
								}
								user[userIndex].health-=Mechanics.damage;
								enemy[enemyIndex].move[index].pp--;
								break;
							case STATUS:
								if(Mechanics.checkSideEffect(enemy[enemyIndex].move[index])
									&&user[userIndex].status==Pokemon.Status.OK&&Mechanics.damage>0
										&&!Mechanics.awayFromBattle[0])
									{
										user[userIndex].status=enemy[enemyIndex].move[index].status;
										sideHit=true;
									}
								user[userIndex].health-=Mechanics.damage;
								enemy[enemyIndex].move[index].pp--;
								break;
							case SUBSTATUS:
								if(Mechanics.checkSideEffect(enemy[enemyIndex].move[index])
									&&user[userIndex].substatus==Pokemon.Substatus.OK&&Mechanics.damage>0
										&&!Mechanics.awayFromBattle[0])
								{
									user[userIndex].substatus=enemy[enemyIndex].move[index].substatus;
									sideHit=true;
								}
								user[userIndex].health-=Mechanics.damage;
								enemy[enemyIndex].move[index].pp--;
								break;
							case MULTI_HIT:
								int rand=(int)(Math.random()*3)+2;
								Mechanics.damage*=rand;
								timesHit=rand;
								user[userIndex].health-=Mechanics.damage;
								enemy[enemyIndex].move[index].pp--;
								break;
							case MULTI_TURN:
								if(Mechanics.turnsMultiTurn[1]==0&&hit)
								{
									int rand2=(int)(Math.random()*4)+2;
									Mechanics.turnsMultiTurn[1]=rand2;
									user[userIndex].health-=Mechanics.damage;
									Mechanics.canAttack[0]=false;
									enemyLockedMove=index;
									enemy[enemyIndex].move[index].pp--;
								}
								else if(Mechanics.turnsMultiTurn[1]==1)
								{
									user[userIndex].health-=Mechanics.damage;
									Mechanics.turnsMultiTurn[1]=0;
									Mechanics.canAttack[0]=true;
									enemyLockedMove=-1;
									hit=true;
								}
								else if(Mechanics.turnsMultiTurn[1]>1)
								{
									hit=true;
									user[userIndex].health-=Mechanics.damage;
									Mechanics.turnsMultiTurn[1]--;
								}
								break;
							case OHKO:
								crit=false;
								if(Mechanics.damage!=0)
								{
									if(enemy[enemyIndex].speed>user[userIndex].speed)
									{
										Mechanics.damage=Integer.MAX_VALUE;
										//Mechanics.damage=user[userIndex].health;
									}
									else
									{
										hit=false;
										Mechanics.damage=0;
									}
								}
								user[userIndex].health-=Mechanics.damage;
								enemy[enemyIndex].move[index].pp--;
								break;
							case CHARGE:
								switch(enemy[enemyIndex].move[index])
								{
									case RAZOR_WIND:
									case SKY_ATTACK:
									case SKULL_BASH:
									case SOLARBEAM:
										if(!Mechanics.charging[1])
										{
											Mechanics.charging[1]=true;
											Mechanics.damage=0;

											enemyLockedMove=index;
										}
										else
										{
											Mechanics.charging[1]=false;
											user[userIndex].health-=Mechanics.damage;
											enemyLockedMove=-1;
											enemy[enemyIndex].move[index].pp--;
										}
										break;
									case HYPER_BEAM:
										if(!Mechanics.charging[1])
										{
											Mechanics.charging[1]=true;
											user[userIndex].health-=Mechanics.damage;
											enemyLockedMove=index;
											enemy[enemyIndex].move[index].pp--;
										}
										else
										{
											Mechanics.charging[1]=false;
											Mechanics.damage=0;
											enemyLockedMove=-1;
										}
										break;

								}
								break;
							case FAINT:
								user[userIndex].health-=Mechanics.damage;
								enemy[enemyIndex].move[index].pp--;
								enemy[enemyIndex].health=0;
								break;
							case RECOIL:
								switch(enemy[enemyIndex].move[index])
								{
									case STRUGGLE:
										user[userIndex].health-=Mechanics.damage;
										enemy[enemyIndex].health-=Mechanics.damage/2;
										enemy[enemyIndex].move[index].pp--;
										break;
									default:
										user[userIndex].health-=Mechanics.damage;
										enemy[enemyIndex].health-=Mechanics.damage/4;
										enemy[enemyIndex].move[index].pp--;
										break;
								}
								break;
							case COLLECT_DAMAGE:
								switch(enemy[enemyIndex].move[index])
								{
									case BIDE:
										if(Mechanics.turnsMultiTurn[1]==0)
										{
											int rand2=(int)(Math.random()*2)+2;
											Mechanics.turnsMultiTurn[1]=rand2;
											Mechanics.storedDamage[1]=0;
											Mechanics.damage=0;
											enemyLockedMove=index;
										}
										else if(Mechanics.turnsMultiTurn[1]==1)
										{
											user[userIndex].health-=Mechanics.storedDamage[1];
											Mechanics.turnsMultiTurn[1]=0;
											Mechanics.storedDamage[1]=0;
											enemyLockedMove=-1;
											enemy[enemyIndex].move[index].pp--;
										}
										else if(Mechanics.turnsMultiTurn[1]>1)
										{
											Mechanics.turnsMultiTurn[1]--;
											Mechanics.damage=0;
										}
										break;
									case COUNTER:
										if(user[userIndex].move[userCmd].moveType==Pokemon.Type.NORMAL||
											user[userIndex].move[userCmd].moveType==Pokemon.Type.FIGHTING)
										{
											user[userIndex].health-=Mechanics.damage*2;
										}
										else
											hit=false;
										enemy[enemyIndex].move[index].pp--;
										break;
								}
								break;
							case FIXED_DAMAGE:
								if(!Mechanics.awayFromBattle[0])
									hit=true;
								if(hit)
								switch(enemy[enemyIndex].move[index])
								{
									case DRAGON_RAGE:
										user[userIndex].health-=40;
										enemy[enemyIndex].move[index].pp--;
										break;
									case SONIC_BOOM:
										user[userIndex].health-=20;
										enemy[enemyIndex].move[index].pp--;
										break;
									case NIGHT_SHADE:
									case SEISMIC_TOSS:
										user[userIndex].health-=enemy[enemyIndex].level;
										enemy[enemyIndex].move[index].pp--;
										break;
									case PSYWAVE:
										int rand3=(int)(Math.random()*1.5*enemy[enemyIndex].level)+1;
										//Ensures that damage is at least 1
										if(rand3<1)
											rand3=1;
										user[userIndex].health-=rand3;
										enemy[enemyIndex].move[index].pp--;
										break;
									case SUPER_FANG:
										user[userIndex].health/=2;
										enemy[enemyIndex].move[index].pp--;
										break;
								}
								else
									enemy[enemyIndex].move[index].pp--;
								break;
							case HIDE:
								if(!Mechanics.awayFromBattle[1])
								{
									Mechanics.awayFromBattle[1]=true;
									enemyLockedMove=index;
								}
								else
								{
									Mechanics.awayFromBattle[1]=false;
									user[userIndex].health-=Mechanics.damage;
									enemyLockedMove=-1;
									enemy[enemyIndex].move[index].pp--;
								}
								break;
							case FURY:
								if(Mechanics.turnsMultiTurn[1]==0&&hit)
								{
									int rand2=(int)(Math.random()*2)+2;
									if(enemy[enemyIndex].move[enemyCmd]==Pokemon.Move.RAGE)
										rand2=Integer.MAX_VALUE;
									Mechanics.turnsMultiTurn[1]=rand2;
									user[userIndex].health-=Mechanics.damage;
									enemyLockedMove=index;
									enemy[enemyIndex].move[index].pp--;
								}
								else if(Mechanics.turnsMultiTurn[1]==1)
								{
									user[userIndex].health-=Mechanics.damage;
									Mechanics.turnsMultiTurn[1]=0;
									enemyLockedMove=-1;
									hit=true;
									if(enemy[enemyIndex].move[enemyCmd]!=Pokemon.Move.RAGE)
										enemy[enemyIndex].substatus=Pokemon.Substatus.CONFU;
								}
								else if(Mechanics.turnsMultiTurn[1]>1)
								{
									hit=true;
									user[userIndex].health-=Mechanics.damage;
									Mechanics.turnsMultiTurn[1]--;
								}
						}
					}
					else
					{
						hasPP=false;

						if(!Mechanics.hasPPAtAll(enemy[enemyIndex]))
						{
							//Stores Current PP
							int pp1=enemy[enemyIndex].move[0].pp;
							int pp2=enemy[enemyIndex].move[1].pp;
							int pp3=enemy[enemyIndex].move[2].pp;
							int pp4=enemy[enemyIndex].move[3].pp;

							Pokemon.Move savedMove=enemy[enemyIndex].move[index];
							enemy[enemyIndex].move[index]=Pokemon.Move.STRUGGLE;

							//Initializes move
							enemy[enemyIndex].createMoves();
							//Uses move
							useMove(1,index);
							//Writes Move Info
							postAttackInfo(0);
							//Reassigns Moves
							enemy[enemyIndex].move[index]=savedMove;
							enemy[enemyIndex].createMoves();

							//Assigns Previous PP
							enemy[enemyIndex].move[0].pp=pp1;
							enemy[enemyIndex].move[1].pp=pp2;
							enemy[enemyIndex].move[2].pp=pp3;
							enemy[enemyIndex].move[3].pp=pp4;
						}
					}
					break;
			case RAISE_STAT:
				hit=true;

				if(enemy[enemyIndex].move[index].pp>0)
				{
					hasPP=true;
					switch(enemy[enemyIndex].move[index])
					{
						case SHARPEN:
						case MEDITATE:
							enemy[enemyIndex].atkStage--;
						case SWORDS_DANCE:
							enemy[enemyIndex].atkStage+=2;
							enemy[enemyIndex].atk=(int)((Mechanics.calcOtherStat(enemy[enemyIndex].baseATK,enemy[enemyIndex].ATK_IV,enemy[enemyIndex].ATK_EV,enemy[enemyIndex].level))*
							Mechanics.stageMultiplier(enemy[enemyIndex].atkStage));
							enemy[enemyIndex].move[index].pp--;
							break;
						case DEFENSE_CURL:
						case HARDEN:
						case WITHDRAW:
							enemy[enemyIndex].defStage--;
						case ACID_ARMOR:
						case BARRIER:
							enemy[enemyIndex].defStage+=2;
							enemy[enemyIndex].def=(int)((Mechanics.calcOtherStat(enemy[enemyIndex].baseDEF,enemy[enemyIndex].DEF_IV,enemy[enemyIndex].DEF_EV,enemy[enemyIndex].level))*
							Mechanics.stageMultiplier(enemy[enemyIndex].defStage));
							enemy[enemyIndex].move[index].pp--;
							break;
						case AGILITY:
							enemy[enemyIndex].speedStage+=2;
							enemy[enemyIndex].speed=(int)((Mechanics.calcOtherStat(enemy[enemyIndex].baseSPEED,enemy[enemyIndex].SPEED_IV,enemy[enemyIndex].SPEED_EV,enemy[enemyIndex].level))*
							Mechanics.stageMultiplier(enemy[enemyIndex].speedStage));
							enemy[enemyIndex].move[index].pp--;
							break;
						case GROWTH:
							enemy[enemyIndex].spclStage--;
						case AMNESIA:
							enemy[enemyIndex].spclStage+=2;
							enemy[enemyIndex].spcl=(int)((Mechanics.calcOtherStat(enemy[enemyIndex].baseSPCL,enemy[enemyIndex].SPCL_IV,enemy[enemyIndex].SPCL_EV,enemy[enemyIndex].level))*
							Mechanics.stageMultiplier(enemy[enemyIndex].spclStage));
							enemy[enemyIndex].move[index].pp--;
							break;
						case DOUBLE_TEAM:
						case MINIMIZE:
							enemy[enemyIndex].evaStage++;
							enemy[enemyIndex].eva=1*Mechanics.stageMultiplier(enemy[enemyIndex].evaStage);
							enemy[enemyIndex].move[index].pp--;
							break;
					}
				}
				else
				{
					hasPP=false;

						if(!Mechanics.hasPPAtAll(enemy[enemyIndex]))
						{
							//Stores Current PP
							int pp1=enemy[enemyIndex].move[0].pp;
							int pp2=enemy[enemyIndex].move[1].pp;
							int pp3=enemy[enemyIndex].move[2].pp;
							int pp4=enemy[enemyIndex].move[3].pp;

							Pokemon.Move savedMove=enemy[enemyIndex].move[index];
							enemy[enemyIndex].move[index]=Pokemon.Move.STRUGGLE;

							//Initializes move
							enemy[enemyIndex].createMoves();
							//Uses move
							useMove(1,index);
							//Writes Move Info
							postAttackInfo(0);
							//Reassigns Moves
							enemy[enemyIndex].move[index]=savedMove;
							enemy[enemyIndex].createMoves();

							//Assigns Previous PP
							enemy[enemyIndex].move[0].pp=pp1;
							enemy[enemyIndex].move[1].pp=pp2;
							enemy[enemyIndex].move[2].pp=pp3;
							enemy[enemyIndex].move[3].pp=pp4;
						}
				}
				break;
			case LOWER_STAT:
				if(enemy[enemyIndex].move[index].pp>0)
				{
					if(!Mechanics.awayFromBattle[0])
						hit=true;
					if(Mechanics.turnsMist[0]>0)
						hit=false;
					if(hit)
					switch(enemy[enemyIndex].move[index])
					{
						case GROWL:
							user[userIndex].atkStage--;
							user[userIndex].atk=(int)((Mechanics.calcOtherStat(user[userIndex].baseATK,user[userIndex].ATK_IV,user[userIndex].ATK_EV,user[userIndex].level))*
							Mechanics.stageMultiplier(user[userIndex].atkStage));
							enemy[enemyIndex].move[index].pp--;
							break;
						case SCREECH:
							user[userIndex].defStage--;
						case LEER:
						case TAIL_WHIP:
							user[userIndex].defStage--;
							user[userIndex].def=(int)((Mechanics.calcOtherStat(user[userIndex].baseDEF,user[userIndex].DEF_IV,user[userIndex].DEF_EV,user[userIndex].level))*
							Mechanics.stageMultiplier(user[userIndex].defStage));
							enemy[enemyIndex].move[index].pp--;
							break;
						case FLASH:
						case KINESIS:
						case SAND_ATTACK:
							user[userIndex].accuracyStage--;
							enemy[enemyIndex].move[index].pp--;
							break;
						case STRING_SHOT:
							user[userIndex].speedStage--;
							user[userIndex].speed=(int)((Mechanics.calcOtherStat(user[userIndex].baseSPEED,user[userIndex].SPEED_IV,user[userIndex].SPEED_EV,user[userIndex].level))*
							Mechanics.stageMultiplier(user[userIndex].speedStage));
							enemy[enemyIndex].move[index].pp--;
							break;
					}
					else
						enemy[enemyIndex].move[index].pp--;
				}
				else
				{
					hasPP=false;

						if(!Mechanics.hasPPAtAll(enemy[enemyIndex]))
						{
							//Stores Current PP
							int pp1=enemy[enemyIndex].move[0].pp;
							int pp2=enemy[enemyIndex].move[1].pp;
							int pp3=enemy[enemyIndex].move[2].pp;
							int pp4=enemy[enemyIndex].move[3].pp;

							Pokemon.Move savedMove=enemy[enemyIndex].move[index];
							enemy[enemyIndex].move[index]=Pokemon.Move.STRUGGLE;

							//Initializes move
							enemy[enemyIndex].createMoves();
							//Uses move
							useMove(1,index);
							//Writes Move Info
							postAttackInfo(0);
							//Reassigns Moves
							enemy[enemyIndex].move[index]=savedMove;
							enemy[enemyIndex].createMoves();

							//Assigns Previous PP
							enemy[enemyIndex].move[0].pp=pp1;
							enemy[enemyIndex].move[1].pp=pp2;
							enemy[enemyIndex].move[2].pp=pp3;
							enemy[enemyIndex].move[3].pp=pp4;
						}
				}
				break;
			case INFLICT_STATUS:
				if(enemy[enemyIndex].move[index].pp>0)
				{
					hasPP=true;
					//Checks if move hit or not
					if(Mechanics.checkHit(enemy[enemyIndex],index,user[userIndex].eva)&&!Mechanics.awayFromBattle[0])
						hit=true;
					else
						hit=false;

					boolean sleep=false;

					switch(enemy[enemyIndex].move[index])
					{
						case LEECH_SEED:
						case CONFUSE_RAY:
						case SUPERSONIC:
							if(hit&&user[userIndex].substatus==Pokemon.Substatus.OK)
							{
								Mechanics.turnsConfused[0]=(int)(Math.random()*4)+1;
								Mechanics.isConfused[0]=true;
								user[userIndex].substatus=enemy[enemyIndex].move[index].substatus;
								sideHit=true;
							}
							enemy[enemyIndex].move[index].pp--;
							break;
						case HYPNOSIS:
						case LOVELY_KISS:
						case SING:
						case SLEEP_POWDER:
						case SPORE:
							sleep=true;
							Mechanics.turnsAsleep[0]=(int)(Math.random()*5)+1;
						case POISON_GAS:
						case POISONPOWDER:
						case TOXIC:
						case GLARE:
						case STUN_SPORE:
						case THUNDER_WAVE:
							if(hit&&user[userIndex].status==Pokemon.Status.OK)
							{
								if(sleep)
								{
									if(!Mechanics.sleepClauseActive(enemy,enemyNumOfPokemon))
									{
										user[userIndex].status=enemy[enemyIndex].move[index].status;
										sideHit=true;
									}
								}
								else
								{
									user[userIndex].status=enemy[enemyIndex].move[index].status;
									sideHit=true;
								}
							}
							enemy[enemyIndex].move[index].pp--;
							break;
					}
				}
				else
				{
					hasPP=false;

						if(!Mechanics.hasPPAtAll(enemy[enemyIndex]))
						{
							//Stores Current PP
							int pp1=enemy[enemyIndex].move[0].pp;
							int pp2=enemy[enemyIndex].move[1].pp;
							int pp3=enemy[enemyIndex].move[2].pp;
							int pp4=enemy[enemyIndex].move[3].pp;

							Pokemon.Move savedMove=enemy[enemyIndex].move[index];
							enemy[enemyIndex].move[index]=Pokemon.Move.STRUGGLE;

							//Initializes move
							enemy[enemyIndex].createMoves();
							//Uses move
							useMove(1,index);
							//Writes Move Info
							postAttackInfo(0);
							//Reassigns Moves
							enemy[enemyIndex].move[index]=savedMove;
							enemy[enemyIndex].createMoves();

							//Assigns Previous PP
							enemy[enemyIndex].move[0].pp=pp1;
							enemy[enemyIndex].move[1].pp=pp2;
							enemy[enemyIndex].move[2].pp=pp3;
							enemy[enemyIndex].move[3].pp=pp4;
						}
				}
				break;
			case SPECIAL:
				if(enemy[enemyIndex].move[index].pp>0)
				{
					hasPP=true;

					switch(enemy[enemyIndex].move[index])
					{
						case CONVERSION:
							hit=true;
							enemy[enemyIndex].type1=user[userIndex].type1;
							enemy[enemyIndex].type2=user[userIndex].type2;
							enemy[enemyIndex].move[index].pp--;
							break;
						case DISABLE:
							if(Mechanics.turnsDisabled[0]==0&&Mechanics.checkHit(enemy[enemyIndex],index,user[userIndex].eva)
								&&!Mechanics.awayFromBattle[0])
								hit=true;
							if(hit)
							{
								Mechanics.turnsDisabled[0]=(int)(Math.random()*3)+2;
								Mechanics.moveDisabled[0]=(int)(Math.random()*4);
							}
							enemy[enemyIndex].move[index].pp--;
							break;
						case FOCUS_ENERGY:
							enemy[enemyIndex].move[index].pp--;
							break;
						case HAZE:
							user[userIndex].status=Pokemon.Status.OK;
							user[userIndex].substatus=Pokemon.Substatus.OK;
							enemy[enemyIndex].status=Pokemon.Status.OK;
							enemy[enemyIndex].substatus=Pokemon.Substatus.OK;
							enemy[enemyIndex].move[index].pp--;
							break;
						case LIGHT_SCREEN:
							Mechanics.turnsLightScreen[1]=5;
							enemy[enemyIndex].move[index].pp--;
							break;
						case REFLECT:
							Mechanics.turnsReflect[1]=5;
							enemy[enemyIndex].move[index].pp--;
							break;
						case METRONOME:
							//Declares Move Use Here
							b1.addText("Enemy "+enemy[enemyIndex].nickname+" used "+enemy[enemyIndex].move[enemyCmd]);
							enemy[enemyIndex].move[index].pp--;

							//Stores Current PP
							int pp1=enemy[enemyIndex].move[0].pp;
							int pp2=enemy[enemyIndex].move[1].pp;
							int pp3=enemy[enemyIndex].move[2].pp;
							int pp4=enemy[enemyIndex].move[3].pp;

							//Chooses a random move
							int randy=(int)(Math.random()*163);
							enemy[enemyIndex].move[index]=enemy[enemyIndex].randomMove(randy);


							//Initializes move
							enemy[enemyIndex].createMoves();
							//Uses move
							useMove(1,index);
							//Writes Move Info
							postAttackInfo(1);
							//Reassigns Moves
							enemy[enemyIndex].move[index]=Pokemon.Move.METRONOME;
							enemy[enemyIndex].createMoves();

							//Assigns Previous PP
							enemy[enemyIndex].move[0].pp=pp1;
							enemy[enemyIndex].move[1].pp=pp2;
							enemy[enemyIndex].move[2].pp=pp3;
							enemy[enemyIndex].move[3].pp=pp4;
							break;
						case MIMIC:
							b1.addText("Enemy "+enemy[enemyIndex].nickname+" used "+enemy[enemyIndex].move[enemyCmd]);
							//Stores Current PP
							int pp11=enemy[enemyIndex].move[0].pp;
							int pp22=enemy[enemyIndex].move[1].pp;
							int pp33=enemy[enemyIndex].move[2].pp;
							int pp44=enemy[enemyIndex].move[3].pp;

							//Chooses a random move
							int randy2=(int)(Math.random()*4);
							enemy[enemyIndex].move[index]=user[userIndex].move[randy2];

							//Initializes moves
							enemy[enemyIndex].createMoves();

							//Assigns Previous PP
							if(index!=0)
							enemy[enemyIndex].move[0].pp=pp11;
							if(index!=1)
							enemy[enemyIndex].move[1].pp=pp22;
							if(index!=2)
							enemy[enemyIndex].move[2].pp=pp33;
							if(index!=3)
							enemy[enemyIndex].move[3].pp=pp44;

							b1.addText("Enemy "+enemy[enemyIndex].nickname+" learned "+enemy[enemyIndex].move[enemyCmd]+"!");
							nonPostingCase[1]=true;
							break;
						case MIRROR_MOVE:
							//Declares Move Use Here
							b1.addText("Enemy "+enemy[enemyIndex].nickname+" used "+enemy[enemyIndex].move[enemyCmd]);
							enemy[enemyIndex].move[index].pp--;

							//Uses move if move is not Mirror Move (Infinite Recursion)
							if(userCmd<0||userCmd>3)
							{
								b1.addText("The move failed!");
							}
							else if(enemy[enemyIndex].move[enemyCmd]!=Pokemon.Move.MIRROR_MOVE)
							{
								//Stores Current PP
								int pp111=enemy[enemyIndex].move[0].pp;
								int pp222=enemy[enemyIndex].move[1].pp;
								int pp333=enemy[enemyIndex].move[2].pp;
								int pp444=enemy[enemyIndex].move[3].pp;

								//Chooses most recent user move
								if(userCmd>=0&&userCmd<4)
								enemy[enemyIndex].move[index]=user[userIndex].move[userCmd];

								//Initializes move
								enemy[enemyIndex].createMoves();

								useMove(1,index);

								//Writes Move Info
								postAttackInfo(1);

								//Reassigns Moves
								enemy[enemyIndex].move[index]=Pokemon.Move.MIRROR_MOVE;
								enemy[enemyIndex].createMoves();

								//Assigns Previous PP
								enemy[enemyIndex].move[0].pp=pp111;
								enemy[enemyIndex].move[1].pp=pp222;
								enemy[enemyIndex].move[2].pp=pp333;
								enemy[enemyIndex].move[3].pp=pp444;
							}
							else
							{
								b1.addText("The move failed!");
							}
							break;
						case MIST:
							if(Mechanics.turnsMist[1]==0)
							{
								Mechanics.turnsMist[1]=5;
								hit=true;
							}
							else
								hit=false;
							enemy[enemyIndex].move[index].pp--;
							break;
						case RECOVER:
						case SOFTBOILED:
							if(enemy[enemyIndex].health<enemy[enemyIndex].healthMax)
							{
								hit=true;
								enemy[enemyIndex].health=Mechanics.recover(enemy[enemyIndex],enemy[enemyIndex].healthMax/2);
							}
							else
								hit=false;
							enemy[enemyIndex].move[index].pp--;
							break;
						case REST:
							if(enemy[enemyIndex].health<enemy[enemyIndex].healthMax)
							{
								hit=true;
								enemy[enemyIndex].health=Mechanics.recover(enemy[enemyIndex],enemy[enemyIndex].healthMax);
								enemy[enemyIndex].status=Pokemon.Status.SLP;
								Mechanics.turnsAsleep[1]=2;
							}
							else
								hit=false;
							  user[userIndex].TRUE_PP[index]--;
							break;
						case SPLASH:
							hit=true;
							enemy[enemyIndex].move[index].pp--;
							break;
						case SUBSTITUTE:
							enemy[enemyIndex].move[index].pp--;
							if(Mechanics.canCreateSubstitute(enemy[enemyIndex])&&!Mechanics.hasSubstitute[1])
							{
								Mechanics.createSubstitute(enemy[enemyIndex].healthMax/4,1);
								enemy[enemyIndex].health-=enemy[enemyIndex].healthMax/4;
								hit=true;
							}
							else
								hit=false;
							break;
						case TRANSFORM:
							b1.addText("Enemy "+enemy[enemyIndex].nickname+" used "+enemy[enemyIndex].move[enemyCmd]);

							//Stores nickname for reference
							String str=enemy[enemyIndex].nickname;

							//Assigns Pokemon Species
							enemy[enemyIndex].species=user[userIndex].species;

							//Creates Pokemon with user moves
							enemy[enemyIndex]=new Pokemon(enemy[enemyIndex].species,user[userIndex].move[0],user[userIndex].move[1],
							user[userIndex].move[2],user[userIndex].move[3],enemy[enemyIndex].level);

							b1.createPokemonImages();

							//Assigns 5 PP to all moves
							for(int i=0; i<4; i++)
								enemy[enemyIndex].move[i].pp=5;
							//Assigns former nickname
							enemy[enemyIndex].nickname=str;

							b1.addText("Enemy "+enemy[enemyIndex].nickname+" transformed into "+enemy[enemyIndex].species);

							nonPostingCase[1]=true;
							break;
						case ROAR:
						case TELEPORT:
						case WHIRLWIND:
							if(!BATTLE_TYPE.equals("WILD")&&!Mechanics.awayFromBattle[0])
								hit=false;
							else
							{
								BATTLE_OVER=true;
								hit=true;
								Mechanics.canAttack[0]=false;
							}
							enemy[enemyIndex].move[index].pp--;
							break;
					}
				}
				else
				{
					hasPP=false;

						if(!Mechanics.hasPPAtAll(enemy[enemyIndex]))
						{
							//Stores Current PP
							int pp1=enemy[enemyIndex].move[0].pp;
							int pp2=enemy[enemyIndex].move[1].pp;
							int pp3=enemy[enemyIndex].move[2].pp;
							int pp4=enemy[enemyIndex].move[3].pp;

							Pokemon.Move savedMove=enemy[enemyIndex].move[index];
							enemy[enemyIndex].move[index]=Pokemon.Move.STRUGGLE;

							//Initializes move
							enemy[enemyIndex].createMoves();
							//Uses move
							useMove(1,index);
							//Writes Move Info
							postAttackInfo(0);
							//Reassigns Moves
							enemy[enemyIndex].move[index]=savedMove;
							enemy[enemyIndex].createMoves();

							//Assigns Previous PP
							enemy[enemyIndex].move[0].pp=pp1;
							enemy[enemyIndex].move[1].pp=pp2;
							enemy[enemyIndex].move[2].pp=pp3;
							enemy[enemyIndex].move[3].pp=pp4;
						}
				}
				break;
			}
		}

		if(hit)
			System.out.println("Accuracy successful.");
		else
			System.out.println("Accuracy failure.");
		if(crit)
			System.out.println("Critical Hit");

		checkFainted();
	}