3 #include "spells-summon.h"
4 #include "projection.h"
9 * @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST)
10 * @return SPELL_NAME / SPELL_DESC / SPELL_INFO 時には文字列ポインタを返す。SPELL_CAST時はNULL文字列を返す。
12 concptr do_arcane_spell(SPELL_IDX spell, BIT_FLAGS mode)
14 bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
15 bool desc = (mode == SPELL_DESC) ? TRUE : FALSE;
16 bool info = (mode == SPELL_INFO) ? TRUE : FALSE;
17 bool cast = (mode == SPELL_CAST) ? TRUE : FALSE;
20 PLAYER_LEVEL plev = p_ptr->lev;
25 if (name) return _("電撃", "Zap");
26 if (desc) return _("電撃のボルトもしくはビームを放つ。", "Fires a bolt or beam of lightning.");
29 DICE_NUMBER dice = 3 + (plev - 1) / 5;
32 if (info) return info_damage(dice, sides, 0);
36 if (!get_aim_dir(&dir)) return NULL;
38 fire_bolt_or_beam(beam_chance() - 10, GF_ELEC, dir, damroll(dice, sides));
44 if (name) return _("魔法の施錠", "Wizard Lock");
45 if (desc) return _("扉に鍵をかける。", "Locks a door.");
50 if (!get_aim_dir(&dir)) return NULL;
58 if (name) return _("透明体感知", "Detect Invisibility");
59 if (desc) return _("近くの透明なモンスターを感知する。", "Detects all invisible monsters in your vicinity.");
62 POSITION rad = DETECT_RAD_DEFAULT;
64 if (info) return info_radius(rad);
68 detect_monsters_invis(rad);
74 if (name) return _("モンスター感知", "Detect Monsters");
75 if (desc) return _("近くの全ての見えるモンスターを感知する。", "Detects all monsters in your vicinity unless invisible.");
78 POSITION rad = DETECT_RAD_DEFAULT;
80 if (info) return info_radius(rad);
84 detect_monsters_normal(rad);
90 if (name) return _("ショート・テレポート", "Blink");
91 if (desc) return _("近距離のテレポートをする。", "Teleport short distance.");
96 if (info) return info_range(range);
100 teleport_player(range, 0L);
106 if (name) return _("ライト・エリア", "Light Area");
107 if (desc) return _("光源が照らしている範囲か部屋全体を永久に明るくする。", "Lights up nearby area and the inside of a room permanently.");
110 DICE_NUMBER dice = 2;
111 DICE_SID sides = plev / 2;
112 POSITION rad = plev / 10 + 1;
114 if (info) return info_damage(dice, sides, 0);
118 lite_area(damroll(dice, sides), rad);
124 if (name) return _("罠と扉 破壊", "Trap & Door Destruction");
125 if (desc) return _("一直線上の全ての罠と扉を破壊する。", "Fires a beam which destroy traps and doors.");
130 if (!get_aim_dir(&dir)) return NULL;
138 if (name) return _("軽傷の治癒", "Cure Light Wounds");
139 if (desc) return _("怪我と体力を少し回復させる。", "Heals cut and HP a little.");
142 DICE_NUMBER dice = 2;
145 if (info) return info_heal(dice, sides, 0);
146 if (cast) (void)cure_light_wounds(dice, sides);
151 if (name) return _("罠と扉 感知", "Detect Doors & Traps");
152 if (desc) return _("近くの全ての罠と扉と階段を感知する。", "Detects traps, doors, and stairs in your vicinity.");
155 POSITION rad = DETECT_RAD_DEFAULT;
157 if (info) return info_radius(rad);
161 detect_traps(rad, TRUE);
169 if (name) return _("燃素", "Phlogiston");
170 if (desc) return _("光源に燃料を補給する。", "Adds more turns of light to a lantern or torch.");
181 if (name) return _("財宝感知", "Detect Treasure");
182 if (desc) return _("近くの財宝を感知する。", "Detects all treasures in your vicinity.");
185 POSITION rad = DETECT_RAD_DEFAULT;
187 if (info) return info_radius(rad);
191 detect_treasure(rad);
192 detect_objects_gold(rad);
198 if (name) return _("魔法 感知", "Detect Enchantment");
199 if (desc) return _("近くの魔法がかかったアイテムを感知する。", "Detects all magical items in your vicinity.");
202 POSITION rad = DETECT_RAD_DEFAULT;
204 if (info) return info_radius(rad);
208 detect_objects_magic(rad);
214 if (name) return _("アイテム感知", "Detect Objects");
215 if (desc) return _("近くの全てのアイテムを感知する。", "Detects all items in your vicinity.");
218 POSITION rad = DETECT_RAD_DEFAULT;
220 if (info) return info_radius(rad);
224 detect_objects_normal(rad);
230 if (name) return _("解毒", "Cure Poison");
231 if (desc) return _("毒を体内から完全に取り除く。", "Cures poison status.");
242 if (name) return _("耐冷", "Resist Cold");
243 if (desc) return _("一定時間、冷気への耐性を得る。装備による耐性に累積する。", "Gives resistance to cold. This resistance can be added to which from equipment for more powerful resistance.");
248 if (info) return info_duration(base, base);
252 set_oppose_cold(randint1(base) + base, FALSE);
258 if (name) return _("耐火", "Resist Fire");
259 if (desc) return _("一定時間、炎への耐性を得る。装備による耐性に累積する。",
260 "Gives resistance to fire. This resistance can be added to which from equipment for more powerful resistance.");
265 if (info) return info_duration(base, base);
269 set_oppose_fire(randint1(base) + base, FALSE);
275 if (name) return _("耐電", "Resist Lightning");
276 if (desc) return _("一定時間、電撃への耐性を得る。装備による耐性に累積する。",
277 "Gives resistance to electricity. This resistance can be added to which from equipment for more powerful resistance.");
282 if (info) return info_duration(base, base);
286 set_oppose_elec(randint1(base) + base, FALSE);
292 if (name) return _("耐酸", "Resist Acid");
293 if (desc) return _("一定時間、酸への耐性を得る。装備による耐性に累積する。",
294 "Gives resistance to acid. This resistance can be added to which from equipment for more powerful resistance.");
299 if (info) return info_duration(base, base);
303 set_oppose_acid(randint1(base) + base, FALSE);
309 if (name) return _("重傷の治癒", "Cure Medium Wounds");
310 if (desc) return _("怪我と体力を中程度回復させる。", "Heals cut and HP more.");
313 DICE_NUMBER dice = 4;
316 if (info) return info_heal(dice, sides, 0);
317 if (cast) (void)cure_serious_wounds(4, 8);
322 if (name) return _("テレポート", "Teleport");
323 if (desc) return _("遠距離のテレポートをする。", "Teleport long distance.");
326 POSITION range = plev * 5;
328 if (info) return info_range(range);
332 teleport_player(range, 0L);
338 if (name) return _("鑑定", "Identify");
339 if (desc) return _("アイテムを識別する。", "Identifies an item.");
344 if (!ident_spell(FALSE)) return NULL;
350 if (name) return _("岩石溶解", "Stone to Mud");
351 if (desc) return _("壁を溶かして床にする。", "Turns one rock square to mud.");
354 DICE_NUMBER dice = 1;
358 if (info) return info_damage(dice, sides, base);
362 if (!get_aim_dir(&dir)) return NULL;
364 wall_to_mud(dir, 20 + randint1(30));
370 if (name) return _("閃光", "Ray of Light");
371 if (desc) return _("光線を放つ。光りを嫌うモンスターに効果がある。", "Fires a beam of light which damages to light-sensitive monsters.");
374 DICE_NUMBER dice = 6;
377 if (info) return info_damage(dice, sides, 0);
381 if (!get_aim_dir(&dir)) return NULL;
383 msg_print(_("光線が放たれた。", "A line of light appears."));
384 lite_line(dir, damroll(6, 8));
390 if (name) return _("空腹充足", "Satisfy Hunger");
391 if (desc) return _("満腹にする。", "Satisfies hunger.");
396 set_food(PY_FOOD_MAX - 1);
402 if (name) return _("透明視認", "See Invisible");
403 if (desc) return _("一定時間、透明なものが見えるようになる。", "Gives see invisible for a while.");
408 if (info) return info_duration(base, base);
412 set_tim_invis(randint1(base) + base, FALSE);
418 if (name) return _("エレメンタル召喚", "Conjure Elemental");
419 if (desc) return _("1体のエレメンタルを召喚する。", "Summons an elemental.");
424 if (!summon_specific(-1, p_ptr->y, p_ptr->x, plev, SUMMON_ELEMENTAL, (PM_ALLOW_GROUP | PM_FORCE_PET), '\0'))
426 msg_print(_("エレメンタルは現れなかった。", "No Elementals arrive."));
433 if (name) return _("テレポート・レベル", "Teleport Level");
434 if (desc) return _("瞬時に上か下の階にテレポートする。", "Teleport to up or down stairs in a moment.");
439 if (!get_check(_("本当に他の階にテレポートしますか?", "Are you sure? (Teleport Level)"))) return NULL;
446 if (name) return _("テレポート・モンスター", "Teleport Away");
447 if (desc) return _("モンスターをテレポートさせるビームを放つ。抵抗されると無効。", "Teleports all monsters on the line away unless resisted.");
452 if (info) return info_power(power);
456 if (!get_aim_dir(&dir)) return NULL;
458 fire_beam(GF_AWAY_ALL, dir, power);
464 if (name) return _("元素の球", "Elemental Ball");
465 if (desc) return _("炎、電撃、冷気、酸のどれかの球を放つ。", "Fires a ball of some elements.");
468 HIT_POINT dam = 75 + plev;
471 if (info) return info_damage(0, 0, dam);
477 if (!get_aim_dir(&dir)) return NULL;
481 case 1: type = GF_FIRE; break;
482 case 2: type = GF_ELEC; break;
483 case 3: type = GF_COLD; break;
484 default: type = GF_ACID; break;
487 fire_ball(type, dir, dam, rad);
493 if (name) return _("全感知", "Detection");
494 if (desc) return _("近くの全てのモンスター、罠、扉、階段、財宝、そしてアイテムを感知する。",
495 "Detects all monsters, traps, doors, stairs, treasures and items in your vicinity.");
498 POSITION rad = DETECT_RAD_DEFAULT;
500 if (info) return info_radius(rad);
510 if (name) return _("帰還の呪文", "Word of Recall");
511 if (desc) return _("地上にいるときはダンジョンの最深階へ、ダンジョンにいるときは地上へと移動する。",
512 "Recalls player from dungeon to town, or from town to the deepest level of dungeon.");
518 if (info) return info_delay(base, sides);
522 if (!recall_player(p_ptr, randint0(21) + 15)) return NULL;
528 if (name) return _("千里眼", "Clairvoyance");
529 if (desc) return _("その階全体を永久に照らし、ダンジョン内すべてのアイテムを感知する。さらに、一定時間テレパシー能力を得る。",
530 "Maps and lights whole dungeon level. Knows all objects location. And gives telepathy for a while.");
536 if (info) return info_duration(base, sides);
540 chg_virtue(V_KNOWLEDGE, 1);
541 chg_virtue(V_ENLIGHTEN, 1);
545 if (!p_ptr->telepathy)
547 set_tim_esp(randint1(sides) + base, FALSE);