1
Fork 0
mirror of https://github.com/RYGhub/royal-mifia.git synced 2025-02-16 13:24:06 +00:00

bugfixdue

This commit is contained in:
Steffo 2016-12-09 17:21:41 +01:00
parent 7c972b246c
commit c10497add3

13
main.py
View file

@ -93,10 +93,15 @@ class Mifioso(Role):
# Uccidi il bersaglio se non è protetto da un Angelo.
if self.target is not None:
if self.target.protectedby is None:
self.target.kill(bot, game)
game.message(bot, s.mifia_target_killed.format(target=self.target.tusername,
icon=self.target.role.icon,
role=self.target.role.name))
if game.missingmifia and random.randrange(0, 100) < game.misschance:
# Colpo mancato
game.message(bot, s.mifia_target_missed.format(target=self.target.tusername))
else:
# Uccisione riuscita
self.target.kill(bot, self)
game.message(bot, s.mifia_target_killed.format(target=self.target.tusername,
icon=self.target.role.icon,
role=self.target.role.name))
else:
game.message(bot, s.mifia_target_protected.format(target=self.target.tusername,
icon=self.target.protectedby.role.icon,