diff --git a/Data/Map801.rxdata b/Data/Map801.rxdata index 3305f0dd8..fd67619ed 100644 Binary files a/Data/Map801.rxdata and b/Data/Map801.rxdata differ diff --git a/Data/Scripts/012_Overworld/002_Battle triggering/001_Overworld_BattleStarting.rb b/Data/Scripts/012_Overworld/002_Battle triggering/001_Overworld_BattleStarting.rb index 6ae56edb4..bddded9a9 100644 --- a/Data/Scripts/012_Overworld/002_Battle triggering/001_Overworld_BattleStarting.rb +++ b/Data/Scripts/012_Overworld/002_Battle triggering/001_Overworld_BattleStarting.rb @@ -340,7 +340,11 @@ def pbWildBattle(species, level, outcomeVar=1, canRun=true, canLose=false) dexnum = getDexNumberForSpecies(species) if $game_switches[SWITCH_RANDOM_STATIC_ENCOUNTERS] && dexnum <= NB_POKEMON newSpecies = $PokemonGlobal.psuedoBSTHash[dexnum] - species = getSpecies(newSpecies) + if !newSpecies + displayRandomizerErrorMessage() + else + species = getSpecies(newSpecies) + end end # Potentially call a different pbWildBattle-type method instead (for roaming diff --git a/Data/Scripts/050_AddOns/GameplayUtils.rb b/Data/Scripts/050_AddOns/GameplayUtils.rb index e5310d03b..55db378e4 100644 --- a/Data/Scripts/050_AddOns/GameplayUtils.rb +++ b/Data/Scripts/050_AddOns/GameplayUtils.rb @@ -700,8 +700,11 @@ def regirock_steel_move_boulder() pbSEPlay("Entering Door") pbSetSelfSwitch(switch_event.id, "A", true) if switch_event end - - end +def displayRandomizerErrorMessage() + Kernel.pbMessage(_INTL("The randomizer has encountered an error. You should try to re-randomize your game as soon as possible.")) + Kernel.pbMessage(_INTL("You can do this on the top floor of Pokémon Centers.")) +end + diff --git a/Data/Scripts/050_AddOns/Trainers Rebattle.rb b/Data/Scripts/050_AddOns/Trainers Rebattle.rb index 062874315..a7d1c28be 100644 --- a/Data/Scripts/050_AddOns/Trainers Rebattle.rb +++ b/Data/Scripts/050_AddOns/Trainers Rebattle.rb @@ -214,8 +214,7 @@ def getFusionSpeciesSymbol(body, head) nb_pokemon = Settings::NB_POKEMON id = body_num * nb_pokemon + head_num if id > (nb_pokemon*nb_pokemon)+nb_pokemon - Kernel.pbMessage(_INTL("The randomizer has encountered an error. You should try to re-randomize your game as soon as possible.")) - Kernel.pbMessage(_INTL("You can do this on the top floor of Pokémon Centers.")) + displayRandomizerErrorMessage() return body end diff --git a/Data/System.rxdata b/Data/System.rxdata index f7c5f1785..db5d49e1f 100644 Binary files a/Data/System.rxdata and b/Data/System.rxdata differ