Skip to content

Commit

Permalink
Fix: Mention locked/empty status of magic chest when walking on it
Browse files Browse the repository at this point in the history
From EvilHack commit f503b90a0c.
Also, fix up the behaviour for blind characters---it gave redundant messages if other objects were on the square.
  • Loading branch information
elunna committed Oct 30, 2023
1 parent 04a9069 commit eca79e7
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/hack.c
Original file line number Diff line number Diff line change
Expand Up @@ -2769,10 +2769,14 @@ boolean pick;
done(DIED);
}
if (IS_MAGIC_CHEST(levl[u.ux][u.uy].typ) && !Levitation) {
char *tmp = doname(mchest);
if (!Blind)
You("see here a magic chest.");
else
You("feel here a magic chest.");
You("see here %s.", tmp);
/* magic chest is already mentioned if objects are on square */
else if (!OBJ_AT(u.ux, u.uy))
You("feel here %s.", tmp);
/* release doname's obuf, just in case */
maybereleaseobuf(tmp);
}
spotdone:
if (!--inspoteffects) {
Expand Down

0 comments on commit eca79e7

Please sign in to comment.