summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/player.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-03-10 16:11:24 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-03-10 16:11:24 +0000
commit9206d5f989a000bf928bbfc8d7bf0e64e7ce6ae3 (patch)
tree622b6aea498583bd87d3f9021465fe8cde0a7398 /crawl-ref/source/player.cc
parentcdd916da064806bcc7da69efbb1b9cdc4ce818ad (diff)
downloadcrawl-ref-9206d5f989a000bf928bbfc8d7bf0e64e7ce6ae3.tar.gz
crawl-ref-9206d5f989a000bf928bbfc8d7bf0e64e7ce6ae3.zip
Add minor cosmetic fixes.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9407 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/player.cc')
-rw-r--r--crawl-ref/source/player.cc21
1 files changed, 11 insertions, 10 deletions
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index 3ea824aae0..972af81dd5 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -2744,20 +2744,21 @@ int player_sust_abil(bool calc_unid)
{
int sa = 0;
- sa += player_equip( EQ_RINGS, RING_SUSTAIN_ABILITIES, calc_unid );
+ sa += player_equip(EQ_RINGS, RING_SUSTAIN_ABILITIES, calc_unid);
- return sa;
-} // end player_sust_abil()
+ return (sa);
+}
-int carrying_capacity( burden_state_type bs )
+int carrying_capacity(burden_state_type bs)
{
int cap = 3500 + (you.strength * 100) + (player_is_airborne() ? 1000 : 0);
- if ( bs == BS_UNENCUMBERED )
- return (cap * 5) / 6;
- else if ( bs == BS_ENCUMBERED )
- return (cap * 11) / 12;
+
+ if (bs == BS_UNENCUMBERED)
+ return ((cap * 5) / 6);
+ else if (bs == BS_ENCUMBERED)
+ return ((cap * 11) / 12);
else
- return cap;
+ return (cap);
}
int burden_change(void)
@@ -6911,9 +6912,9 @@ int player::hurt(const actor *agent, int amount, beam_type flavour,
bool cleanup_dead)
{
// We ignore cleanup_dead here.
- const monsters *mon = dynamic_cast<const monsters*>(agent);
if (agent->atype() == ACT_MONSTER)
{
+ const monsters *mon = dynamic_cast<const monsters*>(agent);
ouch(amount, mon->mindex(),
KILLED_BY_MONSTER, "", player_monster_visible(mon));
}