OSDN Git Service

[Refactor] #2204 HIT_POINTエイリアスをintに揃えた
authorHourier <66951241+Hourier@users.noreply.github.com>
Fri, 18 Feb 2022 13:31:44 +0000 (22:31 +0900)
committerHourier <66951241+Hourier@users.noreply.github.com>
Fri, 18 Feb 2022 13:31:44 +0000 (22:31 +0900)
122 files changed:
src/artifact/random-art-characteristics.cpp
src/artifact/random-art-generator.cpp
src/artifact/random-art-misc.cpp
src/birth/quick-start.h
src/blue-magic/blue-magic-util.h
src/cmd-action/cmd-attack.cpp
src/cmd-action/cmd-mane.cpp
src/cmd-action/cmd-spell.cpp
src/cmd-action/cmd-spell.h
src/cmd-item/cmd-zaprod.cpp
src/cmd-item/cmd-zapwand.cpp
src/combat/attack-criticality.cpp
src/combat/attack-criticality.h
src/combat/aura-counterattack.cpp
src/combat/shoot.cpp
src/combat/shoot.h
src/combat/slaying.cpp
src/combat/slaying.h
src/effect/effect-feature.cpp
src/effect/effect-feature.h
src/effect/effect-item.cpp
src/effect/effect-item.h
src/effect/effect-monster-charm.cpp
src/effect/effect-monster-util.cpp
src/effect/effect-monster-util.h
src/effect/effect-monster.cpp
src/effect/effect-monster.h
src/effect/effect-player-resist-hurt.cpp
src/effect/effect-player-resist-hurt.h
src/effect/effect-player.cpp
src/effect/effect-player.h
src/effect/effect-processor.cpp
src/effect/effect-processor.h
src/grid/trap.cpp
src/hpmp/hp-mp-processor.cpp
src/hpmp/hp-mp-regenerator.cpp
src/market/building-craft-weapon.cpp
src/market/building-enchanter.cpp
src/market/building-enchanter.h
src/melee/melee-postprocess.cpp
src/melee/melee-postprocess.h
src/melee/melee-spell-util.h
src/melee/melee-util.h
src/mind/mind-elementalist.cpp
src/mind/mind-force-trainer.cpp
src/mind/mind-mirror-master.cpp
src/mind/mind-mirror-master.h
src/monster-attack/monster-attack-player.h
src/monster-attack/monster-eating.cpp
src/monster-floor/monster-death.cpp
src/monster-race/monster-race-hook.cpp
src/monster/monster-damage.cpp
src/monster/monster-damage.h
src/monster/monster-describer.cpp
src/monster/monster-describer.h
src/monster/monster-status.cpp
src/monster/monster-status.h
src/mspell/mspell-breath.cpp
src/mspell/mspell-curse.cpp
src/mspell/mspell-damage-calculator.cpp
src/mspell/mspell-damage-calculator.h
src/mspell/mspell-result.h
src/mspell/mspell-special.cpp
src/mutation/mutation-processor.cpp
src/object-activation/activation-bolt-ball.cpp
src/object-enchant/object-ego.cpp
src/object-enchant/object-ego.h
src/object-enchant/others/apply-magic-ring.cpp
src/object-enchant/vorpal-weapon.cpp
src/object/object-kind.h
src/object/warning.cpp
src/pet/pet-fall-off.cpp
src/pet/pet-fall-off.h
src/player-attack/blood-sucking-processor.cpp
src/player-attack/player-attack-util.h
src/player-info/mane-data-type.h
src/player/digestion-processor.cpp
src/player/player-damage.cpp
src/player/player-damage.h
src/player/player-skill.cpp
src/player/player-skill.h
src/realm/realm-arcane.cpp
src/realm/realm-chaos.cpp
src/realm/realm-crusade.cpp
src/realm/realm-death.cpp
src/realm/realm-demon.cpp
src/realm/realm-hex.cpp
src/realm/realm-nature.cpp
src/realm/realm-trump.cpp
src/specific-object/death-scythe.cpp
src/spell-kind/spells-beam.cpp
src/spell-kind/spells-beam.h
src/spell-kind/spells-launcher.cpp
src/spell-kind/spells-launcher.h
src/spell-kind/spells-lite.cpp
src/spell-kind/spells-lite.h
src/spell-kind/spells-pet.cpp
src/spell-kind/spells-random.cpp
src/spell-kind/spells-sight.cpp
src/spell-kind/spells-sight.h
src/spell-kind/spells-specific-bolt.cpp
src/spell-kind/spells-specific-bolt.h
src/spell-realm/spells-chaos.cpp
src/spell-realm/spells-chaos.h
src/spell-realm/spells-crusade.cpp
src/spell-realm/spells-crusade.h
src/spell-realm/spells-hex.cpp
src/spell-realm/spells-hex.h
src/spell/spells-diceroll.cpp
src/spell/spells-diceroll.h
src/spell/spells-object.cpp
src/spell/spells-object.h
src/spell/spells-status.cpp
src/spell/spells-status.h
src/system/artifact-type-definition.h
src/system/h-type.h
src/system/monster-type-definition.h
src/system/object-type-definition.h
src/system/player-type-definition.h
src/view/display-player-middle.cpp
src/wizard/wizard-spells.cpp
src/wizard/wizard-spells.h

index 543dd9d..52c3dd5 100644 (file)
@@ -146,12 +146,12 @@ void get_random_name(ObjectType *o_ptr, char *return_name, bool armour, int powe
 }
 
 /*対邪平均ダメージの計算処理*/
-static HIT_POINT calc_arm_avgdamage(PlayerType *player_ptr, ObjectType *o_ptr)
+static int calc_arm_avgdamage(PlayerType *player_ptr, ObjectType *o_ptr)
 {
     auto flgs = object_flags(o_ptr);
-    HIT_POINT base, forced, vorpal;
-    HIT_POINT s_evil = forced = vorpal = 0;
-    HIT_POINT dam = base = (o_ptr->dd * o_ptr->ds + o_ptr->dd) / 2;
+    int base, forced, vorpal;
+    int s_evil = forced = vorpal = 0;
+    int dam = base = (o_ptr->dd * o_ptr->ds + o_ptr->dd) / 2;
     if (flgs.has(TR_KILL_EVIL)) {
         dam = s_evil = dam * 7 / 2;
     } else if (flgs.has_not(TR_KILL_EVIL) && flgs.has(TR_SLAY_EVIL)) {
index d1c2b9f..c2f2abe 100644 (file)
@@ -282,7 +282,7 @@ static void invest_negative_modified_value(ObjectType *o_ptr)
         if (one_in_(o_ptr->to_d) && one_in_(o_ptr->to_h))
             break;
 
-        o_ptr->to_d -= (HIT_POINT)randint0(3);
+        o_ptr->to_d -= (int)randint0(3);
         o_ptr->to_h -= (HIT_PROB)randint0(3);
     }
 
@@ -290,7 +290,7 @@ static void invest_negative_modified_value(ObjectType *o_ptr)
         if (one_in_(o_ptr->to_d) || one_in_(o_ptr->to_h))
             break;
 
-        o_ptr->to_d -= (HIT_POINT)randint0(3);
+        o_ptr->to_d -= (int)randint0(3);
         o_ptr->to_h -= (HIT_PROB)randint0(3);
     }
 }
