diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-26 10:39:39 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-26 10:39:39 +0000 |
commit | 61cae4a761c2f72cda44ae269c7007b37a0c14a7 (patch) | |
tree | fec8ec71ca7ca6eebd9d48881bc5ee3fe27d04c1 /crawl-ref/source/spells1.cc | |
parent | d4acdf4a6a4b73607d58714a66efd372674adb56 (diff) | |
download | crawl-ref-61cae4a761c2f72cda44ae269c7007b37a0c14a7.tar.gz crawl-ref-61cae4a761c2f72cda44ae269c7007b37a0c14a7.zip |
Misc. minor cleanups. (Yes, a huge amount of them but still...)
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6146 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spells1.cc')
-rw-r--r-- | crawl-ref/source/spells1.cc | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/crawl-ref/source/spells1.cc b/crawl-ref/source/spells1.cc index 3b0abac19b..aab5108603 100644 --- a/crawl-ref/source/spells1.cc +++ b/crawl-ref/source/spells1.cc @@ -489,13 +489,13 @@ bool conjure_flame(int pow) if (!spelld.isValid) { canned_msg(MSG_OK); - return false; + return (false); } if (trans_wall_blocking(spelld.tx, spelld.ty)) { mpr("A translucent wall is in the way."); - return false; + return (false); } else if (!see_grid(spelld.tx, spelld.ty)) { @@ -518,14 +518,14 @@ bool conjure_flame(int pow) mpr( "There's already something there!" ); continue; } - else if ( cloud != EMPTY_CLOUD ) + else if (cloud != EMPTY_CLOUD) { - // reinforce the cloud - but not too much + // Reinforce the cloud - but not too much. mpr( "The fire roars with new energy!" ); const int extra_dur = 2 + std::min(random2(pow) / 2, 20); env.cloud[cloud].decay += extra_dur * 5; env.cloud[cloud].whose = KC_YOU; - return true; + return (true); } break; @@ -537,7 +537,7 @@ bool conjure_flame(int pow) durat = 23; place_cloud( CLOUD_FIRE, spelld.tx, spelld.ty, durat, KC_YOU ); - return true; + return (true); } bool stinking_cloud( int pow, bolt &beem ) @@ -609,13 +609,15 @@ static bool _can_pacify_monster(const monsters *mon, const int healed) ASSERT(you.religion == GOD_ELYVILON); if (healed < 1) - return false; + return (false); if (!_mons_hostile(mon)) - return false; + return (false); + // I was thinking of jellies when I wrote this, but maybe we shouldn't + // exclude zombies and such... (jpeg) if (mons_intel(mon->type) <= I_PLANT) // no self-awareness - return false; + return (false); const mon_holy_type holiness = mons_holiness(mon); @@ -624,14 +626,14 @@ static bool _can_pacify_monster(const monsters *mon, const int healed) && holiness != MH_UNDEAD && holiness != MH_DEMONIC) { - return false; + return (false); } if (mons_is_stationary(mon)) // not able to leave the level - return false; + return (false); if (mons_is_sleeping(mon)) // not aware of what is happening - return false; + return (false); const int factor = (mons_intel(mon->type) <= I_ANIMAL) ? 3 : // animals (is_player_same_species(mon->type)) ? 2 // same species @@ -657,9 +659,9 @@ static bool _can_pacify_monster(const monsters *mon, const int healed) #endif if (mon->max_hit_points < factor * random_factor) - return true; + return (true); - return false; + return (false); } static int _healing_spell( int healed, int target_x = -1, int target_y = -1) |