{
POSITION x, y;
bool detect = FALSE;
- cave_type *c_ptr;
+ grid_type *c_ptr;
- if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
+ if (d_info[p_ptr->dungeon_idx].flags1 & DF1_DARKNESS) range /= 3;
/* Scan the current panel */
for (y = 1; y < cur_hgt - 1; y++)
bool detect = FALSE;
- if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range2 /= 3;
+ if (d_info[p_ptr->dungeon_idx].flags1 & DF1_DARKNESS) range2 /= 3;
/* Scan objects */
for (i = 1; i < o_max; i++)
bool detect = FALSE;
- if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range2 /= 3;
+ if (d_info[p_ptr->dungeon_idx].flags1 & DF1_DARKNESS) range2 /= 3;
/* Scan objects */
for (i = 1; i < o_max; i++)
bool detect = FALSE;
- if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
+ if (d_info[p_ptr->dungeon_idx].flags1 & DF1_DARKNESS) range /= 3;
/* Scan all objects */
for (i = 1; i < o_max; i++)
POSITION y, x;
bool flag = FALSE;
- if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
+ if (d_info[p_ptr->dungeon_idx].flags1 & DF1_DARKNESS) range /= 3;
for (i = 1; i < m_max; i++)
{
POSITION y, x;
bool flag = FALSE;
- if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
+ if (d_info[p_ptr->dungeon_idx].flags1 & DF1_DARKNESS) range /= 3;
for (i = 1; i < m_max; i++)
{
POSITION y, x;
bool flag = FALSE;
- if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
+ if (d_info[p_ptr->dungeon_idx].flags1 & DF1_DARKNESS) range /= 3;
for (i = 1; i < m_max; i++)
{
POSITION y, x;
bool flag = FALSE;
- if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
+ if (d_info[p_ptr->dungeon_idx].flags1 & DF1_DARKNESS) range /= 3;
for (i = 1; i < m_max; i++)
{
POSITION y, x;
bool flag = FALSE;
- if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
+ if (d_info[p_ptr->dungeon_idx].flags1 & DF1_DARKNESS) range /= 3;
for (i = 1; i < m_max; i++)
{
POSITION y, x;
bool flag = FALSE;
- if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
+ if (d_info[p_ptr->dungeon_idx].flags1 & DF1_DARKNESS) range /= 3;
for (i = 1; i < m_max; i++)
{
bool flag = FALSE;
concptr desc_monsters = _("変なモンスター", "weird monsters");
- if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
+ if (d_info[p_ptr->dungeon_idx].flags1 & DF1_DARKNESS) range /= 3;
for (i = 1; i < m_max; i++)
{
{
POSITION y, x;
int k, t;
- cave_type *c_ptr;
+ grid_type *c_ptr;
bool flag = FALSE;
/* Prevent destruction of quest levels and town */
else
{
/* Create floor */
- cave_set_feat(y, x, floor_type[randint0(100)]);
+ cave_set_feat(y, x, feat_ground_type[randint0(100)]);
}
}
else /* In generation */
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))
+ else if (!(d_info[p_ptr->dungeon_idx].flags1 & DF1_DARKNESS))
{
DIRECTION i;
POSITION yy, xx;
- cave_type *cc_ptr;
+ grid_type *cc_ptr;
for (i = 0; i < 9; i++)
{
int sn = 0;
POSITION sy = 0, sx = 0;
bool hurt = FALSE;
- cave_type *c_ptr;
+ grid_type *c_ptr;
bool map[32][32];
/* Prevent destruction of quest levels and town */
else
{
/* Create floor */
- cave_set_feat(yy, xx, floor_type[randint0(100)]);
+ cave_set_feat(yy, xx, feat_ground_type[randint0(100)]);
}
}
}
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))
+ else if (!(d_info[p_ptr->dungeon_idx].flags1 & DF1_DARKNESS))
{
DIRECTION ii;
POSITION yyy, xxx;
- cave_type *cc_ptr;
+ grid_type *cc_ptr;
for (ii = 0; ii < 9; ii++)
{
POSITION y = temp_y[i];
POSITION x = temp_x[i];
- cave_type *c_ptr = &cave[y][x];
+ grid_type *c_ptr = &cave[y][x];
/* No longer in the array */
c_ptr->info &= ~(CAVE_TEMP);
POSITION x = temp_x[i];
int j;
- cave_type *c_ptr = &cave[y][x];
+ grid_type *c_ptr = &cave[y][x];
bool do_dark = !is_mirror_grid(c_ptr);
/* No longer in the array */
if (in_bounds2(by, bx))
{
- cave_type *cc_ptr = &cave[by][bx];
+ grid_type *cc_ptr = &cave[by][bx];
if (have_flag(f_info[get_feat_mimic(cc_ptr)].flags, FF_GLOW))
{
*/
static void cave_temp_room_aux(POSITION y, POSITION x, bool only_room, bool (*pass_bold)(POSITION, POSITION))
{
- cave_type *c_ptr;
+ grid_type *c_ptr;
/* Get the grid */
c_ptr = &cave[y][x];
if (!player_bold(y, x)) break;
}
- project(0, 0, p_ptr->y, p_ptr->x, damroll(6 + p_ptr->lev / 8, 10), GF_LITE_WEAK,
+ project(0, 0, y, x, damroll(6 + p_ptr->lev / 8, 10), GF_LITE_WEAK,
(PROJECT_BEAM | PROJECT_THRU | PROJECT_GRID | PROJECT_KILL | PROJECT_LOS), -1);
}
return TRUE;
{
BIT_FLAGS flg = PROJECT_GRID | PROJECT_KILL;
- if (d_info[dungeon_type].flags1 & DF1_DARKNESS)
+ if (d_info[p_ptr->dungeon_idx].flags1 & DF1_DARKNESS)
{
msg_print(_("ダンジョンが光を吸収した。", "The darkness of this dungeon absorb your light."));
return FALSE;
}
- /* Hack -- Message */
if (!p_ptr->blind)
{
msg_print(_("白い光が辺りを覆った。", "You are surrounded by a white light."));
/* Hook into the "project()" function */
(void)project(0, rad, p_ptr->y, p_ptr->x, dam, GF_LITE_WEAK, flg, -1);
- /* Lite up the room */
lite_room(p_ptr->y, p_ptr->x);
/* Assume seen */
/* Hook into the "project()" function */
(void)project(0, rad, p_ptr->y, p_ptr->x, dam, GF_DARK_WEAK, flg, -1);
- /* Lite up the room */
unlite_room(p_ptr->y, p_ptr->x);
/* Assume seen */
bool teleport_swap(DIRECTION dir)
{
POSITION tx, ty;
- cave_type* c_ptr;
+ grid_type* c_ptr;
monster_type* m_ptr;
monster_race* r_ptr;
if (!c_ptr->m_idx || (c_ptr->m_idx == p_ptr->riding))
{
msg_print(_("それとは場所を交換できません。", "You can't trade places with that!"));
-
- /* Failure */
return FALSE;
}
if ((c_ptr->info & CAVE_ICKY) || (distance(ty, tx, p_ptr->y, p_ptr->x) > p_ptr->lev * 3 / 2 + 10))
{
msg_print(_("失敗した。", "Failed to swap."));
-
- /* Failure */
return FALSE;
}
if (r_ptr->flagsr & RFR_RES_TELE)
{
msg_print(_("テレポートを邪魔された!", "Your teleportation is blocked!"));
-
if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= RFR_RES_TELE;
-
- /* Failure */
return FALSE;
}
bool wall_stone(void)
{
BIT_FLAGS flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_HIDE;
-
bool dummy = (project(0, 1, p_ptr->y, p_ptr->x, 0, GF_STONE_WALL, flg, -1));
-
p_ptr->update |= (PU_FLOW);
-
p_ptr->redraw |= (PR_MAP);
-
return dummy;
}
*/
bool activate_ty_curse(bool stop_ty, int *count)
{
- int i = 0;
-
+ int i = 0;
BIT_FLAGS flg = (PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL | PROJECT_JUMP);
do
return count;
}
-
-/*!
- * @brief サイバーデーモンの召喚
- * @param who 召喚主のモンスターID(0ならばプレイヤー)
- * @param y 召喚位置Y座標
- * @param x 召喚位置X座標
- * @return 作用が実際にあった場合TRUEを返す
- */
-int summon_cyber(MONSTER_IDX who, POSITION y, POSITION x)
-{
- int i;
- int max_cyber = (easy_band ? 1 : (dun_level / 50) + randint1(2));
- int count = 0;
- BIT_FLAGS mode = PM_ALLOW_GROUP;
-
- /* Summoned by a monster */
- if (who > 0)
- {
- monster_type *m_ptr = &m_list[who];
- if (is_pet(m_ptr)) mode |= PM_FORCE_PET;
- }
-
- if (max_cyber > 4) max_cyber = 4;
-
- for (i = 0; i < max_cyber; i++)
- {
- count += summon_specific(who, y, x, 100, SUMMON_CYBER, mode, '\0');
- }
-
- return count;
-}
-
/*!
* @brief 周辺破壊効果(プレイヤー中心)
* @return 作用が実際にあった場合TRUEを返す
case 3:
{
msg_print(_("あなたは強力なオーラに包み込まれた。", "You are surrounded by a powerful aura."));
-
- /* Dispel monsters */
dispel_monsters(1000);
-
break;
}
case 5:
case 6:
{
- /* Mana Ball */
fire_ball(GF_MANA, dir, 600, 3);
-
break;
}
case 9:
case 10:
{
- /* Mana Bolt */
fire_bolt(GF_MANA, dir, 500);
-
break;
}
}
DIRECTION dir;
POSITION x, y;
int dummy;
- cave_type *c_ptr;
+ grid_type *c_ptr;
- if (d_info[dungeon_type].flags1 & DF1_NO_MELEE)
+ if (d_info[p_ptr->dungeon_idx].flags1 & DF1_NO_MELEE)
{
msg_print(_("なぜか攻撃することができない。", "Something prevent you from attacking."));
return FALSE;
}
else
{
- cave_type *c_ptr = &cave[creature_ptr->y][creature_ptr->x];
+ grid_type *c_ptr = &cave[creature_ptr->y][creature_ptr->x];
feature_type *f_ptr = &f_info[c_ptr->feat];
if (!have_flag(f_ptr->flags, FF_PROJECT) ||
{
msg_print(_("変換に失敗した。", "You failed to convert."));
}
- /* Redraw mana and hp */
creature_ptr->redraw |= (PR_HP | PR_MANA);
return TRUE;
}
DIRECTION dir;
POSITION y = 0, x = 0;
int i;
- cave_type *c_ptr;
+ grid_type *c_ptr;
for (i = 0; i < 6; i++)
{