OSDN Git Service

New Magic-Eater's class power, 'Powerful Activation' is added
[hengband/hengband.git] / src / artifact.c
index f88555d..07c800d 100644 (file)
@@ -199,6 +199,8 @@ static void curse_artifact(object_type * o_ptr)
        if (one_in_(3)) add_flag(o_ptr->art_flags, TR_TY_CURSE);
        if (one_in_(2)) add_flag(o_ptr->art_flags, TR_AGGRAVATE);
        if (one_in_(3)) add_flag(o_ptr->art_flags, TR_DRAIN_EXP);
+       if (one_in_(6)) add_flag(o_ptr->art_flags, TR_ADD_L_CURSE);
+       if (one_in_(9)) add_flag(o_ptr->art_flags, TR_ADD_H_CURSE);
        if (one_in_(2)) add_flag(o_ptr->art_flags, TR_TELEPORT);
        else if (one_in_(3)) add_flag(o_ptr->art_flags, TR_NO_TELE);
 
@@ -1973,11 +1975,64 @@ bool create_artifact(object_type *o_ptr, bool a_scroll)
 }
 
 
+const activation_type* find_activation_info(const object_type *o_ptr)
+{
+       const activation_type* p;
+
+       for (p = activation_info; p->flag != NULL; ++ p) {
+               if (p->index == o_ptr->xtra2)
+               {
+                       return p;
+               }
+       }
+
+       return NULL;
+}
+
+
+/* Dragon breath activation */
+static bool activate_dragon_breath(object_type *o_ptr)
+{
+       u32b flgs[4]; /* for resistance flags */
+       int type[20];
+       cptr name[20];
+       int i, dir, t, n = 0;
+
+       if (!get_aim_dir(&dir)) return FALSE;
+
+       object_flags(o_ptr, flgs);
+
+       for (i = 0; dragonbreath_info[i].flag != 0; i++)
+       {
+               if (have_flag(flgs, dragonbreath_info[i].flag))
+               {
+                       type[n] = dragonbreath_info[i].type;
+                       name[n] = dragonbreath_info[i].name;
+                       n++;
+               }
+       }
+
+       /* Paranoia */
+       if (n == 0) return FALSE;
+
+       /* Stop speaking */
+       if (music_singing_any()) stop_singing();
+       if (hex_spelling_any()) stop_hex_spell_all();
+
+       t = randint0(n);
+       msg_format(_("¤¢¤Ê¤¿¤Ï%s¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", "You breathe %s."), name[t]);
+       fire_ball(type[t], dir, 250, -4);
+
+       return TRUE;
+}
+
+
 bool activate_random_artifact(object_type *o_ptr)
 {
        int plev = p_ptr->lev;
        int k, dir, dummy = 0;
        cptr name = k_name + k_info[o_ptr->k_idx].name;
+       const activation_type* act_ptr;
 
        /* Paranoia */
        if (!o_ptr->xtra2) return FALSE;
@@ -1993,8 +2048,7 @@ bool activate_random_artifact(object_type *o_ptr)
 #else
                        msg_print("A line of sunlight appears.");
 #endif
-                       (void)lite_line(dir);
-                       o_ptr->timeout = 10;
+                       (void)lite_line(dir, damroll(6, 8));
                        break;
                }
 
@@ -2007,7 +2061,6 @@ bool activate_random_artifact(object_type *o_ptr)
 #endif
                        if (!get_aim_dir(&dir)) return FALSE;
                        fire_bolt(GF_MISSILE, dir, damroll(2, 6));
-                       o_ptr->timeout = 2;
                        break;
                }
 
@@ -2020,7 +2073,6 @@ bool activate_random_artifact(object_type *o_ptr)
 #endif
                        if (!get_aim_dir(&dir)) return FALSE;
                        fire_ball(GF_POIS, dir, 12, 3);
-                       o_ptr->timeout = randint0(4) + 4;
                        break;
                }
 
@@ -2033,7 +2085,6 @@ bool activate_random_artifact(object_type *o_ptr)
 #endif
                        if (!get_aim_dir(&dir)) return FALSE;
                        fire_bolt(GF_ELEC, dir, damroll(4, 8));
-                       o_ptr->timeout = randint0(5) + 5;
                        break;
                }
 
@@ -2046,7 +2097,6 @@ bool activate_random_artifact(object_type *o_ptr)
 #endif
                        if (!get_aim_dir(&dir)) return FALSE;
                        fire_bolt(GF_ACID, dir, damroll(5, 8));
-                       o_ptr->timeout = randint0(6) + 6;
                        break;
                }
 
@@ -2059,7 +2109,6 @@ bool activate_random_artifact(object_type *o_ptr)
 #endif
                        if (!get_aim_dir(&dir)) return FALSE;
                        fire_bolt(GF_COLD, dir, damroll(6, 8));
-                       o_ptr->timeout = randint0(7) + 7;
                        break;
                }
 
@@ -2072,7 +2121,6 @@ bool activate_random_artifact(object_type *o_ptr)
 #endif
                        if (!get_aim_dir(&dir)) return FALSE;
                        fire_bolt(GF_FIRE, dir, damroll(9, 8));
-                       o_ptr->timeout = randint0(8) + 8;
                        break;
                }
 
@@ -2085,7 +2133,6 @@ bool activate_random_artifact(object_type *o_ptr)
 #endif
                        if (!get_aim_dir(&dir)) return FALSE;
                        fire_ball(GF_COLD, dir, 48, 2);
-                       o_ptr->timeout = randint0(6) + 6;
                        break;
                }
 
@@ -2098,20 +2145,18 @@ bool activate_random_artifact(object_type *o_ptr)
 #endif
                        if (!get_aim_dir(&dir)) return FALSE;
                        fire_ball(GF_FIRE, dir, 72, 2);
-                       o_ptr->timeout = randint0(9) + 9;
                        break;
                }
 
                case ACT_DRAIN_1:
                {
 #ifdef JP
-                       msg_print("¤½¤ì¤Ï¹õ¤¯µ±¤¤¤¿...");
+                       msg_format("¤¢¤Ê¤¿¤Ï%s¤ËŨ¤òÄù¤á»¦¤¹¤è¤¦Ì¿¤¸¤¿¡£", name);
 #else
-                       msg_print("It glows black...");
+                       msg_format("You order the %s to strangle your opponent.", name);
 #endif
                        if (!get_aim_dir(&dir)) return FALSE;
-                       if (drain_life(dir, 90))
-                       o_ptr->timeout = 70;
+                       if (drain_life(dir, 100))
                        break;
                }
 
@@ -2124,7 +2169,6 @@ bool activate_random_artifact(object_type *o_ptr)
 #endif
                        if (!get_aim_dir(&dir)) return FALSE;
                        fire_ball(GF_COLD, dir, 100, 2);
-                       o_ptr->timeout = randint0(12) + 12;
                        break;
                }
 
