From 45df513e61fd1731513d7b03631ad35b0d8bc126 Mon Sep 17 00:00:00 2001 From: David Lawrence Ramsey Date: Thu, 5 Nov 2009 18:20:24 -0600 Subject: In is_evil(), mark monsters with evil attack flavors. --- crawl-ref/source/mon-data.h | 2 +- crawl-ref/source/monster.cc | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'crawl-ref') diff --git a/crawl-ref/source/mon-data.h b/crawl-ref/source/mon-data.h index e4c1bc8331..2ea57ce94c 100644 --- a/crawl-ref/source/mon-data.h +++ b/crawl-ref/source/mon-data.h @@ -1271,7 +1271,7 @@ static monsterentry mondata[] = { { MONS_ORANGE_RAT, 'r', LIGHTRED, "orange rat", - M_WARM_BLOOD | M_EVIL | M_GLOWS, + M_WARM_BLOOD | M_GLOWS, MR_NO_FLAGS, 250, 10, MONS_RAT, MONS_ORANGE_RAT, MH_NATURAL, -3, { {AT_BITE, AF_DRAIN_XP, 20}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK }, diff --git a/crawl-ref/source/monster.cc b/crawl-ref/source/monster.cc index fd07573d2e..bc1836a8ce 100644 --- a/crawl-ref/source/monster.cc +++ b/crawl-ref/source/monster.cc @@ -2886,6 +2886,12 @@ bool monsters::is_evil() const if (has_evil_spell()) return (true); + if (has_attack_flavour(AF_DRAIN_XP) + || has_attack_flavour(AF_VAMPIRIC)) + { + return (true); + } + if (mons_class_flag(type, M_EVIL)) return (true); -- cgit v1.2.3-54-g00ecf