From: nethack.rankin Date: Sun, 4 Sep 2011 21:59:51 +0000 (+0000) Subject: #H2441 - Snow White (trunk only) X-Git-Tag: MOVE2GIT~180 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b42cc3bdb0188be3aa395d40de5dfe73bc1a1d5f;p=nethack #H2441 - Snow White (trunk only) suggested that eating a cursed apple give a Snow White reference. The apple eaten by Snow White is described as poisoned, but cursed seems close enough. Fall asleep for 20..30 turns if you eat a cursed apple when you lack sleep resistance. --- diff --git a/src/eat.c b/src/eat.c index 212a85da6..8c21bf576 100644 --- a/src/eat.c +++ b/src/eat.c @@ -1759,11 +1759,15 @@ struct obj *otmp; pline("My, that was a %s %s!", Hallucination ? "primo" : "yummy", singular(otmp, xname)); + else if (otmp->otyp == APPLE && otmp->cursed && + !Sleep_resistance) + ; /* skip core joke; feedback deferred til fpostfx() */ else #ifdef UNIX if (otmp->otyp == APPLE || otmp->otyp == PEAR) { - if (!Hallucination) pline("Core dumped."); - else { + if (!Hallucination) { + pline("Core dumped."); + } else { /* This is based on an old Usenet joke, a fake a.out manual page */ int x = rnd(100); if (x <= 75) @@ -2121,6 +2125,20 @@ register struct obj *otmp; if (Vomiting && !otmp->cursed) make_vomiting(0L, TRUE); break; + case APPLE: + if (otmp->cursed && !Sleep_resistance) { + /* Snow White; 'poisoned' applies to [a subset of] weapons, + not food, so we substitute cursed; fortunately our hero + won't have to wait for a prince to be rescued/revived */ + if (Race_if(PM_DWARF) && Hallucination) + verbalize("Heigh-ho, ho-hum, I think I'll skip work today."); + else if (Deaf || !flags.acoustics) + You("fall asleep."); + else + You_hear("sinister laughter as you fall asleep..."); + fall_asleep(-rn1(11, 20), TRUE); + } + break; } return; } @@ -2222,6 +2240,12 @@ struct obj *otmp; if (yn_function(buf,ynchars,'n')=='n') return 1; else return 2; } + if (otmp->otyp == APPLE && otmp->cursed && !Sleep_resistance) { + /* causes sleep, for long enough to be dangerous */ + Sprintf(buf, "%s like %s might have been poisoned. %s", + foodsmell, it_or_they, eat_it_anyway); + return (yn_function(buf, ynchars, 'n') == 'n') ? 1 : 2; + } if (cadaver && !vegetarian(&mons[mnum]) && !u.uconduct.unvegetarian && Role_if(PM_MONK)) { Sprintf(buf, "%s unhealthy. %s",