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

Function m_lose_armor

src/worn.c:1039–1051  ·  view source on GitHub ↗

remove an item of armor and then drop it */

Source from the content-addressed store, hash-verified

1037
1038/* remove an item of armor and then drop it */
1039staticfn void
1040m_lose_armor(
1041 struct monst *mon,
1042 struct obj *obj,
1043 boolean polyspot)
1044{
1045 extract_from_minvent(mon, obj, TRUE, FALSE);
1046 place_object(obj, mon->mx, mon->my);
1047 if (polyspot)
1048 bypass_obj(obj);
1049 /* call stackobj() if we ever drop anything that can merge */
1050 newsym(mon->mx, mon->my);
1051}
1052
1053/* clear bypass bits for an object chain, plus contents if applicable */
1054staticfn void

Callers 1

mon_break_armorFunction · 0.85

Calls 4

extract_from_minventFunction · 0.85
place_objectFunction · 0.85
bypass_objFunction · 0.85
newsymFunction · 0.85

Tested by

no test coverage detected