3 * @brief プレイヤーの発動コマンド実装
10 #include "cmd-activate.h"
13 * @brief ペット入りモンスターボールをソートするための比較関数
14 * @param u 所持品配列の参照ポインタ
18 * @return 1の方が大であればTRUE
20 static bool ang_sort_comp_pet(vptr u, vptr v, int a, int b)
22 u16b *who = (u16b*)(u);
27 monster_type *m_ptr1 = &m_list[w1];
28 monster_type *m_ptr2 = &m_list[w2];
29 monster_race *r_ptr1 = &r_info[m_ptr1->r_idx];
30 monster_race *r_ptr2 = &r_info[m_ptr2->r_idx];
35 if (m_ptr1->nickname && !m_ptr2->nickname) return TRUE;
36 if (m_ptr2->nickname && !m_ptr1->nickname) return FALSE;
38 if ((r_ptr1->flags1 & RF1_UNIQUE) && !(r_ptr2->flags1 & RF1_UNIQUE)) return TRUE;
39 if ((r_ptr2->flags1 & RF1_UNIQUE) && !(r_ptr1->flags1 & RF1_UNIQUE)) return FALSE;
41 if (r_ptr1->level > r_ptr2->level) return TRUE;
42 if (r_ptr2->level > r_ptr1->level) return FALSE;
44 if (m_ptr1->hp > m_ptr2->hp) return TRUE;
45 if (m_ptr2->hp > m_ptr1->hp) return FALSE;
51 * @brief オブジェクトをプレイヤーが魔道具として発動できるかを判定する /
52 * Hook to determine if an object is activatable
53 * @param o_ptr 判定したいオブジェクトの構造体参照ポインタ
54 * @return 魔道具として発動可能ならばTRUEを返す
56 static bool item_tester_hook_activate(object_type *o_ptr)
58 u32b flgs[TR_FLAG_SIZE];
61 if (!object_is_known(o_ptr)) return (FALSE);
63 /* Extract the flags */
64 object_flags(o_ptr, flgs);
66 /* Check activation flag */
67 if (have_flag(flgs, TR_ACTIVATE)) return (TRUE);
74 * @brief 装備を発動するコマンドのサブルーチン /
75 * Activate a wielded object. Wielded objects never stack.
76 * And even if they did, activatable objects never stack.
77 * @param item 発動するオブジェクトの所持品ID
81 * Currently, only (some) artifacts, and Dragon Scale Mail, can be activated.
82 * But one could, for example, easily make an activatable "Ring of Plasma".
83 * Note that it always takes a turn to activate an artifact, even if
84 * the user hits "escape" at the "direction" prompt.
87 void do_cmd_activate_aux(int item)
89 int dir, lev, chance, fail;
94 /* Get the item (in the pack) */
97 o_ptr = &inventory[item];
100 /* Get the item (on the floor) */
103 o_ptr = &o_list[0 - item];
107 p_ptr->energy_use = 100;
109 /* Extract the item level */
110 lev = k_info[o_ptr->k_idx].level;
112 /* Hack -- use artifact level instead */
113 if (object_is_fixed_artifact(o_ptr)) lev = a_info[o_ptr->name1].level;
114 else if (object_is_random_artifact(o_ptr))
116 const activation_type* const act_ptr = find_activation_info(o_ptr);
118 lev = act_ptr->level;
121 else if (((o_ptr->tval == TV_RING) || (o_ptr->tval == TV_AMULET)) && o_ptr->name2) lev = e_info[o_ptr->name2].level;
123 /* Base chance of success */
124 chance = p_ptr->skill_dev;
126 /* Confusion hurts skill */
127 if (p_ptr->confused) chance = chance / 2;
130 if (chance > fail) fail -= (chance - fail)*2;
131 else chance -= (fail - chance)*2;
132 if (fail < USE_DEVICE) fail = USE_DEVICE;
133 if (chance < USE_DEVICE) chance = USE_DEVICE;
137 if (flush_failure) flush();
138 msg_print(_("止まった時の中ではうまく働かないようだ。", "It shows no reaction."));
143 if (p_ptr->pclass == CLASS_BERSERKER) success = FALSE;
144 else if (chance > fail)
146 if (randint0(chance*2) < fail) success = FALSE;
151 if (randint0(fail*2) < chance) success = TRUE;
152 else success = FALSE;
158 if (flush_failure) flush();
159 msg_print(_("うまく始動させることができなかった。", "You failed to activate it properly."));
164 /* Check the recharge */
167 msg_print(_("それは微かに音を立て、輝き、消えた...", "It whines, glows and fades..."));
171 /* Some lights need enough fuel for activation */
172 if (!o_ptr->xtra4 && (o_ptr->tval == TV_FLASK) &&
173 ((o_ptr->sval == SV_LITE_TORCH) || (o_ptr->sval == SV_LITE_LANTERN)))
175 msg_print(_("燃料がない。", "It has no fuel."));
176 p_ptr->energy_use = 0;
180 /* Activate the artifact */
181 msg_print(_("始動させた...", "You activate it..."));
186 /* Activate object */
187 if (activation_index(o_ptr))
189 (void)activate_artifact(o_ptr);
192 p_ptr->window |= (PW_INVEN | PW_EQUIP);
199 else if (o_ptr->tval == TV_WHISTLE)
201 if (music_singing_any()) stop_singing();
202 if (hex_spelling_any()) stop_hex_spell_all();
205 if (object_is_cursed(o_ptr))
207 msg_print(_("カン高い音が響き渡った。", "You produce a shrill whistling sound."));
208 aggravate_monsters(0);
218 /* Allocate the "who" array */
219 C_MAKE(who, max_m_idx, IDX);
221 /* Process the monsters (backwards) */
222 for (pet_ctr = m_max - 1; pet_ctr >= 1; pet_ctr--)
224 if (is_pet(&m_list[pet_ctr]) && (p_ptr->riding != pet_ctr))
225 who[max_pet++] = pet_ctr;
228 /* Select the sort method */
229 ang_sort_comp = ang_sort_comp_pet;
230 ang_sort_swap = ang_sort_swap_hook;
232 ang_sort(who, &dummy_why, max_pet);
234 /* Process the monsters (backwards) */
235 for (i = 0; i < max_pet; i++)
238 teleport_monster_to(pet_ctr, p_ptr->y, p_ptr->x, 100, TELEPORT_PASSIVE);
241 /* Free the "who" array */
242 C_KILL(who, max_m_idx, IDX);
244 o_ptr->timeout = 100+randint1(100);
247 else if (o_ptr->tval == TV_CAPTURE)
251 bool old_target_pet = target_pet;
253 if (!get_aim_dir(&dir))
255 target_pet = old_target_pet;
258 target_pet = old_target_pet;
260 if(fire_ball(GF_CAPTURE, dir, 0, 0))
262 o_ptr->pval = (PARAMETER_VALUE)cap_mon;
263 o_ptr->xtra3 = (XTRA8)cap_mspeed;
264 o_ptr->xtra4 = (XTRA16)cap_hp;
265 o_ptr->xtra5 = (XTRA16)cap_maxhp;
272 if (o_ptr->inscription)
273 strcpy(buf, quark_str(o_ptr->inscription));
275 for (s = buf;*s && (*s != '#'); s++)
278 if (iskanji(*s)) s++;
288 t = quark_str(cap_nickname);
301 o_ptr->inscription = quark_add(buf);
308 if (!get_rep_dir2(&dir)) return;
309 if (monster_can_enter(p_ptr->y + ddy[dir], p_ptr->x + ddx[dir], &r_info[o_ptr->pval], 0))
311 if (place_monster_aux(0, p_ptr->y + ddy[dir], p_ptr->x + ddx[dir], o_ptr->pval, (PM_FORCE_PET | PM_NO_KAGE)))
313 if (o_ptr->xtra3) m_list[hack_m_idx_ii].mspeed = o_ptr->xtra3;
314 if (o_ptr->xtra5) m_list[hack_m_idx_ii].max_maxhp = o_ptr->xtra5;
315 if (o_ptr->xtra4) m_list[hack_m_idx_ii].hp = o_ptr->xtra4;
316 m_list[hack_m_idx_ii].maxhp = m_list[hack_m_idx_ii].max_maxhp;
317 if (o_ptr->inscription)
325 t = quark_str(o_ptr->inscription);
326 for (t = quark_str(o_ptr->inscription);*t && (*t != '#'); t++)
329 if (iskanji(*t)) t++;
354 if (quote && *(s-1) =='\'')
358 m_list[hack_m_idx_ii].nickname = quark_add(buf);
359 t = quark_str(o_ptr->inscription);
361 while(*t && (*t != '#'))
368 o_ptr->inscription = quark_add(buf);
379 msg_print(_("おっと、解放に失敗した。", "Oops. You failed to release your pet."));
386 msg_print(_("おっと、このアイテムは始動できない。", "Oops. That object cannot be activated."));
390 * @brief 装備を発動するコマンドのメインルーチン /
393 void do_cmd_activate(void)
399 if (p_ptr->special_defense & (KATA_MUSOU | KATA_KOUKIJIN))
401 set_action(ACTION_NONE);
404 item_tester_no_ryoute = TRUE;
405 /* Prepare the hook */
406 item_tester_hook = item_tester_hook_activate;
409 q = _("どのアイテムを始動させますか? ", "Activate which item? ");
410 s = _("始動できるアイテムを装備していない。", "You have nothing to activate.");
412 if (!get_item(&item, q, s, (USE_EQUIP))) return;
414 /* Activate the item */
415 do_cmd_activate_aux(item);
419 * @brief 発動によるブレスの属性をアイテムの耐性から選択し、実行を処理する。/ Dragon breath activation
420 * @details 対象となる耐性は dragonbreath_info テーブルを参照のこと。
421 * @param o_ptr 対象のオブジェクト構造体ポインタ
422 * @return 発動実行の是非を返す。
424 static bool activate_dragon_breath(object_type *o_ptr)
426 u32b flgs[TR_FLAG_SIZE]; /* for resistance flags */
429 int i, dir, t, n = 0;
431 if (!get_aim_dir(&dir)) return FALSE;
433 object_flags(o_ptr, flgs);
435 for (i = 0; dragonbreath_info[i].flag != 0; i++)
437 if (have_flag(flgs, dragonbreath_info[i].flag))
439 type[n] = dragonbreath_info[i].type;
440 name[n] = dragonbreath_info[i].name;
446 if (n == 0) return FALSE;
449 if (music_singing_any()) stop_singing();
450 if (hex_spelling_any()) stop_hex_spell_all();
453 msg_format(_("あなたは%sのブレスを吐いた。", "You breathe %s."), name[t]);
454 fire_breath(type[t], dir, 250, 4);
460 * @brief アイテムの発動効果を処理する。
461 * @param o_ptr 対象のオブジェクト構造体ポインタ
462 * @return 発動実行の是非を返す。
464 bool activate_artifact(object_type *o_ptr)
466 PLAYER_LEVEL plev = p_ptr->lev;
469 cptr name = k_name + k_info[o_ptr->k_idx].name;
470 const activation_type* const act_ptr = find_activation_info(o_ptr);
474 /* Maybe forgot adding information to activation_info table ? */
475 msg_print("Activation information is not found.");
479 /* Activate for attack */
480 switch (act_ptr->index)
484 if (!get_aim_dir(&dir)) return FALSE;
485 msg_print(_("太陽光線が放たれた。", "A line of sunlight appears."));
486 (void)lite_line(dir, damroll(6, 8));
492 msg_print(_("それは眩しいくらいに明るく輝いている...", "It glows extremely brightly..."));
493 if (!get_aim_dir(&dir)) return FALSE;
494 fire_bolt(GF_MISSILE, dir, damroll(2, 6));
500 msg_print(_("それは濃緑色に脈動している...", "It throbs deep green..."));
501 if (!get_aim_dir(&dir)) return FALSE;
502 fire_ball(GF_POIS, dir, 12, 3);
508 msg_print(_("それは火花に覆われた...", "It is covered in sparks..."));
509 if (!get_aim_dir(&dir)) return FALSE;
510 fire_bolt(GF_ELEC, dir, damroll(4, 8));
516 msg_print(_("それは酸に覆われた...", "It is covered in acid..."));
517 if (!get_aim_dir(&dir)) return FALSE;
518 fire_bolt(GF_ACID, dir, damroll(5, 8));
524 msg_print(_("それは霜に覆われた...", "It is covered in frost..."));
525 if (!get_aim_dir(&dir)) return FALSE;
526 fire_bolt(GF_COLD, dir, damroll(6, 8));
532 msg_print(_("それは炎に覆われた...", "It is covered in fire..."));
533 if (!get_aim_dir(&dir)) return FALSE;
534 fire_bolt(GF_FIRE, dir, damroll(9, 8));
540 msg_print(_("それは霜に覆われた...", "It is covered in frost..."));
541 if (!get_aim_dir(&dir)) return FALSE;
542 fire_ball(GF_COLD, dir, 48, 2);
548 msg_print(_("それは青く激しく輝いた...", "It glows an intense blue..."));
549 if (!get_aim_dir(&dir)) return FALSE;
550 fire_ball(GF_COLD, dir, 100, 2);
556 msg_print(_("明るく白色に輝いている...", "It glows bright white..."));
557 if (!get_aim_dir(&dir)) return FALSE;
558 fire_ball(GF_COLD, dir, 400, 3);
564 msg_print(_("それは赤く激しく輝いた...", "It glows an intense red..."));
565 if (!get_aim_dir(&dir)) return FALSE;
566 fire_ball(GF_FIRE, dir, 72, 2);
572 msg_format(_("%sから炎が吹き出した...", "The %s rages in fire..."), name);
573 if (!get_aim_dir(&dir)) return FALSE;
574 fire_ball(GF_FIRE, dir, 120, 3);
580 msg_print(_("深赤色に輝いている...", "It glows deep red..."));
581 if (!get_aim_dir(&dir)) return FALSE;
582 fire_ball(GF_FIRE, dir, 300, 3);
588 msg_print(_("それは赤く激しく輝いた...", "It glows an intense red..."));
589 if (!get_aim_dir(&dir)) return FALSE;
590 fire_ball(GF_FIRE, dir, 100, 2);
596 msg_print(_("電気がパチパチ音を立てた...", "It crackles with electricity..."));
597 if (!get_aim_dir(&dir)) return FALSE;
598 fire_ball(GF_ELEC, dir, 100, 3);
604 msg_print(_("深青色に輝いている...", "It glows deep blue..."));
605 if (!get_aim_dir(&dir)) return FALSE;
606 fire_ball(GF_ELEC, dir, 500, 3);
612 msg_print(_("それは黒く激しく輝いた...", "It glows an intense black..."));
613 if (!get_aim_dir(&dir)) return FALSE;
614 fire_ball(GF_ACID, dir, 100, 2);
620 msg_print(_("それは緑に激しく輝いた...", "It glows an intense green..."));
621 if (!get_aim_dir(&dir)) return FALSE;
622 fire_ball(GF_NUKE, dir, 100, 2);
626 case ACT_HYPODYNAMIA_1:
628 msg_format(_("あなたは%sに敵を締め殺すよう命じた。", "You order the %s to strangle your opponent."), name);
629 if (!get_aim_dir(&dir)) return FALSE;
630 if (hypodynamic_bolt(dir, 100))
634 case ACT_HYPODYNAMIA_2:
636 msg_print(_("黒く輝いている...", "It glows black..."));
637 if (!get_aim_dir(&dir)) return FALSE;
638 hypodynamic_bolt(dir, 120);
644 if (!get_aim_dir(&dir)) return FALSE;
645 for (dummy = 0; dummy < 3; dummy++)
647 if (hypodynamic_bolt(dir, 50))
655 msg_print(_("魔法のトゲが現れた...", "It grows magical spikes..."));
656 if (!get_aim_dir(&dir)) return FALSE;
657 fire_bolt(GF_ARROW, dir, 150);
668 for (dir = 0; dir <= 9; dir++)
670 y = p_ptr->y + ddy[dir];
671 x = p_ptr->x + ddx[dir];
674 /* Get the monster */
675 m_ptr = &m_list[c_ptr->m_idx];
677 /* Hack -- attack monsters */
678 if (c_ptr->m_idx && (m_ptr->ml || cave_have_flag_bold(y, x, FF_PROJECT)))
687 if (!get_aim_dir(&dir)) return FALSE;
688 for (dummy = 0; dummy < 3; dummy++)
690 if (hypodynamic_bolt(dir, 100))
699 msg_print(_("様々な色の火花を発している...", "It glows in scintillating colours..."));
706 if (!get_aim_dir(&dir)) return FALSE;
707 msg_print(_("ロケットを発射した!", "You launch a rocket!"));
708 fire_ball(GF_ROCKET, dir, 250 + plev * 3, 2);
714 msg_print(_("神聖な雰囲気が充満した...", "It floods the area with goodness..."));
715 dispel_evil(p_ptr->lev * 5);
721 if (!get_aim_dir(&dir)) return FALSE;
722 msg_print(_("あなたはエレメントのブレスを吐いた。", "You breathe the elements."));
723 fire_breath(GF_MISSILE, dir, 300, 4);
729 msg_print(_("邪悪な雰囲気が充満した...", "It floods the area with evil..."));
730 dispel_good(p_ptr->lev * 5);
736 msg_format(_("%sに魔法のトゲが現れた...", "The %s grows magical spikes..."), name);
737 if (!get_aim_dir(&dir)) return FALSE;
738 fire_bolt(GF_ARROW, dir, 150);
744 msg_format(_("%sが深い青色に鼓動している...", "The %s throbs deep blue..."), name);
745 if (!get_aim_dir(&dir)) return FALSE;
746 fire_ball(GF_WATER, dir, 200, 3);
752 msg_format(_("%sが深い闇に覆われた...", "The %s is coverd in pitch-darkness..."), name);
753 if (!get_aim_dir(&dir)) return FALSE;
754 fire_ball(GF_DARK, dir, 250, 4);
760 msg_format(_("%sが青白く光った...", "The %s glows pale..."), name);
761 if (!get_aim_dir(&dir)) return FALSE;
762 fire_ball(GF_MANA, dir, 250, 4);
768 msg_print(_("あなたは害虫を一掃した。", "You exterminate small life."));
769 (void)dispel_monsters(4);
773 case ACT_BLINDING_LIGHT:
775 msg_format(_("%sが眩しい光で輝いた...", "The %s gleams with blinding light..."), name);
776 fire_ball(GF_LITE, 0, 300, 6);
777 confuse_monsters(3 * p_ptr->lev / 2);
783 msg_format(_("%sは漆黒に輝いた...", "The %s glows intensely black..."), name);
784 if (!get_aim_dir(&dir)) return FALSE;
789 case ACT_CAST_BA_STAR:
791 HIT_POINT num = damroll(5, 3);
792 POSITION y = 0, x = 0;
794 msg_format(_("%sが稲妻で覆われた...", "The %s is surrounded by lightning..."), name);
795 for (k = 0; k < num; k++)
801 scatter(&y, &x, p_ptr->y, p_ptr->x, 4, 0);
803 if (!cave_have_flag_bold(y, x, FF_PROJECT)) continue;
805 if (!player_bold(y, x)) break;
808 project(0, 3, y, x, 150, GF_ELEC,
809 (PROJECT_THRU | PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL), -1);
815 case ACT_BLADETURNER:
817 if (!get_aim_dir(&dir)) return FALSE;
818 msg_print(_("あなたはエレメントのブレスを吐いた。", "You breathe the elements."));
819 fire_breath(GF_MISSILE, dir, 300, 4);
820 msg_print(_("鎧が様々な色に輝いた...", "Your armor glows many colours..."));
822 (void)set_hero(randint1(50) + 50, FALSE);
824 (void)set_blessed(randint1(50) + 50, FALSE);
825 (void)set_oppose_acid(randint1(50) + 50, FALSE);
826 (void)set_oppose_elec(randint1(50) + 50, FALSE);
827 (void)set_oppose_fire(randint1(50) + 50, FALSE);
828 (void)set_oppose_cold(randint1(50) + 50, FALSE);
829 (void)set_oppose_pois(randint1(50) + 50, FALSE);
835 if (!get_aim_dir(&dir)) return FALSE;
836 fire_breath(GF_FIRE, dir, 200, 2);
837 if ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_FLAMES))
839 (void)set_oppose_fire(randint1(20) + 20, FALSE);
845 if (!get_aim_dir(&dir)) return FALSE;
846 fire_breath(GF_COLD, dir, 200, 2);
847 if ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_ICE))
849 (void)set_oppose_cold(randint1(20) + 20, FALSE);
855 if (!activate_dragon_breath(o_ptr)) return FALSE;
859 /* Activate for other offensive action */
863 msg_print(_("様々な色の火花を発している...", "It glows in scintillating colours..."));
864 if (!get_aim_dir(&dir)) return FALSE;
865 confuse_monster(dir, 20);
871 msg_print(_("深青色に輝いている...", "It glows deep blue..."));
872 sleep_monsters_touch();
878 earthquake(p_ptr->y, p_ptr->x, 5);
884 turn_monsters(40 + p_ptr->lev);
890 if (!get_aim_dir(&dir)) return FALSE;
891 (void)fire_beam(GF_AWAY_ALL, dir, plev);
895 case ACT_BANISH_EVIL:
897 if (banish_evil(100))
899 msg_print(_("アーティファクトの力が邪悪を打ち払った!", "The power of the artifact banishes evil!"));
906 msg_print(_("深青色に輝いている...", "It glows deep blue..."));
907 (void)symbol_genocide(200, TRUE);
913 msg_print(_("ひどく鋭い音が流れ出た...", "It lets out a long, shrill note..."));
914 (void)mass_genocide(200, TRUE);
920 if (music_singing_any()) stop_singing();
921 if (hex_spelling_any()) stop_hex_spell_all();
922 msg_print(_("あなたは力強い突風を吹き鳴らした。周囲の敵が震え上っている!",
923 "You wind a mighty blast; your enemies tremble!"));
924 (void)turn_monsters((3 * p_ptr->lev / 2) + 10);
930 if (o_ptr->name1 == ART_HYOUSIGI)
932 msg_print(_("拍子木を打った。", "You beat Your wooden clappers."));
936 msg_format(_("%sは不快な物音を立てた。", "The %s sounds an unpleasant noise."), name);
938 aggravate_monsters(0);
942 /* Activate for summoning / charming */
944 case ACT_CHARM_ANIMAL:
946 if (!get_aim_dir(&dir)) return FALSE;
947 (void)charm_animal(dir, plev);
951 case ACT_CHARM_UNDEAD:
953 if (!get_aim_dir(&dir)) return FALSE;
954 (void)control_one_undead(dir, plev);
958 case ACT_CHARM_OTHER:
960 if (!get_aim_dir(&dir)) return FALSE;
961 (void)charm_monster(dir, plev * 2);
965 case ACT_CHARM_ANIMALS:
967 (void)charm_animals(plev * 2);
971 case ACT_CHARM_OTHERS:
973 charm_monsters(plev * 2);
977 case ACT_SUMMON_ANIMAL:
979 (void)summon_specific(-1, p_ptr->y, p_ptr->x, plev, SUMMON_ANIMAL_RANGER, (PM_ALLOW_GROUP | PM_FORCE_PET));
983 case ACT_SUMMON_PHANTOM:
985 msg_print(_("幻霊を召喚した。", "You summon a phantasmal servant."));
986 (void)summon_specific(-1, p_ptr->y, p_ptr->x, dun_level, SUMMON_PHANTOM, (PM_ALLOW_GROUP | PM_FORCE_PET));
990 case ACT_SUMMON_ELEMENTAL:
992 bool pet = one_in_(3);
995 if (!(pet && (plev < 50))) mode |= PM_ALLOW_GROUP;
996 if (pet) mode |= PM_FORCE_PET;
997 else mode |= PM_NO_PET;
999 if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, ((plev * 3) / 2), SUMMON_ELEMENTAL, mode))
1001 msg_print(_("エレメンタルが現れた...", "An elemental materializes..."));
1003 msg_print(_("あなたに服従しているようだ。", "It seems obedient to you."));
1005 msg_print(_("それをコントロールできなかった!", "You fail to control it!"));
1011 case ACT_SUMMON_DEMON:
1013 bool pet = one_in_(3);
1014 BIT_FLAGS mode = 0L;
1016 if (!(pet && (plev < 50))) mode |= PM_ALLOW_GROUP;
1017 if (pet) mode |= PM_FORCE_PET;
1018 else mode |= PM_NO_PET;
1020 if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, ((plev * 3) / 2), SUMMON_DEMON, mode))
1022 msg_print(_("硫黄の悪臭が充満した。", "The area fills with a stench of sulphur and brimstone."));
1024 msg_print(_("「ご用でございますか、ご主人様」", "'What is thy bidding... Master?'"));
1026 msg_print(_("「NON SERVIAM! Wretch! お前の魂を頂くぞ!」", "'NON SERVIAM! Wretch! I shall feast on thy mortal soul!'"));
1032 case ACT_SUMMON_UNDEAD:
1034 bool pet = one_in_(3);
1036 BIT_FLAGS mode = 0L;
1038 type = (plev > 47 ? SUMMON_HI_UNDEAD : SUMMON_UNDEAD);
1040 if (!pet || ((plev > 24) && one_in_(3))) mode |= PM_ALLOW_GROUP;
1041 if (pet) mode |= PM_FORCE_PET;
1042 else mode |= (PM_ALLOW_UNIQUE | PM_NO_PET);
1044 if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, ((plev * 3) / 2), type, mode))
1046 msg_print(_("冷たい風があなたの周りに吹き始めた。それは腐敗臭を運んでいる...",
1047 "Cold winds begin to blow around you, carrying with them the stench of decay..."));
1049 msg_print(_("古えの死せる者共があなたに仕えるため土から甦った!",
1050 "Ancient, long-dead forms arise from the ground to serve you!"));
1052 msg_print(_("死者が甦った。眠りを妨げるあなたを罰するために!",
1053 "'The dead arise... to punish you for disturbing them!'"));
1059 case ACT_SUMMON_HOUND:
1061 BIT_FLAGS mode = PM_ALLOW_GROUP;
1062 bool pet = !one_in_(5);
1063 if (pet) mode |= PM_FORCE_PET;
1064 else mode |= PM_NO_PET;
1066 if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, ((p_ptr->lev * 3) / 2), SUMMON_HOUND, mode))
1070 msg_print(_("ハウンドがあなたの下僕として出現した。",
1071 "A group of hounds appear as your servant."));
1073 msg_print(_("ハウンドはあなたに牙を向けている!",
1074 "A group of hounds appear as your enemy!"));
1080 case ACT_SUMMON_DAWN:
1082 msg_print(_("暁の師団を召喚した。", "You summon the Legion of the Dawn."));
1083 (void)summon_specific(-1, p_ptr->y, p_ptr->x, dun_level, SUMMON_DAWN, (PM_ALLOW_GROUP | PM_FORCE_PET));
1087 case ACT_SUMMON_OCTOPUS:
1089 BIT_FLAGS mode = PM_ALLOW_GROUP;
1090 bool pet = !one_in_(5);
1091 if (pet) mode |= PM_FORCE_PET;
1093 if (summon_named_creature(0, p_ptr->y, p_ptr->x, MON_JIZOTAKO, mode))
1096 msg_print(_("蛸があなたの下僕として出現した。", "A group of octopuses appear as your servant."));
1098 msg_print(_("蛸はあなたを睨んでいる!", "A group of octopuses appear as your enemy!"));
1104 /* Activate for healing */
1106 case ACT_CHOIR_SINGS:
1108 msg_print(_("天国の歌が聞こえる...", "A heavenly choir sings..."));
1109 (void)set_poisoned(0);
1112 (void)set_confused(0);
1114 (void)set_afraid(0);
1115 (void)set_hero(randint1(25) + 25, FALSE);
1116 (void)hp_player(777);
1122 (void)set_afraid(0);
1123 (void)hp_player(30);
1129 msg_print(_("深紫色の光を発している...", "It radiates deep purple..."));
1130 hp_player(damroll(4, 8));
1131 (void)set_cut((p_ptr->cut / 2) - 50);
1135 case ACT_CURE_POISON:
1137 msg_print(_("深青色に輝いている...", "It glows deep blue..."));
1138 (void)set_afraid(0);
1139 (void)set_poisoned(0);
1145 msg_print(_("深紅に輝いている...", "It glows a deep red..."));
1152 msg_print(_("濃緑色に輝いている...", "It glows a deep green..."));
1153 (void)do_res_stat(A_STR);
1154 (void)do_res_stat(A_INT);
1155 (void)do_res_stat(A_WIS);
1156 (void)do_res_stat(A_DEX);
1157 (void)do_res_stat(A_CON);
1158 (void)do_res_stat(A_CHR);
1159 (void)restore_level();
1165 msg_print(_("深青色に輝いている...", "It glows deep blue..."));
1166 msg_print(_("体内に暖かい鼓動が感じられる...", "You feel a warm tingling inside..."));
1167 (void)hp_player(700);
1174 msg_print(_("白く明るく輝いている...", "It glows a bright white..."));
1175 msg_print(_("ひじょうに気分がよい...", "You feel much better..."));
1176 (void)hp_player(1000);
1183 msg_format(_("%sの優しさに癒される...", "the %s cures you affectionately ..."), name);
1184 (void)set_poisoned(0);
1185 (void)set_confused(0);
1194 case ACT_CURE_MANA_FULL:
1196 msg_format(_("%sが青白く光った...", "The %s glows pale..."), name);
1197 if (p_ptr->pclass == CLASS_MAGIC_EATER)
1200 for (i = 0; i < EATER_EXT * 2; i++)
1202 p_ptr->magic_num1[i] += (p_ptr->magic_num2[i] < 10) ? EATER_CHARGE * 3 : p_ptr->magic_num2[i] * EATER_CHARGE / 3;
1203 if (p_ptr->magic_num1[i] > p_ptr->magic_num2[i] * EATER_CHARGE) p_ptr->magic_num1[i] = p_ptr->magic_num2[i] * EATER_CHARGE;
1205 for (; i < EATER_EXT * 3; i++)
1207 KIND_OBJECT_IDX k_idx = lookup_kind(TV_ROD, i - EATER_EXT * 2);
1208 p_ptr->magic_num1[i] -= ((p_ptr->magic_num2[i] < 10) ? EATER_ROD_CHARGE * 3 : p_ptr->magic_num2[i] * EATER_ROD_CHARGE / 3)*k_info[k_idx].pval;
1209 if (p_ptr->magic_num1[i] < 0) p_ptr->magic_num1[i] = 0;
1211 msg_print(_("頭がハッキリとした。", "You feel your head clear."));
1212 p_ptr->window |= (PW_PLAYER);
1214 else if (p_ptr->csp < p_ptr->msp)
1216 p_ptr->csp = p_ptr->msp;
1217 p_ptr->csp_frac = 0;
1218 msg_print(_("頭がハッキリとした。", "You feel your head clear."));
1219 p_ptr->redraw |= (PR_MANA);
1220 p_ptr->window |= (PW_PLAYER);
1221 p_ptr->window |= (PW_SPELL);
1226 /* Activate for timed effect */
1230 (void)set_tim_esp(randint1(30) + 25, FALSE);
1236 (void)set_afraid(0);
1237 (void)set_shero(randint1(25) + 25, FALSE);
1238 /* (void)set_afraid(0);
1239 (void)set_hero(randint1(50) + 50, FALSE);
1240 (void)set_blessed(randint1(50) + 50, FALSE);
1241 o_ptr->timeout = 100 + randint1(100); */
1247 msg_format(_("%sから鋭い音が流れ出た...", "The %s lets out a shrill wail..."), name);
1249 (void)set_protevil(randint1(25) + k, FALSE);
1253 case ACT_RESIST_ALL:
1255 msg_print(_("様々な色に輝いている...", "It glows many colours..."));
1256 (void)set_oppose_acid(randint1(40) + 40, FALSE);
1257 (void)set_oppose_elec(randint1(40) + 40, FALSE);
1258 (void)set_oppose_fire(randint1(40) + 40, FALSE);
1259 (void)set_oppose_cold(randint1(40) + 40, FALSE);
1260 (void)set_oppose_pois(randint1(40) + 40, FALSE);
1266 msg_print(_("明るく緑色に輝いている...", "It glows bright green..."));
1267 (void)set_fast(randint1(20) + 20, FALSE);
1271 case ACT_XTRA_SPEED:
1273 msg_print(_("明るく輝いている...", "It glows brightly..."));
1274 (void)set_fast(randint1(75) + 75, FALSE);
1280 set_wraith_form(randint1(plev / 2) + (plev / 2), FALSE);
1286 (void)set_invuln(randint1(8) + 8, FALSE);
1292 (void)set_afraid(0);
1293 set_hero(randint1(25) + 25, FALSE);
1298 case ACT_HELO_SPEED:
1300 (void)set_fast(randint1(50) + 50, FALSE);
1303 set_hero(randint1(50) + 50, FALSE);
1307 case ACT_RESIST_ACID:
1309 msg_format(_("%sが黒く輝いた...", "The %s grows black."), name);
1310 if ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_ACID))
1312 if (!get_aim_dir(&dir)) return FALSE;
1313 fire_ball(GF_ACID, dir, 100, 2);
1315 (void)set_oppose_acid(randint1(20) + 20, FALSE);
1319 case ACT_RESIST_FIRE:
1321 msg_format(_("%sが赤く輝いた...", "The %s grows red."), name);
1322 if ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_FLAMES))
1324 if (!get_aim_dir(&dir)) return FALSE;
1325 fire_ball(GF_FIRE, dir, 100, 2);
1327 (void)set_oppose_fire(randint1(20) + 20, FALSE);
1331 case ACT_RESIST_COLD:
1333 msg_format(_("%sが白く輝いた...", "The %s grows white."), name);
1334 if ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_ICE))
1336 if (!get_aim_dir(&dir)) return FALSE;
1337 fire_ball(GF_COLD, dir, 100, 2);
1339 (void)set_oppose_cold(randint1(20) + 20, FALSE);
1343 case ACT_RESIST_ELEC:
1345 msg_format(_("%sが青く輝いた...", "The %s grows blue."), name);
1346 if ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_ELEC))
1348 if (!get_aim_dir(&dir)) return FALSE;
1349 fire_ball(GF_ELEC, dir, 100, 2);
1351 (void)set_oppose_elec(randint1(20) + 20, FALSE);
1355 case ACT_RESIST_POIS:
1357 msg_format(_("%sが緑に輝いた...", "The %s grows green."), name);
1358 (void)set_oppose_pois(randint1(20) + 20, FALSE);
1362 /* Activate for general purpose effect (detection etc.) */
1366 msg_format(_("%sから澄んだ光があふれ出た...", "The %s wells with clear light..."), name);
1367 lite_area(damroll(2, 15), 3);
1373 msg_print(_("眩しく輝いた...", "It shines brightly..."));
1374 map_area(DETECT_RAD_MAP);
1375 lite_area(damroll(2, 15), 3);
1379 case ACT_DETECT_ALL:
1381 msg_print(_("白く明るく輝いている...", "It glows bright white..."));
1382 msg_print(_("心にイメージが浮かんできた...", "An image forms in your mind..."));
1383 detect_all(DETECT_RAD_DEFAULT);
1387 case ACT_DETECT_XTRA:
1389 msg_print(_("明るく輝いている...", "It glows brightly..."));
1390 detect_all(DETECT_RAD_DEFAULT);
1392 identify_fully(FALSE);
1398 msg_print(_("黄色く輝いている...", "It glows yellow..."));
1399 identify_fully(FALSE);
1405 if (!ident_spell(FALSE)) return FALSE;
1409 case ACT_RUNE_EXPLO:
1411 msg_print(_("明るい赤色に輝いている...", "It glows bright red..."));
1418 msg_print(_("ブルーに明るく輝いている...", "It glows light blue..."));
1425 (void)set_food(PY_FOOD_MAX - 1);
1431 msg_print(_("明るい赤色に輝いている...", "It glows bright red..."));
1432 destroy_doors_touch();
1438 msg_print(_("鼓動している...", "It pulsates..."));
1439 if (!get_aim_dir(&dir)) return FALSE;
1440 wall_to_mud(dir, 20 + randint1(30));
1452 msg_print(_("明るい黄色に輝いている...", "It glows bright yellow..."));
1459 msg_print(_("次元の扉が開いた。目的地を選んで下さい。", "You open a dimensional gate. Choose a destination."));
1460 if (!dimension_door()) return FALSE;
1467 msg_print(_("周りの空間が歪んでいる...", "It twists space around you..."));
1468 teleport_player(100, 0L);
1474 msg_print(_("やわらかな白色に輝いている...", "It glows soft white..."));
1475 if (!word_of_recall()) return FALSE;
1481 msg_format(_("%sは赤く明るく光った!", "The %s flashes bright red!"), name);
1482 chg_virtue(V_KNOWLEDGE, 1);
1483 chg_virtue(V_ENLIGHTEN, 1);
1486 msg_format(_("%sはあなたの体力を奪った...", "The %s drains your vitality..."), name);
1487 take_hit(DAMAGE_LOSELIFE, damroll(3, 8), _("審判の宝石", "the Jewel of Judgement"), -1);
1489 (void)detect_traps(DETECT_RAD_DEFAULT, TRUE);
1490 (void)detect_doors(DETECT_RAD_DEFAULT);
1491 (void)detect_stairs(DETECT_RAD_DEFAULT);
1493 if (get_check(_("帰還の力を使いますか?", "Activate recall? ")))
1495 (void)word_of_recall();
1501 case ACT_TELEKINESIS:
1503 if (!get_aim_dir(&dir)) return FALSE;
1504 msg_format(_("%sを伸ばした。", "You stretched your %s."), name);
1505 fetch(dir, 500, TRUE);
1509 case ACT_DETECT_UNIQUE:
1512 monster_type *m_ptr;
1513 monster_race *r_ptr;
1514 msg_print(_("奇妙な場所が頭の中に浮かんだ...", "Some strange places show up in your mind. And you see ..."));
1515 /* Process the monsters (backwards) */
1516 for (i = m_max - 1; i >= 1; i--)
1518 /* Access the monster */
1521 /* Ignore "dead" monsters */
1522 if (!m_ptr->r_idx) continue;
1524 r_ptr = &r_info[m_ptr->r_idx];
1526 if (r_ptr->flags1 & RF1_UNIQUE)
1528 msg_format(_("%s. ", "%s. "), r_name + r_ptr->name);
1536 switch (randint1(13))
1538 case 1: case 2: case 3: case 4: case 5:
1539 teleport_player(10, 0L);
1541 case 6: case 7: case 8: case 9: case 10:
1542 teleport_player(222, 0L);
1545 (void)stair_creation();
1548 if (get_check(_("この階を去りますか?", "Leave this level? ")))
1550 if (autosave_l) do_cmd_save_game(TRUE);
1553 p_ptr->leaving = TRUE;
1559 case ACT_DISP_CURSE_XTRA:
1561 msg_format(_("%sが真実を照らし出す...", "The %s exhibits the truth..."), name);
1562 if (remove_all_curse())
1564 msg_print(_("誰かに見守られているような気がする。", "You feel as if someone is watching over you."));
1570 case ACT_BRAND_FIRE_BOLTS:
1572 msg_format(_("%sが深紅に輝いた...", "Your %s glows deep red..."), name);
1573 (void)brand_bolts();
1577 case ACT_RECHARGE_XTRA:
1579 msg_format(_("%sが白く輝いた...", "The %s gleams with blinding light..."), name);
1580 if (!recharge(1000)) return FALSE;
1586 msg_print(_("石が隠された秘密を写し出した...", "The stone reveals hidden mysteries..."));
1587 if (!ident_spell(FALSE)) return FALSE;
1589 if (mp_ptr->spell_book)
1591 /* Sufficient mana */
1592 if (20 <= p_ptr->csp)
1598 /* Over-exert the player */
1601 int oops = 20 - p_ptr->csp;
1605 p_ptr->csp_frac = 0;
1608 msg_print(_("石を制御できない!", "You are too weak to control the stone!"));
1609 /* Hack -- Bypass free action */
1610 (void)set_paralyzed(p_ptr->paralyzed +
1611 randint1(5 * oops + 1));
1614 (void)set_confused(p_ptr->confused +
1615 randint1(5 * oops + 1));
1619 p_ptr->redraw |= (PR_MANA);
1621 take_hit(DAMAGE_LOSELIFE, damroll(1, 12), _("危険な秘密", "perilous secrets"), -1);
1623 if (one_in_(5)) (void)set_confused(p_ptr->confused +
1626 /* Exercise a little care... */
1628 take_hit(DAMAGE_LOSELIFE, damroll(4, 10), _("危険な秘密", "perilous secrets"), -1);
1634 msg_print(_("力強く四股を踏んだ。", "You stamp. (as if you are in a ring.)"));
1635 (void)set_afraid(0);
1636 (void)set_hero(randint1(20) + 20, FALSE);
1637 dispel_evil(p_ptr->lev * 3);
1641 case ACT_PHASE_DOOR:
1643 teleport_player(10, 0L);
1647 case ACT_DETECT_ALL_MONS:
1649 (void)detect_monsters_invis(255);
1650 (void)detect_monsters_normal(255);
1654 case ACT_ULTIMATE_RESIST:
1656 TIME_EFFECT v = randint1(25) + 25;
1657 (void)set_afraid(0);
1658 (void)set_hero(v, FALSE);
1659 (void)hp_player(10);
1660 (void)set_blessed(v, FALSE);
1661 (void)set_oppose_acid(v, FALSE);
1662 (void)set_oppose_elec(v, FALSE);
1663 (void)set_oppose_fire(v, FALSE);
1664 (void)set_oppose_cold(v, FALSE);
1665 (void)set_oppose_pois(v, FALSE);
1666 (void)set_ultimate_res(v, FALSE);
1671 /* Unique activation */
1676 char o_name[MAX_NLEN];
1679 /* Cast off activated item */
1680 for (inv = INVEN_RARM; inv <= INVEN_FEET; inv++)
1682 if (o_ptr == &inventory[inv]) break;
1686 if (inv > INVEN_FEET) return FALSE;
1688 object_copy(&forge, o_ptr);
1689 inven_item_increase(inv, (0 - o_ptr->number));
1690 inven_item_optimize(inv);
1691 o_idx = drop_near(&forge, 0, p_ptr->y, p_ptr->x);
1692 o_ptr = &o_list[o_idx];
1694 object_desc(o_name, o_ptr, OD_NAME_ONLY);
1695 msg_format(_("%sを脱ぎ捨てた。", "You cast off %s."), o_name);
1698 msg_print(_("「燃え上がれ俺の小宇宙!」", "You say, 'Burn up my cosmo!"));
1699 t = 20 + randint1(20);
1700 (void)set_blind(p_ptr->blind + t);
1701 (void)set_afraid(0);
1702 (void)set_tim_esp(p_ptr->tim_esp + t, FALSE);
1703 (void)set_tim_regen(p_ptr->tim_regen + t, FALSE);
1704 (void)set_hero(p_ptr->hero + t, FALSE);
1705 (void)set_blessed(p_ptr->blessed + t, FALSE);
1706 (void)set_fast(p_ptr->fast + t, FALSE);
1707 (void)set_shero(p_ptr->shero + t, FALSE);
1708 if (p_ptr->pclass == CLASS_FORCETRAINER)
1710 P_PTR_KI = plev * 5 + 190;
1711 msg_print(_("気が爆発寸前になった。", "Your force are immediatly before explosion."));
1717 case ACT_FALLING_STAR:
1719 msg_print(_("あなたは妖刀に魅入られた…", "You are enchanted by cursed blade..."));
1720 msg_print(_("「狂ほしく 血のごとき 月はのぼれり 秘めおきし 魔剣 いずこぞや」", "'Behold the blade arts.'"));
1725 case ACT_GRAND_CROSS:
1727 msg_print(_("「闇に還れ!」", "You say, 'Return to darkness!'"));
1728 project(0, 8, p_ptr->y, p_ptr->x, (randint1(100) + 200) * 2, GF_HOLY_FIRE, PROJECT_KILL | PROJECT_ITEM | PROJECT_GRID, -1);
1732 case ACT_TELEPORT_LEVEL:
1734 if (!get_check(_("本当に他の階にテレポートしますか?", "Are you sure? (Teleport Level)"))) return FALSE;
1739 case ACT_STRAIN_HASTE:
1742 msg_format(_("%sはあなたの体力を奪った...", "The %s drains your vitality..."), name);
1743 take_hit(DAMAGE_LOSELIFE, damroll(3, 8), _("加速した疲労", "the strain of haste"), -1);
1744 t = 25 + randint1(25);
1745 (void)set_fast(p_ptr->fast + t, FALSE);
1753 if (!get_rep_dir2(&dir)) return FALSE;
1754 y = p_ptr->y + ddy[dir];
1755 x = p_ptr->x + ddx[dir];
1757 if (!cave_have_flag_bold(y, x, FF_WATER))
1759 msg_print(_("そこは水辺ではない。", "There is no fishing place."));
1762 else if (cave[y][x].m_idx)
1765 monster_desc(m_name, &m_list[cave[y][x].m_idx], 0);
1766 msg_format(_("%sが邪魔だ!", "%^s is stand in your way."), m_name);
1767 p_ptr->energy_use = 0;
1770 set_action(ACTION_FISH);
1771 p_ptr->redraw |= (PR_STATE);
1778 monster_type *m_ptr;
1781 if (summon_named_creature(0, p_ptr->y, p_ptr->x, MON_SUKE, PM_FORCE_PET))
1783 msg_print(_("『助さん』が現れた。", "Suke-san apperars."));
1784 kakusan = "Suke-san";
1787 if (summon_named_creature(0, p_ptr->y, p_ptr->x, MON_KAKU, PM_FORCE_PET))
1789 msg_print(_("『格さん』が現れた。", "Kaku-san appears."));
1790 kakusan = "Kaku-san";
1795 for (i = m_max - 1; i > 0; i--)
1798 if (!m_ptr->r_idx) continue;
1799 if (!((m_ptr->r_idx == MON_SUKE) || (m_ptr->r_idx == MON_KAKU))) continue;
1800 if (!los(m_ptr->fy, m_ptr->fx, p_ptr->y, p_ptr->x)) continue;
1801 if (!projectable(m_ptr->fy, m_ptr->fx, p_ptr->y, p_ptr->x)) continue;
1809 msg_format(_("「者ども、ひかえおろう!!!このお方をどなたとこころえる。」",
1810 "%^s says 'WHO do you think this person is! Bow your head, down your knees!'"), kakusan);
1813 confuse_monsters(120);
1815 stasis_monsters(120);
1820 msg_print(_("しかし、何も起きなかった。", "Nothing happen."));
1827 /* Only for Muramasa */
1828 if (o_ptr->name1 != ART_MURAMASA) return FALSE;
1829 if (get_check(_("本当に使いますか?", "Are you sure?!")))
1831 msg_print(_("村正が震えた...", "The Muramasa pulsates..."));
1835 msg_print(_("村正は壊れた!", "The Muramasa is destroyed!"));
1836 curse_weapon_object(TRUE, o_ptr);
1842 case ACT_BLOODY_MOON:
1844 /* Only for Bloody Moon */
1845 if (o_ptr->name1 != ART_BLOOD) return FALSE;
1846 msg_print(_("鎌が明るく輝いた...", "Your scythe glows brightly!"));
1847 get_bloody_moon_flags(o_ptr);
1848 if (p_ptr->prace == RACE_ANDROID) calc_android_exp();
1849 p_ptr->update |= (PU_BONUS | PU_HP);
1857 BIT_FLAGS flg = PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
1860 /* Only for Crimson */
1861 if (o_ptr->name1 != ART_CRIMSON) return FALSE;
1863 msg_print(_("せっかくだから『クリムゾン』をぶっぱなすぜ!", "I'll fire CRIMSON! SEKKAKUDAKARA!"));
1865 if (!get_aim_dir(&dir)) return FALSE;
1867 /* Use the given direction */
1868 tx = p_ptr->x + 99 * ddx[dir];
1869 ty = p_ptr->y + 99 * ddy[dir];
1871 /* Hack -- Use an actual "target" */
1872 if ((dir == 5) && target_okay())
1878 if (p_ptr->pclass == CLASS_ARCHER)
1880 /* Extra shot at level 10 */
1881 if (p_ptr->lev >= 10) num++;
1883 /* Extra shot at level 30 */
1884 if (p_ptr->lev >= 30) num++;
1886 /* Extra shot at level 45 */
1887 if (p_ptr->lev >= 45) num++;
1890 for (i = 0; i < num; i++)
1891 project(0, p_ptr->lev / 20 + 1, ty, tx, p_ptr->lev*p_ptr->lev * 6 / 50, GF_ROCKET, flg, -1);
1897 msg_format(_("Unknown activation effect: %d.", "Unknown activation effect: %d."), act_ptr->index);
1902 /* Set activation timeout */
1903 if (act_ptr->timeout.constant >= 0) {
1904 o_ptr->timeout = (s16b)act_ptr->timeout.constant;
1905 if (act_ptr->timeout.dice > 0) {
1906 o_ptr->timeout += randint1(act_ptr->timeout.dice);
1910 /* Activations that have special timeout */
1911 switch (act_ptr->index) {
1913 o_ptr->timeout = ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_FLAMES)) ? 200 : 250;
1916 o_ptr->timeout = ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_ICE)) ? 200 : 250;
1919 o_ptr->timeout = 3 * (p_ptr->lev + 10);
1925 msg_format("Special timeout is not implemented: %d.", act_ptr->index);
1934 * @brief 固定アーティファクト『ブラッディムーン』の特性を変更する。
1935 * @details スレイ2d2種、及びone_resistance()による耐性1d2種、pval2種を得る。
1936 * @param o_ptr 対象のオブジェクト構造体(ブラッディムーン)のポインタ
1939 void get_bloody_moon_flags(object_type *o_ptr)
1943 for (i = 0; i < TR_FLAG_SIZE; i++)
1944 o_ptr->art_flags[i] = a_info[ART_BLOOD].flags[i];
1946 dummy = randint1(2) + randint1(2);
1947 for (i = 0; i < dummy; i++)
1949 int flag = randint0(26);
1950 if (flag >= 20) add_flag(o_ptr->art_flags, TR_KILL_UNDEAD + flag - 20);
1951 else if (flag == 19) add_flag(o_ptr->art_flags, TR_KILL_ANIMAL);
1952 else if (flag == 18) add_flag(o_ptr->art_flags, TR_SLAY_HUMAN);
1953 else add_flag(o_ptr->art_flags, TR_CHAOTIC + flag);
1956 dummy = randint1(2);
1957 for (i = 0; i < dummy; i++) one_resistance(o_ptr);
1959 for (i = 0; i < 2; i++)
1961 int tmp = randint0(11);
1962 if (tmp < 6) add_flag(o_ptr->art_flags, TR_STR + tmp);
1963 else add_flag(o_ptr->art_flags, TR_STEALTH + tmp - 6);