This adds sort of a rate-limiting and pinging method preferences. If the
amount of players the person wants is reached or exceeded, they will be
automatically added to the !ping list; this is the default behaviour.
Doing !pingpref will make the bot automatically ping them shortly after
- this is done by a separate thread which is started on the first join
and exits when game starts or last player quits. Doing so will not
remove them from the ping list.
Now doctor gets 2 at 10p, 3 at 15p, and 4 at 23p. Formerly it was 2 at
10p, 3 at 12p, 4 at 18p, and 5 at 24p.
This reduces the doctor to being able to only immunize between 13.64%
and 20% of the village (min at 22p, max at 10p and 15p), down from
between 17.39% and 25% (min at 23p, max at 12p).
The only roles that should NOT be assassin are roles that the other team
MUST kill in order to have a good shot at winning. Therefore, we don't
need to have so many saferoles unable to be assassin, as well as certain
neutral roles. The current list is as follows:
- wolves + traitor, since these all need to die for village to win
- lycan, because if turned they need to die for village to win
- seer/oracle/harlot/augur/detective, capable of making safes so wolves
need to focus on killing them in order to have a shot at winning
- bodyguard/GA, capable of preventing other safes from dying, again need
to die for wolves to have a shot at winning
Everyone else is fair game, including shaman, drunk, hunter, doctor,
crazed shaman, and fool (who were all previously restricted).
If drunk is assassin, they don't get to choose their target, rather they
get one randomly assigned to them automatically.
- Merge channel and PM commands in a single decorator.
- Add many parameters for the decorators, reducing commands cluster.
- Added back the admin_only check for some commands; special-cased
'<console>'.
- Moved the checking for which roles are seen wolf in the settings; same
for seen as default.
- Added a variable to pick if one is seen as the default role or as a
villager where applicable (default: True).
- Fixed seer/oracle seeing through amnesiac.
- Some fixes to the totem chances that I forgot to add in the previous
commit.
- Removed some useless module imports.
- Moved some functions to settings.
- Changed all single-quotes to double-quotes in commands for
consistency.
- Renamed 'cmd' variable in both force and rforce commands to avoid
confusion.
- Probably a bunch of other things. Don't consider this commit
description to be 100% complete.
This fixes the totem chances needing to add up to 1, and now can add up
to any arbitrary number or fraction. This also adds a TOTEM_ORDER
variable for shamans, as an attempt to allow more shamans in the future.
This mode features the alpha wolf and doctor roles, and should provide
for very "swingy" games where wolves are very disadvantaged at first
but should be able to make a decent comeback later on.
This also brought some rebalancing to gamemode weights, mostly all of
the existing ones stayed the same though, a summary of changes is below.
Numbers below are rounded to the nearest percent, so they won't
necessarily add up to 100.
default: 41% -> 40% (-1%)
foolish: 19% -> 16% (-3%)
mad: 19% -> 16% (-3%)
classic: 11% -> 8% (-3%)
lycan: 3% -> 2% (-1%)
aleatoire: 8% -> 8% (0%)
alpha: n/a -> 10%
Doctor is on the village team, and has a number of immunizations they
can give out during the day. An immunized lycan reverts a normal
villager, and anyone that is immunized will die instead of turning into
a wolf if they are bitten by the alpha wolf. Beware, however, because
attempting to immunize someone already bitten will simply speed up the
process of them becoming a wolf!
Alpha wolf has a once-per-game ability where they can bite the wolves'
target instead of killing them following the death of a werewolf during
the day. The bitten person will subsequently turn into a wolf in 3
nights.
This allows us to postpone init_db(). One advantage of this is that
specifying AWAY in botconfig.py won't overwrite the away list from the
DB anymore, but properly get added to (as would be expected).
If OPT_IN_PING is enabled via botconfig.py, OPT_IN_PING isn't set to
True at the time we set up tables as necessary, so people using !in will
make the bot run into the lack of table and crash.
We already do this with the away list even if we're going to use opt-in
ping, so this shouldn't cause any issues.