Made the mob invulnerable if it has no health Attribute set. Resolves

This commit is contained in:
Griatch 2016-04-12 00:00:18 +02:00
parent f57aaa65cd
commit 3890bcbfc7

View file

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