| 194 | }; |
| 195 | |
| 196 | staticfn void |
| 197 | vomiting_dialogue(void) |
| 198 | { |
| 199 | const char *txt = 0; |
| 200 | char buf[BUFSZ]; |
| 201 | long v = (Vomiting & TIMEOUT); |
| 202 | |
| 203 | /* note: nhtimeout() hasn't decremented timed properties for the |
| 204 | current turn yet, so we use Vomiting-1 here */ |
| 205 | switch ((int) (v - 1L)) { |
| 206 | case 14: |
| 207 | txt = vomiting_texts[0]; |
| 208 | break; |
| 209 | case 11: |
| 210 | txt = vomiting_texts[1]; |
| 211 | if (strstri(txt, " confused") && Confusion) |
| 212 | txt = strsubst(strcpy(buf, txt), " confused", " more confused"); |
| 213 | break; |
| 214 | case 6: |
| 215 | make_stunned((HStun & TIMEOUT) + (long) d(2, 4), FALSE); |
| 216 | if (!Popeye(VOMITING)) |
| 217 | stop_occupation(); |
| 218 | FALLTHROUGH; |
| 219 | /*FALLTHRU*/ |
| 220 | case 9: |
| 221 | make_confused((HConfusion & TIMEOUT) + (long) d(2, 4), FALSE); |
| 222 | if (gm.multi > 0) |
| 223 | nomul(0); |
| 224 | break; |
| 225 | case 8: |
| 226 | txt = vomiting_texts[2]; |
| 227 | if (strstri(txt, " think") && Stunned) |
| 228 | txt = strsubst(strcpy(buf, txt), "can't seem to ", "can't "); |
| 229 | break; |
| 230 | case 5: |
| 231 | txt = vomiting_texts[3]; |
| 232 | break; |
| 233 | case 2: |
| 234 | txt = vomiting_texts[4]; |
| 235 | if (cantvomit(gy.youmonst.data)) |
| 236 | txt = "gag uncontrollably."; |
| 237 | else if (Hallucination) |
| 238 | /* "hurl" is short for "hurl chunks" which is slang for |
| 239 | relatively violent vomiting... */ |
| 240 | txt = "are about to hurl!"; |
| 241 | break; |
| 242 | case 0: |
| 243 | stop_occupation(); |
| 244 | if (!cantvomit(gy.youmonst.data)) { |
| 245 | morehungry(20); |
| 246 | /* case 2 used to be "You suddenly vomit!" but it wasn't sudden |
| 247 | since you've just been through the earlier messages of the |
| 248 | countdown, and it was still possible to move around between |
| 249 | that message and "You can move again." (from vomit()'s |
| 250 | nomul(-2)) with no intervening message; give one here to |
| 251 | have more specific point at which hero became unable to move |
| 252 | [vomit() issues its own message for the cantvomit() case |
| 253 | and for the FAINTING-or-worse case where stomach is empty] */ |
no test coverage detected