Stoning management (trunk only)
Make petrification initiation or termination go through a new routine,
make_stoned(), instead of manipulating its countdown timer and delayed
killer directly. No change in behavior.
There's no reason in terms of bug risk or game play or saved data why
this shouldn't be done in the branch too, but so much of the surrounding
context has already diverged between trunk and branch that it's trunk only.
This commit is contained in:
21
src/potion.c
21
src/potion.c
@@ -1,4 +1,4 @@
|
||||
/* SCCS Id: @(#)potion.c 3.5 2005/06/02 */
|
||||
/* SCCS Id: @(#)potion.c 3.5 2005/06/21 */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -153,6 +153,25 @@ const char *msg;
|
||||
if (!Slimed) dealloc_killer(find_delayed_killer(SLIMED));
|
||||
}
|
||||
|
||||
/* start or stop petrification */
|
||||
void
|
||||
make_stoned(xtime, msg, killedby, killername)
|
||||
long xtime;
|
||||
const char *msg;
|
||||
int killedby;
|
||||
const char *killername;
|
||||
{
|
||||
long old = Stoned;
|
||||
|
||||
if ((!xtime && old) || (xtime && !old)) {
|
||||
if (msg) pline("%s", msg);
|
||||
/* context.botl = 1; --- Stoned is not a status line item */
|
||||
}
|
||||
set_itimeout(&Stoned, xtime);
|
||||
if (!Stoned) dealloc_killer(find_delayed_killer(STONED));
|
||||
else if (!old) delayed_killer(STONED, killedby, killername);
|
||||
}
|
||||
|
||||
void
|
||||
make_vomiting(xtime, talk)
|
||||
long xtime;
|
||||
|
||||
Reference in New Issue
Block a user