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 set_hero(randint1(base) + base, FALSE);
\r
121 if (name) return _("
\91Ï
\93d
\8c\82", "Resist Lightning");
\r
122 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
123 "Gives resistance to electricity. This resistance can be added to which from equipment for more powerful resistance.");
\r
128 if (info) return info_duration(base, base);
\r
132 set_oppose_elec(randint1(base) + base, FALSE);
\r
138 if (name) return _("
\91Ï
\8e_", "Resist Acid");
\r
139 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
140 "Gives resistance to acid. This resistance can be added to which from equipment for more powerful resistance.");
\r
145 if (info) return info_duration(base, base);
\r
149 set_oppose_acid(randint1(base) + base, FALSE);
\r
155 if (name) return _("
\93§
\96¾
\8e\8b\94F", "See Invisibility");
\r
156 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
161 if (info) return info_duration(base, base);
\r
165 set_tim_invis(randint1(base) + base, FALSE);
\r
171 if (name) return _("
\89ð
\8eô", "Remove Curse");
\r
172 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
177 if (remove_curse())
\r
179 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
186 if (name) return _("
\91Ï
\93Å", "Resist Poison");
\r
187 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
188 "Gives resistance to poison. This resistance can be added to which from equipment for more powerful resistance.");
\r
193 if (info) return info_duration(base, base);
\r
197 set_oppose_pois(randint1(base) + base, FALSE);
\r
203 if (name) return _("
\8b¶
\90í
\8em
\89»", "Berserk");
\r
204 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
209 if (info) return info_duration(base, base);
\r
213 set_shero(randint1(base) + base, FALSE);
\r
221 if (name) return _("
\8e©
\8cÈ
\95ª
\90Í", "Self Knowledge");
\r
222 if (desc) return _("
\8c»
\8dÝ
\82Ì
\8e©
\95ª
\82Ì
\8fó
\91Ô
\82ð
\8a®
\91S
\82É
\92m
\82é
\81B",
\r
223 "Gives you useful info regarding your current resistances, the powers of your weapon and maximum limits of your stats.");
\r
234 if (name) return _("
\91Î
\8e×
\88«
\8c\8b\8aE", "Protection from Evil");
\r
235 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
238 int base = 3 * plev;
\r
241 if (info) return info_duration(base, sides);
\r
245 set_protevil(randint1(sides) + base, FALSE);
\r
251 if (name) return _("
\96ü
\82µ", "Cure");
\r
252 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
266 if (name) return _("
\96\82\96@
\8c\95", "Mana Branding");
\r
267 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
268 "Makes current weapon some elemental branded. You must wield weapons.");
\r
271 int base = plev / 2;
\r
273 if (info) return info_duration(base, base);
\r
277 if (!choose_ele_attack()) return NULL;
\r
283 if (name) return _("
\83e
\83\8c\83p
\83V
\81[", "Telepathy");
\r
284 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
290 if (info) return info_duration(base, sides);
\r
294 set_tim_esp(randint1(sides) + base, FALSE);
\r
300 if (name) return _("
\94§
\90Î
\89»", "Stone Skin");
\r
301 if (desc) return _("
\88ê
\92è
\8e\9e\8aÔ
\81AAC
\82ð
\8fã
\8f¸
\82³
\82¹
\82é
\81B", "Gives bonus to AC for a while.");
\r
307 if (info) return info_duration(base, sides);
\r
311 set_shield(randint1(sides) + base, FALSE);
\r
317 if (name) return _("
\91S
\91Ï
\90«", "Resistance");
\r
318 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
319 "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
324 if (info) return info_duration(base, base);
\r
328 set_oppose_acid(randint1(base) + base, FALSE);
\r
329 set_oppose_elec(randint1(base) + base, FALSE);
\r
330 set_oppose_fire(randint1(base) + base, FALSE);
\r
331 set_oppose_cold(randint1(base) + base, FALSE);
\r
332 set_oppose_pois(randint1(base) + base, FALSE);
\r
338 if (name) return _("
\83X
\83s
\81[
\83h", "Haste Self");
\r
339 if (desc) return _("
\88ê
\92è
\8e\9e\8aÔ
\81A
\89Á
\91¬
\82·
\82é
\81B", "Hastes you for a while.");
\r
343 int sides = 20 + plev;
\r
345 if (info) return info_duration(base, sides);
\r
349 set_fast(randint1(sides) + base, FALSE);
\r
355 if (name) return _("
\95Ç
\94²
\82¯", "Walk through Wall");
\r
356 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
359 int base = plev / 2;
\r
361 if (info) return info_duration(base, base);
\r
365 set_kabenuke(randint1(base) + base, FALSE);
\r
371 if (name) return _("
\8f\82\96\81\82«", "Polish Shield");
\r
372 if (desc) return _("
\8f\82\82É
\94½
\8eË
\82Ì
\91®
\90«
\82ð
\82Â
\82¯
\82é
\81B", "Makes a shield a shield of reflection.");
\r
383 if (name) return _("
\83S
\81[
\83\8c\83\80\90»
\91¢", "Create Golem");
\r
384 if (desc) return _("1
\91Ì
\82Ì
\83S
\81[
\83\8c\83\80\82ð
\90»
\91¢
\82·
\82é
\81B", "Creates a golem.");
\r
389 if (summon_specific(-1, p_ptr->y, p_ptr->x, plev, SUMMON_GOLEM, PM_FORCE_PET))
\r
391 msg_print(_("
\83S
\81[
\83\8c\83\80\82ð
\8dì
\82Á
\82½
\81B", "You make a golem."));
\r
395 msg_print(_("
\82¤
\82Ü
\82
\83S
\81[
\83\8c\83\80\82ð
\8dì
\82ê
\82È
\82©
\82Á
\82½
\81B", "No Golems arrive."));
\r
402 if (name) return _("
\96\82\96@
\82Ì
\8aZ", "Magical armor");
\r
403 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
404 "Gives resistance to magic, bonus to AC, resistance to confusion, blindness, reflection, free action and levitation for a while.");
\r
409 if (info) return info_duration(base, base);
\r
413 set_magicdef(randint1(base) + base, FALSE);
\r
419 if (name) return _("
\91\95\94õ
\96³
\97Í
\89»", "Remove Enchantment");
\r
420 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
425 if (!mundane_spell(TRUE)) return NULL;
\r
431 if (name) return _("
\8eô
\82¢
\95²
\8dÓ", "Remove All Curse");
\r
432 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
437 if (remove_all_curse())
\r
439 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
446 if (name) return _("
\8a®
\91S
\82È
\82é
\92m
\8e¯", "Knowledge True");
\r
447 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
452 if (!identify_fully(FALSE)) return NULL;
\r
458 if (name) return _("
\95\90\8aí
\8b
\89»", "Enchant Weapon");
\r
459 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
464 if (!enchant_spell(randint0(4) + 1, randint0(4) + 1, 0)) return NULL;
\r
470 if (name) return _("
\96h
\8bï
\8b
\89»", "Enchant Armor");
\r
471 if (desc) return _("
\8aZ
\82Ì
\96h
\8cä
\8fC
\90³
\82ð
\8b
\89»
\82·
\82é
\81B", "Attempts to increase +AC of an armor.");
\r
476 if (!enchant_spell(0, 0, randint0(3) + 2)) return NULL;
\r
482 if (name) return _("
\95\90\8aí
\91®
\90«
\95t
\97^", "Brand Weapon");
\r
483 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
488 brand_weapon(randint0(18));
\r
494 if (name) return _("
\90l
\8aÔ
\83g
\83\89\83\93\83v", "Living Trump");
\r
495 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
496 "Gives mutation which makes you teleport randomly or makes you able to teleport at will.");
\r
504 /* Teleport control */
\r
507 /* Random teleportation (uncontrolled) */
\r
510 /* Gain the mutation */
\r
511 if (gain_random_mutation(mutation))
\r
513 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
520 if (name) return _("
\91®
\90«
\82Ö
\82Ì
\96Æ
\89u", "Immunity");
\r
521 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
522 "Gives an immunity to fire, cold, electricity or acid for a while.");
\r
527 if (info) return info_duration(base, base);
\r
531 if (!choose_ele_immune(base + randint1(base))) return NULL;
\r