@@ -2137,7 +2181,6 @@ bool activate_random_artifact(object_type *o_ptr)
 #endif
                        if (!get_aim_dir(&dir)) return FALSE;
                        fire_ball(GF_ELEC, dir, 100, 3);
-                       o_ptr->timeout = randint0(12) + 12;
                        break;
                }
 
@@ -2150,7 +2193,6 @@ bool activate_random_artifact(object_type *o_ptr)
 #endif
                        if (!get_aim_dir(&dir)) return FALSE;
                        fire_ball(GF_FIRE, dir, 120, 3);
-                       o_ptr->timeout = 15;
                        break;
                }
 
@@ -2163,7 +2205,6 @@ bool activate_random_artifact(object_type *o_ptr)
 #endif
                        if (!get_aim_dir(&dir)) return FALSE;
                        drain_life(dir, 120);
-                       o_ptr->timeout = 400;
                        break;
                }
 
@@ -2175,7 +2216,6 @@ bool activate_random_artifact(object_type *o_ptr)
                                if (drain_life(dir, 50))
                                hp_player(50);
                        }
-                       o_ptr->timeout = 400;
                        break;
                }
 
@@ -2188,7 +2228,6 @@ bool activate_random_artifact(object_type *o_ptr)
 #endif
                        if (!get_aim_dir(&dir)) return FALSE;
                        fire_bolt(GF_ARROW, dir, 150);
-                       o_ptr->timeout = randint0(90) + 90;
                        break;
                }
 
@@ -2201,7 +2240,6 @@ bool activate_random_artifact(object_type *o_ptr)
 #endif
                        if (!get_aim_dir(&dir)) return FALSE;
                        fire_ball(GF_FIRE, dir, 300, 3);
-                       o_ptr->timeout = randint0(225) + 225;
                        break;
                }
 
@@ -2214,7 +2252,6 @@ bool activate_random_artifact(object_type *o_ptr)
 #endif
                        if (!get_aim_dir(&dir)) return FALSE;
                        fire_ball(GF_COLD, dir, 400, 3);
-                       o_ptr->timeout = randint0(325) + 325;
                        break;
                }
 
@@ -2227,7 +2264,6 @@ bool activate_random_artifact(object_type *o_ptr)
 #endif
                        if (!get_aim_dir(&dir)) return FALSE;
                        fire_ball(GF_ELEC, dir, 500, 3);
-                       o_ptr->timeout = randint0(425) + 425;
                        break;
                }
 
@@ -2252,7 +2288,6 @@ bool activate_random_artifact(object_type *o_ptr)
                                                py_attack(y, x, 0);
                                }
                        }
-                       o_ptr->timeout = 250;
                        break;
                }
 
@@ -2264,8 +2299,6 @@ bool activate_random_artifact(object_type *o_ptr)
                                if (drain_life(dir, 100))
                                hp_player(100);
                        }
-
-                       o_ptr->timeout = 400;
                        break;
                }
 
@@ -2278,7 +2311,6 @@ bool activate_random_artifact(object_type *o_ptr)
                        msg_print("It glows in scintillating colours...");
 #endif
                        call_chaos();
-                       o_ptr->timeout = 350;
                        break;
                }
 
@@ -2291,7 +2323,6 @@ bool activate_random_artifact(object_type *o_ptr)
                        msg_print("You launch a rocket!");
 #endif
                        fire_ball(GF_ROCKET, dir, 250 + plev*3, 2);
-                       o_ptr->timeout = 400;
                        break;
                }
 
@@ -2303,7 +2334,18 @@ bool activate_random_artifact(object_type *o_ptr)
                        msg_print("It floods the area with goodness...");
 #endif
                        dispel_evil(p_ptr->lev * 5);
-                       o_ptr->timeout = randint0(100) + 100;
+                       break;
+               }
+
+               case ACT_BA_MISS_3:
+               {
+                       if (!get_aim_dir(&dir)) return FALSE;
+#ifdef JP
+                       msg_print("¤¢¤Ê¤¿¤Ï¥¨¥ì¥á¥ó¥È¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
+#else
+                       msg_print("You breathe the elements.");
+#endif
+                       fire_ball(GF_MISSILE, dir, 300, -4);
                        break;
                }
 
@@ -2315,7 +2357,6 @@ bool activate_random_artifact(object_type *o_ptr)
                        msg_print("It floods the area with evil...");
 #endif
                        dispel_good(p_ptr->lev * 5);
-                       o_ptr->timeout = randint0(100) + 100;
                        break;
                }
 
@@ -2328,7 +2369,6 @@ bool activate_random_artifact(object_type *o_ptr)
 #endif
                        if (!get_aim_dir(&dir)) return FALSE;
                        fire_bolt(GF_ARROW, dir, 150);
-                       o_ptr->timeout = randint0(90) + 90;
                        break;
                }
 
@@ -2341,7 +2381,6 @@ bool activate_random_artifact(object_type *o_ptr)
 #endif
                        if (!get_aim_dir(&dir)) return FALSE;
                        fire_ball(GF_WATER, dir, 200, 3);
-                       o_ptr->timeout = 250;
                        break;
                }
 
@@ -2354,7 +2393,6 @@ bool activate_random_artifact(object_type *o_ptr)
 #endif
                        if (!get_aim_dir(&dir)) return FALSE;
                        fire_ball(GF_DARK, dir, 250, 4);
-                       o_ptr->timeout = randint0(150) + 150;
                        break;
                }
 
@@ -2366,12 +2404,76 @@ bool activate_random_artifact(object_type *o_ptr)
                        msg_format("The %s glows pale...", name);
 #endif
                        if (!get_aim_dir(&dir)) return FALSE;
-                       fire_ball(GF_MANA, dir, 400, 4);
-                       o_ptr->timeout = randint0(250) + 250;
+                       fire_ball(GF_MANA, dir, 250, 4);
                        break;
                }
 
