From 7a65c36292cd38244342653583b9e9f4a9ba4a01 Mon Sep 17 00:00:00 2001 From: gaithern Date: Thu, 28 Dec 2023 15:02:57 -0600 Subject: [PATCH] Resolved lambda issue (hopefully) --- worlds/lol/Rules.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/worlds/lol/Rules.py b/worlds/lol/Rules.py index f2fbb5796095..a215f1aff066 100644 --- a/worlds/lol/Rules.py +++ b/worlds/lol/Rules.py @@ -9,15 +9,15 @@ def set_rules(multiworld: MultiWorld, player: int, game_mode: str, items: list[s if game_mode == "GameMode(Summoners Rift)": for item_id in sr_items: if str(sr_items[item_id]) in items or len(items) == 0: - multiworld.get_location("Win Summoners Rift with " + str(sr_items[item_id]), player).access_rule = lambda state: has_item(state, player, "SR " + sr_items[item_id]) + multiworld.get_location("Win Summoners Rift with " + str(sr_items[item_id]), player).access_rule = lambda state, item_id=item_id: has_item(state, player, "SR " + sr_items[item_id]) if game_mode == "GameMode(Aram)": for item_id in aram_items: if str(aram_items[item_id]) in items or len(items) == 0: - multiworld.get_location("Win ARAM with " + str(aram_items[item_id]), player).access_rule = lambda state: has_item(state, player, "ARAM " + aram_items[item_id]) + multiworld.get_location("Win ARAM with " + str(aram_items[item_id]), player).access_rule = lambda state, item_id=item_id: has_item(state, player, "ARAM " + aram_items[item_id]) if game_mode == "GameMode(Arena)": for item_id in arena_items: if str(arena_items[item_id]) in items or len(items) == 0: - multiworld.get_location("Win Arena with " + str(arena_items[item_id]), player).access_rule = lambda state: has_item(state, player, "ARENA " + arena_items[item_id]) + multiworld.get_location("Win Arena with " + str(arena_items[item_id]), player).access_rule = lambda state, item_id=item_id: has_item(state, player, "ARENA " + arena_items[item_id]) # Win condition. multiworld.completion_condition[player] = lambda state: state.has_all({"Bronze Rank", "Silver Rank", "Gold Rank", "Platinum Rank", "Emerald Rank", "Diamond Rank"}, player)