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-type-definition.h"
6 msa_type *initialize_msa_type(player_type *target_ptr, msa_type *msa_ptr, MONSTER_IDX m_idx)
8 msa_ptr->m_idx = m_idx;
9 msa_ptr->m_ptr = &target_ptr->current_floor_ptr->m_list[m_idx];
10 msa_ptr->r_ptr = &r_info[msa_ptr->m_ptr->r_idx];
11 msa_ptr->no_inate = randint0(100) >= (msa_ptr->r_ptr->freq_spell * 2);
12 msa_ptr->f4 = msa_ptr->r_ptr->flags4;
13 msa_ptr->f5 = msa_ptr->r_ptr->a_ability_flags1;
14 msa_ptr->f6 = msa_ptr->r_ptr->a_ability_flags2;
15 msa_ptr->x = target_ptr->x;
16 msa_ptr->y = target_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 = 0;