-               case ACT_BA_MISS_3:
+               case ACT_PESTICIDE:
+               {
+#ifdef JP
+                       msg_print("¤¢¤Ê¤¿¤Ï³²Ãî¤ò°ìÁݤ·¤¿¡£");
+#else
+                       msg_print("You exterminate small life.");
+#endif
+                       (void)dispel_monsters(4);
+                       break;
+               }
+
+               case ACT_BLINDING_LIGHT:
+               {
+#ifdef JP
+                       msg_format("%s¤¬âÁ¤·¤¤¸÷¤Çµ±¤¤¤¿...", name);
+#else
+                       msg_format("The %s gleams with blinding light...", name);
+#endif
+                       fire_ball(GF_LITE, 0, 300, 6);
+                       confuse_monsters(3 * p_ptr->lev / 2);
+                       break;
+               }
+
+               case ACT_BIZARRE:
+               {
+#ifdef JP
+                       msg_format("%s¤Ï¼¿¹õ¤Ëµ±¤¤¤¿...", name);
+#else
+                       msg_format("The %s glows intensely black...", name);
+#endif
+                       if (!get_aim_dir(&dir)) return FALSE;
+                       ring_of_power(dir);
+                       break;
+               }
+
+               case ACT_CAST_BA_STAR:
+               {
+                       int num = damroll(5, 3);
+                       int y, x;
+                       int attempts;
+#ifdef JP
+                       msg_format("%s¤¬°ðºÊ¤Çʤ¤ï¤ì¤¿...", name);
+#else
+                       msg_format("The %s is surrounded by lightning...", name);
+#endif
+                       for (k = 0; k < num; k++)
+                       {
+                               attempts = 1000;
+
+                               while (attempts--)
+                               {
+                                       scatter(&y, &x, py, px, 4, 0);
+
+                                       if (!cave_have_flag_bold(y, x, FF_PROJECT)) continue;
+
+                                       if (!player_bold(y, x)) break;
+                               }
+
+                               project(0, 3, y, x, 150, GF_ELEC,
+                                                       (PROJECT_THRU | PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL), -1);
+                       }
+
+                       break;
+               }
+
+               case ACT_BLADETURNER:
                {
                        if (!get_aim_dir(&dir)) return FALSE;
 #ifdef JP
@@ -2379,8 +2481,53 @@ bool activate_random_artifact(object_type *o_ptr)
 #else
                        msg_print("You breathe the elements.");
 #endif
-                       fire_ball(GF_MISSILE, dir, 300, 4);
-                       o_ptr->timeout = 500;
+                       fire_ball(GF_MISSILE, dir, 300, -4);
+#ifdef JP
+                       msg_print("³»¤¬ÍÍ¡¹¤Ê¿§¤Ëµ±¤¤¤¿...");
+#else
+                       msg_print("Your armor glows many colours...");
+#endif
+                       (void)set_afraid(0);
+                       (void)set_hero(randint1(50) + 50, FALSE);
+                       (void)hp_player(10);
+                       (void)set_blessed(randint1(50) + 50, FALSE);
+                       (void)set_oppose_acid(randint1(50) + 50, FALSE);
+                       (void)set_oppose_elec(randint1(50) + 50, FALSE);
+                       (void)set_oppose_fire(randint1(50) + 50, FALSE);
+                       (void)set_oppose_cold(randint1(50) + 50, FALSE);
+                       (void)set_oppose_pois(randint1(50) + 50, FALSE);
+                       break;
+               }
+               case ACT_BA_ACID_1:
+               {
+                       if (!get_aim_dir(&dir)) return FALSE;
+                       fire_ball(GF_ACID, dir, 100, 2);
+                       break;
+               }
+
+               case ACT_BR_FIRE:
+               {
+                       if (!get_aim_dir(&dir)) return FALSE;
+                       fire_ball(GF_FIRE, dir, 200, -2);
+                       if ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_FLAMES))
+                       {
+                               (void)set_oppose_fire(randint1(20) + 20, FALSE);
+                       }
+                       break;
+               }
+               case ACT_BR_COLD:
+               {
+                       if (!get_aim_dir(&dir)) return FALSE;
+                       fire_ball(GF_COLD, dir, 200, -2);
+                       if ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_ICE))
+                       {
+                               (void)set_oppose_cold(randint1(20) + 20, FALSE);
+                       }
+                       break;
+               }
+               case ACT_BR_DRAGON:
+               {
+                       if (!activate_dragon_breath(o_ptr)) return FALSE;
                        break;
                }
 
@@ -2395,7 +2542,6 @@ bool activate_random_artifact(object_type *o_ptr)
 #endif
                        if (!get_aim_dir(&dir)) return FALSE;
                        confuse_monster(dir, 20);
-                       o_ptr->timeout = 15;
                        break;
                }
 
@@ -2407,21 +2553,18 @@ bool activate_random_artifact(object_type *o_ptr)
                        msg_print("It glows deep blue...");
 #endif
                        sleep_monsters_touch();
-                       o_ptr->timeout = 55;
                        break;
                }
 
                case ACT_QUAKE:
                {
-                       earthquake(py, px, 10);
-                       o_ptr->timeout = 50;
+                       earthquake(py, px, 5);
                        break;
                }
 
                case ACT_TERROR:
                {
                        turn_monsters(40 + p_ptr->lev);
-                       o_ptr->timeout = 3 * (p_ptr->lev + 10);
                        break;
                }
 
@@ -2429,7 +2572,6 @@ bool activate_random_artifact(object_type *o_ptr)
                {
                        if (!get_aim_dir(&dir)) return FALSE;
                        (void)fire_beam(GF_AWAY_ALL, dir, plev);
-                       o_ptr->timeout = 200;
                        break;
                }
 
@@ -2443,7 +2585,6 @@ bool activate_random_artifact(object_type *o_ptr)
                                msg_print("The power of the artifact banishes evil!");
 #endif
                        }
-                       o_ptr->timeout = 250 + randint1(250);
                        break;
                }
 
@@ -2455,7 +2596,6 @@ bool activate_random_artifact(object_type *o_ptr)
                        msg_print("It glows deep blue...");
 #endif
                        (void)symbol_genocide(200, TRUE);
-                       o_ptr->timeout = 500;
                        break;
                }
 
@@ -2467,7 +2607,41 @@ bool activate_random_artifact(object_type *o_ptr)
                        msg_print("It lets out a long, shrill note...");
 #endif
                        (void)mass_genocide(200, TRUE);
-                       o_ptr->timeout = 1000;
+                       break;
+               }
+
+               case ACT_SCARE_AREA:
+               {
+                       if (music_singing_any()) stop_singing();
+                       if (hex_spelling_any()) stop_hex_spell_all();
+#ifdef JP
+                       msg_print("¤¢¤Ê¤¿¤ÏÎ϶¯¤¤ÆÍÉ÷¤ò¿á¤­ÌĤ餷¤¿¡£¼þ°Ï¤ÎŨ¤¬¿Ì¤¨¾å¤Ã¤Æ¤¤¤ë!");
+#else
+                       msg_print("You wind a mighty blast; your enemies tremble!");
+#endif
+                       (void)turn_monsters((3 * p_ptr->lev / 2) + 10);
+                       break;
+               }
+
+               case ACT_AGGRAVATE:
+               {
+                       if (o_ptr->name1 == ART_HYOUSIGI)
+                       {
+#ifdef JP
+                               msg_print("Çï»ÒÌÚ¤òÂǤä¿¡£");
+#else
+                               msg_print("You beat Your wooden clappers.");
+#endif
+                       }
+                       else
+                       {
+#ifdef JP
+                               msg_format("%s¤ÏÉÔ²÷¤Êʪ²»¤òΩ¤Æ¤¿¡£", name);
+#else
+                               msg_format("The %s sounds an unpleasant noise.", name);
+#endif
+                       }
+                       aggravate_monsters(0);
                        break;
                }
 
