From: nhmall Date: Sat, 29 Feb 2020 18:57:31 +0000 (-0500) Subject: minor flavor bit of the day X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cca2bcaa84918750eb934bbaf46f5c3120721b6b;p=nethack minor flavor bit of the day --- diff --git a/include/extern.h b/include/extern.h index 231bad776..727fe791e 100644 --- a/include/extern.h +++ b/include/extern.h @@ -1037,6 +1037,7 @@ E struct obj *FDECL(sobj_at, (int, int, int)); E struct obj *FDECL(nxtobj, (struct obj *, int, BOOLEAN_P)); E struct obj *FDECL(carrying, (int)); E boolean NDECL(have_lizard); +E struct obj *NDECL(u_carried_gloves); E struct obj *NDECL(u_have_novel); E struct obj *FDECL(o_on, (unsigned int, struct obj *)); E boolean FDECL(obj_here, (struct obj *, int, int)); diff --git a/src/invent.c b/src/invent.c index 9f3b5137d..0b468697e 100644 --- a/src/invent.c +++ b/src/invent.c @@ -1285,6 +1285,23 @@ have_lizard() return FALSE; } +struct obj * +u_carried_gloves() { + struct obj *otmp, *gloves = (struct obj *) 0; + + if (uarmg) { + gloves = uarmg; + } else { + for (otmp = g.invent; otmp; otmp = otmp->nobj) + if (is_gloves(otmp)) { + gloves = otmp; + break; + } + } + return gloves; +} + + /* 3.6 tribute */ struct obj * u_have_novel() diff --git a/src/mhitu.c b/src/mhitu.c index 4f36b325f..282831c5f 100644 --- a/src/mhitu.c +++ b/src/mhitu.c @@ -22,6 +22,8 @@ static void FDECL(mswings, (struct monst *, struct obj *)); static void FDECL(wildmiss, (struct monst *, struct attack *)); static void FDECL(hitmsg, (struct monst *, struct attack *)); +#define ld() ((yyyymmdd((time_t) 0) - (getyear() * 10000L)) == 0xe5) + static void hitmsg(mtmp, mattk) struct monst *mtmp; @@ -2581,10 +2583,23 @@ struct monst *mon; return 1; if (uarm || uarmc) { - if (!Deaf) - verbalize("You're such a %s; I wish...", - flags.female ? "sweet lady" : "nice guy"); - else if (seewho) + if (!Deaf) { + if (!(ld() && mon->female)) { + verbalize("You're such a %s; I wish...", + flags.female ? "sweet lady" : "nice guy"); + } else { + struct obj *yourgloves = u_carried_gloves(); + + /* have her call your gloves by their correct + name, possibly revealing them to you */ + if (yourgloves) + yourgloves->dknown = 1; + verbalize("Well, then you owe me %s%s!", + yourgloves ? yname(yourgloves) + : "twelve pairs of gloves", + yourgloves ? " and eleven more pairs of gloves" : ""); + } + } else if (seewho) pline("%s appears to sigh.", Monnam(mon)); /* else no regret message if can't see or hear seducer */