1 #include "mspell/mspell-attack-util.h"
2 #include "monster-race/monster-race.h"
3 #include "system/floor-type-definition.h"
4 #include "system/monster-race-info.h"
5 #include "system/monster-type-definition.h"
6 #include "system/player-type-definition.h"
8 msa_type *initialize_msa_type(PlayerType *player_ptr, msa_type *msa_ptr, MONSTER_IDX m_idx)
10 msa_ptr->m_idx = m_idx;
11 msa_ptr->m_ptr = &player_ptr->current_floor_ptr->m_list[m_idx];
12 msa_ptr->r_ptr = &monraces_info[msa_ptr->m_ptr->r_idx];
13 msa_ptr->no_inate = randint0(100) >= (msa_ptr->r_ptr->freq_spell * 2);
14 msa_ptr->ability_flags = msa_ptr->r_ptr->ability_flags;
15 msa_ptr->x = player_ptr->x;
16 msa_ptr->y = player_ptr->y;
17 msa_ptr->x_br_lite = 0;
18 msa_ptr->y_br_lite = 0;
19 msa_ptr->do_spell = DO_SPELL_NONE;
21 msa_ptr->thrown_spell = MonsterAbilityType::MAX;