MCPcopy Create free account
hub / github.com/NetHack/NetHack / u_have_forceable_weapon

Function u_have_forceable_weapon

src/lock.c:659–670  ·  view source on GitHub ↗

is hero wielding a weapon that can #force? */

Source from the content-addressed store, hash-verified

657
658/* is hero wielding a weapon that can #force? */
659boolean
660u_have_forceable_weapon(void)
661{
662 if (!uwep /* proper type test */
663 || ((uwep->oclass == WEAPON_CLASS || is_weptool(uwep))
664 ? (objects[uwep->otyp].oc_skill < P_DAGGER
665 || objects[uwep->otyp].oc_skill == P_FLAIL
666 || objects[uwep->otyp].oc_skill > P_LANCE)
667 : uwep->oclass != ROCK_CLASS))
668 return FALSE;
669 return TRUE;
670}
671
672RESTORE_WARNING_FORMAT_NONLITERAL
673

Callers 2

doforceFunction · 0.85
do_loot_contFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected