OSDN Git Service

#37449 (2.2.0.77) ランダムアーティファクト弱体化時のウィザードログを整理 / Rearrange wizard logs of weakening...
[hengband/hengband.git] / src / artifact.c
index b7fa098..04fc19b 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 /*!< ランダムアーティファクトにシンダリン銘をつける確率 */
@@ -151,16 +154,16 @@ void one_low_esp(object_type *o_ptr)
 {
        switch (randint1(10))
        {
-       case 1:  add_flag(o_ptr->art_flags, TR_ESP_ANIMAL);   break;
-       case 2:  add_flag(o_ptr->art_flags, TR_ESP_UNDEAD);   break;
-       case 3:  add_flag(o_ptr->art_flags, TR_ESP_DEMON);   break;
-       case 4:  add_flag(o_ptr->art_flags, TR_ESP_ORC);   break;
-       case 5:  add_flag(o_ptr->art_flags, TR_ESP_TROLL);   break;
-       case 6:  add_flag(o_ptr->art_flags, TR_ESP_GIANT);   break;
-       case 7:  add_flag(o_ptr->art_flags, TR_ESP_DRAGON);   break;
-       case 8:  add_flag(o_ptr->art_flags, TR_ESP_HUMAN);   break;
-       case 9:  add_flag(o_ptr->art_flags, TR_ESP_GOOD);   break;
-       case 10: add_flag(o_ptr->art_flags, TR_ESP_UNIQUE);   break;
+               case 1:  add_flag(o_ptr->art_flags, TR_ESP_ANIMAL);   break;
+               case 2:  add_flag(o_ptr->art_flags, TR_ESP_UNDEAD);   break;
+               case 3:  add_flag(o_ptr->art_flags, TR_ESP_DEMON);   break;
+               case 4:  add_flag(o_ptr->art_flags, TR_ESP_ORC);   break;
+               case 5:  add_flag(o_ptr->art_flags, TR_ESP_TROLL);   break;
+               case 6:  add_flag(o_ptr->art_flags, TR_ESP_GIANT);   break;
+               case 7:  add_flag(o_ptr->art_flags, TR_ESP_DRAGON);   break;
+               case 8:  add_flag(o_ptr->art_flags, TR_ESP_HUMAN);   break;
+               case 9:  add_flag(o_ptr->art_flags, TR_ESP_GOOD);   break;
+               case 10: add_flag(o_ptr->art_flags, TR_ESP_UNIQUE);   break;
        }
 }
 
@@ -1138,12 +1141,12 @@ static void random_misc(object_type * o_ptr)
                        int idx[3];
                        int n = randint1(3);
 
-                       idx[0] = randint1(8);
+                       idx[0] = randint1(10);
 
-                       idx[1] = randint1(7);
+                       idx[1] = randint1(9);
                        if (idx[1] >= idx[0]) idx[1]++;
 
-                       idx[2] = randint1(6);
+                       idx[2] = randint1(8);
                        if (idx[2] >= idx[0]) idx[2]++;
                        if (idx[2] >= idx[1]) idx[2]++;
 
@@ -1174,16 +1177,19 @@ static void random_misc(object_type * o_ptr)
                                add_flag(o_ptr->art_flags, TR_ESP_GIANT);
                                break;
                        case 7:
+                               add_flag(o_ptr->art_flags, TR_ESP_DRAGON);
+                               break;
+                       case 8:
                                add_flag(o_ptr->art_flags, TR_ESP_HUMAN);
                                if (!artifact_bias && one_in_(6))
                                        artifact_bias = BIAS_ROGUE;
                                break;
-                       case 8:
+                       case 9:
                                add_flag(o_ptr->art_flags, TR_ESP_GOOD);
                                if (!artifact_bias && one_in_(3))
                                        artifact_bias = BIAS_LAW;
                                break;
-                       case 9:
+                       case 10:
                                add_flag(o_ptr->art_flags, TR_ESP_UNIQUE);
                                if (!artifact_bias && one_in_(3))
                                        artifact_bias = BIAS_LAW;
