Updated game text for stats commands. Fixed error with "mystats" help
string. Added additional check in player stats commands to find the
associated account before attempting to retrieve stats.
Loosely based on code from jcao219. New commands are "player", "p", "mystats", "me". The commands access existing stats stored in the game database (data.sqlite3).
Added the option in ./modules/wolfgame.py. When activated, if traitor dies before turning, he will only be revealed as a villager.
Also, when "stats" command is used, traitor will be counted as a villager. By default, it is set to True.
i.e. it makes sure that there are at least X seconds of wait time left after a !join.
Feb01[18:03:40] +Zazie_Lavender | I think there should be an enforced 10 to 20 second wait after last !join
Added a new picture, you will like this one.
Changed that one .jpg URL that actually pointed to a .gif file to .jpg.
Changed picking algorithm to have fixed chances even when adding new pictures. Uses random.choice().
We don't want to have these pictures quite as often. We once had a 1/100 chance. To balance things out a bit, a 1/50 chance should do.
Previously, if a wolf was shot dead at night, any werecrows that have
observed were removed from the game without announcement, although they
would remain voiced.
For those who are curious, this is because lists are copied by reference
on assignment in Python; any changes made on the variable you assigned
the list to will be reflected in the original list. This can be avoided
by making a shallow copy of the list using `list(x)` or `x[:]`.
This reverts commit f49e7371b8.
Thinking about it, the old behavior actually makes sense. X visits Y,
and Y visits X. When wolf targets X, they find Y, and vice versa.
At 12 players, there are two harlots, and they can visit each other.
This is intended to make both of them invincible, but the actual
behavior was that the one visiting the victim would die.
chk_nightdone used to check whether the number of people seen equals
the number of seers (and the same for harlot, etc.). This means night
times out if the seer (etc.) leaves after seeing but before night is
otherwise ended. This commit changes equals to >=, and swaps around the
wolf part of that condition so that it matches the other parts.
This commit moves the !votes and !stats rate limit warnings to user
notices intead of in-channel messages, to be consistent with the other
rate limit warnings and because those messages are usually just
pointless noise. It also moves the CARE_BOLD and CARE_COLOR messages
to user notices, because they're spammy and annoying and just make
things worse when they're in-channel.
Instead of setting make_stasis as soon as they leave, then setting it
again with a negative number if they rejoin, we can just set it when
they actually reach the timer and are killed. We were actually doing
*both* up to now (which was probably what was causing the double stasis
mentioned in issue #8), so I just removed the make_stasis calls when
people leave and come back, and kept the one when they get killed.
The message about wolves winning was unclear that the comparison is
between wolves and uninjured villagers, which caused confusion a few
times because people thought the game ended due to a bug. This commit
changes the message to avoid this confusion.
Minor change requested by someone in #wolfgame a while ago. The old
!retract message ended in a period, and it's still there in the logger
message, but the new in-channel message didn't have one.
This commit adds some variable declarations and other minor things so
that setting var.START_WITH_DAY to 1 doesn't cause errors. This commit
doesn't actually fix that gamemode completely, since I'm still
pondering how best to make the game notify people of their roles when
the game starts in this mode, but it's a good start.