Skip to content

Commit d0ac2b7

Browse files
authored
LADX: fix local and non-local instrument placement (ArchipelagoMW#2987)
* LADX: fix local and non-local instrument placement * change confusing variable name
1 parent 14f5f01 commit d0ac2b7

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

worlds/ladx/__init__.py

+7-4
Original file line numberDiff line numberDiff line change
@@ -184,19 +184,22 @@ def create_items(self) -> None:
184184
self.pre_fill_items = []
185185
# For any and different world, set item rule instead
186186

187-
for option in ["maps", "compasses", "small_keys", "nightmare_keys", "stone_beaks", "instruments"]:
188-
option = "shuffle_" + option
187+
for dungeon_item_type in ["maps", "compasses", "small_keys", "nightmare_keys", "stone_beaks", "instruments"]:
188+
option = "shuffle_" + dungeon_item_type
189189
option = self.player_options[option]
190190

191191
dungeon_item_types[option.ladxr_item] = option.value
192192

193+
# The color dungeon does not contain an instrument
194+
num_items = 8 if dungeon_item_type == "instruments" else 9
195+
193196
if option.value == DungeonItemShuffle.option_own_world:
194197
self.multiworld.local_items[self.player].value |= {
195-
ladxr_item_to_la_item_name[f"{option.ladxr_item}{i}"] for i in range(1, 10)
198+
ladxr_item_to_la_item_name[f"{option.ladxr_item}{i}"] for i in range(1, num_items + 1)
196199
}
197200
elif option.value == DungeonItemShuffle.option_different_world:
198201
self.multiworld.non_local_items[self.player].value |= {
199-
ladxr_item_to_la_item_name[f"{option.ladxr_item}{i}"] for i in range(1, 10)
202+
ladxr_item_to_la_item_name[f"{option.ladxr_item}{i}"] for i in range(1, num_items + 1)
200203
}
201204
# option_original_dungeon = 0
202205
# option_own_dungeons = 1

0 commit comments

Comments
 (0)