Skip to content

Commit

Permalink
LADX: fix local and non-local instrument placement (ArchipelagoMW#2987)
Browse files Browse the repository at this point in the history
* LADX: fix local and non-local instrument placement

* change confusing variable name
  • Loading branch information
panicbit authored Mar 28, 2024
1 parent 14f5f01 commit d0ac2b7
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions worlds/ladx/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d0ac2b7

Please sign in to comment.