diff --git a/Data/Scripts/001_Settings.rb b/Data/Scripts/001_Settings.rb index fe813737a..ba92a3b35 100644 --- a/Data/Scripts/001_Settings.rb +++ b/Data/Scripts/001_Settings.rb @@ -249,7 +249,7 @@ DEXES_WITH_OFFSETS = [] # - Name of BGM to play for that encounter (optional). # - Roaming areas specifically for this Pokémon (optional). #=============================================================================== -RoamingAreas = { +ROAMING_AREAS = { 5 => [ 21, 28, 31, 39, 41, 44, 47, 66, 69], 21 => [5, 28, 31, 39, 41, 44, 47, 66, 69], 28 => [5, 21, 31, 39, 41, 44, 47, 66, 69], @@ -261,7 +261,7 @@ RoamingAreas = { 66 => [5, 21, 28, 31, 39, 41, 44, 47, 69], 69 => [5, 21, 28, 31, 39, 41, 44, 47, 66 ] } -RoamingSpecies = [ +ROAMING_SPECIES = [ [:LATIAS, 30, 53, 0, "Battle roaming"], [:LATIOS, 30, 53, 0, "Battle roaming"], [:KYOGRE, 40, 54, 2, nil, { diff --git a/Data/Scripts/013_Overworld/009_PField_RoamingPokemon.rb b/Data/Scripts/013_Overworld/009_PField_RoamingPokemon.rb index 36c2dc47f..1d35cf544 100644 --- a/Data/Scripts/013_Overworld/009_PField_RoamingPokemon.rb +++ b/Data/Scripts/013_Overworld/009_PField_RoamingPokemon.rb @@ -27,9 +27,9 @@ end # Gets the roaming areas for a particular Pokémon. def pbRoamingAreas(idxRoamer) # [species symbol, level, Game Switch, encounter type, battle BGM, area maps hash] - roamData = RoamingSpecies[idxRoamer] + roamData = ROAMING_SPECIES[idxRoamer] return roamData[5] if roamData && roamData[5] - return RoamingAreas + return ROAMING_AREAS end # Puts a roamer in a completely random map available to it. @@ -45,15 +45,15 @@ def pbRoamPokemon # Start all roamers off in random maps if !$PokemonGlobal.roamPosition $PokemonGlobal.roamPosition = {} - for i in 0...RoamingSpecies.length - species = getID(PBSpecies,RoamingSpecies[i][0]) + for i in 0...ROAMING_SPECIES.length + species = getID(PBSpecies,ROAMING_SPECIES[i][0]) next if !species || species<=0 keys = pbRoamingAreas(i).keys $PokemonGlobal.roamPosition[i] = keys[rand(keys.length)] end end # Roam each Pokémon in turn - for i in 0...RoamingSpecies.length + for i in 0...ROAMING_SPECIES.length pbRoamPokemonOne(i) end end @@ -62,7 +62,7 @@ end # currently possible to encounter it (i.e. its Game Switch is off). def pbRoamPokemonOne(idxRoamer) # [species symbol, level, Game Switch, encounter type, battle BGM, area maps hash] - roamData = RoamingSpecies[idxRoamer] + roamData = ROAMING_SPECIES[idxRoamer] return if roamData[2]>0 && !$game_switches[roamData[2]] # Game Switch is off # Ensure species is a number rather than a string/symbol species = getID(PBSpecies,roamData[0]) @@ -162,9 +162,9 @@ EncounterModifier.register(proc { |encounter| # Look at each roaming Pokémon in turn and decide whether it's possible to # encounter it roamerChoices = [] - for i in 0...RoamingSpecies.length + for i in 0...ROAMING_SPECIES.length # [species symbol, level, Game Switch, encounter type, battle BGM, area maps hash] - roamData = RoamingSpecies[i] + roamData = ROAMING_SPECIES[i] next if roamData[2]>0 && !$game_switches[roamData[2]] # Game Switch is off next if $PokemonGlobal.roamPokemon[i]==true # Roaming Pokémon has been caught # Ensure species is a number rather than a string/symbol diff --git a/Data/Scripts/021_Debug/002_Debug_Actions.rb b/Data/Scripts/021_Debug/002_Debug_Actions.rb index 158b30245..b265f3c08 100644 --- a/Data/Scripts/021_Debug/002_Debug_Actions.rb +++ b/Data/Scripts/021_Debug/002_Debug_Actions.rb @@ -361,7 +361,7 @@ class SpriteWindow_DebugRoamers < Window_DrawableCommand end def roamerCount - return RoamingSpecies.length + return ROAMING_SPECIES.length end def itemCount @@ -392,7 +392,7 @@ class SpriteWindow_DebugRoamers < Window_DrawableCommand # Advance roaming self.shadowtext(_INTL("[Clear all current roamer locations]"),rect.x,rect.y,nameWidth,rect.height) else - pkmn = RoamingSpecies[index] + pkmn = ROAMING_SPECIES[index] name = PBSpecies.getName(getID(PBSpecies,pkmn[0]))+" (Lv. #{pkmn[1]})" status = "" statuscolor = 0 @@ -467,7 +467,7 @@ def pbDebugRoamers if cmdwindow.index0 && !$game_switches[pkmn[2]] # not roaming -> roaming $game_switches[pkmn[2]] = true @@ -487,7 +487,7 @@ def pbDebugRoamers end cmdwindow.refresh elsif cmdwindow.index==cmdwindow.itemCount-2 # All roam - if RoamingSpecies.length==0 + if ROAMING_SPECIES.length==0 pbPlayBuzzerSE else pbPlayDecisionSE @@ -496,11 +496,11 @@ def pbDebugRoamers cmdwindow.refresh end else # Clear all roaming locations - if RoamingSpecies.length==0 + if ROAMING_SPECIES.length==0 pbPlayBuzzerSE else pbPlayDecisionSE - for i in 0...RoamingSpecies.length + for i in 0...ROAMING_SPECIES.length $PokemonGlobal.roamPosition[i] = nil end $PokemonGlobal.roamedAlready = false