From f0d371b01c7bb2385faf63d97dddd5f39eb1190b Mon Sep 17 00:00:00 2001 From: David Lawrence Ramsey Date: Mon, 28 Sep 2009 09:04:45 -0500 Subject: Add more minor cosmetic fixes. --- crawl-ref/source/fight.cc | 16 +++++++--------- crawl-ref/source/mon-util.cc | 8 ++++---- 2 files changed, 11 insertions(+), 13 deletions(-) (limited to 'crawl-ref') diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc index 8c650f3854..12ab335741 100644 --- a/crawl-ref/source/fight.cc +++ b/crawl-ref/source/fight.cc @@ -573,8 +573,6 @@ bool melee_attack::attack() identify_mimic(attacker); identify_mimic(defender); - const coord_def def_pos = defender->pos(); - if (attacker->atype() == ACT_PLAYER && defender->atype() == ACT_MONSTER) { if (stop_attack_prompt(defender_as_monster(), false, attacker->pos())) @@ -614,8 +612,8 @@ bool melee_attack::attack() return (false); } - // Non-fumbled self-attacks due to confusion are still pretty - // funny, though. + // Non-fumbled self-attacks due to confusion are still pretty funny, + // though. else if (attacker == defender && attacker->confused()) { // And is still hilarious if it's the player. @@ -625,8 +623,8 @@ bool melee_attack::attack() xom_is_stimulated(128); } - // Defending monster protects itself from attacks using the - // wall it's in. + // Defending monster protects itself from attacks using the wall + // it's in. if (defender->atype() == ACT_MONSTER && grid_is_solid(defender->pos()) && mons_wall_shielded(defender_as_monster())) { @@ -650,8 +648,8 @@ bool melee_attack::attack() } else if (you.can_see(attacker)) { - // Make sure the monster uses up some energy, even though - // it didn't actually land a blow. + // Make sure the monster uses up some energy, even though it + // didn't actually land a blow. attacker->lose_energy(EUT_ATTACK); if (!mons_near(defender_as_monster())) @@ -715,7 +713,7 @@ bool melee_attack::attack() enable_attack_conducts(conducts); - return retval; + return (retval); } static int _modify_blood_amount(const int damage, const int dam_type) diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc index 601704b69a..ac913ded54 100644 --- a/crawl-ref/source/mon-util.cc +++ b/crawl-ref/source/mon-util.cc @@ -3982,14 +3982,14 @@ item_def *monsters::launcher() return (weap); weap = mslot_item(MSLOT_ALT_WEAPON); - return (weap && is_range_weapon(*weap)? weap : NULL); + return (weap && is_range_weapon(*weap) ? weap : NULL); } item_def *monsters::weapon(int which_attack) { const mon_attack_def attk = mons_attack_spec(this, which_attack); - if ( attk.type != AT_HIT ) - return NULL; + if (attk.type != AT_HIT) + return (NULL); // Even/odd attacks use main/offhand weapon if (which_attack > 1) @@ -4010,7 +4010,7 @@ item_def *monsters::weapon(int which_attack) } } - return (weap == NON_ITEM) ? NULL : &mitm[weap]; + return (weap == NON_ITEM ? NULL : &mitm[weap]); } bool monsters::can_wield(const item_def& item, bool ignore_curse, -- cgit v1.2.3-54-g00ecf