mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 13:15:01 +00:00
Fixed fishing/Rock Smash/Headbutt being able to cause double wild battles
This commit is contained in:
@@ -451,13 +451,13 @@ def pbGenerateWildPokemon(species, level, isRoamer = false)
|
||||
end
|
||||
|
||||
# Used by fishing rods and Headbutt/Rock Smash/Sweet Scent to generate a wild
|
||||
# Pokémon (or two) for a triggered wild encounter.
|
||||
def pbEncounter(enc_type)
|
||||
# Pokémon (or two if it's Sweet Scent) for a triggered wild encounter.
|
||||
def pbEncounter(enc_type, only_single = true)
|
||||
$game_temp.encounter_type = enc_type
|
||||
encounter1 = $PokemonEncounters.choose_wild_pokemon(enc_type)
|
||||
EventHandlers.trigger(:on_wild_species_chosen, encounter1)
|
||||
return false if !encounter1
|
||||
if $PokemonEncounters.have_double_wild_battle?
|
||||
if !only_single && $PokemonEncounters.have_double_wild_battle?
|
||||
encounter2 = $PokemonEncounters.choose_wild_pokemon(enc_type)
|
||||
EventHandlers.trigger(:on_wild_species_chosen, encounter2)
|
||||
return false if !encounter2
|
||||
|
||||
@@ -877,7 +877,7 @@ def pbSweetScent
|
||||
viewport.dispose
|
||||
enctype = $PokemonEncounters.encounter_type
|
||||
if !enctype || !$PokemonEncounters.encounter_possible_here? ||
|
||||
!pbEncounter(enctype)
|
||||
!pbEncounter(enctype, false)
|
||||
pbMessage(_INTL("There appears to be nothing here..."))
|
||||
end
|
||||
end
|
||||
|
||||
@@ -75,7 +75,7 @@ class PokemonRegionMap_Scene
|
||||
@map_data = pbLoadTownMapData
|
||||
@fly_map = fly_map
|
||||
@mode = fly_map ? 1 : 0
|
||||
map_metadata = GameData::MapMetadata.try_get($game_map.map_id)
|
||||
map_metadata = $game_map.metadata
|
||||
playerpos = (map_metadata) ? map_metadata.town_map_position : nil
|
||||
if !playerpos
|
||||
mapindex = 0
|
||||
|
||||
Reference in New Issue
Block a user