From 15ce88b20a8fadc6dc2bd795832705d11254c0ea Mon Sep 17 00:00:00 2001 From: mutantmonkey Date: Sat, 11 Dec 2010 15:58:43 -0500 Subject: [PATCH] Bot can now have too much food --- modules/botsnack.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/botsnack.py b/modules/botsnack.py index d3f1639..52b09e8 100755 --- a/modules/botsnack.py +++ b/modules/botsnack.py @@ -10,9 +10,16 @@ def botsnack(phenny, input): messages = ["Om nom nom", "Delicious, thanks!"] response = random.choice(messages) - phenny.say(response) + botsnack.snacks += 1 + + if botsnack.snacks % 7 == 0: + phenny.say("Too much food!") + phenny.do("explodes") + else: + phenny.say(response) botsnack.commands = ['botsnack'] botsnack.priority = 'low' +botsnack.snacks = 0 if __name__ == '__main__': print __doc__.strip()