Merge pull request #327 from ammongit/minion-notify

Send "has_minions" message to wolves.
This commit is contained in:
Em Barry 2018-05-01 13:41:04 -04:00 committed by GitHub
commit d4968751d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

@ -199,6 +199,7 @@
"clone_success": "You will now be cloning \u0002{0}\u0002 if they die.",
"clone_wolf": "\u0002{0}\u0002 cloned \u0002{1}\u0002 and has now become a wolf!",
"no_other_wolves": "There are no other wolves.",
"has_minions": "You have \u0002{0}\u0002 {1} at your command!",
"lover_suicide": "Saddened by the loss of their lover, \u0002{0}\u0002, a{1} \u0002{2}\u0002, commits suicide.",
"lover_suicide_no_reveal": "Saddened by the loss of their lover, \u0002{0}\u0002 commits suicide.",
"assassin_fail_totem": "Before dying, \u0002{0}\u0002 quickly attempts to slit \u0002{1}\u0002's throat; however, {1}'s totem emits a brilliant flash of light, causing the attempt to miss.",

View File

@ -398,6 +398,12 @@ def on_transition_night_end(evt, var):
an = "n"
wolf.send(messages["wolf_simple"].format(an, tags, role)) # !simple
if var.FIRST_NIGHT:
minions = len(get_all_players(("minion",)))
if minions > 0:
wolf.send(messages["has_minions"].format(minions, plural("minion", minions)))
pl = ps[:]
random.shuffle(pl)
pl.remove(wolf) # remove self from list