From c40196e07c6052839f8246385f7900df5c7d837b Mon Sep 17 00:00:00 2001 From: Louis-David Perron <6599624+ldperron@users.noreply.github.com> Date: Wed, 16 Sep 2020 18:18:17 -0400 Subject: [PATCH] Fixed issues with customitemarray (#140) * Fixed issues with customitemarray * Fixed Triforce in custom item pool --- Gui.py | 4 ++-- ItemPool.py | 12 +++++++----- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Gui.py b/Gui.py index cd69f5e9..7f6f4e86 100755 --- a/Gui.py +++ b/Gui.py @@ -557,8 +557,8 @@ def guiMain(args=None): int(rupee20Var.get()), int(rupee50Var.get()), int(rupee100Var.get()), int(rupee300Var.get()), int(rupoorVar.get()), int(blueclockVar.get()), int(greenclockVar.get()), int(redclockVar.get()), int(progbowVar.get()), - int(bomb10Var.get()), int(triforceVar.get()), - int(rupoorcostVar.get()), int(universalkeyVar.get())] + int(bomb10Var.get()), int(universalkeyVar.get()), + int(rupoorcostVar.get()), int(triforceVar.get())] guiargs.rom = romVar.get() guiargs.create_diff = patchesVar.get() guiargs.sprite = sprite diff --git a/ItemPool.py b/ItemPool.py index 05d7a51d..0c3bdbdd 100644 --- a/ItemPool.py +++ b/ItemPool.py @@ -712,15 +712,16 @@ def make_custom_item_pool(world, player): placed_items[loc] = item # Correct for insanely oversized item counts and take initial steps to handle undersized pools. - for x in range(0, 64): + for x in range(0, 67): if customitemarray[x] > total_items_to_place: customitemarray[x] = total_items_to_place - if customitemarray[66] > total_items_to_place: - customitemarray[66] = total_items_to_place + if customitemarray[68] > total_items_to_place: + customitemarray[68] = total_items_to_place + + # count all items, except rupoor cost itemtotal = 0 - for x in range(0, 64): + for x in range(0, 67): itemtotal = itemtotal + customitemarray[x] - itemtotal = itemtotal + customitemarray[66] itemtotal = itemtotal + customitemarray[68] pool.extend(['Bow'] * customitemarray[0]) @@ -784,6 +785,7 @@ def make_custom_item_pool(world, player): pool.extend(['Red Clock'] * customitemarray[63]) pool.extend(['Progressive Bow'] * customitemarray[64]) pool.extend(['Bombs (10)'] * customitemarray[65]) + pool.extend(['Triforce'] * customitemarray[68]) diff = difficulties[difficulty]