diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2006-12-30 13:07:34 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2006-12-30 13:07:34 +0000 |
commit | c9a0cfa661cdad829f2e4af499670b95e3b14336 (patch) | |
tree | 772486cfecdd689ce5b824d4343b7e0c631ee43a /crawl-ref/source/misc.cc | |
parent | 82c469a3a5b523c0b82229d289b122e3868324cc (diff) | |
download | crawl-ref-c9a0cfa661cdad829f2e4af499670b95e3b14336.tar.gz crawl-ref-c9a0cfa661cdad829f2e4af499670b95e3b14336.zip |
Backported greedy explore and travel stop messages for 0.1.7 (I'm akrasiac, so
shoot me).
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.1.7@744 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/misc.cc')
-rw-r--r-- | crawl-ref/source/misc.cc | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc index 33be41d5df..e6f79e97c5 100644 --- a/crawl-ref/source/misc.cc +++ b/crawl-ref/source/misc.cc @@ -50,6 +50,7 @@ #include "monstuff.h" #include "notes.h" #include "ouch.h" +#include "overmap.h" #include "player.h" #include "shopping.h" #include "skills.h" @@ -172,7 +173,7 @@ bool grid_destroys_items( int grid ) return (grid == DNGN_LAVA || grid == DNGN_DEEP_WATER); } -// returns 0 is grid is not an altar, else it returns the GOD_* type +// returns 0 if grid is not an altar, else it returns the GOD_* type god_type grid_altar_god( unsigned char grid ) { if (grid >= DNGN_ALTAR_ZIN && grid <= DNGN_ALTAR_ELYVILON) @@ -181,6 +182,16 @@ god_type grid_altar_god( unsigned char grid ) return (GOD_NO_GOD); } +// returns DNGN_FLOOR for non-gods, otherwise returns the altar for +// the god. +int altar_for_god( god_type god ) +{ + if (god == GOD_NO_GOD || god >= NUM_GODS) + return (DNGN_FLOOR); // Yeah, lame. Tell me about it. + + return (DNGN_ALTAR_ZIN + god - 1); +} + bool grid_is_branch_stairs( unsigned char grid ) { return ((grid >= DNGN_ENTER_ORCISH_MINES && grid <= DNGN_ENTER_RESERVED_4) |