From 29d2a1f83edf7bf9c289ff26d1cd4295fefae876 Mon Sep 17 00:00:00 2001 From: nyuszika7h Date: Sat, 16 Apr 2016 15:34:06 +0200 Subject: [PATCH] Add an option for the pony to land on the tosser --- messages/en.json | 3 ++- src/wolfgame.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/messages/en.json b/messages/en.json index 31d0963..cfc2fd0 100644 --- a/messages/en.json +++ b/messages/en.json @@ -762,7 +762,8 @@ "pony_toss": "\u0002{0}\u0002 tosses a pony into the air...", "pony_choices": [ "hoof", - "plot" + "plot", + "{nick}" ], "pony_land": "The pony lands on \u0002{0}\u0002.", "pony_fly": "The pony flies away.", diff --git a/src/wolfgame.py b/src/wolfgame.py index 50ae1a4..171b0b2 100644 --- a/src/wolfgame.py +++ b/src/wolfgame.py @@ -8558,10 +8558,10 @@ def pony(cli, nick, chan, rest): reply(cli, nick, chan, messages["pony_toss"].format(nick)) - if random.random() < 1/3: + if random.random() < 1 / (len(messages["pony_choices"]) + 1): reply(cli, nick, chan, messages["pony_fly"]) else: - pony = random.choice(messages["pony_choices"]) + pony = random.choice(messages["pony_choices"]).format(nick=nick) cmsg = messages["pony_land"].format(pony) reply(cli, nick, chan, cmsg)