Add Mirror Scroll as an option instead of baking it into door shuffle.

This commit is contained in:
Telethar
2024-12-28 17:44:42 -08:00
committed by aerinon
parent f5a8b563d9
commit d558e14065
13 changed files with 32 additions and 4 deletions

View File

@@ -143,6 +143,7 @@ class World(object):
set_player_attr('potshuffle', False)
set_player_attr('pot_contents', None)
set_player_attr('pseudoboots', False)
set_player_attr('mirrorscroll', False)
set_player_attr('collection_rate', False)
set_player_attr('colorizepots', True)
set_player_attr('pot_pool', {})
@@ -2588,6 +2589,7 @@ class Spoiler(object):
'potshuffle': self.world.potshuffle,
'shopsanity': self.world.shopsanity,
'pseudoboots': self.world.pseudoboots,
'mirrorscroll': self.world.mirrorscroll,
'triforcegoal': self.world.treasure_hunt_count,
'triforcepool': self.world.treasure_hunt_total,
'race': self.world.settings.world_rep['meta']['race'],
@@ -2766,6 +2768,7 @@ class Spoiler(object):
outfile.write(f"Bow Mode: {self.metadata['bow_mode'][player]}\n")
outfile.write(f"Bombbag: {yn(self.metadata['bombbag'][player])}\n")
outfile.write(f"Pseudoboots: {yn(self.metadata['pseudoboots'][player])}\n")
outfile.write(f"Mirror Scroll: {yn(self.metadata['mirrorscroll'][player])}\n")
outfile.write('\n')
# Item Pool Settings
@@ -3120,7 +3123,7 @@ take_any_mode = {'none': 0, 'random': 1, 'fixed': 2}
bow_mode = {'progressive': 0, 'silvers': 1, 'retro': 2, 'retro_silvers': 3}
# additions
# byte 12: POOT TKKK (pseudoboots, overworld_map, trap_door_mode, key_logic_algo)
# byte 12: POOT TKKK (mirrorscroll, pseudoboots, overworld_map, trap_door_mode, key_logic_algo)
overworld_map_mode = {'default': 0, 'compass': 1, 'map': 2}
trap_door_mode = {'vanilla': 0, 'optional': 1, 'boss': 2, 'oneway': 3}
key_logic_algo = {'dangerous': 0, 'partial': 1, 'strict': 2}
@@ -3176,7 +3179,7 @@ class Settings(object):
(flute_mode[w.flute_mode[p]] << 7 | bow_mode[w.bow_mode[p]] << 4
| take_any_mode[w.take_any[p]] << 2 | keyshuffle_mode[w.keyshuffle[p]]),
((0x80 if w.pseudoboots[p] else 0) | overworld_map_mode[w.overworld_map[p]] << 5
((0xF0 if w.mirrorscroll[p] else 0) | (0x80 if w.pseudoboots[p] else 0) | overworld_map_mode[w.overworld_map[p]] << 5
| trap_door_mode[w.trap_door_mode[p]] << 3 | key_logic_algo[w.key_logic_algorithm[p]]),
(skullwoods_mode[w.skullwoods[p]] << 6 | linked_drops_mode[w.linked_drops[p]] << 4),
@@ -3249,6 +3252,7 @@ class Settings(object):
args.take_any[p] = r(take_any_mode)[(settings[11] & 0xC) >> 2]
args.keyshuffle[p] = r(keyshuffle_mode)[settings[11] & 0x3]
if len(settings) > 12:
args.mirrorscroll[p] = True if settings[12] & 0xF0 else False
args.pseudoboots[p] = True if settings[12] & 0x80 else False
args.overworld_map[p] = r(overworld_map_mode)[(settings[12] & 0x60) >> 5]
args.trap_door_mode[p] = r(trap_door_mode)[(settings[12] & 0x18) >> 3]