OSDN Git Service

#37359 (2.2.0.48) ランダム・アーティファクトの*スレイ*による生成強化とそれに伴う対邪などの極端な汎用最終ダメージの抑止を追加。 / Boost...
[hengband/hengband.git] / src / artifact.c
index 3f58c1b..6ffd032 100644 (file)
@@ -1347,11 +1347,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 +1373,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 +1497,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);
@@ -1673,64 +1729,32 @@ static void get_random_name(char *return_name, bool armour, int power)
                                switch (power)
                                {
                                        case 0:
-#ifdef JP
-                                               filename = "a_cursed_j.txt";
-#else
-                                               filename = "a_cursed.txt";
-#endif
+                                               filename = _("a_cursed_j.txt", "a_cursed.txt");
                                                break;
                                        case 1:
-#ifdef JP
-                                               filename = "a_low_j.txt";
-#else
-                                               filename = "a_low.txt";
-#endif
+                                               filename = _("a_low_j.txt", "a_low.txt");
                                                break;
                                        case 2:
-#ifdef JP
-                                               filename = "a_med_j.txt";
-#else
-                                               filename = "a_med.txt";
-#endif
+                                               filename = _("a_med_j.txt", "a_med.txt");
                                                break;
                                        default:
-#ifdef JP
-                                               filename = "a_high_j.txt";
-#else
-                                               filename = "a_high.txt";
-#endif
+                                               filename = _("a_high_j.txt", "a_high.txt");
                                }
                                break;
                        default:
                                switch (power)
                                {
                                        case 0:
-#ifdef JP
-                                               filename = "w_cursed_j.txt";
-#else
-                                               filename = "w_cursed.txt";
-#endif
+                                               filename = _("w_cursed_j.txt", "w_cursed.txt");
                                                break;
                                        case 1:
-#ifdef JP
-                                               filename = "w_low_j.txt";
-#else
-                                               filename = "w_low.txt";
-#endif
+                                               filename = _("w_low_j.txt", "w_low.txt");
                                                break;
                                        case 2:
-#ifdef JP
-                                               filename = "w_med_j.txt";
-#else
-                                               filename = "w_med.txt";
-#endif
+                                               filename = _("w_med_j.txt", "w_med.txt");
                                                break;
                                        default:
-#ifdef JP
-                                               filename = "w_high_j.txt";
-#else
-                                               filename = "w_high.txt";
-#endif
+                                               filename = _("w_high_j.txt", "w_high.txt");
                                }
                }
 
@@ -1934,6 +1958,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);
@@ -2021,14 +2046,24 @@ bool create_artifact(object_type *o_ptr, bool a_scroll)
                else power_level = 3;
        }
 
+       /*平均対邪ダメージが一定以上なら11/12でダメージ抑制処理を行う*/
+       if(suppression_evil_dam(o_ptr) && !one_in_(12) && object_is_weapon)
+       {
+               msg_format("抑制処理");
+               do
+               {
+                       if (weakening_artifact(o_ptr) == 0)
+                       {
+                               break;
+                       }
+
+               } while (suppression_evil_dam(o_ptr));
+       }
+
        if (a_scroll)
        {
                char dummy_name[80] = "";
-#ifdef JP
-               cptr ask_msg = "このアーティファクトを何と名付けますか?";
-#else
-               cptr ask_msg = "What do you want to call the artifact? ";
-#endif
+               cptr ask_msg = _("このアーティファクトを何と名付けますか?", "What do you want to call the artifact? ");
 
                /* Identify it fully */
                object_aware(o_ptr);
@@ -2055,13 +2090,7 @@ bool create_artifact(object_type *o_ptr, bool a_scroll)
                                get_table_name_aux(dummy_name);
                        }
                }
-
-#ifdef JP
-               sprintf(new_name, "《%s》", dummy_name);
-#else
-               sprintf(new_name, "'%s'", dummy_name);
-#endif
-
+               sprintf(new_name, _("《%s》", "'%s'"), dummy_name);
                chg_virtue(V_INDIVIDUALISM, 2);
                chg_virtue(V_ENCHANT, 5);
        }
@@ -2087,7 +2116,7 @@ bool create_artifact(object_type *o_ptr, bool a_scroll)
                object_desc(o_name, o_ptr, 0);
 
 #ifdef JP
