Adds debug function to change a pokemon's species from head and body pokedex numbers

This commit is contained in:
chardub
2025-02-06 19:47:11 -05:00
parent 1809d246b6
commit 44f114b5e0
4 changed files with 28 additions and 7 deletions

View File

@@ -115,14 +115,16 @@ end
# selected (or nil if the selection was canceled). "default", if specified, is
# the ID of the species to initially select. Pressing Input::ACTION will toggle
# the list sorting between numerical and alphabetical.
def pbChooseSpeciesList(default = nil)
def pbChooseSpeciesList(default = nil,max=nil)
# commands = []
# GameData::Species.each { |s| commands.push([s.id_number, s.real_name, s.id]) if s.form == 0 }
# return pbChooseList(commands, default, nil, -1)
#
defaultNumber = default == nil ? 1 : getDexNumberForSpecies(default)
params = ChooseNumberParams.new
params.setRange(1,PBSpecies.maxValue)
max = max ? max : PBSpecies.maxValue
params.setRange(1,max)
params.setInitialValue(defaultNumber)
dexNum = pbMessageChooseNumber("dex number?",params)
return GameData::Species.get(dexNum)