randomizer - held items

This commit is contained in:
infinitefusion
2022-05-01 17:44:27 -04:00
parent d0e39ff72b
commit 334e2c74fe
6 changed files with 39 additions and 6 deletions

View File

@@ -147,7 +147,7 @@ module GameData
end
def add_generated_species_to_gym_array(new_species, trainerId)
expected_team_length =1
expected_team_length = 1
expected_team_length = $PokemonGlobal.randomTrainersHash[trainerId].length if $PokemonGlobal.randomTrainersHash[trainerId]
new_team = []
if $PokemonGlobal.randomGymTrainersHash[trainerId]
@@ -285,7 +285,12 @@ module GameData
pkmn.forced_form = pkmn_data[:form] if MultipleForms.hasFunction?(species, "getForm")
pkmn.form_simple = pkmn_data[:form]
end
pkmn.item = pkmn_data[:item]
if $game_switches[SWITCH_RANDOM_HELD_ITEMS]
pkmn.item = pbGetRandomHeldItem().id
else
pkmn.item = pkmn_data[:item]
end
if pkmn_data[:moves] && pkmn_data[:moves].length > 0
pkmn_data[:moves].each { |move| pkmn.learn_move(move) }
else