OSDN Git Service

Now activation timeout is defined in activation_info table
authorhabu <habu@0568b783-4c39-0410-ac80-bf13821ea2a2>
Thu, 31 Jan 2013 15:04:19 +0000 (15:04 +0000)
committerhabu <habu@0568b783-4c39-0410-ac80-bf13821ea2a2>
Thu, 31 Jan 2013 15:04:19 +0000 (15:04 +0000)
src/artifact.c
src/tables.c
src/types.h

index 9e60def..bc1c2c8 100644 (file)
@@ -1975,11 +1975,26 @@ bool create_artifact(object_type *o_ptr, bool a_scroll)
 }
 
 
+static 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;
+}
+
 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;
@@ -1996,7 +2011,6 @@ bool activate_random_artifact(object_type *o_ptr)
                        msg_print("A line of sunlight appears.");
 #endif
                        (void)lite_line(dir);
-                       o_ptr->timeout = 10;
                        break;
                }
 
@@ -2009,7 +2023,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;
                }
 
@@ -2022,7 +2035,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;
                }
 
@@ -2035,7 +2047,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;
                }
 
@@ -2048,7 +2059,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;
                }
 
@@ -2061,7 +2071,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;
                }
 
@@ -2074,7 +2083,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;
                }
 
@@ -2087,7 +2095,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;
                }
 
@@ -2100,7 +2107,6 @@ 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;
                }
 
@@ -2113,7 +2119,6 @@ bool activate_random_artifact(object_type *o_ptr)
 #endif
                        if (!get_aim_dir(&dir)) return FALSE;
                        if (drain_life(dir, 100))
-                       o_ptr->timeout = randint0(100) + 100;
                        break;
                }
 
@@ -2126,7 +2131,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;
                }
 
@@ -2139,7 +2143,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;
                }
 
@@ -2152,7 +2155,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;
                }
 
@@ -2165,7 +2167,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;
                }
 
@@ -2177,7 +2178,6 @@ bool activate_random_artifact(object_type *o_ptr)
                                if (drain_life(dir, 50))
                                hp_player(50);
                        }
-                       o_ptr->timeout = 400;
                        break;
                }
 
@@ -2190,7 +2190,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;
                }
 
@@ -2203,7 +2202,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;
                }
 
@@ -2216,7 +2214,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;
                }
 
@@ -2229,7 +2226,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;
                }
 
@@ -2254,7 +2250,6 @@ bool activate_random_artifact(object_type *o_ptr)
                                                py_attack(y, x, 0);
                                }
                        }
-                       o_ptr->timeout = 250;
                        break;
                }
 
@@ -2266,8 +2261,6 @@ bool activate_random_artifact(object_type *o_ptr)
                                if (drain_life(dir, 100))
                                hp_player(100);
                        }
-
-                       o_ptr->timeout = 400;
                        break;
                }
 
@@ -2280,7 +2273,6 @@ bool activate_random_artifact(object_type *o_ptr)
                        msg_print("It glows in scintillating colours...");
 #endif
                        call_chaos();
-                       o_ptr->timeout = 350;
                        break;
                }
 
@@ -2293,7 +2285,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;
                }
 
@@ -2305,7 +2296,6 @@ 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;
                }
 
@@ -2318,7 +2308,6 @@ bool activate_random_artifact(object_type *o_ptr)
                        msg_print("You breathe the elements.");
 #endif
                        fire_ball(GF_MISSILE, dir, 300, 4);
-                       o_ptr->timeout = 500;
                        break;
                }
 
@@ -2330,7 +2319,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;
                }
 
@@ -2343,7 +2331,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;
                }
 
@@ -2356,7 +2343,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;
                }
 
@@ -2369,7 +2355,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;
                }
 
@@ -2382,7 +2367,6 @@ bool activate_random_artifact(object_type *o_ptr)
 #endif
                        if (!get_aim_dir(&dir)) return FALSE;
                        fire_ball(GF_MANA, dir, 250, 4);
-                       o_ptr->timeout = randint0(150) + 150;
                        break;
                }
 
@@ -2394,7 +2378,6 @@ bool activate_random_artifact(object_type *o_ptr)
                        msg_print("You exterminate small life.");
 #endif
                        (void)dispel_monsters(4);
-                       o_ptr->timeout = randint0(55) + 55;
                        break;
                }
 
@@ -2407,7 +2390,6 @@ bool activate_random_artifact(object_type *o_ptr)
 #endif
                        fire_ball(GF_LITE, 0, 300, 6);
                        confuse_monsters(3 * p_ptr->lev / 2);
-                       o_ptr->timeout = 250;
                        break;
                }
 
@@ -2420,7 +2402,6 @@ bool activate_random_artifact(object_type *o_ptr)
 #endif
                        if (!get_aim_dir(&dir)) return FALSE;
                        ring_of_power(dir);
-                       o_ptr->timeout = randint0(450) + 450;
                        break;
                }
 
@@ -2451,7 +2432,6 @@ bool activate_random_artifact(object_type *o_ptr)
                                                        (PROJECT_THRU | PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL), -1);
                        }
 
-                       o_ptr->timeout = 1000;
                        break;
                }
 
@@ -2478,14 +2458,12 @@ bool activate_random_artifact(object_type *o_ptr)
                        (void)set_oppose_fire(randint1(50) + 50, FALSE);
                        (void)set_oppose_cold(randint1(50) + 50, FALSE);
                        (void)set_oppose_pois(randint1(50) + 50, FALSE);
