Skip to content

Commit

Permalink
Resolved lambda issue (hopefully)
Browse files Browse the repository at this point in the history
  • Loading branch information
gaithern committed Dec 28, 2023
1 parent fbd3249 commit 7a65c36
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions worlds/lol/Rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 7a65c36

Please sign in to comment.