This commit is contained in:
2025-09-01 10:57:11 -05:00
parent dc3ec0238d
commit f1f0ef8224
6 changed files with 47 additions and 4 deletions

View File

@@ -73,6 +73,7 @@ class World(object):
self.shuffle_ganon = shuffle_ganon self.shuffle_ganon = shuffle_ganon
self.dark_rooms = {} self.dark_rooms = {}
self.damage_challenge = {} self.damage_challenge = {}
self.big_chest_items = {}
self.shuffle_damage_table = {} self.shuffle_damage_table = {}
self.custom = custom self.custom = custom
self.customitemarray = customitemarray self.customitemarray = customitemarray
@@ -148,6 +149,7 @@ class World(object):
set_player_attr('bigkeyshuffle', 'none') set_player_attr('bigkeyshuffle', 'none')
set_player_attr('prizeshuffle', 'none') set_player_attr('prizeshuffle', 'none')
set_player_attr('restrict_boss_items', 'none') set_player_attr('restrict_boss_items', 'none')
set_player_attr('big_chest_items', 'random')
set_player_attr('bombbag', False) set_player_attr('bombbag', False)
set_player_attr('flute_mode', False) set_player_attr('flute_mode', False)
set_player_attr('bow_mode', False) set_player_attr('bow_mode', False)
@@ -3054,6 +3056,7 @@ class Spoiler(object):
'open_pyramid': self.world.open_pyramid, 'open_pyramid': self.world.open_pyramid,
'accessibility': self.world.accessibility, 'accessibility': self.world.accessibility,
'restricted_boss_items': self.world.restrict_boss_items, 'restricted_boss_items': self.world.restrict_boss_items,
'big_chest_items': self.world.big_chest_items,
'hints': self.world.hints, 'hints': self.world.hints,
'mapshuffle': self.world.mapshuffle, 'mapshuffle': self.world.mapshuffle,
'compassshuffle': self.world.compassshuffle, 'compassshuffle': self.world.compassshuffle,
@@ -3332,6 +3335,7 @@ class Spoiler(object):
outfile.write('Dark Rooms:'.ljust(line_width) + '%s\n' % self.metadata['dark_rooms'][player]) outfile.write('Dark Rooms:'.ljust(line_width) + '%s\n' % self.metadata['dark_rooms'][player])
outfile.write('Damage Challenge:'.ljust(line_width) + '%s\n' % self.metadata['damage_challenge'][player]) outfile.write('Damage Challenge:'.ljust(line_width) + '%s\n' % self.metadata['damage_challenge'][player])
outfile.write('Damage Table Randomization:'.ljust(line_width) + '%s\n' % self.metadata['shuffle_damage_table'][player]) outfile.write('Damage Table Randomization:'.ljust(line_width) + '%s\n' % self.metadata['shuffle_damage_table'][player])
outfile.write('Big Chest Item Randomization:'.ljust(line_width) + '%s\n' % self.metadata['big_chest_items'][player])
outfile.write('Crystal Book:'.ljust(line_width) + '%s\n' % yn(self.metadata['crystal_book'][player])) outfile.write('Crystal Book:'.ljust(line_width) + '%s\n' % yn(self.metadata['crystal_book'][player]))
outfile.write('Hints:'.ljust(line_width) + '%s\n' % yn(self.metadata['hints'][player])) outfile.write('Hints:'.ljust(line_width) + '%s\n' % yn(self.metadata['hints'][player]))
outfile.write('Race:'.ljust(line_width) + '%s\n' % yn(self.world.settings.world_rep['meta']['race'])) outfile.write('Race:'.ljust(line_width) + '%s\n' % yn(self.world.settings.world_rep['meta']['race']))

3
CLI.py
View File

