summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/beam.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/beam.cc')
-rw-r--r--crawl-ref/source/beam.cc44
1 files changed, 22 insertions, 22 deletions
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc
index e0c7dc5f99..224ac15eb0 100644
--- a/crawl-ref/source/beam.cc
+++ b/crawl-ref/source/beam.cc
@@ -144,7 +144,7 @@ static void _zap_animation(int colour, const monsters *mon = NULL,
p = mon->pos();
}
- if (!see_grid(p))
+ if (!see_cell(p))
return;
const coord_def drawp = grid2view(p);
@@ -1529,7 +1529,7 @@ void bolt::initialise_fire()
message_cache.clear();
// seen might be set by caller to supress this.
- if (!seen && see_grid(source) && range > 0 && !invisible() )
+ if (!seen && see_cell(source) && range > 0 && !invisible() )
{
seen = true;
const monsters* mon = monster_at(source);
@@ -1547,7 +1547,7 @@ void bolt::initialise_fire()
// Visible self-targeted beams are always seen, even though they don't
// leave a path.
- if (see_grid(source) && target == source && !invisible())
+ if (see_cell(source) && target == source && !invisible())
seen = true;
// Scale draw_delay to match change in arena_delay.
@@ -1600,7 +1600,7 @@ void bolt::choose_ray()
// Draw the bolt at p if needed.
void bolt::draw(const coord_def& p)
{
- if (is_tracer || is_enchantment() || !see_grid(p))
+ if (is_tracer || is_enchantment() || !see_cell(p))
return;
// We don't clean up the old position.
@@ -1719,7 +1719,7 @@ void bolt::fire_wall_effect()
// No actual effect.
if (flavour != BEAM_HELLFIRE && feat == DNGN_WAX_WALL)
{
- if (see_grid(pos()))
+ if (see_cell(pos()))
{
emit_message(MSGCH_PLAIN,
"The wax appears to soften slightly.");
@@ -1732,7 +1732,7 @@ void bolt::fire_wall_effect()
{
// Destroy the wall.
grd(pos()) = DNGN_FLOOR;
- if (see_grid(pos()))
+ if (see_cell(pos()))
emit_message(MSGCH_PLAIN, "The wax bubbles and burns!");
else if (player_can_smell())
emit_message(MSGCH_PLAIN, "You smell burning wax.");
@@ -1746,7 +1746,7 @@ void bolt::fire_wall_effect()
{
// Destroy the wall.
grd(pos()) = DNGN_FLOOR;
- if (see_grid(pos()))
+ if (see_cell(pos()))
emit_message(MSGCH_PLAIN, "The tree burns like a torch!");
else if (player_can_smell())
emit_message(MSGCH_PLAIN, "You smell burning wood.");
@@ -1796,7 +1796,7 @@ void bolt::nuke_wall_effect()
if (player_can_hear(pos()))
{
- if (!see_grid(pos()))
+ if (!see_cell(pos()))
mpr("You hear a hideous screaming!", MSGCH_SOUND);
else
{
@@ -1804,7 +1804,7 @@ void bolt::nuke_wall_effect()
MSGCH_SOUND);
}
}
- else if (see_grid(pos()))
+ else if (see_cell(pos()))
mpr("The statue twists and shakes as its substance crumbles away!");
if (feat == DNGN_ORCISH_IDOL && beam_source == NON_MONSTER)
@@ -1852,7 +1852,7 @@ void bolt::hit_wall()
if (is_tracer && YOU_KILL(thrower) && in_bounds(target) && !passed_target
&& pos() != target && pos() != source && foe_info.count == 0
&& flavour != BEAM_DIGGING && flavour <= BEAM_LAST_REAL
- && bounces == 0 && reflections == 0 && see_grid(target)
+ && bounces == 0 && reflections == 0 && see_cell(target)
&& !grid_is_solid(grd(target)))
{
// Okay, with all those tests passed, this is probably an instance
@@ -2116,7 +2116,7 @@ void bolt::do_fire()
|| is_tracer && affects_wall(grd(pos())));
const bool was_seen = seen;
- if (!was_seen && range > 0 && !invisible() && see_grid(pos()))
+ if (!was_seen && range > 0 && !invisible() && see_cell(pos()))
seen = true;
if (flavour != BEAM_VISUAL && !was_seen && seen && !is_tracer)
@@ -3011,7 +3011,7 @@ void bolt::drop_object()
// Summoned creatures' thrown items disappear.
if (item->flags & ISFLAG_SUMMONED)
{
- if (see_grid(pos()))
+ if (see_cell(pos()))
{
mprf("%s %s!",
item->name(DESC_CAP_THE).c_str(),
@@ -3076,7 +3076,7 @@ void bolt::affect_ground()
MHITNOT,
MG_FORCE_PLACE));
- if (rc != -1 && see_grid(pos()))
+ if (rc != -1 && see_cell(pos()))
mpr("A fungus suddenly grows.");
}
@@ -4265,7 +4265,7 @@ bool bolt::determine_damage(monsters* mon, int& preac, int& postac, int& final,
// Electricity is ineffective.
if (flavour == BEAM_ELECTRICITY)
{
- if (!is_tracer && see_grid(mon->pos()))
+ if (!is_tracer && see_cell(mon->pos()))
mprf("The %s arcs harmlessly into the water.", name.c_str());
finish_beam();
return (false);
@@ -4366,7 +4366,7 @@ void bolt::tracer_affect_monster(monsters* mon)
{
// Ignore unseen monsters.
if (!can_see_invis && mon->invisible()
- || (YOU_KILL(thrower) && !see_grid(mon->pos())))
+ || (YOU_KILL(thrower) && !see_cell(mon->pos())))
{
return;
}
@@ -4526,7 +4526,7 @@ bool bolt::attempt_block(monsters* mon)
shield->name(DESC_PLAIN).c_str());
_ident_reflector(shield);
}
- else if (see_grid(pos()))
+ else if (see_cell(pos()))
mprf("The %s bounces off of thin air!", name.c_str());
reflect();
@@ -4556,7 +4556,7 @@ bool bolt::handle_statue_disintegration(monsters* mon)
// Disintegrate the statue.
if (!silenced(you.pos()))
{
- if (!see_grid(mon->pos()))
+ if (!see_cell(mon->pos()))
mpr("You hear a hideous screaming!", MSGCH_SOUND);
else
{
@@ -4564,7 +4564,7 @@ bool bolt::handle_statue_disintegration(monsters* mon)
MSGCH_SOUND);
}
}
- else if (see_grid(mon->pos()))
+ else if (see_cell(mon->pos()))
{
mpr("The statue twists and shakes as its substance "
"crumbles away!");
@@ -5453,7 +5453,7 @@ void bolt::refine_for_explosion()
if (!is_tracer && *seeMsg && *hearMsg)
{
// Check for see/hear/no msg.
- if (see_grid(target) || target == you.pos())
+ if (see_cell(target) || target == you.pos())
mpr(seeMsg);
else
{
@@ -5519,7 +5519,7 @@ bool bolt::explode(bool show_more, bool hole_in_the_middle)
if (is_sanctuary(pos()))
{
- if (!is_tracer && see_grid(pos()) && !name.empty())
+ if (!is_tracer && see_cell(pos()) && !name.empty())
{
mprf(MSGCH_GOD, "By Zin's power, the %s is contained.",
name.c_str());
@@ -5599,7 +5599,7 @@ bool bolt::explode(bool show_more, bool hole_in_the_middle)
if (exp_map(delta + centre) < INT_MAX)
{
- if (see_grid(delta + pos()))
+ if (see_cell(delta + pos()))
++cells_seen;
explosion_affect_cell(delta + pos());
@@ -5631,7 +5631,7 @@ bool bolt::explode(bool show_more, bool hole_in_the_middle)
void bolt::explosion_draw_cell(const coord_def& p)
{
- if (see_grid(p))
+ if (see_cell(p))
{
const coord_def drawpos = grid2view(p);
#ifdef USE_TILE