-                       o_ptr->timeout = 400;
                        break;
                }
                case ACT_BA_ACID_1:
                {
                        if (!get_aim_dir(&dir)) return FALSE;
                        fire_ball(GF_ACID, dir, 100, 2);
-                       o_ptr->timeout = randint0(12) + 12;
                        break;
                }
 
@@ -2496,9 +2474,7 @@ bool activate_random_artifact(object_type *o_ptr)
                        if ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_FLAMES))
                        {
                                (void)set_oppose_fire(randint1(20) + 20, FALSE);
-                               o_ptr->timeout = 200;
                        }
-                       else o_ptr->timeout = 250;
                        break;
                }
                case ACT_BR_COLD:
@@ -2508,9 +2484,7 @@ bool activate_random_artifact(object_type *o_ptr)
                        if ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_ICE))
                        {
                                (void)set_oppose_cold(randint1(20) + 20, FALSE);
-                               o_ptr->timeout = 200;
                        }
-                       else o_ptr->timeout = 250;
                        break;
                }
 
@@ -2525,7 +2499,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;
                }
 
@@ -2537,21 +2510,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, 5);
-                       o_ptr->timeout = 50;
                        break;
                }
 
                case ACT_TERROR:
                {
                        turn_monsters(40 + p_ptr->lev);
-                       o_ptr->timeout = 3 * (p_ptr->lev + 10);
                        break;
                }
 
@@ -2559,7 +2529,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;
                }
 
@@ -2573,7 +2542,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;
                }
 
@@ -2585,7 +2553,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;
                }
 
@@ -2597,7 +2564,6 @@ 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;
                }
 
@@ -2611,7 +2577,6 @@ bool activate_random_artifact(object_type *o_ptr)
                        msg_print("You wind a mighty blast; your enemies tremble!");
 #endif
                        (void)turn_monsters((3 * p_ptr->lev / 2) + 10);
-                       o_ptr->timeout = randint0(40) + 40;
                        break;
                }
 
@@ -2643,7 +2608,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;
                }
 
@@ -2651,7 +2615,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;
                }
 
@@ -2659,28 +2622,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;
                }
 
@@ -2692,7 +2651,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;
                }
 
@@ -2726,7 +2684,6 @@ bool activate_random_artifact(object_type *o_ptr)
 #endif
                        }
 
-                       o_ptr->timeout = 750;
                        break;
                }
 
@@ -2760,7 +2717,6 @@ bool activate_random_artifact(object_type *o_ptr)
 #endif
                        }
 
-                       o_ptr->timeout = 666 + randint1(333);
                        break;
                }
 
@@ -2797,7 +2753,6 @@ bool activate_random_artifact(object_type *o_ptr)
 #endif
                        }
 
-                       o_ptr->timeout = 666 + randint1(333);
                        break;
                }
 
@@ -2827,7 +2782,6 @@ bool activate_random_artifact(object_type *o_ptr)
 
                        }
 
-                       o_ptr->timeout = 300 + randint1(150);
                        break;
                }
 
@@ -2839,7 +2793,6 @@ bool activate_random_artifact(object_type *o_ptr)
                        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));
-                       o_ptr->timeout = 500 + randint1(500);
                        break;
                }
 
@@ -2865,7 +2818,6 @@ bool activate_random_artifact(object_type *o_ptr)
 #endif
                        }
 
-                       o_ptr->timeout = 300 + randint1(150);
                        break;
                }
 
@@ -2886,7 +2838,6 @@ bool activate_random_artifact(object_type *o_ptr)
                        (void)set_afraid(0);
                        (void)set_hero(randint1(25) + 25, FALSE);
                        (void)hp_player(777);
-                       o_ptr->timeout = 300;
                        break;
                }
 
@@ -2894,7 +2845,6 @@ bool activate_random_artifact(object_type *o_ptr)
                {
                        (void)set_afraid(0);
                        (void)hp_player(30);
-                       o_ptr->timeout = 10;
                        break;
                }
 
@@ -2907,7 +2857,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;
                }
 
@@ -2920,7 +2869,6 @@ bool activate_random_artifact(object_type *o_ptr)
 #endif
                        (void)set_afraid(0);
                        (void)set_poisoned(0);
-                       o_ptr->timeout = 5;
                        break;
                }
 
@@ -2932,7 +2880,6 @@ bool activate_random_artifact(object_type *o_ptr)
                        msg_print("It glows a deep red...");
 #endif
                        restore_level();
-                       o_ptr->timeout = 450;
                        break;
                }
 
@@ -2950,7 +2897,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;
                }
 
@@ -2965,7 +2911,6 @@ bool activate_random_artifact(object_type *o_ptr)
 #endif
                        (void)hp_player(700);
                        (void)set_cut(0);
-                       o_ptr->timeout = 250;
                        break;
                }
 
@@ -2980,7 +2925,6 @@ bool activate_random_artifact(object_type *o_ptr)
 #endif
                        (void)hp_player(1000);
                        (void)set_cut(0);
-                       o_ptr->timeout = 888;
                        break;
                }
 
@@ -2998,7 +2942,6 @@ bool activate_random_artifact(object_type *o_ptr)
                        (void)set_cut(0);
                        (void)set_image(0);
 
-                       o_ptr->timeout = 100;
                        break;
                }
 
