]> granicus.if.org Git - nethack/commitdiff
U880 - grammar when eating artifacts
authorcohrs <cohrs>
Tue, 27 Jan 2004 03:37:51 +0000 (03:37 +0000)
committercohrs <cohrs>
Tue, 27 Jan 2004 03:37:51 +0000 (03:37 +0000)
Both the reported tombstone message and the initial message could be
grammatically incorrect for eating identified artifacts.  This begs the
question whether artifacts should be so easy to destroy.

doc/fixes34.4
src/eat.c

index cf49603882e0a793d1f559e51c07397d44ef4d3f..52f2e0eb1704c8683c0c0d55e68b4ef923670d63 100644 (file)
@@ -14,6 +14,7 @@ trap messages referring to named steed were ackwardly worded when hallucination
 some actions such as eating corpses off the floor didn't check whether hero
        could reach the bottom of a pit
 usmellmon() instead of "It turns into it" during monster polymorph
+grammar of messages regarding eating artifacts
 
 
 Platform- and/or Interface-Specific Fixes
index 55fbcc3e66b06d82a99651f20759297843714b78..c91ac4e856c279f90707cbaef14a243e3f9f6f68 100644 (file)
--- a/src/eat.c
+++ b/src/eat.c
@@ -197,40 +197,44 @@ choke(food)       /* To a full belly all food is bad. (It.) */
        exercise(A_CON, FALSE);
 
        if (Breathless || (!Strangled && !rn2(20))) {
-               /* choking by eating AoS doesn't involve stuffing yourself */
-               if (food && food->otyp == AMULET_OF_STRANGULATION) {
-                       You("choke, but recover your composure.");
-                       return;
-               }
-               You("stuff yourself and then vomit voluminously.");
-               morehungry(1000);       /* you just got *very* sick! */
-               nomovemsg = 0;
-               vomit();
+           /* choking by eating AoS doesn't involve stuffing yourself */
+           if (food && food->otyp == AMULET_OF_STRANGULATION) {
+               You("choke, but recover your composure.");
+               return;
+           }
+           You("stuff yourself and then vomit voluminously.");
+           morehungry(1000);   /* you just got *very* sick! */
+           nomovemsg = 0;
+           vomit();
        } else {
-               killer.format = KILLED_BY_AN;
-               /*
-                * Note all "killer"s below read "Choked on %s" on the
-                * high score list & tombstone.  So plan accordingly.
-                */
-               if(food) {
-                       You("choke over your %s.", foodword(food));
-                       if (food->oclass == COIN_CLASS) {
-                               Strcpy(killer.name, "a very rich meal");
-                       } else {
-                               Strcpy(killer.name, food_xname(food, FALSE));
-                               if (food->otyp == CORPSE &&
-                                   (mons[food->corpsenm].geno & G_UNIQ)) {
-                                   if (!type_is_pname(&mons[food->corpsenm]))
-                                       Strcpy(killer.name, the(killer.name));
-                                   killer.format = KILLED_BY;
-                               }
-                       }
+           killer.format = KILLED_BY_AN;
+           /*
+            * Note all "killer"s below read "Choked on %s" on the
+            * high score list & tombstone.  So plan accordingly.
+            */
+           if(food) {
+               You("choke over your %s.", foodword(food));
+               if (food->oclass == COIN_CLASS) {
+                   Strcpy(killer.name, "a very rich meal");
                } else {
-                       You("choke over it.");
-                       Strcpy(killer.name, "quick snack");
+                   Strcpy(killer.name, food_xname(food, FALSE));
+                   if (food->otyp == CORPSE &&
+                       (mons[food->corpsenm].geno & G_UNIQ)) {
+                       if (!type_is_pname(&mons[food->corpsenm]))
+                           Strcpy(killer.name, the(killer.name));
+                       killer.format = KILLED_BY;
+                   } else if (obj_is_pname(food)) {
+                       killer.format = KILLED_BY;
+                       if (food->oartifact >= ART_ORB_OF_DETECTION)
+                           Strcpy(killer.name, the(killer.name));
+                   }
                }
-               You("die...");
-               done(CHOKING);
+           } else {
+               You("choke over it.");
+               Strcpy(killer.name, "quick snack");
+           }
+           You("die...");
+           done(CHOKING);
        }
 }
 
@@ -2024,7 +2028,9 @@ doeat()           /* generic "eat" command funtion (see cmd.c) */
                } else
                    You("seem unaffected by the poison.");
            } else if (!otmp->cursed)
-               pline("This %s is delicious!",
+               pline("%s%s is delicious!",
+                     (obj_is_pname(otmp) &&
+                      (otmp->oartifact < ART_ORB_OF_DETECTION)) ? "" : "This ",
                      otmp->oclass == COIN_CLASS ? foodword(otmp) :
                      singular(otmp, xname));