summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/monplace.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-12 04:55:50 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-12 04:55:50 +0000
commit76b79d4cfbb5791396ed38b4e3e57dfe977c21d3 (patch)
tree7d8e7c3e836cb417f313b4f448fe7406c6b03f5c /crawl-ref/source/monplace.cc
parent3aaa5e00050a0f7a3027ceb9dc6cb8663d4eb968 (diff)
downloadcrawl-ref-76b79d4cfbb5791396ed38b4e3e57dfe977c21d3.tar.gz
crawl-ref-76b79d4cfbb5791396ed38b4e3e57dfe977c21d3.zip
Clean up handling of killing mutators or rotters (i.e., chaotic beings),
and make them become enraged by your lawful aura if you start worshipping Zin. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5750 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/monplace.cc')
-rw-r--r--crawl-ref/source/monplace.cc18
1 files changed, 14 insertions, 4 deletions
diff --git a/crawl-ref/source/monplace.cc b/crawl-ref/source/monplace.cc
index 3b0c2bab3c..274be57a49 100644
--- a/crawl-ref/source/monplace.cc
+++ b/crawl-ref/source/monplace.cc
@@ -2009,21 +2009,26 @@ coord_def find_newmons_square(int mons_class, const coord_def &p)
}
bool player_will_anger_monster(monster_type type, bool *holy,
- bool *unholy, bool *antimagical)
+ bool *unholy, bool *lawful,
+ bool *antimagical)
{
monsters dummy;
dummy.type = type;
- return (player_will_anger_monster(&dummy, holy, unholy, antimagical));
+ return (player_will_anger_monster(&dummy, holy, unholy, lawful,
+ antimagical));
}
bool player_will_anger_monster(monsters *mon, bool *holy,
- bool *unholy, bool *antimagical)
+ bool *unholy, bool *lawful,
+ bool *antimagical)
{
const bool is_holy =
(is_good_god(you.religion) && mons_is_evil_or_unholy(mon));
const bool is_unholy =
(is_evil_god(you.religion) && mons_is_holy(mon));
+ const bool is_lawful =
+ (is_lawful_god(you.religion) && mons_is_chaotic(mon));
const bool is_antimagical =
(you.religion == GOD_TROG && mons_is_magic_user(mon));
@@ -2031,6 +2036,8 @@ bool player_will_anger_monster(monsters *mon, bool *holy,
*holy = is_holy;
if (unholy)
*unholy = is_unholy;
+ if (lawful)
+ *lawful = is_lawful;
if (antimagical)
*antimagical = is_antimagical;
@@ -2041,10 +2048,11 @@ bool player_angers_monster(monsters *mon)
{
bool holy;
bool unholy;
+ bool lawful;
bool antimagical;
// Get the drawbacks, not the benefits... (to prevent e.g. demon-scumming).
- if (player_will_anger_monster(mon, &holy, &unholy, &antimagical))
+ if (player_will_anger_monster(mon, &holy, &unholy, &lawful, &antimagical))
{
if (mon->attitude != ATT_HOSTILE || mon->has_ench(ENCH_CHARM))
{
@@ -2060,6 +2068,8 @@ bool player_angers_monster(monsters *mon)
aura = "holy";
else if (unholy)
aura = "unholy";
+ else if (lawful)
+ aura = "lawful";
else if (antimagical)
aura = "anti-magical";