Wrote a generalised data property editor that deals with a list of things from a GameData module, allowed the WildItem properties for species to contain multiple items each

This commit is contained in:
Maruno17
2021-11-21 22:24:58 +00:00
parent c8b574ed7c
commit d93d73caa8
9 changed files with 170 additions and 354 deletions

View File

@@ -405,11 +405,11 @@ def pbGenerateWildPokemon(species,level,isRoamer=false)
end
itemrnd = rand(100)
if (items[0]==items[1] && items[1]==items[2]) || itemrnd<chances[0]
genwildpoke.item = items[0]
genwildpoke.item = items[0].sample
elsif itemrnd<(chances[0]+chances[1])
genwildpoke.item = items[1]
genwildpoke.item = items[1].sample
elsif itemrnd<(chances[0]+chances[1]+chances[2])
genwildpoke.item = items[2]
genwildpoke.item = items[2].sample
end
# Improve chances of shiny Pokémon with Shiny Charm and battling more of the
# same species