static void calc_device_ability(player_type *creature_ptr);
static void calc_saving_throw(player_type *creature_ptr);
static void calc_search(player_type *creature_ptr);
-static void calc_search_freq(player_type *creature_ptr);
+static ACTION_SKILL_POWER calc_search_freq(player_type *creature_ptr);
static ACTION_SKILL_POWER calc_to_hit_melee(player_type *creature_ptr);
static ACTION_SKILL_POWER calc_to_hit_shoot(player_type *creature_ptr);
static ACTION_SKILL_POWER calc_to_hit_throw(player_type *creature_ptr);
calc_device_ability(creature_ptr);
calc_saving_throw(creature_ptr);
calc_search(creature_ptr);
- calc_search_freq(creature_ptr);
+ creature_ptr->skill_fos = calc_search_freq(creature_ptr);
creature_ptr->skill_thn = calc_to_hit_melee(creature_ptr);
creature_ptr->skill_thb = calc_to_hit_shoot(creature_ptr);
creature_ptr->skill_tht = calc_to_hit_throw(creature_ptr);
}
}
-static void calc_search_freq(player_type *creature_ptr)
+/*!
+ * @brief 探索頻度計算
+ * @param creature_ptr 計算するクリーチャーの参照ポインタ
+ * @return 探索頻度
+ * @details
+ * * 種族/職業/性格による加算
+ * * 職業とレベルによる追加加算
+ * * 狂戦士化による減算(-15)
+ * * 変異(MUT3_XTRA_EYES)による加算(+15)
+ */
+static ACTION_SKILL_POWER calc_search_freq(player_type *creature_ptr)
{
+ ACTION_SKILL_POWER pow;
const player_race *tmp_rp_ptr;
if (creature_ptr->mimic_form)
const player_class *c_ptr = &class_info[creature_ptr->pclass];
const player_personality *a_ptr = &personality_info[creature_ptr->pseikaku];
- creature_ptr->skill_fos = tmp_rp_ptr->r_fos + c_ptr->c_fos + a_ptr->a_fos;
+ pow = tmp_rp_ptr->r_fos + c_ptr->c_fos + a_ptr->a_fos;
+ pow += (c_ptr->x_fos * creature_ptr->lev / 10);
for (int i = INVEN_RARM; i < INVEN_TOTAL; i++) {
object_type *o_ptr;
continue;
object_flags(creature_ptr, o_ptr, flgs);
if (have_flag(flgs, TR_SEARCH))
- creature_ptr->skill_fos += (o_ptr->pval * 5);
+ pow += (o_ptr->pval * 5);
}
if (creature_ptr->shero) {
- creature_ptr->skill_fos -= 15;
+ pow -= 15;
}
if (creature_ptr->muta3 & MUT3_XTRA_EYES) {
- creature_ptr->skill_fos += 15;
+ pow += 15;
}
- creature_ptr->skill_fos += (cp_ptr->x_fos * creature_ptr->lev / 10);
+ return pow;
}
/*!