summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells4.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-11-08 00:19:42 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-11-08 00:19:42 +0000
commitcdce1a6d4370317c4d1b108b39711ccb85aaf4b1 (patch)
treeef0f3a47baa443d88919c2a59f0e7165f1b58665 /crawl-ref/source/spells4.cc
parent479b5e771117e42105de312a95e5ab73cd1a1abe (diff)
downloadcrawl-ref-cdce1a6d4370317c4d1b108b39711ccb85aaf4b1.tar.gz
crawl-ref-cdce1a6d4370317c4d1b108b39711ccb85aaf4b1.zip
Make monsters' glowing quality a class flag, instead of hardcoding a
list of glowing monsters. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7418 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spells4.cc')
-rw-r--r--crawl-ref/source/spells4.cc30
1 files changed, 3 insertions, 27 deletions
diff --git a/crawl-ref/source/spells4.cc b/crawl-ref/source/spells4.cc
index 85080a5a6c..4b6a01b03b 100644
--- a/crawl-ref/source/spells4.cc
+++ b/crawl-ref/source/spells4.cc
@@ -1204,33 +1204,9 @@ bool backlight_monsters(coord_def where, int pow, int garbage)
if (mon == NON_MONSTER)
return (false);
- switch (menv[mon].type)
- {
- case MONS_FIRE_VORTEX:
- case MONS_ANGEL:
- case MONS_FIEND:
- case MONS_SHADOW:
- case MONS_EFREET:
- case MONS_HELLION:
- case MONS_FLAMING_CORPSE:
- case MONS_GLOWING_SHAPESHIFTER:
- case MONS_FIRE_ELEMENTAL:
- case MONS_AIR_ELEMENTAL:
- case MONS_SHADOW_FIEND:
- case MONS_SPECTRAL_WARRIOR:
- case MONS_ORANGE_RAT:
- case MONS_BALRUG:
- case MONS_SPATIAL_VORTEX:
- case MONS_PIT_FIEND:
- case MONS_SHINING_EYE:
- case MONS_DAEVA:
- case MONS_SPECTRAL_THING:
- case MONS_ORB_OF_FIRE:
- case MONS_EYE_OF_DEVASTATION:
- return (false); // Already glowing or invisible.
- default:
- break;
- }
+ // Already glowing.
+ if (mons_class_flag(menv[mon].type, M_GLOWS))
+ return (false);
mon_enchant bklt = menv[mon].get_ench(ENCH_BACKLIGHT);
const int lvl = bklt.degree;