allows Pokeradar in caves & water

This commit is contained in:
infinitefusion
2022-04-18 17:56:26 -04:00
parent f473ab3cc2
commit e479a0d2eb
16 changed files with 51 additions and 36 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -358,17 +358,25 @@ module Settings
[171, 30, :BIDOOF,2,5], #Rt. 22 [171, 30, :BIDOOF,2,5], #Rt. 22
[143, 30, :RIOLU,25,25], #Rt. 23 [143, 30, :RIOLU,25,25], #Rt. 23
[8, 30, :BUNEARY,12,13], #Rt. 24 [8, 30, :BUNEARY,12,13], #Rt. 24
[145, 5, :ABSOL,30,35], #Rt. 26 [145, 30, :ABSOL,30,35], #Rt. 26
[147, 5, :ABSOL,30,35], #Rt. 27 [147, 30, :ABSOL,30,35], #Rt. 27
[311, 30, :BIDOOF,5,5], #Rt. 29 [311, 30, :BIDOOF,5,5], #Rt. 29
[284, 30, :LUXIO,40,45], #Rt. 33
[288, 30, :VIGOROTH,40,45], #Rt. 32
[342, 30, :GOLETT,40,45], #Ruins of Alph
[261, 30, :BELLOSSOM,45,50], #Rt. 31
[261, 30, :BIBAREL,45,50], #Rt. 30
[265, 30, :KIRLIA,25,30], #Rt. 34 [265, 30, :KIRLIA,25,30], #Rt. 34
[267, 30, :SUDOWOODO,25,30], #Rt. 36
[300, 30, :ROSELIA,30,30], #National Park [300, 30, :ROSELIA,30,30], #National Park
[300, 30, :BRELOOM,30,30], #Ilex Forest [300, 30, :BRELOOM,30,30], #Ilex Forest
[670, 30, :WEAVILE,50,50], #Ice mountains [670, 30, :WEAVILE,50,50], #Ice mountains
[528, 30, :PYUKUMUKU,20,20], #Treasure Beach [528, 30, :PYUKUMUKU,20,20], #Treasure Beach
[690, 30, :OCTILLERY,32,45], #Deep Ocean [690, 30, :OCTILLERY,32,45], #Deep Ocean
[561, 30, :MAGMAR,32,45], #Mt. Ember [561, 30, :MAGMAR,32,45], #Mt. Ember
[654, 30, :WHIMSICOTT,32,45], #Brine Road [562, 30, :NINJASK,45,50], #Boon Island
[603, 30, :KECLEON,45,50], #Chrono Island
[654, 30, :WHIMSICOTT,32,45] #Brine Road
] ]
#============================================================================= #=============================================================================

View File

