From 5a45e3bd8e7330880429c24955d9c4af1ec3608e Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Thu, 10 Jul 2008 16:18:59 +0000 Subject: Fix occasional jelly crash on unarmed characters. Fix quiver hanging on unthrowable missiles (e.g. javelins, nets for small species). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6478 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/ouch.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'crawl-ref/source/ouch.cc') diff --git a/crawl-ref/source/ouch.cc b/crawl-ref/source/ouch.cc index 79ba0944ee..50248a8d25 100644 --- a/crawl-ref/source/ouch.cc +++ b/crawl-ref/source/ouch.cc @@ -309,8 +309,7 @@ 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 ); } - - if (x_chance_in_y(acid_strength + 1, 20)) + else if (x_chance_in_y(acid_strength + 1, 20)) item_corrode( hand_thing ); } @@ -320,7 +319,7 @@ void item_corrode( int itco ) bool it_resists = false; // code simplifier {dlb} bool suppress_msg = false; // code simplifier {dlb} int how_rusty = ((you.inv[itco].base_type == OBJ_WEAPONS) - ? you.inv[itco].plus2 : you.inv[itco].plus); + ? you.inv[itco].plus2 : you.inv[itco].plus); // early return for "oRC and cloak/preservation {dlb}: if (wearing_amulet(AMU_RESIST_CORROSION) && !one_chance_in(10)) -- cgit v1.2.3-54-g00ecf