diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-03-10 16:11:24 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-03-10 16:11:24 +0000 |
commit | 9206d5f989a000bf928bbfc8d7bf0e64e7ce6ae3 (patch) | |
tree | 622b6aea498583bd87d3f9021465fe8cde0a7398 /crawl-ref/source/beam.cc | |
parent | cdd916da064806bcc7da69efbb1b9cdc4ce818ad (diff) | |
download | crawl-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/beam.cc')
-rw-r--r-- | crawl-ref/source/beam.cc | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc index 9dc223b63e..fe701dc282 100644 --- a/crawl-ref/source/beam.cc +++ b/crawl-ref/source/beam.cc @@ -3831,17 +3831,15 @@ void bolt::affect_player() bool was_affected = false; int old_hp = you.hp; - hurted = std::max(hurted, 0); + hurted = std::max(0, hurted); // If the beam is an actual missile or of the MMISSILE type (Earth magic) // we might bleed on the floor. if (!engulfs && (flavour == BEAM_MISSILE || flavour == BEAM_MMISSILE)) { - int blood = hurted / 2; // assumes DVORP_PIERCING, factor: 0.5 - if (blood > you.hp) - blood = you.hp; - + // assumes DVORP_PIERCING, factor: 0.5 + int blood = std::min(you.hp, hurted / 2); bleed_onto_floor(you.pos(), -1, blood, true); } @@ -3865,8 +3863,8 @@ void bolt::affect_player() // handling of missiles if (item && item->base_type == OBJ_MISSILES) { - // SPMSL_POISONED handled via callback _poison_hit_victim() in - // item_use.cc + // SPMSL_POISONED is handled via callback _poison_hit_victim() + // in item_use.cc. if (item->sub_type == MI_THROWING_NET) { player_caught_in_net(); |