]> granicus.if.org Git - nethack/commitdiff
minor flavor bit of the day
authornhmall <nhmall@nethack.org>
Sat, 29 Feb 2020 18:57:31 +0000 (13:57 -0500)
committernhmall <nhmall@nethack.org>
Sat, 29 Feb 2020 18:57:31 +0000 (13:57 -0500)
include/extern.h
src/invent.c
src/mhitu.c

index 231bad7763bf06b7dc845a8142461dfca92b0883..727fe791e5924ab4bb85dc9ecf26d1c08d5e8b75 100644 (file)
@@ -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));
index 9f3b5137d67a7ebe51454b1919e81151056a1bc3..0b468697efac69dbdb6a4930d4736b654d14d90b 100644 (file)
@@ -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()
index 4f36b325f6b0a0470a9dce64b16549f5a7214ba8..282831c5f25b9f95b03e5abdb5daf8c8cba75a5c 100644 (file)
@@ -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 */