def check_for_pinball_fix(state, bad_region, world, player):
    pinball_region = world.get_region('Skull Pinball', player)
    if ((bad_region.name == 'Skull 2 West Lobby') and state.visited_at_all(pinball_region)):
        door = world.get_door('Skull Pinball WS', player)
        room = world.get_room(door.roomIndex, player)
        if (room.doorList[door.doorListPos][1] == DoorKind.Trap):
            room.change(door.doorListPos, DoorKind.Normal)
            door.trapFlag = 0
            door.blocked = False
            connect_two_way(world, door.name, door.dest.name, player)
            state.add_all_doors_check_unattached(pinball_region, world, player)
            return True
    return False
def check_for_pinball_fix(state, bad_region, world, player):
    pinball_region = world.get_region('Skull Pinball', player)
    if ((bad_region.name == 'Skull 2 West Lobby') and state.visited_at_all(pinball_region)):
        door = world.get_door('Skull Pinball WS', player)
        room = world.get_room(door.roomIndex, player)
        if (room.doorList[door.doorListPos][1] == DoorKind.Trap):
            room.change(door.doorListPos, DoorKind.Normal)
            door.trapFlag = 0
            door.blocked = False
            connect_two_way(world, door.name, door.dest.name, player)
            state.add_all_doors_check_unattached(pinball_region, world, player)
            return True
    return False