gramatical fixes (var.plural one by skizzerz)

This commit is contained in:
jacob1 2014-12-28 17:06:15 -05:00
parent 356b9a25ba
commit 8dce5a4d16
2 changed files with 10 additions and 10 deletions

View File

@ -3901,12 +3901,13 @@ def shoot(cli, nick, chan, rest):
var.LOGGER.logMessage("{0} shoots {1} with a silver bullet!".format(nick, victim))
realrole = var.get_role(victim)
victimrole = var.get_reveal_role(victim)
an = "n" if victimrole[0] in ('a', 'e', 'i', 'o', 'u') else ""
if realrole in var.WOLF_ROLES:
if var.ROLE_REVEAL:
cli.msg(chan, ("\u0002{0}\u0002 is a \u0002{1}\u0002, and is dying from "+
"the silver bullet.").format(victim, victimrole))
var.LOGGER.logMessage(("{0} is a {1}, and is dying from the "+
"silver bullet.").format(victim, victimrole))
cli.msg(chan, ("\u0002{0}\u0002 is a{1} \u0002{2}\u0002, and is dying from "+
"the silver bullet.").format(victim,an, victimrole))
var.LOGGER.logMessage(("{0} is a{1} {2}, and is dying f rom the "+
"silver bullet.").format(victim, an, victimrole))
else:
cli.msg(chan, ("\u0002{0}\u0002 is a wolf, and is dying from "+
"the silver bullet.").format(victim))
@ -3922,7 +3923,6 @@ def shoot(cli, nick, chan, rest):
"but was {1}fatally injured.").format(victim, accident))
var.LOGGER.logMessage("{0} is not a wolf but was {1}fatally injured.".format(victim, accident))
if var.ROLE_REVEAL:
an = "n" if victimrole[0] in ("a", "e", "i", "o", "u") else ""
cli.msg(chan, "The village has sacrificed a{0} \u0002{1}\u0002.".format(an, victimrole))
var.LOGGER.logMessage("The village has sacrificed a {0}.".format(victimrole))
if not del_player(cli, victim, killer_role = var.get_role(nick)):

View File

@ -213,11 +213,11 @@ LYNCH_MESSAGES_NO_REVEAL = ("The villagers, after much debate, finally decide on
"Resigned to the inevitable, \u0002{0}\u0002 is led to the gallows.",
"Before the rope is pulled, \u0002{0}\u0002 throws a grenade at the mob. The grenade explodes early.")
QUIT_MESSAGES= ("\u0002{0}\u0002, a{1} \u0002{2}\u0002, suddenly falls over dead before the astonished villagers.",
"A pack of wild animals sets upon \u0002{0}\u0002. Soon the \u0002{2}\u0002 is only a pile of bones and a lump in the beasts' stomaches.",
"A pack of wild animals sets upon \u0002{0}\u0002. Soon the \u0002{2}\u0002 is only a pile of bones and a lump in the beasts' stomachs.",
"\u0002{0}\u0002, a{1} \u0002{2}\u0002, fell off the roof of their house and is now dead.",
"\u0002{0}\u0002 is crushed to death by a falling tree. The villagers desperately try to save the \u0002{2}\u0002, but it is too late.")
QUIT_MESSAGES_NO_REVEAL = ("\u0002{0}\u0002 suddenly falls over dead before the astonished villagers.",
"A pack of wild animals sets upon \u0002{0}\u0002. Soon they are only a pile of bones and a lump in the beasts' stomaches.",
"A pack of wild animals sets upon \u0002{0}\u0002. Soon they are only a pile of bones and a lump in the beasts' stomachs.",
"\u0002{0}\u0002 fell off the roof of their house and is now dead.",
"\u0002{0}\u0002 is crushed to death by a falling tree. The villagers desperately try to save them, but it is too late.")
@ -259,9 +259,9 @@ def is_owner(nick):
return False
def plural(role):
if role == "wolf": return "wolves"
elif role == "person": return "people"
else: return role + "s"
bits = role.split()
bits[-1] = {"person": "people", "wolf": "wolves"}.get(bits[-1], bits[-1] + "s")
return " ".join(bits)
def list_players(roles = None):
if roles == None: