2 #include "cmd-spell.h"
\r
5 * @brief
\94é
\8fp
\97Ì
\88æ
\96\82\96@
\82Ì
\8ae
\8f\88\97\9d\82ð
\8ds
\82¤
\r
6 * @param spell
\96\82\96@ID
\r
7 * @param mode
\8f\88\97\9d\93à
\97e (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST)
\r
8 * @return SPELL_NAME / SPELL_DESC / SPELL_INFO
\8e\9e\82É
\82Í
\95¶
\8e\9a\97ñ
\83|
\83C
\83\93\83^
\82ð
\95Ô
\82·
\81BSPELL_CAST
\8e\9e\82ÍNULL
\95¶
\8e\9a\97ñ
\82ð
\95Ô
\82·
\81B
\r
10 cptr do_arcane_spell(SPELL_IDX spell, BIT_FLAGS mode)
\r
12 bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
\r
13 bool desc = (mode == SPELL_DESC) ? TRUE : FALSE;
\r
14 bool info = (mode == SPELL_INFO) ? TRUE : FALSE;
\r
15 bool cast = (mode == SPELL_CAST) ? TRUE : FALSE;
\r
18 int plev = p_ptr->lev;
\r
23 if (name) return _("
\93d
\8c\82", "Zap");
\r
24 if (desc) return _("
\93d
\8c\82\82Ì
\83{
\83\8b\83g
\82à
\82µ
\82
\82Í
\83r
\81[
\83\80\82ð
\95ú
\82Â
\81B", "Fires a bolt or beam of lightning.");
\r
27 int dice = 3 + (plev - 1) / 5;
\r
30 if (info) return info_damage(dice, sides, 0);
\r
34 if (!get_aim_dir(&dir)) return NULL;
\r
36 fire_bolt_or_beam(beam_chance() - 10, GF_ELEC, dir, damroll(dice, sides));
\r
42 if (name) return _("
\96\82\96@
\82Ì
\8e{
\8fù", "Wizard Lock");
\r
43 if (desc) return _("
\94à
\82É
\8c®
\82ð
\82©
\82¯
\82é
\81B", "Locks a door.");
\r
48 if (!get_aim_dir(&dir)) return NULL;
\r
56 if (name) return _("
\93§
\96¾
\91Ì
\8a´
\92m", "Detect Invisibility");
\r
57 if (desc) return _("
\8bß
\82
\82Ì
\93§
\96¾
\82È
\83\82\83\93\83X
\83^
\81[
\82ð
\8a´
\92m
\82·
\82é
\81B", "Detects all invisible monsters in your vicinity.");
\r
60 int rad = DETECT_RAD_DEFAULT;
\r
62 if (info) return info_radius(rad);
\r
66 detect_monsters_invis(rad);
\r
72 if (name) return _("
\83\82\83\93\83X
\83^
\81[
\8a´
\92m", "Detect Monsters");
\r
73 if (desc) return _("
\8bß
\82
\82Ì
\91S
\82Ä
\82Ì
\8c©
\82¦
\82é
\83\82\83\93\83X
\83^
\81[
\82ð
\8a´
\92m
\82·
\82é
\81B", "Detects all monsters in your vicinity unless invisible.");
\r
76 int rad = DETECT_RAD_DEFAULT;
\r
78 if (info) return info_radius(rad);
\r
82 detect_monsters_normal(rad);
\r
88 if (name) return _("
\83V
\83\87\81[
\83g
\81E
\83e
\83\8c\83|
\81[
\83g", "Blink");
\r
89 if (desc) return _("
\8bß
\8b\97\97£
\82Ì
\83e
\83\8c\83|
\81[
\83g
\82ð
\82·
\82é
\81B", "Teleport short distance.");
\r
92 POSITION range = 10;
\r
94 if (info) return info_range(range);
\r
98 teleport_player(range, 0L);
\r
104 if (name) return _("
\83\89\83C
\83g
\81E
\83G
\83\8a\83A", "Light Area");
\r
105 if (desc) return _("
\8cõ
\8c¹
\82ª
\8fÆ
\82ç
\82µ
\82Ä
\82¢
\82é
\94Í
\88Í
\82©
\95\94\89®
\91S
\91Ì
\82ð
\89i
\8bv
\82É
\96¾
\82é
\82
\82·
\82é
\81B", "Lights up nearby area and the inside of a room permanently.");
\r
109 int sides = plev / 2;
\r
110 int rad = plev / 10 + 1;
\r
112 if (info) return info_damage(dice, sides, 0);
\r
116 lite_area(damroll(dice, sides), rad);
\r
122 if (name) return _("ã©
\82Æ
\94à
\94j
\89ó", "Trap & Door Destruction");
\r
123 if (desc) return _("
\88ê
\92¼
\90ü
\8fã
\82Ì
\91S
\82Ä
\82Ìã©
\82Æ
\94à
\82ð
\94j
\89ó
\82·
\82é
\81B", "Fires a beam which destroy traps and doors.");
\r
128 if (!get_aim_dir(&dir)) return NULL;
\r
136 if (name) return _("
\8cy
\8f\9d\82Ì
\8e¡
\96ü", "Cure Light Wounds");
\r
137 if (desc) return _("
\89ö
\89ä
\82Æ
\91Ì
\97Í
\82ð
\8f
\82µ
\89ñ
\95\9c\82³
\82¹
\82é
\81B", "Heals cut and HP a little.");
\r
143 if (info) return info_heal(dice, sides, 0);
\r
147 hp_player(damroll(dice, sides));
\r
148 set_cut(p_ptr->cut - 10);
\r
154 if (name) return _("ã©
\82Æ
\94à
\8a´
\92m", "Detect Doors & Traps");
\r
155 if (desc) return _("
\8bß
\82
\82Ì
\91S
\82Ä
\82Ìã©
\82Æ
\94à
\82Æ
\8aK
\92i
\82ð
\8a´
\92m
\82·
\82é
\81B", "Detects traps, doors, and stairs in your vicinity.");
\r
158 int rad = DETECT_RAD_DEFAULT;
\r
160 if (info) return info_radius(rad);
\r
164 detect_traps(rad, TRUE);
\r
166 detect_stairs(rad);
\r
172 if (name) return _("
\94R
\91f", "Phlogiston");
\r
173 if (desc) return _("
\8cõ
\8c¹
\82É
\94R
\97¿
\82ð
\95â
\8b\8b\82·
\82é
\81B", "Adds more turns of light to a lantern or torch.");
\r
184 if (name) return _("
\8dà
\95ó
\8a´
\92m", "Detect Treasure");
\r
185 if (desc) return _("
\8bß
\82
\82Ì
\8dà
\95ó
\82ð
\8a´
\92m
\82·
\82é
\81B", "Detects all treasures in your vicinity.");
\r
188 int rad = DETECT_RAD_DEFAULT;
\r
190 if (info) return info_radius(rad);
\r
194 detect_treasure(rad);
\r
195 detect_objects_gold(rad);
\r
201 if (name) return _("
\96\82\96@
\8a´
\92m", "Detect Enchantment");
\r
202 if (desc) return _("
\8bß
\82
\82Ì
\96\82\96@
\82ª
\82©
\82©
\82Á
\82½
\83A
\83C
\83e
\83\80\82ð
\8a´
\92m
\82·
\82é
\81B", "Detects all magical items in your vicinity.");
\r
205 int rad = DETECT_RAD_DEFAULT;
\r
207 if (info) return info_radius(rad);
\r
211 detect_objects_magic(rad);
\r
217 if (name) return _("
\83A
\83C
\83e
\83\80\8a´
\92m", "Detect Objects");
\r
218 if (desc) return _("
\8bß
\82
\82Ì
\91S
\82Ä
\82Ì
\83A
\83C
\83e
\83\80\82ð
\8a´
\92m
\82·
\82é
\81B", "Detects all items in your vicinity.");
\r
221 int rad = DETECT_RAD_DEFAULT;
\r
223 if (info) return info_radius(rad);
\r
227 detect_objects_normal(rad);
\r
233 if (name) return _("
\89ð
\93Å", "Cure Poison");
\r
234 if (desc) return _("
\93Å
\82ð
\91Ì
\93à
\82©
\82ç
\8a®
\91S
\82É
\8eæ
\82è
\8f\9c\82
\81B", "Cures poison status.");
\r
245 if (name) return _("
\91Ï
\97â", "Resist Cold");
\r
246 if (desc) return _("
\88ê
\92è
\8e\9e\8aÔ
\81A
\97â
\8bC
\82Ö
\82Ì
\91Ï
\90«
\82ð
\93¾
\82é
\81B
\91\95\94õ
\82É
\82æ
\82é
\91Ï
\90«
\82É
\97Ý
\90Ï
\82·
\82é
\81B", "Gives resistance to cold. This resistance can be added to which from equipment for more powerful resistance.");
\r
251 if (info) return info_duration(base, base);
\r
255 set_oppose_cold(randint1(base) + base, FALSE);
\r
261 if (name) return _("
\91Ï
\89Î", "Resist Fire");
\r
262 if (desc) return _("
\88ê
\92è
\8e\9e\8aÔ
\81A
\89\8a\82Ö
\82Ì
\91Ï
\90«
\82ð
\93¾
\82é
\81B
\91\95\94õ
\82É
\82æ
\82é
\91Ï
\90«
\82É
\97Ý
\90Ï
\82·
\82é
\81B",
\r
263 "Gives resistance to fire. This resistance can be added to which from equipment for more powerful resistance.");
\r
268 if (info) return info_duration(base, base);
\r
272 set_oppose_fire(randint1(base) + base, FALSE);
\r
278 if (name) return _("
\91Ï
\93d", "Resist Lightning");
\r
279 if (desc) return _("
\88ê
\92è
\8e\9e\8aÔ
\81A
\93d
\8c\82\82Ö
\82Ì
\91Ï
\90«
\82ð
\93¾
\82é
\81B
\91\95\94õ
\82É
\82æ
\82é
\91Ï
\90«
\82É
\97Ý
\90Ï
\82·
\82é
\81B",
\r
280 "Gives resistance to electricity. This resistance can be added to which from equipment for more powerful resistance.");
\r
285 if (info) return info_duration(base, base);
\r
289 set_oppose_elec(randint1(base) + base, FALSE);
\r
295 if (name) return _("
\91Ï
\8e_", "Resist Acid");
\r
296 if (desc) return _("
\88ê
\92è
\8e\9e\8aÔ
\81A
\8e_
\82Ö
\82Ì
\91Ï
\90«
\82ð
\93¾
\82é
\81B
\91\95\94õ
\82É
\82æ
\82é
\91Ï
\90«
\82É
\97Ý
\90Ï
\82·
\82é
\81B",
\r
297 "Gives resistance to acid. This resistance can be added to which from equipment for more powerful resistance.");
\r
302 if (info) return info_duration(base, base);
\r
306 set_oppose_acid(randint1(base) + base, FALSE);
\r
312 if (name) return _("
\8fd
\8f\9d\82Ì
\8e¡
\96ü", "Cure Medium Wounds");
\r
313 if (desc) return _("
\89ö
\89ä
\82Æ
\91Ì
\97Í
\82ð
\92\86\92ö
\93x
\89ñ
\95\9c\82³
\82¹
\82é
\81B", "Heals cut and HP more.");
\r
319 if (info) return info_heal(dice, sides, 0);
\r
323 hp_player(damroll(dice, sides));
\r
324 set_cut((p_ptr->cut / 2) - 50);
\r
330 if (name) return _("
\83e
\83\8c\83|
\81[
\83g", "Teleport");
\r
331 if (desc) return _("
\89\93\8b\97\97£
\82Ì
\83e
\83\8c\83|
\81[
\83g
\82ð
\82·
\82é
\81B", "Teleport long distance.");
\r
334 POSITION range = plev * 5;
\r
336 if (info) return info_range(range);
\r
340 teleport_player(range, 0L);
\r
346 if (name) return _("
\8aÓ
\92è", "Identify");
\r
347 if (desc) return _("
\83A
\83C
\83e
\83\80\82ð
\8e¯
\95Ê
\82·
\82é
\81B", "Identifies an item.");
\r
352 if (!ident_spell(FALSE)) return NULL;
\r
358 if (name) return _("
\8aâ
\90Î
\97n
\89ð", "Stone to Mud");
\r
359 if (desc) return _("
\95Ç
\82ð
\97n
\82©
\82µ
\82Ä
\8f°
\82É
\82·
\82é
\81B", "Turns one rock square to mud.");
\r
366 if (info) return info_damage(dice, sides, base);
\r
370 if (!get_aim_dir(&dir)) return NULL;
\r
372 wall_to_mud(dir, 20 + randint1(30));
\r
378 if (name) return _("
\91M
\8cõ", "Ray of Light");
\r
379 if (desc) return _("
\8cõ
\90ü
\82ð
\95ú
\82Â
\81B
\8cõ
\82è
\82ð
\8c\99\82¤
\83\82\83\93\83X
\83^
\81[
\82É
\8cø
\89Ê
\82ª
\82 \82é
\81B", "Fires a beam of light which damages to light-sensitive monsters.");
\r
385 if (info) return info_damage(dice, sides, 0);
\r
389 if (!get_aim_dir(&dir)) return NULL;
\r
391 msg_print(_("
\8cõ
\90ü
\82ª
\95ú
\82½
\82ê
\82½
\81B", "A line of light appears."));
\r
392 lite_line(dir, damroll(6, 8));
\r
398 if (name) return _("
\8bó
\95 \8f[
\91«", "Satisfy Hunger");
\r
399 if (desc) return _("
\96\9e\95 \82É
\82·
\82é
\81B", "Satisfies hunger.");
\r
404 set_food(PY_FOOD_MAX - 1);
\r
410 if (name) return _("
\93§
\96¾
\8e\8b\94F", "See Invisible");
\r
411 if (desc) return _("
\88ê
\92è
\8e\9e\8aÔ
\81A
\93§
\96¾
\82È
\82à
\82Ì
\82ª
\8c©
\82¦
\82é
\82æ
\82¤
\82É
\82È
\82é
\81B", "Gives see invisible for a while.");
\r
416 if (info) return info_duration(base, base);
\r
420 set_tim_invis(randint1(base) + base, FALSE);
\r
426 if (name) return _("
\83G
\83\8c\83\81\83\93\83^
\83\8b\8f¢
\8a«", "Conjure Elemental");
\r
427 if (desc) return _("1
\91Ì
\82Ì
\83G
\83\8c\83\81\83\93\83^
\83\8b\82ð
\8f¢
\8a«
\82·
\82é
\81B", "Summons an elemental.");
\r
432 if (!summon_specific(-1, p_ptr->y, p_ptr->x, plev, SUMMON_ELEMENTAL, (PM_ALLOW_GROUP | PM_FORCE_PET)))
\r
434 msg_print(_("
\83G
\83\8c\83\81\83\93\83^
\83\8b\82Í
\8c»
\82ê
\82È
\82©
\82Á
\82½
\81B", "No Elementals arrive."));
\r
441 if (name) return _("
\83e
\83\8c\83|
\81[
\83g
\81E
\83\8c\83x
\83\8b", "Teleport Level");
\r
442 if (desc) return _("
\8fu
\8e\9e\82É
\8fã
\82©
\89º
\82Ì
\8aK
\82É
\83e
\83\8c\83|
\81[
\83g
\82·
\82é
\81B", "Teleport to up or down stairs in a moment.");
\r
447 if (!get_check(_("
\96{
\93\96\82É
\91¼
\82Ì
\8aK
\82É
\83e
\83\8c\83|
\81[
\83g
\82µ
\82Ü
\82·
\82©
\81H", "Are you sure? (Teleport Level)"))) return NULL;
\r
454 if (name) return _("
\83e
\83\8c\83|
\81[
\83g
\81E
\83\82\83\93\83X
\83^
\81[", "Teleport Away");
\r
455 if (desc) return _("
\83\82\83\93\83X
\83^
\81[
\82ð
\83e
\83\8c\83|
\81[
\83g
\82³
\82¹
\82é
\83r
\81[
\83\80\82ð
\95ú
\82Â
\81B
\92ï
\8dR
\82³
\82ê
\82é
\82Æ
\96³
\8cø
\81B", "Teleports all monsters on the line away unless resisted.");
\r
460 if (info) return info_power(power);
\r
464 if (!get_aim_dir(&dir)) return NULL;
\r
466 fire_beam(GF_AWAY_ALL, dir, power);
\r
472 if (name) return _("
\8c³
\91f
\82Ì
\8b\85", "Elemental Ball");
\r
473 if (desc) return _("
\89\8a\81A
\93d
\8c\82\81A
\97â
\8bC
\81A
\8e_
\82Ì
\82Ç
\82ê
\82©
\82Ì
\8b\85\82ð
\95ú
\82Â
\81B", "Fires a ball of some elements.");
\r
476 HIT_POINT dam = 75 + plev;
\r
479 if (info) return info_damage(0, 0, dam);
\r
485 if (!get_aim_dir(&dir)) return NULL;
\r
487 switch (randint1(4))
\r
489 case 1: type = GF_FIRE; break;
\r
490 case 2: type = GF_ELEC; break;
\r
491 case 3: type = GF_COLD; break;
\r
492 default: type = GF_ACID; break;
\r
495 fire_ball(type, dir, dam, rad);
\r
501 if (name) return _("
\91S
\8a´
\92m", "Detection");
\r
502 if (desc) return _("
\8bß
\82
\82Ì
\91S
\82Ä
\82Ì
\83\82\83\93\83X
\83^
\81[
\81Aã©
\81A
\94à
\81A
\8aK
\92i
\81A
\8dà
\95ó
\81A
\82»
\82µ
\82Ä
\83A
\83C
\83e
\83\80\82ð
\8a´
\92m
\82·
\82é
\81B",
\r
503 "Detects all monsters, traps, doors, stairs, treasures and items in your vicinity.");
\r
506 int rad = DETECT_RAD_DEFAULT;
\r
508 if (info) return info_radius(rad);
\r
518 if (name) return _("
\8bA
\8aÒ
\82Ì
\8eô
\95¶", "Word of Recall");
\r
519 if (desc) return _("
\92n
\8fã
\82É
\82¢
\82é
\82Æ
\82«
\82Í
\83_
\83\93\83W
\83\87\83\93\82Ì
\8dÅ
\90[
\8aK
\82Ö
\81A
\83_
\83\93\83W
\83\87\83\93\82É
\82¢
\82é
\82Æ
\82«
\82Í
\92n
\8fã
\82Ö
\82Æ
\88Ú
\93®
\82·
\82é
\81B",
\r
520 "Recalls player from dungeon to town, or from town to the deepest level of dungeon.");
\r
526 if (info) return info_delay(base, sides);
\r
530 if (!word_of_recall()) return NULL;
\r
536 if (name) return _("
\90ç
\97¢
\8aá", "Clairvoyance");
\r
537 if (desc) return _("
\82»
\82Ì
\8aK
\91S
\91Ì
\82ð
\89i
\8bv
\82É
\8fÆ
\82ç
\82µ
\81A
\83_
\83\93\83W
\83\87\83\93\93à
\82·
\82×
\82Ä
\82Ì
\83A
\83C
\83e
\83\80\82ð
\8a´
\92m
\82·
\82é
\81B
\82³
\82ç
\82É
\81A
\88ê
\92è
\8e\9e\8aÔ
\83e
\83\8c\83p
\83V
\81[
\94\
\97Í
\82ð
\93¾
\82é
\81B",
\r
538 "Maps and lights whole dungeon level. Knows all objects location. And gives telepathy for a while.");
\r
544 if (info) return info_duration(base, sides);
\r
548 chg_virtue(V_KNOWLEDGE, 1);
\r
549 chg_virtue(V_ENLIGHTEN, 1);
\r
553 if (!p_ptr->telepathy)
\r
555 set_tim_esp(randint1(sides) + base, FALSE);
\r