Commit Graph

778 Commits

Author SHA1 Message Date
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
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
skizzerz
7fb0022928 Fix amnesiac 2017-12-16 21:51:25 -06:00
jacob1
bd66621a43 fix ORIGINAL_ROLES not being updated on player swaps 2017-12-16 21:11:56 -05:00
jacob1
141bab2624 fix pony in a way that matches slightly better 2017-12-14 00:20:48 -05:00
jacob1
697ac58ef3 fix pony 2017-12-14 00:19:26 -05:00
skizzerz
0cc497111f Fix roleswap wins 2017-12-13 22:49:18 -06:00
skizzerz
7a66275bcc Fixes for role change 2017-12-13 22:04:08 -06:00
skizzerz
95da346344 Fix mudkip 2017-12-13 21:06:56 -06:00
skizzerz
4fde6f9bae Convert var.ROLES and var.ORIGINAL_ROLES to Users
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.
2017-12-12 16:25:56 -06:00
Em Barry
ab125c26de
Merge pull request #307 from ammongit/coin-pony-cat
!coin, !cat, !pony
2017-12-12 08:18:25 -05:00
Ammon Smith
6f830619cf Apply review changes. 2017-12-11 14:00:47 -08:00
Ryan Schmidt
d8aabf0db6
Merge pull request #306 from lykoss/harlot-convert
Convert harlot to the new API
2017-12-11 13:24:02 -07:00
Vgr E. Barry
8236664e15 Fix some issues with harlot conversion 2017-12-11 15:21:01 -05:00
Ammon Smith
c8a4502aec Move !coin and the rest to @command. 2017-12-10 21:22:51 -08:00
skizzerz
6be001c78f derp 2017-12-09 14:55:49 -06:00
skizzerz
a2dd0fd189 Balance tweaks for new mode
- 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.
2017-12-09 11:21:04 -06:00
Vgr E. Barry
7e9bbcaf3c Some small fixes for harlot 2017-12-07 13:31:18 -05:00
Vgr E. Barry
bfc5e6a9dd Convert harlot 2017-12-07 13:31:18 -05:00
skizzerz
a4f3d61aad Fix return_to_village for disconnected users
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.
2017-12-07 10:48:39 -06:00
Em Barry
1ce4360f3e
Merge pull request #304 from lykoss/split_piper
Split piper and convert it to new APIs
2017-12-05 20:51:10 -05:00
skizzerz
4edd0122e2 Don't break when someone leaves during join phase
Converted PLAYERS to ALL_PLAYERS due to the former storing nicks and the
latter storing users, but it turns out they are populated differently
and we really actually needed PLAYERS here.
2017-12-04 18:21:49 -06:00
Ryan Schmidt
0b07d9193f Convert var.DISCONNECTED to users (#302)
* Fix inaccuracy in users._add docstring

Also don't track disconnected users by nick anymore. But that seems less
major than fixing the docstring.

* Fixes

* Fix docstring
2017-12-04 14:06:20 -05:00