summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-09 03:00:03 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-09 03:00:03 +0000
commit5829e56f81f079c72bdd0c3ad7a9d3cadc58b1c7 (patch)
treeda4dcae4b31d41a604463e787eb72f05cb8c8d46
parent6eb9841f76396644005a047518c775e7d867db62 (diff)
downloadcrawl-ref-5829e56f81f079c72bdd0c3ad7a9d3cadc58b1c7.tar.gz
crawl-ref-5829e56f81f079c72bdd0c3ad7a9d3cadc58b1c7.zip
Fix player_will_anger_monster() so that any of the boolean pointers being
non-NULL doesn't force the return value to be true. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5631 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/source/monplace.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/crawl-ref/source/monplace.cc b/crawl-ref/source/monplace.cc
index 0db9cc3302..0096b93231 100644
--- a/crawl-ref/source/monplace.cc
+++ b/crawl-ref/source/monplace.cc
@@ -2039,6 +2039,8 @@ bool player_angers_monster(monsters *mon)
// Get the drawbacks, not the benefits... (to prevent e.g. demon-scumming).
if (player_will_anger_monster(mon, &holy, &unholy, &antimagical))
{
+ ASSERT (holy || unholy || antimagical);
+
if (mon->attitude != ATT_HOSTILE || mon->has_ench(ENCH_CHARM))
{
mon->attitude = ATT_HOSTILE;