static void calc_search(player_type *creature_ptr);
static void calc_search_freq(player_type *creature_ptr);
static void calc_to_hit_melee(player_type *creature_ptr);
-static void calc_to_hit_shoot(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);
static ACTION_SKILL_POWER calc_skill_dig(player_type *creature_ptr);
static void calc_num_blow(player_type *creature_ptr, int i);
calc_search(creature_ptr);
calc_search_freq(creature_ptr);
calc_to_hit_melee(creature_ptr);
- calc_to_hit_shoot(creature_ptr);
+ creature_ptr->skill_thb = calc_to_hit_shoot(creature_ptr);
creature_ptr->skill_tht = calc_to_hit_throw(creature_ptr);
calc_to_damage(creature_ptr, INVEN_RARM);
calc_to_damage(creature_ptr, INVEN_LARM);
creature_ptr->skill_thn += ((c_ptr->x_thn * creature_ptr->lev / 10) + (a_ptr->a_thn * creature_ptr->lev / 50));
}
-static void calc_to_hit_shoot(player_type *creature_ptr)
+/*!
+ * @brief 射撃命中能力計算
+ * @param creature_ptr 計算するクリーチャーの参照ポインタ
+ * @return 射撃命中能力
+ * @details
+ * * 種族/職業/性格による加算とレベルによる追加加算
+ */
+static ACTION_SKILL_POWER calc_to_hit_shoot(player_type *creature_ptr)
{
+ ACTION_SKILL_POWER pow;
const player_race *tmp_rp_ptr;
const player_class *c_ptr = &class_info[creature_ptr->pclass];
const player_personality *a_ptr = &personality_info[creature_ptr->pseikaku];
else
tmp_rp_ptr = &race_info[creature_ptr->prace];
- creature_ptr->skill_thb = tmp_rp_ptr->r_thb + c_ptr->c_thb + a_ptr->a_thb;
- creature_ptr->skill_thb += ((c_ptr->x_thb * creature_ptr->lev / 10) + (a_ptr->a_thb * creature_ptr->lev / 50));
+ pow = tmp_rp_ptr->r_thb + c_ptr->c_thb + a_ptr->a_thb;
+ pow += ((c_ptr->x_thb * creature_ptr->lev / 10) + (a_ptr->a_thb * creature_ptr->lev / 50));
+ return pow;
}
/*!