From: nethack.rankin Date: Sat, 20 Nov 2004 02:39:18 +0000 (+0000) Subject: tastes like chicken... X-Git-Tag: MOVE2GIT~1402 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0600cf70ca58d2bbb9273860b69cd1a805556406;p=nethack tastes like chicken... Someone in the newsgroup expressed surprise that he didn't get any special message after surviving the eating of a cockatrice corpse. Combine the cliche that unconventional meat inevitably tastes like chicken with the mythology that cockatrices are a bizarre hybrid of chicken and reptile (or whatever). This will give a message about tasting like chicken for corpses or smelling like chicken for tins when the hero has petrification resistance (poly'd into a xorn, for instance) or is hallucinating. --- diff --git a/doc/fixes34.4 b/doc/fixes34.4 index 23e5fe76f..1a704ed9d 100644 --- a/doc/fixes34.4 +++ b/doc/fixes34.4 @@ -84,6 +84,7 @@ when asked for a direction, a response of '?' yields help and then asks again when adding an item to inventory, try to stack it with the quiver slot before trying against other carried objects #adjust can be used to split an inventory stack +cockatrice meat has a distinct flavor to some Platform- and/or Interface-Specific New Features diff --git a/src/eat.c b/src/eat.c index 879733828..780b956ba 100644 --- a/src/eat.c +++ b/src/eat.c @@ -1,4 +1,4 @@ -/* SCCS Id: @(#)eat.c 3.4 2004/10/15 */ +/* SCCS Id: @(#)eat.c 3.4 2004/11/17 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1062,7 +1062,7 @@ opentin() /* called during each move whilst opening a tin */ { register int r; const char *what; - int which; + int which, mnum; if(!carried(context.tin.tin) && !obj_here(context.tin.tin, u.ux, u.uy)) /* perhaps it was stolen? */ @@ -1079,9 +1079,11 @@ opentin() /* called during each move whilst opening a tin */ costly_tin("destroyed"); goto use_me; } + You("succeed in opening the tin."); if(context.tin.tin->spe != 1) { - if (context.tin.tin->corpsenm == NON_PM) { + mnum = context.tin.tin->corpsenm; + if (mnum == NON_PM) { pline("It turns out to be empty."); context.tin.tin->dknown = context.tin.tin->known = TRUE; costly_tin((const char*)0); @@ -1089,17 +1091,23 @@ opentin() /* called during each move whilst opening a tin */ } r = tin_variety(context.tin.tin); which = 0; /* 0=>plural, 1=>as-is, 2=>"the" prefix */ - if (Hallucination) { + if ((mnum == PM_COCKATRICE || mnum == PM_CHICKATRICE) && + (Stone_resistance || Hallucination)) { + what = "chicken"; + which = 1; /* suppress pluralization */ + } else if (Hallucination) { what = rndmonnam(); } else { - what = mons[context.tin.tin->corpsenm].mname; - if (mons[context.tin.tin->corpsenm].geno & G_UNIQ) - which = type_is_pname(&mons[context.tin.tin->corpsenm]) ? 1 : 2; + what = mons[mnum].mname; + if (mons[mnum].geno & G_UNIQ) + which = type_is_pname(&mons[mnum]) ? 1 : 2; } if (which == 0) what = makeplural(what); + pline("It smells like %s%s.", (which == 2) ? "the " : "", what); if (yn("Eat it?") == 'n') { - if (!Hallucination) context.tin.tin->dknown = context.tin.tin->known = TRUE; + if (!Hallucination) + context.tin.tin->dknown = context.tin.tin->known = TRUE; if (flags.verbose) You("discard the open tin."); costly_tin((const char*)0); goto use_me; @@ -1107,21 +1115,21 @@ opentin() /* called during each move whilst opening a tin */ /* in case stop_occupation() was called on previous meal */ context.victual.piece = (struct obj *)0; context.victual.o_id = 0; - context.victual.fullwarn = context.victual.eating = context.victual.doreset = FALSE; + context.victual.fullwarn = context.victual.eating = + context.victual.doreset = FALSE; - You("consume %s %s.", tintxts[r].txt, - mons[context.tin.tin->corpsenm].mname); + You("consume %s %s.", tintxts[r].txt, mons[mnum].mname); /* KMH, conduct */ u.uconduct.food++; - if (!vegan(&mons[context.tin.tin->corpsenm])) + if (!vegan(&mons[mnum])) u.uconduct.unvegan++; - if (!vegetarian(&mons[context.tin.tin->corpsenm])) + if (!vegetarian(&mons[mnum])) violated_vegetarian(); context.tin.tin->dknown = context.tin.tin->known = TRUE; - cprefx(context.tin.tin->corpsenm); - cpostfx(context.tin.tin->corpsenm); + cprefx(mnum); + cpostfx(mnum); /* charge for one at pre-eating cost */ costly_tin((const char*)0); @@ -1368,6 +1376,9 @@ eatcorpse(otmp) /* called when a corpse is selected as food */ } if (!retcode) consume_oeaten(otmp, 2); /* oeaten >>= 2 */ + } else if ((mnum == PM_COCKATRICE || mnum == PM_CHICKATRICE) && + (Stone_resistance || Hallucination)) { + pline("This tastes just like chicken!"); } else { pline("%s%s %s!", !uniq ? "This " : !type_is_pname(&mons[mnum]) ? "The " : "", @@ -1772,6 +1783,7 @@ register struct obj *otmp; delayed_killer(STONED, KILLED_BY_AN, killer.name); } } + /* note: no "tastes like chicken" message for eggs */ } break; case EUCALYPTUS_LEAF: