Commit Graph

799 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
d04891346a More things 2017-09-18 16:45:33 -04: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
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
d89534f259 Update !myrole and its event 2017-09-01 10:10:26 -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
0f1d513daa Convert the transition_night_end event 2017-08-30 10:16:02 -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
5fff9d2ce8 Update the begin_day event 2017-08-29 19:30:27 -04: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
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
jacob1
fb889393d7 fix single digit fake nick joining in debug mode (only ranges worked) 2017-08-20 19:59:30 -04:00
skizzerz
9d4a5172b4 Don't make CS lose if they die in vilgame 2017-08-19 23:07:56 -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
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
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
nyuszika7h
a8198327d0 Fix missing space before death messages in join phase 2017-05-15 21:42:22 +02:00
jacob1
16d541b1f1 fix missing space in quit message 2017-04-19 21:49:57 -04:00
Vgr E. Barry
08eaa34130 Update !fleave 2017-04-16 23:47:28 -04:00
skizzerz
e0ea1f00e4 derp^2 2017-04-01 14:53:17 -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
Vgr E. Barry
faa3925e7d De-uglify message 2017-03-25 01:14:31 -04:00
Vgr E. Barry
b08d802df7 Add a new swap_player event 2017-03-24 17:05:37 -04:00
Ryan Schmidt
1cc38e54b2 Make potato an alias for villager (#290)
Also allow prefixing commands by their role name to remove ambiguity
should a person be multiple roles. For example, "seer see foo" and
"augur see foo" will now work if a person is both seer and augur
(whereas normal see foo would be ambiguous). A player will be directed
to use the unambiguous prefixed version if we detect that a role command
will fire multiple times for them (note: coming soon).

For sanity reasons, these role prefixes are implemented as exclusive
commands, meaning no other commands or command aliases may use the same
name. Clone needs to be special-cased in this regard, as clone is both a
role name and a command name.
2017-03-24 16:31:08 -04:00
Vgr E. Barry
0df627fcca Properly fix automatic toggling of modes 2017-03-23 11:56:52 -04:00
skizzerz
63efb85bbb Split harlot 2017-03-08 20:13:45 -06:00
Vgr E. Barry
e74079dae1 Fix goat and fgoat to use proper case
It would be nice to have a users.complete_one_match function (do we even need the current API?)
2017-03-06 16:22:54 -05:00
skizzerz
54de373242 Fix !lastgame
It simply didn't work before now for a while (as in, you could still
join/start). Also make it function during join phase, because having
weird restrictions on which it does/doesn't disable the commands is
weird. The admin can still !fjoin/!fstart as needed if they do want to
run one more game after executing this command during join phase.
2017-03-02 14:18:14 -06:00
skizzerz
8c8823ebfe Don't remove users if they're playing
Instead mark them as a ghost, and remove them at end of game should they
still be gone.
2017-02-28 21:17:51 -06:00
skizzerz
750aa757e3 Move more cub stuff out of wolfgame.py 2017-02-28 09:32:31 -06:00
jacob1
bb8ae99310 fix pingif for hosts when DISABLE_ACCOUNTS is true on networks that support accounts 2017-02-24 23:52:35 -05:00
jacob1
6f5f09b76e don't check account in can_run_restricted_cmd when DISABLE_ACCOUNTS is True 2017-02-24 23:50:51 -05:00
jacob1
c615a62f9d don't attempt to set modes when fake users join in debug mode 2017-02-23 23:51:16 -05:00
Fudster
c64526b248 Fix message about invalid game mode when joining (#288)
Using `!join` followed by something should not result in an error message. If a gamemode can be voted for, do it, otherwise silently do nothing.
2017-02-22 12:34:46 -05:00
Fudster
b631f75499 Goat revamp (#286) 2017-02-08 16:16:58 -07: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
Vgr E. Barry
0a18f8e70e Disallow apples to be in the same bag as oranges
Pears are fine, though
2017-02-07 20:12:16 -05:00
Vgr E. Barry
70b42dceb6 Fix not being able to join fake nicks
Also fix unrelated issue with fake users
2017-02-07 19:45:21 -05:00
Fudster
8a9d4412d3 Tweak fjoin (#285)
Change the behaviour of fjoin in both normal and debug modes:

- Only joins fake nicks in debug mode;
- Only joins one person in normal mode, multiple in debug mode;
- Autocomplete nicks in both normal and debug modes.
2017-02-06 22:36:33 -05:00
Vgr E. Barry
32409b8f76 Update fjoin to use the new API everywhere 2017-02-06 13:15:49 -05:00
jacob1
749310e564 fix some !roles messages 2017-02-05 12:48:18 -05:00
jacob1
0ec0c5d73d fix a few errors and broken messages, random cleanup 2017-02-05 12:39:52 -05:00
Fudster
0a6c6200ab Fix for #176 improve invalid role errors 2017-02-05 12:39:52 -05:00
jacob1
4c67a5b438 fix user references staying around due to !pingif pinger
also remove ugly hack since we don't need it anymore
2017-02-02 22:08:04 -05: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
Vgr E. Barry
7bc13937e4 Don't say that someone has already joined if they're not logged in 2017-01-25 21:27:24 -05:00
jacob1
a928d729a6 fix incoming deadchat messages using your nick instead of the person who sent it 2017-01-21 20:16:36 -05:00
jacob1
c67551bd46 fix error when dead player changes nick (from last commit) 2017-01-21 20:10:37 -05:00
jacob1
62f716093a fix !swap and nick changing errors
var.ALL_PLAYERS update (for !swap) needs to happen before checking if the new user is in var.ALL_PLAYERS
pl is inaccurate during nick changes because the user's nick in var.ALL_PLAYERS is updated automatically but in var.ROLES isn't, therefore a user that changes nicks would never be returned in list_players()
one instance of prefix incorrectly changed to user.nick
2017-01-21 18:29:11 -05:00
Vgr E. Barry
058acd40d7 Fix wolfchat relaying and player renaming 2017-01-21 14:26:21 -05:00