summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/beam.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-01-05 17:55:42 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-01-05 17:55:42 +0000
commite63e7a7682cef5ad092c715ae602a8813886783a (patch)
treeab241bea3ef0dbaa93364339863c1709a608b71a /crawl-ref/source/beam.cc
parentd3b7fd1f062b31f65e5a933efbf2f18f1e91dce0 (diff)
downloadcrawl-ref-e63e7a7682cef5ad092c715ae602a8813886783a.tar.gz
crawl-ref-e63e7a7682cef5ad092c715ae602a8813886783a.zip
Remove the M_WALL_SHIELDED flag. Instead, use the function
mons_is_wall_shielded() to determine whether a monster can pass through/be shielded by walls, as it's a more flexible approach. The function currently only checks for a monster class with a rock habitat, but it could be expanded to allow for other cases. Replace the M_WALL_SHIELDED flag with the M_INSUBSTANTIAL flag, and check for the latter instead of hardcoding a list of monsters in mons_is_insubstantial(). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3201 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/beam.cc')
-rw-r--r--crawl-ref/source/beam.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc
index 8ad73623d2..a876a3fd02 100644
--- a/crawl-ref/source/beam.cc
+++ b/crawl-ref/source/beam.cc
@@ -1248,10 +1248,10 @@ static void zappy( zap_type z_type, int power, bolt &pbolt )
*/
-// Affect monster in wall unless it can shield itself using the wall
-// (M_WALL_SHIELDED). The wall will always shield the monster if the
-// beam bounces off the wall, and a monster can't use a metal wall to
-// shield itself from electricity.
+// Affect monster in wall unless it can shield itself using the wall.
+// The wall will always shield the monster if the beam bounces off the
+// wall, and a monster can't use a metal wall to shield itself from
+// electricity.
static bool affect_mon_in_wall(bolt &pbolt, item_def *item, int tx, int ty)
{
UNUSED(item);
@@ -1267,7 +1267,7 @@ static bool affect_mon_in_wall(bolt &pbolt, item_def *item, int tx, int ty)
|| !pbolt.flavour != BEAM_ELECTRICITY)))
{
monsters *mon = &menv[mid];
- if (!mons_class_flag(mon->type, M_WALL_SHIELDED))
+ if (!mons_is_wall_shielded(mon->type))
return true;
}