diff --git a/Data/Map562.rxdata b/Data/Map562.rxdata index 3283be048..9776aefd0 100644 Binary files a/Data/Map562.rxdata and b/Data/Map562.rxdata differ diff --git a/Data/Scripts/012_Overworld/002_Battle triggering/005_Overworld_RoamingPokemon.rb b/Data/Scripts/012_Overworld/002_Battle triggering/005_Overworld_RoamingPokemon.rb index 17d8ceacc..fd354c8b6 100644 --- a/Data/Scripts/012_Overworld/002_Battle triggering/005_Overworld_RoamingPokemon.rb +++ b/Data/Scripts/012_Overworld/002_Battle triggering/005_Overworld_RoamingPokemon.rb @@ -72,7 +72,7 @@ end def applyRoamWeather() return if $game_screen.weather_type != :None - currently_roaming = $PokemonGlobal.roamPosition.keys + currently_roaming = getAllCurrentlyRoamingPokemon() currently_roaming.each do |roamer_id| roamer_switch = Settings::ROAMING_SPECIES[roamer_id][2] roamer_active = $game_switches[roamer_switch] diff --git a/Data/Scripts/051_AddOns/New Items effects.rb b/Data/Scripts/051_AddOns/New Items effects.rb index 8814a0912..9d2fe8237 100644 --- a/Data/Scripts/051_AddOns/New Items effects.rb +++ b/Data/Scripts/051_AddOns/New Items effects.rb @@ -1868,13 +1868,27 @@ ItemHandlers::UseInField.add(:DEVONSCOPE, proc { |item| #TRACKER (for roaming legendaries) ItemHandlers::UseInField.add(:REVEALGLASS, proc { |item| track_pokemon() + next true }) ItemHandlers::UseFromBag.add(:REVEALGLASS, proc { |item| track_pokemon() + next true }) +def getAllCurrentlyRoamingPokemon + currently_roaming = [] + Settings::ROAMING_SPECIES.each_with_index do |data, i| + next if !GameData::Species.exists?(data[0]) + next if data[2] > 0 && !$game_switches[data[2]] # Isn't roaming + next if $PokemonGlobal.roamPokemon[i] == true # Roaming Pokémon has been caught + currently_roaming << i + end + return currently_roaming +end + def track_pokemon() - currently_roaming = $PokemonGlobal.roamPosition.keys + currently_roaming = getAllCurrentlyRoamingPokemon() + echoln currently_roaming weather_data = [] mapinfos = $RPGVX ? load_data("Data/MapInfos.rvdata") : load_data("Data/MapInfos.rxdata") currently_roaming.each do |roamer_id| @@ -1891,12 +1905,11 @@ def track_pokemon() end weather_data << forecast_msg if forecast_msg && !weather_data.include?(forecast_msg) end - + weather_data << _INTL("No unusual weather patterns have been detected.") if weather_data.empty? weather_data.each do |message| Kernel.pbMessage(message) end - # nbRoaming = 0 # if Settings::ROAMING_SPECIES.length == 0 # Kernel.pbMessage(_INTL("No roaming Pokémon defined.")) diff --git a/Data/System.rxdata b/Data/System.rxdata index 594ddaaa8..6ce8bb616 100644 Binary files a/Data/System.rxdata and b/Data/System.rxdata differ