MCPcopy Index your code
hub / github.com/NetHack/NetHack / throwing_weapon

Function throwing_weapon

src/dothrow.c:1429–1438  ·  view source on GitHub ↗

return true for weapon meant to be thrown; excludes ammo */

Source from the content-addressed store, hash-verified

1427
1428/* return true for weapon meant to be thrown; excludes ammo */
1429boolean
1430throwing_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) */
1441staticfn void

Callers 4

autoquiverFunction · 0.85
throwitFunction · 0.85
thitmonstFunction · 0.85
addinv_core0Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected