OSDN Git Service

#37287 #37353 (2.2.0.89) 型の置換を継続中。 / Ongoing type replacement.
authorDeskull <desull@users.sourceforge.jp>
Thu, 26 Oct 2017 00:36:25 +0000 (09:36 +0900)
committerDeskull <desull@users.sourceforge.jp>
Thu, 26 Oct 2017 00:36:25 +0000 (09:36 +0900)
25 files changed:
src/artifact.c
src/bldg.c
src/cmd1.c
src/cmd4.c
src/cmd5.c
src/cmd6.c
src/do-spell.c
src/dungeon.c
src/externs.h
src/hex.c
src/init2.c
src/mane.c
src/melee1.c
src/monster2.c
src/mspells2.c
src/mspells4.c
src/object2.c
src/rooms.c
src/save.c
src/spells1.c
src/spells2.c
src/spells3.c
src/variable.c
src/wizard2.c
src/xtra2.c

index 29f999d..e2b9caf 100644 (file)
@@ -2973,7 +2973,7 @@ bool activate_random_artifact(object_type *o_ptr)
                                }
                                for (; i < EATER_EXT*3; i++)
                                {
                                }
                                for (; i < EATER_EXT*3; i++)
                                {
-                                       int k_idx = lookup_kind(TV_ROD, i-EATER_EXT*2);
+                                       KIND_OBJECT_IDX k_idx = lookup_kind(TV_ROD, i-EATER_EXT*2);
                                        p_ptr->magic_num1[i] -= ((p_ptr->magic_num2[i] < 10) ? EATER_ROD_CHARGE*3 : p_ptr->magic_num2[i]*EATER_ROD_CHARGE/3)*k_info[k_idx].pval;
                                        if (p_ptr->magic_num1[i] < 0) p_ptr->magic_num1[i] = 0;
                                }
                                        p_ptr->magic_num1[i] -= ((p_ptr->magic_num2[i] < 10) ? EATER_ROD_CHARGE*3 : p_ptr->magic_num2[i]*EATER_ROD_CHARGE/3)*k_info[k_idx].pval;
                                        if (p_ptr->magic_num1[i] < 0) p_ptr->magic_num1[i] = 0;
                                }
@@ -3902,7 +3902,7 @@ int calc_arm_avgdamage(object_type *o_ptr)
        u32b flgs[TR_FLAG_SIZE];
        object_flags(o_ptr, flgs);
 
        u32b flgs[TR_FLAG_SIZE];
        object_flags(o_ptr, flgs);
 
-       int dam, base, s_evil, forced, vorpal;
+       HIT_POINT dam, base, s_evil, forced, vorpal;
        dam = base = s_evil = forced = vorpal = 0;
 
        dam = base = (o_ptr->dd * o_ptr->ds + o_ptr->dd) / 2;
        dam = base = s_evil = forced = vorpal = 0;
 
        dam = base = (o_ptr->dd * o_ptr->ds + o_ptr->dd) / 2;
