if (command_arg > 9999) command_arg = 9999;
- if (p_ptr->special_defense & NINJA_S_STEALTH) set_superstealth(FALSE);
+ if (p_ptr->special_defense & NINJA_S_STEALTH) set_superstealth(p_ptr, FALSE);
/* Take a current_world_ptr->game_turn (?) */
take_turn(p_ptr, 100);
#endif
}
- if (!load_game && (p_ptr->special_defense & NINJA_S_STEALTH)) set_superstealth(FALSE);
+ if (!load_game && (p_ptr->special_defense & NINJA_S_STEALTH)) set_superstealth(p_ptr, FALSE);
/*** Process this dungeon level ***/
if (p_ptr->special_defense & NINJA_S_STEALTH)
{
- if (current_floor_ptr->grid_array[p_ptr->y][p_ptr->x].info & CAVE_GLOW) set_superstealth(FALSE);
+ if (current_floor_ptr->grid_array[p_ptr->y][p_ptr->x].info & CAVE_GLOW) set_superstealth(p_ptr, FALSE);
}
}
if (p_ptr->special_defense & NINJA_S_STEALTH)
{
- if (current_floor_ptr->grid_array[p_ptr->y][p_ptr->x].info & CAVE_GLOW) set_superstealth(FALSE);
+ if (current_floor_ptr->grid_array[p_ptr->y][p_ptr->x].info & CAVE_GLOW) set_superstealth(p_ptr, FALSE);
}
}
/* Remove all mirrors without explosion */
remove_all_mirrors(FALSE);
- if (p_ptr->special_defense & NINJA_S_STEALTH) set_superstealth(FALSE);
+ if (p_ptr->special_defense & NINJA_S_STEALTH) set_superstealth(p_ptr, FALSE);
/* New floor is not yet prepared */
new_floor_id = 0;
if (p_ptr->special_defense & NINJA_S_STEALTH)
{
- if (current_floor_ptr->grid_array[p_ptr->y][p_ptr->x].info & CAVE_GLOW) set_superstealth(FALSE);
+ if (current_floor_ptr->grid_array[p_ptr->y][p_ptr->x].info & CAVE_GLOW) set_superstealth(p_ptr, FALSE);
}
}
}
/* Hack - Cancel any special player stealth magics. -LM- */
if (p_ptr->special_defense & NINJA_S_STEALTH)
{
- set_superstealth(FALSE);
+ set_superstealth(p_ptr, FALSE);
}
/* Genocided by chaos patron */
* @param set TRUEならば超隠密状態になる。
* @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
*/
-bool set_superstealth(bool set)
+bool set_superstealth(player_type *creature_ptr, bool set)
{
bool notice = FALSE;
- if (p_ptr->is_dead) return FALSE;
+ if (creature_ptr->is_dead) return FALSE;
/* Open */
if (set)
{
- if (!(p_ptr->special_defense & NINJA_S_STEALTH))
+ if (!(creature_ptr->special_defense & NINJA_S_STEALTH))
{
- if (current_floor_ptr->grid_array[p_ptr->y][p_ptr->x].info & CAVE_MNLT)
+ if (current_floor_ptr->grid_array[creature_ptr->y][creature_ptr->x].info & CAVE_MNLT)
{
msg_print(_("敵の目から薄い影の中に覆い隠された。", "You are mantled in weak shadow from ordinary eyes."));
- p_ptr->monlite = p_ptr->old_monlite = TRUE;
+ creature_ptr->monlite = creature_ptr->old_monlite = TRUE;
}
else
{
msg_print(_("敵の目から影の中に覆い隠された!", "You are mantled in shadow from ordinary eyes!"));
- p_ptr->monlite = p_ptr->old_monlite = FALSE;
+ creature_ptr->monlite = creature_ptr->old_monlite = FALSE;
}
notice = TRUE;
/* Use the value */
- p_ptr->special_defense |= NINJA_S_STEALTH;
+ creature_ptr->special_defense |= NINJA_S_STEALTH;
}
}
/* Shut */
else
{
- if (p_ptr->special_defense & NINJA_S_STEALTH)
+ if (creature_ptr->special_defense & NINJA_S_STEALTH)
{
msg_print(_("再び敵の目にさらされるようになった。", "You are exposed to common sight once more."));
notice = TRUE;
/* Use the value */
- p_ptr->special_defense &= ~(NINJA_S_STEALTH);
+ creature_ptr->special_defense &= ~(NINJA_S_STEALTH);
}
}
/* Nothing to notice */
if (!notice) return (FALSE);
- p_ptr->redraw |= (PR_STATUS);
+ creature_ptr->redraw |= (PR_STATUS);
if (disturb_state) disturb(FALSE, FALSE);
return (TRUE);
extern bool choose_ele_immune(TIME_EFFECT turn);
extern bool set_wraith_form(TIME_EFFECT v, bool do_dec);
extern bool set_tim_esp(TIME_EFFECT v, bool do_dec);
-extern bool set_superstealth(bool set);
+extern bool set_superstealth(player_type *creature_ptr, bool set);
extern void do_poly_wounds(player_type *creature_ptr);
extern void change_race(player_type *creature_ptr, CHARACTER_IDX new_race, concptr effect_msg);
if (p_ptr->pclass == CLASS_NINJA)
{
- if (g_ptr->info & (CAVE_GLOW)) set_superstealth(FALSE);
- else if (p_ptr->cur_lite <= 0) set_superstealth(TRUE);
+ if (g_ptr->info & (CAVE_GLOW)) set_superstealth(p_ptr, FALSE);
+ else if (p_ptr->cur_lite <= 0) set_superstealth(p_ptr, TRUE);
}
if ((p_ptr->action == ACTION_HAYAGAKE) &&
p_ptr->old_lite = p_ptr->cur_lite;
if ((p_ptr->cur_lite > 0) && (p_ptr->special_defense & NINJA_S_STEALTH))
- set_superstealth(FALSE);
+ set_superstealth(p_ptr, FALSE);
}
}
if (p_ptr->special_defense & NINJA_S_STEALTH)
{
- if (current_floor_ptr->grid_array[p_ptr->y][p_ptr->x].info & CAVE_GLOW) set_superstealth(FALSE);
+ if (current_floor_ptr->grid_array[p_ptr->y][p_ptr->x].info & CAVE_GLOW) set_superstealth(p_ptr, FALSE);
}
}
if (p_ptr->special_defense & NINJA_S_STEALTH)
{
- if (current_floor_ptr->grid_array[p_ptr->y][p_ptr->x].info & CAVE_GLOW) set_superstealth(FALSE);
+ if (current_floor_ptr->grid_array[p_ptr->y][p_ptr->x].info & CAVE_GLOW) set_superstealth(p_ptr, FALSE);
}
}
if (p_ptr->special_defense & NINJA_S_STEALTH)
{
- if (current_floor_ptr->grid_array[p_ptr->y][p_ptr->x].info & CAVE_GLOW) set_superstealth(FALSE);
+ if (current_floor_ptr->grid_array[p_ptr->y][p_ptr->x].info & CAVE_GLOW) set_superstealth(p_ptr, FALSE);
}
/* Success */
if (p_ptr->special_defense & NINJA_S_STEALTH)
{
- if (player_bold(y, x)) set_superstealth(FALSE);
+ if (player_bold(y, x)) set_superstealth(p_ptr, FALSE);
}
}
if (p_ptr->special_defense & NINJA_S_STEALTH)
{
- if (current_floor_ptr->grid_array[p_ptr->y][p_ptr->x].info & CAVE_GLOW) set_superstealth(FALSE);
+ if (current_floor_ptr->grid_array[p_ptr->y][p_ptr->x].info & CAVE_GLOW) set_superstealth(p_ptr, FALSE);
}
}