From 0d8720be38dc55b76fdc7b039b6bc3b2be1446aa Mon Sep 17 00:00:00 2001 From: "Vgr E.Barry" Date: Sat, 7 Mar 2015 21:03:33 -0500 Subject: [PATCH] Fix crash if amnesiac turns into doctor. Normally, doctor is blacklisted for amnesiac, so this never occurred, but with the new "random" game mode this can happen. Fortunately this was caught in testing. --- modules/wolfgame.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/wolfgame.py b/modules/wolfgame.py index 9c7f7cc..8bbdaa0 100644 --- a/modules/wolfgame.py +++ b/modules/wolfgame.py @@ -5449,7 +5449,7 @@ def transition_night(cli): pm(cli, ms, "You are the \u0002mad scientist\u0002. Targets: {0}".format(targets)) for doctor in var.ROLES["doctor"]: - if var.DOCTORS[doctor] > 0: # has immunizations remaining + if doctor in var.DOCTORS and var.DOCTORS[doctor] > 0: # has immunizations remaining pl = ps[:] random.shuffle(pl) if doctor in var.PLAYERS and not is_user_simple(doctor):