From c04cf4e35b80ebd0560f9ce3a0ba4f728053bc43 Mon Sep 17 00:00:00 2001 From: dolorous Date: Thu, 19 Jun 2008 17:59:52 +0000 Subject: Simplify. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5983 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/beam.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'crawl-ref/source/beam.cc') 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. -- cgit v1.2.3-54-g00ecf