]> granicus.if.org Git - nethack/commitdiff
fix engraving with miscellaneous items
authorPatR <rankin@nethack.org>
Thu, 5 Aug 2021 19:32:30 +0000 (12:32 -0700)
committerPatR <rankin@nethack.org>
Thu, 5 Aug 2021 19:32:30 +0000 (12:32 -0700)
Reported directly to devteam:  when selecting an item to engrave
with, "getobj refactor"'s stylus_ok() classified none-of-the-above
objects as not viable instead of allowing arbitrary things to
engrave in the dust or give specific can't-use-that messages like
for food.  Make the suggested fix:  change default result when
checking an inventory item for applicability from GETOBJ_EXCLUDE
to GETOBJ_DOWNPLAY.

Engrave feedback rather than getobj selection:  splash of venom
isn't necessarily wizard mode-only so don't reject attempting to
engrave with it as using an illegal object.  And remove the extra
question mark from its "poison pen" message.

doc/fixes37.0
src/engrave.c

index 0e9d3eda62858c249f9fad2f6d3b3cabab0288d4..5b82e7540fe311ef6623aa2051e4f233f8333c02 100644 (file)
@@ -733,6 +733,7 @@ give genetic engineers teleport capability (as they had in slash'em); 'port
 if an invisible hero managed to convert an unaligned altar to an aligned one
        with color enabled, altar wasn't immediately redrawn with new color
 repair some regressions to (a)pply introduced by "getobj refactor" patch
+getobj too: allow attempting to (E)ngrave with any item in inventory
 fix ^X feedback when held typo: "unseen createure" -> "unseen creature"
 if a <foo> corpse was set to revive as a <foo> zombie and corpse was partly
        eaten at revival time and monster <foo> is defined as providing more
index da5e50510e0978f08da4e35764a591313ce59fb5..aa284062e6548688df82875d3c4567744d92ee82 100644 (file)
@@ -442,7 +442,7 @@ stylus_ok(struct obj *obj)
         && (obj->otyp == TOWEL || obj->otyp == MAGIC_MARKER))
         return GETOBJ_SUGGEST;
 
-    return GETOBJ_EXCLUDE;
+    return GETOBJ_DOWNPLAY;
 }
 
 /* can hero engrave at all (at their location)? */
@@ -879,11 +879,12 @@ doengrave(void)
         break;
 
     case VENOM_CLASS:
-        if (wizard) {
-            pline("Writing a poison pen letter??");
-            break;
-        }
-        /*FALLTHRU*/
+        /* this used to be ``if (wizard)'' and fall through to ILLOBJ_CLASS
+           for normal play, but splash of venom isn't "illegal" because it
+           could occur in normal play via wizard mode bones */
+        pline("Writing a poison pen letter?");
+        break;
+
     case ILLOBJ_CLASS:
         impossible("You're engraving with an illegal object!");
         break;