diff --git a/Fill.py b/Fill.py index 43a3abc0..03fb6fed 100644 --- a/Fill.py +++ b/Fill.py @@ -451,6 +451,8 @@ def distribute_items_restrictive(world, gftower_trash=False, fill_locations=None def ensure_good_pots(world, write_skips=False): for loc in world.get_locations(): + if loc.item is None: + loc.item = ItemFactory('Nothing', loc.player) # convert Arrows 5 and Nothing when necessary if (loc.item.name in {'Arrows (5)', 'Nothing'} and (loc.type != LocationType.Pot or loc.item.player != loc.player)): diff --git a/Items.py b/Items.py index 757fc8e5..7f6c5054 100644 --- a/Items.py +++ b/Items.py @@ -14,8 +14,7 @@ def ItemFactory(items, player): advancement, priority, type, code, price, pedestal_hint, pedestal_credit, sickkid_credit, zora_credit, witch_credit, fluteboy_credit, hint_text = item_table[item] ret.append(Item(item, advancement, priority, type, code, price, pedestal_hint, pedestal_credit, sickkid_credit, zora_credit, witch_credit, fluteboy_credit, hint_text, player)) else: - logging.getLogger('').warning('Unknown Item: %s', item) - return None + raise RuntimeError(f'Unknown Item: {item}') if singleton: return ret[0] diff --git a/Main.py b/Main.py index 147f4ca6..07adc036 100644 --- a/Main.py +++ b/Main.py @@ -33,7 +33,7 @@ from source.overworld.EntranceShuffle2 import link_entrances_new from source.tools.BPS import create_bps_from_data from source.classes.CustomSettings import CustomSettings -__version__ = '1.0.1.12v' +__version__ = '1.0.1.12w' from source.classes.BabelFish import BabelFish diff --git a/Rom.py b/Rom.py index 398a7c1b..4a228d79 100644 --- a/Rom.py +++ b/Rom.py @@ -2268,7 +2268,7 @@ def write_strings(rom, world, player, team): random.shuffle(items_to_hint) hint_count = 5 if world.shuffle[player] not in ['vanilla', 'dungeonssimple', 'dungeonsfull'] else 8 hint_count += 2 if world.doorShuffle[player] == 'crossed' else 0 - while hint_count > 0: + while hint_count > 0 and len(items_to_hint) > 0: this_item = items_to_hint.pop(0) this_location = world.find_items_not_key_only(this_item, player) random.shuffle(this_location) diff --git a/docs/Customizer.md b/docs/Customizer.md index af9ae7ed..047deefe 100644 --- a/docs/Customizer.md +++ b/docs/Customizer.md @@ -160,14 +160,14 @@ This is done as `: ` E.g. `Skull Woods: Helmasaur King` for helmacopter. Be sure to turn on at least one enemizer setting for the bosses to actually be randomized. -### startinventory +### start_inventory This must be defined by player. Each player number should be listed with a list of items to start with. This is a yaml list (note the hyphens): ``` -startinventory: +start_inventory: 1: - Pegasus Boots - Progressive Sword diff --git a/docs/SuperTrueIceRodHunt.yaml b/docs/SuperTrueIceRodHunt.yaml new file mode 100644 index 00000000..3b644bf9 --- /dev/null +++ b/docs/SuperTrueIceRodHunt.yaml @@ -0,0 +1,125 @@ +meta: + algorithm: balanced + players: 1 +settings: + 1: + door_shuffle: vanilla + dropshuffle: true + experimental: true + goal: ganon + hints: false + intensity: 1 + pseudoboots: false + pottery: lottery + shopsanity: false + shuffle: vanilla + shufflelinks: false + shufflebosses: false +item_pool: + 1: + Ice Rod: 1 + Progressive Sword: 1 +placements: + 1: + Turtle Rock - Boss: Triforce +start_inventory: + 1: + - Progressive Bow + - Progressive Bow + - Blue Boomerang + - Red Boomerang + - Hookshot + - Mushroom + - Magic Powder + - Fire Rod + - Bombos + - Ether + - Quake + - Lamp + - Hammer + - Ocarina + - Bug Catching Net + - Book of Mudora + - Shovel + - Cane of Somaria + - Cane of Byrna + - Cape + - Magic Mirror + - Moon Pearl + - Titans Mitts + - Tempered Sword + - Pegasus Boots + - Flippers + - Red Mail + - Progressive Shield + - Progressive Shield + - Bottle (Red Potion) + - Bottle (Green Potion) + - Bottle (Blue Potion) + - Bottle (Fairy) + - Magic Upgrade (1/2) + - Magic Upgrade (1/2) + - Boss Heart Container + - Boss Heart Container + - Boss Heart Container + - Boss Heart Container + - Boss Heart Container + - Boss Heart Container + - Boss Heart Container + - Boss Heart Container + - Boss Heart Container + - Boss Heart Container + - Boss Heart Container + - Boss Heart Container + - Boss Heart Container + - Boss Heart Container + - Boss Heart Container + - Boss Heart Container + - Boss Heart Container + - Arrows (10) + - Arrows (10) + - Arrows (10) + - Bombs (10) + - Rupees (300) + - Rupees (300) + - Rupees (300) + - Rupees (300) + - Rupees (300) + - Rupees (300) + - Rupees (300) + - Rupees (300) + - Rupees (300) + - Rupees (300) + - Rupees (300) + - Rupees (300) + - Rupees (300) + - Rupees (300) + - Rupees (300) + - Rupees (300) + - Rupees (300) + - Rupees (300) + - Rupees (300) + - Rupees (300) + - Rupees (300) + - Rupees (300) + - Rupees (300) + - Rupees (300) + - Rupees (300) + - Rupees (300) + - Rupees (300) + - Rupees (300) + - Rupees (300) + - Rupees (300) + - Rupees (300) + - Rupees (300) + - Rupees (300) + - Rupees (50) + - Rupees (20) + - Rupees (20) + - Rupees (5) + - Rupee (1) + - Rupee (1) + - Rupee (1) + - Rupee (1) + + \ No newline at end of file diff --git a/docs/customizer_example.yaml b/docs/customizer_example.yaml index 3100e6c2..3d0c7624 100644 --- a/docs/customizer_example.yaml +++ b/docs/customizer_example.yaml @@ -102,7 +102,7 @@ bosses: Palace of Darkness: Arrghus Thieves Town: Blind Ganons Tower (top): Vitreous -startinventory: +start_inventory: 1: - Pegasus Boots diff --git a/source/gui/adjust/overview.py b/source/gui/adjust/overview.py index 7ab7f474..607c16b1 100644 --- a/source/gui/adjust/overview.py +++ b/source/gui/adjust/overview.py @@ -158,6 +158,7 @@ def adjust_page(top, parent, settings): "nobgm": "disablemusic", "reduce_flashing": "reduce_flashing", "shuffle_sfx": "shuffle_sfx", + "msu_resume": "msu_resume", } guiargs = Namespace() for option in options: diff --git a/source/overworld/EntranceShuffle2.py b/source/overworld/EntranceShuffle2.py index b46e05e0..f69a475f 100644 --- a/source/overworld/EntranceShuffle2.py +++ b/source/overworld/EntranceShuffle2.py @@ -17,6 +17,8 @@ class EntrancePool(object): self.links_on_mountain = False self.decoupled_entrances = [] self.decoupled_exits = [] + self.original_entrances = set() + self.original_exits = set() self.world = world self.player = player @@ -48,6 +50,8 @@ def link_entrances_new(world, player): avail_pool.exits.add('Inverted Dark Sanctuary Exit') inverted_substitution(avail_pool, avail_pool.entrances, True, True) inverted_substitution(avail_pool, avail_pool.exits, False, True) + avail_pool.original_entrances.update(avail_pool.entrances) + avail_pool.original_exits.update(avail_pool.exits) default_map = {} default_map.update(entrance_map) one_way_map = {} @@ -378,7 +382,7 @@ def do_holes_and_linked_drops(entrances, exits, avail, cross_world, keep_togethe hole_entrances, hole_targets = [], [] for hole in drop_map: - if hole in entrances and hole in linked_drop_map: + if hole in avail.original_entrances and hole in linked_drop_map: linked_entrance = linked_drop_map[hole] if hole in entrances and linked_entrance in entrances: hole_entrances.append((linked_entrance, hole))