-               msg_format("パワー %d で 価値%ld のランダムアーティファクト生成 バイアスは「%s」:", max_powers, total_flags, artifact_bias_name[artifact_bias]);
+               msg_format("パワー %d で 価値%ld のランダムアーティファクト生成 バイアスは「%s」対邪%d:", max_powers, total_flags, artifact_bias_name[artifact_bias], calc_arm_avgdamage(o_ptr));
 #else
                msg_format("Random artifact generated '%s'. (Power:%d, Value:%ld) :", artifact_bias_name[artifact_bias], max_powers, total_flags);
 #endif
@@ -2421,8 +2450,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 */
@@ -2543,7 +2572,7 @@ bool activate_random_artifact(object_type *o_ptr)
                case ACT_CAST_BA_STAR:
                {
                        int num = damroll(5, 3);
-                       int y, x;
+                       int y = 0, x = 0;
                        int attempts;
                        msg_format(_("%sが稲妻で覆われた...","The %s is surrounded by lightning..."), name);
                        for (k = 0; k < num; k++)
@@ -2552,7 +2581,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;
 
@@ -2629,7 +2658,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;
                }
 
@@ -2730,14 +2759,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;
                }
 
@@ -2750,7 +2779,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)
@@ -2771,7 +2800,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)
@@ -2795,7 +2824,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..."));
@@ -2817,7 +2846,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)
@@ -2834,7 +2863,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;
                }
 
