summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-23 18:49:24 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-23 18:49:24 +0000
commit86ac21551ec730fdd2a9746cbe4fc46708a5fcb8 (patch)
tree16eef17efa522c6f9c5bb3e311e95a475de123ce /crawl-ref/source
parentdf2a325a29ad34a905d8f239785023bdf7a0eaac (diff)
downloadcrawl-ref-86ac21551ec730fdd2a9746cbe4fc46708a5fcb8.tar.gz
crawl-ref-86ac21551ec730fdd2a9746cbe4fc46708a5fcb8.zip
Add still more minor cosmetic fixes.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4552 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/mon-util.cc29
-rw-r--r--crawl-ref/source/mon-util.h8
2 files changed, 15 insertions, 22 deletions
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc
index 1c71ecc015..65cba3aefc 100644
--- a/crawl-ref/source/mon-util.cc
+++ b/crawl-ref/source/mon-util.cc
@@ -396,21 +396,6 @@ mon_holy_type mons_class_holiness(int mc)
return (smc->holiness);
} // end mons_holiness()
-bool mons_class_is_stationary(int mc)
-{
- return (mc == MONS_OKLOB_PLANT
- || mc == MONS_PLANT
- || mc == MONS_FUNGUS
- || mc == MONS_CURSE_SKULL
- || mons_is_statue(mc)
- || mons_is_mimic(mc));
-}
-
-bool mons_is_stationary(const monsters *mon)
-{
- return (mons_class_is_stationary(mon->type));
-}
-
bool mons_class_is_confusable(int mc)
{
return (smc->resist_magic < MAG_IMMUNE
@@ -427,8 +412,16 @@ bool mons_is_wall_shielded(int mc)
return (mons_habitat_by_type(mc) == HT_ROCK);
}
-// returns whether a monster is non-solid
-// and thus can't be affected by some traps
+bool mons_class_is_stationary(int mc)
+{
+ return mons_class_flag(mc, M_STATIONARY);
+}
+
+bool mons_is_stationary(const monsters *mon)
+{
+ return mons_class_is_stationary(mon->type);
+}
+
bool mons_is_insubstantial(int mc)
{
return mons_class_flag(mc, M_INSUBSTANTIAL);
@@ -1898,7 +1891,7 @@ mon_attitude_type mons_attitude(const monsters *m)
return (m->has_ench(ENCH_CHARM)? ATT_FRIENDLY : m->attitude);
}
-bool mons_is_submerged( const monsters *mon )
+bool mons_is_submerged(const monsters *mon)
{
// FIXME, switch to 4.1's MF_SUBMERGED system which is much cleaner.
return (mon->has_ench(ENCH_SUBMERGED));
diff --git a/crawl-ref/source/mon-util.h b/crawl-ref/source/mon-util.h
index f33713b878..d709359493 100644
--- a/crawl-ref/source/mon-util.h
+++ b/crawl-ref/source/mon-util.h
@@ -474,8 +474,8 @@ bool mons_class_flag(int mc, int bf);
mon_holy_type mons_class_holiness(int mclass);
mon_holy_type mons_holiness(const monsters *);
-bool mons_is_mimic( int mc );
-bool mons_is_statue(int mc);
+bool mons_is_mimic( int mc );
+bool mons_is_statue( int mc );
bool mons_is_demon( int mc );
bool mons_wields_two_weapons(const monsters *m);
@@ -649,14 +649,14 @@ bool mons_looks_distracted(const monsters *m);
bool check_mons_resist_magic( const monsters *monster, int pow );
-bool mons_class_is_stationary(int mc);
bool mons_class_is_confusable(int mc);
bool mons_class_is_slowable(int mc);
+bool mons_class_is_stationary(int mc);
bool mons_is_stationary(const monsters *mon);
bool mons_is_wall_shielded(int mc);
bool mons_is_insubstantial(int mc);
bool mons_has_blood(int mc);
-bool mons_is_submerged( const monsters *mon );
+bool mons_is_submerged(const monsters *mon);
bool invalid_monster(const monsters *mon);
bool invalid_monster_class(int mclass);