1 #include "mspell/smart-mspell-util.h"
2 #include "monster-race/monster-race.h"
3 #include "monster-race/race-flags2.h"
4 #include "system/floor-type-definition.h"
5 #include "system/monster-type-definition.h"
7 msr_type *initialize_msr_type(player_type *target_ptr, msr_type *msr_ptr, MONSTER_IDX m_idx, const FlagGroup<RF_ABILITY>& ability_flags)
9 monster_type *m_ptr = &target_ptr->current_floor_ptr->m_list[m_idx];
10 msr_ptr->r_ptr = &r_info[m_ptr->r_idx];
11 msr_ptr->ability_flags = ability_flags;
12 msr_ptr->smart.clear();
17 * @brief モンスターがプレイヤーの弱点をついた選択を取るかどうかの判定 /
18 * Internal probability routine
19 * @param r_ptr モンスター種族の構造体参照ポインタ
21 * @return 適した選択を取るならばTRUEを返す。
23 bool int_outof(monster_race *r_ptr, PERCENTAGE prob)
25 if (!(r_ptr->flags2 & RF2_SMART))
28 return (randint0(100) < prob);