/* No longer hidden */
g_ptr->mimic = 0;
- note_spot(y, x);
- lite_spot(y, x);
+ note_spot(trapped_ptr, y, x);
+ lite_spot(trapped_ptr, y, x);
}
}
(void)set_cut(trapped_ptr,trapped_ptr->cut + randint1(dam));
if (trap_feat_type == TRAP_POISON_PIT) {
- if (trapped_ptr->resist_pois || IS_OPPOSE_POIS())
+ if (trapped_ptr->resist_pois || is_oppose_pois(trapped_ptr))
{
msg_print(_("しかし毒の影響はなかった!", "The poison does not affect you!"));
}
}
}
-static void hit_trap_set_abnormal_status_p(concptr trap_message, bool resist, bool(*set_status)(player_type *, IDX), IDX turn_aux)
+static void hit_trap_set_abnormal_status_p(player_type *trapped_ptr, concptr trap_message, bool resist, bool(*set_status)(player_type *, IDX), IDX turn_aux)
{
msg_print(trap_message);
if (!resist)
{
- set_status(p_ptr, turn_aux);
+ set_status(trapped_ptr, turn_aux);
}
}
if (autosave_l && (trapped_ptr->chp >= 0))
do_cmd_save_game(trapped_ptr, TRUE);
- exe_write_diary(trapped_ptr, NIKKI_BUNSHOU, 0, _("落とし戸に落ちた", "You have fallen through a trap door!"));
+ exe_write_diary(trapped_ptr, DIARY_DESCRIPTION, 0, _("落とし戸に落ちた", "You have fallen through a trap door!"));
prepare_change_floor_mode(trapped_ptr, CFM_SAVE_FLOORS | CFM_DOWN | CFM_RAND_PLACE | CFM_RAND_CONNECT);
trapped_ptr->leaving = TRUE;
}
num = 2 + randint1(3);
for (i = 0; i < num; i++)
{
- (void)summon_specific(0, y, x, trapped_ptr->current_floor_ptr->dun_level, 0, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET));
+ (void)summon_specific(trapped_ptr, 0, y, x, trapped_ptr->current_floor_ptr->dun_level, 0, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET));
}
if (trapped_ptr->current_floor_ptr->dun_level > randint1(100)) /* No nasty effect for low levels */
case TRAP_BLIND:
{
- hit_trap_set_abnormal_status_p(
+ hit_trap_set_abnormal_status_p(trapped_ptr,
_("黒いガスに包み込まれた!", "A black gas surrounds you!"),
trapped_ptr->resist_blind,
set_blind, trapped_ptr->blind + (TIME_EFFECT)randint0(50) + 25);
case TRAP_CONFUSE:
{
- hit_trap_set_abnormal_status_p(
+ hit_trap_set_abnormal_status_p(trapped_ptr,
_("きらめくガスに包み込まれた!", "A gas of scintillating colors surrounds you!"),
trapped_ptr->resist_conf,
set_confused, trapped_ptr->confused + (TIME_EFFECT)randint0(20) + 10);
case TRAP_POISON:
{
- hit_trap_set_abnormal_status_p(
+ hit_trap_set_abnormal_status_p(trapped_ptr,
_("刺激的な緑色のガスに包み込まれた!", "A pungent green gas surrounds you!"),
- trapped_ptr->resist_pois || IS_OPPOSE_POIS(),
+ trapped_ptr->resist_pois || is_oppose_pois(trapped_ptr),
set_poisoned, trapped_ptr->poisoned + (TIME_EFFECT)randint0(20) + 10);
break;
}
if (!in_bounds(trapped_ptr->current_floor_ptr, y1, x1)) continue;
/* Require line of projection */
- if (!projectable(trapped_ptr->current_floor_ptr, trapped_ptr->y, trapped_ptr->x, y1, x1)) continue;
+ if (!projectable(trapped_ptr, trapped_ptr->y, trapped_ptr->x, y1, x1)) continue;
- if (summon_specific(0, y1, x1, lev, SUMMON_ARMAGE_EVIL, (PM_NO_PET)))
+ if (summon_specific(trapped_ptr, 0, y1, x1, lev, SUMMON_ARMAGE_EVIL, (PM_NO_PET)))
evil_idx = hack_m_idx_ii;
- if (summon_specific(0, y1, x1, lev, SUMMON_ARMAGE_GOOD, (PM_NO_PET)))
+ if (summon_specific(trapped_ptr, 0, y1, x1, lev, SUMMON_ARMAGE_GOOD, (PM_NO_PET)))
{
good_idx = hack_m_idx_ii;
}
num = 1 + trapped_ptr->current_floor_ptr->dun_level / 20;
for (i = 0; i < num; i++)
{
- (void)summon_specific(0, y, x, trapped_ptr->current_floor_ptr->dun_level, SUMMON_PIRANHAS, (PM_ALLOW_GROUP | PM_NO_PET));
+ (void)summon_specific(trapped_ptr, 0, y, x, trapped_ptr->current_floor_ptr->dun_level, SUMMON_PIRANHAS, (PM_ALLOW_GROUP | PM_NO_PET));
}
break;
}
}
- if (break_trap && is_trap(g_ptr->feat))
+ if (break_trap && is_trap(trapped_ptr, g_ptr->feat))
{
cave_alter_feat(trapped_ptr, y, x, FF_DISARM);
msg_print(_("トラップを粉砕した。", "You destroyed the trap."));