// Copyright 2000-2002 Gudrun's Incitement 18
// http://www.realitysend.com
//Begin Pokemon Object
function Pokemon(name, level)
{
   this.name = name;
   this.species = name;
   this.level = level;
   this.strdv = randomize(16)-1;
   this.spddv = randomize(16)-1;
   this.defdv = randomize(16)-1;
   this.spedv = randomize(16)-1;
   this.xp = 0;
   this.attack = Array(4); 
   this.power = Array(4);
   this.type = Array(2);
   this.breed = Array(2);
   this.status = "OK";
   this.accuracy = 1;
   this.evade = 0;
   this.disabled = new Array(4);
   this.transattack = new Array(4);
   this.transpower = new Array(4);
   for(var nullin = 0; nullin < 4; nullin++)
   {
	this.attack[nullin] = "";
	this.power[nullin] = 0;
	this.disabled[nullin] = 0;
	this.transattack[nullin] = "";
	this.transpower[nullin] = 0;
   }
   this.critical = 0;
   this.confused = 0;
   this.sleep = 0;
   this.scared = 0;
   this.toxic = 0;
   this.charging = 0;
   this.critical = 0;
   this.unhit = 0;
   this.bound = 0;
   this.binding = 0;
   this.rested = 0;
   this.armor = 0;
   this.screen = 0;
   this.mist = 0;
   this.leechseed = 0;
   this.mimiced = 0;
   this.substitute = 0;
   this.enraged = 0;
   this.thrashing = 0;
   this.biding = 0;
   this.physdam = 0;
   this.specdam = 0;
   this.counterer = 0; // only for RBY and Normal/Fighting Counter
   this.curattack = "";
   this.otherattack = "";
   this.item = "";
   if(this.name == "")
   {
      this.type[0] = "";
      this.type[1] = "";
      this.health = 0;
      this.strength = 0;
      this.defense = 0;
      this.speed = 0;
      this.special = 0;
      this.attack[0] = "";
      this.attack[1] = "";
      this.attack[2] = "";
      this.attack[3] = "";
      this.xptype = "fast";
	this.xpaward = 0;
      this.breed[0] = "";
      this.breed[0] = "";
   }
   if(this.name == "Bulbasaur")
   {
      this.type[0] = "Grass";
      this.type[1] = "Poison";
      this.health = 45;
      this.strength = 49;
      this.defense = 49;
      this.speed = 45;
      this.special = 65;
      this.attack[0] = "Tackle()";
      this.attack[1] = "Growl()";
      if(level >= 7)
	   this.attack[2] = "LeechSeed()";
      if(level >= 13)
	   this.attack[3] = "VineWhip()";
      if(level >= 20)
	   this.attack[1] = "PoisonPowder()";
      if(level >= 27)
	   this.attack[3] = "RazorLeaf()";
      if(level >= 34)
	   this.attack[2] = "Growth()";
      if(level >= 41)
	   this.attack[1] = "SleepPowder()";
      if(level >= 48)
	   this.attack[0] = "SolarBeam()";
      this.xptype = "parabolic";
	this.xpaward = 64;
	this.catchdif = 45;
      this.breed[0] = 1;
      this.breed[1] = 7;
   }
   if(this.name == "Ivysaur")
   {
      this.type[0] = "Grass";
      this.type[1] = "Poison";
      this.health = 60;
      this.strength = 62;
      this.defense = 63;
      this.speed = 60;
      this.special = 80;
      this.attack[0] = "Tackle()";
      this.attack[1] = "Growl()";
      this.attack[2] = "LeechSeed()";
      if(level >= 13)
	   this.attack[3] = "VineWhip()";
      if(level >= 22)
	   this.attack[1] = "PoisonPowder()";
      if(level >= 30)
	   this.attack[3] = "RazorLeaf()";
      if(level >= 38)
	   this.attack[2] = "Growth()";
      if(level >= 46)
	   this.attack[1] = "SleepPowder()";
      if(level >= 54)
	   this.attack[0] = "SolarBeam()";
      this.xptype = "parabolic";
	this.xpaward = 141;
	this.catchdif = 45;
      this.breed[0] = 1;
      this.breed[1] = 7;
   }
   if(this.name == "Venusaur")
   {
      this.type[0] = "Grass";
      this.type[1] = "Poison";
      this.health = 80;
      this.strength = 82;
      this.defense = 83;
      this.speed = 80;
      this.special = 100;
      this.attack[0] = "Tackle()";
      this.attack[1] = "PoisonPowder()";
      this.attack[2] = "LeechSeed()";
	this.attack[3] = "RazorLeaf()";
      if(level >= 43)
	   this.attack[2] = "Growth()";
      if(level >= 55)
	   this.attack[1] = "SleepPowder()";
      if(level >= 65)
	   this.attack[0] = "SolarBeam()";
      this.xptype = "parabolic";
	this.xpaward = 208;
	this.catchdif = 45;
      this.breed[0] = 1;
      this.breed[1] = 7;
   }
   if(this.name == "Charmander")
   {
      this.type[0] = "Fire";
      this.type[1] = "";
      this.health = 39;
      this.strength = 52;
      this.defense = 43;
      this.speed = 65;
      this.special = 50;
      this.attack[0] = "Scratch()";
      this.attack[1] = "Growl()";
	if(level >= 9)
         this.attack[2] = "Ember()";
	if(level >= 15)
         this.attack[3] = "Leer()";
	if(level >= 22)
         this.attack[1] = "Rage()";
	if(level >= 30)
         this.attack[0] = "Slash()";
	if(level >= 38)
         this.attack[2] = "FlameThrower()";
	if(level >= 46)
         this.attack[3] = "FireSpin()";
      this.xptype = "parabolic";
	this.xpaward = 65;
	this.catchdif = 45;
      this.breed[0] = 1;
      this.breed[1] = "E";
   }
   if(this.name == "Charmeleon")
   {
      this.type[0] = "Fire";
      this.type[1] = "";
      this.health = 58;
      this.strength = 64;
      this.defense = 58;
      this.speed = 80;
      this.special = 65;
      this.attack[0] = "Scratch()";
      this.attack[1] = "Growl()";
      this.attack[2] = "Ember()";
	if(level >= 15)
         this.attack[3] = "Leer()";
	if(level >= 24)
         this.attack[1] = "Rage()";
	if(level >= 33)
         this.attack[0] = "Slash()";
	if(level >= 42)
         this.attack[2] = "FlameThrower()";
	if(level >= 56)
         this.attack[3] = "FireSpin()";
      this.xptype = "parabolic";
	this.xpaward = 142;
	this.catchdif = 45;
      this.breed[0] = 1;
      this.breed[1] = "E";
   }
   if(this.name == "Charizard")
   {
      this.type[0] = "Fire";
      this.type[1] = "Flying";
      this.health = 78;
      this.strength = 84;
      this.defense = 79;
      this.speed = 100;
      this.special = 85;
      this.attack[0] = "Scratch()";
      this.attack[1] = "Rage()";
      this.attack[2] = "Ember()";
      this.attack[3] = "Leer()";
	if(level >= 36)
         this.attack[0] = "Slash()";
	if(level >= 46)
         this.attack[2] = "FlameThrower()";
	if(level >= 55)
         this.attack[3] = "FireSpin()";
      this.xptype = "parabolic";
	this.xpaward = 209;
	this.catchdif = 45;
      this.breed[0] = 1;
      this.breed[1] = "E";
   }
   if(this.name == "Squirtle")
   {
      this.type[0] = "Water";
      this.type[1] = "";
      this.health = 44;
      this.strength = 48;
      this.defense = 65;
      this.speed = 43;
      this.special = 50;
      this.attack[0] = "Tackle()";
      this.attack[1] = "TailWhip()";
	if(level >= 8)
         this.attack[2] = "Bubble()";
	if(level >= 15)
         this.attack[3] = "WaterGun()";
	if(level >= 22)
         this.attack[0] = "Bite()";
	if(level >= 28)
         this.attack[2] = "Withdraw()";
	if(level >= 35)
         this.attack[1] = "SkullBash()";
	if(level >= 42)
         this.attack[3] = "HydroPump()";
      this.xptype = "parabolic";
	this.xpaward = 66;
	this.catchdif = 45;
      this.breed[0] = 1;
      this.breed[1] = 2;
   }
   if(this.name == "Wartortle")
   {
      this.type[0] = "Water";
      this.type[1] = "";
      this.health = 59;
      this.strength = 63;
      this.defense = 80;
      this.speed = 58;
      this.special = 65;
      this.attack[0] = "Tackle()";
      this.attack[1] = "TailWhip()";
      this.attack[2] = "Bubble()";
	if(level >= 15)
         this.attack[3] = "WaterGun()";
	if(level >= 24)
         this.attack[0] = "Bite()";
	if(level >= 31)
         this.attack[2] = "Withdraw()";
	if(level >= 39)
         this.attack[1] = "SkullBash()";
	if(level >= 47)
         this.attack[3] = "HydroPump()";
      this.xptype = "parabolic";
	this.xpaward = 143;
	this.catchdif = 45;
      this.breed[0] = 1;
      this.breed[1] = 2;
   }
   if(this.name == "Blastoise")
   {
      this.type[0] = "Water";
      this.type[1] = "";
      this.health = 79;
      this.strength = 83;
      this.defense = 100;
      this.speed = 78;
      this.special = 85;
      this.attack[0] = "Tackle()";
      this.attack[1] = "TailWhip()";
      this.attack[2] = "Bubble()";
      this.attack[3] = "WaterGun()";
	if(level >= 24)
         this.attack[0] = "Bite()";
	if(level >= 31)
         this.attack[2] = "Withdraw()";
	if(level >= 42)
         this.attack[1] = "SkullBash()";
	if(level >= 52)
         this.attack[3] = "HydroPump()";
      this.xptype = "parabolic";
	this.xpaward = 210;
	this.catchdif = 45;
      this.breed[0] = 1;
      this.breed[1] = 2;
   }
   if(this.name == "Caterpie")
   {
      this.type[0] = "Bug";
      this.type[1] = "";
      this.health = 45;
      this.strength = 30;
      this.defense = 35;
      this.speed = 45;
      this.special = 20;
      this.attack[0] = "Tackle()";
      this.attack[1] = "StringShot()";
      this.xptype = "medium";
	this.xpaward = 53;
	this.catchdif = 255;
      this.breed[0] = 3;
      this.breed[1] = 3;
   }
   if(this.name == "Metapod")
   {
      this.type[0] = "Bug";
      this.type[1] = "";
      this.health = 50;
      this.strength = 20;
      this.defense = 55;
      this.speed = 30;
      this.special = 25;
      this.attack[0] = "Tackle()";
      this.attack[1] = "StringShot()";
	if(level >= 8)
         this.attack[2] = "Harden()";
      this.xptype = "medium";
	this.xpaward = 72;
	this.catchdif = 120;
      this.breed[0] = 3;
      this.breed[1] = 3;
   }
   if(this.name == "Butterfree")
   {
      this.type[0] = "Bug";
      this.type[1] = "Flying";
      this.health = 60;
      this.strength = 45;
      this.defense = 50;
      this.speed = 70;
      this.special = 80;
      this.attack[0] = "Tackle()";
      this.attack[1] = "StringShot()";
	if(level >= 8)
         this.attack[2] = "Harden()";
	if(level >= 10)
         this.attack[3] = "Confusion()";
	if(level >= 13)
         this.attack[2] = "PoisonPowder()";
	if(level >= 14)
         this.attack[2] = "StunSpore()";
	if(level >= 15)
         this.attack[2] = "SleepPowder()";
	if(level >= 18)
         this.attack[1] = "SuperSonic()";
	if(level >= 23)
         this.attack[1] = "WhirlWind()";
	if(level >= 28)
         this.attack[0] = "Gust()";
	if(level >= 31)
         this.attack[3] = "Psybeam()";
      this.xptype = "medium";
	this.xpaward = 160;
	this.catchdif = 45;
      this.breed[0] = 3;
      this.breed[1] = 3;
   }
   if(this.name == "Weedle")
   {
      this.type[0] = "Bug";
      this.type[1] = "Poison";
      this.health = 40;
      this.strength = 35;
      this.defense = 30;
      this.speed = 50;
      this.special = 20;
      this.attack[0] = "PoisonSting()";
      this.attack[1] = "StringShot()";
      this.xptype = "medium";
	this.xpaward = 52;
	this.catchdif = 255;
      this.breed[0] = 3;
      this.breed[1] = 3;
   }
   if(this.name == "Kakuna")
   {
      this.type[0] = "Bug";
      this.type[1] = "Poison";
      this.health = 45;
      this.strength = 25;
      this.defense = 50;
      this.speed = 35;
      this.special = 25;
      this.attack[0] = "PoisonSting()";
      this.attack[1] = "StringShot()";
	if(level >= 8)
         this.attack[2] = "Harden()";
      this.xptype = "medium";
	this.xpaward = 71;
	this.catchdif = 120;
      this.breed[0] = 3;
      this.breed[1] = 3;
   }
   if(this.name == "Beedrill")
   {
      this.type[0] = "Bug";
      this.type[1] = "Poison";
      this.health = 65;
      this.strength = 80;
      this.defense = 40;
      this.speed = 75;
      this.special = 45;
      this.attack[0] = "PoisonSting()";
      this.attack[1] = "StringShot()";
	if(level >= 8)
         this.attack[2] = "Harden()";
	if(level >= 12)
         this.attack[3] = "FuryAttack()";
	if(level >= 16)
         this.attack[1] = "FocusEnergy()";
	if(level >= 20)
         this.attack[0] = "Twineedle()";
	if(level >= 25)
         this.attack[2] = "Rage()";
	if(level >= 30)
         this.attack[0] = "PinMissile()";
	if(level >= 35)
         this.attack[2] = "Agility()";
      this.xptype = "medium";
	this.xpaward = 159;
	this.catchdif = 45;
      this.breed[0] = 3;
      this.breed[1] = 3;
   }
   if(this.name == "Pidgey")
   {
      this.type[0] = "Normal";
      this.type[1] = "Flying";
      this.health = 40;
      this.strength = 45;
      this.defense = 40;
      this.speed = 56;
      this.special = 35;
      this.attack[0] = "Gust()";
	if(level >= 5)
         this.attack[1] = "SandAttack()";
	if(level >= 12)
         this.attack[2] = "QuickAttack()";
	if(level >= 19)
         this.attack[3] = "WhirlWind()";
	if(level >= 28)
         this.attack[0] = "WingAttack()";
	if(level >= 36)
         this.attack[3] = "Agility()";
	if(level >= 44)
         this.attack[2] = "MirrorMove()";
      this.xptype = "parabolic";
	this.xpaward = 55;
	this.catchdif = 255;
      this.breed[0] = 4;
      this.breed[1] = 4;
   }
   if(this.name == "Pidgeotto")
   {
      this.type[0] = "Normal";
      this.type[1] = "Flying";
      this.health = 63;
      this.strength = 60;
      this.defense = 55;
      this.speed = 71;
      this.special = 50;
      this.attack[0] = "Gust()";
      this.attack[1] = "SandAttack()";
	if(level >= 12)
         this.attack[2] = "QuickAttack()";
	if(level >= 21)
         this.attack[3] = "WhirlWind()";
	if(level >= 31)
         this.attack[0] = "WingAttack()";
	if(level >= 40)
         this.attack[3] = "Agility()";
	if(level >= 49)
         this.attack[2] = "MirrorMove()";
      this.xptype = "parabolic";
	this.xpaward = 113;
	this.catchdif = 120;
      this.breed[0] = 4;
      this.breed[1] = 4;
   }
   if(this.name == "Pidgeot")
   {
      this.type[0] = "Normal";
      this.type[1] = "Flying";
      this.health = 83;
      this.strength = 80;
      this.defense = 75;
      this.speed = 91;
      this.special = 70;
      this.attack[0] = "Gust()";
      this.attack[1] = "SandAttack()";
      this.attack[2] = "QuickAttack()";
	if(level >= 21)
         this.attack[3] = "WhirlWind()";
	if(level >= 31)
         this.attack[0] = "WingAttack()";
	if(level >= 44)
         this.attack[3] = "Agility()";
	if(level >= 54)
         this.attack[2] = "MirrorMove()";
      this.xptype = "parabolic";
	this.xpaward = 172;
	this.catchdif = 45;
      this.breed[0] = 4;
      this.breed[1] = 4;
   }
   if(this.name == "Rattata")
   {
      this.type[0] = "Normal";
      this.type[1] = "";
      this.health = 30;
      this.strength = 56;
      this.defense = 35;
      this.speed = 72;
      this.special = 25;
      this.attack[0] = "Tackle()";
      this.attack[1] = "TailWhip()";
	if(level >= 7)
	   this.attack[2] = "QuickAttack()";
	if(level >= 14)
	   this.attack[3] = "HyperFang()";
	if(level >= 23)
	   this.attack[0] = "FocusEnergy()";
	if(level >= 34)
	   this.attack[1] = "SuperFang()";
      this.xptype = "medium";
	this.xpaward = 57;
	this.catchdif = 255;
      this.breed[0] = 5;
      this.breed[1] = 5;
   }
   if(this.name == "Raticate")
   {
      this.type[0] = "Normal";
      this.type[1] = "";
      this.health = 55;
      this.strength = 81;
      this.defense = 60;
      this.speed = 97;
      this.special = 50;
      this.attack[0] = "Tackle()";
      this.attack[1] = "TailWhip()";
      this.attack[2] = "QuickAttack()";
	if(level >= 14)
	   this.attack[3] = "HyperFang()";
	if(level >= 27)
	   this.attack[0] = "FocusEnergy()";
	if(level >= 41)
	   this.attack[1] = "SuperFang()";
      this.xptype = "medium";
	this.xpaward = 116;
	this.catchdif = 90;
      this.breed[0] = 5;
      this.breed[1] = 5;
   }
   if(this.name == "Spearow")
   {
      this.type[0] = "Normal";
      this.type[1] = "Flying";
      this.health = 40;
      this.strength = 60;
      this.defense = 30;
      this.speed = 70;
      this.special = 31;
      this.attack[0] = "Peck()";
      this.attack[1] = "Growl()";
	if(level >= 9)
	   this.attack[2] = "Leer()";
	if(level >= 15)
	   this.attack[3] = "FuryAttack()";
	if(level >= 22)
	   this.attack[1] = "MirrorMove()";
	if(level >= 29)
	   this.attack[0] = "DrillPeck()";
	if(level >= 36)
	   this.attack[2] = "Agility()";
      this.xptype = "medium";
	this.xpaward = 58;
	this.catchdif = 255;
      this.breed[0] = 4;
      this.breed[1] = 4;
   }
   if(this.name == "Fearow")
   {
      this.type[0] = "Normal";
      this.type[1] = "Flying";
      this.health = 65;
      this.strength = 90;
      this.defense = 65;
      this.speed = 100;
      this.special = 61;
      this.attack[0] = "Peck()";
      this.attack[1] = "Growl()";
      this.attack[2] = "Leer()";
	if(level >= 15)
	   this.attack[3] = "FuryAttack()";
	if(level >= 22)
	   this.attack[1] = "MirrorMove()";
	if(level >= 34)
	   this.attack[0] = "DrillPeck()";
	if(level >= 43)
	   this.attack[2] = "Agility()";
      this.xptype = "medium";
	this.xpaward = 162;
	this.catchdif = 90;
      this.breed[0] = 4;
      this.breed[1] = 4;
   }
   if(this.name == "Ekans")
   {
      this.type[0] = "Poison";
      this.type[1] = "";
      this.health = 35;
      this.strength = 60;
      this.defense = 44;
      this.speed = 55;
      this.special = 40;
      this.attack[0] = "Wrap()";
      this.attack[1] = "Leer()";
	if(level >= 10)
	   this.attack[2] = "PoisonSting()";
	if(level >= 17)
	   this.attack[3] = "Bite()";
	if(level >= 24)
	   this.attack[2] = "Glare()";
	if(level >= 31)
	   this.attack[1] = "Screech()";
	if(level >= 38)
	   this.attack[0] = "Acid()";
      this.xptype = "medium";
	this.xpaward = 62;
	this.catchdif = 255;
      this.breed[0] = 5;
      this.breed[1] = "E";
   }
   if(this.name == "Arbok")
   {
      this.type[0] = "Poison";
      this.type[1] = "";
      this.health = 60;
      this.strength = 85;
      this.defense = 69;
      this.speed = 80;
      this.special = 65;
      this.attack[0] = "Wrap()";
      this.attack[1] = "Leer()";
      this.attack[2] = "PoisonSting()";
	if(level >= 17)
	   this.attack[3] = "Bite()";
	if(level >= 27)
	   this.attack[2] = "Glare()";
	if(level >= 36)
	   this.attack[1] = "Screech()";
	if(level >= 47)
	   this.attack[0] = "Acid()";
      this.xptype = "medium";
	this.xpaward = 147;
	this.catchdif = 90;
      this.breed[0] = 5;
      this.breed[1] = "E";
   }
   if(this.name == "Pikachu")
   {
      this.type[0] = "Electric";
      this.type[1] = "";
      this.health = 35;
      this.strength = 55;
      this.defense = 30;
      this.speed = 90;
      this.special = 50;
      this.attack[0] = "ThunderShock()";
      this.attack[1] = "Growl()";
	if(level >= 6)
	   this.attack[2] = "TailWhip()";
	if(level >= 8)
	   this.attack[3] = "ThunderWave()";
	if(level >= 11)
	   this.attack[1] = "QuickAttack()";
	if(level >= 15)
	   this.attack[2] = "DoubleTeam()";
	if(level >= 20)
	   this.attack[1] = "Slam()";
	if(level >= 26)
	   this.attack[0] = "ThunderBolt()";
	if(level >= 33)
	   this.attack[2] = "Agility()";
	if(level >= 41)
	   this.attack[0] = "Thunder()";
	if(level >= 50)
	   this.attack[3] = "LightScreen()";
      this.xptype = "medium";
	this.xpaward = 82;
	this.catchdif = 190;
      this.breed[0] = 5;
      this.breed[1] = 6;
   }
   if(this.name == "Raichu")
   {
      this.type[0] = "Electric";
      this.type[1] = "";
      this.health = 60;
      this.strength = 90;
      this.defense = 55;
      this.speed = 100;
      this.special = 90;
      this.attack[0] = "Thunder()";
      this.attack[1] = "Growl()";
      this.attack[2] = "ThunderWave()";
      this.xptype = "medium";
	this.xpaward = 122;
	this.catchdif = 75;
      this.breed[0] = 5;
      this.breed[1] = 6;
   }
   if(this.name == "Sandshrew")
   {
      this.type[0] = "Ground";
      this.type[1] = "";
      this.health = 50;
      this.strength = 75;
      this.defense = 85;
      this.speed = 40;
      this.special = 30;
      this.attack[0] = "Scratch()";
	if(level >= 10)
	   this.attack[1] = "SandAttack()";
	if(level >= 17)
	   this.attack[2] = "Slash()";
	if(level >= 24)
	   this.attack[3] = "PoisonSting()";
	if(level >= 31)
	   this.attack[0] = "Swift()";
	if(level >= 38)
	   this.attack[1] = "FurySwipes()";
      this.xptype = "medium";
	this.xpaward = 93;
	this.catchdif = 255;
      this.breed[0] = 5;
      this.breed[1] = 5;
   }
   if(this.name == "Sandslash")
   {
      this.type[0] = "Ground";
      this.type[1] = "";
      this.health = 75;
      this.strength = 100;
      this.defense = 110;
      this.speed = 65;
      this.special = 55;
      this.attack[0] = "Scratch()";
      this.attack[1] = "SandAttack()";
	if(level >= 17)
	   this.attack[2] = "Slash()";
	if(level >= 27)
	   this.attack[3] = "PoisonSting()";
	if(level >= 36)
	   this.attack[0] = "Swift()";
	if(level >= 47)
	   this.attack[1] = "FurySwipes()";
      this.xptype = "medium";
	this.xpaward = 163;
	this.catchdif = 90;
      this.breed[0] = 5;
      this.breed[1] = 5;
   }
   if(this.name == "NidoranF")
   {
      this.type[0] = "Poison";
      this.type[1] = "";
      this.health = 55;
      this.strength = 47;
      this.defense = 52;
      this.speed = 41;
      this.special = 40;
      this.attack[0] = "Tackle()";
      this.attack[1] = "Growl()";
	if(level >= 8)
	   this.attack[2] = "Scratch()";
	if(level >= 12)
	   this.attack[3] = "DoubleKick()";
	if(level >= 17)
	   this.attack[0] = "PoisonSting()";
	if(level >= 23)
	   this.attack[2] = "TailWhip()";
	if(level >= 30)
	   this.attack[1] = "Bite()";
	if(level >= 38)
	   this.attack[1] = "FurySwipes()";
      this.xptype = "medium";
	this.xpaward = 59;
	this.catchdif = 235;
      this.breed[0] = 1;
      this.breed[1] = 5;
   }
   if(this.name == "Nidorina")
   {
      this.type[0] = "Poison";
      this.type[1] = "";
      this.health = 70;
      this.strength = 62;
      this.defense = 67;
      this.speed = 56;
      this.special = 55;
      this.attack[0] = "Tackle()";
      this.attack[1] = "Growl()";
      this.attack[2] = "Scratch()";
	if(level >= 12)
	   this.attack[3] = "DoubleKick()";
	if(level >= 19)
	   this.attack[0] = "PoisonSting()";
	if(level >= 27)
	   this.attack[2] = "TailWhip()";
	if(level >= 36)
	   this.attack[1] = "Bite()";
	if(level >= 46)
	   this.attack[1] = "FurySwipes()";
      this.xptype = "medium";
	this.xpaward = 117;
	this.catchdif = 120;
      this.breed[0] = 0;
      this.breed[1] = 0;
   }
   if(this.name == "Nidoqueen")
   {
      this.type[0] = "Poison";
      this.type[1] = "Ground";
      this.health = 90;
      this.strength = 82;
      this.defense = 87;
      this.speed = 76;
      this.special = 75;
      this.attack[0] = "Tackle()";
      this.attack[1] = "Growl()";
      this.attack[2] = "Scratch()";
	if(level >= 12)
	   this.attack[3] = "DoubleKick()";
	if(level >= 23)
	   this.attack[1] = "BodySlam()";
      this.xptype = "medium";
	this.xpaward = 194;
	this.catchdif = 45;
      this.breed[0] = 0;
      this.breed[1] = 0;
   }
   if(this.name == "NidoranM")
   {
      this.type[0] = "Poison";
      this.type[1] = "";
      this.health = 46;
      this.strength = 57;
      this.defense = 40;
      this.speed = 50;
      this.special = 40;
      this.attack[0] = "Tackle()";
      this.attack[1] = "Leer()";
	if(level >= 8)
	   this.attack[2] = "HornAttack()";
	if(level >= 12)
	   this.attack[3] = "DoubleKick()";
	if(level >= 17)
	   this.attack[0] = "PoisonSting()";
	if(level >= 23)
	   this.attack[1] = "FocusEnergy()";
	if(level >= 30)
	   this.attack[2] = "FuryAttack()";
	if(level >= 38)
	   this.attack[0] = "HornDrill()";
      this.xptype = "medium";
	this.xpaward = 60;
	this.catchdif = 235;
      this.breed[0] = 1;
      this.breed[1] = 5;
   }
   if(this.name == "Nidorino")
   {
      this.type[0] = "Poison";
      this.type[1] = "";
      this.health = 61;
      this.strength = 72;
      this.defense = 57;
      this.speed = 65;
      this.special = 55;
      this.attack[0] = "Tackle()";
      this.attack[1] = "Leer()";
      this.attack[2] = "HornAttack()";
	if(level >= 12)
	   this.attack[3] = "DoubleKick()";
	if(level >= 19)
	   this.attack[0] = "PoisonSting()";
	if(level >= 27)
	   this.attack[1] = "FocusEnergy()";
	if(level >= 36)
	   this.attack[2] = "FuryAttack()";
	if(level >= 46)
	   this.attack[0] = "HornDrill()";
      this.xptype = "medium";
	this.xpaward = 118;
	this.catchdif = 120;
      this.breed[0] = 1;
      this.breed[1] = 5;
   }
   if(this.name == "Nidoking")
   {
      this.type[0] = "Poison";
      this.type[1] = "Ground";
      this.health = 81;
      this.strength = 92;
      this.defense = 77;
      this.speed = 85;
      this.special = 75;
      this.attack[0] = "Tackle()";
      this.attack[1] = "Leer()";
	this.attack[2] = "HornAttack()";
	if(level >= 12)
	   this.attack[3] = "DoubleKick()";
	if(level >= 23)
	   this.attack[2] = "Thrash()";
      this.xptype = "medium";
	this.xpaward = 195;
	this.catchdif = 45;
      this.breed[0] = 1;
      this.breed[1] = 5;
   }
   if(this.name == "Clefairy")
   {
      this.type[0] = "Normal";
      this.type[1] = "";
      this.health = 70;
      this.strength = 45;
      this.defense = 48;
      this.speed = 35;
      this.special = 60;
      this.attack[0] = "Pound()";
      this.attack[1] = "Growl()";
	if(level >= 13)
	   this.attack[2] = "Sing()";
	if(level >= 18)
	   this.attack[3] = "DoubleSlap()";
	if(level >= 24)
	   this.attack[0] = "Minimize()";
	if(level >= 31)
	   this.attack[1] = "Metronome()";
	if(level >= 39)
	   this.attack[2] = "DefenseCurl()";
	if(level >= 48)
	   this.attack[2] = "LightScreen()";
      this.xptype = "fast";
	this.xpaward = 68;
	this.catchdif = 150;
      this.breed[0] = 6;
      this.breed[1] = 6;
   }
   if(this.name == "Clefable")
   {
      this.type[0] = "Normal";
      this.type[1] = "";
      this.health = 95;
      this.strength = 70;
      this.defense = 73;
      this.speed = 60;
      this.special = 85;
      this.attack[0] = "Sing()";
      this.attack[1] = "DoubleSlap()";
      this.attack[2] = "Minimize()";
      this.attack[3] = "Metronome()";
      this.xptype = "fast";
	this.xpaward = 129;
	this.catchdif = 25;
      this.breed[0] = 6;
      this.breed[1] = 6;
   }
   if(this.name == "Vulpix")
   {
      this.type[0] = "Fire";
      this.type[1] = "";
      this.health = 38;
      this.strength = 41;
      this.defense = 40;
      this.speed = 65;
      this.special = 65;
      this.attack[0] = "Ember()";
      this.attack[1] = "TailWhip()";
	if(level >= 16)
	   this.attack[2] = "QuickAttack()";
	if(level >= 21)
	   this.attack[3] = "Roar()";
	if(level >= 28)
	   this.attack[3] = "ConfuseRay()";
	if(level >= 35)
	   this.attack[0] = "FlameThrower()";
	if(level >= 42)
	   this.attack[2] = "FireSpin()";
      this.xptype = "medium";
	this.xpaward = 63;
	this.catchdif = 190;
      this.breed[0] = 5;
      this.breed[1] = 5;
   }
   if(this.name == "Ninetales")
   {
      this.type[0] = "Fire";
      this.type[1] = "";
      this.health = 73;
      this.strength = 76;
      this.defense = 75;
      this.speed = 100;
      this.special = 100;
      this.attack[0] = "Ember()";
      this.attack[1] = "TailWhip()";
      this.attack[2] = "QuickAttack()";
      this.attack[3] = "Roar()";
      this.xptype = "medium";
	this.xpaward = 178;
	this.catchdif = 75;
      this.breed[0] = 5;
      this.breed[1] = 5;
   }
   if(this.name == "Jigglypuff")
   {
      this.type[0] = "Normal";
      this.type[1] = "";
      this.health = 115;
      this.strength = 45;
      this.defense = 20;
      this.speed = 20;
      this.special = 25;
      this.attack[0] = "Sing()";
	if(level >= 9)
	   this.attack[1] = "Pound()";
	if(level >= 14)
	   this.attack[2] = "Disable()";
	if(level >= 19)
	   this.attack[3] = "DefenseCurl()";
	if(level >= 24)
	   this.attack[1] = "DoubleSlap()";
	if(level >= 29)
	   this.attack[2] = "Rest()";
	if(level >= 34)
	   this.attack[0] = "BodySlam()";
	if(level >= 39)
	   this.attack[1] = "DoubleEdge()";
      this.xptype = "fast";
	this.xpaward = 76;
	this.catchdif = 170;
      this.breed[0] = 6;
      this.breed[1] = 6;
   }
   if(this.name == "Wigglytuff")
   {
      this.type[0] = "Normal";
      this.type[1] = "";
      this.health = 140;
      this.strength = 70;
      this.defense = 45;
      this.speed = 45;
      this.special = 50;
      this.attack[0] = "Sing()";
      this.attack[1] = "Disable()";
      this.attack[2] = "DefenseCurl()";
      this.attack[3] = "DoubleSlap()";
      this.xptype = "fast";
	this.xpaward = 109;
	this.catchdif = 50;
      this.breed[0] = 6;
      this.breed[1] = 6;
   }
   if(this.name == "Zubat")
   {
      this.type[0] = "Poison";
      this.type[1] = "Flying";
      this.health = 40;
      this.strength = 45;
      this.defense = 35;
      this.speed = 55;
      this.special = 40;
      this.attack[0] = "LeechLife()";
	if(level >= 10)
	   this.attack[1] = "SuperSonic()";
	if(level >= 15)
	   this.attack[2] = "Bite()";
	if(level >= 21)
	   this.attack[3] = "ConfuseRay()";
	if(level >= 28)
	   this.attack[1] = "WingAttack()";
	if(level >= 36)
	   this.attack[0] = "Haze()";
      this.xptype = "medium";
	this.xpaward = 54;
	this.catchdif = 255;
      this.breed[0] = 4;
      this.breed[1] = 4;
   }
   if(this.name == "Golbat")
   {
      this.type[0] = "Poison";
      this.type[1] = "Flying";
      this.health = 75;
      this.strength = 80;
      this.defense = 70;
      this.speed = 90;
      this.special = 75;
      this.attack[0] = "LeechLife()";
	this.attack[1] = "Screech()";
	this.attack[2] = "Bite()";
	if(level >= 10)
	   this.attack[3] = "SuperSonic()";
	if(level >= 21)
	   this.attack[3] = "ConfuseRay()";
	if(level >= 28)
	   this.attack[0] = "WingAttack()";
	if(level >= 36)
	   this.attack[2] = "Haze()";
      this.xptype = "medium";
	this.xpaward = 171;
	this.catchdif = 90;
      this.breed[0] = 4;
      this.breed[1] = 4;
   }
   if(this.name == "Oddish")
   {
      this.type[0] = "Grass";
      this.type[1] = "Poison";
      this.health = 45;
      this.strength = 50;
      this.defense = 55;
      this.speed = 30;
      this.special = 75;
      this.attack[0] = "Absorb()";
	if(level >= 15)
	   this.attack[1] = "PoisonPowder()";
	if(level >= 17)
	   this.attack[2] = "StunSpore()";
	if(level >= 19)
	   this.attack[3] = "SleepPowder()";
	if(level >= 24)
	   this.attack[1] = "Acid()";
	if(level >= 33)
	   this.attack[2] = "PetalDance()";
	if(level >= 46)
	   this.attack[0] = "SolarBeam()";
      this.xptype = "parabolic";
	this.xpaward = 78;
	this.catchdif = 255;
      this.breed[0] = 7;
      this.breed[1] = 7;
   }
   if(this.name == "Gloom")
   {
      this.type[0] = "Grass";
      this.type[1] = "Poison";
      this.health = 60;
      this.strength = 65;
      this.defense = 70;
      this.speed = 40;
      this.special = 85;
      this.attack[0] = "Absorb()";
      this.attack[1] = "PoisonPowder()";
      this.attack[2] = "StunSpore()";
	if(level >= 19)
	   this.attack[3] = "SleepPowder()";
	if(level >= 28)
	   this.attack[1] = "Acid()";
	if(level >= 38)
	   this.attack[2] = "PetalDance()";
	if(level >= 52)
	   this.attack[0] = "SolarBeam()";
      this.xptype = "parabolic";
	this.xpaward = 132;
	this.catchdif = 120;
      this.breed[0] = 7;
      this.breed[1] = 7;
   }
   if(this.name == "Vileplume")
   {
      this.type[0] = "Grass";
      this.type[1] = "Poison";
      this.health = 75;
      this.strength = 80;
      this.defense = 85;
      this.speed = 50;
      this.special = 100;
      this.attack[0] = "PetalDance()";
      this.attack[1] = "PoisonPowder()";
      this.attack[2] = "SleepPowder()";
      this.attack[3] = "StunSpore()";
      this.xptype = "parabolic";
	this.xpaward = 184;
	this.catchdif = 45;
      this.breed[0] = 7;
      this.breed[1] = 7;
   }
   if(this.name == "Paras")
   {
      this.type[0] = "Bug";
      this.type[1] = "Grass";
      this.health = 35;
      this.strength = 70;
      this.defense = 55;
      this.speed = 25;
      this.special = 55;
      this.attack[0] = "Scratch()";
	if(level >= 13)
	   this.attack[1] = "StunSpore()";
	if(level >= 20)
	   this.attack[2] = "LeechLife()";
	if(level >= 27)
	   this.attack[3] = "Spore()";
	if(level >= 34)
	   this.attack[0] = "Slash()";
	if(level >= 41)
	   this.attack[1] = "Growth()";
      this.xptype = "medium";
	this.xpaward = 70;
	this.catchdif = 190;
      this.breed[0] = 3;
      this.breed[1] = 7;
   }
   if(this.name == "Parasect")
   {
      this.type[0] = "Bug";
      this.type[1] = "Grass";
      this.health = 60;
      this.strength = 95;
      this.defense = 80;
      this.speed = 30;
      this.special = 80;
      this.attack[0] = "Scratch()";
      this.attack[1] = "StunSpore()";
      this.attack[2] = "LeechLife()";
	if(level >= 30)
	   this.attack[3] = "Spore()";
	if(level >= 39)
	   this.attack[0] = "Slash()";
	if(level >= 48)
	   this.attack[1] = "Growth()";
      this.xptype = "medium";
	this.xpaward = 128;
	this.catchdif = 75;
      this.breed[0] = 3;
      this.breed[1] = 7;
   }
   if(this.name == "Venonat")
   {
      this.type[0] = "Bug";
      this.type[1] = "Poison";
      this.health = 60;
      this.strength = 55;
      this.defense = 50;
      this.speed = 45;
      this.special = 40;
      this.attack[0] = "Tackle()";
      this.attack[1] = "Disable()";
	if(level >= 11)
	   this.attack[2] = "SuperSonic()";
	if(level >= 19)
	   this.attack[3] = "Confusion()";
	if(level >= 22)
	   this.attack[1] = "PoisonPowder()";
	if(level >= 27)
	   this.attack[0] = "LeechLife()";
	if(level >= 30)
	   this.attack[1] = "StunSpore()";
	if(level >= 35)
	   this.attack[3] = "Psybeam()";
	if(level >= 38)
	   this.attack[1] = "SleepPowder()";
	if(level >= 43)
	   this.attack[3] = "Psychic()";
      this.xptype = "medium";
	this.xpaward = 75;
	this.catchdif = 190;
      this.breed[0] = 3;
      this.breed[1] = 3;
   }
   if(this.name == "Venomoth")
   {
      this.type[0] = "Bug";
      this.type[1] = "Poison";
      this.health = 70;
      this.strength = 65;
      this.defense = 60;
      this.speed = 90;
      this.special = 90;
      this.attack[0] = "Tackle()";
      this.attack[1] = "Disable()";
	if(level >= 11)
	   this.attack[2] = "SuperSonic()";
	if(level >= 19)
	   this.attack[3] = "Confusion()";
	if(level >= 22)
	   this.attack[1] = "PoisonPowder()";
	if(level >= 27)
	   this.attack[0] = "LeechLife()";
	if(level >= 30)
	   this.attack[1] = "StunSpore()";
	if(level >= 38)
	   this.attack[3] = "Psybeam()";
	if(level >= 43)
	   this.attack[1] = "SleepPowder()";
	if(level >= 50)
	   this.attack[3] = "Psychic()";
      this.xptype = "medium";
	this.xpaward = 138;
	this.catchdif = 75;
      this.breed[0] = 3;
      this.breed[1] = 3;
   }
   if(this.name == "Diglett")
   {
      this.type[0] = "Ground";
      this.type[1] = "";
      this.health = 10;
      this.strength = 55;
      this.defense = 25;
      this.speed = 95;
      this.special = 45;
      this.attack[0] = "Scratch()";
	if(level >= 15)
	   this.attack[1] = "Growl()";
	if(level >= 19)
	   this.attack[2] = "Dig()";
	if(level >= 24)
	   this.attack[3] = "SandAttack()";
	if(level >= 31)
	   this.attack[0] = "Slash()";
	if(level >= 40)
	   this.attack[2] = "Earthquake()";
      this.xptype = "medium";
	this.xpaward = 81;
	this.catchdif = 255;
      this.breed[0] = 5;
      this.breed[1] = 5;
   }
   if(this.name == "Dugtrio")
   {
      this.type[0] = "Ground";
      this.type[1] = "";
      this.health = 35;
      this.strength = 80;
      this.defense = 50;
      this.speed = 120;
      this.special = 70;
      this.attack[0] = "Scratch()";
      this.attack[1] = "Growl()";
      this.attack[2] = "Dig()";
      this.attack[3] = "SandAttack()";
	if(level >= 35)
	   this.attack[0] = "Slash()";
	if(level >= 47)
	   this.attack[2] = "Earthquake()";
      this.xptype = "medium";
	this.xpaward = 153;
	this.catchdif = 50;
      this.breed[0] = 5;
      this.breed[1] = 5;
   }
   if(this.name == "Meowth")
   {
      this.type[0] = "Normal";
      this.type[1] = "";
      this.health = 40;
      this.strength = 45;
      this.defense = 35;
      this.speed = 90;
      this.special = 40;
      this.attack[0] = "Scratch()";
      this.attack[1] = "Growl()";
	if(level >= 12)
	   this.attack[2] = "Bite()";
	if(level >= 17)
	   this.attack[3] = "PayDay()";
	if(level >= 24)
	   this.attack[0] = "Screech()";
	if(level >= 33)
	   this.attack[1] = "FurySwipes()";
	if(level >= 44)
	   this.attack[2] = "Slash()";
      this.xptype = "medium";
	this.xpaward = 69;
	this.catchdif = 255;
      this.breed[0] = 5;
      this.breed[1] = 5;
   }
   if(this.name == "Persian")
   {
      this.type[0] = "Normal";
      this.type[1] = "";
      this.health = 65;
      this.strength = 70;
      this.defense = 60;
      this.speed = 115;
      this.special = 65;
      this.attack[0] = "Scratch()";
      this.attack[1] = "Growl()";
      this.attack[2] = "Bite()";
      this.attack[3] = "Screech()";
	if(level >= 17)
	   this.attack[0] = "PayDay()";
	if(level >= 37)
	   this.attack[2] = "FurySwipes()";
	if(level >= 51)
	   this.attack[1] = "Slash()";
      this.xptype = "medium";
	this.xpaward = 148;
	this.catchdif = 90;
      this.breed[0] = 5;
      this.breed[1] = 5;
   }
   if(this.name == "Psyduck")
   {
      this.type[0] = "Water";
      this.type[1] = "";
      this.health = 50;
      this.strength = 52;
      this.defense = 48;
      this.speed = 55;
      this.special = 50;
      this.attack[0] = "Scratch()";
	if(level >= 28)
	   this.attack[1] = "TailWhip()";
	if(level >= 31)
	   this.attack[2] = "Disable()";
	if(level >= 36)
	   this.attack[3] = "Confusion()";
	if(level >= 43)
	   this.attack[0] = "FurySwipes()";
	if(level >= 52)
	   this.attack[1] = "HydroPump()";
      this.xptype = "medium";
	this.xpaward = 80;
	this.catchdif = 190;
      this.breed[0] = 2;
      this.breed[1] = 5;
   }
   if(this.name == "Golduck")
   {
      this.type[0] = "Water";
      this.type[1] = "";
      this.health = 80;
      this.strength = 82;
      this.defense = 78;
      this.speed = 85;
      this.special = 80;
      this.attack[0] = "Scratch()";
      this.attack[1] = "TailWhip()";
      this.attack[2] = "Disable()";
	if(level >= 39)
	   this.attack[3] = "Confusion()";
	if(level >= 48)
	   this.attack[0] = "FurySwipes()";
	if(level >= 59)
	   this.attack[1] = "HydroPump()";
      this.xptype = "medium";
	this.xpaward = 174;
	this.catchdif = 75;
      this.breed[0] = 2;
      this.breed[1] = 5;
   }
   if(this.name == "Mankey")
   {
      this.type[0] = "Fighting";
      this.type[1] = "";
      this.health = 40;
      this.strength = 80;
      this.defense = 35;
      this.speed = 70;
      this.special = 35;
      this.attack[0] = "Scratch()";
      this.attack[1] = "Leer()";
	if(level >= 9)
	   this.attack[2] = "LowKick()";
	if(level >= 15)
	   this.attack[3] = "KarateChop()";
	if(level >= 21)
	   this.attack[0] = "FurySwipes()";
	if(level >= 27)
	   this.attack[1] = "FocusEnergy()";
	if(level >= 33)
	   this.attack[2] = "SeismicToss()";
	if(level >= 39)
	   this.attack[0] = "Thrash()";
	if(level >= 45)
	   this.attack[1] = "Screech()";
      this.xptype = "medium";
	this.xpaward = 74;
	this.catchdif = 190;
      this.breed[0] = 5;
      this.breed[1] = 5;
   }
   if(this.name == "Primeape")
   {
      this.type[0] = "Fighting";
      this.type[1] = "";
      this.health = 65;
      this.strength = 105;
      this.defense = 60;
      this.speed = 95;
      this.special = 60;
      this.attack[0] = "LowKick()";
      this.attack[1] = "Leer()";
      this.attack[2] = "KarateChop()";
      this.attack[3] = "FurySwipes()";
	if(level >= 27)
	   this.attack[1] = "FocusEnergy()";
	if(level >= 28)
	   this.attack[0] = "Rage()";
	if(level >= 33)
	   this.attack[3] = "SeismicToss()";
	if(level >= 39)
	   this.attack[0] = "Thrash()";
	if(level >= 45)
	   this.attack[1] = "Screech()";
      this.xptype = "medium";
	this.xpaward = 149;
	this.catchdif = 75;
      this.breed[0] = 5;
      this.breed[1] = 5;
   }
   if(this.name == "Growlithe")
   {
      this.type[0] = "Fire";
      this.type[1] = "";
      this.health = 55;
      this.strength = 70;
      this.defense = 45;
      this.speed = 60;
      this.special = 50;
      this.attack[0] = "Bite()";
      this.attack[1] = "Roar()";
	if(level >= 18)
	   this.attack[2] = "Ember()";
	if(level >= 23)
	   this.attack[3] = "Leer()";
	if(level >= 30)
	   this.attack[0] = "TakeDown()";
	if(level >= 39)
	   this.attack[1] = "Agility()";
	if(level >= 50)
	   this.attack[2] = "FlameThrower()";
      this.attack[3] = "";
      this.xptype = "slow";
	this.xpaward = 91;
	this.catchdif = 190;
      this.breed[0] = 5;
      this.breed[1] = 5;
   }
   if(this.name == "Arcanine")
   {
      this.type[0] = "Fire";
      this.type[1] = "";
      this.health = 90;
      this.strength = 110;
      this.defense = 80;
      this.speed = 95;
      this.special = 80;
      this.attack[0] = "TakeDown()";
      this.attack[1] = "Ember()";
      this.attack[2] = "Roar()";
      this.attack[3] = "Leer()";
      this.xptype = "slow";
	this.xpaward = 213;
	this.catchdif = 75;
      this.breed[0] = 5;
      this.breed[1] = 5;
   }
   if(this.name == "Poliwag")
   {
      this.type[0] = "Water";
      this.type[1] = "";
      this.health = 40;
      this.strength = 50;
      this.defense = 40;
      this.speed = 90;
      this.special = 40;
      this.attack[0] = "Bubble()";
	if(level >= 16)
	   this.attack[1] = "Hypnosis()";
	if(level >= 19)
	   this.attack[2] = "WaterGun()";
	if(level >= 25)
	   this.attack[3] = "DoubleSlap()";
	if(level >= 31)
	   this.attack[0] = "BodySlam()";
	if(level >= 38)
	   this.attack[3] = "Amnesia()";
	if(level >= 45)
	   this.attack[2] = "HydroPump()";
      this.xptype = "parabolic";
	this.xpaward = 77;
	this.catchdif = 255;
      this.breed[0] = 2;
      this.breed[1] = 2;
   }
   if(this.name == "Poliwhirl")
   {
      this.type[0] = "Water";
      this.type[1] = "";
      this.health = 65;
      this.strength = 65;
      this.defense = 65;
      this.speed = 90;
      this.special = 50;
      this.attack[0] = "Bubble()";
      this.attack[1] = "Hypnosis()";
      this.attack[2] = "WaterGun()";
	if(level >= 26)
	   this.attack[3] = "DoubleSlap()";
	if(level >= 33)
	   this.attack[0] = "BodySlam()";
	if(level >= 41)
	   this.attack[3] = "Amnesia()";
	if(level >= 49)
	   this.attack[2] = "HydroPump()";
      this.xptype = "parabolic";
	this.xpaward = 131;
	this.catchdif = 120;
      this.breed[0] = 2;
      this.breed[1] = 2;
   }
   if(this.name == "Poliwrath")
   {
      this.type[0] = "Water";
      this.type[1] = "Fighting";
      this.health = 90;
      this.strength = 85;
      this.defense = 95;
      this.speed = 70;
      this.special = 70;
      this.attack[0] = "DoubleSlap()";
      this.attack[1] = "WaterGun()";
      this.attack[2] = "Hypnosis()";
      this.attack[3] = "BodySlam()";
      this.xptype = "parabolic";
	this.xpaward = 185;
	this.catchdif = 45;
      this.breed[0] = 2;
      this.breed[1] = 2;
   }
   if(this.name == "Abra")
   {
      this.type[0] = "Psychic";
      this.type[1] = "";
      this.health = 25;
      this.strength = 20;
      this.defense = 15;
      this.speed = 90;
      this.special = 105;
      this.attack[0] = "Teleport()";
      this.xptype = "parabolic";
	this.xpaward = 73;
	this.catchdif = 200;
      this.breed[0] = 8;
      this.breed[1] = 8;
   }
   if(this.name == "Kadabra")
   {
      this.type[0] = "Psychic";
      this.type[1] = "";
      this.health = 40;
      this.strength = 35;
      this.defense = 30;
      this.speed = 105;
      this.special = 120;
      this.attack[0] = "Teleport()";
      this.attack[1] = "Kinesis()";
	if(level >= 16)
	   this.attack[2] = "Confusion()";
	if(level >= 20)
	   this.attack[3] = "Disable()";
	if(level >= 27)
	   this.attack[2] = "Psybeam()";
	if(level >= 31)
	   this.attack[0] = "Recover()";
	if(level >= 38)
	   this.attack[2] = "Psychic()";
	if(level >= 42)
	   this.attack[1] = "Reflect()";
      this.xptype = "parabolic";
	this.xpaward = 100;
	this.catchdif = 45;
      this.breed[0] = 8;
      this.breed[1] = 8;
   }
   if(this.name == "Alakazam")
   {
      this.type[0] = "Psychic";
      this.type[1] = "";
      this.health = 55;
      this.strength = 50;
      this.defense = 45;
      this.speed = 120;
      this.special = 135;
      this.attack[0] = "Teleport()";
      this.attack[1] = "Kinesis()";
	if(level >= 16)
	   this.attack[2] = "Confusion()";
	if(level >= 20)
	   this.attack[3] = "Disable()";
	if(level >= 27)
	   this.attack[2] = "Psybeam()";
	if(level >= 31)
	   this.attack[0] = "Recover()";
	if(level >= 38)
	   this.attack[2] = "Psychic()";
	if(level >= 42)
	   this.attack[1] = "Reflect()";
      this.xptype = "parabolic";
	this.xpaward = 186;
	this.catchdif = 50;
      this.breed[0] = 8;
      this.breed[1] = 8;
   }
   if(this.name == "Machop")
   {
      this.type[0] = "Fighting";
      this.type[1] = "";
      this.health = 70;
      this.strength = 80;
      this.defense = 50;
      this.speed = 35;
      this.special = 35;
      this.attack[0] = "KarateChop()";
	if(level >= 20)
	   this.attack[1] = "LowKick()";
	if(level >= 25)
	   this.attack[2] = "Leer()";
	if(level >= 32)
	   this.attack[3] = "FocusEnergy()";
	if(level >= 39)
	   this.attack[1] = "SeismicToss()";
	if(level >= 46)
	   this.attack[0] = "Submission()";
      this.xptype = "medium";
	this.xpaward = 88;
	this.catchdif = 180;
      this.breed[0] = 8;
      this.breed[1] = 8;
   }
   if(this.name == "Machoke")
   {
      this.type[0] = "Fighting";
      this.type[1] = "";
      this.health = 80;
      this.strength = 100;
      this.defense = 70;
      this.speed = 45;
      this.special = 50;
      this.attack[0] = "KarateChop()";
      this.attack[1] = "LowKick()";
      this.attack[2] = "Leer()";
	if(level >= 36)
	   this.attack[3] = "FocusEnergy()";
	if(level >= 44)
	   this.attack[1] = "SeismicToss()";
	if(level >= 52)
	   this.attack[0] = "Submission()";
      this.xptype = "medium";
	this.xpaward = 146;
	this.catchdif = 90;
      this.breed[0] = 8;
      this.breed[1] = 8;
   }
   if(this.name == "Machamp")
   {
      this.type[0] = "Fighting";
      this.type[1] = "";
      this.health = 90;
      this.strength = 130;
      this.defense = 80;
      this.speed = 55;
      this.special = 65;
      this.attack[0] = "KarateChop()";
      this.attack[1] = "LowKick()";
      this.attack[2] = "Leer()";
	if(level >= 36)
	   this.attack[3] = "FocusEnergy()";
	if(level >= 44)
	   this.attack[1] = "SeismicToss()";
	if(level >= 52)
	   this.attack[0] = "Submission()";
      this.xptype = "medium";
	this.xpaward = 193;
	this.catchdif = 45;
      this.breed[0] = 8;
      this.breed[1] = 8;
   }
   if(this.name == "Bellsprout")
   {
      this.type[0] = "Grass";
      this.type[1] = "Poison";
      this.health = 50;
      this.strength = 75;
      this.defense = 35;
      this.speed = 40;
      this.special = 70;
      this.attack[0] = "VineWhip()";
      this.attack[1] = "Growth()";
	if(level >= 13)
	   this.attack[2] = "Wrap()";
	if(level >= 15)
	   this.attack[3] = "PoisonPowder()";
	if(level >= 18)
	   this.attack[3] = "SleepPowder()";
	if(level >= 21)
	   this.attack[3] = "StunSpore()";
	if(level >= 26)
	   this.attack[2] = "Acid()";
	if(level >= 33)
	   this.attack[0] = "RazorLeaf()";
	if(level >= 42)
	   this.attack[2] = "Slam()";
      this.xptype = "parabolic";
	this.xpaward = 84;
	this.catchdif = 255;
      this.breed[0] = 7;
      this.breed[1] = 7;
   }
   if(this.name == "Weepinbell")
   {
      this.type[0] = "Grass";
      this.type[1] = "Poison";
      this.health = 65;
      this.strength = 90;
      this.defense = 50;
      this.speed = 55;
      this.special = 85;
      this.attack[0] = "VineWhip()";
      this.attack[1] = "Growth()";
      this.attack[2] = "Wrap()";
	if(level >= 15)
	   this.attack[3] = "PoisonPowder()";
	if(level >= 18)
	   this.attack[3] = "SleepPowder()";
	if(level >= 23)
	   this.attack[3] = "StunSpore()";
	if(level >= 29)
	   this.attack[2] = "Acid()";
	if(level >= 38)
	   this.attack[0] = "RazorLeaf()";
	if(level >= 49)
	   this.attack[2] = "Slam()";
      this.xptype = "parabolic";
	this.xpaward = 151;
	this.catchdif = 120;
      this.breed[0] = 7;
      this.breed[1] = 7;
   }
   if(this.name == "Victreebel")
   {
      this.type[0] = "Grass";
      this.type[1] = "Poison";
      this.health = 80;
      this.strength = 105;
      this.defense = 65;
      this.speed = 70;
      this.special = 100;
      this.attack[0] = "SleepPowder()";
      this.attack[1] = "StunSpore()";
      this.attack[2] = "RazorLeaf()";
      this.attack[3] = "Acid()";
      this.xptype = "parabolic";
	this.xpaward = 191;
	this.catchdif = 45;
      this.breed[0] = 7;
      this.breed[1] = 7;
   }
   if(this.name == "Tentacool")
   {
      this.type[0] = "Water";
      this.type[1] = "Poison";
      this.health = 40;
      this.strength = 40;
      this.defense = 35;
      this.speed = 70;
      this.special = 100;
      this.attack[0] = "Acid()";
	if(level >= 7)
	   this.attack[1] = "SuperSonic()";
	if(level >= 13)
	   this.attack[2] = "Wrap()";
	if(level >= 18)
	   this.attack[3] = "PoisonSting()";
	if(level >= 22)
	   this.attack[2] = "WaterGun()";
	if(level >= 27)
	   this.attack[3] = "Constrict()";
	if(level >= 33)
	   this.attack[3] = "Barrier()";
	if(level >= 40)
	   this.attack[1] = "Screech()";
	if(level >= 48)
	   this.attack[2] = "HydroPump()";
      this.xptype = "medium";
	this.xpaward = 105;
	this.catchdif = 190;
      this.breed[0] = 9;
      this.breed[1] = 9;
   }
   if(this.name == "Tentacruel")
   {
      this.type[0] = "Water";
      this.type[1] = "Poison";
      this.health = 80;
      this.strength = 70;
      this.defense = 65;
      this.speed = 100;
      this.special = 120;
      this.attack[0] = "Acid()";
      this.attack[1] = "SuperSonic()";
      this.attack[2] = "Wrap()";
	if(level >= 18)
	   this.attack[3] = "PoisonSting()";
	if(level >= 22)
	   this.attack[2] = "WaterGun()";
	if(level >= 27)
	   this.attack[3] = "Constrict()";
	if(level >= 35)
	   this.attack[3] = "Barrier()";
	if(level >= 43)
	   this.attack[1] = "Screech()";
	if(level >= 50)
	   this.attack[2] = "HydroPump()";
      this.xptype = "medium";
	this.xpaward = 205;
	this.catchdif = 60;
      this.breed[0] = 9;
      this.breed[1] = 9;
   }
   if(this.name == "Geodude")
   {
      this.type[0] = "Rock";
      this.type[1] = "Ground";
      this.health = 40;
      this.strength = 80;
      this.defense = 100;
      this.speed = 20;
      this.special = 30;
      this.attack[0] = "Tackle()";
	if(level >= 11)
	   this.attack[1] = "DefenseCurl()";
	if(level >= 16)
	   this.attack[2] = "RockThrow()";
	if(level >= 21)
	   this.attack[3] = "SelfDestruct()";
	if(level >= 26)
	   this.attack[1] = "Harden()";
	if(level >= 31)
	   this.attack[0] = "Earthquake()";
	if(level >= 36)
	   this.attack[3] = "Explosion()";
      this.xptype = "parabolic";
	this.xpaward = 86;
	this.catchdif = 255;
      this.breed[0] = "A";
      this.breed[1] = "A";
   }
   if(this.name == "Graveler")
   {
      this.type[0] = "Rock";
      this.type[1] = "Ground";
      this.health = 55;
      this.strength = 95;
      this.defense = 115;
      this.speed = 35;
      this.special = 45;
      this.attack[0] = "Tackle()";
      this.attack[1] = "DefenseCurl()";
	if(level >= 16)
	   this.attack[2] = "RockThrow()";
	if(level >= 21)
	   this.attack[3] = "SelfDestruct()";
	if(level >= 29)
	   this.attack[1] = "Harden()";
	if(level >= 36)
	   this.attack[0] = "Earthquake()";
	if(level >= 43)
	   this.attack[3] = "Explosion()";
      this.xptype = "parabolic";
	this.xpaward = 134;
	this.catchdif = 120;
      this.breed[0] = "A";
      this.breed[1] = "A";
   }
   if(this.name == "Golem")
   {
      this.type[0] = "Rock";
      this.type[1] = "Ground";
      this.health = 80;
      this.strength = 110;
      this.defense = 130;
      this.speed = 45;
      this.special = 55;
      this.attack[0] = "Tackle()";
      this.attack[1] = "DefenseCurl()";
	if(level >= 16)
	   this.attack[2] = "RockThrow()";
	if(level >= 21)
	   this.attack[3] = "SelfDestruct()";
	if(level >= 29)
	   this.attack[1] = "Harden()";
	if(level >= 36)
	   this.attack[0] = "Earthquake()";
	if(level >= 43)
	   this.attack[3] = "Explosion()";
      this.xptype = "parabolic";
	this.xpaward = 177;
	this.catchdif = 45;
      this.breed[0] = "A";
      this.breed[1] = "A";
   }
   if(this.name == "Ponyta")
   {
      this.type[0] = "Fire";
      this.type[1] = "";
      this.health = 50;
      this.strength = 85;
      this.defense = 55;
      this.speed = 90;
      this.special = 65;
      this.attack[0] = "Ember()";
	if(level >= 30)
	   this.attack[1] = "TailWhip()";
	if(level >= 32)
	   this.attack[2] = "Stomp()";
	if(level >= 35)
	   this.attack[3] = "Growl()";
	if(level >= 39)
	   this.attack[0] = "FireSpin()";
	if(level >= 43)
	   this.attack[2] = "TakeDown()";
	if(level >= 48)
	   this.attack[1] = "Agility()";
      this.xptype = "medium";
	this.xpaward = 152;
	this.catchdif = 190;
      this.breed[0] = 5;
      this.breed[1] = 5;
   }
   if(this.name == "Rapidash")
   {
      this.type[0] = "Fire";
      this.type[1] = "";
      this.health = 65;
      this.strength = 100;
      this.defense = 70;
      this.speed = 105;
      this.special = 80;
      this.attack[0] = "Ember()";
      this.attack[1] = "TailWhip()";
      this.attack[2] = "Stomp()";
      this.attack[3] = "Growl()";
	if(level >= 39)
	   this.attack[0] = "FireSpin()";
	if(level >= 47)
	   this.attack[2] = "TakeDown()";
	if(level >= 55)
	   this.attack[1] = "Agility()";
      this.xptype = "medium";
	this.xpaward = 192;
	this.catchdif = 60;
      this.breed[0] = 5;
      this.breed[1] = 5;
   }
   if(this.name == "Slowpoke")
   {
      this.type[0] = "Water";
      this.type[1] = "Psychic";
      this.health = 90;
      this.strength = 65;
      this.defense = 65;
      this.speed = 15;
      this.special = 40;
      this.attack[0] = "Confusion()";
	if(level >= 18)
	   this.attack[1] = "Disable()";
	if(level >= 22)
	   this.attack[2] = "HeadButt()";
	if(level >= 27)
	   this.attack[3] = "Growl()";
	if(level >= 33)
	   this.attack[2] = "WaterGun()";
	if(level >= 40)
	   this.attack[3] = "Amnesia()";
	if(level >= 48)
	   this.attack[0] = "Psychic()";
      this.xptype = "medium";
	this.xpaward = 99;
	this.catchdif = 190;
      this.breed[0] = 1;
      this.breed[1] = 2;
   }
   if(this.name == "Slowbro")
   {
      this.type[0] = "Water";
      this.type[1] = "Psychic";
      this.health = 95;
      this.strength = 75;
      this.defense = 110;
      this.speed = 30;
      this.special = 80;
      this.attack[0] = "Confusion()";
      this.attack[1] = "Disable()";
      this.attack[2] = "HeadButt()";
	if(level >= 27)
	   this.attack[3] = "Growl()";
	if(level >= 33)
	   this.attack[1] = "Withdraw()";
	if(level >= 37)
	   this.attack[2] = "HeadButt()";
	if(level >= 44)
	   this.attack[3] = "Amnesia()";
	if(level >= 55)
	   this.attack[0] = "Psychic()";
      this.xptype = "medium";
	this.xpaward = 164;
	this.catchdif = 75;
      this.breed[0] = 1;
      this.breed[1] = 2;
   }
   if(this.name == "Magnemite")
   {
      this.type[0] = "Electric";
      this.type[1] = "";
      this.health = 25;
      this.strength = 35;
      this.defense = 70;
      this.speed = 45;
      this.special = 95;
      this.attack[0] = "Tackle()";
	if(level >= 21)
	   this.attack[1] = "SonicBoom()";
	if(level >= 25)
	   this.attack[2] = "ThunderShock()";
	if(level >= 29)
	   this.attack[3] = "SuperSonic()";
	if(level >= 35)
	   this.attack[0] = "ThunderWave()";
	if(level >= 41)
	   this.attack[1] = "Swift()";
	if(level >= 47)
	   this.attack[3] = "Screech()";
      this.xptype = "medium";
	this.xpaward = 89;
	this.catchdif = 190;
      this.breed[0] = "A";
      this.breed[1] = "A";
   }
   if(this.name == "Magneton")
   {
      this.type[0] = "Electric";
      this.type[1] = "";
      this.health = 50;
      this.strength = 60;
      this.defense = 95;
      this.speed = 70;
      this.special = 120;
      this.attack[0] = "Tackle()";
      this.attack[1] = "SonicBoom()";
      this.attack[2] = "ThunderShock()";
	if(level >= 29)
	   this.attack[3] = "SuperSonic()";
	if(level >= 38)
	   this.attack[0] = "ThunderWave()";
	if(level >= 46)
	   this.attack[1] = "Swift()";
	if(level >= 54)
	   this.attack[3] = "Screech()";
      this.xptype = "medium";
	this.xpaward = 161;
	this.catchdif = 60;
      this.breed[0] = "A";
      this.breed[1] = "A";
   }
   if(this.name == "Farfetch\'d")
   {
      this.type[0] = "Normal";
      this.type[1] = "Flying";
      this.health = 52;
      this.strength = 65;
      this.defense = 55;
      this.speed = 60;
      this.special = 58;
      this.attack[0] = "Peck()";
      this.attack[1] = "SandAttack()";
	if(level >= 7)
	   this.attack[2] = "Leer()";
	if(level >= 15)
	   this.attack[3] = "FuryAttack()";
	if(level >= 27)
	   this.attack[2] = "SwordsDance()";
	if(level >= 31)
	   this.attack[1] = "Agility()";
	if(level >= 39)
	   this.attack[3] = "Slash()";
      this.xptype = "medium";
	this.xpaward = 94;
	this.catchdif = 45;
      this.breed[0] = 4;
      this.breed[1] = 5;
   }
   if(this.name == "Doduo")
   {
      this.type[0] = "Normal";
      this.type[1] = "Flying";
      this.health = 35;
      this.strength = 85;
      this.defense = 45;
      this.speed = 75;
      this.special = 35;
      this.attack[0] = "Peck()";
	if(level >= 20)
	   this.attack[1] = "Growl()";
	if(level >= 24)
	   this.attack[2] = "FuryAttack()";
	if(level >= 30)
	   this.attack[3] = "DrillPeck()";
	if(level >= 36)
	   this.attack[0] = "Rage()";
	if(level >= 40)
	   this.attack[2] = "TriAttack()";
	if(level >= 44)
	   this.attack[1] = "Agility()";
      this.xptype = "medium";
	this.xpaward = 96;
	this.catchdif = 190;
      this.breed[0] = 4;
      this.breed[1] = 4;
   }
   if(this.name == "Dodrio")
   {
      this.type[0] = "Normal";
      this.type[1] = "Flying";
      this.health = 60;
      this.strength = 110;
      this.defense = 70;
      this.speed = 100;
      this.special = 60;
      this.attack[0] = "Peck()";
      this.attack[1] = "Growl()";
      this.attack[2] = "FuryAttack()";
	if(level >= 30)
	   this.attack[3] = "DrillPeck()";
	if(level >= 39)
	   this.attack[0] = "Rage()";
	if(level >= 46)
	   this.attack[2] = "TriAttack()";
	if(level >= 51)
	   this.attack[1] = "Agility()";
      this.xptype = "medium";
	this.xpaward = 158;
	this.catchdif = 45;
      this.breed[0] = 4;
      this.breed[1] = 4;
   }
   if(this.name == "Seel")
   {
      this.type[0] = "Water";
      this.type[1] = "";
      this.health = 65;
      this.strength = 45;
      this.defense = 55;
      this.speed = 45;
      this.special = 70;
      this.attack[0] = "HeadButt()";
	if(level >= 30)
	   this.attack[1] = "Growl()";
	if(level >= 35)
	   this.attack[2] = "AuroraBeam()";
	if(level >= 40)
	   this.attack[3] = "Rest()";
	if(level >= 45)
	   this.attack[0] = "TakeDown()";
	if(level >= 50)
	   this.attack[2] = "IceBeam()";
      this.xptype = "medium";
	this.xpaward = 100;
	this.catchdif = 190;
      this.breed[0] = 2;
      this.breed[1] = 5;
   }
   if(this.name == "Dewgong")
   {
      this.type[0] = "Water";
      this.type[1] = "Ice";
      this.health = 90;
      this.strength = 70;
      this.defense = 80;
      this.speed = 70;
      this.special = 95;
      this.attack[0] = "HeadButt()";
      this.attack[1] = "Growl()";
      this.attack[2] = "AuroraBeam()";
	if(level >= 44)
	   this.attack[3] = "Rest()";
	if(level >= 50)
	   this.attack[0] = "TakeDown()";
	if(level >= 56)
	   this.attack[2] = "IceBeam()";
      this.xptype = "medium";
	this.xpaward = 176;
	this.catchdif = 75;
      this.breed[0] = 2;
      this.breed[1] = 5;
   }
   if(this.name == "Grimer")
   {
      this.type[0] = "Poison";
      this.type[1] = "";
      this.health = 80;
      this.strength = 80;
      this.defense = 50;
      this.speed = 25;
      this.special = 40;
      this.attack[0] = "Pound()";
      this.attack[1] = "Disable()";
	if(level >= 30)
	   this.attack[2] = "PoisonGas()";
	if(level >= 33)
	   this.attack[3] = "Minimize()";
	if(level >= 37)
	   this.attack[0] = "Sludge()";
	if(level >= 42)
	   this.attack[2] = "Harden()";
	if(level >= 48)
	   this.attack[1] = "Screech()";
	if(level >= 55)
	   this.attack[2] = "AcidArmor()";
      this.xptype = "medium";
	this.xpaward = 90;
	this.catchdif = 190;
      this.breed[0] = "B";
      this.breed[1] = "B";
   }
   if(this.name == "Muk")
   {
      this.type[0] = "Poison";
      this.type[1] = "";
      this.health = 105;
      this.strength = 105;
      this.defense = 75;
      this.speed = 50;
      this.special = 65;
      this.attack[0] = "Pound()";
      this.attack[1] = "Disable()";
      this.attack[2] = "PoisonGas()";
	if(level >= 33)
	   this.attack[3] = "Minimize()";
	if(level >= 37)
	   this.attack[0] = "Sludge()";
	if(level >= 45)
	   this.attack[2] = "Harden()";
	if(level >= 53)
	   this.attack[1] = "Screech()";
	if(level >= 60)
	   this.attack[2] = "AcidArmor()";
      this.xptype = "medium";
	this.xpaward = 157;
	this.catchdif = 75;
      this.breed[0] = "B";
      this.breed[1] = "B";
   }
   if(this.name == "Shellder")
   {
      this.type[0] = "Water";
      this.type[1] = "";
      this.health = 30;
      this.strength = 65;
      this.defense = 100;
      this.speed = 40;
      this.special = 45;
      this.attack[0] = "Tackle()";
      this.attack[1] = "Withdraw()";
	if(level >= 18)
	   this.attack[2] = "SuperSonic()";
	if(level >= 23)
	   this.attack[3] = "Clamp()";
	if(level >= 30)
	   this.attack[0] = "AuroraBeam()";
	if(level >= 39)
	   this.attack[1] = "Leer()";
	if(level >= 50)
	   this.attack[0] = "IceBeam()";
      this.xptype = "slow";
	this.xpaward = 97;
	this.catchdif = 190;
      this.breed[0] = 9;
      this.breed[1] = 9;
   }
   if(this.name == "Cloyster")
   {
      this.type[0] = "Water";
      this.type[1] = "Ice";
      this.health = 50;
      this.strength = 85;
      this.defense = 180;
      this.speed = 70;
      this.special = 85;
      this.attack[0] = "Clamp()";
      this.attack[1] = "SuperSonic()";
      this.attack[2] = "AuroraBeam()";
      this.attack[3] = "Withdraw()";
	if(level >= 50)
	   this.attack[2] = "SpikeCannon()";
      this.xptype = "slow";
	this.xpaward = 203;
	this.catchdif = 60;
      this.breed[0] = 9;
      this.breed[1] = 9;
   }
   if(this.name == "Gastly")
   {
      this.type[0] = "Ghost";
      this.type[1] = "Poison";
      this.health = 30;
      this.strength = 35;
      this.defense = 30;
      this.speed = 80;
      this.special = 100;
      this.attack[0] = "Lick()";
      this.attack[1] = "NightShade()";
      this.attack[2] = "ConfuseRay()";
	if(level >= 27)
	   this.attack[3] = "Hypnosis()";
	if(level >= 35)
	   this.attack[0] = "DreamEater()";
      this.xptype = "parabolic";
	this.xpaward = 95;
	this.catchdif = 190;
      this.breed[0] = "B";
      this.breed[1] = "B";
   }
   if(this.name == "Haunter")
   {
      this.type[0] = "Ghost";
      this.type[1] = "Poison";
      this.health = 45;
      this.strength = 50;
      this.defense = 45;
      this.speed = 95;
      this.special = 115;
      this.attack[0] = "Lick()";
      this.attack[1] = "NightShade()";
      this.attack[2] = "ConfuseRay()";
	if(level >= 29)
	   this.attack[3] = "Hypnosis()";
	if(level >= 38)
	   this.attack[0] = "DreamEater()";
      this.xptype = "parabolic";
	this.xpaward = 126;
	this.catchdif = 90;
      this.breed[0] = "B";
      this.breed[1] = "B";
   }
   if(this.name == "Gengar")
   {
      this.type[0] = "Ghost";
      this.type[1] = "Poison";
      this.health = 60;
      this.strength = 65;
      this.defense = 60;
      this.speed = 110;
      this.special = 130;
      this.attack[0] = "Lick()";
      this.attack[1] = "NightShade()";
      this.attack[2] = "ConfuseRay()";
	if(level >= 29)
	   this.attack[3] = "Hypnosis()";
	if(level >= 38)
	   this.attack[0] = "DreamEater()";
      this.xptype = "parabolic";
	this.xpaward = 190;
	this.catchdif = 45;
      this.breed[0] = "B";
      this.breed[1] = "B";
   }
   if(this.name == "Onix")
   {
      this.type[0] = "Rock";
      this.type[1] = "Ground";
      this.health = 35;
      this.strength = 45;
      this.defense = 160;
      this.speed = 70;
      this.special = 30;
      this.attack[0] = "Tackle()";
      this.attack[1] = "Screech()";
	if(level >= 15)
	   this.attack[2] = "Bind()";
	if(level >= 19)
	   this.attack[3] = "RockThrow()";
	if(level >= 25)
	   this.attack[0] = "Rage()";
	if(level >= 33)
	   this.attack[2] = "Slam()";
	if(level >= 43)
	   this.attack[0] = "Harden()";
      this.xptype = "medium";
	this.xpaward = 108;
	this.catchdif = 45;
      this.breed[0] = "A";
      this.breed[1] = "A";
   }
   if(this.name == "Drowzee")
   {
      this.type[0] = "Psychic";
      this.type[1] = "";
      this.health = 60;
      this.strength = 48;
      this.defense = 45;
      this.speed = 42;
      this.special = 90;
      this.attack[0] = "Pound()";
      this.attack[1] = "Hypnosis()";
	if(level >= 12)
	   this.attack[2] = "Disable()";
	if(level >= 17)
	   this.attack[3] = "Confusion()";
	if(level >= 24)
	   this.attack[0] = "HeadButt()";
	if(level >= 29)
	   this.attack[2] = "PoisonGas()";
	if(level >= 32)
	   this.attack[3] = "Psychic()";
	if(level >= 37)
	   this.attack[2] = "Meditate()";
      this.xptype = "medium";
	this.xpaward = 190;
	this.catchdif = 45;
      this.breed[0] = 8;
      this.breed[1] = 8;
   }
   if(this.name == "Hypno")
   {
      this.type[0] = "Psychic";
      this.type[1] = "";
      this.health = 85;
      this.strength = 73;
      this.defense = 70;
      this.speed = 67;
      this.special = 115;
      this.attack[0] = "Pound()";
      this.attack[1] = "Hypnosis()";
      this.attack[2] = "Disable()";
      this.attack[3] = "Confusion()";
	if(level >= 24)
	   this.attack[0] = "HeadButt()";
	if(level >= 33)
	   this.attack[2] = "PoisonGas()";
	if(level >= 37)
	   this.attack[3] = "Psychic()";
	if(level >= 43)
	   this.attack[2] = "Meditate()";
      this.xptype = "medium";
	this.xpaward = 165;
	this.catchdif = 75;
      this.breed[0] = 8;
      this.breed[1] = 8;
   }
   if(this.name == "Krabby")
   {
      this.type[0] = "Water";
      this.type[1] = "";
      this.health = 30;
      this.strength = 105;
      this.defense = 90;
      this.speed = 50;
      this.special = 25;
      this.attack[0] = "Bubble()";
      this.attack[1] = "Leer()";
	if(level >= 20)
	   this.attack[2] = "ViceGrip()";
	if(level >= 25)
	   this.attack[3] = "Guillotine()";
	if(level >= 30)
	   this.attack[2] = "Stomp()";
	if(level >= 35)
	   this.attack[0] = "CrabHammer()";
	if(level >= 40)
	   this.attack[1] = "Harden()";
      this.xptype = "medium";
	this.xpaward = 115;
	this.catchdif = 225;
      this.breed[0] = 9;
      this.breed[1] = 9;
   }
   if(this.name == "Kingler")
   {
      this.type[0] = "Water";
      this.type[1] = "";
      this.health = 55;
      this.strength = 130;
      this.defense = 115;
      this.speed = 75;
      this.special = 50;
      this.attack[0] = "Bubble()";
      this.attack[1] = "Leer()";
	if(level >= 20)
	   this.attack[2] = "ViceGrip()";
	if(level >= 25)
	   this.attack[3] = "Guillotine()";
	if(level >= 34)
	   this.attack[2] = "Stomp()";
	if(level >= 42)
	   this.attack[0] = "CrabHammer()";
	if(level >= 49)
	   this.attack[1] = "Harden()";
      this.xptype = "medium";
	this.xpaward = 206;
	this.catchdif = 60;
      this.breed[0] = 9;
      this.breed[1] = 9;
   }
   if(this.name == "Voltorb")
   {
      this.type[0] = "Electric";
      this.type[1] = "";
      this.health = 40;
      this.strength = 30;
      this.defense = 50;
      this.speed = 100;
      this.special = 55;
      this.attack[0] = "Tackle()";
      this.attack[1] = "Screech()";
	if(level >= 17)
	   this.attack[2] = "SonicBoom()";
	if(level >= 22)
	   this.attack[3] = "SelfDestruct()";
	if(level >= 29)
	   this.attack[0] = "LightScreen()";
	if(level >= 36)
	   this.attack[2] = "Swift()";
	if(level >= 43)
	   this.attack[3] = "Explosion()";
      this.xptype = "medium";
	this.xpaward = 103;
	this.catchdif = 190;
      this.breed[0] = "A";
      this.breed[1] = "A";
   }
   if(this.name == "Electrode")
   {
      this.type[0] = "Electric";
      this.type[1] = "";
      this.health = 60;
      this.strength = 50;
      this.defense = 70;
      this.speed = 140;
      this.special = 80;
      this.attack[0] = "Tackle()";
      this.attack[1] = "Screech()";
      this.attack[2] = "SonicBoom()";
	if(level >= 22)
	   this.attack[3] = "SelfDestruct()";
	if(level >= 29)
	   this.attack[0] = "LightScreen()";
	if(level >= 40)
	   this.attack[2] = "Swift()";
	if(level >= 50)
	   this.attack[3] = "Explosion()";
      this.xptype = "medium";
	this.xpaward = 150;
	this.catchdif = 60;
      this.breed[0] = "A";
      this.breed[1] = "A";
   }
   if(this.name == "Exeggcute")
   {
      this.type[0] = "Grass";
      this.type[1] = "Psychic";
      this.health = 60;
      this.strength = 40;
      this.defense = 80;
      this.speed = 40;
      this.special = 60;
      this.attack[0] = "Barrage()";
      this.attack[1] = "Hypnosis()";
	if(level >= 25)
	   this.attack[2] = "Reflect()";
	if(level >= 28)
	   this.attack[3] = "LeechSeed()";
	if(level >= 32)
	   this.attack[1] = "StunSpore()";
	if(level >= 37)
	   this.attack[1] = "PoisonPowder()";
	if(level >= 42)
	   this.attack[0] = "SolarBeam()";
	if(level >= 48)
	   this.attack[1] = "SleepPowder()";
      this.xptype = "slow";
	this.xpaward = 98;
	this.catchdif = 90;
      this.breed[0] = 7;
      this.breed[1] = 7;
   }
   if(this.name == "Exeggutor")
   {
      this.type[0] = "Grass";
      this.type[1] = "Psychic";
      this.health = 95;
      this.strength = 95;
      this.defense = 85;
      this.speed = 55;
      this.special = 125;
      this.attack[0] = "Barrage()";
      this.attack[1] = "Hypnosis()";
	if(level >= 28)
	   this.attack[2] = "Stomp()";
      this.xptype = "slow";
	this.xpaward = 212;
	this.catchdif = 45;
      this.breed[0] = 7;
      this.breed[1] = 7;
   }
   if(this.name == "Cubone")
   {
      this.type[0] = "Ground";
      this.type[1] = "";
      this.health = 50;
      this.strength = 50;
      this.defense = 85;
      this.speed = 35;
      this.special = 40;
      this.attack[0] = "BoneClub()";
	if(level >= 10)
	   this.attack[1] = "Growl()";
	if(level >= 13)
	   this.attack[2] = "TailWhip()";
	if(level >= 16)
	   this.attack[3] = "HeadButt()";
	if(level >= 25)
	   this.attack[2] = "Leer()";
	if(level >= 31)
	   this.attack[1] = "FocusEnergy()";
	if(level >= 38)
	   this.attack[3] = "Thrash()";
	if(level >= 43)
	   this.attack[0] = "Bonemerang()";
	if(level >= 46)
	   this.attack[2] = "Rage()";
      this.xptype = "medium";
	this.xpaward = 87;
	this.catchdif = 190;
      this.breed[0] = 1;
      this.breed[1] = 1;
   }
   if(this.name == "Marowak")
   {
      this.type[0] = "Ground";
      this.type[1] = "";
      this.health = 60;
      this.strength = 80;
      this.defense = 110;
      this.speed = 45;
      this.special = 50;
	if(level >= 10)
	   this.attack[1] = "Growl()";
	if(level >= 13)
	   this.attack[2] = "TailWhip()";
	if(level >= 16)
	   this.attack[3] = "HeadButt()";
	if(level >= 25)
	   this.attack[2] = "Leer()";
	if(level >= 33)
	   this.attack[1] = "FocusEnergy()";
	if(level >= 41)
	   this.attack[3] = "Thrash()";
	if(level >= 48)
	   this.attack[0] = "Bonemerang()";
	if(level >= 55)
	   this.attack[2] = "Rage()";
      this.xptype = "medium";
	this.xpaward = 124;
	this.catchdif = 75;
      this.breed[0] = 1;
      this.breed[1] = 1;
   }
   if(this.name == "Hitmonlee")
   {
      this.type[0] = "Fighting";
      this.type[1] = "";
      this.health = 50;
      this.strength = 120;
      this.defense = 53;
      this.speed = 87;
      this.special = 35;
      this.attack[0] = "DoubleKick()";
      this.attack[1] = "Meditate()";
	if(level >= 33)
	   this.attack[2] = "RollingKick()";
	if(level >= 38)
	   this.attack[3] = "JumpKick()";
	if(level >= 43)
	   this.attack[0] = "FocusEnergy()";
	if(level >= 48)
	   this.attack[3] = "HighJumpKick()";
	if(level >= 53)
	   this.attack[1] = "MegaKick()";
      this.xptype = "medium";
	this.xpaward = 139;
	this.catchdif = 45;
      this.breed[0] = 8;
      this.breed[1] = 8;
   }
   if(this.name == "Hitmonchan")
   {
      this.type[0] = "Fighting";
      this.type[1] = "";
      this.health = 50;
      this.strength = 105;
      this.defense = 79;
      this.speed = 76;
      this.special = 35;
      this.attack[0] = "CometPunch()";
      this.attack[1] = "Agility()";
	if(level >= 33)
	   this.attack[2] = "FirePunch()";
	if(level >= 38)
	   this.attack[3] = "IcePunch()";
	if(level >= 43)
	   this.attack[2] = "ThunderPunch()";
	if(level >= 48)
	   this.attack[0] = "MegaPunch()";
	if(level >= 53)
	   this.attack[2] = "Counter()";
      this.xptype = "medium";
	this.xpaward = 140;
	this.catchdif = 45;
      this.breed[0] = 8;
      this.breed[1] = 8;
   }
   if(this.name == "Lickitung")
   {
      this.type[0] = "Normal";
      this.type[1] = "";
      this.health = 90;
      this.strength = 55;
      this.defense = 75;
      this.speed = 30;
      this.special = 60;
      this.attack[0] = "Wrap()";
      this.attack[1] = "SuperSonic()";
	if(level >= 7)
         this.attack[2] = "Stomp()";
	if(level >= 15)
         this.attack[3] = "Disable()";
	if(level >= 23)
         this.attack[3] = "DefenseCurl()";
	if(level >= 31)
         this.attack[2] = "Slam()";
	if(level >= 39)
         this.attack[1] = "Screech()";
      this.xptype = "medium";
	this.xpaward = 127;
	this.catchdif = 45;
	this.catchdif = 45;
      this.breed[0] = 1;
      this.breed[1] = 1;
   }
   if(this.name == "Koffing")
   {
      this.type[0] = "Poison";
      this.type[1] = "";
      this.health = 40;
      this.strength = 65;
      this.defense = 95;
      this.speed = 35;
      this.special = 60;
      this.attack[0] = "Tackle()";
      this.attack[1] = "Smog()";
	if(level >= 32)
	   this.attack[2] = "Sludge()";
	if(level >= 37)
	   this.attack[3] = "SmokeScreen()";
	if(level >= 40)
	   this.attack[1] = "SelfDestruct()";
	if(level >= 45)
	   this.attack[0] = "Haze()";
	if(level >= 48)
	   this.attack[1] = "Explosion()";
      this.xptype = "medium";
	this.xpaward = 114;
	this.catchdif = 190;
      this.breed[0] = "B";
      this.breed[1] = "B";
   }
   if(this.name == "Weezing")
   {
      this.type[0] = "Poison";
      this.type[1] = "";
      this.health = 65;
      this.strength = 90;
      this.defense = 120;
      this.speed = 60;
      this.special = 85;
      this.attack[0] = "Tackle()";
      this.attack[1] = "Smog()";
      this.attack[2] = "Sludge()";
	if(level >= 39)
	   this.attack[3] = "SmokeScreen()";
	if(level >= 43)
	   this.attack[1] = "SelfDestruct()";
	if(level >= 49)
	   this.attack[0] = "Haze()";
	if(level >= 53)
	   this.attack[1] = "Explosion()";
      this.xptype = "medium";
	this.xpaward = 173;
	this.catchdif = 60;
      this.breed[0] = "B";
      this.breed[1] = "B";
   }
   if(this.name == "Rhyhorn")
   {
      this.type[0] = "Rock";
      this.type[1] = "Ground";
      this.health = 80;
      this.strength = 85;
      this.defense = 95;
      this.speed = 25;
      this.special = 30;
      this.attack[0] = "HornAttack()";
	if(level >= 30)
	   this.attack[1] = "Stomp()";
	if(level >= 35)
	   this.attack[2] = "TailWhip()";
	if(level >= 40)
	   this.attack[3] = "FuryAttack()";
	if(level >= 45)
	   this.attack[0] = "HornDrill()";
	if(level >= 50)
	   this.attack[2] = "Leer()";
	if(level >= 55)
	   this.attack[1] = "TakeDown()";
      this.xptype = "slow";
	this.xpaward = 135;
	this.catchdif = 120;
      this.breed[0] = 1;
      this.breed[1] = 5;
   }
   if(this.name == "Rhydon")
   {
      this.type[0] = "Ground";
      this.type[1] = "Rock";
      this.health = 105;
      this.strength = 130;
      this.defense = 120;
      this.speed = 40;
      this.special = 45;
      this.attack[0] = "HornAttack()";
      this.attack[1] = "Stomp()";
      this.attack[2] = "TailWhip()";
      this.attack[3] = "FuryAttack()";
	if(level >= 48)
	   this.attack[0] = "HornDrill()";
	if(level >= 55)
	   this.attack[2] = "Leer()";
	if(level >= 64)
	   this.attack[1] = "TakeDown()";
      this.xptype = "slow";
	this.xpaward = 204;
	this.catchdif = 60;
      this.breed[0] = 1;
      this.breed[1] = 5;
   }
   if(this.name == "Chansey")
   {
      this.type[0] = "Normal";
      this.type[1] = "";
      this.health = 250;
      this.strength = 5;
      this.defense = 5;
      this.speed = 50;
      this.special = 105;
      this.attack[0] = "Pound()";
      this.attack[1] = "TailWhip()";
	if(level >= 12)
	   this.attack[2] = "DoubleSlap()";
	if(level >= 24)
	   this.attack[3] = "Sing()";
	if(level >= 30)
	   this.attack[0] = "Growl()";
	if(level >= 38)
	   this.attack[1] = "Minimize()";
	if(level >= 44)
	   this.attack[0] = "DefenseCurl()";
	if(level >= 48)
	   this.attack[3] = "LightScreen()";
	if(level >= 54)
	   this.attack[2] = "DoubleEdge()";
      this.xptype = "fast";
	this.xpaward = 255;
	this.catchdif = 30;
      this.breed[0] = 6;
      this.breed[1] = 6;
   }
   if(this.name == "Tangela")
   {
      this.type[0] = "Grass";
      this.type[1] = "";
      this.health = 65;
      this.strength = 55;
      this.defense = 115;
      this.speed = 60;
      this.special = 100;
      this.attack[0] = "Constrict()";
	if(level >= 24)
	   this.attack[1] = "Bind()";
	if(level >= 27)
	   this.attack[2] = "Absorb()";
	if(level >= 29)
	   this.attack[3] = "VineWhip()";
	if(level >= 32)
	   this.attack[0] = "PoisonPowder()";
	if(level >= 36)
	   this.attack[0] = "StunSpore()";
	if(level >= 39)
	   this.attack[0] = "SleepPowder()";
	if(level >= 45)
	   this.attack[1] = "Slam()";
	if(level >= 48)
	   this.attack[2] = "Growth()";
      this.xptype = "medium";
	this.xpaward = 166;
	this.catchdif = 45;
      this.breed[0] = 7;
      this.breed[1] = 7;
   }
   if(this.name == "Kangaskhan")
   {
      this.type[0] = "Normal";
      this.type[1] = "";
      this.health = 105;
      this.strength = 95;
      this.defense = 80;
      this.speed = 90;
      this.special = 40;
      this.attack[0] = "CometPunch()";
      this.attack[1] = "Rage()";
	if(level >= 26)
	   this.attack[2] = "Bite()";
	if(level >= 31)
	   this.attack[3] = "TailWhip()";
	if(level >= 36)
	   this.attack[1] = "MegaPunch()";
	if(level >= 41)
	   this.attack[3] = "Leer()";
	if(level >= 46)
	   this.attack[2] = "DizzyPunch()";
      this.xptype = "medium";
	this.xpaward = 175;
	this.catchdif = 45;
      this.breed[0] = 1;
      this.breed[1] = 1;
   }
   if(this.name == "Horsea")
   {
      this.type[0] = "Water";
      this.type[1] = "";
      this.health = 30;
      this.strength = 40;
      this.defense = 70;
      this.speed = 60;
      this.special = 70;
      this.attack[0] = "Bubble()";
	if(level >= 19)
	   this.attack[1] = "SmokeScreen()";
	if(level >= 24)
	   this.attack[2] = "Leer()";
	if(level >= 30)
	   this.attack[3] = "WaterGun()";
	if(level >= 37)
	   this.attack[0] = "Agility()";
	if(level >= 45)
	   this.attack[2] = "HydroPump()";
      this.xptype = "medium";
	this.xpaward = 83;
	this.catchdif = 225;
      this.breed[0] = 2;
      this.breed[1] = "E";
   }
   if(this.name == "Seadra")
   {
      this.type[0] = "Water";
      this.type[1] = "";
      this.health = 55;
      this.strength = 65;
      this.defense = 95;
      this.speed = 85;
      this.special = 95;
      this.attack[0] = "Bubble()";
      this.attack[1] = "SmokeScreen()";
	if(level >= 24)
	   this.attack[2] = "Leer()";
	if(level >= 30)
	   this.attack[3] = "WaterGun()";
	if(level >= 41)
	   this.attack[0] = "Agility()";
	if(level >= 52)
	   this.attack[2] = "HydroPump()";
      this.xptype = "medium";
	this.xpaward = 155;
	this.catchdif = 75;
      this.breed[0] = 2;
      this.breed[1] = "E";
   }
   if(this.name == "Goldeen")
   {
      this.type[0] = "Water";
      this.type[1] = "";
      this.health = 45;
      this.strength = 67;
      this.defense = 60;
      this.speed = 63;
      this.special = 50;
      this.attack[0] = "Peck()";
      this.attack[1] = "TailWhip()";
	if(level >= 19)
	   this.attack[2] = "SuperSonic()";
	if(level >= 24)
	   this.attack[3] = "HornAttack()";
	if(level >= 30)
	   this.attack[0] = "FuryAttack()";
	if(level >= 37)
	   this.attack[3] = "Waterfall()";
	if(level >= 45)
	   this.attack[1] = "HornDrill()";
	if(level >= 54)
	   this.attack[2] = "Agility()";
      this.xptype = "medium";
	this.xpaward = 111;
	this.catchdif = 225;
      this.breed[0] = "C";
      this.breed[1] = "C";
   }
   if(this.name == "Seaking")
   {
      this.type[0] = "Water";
      this.type[1] = "";
      this.health = 80;
      this.strength = 92;
      this.defense = 65;
      this.speed = 68;
      this.special = 80;
      this.attack[0] = "Peck()";
      this.attack[1] = "TailWhip()";
      this.attack[2] = "SuperSonic()";
	if(level >= 24)
	   this.attack[3] = "HornAttack()";
	if(level >= 30)
	   this.attack[0] = "FuryAttack()";
	if(level >= 39)
	   this.attack[3] = "Waterfall()";
	if(level >= 48)
	   this.attack[1] = "HornDrill()";
	if(level >= 54)
	   this.attack[2] = "Agility()";
      this.xptype = "medium";
	this.xpaward = 170;
	this.catchdif = 60;
      this.breed[0] = "C";
      this.breed[1] = "C";
   }
   if(this.name == "Staryu")
   {
      this.type[0] = "Water";
      this.type[1] = "";
      this.health = 30;
      this.strength = 45;
      this.defense = 55;
      this.speed = 85;
      this.special = 70;
      this.attack[0] = "Tackle()";
	if(level >= 17)
	   this.attack[1] = "WaterGun()";
	if(level >= 22)
	   this.attack[2] = "Harden()";
	if(level >= 27)
	   this.attack[3] = "Recover()";
	if(level >= 32)
	   this.attack[0] = "Swift()";
	if(level >= 37)
	   this.attack[2] = "Minimize()";
	if(level >= 42)
	   this.attack[2] = "LightScreen()";
	if(level >= 47)
	   this.attack[1] = "HydroPump()";
      this.xptype = "medium";
	this.xpaward = 106;
	this.catchdif = 225;
      this.breed[0] = 9;
      this.breed[1] = 9;
   }
   if(this.name == "Starmie")
   {
      this.type[0] = "Water";
      this.type[1] = "Psychic";
      this.health = 60;
      this.strength = 75;
      this.defense = 85;
      this.speed = 115;
      this.special = 100;
      this.attack[0] = "Tackle()";
      this.attack[1] = "WaterGun()";
      this.attack[2] = "Harden()";
      this.xptype = "medium";
	this.xpaward = 207;
	this.catchdif = 60;
      this.breed[0] = 9;
      this.breed[1] = 9;
   }
   if(this.name == "Mr.Mime")
   {
      this.type[0] = "Psychic";
      this.type[1] = "";
      this.health = 40;
      this.strength = 45;
      this.defense = 65;
      this.speed = 90;
      this.special = 100;
      this.attack[0] = "Confusion()";
      this.attack[1] = "Barrier()";
	if(level >= 23)
	   this.attack[2] = "LightScreen()";
	if(level >= 31)
	   this.attack[3] = "DoubleSlap()";
	if(level >= 39)
	   this.attack[2] = "Meditate()";
	if(level >= 47)
	   this.attack[3] = "Substitute()";
      this.xptype = "medium";
	this.xpaward = 136;
	this.catchdif = 45;
      this.breed[0] = 8;
      this.breed[1] = 8;
   }
   if(this.name == "Scyther")
   {
      this.type[0] = "Bug";
      this.type[1] = "Flying";
      this.health = 70;
      this.strength = 110;
      this.defense = 80;
      this.speed = 105;
      this.special = 55;
      this.attack[0] = "QuickAttack()";
	if(level >= 17)
	   this.attack[1] = "Leer()";
	if(level >= 20)
	   this.attack[2] = "FocusEnergy()";
	if(level >= 24)
	   this.attack[3] = "DoubleTeam()";
	if(level >= 29)
	   this.attack[0] = "Slash()";
	if(level >= 35)
	   this.attack[2] = "SwordsDance()";
	if(level >= 42)
	   this.attack[1] = "Agility()";
	if(level >= 50)
	   this.attack[0] = "WingAttack()";
      this.xptype = "medium";
	this.xpaward = 187;
	this.catchdif = 45;
      this.breed[0] = 3;
      this.breed[1] = 3;
   }
   if(this.name == "Jynx")
   {
      this.type[0] = "Ice";
      this.type[1] = "Psychic";
      this.health = 65;
      this.strength = 50;
      this.defense = 35;
      this.speed = 95;
      this.special = 95;
      this.attack[0] = "Pound()";
      this.attack[1] = "LovelyKiss()";
	if(level >= 18)
	   this.attack[2] = "Lick()";
	if(level >= 23)
	   this.attack[3] = "DoubleSlap()";
	if(level >= 31)
	   this.attack[0] = "IcePunch()";
	if(level >= 39)
	   this.attack[2] = "BodySlam()";
	if(level >= 47)
	   this.attack[3] = "Thrash()";
	if(level >= 58)
	   this.attack[2] = "Blizzard()";
      this.xptype = "medium";
	this.xpaward = 137;
	this.catchdif = 45;
      this.breed[0] = 8;
      this.breed[1] = 8;
   }
   if(this.name == "Electabuzz")
   {
      this.type[0] = "Electric";
      this.type[1] = "";
      this.health = 65;
      this.strength = 83;
      this.defense = 57;
      this.speed = 105;
      this.special = 85;
      this.attack[0] = "QuickAttack()";
      this.attack[1] = "Leer()";
	if(level >= 34)
	   this.attack[2] = "ThunderShock()";
	if(level >= 37)
	   this.attack[3] = "Screech()";
	if(level >= 42)
	   this.attack[1] = "ThunderPunch()";
	if(level >= 49)
	   this.attack[2] = "LightScreen()";
	if(level >= 54)
	   this.attack[1] = "Thunder()";
      this.xptype = "medium";
	this.xpaward = 156;
	this.catchdif = 45;
      this.breed[0] = 8;
      this.breed[1] = 8;
   }
   if(this.name == "Magmar")
   {
      this.type[0] = "Fire";
      this.type[1] = "";
      this.health = 65;
      this.strength = 95;
      this.defense = 57;
      this.speed = 93;
      this.special = 85;
      this.attack[0] = "Ember()";
	if(level >= 36)
	   this.attack[1] = "Leer()";
	if(level >= 39)
	   this.attack[2] = "ConfuseRay()";
	if(level >= 43)
	   this.attack[3] = "FirePunch()";
	if(level >= 48)
	   this.attack[0] = "SmokeScreen()";
	if(level >= 52)
	   this.attack[1] = "Smog()";
	if(level >= 55)
	   this.attack[3] = "FlameThrower()";
      this.xptype = "medium";
	this.xpaward = 167;
	this.catchdif = 45;
      this.breed[0] = 8;
      this.breed[1] = 8;
   }
   if(this.name == "Pinsir")
   {
      this.type[0] = "Bug";
      this.type[1] = "";
      this.health = 65;
      this.strength = 125;
      this.defense = 100;
      this.speed = 85;
      this.special = 55;
      this.attack[0] = "ViceGrip()";
	if(level >= 21)
	   this.attack[1] = "Bind()";
	if(level >= 25)
	   this.attack[2] = "SeismicToss()";
	if(level >= 30)
	   this.attack[3] = "Guillotine()";
	if(level >= 36)
	   this.attack[0] = "FocusEnergy()";
	if(level >= 43)
	   this.attack[2] = "Harden()";
	if(level >= 49)
	   this.attack[1] = "Slash()";
	if(level >= 54)
	   this.attack[0] = "SwordsDance()";
      this.xptype = "slow";
	this.xpaward = 200;
	this.catchdif = 45;
      this.breed[0] = 3;
      this.breed[1] = 3;
   }
   if(this.name == "Tauros")
   {
      this.type[0] = "Normal";
      this.type[1] = "";
      this.health = 75;
      this.strength = 100;
      this.defense = 95;
      this.speed = 110;
      this.special = 70;
      this.attack[0] = "Tackle()";
	if(level >= 21)
	   this.attack[1] = "Stomp()";
	if(level >= 28)
	   this.attack[2] = "TailWhip()";
	if(level >= 35)
	   this.attack[3] = "Leer()";
	if(level >= 44)
	   this.attack[0] = "Rage()";
	if(level >= 51)
	   this.attack[2] = "TakeDown()";
      this.xptype = "slow";
	this.xpaward = 211;
	this.catchdif = 45;
      this.breed[0] = 5;
      this.breed[1] = 5;
   }
   if(this.name == "Magikarp")
   {
      this.type[0] = "Water";
      this.type[1] = "";
      this.health = 20;
      this.strength = 10;
      this.defense = 55;
      this.speed = 80;
      this.special = 20;
      this.attack[0] = "Splash()";
	if(level >= 15)
	   this.attack[1] = "Tackle()";
      this.xptype = "slow";
	this.xpaward = 20;
	this.catchdif = 255;
      this.breed[0] = "C";
      this.breed[1] = "E";
   }
   if(this.name == "Gyarados")
   {
      this.type[0] = "Water";
      this.type[1] = "Flying";
      this.health = 95;
      this.strength = 125;
      this.defense = 79;
      this.speed = 81;
      this.special = 100;
      this.attack[0] = "Tackle()";
	if(level >= 20)
	   this.attack[1] = "Bite()";
	if(level >= 25)
	   this.attack[2] = "DragonRage()";
	if(level >= 32)
	   this.attack[3] = "Leer()";
	if(level >= 41)
	   this.attack[0] = "HydroPump()";
	if(level >= 52)
	   this.attack[1] = "HyperBeam()";
      this.xptype = "slow";
	this.xpaward = 214;
	this.catchdif = 45;
      this.breed[0] = "C";
      this.breed[1] = "E";
   }
   if(this.name == "Lapras")
   {
      this.type[0] = "Water";
      this.type[1] = "Ice";
      this.health = 130;
      this.strength = 85;
      this.defense = 80;
      this.speed = 60;
      this.special = 95;
      this.attack[0] = "WaterGun()";
      this.attack[1] = "Growl()";
      this.attack[2] = "Sing()";
      this.attack[3] = "Mist()";
	if(level >= 25)
	   this.attack[1] = "BodySlam()";
	if(level >= 31)
	   this.attack[3] = "ConfuseRay()";
	if(level >= 38)
	   this.attack[0] = "IceBeam()";
	if(level >= 46)
	   this.attack[1] = "HydroPump()";
      this.xptype = "slow";
	this.xpaward = 219;
	this.catchdif = 45;
      this.breed[0] = 1;
      this.breed[1] = 2;
   }
   if(this.name == "Ditto")
   {
      this.type[0] = "Normal";
      this.type[1] = "";
      this.health = 48;
      this.strength = 48;
      this.defense = 48;
      this.speed = 48;
      this.special = 48;
      this.attack[0] = "Transform()";
      this.xptype = "medium";
	this.xpaward = 61;
	this.catchdif = 250;
      this.breed[0] = 0;
      this.breed[1] = 0;
   }
   if(this.name == "Eevee")
   {
      this.type[0] = "Normal";
      this.type[1] = "";
      this.health = 55;
      this.strength = 55;
      this.defense = 50;
      this.speed = 55;
      this.special = 65;
      this.attack[0] = "Tackle()";
	if(level >= 8)
	   this.attack[1] = "SandAttack()";
	if(level >= 16)
	   this.attack[2] = "Growl()";
	if(level >= 23)
	   this.attack[3] = "QuickAttack()";
	if(level >= 30)
	   this.attack[0] = "Bite()";
	if(level >= 36)
	   this.attack[2] = "FocusEnergy()";
	if(level >= 42)
	   this.attack[3] = "TakeDown()";
      this.xptype = "medium";
	this.xpaward = 92;
	this.catchdif = 45;
      this.breed[0] = 5;
      this.breed[1] = 5;
   }
   if(this.name == "Vaporeon")
   {
      this.type[0] = "Water";
      this.type[1] = "";
      this.health = 130;
      this.strength = 65;
      this.defense = 60;
      this.speed = 65;
      this.special = 110;
      this.attack[0] = "Tackle()";
	if(level >= 8)
	   this.attack[1] = "SandAttack()";
	if(level >= 16)
	   this.attack[2] = "WaterGun()";
	if(level >= 23)
	   this.attack[3] = "QuickAttack()";
	if(level >= 30)
	   this.attack[0] = "Bite()";
	if(level >= 36)
	   this.attack[3] = "AuroraBeam()";
	if(level >= 42)
	   this.attack[1] = "Haze()";
	if(level >= 47)
	   this.attack[0] = "AcidArmor()";
	if(level >= 52)
	   this.attack[2] = "HydroPump()";
      this.xptype = "medium";
	this.xpaward = 196;
	this.catchdif = 45;
      this.breed[0] = 5;
      this.breed[1] = 5;
   }
   if(this.name == "Jolteon")
   {
      this.type[0] = "Electric";
      this.type[1] = "";
      this.health = 65;
      this.strength = 65;
      this.defense = 60;
      this.speed = 130;
      this.special = 110;
      this.attack[0] = "Tackle()";
	if(level >= 8)
	   this.attack[1] = "SandAttack()";
	if(level >= 16)
	   this.attack[2] = "ThunderShock()";
	if(level >= 23)
	   this.attack[3] = "QuickAttack()";
	if(level >= 30)
	   this.attack[0] = "DoubleKick()";
	if(level >= 36)
	   this.attack[3] = "PinMissile()";
	if(level >= 42)
	   this.attack[1] = "ThunderWave()";
	if(level >= 47)
	   this.attack[0] = "Agility()";
	if(level >= 52)
	   this.attack[2] = "Thunder()";
      this.xptype = "medium";
	this.xpaward = 197;
	this.catchdif = 45;
      this.breed[0] = 5;
      this.breed[1] = 5;
   }
   if(this.name == "Flareon")
   {
      this.type[0] = "Fire";
      this.type[1] = "";
      this.health = 65;
      this.strength = 130;
      this.defense = 60;
      this.speed = 65;
      this.special = 110;
      this.attack[0] = "Tackle()";
	if(level >= 8)
	   this.attack[1] = "SandAttack()";
	if(level >= 16)
	   this.attack[2] = "Ember()";
	if(level >= 23)
	   this.attack[3] = "QuickAttack()";
	if(level >= 30)
	   this.attack[0] = "Bite()";
	if(level >= 36)
	   this.attack[2] = "FireSpin()";
	if(level >= 42)
	   this.attack[1] = "Smog()";
	if(level >= 47)
	   this.attack[3] = "Leer()";
	if(level >= 52)
	   this.attack[1] = "FlameThrower()";
      this.xptype = "medium";
	this.xpaward = 198;
	this.catchdif = 45;
      this.breed[0] = 5;
      this.breed[1] = 5;
   }
   if(this.name == "Porygon")
   {
      this.type[0] = "Normal";
      this.type[1] = "";
      this.health = 65;
      this.strength = 60;
      this.defense = 70;
      this.speed = 40;
      this.special = 75;
      this.attack[0] = "Tackle()";
      this.attack[1] = "Sharpen()";
      this.attack[2] = "Conversion()";
	if(level >= 23)
	   this.attack[3] = "Psybeam()";
	if(level >= 28)
	   this.attack[1] = "Recover()";
	if(level >= 35)
	   this.attack[2] = "Agility()";
	if(level >= 42)
	   this.attack[0] = "TriAttack()";
      this.xptype = "medium";
	this.xpaward = 130;
	this.catchdif = 45;
      this.breed[0] = "A";
      this.breed[1] = "A";
   }
   if(this.name == "Omanyte")
   {
      this.type[0] = "Rock";
      this.type[1] = "Water";
      this.health = 35;
      this.strength = 40;
      this.defense = 100;
      this.speed = 35;
      this.special = 90;
      this.attack[0] = "WaterGun()";
      this.attack[1] = "Withdraw()";
	if(level >= 34)
	   this.attack[2] = "HornAttack()";
	if(level >= 39)
	   this.attack[3] = "Leer()";
	if(level >= 44)
	   this.attack[2] = "SpikeCannon()";
	if(level >= 49)
	   this.attack[0] = "HydroPump()";
      this.xptype = "medium";
	this.xpaward = 120;
	this.catchdif = 45;
      this.breed[0] = 2;
      this.breed[1] = 9;
   }
   if(this.name == "Omastar")
   {
      this.type[0] = "Rock";
      this.type[1] = "Water";
      this.health = 70;
      this.strength = 60;
      this.defense = 125;
      this.speed = 55;
      this.special = 115;
      this.attack[0] = "WaterGun()";
      this.attack[1] = "Withdraw()";
      this.attack[2] = "HornAttack()";
	if(level >= 39)
	   this.attack[3] = "Leer()";
	if(level >= 46)
	   this.attack[2] = "SpikeCannon()";
	if(level >= 53)
	   this.attack[0] = "HydroPump()";
      this.xptype = "medium";
	this.xpaward = 199;
	this.catchdif = 45;
      this.breed[0] = 2;
      this.breed[1] = 9;
   }
   if(this.name == "Kabuto")
   {
      this.type[0] = "Rock";
      this.type[1] = "Water";
      this.health = 30;
      this.strength = 80;
      this.defense = 90;
      this.speed = 55;
      this.special = 45;
      this.attack[0] = "Scratch()";
      this.attack[1] = "Harden()";
	if(level >= 34)
	   this.attack[2] = "Absorb()";
	if(level >= 39)
	   this.attack[3] = "Slash()";
	if(level >= 44)
	   this.attack[0] = "Leer()";
	if(level >= 49)
	   this.attack[2] = "HydroPump()";
      this.xptype = "medium";
	this.xpaward = 119;
	this.catchdif = 45;
      this.breed[0] = 2;
      this.breed[1] = 9;
   }
   if(this.name == "Kabutops")
   {
      this.type[0] = "Rock";
      this.type[1] = "Water";
      this.health = 60;
      this.strength = 115;
      this.defense = 105;
      this.speed = 80;
      this.special = 70;
      this.attack[0] = "Scratch()";
      this.attack[1] = "Harden()";
      this.attack[2] = "Absorb()";
	if(level >= 39)
	   this.attack[3] = "Slash()";
	if(level >= 46)
	   this.attack[0] = "Leer()";
	if(level >= 53)
	   this.attack[2] = "HydroPump()";
      this.xptype = "medium";
	this.xpaward = 201;
	this.catchdif = 45;
      this.breed[0] = 2;
      this.breed[1] = 9;
   }
   if(this.name == "Aerodactyl")
   {
      this.type[0] = "Rock";
      this.type[1] = "Flying";
      this.health = 80;
      this.strength = 105;
      this.defense = 65;
      this.speed = 130;
      this.special = 60;
      this.attack[0] = "WingAttack()";
      this.attack[1] = "Agility()";
	if(level >= 33)
	   this.attack[2] = "SuperSonic()";
	if(level >= 38)
	   this.attack[3] = "Bite()";
	if(level >= 45)
	   this.attack[3] = "TakeDown()";
	if(level >= 54)
	   this.attack[3] = "HyperBeam()";
      this.xptype = "slow";
	this.xpaward = 202;
	this.catchdif = 45;
      this.breed[0] = 4;
      this.breed[1] = 4;
   }
   if(this.name == "Snorlax")
   {
      this.type[0] = "Normal";
      this.type[1] = "";
      this.health = 160;
      this.strength = 110;
      this.defense = 65;
      this.speed = 30;
      this.special = 65;
      this.attack[0] = "HeadButt()";
      this.attack[1] = "Amnesia()";
      this.attack[2] = "Rest()";
	if(level >= 35)
	   this.attack[3] = "BodySlam()";
	if(level >= 41)
	   this.attack[0] = "Harden()";
	if(level >= 48)
	   this.attack[3] = "DoubleEdge()";
	if(level >= 56)
	   this.attack[0] = "HyperBeam()";
      this.xptype = "slow";
	this.xpaward = 154;
	this.catchdif = 25;
      this.breed[0] = 1;
      this.breed[1] = 1;
   }
   if(this.name == "Articuno")
   {
      this.type[0] = "Ice";
      this.type[1] = "Flying";
      this.health = 90;
      this.strength = 85;
      this.defense = 100;
      this.speed = 85;
      this.special = 125;
      this.attack[0] = "Peck()";
      this.attack[1] = "IceBeam()";
	if(level >= 51)
	   this.attack[2] = "Blizzard()";
	if(level >= 55)
	   this.attack[3] = "Agility()";
	if(level >= 60)
	   this.attack[1] = "Mist()";
      this.xptype = "slow";
	this.xpaward = 215;
	this.catchdif = 3;
      this.breed[0] = 0;
      this.breed[1] = 0;
   }
   if(this.name == "Zapdos")
   {
      this.type[0] = "Electric";
      this.type[1] = "Flying";
      this.health = 90;
      this.strength = 90;
      this.defense = 85;
      this.speed = 100;
      this.special = 125;
      this.attack[0] = "DrillPeck()";
      this.attack[1] = "ThunderShock()";
	if(level >= 51)
	   this.attack[2] = "Thunder()";
	if(level >= 55)
	   this.attack[3] = "Agility()";
	if(level >= 60)
	   this.attack[1] = "LightScreen()";
      this.xptype = "slow";
	this.xpaward = 216;
	this.catchdif = 3;
      this.breed[0] = 0;
      this.breed[1] = 0;
   }
   if(this.name == "Moltres")
   {
      this.type[0] = "Fire";
      this.type[1] = "Flying";
      this.health = 90;
      this.strength = 90;
      this.defense = 85;
      this.speed = 100;
      this.special = 125;
      this.attack[0] = "Peck()";
      this.attack[1] = "FireSpin()";
	if(level >= 51)
	   this.attack[2] = "Leer()";
	if(level >= 55)
	   this.attack[3] = "Agility()";
	if(level >= 60)
	   this.attack[0] = "SkyAttack()";
      this.xptype = "slow";
	this.xpaward = 217;
	this.catchdif = 3;
      this.breed[0] = 0;
      this.breed[1] = 0;
   }
   if(this.name == "Dratini")
   {
      this.type[0] = "Dragon";
      this.type[1] = "";
      this.health = 41;
      this.strength = 65;
      this.defense = 45;
      this.speed = 50;
      this.special = 50;
      this.attack[0] = "Wrap()";
      this.attack[1] = "Leer()";
	if(level >= 10)
	   this.attack[2] = "ThunderWave()";
	if(level >= 20)
	   this.attack[3] = "Agility()";
	if(level >= 30)
	   this.attack[0] = "Slam()";
	if(level >= 40)
	   this.attack[1] = "DragonRage()";
	if(level >= 50)
	   this.attack[2] = "HyperBeam()";
      this.xptype = "slow";
	this.xpaward = 67;
	this.catchdif = 45;
      this.breed[0] = 2;
      this.breed[1] = "E";
   }
   if(this.name == "Dragonair")
   {
      this.type[0] = "Dragon";
      this.type[1] = "";
      this.health = 61;
      this.strength = 84;
      this.defense = 65;
      this.speed = 70;
      this.special = 70;
      this.attack[0] = "Wrap()";
      this.attack[1] = "Leer()";
      this.attack[2] = "ThunderWave()";
	if(level >= 20)
	   this.attack[3] = "Agility()";
	if(level >= 35)
	   this.attack[0] = "Slam()";
	if(level >= 45)
	   this.attack[1] = "DragonRage()";
	if(level >= 55)
	   this.attack[2] = "HyperBeam()";
      this.xptype = "slow";
	this.xpaward = 144;
	this.catchdif = 45;
      this.breed[0] = 2;
      this.breed[1] = "E";
   }
   if(this.name == "Dragonite")
   {
      this.type[0] = "Dragon";
      this.type[1] = "Flying";
      this.health = 91;
      this.strength = 134;
      this.defense = 95;
      this.speed = 80;
      this.special = 100;
      this.attack[0] = "Wrap()";
      this.attack[1] = "Leer()";
      this.attack[2] = "ThunderWave()";
      this.attack[3] = "Agility()";
	if(level >= 35)
	   this.attack[0] = "Slam()";
	if(level >= 45)
	   this.attack[1] = "DragonRage()";
	if(level >= 60)
	   this.attack[2] = "HyperBeam()";
      this.xptype = "slow";
	this.xpaward = 218;
	this.catchdif = 45;
      this.breed[0] = 2;
      this.breed[1] = "E";
   }
   if(this.name == "Mewtwo")
   {
      this.type[0] = "Psychic";
      this.type[1] = "";
      this.health = 106;
      this.strength = 110;
      this.defense = 90;
      this.speed = 130;
      this.special = 154;
      this.attack[0] = "Confusion()";
      this.attack[1] = "Disable()";
      this.attack[2] = "Swift()";
      this.attack[3] = "Psychic()";
	if(level >= 63)
	   this.attack[0] = "Barrier()";
	if(level >= 66)
	   this.attack[3] = "Psychic()";
	if(level >= 70)
	   this.attack[1] = "Recover()";
	if(level >= 75)
	   this.attack[2] = "Mist()";
	if(level >= 81)
	   this.attack[2] = "Amnesia()";
      this.xptype = "slow";
	this.xpaward = 220;
	this.catchdif = 3;
      this.breed[0] = 0;
      this.breed[1] = 0;
   }
   if(this.name == "Mew")
   {
      this.type[0] = "Psychic";
      this.type[1] = "";
      this.health = 100;
      this.strength = 100;
      this.defense = 100;
      this.speed = 100;
      this.special = 100;
      this.attack[0] = "Pound()";
	if(level >= 10)
	   this.attack[1] = "Transform()";
	if(level >= 20)
	   this.attack[2] = "MegaPunch()";
	if(level >= 30)
	   this.attack[3] = "Metronome()";
	if(level >= 40)
	   this.attack[0] = "Psychic()";
      this.xptype = "parabolic";
	this.xpaward = 64;
	this.catchdif = 45;
      this.breed[0] = 0;
      this.breed[1] = 0;
   }
   this.happiness = 125;
   this.critrate = this.speed;
   this.maxhealth = this.health;
   this.lastlife = this.maxhealth;
   for(var pp = 0; pp < 4; pp++)
	this.power[pp] = getPowerPoints(this.attack[pp]);
   this.basehealth = this.health;
   this.basestrength = this.strength;
   this.basedefense = this.defense;
   this.basespeed = this.speed;
   this.basespecial = this.special;
   this.baseaccuracy = this.accuracy;
   this.baseevade = this.evade;
   this.speciesstrength = this.strength;
   this.speciesdefense = this.defense;
   this.speciesspeed = this.speed;
   this.speciesspecial = this.special;
   this.speciesaccuracy = this.accuracy;
   this.speciesevade = this.evade;
   this.modstrength = 0;
   this.moddefense = 0;
   this.modspeed = 0;
   this.modspecial = 0;
   this.modaccuracy = 0;
   this.modevade = 0;
}
function getPowerPoints(name)
{
   var rval = 0;
   if(name == "Absorb()")
	rval = 20;
   if(name == "Acid()")
	rval = 30;
   if(name == "AcidArmor()")
	rval = 40;
   if(name == "Agility()")
	rval = 30;
   if(name == "Amnesia()")
	rval = 20;
   if(name == "AuroraBeam()")
	rval = 20;
   if(name == "Barrage()")
	rval = 20;
   if(name == "Barrier()")
	rval = 30;
   if(name == "Bide()")
	rval = 10;
   if(name == "Bind()")
	rval = 20;
   if(name == "Bite()")
	rval = 25;
   if(name == "Blizzard()")
	rval = 5;
   if(name == "BodySlam()")
	rval = 15;
   if(name == "BoneClub()")
	rval = 20;
   if(name == "Bonemerang()")
	rval = 20;
   if(name == "Bubble()")
	rval = 30;
   if(name == "BubbleBeam()")
	rval = 20;
   if(name == "Clamp()")
	rval = 10;
   if(name == "CometPunch()")
	rval = 15;
   if(name == "ConfuseRay()")
	rval = 10;
   if(name == "Confusion()")
	rval = 25;
   if(name == "Constrict()")
	rval = 35;
   if(name == "Conversion()")
	rval = 30;
   if(name == "Counter()")
	rval = 20;
   if(name == "CrabHammer()")
	rval = 10;
   if(name == "Cut()")
	rval = 30;
   if(name == "DefenseCurl()")
	rval = 40;
   if(name == "Dig()")
	rval = 10;
   if(name == "Disable()")
	rval = 20;
   if(name == "DizzyPunch()")
	rval = 10;
   if(name == "DoubleEdge()")
	rval = 15;
   if(name == "DoubleKick()")
	rval = 30;
   if(name == "DoubleSlap()")
	rval = 10;
   if(name == "DoubleTeam()")
	rval = 15;
   if(name == "DragonRage()")
	rval = 10;
   if(name == "DreamEater()")
	rval = 15;
   if(name == "DrillPeck()")
	rval = 20;
   if(name == "Earthquake()")
	rval = 10;
   if(name == "EggBomb()")
	rval = 10;
   if(name == "Ember()")
	rval = 25;
   if(name == "Explosion()")
	rval = 5;
   if(name == "FireBlast()")
	rval = 5;
   if(name == "FirePunch()")
	rval = 15;
   if(name == "FireSpin()")
	rval = 15;
   if(name == "Fissure()")
	rval = 5;
   if(name == "FlameThrower()")
	rval = 15;
   if(name == "Flash()")
	rval = 20;
   if(name == "Fly()")
	rval = 15;
   if(name == "FocusEnergy()")
	rval = 30;
   if(name == "FuryAttack()")
	rval = 20;
   if(name == "FurySwipes()")
	rval = 15;
   if(name == "Glare()")
	rval = 30;
   if(name == "Growl()")
	rval = 40;
   if(name == "Growth()")
	rval = 40;
   if(name == "Guillotine()")
	rval = 5;
   if(name == "Gust()")
	rval = 35;
   if(name == "Harden()")
	rval = 30;
   if(name == "Haze()")
	rval = 30;
   if(name == "HeadButt()")
	rval = 15;
   if(name == "HighJumpKick()")
	rval = 20;
   if(name == "HornAttack()")
	rval = 25;
   if(name == "HornDrill()")
	rval = 5;
   if(name == "HydroPump()")
	rval = 5;
   if(name == "HyperBeam()")
	rval = 5;
   if(name == "HyperFang()")
	rval = 15;
   if(name == "Hypnosis()")
	rval = 20;
   if(name == "IceBeam()")
	rval = 10;
   if(name == "IcePunch()")
	rval = 15;
   if(name == "JumpKick()")
	rval = 25;
   if(name == "KarateChop()")
	rval = 25;
   if(name == "Kinesis()")
	rval = 15;
   if(name == "LeechLife()")
	rval = 15;
   if(name == "LeechSeed()")
	rval = 10;
   if(name == "Leer()")
	rval = 30;
   if(name == "Lick()")
	rval = 30;
   if(name == "LovelyKiss()")
	rval = 10;
   if(name == "LightScreen()")
	rval = 30;
   if(name == "LowKick()")
	rval = 20;
   if(name == "Meditate()")
	rval = 40;
   if(name == "MegaDrain()")
	rval = 10;
   if(name == "MegaKick()")
	rval = 5;
   if(name == "MegaPunch()")
	rval = 20;
   if(name == "Metronome()")
	rval = 10;
   if(name == "Mimic()")
	rval = 10;
   if(name == "Minimize()")
	rval = 20;
   if(name == "MirrorMove()")
	rval = 20;
   if(name == "Mist()")
	rval = 30;
   if(name == "NightShade()")
	rval = 15;
   if(name == "PayDay()")
	rval = 20;
   if(name == "Peck()")
	rval = 35;
   if(name == "PetalDance()")
	rval = 20;
   if(name == "PinMissile()")
	rval = 20;
   if(name == "PoisonGas()")
	rval = 40;
   if(name == "PoisonSting()")
	rval = 35;
   if(name == "PoisonPowder()")
	rval = 35;
   if(name == "Pound()")
	rval = 35;
   if(name == "Psybeam()")
	rval = 20;
   if(name == "Psychic()")
	rval = 10;
   if(name == "Psywave()")
	rval = 15;
   if(name == "QuickAttack()")
	rval = 30;
   if(name == "Rage()")
	rval = 20;
   if(name == "RazorLeaf()")
	rval = 25;
   if(name == "RazorWind()")
	rval = 10;
   if(name == "Recover()")
	rval = 20;
   if(name == "Reflect()")
	rval = 20;
   if(name == "Rest()")
	rval = 10;
   if(name == "Roar()")
	rval = 20;
   if(name == "RockSlide()")
	rval = 10;
   if(name == "RockThrow()")
	rval = 15;
   if(name == "RollingKick()")
	rval = 15;
   if(name == "SandAttack()")
	rval = 15;
   if(name == "Scratch()")
	rval = 30;
   if(name == "Screech()")
	rval = 40;
   if(name == "SeismicToss()")
	rval = 20;
   if(name == "SelfDestruct()")
	rval = 5;
   if(name == "Sharpen()")
	rval = 30;
   if(name == "Sing()")
	rval = 15;
   if(name == "SkullBash()")
	rval = 15;
   if(name == "SkyAttack()")
	rval = 5;
   if(name == "Slam()")
	rval = 20;
   if(name == "Slash()")
	rval = 20;
   if(name == "SleepPowder()")
	rval = 15;
   if(name == "Sludge()")
	rval = 20;
   if(name == "Smog()")
	rval = 20;
   if(name == "SmokeScreen()")
	rval = 20;
   if(name == "SoftBoiled()")
	rval = 10;
   if(name == "SolarBeam()")
	rval = 10;
   if(name == "SonicBoom()")
	rval = 20;
   if(name == "SpikeCannon()")
	rval = 15;
   if(name == "Splash()")
	rval = 40;
   if(name == "Spore()")
	rval = 15;
   if(name == "Stomp()")
	rval = 20;
   if(name == "Strength()")
	rval = 15;
   if(name == "StringShot()")
	rval = 40;
   if(name == "StunSpore()")
	rval = 30;
   if(name == "Submission()")
	rval = 25;
   if(name == "Substitute()")
	rval = 10;
   if(name == "SuperFang()")
	rval = 10;
   if(name == "SuperSonic()")
	rval = 20;
   if(name == "Surf()")
	rval = 15;
   if(name == "Swift()")
	rval = 20;
   if(name == "SwordsDance()")
	rval = 30;
   if(name == "Tackle()")
	rval = 35;
   if(name == "TailWhip()")
	rval = 30;
   if(name == "TakeDown()")
	rval = 20;
   if(name == "Teleport()")
	rval = 20;
   if(name == "Thrash()")
	rval = 20;
   if(name == "Thunder()")
	rval = 10;
   if(name == "ThunderBolt()")
	rval = 15;
   if(name == "ThunderPunch()")
	rval = 15;
   if(name == "ThunderShock()")
	rval = 30;
   if(name == "ThunderWave()")
	rval = 20;
   if(name == "Toxic()")
	rval = 10;
   if(name == "Transform()")
	rval = 10;
   if(name == "TriAttack()")
	rval = 10;
   if(name == "Twineedle()")
	rval = 20;
   if(name == "ViceGrip()")
	rval = 30;
   if(name == "VineWhip()")
	rval = 10;
   if(name == "WaterGun()")
	rval = 25;
   if(name == "Waterfall()")
	rval = 15;
   if(name == "WhirlWind()")
	rval = 20;
   if(name == "WingAttack()")
	rval = 35;
   if(name == "Withdraw()")
	rval = 40;
   if(name == "Wrap()")
	rval = 20;
   if(name == "DragonFlare()")
      rval = 15;
   return rval;
}
function revertPokemon(name)
{
   var rval = name;
   if(name == "Ivysaur" || name == "Venusaur")
	rval = "Bulbasaur";
   if(name == "Charmeleon" || name == "Charizard")
	rval = "Charmander";
   if(name == "Wartortle" || name == "Blastoise")
	rval = "Squirtle";
   if(name == "Metapod" || name == "Butterfree")
	rval = "Caterpie";
   if(name == "Kakuna" || name == "Beedrill")
	rval = "Weedle";
   if(name == "Pidgeotto" || name == "Pidgeot")
	rval = "Pidgey";
   if(name == "Raticate")
	rval = "Rattata";
   if(name == "Fearow")
	rval = "Spearow";
   if(name == "Arbok")
	rval = "Ekans";
   if(name == "Raichu")
	rval = "Pikachu";
   if(name == "Sandslash")
	rval = "Sandshrew";
   if(name == "Nidorina" || name == "Nidoqueen")
	rval = "NidoranF";
   if(name == "Nidorino" || name == "Nidoking")
	rval = "NidoranM";
   if(name == "Clefable")
	rval = "Clefairy";
   if(name == "Ninetales")
	rval = "Vulpix";
   if(name == "Wigglytuff")
	rval = "Jigglypuff";
   if(name == "Golbat")
	rval = "Zubat";
   if(name == "Gloom" || name == "Vileplume")
	rval = "Oddish";
   if(name == "Parasect")
	rval = "Paras";
   if(name == "Venomoth")
	rval = "Venonat";
   if(name == "Dugtrio")
	rval = "Diglett";
   if(name == "Persian")
	rval = "Meowth";
   if(name == "Golduck")
	rval = "Psyduck";
   if(name == "Primeape")
	rval = "Mankey";
   if(name == "Arcanine")
	rval = "Growlithe";
   if(name == "Poliwhirl" || name == "Poliwrath")
	rval = "Poliwag";
   if(name == "Kadabra" || name == "Alakazam")
	rval = "Abra";
   if(name == "Machoke" || name == "Machamp")
	rval = "Machop";
   if(name == "Weepinbell" || name == "Victreebel")
	rval = "Bellsprout";
   if(name == "Tentacruel")
	rval = "Tentacool";
   if(name == "Graveler" || name == "Golem")
	rval = "Geodude";
   if(name == "Rapidash")
	rval = "Ponyta";
   if(name == "Slowbro")
	rval = "Slowpoke";
   if(name == "Magneton")
	rval = "Magnemite";
   if(name == "Dodrio")
	rval = "Doduo";
   if(name == "Dewgong")
	rval = "Seel";
   if(name == "Muk")
	rval = "Grimer";
   if(name == "Cloyster")
	rval = "Shelder";
   if(name == "Haunter" || name == "Gengar")
	rval = "Gastly";
   if(name == "Hypno")
	rval = "Drowzee";
   if(name == "Kingler")
	rval = "Krabby";
   if(name == "Electrode")
	rval = "Voltorb";
   if(name == "Exeggutor")
	rval = "Exeggcute";
   if(name == "Marowak")
	rval = "Cubone";
   if(name == "Weezing")
	rval = "Koffing";
   if(name == "Rhydon")
	rval = "Rhyhorn";
   if(name == "Seadra")
	rval = "Horsea";
   if(name == "Seaking")
	rval = "Goldeen";
   if(name == "Starmie")
	rval = "Staryu";
   if(name == "Gyarados")
	rval = "Magikarp";
   if(name == "Vaporeon" || name == "Jolteon" || name == "Flareon")
	rval = "Eevee";
   if(name == "Omastar")
	rval = "Omanyte";
   if(name == "Kabutops")
	rval = "Kabuto";
   if(name == "Dragonair" || name == "Dragonite")
	rval = "Dratini";
   return rval;
}
function getGender(name, dv)
{
   if(name == "Ditto" || name == "Porygon" || name == "Magnemite" || name == "Voltorb" || name == "Staryu" || name == "Articuno" || name == "Zapdos" || name == "Moltres" || name == "Mewtwo" || name == "Mew")
      return " ";
   else if(dv >= feDV(name))
      return "M";
   return "F";
}
function feDV(poke)
{
   var name = revertPokemon(poke);
   if(name == "Ditto" || name == "Porygon" || name == "Magnemite" || name == "Voltorb" || name == "Staryu" || name == "Articuno" || name == "Zapdos" || name == "Moltres" || name == "Mewtwo" || name == "Mew" || name == "NidoranM" || name == "Tauros" || name == "Hitmonchan" || name == "Hitmonlee")
      return 0;
   else if(name == "NidoranF" || name == "Chansey" || name == "Kangaskhan" || name == "Jynx")
      return 16;
   else if(name == "Bulbasaur" || name == "Charmander" || name == "Squirtle" || name == "Eevee" || name == "Omanyte" || name == "Kabuto" || name == "Aerodactyl" || name == "Snorlax")
      return 2;
   else if(name == "Growlithe" || name == "Abra" || name == "Machop" || name == "Magmar" || name == "Electabuzz")
      return 4;
   else if(name == "Vulpix" || name == "Clefairy" || name == "Jigglypuff")
      return 12
   return 8;
}
function evolvePokemon(name, level)
{
   if(name == "Bulbasaur" && level >= 16)
	name = "Ivysaur";
   if(name == "Ivysaur" && level >= 32)
	name = "Venusaur";
   if(name == "Squirtle" && level >= 16)
	name = "Wartortle";
   if(name == "Wartortle" && level >= 32)
	name = "Blastoise";
   if(name == "Charmander" && level >= 16)
	name = "Charmeleon";
   if(name == "Charmeleon" && level >= 32)
	name = "Charizard";
   if(name == "Caterpie" && level >= 7)
	name = "Metapod";
   if(name == "Metapod" && level >= 10)
	name = "Butterfree";
   if(name == "Weedle" && level >= 7)
	name = "Kakuna";
   if(name == "Kakuna" && level >= 10)
	name = "Beedrill";
   if(name == "Pidgey" && level >= 18)
	name = "Pidgeotto";
   if(name == "Pidgeotto" && level >= 36)
	name = "Pidgeot";
   if(name == "Rattata" && level >= 20)
	name = "Raticate";
   if(name == "Spearow" && level >= 20)
	name = "Fearow";
   if(name == "Ekans" && level >= 22)
	name = "Arbok";
   if(name == "Sandshrew" && level >= 22)
	name = "Sandslash";
   if(name == "NidoranF" && level >= 16)
	name = "Nidorina";
   if(name == "NidoranM" && level >= 16)
	name = "Nidorino";
   if(name == "Zubat" && level >= 22)
	name = "Golbat";
   if(name == "Oddish" && level >= 21)
	name = "Gloom";
   if(name == "Paras" && level >= 24)
	name = "Parasect";
   if(name == "Venonat" && level >= 31)
	name = "Venomoth";
   if(name == "Diglett" && level >= 26)
	name = "Dugtrio";
   if(name == "Meowth" && level >= 28)
	name = "Persian";
   if(name == "Psyduck" && level >= 36)
	name = "Golduck";
   if(name == "Mankey" && level >= 28)
	name = "Primeape";
   if(name == "Poliwag" && level >= 25)
	name = "Poliwhirl";
   if(name == "Abra" && level >= 16)
	name = "Kadabra";
   if(name == "Machop" && level >= 28)
	name = "Machoke";
   if(name == "Bellsprout" && level >= 21)
	name = "Weepinbell";
   if(name == "Tentacool" && level >= 30)
	name = "Tentacruel";
   if(name == "Geodude" && level >= 25)
	name = "Graveler";
   if(name == "Ponyta" && level >= 40)
	name = "Rapidash";
   if(name == "Slowpoke" && level >= 37)
	name = "Slowbro";
   if(name == "Magnemite" && level >= 30)
	name = "Magneton";
   if(name == "Doduo" && level >= 31)
	name = "Dodrio";
   if(name == "Seel" && level >= 34)
	name = "Dewgong";
   if(name == "Grimer" && level >= 38)
	name = "Muk";
   if(name == "Gastly" && level >= 25)
	name = "Haunter";
   if(name == "Drowzee" && level >= 26)
	name = "Hypno";
   if(name == "Krabby" && level >= 28)
	name = "Kingler";
   if(name == "Voltorb" && level >= 30)
	name = "Electrode";
   if(name == "Cubone" && level >= 28)
	name = "Marowak";
   if(name == "Koffing" && level >= 35)
	name = "Weezing";
   if(name == "Rhyhorn" && level >= 42)
	name = "Rhydon";
   if(name == "Horsea" && level >= 32)
	name = "Seadra";
   if(name == "Goldeen" && level >= 33)
	name = "Seaking";
   if(name == "Magikarp" && level >= 20)
	name = "Gyarados";
   if(name == "Omanyte" && level >= 40)
	name = "Omastar";
   if(name == "Kabuto" && level >= 40)
	name = "Kabutops";
   if(name == "Dratini" && level >= 30)
	name = "Dragonair";
   if(name == "Dragonair" && level >= 55)
	name = "Dragonite";
   return name;
}
function evolveHappiness(name)
{
   return name;
}
//Begin Attack List
function Absorb()
{
   document.REL.message.value+= active[attacker].name + " uses Absorb\n";
   steallife(255, 20, "Grass", "Special", .25);
}
function AcidArmor()
{
   document.REL.message.value+= active[attacker].name + " uses Acid Armor\n";
   modify(2, attacker, "defense");
}
function Acid()
{
   document.REL.message.value+= active[attacker].name + " uses Acid\n";
   attackandmod(255, 40, "Poison", "Physical", "defense", -1, 25);
}
function Agility()
{
   document.REL.message.value+= active[attacker].name + " uses Agility\n";
   modify(2, attacker, "speed");
}
function Amnesia()
{
   document.REL.message.value+= active[attacker].name + " uses Amnesia\n";
   modify(2, attacker, "special");
}
function AuroraBeam()
{
   document.REL.message.value+= active[attacker].name + " uses Aurora Beam\n";
   attackandmod(255, 65, "Ice", "Special", "strength", -1, 25);
}
function Barrage()
{
   document.REL.message.value+= active[attacker].name + " uses Barrage\n";
   rapid(216, 15, "Normal", "Physical");
}
function Barrier()
{
   document.REL.message.value+= active[attacker].name + " uses Barrier\n";
   modify(2, attacker, "defense");
}
function Bide()
{
   if(active[attacker].biding == 3 || active[attacker].biding == 2 && randomize(2) == 2)
   {
      document.REL.message.value+= active[attacker].name + " uses Bide\n";
 	instantdamage((active[attacker].lastlife - active[attacker].health) * 2, defender);
      active[attacker].biding = 0;
   }
   else
   {
      document.REL.message.value+= active[attacker].name + " is storing energy\n";
      active[attacker].biding++;
      active[attacker].curattack = "Bide()";
   }
}
function Bind()
{
   if(active[attacker].bound > 0)
      document.REL.message.value+= active[attacker].name + "\'s attack continues\n";
   else
      document.REL.message.value+= active[attacker].name + " uses Bind\n";
   continual(191, 15, "Normal", "Physical");
}
function Bite()
{
   document.REL.message.value+= active[attacker].name + " uses Bite\n";
   attackandeffect(255, 60, "Normal", "Physical", "Scare", 25);
}
function Blizzard()
{
   document.REL.message.value+= active[attacker].name + " uses Blizzard\n";
   attackandeffect(229, 120, "Ice", "Special", "Frozen", 25);
}
function BodySlam()
{
   document.REL.message.value+= active[attacker].name + " uses Body Slam\n";
   attackandeffect(255, 85, "Normal", "Physical", "Paralyzed", 76);
}
function BoneClub()
{
   document.REL.message.value+= active[attacker].name + " uses BoneClub\n";
   attackandeffect(216, 65, "Ground", "Physical", "Scare", 25);
}
function Bonemerang()
{
   document.REL.message.value+= active[attacker].name + " uses Bonemerang\n";
   doubleattack(229, 50, "Ground", "Physical");
}
function Bubble()
{
   document.REL.message.value+= active[attacker].name + " uses Bubble\n";
   attackandmod(255, 20, "Water", "Special", "speed", -1, 25);
}
function BubbleBeam()
{
   document.REL.message.value+= active[attacker].name + " uses Bubble Beam\n";
   attackandmod(255, 65, "Water", "Special", "speed", -1, 25);
}
function Clamp()
{
   if(active[attacker].bound > 0)
      document.REL.message.value+= active[attacker].name + "\'s attack continues\n";
   else
      document.REL.message.value+= active[attacker].name + " uses Clamp\n";
   continual(191, 35, "Water", "Special");
}
function CometPunch()
{
   document.REL.message.value+= active[attacker].name + " uses Comet Punch\n";
   rapid(216, 18, "Normal", "Physical");
}
function ConfuseRay()
{
   document.REL.message.value+= active[attacker].name + " uses Confuse Ray\n";
   hitandeffect(255, "Confusion");
}
function Confusion()
{
   document.REL.message.value+= active[attacker].name + " uses Confusion\n";
   attackandeffect(255, 50, "Psychic", "Special", "Confusion", 25);
}
function Constrict()
{
   document.REL.message.value+= active[attacker].name + " uses Constrict\n";
   attackandmod(255, 10, "Normal", "Physical", "speed", -1, 25);
}
function Conversion()
{
   document.REL.message.value+= active[attacker].name + " uses Conversion\n" + active[attacker].name + "\'s type changed to that of " + active[defender].name + "\'s\n";
   active[attacker].type[0] = active[defender].type[0];
   active[attacker].type[1] = active[defender].type[1];
}
function Counter()
{
   document.REL.message.value+= active[attacker].name + " uses Counter\n";
   doubleback(255, "Fighting", "Counter");
}
function CrabHammer()
{
   document.REL.message.value+= active[attacker].name + " uses Crab Hammer\n";
   highcritical(216, 90, "Water", "Special");
}
function Cut()
{
   document.REL.message.value+= active[attacker].name + " uses Cut\n";
   single(242, 50, "Normal", "Physical");
}
function DefenseCurl()
{
   document.REL.message.value+= active[attacker].name + " uses Defense Curl\n";
   modify(1, attacker, "defense");
}
function Dig()
{
   if(active[attacker].charging == 1)
   {
      document.REL.message.value+= active[attacker].name + " uses Dig\n";
     single(242, 100, "Ground", "Physical");
     active[attacker].charging = 0;
     active[attacker].unhit = 0;
   }
   else
   {
      document.REL.message.value+= active[attacker].name + " digs underground\n";
      active[attacker].charging = 1;
      active[attacker].unhit = 1;
      if(attacker == 0)
         active[0].curattack = playerinput;
      if(attacker == 1)
         active[1].curattack = aiinput;
   }
}
function Disable()
{
   document.REL.message.value+= active[attacker].name + " uses Disable\n";
   var dissed = 0;
   for(var discount = 0; discount < 4; discount++)
      if(active[defender].disabled[discount] > 0)
         dissed++;
   if(dissed > 0)
   {
      document.REL.message.value+= active[attacker].name + "\'s Disable failed.\n";
   }
   else if(hit(140) == 1)
   {
      var disattack = randomize(4) - 1;
      if(active[defender].attack[disattack] == "") disattack = 0;
      active[defender].disabled[disattack] = randomize(4) + 1;
      document.REL.message.value+= active[defender].name + "\'s " + active[defender].attack[disattack].substring(0, active[defender].attack[disattack].length - 2) + " attack was disabled\n";
   }
   else
      document.REL.message.value+= active[attacker].name + "\'s attack missed\n";
}
function DizzyPunch()
{
   document.REL.message.value+= active[attacker].name + " uses Dizzy Punch\n";
   single(255, 70, "Normal", "Physical");
}
function DoubleEdge()
{
   document.REL.message.value+= active[attacker].name + " uses Double-Edge\n";
   recoil(255, 100, "Normal", "Physical", .25);
}
function DoubleKick()
{
   document.REL.message.value+= active[attacker].name + " uses Double Kick\n";
   doubleattack(255, 30, "Fighting", "Physical");
}
function DoubleSlap()
{
   document.REL.message.value+= active[attacker].name + " uses Double Slap\n";
   rapid(216, 15, "Normal", "Physical");
}
function DoubleTeam()
{
   document.REL.message.value+= active[attacker].name + " uses Double Team\n";
   modify(1, attacker, "evade");
}
function DragonRage()
{
   document.REL.message.value+= active[attacker].name + " uses Dragon Rage\n";
   hitandinstant(255, 40, "Dragon", "Special");
}
function DreamEater()
{
   document.REL.message.value+= active[attacker].name + " uses Dream Eater\n";
   if(active[defender].status == "Sleep")
      steallife(255, 100, "Psychic", "Special", .5);
   else
      document.REL.message.value+= active[attacker].name + "\'s attack missed\n";
}
function DrillPeck()
{
   document.REL.message.value+= active[attacker].name + " uses Drill Peck\n";
   single(255, 80, "Flying", "Physical");
}
function Earthquake()
{
   document.REL.message.value+= active[attacker].name + " uses Earthquake\n";
   single(255, 100, "Ground", "Physical");
}
function EggBomb()
{
   document.REL.message.value+= active[attacker].name + " uses Egg Bomb\n";
   single(191, 100, "Normal", "Physical");
}
function Ember()
{
   document.REL.message.value+= active[attacker].name + " uses Ember\n";
   attackandeffect(255, 40, "Fire", "Special", "Burned", 25);
}
function Explosion()
{
   document.REL.message.value+= active[attacker].name + " uses Explosion\n";
   if(single(255, 340, "Normal", "Physical") > 0)
      instantdamage(active[attacker].health, attacker);
}
function FireBlast()
{
   document.REL.message.value+= active[attacker].name + " uses Fire Blast\n";
   attackandeffect(216, 120, "Fire", "Special", "Burned", 51);
}
function FirePunch()
{
   document.REL.message.value+= active[attacker].name + " uses Fire Punch\n";
   attackandeffect(255, 75, "Fire", "Special", "Burned", 25);
}
function FireSpin()
{
   if(active[attacker].bound > 0)
      document.REL.message.value+= active[attacker].name + "\'s attack continues\n";
   else
      document.REL.message.value+= active[attacker].name + " uses Fire Spin\n";
   continual(178, 15, "Fire", "Special");
}
function Fissure()
{
   document.REL.message.value+= active[attacker].name + " uses Fissure\n";
   killornil(76);
}
function FlameThrower()
{
   document.REL.message.value+= active[attacker].name + " uses Flame Thrower\n";
   attackandeffect(255, 95, "Fire", "Special", "Burned", 25);
}
function Flash()
{
   document.REL.message.value+= active[attacker].name + " uses Flash\n";
   enemymod(178, -1, defender, "accuracy");
}
function Fly()
{
   if(active[attacker].charging == 1)
   {
      document.REL.message.value+= active[attacker].name + " uses Fly\n";
     single(242, 70, "Flying", "Physical");
     active[attacker].charging = 0;
     active[attacker].unhit = 0;
   }
   else
   {
      document.REL.message.value+= active[attacker].name + " flies high into the air\n";
      active[attacker].charging = 1;
      active[attacker].unhit = 1;
      if(attacker == 0)
         active[0].curattack = playerinput;
      if(attacker == 1)
         active[1].curattack = aiinput;
   }
}
function FocusEnergy()
{
   document.REL.message.value+= active[attacker].name + " uses Focus Energy\n" + active[attacker].name + "\'s getting pumped\n";
   active[attacker].critical = 2;
}
function FuryAttack()
{
   document.REL.message.value+= active[attacker].name + " uses Fury Attack\n";
   rapid(216, 15, "Normal", "Physical");
}
function FurySwipes()
{
   document.REL.message.value+= active[attacker].name + " uses Fury Swipes\n";
   rapid(204, 18, "Normal", "Physical");
}
function Glare()
{
   document.REL.message.value+= active[attacker].name + " uses Glare\n";
   hitandeffect(191, "Paralyzed");
}
function Growl()
{
   document.REL.message.value+= active[attacker].name + " uses Growl\n";
   enemymod(255, -1, defender, "strength");
}
function Growth()
{
   document.REL.message.value+= active[attacker].name + " uses Growth\n";
   modify(1, attacker, "special");
}
function Guillotine()
{
   document.REL.message.value+= active[attacker].name + " uses Guillotine\n";
   killornil(76);
}
function Gust()
{
   document.REL.message.value+= active[attacker].name + " uses Gust\n";
   single(255, 40, "Flying", "Physical");
}
function Harden()
{
   document.REL.message.value+= active[attacker].name + " uses Harden\n";
   modify(1, attacker, "defense");
}
function Haze()
{
   document.REL.message.value+= active[attacker].name + " uses Haze\nAll status effect removed\n";
   NullOut(0);
   NullOut(1);
}
function HeadButt()
{
   document.REL.message.value+= active[attacker].name + " uses Head Butt\n";
   attackandeffect(255, 70, "Normal", "Physical", "Scare", 76);
}
function HighJumpKick()
{
   document.REL.message.value+= active[attacker].name + " uses High Jump Kick\n";
   missandinjure(229, 85, "Fighting", "Physical", .125);
}
function HornAttack()
{
   document.REL.message.value+= active[attacker].name + " uses Horn Attack\n";
   single(255, 65, "Normal", "Physical");
}
function HornDrill()
{
   document.REL.message.value+= active[attacker].name + " uses Horn Drill\n";
   killornil(76);
}
function HydroPump()
{
   document.REL.message.value+= active[attacker].name + " uses Hydro Pump\n";
   single(204, 120, "Water", "Special");
}
function HyperBeam()
{
   if(active[attacker].charging == 2)
   {
      document.REL.message.value+= active[attacker].name + " is recharging\n";
      active[attacker].charging = 0;
   }
   else
   {
      document.REL.message.value+= active[attacker].name + " uses Hyper Beam\n";
      single(229, 150, "Normal", "Physical");
      if(active[defender].health > 0)
      {
         active[attacker].charging = 2;
         if(attacker == 0)
            active[0].curattack = playerinput;
         if(attacker == 1)
            active[1].curattack = aiinput;
      }
   }
}
function HyperFang()
{
   document.REL.message.value+= active[attacker].name + " uses Hyper Fang\n";
   attackandeffect(229, 80, "Normal", "Physical", "Scare", 25);
}
function Hypnosis()
{
   document.REL.message.value+= active[attacker].name + " uses Hypnosis\n";
   hitandeffect(153, "Sleep");
}
function IceBeam()
{
   document.REL.message.value+= active[attacker].name + " uses Ice Beam\n";
   attackandeffect(255, 95, "Ice", "Special", "Frozen", 25);
}
function IcePunch()
{
   document.REL.message.value+= active[attacker].name + " uses Ice Punch\n";
   attackandeffect(255, 75, "Ice", "Special", "Frozen", 25);
}
function JumpKick()
{
   document.REL.message.value+= active[attacker].name + " uses Jump Kick\n";
   missandinjure(229, 70, "Fighting", "Physical", .125);
}
function KarateChop()
{
   document.REL.message.value+= active[attacker].name + " uses Karate Chop\n";
   highcritical(255, 50, "Normal", "Physical");
}
function Kinesis()
{
   document.REL.message.value+= active[attacker].name + " uses Kinesis\n";
   enemymod(204, -1, defender, "accuracy");
}
function LeechLife()
{
   document.REL.message.value+= active[attacker].name + " uses Leech Life\n";
   steallife(255, 20, "Bug", "Physical", .25);
}
function LeechSeed()
{
   document.REL.message.value+= active[attacker].name + " uses Leech Seed\n";
   if(hit(229) == 1)
   {
      if(active[defender].type[0] != "Grass" && active[defender].type[1] != "Grass")
      {
         document.REL.message.value+= active[defender].name + " was Seeded\n";
         active[defender].leechseed = 1;
      }
      else
         document.REL.message.value+= active[defender].name + " was not affected by the attack\n";
   }
   else
      document.REL.message.value+= active[attacker].name + "\'s attack missed\n";
}
function Leer()
{
   document.REL.message.value+= active[attacker].name + " uses Leer\n";
   enemymod(255, -1, defender, "defense");
}
function Lick()
{
   document.REL.message.value+= active[attacker].name + " uses Lick\n";
   attackandeffect(255, 20, "Ghost", "Physical", "Paralyzed", 76);
}
function LightScreen()
{
   document.REL.message.value+= active[attacker].name + " uses Light Screen\n";
   active[attacker].screen = 1;
}
function LovelyKiss()
{
   document.REL.message.value+= active[attacker].name + " uses Lovely Kiss\n";
   hitandeffect(191, "Sleep");
}
function LowKick()
{
   document.REL.message.value+= active[attacker].name + " uses LowKick\n";
   attackandeffect(229, 50, "Fighting", "Physical", "Scare", 76);
}
function Meditate()
{
   document.REL.message.value+= active[attacker].name + " uses Meditate\n";
   modify(1, attacker, "strength");
}
function MegaDrain()
{
   document.REL.message.value+= active[attacker].name + " uses Mega Drain\n";
   steallife(255, 40, "Grass", "Special", .25);
}
function MegaKick()
{
   document.REL.message.value+= active[attacker].name + " uses MegaKick\n";
   single(191, 120, "Normal", "Physical");
}
function MegaPunch()
{
   document.REL.message.value+= active[attacker].name + " uses Mega Punch\n";
   single(216, 80, "Normal", "Physical");
}
function Metronome()
{
   var m = randomize(161);
   var r = "";
   if(m == 1) r = "Absorb()";
   if(m == 2) r = "Acid()";
   if(m == 3) r = "AcidArmor()";
   if(m == 4) r = "Acid()";
   if(m == 5) r = "Agility()";
   if(m == 6) r = "Amnesia()";
   if(m == 7) r = "AuroraBeam()";
   if(m == 8) r = "Barrage()";
   if(m == 9) r = "Barrier()";
   if(m == 10) r = "Bide()";
   if(m == 11) r = "Bind()";
   if(m == 12) r = "Bite()";
   if(m == 13) r = "Blizzard()";
   if(m == 14) r = "BodySlam()";
   if(m == 15) r = "BoneClub()";
   if(m == 16) r = "Bonemerang()";
   if(m == 17) r = "Bubble()";
   if(m == 18) r = "BubbleBeam()";
   if(m == 19) r = "Clamp()";
   if(m == 20) r = "CometPunch()";
   if(m == 21) r = "ConfuseRay()";
   if(m == 22) r = "Confusion()";
   if(m == 23) r = "Constrict()";
   if(m == 24) r = "Conversion()";
   if(m == 25) r = "Counter()";
   if(m == 26) r = "CrabHammer()";
   if(m == 27) r = "Cut()";
   if(m == 28) r = "DefenseCurl()";
   if(m == 29) r = "Dig()";
   if(m == 30) r = "Disable()";
   if(m == 31) r = "DizzyPunch()";
   if(m == 32) r = "DoubleEdge()";
   if(m == 33) r = "DoubleKick()";
   if(m == 34) r = "DoubleSlap()";
   if(m == 35) r = "DoubleTeam()";
   if(m == 36) r = "DragonRage()";
   if(m == 37) r = "DreamEater()";
   if(m == 38) r = "DrillPeck()";
   if(m == 39) r = "Earthquake()";
   if(m == 40) r = "EggBomb()";
   if(m == 41) r = "Ember()";
   if(m == 42) r = "Explosion()";
   if(m == 43) r = "FireBlast()";
   if(m == 44) r = "FirePunch()";
   if(m == 45) r = "FireSpin()";
   if(m == 46) r = "Fissure()";
   if(m == 47) r = "FlameThrower()";
   if(m == 48) r = "Flash()";
   if(m == 49) r = "Fly()";
   if(m == 50) r = "FocusEnergy()";
   if(m == 51) r = "FuryAttack()";
   if(m == 52) r = "FurySwipes()";
   if(m == 53) r = "Glare()";
   if(m == 54) r = "Growl()";
   if(m == 55) r = "Growth()";
   if(m == 56) r = "Guillotine()";
   if(m == 57) r = "Gust()";
   if(m == 58) r = "Harden()";
   if(m == 59) r = "Haze()";
   if(m == 60) r = "HeadButt()";
   if(m == 61) r = "HighJumpKick()";
   if(m == 62) r = "HornAttack()";
   if(m == 63) r = "HornDrill()";
   if(m == 64) r = "HydroPump()";
   if(m == 65) r = "HyperBeam()";
   if(m == 66) r = "HyperFang()";
   if(m == 67) r = "Hypnosis()";
   if(m == 68) r = "IceBeam()";
   if(m == 69) r = "IcePunch()";
   if(m == 70) r = "JumpKick()";
   if(m == 71) r = "KarateChop()";
   if(m == 72) r = "LeechLife()";
   if(m == 73) r = "LeechSeed()";
   if(m == 74) r = "Leer()";
   if(m == 75) r = "Lick()";
   if(m == 76) r = "LightScreen()";
   if(m == 77) r = "LovelyKiss()";
   if(m == 78) r = "LowKick()";
   if(m == 79) r = "Meditate()";
   if(m == 80) r = "MegaDrain()";
   if(m == 81) r = "MegaKick()";
   if(m == 82) r = "MegaPunch()";
   if(m == 83) r = "Minimize()";
   if(m == 84) r = "Mist()";
   if(m == 85) r = "NightShade()";
   if(m == 86) r = "PayDay()";
   if(m == 87) r = "Peck()";
   if(m == 88) r = "PetalDance()";
   if(m == 89) r = "PinMissile()";
   if(m == 90) r = "PoisonGas()";
   if(m == 91) r = "PoisonSting()";
   if(m == 92) r = "PoisonPowder()";
   if(m == 93) r = "Pound()";
   if(m == 94) r = "Psybeam()";
   if(m == 95) r = "Psychic()";
   if(m == 96) r = "Psywave()";
   if(m == 97) r = "QuickAttack()";
   if(m == 98) r = "Rage()";
   if(m == 99) r = "RazorLeaf()";
   if(m == 100) r = "RazorWind()";
   if(m == 101) r = "Recover()";
   if(m == 102) r = "Reflect()";
   if(m == 103) r = "Rest()";
   if(m == 104) r = "Roar()";
   if(m == 105) r = "RockSlide()";
   if(m == 106) r = "RockThrow()";
   if(m == 107) r = "RollingKick()";
   if(m == 108) r = "SandAttack()";
   if(m == 109) r = "Scratch()";
   if(m == 110) r = "Screech()";
   if(m == 111) r = "SeismicToss()";
   if(m == 112) r = "SelfDestruct()";
   if(m == 113) r = "Sharpen()";
   if(m == 114) r = "Sing()";
   if(m == 115) r = "SkullBash()";
   if(m == 116) r = "SkyAttack()";
   if(m == 117) r = "Slam()";
   if(m == 118) r = "Slash()";
   if(m == 119) r = "SleepPowder()";
   if(m == 120) r = "Sludge()";
   if(m == 121) r = "Smog()";
   if(m == 122) r = "SmokeScreen()";
   if(m == 123) r = "SoftBoiled()";
   if(m == 124) r = "SolarBeam()";
   if(m == 125) r = "SonicBoom()";
   if(m == 126) r = "SpikeCannon()";
   if(m == 127) r = "Splash()";
   if(m == 128) r = "Spore()";
   if(m == 129) r = "Stomp()";
   if(m == 130) r = "Strength()";
   if(m == 131) r = "StringShot()";
   if(m == 132) r = "StunSpore()";
   if(m == 133) r = "Submission()";
   if(m == 134) r = "Substitute()";
   if(m == 135) r = "SuperFang()";
   if(m == 136) r = "SuperSonic()";
   if(m == 137) r = "Surf()";
   if(m == 138) r = "Swift()";
   if(m == 139) r = "SwordsDance()";
   if(m == 140) r = "Tackle()";
   if(m == 141) r = "TailWhip()";
   if(m == 142) r = "TakeDown()";
   if(m == 143) r = "Thrash()";
   if(m == 144) r = "Thunder()";
   if(m == 145) r = "ThunderWave()";
   if(m == 146) r = "ThunderBolt()";
   if(m == 147) r = "ThunderPunch()";
   if(m == 148) r = "ThunderShock()";
   if(m == 149) r = "Toxic()";
   if(m == 150) r = "Transform()";
   if(m == 151) r = "TriAttack()";
   if(m == 152) r = "Twineedle()";
   if(m == 153) r = "ViceGrip()";
   if(m == 154) r = "VineWhip()";
   if(m == 155) r = "WaterGun()";
   if(m == 156) r = "Waterfall()";
   if(m == 157) r = "WingAttack()";
   if(m == 158) r = "Withdraw()";
   if(m == 159) r = "Wrap()";
   if(m == 160) r = "Teleport()";  // these two were not in the original REL,
   if(m == 161) r = "WhirlWind()"; // so I'm adding them now.
   if(m == 162) r = "Kinesis()";   // whoops
   return r;
}
function Mimic()
{
   document.REL.message.value+= active[attacker].name + " uses Mimic\n";
   var getMimic = 0;
   for(var check = 0; check < 4; check++)
   {
      if(active[attacker].attack[check] == "Mimic()")
         getMimic = check;
   }
   var mimicit = randomize(4)-1;
   while(active[defender].attack[mimicit] == "")
   {
      mimicit++;
      if(mimicit >= 4)
         mimicit = 0;
   }
   active[attacker].mimiced = getMimic+1;
   active[attacker].power[getMimic]--;
   active[attacker].attack[getMimic] = active[defender].attack[mimicit];
   document.REL.message.value+= active[attacker].name + " mimics " + active[defender].attack[mimicit].substring(0, active[defender].attack[mimicit].length - 2) + "\n";
}
function Minimize()
{
   document.REL.message.value+= active[attacker].name + " uses Minimize\n";
   modify(1, attacker, "evade");
}
function MirrorMove()
{
   document.REL.message.value+= active[attacker].name + " uses MirrorMove\n";
   if(lastattack == "MirrorMove()")
      eval(active[defender].attack[randomize(4) - 1]);
}
function Mist()
{
   document.REL.message.value+= active[attacker].name + " uses Mist\n";
   active[attacker].mist = 1;
}
function NightShade()
{
   document.REL.message.value+= active[attacker].name + " uses NightShade\n";
   hitandinstant(229, active[attacker].level, "Ghost", "Physical");
}
function PayDay()
{
   document.REL.message.value+= active[attacker].name + " uses Pay Day\n";
   if(single(255, 40, "Normal", "Physical") > 0)
   {
	document.REL.message.value+= "Coins scatter everywhere\n";
      payday+= active[attacker].level * 2;
   }
}
function Peck()
{
   document.REL.message.value+= active[attacker].name + " uses Peck\n";
   single(255, 35, "Flying", "Physical");
}
function PetalDance()
{
   if(active[attacker].thrashing == 0)
   {
	active[attacker].thrashing = randomize(2)+ 3;
      document.REL.message.value+= active[attacker].name + " uses Petal Dance\n";
      active[attacker].curattack = "PetalDance()";
   }
   thrashabout(255, 70, "Grass", "Special");
}
function PoisonGas()
{
   document.REL.message.value+= active[attacker].name + " uses Poison Gas\n";
   hitandeffect(140, "Poisoned");
}
function PinMissile()
{
   document.REL.message.value+= active[attacker].name + " uses Pin Missile\n";
   rapid(216, 14, "Bug", "Physical");
}
function PoisonSting()
{
   document.REL.message.value+= active[attacker].name + " uses Poison Sting\n";
   attackandeffect(255, 15, "Poison", "Physical", "Poisoned", 51);
}
function PoisonPowder()
{
   document.REL.message.value+= active[attacker].name + " uses Poison Powder\n";
   hitandeffect(191, "Poisoned");
}
function Pound()
{
   document.REL.message.value+= active[attacker].name + " uses Pound\n";
   single(255, 40, "Normal", "Physical");
}
function Psybeam()
{
   document.REL.message.value+= active[attacker].name + " uses Psybeam\n";
   attackandeffect(255, 65, "Psychic", "Special", "Confusion", 25);
}
function Psychic()
{
   document.REL.message.value+= active[attacker].name + " uses Psychic\n";
   attackandmod(255, 90, "Psychic", "Special", "special", -1, 102);
}
function Psywave()
{
   document.REL.message.value+= active[attacker].name + " uses Psywave\n";
   hitandinstant(204, (randomize(1.5) + 1) * active[attacker].level, "Psychic", "Special");
}
function QuickAttack()
{
   document.REL.message.value+= active[attacker].name + " uses Quick Attack\n";
   single(255, 40, "Normal", "Physical");
}
function Rage()
{
   if(active[attacker].enraged == 1 && active[attacker].health < active[attacker].lastlife)
   {
      document.REL.message.value+= active[attacker].name + "\'s Rage is building\n";
      modify(1, attacker, "strength");
   }
   document.REL.message.value+= active[attacker].name + " uses Rage\n";
   active[attacker].curattack = "Rage()";
   active[attacker].enraged = 1;
   single(255, 20, "Normal", "Physical");
   active[attacker].lastlife = active[attacker].health;
}
function RazorLeaf()
{
   document.REL.message.value+= active[attacker].name + " uses Razor Leaf\n";
   highcritical(242, 55, "Grass", "Special");
}
function RazorWind()
{
   if(active[attacker].charging == 1)
   {
      document.REL.message.value+= active[attacker].name + " uses Razor Wind\n";
      single(191, 80, "Normal", "Physical");
      active[attacker].charging = 0;
   }
   else
   {
      document.REL.message.value+= active[attacker].name + " summons a whirlwind\n";
      active[attacker].charging = 1;
      if(attacker == 0)
         active[0].curattack = playerinput;
      if(attacker == 1)
         active[1].curattack = aiinput;
   }
}
function Recover()
{
   document.REL.message.value+= active[attacker].name + " uses Recover\n";
   halfheal(attacker);
}
function Reflect()
{
   document.REL.message.value+= active[attacker].name + " uses Reflect\n";
   active[attacker].armor = 1;
}
function Rest()
{
   document.REL.message.value+= active[attacker].name + " uses Rest\n";
   if(active[attacker].health != active[attacker].maxhealth)
   {
      document.REL.message.value+= active[attacker].name + " began to Sleep\n";
      healing(active[attacker].maxhealth, attacker);
      active[attacker].status = "Sleep";
      active[attacker].rested = 2;
   }
   else
      document.REL.message.value+= active[attacker].name + " did not need the rest\n";
}
function Roar()
{
   document.REL.message.value+= active[attacker].name + " uses Roar\n";
   hitandswitch(255);
}
function RockSlide()
{
   document.REL.message.value+= active[attacker].name + " uses Rock Slide\n";
   single(229, 75, "Rock", "Physical");
}
function RockThrow()
{
   document.REL.message.value+= active[attacker].name + " uses Rock Throw\n";
   single(165, 50, "Rock", "Physical");
}
function RollingKick()
{
   document.REL.message.value+= active[attacker].name + " uses Rolling Kick\n";
   attackandeffect(216, 60, "Fighting", "Physical", "Scare", 76);
}
function SandAttack()
{
   document.REL.message.value+= active[attacker].name + " uses Sand Attack\n";
   enemymod(255, -1, defender, "accuracy");
}
function Scratch()
{
   document.REL.message.value+= active[attacker].name + " uses Scratch\n";
   single(255, 40, "Normal", "Physical");
}
function Screech()
{
   document.REL.message.value+= active[attacker].name + " uses Screech\n";
   enemymod(216, -2, defender, "defense");
}
function SeismicToss()
{
   document.REL.message.value+= active[attacker].name + " uses Seismic Toss\n";
   hitandinstant(255, active[attacker].level, "Fighting", "Physical");
}
function SelfDestruct()
{
   document.REL.message.value+= active[attacker].name + " uses Self Destruct\n";
   if(single(255, 260, "Normal", "Physical") > 0)
      instantdamage(active[attacker].health, attacker);
}
function Sharpen()
{
   document.REL.message.value+= active[attacker].name + " uses Sharpen\n";
   modify(1, attacker, "strength");
}
function Sing()
{
   document.REL.message.value+= active[attacker].name + " uses Sing\n";
   hitandeffect(140, "Sleep");
}
function SkullBash()
{
   if(active[attacker].charging == 1)
   {
      document.REL.message.value+= active[attacker].name + " uses Skull Bash\n";
     single(255, 100, "Normal", "Physical");
     active[attacker].charging = 0;
   }
   else
   {
      document.REL.message.value+= active[attacker].name + " lowers its head\n";
      active[attacker].charging = 1;
      if(attacker == 0)
         active[0].curattack = playerinput;
      if(attacker == 1)
         active[1].curattack = aiinput;
   }
}
function SkyAttack()
{
   if(active[attacker].charging == 1)
   {
      document.REL.message.value+= active[attacker].name + " uses Sky Attack\n";
      single(229, 140, "Flying", "Physical");
      active[attacker].charging = 0;
   }
   else
   {
      document.REL.message.value+= active[attacker].name + " is glowing\n";
      active[attacker].charging = 1;
      if(attacker == 0)
         active[0].curattack = playerinput;
      if(attacker == 1)
         active[1].curattack = aiinput;
   }
}
function Slam()
{
   document.REL.message.value+= active[attacker].name + " uses Slam\n";
   single(191, 80, "Normal", "Physical");
}
function Slash()
{
   document.REL.message.value+= active[attacker].name + " uses Slash\n";
   highcritical(255, 70, "Normal", "Physical");
}
function SleepPowder()
{
   document.REL.message.value+= active[attacker].name + " uses Sleep Powder\n";
   hitandeffect(191, "Sleep");
}
function Sludge()
{
   document.REL.message.value+= active[attacker].name + " uses Sludge\n";
   attackandeffect(255, 65, "Poison", "Physical", "Poisoned", 102);
}
function Smog()
{
   document.REL.message.value+= active[attacker].name + " uses Smog\n";
   if(single(178, 20, "Poison", "Physical") > 0)
      changestatus("Poisoned");
}
function SmokeScreen()
{
   document.REL.message.value+= active[attacker].name + " uses Smoke Screen\n";
   enemymod(255, -1, defender, "accuracy");
}
function SoftBoiled()
{
   document.REL.message.value+= active[attacker].name + " uses Soft Boiled\n";
   halfheal(attacker);
}
function SolarBeam()
{
   if(active[attacker].charging == 1)
   {
      document.REL.message.value+= active[attacker].name + " uses Solar Beam\n";
      single(255, 120, "Grass", "Special");
      active[attacker].charging = 0;
   }
   else
   {
      document.REL.message.value+= active[attacker].name + " is gathering light\n";
      active[attacker].charging = 1;
      if(attacker == 0)
         active[0].curattack = playerinput;
      if(attacker == 1)
         active[1].curattack = aiinput;
   }
}
function SonicBoom()
{
   document.REL.message.value+= active[attacker].name + " uses Sonic Boom\n";
   hitandinstant(229, 20, "Normal", "Physical");
}
function SpikeCannon()
{
   document.REL.message.value+= active[attacker].name + " uses Spike Cannon\n";
   rapid(255, 20, "Normal", "Physical");
}
function Splash()
{
   document.REL.message.value+= active[attacker].name + " uses Splash\nIt accomplishes nothing\n";
}
function Spore()
{
   document.REL.message.value+= active[attacker].name + " uses Spore\n";
   hitandeffect(255, "Sleep");
}
function Stomp()
{
   document.REL.message.value+= active[attacker].name + " uses Stomp\n";
   attackandeffect(255, 65, "Normal", "Physical", "Scare", 76);
}
function Strength()
{
   document.REL.message.value+= active[attacker].name + " uses Strength\n";
   single(255, 80, "Normal", "Physical");
}
function StringShot()
{
   document.REL.message.value+= active[attacker].name + " uses String Shot\n";
   enemymod(242, -1, defender, "speed");
}
function Struggle()
{
   document.REL.message.value+= active[attacker].name + " has no choice but to Struggle\n";
   recoil(50, 255, "Normal", "Physical", .25);
}
function StunSpore()
{
   document.REL.message.value+= active[attacker].name + " uses Stun Spore\n";
   hitandeffect(191, "Paralyzed");
}
function Submission()
{
   document.REL.message.value+= active[attacker].name + " uses Submission\n";
   recoil(204, 80, "Fighting", "Physical", .25);
}
function Substitute()
{
   if(active[attacker].substitute > 0)
      document.REL.message.value+= active[attacker].name + " uses Substitute\n" + active[attacker].name + " already has a clone out.\n";
   else if(active[attacker].health - Math.floor(active[attacker].maxhealth * .25) > 0)
   {
      document.REL.message.value+= active[attacker].name + " uses Substitute\n" + active[attacker].name + " sent out a clone\n";
      instantdamage(Math.floor(active[attacker].maxhealth * .25), attacker);
      active[attacker].substitute = Math.ceil(active[attacker].maxhealth * .25);
   }
   else
      document.REL.message.value+= active[attacker].name + " uses Substitute\n" + active[attacker].name + " didn't have enough energy to create a clone.\n";
}
function SuperFang()
{
   document.REL.message.value+= active[attacker].name + " uses Super Fang\n";
   hitandinstant(229, active[defender].health * .5, "Normal", "Physical");
}
function SuperSonic()
{
   document.REL.message.value+= active[attacker].name + " uses Super Sonic\n";
   hitandeffect(140, "Confusion");
}
function Surf()
{
   document.REL.message.value+= active[attacker].name + " uses Surf\n";
   single(255, 95, "Water", "Special");
}
function Swift()
{
   document.REL.message.value+= active[attacker].name + " uses Swift\n";
   if(randomize(256) != 256)
      damage(60, "Normal", "Physical");
}
function SwordsDance()
{
   document.REL.message.value+= active[attacker].name + " uses Swords Dance\n";
   modify(2, attacker, "strength");
}
function Tackle()
{
   document.REL.message.value+= active[attacker].name + " uses Tackle\n";
   single(242, 35, "Normal", "Physical");
}
function TailWhip()
{
   document.REL.message.value+= active[attacker].name + " uses Tail Whip\n";
   enemymod(255, -1, defender, "defense");
}
function TakeDown()
{
   document.REL.message.value+= active[attacker].name + " uses Take Down\n";
   recoil(216, 90, "Normal", "Physical", .25);
}
function Teleport()
{
   document.REL.message.value+= active[attacker].name + " uses Teleport\n";
   if(attacker == 0)
   {
      if(battletype == "wild")
      {
         document.REL.message.value+= "Battle has been aborted\n";
         formnotyetsubmitted = false;
         submitWinForm(0);
      }
      else
         document.REL.messagevalue+= active[attacker].name + " cannot leave the battle!\n";
   }
   if(attacker == 1)
   {
      if(battletype == "wild" || battletype == "rare")
      {
         document.REL.message.value+= active[attacker].name + " teleported out of battle\n";
         active[attacker].health = 0;
         active[attacker].status = "Fainted";
         for(var ridxp = 0; ridxp < 6; ridxp++)
            usedagainst[current[1]][ridxp] = false;
         GetStrongerAI();
      }
      else
      {
         document.REL.message.value+= active[attacker].name + " teleported away\n";
         GetStrongerAI();
      }
   }
}
function Thrash()
{
   if(active[attacker].thrashing == 0)
   {
	active[attacker].thrashing = randomize(2)+ 3;
      document.REL.message.value+= active[attacker].name + " uses Thrash\n";
      active[attacker].curattack = "Thrash()";
   }
   thrashabout(255, 90, "Normal", "Physical");
}
function Thunder()
{
   document.REL.message.value+= active[attacker].name + " uses Thunder\n";
   attackandeffect(191, 120, "Electric", "Special", "Paralyzed", 25);
}
function ThunderWave()
{
   document.REL.message.value+= active[attacker].name + " uses Thunder Wave\n";
   if(active[defender].type[0] != "Ground" && active[defender].type[1] != "Ground")
      hitandeffect(255, "Paralyzed");
   else
      document.REL.message.value+= "The attack had no effect\n";
}
function ThunderBolt()
{
   document.REL.message.value+= active[attacker].name + " uses Thunder Bolt\n";
   attackandeffect(255, 95, "Electric", "Special", "Paralyzed", 25);
}
function ThunderPunch()
{
   document.REL.message.value+= active[attacker].name + " uses Thunder Punch\n";
   attackandeffect(255, 75, "Electric", "Special", "Paralyzed", 25);
}
function ThunderShock()
{
   document.REL.message.value+= active[attacker].name + " uses Thunder Shock\n";
   attackandeffect(255, 40, "Electric", "Special", "Paralyzed", 25);
}
function Toxic()
{
   document.REL.message.value+= active[attacker].name + " uses Toxic\n";
   hitandeffect(216, "Toxiced");
}
function Transform()
{
   document.REL.message.value+= active[attacker].name + " uses Transform\n";
   for(var trans = 0; trans < 4; trans++)
   {
	active[attacker].transattack[trans] = active[attacker].attack[trans];
	active[attacker].transpower[trans] = active[attacker].power[trans];
	active[attacker].attack[trans] = active[defender].attack[trans];
	active[attacker].power[trans] = 5;
   }
   active[attacker].strength = active[defender].strength;
   active[attacker].defense = active[defender].defense;
   active[attacker].speed = active[defender].speed;
   active[attacker].special = active[defender].special;
   active[attacker].basestrength = active[defender].basestrength;
   active[attacker].basedefense = active[defender].basedefense;
   active[attacker].basespeed = active[defender].basespeed;
   active[attacker].basespecial = active[defender].basespecial;
   active[attacker].accuracy = active[defender].accuracy;
   active[attacker].evade = active[defender].evade;
   active[attacker].baseaccuracy = active[defender].baseaccuracy;
   active[attacker].baseevade= active[defender].baseevade;
   active[attacker].type[0] = active[defender].type[0];
   active[attacker].type[1] = active[defender].type[1];
   SetBattleField(attacker, current[attacker]);
   if(attacker == 0)
   {
	if(active[defender].species == "Farfetch\'d")
	   document.pokepic0.src = "/league/Farfetchd.jpg";
	else
           document.pokepic0.src = "/league/" + active[defender].species + ".jpg";
   }
   if(attacker == 1)
   {
	if(active[defender].species == "Farfetch\'d")
           document.pokepic1.src = "/league/Farfetchd.jpg";
	else
           document.pokepic1.src = "/league/" + active[defender].species + ".jpg";
   }
}
function TriAttack()
{
   document.REL.message.value+= active[attacker].name + " uses TriAttack\n";
   single(255, 80, "Normal", "Physical");
}
function Twineedle()
{
   document.REL.message.value+= active[attacker].name + " uses Twineedle\n";
   if(doubleattack(255, 25, "Bug", "Physical") > 0)
      statuseffect("Poisoned", 51);
}
function ViceGrip()
{
   document.REL.message.value+= active[attacker].name + " uses Vice Grip\n";
   single(255, 55, "Normal", "Physical");
}
function VineWhip()
{
   document.REL.message.value+= active[attacker].name + " uses Vine Whip\n";
   single(255, 35, "Grass", "Special");
}
function WaterGun()
{
   document.REL.message.value+= active[attacker].name + " uses Water Gun\n";
   single(255, 40, "Water", "Special");
}
function Waterfall()
{
   document.REL.message.value+= active[attacker].name + " uses Waterfall\n";
   single(255, 80, "Water", "Special");
}
function WhirlWind()
{
   document.REL.message.value+= active[attacker].name + " uses Whirl Wind\n";
   hitandswitch(216);
}
function WingAttack()
{
   document.REL.message.value+= active[attacker].name + " uses Wing Attack\n";
   single(255, 35, "Flying", "Physical");
}
function Withdraw()
{
   document.REL.message.value+= active[attacker].name + " uses Withdraw\n";
   modify(1, attacker, "defense");
}
function Wrap()
{
   if(active[attacker].bound > 0)
      document.REL.message.value+= active[attacker].name + "\'s attack continues\n";
   else
      document.REL.message.value+= active[attacker].name + " uses Wrap\n";
   continual(216, 15, "Normal", "Physical");
}
//Begin Made Up Attacks
function DragonFlare()
{
   document.REL.message.value+= active[attacker].name + " uses Dragon Flare\n";
   attackandeffect(229, 80, "Dragon", "Special", "Burned", 25);
}
//Begin Attack Skeletons
function statuseffect(effect, chance)
{
   if(randomize(256) <= chance)
      changestatus(effect);
}
function changestatus(effect)
{
   if(effect == "Confusion")
   {
      active[defender].confused = 4;
      document.REL.message.value+= active[defender].name + " became Confused\n";
   }
   else if(effect == "Scare")
   {
      active[defender].scared = 1;
   }
   else
   {
      if(active[defender].status != "OK")
         return 0;
      if((active[defender].type[0] == "Poison" || active[defender].type[1] == "Poison") && (effect == "Poisoned" || effect == "Toxiced"))
         return 0;
      if(active[defender].substitute > 0)
         return 0;
      active[defender].status = effect;
      if(effect == "Sleep")
	{
         document.REL.message.value+= active[defender].name + " was put to Sleep\n";
	   active[defender].sleep = randomize(8);
	}
      else
         document.REL.message.value+= active[defender].name + " was " + effect + "\n";
	if(effect == "Burned")
         active[defender].strength = Math.ceil(active[defender].strength / 2);
	if(effect == "Paralyzed")
         active[defender].speed = Math.ceil(active[defender].speed / 4);
   }
}
function damage(powerrating, type, state)
{
   var damagedone;
   if(state == "Physical")
      damagedone = damagephys(powerrating, type);
   if(state == "Special")
      damagedone = damagespec(powerrating, type);
   damagedone = Math.ceil(damagedone);
   var elementaltimes = elementalcheck(type, active[defender].type[0]) * elementalcheck(type, active[defender].type[1]);
   if(elementaltimes == .5 || elementaltimes == .25)
      document.REL.message.value+= "The attack isn't very effective\n";
   if(elementaltimes == 0)
      document.REL.message.value+= "The attack has no effect\n";
   if(elementaltimes == 2 || elementaltimes == 4)
      document.REL.message.value+= "The attack is super effective\n";
   if(active[defender].substitute == 0)
      active[defender].health-= damagedone;
   if(active[defender].substitute > 0)
   {
      active[defender].substitute-= damagedone;
      if(active[defender].substitute <= 0)
      {
         document.REL.message.value+= active[defender].name + "\'s substitute was destroyed\n";
         active[defender].substitute = -1;
      }
   }
   if(damagedone > 0 && active[defender].status == "Frozen" && type == "Fire")
   {
      document.REL.message.value+= active[defender].name + " was thawed out\n";
      active[defender].status = "OK";
   }
   if(active[defender].health <= 0)
   {
      active[defender].health = 0;
	deathCheck(defender);
   }
   if(defender == 0)
   {
      document.REL.life0.value = active[0].health + "/" + active[0].maxhealth;
   }
   if(defender == 1)
   {
      document.REL.life1.value = "";
      for(var setlife = Math.ceil((active[1].health / active[1].maxhealth) * 10); setlife > 0; setlife--)
         document.REL.life1.value+= "<";
   }
   return Math.ceil(damagedone);
}
function damagephys(powerrating, type)
{
   var defenserating = active[defender].defense;
   var attackrating = active[attacker].strength;
   if(active[defender].armor == 1)
      defenserating*= 2;
   if(active[attacker].critical == 3)
      critical = Math.round((active[attacker].critrate * 16) / 2.56);
   else if(active[attacker].critical > 0)
      critical = Math.round((active[attacker].critrate * 2) / 2.56);
   else
      critical = Math.round((active[attacker].critrate / 2) / 2.56);
   if(critical > 255)
      critical = 255;
   if(critical >= randomize(256))
   {
      if(attackrating < active[attacker].basestrength * 2)
         attackrating = active[attacker].basestrength * 2;
      if(defenserating > active[defender].basedefense)
	   defenserating = active[defender].basedefense;
      document.REL.message.value+= "Critical hit\n";
   }
   var matching = 1;
   if(type == active[attacker].type[0] && type == active[attacker].type[1])
      matching = 1.5;
   var damagedone = (((((((2 * active[attacker].level / 5 + 2) * powerrating * attackrating / defenserating) / 50) + 2) * matching) * elementalcheck(type, active[defender].type[0]) * elementalcheck(type, active[defender].type[1])) * (randomize(38) + 217) / 255);
   active[defender].physdam+= damagedone;
   if(type == "Normal" || type == "Fighting")
      active[defender].counterer+= damagedone;
   return damagedone;
}
function damagespec(powerrating, type)
{
   var attackinglev = active[attacker].level;
   var defenserating = active[defender].special;
   var attackrating = active[attacker].special;
   if(active[defender].screen == 1)
      attackinglev = Math.ceil(attackinglev / 2);
   if(active[attacker].critical == 3)
      critical = Math.round((active[attacker].critrate * 16) / 2.56);
   else if(active[attacker].critical > 0)
      critical = Math.round((active[attacker].critrate * 2) / 2.56);
   else
      critical = Math.round((active[attacker].critrate / 2) / 2.56);
   if(critical > 255)
      critical = 255;
   if(critical >= randomize(256))
   {
      attackinglev = active[attacker].level * 2;
      document.REL.message.value+= "Critical hit\n";
   }
   var matching = 1;
   if(type == active[attacker].type[0] && type == active[attacker].type[1])
      matching = 1.5;
   var damagedone = (((((((((2 * attackinglev / 5 + 2) * powerrating * attackrating) / defenserating) / 50) + 2) * matching) * (elementalcheck(type, active[defender].type[0]) * elementalcheck(type, active[defender].type[1]) * 10) / 10) * (randomize(38) + 217)) / 255);
   active[defender].specdam+= damagedone;
   return damagedone;
}
function disabled()
{
   document.REL.message.value+= active[attacker].name + "\'s attack is disabled\n";
}
function killornil(accuracy)
{
   if(hit(accuracy) == 1 && active[attacker].speed >= active[defender].speed)
      instantdamage(active[defender].health, defender);
   else
      document.REL.message.value+= active[attacker].name + "\'s attack missed\n";
}
function hitandinstant(accuracy, amount, type, state)
{
   if(hit(accuracy) == 1)
   {
      if(elementalcheck(type, active[defender].type[0]) * elementalcheck(type, active[defender].type[1]) == 0)
         document.REL.message.value+= "The attack had no effect\n";
      else
	{
	   if(state == "Physical")
		active[defender].physdam+= amount;
         if(type == "Normal" || type == "Fighting")
		active[defender].counterer+= amount;
	   if(state == "Special")
		active[defender].specdam+= amount;
	   if(active[defender].substitute == 0)
	      active[defender].health-= amount;
	   if(active[defender].substitute > 0)
	   {
	      active[defender].substitute-= amount;
	      if(active[defender].substitute <= 0)
	      {
	         document.REL.message.value+= active[defender].name + "\'s substitute was destroyed\n";
	         active[defender].substitute = 0;
	      }
	   }
	   if(active[defender].health <= 0)
	   {
	      active[defender].health = 0;
		deathCheck(defender);
	   }
	   if(defender == 0)
	   {
	      document.REL.life0.value = active[0].health + "/" + active[0].maxhealth;
	   }
	   if(defender == 1)
	   {
	      document.REL.life1.value = "";
	      for(var setlife = Math.ceil((active[1].health / active[1].maxhealth) * 10); setlife > 0; setlife--)
	         document.REL.life1.value+= "<";
	   }
	}
   }
   else
      document.REL.message.value+= active[attacker].name + "\'s attack missed\n";
}
function hitandswitch(accuracy)
{
   var remaining = 0;
   for(var check = 0; check < 6; check++)
   {
	if(trainer[defender][check].health > 0)
	   remaining++;
   }
   if(remaining > 1 && battletype == "wild")
   {
	if(hit(accuracy) == 1)
	{
         var switchto = randomize(6) - 1;
         while(trainer[defender][switchto].health <= 0 || switchto == current[defender])
	   {
	      switchto = randomize(6) - 1;
	   }
	   SwitchPokemon(switchto, defender);
         aiinput = "";
         playerinput = "";
	}
	else
	{
	   document.REL.message.value+= active[attacker].name + "\'s attack missed\n";
	}
   }
   else
      document.REL.message.value+= active[attacker].name + "\'s attack failed\n";
}
function doubleback(accuracy, type, state)
{
   if(state == "Physical")
      hitandinstant(accuracy, active[attacker].physdam * 2, type, state);
   if(state == "Counter")
      hitandinstant(accuracy, active[attacker].counterer * 2, type, state);
   if(state == "Special")
      hitandinstant(accuracy, active[attacker].specdam * 2, type, state);
}
function instantdamage(amount, towhom)
{
   active[towhom].health-= Math.ceil(amount);
   if(active[towhom].health <= 0)
   {
      active[towhom].health = 0;
      deathCheck(towhom);
   }
   if(towhom == 0)
   {
      document.REL.life0.value = active[0].health + "/" + active[0].maxhealth;
   }
   if(towhom == 1)
   {
      document.REL.life1.value = "";
      for(var setlife = Math.ceil((active[1].health / active[1].maxhealth) * 10); setlife > 0; setlife--)
         document.REL.life1.value+= "<";
   }
}
function healing(amount, towhom)
{
   active[towhom].health+= Math.ceil(amount);
   if(active[towhom].health > active[towhom].maxhealth)
   {
      active[towhom].health = active[towhom].maxhealth;
   }
   if(towhom == 0)
   {
      document.REL.life0.value = active[0].health + "/" + active[0].maxhealth;
   }
   if(towhom == 1)
   {
      document.REL.life1.value = "";
      for(var setlife = Math.ceil((active[1].health / active[1].maxhealth) * 10); setlife > 0; setlife--)
         document.REL.life1.value+= "<";
   }
   return Math.ceil(amount);
}
function halfheal(towhom)
{
   healing(active[attacker].maxhealth * .5, towhom);
}
function hit(accuracy)
{
   var modacc = Math.floor(accuracy * active[attacker].accuracy * (1-active[defender].evade));
   if(modacc > 255) modacc = 255;
   if(randomize(256) <= modacc && active[defender].unhit != 1)
      return 1;
   return 0;
}
function single(accuracy, powerrating, type, state)
{
   var damagedone = 0;
   if(hit(accuracy) == 1)
      damagedone = damage(powerrating, type, state); 
   else
      document.REL.message.value+= active[attacker].name + "\'s attack missed\n";
   return damagedone;
}
function steallife(accuracy, powerrating, type, state, percentage)
{
   healing(single(accuracy, powerrating, type, state) * percentage, attacker);
}
function recoil(accuracy, powerrating, type, state, percentage)
{
   instantdamage(single(accuracy, powerrating, type, state) * percentage, attacker);
}
function highcritical(accuracy, powerrating, type, state)
{
   active[attacker].critical++;
   single(accuracy, powerrating, type, state);
}
function doubleattack(accuracy, powerrating, type, state)
{
   var hits = 0;
   if(hit(accuracy) == 1)
   {
      damage(powerrating, type, state);
      hits++;
   }
   if(hit(accuracy) == 1)
   {
      damage(powerrating, type, state);
      hits++
   }
   document.REL.message.value+= "Hit " + hits + " times\n";
   return hits;
}
function thrashabout(accuracy, powerrating, type, state)
{
   document.REL.message.value+= active[attacker].name + " is thrashing about\n";
   single(accuracy, powerrating, type, state);
   if(attacker == 0)
      active[0].curattack = playerinput;
   if(attacker == 1)
      active[1].curattack = aiinput;
   active[attacker].thrashing--;
   if(active[attacker].thrashing <= 0)
   {
      document.REL.message.value+= active[attacker].name + " became confused\n";
      active[attacker].confused = 1;
   }
}
function rapid(accuracy, powerrating, type, state)
{
   if(hit(accuracy) == 1)
   {
	var seed = randomize(100);
	var timehit = 3;
	if(seed <= 37)
	   timehit = 2;
	else if(seed > 37 && seed <= 74)
	   timehit = 3;
	else if(seed > 74 && seed <= 87)
	   timehit = 4;
	else if(seed > 87 && seed <= 100)
	   timehit = 5;
	for(var upto = 1; upto <= timehit; upto++)
	   damage(powerrating, type, state);
      document.REL.message.value+= "Hit " + timehit + " times\n";
   }
   else
      document.REL.message.value+= active[attacker].name + " missed\n";
}
function continual(accuracy, powerrating, type, state)
{
   var damagedone = 0;
   if(active[attacker].bound > 0)
   {
      active[attacker].bound++;
      damagedone = damage(powerrating, type, state);
      if(active[attacker].bound >= active[attacker].binding)
      {
         active[attacker].bound = 0;
	   active[attacker].binding = 0;
         active[defender].bound = 0;
         if(attacker == 0)
            active[0].curattack = "";
         if(attacker == 1)
            active[1].curattack = "";
         return 0;
      };
      return damagedone;
   }
   if(active[attacker].bound == 0)
   {
      if(hit(accuracy) == 1)
      {
         active[attacker].bound = 1;
         active[defender].bound = -1;
         damagedone = damage(powerrating, type, state);
         if(attacker == 0)
            active[0].curattack = playerinput;
         if(attacker == 1)
            active[1].curattack = aiinput;
	   var seed = randomize(100);
           active[attacker].binding = 3;
         if(seed <= 37)
	      active[attacker].binding = 2;
  	   else if(seed > 37 && seed <= 74)
	      active[attacker].binding = 3;
	   else if(seed > 74 && seed <= 87)
	      active[attacker].binding = 4;
	   else if(seed > 87 && seed <= 100)
	      active[attacker].binding = 5;
      }
      else
         document.REL.message.value+= active[attacker].name + " missed\n";
   }
   return damagedone;
}
function missandinjure(accuracy, attackpower, type, state, failuredamage)
{
   if(single(accuracy, attackpower, type, state) == 0)
   {
      document.REL.message.value+= active[attacker].name + " kept going and crashed\n";
      if(state == "Physical")
         instantdamage(Math.ceil(damagephys(attackpower, type) * failuredamage), attacker);
      if(state == "Special")
         instantdamage(Math.ceil(damagespec(attackpower, type) * failuredamage), attacker);
   }
}
function modify(amount, towhom, towhat)
{
   if(active[defender].mist == 1 && amount < 0 || active[defender].substitute > 0 && amount < 0)
      document.REL.message.value+= active[defender].name + " was protected from the status change\n";
   else if(eval('active[towhom].mod' + towhat) == 6 && amount > 0)
      document.REL.message.value+= active[towhom].name + "\'s " + towhat.charAt(0).toUpperCase() + towhat.substring(1, towhat.length) + " cannot increase anymore\n";
   else if(eval('active[towhom].mod' + towhat) == -6 && amount < 0)
      document.REL.message.value+= active[towhom].name + "\'s " + towhat.charAt(0).toUpperCase() + towhat.substring(1, towhat.length) + " cannot decrease anymore\n";
   else
   {
      eval('active[towhom].mod' + towhat + '+= amount');
      if(eval('active[towhom].mod' + towhat) > 6)
         eval('active[towhom].mod' + towhat + ' = 6');
      if(eval('active[towhom].mod' + towhat) < -6)
         eval('active[towhom].mod' + towhat + ' = -6');
	if(towhat == "accuracy")
	{
         if(eval('active[towhom].mod' + towhat) == -6)
		active[towhom].accuracy = .30;
         if(eval('active[towhom].mod' + towhat) == -5)
		active[towhom].accuracy = .34;
         if(eval('active[towhom].mod' + towhat) == -4)
		active[towhom].accuracy = .37;
         if(eval('active[towhom].mod' + towhat) == -3)
		active[towhom].accuracy = .425;
         if(eval('active[towhom].mod' + towhat) == -2)
		active[towhom].accuracy = .5;
         if(eval('active[towhom].mod' + towhat) == -1)
		active[towhom].accuracy = .67;
         if(eval('active[towhom].mod' + towhat) == 0)
		active[towhom].accuracy = 1;
	}
	else if(towhat == "evade")
	{
         if(eval('active[towhom].mod' + towhat) == 6)
		active[towhom].evade = .7;
         if(eval('active[towhom].mod' + towhat) == 5)
		active[towhom].evade = .66;
         if(eval('active[towhom].mod' + towhat) == 4)
		active[towhom].evade = .63;
         if(eval('active[towhom].mod' + towhat) == 3)
		active[towhom].evade = .575;
         if(eval('active[towhom].mod' + towhat) == 2)
		active[towhom].evade = .5;
         if(eval('active[towhom].mod' + towhat) == 1)
		active[towhom].evade = .33;
         if(eval('active[towhom].mod' + towhat) == 0)
		active[towhom].evade = 0;
	}
	else
	{
         if(eval('active[towhom].mod' + towhat) == -6)
            eval('active[towhom].' + towhat + ' = Math.round(active[towhom].base' + towhat + ' * (1 / 4))');
         if(eval('active[towhom].mod' + towhat) == -5)
            eval('active[towhom].' + towhat + ' = Math.round(active[towhom].base' + towhat + ' * (2 / 7))');
         if(eval('active[towhom].mod' + towhat) == -4)
            eval('active[towhom].' + towhat + ' = Math.round(active[towhom].base' + towhat + ' * (1 / 3))');
         if(eval('active[towhom].mod' + towhat) == -3)
            eval('active[towhom].' + towhat + ' = Math.round(active[towhom].base' + towhat + ' * (1 / 2.5))');
         if(eval('active[towhom].mod' + towhat) == -2)
            eval('active[towhom].' + towhat + ' = Math.round(active[towhom].base' + towhat + ' * (1 / 2))');
         if(eval('active[towhom].mod' + towhat) == -1)
            eval('active[towhom].' + towhat + ' = Math.round(active[towhom].base' + towhat + ' * (1 / 1.5))');
         if(eval('active[towhom].mod' + towhat) == 0)
            eval('active[towhom].' + towhat + ' = Math.round(active[towhom].base' + towhat + ')');
         if(eval('active[towhom].mod' + towhat) == 1)
            eval('active[towhom].' + towhat + ' = Math.round(active[towhom].base' + towhat + ' * 1.5)');
         if(eval('active[towhom].mod' + towhat) == 2)
            eval('active[towhom].' + towhat + ' = Math.round(active[towhom].base' + towhat + ' * 2)');
         if(eval('active[towhom].mod' + towhat) == 3)
            eval('active[towhom].' + towhat + ' = Math.round(active[towhom].base' + towhat + ' * 2.5)');
         if(eval('active[towhom].mod' + towhat) == 4)
            eval('active[towhom].' + towhat + ' = Math.round(active[towhom].base' + towhat + ' * 3)');
         if(eval('active[towhom].mod' + towhat) == 5)
            eval('active[towhom].' + towhat + ' = Math.round(active[towhom].base' + towhat + ' * 3.5)');
         if(eval('active[towhom].mod' + towhat) == 6)
            eval('active[towhom].' + towhat + ' = Math.round(active[towhom].base' + towhat + ' * 4)');
         if(towhat == "speed" && active[towhom].status == "Paralyzed" && amount < 0)
            active[towhom].speed = Math.ceil(active[towhom].speed / 4);
         if(towhat == "strength" && active[towhom].status == "Burned" && amount < 0)
            active[towhom].strength = Math.ceil(active[towhom].strength / 2);
	}
	if(eval('active[towhom].' + towhat) > 999)
	   eval('active[towhom].' + towhat + ' = 999');
      document.REL.message.value+= active[towhom].name + "\'s " + towhat.charAt(0).toUpperCase() + towhat.substring(1, towhat.length) + " ";
      if(amount == -2)
         document.REL.message.value+= "decreased greatly\n";
      if(amount == -1)
         document.REL.message.value+= "decreased\n";
      if(amount == 1)
         document.REL.message.value+= "increased\n";
      if(amount == 2)
         document.REL.message.value+= "increased greatly\n";
   }
}
function enemymod(accuracy, amount, towhom, towhat)
{
   if(hit(accuracy) == 1)
      modify(amount, towhom, towhat);
   else
      document.REL.message.value+= active[attacker].name + "\'s attack missed\n";
}
function hitandeffect(accuracy, statuscon)
{
   if(hit(accuracy) == 1)
      changestatus(statuscon);
   else
      document.REL.message.value+= active[attacker].name + "\'s attack missed\n";
}
function attackandeffect(accuracy, attackpower, type, state, statuscon, chance)
{
   if(single(accuracy, attackpower, type, state) > 0 && active[defender].health > 0)
      statuseffect(statuscon, chance);
}
function attackandmod(accuracy, attackpower, type, state, towhat, amount, chance)
{
   if(single(accuracy, attackpower, type, state) > 0)
      if(randomize(256) <= chance && active[defender].health > 0)
         modify(amount, defender, towhat);
}
function deathCheck(index)
{
   active[index].status = "Fainted";
   if(index == 0)
   {
	document.REL.message.value+= active[0].name + " was knocked out\nChoose a new one\n";
	if(trainer[0][0].health == 0 && trainer[0][1].health == 0 && trainer[0][2].health == 0 && trainer[0][3].health == 0 && trainer[0][4].health == 0 && trainer[0][5].health == 0)
	{
         alert("All of your Pokemon have been knocked out.");
	   formnotyetsubmitted = false;
         submitWinForm(-1);
	}
   }
   if(index == 1)
   {
      document.REL.message.value+= active[1].name + " was knocked out\n";
      aiinput = "";
   }
}
function randomize(seed)
{
   var returnthing = Math.round((Math.random() * (seed -1)) + 1);
   return returnthing;
}
function bigelementalcheck(type11, type12, type21, type22)
{
   return elementalcheck(type11, type21) * elementalcheck(type11, type22) * elementalcheck(type12, type21) * elementalcheck(type12, type22);
}
function elementalcheck(type1, type2)
{
   var advantage = 1;
   if(type1 == "Normal" && type2 == "Rock")
      advantage*= .5;
   if(type1 == "Normal" && type2 == "Ghost")
      advantage = 0;
   if(type1 == "Fire" && (type2 == "Grass" || type2 == "Bug" || type2 == "Ice"))
      advantage*= 2;
   if(type1 == "Fire" && (type2 == "Fire" || type2 == "Rock" || type2 == "Water" || type2 == "Dragon"))
      advantage*= .5;
   if(type1 == "Water" && (type2 == "Fire" || type2 == "Rock" || type2 == "Ground"))
      advantage*= 2;
   if(type1 == "Water" && (type2 == "Water" || type2 == "Grass" || type2 == "Dragon"))
      advantage*= .5;
   if(type1 == "Electric" && (type2 == "Water" || type2 == "Flying"))
      advantage*= 2;
   if(type1 == "Electric" && (type2 == "Electric" || type2 == "Grass" || type2 == "Dragon"))
      advantage*= .5;
   if(type1 == "Electric" && type2 == "Ground")
      advantage*= 0;
   if(type1 == "Grass" && (type2 == "Water" || type2 == "Ground" || type2 == "Rock"))
      advantage*= 2;
   if(type1 == "Grass" && (type2 == "Fire" || type2 == "Grass" || type2 == "Poison" || type2 == "Flying" || type2 == "Bug" || type2 == "Dragon"))
      advantage*= .5;
   if(type1 == "Ice" && (type2 == "Grass" || type2 == "Flying" || type2 == "Ground" || type2 == "Dragon"))
      advantage*= 2;
   if(type1 == "Ice" && (type2 == "Water" || type2 == "Ice"))
      advantage*= .5;
   if(type1 == "Fighting" && (type2 == "Normal" || type2 == "Rock" || type2 == "Ice"))
      advantage*= 2;
   if(type1 == "Fighting" && (type2 == "Poison" || type2 == "Flying" || type2 == "Psychic" || type2 == "Bug"))
      advantage*= .5;
   if(type1 == "Fighting" && type2 == "Ghost")
      advantage*= 0;
   if(type1 == "Poison" && (type2 == "Grass" || type2 == "Bug"))
      advantage*= 2;
   if(type1 == "Poison" && (type2 == "Poison" || type2 == "Ground" || type2 == "Rock" || type2 == "Ghost"))
      advantage*= .5;
   if(type1 == "Ground" && (type2 == "Fire" || type2 == "Electric" || type2 == "Rock" || type2 == "Poison"))
      advantage*= 2;
   if(type1 == "Ground" && (type2 == "Bug" || type2 == "Grass"))
      advantage*= .5;
   if(type1 == "Ground" && type2 == "Flying")
      advantage*= 0;
   if(type1 == "Flying" && (type2 == "Grass" || type2 == "Fighting" || type2 == "Bug"))
      advantage*= 2;
   if(type1 == "Flying" && (type2 == "Electric" || type2 == "Rock"))
      advantage*= .5;
   if(type1 == "Psychic" && (type2 == "Fighting" || type2 == "Poison"))
      advantage*= 2;
   if(type1 == "Psychic" && type2 == "Psychic")
      advantage*= .5;
   if(type1 == "Bug" && (type2 == "Grass" || type2 == "Psychic" || type2 == "Poison"))
      advantage*= 2;
   if(type1 == "Bug" && (type2 == "Fire" || type2 == "Fighting" || type2 == "Flying"))
      advantage*= .5;
   if(type1 == "Rock" && (type2 == "Fire" || type2 == "Ice" || type2 == "Bug" || type2 == "Flying"))
      advantage*= 2;
   if(type1 == "Rock" && (type2 == "Fighting" || type2 == "Ground"))
      advantage*= .5;
   if(type1 == "Ghost" && type2 == "Ghost")
      advantage*= 2;
   if(type1 == "Ghost" && (type2 == "Normal" || type2 == "Psychic"))
      advantage*= 0;
   if(type1 == "Dragon" && type2 == "Dragon")
      advantage*= 2;
   return advantage;
}
//Begin Other Functions
function SwitchOptions()
{
   if(document.REL.chooseact.value == "attack")
   {
      if(CheckOption(0) == 0)
      {
         playerinput = " ";
         return 0;
      };
      document.REL.playerchoice.length = 5;
	for(var atts = 0; atts < 4; atts++)
	{
	   document.REL.playerchoice.options[atts + 1].value = active[0].attack[atts];
	   document.REL.playerchoice.options[atts + 1].text = active[0].attack[atts].substring(0, active[0].attack[atts].length - 2) + " - " + active[0].power[atts];
	}
      for(var dissed = 1; dissed <= 4; dissed++)
      {
         if(active[0].disabled[dissed - 1] > 0)
         {
            document.REL.playerchoice.options[dissed].text = "disabled";
            document.REL.playerchoice.options[dissed].value = "disabled()";
         }
      }
   }
   if(document.REL.chooseact.value == "switch")
   {
      document.REL.playerchoice.length = 7;
	for(var poks = 0; poks < 6; poks++)
	{
         document.REL.playerchoice.options[poks + 1].value = poks;
         document.REL.playerchoice.options[poks + 1].text = trainer[0][poks].name + " - " + trainer[0][poks].status;
	}
   }
   if(document.REL.chooseact.value == "catch")
   {
      document.REL.playerchoice.length = 1;
      document.REL.playerchoice.length = 5;
      document.REL.playerchoice.options[1].value = 1;
      document.REL.playerchoice.options[1].text = "PokeBalls - " + pokeballs[0];
      document.REL.playerchoice.options[2].value = 2;
      document.REL.playerchoice.options[2].text = "GreatBalls - " + pokeballs[1];
      document.REL.playerchoice.options[3].value = 3;
      document.REL.playerchoice.options[3].text = "UltraBalls - " + pokeballs[2];
      document.REL.playerchoice.options[4].value = 4;
      document.REL.playerchoice.options[4].text = "MasterBalls - " + pokeballs[3];
   }
   if(document.REL.chooseact.value == "run")
   {
      document.REL.playerchoice.length = 2;
      document.REL.playerchoice.options[1].value = " ";
	document.REL.playerchoice.options[1].text = "Run";
   }
   document.REL.playerchoice.selectedIndex = 0;
   document.REL.playerchoice.focus();
}
function findAttack(name, index)
{
   rval = -1;
   for(var n = 0; n < 4; n++)
   {
	if(active[index].attack[n] == name)
	   rval = n;
   }
   return rval;
}
function noOption(index)
{
   if((active[index].disabled[0] > 0 || active[index].power[0] == 0) && (active[index].disabled[1] > 0 || active[index].power[1] == 0) && (active[index].disabled[2] > 0 || active[index].power[2] == 0) && (active[index].disabled[3] > 0 || active[index].power[3] == 0))
	return true;
   else
	return false;
}
function CheckChoice()
{
   if(document.REL.chooseact.value == "attack")
   {
      if(noOption(0))
	   playerinput = "Struggle()";
      else if(document.REL.playerchoice.value != -1)
	   if(active[0].power[(document.REL.playerchoice.selectedIndex - 1)] > 0)
            playerinput = document.REL.playerchoice.value;
   }
   if(document.REL.chooseact.value == "switch")
      Retreat(document.REL.playerchoice.value);
   if(document.REL.chooseact.value == "catch")
      playerinput = " ";
   if(document.REL.chooseact.value == "run")
   {
	for(var count = 0; count < 6; count++)
	   usedagainst[current[1]][count] = false;
	formnotyetsubmitted = false;
      if(battletype == "wild")
         submitWinForm(0);
      else
         submitWinForm(-1);
   }
}
function NullOut(trainernum)
{
   with(active[trainernum])
   {
      strength = basestrength;
      defense = basedefense;
      speed = basespeed;
      special = basespecial;
      accuracy = baseaccuracy;
      evade = baseevade;
      modstrength = 0;
      modspeed = 0;
      moddefense = 0;
      modspecial = 0;
      modaccuracy = 0;
      modevade = 0;
      critical = 0;
      confused = 0;
	sleep = 0;
      toxic = 0;
      disabled[0] = 0;
      disabled[1] = 0;
      disabled[2] = 0;
      disabled[3] = 0;
      armor = 0;
      screen = 0;
      mist = 0;
      leechseed = 0;
   }
}
function SwitchPokemon(newpoke, trainernum)
{
   if(active[trainernum].mimiced > 0)
   {
      active[trainernum].attack[active[trainernum].mimiced - 1] = "Mimic()";
   }
   if(active[trainernum].transattack[0] != "")
   {
      var deadflag = 0;
	var orig = trainer[trainernum][current[trainernum]];
	var lifemark = orig.health;
	var maxlifemark = orig.maxhealth;
      if(active[trainernum].health <= 0)
         deadflag = 1;
	// does not set stat XP since stat XP is not part of Pokemon object
      createPokemon(trainernum, current[trainernum], orig.species, orig.name, orig.level, orig.xp, 0, orig.strdv, 0, orig.spddv, 0, orig.defdv, 0, orig.spedv, 0, 0, active[trainernum].transattack[0], 0, active[trainernum].transattack[1], 0, active[trainernum].transattack[2], 0, active[trainernum].transattack[3], 0, orig.item, orig.happiness)
	//equalizePokemon(trainernum, current[trainernum], active[trainernum].name, active[trainernum].level);
	for(var trans = 0; trans < 4; trans++)
	{
	   active[trainernum].attack[trans] = active[trainernum].transattack[trans];
	   active[trainernum].power[trans] = active[trainernum].transpower[trans];
	   active[trainernum].transattack[trans] = "";
	   active[trainernum].transpower[trans] = 0;
	}
	active[trainernum].health = lifemark;
	active[trainernum].maxhealth = maxlifemark;
      if(deadflag == 1)
         trainer[trainernum][current[trainernum]].health = 0;
   }
   NullOut(trainernum);
   with(active[trainernum])
   {
      charging = 0;
      unhit = 0;
      curattack = "";
      scared = 0;
      mimiced = 0;
      enraged = 0;
      thrashing = 0;
      biding = 0;
      substitute = 0;
   };
   active[0].bound = 0;
   active[0].binding = 0;
   active[1].bound = 0;
   active[1].binding = 0;
   current[trainernum] = newpoke;
   SetBattleField(trainernum, newpoke);
   if(active[trainernum].status == "Paralyzed")
      active[trainernum].speed = Math.ceil(active[trainernum].speed / 4);
   if(active[trainernum].status == "Burned")
      active[trainernum].strength = Math.ceil(active[trainernum].strength / 2);
   document.REL.message.value+= active[trainernum].name + " was brought out\n";
}
function CatchPokemon(place)
{
   if(pokeballs[place - 1] <= 0)
   {
      document.REL.message.value+= "You do not have any of those\n";
	return false;
   }
   pokeballs[place - 1]--;
   var statusbonus = 0;
   if(active[1].status == "Frozen" || active[1].status == "Asleep")
      statusbonus = 10;
   else if(active[1].status != "OK")
      statusbonus = 5;
   var curhealth = trainer[1][current[1]].health;
   var maxhealth = trainer[1][current[1]].maxhealth;
   var catchrate = trainer[1][current[1]].catchdif;
   if(place == 2) // Great Ball
      catchrate*= 1.5;
   if(place == 3) // Ultra Ball
      catchrate*= 2;
   if(curhealth > 255)
      curhealth = Math.floor(Math.floor(curhealth/2)/2);
   if(maxhealth > 255)
      maxhealth = Math.floor(Math.floor(maxhealth/2)/2);
   if(catchrate > 255)
      catchrate = 255;
   var difval = Math.floor(((((maxhealth * 4) - (curhealth * 2)) * catchrate) / maxhealth) + statusbonus + 1);
   if(place == 4) // Master Ball
      difval = 255;
   if(randomize(256) <= difval)
   {
      trainer[1][current[1]].health = 0;
      document.REL.message.value+= "You caught a " + trainer[1][current[1]].name + "\n";
	caughtpoke[current[1]] = true;
      SwitchPokemon(GetStrongerAI(), 1);
      playerinput = " ";
	return true;
   }
   else
   {
      document.REL.message.value+= "The PokeBall missed\nYou did not catch the Pokemon\n";
	playerinput = " "
      return false;
   }
}
function Retreat(pokeindex)
{
   if(active[0].health <= 0)
   {
      playerinput = "";
	usedagainst[pokeindex][current[1]] = true;
   }
   if(playerinput == "" && pokeindex != -1 && trainer[0][pokeindex].health > 0)
   {
      playerinput = " ";
      SwitchPokemon(pokeindex, 0);
	usedagainst[current[1]][pokeindex] = true;
   }
}
function GetStrongerAI()
{
   var strongpoke = -1;
   var pokecheck = 0;
   for(var supereffect = 8; supereffect >= 0; supereffect-= .25)
   {
      for(pokecheck = 0; pokecheck < 6; pokecheck++)
      {
         if(trainer[1][pokecheck].health > 0 && bigelementalcheck(trainer[1][pokecheck].type[0], trainer[1][pokecheck].type[1], active[0].type[0], active[0].type[1]) > supereffect)
         {
            strongpoke = pokecheck;
            break;
         }
      }
   }
   if(strongpoke == -1)
   {
      for(pokecheck = 0; pokecheck < 6; pokecheck++)
      {
         if(trainer[1][pokecheck].health > 0)
         {
            strongpoke = pokecheck;
            break;
         }
      }
   }
   if(strongpoke == -1)
   {
      if(battletype == "gym" && formnotyetsubmitted)
      {
         formnotyetsubmitted = false;
         alert("Congratulations! You won a " + badge + " Badge.");
         submitWinForm(1);
      }
      else if(battletype == "trainer" && formnotyetsubmitted)
      {
         formnotyetsubmitted = false;
         alert(messageafter);
	   submitWinForm(1);
      }
      else if((battletype == "wild" || battletype == "rare") && formnotyetsubmitted)
      {
         formnotyetsubmitted = false;
         alert(messageafter);
	   submitWinForm(1);
      }
      strongpoke = current[1];
   }
   return strongpoke;
}
function GetNewChoice()
{
   if(playerinput == " ")
   {
      document.REL.chooseact.options[1].text = "Attack";
	if(battletype == "wild" || battletype == "rare")
         document.REL.chooseact.options[3].text = "Catch";
      SetBattleField(0, current[0]);
      setTimeout("BeginTurn()", 100);
   }
   else
      setTimeout("GetNewChoice()", 100);
}
function SetBattleField(trainernum, switchto)
{
   active[trainernum] = trainer[trainernum][switchto];
   if(trainernum == 1)
   {
      if(active[1].species != "Farfetch\'d")
         document.pokepic1.src = "/league/" + active[1].species + ".jpg";
      else
         document.pokepic1.src = "/league/Farfetchd.jpg";
      document.REL.level1.value = active[1].level + " " + getGender(active[1].species, active[1].strdv);
      document.pokepic1.alt = active[1].name;
      document.REL.life1.value = "";
      for(var setlife = Math.ceil((active[1].health / active[1].maxhealth) * 10); setlife > 0; setlife--)
         document.REL.life1.value+= "<";
   }
   if(trainernum == 0)
   {
      if(active[0].species != "Farfetch\'d")
         document.pokepic0.src = "/league/" + active[0].species + ".jpg";
      else
         document.pokepic0.src = "/league/Farfetchd.jpg";
      document.REL.level0.value = active[0].level + " " + getGender(active[0].species, active[0].strdv);
      document.pokepic0.alt = active[0].name;
      document.REL.life0.value = active[0].health + "/" + active[0].maxhealth;
   }
}
function CheckOption(trainernum)
{
   var canact = 1;
   if(active[trainernum].critical == 3)
      active[trainernum].critical = 2;
   if(active[trainernum].critical == 1)
      active[trainernum].critical = 0;
   if(active[trainernum].status == "Sleep")
   {
      canact = 0;
   }
   if(active[trainernum].bound < 0)
   {
      canact = 0;
   }
   if(active[trainernum].bound > 0)
   {
      if(trainernum == 0)
         playerinput = active[0].curattack;
      if(trainernum == 1)
         aiinput = active[1].curattack;
   }
   if(active[trainernum].charging == 1)
   {
      if(trainernum == 0)
         playerinput = active[0].curattack;
      if(trainernum == 1)
         aiinput = active[1].curattack;
   }
   if(active[trainernum].charging == 2)
   {
      if(trainernum == 0)
         playerinput = active[0].curattack;
      if(trainernum == 1)
         aiinput = active[1].curattack;
   }
   if(active[trainernum].enraged == 1)
   {
      if(trainernum == 0)
         playerinput = active[0].curattack;
      if(trainernum == 1)
         aiinput = active[1].curattack;
   }
   if(active[trainernum].thrashing > 0)
   {
      if(trainernum == 0)
         playerinput = active[0].curattack;
      if(trainernum == 1)
         aiinput = active[1].curattack;
   }
   if(active[trainernum].biding> 0)
   {
      if(trainernum == 0)
         playerinput = active[0].curattack;
      if(trainernum == 1)
         aiinput = active[1].curattack;
   }
   return canact;
}
function CheckAct(trainernum)
{
   var canact = 1;
   for(var count = 0; count < 4; count++)
   {
      if(active[trainernum].disabled[count] > 0)
      {
         active[trainernum].disabled[count]--;
         if(active[trainernum].disabled[count] == 0)
            document.REL.message.value+= active[trainernum].name + "\'s " + active[trainernum].attack[count].substring(0, active[trainernum].attack[count].length - 2) + " attack is no longer disabled\n";
         else if(trainernum == 0 && active[trainernum].attack[count] == playerinput || trainernum == 1 && active[trainernum].attack[count] == aiinput)
         {
            document.REL.message.value+= active[trainernum].name + "\'s attack is disabled\n";
            canact = 0;
         }
      }
   }
   if(active[trainernum].status == "Paralyzed")
   {
      if(randomize(4) == 1)
      {
         document.REL.message.value+= active[trainernum].name + " is unable to move\n";
         canact = 0;
      }
   }
   if(active[trainernum].status == "Frozen")
   {
      document.REL.message.value+= active[trainernum].name + " is frozen solid\n";
      canact = 0;
   }
   if(active[trainernum].status == "Sleep")
   {
      canact = 0;
	active[trainernum].sleep--;
      if(active[trainernum].sleep == 0 && active[trainernum].rested == 0)
      {
         active[trainernum].status = "OK";
         document.REL.message.value+= active[trainernum].name + " woke up\n";
      }
      else if(active[trainernum].rested > 0)
      {
         active[trainernum].rested--;
         if(active[trainernum].rested == 0)
         {
            document.REL.message.value+= active[trainernum].name + " woke up\n";
            active[trainernum].status = "OK";
         }
         else
            document.REL.message.value+= active[trainernum].name + " is fast Asleep\n";
      }
      else
         document.REL.message.value+= active[trainernum].name + " is fast Asleep\n";
   }
   if(active[trainernum].bound < 0)
   {
      document.REL.message.value+= active[trainernum].name + " can\'t move\n";
      canact = 0;
   }
   if(canact != 0 && active[trainernum].scared == 1)
   {
      document.REL.message.value+= active[trainernum].name + " flinched\n";
      canact = 0;
   }
   if(canact != 0 && active[trainernum].confused > 0)
   {
	active[trainernum].confused--;
      if(randomize(4) == 1 || active[trainernum].confused == 0)
      {
         document.REL.message.value+= active[trainernum].name + " is no longer confused\n";
         active[trainernum].confused = 0;
      }
      else
      {
         document.REL.message.value+= active[trainernum].name + " is Confused\n";
         if(randomize(2) == 1)
         {
             document.REL.message.value+= active[trainernum].name + " hurt itself in its Confusion\n";
             instantdamage((((((2 * active[trainernum].level / 5 + 2) * 40 * active[trainernum].strength) / active[trainernum].defense) / 50) + 2), trainernum);
             canact = 0;
         }
      }
   }
   return canact;
}
function afterTurn(trainernum)
{
   if(active[trainernum].status == "Burned")
   {
      document.REL.message.value+= active[trainernum].name + " was hurt by the Burn\n";
      instantdamage(active[trainernum].maxhealth / 16, trainernum);
   }
   if(active[trainernum].status == "Poisoned")
   {
      document.REL.message.value+= active[trainernum].name + " was hurt by the Poison\n";
      instantdamage(active[trainernum].maxhealth / 16, trainernum);
   }
   if(active[trainernum].status == "Toxiced")
   {
      document.REL.message.value+= active[trainernum].name + " was hurt by the Toxic\n";
      active[trainernum].toxic++;
      instantdamage(active[trainernum].maxhealth / (16 / active[trainernum].toxic), trainernum);
   }
   if(active[trainernum].leechseed == 1)
   {
      document.REL.message.value+= active[trainernum].name + "\'s life was drained by the Leech Seed\n";
      if(trainernum == 0)
      {
         healing(active[trainernum].maxhealth / 16, 1);
         instantdamage(active[trainernum].maxhealth / 16, 0);
      }
      if(trainernum == 1)
      {
         healing(active[trainernum].maxhealth / 16, 0);
         instantdamage(active[trainernum].maxhealth / 16, 1);
      }
   }
}
function GetAI()
{
   juggle++;
   if(juggle >= juggleto && juggleto != 0)
   {
      juggle = 0;
      if(bigelementalcheck(active[1].type[0], active[1].type[1], active[0].type[0], active[0].type[1]) < 4)
      {
         var switchto = GetStrongerAI();
         if(switchto != current[1])
         {
            SwitchPokemon(switchto, 1);
		usedagainst[current[1]][current[0]] = true;
            aiinput = " ";
         }
      }
   }
   if(CheckOption(1) == 1)
   {
      if(aiinput == "")
      {
         var aichoice = randomize(4) - 1;
         aiinput = active[1].attack[aichoice];
         while(active[1].disabled[aichoice] == 1 || aiinput.substring(0, aiinput.length - 2) == "")
         {
            aichoice = randomize(4) - 1;
            aiinput = active[1].attack[aichoice];
         }
      }
   }
}
function AIAct()
{
   if(CheckAct(1) == 1)
   {
      if(active[1].health > 0)
      {
	   if(active[1].otherattack == "" && aiinput != "Struggle()" && active[1].binding == 0 && active[1].charging == 0)
            active[1].power[findAttack(aiinput, 1)]--;
	   if(active[1].otherattack != "")
		active[1].power[findAttack(active[1].otherattack, 1)]--;
         eval(aiinput);
        lastattack[1] = aiinput;
      }
   }
   if(active[0].health > 0)
      afterTurn(1);
}
function PlayerAct()
{
   if(CheckAct(0) == 1)
   {
      if(active[0].health > 0)
      {
	   if(active[0].otherattack == "" && playerinput != "Struggle()" && active[0].binding == 0 && active[0].charging == 0)
            active[0].power[findAttack(playerinput, 0)]--;
	   if(active[0].otherattack != "")
		active[0].power[findAttack(active[0].otherattack, 0)]--;
         eval(playerinput);
         lastattack[0] = playerinput;
      }
   }
   if(active[1].health > 0)
      afterTurn(0);
}
function CheckTurn()
{
   active[0].otherattack = "";
   active[1].otherattack = "";
   active[0].physdam = 0;
   active[1].physdam = 0;
   active[0].specdam = 0;
   active[1].specdam = 0;
   active[0].counterer = 0;
   active[1].counterer = 0;
   if(playerinput == "Metronome()")
   {
      playerinput = Metronome();
      active[0].otherattack = "Metronome()";
   }
   if(aiinput == "Metronome()")
   {
      aiinput = Metronome();
      active[1].otherattack = "Metronome()";
   }
   var gofirst = 0;
   var speed0 = active[0].speed;
   var speed1 = active[1].speed;
   if(speed0 > speed1)
   {
      gofirst = 0;
   }
   else if(speed0 == speed1 && randomize(2) == 2)
   {
      gofirst = 0;
   }
   else
   {
      gofirst = 1;
   };
   if(aiinput == "QuickAttack()" && playerinput != "QuickAttack()")
      gofirst = 1;
   if(playerinput == "QuickAttack()" && aiinput != "QuickAttack()")
      gofirst = 0;
   if(playerinput == "Bide()")
   {
      gofirst = 1;
      if(active[0].biding == 0)
         active[0].lastlife = active[0].health;
   }
   if(aiinput == "Bide()")
   {
      gofirst = 0;
      if(active[1].biding == 0)
         active[1].lastlife = active[1].health;
   }
   if(playerinput == "Counter()")
   {
      gofirst = 1;
      active[0].lastlife = active[0].health;
   }
   if(aiinput == "Counter()")
   {
      gofirst = 0;
      active[1].lastlife = active[1].health;
   }
   if(gofirst == 0)
   {
      attacker = 0;
      defender = 1;
      if(playerinput == "MirrorMove()")
      {
         playerinput = lastattack[1];
         active[attacker].otherattack = "MirrorMove()";
      }
      if(active[attacker].otherattack != "")
         document.REL.message.value+= active[attacker].name + " uses " + active[attacker].otherattack.substring(0, active[attacker].otherattack.length - 2) + "\n";
      PlayerAct();
      attacker = 1;
      defender = 0;
      if(aiinput == "MirrorMove()")
      {
         aiinput = lastattack[0];
         active[attacker].otherattack = "MirrorMove()";
      }
      if(active[attacker].otherattack != "")
         document.REL.message.value+= active[attacker].name + " uses " + active[attacker].otherattack.substring(0, active[attacker].otherattack.length - 2) + "\n";
      AIAct();
   }
   else
   {
      attacker = 1;
      defender = 0;
      if(aiinput == "MirrorMove()")
      {
         aiinput = lastattack[0];
         active[attacker].otherattack = "MirrorMove()";
      }
      if(active[attacker].otherattack != "")
         document.REL.message.value+= active[attacker].name + " uses " + active[attacker].otherattack.substring(0, active[attacker].otherattack.length - 2) + "\n";
      AIAct();
      attacker = 0;
      defender = 1;
      if(playerinput == "MirrorMove()")
      {
         playerinput = lastattack[1];
         active[attacker].otherattack = "MirrorMove()";
      }
      if(active[attacker].otherattack != "")
         document.REL.message.value+= active[attacker].name + " uses " + active[attacker].otherattack.substring(0, active[attacker].otherattack.length - 2) + "\n";
      PlayerAct();
   }
   if(active[1].health <= 0)
   {
      SwitchPokemon(GetStrongerAI(), 1);
     	usedagainst[current[1]][current[0]] = true;
   }
   setTimeout("BeginTurn()", 100);
}
function GetInput()
{
   if(playerinput != "")
   {
      document.REL.message.value = "";
      if(document.REL.chooseact.value == "switch")
         document.REL.message.value+= active[0].name + " was brought out\n";
	if(document.REL.chooseact.value == "catch")
	{
	   CatchPokemon(document.REL.playerchoice.value);
	   setTimeout("BeginTurn()", 1);
	   return 0;
	}
      GetAI();
      setTimeout("CheckTurn()", 1);
   }
   else
   {
      setTimeout("GetInput()", 10);
   }
}
function BeginTurn()
{
   if(active[0].health <= 0)
   {
      document.REL.chooseact.options[1].text = "Can't Attack";
      if(battletype == "wild" || battletype == "rare")
         document.REL.chooseact.options[3].text = "Can't Catch";
      GetNewChoice();
   }
   else
   {
      playerinput = "";
      aiinput = "";
      active[0].scared = 0;
      active[1].scared = 0;
      if(active[0].substitute <= -1)
         active[0].substitute = 0;
      if(active[1].substitute <= -1)
         active[1].substitute = 0;
      document.REL.message.value+= "Choose your action\n";
      document.REL.playerchoice.length = 1;
      document.REL.playerchoice.selectedIndex = 0;
      document.REL.chooseact.selectedIndex = 0;
      document.REL.chooseact.focus();
      GetInput();
   }
}
function submitWinForm(moneytimes)
{
   for(var foecnt = 0; foecnt < 6; foecnt++)
   {
      if(trainer[1][foecnt].health > 0)
      {
         for(var xpcnt = 0; xpcnt < 6; xpcnt++)
            usedagainst[foecnt][xpcnt] = false;
      }
   }
   var reduction = new Array(6);
   var expaward = new Array(6);
   var hpaward = new Array(6);
   var straward = new Array(6);
   var spdaward = new Array(6);
   var defaward = new Array(6);
   var speaward = new Array(6);
   var check;
   for(var reduce = 0; reduce < 6; reduce++)
   {
	reduction[reduce] = 0;
	expaward[reduce] = 0;
	hpaward[reduce] = 0;
	straward[reduce] = 0;
	spdaward[reduce] = 0;
	defaward[reduce] = 0;
	speaward[reduce] = 0;
	for(check = 0; check < 6; check++)
	{
	   if(usedagainst[reduce][check])
		reduction[reduce]++;
	}
      if(reduction[reduce] == 0) reduction[reduce] = 1;
   }
   var battypexp = 1;
   if(battletype == "trainer" || battletype == "gym")
	battypexp = 1.5;
   for(var xp = 0; xp < 6; xp++)
   {
	expaward[xp] = 0;
	for(check = 0; check < 6; check++)
	{
	   if(usedagainst[check][xp] > 0 && trainer[1][check].health <= 0 && reduction[check] != 0)
	   {
		expaward[xp]+= Math.floor((((trainer[1][check].xpaward * trainer[1][check].level) * battypexp) / 7) / reduction[check]);
		hpaward[xp]+= Math.floor(trainer[1][check].basehealth * battypexp / reduction[check]);
		straward[xp]+= Math.floor(trainer[1][check].basestrength * battypexp / reduction[check]);
		spdaward[xp]+= Math.floor(trainer[1][check].basespeed * battypexp / reduction[check]);
		defaward[xp]+= Math.floor(trainer[1][check].basedefense * battypexp / reduction[check]);
		speaward[xp]+= Math.floor(trainer[1][check].basespecial * battypexp / reduction[check]);
	   }
	}
   }
   var yenaward = 0;
   if(battletype == "trainer" || battletype == "gym" || moneytimes == -1)
   {
      for(var yenit = 0; yenit < 6; yenit++)
      {
         yenaward+= Math.floor((trainer[1][yenit].xpaward * trainer[1][yenit].level * .5) / 7);
      }
      if(battletype == "trainer")
         yenaward = Math.floor(.5 * yenaward);
	if(battletype == "wild" || battletype == "rare")
	   yenaward = Math.floor(.25 * yenaward);
	yenaward*= moneytimes;
   }
   for(var caught = 0; caught < 6; caught++)
   {
	if(caughtpoke[caught])
      {
	   if(revertedfavorite == revertPokemon(trainer[1][caught].species) && revertedfavorite != "Mewtwo" && revertedfavorite != "Mew" && revertedfavorite != "Dragonite" && revertedfavorite != "Moltres" && revertedfavorite != "Zapdos" && revertedfavorite != "Articuno" && revertedfavorite != "Eevee")
            setDV(1, caught, (getGender(trainer[1][caught].species, trainer[1][caught].strdv)=="F"?feDV(trainer[1][caught].species)-1:15), 15, 15, 15);
	   else if(revertedfavorite == revertPokemon(trainer[1][caught].species) && revertedfavorite != "Mewtwo" && revertedfavorite != "Eevee")
            setDV(1, caught, (getGender(trainer[1][caught].species, trainer[1][caught].strdv)=="F"?feDV(trainer[1][caught].species)-1:15), 10+randomize(5), 10+randomize(5), 10+randomize(5));
	   else if(revertedfavorite == revertPokemon(trainer[1][caught].species))
            setDV(1, caught, (getGender(trainer[1][caught].species, trainer[1][caught].strdv)=="F"?feDV(trainer[1][caught].species)-1:15), 7+randomize(8), 7+randomize(8), 7+randomize(8));
         trainer[1][caught].level--;
	   if(trainer[1][caught].xptype == "fast")
		exp =  Math.ceil(.8 * (trainer[1][caught].level * trainer[1][caught].level * trainer[1][caught].level));
	   else if(trainer[1][caught].xptype == "medium")
		exp =  Math.ceil(trainer[1][caught].level * trainer[1][caught].level * trainer[1][caught].level);
	   else if(trainer[1][caught].xptype == "slow")
      	exp =  Math.ceil(1.25 * (trainer[1][caught].level * trainer[1][caught].level * trainer[1][caught].level));
	   else if(trainer[1][caught].xptype == "parabolic")
		exp =  Math.ceil(1.2 * (trainer[1][caught].level * trainer[1][caught].level * trainer[1][caught].level) - 15 * (trainer[1][caught].level * trainer[1][caught].level) + 100 * trainer[1][caught].level - 140);
         trainer[1][caught].level++;
	   eval('document.winningform.caught' + (caught + 1) + '.value = trainer[1][caught].name + "_" + trainer[1][caught].name + "_" + trainer[1][caught].level + "_" + exp + "_0_" + trainer[1][caught].strdv + "_0_" + trainer[1][caught].spddv + "_0_" + trainer[1][caught].defdv + "_0_" + trainer[1][caught].spedv + "_0_0_" + trainer[1][caught].item + "_70_" + trainer[1][caught].attack[0].substring(0, trainer[1][caught].attack[0].length - 2) + "_0_" + trainer[1][caught].attack[1].substring(0, trainer[1][caught].attack[1].length - 2) + "_0_" + trainer[1][caught].attack[2].substring(0, trainer[1][caught].attack[2].length - 2) + "_0_" + trainer[1][caught].attack[3].substring(0, trainer[1][caught].attack[3].length - 2) + "_0_";');
	}
   }
   document.winningform.kos.value = ((trainer[0][0].health>0?0:1) + "_" + (trainer[0][1].health>0?0:1) + "_" + (trainer[0][2].health>0?0:1) + "_" + (trainer[0][3].health>0?0:1) + "_" + (trainer[0][4].health>0?0:1) + "_" + (trainer[0][5].health>0?0:1));
   var ind;
   if(battletype == "wild" || battletype == "rare")
   {
      for(var ball = 1; ball <= 4; ball++)
      {
         ind = ball-1;
         eval('document.winningform.pokeball' + ball + '.value = pokeballs[' + ind + '];');
      }
   }
   for(count = 1; count <= 6; count++)
   {
      ind = count - 1;
      eval('document.winningform.xptype' + count + '.value = trainer[0][ind].xptype');
   }
   yenaward+= payday;
   document.winningform.yen.value = yenaward;
   for(var final = 1; final <= 6; final++)
   {
	eval("document.winningform.xp" + (final) + ".value = " + (expaward[final - 1]) + ";");
	eval("document.winningform.hpeff" + (final) + ".value = " + (hpaward[final - 1]) + ";");
	eval("document.winningform.streff" + (final) + ".value = " + (straward[final - 1]) + ";");
	eval("document.winningform.spdeff" + (final) + ".value = " + (spdaward[final - 1]) + ";");
	eval("document.winningform.defeff" + (final) + ".value = " + (defaward[final - 1]) + ";");
	eval("document.winningform.speeff" + (final) + ".value = " + (speaward[final - 1]) + ";");
   }
   document.winningform.leader.value = gymleader;
   var now = new Date();
   document.winningform.safety.value = now.getTime();
   if(moneytimes > 0)
      document.winningform.won.value = 1;
   document.winningform.submit();
}
function createPokemon(trainernum, index, name, nickname, level, experience, hpxp, strdv, strxp, spddv, spdxp, defdv, defxp, spedv, spexp, spe2xp, attack1, att1pp, attack2, att2pp, attack3, att3pp, attack4, att4pp, item, happiness)
{
   trainer[trainernum][index] = new Pokemon(name, level);
   trainer[trainernum][index].name = nickname;
   trainer[trainernum][index].xp = experience;
   trainer[trainernum][index].item = item;
   trainer[trainernum][index].happiness = happiness;
   setDV(trainernum, index, strdv, spddv, defdv, spedv);
   var hpdv = 0;
   if(strdv%2 == 1) hpdv+= 8;
   if(defdv%2 == 1) hpdv+= 4;
   if(spedv%2 == 1) hpdv+= 2;
   if(spddv%2 == 1) hpdv+= 1;
   hpxp = Math.floor(hpxp/255);
   if(hpxp>255) hpxp = 255;
   strxp = Math.floor(strxp/255);
   if(strxp>255) strxp = 255;
   spdxp = Math.floor(spdxp/255);
   if(spdxp>255) spdxp = 255;
   defxp = Math.floor(defxp/255);
   if(defxp>255) defxp = 255;
   spexp = Math.floor(spexp/255);
   if(spexp>255) spexp = 255;
   trainer[trainernum][index].health = Math.floor((level * (trainer[trainernum][index].health + hpdv + (hpxp/8) + 50) / 50) + 10);
   trainer[trainernum][index].maxhealth = trainer[trainernum][index].health;
   trainer[trainernum][index].strength = Math.floor((level * (trainer[trainernum][index].strength + strdv + (strxp/8)) / 50) + 5);
   trainer[trainernum][index].basestrength = trainer[trainernum][index].strength;
   trainer[trainernum][index].speed = Math.floor((level * (trainer[trainernum][index].speed + spddv + (spdxp/8)) / 50) + 5);
   trainer[trainernum][index].basespeed = trainer[trainernum][index].speed;
   trainer[trainernum][index].defense = Math.floor((level * (trainer[trainernum][index].defense + defdv + (defxp/8)) / 50) + 5);
   trainer[trainernum][index].basedefense = trainer[trainernum][index].defense;
   trainer[trainernum][index].special = Math.floor((level * (trainer[trainernum][index].special + spedv + (spexp/8)) / 50) + 5);
   trainer[trainernum][index].basespecial = trainer[trainernum][index].special;
   trainer[trainernum][index].attack[0] = attack1 + "()";
   trainer[trainernum][index].power[0] = getPowerPoints(trainer[trainernum][index].attack[0]) + getPowerPoints(trainer[trainernum][index].attack[0]) * .2 * att1pp;
   trainer[trainernum][index].attack[1] = attack2 + "()";
   trainer[trainernum][index].power[1] = getPowerPoints(trainer[trainernum][index].attack[1]) + getPowerPoints(trainer[trainernum][index].attack[1]) * .2 * att2pp;
   trainer[trainernum][index].attack[2] = attack3 + "()";
   trainer[trainernum][index].power[2] = getPowerPoints(trainer[trainernum][index].attack[2]) + getPowerPoints(trainer[trainernum][index].attack[2]) * .2 * att3pp;
   trainer[trainernum][index].attack[3] = attack4 + "()";
   trainer[trainernum][index].power[3] = getPowerPoints(trainer[trainernum][index].attack[3]) + getPowerPoints(trainer[trainernum][index].attack[3]) * .2 * att4pp;
}
function equalizePokemon(trainernum, index, name, level)
{
   trainer[trainernum][index] = new Pokemon(name, level);
   trainer[trainernum][index].health = Math.round((level * (trainer[trainernum][index].health + 50) / 50) + 5);
   trainer[trainernum][index].maxhealth = trainer[trainernum][index].health;
   trainer[trainernum][index].strength = Math.round((level * (trainer[trainernum][index].strength) / 50) + 5);
   trainer[trainernum][index].basestrength = trainer[trainernum][index].strength;
   trainer[trainernum][index].speed = Math.round((level * (trainer[trainernum][index].speed) / 50) + 5);
   trainer[trainernum][index].basespeed = trainer[trainernum][index].speed;
   trainer[trainernum][index].defense = Math.round((level * (trainer[trainernum][index].defense) / 50) + 5);
   trainer[trainernum][index].basedefense = trainer[trainernum][index].defense;
   trainer[trainernum][index].special = Math.round((level * (trainer[trainernum][index].special) / 50) + 5);
   trainer[trainernum][index].basespecial = trainer[trainernum][index].special;
}
function setDV(trainernum, index, strdv, spddv, defdv, spedv)
{
   if(strdv != -1)
      trainer[trainernum][index].strdv = strdv;
   if(spddv != -1)
      trainer[trainernum][index].spddv = spddv;
   if(defdv != -1)
      trainer[trainernum][index].defdv = defdv;
   if(spedv != -1)
      trainer[trainernum][index].spedv = spedv;
}
function luckyLucky(index)
{
   var unlucky = 0;
   for(var i = 0; i < 6; i++)
   {
      if(trainer[index][i].species == "Mewtwo")
         unlucky+= 1.5;
      if(trainer[index][i].species == "Mew")
         unlucky++;
      if(trainer[index][i].species == "Articuno")
         unlucky+= .75;
      if(trainer[index][i].species == "Zapdos")
         unlucky++;
      if(trainer[index][i].species == "Moltres")
         unlucky+= .75;
      if(trainer[index][i].species == "Dragonite")
         unlucky++;
   }
   if(unlucky < 1)
      unlucky = 0;
   else
      unlucky--;
   unlucky*= .1;
   for(var n = 0; n < 6; n++)
   {
      trainer[index][n].accuracy-= unlucky;
      trainer[index][n].evade-= unlucky;
      trainer[index][n].baseaccuracy-= unlucky;
      trainer[index][n].baseevade-= unlucky;
   }
}
function doit()
{
   document.write('<form name="REL"><div align="center"><table><tr><td align=left><b>' + challenger + '</b><td align=right><b>' + leader + '</b><tr><td align=center><img name=pokepic0><td align=center><img name=pokepic1><tr><td align=center>Level: <input type=text name=level0 size=4 onFocus="blur();"><td align=center>Level: <input type=text name=level1 size=4 onFocus="blur();"><tr><td align=center><input name=life0 type=text size=7 onFocus="blur();"><td align=center><input name=life1 type=text size=10 onFocus="blur();"><tr><td colspan=2 align=center><select name="chooseact" onChange="SwitchOptions();"><option value="">--Choose--<option value="attack">Attack<option value="switch">Switch');
   if(battletype == "wild")
      document.write('<option value="catch">Catch<option value="run">Run');
   if(battletype == "rare")
      document.write('<option value="catch">Catch');
   document.write('</select><select name=playerchoice onChange="CheckChoice();"><option value=-1>--Choose--</select><tr><td colspan=2 align=center><textarea name=message cols=50 rows=10 onFocus="blur();">Begin\n</text' + 'area></table></div></form>\n<form name=winningform action="/cgi-bin/relwin.pl" method=post><input type=hidden name=yen><input type=hidden name=leader value="' + leader + '"><input type=hidden name=challenger value="' + challenger + '"><input type=hidden name=password value="' + password + '"><input type=hidden name=battletype value="' + battletype + '"><input type=hidden name=index value="' + index + '"><input type=hidden name=ver value="' + version + '"><input type=hidden name=xp1><input type=hidden name=xp2><input type=hidden name=xp3><input type=hidden name=xp4><input type=hidden name=xp5><input type=hidden name=xp6>');
      document.write('<input type=hidden name=hpeff1><input type=hidden name=streff1><input type=hidden name=spdeff1><input type=hidden name=defeff1><input type=hidden name=speeff1><input type=hidden name=hpeff2><input type=hidden name=streff2><input type=hidden name=spdeff2><input type=hidden name=defeff2><input type=hidden name=speeff2><input type=hidden name=hpeff3><input type=hidden name=streff3><input type=hidden name=spdeff3><input type=hidden name=defeff3><input type=hidden name=speeff3><input type=hidden name=hpeff4><input type=hidden name=streff4>');
      document.write('<input type=hidden name=spdeff4><input type=hidden name=defeff4><input type=hidden name=speeff4><input type=hidden name=hpeff5><input type=hidden name=streff5><input type=hidden name=spdeff5><input type=hidden name=defeff5><input type=hidden name=speeff5><input type=hidden name=hpeff6><input type=hidden name=streff6><input type=hidden name=spdeff6><input type=hidden name=defeff6><input type=hidden name=speeff6><input name=caught1 type=hidden><input name=caught2 type=hidden><input name=caught3 type=hidden><input name=caught4 type=hidden><input name=caught5 type=hidden><input name=caught6 type=hidden>');
      document.write('<input type=hidden name=xptype1><input type=hidden name=xptype2><input type=hidden name=xptype3><input type=hidden name=xptype4><input type=hidden name=xptype5><input type=hidden name=xptype6><input type=hidden name=origin value="' + origin + '"><input type=hidden name=pokeball1><input type=hidden name=pokeball2><input type=hidden name=pokeball3><input type=hidden name=pokeball4><input name=safety type=hidden><input type=hidden name=won value=0><input type=hidden name=kos></form>');
   SetBattleField(0,0);
   SetBattleField(1,0);
   BeginTurn();
   usedagainst[0][0] = true;
   document.REL.chooseact.blur();
}

