void Start() { Bulbasaur = new PokemonStruct(); Bulbasaur.PokedexNo = "001"; Bulbasaur.Name = "Bulbasaur"; Bulbasaur.Type1 = "Grass"; Bulbasaur.Type2 = "Poison"; Bulbasaur.HP = 45; Bulbasaur.Attack = 49; Bulbasaur.Defense = 49; Bulbasaur.SpecialAttack = 65; Bulbasaur.SpecialDefense = 65; Bulbasaur.Speed = 45; Bulbasaur.Total = 318; }
void Start() { Bonsly = new PokemonStruct(); Bonsly.PokedexNo = "438"; Bonsly.Name = "Bonsly"; Bonsly.Type1 = "Rock"; Bonsly.Type2 = "N/A"; Bonsly.Total = 290; Bonsly.HP = 50; Bonsly.Attack = 80; Bonsly.Defense = 95; Bonsly.SpecialAttack = 10; Bonsly.SpecialDefense = 45; Bonsly.Speed = 10; }
void Start() { Charizard = new PokemonStruct(); Charizard.PokedexNo = "006"; Charizard.Name = "Charizard"; Charizard.Type1 = "Fire"; Charizard.Type2 = "Flying"; Charizard.Total = 534; Charizard.HP = 78; Charizard.Attack = 84; Charizard.Defense = 78; Charizard.SpecialAttack = 109; Charizard.SpecialDefense = 85; Charizard.Speed = 100; }
void Start() { Absol = new PokemonStruct(); Absol.PokedexNo = "359"; Absol.Name = "Absol"; Absol.Type1 = "Dark"; Absol.Type2 = "N/A"; Absol.Total = 465; Absol.HP = 65; Absol.Attack = 130; Absol.Defense = 60; Absol.SpecialAttack = 75; Absol.SpecialDefense = 60; Absol.Speed = 75; }
void Start() { Ditto = new PokemonStruct(); Ditto.PokedexNo = "132"; Ditto.Name = "Ditto"; Ditto.Type1 = "Normal"; Ditto.Type2 = "N/A"; Ditto.Total = 288; Ditto.HP = 48; Ditto.Attack = 48; Ditto.Defense = 48; Ditto.SpecialAttack = 48; Ditto.SpecialDefense = 48; Ditto.Speed = 48; }
void Start() { Flareon = new PokemonStruct(); Flareon.PokedexNo = "136"; Flareon.Name = "Flareon"; Flareon.Type1 = "Fire"; Flareon.Type2 = "N/A"; Flareon.Total = 525; Flareon.HP = 65; Flareon.Attack = 130; Flareon.Defense = 60; Flareon.SpecialAttack = 95; Flareon.SpecialDefense = 110; Flareon.Speed = 65; }
public void loadPackage(PokemonStruct pokemon, int offset, int file, byte flag) { PC finalPC = new PC(); List <int> ids = new List <int>(); ids.Add(file); int newOffset = 0; while ((pokemon.models[offset + newOffset].natural & flag) != 0) { --newOffset; } if (newOffset != 0) { ids.Add(file + 9 * newOffset); } foreach (int id in ids) { PC pc = new Loader(getFileName(id)).load(null); } }
// Start is called before the first frame update void Start() { string line; using (StreamReader file = new StreamReader("./Assets/Resources/national.txt")) { while ((line = file.ReadLine()) != null) { PokemonsNames.Add(line); } Pokemons = new PokemonStruct[PokemonsNames.Count]; } using (FileStream fileStream = new FileStream("./Assets/Resources/file_00000.bin", FileMode.Open)) { using (BinaryReader reader = new BinaryReader(fileStream)) { Reader readerPkm = new Reader(reader, 0, reader.BaseStream.Length); var id = 0; while (id < PokemonsNames.Count) { var fileNumber = readerPkm.readUint16(); var count = readerPkm.readUint8(); var flags = readerPkm.readUint8(); Pokemons[id] = new PokemonStruct { id = id + 1, name = PokemonsNames[id], file = fileNumber, hasGenderDifference = (flags & 0x2) != 0, hasExtrasModels = (flags & 0x4) != 0, modelsCount = count, models = new List <PokemonModel>(), }; id++; } id = 0; var file = 0; var offset = 0; while (readerPkm.index < readerPkm.end) { var pokemon = Pokemons[id]; byte[] flags = { readerPkm.readUint8(), readerPkm.readUint8() }; pokemon.models.Add(new PokemonModel { file = pokemon.file + pokemon.models.Count, natural = flags[0], decoration = flags[1], issue = false }); file++; offset++; if (pokemon.file + pokemon.modelsCount <= file) { pokemon.modelsCount = 0; id++; offset = 0; } } } } loadPokemon(0, 0); }