summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-01-03 23:07:39 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-01-03 23:07:39 +0000
commite2f74e90f41b7324f8b4e2fa880a1b32df131e68 (patch)
treeebb134a1b3a81e8c8c80b895f326a5050a75bf00 /crawl-ref
parent5c0a7e21f8aed760fde406bba577b696ad7f8e8a (diff)
downloadcrawl-ref-e2f74e90f41b7324f8b4e2fa880a1b32df131e68.tar.gz
crawl-ref-e2f74e90f41b7324f8b4e2fa880a1b32df131e68.zip
More tweaks of Zin:
1. Let sanctuaries shrink during the last few turns rather than suddently disappear when it times out. 2. Introduce donations (and remove item sacrifice) I suppose abilities will now have to become more expensive pietywise. I raised the piety cost of the sanctuary from 10 to 15, but that probably won't be enough. For the piety gain I introduced a new duration, DUR_PIETY_POOL that is filled with gold/200 * log(gold) upon donation and then leaks with 5% chance per turn one piety point into the actual piety. All numbers are open for discussion and change. Breaks saves. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3181 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/source/abl-show.cc2
-rw-r--r--crawl-ref/source/acr.cc29
-rw-r--r--crawl-ref/source/beam.cc2
-rw-r--r--crawl-ref/source/dat/descript/gods.txt8
-rw-r--r--crawl-ref/source/describe.cc14
-rw-r--r--crawl-ref/source/enum.h1
-rw-r--r--crawl-ref/source/externs.h3
-rw-r--r--crawl-ref/source/files.cc6
-rw-r--r--crawl-ref/source/monstuff.cc22
-rw-r--r--crawl-ref/source/religion.cc56
-rw-r--r--crawl-ref/source/spells3.cc68
-rw-r--r--crawl-ref/source/spells3.h1
-rw-r--r--crawl-ref/source/tags.cc6
-rw-r--r--crawl-ref/source/travel.cc2
-rw-r--r--crawl-ref/source/view.cc21
-rw-r--r--crawl-ref/source/view.h2
16 files changed, 188 insertions, 55 deletions
diff --git a/crawl-ref/source/abl-show.cc b/crawl-ref/source/abl-show.cc
index 21ee6f148b..6c1ba56207 100644
--- a/crawl-ref/source/abl-show.cc
+++ b/crawl-ref/source/abl-show.cc
@@ -235,7 +235,7 @@ static const ability_def Ability_List[] =
{ ABIL_ZIN_SMITING, "Smiting",
3, 0, 50, generic_cost::fixed(2), ABFLAG_NONE },
{ ABIL_ZIN_REVITALISATION, "Revitalisation", 0, 0, 100, 3, ABFLAG_NONE },
- { ABIL_ZIN_SANCTUARY, "Sanctuary", 7, 0, 150, 10, ABFLAG_NONE },
+ { ABIL_ZIN_SANCTUARY, "Sanctuary", 7, 0, 150, 15, ABFLAG_NONE },
// The Shining One
{ ABIL_TSO_REPEL_UNDEAD, "Repel Undead", 1, 0, 100, 0, ABFLAG_NONE },
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc
index c0b18b5ee3..1b870aa917 100644
--- a/crawl-ref/source/acr.cc
+++ b/crawl-ref/source/acr.cc
@@ -2604,6 +2604,31 @@ static void decrement_durations()
if (you.duration[DUR_BACKLIGHT] > 0 && !--you.duration[DUR_BACKLIGHT] && !you.backlit())
mpr("You are no longer glowing.", MSGCH_DURATION);
+
+ // Leak piety from the piety pool (currently Zin only) into actual piety.
+ // Note that changes of religious status without corresponding actions
+ // (killing monsters, offering items, ...) might be confusing for characters
+ // of other religions.
+ // For now, though, keep information about what happened hidden.
+ if (you.duration[DUR_PIETY_POOL] && one_chance_in(20))
+ {
+ you.duration[DUR_PIETY_POOL]--; // decrease even if piety at maximum
+ if (you.piety < 200)
+ {
+#if DEBUG_DIAGNOSTICS || DEBUG_SACRIFICE || DEBUG_PIETY
+ mpr("Piety increases by 1 due to piety pool.", MSGCH_DIAGNOSTICS);
+#endif
+ you.piety++;
+ }
+#if DEBUG_DIAGNOSTICS || DEBUG_SACRIFICE || DEBUG_PIETY
+ else
+ mpr("Piety already at maximum and fails to increase "
+ "from piety pool.", MSGCH_DIAGNOSTICS);
+
+ if (!you.duration[DUR_PIETY_POOL])
+ mpr("Piety pool is now empty.", MSGCH_DIAGNOSTICS);
+#endif
+ }
if (!you.permanent_levitation())
@@ -2754,9 +2779,7 @@ static void check_sanctuary()
if (env.sanctuary_time <= 0)
return;
- env.sanctuary_time--;
- if (env.sanctuary_time == 0)
- remove_sanctuary();
+ decrease_sanctuary_radius();
}
static void world_reacts()
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc
index fd38a1aa4c..3300e2ca5c 100644
--- a/crawl-ref/source/beam.cc
+++ b/crawl-ref/source/beam.cc
@@ -3700,7 +3700,7 @@ static int affect_monster(bolt &beam, monsters *mon)
if (mons_friendly( mon ))
did_god_conduct( DID_ATTACK_FRIEND, 5, true, mon );
-
+
if (mons_holiness( mon ) == MH_HOLY)
did_god_conduct( DID_ATTACK_HOLY, mon->hit_dice, true, mon );
diff --git a/crawl-ref/source/dat/descript/gods.txt b/crawl-ref/source/dat/descript/gods.txt
index c32a252516..3702c296a0 100644
--- a/crawl-ref/source/dat/descript/gods.txt
+++ b/crawl-ref/source/dat/descript/gods.txt
@@ -15,12 +15,12 @@ Zin
Zin is an ancient and revered God, dedicated to the establishment of
order and the destruction of the forces of chaos and night. Valued
-worshippers can gain sustenance in times of need, and a variety of
+worshippers can gain sustenance in times of need and a variety of
powers useful in the fight against chaos, but are required to remain
pure of body and soul, in particular abstain from the consumption of
corpses of intelligent beings, and the use of necromancy and mutating
-substances. Zin appreciates long-standing faith as well as
-sacrifices of valued objects.
+substances. Zin values selflessness and appreciates long-standing
+faith.
%%%%
The Shining One
@@ -123,4 +123,4 @@ their devotion by bloodshed and sacrifice. Devout followers of Beogh
can smite their foes, and especially fervent devotees of Beogh may
even gain followers of their own, for the orcs still look for their
Messiah.
-%%%% \ No newline at end of file
+%%%%
diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc
index 6227396e76..d67c27fde0 100644
--- a/crawl-ref/source/describe.cc
+++ b/crawl-ref/source/describe.cc
@@ -2295,14 +2295,16 @@ static std::string religion_help( god_type god )
switch(god)
{
case GOD_ZIN:
+ result += "Pray at one of " + god_name(god)
+ + "'s altars to part with your money.";
+ break;
+
case GOD_SHINING_ONE:
if (!player_under_penance() && you.piety > 160
&& !you.num_gifts[god])
{
result += "You can pray at an altar to ask " + god_name(god)
- + " to bless a ";
- result += (god == GOD_ZIN ? "mace" : "long sword");
- result += ".";
+ + " to bless a long sword.";
}
break;
@@ -2311,7 +2313,7 @@ static std::string religion_help( god_type god )
&& !you.num_gifts[god])
{
result += "You can pray at an altar to ask " + god_name(god)
- + " to bless your weapon." EOL;
+ + " to bless your weapon." EOL;
} // fall through
case GOD_OKAWARU:
@@ -2324,8 +2326,8 @@ static std::string religion_help( god_type god )
case GOD_NEMELEX_XOBEH:
result += "You can pray to sacrifice all items on your square. "
- "Inscribe items with !p, !* or =p to avoid sacrificing "
- "them accidentally.";
+ "Inscribe items with !p, !* or =p to avoid sacrificing "
+ "them accidentally.";
break;
case GOD_VEHUMET:
diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h
index 04596cff72..700112ddc8 100644
--- a/crawl-ref/source/enum.h
+++ b/crawl-ref/source/enum.h
@@ -1034,6 +1034,7 @@ enum duration_type
DUR_ICY_ARMOUR,
DUR_REPEL_MISSILES,
DUR_PRAYER,
+ DUR_PIETY_POOL, // distribute piety over time
DUR_REGENERATION,
DUR_SWIFTNESS,
DUR_STONEMAIL,
diff --git a/crawl-ref/source/externs.h b/crawl-ref/source/externs.h
index a0ad006bc9..d6c0ed410e 100644
--- a/crawl-ref/source/externs.h
+++ b/crawl-ref/source/externs.h
@@ -1350,8 +1350,7 @@ public:
// level_flag_type in enum.h
unsigned long level_flags;
- int sanctuary_x;
- int sanctuary_y;
+ coord_def sanctuary_pos;
int sanctuary_time;
};
diff --git a/crawl-ref/source/files.cc b/crawl-ref/source/files.cc
index e02c1b9cea..6af6196a0c 100644
--- a/crawl-ref/source/files.cc
+++ b/crawl-ref/source/files.cc
@@ -937,7 +937,7 @@ bool load( dungeon_feature_type stair_taken, load_mode_type load_mode,
}
}
- you.prev_targ = MHITNOT;
+ you.prev_targ = MHITNOT;
you.prev_grd_targ = coord_def(0, 0);
// We clear twice - on save and on load.
@@ -977,8 +977,8 @@ bool load( dungeon_feature_type stair_taken, load_mode_type load_mode,
load_ghost();
}
env.turns_on_level = 0;
- env.sanctuary_x = -1;
- env.sanctuary_y = -1;
+ // sanctuary
+ env.sanctuary_pos = coord_def(-1, -1);
env.sanctuary_time = 0;
}
else
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index 057f7696a1..130a495403 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -2261,10 +2261,9 @@ static void handle_movement(monsters *monster)
{
behaviour_event(monster, ME_SCARE, MHITNOT, monster->x, monster->y);
}
- else if (mons_is_fleeing(monster) && env.sanctuary_x != -1
- && !is_sanctuary(monster->x, monster->y)
- && monster->target_x == env.sanctuary_x
- && monster->target_y == env.sanctuary_y)
+ else if (mons_is_fleeing(monster) && inside_level_bounds(env.sanctuary_pos)
+ && monster->target_x == env.sanctuary_pos.x
+ && monster->target_y == env.sanctuary_pos.y)
{ // once outside there's a chance they'll regain their courage
if (random2(5) > 2)
monster->del_ench(ENCH_FEAR);
@@ -2294,6 +2293,17 @@ static void handle_movement(monsters *monster)
mmov_y *= -1;
}
+ // don't allow monsters to enter a sanctuary
+ // or attack you inside a sanctuary even if it's right next to them
+ if (is_sanctuary(monster->x + mmov_x, monster->y + mmov_y)
+ && (!is_sanctuary(monster->x, monster->y)
+ || monster->x + mmov_x == you.x_pos
+ && monster->y + mmov_y == you.y_pos))
+ {
+ mmov_x = 0;
+ mmov_y = 0;
+ }
+
// bounds check: don't let fleeing monsters try to run
// off the map
if (monster->target_x + mmov_x < 0 || monster->target_x + mmov_x >= GXM)
@@ -2302,7 +2312,7 @@ static void handle_movement(monsters *monster)
if (monster->target_y + mmov_y < 0 || monster->target_y + mmov_y >= GYM)
mmov_y = 0;
- // now quit if we're can't move
+ // now quit if we can't move
if (mmov_x == 0 && mmov_y == 0)
return;
@@ -5206,7 +5216,7 @@ bool mon_can_move_to_pos(const monsters *monster, const int count_x,
const int targ_y = monster->y + count_y;
// bounds check - don't consider moving out of grid!
- if (targ_x < 0 || targ_x >= GXM || targ_y < 0 || targ_y >= GYM)
+ if (!inside_level_bounds(targ_x, targ_y))
return false;
// hostile monsters won't enter sanctuaries
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index d494b1c7ea..5f90ed56ea 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -26,6 +26,7 @@
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
+#include <cmath>
#ifdef DOS
#include <dos.h>
@@ -1220,8 +1221,7 @@ bool did_god_conduct( conduct_type thing_done, int level, bool known,
case GOD_ELYVILON:
penance = level; // healer god cares more about this
// fall through
- case GOD_ZIN:
- case GOD_SHINING_ONE:
+ case GOD_ZIN: // in contrast to TSO, who doesn't mind martyrs
case GOD_OKAWARU:
piety_change = -level;
ret = true;
@@ -2070,7 +2070,11 @@ static bool zin_retribution()
}
if (success && !count_mutations())
+ {
simple_god_message(" rids your body of chaos!");
+ // lower penance a bit more for being particularly successful
+ dec_penance(god, 1);
+ }
break;
}
@@ -2112,7 +2116,7 @@ static bool zin_retribution()
simple_god_message(" booms out: \"Return to the light! REPENT!\"", god);
noisy( 25, you.x_pos, you.y_pos ); // same as scroll of noise
break;
- }
+ } // plus Smiting?
return false;
}
@@ -2876,6 +2880,7 @@ void excommunication(void)
take_note(Note(NOTE_LOSE_GOD, old_god));
you.duration[DUR_PRAYER] = 0;
+ you.duration[DUR_PIETY_POOL] = 0; // your loss
you.religion = GOD_NO_GOD;
you.piety = 0;
redraw_skill( you.your_name, player_title() );
@@ -3127,6 +3132,9 @@ static bool god_likes_item(god_type god, const item_def& item)
case GOD_NEMELEX_XOBEH:
return !is_deck(item);
+ case GOD_ZIN:
+ return item.base_type == OBJ_GOLD;
+
default:
return true;
}
@@ -3165,6 +3173,47 @@ void offer_items()
god_acting gdact;
+ // donate gold to gain piety distributed over time
+ if (you.religion == GOD_ZIN)
+ {
+ if (!you.gold)
+ {
+ mpr("You don't have anything to sacrifice.");
+ return;
+ }
+
+ if (!yesno("Do you wish to part with all of your money? ", true, 'n'))
+ return;
+
+ int donation_value = (int) (you.gold/200 * log(you.gold));
+#if DEBUG_DIAGNOSTICS || DEBUG_SACRIFICE || DEBUG_PIETY
+ mprf(MSGCH_DIAGNOSTICS, "A donation of $%d amounts to an "
+ "increase of piety by %d.", you.gold, donation_value);
+#endif
+ you.gold = 0;
+ you.redraw_gold = true;
+
+ if (donation_value < 1)
+ {
+ simple_god_message(" finds your generosity lacking.");
+ return;
+ }
+ else if (donation_value <= 5) // $100 or more
+ simple_god_message(" is satisfied with your donation.");
+ else if (donation_value <= 20) // about $400 or more
+ simple_god_message(" is pleased about your sacrifice.");
+ else if (donation_value <= 50) // about $1500 or more
+ simple_god_message(" is impressed by your generosity.");
+ else // about $3000 or more
+ simple_god_message(" is deeply moved by your generosity.");
+
+ you.duration[DUR_PIETY_POOL] += donation_value;
+ if (you.duration[DUR_PIETY_POOL] > 500)
+ you.duration[DUR_PIETY_POOL] = 500;
+
+ return; // doesn't accept anything else for sacrifice
+ }
+
int num_sacced = 0;
int i = igrd[you.x_pos][you.y_pos];
@@ -3238,7 +3287,6 @@ void offer_items()
you.sacrifice_value[item.base_type] += value;
break;
- case GOD_ZIN:
case GOD_OKAWARU:
case GOD_MAKHLEB:
if (mitm[i].base_type == OBJ_CORPSES
diff --git a/crawl-ref/source/spells3.cc b/crawl-ref/source/spells3.cc
index a930ba8652..98a103ac6f 100644
--- a/crawl-ref/source/spells3.cc
+++ b/crawl-ref/source/spells3.cc
@@ -805,7 +805,7 @@ bool remove_sanctuary(bool did_attack)
if (env.sanctuary_time)
env.sanctuary_time = 0;
- if (env.sanctuary_x < 0 || env.sanctuary_y < 0)
+ if (!inside_level_bounds(env.sanctuary_pos))
return false;
const int radius = 5;
@@ -813,8 +813,8 @@ bool remove_sanctuary(bool did_attack)
for (int x=-radius; x<=radius; x++)
for (int y=-radius; y<=radius; y++)
{
- int posx = env.sanctuary_x + x;
- int posy = env.sanctuary_y + y;
+ int posx = env.sanctuary_pos.x + x;
+ int posy = env.sanctuary_pos.y + y;
if (posx <= 0 || posx > GXM || posy <= 0 || posy > GYM)
continue;
@@ -829,7 +829,7 @@ bool remove_sanctuary(bool did_attack)
// do not reset so as to allow monsters to see if their fleeing source
// used to be the centre of a sanctuary
-// env.sanctuary_x = env.sanctuary_y = -1;
+// env.sanctuary_pos.x = env.sanctuary_pos.y = -1;
if (did_attack)
{
@@ -837,22 +837,58 @@ bool remove_sanctuary(bool did_attack)
simple_god_message(" revokes the gift of sanctuary.", GOD_ZIN);
did_god_conduct(DID_FRIEND_DIES, 3);
}
- else if (seen_change)
- {
- mpr("The air around you flickers and hums.");
- if (is_resting())
- stop_running();
- }
+
+ if (is_resting())
+ stop_running();
return true;
}
+// For the last (radius) counter turns the sanctuary will slowly shrink
+void decrease_sanctuary_radius()
+{
+ if (one_chance_in(3)) // 33% chance of not decreasing
+ return;
+
+ int radius = 5;
+
+ int size = --env.sanctuary_time;
+ if (size >= radius)
+ return;
+
+ radius = size+1;
+ for (int x=-radius; x<=radius; x++)
+ for (int y=-radius; y<=radius; y++)
+ {
+ int posx = env.sanctuary_pos.x + x;
+ int posy = env.sanctuary_pos.y + y;
+
+ if (!inside_level_bounds(posx,posy))
+ continue;
+
+ int dist = distance(posx, posy, env.sanctuary_pos.x, env.sanctuary_pos.y);
+
+ // if necessary overwrite sanctuary property
+ if (dist > size*size)
+ env.map[posx][posy].property = FPROP_NONE;
+ }
+
+ // special case for time-out of sanctuary
+ if (!size)
+ {
+ env.map[env.sanctuary_pos.x][env.sanctuary_pos.y].property = FPROP_NONE;
+ if (see_grid(coord_def(env.sanctuary_pos.x,env.sanctuary_pos.y)))
+ mpr("The sanctuary disappears.");
+ }
+}
+
+// maybe disallow recasting while previous sanctuary in effect...
bool cast_sanctuary(const int power)
{
// first get rid of old sanctuary
remove_sanctuary();
- if (!silenced(you.x_pos, you.y_pos))
+ if (!silenced(you.x_pos, you.y_pos)) // how did you manage that?
mpr("You hear a choir sing!");
else
mpr("You are suddenly bathed in radiance!");
@@ -862,10 +898,12 @@ bool cast_sanctuary(const int power)
holy_word( 100, true );
delay(1000);
- env.sanctuary_x = you.x_pos;
- env.sanctuary_y = you.y_pos;
- env.sanctuary_time = 15;
+ env.sanctuary_pos.x = you.x_pos;
+ env.sanctuary_pos.y = you.y_pos;
+ env.sanctuary_time = 7 + you.skills[SK_INVOCATIONS]/2;
+ // radius could also be influenced by Inv
+ // and would then have to be stored globally
const int radius = 5;
const int pattern = random2(4);
int count = 0;
@@ -877,7 +915,7 @@ bool cast_sanctuary(const int power)
int posx = you.x_pos + x;
int posy = you.y_pos + y;
- if (posx <= 0 || posx > GXM || posy <= 0 || posy > GYM)
+ if (!inside_level_bounds(posx, posy))
continue;
int dist = distance(posx, posy, you.x_pos, you.y_pos);
diff --git a/crawl-ref/source/spells3.h b/crawl-ref/source/spells3.h
index a5dfc30195..50f465bc92 100644
--- a/crawl-ref/source/spells3.h
+++ b/crawl-ref/source/spells3.h
@@ -64,6 +64,7 @@ bool cast_selective_amnesia(bool force);
* *********************************************************************** */
int cast_smiting(int power, dist &);
bool remove_sanctuary(bool did_attack = false);
+void decrease_sanctuary_radius(void);
bool cast_sanctuary(int power);
// updated 24may2000 {dlb}
diff --git a/crawl-ref/source/tags.cc b/crawl-ref/source/tags.cc
index 656b2a640f..944ac5604e 100644
--- a/crawl-ref/source/tags.cc
+++ b/crawl-ref/source/tags.cc
@@ -1609,8 +1609,7 @@ static void tag_construct_level(tagHeader &th)
marshallByte(th, env.shop[i].level);
}
- marshallByte(th, env.sanctuary_x);
- marshallByte(th, env.sanctuary_y);
+ marshallCoord(th, env.sanctuary_pos);
marshallByte(th, env.sanctuary_time);
env.markers.write(th);
@@ -1850,8 +1849,7 @@ static void tag_read_level( tagHeader &th, char minorVersion )
env.shop[i].level = unmarshallByte(th);
}
- env.sanctuary_x = unmarshallByte(th);
- env.sanctuary_y = unmarshallByte(th);
+ unmarshallCoord(th, env.sanctuary_pos);
env.sanctuary_time = unmarshallByte(th);
env.markers.read(th);
diff --git a/crawl-ref/source/travel.cc b/crawl-ref/source/travel.cc
index 9b1f002631..e4e8a3f2e2 100644
--- a/crawl-ref/source/travel.cc
+++ b/crawl-ref/source/travel.cc
@@ -175,7 +175,7 @@ static void init_traps()
{
int x = env.trap[i].x,
y = env.trap[i].y;
- if (x > 0 && x < GXM && y > 0 && y < GYM)
+ if (inside_level_bounds(x,y))
curr_traps[x][y] = i;
}
traps_inited = true;
diff --git a/crawl-ref/source/view.cc b/crawl-ref/source/view.cc
index dff80df984..40d5b82b42 100644
--- a/crawl-ref/source/view.cc
+++ b/crawl-ref/source/view.cc
@@ -129,6 +129,17 @@ bool map_cell::seen() const
return (object && (flags & MAP_SEEN_FLAG));
}
+bool inside_level_bounds(int x, int y)
+{
+ return (x > 0 && x < GXM && y > 0 && y < GYM);
+}
+
+bool inside_level_bounds(coord_def &p)
+{
+ return (inside_level_bounds(p.x, p.y));
+}
+
+
inline unsigned get_envmap_char(int x, int y)
{
return env.map[x][y].glyph();
@@ -367,12 +378,12 @@ static void get_symbol( int x, int y,
*colour = YELLOW | colmask;
else if (env.map[x][y].property == FPROP_SANCTUARY_2)
{
- if (!one_chance_in(3))
- *colour = WHITE | colmask;
- else if (one_chance_in(3))
- *colour = LIGHTCYAN | colmask;
+ if (!one_chance_in(4))
+ *colour = WHITE | colmask; // 3/4
+ else if (!one_chance_in(3))
+ *colour = LIGHTCYAN | colmask; // 1/6
else
- *colour = LIGHTGRAY | colmask;
+ *colour = LIGHTGRAY | colmask; // 1/12
}
}
else
diff --git a/crawl-ref/source/view.h b/crawl-ref/source/view.h
index 6122d7e1ac..6e828b8ecf 100644
--- a/crawl-ref/source/view.h
+++ b/crawl-ref/source/view.h
@@ -157,6 +157,8 @@ const feature_def &get_feature_def(dungeon_feature_type feat);
void set_envmap_obj( int x, int y, int object );
unsigned get_envmap_char(int x, int y);
+bool inside_level_bounds(int x, int y);
+bool inside_level_bounds(coord_def &p);
int get_envmap_obj(int x, int y);
void set_envmap_detected_item(int x, int y, bool detected = true);
void set_envmap_detected_mons(int x, int y, bool detected = true);