diff options
author | Jude Brown <bookofjude@users.sourceforge.net> | 2010-01-16 18:48:09 +1000 |
---|---|---|
committer | Jude Brown <bookofjude@users.sourceforge.net> | 2010-01-16 18:49:28 +1000 |
commit | 7423e92a652914c2085e76410d3dcbe914d59b6b (patch) | |
tree | dc0b9302d837195b74d1463d354def8278eab9dc /crawl-ref/source/mislead.cc | |
parent | decb6b25c768d8e4ea0a2af37e5b4c699d86b036 (diff) | |
download | crawl-ref-7423e92a652914c2085e76410d3dcbe914d59b6b.tar.gz crawl-ref-7423e92a652914c2085e76410d3dcbe914d59b6b.zip |
Provide "waste of time" checks for Mislead, fake Mara summon, player ghost.
This moves the code out of the relevant functions and into the
ms_waste_of_time function in mon-util.cc.
Diffstat (limited to 'crawl-ref/source/mislead.cc')
-rw-r--r-- | crawl-ref/source/mislead.cc | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/crawl-ref/source/mislead.cc b/crawl-ref/source/mislead.cc index 64c574d97a..790a84886b 100644 --- a/crawl-ref/source/mislead.cc +++ b/crawl-ref/source/mislead.cc @@ -1,5 +1,5 @@ /* File: mislead.cc - * Summary: Handling of the Mislead spell and stats + * Summary: Handling of Mara's Mislead spell and stats, plus fakes. */ #include "AppHdr.h" @@ -83,9 +83,7 @@ void mons_cast_mislead(monsters *monster) if (monster->foe != MHITYOU) return; - // Prevents Mislead spam by Mara and co. {due} - if (you.duration[DUR_MISLED] > 10 && one_chance_in(3)) - return; + // We deal with pointless misleads in the right place now. if (wearing_amulet(AMU_CLARITY)) { @@ -124,4 +122,14 @@ void mons_cast_mislead(monsters *monster) return; } +int count_mara_fakes() +{ + int count = 0; + for (monster_iterator mi; mi; ++mi) + { + if (mi->type == MONS_MARA_FAKE) + count++; + } + return count; +} |