KMH -- Talking artifacts are finally implemented */
| 2276 | |
| 2277 | /* KMH -- Talking artifacts are finally implemented */ |
| 2278 | int |
| 2279 | arti_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 | |
| 2298 | boolean |
| 2299 | artifact_has_invprop(struct obj *otmp, uchar inv_prop) |
no test coverage detected