From 167ae03b160a0ccadd7934b2bfe557d491f1cb1f Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Mon, 7 Jul 2008 11:58:54 +0000 Subject: Another clean up, and add some new weapon speech. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6439 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/ouch.cc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'crawl-ref/source/ouch.cc') diff --git a/crawl-ref/source/ouch.cc b/crawl-ref/source/ouch.cc index e60da7c57b..79ba0944ee 100644 --- a/crawl-ref/source/ouch.cc +++ b/crawl-ref/source/ouch.cc @@ -277,7 +277,7 @@ void splash_with_acid( char acid_strength ) continue; } - if (random2(20) <= acid_strength) + if (x_chance_in_y(acid_strength + 1, 20)) item_corrode( you.equip[splc] ); } @@ -309,11 +309,10 @@ void weapon_acid( char acid_strength ) msg::stream << "Your " << your_hand(true) << " burn!" << std::endl; ouch( roll_dice( 1, acid_strength ), 0, KILLED_BY_ACID ); } - else if (random2(20) <= acid_strength) - { + + if (x_chance_in_y(acid_strength + 1, 20)) item_corrode( hand_thing ); - } -} // end weapon_acid() +} void item_corrode( int itco ) { -- cgit v1.2.3-54-g00ecf