conflicting countdowns
I tried 'pick all' in the #wizintrinsics' menu and after 30 turns, died with "poisoned by a poisoned, while vomiting". Food poisioning and/or terminal illness beat the other fatal conditions to the coup de gras. However, the final stage of vomiting sets Sick to 0 cure food poisoning and ends up clobbering the killer reason if Sick is due to terminal illness. It's feasible for that to happen without using #wizintrinsic, so this fixes that, and also a few other combinations that seemed contradictory: 1) limbs turn to stone during Stoned countdown now cures wounded legs; 2) turn to stone (a couple of turns later) cures vomiting and sliming; 3) turning to slime during Slimed countdown cures stoning.
This commit is contained in:
@@ -3181,7 +3181,8 @@ vomit() /* A good idea from David Neves */
|
|||||||
dealing with some esoteric body_part() */
|
dealing with some esoteric body_part() */
|
||||||
Your("jaw gapes convulsively.");
|
Your("jaw gapes convulsively.");
|
||||||
} else {
|
} else {
|
||||||
make_sick(0L, (char *) 0, TRUE, SICK_VOMITABLE);
|
if (Sick && (u.usick_type & SICK_VOMITABLE) != 0)
|
||||||
|
make_sick(0L, (char *) 0, TRUE, SICK_VOMITABLE);
|
||||||
/* if not enough in stomach to actually vomit then dry heave;
|
/* if not enough in stomach to actually vomit then dry heave;
|
||||||
vomiting_dialog() gives a vomit message when its countdown
|
vomiting_dialog() gives a vomit message when its countdown
|
||||||
reaches 0, but only if u.uhs < FAINTING (and !cantvomit()) */
|
reaches 0, but only if u.uhs < FAINTING (and !cantvomit()) */
|
||||||
|
|||||||
+9
-2
@@ -113,6 +113,7 @@ const char *cause; /* sickness cause */
|
|||||||
boolean talk;
|
boolean talk;
|
||||||
int type;
|
int type;
|
||||||
{
|
{
|
||||||
|
struct kinfo *kptr;
|
||||||
long old = Sick;
|
long old = Sick;
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
@@ -148,11 +149,17 @@ int type;
|
|||||||
context.botl = TRUE;
|
context.botl = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
kptr = find_delayed_killer(SICK);
|
||||||
if (Sick) {
|
if (Sick) {
|
||||||
exercise(A_CON, FALSE);
|
exercise(A_CON, FALSE);
|
||||||
delayed_killer(SICK, KILLED_BY_AN, cause);
|
if (!old || !kptr) {
|
||||||
|
int kpfx = ((cause && !strcmp(cause, "#wizintrinsic"))
|
||||||
|
? KILLED_BY : KILLED_BY_AN);
|
||||||
|
|
||||||
|
delayed_killer(SICK, kpfx, cause);
|
||||||
|
}
|
||||||
} else
|
} else
|
||||||
dealloc_killer(find_delayed_killer(SICK));
|
dealloc_killer(kptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
+23
-4
@@ -136,10 +136,19 @@ stoned_dialogue()
|
|||||||
nomul(-3); /* can't move anymore */
|
nomul(-3); /* can't move anymore */
|
||||||
multi_reason = "getting stoned";
|
multi_reason = "getting stoned";
|
||||||
nomovemsg = You_can_move_again; /* not unconscious */
|
nomovemsg = You_can_move_again; /* not unconscious */
|
||||||
|
/* "your limbs have turned to stone" so terminate wounded legs */
|
||||||
|
if ((HWounded_legs & TIMEOUT) != 0L && !u.usteed)
|
||||||
|
set_itimeout(&HWounded_legs, 0L);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2: /* turned to stone */
|
||||||
if ((HDeaf & TIMEOUT) > 0L && (HDeaf & TIMEOUT) < 5L)
|
if ((HDeaf & TIMEOUT) > 0L && (HDeaf & TIMEOUT) < 5L)
|
||||||
set_itimeout(&HDeaf, 5L); /* avoid Hear_again at tail end */
|
set_itimeout(&HDeaf, 5L); /* avoid Hear_again at tail end */
|
||||||
|
/* if also vomiting or turning into slime, stop those */
|
||||||
|
if ((Vomiting & TIMEOUT) != 0L)
|
||||||
|
set_itimeout(&Vomiting, 0L), context.botl = 1;
|
||||||
|
if ((Slimed & TIMEOUT) != 0L)
|
||||||
|
set_itimeout(&Slimed, 0L), context.botl = 1;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -318,15 +327,25 @@ slime_dialogue()
|
|||||||
} else
|
} else
|
||||||
pline1(buf);
|
pline1(buf);
|
||||||
}
|
}
|
||||||
if (i == 3L) { /* limbs becoming oozy */
|
|
||||||
|
switch (i) {
|
||||||
|
case 3L: /* limbs becoming oozy */
|
||||||
HFast = 0L; /* lose intrinsic speed */
|
HFast = 0L; /* lose intrinsic speed */
|
||||||
if (!Popeye(SLIMED))
|
if (!Popeye(SLIMED))
|
||||||
stop_occupation();
|
stop_occupation();
|
||||||
if (multi > 0)
|
if (multi > 0)
|
||||||
nomul(0);
|
nomul(0);
|
||||||
|
break;
|
||||||
|
case 2L: /* skin begins to peel */
|
||||||
|
if ((HDeaf & TIMEOUT) > 0L && (HDeaf & TIMEOUT) < 5L)
|
||||||
|
set_itimeout(&HDeaf, 5L); /* avoid Hear_again at tail end */
|
||||||
|
break;
|
||||||
|
case 1L: /* turning into slime */
|
||||||
|
/* if also turning to stone, stop doing that (no message) */
|
||||||
|
if ((Stoned & TIMEOUT) != 0L)
|
||||||
|
set_itimeout(&Stoned, 0L), context.botl = 1;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
if (i == 2L && (HDeaf & TIMEOUT) > 0L && (HDeaf & TIMEOUT) < 5L)
|
|
||||||
set_itimeout(&HDeaf, 5L); /* avoid Hear_again at tail end */
|
|
||||||
exercise(A_DEX, FALSE);
|
exercise(A_DEX, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user