Skip to content

Commit

Permalink
lambda capture
Browse files Browse the repository at this point in the history
  • Loading branch information
Silvris committed Jan 23, 2025
1 parent 2182310 commit 932e643
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions worlds/kdl3/rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,8 @@ def set_rules(world: "KDL3World") -> None:
"Level 4 Boss - Defeated", "Level 5 Boss - Defeated"],
location_name.level_names.keys()):
set_rule(world.get_location(boss_flag),
lambda state: state.has(f"{level} - Stage Completion", world.player,
world.options.ow_boss_requirement.value))
lambda state, lvl=level: state.has(f"{lvl} - Stage Completion", world.player,
world.options.ow_boss_requirement.value))

set_rule(world.multiworld.get_entrance("To Level 6", world.player),
lambda state: state.has("Heart Star", world.player, world.required_heart_stars))
Expand Down

0 comments on commit 932e643

Please sign in to comment.