-/*!
+/*!
* @brief プレイヤーのステータスを下げるか、モンスター自身のステータスを上げるスペル類の処理
* @date 2020/05/16
* @author Hourier
#include "mspell/mspell-status.h"
#include "blue-magic/blue-magic-checker.h"
#include "core/disturbance.h"
-#include "core/player-redraw-types.h"
#include "effect/attribute-types.h"
#include "effect/effect-processor.h"
#include "mind/drs-types.h"
#include "monster-race/monster-race.h"
#include "monster-race/race-ability-flags.h"
-#include "monster-race/race-flags1.h"
-#include "monster-race/race-flags3.h"
#include "monster-race/race-indice-types.h"
#include "monster/monster-describer.h"
#include "monster/monster-description-types.h"
#include "system/monster-entity.h"
#include "system/monster-race-info.h"
#include "system/player-type-definition.h"
+#include "system/redrawing-flags-updater.h"
#include "timed-effect/player-blindness.h"
#include "timed-effect/timed-effects.h"
#include "view/display-messages.h"
auto *floor_ptr = player_ptr->current_floor_ptr;
MonsterEntity *t_ptr = &floor_ptr->m_list[t_idx];
- MonsterRaceInfo *tr_ptr = &monraces_info[t_ptr->r_idx];
+ MonsterRaceInfo *tr_ptr = &t_ptr->get_monrace();
DEPTH rlev = monster_level_idx(floor_ptr, m_idx);
bool resist, saving_throw;
return res;
}
- resist = ((tr_ptr->flags3 & RF3_NO_FEAR) != 0);
+ resist = (tr_ptr->resistance_flags.has(MonsterResistanceType::NO_FEAR));
saving_throw = (tr_ptr->level > randint1((rlev - 10) < 1 ? 1 : (rlev - 10)) + 10);
mspell_cast_msg_bad_status_to_monster msg(_("%s^が恐ろしげな幻覚を作り出した。", "%s^ casts a fearful illusion in front of %s."),
auto *floor_ptr = player_ptr->current_floor_ptr;
MonsterEntity *t_ptr = &floor_ptr->m_list[t_idx];
- MonsterRaceInfo *tr_ptr = &monraces_info[t_ptr->r_idx];
+ MonsterRaceInfo *tr_ptr = &t_ptr->get_monrace();
DEPTH rlev = monster_level_idx(floor_ptr, m_idx);
bool resist, saving_throw;
msg_default = _("%sは呪文を唱えて%sの目を焼き付かせた。", "%s^ casts a spell, burning %s's eyes.");
}
- resist = ((tr_ptr->flags3 & RF3_NO_CONF) != 0);
+ resist = (tr_ptr->resistance_flags.has(MonsterResistanceType::NO_CONF));
saving_throw = (tr_ptr->level > randint1((rlev - 10) < 1 ? 1 : (rlev - 10)) + 10);
mspell_cast_msg_bad_status_to_monster msg(msg_default, _("%s^には効果がなかった。", "%s^ is unaffected."),
auto *floor_ptr = player_ptr->current_floor_ptr;
MonsterEntity *t_ptr = &floor_ptr->m_list[t_idx];
- MonsterRaceInfo *tr_ptr = &monraces_info[t_ptr->r_idx];
+ MonsterRaceInfo *tr_ptr = &t_ptr->get_monrace();
DEPTH rlev = monster_level_idx(floor_ptr, m_idx);
bool resist, saving_throw;
return res;
}
- resist = ((tr_ptr->flags3 & RF3_NO_CONF) != 0);
+ resist = (tr_ptr->resistance_flags.has(MonsterResistanceType::NO_CONF));
saving_throw = (tr_ptr->level > randint1((rlev - 10) < 1 ? 1 : (rlev - 10)) + 10);
mspell_cast_msg_bad_status_to_monster msg(_("%s^が%sの前に幻惑的な幻をつくり出した。", "%s^ casts a mesmerizing illusion in front of %s."),
auto *floor_ptr = player_ptr->current_floor_ptr;
MonsterEntity *t_ptr = &floor_ptr->m_list[t_idx];
- MonsterRaceInfo *tr_ptr = &monraces_info[t_ptr->r_idx];
+ MonsterRaceInfo *tr_ptr = &t_ptr->get_monrace();
DEPTH rlev = monster_level_idx(floor_ptr, m_idx);
bool resist, saving_throw;
return res;
}
- resist = (tr_ptr->kind_flags.has(MonsterKindType::UNIQUE) || (tr_ptr->flags3 & RF3_NO_STUN) != 0);
+ resist = (tr_ptr->kind_flags.has(MonsterKindType::UNIQUE) || tr_ptr->resistance_flags.has(MonsterResistanceType::NO_STUN));
saving_throw = (tr_ptr->level > randint1((rlev - 10) < 1 ? 1 : (rlev - 10)) + 10);
mspell_cast_msg_bad_status_to_monster msg(_("%s^は%sをじっと見つめた。", "%s^ stares intently at %s."),
auto *floor_ptr = player_ptr->current_floor_ptr;
MonsterEntity *t_ptr = &floor_ptr->m_list[t_idx];
- MonsterRaceInfo *tr_ptr = &monraces_info[t_ptr->r_idx];
+ MonsterRaceInfo *tr_ptr = &t_ptr->get_monrace();
DEPTH rlev = monster_level_idx(floor_ptr, m_idx);
bool resist, saving_throw;
}
monspell_message_base(player_ptr, m_idx, t_idx, msg, !seen, target_type);
-
+ auto &rfu = RedrawingFlagsUpdater::get_instance();
if (player_ptr->health_who == m_idx) {
- player_ptr->redraw |= (PR_HEALTH);
+ rfu.set_flag(MainWindowRedrawingFlag::HEALTH);
}
+
if (player_ptr->riding == m_idx) {
- player_ptr->redraw |= (PR_UHEALTH);
+ rfu.set_flag(MainWindowRedrawingFlag::UHEALTH);
}
if (!m_ptr->is_fearful()) {