adjust levitation wand engraving wording slightly

This commit is contained in:
nhmall
2025-07-13 21:37:35 -04:00
parent e240efa10b
commit 0db013c08e
6 changed files with 29 additions and 18 deletions

View File

@@ -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);

View File

@@ -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)) {

View File

@@ -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 */

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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;