summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/areas.cc
diff options
context:
space:
mode:
authorSteve Melenchuk <smelenchuk@gmail.com>2012-08-15 12:48:51 -0600
committerSteve Melenchuk <smelenchuk@gmail.com>2012-08-15 12:48:51 -0600
commitb08aebe72ee46d028d054bf0ef8a67eb596db6d6 (patch)
tree2e0561b9c9cce51a8b820cc9f8930c3208a67bba /crawl-ref/source/areas.cc
parentd62a275fae9e89ecaeb1a1d79d3830bbb0ebe8c0 (diff)
downloadcrawl-ref-b08aebe72ee46d028d054bf0ef8a67eb596db6d6.tar.gz
crawl-ref-b08aebe72ee46d028d054bf0ef8a67eb596db6d6.zip
QUAD DAMAGE emits an Orb-style glow while in effect.
It's the same radius, only all blue instead of mutagenic.
Diffstat (limited to 'crawl-ref/source/areas.cc')
-rw-r--r--crawl-ref/source/areas.cc27
1 files changed, 27 insertions, 0 deletions
diff --git a/crawl-ref/source/areas.cc b/crawl-ref/source/areas.cc
index 6e97da21b6..b4f9cf658e 100644
--- a/crawl-ref/source/areas.cc
+++ b/crawl-ref/source/areas.cc
@@ -41,6 +41,7 @@ enum areaprop_flag
APROP_ORB = (1 << 6),
APROP_UMBRA = (1 << 7),
APROP_SUPPRESSION = (1 << 8),
+ APROP_QUAD = (1 << 9),
};
struct area_centre
@@ -185,6 +186,18 @@ static void _update_agrid()
no_areas = false;
}
+ if (you.duration[DUR_QUAD_DAMAGE])
+ {
+ const int r = 5;
+ _agrid_centres.push_back(area_centre(AREA_QUAD, you.pos(), r));
+ for (radius_iterator ri(you.pos(), r, C_CIRCLE, you.get_los());
+ ri; ++ri)
+ {
+ _set_agrid_flag(*ri, APROP_QUAD);
+ }
+ no_areas = false;
+ }
+
if (!env.sunlight.empty())
{
for (size_t i = 0; i < env.sunlight.size(); ++i)
@@ -664,6 +677,20 @@ bool orb_haloed(const coord_def& p)
}
/////////////
+// Quad damage glow
+//
+
+bool quad_haloed(const coord_def& p)
+{
+ if (!map_bounds(p))
+ return false;
+ if (!_agrid_valid)
+ _update_agrid();
+
+ return _check_agrid_flag(p, APROP_QUAD);
+}
+
+/////////////
// Umbra
//