@@ -2477,7 +2651,6 @@ bool activate_random_artifact(object_type *o_ptr)
                {
                        if (!get_aim_dir(&dir)) return FALSE;
                        (void)charm_animal(dir, plev * 2);
-                       o_ptr->timeout = 200;
                        break;
                }
 
@@ -2485,7 +2658,6 @@ bool activate_random_artifact(object_type *o_ptr)
                {
                        if (!get_aim_dir(&dir)) return FALSE;
                        (void)control_one_undead(dir, plev * 2);
-                       o_ptr->timeout = 333;
                        break;
                }
 
@@ -2493,28 +2665,24 @@ bool activate_random_artifact(object_type *o_ptr)
                {
                        if (!get_aim_dir(&dir)) return FALSE;
                        (void)charm_monster(dir, plev * 2);
-                       o_ptr->timeout = 400;
                        break;
                }
 
                case ACT_CHARM_ANIMALS:
                {
                        (void)charm_animals(plev * 2);
-                       o_ptr->timeout = 500;
                        break;
                }
 
                case ACT_CHARM_OTHERS:
                {
                        charm_monsters(plev * 2);
-                       o_ptr->timeout = 750;
                        break;
                }
 
                case ACT_SUMMON_ANIMAL:
                {
                        (void)summon_specific(-1, py, px, plev, SUMMON_ANIMAL_RANGER, (PM_ALLOW_GROUP | PM_FORCE_PET));
-                       o_ptr->timeout = 200 + randint1(300);
                        break;
                }
 
@@ -2526,7 +2694,6 @@ bool activate_random_artifact(object_type *o_ptr)
                        msg_print("You summon a phantasmal servant.");
 #endif
                        (void)summon_specific(-1, py, px, dun_level, SUMMON_PHANTOM, (PM_ALLOW_GROUP | PM_FORCE_PET));
-                       o_ptr->timeout = 200 + randint1(200);
                        break;
                }
 
@@ -2560,7 +2727,6 @@ bool activate_random_artifact(object_type *o_ptr)
 #endif
                        }
 
-                       o_ptr->timeout = 750;
                        break;
                }
 
@@ -2594,7 +2760,6 @@ bool activate_random_artifact(object_type *o_ptr)
 #endif
                        }
 
-                       o_ptr->timeout = 666 + randint1(333);
                        break;
                }
 
@@ -2631,7 +2796,6 @@ bool activate_random_artifact(object_type *o_ptr)
 #endif
                        }
 
-                       o_ptr->timeout = 666 + randint1(333);
                        break;
                }
 
@@ -2661,17 +2825,69 @@ bool activate_random_artifact(object_type *o_ptr)
 
                        }
 
-                       o_ptr->timeout = 300 + randint1(150);
+                       break;
+               }
+
+               case ACT_SUMMON_DAWN:
+               {
+#ifdef JP
+                       msg_print("¶Ç¤Î»ÕÃĤò¾¤´­¤·¤¿¡£");
+#else
+                       msg_print("You summon the Legion of the Dawn.");
+#endif
+                       (void)summon_specific(-1, py, px, dun_level, SUMMON_DAWN, (PM_ALLOW_GROUP | PM_FORCE_PET));
+                       break;
+               }
+
+               case ACT_SUMMON_OCTOPUS:
+               {
+                       u32b mode = PM_ALLOW_GROUP;
+                       bool pet = !one_in_(5);
+                       if (pet) mode |= PM_FORCE_PET;
+
+                       if (summon_named_creature(0, py, px, MON_JIZOTAKO, mode))
+                       {
+                               if (pet)
+#ifdef JP
+                                       msg_print("Âý¤¬¤¢¤Ê¤¿¤Î²¼ËͤȤ·¤Æ½Ð¸½¤·¤¿¡£");
+#else
+                                       msg_print("A group of octopuses appear as your servant.");
+#endif
+                               else
+#ifdef JP
+                                       msg_print("Âý¤Ï¤¢¤Ê¤¿¤òâˤó¤Ç¤¤¤ë¡ª");
+#else
+                                       msg_print("A group of octopuses appear as your enemy!");
+#endif
+                       }
+
                        break;
                }
 
                /* Activate for healing */
 
+               case ACT_CHOIR_SINGS:
+               {
+#ifdef JP
+                       msg_print("Å·¹ñ¤Î²Î¤¬Ê¹¤³¤¨¤ë...");
+#else
+                       msg_print("A heavenly choir sings...");
+#endif
+                       (void)set_poisoned(0);
+                       (void)set_cut(0);
+                       (void)set_stun(0);
+                       (void)set_confused(0);
+                       (void)set_blind(0);
+                       (void)set_afraid(0);
+                       (void)set_hero(randint1(25) + 25, FALSE);
+                       (void)hp_player(777);
+                       break;
+               }
+
                case ACT_CURE_LW:
                {
                        (void)set_afraid(0);
                        (void)hp_player(30);
-                       o_ptr->timeout = 10;
                        break;
                }
 
@@ -2684,7 +2900,6 @@ bool activate_random_artifact(object_type *o_ptr)
 #endif
                        hp_player(damroll(4, 8));
                        (void)set_cut((p_ptr->cut / 2) - 50);
-                       o_ptr->timeout = randint0(3) + 3;
                        break;
                }
 
@@ -2697,7 +2912,6 @@ bool activate_random_artifact(object_type *o_ptr)
 #endif
                        (void)set_afraid(0);
                        (void)set_poisoned(0);
-                       o_ptr->timeout = 5;
                        break;
                }
 
@@ -2709,7 +2923,6 @@ bool activate_random_artifact(object_type *o_ptr)
                        msg_print("It glows a deep red...");
 #endif
                        restore_level();
-                       o_ptr->timeout = 450;
                        break;
                }
 
@@ -2727,7 +2940,6 @@ bool activate_random_artifact(object_type *o_ptr)
                        (void)do_res_stat(A_CON);
                        (void)do_res_stat(A_CHR);
                        (void)restore_level();
-                       o_ptr->timeout = 750;
                        break;
                }
 
@@ -2742,7 +2954,6 @@ bool activate_random_artifact(object_type *o_ptr)
 #endif
                        (void)hp_player(700);
                        (void)set_cut(0);
-                       o_ptr->timeout = 250;
                        break;
                }
 
@@ -2757,7 +2968,67 @@ bool activate_random_artifact(object_type *o_ptr)
 #endif
                        (void)hp_player(1000);
                        (void)set_cut(0);
