92 Commits

Author SHA1 Message Date
Vgr E. Barry
9765703902 Finish deadchat 2015-10-27 16:24:06 -04:00
skizzerz
be051dde70 Initial work for prophet role
!pray command is complete, role is missing night messages as well as
initializing/resetting var.PRAYED in transition_night
2015-10-27 01:02:28 -05:00
skizzerz
dea6052ed5 Rename devout to prophet 2015-10-26 23:09:25 -05:00
Vgr E. Barry
10be2e341f First draft of the !deadchat pref 2015-10-26 23:49:41 -04:00
Vgr E. Barry
524773bcdf Finish the woflchat restrictions for the Halloween events 2015-10-26 10:40:39 -04:00
Vgr E. Barry
1fb4fb0418 Syntax fixes 2015-10-25 22:29:21 -04:00
skizzerz
32bd4bed30 Add in possession roles, convert template_restrictions to an ordereddict 2015-10-25 20:43:35 -05:00
Vgr E. Barry
38a35dd3ad Merge branches 'sleepy' and 'sleepy' of https://phab.skizzerz.net/diffusion/LKOS/lykos into sleepy 2015-10-25 21:40:15 -04:00
Vgr E. Barry
5476bcdf27 Small tweaks to wolfchat restrictions 2015-10-25 21:37:59 -04:00
skizzerz
92741acb2f Add preliminary sleepy mode
Also new entries into ROLE_GUIDE for all of the to-be-added roles and
templates.
2015-10-25 20:04:08 -05:00
Vgr E. Barry
2127b217b7 Add deadchat and wolfchat restrictions 2015-10-23 21:51:57 -04:00
skizzerz
9f4b205c72 Add priest role
Right now only the !bless command is active, subsequent commits
will add other commands.
2015-10-23 19:51:01 -05:00
nyuszika7h
87cc9b9875 Revert "Add "HTTP Error 420: I'm a Tea(weed)pot" ping reply"
This reverts commit a7cedd2aa9d4518192d9e6df0c7a4c0edd67a21f.
2015-10-23 16:32:01 +02:00
nyuszika7h
a7cedd2aa9 Add "HTTP Error 420: I'm a Tea(weed)pot" ping reply
Suggested by ParuNexus.
2015-10-23 10:40:08 +02:00
Ryan Schmidt
f25f90c910 Add amnesiac to SEEN_DEFAULT
amnesiac is a hidden role, although detective-types can pierce it the seer is not a detective-type.
2015-10-22 18:58:00 -07:00
Andrew "FastLizard4" Adams
8f4a9decdc Add another !ping reply 2015-10-22 13:53:50 -07: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
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
nyuszika7h
8a90145474 Case-insensitively compare the bot's nick when checking for PMs
Closes #161.
2015-09-06 11:46:49 +02: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
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
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
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
aca7ea418f Mass refactor of the data types 2015-08-29 23:45:44 +02:00
billion57
b936a4d3c5 More lynch/quit/no victims messages
yayy
2015-08-14 00:20:50 +02:00
skizzerz
1b50a37b69 Fix break_long_message, broken in 57930976263b3a3146b9fe3ce838b3f2064a0df1 2015-08-06 22:06:04 -05:00
nyuszika7h
74555f013a Fix Windows error messages in !ping 2015-08-06 12:37:37 +02:00
nyuszika7h
74d4f9c95e Actually add that ping message 2015-08-06 12:27:39 +02:00
Vgr E.Barry
eef01df1f7 Nitpick by ChrisE 2015-08-01 09:35:27 -04:00
Vgr E.Barry
0eee4b1c88 Fix random randomly failing to start
Pun unintended
2015-08-01 09:18:19 -04:00
Vgr E.Barry
5793097626 Improve var.break_long_message
Concatenating strings repeatedly slows down the program and eats up
memory. It's not too bad for the number of players we have, but if you
get 10k players that makes a significant difference
2015-07-31 13:28:08 -04:00
Vgr E.Barry
dc54fdc883 Add random !ping replies 2015-07-31 13:26:50 -04:00
skizzerz
dbb80a940e Fix issues related to undernet (and in general)
- Now possible to use the bot without it having a registered account by
  blanking NICKSERV_IDENTIFY_COMMAND
- Now possible to configure who ChanServ is as well as the command it
  uses to op up in channel (blank to prevent it from auto-opping).
  Example configuration provided for undernet
