case ACT_MASS_GENO:
{
msg_print(_("ひどく鋭い音が流れ出た...", "It lets out a long, shrill note..."));
- (void)mass_genocide(200, TRUE);
+ (void)mass_genocide(user_ptr, 200, TRUE);
break;
}
case SV_SCROLL_MASS_GENOCIDE:
{
- (void)mass_genocide(300, TRUE);
+ (void)mass_genocide(creature_ptr, 300, TRUE);
ident = TRUE;
break;
}
msg_format(_("%sの声が響き渡った:", "The voice of %s booms out:"), chaos_patrons[creature_ptr->chaos_patron]);
msg_print(_("「我、汝の敵を抹殺せん!」", "'Let me relieve thee of thine oppressors!'"));
- (void)mass_genocide(0, FALSE);
+ (void)mass_genocide(creature_ptr, 0, FALSE);
reward = _("モンスターが抹殺された。", "genociding nearby monsters");
break;
if (cast)
{
- mass_genocide(power, TRUE);
+ mass_genocide(caster_ptr, power, TRUE);
}
}
break;
extern void aggravate_monsters(MONSTER_IDX who);
extern bool genocide_aux(MONSTER_IDX m_idx, int power, bool player_cast, int dam_side, concptr spell_name);
extern bool symbol_genocide(int power, bool player_cast);
-extern bool mass_genocide(int power, bool player_cast);
+extern bool mass_genocide(player_type *caster_ptr, int power, bool player_cast);
extern bool mass_genocide_undead(int power, bool player_cast);
extern bool probing(void);
extern bool banish_evil(int dist);
* @param player_cast プレイヤーの魔法によるものならば TRUE
* @return 効力があった場合TRUEを返す
*/
-bool mass_genocide(int power, bool player_cast)
+bool mass_genocide(player_type *caster_ptr, int power, bool player_cast)
{
MONSTER_IDX i;
bool result = FALSE;
/* Prevent mass genocide in quest levels */
- if ((p_ptr->current_floor_ptr->inside_quest && !random_quest_number(p_ptr->current_floor_ptr->dun_level)) || p_ptr->current_floor_ptr->inside_arena || p_ptr->phase_out)
+ if ((caster_ptr->current_floor_ptr->inside_quest && !random_quest_number(caster_ptr->current_floor_ptr->dun_level)) || caster_ptr->current_floor_ptr->inside_arena || caster_ptr->phase_out)
{
return (FALSE);
}
/* Delete the (nearby) monsters */
- for (i = 1; i < p_ptr->current_floor_ptr->m_max; i++)
+ for (i = 1; i < caster_ptr->current_floor_ptr->m_max; i++)
{
- monster_type *m_ptr = &p_ptr->current_floor_ptr->m_list[i];
+ monster_type *m_ptr = &caster_ptr->current_floor_ptr->m_list[i];
if (!monster_is_valid(m_ptr)) continue;
/* Skip distant monsters */
if (result)
{
- chg_virtue(p_ptr, V_VITALITY, -2);
- chg_virtue(p_ptr, V_CHANCE, -1);
+ chg_virtue(caster_ptr, V_VITALITY, -2);
+ chg_virtue(caster_ptr, V_CHANCE, -1);
}
return result;