From e63e7a7682cef5ad092c715ae602a8813886783a Mon Sep 17 00:00:00 2001 From: dolorous Date: Sat, 5 Jan 2008 17:55:42 +0000 Subject: 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 --- crawl-ref/source/mon-util.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'crawl-ref/source/mon-util.h') diff --git a/crawl-ref/source/mon-util.h b/crawl-ref/source/mon-util.h index 076eb18c2c..4877271260 100644 --- a/crawl-ref/source/mon-util.h +++ b/crawl-ref/source/mon-util.h @@ -116,7 +116,7 @@ enum mons_class_flags M_ARCHER = (1<<23), // gets various archery boosts - M_WALL_SHIELDED = (1<<24), // Shielded from attacks if in wall + M_INSUBSTANTIAL = (1<<24), // is insubstantial M_TWOWEAPON = (1<<25), // wields two weapons at once @@ -622,6 +622,7 @@ bool mons_class_is_stationary(int mc); bool mons_class_is_confusable(int mc); bool mons_class_is_slowable(int mc); bool mons_is_stationary(const monsters *mon); +bool mons_is_wall_shielded(int mc); bool mons_is_insubstantial(int mc); bool mons_is_submerged( const monsters *mon ); -- cgit v1.2.3-54-g00ecf