Fixes Safari Zone infinite steps glitch

This commit is contained in:
infinitefusion
2023-05-07 19:14:52 -04:00
parent c69852f6e1
commit 3291f7a9fb
5 changed files with 10 additions and 4 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -24,9 +24,9 @@ class SafariState
pbFadeOutIn { pbFadeOutIn {
$game_temp.player_transferring = true $game_temp.player_transferring = true
$game_temp.transition_processing = true $game_temp.transition_processing = true
$game_temp.player_new_map_id = @start[0] $game_temp.player_new_map_id = 472 #@start[0]
$game_temp.player_new_x = @start[1] $game_temp.player_new_x = 28#@start[1]
$game_temp.player_new_y = @start[2] $game_temp.player_new_y = 11#@start[2]
$game_temp.player_new_direction = 2 $game_temp.player_new_direction = 2
$scene.transfer_player $scene.transfer_player
} }
@@ -63,11 +63,17 @@ def pbInSafari?
reception = pbSafariState.pbReceptionMap reception = pbSafariState.pbReceptionMap
return true if $game_map.map_id == reception return true if $game_map.map_id == reception
map_metadata = GameData::MapMetadata.try_get($game_map.map_id) map_metadata = GameData::MapMetadata.try_get($game_map.map_id)
return true if map_metadata && map_metadata.safari_map return true if map_metadata && map_metadata.safari_map || is_hardcoded_safari_map($game_map.map_id)
end end
return false return false
end end
def is_hardcoded_safari_map(map_id)
safari_maps = [445,74,484,75,485,82,486,107,487,715,718,488,717]
return safari_maps.include?(map_id)
end
def pbSafariState def pbSafariState
$PokemonGlobal.safariState = SafariState.new if !$PokemonGlobal.safariState $PokemonGlobal.safariState = SafariState.new if !$PokemonGlobal.safariState
return $PokemonGlobal.safariState return $PokemonGlobal.safariState

Binary file not shown.