@@ -14,15 +14,19 @@ end
def pbCanUsePokeRadar? def pbCanUsePokeRadar?
# Can't use Radar if not in tall grass # Can't use Radar if not in tall grass
terrain = $game_map.terrain_tag($game_player.x, $game_player.y) terrain = $game_map.terrain_tag($game_player.x, $game_player.y)
if !terrain.land_wild_encounters || !terrain.shows_grass_rustle # if !terrain.land_wild_encounters || !terrain.shows_grass_rustle
# pbMessage(_INTL("Can't use that here."))
# return false
# end
if $PokemonEncounters.encounter_type == nil
pbMessage(_INTL("Can't use that here.")) pbMessage(_INTL("Can't use that here."))
return false return false
end end
# Can't use Radar if map has no grass-based encounters (ignoring Bug Contest) # Can't use Radar if map has no grass-based encounters (ignoring Bug Contest)
if !$PokemonEncounters.has_normal_land_encounters? # if !$PokemonEncounters.has_normal_land_encounters?
pbMessage(_INTL("Can't use that here.")) # pbMessage(_INTL("Can't use that here."))
return false # return false
end # end
# Can't use Radar while cycling # Can't use Radar while cycling
# if $PokemonGlobal.bicycle # if $PokemonGlobal.bicycle
# pbMessage(_INTL("Can't use that while on a bicycle.")) # pbMessage(_INTL("Can't use that while on a bicycle."))
@@ -90,7 +94,7 @@ def playPokeradarLightAnimation(rareAllowed = false)
end end
def displayPokeradarBanner(seenPokemon = [], unseenPokemon = [], includeRare = false) def displayPokeradarBanner(seenPokemon = [], unseenPokemon = [], includeRare = false)
return if $PokemonTemp.pokeradar_ui !=nil return if $PokemonTemp.pokeradar_ui != nil
rarePokemon = includeRare ? listPokeradarRareEncounters() : [] rarePokemon = includeRare ? listPokeradarRareEncounters() : []
$PokemonTemp.pokeradar_ui = PokeRadar_UI.new(seenPokemon, unseenPokemon, rarePokemon) $PokemonTemp.pokeradar_ui = PokeRadar_UI.new(seenPokemon, unseenPokemon, rarePokemon)
end end
@@ -98,12 +102,13 @@ end
def pbPokeRadarCancel def pbPokeRadarCancel
if $PokemonTemp.pokeradar_ui != nil if $PokemonTemp.pokeradar_ui != nil
$PokemonTemp.pokeradar_ui.dispose $PokemonTemp.pokeradar_ui.dispose
$PokemonTemp.pokeradar_ui=nil $PokemonTemp.pokeradar_ui = nil
end end
$PokemonTemp.pokeradar = nil $PokemonTemp.pokeradar = nil
end end
def listPokemonInCurrentRoute(encounterType, onlySeen = false, onlyUnseen = false) def listPokemonInCurrentRoute(encounterType, onlySeen = false, onlyUnseen = false)
return [] if encounterType == nil
processed = [] processed = []
seen = [] seen = []
unseen = [] unseen = []
@@ -130,7 +135,11 @@ end
#can only encounter rare if have seen every encounterable land pokemon on the route #can only encounter rare if have seen every encounterable land pokemon on the route
def canEncounterRarePokemon(unseenPokemon) def canEncounterRarePokemon(unseenPokemon)
return unseenPokemon.length == 0 terrain = $game_map.terrain_tag($game_player.x, $game_player.y)
return unseenPokemon.length == 0 &&
$PokemonEncounters.has_normal_land_encounters? &&
terrain.land_wild_encounters &&
terrain.shows_grass_rustle
end end
def pbPokeRadarHighlightGrass(showmessage = true) def pbPokeRadarHighlightGrass(showmessage = true)
@@ -170,7 +179,7 @@ def pbPokeRadarHighlightGrass(showmessage = true)
end end
if grasses.length == 0 if grasses.length == 0
# No shaking grass found, break the chain # No shaking grass found, break the chain
pbMessage(_INTL("The grassy patch remained quiet...")) if showmessage pbMessage(_INTL("Nothing happened...")) if showmessage
pbPokeRadarCancel pbPokeRadarCancel
else else
# Show grass rustling animations # Show grass rustling animations

View File