@@ -3043,7 +2986,6 @@ bool activate_random_artifact(object_type *o_ptr)
                                p_ptr->window |= (PW_PLAYER);
                                p_ptr->window |= (PW_SPELL);
                        }
-                       o_ptr->timeout = 777;
                        break;
                }
 
@@ -3052,7 +2994,6 @@ bool activate_random_artifact(object_type *o_ptr)
                case ACT_ESP:
                {
                        (void)set_tim_esp(randint1(30) + 25, FALSE);
-                       o_ptr->timeout = 200;
                        break;
                }
 
@@ -3060,7 +3001,6 @@ bool activate_random_artifact(object_type *o_ptr)
                {
                        (void)set_afraid(0);
                        (void)set_shero(randint1(25) + 25, FALSE);
-                       o_ptr->timeout = randint0(75)+75;
                        /* (void)set_afraid(0);
                        (void)set_hero(randint1(50) + 50, FALSE);
                        (void)set_blessed(randint1(50) + 50, FALSE);
@@ -3077,7 +3017,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;
                }
 
@@ -3093,7 +3032,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;
                }
 
@@ -3105,7 +3043,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;
                }
 
@@ -3117,21 +3054,18 @@ 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;
                }
 
@@ -3140,7 +3074,6 @@ bool activate_random_artifact(object_type *o_ptr)
                        (void)set_afraid(0);
                        set_hero(randint1(25)+25, FALSE);
                        hp_player(10);
-                       o_ptr->timeout = randint0(30) + 30;
                        break;
                }
 
@@ -3150,7 +3083,6 @@ bool activate_random_artifact(object_type *o_ptr)
                        hp_player(10);
                        set_afraid(0);
                        set_hero(randint1(50) + 50, FALSE);
-                       o_ptr->timeout = randint0(200) + 100;
                        break;
                }
 
@@ -3162,7 +3094,6 @@ bool activate_random_artifact(object_type *o_ptr)
                        msg_format("The %s grows black.", name);
 #endif
                        (void)set_oppose_acid(randint1(20) + 20, FALSE);
-                       o_ptr->timeout = 40 + randint1(40);
                        break;
                }
 
@@ -3174,7 +3105,6 @@ bool activate_random_artifact(object_type *o_ptr)
                        msg_format("The %s grows red.", name);
 #endif
                        (void)set_oppose_fire(randint1(20) + 20, FALSE);
-                       o_ptr->timeout = 40 + randint1(40);
                        break;
                }
 
@@ -3186,7 +3116,6 @@ bool activate_random_artifact(object_type *o_ptr)
                        msg_format("The %s grows white.", name);
 #endif
                        (void)set_oppose_cold(randint1(20) + 20, FALSE);
-                       o_ptr->timeout = 40 + randint1(40);
                        break;
                }
 
@@ -3198,7 +3127,6 @@ bool activate_random_artifact(object_type *o_ptr)
                        msg_format("The %s grows blue.", name);
 #endif
                        (void)set_oppose_elec(randint1(20) + 20, FALSE);
-                       o_ptr->timeout = 40 + randint1(40);
                        break;
                }
 
@@ -3210,7 +3138,6 @@ bool activate_random_artifact(object_type *o_ptr)
                        msg_format("The %s grows green.", name);
 #endif
                        (void)set_oppose_pois(randint1(20) + 20, FALSE);
-                       o_ptr->timeout = 40 + randint1(40);
                        break;
                }
 
@@ -3224,7 +3151,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;
                }
 
@@ -3237,7 +3163,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;
                }
 
@@ -3251,7 +3176,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;
                }
 
@@ -3265,7 +3189,6 @@ bool activate_random_artifact(object_type *o_ptr)
                        detect_all(DETECT_RAD_DEFAULT);
                        probing();
                        identify_fully(FALSE);
-                       o_ptr->timeout = 100;
                        break;
                }
 
@@ -3277,14 +3200,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;
                }
 
@@ -3296,7 +3217,6 @@ bool activate_random_artifact(object_type *o_ptr)
                        msg_print("It glows bright red...");
 #endif
                        explosive_rune();
-                       o_ptr->timeout = 200;
                        break;
                }
 
@@ -3308,14 +3228,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;
                }
 
@@ -3327,7 +3245,6 @@ bool activate_random_artifact(object_type *o_ptr)
                        msg_print("It glows bright red...");
 #endif
                        destroy_doors_touch();
-                       o_ptr->timeout = 10;
                        break;
                }
 
@@ -3340,14 +3257,12 @@ bool activate_random_artifact(object_type *o_ptr)
 #endif
                        if (!get_aim_dir(&dir)) return FALSE;
                        wall_to_mud(dir);
-                       o_ptr->timeout = 3;
                        break;
                }
 
                case ACT_RECHARGE:
                {
                        recharge(130);
-                       o_ptr->timeout = 70;
                        break;
                }
 
@@ -3359,7 +3274,6 @@ bool activate_random_artifact(object_type *o_ptr)
                        msg_print("It glows bright yellow...");
 #endif
                        (void)alchemy();
-                       o_ptr->timeout = 500;
                        break;
                }
 
@@ -3371,7 +3285,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;
                }
 
@@ -3384,7 +3297,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;
                }
 
@@ -3396,7 +3308,6 @@ 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;
                }
 
@@ -3429,7 +3340,6 @@ bool activate_random_artifact(object_type *o_ptr)
                                (void)word_of_recall();
                        }
 
-                       o_ptr->timeout = randint0(20) + 20;
                        break;
                }
 
@@ -3442,7 +3352,6 @@ bool activate_random_artifact(object_type *o_ptr)
                        msg_format("You stretched your %s.", name);
 #endif
                        fetch(dir, 500, TRUE);
-                       o_ptr->timeout = randint0(25) + 25;
                        break;
                }
 
@@ -3476,7 +3385,6 @@ bool activate_random_artifact(object_type *o_ptr)
 #endif
                                }
                        }
-                       o_ptr->timeout = 200;
                        break;
                }
 
@@ -3506,7 +3414,6 @@ bool activate_random_artifact(object_type *o_ptr)
                                        p_ptr->leaving = TRUE;
                                }
                        }
-                       o_ptr->timeout = 35;
                        break;
                }
 
@@ -3537,7 +3444,6 @@ bool activate_random_artifact(object_type *o_ptr)
                        msg_format("Your %s glows deep red...", name);
 #endif
                        (void)brand_bolts();
-                       o_ptr->timeout = 999;
                        break;
                }
 
@@ -3549,7 +3455,6 @@ bool activate_random_artifact(object_type *o_ptr)
                        msg_format("The %s gleams with blinding light...", name);
 #endif
                        if (!recharge(1000)) return FALSE;
-                       o_ptr->timeout = 200;
                        break;
                }
 
@@ -3614,7 +3519,6 @@ bool activate_random_artifact(object_type *o_ptr)
 #else
                                take_hit(DAMAGE_LOSELIFE, damroll(4, 10), "perilous secrets", -1);
 #endif
-                       o_ptr->timeout = 0;
                        break;
                }
 
@@ -3628,14 +3532,12 @@ bool activate_random_artifact(object_type *o_ptr)
                        (void)set_afraid(0);
                        (void)set_hero(randint1(20) + 20, FALSE);
                        dispel_evil(p_ptr->lev * 3);
-                       o_ptr->timeout = 100 + randint1(100);
                        break;
                }
 
                case ACT_PHASE_DOOR:
                {
                        teleport_player(10, 0L);
-                       o_ptr->timeout = 10 + randint1(10);
                        break;
                }
 
@@ -3643,7 +3545,6 @@ bool activate_random_artifact(object_type *o_ptr)
                {
                        (void)detect_monsters_invis(255);
                        (void)detect_monsters_normal(255);
-                       o_ptr->timeout = 150;
                        break;
                }
 
@@ -3660,7 +3561,6 @@ bool activate_random_artifact(object_type *o_ptr)
                        (void)set_oppose_cold(v, FALSE);
                        (void)set_oppose_pois(v, FALSE);
                        (void)set_ultimate_res(v, FALSE);
-                       o_ptr->timeout = 777;
                        break;
                }
 
@@ -3763,7 +3663,6 @@ bool activate_random_artifact(object_type *o_ptr)
                                msg_print("Nothing happen.");
 #endif
                        }
-                       o_ptr->timeout = randint0(150) + 150;
                        break;
                }
 
@@ -3806,7 +3705,6 @@ bool activate_random_artifact(object_type *o_ptr)
                        msg_print("Your scythe glows brightly!");
 #endif
                        get_bloody_moon_flags(o_ptr);
-                       o_ptr->timeout = 3333;
                        if (p_ptr->prace == RACE_ANDROID) calc_android_exp();
                        p_ptr->update |= (PU_BONUS | PU_HP);
                        break;
@@ -3855,7 +3753,6 @@ bool activate_random_artifact(object_type *o_ptr)
 
                        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);
-                       o_ptr->timeout = 15;
                        break;
                }
 
@@ -3870,6 +3767,35 @@ bool activate_random_artifact(object_type *o_ptr)
                }
        }
 
+       /* Set activation timeout */
+        act_ptr = find_activation_info(o_ptr);
+
+        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);
+                       break;
+               }
+        }
+
        return TRUE;
 }
 
