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

Function poisontell

src/attrib.c:293–313  ·  view source on GitHub ↗

feedback for attribute loss due to poisoning */

Source from the content-addressed store, hash-verified

291
292/* feedback for attribute loss due to poisoning */
293void
294poisontell(int typ, /* which attribute */
295 boolean exclaim) /* emphasis */
296{
297 void (*func)(const char *, ...) = poiseff[typ].delivery_func;
298 const char *msg_txt = poiseff[typ].effect_msg;
299
300 /*
301 * "You feel weaker" or "you feel very sick" aren't appropriate when
302 * wearing or wielding something (gauntlets of power, Ogresmasher)
303 * which forces the attribute to maintain its maximum value.
304 * Phrasing for other attributes which might have fixed values
305 * (dunce cap) is such that we don't need message fixups for them.
306 */
307 if (typ == A_STR && ACURR(A_STR) == STR19(25))
308 msg_txt = "innately weaker";
309 else if (typ == A_CON && ACURR(A_CON) == 25)
310 msg_txt = "sick inside";
311
312 (*func)("%s%c", msg_txt, exclaim ? '!' : '.');
313}
314
315/* called when an attack or trap has poisoned hero (used to be in mon.c) */
316void

Callers 2

peffect_sicknessFunction · 0.85
poisonedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected