mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
randomizer fix - removes static encounter
This commit is contained in:
@@ -231,6 +231,9 @@ def pbBattleOnStepTaken(repel_active)
|
||||
end
|
||||
end
|
||||
|
||||
if encounter[0].is_a?(Integer)
|
||||
encounter[0] = getSpecies(encounter[0])
|
||||
end
|
||||
|
||||
$game_switches[SWITCH_FORCE_FUSE_NEXT_POKEMON] = false
|
||||
|
||||
|
||||
@@ -331,11 +331,7 @@ end
|
||||
#===============================================================================
|
||||
# Used when walking in tall grass, hence the additional code.
|
||||
def pbWildBattle(species, level, outcomeVar=1, canRun=true, canLose=false)
|
||||
if $game_switches[SWITCH_RANDOM_STATIC_ENCOUNTERS]
|
||||
species = $PokemonGlobal.psuedoBSTHash[dexNum(species)]
|
||||
else
|
||||
species = GameData::Species.get(species).id
|
||||
end
|
||||
species = GameData::Species.get(species).id
|
||||
# Potentially call a different pbWildBattle-type method instead (for roaming
|
||||
# Pokémon, Safari battles, Bug Contest battles)
|
||||
handled = [nil]
|
||||
|
||||
@@ -214,12 +214,12 @@ class RandomizerWildPokemonOptionsScene < PokemonOption_Scene
|
||||
end
|
||||
}
|
||||
),
|
||||
EnumOption.new(_INTL("Static encounters"), [_INTL("On"), _INTL("Off")],
|
||||
proc { $game_switches[RANDOM_STATIC] ? 0 : 1 },
|
||||
proc { |value|
|
||||
$game_switches[RANDOM_STATIC] = value == 0
|
||||
}
|
||||
),
|
||||
# EnumOption.new(_INTL("Static encounters"), [_INTL("On"), _INTL("Off")],
|
||||
# proc { $game_switches[RANDOM_STATIC] ? 0 : 1 },
|
||||
# proc { |value|
|
||||
# $game_switches[RANDOM_STATIC] = value == 0
|
||||
# }
|
||||
# ),
|
||||
|
||||
EnumOption.new(_INTL("Gift Pokémon"), [_INTL("On"), _INTL("Off")],
|
||||
proc { $game_switches[GIFT_POKEMON] ? 0 : 1 },
|
||||
|
||||
@@ -21,6 +21,7 @@ SWITCH_GAME_DIFFICULTY_EASY = 665
|
||||
SWITCH_GAME_DIFFICULTY_HARD = 666
|
||||
|
||||
#Game progression switches
|
||||
SWITCH_CHOOSING_STARTER=3
|
||||
SWITCH_GOT_BADGE_1 = 4
|
||||
SWITCH_GOT_BADGE_2 = 5
|
||||
SWITCH_GOT_BADGE_3 = 6
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
def pbAddPokemonID(pokemon, level = nil, seeform = true, dontRandomize = false)
|
||||
return if !pokemon || !$Trainer
|
||||
dontRandomize = true if $game_switches[3] #when choosing starters
|
||||
dontRandomize = true if $game_switches[SWITCH_CHOOSING_STARTER] #when choosing starters
|
||||
|
||||
if pbBoxesFull?
|
||||
Kernel.pbMessage(_INTL("There's no more room for Pokémon!\1"))
|
||||
@@ -12,9 +12,8 @@ def pbAddPokemonID(pokemon, level = nil, seeform = true, dontRandomize = false)
|
||||
pokemon = Pokemon.new(pokemon, level, $Trainer)
|
||||
end
|
||||
#random species if randomized gift pokemon & wild poke
|
||||
if $game_switches[780] && $game_switches[778] && !dontRandomize
|
||||
oldSpecies = pokemon.species
|
||||
pokemon.species = $PokemonGlobal.psuedoBSTHash[oldSpecies]
|
||||
if $game_switches[SWITCH_RANDOM_GIFT_POKEMON] && $game_switches[SWITCH_RANDOM_WILD] && !dontRandomize
|
||||
tryRandomizeGiftPokemon(pokemon,dontRandomize)
|
||||
end
|
||||
|
||||
speciesname = PBSpecies.getName(pokemon.species)
|
||||
@@ -26,6 +25,7 @@ end
|
||||
|
||||
def pbAddPokemonID(pokemon_id, level = 1, see_form = true, skip_randomize = false)
|
||||
return false if !pokemon_id
|
||||
skip_randomize = true if $game_switches[SWITCH_CHOOSING_STARTER] #when choosing starters
|
||||
if pbBoxesFull?
|
||||
pbMessage(_INTL("There's no more room for Pokémon!\1"))
|
||||
pbMessage(_INTL("The Pokémon Boxes are full and can't accept any more!"))
|
||||
@@ -37,9 +37,8 @@ def pbAddPokemonID(pokemon_id, level = 1, see_form = true, skip_randomize = fals
|
||||
end
|
||||
|
||||
#random species if randomized gift pokemon & wild poke
|
||||
if $game_switches[780] && $game_switches[778] && !skip_randomize
|
||||
oldSpecies = pokemon.species
|
||||
pokemon.species = $PokemonGlobal.psuedoBSTHash[oldSpecies]
|
||||
if $game_switches[SWITCH_RANDOM_GIFT_POKEMON] && $game_switches[SWITCH_RANDOM_WILD] && !skip_randomize
|
||||
tryRandomizeGiftPokemon(pokemon,skip_randomize)
|
||||
end
|
||||
|
||||
pbMessage(_INTL("{1} obtained {2}!\\me[Pkmn get]\\wtnp[80]\1", $Trainer.name, species_name))
|
||||
|
||||
Reference in New Issue
Block a user