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

Function doputon

src/do_wear.c:2453–2469  ·  view source on GitHub ↗

the #puton command */

Source from the content-addressed store, hash-verified

2451
2452/* the #puton command */
2453int
2454doputon(void)
2455{
2456 struct obj *otmp;
2457
2458 if (uleft && uright && uamul && ublindf
2459 && uarm && uarmu && uarmc && uarmh && uarms && uarmg && uarmf) {
2460 /* 'P' message doesn't mention armor */
2461 Your("%s%s are full, and you're already wearing an amulet and %s.",
2462 humanoid(gy.youmonst.data) ? "ring-" : "",
2463 fingers_or_gloves(FALSE),
2464 (ublindf->otyp == LENSES) ? "some lenses" : "a blindfold");
2465 return ECMD_OK;
2466 }
2467 otmp = getobj("put on", puton_ok, GETOBJ_NOFLAGS);
2468 return otmp ? accessory_or_armor_on(otmp) : ECMD_CANCEL;
2469}
2470
2471/* calculate current armor class */
2472void

Callers

nothing calls this directly

Calls 4

YourFunction · 0.85
fingers_or_glovesFunction · 0.85
getobjFunction · 0.85
accessory_or_armor_onFunction · 0.85

Tested by

no test coverage detected