7 #include "spells-summon.h"
8 #include "spells-status.h"
9 #include "player-effects.h"
10 #include "targeting.h"
14 * @brief トランプ領域魔法の各処理を行う
16 * @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST)
17 * @return SPELL_NAME / SPELL_DESC / SPELL_INFO 時には文字列ポインタを返す。SPELL_CAST時はNULL文字列を返す。
19 concptr do_trump_spell(SPELL_IDX spell, BIT_FLAGS mode)
21 bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
22 bool desc = (mode == SPELL_DESC) ? TRUE : FALSE;
23 bool info = (mode == SPELL_INFO) ? TRUE : FALSE;
24 bool cast = (mode == SPELL_CAST) ? TRUE : FALSE;
25 bool fail = (mode == SPELL_FAIL) ? TRUE : FALSE;
28 PLAYER_LEVEL plev = p_ptr->lev;
33 if (name) return _("ショート・テレポート", "Phase Door");
34 if (desc) return _("近距離のテレポートをする。", "Teleport short distance.");
39 if (info) return info_range(range);
43 teleport_player(range, 0L);
49 if (name) return _("蜘蛛のカード", "Trump Spiders");
50 if (desc) return _("蜘蛛を召喚する。", "Summons spiders.");
55 msg_print(_("あなたは蜘蛛のカードに集中する...", "You concentrate on the trump of an spider..."));
56 if (trump_summoning(1, !fail, p_ptr->y, p_ptr->x, 0, SUMMON_SPIDER, PM_ALLOW_GROUP))
60 msg_print(_("召喚された蜘蛛は怒っている!", "The summoned spiders get angry!"));
68 if (name) return _("シャッフル", "Shuffle");
69 if (desc) return _("カードの占いをする。", "Causes random effects.");
72 if (info) return KWD_RANDOM;
82 if (name) return _("フロア・リセット", "Reset Recall");
83 if (desc) return _("最深階を変更する。", "Resets the 'deepest' level for recall spell.");
88 if (!reset_recall()) return NULL;
94 if (name) return _("テレポート", "Teleport");
95 if (desc) return _("遠距離のテレポートをする。", "Teleport long distance.");
98 POSITION range = plev * 4;
100 if (info) return info_range(range);
104 teleport_player(range, 0L);
110 if (name) return _("感知のカード", "Trump Spying");
111 if (desc) return _("一定時間、テレパシー能力を得る。", "Gives telepathy for a while.");
117 if (info) return info_duration(base, sides);
121 set_tim_esp(randint1(sides) + base, FALSE);
127 if (name) return _("テレポート・モンスター", "Teleport Away");
128 if (desc) return _("モンスターをテレポートさせるビームを放つ。抵抗されると無効。", "Teleports all monsters on the line away unless resisted.");
133 if (info) return info_power(power);
137 if (!get_aim_dir(&dir)) return NULL;
139 fire_beam(GF_AWAY_ALL, dir, power);
145 if (name) return _("動物のカード", "Trump Animals");
146 if (desc) return _("1体の動物を召喚する。", "Summons an animal.");
151 int type = (!fail ? SUMMON_ANIMAL_RANGER : SUMMON_ANIMAL);
152 msg_print(_("あなたは動物のカードに集中する...", "You concentrate on the trump of an animal..."));
153 if (trump_summoning(1, !fail, p_ptr->y, p_ptr->x, 0, type, 0L))
157 msg_print(_("召喚された動物は怒っている!", "The summoned animal gets angry!"));
165 if (name) return _("移動のカード", "Trump Reach");
166 if (desc) return _("アイテムを自分の足元へ移動させる。", "Pulls a distant item close to you.");
169 WEIGHT weight = plev * 15;
171 if (info) return info_weight(weight);
175 if (!get_aim_dir(&dir)) return NULL;
177 fetch(dir, weight, FALSE);
183 if (name) return _("カミカゼのカード", "Trump Kamikaze");
184 if (desc) return _("複数の爆発するモンスターを召喚する。", "Summons monsters which explode by itself.");
194 if (!target_set(TARGET_KILL)) return NULL;
200 /* Summons near player when failed */
205 if (p_ptr->pclass == CLASS_BEASTMASTER)
206 type = SUMMON_KAMIKAZE_LIVING;
208 type = SUMMON_KAMIKAZE;
210 msg_print(_("あなたはカミカゼのカードに集中する...", "You concentrate on several trumps at once..."));
211 if (trump_summoning(2 + randint0(plev / 7), !fail, y, x, 0, type, 0L))
215 msg_print(_("召喚されたモンスターは怒っている!", "The summoned creatures get angry!"));
223 if (name) return _("幻霊召喚", "Phantasmal Servant");
224 if (desc) return _("1体の幽霊を召喚する。", "Summons a ghost.");
227 /* Phantasmal Servant is not summoned as enemy when failed */
230 int summon_lev = plev * 2 / 3 + randint1(plev / 2);
232 if (trump_summoning(1, !fail, p_ptr->y, p_ptr->x, (summon_lev * 3 / 2), SUMMON_PHANTOM, 0L))
234 msg_print(_("御用でございますか、御主人様?", "'Your wish, master?'"));
241 if (name) return _("スピード・モンスター", "Haste Monster");
242 if (desc) return _("モンスター1体を加速させる。", "Hastes a monster.");
249 /* Temporary enable target_pet option */
250 bool old_target_pet = target_pet;
253 result = get_aim_dir(&dir);
255 /* Restore target_pet option */
256 target_pet = old_target_pet;
258 if (!result) return NULL;
260 speed_monster(dir, plev);
266 if (name) return _("テレポート・レベル", "Teleport Level");
267 if (desc) return _("瞬時に上か下の階にテレポートする。", "Teleport to up or down stairs in a moment.");
272 if (!get_check(_("本当に他の階にテレポートしますか?", "Are you sure? (Teleport Level)"))) return NULL;
279 if (name) return _("次元の扉", "Dimension Door");
280 if (desc) return _("短距離内の指定した場所にテレポートする。", "Teleport to given location.");
283 POSITION range = plev / 2 + 10;
285 if (info) return info_range(range);
289 msg_print(_("次元の扉が開いた。目的地を選んで下さい。", "You open a dimensional gate. Choose a destination."));
290 if (!dimension_door()) return NULL;
296 if (name) return _("帰還の呪文", "Word of Recall");
297 if (desc) return _("地上にいるときはダンジョンの最深階へ、ダンジョンにいるときは地上へと移動する。",
298 "Recalls player from dungeon to town, or from town to the deepest level of dungeon.");
304 if (info) return info_delay(base, sides);
308 if (!recall_player(p_ptr, randint0(21) + 15)) return NULL;
314 if (name) return _("怪物追放", "Banish");
315 if (desc) return _("視界内の全てのモンスターをテレポートさせる。抵抗されると無効。", "Teleports all monsters in sight away unless resisted.");
318 int power = plev * 4;
320 if (info) return info_power(power);
324 banish_monsters(power);
330 if (name) return _("位置交換のカード", "Swap Position");
331 if (desc) return _("1体のモンスターと位置を交換する。", "Swap positions of you and a monster.");
338 /* HACK -- No range limit */
341 result = get_aim_dir(&dir);
343 /* Restore range to default */
346 if (!result) return NULL;
354 if (name) return _("アンデッドのカード", "Trump Undead");
355 if (desc) return _("1体のアンデッドを召喚する。", "Summons an undead monster.");
360 msg_print(_("あなたはアンデッドのカードに集中する...", "You concentrate on the trump of an undead creature..."));
361 if (trump_summoning(1, !fail, p_ptr->y, p_ptr->x, 0, SUMMON_UNDEAD, 0L))
365 msg_print(_("召喚されたアンデッドは怒っている!", "The summoned undead creature gets angry!"));
373 if (name) return _("爬虫類のカード", "Trump Reptiles");
374 if (desc) return _("1体のヒドラを召喚する。", "Summons a hydra.");
379 msg_print(_("あなたは爬虫類のカードに集中する...", "You concentrate on the trump of a reptile..."));
380 if (trump_summoning(1, !fail, p_ptr->y, p_ptr->x, 0, SUMMON_HYDRA, 0L))
384 msg_print(_("召喚された爬虫類は怒っている!", "The summoned reptile gets angry!"));
392 if (name) return _("モンスターのカード", "Trump Monsters");
393 if (desc) return _("複数のモンスターを召喚する。", "Summons some monsters.");
399 msg_print(_("あなたはモンスターのカードに集中する...", "You concentrate on several trumps at once..."));
400 if (p_ptr->pclass == CLASS_BEASTMASTER)
401 type = SUMMON_LIVING;
405 if (trump_summoning((1 + (plev - 15) / 10), !fail, p_ptr->y, p_ptr->x, 0, type, 0L))
409 msg_print(_("召喚されたモンスターは怒っている!", "The summoned creatures get angry!"));
418 if (name) return _("ハウンドのカード", "Trump Hounds");
419 if (desc) return _("1グループのハウンドを召喚する。", "Summons a group of hounds.");
424 msg_print(_("あなたはハウンドのカードに集中する...", "You concentrate on the trump of a hound..."));
425 if (trump_summoning(1, !fail, p_ptr->y, p_ptr->x, 0, SUMMON_HOUND, PM_ALLOW_GROUP))
429 msg_print(_("召喚されたハウンドは怒っている!", "The summoned hounds get angry!"));
437 if (name) return _("トランプの刃", "Trump Branding");
438 if (desc) return _("武器にトランプの属性をつける。", "Makes current weapon a Trump weapon.");
449 if (name) return _("人間トランプ", "Living Trump");
450 if (desc) return _("ランダムにテレポートする突然変異か、自分の意思でテレポートする突然変異が身につく。",
451 "Gives mutation which makes you teleport randomly or makes you able to teleport at will.");
452 if (cast) become_living_trump(p_ptr);
456 if (name) return _("サイバーデーモンのカード", "Trump Cyberdemon");
457 if (desc) return _("1体のサイバーデーモンを召喚する。", "Summons a cyber demon.");
462 msg_print(_("あなたはサイバーデーモンのカードに集中する...", "You concentrate on the trump of a Cyberdemon..."));
463 if (trump_summoning(1, !fail, p_ptr->y, p_ptr->x, 0, SUMMON_CYBER, 0L))
467 msg_print(_("召喚されたサイバーデーモンは怒っている!", "The summoned Cyberdemon gets angry!"));
475 if (name) return _("予見のカード", "Trump Divination");
476 if (desc) return _("近くの全てのモンスター、罠、扉、階段、財宝、そしてアイテムを感知する。",
477 "Detects all monsters, traps, doors, stairs, treasures and items in your vicinity.");
480 POSITION rad = DETECT_RAD_DEFAULT;
482 if (info) return info_radius(rad);
492 if (name) return _("知識のカード", "Trump Lore");
493 if (desc) return _("アイテムの持つ能力を完全に知る。", "*Identifies* an item.");
498 if (!identify_fully(FALSE)) return NULL;
504 if (name) return _("回復モンスター", "Heal Monster");
505 if (desc) return _("モンスター1体の体力を回復させる。", "Heal a monster.");
508 int heal = plev * 10 + 200;
510 if (info) return info_heal(0, 0, heal);
516 /* Temporary enable target_pet option */
517 bool old_target_pet = target_pet;
520 result = get_aim_dir(&dir);
522 /* Restore target_pet option */
523 target_pet = old_target_pet;
525 if (!result) return NULL;
527 heal_monster(dir, heal);
533 if (name) return _("ドラゴンのカード", "Trump Dragon");
534 if (desc) return _("1体のドラゴンを召喚する。", "Summons a dragon.");
539 msg_print(_("あなたはドラゴンのカードに集中する...", "You concentrate on the trump of a dragon..."));
540 if (trump_summoning(1, !fail, p_ptr->y, p_ptr->x, 0, SUMMON_DRAGON, 0L))
544 msg_print(_("召喚されたドラゴンは怒っている!", "The summoned dragon gets angry!"));
552 if (name) return _("隕石のカード", "Trump Meteor");
553 if (desc) return _("自分の周辺に隕石を落とす。", "Makes meteor balls fall down to nearby random locations.");
556 HIT_POINT dam = plev * 2;
559 if (info) return info_multi_damage(dam);
563 cast_meteor(dam, rad);
569 if (name) return _("デーモンのカード", "Trump Demon");
570 if (desc) return _("1体の悪魔を召喚する。", "Summons a demon.");
575 msg_print(_("あなたはデーモンのカードに集中する...", "You concentrate on the trump of a demon..."));
576 if (trump_summoning(1, !fail, p_ptr->y, p_ptr->x, 0, SUMMON_DEMON, 0L))
580 msg_print(_("召喚されたデーモンは怒っている!", "The summoned demon gets angry!"));
588 if (name) return _("地獄のカード", "Trump Greater Undead");
589 if (desc) return _("1体の上級アンデッドを召喚する。", "Summons a greater undead.");
594 msg_print(_("あなたは強力なアンデッドのカードに集中する...", "You concentrate on the trump of a greater undead being..."));
595 /* May allow unique depend on level and dice roll */
596 if (trump_summoning(1, !fail, p_ptr->y, p_ptr->x, 0, SUMMON_HI_UNDEAD, PM_ALLOW_UNIQUE))
600 msg_print(_("召喚された上級アンデッドは怒っている!", "The summoned greater undead creature gets angry!"));
608 if (name) return _("古代ドラゴンのカード", "Trump Ancient Dragon");
609 if (desc) return _("1体の古代ドラゴンを召喚する。", "Summons an ancient dragon.");
616 if (p_ptr->pclass == CLASS_BEASTMASTER)
617 type = SUMMON_HI_DRAGON_LIVING;
619 type = SUMMON_HI_DRAGON;
621 msg_print(_("あなたは古代ドラゴンのカードに集中する...", "You concentrate on the trump of an ancient dragon..."));
622 /* May allow unique depend on level and dice roll */
623 if (trump_summoning(1, !fail, p_ptr->y, p_ptr->x, 0, type, PM_ALLOW_UNIQUE))
627 msg_print(_("召喚された古代ドラゴンは怒っている!", "The summoned ancient dragon gets angry!"));