From 42876e1c49d03e594d7d129bd96fd9874ebe0106 Mon Sep 17 00:00:00 2001 From: David Lawrence Ramsey Date: Tue, 10 Nov 2009 21:12:28 -0600 Subject: Add actor::undead_or_demonic() to check for those holiness types. --- crawl-ref/source/player.cc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'crawl-ref/source/player.cc') diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index 6dc93fb6f4..c3e79c0cfd 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -6363,6 +6363,13 @@ mon_holy_type player::holiness() const return (MH_NATURAL); } +bool player::undead_or_demonic() const +{ + const mon_holy_type holi = holiness(); + + return (holi == MH_UNDEAD || holi == MH_DEMONIC); +} + bool player::is_holy() const { if (is_good_god(religion)) -- cgit v1.2.3-54-g00ecf