Fixed code assuming map metadata exists, fixed misplaced species data methods, rewrote class PokeBattle_Pokemon

This commit is contained in:
Maruno17
2021-01-20 20:22:31 +00:00
parent 7f254c6434
commit 736bb9ed10
24 changed files with 283 additions and 198 deletions

View File

@@ -401,7 +401,8 @@ PBEvolution.register(:LevelDiving, {
PBEvolution.register(:LevelDarkness, {
"levelUpCheck" => proc { |pkmn, parameter|
next pkmn.level >= parameter && GameData::MapMetadata.get($game_map.map_id).dark_map
map_metadata = GameData::MapMetadata.try_get($game_map.map_id)
next pkmn.level >= parameter && map_metadata && map_metadata.dark_map
}
})
@@ -660,8 +661,9 @@ PBEvolution.register(:Location, {
PBEvolution.register(:Region, {
"minimumLevel" => 1, # Needs any level up
"levelUpCheck" => proc { |pkmn, parameter|
mapPos = GameData::MapMetadata.get($game_map.map_id).town_map_position
next mapPos && mapPos[0] == parameter
map_metadata = GameData::MapMetadata.try_get($game_map.map_id)
next map_metadata && map_metadata.town_map_position &&
map_metadata.town_map_position[0] == parameter
}
})