@@ -1347,11 +1353,25 @@ static void random_slay(object_type *o_ptr)
        {
                case 1:
                case 2:
-                       add_flag(o_ptr->art_flags, TR_SLAY_ANIMAL);
+                       if (one_in_(4))
+                       {
+                               add_flag(o_ptr->art_flags, TR_KILL_ANIMAL);
+                       }
+                       else
+                       {
+                               add_flag(o_ptr->art_flags, TR_SLAY_ANIMAL);
+                       }
                        break;
                case 3:
                case 4:
-                       add_flag(o_ptr->art_flags, TR_SLAY_EVIL);
+                       if (one_in_(4))
+                       {
+                               add_flag(o_ptr->art_flags, TR_KILL_EVIL);
+                       }
+                       else
+                       {
+                       add_flag(o_ptr->art_flags, TR_SLAY_EVIL); 
+                       }
                        if (!artifact_bias && one_in_(2))
                                artifact_bias = BIAS_LAW;
                        else if (!artifact_bias && one_in_(9))
@@ -1359,27 +1379,62 @@ static void random_slay(object_type *o_ptr)
                        break;
                case 5:
                case 6:
-                       add_flag(o_ptr->art_flags, TR_SLAY_UNDEAD);
+                       if (one_in_(4))
+                       {
+                               add_flag(o_ptr->art_flags, TR_KILL_UNDEAD);
+                       }
+                       else
+                       {
+                               add_flag(o_ptr->art_flags, TR_SLAY_UNDEAD);
+                       }
                        if (!artifact_bias && one_in_(9))
                                artifact_bias = BIAS_PRIESTLY;
                        break;
                case 7:
                case 8:
-                       add_flag(o_ptr->art_flags, TR_SLAY_DEMON);
+                       if (one_in_(4))
+                       {
+                               add_flag(o_ptr->art_flags, TR_KILL_DEMON);
+                       }
+                       else
+                       {
+                               add_flag(o_ptr->art_flags, TR_SLAY_DEMON);
+                       }
                        if (!artifact_bias && one_in_(9))
                                artifact_bias = BIAS_PRIESTLY;
                        break;
                case 9:
                case 10:
-                       add_flag(o_ptr->art_flags, TR_SLAY_ORC);
+                       if (one_in_(4))
+                       {
+                               add_flag(o_ptr->art_flags, TR_KILL_ORC);
+                       }
+                       else
+                       {
+                               add_flag(o_ptr->art_flags, TR_SLAY_ORC);
+                       }
                        break;
                case 11:
                case 12:
-                       add_flag(o_ptr->art_flags, TR_SLAY_TROLL);
+                       if (one_in_(4))
+                       {
+                               add_flag(o_ptr->art_flags, TR_KILL_TROLL);
+                       }
+                       else
+                       {
+                               add_flag(o_ptr->art_flags, TR_SLAY_TROLL);
+                       }
                        break;
                case 13:
                case 14:
-                       add_flag(o_ptr->art_flags, TR_SLAY_GIANT);
+                       if (one_in_(4))
+                       {
+                               add_flag(o_ptr->art_flags, TR_KILL_GIANT);
+                       }
+                       else
+                       {
+                               add_flag(o_ptr->art_flags, TR_SLAY_GIANT);
+                       }
                        break;
                case 15:
                case 16:
@@ -1448,7 +1503,14 @@ static void random_slay(object_type *o_ptr)
                        break;
                case 33:
                case 34:
-                       add_flag(o_ptr->art_flags, TR_SLAY_HUMAN);
+                       if (one_in_(4))
+                       {
+                               add_flag(o_ptr->art_flags, TR_KILL_HUMAN);
+                       }
+                       else
+                       {
+                               add_flag(o_ptr->art_flags, TR_SLAY_HUMAN);
+                       }
                        break;
                default:
                        add_flag(o_ptr->art_flags, TR_CHAOTIC);
@@ -1902,6 +1964,7 @@ bool create_artifact(object_type *o_ptr, bool a_scroll)
                        o_ptr->pval = 4;
        }
 
+
        /* give it some plusses... */
        if (object_is_armour(o_ptr))
                o_ptr->to_a += randint1(o_ptr->to_a > 19 ? 1 : 20 - o_ptr->to_a);
@@ -1989,6 +2052,16 @@ bool create_artifact(object_type *o_ptr, bool a_scroll)
                else power_level = 3;
        }
 
