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

@@ -1437,6 +1437,19 @@ domove()
}
}
if (context.forcefight && levl[x][y].typ == IRONBARS && uwep) {
struct obj *obj = uwep;
if (breaktest(obj)) {
if (obj->quan > 1L)
obj = splitobj(obj, 1L);
else
setuwep((struct obj *)0);
freeinv(obj);
}
hit_bars(&obj, u.ux, u.uy, x, y, TRUE, TRUE);
return;
}
/* specifying 'F' with no monster wastes a turn */
if (context.forcefight
/* remembered an 'I' && didn't use a move command */