]> granicus.if.org Git - nethack/commitdiff
pudding cloning (from beta-test)
authorarromdee <arromdee>
Sat, 23 Feb 2002 06:12:55 +0000 (06:12 +0000)
committerarromdee <arromdee>
Sat, 23 Feb 2002 06:12:55 +0000 (06:12 +0000)
doc/fixes34.0
src/mhitm.c
src/mhitu.c

index dc4054529c0489dbb9cea3ceb275ca60cc918288..1cd57b2f74dfbe5860e39fb179c99cd70fb04439 100644 (file)
@@ -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
index 7ec1037e5ca27e08bbb3921d7cc675eaa3058f0a..840702bfbe78e594b8ff6554e64da4490904252d 100644 (file)
@@ -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;
 
index 53bf6b49eb0eb18bd4369d71daaccedf76087c46..77b76a705d577b3ac63d6e150d53a854de0161d7 100644 (file)
@@ -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