summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/monstuff.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-10-25 15:05:11 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-10-25 15:05:11 +0000
commit095abbe1e7caa80d4ad287a7f2d49837bbc3f141 (patch)
treed9b34cd63e15cd721a97c2e4c4d0b350a797f082 /crawl-ref/source/monstuff.cc
parentf620ad507fe86f50e66e6b15e62b842682a64814 (diff)
downloadcrawl-ref-095abbe1e7caa80d4ad287a7f2d49837bbc3f141.tar.gz
crawl-ref-095abbe1e7caa80d4ad287a7f2d49837bbc3f141.zip
Minor code cleanup.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2571 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/monstuff.cc')
-rw-r--r--crawl-ref/source/monstuff.cc23
1 files changed, 14 insertions, 9 deletions
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index b198d39281..fdf88457fc 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -24,7 +24,6 @@
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
-#include <math.h>
#ifdef DOS
#include <conio.h>
@@ -1162,14 +1161,13 @@ bool monster_polymorph( monsters *monster, monster_type targetc,
str_polymon += "!";
}
- bool player_messaged =
- simple_monster_message(monster, str_polymon.c_str() );
+ bool player_messaged = simple_monster_message(monster, str_polymon.c_str());
// Even if the monster transforms from one type that can behold the
// player into a different type which can also behold the player,
- // the polymoprh disrupts the beholding process. Do this before
+ // the polymorph disrupts the beholding process. Do this before
// changing monster->type, since unbeholding can only happen while
- // monster is still a mermaid.
+ // the monster is still a mermaid.
update_beholders(monster, true);
// the actual polymorphing:
@@ -1244,16 +1242,23 @@ bool monster_polymorph( monsters *monster, monster_type targetc,
}
}
else if (mons_is_insubstantial(monster->type)
- || monster->type == MONS_OOZE || monster->type == MONS_PULSATING_LUMP)
+ || monster->type == MONS_OOZE
+ || monster->type == MONS_PULSATING_LUMP)
{
- int net = get_trapping_net(monster->x, monster->y);
+ const int net = get_trapping_net(monster->x, monster->y);
if (net != NON_ITEM)
remove_item_stationary(mitm[net]);
if (mons_is_insubstantial(monster->type))
- simple_monster_message(monster, " drifts right through the net!");
+ {
+ simple_monster_message(monster,
+ " drifts right through the net!");
+ }
else
- simple_monster_message(monster, " oozes right through the net!");
+ {
+ simple_monster_message(monster,
+ " oozes right through the net!");
+ }
}
else
monster->add_ench(ENCH_HELD);