Disable amnesiac pending rewrite

This commit is contained in:
skizzerz 2014-07-31 22:15:23 -05:00
parent cc3edf0997
commit 7f269874d6
2 changed files with 8 additions and 2 deletions

View File

@ -4074,6 +4074,7 @@ def start(cli, nick, chann_, rest):
continue # sharpshooter gets applied specially continue # sharpshooter gets applied specially
possible = pl[:] possible = pl[:]
for cannotbe in var.list_players(restrictions): for cannotbe in var.list_players(restrictions):
if cannotbe in possible:
possible.remove(cannotbe) possible.remove(cannotbe)
if len(possible) < len(var.ROLES[template]): if len(possible) < len(var.ROLES[template]):
cli.msg(chan, "Not enough valid targets for the {0} template.".format(template)) cli.msg(chan, "Not enough valid targets for the {0} template.".format(template))

View File

@ -147,6 +147,9 @@ TEMPLATE_RESTRICTIONS = {"cursed villager" : ["wolf", "wolf cub", "werecrow", "s
"bureaucrat" : [], "bureaucrat" : [],
} }
# Roles listed here cannot be used in !fgame roles=blah. If they are defined in ROLE_GUIDE they may still be used.
DISABLED_ROLES = ["amnesiac"]
NO_VICTIMS_MESSAGES = ("The body of a young penguin pet is found.", NO_VICTIMS_MESSAGES = ("The body of a young penguin pet is found.",
"A pool of blood and wolf paw prints are found.", "A pool of blood and wolf paw prints are found.",
"Traces of wolf fur are found.") "Traces of wolf fur are found.")
@ -251,7 +254,9 @@ class ChangedRolesMode(object):
raise InvalidModeException("Invalid syntax for mode roles. arg={0}".format(arg)) raise InvalidModeException("Invalid syntax for mode roles. arg={0}".format(arg))
role, num = change role, num = change
try: try:
if role.lower() in self.ROLE_GUIDE: if role.lower() in DISABLED_ROLES:
raise InvalidModeException("The role \u0002{0}\u0002 has been disabled.".format(role))
elif role.lower() in self.ROLE_GUIDE:
self.ROLE_GUIDE[role.lower()] = tuple([int(num)] * len(ROLE_INDEX)) self.ROLE_GUIDE[role.lower()] = tuple([int(num)] * len(ROLE_INDEX))
elif role.lower() == "default" and num.lower() in self.ROLE_GUIDE: elif role.lower() == "default" and num.lower() in self.ROLE_GUIDE:
if num.lower() == "villager" or num.lower() == "cultist": if num.lower() == "villager" or num.lower() == "cultist":