summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/terrain.cc
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2007-11-16 08:18:15 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2007-11-16 08:18:15 +0000
commit20161f7b196c4e760f8ef9468a4a621018eafd05 (patch)
tree4b5550b7d38c2dc2683149cb9f8bc4b9146af1d2 /crawl-ref/source/terrain.cc
parentf286cbea0ccc47a5d9c6a113f1d40460f7197a78 (diff)
downloadcrawl-ref-20161f7b196c4e760f8ef9468a4a621018eafd05.tar.gz
crawl-ref-20161f7b196c4e760f8ef9468a4a621018eafd05.zip
M_AMPHIBIOUS now means both "land creature can swim through deep water"
*and* "deep water creature can walk on land". Most of the supporting features neccessary for the "earth worm" FR [1766532] have been implemented, except for "fleeing towards walls". However, no work has yet been done to update the monster AI to work well when a monster is fighting an earth worm. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2858 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/terrain.cc')
-rw-r--r--crawl-ref/source/terrain.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/crawl-ref/source/terrain.cc b/crawl-ref/source/terrain.cc
index af31a735d5..8c9e122944 100644
--- a/crawl-ref/source/terrain.cc
+++ b/crawl-ref/source/terrain.cc
@@ -175,6 +175,15 @@ bool grid_is_solid(const coord_def &c)
return (grid_is_solid(grd(c)));
}
+bool grid_is_rock( dungeon_feature_type grid )
+{
+ return (grid == DNGN_ORCISH_IDOL
+ || grid == DNGN_GRANITE_STATUE
+ || grid == DNGN_SECRET_DOOR
+ || (grid >= DNGN_ROCK_WALL
+ && grid <= DNGN_CLEAR_PERMAROCK_WALL));
+}
+
bool grid_is_trap(dungeon_feature_type grid)
{
return (grid == DNGN_TRAP_MECHANICAL || grid == DNGN_TRAP_MAGICAL