diff options
author | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-10-14 08:29:33 +0000 |
---|---|---|
committer | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-10-14 08:29:33 +0000 |
commit | c2e225e37b6fd61253cb5804c719462fb29bb136 (patch) | |
tree | 360714dacc9f90aacba2300c0e877d7e7f8d487f /crawl-ref/source/dungeon.cc | |
parent | 07cd5056664cc32435043eb78282a5831eda545e (diff) | |
download | crawl-ref-c2e225e37b6fd61253cb5804c719462fb29bb136.tar.gz crawl-ref-c2e225e37b6fd61253cb5804c719462fb29bb136.zip |
Added to classes actor, monsters and player the method can_pass_through(),
which returns true for a grid that the monster or player can pass trhough.
Also added new monster type "rock worm" to demonstrate a monster which
can pass through solid walls.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2459 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/dungeon.cc')
-rw-r--r-- | crawl-ref/source/dungeon.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc index cc9c4f4f46..d2e05fcb30 100644 --- a/crawl-ref/source/dungeon.cc +++ b/crawl-ref/source/dungeon.cc @@ -2742,7 +2742,7 @@ static void specr_2(spec_room &sr) if (grd[sx][sy] == DNGN_BUILDER_SPECIAL_WALL) grd[sx][sy] = DNGN_CLOSED_DOOR; - if (j > 0 && grd[sx + dx][sy + dy] > DNGN_ROCK_WALL + if (j > 0 && grd[sx + dx][sy + dy] > DNGN_MINWALL && grd[sx + dx][sy + dy] < DNGN_FLOOR) grd[sx][sy] = DNGN_BUILDER_SPECIAL_FLOOR; @@ -6415,7 +6415,11 @@ static void big_room(int level_number) replace_area(sr.x1, sr.y1, sr.x2, sr.y2, DNGN_CLOSED_DOOR, type_floor); if (type_floor == DNGN_FLOOR) - type_2 = static_cast<dungeon_feature_type>(DNGN_ROCK_WALL + random2(4)); + { + const int minwall = DNGN_RNDWALL_MIN; + const int range = DNGN_RNDWALL_MAX - DNGN_RNDWALL_MIN + 1; + type_2 = static_cast<dungeon_feature_type>(minwall + random2(range)); + } // no lava in the Crypt or Tomb, thanks! if (player_in_branch( BRANCH_CRYPT ) || player_in_branch( BRANCH_TOMB )) |