B03003 - throwing short swords

<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.
This commit is contained in:
cohrs
2003-05-21 22:08:22 +00:00
parent 3862424fa7
commit ac3746d055
2 changed files with 6 additions and 4 deletions
+1
View 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 add more calls to update_inventory as the inventory changes
don't charge for items picked up from monster's interior while swallowed don't charge for items picked up from monster's interior while swallowed
choking while eating non-food always called the food "quick snack" choking while eating non-food always called the food "quick snack"
short swords are not throwing weapons
Platform- and/or Interface-Specific Fixes Platform- and/or Interface-Specific Fixes
+5 -4
View File
@@ -821,10 +821,11 @@ throwing_weapon(obj)
struct obj *obj; struct obj *obj;
{ {
return (is_missile(obj) || is_spear(obj) || return (is_missile(obj) || is_spear(obj) ||
/* daggers and knife (excludes scalpel) */ /* daggers and knife (excludes scalpel) */
(is_blade(obj) && (objects[obj->otyp].oc_dir & PIERCE)) || (is_blade(obj) && !is_sword(obj) &&
/* special cases [might want to add AXE] */ (objects[obj->otyp].oc_dir & PIERCE)) ||
obj->otyp == WAR_HAMMER || obj->otyp == AKLYS); /* 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) */ /* the currently thrown object is returning to you (not for boomerangs) */