]> granicus.if.org Git - nethack/commitdiff
rubber hose attacks
authorPatR <rankin@nethack.org>
Thu, 3 Feb 2022 12:42:19 +0000 (04:42 -0800)
committerPatR <rankin@nethack.org>
Thu, 3 Feb 2022 12:42:19 +0000 (04:42 -0800)
Give similar feedback for attacking with a rubber hose as for bullwhip:
the wielder "lashes" rather than "swings".

src/mhitu.c
src/uhitm.c

index e738cf138a5cb029f155c2c7bdd6e5cfede62b0f..fa73bb196f319ebaa9e61f808a0e44d705c81111 100644 (file)
@@ -98,7 +98,8 @@ mswings_verb(
 {
     const char *verb;
     int otyp = mwep->otyp,
-        lash = (otyp == BULLWHIP),
+        /* (monsters don't actually wield towels, wet or otherwise) */
+        lash = (objects[otyp].oc_skill == P_WHIP || is_wet_towel(mwep)),
         /* some weapons can have more than one strike type; for those,
            give a mix of thrust and swing (caller doesn't care either way) */
         thrust = ((objects[otyp].oc_dir & PIERCE) != 0
index bf03a6dfca259884df9970d298d8942a395b3a50..6b13551e9c8cd09c1b65eeddf4c86a571bb13d5d 100644 (file)
@@ -1374,7 +1374,7 @@ hmon_hitmon(
             You("%s %s%s",
                 (obj && (is_shield(obj)
                          || obj->otyp == HEAVY_IRON_BALL)) ? "bash"
-                : (obj && (obj->otyp == BULLWHIP
+                : (obj && (objects[obj->otyp].oc_skill == P_WHIP
                            || is_wet_towel(obj))) ? "lash"
                   : Role_if(PM_BARBARIAN) ? "smite"
                     : "hit",