From bf2190c55e63321659269699169c17f5ad30af07 Mon Sep 17 00:00:00 2001 From: cohrs Date: Tue, 5 Mar 2002 06:21:05 +0000 Subject: [PATCH] allow locks to be forced again - use uwep's oc_wldam value, not chest's oc_wldam value, for computing chance. oc_wldam has always been 0 for all containers - the code was broken for a long time, but was masked by the off-by-1 error in checking the chance, allowing a 1% chance of forcing - the result is that forcing locks is a lot easier --- src/lock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lock.c b/src/lock.c index 4edcb4f56..58da7e690 100644 --- a/src/lock.c +++ b/src/lock.c @@ -476,7 +476,7 @@ doforce() /* try to force a chest with your weapon */ else You("start bashing it with your %s.", xname(uwep)); xlock.box = otmp; - xlock.chance = objects[otmp->otyp].oc_wldam * 2; + xlock.chance = objects[uwep->otyp].oc_wldam * 2; xlock.picktyp = picktyp; xlock.usedtime = 0; break;