diff --git a/include/extern.h b/include/extern.h index 7df8e2530..1d3e5ade1 100644 --- a/include/extern.h +++ b/include/extern.h @@ -978,7 +978,7 @@ extern char *build_english_list(char *) NONNULLARG1; extern char *random_engraving(char *, char *) NONNULLARG12; extern void wipeout_text(char *, int, unsigned) NONNULLARG1; extern boolean can_reach_floor(boolean); -extern void cant_reach_floor(coordxy, coordxy, boolean, boolean); +extern void cant_reach_floor(coordxy, coordxy, boolean, boolean, boolean); extern struct engr *engr_at(coordxy, coordxy); extern struct engr *sengr_at(const char *, coordxy, coordxy, boolean) NONNULLARG1; extern void u_wipe_engr(int); diff --git a/src/apply.c b/src/apply.c index 61219a716..3e7370c4a 100644 --- a/src/apply.c +++ b/src/apply.c @@ -360,7 +360,7 @@ use_stethoscope(struct obj *obj) Soundeffect(se_faint_splashing, 35); You_hear("faint splashing."); } else if (u.dz < 0 || !can_reach_floor(TRUE)) { - cant_reach_floor(u.ux, u.uy, (u.dz < 0), TRUE); + cant_reach_floor(u.ux, u.uy, (u.dz < 0), TRUE, FALSE); } else if (its_dead(u.ux, u.uy, &res)) { ; /* message already given */ } else if (Is_stronghold(&u.uz)) { diff --git a/src/dig.c b/src/dig.c index e8a89888f..579a97013 100644 --- a/src/dig.c +++ b/src/dig.c @@ -1314,7 +1314,7 @@ use_pick_axe2(struct obj *obj) /* it must be air -- water checked above */ You("swing %s through thin air.", yobjnam(obj, (char *) 0)); } else if (!can_reach_floor(FALSE)) { - cant_reach_floor(u.ux, u.uy, FALSE, FALSE); + cant_reach_floor(u.ux, u.uy, FALSE, FALSE, FALSE); } else if (is_pool_or_lava(u.ux, u.uy)) { /* Monsters which swim also happen not to be able to dig */ You("cannot stay under%s long enough.", @@ -1324,7 +1324,7 @@ use_pick_axe2(struct obj *obj) dotrap(trap, FORCEBUNGLE); /* might escape trap and still be teetering at brink */ if (!u.utrap) - cant_reach_floor(u.ux, u.uy, FALSE, TRUE); + cant_reach_floor(u.ux, u.uy, FALSE, TRUE, FALSE); } else if (!ispick /* can only dig down with an axe when doing so will trigger or disarm a trap here */ diff --git a/src/engrave.c b/src/engrave.c index 226f6b30b..e029e87dc 100644 --- a/src/engrave.c +++ b/src/engrave.c @@ -215,13 +215,16 @@ can_reach_floor(boolean check_pit) /* give a message after caller has determined that hero can't reach */ void -cant_reach_floor(coordxy x, coordxy y, boolean up, boolean check_pit) +cant_reach_floor(coordxy x, coordxy y, boolean up, + boolean check_pit, boolean wand_engraving) { - You("can't reach the %s.", - up ? ceiling(x, y) - : (check_pit && can_reach_floor(FALSE)) - ? "bottom of the pit" - : surface(x, y)); + pline("%s can't reach the %s.", + wand_engraving + ? "The wand does nothing more, and the tip of the wand" + : "You", + up ? ceiling(x, y) + : (check_pit && can_reach_floor(FALSE)) ? "bottom of the pit" + : surface(x, y)); } struct engr * @@ -493,7 +496,7 @@ u_can_engrave(void) pline("What would you write? \"Jonah was here\"?"); return FALSE; } else if (is_whirly(u.ustuck->data)) { - cant_reach_floor(u.ux, u.uy, FALSE, FALSE); + cant_reach_floor(u.ux, u.uy, FALSE, FALSE, FALSE); return FALSE; } /* Note: for amorphous engulfers, writing attempt is allowed here @@ -941,6 +944,7 @@ doengrave(void) char *sp; /* Place holder for space count of engr text */ struct _doengrave_ctx *de; int retval; + boolean initial_msg_given = FALSE; /* Can the adventurer engrave at all? */ if (!u_can_engrave()) @@ -982,12 +986,19 @@ doengrave(void) Your("message dissolves..."); goto doengr_exit; } - if (de->otmp->oclass != WAND_CLASS && !can_reach_floor(TRUE)) { - cant_reach_floor(u.ux, u.uy, FALSE, TRUE); - goto doengr_exit; + if (!can_reach_floor(TRUE)) { + if (de->otmp->oclass != WAND_CLASS) { + cant_reach_floor(u.ux, u.uy, FALSE, TRUE, FALSE); + goto doengr_exit; + } else { + You("gesture, with your wand, towards the %s below you.", + surface(u.ux, u.uy)); + initial_msg_given = TRUE; + } } if (IS_ALTAR(levl[u.ux][u.uy].typ)) { - You("make a motion towards the altar with %s.", de->writer); + if (!initial_msg_given) + You("make a motion towards the altar with %s.", de->writer); altar_wrath(u.ux, u.uy); goto doengr_exit; } @@ -1074,7 +1085,7 @@ doengrave(void) if (!de->ptext) { if (de->otmp && de->otmp->oclass == WAND_CLASS && !can_reach_floor(TRUE)) - cant_reach_floor(u.ux, u.uy, FALSE, TRUE); + cant_reach_floor(u.ux, u.uy, FALSE, TRUE, TRUE); de->ret = ECMD_TIME; goto doengr_exit; } diff --git a/src/lock.c b/src/lock.c index 2fe2a198a..2e8851754 100644 --- a/src/lock.c +++ b/src/lock.c @@ -700,7 +700,7 @@ doforce(void) return ECMD_OK; } if (!can_reach_floor(TRUE)) { - cant_reach_floor(u.ux, u.uy, FALSE, TRUE); + cant_reach_floor(u.ux, u.uy, FALSE, TRUE, FALSE); return ECMD_OK; } diff --git a/src/pickup.c b/src/pickup.c index a01283cde..b74119402 100644 --- a/src/pickup.c +++ b/src/pickup.c @@ -2051,7 +2051,7 @@ able_to_loot( if (u.usteed && P_SKILL(P_RIDING) < P_BASIC) rider_cant_reach(); /* not skilled enough to reach */ else - cant_reach_floor(x, y, FALSE, TRUE); + cant_reach_floor(x, y, FALSE, TRUE, FALSE); return FALSE; } else if ((is_pool(x, y) && (looting || !Underwater)) || is_lava(x, y)) { /* at present, can't loot in water even when Underwater;