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 ++++++++++++++--------- crawl-ref/source/player.cc | 4 +--- 2 files changed, 15 insertions(+), 12 deletions(-) (limited to 'crawl-ref/source') 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); diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index 9078ed275c..5fa78b1ce5 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -27,7 +27,6 @@ #include #include #include -#include #include #include @@ -3956,8 +3955,7 @@ unsigned long exp_needed(int lev) if (lev < 13) { lev -= 4; - level = 10 + 10 * lev - + 30 * (static_cast(pow( 2.0, lev + 1 ))); + level = 10 + 10 * lev + 30 * (2 << lev); } else { -- cgit v1.2.3-54-g00ecf