public static void checkLevel()
	{
		System.out.println("User Pokemon Levels signed and exported");

		for(int i=0; i<userNumOfPokemon; i++)
		{
			if(user[i].level<100&&Mechanics.participatedInBattle[i])
			{
				while(user[i].exp>=user[i].level*user[i].level*user[i].level&&user[i].level<100)
				{
					levelUp.play();
					user[i].level++;
					int hpGain=user[i].healthMax;
					user[i].healthMax=Mechanics.calcHPStat(user[i].baseHP,user[i].HP_IV,user[i].HP_EV,user[i].level);
					hpGain=user[i].healthMax-hpGain;
					user[i].health+=hpGain;
					user[i].atk=Mechanics.calcOtherStat(user[i].baseATK,user[i].ATK_IV,user[i].ATK_EV,user[i].level);
					user[i].def=Mechanics.calcOtherStat(user[i].baseDEF,user[i].DEF_IV,user[i].DEF_EV,user[i].level);
					user[i].spcl=Mechanics.calcOtherStat(user[i].baseSPCL,user[i].SPCL_IV,user[i].SPCL_EV,user[i].level);
					user[i].speed=Mechanics.calcOtherStat(user[i].baseSPEED,user[i].SPEED_IV,user[i].SPEED_EV,user[i].level);

					b1.addText("");
					b1.addText(user[i].nickname+" grew to LV. "+user[i].level+"!");
					b1.addText("HP MAX: "+user[i].healthMax);
					b1.addText("ATK: "+user[i].atk);
					b1.addText("DEF: "+user[i].def);
					b1.addText("SPCL: "+user[i].spcl);
					b1.addText("SPEED: "+user[i].speed);
					b1.addText("");
					Pokemon.Move[] moves = new Pokemon.Move[4];
                    System.arraycopy(user[i].move, 0, moves, 0, 4);
					user[i].move = Mechanics.levelUpMove(user[i],false);
					for (int j = 0; j<4; j++)
					{
						if (user[i].move[j] != moves[j])
						{
							b1.addText(user[i].nickname + " learned " + user[i].move[j].toString() + "!");
						}
					}

					try
					{
						Thread.sleep(3000);
					}
					catch(Exception ignored){}
				}
			}
			else if(user[i].level>=100)
			{
				user[i].level=100;
				int hpGain=user[i].healthMax;
				user[i].healthMax=Mechanics.calcHPStat(user[i].baseHP,user[i].HP_IV,user[i].HP_EV,user[i].level);
				hpGain=user[i].healthMax-hpGain;
				user[i].health+=hpGain;
				user[i].atk=Mechanics.calcOtherStat(user[i].baseATK,user[i].ATK_IV,user[i].ATK_EV,user[i].level);
				user[i].def=Mechanics.calcOtherStat(user[i].baseDEF,user[i].DEF_IV,user[i].DEF_EV,user[i].level);
				user[i].spcl=Mechanics.calcOtherStat(user[i].baseSPCL,user[i].SPCL_IV,user[i].SPCL_EV,user[i].level);
				user[i].speed=Mechanics.calcOtherStat(user[i].baseSPEED,user[i].SPEED_IV,user[i].SPEED_EV,user[i].level);

				if(user[i].health>user[i].healthMax)
					user[i].health=user[i].healthMax;
			}
		}
	}