summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-util.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-31 20:26:20 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-31 20:26:20 +0000
commit57ec78ae83592e5f55457fbcff4de929f5a9b7d7 (patch)
tree7f85295bb2791f405554336cc2e1ebb744571a4c /crawl-ref/source/mon-util.cc
parent7df3a8aa8296fea631280b085f4c70a93fd23a54 (diff)
downloadcrawl-ref-57ec78ae83592e5f55457fbcff4de929f5a9b7d7.tar.gz
crawl-ref-57ec78ae83592e5f55457fbcff4de929f5a9b7d7.zip
Consolidate all cases where corpses are turned into skeletons, as
suggested by dolorous in BR 1977925, and turn coloured draconian corpses into plain draconian skeletons. Same when the game attempts to create coloured draconian skeletons or simulacrums. Added autoinscription to the single inscription command ('{') - this is necessary for items with long descriptions that can't autoinscribed otherwise. Added a small hack to make death cobs (%) appear correctly in the monster list. The rest is cleanup, I believe. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5376 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/mon-util.cc')
-rw-r--r--crawl-ref/source/mon-util.cc36
1 files changed, 23 insertions, 13 deletions
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc
index 1d1fed8710..b66c4cad13 100644
--- a/crawl-ref/source/mon-util.cc
+++ b/crawl-ref/source/mon-util.cc
@@ -1142,10 +1142,10 @@ bool mons_skeleton(int mc)
if (mons_zombie_size(mc) == Z_NOZOMBIE
|| mons_weight(mc) == 0 || (mons_class_flag(mc, M_NO_SKELETON)))
{
- return false;
+ return (false);
}
- return true;
+ return (true);
} // end mons_skeleton()
flight_type mons_class_flies(int mc)
@@ -1170,8 +1170,8 @@ flight_type mons_flies(const monsters *mon)
const int type = mons_is_zombified(mon)? mons_zombie_base(mon) : mon->type;
const flight_type ret = mons_class_flies( type );
return (ret ? ret
- : (_scan_mon_inv_randarts(mon, RAP_LEVITATE) > 0) ? FL_LEVITATE
- : FL_NONE);
+ : (_scan_mon_inv_randarts(mon, RAP_LEVITATE) > 0) ? FL_LEVITATE
+ : FL_NONE);
}
bool mons_amphibious(int mc)
@@ -1733,13 +1733,20 @@ static std::string _str_monam(const monsters& mon, description_level_type desc,
// Add suffixes.
switch (mon.type)
{
- case MONS_ZOMBIE_SMALL: case MONS_ZOMBIE_LARGE:
- result += " zombie"; break;
- case MONS_SKELETON_SMALL: case MONS_SKELETON_LARGE:
- result += " skeleton"; break;
- case MONS_SIMULACRUM_SMALL: case MONS_SIMULACRUM_LARGE:
- result += " simulacrum"; break;
- default: break;
+ case MONS_ZOMBIE_SMALL:
+ case MONS_ZOMBIE_LARGE:
+ result += " zombie";
+ break;
+ case MONS_SKELETON_SMALL:
+ case MONS_SKELETON_LARGE:
+ result += " skeleton";
+ break;
+ case MONS_SIMULACRUM_SMALL:
+ case MONS_SIMULACRUM_LARGE:
+ result += " simulacrum";
+ break;
+ default:
+ break;
}
// Vowel fix: Change 'a orc' to 'an orc'
@@ -1864,8 +1871,8 @@ habitat_type mons_habitat_by_type(int mc)
habitat_type mons_habitat(const monsters *m)
{
- return mons_habitat_by_type(
- mons_is_zombified(m)? mons_zombie_base(m) : m->type );
+ return mons_habitat_by_type( mons_is_zombified(m) ? mons_zombie_base(m)
+ : m->type );
}
bool intelligent_ally(const monsters *monster)
@@ -2534,6 +2541,7 @@ bool monster_shover(const monsters *m)
return (false);
int mchar = me->showchar;
+
// Somewhat arbitrary: giants and dragons are too big to get past anything,
// beetles are too dumb (arguable), dancing weapons can't communicate, eyes
// aren't pushers and shovers, zombies are zombies. Worms and elementals
@@ -6476,8 +6484,10 @@ mon_body_shape get_mon_shape(const int type)
if (type == MONS_SKELETAL_WARRIOR)
return(MON_SHAPE_HUMANOID);
else
+ {
// constructed type, not enough info to determine shape
return(MON_SHAPE_MISC);
+ }
case 'A': // angelic beings
return(MON_SHAPE_HUMANOID_WINGED);
case 'B': // beetles