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
This commit is contained in:
cohrs
2002-03-05 06:21:05 +00:00
parent 41b924838c
commit bf2190c55e

View File

@@ -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;