This gets rid of the (dced) hack, with var.DCED_LOSERS taking its place.
Succubus was not touched, as there is already a PR which converts it,
although the succubus events in other files were touched.
Some sites were updated to be (more) Users-aware, while others replaced
it with an old deprecated get_roles() API. As more things get converted,
these will hopefully get eliminated as well. A FIXME comment was added
to all such occurrences.
- Remove minion entirely, keeping cultist at 8p instead.
- Cultist swaps with doomsayer at 9p, so there's still only 2 wolfteam
until 11p. Doomsayer is powerful enough already, don't need another
wolfteam in there.
- Get rid of retribution totems. Shaman is now 50/50 death/pestilence
and wolf shaman is 50/50 protection/misdirection.
- Make stalemates benefit village by allowing tied votes to lynch all
tied people instead of nobody. Day ends once everyone votes, even if
there is no majority vote. In that case, the plurality of votes is
considered rather than majority.
If the user rejoins as a different user, the ghost stuck around and
broke things. This fixes that. It also makes it smarter when rejoining
as a different nick, and alerts what the old nick was in such cases.
Converted PLAYERS to ALL_PLAYERS due to the former storing nicks and the
latter storing users, but it turns out they are populated differently
and we really actually needed PLAYERS here.
* Fix inaccuracy in users._add docstring
Also don't track disconnected users by nick anymore. But that seems less
major than fixing the docstring.
* Fixes
* Fix docstring
Still some unsplit things that are pending other roles being split.
Other gameplay changes regarding piper:
- Ensure that pipers can never be charmed, even in the case of
misdirection, luck, and exchange totems.
- Allow pipers to change who they are charming during the night.
- Do not share who pipers picked with other pipers (or in revealroles),
as these are now changeable and pipers are not made aware of each
other anyway in the role list at night.
This is still a Work In Progress. The function itself has been converted
(completely untested as of now), but nothing that uses or calls it has
been fixed yet.
- 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
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
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).
Templates are still applied on game start according to
var.TEMPLATE_RESTRICTIONS, but now any arbitrary role can be applied as
a template during gameplay without breaking things horribly.
Speaking of breaking things horribly, things are probably broken
horribly due to this. It was lightly tested, but there's a lot of
fundamental stuff that changed.
mm = matchmaker, ms = mad scientist, vg = vengeful ghost
Additionally, allow all special keys to be queried via pstats in an
extensible manner (used for vg activated and vg driven off)
Also allow prefixing commands by their role name to remove ambiguity
should a person be multiple roles. For example, "seer see foo" and
"augur see foo" will now work if a person is both seer and augur
(whereas normal see foo would be ambiguous). A player will be directed
to use the unambiguous prefixed version if we detect that a role command
will fire multiple times for them (note: coming soon).
For sanity reasons, these role prefixes are implemented as exclusive
commands, meaning no other commands or command aliases may use the same
name. Clone needs to be special-cased in this regard, as clone is both a
role name and a command name.
It simply didn't work before now for a while (as in, you could still
join/start). Also make it function during join phase, because having
weird restrictions on which it does/doesn't disable the commands is
weird. The admin can still !fjoin/!fstart as needed if they do want to
run one more game after executing this command during join phase.
Eliminate stupid get_final_role event and instead simply don't add cubs
to var.FINAL_ROLES when they grow up into wolf. That var is only ever
used for end-game stats readouts, so there is no mechanical impact in
omitting adding something there.
Add new event to experimental stats to allow roles like cub and clone to
reflect role swaps when players die. Cubs growing up now shows up in
experimental stats.
Change the behaviour of fjoin in both normal and debug modes:
- Only joins fake nicks in debug mode;
- Only joins one person in normal mode, multiple in debug mode;
- Autocomplete nicks in both normal and debug modes.
* Split + buff succubus
When all succubi die, all entranced people now die along with them. This
should prevent an entranced person from ratting out the succubus early
on so that they go back to their team, as they lose now even if succubus
dies. One exception is if EVERY succubus idles out, then everyone that
is entranced is freed of entrancement, as it isn't their fault that they
didn't protect their friends in that case.
Dullahans now have succubi entirely removed from their list as the
likelihood they get unentranced is low, and it's easier to implement
this way.
Ensure that entranced people can vote along with ANY succubus, even if
that vote isn't the one that succeeded. Before there were cases where
they could vote along with succubus but still end up dying (particularly
in respect to a vote passing when a succubus abstained).
Clear up some message wording with regards to succubi.
Cleaned up chk_win_conditions and eliminated chk_traitor, so they make
much more sense now.
Also fixed minor issues, such as end-game saying "same number" of wolves
even if there are more wolves than villagers, hunter/vigilante dying
during night sometimes not clearing variables correctly (thus causing
premature night end) and some various stupidity going on with some old
code I wrote that doesn't have any visible effects.
* Combine all players into the same succubus death message
* Fix stylistic issues and succubus idling not working
var.ALL_PLAYERS update (for !swap) needs to happen before checking if the new user is in var.ALL_PLAYERS
pl is inaccurate during nick changes because the user's nick in var.ALL_PLAYERS is updated automatically but in var.ROLES isn't, therefore a user that changes nicks would never be returned in list_players()
one instance of prefix incorrectly changed to user.nick