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