summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authorDavid Lawrence Ramsey <dolorous@users.sourceforge.net>2009-09-28 09:04:45 -0500
committerDavid Lawrence Ramsey <dolorous@users.sourceforge.net>2009-09-28 09:04:45 -0500
commitf0d371b01c7bb2385faf63d97dddd5f39eb1190b (patch)
treeddeb839712b45283bdbe9757ffa2d0343dab0c92 /crawl-ref
parent32e36581cd8711538f523b698d99b770a1cc553c (diff)
downloadcrawl-ref-f0d371b01c7bb2385faf63d97dddd5f39eb1190b.tar.gz
crawl-ref-f0d371b01c7bb2385faf63d97dddd5f39eb1190b.zip
Add more minor cosmetic fixes.
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/source/fight.cc16
-rw-r--r--crawl-ref/source/mon-util.cc8
2 files changed, 11 insertions, 13 deletions
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,