@@ -135,7 +135,7 @@ def parse_cli(argv, no_defaults=False):
'flute_mode', 'bow_mode', 'take_any', 'boots_hint', 'shuffle_followers', 'flute_mode', 'bow_mode', 'take_any', 'boots_hint', 'shuffle_followers',
'shuffle', 'door_shuffle', 'intensity', 'crystals_ganon', 'crystals_gt', 'openpyramid', 'shuffle', 'door_shuffle', 'intensity', 'crystals_ganon', 'crystals_gt', 'openpyramid',
'mapshuffle', 'compassshuffle', 'keyshuffle', 'bigkeyshuffle', 'prizeshuffle', 'startinventory', 'mapshuffle', 'compassshuffle', 'keyshuffle', 'bigkeyshuffle', 'prizeshuffle', 'startinventory',
'usestartinventory', 'bombbag', 'shuffleganon', 'overworld_map', 'restrict_boss_items', 'usestartinventory', 'bombbag', 'shuffleganon', 'overworld_map', 'restrict_boss_items', 'big_chest_items',
'triforce_max_difference', 'triforce_pool_min', 'triforce_pool_max', 'triforce_goal_min', 'triforce_goal_max', 'triforce_max_difference', 'triforce_pool_min', 'triforce_pool_max', 'triforce_goal_min', 'triforce_goal_max',
'triforce_min_difference', 'triforce_goal', 'triforce_pool', 'shufflelinks', 'shuffletavern', 'triforce_min_difference', 'triforce_goal', 'triforce_pool', 'shufflelinks', 'shuffletavern',
'skullwoods', 'linked_drops', 'skullwoods', 'linked_drops',
@@ -189,6 +189,7 @@ def parse_settings():
"mystery": False, "mystery": False,
"suppress_meta": False, "suppress_meta": False,
"restrict_boss_items": "none", "restrict_boss_items": "none",
"big_chest_items": "random",
# Shuffle Ganon defaults to TRUE # Shuffle Ganon defaults to TRUE
"openpyramid": "auto", "openpyramid": "auto",

29
Fill.py
View File

@@ -43,6 +43,33 @@ def dungeon_tracking(world):
layout.free_items = layout.location_cnt - layout.dungeon_items layout.free_items = layout.location_cnt - layout.dungeon_items
def fill_vanilla_big_chests(world):
def place_item(player, location_name, item_name):
location = world.get_location(location_name, player)
items = [item for item in world.itempool if item.location is None and item.name == item_name and item.player == player]
if len(items) == 0:
raise RuntimeError('Cannot find item %s for player %s in pool.' % (item_name, item.player))
item = items[0]
world.itempool.remove(item)
world.push_item(location, item, False)
for player in range(1, world.players + 1):
if world.big_chest_items[player] == 'vanilla':
place_item(player, "Hyrule Castle - Zelda's Chest", "Lamp")
place_item(player, "Sahasrahla", "Pegasus Boots")
place_item(player, "Eastern Palace - Big Chest", "Bow")
place_item(player, "Desert Palace - Big Chest", "Progressive Glove")
place_item(player, "Tower of Hera - Big Chest", "Moon Pearl")
place_item(player, "Palace of Darkness - Big Chest", "Hammer")
place_item(player, "Swamp Palace - Big Chest", "Hookshot")
place_item(player, "Skull Woods - Big Chest", "Fire Rod")
place_item(player, "Thieves' Town - Big Chest", "Progressive Glove")
place_item(player, "Ice Palace - Big Chest", "Flippers")
place_item(player, "Misery Mire - Big Chest", "Cane of Somaria")
place_item(player, "Turtle Rock - Big Chest", "Ice Rod")
place_item(player, "Ganons Tower - Big Chest", "Magic Mirror")
def fill_dungeons_restrictive(world, shuffled_locations): def fill_dungeons_restrictive(world, shuffled_locations):
# with shuffled dungeon items they are distributed as part of the normal item pool # with shuffled dungeon items they are distributed as part of the normal item pool
for item in world.get_items(): for item in world.get_items():
@@ -1285,4 +1312,4 @@ def set_prize_drops(world, player):
# saved fish prize # saved fish prize
world.prizes[player]['fish'] = prizes.pop() world.prizes[player]['fish'] = prizes.pop()
world.prizes[player]['enemies'] = prizes world.prizes[player]['enemies'] = prizes

View File