index 83dd91e..82f6242 100644 (file)
@@ -6662,132 +6662,132 @@ byte feature_action_flags[FF_FLAG_MAX] =
  */
 activation_type activation_info[] =
 {
-       { "SUNLIGHT", ACT_SUNLIGHT, 10, 250 },
-       { "BO_MISS_1", ACT_BO_MISS_1, 10, 250 },
-       { "BA_POIS_1", ACT_BA_POIS_1, 10, 300 },
-       { "BO_ELEC_1", ACT_BO_ELEC_1, 20, 250 },
-       { "BO_ACID_1", ACT_BO_ACID_1, 20, 250 },
-       { "BO_COLD_1", ACT_BO_COLD_1, 20, 250 },
-       { "BO_FIRE_1", ACT_BO_FIRE_1, 20, 250 },
-       { "BA_COLD_1", ACT_BA_COLD_1, 30, 750 },
-       { "BA_FIRE_1", ACT_BA_FIRE_1, 30, 1000 },
-       { "DRAIN_1", ACT_DRAIN_1, 30, 500 },
-       { "BA_COLD_2", ACT_BA_COLD_2, 40, 1250 },
-       { "BA_ELEC_2", ACT_BA_ELEC_2, 40, 1500 },
-       { "BA_FIRE_2", ACT_BA_FIRE_2, 40, 1500 },
-       { "DRAIN_2", ACT_DRAIN_2, 40, 750 },
-       { "VAMPIRE_1", ACT_VAMPIRE_1, 40, 1000 },
-       { "BO_MISS_2", ACT_BO_MISS_2, 40, 1000 },
-       { "BA_FIRE_3", ACT_BA_FIRE_3, 60, 1750 },
-       { "BA_COLD_3", ACT_BA_COLD_3, 70, 2500 },
-       { "BA_ELEC_3", ACT_BA_ELEC_3, 70, 2500 },
-       { "WHIRLWIND", ACT_WHIRLWIND, 50, 7500 },
-       { "VAMPIRE_2", ACT_VAMPIRE_2, 50, 2500 },
-       { "CALL_CHAOS", ACT_CALL_CHAOS, 70, 5000 },
-       { "ROCKET", ACT_ROCKET, 70, 5000 },
-       { "DISP_EVIL", ACT_DISP_EVIL, 50, 4000 },
-       { "BA_MISS_3", ACT_BA_MISS_3, 50, 1500 },
-       { "DISP_GOOD", ACT_DISP_GOOD, 50, 3500 },
-       { "BO_MANA", ACT_BO_MANA, 40, 1500 },
-       { "BA_WATER", ACT_BA_WATER, 50, 2000 },
-       { "BA_STAR", ACT_BA_STAR, 50, 2200 },
-       { "BA_DARK", ACT_BA_DARK, 50, 2200 },
-       { "BA_MANA", ACT_BA_MANA, 70, 2500 },
-       { "PESTICIDE", ACT_PESTICIDE, 10, 500 },
-       { "BLINDING_LIGHT", ACT_BLINDING_LIGHT, 30, 5000 },
-       { "BIZARRE", ACT_BIZARRE, 90, 10000 },
-       { "CAST_BA_STAR", ACT_CAST_BA_STAR, 70, 7500 },
-       { "BLADETURNER", ACT_BLADETURNER, 80, 20000 },
-       { "BA_ACID_1", ACT_BA_ACID_1, 30, 1000 },
-       { "BR_FIRE", ACT_BR_FIRE, 50, 5000 },
-       { "BR_COLD", ACT_BR_COLD, 50, 5000 },
-
-       { "CONFUSE", ACT_CONFUSE, 10, 500 },
-       { "SLEEP", ACT_SLEEP, 10, 750 },
-       { "QUAKE", ACT_QUAKE, 30, 600 },
-       { "TERROR", ACT_TERROR, 20, 2500 },
-       { "TELE_AWAY", ACT_TELE_AWAY, 20, 2000 },
-       { "BANISH_EVIL", ACT_BANISH_EVIL, 40, 2000 },
-       { "GENOCIDE", ACT_GENOCIDE, 50, 10000 },
-       { "MASS_GENO", ACT_MASS_GENO, 50, 10000 },
-       { "SCARE_AREA", ACT_SCARE_AREA, 20, 2500 },
-       { "AGGRAVATE", ACT_AGGRAVATE, 0, 100 },
-
-       { "CHARM_ANIMAL", ACT_CHARM_ANIMAL, 40, 7500 },
-       { "CHARM_UNDEAD", ACT_CHARM_UNDEAD, 40, 10000 },
-       { "CHARM_OTHER", ACT_CHARM_OTHER, 40, 10000 },
-       { "CHARM_ANIMALS", ACT_CHARM_ANIMALS, 40, 12500 },
-       { "CHARM_OTHERS", ACT_CHARM_OTHERS, 40, 17500 },
-       { "SUMMON_ANIMAL", ACT_SUMMON_ANIMAL, 50, 10000 },
-       { "SUMMON_PHANTOM", ACT_SUMMON_PHANTOM, 50, 12000 },
-       { "SUMMON_ELEMENTAL", ACT_SUMMON_ELEMENTAL, 50, 15000 },
-       { "SUMMON_DEMON", ACT_SUMMON_DEMON, 50, 20000 },
-       { "SUMMON_UNDEAD", ACT_SUMMON_UNDEAD, 50, 20000 },
-       { "SUMMON_HOUND", ACT_SUMMON_HOUND, 50, 15000 },
-       { "SUMMON_DAWN", ACT_SUMMON_DAWN, 50, 15000 },
-       { "SUMMON_OCTOPUS", ACT_SUMMON_OCTOPUS, 50, 15000 },
-
-       { "CHOIR_SINGS", ACT_CHOIR_SINGS, 60, 20000 },
-       { "CURE_LW", ACT_CURE_LW, 10, 500 },
-       { "CURE_MW", ACT_CURE_MW, 20, 750 },
-       { "CURE_POISON", ACT_CURE_POISON, 10, 1000 },
-       { "REST_LIFE", ACT_REST_LIFE, 40, 7500 },
-       { "REST_ALL", ACT_REST_ALL, 30, 15000 },
-       { "CURE_700", ACT_CURE_700, 40, 10000 },
-       { "CURE_1000", ACT_CURE_1000, 50, 15000 },
-       { "CURING", ACT_CURING, 30, 5000 },
-       { "CURE_MANA_FULL", ACT_CURE_MANA_FULL, 60, 20000 },
-
-       { "ESP", ACT_ESP, 30, 1500 },
-       { "BERSERK", ACT_BERSERK, 10, 800 },
-       { "PROT_EVIL", ACT_PROT_EVIL, 30, 5000 },
-       { "RESIST_ALL", ACT_RESIST_ALL, 30, 5000 },
-       { "SPEED", ACT_SPEED, 40, 15000 },
-       { "XTRA_SPEED", ACT_XTRA_SPEED, 40, 25000 },
-       { "WRAITH", ACT_WRAITH, 90, 25000 },
-       { "INVULN", ACT_INVULN, 90, 25000 },
-       { "HELO", ACT_HELO, 10, 500 },
-       { "HELO_SPEED", ACT_HELO_SPEED, 30, 20000 },
-       { "RESIST_ACID", ACT_RESIST_ACID, 20, 2000 },
-       { "RESIST_FIRE", ACT_RESIST_FIRE, 20, 2000 },
-       { "RESIST_COLD", ACT_RESIST_COLD, 20, 2000 },
-       { "RESIST_ELEC", ACT_RESIST_ELEC, 20, 2000 },
-       { "RESIST_POIS", ACT_RESIST_POIS, 20, 2000 },
-
-       { "LIGHT", ACT_LIGHT, 10, 150 },
-       { "MAP_LIGHT", ACT_MAP_LIGHT, 30, 500 },
-       { "DETECT_ALL", ACT_DETECT_ALL, 30, 1000 },
-       { "DETECT_XTRA", ACT_DETECT_XTRA, 50, 12500 },
-       { "ID_FULL", ACT_ID_FULL, 50, 10000 },
-       { "ID_PLAIN", ACT_ID_PLAIN, 20, 1250 },
-       { "RUNE_EXPLO", ACT_RUNE_EXPLO, 40, 4000 },
-       { "RUNE_PROT", ACT_RUNE_PROT, 60, 10000 },
-       { "SATIATE", ACT_SATIATE, 10, 2000 },
-       { "DEST_DOOR", ACT_DEST_DOOR, 10, 100 },
-       { "STONE_MUD", ACT_STONE_MUD, 20, 1000 },
-       { "RECHARGE", ACT_RECHARGE, 30, 1000 },
-       { "ALCHEMY", ACT_ALCHEMY, 50, 10000 },
-       { "DIM_DOOR", ACT_DIM_DOOR, 50, 10000 },
-       { "TELEPORT", ACT_TELEPORT, 10, 2000 },
-       { "RECALL", ACT_RECALL, 30, 7500 },
-       { "JUDGE", ACT_JUDGE, 90, 50000 },
-       { "TELEKINESIS", ACT_TELEKINESIS, 20, 5500 },
-       { "DETECT_UNIQUE", ACT_DETECT_UNIQUE, 40, 10000 },
-       { "ESCAPE", ACT_ESCAPE, 10, 3000 },
-       { "DISP_CURSE_XTRA", ACT_DISP_CURSE_XTRA, 40, 30000 },
-       { "BRAND_FIRE_BOLTS", ACT_BRAND_FIRE_BOLTS, 40, 20000 },
-       { "RECHARGE_XTRA", ACT_RECHARGE_XTRA, 70, 30000 },
-       { "LORE", ACT_LORE, 10, 30000 },
-       { "SHIKOFUMI", ACT_SHIKOFUMI, 10, 10000 },
-       { "PHASE_DOOR", ACT_PHASE_DOOR, 10, 1500 },
-       { "DETECT_ALL_MONS", ACT_DETECT_ALL_MONS, 30, 3000 },
-       { "ULTIMATE_RESIST", ACT_ULTIMATE_RESIST, 90, 20000 },
-
-       { "FISHING", ACT_FISHING, 0, 100 },
-       { "INROU", ACT_INROU, 40, 15000 },
-       { "MURAMASA", ACT_MURAMASA, 0, 0 },
-       { "BLOODY_MOON", ACT_BLOODY_MOON, 0, 0 },
-       { "CRIMSON", ACT_CRIMSON, 0, 50000 },
-
-       { NULL, 0, 0, 0 }
+       { "SUNLIGHT", ACT_SUNLIGHT, 10, 250, {10, 0} },
+       { "BO_MISS_1", ACT_BO_MISS_1, 10, 250, {2, 0} },
+       { "BA_POIS_1", ACT_BA_POIS_1, 10, 300, {4, 4} },
+       { "BO_ELEC_1", ACT_BO_ELEC_1, 20, 250, {5, 5} },
+       { "BO_ACID_1", ACT_BO_ACID_1, 20, 250, {6, 6} },
+       { "BO_COLD_1", ACT_BO_COLD_1, 20, 250, {7, 7} },
+       { "BO_FIRE_1", ACT_BO_FIRE_1, 20, 250, {8, 8} },
+       { "BA_COLD_1", ACT_BA_COLD_1, 30, 750, {6, 6} },
+       { "BA_FIRE_1", ACT_BA_FIRE_1, 30, 1000, {9, 9} },
+       { "DRAIN_1", ACT_DRAIN_1, 30, 500, {100, 100} },
+       { "BA_COLD_2", ACT_BA_COLD_2, 40, 1250, {12, 12} },
+       { "BA_ELEC_2", ACT_BA_ELEC_2, 40, 1500, {12, 12} },
+       { "BA_FIRE_2", ACT_BA_FIRE_2, 40, 1500, {15, 0} },
+       { "DRAIN_2", ACT_DRAIN_2, 40, 750, {400, 0} },
+       { "VAMPIRE_1", ACT_VAMPIRE_1, 40, 1000, {400, 0} },
+       { "BO_MISS_2", ACT_BO_MISS_2, 40, 1000, {90, 90} },
+       { "BA_FIRE_3", ACT_BA_FIRE_3, 60, 1750, {225, 225} },
+       { "BA_COLD_3", ACT_BA_COLD_3, 70, 2500, {325, 325} },
+       { "BA_ELEC_3", ACT_BA_ELEC_3, 70, 2500, {425, 425} },
+       { "WHIRLWIND", ACT_WHIRLWIND, 50, 7500, {250, 0} },
+       { "VAMPIRE_2", ACT_VAMPIRE_2, 50, 2500, {400, 0} },
+       { "CALL_CHAOS", ACT_CALL_CHAOS, 70, 5000, {350, 0} },
+       { "ROCKET", ACT_ROCKET, 70, 5000, {400, 0} },
+       { "DISP_EVIL", ACT_DISP_EVIL, 50, 4000, {100, 100} },
+       { "BA_MISS_3", ACT_BA_MISS_3, 50, 1500, {500, 0} },
+       { "DISP_GOOD", ACT_DISP_GOOD, 50, 3500, {100, 100} },
+       { "BO_MANA", ACT_BO_MANA, 40, 1500, {90, 90} },
+       { "BA_WATER", ACT_BA_WATER, 50, 2000, {250, 0} },
+       { "BA_STAR", ACT_BA_STAR, 50, 2200, {200, 200} },
+       { "BA_DARK", ACT_BA_DARK, 50, 2200, {150, 150} },
+       { "BA_MANA", ACT_BA_MANA, 70, 2500, {150, 150} },
+       { "PESTICIDE", ACT_PESTICIDE, 10, 500, {55, 55} },
+       { "BLINDING_LIGHT", ACT_BLINDING_LIGHT, 30, 5000, {250, 0} },
+       { "BIZARRE", ACT_BIZARRE, 90, 10000, {450, 450} },
+       { "CAST_BA_STAR", ACT_CAST_BA_STAR, 70, 7500, {1000, 0} },
+       { "BLADETURNER", ACT_BLADETURNER, 80, 20000, {400, 0} },
+       { "BA_ACID_1", ACT_BA_ACID_1, 30, 1000, {12, 12} },
+       { "BR_FIRE", ACT_BR_FIRE, 50, 5000, {-1, 0} },
+       { "BR_COLD", ACT_BR_COLD, 50, 5000, {-1, 0} },
+
+       { "CONFUSE", ACT_CONFUSE, 10, 500, {15, 0} },
+       { "SLEEP", ACT_SLEEP, 10, 750, {55, 0} },
+       { "QUAKE", ACT_QUAKE, 30, 600, {50, 0} },
+       { "TERROR", ACT_TERROR, 20, 2500, {-1, 0} },
+       { "TELE_AWAY", ACT_TELE_AWAY, 20, 2000, {150, 0} },
+       { "BANISH_EVIL", ACT_BANISH_EVIL, 40, 2000, {250, 250} },
+       { "GENOCIDE", ACT_GENOCIDE, 50, 10000, {500, 0} },
+       { "MASS_GENO", ACT_MASS_GENO, 50, 10000, {1000, 0} },
+       { "SCARE_AREA", ACT_SCARE_AREA, 20, 2500, {40, 40} },
+       { "AGGRAVATE", ACT_AGGRAVATE, 0, 100, {0, 0} },
+
+       { "CHARM_ANIMAL", ACT_CHARM_ANIMAL, 40, 7500, {200, 0} },
+       { "CHARM_UNDEAD", ACT_CHARM_UNDEAD, 40, 10000, {333, 0} },
+       { "CHARM_OTHER", ACT_CHARM_OTHER, 40, 10000, {400, 0} },
+       { "CHARM_ANIMALS", ACT_CHARM_ANIMALS, 40, 12500, {500, 0} },
+       { "CHARM_OTHERS", ACT_CHARM_OTHERS, 40, 17500, {750, 0} },
+       { "SUMMON_ANIMAL", ACT_SUMMON_ANIMAL, 50, 10000, {200, 300} },
+       { "SUMMON_PHANTOM", ACT_SUMMON_PHANTOM, 50, 12000, {200, 200} },
+       { "SUMMON_ELEMENTAL", ACT_SUMMON_ELEMENTAL, 50, 15000, {750, 0} },
+       { "SUMMON_DEMON", ACT_SUMMON_DEMON, 50, 20000, {666, 333} },
+       { "SUMMON_UNDEAD", ACT_SUMMON_UNDEAD, 50, 20000, {666, 333} },
+       { "SUMMON_HOUND", ACT_SUMMON_HOUND, 50, 15000, {300, 150} },
+       { "SUMMON_DAWN", ACT_SUMMON_DAWN, 50, 15000, {500, 500} },
+       { "SUMMON_OCTOPUS", ACT_SUMMON_OCTOPUS, 50, 15000, {300, 150} },
+
+       { "CHOIR_SINGS", ACT_CHOIR_SINGS, 60, 20000, {300, 0} },
+       { "CURE_LW", ACT_CURE_LW, 10, 500, {10, 0} },
+       { "CURE_MW", ACT_CURE_MW, 20, 750, {3, 3} },
+       { "CURE_POISON", ACT_CURE_POISON, 10, 1000, {5, 0} },
+       { "REST_LIFE", ACT_REST_LIFE, 40, 7500, {450, 0} },
+       { "REST_ALL", ACT_REST_ALL, 30, 15000, {750, 0} },
+       { "CURE_700", ACT_CURE_700, 40, 10000, {250, 0} },
+       { "CURE_1000", ACT_CURE_1000, 50, 15000, {888, 0} },
+       { "CURING", ACT_CURING, 30, 5000, {100, 0} },
+       { "CURE_MANA_FULL", ACT_CURE_MANA_FULL, 60, 20000, {777, 0} },
+
+       { "ESP", ACT_ESP, 30, 1500, {200, 0} },
+       { "BERSERK", ACT_BERSERK, 10, 800, {75, 75} },
+       { "PROT_EVIL", ACT_PROT_EVIL, 30, 5000, {200, 200} },
+       { "RESIST_ALL", ACT_RESIST_ALL, 30, 5000, {111, 0} },
+       { "SPEED", ACT_SPEED, 40, 15000, {250, 0} },
+       { "XTRA_SPEED", ACT_XTRA_SPEED, 40, 25000, {200, 200} },
+       { "WRAITH", ACT_WRAITH, 90, 25000, {1000, 0} },
+       { "INVULN", ACT_INVULN, 90, 25000, {1000, 0} },
+       { "HELO", ACT_HELO, 10, 500, {30, 30} },
+       { "HELO_SPEED", ACT_HELO_SPEED, 30, 20000, {100, 200} },
+       { "RESIST_ACID", ACT_RESIST_ACID, 20, 2000, {40, 40} },
+       { "RESIST_FIRE", ACT_RESIST_FIRE, 20, 2000, {40, 40} },
+       { "RESIST_COLD", ACT_RESIST_COLD, 20, 2000, {40, 40} },
+       { "RESIST_ELEC", ACT_RESIST_ELEC, 20, 2000, {40, 40} },
+       { "RESIST_POIS", ACT_RESIST_ACID, 20, 2000, {40, 40} },
+
+       { "LIGHT", ACT_LIGHT, 10, 150, {10, 10} },
+       { "MAP_LIGHT", ACT_MAP_LIGHT, 30, 500, {50, 50} },
+       { "DETECT_ALL", ACT_DETECT_ALL, 30, 1000, {55, 55} },
+       { "DETECT_XTRA", ACT_DETECT_XTRA, 50, 12500, {100, 0} },
+       { "ID_FULL", ACT_ID_FULL, 50, 10000, {75, 0} },
+       { "ID_PLAIN", ACT_ID_PLAIN, 20, 1250, {10, 0} },
+       { "RUNE_EXPLO", ACT_RUNE_EXPLO, 40, 4000, {200, 0} },
+       { "RUNE_PROT", ACT_RUNE_PROT, 60, 10000, {400, 0} },
+       { "SATIATE", ACT_SATIATE, 10, 2000, {200, 0} },
+       { "DEST_DOOR", ACT_DEST_DOOR, 10, 100, {10, 0} },
+       { "STONE_MUD", ACT_STONE_MUD, 20, 1000, {3, 0} },
+       { "RECHARGE", ACT_RECHARGE, 30, 1000, {70, 0} },
+       { "ALCHEMY", ACT_ALCHEMY, 50, 10000, {500, 0} },
+       { "DIM_DOOR", ACT_DIM_DOOR, 50, 10000, {100, 0} },
+       { "TELEPORT", ACT_TELEPORT, 10, 2000, {25, 0} },
+       { "RECALL", ACT_RECALL, 30, 7500, {200, 0} },
+       { "JUDGE", ACT_JUDGE, 90, 50000, {20, 20} },
+       { "TELEKINESIS", ACT_TELEKINESIS, 20, 5500, {25, 25} },
+       { "DETECT_UNIQUE", ACT_DETECT_UNIQUE, 40, 10000, {200, 0} },
+       { "ESCAPE", ACT_ESCAPE, 10, 3000, {35, 0} },
+       { "DISP_CURSE_XTRA", ACT_DISP_CURSE_XTRA, 40, 30000, {0, 0} },
+       { "BRAND_FIRE_BOLTS", ACT_BRAND_FIRE_BOLTS, 40, 20000, {999, 0} },
+       { "RECHARGE_XTRA", ACT_RECHARGE_XTRA, 70, 30000, {200, 0} },
+       { "LORE", ACT_LORE, 10, 30000, {0, 0} },
+       { "SHIKOFUMI", ACT_SHIKOFUMI, 10, 10000, {100, 100} },
+       { "PHASE_DOOR", ACT_PHASE_DOOR, 10, 1500, {10, 0} },
+       { "DETECT_ALL_MONS", ACT_DETECT_ALL_MONS, 30, 3000, {150, 0} },
+       { "ULTIMATE_RESIST", ACT_ULTIMATE_RESIST, 90, 20000, {777, 0} },
+
+       { "FISHING", ACT_FISHING, 0, 100, {0, 0} },
+       { "INROU", ACT_INROU, 40, 15000, {150, 150} },
+       { "MURAMASA", ACT_MURAMASA, 0, 0, {-1, 0} },
+       { "BLOODY_MOON", ACT_BLOODY_MOON, 0, 0, {3333, 0} },
+       { "CRIMSON", ACT_CRIMSON, 0, 50000, {15, 0} },
+
+       { NULL, 0, 0, 0, {0, 0} }
 };
index 04062af..0213759 100644 (file)
@@ -1715,4 +1715,8 @@ typedef struct {
        byte index;
        byte level;
        s32b value;
+       struct {
+               int constant;
+               int dice;
+       } timeout;
 } activation_type;