]> granicus.if.org Git - nethack/commitdiff
sliming ghosts
authorcohrs <cohrs>
Mon, 14 Mar 2005 16:27:35 +0000 (16:27 +0000)
committercohrs <cohrs>
Mon, 14 Mar 2005 16:27:35 +0000 (16:27 +0000)
From a bug report.  Green slime would slime noncorporeals.
Added missing checks.

doc/fixes34.4
src/mhitm.c
src/mhitu.c
src/uhitm.c

index efa902022a6d616695594e44ffef937616cc41e6..b79d86872b948c8b5484710dc349108210598c81 100644 (file)
@@ -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
index 04ec8041de7185765ce4406d7a4e06ad2c6bb856..6c3a26d9f1078270aa59700f9825bf152d20de74 100644 (file)
@@ -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;
index 5278fae59ed9a652bf060928c88ed07c49480244..dd63761a84f9ee8532d487304fd47275ead78c00 100644 (file)
@@ -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;
index e9db46f3fcf7042f7ad6b417d131c6b435cd28af..775c0bd1fd9f5590c488118cf9ebfe5f2738b297 100644 (file)
@@ -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);