mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-09 22:24:58 +00:00
Workaround for using pokeradar without repel
This commit is contained in:
@@ -119,7 +119,7 @@ ItemHandlers::UseInField.add(:MAXREPEL, proc { |item|
|
||||
Events.onStepTaken += proc {
|
||||
if $PokemonGlobal.repel > 0 && !$game_player.terrain_tag.ice # Shouldn't count down if on ice
|
||||
$PokemonGlobal.repel -= 1
|
||||
if $PokemonGlobal.repel <= 0
|
||||
if $PokemonGlobal.repel <= 0 && ! $PokemonGlobal.tempRepel
|
||||
isIncense = $game_switches[SWITCH_USED_AN_INCENSE]
|
||||
$game_switches[SWITCH_FORCE_ALL_WILD_FUSIONS] = false
|
||||
$game_switches[SWITCH_USED_AN_INCENSE] = false
|
||||
|
||||
@@ -55,6 +55,10 @@ def pbUsePokeRadar
|
||||
playPokeradarLightAnimation(rareAllowed)
|
||||
pbWait(20)
|
||||
pbPokeRadarHighlightGrass
|
||||
if $PokemonGlobal.repel <= 0
|
||||
$PokemonGlobal.repel=10
|
||||
$PokemonGlobal.tempRepel=true
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
@@ -101,6 +105,11 @@ def displayPokeradarBanner(seenPokemon = [], unseenPokemon = [], includeRare = f
|
||||
end
|
||||
|
||||
def pbPokeRadarCancel
|
||||
if $PokemonGlobal.tempRepel
|
||||
$PokemonGlobal.repel=0
|
||||
end
|
||||
$PokemonGlobal.tempRepel=false
|
||||
|
||||
if $PokemonTemp.pokeradar_ui != nil
|
||||
$PokemonTemp.pokeradar_ui.dispose
|
||||
$PokemonTemp.pokeradar_ui = nil
|
||||
|
||||
Reference in New Issue
Block a user