Exemplo n.º 1
0
 public Pokemon(byte[] data)
 {
     if (!hasLoaded)
     {
         LoadDataFiles();
     }
     rawdata = new ManipulatableByteArray(data);
 }
Exemplo n.º 2
0
        public static PartyPokemon ConvertPCToParty(byte[] arr)
        {
            Pokemon old = new Pokemon(arr);

            byte[] newpoke = new byte[236];
            Array.Copy(arr, 0, newpoke, 0, arr.Length);
            byte[] blanker = new byte[100];
            Array.Copy(blanker, 0, newpoke, 0x88, 100);
            ManipulatableByteArray manip = new ManipulatableByteArray(newpoke);

            manip.SetByte(0x8C, (byte)old.Level);
            manip.SetUShort(0x8E, (ushort)old.HP);
            manip.SetUShort(0x90, (ushort)old.HP);
            manip.SetUShort(0x92, (ushort)old.Attack);
            manip.SetUShort(0x94, (ushort)old.Defense);
            manip.SetUShort(0x96, (ushort)old.Speed);
            manip.SetUShort(0x98, (ushort)old.SpecialAttack);
            manip.SetUShort(0x9A, (ushort)old.SpecialDefense);

            PartyPokemon p = new PartyPokemon(manip.GetArray(0, manip.Length));

            return(p);
        }