summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/abyss.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-04 14:47:09 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-04 14:47:09 +0000
commitca98a8399e80e0fa440298a6ddf383d706343088 (patch)
treeefb9093515837fa9c2137965baf513cc447d308d /crawl-ref/source/abyss.cc
parent7326d539ae67aba12e9a49dd94b2fe419845c759 (diff)
downloadcrawl-ref-ca98a8399e80e0fa440298a6ddf383d706343088.tar.gz
crawl-ref-ca98a8399e80e0fa440298a6ddf383d706343088.zip
Disallow vampires from draining summoned creatures to be consistent with
summoned creatures being incapable of bleeding on the floor. This makes things more difficult for Vampires; on the other hand there was a (more or less) recent change that lets them regain 1 hp *per turn* when draining corpses. We might also increase the duration of blood potions... Apart from that, various clean-ups. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6393 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/abyss.cc')
-rw-r--r--crawl-ref/source/abyss.cc16
1 files changed, 9 insertions, 7 deletions
diff --git a/crawl-ref/source/abyss.cc b/crawl-ref/source/abyss.cc
index 9a128f3a58..bf8167dcab 100644
--- a/crawl-ref/source/abyss.cc
+++ b/crawl-ref/source/abyss.cc
@@ -341,11 +341,14 @@ static int _abyss_rune_nearness()
// See above comment about is_terrain_known().
for (radius_iterator ri(you.pos(), LOS_RADIUS); ri; ++ri)
+ {
if (get_screen_glyph(ri->x, ri->y) != ' ')
- for ( stack_iterator si(*ri); si; ++si )
+ {
+ for (stack_iterator si(*ri); si; ++si)
if (is_rune(*si) && si->plus == RUNE_ABYSSAL)
nearness = std::min(nearness, grid_distance(you.pos(),*ri));
-
+ }
+ }
return (nearness);
}
@@ -400,7 +403,6 @@ static void _abyss_lose_monster(monsters &mons)
#define LOS_DIAMETER (LOS_RADIUS * 2 + 1)
void area_shift(void)
-/*******************/
{
#ifdef DEBUG_ABYSS
mpr("area_shift().", MSGCH_DIAGNOSTICS);
@@ -416,7 +418,7 @@ void area_shift(void)
FixedArray<unsigned short, LOS_DIAMETER, LOS_DIAMETER> fprops;
const coord_def los_delta(LOS_RADIUS, LOS_RADIUS);
- for ( radius_iterator ri(you.pos(), LOS_RADIUS); ri; ++ri )
+ for (radius_iterator ri(you.pos(), LOS_RADIUS); ri; ++ri)
{
fprops(you.pos() - *ri + los_delta) = env.map(*ri).property;
if (env.sanctuary_pos == *ri && env.sanctuary_time > 0)
@@ -426,7 +428,7 @@ void area_shift(void)
}
}
- // If sanctuary center is outside of preserved area then just get
+ // If sanctuary centre is outside of preserved area then just get
// rid of it.
if (env.sanctuary_time > 0 && !sanct_shifted)
{
@@ -442,7 +444,7 @@ void area_shift(void)
fprops(pos) = FPROP_NONE;
}
}
- }
+ }
_xom_check_nearness_setup();
@@ -530,7 +532,7 @@ void area_shift(void)
_xom_check_nearness();
- for ( radius_iterator ri(you.pos(), LOS_RADIUS); ri; ++ri )
+ for (radius_iterator ri(you.pos(), LOS_RADIUS); ri; ++ri)
env.map(*ri).property = fprops(you.pos() - *ri + los_delta);
if (sanct_shifted)