Commit Graph

2676 Commits

Author SHA1 Message Date
Emanuelle Barry
6c2861168a Split priest 2018-07-03 18:54:28 -04:00
Ryan Schmidt
ef20a35deb
Merge pull request #345 from electricalabrocoma/deadlink
remove deadlink
2018-07-03 12:41:12 -07: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
7d2eefd12a Fix lover chain winning
The base code is still not user aware and uses nicks, so make sure we pass in nicks to it.
2018-07-01 14:57:44 -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
Ryan Schmidt
38505ba9a9 Rebalance likelihoods
There are now 5 general brackets of game likelihoods:
- default gets 40 because it's default
- game modes which have proven to be popular and which don't modify core gameplay get 10
- game modes which modify core gameplay a small amount or do not modify it but aren't as popular get 5
- game modes which modify core gameplay a lot or should only rarely appear in rotation get 1
- game modes which are not balanced get 0 (joke/fun modes)

Default likelihoods add up to 95, so the likelihood is approximately also the % chance of it showing up without any votes.
2018-07-01 12:09:38 -07:00
Ryan Schmidt
974f67360d Fix night timeout bug 2018-06-29 20:47:21 -07:00
Emanuelle Barry
7da54b39a7 Fix !swap if used during join phase 2018-06-27 13:46:54 -04:00
skizzerz
59ceb13329 Sleepy bug fix
Don't error if someone tries to move after having gotten out of a
nightmare. Also use clear instead of del because I thought that it may
have been an issue but it turned out to have been fine but I'm too lazy
to revert it and it doesn't change anything.
2018-06-26 11:09:05 -05:00
skizzerz
c79fbb03c1 Make wolf chk_nightdone less hacky 2018-06-26 00:06:30 -05:00
Ryan Schmidt
4f5d3f1371
Style changes
- Turns out we use OR elsewhere in expression context (even though it's technically an undocumented behavior), so use it here as well for consistency
- Change indents to match other SQL statement indentation
- Change join condition ordering to put the joined table first (personal nit I enjoy picking)
2018-06-25 13:39:48 -07:00
electricalabrocoma
7552c492d6 Add total winrate output to !p (#341)
Mostly motivated by https://werewolf.chat/leaderboard/ listing only people with 200+ games
2018-06-25 13:36:14 -07:00
jacob1
a9a664b101 import threading in timelord.py 2018-06-24 00:50:21 -04:00
Vgr E. Barry
37dfdf7fc9 Fix maelstrom breaking 2018-06-22 17:18:54 -04:00
Ryan Schmidt
bd3fffaa6a
!fgoat Vgr
Fix people winning when they lose
2018-06-21 15:59:58 -07:00
Vgr E. Barry
9856fb1180 Rework the User containers a bit. Also add a friendlier string repr. 2018-06-21 17:58:22 -04:00
Vgr E. Barry
685a904889 Make sure bot doesn't break if someone quits during join phase 2018-06-21 15:50:18 -04:00
Em Barry
213f7b2c3b
Split and convert clone (#340) 2018-06-21 15:35:03 -04:00
Ryan Schmidt
aaeb51b203
Don't copy var.ROLE_GUIDE in default
Since the base var.ROLE_GUIDE is default anyway, and copying it breaks custom roles trying to be entirely contained within their file
2018-06-20 08:43:27 -07:00
Vgr E. Barry
4667bf9987 Remove unneeded botconfig imports in role files 2018-06-19 12:38:09 -04:00
Vgr E. Barry
817d71c332 Fix werecrow observing prophet 2018-06-19 12:16:38 -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
e54a3f7672 Convert wild child (#338)
* Start conversion of wild child.

* Remove redundant silenced=False.

* Inline random idol selection.

* Use get_players() instead of get_all_players().

* Remove botconfig import.

* Fix checks.

* Remove wild child from wolves when notifying.

* Update listeners.
2018-05-26 23:58:59 -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
c42c68f4cc
Merge pull request #329 from ammongit/mudkip-no-4p
Remove 4p mudkip
2018-05-25 06:52:35 -07:00
Ryan Schmidt
eeb4a6cd27
Merge pull request #334 from lykoss/succubus-overhaul
Overhaul succubus
2018-05-25 06:51:52 -07:00
skizzerz
a7ffdedf64 Don't add people unable to act to the chk_nightdone listeners
Checked all the other roles, they were already correct. Basically, when
a user is silenced they are removed from nightroles, which means if we
add people unable to actually act, we may prematurely end night.
2018-05-25 08:41:37 -05:00
Vgr E. Barry
c0a96d181d Fix !myrole for lovers 2018-05-23 14:34:58 -04:00
skizzerz
9752672dda Sigh... 2018-05-19 21:57:26 -05: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
Vgr E. Barry
059a06dd5b Fix some things 2018-05-06 01:36:31 -04:00
Vgr E. Barry
6a7b043c3b Properly fix mystic 2018-05-06 01:36:31 -04:00
jacob1
25e0b750bc fix error on game start 2018-05-06 01:36:31 -04:00
Vgr E. Barry
e67b48a37c Properly fix mystic 2018-05-01 23:06:18 -04:00
jacob1
71f7bdfe15 fix error on game start 2018-05-01 20:08:04 -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
5331cda68f Add comments for generated message keys 2018-05-01 16:33:05 -04:00
Ryan Schmidt
fbba6342c3
Merge pull request #324 from lykoss/mystic-tweaks
Mystic tweaks
2018-05-01 13:13:53 -07:00
Em Barry
d4968751d8
Merge pull request #327 from ammongit/minion-notify
Send "has_minions" message to wolves.
2018-05-01 13:41:04 -04:00
Vgr E. Barry
f9712e026f Properly delete users from UserDict instances 2018-04-30 16:46:06 -04:00
Vgr E. Barry
f78d538146 Fix small issue with multiple shamans 2018-04-30 15:08:50 -04:00
Vgr E. Barry
35bcda40dc Split and convert matchmaker 2018-04-30 14:51:42 -04:00
Ammon Smith
30fe9c09a2 Remove 4p mudkip. 2018-04-29 18:09:08 -07:00