3 #include "spells-summon.h"
4 #include "projection.h"
10 * @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST)
11 * @return SPELL_NAME / SPELL_DESC / SPELL_INFO 時には文字列ポインタを返す。SPELL_CAST時はNULL文字列を返す。
13 concptr do_arcane_spell(SPELL_IDX spell, BIT_FLAGS mode)
15 bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
16 bool desc = (mode == SPELL_DESC) ? TRUE : FALSE;
17 bool info = (mode == SPELL_INFO) ? TRUE : FALSE;
18 bool cast = (mode == SPELL_CAST) ? TRUE : FALSE;
21 PLAYER_LEVEL plev = p_ptr->lev;
26 if (name) return _("電撃", "Zap");
27 if (desc) return _("電撃のボルトもしくはビームを放つ。", "Fires a bolt or beam of lightning.");
30 DICE_NUMBER dice = 3 + (plev - 1) / 5;
33 if (info) return info_damage(dice, sides, 0);
37 if (!get_aim_dir(&dir)) return NULL;
39 fire_bolt_or_beam(beam_chance() - 10, GF_ELEC, dir, damroll(dice, sides));
45 if (name) return _("魔法の施錠", "Wizard Lock");
46 if (desc) return _("扉に鍵をかける。", "Locks a door.");
51 if (!get_aim_dir(&dir)) return NULL;
59 if (name) return _("透明体感知", "Detect Invisibility");
60 if (desc) return _("近くの透明なモンスターを感知する。", "Detects all invisible monsters in your vicinity.");
63 POSITION rad = DETECT_RAD_DEFAULT;
65 if (info) return info_radius(rad);
69 detect_monsters_invis(rad);
75 if (name) return _("モンスター感知", "Detect Monsters");
76 if (desc) return _("近くの全ての見えるモンスターを感知する。", "Detects all monsters in your vicinity unless invisible.");
79 POSITION rad = DETECT_RAD_DEFAULT;
81 if (info) return info_radius(rad);
85 detect_monsters_normal(rad);
91 if (name) return _("ショート・テレポート", "Blink");
92 if (desc) return _("近距離のテレポートをする。", "Teleport short distance.");
97 if (info) return info_range(range);
101 teleport_player(range, 0L);
107 if (name) return _("ライト・エリア", "Light Area");
108 if (desc) return _("光源が照らしている範囲か部屋全体を永久に明るくする。", "Lights up nearby area and the inside of a room permanently.");
111 DICE_NUMBER dice = 2;
112 DICE_SID sides = plev / 2;
113 POSITION rad = plev / 10 + 1;
115 if (info) return info_damage(dice, sides, 0);
119 lite_area(damroll(dice, sides), rad);
125 if (name) return _("罠と扉 破壊", "Trap & Door Destruction");
126 if (desc) return _("一直線上の全ての罠と扉を破壊する。", "Fires a beam which destroy traps and doors.");
131 if (!get_aim_dir(&dir)) return NULL;
139 if (name) return _("軽傷の治癒", "Cure Light Wounds");
140 if (desc) return _("怪我と体力を少し回復させる。", "Heals cut and HP a little.");
143 DICE_NUMBER dice = 2;
146 if (info) return info_heal(dice, sides, 0);
147 if (cast) (void)cure_light_wounds(dice, sides);
152 if (name) return _("罠と扉 感知", "Detect Doors & Traps");
153 if (desc) return _("近くの全ての罠と扉と階段を感知する。", "Detects traps, doors, and stairs in your vicinity.");
156 POSITION rad = DETECT_RAD_DEFAULT;
158 if (info) return info_radius(rad);
162 detect_traps(rad, TRUE);
170 if (name) return _("燃素", "Phlogiston");
171 if (desc) return _("光源に燃料を補給する。", "Adds more turns of light to a lantern or torch.");
182 if (name) return _("財宝感知", "Detect Treasure");
183 if (desc) return _("近くの財宝を感知する。", "Detects all treasures in your vicinity.");
186 POSITION rad = DETECT_RAD_DEFAULT;
188 if (info) return info_radius(rad);
192 detect_treasure(rad);
193 detect_objects_gold(rad);
199 if (name) return _("魔法 感知", "Detect Enchantment");
200 if (desc) return _("近くの魔法がかかったアイテムを感知する。", "Detects all magical items in your vicinity.");
203 POSITION rad = DETECT_RAD_DEFAULT;
205 if (info) return info_radius(rad);
209 detect_objects_magic(rad);
215 if (name) return _("アイテム感知", "Detect Objects");
216 if (desc) return _("近くの全てのアイテムを感知する。", "Detects all items in your vicinity.");
219 POSITION rad = DETECT_RAD_DEFAULT;
221 if (info) return info_radius(rad);
225 detect_objects_normal(rad);
231 if (name) return _("解毒", "Cure Poison");
232 if (desc) return _("毒を体内から完全に取り除く。", "Cures poison status.");
243 if (name) return _("耐冷", "Resist Cold");
244 if (desc) return _("一定時間、冷気への耐性を得る。装備による耐性に累積する。", "Gives resistance to cold. This resistance can be added to which from equipment for more powerful resistance.");
249 if (info) return info_duration(base, base);
253 set_oppose_cold(randint1(base) + base, FALSE);
259 if (name) return _("耐火", "Resist Fire");
260 if (desc) return _("一定時間、炎への耐性を得る。装備による耐性に累積する。",
261 "Gives resistance to fire. This resistance can be added to which from equipment for more powerful resistance.");
266 if (info) return info_duration(base, base);
270 set_oppose_fire(randint1(base) + base, FALSE);
276 if (name) return _("耐電", "Resist Lightning");
277 if (desc) return _("一定時間、電撃への耐性を得る。装備による耐性に累積する。",
278 "Gives resistance to electricity. This resistance can be added to which from equipment for more powerful resistance.");
283 if (info) return info_duration(base, base);
287 set_oppose_elec(randint1(base) + base, FALSE);
293 if (name) return _("耐酸", "Resist Acid");
294 if (desc) return _("一定時間、酸への耐性を得る。装備による耐性に累積する。",
295 "Gives resistance to acid. This resistance can be added to which from equipment for more powerful resistance.");
300 if (info) return info_duration(base, base);
304 set_oppose_acid(randint1(base) + base, FALSE);
310 if (name) return _("重傷の治癒", "Cure Medium Wounds");
311 if (desc) return _("怪我と体力を中程度回復させる。", "Heals cut and HP more.");
314 DICE_NUMBER dice = 4;
317 if (info) return info_heal(dice, sides, 0);
318 if (cast) (void)cure_serious_wounds(4, 8);
323 if (name) return _("テレポート", "Teleport");
324 if (desc) return _("遠距離のテレポートをする。", "Teleport long distance.");
327 POSITION range = plev * 5;
329 if (info) return info_range(range);
333 teleport_player(range, 0L);
339 if (name) return _("鑑定", "Identify");
340 if (desc) return _("アイテムを識別する。", "Identifies an item.");
345 if (!ident_spell(FALSE)) return NULL;
351 if (name) return _("岩石溶解", "Stone to Mud");
352 if (desc) return _("壁を溶かして床にする。", "Turns one rock square to mud.");
355 DICE_NUMBER dice = 1;
359 if (info) return info_damage(dice, sides, base);
363 if (!get_aim_dir(&dir)) return NULL;
365 wall_to_mud(dir, 20 + randint1(30));
371 if (name) return _("閃光", "Ray of Light");
372 if (desc) return _("光線を放つ。光りを嫌うモンスターに効果がある。", "Fires a beam of light which damages to light-sensitive monsters.");
375 DICE_NUMBER dice = 6;
378 if (info) return info_damage(dice, sides, 0);
382 if (!get_aim_dir(&dir)) return NULL;
384 msg_print(_("光線が放たれた。", "A line of light appears."));
385 lite_line(dir, damroll(6, 8));
391 if (name) return _("空腹充足", "Satisfy Hunger");
392 if (desc) return _("満腹にする。", "Satisfies hunger.");
397 set_food(PY_FOOD_MAX - 1);
403 if (name) return _("透明視認", "See Invisible");
404 if (desc) return _("一定時間、透明なものが見えるようになる。", "Gives see invisible for a while.");
409 if (info) return info_duration(base, base);
413 set_tim_invis(randint1(base) + base, FALSE);
419 if (name) return _("エレメンタル召喚", "Conjure Elemental");
420 if (desc) return _("1体のエレメンタルを召喚する。", "Summons an elemental.");
425 if (!summon_specific(-1, p_ptr->y, p_ptr->x, plev, SUMMON_ELEMENTAL, (PM_ALLOW_GROUP | PM_FORCE_PET), '\0'))
427 msg_print(_("エレメンタルは現れなかった。", "No Elementals arrive."));
434 if (name) return _("テレポート・レベル", "Teleport Level");
435 if (desc) return _("瞬時に上か下の階にテレポートする。", "Teleport to up or down stairs in a moment.");
440 if (!get_check(_("本当に他の階にテレポートしますか?", "Are you sure? (Teleport Level)"))) return NULL;
447 if (name) return _("テレポート・モンスター", "Teleport Away");
448 if (desc) return _("モンスターをテレポートさせるビームを放つ。抵抗されると無効。", "Teleports all monsters on the line away unless resisted.");
453 if (info) return info_power(power);
457 if (!get_aim_dir(&dir)) return NULL;
459 fire_beam(GF_AWAY_ALL, dir, power);
465 if (name) return _("元素の球", "Elemental Ball");
466 if (desc) return _("炎、電撃、冷気、酸のどれかの球を放つ。", "Fires a ball of some elements.");
469 HIT_POINT dam = 75 + plev;
472 if (info) return info_damage(0, 0, dam);
478 if (!get_aim_dir(&dir)) return NULL;
482 case 1: type = GF_FIRE; break;
483 case 2: type = GF_ELEC; break;
484 case 3: type = GF_COLD; break;
485 default: type = GF_ACID; break;
488 fire_ball(type, dir, dam, rad);
494 if (name) return _("全感知", "Detection");
495 if (desc) return _("近くの全てのモンスター、罠、扉、階段、財宝、そしてアイテムを感知する。",
496 "Detects all monsters, traps, doors, stairs, treasures and items in your vicinity.");
499 POSITION rad = DETECT_RAD_DEFAULT;
501 if (info) return info_radius(rad);
511 if (name) return _("帰還の呪文", "Word of Recall");
512 if (desc) return _("地上にいるときはダンジョンの最深階へ、ダンジョンにいるときは地上へと移動する。",
513 "Recalls player from dungeon to town, or from town to the deepest level of dungeon.");
519 if (info) return info_delay(base, sides);
523 if (!recall_player(p_ptr, randint0(21) + 15)) return NULL;
529 if (name) return _("千里眼", "Clairvoyance");
530 if (desc) return _("その階全体を永久に照らし、ダンジョン内すべてのアイテムを感知する。さらに、一定時間テレパシー能力を得る。",
531 "Maps and lights whole dungeon level. Knows all objects location. And gives telepathy for a while.");
537 if (info) return info_duration(base, sides);
541 chg_virtue(V_KNOWLEDGE, 1);
542 chg_virtue(V_ENLIGHTEN, 1);
546 if (!p_ptr->telepathy)
548 set_tim_esp(randint1(sides) + base, FALSE);