Commit Graph

759 Commits

Author SHA1 Message Date
Janik Kleinhoff
45e59ea647 fquit: say "No more players remaining" at 0 players 2014-12-08 12:36:58 +00:00
Vgr E.Barry
f43dba4a3f Fix some specific PM commands not working. 2014-12-07 16:33:39 -05:00
Vgr E.Barry
a7fe73c355 Allow admins to invite the bot to any channel. 2014-12-07 11:01:06 -05:00
nyuszika7h
f5b9c3e612 Small refactor to log_cmd 2014-12-07 16:50:18 +01:00
nyuszika7h
7f668cbb2c Add a common logging function for fsend et al
This is just a basic logging function designed for logging (admin)
command calls. We'll have a better logging system eventually (ref:
lykoss/lykos#72).
2014-12-07 16:39:25 +01:00
jacob1
8ecef11482 fixes to lots of bugs with the bot being in an alternate channel 2014-12-06 22:33:42 -05:00
Ryan Schmidt
45f640e9c9 Fix impatient message showing up in places it shouldn't 2014-12-06 19:01:22 -06:00
Vgr E.Barry
87f74d3265 Adds ability for the bot to be in multiple channels. 2014-12-06 17:39:21 -05:00
Vgr E.Barry
3192052add Allow admins and owners tracking via account. 2014-12-06 15:43:34 -05:00
Vgr E.Barry
5cc9715eb1 Move argument parsing out of botconfig. 2014-12-06 15:03:03 -05:00
jacob1
ab1edec0cb Merge pull request #86 from Vgr255/master
Add ability to carry settings from botconfig to var.
2014-12-06 14:57:51 -05:00
Vgr E.Barry
859bc842da Add ability to carry settings from botconfig to var. 2014-12-06 14:31:49 -05:00
jacob1
1519ba3765 add var.GRAVEYARD_LOCK check in chk_win, add more checks for game ending in those 2014-12-06 14:03:31 -05:00
Ryan Schmidt
6aeb149241 Merge pull request #85 from skizzerz/fiximpatience
Impatience and pacifism totem improvements
2014-12-05 09:00:16 -06:00
nyuszika7h
a69a070c27 fpull: Show diffstat
It isn't shown by default with rebase, but it's pretty useful.
2014-12-05 11:33:48 +01:00
jacob1
fc53b905be Merge pull request #83 from lykoss/fix-cub-error
Fix KeyError in chk_win
2014-12-05 00:10:36 -05:00
jacob1
c9c5317ecf Merge pull request #82 from lykoss/refactor-fsay-fact
Refactor fsay and fact
2014-12-05 00:10:03 -05:00
skizzerz
5819976a1f Pacifism/Impatience totem improvements
- A message is now displayed whenever a pacifism or impatience totem is
  triggered, e.g. "X impatiently votes for Y." or "X meekly votes to not
  lynch anyone today." These are played immediately before the vote
  passes, so there is no opportunity for people to abandon course.