@@ -3986,7 +3986,7 @@ static int suppression_evil_dam(object_type *o_ptr)
 
 static int weakening_artifact(object_type *o_ptr)
 {
 
 static int weakening_artifact(object_type *o_ptr)
 {
-        int k_idx = lookup_kind(o_ptr->sval, o_ptr->tval);
+        KIND_OBJECT_IDX k_idx = lookup_kind(o_ptr->sval, o_ptr->tval);
         object_kind *k_ptr = &k_info[k_idx];
 
         if ((k_ptr->dd < o_ptr->dd) || (k_ptr->ds < o_ptr->ds))
         object_kind *k_ptr = &k_info[k_idx];
 
         if ((k_ptr->dd < o_ptr->dd) || (k_ptr->ds < o_ptr->ds))
index e3857cf..7d77228 100644 (file)
@@ -1441,7 +1441,7 @@ static bool gamble_comm(int cmd)
 static bool vault_aux_battle(MONRACE_IDX r_idx)
 {
        int i;
 static bool vault_aux_battle(MONRACE_IDX r_idx)
 {
        int i;
-       int dam = 0;
+       HIT_POINT dam = 0;
 
        monster_race *r_ptr = &r_info[r_idx];
 
 
        monster_race *r_ptr = &r_info[r_idx];
 
@@ -2356,7 +2356,7 @@ HIT_POINT calc_crit_ratio_shot(HIT_POINT plus_ammo, HIT_POINT plus_bow)
  * @param dam 基本ダメージ量
  * @return ダメージ期待値
  */
  * @param dam 基本ダメージ量
  * @return ダメージ期待値
  */
-HIT_POINT calc_expect_crit_shot(int weight, int plus_ammo, int plus_bow,  int dam)
+HIT_POINT calc_expect_crit_shot(int weight, int plus_ammo, int plus_bow,  HIT_POINT dam)
 {
        u32b num;
        int i, k, crit;
 {
        u32b num;
        int i, k, crit;
@@ -2398,7 +2398,7 @@ HIT_POINT calc_expect_crit_shot(int weight, int plus_ammo, int plus_bow,  int da
  * @param dokubari 毒針処理か否か
  * @return ダメージ期待値
  */
  * @param dokubari 毒針処理か否か
  * @return ダメージ期待値
  */
-HIT_POINT calc_expect_crit(int weight, int plus, int dam, s16b meichuu, bool dokubari)
+HIT_POINT calc_expect_crit(int weight, int plus, HIT_POINT dam, s16b meichuu, bool dokubari)
 {
        u32b k, num;
        int i;
 {
        u32b k, num;
        int i;
index 65348ac..7056f27 100644 (file)
@@ -950,7 +950,7 @@ static int check_hit(int power)
  */
 static void hit_trap_pit(int trap_feat_type)
 {
  */
 static void hit_trap_pit(int trap_feat_type)
 {
-       int dam;
+       HIT_POINT dam;
        cptr trap_name = "";
        cptr spike_name = "";
 
        cptr trap_name = "";
        cptr spike_name = "";
 
@@ -1368,7 +1368,7 @@ static void hit_trap(bool break_trap)
  * @return なし
  */
 static void touch_zap_player_aux(monster_type *m_ptr, bool immune, int flags_offset, int r_flags_offset, u32b aura_flag,
  * @return なし
  */
 static void touch_zap_player_aux(monster_type *m_ptr, bool immune, int flags_offset, int r_flags_offset, u32b aura_flag,
-                                int (*dam_func)(int dam, cptr kb_str, int monspell, bool aura), cptr message)
+                                int (*dam_func)(HIT_POINT dam, cptr kb_str, int monspell, bool aura), cptr message)
 {
        monster_race *r_ptr = &r_info[m_ptr->r_idx];
 
 {
        monster_race *r_ptr = &r_info[m_ptr->r_idx];
 
index c344a9f..c325b72 100644 (file)
@@ -6993,7 +6993,7 @@ static void display_object_list(int col, int row, int per_page, IDX object_idx[]
                object_kind *flavor_k_ptr;
 
                /* Get the object index */
                object_kind *flavor_k_ptr;
 
                /* Get the object index */
-               int k_idx = object_idx[object_top + i];
+               KIND_OBJECT_IDX k_idx = object_idx[object_top + i];
 
                /* Access the object */
                object_kind *k_ptr = &k_info[k_idx];
 
                /* Access the object */
                object_kind *k_ptr = &k_info[k_idx];
index 00c11a3..1264072 100644 (file)
@@ -1848,7 +1848,7 @@ static bool player_can_ride_aux(cave_type *c_ptr, bool now_riding)
  * @param force TRUEならば強制的に落馬する
  * @return 実際に落馬したらTRUEを返す
  */
  * @param force TRUEならば強制的に落馬する
  * @return 実際に落馬したらTRUEを返す
  */
-bool rakuba(int dam, bool force)
+bool rakuba(HIT_POINT dam, bool force)
 {
        int i, y, x, oy, ox;
        int sn = 0, sy = 0, sx = 0;
 {
        int i, y, x, oy, ox;
        int sn = 0, sy = 0, sx = 0;
index 9ad37af..d344cc7 100644 (file)
@@ -1026,7 +1026,7 @@ static void do_cmd_quaff_potion_aux(int item)
                                }
                                for (; i < EATER_EXT*3; i++)
                                {
                                }
                                for (; i < EATER_EXT*3; i++)
                                {
-                                       int k_idx = lookup_kind(TV_ROD, i-EATER_EXT*2);
+                                       KIND_OBJECT_IDX k_idx = lookup_kind(TV_ROD, i-EATER_EXT*2);
                                        p_ptr->magic_num1[i] -= ((p_ptr->magic_num2[i] < 10) ? EATER_ROD_CHARGE*3 : p_ptr->magic_num2[i]*EATER_ROD_CHARGE/3)*k_info[k_idx].pval;
                                        if (p_ptr->magic_num1[i] < 0) p_ptr->magic_num1[i] = 0;
                                }
                                        p_ptr->magic_num1[i] -= ((p_ptr->magic_num2[i] < 10) ? EATER_ROD_CHARGE*3 : p_ptr->magic_num2[i]*EATER_ROD_CHARGE/3)*k_info[k_idx].pval;
                                        if (p_ptr->magic_num1[i] < 0) p_ptr->magic_num1[i] = 0;
                                }
@@ -2609,7 +2609,7 @@ static int wand_effect(OBJECT_SUBTYPE_VALUE sval, int dir, bool powerful, bool m
        {
                case SV_WAND_HEAL_MONSTER:
                {
        {
                case SV_WAND_HEAL_MONSTER:
                {
-                       int dam = damroll((powerful ? 20 : 10), 10);
+                       HIT_POINT dam = damroll((powerful ? 20 : 10), 10);
                        if (heal_monster(dir, dam)) ident = TRUE;
                        break;
                }
                        if (heal_monster(dir, dam)) ident = TRUE;
                        break;
                }
@@ -2649,14 +2649,14 @@ static int wand_effect(OBJECT_SUBTYPE_VALUE sval, int dir, bool powerful, bool m
 
                case SV_WAND_STONE_TO_MUD:
                {
 
                case SV_WAND_STONE_TO_MUD:
                {
-                       int dam = powerful ? 40 + randint1(60) : 20 + randint1(30);
+                       HIT_POINT dam = powerful ? 40 + randint1(60) : 20 + randint1(30);
                        if (wall_to_mud(dir, dam)) ident = TRUE;
                        break;
                }
 
                case SV_WAND_LITE:
                {
                        if (wall_to_mud(dir, dam)) ident = TRUE;
                        break;
                }
 
                case SV_WAND_LITE:
                {
-                       int dam = damroll((powerful ? 12 : 6), 8);
+                       HIT_POINT dam = damroll((powerful ? 12 : 6), 8);
                        msg_print(_("青く輝く光線が放たれた。", "A line of blue shimmering light appears."));
                        (void)lite_line(dir, dam);
                        ident = TRUE;
                        msg_print(_("青く輝く光線が放たれた。", "A line of blue shimmering light appears."));
                        (void)lite_line(dir, dam);
                        ident = TRUE;
@@ -2791,7 +2791,7 @@ static int wand_effect(OBJECT_SUBTYPE_VALUE sval, int dir, bool powerful, bool m
 
                case SV_WAND_DRAGON_BREATH:
                {
 
                case SV_WAND_DRAGON_BREATH:
                {
-                       int dam;
+                       HIT_POINT dam;
                        int typ;
 
                        switch (randint1(5))
                        int typ;
 
                        switch (randint1(5))
@@ -3182,7 +3182,7 @@ static int rod_effect(OBJECT_SUBTYPE_VALUE sval, int dir, bool *use_charge, bool
 
                case SV_ROD_LITE:
                {
 
                case SV_ROD_LITE:
                {
-                       int dam = damroll((powerful ? 12 : 6), 8);
+                       HIT_POINT dam = damroll((powerful ? 12 : 6), 8);
                        msg_print(_("青く輝く光線が放たれた。", "A line of blue shimmering light appears."));
                        (void)lite_line(dir, dam);
                        ident = TRUE;
                        msg_print(_("青く輝く光線が放たれた。", "A line of blue shimmering light appears."));
                        (void)lite_line(dir, dam);
                        ident = TRUE;
@@ -3278,7 +3278,7 @@ static int rod_effect(OBJECT_SUBTYPE_VALUE sval, int dir, bool *use_charge, bool
 
                case SV_ROD_STONE_TO_MUD:
                {
 
                case SV_ROD_STONE_TO_MUD:
                {
-                       int dam = powerful ? 40 + randint1(60) : 20 + randint1(30);
+                       HIT_POINT dam = powerful ? 40 + randint1(60) : 20 + randint1(30);
                        if (wall_to_mud(dir, dam)) ident = TRUE;
                        break;
                }
                        if (wall_to_mud(dir, dam)) ident = TRUE;
                        break;
                }
index 72c0e44..4ab9f0b 100644 (file)
@@ -96,7 +96,7 @@ static cptr info_delay(int base, int sides)
  * @param dam 固定値
  * @return フォーマットに従い整形された文字列
  */
  * @param dam 固定値
  * @return フォーマットに従い整形された文字列
  */
-static cptr info_multi_damage(int dam)
+static cptr info_multi_damage(HIT_POINT dam)
 {
        return format(_("損傷:各%d", "dam %d each"), dam);
 }
 {
        return format(_("損傷:各%d", "dam %d each"), dam);
 }
@@ -775,7 +775,7 @@ static void cast_shuffle(void)
  * @param rad 効力の半径
  * @return なし
  */
  * @param rad 効力の半径
  * @return なし
  */
-static void cast_meteor(int dam, int rad)
+static void cast_meteor(HIT_POINT dam, int rad)
 {
        int i;
        int b = 10 + randint1(10);
 {
        int i;
        int b = 10 + randint1(10);
@@ -820,7 +820,7 @@ static void cast_meteor(int dam, int rad)
  * @param rad 効力の半径
  * @return ターゲットを指定し、実行したならばTRUEを返す。
  */
  * @param rad 効力の半径
  * @return ターゲットを指定し、実行したならばTRUEを返す。
  */
-static bool cast_wrath_of_the_god(int dam, int rad)
+static bool cast_wrath_of_the_god(HIT_POINT dam, int rad)
 {
        int x, y, tx, ty;
        int nx, ny;
 {
        int x, y, tx, ty;
        int nx, ny;
@@ -2605,7 +2605,7 @@ static cptr do_nature_spell(int spell, int mode)
                if (desc) return _("巨大な冷気の球を放つ。", "Fires a huge ball of cold.");
     
                {
                if (desc) return _("巨大な冷気の球を放つ。", "Fires a huge ball of cold.");
     
                {
-                       int dam = 70 + plev * 3 / 2;
+                       HIT_POINT dam = 70 + plev * 3 / 2;
                        int rad = plev / 12 + 1;
 
                        if (info) return info_damage(0, 0, dam);
                        int rad = plev / 12 + 1;
 
                        if (info) return info_damage(0, 0, dam);
@@ -2624,7 +2624,7 @@ static cptr do_nature_spell(int spell, int mode)
                if (desc) return _("巨大な電撃の球を放つ。", "Fires a huge electric ball.");
     
                {
                if (desc) return _("巨大な電撃の球を放つ。", "Fires a huge electric ball.");
     
                {
-                       int dam = 90 + plev * 3 / 2;
+                       HIT_POINT dam = 90 + plev * 3 / 2;
                        int rad = plev / 12 + 1;
 
                        if (info) return info_damage(0, 0, dam);
                        int rad = plev / 12 + 1;
 
                        if (info) return info_damage(0, 0, dam);
@@ -2643,7 +2643,7 @@ static cptr do_nature_spell(int spell, int mode)
                if (desc) return _("巨大な水の球を放つ。", "Fires a huge ball of water.");
     
                {
                if (desc) return _("巨大な水の球を放つ。", "Fires a huge ball of water.");
     
                {
-                       int dam = 100 + plev * 3 / 2;
+                       HIT_POINT dam = 100 + plev * 3 / 2;
                        int rad = plev / 12 + 1;
 
                        if (info) return info_damage(0, 0, dam);
                        int rad = plev / 12 + 1;
 
                        if (info) return info_damage(0, 0, dam);
@@ -2662,7 +2662,7 @@ static cptr do_nature_spell(int spell, int mode)
                        "Generates ball of light centered on you. Maps and lights whole dungeon level. Knows all objects location.");
     
                {
                        "Generates ball of light centered on you. Maps and lights whole dungeon level. Knows all objects location.");
     
                {
-                       int dam = 150;
+                       HIT_POINT dam = 150;
                        int rad = 8;
 
                        if (info) return info_damage(0, 0, dam/2);
                        int rad = 8;
 
                        if (info) return info_damage(0, 0, dam/2);
@@ -2944,7 +2944,7 @@ static cptr do_chaos_spell(int spell, int mode)
                if (desc) return _("自分を中心とした轟音の球を発生させる。", "Generates a ball of sound centered on you.");
     
                {
                if (desc) return _("自分を中心とした轟音の球を発生させる。", "Generates a ball of sound centered on you.");
     
                {
-                       int dam = 60 + plev;
+                       HIT_POINT dam = 60 + plev;
                        int rad = plev / 10 + 2;
 
                        if (info) return info_damage(0, 0, dam/2);
                        int rad = plev / 10 + 2;
 
                        if (info) return info_damage(0, 0, dam/2);
@@ -2981,7 +2981,7 @@ static cptr do_chaos_spell(int spell, int mode)
                if (desc) return _("炎の球を放つ。", "Fires a ball of fire.");
     
                {
                if (desc) return _("炎の球を放つ。", "Fires a ball of fire.");
     
                {
-                       int dam = plev + 55;
+                       HIT_POINT dam = plev + 55;
                        int rad = 2;
 
                        if (info) return info_damage(0, 0, dam);
                        int rad = 2;
 
                        if (info) return info_damage(0, 0, dam);
@@ -3033,7 +3033,7 @@ static cptr do_chaos_spell(int spell, int mode)
                if (desc) return _("巨大なカオスの球を放つ。", "Fires a huge ball of chaos.");
     
                {
                if (desc) return _("巨大なカオスの球を放つ。", "Fires a huge ball of chaos.");
     
                {
-                       int dam = plev * 2 + 99;
+                       HIT_POINT dam = plev * 2 + 99;
                        int rad = plev / 5;
 
                        if (info) return info_damage(0, 0, dam);
                        int rad = plev / 5;
 
                        if (info) return info_damage(0, 0, dam);
@@ -3104,7 +3104,7 @@ static cptr do_chaos_spell(int spell, int mode)
                if (desc) return _("巨大な分解の球を放つ。", "Fires a huge ball of disintegration.");
     
                {
                if (desc) return _("巨大な分解の球を放つ。", "Fires a huge ball of disintegration.");
     
                {
-                       int dam = plev + 70;
+                       HIT_POINT dam = plev + 70;
                        int rad = 3 + plev / 40;
 
                        if (info) return info_damage(0, 0, dam);
                        int rad = 3 + plev / 40;
 
                        if (info) return info_damage(0, 0, dam);
@@ -3140,7 +3140,7 @@ static cptr do_chaos_spell(int spell, int mode)
                if (desc) return _("ロケットを発射する。", "Fires a magic rocket.");
     
                {
                if (desc) return _("ロケットを発射する。", "Fires a magic rocket.");
     
                {
-                       int dam = 120 + plev * 2;
+                       HIT_POINT dam = 120 + plev * 2;
                        int rad = 2;
 
                        if (info) return info_damage(0, 0, dam);
                        int rad = 2;
 
                        if (info) return info_damage(0, 0, dam);
@@ -3222,7 +3222,7 @@ static cptr do_chaos_spell(int spell, int mode)
                if (desc) return _("自分の周辺に隕石を落とす。", "Makes meteor balls fall down to nearby random locations.");
     
                {
                if (desc) return _("自分の周辺に隕石を落とす。", "Makes meteor balls fall down to nearby random locations.");
     
                {
-                       int dam = plev * 2;
+                       HIT_POINT dam = plev * 2;
                        int rad = 2;
 
                        if (info) return info_multi_damage(dam);
                        int rad = 2;
 
                        if (info) return info_multi_damage(dam);
@@ -3239,7 +3239,7 @@ static cptr do_chaos_spell(int spell, int mode)
                if (desc) return _("自分を中心とした超巨大な炎の球を発生させる。", "Generate a huge ball of fire centered on you.");
     
                {
                if (desc) return _("自分を中心とした超巨大な炎の球を発生させる。", "Generate a huge ball of fire centered on you.");
     
                {
-                       int dam = 300 + 3 * plev;
+                       HIT_POINT dam = 300 + 3 * plev;
                        int rad = 8;
 
                        if (info) return info_damage(0, 0, dam/2);
                        int rad = 8;
 
                        if (info) return info_damage(0, 0, dam/2);
@@ -3283,7 +3283,7 @@ static cptr do_chaos_spell(int spell, int mode)
                if (desc) return _("非常に強力で巨大な純粋な魔力の球を放つ。", "Fires an extremely powerful huge ball of pure mana.");
     
                {
                if (desc) return _("非常に強力で巨大な純粋な魔力の球を放つ。", "Fires an extremely powerful huge ball of pure mana.");
     
                {
-                       int dam = 300 + plev * 4;
+                       HIT_POINT dam = 300 + plev * 4;
                        int rad = 4;
 
                        if (info) return info_damage(0, 0, dam);
                        int rad = 4;
 
                        if (info) return info_damage(0, 0, dam);
@@ -3302,7 +3302,7 @@ static cptr do_chaos_spell(int spell, int mode)
                if (desc) return _("非常に強力なカオスの球を放つ。", "Fires an extremely powerful ball of chaos.");
     
                {
                if (desc) return _("非常に強力なカオスの球を放つ。", "Fires an extremely powerful ball of chaos.");
     
                {
-                       int dam = p_ptr->chp;
+                       HIT_POINT dam = p_ptr->chp;
                        int rad = 2;
 
                        if (info) return info_damage(0, 0, dam);
                        int rad = 2;
 
                        if (info) return info_damage(0, 0, dam);
@@ -3437,7 +3437,7 @@ static cptr do_death_spell(int spell, int mode)
                if (desc) return _("毒の球を放つ。", "Fires a ball of poison.");
     
                {
                if (desc) return _("毒の球を放つ。", "Fires a ball of poison.");
     
                {
-                       int dam = 10 + plev / 2;
+                       HIT_POINT dam = 10 + plev / 2;
                        int rad = 2;
 
                        if (info) return info_damage(0, 0, dam);
                        int rad = 2;
 
                        if (info) return info_damage(0, 0, dam);
@@ -3576,7 +3576,7 @@ static cptr do_death_spell(int spell, int mode)
                if (desc) return _("自分を中心とした毒の球を発生させる。", "Generate a ball of poison centered on you.");
     
                {
                if (desc) return _("自分を中心とした毒の球を発生させる。", "Generate a ball of poison centered on you.");
     
                {
-                       int dam = (30 + plev) * 2;
+                       HIT_POINT dam = (30 + plev) * 2;
                        int rad = plev / 10 + 2;
 
                        if (info) return info_damage(0, 0, dam/2);
                        int rad = plev / 10 + 2;
 
                        if (info) return info_damage(0, 0, dam/2);
@@ -3632,7 +3632,7 @@ static cptr do_death_spell(int spell, int mode)
 
                        if (cast)
                        {
 
                        if (cast)
                        {
-                               int dam = base + damroll(dice, sides);
+                               HIT_POINT dam = base + damroll(dice, sides);
 
                                if (!get_aim_dir(&dir)) return NULL;
 
 
                                if (!get_aim_dir(&dir)) return NULL;
 
@@ -3786,7 +3786,7 @@ static cptr do_death_spell(int spell, int mode)
                        "Fires 3 bolts. Each of the bolts absorbs some HP from a monster and gives them to you.");
     
                {
                        "Fires 3 bolts. Each of the bolts absorbs some HP from a monster and gives them to you.");
     
                {
-                       int dam = 100;
+                       HIT_POINT dam = 100;
 
                        if (info) return format("%s3*%d", s_dam, dam);
 
 
                        if (info) return format("%s3*%d", s_dam, dam);
 
@@ -3829,7 +3829,7 @@ static cptr do_death_spell(int spell, int mode)
                if (desc) return _("巨大な暗黒の球を放つ。", "Fires a huge ball of darkness.");
     
                {
                if (desc) return _("巨大な暗黒の球を放つ。", "Fires a huge ball of darkness.");
     
                {
-                       int dam = 100 + plev * 2;
+                       HIT_POINT dam = 100 + plev * 2;
                        int rad = 4;
 
                        if (info) return info_damage(0, 0, dam);
                        int rad = 4;
 
                        if (info) return info_damage(0, 0, dam);
@@ -3971,7 +3971,7 @@ static cptr do_death_spell(int spell, int mode)
                        "Fires a powerful ball of evil power. Hurts good monsters greatly.");
     
                {
                        "Fires a powerful ball of evil power. Hurts good monsters greatly.");
     
                {
-                       int dam = 666;
+                       HIT_POINT dam = 666;
                        int rad = 3;
 
                        if (info) return info_damage(0, 0, dam);
                        int rad = 3;
 
                        if (info) return info_damage(0, 0, dam);
@@ -4571,7 +4571,7 @@ static cptr do_trump_spell(int spell, int mode)
                if (desc) return _("自分の周辺に隕石を落とす。", "Makes meteor balls fall down to nearby random locations.");
     
                {
                if (desc) return _("自分の周辺に隕石を落とす。", "Makes meteor balls fall down to nearby random locations.");
     
                {
-                       int dam = plev * 2;
+                       HIT_POINT dam = plev * 2;
                        int rad = 2;
 
                        if (info) return info_multi_damage(dam);
                        int rad = 2;
 
                        if (info) return info_multi_damage(dam);
@@ -5126,7 +5126,7 @@ static cptr do_arcane_spell(int spell, int mode)
                if (desc) return _("炎、電撃、冷気、酸のどれかの球を放つ。", "Fires a ball of some elements.");
     
                {
                if (desc) return _("炎、電撃、冷気、酸のどれかの球を放つ。", "Fires a ball of some elements.");
     
                {
-                       int dam = 75 + plev;
+                       HIT_POINT dam = 75 + plev;
                        int rad = 2;
 
                        if (info) return info_damage(0, 0, dam);
                        int rad = 2;
 
                        if (info) return info_damage(0, 0, dam);
@@ -5992,7 +5992,7 @@ static cptr do_daemon_spell(int spell, int mode)
                if (desc) return _("炎の球を放つ。", "Fires a ball of fire.");
     
                {
                if (desc) return _("炎の球を放つ。", "Fires a ball of fire.");
     
                {
-                       int dam = plev + 55;
+                       HIT_POINT dam = plev + 55;
                        int rad = 2;
 
                        if (info) return info_damage(0, 0, dam);
                        int rad = 2;
 
                        if (info) return info_damage(0, 0, dam);
@@ -6023,7 +6023,7 @@ static cptr do_daemon_spell(int spell, int mode)
                if (desc) return _("大きな地獄の球を放つ。", "Fires a huge ball of nether.");
     
                {
                if (desc) return _("大きな地獄の球を放つ。", "Fires a huge ball of nether.");
     
                {
-                       int dam = plev * 3 / 2 + 100;
+                       HIT_POINT dam = plev * 3 / 2 + 100;
                        int rad = plev / 20 + 2;
 
                        if (info) return info_damage(0, 0, dam);
                        int rad = plev / 20 + 2;
 
                        if (info) return info_damage(0, 0, dam);
@@ -6120,7 +6120,7 @@ static cptr do_daemon_spell(int spell, int mode)
                        "Generates a ball of fire centered on you which transforms floors to magma.");
     
                {
                        "Generates a ball of fire centered on you which transforms floors to magma.");
     
                {
-                       int dam = (55 + plev) * 2;
+                       HIT_POINT dam = (55 + plev) * 2;
                        int rad = 3;
 
                        if (info) return info_damage(0, 0, dam/2);
                        int rad = 3;
 
                        if (info) return info_damage(0, 0, dam/2);
@@ -6138,7 +6138,7 @@ static cptr do_daemon_spell(int spell, int mode)
                if (desc) return _("プラズマの球を放つ。", "Fires a ball of plasma.");
     
                {
                if (desc) return _("プラズマの球を放つ。", "Fires a ball of plasma.");
     
                {
-                       int dam = plev * 3 / 2 + 80;
+                       HIT_POINT dam = plev * 3 / 2 + 80;
                        int rad = 2 + plev / 40;
 
                        if (info) return info_damage(0, 0, dam);
                        int rad = 2 + plev / 40;
 
                        if (info) return info_damage(0, 0, dam);
@@ -6193,7 +6193,7 @@ static cptr do_daemon_spell(int spell, int mode)
                if (desc) return _("因果混乱の球を放つ。", "Fires a ball of nexus.");
     
                {
                if (desc) return _("因果混乱の球を放つ。", "Fires a ball of nexus.");
     
                {
-                       int dam = 100 + plev * 2;
+                       HIT_POINT dam = 100 + plev * 2;
                        int rad = 4;
 
                        if (info) return info_damage(0, 0, dam);
                        int rad = 4;
 
                        if (info) return info_damage(0, 0, dam);
@@ -6263,7 +6263,7 @@ static cptr do_daemon_spell(int spell, int mode)
                        "Generate balls of chaos, confusion and charm centered on you.");
     
                {
                        "Generate balls of chaos, confusion and charm centered on you.");
     
                {
-                       int dam = 50 + plev;
+                       HIT_POINT dam = 50 + plev;
                        int power = 20 + plev;
                        int rad = 3 + plev / 20;
 
                        int power = 20 + plev;
                        int rad = 3 + plev / 20;
 
@@ -6308,7 +6308,7 @@ static cptr do_daemon_spell(int spell, int mode)
                if (desc) return _("超巨大な地獄の球を放つ。", "Generate a huge ball of nether.");
     
                {
                if (desc) return _("超巨大な地獄の球を放つ。", "Generate a huge ball of nether.");
     
                {
-                       int dam = plev * 15;
+                       HIT_POINT dam = plev * 15;
                        int rad = plev / 5;
 
                        if (info) return info_damage(0, 0, dam);
                        int rad = plev / 5;
 
                        if (info) return info_damage(0, 0, dam);
@@ -6328,7 +6328,7 @@ static cptr do_daemon_spell(int spell, int mode)
                        "Puts blood curse which damages and causes various effects on a monster. You also take damage.");
     
                {
                        "Puts blood curse which damages and causes various effects on a monster. You also take damage.");
     
                {
-                       int dam = 600;
+                       HIT_POINT dam = 600;
                        int rad = 0;
 
                        if (info) return info_damage(0, 0, dam);
                        int rad = 0;
 
                        if (info) return info_damage(0, 0, dam);
@@ -6631,7 +6631,7 @@ static cptr do_crusade_spell(int spell, int mode)
                if (desc) return _("強力な電撃のボルトを放つ。", "Fires a powerful bolt of lightning.");
     
                {
                if (desc) return _("強力な電撃のボルトを放つ。", "Fires a powerful bolt of lightning.");
     
                {
-                       int dam = plev * 5;
+                       HIT_POINT dam = plev * 5;
 
                        if (info) return info_damage(0, 0, dam);
 
 
                        if (info) return info_damage(0, 0, dam);
 
@@ -6763,7 +6763,7 @@ static cptr do_crusade_spell(int spell, int mode)
                if (desc) return _("巨大な閃光の球を放つ。", "Fires a huge ball of powerful light.");
     
                {
                if (desc) return _("巨大な閃光の球を放つ。", "Fires a huge ball of powerful light.");
     
                {
-                       int dam = 100 + plev * 2;
+                       HIT_POINT dam = 100 + plev * 2;
                        int rad = 4;
 
                        if (info) return info_damage(0, 0, dam);
                        int rad = 4;
 
                        if (info) return info_damage(0, 0, dam);
@@ -6896,7 +6896,7 @@ static cptr do_crusade_spell(int spell, int mode)
                if (desc) return _("ターゲットの周囲に分解の球を多数落とす。", "Drops many balls of disintegration near the target.");
     
                {
                if (desc) return _("ターゲットの周囲に分解の球を多数落とす。", "Drops many balls of disintegration near the target.");
     
                {
-                       int dam = plev * 3 + 25;
+                       HIT_POINT dam = plev * 3 + 25;
                        int rad = 2;
 
                        if (info) return info_multi_damage(dam);
                        int rad = 2;
 
                        if (info) return info_multi_damage(dam);
index 1777ff7..a8df69c 100644 (file)
@@ -1554,7 +1554,7 @@ static void process_world_aux_hp_and_sp(void)
        /* Take damage from cuts */
        if (p_ptr->cut && !IS_INVULN())
        {
        /* Take damage from cuts */
        if (p_ptr->cut && !IS_INVULN())
        {
-               int dam;
+               HIT_POINT dam;
 
                /* Mortal wound or Deep Gash */
                if (p_ptr->cut > 1000)
 
                /* Mortal wound or Deep Gash */
                if (p_ptr->cut > 1000)
@@ -3874,7 +3874,7 @@ static void process_world(void)
                        if (p_ptr->food < PY_FOOD_STARVE)
                        {
                                /* Calculate damage */
                        if (p_ptr->food < PY_FOOD_STARVE)
                        {
                                /* Calculate damage */
-                               int dam = (PY_FOOD_STARVE - p_ptr->food) / 10;
+                               HIT_POINT dam = (PY_FOOD_STARVE - p_ptr->food) / 10;
 
                                /* Take damage */
                                if (!IS_INVULN()) take_hit(DAMAGE_LOSELIFE, dam, _("空腹", "starvation"), -1);
 
                                /* Take damage */
                                if (!IS_INVULN()) take_hit(DAMAGE_LOSELIFE, dam, _("空腹", "starvation"), -1);
index 847e20f..4256249 100644 (file)
@@ -516,7 +516,7 @@ extern bool (*ang_sort_comp)(vptr u, vptr v, int a, int b);
 extern void (*ang_sort_swap)(vptr u, vptr v, int a, int b);
 extern monster_hook_type get_mon_num_hook;
 extern monster_hook_type get_mon_num2_hook;
 extern void (*ang_sort_swap)(vptr u, vptr v, int a, int b);
 extern monster_hook_type get_mon_num_hook;
 extern monster_hook_type get_mon_num2_hook;
-extern bool (*get_obj_num_hook)(int k_idx);
+extern bool (*get_obj_num_hook)(KIND_OBJECT_IDX k_idx);
 extern bool monk_armour_aux;
 extern bool monk_notify_aux;
 extern wilderness_type **wilderness;
 extern bool monk_armour_aux;
 extern bool monk_notify_aux;
 extern wilderness_type **wilderness;
@@ -796,7 +796,7 @@ extern cptr spell_category_name(OBJECT_TYPE_VALUE tval);
 extern void do_cmd_browse(void);
 extern void do_cmd_study(void);
 extern void do_cmd_cast(void);
 extern void do_cmd_browse(void);
 extern void do_cmd_study(void);
 extern void do_cmd_cast(void);
-extern bool rakuba(int dam, bool force);
+extern bool rakuba(HIT_POINT dam, bool force);
 extern bool do_riding(bool force);
 extern void check_pets_num_and_align(monster_type *m_ptr, bool inc);
 extern int calculate_upkeep(void);
 extern bool do_riding(bool force);
 extern void check_pets_num_and_align(monster_type *m_ptr, bool inc);
 extern int calculate_upkeep(void);
@@ -1098,11 +1098,11 @@ extern sint project_path(u16b *gp, POSITION range, POSITION y1, POSITION x1, POS
 extern int dist_to_line(int y, int x, int y1, int x1, int y2, int x2);
 extern bool project(MONSTER_IDX who, POSITION rad, POSITION y, POSITION x, HIT_POINT dam, int typ, int flg, int monspell);
 extern int project_length;
 extern int dist_to_line(int y, int x, int y1, int x1, int y2, int x2);
 extern bool project(MONSTER_IDX who, POSITION rad, POSITION y, POSITION x, HIT_POINT dam, int typ, int flg, int monspell);
 extern int project_length;
-extern bool binding_field(int dam);
-extern void seal_of_mirror(int dam);
+extern bool binding_field(HIT_POINT dam);
+extern void seal_of_mirror(HIT_POINT dam);
 
 /* spells2.c */
 
 /* spells2.c */
-extern void message_pain(MONSTER_IDX m_idx, int dam);
+extern void message_pain(MONSTER_IDX m_idx, HIT_POINT dam);
 extern void self_knowledge(void);
 extern bool detect_traps(POSITION range, bool known);
 extern bool detect_doors(POSITION range);
 extern void self_knowledge(void);
 extern bool detect_traps(POSITION range, bool known);
 extern bool detect_doors(POSITION range);
@@ -1130,12 +1130,12 @@ extern bool mass_genocide(int power, bool player_cast);
 extern bool mass_genocide_undead(int power, bool player_cast);
 extern bool probing(void);
 extern bool banish_evil(int dist);
 extern bool mass_genocide_undead(int power, bool player_cast);
 extern bool probing(void);
 extern bool banish_evil(int dist);
-extern bool dispel_evil(int dam);
-extern bool dispel_good(int dam);
-extern bool dispel_undead(int dam);
-extern bool dispel_monsters(int dam);
-extern bool dispel_living(int dam);
-extern bool dispel_demons(int dam);
+extern bool dispel_evil(HIT_POINT dam);
+extern bool dispel_good(HIT_POINT dam);
+extern bool dispel_undead(HIT_POINT dam);
+extern bool dispel_monsters(HIT_POINT dam);
+extern bool dispel_living(HIT_POINT dam);
+extern bool dispel_demons(HIT_POINT dam);
 extern bool crusade(void);
 extern bool turn_undead(void);
 extern bool destroy_area(int y1, int x1, int r, bool in_generate);
 extern bool crusade(void);
 extern bool turn_undead(void);
 extern bool destroy_area(int y1, int x1, int r, bool in_generate);
@@ -1143,25 +1143,25 @@ extern bool earthquake_aux(int cy, int cx, int r, MONSTER_IDX m_idx);
 extern bool earthquake(int cy, int cx, int r);
 extern void lite_room(int y1, int x1);
 extern void unlite_room(int y1, int x1);
 extern bool earthquake(int cy, int cx, int r);
 extern void lite_room(int y1, int x1);
 extern void unlite_room(int y1, int x1);
-extern bool lite_area(int dam, int rad);
-extern bool unlite_area(int dam, int rad);
-extern bool fire_ball(int typ, int dir, int dam, int rad);
-extern bool fire_rocket(int typ, int dir, int dam, int rad);
-extern bool fire_ball_hide(int typ, int dir, int dam, int rad);
-extern bool fire_meteor(int who, int typ, int x, int y, int dam, int rad);
-extern bool fire_bolt(int typ, int dir, int dam);
+extern bool lite_area(HIT_POINT dam, int rad);
+extern bool unlite_area(HIT_POINT dam, int rad);
+extern bool fire_ball(int typ, int dir, HIT_POINT dam, int rad);
+extern bool fire_rocket(int typ, int dir, HIT_POINT dam, int rad);
+extern bool fire_ball_hide(int typ, int dir, HIT_POINT dam, int rad);
+extern bool fire_meteor(int who, int typ, int x, int y, HIT_POINT dam, int rad);
+extern bool fire_bolt(int typ, int dir, HIT_POINT dam);
 extern bool fire_blast(int typ, int dir, int dd, int ds, int num, int dev);
 extern void call_chaos(void);
 extern bool fire_blast(int typ, int dir, int dd, int ds, int num, int dev);
 extern void call_chaos(void);
-extern bool fire_beam(int typ, int dir, int dam);
-extern bool fire_bolt_or_beam(int prob, int typ, int dir, int dam);
-extern bool lite_line(int dir, int dam);
-extern bool drain_life(int dir, int dam);
+extern bool fire_beam(int typ, int dir, HIT_POINT dam);
+extern bool fire_bolt_or_beam(int prob, int typ, int dir, HIT_POINT dam);
+extern bool lite_line(int dir, HIT_POINT dam);
+extern bool drain_life(int dir, HIT_POINT dam);
 extern bool death_ray(int dir, int plev);
 extern bool death_ray(int dir, int plev);
-extern bool wall_to_mud(int dir, int dam);
+extern bool wall_to_mud(int dir, HIT_POINT dam);
 extern bool destroy_door(int dir);
 extern bool disarm_trap(int dir);
 extern bool wizard_lock(int dir);
 extern bool destroy_door(int dir);
 extern bool disarm_trap(int dir);
 extern bool wizard_lock(int dir);
-extern bool heal_monster(int dir, int dam);
+extern bool heal_monster(int dir, HIT_POINT dam);
 extern bool speed_monster(int dir, int power);
 extern bool slow_monster(int dir, int power);
 extern bool sleep_monster(int dir, int power);
 extern bool speed_monster(int dir, int power);
 extern bool slow_monster(int dir, int power);
 extern bool sleep_monster(int dir, int power);
@@ -1185,27 +1185,27 @@ extern bool activate_ty_curse(bool stop_ty, int *count);
 extern int activate_hi_summon(POSITION y, POSITION x, bool can_pet);
 extern int summon_cyber(MONSTER_IDX who, POSITION y, POSITION x);
 extern void wall_breaker(void);
 extern int activate_hi_summon(POSITION y, POSITION x, bool can_pet);
 extern int summon_cyber(MONSTER_IDX who, POSITION y, POSITION x);
 extern void wall_breaker(void);
-extern bool confuse_monsters(int dam);
-extern bool charm_monsters(int dam);
-extern bool charm_animals(int dam);
-extern bool stun_monsters(int dam);
-extern bool stasis_monsters(int dam);
+extern bool confuse_monsters(HIT_POINT dam);
+extern bool charm_monsters(HIT_POINT dam);
+extern bool charm_animals(HIT_POINT dam);
+extern bool stun_monsters(HIT_POINT dam);
+extern bool stasis_monsters(HIT_POINT dam);
 extern bool banish_monsters(int dist);
 extern bool banish_monsters(int dist);
-extern bool turn_monsters(int dam);
-extern bool turn_evil(int dam);
+extern bool turn_monsters(HIT_POINT dam);
+extern bool turn_evil(HIT_POINT dam);
 extern bool deathray_monsters(void);
 extern bool charm_monster(int dir, int plev);
 extern bool control_one_undead(int dir, int plev);
 extern bool control_one_demon(int dir, int plev);
 extern bool charm_animal(int dir, int plev);
 extern bool charm_living(int dir, int plev);
 extern bool deathray_monsters(void);
 extern bool charm_monster(int dir, int plev);
 extern bool control_one_undead(int dir, int plev);
 extern bool control_one_demon(int dir, int plev);
 extern bool charm_animal(int dir, int plev);
 extern bool charm_living(int dir, int plev);
-extern bool mindblast_monsters(int dam);
+extern bool mindblast_monsters(HIT_POINT dam);
 extern s32b flag_cost(object_type *o_ptr, int plusses);
 extern void report_magics(void);
 extern bool teleport_swap(int dir);
 extern bool item_tester_hook_recharge(object_type *o_ptr);
 extern s32b flag_cost(object_type *o_ptr, int plusses);
 extern void report_magics(void);
 extern bool teleport_swap(int dir);
 extern bool item_tester_hook_recharge(object_type *o_ptr);
-extern bool project_hook(int typ, int dir, int dam, int flg);
-extern bool project_hack(int typ, int dam);
+extern bool project_hook(int typ, int dir, HIT_POINT dam, int flg);
+extern bool project_hack(int typ, HIT_POINT dam);
 extern bool eat_magic(int power);
 extern void discharge_minion(void);
 extern bool kawarimi(bool success);
 extern bool eat_magic(int power);
 extern void discharge_minion(void);
 extern bool kawarimi(bool success);
@@ -1269,10 +1269,10 @@ extern int set_elec_destroy(object_type *o_ptr);
 extern int set_fire_destroy(object_type *o_ptr);
 extern int set_cold_destroy(object_type *o_ptr);
 extern int inven_damage(inven_func typ, int perc);
 extern int set_fire_destroy(object_type *o_ptr);
 extern int set_cold_destroy(object_type *o_ptr);
 extern int inven_damage(inven_func typ, int perc);
-extern int acid_dam(int dam, cptr kb_str, int monspell, bool aura);
-extern int elec_dam(int dam, cptr kb_str, int monspell, bool aura);
-extern int fire_dam(int dam, cptr kb_str, int monspell, bool aura);
-extern int cold_dam(int dam, cptr kb_str, int monspell, bool aura);
+extern int acid_dam(HIT_POINT dam, cptr kb_str, int monspell, bool aura);
+extern int elec_dam(HIT_POINT dam, cptr kb_str, int monspell, bool aura);
+extern int fire_dam(HIT_POINT dam, cptr kb_str, int monspell, bool aura);
+extern int cold_dam(HIT_POINT dam, cptr kb_str, int monspell, bool aura);
 extern bool rustproof(void);
 extern bool curse_armor(void);
 extern bool curse_weapon_object(bool force, object_type *o_ptr);
 extern bool rustproof(void);
 extern bool curse_armor(void);
 extern bool curse_weapon_object(bool force, object_type *o_ptr);
@@ -1302,8 +1302,8 @@ extern IDX quest_number(DEPTH level);
 extern IDX random_quest_number(DEPTH level);
 extern bool tele_town(void);
 extern HIT_POINT calc_crit_ratio_shot(HIT_POINT plus_ammo, HIT_POINT plus_bow);
 extern IDX random_quest_number(DEPTH level);
 extern bool tele_town(void);
 extern HIT_POINT calc_crit_ratio_shot(HIT_POINT plus_ammo, HIT_POINT plus_bow);
-extern HIT_POINT calc_expect_crit_shot(int weight, int plus_ammo,int plus_bow, int dam);
-extern HIT_POINT calc_expect_crit(int weight, int plus, int dam, s16b meichuu, bool dokubari);
+extern HIT_POINT calc_expect_crit_shot(int weight, int plus_ammo,int plus_bow, HIT_POINT dam);
+extern HIT_POINT calc_expect_crit(int weight, int plus, HIT_POINT dam, s16b meichuu, bool dokubari);
 
 /* util.c */
 extern errr path_parse(char *buf, int max, cptr file);
 
 /* util.c */
 extern errr path_parse(char *buf, int max, cptr file);
@@ -1489,7 +1489,7 @@ extern void check_quest_completion(monster_type *m_ptr);
 extern void check_find_art_quest_completion(object_type *o_ptr);
 extern cptr extract_note_dies(monster_race *r_ptr);
 extern void monster_death(MONSTER_IDX m_idx, bool drop_item);
 extern void check_find_art_quest_completion(object_type *o_ptr);
 extern cptr extract_note_dies(monster_race *r_ptr);
 extern void monster_death(MONSTER_IDX m_idx, bool drop_item);
-extern bool mon_take_hit(MONSTER_IDX m_idx, int dam, bool *fear, cptr note);
+extern bool mon_take_hit(MONSTER_IDX m_idx, HIT_POINT dam, bool *fear, cptr note);
 extern void get_screen_size(int *wid_p, int *hgt_p);
 extern void panel_bounds_center(void);
 extern void resize_map(void);
 extern void get_screen_size(int *wid_p, int *hgt_p);
 extern void panel_bounds_center(void);
 extern void resize_map(void);
@@ -1729,7 +1729,7 @@ extern bool change_wild_mode(void);
 extern void spoil_random_artifact(cptr fname);
 
 /* wizard2.c */
 extern void spoil_random_artifact(cptr fname);
 
 /* wizard2.c */
-extern void strip_name(char *buf, int k_idx);
+extern void strip_name(char *buf, KIND_OBJECT_IDX k_idx);
 
 /* avatar.c */
 extern bool compare_virtue(int type, int num, int tekitou);
 
 /* avatar.c */
 extern bool compare_virtue(int type, int num, int tekitou);
@@ -1805,7 +1805,7 @@ extern bool stop_hex_spell(void);
 extern void check_hex(void);
 extern bool hex_spell_fully(void);
 extern void revenge_spell(void);
 extern void check_hex(void);
 extern bool hex_spell_fully(void);
 extern void revenge_spell(void);
-extern void revenge_store(int dam);
+extern void revenge_store(HIT_POINT dam);
 extern bool teleport_barrier(MONSTER_IDX m_idx);
 extern bool magic_barrier(MONSTER_IDX m_idx);
 extern bool multiply_barrier(MONSTER_IDX m_idx);
 extern bool teleport_barrier(MONSTER_IDX m_idx);
 extern bool magic_barrier(MONSTER_IDX m_idx);
 extern bool multiply_barrier(MONSTER_IDX m_idx);
index 27e9102..9a5f116 100644 (file)
--- a/src/hex.c
+++ b/src/hex.c
@@ -286,7 +286,7 @@ void revenge_spell(void)
  * @param dam 蓄積されるダメージ量
  * @return なし
  */
  * @param dam 蓄積されるダメージ量
  * @return なし
  */
-void revenge_store(int dam)
+void revenge_store(HIT_POINT dam)
 {
        if (p_ptr->realm1 != REALM_HEX) return;
        if (p_ptr->magic_num2[2] <= 0) return;
 {
        if (p_ptr->realm1 != REALM_HEX) return;
        if (p_ptr->magic_num2[2] <= 0) return;
index 5e01a23..ff4d1ce 100644 (file)
@@ -1495,7 +1495,7 @@ static errr init_towns(void)
                        /* Scan the choices */
                        for (k = 0; k < STORE_CHOICES; k++)
                        {
                        /* Scan the choices */
                        for (k = 0; k < STORE_CHOICES; k++)
                        {
-                               int k_idx;
+                               KIND_OBJECT_IDX k_idx;
 
                                /* Extract the tval/sval codes */
                                int tv = store_table[j][k][0];
 
                                /* Extract the tval/sval codes */
                                int tv = store_table[j][k][0];
index f6bd451..a89faea 100644 (file)
@@ -21,7 +21,7 @@ static int damage;
  * @param dam ものまねの威力
  * @return なし
  */
  * @param dam ものまねの威力
  * @return なし
  */
-static void mane_info(char *p, int power, int dam)
+static void mane_info(char *p, int power, HIT_POINT dam)
 {
        int plev = p_ptr->lev;
 #ifdef JP
 {
        int plev = p_ptr->lev;
 #ifdef JP
index fb2843f..fc0f17c 100644 (file)
@@ -24,7 +24,7 @@
  * and which also do at least 20 damage, or, sometimes, N damage.
  * This is used only to determine "cuts" and "stuns".
  */
  * and which also do at least 20 damage, or, sometimes, N damage.
  * This is used only to determine "cuts" and "stuns".
  */
-static int monster_critical(int dice, int sides, int dam)
+static int monster_critical(int dice, int sides, HIT_POINT dam)
 {
        int max = 0;
        int total = dice * sides;
 {
        int max = 0;
        int total = dice * sides;
index ff54dae..65d7f2f 100644 (file)
@@ -4165,7 +4165,7 @@ bool multiply_monster(MONSTER_IDX m_idx, bool clone, u32b mode)
  * @details
  * Technically should attempt to treat "Beholder"'s as jelly's
  */
  * @details
  * Technically should attempt to treat "Beholder"'s as jelly's
  */
-void message_pain(MONSTER_IDX m_idx, int dam)
+void message_pain(MONSTER_IDX m_idx, HIT_POINT dam)
 {
        long oldhp, newhp, tmp;
        int percentage;
 {
        long oldhp, newhp, tmp;
        int percentage;
index 910bc96..f8c85f9 100644 (file)
@@ -259,7 +259,7 @@ bool monst_spell_monst(MONSTER_IDX m_idx)
        int i, k;
        MONSTER_IDX t_idx = 0;
        int thrown_spell;
        int i, k;
        MONSTER_IDX t_idx = 0;
        int thrown_spell;
-       int dam = 0;
+       HIT_POINT dam = 0;
        int start;
        int plus = 1;
 
        int start;
        int plus = 1;
 
index b7266fc..f1af190 100644 (file)
@@ -250,7 +250,7 @@ void spell_RF4_DISPEL(MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYPE)
 */
 int spell_RF4_ROCKET(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYPE)
 {
 */
 int spell_RF4_ROCKET(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYPE)
 {
-       int dam;
+       HIT_POINT dam;
 
        monspell_message(m_idx, t_idx,
                _("%^sが何かを射った。", "%^s shoots something."),
 
        monspell_message(m_idx, t_idx,
                _("%^sが何かを射った。", "%^s shoots something."),
@@ -276,7 +276,7 @@ int spell_RF4_ROCKET(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYPE
 */
 int spell_RF4_SHOOT(int y, int x, MONSTER_IDX m_idx, IDX t_idx,int TARGET_TYPE)
 {
 */
 int spell_RF4_SHOOT(int y, int x, MONSTER_IDX m_idx, IDX t_idx,int TARGET_TYPE)
 {
-       int dam;
+       HIT_POINT dam;
 
        monspell_message(m_idx, t_idx,
                _("%^sが奇妙な音を発した。", "%^s makes a strange noise."),
 
        monspell_message(m_idx, t_idx,
                _("%^sが奇妙な音を発した。", "%^s makes a strange noise."),
@@ -303,7 +303,7 @@ int spell_RF4_SHOOT(int y, int x, MONSTER_IDX m_idx, IDX t_idx,int TARGET_TYPE)
 */
 int spell_RF4_BREATH(int GF_TYPE, int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYPE)
 {
 */
 int spell_RF4_BREATH(int GF_TYPE, int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYPE)
 {
-       int dam, ms_type, drs_type;
+       HIT_POINT dam, ms_type, drs_type;
        cptr type_s;
        bool smart_learn_aux = TRUE;
        monster_type    *m_ptr = &m_list[m_idx];
        cptr type_s;
        bool smart_learn_aux = TRUE;
        monster_type    *m_ptr = &m_list[m_idx];
@@ -504,7 +504,7 @@ int spell_RF4_BREATH(int GF_TYPE, int y, int x, MONSTER_IDX m_idx, IDX t_idx, in
 */
 int spell_RF4_BA_NUKE(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYPE)
 {
 */
 int spell_RF4_BA_NUKE(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYPE)
 {
-       int dam;
+       HIT_POINT dam;
 
        monspell_message(m_idx, t_idx,
                _("%^sが何かをつぶやいた。", "%^s mumbles."),
 
        monspell_message(m_idx, t_idx,
                _("%^sが何かをつぶやいた。", "%^s mumbles."),
@@ -531,7 +531,7 @@ int spell_RF4_BA_NUKE(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYP
 */
 int spell_RF4_BA_CHAO(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYPE)
 {
 */
 int spell_RF4_BA_CHAO(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYPE)
 {
-       int dam;
+       HIT_POINT dam;
 
        monspell_message(m_idx, t_idx,
                _("%^sが恐ろしげにつぶやいた。", "%^s mumbles frighteningly."),
 
        monspell_message(m_idx, t_idx,
                _("%^sが恐ろしげにつぶやいた。", "%^s mumbles frighteningly."),
@@ -558,7 +558,7 @@ int spell_RF4_BA_CHAO(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYP
 */
 int spell_RF5_BA_ACID(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYPE)
 {
 */
 int spell_RF5_BA_ACID(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYPE)
 {
-       int dam, rad;
+       HIT_POINT dam, rad;
 
        monspell_message(m_idx, t_idx,
                _("%^sが何かをつぶやいた。", "%^s mumbles."),
 
        monspell_message(m_idx, t_idx,
                _("%^sが何かをつぶやいた。", "%^s mumbles."),
@@ -587,7 +587,7 @@ int spell_RF5_BA_ACID(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYP
 */
 int spell_RF5_BA_ELEC(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYPE)
 {
 */
 int spell_RF5_BA_ELEC(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYPE)
 {
-       int dam, rad;
+       HIT_POINT dam, rad;
 
        monspell_message(m_idx, t_idx,
                _("%^sが何かをつぶやいた。", "%^s mumbles."),
 
        monspell_message(m_idx, t_idx,
                _("%^sが何かをつぶやいた。", "%^s mumbles."),
@@ -616,7 +616,7 @@ int spell_RF5_BA_ELEC(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYP
 */
 int spell_RF5_BA_FIRE(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYPE)
 {
 */
 int spell_RF5_BA_FIRE(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYPE)
 {
-       int dam, rad;
+       HIT_POINT dam, rad;
        monster_type    *m_ptr = &m_list[m_idx];
 
        if (m_ptr->r_idx == MON_ROLENTO)
        monster_type    *m_ptr = &m_list[m_idx];
 
        if (m_ptr->r_idx == MON_ROLENTO)
@@ -656,7 +656,7 @@ int spell_RF5_BA_FIRE(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYP
 */
 int spell_RF5_BA_COLD(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYPE)
 {
 */
 int spell_RF5_BA_COLD(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYPE)
 {
-       int dam, rad;
+       HIT_POINT dam, rad;
 
        monspell_message(m_idx, t_idx,
                _("%^sが何かをつぶやいた。", "%^s mumbles."),
 
        monspell_message(m_idx, t_idx,
                _("%^sが何かをつぶやいた。", "%^s mumbles."),
@@ -685,7 +685,7 @@ int spell_RF5_BA_COLD(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYP
 */
 int spell_RF5_BA_POIS(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYPE)
 {
 */
 int spell_RF5_BA_POIS(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYPE)
 {
-       int dam;
+       HIT_POINT dam;
 
        monspell_message(m_idx, t_idx,
                _("%^sが何かをつぶやいた。", "%^s mumbles."),
 
        monspell_message(m_idx, t_idx,
                _("%^sが何かをつぶやいた。", "%^s mumbles."),
@@ -712,7 +712,7 @@ int spell_RF5_BA_POIS(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYP
 */
 int spell_RF5_BA_NETH(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYPE)
 {
 */
 int spell_RF5_BA_NETH(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYPE)
 {
-       int dam;
+       HIT_POINT dam;
 
        monspell_message(m_idx, t_idx,
                _("%^sが何かをつぶやいた。", "%^s mumbles."),
 
        monspell_message(m_idx, t_idx,
                _("%^sが何かをつぶやいた。", "%^s mumbles."),
@@ -739,7 +739,7 @@ int spell_RF5_BA_NETH(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYP
 */
 int spell_RF5_BA_WATE(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYPE)
 {
 */
 int spell_RF5_BA_WATE(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYPE)
 {
-       int dam;
+       HIT_POINT dam;
        bool known = monster_near_player(m_idx, t_idx);
        bool see_either = see_monster(m_idx) || see_monster(t_idx);
        bool mon_to_mon = (TARGET_TYPE == MONSTER_TO_MONSTER);
        bool known = monster_near_player(m_idx, t_idx);
        bool see_either = see_monster(m_idx) || see_monster(t_idx);
        bool mon_to_mon = (TARGET_TYPE == MONSTER_TO_MONSTER);
@@ -779,7 +779,7 @@ int spell_RF5_BA_WATE(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYP
 */
 int spell_RF5_BA_MANA(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYPE)
 {
 */
 int spell_RF5_BA_MANA(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYPE)
 {
-       int dam;
+       HIT_POINT dam;
 
        monspell_message(m_idx, t_idx,
                _("%^sが何かを力強くつぶやいた。", "%^s mumbles powerfully."),
 
        monspell_message(m_idx, t_idx,
                _("%^sが何かを力強くつぶやいた。", "%^s mumbles powerfully."),
@@ -803,7 +803,7 @@ int spell_RF5_BA_MANA(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYP
 */
 int spell_RF5_BA_DARK(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYPE)
 {
 */
 int spell_RF5_BA_DARK(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYPE)
 {
-       int dam;
+       HIT_POINT dam;
 
        monspell_message(m_idx, t_idx,
                _("%^sが何かを力強くつぶやいた。", "%^s mumbles powerfully."),
 
        monspell_message(m_idx, t_idx,
                _("%^sが何かを力強くつぶやいた。", "%^s mumbles powerfully."),
@@ -830,7 +830,7 @@ int spell_RF5_BA_DARK(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYP
 */
 int spell_RF5_DRAIN_MANA(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYPE)
 {
 */
 int spell_RF5_DRAIN_MANA(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYPE)
 {
-       int dam;
+       HIT_POINT dam;
        char m_name[80], t_name[80];
        monster_name(m_idx, m_name);
        monster_name(t_idx, t_name);
        char m_name[80], t_name[80];
        monster_name(m_idx, m_name);
        monster_name(t_idx, t_name);
@@ -867,7 +867,7 @@ int spell_RF5_MIND_BLAST(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_
 {
        monster_type    *m_ptr = &m_list[m_idx];
        bool seen = (!p_ptr->blind && m_ptr->ml);
 {
        monster_type    *m_ptr = &m_list[m_idx];
        bool seen = (!p_ptr->blind && m_ptr->ml);
-       int dam;
+       HIT_POINT dam;
        char m_name[80], t_name[80];
        monster_name(m_idx, m_name);
        monster_name(t_idx, t_name);
        char m_name[80], t_name[80];
        monster_name(m_idx, m_name);
        monster_name(t_idx, t_name);
@@ -904,7 +904,7 @@ int spell_RF5_BRAIN_SMASH(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET
 {
        monster_type    *m_ptr = &m_list[m_idx];
        bool seen = (!p_ptr->blind && m_ptr->ml);
 {
        monster_type    *m_ptr = &m_list[m_idx];
        bool seen = (!p_ptr->blind && m_ptr->ml);
-       int dam;
+       HIT_POINT dam;
        char m_name[80], t_name[80];
        monster_name(m_idx, m_name);
        monster_name(t_idx, t_name);
        char m_name[80], t_name[80];
        monster_name(m_idx, m_name);
        monster_name(t_idx, t_name);
@@ -943,7 +943,7 @@ int spell_RF5_BRAIN_SMASH(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET
 * @param TARGET_TYPE プレイヤーを対象とする場合MONSTER_TO_PLAYER、モンスターを対象とする場合MONSTER_TO_MONSTER
 * @return ダメージ量を返す。
 */
 * @param TARGET_TYPE プレイヤーを対象とする場合MONSTER_TO_PLAYER、モンスターを対象とする場合MONSTER_TO_MONSTER
 * @return ダメージ量を返す。
 */
-void spell_RF5_CAUSE(int GF_TYPE, int dam, int y, int x, MONSTER_IDX m_idx, IDX t_idx, cptr msg1, cptr msg2, cptr msg3, int MS_TYPE, int TARGET_TYPE)
+void spell_RF5_CAUSE(int GF_TYPE, HIT_POINT dam, int y, int x, MONSTER_IDX m_idx, IDX t_idx, cptr msg1, cptr msg2, cptr msg3, int MS_TYPE, int TARGET_TYPE)
 {
        char m_name[80], t_name[80];
        monster_name(m_idx, m_name);
 {
        char m_name[80], t_name[80];
        monster_name(m_idx, m_name);
@@ -983,7 +983,7 @@ void spell_RF5_CAUSE(int GF_TYPE, int dam, int y, int x, MONSTER_IDX m_idx, IDX
 int spell_RF5_CAUSE_1(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYPE)
 {
        cptr msg1, msg2, msg3;
 int spell_RF5_CAUSE_1(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYPE)
 {
        cptr msg1, msg2, msg3;
-       int dam;
+       HIT_POINT dam;
        dam = monspell_damage((MS_CAUSE_1), m_idx, DAM_ROLL);
 
        msg1 = _("%^sが何かをつぶやいた。", "%^s mumbles.");
        dam = monspell_damage((MS_CAUSE_1), m_idx, DAM_ROLL);
 
        msg1 = _("%^sが何かをつぶやいた。", "%^s mumbles.");
@@ -1006,7 +1006,7 @@ int spell_RF5_CAUSE_1(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYP
 int spell_RF5_CAUSE_2(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYPE)
 {
        cptr msg1, msg2, msg3;
 int spell_RF5_CAUSE_2(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYPE)
 {
        cptr msg1, msg2, msg3;
-       int dam;
+       HIT_POINT dam;
        dam = monspell_damage((MS_CAUSE_2), m_idx, DAM_ROLL);
 
        msg1 = _("%^sが何かをつぶやいた。", "%^s mumbles.");
        dam = monspell_damage((MS_CAUSE_2), m_idx, DAM_ROLL);
 
        msg1 = _("%^sが何かをつぶやいた。", "%^s mumbles.");
@@ -1029,7 +1029,7 @@ int spell_RF5_CAUSE_2(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYP
 int spell_RF5_CAUSE_3(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYPE)
 {
        cptr msg1, msg2, msg3;
 int spell_RF5_CAUSE_3(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYPE)
 {
        cptr msg1, msg2, msg3;
-       int dam;
+       HIT_POINT dam;
        dam = monspell_damage((MS_CAUSE_3), m_idx, DAM_ROLL);
 
        msg1 = _("%^sが何かを大声で叫んだ。", "%^s mumbles loudly.");
        dam = monspell_damage((MS_CAUSE_3), m_idx, DAM_ROLL);
 
        msg1 = _("%^sが何かを大声で叫んだ。", "%^s mumbles loudly.");
@@ -1052,7 +1052,7 @@ int spell_RF5_CAUSE_3(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYP
 int spell_RF5_CAUSE_4(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYPE)
 {
        cptr msg1, msg2, msg3;
 int spell_RF5_CAUSE_4(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYPE)
 {
        cptr msg1, msg2, msg3;
-       int dam;
+       HIT_POINT dam;
        dam = monspell_damage((MS_CAUSE_4), m_idx, DAM_ROLL);
 
        msg1 = _("%^sが「お前は既に死んでいる」と叫んだ。", "%^s screams the word 'DIE!'");
        dam = monspell_damage((MS_CAUSE_4), m_idx, DAM_ROLL);
 
        msg1 = _("%^sが「お前は既に死んでいる」と叫んだ。", "%^s screams the word 'DIE!'");
@@ -1074,7 +1074,7 @@ int spell_RF5_CAUSE_4(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYP
 */
 int spell_RF5_BO_ACID(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYPE)
 {
 */
 int spell_RF5_BO_ACID(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYPE)
 {
-       int dam;
+       HIT_POINT dam;
 
        monspell_message(m_idx, t_idx,
                _("%^sが何かをつぶやいた。", "%^s mumbles."),
 
        monspell_message(m_idx, t_idx,
                _("%^sが何かをつぶやいた。", "%^s mumbles."),
@@ -1103,7 +1103,7 @@ int spell_RF5_BO_ACID(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYP
 */
 int spell_RF5_BO_ELEC(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYPE)
 {
 */
 int spell_RF5_BO_ELEC(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYPE)
 {
-       int dam;
+       HIT_POINT dam;
 
        monspell_message(m_idx, t_idx,
                _("%^sが何かをつぶやいた。", "%^s mumbles."),
 
        monspell_message(m_idx, t_idx,
                _("%^sが何かをつぶやいた。", "%^s mumbles."),
@@ -1132,7 +1132,7 @@ int spell_RF5_BO_ELEC(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYP
 */
 int spell_RF5_BO_FIRE(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYPE)
 {
 */
 int spell_RF5_BO_FIRE(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYPE)
 {
-       int dam;
+       HIT_POINT dam;
 
        monspell_message(m_idx, t_idx,
                _("%^sが何かをつぶやいた。", "%^s mumbles."),
 
        monspell_message(m_idx, t_idx,
                _("%^sが何かをつぶやいた。", "%^s mumbles."),
@@ -1161,7 +1161,7 @@ int spell_RF5_BO_FIRE(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYP
 */
 int spell_RF5_BO_COLD(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYPE)
 {
 */
 int spell_RF5_BO_COLD(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYPE)
 {
-       int dam;
+       HIT_POINT dam;
 
        monspell_message(m_idx, t_idx,
                _("%^sが何かをつぶやいた。", "%^s mumbles."),
 
        monspell_message(m_idx, t_idx,
                _("%^sが何かをつぶやいた。", "%^s mumbles."),
@@ -1190,7 +1190,7 @@ int spell_RF5_BO_COLD(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYP
 */
 int spell_RF5_BA_LITE(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYPE)
 {
 */
 int spell_RF5_BA_LITE(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYPE)
 {
-       int dam;
+       HIT_POINT dam;
 
        monspell_message(m_idx, t_idx,
                _("%^sが何かを力強くつぶやいた。", "%^s mumbles powerfully."),
 
        monspell_message(m_idx, t_idx,
                _("%^sが何かを力強くつぶやいた。", "%^s mumbles powerfully."),
@@ -1217,7 +1217,7 @@ int spell_RF5_BA_LITE(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYP
 */
 int spell_RF5_BO_NETH(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYPE)
 {
 */
 int spell_RF5_BO_NETH(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYPE)
 {
-       int dam;
+       HIT_POINT dam;
 
        monspell_message(m_idx, t_idx,
                _("%^sが何かをつぶやいた。", "%^s mumbles."),
 
        monspell_message(m_idx, t_idx,
                _("%^sが何かをつぶやいた。", "%^s mumbles."),
@@ -1246,7 +1246,7 @@ int spell_RF5_BO_NETH(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYP
 */
 int spell_RF5_BO_WATE(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYPE)
 {
 */
 int spell_RF5_BO_WATE(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYPE)
 {
-       int dam;
+       HIT_POINT dam;
 
        monspell_message(m_idx, t_idx,
                _("%^sが何かをつぶやいた。", "%^s mumbles."),
 
        monspell_message(m_idx, t_idx,
                _("%^sが何かをつぶやいた。", "%^s mumbles."),
@@ -1274,7 +1274,7 @@ int spell_RF5_BO_WATE(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYP
 */
 int spell_RF5_BO_MANA(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYPE)
 {
 */
 int spell_RF5_BO_MANA(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYPE)
 {
-       int dam;
+       HIT_POINT dam;
 
        monspell_message(m_idx, t_idx,
                _("%^sが何かをつぶやいた。", "%^s mumbles."),
 
        monspell_message(m_idx, t_idx,
                _("%^sが何かをつぶやいた。", "%^s mumbles."),
@@ -1302,7 +1302,7 @@ int spell_RF5_BO_MANA(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYP
 */
 int spell_RF5_BO_PLAS(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYPE)
 {
 */
 int spell_RF5_BO_PLAS(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYPE)
 {
-       int dam;
+       HIT_POINT dam;
 
        monspell_message(m_idx, t_idx,
                _("%^sが何かをつぶやいた。", "%^s mumbles."),
 
        monspell_message(m_idx, t_idx,
                _("%^sが何かをつぶやいた。", "%^s mumbles."),
@@ -1330,7 +1330,7 @@ int spell_RF5_BO_PLAS(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYP
 */
 int spell_RF5_BO_ICEE(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYPE)
 {
 */
 int spell_RF5_BO_ICEE(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYPE)
 {
-       int dam;
+       HIT_POINT dam;
 
        monspell_message(m_idx, t_idx,
                _("%^sが何かをつぶやいた。", "%^s mumbles."),
 
        monspell_message(m_idx, t_idx,
                _("%^sが何かをつぶやいた。", "%^s mumbles."),
@@ -1359,7 +1359,7 @@ int spell_RF5_BO_ICEE(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYP
 */
 int spell_RF5_MISSILE(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYPE)
 {
 */
 int spell_RF5_MISSILE(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYPE)
 {
-       int dam;
+       HIT_POINT dam;
 
        monspell_message(m_idx, t_idx,
                _("%^sが何かをつぶやいた。", "%^s mumbles."),
 
        monspell_message(m_idx, t_idx,
                _("%^sが何かをつぶやいた。", "%^s mumbles."),
@@ -1760,7 +1760,7 @@ void spell_RF6_HASTE(MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYPE)
 */
 int spell_RF6_HAND_DOOM(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYPE)
 {
 */
 int spell_RF6_HAND_DOOM(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYPE)
 {
-       int dam = 0;
+       HIT_POINT dam = 0;
 
        simple_monspell_message(m_idx, t_idx,
                _("%^sが<破滅の手>を放った!", "%^s invokes the Hand of Doom!"),
 
        simple_monspell_message(m_idx, t_idx,
                _("%^sが<破滅の手>を放った!", "%^s invokes the Hand of Doom!"),
@@ -2373,7 +2373,7 @@ void spell_RF6_TELE_LEVEL(MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYPE)
 */
 int spell_RF6_PSY_SPEAR(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYPE)
 {
 */
 int spell_RF6_PSY_SPEAR(int y, int x, MONSTER_IDX m_idx, IDX t_idx, int TARGET_TYPE)
 {
-       int dam;
+       HIT_POINT dam;
 
        monspell_message(m_idx, t_idx,
                _("%^sが何かをつぶやいた。", "%^s mumbles."),
 
        monspell_message(m_idx, t_idx,
                _("%^sが何かをつぶやいた。", "%^s mumbles."),
@@ -3644,7 +3644,7 @@ int monspell_to_monster(int SPELL_NUM, POSITION y, POSITION x, MONSTER_IDX m_idx
 * @param TYPE  DAM_MAXで最大値を返し、DAM_MINで最小値を返す。DAM_ROLLはダイスを振って値を決定する。
 * @return 攻撃呪文のダメージを返す。攻撃呪文以外は-1を返す。
 */
 * @param TYPE  DAM_MAXで最大値を返し、DAM_MINで最小値を返す。DAM_ROLLはダイスを振って値を決定する。
 * @return 攻撃呪文のダメージを返す。攻撃呪文以外は-1を返す。
 */
-int monspell_damage_roll(int dam, int dice_num, int dice_side, int mult, int div, int TYPE)
+int monspell_damage_roll(HIT_POINT dam, int dice_num, int dice_side, int mult, int div, int TYPE)
 {
        switch (TYPE)
        {
 {
        switch (TYPE)
        {
@@ -3675,7 +3675,7 @@ int monspell_damage_roll(int dam, int dice_num, int dice_side, int mult, int div
 */
 int monspell_damage_base(int SPELL_NUM, int hp, int rlev, bool powerful, int shoot_dd, int shoot_ds, int shoot_base, int TYPE)
 {
 */
 int monspell_damage_base(int SPELL_NUM, int hp, int rlev, bool powerful, int shoot_dd, int shoot_ds, int shoot_base, int TYPE)
 {
-       int dam = 0, dice_num = 0, dice_side = 0, mult = 1, div = 1;
+       HIT_POINT dam = 0, dice_num = 0, dice_side = 0, mult = 1, div = 1;
 
        switch (SPELL_NUM)
        {
 
        switch (SPELL_NUM)
        {
index 0de96c4..5e6fa91 100644 (file)
@@ -4661,7 +4661,7 @@ void apply_magic(object_type *o_ptr, DEPTH lev, BIT_FLAGS mode)
  * @param k_idx 判定したいベースアイテムのID
  * @return ベースアイテムが上質ならばTRUEを返す。
  */
  * @param k_idx 判定したいベースアイテムのID
  * @return ベースアイテムが上質ならばTRUEを返す。
  */
-static bool kind_is_good(int k_idx)
+static bool kind_is_good(KIND_OBJECT_IDX k_idx)
 {
        object_kind *k_ptr = &k_info[k_idx];
 
 {
        object_kind *k_ptr = &k_info[k_idx];
 
@@ -6735,7 +6735,7 @@ object_type *choose_warning_item(void)
  * @param max 算出した最大ダメージを返すポインタ
  * @return なし
  */
  * @param max 算出した最大ダメージを返すポインタ
  * @return なし
  */
-static void spell_damcalc(monster_type *m_ptr, int typ, int dam, int *max)
+static void spell_damcalc(monster_type *m_ptr, int typ, HIT_POINT dam, int *max)
 {
        monster_race *r_ptr = &r_info[m_ptr->r_idx];
        int          rlev = r_ptr->level;
 {
        monster_race *r_ptr = &r_info[m_ptr->r_idx];
        int          rlev = r_ptr->level;
@@ -6983,7 +6983,7 @@ static void spell_damcalc(monster_type *m_ptr, int typ, int dam, int *max)
 void spell_damcalc_by_spellnum(int spell_num, int typ, MONSTER_IDX m_idx, int *max)
 {
     monster_type *m_ptr = &m_list[m_idx];
 void spell_damcalc_by_spellnum(int spell_num, int typ, MONSTER_IDX m_idx, int *max)
 {
     monster_type *m_ptr = &m_list[m_idx];
-    int dam = monspell_damage((spell_num), m_idx, DAM_MAX);
+    HIT_POINT dam = monspell_damage((spell_num), m_idx, DAM_MAX);
     spell_damcalc(m_ptr, typ, dam, max);
 }
 
     spell_damcalc(m_ptr, typ, dam, max);
 }
 
index d847f35..96b7c2c 100644 (file)
@@ -6076,7 +6076,7 @@ static bool vault_aux_shards(MONRACE_IDX r_idx)
 /*
  * Hack -- determine if a template is potion
  */
 /*
  * Hack -- determine if a template is potion
  */
-static bool kind_is_potion(int k_idx)
+static bool kind_is_potion(KIND_OBJECT_IDX k_idx)
 {
        return k_info[k_idx].tval == TV_POTION;
 }
 {
        return k_info[k_idx].tval == TV_POTION;
 }
index 367b8f1..073b36c 100644 (file)
@@ -368,7 +368,7 @@ static void wr_lore(MONRACE_IDX r_idx)
  * @param k_idx ベースアイテムのID
  * @return なし
  */
  * @param k_idx ベースアイテムのID
  * @return なし
  */
-static void wr_xtra(int k_idx)
+static void wr_xtra(KIND_OBJECT_IDX k_idx)
 {
        byte tmp8u = 0;
 
 {
        byte tmp8u = 0;
 
index 4c83e39..737f34c 100644 (file)
@@ -628,7 +628,7 @@ static POSITION monster_target_y; /*!< モンスターの攻撃目標Y座標 */
  * XXX XXX XXX Perhaps we should affect doors?
  * </pre>
  */
  * XXX XXX XXX Perhaps we should affect doors?
  * </pre>
  */
-static bool project_f(int who, int r, int y, int x, int dam, int typ)
+static bool project_f(int who, int r, int y, int x, HIT_POINT dam, int typ)
 {
        cave_type       *c_ptr = &cave[y][x];
        feature_type    *f_ptr = &f_info[c_ptr->feat];
 {
        cave_type       *c_ptr = &cave[y][x];
        feature_type    *f_ptr = &f_info[c_ptr->feat];
@@ -1207,11 +1207,11 @@ static bool project_o(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
        bool obvious = FALSE;
        bool known = player_has_los_bold(y, x);
 
        bool obvious = FALSE;
        bool known = player_has_los_bold(y, x);
 
-       u32b flgs[TR_FLAG_SIZE];
+       BIT_FLAGS flgs[TR_FLAG_SIZE];
 
        char o_name[MAX_NLEN];
 
 
        char o_name[MAX_NLEN];
 
-       int k_idx = 0;
+       KIND_OBJECT_IDX k_idx = 0;
        bool is_potion = FALSE;
 
 
        bool is_potion = FALSE;
 
 
@@ -7846,7 +7846,7 @@ bool project(MONSTER_IDX who, POSITION rad, POSITION y, POSITION x, HIT_POINT da
  * @param dam ダメージ量
  * @return 効果があったらTRUEを返す
  */
  * @param dam ダメージ量
  * @return 効果があったらTRUEを返す
  */
-bool binding_field( int dam )
+bool binding_field( HIT_POINT dam )
 {
        int mirror_x[10],mirror_y[10]; /* 鏡はもっと少ない */
        int mirror_num=0;              /* 鏡の数 */
 {
        int mirror_x[10],mirror_y[10]; /* 鏡はもっと少ない */
        int mirror_num=0;              /* 鏡の数 */
@@ -7995,7 +7995,7 @@ bool binding_field( int dam )
  * @param dam ダメージ量
  * @return 効果があったらTRUEを返す
  */
  * @param dam ダメージ量
  * @return 効果があったらTRUEを返す
  */
-void seal_of_mirror( int dam )
+void seal_of_mirror( HIT_POINT dam )
 {
        int x,y;
 
 {
        int x,y;
 
index e0559f5..1c7715e 100644 (file)
@@ -2704,7 +2704,7 @@ bool detect_all(POSITION range)
  * this is done in two passes. -- JDL
  * </pre>
  */
  * this is done in two passes. -- JDL
  * </pre>
  */
-bool project_hack(int typ, int dam)
+bool project_hack(int typ, HIT_POINT dam)
 {
        int     i, x, y;
        int     flg = PROJECT_JUMP | PROJECT_KILL | PROJECT_HIDE;
 {
        int     i, x, y;
        int     flg = PROJECT_JUMP | PROJECT_KILL | PROJECT_HIDE;
@@ -2806,7 +2806,7 @@ bool turn_undead(void)
  * @brief 視界内のアンデッド・モンスターにダメージを与える処理 / Dispel undead monsters
  * @return 効力があった場合TRUEを返す
  */
  * @brief 視界内のアンデッド・モンスターにダメージを与える処理 / Dispel undead monsters
  * @return 効力があった場合TRUEを返す
  */
-bool dispel_undead(int dam)
+bool dispel_undead(HIT_POINT dam)
 {
        bool tester = (project_hack(GF_DISP_UNDEAD, dam));
        if (tester)
 {
        bool tester = (project_hack(GF_DISP_UNDEAD, dam));
        if (tester)
@@ -2818,7 +2818,7 @@ bool dispel_undead(int dam)
  * @brief 視界内の邪悪なモンスターにダメージを与える処理 / Dispel evil monsters
  * @return 効力があった場合TRUEを返す
  */
  * @brief 視界内の邪悪なモンスターにダメージを与える処理 / Dispel evil monsters
  * @return 効力があった場合TRUEを返す
  */
-bool dispel_evil(int dam)
+bool dispel_evil(HIT_POINT dam)
 {
        return (project_hack(GF_DISP_EVIL, dam));
 }
 {
        return (project_hack(GF_DISP_EVIL, dam));
 }
@@ -2827,7 +2827,7 @@ bool dispel_evil(int dam)
  * @brief 視界内の善良なモンスターにダメージを与える処理 / Dispel good monsters
  * @return 効力があった場合TRUEを返す
  */
  * @brief 視界内の善良なモンスターにダメージを与える処理 / Dispel good monsters
  * @return 効力があった場合TRUEを返す
  */
-bool dispel_good(int dam)
+bool dispel_good(HIT_POINT dam)
 {
        return (project_hack(GF_DISP_GOOD, dam));
 }
 {
        return (project_hack(GF_DISP_GOOD, dam));
 }
@@ -2836,7 +2836,7 @@ bool dispel_good(int dam)
  * @brief 視界内のあらゆるモンスターにダメージを与える処理 / Dispel all monsters
  * @return 効力があった場合TRUEを返す
  */
  * @brief 視界内のあらゆるモンスターにダメージを与える処理 / Dispel all monsters
  * @return 効力があった場合TRUEを返す
  */
-bool dispel_monsters(int dam)
+bool dispel_monsters(HIT_POINT dam)
 {
        return (project_hack(GF_DISP_ALL, dam));
 }
 {
        return (project_hack(GF_DISP_ALL, dam));
 }
@@ -2845,7 +2845,7 @@ bool dispel_monsters(int dam)
  * @brief 視界内の生命のあるモンスターにダメージを与える処理 / Dispel 'living' monsters
  * @return 効力があった場合TRUEを返す
  */
  * @brief 視界内の生命のあるモンスターにダメージを与える処理 / Dispel 'living' monsters
  * @return 効力があった場合TRUEを返す
  */
-bool dispel_living(int dam)
+bool dispel_living(HIT_POINT dam)
 {
        return (project_hack(GF_DISP_LIVING, dam));
 }
 {
        return (project_hack(GF_DISP_LIVING, dam));
 }
@@ -2854,7 +2854,7 @@ bool dispel_living(int dam)
  * @brief 視界内の悪魔系モンスターにダメージを与える処理 / Dispel 'living' monsters
  * @return 効力があった場合TRUEを返す
  */
  * @brief 視界内の悪魔系モンスターにダメージを与える処理 / Dispel 'living' monsters
  * @return 効力があった場合TRUEを返す
  */
-bool dispel_demons(int dam)
+bool dispel_demons(HIT_POINT dam)
 {
        return (project_hack(GF_DISP_DEMON, dam));
 }
 {
        return (project_hack(GF_DISP_DEMON, dam));
 }
@@ -3126,7 +3126,7 @@ bool mass_genocide(int power, bool player_cast)
  */
 bool mass_genocide_undead(int power, bool player_cast)
 {
  */
 bool mass_genocide_undead(int power, bool player_cast)
 {
-       POSITION i;
+       MONSTER_IDX i;
        bool result = FALSE;
 
        /* Prevent mass genocide in quest levels */
        bool result = FALSE;
 
        /* Prevent mass genocide in quest levels */
@@ -4122,7 +4122,7 @@ void discharge_minion(void)
        }
        for (i = 1; i < m_max; i++)
        {
        }
        for (i = 1; i < m_max; i++)
        {
-               int dam;
+               HIT_POINT dam;
                monster_type *m_ptr = &m_list[i];
                monster_race *r_ptr;
 
                monster_type *m_ptr = &m_list[i];
                monster_race *r_ptr;
 
@@ -4592,7 +4592,7 @@ void unlite_room(int y1, int x1)
  * @param rad 効果半径
  * @return 作用が実際にあった場合TRUEを返す
  */
  * @param rad 効果半径
  * @return 作用が実際にあった場合TRUEを返す
  */
-bool lite_area(int dam, int rad)
+bool lite_area(HIT_POINT dam, int rad)
 {
        int flg = PROJECT_GRID | PROJECT_KILL;
 
 {
        int flg = PROJECT_GRID | PROJECT_KILL;
 
@@ -4625,7 +4625,7 @@ bool lite_area(int dam, int rad)
  * @param rad 効果半径
  * @return 作用が実際にあった場合TRUEを返す
  */
  * @param rad 効果半径
  * @return 作用が実際にあった場合TRUEを返す
  */
-bool unlite_area(int dam, int rad)
+bool unlite_area(HIT_POINT dam, int rad)
 {
        int flg = PROJECT_GRID | PROJECT_KILL;
 
 {
        int flg = PROJECT_GRID | PROJECT_KILL;
 
@@ -4661,7 +4661,7 @@ bool unlite_area(int dam, int rad)
  * Affect grids, objects, and monsters
  * </pre>
  */
  * Affect grids, objects, and monsters
  * </pre>
  */
-bool fire_ball(int typ, int dir, int dam, int rad)
+bool fire_ball(int typ, int dir, HIT_POINT dam, int rad)
 {
        int tx, ty;
 
 {
        int tx, ty;
 
@@ -4700,7 +4700,7 @@ bool fire_ball(int typ, int dir, int dam, int rad)
  * Affect grids, objects, and monsters
  * </pre>
  */
  * Affect grids, objects, and monsters
  * </pre>
  */
-bool fire_rocket(int typ, int dir, int dam, int rad)
+bool fire_rocket(int typ, int dir, HIT_POINT dam, int rad)
 {
        int tx, ty;
 
 {
        int tx, ty;
 
@@ -4736,7 +4736,7 @@ bool fire_rocket(int typ, int dir, int dam, int rad)
  * Affect grids, objects, and monsters
  * </pre>
  */
  * Affect grids, objects, and monsters
  * </pre>
  */
-bool fire_ball_hide(int typ, int dir, int dam, int rad)
+bool fire_ball_hide(int typ, int dir, HIT_POINT dam, int rad)
 {
        int tx, ty;
 
 {
        int tx, ty;
 
@@ -4777,7 +4777,7 @@ bool fire_ball_hide(int typ, int dir, int dam, int rad)
  * Option to hurt the player.
  * </pre>
  */
  * Option to hurt the player.
  * </pre>
  */
-bool fire_meteor(int who, int typ, int y, int x, int dam, int rad)
+bool fire_meteor(int who, int typ, int y, int x, HIT_POINT dam, int rad)
 {
        int flg = PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
 
 {
        int flg = PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
 
@@ -4928,7 +4928,7 @@ bool teleport_swap(int dir)
  * @param flg フラグ
  * @return 作用が実際にあった場合TRUEを返す
  */
  * @param flg フラグ
  * @return 作用が実際にあった場合TRUEを返す
  */
-bool project_hook(int typ, int dir, int dam, int flg)
+bool project_hook(int typ, int dir, HIT_POINT dam, int flg)
 {
        int tx, ty;
 
 {
        int tx, ty;
 
@@ -4963,7 +4963,7 @@ bool project_hook(int typ, int dir, int dam, int flg)
  * Affect monsters and grids (not objects).
  * </pre>
  */
  * Affect monsters and grids (not objects).
  * </pre>
  */
-bool fire_bolt(int typ, int dir, int dam)
+bool fire_bolt(int typ, int dir, HIT_POINT dam)
 {
        int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_GRID;
        if (typ != GF_ARROW) flg |= PROJECT_REFLECTABLE;
 {
        int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_GRID;
        if (typ != GF_ARROW) flg |= PROJECT_REFLECTABLE;
@@ -4983,7 +4983,7 @@ bool fire_bolt(int typ, int dir, int dam)
  * Affect monsters, grids and objects.
  * </pre>
  */
  * Affect monsters, grids and objects.
  * </pre>
  */
-bool fire_beam(int typ, int dir, int dam)
+bool fire_beam(int typ, int dir, HIT_POINT dam)
 {
        int flg = PROJECT_BEAM | PROJECT_KILL | PROJECT_GRID | PROJECT_ITEM;
        return (project_hook(typ, dir, dam, flg));
 {
        int flg = PROJECT_BEAM | PROJECT_KILL | PROJECT_GRID | PROJECT_ITEM;
        return (project_hook(typ, dir, dam, flg));
@@ -5003,7 +5003,7 @@ bool fire_beam(int typ, int dir, int dam)
  * Affect monsters, grids and objects.
  * </pre>
  */
  * Affect monsters, grids and objects.
  * </pre>
  */
-bool fire_bolt_or_beam(int prob, int typ, int dir, int dam)
+bool fire_bolt_or_beam(int prob, int typ, int dir, HIT_POINT dam)
 {
        if (randint0(100) < prob)
        {
 {
        if (randint0(100) < prob)
        {
@@ -5021,7 +5021,7 @@ bool fire_bolt_or_beam(int prob, int typ, int dir, int dam)
  * @param dam 威力
  * @return 作用が実際にあった場合TRUEを返す
  */
  * @param dam 威力
  * @return 作用が実際にあった場合TRUEを返す
  */
-bool lite_line(int dir, int dam)
+bool lite_line(int dir, HIT_POINT dam)
 {
        int flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_KILL;
        return (project_hook(GF_LITE_WEAK, dir, dam, flg));
 {
        int flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_KILL;
        return (project_hook(GF_LITE_WEAK, dir, dam, flg));
@@ -5033,7 +5033,7 @@ bool lite_line(int dir, int dam)
  * @param dam 威力
  * @return 作用が実際にあった場合TRUEを返す
  */
  * @param dam 威力
  * @return 作用が実際にあった場合TRUEを返す
  */
-bool drain_life(int dir, int dam)
+bool drain_life(int dir, HIT_POINT dam)
 {
        int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
        return (project_hook(GF_OLD_DRAIN, dir, dam, flg));
 {
        int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
        return (project_hook(GF_OLD_DRAIN, dir, dam, flg));
@@ -5045,7 +5045,7 @@ bool drain_life(int dir, int dam)
  * @param dam 威力
  * @return 作用が実際にあった場合TRUEを返す
  */
  * @param dam 威力
  * @return 作用が実際にあった場合TRUEを返す
  */
-bool wall_to_mud(int dir, int dam)
+bool wall_to_mud(int dir, HIT_POINT dam)
 {
        int flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
        return (project_hook(GF_KILL_WALL, dir, dam, flg));
 {
        int flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
        return (project_hook(GF_KILL_WALL, dir, dam, flg));
@@ -5090,7 +5090,7 @@ bool disarm_trap(int dir)
  * @param dam 威力
  * @return 作用が実際にあった場合TRUEを返す
  */
  * @param dam 威力
  * @return 作用が実際にあった場合TRUEを返す
  */
-bool heal_monster(int dir, int dam)
+bool heal_monster(int dir, HIT_POINT dam)
 {
        int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
        return (project_hook(GF_OLD_HEAL, dir, dam, flg));
 {
        int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
        return (project_hook(GF_OLD_HEAL, dir, dam, flg));
@@ -5428,7 +5428,7 @@ bool activate_ty_curse(bool stop_ty, int *count)
                case 30: case 31:
                        if (!(*count))
                        {
                case 30: case 31:
                        if (!(*count))
                        {
-                               int dam = damroll(10, 10);
+                               HIT_POINT dam = damroll(10, 10);
                                msg_print(_("純粋な魔力の次元への扉が開いた!", "A portal opens to a plane of raw mana!"));
                                project(0, 8, p_ptr->y, p_ptr->x, dam, GF_MANA, flg, -1);
                                take_hit(DAMAGE_NOESCAPE, dam, _("純粋な魔力の解放", "released pure mana"), -1);
                                msg_print(_("純粋な魔力の次元への扉が開いた!", "A portal opens to a plane of raw mana!"));
                                project(0, 8, p_ptr->y, p_ptr->x, dam, GF_MANA, flg, -1);
                                take_hit(DAMAGE_NOESCAPE, dam, _("純粋な魔力の解放", "released pure mana"), -1);
@@ -5688,7 +5688,7 @@ void wall_breaker(void)
  * @param dam 効力
  * @return 作用が実際にあった場合TRUEを返す
  */
  * @param dam 効力
  * @return 作用が実際にあった場合TRUEを返す
  */
-bool confuse_monsters(int dam)
+bool confuse_monsters(HIT_POINT dam)
 {
        return (project_hack(GF_OLD_CONF, dam));
 }
 {
        return (project_hack(GF_OLD_CONF, dam));
 }
@@ -5699,7 +5699,7 @@ bool confuse_monsters(int dam)
  * @param dam 効力
  * @return 作用が実際にあった場合TRUEを返す
  */
  * @param dam 効力
  * @return 作用が実際にあった場合TRUEを返す
  */
-bool charm_monsters(int dam)
+bool charm_monsters(HIT_POINT dam)
 {
        return (project_hack(GF_CHARM, dam));
 }
 {
        return (project_hack(GF_CHARM, dam));
 }
@@ -5710,7 +5710,7 @@ bool charm_monsters(int dam)
  * @param dam 効力
  * @return 作用が実際にあった場合TRUEを返す
  */
  * @param dam 効力
  * @return 作用が実際にあった場合TRUEを返す
  */
-bool charm_animals(int dam)
+bool charm_animals(HIT_POINT dam)
 {
        return (project_hack(GF_CONTROL_ANIMAL, dam));
 }
 {
        return (project_hack(GF_CONTROL_ANIMAL, dam));
 }
@@ -5721,7 +5721,7 @@ bool charm_animals(int dam)
  * @param dam 効力
  * @return 作用が実際にあった場合TRUEを返す
  */
  * @param dam 効力
  * @return 作用が実際にあった場合TRUEを返す
  */
-bool stun_monsters(int dam)
+bool stun_monsters(HIT_POINT dam)
 {
        return (project_hack(GF_STUN, dam));
 }
 {
        return (project_hack(GF_STUN, dam));
 }
@@ -5732,7 +5732,7 @@ bool stun_monsters(int dam)
  * @param dam 効力
  * @return 作用が実際にあった場合TRUEを返す
  */
  * @param dam 効力
  * @return 作用が実際にあった場合TRUEを返す
  */
-bool stasis_monsters(int dam)
+bool stasis_monsters(HIT_POINT dam)
 {
        return (project_hack(GF_STASIS, dam));
 }
 {
        return (project_hack(GF_STASIS, dam));
 }
@@ -5743,7 +5743,7 @@ bool stasis_monsters(int dam)
  * @param dam 効力
  * @return 作用が実際にあった場合TRUEを返す
  */
  * @param dam 効力
  * @return 作用が実際にあった場合TRUEを返す
  */
-bool mindblast_monsters(int dam)
+bool mindblast_monsters(HIT_POINT dam)
 {
        return (project_hack(GF_PSI, dam));
 }
 {
        return (project_hack(GF_PSI, dam));
 }
@@ -5765,7 +5765,7 @@ bool banish_monsters(int dist)
  * @param dam 効力
  * @return 作用が実際にあった場合TRUEを返す
  */
  * @param dam 効力
  * @return 作用が実際にあった場合TRUEを返す
  */
-bool turn_evil(int dam)
+bool turn_evil(HIT_POINT dam)
 {
        return (project_hack(GF_TURN_EVIL, dam));
 }
 {
        return (project_hack(GF_TURN_EVIL, dam));
 }
@@ -5776,7 +5776,7 @@ bool turn_evil(int dam)
  * @param dam 効力
  * @return 作用が実際にあった場合TRUEを返す
  */
  * @param dam 効力
  * @return 作用が実際にあった場合TRUEを返す
  */
-bool turn_monsters(int dam)
+bool turn_monsters(HIT_POINT dam)
 {
        return (project_hack(GF_TURN_ALL, dam));
 }
 {
        return (project_hack(GF_TURN_ALL, dam));
 }
index ebcbf84..09539fc 100644 (file)
@@ -4685,7 +4685,7 @@ static int minus_ac(void)
  * @param aura オーラよるダメージが原因ならばTRUE
  * @return 修正HPダメージ量
  */
  * @param aura オーラよるダメージが原因ならばTRUE
  * @return 修正HPダメージ量
  */
-int acid_dam(int dam, cptr kb_str, int monspell, bool aura)
+int acid_dam(HIT_POINT dam, cptr kb_str, int monspell, bool aura)
 {
        int get_damage;  
        int inv = (dam < 30) ? 1 : (dam < 60) ? 2 : 3;
 {
        int get_damage;  
        int inv = (dam < 30) ? 1 : (dam < 60) ? 2 : 3;
@@ -4735,7 +4735,7 @@ int acid_dam(int dam, cptr kb_str, int monspell, bool aura)
  * @param aura オーラよるダメージが原因ならばTRUE
  * @return 修正HPダメージ量
  */
  * @param aura オーラよるダメージが原因ならばTRUE
  * @return 修正HPダメージ量
  */
-int elec_dam(int dam, cptr kb_str, int monspell, bool aura)
+int elec_dam(HIT_POINT dam, cptr kb_str, int monspell, bool aura)
 {
        int get_damage;  
        int inv = (dam < 30) ? 1 : (dam < 60) ? 2 : 3;
 {
        int get_damage;  
        int inv = (dam < 30) ? 1 : (dam < 60) ? 2 : 3;
@@ -4784,7 +4784,7 @@ int elec_dam(int dam, cptr kb_str, int monspell, bool aura)
  * @param aura オーラよるダメージが原因ならばTRUE
  * @return 修正HPダメージ量
  */
  * @param aura オーラよるダメージが原因ならばTRUE
  * @return 修正HPダメージ量
  */
-int fire_dam(int dam, cptr kb_str, int monspell, bool aura)
+int fire_dam(HIT_POINT dam, cptr kb_str, int monspell, bool aura)
 {
        int get_damage;  
        int inv = (dam < 30) ? 1 : (dam < 60) ? 2 : 3;
 {
        int get_damage;  
        int inv = (dam < 30) ? 1 : (dam < 60) ? 2 : 3;
@@ -4833,7 +4833,7 @@ int fire_dam(int dam, cptr kb_str, int monspell, bool aura)
  * @param aura オーラよるダメージが原因ならばTRUE
  * @return 修正HPダメージ量
  */
  * @param aura オーラよるダメージが原因ならばTRUE
  * @return 修正HPダメージ量
  */
-int cold_dam(int dam, cptr kb_str, int monspell, bool aura)
+int cold_dam(HIT_POINT dam, cptr kb_str, int monspell, bool aura)
 {
        int get_damage;  
        int inv = (dam < 30) ? 1 : (dam < 60) ? 2 : 3;
 {
        int get_damage;  
        int inv = (dam < 30) ? 1 : (dam < 60) ? 2 : 3;
index 0a853ef..8f48d22 100644 (file)
@@ -1026,7 +1026,7 @@ monster_hook_type get_mon_num2_hook;
 /*
  * Hack -- function hook to restrict "get_obj_num_prep()" function
  */
 /*
  * Hack -- function hook to restrict "get_obj_num_prep()" function
  */
-bool (*get_obj_num_hook)(int k_idx);
+bool (*get_obj_num_hook)(KIND_OBJECT_IDX k_idx);
 
 
 /* Hack, monk armour */
 
 
 /* Hack, monk armour */
index 1c94028..f94fd98 100644 (file)
@@ -710,7 +710,7 @@ static tval_desc tvals[] =
  * @param k_idx ベースアイテムID
  * @return なし
  */
  * @param k_idx ベースアイテムID
  * @return なし
  */
-void strip_name(char *buf, int k_idx)
+void strip_name(char *buf, KIND_OBJECT_IDX k_idx)
 {
        char *t;
 
 {
        char *t;
 
index a223a79..2b99d52 100644 (file)
@@ -254,7 +254,7 @@ static int get_coin_type(MONRACE_IDX r_idx)
  * @param k_idx 判定したいオブジェクトのベースアイテムID
  * @return オブジェクトがクロークならばTRUEを返す
  */
  * @param k_idx 判定したいオブジェクトのベースアイテムID
  * @return オブジェクトがクロークならばTRUEを返す
  */
-static bool kind_is_cloak(int k_idx)
+static bool kind_is_cloak(KIND_OBJECT_IDX k_idx)
 {
        object_kind *k_ptr = &k_info[k_idx];
 
 {
        object_kind *k_ptr = &k_info[k_idx];
 
@@ -275,7 +275,7 @@ static bool kind_is_cloak(int k_idx)
  * @param k_idx 判定したいオブジェクトのベースアイテムID
  * @return オブジェクトが竿状武器ならばTRUEを返す
  */
  * @param k_idx 判定したいオブジェクトのベースアイテムID
  * @return オブジェクトが竿状武器ならばTRUEを返す
  */
-static bool kind_is_polearm(int k_idx)
+static bool kind_is_polearm(KIND_OBJECT_IDX k_idx)
 {
        object_kind *k_ptr = &k_info[k_idx];
 
 {
        object_kind *k_ptr = &k_info[k_idx];
 
@@ -296,7 +296,7 @@ static bool kind_is_polearm(int k_idx)
  * @param k_idx 判定したいオブジェクトのベースアイテムID
  * @return オブジェクトが剣ならばTRUEを返す
  */
  * @param k_idx 判定したいオブジェクトのベースアイテムID
  * @return オブジェクトが剣ならばTRUEを返す
  */
-static bool kind_is_sword(int k_idx)
+static bool kind_is_sword(KIND_OBJECT_IDX k_idx)
 {
        object_kind *k_ptr = &k_info[k_idx];
 
 {
        object_kind *k_ptr = &k_info[k_idx];
 
@@ -317,7 +317,7 @@ static bool kind_is_sword(int k_idx)
  * @param k_idx 判定したいオブジェクトのベースアイテムID
  * @return オブジェクトが魔法書ならばTRUEを返す
  */
  * @param k_idx 判定したいオブジェクトのベースアイテムID
  * @return オブジェクトが魔法書ならばTRUEを返す
  */
-static bool kind_is_book(int k_idx)
+static bool kind_is_book(KIND_OBJECT_IDX k_idx)
 {
        object_kind *k_ptr = &k_info[k_idx];
 
 {
        object_kind *k_ptr = &k_info[k_idx];
 
@@ -338,7 +338,7 @@ static bool kind_is_book(int k_idx)
  * @param k_idx 判定したいオブジェクトのベースアイテムID
  * @return オブジェクトがベースアイテム時点でGOODなアイテムならばTRUEを返す
  */
  * @param k_idx 判定したいオブジェクトのベースアイテムID
  * @return オブジェクトがベースアイテム時点でGOODなアイテムならばTRUEを返す
  */
-static bool kind_is_good_book(int k_idx)
+static bool kind_is_good_book(KIND_OBJECT_IDX k_idx)
 {
        object_kind *k_ptr = &k_info[k_idx];
 
 {
        object_kind *k_ptr = &k_info[k_idx];
 
@@ -359,7 +359,7 @@ static bool kind_is_good_book(int k_idx)
  * @param k_idx 判定したいオブジェクトのベースアイテムID
  * @return オブジェクトが鎧ならばTRUEを返す
  */
  * @param k_idx 判定したいオブジェクトのベースアイテムID
  * @return オブジェクトが鎧ならばTRUEを返す
  */
-static bool kind_is_armor(int k_idx)
+static bool kind_is_armor(KIND_OBJECT_IDX k_idx)
 {
        object_kind *k_ptr = &k_info[k_idx];
 
 {
        object_kind *k_ptr = &k_info[k_idx];
 
@@ -380,7 +380,7 @@ static bool kind_is_armor(int k_idx)
  * @param k_idx 判定したいオブジェクトのベースアイテムID
  * @return オブジェクトが打撃武器ならばTRUEを返す
  */
  * @param k_idx 判定したいオブジェクトのベースアイテムID
  * @return オブジェクトが打撃武器ならばTRUEを返す
  */
-static bool kind_is_hafted(int k_idx)
+static bool kind_is_hafted(KIND_OBJECT_IDX k_idx)
 {
        object_kind *k_ptr = &k_info[k_idx];
 
 {
        object_kind *k_ptr = &k_info[k_idx];
 
@@ -1478,7 +1478,7 @@ HIT_POINT mon_damage_mod(monster_type *m_ptr, HIT_POINT dam, bool is_psy_spear)
  * experience point of a monster later.
  * </pre>
  */
  * experience point of a monster later.
  * </pre>
  */
-static void get_exp_from_mon(int dam, monster_type *m_ptr)
+static void get_exp_from_mon(HIT_POINT dam, monster_type *m_ptr)
 {
        monster_race *r_ptr = &r_info[m_ptr->r_idx];
 
 {
        monster_race *r_ptr = &r_info[m_ptr->r_idx];
 
@@ -1577,7 +1577,7 @@ static void get_exp_from_mon(int dam, monster_type *m_ptr)
  * to induce changes in the monster recall code.
  * </pre>
  */
  * to induce changes in the monster recall code.
  * </pre>
  */
-bool mon_take_hit(MONSTER_IDX m_idx, int dam, bool *fear, cptr note)
+bool mon_take_hit(MONSTER_IDX m_idx, HIT_POINT dam, bool *fear, cptr note)
 {
        monster_type    *m_ptr = &m_list[m_idx];
        monster_race    *r_ptr = &r_info[m_ptr->r_idx];
 {
        monster_type    *m_ptr = &m_list[m_idx];
        monster_race    *r_ptr = &r_info[m_ptr->r_idx];