engraving in inaccessible locations

Also from the newsgroup (2nd from "Three bugfixes for Xorns" [I got
the subject wrong on the previous spell of protection patch]):  when
phazing through walls or rock you could engrave as if it was ordinary
floor.  Again I didn't use the user's patch; it left closed doors, raised
drawbridge, and iron bars as locations where engraving was still feasible
and said "you can't write in solid rock" even if you were inside a tree.
[The 3rd of "3 xorn fixes" was for misleading feedback when attempting to
engrave while underwater; we've already fixed that one.]

     There was a suggestion that you should be able to engrave within solid
rock if you use a wand of digging, and that seems like a pretty good idea,
but the check for location comes before the check for writing instrument so
would be tricky to implement.
This commit is contained in:
nethack.rankin
2006-12-07 06:28:16 +00:00
parent a29b06ac2f
commit 79ced450e7
2 changed files with 6 additions and 1 deletions

View File

@@ -286,6 +286,7 @@ suppress "you rise from the dead" if game ends due to be turned into slime
don't give erroneous "<mon> disppears" message for hero poly'd into quantum
mechanic who hits engulfer while swallowed and blinded
feedback from casting spell of protection was wrong in some situations
can't engrave on floor while inside solid rock, wall, or closed door
Platform- and/or Interface-Specific Fixes

View File

@@ -1,4 +1,4 @@
/* SCCS Id: @(#)engrave.c 3.5 2005/06/22 */
/* SCCS Id: @(#)engrave.c 3.5 2006/12/06 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
@@ -499,6 +499,10 @@ doengrave()
if(Is_airlevel(&u.uz) || Is_waterlevel(&u.uz)/* in bubble */) {
You_cant("write in thin air!");
return(0);
} else if (closed_door(u.ux, u.uy) || !accessible(u.ux, u.uy)) {
/* stone, tree, wall, secret corridor, pool, lava, bars */
You_cant("write here.");
return 0;
}
if (cantwield(youmonst.data)) {
You_cant("even hold anything!");