Commit Graph

1192 Commits

Author SHA1 Message Date
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
skizzerz
f9119e12e0 pika pika 2017-12-08 22:36:11 -06:00
Vgr E. Barry
ab0920f824 Make harlot listen to swap_player 2017-12-08 09:39:33 -05:00
Vgr E. Barry
8e45ab5978 Fix thing 2017-12-07 13:33:38 -05:00
Vgr E. Barry
f6a169fdee Small fixes 2017-12-07 13:31:18 -05: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
skizzerz
fa578a0905 Add missing events to piper
We needed a swap_player and night_acted listener. Should probably throw
common listeners into skel.py...
2017-12-07 10:03:11 -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
Ryan Schmidt
11569c75b2
Fix possible issue in chk_win
need to propagate rolemap/mainroles into subcalls so that checking win conds in role attribution (e.g. for random/mael) won't spuriously break
2017-12-05 18:37:54 -07:00
skizzerz
5cc45eda6d Don't return self in get_target if allow_self is False
This was put in to allow for custom messages if one couldn't target
themselves. As such, an extra kwarg was added to pass in a custom
message in such an event. It now returns None if they targeted
themselves so the caller can fail gracefully.
2017-12-05 15:02:21 -06:00
skizzerz
40b2c345dc Additional piper fixes 2017-12-05 15:02:21 -06: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
jacob1
65e4d9c484 remove debug code 2017-12-04 00:03:06 -05:00
jacob1
4bbe460df3 don't check votes in reaper until after killing all idlers 2017-12-04 00:01:55 -05:00
Ryan Schmidt
837eec41ad
Merge pull request #303 from lykoss/fspectate
Spectate changes
2017-11-30 20:47:46 -07:00
skizzerz
6efbcca3fe Split piper and convert it to new APIs
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.
2017-11-30 21:44:59 -06:00
jacob1
50f77439fb fix dead vengeful ghost being unable to use any commands 2017-11-13 00:22:33 -05:00
jacob1
7a003e4cb7 convert var.SPECTATING_WOLFCHAT to users, prevent !spectate deadchat 2017-11-05 20:11:05 -05:00
jacob1
cac3200164 separate spectate into +p flag, add a notice when someone spectates wolf/deadchat 2017-11-05 00:15:24 -04:00
skizzerz
dfa310850f Fix silenced harlot breaking things 2017-10-21 11:41:22 -05:00
skizzerz
4df8072afd Fix 8+ villagergame 2017-10-19 22:58:42 -05:00
Vgr E. Barry
7c7a256eab Use get_players for decorators 2017-10-02 11:14:58 -04:00
Ryan Schmidt
9c67f73f5b Merge pull request #299 from lykoss/convert_del_player
Convert del_player to Users
2017-09-28 19:58:33 -07:00
jacob1
7bbffd3e61 remove FORTUNE_CHANCE, wasn't interesting / could error 2017-09-26 19:49:58 -04:00
Vgr E. Barry
1351f70e04 Import users and channels in every role file
Not every role file needs it, but it's better to be consistent
2017-09-26 17:17:00 -04:00
Vgr E. Barry
0f12277541 Properly iterate over users instead of nicks 2017-09-26 17:16:59 -04:00
skizzerz
6d26d8e90c Remove forced_death param from del_player
It was causing subtle bugs with vote counting and is not needed since
ismain is a better thing to check anyway.
2017-09-26 15:59:42 -05:00
skizzerz
de566f839b Don't attempt to transition phases while in the middle of a chain death 2017-09-26 15:32:49 -05:00
Vgr E. Barry
cc4cfa34fe Remove testing leftover 2017-09-26 09:05:13 -04:00
Vgr E. Barry
d6540b4edb Fix some small issues 2017-09-26 07:56:11 -04:00
skizzerz
90320ba6bc Fix issues with del_player conversion 2017-09-25 17:37:56 -05:00
skizzerz
c8145571e0 Fix killing harlots who stayed home bugging out 2017-09-25 17:16:45 -05:00
skizzerz
00886f504a Add DISABLED_COMMANDS config var 2017-09-23 18:37:22 -05:00
skizzerz
a4c9fe6377 Fix some del_player call sites and default params 2017-09-19 15:33:25 -05:00
skizzerz
35439209e0 Update wolflist event 2017-09-18 16:50:35 -05:00
Vgr E. Barry
02eba3e267 Actually pass users through to _get_targets 2017-09-18 17:12:19 -04:00
Vgr E. Barry
262990653d Actually add users to the deadlist 2017-09-18 16:49:21 -04:00
Vgr E. Barry
d04891346a More things 2017-09-18 16:45:33 -04:00
Vgr E. Barry
582045bcd9 I dun goofed 2017-09-18 16:38:59 -04:00
Vgr E. Barry
89cabd933b Update event listeners for del_player 2017-09-18 16:35:23 -04:00
skizzerz
39dfd2095f Update update_stats listeners 2017-09-18 15:30:39 -05:00
skizzerz
40263d9a50 kill var.HVISITED with fire (not used anymore) 2017-09-18 15:26:21 -05:00
skizzerz
24b2ea6001 Update del_player callsites in wolfgame.py
Also make the kwargs in del_player kwarg-only.
2017-09-18 15:23:08 -05:00
skizzerz
3cd6247ce9 Convert del_player
This is still a Work In Progress. The function itself has been converted
(completely untested as of now), but nothing that uses or calls it has
been fixed yet.
2017-09-18 15:00:39 -05:00
Em Barry
bcedbd4c65 Convert check_exchange (#298)
Add an optional extended description...
2017-09-18 11:08:17 -07:00
Em Barry
95fd796953 Convert transition_day (#297)
transition_day and relevant events have been converted to the users API. Additionally, VG was converted to the users API.
2017-09-11 16:55:19 -07:00
Vgr E. Barry
e04c60a60f Nothing to see here, move along 2017-09-04 15:32:54 -04:00
Vgr E. Barry
2b50c75b18 Fix harlot bite event 2017-09-04 15:31:54 -04:00
Vgr E. Barry
516d1d0c8c Update the chk_nightdone function and event 2017-09-04 13:56:33 -04:00
Vgr E. Barry
a5c3f0694c Update night_acted event 2017-09-04 10:46:15 -04:00
Vgr E. Barry
b73d4e79c1 Fix oversight 2017-09-02 10:03:24 -04:00
Vgr E. Barry
d89534f259 Update !myrole and its event 2017-09-01 10:10:26 -04:00
Vgr E. Barry
07f14689c3 Properly display player list to wolves 2017-08-30 14:41:25 -04:00
Vgr E. Barry
7d117fab6b Fix error in end-of-game deadchat 2017-08-30 13:52:20 -04:00
Em Barry
a9067bb8ca Change a bunch of things because we felt like it
* Convert the del_player event
* HAAAAAAAAAAAAAAANDS
* <insert snarky commit message here>
2017-08-30 10:09:31 -07:00
Vgr E. Barry
17688050d6 Add get_all_players function and use it wherever necessary 2017-08-30 12:38:09 -04:00
Vgr E. Barry
0f1d513daa Convert the transition_night_end event 2017-08-30 10:16:02 -04:00
Vgr E. Barry
2f0d4f8b1c Update the get_special event 2017-08-30 08:40:54 -04:00
Vgr E. Barry
e32e142742 Remove the cli parameter from night_acted 2017-08-29 20:00:33 -04:00
Vgr E. Barry
888787fa3b Remove cli from night_warn 2017-08-29 19:55:20 -04:00
Vgr E. Barry
95df73ac8d Remove cli from get_voters event 2017-08-29 19:49:56 -04:00
Vgr E. Barry
9fa67c559e Update stop_game to not take cli 2017-08-29 19:46:00 -04:00
Vgr E. Barry
2bf715637c Remove old users iteration and rename new one
Nothing used neither the old or new versions, but keeping the new one in anyway
2017-08-29 19:32:17 -04:00
Vgr E. Barry
371f8488df Add shortcut to context comparison 2017-08-29 19:31:26 -04:00
Vgr E. Barry
5fff9d2ce8 Update the begin_day event 2017-08-29 19:30:27 -04:00
skizzerz
b2589caccb Fix yet another bug with the hunter conversion 2017-08-29 17:36:21 -05:00
jacob1
9c0f96decc fix issue where night wouldn't end if wolves were diseased 2017-08-27 00:17:22 -04:00
skizzerz
d675f3183c Fix hunter prematurely ending night.
Idea: let's NOT mess with how the game logic is laid out unless you can
mathematically prove that your new cool shorthand way of doing things is
exactly equivalent to the old way.
2017-08-25 17:01:53 -05:00
Vgr E. Barry
1bb4ea1cd3 Fix !fsync 2017-08-24 09:07:32 -04:00
Vgr E. Barry
55c2f2ce25 Fix !revealroles 2017-08-23 23:40:04 -04:00
Vgr E. Barry
746eb4171b I'm good at this 2017-08-23 23:21:59 -04:00
skizzerz
0bfa262daf Flags/command permissions overhaul
- revealroles is now enabled by default in normal mode
- spectate has been changed to require +a instead of +A
- fdie has been changed to require +F instead of +D;
  unlike the other +D commands (restart, update), die requires
  server access to get back up and is more dangerous.
- remove 'send' alias for fsend
- fgame is now enabled by default in normal mode
  and has been changed to require +g instead of +d
- fnight has been changed to require +N instead of +d
- fday has been changed to require +N instead of +d
- fstart has been changed to require +S instead of +A
- fstop has been changed to require +S instead of +A
- fwait has been changed to require +w instead of +A
- all remaining commands which require +d (force/rforce/frole)
  remain disabled by default in normal mode
- eval and exec can no longer be enabled in normal mode;
  they function in debug mode only
2017-08-23 22:17:25 -05:00
Vgr E. Barry
370b2c6ed2 Some function and event updates 2017-08-23 22:06:43 -04:00
skizzerz
fa82be59f3 Fix MS chained deaths not chaining correctly 2017-08-23 21:01:16 -05:00
Vgr E. Barry
714f0e8593 Add new User-aware utility functions
Right now neither are used (get_participants does not have any event listeners anywhere), however in the future it will be easier to convert code that uses the old, nick-based functions.
2017-08-23 19:02:10 -04:00
Vgr E. Barry
401edb75cf Convert hunter to the new User API 2017-08-23 18:59:30 -04:00
skizzerz
ca628dfe2e Don't time out night if all wolves are silenced 2017-08-22 17:10:26 -05:00
Vgr E. Barry
5d14327380 make stuff prettier i guess 2017-08-21 14:16:04 -04:00
skizzerz
f766c76076 ... 2017-08-20 22:56:44 -05:00
jacob1
2cb25a3ad5 fix revealroles showing MS targets on every player 2017-08-20 22:33:15 -04:00
jacob1
fb889393d7 fix single digit fake nick joining in debug mode (only ranges worked) 2017-08-20 19:59:30 -04:00
jacob1
a0055453fe fix succubi winning when all players die ... even if there were no succubi 2017-08-20 18:53:23 -04:00
jacob1
4dc86adc75 add mad scientist targets to myrole and revealroles 2017-08-20 18:46:04 -04:00
skizzerz
4d9e509a58 Add drunk to guardian, bit too many vils in there 2017-08-19 23:35:47 -05:00
skizzerz
9d4a5172b4 Don't make CS lose if they die in vilgame 2017-08-19 23:07:56 -05:00
skizzerz
3ea7ba0d2c Add guardian to default rotation now that win conds are fixed 2017-08-19 22:38:29 -05:00
skizzerz
7568baced8 Fix users not being voiced in mael when joining midgame 2017-08-19 00:16:32 -05:00
skizzerz
c47373dd3d Fix villagergame delay not working 2017-08-18 19:48:11 -05:00
skizzerz
a3839b25d6 Fix midgame joining in mael
copy/deepcopy didn't know what to do with user objects due to custom
__new__. Since __new__ returns an existing user if possible anyway, just
have copy/deepcopy return the same user instance that is being copied.
2017-08-18 17:45:47 -05:00
skizzerz
9eaaa90c8e Split wolf cub, part 2
It turns out that actually staging the new file is helpful. Whodathunk?
2017-08-16 18:12:13 -05:00
skizzerz
63e8ad667b Split wolf cub
Was already mostly in wolf.py, but this takes it out and lays groundwork
for splitting out var.DISEASED_WOLVES and base events that the new
berserker wolf can use.
2017-08-16 18:08:05 -05:00
Ryan Schmidt
4bfa5f16f6 Split Mad Scientist (#295)
* 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
2017-08-16 14:53:21 -04:00
skizzerz
ef3c670a0d Make sleepy 10+
8-9p has only one safe, 2 wolves, and a dullahan. Usually this means
dulla controls the game and the winner is entirely determined by whether
or not both wolves are on the kill list. Aka it sucks.
2017-08-09 17:18:59 -05:00
skizzerz
a9915e09fe Kill non-f aliases for fsay/fact
Many of these aliases are words that begin sentences. Saying them in
wolfchat/deadchat then makes the bot pm random people with stuff. Let's
NOT do that, kthx. fact is also a word, so replacing that with fdo.
2017-08-09 12:09:58 -05:00
skizzerz
ad5ab73e00 Forgot to update gamemodes del_player events to use new var names 2017-07-20 19:07:00 -05:00
skizzerz
c4282bd237 Fix wolf cub not working
The dead player is already removed from var.ROLES by the time the event
fires. Also, tweak del_player event to make it much easier to support
arbitrary roles as not being the player's main role by changing nicktpls
to allroles (which is a set that includes mainrole). The assassinate
event is similarly tweaked.
2017-07-20 14:19:04 -05:00
skizzerz
c0aa797342 Don't shoot werekittens at night
They can't be shot during day, so they can't be shot at night either.
Add an event so that it can be easily handled once split (using the new
API, Vgr would be so proud of me).
2017-06-20 23:08:49 -05:00