]> granicus.if.org Git - nethack/commitdiff
B03003 - throwing short swords
authorcohrs <cohrs>
Wed, 21 May 2003 22:08:22 +0000 (22:08 +0000)
committercohrs <cohrs>
Wed, 21 May 2003 22:08:22 +0000 (22:08 +0000)
<Someone> pointed out a disagreement between the comment and code in
throwing_weapon(): comment says daggers & knife can be thrown, but
code also allowed short swords.  Assuming the comment was correct, changed
the code to match.

doc/fixes34.2
src/dothrow.c

index 8779aad49cfcc9b3a7b85a707d4b4f0d020356e3..fb1e794320349221bd0acd6a71c7a0be588c0b62 100644 (file)
@@ -73,6 +73,7 @@ clarify disclose option default in opthelp, and support "all" as old help said
 add more calls to update_inventory as the inventory changes
 don't charge for items picked up from monster's interior while swallowed
 choking while eating non-food always called the food "quick snack"
+short swords are not throwing weapons
 
 
 Platform- and/or Interface-Specific Fixes
index 24bdae312192c52a2426eef20b78678793272cb6..f81e307c3a690013fe0147aaf324221f4768cedf 100644 (file)
@@ -821,10 +821,11 @@ throwing_weapon(obj)
 struct obj *obj;
 {
        return (is_missile(obj) || is_spear(obj) ||
-                       /* daggers and knife (excludes scalpel) */
-                       (is_blade(obj) && (objects[obj->otyp].oc_dir & PIERCE)) ||
-                       /* special cases [might want to add AXE] */
-                       obj->otyp == WAR_HAMMER || obj->otyp == AKLYS);
+               /* daggers and knife (excludes scalpel) */
+               (is_blade(obj) && !is_sword(obj) &&
+                (objects[obj->otyp].oc_dir & PIERCE)) ||
+               /* special cases [might want to add AXE] */
+               obj->otyp == WAR_HAMMER || obj->otyp == AKLYS);
 }
 
 /* the currently thrown object is returning to you (not for boomerangs) */