Idea: let's NOT mess with how the game logic is laid out unless you can
mathematically prove that your new cool shorthand way of doing things is
exactly equivalent to the old way.
- revealroles is now enabled by default in normal mode
- spectate has been changed to require +a instead of +A
- fdie has been changed to require +F instead of +D;
unlike the other +D commands (restart, update), die requires
server access to get back up and is more dangerous.
- remove 'send' alias for fsend
- fgame is now enabled by default in normal mode
and has been changed to require +g instead of +d
- fnight has been changed to require +N instead of +d
- fday has been changed to require +N instead of +d
- fstart has been changed to require +S instead of +A
- fstop has been changed to require +S instead of +A
- fwait has been changed to require +w instead of +A
- all remaining commands which require +d (force/rforce/frole)
remain disabled by default in normal mode
- eval and exec can no longer be enabled in normal mode;
they function in debug mode only
Right now neither are used (get_participants does not have any event listeners anywhere), however in the future it will be easier to convert code that uses the old, nick-based functions.
copy/deepcopy didn't know what to do with user objects due to custom
__new__. Since __new__ returns an existing user if possible anyway, just
have copy/deepcopy return the same user instance that is being copied.
Was already mostly in wolf.py, but this takes it out and lays groundwork
for splitting out var.DISEASED_WOLVES and base events that the new
berserker wolf can use.
* Split Mad Scientist
Related changes:
- MS now honors all protections instead of only caring about blessed
villagers
- Allow FA to bypass protection even if FA is applied as a template
- Make bodyguard swap themselves in as the assassination target rather
than blocking the attempt outright and suiciding. This means that
active protections on the bodyguard have a chance to save them as well.
- Redo some messages to make the above sound nice in the bot.
- Add some additional params to the assassinate event to see WHY the
assassination is happening (source) and WHO is doing the assassination
(killer; currently a nick but should be a user sometime in the future).
- Add a target data item to teh assassinate event so that listeners can
change who is being assassinated. Protection boilerplate has been
adjusted to account for this.
- Add helper function to get the targets, avoiding code duplication
8-9p has only one safe, 2 wolves, and a dullahan. Usually this means
dulla controls the game and the winner is entirely determined by whether
or not both wolves are on the kill list. Aka it sucks.
Many of these aliases are words that begin sentences. Saying them in
wolfchat/deadchat then makes the bot pm random people with stuff. Let's
NOT do that, kthx. fact is also a word, so replacing that with fdo.
The dead player is already removed from var.ROLES by the time the event
fires. Also, tweak del_player event to make it much easier to support
arbitrary roles as not being the player's main role by changing nicktpls
to allroles (which is a set that includes mainrole). The assassinate
event is similarly tweaked.
They can't be shot during day, so they can't be shot at night either.
Add an event so that it can be easily handled once split (using the new
API, Vgr would be so proud of me).
If with_host() is called before we fully know our ident and host, we'll
set the host but keep ident as None, which breaks everything down the
line. I could've fixed this in general in users._add, but that would
require more extensive changes than this patch (aka may break other
things).
Instead of trying to guess what format a token is based on its content,
hardcode a list of known tokens and what formats their parameters take.
Any unknown token will therefore be kept as a string, instead of
potentially blowing up parsing due to unexpected values (such as
multiple colons).
Also fix parsing for colon-separated lists. MAXLIST=beI:100 is *VERY*
different from MAXLIST=b:100,e:100,I:100 but our previous processing
made the two identical in terms of what the structure looked like.