Final 0.6.1 fixes

Final 0.6.1 fixes
This commit is contained in:
AmazingAmpharos 2018-03-30 23:18:39 -05:00 committed by GitHub
commit dc81cc9163
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 15 deletions

View File

@ -881,7 +881,7 @@ class Spoiler(object):
for index, item in enumerate(shop.inventory): for index, item in enumerate(shop.inventory):
if item is None: if item is None:
continue 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) self.shops.append(shopdata)
@ -906,10 +906,11 @@ class Spoiler(object):
def to_json(self): def to_json(self):
self.parse_data() self.parse_data()
out = OrderedDict() out = OrderedDict()
out['entrances'] = self.entrances.values() out['Entrances'] = list(self.entrances.values())
out.update(self.locations) out.update(self.locations)
out['medallions'] = self.medallions out['Special'] = self.medallions
out['shops'] = self.shops if self.shops:
out['Shops'] = self.shops
out['playthrough'] = self.playthrough out['playthrough'] = self.playthrough
out['paths'] = self.paths out['paths'] = self.paths
out['meta'] = self.metadata out['meta'] = self.metadata

View File

@ -305,9 +305,9 @@ def set_up_take_anys(world):
sword = random.choice(swords) sword = random.choice(swords)
world.itempool.remove(sword) world.itempool.remove(sword)
world.itempool.append(ItemFactory('Rupees (20)')) 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: 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): for num in range(4):
take_any = Region("Take-Any #{}".format(num+1), RegionType.Cave) 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) take_any.shop = Shop(take_any, room_id, ShopType.TakeAny, 0xE3, True)
world.shops.append(take_any.shop) world.shops.append(take_any.shop)
take_any.shop.active = True take_any.shop.active = True
take_any.shop.add_inventory(0, 'Blue Potion', 0, 1) take_any.shop.add_inventory(0, 'Blue Potion', 0, 0)
take_any.shop.add_inventory(1, 'Boss Heart Container', 0, 1) take_any.shop.add_inventory(1, 'Boss Heart Container', 0, 0)
world.intialize_regions() world.intialize_regions()

12
Rom.py
View File

@ -417,7 +417,7 @@ def patch_rom(world, rom, hashtable, beep='normal', color='red', sprite=None):
# Rupoor negative value # Rupoor negative value
rom.write_int16_to_rom(0x180036, world.rupoor_cost) rom.write_int16_to_rom(0x180036, world.rupoor_cost)
# Set stun items # Set stun items
rom.write_byte(0x180180, 0x01) # Hookshot only rom.write_byte(0x180180, 0x02) # Hookshot only
# Make silver arrows only usable against Ganon # Make silver arrows only usable against Ganon
rom.write_byte(0x180181, 0x01) rom.write_byte(0x180181, 0x01)
#Make Blue Shield more expensive #Make Blue Shield more expensive
@ -534,19 +534,17 @@ def patch_rom(world, rom, hashtable, beep='normal', color='red', sprite=None):
# Make silver arrows freely usable # Make silver arrows freely usable
rom.write_byte(0x180181, 0x00) rom.write_byte(0x180181, 0x00)
#Set overflow items for progressive equipment #Set overflow items for progressive equipment
if world.goal == 'triforcehunt': if world.timer in ['timed', 'timed-countdown', 'timed-ohko']:
overflow_replacement = TRIFORCE_PIECE
elif world.timer in ['timed', 'timed-countdown', 'timed-ohko']:
overflow_replacement = GREEN_CLOCK overflow_replacement = GREEN_CLOCK
else: else:
overflow_replacement = GREEN_TWENTY_RUPEES overflow_replacement = GREEN_TWENTY_RUPEES
if world.difficulty in ['easy']: 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 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: 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 #Byrna residual magic cost
rom.write_bytes(0x45C42, [0x04, 0x02, 0x01]) rom.write_bytes(0x45C42, [0x04, 0x02, 0x01])