document.write('<script language="JavaScript" src="http://www.realitysend.com/cookie.js" type="text/javascript"></script>\n');

//Begin Declaration of Global Variables
var trainer = new Array(2);
trainer[0] = new Array(6);
trainer[1] = new Array(6);
var usedagainst = new Array(6);
var caughtpoke = new Array(6);
for(var nullout = 0; nullout < 6; nullout++)
{
   trainer[0][nullout] = new Pokemon("", 0);
   trainer[1][nullout] = new Pokemon("", 0);
   usedagainst[nullout] = new Array(6);
   caughtpoke[nullout] = false;
   for(var null2 = 0; null2 < 6; null2++)
	usedagainst[nullout][null2] = false;
}
var playerinput = "";
var aiinput = "";
var juggle = 0;
var juggleto = 0;
var lastattack = new Array(2);
lastattack[0] = "";
lastattack[1] = "";
var payday = 0;
var active = new Array(2);
var current = new Array(2);
current[0] = 0;
current[1] = 0;
var formnotyetsubmitted = true;
var battletype = "";
var badge = "";
var leader = "";
var gymleader = "";
var challenger = "";
var version = "";
var password = "";
var revertedfavorite = "";
var origin = "";
var index = 0;
var messageafter = "";
var pokeballs = new Array(4);
for(nullout = 0; nullout < 4; nullout++)
   pokeballs[nullout] = 0;
var scriptloaded = 1; // shows that script has been successfully imported

