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

Function Armor_on

src/do_wear.c:886–906  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

884}
885
886staticfn int
887Armor_on(void)
888{
889 if (!uarm) /* no known instances of !uarm here but play it safe */
890 return 0;
891 if (!uarm->known) {
892 uarm->known = 1; /* suit's +/- evident because of status line AC */
893 update_inventory();
894 }
895 dragon_armor_handling(uarm, TRUE, TRUE);
896 /* gold DSM requires extra handling since it emits light when worn;
897 do that after the special armor handling */
898 if (artifact_light(uarm) && !uarm->lamplit) {
899 begin_burn(uarm, FALSE);
900 if (!Blind)
901 pline("%s %s to shine %s!",
902 Yname2(uarm), otense(uarm, "begin"),
903 arti_light_description(uarm));
904 }
905 return 0;
906}
907
908int
909Armor_off(void)

Callers 1

set_wearFunction · 0.85

Calls 8

update_inventoryFunction · 0.85
dragon_armor_handlingFunction · 0.85
artifact_lightFunction · 0.85
begin_burnFunction · 0.85
Yname2Function · 0.85
otenseFunction · 0.85
arti_light_descriptionFunction · 0.85
plineFunction · 0.70

Tested by

no test coverage detected