From f36d7677284368597f7edf6b9a020e8b19912d75 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Mon, 12 Dec 2016 19:20:11 +0100 Subject: [PATCH] Miglioramenti al codice della Mamma --- main.py | 6 ++++-- strings.py | 3 --- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/main.py b/main.py index c80fd8b..c3d694a 100644 --- a/main.py +++ b/main.py @@ -302,12 +302,14 @@ class Mamma(Role): return r def onstartgame(self, bot, game): - target = self.player - while target == self.player: + while True: target = random.sample(game.players, 1)[0] + if target == self.player: + continue self.player.message(bot, s.mom_discovery.format(target=target.tusername, icon=target.role.icon, role=target.role.name)) + break rolepriority = [Mifioso, Investigatore, Disastro, Angelo, Derek, Terrorista, Mamma] diff --git a/strings.py b/strings.py index 4915cdf..740b70d 100644 --- a/strings.py +++ b/strings.py @@ -8,9 +8,6 @@ royal_icon = "\U0001F610" # Royal: nome ruolo royal_name = "Royal" -# Royal: come giocare -royal_help = "I Royal non hanno alcun potere speciale." - # Mifioso: icona mifia_icon = "\U0001F47F"