fix #Q117 - vomiting by rodents & more
From a bug report: you could vomit when polymorphed into a rat but real life rats can't/don't vomit. The latter was confirmed by <Someone> and <Someone>. While testing a fix for this, I discovered a couple of other problems. Healing magic which cured sickness failed to heal Vomiting (potion or spell; unicorn horn deals with them separately). Enlightenment failed to report Vomiting (it's not shown on the status line). Most significant was that vomiting_dialogue() called vomit() twice (also make_confused() and make_stunned() three times for every once intended). It was dividing the remaining turns by 3 and then using that value to decide what to do, but only message display took into account that the same divided value would occur on 3 consecutive turns (or just 2 for the final countdown to 0, because dialog routine gets called before timed-property decrement).
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* SCCS Id: @(#)potion.c 3.5 2006/11/29 */
|
||||
/* SCCS Id: @(#)potion.c 3.5 2007/02/05 */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -988,8 +988,11 @@ healup(nhp, nxtra, curesick, cureblind)
|
||||
if(u.uhp > u.uhpmax) u.uhp = (u.uhpmax += nxtra);
|
||||
}
|
||||
}
|
||||
if(cureblind) make_blinded(0L,TRUE);
|
||||
if(curesick) make_sick(0L, (char *) 0, TRUE, SICK_ALL);
|
||||
if (cureblind) make_blinded(0L, TRUE);
|
||||
if (curesick) {
|
||||
make_vomiting(0L, TRUE);
|
||||
make_sick(0L, (char *)0, TRUE, SICK_ALL);
|
||||
}
|
||||
context.botl = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user