9 #include "spells-status.h"
10 #include "spells-floor.h"
11 #include "player-effects.h"
12 #include "targeting.h"
15 * @brief 仙術領域魔法の各処理を行う
17 * @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST)
18 * @return SPELL_NAME / SPELL_DESC / SPELL_INFO 時には文字列ポインタを返す。SPELL_CAST時はNULL文字列を返す。
20 concptr do_sorcery_spell(SPELL_IDX spell, BIT_FLAGS mode)
22 bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
23 bool desc = (mode == SPELL_DESC) ? TRUE : FALSE;
24 bool info = (mode == SPELL_INFO) ? TRUE : FALSE;
25 bool cast = (mode == SPELL_CAST) ? TRUE : FALSE;
28 PLAYER_LEVEL plev = p_ptr->lev;
33 if (name) return _("モンスター感知", "Detect Monsters");
34 if (desc) return _("近くの全ての見えるモンスターを感知する。", "Detects all monsters in your vicinity unless invisible.");
37 POSITION rad = DETECT_RAD_DEFAULT;
39 if (info) return info_radius(rad);
43 detect_monsters_normal(rad);
49 if (name) return _("ショート・テレポート", "Phase Door");
50 if (desc) return _("近距離のテレポートをする。", "Teleport short distance.");
55 if (info) return info_range(range);
59 teleport_player(range, 0L);
65 if (name) return _("罠と扉感知", "Detect Doors and Traps");
66 if (desc) return _("近くの全ての扉と罠を感知する。", "Detects traps, doors, and stairs in your vicinity.");
69 POSITION rad = DETECT_RAD_DEFAULT;
71 if (info) return info_radius(rad);
75 detect_traps(rad, TRUE);
83 if (name) return _("ライト・エリア", "Light Area");
84 if (desc) return _("光源が照らしている範囲か部屋全体を永久に明るくする。", "Lights up nearby area and the inside of a room permanently.");
88 DICE_SID sides = plev / 2;
89 POSITION rad = plev / 10 + 1;
91 if (info) return info_damage(dice, sides, 0);
95 lite_area(damroll(dice, sides), rad);
101 if (name) return _("パニック・モンスター", "Confuse Monster");
102 if (desc) return _("モンスター1体を混乱させる。抵抗されると無効。", "Attempts to confuse a monster.");
105 PLAYER_LEVEL power = (plev * 3) / 2;
107 if (info) return info_power(power);
111 if (!get_aim_dir(&dir)) return NULL;
113 confuse_monster(dir, power);
119 if (name) return _("テレポート", "Teleport");
120 if (desc) return _("遠距離のテレポートをする。", "Teleport long distance.");
123 POSITION range = plev * 5;
125 if (info) return info_range(range);
129 teleport_player(range, 0L);
135 if (name) return _("スリープ・モンスター", "Sleep Monster");
136 if (desc) return _("モンスター1体を眠らせる。抵抗されると無効。", "Attempts to sleep a monster.");
141 if (info) return info_power(power);
145 if (!get_aim_dir(&dir)) return NULL;
147 sleep_monster(dir, plev);
153 if (name) return _("魔力充填", "Recharging");
154 if (desc) return _("杖/魔法棒の充填回数を増やすか、充填中のロッドの充填時間を減らす。", "Recharges staffs, wands or rods.");
157 int power = plev * 4;
159 if (info) return info_power(power);
163 if (!recharge(power)) return NULL;
169 if (name) return _("魔法の地図", "Magic Mapping");
170 if (desc) return _("周辺の地形を感知する。", "Maps nearby area.");
173 POSITION rad = DETECT_RAD_MAP;
175 if (info) return info_radius(rad);
185 if (name) return _("鑑定", "Identify");
186 if (desc) return _("アイテムを識別する。", "Identifies an item.");
191 if (!ident_spell(FALSE)) return NULL;
197 if (name) return _("スロウ・モンスター", "Slow Monster");
198 if (desc) return _("モンスター1体を減速さる。抵抗されると無効。", "Attempts to slow a monster.");
203 if (info) return info_power(power);
207 if (!get_aim_dir(&dir)) return NULL;
209 slow_monster(dir, plev);
215 if (name) return _("周辺スリープ", "Mass Sleep");
216 if (desc) return _("視界内の全てのモンスターを眠らせる。抵抗されると無効。", "Attempts to sleep all monsters in sight.");
221 if (info) return info_power(power);
225 sleep_monsters(plev);
231 if (name) return _("テレポート・モンスター", "Teleport Away");
232 if (desc) return _("モンスターをテレポートさせるビームを放つ。抵抗されると無効。", "Teleports all monsters on the line away unless resisted.");
237 if (info) return info_power(power);
241 if (!get_aim_dir(&dir)) return NULL;
243 fire_beam(GF_AWAY_ALL, dir, power);
249 if (name) return _("スピード", "Haste Self");
250 if (desc) return _("一定時間、加速する。", "Hastes you for a while.");
254 DICE_SID sides = 20 + plev;
256 if (info) return info_duration(base, sides);
260 set_fast(p_ptr, randint1(sides) + base, FALSE);
266 if (name) return _("真・感知", "Detection True");
267 if (desc) return _("近くの全てのモンスター、罠、扉、階段、財宝、そしてアイテムを感知する。",
268 "Detects all monsters, traps, doors, stairs, treasures and items in your vicinity.");
271 POSITION rad = DETECT_RAD_DEFAULT;
273 if (info) return info_radius(rad);
283 if (name) return _("真・鑑定", "Identify True");
284 if (desc) return _("アイテムの持つ能力を完全に知る。", "*Identifies* an item.");
289 if (!identify_fully(FALSE)) return NULL;
295 if (name) return _("物体と財宝感知", "Detect items and Treasure");
296 if (desc) return _("近くの全てのアイテムと財宝を感知する。", "Detects all treasures and items in your vicinity.");
299 POSITION rad = DETECT_RAD_DEFAULT;
301 if (info) return info_radius(rad);
305 detect_objects_normal(rad);
306 detect_treasure(rad);
307 detect_objects_gold(rad);
313 if (name) return _("チャーム・モンスター", "Charm Monster");
314 if (desc) return _("モンスター1体を魅了する。抵抗されると無効。", "Attempts to charm a monster.");
319 if (info) return info_power(power);
323 if (!get_aim_dir(&dir)) return NULL;
325 charm_monster(dir, plev);
331 if (name) return _("精神感知", "Sense Minds");
332 if (desc) return _("一定時間、テレパシー能力を得る。", "Gives telepathy for a while.");
338 if (info) return info_duration(base, sides);
342 set_tim_esp(p_ptr, randint1(sides) + base, FALSE);
348 if (name) return _("街移動", "Teleport to town");
349 if (desc) return _("街へ移動する。地上にいるときしか使えない。", "Teleport to a town which you choose in a moment. Can only be used outdoors.");
354 if (!tele_town()) return NULL;
360 if (name) return _("自己分析", "Self Knowledge");
361 if (desc) return _("現在の自分の状態を完全に知る。",
362 "Gives you useful info regarding your current resistances, the powers of your weapon and maximum limits of your stats.");
373 if (name) return _("テレポート・レベル", "Teleport Level");
374 if (desc) return _("瞬時に上か下の階にテレポートする。", "Teleport to up or down stairs in a moment.");
379 if (!get_check(_("本当に他の階にテレポートしますか?", "Are you sure? (Teleport Level)"))) return NULL;
386 if (name) return _("帰還の呪文", "Word of Recall");
387 if (desc) return _("地上にいるときはダンジョンの最深階へ、ダンジョンにいるときは地上へと移動する。",
388 "Recalls player from dungeon to town, or from town to the deepest level of dungeon.");
394 if (info) return info_delay(base, sides);
398 if (!recall_player(p_ptr, randint0(21) + 15)) return NULL;
404 if (name) return _("次元の扉", "Dimension Door");
405 if (desc) return _("短距離内の指定した場所にテレポートする。", "Teleport to given location.");
408 POSITION range = plev / 2 + 10;
410 if (info) return info_range(range);
414 msg_print(_("次元の扉が開いた。目的地を選んで下さい。", "You open a dimensional gate. Choose a destination."));
415 if (!dimension_door()) return NULL;
421 if (name) return _("調査", "Probing");
422 if (desc) return _("モンスターの属性、残り体力、最大体力、スピード、正体を知る。",
423 "Proves all monsters' alignment, HP, speed and their true character.");
434 if (name) return _("爆発のルーン", "Explosive Rune");
435 if (desc) return _("自分のいる床の上に、モンスターが通ると爆発してダメージを与えるルーンを描く。",
436 "Sets a glyph under you. The glyph will explode when a monster moves on it.");
439 DICE_NUMBER dice = 7;
443 if (info) return info_damage(dice, sides, base);
453 if (name) return _("念動力", "Telekinesis");
454 if (desc) return _("アイテムを自分の足元へ移動させる。", "Pulls a distant item close to you.");
457 WEIGHT weight = plev * 15;
459 if (info) return info_weight(weight);
463 if (!get_aim_dir(&dir)) return NULL;
465 fetch(dir, weight, FALSE);
471 if (name) return _("千里眼", "Clairvoyance");
472 if (desc) return _("その階全体を永久に照らし、ダンジョン内すべてのアイテムを感知する。さらに、一定時間テレパシー能力を得る。",
473 "Maps and lights whole dungeon level. Knows all objects location. And gives telepathy for a while.");
479 if (info) return info_duration(base, sides);
483 chg_virtue(p_ptr, V_KNOWLEDGE, 1);
484 chg_virtue(p_ptr, V_ENLIGHTEN, 1);
488 if (!p_ptr->telepathy)
490 set_tim_esp(p_ptr, randint1(sides) + base, FALSE);
497 if (name) return _("魅了の視線", "Charm monsters");
498 if (desc) return _("視界内の全てのモンスターを魅了する。抵抗されると無効。", "Attempts to charm all monsters in sight.");
501 int power = plev * 2;
503 if (info) return info_power(power);
507 charm_monsters(power);
513 if (name) return _("錬金術", "Alchemy");
514 if (desc) return _("アイテム1つをお金に変える。", "Turns an item into 1/3 of its value in gold.");
519 if (!alchemy()) return NULL;
525 if (name) return _("怪物追放", "Banishment");
526 if (desc) return _("視界内の全てのモンスターをテレポートさせる。抵抗されると無効。", "Teleports all monsters in sight away unless resisted.");
529 int power = plev * 4;
531 if (info) return info_power(power);
535 banish_monsters(power);
541 if (name) return _("無傷の球", "Globe of Invulnerability");
542 if (desc) return _("一定時間、ダメージを受けなくなるバリアを張る。切れた瞬間に少しターンを消費するので注意。",
543 "Generates barrier which completely protect you from almost all damages. Takes a few your turns when the barrier breaks or duration time is exceeded.");
548 if (info) return info_duration(base, base);
552 set_invuln(p_ptr, randint1(base) + base, FALSE);