4 #include "projection.h"
6 #include "spells-status.h"
7 #include "spells-floor.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_sorcery_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;
23 PLAYER_LEVEL plev = p_ptr->lev;
28 if (name) return _("モンスター感知", "Detect Monsters");
29 if (desc) return _("近くの全ての見えるモンスターを感知する。", "Detects all monsters in your vicinity unless invisible.");
32 POSITION rad = DETECT_RAD_DEFAULT;
34 if (info) return info_radius(rad);
38 detect_monsters_normal(rad);
44 if (name) return _("ショート・テレポート", "Phase Door");
45 if (desc) return _("近距離のテレポートをする。", "Teleports you a short distance.");
50 if (info) return info_range(range);
54 teleport_player(range, 0L);
60 if (name) return _("罠と扉感知", "Detect Doors and Traps");
61 if (desc) return _("近くの全ての扉と罠を感知する。", "Detects traps, doors, and stairs in your vicinity.");
64 POSITION rad = DETECT_RAD_DEFAULT;
66 if (info) return info_radius(rad);
70 detect_traps(rad, TRUE);
78 if (name) return _("ライト・エリア", "Light Area");
79 if (desc) return _("光源が照らしている範囲か部屋全体を永久に明るくする。", "Lights up nearby area and the inside of a room permanently.");
83 DICE_SID sides = plev / 2;
84 POSITION rad = plev / 10 + 1;
86 if (info) return info_damage(dice, sides, 0);
90 lite_area(damroll(dice, sides), rad);
96 if (name) return _("パニック・モンスター", "Confuse Monster");
97 if (desc) return _("モンスター1体を混乱させる。抵抗されると無効。", "Attempts to confuse a monster.");
100 PLAYER_LEVEL power = (plev * 3) / 2;
102 if (info) return info_power(power);
106 if (!get_aim_dir(&dir)) return NULL;
108 confuse_monster(dir, power);
114 if (name) return _("テレポート", "Teleport");
115 if (desc) return _("遠距離のテレポートをする。", "Teleports you a long distance.");
118 POSITION range = plev * 5;
120 if (info) return info_range(range);
124 teleport_player(range, 0L);
130 if (name) return _("スリープ・モンスター", "Sleep Monster");
131 if (desc) return _("モンスター1体を眠らせる。抵抗されると無効。", "Attempts to put a monster to sleep.");
136 if (info) return info_power(power);
140 if (!get_aim_dir(&dir)) return NULL;
142 sleep_monster(dir, plev);
148 if (name) return _("魔力充填", "Recharging");
149 if (desc) return _("杖/魔法棒の充填回数を増やすか、充填中のロッドの充填時間を減らす。", "Recharges staffs, wands or rods.");
152 int power = plev * 4;
154 if (info) return info_power(power);
158 if (!recharge(power)) return NULL;
164 if (name) return _("魔法の地図", "Magic Mapping");
165 if (desc) return _("周辺の地形を感知する。", "Maps nearby area.");
168 POSITION rad = DETECT_RAD_MAP;
170 if (info) return info_radius(rad);
180 if (name) return _("鑑定", "Identify");
181 if (desc) return _("アイテムを識別する。", "Identifies an item.");
186 if (!ident_spell(FALSE)) return NULL;
192 if (name) return _("スロウ・モンスター", "Slow Monster");
193 if (desc) return _("モンスター1体を減速さる。抵抗されると無効。", "Attempts to slow a monster.");
198 if (info) return info_power(power);
202 if (!get_aim_dir(&dir)) return NULL;
204 slow_monster(dir, plev);
210 if (name) return _("周辺スリープ", "Mass Sleep");
211 if (desc) return _("視界内の全てのモンスターを眠らせる。抵抗されると無効。", "Attempts to put all monsters in sight to sleep.");
216 if (info) return info_power(power);
220 sleep_monsters(plev);
226 if (name) return _("テレポート・モンスター", "Teleport Away");
227 if (desc) return _("モンスターをテレポートさせるビームを放つ。抵抗されると無効。", "Teleports all monsters on the line away unless resisted.");
232 if (info) return info_power(power);
236 if (!get_aim_dir(&dir)) return NULL;
238 fire_beam(GF_AWAY_ALL, dir, power);
244 if (name) return _("スピード", "Haste Self");
245 if (desc) return _("一定時間、加速する。", "Hastes you for a while.");
249 DICE_SID sides = 20 + plev;
251 if (info) return info_duration(base, sides);
255 set_fast(randint1(sides) + base, FALSE);
261 if (name) return _("真・感知", "Detection True");
262 if (desc) return _("近くの全てのモンスター、罠、扉、階段、財宝、そしてアイテムを感知する。",
263 "Detects all monsters, traps, doors, stairs, treasures and items in your vicinity.");
266 POSITION rad = DETECT_RAD_DEFAULT;
268 if (info) return info_radius(rad);
278 if (name) return _("真・鑑定", "Identify True");
279 if (desc) return _("アイテムの持つ能力を完全に知る。", "*Identifies* an item.");
284 if (!identify_fully(FALSE)) return NULL;
290 if (name) return _("物体と財宝感知", "Detect items and Treasure");
291 if (desc) return _("近くの全てのアイテムと財宝を感知する。", "Detects all treasures and items in your vicinity.");
294 POSITION rad = DETECT_RAD_DEFAULT;
296 if (info) return info_radius(rad);
300 detect_objects_normal(rad);
301 detect_treasure(rad);
302 detect_objects_gold(rad);
308 if (name) return _("チャーム・モンスター", "Charm Monster");
309 if (desc) return _("モンスター1体を魅了する。抵抗されると無効。", "Attempts to charm a monster.");
314 if (info) return info_power(power);
318 if (!get_aim_dir(&dir)) return NULL;
320 charm_monster(dir, plev);
326 if (name) return _("精神感知", "Sense Minds");
327 if (desc) return _("一定時間、テレパシー能力を得る。", "Gives telepathy for a while.");
333 if (info) return info_duration(base, sides);
337 set_tim_esp(randint1(sides) + base, FALSE);
343 if (name) return _("街移動", "Teleport to town");
344 if (desc) return _("街へ移動する。地上にいるときしか使えない。", "Instantly teleports you to a town which you choose. Can only be used outdoors.");
349 if (!tele_town()) return NULL;
355 if (name) return _("自己分析", "Self Knowledge");
356 if (desc) return _("現在の自分の状態を完全に知る。",
357 "Gives you useful info regarding your current resistances, the powers of your weapon and maximum limits of your stats.");
368 if (name) return _("テレポート・レベル", "Teleport Level");
369 if (desc) return _("瞬時に上か下の階にテレポートする。", "Instantly teleports you up or down a level.");
374 if (!get_check(_("本当に他の階にテレポートしますか?", "Are you sure? (Teleport Level)"))) return NULL;
381 if (name) return _("帰還の呪文", "Word of Recall");
382 if (desc) return _("地上にいるときはダンジョンの最深階へ、ダンジョンにいるときは地上へと移動する。",
383 "Recalls player from dungeon to town or from town to the deepest level of dungeon.");
389 if (info) return info_delay(base, sides);
393 if (!recall_player(p_ptr, randint0(21) + 15)) return NULL;
399 if (name) return _("次元の扉", "Dimension Door");
400 if (desc) return _("短距離内の指定した場所にテレポートする。", "Teleports you to a given location.");
403 POSITION range = plev / 2 + 10;
405 if (info) return info_range(range);
409 msg_print(_("次元の扉が開いた。目的地を選んで下さい。", "You open a dimensional gate. Choose a destination."));
410 if (!dimension_door()) return NULL;
416 if (name) return _("調査", "Probing");
417 if (desc) return _("モンスターの属性、残り体力、最大体力、スピード、正体を知る。",
418 "Probes all monsters' alignment, HP, speed and their true character.");
429 if (name) return _("爆発のルーン", "Explosive Rune");
430 if (desc) return _("自分のいる床の上に、モンスターが通ると爆発してダメージを与えるルーンを描く。",
431 "Sets a glyph under you. The glyph will explode when a monster moves on it.");
434 DICE_NUMBER dice = 7;
438 if (info) return info_damage(dice, sides, base);
448 if (name) return _("念動力", "Telekinesis");
449 if (desc) return _("アイテムを自分の足元へ移動させる。", "Pulls a distant item close to you.");
452 WEIGHT weight = plev * 15;
454 if (info) return info_weight(weight);
458 if (!get_aim_dir(&dir)) return NULL;
460 fetch(dir, weight, FALSE);
466 if (name) return _("千里眼", "Clairvoyance");
467 if (desc) return _("その階全体を永久に照らし、ダンジョン内すべてのアイテムを感知する。さらに、一定時間テレパシー能力を得る。",
468 "Maps and lights whole dungeon level. Knows all objects location. And gives telepathy for a while.");
474 if (info) return info_duration(base, sides);
478 chg_virtue(V_KNOWLEDGE, 1);
479 chg_virtue(V_ENLIGHTEN, 1);
483 if (!p_ptr->telepathy)
485 set_tim_esp(randint1(sides) + base, FALSE);
492 if (name) return _("魅了の視線", "Charm monsters");
493 if (desc) return _("視界内の全てのモンスターを魅了する。抵抗されると無効。", "Attempts to charm all monsters in sight.");
496 int power = plev * 2;
498 if (info) return info_power(power);
502 charm_monsters(power);
508 if (name) return _("錬金術", "Alchemy");
509 if (desc) return _("アイテム1つをお金に変える。", "Turns an item into 1/3 of its value in gold.");
514 if (!alchemy()) return NULL;
520 if (name) return _("怪物追放", "Banishment");
521 if (desc) return _("視界内の全てのモンスターをテレポートさせる。抵抗されると無効。", "Teleports all monsters in sight away unless resisted.");
524 int power = plev * 4;
526 if (info) return info_power(power);
530 banish_monsters(power);
536 if (name) return _("無傷の球", "Globe of Invulnerability");
537 if (desc) return _("一定時間、ダメージを受けなくなるバリアを張る。切れた瞬間に少しターンを消費するので注意。",
538 "Generates a barrier which completely protects you from almost all damage. Takes a few of your turns when the barrier breaks or duration time is exceeded.");
543 if (info) return info_duration(base, base);
547 set_invuln(randint1(base) + base, FALSE);