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

Function release_camera_demon

src/dothrow.c:2456–2470  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2454}
2455
2456void
2457release_camera_demon(struct obj *obj, coordxy x, coordxy y)
2458{
2459 struct monst *mtmp;
2460 if (!rn2(3)
2461 && (mtmp = makemon(&mons[rn2(3) ? PM_HOMUNCULUS : PM_IMP], x, y,
2462 MM_NOMSG)) != 0) {
2463 if (canspotmon(mtmp))
2464 pline("%s is released!", Hallucination
2465 ? An(rndmonnam(NULL))
2466 : "The picture-painting demon");
2467 mtmp->mpeaceful = !obj->cursed;
2468 set_malign(mtmp);
2469 }
2470}
2471
2472/*
2473 * Break an object. Breakable armor goes through erosion steps; other

Callers 2

hmon_hitmon_misc_objFunction · 0.85
breakobjFunction · 0.85

Calls 6

rn2Function · 0.85
makemonFunction · 0.85
AnFunction · 0.85
rndmonnamFunction · 0.85
set_malignFunction · 0.85
plineFunction · 0.70

Tested by

no test coverage detected