From 3890bcbfc7fd27fde2462d1c1905159405bd52cc Mon Sep 17 00:00:00 2001 From: Griatch Date: Tue, 12 Apr 2016 00:00:18 +0200 Subject: [PATCH] Made the mob invulnerable if it has no health Attribute set. Resolves --- 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 9656fb570d..2e331cb1f6 100644 --- a/evennia/contrib/tutorial_world/mob.py +++ b/evennia/contrib/tutorial_world/mob.py @@ -383,6 +383,11 @@ class Mob(tut_objects.TutorialObject): Someone landed a hit on us. Check our status and start attacking if not already doing so. """ + if self.db.health is None: + # health not set - this can't be damaged. + attacker.msg(self.db.weapon_ineffective_msg) + return + if not self.ndb.is_immortal: if not weapon.db.magic: # not a magic weapon - divide away magic resistance