lykoss / lykos

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

Gunner/Sharpshooter silenced doesn't give info that silenced #432

Closed mweinelt closed 4 years ago

mweinelt commented 4 years ago

I was silenced n1 and tried to !shoot, !sharpshooter:shoot and !gunner:shoot. Nothing told me I was silenced, it was saying I did use an ambiguous command instead.

03:42 <lykos> You are a villager. It is your job to lynch all of the wolves.
03:42 <lykos> You are a gunner and hold a gun that shoots special silver bullets. You may only use it during the day by typing "!shoot <nick>" in channel. Wolves will die instantly when shot, but anyone else will likely survive. You have 2 bullets.
03:42 <lykos> You are a sharpshooter and hold a gun that shoots special silver bullets. You may only use it during the day by typing "!shoot <nick>" in channel. Due to your skill with the gun, anyone you shoot is very likely to die. You have 1 bullet.
03:43 ℹ  lykos: Ambiguous command; more than one role you belong to has a "shoot" command. Please prefix this command with a role name, for example "gunner:shoot ..." or "sharpshooter:shoot ...".
03:43 ℹ  lykos: Ambiguous command; more than one role you belong to has a "shoot" command. Please prefix this command with a role name, for example "gunner:shoot ..." or "sharpshooter:shoot ...".
03:43 ℹ  lykos: Ambiguous command; more than one role you belong to has a "shoot" command. Please prefix this command with a role name, for example "gunner:shoot ..." or "gunner:shoot ...".
03:43 ℹ  lykos: Ambiguous command; more than one role you belong to has a "shoot" command. Please prefix this command with a role name, for example "gunner:shoot ..." or "gunner:shoot ...".
03:43 ℹ  lykos: Ambiguous command; more than one role you belong to has a "shoot" command. Please prefix this command with a role name, for example "sharpshooter:shoot ..." or "sharpshooter:shoot ...".
03:44 ℹ  lykos: Ambiguous command; more than one role you belong to has a "shoot" command. Please prefix this command with a role name, for example "sharpshooter:shoot ..." or "sharpshooter:shoot ...".
03:44 ℹ  lykos: Ambiguous command; more than one role you belong to has a "shoot" command. Please prefix this command with a role name, for example "sharpshooter:shoot ..." or "sharpshooter:shoot ...".
03:44 ℹ  lykos: Ambiguous command; more than one role you belong to has a "shoot" command. Please prefix this command with a role name, for example "gunner:shoot ..." or "gunner:shoot ...".
03:44 <lykos> You are a gunner and hold a gun that shoots special silver bullets. You may only use it during the day by typing "!shoot <nick>" in channel. Wolves will die instantly when shot, but anyone else will likely survive. You have 2 bullets.
03:44 <lykos> You are a sharpshooter and hold a gun that shoots special silver bullets. You may only use it during the day by typing "!shoot <nick>" in channel. Due to your skill with the gun, anyone you shoot is very likely to die. You have 1 bullet.
jacob1 commented 4 years ago

The ambiguous command things were real, that's just because you had both roles. But if it doesn't PM you that you were silenced, that could be considered a bug. I saw at the very end of day you did finally run a valid shoot command.

mweinelt commented 4 years ago

Tried it several times correctly I believe:

03:43 <+hexa-> !shoot werekitten
03:43 <+hexa-> !shoot werekitten
03:43 <+werekitten> !shoot hexa-
03:43 <+hexa-> !gunner:shoot werekitten
03:43 <+hexa-> !gunner:shoot werekitten
03:43 <@lykos> 11 players: jacob1, RyanKnack, Iciloo, Mariven, werekitten, Tux[Qyou], empty_string, splook, housecat, hexa-, and Quokka
03:43 <+hexa-> !sharpshooter:shoot werekitten
03:43 <+hexa-> it's not working :<
03:44 <+hexa-> !sharpshooter:shoot Tux[Qyou] 
03:44 <+hexa-> !sharpshooter:shoot jacob1 
03:44 <+hexa-> werekitten: I'm both, and I seem unable to shoot
03:44 <+hexa-> !gunner:shoot jacob1
jacob1 commented 4 years ago

Seems like a bug in this line: https://github.com/lykoss/lykos/pull/431/files#diff-7dd8bdf2c9c05b289638e5e5d1d97b81R159

I think it should say len(common_roles) <= 1, I'd have to test

Edit: Since that didn't work, I'll leave the actual fix up to woffle

skizzerz commented 4 years ago

Fixed in d5e97fd4502cf530169c02d373a4f3baa9b7ff6b