summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/monplace.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-11 17:43:14 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-11 17:43:14 +0000
commitbca6689d1ab64fa808c4fc140f6bd8ca2d9c4d95 (patch)
tree4a3ab02116717ddf3721b6c41a6b704d304c8936 /crawl-ref/source/monplace.cc
parenteadb30016eee038058109c1ebbc9e772ec4317a3 (diff)
downloadcrawl-ref-bca6689d1ab64fa808c4fc140f6bd8ca2d9c4d95.tar.gz
crawl-ref-bca6689d1ab64fa808c4fc140f6bd8ca2d9c4d95.zip
If you somehow summon a holy being while worshipping an evil god, it's
now enraged by your unholy aura. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4999 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/monplace.cc')
-rw-r--r--crawl-ref/source/monplace.cc22
1 files changed, 15 insertions, 7 deletions
diff --git a/crawl-ref/source/monplace.cc b/crawl-ref/source/monplace.cc
index 4fbb8095cf..74ae0e08a2 100644
--- a/crawl-ref/source/monplace.cc
+++ b/crawl-ref/source/monplace.cc
@@ -1908,12 +1908,14 @@ bool player_angers_monster(monsters *mon, bool actual)
{
const bool holy =
(is_good_god(you.religion) && mons_is_evil_or_unholy(mon));
+ const bool unholy =
+ (is_evil_god(you.religion) && mons_is_holy(mon));
const bool antimagical =
(you.religion == GOD_TROG && mons_is_magic_user(mon));
// get the drawbacks, not the benefits...
// (to prevent e.g. demon-scumming)
- if (holy || antimagical)
+ if (holy || unholy || antimagical)
{
if (actual
&& (mon->attitude != ATT_HOSTILE || mon->has_ench(ENCH_CHARM)))
@@ -1921,23 +1923,29 @@ bool player_angers_monster(monsters *mon, bool actual)
mon->attitude = ATT_HOSTILE;
mon->del_ench(ENCH_CHARM);
behaviour_event(mon, ME_ALERT, MHITYOU);
+
if (see_grid(mon->x, mon->y) && player_monster_visible(mon))
{
std::string aura;
- if (holy && antimagical)
- aura = "holy, anti-magical";
- else if (holy)
- aura = "holy";
- else if (antimagical)
- aura = "anti-magical";
+ if (holy || unholy || antimagical)
+ {
+ if (holy)
+ aura = "holy";
+ else if (unholy)
+ aura = "unholy";
+ else if (antimagical)
+ aura = "anti-magical";
+ }
mprf("%s is enraged by your %s aura!",
mon->name(DESC_CAP_THE).c_str(), aura.c_str());
}
}
+
return (true);
}
+
return (false);
}