feedback for attribute loss due to poisoning */
| 291 | |
| 292 | /* feedback for attribute loss due to poisoning */ |
| 293 | void |
| 294 | poisontell(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) */ |
| 316 | void |
no outgoing calls
no test coverage detected