@@ -2844,7 +2873,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."));
@@ -3117,22 +3146,14 @@ bool activate_random_artifact(object_type *o_ptr)
 
                case ACT_LIGHT:
                {
-#ifdef JP
-                       msg_format("%sから澄んだ光があふれ出た...", name);
-#else
-                       msg_format("The %s wells with clear light...", name);
-#endif
+                       msg_format(_("%sから澄んだ光があふれ出た...", "The %s wells with clear light..."), name);
                        lite_area(damroll(2, 15), 3);
                        break;
                }
 
                case ACT_MAP_LIGHT:
                {
-#ifdef JP
-                       msg_print("眩しく輝いた...");
-#else
-                       msg_print("It shines brightly...");
-#endif
+                       msg_print(_("眩しく輝いた...", "It shines brightly..."));
                        map_area(DETECT_RAD_MAP);
                        lite_area(damroll(2, 15), 3);
                        break;
@@ -3140,24 +3161,15 @@ bool activate_random_artifact(object_type *o_ptr)
 
                case ACT_DETECT_ALL:
                {
-#ifdef JP
-                       msg_print("白く明るく輝いている...");
-                       msg_print("心にイメージが浮かんできた...");
-#else
-                       msg_print("It glows bright white...");
-                       msg_print("An image forms in your mind...");
-#endif
+                       msg_print(_("白く明るく輝いている...", "It glows bright white..."));
+                       msg_print(_("心にイメージが浮かんできた...", "An image forms in your mind..."));
                        detect_all(DETECT_RAD_DEFAULT);
                        break;
                }
 
                case ACT_DETECT_XTRA:
                {
-#ifdef JP
-                       msg_print("明るく輝いている...");
-#else
-                       msg_print("It glows brightly...");
-#endif
+                       msg_print(_("明るく輝いている...", "It glows brightly..."));
                        detect_all(DETECT_RAD_DEFAULT);
                        probing();
                        identify_fully(FALSE);
@@ -3166,11 +3178,7 @@ bool activate_random_artifact(object_type *o_ptr)
 
                case ACT_ID_FULL:
                {
-#ifdef JP
-                       msg_print("黄色く輝いている...");
-#else
-                       msg_print("It glows yellow...");
-#endif
+                       msg_print(_("黄色く輝いている...", "It glows yellow..."));
                        identify_fully(FALSE);
                        break;
                }
@@ -3183,22 +3191,14 @@ bool activate_random_artifact(object_type *o_ptr)
 
                case ACT_RUNE_EXPLO:
                {
-#ifdef JP
-                       msg_print("明るい赤色に輝いている...");
-#else
-                       msg_print("It glows bright red...");
-#endif
+                       msg_print(_("明るい赤色に輝いている...", "It glows bright red..."));
                        explosive_rune();
                        break;
                }
 
                case ACT_RUNE_PROT:
                {
-#ifdef JP
-                       msg_print("ブルーに明るく輝いている...");
-#else
-                       msg_print("It glows light blue...");
-#endif
+                       msg_print(_("ブルーに明るく輝いている...", "It glows light blue..."));
                        warding_glyph();
                        break;
                }
@@ -3211,22 +3211,14 @@ bool activate_random_artifact(object_type *o_ptr)
 
                case ACT_DEST_DOOR:
                {
-#ifdef JP
-                       msg_print("明るい赤色に輝いている...");
-#else
-                       msg_print("It glows bright red...");
-#endif
+                       msg_print(_("明るい赤色に輝いている...", "It glows bright red..."));
                        destroy_doors_touch();
                        break;
                }
 
                case ACT_STONE_MUD:
                {
-#ifdef JP
-                       msg_print("鼓動している...");
-#else
-                       msg_print("It pulsates...");
-#endif
+                       msg_print(_("鼓動している...", "It pulsates..."));
                        if (!get_aim_dir(&dir)) return FALSE;
                        wall_to_mud(dir, 20 + randint1(30));
                        break;
@@ -3240,22 +3232,14 @@ bool activate_random_artifact(object_type *o_ptr)
 
                case ACT_ALCHEMY:
                {
-#ifdef JP
-                       msg_print("明るい黄色に輝いている...");
-#else
-                       msg_print("It glows bright yellow...");
-#endif
+                       msg_print(_("明るい黄色に輝いている...", "It glows bright yellow..."));
                        (void)alchemy();
                        break;
                }
 
                case ACT_DIM_DOOR:
                {
-#ifdef JP
-                       msg_print("次元の扉が開いた。目的地を選んで下さい。");
-#else
-                       msg_print("You open a dimensional gate. Choose a destination.");
-#endif
+                       msg_print(_("次元の扉が開いた。目的地を選んで下さい。", "You open a dimensional gate. Choose a destination."));
                        if (!dimension_door()) return FALSE;
                        break;
                }
@@ -3263,51 +3247,33 @@ bool activate_random_artifact(object_type *o_ptr)
 
                case ACT_TELEPORT:
                {
-#ifdef JP
-                       msg_print("周りの空間が歪んでいる...");
-#else
-                       msg_print("It twists space around you...");
-#endif
+                       msg_print(_("周りの空間が歪んでいる...", "It twists space around you..."));
                        teleport_player(100, 0L);
                        break;
                }
 
                case ACT_RECALL:
                {
-#ifdef JP
-                       msg_print("やわらかな白色に輝いている...");
-#else
-                       msg_print("It glows soft white...");
-#endif
+                       msg_print(_("やわらかな白色に輝いている...", "It glows soft white..."));
                        if (!word_of_recall()) return FALSE;
                        break;
                }
 
                case ACT_JUDGE:
                {
-#ifdef JP
-                       msg_format("%sは赤く明るく光った!", name);
-#else
-                       msg_format("The %s flashes bright red!", name);
-#endif
+                       msg_format(_("%sは赤く明るく光った!", "The %s flashes bright red!"), name);
                        chg_virtue(V_KNOWLEDGE, 1);
                        chg_virtue(V_ENLIGHTEN, 1);
                        wiz_lite(FALSE);
-#ifdef JP
-                       msg_format("%sはあなたの体力を奪った...", name);
-                       take_hit(DAMAGE_LOSELIFE, damroll(3,8), "審判の宝石", -1);
-#else
-                       msg_format("The %s drains your vitality...", name);
-                       take_hit(DAMAGE_LOSELIFE, damroll(3, 8), "the Jewel of Judgement", -1);
-#endif
+                       
+                       msg_format(_("%sはあなたの体力を奪った...", "The %s drains your vitality..."), name);
+                       take_hit(DAMAGE_LOSELIFE, damroll(3,8), _("審判の宝石", "the Jewel of Judgement"), -1);
+                       
                        (void)detect_traps(DETECT_RAD_DEFAULT, TRUE);
                        (void)detect_doors(DETECT_RAD_DEFAULT);
                        (void)detect_stairs(DETECT_RAD_DEFAULT);
-#ifdef JP
-                       if (get_check("帰還の力を使いますか?"))
-#else
-                       if (get_check("Activate recall? "))
-#endif
+                       
+                       if (get_check(_("帰還の力を使いますか?", "Activate recall? ")))
                        {
                                (void)word_of_recall();
                        }
@@ -3318,11 +3284,7 @@ bool activate_random_artifact(object_type *o_ptr)
                case ACT_TELEKINESIS:
                {
                        if (!get_aim_dir(&dir)) return FALSE;
-#ifdef JP
-                       msg_format("%sを伸ばした。", name);
-#else
-                       msg_format("You stretched your %s.", name);
-#endif
+                       msg_format(_("%sを伸ばした。", "You stretched your %s."), name);
                        fetch(dir, 500, TRUE);
                        break;
                }
@@ -3332,11 +3294,7 @@ bool activate_random_artifact(object_type *o_ptr)
                        int i;
                        monster_type *m_ptr;
                        monster_race *r_ptr;
-#ifdef JP
-                       msg_print("奇妙な場所が頭の中に浮かんだ...");
-#else
-                       msg_print("Some strange places show up in your mind. And you see ...");
-#endif
+                       msg_print(_("奇妙な場所が頭の中に浮かんだ...", "Some strange places show up in your mind. And you see ..."));
                        /* Process the monsters (backwards) */
                        for (i = m_max - 1; i >= 1; i--)
                        {
@@ -3350,11 +3308,7 @@ bool activate_random_artifact(object_type *o_ptr)
 
                                if(r_ptr->flags1 & RF1_UNIQUE)
                                {
-#ifdef JP
-                                       msg_format("%s. ",r_name + r_ptr->name);
-#else
-                                       msg_format("%s. ",r_name + r_ptr->name);
-#endif
+                                       msg_format(_("%s. ", "%s. "),r_name + r_ptr->name);
                                }
                        }
                        break;
@@ -3374,11 +3328,7 @@ bool activate_random_artifact(object_type *o_ptr)
                                (void)stair_creation();
                                break;
                        default:
-#ifdef JP
-                               if (get_check("この階を去りますか?"))
-#else
-                               if (get_check("Leave this level? "))
-#endif
+                               if (get_check(_("この階を去りますか?", "Leave this level? ")))
                                {
                                        if (autosave_l) do_cmd_save_game(TRUE);
 
@@ -3391,18 +3341,10 @@ bool activate_random_artifact(object_type *o_ptr)
 
                case ACT_DISP_CURSE_XTRA:
                {
-#ifdef JP
-                       msg_format("%sが真実を照らし出す...", name);
-#else
-                       msg_format("The %s exhibits the truth...", name);
-#endif
+                       msg_format(_("%sが真実を照らし出す...", "The %s exhibits the truth..."), name);
                        if (remove_all_curse())
                        {
-#ifdef JP
-                               msg_print("誰かに見守られているような気がする。");
-#else
-                               msg_print("You feel as if someone is watching over you.");
-#endif
+                               msg_print(_("誰かに見守られているような気がする。", "You feel as if someone is watching over you."));
                        }
                        (void)probing();
                        break;
@@ -3410,33 +3352,21 @@ bool activate_random_artifact(object_type *o_ptr)
 
                case ACT_BRAND_FIRE_BOLTS:
                {
-#ifdef JP
-                       msg_format("%sが深紅に輝いた...", name);
-#else
-                       msg_format("Your %s glows deep red...", name);
-#endif
+                       msg_format(_("%sが深紅に輝いた...", "Your %s glows deep red..."), name);
                        (void)brand_bolts();
                        break;
                }
 
                case ACT_RECHARGE_XTRA:
                {
-#ifdef JP
-                       msg_format("%sが白く輝いた...", name);
-#else
-                       msg_format("The %s gleams with blinding light...", name);
-#endif
+                       msg_format(_("%sが白く輝いた...", "The %s gleams with blinding light..."), name);
                        if (!recharge(1000)) return FALSE;
                        break;
                }
 
                case ACT_LORE:
                {
-#ifdef JP
-                       msg_print("石が隠された秘密を写し出した...");
-#else
-                       msg_print("The stone reveals hidden mysteries...");
-#endif
+                       msg_print(_("石が隠された秘密を写し出した...", "The stone reveals hidden mysteries..."));
                        if (!ident_spell(FALSE)) return FALSE;
 
                        if (mp_ptr->spell_book)
@@ -3458,11 +3388,7 @@ bool activate_random_artifact(object_type *o_ptr)
                                        p_ptr->csp_frac = 0;
 
                                        /* Message */
-#ifdef JP
-                                       msg_print("石を制御できない!");
-#else
-                                       msg_print("You are too weak to control the stone!");
-#endif
+                                       msg_print(_("石を制御できない!", "You are too weak to control the stone!"));
                                        /* Hack -- Bypass free action */
                                        (void)set_paralyzed(p_ptr->paralyzed +
                                                randint1(5 * oops + 1));
@@ -3475,32 +3401,20 @@ bool activate_random_artifact(object_type *o_ptr)
                                /* Redraw mana */
                                p_ptr->redraw |= (PR_MANA);
                        }
-#ifdef JP
-                       take_hit(DAMAGE_LOSELIFE, damroll(1, 12), "危険な秘密", -1);
-#else
-                       take_hit(DAMAGE_LOSELIFE, damroll(1, 12), "perilous secrets", -1);
-#endif
+                       take_hit(DAMAGE_LOSELIFE, damroll(1, 12), _("危険な秘密", "perilous secrets"), -1);
                        /* Confusing. */
                        if (one_in_(5)) (void)set_confused(p_ptr->confused +
                                randint1(10));
 
                        /* Exercise a little care... */
                        if (one_in_(20))
-#ifdef JP
-                               take_hit(DAMAGE_LOSELIFE, damroll(4, 10), "危険な秘密", -1);
-#else
-                               take_hit(DAMAGE_LOSELIFE, damroll(4, 10), "perilous secrets", -1);
-#endif
+                               take_hit(DAMAGE_LOSELIFE, damroll(4, 10), _("危険な秘密", "perilous secrets"), -1);
                        break;
                }
 
                case ACT_SHIKOFUMI:
                {
-#ifdef JP
-                       msg_print("力強く四股を踏んだ。");
-#else
-                       msg_print("You stamp. (as if you are in a ring.)");
-#endif
+                       msg_print(_("力強く四股を踏んだ。", "You stamp. (as if you are in a ring.)"));
                        (void)set_afraid(0);
                        (void)set_hero(randint1(20) + 20, FALSE);
                        dispel_evil(p_ptr->lev * 3);
@@ -3556,7 +3470,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);
@@ -3586,24 +3500,20 @@ 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;
                }
 
                case ACT_TELEPORT_LEVEL:
                {
-#ifdef JP
-                       if (!get_check("本当に他の階にテレポートしますか?")) return FALSE;
-#else
-                       if (!get_check("Are you sure? (Teleport Level)")) return FALSE;
-#endif
+                       if (!get_check(_("本当に他の階にテレポートしますか?", "Are you sure? (Teleport Level)"))) return FALSE;
                        teleport_level(0);
                        break;
                }
@@ -3611,13 +3521,8 @@ bool activate_random_artifact(object_type *o_ptr)
                case ACT_STRAIN_HASTE:
                {
                        int t;
-#ifdef JP
-                       msg_format("%sはあなたの体力を奪った...", name);
-                       take_hit(DAMAGE_LOSELIFE, damroll(3, 8), "加速した疲労", -1);
-#else
-                       msg_format("The %s drains your vitality...", name);
-                       take_hit(DAMAGE_LOSELIFE, damroll(3, 8), "the strain of haste", -1);
-#endif
+                       msg_format(_("%sはあなたの体力を奪った...", "The %s drains your vitality..."), name);
+                       take_hit(DAMAGE_LOSELIFE, damroll(3, 8), _("加速した疲労", "the strain of haste"), -1);
                        t = 25 + randint1(25);
                        (void)set_fast(p_ptr->fast + t, FALSE);
                        break;
@@ -3628,28 +3533,20 @@ 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))
                        {
-#ifdef JP
-                               msg_print("そこは水辺ではない。");
-#else
-                               msg_print("There is no fishing place.");
-#endif
+                               msg_print(_("そこは水辺ではない。", "There is no fishing place."));
                                return FALSE;
                        }
                        else if (cave[y][x].m_idx)
                        {
                                char m_name[80];
                                monster_desc(m_name, &m_list[cave[y][x].m_idx], 0);
-#ifdef JP
-                               msg_format("%sが邪魔だ!", m_name);
-#else
-                               msg_format("%^s is stand in your way.", m_name);
-#endif
-                               energy_use = 0;
+                               msg_format(_("%sが邪魔だ!", "%^s is stand in your way."), m_name);
+                               p_ptr->energy_use = 0;
                                return FALSE;
                        }
                        set_action(ACTION_FISH);
@@ -3661,27 +3558,18 @@ bool activate_random_artifact(object_type *o_ptr)
                {
                        int count = 0, i;
                        monster_type *m_ptr;
-#ifndef JP
                        cptr kakusan = "";
-#endif
-                       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))
                        {
-#ifdef JP
-                               msg_print("『助さん』が現れた。");
-#else
-                               msg_print("Suke-san apperars.");
+                               msg_print(_("『助さん』が現れた。", "Suke-san apperars."));
                                kakusan = "Suke-san";
-#endif
                                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))
                        {
-#ifdef JP
-                               msg_print("『格さん』が現れた。");
-#else
-                               msg_print("Kaku-san appears.");
+                               msg_print(_("『格さん』が現れた。", "Kaku-san appears."));
                                kakusan = "Kaku-san";
-#endif
                                count++;
                        }
                        if (!count)
@@ -3691,8 +3579,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;
                                }
