Wand of probing reveals map locations in ray path
This commit is contained in:
@@ -1236,6 +1236,7 @@ a pet that was poison resistant but not stoning resistant would eat Medusa's
|
||||
ring of hunger prevents choking on your food
|
||||
paranoid_confirm:pray can be changed to require yes/no response instead of y/n
|
||||
by also setting paranoid_confirm:Confirm
|
||||
wand of probing reveals map locations in the ray path
|
||||
|
||||
|
||||
Fixes to 3.7.0-x General Problems Exposed Via git Repository
|
||||
|
||||
@@ -354,6 +354,7 @@ extern int monster_detect(struct obj *, int);
|
||||
extern int trap_detect(struct obj *);
|
||||
extern const char *level_distance(d_level *);
|
||||
extern void use_crystal_ball(struct obj **);
|
||||
extern void show_map_spot(coordxy, coordxy, boolean);
|
||||
extern void do_mapping(void);
|
||||
extern void do_vicinity_map(struct obj *);
|
||||
extern void cvt_sdoor_to_door(struct rm *);
|
||||
|
||||
11
src/detect.c
11
src/detect.c
@@ -23,7 +23,6 @@ static void sense_trap(struct trap *, coordxy, coordxy, int);
|
||||
static int detect_obj_traps(struct obj *, boolean, int);
|
||||
static void display_trap_map(struct trap *, int);
|
||||
static int furniture_detect(void);
|
||||
static void show_map_spot(coordxy, coordxy);
|
||||
static void findone(coordxy, coordxy, genericptr_t);
|
||||
static void openone(coordxy, coordxy, genericptr_t);
|
||||
static int mfind0(struct monst *, boolean);
|
||||
@@ -1323,15 +1322,15 @@ use_crystal_ball(struct obj **optr)
|
||||
return;
|
||||
}
|
||||
|
||||
static void
|
||||
show_map_spot(coordxy x, coordxy y)
|
||||
void
|
||||
show_map_spot(coordxy x, coordxy y, boolean cnf)
|
||||
{
|
||||
struct rm *lev;
|
||||
struct trap *t;
|
||||
struct engr *ep;
|
||||
int oldglyph;
|
||||
|
||||
if (Confusion && rn2(7))
|
||||
if (cnf && rn2(7))
|
||||
return;
|
||||
lev = &levl[x][y];
|
||||
|
||||
@@ -1379,7 +1378,7 @@ do_mapping(void)
|
||||
unconstrained = unconstrain_map();
|
||||
for (zx = 1; zx < COLNO; zx++)
|
||||
for (zy = 0; zy < ROWNO; zy++)
|
||||
show_map_spot(zx, zy);
|
||||
show_map_spot(zx, zy, Confusion);
|
||||
|
||||
if (!gl.level.flags.hero_memory || unconstrained) {
|
||||
flush_screen(1); /* flush temp screen */
|
||||
@@ -1452,7 +1451,7 @@ do_vicinity_map(struct obj *sobj) /* scroll--actually fake spellbook--object */
|
||||
for (zy = lo_y; zy <= hi_y; zy++) {
|
||||
oldglyph = glyph_at(zx, zy);
|
||||
/* this will remove 'remembered, unseen mon' (and objects) */
|
||||
show_map_spot(zx, zy);
|
||||
show_map_spot(zx, zy, Confusion);
|
||||
/* if there are any objects here, see the top one */
|
||||
if (OBJ_AT(zx, zy)) {
|
||||
/* not vobj_at(); this is not vision-based access;
|
||||
|
||||
16
src/zap.c
16
src/zap.c
@@ -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()?] */
|
||||
|
||||
Reference in New Issue
Block a user