From 095abbe1e7caa80d4ad287a7f2d49837bbc3f141 Mon Sep 17 00:00:00 2001 From: haranp Date: Thu, 25 Oct 2007 15:05:11 +0000 Subject: Minor code cleanup. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2571 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/monstuff.cc | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'crawl-ref/source/monstuff.cc') 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 #include #include -#include #ifdef DOS #include @@ -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); -- cgit v1.2.3-54-g00ecf