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

Function arti_speak

src/artifact.c:2278–2296  ·  view source on GitHub ↗

KMH -- Talking artifacts are finally implemented */

Source from the content-addressed store, hash-verified

2276
2277/* KMH -- Talking artifacts are finally implemented */
2278int
2279arti_speak(struct obj *obj)
2280{
2281 const struct artifact *oart = get_artifact(obj);
2282 const char *line;
2283 char buf[BUFSZ];
2284
2285 /* Is this a speaking artifact? */
2286 if (oart == &artilist[ART_NONARTIFACT] || !(oart->spfx & SPFX_SPEAK))
2287 return ECMD_OK; /* nothing happened */
2288
2289 line = getrumor(bcsign(obj), buf, TRUE);
2290 if (!*line)
2291 line = "NetHack rumors file closed for renovation.";
2292 pline("%s:", Tobjnam(obj, "whisper"));
2293 SetVoice((struct monst *) 0, 0, 80, voice_talking_artifact);
2294 verbalize1(line);
2295 return ECMD_TIME;
2296}
2297
2298boolean
2299artifact_has_invprop(struct obj *otmp, uchar inv_prop)

Callers 2

ready_weaponFunction · 0.85
doapplyFunction · 0.85

Calls 5

get_artifactFunction · 0.85
getrumorFunction · 0.85
bcsignFunction · 0.85
TobjnamFunction · 0.85
plineFunction · 0.70

Tested by

no test coverage detected