diff --git a/BaseClasses.py b/BaseClasses.py index f75617e9..e2fcee45 100644 --- a/BaseClasses.py +++ b/BaseClasses.py @@ -149,6 +149,7 @@ class World(object): set_player_attr('keyshuffle', 'none') set_player_attr('bigkeyshuffle', 'none') set_player_attr('prizeshuffle', 'none') + set_player_attr('showloot', 'never') set_player_attr('restrict_boss_items', 'none') set_player_attr('bombbag', False) set_player_attr('flute_mode', 'normal') @@ -3126,6 +3127,7 @@ class Spoiler(object): 'keyshuffle': self.world.keyshuffle, 'bigkeyshuffle': self.world.bigkeyshuffle, 'prizeshuffle': self.world.prizeshuffle, + 'showloot': self.world.showloot, 'boss_shuffle': self.world.boss_shuffle, 'enemy_shuffle': self.world.enemy_shuffle, 'enemy_health': self.world.enemy_health, @@ -3390,6 +3392,7 @@ class Spoiler(object): outfile.write('Small Key Shuffle:'.ljust(line_width) + '%s\n' % self.metadata['keyshuffle'][player]) outfile.write('Big Key Shuffle:'.ljust(line_width) + '%s\n' % self.metadata['bigkeyshuffle'][player]) outfile.write('Prize Shuffle:'.ljust(line_width) + '%s\n' % self.metadata['prizeshuffle'][player]) + outfile.write('Show Value of Checks:'.ljust(line_width) + '%s\n' % self.metadata['showloot'][player]) outfile.write('Key Logic Algorithm:'.ljust(line_width) + '%s\n' % self.metadata['key_logic'][player]) outfile.write('\n') outfile.write('Door Shuffle:'.ljust(line_width) + '%s\n' % self.metadata['door_shuffle'][player]) diff --git a/CLI.py b/CLI.py index f5b7bb89..09b80675 100644 --- a/CLI.py +++ b/CLI.py @@ -134,7 +134,7 @@ def parse_cli(argv, no_defaults=False): 'ow_terrain', 'ow_crossed', 'ow_keepsimilar', 'ow_mixed', 'ow_whirlpool', 'ow_fluteshuffle', 'flute_mode', 'bow_mode', 'take_any', 'boots_hint', 'shuffle_followers', 'shuffle', 'door_shuffle', 'intensity', 'crystals_ganon', 'crystals_gt', 'ganon_item', 'openpyramid', - 'mapshuffle', 'compassshuffle', 'keyshuffle', 'bigkeyshuffle', 'prizeshuffle', 'startinventory', + 'mapshuffle', 'compassshuffle', 'keyshuffle', 'bigkeyshuffle', 'prizeshuffle', 'showloot', 'startinventory', 'usestartinventory', 'bombbag', 'shuffleganon', 'overworld_map', 'restrict_boss_items', 'triforce_max_difference', 'triforce_pool_min', 'triforce_pool_max', 'triforce_goal_min', 'triforce_goal_max', 'triforce_min_difference', 'triforce_goal', 'triforce_pool', 'shufflelinks', 'shuffletavern', @@ -234,6 +234,7 @@ def parse_settings(): "keyshuffle": "none", "bigkeyshuffle": "none", "prizeshuffle": "none", + "showloot": "never", "keysanity": False, "door_shuffle": "vanilla", "intensity": 3, diff --git a/Dungeons.py b/Dungeons.py index 7b888f5b..a3f2e6c1 100644 --- a/Dungeons.py +++ b/Dungeons.py @@ -16,13 +16,14 @@ def create_dungeons(world, player): hc_dungeon_items = ['Map (Escape)'] at_dungeon_items = [] - if world.dropshuffle[player] == 'underworld' or world.pottery[player] in ['dungeon', 'reduced', 'clustered', 'nonempty', 'lottery']: - hc_dungeon_items.append('Compass (Escape)') - at_dungeon_items.append('Compass (Agahnims Tower)') - elif world.compassshuffle[player] == 'wild': - hc_dungeon_items.append('Compass (Escape)') - if world.keyshuffle[player] == 'wild': + if world.showloot[player] == 'compass': + if world.dropshuffle[player] == 'underworld' or world.pottery[player] in ['dungeon', 'reduced', 'clustered', 'nonempty', 'lottery']: + hc_dungeon_items.append('Compass (Escape)') at_dungeon_items.append('Compass (Agahnims Tower)') + elif world.compassshuffle[player] == 'wild': + hc_dungeon_items.append('Compass (Escape)') + if world.keyshuffle[player] == 'wild': + at_dungeon_items.append('Compass (Agahnims Tower)') ES = make_dungeon('Hyrule Castle', 1, None, hyrule_castle_regions, None, [ItemFactory('Small Key (Escape)', player)], ItemFactory(hc_dungeon_items, player)) EP = make_dungeon('Eastern Palace', 2, 'Armos Knights', eastern_regions, ItemFactory('Big Key (Eastern Palace)', player), [], ItemFactory(['Map (Eastern Palace)', 'Compass (Eastern Palace)'], player)) diff --git a/Main.py b/Main.py index 3548a399..0c447cfe 100644 --- a/Main.py +++ b/Main.py @@ -470,6 +470,7 @@ def init_world(args, fish): world.keyshuffle = args.keyshuffle.copy() world.bigkeyshuffle = args.bigkeyshuffle.copy() world.prizeshuffle = args.prizeshuffle.copy() + world.showloot = args.showloot.copy() world.bombbag = args.bombbag.copy() world.flute_mode = args.flute_mode.copy() world.bow_mode = args.bow_mode.copy() @@ -785,6 +786,7 @@ def copy_world(world): ret.keyshuffle = world.keyshuffle.copy() ret.bigkeyshuffle = world.bigkeyshuffle.copy() ret.prizeshuffle = world.prizeshuffle.copy() + ret.showloot = world.showloot.copy() ret.bombbag = world.bombbag.copy() ret.flute_mode = world.flute_mode.copy() ret.bow_mode = world.bow_mode.copy() @@ -1012,6 +1014,7 @@ def copy_world_premature(world, player, create_flute_exits=True): ret.keyshuffle = world.keyshuffle.copy() ret.bigkeyshuffle = world.bigkeyshuffle.copy() ret.prizeshuffle = world.prizeshuffle.copy() + ret.showloot = world.showloot.copy() ret.bombbag = world.bombbag.copy() ret.flute_mode = world.flute_mode.copy() ret.bow_mode = world.bow_mode.copy() diff --git a/Rom.py b/Rom.py index c8e7ca0a..f0a92d9a 100644 --- a/Rom.py +++ b/Rom.py @@ -1440,14 +1440,24 @@ def patch_rom(world, rom, player, team, is_mystery=False, rom_header=None): or world.dropshuffle[player] != 'none' or world.pottery[player] not in ['none', 'cave']): rom.write_byte(0x18003A, 0x01) # show key counts on map pickup - loot_show = 0x09 + loot_source = 0x09 if world.prizeshuffle[player] != 'none': - loot_show |= 0x10 + loot_source |= 0x10 if world.pottery[player] not in ['none', 'cave']: - loot_show |= 0x02 + loot_source |= 0x02 if world.dropshuffle[player] != 'none': - loot_show |= 0x04 - rom.write_byte(0x1CFF10, loot_show) + loot_source |= 0x04 + rom.write_byte(0x1CFF10, loot_source) + + if world.showloot[player] == 'never': + rom.write_bytes(0x1CFF08, [0x00, 0x00, 0x00, 0x00]) + rom.write_byte(0x1CFF11, 0x00) + elif world.showloot[player] == 'compass': + rom.write_bytes(0x1CFF08, [0x00, 0x00, 0x02, 0x01]) + rom.write_byte(0x1CFF11, 0x01) + elif world.showloot[player] == 'always': + rom.write_bytes(0x1CFF08, [0x02, 0x00, 0x00, 0x00]) + rom.write_byte(0x1CFF11, 0x00) if world.doorShuffle[player] != 'vanilla': rom.write_byte(0x1CFF00, 0x04) diff --git a/resources/app/cli/args.json b/resources/app/cli/args.json index 9b26e24f..fafa2ee5 100644 --- a/resources/app/cli/args.json +++ b/resources/app/cli/args.json @@ -431,6 +431,13 @@ "wild" ] }, + "showloot": { + "choices": [ + "never", + "compass", + "always" + ] + }, "keysanity": { "action": "store_true", "type": "bool",