From: Deskull Date: Fri, 1 Sep 2017 15:17:01 +0000 (+0900) Subject: #37359 (2.2.0.73) artifact.c 中の重大な警告とバグを修正。 / Fix warning and bugs in artifact.c. X-Git-Tag: vmacos2.2.1-7a~1534 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=0328afcbc479ca0cce99e01e119cbafcc1f042c9;hp=2e74db525ee28d7b386c40bbe897174e3ff0a155;p=hengbandforosx%2Fhengbandosx.git #37359 (2.2.0.73) artifact.c 中の重大な警告とバグを修正。 / Fix warning and bugs in artifact.c. --- diff --git a/src/artifact.c b/src/artifact.c index 0cc750d5d..731a45037 100644 --- a/src/artifact.c +++ b/src/artifact.c @@ -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]; diff --git a/src/defines.h b/src/defines.h index e73dcb4ac..691383e2f 100644 --- a/src/defines.h +++ b/src/defines.h @@ -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 /*!< ゲームのバージョン番号定義(エクストラ番号) */ /*!