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

Function book_cursed

src/spell.c:342–351  ·  view source on GitHub ↗

'book' has just become cursed; if we're reading it, interrupt */

Source from the content-addressed store, hash-verified

340
341/* 'book' has just become cursed; if we're reading it, interrupt */
342void
343book_cursed(struct obj *book)
344{
345 if (book->cursed && gm.multi >= 0
346 && go.occupation == learn && svc.context.spbook.book == book) {
347 pline("%s shut!", Tobjnam(book, "slam"));
348 set_bknown(book, 1);
349 stop_occupation();
350 }
351}
352
353DISABLE_WARNING_FORMAT_NONLITERAL
354

Callers 1

curseFunction · 0.85

Calls 4

TobjnamFunction · 0.85
set_bknownFunction · 0.85
stop_occupationFunction · 0.85
plineFunction · 0.70

Tested by

no test coverage detected