{
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++)
{
bool unleash_mana_storm(player_type *creature_ptr, bool powerful)
{
msg_print(_("強力な魔力が敵を引き裂いた!", "Mighty magics rend your enemies!"));
- project(0, (powerful ? 7 : 5), p_ptr->y, p_ptr->x,
+ project(0, (powerful ? 7 : 5), creature_ptr->y, creature_ptr->x,
(randint1(200) + (powerful ? 500 : 300)) * 2, GF_MANA, PROJECT_KILL | PROJECT_ITEM | PROJECT_GRID, -1);
- if ((p_ptr->pclass != CLASS_MAGE) && (p_ptr->pclass != CLASS_HIGH_MAGE) && (p_ptr->pclass != CLASS_SORCERER) && (p_ptr->pclass != CLASS_MAGIC_EATER) && (p_ptr->pclass != CLASS_BLUE_MAGE))
+ if ((creature_ptr->pclass != CLASS_MAGE) && (creature_ptr->pclass != CLASS_HIGH_MAGE) && (creature_ptr->pclass != CLASS_SORCERER) && (creature_ptr->pclass != CLASS_MAGIC_EATER) && (creature_ptr->pclass != CLASS_BLUE_MAGE))
{
(void)take_hit(DAMAGE_NOESCAPE, 50, _("コントロールし難い強力な魔力の解放", "unleashing magics too mighty to control"), -1);
}
{
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;
}
}
else if (die < 111)
{
msg_print(_("《審判》だ。", "It's the Judgement."));
- do_cmd_rerate(0L);
+ roll_hitdice(0L);
lose_all_mutations();
}
else if (die < 120)
}
}
-bool_hack life_stream(bool_hack message, bool_hack virtue_change)
-{
- if(virtue_change)
- {
- chg_virtue(V_VITALITY, 1);
- chg_virtue(V_UNLIFE, -5);
- }
- if(message)
- {
- msg_print(_("体中に生命力が満ちあふれてきた!", "You feel life flow through your body!"));
- }
- restore_level();
- (void)set_poisoned(0);
- (void)set_blind(0);
- (void)set_confused(0);
- (void)set_image(0);
- (void)set_stun(0);
- (void)set_cut(0);
- (void)restore_all_status();
- (void)set_shero(0, TRUE);
- handle_stuff();
- hp_player(5000);
-
- return TRUE;
-}
-
-bool_hack heroism(int base)
-{
- bool_hack ident = FALSE;
- if(set_afraid(0)) ident = TRUE;
- if(set_hero(p_ptr->hero + randint1(base) + base, FALSE)) ident = TRUE;
- if(hp_player(10)) ident = TRUE;
- return ident;
-}
-
-bool_hack berserk(int base)
-{
- bool_hack ident = FALSE;
- if (set_afraid(0)) ident = TRUE;
- if (set_shero(p_ptr->hero + randint1(base) + base, FALSE)) ident = TRUE;
- if (hp_player(30)) ident = TRUE;
- return ident;
-}
-
-bool_hack cure_light_wounds(DICE_NUMBER dice, DICE_SID sides)
-{
- bool_hack ident = FALSE;
- if (hp_player(damroll(dice, sides))) ident = TRUE;
- if (set_blind(0)) ident = TRUE;
- if (set_cut(p_ptr->cut - 10)) ident = TRUE;
- if (set_shero(0, TRUE)) ident = TRUE;
- return ident;
-}
-
-bool_hack cure_serious_wounds(DICE_NUMBER dice, DICE_SID sides)
-{
- bool_hack ident = FALSE;
- if (hp_player(damroll(dice, sides))) ident = TRUE;
- if (set_blind(0)) ident = TRUE;
- if (set_confused(0)) ident = TRUE;
- if (set_cut((p_ptr->cut / 2) - 50)) ident = TRUE;
- if (set_shero(0, TRUE)) ident = TRUE;
- return ident;
-}
-
-bool_hack cure_critical_wounds(HIT_POINT pow)
-{
- bool_hack ident = FALSE;
- if (hp_player(pow)) ident = TRUE;
- if (set_blind(0)) ident = TRUE;
- if (set_confused(0)) ident = TRUE;
- if (set_poisoned(0)) ident = TRUE;
- if (set_stun(0)) ident = TRUE;
- if (set_cut(0)) ident = TRUE;
- if (set_shero(0, TRUE)) ident = TRUE;
- return ident;
-}
-
-bool_hack true_healing(HIT_POINT pow)
-{
- bool_hack ident = FALSE;
- if (hp_player(pow)) ident = TRUE;
- if (set_blind(0)) ident = TRUE;
- if (set_confused(0)) ident = TRUE;
- if (set_poisoned(0)) ident = TRUE;
- if (set_stun(0)) ident = TRUE;
- if (set_cut(0)) ident = TRUE;
- if (set_image(0)) ident = TRUE;
- return ident;
-}
-
-bool_hack restore_mana(bool_hack magic_eater)
-{
- bool_hack ident = FALSE;
-
- if (p_ptr->pclass == CLASS_MAGIC_EATER && magic_eater)
- {
- int i;
- for (i = 0; i < EATER_EXT * 2; i++)
- {
- p_ptr->magic_num1[i] += (p_ptr->magic_num2[i] < 10) ? EATER_CHARGE * 3 : p_ptr->magic_num2[i] * EATER_CHARGE / 3;
- if (p_ptr->magic_num1[i] > p_ptr->magic_num2[i] * EATER_CHARGE) p_ptr->magic_num1[i] = p_ptr->magic_num2[i] * EATER_CHARGE;
- }
- for (; i < EATER_EXT * 3; i++)
- {
- KIND_OBJECT_IDX k_idx = lookup_kind(TV_ROD, i - EATER_EXT * 2);
- p_ptr->magic_num1[i] -= ((p_ptr->magic_num2[i] < 10) ? EATER_ROD_CHARGE * 3 : p_ptr->magic_num2[i] * EATER_ROD_CHARGE / 3)*k_info[k_idx].pval;
- if (p_ptr->magic_num1[i] < 0) p_ptr->magic_num1[i] = 0;
- }
- msg_print(_("頭がハッキリとした。", "You feel your head clear."));
- p_ptr->window |= (PW_PLAYER);
- ident = TRUE;
- }
- else if (p_ptr->csp < p_ptr->msp)
- {
- p_ptr->csp = p_ptr->msp;
- p_ptr->csp_frac = 0;
- msg_print(_("頭がハッキリとした。", "You feel your head clear."));
- p_ptr->redraw |= (PR_MANA);
- p_ptr->window |= (PW_PLAYER);
- p_ptr->window |= (PW_SPELL);
- ident = TRUE;
- }
-
- return ident;
-}
-
-bool restore_all_status(void)
-{
- bool ident = FALSE;
- if (do_res_stat(A_STR)) ident = TRUE;
- if (do_res_stat(A_INT)) ident = TRUE;
- if (do_res_stat(A_WIS)) ident = TRUE;
- if (do_res_stat(A_DEX)) ident = TRUE;
- if (do_res_stat(A_CON)) ident = TRUE;
- if (do_res_stat(A_CHR)) ident = TRUE;
- return ident;
-}
-
/*!
* @brief 口を使う継続的な処理を中断する
* @return なし
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++)
{
bool confusing_light(player_type *creature_ptr)
{
msg_print(_("辺りを睨んだ...", "You glare nearby monsters..."));
- slow_monsters(p_ptr->lev);
- stun_monsters(p_ptr->lev * 4);
- confuse_monsters(p_ptr->lev * 4);
- turn_monsters(p_ptr->lev * 4);
- stasis_monsters(p_ptr->lev * 4);
+ slow_monsters(creature_ptr->lev);
+ stun_monsters(creature_ptr->lev * 4);
+ confuse_monsters(creature_ptr->lev * 4);
+ turn_monsters(creature_ptr->lev * 4);
+ stasis_monsters(creature_ptr->lev * 4);
return TRUE;
}