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

Function found_artifact

src/artifact.c:408–417  ·  view source on GitHub ↗

mark an artifact as 'found' */

Source from the content-addressed store, hash-verified

406
407/* mark an artifact as 'found' */
408void
409found_artifact(int a)
410{
411 if (a < 1 || a > NROFARTIFACTS)
412 impossible("found_artifact: invalid artifact index! (%d)", a);
413 else if (!artiexist[a].exists)
414 impossible("found_artifact: artifact doesn't exist yet? (%d)", a);
415 else
416 artiexist[a].found = 1;
417}
418
419/* if an artifact hasn't already been designated 'found', do that now
420 and generate a livelog event about finding it */

Callers 1

find_artifactFunction · 0.85

Calls 1

impossibleFunction · 0.70

Tested by

no test coverage detected