summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/fight.cc
diff options
context:
space:
mode:
authorDavid Lawrence Ramsey <dolorous@users.sourceforge.net>2009-09-25 09:17:41 -0500
committerDavid Lawrence Ramsey <dolorous@users.sourceforge.net>2009-09-25 09:17:41 -0500
commitc592806b56f3b1a2793741f5a5a95d6317b3f089 (patch)
treea2acb594bc1353904b32949cd50aa1f7b691c252 /crawl-ref/source/fight.cc
parent4b6eba016a3f7edd8513d032b2b78fe281148c80 (diff)
downloadcrawl-ref-c592806b56f3b1a2793741f5a5a95d6317b3f089.tar.gz
crawl-ref-c592806b56f3b1a2793741f5a5a95d6317b3f089.zip
Add minor cosmetic fixes.
Diffstat (limited to 'crawl-ref/source/fight.cc')
-rw-r--r--crawl-ref/source/fight.cc23
1 files changed, 10 insertions, 13 deletions
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc
index 0e09506670..a50a99904a 100644
--- a/crawl-ref/source/fight.cc
+++ b/crawl-ref/source/fight.cc
@@ -368,7 +368,7 @@ void melee_attack::check_hand_half_bonus_eligible()
&& !can_do_unarmed
&& !shield
&& weapon
- && !item_cursed( *weapon )
+ && !item_cursed(*weapon)
&& hands == HANDS_HALF);
}
@@ -377,17 +377,16 @@ void melee_attack::init_attack()
weapon = attacker->weapon(attack_number);
damage_brand = attacker->damage_brand(attack_number);
- if (weapon && weapon->base_type == OBJ_WEAPONS
- && is_artefact( *weapon ))
+ if (weapon && weapon->base_type == OBJ_WEAPONS && is_artefact(*weapon))
{
- artefact_wpn_properties( *weapon, art_props );
- if (is_unrandom_artefact( *weapon ))
+ artefact_wpn_properties(*weapon, art_props);
+ if (is_unrandom_artefact(*weapon))
unrand_entry = get_unrand_entry(weapon->special);
}
- wpn_skill = weapon ? weapon_skill( *weapon ) : SK_UNARMED_COMBAT;
+ wpn_skill = weapon ? weapon_skill(*weapon) : SK_UNARMED_COMBAT;
if (weapon)
- hands = hands_reqd( *weapon, attacker->body_size() );
+ hands = hands_reqd(*weapon, attacker->body_size());
shield = attacker->shield();
if (defender)
@@ -403,13 +402,11 @@ void melee_attack::init_attack()
needs_message = (attacker_visible || defender_visible);
if (defender && defender->atype() == ACT_MONSTER)
- {
defender_starting_attitude = defender_as_monster()->temp_attitude();
- }
else
{
- // Not really, but this is used for god conducts,
- // so hostile is fine.
+ // Not really, but this is used for god conducts, so hostile is
+ // fine.
defender_starting_attitude = ATT_HOSTILE;
}
@@ -426,14 +423,14 @@ std::string melee_attack::actor_name(const actor *a,
bool actor_visible,
bool actor_invisible)
{
- return (actor_visible? a->name(desc) : anon_name(desc, actor_invisible));
+ return (actor_visible ? a->name(desc) : anon_name(desc, actor_invisible));
}
std::string melee_attack::pronoun(const actor *a,
pronoun_type pron,
bool actor_visible)
{
- return (actor_visible? a->pronoun(pron) : anon_pronoun(pron));
+ return (actor_visible ? a->pronoun(pron) : anon_pronoun(pron));
}
std::string melee_attack::anon_pronoun(pronoun_type pron)