@@ -3700,11 +3588,8 @@ bool activate_random_artifact(object_type *o_ptr)
 
                        if (count)
                        {
-#ifdef JP
-                               msg_print("「者ども、ひかえおろう!!!このお方をどなたとこころえる。」");
-#else
-                               msg_format("%^s says 'WHO do you think this person is! Bow your head, down your knees!'", kakusan);
-#endif
+                               msg_format(_("「者ども、ひかえおろう!!!このお方をどなたとこころえる。」", 
+                                                       "%^s says 'WHO do you think this person is! Bow your head, down your knees!'"), kakusan);
                                sukekaku = TRUE;
                                stun_monsters(120);
                                confuse_monsters(120);
@@ -3714,11 +3599,7 @@ bool activate_random_artifact(object_type *o_ptr)
                        }
                        else
                        {
-#ifdef JP
-                               msg_print("しかし、何も起きなかった。");
-#else
-                               msg_print("Nothing happen.");
-#endif
+                               msg_print(_("しかし、何も起きなかった。", "Nothing happen."));
                        }
                        break;
                }
@@ -3727,25 +3608,13 @@ bool activate_random_artifact(object_type *o_ptr)
                {
                        /* Only for Muramasa */
                        if (o_ptr->name1 != ART_MURAMASA) return FALSE;
-#ifdef JP
-                       if (get_check("本当に使いますか?"))
-#else
-                       if (get_check("Are you sure?!"))
-#endif
+                       if (get_check(_("本当に使いますか?", "Are you sure?!")))
                        {
-#ifdef JP
-                               msg_print("村正が震えた...");
-#else
-                               msg_print("The Muramasa pulsates...");
-#endif
+                               msg_print(_("村正が震えた...", "The Muramasa pulsates..."));
                                do_inc_stat(A_STR);
                                if (one_in_(2))
                                {
-#ifdef JP
-                                       msg_print("村正は壊れた!");
-#else
-                                       msg_print("The Muramasa is destroyed!");
-#endif
+                                       msg_print(_("村正は壊れた!", "The Muramasa is destroyed!"));
                                        curse_weapon_object(TRUE, o_ptr);
                                }
                        }
@@ -3756,11 +3625,7 @@ bool activate_random_artifact(object_type *o_ptr)
                {
                        /* Only for Bloody Moon */
                        if (o_ptr->name1 != ART_BLOOD) return FALSE;
-#ifdef JP
-                       msg_print("鎌が明るく輝いた...");
-#else
-                       msg_print("Your scythe glows brightly!");
-#endif
+                       msg_print(_("鎌が明るく輝いた...", "Your scythe glows brightly!"));
                        get_bloody_moon_flags(o_ptr);
                        if (p_ptr->prace == RACE_ANDROID) calc_android_exp();
                        p_ptr->update |= (PU_BONUS | PU_HP);
@@ -3777,17 +3642,13 @@ bool activate_random_artifact(object_type *o_ptr)
                        /* Only for Crimson */
                        if (o_ptr->name1 != ART_CRIMSON) return FALSE;
 
-#ifdef JP
-                       msg_print("せっかくだから『クリムゾン』をぶっぱなすぜ!");
-#else
-                       msg_print("I'll fire CRIMSON! SEKKAKUDAKARA!");
-#endif
+                       msg_print(_("せっかくだから『クリムゾン』をぶっぱなすぜ!", "I'll fire CRIMSON! SEKKAKUDAKARA!"));
 
                        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())
@@ -3815,11 +3676,7 @@ bool activate_random_artifact(object_type *o_ptr)
 
                default:
                {
-#ifdef JP
-                       msg_format("Unknown activation effect: %d.", act_ptr->index);
-#else
-                       msg_format("Unknown activation effect: %d.", act_ptr->index);
-#endif
+                       msg_format(_("Unknown activation effect: %d.", "Unknown activation effect: %d."), act_ptr->index);
                        return FALSE;
                }
        }
