summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/beam.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-19 17:59:52 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-19 17:59:52 +0000
commitc04cf4e35b80ebd0560f9ce3a0ba4f728053bc43 (patch)
tree3f2f281fe4956e60f75c552162957fd0efa6300f /crawl-ref/source/beam.cc
parentc4a73db49e4910d56ae96a0f91ee4339c1657fa7 (diff)
downloadcrawl-ref-c04cf4e35b80ebd0560f9ce3a0ba4f728053bc43.tar.gz
crawl-ref-c04cf4e35b80ebd0560f9ce3a0ba4f728053bc43.zip
Simplify.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5983 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/beam.cc')
-rw-r--r--crawl-ref/source/beam.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc
index e7fa203a2b..81f36eb76b 100644
--- a/crawl-ref/source/beam.cc
+++ b/crawl-ref/source/beam.cc
@@ -1679,13 +1679,12 @@ static void _zappy( zap_type z_type, int power, bolt &pbolt )
break;
}
- if ( wearing_amulet(AMU_INACCURACY) )
+ if (wearing_amulet(AMU_INACCURACY))
{
pbolt.hit -= 5;
- if ( pbolt.hit < 0 )
- pbolt.hit = 0;
+ pbolt.hit = std::max(0, pbolt.hit);
}
-} // end zappy()
+}
/* NEW (GDL):
* Now handles all beamed/thrown items and spells, tracers, and their effects.