Improve light cone handling.
This commit is contained in:
parent
5bb8277ade
commit
d817f5972c
|
@ -25,6 +25,9 @@ class World(object):
|
||||||
self.place_dungeon_items = place_dungeon_items # configurable in future
|
self.place_dungeon_items = place_dungeon_items # configurable in future
|
||||||
self.agahnim_fix_required = False
|
self.agahnim_fix_required = False
|
||||||
self.swamp_patch_required = False
|
self.swamp_patch_required = False
|
||||||
|
self.sewer_light_cone = mode == 'standard'
|
||||||
|
self.light_world_light_cone = mode == 'standard' # to be changed for v22 ToDo
|
||||||
|
self.dark_world_light_cone = False
|
||||||
|
|
||||||
def get_region(self, regionname):
|
def get_region(self, regionname):
|
||||||
if isinstance(regionname, Region):
|
if isinstance(regionname, Region):
|
||||||
|
|
11
Rom.py
11
Rom.py
|
@ -68,9 +68,6 @@ def patch_rom(world, rom, hashtable, quickswap=False, beep='normal', sprite=None
|
||||||
# set open mode:
|
# set open mode:
|
||||||
if world.mode == 'open':
|
if world.mode == 'open':
|
||||||
write_byte(rom, 0x180032, 0x01) # open mode
|
write_byte(rom, 0x180032, 0x01) # open mode
|
||||||
write_byte(rom, 0x180038, 0x00) # sewers light cone disable
|
|
||||||
write_byte(rom, 0x180039, 0x00) # light world light cone disable
|
|
||||||
write_byte(rom, 0x18003A, 0x00) # dark world light cone disable
|
|
||||||
|
|
||||||
# disable sword sprite from uncle
|
# disable sword sprite from uncle
|
||||||
write_bytes(rom, 0x6D263, [0x00, 0x00, 0xf6, 0xff, 0x00, 0x0E])
|
write_bytes(rom, 0x6D263, [0x00, 0x00, 0xf6, 0xff, 0x00, 0x0E])
|
||||||
|
@ -85,9 +82,11 @@ def patch_rom(world, rom, hashtable, quickswap=False, beep='normal', sprite=None
|
||||||
write_bytes(rom, 0x6D323, [0x00, 0x00, 0xe4, 0xff, 0x08, 0x0E])
|
write_bytes(rom, 0x6D323, [0x00, 0x00, 0xe4, 0xff, 0x08, 0x0E])
|
||||||
else:
|
else:
|
||||||
write_byte(rom, 0x180032, 0x00) # standard mode
|
write_byte(rom, 0x180032, 0x00) # standard mode
|
||||||
write_byte(rom, 0x180038, 0x01) # sewers light cone enabled
|
|
||||||
write_byte(rom, 0x180039, 0x01) # light world light cone enabled
|
# set light cones
|
||||||
write_byte(rom, 0x18003A, 0x00) # dark world light cone disable
|
write_byte(rom, 0x180038, 0x01 if world.sewer_light_cone else 0x00)
|
||||||
|
write_byte(rom, 0x180039, 0x01 if world.light_world_light_cone else 0x00)
|
||||||
|
write_byte(rom, 0x18003A, 0x01 if world.dark_world_light_cone else 0x00)
|
||||||
|
|
||||||
# disable light world cane in minor glitches
|
# disable light world cane in minor glitches
|
||||||
if world.logic == 'minorglitches':
|
if world.logic == 'minorglitches':
|
||||||
|
|
5
Rules.py
5
Rules.py
|
@ -336,7 +336,7 @@ def no_glitches_rules(world):
|
||||||
spot = world.get_location(spot)
|
spot = world.get_location(spot)
|
||||||
else:
|
else:
|
||||||
spot = world.get_entrance(spot)
|
spot = world.get_entrance(spot)
|
||||||
if world.mode == 'open' or check_is_dark_world(world.get_region(region)):
|
if (not world.dark_world_light_cone and check_is_dark_world(world.get_region(region))) or (not world.light_world_light_cone and not check_is_dark_world(world.get_region(region))):
|
||||||
add_lamp_requirement(spot)
|
add_lamp_requirement(spot)
|
||||||
|
|
||||||
add_conditional_lamp('Misery Mire (Vitreous)', 'Misery Mire (Entrance)', 'Entrance')
|
add_conditional_lamp('Misery Mire (Vitreous)', 'Misery Mire (Entrance)', 'Entrance')
|
||||||
|
@ -357,8 +357,7 @@ def no_glitches_rules(world):
|
||||||
add_conditional_lamp('Armos - Heart Container', 'Eastern Palace', 'Location')
|
add_conditional_lamp('Armos - Heart Container', 'Eastern Palace', 'Location')
|
||||||
add_conditional_lamp('Armos - Pendant', 'Eastern Palace', 'Location')
|
add_conditional_lamp('Armos - Pendant', 'Eastern Palace', 'Location')
|
||||||
|
|
||||||
if world.state == 'open':
|
if not world.sewer_light_cone:
|
||||||
# standard mode always has light cone in sewers and Hyrule Castle in Light world
|
|
||||||
add_rule(world.get_location('[dungeon-C-B1] Escape - First B1 Room'), lambda state: state.has('Lamp'))
|
add_rule(world.get_location('[dungeon-C-B1] Escape - First B1 Room'), lambda state: state.has('Lamp'))
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue