diff options
author | David Lawrence Ramsey <dolorous@users.sourceforge.net> | 2010-10-14 17:30:34 -0500 |
---|---|---|
committer | David Lawrence Ramsey <dolorous@users.sourceforge.net> | 2010-10-14 18:18:24 -0500 |
commit | ee4d2da1b8c3f0ca6b4d7f4b6cc795e4a81d2f29 (patch) | |
tree | 1f0e3046480947fccba374239b02cd2aab0e3108 /crawl-ref/source/spl-monench.cc | |
parent | 86c81fd8cb7358f5cbed469436d1eaa4c245e011 (diff) | |
download | crawl-ref-ee4d2da1b8c3f0ca6b4d7f4b6cc795e4a81d2f29.tar.gz crawl-ref-ee4d2da1b8c3f0ca6b4d7f4b6cc795e4a81d2f29.zip |
Move checks for naturally glowing to an actor-interface function.
Also, make monsters pay attention to it when deciding whether to cast
Corona or Invisibility, or whether to use wands of invisibility. This
fixes Mantis 2718.
Diffstat (limited to 'crawl-ref/source/spl-monench.cc')
-rw-r--r-- | crawl-ref/source/spl-monench.cc | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/crawl-ref/source/spl-monench.cc b/crawl-ref/source/spl-monench.cc index 7bee7e5494..e0ce59979b 100644 --- a/crawl-ref/source/spl-monench.cc +++ b/crawl-ref/source/spl-monench.cc @@ -124,11 +124,8 @@ bool backlight_monsters(coord_def where, int pow, int garbage) return (false); // Already glowing. - if (mons_class_flag(mons->type, M_GLOWS_LIGHT) - || mons_class_flag(mons->type, M_GLOWS_RADIATION)) - { + if (mons->glows_naturally()) return (false); - } mon_enchant bklt = mons->get_ench(ENCH_CORONA); const int lvl = bklt.degree; |