From e331b25e7d59d84f1e0b91fc51cdaa2dab5358f8 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sun, 11 Dec 2016 17:15:23 +0100 Subject: [PATCH] bugfix --- main.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/main.py b/main.py index fdc89fe..35a1c97 100644 --- a/main.py +++ b/main.py @@ -304,10 +304,12 @@ class Mamma(Role): return r def onstartgame(self, bot, game): - target = random.sample(game.players, 1)[0] - self.player.message(bot, s.mom_discovery.format(target=target.tusername, - icon=target.role.icon, - role=target.role.name)) + target = None + while target != self.player: + target = random.sample(game.players, 1)[0] + self.player.message(bot, s.mom_discovery.format(target=target.tusername, + icon=target.role.icon, + role=target.role.name))