diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-19 17:59:52 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-19 17:59:52 +0000 |
commit | c04cf4e35b80ebd0560f9ce3a0ba4f728053bc43 (patch) | |
tree | 3f2f281fe4956e60f75c552162957fd0efa6300f /crawl-ref/source/beam.cc | |
parent | c4a73db49e4910d56ae96a0f91ee4339c1657fa7 (diff) | |
download | crawl-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.cc | 7 |
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. |