kicking door as a giant

Another byproduct of testing boulder pushing.  If you kick a closed
door while polymorphed into a giant, always succeed in breaking the
door instead of maybe getting the Wham! or Thwack! failure result.
This commit is contained in:
PatR
2024-09-04 13:34:21 -07:00
parent 447da0948f
commit 6da05e1508
2 changed files with 6 additions and 1 deletions

View File

@@ -1466,6 +1466,7 @@ when a secret corridor was discovered by wand of secret door detection or by
wizard mode ^E and converted into a regular corridor, if there was a
formerly embedded object at the spot, presence of the object would be
forgotten unless within range of a light source
when poly'd into a giant, kicking a closed door always succeeds in breaking it
Fixes to 3.7.0-x General Problems Exposed Via git Repository

View File

@@ -907,6 +907,8 @@ kick_ouch(coordxy x, coordxy y, const char *kickobjnam)
staticfn void
kick_door(coordxy x, coordxy y, int avrg_attrib)
{
boolean doorbuster;
if (gm.maploc->doormask == D_ISOPEN || gm.maploc->doormask == D_BROKEN
|| gm.maploc->doormask == D_NODOOR) {
kick_dumb(x, y);
@@ -920,9 +922,11 @@ kick_door(coordxy x, coordxy y, int avrg_attrib)
}
exercise(A_DEX, TRUE);
doorbuster = Upolyd && is_giant(gy.youmonst.data);
/* door is known to be CLOSED or LOCKED */
if (rnl(35) < avrg_attrib + (!martial() ? 0 : ACURR(A_DEX))) {
if (doorbuster || (rnl(35) < avrg_attrib + (!martial() ? 0 : ACURR(A_DEX)))) {
boolean shopdoor = *in_rooms(x, y, SHOPBASE) ? TRUE : FALSE;
/* break the door */
if (gm.maploc->doormask & D_TRAPPED) {
if (flags.verbose)