diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-07-10 14:39:23 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-07-10 14:39:23 +0000 |
commit | 7d68c463cb8255d473bf294ed159146087caa608 (patch) | |
tree | 839229345d4f989519034cbbd646198beee546d7 /crawl-ref/source | |
parent | 5d87f8966fe969d337a58cc9926355d820f3a3af (diff) | |
download | crawl-ref-7d68c463cb8255d473bf294ed159146087caa608.tar.gz crawl-ref-7d68c463cb8255d473bf294ed159146087caa608.zip |
Add miscellaneous minor fixes.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10131 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r-- | crawl-ref/source/mon-util.cc | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc index bdcdbd4646..ad9bd09bd1 100644 --- a/crawl-ref/source/mon-util.cc +++ b/crawl-ref/source/mon-util.cc @@ -7107,9 +7107,9 @@ void monsters::timeout_enchantments(int levels) case ENCH_SLOWLY_DYING: { - const int actdur = speed_to_duration(speed)*levels; + const int actdur = speed_to_duration(speed) * levels; if (lose_ench_duration(i->first, actdur)) - monster_die(this,KILL_MISC,-1,true); + monster_die(this, KILL_MISC, NON_MONSTER, true); break; } default: @@ -7490,13 +7490,16 @@ void monsters::apply_enchantment(const mon_enchant &me) case ENCH_SLOWLY_DYING: - // If you are no longer dying you must be dead + // If you are no longer dying, you must be dead. if (decay_enchantment(me)) { if (see_grid(this->position)) - mprf("A nearby %s withers and dies.", this->name(DESC_PLAIN, false).c_str()); + { + mprf("A nearby %s withers and dies.", + this->name(DESC_PLAIN, false).c_str()); + } - monster_die(this,KILL_MISC,-1,true); + monster_die(this, KILL_MISC, NON_MONSTER, true); } break; @@ -8379,8 +8382,8 @@ int mon_enchant::calc_duration(const monsters *mons, case ENCH_SLOWLY_DYING: // This may be a little too direct but the randomization at the end // of this function is excessive for corpse mold. -cao - return (2*FRESHEST_CORPSE + random2(10)) * speed_to_duration(mons->speed) - * mons->speed/10; + return (2 * FRESHEST_CORPSE + random2(10)) + * speed_to_duration(mons->speed) * mons->speed / 10; case ENCH_ABJ: if (deg >= 6) cturn = 1000 / _mod_speed(10, mons->speed); |