index 488be0e..73e81b3 100644 (file)
@@ -131,7 +131,7 @@ static void invest_misc_hit_dice(ObjectType *o_ptr)
 {
     o_ptr->art_flags.set(TR_SHOW_MODS);
     HIT_PROB bonus_h = 4 + (HIT_PROB)randint1(11);
-    HIT_POINT bonus_d = 4 + (HIT_POINT)randint1(11);
+    int bonus_d = 4 + (int)randint1(11);
     if ((o_ptr->tval != ItemKindType::SWORD) && (o_ptr->tval != ItemKindType::POLEARM) && (o_ptr->tval != ItemKindType::HAFTED) && (o_ptr->tval != ItemKindType::DIGGING) && (o_ptr->tval != ItemKindType::GLOVES) && (o_ptr->tval != ItemKindType::RING)) {
         bonus_h /= 2;
         bonus_d /= 2;
index 0295798..341aaa9 100644 (file)
@@ -27,7 +27,7 @@ struct birther {
 
     BASE_STATUS stat_max[6]{}; /* Current "maximal" stat values */
     BASE_STATUS stat_max_max[6]{}; /* Maximal "maximal" stat values */
-    HIT_POINT player_hp[PY_MAX_LEVEL]{};
+    int player_hp[PY_MAX_LEVEL]{};
 
     int16_t chaos_patron{}; /*! カオスパトロンのID */
 
index 53906cd..527e93b 100644 (file)
@@ -11,7 +11,7 @@ struct bmc_type {
     DIRECTION dir;
     PLAYER_LEVEL plev;
     PLAYER_LEVEL summon_lev;
-    HIT_POINT damage;
+    int damage;
     bool pet;
     bool no_trump;
     BIT_FLAGS p_mode;
index 1d2953b..a4d3b12 100644 (file)
@@ -126,7 +126,7 @@ static void natural_attack(PlayerType *player_ptr, MONSTER_IDX m_idx, PlayerMuta
     sound(SOUND_HIT);
     msg_format(_("%sを%sで攻撃した。", "You hit %s with your %s."), m_name, atk_desc);
 
-    HIT_POINT k = damroll(dice_num, dice_side);
+    int k = damroll(dice_num, dice_side);
     k = critical_norm(player_ptr, n_weight, bonus, k, (int16_t)bonus, HISSATSU_NONE);
     k += player_ptr->to_d_m;
     if (k < 0)
index 0273ba8..1a81979 100644 (file)
@@ -81,7 +81,7 @@ static int damage;
  * @param power ものまねの効力の種類
  * @param dam ものまねの威力
  */
-static void mane_info(PlayerType *player_ptr, char *p, MonsterAbilityType power, HIT_POINT dam)
+static void mane_info(PlayerType *player_ptr, char *p, MonsterAbilityType power, int dam)
 {
     PLAYER_LEVEL plev = player_ptr->lev;
 
index a31c5f2..e801774 100644 (file)
@@ -171,7 +171,7 @@ concptr info_delay(int base, DICE_SID sides)
  * @param dam 固定値
  * @return フォーマットに従い整形された文字列
  */
-concptr info_multi_damage(HIT_POINT dam)
+concptr info_multi_damage(int dam)
 {
     return format(_("損傷:各%d", "dam %d each"), dam);
 }
index dc2ad55..ba04dbc 100644 (file)
@@ -19,7 +19,7 @@ concptr info_duration(int base, DICE_SID sides);
 concptr info_range(POSITION range);
 concptr info_heal(DICE_NUMBER dice, DICE_SID sides, int base);
 concptr info_delay(int base, DICE_SID sides);
-concptr info_multi_damage(HIT_POINT dam);
+concptr info_multi_damage(int dam);
 concptr info_multi_damage_dice(DICE_NUMBER dice, DICE_SID sides);
 concptr info_power(int power);
 concptr info_power_dice(DICE_NUMBER dice, DICE_SID sides);
index 6c3b9a1..baf9757 100644 (file)
@@ -158,7 +158,7 @@ int rod_effect(PlayerType *player_ptr, OBJECT_SUBTYPE_VALUE sval, DIRECTION dir,
     }
 
     case SV_ROD_LITE: {
-        HIT_POINT dam = damroll((powerful ? 12 : 6), 8);
+        int dam = damroll((powerful ? 12 : 6), 8);
         msg_print(_("青く輝く光線が放たれた。", "A line of blue shimmering light appears."));
         (void)lite_line(player_ptr, dir, dam);
         ident = true;
@@ -244,7 +244,7 @@ int rod_effect(PlayerType *player_ptr, OBJECT_SUBTYPE_VALUE sval, DIRECTION dir,
     }
 
     case SV_ROD_STONE_TO_MUD: {
-        HIT_POINT dam = powerful ? 40 + randint1(60) : 20 + randint1(30);
+        int dam = powerful ? 40 + randint1(60) : 20 + randint1(30);
         if (wall_to_mud(player_ptr, dir, dam))
             ident = true;
         break;
index a55ca6a..a1c5252 100644 (file)
@@ -82,7 +82,7 @@ bool wand_effect(PlayerType *player_ptr, OBJECT_SUBTYPE_VALUE sval, DIRECTION di
     /* Analyze the wand */
     switch (sval) {
     case SV_WAND_HEAL_MONSTER: {
-        HIT_POINT dam = damroll((powerful ? 20 : 10), 10);
+        int dam = damroll((powerful ? 20 : 10), 10);
         if (heal_monster(player_ptr, dir, dam))
             ident = true;
         break;
@@ -124,14 +124,14 @@ bool wand_effect(PlayerType *player_ptr, OBJECT_SUBTYPE_VALUE sval, DIRECTION di
     }
 
     case SV_WAND_STONE_TO_MUD: {
-        HIT_POINT dam = powerful ? 40 + randint1(60) : 20 + randint1(30);
+        int dam = powerful ? 40 + randint1(60) : 20 + randint1(30);
         if (wall_to_mud(player_ptr, dir, dam))
             ident = true;
         break;
     }
 
     case SV_WAND_LITE: {
-        HIT_POINT dam = damroll((powerful ? 12 : 6), 8);
+        int dam = damroll((powerful ? 12 : 6), 8);
         msg_print(_("青く輝く光線が放たれた。", "A line of blue shimmering light appears."));
         (void)lite_line(player_ptr, dir, dam);
         ident = true;
@@ -252,7 +252,7 @@ bool wand_effect(PlayerType *player_ptr, OBJECT_SUBTYPE_VALUE sval, DIRECTION di
     }
 
     case SV_WAND_DRAGON_BREATH: {
-        HIT_POINT dam;
+        int dam;
         AttributeType typ;
 
         switch (randint1(5)) {
index de7fa96..5bee63a 100644 (file)
@@ -23,7 +23,7 @@
  * @param base_dam クリティカル適用前のダメージ
  * @return クリティカルを適用したダメージと、クリティカル発生時に表示するメッセージと、クリティカル効果音のタプルを返す
  */
-std::tuple<HIT_POINT, concptr, sound_type> apply_critical_norm_damage(int k, HIT_POINT base_dam)
+std::tuple<int, concptr, sound_type> apply_critical_norm_damage(int k, int base_dam)
 {
     if (k < 400) {
         return { 2 * base_dam + 5, _("手ごたえがあった!", "It was a good hit!"), SOUND_GOOD_HIT };
@@ -50,7 +50,7 @@ std::tuple<HIT_POINT, concptr, sound_type> apply_critical_norm_damage(int k, HIT
  * @param mode オプションフラグ
  * @return クリティカル修正が入ったダメージ値
  */
-HIT_POINT critical_norm(PlayerType *player_ptr, WEIGHT weight, int plus, HIT_POINT dam, int16_t meichuu, combat_options mode, bool impact)
+int critical_norm(PlayerType *player_ptr, WEIGHT weight, int plus, int dam, int16_t meichuu, combat_options mode, bool impact)
 {
     /* Extract "blow" power */
     int i = (weight + (meichuu * 3 + plus * 5) + player_ptr->skill_thn);
index ab0975c..2c71944 100644 (file)
@@ -8,6 +8,6 @@
 
 struct player_attack_type;
 class PlayerType;
-std::tuple<HIT_POINT, concptr, sound_type> apply_critical_norm_damage(int k, HIT_POINT base_dam);
-HIT_POINT critical_norm(PlayerType *player_ptr, WEIGHT weight, int plus, HIT_POINT dam, int16_t meichuu, combat_options mode, bool impact = false);
+std::tuple<int, concptr, sound_type> apply_critical_norm_damage(int k, int base_dam);
+int critical_norm(PlayerType *player_ptr, WEIGHT weight, int plus, int dam, int16_t meichuu, combat_options mode, bool impact = false);
 void critical_attack(PlayerType *player_ptr, player_attack_type *pa_ptr);
index 3ad7291..05eea7d 100644 (file)
@@ -43,7 +43,7 @@ static void aura_fire_by_monster_attack(PlayerType *player_ptr, MonsterAttackPla
         return;
     }
 
-    HIT_POINT dam = damroll(2, 6);
+    int dam = damroll(2, 6);
     dam = mon_damage_mod(player_ptr, monap_ptr->m_ptr, dam, false);
     msg_format(_("%^sは突然熱くなった!", "%^s is suddenly very hot!"), monap_ptr->m_name);
     MonsterDamageProcessor mdp(player_ptr, monap_ptr->m_idx, dam, &monap_ptr->fear, AttributeType::FIRE);
@@ -66,7 +66,7 @@ static void aura_elec_by_monster_attack(PlayerType *player_ptr, MonsterAttackPla
         return;
     }
 
-    HIT_POINT dam = damroll(2, 6);
+    int dam = damroll(2, 6);
     dam = mon_damage_mod(player_ptr, monap_ptr->m_ptr, dam, false);
     msg_format(_("%^sは電撃をくらった!", "%^s gets zapped!"), monap_ptr->m_name);
     MonsterDamageProcessor mdp(player_ptr, monap_ptr->m_idx, dam, &monap_ptr->fear, AttributeType::ELEC);
@@ -89,7 +89,7 @@ static void aura_cold_by_monster_attack(PlayerType *player_ptr, MonsterAttackPla
         return;
     }
 
-    HIT_POINT dam = damroll(2, 6);
+    int dam = damroll(2, 6);
     dam = mon_damage_mod(player_ptr, monap_ptr->m_ptr, dam, false);
     msg_format(_("%^sは冷気をくらった!", "%^s is very cold!"), monap_ptr->m_name);
     MonsterDamageProcessor mdp(player_ptr, monap_ptr->m_idx, dam, &monap_ptr->fear, AttributeType::COLD);
@@ -109,7 +109,7 @@ static void aura_shards_by_monster_attack(PlayerType *player_ptr, MonsterAttackP
         if (is_original_ap_and_seen(player_ptr, monap_ptr->m_ptr))
             r_ptr->r_flagsr |= (r_ptr->flagsr & RFR_EFF_RES_SHAR_MASK);
     } else {
-        HIT_POINT dam = damroll(2, 6);
+        int dam = damroll(2, 6);
         dam = mon_damage_mod(player_ptr, monap_ptr->m_ptr, dam, false);
         msg_format(_("%^sは鏡の破片をくらった!", "%^s gets sliced!"), monap_ptr->m_name);
         MonsterDamageProcessor mdp(player_ptr, monap_ptr->m_idx, dam, &monap_ptr->fear, AttributeType::SHARDS);
@@ -139,7 +139,7 @@ static void aura_holy_by_monster_attack(PlayerType *player_ptr, MonsterAttackPla
         return;
     }
 
-    HIT_POINT dam = damroll(2, 6);
+    int dam = damroll(2, 6);
     dam = mon_damage_mod(player_ptr, monap_ptr->m_ptr, dam, false);
     msg_format(_("%^sは聖なるオーラで傷ついた!", "%^s is injured by holy power!"), monap_ptr->m_name);
     MonsterDamageProcessor mdp(player_ptr, monap_ptr->m_idx, dam, &monap_ptr->fear, AttributeType::HOLY_FIRE);
@@ -165,7 +165,7 @@ static void aura_force_by_monster_attack(PlayerType *player_ptr, MonsterAttackPl
         return;
     }
 
-    HIT_POINT dam = damroll(2, 6);
+    int dam = damroll(2, 6);
     dam = mon_damage_mod(player_ptr, monap_ptr->m_ptr, dam, false);
     msg_format(_("%^sが鋭い闘気のオーラで傷ついた!", "%^s is injured by the Force"), monap_ptr->m_name);
     MonsterDamageProcessor mdp(player_ptr, monap_ptr->m_idx, dam, &monap_ptr->fear, AttributeType::MANA);
@@ -180,7 +180,7 @@ static void aura_shadow_by_monster_attack(PlayerType *player_ptr, MonsterAttackP
     if (!SpellHex(player_ptr).is_spelling_specific(HEX_SHADOW_CLOAK) || !monap_ptr->alive || player_ptr->is_dead)
         return;
 
-    HIT_POINT dam = 1;
+    int dam = 1;
     ObjectType *o_armed_ptr = &player_ptr->inventory_list[INVEN_MAIN_HAND];
     auto *r_ptr = &r_info[monap_ptr->m_ptr->r_idx];
     if (((r_ptr->flagsr & RFR_RES_ALL) != 0) || ((r_ptr->flagsr & RFR_RES_DARK) != 0)) {
index 4ce3c7b..302942e 100644 (file)
@@ -146,7 +146,7 @@ AttributeFlags shot_attribute(PlayerType *player_ptr, ObjectType *bow_ptr, Objec
  * @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;
 
@@ -1005,7 +1005,7 @@ bool test_hit_fire(PlayerType *player_ptr, int chance, monster_type *m_ptr, int
  * @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];
@@ -1157,9 +1157,9 @@ int bow_tmul(OBJECT_SUBTYPE_VALUE sval)
  * @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 */
@@ -1196,7 +1196,7 @@ HIT_POINT calc_crit_ratio_shot(PlayerType *player_ptr, HIT_POINT plus_ammo, HIT_
  * @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;
@@ -1239,7 +1239,7 @@ HIT_POINT calc_expect_crit_shot(PlayerType *player_ptr, WEIGHT weight, int plus_
  * @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;
@@ -1249,8 +1249,8 @@ HIT_POINT calc_expect_crit(PlayerType *player_ptr, WEIGHT weight, int plus, HIT_
         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));
index ad734b0..d23675a 100644 (file)
@@ -6,10 +6,10 @@ struct monster_type;
 class ObjectType;
 class PlayerType;
 bool test_hit_fire(PlayerType *player_ptr, int chance, monster_type *m_ptr, int vis, char *o_name);
-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);
 ENERGY bow_energy(OBJECT_SUBTYPE_VALUE sval);
 int bow_tmul(OBJECT_SUBTYPE_VALUE sval);
-HIT_POINT calc_crit_ratio_shot(PlayerType *player_ptr, HIT_POINT plus_ammo, HIT_POINT plus_bow);
-HIT_POINT calc_expect_crit_shot(PlayerType *player_ptr, WEIGHT weight, int plus_ammo, int plus_bow, HIT_POINT dam);
-HIT_POINT calc_expect_crit(PlayerType *player_ptr, WEIGHT weight, int plus, HIT_POINT dam, int16_t meichuu, bool dokubari, bool impact);
+int calc_crit_ratio_shot(PlayerType *player_ptr, int plus_ammo, int plus_bow);
+int calc_expect_crit_shot(PlayerType *player_ptr, WEIGHT weight, int plus_ammo, int plus_bow, int dam);
+int calc_expect_crit(PlayerType *player_ptr, WEIGHT weight, int plus, int dam, int16_t meichuu, bool dokubari, bool impact);
 void exe_fire(PlayerType *player_ptr, INVENTORY_IDX item, ObjectType *j_ptr, SPELL_IDX snipe_type);
index 21b5ecd..1de89d9 100644 (file)
@@ -147,7 +147,7 @@ MULTIPLY mult_brand(PlayerType *player_ptr, MULTIPLY mult, const TrFlags &flgs,
  * Note that most brands and slays are x3, except Slay Animal (x2),\n
  * Slay Evil (x2), and Kill dragon (x5).\n
  */
-HIT_POINT calc_attack_damage_with_slay(PlayerType *player_ptr, ObjectType *o_ptr, HIT_POINT tdam, monster_type *m_ptr, combat_options mode, bool thrown)
+int calc_attack_damage_with_slay(PlayerType *player_ptr, ObjectType *o_ptr, int tdam, monster_type *m_ptr, combat_options mode, bool thrown)
 {
     auto flgs = object_flags(o_ptr);
     torch_flags(o_ptr, flgs); /* torches has secret flags */
index cde00ed..98f3c1a 100644 (file)
@@ -11,5 +11,5 @@ class ObjectType;
 class PlayerType;
 MULTIPLY mult_slaying(PlayerType *player_ptr, MULTIPLY mult, const TrFlags &flgs, monster_type *m_ptr);
 MULTIPLY mult_brand(PlayerType *player_ptr, MULTIPLY mult, const TrFlags &flgs, monster_type *m_ptr);
-HIT_POINT calc_attack_damage_with_slay(PlayerType *player_ptr, ObjectType *o_ptr, HIT_POINT tdam, monster_type *m_ptr, combat_options mode, bool thrown);
+int calc_attack_damage_with_slay(PlayerType *player_ptr, ObjectType *o_ptr, int tdam, monster_type *m_ptr, combat_options mode, bool thrown);
 AttributeFlags melee_attribute(PlayerType *player_ptr, ObjectType *o_ptr, combat_options mode);
index 9ed9279..c62fab3 100644 (file)
@@ -62,7 +62,7 @@ static bool cave_naked_bold(PlayerType *player_ptr, POSITION y, POSITION x)
  * Perhaps we should affect doors?
  * </pre>
  */
-bool affect_feature(PlayerType *player_ptr, MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_POINT dam, AttributeType typ)
+bool affect_feature(PlayerType *player_ptr, MONSTER_IDX who, POSITION r, POSITION y, POSITION x, int dam, AttributeType typ)
 {
     auto *floor_ptr = player_ptr->current_floor_ptr;
     auto *g_ptr = &floor_ptr->grid_array[y][x];
index 9aab520..d2a9533 100644 (file)
@@ -4,4 +4,4 @@
 #include "effect/attribute-types.h"
 
 class PlayerType;
-bool affect_feature(PlayerType *player_ptr, MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_POINT dam, AttributeType typ);
+bool affect_feature(PlayerType *player_ptr, MONSTER_IDX who, POSITION r, POSITION y, POSITION x, int dam, AttributeType typ);
index efb50c6..75f92b8 100644 (file)
@@ -38,7 +38,7 @@
  * @param typ 効果属性 / Type of damage to apply to monsters (and objects)
  * @return 何か一つでも効力があればTRUEを返す / TRUE if any "effects" of the projection were observed, else FALSE
  */
-bool affect_item(PlayerType *player_ptr, MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_POINT dam, AttributeType typ)
+bool affect_item(PlayerType *player_ptr, MONSTER_IDX who, POSITION r, POSITION y, POSITION x, int dam, AttributeType typ)
 {
     auto *g_ptr = &player_ptr->current_floor_ptr->grid_array[y][x];
 
index 9ed643c..68d2801 100644 (file)
@@ -4,4 +4,4 @@
 #include "effect/attribute-types.h"
 
 class PlayerType;
-bool affect_item(PlayerType *player_ptr, MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_POINT dam, AttributeType typ);
+bool affect_item(PlayerType *player_ptr, MONSTER_IDX who, POSITION r, POSITION y, POSITION x, int dam, AttributeType typ);
index 949f0b1..51ec3f5 100644 (file)
@@ -363,7 +363,7 @@ process_result effect_monster_crusade(PlayerType *player_ptr, effect_monster_typ
  * @param hp 計算対象のHP
  * @return 捕まえられる最大HP
  */
-static HIT_POINT calcutate_capturable_hp(PlayerType *player_ptr, monster_type *m_ptr, HIT_POINT hp)
+static int calcutate_capturable_hp(PlayerType *player_ptr, monster_type *m_ptr, int hp)
 {
     if (is_pet(m_ptr))
         return hp * 4L;
@@ -386,7 +386,7 @@ static void effect_monster_captured(PlayerType *player_ptr, effect_monster_type
 
     msg_format(_("%sを捕えた!", "You capture %^s!"), em_ptr->m_name);
     cap_mon = em_ptr->m_ptr->r_idx;
-    cap_mspeed = static_cast<byte>(em_ptr->m_ptr->mspeed);
+    cap_mspeed = em_ptr->m_ptr->mspeed;
     cap_hp = static_cast<short>(em_ptr->m_ptr->hp);
     cap_maxhp = static_cast<short>(em_ptr->m_ptr->max_maxhp);
     cap_nickname = em_ptr->m_ptr->nickname;
index e8cf029..d518b6c 100644 (file)
@@ -28,7 +28,7 @@
  * @param flag 効果フラグ
  * @param see_s_msg TRUEならばメッセージを表示する
  */
-static void substitute_effect_monster(effect_monster_type *em_ptr, MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_POINT dam, AttributeType attribute, BIT_FLAGS flag, bool see_s_msg)
+static void substitute_effect_monster(effect_monster_type *em_ptr, MONSTER_IDX who, POSITION r, POSITION y, POSITION x, int dam, AttributeType attribute, BIT_FLAGS flag, bool see_s_msg)
 {
        em_ptr->who = who;
        em_ptr->r = r;
@@ -54,7 +54,7 @@ static void substitute_effect_monster(effect_monster_type *em_ptr, MONSTER_IDX w
  * @param flag 効果フラグ
  * @param see_s_msg TRUEならばメッセージを表示する
  */
-effect_monster_type *initialize_effect_monster(PlayerType *player_ptr, effect_monster_type *em_ptr, MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_POINT dam, AttributeType attribute, BIT_FLAGS flag, bool see_s_msg)
+effect_monster_type *initialize_effect_monster(PlayerType *player_ptr, effect_monster_type *em_ptr, MONSTER_IDX who, POSITION r, POSITION y, POSITION x, int dam, AttributeType attribute, BIT_FLAGS flag, bool see_s_msg)
 {
        substitute_effect_monster(em_ptr, who, r, y, x, dam, attribute, flag, see_s_msg);
 
index e735962..d3d129c 100644 (file)
@@ -38,7 +38,7 @@ struct effect_monster_type {
     POSITION r;
     POSITION y;
     POSITION x;
-    HIT_POINT dam;
+    int dam;
     AttributeType attribute;
     BIT_FLAGS flag;
     bool see_s_msg;
@@ -46,4 +46,4 @@ struct effect_monster_type {
 
 class PlayerType;
 effect_monster_type *initialize_effect_monster(PlayerType *player_ptr, effect_monster_type *em_ptr, MONSTER_IDX who, POSITION r, POSITION y, POSITION x,
-    HIT_POINT dam, AttributeType attribute, BIT_FLAGS flag, bool see_s_msg);
+    int dam, AttributeType attribute, BIT_FLAGS flag, bool see_s_msg);
index 0c45ffc..80f6ae9 100644 (file)
@@ -651,7 +651,7 @@ static void exe_affect_monster_postprocess(PlayerType *player_ptr, effect_monste
  * 3.ペット及び撮影による事後効果
  */
 bool affect_monster(
-    PlayerType *player_ptr, MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_POINT dam, AttributeType attribute, BIT_FLAGS flag, bool see_s_msg)
+    PlayerType *player_ptr, MONSTER_IDX who, POSITION r, POSITION y, POSITION x, int dam, AttributeType attribute, BIT_FLAGS flag, bool see_s_msg)
 {
     effect_monster_type tmp_effect;
     effect_monster_type *em_ptr = initialize_effect_monster(player_ptr, &tmp_effect, who, r, y, x, dam, attribute, flag, see_s_msg);
index fe97f2a..7c5cf23 100644 (file)
@@ -4,4 +4,4 @@
 #include "effect/attribute-types.h"
 
 class PlayerType;
-bool affect_monster(PlayerType *player_ptr, MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_POINT dam, AttributeType typ, BIT_FLAGS flag, bool see_s_msg);
+bool affect_monster(PlayerType *player_ptr, MONSTER_IDX who, POSITION r, POSITION y, POSITION x, int dam, AttributeType typ, BIT_FLAGS flag, bool see_s_msg);
index 08140a0..d911cd5 100644 (file)
@@ -35,7 +35,7 @@
 
 // 毒を除く4元素.
 void effect_player_elements(
-    PlayerType *player_ptr, EffectPlayerType *ep_ptr, concptr attack_message, HIT_POINT (*damage_func)(PlayerType *, HIT_POINT, concptr, bool))
+    PlayerType *player_ptr, EffectPlayerType *ep_ptr, concptr attack_message, int (*damage_func)(PlayerType *, int, concptr, bool))
 {
     if (player_ptr->blind)
         msg_print(attack_message);
index 05efe13..f223ddd 100644 (file)
@@ -5,7 +5,7 @@
 class EffectPlayerType;
 class PlayerType;
 void effect_player_elements(
-    PlayerType *player_ptr, EffectPlayerType *ep_ptr, concptr attack_message, HIT_POINT (*damage_func)(PlayerType *, HIT_POINT, concptr, bool));
+    PlayerType *player_ptr, EffectPlayerType *ep_ptr, concptr attack_message, int (*damage_func)(PlayerType *, int, concptr, bool));
 void effect_player_poison(PlayerType *player_ptr, EffectPlayerType *ep_ptr);
 void effect_player_nuke(PlayerType *player_ptr, EffectPlayerType *ep_ptr);
 void effect_player_missile(PlayerType *player_ptr, EffectPlayerType *ep_ptr);
index 4dde00b..b183034 100644 (file)
@@ -46,7 +46,7 @@
  * @param monspell 効果元のモンスター魔法ID
  * @return 初期化後の構造体ポインタ
  */
-EffectPlayerType::EffectPlayerType(MONSTER_IDX who, HIT_POINT dam, AttributeType attribute, BIT_FLAGS flag)
+EffectPlayerType::EffectPlayerType(MONSTER_IDX who, int dam, AttributeType attribute, BIT_FLAGS flag)
     : rlev(0), m_ptr(nullptr), killer(""), m_name(""), get_damage(0), who(who), dam(dam), attribute(attribute), flag(flag)
 {
 }
@@ -181,7 +181,7 @@ static void describe_effect_source(PlayerType *player_ptr, EffectPlayerType *ep_
  * @param monspell 効果元のモンスター魔法ID
  * @return 何か一つでも効力があればTRUEを返す / TRUE if any "effects" of the projection were observed, else FALSE
  */
-bool affect_player(MONSTER_IDX who, PlayerType *player_ptr, concptr who_name, int r, POSITION y, POSITION x, HIT_POINT dam, AttributeType attribute,
+bool affect_player(MONSTER_IDX who, PlayerType *player_ptr, concptr who_name, int r, POSITION y, POSITION x, int dam, AttributeType attribute,
     BIT_FLAGS flag, project_func project)
 {
     EffectPlayerType tmp_effect(who, dam, attribute, flag);
index e94b129..c50dbda 100644 (file)
@@ -13,10 +13,10 @@ public:
     int get_damage;
 
     MONSTER_IDX who;
-    HIT_POINT dam;
+    int dam;
     AttributeType attribute;
     BIT_FLAGS flag;
-    EffectPlayerType(MONSTER_IDX who, HIT_POINT dam, AttributeType attribute, BIT_FLAGS flag);
+    EffectPlayerType(MONSTER_IDX who, int dam, AttributeType attribute, BIT_FLAGS flag);
 
 };
 
@@ -25,7 +25,7 @@ struct ProjectResult;
 
 class PlayerType;
 using project_func = ProjectResult (*)(
-    PlayerType *player_ptr, MONSTER_IDX who, POSITION rad, POSITION y, POSITION x, HIT_POINT dam, AttributeType typ, BIT_FLAGS flag);
+    PlayerType *player_ptr, MONSTER_IDX who, POSITION rad, POSITION y, POSITION x, int dam, AttributeType typ, BIT_FLAGS flag);
 
-bool affect_player(MONSTER_IDX who, PlayerType *player_ptr, concptr who_name, int r, POSITION y, POSITION x, HIT_POINT dam, AttributeType typ, BIT_FLAGS flag,
+bool affect_player(MONSTER_IDX who, PlayerType *player_ptr, concptr who_name, int r, POSITION y, POSITION x, int dam, AttributeType typ, BIT_FLAGS flag,
     project_func project);
index 6a1fbae..d2d4902 100644 (file)
@@ -87,7 +87,7 @@ static void next_mirror(PlayerType *player_ptr, POSITION *next_y, POSITION *next
  * @todo 似たような処理が山ほど並んでいる、何とかならないものか
  * @todo 引数にそのまま再代入していてカオスすぎる。直すのは簡単ではない
  */
-ProjectResult project(PlayerType *player_ptr, const MONSTER_IDX who, POSITION rad, POSITION y, POSITION x, const HIT_POINT dam,
+ProjectResult project(PlayerType *player_ptr, const MONSTER_IDX who, POSITION rad, POSITION y, POSITION x, const int dam,
     const AttributeType typ, BIT_FLAGS flag)
 {
     int dist;
index a6e7369..787872a 100644 (file)
@@ -14,5 +14,5 @@ struct ProjectResult {
 class EffectPlayerType;
 class PlayerType;
 ProjectResult project(
-    PlayerType *player_ptr, const MONSTER_IDX who, POSITION rad, POSITION y, POSITION x, const HIT_POINT dam, const AttributeType typ,
+    PlayerType *player_ptr, const MONSTER_IDX who, POSITION rad, POSITION y, POSITION x, const int dam, const AttributeType typ,
     BIT_FLAGS flag);
index 4352b4d..d8e4807 100644 (file)
@@ -285,7 +285,7 @@ static int check_hit_from_monster_to_player(PlayerType *player_ptr, int power)
  */
 static void hit_trap_pit(PlayerType *player_ptr, TrapType trap_feat_type)
 {
-    HIT_POINT dam;
+    int dam;
     concptr trap_name = "";
     concptr spike_name = "";
 
index 7297f9c..57a8ed0 100644 (file)
@@ -210,7 +210,7 @@ void process_player_hp_mp(PlayerType *player_ptr)
     }
 
     if (get_player_flags(player_ptr, TR_SELF_FIRE) && !has_immune_fire(player_ptr)) {
-        HIT_POINT damage;
+        int damage;
         damage = player_ptr->lev;
         if (race.tr_flags().has(TR_VUL_FIRE))
             damage += damage / 3;
@@ -225,7 +225,7 @@ void process_player_hp_mp(PlayerType *player_ptr)
     }
 
     if (get_player_flags(player_ptr, TR_SELF_ELEC) && !has_immune_elec(player_ptr)) {
-        HIT_POINT damage;
+        int damage;
         damage = player_ptr->lev;
         if (race.tr_flags().has(TR_VUL_ELEC))
             damage += damage / 3;
@@ -240,7 +240,7 @@ void process_player_hp_mp(PlayerType *player_ptr)
     }
 
     if (get_player_flags(player_ptr, TR_SELF_COLD) && !has_immune_cold(player_ptr)) {
-        HIT_POINT damage;
+        int damage;
         damage = player_ptr->lev;
         if (race.tr_flags().has(TR_VUL_COLD))
             damage += damage / 3;
@@ -255,7 +255,7 @@ void process_player_hp_mp(PlayerType *player_ptr)
     }
 
     if (player_ptr->riding) {
-        HIT_POINT damage;
+        int damage;
         auto auras = r_info[player_ptr->current_floor_ptr->m_list[player_ptr->riding].r_idx].aura_flags;
         if (auras.has(MonsterAuraType::FIRE) && !has_immune_fire(player_ptr)) {
             damage = r_info[player_ptr->current_floor_ptr->m_list[player_ptr->riding].r_idx].level / 2;
index fc7bc9e..af76326 100644 (file)
@@ -33,14 +33,14 @@ void regenhp(PlayerType *player_ptr, int percent)
     if (player_ptr->action == ACTION_HAYAGAKE)
         return;
 
-    HIT_POINT old_chp = player_ptr->chp;
+    int old_chp = player_ptr->chp;
 
     /*
      * Extract the new hitpoints
      *
      * 'percent' is the Regen factor in unit (1/2^16)
      */
-    HIT_POINT new_chp = 0;
+    int new_chp = 0;
     uint32_t new_chp_frac = (player_ptr->mhp * percent + PY_REGEN_HPBASE);
     s64b_lshift(&new_chp, &new_chp_frac, 16);
     s64b_add(&(player_ptr->chp), &(player_ptr->chp_frac), new_chp, new_chp_frac);
index 1c807df..8ed104a 100644 (file)
@@ -35,7 +35,7 @@
  * @param force 理力特別計算フラグ
  * @return ダメージ期待値
  */
-static HIT_POINT calc_slaydam(HIT_POINT dam, int mult, int div, bool force)
+static int calc_slaydam(int dam, int mult, int div, bool force)
 {
     int tmp;
     if (force) {
index e9e5ab9..9c630ce 100644 (file)
@@ -22,7 +22,7 @@
  * @param to_ac ACをアップさせる量
  * @return 実際に行ったらTRUE
  */
-bool enchant_item(PlayerType *player_ptr, PRICE cost, HIT_PROB to_hit, HIT_POINT to_dam, ARMOUR_CLASS to_ac, const ItemTester& item_tester)
+bool enchant_item(PlayerType *player_ptr, PRICE cost, HIT_PROB to_hit, int to_dam, ARMOUR_CLASS to_ac, const ItemTester& item_tester)
 {
     clear_bldg(4, 18);
     int maxenchant = (player_ptr->lev / 5);
index c03deb8..43ebbe6 100644 (file)
@@ -4,4 +4,4 @@
 
 class PlayerType;
 class ItemTester;
-bool enchant_item(PlayerType *player_ptr, PRICE cost, HIT_PROB to_hit, HIT_POINT to_dam, ARMOUR_CLASS to_ac, const ItemTester &item_tester);
+bool enchant_item(PlayerType *player_ptr, PRICE cost, HIT_PROB to_hit, int to_dam, ARMOUR_CLASS to_ac, const ItemTester &item_tester);
index c677fc1..4dbc132 100644 (file)
@@ -51,7 +51,7 @@ struct mam_pp_type {
     monster_type *m_ptr;
     bool seen;
     GAME_TEXT m_name[160];
-    HIT_POINT dam;
+    int dam;
     bool known; /* Can the player be aware of this attack? */
     concptr note;
     bool *dead;
@@ -60,7 +60,7 @@ struct mam_pp_type {
 };
 
 mam_pp_type *initialize_mam_pp_type(
-    PlayerType *player_ptr, mam_pp_type *mam_pp_ptr, MONSTER_IDX m_idx, HIT_POINT dam, bool *dead, bool *fear, concptr note, MONSTER_IDX who)
+    PlayerType *player_ptr, mam_pp_type *mam_pp_ptr, MONSTER_IDX m_idx, int dam, bool *dead, bool *fear, concptr note, MONSTER_IDX who)
 {
     mam_pp_ptr->m_idx = m_idx;
     mam_pp_ptr->m_ptr = &player_ptr->current_floor_ptr->m_list[m_idx];
@@ -253,7 +253,7 @@ static void fall_off_horse_by_melee(PlayerType *player_ptr, mam_pp_type *mam_pp_
  * @param who 打撃を行ったモンスターの参照ID
  * @todo 打撃が当たった時の後処理 (爆発持ちのモンスターを爆発させる等)なので、関数名を変更する必要あり
  */
-void mon_take_hit_mon(PlayerType *player_ptr, MONSTER_IDX m_idx, HIT_POINT dam, bool *dead, bool *fear, concptr note, MONSTER_IDX who)
+void mon_take_hit_mon(PlayerType *player_ptr, MONSTER_IDX m_idx, int dam, bool *dead, bool *fear, concptr note, MONSTER_IDX who)
 {
     auto *floor_ptr = player_ptr->current_floor_ptr;
     auto *m_ptr = &floor_ptr->m_list[m_idx];
index c237ef8..2508d60 100644 (file)
@@ -4,4 +4,4 @@
 #include "combat/combat-options-type.h"
 
 class PlayerType;
-void mon_take_hit_mon(PlayerType *player_ptr, MONSTER_IDX m_idx, HIT_POINT dam, bool *dead, bool *fear, concptr note, MONSTER_IDX who);
+void mon_take_hit_mon(PlayerType *player_ptr, MONSTER_IDX m_idx, int dam, bool *dead, bool *fear, concptr note, MONSTER_IDX who);
index 009a438..e5b0b06 100644 (file)
@@ -14,7 +14,7 @@ struct melee_spell_type {
     POSITION x;
     MONSTER_IDX target_idx;
     MonsterAbilityType thrown_spell;
-    HIT_POINT dam;
+    int dam;
     std::vector<MonsterAbilityType> spells;
     GAME_TEXT m_name[160];
 #ifdef JP
index 62831b5..62b3179 100644 (file)
@@ -15,7 +15,7 @@ struct mam_type {
     monster_type *t_ptr;
     GAME_TEXT m_name[MAX_NLEN];
     GAME_TEXT t_name[MAX_NLEN];
-    HIT_POINT damage;
+    int damage;
     bool see_m;
     bool see_t;
     bool see_either;
@@ -31,7 +31,7 @@ struct mam_type {
     DEPTH rlev;
     bool blinked;
     bool do_silly_attack;
-    HIT_POINT power;
+    int power;
     bool obvious;
     int d_dice;
     int d_side;
index 2ee9f1e..e1c3e7f 100644 (file)
@@ -478,7 +478,7 @@ static bool cast_element_spell(PlayerType *player_ptr, SPELL_IDX spell_idx)
     AttributeType typ;
     DIRECTION dir;
     PLAYER_LEVEL plev = player_ptr->lev;
-    HIT_POINT dam;
+    int dam;
     POSITION y, x;
     int num;
 
index 1fd1c48..c629150 100644 (file)
@@ -196,7 +196,7 @@ bool shock_power(PlayerType *player_ptr)
     POSITION y = player_ptr->y + ddy[dir];
     POSITION x = player_ptr->x + ddx[dir];
     PLAYER_LEVEL plev = player_ptr->lev;
-    HIT_POINT dam = damroll(8 + ((plev - 5) / 4) + boost / 12, 8);
+    int dam = damroll(8 + ((plev - 5) / 4) + boost / 12, 8);
     fire_beam(player_ptr, AttributeType::MISSILE, dir, dam);
     if (!player_ptr->current_floor_ptr->grid_array[y][x].m_idx)
         return true;
index e943b79..0d1ba61 100644 (file)
@@ -104,7 +104,7 @@ void remove_all_mirrors(PlayerType *player_ptr, bool explode)
  * @param dam ダメージ量
  * @return 効果があったらTRUEを返す
  */
-bool binding_field(PlayerType *player_ptr, HIT_POINT dam)
+bool binding_field(PlayerType *player_ptr, int dam)
 {
     POSITION mirror_x[10], mirror_y[10]; /* 鏡はもっと少ない */
     int mirror_num = 0; /* 鏡の数 */
@@ -228,7 +228,7 @@ bool binding_field(PlayerType *player_ptr, HIT_POINT dam)
  * @param dam ダメージ量
  * @return 効果があったらTRUEを返す
  */
-void seal_of_mirror(PlayerType *player_ptr, HIT_POINT dam)
+void seal_of_mirror(PlayerType *player_ptr, int dam)
 {
     for (POSITION x = 0; x < player_ptr->current_floor_ptr->width; x++) {
         for (POSITION y = 0; y < player_ptr->current_floor_ptr->height; y++) {
@@ -476,7 +476,7 @@ bool cast_mirror_spell(PlayerType *player_ptr, mind_mirror_master_type spell)
         for (x = 0; x < player_ptr->current_floor_ptr->width; x++)
             for (y = 0; y < player_ptr->current_floor_ptr->height; y++)
                 if (player_ptr->current_floor_ptr->grid_array[y][x].is_mirror())
-                    project(player_ptr, 0, 2, y, x, (HIT_POINT)plev, AttributeType::OLD_SLEEP,
+                    project(player_ptr, 0, 2, y, x, (int)plev, AttributeType::OLD_SLEEP,
                         (PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL | PROJECT_JUMP | PROJECT_NO_HANGEKI));
 
         break;
index 6b2bbdd..25b74bf 100644 (file)
@@ -6,8 +6,8 @@ class PlayerType;
 bool check_multishadow(PlayerType *player_ptr);
 bool mirror_concentration(PlayerType *player_ptr);
 void remove_all_mirrors(PlayerType *player_ptr, bool explode);
-bool binding_field(PlayerType *player_ptr, HIT_POINT dam);
-void seal_of_mirror(PlayerType *player_ptr, HIT_POINT dam);
+bool binding_field(PlayerType *player_ptr, int dam);
+void seal_of_mirror(PlayerType *player_ptr, int dam);
 bool confusing_light(PlayerType *player_ptr);
 bool place_mirror(PlayerType *player_ptr);
 bool mirror_tunnel(PlayerType *player_ptr);
index 4ee878c..b548721 100644 (file)
@@ -29,10 +29,10 @@ public:
     int d_side = 0;
     ObjectType *o_ptr = nullptr;
     bool obvious = false;
-    HIT_POINT damage = 0;
+    int damage = 0;
     bool blinked = false;
     GAME_TEXT o_name[MAX_NLEN]{};
-    HIT_POINT get_damage = 0;
+    int get_damage = 0;
     GAME_TEXT ddesc[MAX_MONSTER_NAME]{};
     ARMOUR_CLASS ac = 0;
     bool alive = true;
index 1bfc522..84c64e3 100644 (file)
@@ -211,7 +211,7 @@ bool process_un_power(PlayerType *player_ptr, MonsterAttackPlayer *monap_ptr)
     object_kind *kind_ptr = &k_info[monap_ptr->o_ptr->k_idx];
     PARAMETER_VALUE pval = kind_ptr->pval;
     DEPTH level = monap_ptr->rlev;
-    HIT_POINT drain = is_magic_mastery ? std::min<short>(pval, pval * level / 400 + pval * randint1(level) / 400) : pval;
+    int drain = is_magic_mastery ? std::min<short>(pval, pval * level / 400 + pval * randint1(level) / 400) : pval;
     if (drain <= 0)
         return false;
 
@@ -220,7 +220,7 @@ bool process_un_power(PlayerType *player_ptr, MonsterAttackPlayer *monap_ptr)
         msg_print(_("しかし、あなたの魔法を操る力がその一部を取り返した!", "However, your skill of magic mastery got back the part of energy!"));
 
     monap_ptr->obvious = true;
-    HIT_POINT recovery = drain * kind_ptr->level;
+    int recovery = drain * kind_ptr->level;
 
     if (monap_ptr->o_ptr->tval == ItemKindType::STAFF)
         recovery *= monap_ptr->o_ptr->number;
index 1c62c18..906a86b 100644 (file)
@@ -69,7 +69,7 @@ static void on_dead_explosion(PlayerType *player_ptr, monster_death_type *md_ptr
         AttributeType typ = mbe_info[enum2i(md_ptr->r_ptr->blow[i].effect)].explode_type;
         DICE_NUMBER d_dice = md_ptr->r_ptr->blow[i].d_dice;
         DICE_SID d_side = md_ptr->r_ptr->blow[i].d_side;
-        HIT_POINT damage = damroll(d_dice, d_side);
+        int damage = damroll(d_dice, d_side);
         (void)project(player_ptr, md_ptr->m_idx, 3, md_ptr->md_y, md_ptr->md_x, damage, typ, flg);
         break;
     }
index a29755d..a18d1c2 100644 (file)
@@ -823,7 +823,7 @@ bool monster_can_entry_arena(PlayerType *player_ptr, MONRACE_IDX r_idx)
     /* Unused */
     (void)player_ptr;
 
-    HIT_POINT dam = 0;
+    int dam = 0;
     auto *r_ptr = &r_info[r_idx];
     bool unselectable = r_ptr->behavior_flags.has(MonsterBehaviorType::NEVER_MOVE);
     unselectable |= any_bits(r_ptr->flags2, RF2_MULTIPLY);
index 423dd63..a77763e 100644 (file)
@@ -57,7 +57,7 @@
  * @param attribute 与えたダメージの種類 (単一属性)
  * @param note モンスターが倒された際の特別なメッセージ述語
  */
-MonsterDamageProcessor::MonsterDamageProcessor(PlayerType *player_ptr, MONSTER_IDX m_idx, HIT_POINT dam, bool *fear, AttributeType attribute)
+MonsterDamageProcessor::MonsterDamageProcessor(PlayerType *player_ptr, MONSTER_IDX m_idx, int dam, bool *fear, AttributeType attribute)
     : player_ptr(player_ptr)
     , m_idx(m_idx)
     , dam(dam)
@@ -76,7 +76,7 @@ MonsterDamageProcessor::MonsterDamageProcessor(PlayerType *player_ptr, MONSTER_I
  * @param attribute_flags 与えたダメージの種類 (複数属性)
  * @param note モンスターが倒された際の特別なメッセージ述語
  */
-MonsterDamageProcessor::MonsterDamageProcessor(PlayerType *player_ptr, MONSTER_IDX m_idx, HIT_POINT dam, bool *fear, AttributeFlags attribute_flags)
+MonsterDamageProcessor::MonsterDamageProcessor(PlayerType *player_ptr, MONSTER_IDX m_idx, int dam, bool *fear, AttributeFlags attribute_flags)
     : player_ptr(player_ptr)
     , m_idx(m_idx)
     , dam(dam)
@@ -427,7 +427,7 @@ void MonsterDamageProcessor::show_bounty_message(GAME_TEXT *m_name)
  * experience point of a monster later.
  * </pre>
  */
-void MonsterDamageProcessor::get_exp_from_mon(monster_type *m_ptr, HIT_POINT exp_dam)
+void MonsterDamageProcessor::get_exp_from_mon(monster_type *m_ptr, int exp_dam)
 {
     auto *r_ptr = &r_info[m_ptr->r_idx];
     if (!monster_is_valid(m_ptr) || is_pet(m_ptr) || this->player_ptr->phase_out) {
index c012de0..cbaa262 100644 (file)
@@ -13,18 +13,18 @@ class PlayerType;
 typedef std::vector<std::tuple<monster_race_type, monster_race_type, monster_race_type>> combined_uniques;
 class MonsterDamageProcessor {
 public:
-    MonsterDamageProcessor(PlayerType *player_ptr, MONSTER_IDX m_idx, HIT_POINT dam, bool *fear, AttributeType type);
-    MonsterDamageProcessor(PlayerType *player_ptr, MONSTER_IDX m_idx, HIT_POINT dam, bool *fear, AttributeFlags attribute_flags);
+    MonsterDamageProcessor(PlayerType *player_ptr, MONSTER_IDX m_idx, int dam, bool *fear, AttributeType type);
+    MonsterDamageProcessor(PlayerType *player_ptr, MONSTER_IDX m_idx, int dam, bool *fear, AttributeFlags attribute_flags);
     virtual ~MonsterDamageProcessor() = default;
     bool mon_take_hit(concptr note);
 
 private:
     PlayerType *player_ptr;
     MONSTER_IDX m_idx;
-    HIT_POINT dam;
+    int dam;
     bool *fear;
     AttributeFlags attribute_flags{};
-    void get_exp_from_mon(monster_type *m_ptr, HIT_POINT exp_dam);
+    void get_exp_from_mon(monster_type *m_ptr, int exp_dam);
     bool genocide_chaos_patron();
     bool process_dead_exp_virtue(concptr note, monster_type *exp_mon);
     void death_special_flag_monster();
index 86c646e..a3b45e1 100644 (file)
@@ -247,7 +247,7 @@ void monster_desc(PlayerType *player_ptr, char *desc, monster_type *m_ptr, BIT_F
  * @details
  * Technically should attempt to treat "Beholder"'s as jelly's
  */
-void message_pain(PlayerType *player_ptr, MONSTER_IDX m_idx, HIT_POINT dam)
+void message_pain(PlayerType *player_ptr, MONSTER_IDX m_idx, int dam)
 {
     auto *m_ptr = &player_ptr->current_floor_ptr->m_list[m_idx];
     auto *r_ptr = &r_info[m_ptr->r_idx];
@@ -263,9 +263,9 @@ void message_pain(PlayerType *player_ptr, MONSTER_IDX m_idx, HIT_POINT dam)
         return;
     }
 
-    HIT_POINT newhp = m_ptr->hp;
-    HIT_POINT oldhp = newhp + dam;
-    HIT_POINT tmp = (newhp * 100L) / oldhp;
+    int newhp = m_ptr->hp;
+    int oldhp = newhp + dam;
+    int tmp = (newhp * 100L) / oldhp;
     PERCENTAGE percentage = tmp;
 
     if (angband_strchr(",ejmvwQ", r_ptr->d_char)) {
index 299373b..729223f 100644 (file)
@@ -5,4 +5,4 @@
 struct monster_type;
 class PlayerType;
 void monster_desc(PlayerType *player_ptr, char *desc, monster_type *m_ptr, BIT_FLAGS mode);
-void message_pain(PlayerType *player_ptr, MONSTER_IDX m_idx, HIT_POINT dam);
+void message_pain(PlayerType *player_ptr, MONSTER_IDX m_idx, int dam);
index 925c54c..e217ddf 100644 (file)
@@ -68,7 +68,7 @@ DEPTH monster_level_idx(floor_type *floor_ptr, MONSTER_IDX m_idx)
  * @return 修正を行った結果のダメージ量
  * @details RES_ALL持ちはAC軽減後のダメージを1/100に補正する. 光の剣は無敵を無効化する. 一定確率で無敵は貫通できる.
  */
-HIT_POINT mon_damage_mod(PlayerType *player_ptr, monster_type *m_ptr, HIT_POINT dam, bool is_psy_spear)
+int mon_damage_mod(PlayerType *player_ptr, monster_type *m_ptr, int dam, bool is_psy_spear)
 {
     auto *r_ptr = &r_info[m_ptr->r_idx];
     if ((r_ptr->flagsr & RFR_RES_ALL) && dam > 0) {
index d535347..b5d6250 100644 (file)
@@ -8,7 +8,7 @@ struct monster_type;
 bool monster_is_powerful(floor_type *floor_ptr, MONSTER_IDX m_idx);
 DEPTH monster_level_idx(floor_type *floor_ptr, MONSTER_IDX m_idx);
 
-HIT_POINT mon_damage_mod(PlayerType *player_ptr, monster_type *m_ptr, HIT_POINT dam, bool is_psy_spear);
+int mon_damage_mod(PlayerType *player_ptr, monster_type *m_ptr, int dam, bool is_psy_spear);
 bool monster_is_valid(monster_type *m_ptr);
 
 void dispel_monster_status(PlayerType *player_ptr, MONSTER_IDX m_idx);
index 96cfada..2868cf2 100644 (file)
@@ -59,7 +59,7 @@ static bool spell_RF4_BREATH_special_message(MONSTER_IDX r_idx, AttributeType GF
  */
 MonsterSpellResult spell_RF4_BREATH(PlayerType *player_ptr, AttributeType GF_TYPE, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
 {
-    HIT_POINT dam, drs_type = 0;
+    int dam, drs_type = 0;
     concptr type_s;
     bool smart_learn_aux = true;
     auto *floor_ptr = player_ptr->current_floor_ptr;
index 9cfad78..05507ec 100644 (file)
@@ -29,7 +29,7 @@
  * @param MS_TYPE 呪文の番号
  * @param TARGET_TYPE プレイヤーを対象とする場合MONSTER_TO_PLAYER、モンスターを対象とする場合MONSTER_TO_MONSTER
  */
-static MonsterSpellResult spell_RF5_CAUSE(PlayerType *player_ptr, AttributeType GF_TYPE, HIT_POINT dam, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx,
+static MonsterSpellResult spell_RF5_CAUSE(PlayerType *player_ptr, AttributeType GF_TYPE, int dam, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx,
     concptr msg1, concptr msg2, concptr msg3, int TARGET_TYPE)
 {
     auto res = MonsterSpellResult::make_valid(dam);
index 86a8a68..940e128 100644 (file)
@@ -23,7 +23,7 @@
  * @param TYPE  DAM_MAXで最大値を返し、DAM_MINで最小値を返す。DAM_ROLLはダイスを振って値を決定する。
  * @return 攻撃呪文のダメージを返す。攻撃呪文以外は-1を返す。
  */
-static HIT_POINT monspell_damage_roll(HIT_POINT dam, int dice_num, int dice_side, int mult, int div, int TYPE)
+static int monspell_damage_roll(int dam, int dice_num, int dice_side, int mult, int div, int TYPE)
 {
     switch (TYPE) {
     case DAM_MAX:
@@ -65,10 +65,10 @@ static HIT_POINT monspell_damage_roll(HIT_POINT dam, int dice_num, int dice_side
  * @param TYPE  DAM_MAXで最大値を返し、DAM_MINで最小値を返す。DAM_ROLLはダイスを振って値を決定する。
  * @return 攻撃呪文のダメージを返す。攻撃呪文以外は-1を返す。
  */
-static HIT_POINT monspell_damage_base(
+static int monspell_damage_base(
     PlayerType *player_ptr, MonsterAbilityType ms_type, int hp, int rlev, bool powerful, int shoot_dd, int shoot_ds, int shoot_base, int TYPE)
 {
-    HIT_POINT dam = 0, dice_num = 0, dice_side = 0, mult = 1, div = 1;
+    int dam = 0, dice_num = 0, dice_side = 0, mult = 1, div = 1;
 
     switch (ms_type) {
     case MonsterAbilityType::SHRIEK:
@@ -476,13 +476,13 @@ void monspell_shoot_dice(monster_race *r_ptr, int *dd, int *ds)
  * @param TYPE  DAM_MAXで最大値を返し、DAM_MINで最小値を返す。DAM_ROLLはダイスを振って値を決定する。
  * @return 攻撃呪文のダメージを返す。攻撃呪文以外は-1を返す。
  */
-HIT_POINT monspell_damage(PlayerType *player_ptr, MonsterAbilityType ms_type, MONSTER_IDX m_idx, int TYPE)
+int monspell_damage(PlayerType *player_ptr, MonsterAbilityType ms_type, MONSTER_IDX m_idx, int TYPE)
 {
     auto *floor_ptr = player_ptr->current_floor_ptr;
     auto *m_ptr = &floor_ptr->m_list[m_idx];
     auto *r_ptr = &r_info[m_ptr->r_idx];
     DEPTH rlev = monster_level_idx(floor_ptr, m_idx);
-    HIT_POINT hp = (TYPE == DAM_ROLL) ? m_ptr->hp : m_ptr->max_maxhp;
+    int hp = (TYPE == DAM_ROLL) ? m_ptr->hp : m_ptr->max_maxhp;
     int shoot_dd, shoot_ds;
 
     monspell_shoot_dice(r_ptr, &shoot_dd, &shoot_ds);
@@ -497,12 +497,12 @@ HIT_POINT monspell_damage(PlayerType *player_ptr, MonsterAbilityType ms_type, MO
  * @param TYPE  DAM_MAXで最大値を返し、DAM_MINで最小値を返す。DAM_ROLLはダイスを振って値を決定する。
  * @return 攻撃呪文のダメージを返す。攻撃呪文以外は-1を返す。
  */
-HIT_POINT monspell_race_damage(PlayerType *player_ptr, MonsterAbilityType ms_type, MONRACE_IDX r_idx, int TYPE)
+int monspell_race_damage(PlayerType *player_ptr, MonsterAbilityType ms_type, MONRACE_IDX r_idx, int TYPE)
 {
     auto *r_ptr = &r_info[r_idx];
     DEPTH rlev = ((r_ptr->level >= 1) ? r_ptr->level : 1);
     bool powerful = any_bits(r_ptr->flags2, RF2_POWERFUL);
-    HIT_POINT hp = r_ptr->hdice * (ironman_nightmare ? 2 : 1) * r_ptr->hside;
+    int hp = r_ptr->hdice * (ironman_nightmare ? 2 : 1) * r_ptr->hside;
     int shoot_dd, shoot_ds;
 
     monspell_shoot_dice(r_ptr, &shoot_dd, &shoot_ds);
@@ -517,7 +517,7 @@ HIT_POINT monspell_race_damage(PlayerType *player_ptr, MonsterAbilityType ms_typ
  * @param TYPE  DAM_MAXで最大値を返し、DAM_MINで最小値を返す。DAM_ROLLはダイスを振って値を決定する。
  * @return 攻撃呪文のダメージを返す。攻撃呪文以外は-1を返す。
  */
-HIT_POINT monspell_bluemage_damage(PlayerType *player_ptr, MonsterAbilityType ms_type, PLAYER_LEVEL plev, int TYPE)
+int monspell_bluemage_damage(PlayerType *player_ptr, MonsterAbilityType ms_type, PLAYER_LEVEL plev, int TYPE)
 {
     int hp = player_ptr->chp;
     int shoot_dd = 1, shoot_ds = 1, shoot_base = 0;
index 35520ac..b1eed6d 100644 (file)
@@ -15,6 +15,6 @@ enum spell_flag_type {
 
 enum class MonsterAbilityType;
 class PlayerType;
-HIT_POINT monspell_damage(PlayerType *player_ptr, MonsterAbilityType ms_type, MONSTER_IDX m_idx, int TYPE);
-HIT_POINT monspell_race_damage(PlayerType *player_ptr, MonsterAbilityType ms_type, MONRACE_IDX r_idx, int TYPE);
-HIT_POINT monspell_bluemage_damage(PlayerType *player_ptr, MonsterAbilityType ms_type, PLAYER_LEVEL plev, int TYPE);
+int monspell_damage(PlayerType *player_ptr, MonsterAbilityType ms_type, MONSTER_IDX m_idx, int TYPE);
+int monspell_race_damage(PlayerType *player_ptr, MonsterAbilityType ms_type, MONRACE_IDX r_idx, int TYPE);
+int monspell_bluemage_damage(PlayerType *player_ptr, MonsterAbilityType ms_type, PLAYER_LEVEL plev, int TYPE);
index 3bf3c75..0cf9ea3 100644 (file)
@@ -4,7 +4,7 @@
 //! モンスターが魔法を使った際の結果。
 struct MonsterSpellResult {
 private:
-    explicit MonsterSpellResult(const bool valid, const HIT_POINT dam = 0)
+    explicit MonsterSpellResult(const bool valid, const int dam = 0)
         : valid(valid)
         , dam(dam)
     {
@@ -13,9 +13,9 @@ private:
 public:
     bool valid; //!< 通常は true。何か変なこと(無効な魔法IDなど)が起こったら false
     bool learnable{ false }; //!< ラーニングを試みるか
-    HIT_POINT dam{}; //! ダメージ量(ものまね用)
+    int dam{}; //! ダメージ量(ものまね用)
 
-    static MonsterSpellResult make_valid(HIT_POINT dam = 0)
+    static MonsterSpellResult make_valid(int dam = 0)
     {
         return MonsterSpellResult(true, dam);
     }
index 0881e2f..59071e3 100644 (file)
@@ -46,7 +46,7 @@ static MonsterSpellResult spell_RF6_SPECIAL_BANORLUPART(PlayerType *player_ptr,
 {
     auto *floor_ptr = player_ptr->current_floor_ptr;
     auto *m_ptr = &floor_ptr->m_list[m_idx];
-    HIT_POINT dummy_hp, dummy_maxhp;
+    int dummy_hp, dummy_maxhp;
     POSITION dummy_y = m_ptr->fy;
     POSITION dummy_x = m_ptr->fx;
     BIT_FLAGS mode = 0L;
@@ -184,7 +184,7 @@ static MonsterSpellResult spell_RF6_SPECIAL_B(PlayerType *player_ptr, POSITION y
     simple_monspell_message(player_ptr, m_idx, t_idx, msg, TARGET_TYPE);
 
     bool fear, dead; /* dummy */
-    HIT_POINT dam = damroll(4, 8);
+    int dam = damroll(4, 8);
 
     if (monster_to_player || t_idx == player_ptr->riding)
         teleport_player_to(player_ptr, m_ptr->fy, m_ptr->fx, i2enum<teleport_flags>(TELEPORT_NONMAGICAL | TELEPORT_PASSIVE));
index 746c222..efa01f6 100644 (file)
@@ -441,7 +441,7 @@ void process_world_aux_mutation(PlayerType *player_ptr)
     if (player_ptr->muta.has(PlayerMutationType::SP_TO_HP) && one_in_(2000)) {
         MANA_POINT wounds = (MANA_POINT)(player_ptr->mhp - player_ptr->chp);
         if (wounds > 0) {
-            HIT_POINT healing = player_ptr->csp;
+            int healing = player_ptr->csp;
             if (healing > wounds)
                 healing = wounds;
 
@@ -452,9 +452,9 @@ void process_world_aux_mutation(PlayerType *player_ptr)
     }
 
     if (player_ptr->muta.has(PlayerMutationType::HP_TO_SP) && !player_ptr->anti_magic && one_in_(4000)) {
-        HIT_POINT wounds = (HIT_POINT)(player_ptr->msp - player_ptr->csp);
+        int wounds = (int)(player_ptr->msp - player_ptr->csp);
         if (wounds > 0) {
-            HIT_POINT healing = player_ptr->chp;
+            int healing = player_ptr->chp;
             if (healing > wounds)
                 healing = wounds;
 
index ceff14c..28e312f 100644 (file)
@@ -304,7 +304,7 @@ bool activate_ball_water(PlayerType *player_ptr, concptr name)
 
 bool activate_ball_lite(PlayerType *player_ptr, concptr name)
 {
-    HIT_POINT num = damroll(5, 3);
+    int num = damroll(5, 3);
     POSITION y = 0, x = 0;
     msg_format(_("%sが稲妻で覆われた...", "The %s is surrounded by lightning..."), name);
     for (int k = 0; k < num; k++) {
index ea8dba6..e1243df 100644 (file)
@@ -250,7 +250,7 @@ void apply_ego(ObjectType *o_ptr, DEPTH lev)
         o_ptr->activation_id = e_ptr->act_idx;
 
     o_ptr->to_h += (HIT_PROB)e_ptr->base_to_h;
-    o_ptr->to_d += (HIT_POINT)e_ptr->base_to_d;
+    o_ptr->to_d += (int)e_ptr->base_to_d;
     o_ptr->to_a += (ARMOUR_CLASS)e_ptr->base_to_a;
 
     auto is_powerful = e_ptr->gen_flags.has(ItemGenerationTraitType::POWERFUL);
@@ -275,7 +275,7 @@ void apply_ego(ObjectType *o_ptr, DEPTH lev)
         }
 
         o_ptr->to_h += (HIT_PROB)randint1_signed(e_ptr->max_to_h);
-        o_ptr->to_d += (HIT_POINT)randint1_signed(e_ptr->max_to_d);
+        o_ptr->to_d += (int)randint1_signed(e_ptr->max_to_d);
         o_ptr->to_a += (ARMOUR_CLASS)randint1_signed(e_ptr->max_to_a);
 
         if (gen_flags.has(ItemGenerationTraitType::MOD_ACCURACY)) {
index 718af0a..714f2a5 100644 (file)
@@ -246,11 +246,11 @@ struct ego_item_type {
     RARITY rarity{}; //<! レアリティ
 
     HIT_PROB base_to_h{}; //!< ベース命中修正
-    HIT_POINT base_to_d{}; //!< べ^スダメージ修正
+    int base_to_d{}; //!< べ^スダメージ修正
     ARMOUR_CLASS base_to_a{}; //!< ベースAC修正
 
     HIT_PROB max_to_h{}; //!< 最大ボーナス命中修正
-    HIT_POINT max_to_d{}; //!< 最大ボーナスダメージ修正
+    int max_to_d{}; //!< 最大ボーナスダメージ修正
     ARMOUR_CLASS max_to_a{}; //!< 最大ボーナスAC修正
 
     PARAMETER_VALUE max_pval{}; //!< 最大pval
index 5de1fca..4b00153 100644 (file)
@@ -159,7 +159,7 @@ void RingEnchanter::sval_enchant()
 
         break;
     case SV_RING_DAMAGE:
-        this->o_ptr->to_d = 1 + randint1(5) + (HIT_POINT)m_bonus(16, this->level);
+        this->o_ptr->to_d = 1 + randint1(5) + (int)m_bonus(16, this->level);
         if (this->power < 0) {
             set_bits(this->o_ptr->ident, IDENT_BROKEN);
             this->o_ptr->curse_flags.set(CurseTraitType::CURSED);
@@ -186,7 +186,7 @@ void RingEnchanter::sval_enchant()
 
         break;
     case SV_RING_SLAYING:
-        this->o_ptr->to_d = randint1(5) + (HIT_POINT)m_bonus(12, this->level);
+        this->o_ptr->to_d = randint1(5) + (int)m_bonus(12, this->level);
         this->o_ptr->to_h = randint1(5) + (HIT_PROB)m_bonus(12, this->level);
 
         if (this->power < 0) {
index 88cee40..47c0810 100644 (file)
@@ -89,7 +89,7 @@ void process_vorpal_attack(PlayerType *player_ptr, player_attack_type *pa_ptr, c
     while (one_in_(vorpal_chance))
         vorpal_magnification++;
 
-    pa_ptr->attack_damage *= (HIT_POINT)vorpal_magnification;
+    pa_ptr->attack_damage *= (int)vorpal_magnification;
     auto *r_ptr = &r_info[pa_ptr->m_ptr->r_idx];
     if (((r_ptr->flagsr & RFR_RES_ALL) ? pa_ptr->attack_damage / 100 : pa_ptr->attack_damage) > pa_ptr->m_ptr->hp)
         msg_format(_("%sを真っ二つにした!", "You cut %s in half!"), pa_ptr->m_name);
index 47ed099..4dcff7b 100644 (file)
@@ -25,7 +25,7 @@ struct object_kind {
     PARAMETER_VALUE pval{}; /*!< ベースアイテムのpval(能力修正共通値) Object extra info */
 
     HIT_PROB to_h{}; /*!< ベースアイテムの命中修正値 / Bonus to hit */
-    HIT_POINT to_d{}; /*!< ベースアイテムのダメージ修正値 / Bonus to damage */
+    int to_d{}; /*!< ベースアイテムのダメージ修正値 / Bonus to damage */
     ARMOUR_CLASS to_a{}; /*!< ベースアイテムのAC修正値 / Bonus to armor */
 
     ARMOUR_CLASS ac{}; /*!< ベースアイテムのAC基本値 /  Base armor */
index 80f4191..7b505fa 100644 (file)
@@ -77,7 +77,7 @@ ObjectType *choose_warning_item(PlayerType *player_ptr)
  * @param dam 基本ダメージ
  * @param max 算出した最大ダメージを返すポインタ
  */
-static void spell_damcalc(PlayerType *player_ptr, monster_type *m_ptr, AttributeType typ, HIT_POINT dam, int *max)
+static void spell_damcalc(PlayerType *player_ptr, monster_type *m_ptr, AttributeType typ, int dam, int *max)
 {
     auto *r_ptr = &r_info[m_ptr->r_idx];
     int rlev = r_ptr->level;
@@ -265,7 +265,7 @@ static void spell_damcalc(PlayerType *player_ptr, monster_type *m_ptr, Attribute
 static void spell_damcalc_by_spellnum(PlayerType *player_ptr, MonsterAbilityType ms_type, AttributeType typ, MONSTER_IDX m_idx, int *max)
 {
     auto *m_ptr = &player_ptr->current_floor_ptr->m_list[m_idx];
-    HIT_POINT dam = monspell_damage(player_ptr, ms_type, m_idx, DAM_MAX);
+    int dam = monspell_damage(player_ptr, ms_type, m_idx, DAM_MAX);
     spell_damcalc(player_ptr, m_ptr, typ, dam, max);
 }
 
index f8e04b9..abfb4ef 100644 (file)
@@ -54,7 +54,7 @@ void check_fall_off_horse(PlayerType *player_ptr, MonsterAttackPlayer *monap_ptr
  * @return FALSEなら落馬しないことで確定、TRUEなら処理続行
  * @details レベルの低い乗馬からは落馬しにくい
  */
-static bool calc_fall_off_possibility(PlayerType *player_ptr, const HIT_POINT dam, const bool force, monster_race *r_ptr)
+static bool calc_fall_off_possibility(PlayerType *player_ptr, const int dam, const bool force, monster_race *r_ptr)
 {
     if (force)
         return true;
@@ -84,7 +84,7 @@ static bool calc_fall_off_possibility(PlayerType *player_ptr, const HIT_POINT da
  * @param force TRUEならば強制的に落馬する
  * @return 実際に落馬したらTRUEを返す
  */
-bool process_fall_off_horse(PlayerType *player_ptr, HIT_POINT dam, bool force)
+bool process_fall_off_horse(PlayerType *player_ptr, int dam, bool force)
 {
     POSITION sy = 0;
     POSITION sx = 0;
index 2bde7cb..63e4eb3 100644 (file)
@@ -5,4 +5,4 @@
 class MonsterAttackPlayer;
 class PlayerType;
 void check_fall_off_horse(PlayerType *player_ptr, MonsterAttackPlayer *monap_ptr);
-bool process_fall_off_horse(PlayerType *player_ptr, HIT_POINT dam, bool force);
+bool process_fall_off_horse(PlayerType *player_ptr, int dam, bool force);
index 625e8ba..7abb7f9 100644 (file)
@@ -63,7 +63,7 @@ static void drain_muramasa(PlayerType *player_ptr, player_attack_type *pa_ptr, c
 
     auto *o_ptr = &player_ptr->inventory_list[INVEN_MAIN_HAND + pa_ptr->hand];
     HIT_PROB to_h = o_ptr->to_h;
-    HIT_POINT to_d = o_ptr->to_d;
+    int to_d = o_ptr->to_d;
     bool flag = true;
     for (int i = 0; i < to_h + 3; i++)
         if (one_in_(4))
index 4ec0c80..8e98fcd 100644 (file)
@@ -44,7 +44,7 @@ struct player_attack_type {
     combat_options mode{}; //!< 剣術種別
     bool monk_attack{}; //!< 素手/マーシャルアーツかどうか
     const martial_arts *ma_ptr{}; //!< マーシャルアーツ種別
-    HIT_POINT attack_damage{}; //!< 累積ダメージ
+    int attack_damage{}; //!< 累積ダメージ
     int num_blow{}; //!< 打撃回数
     TrFlags flags{}; //!< 武器フラグ
     chaotic_effect chaos_effect{}; //!< カオス効果
index c836cb7..38062df 100644 (file)
@@ -11,7 +11,7 @@ enum class MonsterAbilityType;
 struct mane_data_type {
     struct mane_type {
         MonsterAbilityType spell{};
-        HIT_POINT damage{};
+        int damage{};
     };
 
     std::deque<mane_type> mane_list{};
index 93f388a..328b2a6 100644 (file)
@@ -63,7 +63,7 @@ void starve_player(PlayerType *player_ptr)
     }
 
     if (player_ptr->food < PY_FOOD_STARVE) {
-        HIT_POINT dam = (PY_FOOD_STARVE - player_ptr->food) / 10;
+        int dam = (PY_FOOD_STARVE - player_ptr->food) / 10;
         if (!is_invuln(player_ptr))
             take_hit(player_ptr, DAMAGE_LOSELIFE, dam, _("空腹", "starvation"));
     }
index 64d7b24..507f233 100644 (file)
@@ -70,7 +70,7 @@
 #include "view/display-messages.h"
 #include "world/world.h"
 
-using dam_func = HIT_POINT (*)(PlayerType *player_ptr, HIT_POINT dam, concptr kb_str, bool aura);
+using dam_func = int (*)(PlayerType *player_ptr, int dam, concptr kb_str, bool aura);
 
 /*!
  * @brief 酸攻撃による装備のAC劣化処理 /
@@ -144,7 +144,7 @@ static bool acid_minus_ac(PlayerType *player_ptr)
  * @return 修正HPダメージ量
  * @details 酸オーラは存在しないが関数ポインタのために引数だけは用意している
  */
-HIT_POINT acid_dam(PlayerType *player_ptr, HIT_POINT dam, concptr kb_str, bool aura)
+int acid_dam(PlayerType *player_ptr, int dam, concptr kb_str, bool aura)
 {
     int inv = (dam < 30) ? 1 : (dam < 60) ? 2
                                           : 3;
@@ -161,7 +161,7 @@ HIT_POINT acid_dam(PlayerType *player_ptr, HIT_POINT dam, concptr kb_str, bool a
             dam = (dam + 1) / 2;
     }
 
-    HIT_POINT get_damage = take_hit(player_ptr, aura ? DAMAGE_NOESCAPE : DAMAGE_ATTACK, dam, kb_str);
+    int get_damage = take_hit(player_ptr, aura ? DAMAGE_NOESCAPE : DAMAGE_ATTACK, dam, kb_str);
     if (!aura && !(double_resist && has_resist_acid(player_ptr)))
         inventory_damage(player_ptr, BreakerAcid(), inv);
 
@@ -178,7 +178,7 @@ HIT_POINT acid_dam(PlayerType *player_ptr, HIT_POINT dam, concptr kb_str, bool a
  * @param aura オーラよるダメージが原因ならばTRUE
  * @return 修正HPダメージ量
  */
-HIT_POINT elec_dam(PlayerType *player_ptr, HIT_POINT dam, concptr kb_str, bool aura)
+int elec_dam(PlayerType *player_ptr, int dam, concptr kb_str, bool aura)
 {
     int inv = (dam < 30) ? 1 : (dam < 60) ? 2
                                           : 3;
@@ -194,7 +194,7 @@ HIT_POINT elec_dam(PlayerType *player_ptr, HIT_POINT dam, concptr kb_str, bool a
             (void)do_dec_stat(player_ptr, A_DEX);
     }
 
-    HIT_POINT get_damage = take_hit(player_ptr, aura ? DAMAGE_NOESCAPE : DAMAGE_ATTACK, dam, kb_str);
+    int get_damage = take_hit(player_ptr, aura ? DAMAGE_NOESCAPE : DAMAGE_ATTACK, dam, kb_str);
     if (!aura && !(double_resist && has_resist_elec(player_ptr)))
         inventory_damage(player_ptr, BreakerElec(), inv);
 
@@ -211,7 +211,7 @@ HIT_POINT elec_dam(PlayerType *player_ptr, HIT_POINT dam, concptr kb_str, bool a
  * @param aura オーラよるダメージが原因ならばTRUE
  * @return 修正HPダメージ量
  */
-HIT_POINT fire_dam(PlayerType *player_ptr, HIT_POINT dam, concptr kb_str, bool aura)
+int fire_dam(PlayerType *player_ptr, int dam, concptr kb_str, bool aura)
 {
     int inv = (dam < 30) ? 1 : (dam < 60) ? 2
                                           : 3;
@@ -227,7 +227,7 @@ HIT_POINT fire_dam(PlayerType *player_ptr, HIT_POINT dam, concptr kb_str, bool a
             (void)do_dec_stat(player_ptr, A_STR);
     }
 
-    HIT_POINT get_damage = take_hit(player_ptr, aura ? DAMAGE_NOESCAPE : DAMAGE_ATTACK, dam, kb_str);
+    int get_damage = take_hit(player_ptr, aura ? DAMAGE_NOESCAPE : DAMAGE_ATTACK, dam, kb_str);
     if (!aura && !(double_resist && has_resist_fire(player_ptr)))
         inventory_damage(player_ptr, BreakerFire(), inv);
 
@@ -244,7 +244,7 @@ HIT_POINT fire_dam(PlayerType *player_ptr, HIT_POINT dam, concptr kb_str, bool a
  * @param aura オーラよるダメージが原因ならばTRUE
  * @return 修正HPダメージ量
  */
-HIT_POINT cold_dam(PlayerType *player_ptr, HIT_POINT dam, concptr kb_str, bool aura)
+int cold_dam(PlayerType *player_ptr, int dam, concptr kb_str, bool aura)
 {
     int inv = (dam < 30) ? 1 : (dam < 60) ? 2
                                           : 3;
@@ -258,7 +258,7 @@ HIT_POINT cold_dam(PlayerType *player_ptr, HIT_POINT dam, concptr kb_str, bool a
             (void)do_dec_stat(player_ptr, A_STR);
     }
 
-    HIT_POINT get_damage = take_hit(player_ptr, aura ? DAMAGE_NOESCAPE : DAMAGE_ATTACK, dam, kb_str);
+    int get_damage = take_hit(player_ptr, aura ? DAMAGE_NOESCAPE : DAMAGE_ATTACK, dam, kb_str);
     if (!aura && !(double_resist && has_resist_cold(player_ptr)))
         inventory_damage(player_ptr, BreakerCold(), inv);
 
@@ -274,7 +274,7 @@ HIT_POINT cold_dam(PlayerType *player_ptr, HIT_POINT dam, concptr kb_str, bool a
  * the game when he dies, since the "You die." message is shown before
  * setting the player to "dead".
  */
-int take_hit(PlayerType *player_ptr, int damage_type, HIT_POINT damage, concptr hit_from)
+int take_hit(PlayerType *player_ptr, int damage_type, int damage, concptr hit_from)
 {
     int old_chp = player_ptr->chp;
 
index 16c2511..af0bce0 100644 (file)
@@ -11,9 +11,9 @@
 
 struct monster_type;
 class PlayerType;
-int take_hit(PlayerType *player_ptr, int damage_type, HIT_POINT damage, concptr kb_str);
-HIT_POINT acid_dam(PlayerType *player_ptr, HIT_POINT dam, concptr kb_str, bool aura);
-HIT_POINT elec_dam(PlayerType *player_ptr, HIT_POINT dam, concptr kb_str, bool aura);
-HIT_POINT fire_dam(PlayerType *player_ptr, HIT_POINT dam, concptr kb_str, bool aura);
-HIT_POINT cold_dam(PlayerType *player_ptr, HIT_POINT dam, concptr kb_str, bool aura);
+int take_hit(PlayerType *player_ptr, int damage_type, int damage, concptr kb_str);
+int acid_dam(PlayerType *player_ptr, int dam, concptr kb_str, bool aura);
+int elec_dam(PlayerType *player_ptr, int dam, concptr kb_str, bool aura);
+int fire_dam(PlayerType *player_ptr, int dam, concptr kb_str, bool aura);
+int cold_dam(PlayerType *player_ptr, int dam, concptr kb_str, bool aura);
 void touch_zap_player(monster_type *m_ptr, PlayerType *player_ptr);
index d2d3005..29258b6 100644 (file)
@@ -314,7 +314,7 @@ void PlayerSkill::gain_riding_skill_exp_on_range_attack()
     }
 }
 
-void PlayerSkill::gain_riding_skill_exp_on_fall_off_check(HIT_POINT dam)
+void PlayerSkill::gain_riding_skill_exp_on_fall_off_check(int dam)
 {
     auto now_exp = this->player_ptr->skill_exp[PlayerSkillKindType::RIDING];
     auto max_exp = s_info[enum2i(this->player_ptr->pclass)].s_max[PlayerSkillKindType::RIDING];
index 365714e..ff4e0f2 100644 (file)
@@ -64,7 +64,7 @@ public:
     void gain_two_weapon_skill_exp();
     void gain_riding_skill_exp_on_melee_attack(const monster_race *r_ptr);
     void gain_riding_skill_exp_on_range_attack();
-    void gain_riding_skill_exp_on_fall_off_check(HIT_POINT dam);
+    void gain_riding_skill_exp_on_fall_off_check(int dam);
     void gain_spell_skill_exp(int realm, int spell_idx);
     void gain_continuous_spell_skill_exp(int realm, int spell_idx);
     PlayerSkillRank gain_spell_skill_exp_over_learning(int spell_idx);
index b342f38..328674c 100644 (file)
@@ -550,7 +550,7 @@ concptr do_arcane_spell(PlayerType *player_ptr, SPELL_IDX spell, SpellProcessTyp
             return _("炎、電撃、冷気、酸のどれかの球を放つ。", "Fires a ball of some elements.");
 
         {
-            HIT_POINT dam = 75 + plev;
+            int dam = 75 + plev;
             POSITION rad = 2;
 
             if (info)
index 24db66c..04fde28 100644 (file)
@@ -266,7 +266,7 @@ concptr do_chaos_spell(PlayerType *player_ptr, SPELL_IDX spell, SpellProcessType
             return _("自分を中心とした轟音の球を発生させる。", "Generates a ball of sound centered on you.");
 
         {
-            HIT_POINT dam = 60 + plev;
+            int dam = 60 + plev;
             POSITION rad = plev / 10 + 2;
 
             if (info)
@@ -308,7 +308,7 @@ concptr do_chaos_spell(PlayerType *player_ptr, SPELL_IDX spell, SpellProcessType
             return _("炎の球を放つ。", "Fires a ball of fire.");
 
         {
-            HIT_POINT dam = plev + 55;
+            int dam = plev + 55;
             POSITION rad = 2;
 
             if (info)
@@ -367,7 +367,7 @@ concptr do_chaos_spell(PlayerType *player_ptr, SPELL_IDX spell, SpellProcessType
             return _("巨大なカオスの球を放つ。", "Fires a huge ball of chaos.");
 
         {
-            HIT_POINT dam = plev * 2 + 99;
+            int dam = plev * 2 + 99;
             POSITION rad = plev / 5;
 
             if (info)
@@ -448,7 +448,7 @@ concptr do_chaos_spell(PlayerType *player_ptr, SPELL_IDX spell, SpellProcessType
             return _("巨大な分解の球を放つ。", "Fires a huge ball of disintegration.");
 
         {
-            HIT_POINT dam = plev + 70;
+            int dam = plev + 70;
             POSITION rad = 3 + plev / 40;
 
             if (info)
@@ -489,7 +489,7 @@ concptr do_chaos_spell(PlayerType *player_ptr, SPELL_IDX spell, SpellProcessType
             return _("ロケットを発射する。", "Fires a magic rocket.");
 
         {
-            HIT_POINT dam = 120 + plev * 2;
+            int dam = 120 + plev * 2;
             POSITION rad = 2;
 
             if (info)
@@ -559,7 +559,7 @@ concptr do_chaos_spell(PlayerType *player_ptr, SPELL_IDX spell, SpellProcessType
             return _("自分の周辺に隕石を落とす。", "Causes meteorites to fall down on nearby random locations.");
 
         {
-            HIT_POINT dam = plev * 2;
+            int dam = plev * 2;
             POSITION rad = 2;
 
             if (info)
@@ -578,7 +578,7 @@ concptr do_chaos_spell(PlayerType *player_ptr, SPELL_IDX spell, SpellProcessType
             return _("自分を中心とした超巨大な炎の球を発生させる。", "Generates a huge ball of fire centered on you.");
 
         {
-            HIT_POINT dam = 300 + 3 * plev;
+            int dam = 300 + 3 * plev;
             POSITION rad = 8;
 
             if (info)
@@ -628,7 +628,7 @@ concptr do_chaos_spell(PlayerType *player_ptr, SPELL_IDX spell, SpellProcessType
             return _("非常に強力で巨大な純粋な魔力の球を放つ。", "Fires an extremely powerful huge ball of pure mana.");
 
         {
-            HIT_POINT dam = 300 + plev * 4;
+            int dam = 300 + plev * 4;
             POSITION rad = 4;
 
             if (info)
@@ -649,7 +649,7 @@ concptr do_chaos_spell(PlayerType *player_ptr, SPELL_IDX spell, SpellProcessType
             return _("非常に強力なカオスの球を放つ。", "Fires an extremely powerful ball of chaos.");
 
         {
-            HIT_POINT dam = player_ptr->chp;
+            int dam = player_ptr->chp;
             POSITION rad = 2;
 
             if (info)
index dfed97c..ddbf44b 100644 (file)
@@ -303,7 +303,7 @@ concptr do_crusade_spell(PlayerType *player_ptr, SPELL_IDX spell, SpellProcessTy
             return _("強力な電撃のボルトを放つ。", "Fires a powerful bolt of lightning.");
 
         {
-            HIT_POINT dam = plev * 5;
+            int dam = plev * 5;
 
             if (info)
                 return info_damage(0, 0, dam);
@@ -456,7 +456,7 @@ concptr do_crusade_spell(PlayerType *player_ptr, SPELL_IDX spell, SpellProcessTy
             return _("巨大な閃光の球を放つ。", "Fires a huge ball of powerful light.");
 
         {
-            HIT_POINT dam = 100 + plev * 2;
+            int dam = 100 + plev * 2;
             POSITION rad = 4;
 
             if (info)
@@ -592,7 +592,7 @@ concptr do_crusade_spell(PlayerType *player_ptr, SPELL_IDX spell, SpellProcessTy
             return _("ターゲットの周囲に分解の球を多数落とす。", "Drops many balls of disintegration near the target.");
 
         {
-            HIT_POINT dam = plev * 3 + 25;
+            int dam = plev * 3 + 25;
             POSITION rad = 2;
 
             if (info)
index 684de37..92e1b9e 100644 (file)
@@ -134,7 +134,7 @@ concptr do_death_spell(PlayerType *player_ptr, SPELL_IDX spell, SpellProcessType
             return _("毒の球を放つ。", "Fires a ball of poison.");
 
         {
-            HIT_POINT dam = 10 + plev / 2;
+            int dam = 10 + plev / 2;
             POSITION rad = 2;
 
             if (info)
@@ -290,7 +290,7 @@ concptr do_death_spell(PlayerType *player_ptr, SPELL_IDX spell, SpellProcessType
             return _("自分を中心とした毒の球を発生させる。", "Generates a ball of poison centered on you.");
 
         {
-            HIT_POINT dam = (30 + plev) * 2;
+            int dam = (30 + plev) * 2;
             POSITION rad = plev / 10 + 2;
 
             if (info)
@@ -352,7 +352,7 @@ concptr do_death_spell(PlayerType *player_ptr, SPELL_IDX spell, SpellProcessType
                 return info_damage(dice, sides, base);
 
             if (cast) {
-                HIT_POINT dam = base + damroll(dice, sides);
+                int dam = base + damroll(dice, sides);
 
                 if (!get_aim_dir(player_ptr, &dir))
                     return nullptr;
@@ -516,7 +516,7 @@ concptr do_death_spell(PlayerType *player_ptr, SPELL_IDX spell, SpellProcessType
             return _("3連射のボルトによりモンスター1体から生命力を吸いとる。吸いとった生命力によって体力が回復する。",
                 "Fires 3 bolts. Each of the bolts absorbs some HP from a monster and gives them to you.");
         {
-            HIT_POINT dam = 100;
+            int dam = 100;
 
             if (info)
                 return format("%s3*%d", KWD_DAM, dam);
@@ -563,7 +563,7 @@ concptr do_death_spell(PlayerType *player_ptr, SPELL_IDX spell, SpellProcessType
             return _("巨大な暗黒の球を放つ。", "Fires a huge ball of darkness.");
 
         {
-            HIT_POINT dam = 100 + plev * 2;
+            int dam = 100 + plev * 2;
             POSITION rad = 4;
 
             if (info)
@@ -681,7 +681,7 @@ concptr do_death_spell(PlayerType *player_ptr, SPELL_IDX spell, SpellProcessType
                 "邪悪な力を持つ宝珠を放つ。善良なモンスターには大きなダメージを与える。", "Fires a powerful ball of evil power. Hurts good monsters greatly.");
 
         {
-            HIT_POINT dam = 666;
+            int dam = 666;
             POSITION rad = 3;
 
             if (info)
index d1c681e..7ba3ec7 100644 (file)
@@ -298,7 +298,7 @@ concptr do_daemon_spell(PlayerType *player_ptr, SPELL_IDX spell, SpellProcessTyp
             return _("炎の球を放つ。", "Fires a ball of fire.");
 
         {
-            HIT_POINT dam = plev + 55;
+            int dam = plev + 55;
             POSITION rad = 2;
 
             if (info)
@@ -333,7 +333,7 @@ concptr do_daemon_spell(PlayerType *player_ptr, SPELL_IDX spell, SpellProcessTyp
             return _("大きな地獄の球を放つ。", "Fires a huge ball of nether.");
 
         {
-            HIT_POINT dam = plev * 3 / 2 + 100;
+            int dam = plev * 3 / 2 + 100;
             POSITION rad = plev / 20 + 2;
 
             if (info)
@@ -414,7 +414,7 @@ concptr do_daemon_spell(PlayerType *player_ptr, SPELL_IDX spell, SpellProcessTyp
             return _("自分を中心とした炎の球を作り出し、床を溶岩に変える。", "Generates a ball of fire centered on you which transforms floors to magma.");
 
         {
-            HIT_POINT dam = (55 + plev) * 2;
+            int dam = (55 + plev) * 2;
             POSITION rad = 3;
 
             if (info)
@@ -434,7 +434,7 @@ concptr do_daemon_spell(PlayerType *player_ptr, SPELL_IDX spell, SpellProcessTyp
             return _("プラズマの球を放つ。", "Fires a ball of plasma.");
 
         {
-            HIT_POINT dam = plev * 3 / 2 + 80;
+            int dam = plev * 3 / 2 + 80;
             POSITION rad = 2 + plev / 40;
 
             if (info)
@@ -496,7 +496,7 @@ concptr do_daemon_spell(PlayerType *player_ptr, SPELL_IDX spell, SpellProcessTyp
             return _("因果混乱の球を放つ。", "Fires a ball of nexus.");
 
         {
-            HIT_POINT dam = 100 + plev * 2;
+            int dam = 100 + plev * 2;
             POSITION rad = 4;
 
             if (info)
@@ -569,7 +569,7 @@ concptr do_daemon_spell(PlayerType *player_ptr, SPELL_IDX spell, SpellProcessTyp
                 "Generates balls of chaos, confusion and charm centered on you.");
 
         {
-            HIT_POINT dam = 50 + plev;
+            int dam = 50 + plev;
             int power = 20 + plev;
             POSITION rad = 3 + plev / 20;
 
@@ -619,7 +619,7 @@ concptr do_daemon_spell(PlayerType *player_ptr, SPELL_IDX spell, SpellProcessTyp
             return _("超巨大な地獄の球を放つ。", "Generates a huge ball of nether.");
 
         {
-            HIT_POINT dam = plev * 15;
+            int dam = plev * 15;
             POSITION rad = plev / 5;
 
             if (info)
@@ -642,7 +642,7 @@ concptr do_daemon_spell(PlayerType *player_ptr, SPELL_IDX spell, SpellProcessTyp
                 "Puts blood curse, which damages and causes various effects, on a monster. You also take damage.");
 
         {
-            HIT_POINT dam = 600;
+            int dam = 600;
             POSITION rad = 0;
 
             if (info)
index b27f033..7630d4f 100644 (file)
@@ -91,7 +91,7 @@ concptr do_hex_spell(PlayerType *player_ptr, spell_hex_type spell, SpellProcessT
     auto continuation = mode == SpellProcessType::CONTNUATION;
     auto stop = mode == SpellProcessType::STOP;
     auto should_continue = true;
-    HIT_POINT power;
+    int power;
     switch (spell) {
         /*** 1st book (0-7) ***/
     case HEX_BLESS:
index f8dd685..f7ae208 100644 (file)
@@ -548,7 +548,7 @@ concptr do_nature_spell(PlayerType *player_ptr, SPELL_IDX spell, SpellProcessTyp
             return _("巨大な冷気の球を放つ。", "Fires a huge ball of cold.");
 
         {
-            HIT_POINT dam = 70 + plev * 3 / 2;
+            int dam = 70 + plev * 3 / 2;
             POSITION rad = plev / 12 + 1;
 
             if (info)
@@ -570,7 +570,7 @@ concptr do_nature_spell(PlayerType *player_ptr, SPELL_IDX spell, SpellProcessTyp
             return _("巨大な電撃の球を放つ。", "Fires a huge electric ball.");
 
         {
-            HIT_POINT dam = 90 + plev * 3 / 2;
+            int dam = 90 + plev * 3 / 2;
             POSITION rad = plev / 12 + 1;
 
             if (info)
@@ -592,7 +592,7 @@ concptr do_nature_spell(PlayerType *player_ptr, SPELL_IDX spell, SpellProcessTyp
             return _("巨大な水の球を放つ。", "Fires a huge ball of water.");
 
         {
-            HIT_POINT dam = 100 + plev * 3 / 2;
+            int dam = 100 + plev * 3 / 2;
             POSITION rad = plev / 12 + 1;
 
             if (info)
@@ -614,7 +614,7 @@ concptr do_nature_spell(PlayerType *player_ptr, SPELL_IDX spell, SpellProcessTyp
                 "Generates ball of light centered on you. Maps and lights whole dungeon level. Knows all objects location.");
 
         {
-            HIT_POINT dam = 150;
+            int dam = 150;
             POSITION rad = 8;
 
             if (info)
index 32eea7a..84013c9 100644 (file)
@@ -603,7 +603,7 @@ concptr do_trump_spell(PlayerType *player_ptr, SPELL_IDX spell, SpellProcessType
             return _("自分の周辺に隕石を落とす。", "Causes meteorites to fall down on nearby random locations.");
 
         {
-            HIT_POINT dam = plev * 2;
+            int dam = plev * 2;
             POSITION rad = 2;
 
             if (info)
index 2c57274..270ecb5 100644 (file)
@@ -126,7 +126,7 @@ static void death_scythe_reflection_critial_hit(player_attack_type *pa_ptr)
     while (one_in_(4))
         more_magnification++;
 
-    pa_ptr->attack_damage *= (HIT_POINT)more_magnification;
+    pa_ptr->attack_damage *= (int)more_magnification;
 }
 
 /*!
@@ -145,7 +145,7 @@ void process_death_scythe_reflection(PlayerType *player_ptr, player_attack_type
     pa_ptr->attack_damage = damroll(o_ptr->dd + player_ptr->to_dd[pa_ptr->hand], o_ptr->ds + player_ptr->to_ds[pa_ptr->hand]);
     int magnification = calc_death_scythe_reflection_magnification(player_ptr);
     compensate_death_scythe_reflection_magnification(player_ptr, &magnification, death_scythe_flags);
-    pa_ptr->attack_damage *= (HIT_POINT)magnification;
+    pa_ptr->attack_damage *= (int)magnification;
     pa_ptr->attack_damage /= 10;
     pa_ptr->attack_damage = critical_norm(player_ptr, o_ptr->weight, o_ptr->to_h, pa_ptr->attack_damage, player_ptr->to_h[pa_ptr->hand], pa_ptr->mode);
     death_scythe_reflection_critial_hit(pa_ptr);
index fb96a2f..a556970 100644 (file)
@@ -11,7 +11,7 @@
  * @param dam 威力
  * @return 作用が実際にあった場合TRUEを返す
  */
-bool wall_to_mud(PlayerType *player_ptr, DIRECTION dir, HIT_POINT dam)
+bool wall_to_mud(PlayerType *player_ptr, DIRECTION dir, int dam)
 {
     BIT_FLAGS flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
     return project_hook(player_ptr, AttributeType::KILL_WALL, dir, dam, flg);
index f83f7b0..cd3f525 100644 (file)
@@ -3,7 +3,7 @@
 #include "system/angband.h"
 
 class PlayerType;
-bool wall_to_mud(PlayerType *player_ptr, DIRECTION dir, HIT_POINT dam);
+bool wall_to_mud(PlayerType *player_ptr, DIRECTION dir, int dam);
 bool wizard_lock(PlayerType *player_ptr, DIRECTION dir);
 bool destroy_door(PlayerType *player_ptr, DIRECTION dir);
 bool disarm_trap(PlayerType *player_ptr, DIRECTION dir);
index 7d143f0..ed36fb0 100644 (file)
@@ -20,7 +20,7 @@
  * Affect grids, objects, and monsters
  * </pre>
  */
-bool fire_ball(PlayerType *player_ptr, AttributeType typ, DIRECTION dir, HIT_POINT dam, POSITION rad)
+bool fire_ball(PlayerType *player_ptr, AttributeType typ, DIRECTION dir, int dam, POSITION rad)
 {
     BIT_FLAGS flg = PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
     if (typ == AttributeType::CHARM_LIVING)
@@ -53,7 +53,7 @@ bool fire_ball(PlayerType *player_ptr, AttributeType typ, DIRECTION dir, HIT_POI
  * Affect grids, objects, and monsters
  * </pre>
  */
-bool fire_breath(PlayerType *player_ptr, AttributeType typ, DIRECTION dir, HIT_POINT dam, POSITION rad)
+bool fire_breath(PlayerType *player_ptr, AttributeType typ, DIRECTION dir, int dam, POSITION rad)
 {
     return fire_ball(player_ptr, typ, dir, dam, -rad);
 }
@@ -73,7 +73,7 @@ bool fire_breath(PlayerType *player_ptr, AttributeType typ, DIRECTION dir, HIT_P
  * Affect grids, objects, and monsters
  * </pre>
  */
-bool fire_rocket(PlayerType *player_ptr, AttributeType typ, DIRECTION dir, HIT_POINT dam, POSITION rad)
+bool fire_rocket(PlayerType *player_ptr, AttributeType typ, DIRECTION dir, int dam, POSITION rad)
 {
     POSITION tx = player_ptr->x + 99 * ddx[dir];
     POSITION ty = player_ptr->y + 99 * ddy[dir];
@@ -101,7 +101,7 @@ bool fire_rocket(PlayerType *player_ptr, AttributeType typ, DIRECTION dir, HIT_P
  * Affect grids, objects, and monsters
  * </pre>
  */
-bool fire_ball_hide(PlayerType *player_ptr, AttributeType typ, DIRECTION dir, HIT_POINT dam, POSITION rad)
+bool fire_ball_hide(PlayerType *player_ptr, AttributeType typ, DIRECTION dir, int dam, POSITION rad)
 {
     POSITION tx = player_ptr->x + 99 * ddx[dir];
     POSITION ty = player_ptr->y + 99 * ddy[dir];
@@ -134,7 +134,7 @@ bool fire_ball_hide(PlayerType *player_ptr, AttributeType typ, DIRECTION dir, HI
  * Option to hurt the player.
  * </pre>
  */
-bool fire_meteor(PlayerType *player_ptr, MONSTER_IDX who, AttributeType typ, POSITION y, POSITION x, HIT_POINT dam, POSITION rad)
+bool fire_meteor(PlayerType *player_ptr, MONSTER_IDX who, AttributeType typ, POSITION y, POSITION x, int dam, POSITION rad)
 {
     BIT_FLAGS flg = PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
     return project(player_ptr, who, rad, y, x, dam, typ, flg).notice;
@@ -201,7 +201,7 @@ bool fire_blast(PlayerType *player_ptr, AttributeType typ, DIRECTION dir, DICE_N
  * Affect monsters and grids (not objects).
  * </pre>
  */
-bool fire_bolt(PlayerType *player_ptr, AttributeType typ, DIRECTION dir, HIT_POINT dam)
+bool fire_bolt(PlayerType *player_ptr, AttributeType typ, DIRECTION dir, int dam)
 {
     BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL | PROJECT_GRID;
     if (typ != AttributeType::MONSTER_SHOOT)
@@ -222,7 +222,7 @@ bool fire_bolt(PlayerType *player_ptr, AttributeType typ, DIRECTION dir, HIT_POI
  * Affect monsters, grids and objects.
  * </pre>
  */
-bool fire_beam(PlayerType *player_ptr, AttributeType typ, DIRECTION dir, HIT_POINT dam)
+bool fire_beam(PlayerType *player_ptr, AttributeType typ, DIRECTION dir, int dam)
 {
     BIT_FLAGS flg = PROJECT_BEAM | PROJECT_KILL | PROJECT_GRID | PROJECT_ITEM;
     return project_hook(player_ptr, typ, dir, dam, flg);
@@ -242,7 +242,7 @@ bool fire_beam(PlayerType *player_ptr, AttributeType typ, DIRECTION dir, HIT_POI
  * Affect monsters, grids and objects.
  * </pre>
  */
-bool fire_bolt_or_beam(PlayerType *player_ptr, PERCENTAGE prob, AttributeType typ, DIRECTION dir, HIT_POINT dam)
+bool fire_bolt_or_beam(PlayerType *player_ptr, PERCENTAGE prob, AttributeType typ, DIRECTION dir, int dam)
 {
     if (randint0(100) < prob) {
         return (fire_beam(player_ptr, typ, dir, dam));
@@ -260,7 +260,7 @@ bool fire_bolt_or_beam(PlayerType *player_ptr, PERCENTAGE prob, AttributeType ty
  * @param flg フラグ
  * @return 作用が実際にあった場合TRUEを返す
  */
-bool project_hook(PlayerType *player_ptr, AttributeType typ, DIRECTION dir, HIT_POINT dam, BIT_FLAGS flg)
+bool project_hook(PlayerType *player_ptr, AttributeType typ, DIRECTION dir, int dam, BIT_FLAGS flg)
 {
     flg |= (PROJECT_THRU);
     POSITION tx = player_ptr->x + ddx[dir];
index a488cfa..538fc1c 100644 (file)
@@ -4,13 +4,13 @@
 #include "effect/attribute-types.h"
 
 class PlayerType;
-bool fire_ball(PlayerType *player_ptr, AttributeType typ, DIRECTION dir, HIT_POINT dam, POSITION rad);
-bool fire_breath(PlayerType *player_ptr, AttributeType typ, DIRECTION dir, HIT_POINT dam, POSITION rad);
-bool fire_rocket(PlayerType *player_ptr, AttributeType typ, DIRECTION dir, HIT_POINT dam, POSITION rad);
-bool fire_ball_hide(PlayerType *player_ptr, AttributeType typ, DIRECTION dir, HIT_POINT dam, POSITION rad);
-bool fire_meteor(PlayerType *player_ptr, MONSTER_IDX who, AttributeType typ, POSITION x, POSITION y, HIT_POINT dam, POSITION rad);
-bool fire_bolt(PlayerType *player_ptr, AttributeType typ, DIRECTION dir, HIT_POINT dam);
+bool fire_ball(PlayerType *player_ptr, AttributeType typ, DIRECTION dir, int dam, POSITION rad);
+bool fire_breath(PlayerType *player_ptr, AttributeType typ, DIRECTION dir, int dam, POSITION rad);
+bool fire_rocket(PlayerType *player_ptr, AttributeType typ, DIRECTION dir, int dam, POSITION rad);
+bool fire_ball_hide(PlayerType *player_ptr, AttributeType typ, DIRECTION dir, int dam, POSITION rad);
+bool fire_meteor(PlayerType *player_ptr, MONSTER_IDX who, AttributeType typ, POSITION x, POSITION y, int dam, POSITION rad);
+bool fire_bolt(PlayerType *player_ptr, AttributeType typ, DIRECTION dir, int dam);
 bool fire_blast(PlayerType *player_ptr, AttributeType typ, DIRECTION dir, DICE_NUMBER dd, DICE_SID ds, int num, int dev);
-bool fire_beam(PlayerType *player_ptr, AttributeType typ, DIRECTION dir, HIT_POINT dam);
-bool fire_bolt_or_beam(PlayerType *player_ptr, PERCENTAGE prob, AttributeType typ, DIRECTION dir, HIT_POINT dam);
-bool project_hook(PlayerType *player_ptr, AttributeType typ, DIRECTION dir, HIT_POINT dam, BIT_FLAGS flg);
+bool fire_beam(PlayerType *player_ptr, AttributeType typ, DIRECTION dir, int dam);
+bool fire_bolt_or_beam(PlayerType *player_ptr, PERCENTAGE prob, AttributeType typ, DIRECTION dir, int dam);
+bool project_hook(PlayerType *player_ptr, AttributeType typ, DIRECTION dir, int dam, BIT_FLAGS flg);
index 2428a81..61ce13b 100644 (file)
@@ -376,7 +376,7 @@ bool starlight(PlayerType *player_ptr, bool magic)
         msg_print(_("杖の先が明るく輝いた...", "The end of the staff glows brightly..."));
     }
 
-    HIT_POINT num = damroll(5, 3);
+    int num = damroll(5, 3);
     int attempts;
     POSITION y = 0, x = 0;
     for (int k = 0; k < num; k++) {
@@ -404,7 +404,7 @@ bool starlight(PlayerType *player_ptr, bool magic)
  * @param rad 効果半径
  * @return 作用が実際にあった場合TRUEを返す
  */
-bool lite_area(PlayerType *player_ptr, HIT_POINT dam, POSITION rad)
+bool lite_area(PlayerType *player_ptr, int dam, POSITION rad)
 {
     if (d_info[player_ptr->dungeon_idx].flags.has(DungeonFeatureType::DARKNESS)) {
         msg_print(_("ダンジョンが光を吸収した。", "The darkness of this dungeon absorbs your light."));
@@ -430,7 +430,7 @@ bool lite_area(PlayerType *player_ptr, HIT_POINT dam, POSITION rad)
  * @param rad 効果半径
  * @return 作用が実際にあった場合TRUEを返す
  */
-bool unlite_area(PlayerType *player_ptr, HIT_POINT dam, POSITION rad)
+bool unlite_area(PlayerType *player_ptr, int dam, POSITION rad)
 {
     if (!player_ptr->blind) {
         msg_print(_("暗闇が辺りを覆った。", "Darkness surrounds you."));
@@ -451,7 +451,7 @@ bool unlite_area(PlayerType *player_ptr, HIT_POINT dam, POSITION rad)
  * @param dam 威力
  * @return 作用が実際にあった場合TRUEを返す
  */
-bool lite_line(PlayerType *player_ptr, DIRECTION dir, HIT_POINT dam)
+bool lite_line(PlayerType *player_ptr, DIRECTION dir, int dam)
 {
     BIT_FLAGS flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_KILL;
     return project_hook(player_ptr, AttributeType::LITE_WEAK, dir, dam, flg);
index 6748f63..a0ed340 100644 (file)
@@ -6,6 +6,6 @@ class PlayerType;
 void lite_room(PlayerType *player_ptr, POSITION y1, POSITION x1);
 bool starlight(PlayerType *player_ptr, bool magic);
 void unlite_room(PlayerType *player_ptr, POSITION y1, POSITION x1);
-bool lite_area(PlayerType *player_ptr, HIT_POINT dam, POSITION rad);
-bool unlite_area(PlayerType *player_ptr, HIT_POINT dam, POSITION rad);
-bool lite_line(PlayerType *player_ptr, DIRECTION dir, HIT_POINT dam);
+bool lite_area(PlayerType *player_ptr, int dam, POSITION rad);
+bool unlite_area(PlayerType *player_ptr, int dam, POSITION rad);
+bool lite_line(PlayerType *player_ptr, DIRECTION dir, int dam);
index 03b7252..5c5ffd5 100644 (file)
@@ -52,7 +52,7 @@ void discharge_minion(PlayerType *player_ptr)
             continue;
         }
 
-        HIT_POINT dam = m_ptr->maxhp / 2;
+        int dam = m_ptr->maxhp / 2;
         if (dam > 100)
             dam = (dam - 100) / 2 + 100;
         if (dam > 400)
index ec2faa3..ab38c29 100644 (file)
@@ -114,7 +114,7 @@ bool activate_ty_curse(PlayerType *player_ptr, bool stop_ty, int *count)
         case 30:
         case 31:
             if (!(*count)) {
-                HIT_POINT dam = damroll(10, 10);
+                int dam = damroll(10, 10);
                 msg_print(_("純粋な魔力の次元への扉が開いた!", "A portal opens to a plane of raw mana!"));
                 project(player_ptr, 0, 8, player_ptr->y, player_ptr->x, dam, AttributeType::MANA, flg);
                 take_hit(player_ptr, DAMAGE_NOESCAPE, dam, _("純粋な魔力の解放", "released pure mana"));
index c3e2d67..454e222 100644 (file)
@@ -45,7 +45,7 @@
  * this is done in two passes. -- JDL
  * </pre>
  */
-bool project_all_los(PlayerType *player_ptr, AttributeType typ, HIT_POINT dam)
+bool project_all_los(PlayerType *player_ptr, AttributeType typ, int dam)
 {
     for (MONSTER_IDX i = 1; i < player_ptr->current_floor_ptr->m_max; i++) {
         auto *m_ptr = &player_ptr->current_floor_ptr->m_list[i];
@@ -135,7 +135,7 @@ bool turn_undead(PlayerType *player_ptr)
  * @param player_ptr プレイヤーへの参照ポインタ
  * @return 効力があった場合TRUEを返す
  */
-bool dispel_undead(PlayerType *player_ptr, HIT_POINT dam)
+bool dispel_undead(PlayerType *player_ptr, int dam)
 {
     bool tester = (project_all_los(player_ptr, AttributeType::DISP_UNDEAD, dam));
     if (tester)
@@ -148,7 +148,7 @@ bool dispel_undead(PlayerType *player_ptr, HIT_POINT dam)
  * @param player_ptr プレイヤーへの参照ポインタ
  * @return 効力があった場合TRUEを返す
  */
-bool dispel_evil(PlayerType *player_ptr, HIT_POINT dam)
+bool dispel_evil(PlayerType *player_ptr, int dam)
 {
     return project_all_los(player_ptr, AttributeType::DISP_EVIL, dam);
 }
@@ -158,7 +158,7 @@ bool dispel_evil(PlayerType *player_ptr, HIT_POINT dam)
  * @param player_ptr プレイヤーへの参照ポインタ
  * @return 効力があった場合TRUEを返す
  */
-bool dispel_good(PlayerType *player_ptr, HIT_POINT dam)
+bool dispel_good(PlayerType *player_ptr, int dam)
 {
     return project_all_los(player_ptr, AttributeType::DISP_GOOD, dam);
 }
@@ -168,7 +168,7 @@ bool dispel_good(PlayerType *player_ptr, HIT_POINT dam)
  * @param player_ptr プレイヤーへの参照ポインタ
  * @return 効力があった場合TRUEを返す
  */
-bool dispel_monsters(PlayerType *player_ptr, HIT_POINT dam)
+bool dispel_monsters(PlayerType *player_ptr, int dam)
 {
     return project_all_los(player_ptr, AttributeType::DISP_ALL, dam);
 }
@@ -178,7 +178,7 @@ bool dispel_monsters(PlayerType *player_ptr, HIT_POINT dam)
  * @param player_ptr プレイヤーへの参照ポインタ
  * @return 効力があった場合TRUEを返す
  */
-bool dispel_living(PlayerType *player_ptr, HIT_POINT dam)
+bool dispel_living(PlayerType *player_ptr, int dam)
 {
     return project_all_los(player_ptr, AttributeType::DISP_LIVING, dam);
 }
@@ -188,7 +188,7 @@ bool dispel_living(PlayerType *player_ptr, HIT_POINT dam)
  * @param player_ptr プレイヤーへの参照ポインタ
  * @return 効力があった場合TRUEを返す
  */
-bool dispel_demons(PlayerType *player_ptr, HIT_POINT dam)
+bool dispel_demons(PlayerType *player_ptr, int dam)
 {
     return project_all_los(player_ptr, AttributeType::DISP_DEMON, dam);
 }
@@ -251,7 +251,7 @@ void aggravate_monsters(PlayerType *player_ptr, MONSTER_IDX who)
  * @param dam 効力
  * @return 作用が実際にあった場合TRUEを返す
  */
-bool confuse_monsters(PlayerType *player_ptr, HIT_POINT dam)
+bool confuse_monsters(PlayerType *player_ptr, int dam)
 {
     return project_all_los(player_ptr, AttributeType::OLD_CONF, dam);
 }
@@ -262,7 +262,7 @@ bool confuse_monsters(PlayerType *player_ptr, HIT_POINT dam)
  * @param dam 効力
  * @return 作用が実際にあった場合TRUEを返す
  */
-bool charm_monsters(PlayerType *player_ptr, HIT_POINT dam)
+bool charm_monsters(PlayerType *player_ptr, int dam)
 {
     return project_all_los(player_ptr, AttributeType::CHARM, dam);
 }
@@ -273,7 +273,7 @@ bool charm_monsters(PlayerType *player_ptr, HIT_POINT dam)
  * @param dam 効力
  * @return 作用が実際にあった場合TRUEを返す
  */
-bool charm_animals(PlayerType *player_ptr, HIT_POINT dam)
+bool charm_animals(PlayerType *player_ptr, int dam)
 {
     return project_all_los(player_ptr, AttributeType::CONTROL_ANIMAL, dam);
 }
@@ -284,7 +284,7 @@ bool charm_animals(PlayerType *player_ptr, HIT_POINT dam)
  * @param dam 効力
  * @return 作用が実際にあった場合TRUEを返す
  */
-bool stun_monsters(PlayerType *player_ptr, HIT_POINT dam)
+bool stun_monsters(PlayerType *player_ptr, int dam)
 {
     return project_all_los(player_ptr, AttributeType::STUN, dam);
 }
@@ -295,7 +295,7 @@ bool stun_monsters(PlayerType *player_ptr, HIT_POINT dam)
  * @param dam 効力
  * @return 作用が実際にあった場合TRUEを返す
  */
-bool stasis_monsters(PlayerType *player_ptr, HIT_POINT dam)
+bool stasis_monsters(PlayerType *player_ptr, int dam)
 {
     return project_all_los(player_ptr, AttributeType::STASIS, dam);
 }
@@ -306,7 +306,7 @@ bool stasis_monsters(PlayerType *player_ptr, HIT_POINT dam)
  * @param dam 効力
  * @return 作用が実際にあった場合TRUEを返す
  */
-bool mindblast_monsters(PlayerType *player_ptr, HIT_POINT dam)
+bool mindblast_monsters(PlayerType *player_ptr, int dam)
 {
     return project_all_los(player_ptr, AttributeType::PSI, dam);
 }
@@ -328,7 +328,7 @@ bool banish_monsters(PlayerType *player_ptr, int dist)
  * @param dam 効力
  * @return 作用が実際にあった場合TRUEを返す
  */
-bool turn_evil(PlayerType *player_ptr, HIT_POINT dam)
+bool turn_evil(PlayerType *player_ptr, int dam)
 {
     return project_all_los(player_ptr, AttributeType::TURN_EVIL, dam);
 }
@@ -339,7 +339,7 @@ bool turn_evil(PlayerType *player_ptr, HIT_POINT dam)
  * @param dam 効力
  * @return 作用が実際にあった場合TRUEを返す
  */
-bool turn_monsters(PlayerType *player_ptr, HIT_POINT dam)
+bool turn_monsters(PlayerType *player_ptr, int dam)
 {
     return project_all_los(player_ptr, AttributeType::TURN_ALL, dam);
 }
index 2415f95..1d2c973 100644 (file)
@@ -6,29 +6,29 @@
 struct monster_race;
 struct monster_type;
 class PlayerType;
-bool project_all_los(PlayerType *player_ptr, AttributeType typ, HIT_POINT dam);
+bool project_all_los(PlayerType *player_ptr, AttributeType typ, int dam);
 bool speed_monsters(PlayerType *player_ptr);
 bool slow_monsters(PlayerType *player_ptr, int power);
 bool sleep_monsters(PlayerType *player_ptr, int power);
 void aggravate_monsters(PlayerType *player_ptr, MONSTER_IDX who);
 bool banish_evil(PlayerType *player_ptr, int dist);
 bool turn_undead(PlayerType *player_ptr);
-bool dispel_evil(PlayerType *player_ptr, HIT_POINT dam);
-bool dispel_good(PlayerType *player_ptr, HIT_POINT dam);
-bool dispel_undead(PlayerType *player_ptr, HIT_POINT dam);
-bool dispel_monsters(PlayerType *player_ptr, HIT_POINT dam);
-bool dispel_living(PlayerType *player_ptr, HIT_POINT dam);
-bool dispel_demons(PlayerType *player_ptr, HIT_POINT dam);
+bool dispel_evil(PlayerType *player_ptr, int dam);
+bool dispel_good(PlayerType *player_ptr, int dam);
+bool dispel_undead(PlayerType *player_ptr, int dam);
+bool dispel_monsters(PlayerType *player_ptr, int dam);
+bool dispel_living(PlayerType *player_ptr, int dam);
+bool dispel_demons(PlayerType *player_ptr, int dam);
 bool crusade(PlayerType *player_ptr);
-bool confuse_monsters(PlayerType *player_ptr, HIT_POINT dam);
-bool charm_monsters(PlayerType *player_ptr, HIT_POINT dam);
-bool charm_animals(PlayerType *player_ptr, HIT_POINT dam);
-bool stun_monsters(PlayerType *player_ptr, HIT_POINT dam);
-bool stasis_monsters(PlayerType *player_ptr, HIT_POINT dam);
-bool mindblast_monsters(PlayerType *player_ptr, HIT_POINT dam);
+bool confuse_monsters(PlayerType *player_ptr, int dam);
+bool charm_monsters(PlayerType *player_ptr, int dam);
+bool charm_animals(PlayerType *player_ptr, int dam);
+bool stun_monsters(PlayerType *player_ptr, int dam);
+bool stasis_monsters(PlayerType *player_ptr, int dam);
+bool mindblast_monsters(PlayerType *player_ptr, int dam);
 bool banish_monsters(PlayerType *player_ptr, int dist);
-bool turn_evil(PlayerType *player_ptr, HIT_POINT dam);
-bool turn_monsters(PlayerType *player_ptr, HIT_POINT dam);
+bool turn_evil(PlayerType *player_ptr, int dam);
+bool turn_monsters(PlayerType *player_ptr, int dam);
 bool deathray_monsters(PlayerType *player_ptr);
 void probed_monster_info(char *buf, PlayerType *player_ptr, monster_type *m_ptr, monster_race *r_ptr);
 bool probing(PlayerType *player_ptr);
index 0c470bc..e801dc0 100644 (file)
@@ -11,7 +11,7 @@
  * @param dam 威力
  * @return 作用が実際にあった場合TRUEを返す
  */
-bool hypodynamic_bolt(PlayerType *player_ptr, DIRECTION dir, HIT_POINT dam)
+bool hypodynamic_bolt(PlayerType *player_ptr, DIRECTION dir, int dam)
 {
     BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
     return project_hook(player_ptr, AttributeType::HYPODYNAMIA, dir, dam, flg);
index 11bcf69..7f43302 100644 (file)
@@ -3,5 +3,5 @@
 #include "system/angband.h"
 
 class PlayerType;
-bool hypodynamic_bolt(PlayerType *player_ptr, DIRECTION dir, HIT_POINT dam);
+bool hypodynamic_bolt(PlayerType *player_ptr, DIRECTION dir, int dam);
 bool death_ray(PlayerType *player_ptr, DIRECTION dir, PLAYER_LEVEL plev);
index a6c8147..8d64d83 100644 (file)
@@ -189,7 +189,7 @@ bool vanish_dungeon(PlayerType *player_ptr)
  * @param rad 効力の半径
  * @details このファイルにいるのは、spells-trump.c と比べて行数が少なかったため。それ以上の意図はない
  */
-void cast_meteor(PlayerType *player_ptr, HIT_POINT dam, POSITION rad)
+void cast_meteor(PlayerType *player_ptr, int dam, POSITION rad)
 {
     int b = 10 + randint1(10);
     for (int i = 0; i < b; i++) {
index bf1130b..359024f 100644 (file)
@@ -5,4 +5,4 @@
 class PlayerType;
 void call_the_void(PlayerType *player_ptr);
 bool vanish_dungeon(PlayerType *player_ptr);
-void cast_meteor(PlayerType *player_ptr, HIT_POINT dam, POSITION rad);
+void cast_meteor(PlayerType *player_ptr, int dam, POSITION rad);
index 7d9b86c..7638629 100644 (file)
@@ -34,7 +34,7 @@
  * @param rad 効力の半径
  * @return ターゲットを指定し、実行したならばTRUEを返す。
  */
-bool cast_wrath_of_the_god(PlayerType *player_ptr, HIT_POINT dam, POSITION rad)
+bool cast_wrath_of_the_god(PlayerType *player_ptr, int dam, POSITION rad)
 {
     DIRECTION dir;
     if (!get_aim_dir(player_ptr, &dir))
index 9078002..45f5649 100644 (file)
@@ -3,6 +3,6 @@
 #include "system/angband.h"
 
 class PlayerType;
-bool cast_wrath_of_the_god(PlayerType *player_ptr, HIT_POINT dam, POSITION rad);
+bool cast_wrath_of_the_god(PlayerType *player_ptr, int dam, POSITION rad);
 bool set_tim_sh_holy(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec);
 bool set_tim_eyeeye(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec);
index ccbb9da..aecee71 100644 (file)
@@ -299,7 +299,7 @@ void SpellHex::continue_revenge()
  * @brief 復讐ダメージの追加を行う
  * @param dam 蓄積されるダメージ量
  */
-void SpellHex::store_vengeful_damage(HIT_POINT dam)
+void SpellHex::store_vengeful_damage(int dam)
 {
     if (!this->spell_hex_data || (this->get_revenge_turn() == 0)) {
         return;
index 1c22c2e..8f0959d 100644 (file)
@@ -24,7 +24,7 @@ public:
     void stop_all_spells();
     bool is_casting_full_capacity() const;
     void continue_revenge();
-    void store_vengeful_damage(HIT_POINT dam);
+    void store_vengeful_damage(int dam);
     bool check_hex_barrier(MONSTER_IDX m_idx, spell_hex_type type) const;
     bool is_spelling_specific(int hex) const;
     bool is_spelling_any() const;
index dea1308..192812b 100644 (file)
@@ -22,7 +22,7 @@
  * @param m_ptr 対象モンスター
  * @return 魅了に抵抗したらTRUE
  */
-bool common_saving_throw_charm(PlayerType *player_ptr, HIT_POINT pow, monster_type *m_ptr)
+bool common_saving_throw_charm(PlayerType *player_ptr, int pow, monster_type *m_ptr)
 {
     auto *r_ptr = &r_info[m_ptr->r_idx];
 
@@ -57,7 +57,7 @@ bool common_saving_throw_charm(PlayerType *player_ptr, HIT_POINT pow, monster_ty
  * @param m_ptr 対象モンスター
  * @return 服従に抵抗したらTRUE
  */
-bool common_saving_throw_control(PlayerType *player_ptr, HIT_POINT pow, monster_type *m_ptr)
+bool common_saving_throw_control(PlayerType *player_ptr, int pow, monster_type *m_ptr)
 {
     auto *r_ptr = &r_info[m_ptr->r_idx];
 
index 7950a05..1e2b6f2 100644 (file)
@@ -4,6 +4,6 @@
 
 struct monster_type;
 class PlayerType;
-bool common_saving_throw_control(PlayerType *player_ptr, HIT_POINT pow, monster_type *m_ptr);
-bool common_saving_throw_charm(PlayerType *player_ptr, HIT_POINT pow, monster_type *m_ptr);
+bool common_saving_throw_control(PlayerType *player_ptr, int pow, monster_type *m_ptr);
+bool common_saving_throw_charm(PlayerType *player_ptr, int pow, monster_type *m_ptr);
 PERCENTAGE beam_chance(PlayerType *player_ptr);
index 2d74feb..b486baa 100644 (file)
@@ -498,7 +498,7 @@ bool enchant_equipment(PlayerType *player_ptr, ObjectType *o_ptr, int n, int efl
  * Note that "num_ac" requires armour, else weapon
  * Returns TRUE if attempted, FALSE if cancelled
  */
-bool enchant_spell(PlayerType *player_ptr, HIT_PROB num_hit, HIT_POINT num_dam, ARMOUR_CLASS num_ac)
+bool enchant_spell(PlayerType *player_ptr, HIT_PROB num_hit, int num_dam, ARMOUR_CLASS num_ac)
 {
     /* Assume enchant weapon */
     FuncItemTester item_tester(&ObjectType::allow_enchant_weapon);
index 91d383a..69ec81e 100644 (file)
@@ -18,5 +18,5 @@ void brand_bolts(PlayerType *player_ptr);
 #define ENCH_TOAC       0x04 /*!< 装備強化処理: AC強化 / Enchant to AC */
 #define ENCH_FORCE      0x08 /*!< 装備強化処理: 無条件に成功させる / Force enchantment */
 bool enchant_equipment(PlayerType *player_ptr, ObjectType *o_ptr, int n, int eflag);
-bool enchant_spell(PlayerType *player_ptr, HIT_PROB num_hit, HIT_POINT num_dam, ARMOUR_CLASS num_ac);
+bool enchant_spell(PlayerType *player_ptr, HIT_PROB num_hit, int num_dam, ARMOUR_CLASS num_ac);
 void brand_weapon(PlayerType *player_ptr, int brand_type);
index 1b155ae..ec0d418 100644 (file)
@@ -63,7 +63,7 @@
  * @param dam 威力
  * @return 作用が実際にあった場合TRUEを返す
  */
-bool heal_monster(PlayerType *player_ptr, DIRECTION dir, HIT_POINT dam)
+bool heal_monster(PlayerType *player_ptr, DIRECTION dir, int dam)
 {
     BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
     return project_hook(player_ptr, AttributeType::OLD_HEAL, dir, dam, flg);
@@ -226,13 +226,13 @@ bool time_walk(PlayerType *player_ptr)
  */
 void roll_hitdice(PlayerType *player_ptr, spell_operation options)
 {
-    HIT_POINT min_value = player_ptr->hitdie + ((PY_MAX_LEVEL + 2) * (player_ptr->hitdie + 1)) * 3 / 8;
-    HIT_POINT max_value = player_ptr->hitdie + ((PY_MAX_LEVEL + 2) * (player_ptr->hitdie + 1)) * 5 / 8;
+    int min_value = player_ptr->hitdie + ((PY_MAX_LEVEL + 2) * (player_ptr->hitdie + 1)) * 3 / 8;
+    int max_value = player_ptr->hitdie + ((PY_MAX_LEVEL + 2) * (player_ptr->hitdie + 1)) * 5 / 8;
 
     /* Rerate */
     while (true) {
         /* Pre-calculate level 1 hitdice */
-        player_ptr->player_hp[0] = (HIT_POINT)player_ptr->hitdie;
+        player_ptr->player_hp[0] = (int)player_ptr->hitdie;
 
         for (int i = 1; i < 4; i++) {
             player_ptr->player_hp[0] += randint1(player_ptr->hitdie);
@@ -387,7 +387,7 @@ bool cure_serious_wounds(PlayerType *player_ptr, DICE_NUMBER dice, DICE_SID side
     return ident;
 }
 
-bool cure_critical_wounds(PlayerType *player_ptr, HIT_POINT pow)
+bool cure_critical_wounds(PlayerType *player_ptr, int pow)
 {
     auto ident = false;
     if (hp_player(player_ptr, pow)) {
@@ -422,7 +422,7 @@ bool cure_critical_wounds(PlayerType *player_ptr, HIT_POINT pow)
     return ident;
 }
 
-bool true_healing(PlayerType *player_ptr, HIT_POINT pow)
+bool true_healing(PlayerType *player_ptr, int pow)
 {
     auto ident = false;
     if (hp_player(player_ptr, pow)) {
index b0b061e..c73d4de 100644 (file)
@@ -6,7 +6,7 @@
 class ObjectType;
 class PlayerType;
 struct monster_type;
-bool heal_monster(PlayerType *player_ptr, DIRECTION dir, HIT_POINT dam);
+bool heal_monster(PlayerType *player_ptr, DIRECTION dir, int dam);
 bool speed_monster(PlayerType *player_ptr, DIRECTION dir, int power);
 bool slow_monster(PlayerType *player_ptr, DIRECTION dir, int power);
 bool sleep_monster(PlayerType *player_ptr, DIRECTION dir, int power);
@@ -24,8 +24,8 @@ bool heroism(PlayerType *player_ptr, int base);
 bool berserk(PlayerType *player_ptr, int base);
 bool cure_light_wounds(PlayerType *player_ptr, DICE_NUMBER dice, DICE_SID sides);
 bool cure_serious_wounds(PlayerType *player_ptr, DICE_NUMBER dice, DICE_SID sides);
-bool cure_critical_wounds(PlayerType *player_ptr, HIT_POINT pow);
-bool true_healing(PlayerType *player_ptr, HIT_POINT pow);
+bool cure_critical_wounds(PlayerType *player_ptr, int pow);
+bool true_healing(PlayerType *player_ptr, int pow);
 bool restore_mana(PlayerType *player_ptr, bool magic_eater);
 bool restore_all_status(PlayerType *player_ptr);
 
index e382d9f..366ca12 100644 (file)
@@ -28,7 +28,7 @@ struct artifact_type {
        OBJECT_SUBTYPE_VALUE sval{};    /*!< ベースアイテム小項目ID / Artifact sub type */
        PARAMETER_VALUE pval{}; /*!< pval修正値 / Artifact extra info */
        HIT_PROB to_h{};                        /*!< 命中ボーナス値 /  Bonus to hit */
-       HIT_POINT to_d{};               /*!< ダメージボーナス値 / Bonus to damage */
+       int to_d{};             /*!< ダメージボーナス値 / Bonus to damage */
        ARMOUR_CLASS to_a{};                    /*!< ACボーナス値 / Bonus to armor */
        ARMOUR_CLASS ac{};                      /*!< 上書きベースAC値 / Base armor */
        DICE_NUMBER dd{};
index e6a5e4d..46c2688 100644 (file)
@@ -99,14 +99,6 @@ typedef byte FEAT_SUBTYPE; /*!< 地形情報の副値 (トラップ種別/パタ
 typedef char GAME_TEXT; /*!< ゲーム中のテキスト型定義 */
 
 /*!
- * @var typedef int32_t HIT_POINT
- * @brief HPとその増減量の型定義
- * @details
- * HIT_POINTはプレイヤー及びモンスターのHPの各値とその増減量の型である。
- */
-typedef int32_t HIT_POINT;
-
-/*!
  * @var typedef int32_t MANA_POINT
  * @brief MPとその増減量の型定義
  * @details
index dd1efb7..a6b9c82 100644 (file)
@@ -30,10 +30,10 @@ struct monster_type {
 
        POSITION fy{};          /*!< 所在グリッドY座標 / Y location on map */
        POSITION fx{};          /*!< 所在グリッドX座標 / X location on map */
-       HIT_POINT hp{};         /*!< 現在のHP / Current Hit points */
-       HIT_POINT maxhp{};              /*!< 現在の最大HP(衰弱効果などにより低下したものの反映) / Max Hit points */
-       HIT_POINT max_maxhp{};          /*!< 生成時の初期最大HP / Max Max Hit points */
-       HIT_POINT dealt_damage{};               /*!< これまでに蓄積して与えてきたダメージ / Sum of damages dealt by player */
+       int hp{};               /*!< 現在のHP / Current Hit points */
+       int maxhp{};            /*!< 現在の最大HP(衰弱効果などにより低下したものの反映) / Max Hit points */
+       int max_maxhp{};                /*!< 生成時の初期最大HP / Max Max Hit points */
+       int dealt_damage{};             /*!< これまでに蓄積して与えてきたダメージ / Sum of damages dealt by player */
        TIME_EFFECT mtimed[MAX_MTIMED]{};       /*!< 与えられた時限効果の残りターン / Timed status counter */
        byte mspeed{};          /*!< モンスターの個体加速値 / Monster "speed" */
        ACTION_ENERGY energy_need{};    /*!< モンスター次ターンまでに必要な行動エネルギー / Monster "energy" */
index 46ecd4f..8baca6d 100644 (file)
@@ -48,7 +48,7 @@ public:
     std::optional<RandomArtActType> smith_act_idx; //!< 鍛冶で付与された発動効果のID
 
     HIT_PROB to_h{}; /*!< Plusses to hit */
-    HIT_POINT to_d{}; /*!< Plusses to damage */
+    int to_d{}; /*!< Plusses to damage */
     ARMOUR_CLASS to_a{}; /*!< Plusses to AC */
     ARMOUR_CLASS ac{}; /*!< Normal AC */
 
index a834317..021758b 100644 (file)
@@ -72,8 +72,8 @@ public:
     POSITION wilderness_y{};
     bool wild_mode{};
 
-    HIT_POINT mhp{}; /* Max hit pts */
-    HIT_POINT chp{}; /* Cur hit pts */
+    int mhp{}; /* Max hit pts */
+    int chp{}; /* Cur hit pts */
     uint32_t chp_frac{}; /* Cur hit frac (times 2^16) */
     PERCENTAGE mutant_regenerate_mod{};
 
@@ -194,7 +194,7 @@ public:
 
     ClassSpecificData class_specific_data;
 
-    HIT_POINT player_hp[PY_MAX_LEVEL]{};
+    int player_hp[PY_MAX_LEVEL]{};
     char died_from[MAX_MONSTER_NAME]{}; /* What killed the player */
     concptr last_message{}; /* Last message on death or retirement */
     char history[4][60]{}; /* Textual "history" for the Player */
@@ -363,7 +363,7 @@ public:
 
     HIT_PROB dis_to_h[2]{}; /*!< 判明している現在の表記上の近接武器命中修正値 /  Known bonus to hit (wield) */
     HIT_PROB dis_to_h_b{}; /*!< 判明している現在の表記上の射撃武器命中修正値 / Known bonus to hit (bow) */
-    HIT_POINT dis_to_d[2]{}; /*!< 判明している現在の表記上の近接武器ダメージ修正値 / Known bonus to dam (wield) */
+    int dis_to_d[2]{}; /*!< 判明している現在の表記上の近接武器ダメージ修正値 / Known bonus to dam (wield) */
     ARMOUR_CLASS dis_to_a{}; /*!< 判明している現在の表記上の装備AC修正値 / Known bonus to ac */
     ARMOUR_CLASS dis_ac{}; /*!< 判明している現在の表記上の装備AC基礎値 / Known base ac */
 
index 13980a0..bce08e0 100644 (file)
@@ -36,7 +36,7 @@
 static void display_player_melee_bonus(PlayerType *player_ptr, int hand, int hand_entry)
 {
     HIT_PROB show_tohit = player_ptr->dis_to_h[hand];
-    HIT_POINT show_todam = player_ptr->dis_to_d[hand];
+    int show_todam = player_ptr->dis_to_d[hand];
     auto *o_ptr = &player_ptr->inventory_list[INVEN_MAIN_HAND + hand];
 
     if (o_ptr->is_known())
@@ -92,7 +92,7 @@ static void display_hit_damage(PlayerType *player_ptr)
 {
     auto *o_ptr = &player_ptr->inventory_list[INVEN_BOW];
     HIT_PROB show_tohit = player_ptr->dis_to_h_b;
-    HIT_POINT show_todam = 0;
+    int show_todam = 0;
     if (o_ptr->is_known())
         show_tohit += o_ptr->to_h;
     if (o_ptr->is_known())
index fd9f31d..267d468 100644 (file)
@@ -229,7 +229,7 @@ void wiz_summon_pet(PlayerType *player_ptr, MONRACE_IDX r_idx)
  * @param self 自分に与えるか否か
  * @details デフォルトは100万・GF_ARROW(射撃)。RES_ALL持ちも一撃で殺せる。
  */
-void wiz_kill_target(PlayerType *player_ptr, HIT_POINT dam, AttributeType effect_idx, const bool self)
+void wiz_kill_target(PlayerType *player_ptr, int dam, AttributeType effect_idx, const bool self)
 {
     if (dam <= 0) {
         dam = 1000000;
index b63820c..2855faa 100644 (file)
@@ -15,7 +15,7 @@ typedef union spell_functions {
     } spell2;
 
     struct debug_spell_type3 {
-        bool (*spell_function)(PlayerType *, HIT_POINT);
+        bool (*spell_function)(PlayerType *, int);
     } spell3;
 
     struct debug_spell_type4 { // 実質 ty curse
@@ -43,4 +43,4 @@ void wiz_fillup_all_smith_essences(PlayerType *player_ptr);
 void wiz_summon_random_enemy(PlayerType *player_ptr, int num);
 void wiz_summon_specific_enemy(PlayerType *player_ptr, MONRACE_IDX r_idx);
 void wiz_summon_pet(PlayerType *player_ptr, MONRACE_IDX r_idx);
-void wiz_kill_target(PlayerType *player_ptr, HIT_POINT dam = 1000000, AttributeType effect_idx = AttributeType::DEBUG, const bool self = false);
+void wiz_kill_target(PlayerType *player_ptr, int dam = 1000000, AttributeType effect_idx = AttributeType::DEBUG, const bool self = false);