summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/effects.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-11-08 18:17:24 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-11-08 18:17:24 +0000
commitc2f198269d696051a6623e690aec147e7364c0af (patch)
tree4bc48b6a0c6f793ee0f50ce91c286532b73d05bc /crawl-ref/source/effects.cc
parent6dd738e46a71bedfd960d2e889a39d36baa1d04a (diff)
downloadcrawl-ref-c2f198269d696051a6623e690aec147e7364c0af.tar.gz
crawl-ref-c2f198269d696051a6623e690aec147e7364c0af.zip
Add alternative messages for efreet speech when silenced. (BR 2238678)
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7421 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/effects.cc')
-rw-r--r--crawl-ref/source/effects.cc18
1 files changed, 7 insertions, 11 deletions
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc
index c4666583f4..59924a0fd8 100644
--- a/crawl-ref/source/effects.cc
+++ b/crawl-ref/source/effects.cc
@@ -2238,11 +2238,6 @@ static bool _is_floor(const dungeon_feature_type feat)
// . # 2
// #x# or .x. -> 0x1
// . # 3
-//
-// FIXME: There needs to be some sort of "dead-end" check similar to floor
-// grids, but the other way around: turning a wall into floor can
-// turn perfectly fine corridors into too short wonky-looking
-// dead-ends.
static bool _grid_is_flanked_by_walls(const coord_def &p)
{
const coord_def adjs[] = { coord_def(p.x-1,p.y),
@@ -2475,9 +2470,10 @@ void change_labyrinth(bool msg)
mprf(MSGCH_DIAGNOSTICS, "-> #targets = %d", targets.size());
}
+#ifdef WIZARD
for (rectangle_iterator ri(1); ri; ++ri)
env.map(*ri).property &= ~(FPROP_HIGHLIGHT);
-
+#endif
// How many switches we'll be doing.
const int max_targets = random_range(std::min((int) targets.size(), 12),
@@ -2561,9 +2557,7 @@ void change_labyrinth(bool msg)
}
// Randomly pick one floor grid from the vector and replace it
- // with the original wall type.
- // FIXME: This is not optimal since it may lead to e.g. a single
- // metal wall appearing among stone ones.
+ // with an adjacent wall type.
const int pick = random_range(0, (int) points.size() - 1);
const coord_def p(points[pick]);
if (msg)
@@ -2571,11 +2565,13 @@ void change_labyrinth(bool msg)
mprf(MSGCH_DIAGNOSTICS, "Switch %d (%d, %d) with %d (%d, %d).",
(int) old_grid, c.x, c.y, (int) grd(p), p.x, p.y);
}
+#ifdef WIZARD
env.map(c).property |= FPROP_HIGHLIGHT;
env.map(p).property |= FPROP_HIGHLIGHT;
+#endif
- // Rather than use old_grid directly, replace with the adjacent
- // wall type.
+ // Rather than use old_grid directly, replace with an adjacent
+ // wall type, preferably stone, rock, or metal.
old_grid = grd[p.x-1][p.y];
if (!grid_is_wall(old_grid))
{