-                       o_ptr->timeout = 888;
+                       break;
+               }
+
+               case ACT_CURING:
+               {
+#ifdef JP
+                       msg_format("%s¤ÎÍ¥¤·¤µ¤ËÌþ¤µ¤ì¤ë...", name);
+#else
+                       msg_format("the %s cures you affectionately ...", name);
+#endif
+                       (void)set_poisoned(0);
+                       (void)set_confused(0);
+                       (void)set_blind(0);
+                       (void)set_stun(0);
+                       (void)set_cut(0);
+                       (void)set_image(0);
+
+                       break;
+               }
+
+               case ACT_CURE_MANA_FULL:
+               {
+#ifdef JP
+                       msg_format("%s¤¬ÀÄÇò¤¯¸÷¤Ã¤¿¡¥¡¥¡¥", name);
+#else
+                       msg_format("The %s glows pale...", name);
+#endif
+                       if (p_ptr->pclass == CLASS_MAGIC_EATER)
+                       {
+                               int i;
+                               for (i = 0; i < EATER_EXT*2; i++)
+                               {
+                                       p_ptr->magic_num1[i] += (p_ptr->magic_num2[i] < 10) ? EATER_CHARGE * 3 : p_ptr->magic_num2[i]*EATER_CHARGE/3;
+                                       if (p_ptr->magic_num1[i] > p_ptr->magic_num2[i]*EATER_CHARGE) p_ptr->magic_num1[i] = p_ptr->magic_num2[i]*EATER_CHARGE;
+                               }
+                               for (; i < EATER_EXT*3; i++)
+                               {
+                                       int k_idx = lookup_kind(TV_ROD, i-EATER_EXT*2);
+                                       p_ptr->magic_num1[i] -= ((p_ptr->magic_num2[i] < 10) ? EATER_ROD_CHARGE*3 : p_ptr->magic_num2[i]*EATER_ROD_CHARGE/3)*k_info[k_idx].pval;
+                                       if (p_ptr->magic_num1[i] < 0) p_ptr->magic_num1[i] = 0;
+                               }
+#ifdef JP
+                               msg_print("Ƭ¤¬¥Ï¥Ã¥­¥ê¤È¤·¤¿¡£");
+#else
+                               msg_print("You feel your head clear.");
+#endif
+                               p_ptr->window |= (PW_PLAYER);
+                       }
+                       else if (p_ptr->csp < p_ptr->msp)
+                       {
+                               p_ptr->csp = p_ptr->msp;
+                               p_ptr->csp_frac = 0;
+#ifdef JP
+                               msg_print("Ƭ¤¬¥Ï¥Ã¥­¥ê¤È¤·¤¿¡£");
+#else
+                               msg_print("You feel your head clear.");
+#endif
+                               p_ptr->redraw |= (PR_MANA);
+                               p_ptr->window |= (PW_PLAYER);
+                               p_ptr->window |= (PW_SPELL);
+                       }
                        break;
                }
 
@@ -2766,16 +3037,17 @@ bool activate_random_artifact(object_type *o_ptr)
                case ACT_ESP:
                {
                        (void)set_tim_esp(randint1(30) + 25, FALSE);
-                       o_ptr->timeout = 200;
                        break;
                }
 
                case ACT_BERSERK:
                {
                        (void)set_afraid(0);
+                       (void)set_shero(randint1(25) + 25, FALSE);
+                       /* (void)set_afraid(0);
                        (void)set_hero(randint1(50) + 50, FALSE);
                        (void)set_blessed(randint1(50) + 50, FALSE);
-                       o_ptr->timeout = 100 + randint1(100);
+                       o_ptr->timeout = 100 + randint1(100); */
                        break;
                }
 
@@ -2788,7 +3060,6 @@ bool activate_random_artifact(object_type *o_ptr)
 #endif
                        k = 3 * p_ptr->lev;
                        (void)set_protevil(randint1(25) + k, FALSE);
-                       o_ptr->timeout = randint0(200) + 200;
                        break;
                }
 
@@ -2804,7 +3075,6 @@ bool activate_random_artifact(object_type *o_ptr)
                        (void)set_oppose_fire(randint1(40) + 40, FALSE);
                        (void)set_oppose_cold(randint1(40) + 40, FALSE);
                        (void)set_oppose_pois(randint1(40) + 40, FALSE);
-                       o_ptr->timeout = 200;
                        break;
                }
 
@@ -2816,7 +3086,6 @@ bool activate_random_artifact(object_type *o_ptr)
                        msg_print("It glows bright green...");
 #endif
                        (void)set_fast(randint1(20) + 20, FALSE);
-                       o_ptr->timeout = randint0(100) + 100;
                        break;
                }
 
@@ -2828,21 +3097,110 @@ bool activate_random_artifact(object_type *o_ptr)
                        msg_print("It glows brightly...");
 #endif
                        (void)set_fast(randint1(75) + 75, FALSE);
-                       o_ptr->timeout = randint0(100) + 100;
                        break;
                }
 
                case ACT_WRAITH:
                {
                        set_wraith_form(randint1(plev / 2) + (plev / 2), FALSE);
-                       o_ptr->timeout = 1000;
                        break;
                }
 
                case ACT_INVULN:
                {
                        (void)set_invuln(randint1(8) + 8, FALSE);
-                       o_ptr->timeout = 1000;
+                       break;
+               }
+
+               case ACT_HELO:
+               {
+                       (void)set_afraid(0);
+                       set_hero(randint1(25)+25, FALSE);
+                       hp_player(10);
+                       break;
+               }
+
+               case ACT_HELO_SPEED:
+               {
+                       (void)set_fast(randint1(50) + 50, FALSE);
+                       hp_player(10);
+                       set_afraid(0);
+                       set_hero(randint1(50) + 50, FALSE);
+                       break;
+               }
+
+               case ACT_RESIST_ACID:
+               {
+#ifdef JP
+                       msg_format("%s¤¬¹õ¤¯µ±¤¤¤¿...", name);
+#else
+                       msg_format("The %s grows black.", name);
+#endif
+                       if ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_ACID))
+                       {
+                               if (!get_aim_dir(&dir)) return FALSE;
+                               fire_ball(GF_ACID, dir, 100, 2);
+                       }
+                       (void)set_oppose_acid(randint1(20) + 20, FALSE);
+                       break;
+               }
+
+               case ACT_RESIST_FIRE:
+               {
+#ifdef JP
+                       msg_format("%s¤¬ÀÖ¤¯µ±¤¤¤¿...", name);
+#else
+                       msg_format("The %s grows red.", name);
+#endif
+                       if ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_FLAMES))
+                       {
+                               if (!get_aim_dir(&dir)) return FALSE;
+                               fire_ball(GF_FIRE, dir, 100, 2);
+                       }
+                       (void)set_oppose_fire(randint1(20) + 20, FALSE);
+                       break;
+               }
+
+               case ACT_RESIST_COLD:
+               {
+#ifdef JP
+                       msg_format("%s¤¬Çò¤¯µ±¤¤¤¿...", name);
+#else
+                       msg_format("The %s grows white.", name);
+#endif
+                       if ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_ICE))
+                       {
+                               if (!get_aim_dir(&dir)) return FALSE;
+                               fire_ball(GF_COLD, dir, 100, 2);
+                       }
+                       (void)set_oppose_cold(randint1(20) + 20, FALSE);
+                       break;
+               }
+
+               case ACT_RESIST_ELEC:
+               {
+#ifdef JP
+                       msg_format("%s¤¬ÀĤ¯µ±¤¤¤¿...", name);
+#else
+                       msg_format("The %s grows blue.", name);
+#endif
+                       if ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_ELEC))
+                       {
+                               if (!get_aim_dir(&dir)) return FALSE;
+                               fire_ball(GF_ELEC, dir, 100, 2);
+                       }
+                       (void)set_oppose_elec(randint1(20) + 20, FALSE);
+                       break;
+               }
+
+               case ACT_RESIST_POIS:
+               {
+#ifdef JP
+                       msg_format("%s¤¬ÎФ˵±¤¤¤¿...", name);
+#else
+                       msg_format("The %s grows green.", name);
+#endif
+                       (void)set_oppose_pois(randint1(20) + 20, FALSE);
                        break;
                }
 
