147 Commits

Author SHA1 Message Date
Ryan Schmidt
b86e52de25
Merge pull request #319 from lykoss/split-assassin
Split and convert assassin
2018-04-25 15:53:19 -07:00
Vgr E. Barry
a1f17b6d6a Make sure only actual role files are imported 2018-04-24 13:25:16 -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
Vgr E. Barry
38721fd59b Convert and split seer, oracle and augur in three files with a shared helper 2018-04-23 15:15:09 -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
Ryan Schmidt
35f3fd67cc
Add investigate as alias for id for investigator 2018-04-17 19:39:53 -07: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
skizzerz
c121c0f08f Mudkip balance fix and bugfix
Fix balance in mudkip, it was skewed too much towards village winning.

Also, if day ended in mudkip and nobody was being voted, it would error.
Let's make that not error.
2018-04-04 17:06:03 -05:00
Vgr E. Barry
a8790b439a Remove the cli argument from chk_win 2018-02-04 17:26:40 -05: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
c9e1845fbb Convert get_reveal_role to use Users 2018-01-10 15:18:41 -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
b677400ce4 General cleanup
- Expand skel.py to be more useful
- Remove circular dependency from utilities.py. It *CANNOT* globally
  import users.
- Remove unused functions from utilities.py and make some others proxy
  through to user-aware functions to ensure functionality stays the
  same.
- Remove duplicate event listener.
- Clarify some comments about stats.
2017-12-29 16:10:32 -06:00
skizzerz
33cdeb2380 Only make retribution kill wolves who actually did the kill 2017-12-16 21:41:55 -06:00
skizzerz
7a66275bcc Fixes for role change 2017-12-13 22:04:08 -06:00
skizzerz
7d0dc29af1 Fix traitor 2017-12-13 20:10:44 -06:00
skizzerz
efe4f538bb Fixes 2017-12-13 16:32:51 -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
19f713de37 @Skizzerz is picky 2017-12-12 11:23:41 -05:00
Vgr E. Barry
ab4913dcb2 Convert vigilante 2017-12-12 11:16:21 -05: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
jacob1
29c3449509 use evt.data["pl"] instead 2017-12-10 20:30:10 -05:00
jacob1
b45610528e fix succubus attempting to kill already dead players 2017-12-10 20:17:39 -05: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
bfc5e6a9dd Convert harlot 2017-12-07 13:31:18 -05: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
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
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
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
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
90320ba6bc Fix issues with del_player conversion 2017-09-25 17:37:56 -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
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