From 0c571620728cb2f0139f4d8fce2319d4edfba6bb Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sat, 28 May 2016 00:40:30 +0200 Subject: [PATCH] cosa --- main.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/main.py b/main.py index f001082..826b454 100644 --- a/main.py +++ b/main.py @@ -385,10 +385,15 @@ class Game: random.shuffle(killlist) killed = killlist.pop() if killed.alive: - self.message(bot, s.mifia_target_killed.format(target=killed.tusername, - icon=killed.role.icon, - role=killed.role.name)) - killed.kill() + if killed.protectedby is None: + killed.kill() + self.message(bot, s.mifia_target_killed.format(target=killed.tusername, + icon=killed.role.icon, + role=killed.role.name)) + else: + self.message(bot, s.mifia_target_protected.format(target=killed.tusername, + icon=killed.protectedby.role.icon, + protectedby=killed.protectedby.tusername)) # Attiva il onendday dei mifiosi for player in self.mifiosiingame: if isinstance(player.role, Mifioso) and player.alive: