Merge branch 'fix-engraving-impossible' of https://github.com/copperwater/NetHack into copperwater-pr464

This commit is contained in:
nhmall
2021-02-19 07:46:45 -05:00

View File

@@ -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)); && (stylus->otyp != ATHAME || stylus->cursed));
marker = (stylus && stylus->otyp == MAGIC_MARKER); marker = (stylus && stylus->otyp == MAGIC_MARKER);
g.context.engraving.actionct++; g.context.engraving.actionct++;
/* sanity checks */ /* sanity checks */
if (dulling_wep && !carving) { if (dulling_wep && !is_blade(stylus)) {
impossible("using weapon for non-carve engraving"); impossible("carving with non-bladed weapon");
} }
else if (g.context.engraving.type == MARK && !marker) { else if (g.context.engraving.type == MARK && !marker) {
impossible("making graffiti with non-marker stylus"); impossible("making graffiti with non-marker stylus");