@@ -2856,7 +3214,6 @@ bool activate_random_artifact(object_type *o_ptr)
                        msg_format("The %s wells with clear light...", name);
 #endif
                        lite_area(damroll(2, 15), 3);
-                       o_ptr->timeout = randint0(10) + 10;
                        break;
                }
 
@@ -2869,7 +3226,6 @@ bool activate_random_artifact(object_type *o_ptr)
 #endif
                        map_area(DETECT_RAD_MAP);
                        lite_area(damroll(2, 15), 3);
-                       o_ptr->timeout = randint0(50) + 50;
                        break;
                }
 
@@ -2883,7 +3239,6 @@ bool activate_random_artifact(object_type *o_ptr)
                        msg_print("An image forms in your mind...");
 #endif
                        detect_all(DETECT_RAD_DEFAULT);
-                       o_ptr->timeout = randint0(55) + 55;
                        break;
                }
 
@@ -2897,7 +3252,6 @@ bool activate_random_artifact(object_type *o_ptr)
                        detect_all(DETECT_RAD_DEFAULT);
                        probing();
                        identify_fully(FALSE);
-                       o_ptr->timeout = 100;
                        break;
                }
 
@@ -2909,14 +3263,12 @@ bool activate_random_artifact(object_type *o_ptr)
                        msg_print("It glows yellow...");
 #endif
                        identify_fully(FALSE);
-                       o_ptr->timeout = 75;
                        break;
                }
 
                case ACT_ID_PLAIN:
                {
                        if (!ident_spell(FALSE)) return FALSE;
-                       o_ptr->timeout = 10;
                        break;
                }
 
@@ -2928,7 +3280,6 @@ bool activate_random_artifact(object_type *o_ptr)
                        msg_print("It glows bright red...");
 #endif
                        explosive_rune();
-                       o_ptr->timeout = 200;
                        break;
                }
 
@@ -2940,14 +3291,12 @@ bool activate_random_artifact(object_type *o_ptr)
                        msg_print("It glows light blue...");
 #endif
                        warding_glyph();
-                       o_ptr->timeout = 400;
                        break;
                }
 
                case ACT_SATIATE:
                {
                        (void)set_food(PY_FOOD_MAX - 1);
-                       o_ptr->timeout = 200;
                        break;
                }
 
@@ -2959,7 +3308,6 @@ bool activate_random_artifact(object_type *o_ptr)
                        msg_print("It glows bright red...");
 #endif
                        destroy_doors_touch();
-                       o_ptr->timeout = 10;
                        break;
                }
 
@@ -2971,15 +3319,13 @@ bool activate_random_artifact(object_type *o_ptr)
                        msg_print("It pulsates...");
 #endif
                        if (!get_aim_dir(&dir)) return FALSE;
-                       wall_to_mud(dir);
-                       o_ptr->timeout = 3;
+                       wall_to_mud(dir, 20 + randint1(30));
                        break;
                }
 
                case ACT_RECHARGE:
                {
                        recharge(130);
-                       o_ptr->timeout = 70;
                        break;
                }
 
@@ -2991,7 +3337,6 @@ bool activate_random_artifact(object_type *o_ptr)
                        msg_print("It glows bright yellow...");
 #endif
                        (void)alchemy();
-                       o_ptr->timeout = 500;
                        break;
                }
 
@@ -3003,7 +3348,6 @@ bool activate_random_artifact(object_type *o_ptr)
                        msg_print("You open a dimensional gate. Choose a destination.");
 #endif
                        if (!dimension_door()) return FALSE;
-                       o_ptr->timeout = 100;
                        break;
                }
 
@@ -3016,7 +3360,6 @@ bool activate_random_artifact(object_type *o_ptr)
                        msg_print("It twists space around you...");
 #endif
                        teleport_player(100, 0L);
-                       o_ptr->timeout = 25;
                        break;
                }
 
@@ -3028,11 +3371,9 @@ bool activate_random_artifact(object_type *o_ptr)
                        msg_print("It glows soft white...");
 #endif
                        if (!word_of_recall()) return FALSE;
-                       o_ptr->timeout = 200;
                        break;
                }
 
-               /* Unique activation */
                case ACT_JUDGE:
                {
 #ifdef JP
@@ -3062,20 +3403,463 @@ bool activate_random_artifact(object_type *o_ptr)
                                (void)word_of_recall();
                        }
 
-                       o_ptr->timeout = randint0(20) + 20;
                        break;
                }
 
