OSDN Git Service

aae51860201b2578355a82281cfce3ffbc28378d
[hengband/hengband.git] / src / object-activation / activation-switcher.c
1 /*!
2  * @brief プレイヤーの発動コマンド実装
3  * @date 2018/09/07
4  * @author deskull
5  */
6
7 #include "object-activation/activation-switcher.h"
8 #include "action/action-limited.h"
9 #include "action/activation-execution.h"
10 #include "art-definition/art-bow-types.h"
11 #include "art-definition/art-sword-types.h"
12 #include "art-definition/art-weapon-types.h"
13 #include "art-definition/random-art-effects.h"
14 #include "artifact/artifact-info.h"
15 #include "cmd-io/cmd-save.h"
16 #include "core/asking-player.h"
17 #include "core/hp-mp-processor.h"
18 #include "core/player-update-types.h"
19 #include "core/window-redrawer.h"
20 #include "effect/effect-characteristics.h"
21 #include "effect/spells-effect-util.h"
22 #include "floor/cave.h"
23 #include "floor/floor-object.h"
24 #include "floor/floor.h"
25 #include "game-option/disturbance-options.h"
26 #include "game-option/input-options.h"
27 #include "game-option/special-options.h"
28 #include "grid/feature-flag-types.h"
29 #include "grid/grid.h"
30 #include "main/sound-definitions-table.h"
31 #include "main/sound-of-music.h"
32 #include "monster-floor/monster-generator.h"
33 #include "monster-floor/monster-summon.h"
34 #include "monster-floor/place-monster-types.h"
35 #include "monster-race/monster-race.h"
36 #include "monster-race/race-flags1.h"
37 #include "monster/monster-info.h"
38 #include "monster/monster-status.h"
39 #include "monster/monster-util.h"
40 #include "monster/smart-learn-types.h"
41 #include "object-activation/activation-breath.h"
42 #include "object-enchant/activation-info-table.h"
43 #include "object-enchant/dragon-breaths-table.h"
44 #include "object-enchant/object-ego.h"
45 #include "object-hook/hook-enchant.h"
46 #include "object-hook/hook-magic.h"
47 #include "object/item-tester-hooker.h"
48 #include "object/item-use-flags.h"
49 #include "object/object-flags.h"
50 #include "object/object-info.h"
51 #include "object/object-kind.h"
52 #include "player-attack/player-attack.h"
53 #include "player/attack-defense-types.h"
54 #include "player/avatar.h"
55 #include "player/digestion-processor.h"
56 #include "player/player-damage.h"
57 #include "player/player-race-types.h"
58 #include "player/special-defense-types.h"
59 #include "racial/racial-android.h"
60 #include "specific-object/death-crimson.h"
61 #include "spell-kind/earthquake.h"
62 #include "spell-kind/magic-item-recharger.h"
63 #include "spell-kind/spells-beam.h"
64 #include "spell-kind/spells-charm.h"
65 #include "spell-kind/spells-curse-removal.h"
66 #include "spell-kind/spells-detection.h"
67 #include "spell-kind/spells-fetcher.h"
68 #include "spell-kind/spells-floor.h"
69 #include "spell-kind/spells-genocide.h"
70 #include "spell-kind/spells-grid.h"
71 #include "spell-kind/spells-launcher.h"
72 #include "spell-kind/spells-lite.h"
73 #include "spell-kind/spells-neighbor.h"
74 #include "spell-kind/spells-perception.h"
75 #include "spell-kind/spells-random.h"
76 #include "spell-kind/spells-sight.h"
77 #include "spell-kind/spells-specific-bolt.h"
78 #include "spell-kind/spells-teleport.h"
79 #include "spell-kind/spells-world.h"
80 #include "spell-realm/spells-hex.h"
81 #include "spell-realm/spells-sorcery.h"
82 #include "spell/process-effect.h"
83 #include "spell/spell-types.h"
84 #include "spell/spells-object.h"
85 #include "spell/spells-status.h"
86 #include "spell/spells-summon.h"
87 #include "status/action-setter.h"
88 #include "status/bad-status-setter.h"
89 #include "status/base-status.h"
90 #include "status/body-improvement.h"
91 #include "status/buff-setter.h"
92 #include "status/element-resistance.h"
93 #include "status/experience.h"
94 #include "status/shape-changer.h"
95 #include "status/sight-setter.h"
96 #include "status/temporary-resistance.h"
97 #include "sv-definition/sv-lite-types.h"
98 #include "sv-definition/sv-ring-types.h"
99 #include "system/artifact-type-definition.h"
100 #include "system/floor-type-definition.h"
101 #include "target/target-getter.h"
102 #include "term/screen-processor.h"
103 #include "util/bit-flags-calculator.h"
104 #include "util/quarks.h"
105 #include "util/sort.h"
106 #include "view/display-messages.h"
107 #include "world/world.h"
108
109 bool activate_sunlight(player_type *user_ptr)
110 {
111     DIRECTION dir;
112     if (!get_aim_dir(user_ptr, &dir))
113         return FALSE;
114
115     msg_print(_("太陽光線が放たれた。", "A line of sunlight appears."));
116     (void)lite_line(user_ptr, dir, damroll(6, 8));
117     return TRUE;
118 }
119
120 bool activate_missile_1(player_type *user_ptr)
121 {
122     DIRECTION dir;
123     msg_print(_("それは眩しいくらいに明るく輝いている...", "It glows extremely brightly..."));
124     if (!get_aim_dir(user_ptr, &dir))
125         return FALSE;
126
127     (void)fire_bolt(user_ptr, GF_MISSILE, dir, damroll(2, 6));
128     return TRUE;
129 }
130
131 bool activate_ball_pois_1(player_type *user_ptr)
132 {
133     DIRECTION dir;
134     msg_print(_("それは濃緑色に脈動している...", "It throbs deep green..."));
135     if (!get_aim_dir(user_ptr, &dir))
136         return FALSE;
137
138     (void)fire_ball(user_ptr, GF_POIS, dir, 12, 3);
139     return TRUE;
140 }
141
142 bool activate_bolt_elec_1(player_type *user_ptr)
143 {
144     DIRECTION dir;
145     msg_print(_("それは火花に覆われた...", "It is covered in sparks..."));
146     if (!get_aim_dir(user_ptr, &dir))
147         return FALSE;
148
149     (void)fire_bolt(user_ptr, GF_ELEC, dir, damroll(4, 8));
150     return TRUE;
151 }
152
153 bool activate_bolt_acid_1(player_type *user_ptr)
154 {
155     DIRECTION dir;
156     msg_print(_("それは酸に覆われた...", "It is covered in acid..."));
157     if (!get_aim_dir(user_ptr, &dir))
158         return FALSE;
159
160     (void)fire_bolt(user_ptr, GF_ACID, dir, damroll(5, 8));
161     return TRUE;
162 }
163
164 bool activate_bolt_cold_1(player_type *user_ptr)
165 {
166     DIRECTION dir;
167     msg_print(_("それは霜に覆われた...", "It is covered in frost..."));
168     if (!get_aim_dir(user_ptr, &dir))
169         return FALSE;
170
171     (void)fire_bolt(user_ptr, GF_COLD, dir, damroll(6, 8));
172     return TRUE;
173 }
174
175 bool activate_bolt_fire_1(player_type *user_ptr)
176 {
177     DIRECTION dir;
178     msg_print(_("それは炎に覆われた...", "It is covered in fire..."));
179     if (!get_aim_dir(user_ptr, &dir))
180         return FALSE;
181
182     (void)fire_bolt(user_ptr, GF_FIRE, dir, damroll(9, 8));
183     return TRUE;
184 }
185
186 bool activate_ball_cold_1(player_type *user_ptr)
187 {
188     DIRECTION dir;
189     msg_print(_("それは霜に覆われた...", "It is covered in frost..."));
190     if (!get_aim_dir(user_ptr, &dir))
191         return FALSE;
192
193     (void)fire_ball(user_ptr, GF_COLD, dir, 48, 2);
194     return TRUE;
195 }
196
197 bool activate_ball_cold_2(player_type *user_ptr)
198 {
199     DIRECTION dir;
200     msg_print(_("それは青く激しく輝いた...", "It glows an intense blue..."));
201     if (!get_aim_dir(user_ptr, &dir))
202         return FALSE;
203
204     (void)fire_ball(user_ptr, GF_COLD, dir, 100, 2);
205     return TRUE;
206 }
207
208 bool activate_ball_cold_3(player_type *user_ptr)
209 {
210     DIRECTION dir;
211     msg_print(_("明るく白色に輝いている...", "It glows bright white..."));
212     if (!get_aim_dir(user_ptr, &dir))
213         return FALSE;
214
215     (void)fire_ball(user_ptr, GF_COLD, dir, 400, 3);
216     return TRUE;
217 }
218
219 bool activate_ball_fire_1(player_type *user_ptr)
220 {
221     DIRECTION dir;
222     msg_print(_("それは赤く激しく輝いた...", "It glows an intense red..."));
223     if (!get_aim_dir(user_ptr, &dir))
224         return FALSE;
225
226     (void)fire_ball(user_ptr, GF_FIRE, dir, 72, 2);
227     return TRUE;
228 }
229
230 bool activate_ball_fire_2(player_type *user_ptr, concptr name)
231 {
232     DIRECTION dir;
233     msg_format(_("%sから炎が吹き出した...", "The %s rages in fire..."), name);
234     if (!get_aim_dir(user_ptr, &dir))
235         return FALSE;
236
237     (void)fire_ball(user_ptr, GF_FIRE, dir, 120, 3);
238     return TRUE;
239 }
240
241 bool activate_ball_fire_3(player_type *user_ptr)
242 {
243     DIRECTION dir;
244     msg_print(_("深赤色に輝いている...", "It glows deep red..."));
245     if (!get_aim_dir(user_ptr, &dir))
246         return FALSE;
247
248     (void)fire_ball(user_ptr, GF_FIRE, dir, 300, 3);
249     return TRUE;
250 }
251
252 bool activate_ball_fire_4(player_type *user_ptr)
253 {
254     DIRECTION dir;
255     msg_print(_("それは赤く激しく輝いた...", "It glows an intense red..."));
256     if (!get_aim_dir(user_ptr, &dir))
257         return FALSE;
258
259     (void)fire_ball(user_ptr, GF_FIRE, dir, 100, 2);
260     return TRUE;
261 }
262
263 bool activate_ball_elec_2(player_type *user_ptr)
264 {
265     DIRECTION dir;
266     msg_print(_("電気がパチパチ音を立てた...", "It crackles with electricity..."));
267     if (!get_aim_dir(user_ptr, &dir))
268         return FALSE;
269
270     (void)fire_ball(user_ptr, GF_ELEC, dir, 100, 3);
271     return TRUE;
272 }
273
274 bool activate_ball_elec_3(player_type *user_ptr)
275 {
276     DIRECTION dir;
277     msg_print(_("深青色に輝いている...", "It glows deep blue..."));
278     if (!get_aim_dir(user_ptr, &dir))
279         return FALSE;
280
281     (void)fire_ball(user_ptr, GF_ELEC, dir, 500, 3);
282     return TRUE;
283 }
284
285 bool activate_ball_acid_1(player_type *user_ptr)
286 {
287     DIRECTION dir;
288     msg_print(_("それは黒く激しく輝いた...", "It glows an intense black..."));
289     if (!get_aim_dir(user_ptr, &dir))
290         return FALSE;
291
292     (void)fire_ball(user_ptr, GF_ACID, dir, 100, 2);
293     return TRUE;
294 }
295
296 bool activate_ball_nuke_1(player_type *user_ptr)
297 {
298     DIRECTION dir;
299     msg_print(_("それは緑に激しく輝いた...", "It glows an intense green..."));
300     if (!get_aim_dir(user_ptr, &dir))
301         return FALSE;
302
303     (void)fire_ball(user_ptr, GF_NUKE, dir, 100, 2);
304     return TRUE;
305 }
306
307 bool activate_bolt_hypodynamia_1(player_type *user_ptr, concptr name)
308 {
309     DIRECTION dir;
310     msg_format(_("あなたは%sに敵を締め殺すよう命じた。", "You order the %s to strangle your opponent."), name);
311     if (!get_aim_dir(user_ptr, &dir))
312         return FALSE;
313
314     hypodynamic_bolt(user_ptr, dir, 100);
315     return TRUE;
316 }
317
318 bool activate_bolt_hypodynamia_2(player_type *user_ptr)
319 {
320     DIRECTION dir;
321     msg_print(_("黒く輝いている...", "It glows black..."));
322     if (!get_aim_dir(user_ptr, &dir))
323         return FALSE;
324
325     hypodynamic_bolt(user_ptr, dir, 120);
326     return TRUE;
327 }
328
329 bool activate_bolt_drain_1(player_type *user_ptr)
330 {
331     DIRECTION dir;
332     if (!get_aim_dir(user_ptr, &dir))
333         return FALSE;
334
335     for (int dummy = 0; dummy < 3; dummy++)
336         if (hypodynamic_bolt(user_ptr, dir, 50))
337             hp_player(user_ptr, 50);
338
339     return TRUE;
340 }
341
342 bool activate_missile_2(player_type *user_ptr)
343 {
344     DIRECTION dir;
345     msg_print(_("魔法のトゲが現れた...", "It grows magical spikes..."));
346     if (!get_aim_dir(user_ptr, &dir))
347         return FALSE;
348
349     (void)fire_bolt(user_ptr, GF_ARROW, dir, 150);
350     return TRUE;
351 }
352
353 bool activate_bolt_drain_2(player_type *user_ptr)
354 {
355     DIRECTION dir;
356     if (!get_aim_dir(user_ptr, &dir))
357         return FALSE;
358
359     for (int dummy = 0; dummy < 3; dummy++)
360         if (hypodynamic_bolt(user_ptr, dir, 100))
361             hp_player(user_ptr, 100);
362
363     return TRUE;
364 }
365
366 bool activate_rocket(player_type *user_ptr)
367 {
368     DIRECTION dir;
369     if (!get_aim_dir(user_ptr, &dir))
370         return FALSE;
371
372     msg_print(_("ロケットを発射した!", "You launch a rocket!"));
373     (void)fire_ball(user_ptr, GF_ROCKET, dir, 250 + user_ptr->lev * 3, 2);
374     return TRUE;
375 }
376
377 bool activate_missile_3(player_type *user_ptr)
378 {
379     DIRECTION dir;
380     if (!get_aim_dir(user_ptr, &dir))
381         return FALSE;
382
383     msg_print(_("あなたはエレメントのブレスを吐いた。", "You breathe the elements."));
384     fire_breath(user_ptr, GF_MISSILE, dir, 300, 4);
385     return TRUE;
386 }
387
388 bool activate_bolt_mana(player_type *user_ptr, concptr name)
389 {
390     DIRECTION dir;
391     msg_format(_("%sに魔法のトゲが現れた...", "The %s grows magical spikes..."), name);
392     if (!get_aim_dir(user_ptr, &dir))
393         return FALSE;
394
395     (void)fire_bolt(user_ptr, GF_ARROW, dir, 150);
396     return TRUE;
397 }
398
399 bool activate_ball_water(player_type *user_ptr, concptr name)
400 {
401     DIRECTION dir;
402     msg_format(_("%sが深い青色に鼓動している...", "The %s throbs deep blue..."), name);
403     if (!get_aim_dir(user_ptr, &dir))
404         return FALSE;
405
406     (void)fire_ball(user_ptr, GF_WATER, dir, 200, 3);
407     return TRUE;
408 }
409
410 bool activate_ball_dark(player_type *user_ptr, concptr name)
411 {
412     DIRECTION dir;
413     msg_format(_("%sが深い闇に覆われた...", "The %s is coverd in pitch-darkness..."), name);
414     if (!get_aim_dir(user_ptr, &dir))
415         return FALSE;
416
417     (void)fire_ball(user_ptr, GF_DARK, dir, 250, 4);
418     return TRUE;
419 }
420
421 bool activate_ball_mana(player_type *user_ptr, concptr name)
422 {
423     DIRECTION dir;
424     msg_format(_("%sが青白く光った...", "The %s glows pale..."), name);
425     if (!get_aim_dir(user_ptr, &dir))
426         return FALSE;
427
428     (void)fire_ball(user_ptr, GF_MANA, dir, 250, 4);
429     return TRUE;
430 }
431
432 bool activate_ring_of_power(player_type *user_ptr, concptr name)
433 {
434     DIRECTION dir;
435     msg_format(_("%sは漆黒に輝いた...", "The %s glows intensely black..."), name);
436     if (!get_aim_dir(user_ptr, &dir))
437         return FALSE;
438
439     ring_of_power(user_ptr, dir);
440     return TRUE;
441 }
442
443 bool activate_ball_lite(player_type *user_ptr, concptr name)
444 {
445     HIT_POINT num = damroll(5, 3);
446     POSITION y = 0, x = 0;
447     msg_format(_("%sが稲妻で覆われた...", "The %s is surrounded by lightning..."), name);
448     for (int k = 0; k < num; k++) {
449         int attempts = 1000;
450         while (attempts--) {
451             scatter(user_ptr, &y, &x, user_ptr->y, user_ptr->x, 4, 0);
452             if (!cave_have_flag_bold(user_ptr->current_floor_ptr, y, x, FF_PROJECT))
453                 continue;
454
455             if (!player_bold(user_ptr, y, x))
456                 break;
457         }
458
459         project(user_ptr, 0, 3, y, x, 150, GF_ELEC, (PROJECT_THRU | PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL), -1);
460     }
461
462     return TRUE;
463 }
464
465 bool activate_bladeturner(player_type *user_ptr)
466 {
467     DIRECTION dir;
468     if (!get_aim_dir(user_ptr, &dir))
469         return FALSE;
470
471     msg_print(_("あなたはエレメントのブレスを吐いた。", "You breathe the elements."));
472     fire_breath(user_ptr, GF_MISSILE, dir, 300, 4);
473     msg_print(_("鎧が様々な色に輝いた...", "Your armor glows many colours..."));
474     (void)set_afraid(user_ptr, 0);
475     (void)set_hero(user_ptr, randint1(50) + 50, FALSE);
476     (void)hp_player(user_ptr, 10);
477     (void)set_blessed(user_ptr, randint1(50) + 50, FALSE);
478     (void)set_oppose_acid(user_ptr, randint1(50) + 50, FALSE);
479     (void)set_oppose_elec(user_ptr, randint1(50) + 50, FALSE);
480     (void)set_oppose_fire(user_ptr, randint1(50) + 50, FALSE);
481     (void)set_oppose_cold(user_ptr, randint1(50) + 50, FALSE);
482     (void)set_oppose_pois(user_ptr, randint1(50) + 50, FALSE);
483     return TRUE;
484 }
485
486 bool activate_confusion(player_type *user_ptr)
487 {
488     DIRECTION dir;
489     msg_print(_("様々な色の火花を発している...", "It glows in scintillating colours..."));
490     if (!get_aim_dir(user_ptr, &dir))
491         return FALSE;
492
493     confuse_monster(user_ptr, dir, 20);
494     return TRUE;
495 }
496
497 bool activate_teleport_away(player_type *user_ptr)
498 {
499     DIRECTION dir;
500     if (!get_aim_dir(user_ptr, &dir))
501         return FALSE;
502
503     (void)fire_beam(user_ptr, GF_AWAY_ALL, dir, user_ptr->lev);
504     return TRUE;
505 }
506
507 bool activate_banish_evil(player_type *user_ptr)
508 {
509     if (banish_evil(user_ptr, 100))
510         msg_print(_("アーティファクトの力が邪悪を打ち払った!", "The power of the artifact banishes evil!"));
511
512     return TRUE;
513 }
514
515 bool activate_scare(player_type *user_ptr)
516 {
517     if (music_singing_any(user_ptr))
518         stop_singing(user_ptr);
519
520     if (hex_spelling_any(user_ptr))
521         stop_hex_spell_all(user_ptr);
522
523     msg_print(_("あなたは力強い突風を吹き鳴らした。周囲の敵が震え上っている!", "You wind a mighty blast; your enemies tremble!"));
524     (void)turn_monsters(user_ptr, (3 * user_ptr->lev / 2) + 10);
525     return TRUE;
526 }
527
528 bool activate_aggravation(player_type *user_ptr, object_type *o_ptr, concptr name)
529 {
530     if (o_ptr->name1 == ART_HYOUSIGI)
531         msg_print(_("拍子木を打った。", "You beat your wooden clappers."));
532     else
533         msg_format(_("%sは不快な物音を立てた。", "The %s sounds an unpleasant noise."), name);
534
535     aggravate_monsters(user_ptr, 0);
536     return TRUE;
537 }
538
539 bool switch_activation(player_type *user_ptr, object_type *o_ptr, const activation_type *const act_ptr, concptr name)
540 {
541     DIRECTION dir;
542     switch (act_ptr->index) {
543     case ACT_SUNLIGHT:
544         return activate_sunlight(user_ptr);
545     case ACT_BO_MISS_1:
546         return activate_missile_1(user_ptr);
547     case ACT_BA_POIS_1:
548         return activate_ball_pois_1(user_ptr);
549     case ACT_BO_ELEC_1:
550         return activate_bolt_elec_1(user_ptr);
551     case ACT_BO_ACID_1:
552         return activate_bolt_acid_1(user_ptr);
553     case ACT_BO_COLD_1:
554         return activate_bolt_cold_1(user_ptr);
555     case ACT_BO_FIRE_1:
556         return activate_bolt_fire_1(user_ptr);
557     case ACT_BA_COLD_1:
558         return activate_ball_cold_1(user_ptr);
559     case ACT_BA_COLD_2:
560         return activate_ball_cold_2(user_ptr);
561     case ACT_BA_COLD_3:
562         return activate_ball_cold_2(user_ptr);
563     case ACT_BA_FIRE_1:
564         return activate_ball_fire_1(user_ptr);
565     case ACT_BA_FIRE_2:
566         return activate_ball_fire_2(user_ptr, name);
567     case ACT_BA_FIRE_3:
568         return activate_ball_fire_3(user_ptr);
569     case ACT_BA_FIRE_4:
570         return activate_ball_fire_4(user_ptr);
571     case ACT_BA_ELEC_2:
572         return activate_ball_elec_2(user_ptr);
573     case ACT_BA_ELEC_3:
574         return activate_ball_elec_3(user_ptr);
575     case ACT_BA_ACID_1:
576         return activate_ball_acid_1(user_ptr);
577     case ACT_BA_NUKE_1:
578         return activate_ball_nuke_1(user_ptr);
579     case ACT_HYPODYNAMIA_1:
580         return activate_bolt_hypodynamia_1(user_ptr, name);
581     case ACT_HYPODYNAMIA_2:
582         return activate_bolt_hypodynamia_2(user_ptr);
583     case ACT_DRAIN_1:
584         return activate_bolt_drain_1(user_ptr);
585     case ACT_BO_MISS_2:
586         return activate_missile_2(user_ptr);
587     case ACT_WHIRLWIND:
588         massacre(user_ptr);
589         return TRUE;
590     case ACT_DRAIN_2:
591         return activate_bolt_drain_2(user_ptr);
592     case ACT_CALL_CHAOS:
593         msg_print(_("様々な色の火花を発している...", "It glows in scintillating colours..."));
594         call_chaos(user_ptr);
595         return TRUE;
596     case ACT_ROCKET:
597         return activate_rocket(user_ptr);
598     case ACT_DISP_EVIL:
599         msg_print(_("神聖な雰囲気が充満した...", "It floods the area with goodness..."));
600         dispel_evil(user_ptr, user_ptr->lev * 5);
601         return TRUE;
602     case ACT_BA_MISS_3:
603         return activate_missile_3(user_ptr);
604     case ACT_DISP_GOOD:
605         msg_print(_("邪悪な雰囲気が充満した...", "It floods the area with evil..."));
606         dispel_good(user_ptr, user_ptr->lev * 5);
607         return TRUE;
608     case ACT_BO_MANA:
609         return activate_bolt_mana(user_ptr, name);
610     case ACT_BA_WATER:
611         return activate_ball_water(user_ptr, name);
612     case ACT_BA_DARK:
613         return activate_ball_dark(user_ptr, name);
614     case ACT_BA_MANA:
615         return activate_ball_mana(user_ptr, name);
616     case ACT_PESTICIDE:
617         msg_print(_("あなたは害虫を一掃した。", "You exterminate small life."));
618         (void)dispel_monsters(user_ptr, 4);
619         return TRUE;
620     case ACT_BLINDING_LIGHT:
621         msg_format(_("%sが眩しい光で輝いた...", "The %s gleams with blinding light..."), name);
622         (void)fire_ball(user_ptr, GF_LITE, 0, 300, 6);
623         confuse_monsters(user_ptr, 3 * user_ptr->lev / 2);
624         return TRUE;
625     case ACT_BIZARRE:
626         return activate_ring_of_power(user_ptr, name);
627     case ACT_CAST_BA_STAR:
628         return activate_ball_lite(user_ptr, name);
629     case ACT_BLADETURNER:
630         return activate_bladeturner(user_ptr);
631     case ACT_BR_FIRE:
632         return activate_breath_fire(user_ptr, o_ptr);
633     case ACT_BR_COLD:
634         return activate_breath_cold(user_ptr, o_ptr);
635     case ACT_BR_DRAGON:
636         return activate_dragon_breath(user_ptr, o_ptr);
637     case ACT_CONFUSE:
638         return activate_confusion(user_ptr);
639     case ACT_SLEEP:
640         msg_print(_("深青色に輝いている...", "It glows deep blue..."));
641         sleep_monsters_touch(user_ptr);
642         return TRUE;
643     case ACT_QUAKE:
644         earthquake(user_ptr, user_ptr->y, user_ptr->x, 5, 0);
645         return TRUE;
646     case ACT_TERROR:
647         turn_monsters(user_ptr, 40 + user_ptr->lev);
648         return TRUE;
649     case ACT_TELE_AWAY:
650         return activate_teleport_away(user_ptr);
651     case ACT_BANISH_EVIL:
652         return activate_banish_evil(user_ptr);
653     case ACT_GENOCIDE:
654         msg_print(_("深青色に輝いている...", "It glows deep blue..."));
655         (void)symbol_genocide(user_ptr, 200, TRUE);
656         return TRUE;
657     case ACT_MASS_GENO:
658         msg_print(_("ひどく鋭い音が流れ出た...", "It lets out a long, shrill note..."));
659         (void)mass_genocide(user_ptr, 200, TRUE);
660         return TRUE;
661     case ACT_SCARE_AREA:
662         return activate_scare(user_ptr);
663     case ACT_AGGRAVATE:
664         return activate_aggravation(user_ptr, o_ptr, name);
665     case ACT_CHARM_ANIMAL:
666         if (!get_aim_dir(user_ptr, &dir))
667             return FALSE;
668
669         (void)charm_animal(user_ptr, dir, user_ptr->lev);
670         return TRUE;
671     case ACT_CHARM_UNDEAD:
672         if (!get_aim_dir(user_ptr, &dir))
673             return FALSE;
674
675         (void)control_one_undead(user_ptr, dir, user_ptr->lev);
676         return TRUE;
677     case ACT_CHARM_OTHER:
678         if (!get_aim_dir(user_ptr, &dir))
679             return FALSE;
680
681         (void)charm_monster(user_ptr, dir, user_ptr->lev * 2);
682         return TRUE;
683     case ACT_CHARM_ANIMALS:
684         (void)charm_animals(user_ptr, user_ptr->lev * 2);
685         return TRUE;
686     case ACT_CHARM_OTHERS:
687         (void)charm_monsters(user_ptr, user_ptr->lev * 2);
688         return TRUE;
689     case ACT_SUMMON_ANIMAL:
690         (void)summon_specific(user_ptr, -1, user_ptr->y, user_ptr->x, user_ptr->lev, SUMMON_ANIMAL_RANGER, (PM_ALLOW_GROUP | PM_FORCE_PET));
691         return TRUE;
692     case ACT_SUMMON_PHANTOM:
693         msg_print(_("幻霊を召喚した。", "You summon a phantasmal servant."));
694         (void)summon_specific(user_ptr, -1, user_ptr->y, user_ptr->x, user_ptr->current_floor_ptr->dun_level, SUMMON_PHANTOM, (PM_ALLOW_GROUP | PM_FORCE_PET));
695         return TRUE;
696     case ACT_SUMMON_ELEMENTAL:
697         return cast_summon_elemental(user_ptr, (user_ptr->lev * 3) / 2);
698     case ACT_SUMMON_DEMON:
699         cast_summon_demon(user_ptr, (user_ptr->lev * 3) / 2);
700         return TRUE;
701     case ACT_SUMMON_UNDEAD:
702         return cast_summon_undead(user_ptr, (user_ptr->lev * 3) / 2);
703     case ACT_SUMMON_HOUND:
704         return cast_summon_hound(user_ptr, (user_ptr->lev * 3) / 2);
705     case ACT_SUMMON_DAWN:
706         msg_print(_("暁の師団を召喚した。", "You summon the Legion of the Dawn."));
707         (void)summon_specific(user_ptr, -1, user_ptr->y, user_ptr->x, user_ptr->current_floor_ptr->dun_level, SUMMON_DAWN, (PM_ALLOW_GROUP | PM_FORCE_PET));
708         return TRUE;
709     case ACT_SUMMON_OCTOPUS:
710         return cast_summon_octopus(user_ptr);
711     case ACT_CHOIR_SINGS:
712         msg_print(_("天国の歌が聞こえる...", "A heavenly choir sings..."));
713         (void)cure_critical_wounds(user_ptr, 777);
714         (void)set_hero(user_ptr, randint1(25) + 25, FALSE);
715         return TRUE;
716     case ACT_CURE_LW:
717         (void)set_afraid(user_ptr, 0);
718         (void)hp_player(user_ptr, 30);
719         return TRUE;
720     case ACT_CURE_MW:
721         msg_print(_("深紫色の光を発している...", "It radiates deep purple..."));
722         (void)cure_serious_wounds(user_ptr, 4, 8);
723         return TRUE;
724     case ACT_CURE_POISON:
725         msg_print(_("深青色に輝いている...", "It glows deep blue..."));
726         (void)set_afraid(user_ptr, 0);
727         (void)set_poisoned(user_ptr, 0);
728         return TRUE;
729     case ACT_REST_EXP:
730         msg_print(_("深紅に輝いている...", "It glows a deep red..."));
731         restore_level(user_ptr);
732         return TRUE;
733     case ACT_REST_ALL:
734         msg_print(_("濃緑色に輝いている...", "It glows a deep green..."));
735         (void)restore_all_status(user_ptr);
736         (void)restore_level(user_ptr);
737         return TRUE;
738     case ACT_CURE_700:
739         msg_print(_("深青色に輝いている...", "It glows deep blue..."));
740         msg_print(_("体内に暖かい鼓動が感じられる...", "You feel a warm tingling inside..."));
741         (void)cure_critical_wounds(user_ptr, 700);
742         return TRUE;
743     case ACT_CURE_1000:
744         msg_print(_("白く明るく輝いている...", "It glows a bright white..."));
745         msg_print(_("ひじょうに気分がよい...", "You feel much better..."));
746         (void)cure_critical_wounds(user_ptr, 1000);
747         return TRUE;
748     case ACT_CURING:
749         msg_format(_("%sの優しさに癒される...", "the %s cures you affectionately ..."), name);
750         true_healing(user_ptr, 0);
751         return TRUE;
752     case ACT_CURE_MANA_FULL:
753         msg_format(_("%sが青白く光った...", "The %s glows pale..."), name);
754         restore_mana(user_ptr, TRUE);
755         return TRUE;
756     case ACT_ESP:
757         (void)set_tim_esp(user_ptr, randint1(30) + 25, FALSE);
758         return TRUE;
759     case ACT_BERSERK:
760         (void)berserk(user_ptr, randint1(25) + 25);
761         return TRUE;
762     case ACT_PROT_EVIL:
763         msg_format(_("%sから鋭い音が流れ出た...", "The %s lets out a shrill wail..."), name);
764         (void)set_protevil(user_ptr, randint1(25) + user_ptr->lev * 3, FALSE);
765         return TRUE;
766     case ACT_RESIST_ALL:
767         msg_print(_("様々な色に輝いている...", "It glows many colours..."));
768         (void)set_oppose_acid(user_ptr, randint1(40) + 40, FALSE);
769         (void)set_oppose_elec(user_ptr, randint1(40) + 40, FALSE);
770         (void)set_oppose_fire(user_ptr, randint1(40) + 40, FALSE);
771         (void)set_oppose_cold(user_ptr, randint1(40) + 40, FALSE);
772         (void)set_oppose_pois(user_ptr, randint1(40) + 40, FALSE);
773         return TRUE;
774     case ACT_SPEED:
775         msg_print(_("明るく緑色に輝いている...", "It glows bright green..."));
776         (void)set_fast(user_ptr, randint1(20) + 20, FALSE);
777         return TRUE;
778     case ACT_XTRA_SPEED:
779         msg_print(_("明るく輝いている...", "It glows brightly..."));
780         (void)set_fast(user_ptr, randint1(75) + 75, FALSE);
781         return TRUE;
782     case ACT_WRAITH:
783         set_wraith_form(user_ptr, randint1(user_ptr->lev / 2) + (user_ptr->lev / 2), FALSE);
784         return TRUE;
785     case ACT_INVULN:
786         (void)set_invuln(user_ptr, randint1(8) + 8, FALSE);
787         return TRUE;
788     case ACT_HERO:
789         (void)heroism(user_ptr, 25);
790         return TRUE;
791     case ACT_HERO_SPEED:
792         (void)set_fast(user_ptr, randint1(50) + 50, FALSE);
793         (void)heroism(user_ptr, 50);
794         return TRUE;
795     case ACT_RESIST_ACID:
796         msg_format(_("%sが黒く輝いた...", "The %s grows black."), name);
797         if ((o_ptr->tval != TV_RING) || (o_ptr->sval != SV_RING_ACID))
798             return TRUE;
799
800         if (!get_aim_dir(user_ptr, &dir))
801             return FALSE;
802
803         (void)fire_ball(user_ptr, GF_ACID, dir, 100, 2);
804         (void)set_oppose_acid(user_ptr, randint1(20) + 20, FALSE);
805         return TRUE;
806     case ACT_RESIST_FIRE:
807         msg_format(_("%sが赤く輝いた...", "The %s grows red."), name);
808         if ((o_ptr->tval != TV_RING) || (o_ptr->sval != SV_RING_FLAMES))
809             return TRUE;
810
811         if (!get_aim_dir(user_ptr, &dir))
812             return FALSE;
813
814         (void)fire_ball(user_ptr, GF_FIRE, dir, 100, 2);
815         (void)set_oppose_fire(user_ptr, randint1(20) + 20, FALSE);
816         return TRUE;
817     case ACT_RESIST_COLD:
818         msg_format(_("%sが白く輝いた...", "The %s grows white."), name);
819         if ((o_ptr->tval != TV_RING) || (o_ptr->sval != SV_RING_ICE))
820             return TRUE;
821
822         if (!get_aim_dir(user_ptr, &dir))
823             return FALSE;
824
825         (void)fire_ball(user_ptr, GF_COLD, dir, 100, 2);
826         (void)set_oppose_cold(user_ptr, randint1(20) + 20, FALSE);
827         return TRUE;
828     case ACT_RESIST_ELEC:
829         msg_format(_("%sが青く輝いた...", "The %s grows blue."), name);
830         if ((o_ptr->tval != TV_RING) || (o_ptr->sval != SV_RING_ELEC))
831             return TRUE;
832
833         if (!get_aim_dir(user_ptr, &dir))
834             return FALSE;
835
836         (void)fire_ball(user_ptr, GF_ELEC, dir, 100, 2);
837         (void)set_oppose_elec(user_ptr, randint1(20) + 20, FALSE);
838         return TRUE;
839     case ACT_RESIST_POIS:
840         msg_format(_("%sが緑に輝いた...", "The %s grows green."), name);
841         (void)set_oppose_pois(user_ptr, randint1(20) + 20, FALSE);
842         return TRUE;
843     case ACT_LIGHT:
844         msg_format(_("%sから澄んだ光があふれ出た...", "The %s wells with clear light..."), name);
845         lite_area(user_ptr, damroll(2, 15), 3);
846         return TRUE;
847     case ACT_MAP_LIGHT:
848         msg_print(_("眩しく輝いた...", "It shines brightly..."));
849         map_area(user_ptr, DETECT_RAD_MAP);
850         lite_area(user_ptr, damroll(2, 15), 3);
851         return TRUE;
852     case ACT_DETECT_ALL:
853         msg_print(_("白く明るく輝いている...", "It glows bright white..."));
854         msg_print(_("心にイメージが浮かんできた...", "An image forms in your mind..."));
855         detect_all(user_ptr, DETECT_RAD_DEFAULT);
856         return TRUE;
857     case ACT_DETECT_XTRA:
858         msg_print(_("明るく輝いている...", "It glows brightly..."));
859         detect_all(user_ptr, DETECT_RAD_DEFAULT);
860         probing(user_ptr);
861         identify_fully(user_ptr, FALSE, 0);
862         return TRUE;
863     case ACT_ID_FULL:
864         msg_print(_("黄色く輝いている...", "It glows yellow..."));
865         identify_fully(user_ptr, FALSE, 0);
866         return TRUE;
867     case ACT_ID_PLAIN:
868         return ident_spell(user_ptr, FALSE, 0);
869     case ACT_RUNE_EXPLO:
870         msg_print(_("明るい赤色に輝いている...", "It glows bright red..."));
871         explosive_rune(user_ptr, user_ptr->y, user_ptr->x);
872         return TRUE;
873     case ACT_RUNE_PROT:
874         msg_print(_("ブルーに明るく輝いている...", "It glows light blue..."));
875         warding_glyph(user_ptr);
876         return TRUE;
877     case ACT_SATIATE:
878         (void)set_food(user_ptr, PY_FOOD_MAX - 1);
879         return TRUE;
880     case ACT_DEST_DOOR:
881         msg_print(_("明るい赤色に輝いている...", "It glows bright red..."));
882         destroy_doors_touch(user_ptr);
883         return TRUE;
884     case ACT_STONE_MUD:
885         msg_print(_("鼓動している...", "It pulsates..."));
886         if (!get_aim_dir(user_ptr, &dir))
887             return FALSE;
888
889         wall_to_mud(user_ptr, dir, 20 + randint1(30));
890         return TRUE;
891     case ACT_RECHARGE:
892         recharge(user_ptr, 130);
893         return TRUE;
894     case ACT_ALCHEMY:
895         msg_print(_("明るい黄色に輝いている...", "It glows bright yellow..."));
896         (void)alchemy(user_ptr);
897         return TRUE;
898     case ACT_DIM_DOOR:
899         msg_print(_("次元の扉が開いた。目的地を選んで下さい。", "You open a dimensional gate. Choose a destination."));
900         return dimension_door(user_ptr);
901     case ACT_TELEPORT:
902         msg_print(_("周りの空間が歪んでいる...", "It twists space around you..."));
903         teleport_player(user_ptr, 100, TELEPORT_SPONTANEOUS);
904         return TRUE;
905     case ACT_RECALL:
906         msg_print(_("やわらかな白色に輝いている...", "It glows soft white..."));
907         return recall_player(user_ptr, randint0(21) + 15);
908     case ACT_JUDGE:
909         msg_format(_("%sは赤く明るく光った!", "The %s flashes bright red!"), name);
910         chg_virtue(user_ptr, V_KNOWLEDGE, 1);
911         chg_virtue(user_ptr, V_ENLIGHTEN, 1);
912         wiz_lite(user_ptr, FALSE);
913
914         msg_format(_("%sはあなたの体力を奪った...", "The %s drains your vitality..."), name);
915         take_hit(user_ptr, DAMAGE_LOSELIFE, damroll(3, 8), _("審判の宝石", "the Jewel of Judgement"), -1);
916
917         (void)detect_traps(user_ptr, DETECT_RAD_DEFAULT, TRUE);
918         (void)detect_doors(user_ptr, DETECT_RAD_DEFAULT);
919         (void)detect_stairs(user_ptr, DETECT_RAD_DEFAULT);
920
921         if (get_check(_("帰還の力を使いますか?", "Activate recall? ")))
922             (void)recall_player(user_ptr, randint0(21) + 15);
923
924         return TRUE;
925     case ACT_TELEKINESIS:
926         if (!get_aim_dir(user_ptr, &dir))
927             return FALSE;
928
929         msg_format(_("%sを伸ばした。", "You stretched your %s."), name);
930         fetch_item(user_ptr, dir, 500, TRUE);
931         return TRUE;
932     case ACT_DETECT_UNIQUE: {
933         monster_type *m_ptr;
934         monster_race *r_ptr;
935         msg_print(_("奇妙な場所が頭の中に浮かんだ...", "Some strange places show up in your mind. And you see ..."));
936         for (int i = user_ptr->current_floor_ptr->m_max - 1; i >= 1; i--) {
937             m_ptr = &user_ptr->current_floor_ptr->m_list[i];
938             if (!monster_is_valid(m_ptr))
939                 continue;
940
941             r_ptr = &r_info[m_ptr->r_idx];
942             if (r_ptr->flags1 & RF1_UNIQUE)
943                 msg_format(_("%s. ", "%s. "), r_name + r_ptr->name);
944         }
945
946         return TRUE;
947     }
948     case ACT_ESCAPE:
949         switch (randint1(13)) {
950         case 1:
951         case 2:
952         case 3:
953         case 4:
954         case 5:
955             teleport_player(user_ptr, 10, TELEPORT_SPONTANEOUS);
956             return TRUE;
957         case 6:
958         case 7:
959         case 8:
960         case 9:
961         case 10:
962             teleport_player(user_ptr, 222, TELEPORT_SPONTANEOUS);
963             return TRUE;
964         case 11:
965         case 12:
966             (void)stair_creation(user_ptr);
967             return TRUE;
968         default:
969             if (!get_check(_("この階を去りますか?", "Leave this level? ")))
970                 return TRUE;
971
972             if (autosave_l)
973                 do_cmd_save_game(user_ptr, TRUE);
974
975             user_ptr->leaving = TRUE;
976             return TRUE;
977         }
978     case ACT_DISP_CURSE_XTRA:
979         msg_format(_("%sが真実を照らし出す...", "The %s exhibits the truth..."), name);
980         (void)remove_all_curse(user_ptr);
981         (void)probing(user_ptr);
982         return TRUE;
983     case ACT_BRAND_FIRE_BOLTS:
984         msg_format(_("%sが深紅に輝いた...", "Your %s glows deep red..."), name);
985         brand_bolts(user_ptr);
986         return TRUE;
987     case ACT_RECHARGE_XTRA:
988         msg_format(_("%sが白く輝いた...", "The %s gleams with blinding light..."), name);
989         return recharge(user_ptr, 1000);
990     case ACT_LORE:
991         msg_print(_("石が隠された秘密を写し出した...", "The stone reveals hidden mysteries..."));
992         return perilous_secrets(user_ptr);
993     case ACT_SHIKOFUMI:
994         msg_print(_("力強く四股を踏んだ。", "You stamp. (as if you are in a ring.)"));
995         (void)set_afraid(user_ptr, 0);
996         (void)set_hero(user_ptr, randint1(20) + 20, FALSE);
997         (void)dispel_evil(user_ptr, user_ptr->lev * 3);
998         return TRUE;
999     case ACT_PHASE_DOOR:
1000         teleport_player(user_ptr, 10, TELEPORT_SPONTANEOUS);
1001         return TRUE;
1002     case ACT_DETECT_ALL_MONS:
1003         (void)detect_monsters_invis(user_ptr, 255);
1004         (void)detect_monsters_normal(user_ptr, 255);
1005         return TRUE;
1006     case ACT_ULTIMATE_RESIST: {
1007         TIME_EFFECT v = randint1(25) + 25;
1008         (void)set_afraid(user_ptr, 0);
1009         (void)set_hero(user_ptr, v, FALSE);
1010         (void)hp_player(user_ptr, 10);
1011         (void)set_blessed(user_ptr, v, FALSE);
1012         (void)set_oppose_acid(user_ptr, v, FALSE);
1013         (void)set_oppose_elec(user_ptr, v, FALSE);
1014         (void)set_oppose_fire(user_ptr, v, FALSE);
1015         (void)set_oppose_cold(user_ptr, v, FALSE);
1016         (void)set_oppose_pois(user_ptr, v, FALSE);
1017         (void)set_ultimate_res(user_ptr, v, FALSE);
1018         return TRUE;
1019     }
1020     case ACT_CAST_OFF:
1021         cosmic_cast_off(user_ptr, o_ptr);
1022         return TRUE;
1023     case ACT_FALLING_STAR:
1024         msg_print(_("あなたは妖刀に魅入られた…", "You are enchanted by cursed blade..."));
1025         msg_print(_("「狂ほしく 血のごとき 月はのぼれり 秘めおきし 魔剣 いずこぞや」", "'Behold the blade arts.'"));
1026         massacre(user_ptr);
1027         return TRUE;
1028     case ACT_GRAND_CROSS:
1029         msg_print(_("「闇に還れ!」", "You say, 'Return to darkness!'"));
1030         project(user_ptr, 0, 8, user_ptr->y, user_ptr->x, (randint1(100) + 200) * 2, GF_HOLY_FIRE, PROJECT_KILL | PROJECT_ITEM | PROJECT_GRID, -1);
1031         return TRUE;
1032     case ACT_TELEPORT_LEVEL:
1033         if (!get_check(_("本当に他の階にテレポートしますか?", "Are you sure? (Teleport Level)")))
1034             return FALSE;
1035
1036         teleport_level(user_ptr, 0);
1037         return TRUE;
1038     case ACT_STRAIN_HASTE:
1039         msg_format(_("%sはあなたの体力を奪った...", "The %s drains your vitality..."), name);
1040         take_hit(user_ptr, DAMAGE_LOSELIFE, damroll(3, 8), _("加速した疲労", "the strain of haste"), -1);
1041         (void)set_fast(user_ptr, user_ptr->fast + 25 + randint1(25), FALSE);
1042         return TRUE;
1043     case ACT_FISHING:
1044         return fishing(user_ptr);
1045     case ACT_INROU:
1046         mitokohmon(user_ptr);
1047         return TRUE;
1048     case ACT_MURAMASA:
1049         if (o_ptr->name1 != ART_MURAMASA)
1050             return FALSE;
1051
1052         if (!get_check(_("本当に使いますか?", "Are you sure?!")))
1053             return TRUE;
1054
1055         msg_print(_("村正が震えた...", "The Muramasa pulsates..."));
1056         do_inc_stat(user_ptr, A_STR);
1057         if (one_in_(2)) {
1058             msg_print(_("村正は壊れた!", "The Muramasa is destroyed!"));
1059             curse_weapon_object(user_ptr, TRUE, o_ptr);
1060         }
1061
1062         return TRUE;
1063     case ACT_BLOODY_MOON:
1064         if (o_ptr->name1 != ART_BLOOD)
1065             return FALSE;
1066
1067         msg_print(_("鎌が明るく輝いた...", "Your scythe glows brightly!"));
1068         get_bloody_moon_flags(o_ptr);
1069         if (user_ptr->prace == RACE_ANDROID)
1070             calc_android_exp(user_ptr);
1071
1072         user_ptr->update |= (PU_BONUS | PU_HP);
1073         return TRUE;
1074     case ACT_CRIMSON:
1075         if (o_ptr->name1 != ART_CRIMSON)
1076             return FALSE;
1077
1078         msg_print(_("せっかくだから『クリムゾン』をぶっぱなすぜ!", "I'll fire CRIMSON! SEKKAKUDAKARA!"));
1079         return fire_crimson(user_ptr);
1080     default:
1081         msg_format(_("Unknown activation effect: %d.", "Unknown activation effect: %d."), act_ptr->index);
1082         return FALSE;
1083     }
1084 }
1085
1086 /*!
1087  * @brief アイテムの発動効果を処理する。
1088  * @param user_ptr プレーヤーへの参照ポインタ
1089  * @param o_ptr 対象のオブジェクト構造体ポインタ
1090  * @return 発動実行の是非を返す。
1091  */
1092 bool activate_artifact(player_type *user_ptr, object_type *o_ptr)
1093 {
1094     concptr name = k_name + k_info[o_ptr->k_idx].name;
1095     const activation_type *const act_ptr = find_activation_info(user_ptr, o_ptr);
1096     if (!act_ptr) {
1097         msg_print("Activation information is not found.");
1098         return FALSE;
1099     }
1100
1101     if (!switch_activation(user_ptr, o_ptr, act_ptr, name))
1102         return FALSE;
1103
1104     if (act_ptr->timeout.constant >= 0) {
1105         o_ptr->timeout = (s16b)act_ptr->timeout.constant;
1106         if (act_ptr->timeout.dice > 0)
1107             o_ptr->timeout += randint1(act_ptr->timeout.dice);
1108
1109         return TRUE;
1110     }
1111
1112     switch (act_ptr->index) {
1113     case ACT_BR_FIRE:
1114         o_ptr->timeout = ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_FLAMES)) ? 200 : 250;
1115         return TRUE;
1116     case ACT_BR_COLD:
1117         o_ptr->timeout = ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_ICE)) ? 200 : 250;
1118         return TRUE;
1119     case ACT_TERROR:
1120         o_ptr->timeout = 3 * (user_ptr->lev + 10);
1121         return TRUE;
1122     case ACT_MURAMASA:
1123         return TRUE;
1124     default:
1125         msg_format("Special timeout is not implemented: %d.", act_ptr->index);
1126         return FALSE;
1127     }
1128 }