mirror of
https://github.com/RYGhub/royal-mifia.git
synced 2025-02-16 13:24:06 +00:00
The Mifia can miss attacks
This commit is contained in:
parent
183543030a
commit
2e160b6e16
2 changed files with 23 additions and 5 deletions
21
main.py
21
main.py
|
@ -494,10 +494,15 @@ class Game:
|
|||
killed = killlist.pop()
|
||||
if killed.alive:
|
||||
if killed.protectedby is None:
|
||||
killed.kill(bot, self)
|
||||
self.message(bot, s.mifia_target_killed.format(target=killed.tusername,
|
||||
icon=killed.role.icon,
|
||||
role=killed.role.name))
|
||||
if self.missingmifia and random.randrange(1, 20) < 2:
|
||||
# Colpo mancato
|
||||
self.message(bot, s.mifia_target_missed.format(target=killed.tusername))
|
||||
else:
|
||||
# Uccisione riuscita
|
||||
killed.kill(bot, self)
|
||||
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,
|
||||
|
@ -739,6 +744,14 @@ def config(bot, update):
|
|||
game.endconfig(bot)
|
||||
elif cmd[1].lower() == 'unica':
|
||||
game.votingmifia = True
|
||||
game.configstep += 1
|
||||
else:
|
||||
game.message(bot, s.error_invalid_config)
|
||||
elif game.configstep == 7:
|
||||
if cmd[1].lower() == 'perfette':
|
||||
game.missingmifia = False
|
||||
elif cmd[1].lower() == 'mancare':
|
||||
game.missingmifia = True
|
||||
game.endconfig(bot)
|
||||
else:
|
||||
game.message(bot, s.error_invalid_config)
|
||||
|
|
|
@ -30,6 +30,10 @@ mifia_power_description = "Puoi selezionare come bersaglio di un'assassinio una
|
|||
"`/power {gamename} nomeutentebersaglio`\n" \
|
||||
"Alla fine del giorno, tutti i bersagli dei Mifiosi saranno eliminati!\n"
|
||||
|
||||
# Mifioso: uccisione fallita
|
||||
mifia_target_missed = "@{target} ha subito un tentativo di assassinio da parte della Mifia!\n" \
|
||||
"Per fortuna, è riuscito a evitare l'attacco."
|
||||
|
||||
# Investigatore: icona
|
||||
detective_icon = "\U0001F575"
|
||||
|
||||
|
@ -271,4 +275,5 @@ config_list = ["Quanti *Mifiosi* devono essere nella partita?",
|
|||
"Quanti *Derek* devono essere nella partita?",
|
||||
"Quanti *Disastri* devono essere nella partita?",
|
||||
"I mifiosi possono uccidere una persona a `testa` al giorno "
|
||||
"o votano e decidono un'`unica` persona da uccidere per tutta la squadra?"]
|
||||
"o votano e decidono un'`unica` persona da uccidere per tutta la squadra?",
|
||||
"La mifia può `mancare` le uccisioni o i loro attacchi sono `perfetti`?"]
|
||||
|
|
Loading…
Add table
Reference in a new issue