From ffd75565615f95ade0077a5ed53fb784ea289bde Mon Sep 17 00:00:00 2001 From: Deskull Date: Sat, 26 Aug 2017 19:16:25 +0900 Subject: [PATCH] =?utf8?q?#37449=E3=80=80(2.2.0.57)=20=E3=83=87=E3=83=90?= =?utf8?q?=E3=83=83=E3=82=B0=E3=83=A2=E3=83=BC=E3=83=89=E3=81=AE=E6=AD=A6?= =?utf8?q?=E5=99=A8=E6=83=85=E5=A0=B1=E5=87=BA=E5=8A=9B=E3=82=92=E6=95=B4?= =?utf8?q?=E7=90=86=E3=80=81=E3=83=87=E3=83=90=E3=83=83=E3=82=B0=E3=80=82?= =?utf8?q?=20/=20Rearrange=20and=20fix=20generation=20info=20of=20weapon?= =?utf8?q?=20on=20debug=20mode.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/artifact.c | 80 +++++++++++++++++++++++++++++++++++----------------------- src/defines.h | 2 +- src/object2.c | 2 +- 3 files changed, 51 insertions(+), 33 deletions(-) diff --git a/src/artifact.c b/src/artifact.c index 5db28e5d6..e08d88165 100644 --- a/src/artifact.c +++ b/src/artifact.c @@ -2047,7 +2047,7 @@ bool create_artifact(object_type *o_ptr, bool a_scroll) } /* 平均対邪ダメージが一定以上なら11/12(WEIRD_LUCK)でダメージ抑制処理を行う */ - if(suppression_evil_dam(o_ptr) && !one_in_(WEIRD_LUCK) && object_is_weapon) + if(suppression_evil_dam(o_ptr) && !one_in_(WEIRD_LUCK) && object_is_weapon(o_ptr)) { if(cheat_xtra) msg_format("抑制処理"); do @@ -3928,34 +3928,34 @@ int calc_arm_avgdamage(object_type *o_ptr) u32b flgs[TR_FLAG_SIZE]; object_flags(o_ptr, flgs); - int dam = 0; - dam = (o_ptr->dd * o_ptr->ds + o_ptr->dd) / 2; + int 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; - if(cheat_xtra) msg_format("素平均%d ", dam); if(have_flag(flgs, TR_KILL_EVIL)) { - dam = dam * 7 / 2; - if (cheat_xtra) msg_format("X邪計算後%d ", dam); + dam = s_evil = dam * 7 / 2; } else if(!have_flag(flgs, TR_KILL_EVIL) && have_flag(flgs, TR_SLAY_EVIL)) { - dam = dam * 2; - if (cheat_xtra) msg_format("/邪計算後%d ", dam); + dam = s_evil = dam * 2; } if (have_flag(flgs, TR_FORCE_WEAPON)) { - dam = dam * 3 / 2 + (o_ptr->dd * o_ptr->ds + o_ptr->dd); + dam = forced = dam * 3 / 2 + (o_ptr->dd * o_ptr->ds + o_ptr->dd); } if(have_flag(flgs, TR_VORPAL)) { - dam = dam * 11 / 9; - if (cheat_xtra) msg_format("/切計算後%d ", dam); + dam = vorpal = dam * 11 / 9; } dam = dam + o_ptr->to_d; - if (cheat_xtra) msg_format("最終対邪%d ", dam); + + if (cheat_xtra) msg_format("素:%d> 対邪:%d> 理力:%d> 切:%d> 最終:%d", + base, s_evil, forced, vorpal, dam); return(dam); } @@ -4014,25 +4014,43 @@ int weakening_artifact(object_type *o_ptr) if ((k_ptr->dd < o_ptr->dd) || (k_ptr->ds < o_ptr->ds)) { - if (o_ptr->dd > o_ptr->ds) - { - o_ptr->dd--; - } - else - { - o_ptr->ds--; - } - return 1; - } - - if (o_ptr->to_d > 10) - { - o_ptr->to_d = o_ptr->to_d - damroll(1, 6); - if (o_ptr->to_d < 10) - { - o_ptr->to_d = 10; - } - return 1; + int pre_dd = o_ptr->dd; + int pre_ds = o_ptr->ds; + + if (o_ptr->dd > o_ptr->ds) + { + o_ptr->dd--; + } + else + { + o_ptr->ds--; + } + + if (cheat_xtra) + { + msg_format("Dice Supress %dd%d -> %dd%d", + pre_dd, pre_ds, o_ptr->dd, o_ptr->ds); + } + return 1; + } + + if (o_ptr->to_d > 10) + { + int pre_damage = o_ptr->to_d; + + o_ptr->to_d = o_ptr->to_d - damroll(1, 6); + if (o_ptr->to_d < 10) + { + o_ptr->to_d = 10; + } + + if (cheat_xtra) + { + msg_format("Plus-Damage Supress %d -> %d", + pre_damage, o_ptr->to_d); + } + + return 1; } return 0; } \ No newline at end of file diff --git a/src/defines.h b/src/defines.h index e94dd04b6..e62f3e79c 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 56 /*!< ゲームのバージョン番号定義(エクストラ番号) */ +#define FAKE_VER_EXTRA 57 /*!< ゲームのバージョン番号定義(エクストラ番号) */ /*! diff --git a/src/object2.c b/src/object2.c index 58d193f99..38777b111 100644 --- a/src/object2.c +++ b/src/object2.c @@ -2091,7 +2091,7 @@ static void object_mention(object_type *o_ptr) } else if (o_ptr->art_name) { - msg_print(_("ランダム・アーティファクト", "Random artifact")); + msg_format(_("ランダム・アーティファクト (%s)", "Random artifact (%s)"), o_name); } else if (object_is_ego(o_ptr)) { -- 2.11.0