OSX vs apple core dump
Some reformatting mutated into a code change: OSX gets code from two conditional blocks '#if UNIX: eat apple or pear, give "core dump" message' '#if MAC || OSX: eat apple, give "It's a Macintosh" message' but the second wouldn't be chosen due to the if-then-else logic having already handled obj->otyp==APPLE before it was reached. Reorder them so that OSX gets the Macintosh message for apples and the core dump message for pears.
This commit is contained in:
346
src/eat.c
346
src/eat.c
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 eat.c $NHDT-Date: 1445388914 2015/10/21 00:55:14 $ $NHDT-Branch: master $:$NHDT-Revision: 1.149 $ */
|
/* NetHack 3.6 eat.c $NHDT-Date: 1446189655 2015/10/30 07:20:55 $ $NHDT-Branch: master $:$NHDT-Revision: 1.150 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -91,14 +91,15 @@ register struct obj *obj;
|
|||||||
if (metallivorous(youmonst.data) && is_metallic(obj)
|
if (metallivorous(youmonst.data) && is_metallic(obj)
|
||||||
&& (youmonst.data != &mons[PM_RUST_MONSTER] || is_rustprone(obj)))
|
&& (youmonst.data != &mons[PM_RUST_MONSTER] || is_rustprone(obj)))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
if (u.umonnum == PM_GELATINOUS_CUBE && is_organic(obj)
|
if (u.umonnum == PM_GELATINOUS_CUBE && is_organic(obj)
|
||||||
/* [g.cubes can eat containers and retain all contents
|
/* [g.cubes can eat containers and retain all contents
|
||||||
as engulfed items, but poly'd player can't do that] */
|
as engulfed items, but poly'd player can't do that] */
|
||||||
&& !Has_contents(obj))
|
&& !Has_contents(obj))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
/* return((boolean)(!!index(comestibles, obj->oclass))); */
|
/* return (boolean) !!index(comestibles, obj->oclass); */
|
||||||
return (boolean)(obj->oclass == FOOD_CLASS);
|
return (boolean) (obj->oclass == FOOD_CLASS);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -134,8 +135,9 @@ static const struct {
|
|||||||
|
|
||||||
static char *eatmbuf = 0; /* set by cpostfx() */
|
static char *eatmbuf = 0; /* set by cpostfx() */
|
||||||
|
|
||||||
STATIC_PTR
|
/* called after mimicing is over */
|
||||||
int eatmdone(VOID_ARGS) /* called after mimicing is over */
|
STATIC_PTR int
|
||||||
|
eatmdone(VOID_ARGS)
|
||||||
{
|
{
|
||||||
/* release `eatmbuf' */
|
/* release `eatmbuf' */
|
||||||
if (eatmbuf) {
|
if (eatmbuf) {
|
||||||
@@ -213,10 +215,13 @@ boolean the_pfx;
|
|||||||
/* Created by GAN 01/28/87
|
/* Created by GAN 01/28/87
|
||||||
* Amended by AKP 09/22/87: if not hard, don't choke, just vomit.
|
* Amended by AKP 09/22/87: if not hard, don't choke, just vomit.
|
||||||
* Amended by 3. 06/12/89: if not hard, sometimes choke anyway, to keep risk.
|
* Amended by 3. 06/12/89: if not hard, sometimes choke anyway, to keep risk.
|
||||||
* 11/10/89: if hard, rarely vomit anyway, for slim chance.
|
* 11/10/89: if hard, rarely vomit anyway, for slim chance.
|
||||||
|
*
|
||||||
|
* To a full belly all food is bad. (It.)
|
||||||
*/
|
*/
|
||||||
STATIC_OVL void choke(food) /* To a full belly all food is bad. (It.) */
|
STATIC_OVL void
|
||||||
register struct obj *food;
|
choke(food)
|
||||||
|
struct obj *food;
|
||||||
{
|
{
|
||||||
/* only happens if you were satiated */
|
/* only happens if you were satiated */
|
||||||
if (u.uhs != SATIATED) {
|
if (u.uhs != SATIATED) {
|
||||||
@@ -274,7 +279,9 @@ recalc_wt()
|
|||||||
debugpline1("New weight = %d", piece->owt);
|
debugpline1("New weight = %d", piece->owt);
|
||||||
}
|
}
|
||||||
|
|
||||||
void reset_eat() /* called when eating interrupted by an event */
|
/* called when eating interrupted by an event */
|
||||||
|
void
|
||||||
|
reset_eat()
|
||||||
{
|
{
|
||||||
/* we only set a flag here - the actual reset process is done after
|
/* we only set a flag here - the actual reset process is done after
|
||||||
* the round is spent eating.
|
* the round is spent eating.
|
||||||
@@ -288,7 +295,7 @@ void reset_eat() /* called when eating interrupted by an event */
|
|||||||
|
|
||||||
STATIC_OVL struct obj *
|
STATIC_OVL struct obj *
|
||||||
touchfood(otmp)
|
touchfood(otmp)
|
||||||
register struct obj *otmp;
|
struct obj *otmp;
|
||||||
{
|
{
|
||||||
if (otmp->quan > 1L) {
|
if (otmp->quan > 1L) {
|
||||||
if (!carried(otmp))
|
if (!carried(otmp))
|
||||||
@@ -317,7 +324,7 @@ register struct obj *otmp;
|
|||||||
otmp->nomerge = 0;
|
otmp->nomerge = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return (otmp);
|
return otmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* When food decays, in the middle of your meal, we don't want to dereference
|
/* When food decays, in the middle of your meal, we don't want to dereference
|
||||||
@@ -327,7 +334,7 @@ register struct obj *otmp;
|
|||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
food_disappears(obj)
|
food_disappears(obj)
|
||||||
register struct obj *obj;
|
struct obj *obj;
|
||||||
{
|
{
|
||||||
if (obj == context.victual.piece) {
|
if (obj == context.victual.piece) {
|
||||||
context.victual.piece = (struct obj *) 0;
|
context.victual.piece = (struct obj *) 0;
|
||||||
@@ -337,7 +344,7 @@ register struct obj *obj;
|
|||||||
obj_stop_timers(obj);
|
obj_stop_timers(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* renaming an object usually results in it having a different address;
|
/* renaming an object used to result in it having a different address,
|
||||||
so the sequence start eating/opening, get interrupted, name the food,
|
so the sequence start eating/opening, get interrupted, name the food,
|
||||||
resume eating/opening would restart from scratch */
|
resume eating/opening would restart from scratch */
|
||||||
void
|
void
|
||||||
@@ -376,26 +383,27 @@ do_reset_eat()
|
|||||||
newuhs(FALSE);
|
newuhs(FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
STATIC_PTR
|
/* called each move during eating process */
|
||||||
int eatfood(VOID_ARGS) /* called each move during eating process */
|
STATIC_PTR int
|
||||||
|
eatfood(VOID_ARGS)
|
||||||
{
|
{
|
||||||
if (!context.victual.piece
|
if (!context.victual.piece
|
||||||
|| (!carried(context.victual.piece)
|
|| (!carried(context.victual.piece)
|
||||||
&& !obj_here(context.victual.piece, u.ux, u.uy))) {
|
&& !obj_here(context.victual.piece, u.ux, u.uy))) {
|
||||||
/* maybe it was stolen? */
|
/* maybe it was stolen? */
|
||||||
do_reset_eat();
|
do_reset_eat();
|
||||||
return (0);
|
return 0;
|
||||||
}
|
}
|
||||||
if (!context.victual.eating)
|
if (!context.victual.eating)
|
||||||
return (0);
|
return 0;
|
||||||
|
|
||||||
if (++context.victual.usedtime <= context.victual.reqtime) {
|
if (++context.victual.usedtime <= context.victual.reqtime) {
|
||||||
if (bite())
|
if (bite())
|
||||||
return (0);
|
return 0;
|
||||||
return (1); /* still busy */
|
return 1; /* still busy */
|
||||||
} else { /* done */
|
} else { /* done */
|
||||||
done_eating(TRUE);
|
done_eating(TRUE);
|
||||||
return (0);
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -884,7 +892,9 @@ register struct permonst *ptr;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
STATIC_OVL void cpostfx(pm) /* called after completely consuming a corpse */
|
/* called after completely consuming a corpse */
|
||||||
|
STATIC_OVL void
|
||||||
|
cpostfx(pm)
|
||||||
register int pm;
|
register int pm;
|
||||||
{
|
{
|
||||||
register int tmp = 0;
|
register int tmp = 0;
|
||||||
@@ -1105,8 +1115,7 @@ violated_vegetarian()
|
|||||||
|
|
||||||
/* common code to check and possibly charge for 1 context.tin.tin,
|
/* common code to check and possibly charge for 1 context.tin.tin,
|
||||||
* will split() context.tin.tin if necessary */
|
* will split() context.tin.tin if necessary */
|
||||||
STATIC_PTR
|
STATIC_PTR void
|
||||||
void
|
|
||||||
costly_tin(alter_type)
|
costly_tin(alter_type)
|
||||||
int alter_type; /* COST_xxx */
|
int alter_type; /* COST_xxx */
|
||||||
{
|
{
|
||||||
@@ -1190,8 +1199,8 @@ int forcetype;
|
|||||||
|
|
||||||
if (forcetype == SPINACH_TIN
|
if (forcetype == SPINACH_TIN
|
||||||
|| (forcetype == HEALTHY_TIN
|
|| (forcetype == HEALTHY_TIN
|
||||||
&& (obj->corpsenm == NON_PM || /* empty or already spinach */
|
&& (obj->corpsenm == NON_PM /* empty or already spinach */
|
||||||
!vegetarian(&mons[obj->corpsenm])))) { /* replace meat */
|
|| !vegetarian(&mons[obj->corpsenm])))) { /* replace meat */
|
||||||
obj->corpsenm = NON_PM; /* not based on any monster */
|
obj->corpsenm = NON_PM; /* not based on any monster */
|
||||||
obj->spe = 1; /* spinach */
|
obj->spe = 1; /* spinach */
|
||||||
return;
|
return;
|
||||||
@@ -1236,8 +1245,7 @@ boolean disp; /* we're just displaying so leave things alone */
|
|||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
STATIC_OVL
|
STATIC_OVL void
|
||||||
void
|
|
||||||
consume_tin(mesg)
|
consume_tin(mesg)
|
||||||
const char *mesg;
|
const char *mesg;
|
||||||
{
|
{
|
||||||
@@ -1350,9 +1358,11 @@ const char *mesg;
|
|||||||
|
|
||||||
costly_tin(COST_OPEN);
|
costly_tin(COST_OPEN);
|
||||||
|
|
||||||
lesshungry(tin->blessed ? 600 : /* blessed */
|
lesshungry(tin->blessed
|
||||||
!tin->cursed ? (400 + rnd(200)) : /* uncursed */
|
? 600 /* blessed */
|
||||||
(200 + rnd(400))); /* cursed */
|
: !tin->cursed
|
||||||
|
? (400 + rnd(200)) /* uncursed */
|
||||||
|
: (200 + rnd(400))); /* cursed */
|
||||||
}
|
}
|
||||||
|
|
||||||
use_up_tin:
|
use_up_tin:
|
||||||
@@ -1364,26 +1374,29 @@ use_up_tin:
|
|||||||
context.tin.o_id = 0;
|
context.tin.o_id = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
STATIC_PTR
|
/* called during each move whilst opening a tin */
|
||||||
int opentin(VOID_ARGS) /* called during each move whilst opening a tin */
|
STATIC_PTR int
|
||||||
|
opentin(VOID_ARGS)
|
||||||
{
|
{
|
||||||
/* perhaps it was stolen (although that should cause interruption) */
|
/* perhaps it was stolen (although that should cause interruption) */
|
||||||
if (!carried(context.tin.tin)
|
if (!carried(context.tin.tin)
|
||||||
&& (!obj_here(context.tin.tin, u.ux, u.uy) || !can_reach_floor(TRUE)))
|
&& (!obj_here(context.tin.tin, u.ux, u.uy) || !can_reach_floor(TRUE)))
|
||||||
return (0); /* %% probably we should use tinoid */
|
return 0; /* %% probably we should use tinoid */
|
||||||
if (context.tin.usedtime++ >= 50) {
|
if (context.tin.usedtime++ >= 50) {
|
||||||
You("give up your attempt to open the tin.");
|
You("give up your attempt to open the tin.");
|
||||||
return (0);
|
return 0;
|
||||||
}
|
}
|
||||||
if (context.tin.usedtime < context.tin.reqtime)
|
if (context.tin.usedtime < context.tin.reqtime)
|
||||||
return (1); /* still busy */
|
return 1; /* still busy */
|
||||||
|
|
||||||
consume_tin("You succeed in opening the tin.");
|
consume_tin("You succeed in opening the tin.");
|
||||||
return (0);
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
STATIC_OVL void start_tin(otmp) /* called when starting to open a tin */
|
/* called when starting to open a tin */
|
||||||
register struct obj *otmp;
|
STATIC_OVL void
|
||||||
|
start_tin(otmp)
|
||||||
|
struct obj *otmp;
|
||||||
{
|
{
|
||||||
const char *mesg = 0;
|
const char *mesg = 0;
|
||||||
register int tmp;
|
register int tmp;
|
||||||
@@ -1400,8 +1413,7 @@ register struct obj *otmp;
|
|||||||
access); 1 turn delay case is non-deterministic: getting
|
access); 1 turn delay case is non-deterministic: getting
|
||||||
interrupted and retrying might yield another 1 turn delay
|
interrupted and retrying might yield another 1 turn delay
|
||||||
or might open immediately on 2nd (or 3rd, 4th, ...) try */
|
or might open immediately on 2nd (or 3rd, 4th, ...) try */
|
||||||
tmp =
|
tmp = (uwep && uwep->blessed && uwep->otyp == TIN_OPENER) ? 0 : rn2(2);
|
||||||
(uwep && uwep->blessed && uwep->otyp == TIN_OPENER) ? 0 : rn2(2);
|
|
||||||
if (!tmp)
|
if (!tmp)
|
||||||
mesg = "The tin opens like magic!";
|
mesg = "The tin opens like magic!";
|
||||||
else
|
else
|
||||||
@@ -1502,13 +1514,15 @@ struct obj *obj;
|
|||||||
multi_reason = "unconscious from rotten food";
|
multi_reason = "unconscious from rotten food";
|
||||||
nomovemsg = "You are conscious again.";
|
nomovemsg = "You are conscious again.";
|
||||||
afternmv = Hear_again;
|
afternmv = Hear_again;
|
||||||
return (1);
|
return 1;
|
||||||
}
|
}
|
||||||
return (0);
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
STATIC_OVL int eatcorpse(otmp) /* called when a corpse is selected as food */
|
/* called when a corpse is selected as food */
|
||||||
register struct obj *otmp;
|
STATIC_OVL int
|
||||||
|
eatcorpse(otmp)
|
||||||
|
struct obj *otmp;
|
||||||
{
|
{
|
||||||
int tp = 0, mnum = otmp->corpsenm;
|
int tp = 0, mnum = otmp->corpsenm;
|
||||||
long rotted = 0L;
|
long rotted = 0L;
|
||||||
@@ -1555,7 +1569,7 @@ register struct obj *otmp;
|
|||||||
useup(otmp);
|
useup(otmp);
|
||||||
else
|
else
|
||||||
useupf(otmp, 1L);
|
useupf(otmp, 1L);
|
||||||
return (2);
|
return 2;
|
||||||
} else if (acidic(&mons[mnum]) && !Acid_resistance) {
|
} else if (acidic(&mons[mnum]) && !Acid_resistance) {
|
||||||
tp++;
|
tp++;
|
||||||
You("have a very bad case of stomach acid."); /* not body_part() */
|
You("have a very bad case of stomach acid."); /* not body_part() */
|
||||||
@@ -1622,11 +1636,13 @@ register struct obj *otmp;
|
|||||||
: (yummy ? "is delicious" : "tastes terrible"));
|
: (yummy ? "is delicious" : "tastes terrible"));
|
||||||
}
|
}
|
||||||
|
|
||||||
return (retcode);
|
return retcode;
|
||||||
}
|
}
|
||||||
|
|
||||||
STATIC_OVL void start_eating(otmp) /* called as you start to eat */
|
/* called as you start to eat */
|
||||||
register struct obj *otmp;
|
STATIC_OVL void
|
||||||
|
start_eating(otmp)
|
||||||
|
struct obj *otmp;
|
||||||
{
|
{
|
||||||
const char *old_nomovemsg, *save_nomovemsg;
|
const char *old_nomovemsg, *save_nomovemsg;
|
||||||
|
|
||||||
@@ -1711,58 +1727,63 @@ struct obj *otmp;
|
|||||||
case HUGE_CHUNK_OF_MEAT:
|
case HUGE_CHUNK_OF_MEAT:
|
||||||
case MEAT_RING:
|
case MEAT_RING:
|
||||||
goto give_feedback;
|
goto give_feedback;
|
||||||
/* break; */
|
|
||||||
case CLOVE_OF_GARLIC:
|
case CLOVE_OF_GARLIC:
|
||||||
if (is_undead(youmonst.data)) {
|
if (is_undead(youmonst.data)) {
|
||||||
make_vomiting((long) rn1(context.victual.reqtime, 5), FALSE);
|
make_vomiting((long) rn1(context.victual.reqtime, 5), FALSE);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* Fall through otherwise */
|
/* else FALLTHRU */
|
||||||
default:
|
default:
|
||||||
if (otmp->otyp == SLIME_MOLD && !otmp->cursed
|
if (otmp->otyp == SLIME_MOLD && !otmp->cursed
|
||||||
&& otmp->spe == context.current_fruit)
|
&& otmp->spe == context.current_fruit) {
|
||||||
pline("My, that was a %s %s!", Hallucination ? "primo" : "yummy",
|
pline("My, that was a %s %s!",
|
||||||
|
Hallucination ? "primo" : "yummy",
|
||||||
singular(otmp, xname));
|
singular(otmp, xname));
|
||||||
else if (otmp->otyp == APPLE && otmp->cursed && !Sleep_resistance)
|
} else if (otmp->otyp == APPLE && otmp->cursed && !Sleep_resistance) {
|
||||||
; /* skip core joke; feedback deferred til fpostfx() */
|
; /* skip core joke; feedback deferred til fpostfx() */
|
||||||
else
|
|
||||||
|
#if defined(MAC) || defined(MACOSX)
|
||||||
|
/* KMH -- Why should Unix have all the fun?
|
||||||
|
We check MACOSX before UNIX to get the Apple-specific apple
|
||||||
|
message; the '#if UNIX' code will still kick in for pear. */
|
||||||
|
} else if (otmp->otyp == APPLE) {
|
||||||
|
pline("Delicious! Must be a Macintosh!");
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef UNIX
|
#ifdef UNIX
|
||||||
if (otmp->otyp == APPLE || otmp->otyp == PEAR) {
|
} else if (otmp->otyp == APPLE || otmp->otyp == PEAR) {
|
||||||
if (!Hallucination) {
|
if (!Hallucination) {
|
||||||
pline("Core dumped.");
|
pline("Core dumped.");
|
||||||
} else {
|
} else {
|
||||||
/* This is based on an old Usenet joke, a fake a.out manual
|
/* This is based on an old Usenet joke, a fake a.out manual
|
||||||
* page */
|
* page
|
||||||
|
*/
|
||||||
int x = rnd(100);
|
int x = rnd(100);
|
||||||
if (x <= 75)
|
|
||||||
pline("Segmentation fault -- core dumped.");
|
pline("%s -- core dumped.",
|
||||||
else if (x <= 99)
|
(x <= 75)
|
||||||
pline("Bus error -- core dumped.");
|
? "Segmentation fault"
|
||||||
else
|
: (x <= 99)
|
||||||
pline("Yo' mama -- core dumped.");
|
? "Bus error"
|
||||||
|
: "Yo' mama");
|
||||||
}
|
}
|
||||||
} else
|
|
||||||
#endif
|
#endif
|
||||||
#if defined(MAC) \
|
} else if (otmp->otyp == EGG && stale_egg(otmp)) {
|
||||||
|| defined(MACOSX) /* KMH -- Why should Unix have all the fun? */
|
|
||||||
if (otmp->otyp == APPLE) {
|
|
||||||
pline("Delicious! Must be a Macintosh!");
|
|
||||||
} else
|
|
||||||
#endif
|
|
||||||
if (otmp->otyp == EGG && stale_egg(otmp)) {
|
|
||||||
pline("Ugh. Rotten egg."); /* perhaps others like it */
|
pline("Ugh. Rotten egg."); /* perhaps others like it */
|
||||||
make_vomiting((Vomiting & TIMEOUT) + (long) d(10, 4), TRUE);
|
make_vomiting((Vomiting & TIMEOUT) + (long) d(10, 4), TRUE);
|
||||||
} else
|
} else {
|
||||||
give_feedback:
|
give_feedback:
|
||||||
pline("This %s is %s", singular(otmp, xname),
|
pline("This %s is %s", singular(otmp, xname),
|
||||||
otmp->cursed
|
otmp->cursed
|
||||||
? (Hallucination ? "grody!" : "terrible!")
|
? (Hallucination ? "grody!" : "terrible!")
|
||||||
: (otmp->otyp == CRAM_RATION || otmp->otyp == K_RATION
|
: (otmp->otyp == CRAM_RATION
|
||||||
|| otmp->otyp == C_RATION)
|
|| otmp->otyp == K_RATION
|
||||||
|
|| otmp->otyp == C_RATION)
|
||||||
? "bland."
|
? "bland."
|
||||||
: Hallucination ? "gnarly!" : "delicious!");
|
: Hallucination ? "gnarly!" : "delicious!");
|
||||||
break;
|
}
|
||||||
}
|
break; /* default */
|
||||||
|
} /* switch */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* increment a combat intrinsic with limits on its growth */
|
/* increment a combat intrinsic with limits on its growth */
|
||||||
@@ -1949,9 +1970,11 @@ struct obj *otmp;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
STATIC_OVL void eatspecial() /* called after eating non-food */
|
/* called after eating non-food */
|
||||||
|
STATIC_OVL void
|
||||||
|
eatspecial()
|
||||||
{
|
{
|
||||||
register struct obj *otmp = context.victual.piece;
|
struct obj *otmp = context.victual.piece;
|
||||||
|
|
||||||
/* lesshungry wants an occupation to handle choke messages correctly */
|
/* lesshungry wants an occupation to handle choke messages correctly */
|
||||||
set_occupation(eatfood, "eating non-food", 0);
|
set_occupation(eatfood, "eating non-food", 0);
|
||||||
@@ -1977,19 +2000,21 @@ STATIC_OVL void eatspecial() /* called after eating non-food */
|
|||||||
if (otmp->oclass == POTION_CLASS) {
|
if (otmp->oclass == POTION_CLASS) {
|
||||||
otmp->quan++; /* dopotion() does a useup() */
|
otmp->quan++; /* dopotion() does a useup() */
|
||||||
(void) dopotion(otmp);
|
(void) dopotion(otmp);
|
||||||
}
|
} else if (otmp->oclass == RING_CLASS || otmp->oclass == AMULET_CLASS) {
|
||||||
if (otmp->oclass == RING_CLASS || otmp->oclass == AMULET_CLASS)
|
|
||||||
eataccessory(otmp);
|
eataccessory(otmp);
|
||||||
else if (otmp->otyp == LEASH && otmp->leashmon)
|
} else if (otmp->otyp == LEASH && otmp->leashmon) {
|
||||||
o_unleash(otmp);
|
o_unleash(otmp);
|
||||||
|
}
|
||||||
|
|
||||||
/* KMH -- idea by "Tommy the Terrorist" */
|
/* KMH -- idea by "Tommy the Terrorist" */
|
||||||
if ((otmp->otyp == TRIDENT) && !otmp->cursed) {
|
if (otmp->otyp == TRIDENT && !otmp->cursed) {
|
||||||
|
/* sugarless chewing gum which used to be heavily advertised on TV */
|
||||||
pline(Hallucination ? "Four out of five dentists agree."
|
pline(Hallucination ? "Four out of five dentists agree."
|
||||||
: "That was pure chewing satisfaction!");
|
: "That was pure chewing satisfaction!");
|
||||||
exercise(A_WIS, TRUE);
|
exercise(A_WIS, TRUE);
|
||||||
}
|
}
|
||||||
if ((otmp->otyp == FLINT) && !otmp->cursed) {
|
if (otmp->otyp == FLINT && !otmp->cursed) {
|
||||||
|
/* chewable vitamin for kids based on "The Flintstones" TV cartoon */
|
||||||
pline("Yabba-dabba delicious!");
|
pline("Yabba-dabba delicious!");
|
||||||
exercise(A_CON, TRUE);
|
exercise(A_CON, TRUE);
|
||||||
}
|
}
|
||||||
@@ -2022,7 +2047,7 @@ static const char *foodwords[] = {
|
|||||||
|
|
||||||
STATIC_OVL const char *
|
STATIC_OVL const char *
|
||||||
foodword(otmp)
|
foodword(otmp)
|
||||||
register struct obj *otmp;
|
struct obj *otmp;
|
||||||
{
|
{
|
||||||
if (otmp->oclass == FOOD_CLASS)
|
if (otmp->oclass == FOOD_CLASS)
|
||||||
return "food";
|
return "food";
|
||||||
@@ -2032,8 +2057,10 @@ register struct obj *otmp;
|
|||||||
return foodwords[objects[otmp->otyp].oc_material];
|
return foodwords[objects[otmp->otyp].oc_material];
|
||||||
}
|
}
|
||||||
|
|
||||||
STATIC_OVL void fpostfx(otmp) /* called after consuming (non-corpse) food */
|
/* called after consuming (non-corpse) food */
|
||||||
register struct obj *otmp;
|
STATIC_OVL void
|
||||||
|
fpostfx(otmp)
|
||||||
|
struct obj *otmp;
|
||||||
{
|
{
|
||||||
switch (otmp->otyp) {
|
switch (otmp->otyp) {
|
||||||
case SPRIG_OF_WOLFSBANE:
|
case SPRIG_OF_WOLFSBANE:
|
||||||
@@ -2125,13 +2152,13 @@ STATIC_OVL boolean
|
|||||||
leather_cover(otmp)
|
leather_cover(otmp)
|
||||||
struct obj *otmp;
|
struct obj *otmp;
|
||||||
{
|
{
|
||||||
const char *odesc = OBJ_DESCR(objects[otmp->otyp]);
|
const char *odesc = OBJ_DESCR(objects[otmp->otyp]);
|
||||||
|
|
||||||
if (odesc && (otmp->oclass == SPBOOK_CLASS)) {
|
if (odesc && (otmp->oclass == SPBOOK_CLASS)) {
|
||||||
if (!strcmp(odesc, "leather"))
|
if (!strcmp(odesc, "leather"))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -2253,7 +2280,6 @@ struct obj *otmp;
|
|||||||
/*
|
/*
|
||||||
* Breaks conduct, but otherwise safe.
|
* Breaks conduct, but otherwise safe.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!u.uconduct.unvegan
|
if (!u.uconduct.unvegan
|
||||||
&& ((material == LEATHER || material == BONE
|
&& ((material == LEATHER || material == BONE
|
||||||
|| material == DRAGON_HIDE || material == WAX)
|
|| material == DRAGON_HIDE || material == WAX)
|
||||||
@@ -2288,7 +2314,9 @@ struct obj *otmp;
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int doeat() /* generic "eat" command function (see cmd.c) */
|
/* 'e' command */
|
||||||
|
int
|
||||||
|
doeat()
|
||||||
{
|
{
|
||||||
struct obj *otmp;
|
struct obj *otmp;
|
||||||
int basenutrit; /* nutrition of full item */
|
int basenutrit; /* nutrition of full item */
|
||||||
@@ -2361,21 +2389,23 @@ int doeat() /* generic "eat" command function (see cmd.c) */
|
|||||||
if (otmp->dknown && !objects[otmp->otyp].oc_name_known
|
if (otmp->dknown && !objects[otmp->otyp].oc_name_known
|
||||||
&& !objects[otmp->otyp].oc_uname)
|
&& !objects[otmp->otyp].oc_uname)
|
||||||
docall(otmp);
|
docall(otmp);
|
||||||
return (1);
|
return 1;
|
||||||
}
|
}
|
||||||
if (otmp->oclass != FOOD_CLASS) {
|
if (otmp->oclass != FOOD_CLASS) {
|
||||||
int material;
|
int material;
|
||||||
|
|
||||||
context.victual.reqtime = 1;
|
context.victual.reqtime = 1;
|
||||||
context.victual.piece = otmp;
|
context.victual.piece = otmp;
|
||||||
context.victual.o_id = otmp->o_id;
|
context.victual.o_id = otmp->o_id;
|
||||||
/* Don't split it, we don't need to if it's 1 move */
|
/* Don't split it, we don't need to if it's 1 move */
|
||||||
context.victual.usedtime = 0;
|
context.victual.usedtime = 0;
|
||||||
context.victual.canchoke = (u.uhs == SATIATED);
|
context.victual.canchoke = (u.uhs == SATIATED);
|
||||||
/* Note: gold weighs 1 pt. for each 1000 pieces (see */
|
/* Note: gold weighs 1 pt. for each 1000 pieces (see
|
||||||
/* pickup.c) so gold and non-gold is consistent. */
|
pickup.c) so gold and non-gold is consistent. */
|
||||||
if (otmp->oclass == COIN_CLASS)
|
if (otmp->oclass == COIN_CLASS)
|
||||||
basenutrit =
|
basenutrit = ((otmp->quan > 200000L)
|
||||||
((otmp->quan > 200000L) ? 2000 : (int) (otmp->quan / 100L));
|
? 2000
|
||||||
|
: (int) (otmp->quan / 100L));
|
||||||
else if (otmp->oclass == BALL_CLASS || otmp->oclass == CHAIN_CLASS)
|
else if (otmp->oclass == BALL_CLASS || otmp->oclass == CHAIN_CLASS)
|
||||||
basenutrit = weight(otmp);
|
basenutrit = weight(otmp);
|
||||||
/* oc_nutrition is usually weight anyway */
|
/* oc_nutrition is usually weight anyway */
|
||||||
@@ -2409,15 +2439,16 @@ int doeat() /* generic "eat" command function (see cmd.c) */
|
|||||||
losehp(rnd(15), xname(otmp), KILLED_BY_AN);
|
losehp(rnd(15), xname(otmp), KILLED_BY_AN);
|
||||||
} else
|
} else
|
||||||
You("seem unaffected by the poison.");
|
You("seem unaffected by the poison.");
|
||||||
} else if (!otmp->cursed && !nodelicious)
|
} else if (!otmp->cursed && !nodelicious) {
|
||||||
pline("%s%s is delicious!",
|
pline("%s%s is delicious!",
|
||||||
(obj_is_pname(otmp)
|
(obj_is_pname(otmp)
|
||||||
&& (otmp->oartifact < ART_ORB_OF_DETECTION))
|
&& otmp->oartifact < ART_ORB_OF_DETECTION)
|
||||||
? ""
|
? ""
|
||||||
: "This ",
|
: "This ",
|
||||||
otmp->oclass == COIN_CLASS ? foodword(otmp)
|
(otmp->oclass == COIN_CLASS)
|
||||||
: singular(otmp, xname));
|
? foodword(otmp)
|
||||||
|
: singular(otmp, xname));
|
||||||
|
}
|
||||||
eatspecial();
|
eatspecial();
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@@ -2436,7 +2467,7 @@ int doeat() /* generic "eat" command function (see cmd.c) */
|
|||||||
context.victual.o_id = context.victual.piece->o_id;
|
context.victual.o_id = context.victual.piece->o_id;
|
||||||
You("resume your meal.");
|
You("resume your meal.");
|
||||||
start_eating(context.victual.piece);
|
start_eating(context.victual.piece);
|
||||||
return (1);
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* nothing in progress - so try to find something. */
|
/* nothing in progress - so try to find something. */
|
||||||
@@ -2444,7 +2475,7 @@ int doeat() /* generic "eat" command function (see cmd.c) */
|
|||||||
/* tins must also check conduct separately in case they're discarded */
|
/* tins must also check conduct separately in case they're discarded */
|
||||||
if (otmp->otyp == TIN) {
|
if (otmp->otyp == TIN) {
|
||||||
start_tin(otmp);
|
start_tin(otmp);
|
||||||
return (1);
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* KMH, conduct */
|
/* KMH, conduct */
|
||||||
@@ -2463,18 +2494,19 @@ int doeat() /* generic "eat" command function (see cmd.c) */
|
|||||||
*/
|
*/
|
||||||
if (otmp->otyp == CORPSE || otmp->globby) {
|
if (otmp->otyp == CORPSE || otmp->globby) {
|
||||||
int tmp = eatcorpse(otmp);
|
int tmp = eatcorpse(otmp);
|
||||||
|
|
||||||
if (tmp == 2) {
|
if (tmp == 2) {
|
||||||
/* used up */
|
/* used up */
|
||||||
context.victual.piece = (struct obj *) 0;
|
context.victual.piece = (struct obj *) 0;
|
||||||
context.victual.o_id = 0;
|
context.victual.o_id = 0;
|
||||||
return (1);
|
return 1;
|
||||||
} else if (tmp)
|
} else if (tmp)
|
||||||
dont_start = TRUE;
|
dont_start = TRUE;
|
||||||
/* if not used up, eatcorpse sets up reqtime and may modify
|
/* if not used up, eatcorpse sets up reqtime and may modify oeaten */
|
||||||
* oeaten */
|
|
||||||
} else {
|
} else {
|
||||||
/* No checks for WAX, LEATHER, BONE, DRAGON_HIDE. These are
|
/* No checks for WAX, LEATHER, BONE, DRAGON_HIDE. These are
|
||||||
* all handled in the != FOOD_CLASS case, above */
|
* all handled in the != FOOD_CLASS case, above.
|
||||||
|
*/
|
||||||
switch (objects[otmp->otyp].oc_material) {
|
switch (objects[otmp->otyp].oc_material) {
|
||||||
case FLESH:
|
case FLESH:
|
||||||
u.uconduct.unvegan++;
|
u.uconduct.unvegan++;
|
||||||
@@ -2484,11 +2516,9 @@ int doeat() /* generic "eat" command function (see cmd.c) */
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if (otmp->otyp == PANCAKE || otmp->otyp == FORTUNE_COOKIE
|
if (otmp->otyp == PANCAKE || otmp->otyp == FORTUNE_COOKIE /*eggs*/
|
||||||
|| /* eggs */
|
|| otmp->otyp == CREAM_PIE || otmp->otyp == CANDY_BAR /*milk*/
|
||||||
otmp->otyp == CREAM_PIE || otmp->otyp == CANDY_BAR
|
|| otmp->otyp == LUMP_OF_ROYAL_JELLY)
|
||||||
|| /* milk */
|
|
||||||
otmp->otyp == LUMP_OF_ROYAL_JELLY)
|
|
||||||
u.uconduct.unvegan++;
|
u.uconduct.unvegan++;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -2517,17 +2547,18 @@ int doeat() /* generic "eat" command function (see cmd.c) */
|
|||||||
debugpline1("before rounddiv: context.victual.reqtime == %d",
|
debugpline1("before rounddiv: context.victual.reqtime == %d",
|
||||||
context.victual.reqtime);
|
context.victual.reqtime);
|
||||||
debugpline2("oeaten == %d, basenutrit == %d", otmp->oeaten, basenutrit);
|
debugpline2("oeaten == %d, basenutrit == %d", otmp->oeaten, basenutrit);
|
||||||
context.victual.reqtime =
|
context.victual.reqtime = (basenutrit == 0)
|
||||||
(basenutrit == 0 ? 0 : rounddiv(context.victual.reqtime
|
? 0
|
||||||
|
: rounddiv(context.victual.reqtime
|
||||||
* (long) otmp->oeaten,
|
* (long) otmp->oeaten,
|
||||||
basenutrit));
|
basenutrit);
|
||||||
debugpline1("after rounddiv: context.victual.reqtime == %d",
|
debugpline1("after rounddiv: context.victual.reqtime == %d",
|
||||||
context.victual.reqtime);
|
context.victual.reqtime);
|
||||||
/* calculate the modulo value (nutrit. units per round eating)
|
/*
|
||||||
* note: this isn't exact - you actually lose a little nutrition
|
* calculate the modulo value (nutrit. units per round eating)
|
||||||
* due to this method.
|
* note: this isn't exact - you actually lose a little nutrition due
|
||||||
* TODO: add in a "remainder" value to be given at the end of the
|
* to this method.
|
||||||
* meal.
|
* TODO: add in a "remainder" value to be given at the end of the meal.
|
||||||
*/
|
*/
|
||||||
if (context.victual.reqtime == 0 || otmp->oeaten == 0)
|
if (context.victual.reqtime == 0 || otmp->oeaten == 0)
|
||||||
/* possible if most has been eaten before */
|
/* possible if most has been eaten before */
|
||||||
@@ -2541,7 +2572,7 @@ int doeat() /* generic "eat" command function (see cmd.c) */
|
|||||||
|
|
||||||
if (!dont_start)
|
if (!dont_start)
|
||||||
start_eating(otmp);
|
start_eating(otmp);
|
||||||
return (1);
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Take a single bite from a piece of food, checking for choking and
|
/* Take a single bite from a piece of food, checking for choking and
|
||||||
@@ -2573,7 +2604,9 @@ bite()
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void gethungry() /* as time goes by - called by moveloop() and domove() */
|
/* as time goes by - called by moveloop() and domove() */
|
||||||
|
void
|
||||||
|
gethungry()
|
||||||
{
|
{
|
||||||
if (u.uinvulnerable)
|
if (u.uinvulnerable)
|
||||||
return; /* you don't feel hungrier */
|
return; /* you don't feel hungrier */
|
||||||
@@ -2622,20 +2655,23 @@ void gethungry() /* as time goes by - called by moveloop() and domove() */
|
|||||||
newuhs(TRUE);
|
newuhs(TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void morehungry(
|
/* called after vomiting and after performing feats of magic */
|
||||||
num) /* called after vomiting and after performing feats of magic */
|
void
|
||||||
register int num;
|
morehungry(num)
|
||||||
|
int num;
|
||||||
{
|
{
|
||||||
u.uhunger -= num;
|
u.uhunger -= num;
|
||||||
newuhs(TRUE);
|
newuhs(TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* called after eating (and after drinking fruit juice) */
|
||||||
void
|
void
|
||||||
lesshungry(num) /* called after eating (and after drinking fruit juice) */
|
lesshungry(num)
|
||||||
register int num;
|
int num;
|
||||||
{
|
{
|
||||||
/* See comments in newuhs() for discussion on force_save_hs */
|
/* See comments in newuhs() for discussion on force_save_hs */
|
||||||
boolean iseating = (occupation == eatfood) || force_save_hs;
|
boolean iseating = (occupation == eatfood) || force_save_hs;
|
||||||
|
|
||||||
debugpline1("lesshungry(%d)", num);
|
debugpline1("lesshungry(%d)", num);
|
||||||
u.uhunger += num;
|
u.uhunger += num;
|
||||||
if (u.uhunger >= 2000) {
|
if (u.uhunger >= 2000) {
|
||||||
@@ -2657,9 +2693,9 @@ register int num;
|
|||||||
|| (context.victual.eating && !context.victual.fullwarn)) {
|
|| (context.victual.eating && !context.victual.fullwarn)) {
|
||||||
pline("You're having a hard time getting all of it down.");
|
pline("You're having a hard time getting all of it down.");
|
||||||
nomovemsg = "You're finally finished.";
|
nomovemsg = "You're finally finished.";
|
||||||
if (!context.victual.eating)
|
if (!context.victual.eating) {
|
||||||
multi = -2;
|
multi = -2;
|
||||||
else {
|
} else {
|
||||||
context.victual.fullwarn = TRUE;
|
context.victual.fullwarn = TRUE;
|
||||||
if (context.victual.canchoke
|
if (context.victual.canchoke
|
||||||
&& context.victual.reqtime > 1) {
|
&& context.victual.reqtime > 1) {
|
||||||
@@ -2692,16 +2728,20 @@ unfaint(VOID_ARGS)
|
|||||||
boolean
|
boolean
|
||||||
is_fainted()
|
is_fainted()
|
||||||
{
|
{
|
||||||
return ((boolean)(u.uhs == FAINTED));
|
return (boolean) (u.uhs == FAINTED);
|
||||||
}
|
}
|
||||||
|
|
||||||
void reset_faint() /* call when a faint must be prematurely terminated */
|
/* call when a faint must be prematurely terminated */
|
||||||
|
void
|
||||||
|
reset_faint()
|
||||||
{
|
{
|
||||||
if (afternmv == unfaint)
|
if (afternmv == unfaint)
|
||||||
unmul("You revive.");
|
unmul("You revive.");
|
||||||
}
|
}
|
||||||
|
|
||||||
void newuhs(incr) /* compute and comment on your (new?) hunger status */
|
/* compute and comment on your (new?) hunger status */
|
||||||
|
void
|
||||||
|
newuhs(incr)
|
||||||
boolean incr;
|
boolean incr;
|
||||||
{
|
{
|
||||||
unsigned newhs;
|
unsigned newhs;
|
||||||
@@ -2805,8 +2845,7 @@ boolean incr;
|
|||||||
case WEAK:
|
case WEAK:
|
||||||
if (Hallucination)
|
if (Hallucination)
|
||||||
pline((!incr) ? "You still have the munchies."
|
pline((!incr) ? "You still have the munchies."
|
||||||
: "The munchies are interfering with your "
|
: "The munchies are interfering with your motor capabilities.");
|
||||||
"motor capabilities.");
|
|
||||||
else if (incr && (Role_if(PM_WIZARD) || Race_if(PM_ELF)
|
else if (incr && (Role_if(PM_WIZARD) || Race_if(PM_ELF)
|
||||||
|| Role_if(PM_VALKYRIE)))
|
|| Role_if(PM_VALKYRIE)))
|
||||||
pline("%s needs food, badly!",
|
pline("%s needs food, badly!",
|
||||||
@@ -2837,10 +2876,11 @@ boolean incr;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Returns an object representing food. Object may be either on floor or
|
/* Returns an object representing food.
|
||||||
* in inventory.
|
* Object may be either on floor or in inventory.
|
||||||
*/
|
*/
|
||||||
struct obj *floorfood(verb, corpsecheck) /* get food from floor or pack */
|
struct obj *
|
||||||
|
floorfood(verb, corpsecheck)
|
||||||
const char *verb;
|
const char *verb;
|
||||||
int corpsecheck; /* 0, no check, 1, corpses, 2, tinnable corpses */
|
int corpsecheck; /* 0, no check, 1, corpses, 2, tinnable corpses */
|
||||||
{
|
{
|
||||||
@@ -2852,9 +2892,9 @@ int corpsecheck; /* 0, no check, 1, corpses, 2, tinnable corpses */
|
|||||||
|
|
||||||
/* if we can't touch floor objects then use invent food only */
|
/* if we can't touch floor objects then use invent food only */
|
||||||
if (!can_reach_floor(TRUE) || (feeding && u.usteed)
|
if (!can_reach_floor(TRUE) || (feeding && u.usteed)
|
||||||
|| /* can't eat off floor while riding */
|
|| (is_pool_or_lava(u.ux, u.uy)
|
||||||
(is_pool_or_lava(u.ux, u.uy) && (Wwalking || is_clinger(youmonst.data)
|
&& (Wwalking || is_clinger(youmonst.data)
|
||||||
|| (Flying && !Breathless))))
|
|| (Flying && !Breathless))))
|
||||||
goto skipfloor;
|
goto skipfloor;
|
||||||
|
|
||||||
if (feeding && metallivorous(youmonst.data)) {
|
if (feeding && metallivorous(youmonst.data)) {
|
||||||
@@ -2909,9 +2949,9 @@ int corpsecheck; /* 0, no check, 1, corpses, 2, tinnable corpses */
|
|||||||
(void) safe_qbuf(qbuf, qbuf, qsfx, otmp, doname, ansimpleoname,
|
(void) safe_qbuf(qbuf, qbuf, qsfx, otmp, doname, ansimpleoname,
|
||||||
one ? something : (const char *) "things");
|
one ? something : (const char *) "things");
|
||||||
if ((c = yn_function(qbuf, ynqchars, 'n')) == 'y')
|
if ((c = yn_function(qbuf, ynqchars, 'n')) == 'y')
|
||||||
return (otmp);
|
return otmp;
|
||||||
else if (c == 'q')
|
else if (c == 'q')
|
||||||
return ((struct obj *) 0);
|
return (struct obj *) 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2931,7 +2971,8 @@ skipfloor:
|
|||||||
|
|
||||||
/* Side effects of vomiting */
|
/* Side effects of vomiting */
|
||||||
/* added nomul (MRS) - it makes sense, you're too busy being sick! */
|
/* added nomul (MRS) - it makes sense, you're too busy being sick! */
|
||||||
void vomit() /* A good idea from David Neves */
|
void
|
||||||
|
vomit() /* A good idea from David Neves */
|
||||||
{
|
{
|
||||||
if (cantvomit(youmonst.data))
|
if (cantvomit(youmonst.data))
|
||||||
/* doesn't cure food poisoning; message assumes that we aren't
|
/* doesn't cure food poisoning; message assumes that we aren't
|
||||||
@@ -2946,8 +2987,8 @@ void vomit() /* A good idea from David Neves */
|
|||||||
|
|
||||||
int
|
int
|
||||||
eaten_stat(base, obj)
|
eaten_stat(base, obj)
|
||||||
register int base;
|
int base;
|
||||||
register struct obj *obj;
|
struct obj *obj;
|
||||||
{
|
{
|
||||||
long uneaten_amt, full_amount;
|
long uneaten_amt, full_amount;
|
||||||
|
|
||||||
@@ -3062,10 +3103,11 @@ int threat;
|
|||||||
switch (threat) {
|
switch (threat) {
|
||||||
/* note: not used; hunger code bypasses stop_occupation() when eating */
|
/* note: not used; hunger code bypasses stop_occupation() when eating */
|
||||||
case HUNGER:
|
case HUNGER:
|
||||||
return (mndx != NON_PM || otin->spe == 1);
|
return (boolean) (mndx != NON_PM || otin->spe == 1);
|
||||||
/* flesh from lizards and acidic critters stops petrification */
|
/* flesh from lizards and acidic critters stops petrification */
|
||||||
case STONED:
|
case STONED:
|
||||||
return (mndx >= LOW_PM && (mndx == PM_LIZARD || acidic(&mons[mndx])));
|
return (boolean) (mndx >= LOW_PM
|
||||||
|
&& (mndx == PM_LIZARD || acidic(&mons[mndx])));
|
||||||
/* no tins can cure these (yet?) */
|
/* no tins can cure these (yet?) */
|
||||||
case SLIMED:
|
case SLIMED:
|
||||||
case SICK:
|
case SICK:
|
||||||
|
|||||||
Reference in New Issue
Block a user