mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
Fixes issue with gym randomizer when wiping out in a gym
This commit is contained in:
@@ -127,7 +127,7 @@ def bstOk(newspecies, oldPokemonSpecies, bst_range = 50)
|
||||
end
|
||||
|
||||
def gymLeaderOk(newspecies)
|
||||
return true if $game_variables[152] == -1 #not in a gym
|
||||
return true if $game_variables[VAR_CURRENT_GYM_TYPE] == -1 #not in a gym
|
||||
leaderType = getLeaderType()
|
||||
if leaderType == nil
|
||||
return true
|
||||
@@ -138,7 +138,7 @@ def gymLeaderOk(newspecies)
|
||||
end
|
||||
|
||||
def getLeaderType()
|
||||
currentGym = $game_variables[152]
|
||||
currentGym = $game_variables[VAR_CURRENT_GYM_TYPE]
|
||||
if currentGym > $game_variables[151].length
|
||||
return nil
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user