Commit Graph

134 Commits

Author SHA1 Message Date
Ryan Schmidt
fbba6342c3
Merge pull request #324 from lykoss/mystic-tweaks
Mystic tweaks
2018-05-01 13:13:53 -07:00
Em Barry
d4968751d8
Merge pull request #327 from ammongit/minion-notify
Send "has_minions" message to wolves.
2018-05-01 13:41:04 -04:00
Vgr E. Barry
35bcda40dc Split and convert matchmaker 2018-04-30 14:51:42 -04:00
Ammon Smith
b73015affa Send "has_minions" message to wolves. 2018-04-27 15:31:11 -07:00
Vgr E. Barry
95efce5587 Mystic tweaks 2018-04-26 16:08:07 -04:00
Ammon Smith
7d83dc4d8e Allow pipers to pass or change targets (#322)
Also adds some more info to revealroles. Some miscellaneous fixes included.
2018-04-25 23:08:39 -04:00
Vgr E. Barry
1d2ab6a2cc Update mystics and the get_special event to be more fine-grained 2018-04-25 22:48:48 -04:00
jacob1
c5036bceac improve frole template handling, don't require underscores 2018-04-24 21:58:10 -04:00
skizzerz
56f2bacd3a Amnesiac fixes and redo stop_game readout logic
- Account for revealing totem + amnesiac in experimental !stats properly
- Fix amnesiac blacklist checks to be consistent with each other
- Remove non-events from villager.py -- these always ran before or after
  all other events, so there was no point in them being events in the
  first place
- stop_game now follows the mainroles/allroles pattern instead of
  roles/templates pattern. This also modifies the data stored in db
  stats, and fixes readouts for cases where we do goofy stuff with
  secondary roles
2018-04-23 23:11:02 -05:00
Vgr E. Barry
1a446205ce Split and convert amnesiac 2018-04-23 20:27:00 -04:00
Vgr E. Barry
38721fd59b Convert and split seer, oracle and augur in three files with a shared helper 2018-04-23 15:15:09 -04:00
Em Barry
745a1dc68a
Convert chk_decision (#317)
Convert chk_decision, chk_nightdone, transition_day, transition_night, doomsayer, mayor, and convert+split shamans in three files with a shared helper. Fixes and updates for the User containers, and some other tweaks and fixes.
2018-04-23 13:25:38 -04:00
Em Barry
28f26e181b Add the new User containers (#316)
- Add the new User containers for easier handling of users throughout the codebase
- Remove the swap_player event (replaced by User.swap, made possible thanks to the containers)
- Remove the cli argument from several events
- Remove !frole (a replacement will follow)
- Remove the ALLOWED_NORMAL_MODE_COMMANDS config option

Plus a couple of small fixes here and there.
2018-04-13 13:37:04 -07:00
skizzerz
c121c0f08f Mudkip balance fix and bugfix
Fix balance in mudkip, it was skewed too much towards village winning.

Also, if day ended in mudkip and nobody was being voted, it would error.
Let's make that not error.
2018-04-04 17:06:03 -05:00
skizzerz
965b230f64 Fix mudkip day timeouts breaking things if game ends during them 2018-01-11 11:08:57 -07:00
moonheart08
7d7aa78ce2 Adds 3 more "No Victim" Messages (#312)
Add a few more "No Victim" messages.
2017-12-20 09:52:43 -05:00
skizzerz
a2dd0fd189 Balance tweaks for new mode
- Remove minion entirely, keeping cultist at 8p instead.
- Cultist swaps with doomsayer at 9p, so there's still only 2 wolfteam
  until 11p. Doomsayer is powerful enough already, don't need another
  wolfteam in there.
- Get rid of retribution totems. Shaman is now 50/50 death/pestilence
  and wolf shaman is 50/50 protection/misdirection.
- Make stalemates benefit village by allowing tied votes to lynch all
  tied people instead of nobody. Day ends once everyone votes, even if
  there is no majority vote. In that case, the plurality of votes is
  considered rather than majority.
2017-12-09 11:21:04 -06:00
skizzerz
a4f3d61aad Fix return_to_village for disconnected users
If the user rejoins as a different user, the ghost stuck around and
broke things. This fixes that. It also makes it smarter when rejoining
as a different nick, and alerts what the old nick was in such cases.
2017-12-07 10:48:39 -06:00
Em Barry
1ce4360f3e
Merge pull request #304 from lykoss/split_piper
Split piper and convert it to new APIs
2017-12-05 20:51:10 -05:00
skizzerz
6efbcca3fe Split piper and convert it to new APIs
Still some unsplit things that are pending other roles being split.
Other gameplay changes regarding piper:

- Ensure that pipers can never be charmed, even in the case of
  misdirection, luck, and exchange totems.
- Allow pipers to change who they are charming during the night.
- Do not share who pipers picked with other pipers (or in revealroles),
  as these are now changeable and pipers are not made aware of each
  other anyway in the role list at night.
2017-11-30 21:44:59 -06:00
jacob1
7a003e4cb7 convert var.SPECTATING_WOLFCHAT to users, prevent !spectate deadchat 2017-11-05 20:11:05 -05:00
jacob1
cac3200164 separate spectate into +p flag, add a notice when someone spectates wolf/deadchat 2017-11-05 00:15:24 -04:00
wctaiwan
a35081aebd Change villagergame win message 2017-10-06 21:53:12 -07:00
jacob1
27b8c3c785 remove scary ping message 2017-08-20 22:46:48 -04:00
jacob1
4dc86adc75 add mad scientist targets to myrole and revealroles 2017-08-20 18:46:04 -04:00
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
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
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
Vgr E. Barry
faa3925e7d De-uglify message 2017-03-25 01:14:31 -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
skizzerz
63efb85bbb Split harlot 2017-03-08 20:13:45 -06:00
jacob1
0ec0c5d73d fix a few errors and broken messages, random cleanup 2017-02-05 12:39:52 -05:00
Ryan Schmidt
69fa7d377f Split succubus (#284)
* Split + buff succubus

When all succubi die, all entranced people now die along with them. This
should prevent an entranced person from ratting out the succubus early
on so that they go back to their team, as they lose now even if succubus
dies. One exception is if EVERY succubus idles out, then everyone that
is entranced is freed of entrancement, as it isn't their fault that they
didn't protect their friends in that case.

Dullahans now have succubi entirely removed from their list as the
likelihood they get unentranced is low, and it's easier to implement
this way.

Ensure that entranced people can vote along with ANY succubus, even if
that vote isn't the one that succeeded. Before there were cases where
they could vote along with succubus but still end up dying (particularly
in respect to a vote passing when a succubus abstained).

Clear up some message wording with regards to succubi.

Cleaned up chk_win_conditions and eliminated chk_traitor, so they make
much more sense now.

Also fixed minor issues, such as end-game saying "same number" of wolves
even if there are more wolves than villagers, hunter/vigilante dying
during night sometimes not clearing variables correctly (thus causing
premature night end) and some various stupidity going on with some old
code I wrote that doesn't have any visible effects.

* Combine all players into the same succubus death message

* Fix stylistic issues and succubus idling not working
2017-01-27 14:08:41 -05:00
Ryan Schmidt
b1271ecbe0 Merge pull request #277 from lykoss/part-quit-hooks
Improve user part/quit/nick hooks
2017-01-06 10:17:28 -07:00
nyuszika7h
a6e3c0a720 Periodically ping server to detect disconnection
In some cases, disconnection from the server can be unclean and won't be
noticed until the bot tries to send a message, which may never happen if
it did not disconnect during the game. To solve this problem, it will
now ping the server every 2 minutes by default, which will result in
a broken pipe error if the connection is dead. This won't be able to
detect netsplits where the server the bot is on stays online, because
those are impossible to correctly detect in every case.

This commit also adds a !latency command so that users can verify if the
bot is lagging.
2017-01-06 15:52:26 +01:00
Vgr E. Barry
e0f8f172d6 Update part/quit/kick/nick hooks 2016-12-19 13:29:20 -05:00
Vgr E. Barry
e8338d1ef6 Add the new command API + converted commands
Converted commands mostly use some backwards-compatibility hack. Please don't mind it, I'll eventually get to it.
2016-11-28 20:19:48 -05:00
skizzerz
73fb0c65c9 Fix coin/pony chances 2016-11-20 12:33:39 -06:00
nyuszika7h
89c7716c07 Remove unused message
Forgot to remove this in the previous commit.
2016-11-19 17:32:23 +01:00
Trigonoculus
5b0dae3cb3 Removed comma in "... played Russian roulette, and lost".
20:01:04 <+nyuszika7h> "beaky played Russian roulette, and lost"
20:01:10 <+nyuszika7h> I don't think there should be a comma there
20:01:58 <+nyuszika7h> idk though
20:02:04 <+nyuszika7h> it seems weird, though that's not a list of things
2016-11-19 09:58:57 -05:00
jacob1
b180f99051 add 0-point warnings, these need to be acknowledged but give no automatic sanctions 2016-11-16 23:56:55 -05:00
nyuszika7h
82d6760c5a !update: Don't restart the bot if already up-to-date 2016-11-16 14:59:29 +01:00
nyuszika7h
2c3aafc101 Improvements to !rules
* RULES is now not defined in settings.py, only in botconfig.py.

* If there are no rules specified, a default message is shown
  instructing users to configure it.

* The "#CHANNEL channel rules: " prefix is now automatically prepended
  (skipped if the string already contains that,
  for backwards-compatibility).

* The prefix and the no-rules message can be customized
  as they are in messages.py now.
2016-11-13 11:54:48 +01:00
skizzerz
64e6a90921 *hic*
Make doctor immunize work against doomsayer sickness and pestilence
totem
2016-11-12 23:46:45 -06:00
Ryan Schmidt
8039b5e2a1 Merge pull request #266 from lykoss/werecrow_kill
Allow werecrow to both observe and kill at the same time
2016-11-07 23:13:10 -07:00
jacob1
44433c5979 also update werecrow message in en.json 2016-11-07 21:07:33 -05:00
jacob1
cd118dbabe allow werecrow to both observe and kill at the same time 2016-11-07 20:52:58 -05:00
Vgr E. Barry
7c753b2810 Improve the error handler
Also, thanks to @nyuszika7h for the uuid idea. I took his early draft and implemented it properly as part of the refactoring I did.
2016-11-06 21:43:01 -05:00