2 #include "cmd-spell.h"
\r
3 #include "selfinfo.h"
\r
8 * @brief
\8f \97Ì
\88æ
\96\82\96@
\82Ì
\8ae
\8f\88\97\9d\82ð
\8ds
\82¤
\r
9 * @param spell
\96\82\96@ID
\r
10 * @param mode
\8f\88\97\9d\93à
\97e (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST)
\r
11 * @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
13 cptr do_craft_spell(SPELL_IDX spell, BIT_FLAGS mode)
\r
15 bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
\r
16 bool desc = (mode == SPELL_DESC) ? TRUE : FALSE;
\r
17 bool info = (mode == SPELL_INFO) ? TRUE : FALSE;
\r
18 bool cast = (mode == SPELL_CAST) ? TRUE : FALSE;
\r
20 int plev = p_ptr->lev;
\r
25 if (name) return _("
\90Ô
\8aO
\90ü
\8e\8b\97Í", "Infravision");
\r
26 if (desc) return _("
\88ê
\92è
\8e\9e\8aÔ
\81A
\90Ô
\8aO
\90ü
\8e\8b\97Í
\82ª
\91\9d\8b
\82³
\82ê
\82é
\81B", "Gives infravision for a while.");
\r
31 if (info) return info_duration(base, base);
\r
35 set_tim_infra(base + randint1(base), FALSE);
\r
41 if (name) return _("
\89ñ
\95\9c\97Í
\8b
\89»", "Regeneration");
\r
42 if (desc) return _("
\88ê
\92è
\8e\9e\8aÔ
\81A
\89ñ
\95\9c\97Í
\82ª
\91\9d\8b
\82³
\82ê
\82é
\81B", "Gives regeneration ability for a while.");
\r
47 if (info) return info_duration(base, base);
\r
51 set_tim_regen(base + randint1(base), FALSE);
\r
57 if (name) return _("
\8bó
\95 \8f[
\91«", "Satisfy Hunger");
\r
58 if (desc) return _("
\96\9e\95 \82É
\82È
\82é
\81B", "Satisfies hunger.");
\r
63 set_food(PY_FOOD_MAX - 1);
\r
69 if (name) return _("
\91Ï
\97â
\8bC", "Resist Cold");
\r
70 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",
\r
71 "Gives resistance to cold. This resistance can be added to which from equipment for more powerful resistance.");
\r
76 if (info) return info_duration(base, base);
\r
80 set_oppose_cold(randint1(base) + base, FALSE);
\r
86 if (name) return _("
\91Ï
\89Î
\89\8a", "Resist Fire");
\r
87 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
88 "Gives resistance to fire. This resistance can be added to which from equipment for more powerful resistance.");
\r
93 if (info) return info_duration(base, base);
\r
97 set_oppose_fire(randint1(base) + base, FALSE);
\r
103 if (name) return _("
\8em
\8bC
\8d\82\97g", "Heroism");
\r
104 if (desc) return _("
\88ê
\92è
\8e\9e\8aÔ
\81A
\83q
\81[
\83\8d\81[
\8bC
\95ª
\82É
\82È
\82é
\81B", "Removes fear, and gives bonus to hit and 10 more HP for a while.");
\r
109 if (info) return info_duration(base, base);
\r
113 (void)heroism(base);
\r
119 if (name) return _("
\91Ï
\93d
\8c\82", "Resist Lightning");
\r
120 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
121 "Gives resistance to electricity. This resistance can be added to which from equipment for more powerful resistance.");
\r
126 if (info) return info_duration(base, base);
\r
130 set_oppose_elec(randint1(base) + base, FALSE);
\r
136 if (name) return _("
\91Ï
\8e_", "Resist Acid");
\r
137 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
138 "Gives resistance to acid. This resistance can be added to which from equipment for more powerful resistance.");
\r
143 if (info) return info_duration(base, base);
\r
147 set_oppose_acid(randint1(base) + base, FALSE);
\r
153 if (name) return _("
\93§
\96¾
\8e\8b\94F", "See Invisibility");
\r
154 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
159 if (info) return info_duration(base, base);
\r
163 set_tim_invis(randint1(base) + base, FALSE);
\r
169 if (name) return _("
\89ð
\8eô", "Remove Curse");
\r
170 if (desc) return _("
\83A
\83C
\83e
\83\80\82É
\82©
\82©
\82Á
\82½
\8eã
\82¢
\8eô
\82¢
\82ð
\89ð
\8f\9c\82·
\82é
\81B", "Removes normal curses from equipped items.");
\r
175 if (remove_curse())
\r
177 msg_print(_("
\92N
\82©
\82É
\8c©
\8eç
\82ç
\82ê
\82Ä
\82¢
\82é
\82æ
\82¤
\82È
\8bC
\82ª
\82·
\82é
\81B", "You feel as if someone is watching over you."));
\r
184 if (name) return _("
\91Ï
\93Å", "Resist Poison");
\r
185 if (desc) return _("
\88ê
\92è
\8e\9e\8aÔ
\81A
\93Å
\82Ö
\82Ì
\91Ï
\90«
\82ð
\93¾
\82é
\81B
\91\95\94õ
\82É
\82æ
\82é
\91Ï
\90«
\82É
\97Ý
\90Ï
\82·
\82é
\81B",
\r
186 "Gives resistance to poison. This resistance can be added to which from equipment for more powerful resistance.");
\r
191 if (info) return info_duration(base, base);
\r
195 set_oppose_pois(randint1(base) + base, FALSE);
\r
201 if (name) return _("
\8b¶
\90í
\8em
\89»", "Berserk");
\r
202 if (desc) return _("
\8b¶
\90í
\8em
\89»
\82µ
\81A
\8b°
\95|
\82ð
\8f\9c\8b\8e\82·
\82é
\81B", "Gives bonus to hit and HP, immunity to fear for a while. But decreases AC.");
\r
207 if (info) return info_duration(base, base);
\r
211 (void)berserk(base + randint1(base));
\r
217 if (name) return _("
\8e©
\8cÈ
\95ª
\90Í", "Self Knowledge");
\r
218 if (desc) return _("
\8c»
\8dÝ
\82Ì
\8e©
\95ª
\82Ì
\8fó
\91Ô
\82ð
\8a®
\91S
\82É
\92m
\82é
\81B",
\r
219 "Gives you useful info regarding your current resistances, the powers of your weapon and maximum limits of your stats.");
\r
230 if (name) return _("
\91Î
\8e×
\88«
\8c\8b\8aE", "Protection from Evil");
\r
231 if (desc) return _("
\8e×
\88«
\82È
\83\82\83\93\83X
\83^
\81[
\82Ì
\8dU
\8c\82\82ð
\96h
\82®
\83o
\83\8a\83A
\82ð
\92£
\82é
\81B", "Gives aura which protect you from evil monster's physical attack.");
\r
234 int base = 3 * plev;
\r
237 if (info) return info_duration(base, sides);
\r
241 set_protevil(randint1(sides) + base, FALSE);
\r
247 if (name) return _("
\96ü
\82µ", "Cure");
\r
248 if (desc) return _("
\93Å
\81A
\9eN
\9eO
\8fó
\91Ô
\81A
\95\89\8f\9d\82ð
\91S
\89õ
\82³
\82¹
\81A
\8c¶
\8ao
\82ð
\92¼
\82·
\81B", "Heals poison, stun, cut and hallucination completely.");
\r
253 (void)true_healing(0);
\r
259 if (name) return _("
\96\82\96@
\8c\95", "Mana Branding");
\r
260 if (desc) return _("
\88ê
\92è
\8e\9e\8aÔ
\81A
\95\90\8aí
\82É
\97â
\8bC
\81A
\89\8a\81A
\93d
\8c\82\81A
\8e_
\81A
\93Å
\82Ì
\82¢
\82¸
\82ê
\82©
\82Ì
\91®
\90«
\82ð
\82Â
\82¯
\82é
\81B
\95\90\8aí
\82ð
\8e\9d\82½
\82È
\82¢
\82Æ
\8eg
\82¦
\82È
\82¢
\81B",
\r
261 "Makes current weapon some elemental branded. You must wield weapons.");
\r
264 int base = plev / 2;
\r
266 if (info) return info_duration(base, base);
\r
270 if (!choose_ele_attack()) return NULL;
\r
276 if (name) return _("
\83e
\83\8c\83p
\83V
\81[", "Telepathy");
\r
277 if (desc) return _("
\88ê
\92è
\8e\9e\8aÔ
\81A
\83e
\83\8c\83p
\83V
\81[
\94\
\97Í
\82ð
\93¾
\82é
\81B", "Gives telepathy for a while.");
\r
283 if (info) return info_duration(base, sides);
\r
287 set_tim_esp(randint1(sides) + base, FALSE);
\r
293 if (name) return _("
\94§
\90Î
\89»", "Stone Skin");
\r
294 if (desc) return _("
\88ê
\92è
\8e\9e\8aÔ
\81AAC
\82ð
\8fã
\8f¸
\82³
\82¹
\82é
\81B", "Gives bonus to AC for a while.");
\r
300 if (info) return info_duration(base, sides);
\r
304 set_shield(randint1(sides) + base, FALSE);
\r
310 if (name) return _("
\91S
\91Ï
\90«", "Resistance");
\r
311 if (desc) return _("
\88ê
\92è
\8e\9e\8aÔ
\81A
\8e_
\81A
\93d
\8c\82\81A
\89\8a\81A
\97â
\8bC
\81A
\93Å
\82É
\91Î
\82·
\82é
\91Ï
\90«
\82ð
\93¾
\82é
\81B
\91\95\94õ
\82É
\82æ
\82é
\91Ï
\90«
\82É
\97Ý
\90Ï
\82·
\82é
\81B",
\r
312 "Gives resistance to fire, cold, electricity, acid and poison for a while. These resistances can be added to which from equipment for more powerful resistances.");
\r
317 if (info) return info_duration(base, base);
\r
321 set_oppose_acid(randint1(base) + base, FALSE);
\r
322 set_oppose_elec(randint1(base) + base, FALSE);
\r
323 set_oppose_fire(randint1(base) + base, FALSE);
\r
324 set_oppose_cold(randint1(base) + base, FALSE);
\r
325 set_oppose_pois(randint1(base) + base, FALSE);
\r
331 if (name) return _("
\83X
\83s
\81[
\83h", "Haste Self");
\r
332 if (desc) return _("
\88ê
\92è
\8e\9e\8aÔ
\81A
\89Á
\91¬
\82·
\82é
\81B", "Hastes you for a while.");
\r
336 int sides = 20 + plev;
\r
338 if (info) return info_duration(base, sides);
\r
342 set_fast(randint1(sides) + base, FALSE);
\r
348 if (name) return _("
\95Ç
\94²
\82¯", "Walk through Wall");
\r
349 if (desc) return _("
\88ê
\92è
\8e\9e\8aÔ
\81A
\94¼
\95¨
\8e¿
\89»
\82µ
\95Ç
\82ð
\92Ê
\82è
\94²
\82¯
\82ç
\82ê
\82é
\82æ
\82¤
\82É
\82È
\82é
\81B", "Gives ability to pass walls for a while.");
\r
352 int base = plev / 2;
\r
354 if (info) return info_duration(base, base);
\r
358 set_kabenuke(randint1(base) + base, FALSE);
\r
364 if (name) return _("
\8f\82\96\81\82«", "Polish Shield");
\r
365 if (desc) return _("
\8f\82\82É
\94½
\8eË
\82Ì
\91®
\90«
\82ð
\82Â
\82¯
\82é
\81B", "Makes a shield a shield of reflection.");
\r
376 if (name) return _("
\83S
\81[
\83\8c\83\80\90»
\91¢", "Create Golem");
\r
377 if (desc) return _("1
\91Ì
\82Ì
\83S
\81[
\83\8c\83\80\82ð
\90»
\91¢
\82·
\82é
\81B", "Creates a golem.");
\r
382 if (summon_specific(-1, p_ptr->y, p_ptr->x, plev, SUMMON_GOLEM, PM_FORCE_PET))
\r
384 msg_print(_("
\83S
\81[
\83\8c\83\80\82ð
\8dì
\82Á
\82½
\81B", "You make a golem."));
\r
388 msg_print(_("
\82¤
\82Ü
\82
\83S
\81[
\83\8c\83\80\82ð
\8dì
\82ê
\82È
\82©
\82Á
\82½
\81B", "No Golems arrive."));
\r
395 if (name) return _("
\96\82\96@
\82Ì
\8aZ", "Magical armor");
\r
396 if (desc) return _("
\88ê
\92è
\8e\9e\8aÔ
\81A
\96\82\96@
\96h
\8cä
\97Í
\82ÆAC
\82ª
\8fã
\82ª
\82è
\81A
\8d¬
\97\90\82Æ
\96Ó
\96Ú
\82Ì
\91Ï
\90«
\81A
\94½
\8eË
\94\
\97Í
\81A
\96\83á
\83\92m
\82ç
\82¸
\81A
\95\82\97V
\82ð
\93¾
\82é
\81B",
\r
397 "Gives resistance to magic, bonus to AC, resistance to confusion, blindness, reflection, free action and levitation for a while.");
\r
402 if (info) return info_duration(base, base);
\r
406 set_magicdef(randint1(base) + base, FALSE);
\r
412 if (name) return _("
\91\95\94õ
\96³
\97Í
\89»", "Remove Enchantment");
\r
413 if (desc) return _("
\95\90\8aí
\81E
\96h
\8bï
\82É
\82©
\82¯
\82ç
\82ê
\82½
\82 \82ç
\82ä
\82é
\96\82\97Í
\82ð
\8a®
\91S
\82É
\89ð
\8f\9c\82·
\82é
\81B", "Removes all magics completely from any weapon or armor.");
\r
418 if (!mundane_spell(TRUE)) return NULL;
\r
424 if (name) return _("
\8eô
\82¢
\95²
\8dÓ", "Remove All Curse");
\r
425 if (desc) return _("
\83A
\83C
\83e
\83\80\82É
\82©
\82©
\82Á
\82½
\8b
\97Í
\82È
\8eô
\82¢
\82ð
\89ð
\8f\9c\82·
\82é
\81B", "Removes normal and heavy curse from equipped items.");
\r
430 if (remove_all_curse())
\r
432 msg_print(_("
\92N
\82©
\82É
\8c©
\8eç
\82ç
\82ê
\82Ä
\82¢
\82é
\82æ
\82¤
\82È
\8bC
\82ª
\82·
\82é
\81B", "You feel as if someone is watching over you."));
\r
439 if (name) return _("
\8a®
\91S
\82È
\82é
\92m
\8e¯", "Knowledge True");
\r
440 if (desc) return _("
\83A
\83C
\83e
\83\80\82Ì
\8e\9d\82Â
\94\
\97Í
\82ð
\8a®
\91S
\82É
\92m
\82é
\81B", "*Identifies* an item.");
\r
445 if (!identify_fully(FALSE)) return NULL;
\r
451 if (name) return _("
\95\90\8aí
\8b
\89»", "Enchant Weapon");
\r
452 if (desc) return _("
\95\90\8aí
\82Ì
\96½
\92\86\97¦
\8fC
\90³
\82Æ
\83_
\83\81\81[
\83W
\8fC
\90³
\82ð
\8b
\89»
\82·
\82é
\81B", "Attempts to increase +to-hit, +to-dam of a weapon.");
\r
457 if (!enchant_spell(randint0(4) + 1, randint0(4) + 1, 0)) return NULL;
\r
463 if (name) return _("
\96h
\8bï
\8b
\89»", "Enchant Armor");
\r
464 if (desc) return _("
\8aZ
\82Ì
\96h
\8cä
\8fC
\90³
\82ð
\8b
\89»
\82·
\82é
\81B", "Attempts to increase +AC of an armor.");
\r
469 if (!enchant_spell(0, 0, randint0(3) + 2)) return NULL;
\r
475 if (name) return _("
\95\90\8aí
\91®
\90«
\95t
\97^", "Brand Weapon");
\r
476 if (desc) return _("
\95\90\8aí
\82É
\83\89\83\93\83_
\83\80\82É
\91®
\90«
\82ð
\82Â
\82¯
\82é
\81B", "Makes current weapon a random ego weapon.");
\r
481 brand_weapon(randint0(18));
\r
487 if (name) return _("
\90l
\8aÔ
\83g
\83\89\83\93\83v", "Living Trump");
\r
488 if (desc) return _("
\83\89\83\93\83_
\83\80\82É
\83e
\83\8c\83|
\81[
\83g
\82·
\82é
\93Ë
\91R
\95Ï
\88Ù
\82©
\81A
\8e©
\95ª
\82Ì
\88Ó
\8ev
\82Å
\83e
\83\8c\83|
\81[
\83g
\82·
\82é
\93Ë
\91R
\95Ï
\88Ù
\82ª
\90g
\82É
\82Â
\82
\81B",
\r
489 "Gives mutation which makes you teleport randomly or makes you able to teleport at will.");
\r
497 /* Teleport control */
\r
500 /* Random teleportation (uncontrolled) */
\r
503 /* Gain the mutation */
\r
504 if (gain_random_mutation(mutation))
\r
506 msg_print(_("
\82 \82È
\82½
\82Í
\90¶
\82«
\82Ä
\82¢
\82é
\83J
\81[
\83h
\82É
\95Ï
\82í
\82Á
\82½
\81B", "You have turned into a Living Trump."));
\r
513 if (name) return _("
\91®
\90«
\82Ö
\82Ì
\96Æ
\89u", "Immunity");
\r
514 if (desc) return _("
\88ê
\92è
\8e\9e\8aÔ
\81A
\97â
\8bC
\81A
\89\8a\81A
\93d
\8c\82\81A
\8e_
\82Ì
\82¢
\82¸
\82ê
\82©
\82É
\91Î
\82·
\82é
\96Æ
\89u
\82ð
\93¾
\82é
\81B",
\r
515 "Gives an immunity to fire, cold, electricity or acid for a while.");
\r
520 if (info) return info_duration(base, base);
\r
524 if (!choose_ele_immune(base + randint1(base))) return NULL;
\r