-               case ACT_BIZARRE:
+               case ACT_TELEKINESIS:
                {
+                       if (!get_aim_dir(&dir)) return FALSE;
 #ifdef JP
-                       msg_format("%s¤Ï¼¿¹õ¤Ëµ±¤¤¤¿...", name);
+                       msg_format("%s¤ò¿­¤Ð¤·¤¿¡£", name);
 #else
-                       msg_format("The %s glows intensely black...", name);
+                       msg_format("You stretched your %s.", name);
+#endif
+                       fetch(dir, 500, TRUE);
+                       break;
+               }
+
+               case ACT_DETECT_UNIQUE:
+               {
+                       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
+                       /* Process the monsters (backwards) */
+                       for (i = m_max - 1; i >= 1; i--)
+                       {
+                               /* Access the monster */
+                               m_ptr = &m_list[i];
+
+                               /* Ignore "dead" monsters */
+                               if (!m_ptr->r_idx) continue;
+
+                               r_ptr = &r_info[m_ptr->r_idx];
+
+                               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
+                               }
+                       }
+                       break;
+               }
+
+               case ACT_ESCAPE:
+               {
+                       switch (randint1(13))
+                       {
+                       case 1: case 2: case 3: case 4: case 5:
+                               teleport_player(10, 0L);
+                               break;
+                       case 6: case 7: case 8: case 9: case 10:
+                               teleport_player(222, 0L);
+                               break;
+                       case 11: case 12:
+                               (void)stair_creation();
+                               break;
+                       default:
+#ifdef JP
+                               if (get_check("¤³¤Î³¬¤òµî¤ê¤Þ¤¹¤«¡©"))
+#else
+                               if (get_check("Leave this level? "))
+#endif
+                               {
+                                       if (autosave_l) do_cmd_save_game(TRUE);
+
+                                       /* Leaving */
+                                       p_ptr->leaving = TRUE;
+                               }
+                       }
+                       break;
+               }
+
+               case ACT_DISP_CURSE_XTRA:
+               {
+#ifdef JP
+                       msg_format("%s¤¬¿¿¼Â¤ò¾È¤é¤·½Ð¤¹...", name);
+#else
+                       msg_format("The %s exhibits the truth...", name);
+#endif
+                       if (remove_all_curse())
+                       {
+#ifdef JP
+                               msg_print("狼¤Ë¸«¼é¤é¤ì¤Æ¤¤¤ë¤è¤¦¤Êµ¤¤¬¤¹¤ë¡£");
+#else
+                               msg_print("You feel as if someone is watching over you.");
+#endif
+                       }
+                       (void)probing();
+                       break;
+               }
+
+               case ACT_BRAND_FIRE_BOLTS:
+               {
+#ifdef JP
+                       msg_format("%s¤¬¿¼¹È¤Ëµ±¤¤¤¿...", name);
+#else
+                       msg_format("Your %s glows deep red...", name);
+#endif
+                       (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
+                       if (!recharge(1000)) return FALSE;
+                       break;
+               }
+
+               case ACT_LORE:
+               {
+#ifdef JP
+                       msg_print("ÀФ¬±£¤µ¤ì¤¿ÈëÌ©¤ò¼Ì¤·½Ð¤·¤¿¡¥¡¥¡¥");
+#else
+                       msg_print("The stone reveals hidden mysteries...");
+#endif
+                       if (!ident_spell(FALSE)) return FALSE;
+
+                       if (mp_ptr->spell_book)
+                       {
+                               /* Sufficient mana */
+                               if (20 <= p_ptr->csp)
+                               {
+                                       /* Use some mana */
+                                       p_ptr->csp -= 20;
+                               }
+
+                               /* Over-exert the player */
+                               else
+                               {
+                                       int oops = 20 - p_ptr->csp;
+
+                                       /* No mana left */
+                                       p_ptr->csp = 0;
+                                       p_ptr->csp_frac = 0;
+
+                                       /* Message */
+#ifdef JP
+                                       msg_print("ÀФòÀ©¸æ¤Ç¤­¤Ê¤¤¡ª");
+#else
+                                       msg_print("You are too weak to control the stone!");
+#endif
+                                       /* Hack -- Bypass free action */
+                                       (void)set_paralyzed(p_ptr->paralyzed +
+                                               randint1(5 * oops + 1));
+
+                                       /* Confusing. */
+                                       (void)set_confused(p_ptr->confused +
+                                               randint1(5 * oops + 1));
+                               }
+
+                               /* 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
+                       /* 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
+                       break;
+               }
+
+               case ACT_SHIKOFUMI:
+               {
+#ifdef JP
+                       msg_print("Î϶¯¤¯»Í¸Ô¤òƧ¤ó¤À¡£");
+#else
+                       msg_print("You stamp. (as if you are in a ring.)");
+#endif
+                       (void)set_afraid(0);
+                       (void)set_hero(randint1(20) + 20, FALSE);
+                       dispel_evil(p_ptr->lev * 3);
+                       break;
+               }
+
+               case ACT_PHASE_DOOR:
+               {
+                       teleport_player(10, 0L);
+                       break;
+               }
+
+               case ACT_DETECT_ALL_MONS:
+               {
+                       (void)detect_monsters_invis(255);
+                       (void)detect_monsters_normal(255);
+                       break;
+               }
+
+               case ACT_ULTIMATE_RESIST:
+               {
+                       int v = randint1(25)+25;
+                       (void)set_afraid(0);
+                       (void)set_hero(v, FALSE);
+                       (void)hp_player(10);
+                       (void)set_blessed(v, FALSE);
+                       (void)set_oppose_acid(v, FALSE);
+                       (void)set_oppose_elec(v, FALSE);
+                       (void)set_oppose_fire(v, FALSE);
+                       (void)set_oppose_cold(v, FALSE);
+                       (void)set_oppose_pois(v, FALSE);
+                       (void)set_ultimate_res(v, FALSE);
+                       break;
+               }
+
+
+               /* Unique activation */
+               case ACT_CAST_OFF:
+               {
+                       int inv, o_idx, t;
+                       char o_name[MAX_NLEN];
+                       object_type forge;
+
+                       /* Cast off activated item */
+                       for (inv = INVEN_RARM; inv <= INVEN_FEET; inv++)
+                       {
+                               if (o_ptr == &inventory[inv]) break;
+                       }
+
+                       /* Paranoia */
+                       if (inv > INVEN_FEET) return FALSE;
+
+                       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_ptr = &o_list[o_idx];
+
+                       object_desc(o_name, o_ptr, OD_NAME_ONLY);
+                       msg_format(_("%s¤ò椮¼Î¤Æ¤¿¡£", "You cast off %d."), o_name);
+
+                       /* Get effects */
+                       msg_print(_("¡Ödz¤¨¾å¤¬¤ì²¶¤Î¾®±§Ã衪¡×", "You say, 'Burn up my cosmo!"));
+                       t = 20 + randint1(20);
+                       (void)set_blind(p_ptr->blind + t);
+                       (void)set_afraid(0);
+                       (void)set_tim_esp(p_ptr->tim_esp + t, FALSE);
+                       (void)set_tim_regen(p_ptr->tim_regen + t, FALSE);
+                       (void)set_hero(p_ptr->hero + t, FALSE);
+                       (void)set_blessed(p_ptr->blessed + t, FALSE);
+                       (void)set_fast(p_ptr->fast + t, FALSE);
+                       (void)set_shero(p_ptr->shero + t, FALSE);
+                       if (p_ptr->pclass == CLASS_FORCETRAINER)
+                       {
+                               p_ptr->magic_num1[0] = plev * 5 + 190;
+                               msg_print(_("µ¤¤¬ÇúȯÀ£Á°¤Ë¤Ê¤Ã¤¿¡£", "Your force are immediatly before explosion."));
+                       }
+
+                       break;
+               }
+
+               case ACT_FISHING:
+               {
+                       int x, y;
+
+                       if (!get_rep_dir2(&dir)) return FALSE;
+                       y = py+ddy[dir];
+                       x = px+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
+                               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;
+                               return FALSE;
+                       }
+                       set_action(ACTION_FISH);
+                       p_ptr->redraw |= (PR_STATE);
+                       break;
+               }
+
+               case ACT_INROU:
+               {
+                       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))
+                       {
+#ifdef JP
+                               msg_print("¡Ø½õ¤µ¤ó¡Ù¤¬¸½¤ì¤¿¡£");
+#else
+                               msg_print("Suke-san apperars.");
+                               kakusan = "Suke-san";
+#endif
+                               count++;
+                       }
+                       if (summon_named_creature(0, py, px, MON_KAKU, PM_FORCE_PET))
+                       {
+#ifdef JP
+                               msg_print("¡Ø³Ê¤µ¤ó¡Ù¤¬¸½¤ì¤¿¡£");
+#else
+                               msg_print("Kaku-san appears.");
+                               kakusan = "Kaku-san";
+#endif
+                               count++;
+                       }
+                       if (!count)
+                       {
+                               for (i = m_max - 1; i > 0; i--)
+                               {
+                                       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;
+                                       count++;
+                                       break;
+                               }
+                       }
+
+                       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
+                               sukekaku = TRUE;
+                               stun_monsters(120);
+                               confuse_monsters(120);
+                               turn_monsters(120);
+                               stasis_monsters(120);
+                               sukekaku = FALSE;
+                       }
+                       else
+                       {
+#ifdef JP
+                               msg_print("¤·¤«¤·¡¢²¿¤âµ¯¤­¤Ê¤«¤Ã¤¿¡£");
+#else
+                               msg_print("Nothing happen.");
 #endif
+                       }
+                       break;
+               }
+
+               case ACT_MURAMASA:
+               {
+                       /* Only for Muramasa */
+                       if (o_ptr->name1 != ART_MURAMASA) return FALSE;
+#ifdef JP
+                       if (get_check("ËÜÅö¤Ë»È¤¤¤Þ¤¹¤«¡©"))
+#else
+                       if (get_check("Are you sure?!"))
+#endif
+                       {
+#ifdef JP
+                               msg_print("¼Àµ¤¬¿Ì¤¨¤¿¡¥¡¥¡¥");
+#else
+                               msg_print("The Muramasa pulsates...");
+#endif
+                               do_inc_stat(A_STR);
+                               if (one_in_(2))
+                               {
+#ifdef JP
+                                       msg_print("¼Àµ¤Ï²õ¤ì¤¿¡ª");
+#else
+                                       msg_print("The Muramasa is destroyed!");
+#endif
+                                       curse_weapon_object(TRUE, o_ptr);
+                               }
+                       }
+                       break;
+               }
+
+               case ACT_BLOODY_MOON:
+               {
+                       /* Only for Bloody Moon */
+                       if (o_ptr->name1 != ART_BLOOD) return FALSE;
+#ifdef JP
+                       msg_print("³ù¤¬ÌÀ¤ë¤¯µ±¤¤¤¿...");
+#else
+                       msg_print("Your scythe glows brightly!");
+#endif
+                       get_bloody_moon_flags(o_ptr);
+                       if (p_ptr->prace == RACE_ANDROID) calc_android_exp();
+                       p_ptr->update |= (PU_BONUS | PU_HP);
+                       break;
+               }
+
+               case ACT_CRIMSON:
+               {
+                       int num = 1;
+                       int i;
+                       int flg = PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
+                       int tx, ty;
+
+                       /* Only for Crimson */
+                       if (o_ptr->name1 != ART_CRIMSON) return FALSE;
+
+#ifdef JP
+                       msg_print("¤»¤Ã¤«¤¯¤À¤«¤é¡Ø¥¯¥ê¥à¥¾¥ó¡Ù¤ò¤Ö¤Ã¤Ñ¤Ê¤¹¤¼¡ª");
+#else
+                       msg_print("I'll fire CRIMSON! SEKKAKUDAKARA!");
+#endif
+
                        if (!get_aim_dir(&dir)) return FALSE;
-                       ring_of_power(dir);
-                       o_ptr->timeout = randint0(450) + 450;
+
+                       /* Use the given direction */
+                       tx = px + 99 * ddx[dir];
+                       ty = py + 99 * ddy[dir];
+
+                       /* Hack -- Use an actual "target" */
+                       if ((dir == 5) && target_okay())
+                       {
+                               tx = target_col;
+                               ty = target_row;
+                       }
+
+                       if (p_ptr->pclass == CLASS_ARCHER)
+                       {
+                               /* Extra shot at level 10 */
+                               if (p_ptr->lev >= 10) num++;
+
+                               /* Extra shot at level 30 */
+                               if (p_ptr->lev >= 30) num++;
+
+                               /* Extra shot at level 45 */
+                               if (p_ptr->lev >= 45) num++;
+                       }
+
+                       for (i = 0; i < num; i++)
+                               project(0, p_ptr->lev/20+1, ty, tx, p_ptr->lev*p_ptr->lev*6/50, GF_ROCKET, flg, -1);
                        break;
                }
 
