Commit Graph

417 Commits

Author SHA1 Message Date
skizzerz
738ff7a441 Fix alpha wolf biting an immunized person with retribution totem not dying from totem 2015-10-20 22:48:16 -05:00
skizzerz
5a97397cd9 Alpha wolf fixes
- Correctly logic out bite interacting with harlot, immunized, and lycan:
- A harlot that isn't home does not get bit and refunds the bite unless
  they visit a wolfteam member or visit the unprotected wolves' victim
  (in either of those cases, they get bit instead of dying)
- A lycan or someone with a lycanthropy totem that gets bitten
  immediately turns to wolf and refunds the bite. The regular wolf kill
  still happens too, so this is essentially a freebie for alpha wolf.
- An immunized target dies per normal, but the death from the bite does
  not stack with the death from a normal wolf kill for the purposes of
  protection (meaning a single protection will guard against both).
- Fix nightdone check so that night doesn't end prematurely if alpha
  would be eligible to bite but has already done so previously in the
  game.
2015-10-20 22:26:37 -05:00
Vgr E. Barry
8995ec5815 Fix error on starting random 2015-10-19 15:29:55 -04:00
Vgr E. Barry
1a64a72a78 Change variable name 2015-10-19 15:20:10 -04:00
Vgr E. Barry
e4ca30f830 Remove priorities in events 2015-10-19 15:06:02 -04:00
Vgr E. Barry
f1922540af Change lovers cluster win message 2015-10-19 15:05:28 -04:00
Vgr E. Barry
27f39c916f Change handling of chk_win events 2015-10-19 15:05:14 -04:00
Vgr E. Barry
04180bc036 Add alternate win condition if only lovers are alive
The message could use a better phrasing, but anyway this works.
2015-10-19 14:51:03 -04:00
skizzerz
26e7acc8f8 More fallow/fdeny fixes
- Always apply host-based allows/denies even in var.ACCOUNTS_ONLY is set
- Fix display of mixed-mode allows/denies for a particular user
- Make -acc and -host switches operate more intelligently on both the
  bare command as well as when given an argument
