summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/ouch.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-10 16:18:59 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-10 16:18:59 +0000
commit5a45e3bd8e7330880429c24955d9c4af1ec3608e (patch)
tree93827f3a07ee60143314d06b8951cde75f145277 /crawl-ref/source/ouch.cc
parent9c54579bf00656ac37b4bed56fe710399f723c8f (diff)
downloadcrawl-ref-5a45e3bd8e7330880429c24955d9c4af1ec3608e.tar.gz
crawl-ref-5a45e3bd8e7330880429c24955d9c4af1ec3608e.zip
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
Diffstat (limited to 'crawl-ref/source/ouch.cc')
-rw-r--r--crawl-ref/source/ouch.cc5
1 files changed, 2 insertions, 3 deletions
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))