OSDN Git Service

Merge remote-tracking branch 'remotes/hengbandosx/english-mspell-edits' into feature...
[hengband/hengband.git] / src / mspell / mspell-attack-util.c
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"
5
6 msa_type *initialize_msa_type(player_type *target_ptr, msa_type *msa_ptr, MONSTER_IDX m_idx)
7 {
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;
20     msa_ptr->num = 0;
21     msa_ptr->thrown_spell = 0;
22     return msa_ptr;
23 }