From 4afe4a2c8eb01a7cc1300e3a5f521927894a7cc2 Mon Sep 17 00:00:00 2001 From: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com> Date: Sun, 5 Nov 2023 11:40:43 +0100 Subject: [PATCH] Lengthy debugging vs one >= boi --- worlds/witness/rules.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/worlds/witness/rules.py b/worlds/witness/rules.py index fa2793ca089e..a30ae642c730 100644 --- a/worlds/witness/rules.py +++ b/worlds/witness/rules.py @@ -29,11 +29,11 @@ ] -def _has_laser(laser_hex: str, world: "WitnessWorld") -> Callable[[CollectionState], bool]: +def _has_laser(laser_hex: str, world: "WitnessWorld", player: int) -> Callable[[CollectionState], bool]: if laser_hex == "0x012FB": return lambda state: ( _can_solve_panel(laser_hex, world, world.player, world.player_logic, world.locat)(state) - and state.has("Desert Laser Redirection", world.player) + and state.has("Desert Laser Redirection", player) ) else: return lambda state: _can_solve_panel(laser_hex, world, world.player, world.player_logic, world.locat)(state) @@ -43,11 +43,11 @@ def _has_lasers(amount: int, world: "WitnessWorld") -> Callable[[CollectionState laser_lambdas = [] for laser_hex in laser_hexes: - has_laser_lambda = _has_laser(laser_hex, world) + has_laser_lambda = _has_laser(laser_hex, world, world.player) laser_lambdas.append(has_laser_lambda) - return lambda state: sum(laser_lambda(state) for laser_lambda in laser_lambdas) > amount + return lambda state: sum(laser_lambda(state) for laser_lambda in laser_lambdas) >= amount def _can_solve_panel(panel: str, world: "WitnessWorld", player: int, player_logic: WitnessPlayerLogic,