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

@@ -61,8 +61,9 @@ def pbInSafari?
# Reception map is handled separately from safari map since the reception
# map can be outdoors, with its own grassy patches.
reception = pbSafariState.pbReceptionMap
return true if $game_map.map_id==reception
return true if GameData::MapMetadata.get($game_map.map_id).safari_map
return true if $game_map.map_id == reception
map_metadata = GameData::MapMetadata.try_get($game_map.map_id)
return true if map_metadata && map_metadata.safari_map
end
return false
end