- Properly autojoin channels even if there isn't an MOTD
2015-07-28 22:35:47 -05:00
nyuszika7h
21060b2bfb Add an option to change NickServ's name and the identify command 2015-07-27 13:08:52 +02:00
skizzerz
6dd9c199fd Disable stats for noreveal, and make the 'no reveal' message more clear 2015-07-24 12:27:08 -05:00
jacob1
c39298cd43 remove det from lycan (a bit too OP), replaced with 2nd seer at 19p (fakeclaiming opportunity) 2015-07-22 20:27:41 -04:00
nyuszika7h
66fe0ec167 Fix typo that broke everything 2015-07-20 15:58:34 +02:00
skizzerz
93345c990d Make DISABLE_ACCOUNTS actually disable account-related stuff.
Right now the only thing that still tracks accounts if DISABLE_ACCOUNTS
is True is stats stuff (in sqlite), as I'm unsure of how we want to
handle that for when accounts aren't enabled; likely track by nick but
unsure on that right now.

This further implements issue #112 but doesn't fix it entirely yet.
2015-07-19 14:37:17 -05:00
nyuszika7h
40a7337ee8 Remove redundant calls to set() in previous commit 2015-07-19 21:24:55 +02:00
nyuszika7h
66a8826eb1 Reuse same code for is_admin/is_owner 2015-07-19 21:22:38 +02:00
skizzerz
116653432b !stats Overhaul
Decoupled ROLE_REVEAL from impacting !stats, added new STATS_TYPE.

ROLE_REVEAL is now a string:
- on = roles revealed on death
- off = roles not revealed on death
- team = user's team revealed on death but not their role

STATS_TYPE is also a string:
- default = stats are calculated as if a villager or nonplayer was
  manually tracking who was what; this leads to !stats not revealing
  any information that is not publicly known
- accurate = what it used to be with a couple modifications; all roles
  are shown (VG and time lord are no longer lumped with villager),
  alpha wolf and lycans turning are hidden, nothing else is hidden
  (so you can see what amnesiac turned into or when clone turns)
- team = only shows number of people on each team, calculated the same
  way as accurate
- disabled = stats are disabled, doing !stats only serves as a mass-ping
  of alive players

Removed random_reveal/random_noreveal hack
- !fgame random=role reveal:on|off does the same thing as the hack used
  to do.

Allow all game modes to take arguments (aka the blah in roles=blah).
- Allowed arguments are "role reveal" (on/off/team), "stats type"
  (default/accurate/team/disabled), and "abstain"
  (enabled/restricted/disabled).
- roles obviously still allows for taking individual roles as arguments
  as well as specifying a default role, however this functionality is
  not available for any other gamemode.
- if any custom options are set as a result of this or changing them in
  game mode constructors, players will be informed of which options are
  in play.

Performing !frole will force STATS_TYPE from default to accurate, this
is done because the default logic is based not on what roles are
currently in existence, but rather what roles the game was started with
and what transformations could have applied to them. !frole throws a
complete monkey wrench in that to the point where it is impossible to
nicely recover.

Clone and Traitor are now unconditionally blacklisted for amnesiac, as
the additional logic to support them in default !stats is incredibly
complex and as such was not done for this PR.

Matchmaker is conditionally blacklisted for amnesiac if amnesiacs turn
after the first night. It is an allowed choice (unless it appears on the
config blacklist) if amnesiacs turn night 1.
2015-07-17 18:42:07 +02:00
nyuszika7h
9a0c96eab0 Fix comment in mad game mode 2015-07-15 18:18:09 +02:00
skizzerz
c0575bd460 Add turncoat role
Turncoats initially start off village-aligned, but can change which team
they're on by using the !side command. Turncoats cannot change sides two
nights in a row, and can use !pass if they don't wish to change sides on
any given night.

Seers and detectives see turncoats as turncoats, augurs see them as
having a grey aura. I was initially toying with det and augur seeing
them as their currently-chosen side and for mystics of the opposite team
to detect them, but since they can flip-flop an unlimited number of
times a night that info would be useless at best and misleading at
worst.
2015-07-14 22:20:53 -05:00
nyuszika7h
051aff9476 fgame: Don't restrict what the default role can be
If it breaks, you get to keep the pieces. ;)
2015-07-11 23:51:38 +02:00
nyuszika7h
7f0623b4b0 Add partial role reveal
Roles are revealed upon death, but not shown in !stats.

This will be used for the random game mode with a 50% chance.
The variant used is displayed when the game is started, and
admins can force a specific variant with !fgame.

Also, ignore conceal_roles in !stats, because partial role reveal
handles that now.
2015-07-04 23:57:07 +02:00
nyuszika7h
b968f83e8b Optimize var.get_role
It will now return as soon as it finds the role for the player,
instead of calling var.list_players_and_roles every single time.
I haven't tested in a real-world scenario, but in a test game
with 10000 players (don't ask), the speed improvement is very clear
(~1-2s per player when sending out nighttime PMs instead of ~10s).
2015-06-30 20:39:55 +02:00