mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 21:24:59 +00:00
Ball property in trainers.txt can now be a Poké Ball item's ID, fixed move-learning saying "already knows four moves" regardless of the value of Pokemon::MAX_MOVES
This commit is contained in:
@@ -206,16 +206,16 @@ def pbChooseAbilityList(default = nil)
|
||||
return pbChooseList(commands, default, nil, -1)
|
||||
end
|
||||
|
||||
def pbChooseBallList(defaultMoveID = -1)
|
||||
def pbChooseBallList(defaultMoveID = nil)
|
||||
cmdwin = pbListWindow([], 200)
|
||||
commands = []
|
||||
moveDefault = 0
|
||||
for key in $BallTypes.keys
|
||||
item = GameData::Item.try_get($BallTypes[key])
|
||||
commands.push([key.to_i, item.name]) if item
|
||||
commands.push([$BallTypes[key], item.name]) if item
|
||||
end
|
||||
commands.sort! { |a, b| a[1] <=> b[1] }
|
||||
if defaultMoveID >= 0
|
||||
if defaultMoveID
|
||||
for i in 0...commands.length
|
||||
moveDefault = i if commands[i][0] == defaultMoveID
|
||||
end
|
||||
|
||||
@@ -557,8 +557,7 @@ class BallProperty
|
||||
end
|
||||
|
||||
def set(_settingname,oldsetting)
|
||||
ret = pbChooseBallList((oldsetting) ? oldsetting : -1)
|
||||
return (ret>=0) ? ret : (oldsetting) ? oldsetting : nil
|
||||
return pbChooseBallList(oldsetting)
|
||||
end
|
||||
|
||||
def defaultValue
|
||||
@@ -566,7 +565,7 @@ class BallProperty
|
||||
end
|
||||
|
||||
def format(value)
|
||||
return (value) ? pbBallTypeToItem(value).name : "-"
|
||||
return (value) ? GameData::Item.get(value).name : "-"
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user