summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/monplace.cc
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-04 23:38:05 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-04 23:38:05 +0000
commit380661f014abdc14c12dc5a9bf10a73be822821c (patch)
tree185540123dbbf5993db75e947b1153b7084cb8b7 /crawl-ref/source/monplace.cc
parent24c7f48b5401889a28462a809303545a7f4933df (diff)
downloadcrawl-ref-380661f014abdc14c12dc5a9bf10a73be822821c.tar.gz
crawl-ref-380661f014abdc14c12dc5a9bf10a73be822821c.zip
Added trapdoor spider (not yet randomly generated). If a trapdoor
spider can't see any enemies and is on a floor square it will "submurge" into the floor and only come out if an enemy moves right next to it or if something attacks it from a distance. Most of this is done with the new monster behavour BEH_LURK. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5477 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/monplace.cc')
-rw-r--r--crawl-ref/source/monplace.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/crawl-ref/source/monplace.cc b/crawl-ref/source/monplace.cc
index 5ea9a3b5d7..9dfeb99694 100644
--- a/crawl-ref/source/monplace.cc
+++ b/crawl-ref/source/monplace.cc
@@ -158,6 +158,9 @@ bool monster_habitable_grid(int monster_class,
// Returns true if the monster can submerge in the given grid.
bool monster_can_submerge(const monsters *mons, dungeon_feature_type grid)
{
+ if (mons->type == MONS_TRAPDOOR_SPIDER && grid == DNGN_FLOOR)
+ return true;
+
// Zombies of watery critters can not submerge.
switch (mons_habitat(mons))
{