Commit Graph

2633 Commits

Author SHA1 Message Date
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
ef3c670a0d Make sleepy 10+
8-9p has only one safe, 2 wolves, and a dullahan. Usually this means
dulla controls the game and the winner is entirely determined by whether
or not both wolves are on the kill list. Aka it sucks.
2017-08-09 17:18:59 -05: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
ad5ab73e00 Forgot to update gamemodes del_player events to use new var names 2017-07-20 19:07:00 -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
skizzerz
24f82d3cd5 Fix BotUser.lower 2017-05-16 11:05:37 -05:00
skizzerz
c9faa8bb7a Fix BotUser.with_host breaking things when called during registration
If with_host() is called before we fully know our ident and host, we'll
set the host but keep ident as None, which breaks everything down the
line. I could've fixed this in general in users._add, but that would
require more extensive changes than this patch (aka may break other
things).
2017-05-15 20:35:47 -05:00
skizzerz
68109a12ae Fix RPL_ISUPPORT parsing
Instead of trying to guess what format a token is based on its content,
hardcode a list of known tokens and what formats their parameters take.
Any unknown token will therefore be kept as a string, instead of
potentially blowing up parsing due to unexpected values (such as
multiple colons).

Also fix parsing for colon-separated lists. MAXLIST=beI:100 is *VERY*
different from MAXLIST=b:100,e:100,I:100 but our previous processing
made the two identical in terms of what the structure looked like.
2017-05-15 16:24:20 -05:00
nyuszika7h
5a0a519d27 .mailmap: Update my primary email 2017-05-15 21:43:26 +02:00
nyuszika7h
30b92a6101 README.md: Mention SQLite3 requirement 2017-05-15 21:42:34 +02:00
nyuszika7h
a8198327d0 Fix missing space before death messages in join phase 2017-05-15 21:42:22 +02:00
jacob1
d12aabb190 revert previous commit (af4be89897) 2017-05-06 15:06:58 -04:00
jacob1
af4be89897 update gamemodes.py.example 2017-05-06 12:44:18 -04:00
jacob1
9f43a8a6d6 nicer error message when running on python < 3.3 or python 2 2017-04-22 17:32:04 -04:00
Vgr E. Barry
3f9f06613a Fix pingif preferences not being properly saved 2017-04-22 07:46:09 -04:00
jacob1
16d541b1f1 fix missing space in quit message 2017-04-19 21:49:57 -04:00
nyuszika7h
9067da836d Fix critical bug regarding goats 2017-04-18 18:08:12 +02:00
Vgr E. Barry
08eaa34130 Update !fleave 2017-04-16 23:47:28 -04:00
skizzerz
4ce8888274 add users import to wildchild 2017-04-13 16:04:25 -05:00
Vgr E. Barry
64eb34a61a Properly handle the bot's host change 2017-04-07 16:52:35 -04:00
skizzerz
e0ea1f00e4 derp^2 2017-04-01 14:53:17 -05:00
skizzerz
9076872726 Fix dulla 2017-04-01 14:06:08 -05:00
skizzerz
ffb23f587d derp 2017-04-01 13:39:16 -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
skizzerz
d029302ead Reduce delay range for villagergame
Now has a standard deviation of 1.5 seconds rather than 3 seconds, which
makes it a lot easier (hopefully) to identify when lykos is wolf.
2017-03-28 11:49:18 -05:00
Emanuel Barry
5d03ed414b Convert dullahan to use the new API (#292)
* Convert dullahan to use the new API

* Address small nitpicks about dullahan

* Totally unimportant commit, please do not pay attention at all
2017-03-28 09:39:51 -07:00
Ryan Schmidt
322de008e7 Merge pull request #291 from lykoss/swap-event
Add a new swap_player event
2017-03-24 22:18:57 -07: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
jacob1
0aea09f066 fix italics being interpreted as newlines when sending messages (deadchat fix) 2017-03-11 21:36:12 -05: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
Ryan Schmidt
426a86e909 Merge pull request #289 from FastLizard4/master
In team reveal, be more clear about team names
2017-03-01 15:11:00 -07:00
Andrew "FastLizard4" Adams
e2db3b28a9 In team reveal, be more clear about team names
When a game is being played with team reveal instead of role reveal, use
explicit team names instead of just "wolf" or "villager" to make it clear that
we're referencing teams, not the similarly-named roles.
2017-03-01 14:08:03 -08: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
c581801077 fix error when bodyguard saves assassin target 2017-02-25 00:27:14 -05: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
bc6375cf24 fix users.match_hostmask only working on full hostmasks
fixes admins list in botconfig.py when DISABLE_ACCOUNTS is true
2017-02-24 23:49:56 -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
jacob1
268129bd9d fix potential recursion error during maelstrom
when calling chk_win_conditions, maelstrom uses a rolemap where all players are usually '0', this is casted to a set which makes it think there is only one player
2017-02-23 23:43:32 -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
Vgr E. Barry
05b900ef57 Don't allow messages from users we don't know 2017-02-15 11:07:15 -05:00
skizzerz
535d588c7b Succubus fixes
If in team reveal and succubus visits victim, show her as a neutral
player.

Don't try to double-kill people if all succubi die. While double tap is
a proven technique against zombies, it apparently breaks werewolf bots.
2017-02-14 21:35:02 -06:00