From 6a9ece4536128a6f1584483f225a608ace5473bb Mon Sep 17 00:00:00 2001 From: Griatch Date: Sun, 20 Sep 2020 11:11:17 +0200 Subject: [PATCH] Minor fix in tutorialworld --- evennia/contrib/tutorial_world/mob.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/evennia/contrib/tutorial_world/mob.py b/evennia/contrib/tutorial_world/mob.py index a6bc6e2387..730a9bbb04 100644 --- a/evennia/contrib/tutorial_world/mob.py +++ b/evennia/contrib/tutorial_world/mob.py @@ -377,6 +377,11 @@ class Mob(tut_objects.TutorialObject): attack_cmd = random.choice(("thrust", "pierce", "stab", "slash", "chop")) self.execute_cmd("%s %s" % (attack_cmd, target)) + if target.db.health is None: + # This is not an attackable target + logger.log_err(f"{self.key} found {target} had an `health` attribute of `None`.") + return + # analyze the current state if target.db.health <= 0: # we reduced the target to <= 0 health. Move them to the