* @author Hourier
*/
-#include <algorithm>
-
+#include "monster/monster-damage.h"
#include "avatar/avatar-changer.h"
#include "core/player-redraw-types.h"
#include "core/speed-table.h"
#include "monster-race/race-flags3.h"
#include "monster-race/race-flags7.h"
#include "monster-race/race-flags8.h"
-#include "monster/monster-damage.h"
#include "monster/monster-describer.h"
#include "monster/monster-description-types.h"
#include "monster/monster-info.h"
#include "spell-kind/spells-random.h"
#include "status/experience.h"
#include "system/floor-type-definition.h"
-#include "system/monster-race-definition.h"
-#include "system/monster-type-definition.h"
+#include "system/monster-entity.h"
+#include "system/monster-race-info.h"
#include "system/player-type-definition.h"
#include "timed-effect/player-hallucination.h"
#include "timed-effect/timed-effects.h"
#include "util/bit-flags-calculator.h"
#include "view/display-messages.h"
#include "world/world.h"
+#include <algorithm>
/*
* @brief コンストラクタ
return this->m_idx == 0;
}
-bool MonsterDamageProcessor::process_dead_exp_virtue(concptr note, monster_type *exp_mon)
+bool MonsterDamageProcessor::process_dead_exp_virtue(concptr note, MonsterEntity *exp_mon)
{
auto *m_ptr = &this->player_ptr->current_floor_ptr->m_list[this->m_idx];
auto &r_ref = m_ptr->get_real_r_ref();
AvatarChanger ac(player_ptr, m_ptr);
ac.change_virtue();
if (r_ref.kind_flags.has(MonsterKindType::UNIQUE) && record_destroy_uniq) {
- char note_buf[160];
- sprintf(note_buf, "%s%s", r_ref.name.c_str(), m_ptr->mflag2.has(MonsterConstantFlagType::CLONED) ? _("(クローン)", "(Clone)") : "");
- exe_write_diary(this->player_ptr, DIARY_UNIQUE, 0, note_buf);
+ exe_write_diary(this->player_ptr, DIARY_UNIQUE, 0, std::string(r_ref.name).append(m_ptr->mflag2.has(MonsterConstantFlagType::CLONED) ? _("(クローン)", "(Clone)") : "").data());
}
sound(SOUND_KILL);
{
auto *m_ptr = &this->player_ptr->current_floor_ptr->m_list[this->m_idx];
auto r_idx = m_ptr->r_idx;
- auto *r_ptr = &r_info[r_idx];
- if (any_bits(r_info[r_idx].flags7, RF7_TANUKI)) {
- r_ptr = &r_info[r_idx];
+ auto *r_ptr = &monraces_info[r_idx];
+ if (any_bits(monraces_info[r_idx].flags7, RF7_TANUKI)) {
+ r_ptr = &monraces_info[r_idx];
m_ptr->ap_r_idx = r_idx;
if (r_ptr->r_sights < MAX_SHORT) {
r_ptr->r_sights++;
*/
void MonsterDamageProcessor::death_unique_monster(MonsterRaceId r_idx)
{
- r_info[r_idx].max_num = 0;
+ monraces_info[r_idx].max_num = 0;
std::vector<MonsterRaceId> combined_unique_vec;
if (!check_combined_unique(r_idx, &combined_unique_vec)) {
return;
void MonsterDamageProcessor::death_combined_uniques(const MonsterRaceId r_idx, const combined_uniques &combined_uniques)
{
auto death_r_idx = [](MonsterRaceId r_idx) {
- auto &r_ref = r_info[r_idx];
+ auto &r_ref = monraces_info[r_idx];
r_ref.max_num = 0;
r_ref.r_pkills++;
r_ref.r_akills++;
return;
}
- if (m_ptr->mflag2.has(MonsterConstantFlagType::KAGE) && (r_info[MonsterRaceId::KAGE].r_pkills < MAX_SHORT)) {
- r_info[MonsterRaceId::KAGE].r_pkills++;
+ if (m_ptr->mflag2.has(MonsterConstantFlagType::KAGE) && (monraces_info[MonsterRaceId::KAGE].r_pkills < MAX_SHORT)) {
+ monraces_info[MonsterRaceId::KAGE].r_pkills++;
} else if (r_ref.r_pkills < MAX_SHORT) {
r_ref.r_pkills++;
}
- if (m_ptr->mflag2.has(MonsterConstantFlagType::KAGE) && (r_info[MonsterRaceId::KAGE].r_tkills < MAX_SHORT)) {
- r_info[MonsterRaceId::KAGE].r_tkills++;
+ if (m_ptr->mflag2.has(MonsterConstantFlagType::KAGE) && (monraces_info[MonsterRaceId::KAGE].r_tkills < MAX_SHORT)) {
+ monraces_info[MonsterRaceId::KAGE].r_tkills++;
} else if (r_ref.r_tkills < MAX_SHORT) {
r_ref.r_tkills++;
}
* experience point of a monster later.
* </pre>
*/
-void MonsterDamageProcessor::get_exp_from_mon(monster_type *m_ptr, int exp_dam)
+void MonsterDamageProcessor::get_exp_from_mon(MonsterEntity *m_ptr, int exp_dam)
{
- auto *r_ptr = &r_info[m_ptr->r_idx];
+ auto *r_ptr = &monraces_info[m_ptr->r_idx];
if (!m_ptr->is_valid() || m_ptr->is_pet() || this->player_ptr->phase_out) {
return;
}
}
}
- auto *r_ptr = &r_info[m_ptr->r_idx];
+ auto *r_ptr = &monraces_info[m_ptr->r_idx];
if (m_ptr->is_fearful() || any_bits(r_ptr->flags3, RF3_NO_FEAR)) {
return;
}