2015-10-18 20:56:27 -05:00
skizzerz
db0823bb37 Let vengeful ghosts use !retract 2015-10-18 19:20:08 -05:00
skizzerz
15b547ed77 Fix -acc and -host switches on fallow/fdeny 2015-10-18 15:18:55 -05:00
Lane Farrow
a9210b03c4 update simple, notice to track ident@host for users sharing hosts 2015-10-14 20:23:02 -05:00
Vgr E. Barry
45d13846a1 Fix !game and !lynch to not display the same vote twice
Players may no longer vote-spam individual players (or mistakenly vote
the same person/game mode twice)
2015-10-13 16:46:21 -04:00
Vgr E. Barry
4befeef033 Add missing period
That'll teach me to merge early
2015-10-13 10:16:29 -04:00
acz13
33f99d03a9 Update settings.py 2015-10-12 19:22:19 -04:00
acz13
1cfd36eedd abra0's suggestion
<+abra0> petition to add "I'm sorry I can't do that Dave" to !ping responses
2015-10-12 19:07:41 -04:00
jacob1
a83911f054 fix error when returning to the game via /nick 2015-10-11 21:59:00 -04:00
jacob1
3845d4e0b3 fix matchmaker, warlock, and piper causing night to end early if they !quit after acting
alpha wolf and turncoat also aren't removed from variables when quitting, but chk_nightdone checks if those roles are still in pl for some reason
2015-10-09 12:44:40 -04:00
Vgr E. Barry
6dd8f88bf6 Ensure socket is closed unconditionally (re: #169)
I cannot reproduce the bug locally, but this will force the socket to
close if it didn't for whatever reason, which is what seems like could
have caused the issue.
2015-10-08 12:03:08 -04:00
jacob1
7a058f77e7 fix !swap bugs
Didn't remove players from var.DISCONNECTED, leading to idling out every 10 seconds and getting lots of stasis while still being in the game
Didn't actually check whether the player was in channel or not
2015-10-06 23:01:39 -04:00
jacob1
0ac28c290b fix bot not being able to connect to some strange networks 2015-10-04 00:14:30 -04:00
skizzerz
da762e6d73 Fix pl not being updated with chained deaths in del_player 2015-10-03 22:12:42 -05:00
jacob1
651c46d6a5 don't stop the game on error 2015-10-03 22:46:02 -04:00
jacob1
b047963cdb fix !roles roles erroring 2015-10-03 22:44:48 -04:00
jacob1
86ae193541 fix hag not working
broken in d9812e552d (blame woffle)
2015-10-03 19:01:53 -04:00
jacob1
5048af853e fix players not being devoiced when unidentifying mid game
fixes flaw in 151d010047
2015-10-03 17:57:44 -04:00
jacob1
c8dea37284 devoice all players before faftergame commands get run 2015-10-03 17:37:41 -04:00
jacob1
3f112b19bc fix previous !fjoin commit not working 2015-10-03 16:27:22 -04:00
jacob1
4612c0dec5 fix using !frole to join a new player during a game 2015-10-03 16:26:09 -04:00
jacob1
1e420a0235 !fjoin checks if the bot is opped before joining the list of players
prevents mass spam ...
2015-10-03 16:25:29 -04:00
jacob1
9c36602e21 fix error when lover changes nickname and then is matched again 2015-10-03 16:12:45 -04:00
Vgr E. Barry
151d010047 Fix devoicing someone twice when they unidentify 2015-09-30 08:38:35 -04:00
nyuszika7h
d1902392ba Add missing import 2015-09-22 23:02:51 +02:00
skizzerz
5132908397 Fix alpha wolf issues
- Make bite able to end night
- Bite was always working even if the target was immunized
- Ensure protection applies when killing a target that was
  immunized-but-bitten
2015-09-21 22:33:52 -05:00
jacob1
4a471d39b1 fix error handler not displaying errors on startup 2015-09-18 00:02:40 -04:00
Emanuel Barry
112ffdf80b Fix indent (blame woffle)
You can't `.update()` a dict you're currently iterating over.
2015-09-13 10:17:03 -04:00
skizzerz
d9812e552d Lots of shaman fixes (blame jacob1)
- var.SHAMANS now properly stores who is actually receiving totem, as it
  should. It now holds a tuple so it can still track the original target
  for purposes of letting shaman know if target changed.
- properly reset all totem vars before handing them out so totems don't
  last for multiple days.
- luck/misdirection now applies before exchange totem is checked, making
  it consistent with every other role ever.

completely untested, but should be fine :)
2015-09-13 00:04:24 -05:00
nyuszika7h
aaddfb5a93 Fix never reached condition 2015-09-09 18:07:34 +02:00
Vgr E. Barry
0219941d08 Get rid of conceal_roles in the game_mode decorator
A game mode is considered "hidden" if it doesn't have a `ROLE_GUIDE`
attribute. The `default` game mode was modified to have those
attributes, and is not hidden.
2015-09-09 10:37:45 -04:00
Vgr E. Barry
4810bb408f chr(32) 2015-09-09 10:05:03 -04:00
Vgr E. Barry
d427bd8ca4 Move the try-except block in evilvillage's chk_win 2015-09-09 10:04:41 -04:00
nyuszika7h
384ee8495c Merge pull request #165 from lykoss/better_gamemodes
Update handling of game modes
2015-09-09 16:01:39 +02:00
Vgr E. Barry
c37631e90c Update handling of game modes
This change moves the game modes into their own `src/gamemodes.py`, and
also allows setting game modes via `gamemodes.py`.
2015-09-09 09:57:41 -04:00
jacob1
9467a21279 fix some comments in transition_day to be on their own line 2015-09-09 01:36:10 -04:00
jacob1
50dc87938a allow hunter to pick a new target if their old one idles/quits
It also sends hunters/ghosts a message informing them of this
2015-09-09 01:18:39 -04:00
jacob1
4257de5f76 fix hunter being able to use 'pass' after killing on a previous night (ending night early) 2015-09-08 23:24:38 -04:00
jacob1
0246698b87 fix !roles # to work as intended 2015-09-08 23:03:24 -04:00
jacob1
5b62c5c3f6 minor fix, sometimes used 'seems' when it should have used 'seemed' 2015-09-08 22:56:33 -04:00
nyuszika7h
adec2362e4 Fix bot breaking with fake nicks
(blame @skizzerz)
2015-09-07 20:19:20 +02:00
skizzerz
6a0a0bdbd0 Fix fjoining people stasised by hostmask 2015-09-06 15:16:06 -05:00
nyuszika7h
8a90145474 Case-insensitively compare the bot's nick when checking for PMs
Closes #161.
2015-09-06 11:46:49 +02:00
skizzerz
2bd5acab53 fix fallow/fdeny redux 2015-09-05 22:09:22 -05:00
skizzerz
5e1fb7dbcf fix fallow/fdeny 2015-09-05 22:01:25 -05:00
Ryan Schmidt
458d678009 Merge pull request #159 from lykoss/ident-support
Expand host-based variables to take full-on hostmasks
2015-09-05 19:59:01 -07:00
skizzerz
07fdf64aae Fix fool winning
If a fool is also a lover and they are lynched, they don't win (but
their lover might depending on bot settings).

