* @return スレイ倍率をかけたダメージ量
*/
static MULTIPLY calc_shot_damage_with_slay(
- PlayerType *player_ptr, ObjectType *bow_ptr, ObjectType *arrow_ptr, HIT_POINT tdam, monster_type *monster_ptr, SPELL_IDX snipe_type)
+ PlayerType *player_ptr, ObjectType *bow_ptr, ObjectType *arrow_ptr, int tdam, monster_type *monster_ptr, SPELL_IDX snipe_type)
{
MULTIPLY mult = 10;
* @param dam 現在算出中のダメージ値
* @return クリティカル修正が入ったダメージ値
*/
-HIT_POINT critical_shot(PlayerType *player_ptr, WEIGHT weight, int plus_ammo, int plus_bow, HIT_POINT dam)
+int critical_shot(PlayerType *player_ptr, WEIGHT weight, int plus_ammo, int plus_bow, int dam)
{
int i, k;
auto *j_ptr = &player_ptr->inventory_list[INVEN_BOW];
* @return ダメージ期待値
* @note 基本ダメージ量と重量はこの部位では計算に加わらない。
*/
-HIT_POINT calc_crit_ratio_shot(PlayerType *player_ptr, HIT_POINT plus_ammo, HIT_POINT plus_bow)
+int calc_crit_ratio_shot(PlayerType *player_ptr, int plus_ammo, int plus_bow)
{
- HIT_POINT i;
+ int i;
auto *j_ptr = &player_ptr->inventory_list[INVEN_BOW];
/* Extract "shot" power */
* @param dam 基本ダメージ量
* @return ダメージ期待値
*/
-HIT_POINT calc_expect_crit_shot(PlayerType *player_ptr, WEIGHT weight, int plus_ammo, int plus_bow, HIT_POINT dam)
+int calc_expect_crit_shot(PlayerType *player_ptr, WEIGHT weight, int plus_ammo, int plus_bow, int dam)
{
uint32_t num;
int i, k, crit;
* @param impact 強撃かどうか
* @return ダメージ期待値
*/
-HIT_POINT calc_expect_crit(PlayerType *player_ptr, WEIGHT weight, int plus, HIT_POINT dam, int16_t meichuu, bool dokubari, bool impact)
+int calc_expect_crit(PlayerType *player_ptr, WEIGHT weight, int plus, int dam, int16_t meichuu, bool dokubari, bool impact)
{
if (dokubari)
return dam;
i = 0;
// 通常ダメージdam、武器重量weightでクリティカルが発生した時のクリティカルダメージ期待値
- auto calc_weight_expect_dam = [](HIT_POINT dam, WEIGHT weight) {
- HIT_POINT sum = 0;
+ auto calc_weight_expect_dam = [](int dam, WEIGHT weight) {
+ int sum = 0;
for (int d = 1; d <= 650; ++d) {
int k = weight + d;
sum += std::get<0>(apply_critical_norm_damage(k, dam));