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

Function Shield_off

src/do_wear.c:732–756  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

730}
731
732int
733Shield_off(void)
734{
735 svc.context.takeoff.mask &= ~W_ARMS;
736
737 /* no shield currently requires special handling when taken off, but we
738 keep this uncommented in case somebody adds a new one which does */
739 switch (uarms->otyp) {
740 case SMALL_SHIELD:
741 case SHIELD_OF_DRAIN_RESISTANCE:
742 case SHIELD_OF_SHOCK_RESISTANCE:
743 case ELVEN_SHIELD:
744 case URUK_HAI_SHIELD:
745 case ORCISH_SHIELD:
746 case DWARVISH_ROUNDSHIELD:
747 case LARGE_SHIELD:
748 case SHIELD_OF_REFLECTION:
749 break;
750 default:
751 impossible(unknown_type, c_shield, uarms->otyp);
752 }
753
754 setworn((struct obj *) 0, W_ARMS);
755 return 0;
756}
757
758staticfn int
759Shirt_on(void)

Callers 5

remove_worn_itemFunction · 0.85
armoroffFunction · 0.85
do_takeoffFunction · 0.85
wornarm_destroyedFunction · 0.85
break_armorFunction · 0.85

Calls 2

setwornFunction · 0.85
impossibleFunction · 0.70

Tested by

no test coverage detected