diff --git a/worlds/ladx/__init__.py b/worlds/ladx/__init__.py index 9de3462ad059..d662b526bb61 100644 --- a/worlds/ladx/__init__.py +++ b/worlds/ladx/__init__.py @@ -184,19 +184,22 @@ def create_items(self) -> None: self.pre_fill_items = [] # For any and different world, set item rule instead - for option in ["maps", "compasses", "small_keys", "nightmare_keys", "stone_beaks", "instruments"]: - option = "shuffle_" + option + for dungeon_item_type in ["maps", "compasses", "small_keys", "nightmare_keys", "stone_beaks", "instruments"]: + option = "shuffle_" + dungeon_item_type option = self.player_options[option] dungeon_item_types[option.ladxr_item] = option.value + # The color dungeon does not contain an instrument + num_items = 8 if dungeon_item_type == "instruments" else 9 + if option.value == DungeonItemShuffle.option_own_world: self.multiworld.local_items[self.player].value |= { - ladxr_item_to_la_item_name[f"{option.ladxr_item}{i}"] for i in range(1, 10) + ladxr_item_to_la_item_name[f"{option.ladxr_item}{i}"] for i in range(1, num_items + 1) } elif option.value == DungeonItemShuffle.option_different_world: self.multiworld.non_local_items[self.player].value |= { - ladxr_item_to_la_item_name[f"{option.ladxr_item}{i}"] for i in range(1, 10) + ladxr_item_to_la_item_name[f"{option.ladxr_item}{i}"] for i in range(1, num_items + 1) } # option_original_dungeon = 0 # option_own_dungeons = 1