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

Function blank_novel

src/zap.c:1366–1376  ·  view source on GitHub ↗

soaking or cancelling a novel converts it into a blank spellbook but needs more than just changing its otyp (caller is responsible for that) */

Source from the content-addressed store, hash-verified

1364/* soaking or cancelling a novel converts it into a blank spellbook but
1365 needs more than just changing its otyp (caller is responsible for that) */
1366void
1367blank_novel(struct obj *obj)
1368{
1369 assert(obj->otyp == SPE_BLANK_PAPER);
1370 /* novelidx overloads corpsenm, not used for spellbooks */
1371 obj->novelidx = 0;
1372 free_oname(obj); /* get rid of [former] novel's title */
1373 /* a blank spellbook weighs more than a novel; update obj's weight and
1374 recursively the weight of any container holding it */
1375 container_weight(obj);
1376}
1377
1378/* Remove a positive enchantment or charge from obj,
1379 * possibly carried by you or a monster

Callers 2

water_damageFunction · 0.85
cancel_itemFunction · 0.85

Calls 2

container_weightFunction · 0.85
free_onameFunction · 0.70

Tested by

no test coverage detected