It's not needed since we can import at function scope. Also make
chk_nightdone implicit for role commands executed during night, so we
can remove tons of redundant calls.
- Expand skel.py to be more useful
- Remove circular dependency from utilities.py. It *CANNOT* globally
import users.
- Remove unused functions from utilities.py and make some others proxy
through to user-aware functions to ensure functionality stays the
same.
- Remove duplicate event listener.
- Clarify some comments about stats.
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.
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.
When a game is being played with team reveal instead of role reveal, use
explicit team names instead of just "wolf" or "villager" to make it clear that
we're referencing teams, not the similarly-named roles.
* 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
As part of this, adjust team and accurate stats to no longer hide any
information. For team stats in particular, it was very misleading to
list traitor as villager, because it gives the village the impression
they have more time than they actually do (i.e. 2 wolfteam 5 vilteam
actually means 3 wolfteam 4 vilteam but that is not obvious). As team
stats were changed, team reveal was also changed to disregard hidden
traitor, so that the two can't be correlated to pick out if traitor died
(if traitor was revealed as vilteam but stats decremented wolfteam, that
would guarantee that traitor died).
Also commit groundwork for the stats rewrite, hidden behind an
"experimental" stats type (so it is not on by default). It is still very
WIP, many things do not yet work with it.
For now, seer and wild child are done. There are some aspects of those
roles that are still incomplete, namely:
- sorcerer and alpha wolf handling of seer/oracle/augur is still in
wolfgame.py instead of via events
- wild child does not modify !stats
Can be either time-based or points-based. Also, made fwarn a bit smarter
at guessing what the user actually wanted to do based on the parameters
given to it. Warnings now always require acknowledgement, because that
paves the way for a future commit only beginning stasis once a warning
is acknowledged.
Warnings also split off into their own file to declutter wolfgame.py a
bit (now only 9k lines, wooooo! >_>)
Does not play nice with eir, that functionality isn't going to be in the
bot itself but rather some custom code in lykos (hooking into privmsg).
All hostmask and account comparisons are now case-insensitive (nicks
still aren't, related to #217 -- changing nick sensitivity would break
everything in numerous places).
Also, refactor some things into other files where it makes sense to do
so, because putting unrelated things into the same commit is fun.
Admin-only command (can be !fallowed) to spectate deadchat or wolfchat.
The person spectating is not revealed to anyone in the chat, however
they can see everyone in that chat.
If used outside of debug mode, it is restricted a la !revealroles where
it cannot be used by an alive player or an active vengeful ghost.