Changes the "player_joined" message in messages/en.json to a list of 10 unique messages and adds the appropriate code to wolfgame.py so a random message is chosen each time a player joins.
- Split turncoat
- Add `new_role` and `swap_role_state` events, convert some `exchange_roles` listeners to them (handles both exchange as well as roleswaps such as clone->X or traitor->wolf)
- Refactor change_role(). Calling that is all that is needed for a roleswap now (no boilerplate)
- Always give player list to new wolf roles. This does mean they'll get double lists in some cases, dealwithit.jpg
- Make exchange totem no-op due to technical issues until we get role classes set up (exchanging role state across two new_role listeners doesn't work very well when the listeners get rid of old state)
Also changes prophet from being able to pray twice to only being able to pray once, but they get the third of the player list (instead of half and then one).
- Account for revealing totem + amnesiac in experimental !stats properly
- Fix amnesiac blacklist checks to be consistent with each other
- Remove non-events from villager.py -- these always ran before or after
all other events, so there was no point in them being events in the
first place
- stop_game now follows the mainroles/allroles pattern instead of
roles/templates pattern. This also modifies the data stored in db
stats, and fixes readouts for cases where we do goofy stuff with
secondary roles
Convert chk_decision, chk_nightdone, transition_day, transition_night, doomsayer, mayor, and convert+split shamans in three files with a shared helper. Fixes and updates for the User containers, and some other tweaks and fixes.
- Add the new User containers for easier handling of users throughout the codebase
- Remove the swap_player event (replaced by User.swap, made possible thanks to the containers)
- Remove the cli argument from several events
- Remove !frole (a replacement will follow)
- Remove the ALLOWED_NORMAL_MODE_COMMANDS config option
Plus a couple of small fixes here and there.
Fix balance in mudkip, it was skewed too much towards village winning.
Also, if day ended in mudkip and nobody was being voted, it would error.
Let's make that not error.
- 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.
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.
* 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
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.
* 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
In some cases, disconnection from the server can be unclean and won't be
noticed until the bot tries to send a message, which may never happen if
it did not disconnect during the game. To solve this problem, it will
now ping the server every 2 minutes by default, which will result in
a broken pipe error if the connection is dead. This won't be able to
detect netsplits where the server the bot is on stays online, because
those are impossible to correctly detect in every case.
This commit also adds a !latency command so that users can verify if the
bot is lagging.