@@ -1146,7 +1146,7 @@ def get_pool_core(world, player, progressive, shuffle, difficulty, treasure_hunt
else: else:
pool.extend(diff.basicarmor) pool.extend(diff.basicarmor)
if 'silvers' not in world.bow_mode[player]: if 'silvers' not in world.bow_mode[player] and world.big_chest_items[player] != 'vanilla':
pool.extend(['Progressive Bow'] * 2) pool.extend(['Progressive Bow'] * 2)
elif swords != 'swordless': elif swords != 'swordless':
pool.extend(diff.basicbow) pool.extend(diff.basicbow)

View File

@@ -26,7 +26,7 @@ from Rules import set_rules
from Dungeons import create_dungeons from Dungeons import create_dungeons
from Fill import distribute_items_restrictive, promote_dungeon_items, fill_dungeons_restrictive, ensure_good_items from Fill import distribute_items_restrictive, promote_dungeon_items, fill_dungeons_restrictive, ensure_good_items
from Fill import dungeon_tracking from Fill import dungeon_tracking
from Fill import sell_potions, sell_keys, balance_multiworld_progression, balance_money_progression, lock_shop_locations, set_prize_drops from Fill import sell_potions, sell_keys, balance_multiworld_progression, balance_money_progression, lock_shop_locations, set_prize_drops, fill_vanilla_big_chests
from ItemList import generate_itempool, difficulties, fill_prizes, customize_shops, fill_specific_items, create_farm_locations, shuffle_event_items, follower_pickups from ItemList import generate_itempool, difficulties, fill_prizes, customize_shops, fill_specific_items, create_farm_locations, shuffle_event_items, follower_pickups
from UnderworldGlitchRules import connect_hmg_entrances_regions, create_hmg_entrances_regions from UnderworldGlitchRules import connect_hmg_entrances_regions, create_hmg_entrances_regions
from Utils import output_path, parse_player_names from Utils import output_path, parse_player_names
@@ -254,6 +254,8 @@ def main(args, seed=None, fish=None):
logger.info(world.fish.translate("cli","cli","placing.dungeon.items")) logger.info(world.fish.translate("cli","cli","placing.dungeon.items"))
fill_vanilla_big_chests(world)
if args.algorithm != 'equitable': if args.algorithm != 'equitable':
shuffled_locations = world.get_unfilled_locations() shuffled_locations = world.get_unfilled_locations()
random.shuffle(shuffled_locations) random.shuffle(shuffled_locations)
@@ -520,6 +522,7 @@ def init_world(args, fish):
world.overworld_map = args.overworld_map.copy() world.overworld_map = args.overworld_map.copy()
world.take_any = args.take_any.copy() world.take_any = args.take_any.copy()
world.restrict_boss_items = args.restrict_boss_items.copy() world.restrict_boss_items = args.restrict_boss_items.copy()
world.big_chest_items = args.big_chest_items.copy()
world.collection_rate = args.collection_rate.copy() world.collection_rate = args.collection_rate.copy()
world.colorizepots = args.colorizepots.copy() world.colorizepots = args.colorizepots.copy()
world.aga_randomness = args.aga_randomness.copy() world.aga_randomness = args.aga_randomness.copy()
@@ -652,6 +655,7 @@ def copy_world(world):
ret.allow_flip_sanc = world.allow_flip_sanc.copy() ret.allow_flip_sanc = world.allow_flip_sanc.copy()
ret.prizes = world.prizes.copy() ret.prizes = world.prizes.copy()
ret.restrict_boss_items = world.restrict_boss_items.copy() ret.restrict_boss_items = world.restrict_boss_items.copy()
ret.big_chest_items = world.big_chest_items.copy()
ret.inaccessible_regions = world.inaccessible_regions.copy() ret.inaccessible_regions = world.inaccessible_regions.copy()
ret.damage_table = world.damage_table ret.damage_table = world.damage_table
ret.data_tables = world.data_tables # can be changed... ret.data_tables = world.data_tables # can be changed...
@@ -877,6 +881,7 @@ def copy_world_premature(world, player):
ret.allow_flip_sanc = world.allow_flip_sanc.copy() ret.allow_flip_sanc = world.allow_flip_sanc.copy()
ret.prizes = world.prizes.copy() ret.prizes = world.prizes.copy()
ret.restrict_boss_items = world.restrict_boss_items.copy() ret.restrict_boss_items = world.restrict_boss_items.copy()
ret.big_chest_items = world.big_chest_items.copy()
ret.inaccessible_regions = world.inaccessible_regions.copy() ret.inaccessible_regions = world.inaccessible_regions.copy()
ret.damage_table = world.damage_table ret.damage_table = world.damage_table
ret.data_tables = world.data_tables # can be changed... ret.data_tables = world.data_tables # can be changed...

View File

@@ -461,6 +461,12 @@
"dungeon" "dungeon"
] ]
}, },
"big_chest_items": {
"choices": [
"random",
"vanilla"
]
},
"hints": { "hints": {
"action": "store_true", "action": "store_true",
"type": "bool" "type": "bool"