OSDN Git Service

[Refactor] #37353 floors.cのメッセージ整理。 Refactor floors.c.
[hengband/hengband.git] / src / melee1.c
index 0eb3dd5..d8c6888 100644 (file)
@@ -12,6 +12,7 @@
  */
 
 #include "angband.h"
+#include "cmd-pet.h"
 
 
 /*!
@@ -24,7 +25,7 @@
  * 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;
@@ -145,7 +146,7 @@ static cptr desc_moan[] =
  * @param m_idx 打撃を行うモンスターのID
  * @return 実際に攻撃処理を行った場合TRUEを返す
  */
-bool make_attack_normal(IDX m_idx)
+bool make_attack_normal(MONSTER_IDX m_idx)
 {
        monster_type *m_ptr = &m_list[m_idx];
        monster_race *r_ptr = &r_info[m_ptr->r_idx];
@@ -169,7 +170,7 @@ bool make_attack_normal(IDX m_idx)
        bool touched = FALSE, fear = FALSE, alive = TRUE;
        bool explode = FALSE;
        bool do_silly_attack = (one_in_(2) && p_ptr->image);
-       int get_damage = 0;
+       HIT_POINT get_damage = 0;
        int abbreviate = 0;
 
        /* Not allowed to attack */
@@ -209,8 +210,8 @@ bool make_attack_normal(IDX m_idx)
        {
                bool obvious = FALSE;
 
-               int power = 0;
-               int damage = 0;
+               HIT_POINT power = 0;
+               HIT_POINT damage = 0;
 
                cptr act = NULL;
 
@@ -1924,7 +1925,7 @@ bool make_attack_normal(IDX m_idx)
                                                else /* monster does not dead */
                                                {
                                                        int j;
-                                                       int flg = PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
+                                                       BIT_FLAGS flg = PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
                                                        int typ[4][2] = {
                                                                { INVEN_HEAD, GF_OLD_CONF },
                                                                { INVEN_LARM,  GF_OLD_SLEEP },
@@ -2047,7 +2048,7 @@ bool make_attack_normal(IDX m_idx)
        if ((p_ptr->counter || (p_ptr->special_defense & KATA_MUSOU)) && alive && !p_ptr->is_dead && m_ptr->ml && (p_ptr->csp > 7))
        {
                char m_target_name[80];
-               monster_desc(m_name, m_ptr, 0);
+               monster_desc(m_target_name, m_ptr, 0);
 
                p_ptr->csp -= 7;
                msg_format(_("%^sに反撃した!", "Your counterattack to %s!"), m_target_name);