diff options
author | David Lawrence Ramsey <dolorous@users.sourceforge.net> | 2009-11-05 18:20:24 -0600 |
---|---|---|
committer | David Lawrence Ramsey <dolorous@users.sourceforge.net> | 2009-11-05 18:20:24 -0600 |
commit | 45df513e61fd1731513d7b03631ad35b0d8bc126 (patch) | |
tree | d32a924e3bb1f20c6e62523d0138583e50e08a44 /crawl-ref | |
parent | dae931699043dca46c7617bf182d1216b1d35e99 (diff) | |
download | crawl-ref-45df513e61fd1731513d7b03631ad35b0d8bc126.tar.gz crawl-ref-45df513e61fd1731513d7b03631ad35b0d8bc126.zip |
In is_evil(), mark monsters with evil attack flavors.
Diffstat (limited to 'crawl-ref')
-rw-r--r-- | crawl-ref/source/mon-data.h | 2 | ||||
-rw-r--r-- | crawl-ref/source/monster.cc | 6 |
2 files changed, 7 insertions, 1 deletions
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); |