Skip to content

Commit

Permalink
engraving in inaccessible locations
Browse files Browse the repository at this point in the history
     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.
  • Loading branch information
nethack.rankin committed Dec 7, 2006
1 parent a29b06a commit 79ced45
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions doc/fixes34.4
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 5 additions & 1 deletion src/engrave.c
Original file line number Diff line number Diff line change
@@ -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. */

Expand Down Expand Up @@ -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!");
Expand Down

0 comments on commit 79ced45

Please sign in to comment.