Allow dissolving iron bars with potion of acid

Force-fight iron bars with wielded potion of acid to dissolve them

This change comes via UnNetHack by Patric Mueller.
This commit is contained in:
Pasi Kallinen
2016-01-06 15:33:36 +02:00
parent 72f55fedb5
commit 237c4a2787
6 changed files with 64 additions and 17 deletions

View File

@@ -1889,7 +1889,9 @@ int style;
if (dist > 0 && isok(bhitpos.x + dx, bhitpos.y + dy)
&& levl[bhitpos.x + dx][bhitpos.y + dy].typ == IRONBARS) {
x2 = bhitpos.x, y2 = bhitpos.y; /* object stops here */
if (hits_bars(&singleobj, x2, y2, !rn2(20), 0)) {
if (hits_bars(&singleobj,
x2, y2, x2+dx, y2+dy,
!rn2(20), 0)) {
if (!singleobj) {
used_up = TRUE;
launch_drop_spot((struct obj *) 0, 0, 0);