return true for weapon meant to be thrown; excludes ammo */
| 1427 | |
| 1428 | /* return true for weapon meant to be thrown; excludes ammo */ |
| 1429 | boolean |
| 1430 | throwing_weapon(struct obj *obj) |
| 1431 | { |
| 1432 | return (boolean) (is_missile(obj) || is_spear(obj) |
| 1433 | /* daggers and knife (excludes scalpel) */ |
| 1434 | || (is_blade(obj) && !is_sword(obj) |
| 1435 | && (objects[obj->otyp].oc_dir & PIERCE)) |
| 1436 | /* special cases [might want to add AXE] */ |
| 1437 | || obj->otyp == WAR_HAMMER || obj->otyp == AKLYS); |
| 1438 | } |
| 1439 | |
| 1440 | /* the currently thrown object is returning to you (not for boomerangs) */ |
| 1441 | staticfn void |
no outgoing calls
no test coverage detected