4 #include "projection.h"
5 #include "spells-summon.h"
6 #include "spells-status.h"
14 * @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST)
15 * @return SPELL_NAME / SPELL_DESC / SPELL_INFO 時には文字列ポインタを返す。SPELL_CAST時はNULL文字列を返す。
17 concptr do_craft_spell(SPELL_IDX spell, BIT_FLAGS mode)
19 bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
20 bool desc = (mode == SPELL_DESC) ? TRUE : FALSE;
21 bool info = (mode == SPELL_INFO) ? TRUE : FALSE;
22 bool cast = (mode == SPELL_CAST) ? TRUE : FALSE;
24 PLAYER_LEVEL plev = p_ptr->lev;
29 if (name) return _("赤外線視力", "Infravision");
30 if (desc) return _("一定時間、赤外線視力が増強される。", "Gives infravision for a while.");
35 if (info) return info_duration(base, base);
39 set_tim_infra(base + randint1(base), FALSE);
45 if (name) return _("回復力強化", "Regeneration");
46 if (desc) return _("一定時間、回復力が増強される。", "Gives regeneration ability for a while.");
51 if (info) return info_duration(base, base);
55 set_tim_regen(base + randint1(base), FALSE);
61 if (name) return _("空腹充足", "Satisfy Hunger");
62 if (desc) return _("満腹になる。", "Satisfies hunger.");
67 set_food(PY_FOOD_MAX - 1);
73 if (name) return _("耐冷気", "Resist Cold");
74 if (desc) return _("一定時間、冷気への耐性を得る。装備による耐性に累積する。",
75 "Gives resistance to cold. This resistance can be added to which from equipment for more powerful resistance.");
80 if (info) return info_duration(base, base);
84 set_oppose_cold(randint1(base) + base, FALSE);
90 if (name) return _("耐火炎", "Resist Fire");
91 if (desc) return _("一定時間、炎への耐性を得る。装備による耐性に累積する。",
92 "Gives resistance to fire. This resistance can be added to which from equipment for more powerful resistance.");
97 if (info) return info_duration(base, base);
101 set_oppose_fire(randint1(base) + base, FALSE);
107 if (name) return _("士気高揚", "Heroism");
108 if (desc) return _("一定時間、ヒーロー気分になる。", "Removes fear, and gives bonus to hit and 10 more HP for a while.");
113 if (info) return info_duration(base, base);
123 if (name) return _("耐電撃", "Resist Lightning");
124 if (desc) return _("一定時間、電撃への耐性を得る。装備による耐性に累積する。",
125 "Gives resistance to electricity. This resistance can be added to which from equipment for more powerful resistance.");
130 if (info) return info_duration(base, base);
134 set_oppose_elec(randint1(base) + base, FALSE);
140 if (name) return _("耐酸", "Resist Acid");
141 if (desc) return _("一定時間、酸への耐性を得る。装備による耐性に累積する。",
142 "Gives resistance to acid. This resistance can be added to which from equipment for more powerful resistance.");
147 if (info) return info_duration(base, base);
151 set_oppose_acid(randint1(base) + base, FALSE);
157 if (name) return _("透明視認", "See Invisibility");
158 if (desc) return _("一定時間、透明なものが見えるようになる。", "Gives see invisible for a while.");
163 if (info) return info_duration(base, base);
167 set_tim_invis(randint1(base) + base, FALSE);
173 if (name) return _("解呪", "Remove Curse");
174 if (desc) return _("アイテムにかかった弱い呪いを解除する。", "Removes normal curses from equipped items.");
177 if (cast) (void)remove_curse();
182 if (name) return _("耐毒", "Resist Poison");
183 if (desc) return _("一定時間、毒への耐性を得る。装備による耐性に累積する。",
184 "Gives resistance to poison. This resistance can be added to which from equipment for more powerful resistance.");
189 if (info) return info_duration(base, base);
193 set_oppose_pois(randint1(base) + base, FALSE);
199 if (name) return _("狂戦士化", "Berserk");
200 if (desc) return _("狂戦士化し、恐怖を除去する。", "Gives bonus to hit and HP, immunity to fear for a while. But decreases AC.");
205 if (info) return info_duration(base, base);
209 (void)berserk(base + randint1(base));
215 if (name) return _("自己分析", "Self Knowledge");
216 if (desc) return _("現在の自分の状態を完全に知る。",
217 "Gives you useful info regarding your current resistances, the powers of your weapon and maximum limits of your stats.");
228 if (name) return _("対邪悪結界", "Protection from Evil");
229 if (desc) return _("邪悪なモンスターの攻撃を防ぐバリアを張る。", "Gives aura which protect you from evil monster's physical attack.");
235 if (info) return info_duration(base, sides);
239 set_protevil(randint1(sides) + base, FALSE);
245 if (name) return _("癒し", "Cure");
246 if (desc) return _("毒、朦朧状態、負傷を全快させ、幻覚を直す。", "Heals poison, stun, cut and hallucination completely.");
251 (void)true_healing(0);
257 if (name) return _("魔法剣", "Mana Branding");
258 if (desc) return _("一定時間、武器に冷気、炎、電撃、酸、毒のいずれかの属性をつける。武器を持たないと使えない。",
259 "Makes current weapon some elemental branded. You must wield weapons.");
264 if (info) return info_duration(base, base);
268 if (!choose_ele_attack()) return NULL;
274 if (name) return _("テレパシー", "Telepathy");
275 if (desc) return _("一定時間、テレパシー能力を得る。", "Gives telepathy for a while.");
281 if (info) return info_duration(base, sides);
285 set_tim_esp(randint1(sides) + base, FALSE);
291 if (name) return _("肌石化", "Stone Skin");
292 if (desc) return _("一定時間、ACを上昇させる。", "Gives bonus to AC for a while.");
298 if (info) return info_duration(base, sides);
302 set_shield(randint1(sides) + base, FALSE);
308 if (name) return _("全耐性", "Resistance");
309 if (desc) return _("一定時間、酸、電撃、炎、冷気、毒に対する耐性を得る。装備による耐性に累積する。",
310 "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.");
315 if (info) return info_duration(base, base);
319 set_oppose_acid(randint1(base) + base, FALSE);
320 set_oppose_elec(randint1(base) + base, FALSE);
321 set_oppose_fire(randint1(base) + base, FALSE);
322 set_oppose_cold(randint1(base) + base, FALSE);
323 set_oppose_pois(randint1(base) + base, FALSE);
329 if (name) return _("スピード", "Haste Self");
330 if (desc) return _("一定時間、加速する。", "Hastes you for a while.");
334 DICE_SID sides = 20 + plev;
336 if (info) return info_duration(base, sides);
340 set_fast(randint1(sides) + base, FALSE);
346 if (name) return _("壁抜け", "Walk through Wall");
347 if (desc) return _("一定時間、半物質化し壁を通り抜けられるようになる。", "Gives ability to pass walls for a while.");
352 if (info) return info_duration(base, base);
356 set_kabenuke(randint1(base) + base, FALSE);
362 if (name) return _("盾磨き", "Polish Shield");
363 if (desc) return _("盾に反射の属性をつける。", "Makes a shield a shield of reflection.");
374 if (name) return _("ゴーレム製造", "Create Golem");
375 if (desc) return _("1体のゴーレムを製造する。", "Creates a golem.");
380 if (summon_specific(-1, p_ptr->y, p_ptr->x, plev, SUMMON_GOLEM, PM_FORCE_PET, '\0'))
382 msg_print(_("ゴーレムを作った。", "You make a golem."));
386 msg_print(_("うまくゴーレムを作れなかった。", "No Golems arrive."));
393 if (name) return _("魔法の鎧", "Magical armor");
394 if (desc) return _("一定時間、魔法防御力とACが上がり、混乱と盲目の耐性、反射能力、麻痺知らず、浮遊を得る。",
395 "Gives resistance to magic, bonus to AC, resistance to confusion, blindness, reflection, free action and levitation for a while.");
400 if (info) return info_duration(base, base);
404 set_magicdef(randint1(base) + base, FALSE);
410 if (name) return _("装備無力化", "Remove Enchantment");
411 if (desc) return _("武器・防具にかけられたあらゆる魔力を完全に解除する。", "Removes all magics completely from any weapon or armor.");
416 if (!mundane_spell(TRUE)) return NULL;
422 if (name) return _("呪い粉砕", "Remove All Curse");
423 if (desc) return _("アイテムにかかった強力な呪いを解除する。", "Removes normal and heavy curse from equipped items.");
426 if (cast) (void)remove_all_curse();
431 if (name) return _("完全なる知識", "Knowledge True");
432 if (desc) return _("アイテムの持つ能力を完全に知る。", "*Identifies* an item.");
437 if (!identify_fully(FALSE)) return NULL;
443 if (name) return _("武器強化", "Enchant Weapon");
444 if (desc) return _("武器の命中率修正とダメージ修正を強化する。", "Attempts to increase +to-hit, +to-dam of a weapon.");
449 if (!enchant_spell(randint0(4) + 1, randint0(4) + 1, 0)) return NULL;
455 if (name) return _("防具強化", "Enchant Armor");
456 if (desc) return _("鎧の防御修正を強化する。", "Attempts to increase +AC of an armor.");
461 if (!enchant_spell(0, 0, randint0(3) + 2)) return NULL;
467 if (name) return _("武器属性付与", "Brand Weapon");
468 if (desc) return _("武器にランダムに属性をつける。", "Makes current weapon a random ego weapon.");
473 brand_weapon(randint0(18));
479 if (name) return _("人間トランプ", "Living Trump");
480 if (desc) return _("ランダムにテレポートする突然変異か、自分の意思でテレポートする突然変異が身につく。",
481 "Gives mutation which makes you teleport randomly or makes you able to teleport at will.");
489 /* Teleport control */
492 /* Random teleportation (uncontrolled) */
495 /* Gain the mutation */
496 if (gain_random_mutation(mutation))
498 msg_print(_("あなたは生きているカードに変わった。", "You have turned into a Living Trump."));
505 if (name) return _("属性への免疫", "Immunity");
506 if (desc) return _("一定時間、冷気、炎、電撃、酸のいずれかに対する免疫を得る。",
507 "Gives an immunity to fire, cold, electricity or acid for a while.");
512 if (info) return info_duration(base, base);
516 if (!choose_ele_immune(base + randint1(base))) return NULL;