OSDN Git Service

#37359 (2.2.0.73) artifact.c 中の重大な警告とバグを修正。 / Fix warning and bugs in artifact.c.
authorDeskull <desull@users.sourceforge.jp>
Fri, 1 Sep 2017 15:17:01 +0000 (00:17 +0900)
committerDeskull <desull@users.sourceforge.jp>
Fri, 1 Sep 2017 15:17:01 +0000 (00:17 +0900)
src/artifact.c
src/defines.h

index 0cc750d..731a450 100644 (file)
@@ -12,6 +12,9 @@
 
 #include "angband.h"
 
+static int suppression_evil_dam(object_type *o_ptr);
+static int weakening_artifact(object_type *o_ptr);
+
 
 /* Chance of using syllables to form the name instead of the "template" files */
 #define SINDARIN_NAME   10 /*!< ランダムアーティファクトにシンダリン銘をつける確率 */
@@ -3928,54 +3931,54 @@ int calc_arm_avgdamage(object_type *o_ptr)
        return(dam);
 }
 
-int suppression_evil_dam(object_type *o_ptr)
+static int suppression_evil_dam(object_type *o_ptr)
 {
-       int num = 0;
+       int num = FALSE;
        u32b flgs[TR_FLAG_SIZE];
        object_flags(o_ptr, flgs);
 
-       if (o_ptr->art_flags, TR_VAMPIRIC)
+       if (have_flag(flgs, TR_VAMPIRIC))
        {
                if(have_flag(flgs, TR_BLOWS) && (o_ptr->pval == 1) && (calc_arm_avgdamage(o_ptr) > 52))
                {
-                       num = 1;
+                       num = TRUE;
                }
                else if(have_flag(flgs, TR_BLOWS) && (o_ptr->pval == 2) && (calc_arm_avgdamage(o_ptr) > 43))
                {
-                       num = 1;
+                       num = TRUE;
                }
                else if( have_flag(flgs, TR_BLOWS) && (o_ptr->pval == 3) && (calc_arm_avgdamage(o_ptr) > 33))
                {
-                       num = 1;
+                       num = TRUE;
                }
                else if (calc_arm_avgdamage(o_ptr) > 63)
                {
-                       num = 1;
+                       num = TRUE;
                }
        }
        else
        {
                if (have_flag(flgs, TR_BLOWS) && (o_ptr->pval == 1) && (calc_arm_avgdamage(o_ptr) > 65))
                {
-                       num = 1;
+                       num = TRUE;
                }
                else if (have_flag(flgs, TR_BLOWS) && (o_ptr->pval == 2) && (calc_arm_avgdamage(o_ptr) > 52))
                {
-               num = 1;
+                       num = TRUE;
                }
                else if (have_flag(flgs, TR_BLOWS) && (o_ptr->pval == 3) && (calc_arm_avgdamage(o_ptr) > 40))
                {
-               num = 1;
+                       num = TRUE;
                }
                else if (calc_arm_avgdamage(o_ptr) > 75)
                {
-               num = 1;
+                       num = TRUE;
                }
        }
        return(num);
 }
 
-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);
         object_kind *k_ptr = &k_info[k_idx];
index e73dcb4..691383e 100644 (file)
@@ -53,7 +53,7 @@
 #define FAKE_VER_MAJOR 12 /*!< ゲームのバージョン番号定義(メジャー番号 + 10) */
 #define FAKE_VER_MINOR 2 /*!< ゲームのバージョン番号定義(マイナー番号) */
 #define FAKE_VER_PATCH 0 /*!< ゲームのバージョン番号定義(パッチ番号) */
-#define FAKE_VER_EXTRA 72 /*!< ゲームのバージョン番号定義(エクストラ番号) */
+#define FAKE_VER_EXTRA 73 /*!< ゲームのバージョン番号定義(エクストラ番号) */
 
 
  /*!