From ceb51161c896f17a951b0ba2bbd4b48f8fead13a Mon Sep 17 00:00:00 2001 From: Robert Vollmert Date: Fri, 6 Nov 2009 20:39:11 +0100 Subject: Replace global see_cell by observe_cell and disambiguate old uses. Calls to plain see_cell(pos) were replaced with either observe_cell(pos) or you.see_cell(pos). observe_cell where related to drawing the interface and messaging, you.see_cell for game mechanics, and one or the other in less clear cases (targetting, say). --- crawl-ref/source/spells3.cc | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'crawl-ref/source/spells3.cc') diff --git a/crawl-ref/source/spells3.cc b/crawl-ref/source/spells3.cc index 6d49fae5d7..139e177bdc 100644 --- a/crawl-ref/source/spells3.cc +++ b/crawl-ref/source/spells3.cc @@ -947,7 +947,7 @@ static bool _raise_remains(const coord_def &pos, int corps, beh_type beha, // Headless hydras cannot be raised, sorry. if (zombie_type == MONS_HYDRA && number == 0) { - if (see_cell(pos)) + if (observe_cell(pos)) { mpr("The zero-headed hydra corpse sways and immediately " "collapses!"); @@ -1036,7 +1036,7 @@ int animate_remains(const coord_def &a, corpse_type class_allowed, : "attack"); } - if (!quiet && see_cell(a)) + if (!quiet && observe_cell(a)) mpr("The dead are walking!"); if (was_butchering) @@ -1082,7 +1082,7 @@ int animate_dead(actor *caster, int pow, beh_type beha, unsigned short hitting, actual, true) > 0) { number_raised++; - if (see_cell(*ri)) + if (observe_cell(*ri)) number_seen++; } } @@ -1513,7 +1513,7 @@ static bool _teleport_player(bool allow_control, bool new_abyss_area) if (is_controlled) { - if (!see_cell(pos)) + if (!you.see_cell(pos)) large_change = true; // Merfolk should be able to control-tele into deep water. @@ -1581,9 +1581,9 @@ static bool _teleport_player(bool allow_control, bool new_abyss_area) || need_distance_check && (newpos - centre).abs() < 34*34 || testbits(env.map(newpos).property, FPROP_NO_RTELE_INTO)); - if ( newpos == you.pos() ) + if (newpos == you.pos()) mpr("Your surroundings flicker for a moment."); - else if ( see_cell(newpos) ) + else if (you.see_cell(newpos)) mpr("Your surroundings seem slightly different."); else { @@ -1750,7 +1750,7 @@ bool remove_sanctuary(bool did_attack) if (is_sanctuary(*ri)) { _remove_sanctuary_property(*ri); - if (see_cell(*ri)) + if (observe_cell(*ri)) seen_change = true; } } @@ -1811,7 +1811,7 @@ void decrease_sanctuary_radius() if (!size) { _remove_sanctuary_property(env.sanctuary_pos); - if (see_cell(env.sanctuary_pos)) + if (observe_cell(env.sanctuary_pos)) mpr("The sanctuary disappears.", MSGCH_DURATION); } } @@ -1862,7 +1862,7 @@ bool cast_sanctuary(const int power) continue; const coord_def pos = *ri; - if (testbits(env.map(pos).property, FPROP_BLOODY) && see_cell(pos)) + if (testbits(env.map(pos).property, FPROP_BLOODY) && observe_cell(pos)) blood_count++; if (trap_def* ptrap = find_trap(pos)) @@ -1943,7 +1943,7 @@ bool cast_sanctuary(const int power) if (!is_harmless_cloud(cloud_type_at(pos))) { delete_cloud(env.cgrid(pos)); - if (see_cell(pos)) + if (observe_cell(pos)) cloud_count++; } } // radius loop @@ -2061,7 +2061,7 @@ bool project_noise(void) if (success) { mprf(MSGCH_SOUND, "You hear a %svoice call your name.", - (!see_cell( pos ) ? "distant " : "") ); + (!observe_cell(pos) ? "distant " : "") ); } else mprf(MSGCH_SOUND, "You hear a dull thud."); -- cgit v1.2.3-54-g00ecf