+       /* 平均対邪ダメージが一定以上なら11/12(WEIRD_LUCK)でダメージ抑制処理を行う */
+       if(suppression_evil_dam(o_ptr) && !one_in_(WEIRD_LUCK) && object_is_weapon(o_ptr))
+       {
+               msg_format_wizard(CHEAT_OBJECT, "アーティファクトの抑制処理を行います。");
+               do
+               {
+                       if (weakening_artifact(o_ptr) == 0) break;
+               } while (suppression_evil_dam(o_ptr));
+       }
+
        if (a_scroll)
        {
                char dummy_name[80] = "";
@@ -2031,26 +2104,8 @@ bool create_artifact(object_type *o_ptr, bool a_scroll)
        /* Save the inscription */
        o_ptr->art_name = quark_add(new_name);
 
-       if (cheat_xtra)
-       {
-               char o_name[MAX_NLEN];
-
-               object_aware(o_ptr);
-               object_known(o_ptr);
-
-               /* Mark the item as fully known */
-               o_ptr->ident |= (IDENT_MENTAL);
-
-               /* Description */
-               object_desc(o_name, o_ptr, 0);
-
-#ifdef JP
-               msg_format("パワー %d で 価値%ld のランダムアーティファクト生成 バイアスは「%s」:", max_powers, total_flags, artifact_bias_name[artifact_bias]);
-#else
-               msg_format("Random artifact generated '%s'. (Power:%d, Value:%ld) :", artifact_bias_name[artifact_bias], max_powers, total_flags);
-#endif
-               msg_format("%s", o_name);
-       }
+       msg_format_wizard(CHEAT_OBJECT, _("パワー %d で 価値%ld のランダムアーティファクト生成 バイアスは「%s」",
+               "Random artifact generated - Power:%d Value:%d Bias:%s."), max_powers, total_flags, artifact_bias_name[artifact_bias]);
 
        /* Window stuff */
        p_ptr->window |= (PW_INVEN | PW_EQUIP);
@@ -2070,7 +2125,7 @@ int activation_index(object_type *o_ptr)
        /* Give priority to weaponsmith's essential activations */
        if (object_is_smith(o_ptr))
        {
-               switch (o_ptr->xtra3-1)
+               switch (o_ptr->xtra3 - 1)
                {
                case ESSENCE_TMP_RES_ACID: return ACT_RESIST_ACID;
                case ESSENCE_TMP_RES_ELEC: return ACT_RESIST_ELEC;
@@ -2379,8 +2434,8 @@ bool activate_random_artifact(object_type *o_ptr)
 
                                for (dir = 0; dir <= 9; dir++)
                                {
-                                       y = py + ddy[dir];
-                                       x = px + ddx[dir];
+                                       y = p_ptr->y + ddy[dir];
+                                       x = p_ptr->x + ddx[dir];
                                        c_ptr = &cave[y][x];
 
                                        /* Get the monster */
@@ -2510,7 +2565,7 @@ bool activate_random_artifact(object_type *o_ptr)
 
                                while (attempts--)
                                {
-                                       scatter(&y, &x, py, px, 4, 0);
+                                       scatter(&y, &x, p_ptr->y, p_ptr->x, 4, 0);
 
                                        if (!cave_have_flag_bold(y, x, FF_PROJECT)) continue;
 
@@ -2587,7 +2642,7 @@ bool activate_random_artifact(object_type *o_ptr)
 
                case ACT_QUAKE:
                {
-                       earthquake(py, px, 5);
+                       earthquake(p_ptr->y, p_ptr->x, 5);
                        break;
                }
 
@@ -2688,14 +2743,14 @@ bool activate_random_artifact(object_type *o_ptr)
 
                case ACT_SUMMON_ANIMAL:
                {
-                       (void)summon_specific(-1, py, px, plev, SUMMON_ANIMAL_RANGER, (PM_ALLOW_GROUP | PM_FORCE_PET));
+                       (void)summon_specific(-1, p_ptr->y, p_ptr->x, plev, SUMMON_ANIMAL_RANGER, (PM_ALLOW_GROUP | PM_FORCE_PET));
                        break;
                }
 
                case ACT_SUMMON_PHANTOM:
                {
                        msg_print(_("幻霊を召喚した。", "You summon a phantasmal servant."));
-                       (void)summon_specific(-1, py, px, dun_level, SUMMON_PHANTOM, (PM_ALLOW_GROUP | PM_FORCE_PET));
+                       (void)summon_specific(-1, p_ptr->y, p_ptr->x, dun_level, SUMMON_PHANTOM, (PM_ALLOW_GROUP | PM_FORCE_PET));
                        break;
                }
 
@@ -2708,7 +2763,7 @@ bool activate_random_artifact(object_type *o_ptr)
                        if (pet) mode |= PM_FORCE_PET;
                        else mode |= PM_NO_PET;
 
-                       if (summon_specific((pet ? -1 : 0), py, px, ((plev * 3) / 2), SUMMON_ELEMENTAL, mode))
+                       if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, ((plev * 3) / 2), SUMMON_ELEMENTAL, mode))
                        {
                                msg_print(_("エレメンタルが現れた...", "An elemental materializes..."));
                                if (pet)
@@ -2729,7 +2784,7 @@ bool activate_random_artifact(object_type *o_ptr)
                        if (pet) mode |= PM_FORCE_PET;
                        else mode |= PM_NO_PET;
 
-                       if (summon_specific((pet ? -1 : 0), py, px, ((plev * 3) / 2), SUMMON_DEMON, mode))
+                       if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, ((plev * 3) / 2), SUMMON_DEMON, mode))
                        {
                                msg_print(_("硫黄の悪臭が充満した。", "The area fills with a stench of sulphur and brimstone."));
                                if (pet)
@@ -2753,7 +2808,7 @@ bool activate_random_artifact(object_type *o_ptr)
                        if (pet) mode |= PM_FORCE_PET;
                        else mode |= (PM_ALLOW_UNIQUE | PM_NO_PET);
 
-                       if (summon_specific((pet ? -1 : 0), py, px, ((plev * 3) / 2), type, mode))
+                       if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, ((plev * 3) / 2), type, mode))
                        {
                                msg_print(_("冷たい風があなたの周りに吹き始めた。それは腐敗臭を運んでいる...",
                                                "Cold winds begin to blow around you, carrying with them the stench of decay..."));
@@ -2775,7 +2830,7 @@ bool activate_random_artifact(object_type *o_ptr)
                        if (pet) mode |= PM_FORCE_PET;
                        else mode |= PM_NO_PET;
 
-                       if (summon_specific((pet ? -1 : 0), py, px, ((p_ptr->lev * 3) / 2), SUMMON_HOUND, mode))
+                       if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, ((p_ptr->lev * 3) / 2), SUMMON_HOUND, mode))
                        {
 
                                if (pet)
@@ -2792,7 +2847,7 @@ bool activate_random_artifact(object_type *o_ptr)
                case ACT_SUMMON_DAWN:
                {
                        msg_print(_("暁の師団を召喚した。","You summon the Legion of the Dawn."));
-                       (void)summon_specific(-1, py, px, dun_level, SUMMON_DAWN, (PM_ALLOW_GROUP | PM_FORCE_PET));
+                       (void)summon_specific(-1, p_ptr->y, p_ptr->x, dun_level, SUMMON_DAWN, (PM_ALLOW_GROUP | PM_FORCE_PET));
                        break;
                }
 
@@ -2802,7 +2857,7 @@ bool activate_random_artifact(object_type *o_ptr)
                        bool pet = !one_in_(5);
                        if (pet) mode |= PM_FORCE_PET;
 
-                       if (summon_named_creature(0, py, px, MON_JIZOTAKO, mode))
+                       if (summon_named_creature(0, p_ptr->y, p_ptr->x, MON_JIZOTAKO, mode))
                        {
                                if (pet)
                                        msg_print(_("蛸があなたの下僕として出現した。", "A group of octopuses appear as your servant."));
@@ -3399,7 +3454,7 @@ bool activate_random_artifact(object_type *o_ptr)
                        object_copy(&forge, o_ptr);
                        inven_item_increase(inv, (0 - o_ptr->number));
                        inven_item_optimize(inv);
-                       o_idx = drop_near(&forge, 0, py, px);
+                       o_idx = drop_near(&forge, 0, p_ptr->y, p_ptr->x);
                        o_ptr = &o_list[o_idx];
 
                        object_desc(o_name, o_ptr, OD_NAME_ONLY);
@@ -3429,14 +3484,14 @@ bool activate_random_artifact(object_type *o_ptr)
                {
                        msg_print(_("あなたは妖刀に魅入られた…", "You are enchanted by cursed blade..."));
                        msg_print(_("「狂ほしく 血のごとき 月はのぼれり 秘めおきし 魔剣 いずこぞや」", "'Behold the blade arts.'"));
-                       massacre(py, px);
+                       massacre();
                        break;
                }
 
                case ACT_GRAND_CROSS:
                {
                        msg_print(_("「闇に還れ!」", "You say, 'Return to darkness!'"));
-                       project(0, 8, py, px, (randint1(100) + 200) * 2, GF_HOLY_FIRE, PROJECT_KILL | PROJECT_ITEM | PROJECT_GRID, -1);
+                       project(0, 8, p_ptr->y, p_ptr->x, (randint1(100) + 200) * 2, GF_HOLY_FIRE, PROJECT_KILL | PROJECT_ITEM | PROJECT_GRID, -1);
                        break;
                }
 
@@ -3462,8 +3517,8 @@ bool activate_random_artifact(object_type *o_ptr)
                        int x, y;
 
                        if (!get_rep_dir2(&dir)) return FALSE;
-                       y = py+ddy[dir];
-                       x = px+ddx[dir];
+                       y = p_ptr->y+ddy[dir];
+                       x = p_ptr->x+ddx[dir];
                        tsuri_dir = dir;
                        if (!cave_have_flag_bold(y, x, FF_WATER))
                        {
@@ -3489,13 +3544,13 @@ bool activate_random_artifact(object_type *o_ptr)
                        monster_type *m_ptr;
                        cptr kakusan = "";
                        
-                       if (summon_named_creature(0, py, px, MON_SUKE, PM_FORCE_PET))
+                       if (summon_named_creature(0, p_ptr->y, p_ptr->x, MON_SUKE, PM_FORCE_PET))
                        {
                                msg_print(_("『助さん』が現れた。", "Suke-san apperars."));
                                kakusan = "Suke-san";
                                count++;
                        }
-                       if (summon_named_creature(0, py, px, MON_KAKU, PM_FORCE_PET))
+                       if (summon_named_creature(0, p_ptr->y, p_ptr->x, MON_KAKU, PM_FORCE_PET))
                        {
                                msg_print(_("『格さん』が現れた。", "Kaku-san appears."));
                                kakusan = "Kaku-san";
@@ -3508,8 +3563,8 @@ bool activate_random_artifact(object_type *o_ptr)
                                        m_ptr = &m_list[i];
                                        if (!m_ptr->r_idx) continue;
                                        if (!((m_ptr->r_idx == MON_SUKE) || (m_ptr->r_idx == MON_KAKU))) continue;
-                                       if (!los(m_ptr->fy, m_ptr->fx, py, px)) continue;
-                                       if (!projectable(m_ptr->fy, m_ptr->fx, py, px)) continue;
+                                       if (!los(m_ptr->fy, m_ptr->fx, p_ptr->y, p_ptr->x)) continue;
+                                       if (!projectable(m_ptr->fy, m_ptr->fx, p_ptr->y, p_ptr->x)) continue;
                                        count++;
                                        break;
                                }
@@ -3576,8 +3631,8 @@ bool activate_random_artifact(object_type *o_ptr)
                        if (!get_aim_dir(&dir)) return FALSE;
 
                        /* Use the given direction */
-                       tx = px + 99 * ddx[dir];
-                       ty = py + 99 * ddy[dir];
+                       tx = p_ptr->x + 99 * ddx[dir];
+                       ty = p_ptr->y + 99 * ddy[dir];
 
                        /* Hack -- Use an actual "target" */
                        if ((dir == 5) && target_okay())
@@ -3788,7 +3843,6 @@ void random_artifact_resistance(object_type * o_ptr, artifact_type *a_ptr)
  * @attention この処理はdrop_near()内で普通の固定アーティファクトが重ならない性質に依存する.
  * 仮に2個以上存在可能かつ装備品以外の固定アーティファクトが作成されれば
  * drop_near()関数の返り値は信用できなくなる.
-
  */
 bool create_named_art(int a_idx, int y, int x)
 {
@@ -3839,3 +3893,134 @@ bool create_named_art(int a_idx, int y, int x)
        /* Drop the artifact from heaven */
        return drop_near(q_ptr, -1, y, x) ? TRUE : FALSE;
 }
+/*対邪平均ダメージの計算処理*/
+int calc_arm_avgdamage(object_type *o_ptr)
+{
+       u32b flgs[TR_FLAG_SIZE];
+       object_flags(o_ptr, flgs);
+
+       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(have_flag(flgs, TR_KILL_EVIL))
+       {
+               dam = s_evil = dam * 7 / 2;
+       }
+       else if(!have_flag(flgs, TR_KILL_EVIL) && have_flag(flgs, TR_SLAY_EVIL))
+       {       
+               dam = s_evil = dam * 2;
+       }
+       else s_evil = dam;
+
+       if (have_flag(flgs, TR_FORCE_WEAPON))
+       {
+               dam = forced = dam * 3 / 2 + (o_ptr->dd * o_ptr->ds + o_ptr->dd);
+       }
+       else forced = dam;
+
+       if(have_flag(flgs, TR_VORPAL))
+       {
+               dam = vorpal = dam * 11 / 9;
+       }
+       else vorpal = dam;
+
+       dam = dam + o_ptr->to_d;
+
+       msg_format_wizard(CHEAT_OBJECT,"素:%d> 対邪:%d> 理力:%d> 切:%d> 最終:%d",
+               base, s_evil, forced, vorpal, dam);
+
+       return(dam);
+}
+
+static int suppression_evil_dam(object_type *o_ptr)
+{
+       int num = FALSE;
+       u32b flgs[TR_FLAG_SIZE];
+       object_flags(o_ptr, flgs);
+
+       if (have_flag(flgs, TR_VAMPIRIC))
+       {
+               if(have_flag(flgs, TR_BLOWS) && (o_ptr->pval == 1) && (calc_arm_avgdamage(o_ptr) > 52))
+               {
+                       num = TRUE;
+               }
+               else if(have_flag(flgs, TR_BLOWS) && (o_ptr->pval == 2) && (calc_arm_avgdamage(o_ptr) > 43))
+               {
+                       num = TRUE;
+               }
+               else if( have_flag(flgs, TR_BLOWS) && (o_ptr->pval == 3) && (calc_arm_avgdamage(o_ptr) > 33))
+               {
+                       num = TRUE;
+               }
+               else if (calc_arm_avgdamage(o_ptr) > 63)
+               {
+                       num = TRUE;
+               }
+       }
+       else
+       {
+               if (have_flag(flgs, TR_BLOWS) && (o_ptr->pval == 1) && (calc_arm_avgdamage(o_ptr) > 65))
+               {
+                       num = TRUE;
+               }
+               else if (have_flag(flgs, TR_BLOWS) && (o_ptr->pval == 2) && (calc_arm_avgdamage(o_ptr) > 52))
+               {
+                       num = TRUE;
+               }
+               else if (have_flag(flgs, TR_BLOWS) && (o_ptr->pval == 3) && (calc_arm_avgdamage(o_ptr) > 40))
+               {
+                       num = TRUE;
+               }
+               else if (calc_arm_avgdamage(o_ptr) > 75)
+               {
+                       num = TRUE;
+               }
+       }
+       return(num);
+}
+
+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];
+
+        if ((k_ptr->dd < o_ptr->dd) || (k_ptr->ds < o_ptr->ds))
+        {
+               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--;
+               }
+
+               msg_format_wizard(CHEAT_OBJECT, 
+                       _("ダイスが抑制されました。%dd%d -> %dd%d", "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;
+               }
+
+               msg_format_wizard(CHEAT_OBJECT,
+                       _("ダメージ修正が抑制されました。 %d -> %d", "Plus-Damage Supress %d -> %d"),
+                       pre_damage, o_ptr->to_d);
+
+               return 1;
+        }
+        return 0;
+}
\ No newline at end of file