Wand of probing reveals map locations in ray path

This commit is contained in:
Pasi Kallinen
2023-09-18 19:20:01 +03:00
parent 4f2c913925
commit 44a649b0b4
4 changed files with 23 additions and 6 deletions

View File

@@ -3639,6 +3639,22 @@ bhit(
}
if (learn_it)
learnwand(obj);
} else if (weapon == ZAPPED_WAND) {
boolean learn_it = FALSE;
if (obj->otyp == WAN_PROBING) {
if (!cansee(x, y)) {
int oldglyph = glyph_at(x, y);
show_map_spot(x, y, FALSE);
if (oldglyph != glyph_at(x, y)) {
/* TODO: need to give some message */
learn_it = TRUE;
}
}
}
if (learn_it)
learnwand(obj);
}
/* [shouldn't this trap handling be in zap_over_floor()?] */