]> granicus.if.org Git - nethack/commitdiff
tsurugi vs puddings
authorPatR <rankin@nethack.org>
Fri, 5 Feb 2016 09:25:12 +0000 (01:25 -0800)
committerPatR <rankin@nethack.org>
Fri, 5 Feb 2016 09:25:12 +0000 (01:25 -0800)
Another one from 4.5 years ago:  the Tsurugi of Muramasa ought to
be able to split puddings in keeping with its special attack effect
of slicing things in two.  The suggestion was more extreme:  always
split instead of kill.  This generalizes the less extreme version;
METAL weapons (scalpel and tsurugi) can now split puddings like IRON
weapons do even though their user faces no risk of having the weapon
become rusty.  Sam's quest artifact receives no special treatment.

Bashing puddings with wielded iron-tipped projectiles was splitting
them.  This prevents that (and also for metal-tipped ya).

doc/fixes36.1
src/uhitm.c

index 8c6866cb20e7794948f9efd06d3e3c17b4047c98..f8bb03ff7be661c7cc27828f263d095cc923539f 100644 (file)
@@ -149,6 +149,8 @@ stolen_value, used when breaking shop items from outside the shop among other
 when two or more shopkeepers were visible at once, 'p' command could be used
        to probe map for locations of other shopkeepers and arbitrary monsters
 vortexes and other unsolid monsters need not avoid webs
+barbarian and samurai can achieve basic in their special spell's skill
+scalpel and tsurugi can now split puddings; bashing with darts or arrows can't
 
 
 Platform- and/or Interface-Specific Fixes
index ed22d5d821767e7afa80ac6bb1f4db366168a32f..a358020292775e7ef290026e0103366c3c4e7d93 100644 (file)
@@ -1,4 +1,4 @@
-/* NetHack 3.6 uhitm.c $NHDT-Date: 1446887537 2015/11/07 09:12:17 $  $NHDT-Branch: master $:$NHDT-Revision: 1.151 $ */
+/* NetHack 3.6 uhitm.c $NHDT-Date: 1454664302 2016/02/05 09:25:02 $  $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.154 $ */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -1082,8 +1082,13 @@ int thrown; /* HMON_xxx (0 => hand-to-hand, other => ranged) */
     if ((mdat == &mons[PM_BLACK_PUDDING] || mdat == &mons[PM_BROWN_PUDDING])
         /* pudding is alive and healthy enough to split */
         && mon->mhp > 1 && !mon->mcan
-        /* iron weapon using melee or polearm hit */
-        && obj && obj == uwep && objects[obj->otyp].oc_material == IRON
+        /* iron weapon using melee or polearm hit [3.6.1: metal weapon too] */
+        && obj && obj == uwep
+        && ((objects[obj->otyp].oc_material == IRON
+             /* allow scalpel and tsurugi to split puddings */
+             || objects[obj->otyp].oc_material == METAL)
+            /* but not bashing with darts, arrows or ya */
+            && !(is_ammo(obj) || is_missile(obj)))
         && hand_to_hand) {
         if (clone_mon(mon, 0, 0)) {
             pline("%s divides as you hit it!", Monnam(mon));