From 5d149cabc72f547268f14be35962f68748c969bc Mon Sep 17 00:00:00 2001 From: Kevin Cathcart Date: Mon, 26 Mar 2018 19:32:19 -0400 Subject: [PATCH 1/4] Fix bugs from recent playtest --- ItemList.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ItemList.py b/ItemList.py index 1124c109..e25c9f07 100644 --- a/ItemList.py +++ b/ItemList.py @@ -305,9 +305,9 @@ def set_up_take_anys(world): sword = random.choice(swords) world.itempool.remove(sword) world.itempool.append(ItemFactory('Rupees (20)')) - old_man_take_any.shop.add_inventory(0, sword.name, 0, 1, create_location=True) + old_man_take_any.shop.add_inventory(0, sword.name, 0, 0, create_location=True) else: - old_man_take_any.shop.add_inventory(0, 'Rupees (300)', 0, 1) + old_man_take_any.shop.add_inventory(0, 'Rupees (300)', 0, 0) for num in range(4): take_any = Region("Take-Any #{}".format(num+1), RegionType.Cave) @@ -322,8 +322,8 @@ def set_up_take_anys(world): take_any.shop = Shop(take_any, room_id, ShopType.TakeAny, 0xE3, True) world.shops.append(take_any.shop) take_any.shop.active = True - take_any.shop.add_inventory(0, 'Blue Potion', 0, 1) - take_any.shop.add_inventory(1, 'Boss Heart Container', 0, 1) + take_any.shop.add_inventory(0, 'Blue Potion', 0, 0) + take_any.shop.add_inventory(1, 'Boss Heart Container', 0, 0) world.intialize_regions() From 4c6a140af904d62aab5e46b70501d42d730abc90 Mon Sep 17 00:00:00 2001 From: Kevin Cathcart Date: Mon, 26 Mar 2018 21:39:48 -0400 Subject: [PATCH 2/4] Fix json spoiler serialization Correct shop spoiler Adjust cases for main spoiler sections --- BaseClasses.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/BaseClasses.py b/BaseClasses.py index 6c9799cf..cff6df90 100644 --- a/BaseClasses.py +++ b/BaseClasses.py @@ -881,7 +881,7 @@ class Spoiler(object): for index, item in enumerate(shop.inventory): if item is None: continue - shopdata['item_{}'.format(index)] = "{} ({})".format(item['item'], item['price']) if item['price'] else item['item'] + shopdata['item_{}'.format(index)] = "{} — {}".format(item['item'], item['price']) if item['price'] else item['item'] self.shops.append(shopdata) @@ -906,10 +906,11 @@ class Spoiler(object): def to_json(self): self.parse_data() out = OrderedDict() - out['entrances'] = self.entrances.values() + out['Entrances'] = list(self.entrances.values()) out.update(self.locations) - out['medallions'] = self.medallions - out['shops'] = self.shops + out['Special'] = self.medallions + if self.shops: + out['Shops'] = self.shops out['playthrough'] = self.playthrough out['paths'] = self.paths out['meta'] = self.metadata From 48f08c70d76ad242fe08442e3acec0214f6e5b67 Mon Sep 17 00:00:00 2001 From: Kevin Cathcart Date: Thu, 29 Mar 2018 22:01:43 -0400 Subject: [PATCH 3/4] Overflow progressives no longer become triforce pieces Also commir a change that was supposed to be included a few days ago. --- Rom.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Rom.py b/Rom.py index ce506410..2abc22a8 100644 --- a/Rom.py +++ b/Rom.py @@ -534,19 +534,17 @@ def patch_rom(world, rom, hashtable, beep='normal', color='red', sprite=None): # Make silver arrows freely usable rom.write_byte(0x180181, 0x00) #Set overflow items for progressive equipment - if world.goal == 'triforcehunt': - overflow_replacement = TRIFORCE_PIECE - elif world.timer in ['timed', 'timed-countdown', 'timed-ohko']: + if world.timer in ['timed', 'timed-countdown', 'timed-ohko']: overflow_replacement = GREEN_CLOCK else: overflow_replacement = GREEN_TWENTY_RUPEES if world.difficulty in ['easy']: - rom.write_byte(0x180181, 0x03) # auto equip silvers on pickup and at ganon + rom.write_byte(0x180182, 0x03) # auto equip silvers on pickup and at ganon elif world.retro and world.difficulty in ['hard','expert', 'insane']: #FIXME: this is temporary for v29 baserom - rom.write_byte(0x180181, 0x03) # auto equip silvers on pickup and at ganon + rom.write_byte(0x180182, 0x03) # auto equip silvers on pickup and at ganon else: - rom.write_byte(0x180181, 0x01) # auto equip silvers on pickup + rom.write_byte(0x180182, 0x01) # auto equip silvers on pickup #Byrna residual magic cost rom.write_bytes(0x45C42, [0x04, 0x02, 0x01]) From 77854568caab07772543898103a363317e80d889 Mon Sep 17 00:00:00 2001 From: Kevin Cathcart Date: Thu, 29 Mar 2018 22:07:05 -0400 Subject: [PATCH 4/4] fix stun item --- Rom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Rom.py b/Rom.py index 2abc22a8..bd96b29f 100644 --- a/Rom.py +++ b/Rom.py @@ -417,7 +417,7 @@ def patch_rom(world, rom, hashtable, beep='normal', color='red', sprite=None): # Rupoor negative value rom.write_int16_to_rom(0x180036, world.rupoor_cost) # Set stun items - rom.write_byte(0x180180, 0x01) # Hookshot only + rom.write_byte(0x180180, 0x02) # Hookshot only # Make silver arrows only usable against Ganon rom.write_byte(0x180181, 0x01) #Make Blue Shield more expensive