3 #include "projection.h"
4 #include "spells-summon.h"
6 #include "spells-status.h"
10 * @brief トランプ領域魔法の各処理を行う
12 * @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST)
13 * @return SPELL_NAME / SPELL_DESC / SPELL_INFO 時には文字列ポインタを返す。SPELL_CAST時はNULL文字列を返す。
15 concptr do_trump_spell(SPELL_IDX spell, BIT_FLAGS mode)
17 bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
18 bool desc = (mode == SPELL_DESC) ? TRUE : FALSE;
19 bool info = (mode == SPELL_INFO) ? TRUE : FALSE;
20 bool cast = (mode == SPELL_CAST) ? TRUE : FALSE;
21 bool fail = (mode == SPELL_FAIL) ? TRUE : FALSE;
24 PLAYER_LEVEL plev = p_ptr->lev;
29 if (name) return _("ショート・テレポート", "Phase Door");
30 if (desc) return _("近距離のテレポートをする。", "Teleport short distance.");
35 if (info) return info_range(range);
39 teleport_player(range, 0L);
45 if (name) return _("蜘蛛のカード", "Trump Spiders");
46 if (desc) return _("蜘蛛を召喚する。", "Summons spiders.");
51 msg_print(_("あなたは蜘蛛のカードに集中する...", "You concentrate on the trump of an spider..."));
52 if (trump_summoning(1, !fail, p_ptr->y, p_ptr->x, 0, SUMMON_SPIDER, PM_ALLOW_GROUP))
56 msg_print(_("召喚された蜘蛛は怒っている!", "The summoned spiders get angry!"));
64 if (name) return _("シャッフル", "Shuffle");
65 if (desc) return _("カードの占いをする。", "Causes random effects.");
68 if (info) return KWD_RANDOM;
78 if (name) return _("フロア・リセット", "Reset Recall");
79 if (desc) return _("最深階を変更する。", "Resets the 'deepest' level for recall spell.");
84 if (!reset_recall()) return NULL;
90 if (name) return _("テレポート", "Teleport");
91 if (desc) return _("遠距離のテレポートをする。", "Teleport long distance.");
94 POSITION range = plev * 4;
96 if (info) return info_range(range);
100 teleport_player(range, 0L);
106 if (name) return _("感知のカード", "Trump Spying");
107 if (desc) return _("一定時間、テレパシー能力を得る。", "Gives telepathy for a while.");
113 if (info) return info_duration(base, sides);
117 set_tim_esp(randint1(sides) + base, FALSE);
123 if (name) return _("テレポート・モンスター", "Teleport Away");
124 if (desc) return _("モンスターをテレポートさせるビームを放つ。抵抗されると無効。", "Teleports all monsters on the line away unless resisted.");
129 if (info) return info_power(power);
133 if (!get_aim_dir(&dir)) return NULL;
135 fire_beam(GF_AWAY_ALL, dir, power);
141 if (name) return _("動物のカード", "Trump Animals");
142 if (desc) return _("1体の動物を召喚する。", "Summons an animal.");
147 int type = (!fail ? SUMMON_ANIMAL_RANGER : SUMMON_ANIMAL);
148 msg_print(_("あなたは動物のカードに集中する...", "You concentrate on the trump of an animal..."));
149 if (trump_summoning(1, !fail, p_ptr->y, p_ptr->x, 0, type, 0L))
153 msg_print(_("召喚された動物は怒っている!", "The summoned animal gets angry!"));
161 if (name) return _("移動のカード", "Trump Reach");
162 if (desc) return _("アイテムを自分の足元へ移動させる。", "Pulls a distant item close to you.");
165 WEIGHT weight = plev * 15;
167 if (info) return info_weight(weight);
171 if (!get_aim_dir(&dir)) return NULL;
173 fetch(dir, weight, FALSE);
179 if (name) return _("カミカゼのカード", "Trump Kamikaze");
180 if (desc) return _("複数の爆発するモンスターを召喚する。", "Summons monsters which explode by itself.");
190 if (!target_set(TARGET_KILL)) return NULL;
196 /* Summons near player when failed */
201 if (p_ptr->pclass == CLASS_BEASTMASTER)
202 type = SUMMON_KAMIKAZE_LIVING;
204 type = SUMMON_KAMIKAZE;
206 msg_print(_("あなたはカミカゼのカードに集中する...", "You concentrate on several trumps at once..."));
207 if (trump_summoning(2 + randint0(plev / 7), !fail, y, x, 0, type, 0L))
211 msg_print(_("召喚されたモンスターは怒っている!", "The summoned creatures get angry!"));
219 if (name) return _("幻霊召喚", "Phantasmal Servant");
220 if (desc) return _("1体の幽霊を召喚する。", "Summons a ghost.");
223 /* Phantasmal Servant is not summoned as enemy when failed */
226 int summon_lev = plev * 2 / 3 + randint1(plev / 2);
228 if (trump_summoning(1, !fail, p_ptr->y, p_ptr->x, (summon_lev * 3 / 2), SUMMON_PHANTOM, 0L))
230 msg_print(_("御用でございますか、御主人様?", "'Your wish, master?'"));
237 if (name) return _("スピード・モンスター", "Haste Monster");
238 if (desc) return _("モンスター1体を加速させる。", "Hastes a monster.");
245 /* Temporary enable target_pet option */
246 bool old_target_pet = target_pet;
249 result = get_aim_dir(&dir);
251 /* Restore target_pet option */
252 target_pet = old_target_pet;
254 if (!result) return NULL;
256 speed_monster(dir, plev);
262 if (name) return _("テレポート・レベル", "Teleport Level");
263 if (desc) return _("瞬時に上か下の階にテレポートする。", "Teleport to up or down stairs in a moment.");
268 if (!get_check(_("本当に他の階にテレポートしますか?", "Are you sure? (Teleport Level)"))) return NULL;
275 if (name) return _("次元の扉", "Dimension Door");
276 if (desc) return _("短距離内の指定した場所にテレポートする。", "Teleport to given location.");
279 POSITION range = plev / 2 + 10;
281 if (info) return info_range(range);
285 msg_print(_("次元の扉が開いた。目的地を選んで下さい。", "You open a dimensional gate. Choose a destination."));
286 if (!dimension_door()) return NULL;
292 if (name) return _("帰還の呪文", "Word of Recall");
293 if (desc) return _("地上にいるときはダンジョンの最深階へ、ダンジョンにいるときは地上へと移動する。",
294 "Recalls player from dungeon to town, or from town to the deepest level of dungeon.");
300 if (info) return info_delay(base, sides);
304 if (!recall_player(p_ptr, randint0(21) + 15)) return NULL;
310 if (name) return _("怪物追放", "Banish");
311 if (desc) return _("視界内の全てのモンスターをテレポートさせる。抵抗されると無効。", "Teleports all monsters in sight away unless resisted.");
314 int power = plev * 4;
316 if (info) return info_power(power);
320 banish_monsters(power);
326 if (name) return _("位置交換のカード", "Swap Position");
327 if (desc) return _("1体のモンスターと位置を交換する。", "Swap positions of you and a monster.");
334 /* HACK -- No range limit */
337 result = get_aim_dir(&dir);
339 /* Restore range to default */
342 if (!result) return NULL;
350 if (name) return _("アンデッドのカード", "Trump Undead");
351 if (desc) return _("1体のアンデッドを召喚する。", "Summons an undead monster.");
356 msg_print(_("あなたはアンデッドのカードに集中する...", "You concentrate on the trump of an undead creature..."));
357 if (trump_summoning(1, !fail, p_ptr->y, p_ptr->x, 0, SUMMON_UNDEAD, 0L))
361 msg_print(_("召喚されたアンデッドは怒っている!", "The summoned undead creature gets angry!"));
369 if (name) return _("爬虫類のカード", "Trump Reptiles");
370 if (desc) return _("1体のヒドラを召喚する。", "Summons a hydra.");
375 msg_print(_("あなたは爬虫類のカードに集中する...", "You concentrate on the trump of a reptile..."));
376 if (trump_summoning(1, !fail, p_ptr->y, p_ptr->x, 0, SUMMON_HYDRA, 0L))
380 msg_print(_("召喚された爬虫類は怒っている!", "The summoned reptile gets angry!"));
388 if (name) return _("モンスターのカード", "Trump Monsters");
389 if (desc) return _("複数のモンスターを召喚する。", "Summons some monsters.");
395 msg_print(_("あなたはモンスターのカードに集中する...", "You concentrate on several trumps at once..."));
396 if (p_ptr->pclass == CLASS_BEASTMASTER)
397 type = SUMMON_LIVING;
401 if (trump_summoning((1 + (plev - 15) / 10), !fail, p_ptr->y, p_ptr->x, 0, type, 0L))
405 msg_print(_("召喚されたモンスターは怒っている!", "The summoned creatures get angry!"));
414 if (name) return _("ハウンドのカード", "Trump Hounds");
415 if (desc) return _("1グループのハウンドを召喚する。", "Summons a group of hounds.");
420 msg_print(_("あなたはハウンドのカードに集中する...", "You concentrate on the trump of a hound..."));
421 if (trump_summoning(1, !fail, p_ptr->y, p_ptr->x, 0, SUMMON_HOUND, PM_ALLOW_GROUP))
425 msg_print(_("召喚されたハウンドは怒っている!", "The summoned hounds get angry!"));
433 if (name) return _("トランプの刃", "Trump Branding");
434 if (desc) return _("武器にトランプの属性をつける。", "Makes current weapon a Trump weapon.");
445 if (name) return _("人間トランプ", "Living Trump");
446 if (desc) return _("ランダムにテレポートする突然変異か、自分の意思でテレポートする突然変異が身につく。",
447 "Gives mutation which makes you teleport randomly or makes you able to teleport at will.");
455 /* Teleport control */
458 /* Random teleportation (uncontrolled) */
461 /* Gain the mutation */
462 if (gain_random_mutation(mutation))
464 msg_print(_("あなたは生きているカードに変わった。", "You have turned into a Living Trump."));
471 if (name) return _("サイバーデーモンのカード", "Trump Cyberdemon");
472 if (desc) return _("1体のサイバーデーモンを召喚する。", "Summons a cyber demon.");
477 msg_print(_("あなたはサイバーデーモンのカードに集中する...", "You concentrate on the trump of a Cyberdemon..."));
478 if (trump_summoning(1, !fail, p_ptr->y, p_ptr->x, 0, SUMMON_CYBER, 0L))
482 msg_print(_("召喚されたサイバーデーモンは怒っている!", "The summoned Cyberdemon gets angry!"));
490 if (name) return _("予見のカード", "Trump Divination");
491 if (desc) return _("近くの全てのモンスター、罠、扉、階段、財宝、そしてアイテムを感知する。",
492 "Detects all monsters, traps, doors, stairs, treasures and items in your vicinity.");
495 POSITION rad = DETECT_RAD_DEFAULT;
497 if (info) return info_radius(rad);
507 if (name) return _("知識のカード", "Trump Lore");
508 if (desc) return _("アイテムの持つ能力を完全に知る。", "*Identifies* an item.");
513 if (!identify_fully(FALSE)) return NULL;
519 if (name) return _("回復モンスター", "Heal Monster");
520 if (desc) return _("モンスター1体の体力を回復させる。", "Heal a monster.");
523 int heal = plev * 10 + 200;
525 if (info) return info_heal(0, 0, heal);
531 /* Temporary enable target_pet option */
532 bool old_target_pet = target_pet;
535 result = get_aim_dir(&dir);
537 /* Restore target_pet option */
538 target_pet = old_target_pet;
540 if (!result) return NULL;
542 heal_monster(dir, heal);
548 if (name) return _("ドラゴンのカード", "Trump Dragon");
549 if (desc) return _("1体のドラゴンを召喚する。", "Summons a dragon.");
554 msg_print(_("あなたはドラゴンのカードに集中する...", "You concentrate on the trump of a dragon..."));
555 if (trump_summoning(1, !fail, p_ptr->y, p_ptr->x, 0, SUMMON_DRAGON, 0L))
559 msg_print(_("召喚されたドラゴンは怒っている!", "The summoned dragon gets angry!"));
567 if (name) return _("隕石のカード", "Trump Meteor");
568 if (desc) return _("自分の周辺に隕石を落とす。", "Makes meteor balls fall down to nearby random locations.");
571 HIT_POINT dam = plev * 2;
574 if (info) return info_multi_damage(dam);
578 cast_meteor(dam, rad);
584 if (name) return _("デーモンのカード", "Trump Demon");
585 if (desc) return _("1体の悪魔を召喚する。", "Summons a demon.");
590 msg_print(_("あなたはデーモンのカードに集中する...", "You concentrate on the trump of a demon..."));
591 if (trump_summoning(1, !fail, p_ptr->y, p_ptr->x, 0, SUMMON_DEMON, 0L))
595 msg_print(_("召喚されたデーモンは怒っている!", "The summoned demon gets angry!"));
603 if (name) return _("地獄のカード", "Trump Greater Undead");
604 if (desc) return _("1体の上級アンデッドを召喚する。", "Summons a greater undead.");
609 msg_print(_("あなたは強力なアンデッドのカードに集中する...", "You concentrate on the trump of a greater undead being..."));
610 /* May allow unique depend on level and dice roll */
611 if (trump_summoning(1, !fail, p_ptr->y, p_ptr->x, 0, SUMMON_HI_UNDEAD, PM_ALLOW_UNIQUE))
615 msg_print(_("召喚された上級アンデッドは怒っている!", "The summoned greater undead creature gets angry!"));
623 if (name) return _("古代ドラゴンのカード", "Trump Ancient Dragon");
624 if (desc) return _("1体の古代ドラゴンを召喚する。", "Summons an ancient dragon.");
631 if (p_ptr->pclass == CLASS_BEASTMASTER)
632 type = SUMMON_HI_DRAGON_LIVING;
634 type = SUMMON_HI_DRAGON;
636 msg_print(_("あなたは古代ドラゴンのカードに集中する...", "You concentrate on the trump of an ancient dragon..."));
637 /* May allow unique depend on level and dice roll */
638 if (trump_summoning(1, !fail, p_ptr->y, p_ptr->x, 0, type, PM_ALLOW_UNIQUE))
642 msg_print(_("召喚された古代ドラゴンは怒っている!", "The summoned ancient dragon gets angry!"));