From 6da05e1508f03605b65d613eb5fd707d40b3c761 Mon Sep 17 00:00:00 2001 From: PatR Date: Wed, 4 Sep 2024 13:34:21 -0700 Subject: [PATCH] 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. --- doc/fixes3-7-0.txt | 1 + src/dokick.c | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/doc/fixes3-7-0.txt b/doc/fixes3-7-0.txt index 803596e42..8ff5c8116 100644 --- a/doc/fixes3-7-0.txt +++ b/doc/fixes3-7-0.txt @@ -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 diff --git a/src/dokick.c b/src/dokick.c index 78eb5b728..997ffcbda 100644 --- a/src/dokick.c +++ b/src/dokick.c @@ -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)