diff options
author | David Lawrence Ramsey <dolorous@users.sourceforge.net> | 2009-11-04 08:24:49 -0600 |
---|---|---|
committer | David Lawrence Ramsey <dolorous@users.sourceforge.net> | 2009-11-04 08:24:49 -0600 |
commit | 2287cbbbf5ad77fa796916e6710454dcb97c1dd0 (patch) | |
tree | 513166f09902e16d718c341c932558e088d5ec7e /crawl-ref | |
parent | 741b2910228e9b270a23a4c4500449cc4fb374f7 (diff) | |
download | crawl-ref-2287cbbbf5ad77fa796916e6710454dcb97c1dd0.tar.gz crawl-ref-2287cbbbf5ad77fa796916e6710454dcb97c1dd0.zip |
Add minor cosmetic fixes.
Diffstat (limited to 'crawl-ref')
-rw-r--r-- | crawl-ref/source/mon-abil.cc | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/crawl-ref/source/mon-abil.cc b/crawl-ref/source/mon-abil.cc index 761290efc8..7b59a35691 100644 --- a/crawl-ref/source/mon-abil.cc +++ b/crawl-ref/source/mon-abil.cc @@ -323,8 +323,8 @@ static bool _disabled_slime(monsters *thing) // // A slime creature will merge if there is an adjacent slime, merging // onto that slime would reduce the distance to the original slime's -// target, and there are no empty squares that would also reduce -// the distance to the target. +// target, and there are no empty squares that would also reduce the +// distance to the target. static bool _slime_merge(monsters *thing) { if (!thing || _disabled_slime(thing) || _unoccupied_slime(thing)) @@ -343,17 +343,19 @@ static bool _slime_merge(monsters *thing) { coord_def target = origin + Compass[compass_idx[i]]; - // If this square won't reduce the distance to our target don't + // If this square won't reduce the distance to our target, don't // look for a potential merge, and don't allow this square to // prevent a merge if empty. - if(grid_distance(thing->target, target) >= target_distance) + if (grid_distance(thing->target, target) >= target_distance) continue; // Don't merge if there is an open square that reduces distance - // to target even if we found a possible slime to merge with. - if(!actor_at(target) - && mons_class_can_pass(MONS_SLIME_CREATURE, env.grid(target))) + // to target, even if we found a possible slime to merge with. + if (!actor_at(target) + && mons_class_can_pass(MONS_SLIME_CREATURE, env.grid(target))) + { return false; + } // Is there a slime creature on this square we can consider // merging with? @@ -366,8 +368,8 @@ static bool _slime_merge(monsters *thing) && !mons_is_shapeshifter(other_thing) && !_disabled_slime(other_thing)) { - // We can potentially merge if doing wouldn't take us over - // the merge cap + // We can potentially merge if doing so won't take us over + // the merge cap. int new_blob_count = other_thing->number + thing->number; if (new_blob_count <= max_slime_merge) merge_target = other_thing; @@ -376,8 +378,8 @@ static bool _slime_merge(monsters *thing) // We found a merge target and didn't find an open square that // would reduce distance to target, so we can actually merge. - if(merge_target) - return _do_merge(thing, merge_target); + if (merge_target) + return (_do_merge(thing, merge_target)); // No adjacent slime creatures we could merge with. return (false); |