Implemented GameData::Metadata and GameData::MapMetadata

This commit is contained in:
Maruno17
2020-11-15 18:59:07 +00:00
parent d8476d1fa4
commit 52ffae9e8a
45 changed files with 803 additions and 540 deletions

View File

@@ -667,13 +667,13 @@ MultipleForms.register(:NECROZMA,{
# These species don't have visually different Alolan forms, but they need to
# evolve into different forms depending on the location where they evolved.
MultipleForms.register(:PIKACHU,{
MultipleForms.register(:PIKACHU, {
"getForm" => proc { |pkmn|
next if pkmn.formSimple>=2
mapPos = pbGetMetadata($game_map.map_id,MapMetadata::MAP_POSITION)
next 1 if mapPos && mapPos[0]==1 # Tiall region
next if pkmn.formSimple >= 2
mapPos = GameData::MapMetadata.get($game_map.map_id).town_map_position
next 1 if mapPos && mapPos[0] == 1 # Tiall region
next 0
}
})
MultipleForms.copy(:PIKACHU,:EXEGGCUTE,:CUBONE)
MultipleForms.copy(:PIKACHU, :EXEGGCUTE, :CUBONE)

View File

@@ -392,7 +392,7 @@ PBEvolution.register(:LevelDiving, {
PBEvolution.register(:LevelDarkness, {
"levelUpCheck" => proc { |pkmn, parameter|
next pkmn.level >= parameter && pbGetMetadata($game_map.map_id, MapMetadata::DARK_MAP)
next pkmn.level >= parameter && GameData::MapMetadata.get($game_map.map_id).dark_map
}
})
@@ -651,7 +651,7 @@ PBEvolution.register(:Location, {
PBEvolution.register(:Region, {
"minimumLevel" => 1, # Needs any level up
"levelUpCheck" => proc { |pkmn, parameter|
mapPos = pbGetMetadata($game_map.map_id, MapMetadata::MAP_POSITION)
mapPos = GameData::MapMetadata.get($game_map.map_id).town_map_position
next mapPos && mapPos[0] == parameter
}
})