From 59cc0d221bf8f19fcf390e7c55912cc3aa51ee31 Mon Sep 17 00:00:00 2001 From: cohrs Date: Mon, 14 Mar 2005 16:27:35 +0000 Subject: [PATCH] sliming ghosts From a bug report. Green slime would slime noncorporeals. Added missing checks. --- doc/fixes34.4 | 1 + src/mhitm.c | 1 + src/mhitu.c | 1 + src/uhitm.c | 1 + 4 files changed, 4 insertions(+) diff --git a/doc/fixes34.4 b/doc/fixes34.4 index efa902022..b79d86872 100644 --- a/doc/fixes34.4 +++ b/doc/fixes34.4 @@ -94,6 +94,7 @@ succubi will remove hero's gloves before taking worn ring; incubi will do mbodypart should return forehoof, not foreclaw, for horselike monsters further digging of an existing hole finishes in a single turn only prefix shopkeeper names with "Mr." or "Ms." when not a personal name +green slime should not affect noncorporeal monsters Platform- and/or Interface-Specific Fixes diff --git a/src/mhitm.c b/src/mhitm.c index 04ec8041d..6c3a26d9f 100644 --- a/src/mhitm.c +++ b/src/mhitm.c @@ -1213,6 +1213,7 @@ mdamagem(magr, mdef, mattk) case AD_SLIM: if (cancelled) break; /* physical damage only */ if (!rn2(4) && !flaming(mdef->data) && + !noncorporeal(mdef->data) && mdef->data != &mons[PM_GREEN_SLIME]) { (void) newcham(mdef, &mons[PM_GREEN_SLIME], FALSE, vis); mdef->mstrategy &= ~STRAT_WAITFORU; diff --git a/src/mhitu.c b/src/mhitu.c index 5278fae59..dd63761a8 100644 --- a/src/mhitu.c +++ b/src/mhitu.c @@ -1512,6 +1512,7 @@ dopois: pline_The("slime burns away!"); dmg = 0; } else if (Unchanging || + noncorporeal(youmonst.data) || youmonst.data == &mons[PM_GREEN_SLIME]) { You("are unaffected."); dmg = 0; diff --git a/src/uhitm.c b/src/uhitm.c index e9db46f3f..775c0bd1f 100644 --- a/src/uhitm.c +++ b/src/uhitm.c @@ -1642,6 +1642,7 @@ register struct attack *mattk; case AD_SLIM: if (negated) break; /* physical damage only */ if (!rn2(4) && !flaming(mdef->data) && + !noncorporeal(mdef->data) && mdef->data != &mons[PM_GREEN_SLIME]) { You("turn %s into slime.", mon_nam(mdef)); (void) newcham(mdef, &mons[PM_GREEN_SLIME], FALSE, FALSE);