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.
Uses variables instead of hardcoded roles for kill. Doesn't warn about
incorrect use of away and back if var.OPT_IN_PING is on, and about
incorrect use of in/out if it's off. References #76.
- 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.
Each time a wolf dies while a bitten person is undergoing
transformation, they will now transform one night earlier. This makes it
much more likely for the bitten person to actually turn into a wolf
before the game is over. For larger game sizes, the turn is pretty much
guaranteed due to the number of wolves, which means safes need to
tightly coordinate to figure out who was actually bitten due to wolves
possibly having full info and an insider.
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.
Some IRCds always output the servername on a WHOX query even if it
wasn't asked for. Let's ask for it now and just ignore the response. The
order of parameters in WHOX is now in the order they are returned, to
make life easier.
Also tidy up the generator a tad; if we aren't using things we're
computing then there's no need to compute it at all :)
It's useful for things like "!m wolf", and it's easier to do this than
hacking !pstats to support "!p wolf", which could be ambiguous if
there's a player with an account name of "wolf".
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).
This is just a basic logging function designed for logging (admin)
command calls. We'll have a better logging system eventually (ref:
lykoss/lykos#72).
- A message is now displayed whenever a pacifism or impatience totem is
triggered, e.g. "X impatiently votes for Y." or "X meekly votes to not
lynch anyone today." These are played immediately before the vote
passes, so there is no opportunity for people to abandon course.
- Reinstate people with impatience totems being the ones that die to
desperation totems. Due to the above message playing, it is now more
obvious why they died, and I believe that doing it this way adds to
gameplay ("I have a random totem and so does the person being voted. I
should try to jump in early just in case I have impatience so I don't
die."). If someone with impatience votes normally, their actual vote
counts for determing vote order (so they aren't last unless they voted
last). If there are multiple people with impatience that didn't vote,
then the order in which they vote is random.
- Moving code to chk_decision means that doing an actual !abstain
will still make you show up in !votes (unlike now where it does not)
- impatience and pacifism should balance each other out if they
are present in equal numbers, preventing an !abstain from working
if you have impatience does not yield that behavior
This fixes the error with wolf cub that has been appearing for a while
now, and also prevents similar errors from happening with monster and
traitor in the same function.
<+jacob1> !moo , is someone going to press the Merge pull request button on https://github.com/lykoss/lykos/pull/80 eventually or do I have to :P
Rolesets are picked randomly + 4 new rolesets
- Hag can no longer hex the same target two nights in a row
- Hag target is un-hexed if hag gets exchanged with someone
- GA now properly guards people whose names contain uppercase letters
- Make var.START_WITH_DAY mostly work, doesn't crash the bot anymore
but still needs improvements, namely messaging everyone what role
they are.
if > 2/5 of the players vote for a roleset it's automatically picked
picked roleset is printed out on the welcome message
!help game prints possible rolesets, also more bold
We indeed don't have all day, but people with access to fwait should
know as much already anyway. Additionally, this interfered with undoing
a long fwait; !fwait 9999 was possible, !fwait -9999 was not.
The syntax to give 'foo' the additional 'bar' template is now
!frole foo +bar
or, in the case of templates like gunner that can take an argument,
!frole foo +gunner = 9001
Removing a template uses - instead:
!frole foo -bar
The new "role = arg" syntax also applies for shamans and crazed shamans:
!frole foo shaman = impatience
A random totem is selected as usual, rather than the bot crashing, if no
argument is given.
This reverts commit 5e4bb1ed5d and puts
the relevant quiet-related code in a conditional instead, depending on a
newly-added var.QUIET_DEAD_PLAYERS setting.
Per discussion in ##werewolf-ops, nick changes are easier to notice than
PM logs which could be faked, and we can ban repeat offenders if needed
anyway.
Allow admins to fjoin people who are currently stasised without removing
their stasis entirely. Stasis is unaffected by this on its own, although
note that a game being played will still normally reduce the stasis
penalty for now, even if the stasised player actually played in the game
due to being fjoined.
The reasoning behind this is that retracting your vote not to lynch does
not necessarily mean that you will indeed lynch someone.
Also, retracting a vote not to lynch will now reset the !votes rate
limit, just like retracting a normal vote.
!simple used to determine whether you were given simple instructions
*and* whether the bot NOTICEs you; now, it only controls the former and
!notice controls the latter.