- Reinstate people with impatience totems being the ones that die to
  desperation totems. Due to the above message playing, it is now more
  obvious why they died, and I believe that doing it this way adds to
  gameplay ("I have a random totem and so does the person being voted. I
  should try to jump in early just in case I have impatience so I don't
  die."). If someone with impatience votes normally, their actual vote
  counts for determing vote order (so they aren't last unless they voted
  last). If there are multiple people with impatience that didn't vote,
  then the order in which they vote is random.
2014-12-04 22:45:11 -06:00
skizzerz
7b2ee4ecd5 Fix impatience totem interaction with abstaining:
- Moving code to chk_decision means that doing an actual !abstain
will still make you show up in !votes (unlike now where it does not)
- impatience and pacifism should balance each other out if they
are present in equal numbers, preventing an !abstain from working
if you have impatience does not yield that behavior
2014-12-04 21:57:30 -06:00
Vgr E.Barry
4ac967be1d Fix hunter passing ending night early. 2014-12-04 20:38:08 -05:00
nyuszika7h
f646844aad Fix KeyError in chk_win
This fixes the error with wolf cub that has been appearing for a while
now, and also prevents similar errors from happening with monster and
traitor in the same function.
2014-12-04 11:41:09 +01:00
nyuszika7h
0ab6ee52e6 Refactor fsay and fact 2014-12-04 11:21:03 +01:00
ChiyoOsaka
6e372566c6 Merge pull request #80 from lykoss/new-rolesets
<+jacob1> !moo , is someone going to press the Merge pull request button on https://github.com/lykoss/lykos/pull/80 eventually or do I have to :P

Rolesets are picked randomly + 4 new rolesets
2014-12-02 00:22:50 +00:00
jacob1
47f3b0e4d3 fix fool wins with lover setting, adjust lots of numbers 2014-11-30 17:27:27 -05:00
Janik Kleinhoff
2a07f2e5ec fstart: don't require the admin to be joined 2014-11-29 22:37:33 +00:00
jacob1
9e83ac941c increase likelihood of default-like rolesets, make rapid/drunkfire and amnesia only picked from a majority of the votes 2014-11-29 15:03:50 -05:00
jacob1
193ead22aa change "roleset" to "game mode" in the code / messages 2014-11-29 13:39:55 -05:00
jacob1
788707ffb1 partial matches work with !game/!fgame, also using !fgame on an invalid roleset will no longer reset it to default 2014-11-28 22:41:03 -05:00
skizzerz
3742dcea2a Various Bugfixes/QOL Improvements:
- Hag can no longer hex the same target two nights in a row
- Hag target is un-hexed if hag gets exchanged with someone
- GA now properly guards people whose names contain uppercase letters
- Make var.START_WITH_DAY mostly work, doesn't crash the bot anymore
  but still needs improvements, namely messaging everyone what role
  they are.
2014-11-28 21:26:12 -06:00
jacob1
0944b4a919 delete vote from var.ROLESET_VOTES when a player quits 2014-11-28 16:25:42 -05:00
jacob1
9da979c6e0 !game without args also prints valid rolesets 2014-11-28 16:25:42 -05:00
jacob1
9f7dbaa7c7 don't log loss in player stats when game is fstopped 2014-11-28 16:25:42 -05:00
jacob1
34ad806341 add player to var.DCED_PLAYERS when they quits (fixes not logging a loss in stats) 2014-11-28 16:24:56 -05:00
jacob1
d31a75c43f log stats for templates and "lover" 2014-11-28 16:24:55 -05:00
jacob1
059fe556ec gamestats are stored per roleset 2014-11-28 16:24:55 -05:00
jacob1
15c8335349 changes / improvements to !game
if > 2/5 of the players vote for a roleset it's automatically picked
picked roleset is printed out on the welcome message
!help game prints possible rolesets, also more bold
2014-11-28 16:24:55 -05:00
jacob1
d174fc4d89 rolesets are randomly picked with varying frequencies / add a !game command to make certain rolesets more likely
Not done, even if this is final it still needs more good rolesets to choose from
2014-11-28 16:23:56 -05:00
skizzerz
4cdc065d2f Security Fix: Don't allow non-admins to fsay/fact to a target other than the channel itself 2014-11-27 19:08:47 -06:00
skizzerz
eb8ffb9f68 Make GA guard also go away in the event of exchange totem firing 2014-11-26 23:45:13 -06:00
jacob1
87d7b0d375 impatience totem holder is added to the start of the voters list
prevents them from being killed by desperation totem when they didn't actually vote
2014-11-27 00:07:41 -05:00
jacob1
addc7c9e96 don't run the reaper in debug mode (fixes errors with fake nicks) 2014-11-26 23:43:34 -05:00
jacob1
8ca611a43e clone gets a random target if they forget to clone, also don't pm them an empty wolf list 2014-11-26 23:32:53 -05:00
jacob1
7c39906852 fix guardian angel being able to guard the same person twice in a row sometimes 2014-11-26 21:50:15 -06:00
nyuszika7h
19809f4d70 fpull: Refactor code 2014-11-26 14:23:55 +01:00
nyuszika7h
d9b89a5f95 fpull: Use rebase 2014-11-26 14:23:55 +01:00
jacob1
adca55fce5 Add back !fact aliases: !fdo and !fme 2014-11-25 13:31:52 -05:00
nyuszika7h
8ac4f2faad Revert "!plsnofuckup !plsnoexplode"
This reverts commit e424520eb5.
2014-11-25 07:42:41 +01:00
ChiyoOsaka
e424520eb5 !plsnofuckup !plsnoexplode
Adding 'faction' and 'fdo' as aliases to 'fact'.

!plsnoexplode
2014-11-25 02:52:35 +00:00
nyuszika7h
a03001ecf6 Make !away one-way 2014-11-22 23:34:07 +01:00
Janik Kleinhoff
3bb280a6b2 Re-add !ops alias for !admins for now 2014-11-19 19:13:40 +00:00
nyuszika7h
4e31c7d621 Remove !ops alias for !admins
There's no reasonable way to disable commands yet, and !ops is now
handled by AntiSpamMeta, so this is the best we can do for now.
2014-11-18 20:29:33 +01:00
nyuszika7h
868ef5c74e Fix typo in werecrow message 2014-11-17 22:23:59 +01:00
Janik Kleinhoff
ecc17933d9 Fix missing period 2014-11-17 11:06:14 +00:00
jacob1
04c4b46a3e Revert "fix wolf cub / traitor turning in chk_win even when end_game is false, + some other random error" 3c53ae19e8 2014-11-16 22:05:11 -05:00
nyuszika7h
54d45ba02c Revert "fstasis: Improve non-negative integer message"
This reverts commit 6468cf42b7.

The new message is confusing, as it doesn't exclude floating point
numbers, which are invalid here.
2014-11-16 10:37:17 +01:00
nyuszika7h
6468cf42b7 fstasis: Improve non-negative integer message
Suggested by @ecksdee.
2014-11-16 10:33:56 +01:00
nyuszika7h
93b1c47ee2 Log messages sent to fake players instead of sending them 2014-11-14 17:19:50 +01:00
nyuszika7h
8fe1cf9ef5 Fix commit dc156da
This reverts one of the changes made by that commit. Not PMing fake
nicks can make debugging impossible without real players.
2014-11-14 11:37:55 +01:00
jacob1
3c53ae19e8 fix wolf cub / traitor turning in chk_win even when end_game is false, + some other random error 2014-11-14 00:28:48 -05:00
jacob1
8c4281de94 !roles can print out roles from other game modes 2014-11-10 22:51:39 -05:00
jacob1
c514296a80 save !fdeny / !fallow in database, also allow commands to be added / removed individually 2014-11-03 13:37:24 -05:00
nyuszika7h
aee5bce1b0 allow_deny: Fix stale references to 'allow' 2014-11-03 18:36:28 +01:00
nyuszika7h
bb6e3e9dfe fallow, fdeny: Add temporary warning about persistence
Or rather, the lack of it.
2014-11-03 14:25:26 +01:00
nyuszika7h
06ae51d29f allow_deny: Improve assertion code 2014-11-03 14:15:30 +01:00
nyuszika7h
5e9f1031ae Fix fallow/fdeny 2014-11-03 14:11:11 +01:00
skizzerz
71fd4acb8a Fix how !stats interacts with amensiac 2014-11-02 21:36:39 -06:00
jacob1
54af1fbd2d fix !fallow message 2014-11-02 16:27:41 -05:00
jacob1
815b38a7e9 New commands: !fdeny and !fallow 2014-11-02 15:58:14 -05:00
nyuszika7h
59c589f3e1 !fwait: Code cleanup 2014-10-26 10:10:02 +01:00
Benjamin Donald-Wilson
897095c4ff Fix small typo in GA message 2014-10-26 14:41:49 +11:00
Janik Kleinhoff
78778b9b16 fix typo 2014-10-26 02:22:58 +01:00
Janik Kleinhoff
1ec60fe99b !fwait: improve message a little 2014-10-26 02:19:39 +01:00
Janik Kleinhoff
5965848bcf !fwait: Allow arbitrary wait durations
We indeed don't have all day, but people with access to fwait should
know as much already anyway. Additionally, this interfered with undoing
a long fwait; !fwait 9999 was possible, !fwait -9999 was not.
2014-10-26 02:10:52 +01:00
Janik Kleinhoff
472d71811a myrole: Only tell shamans their totem at night 2014-09-28 08:10:51 +02:00
Janik Kleinhoff
f3d7e569ae frole: Adjust behaviour for templates; allow specifying totem
The syntax to give 'foo' the additional 'bar' template is now
!frole foo +bar
or, in the case of templates like gunner that can take an argument,
!frole foo +gunner = 9001
Removing a template uses - instead:
!frole foo -bar

The new "role = arg" syntax also applies for shamans and crazed shamans:
!frole foo shaman = impatience
A random totem is selected as usual, rather than the bot crashing, if no
argument is given.
2014-09-28 08:05:21 +02:00
Janik Kleinhoff
7fa8e459f7 Fix "at some poisonous berries" typo 2014-09-28 04:37:40 +02:00
Janik Kleinhoff
c1c742db23 Avoid printing role when it's "person", without a syntax error 2014-09-28 01:20:00 +02:00
nyuszika7h
ffa7f7c58c leave & fleave: Don't say role if it's "person"
And other minor improvements.
2014-09-28 00:55:36 +02:00
nyuszika7h
11b508d40b fstasis: Add missing return 2014-09-27 12:49:03 +02:00
nyuszika7h
2a306fcc7c fstasis: Improve messages 2014-09-27 12:46:07 +02:00
jacob1
f1f166f052 fix fstasis not handling hostmasks with capital letters properly 2014-09-27 00:53:56 -04:00
Romtam
b7fac7be4c Added missing dot 2014-09-26 19:35:43 +07:00
Janik Kleinhoff
92a8c5bd60 Make fjoin message for fake nicks consistent with others 2014-09-25 23:30:58 +02:00
jacob1
dc156da64c don't display the join message / pm fake nicks when in debug mode 2014-09-25 16:37:05 -04:00
jacob1
82b53f92d9 village can't abstain on day one 2014-09-25 16:00:06 -04:00
nyuszika7h
6dc4f4859f Fix the bot telling you you haven't voted after retracting abstain
Reported by @Vgr255 on IRC.
2014-09-20 11:53:11 +02:00
Janik Kleinhoff
b2e0a6b1a3 Add quieting code again, but disabled by default
This reverts commit 5e4bb1ed5d and puts
the relevant quiet-related code in a conditional instead, depending on a
newly-added var.QUIET_DEAD_PLAYERS setting.
2014-09-18 16:12:17 +02:00
nyuszika7h
5e4bb1ed5d Remove quieting
Per discussion in ##werewolf-ops, nick changes are easier to notice than
PM logs which could be faked, and we can ban repeat offenders if needed
anyway.
2014-09-18 15:48:43 +02:00
Janik Kleinhoff
0669799f1e is_fake_nick: only all-numeric nicks are fake
The previous check had quite a few issues, e.g. on UID nicks.
2014-09-17 22:00:24 +02:00
Janik Kleinhoff
62b9b1627d Fix crash with idle warnings and nick changes
Sorry for breaking it. :s
2014-09-17 21:57:39 +02:00
Janik Kleinhoff
bae19598cb !myrole: remind shamans of their totem
This is especially useful if the shaman did not see the original message
informing them of their role (e.g. due to connection issues).
2014-09-17 20:48:04 +02:00
Janik Kleinhoff
4de6899209 !myrole: remind lovers of their love 2014-09-17 20:31:23 +02:00
xnrand
60c0a136f5 bold in wolf gun death messages 2014-09-15 01:03:55 +02:00
Janik Kleinhoff
b8c2f6d841 Warn idlers a second time in PM 2014-09-12 14:59:03 +02:00
skizzerz
8d1a527724 Fix autolose not happening if someone quits 2014-09-09 20:47:11 -05:00
skizzerz
3a6280ad8c Add settings to disable abstain and also limit it
By default, abstain is enabled and limited to being used once per
game. Both of these can be changed in settings.py.
2014-09-08 22:38:57 -05:00
nyuszika7h
eeb812c40e !start: Fix pluralization 2014-09-07 11:53:47 +02:00
nyuszika7h
a2201c5061 Fix mad scientist message 2014-09-06 22:37:04 +02:00
jacob1
e84e786d39 fix players not being removed from var.KILLS when they die, and revert f8574e1892 2014-09-05 19:44:46 -04:00
jacob1
250e7d7462 fix error when exchange totem happens and wolves are angry 2014-09-05 19:43:26 -04:00
jacob1
457372fa3e fix lykos devoicing people that weren't in the game sometimes 2014-09-05 19:42:35 -04:00
jacob1
b43140d362 fix error when using !retract after !abstain 2014-09-05 19:41:18 -04:00
Janik Kleinhoff
6af09159a2 Allow !fjoin to bypass stasis
Allow admins to fjoin people who are currently stasised without removing
their stasis entirely. Stasis is unaffected by this on its own, although
note that a game being played will still normally reduce the stasis
penalty for now, even if the stasised player actually played in the game
due to being fjoined.
2014-09-04 13:08:21 +02:00
Janik Kleinhoff
41b8740eb1 Make stasis persist through restarts by saving it in the DB
Fixes lykoss/lykos#28.
2014-09-04 01:45:54 +02:00
Janik Kleinhoff
9b9f35487b Put !fquit message on a single line 2014-09-04 01:08:09 +02:00
Janik Kleinhoff
59c9d5df14 Don't reveal traitor when they're !fquit
This is consistent with them otherwise leaving the game by abnormal
means (idling out, parting, quitting, getting kicked).
2014-09-04 01:08:09 +02:00
jacob1
1933247a56 fix people not getting devoiced when changing to guest/away nick 2014-09-03 12:33:28 -04:00
jacob1
9bed1186c0 changing to certain nicks in game counts as quitting (fixes some /ns regain / idler issues) 2014-09-03 11:55:21 -04:00
jacob1
8293dd3850 kill all the idlers at once so they all get stasis 2014-09-03 11:55:21 -04:00
nyuszika7h
f8574e1892 Fix error when wolves' target dies before sunrise 2014-09-03 16:52:08 +02:00
nyuszika7h
ebc806fd25 Make !retract use the same message for !nolynch
The reasoning behind this is that retracting your vote not to lynch does
not necessarily mean that you will indeed lynch someone.

Also, retracting a vote not to lynch will now reset the !votes rate
limit, just like retracting a normal vote.
2014-09-03 16:36:48 +02:00
nyuszika7h
a205e7b877 Fix "cursed wolf" after cursed traitor transforms 2014-08-31 00:18:27 +02:00
Janik Kleinhoff
2fdb1d7dd0 Always display new player count when people leave during join phase.
Previously, leaving by quitting, parting or getting kicked would not
display the new player count. Fixes lykoss/lykos#61.
2014-08-30 04:51:32 +02:00
jacob1
5690e91b41 fix bug where wolfchat would ignore !notice and use !simple instead 2014-08-29 20:05:31 -04:00
Janik Kleinhoff
ff8912e8a3 Revert "Avoid having the village 'mourn' a wolfteam or monster death."
As it turns out, this has further implications that ought to be resolved
before making this part of the bot.
2014-08-29 20:49:39 +02:00
Janik Kleinhoff
dff9ec1e52 Avoid having the village 'mourn' a wolfteam or monster death. 2014-08-29 06:58:10 +02:00
Janik Kleinhoff
818b58f569 *really* avoid people getting around !flastgame with !j 2014-08-29 05:49:32 +02:00
Janik Kleinhoff
eb1387b7c2 Add a !notice toggle separate from !simple.
!simple used to determine whether you were given simple instructions
*and* whether the bot NOTICEs you; now, it only controls the former and
!notice controls the latter.
2014-08-29 04:12:35 +02:00
Janik Kleinhoff
0bb5f3b75d Fix/improve various messages a little bit. 2014-08-29 02:10:21 +02:00
Janik Kleinhoff
9c87bce157 Make command help more consistent; make sure commands are documented. 2014-08-29 00:51:53 +02:00
Yizhe Shen
7376fe54ea Fix to allow player_stats to be case-insensitive for nicks. 2014-08-26 22:04:48 -04:00
nyuszika7h
b251a34e31 Make on_give_me_ops independent from endofwho 2014-08-27 00:23:52 +02:00
nyuszika7h
37c0c075fa Try to gain op when bot thinks it isn't opped 2014-08-26 23:58:29 +02:00
skizzerz
3146baa983 Ensure we have enough params for fsay and fact 2014-08-24 22:03:48 -05:00
skizzerz
b466c47026 Fix some \!nolynch related issues with awkward messages, inconsistent functionality, and improper interaction with vote-altering totems. 2014-08-24 21:50:28 -05:00
skizzerz
06f51a3731 Fix case where people were not being marked as not-dced if they joined as a different nick and then /nicked to return to village. 2014-08-24 12:35:29 -05:00
nyuszika7h
c5ff638056 Add !fsay and !fact 2014-08-24 18:14:32 +02:00
nyuszika7h
883599155a Merge pull request #58 from skizzerz/master
Various bugfixes and new mad scientist option
2014-08-22 21:13:14 +02:00
nyuszika7h
c666d8967e !fghost: remove potentially confusing message 2014-08-22 15:43:34 +02:00
skizzerz
b82cc92997 Add option for mad scientist to skip over dead players, based on how many players joined the game 2014-08-22 01:03:50 -05:00
skizzerz
d69cd50f8d Allow hunter to change their kill at night using !kill without needing to !retract first 2014-08-22 01:03:50 -05:00
skizzerz
68bfe2b65d Do not display duplicate death messages, a night kill overrides any chained kills (lovers, scientists, assassins, etc.) 2014-08-22 01:03:50 -05:00
jacob1
f2a92402e9 fix grammar mistake in headshot message (again) 2014-08-21 01:32:10 -04:00
jacob1
bfc6b6f8cf small cleanup / bugfix in !roles 2014-08-20 01:27:19 -04:00
skizzerz
6ee671f903 Fix bug where night would abruptly end if there are no wolves alive to receive gun. 2014-08-19 22:40:26 -05:00
jacob1
d34a65dd98 add missing period for matchmaker message in !simple 2014-08-19 21:58:08 -04:00
jacob1
8fd41d4bf9 fix !roles with argument 2014-08-19 21:54:17 -04:00
jacob1
fc1f110773 !stats orders names in join order 2014-08-19 21:30:55 -04:00
jacob1
e0d3476a2c !roles properly displays roles that drop out, and can show roles for a specific player count 2014-08-19 21:26:04 -04:00
nyuszika7h
390fd937bf Fix indentation 2014-08-17 22:35:29 +02:00
nyuszika7h
552be7f18b Update aliases for !nolynch 2014-08-17 22:25:52 +02:00
Vgr E.Barry
edc9ec1ed9 Added nolynch/abstain command
Features:
- Added var.NO_LYNCH
- Tweaked hurry_up to count not-lynching players
- Makes day end without a lynch if enough players abstain
- Consider pacifists and not-lynching as equal for lynching calculation
(in chk_decision and hurry_up)
- Add "x players have refrained from voting" in !votes
- Added actual nolynch/abstain command, which is a toggle to no_lynch or
not
- Make !voting automatically remove the player from the no-lynchers
- Make !retract remove the player from no-lynchers
2014-08-17 22:19:53 +02:00
nyuszika7h
c823689dbd Fix previous commit 2014-08-17 19:12:48 +02:00
nyuszika7h
2e5b087d3b Fix !fgame check for admins/owners 2014-08-17 18:02:31 +02:00
skizzerz
84b2fdc24e Improvements
- Make rapidfire more rapid by reducing timers and adding in time lord
- Correctly credit someone for a win if they die and THEN /part or /quit
  (someone that dies and is /kicked will not get a win, as that usually
  means they cheated or something.)
- Break up long messages (roles, player totals) at intelligent points.
2014-08-12 23:07:02 -05:00
skizzerz
b39ecbace0 Remove left-behind debug message and fix bug if someone changes nicks during night causing night to not end properly 2014-08-12 17:50:37 -05:00
skizzerz
dd46ea26a9 Merge branch 'master' of https://github.com/lykoss/lykos 2014-08-11 21:32:22 -05:00
nyuszika7h
1e2de1de9a Fix !fgoat 2014-08-11 10:35:49 +02:00
skizzerz
d8dbdabdd1 Ensure idlers never get credited for win 2014-08-10 19:53:49 -05:00
skizzerz
4bc9be8454 Merge branch 'master' of https://github.com/lykoss/lykos
Conflicts:
	modules/wolfgame.py
2014-08-10 19:12:19 -05:00
nyuszika7h
9216ef0c45 Add missing dot 2014-08-11 00:08:08 +02:00
nyuszika7h
11e411a052 Fix previous commit 2014-08-11 00:07:33 +02:00
nyuszika7h
df48af8a9d Improve !fgoat 2014-08-11 00:06:39 +02:00
nyuszika7h
885873701f Merge pull request #48 from brrr2/fix
Update for showing votes, time and roles.
2014-08-10 23:37:23 +02:00
skizzerz
bd2451b3b5 Redo default roles and fix bug where day timing out didn't correctly apply vote altering totems 2014-08-10 14:14:27 -05:00
skizzerz
cd43225b53 Visiting harlots now die if given death totem, and harlots that visit a visiting harlot that was given death totem and also targeted by wolves now dies as well. Closes #71 2014-08-10 12:05:42 -05:00
Yizhe Shen
5700ec7d01 Updated output behaviour for in-game commands available in PM.
- Updated behaviour for listroles(), show_votes(), timeleft()
- Uses !simple settings when those commands are given in PM
- Uses notice if channel is +z and a game is in progress
2014-08-09 15:00:05 -04:00
skizzerz
c6359b3908 Make mad scientist always trigger on death 2014-08-09 00:26:51 -05:00
skizzerz
4e7fbdada2 Merge branch 'master' of https://github.com/lykoss/lykos
Conflicts:
	modules/wolfgame.py
2014-08-07 22:54:09 -05:00
skizzerz
a9f3125a9c remove bit of logging code that was erroring out night if we had 2 wolf kills. We're already logging dead people later on anyway so this is 100% unnecessary 2014-08-07 22:53:02 -05:00
skizzerz
83fb02666d Fix clone cloning amnesiac 2014-08-06 19:46:36 -05:00
Vgr E.Barry
cdf96cfc2b Added !fgoat command for admins. Allows unlimited amount of goats. 2014-08-06 13:42:33 -04:00
Skizzerz
5a5c8fbb50 Fix impatience totem allowing votes while dead 2014-08-05 23:22:01 -05:00
Skizzerz
8b49e1c0c8 Finish retribution totem and remove unused config var 2014-08-05 23:19:54 -05:00
Skizzerz
277c99db41 Fix exchange totem and wolf cub and other improvements 2014-08-05 21:34:46 -05:00
skizzerz
9a697e13c2 Fix !flastgame to prevent people from using !j to get around it 2014-08-05 11:48:45 -05:00
skizzerz
9e4d8d7017 Merge remote-tracking branch 'upstream/master'
Conflicts:
	modules/wolfgame.py
2014-08-05 11:16:52 -05:00
nyuszika7h
a4b7c02450 Merge branch 'master' of https://github.com/lykoss/lykos 2014-08-05 14:28:53 +02:00
nyuszika7h
1a80bc1027 Allow admins to use !fgame without joining 2014-08-05 14:28:40 +02:00
Vgr E.Barry
191a910098 Fix issue where bot would spam services
This very simple fix probably seems redundant or even entirely
pointless, but it actually solves a big design flaw. It does not show
much for freenode, but for other networks (e.g. Esper), where I tweaked
my bot to use ns_ghost instead, it keeps trying to kill off an
(unregistered) nick, without having a password. This effectively causes
spam to the services, and results in an automatic ban.
2014-08-05 02:40:52 -04:00
skizzerz
1d9b4f54e6 Various fixes plus code exchange totem. 2014-08-05 00:54:01 -05:00
skizzerz
f4ef8ed55b impatience totem no longer affects self-vote 2014-08-04 21:02:34 -05:00
skizzerz
bfc182dc28 default to death totem in case odds don't add to 1, and list name of totem in error message if we don't know what to do with it' 2014-08-04 20:58:27 -05:00
nyuszika7h
85a342f9c5 Fix typo in !votes
Closes #44.
2014-08-04 10:45:17 +02:00
Skizzerz
3da561a408 Fix pestilence totem and wolf cub dying during nighttime not triggering angry wolves, and don't show winners if game is fstopped 2014-08-04 01:54:21 -05:00
Skizzerz
79a72aa33e Finish up most new totems except for exchange and retribution, completely untested code so probably breaks horribly 2014-08-04 01:22:29 -05:00
Skizzerz
21ef130f21 bugfixes 2014-08-04 00:36:09 -05:00
Skizzerz
2d331cdcd7 Fix fool being lynched and begin shaman bonanza, most of the totems do nothing atm but it *should* theoretically work 2014-08-04 00:23:29 -05:00
Skizzerz
b47ab14632 Fix grammar on lynch messages 2014-08-03 21:26:37 -05:00
Skizzerz
153e800bef fix amnesiac winning and amnesiacs turning into templates 2014-08-03 21:15:19 -05:00
Skizzerz
f9ece65d73 fix amnesiac gunner 2014-08-03 21:06:38 -05:00
Skizzerz
953d0eb0d8 Fix !stats issue if amnesiac dies 2014-08-03 20:16:29 -05:00
Skizzerz
4e31cc0a0f Gigantic update
1. Rewrite amnesiac: Instead of removing an existing role from the game for the first 2 days,
they now become a brand new random role. Seers, oracles, sorcerers, detectives, and revealing
totems will see through their amnesia so they can learn their actual role. Amnesiacs are neutral
until they clear up, and thus if the game ends while they are still amnesiac, they will win
alongside the default role (e.g. village if default is villagers, or wolves if default is cultists).

2. Make vengeful ghost take vengeance based on the role that killed them instead of making it based
on time of day. If they suicide due to being someone's lover, they will take vengeance on the team
that killed their lover. If they are gunner and their gun explodes, they take vengeance on the
village due to their shoddy gun construction processes.

3. Make clone always trigger even if their target idles out or !quits.

4. Make a harlot visiting victim, harlot visiting wolf, and bodyguard guarding victim able to
shoot wolves if they are also gunner, and for wolves to pick up their gun. In the event of a wolf
kill plus another non-wolf kill, the wolf kill takes precedence in the event of harlot visiting
victim and bodyguard guarding victim, and the non-wolf kill takes precedence in the event of
harlot visiting wolf (the non-wolf kill happens en-route to the wolves, and the gun disappears or
something, idk). Additionally, if the harlot visits victim or the bodyguard guards victim and the
harlot/bodyguard are also targeted by wolves, their special "died visiting/guarding victim" event
plays instead of the normal death message.

5. Change alive vengeful ghost win conditions to work like amnesiac: they win with the default
role if alive at the end of the game.

6. Minor wording fixes, such as the gunner shot wolf message with more commas than words.
Remember, every time you abuse a comma, God kills a kitten.
2014-08-03 17:04:18 -05:00
skizzerz
6920e2e20c Bugfixes: monster can no longer be mayor, and fix issue when bodyguard chooses not to guard anyone 2014-08-03 00:31:18 -05:00
skizzerz
2a0392bc42 Add back in regular lover win code that was accidentally removed, and make lover winning with fool configurable since there was a lot of pushback for the change. Still defaults to false though 2014-08-02 23:51:49 -05:00
skizzerz
137a4f2d03 Add jester role
Similar to fool, the jester wins if they are lynched. Unlike fool,
the game continues if jester is lynched and they win alongside the
normal winners.

Also change it so that a fool's lover does NOT win with fool, so
that fool/jester win mechanics are similar (since jester's lover
would die with jester). It doesn't pay to fall in love with fools!
2014-08-02 22:27:10 -05:00
skizzerz
a8e1f84412 Fix detection of harlot visiting wolfvictim and wolves stealing gun and other wolf-kill related things 2014-08-02 14:14:56 -05:00
skizzerz
2584bebd4a Don't show gun message to wolves with 0 bullets. Closes #64 2014-08-02 13:35:17 -05:00
skizzerz
48a404d170 don't message gunners if they have no bullets left 2014-08-01 22:45:57 -05:00
skizzerz
40863c3b8e fix typo 2014-08-01 19:06:01 -05:00
nyuszika7h
d2b96752c7 Make !votes work in PM 2014-08-01 11:55:19 +02:00
skizzerz
7f269874d6 Disable amnesiac pending rewrite 2014-07-31 22:15:23 -05:00
skizzerz
cc3edf0997 missing period at end of sentence 2014-07-31 21:03:18 -05:00
skizzerz
c87ace5a8e fix issue where not all wolf cubs/traitors turned at once 2014-07-31 20:27:16 -05:00
skizzerz
d0b9627026 fix nightdone checks 2014-07-31 08:55:47 -05:00
skizzerz
0930fdfd96 Fix night done check to exclude hunters that have acted 2014-07-29 22:36:19 -05:00
skizzerz
864aa176a2 Fix error with mad scientist 2014-07-28 18:13:17 -05:00
skizzerz
c94d6a51b8 Fix duplicate lover message if the same pair was selected twice 2014-07-27 22:14:35 -05:00
skizzerz
97f19509c1 Make revealing totem reveal the actual role (traitor even if hidden traitor is on, and amnesiac's real role). Amnesiac remembers who they are immediately if revealed this way. References issue #43 2014-07-27 15:04:34 -05:00
skizzerz
4815d242c8 Remove try/except that was suppressing errors, and fix issue where roles containing idlers were not enumerated. Closes #55 2014-07-27 14:21:02 -05:00
skizzerz
16b3f36eb3 Clean up win checks, and properly detect if clone won. Closes #48 2014-07-27 14:02:40 -05:00
skizzerz
3698e6d6bf Add end of game lovers message. Closes #1 2014-07-27 13:40:04 -05:00
skizzerz
b2d5d15606 Rework timers to track when they started and how long they last so \!time can be more accurate. Closes #42 2014-07-26 13:28:24 -05:00
skizzerz
a73b891b8d Fix desperation totem when day times out. Closes #52 2014-07-26 12:36:10 -05:00
skizzerz
caa2c55b08 Notify wolves when lycan turns. Closes #47 2014-07-26 12:25:02 -05:00
skizzerz
0a9d5c8817 Swap what GA and bodyguard do because it makes more sense if bodyguard dies and GA doesn't 2014-07-26 12:20:47 -05:00
skizzerz
9265d9cfa5 Fix vengeful ghost always targeting villagers after night 1 2014-07-25 23:05:10 -05:00
skizzerz
060ea15bff Fix end of game crash if vengeful ghost idles 2014-07-25 22:45:35 -05:00
skizzerz
40fcfb3a6c Fix bad grammar in message and fix issue where mad scientist has two targets 2014-07-25 22:03:35 -05:00
skizzerz
25b4f1bfbf Fix crash if vengeful ghost dc'ed and fix messages sent off to clones 2014-07-25 20:25:49 -05:00
skizzerz
202c03d0d9 Merge branch 'master' of https://github.com/lykoss/lykos
Conflicts:
	modules/wolfgame.py
	settings/wolfgame.py
2014-07-25 08:30:53 -05:00
skizzerz
ddbeff5977 Fix crash on nickchange if the user is being killed by wolves or is a lover 2014-07-25 08:27:34 -05:00
nyuszika7h
8b76de1aea Improve !fpull 2014-07-25 10:09:33 +02:00
skizzerz
f185556680 Don't fire desperation totem if the person with the totem lynches themselves last. Closes #54 2014-07-24 21:55:43 -05:00
skizzerz
9f5b30aa95 Fix wolf retract 2014-07-24 20:41:57 -05:00
skizzerz
2c47b5610c Allow bodyguard/GA to guard assassin target at night as well. Closes #49 2014-07-24 20:18:03 -05:00
nyuszika7h
b18dd92733 Fix players receiving 0 stasis 2014-07-22 11:09:45 +02:00
skizzerz
2ab85c4d4d Time lord now always triggers on death 2014-07-21 23:14:55 -05:00
skizzerz
60f98b9b1b Fix game not ending if last person leaves during join phase 2014-07-21 00:12:24 -05:00
skizzerz
42f7b6e176 crazed shaman only wins if survives 2014-07-20 21:28:23 -05:00
skizzerz
c8d52a442c Spelling/grammar fixes 2014-07-20 20:52:47 -05:00
skizzerz
6cb320d1e3 Fix vengeful ghost winning with fool/monsters 2014-07-20 19:52:36 -05:00
skizzerz
b28d67a877 Fix wolf cub not turning into wolf 2014-07-20 19:08:37 -05:00
skizzerz
4d000d1857 Don't count wins for templates 2014-07-20 19:00:32 -05:00
skizzerz
c0f6aad73f Fix issues with clone
Clone gets amnesiac's real role if cloning amnesiac
Don't crash if cloning wolf
Closes #44
2014-07-20 18:25:24 -05:00
skizzerz
5cc5e13081 Fix error with guardian angel 2014-07-20 18:07:23 -05:00
skizzerz
ac9bc89699 Finish up previous commit of end of game messages
Closes #23, #30, #31
2014-07-20 18:04:17 -05:00
Skizzerz
2c4ade2454 Lots of end-game message stuff.
The lover of a fool can win with the fool. The lover of a monster can win with monsters.
List winners at end of game.
Idlers are the scum of the earth and never win.
Displays a message if everyone died (originally by nyuszika7h, replicated here due to merge conflicts).
2014-07-20 14:08:26 -05:00
nyuszika7h
0aa076eb6b Check win condition only after checking all idlers 2014-07-20 13:41:26 +02:00
skizzerz
f45a6279d5 Time lord changes:
Bump day time down to 60s and night time down to 30s
Time lord triggers if they die during day for any reason (except idling)
Reduce rate limit for !time to 10s instead of 60
2014-07-19 18:47:17 -05:00
skizzerz
10e50e88c8 Don't do death triggers when someone idles out/quits/etc. Closes #41 2014-07-19 18:32:21 -05:00
skizzerz
f23c899ce2 Show amnesiac as villager in !myrole. Closes #40 2014-07-19 18:24:35 -05:00
Skizzerz
eb299c6232 Add check to ensure nightroles only act at night. Closes #39 2014-07-19 18:16:37 -05:00
skizzerz
cc25784ad4 Allow 0 wolf kills at night. Closes #33 2014-07-19 18:06:39 -05:00
skizzerz
8c772af3ef Merge branch 'master' of https://github.com/lykoss/lykos
Conflicts:
	modules/wolfgame.py
2014-07-19 17:50:47 -05:00
Ryan Schmidt
6976f4d211 Merge pull request #22 from jacob1/clone
clone gets player list, wolves are informed when clone turns into wolf and clone gets the wolf list too
Closes #14
2014-07-19 17:49:14 -05:00
skizzerz
d0c21560ac Properly restore var.ROLES["person"] if we can't apply templates. Closes #34 2014-07-19 17:45:03 -05:00
skizzerz
e0df1de960 Don't do weird stuff if we !fgame the default role. Closes #36 2014-07-19 17:39:31 -05:00
skizzerz
28fa4b0913 Turn wolf cub into wolf if they are the only one left. Closes #16 2014-07-19 17:37:51 -05:00
nyuszika7h
d353ab5ff3 Make !fghost usable by admins 2014-07-19 19:26:41 +02:00
nyuszika7h
0df8098ade Revert "autopep8"
This reverts commit 4189d5c874.
2014-07-19 19:09:24 +02:00
nyuszika7h
4189d5c874 autopep8 2014-07-19 19:05:49 +02:00
skizzerz
cb55f9129b Force assassin to target someone
If assassin times out night, this selects a random target for them and
lets them know who it is. The target is selected amongst players NOT
going to die that day, so only chance of a reselect is due to lovers,
bullets, or lynchings.

Closes #26
2014-07-19 00:02:50 -05:00
skizzerz
736d5f572e Additional fixes
Fix issue introduced in last commit where regular gunners didn't get
bullets.
Fix wolves ending night when angry with only one target selected.
Closes #28
2014-07-18 23:44:31 -05:00
Ryan Schmidt
32312ed2d6 Bugfixes
Fix crash if a template cannot be assigned due to role restrictions.
Fix gunner being able to become sharpshooter even if sharpshooter isn't
in the list of allowed thingies.
2014-07-18 23:23:27 -05:00
jacob1
6f16848302 fix grammar mistake in headshot message 2014-07-18 23:56:06 -04:00
jacob1
fdf6fa7ab2 add clone message when using !simple 2014-07-18 22:15:57 -04:00
jacob1
a937775874 improve previous clone commit 2014-07-18 22:09:06 -04:00
skizzerz
a670925779 Merge remote-tracking branch 'upstream/master'
Conflicts:
	modules/wolfgame.py
	settings/wolfgame.py
2014-07-18 08:53:11 -05:00
skizzerz
585bdb142f Fix death trigger roles like assassin and vengeful ghost. Closes #27 2014-07-17 23:17:03 -05:00