Make fallen angel kill ALL of the protectors, not just the one that would have taken effect

This commit is contained in:
skizzerz 2015-07-06 13:38:42 -05:00
parent 51d747e7d1
commit 627da811f8

View File

@ -3213,7 +3213,6 @@ def transition_day(cli, gameid=0):
if len(var.ROLES["fallen angel"]) > 0: if len(var.ROLES["fallen angel"]) > 0:
for p, t in list(protected.items()): for p, t in list(protected.items()):
if p in bywolves: if p in bywolves:
if t == "angel":
for g in var.ROLES["guardian angel"]: for g in var.ROLES["guardian angel"]:
if var.GUARDED.get(g) == p and random.random() < var.FALLEN_ANGEL_KILLS_GUARDIAN_ANGEL_CHANCE: if var.GUARDED.get(g) == p and random.random() < var.FALLEN_ANGEL_KILLS_GUARDIAN_ANGEL_CHANCE:
if g in protected: if g in protected:
@ -3224,7 +3223,6 @@ def transition_day(cli, gameid=0):
if g not in victims_set: if g not in victims_set:
victims_set.add(g) victims_set.add(g)
onlybywolves.add(g) onlybywolves.add(g)
elif t == "bodyguard":
for g in var.ROLES["bodyguard"]: for g in var.ROLES["bodyguard"]:
if var.GUARDED.get(g) == p: if var.GUARDED.get(g) == p:
if g in protected: if g in protected:
@ -3235,7 +3233,6 @@ def transition_day(cli, gameid=0):
if g not in victims_set: if g not in victims_set:
victims_set.add(g) victims_set.add(g)
onlybywolves.add(g) onlybywolves.add(g)
elif t == "totem":
# we'll never end up killing a shaman who gave out protection, but delete the totem since # we'll never end up killing a shaman who gave out protection, but delete the totem since
# story-wise it gets demolished at night by the FA # story-wise it gets demolished at night by the FA
while p in havetotem: while p in havetotem:
@ -3243,6 +3240,8 @@ def transition_day(cli, gameid=0):
brokentotem.add(p) brokentotem.add(p)
if p in protected: if p in protected:
del protected[p] del protected[p]
if p in var.ACTIVE_PROTECTIONS:
del var.ACTIVE_PROTECTIONS[p]
if var.ALPHA_ENABLED: # check for bites if var.ALPHA_ENABLED: # check for bites
for (alpha, desired) in var.BITE_PREFERENCES.items(): for (alpha, desired) in var.BITE_PREFERENCES.items():