def METHOD_NAME(evt: Event, var: GameState, rolemap: dict[str, set[User]], mainroles: dict[User, str], lpl: int, lwolves: int, lrealwolves: int):
    # lpl doesn't included wounded/sick people or consecrating priests
    # whereas we want to ensure EVERYONE (even wounded people) are charmed for piper win
    pipers = rolemap.get("piper", set())
    lp = len(pipers)
    if lp == 0: # no alive pipers, short-circuit this check
        return
    uncharmed = set(get_players(var, mainroles=mainroles)) - CHARMED - pipers
    if not uncharmed:
        evt.data["winner"] = "pipers"
        evt.data["message"] = messages["piper_win"].format(lp)