Fixed roaming Pokémon not remembering whether they have been caught

This commit is contained in:
Maruno17
2022-10-08 18:06:37 +01:00
parent de07341337
commit b41a46aacf
2 changed files with 3 additions and 2 deletions

View File

@@ -6,7 +6,8 @@ class PokemonGlobalMetadata
attr_writer :roamPokemonCaught
def roamPokemonCaught
return @roamPokemonCaught || []
@roamPokemonCaught = [] if !@roamPokemonCaught
return @roamPokemonCaught
end
end

View File

@@ -511,7 +511,7 @@ def pbDebugRoamers
# defeated -> caught
$PokemonGlobal.roamPokemonCaught[cmdwindow.index] = true
elsif pkmn[2] > 0
# caught -> not roaming (or roaming if Switch ID is 0
# caught -> not roaming (or roaming if Switch ID is 0)
$game_switches[pkmn[2]] = false if pkmn[2] > 0
$PokemonGlobal.roamPokemon[cmdwindow.index] = nil
$PokemonGlobal.roamPokemonCaught[cmdwindow.index] = false