diff --git a/BaseClasses.py b/BaseClasses.py index 7d560fd6..ba03cc46 100644 --- a/BaseClasses.py +++ b/BaseClasses.py @@ -25,6 +25,9 @@ class World(object): self.place_dungeon_items = place_dungeon_items # configurable in future self.agahnim_fix_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): if isinstance(regionname, Region): diff --git a/Rom.py b/Rom.py index 5e97dcb1..499e375b 100644 --- a/Rom.py +++ b/Rom.py @@ -68,9 +68,6 @@ def patch_rom(world, rom, hashtable, quickswap=False, beep='normal', sprite=None # set open mode: if world.mode == 'open': 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 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]) else: 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 - write_byte(rom, 0x18003A, 0x00) # dark world light cone disable + + # set light cones + 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 if world.logic == 'minorglitches': diff --git a/Rules.py b/Rules.py index 071c89cb..35b370c1 100644 --- a/Rules.py +++ b/Rules.py @@ -336,7 +336,7 @@ def no_glitches_rules(world): spot = world.get_location(spot) else: 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_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 - Pendant', 'Eastern Palace', 'Location') - if world.state == 'open': - # standard mode always has light cone in sewers and Hyrule Castle in Light world + if not world.sewer_light_cone: add_rule(world.get_location('[dungeon-C-B1] Escape - First B1 Room'), lambda state: state.has('Lamp'))