@@ -4002,7 +3859,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)
 {
@@ -4053,3 +3909,128 @@ 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 = 0;
+       dam = (o_ptr->dd * o_ptr->ds + o_ptr->dd) / 2;
+
+       if(cheat_xtra) msg_format("素平均%d ", dam);
+       if (have_flag(flgs, TR_KILL_EVIL))
+       {
+
+               if (have_flag(flgs,TR_FORCE_WEAPON))
+               {
+                       dam = dam * 1.5 + (o_ptr->dd * o_ptr->ds + o_ptr->dd);
+               }
+               else
+               {
+                       dam = dam * 3.5;
+               }
+               if (cheat_xtra) msg_format("X邪計算後%d ", dam);
+       }
+       else if (!have_flag(flgs, TR_KILL_EVIL) &&  have_flag(flgs, TR_SLAY_EVIL))
+       {
+               
+               if (have_flag(flgs, TR_FORCE_WEAPON))
+               {
+                       dam = dam * 1.5 + (o_ptr->dd * o_ptr->ds + o_ptr->dd);
+               }
+               else
+               {
+                       dam = dam * 2;
+               }
+               if (cheat_xtra) msg_format("/邪計算後%d ", dam);
+       }
+
+
+       if (have_flag(flgs, TR_VORPAL))
+       {
+               dam = dam * 1.21;
+               if (cheat_xtra) msg_format("/切計算後%d ", dam);
+       }
+
+       dam = dam + o_ptr->to_d;
+       if (cheat_xtra) msg_format("最終対邪%d ", dam);
+       return(dam);
+}
+
+int suppression_evil_dam(object_type *o_ptr)
+{
+       int num = 0;
+       u32b flgs[TR_FLAG_SIZE];
+       object_flags(o_ptr, flgs);
+
+       if (o_ptr->art_flags, TR_VAMPIRIC)
+       {
+               if(have_flag(flgs, TR_BLOWS) && (o_ptr->pval == 1) && (calc_arm_avgdamage(o_ptr) > 52))
+               {
+                       num = 1;
+               }
+               else if(have_flag(flgs, TR_BLOWS) && (o_ptr->pval == 2) && (calc_arm_avgdamage(o_ptr) > 43))
+               {
+                       num = 1;
+               }
+               else if( have_flag(flgs, TR_BLOWS) && (o_ptr->pval == 3) && (calc_arm_avgdamage(o_ptr) > 33))
+               {
+                       num = 1;
+               }
+               else if (calc_arm_avgdamage(o_ptr) > 63)
+               {
+                       num = 1;
+               }
+       }
+       else
+       {
+               if (have_flag(flgs, TR_BLOWS) && (o_ptr->pval == 1) && (calc_arm_avgdamage(o_ptr) > 65))
+               {
+                       num = 1;
+               }
+               else if (have_flag(flgs, TR_BLOWS) && (o_ptr->pval == 2) && (calc_arm_avgdamage(o_ptr) > 52))
+               {
+               num = 1;
+               }
+               else if (have_flag(flgs, TR_BLOWS) && (o_ptr->pval == 3) && (calc_arm_avgdamage(o_ptr) > 40))
+               {
+               num = 1;
+               }
+               else if (calc_arm_avgdamage(o_ptr) > 75)
+               {
+               num = 1;
+               }
+       }
+       return(num);
+}
+
+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_info[k_idx].dd > o_ptr->dd) || (k_info[k_idx].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 > 11)
+        {
+                o_ptr->to_d = o_ptr->to_d - damroll(1, 6);
+                if (o_ptr->to_d < 10)
+                {
+                        o_ptr->to_d = 10;
+                }
+                return 1;
+        }
+        return 0;
+}
\ No newline at end of file