Fixes #162
2015-09-05 18:19:24 -05:00
skizzerz
2cf278f9b1 Fix turncoat not being seen as vil
(it may have possibly never worked ever but just noticed now because
this was the first game with seer+turncoat)
2015-09-04 20:00:58 -05:00
skizzerz
88180a1ec2 Revert "Make fallen angel become assassin in all cases"
This change negatively impacts balance, assassin should in general never
be applied to any role the other team is required to kill in order to
win. Alpha wolf is the exception here, not the rule, since there is
counterplay involved with alpha biting GA (GA is likely immunized, can
guard self, game might end before turning, etc.) that simply does not
exist in other instances.

This reverts commit 3eb437fad6.
2015-09-04 19:33:58 -05:00
jacob1
028c5c9ae2 fix crash in games with traitor / wolf cub 2015-09-04 18:39:41 -04:00
Vgr E. Barry
3eb437fad6 Make fallen angel become assassin in all cases
Not just from getting bitten by alpha wolf, but also from turning from
amnesiac, and also if in the default role rotation (this one currently
doesn't affect any game modes, but in the future it might).
2015-09-04 11:49:30 -04:00
Vgr E. Barry
279328296d Fix 'devoice' parameter not working in some cases in del_player 2015-09-04 08:25:50 -04:00
skizzerz
f5ec9c9627 Expand host-based variabls to take full-on hostmasks
This allows for things like making ADMINS/OWNERS take a full hostmask,
or fallowing/fdenying a full hostmask with wildcards. It also allows for
a distinction between two people that share a hostmask but have a
different ident.

stasis now checks all matching stasis and returns the highest amount

fallow/fdeny have two new options -acc and -host to explicitly specify
what type the argument is

-cmds in fallow/fdeny show commands from all matching masks, to bring it
in line with how actual allow/deny parsing works, before it would only
show the first match
2015-09-03 19:38:59 -05:00
Vgr E. Barry
0d316d1ec6 Fix bot not devoicing player during day/join phases 2015-09-03 17:05:00 -04:00
Vgr E. Barry
5294f92c6c Add !games to show the available game modes 2015-09-03 12:00:40 -04:00
Vgr E. Barry
609f3282b8 Fix missing name error
The worst part is that I tested that change quite a lot
2015-09-02 22:31:16 -04:00
Vgr E. Barry
bd93e96445 Improve !fgame to allow an arbitrary number of spaces
This also allows to be a bit more liberal with the punctuation
2015-09-02 18:37:49 -04:00
Vgr E. Barry
d827eae2d8 Add option to devoice players during night 2015-09-02 17:48:58 -04:00
Vgr E. Barry
78465c9769 Perform game-ending checks for random earlier on 2015-09-01 23:14:44 -04:00
Vgr E. Barry
245bc57b66 Separate chk_win in two functions 2015-09-01 23:13:10 -04:00
Vgr E. Barry
7702509f90 Fix changing nicks in join phase not working 2015-08-31 19:20:54 -04:00
jacob1
e4c53906fb fix !swap when the player you are replacing already disconnected 2015-08-31 11:57:19 -04:00
Vgr E. Barry
2a35212ca4 Fix fallen angel's kill playing the wrong message 2015-08-29 20:56:26 -04:00
Vgr E. Barry
1fe1a7bfb3 Fix leftovers from the data types refactor 2015-08-29 20:56:15 -04:00
Vgr E.Barry
aca7ea418f Mass refactor of the data types 2015-08-29 23:45:44 +02:00
nyuszika7h
fa7cec485b frole: Add new players to default role and voice them 2015-08-28 16:13:15 +02:00
jacob1
5bc3a96203 fix duplication and possible empty player list in the message previously charmed players get 2015-08-28 01:35:30 -04:00
jacob1
36c56f8f5f fix error every time you PM the bot in debug mode 2015-08-28 01:18:42 -04:00
Emanuel Barry
f55492e6c8 Unconditionally print traceback
In debug mode traceback could go unprinted.
2015-08-27 18:17:45 -04:00
nyuszika7h
403e491c60 Fix bot sending idle warning in PM when messaging it after you're dead
Also changed it to use var.IDLE_WARNED_PM, as @skizzerz suggested a wolf
may want to intentionally idle sometimes.
2015-08-27 23:47:08 +02:00
nyuszika7h
a5a5c1c022 Mention oracle & augur in traitor message; fix cursed traitor message
Closes #150.
2015-08-27 23:12:02 +02:00
nyuszika7h
8be512c216 Repeat idle warning in PM if the player is PMing the bot 2015-08-27 21:08:04 +02:00
Emanuel Barry
77619306ec Fix bodyguard message 2015-08-27 14:51:21 -04:00
Emanuel Barry
b3f30bbd91 Improve error handler
Now it will only pastebin the error when it has finished gathering it
all.
2015-08-27 10:02:56 -04:00
skizzerz
3dc3e4d172 Fix race condition for day timing out immediately when a vote succeeds 2015-08-26 20:09:57 -05:00
skizzerz
bb5cb78c68 Fix fgame bug, str.split has idiotic semantics in python 2015-08-25 22:46:45 -05:00
skizzerz
75c407c403 Track player stats by nick if accounts are disabled 2015-08-25 15:52:27 -05:00
nyuszika7h
886434272f Remove !me alias for !mystats
It conflicts with normal messages like "me too" in wolfchat, and I think
it's rarely (if ever) used.
2015-08-24 19:54:13 +02:00
nyuszika7h
82ef99b837 Fix !join telling you to !swap if you're already joined 2015-08-18 12:43:01 +02:00
jacob1
3ce856818a fix the bot pinging everyone instead of just people using !pingif if DISABLE_ACCOUNTS is on 2015-08-17 18:17:45 -04:00
nyuszika7h
5a2a098db6 !wiki: Catch socket.timeout 2015-08-17 22:53:12 +02:00
nyuszika7h
79066e5ec6 Fix error in on_invite (blame @Vgr255) 2015-08-16 12:06:15 +02:00
jacob1
835441caea fix bug where you could fdeny the same command multiple times if done by host 2015-08-14 01:31:48 -04:00
billion57
b936a4d3c5 More lynch/quit/no victims messages
yayy
2015-08-14 00:20:50 +02:00
Vgr E.Barry
3534cc7d78 Better handle non-built-in exceptions 2015-08-10 09:49:52 -04:00
Vgr E.Barry
d58a9249ab Update error handler to ignore non-errors 2015-08-10 09:09:33 -04:00
nyuszika7h
0dd3c08862 Exit immediately if Ctrl-C is pressed twice 2015-08-08 22:46:32 +02:00
nyuszika7h
e8fc9f01bb Ping players when ending game due to error in join phase 2015-08-08 22:16:06 +02:00
nyuszika7h
58286e7596 !swap: Don't error if user is not playing
I blame @Vgr255.
2015-08-08 22:07:02 +02:00
skizzerz
7e1c656185 Fix harlot dying visiting protected victim 2015-08-06 22:30:32 -05:00
skizzerz
1b50a37b69 Fix break_long_message, broken in 5793097626 2015-08-06 22:06:04 -05:00
Vgr E.Barry
38b7ef81e2 Add proper error handling. Closes #151
All exceptions, if not caught, are unconditionally sent to `sys.stderr`.
We only need to use our own custom class with some modifications and we
can intercept all errors, even those in threads (which #151 was about).
The only real downside from this practice is that `cli` is not
accessible to us when the errors happen, so I used a hack to set it on
an instance variable. If anyone can find a better solution, please step
forward. For the time being, this will have to do.

If for some obscure reason this class breaks, `sys.__stderr__` holds the
original `sys.stderr`
2015-08-06 12:29:47 -04:00