@@ -97,6 +97,7 @@ class BetterRegionMap
if @show_player if @show_player
if map_metadata if map_metadata
player = map_metadata.town_map_position player = map_metadata.town_map_position
if player && player[0] == @region if player && player[0] == @region
$PokemonGlobal.regionMapSel[0] = player[1] $PokemonGlobal.regionMapSel[0] = player[1]
$PokemonGlobal.regionMapSel[1] = player[2] $PokemonGlobal.regionMapSel[1] = player[2]
@@ -172,25 +173,25 @@ class BetterRegionMap
@sprites["cursor"].z = 11 @sprites["cursor"].z = 11
# Center the window on the cursor # Center the window on the cursor
windowminx = -1 * (@window["map"].bmp.width - Settings::SCREEN_WIDTH) # windowminx = -1 * (@window["map"].bmp.width - Settings::SCREEN_WIDTH)
windowminx = 0 if windowminx > 0 # windowminx = 0 if windowminx > 0
windowminy = -1 * (@window["map"].bmp.height - Settings::SCREEN_HEIGHT) # windowminy = -1 * (@window["map"].bmp.height - Settings::SCREEN_HEIGHT)
windowminy = 0 if windowminy > 0 # windowminy = 0 if windowminy > 0
#
if @sprites["cursor"].x > (Settings::SCREEN_WIDTH / 2) # if @sprites["cursor"].x > (Settings::SCREEN_WIDTH / 2)
@window.x = (Settings::SCREEN_WIDTH / 2 ) - @sprites["cursor"].x # @window.x = (Settings::SCREEN_WIDTH / 2 ) - @sprites["cursor"].x
if (@window.x < windowminx) # if (@window.x < windowminx)
@window.x = windowminx # @window.x = windowminx
end # end
@sprites["cursor"].x += @window.x # @sprites["cursor"].x += @window.x
end # end
if @sprites["cursor"].y > (Settings::SCREEN_HEIGHT / 2) # if @sprites["cursor"].y > (Settings::SCREEN_HEIGHT / 2)
@window.y = (Settings::SCREEN_HEIGHT / 2 ) - @sprites["cursor"].y # @window.y = (Settings::SCREEN_HEIGHT / 2 ) - @sprites["cursor"].y
if @window.y < windowminy # if @window.y < windowminy
@window.y = windowminy # @window.y = windowminy
end # end
@sprites["cursor"].y += @window.y # @sprites["cursor"].y += @window.y
end # end
@sprites["cursor"].ox = (@sprites["cursor"].bmp.height - TileWidth) / 2.0 @sprites["cursor"].ox = (@sprites["cursor"].bmp.height - TileWidth) / 2.0
@sprites["cursor"].oy = @sprites["cursor"].ox @sprites["cursor"].oy = @sprites["cursor"].ox

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1338,9 +1338,9 @@ Pokemon = B95H23,21 #Ekix,
#------------------------- #-------------------------
[HIKER,Brice] [HIKER,Brice]
Pokemon = GEODUDE,18 #Geokarp, Pokemon = DIGLETT,18 #Geokarp,
Pokemon = DIGLETT,18 #Digchop, Pokemon = DIGLETT,18 #Digchop,
Pokemon = B76H129,20 #MagiLEM, Pokemon = B75H129,20 #MagiLEM,
#------------------------- #-------------------------
[PICNICKER,Caitlin] [PICNICKER,Caitlin]
@@ -3259,7 +3259,6 @@ Pokemon = MEW,22 #Charysaur,
[RIVAL1,Blue,12] [RIVAL1,Blue,12]
Items = SUPERPOTION,SUPERPOTION Items = SUPERPOTION,SUPERPOTION
Pokemon = B17H104,25 #Cueotto, Pokemon = B17H104,25 #Cueotto,
Pokemon = EXEGGCUTE,24
Pokemon = GYARADOS,23 Pokemon = GYARADOS,23
Pokemon = B64H120,22 #Starbra, Pokemon = B64H120,22 #Starbra,
Pokemon = MEW,25 #Warmeleon, Pokemon = MEW,25 #Warmeleon,
@@ -3269,7 +3268,6 @@ Pokemon = MEW,25 #Warmeleon,
[RIVAL1,Blue,13] [RIVAL1,Blue,13]
Items = SUPERPOTION,SUPERPOTION Items = SUPERPOTION,SUPERPOTION
Pokemon = B17H104,25 #Cueotto, Pokemon = B17H104,25 #Cueotto,
Pokemon = EXEGGCUTE,24
Pokemon = GYARADOS,23 Pokemon = GYARADOS,23
Pokemon = B64H120,22 #Starbra, Pokemon = B64H120,22 #Starbra,
Pokemon = MEW,25 #Ivytortle, Pokemon = MEW,25 #Ivytortle,
@@ -3279,7 +3277,6 @@ Pokemon = MEW,25 #Ivytortle,
[RIVAL1,Blue,14] [RIVAL1,Blue,14]
Items = SUPERPOTION,SUPERPOTION Items = SUPERPOTION,SUPERPOTION
Pokemon = B17H104,25 #Cueotto, Pokemon = B17H104,25 #Cueotto,
Pokemon = EXEGGCUTE,24
Pokemon = GYARADOS,23 Pokemon = GYARADOS,23
Pokemon = B64H120,22 #Starbra, Pokemon = B64H120,22 #Starbra,
Pokemon = MEW,25 #Charysaur, Pokemon = MEW,25 #Charysaur,