From 9cae7682a8a74f52de1ab44d30f604334416ddb8 Mon Sep 17 00:00:00 2001 From: James Lu Date: Fri, 20 May 2016 21:13:39 -0700 Subject: [PATCH] games: implement eightball (#122) --- plugins/games.py | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/plugins/games.py b/plugins/games.py index 7b82522..a5b757f 100644 --- a/plugins/games.py +++ b/plugins/games.py @@ -46,6 +46,36 @@ def dice(irc, source, args): gameclient.add_cmd(dice, 'd') gameclient.add_cmd(dice) +eightball_responses = ["It is certain.", + "It is decidedly so.", + "Without a doubt.", + "Yes, definitely.", + "You may rely on it.", + "As I see it, yes.", + "Most likely.", + "Outlook good.", + "Yes.", + "Signs point to yes.", + "Reply hazy, try again.", + "Ask again later.", + "Better not tell you now.", + "Cannot predict now.", + "Concentrate and ask again.", + "Don't count on it.", + "My reply is no.", + "My sources say no.", + "Outlook not so good.", + "Very doubtful."] +def eightball(irc, source, args): + """[] + + Asks the Magic 8-ball a question. + """ + reply(irc, random.choice(eightball_responses)) +gameclient.add_cmd(eightball) +gameclient.add_cmd(eightball, '8ball') +gameclient.add_cmd(eightball, '8b') + # loading def main(irc=None): """Main function, called during plugin loading at start."""