m_speciesData.loadSpeciesDatabase(new File("./res/dpspecies.db"));
} catch (Exception e1) {
e1.printStackTrace();
return;
}
Ini ini = null;
/* Load updated POLR db */
try {
ini = new Ini(new FileInputStream("./res/pokemon.ini"));
} catch (Exception e) {
e.printStackTrace();
return;
}
for (int i = 0; i < 493; i++) {
Ini.Section s = ini.get(String.valueOf(i+1));
PokemonSpecies species = null;
String name = s.get("InternalName");
if(name.equalsIgnoreCase("NIDORANfE")) {
name = "Nidoran-f";
species = m_speciesData.getPokemonByName(name);
initialisePokemon(species, s);
} else if(name.equalsIgnoreCase("NIDORANmA")) {
name = "Nidoran-m";
species = m_speciesData.getPokemonByName(name);
initialisePokemon(species, s);
} else if(name.equalsIgnoreCase("DEOXYS")) {
species = m_speciesData.getPokemonByName(name);
initialisePokemon(species, s);
species = m_speciesData.getPokemonByName("Deoxys-f");
initialisePokemon(species, s);
species = m_speciesData.getPokemonByName("Deoxys-l");
initialisePokemon(species, s);
species = m_speciesData.getPokemonByName("Deoxys-e");
initialisePokemon(species, s);
} else if(name.equalsIgnoreCase("WORMADAM")) {
species = m_speciesData.getPokemonByName(name);
initialisePokemon(species, s);
species = m_speciesData.getPokemonByName("Wormadam-g");
initialisePokemon(species, s);
species = m_speciesData.getPokemonByName("Wormadam-s");
initialisePokemon(species, s);
} else if(name.equalsIgnoreCase("Porygonz")) {
name = "Porygonz";
species = m_speciesData.getPokemonByName(name);
initialisePokemon(species, s);
} else {
name = s.get("Name");
species = m_speciesData.getPokemonByName(name);
initialisePokemon(species, s);
}
}
/* Load TM info */
try {
ini = new Ini(new FileInputStream("./res/tms.ini"));
} catch (Exception e) {
e.printStackTrace();
return;
}
Iterator<String> iterator = ini.keySet().iterator();
while(iterator.hasNext()) {
String tm = (String) iterator.next();
Ini.Section s = ini.get(tm);
String [] pokemons = s.get("POKEMON").split(",");
for(int i = 0; i < pokemons.length; i++) {
PokemonSpecies species = m_speciesData.getPokemonByName(pokemons[i]);
if(species != null) {
for(int j = 0; j < species.getTMMoves().length; j++) {