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.
This commit is contained in:
Vgr E.Barry 2015-03-07 21:03:33 -05:00
parent a4a6546478
commit 0d8720be38

View File

@ -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):