From: arromdee Date: Sat, 23 Feb 2002 06:12:55 +0000 (+0000) Subject: pudding cloning (from beta-test) X-Git-Tag: MOVE2GIT~3141 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6033bee646446d10df6b246966434a95516c9954;p=nethack pudding cloning (from beta-test) --- diff --git a/doc/fixes34.0 b/doc/fixes34.0 index dc4054529..1cd57b2f7 100644 --- a/doc/fixes34.0 +++ b/doc/fixes34.0 @@ -435,6 +435,8 @@ strengthen Death; weaken Famine, Pestilence, and Demogorgon pet purple worms get nutrition from engulfing attack throwing an artifact upwards will trigger artifact hit effects when it falls being hit by Fire Brand when not resistant stops the turning-into-slime process +monsters hitting other monsters can split puddings with weapons +be consistent with checking for iron weapons when splitting puddings Platform- and/or Interface-Specific Fixes diff --git a/src/mhitm.c b/src/mhitm.c index 7ec1037e5..840702bfb 100644 --- a/src/mhitm.c +++ b/src/mhitm.c @@ -274,9 +274,22 @@ mattackm(magr, mdef) /* KMH -- don't accumulate to-hit bonuses */ if (otmp) tmp -= hitval(otmp, mdef); - if (strike) + if (strike) { res[i] = hitmm(magr, mdef, mattk); - else + if((mdef->data == &mons[PM_BLACK_PUDDING] || mdef->data == &mons[PM_BROWN_PUDDING]) + && otmp && objects[otmp->otyp].oc_material == IRON + && mdef->mhp > 1 && !mdef->mcan) + { + if (clone_mon(mdef)) { + if (vis) { + char buf[BUFSZ]; + + Strcpy(buf, Monnam(mdef)); + pline("%s divides as %s hits it!", buf, mon_nam(magr)); + } + } + } + } else missmm(magr, mdef, mattk); break; diff --git a/src/mhitu.c b/src/mhitu.c index 53bf6b49e..77b76a705 100644 --- a/src/mhitu.c +++ b/src/mhitu.c @@ -883,6 +883,7 @@ hitmu(mtmp, mattk) hitmsg(mtmp, mattk); if (!dmg) break; if (u.mh > 1 && u.mh > ((u.uac>0) ? dmg : dmg+u.uac) && + objects[otmp->otyp].oc_material == IRON && (u.umonnum==PM_BLACK_PUDDING || u.umonnum==PM_BROWN_PUDDING)) { /* This redundancy necessary because you have to