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

Function sickness_dialogue

src/timeout.c:322–345  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

320};
321
322staticfn void
323sickness_dialogue(void)
324{
325 long j = (Sick & TIMEOUT), i = j / 2L;
326
327 if (i > 0L && i <= SIZE(sickness_texts) && (j % 2) != 0) {
328 char buf[BUFSZ], pronounbuf[40];
329
330 Strcpy(buf, sickness_texts[SIZE(sickness_texts) - i]);
331 /* change the message slightly for food poisoning */
332 if ((u.usick_type & SICK_NONVOMITABLE) == 0)
333 (void) strsubst(buf, "illness", "sickness");
334 if (Hallucination && strstri(buf, "Death's door")) {
335 /* youmonst: for Hallucination, mhe()'s mon argument isn't used */
336 Strcpy(pronounbuf, mhe(&gy.youmonst));
337 Sprintf(eos(buf), " %s %s inviting you in.",
338 /* upstart() modifies its argument but vtense() doesn't
339 care whether or not that has already happened */
340 upstart(pronounbuf), vtense(pronounbuf, "are"));
341 }
342 urgent_pline("%s", buf);
343 }
344 exercise(A_CON, FALSE);
345}
346
347static NEARDATA const char *const levi_texts[] = {
348 "You float slightly lower.",

Callers 1

nh_timeoutFunction · 0.85

Calls 7

strsubstFunction · 0.85
strstriFunction · 0.85
eosFunction · 0.85
upstartFunction · 0.85
vtenseFunction · 0.85
urgent_plineFunction · 0.85
exerciseFunction · 0.85

Tested by

no test coverage detected