From 3219ed1aa8376c55b763252e74c67a51e7adb698 Mon Sep 17 00:00:00 2001 From: copperwater Date: Fri, 19 Feb 2021 00:25:45 -0500 Subject: [PATCH 1/2] Fix: engraving with non-blade dulled the weapon anyway Due to a logic bug introduced when engraving became an occupation - the code that tests to see whether the player is writing with a weapon that will get dulled wasn't correctly checking that they were actually carving an engraving. --- src/engrave.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/engrave.c b/src/engrave.c index 9acb246ed..5926a4dd2 100644 --- a/src/engrave.c +++ b/src/engrave.c @@ -1133,15 +1133,15 @@ engrave(void) } } - dulling_wep = (stylus && stylus->oclass == WEAPON_CLASS + dulling_wep = (carving && stylus && stylus->oclass == WEAPON_CLASS && (stylus->otyp != ATHAME || stylus->cursed)); marker = (stylus && stylus->otyp == MAGIC_MARKER); g.context.engraving.actionct++; /* sanity checks */ - if (dulling_wep && !carving) { - impossible("using weapon for non-carve engraving"); + if (dulling_wep && !is_blade(stylus)) { + impossible("carving with non-bladed weapon"); } else if (g.context.engraving.type == MARK && !marker) { impossible("making graffiti with non-marker stylus"); From fb0b535cde149698c437849aaa83d36f4dbf0409 Mon Sep 17 00:00:00 2001 From: nhmall Date: Fri, 19 Feb 2021 07:49:10 -0500 Subject: [PATCH 2/2] fixes37.0 entry for pr#464 --- doc/fixes37.0 | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/fixes37.0 b/doc/fixes37.0 index a7d9f4dbc..c4e6f29a8 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -511,6 +511,7 @@ change to can_reach_floor() resulted in hero being unable to reach the floor when held by a lichen panic if lua init fails change wizard mode command #wizmgender to wizard mode option 'wizmgender' +engraving with non-blade dulled the weapon anyway (pr #464) curses: 'msg_window' option wasn't functional for curses unless the binary also included tty support