mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 13:15:01 +00:00
Workaround for using pokeradar without repel
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -378,6 +378,7 @@ module Settings
|
|||||||
[261, 50, :BELLOSSOM,45,50], #Rt. 31
|
[261, 50, :BELLOSSOM,45,50], #Rt. 31
|
||||||
[262, 50, :BIBAREL,45,50], #Rt. 30
|
[262, 50, :BIBAREL,45,50], #Rt. 30
|
||||||
[265, 50, :KIRLIA,25,30], #Rt. 34
|
[265, 50, :KIRLIA,25,30], #Rt. 34
|
||||||
|
[254, 50, :SMEARGLE,25,30], #Rt. 35
|
||||||
[267, 50, :SUDOWOODO,25,30], #Rt. 36
|
[267, 50, :SUDOWOODO,25,30], #Rt. 36
|
||||||
[500, 50, :ROSELIA,30,30], #National Park
|
[500, 50, :ROSELIA,30,30], #National Park
|
||||||
[266, 50, :BRELOOM,30,30], #Ilex Forest
|
[266, 50, :BRELOOM,30,30], #Ilex Forest
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ class PokemonGlobalMetadata
|
|||||||
# Affecting the map
|
# Affecting the map
|
||||||
attr_accessor :bridge
|
attr_accessor :bridge
|
||||||
attr_accessor :repel
|
attr_accessor :repel
|
||||||
|
attr_accessor :tempRepel
|
||||||
attr_accessor :flashUsed
|
attr_accessor :flashUsed
|
||||||
attr_accessor :encounter_version
|
attr_accessor :encounter_version
|
||||||
# Map transfers
|
# Map transfers
|
||||||
@@ -95,6 +96,7 @@ class PokemonGlobalMetadata
|
|||||||
# Affecting the map
|
# Affecting the map
|
||||||
@bridge = 0
|
@bridge = 0
|
||||||
@repel = 0
|
@repel = 0
|
||||||
|
@tempRepel = false
|
||||||
@flashused = false
|
@flashused = false
|
||||||
@encounter_version = 0
|
@encounter_version = 0
|
||||||
# Map transfers
|
# Map transfers
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ ItemHandlers::UseInField.add(:MAXREPEL, proc { |item|
|
|||||||
Events.onStepTaken += proc {
|
Events.onStepTaken += proc {
|
||||||
if $PokemonGlobal.repel > 0 && !$game_player.terrain_tag.ice # Shouldn't count down if on ice
|
if $PokemonGlobal.repel > 0 && !$game_player.terrain_tag.ice # Shouldn't count down if on ice
|
||||||
$PokemonGlobal.repel -= 1
|
$PokemonGlobal.repel -= 1
|
||||||
if $PokemonGlobal.repel <= 0
|
if $PokemonGlobal.repel <= 0 && ! $PokemonGlobal.tempRepel
|
||||||
isIncense = $game_switches[SWITCH_USED_AN_INCENSE]
|
isIncense = $game_switches[SWITCH_USED_AN_INCENSE]
|
||||||
$game_switches[SWITCH_FORCE_ALL_WILD_FUSIONS] = false
|
$game_switches[SWITCH_FORCE_ALL_WILD_FUSIONS] = false
|
||||||
$game_switches[SWITCH_USED_AN_INCENSE] = false
|
$game_switches[SWITCH_USED_AN_INCENSE] = false
|
||||||
|
|||||||
@@ -55,6 +55,10 @@ def pbUsePokeRadar
|
|||||||
playPokeradarLightAnimation(rareAllowed)
|
playPokeradarLightAnimation(rareAllowed)
|
||||||
pbWait(20)
|
pbWait(20)
|
||||||
pbPokeRadarHighlightGrass
|
pbPokeRadarHighlightGrass
|
||||||
|
if $PokemonGlobal.repel <= 0
|
||||||
|
$PokemonGlobal.repel=10
|
||||||
|
$PokemonGlobal.tempRepel=true
|
||||||
|
end
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -101,6 +105,11 @@ def displayPokeradarBanner(seenPokemon = [], unseenPokemon = [], includeRare = f
|
|||||||
end
|
end
|
||||||
|
|
||||||
def pbPokeRadarCancel
|
def pbPokeRadarCancel
|
||||||
|
if $PokemonGlobal.tempRepel
|
||||||
|
$PokemonGlobal.repel=0
|
||||||
|
end
|
||||||
|
$PokemonGlobal.tempRepel=false
|
||||||
|
|
||||||
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
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user