This might me a little confusing, because it calculates the number of players that won (similar to !playerstats) instead of the number of times a team won (like !gamestats). This way it gives the proper winrate of a player playing that role, but gives an inflated number of total victories and games in cases where there are multiples of a role in the same game. Maybe it would be better to hide the actual numbers and show only the winrates in order to avoid confusion.
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)
- Majority vote will still select that mode unconditionally
- When there is no majority vote, the game mode is decided in a two-step process:
1. The bot will first try to select a game mode among those voted vs a random gamemode (for the purpose of this, all players who did not vote are considered to have voted for a random gamemode). For example, in an 8 player game if there are 2 votes for foolish, 2 votes for aleatoire, and 1 vote for default, one of `{foolish, foolish, aleatoire, aleatoire, default, random gamemode, random gamemode, random gamemode}` will be chosen (25% foolish, 25% alea, 12.5% default, 37.5% random gamemode)
2. If random gamemode is selected, a random mode is selected according to the base likelihoods. Votes do not modify this anymore
Votes which are for majority-only modes or modes with incorrect player counts are not counted (and treated as votes for a random gamemode instead)
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).
Caused issues due to killers not being defined. For example, a VG lover
of the shot wolf would join the village team (against wolves) if gunner
shot their wolflover during night. Now it properly sides the VG with
wolves (against village).
- 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.
Only check it where absolutely necessary, and ensure in User that we
don't set accounts if we don't support them. This lets us ensure that
account is always None when account support is disabled, which means
that the existing None checks handle that without additional conditions.
- 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.
There were a few places where we still tried to do this.
Also get rid of the FEATURES checking for what voice corresponds to,
+v is defined to be the channel mode for voice per RFC so we can
safely hardcode it. A few places weren't changed over because it may
be better to expand those places to handle the other status modes as
well.
- Remove short-circuit in chk_decision event on day timeout. No idea why
I put that there to begin with...
- Don't make succubus remove voters from the list, rather just set their
weight to 0. This causes their vote to not count while still letting
stuff interact with the fact they voted succ (such as desperation totem)
- Ensure that mudkip's vote change works on day timeout as well
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.