7 #include "spells-summon.h"
8 #include "spells-status.h"
9 #include "spells-object.h"
10 #include "player-effects.h"
11 #include "player-class.h"
12 #include "targeting.h"
16 * @brief トランプ領域魔法の各処理を行う
18 * @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST)
19 * @return SPELL_NAME / SPELL_DESC / SPELL_INFO 時には文字列ポインタを返す。SPELL_CAST時はNULL文字列を返す。
21 concptr do_trump_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mode)
23 bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
24 bool desc = (mode == SPELL_DESC) ? TRUE : FALSE;
25 bool info = (mode == SPELL_INFO) ? TRUE : FALSE;
26 bool cast = (mode == SPELL_CAST) ? TRUE : FALSE;
27 bool fail = (mode == SPELL_FAIL) ? TRUE : FALSE;
30 PLAYER_LEVEL plev = caster_ptr->lev;
35 if (name) return _("ショート・テレポート", "Phase Door");
36 if (desc) return _("近距離のテレポートをする。", "Teleport short distance.");
41 if (info) return info_range(range);
45 teleport_player(range, 0L);
51 if (name) return _("蜘蛛のカード", "Trump Spiders");
52 if (desc) return _("蜘蛛を召喚する。", "Summons spiders.");
57 msg_print(_("あなたは蜘蛛のカードに集中する...", "You concentrate on the trump of an spider..."));
58 if (trump_summoning(1, !fail, caster_ptr->y, caster_ptr->x, 0, SUMMON_SPIDER, PM_ALLOW_GROUP))
62 msg_print(_("召喚された蜘蛛は怒っている!", "The summoned spiders get angry!"));
70 if (name) return _("シャッフル", "Shuffle");
71 if (desc) return _("カードの占いをする。", "Causes random effects.");
74 if (info) return KWD_RANDOM;
84 if (name) return _("フロア・リセット", "Reset Recall");
85 if (desc) return _("最深階を変更する。", "Resets the 'deepest' level for recall spell.");
90 if (!reset_recall()) return NULL;
96 if (name) return _("テレポート", "Teleport");
97 if (desc) return _("遠距離のテレポートをする。", "Teleport long distance.");
100 POSITION range = plev * 4;
102 if (info) return info_range(range);
106 teleport_player(range, 0L);
112 if (name) return _("感知のカード", "Trump Spying");
113 if (desc) return _("一定時間、テレパシー能力を得る。", "Gives telepathy for a while.");
119 if (info) return info_duration(base, sides);
123 set_tim_esp(caster_ptr, randint1(sides) + base, FALSE);
129 if (name) return _("テレポート・モンスター", "Teleport Away");
130 if (desc) return _("モンスターをテレポートさせるビームを放つ。抵抗されると無効。", "Teleports all monsters on the line away unless resisted.");
135 if (info) return info_power(power);
139 if (!get_aim_dir(&dir)) return NULL;
141 fire_beam(GF_AWAY_ALL, dir, power);
147 if (name) return _("動物のカード", "Trump Animals");
148 if (desc) return _("1体の動物を召喚する。", "Summons an animal.");
153 int type = (!fail ? SUMMON_ANIMAL_RANGER : SUMMON_ANIMAL);
154 msg_print(_("あなたは動物のカードに集中する...", "You concentrate on the trump of an animal..."));
155 if (trump_summoning(1, !fail, caster_ptr->y, caster_ptr->x, 0, type, 0L))
159 msg_print(_("召喚された動物は怒っている!", "The summoned animal gets angry!"));
167 if (name) return _("移動のカード", "Trump Reach");
168 if (desc) return _("アイテムを自分の足元へ移動させる。", "Pulls a distant item close to you.");
171 WEIGHT weight = plev * 15;
173 if (info) return info_weight(weight);
177 if (!get_aim_dir(&dir)) return NULL;
179 fetch(caster_ptr, dir, weight, FALSE);
185 if (name) return _("カミカゼのカード", "Trump Kamikaze");
186 if (desc) return _("複数の爆発するモンスターを召喚する。", "Summons monsters which explode by itself.");
196 if (!target_set(TARGET_KILL)) return NULL;
202 /* Summons near player when failed */
207 if (caster_ptr->pclass == CLASS_BEASTMASTER)
208 type = SUMMON_KAMIKAZE_LIVING;
210 type = SUMMON_KAMIKAZE;
212 msg_print(_("あなたはカミカゼのカードに集中する...", "You concentrate on several trumps at once..."));
213 if (trump_summoning(2 + randint0(plev / 7), !fail, y, x, 0, type, 0L))
217 msg_print(_("召喚されたモンスターは怒っている!", "The summoned creatures get angry!"));
225 if (name) return _("幻霊召喚", "Phantasmal Servant");
226 if (desc) return _("1体の幽霊を召喚する。", "Summons a ghost.");
229 /* Phantasmal Servant is not summoned as enemy when failed */
232 int summon_lev = plev * 2 / 3 + randint1(plev / 2);
234 if (trump_summoning(1, !fail, caster_ptr->y, caster_ptr->x, (summon_lev * 3 / 2), SUMMON_PHANTOM, 0L))
236 msg_print(_("御用でございますか、御主人様?", "'Your wish, master?'"));
243 if (name) return _("スピード・モンスター", "Haste Monster");
244 if (desc) return _("モンスター1体を加速させる。", "Hastes a monster.");
251 /* Temporary enable target_pet option */
252 bool old_target_pet = target_pet;
255 result = get_aim_dir(&dir);
257 /* Restore target_pet option */
258 target_pet = old_target_pet;
260 if (!result) return NULL;
262 speed_monster(dir, plev);
268 if (name) return _("テレポート・レベル", "Teleport Level");
269 if (desc) return _("瞬時に上か下の階にテレポートする。", "Teleport to up or down stairs in a moment.");
274 if (!get_check(_("本当に他の階にテレポートしますか?", "Are you sure? (Teleport Level)"))) return NULL;
275 teleport_level(caster_ptr, 0);
281 if (name) return _("次元の扉", "Dimension Door");
282 if (desc) return _("短距離内の指定した場所にテレポートする。", "Teleport to given location.");
285 POSITION range = plev / 2 + 10;
287 if (info) return info_range(range);
291 msg_print(_("次元の扉が開いた。目的地を選んで下さい。", "You open a dimensional gate. Choose a destination."));
292 if (!dimension_door()) return NULL;
298 if (name) return _("帰還の呪文", "Word of Recall");
299 if (desc) return _("地上にいるときはダンジョンの最深階へ、ダンジョンにいるときは地上へと移動する。",
300 "Recalls player from dungeon to town, or from town to the deepest level of dungeon.");
306 if (info) return info_delay(base, sides);
310 if (!recall_player(caster_ptr, randint0(21) + 15)) return NULL;
316 if (name) return _("怪物追放", "Banish");
317 if (desc) return _("視界内の全てのモンスターをテレポートさせる。抵抗されると無効。", "Teleports all monsters in sight away unless resisted.");
320 int power = plev * 4;
322 if (info) return info_power(power);
326 banish_monsters(power);
332 if (name) return _("位置交換のカード", "Swap Position");
333 if (desc) return _("1体のモンスターと位置を交換する。", "Swap positions of you and a monster.");
340 /* HACK -- No range limit */
343 result = get_aim_dir(&dir);
345 /* Restore range to default */
348 if (!result) return NULL;
356 if (name) return _("アンデッドのカード", "Trump Undead");
357 if (desc) return _("1体のアンデッドを召喚する。", "Summons an undead monster.");
362 msg_print(_("あなたはアンデッドのカードに集中する...", "You concentrate on the trump of an undead creature..."));
363 if (trump_summoning(1, !fail, caster_ptr->y, caster_ptr->x, 0, SUMMON_UNDEAD, 0L))
367 msg_print(_("召喚されたアンデッドは怒っている!", "The summoned undead creature gets angry!"));
375 if (name) return _("爬虫類のカード", "Trump Reptiles");
376 if (desc) return _("1体のヒドラを召喚する。", "Summons a hydra.");
381 msg_print(_("あなたは爬虫類のカードに集中する...", "You concentrate on the trump of a reptile..."));
382 if (trump_summoning(1, !fail, caster_ptr->y, caster_ptr->x, 0, SUMMON_HYDRA, 0L))
386 msg_print(_("召喚された爬虫類は怒っている!", "The summoned reptile gets angry!"));
394 if (name) return _("モンスターのカード", "Trump Monsters");
395 if (desc) return _("複数のモンスターを召喚する。", "Summons some monsters.");
401 msg_print(_("あなたはモンスターのカードに集中する...", "You concentrate on several trumps at once..."));
402 if (caster_ptr->pclass == CLASS_BEASTMASTER)
403 type = SUMMON_LIVING;
407 if (trump_summoning((1 + (plev - 15) / 10), !fail, caster_ptr->y, caster_ptr->x, 0, type, 0L))
411 msg_print(_("召喚されたモンスターは怒っている!", "The summoned creatures get angry!"));
420 if (name) return _("ハウンドのカード", "Trump Hounds");
421 if (desc) return _("1グループのハウンドを召喚する。", "Summons a group of hounds.");
426 msg_print(_("あなたはハウンドのカードに集中する...", "You concentrate on the trump of a hound..."));
427 if (trump_summoning(1, !fail, caster_ptr->y, caster_ptr->x, 0, SUMMON_HOUND, PM_ALLOW_GROUP))
431 msg_print(_("召喚されたハウンドは怒っている!", "The summoned hounds get angry!"));
439 if (name) return _("トランプの刃", "Trump Branding");
440 if (desc) return _("武器にトランプの属性をつける。", "Makes current weapon a Trump weapon.");
451 if (name) return _("人間トランプ", "Living Trump");
452 if (desc) return _("ランダムにテレポートする突然変異か、自分の意思でテレポートする突然変異が身につく。",
453 "Gives mutation which makes you teleport randomly or makes you able to teleport at will.");
454 if (cast) become_living_trump(caster_ptr);
458 if (name) return _("サイバーデーモンのカード", "Trump Cyberdemon");
459 if (desc) return _("1体のサイバーデーモンを召喚する。", "Summons a cyber demon.");
464 msg_print(_("あなたはサイバーデーモンのカードに集中する...", "You concentrate on the trump of a Cyberdemon..."));
465 if (trump_summoning(1, !fail, caster_ptr->y, caster_ptr->x, 0, SUMMON_CYBER, 0L))
469 msg_print(_("召喚されたサイバーデーモンは怒っている!", "The summoned Cyberdemon gets angry!"));
477 if (name) return _("予見のカード", "Trump Divination");
478 if (desc) return _("近くの全てのモンスター、罠、扉、階段、財宝、そしてアイテムを感知する。",
479 "Detects all monsters, traps, doors, stairs, treasures and items in your vicinity.");
482 POSITION rad = DETECT_RAD_DEFAULT;
484 if (info) return info_radius(rad);
494 if (name) return _("知識のカード", "Trump Lore");
495 if (desc) return _("アイテムの持つ能力を完全に知る。", "*Identifies* an item.");
500 if (!identify_fully(FALSE)) return NULL;
506 if (name) return _("回復モンスター", "Heal Monster");
507 if (desc) return _("モンスター1体の体力を回復させる。", "Heal a monster.");
510 int heal = plev * 10 + 200;
512 if (info) return info_heal(0, 0, heal);
518 /* Temporary enable target_pet option */
519 bool old_target_pet = target_pet;
522 result = get_aim_dir(&dir);
524 /* Restore target_pet option */
525 target_pet = old_target_pet;
527 if (!result) return NULL;
529 heal_monster(dir, heal);
535 if (name) return _("ドラゴンのカード", "Trump Dragon");
536 if (desc) return _("1体のドラゴンを召喚する。", "Summons a dragon.");
541 msg_print(_("あなたはドラゴンのカードに集中する...", "You concentrate on the trump of a dragon..."));
542 if (trump_summoning(1, !fail, caster_ptr->y, caster_ptr->x, 0, SUMMON_DRAGON, 0L))
546 msg_print(_("召喚されたドラゴンは怒っている!", "The summoned dragon gets angry!"));
554 if (name) return _("隕石のカード", "Trump Meteor");
555 if (desc) return _("自分の周辺に隕石を落とす。", "Makes meteor balls fall down to nearby random locations.");
558 HIT_POINT dam = plev * 2;
561 if (info) return info_multi_damage(dam);
565 cast_meteor(dam, rad);
571 if (name) return _("デーモンのカード", "Trump Demon");
572 if (desc) return _("1体の悪魔を召喚する。", "Summons a demon.");
577 msg_print(_("あなたはデーモンのカードに集中する...", "You concentrate on the trump of a demon..."));
578 if (trump_summoning(1, !fail, caster_ptr->y, caster_ptr->x, 0, SUMMON_DEMON, 0L))
582 msg_print(_("召喚されたデーモンは怒っている!", "The summoned demon gets angry!"));
590 if (name) return _("地獄のカード", "Trump Greater Undead");
591 if (desc) return _("1体の上級アンデッドを召喚する。", "Summons a greater undead.");
596 msg_print(_("あなたは強力なアンデッドのカードに集中する...", "You concentrate on the trump of a greater undead being..."));
597 /* May allow unique depend on level and dice roll */
598 if (trump_summoning(1, !fail, caster_ptr->y, caster_ptr->x, 0, SUMMON_HI_UNDEAD, PM_ALLOW_UNIQUE))
602 msg_print(_("召喚された上級アンデッドは怒っている!", "The summoned greater undead creature gets angry!"));
610 if (name) return _("古代ドラゴンのカード", "Trump Ancient Dragon");
611 if (desc) return _("1体の古代ドラゴンを召喚する。", "Summons an ancient dragon.");
618 if (caster_ptr->pclass == CLASS_BEASTMASTER)
619 type = SUMMON_HI_DRAGON_LIVING;
621 type = SUMMON_HI_DRAGON;
623 msg_print(_("あなたは古代ドラゴンのカードに集中する...", "You concentrate on the trump of an ancient dragon..."));
624 /* May allow unique depend on level and dice roll */
625 if (trump_summoning(1, !fail, caster_ptr->y, caster_ptr->x, 0, type, PM_ALLOW_UNIQUE))
629 msg_print(_("召喚された古代ドラゴンは怒っている!", "The summoned ancient dragon gets angry!"));