summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-21 16:34:38 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-21 16:34:38 +0000
commitd9bc7dea9dcba85e9db47593ba32ccc49df70221 (patch)
tree3a6793074ca0d30d28320668e10a6717f97ce638
parentb17182f59fdb23979c9dbd910f57b0ec5675c5c9 (diff)
downloadcrawl-ref-d9bc7dea9dcba85e9db47593ba32ccc49df70221.tar.gz
crawl-ref-d9bc7dea9dcba85e9db47593ba32ccc49df70221.zip
TSO no longer thinks it's unchivalric to attack evil creatures of any kind.
[Maybe this should only be natural evil ones?] Fixes 2021950. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6625 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/source/monstuff.cc4
-rw-r--r--crawl-ref/source/religion.cc3
2 files changed, 4 insertions, 3 deletions
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index edf4a1e124..98cf149102 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -893,7 +893,7 @@ void monster_die(monsters *monster, killer_type killer, int i, bool silent)
monster->hit_dice, true, monster);
}
- if (mons_class_flag(monster->type, M_EVIL)
+ if (mons_is_evil(monster)
&& mons_holiness(monster) == MH_NATURAL)
{
did_god_conduct(DID_KILL_NATURAL_EVIL,
@@ -1067,7 +1067,7 @@ void monster_die(monsters *monster, killer_type killer, int i, bool silent)
notice |= did_god_conduct( DID_LIVING_KILLED_BY_SERVANT,
monster->hit_dice );
- if (mons_class_flag( monster->type, M_EVIL ))
+ if (mons_is_evil(monster))
{
notice |=
did_god_conduct(
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index 7fb387ea2f..5a2b02235e 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -5962,5 +5962,6 @@ int piety_breakpoint(int i)
bool tso_unchivalric_attack_safe_monster(const monsters *mon)
{
const mon_holy_type holiness = mon->holiness();
- return (holiness != MH_NATURAL && holiness != MH_HOLY);
+ return (mons_is_evil(mon)
+ || (holiness != MH_NATURAL && holiness != MH_HOLY));
}