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

Function dopramulet

src/invent.c:4678–4694  ·  view source on GitHub ↗

the #seeamulet command */

Source from the content-addressed store, hash-verified

4676
4677/* the #seeamulet command */
4678int
4679dopramulet(void)
4680{
4681 if (!uamul) {
4682 You("are not wearing an amulet.");
4683 } else {
4684 char lets[2];
4685
4686 /* using display_inventory() instead of prinv() allows player
4687 to use 'm "' to force and menu and be able to choose amulet
4688 in order to perform a context-sensitive item action */
4689 lets[0] = obj_to_let(uamul), lets[1] = '\0';
4690
4691 (void) dispinv_with_action(lets, TRUE, "Amulet");
4692 }
4693 return ECMD_OK;
4694}
4695
4696/* is 'obj' a tool that's in use? can't simply check obj->owornmask */
4697staticfn boolean

Callers

nothing calls this directly

Calls 3

YouFunction · 0.85
obj_to_letFunction · 0.85
dispinv_with_actionFunction · 0.85

Tested by

no test coverage detected