lykoss / lykos

Werewolf, the popular detective/social party game (a theme of Mafia)
https://werewolf.chat
Other
127 stars 63 forks source link

piper win condition seems to be broken #501

Closed MishaCatskill closed 2 years ago

MishaCatskill commented 2 years ago

As piper in a charming game, I charmed everyone and wolf didn't kill me, but I didn't win. That same night the player count hit 4 left alive, with 2 wolves, and a wolf win was triggered instead. The last night only had 1 un-charmed player left, the same one the wolves killed, in case that matters.

[lykos(lykos@lykos/bot)] You are a piper. You can select up to two players to charm each night. The charmed players will know each other, but not who charmed them. You win when all other players are charmed. Use "charm <nick1> <nick2>" to select the players to charm, or "charm <nick>" to charm just one player. You may also use "pass" to not charm anyone.
[lykos(lykos@lykos/bot)] Players: beaky
-notice(lykos)- charm beaky
[lykos(lykos@lykos/bot)] You have charmed beaky.

<@lykos> Night lasted 01:04. It is now daytime. The villagers awake, thankful for surviving the night, and search the village...
<@lykos> The dead body of beaky, a villager, is found. Those remaining mourn the tragedy.      
〜 mode/#werewolf [-v beaky] by lykos
<@lykos> Game over! There are the same number of wolves as uninjured villagers. The wolves overpower the villagers and win.
fndax commented 2 years ago

Reproduced this in debug mode on 8p charming.

The last time piper's on_chk_win() runs, var.current_phase is still set to "night", and the function explicitly checks whether it's day before allowing a piper win.

I'm thinking #488 is caused by the same underlying issue.