Commit Graph

55 Commits

Author SHA1 Message Date
Ammon Smith
b73015affa Send "has_minions" message to wolves. 2018-04-27 15:31:11 -07:00
Vgr E. Barry
84d25330b2 Make sure village mystic gets all wolfteam members 2018-04-26 16:06:38 -04:00
Ammon Smith
7d83dc4d8e Allow pipers to pass or change targets (#322)
Also adds some more info to revealroles. Some miscellaneous fixes included.
2018-04-25 23:08:39 -04:00
Vgr E. Barry
1d2ab6a2cc Update mystics and the get_special event to be more fine-grained 2018-04-25 22:48:48 -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
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
Em Barry
a2be87b85a Convert succubus (#311)
Convert succubus to new API along with (un)related fixes.
2018-01-10 07:51:45 -07: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
skizzerz
33cdeb2380 Only make retribution kill wolves who actually did the kill 2017-12-16 21:41:55 -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
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
skizzerz
35439209e0 Update wolflist event 2017-09-18 16:50:35 -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
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
07f14689c3 Properly display player list to wolves 2017-08-30 14:41:25 -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
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
5fff9d2ce8 Update the begin_day event 2017-08-29 19:30:27 -04:00
jacob1
9c0f96decc fix issue where night wouldn't end if wolves were diseased 2017-08-27 00:17:22 -04:00
skizzerz
ca628dfe2e Don't time out night if all wolves are silenced 2017-08-22 17:10:26 -05:00
skizzerz
c47373dd3d Fix villagergame delay not working 2017-08-18 19:48:11 -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
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
8a8a79627f Overhaul how templates work
Templates are still applied on game start according to
var.TEMPLATE_RESTRICTIONS, but now any arbitrary role can be applied as
a template during gameplay without breaking things horribly.

Speaking of breaking things horribly, things are probably broken
horribly due to this. It was lightly tested, but there's a lot of
fundamental stuff that changed.
2017-03-31 12:45:53 -05:00
skizzerz
f096814fec Add additional aliases
mm = matchmaker, ms = mad scientist, vg = vengeful ghost

Additionally, allow all special keys to be queried via pstats in an
extensible manner (used for vg activated and vg driven off)
2017-03-28 12:13:59 -05:00
Emanuel Barry
5d03ed414b Convert dullahan to use the new API (#292)
* Convert dullahan to use the new API

* Address small nitpicks about dullahan

* Totally unimportant commit, please do not pay attention at all
2017-03-28 09:39:51 -07:00
skizzerz
750aa757e3 Move more cub stuff out of wolfgame.py 2017-02-28 09:32:31 -06:00
skizzerz
dd76f79603 Backend QoL adjustments for cub
Eliminate stupid get_final_role event and instead simply don't add cubs
to var.FINAL_ROLES when they grow up into wolf. That var is only ever
used for end-game stats readouts, so there is no mechanical impact in
omitting adding something there.

Add new event to experimental stats to allow roles like cub and clone to
reflect role swaps when players die. Cubs growing up now shows up in
experimental stats.
2017-02-08 10:40:18 -06:00
Ryan Schmidt
69fa7d377f Split succubus (#284)
* Split + buff succubus

When all succubi die, all entranced people now die along with them. This
should prevent an entranced person from ratting out the succubus early
on so that they go back to their team, as they lose now even if succubus
dies. One exception is if EVERY succubus idles out, then everyone that
is entranced is freed of entrancement, as it isn't their fault that they
didn't protect their friends in that case.

Dullahans now have succubi entirely removed from their list as the
likelihood they get unentranced is low, and it's easier to implement
this way.

Ensure that entranced people can vote along with ANY succubus, even if
that vote isn't the one that succeeded. Before there were cases where
they could vote along with succubus but still end up dying (particularly
in respect to a vote passing when a succubus abstained).

Clear up some message wording with regards to succubi.

Cleaned up chk_win_conditions and eliminated chk_traitor, so they make
much more sense now.

Also fixed minor issues, such as end-game saying "same number" of wolves
even if there are more wolves than villagers, hunter/vigilante dying
during night sometimes not clearing variables correctly (thus causing
premature night end) and some various stupidity going on with some old
code I wrote that doesn't have any visible effects.

* Combine all players into the same succubus death message

* Fix stylistic issues and succubus idling not working
2017-01-27 14:08:41 -05:00
skizzerz
740d14ef72 Experimental stats: intelligently determine if traitor could have died
If it is impossible for other (non-wolf) roles to have killed at night,
we do not deduct from the traitor count. This logic isn't perfect yet,
but should cover the majority of cases.
2017-01-16 16:38:51 -06:00
skizzerz
11d626ab25 Revert old_api cmd change
Causing way too many bugs, need to use a more sane method of breaking
the cmd API, and only do so when it's actually ready to go. My
personal preference is to make the new API use @command instead of @cmd.

This reverts commits c90d35e6c0 and 5f5966a8b4.
2016-11-20 21:33:36 -06:00
Emanuel Barry
5f5966a8b4 Add a transition method for the old->new interface (#272)
* Add a transition method for the old->new interface

* Modify direct calls to cmd to explicitly use the old API
2016-11-19 17:47:54 +01:00
jacob1
cd118dbabe allow werecrow to both observe and kill at the same time 2016-11-07 20:52:58 -05:00
jacob1
1d664fae6b fix error when doing 'kill and', 'kill and 7' will try killing 'and' and '7' 2016-10-25 08:27:28 -04:00
jacob1
9c041e253c fix "you are a cursedtraitor"
also add tags support to all the other wolf roles in case we do that sometime
2016-10-15 22:16:35 -04:00
skizzerz
bfc675e953 Split fallen angel
Also fixes some bugs with using stop_propagation instead of
stop_processing in events (the former does absolutely nothing).

Added a skeleton file to assist with adding new roles, contains the
needed imports on top and vim modeline on the bottom.

Yes, these are all related and need to go in the same commit, stop
throwing things at me.
2016-09-23 20:10:04 -05:00
skizzerz
01dfdc7ac4 Split blessed and cursed villager 2016-09-13 16:35:54 -05:00
skizzerz
0287b05bcd Split shaman
This has a number of related changes in other files due to needing to
re-prioritize events and fixing other bits of code to play more nicely
with split-off totems. Alpha wolf handling was moved after protection
handling because it should've been that way to begin with, and as part
of splitting off protection totem it needed to be split at the same
time. Same with fallen angel changes with how protection now adjusts the
killers lists.
2016-09-02 13:56:26 -05:00
skizzerz
55fa1cbb88 Fix error when wolves attack monster 2016-08-23 12:05:50 -05:00
skizzerz
af2fef5ea9 Fix exchange totem not firing 2016-08-17 17:06:27 -05:00
skizzerz
ebb3bdccfb Split mystic/wolf mystic 2016-08-17 16:52:37 -05:00
skizzerz
3eccf32765 Use a non-discriminatory variable name #WolfSphereLivesMatter 2016-08-16 10:34:16 -05:00
Vgr E. Barry
9333588126 Modify the decorators so that nicks may be used for commands
Also add framework so that custom roles can modify what roles are part
of a pack of tetrahedron wolves more easily, but no other part has been
done to help that.
2016-08-15 23:38:33 -04:00
skizzerz
b5571c82e0 split VG 2016-08-15 18:59:24 -05:00
skizzerz
052a2b2823 fix crow 2016-08-10 23:17:27 -05:00