Commit Graph

1561 Commits

Author SHA1 Message Date
Vgr E.Barry
ff53ad4bcf Modify is_user_stasised to return only an integer, not a tuple 2015-08-01 09:22:42 -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
29cf18f7be Update revealroles
Now shows which side turncoat is on, and what role someone was if they
changed during game. Also removed string concanetation so save on
memory/time.
2015-07-31 13:30:40 -04:00
Vgr E.Barry
7c9b5ce51b Fix decorators 2015-07-31 13:29:26 -04:00
Vgr E.Barry
e259502ad4 Change a few hasattr/getattr calls for something more intuitive 2015-07-31 13:29:05 -04:00
Vgr E.Barry
f40e749c07 Allow !fjoin to join ranges of fake nicks 2015-07-31 13:28:34 -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
6fecec6df3 Re-add limit for fwait
Now restricted to adding/removing 900 seconds (15 minutes). There are no
valid reasons I can think of or that were given in -dev that would
require more time than this. 15 minutes is still likely too much and
from previous experience such long forced waits generally trigger a mass
exodus of players who would rather play a game than doing absolutely
nothing.
2015-07-30 13:06:48 -05:00
skizzerz
e27fd8c1fa Fix connect hooks
Apparently having multiple hooks on the same thing is just horribly
broken, even though we do it in other places. This only fixes the issue
on connecting as that one is the most severe, but the other cases will
need to be fixed as well (or the underlying issue preventing it from
working needs to be fixed).
2015-07-29 03:14:10 -05: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
skizzerz
b4c5fc4188 Fix error introduced in 32ab792e 2015-07-27 22:36:43 -05:00
Vgr E.Barry
9d10a1a342 Display what amnesiac would have turned into at end of night 2015-07-27 10:24:55 -04:00
Vgr E.Barry
120a2f3717 Fix error (blame @nyuszika7h) 2015-07-27 09:26:40 -04:00
nyuszika7h
32ab792e2f Use the specified username for NickServ identify 2015-07-27 14:19:46 +02:00
nyuszika7h
7751efdd3c Another accidentally removed config option. 2015-07-27 14:14:15 +02:00
nyuszika7h
578c86a8e1 Oops, accidentally removed this from the example config 2015-07-27 13:55:14 +02:00
nyuszika7h
21060b2bfb Add an option to change NickServ's name and the identify command 2015-07-27 13:08:52 +02:00
skizzerz
80f5f7d4e8 Separate bite from kill for alpha wolf.
Alpha now can choose to either bite or kill, but not both. If other
wolves are alive, they can still kill as normal allowing both to happen
that night. Additional interactions were added to deal with visiting
harlots and to not accidentally kill bodyguards/GAs in the event that
they are bitten and would die from wolves (if
BODYGUARD/GUARDIAN_ANGEL_DIES_AT_NIGHT_CHANCE is set).

Things to consider for the future but didn't have time to do yet:
- Should we play a message in channel if alpha wolf successfully bites
  someone at night?
- Avoid killing a bodyguard/GA if Fallen Angel is in play and said
  bodyguard/GA was bitten that night.
- Should wolves avoid automatically killing people bitten on previous
  nights (e.g. a bitten harlot wouldn't get nommed visiting wolves or
  victims, bitten bodyguards/GAs wouldn't die from fallen angel, etc.)?
2015-07-26 23:29:40 -05:00
Vgr E.Barry
017811b7db Fix game mode docstring parsing 2015-07-26 13:34:04 -04:00
skizzerz
4eaedea442 Fix fgame autocompletion 2015-07-26 12:32:07 -05:00
nyuszika7h
0e704e5533 Fix missing period in !hex message 2015-07-25 22:27:10 +02:00
skizzerz
6dd9c199fd Disable stats for noreveal, and make the 'no reveal' message more clear 2015-07-24 12:27:08 -05:00
nyuszika7h
2f5712cb3b Prefix "/me"s in wolfchat with an asterisk
This is needed to disambiguate them from the bot announcing wolfteam
actions in wolfchat, which was recently added.
2015-07-24 13:50:42 +02: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
bf18c5fbb2 Fix previous commit 2015-07-22 21:10:15 +02:00
nyuszika7h
c3fa5d4907 Change all "to not" -> "not to" 2015-07-22 21:01:09 +02:00
nyuszika7h
0d0bda349d Announce wolf/alpha retracting in wolfchat too & remove redunant check 2015-07-22 20:56:55 +02:00
nyuszika7h
e1271290aa Add note about random picking to shaman and matchmaker role message 2015-07-22 19:03:16 +02:00
nyuszika7h
a41d302607 Fix "already charmed" message for piper
"For tonight" implies that charmed players are only charmed until the
night ends, which is certainly not true.
2015-07-22 18:32:20 +02:00
nyuszika7h
164785d589 Announce wolf actions in wolfchat
This way it's immediately obvious if it was a legit command or not. The
result of werecrow's observation is not announced, because it's possible
for the crow to be killed at night and this would take away that
strategy. For sorcerer, it does not even bother announcing the fact that
they observed, since they can tell the result immediately if they are
alive, so the message is pretty much redundant.

Also, minor fixes:

* Log kill by angry wolves properly, instead of the non-obvious hack
  that @Vgr255 used.

* Add missing quotes in angry wolves wolfchat message.
2015-07-22 17:59:53 +02:00
nyuszika7h
22faf0b961 Skip leading symbols in complete_match
This allows you to vote |evil| with "!v evil", for example, provided
that no other nick matches that.
2015-07-22 16:11:38 +02:00
skizzerz
d26c621b55 Fix win sequencing bug
If all wolves are dead and there are the same number of wolfteam as
vills (due to sorcerers, hags, etc.), then village should be credited
with win.
2015-07-20 23:06:22 -05:00
nyuszika7h
f65f48c70d Add missing bolding + period & fix format string 2015-07-20 17:52:40 +02: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
nyuszika7h
c13e3087d6 Clean up botconfig.py.example 2015-07-19 21:22:37 +02:00
skizzerz
99e4a49fe6 Also deduct min lycans if it is possible alpha turn with GAs around 2015-07-19 04:02:57 -05:00
skizzerz
7ad4098aed Fix idlers breaking stats 2015-07-17 13:15:52 -05:00
nyuszika7h
efcb60e4f5 Merge pull request #152 from lykoss/stats_overhaul
!stats Overhaul
2015-07-17 18:42:57 +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
ccc1bb68ec Fix "currently not" -> "not currently"
Both are correct; this is just for consistency.
2015-07-17 09:47:14 +02:00
jacob1
90a02de767 remove 'curse <self>' pass alias for warlock 2015-07-16 22:31:45 -04:00
jacob1
680e24dd8b allow warlock and piper to use !pass (they can later decide to use their powers) 2015-07-16 22:26:12 -04:00
jacob1
e9fa4a0293 fix var.LASTGIVEN with silenced shamans 2015-07-16 20:32:30 -04:00
jacob1
b08849b14f if there are multiple pipers ('random' games), tell the other pipers who is being charmed 2015-07-16 19:46:30 -04:00
jacob1
bbfa5331e4 silenced shamans no longer randomly give out totem at end of night 2015-07-16 19:25:38 -04:00
jacob1
bd4b89ef01 delay PMing charmed players until daytime 2015-07-16 19:07:58 -04:00