Commit Graph

799 Commits

Author SHA1 Message Date
Ryan Schmidt
1e91f1a907
Fix rstats during game 2018-07-24 09:21:20 -07:00
random-nick
34da084a94 Add !rolestats command (#344)
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.
2018-07-17 09:18:37 -07:00
Ryan Schmidt
939c4d8555 Integers best gers 2018-07-09 20:41:29 -07:00
Ryan Schmidt
9167b4b83d Make it more likely that lykos picks a voted mode 2018-07-09 20:39:26 -07:00
ATMunn
ba78d5a40e Added random join messages (#343)
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.
2018-07-04 09:51:27 -07:00
Vgr E. Barry
5cbb7f2a81 Finish priest 2018-07-03 19:24:35 -04:00
Emanuelle Barry
6c2861168a Split priest 2018-07-03 18:54:28 -04:00
simplexish
2b5d83f82a remove deadlink 2018-07-03 19:03:22 +00:00
Em Barry
41262a148a Split turncoat and convert some of the exchange_roles listeners into new_role (#342)
- 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)
2018-07-03 07:41:51 -07:00
Ryan Schmidt
5f7e4e4d05 Revamp how gamemode votes work
- 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)
2018-07-01 13:18:36 -07:00
Emanuelle Barry
7da54b39a7 Fix !swap if used during join phase 2018-06-27 13:46:54 -04:00
Em Barry
213f7b2c3b
Split and convert clone (#340) 2018-06-21 15:35:03 -04:00
Vgr E. Barry
0479bab5e1 Split and convert prophet
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).
2018-06-19 11:34:46 -04:00
Ammon Smith
afa9a04077 Split minion (#337) 2018-05-26 18:33:56 -04:00
Em Barry
845663820f
Merge pull request #326 from ammongit/split-wolves-players-english
Remove hardcoded English for "Players:" and "Wolves:"
2018-05-26 09:20:32 -04:00
Ryan Schmidt
eeb4a6cd27
Merge pull request #334 from lykoss/succubus-overhaul
Overhaul succubus
2018-05-25 06:51:52 -07:00
jacob1
5da3137faf also ensure vote messages are sent to main channel anyway 2018-05-19 22:09:56 -04:00
jacob1
74a654a6c5 fix !lynch working in pm 2018-05-19 22:06:11 -04:00
jacob1
d35012d739 fix !update when game is running 2018-05-14 00:03:32 -04:00
jacob1
8a0919d7c1 fix neutral roles winning when villagers win 2018-05-13 23:56:47 -04:00
Ammon Smith
d8763c34a9 Remove hardcoded English for players list. 2018-05-01 15:48:05 -07:00
Ammon Smith
f879bb9de5 Remove hardcoded English for wolves list. 2018-05-01 15:35:57 -07:00
Vgr E. Barry
810d2ba3cc Overhaul succubus (first pass) 2018-05-01 17:47:44 -04:00
Vgr E. Barry
35bcda40dc Split and convert matchmaker 2018-04-30 14:51:42 -04:00
skizzerz
f77cca1f07 Record gunner as killer if they shoot wolf at night
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).
2018-04-26 14:21:31 -05:00
Ammon Smith
6d0d6f7169 Split time lord (#320)
Split time lord into src/roles/timelord.py
2018-04-25 19:44:24 -04:00
Ryan Schmidt
b86e52de25
Merge pull request #319 from lykoss/split-assassin
Split and convert assassin
2018-04-25 15:53:19 -07:00
jacob1
ac2b83d36f remove unnecessary check requiring non-admins to be in the game 2018-04-24 22:14:35 -04:00
jacob1
c5036bceac improve frole template handling, don't require underscores 2018-04-24 21:58:10 -04:00
Vgr E. Barry
ecd68d15bf Split and convert assassin 2018-04-24 13:24:38 -04:00
skizzerz
56f2bacd3a Amnesiac fixes and redo stop_game readout logic
- 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
2018-04-23 23:11:02 -05:00
Vgr E. Barry
1a446205ce Split and convert amnesiac 2018-04-23 20:27:00 -04:00
Em Barry
745a1dc68a
Convert chk_decision (#317)
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.
2018-04-23 13:25:38 -04:00
skizzerz
94cdfc0a55 Redo DISABLE_ACCOUNTS handling
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.
2018-04-13 17:09:42 -05:00
Vgr E. Barry
7154a7d092 Move automatic mode syncing to hooks.py 2018-04-13 16:54:34 -04:00
Em Barry
28f26e181b Add the new User containers (#316)
- 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.
2018-04-13 13:37:04 -07:00
Vgr E. Barry
a8790b439a Remove the cli argument from chk_win 2018-02-04 17:26:40 -05:00
Bradley Haljendi
a42da38e8e Do not ping players with unacked warnings
This fixes issue #255 by preventing unacked warnings from being pinged entirely (whether or not they would cause stasis).
2018-01-19 08:37:43 -07:00
skizzerz
965b230f64 Fix mudkip day timeouts breaking things if game ends during them 2018-01-11 11:08:57 -07:00
skizzerz
4a7dd390e5 Don't try to voice/devoice fakenicks
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.
2018-01-11 10:26:43 -07:00
skizzerz
0fa7664526 Voting fixes for mudkip and succubus
- 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
2018-01-11 10:02:05 -07:00
skizzerz
1989be5c8d Convert !quit to new command API 2018-01-10 15:26:20 -07:00
skizzerz
c9e1845fbb Convert get_reveal_role to use Users 2018-01-10 15:18:41 -07:00
skizzerz
5af0f4ae82 Fix !update 2018-01-10 13:42:01 -07:00
Em Barry
a2be87b85a Convert succubus (#311)
Convert succubus to new API along with (un)related fixes.
2018-01-10 07:51:45 -07:00
jacob1
aa8e7006b4 fix time lord 2017-12-30 00:08:20 -05:00
jacob1
b11333cac0 allow setting amnesiac role in frole 2017-12-29 20:31:31 -05:00
skizzerz
e8408214f5 Kill proxy with fire
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.
2017-12-29 16:49:09 -06:00
jacob1
15e0d9f503 convert most botconfig.NICK usages to users.Bot.nick 2017-12-29 11:30:04 -05:00
skizzerz
6dcf2f513c Fix idling out not triggering dc loss 2017-12-28 15:24:51 -06:00