summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/monster.cc
diff options
context:
space:
mode:
authorDavid Lawrence Ramsey <dolorous@users.sourceforge.net>2009-11-10 21:26:29 -0600
committerDavid Lawrence Ramsey <dolorous@users.sourceforge.net>2009-11-10 22:04:09 -0600
commitaf420e351770b201f4d77d1892169b4111727c91 (patch)
tree0c7d51c3c2bd5fd6fc4f79b5124cd053de4cc566 /crawl-ref/source/monster.cc
parent42876e1c49d03e594d7d129bd96fd9874ebe0106 (diff)
downloadcrawl-ref-af420e351770b201f4d77d1892169b4111727c91.tar.gz
crawl-ref-af420e351770b201f4d77d1892169b4111727c91.zip
Replace actor::is_unholy() with actor::undead_or_demonic().
Diffstat (limited to 'crawl-ref/source/monster.cc')
-rw-r--r--crawl-ref/source/monster.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/crawl-ref/source/monster.cc b/crawl-ref/source/monster.cc
index e102e81615..14020cb7f3 100644
--- a/crawl-ref/source/monster.cc
+++ b/crawl-ref/source/monster.cc
@@ -632,8 +632,8 @@ bool monsters::could_wield(const item_def &item, bool ignore_brand,
if (brand == SPWPN_ORC_SLAYING && is_orckind(this))
return (false);
- // Demonic/undead monsters won't use holy weapons.
- if (is_unholy() && is_holy_item(item))
+ // Undead and demonic monsters won't use holy weapons.
+ if (undead_or_demonic() && is_holy_item(item))
return (false);
// Holy monsters and monsters that are gifts of good gods won't
@@ -3190,7 +3190,7 @@ int monsters::res_asphyx() const
{
int res = get_mons_resists(this).asphyx;
const mon_holy_type holi = holiness();
- if (is_unholy()
+ if (undead_or_demonic()
|| holi == MH_NONLIVING
|| holi == MH_PLANT)
{
@@ -3258,12 +3258,12 @@ int monsters::res_rotting() const
int monsters::res_holy_energy(const actor *attacker) const
{
+ if (undead_or_demonic())
+ return (-2);
+
if (is_evil())
return (-1);
- if (is_unholy())
- return (-2);
-
if (is_holy()
|| is_good_god(god)
|| neutral()