From 4e3812b5e481d61843832b109cd490fdb3a57ade Mon Sep 17 00:00:00 2001 From: Michael Meyer Date: Fri, 27 May 2022 14:54:35 -0400 Subject: [PATCH 1/2] Fix: mdisplacem stoning and gloves Apparently this is a bug that's existed since mon-vs-mon displacement was introduced in 2003 (in 89c785e): if a monster displaced a footrice, having gloves on would make it vulnerable to being stoned, while having bare hands would protect it. Switch it around so wearing gloves blocks petrification, as it does under other circumstances. Also add a message explaining why the displacing monster was stoned (if the displacement attempt is visible to the hero), so the "Foo turns to stone!" message has some context. --- src/mhitm.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/mhitm.c b/src/mhitm.c index 318aa75fa..c20e1e7f1 100644 --- a/src/mhitm.c +++ b/src/mhitm.c @@ -226,13 +226,18 @@ mdisplacem(register struct monst *magr, register struct monst *mdef, g.vis = (canspotmon(magr) && canspotmon(mdef)); if (touch_petrifies(pd) && !resists_ston(magr)) { - if (which_armor(magr, W_ARMG) != 0) { + if (!which_armor(magr, W_ARMG)) { if (poly_when_stoned(pa)) { mon_to_stone(magr); return MM_HIT; /* no damage during the polymorph */ } - if (!quietly && canspotmon(magr)) + if (!quietly && canspotmon(magr)) { + if (g.vis) { + pline("%s tries to move %s out of %s way.", Monnam(magr), + mon_nam(mdef), is_rider(pa) ? "the" : mhis(magr)); + } pline("%s turns to stone!", Monnam(magr)); + } monstone(magr); if (!DEADMONSTER(magr)) return MM_HIT; /* lifesaved */ From 2af1acce8b95b7e887e6e1ceb00351c5ab26d0a9 Mon Sep 17 00:00:00 2001 From: nhmall Date: Fri, 27 May 2022 16:07:27 -0400 Subject: [PATCH 2/2] mdisplacem stoning and gloves had test backwards Closes #773 --- doc/fixes3-7-0.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/fixes3-7-0.txt b/doc/fixes3-7-0.txt index 9f885d4cb..ff70b1db9 100644 --- a/doc/fixes3-7-0.txt +++ b/doc/fixes3-7-0.txt @@ -1799,6 +1799,7 @@ split adjusting attributes into separate function (pr #757 by argrath) split getting damages with a kick into separate function (pr #758 by argrath) split fixing curse trouble into separate function (pr #765 by argrath) Handle -eaux plurals in makeplural/makesingular (pr #767 by entrez) +mdisplacem stoning and gloves had test backwards (pr #773 by entrez) Code Cleanup and Reorganization