From 76b79d4cfbb5791396ed38b4e3e57dfe977c21d3 Mon Sep 17 00:00:00 2001 From: dolorous Date: Thu, 12 Jun 2008 04:55:50 +0000 Subject: 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 --- crawl-ref/source/monplace.cc | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'crawl-ref/source/monplace.cc') 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"; -- cgit v1.2.3-54-g00ecf