summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/dactions.cc
diff options
context:
space:
mode:
authorShmuale Mark <shm.mark@gmail.com>2014-06-19 08:54:13 -0400
committerShmuale Mark <shm.mark@gmail.com>2014-06-19 12:09:55 -0400
commit61e7c1565861f7a89ca6f0554d135d64ec55a6fe (patch)
tree5bb02d34013d20e3e95c06b541467729eebf8557 /crawl-ref/source/dactions.cc
parentdf118164fecb6f63ba9eee7a6a750bee6b4b940f (diff)
downloadcrawl-ref-61e7c1565861f7a89ca6f0554d135d64ec55a6fe.tar.gz
crawl-ref-61e7c1565861f7a89ca6f0554d135d64ec55a6fe.zip
Try to reduce duplication in Recite code.
is_chaotic() and is_unclean() have been changed to return an int roughly equal to what would have been returned before by the Zin recite function. Some bool flags were added to the function to make it still work right for the other uses (e.g. silver). Prince Ribbit is no longer specially vulnerable to Recite, and insane/ sluggish uniques are unclean rather than chaotic, which seems more consistent with the other uses of the terms. The special case for nonliving and plant monsters to be unrecitable is removed.
Diffstat (limited to 'crawl-ref/source/dactions.cc')
-rw-r--r--crawl-ref/source/dactions.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/crawl-ref/source/dactions.cc b/crawl-ref/source/dactions.cc
index c5e8c08360..43ee0a4233 100644
--- a/crawl-ref/source/dactions.cc
+++ b/crawl-ref/source/dactions.cc
@@ -85,7 +85,7 @@ bool mons_matches_daction(const monster* mon, daction_type act)
case DACT_ALLY_UNHOLY_EVIL:
return mon->wont_attack() && (mon->is_unholy() || mon->is_evil());
case DACT_ALLY_UNCLEAN_CHAOTIC:
- return mon->wont_attack() && (mon->is_unclean() || mon->is_chaotic());
+ return mon->wont_attack() && (mon->unclean() || mon->chaos());
case DACT_ALLY_SPELLCASTER:
return mon->wont_attack() && mon->is_actual_spellcaster();
case DACT_ALLY_YRED_SLAVE: