fix github issue #614 - applying polearm at doors
Reported by G7Nation; attacking walls and such with a polearm just
gave lackluster "you miss; nobody's there" feedback.
Make applying a polearm at some non-monster locations give feedback
similar to using 'F'orcefight with melee weapons. Was
|You miss; there is no one there to hit.
now
|You uselessly attack the closed door.
Also, extend the supported locations to include dungeon furniture.
Was
|You attack thin air. ('F')
now
|You harmlessly attack the throne. ('F')
|You uselessly attack the throne. ('a')
This doesn't address #613: attempting to hit non-visible locations
with an applied polearm.
Closes #614
This commit is contained in:
14
src/hack.c
14
src/hack.c
@@ -1815,7 +1815,7 @@ domove_core(void)
|
||||
|| (glyph_is_invisible(glyph) && !g.context.nopick)) {
|
||||
struct obj *boulder = 0;
|
||||
boolean explo = (Upolyd && attacktype(g.youmonst.data, AT_EXPL)),
|
||||
solid = !accessible(x, y);
|
||||
solid = (!accessible(x, y) || IS_FURNITURE(levl[x][y].typ));
|
||||
char buf[BUFSZ];
|
||||
|
||||
if (!Underwater) {
|
||||
@@ -1859,15 +1859,17 @@ domove_core(void)
|
||||
: "nothing");
|
||||
} else if (solid) {
|
||||
/* glyph might indicate unseen terrain if hero is blind;
|
||||
unlike searching, this won't reveal what that terrain is
|
||||
(except for solid rock, where the glyph would otherwise
|
||||
yield ludicrous "dark part of a room") */
|
||||
Strcpy(buf, (levl[x][y].typ == STONE) ? "solid rock"
|
||||
unlike searching, this won't reveal what that terrain is;
|
||||
3.7: used to say "solid rock" for the stone case, but that
|
||||
made it be different from unmapped walls outside of rooms */
|
||||
Strcpy(buf, (levl[x][y].typ == STONE || levl[x][y].typ == SCORR)
|
||||
? "stone"
|
||||
: glyph_is_cmap(glyph)
|
||||
? the(defsyms[glyph_to_cmap(glyph)].explanation)
|
||||
: (const char *) "an unknown obstacle");
|
||||
/* note: 'solid' is misleadingly named and catches pools
|
||||
of water and lava as well as rock and walls */
|
||||
of water and lava as well as rock and walls;
|
||||
3.7: furniture too */
|
||||
} else {
|
||||
Strcpy(buf, "thin air");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user