以下の修正を含む.
* update_mon_lite()内で, 限界の距離はモンスターのループ以前に計算して
おくように修正.
* 性格いかさまの忍者で, 'C'表示で自分自身に光源があるように表示されて
いたバグを修正.
/* Require line of sight to the grid */
if (!player_has_los_bold(y, x)) return (FALSE);
- /* Ninja or Vampire without lite */
- if (p_ptr->see_nocto > p_ptr->cur_lite)
- {
- if (p_ptr->see_nocto == MAX_SIGHT) return TRUE;
- else
- {
- if ((y >= (py - 1)) && (y <= (py + 1)) && (x >= (px - 1)) && (x <= (px + 1))) return TRUE;
- }
- }
+ /* Noctovision of Ninja */
+ if (p_ptr->see_nocto) return TRUE;
/* Require "perma-lite" of the grid */
if (!(c_ptr->info & CAVE_MNLT) && ((c_ptr->info & (CAVE_GLOW | CAVE_MNDK)) != CAVE_GLOW)) return FALSE;
byte a;
byte c;
- bool can_see_dark_grid;
-
/* Get the cave */
c_ptr = &cave[y][x];
/* Floors (etc) */
if ((feat <= FEAT_INVIS) || (feat == FEAT_DIRT) || (feat == FEAT_GRASS))
{
- /* Normal */
- if (p_ptr->see_nocto <= p_ptr->cur_lite) can_see_dark_grid = FALSE;
-
- /* Ninja or Vampire without lite */
- else
- {
- if (p_ptr->see_nocto == MAX_SIGHT) can_see_dark_grid = TRUE;
- else
- {
- if ((y < (py - 1)) || (y > (py + 1)) || (x < (px - 1)) || (x > (px + 1))) can_see_dark_grid = FALSE;
- else can_see_dark_grid = TRUE;
- }
- }
-
/* Memorized (or visible) floor */
if ((c_ptr->info & CAVE_MARK) ||
(((c_ptr->info & (CAVE_LITE | CAVE_MNLT)) ||
((c_ptr->info & CAVE_VIEW) &&
- (((c_ptr->info & (CAVE_GLOW | CAVE_MNDK)) == CAVE_GLOW) || can_see_dark_grid))) &&
+ (((c_ptr->info & (CAVE_GLOW | CAVE_MNDK)) == CAVE_GLOW) || p_ptr->see_nocto))) &&
!p_ptr->blind))
{
/* Access floor */
/* Require "perma-lite" of the grid */
if (!(c_ptr->info & CAVE_MNLT) && ((c_ptr->info & (CAVE_GLOW | CAVE_MNDK)) != CAVE_GLOW))
{
- /* Neither Ninja nor Vampire without lite */
- if (p_ptr->see_nocto <= p_ptr->cur_lite) return;
-
- /* Hack -- Vampires' noctovision is limited to adjacent grids */
- else if (p_ptr->see_nocto == 1)
- {
- if ((y < (py - 1)) || (y > (py + 1)) || (x < (px - 1)) || (x > (px + 1))) return;
- }
+ /* Not Ninja */
+ if (!p_ptr->see_nocto) return;
}
}
c_ptr->info |= (CAVE_MARK);
}
- /* Mwemorize walls seen by noctovision of Ninja or Vampire */
+ /* Memorize walls seen by noctovision of Ninja */
else if (p_ptr->see_nocto)
{
/* Memorize */
s16b end_temp;
/* Non-Ninja player in the darkness */
- bool in_darkness = (d_info[dungeon_type].flags1 & DF1_DARKNESS) && (p_ptr->see_nocto < MAX_SIGHT);
+ int dis_lim = ((d_info[dungeon_type].flags1 & DF1_DARKNESS) && !p_ptr->see_nocto) ?
+ (MAX_SIGHT / 2 + 1) : (MAX_SIGHT + 3);
/* Clear all monster lit squares */
for (i = 0; i < mon_lite_n; i++)
if (!m_ptr->r_idx) continue;
/* Is it too far away? */
- if (m_ptr->cdis > (in_darkness ? MAX_SIGHT / 2 + 1 : MAX_SIGHT + 3)) continue;
+ if (m_ptr->cdis > dis_lim) continue;
/* Get lite radius */
rad = 0;
/* None left */
temp_n = 0;
-
- /*** Step 6 -- Vampires hack if without lite ***/
-
- if ((p_ptr->see_nocto == 1) && !p_ptr->cur_lite && !p_ptr->blind)
- {
- /* Hack -- Vampires' noctovision is limited to adjacent grids */
- for (n = 0; n < 9; n++)
- {
- y = py + ddy_ddd[n];
- x = px + ddx_ddd[n];
-
- /* Access the grid */
- c_ptr = &cave[y][x];
-
- /* Add it to later visual update */
- cave_note_and_redraw_later(c_ptr, y, x);
- }
- }
-
/* Mega-Hack -- Visual update later */
p_ptr->update |= (PU_DELAY_VIS);
}
add_flag(flgs, TR_HOLD_LIFE);
add_flag(flgs, TR_RES_DARK);
add_flag(flgs, TR_RES_NETHER);
+ if (p_ptr->pclass != CLASS_NINJA) add_flag(flgs, TR_LITE);
add_flag(flgs, TR_RES_POIS);
add_flag(flgs, TR_RES_COLD);
add_flag(flgs, TR_SEE_INVIS);
add_flag(flgs, TR_HOLD_LIFE);
add_flag(flgs, TR_RES_DARK);
add_flag(flgs, TR_RES_NETHER);
+ if (p_ptr->pclass != CLASS_NINJA) add_flag(flgs, TR_LITE);
add_flag(flgs, TR_RES_POIS);
add_flag(flgs, TR_RES_COLD);
break;
add_flag(flgs, TR_RES_BLIND);
add_flag(flgs, TR_RES_CONF);
add_flag(flgs, TR_HOLD_LIFE);
- add_flag(flgs, TR_LITE);
+ if (p_ptr->pclass != CLASS_NINJA) add_flag(flgs, TR_LITE);
if (p_ptr->lev > 9)
add_flag(flgs, TR_SPEED);
}
bool easy = FALSE;
/* Non-Ninja player in the darkness */
- bool in_darkness = (d_info[dungeon_type].flags1 & DF1_DARKNESS) && (p_ptr->see_nocto < MAX_SIGHT);
+ bool in_darkness = (d_info[dungeon_type].flags1 & DF1_DARKNESS) && !p_ptr->see_nocto;
/* Do disturb? */
if (disturb_high)
bool heavy_spell;
bool warning;
bool mighty_throw;
+ bool see_nocto; /* Noctovision */
s16b to_dd[2]; /* Extra dice/sides */
s16b to_ds[2];
s16b ac; /* Base ac */
s16b see_infra; /* Infravision range */
- s16b see_nocto; /* Noctovision range */
s16b skill_dis; /* Skill: Disarming */
s16b skill_dev; /* Skill: Magic Devices */
p_ptr->anti_tele = FALSE;
p_ptr->warning = FALSE;
p_ptr->mighty_throw = FALSE;
+ p_ptr->see_nocto = FALSE;
p_ptr->immune_acid = FALSE;
p_ptr->immune_elec = FALSE;
/* Base infravision (purely racial) */
p_ptr->see_infra = tmp_rp_ptr->infra;
- /* Base noctovision (If player is neither Ninja nor Vampire, always 0) */
- p_ptr->see_nocto = 0;
-
/* Base skill -- disarming */
p_ptr->skill_dis = tmp_rp_ptr->r_dis + cp_ptr->c_dis + ap_ptr->a_dis;
p_ptr->oppose_pois = 1;
p_ptr->redraw |= PR_STATUS;
}
- if (p_ptr->see_nocto < MAX_SIGHT) p_ptr->see_nocto = MAX_SIGHT;
+ p_ptr->see_nocto = TRUE;
break;
}
new_speed += 3;
p_ptr->to_a += 10;
p_ptr->dis_to_a += 10;
- if (p_ptr->see_nocto < 1) p_ptr->see_nocto = 1;
+ if (p_ptr->pclass != CLASS_NINJA) p_ptr->lite = TRUE;
break;
}
}
p_ptr->resist_neth = TRUE;
p_ptr->resist_cold = TRUE;
p_ptr->resist_pois = TRUE;
- if (p_ptr->see_nocto < 1) p_ptr->see_nocto = 1;
+ if (p_ptr->pclass != CLASS_NINJA) p_ptr->lite = TRUE;
break;
case RACE_SPECTRE:
p_ptr->ffall = TRUE;
p_ptr->resist_blind = TRUE;
p_ptr->resist_conf = TRUE;
p_ptr->hold_life = TRUE;
- if (!p_ptr->see_nocto) p_ptr->lite = TRUE;
+ if (p_ptr->pclass != CLASS_NINJA) p_ptr->lite = TRUE;
if ((p_ptr->prace != RACE_KLACKON) && (p_ptr->prace != RACE_SPRITE))
/* Munchkin become faster */