3 * @brief プレイヤーの発動コマンド実装
10 #include "cmd-activate.h"
11 #include "object-hook.h"
14 * @brief ペット入りモンスターボールをソートするための比較関数
15 * @param u 所持品配列の参照ポインタ
19 * @return 1の方が大であればTRUE
21 static bool ang_sort_comp_pet(vptr u, vptr v, int a, int b)
23 u16b *who = (u16b*)(u);
28 monster_type *m_ptr1 = &m_list[w1];
29 monster_type *m_ptr2 = &m_list[w2];
30 monster_race *r_ptr1 = &r_info[m_ptr1->r_idx];
31 monster_race *r_ptr2 = &r_info[m_ptr2->r_idx];
36 if (m_ptr1->nickname && !m_ptr2->nickname) return TRUE;
37 if (m_ptr2->nickname && !m_ptr1->nickname) return FALSE;
39 if ((r_ptr1->flags1 & RF1_UNIQUE) && !(r_ptr2->flags1 & RF1_UNIQUE)) return TRUE;
40 if ((r_ptr2->flags1 & RF1_UNIQUE) && !(r_ptr1->flags1 & RF1_UNIQUE)) return FALSE;
42 if (r_ptr1->level > r_ptr2->level) return TRUE;
43 if (r_ptr2->level > r_ptr1->level) return FALSE;
45 if (m_ptr1->hp > m_ptr2->hp) return TRUE;
46 if (m_ptr2->hp > m_ptr1->hp) return FALSE;
53 * @brief 装備を発動するコマンドのサブルーチン /
54 * Activate a wielded object. Wielded objects never stack.
55 * And even if they did, activatable objects never stack.
56 * @param item 発動するオブジェクトの所持品ID
60 * Currently, only (some) artifacts, and Dragon Scale Mail, can be activated.
61 * But one could, for example, easily make an activatable "Ring of Plasma".
62 * Note that it always takes a turn to activate an artifact, even if
63 * the user hits "escape" at the "direction" prompt.
66 void do_cmd_activate_aux(int item)
68 int dir, lev, chance, fail;
73 /* Get the item (in the pack) */
76 o_ptr = &inventory[item];
79 /* Get the item (on the floor) */
82 o_ptr = &o_list[0 - item];
86 p_ptr->energy_use = 100;
88 /* Extract the item level */
89 lev = k_info[o_ptr->k_idx].level;
91 /* Hack -- use artifact level instead */
92 if (object_is_fixed_artifact(o_ptr)) lev = a_info[o_ptr->name1].level;
93 else if (object_is_random_artifact(o_ptr))
95 const activation_type* const act_ptr = find_activation_info(o_ptr);
100 else if (((o_ptr->tval == TV_RING) || (o_ptr->tval == TV_AMULET)) && o_ptr->name2) lev = e_info[o_ptr->name2].level;
102 /* Base chance of success */
103 chance = p_ptr->skill_dev;
105 /* Confusion hurts skill */
106 if (p_ptr->confused) chance = chance / 2;
109 if (chance > fail) fail -= (chance - fail)*2;
110 else chance -= (fail - chance)*2;
111 if (fail < USE_DEVICE) fail = USE_DEVICE;
112 if (chance < USE_DEVICE) chance = USE_DEVICE;
116 if (flush_failure) flush();
117 msg_print(_("止まった時の中ではうまく働かないようだ。", "It shows no reaction."));
122 if (p_ptr->pclass == CLASS_BERSERKER) success = FALSE;
123 else if (chance > fail)
125 if (randint0(chance*2) < fail) success = FALSE;
130 if (randint0(fail*2) < chance) success = TRUE;
131 else success = FALSE;
137 if (flush_failure) flush();
138 msg_print(_("うまく始動させることができなかった。", "You failed to activate it properly."));
143 /* Check the recharge */
146 msg_print(_("それは微かに音を立て、輝き、消えた...", "It whines, glows and fades..."));
150 /* Some lights need enough fuel for activation */
151 if (!o_ptr->xtra4 && (o_ptr->tval == TV_FLASK) &&
152 ((o_ptr->sval == SV_LITE_TORCH) || (o_ptr->sval == SV_LITE_LANTERN)))
154 msg_print(_("燃料がない。", "It has no fuel."));
155 p_ptr->energy_use = 0;
159 /* Activate the artifact */
160 msg_print(_("始動させた...", "You activate it..."));
165 /* Activate object */
166 if (activation_index(o_ptr))
168 (void)activate_artifact(o_ptr);
171 p_ptr->window |= (PW_INVEN | PW_EQUIP);
178 else if (o_ptr->tval == TV_WHISTLE)
180 if (music_singing_any()) stop_singing();
181 if (hex_spelling_any()) stop_hex_spell_all();
184 if (object_is_cursed(o_ptr))
186 msg_print(_("カン高い音が響き渡った。", "You produce a shrill whistling sound."));
187 aggravate_monsters(0);
197 /* Allocate the "who" array */
198 C_MAKE(who, max_m_idx, IDX);
200 /* Process the monsters (backwards) */
201 for (pet_ctr = m_max - 1; pet_ctr >= 1; pet_ctr--)
203 if (is_pet(&m_list[pet_ctr]) && (p_ptr->riding != pet_ctr))
204 who[max_pet++] = pet_ctr;
207 /* Select the sort method */
208 ang_sort_comp = ang_sort_comp_pet;
209 ang_sort_swap = ang_sort_swap_hook;
211 ang_sort(who, &dummy_why, max_pet);
213 /* Process the monsters (backwards) */
214 for (i = 0; i < max_pet; i++)
217 teleport_monster_to(pet_ctr, p_ptr->y, p_ptr->x, 100, TELEPORT_PASSIVE);
220 /* Free the "who" array */
221 C_KILL(who, max_m_idx, IDX);
223 o_ptr->timeout = 100+randint1(100);
226 else if (o_ptr->tval == TV_CAPTURE)
230 bool old_target_pet = target_pet;
232 if (!get_aim_dir(&dir))
234 target_pet = old_target_pet;
237 target_pet = old_target_pet;
239 if(fire_ball(GF_CAPTURE, dir, 0, 0))
241 o_ptr->pval = (PARAMETER_VALUE)cap_mon;
242 o_ptr->xtra3 = (XTRA8)cap_mspeed;
243 o_ptr->xtra4 = (XTRA16)cap_hp;
244 o_ptr->xtra5 = (XTRA16)cap_maxhp;
251 if (o_ptr->inscription)
252 strcpy(buf, quark_str(o_ptr->inscription));
254 for (s = buf;*s && (*s != '#'); s++)
257 if (iskanji(*s)) s++;
267 t = quark_str(cap_nickname);
280 o_ptr->inscription = quark_add(buf);
287 if (!get_rep_dir2(&dir)) return;
288 if (monster_can_enter(p_ptr->y + ddy[dir], p_ptr->x + ddx[dir], &r_info[o_ptr->pval], 0))
290 if (place_monster_aux(0, p_ptr->y + ddy[dir], p_ptr->x + ddx[dir], o_ptr->pval, (PM_FORCE_PET | PM_NO_KAGE)))
292 if (o_ptr->xtra3) m_list[hack_m_idx_ii].mspeed = o_ptr->xtra3;
293 if (o_ptr->xtra5) m_list[hack_m_idx_ii].max_maxhp = o_ptr->xtra5;
294 if (o_ptr->xtra4) m_list[hack_m_idx_ii].hp = o_ptr->xtra4;
295 m_list[hack_m_idx_ii].maxhp = m_list[hack_m_idx_ii].max_maxhp;
296 if (o_ptr->inscription)
304 t = quark_str(o_ptr->inscription);
305 for (t = quark_str(o_ptr->inscription);*t && (*t != '#'); t++)
308 if (iskanji(*t)) t++;
333 if (quote && *(s-1) =='\'')
337 m_list[hack_m_idx_ii].nickname = quark_add(buf);
338 t = quark_str(o_ptr->inscription);
340 while(*t && (*t != '#'))
347 o_ptr->inscription = quark_add(buf);
358 msg_print(_("おっと、解放に失敗した。", "Oops. You failed to release your pet."));
365 msg_print(_("おっと、このアイテムは始動できない。", "Oops. That object cannot be activated."));
369 * @brief 装備を発動するコマンドのメインルーチン /
372 void do_cmd_activate(void)
378 if (p_ptr->special_defense & (KATA_MUSOU | KATA_KOUKIJIN))
380 set_action(ACTION_NONE);
383 item_tester_no_ryoute = TRUE;
384 /* Prepare the hook */
385 item_tester_hook = item_tester_hook_activate;
388 q = _("どのアイテムを始動させますか? ", "Activate which item? ");
389 s = _("始動できるアイテムを装備していない。", "You have nothing to activate.");
391 if (!get_item(&item, q, s, (USE_EQUIP))) return;
393 /* Activate the item */
394 do_cmd_activate_aux(item);
398 * @brief 発動によるブレスの属性をアイテムの耐性から選択し、実行を処理する。/ Dragon breath activation
399 * @details 対象となる耐性は dragonbreath_info テーブルを参照のこと。
400 * @param o_ptr 対象のオブジェクト構造体ポインタ
401 * @return 発動実行の是非を返す。
403 static bool activate_dragon_breath(object_type *o_ptr)
405 u32b flgs[TR_FLAG_SIZE]; /* for resistance flags */
408 int i, dir, t, n = 0;
410 if (!get_aim_dir(&dir)) return FALSE;
412 object_flags(o_ptr, flgs);
414 for (i = 0; dragonbreath_info[i].flag != 0; i++)
416 if (have_flag(flgs, dragonbreath_info[i].flag))
418 type[n] = dragonbreath_info[i].type;
419 name[n] = dragonbreath_info[i].name;
425 if (n == 0) return FALSE;
428 if (music_singing_any()) stop_singing();
429 if (hex_spelling_any()) stop_hex_spell_all();
432 msg_format(_("あなたは%sのブレスを吐いた。", "You breathe %s."), name[t]);
433 fire_breath(type[t], dir, 250, 4);
439 * @brief アイテムの発動効果を処理する。
440 * @param o_ptr 対象のオブジェクト構造体ポインタ
441 * @return 発動実行の是非を返す。
443 bool activate_artifact(object_type *o_ptr)
445 PLAYER_LEVEL plev = p_ptr->lev;
448 cptr name = k_name + k_info[o_ptr->k_idx].name;
449 const activation_type* const act_ptr = find_activation_info(o_ptr);
453 /* Maybe forgot adding information to activation_info table ? */
454 msg_print("Activation information is not found.");
458 /* Activate for attack */
459 switch (act_ptr->index)
463 if (!get_aim_dir(&dir)) return FALSE;
464 msg_print(_("太陽光線が放たれた。", "A line of sunlight appears."));
465 (void)lite_line(dir, damroll(6, 8));
471 msg_print(_("それは眩しいくらいに明るく輝いている...", "It glows extremely brightly..."));
472 if (!get_aim_dir(&dir)) return FALSE;
473 fire_bolt(GF_MISSILE, dir, damroll(2, 6));
479 msg_print(_("それは濃緑色に脈動している...", "It throbs deep green..."));
480 if (!get_aim_dir(&dir)) return FALSE;
481 fire_ball(GF_POIS, dir, 12, 3);
487 msg_print(_("それは火花に覆われた...", "It is covered in sparks..."));
488 if (!get_aim_dir(&dir)) return FALSE;
489 fire_bolt(GF_ELEC, dir, damroll(4, 8));
495 msg_print(_("それは酸に覆われた...", "It is covered in acid..."));
496 if (!get_aim_dir(&dir)) return FALSE;
497 fire_bolt(GF_ACID, dir, damroll(5, 8));
503 msg_print(_("それは霜に覆われた...", "It is covered in frost..."));
504 if (!get_aim_dir(&dir)) return FALSE;
505 fire_bolt(GF_COLD, dir, damroll(6, 8));
511 msg_print(_("それは炎に覆われた...", "It is covered in fire..."));
512 if (!get_aim_dir(&dir)) return FALSE;
513 fire_bolt(GF_FIRE, dir, damroll(9, 8));
519 msg_print(_("それは霜に覆われた...", "It is covered in frost..."));
520 if (!get_aim_dir(&dir)) return FALSE;
521 fire_ball(GF_COLD, dir, 48, 2);
527 msg_print(_("それは青く激しく輝いた...", "It glows an intense blue..."));
528 if (!get_aim_dir(&dir)) return FALSE;
529 fire_ball(GF_COLD, dir, 100, 2);
535 msg_print(_("明るく白色に輝いている...", "It glows bright white..."));
536 if (!get_aim_dir(&dir)) return FALSE;
537 fire_ball(GF_COLD, dir, 400, 3);
543 msg_print(_("それは赤く激しく輝いた...", "It glows an intense red..."));
544 if (!get_aim_dir(&dir)) return FALSE;
545 fire_ball(GF_FIRE, dir, 72, 2);
551 msg_format(_("%sから炎が吹き出した...", "The %s rages in fire..."), name);
552 if (!get_aim_dir(&dir)) return FALSE;
553 fire_ball(GF_FIRE, dir, 120, 3);
559 msg_print(_("深赤色に輝いている...", "It glows deep red..."));
560 if (!get_aim_dir(&dir)) return FALSE;
561 fire_ball(GF_FIRE, dir, 300, 3);
567 msg_print(_("それは赤く激しく輝いた...", "It glows an intense red..."));
568 if (!get_aim_dir(&dir)) return FALSE;
569 fire_ball(GF_FIRE, dir, 100, 2);
575 msg_print(_("電気がパチパチ音を立てた...", "It crackles with electricity..."));
576 if (!get_aim_dir(&dir)) return FALSE;
577 fire_ball(GF_ELEC, dir, 100, 3);
583 msg_print(_("深青色に輝いている...", "It glows deep blue..."));
584 if (!get_aim_dir(&dir)) return FALSE;
585 fire_ball(GF_ELEC, dir, 500, 3);
591 msg_print(_("それは黒く激しく輝いた...", "It glows an intense black..."));
592 if (!get_aim_dir(&dir)) return FALSE;
593 fire_ball(GF_ACID, dir, 100, 2);
599 msg_print(_("それは緑に激しく輝いた...", "It glows an intense green..."));
600 if (!get_aim_dir(&dir)) return FALSE;
601 fire_ball(GF_NUKE, dir, 100, 2);
605 case ACT_HYPODYNAMIA_1:
607 msg_format(_("あなたは%sに敵を締め殺すよう命じた。", "You order the %s to strangle your opponent."), name);
608 if (!get_aim_dir(&dir)) return FALSE;
609 if (hypodynamic_bolt(dir, 100))
613 case ACT_HYPODYNAMIA_2:
615 msg_print(_("黒く輝いている...", "It glows black..."));
616 if (!get_aim_dir(&dir)) return FALSE;
617 hypodynamic_bolt(dir, 120);
623 if (!get_aim_dir(&dir)) return FALSE;
624 for (dummy = 0; dummy < 3; dummy++)
626 if (hypodynamic_bolt(dir, 50))
634 msg_print(_("魔法のトゲが現れた...", "It grows magical spikes..."));
635 if (!get_aim_dir(&dir)) return FALSE;
636 fire_bolt(GF_ARROW, dir, 150);
647 for (dir = 0; dir <= 9; dir++)
649 y = p_ptr->y + ddy[dir];
650 x = p_ptr->x + ddx[dir];
653 /* Get the monster */
654 m_ptr = &m_list[c_ptr->m_idx];
656 /* Hack -- attack monsters */
657 if (c_ptr->m_idx && (m_ptr->ml || cave_have_flag_bold(y, x, FF_PROJECT)))
666 if (!get_aim_dir(&dir)) return FALSE;
667 for (dummy = 0; dummy < 3; dummy++)
669 if (hypodynamic_bolt(dir, 100))
678 msg_print(_("様々な色の火花を発している...", "It glows in scintillating colours..."));
685 if (!get_aim_dir(&dir)) return FALSE;
686 msg_print(_("ロケットを発射した!", "You launch a rocket!"));
687 fire_ball(GF_ROCKET, dir, 250 + plev * 3, 2);
693 msg_print(_("神聖な雰囲気が充満した...", "It floods the area with goodness..."));
694 dispel_evil(p_ptr->lev * 5);
700 if (!get_aim_dir(&dir)) return FALSE;
701 msg_print(_("あなたはエレメントのブレスを吐いた。", "You breathe the elements."));
702 fire_breath(GF_MISSILE, dir, 300, 4);
708 msg_print(_("邪悪な雰囲気が充満した...", "It floods the area with evil..."));
709 dispel_good(p_ptr->lev * 5);
715 msg_format(_("%sに魔法のトゲが現れた...", "The %s grows magical spikes..."), name);
716 if (!get_aim_dir(&dir)) return FALSE;
717 fire_bolt(GF_ARROW, dir, 150);
723 msg_format(_("%sが深い青色に鼓動している...", "The %s throbs deep blue..."), name);
724 if (!get_aim_dir(&dir)) return FALSE;
725 fire_ball(GF_WATER, dir, 200, 3);
731 msg_format(_("%sが深い闇に覆われた...", "The %s is coverd in pitch-darkness..."), name);
732 if (!get_aim_dir(&dir)) return FALSE;
733 fire_ball(GF_DARK, dir, 250, 4);
739 msg_format(_("%sが青白く光った...", "The %s glows pale..."), name);
740 if (!get_aim_dir(&dir)) return FALSE;
741 fire_ball(GF_MANA, dir, 250, 4);
747 msg_print(_("あなたは害虫を一掃した。", "You exterminate small life."));
748 (void)dispel_monsters(4);
752 case ACT_BLINDING_LIGHT:
754 msg_format(_("%sが眩しい光で輝いた...", "The %s gleams with blinding light..."), name);
755 fire_ball(GF_LITE, 0, 300, 6);
756 confuse_monsters(3 * p_ptr->lev / 2);
762 msg_format(_("%sは漆黒に輝いた...", "The %s glows intensely black..."), name);
763 if (!get_aim_dir(&dir)) return FALSE;
768 case ACT_CAST_BA_STAR:
770 HIT_POINT num = damroll(5, 3);
771 POSITION y = 0, x = 0;
773 msg_format(_("%sが稲妻で覆われた...", "The %s is surrounded by lightning..."), name);
774 for (k = 0; k < num; k++)
780 scatter(&y, &x, p_ptr->y, p_ptr->x, 4, 0);
782 if (!cave_have_flag_bold(y, x, FF_PROJECT)) continue;
784 if (!player_bold(y, x)) break;
787 project(0, 3, y, x, 150, GF_ELEC,
788 (PROJECT_THRU | PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL), -1);
794 case ACT_BLADETURNER:
796 if (!get_aim_dir(&dir)) return FALSE;
797 msg_print(_("あなたはエレメントのブレスを吐いた。", "You breathe the elements."));
798 fire_breath(GF_MISSILE, dir, 300, 4);
799 msg_print(_("鎧が様々な色に輝いた...", "Your armor glows many colours..."));
801 (void)set_hero(randint1(50) + 50, FALSE);
803 (void)set_blessed(randint1(50) + 50, FALSE);
804 (void)set_oppose_acid(randint1(50) + 50, FALSE);
805 (void)set_oppose_elec(randint1(50) + 50, FALSE);
806 (void)set_oppose_fire(randint1(50) + 50, FALSE);
807 (void)set_oppose_cold(randint1(50) + 50, FALSE);
808 (void)set_oppose_pois(randint1(50) + 50, FALSE);
814 if (!get_aim_dir(&dir)) return FALSE;
815 fire_breath(GF_FIRE, dir, 200, 2);
816 if ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_FLAMES))
818 (void)set_oppose_fire(randint1(20) + 20, FALSE);
824 if (!get_aim_dir(&dir)) return FALSE;
825 fire_breath(GF_COLD, dir, 200, 2);
826 if ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_ICE))
828 (void)set_oppose_cold(randint1(20) + 20, FALSE);
834 if (!activate_dragon_breath(o_ptr)) return FALSE;
838 /* Activate for other offensive action */
842 msg_print(_("様々な色の火花を発している...", "It glows in scintillating colours..."));
843 if (!get_aim_dir(&dir)) return FALSE;
844 confuse_monster(dir, 20);
850 msg_print(_("深青色に輝いている...", "It glows deep blue..."));
851 sleep_monsters_touch();
857 earthquake(p_ptr->y, p_ptr->x, 5);
863 turn_monsters(40 + p_ptr->lev);
869 if (!get_aim_dir(&dir)) return FALSE;
870 (void)fire_beam(GF_AWAY_ALL, dir, plev);
874 case ACT_BANISH_EVIL:
876 if (banish_evil(100))
878 msg_print(_("アーティファクトの力が邪悪を打ち払った!", "The power of the artifact banishes evil!"));
885 msg_print(_("深青色に輝いている...", "It glows deep blue..."));
886 (void)symbol_genocide(200, TRUE);
892 msg_print(_("ひどく鋭い音が流れ出た...", "It lets out a long, shrill note..."));
893 (void)mass_genocide(200, TRUE);
899 if (music_singing_any()) stop_singing();
900 if (hex_spelling_any()) stop_hex_spell_all();
901 msg_print(_("あなたは力強い突風を吹き鳴らした。周囲の敵が震え上っている!",
902 "You wind a mighty blast; your enemies tremble!"));
903 (void)turn_monsters((3 * p_ptr->lev / 2) + 10);
909 if (o_ptr->name1 == ART_HYOUSIGI)
911 msg_print(_("拍子木を打った。", "You beat Your wooden clappers."));
915 msg_format(_("%sは不快な物音を立てた。", "The %s sounds an unpleasant noise."), name);
917 aggravate_monsters(0);
921 /* Activate for summoning / charming */
923 case ACT_CHARM_ANIMAL:
925 if (!get_aim_dir(&dir)) return FALSE;
926 (void)charm_animal(dir, plev);
930 case ACT_CHARM_UNDEAD:
932 if (!get_aim_dir(&dir)) return FALSE;
933 (void)control_one_undead(dir, plev);
937 case ACT_CHARM_OTHER:
939 if (!get_aim_dir(&dir)) return FALSE;
940 (void)charm_monster(dir, plev * 2);
944 case ACT_CHARM_ANIMALS:
946 (void)charm_animals(plev * 2);
950 case ACT_CHARM_OTHERS:
952 charm_monsters(plev * 2);
956 case ACT_SUMMON_ANIMAL:
958 (void)summon_specific(-1, p_ptr->y, p_ptr->x, plev, SUMMON_ANIMAL_RANGER, (PM_ALLOW_GROUP | PM_FORCE_PET));
962 case ACT_SUMMON_PHANTOM:
964 msg_print(_("幻霊を召喚した。", "You summon a phantasmal servant."));
965 (void)summon_specific(-1, p_ptr->y, p_ptr->x, dun_level, SUMMON_PHANTOM, (PM_ALLOW_GROUP | PM_FORCE_PET));
969 case ACT_SUMMON_ELEMENTAL:
971 bool pet = one_in_(3);
974 if (!(pet && (plev < 50))) mode |= PM_ALLOW_GROUP;
975 if (pet) mode |= PM_FORCE_PET;
976 else mode |= PM_NO_PET;
978 if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, ((plev * 3) / 2), SUMMON_ELEMENTAL, mode))
980 msg_print(_("エレメンタルが現れた...", "An elemental materializes..."));
982 msg_print(_("あなたに服従しているようだ。", "It seems obedient to you."));
984 msg_print(_("それをコントロールできなかった!", "You fail to control it!"));
990 case ACT_SUMMON_DEMON:
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_DEMON, mode))
1001 msg_print(_("硫黄の悪臭が充満した。", "The area fills with a stench of sulphur and brimstone."));
1003 msg_print(_("「ご用でございますか、ご主人様」", "'What is thy bidding... Master?'"));
1005 msg_print(_("「NON SERVIAM! Wretch! お前の魂を頂くぞ!」", "'NON SERVIAM! Wretch! I shall feast on thy mortal soul!'"));
1011 case ACT_SUMMON_UNDEAD:
1013 bool pet = one_in_(3);
1015 BIT_FLAGS mode = 0L;
1017 type = (plev > 47 ? SUMMON_HI_UNDEAD : SUMMON_UNDEAD);
1019 if (!pet || ((plev > 24) && one_in_(3))) mode |= PM_ALLOW_GROUP;
1020 if (pet) mode |= PM_FORCE_PET;
1021 else mode |= (PM_ALLOW_UNIQUE | PM_NO_PET);
1023 if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, ((plev * 3) / 2), type, mode))
1025 msg_print(_("冷たい風があなたの周りに吹き始めた。それは腐敗臭を運んでいる...",
1026 "Cold winds begin to blow around you, carrying with them the stench of decay..."));
1028 msg_print(_("古えの死せる者共があなたに仕えるため土から甦った!",
1029 "Ancient, long-dead forms arise from the ground to serve you!"));
1031 msg_print(_("死者が甦った。眠りを妨げるあなたを罰するために!",
1032 "'The dead arise... to punish you for disturbing them!'"));
1038 case ACT_SUMMON_HOUND:
1040 BIT_FLAGS mode = PM_ALLOW_GROUP;
1041 bool pet = !one_in_(5);
1042 if (pet) mode |= PM_FORCE_PET;
1043 else mode |= PM_NO_PET;
1045 if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, ((p_ptr->lev * 3) / 2), SUMMON_HOUND, mode))
1049 msg_print(_("ハウンドがあなたの下僕として出現した。",
1050 "A group of hounds appear as your servant."));
1052 msg_print(_("ハウンドはあなたに牙を向けている!",
1053 "A group of hounds appear as your enemy!"));
1059 case ACT_SUMMON_DAWN:
1061 msg_print(_("暁の師団を召喚した。", "You summon the Legion of the Dawn."));
1062 (void)summon_specific(-1, p_ptr->y, p_ptr->x, dun_level, SUMMON_DAWN, (PM_ALLOW_GROUP | PM_FORCE_PET));
1066 case ACT_SUMMON_OCTOPUS:
1068 BIT_FLAGS mode = PM_ALLOW_GROUP;
1069 bool pet = !one_in_(5);
1070 if (pet) mode |= PM_FORCE_PET;
1072 if (summon_named_creature(0, p_ptr->y, p_ptr->x, MON_JIZOTAKO, mode))
1075 msg_print(_("蛸があなたの下僕として出現した。", "A group of octopuses appear as your servant."));
1077 msg_print(_("蛸はあなたを睨んでいる!", "A group of octopuses appear as your enemy!"));
1083 /* Activate for healing */
1085 case ACT_CHOIR_SINGS:
1087 msg_print(_("天国の歌が聞こえる...", "A heavenly choir sings..."));
1088 (void)set_poisoned(0);
1091 (void)set_confused(0);
1093 (void)set_afraid(0);
1094 (void)set_hero(randint1(25) + 25, FALSE);
1095 (void)hp_player(777);
1101 (void)set_afraid(0);
1102 (void)hp_player(30);
1108 msg_print(_("深紫色の光を発している...", "It radiates deep purple..."));
1109 hp_player(damroll(4, 8));
1110 (void)set_cut((p_ptr->cut / 2) - 50);
1114 case ACT_CURE_POISON:
1116 msg_print(_("深青色に輝いている...", "It glows deep blue..."));
1117 (void)set_afraid(0);
1118 (void)set_poisoned(0);
1124 msg_print(_("深紅に輝いている...", "It glows a deep red..."));
1131 msg_print(_("濃緑色に輝いている...", "It glows a deep green..."));
1132 (void)do_res_stat(A_STR);
1133 (void)do_res_stat(A_INT);
1134 (void)do_res_stat(A_WIS);
1135 (void)do_res_stat(A_DEX);
1136 (void)do_res_stat(A_CON);
1137 (void)do_res_stat(A_CHR);
1138 (void)restore_level();
1144 msg_print(_("深青色に輝いている...", "It glows deep blue..."));
1145 msg_print(_("体内に暖かい鼓動が感じられる...", "You feel a warm tingling inside..."));
1146 (void)hp_player(700);
1153 msg_print(_("白く明るく輝いている...", "It glows a bright white..."));
1154 msg_print(_("ひじょうに気分がよい...", "You feel much better..."));
1155 (void)hp_player(1000);
1162 msg_format(_("%sの優しさに癒される...", "the %s cures you affectionately ..."), name);
1163 (void)set_poisoned(0);
1164 (void)set_confused(0);
1173 case ACT_CURE_MANA_FULL:
1175 msg_format(_("%sが青白く光った...", "The %s glows pale..."), name);
1176 if (p_ptr->pclass == CLASS_MAGIC_EATER)
1179 for (i = 0; i < EATER_EXT * 2; i++)
1181 p_ptr->magic_num1[i] += (p_ptr->magic_num2[i] < 10) ? EATER_CHARGE * 3 : p_ptr->magic_num2[i] * EATER_CHARGE / 3;
1182 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;
1184 for (; i < EATER_EXT * 3; i++)
1186 KIND_OBJECT_IDX k_idx = lookup_kind(TV_ROD, i - EATER_EXT * 2);
1187 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;
1188 if (p_ptr->magic_num1[i] < 0) p_ptr->magic_num1[i] = 0;
1190 msg_print(_("頭がハッキリとした。", "You feel your head clear."));
1191 p_ptr->window |= (PW_PLAYER);
1193 else if (p_ptr->csp < p_ptr->msp)
1195 p_ptr->csp = p_ptr->msp;
1196 p_ptr->csp_frac = 0;
1197 msg_print(_("頭がハッキリとした。", "You feel your head clear."));
1198 p_ptr->redraw |= (PR_MANA);
1199 p_ptr->window |= (PW_PLAYER);
1200 p_ptr->window |= (PW_SPELL);
1205 /* Activate for timed effect */
1209 (void)set_tim_esp(randint1(30) + 25, FALSE);
1215 (void)set_afraid(0);
1216 (void)set_shero(randint1(25) + 25, FALSE);
1217 /* (void)set_afraid(0);
1218 (void)set_hero(randint1(50) + 50, FALSE);
1219 (void)set_blessed(randint1(50) + 50, FALSE);
1220 o_ptr->timeout = 100 + randint1(100); */
1226 msg_format(_("%sから鋭い音が流れ出た...", "The %s lets out a shrill wail..."), name);
1228 (void)set_protevil(randint1(25) + k, FALSE);
1232 case ACT_RESIST_ALL:
1234 msg_print(_("様々な色に輝いている...", "It glows many colours..."));
1235 (void)set_oppose_acid(randint1(40) + 40, FALSE);
1236 (void)set_oppose_elec(randint1(40) + 40, FALSE);
1237 (void)set_oppose_fire(randint1(40) + 40, FALSE);
1238 (void)set_oppose_cold(randint1(40) + 40, FALSE);
1239 (void)set_oppose_pois(randint1(40) + 40, FALSE);
1245 msg_print(_("明るく緑色に輝いている...", "It glows bright green..."));
1246 (void)set_fast(randint1(20) + 20, FALSE);
1250 case ACT_XTRA_SPEED:
1252 msg_print(_("明るく輝いている...", "It glows brightly..."));
1253 (void)set_fast(randint1(75) + 75, FALSE);
1259 set_wraith_form(randint1(plev / 2) + (plev / 2), FALSE);
1265 (void)set_invuln(randint1(8) + 8, FALSE);
1271 (void)set_afraid(0);
1272 set_hero(randint1(25) + 25, FALSE);
1277 case ACT_HELO_SPEED:
1279 (void)set_fast(randint1(50) + 50, FALSE);
1282 set_hero(randint1(50) + 50, FALSE);
1286 case ACT_RESIST_ACID:
1288 msg_format(_("%sが黒く輝いた...", "The %s grows black."), name);
1289 if ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_ACID))
1291 if (!get_aim_dir(&dir)) return FALSE;
1292 fire_ball(GF_ACID, dir, 100, 2);
1294 (void)set_oppose_acid(randint1(20) + 20, FALSE);
1298 case ACT_RESIST_FIRE:
1300 msg_format(_("%sが赤く輝いた...", "The %s grows red."), name);
1301 if ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_FLAMES))
1303 if (!get_aim_dir(&dir)) return FALSE;
1304 fire_ball(GF_FIRE, dir, 100, 2);
1306 (void)set_oppose_fire(randint1(20) + 20, FALSE);
1310 case ACT_RESIST_COLD:
1312 msg_format(_("%sが白く輝いた...", "The %s grows white."), name);
1313 if ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_ICE))
1315 if (!get_aim_dir(&dir)) return FALSE;
1316 fire_ball(GF_COLD, dir, 100, 2);
1318 (void)set_oppose_cold(randint1(20) + 20, FALSE);
1322 case ACT_RESIST_ELEC:
1324 msg_format(_("%sが青く輝いた...", "The %s grows blue."), name);
1325 if ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_ELEC))
1327 if (!get_aim_dir(&dir)) return FALSE;
1328 fire_ball(GF_ELEC, dir, 100, 2);
1330 (void)set_oppose_elec(randint1(20) + 20, FALSE);
1334 case ACT_RESIST_POIS:
1336 msg_format(_("%sが緑に輝いた...", "The %s grows green."), name);
1337 (void)set_oppose_pois(randint1(20) + 20, FALSE);
1341 /* Activate for general purpose effect (detection etc.) */
1345 msg_format(_("%sから澄んだ光があふれ出た...", "The %s wells with clear light..."), name);
1346 lite_area(damroll(2, 15), 3);
1352 msg_print(_("眩しく輝いた...", "It shines brightly..."));
1353 map_area(DETECT_RAD_MAP);
1354 lite_area(damroll(2, 15), 3);
1358 case ACT_DETECT_ALL:
1360 msg_print(_("白く明るく輝いている...", "It glows bright white..."));
1361 msg_print(_("心にイメージが浮かんできた...", "An image forms in your mind..."));
1362 detect_all(DETECT_RAD_DEFAULT);
1366 case ACT_DETECT_XTRA:
1368 msg_print(_("明るく輝いている...", "It glows brightly..."));
1369 detect_all(DETECT_RAD_DEFAULT);
1371 identify_fully(FALSE);
1377 msg_print(_("黄色く輝いている...", "It glows yellow..."));
1378 identify_fully(FALSE);
1384 if (!ident_spell(FALSE)) return FALSE;
1388 case ACT_RUNE_EXPLO:
1390 msg_print(_("明るい赤色に輝いている...", "It glows bright red..."));
1397 msg_print(_("ブルーに明るく輝いている...", "It glows light blue..."));
1404 (void)set_food(PY_FOOD_MAX - 1);
1410 msg_print(_("明るい赤色に輝いている...", "It glows bright red..."));
1411 destroy_doors_touch();
1417 msg_print(_("鼓動している...", "It pulsates..."));
1418 if (!get_aim_dir(&dir)) return FALSE;
1419 wall_to_mud(dir, 20 + randint1(30));
1431 msg_print(_("明るい黄色に輝いている...", "It glows bright yellow..."));
1438 msg_print(_("次元の扉が開いた。目的地を選んで下さい。", "You open a dimensional gate. Choose a destination."));
1439 if (!dimension_door()) return FALSE;
1446 msg_print(_("周りの空間が歪んでいる...", "It twists space around you..."));
1447 teleport_player(100, 0L);
1453 msg_print(_("やわらかな白色に輝いている...", "It glows soft white..."));
1454 if (!word_of_recall()) return FALSE;
1460 msg_format(_("%sは赤く明るく光った!", "The %s flashes bright red!"), name);
1461 chg_virtue(V_KNOWLEDGE, 1);
1462 chg_virtue(V_ENLIGHTEN, 1);
1465 msg_format(_("%sはあなたの体力を奪った...", "The %s drains your vitality..."), name);
1466 take_hit(DAMAGE_LOSELIFE, damroll(3, 8), _("審判の宝石", "the Jewel of Judgement"), -1);
1468 (void)detect_traps(DETECT_RAD_DEFAULT, TRUE);
1469 (void)detect_doors(DETECT_RAD_DEFAULT);
1470 (void)detect_stairs(DETECT_RAD_DEFAULT);
1472 if (get_check(_("帰還の力を使いますか?", "Activate recall? ")))
1474 (void)word_of_recall();
1480 case ACT_TELEKINESIS:
1482 if (!get_aim_dir(&dir)) return FALSE;
1483 msg_format(_("%sを伸ばした。", "You stretched your %s."), name);
1484 fetch(dir, 500, TRUE);
1488 case ACT_DETECT_UNIQUE:
1491 monster_type *m_ptr;
1492 monster_race *r_ptr;
1493 msg_print(_("奇妙な場所が頭の中に浮かんだ...", "Some strange places show up in your mind. And you see ..."));
1494 /* Process the monsters (backwards) */
1495 for (i = m_max - 1; i >= 1; i--)
1497 /* Access the monster */
1500 /* Ignore "dead" monsters */
1501 if (!m_ptr->r_idx) continue;
1503 r_ptr = &r_info[m_ptr->r_idx];
1505 if (r_ptr->flags1 & RF1_UNIQUE)
1507 msg_format(_("%s. ", "%s. "), r_name + r_ptr->name);
1515 switch (randint1(13))
1517 case 1: case 2: case 3: case 4: case 5:
1518 teleport_player(10, 0L);
1520 case 6: case 7: case 8: case 9: case 10:
1521 teleport_player(222, 0L);
1524 (void)stair_creation();
1527 if (get_check(_("この階を去りますか?", "Leave this level? ")))
1529 if (autosave_l) do_cmd_save_game(TRUE);
1532 p_ptr->leaving = TRUE;
1538 case ACT_DISP_CURSE_XTRA:
1540 msg_format(_("%sが真実を照らし出す...", "The %s exhibits the truth..."), name);
1541 if (remove_all_curse())
1543 msg_print(_("誰かに見守られているような気がする。", "You feel as if someone is watching over you."));
1549 case ACT_BRAND_FIRE_BOLTS:
1551 msg_format(_("%sが深紅に輝いた...", "Your %s glows deep red..."), name);
1552 (void)brand_bolts();
1556 case ACT_RECHARGE_XTRA:
1558 msg_format(_("%sが白く輝いた...", "The %s gleams with blinding light..."), name);
1559 if (!recharge(1000)) return FALSE;
1565 msg_print(_("石が隠された秘密を写し出した...", "The stone reveals hidden mysteries..."));
1566 if (!ident_spell(FALSE)) return FALSE;
1568 if (mp_ptr->spell_book)
1570 /* Sufficient mana */
1571 if (20 <= p_ptr->csp)
1577 /* Over-exert the player */
1580 int oops = 20 - p_ptr->csp;
1584 p_ptr->csp_frac = 0;
1587 msg_print(_("石を制御できない!", "You are too weak to control the stone!"));
1588 /* Hack -- Bypass free action */
1589 (void)set_paralyzed(p_ptr->paralyzed +
1590 randint1(5 * oops + 1));
1593 (void)set_confused(p_ptr->confused +
1594 randint1(5 * oops + 1));
1598 p_ptr->redraw |= (PR_MANA);
1600 take_hit(DAMAGE_LOSELIFE, damroll(1, 12), _("危険な秘密", "perilous secrets"), -1);
1602 if (one_in_(5)) (void)set_confused(p_ptr->confused +
1605 /* Exercise a little care... */
1607 take_hit(DAMAGE_LOSELIFE, damroll(4, 10), _("危険な秘密", "perilous secrets"), -1);
1613 msg_print(_("力強く四股を踏んだ。", "You stamp. (as if you are in a ring.)"));
1614 (void)set_afraid(0);
1615 (void)set_hero(randint1(20) + 20, FALSE);
1616 dispel_evil(p_ptr->lev * 3);
1620 case ACT_PHASE_DOOR:
1622 teleport_player(10, 0L);
1626 case ACT_DETECT_ALL_MONS:
1628 (void)detect_monsters_invis(255);
1629 (void)detect_monsters_normal(255);
1633 case ACT_ULTIMATE_RESIST:
1635 TIME_EFFECT v = randint1(25) + 25;
1636 (void)set_afraid(0);
1637 (void)set_hero(v, FALSE);
1638 (void)hp_player(10);
1639 (void)set_blessed(v, FALSE);
1640 (void)set_oppose_acid(v, FALSE);
1641 (void)set_oppose_elec(v, FALSE);
1642 (void)set_oppose_fire(v, FALSE);
1643 (void)set_oppose_cold(v, FALSE);
1644 (void)set_oppose_pois(v, FALSE);
1645 (void)set_ultimate_res(v, FALSE);
1650 /* Unique activation */
1655 char o_name[MAX_NLEN];
1658 /* Cast off activated item */
1659 for (inv = INVEN_RARM; inv <= INVEN_FEET; inv++)
1661 if (o_ptr == &inventory[inv]) break;
1665 if (inv > INVEN_FEET) return FALSE;
1667 object_copy(&forge, o_ptr);
1668 inven_item_increase(inv, (0 - o_ptr->number));
1669 inven_item_optimize(inv);
1670 o_idx = drop_near(&forge, 0, p_ptr->y, p_ptr->x);
1671 o_ptr = &o_list[o_idx];
1673 object_desc(o_name, o_ptr, OD_NAME_ONLY);
1674 msg_format(_("%sを脱ぎ捨てた。", "You cast off %s."), o_name);
1677 msg_print(_("「燃え上がれ俺の小宇宙!」", "You say, 'Burn up my cosmo!"));
1678 t = 20 + randint1(20);
1679 (void)set_blind(p_ptr->blind + t);
1680 (void)set_afraid(0);
1681 (void)set_tim_esp(p_ptr->tim_esp + t, FALSE);
1682 (void)set_tim_regen(p_ptr->tim_regen + t, FALSE);
1683 (void)set_hero(p_ptr->hero + t, FALSE);
1684 (void)set_blessed(p_ptr->blessed + t, FALSE);
1685 (void)set_fast(p_ptr->fast + t, FALSE);
1686 (void)set_shero(p_ptr->shero + t, FALSE);
1687 if (p_ptr->pclass == CLASS_FORCETRAINER)
1689 P_PTR_KI = plev * 5 + 190;
1690 msg_print(_("気が爆発寸前になった。", "Your force are immediatly before explosion."));
1696 case ACT_FALLING_STAR:
1698 msg_print(_("あなたは妖刀に魅入られた…", "You are enchanted by cursed blade..."));
1699 msg_print(_("「狂ほしく 血のごとき 月はのぼれり 秘めおきし 魔剣 いずこぞや」", "'Behold the blade arts.'"));
1704 case ACT_GRAND_CROSS:
1706 msg_print(_("「闇に還れ!」", "You say, 'Return to darkness!'"));
1707 project(0, 8, p_ptr->y, p_ptr->x, (randint1(100) + 200) * 2, GF_HOLY_FIRE, PROJECT_KILL | PROJECT_ITEM | PROJECT_GRID, -1);
1711 case ACT_TELEPORT_LEVEL:
1713 if (!get_check(_("本当に他の階にテレポートしますか?", "Are you sure? (Teleport Level)"))) return FALSE;
1718 case ACT_STRAIN_HASTE:
1721 msg_format(_("%sはあなたの体力を奪った...", "The %s drains your vitality..."), name);
1722 take_hit(DAMAGE_LOSELIFE, damroll(3, 8), _("加速した疲労", "the strain of haste"), -1);
1723 t = 25 + randint1(25);
1724 (void)set_fast(p_ptr->fast + t, FALSE);
1732 if (!get_rep_dir2(&dir)) return FALSE;
1733 y = p_ptr->y + ddy[dir];
1734 x = p_ptr->x + ddx[dir];
1736 if (!cave_have_flag_bold(y, x, FF_WATER))
1738 msg_print(_("そこは水辺ではない。", "There is no fishing place."));
1741 else if (cave[y][x].m_idx)
1744 monster_desc(m_name, &m_list[cave[y][x].m_idx], 0);
1745 msg_format(_("%sが邪魔だ!", "%^s is stand in your way."), m_name);
1746 p_ptr->energy_use = 0;
1749 set_action(ACTION_FISH);
1750 p_ptr->redraw |= (PR_STATE);
1757 monster_type *m_ptr;
1760 if (summon_named_creature(0, p_ptr->y, p_ptr->x, MON_SUKE, PM_FORCE_PET))
1762 msg_print(_("『助さん』が現れた。", "Suke-san apperars."));
1763 kakusan = "Suke-san";
1766 if (summon_named_creature(0, p_ptr->y, p_ptr->x, MON_KAKU, PM_FORCE_PET))
1768 msg_print(_("『格さん』が現れた。", "Kaku-san appears."));
1769 kakusan = "Kaku-san";
1774 for (i = m_max - 1; i > 0; i--)
1777 if (!m_ptr->r_idx) continue;
1778 if (!((m_ptr->r_idx == MON_SUKE) || (m_ptr->r_idx == MON_KAKU))) continue;
1779 if (!los(m_ptr->fy, m_ptr->fx, p_ptr->y, p_ptr->x)) continue;
1780 if (!projectable(m_ptr->fy, m_ptr->fx, p_ptr->y, p_ptr->x)) continue;
1788 msg_format(_("「者ども、ひかえおろう!!!このお方をどなたとこころえる。」",
1789 "%^s says 'WHO do you think this person is! Bow your head, down your knees!'"), kakusan);
1792 confuse_monsters(120);
1794 stasis_monsters(120);
1799 msg_print(_("しかし、何も起きなかった。", "Nothing happen."));
1806 /* Only for Muramasa */
1807 if (o_ptr->name1 != ART_MURAMASA) return FALSE;
1808 if (get_check(_("本当に使いますか?", "Are you sure?!")))
1810 msg_print(_("村正が震えた...", "The Muramasa pulsates..."));
1814 msg_print(_("村正は壊れた!", "The Muramasa is destroyed!"));
1815 curse_weapon_object(TRUE, o_ptr);
1821 case ACT_BLOODY_MOON:
1823 /* Only for Bloody Moon */
1824 if (o_ptr->name1 != ART_BLOOD) return FALSE;
1825 msg_print(_("鎌が明るく輝いた...", "Your scythe glows brightly!"));
1826 get_bloody_moon_flags(o_ptr);
1827 if (p_ptr->prace == RACE_ANDROID) calc_android_exp();
1828 p_ptr->update |= (PU_BONUS | PU_HP);
1836 BIT_FLAGS flg = PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
1839 /* Only for Crimson */
1840 if (o_ptr->name1 != ART_CRIMSON) return FALSE;
1842 msg_print(_("せっかくだから『クリムゾン』をぶっぱなすぜ!", "I'll fire CRIMSON! SEKKAKUDAKARA!"));
1844 if (!get_aim_dir(&dir)) return FALSE;
1846 /* Use the given direction */
1847 tx = p_ptr->x + 99 * ddx[dir];
1848 ty = p_ptr->y + 99 * ddy[dir];
1850 /* Hack -- Use an actual "target" */
1851 if ((dir == 5) && target_okay())
1857 if (p_ptr->pclass == CLASS_ARCHER)
1859 /* Extra shot at level 10 */
1860 if (p_ptr->lev >= 10) num++;
1862 /* Extra shot at level 30 */
1863 if (p_ptr->lev >= 30) num++;
1865 /* Extra shot at level 45 */
1866 if (p_ptr->lev >= 45) num++;
1869 for (i = 0; i < num; i++)
1870 project(0, p_ptr->lev / 20 + 1, ty, tx, p_ptr->lev*p_ptr->lev * 6 / 50, GF_ROCKET, flg, -1);
1876 msg_format(_("Unknown activation effect: %d.", "Unknown activation effect: %d."), act_ptr->index);
1881 /* Set activation timeout */
1882 if (act_ptr->timeout.constant >= 0) {
1883 o_ptr->timeout = (s16b)act_ptr->timeout.constant;
1884 if (act_ptr->timeout.dice > 0) {
1885 o_ptr->timeout += randint1(act_ptr->timeout.dice);
1889 /* Activations that have special timeout */
1890 switch (act_ptr->index) {
1892 o_ptr->timeout = ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_FLAMES)) ? 200 : 250;
1895 o_ptr->timeout = ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_ICE)) ? 200 : 250;
1898 o_ptr->timeout = 3 * (p_ptr->lev + 10);
1904 msg_format("Special timeout is not implemented: %d.", act_ptr->index);
1913 * @brief 固定アーティファクト『ブラッディムーン』の特性を変更する。
1914 * @details スレイ2d2種、及びone_resistance()による耐性1d2種、pval2種を得る。
1915 * @param o_ptr 対象のオブジェクト構造体(ブラッディムーン)のポインタ
1918 void get_bloody_moon_flags(object_type *o_ptr)
1922 for (i = 0; i < TR_FLAG_SIZE; i++)
1923 o_ptr->art_flags[i] = a_info[ART_BLOOD].flags[i];
1925 dummy = randint1(2) + randint1(2);
1926 for (i = 0; i < dummy; i++)
1928 int flag = randint0(26);
1929 if (flag >= 20) add_flag(o_ptr->art_flags, TR_KILL_UNDEAD + flag - 20);
1930 else if (flag == 19) add_flag(o_ptr->art_flags, TR_KILL_ANIMAL);
1931 else if (flag == 18) add_flag(o_ptr->art_flags, TR_SLAY_HUMAN);
1932 else add_flag(o_ptr->art_flags, TR_CHAOTIC + flag);
1935 dummy = randint1(2);
1936 for (i = 0; i < dummy; i++) one_resistance(o_ptr);
1938 for (i = 0; i < 2; i++)
1940 int tmp = randint0(11);
1941 if (tmp < 6) add_flag(o_ptr->art_flags, TR_STR + tmp);
1942 else add_flag(o_ptr->art_flags, TR_STEALTH + tmp - 6);