@@ -3090,6 +3874,41 @@ bool activate_random_artifact(object_type *o_ptr)
                }
        }
 
+       /* Set activation timeout */
+       act_ptr = find_activation_info(o_ptr);
+
+       if (!act_ptr) {
+               /* Maybe forgot adding information to activation_info table ? */
+               msg_format("Activation information is not found: %d.", o_ptr->xtra2);
+               return FALSE;
+       }
+
+       if (act_ptr->timeout.constant >= 0) {
+               o_ptr->timeout = act_ptr->timeout.constant;
+               if (act_ptr->timeout.dice > 0) {
+                       o_ptr->timeout += randint1(act_ptr->timeout.dice);
+               }
+       } else {
+               /* Activations that have special timeout */
+               switch (o_ptr->xtra2) {
+               case ACT_BR_FIRE:
+                       o_ptr->timeout = ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_FLAMES)) ? 200 : 250;
+                       break;
+               case ACT_BR_COLD:
+                       o_ptr->timeout = ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_ICE)) ? 200 : 250;
+                       break;
+               case ACT_TERROR:
+                       o_ptr->timeout = 3 * (p_ptr->lev + 10);
+                       break;
+               case ACT_MURAMASA:
+                       /* Nothing to do */
+                       break;
+               default:
+                       msg_format("Special timeout is not implemented: %d.", o_ptr->xtra2);
+                       return FALSE;
+               }
+       }
+
        return TRUE;
 }
 
@@ -3232,6 +4051,7 @@ bool create_named_art(int a_idx, int y, int x)
        q_ptr->to_h = a_ptr->to_h;
        q_ptr->to_d = a_ptr->to_d;
        q_ptr->weight = a_ptr->weight;
+       q_ptr->xtra2 = a_ptr->act_idx;
 
        /* Hack -- extract the "cursed" flag */
        if (a_ptr->gen_flags & TRG_CURSED) q_ptr->curse_flags |= (TRC_CURSED);