if (!in_generate) /* Normal */
{
- /* Lose unsafety and runes/mirrors */
- c_ptr->info &= ~(CAVE_UNSAFE | CAVE_OBJECT);
+ /* Lose unsafety */
+ c_ptr->info &= ~(CAVE_UNSAFE);
/* Hack -- Notice player affect */
if (player_bold(y, x))
}
}
-
if (!in_generate)
{
+ /* Process "re-glowing" */
+ for (y = (y1 - r); y <= (y1 + r); y++)
+ {
+ for (x = (x1 - r); x <= (x1 + r); x++)
+ {
+ /* Skip illegal grids */
+ if (!in_bounds(y, x)) continue;
+
+ /* Extract the distance */
+ k = distance(y1, x1, y, x);
+
+ /* Stay in the circle of death */
+ if (k > r) continue;
+
+ /* Access the grid */
+ c_ptr = &cave[y][x];
+
+ if (is_mirror_grid(c_ptr)) c_ptr->info |= CAVE_GLOW;
+ else if (!(d_info[dungeon_type].flags1 & DF1_DARKNESS))
+ {
+ int i, yy, xx;
+ cave_type *cc_ptr;
+
+ for (i = 0; i < 9; i++)
+ {
+ yy = y + ddy_ddd[i];
+ xx = x + ddx_ddd[i];
+ if (!in_bounds2(yy, xx)) continue;
+ cc_ptr = &cave[yy][xx];
+ if (have_flag(f_info[get_feat_mimic(cc_ptr)].flags, FF_GLOW))
+ {
+ c_ptr->info |= CAVE_GLOW;
+ break;
+ }
+ }
+ }
+ }
+ }
+
/* Hack -- Affect player */
if (flag)
{
/* Become blind */
(void)set_blind(p_ptr->blind + 10 + randint1(10));
}
-
- if ((p_ptr->pclass == CLASS_NINJA) && (p_ptr->cur_lite <= 0))
- {
- if (!(cave[py][px].info & CAVE_GLOW)) set_superstealth(TRUE);
- }
}
forget_flow();
p_ptr->update |= (PU_UN_VIEW | PU_UN_LITE);
/* Update stuff */
- p_ptr->update |= (PU_VIEW | PU_LITE | PU_FLOW | PU_MON_LITE);
-
- /* Update the monsters */
- p_ptr->update |= (PU_MONSTERS);
+ p_ptr->update |= (PU_VIEW | PU_LITE | PU_FLOW | PU_MON_LITE | PU_MONSTERS);
/* Redraw map */
p_ptr->redraw |= (PR_MAP);
/* Window stuff */
p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
+
+ if (p_ptr->special_defense & NINJA_S_STEALTH)
+ {
+ if (cave[py][px].info & CAVE_GLOW) set_superstealth(FALSE);
+ }
}
/* Success */
}
- if ((p_ptr->pclass == CLASS_NINJA) && (p_ptr->cur_lite <= 0))
- {
- if (!(cave[py][px].info & CAVE_GLOW)) set_superstealth(TRUE);
- }
-
/* Examine the quaked region */
for (dy = -r; dy <= r; dy++)
{
/* Delete objects */
delete_object(yy, xx);
- /* Clear mirror, runes flag */
- c_ptr->info &= ~CAVE_OBJECT;
-
/* Wall (or floor) type */
t = cave_have_flag_bold(yy, xx, FF_PROJECT) ? randint0(100) : 200;
}
+ /* Process "re-glowing" */
+ for (dy = -r; dy <= r; dy++)
+ {
+ for (dx = -r; dx <= r; dx++)
+ {
+ /* Extract the location */
+ yy = cy + dy;
+ xx = cx + dx;
+
+ /* Skip illegal grids */
+ if (!in_bounds(yy, xx)) continue;
+
+ /* Skip distant grids */
+ if (distance(cy, cx, yy, xx) > r) continue;
+
+ /* Access the grid */
+ c_ptr = &cave[yy][xx];
+
+ if (is_mirror_grid(c_ptr)) c_ptr->info |= CAVE_GLOW;
+ else if (!(d_info[dungeon_type].flags1 & DF1_DARKNESS))
+ {
+ int ii, yyy, xxx;
+ cave_type *cc_ptr;
+
+ for (ii = 0; ii < 9; ii++)
+ {
+ yyy = yy + ddy_ddd[ii];
+ xxx = xx + ddx_ddd[ii];
+ if (!in_bounds2(yyy, xxx)) continue;
+ cc_ptr = &cave[yyy][xxx];
+ if (have_flag(f_info[get_feat_mimic(cc_ptr)].flags, FF_GLOW))
+ {
+ c_ptr->info |= CAVE_GLOW;
+ break;
+ }
+ }
+ }
+ }
+ }
+
+
/* Mega-Hack -- Forget the view and lite */
p_ptr->update |= (PU_UN_VIEW | PU_UN_LITE);
/* Update stuff */
- p_ptr->update |= (PU_VIEW | PU_LITE | PU_FLOW | PU_MON_LITE);
-
- /* Update the monsters */
- p_ptr->update |= (PU_DISTANCE);
+ p_ptr->update |= (PU_VIEW | PU_LITE | PU_FLOW | PU_MON_LITE | PU_MONSTERS);
/* Update the health bar */
p_ptr->redraw |= (PR_HEALTH | PR_UHEALTH);
/* Window stuff */
p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
+ if (p_ptr->special_defense & NINJA_S_STEALTH)
+ {
+ if (cave[py][px].info & CAVE_GLOW) set_superstealth(FALSE);
+ }
+
/* Success */
return (TRUE);
}
/* Darken the grid */
if (do_dark)
{
- if (!p_ptr->inside_arena)
+ for (j = 0; j < 9; j++)
{
- for (j = 0; j < 9; j++)
+ int by = y + ddy_ddd[j];
+ int bx = x + ddx_ddd[j];
+
+ if (in_bounds2(by, bx))
{
- int by = y + ddy_ddd[j];
- int bx = x + ddx_ddd[j];
+ cave_type *cc_ptr = &cave[by][bx];
- if (in_bounds2(by, bx))
+ if (have_flag(f_info[get_feat_mimic(cc_ptr)].flags, FF_GLOW))
{
- cave_type *cc_ptr = &cave[by][bx];
-
- if (have_flag(f_info[get_feat_mimic(cc_ptr)].flags, FF_GLOW))
- {
- do_dark = FALSE;
- break;
- }
+ do_dark = FALSE;
+ break;
}
}
-
- if (!do_dark) continue;
}
+ if (!do_dark) continue;
+
c_ptr->info &= ~(CAVE_GLOW);
/* Hack -- Forget "boring" grids */
/* Now, darken them all at once */
cave_temp_room_unlite();
-
- if ((p_ptr->pclass == CLASS_NINJA) && (p_ptr->cur_lite <= 0))
- {
- if (!(cave[py][px].info & CAVE_GLOW)) set_superstealth(TRUE);
- }
}
bool dummy = (project(0, 1, py, px, 0, GF_STONE_WALL, flg, -1));
/* Update stuff */
- p_ptr->update |= (PU_VIEW | PU_LITE | PU_FLOW | PU_MON_LITE);
-
- /* Update the monsters */
- p_ptr->update |= (PU_MONSTERS);
+ p_ptr->update |= (PU_FLOW);
/* Redraw map */
p_ptr->redraw |= (PR_MAP);
- /* Window stuff */
- p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
-
return dummy;
}