3 #include "projection.h"
4 #include "spells-summon.h"
5 #include "spells-status.h"
11 * @brief 暗黒領域魔法の各処理を行う
13 * @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST)
14 * @return SPELL_NAME / SPELL_DESC / SPELL_INFO 時には文字列ポインタを返す。SPELL_CAST時はNULL文字列を返す。
16 concptr do_death_spell(SPELL_IDX spell, BIT_FLAGS mode)
18 bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
19 bool desc = (mode == SPELL_DESC) ? TRUE : FALSE;
20 bool info = (mode == SPELL_INFO) ? TRUE : FALSE;
21 bool cast = (mode == SPELL_CAST) ? TRUE : FALSE;
24 PLAYER_LEVEL plev = p_ptr->lev;
29 if (name) return _("無生命感知", "Detect Unlife");
30 if (desc) return _("近くの生命のないモンスターを感知する。", "Detects all nonliving monsters in your vicinity.");
33 POSITION rad = DETECT_RAD_DEFAULT;
35 if (info) return info_radius(rad);
39 detect_monsters_nonliving(rad);
45 if (name) return _("呪殺弾", "Malediction");
46 if (desc) return _("ごく小さな邪悪な力を持つボールを放つ。善良なモンスターには大きなダメージを与える。",
47 "Fires a tiny ball of evil power which hurts good monsters greatly.");
50 DICE_NUMBER dice = 3 + (plev - 1) / 5;
54 if (info) return info_damage(dice, sides, 0);
58 if (!get_aim_dir(&dir)) return NULL;
61 * A radius-0 ball may (1) be aimed at
62 * objects etc., and will affect them;
63 * (2) may be aimed at ANY visible
64 * monster, unlike a 'bolt' which must
65 * travel to the monster.
68 fire_ball(GF_HELL_FIRE, dir, damroll(dice, sides), rad);
72 /* Special effect first */
73 int effect = randint1(1000);
76 fire_ball_hide(GF_DEATH_RAY, dir, plev * 200, 0);
77 else if (effect < 500)
78 fire_ball_hide(GF_TURN_ALL, dir, plev, 0);
79 else if (effect < 800)
80 fire_ball_hide(GF_OLD_CONF, dir, plev, 0);
82 fire_ball_hide(GF_STUN, dir, plev, 0);
89 if (name) return _("邪悪感知", "Detect Evil");
90 if (desc) return _("近くの邪悪なモンスターを感知する。", "Detects all evil monsters in your vicinity.");
93 POSITION rad = DETECT_RAD_DEFAULT;
95 if (info) return info_radius(rad);
99 detect_monsters_evil(rad);
105 if (name) return _("悪臭雲", "Stinking Cloud");
106 if (desc) return _("毒の球を放つ。", "Fires a ball of poison.");
109 HIT_POINT dam = 10 + plev / 2;
112 if (info) return info_damage(0, 0, dam);
116 if (!get_aim_dir(&dir)) return NULL;
118 fire_ball(GF_POIS, dir, dam, rad);
124 if (name) return _("黒い眠り", "Black Sleep");
125 if (desc) return _("1体のモンスターを眠らせる。抵抗されると無効。", "Attempts to sleep a monster.");
130 if (info) return info_power(power);
134 if (!get_aim_dir(&dir)) return NULL;
136 sleep_monster(dir, plev);
142 if (name) return _("耐毒", "Resist Poison");
143 if (desc) return _("一定時間、毒への耐性を得る。装備による耐性に累積する。",
144 "Gives resistance to poison. This resistance can be added to which from equipment for more powerful resistance.");
149 if (info) return info_duration(base, base);
153 set_oppose_pois(randint1(base) + base, FALSE);
159 if (name) return _("恐慌", "Horrify");
160 if (desc) return _("モンスター1体を恐怖させ、朦朧させる。抵抗されると無効。", "Attempts to scare and stun a monster.");
165 if (info) return info_power(power);
169 if (!get_aim_dir(&dir)) return NULL;
171 fear_monster(dir, plev);
172 stun_monster(dir, plev);
178 if (name) return _("アンデッド従属", "Enslave Undead");
179 if (desc) return _("アンデッド1体を魅了する。抵抗されると無効。", "Attempts to charm an undead monster.");
184 if (info) return info_power(power);
188 if (!get_aim_dir(&dir)) return NULL;
190 control_one_undead(dir, plev);
196 if (name) return _("エントロピーの球", "Orb of Entropy");
197 if (desc) return _("生命のある者のHPと最大HP双方にダメージを与える効果のある球を放つ。", "Fires a ball which damages to both HP and MaxHP of living monsters.");
200 DICE_NUMBER dice = 3;
202 POSITION rad = (plev < 30) ? 2 : 3;
205 if (IS_WIZARD_CLASS())
206 base = plev + plev / 2;
208 base = plev + plev / 4;
211 if (info) return info_damage(dice, sides, base);
215 if (!get_aim_dir(&dir)) return NULL;
217 fire_ball(GF_HYPODYNAMIA, dir, damroll(dice, sides) + base, rad);
223 if (name) return _("地獄の矢", "Nether Bolt");
224 if (desc) return _("地獄のボルトもしくはビームを放つ。", "Fires a bolt or beam of nether.");
227 DICE_NUMBER dice = 8 + (plev - 5) / 4;
230 if (info) return info_damage(dice, sides, 0);
234 if (!get_aim_dir(&dir)) return NULL;
236 fire_bolt_or_beam(beam_chance(), GF_NETHER, dir, damroll(dice, sides));
242 if (name) return _("殺戮雲", "Cloud kill");
243 if (desc) return _("自分を中心とした毒の球を発生させる。", "Generate a ball of poison centered on you.");
246 HIT_POINT dam = (30 + plev) * 2;
247 POSITION rad = plev / 10 + 2;
249 if (info) return info_damage(0, 0, dam / 2);
253 project(0, rad, p_ptr->y, p_ptr->x, dam, GF_POIS, PROJECT_KILL | PROJECT_ITEM, -1);
259 if (name) return _("モンスター消滅", "Genocide One");
260 if (desc) return _("モンスター1体を消し去る。経験値やアイテムは手に入らない。抵抗されると無効。", "Attempts to vanish a monster.");
263 int power = plev + 50;
265 if (info) return info_power(power);
269 if (!get_aim_dir(&dir)) return NULL;
271 fire_ball_hide(GF_GENOCIDE, dir, power, 0);
277 if (name) return _("毒の刃", "Poison Branding");
278 if (desc) return _("武器に毒の属性をつける。", "Makes current weapon poison branded.");
289 if (name) return _("吸血の矢", "Vampiric Bolt");
290 if (desc) return _("ボルトによりモンスター1体から生命力を吸いとる。吸いとった生命力によって満腹度が上がる。",
291 "Absorbs some HP from a monster and gives them to you by bolt. You will also gain nutritional sustenance from this.");
294 DICE_NUMBER dice = 1;
295 DICE_SID sides = plev * 2;
298 if (info) return info_damage(dice, sides, base);
302 HIT_POINT dam = base + damroll(dice, sides);
304 if (!get_aim_dir(&dir)) return NULL;
306 if (hypodynamic_bolt(dir, dam))
308 chg_virtue(V_SACRIFICE, -1);
309 chg_virtue(V_VITALITY, -1);
314 * Gain nutritional sustenance:
317 * A Food ration gives 5000
318 * food points (by contrast)
319 * Don't ever get more than
320 * "Full" this way But if we
321 * ARE Gorged, it won't cure
324 dam = p_ptr->food + MIN(5000, 100 * dam);
326 /* Not gorged already */
327 if (p_ptr->food < PY_FOOD_MAX)
328 set_food(dam >= PY_FOOD_MAX ? PY_FOOD_MAX - 1 : dam);
335 if (name) return _("反魂の術", "Animate dead");
336 if (desc) return _("周囲の死体や骨を生き返す。", "Resurrects nearby corpse and skeletons. And makes these your pets.");
341 animate_dead(0, p_ptr->y, p_ptr->x);
347 if (name) return _("抹殺", "Genocide");
348 if (desc) return _("指定した文字のモンスターを現在の階から消し去る。抵抗されると無効。",
349 "Eliminates an entire class of monster, exhausting you. Powerful or unique monsters may resist.");
352 int power = plev + 50;
354 if (info) return info_power(power);
358 symbol_genocide(power, TRUE);
364 if (name) return _("狂戦士化", "Berserk");
365 if (desc) return _("狂戦士化し、恐怖を除去する。", "Gives bonus to hit and HP, immunity to fear for a while. But decreases AC.");
370 if (info) return info_duration(base, base);
374 (void)berserk(base + randint1(base));
380 if (name) return _("悪霊召喚", "Invoke Spirits");
381 if (desc) return _("ランダムで様々な効果が起こる。", "Causes random effects.");
384 if (info) return KWD_RANDOM;
388 if (!get_aim_dir(&dir)) return NULL;
390 cast_invoke_spirits(dir);
396 if (name) return _("暗黒の矢", "Dark Bolt");
397 if (desc) return _("暗黒のボルトもしくはビームを放つ。", "Fires a bolt or beam of darkness.");
400 DICE_NUMBER dice = 4 + (plev - 5) / 4;
403 if (info) return info_damage(dice, sides, 0);
407 if (!get_aim_dir(&dir)) return NULL;
409 fire_bolt_or_beam(beam_chance(), GF_DARK, dir, damroll(dice, sides));
415 if (name) return _("狂乱戦士", "Battle Frenzy");
416 if (desc) return _("狂戦士化し、恐怖を除去し、加速する。",
417 "Gives another bonus to hit and HP, immunity to fear for a while. Hastes you. But decreases AC.");
421 int sp_base = plev / 2;
422 int sp_sides = 20 + plev / 2;
424 if (info) return info_duration(b_base, b_base);
428 (void)berserk(b_base + randint1(b_base));
429 set_fast(randint1(sp_sides) + sp_base, FALSE);
435 if (name) return _("吸血の刃", "Vampiric Branding");
436 if (desc) return _("武器に吸血の属性をつける。", "Makes current weapon Vampiric.");
447 if (name) return _("吸血の連矢", "Vampiric Bolts");
448 if (desc) return _("3連射のボルトによりモンスター1体から生命力を吸いとる。吸いとった生命力によって体力が回復する。",
449 "Fires 3 bolts. Each of the bolts absorbs some HP from a monster and gives them to you.");
453 if (info) return format("%s3*%d", KWD_DAM, dam);
459 if (!get_aim_dir(&dir)) return NULL;
461 chg_virtue(V_SACRIFICE, -1);
462 chg_virtue(V_VITALITY, -1);
464 for (i = 0; i < 3; i++)
466 if (hypodynamic_bolt(dir, dam))
474 if (name) return _("死の言魂", "Nether Wave");
475 if (desc) return _("視界内の生命のあるモンスターにダメージを与える。", "Damages all living monsters in sight.");
478 DICE_SID sides = plev * 3;
480 if (info) return info_damage(1, sides, 0);
484 dispel_living(randint1(sides));
490 if (name) return _("暗黒の嵐", "Darkness Storm");
491 if (desc) return _("巨大な暗黒の球を放つ。", "Fires a huge ball of darkness.");
494 HIT_POINT dam = 100 + plev * 2;
497 if (info) return info_damage(0, 0, dam);
501 if (!get_aim_dir(&dir)) return NULL;
503 fire_ball(GF_DARK, dir, dam, rad);
509 if (name) return _("死の光線", "Death Ray");
510 if (desc) return _("死の光線を放つ。", "Fires a beam of death.");
515 if (!get_aim_dir(&dir)) return NULL;
517 death_ray(dir, plev);
523 if (name) return _("死者召喚", "Raise the Dead");
524 if (desc) return _("1体のアンデッドを召喚する。", "Summons an undead monster.");
530 bool pet = one_in_(3);
533 type = (plev > 47 ? SUMMON_HI_UNDEAD : SUMMON_UNDEAD);
535 if (!pet || (pet && (plev > 24) && one_in_(3)))
536 flg |= PM_ALLOW_GROUP;
538 if (pet) flg |= PM_FORCE_PET;
539 else flg |= (PM_ALLOW_UNIQUE | PM_NO_PET);
541 if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, (plev * 3) / 2, type, flg, '\0'))
543 msg_print(_("冷たい風があなたの周りに吹き始めた。それは腐敗臭を運んでいる...",
544 "Cold winds begin to blow around you, carrying with them the stench of decay..."));
549 msg_print(_("古えの死せる者共があなたに仕えるため土から甦った!",
550 "Ancient, long-dead forms arise from the ground to serve you!"));
554 msg_print(_("死者が甦った。眠りを妨げるあなたを罰するために!",
555 "'The dead arise... to punish you for disturbing them!'"));
558 chg_virtue(V_UNLIFE, 1);
565 if (name) return _("死者の秘伝", "Esoteria");
566 if (desc) return _("アイテムを1つ識別する。レベルが高いとアイテムの能力を完全に知ることができる。",
567 "Identifies an item. Or *identifies* an item at higher level.");
572 if (randint1(50) > plev)
574 if (!ident_spell(FALSE)) return NULL;
578 if (!identify_fully(FALSE)) return NULL;
585 if (name) return _("吸血鬼変化", "Polymorph Vampire");
586 if (desc) return _("一定時間、吸血鬼に変化する。変化している間は本来の種族の能力を失い、代わりに吸血鬼としての能力を得る。",
587 "Mimic a vampire for a while. Loses abilities of original race and gets abilities as a vampire.");
590 int base = 10 + plev / 2;
592 if (info) return info_duration(base, base);
596 set_mimic(base + randint1(base), MIMIC_VAMPIRE, FALSE);
602 if (name) return _("経験値復活", "Restore Life");
603 if (desc) return _("失った経験値を回復する。", "Restore lost experience.");
614 if (name) return _("周辺抹殺", "Mass Genocide");
615 if (desc) return _("自分の周囲にいるモンスターを現在の階から消し去る。抵抗されると無効。",
616 "Eliminates all nearby monsters, exhausting you. Powerful or unique monsters may be able to resist.");
619 int power = plev + 50;
621 if (info) return info_power(power);
625 mass_genocide(power, TRUE);
631 if (name) return _("地獄の劫火", "Hellfire");
632 if (desc) return _("邪悪な力を持つ宝珠を放つ。善良なモンスターには大きなダメージを与える。",
633 "Fires a powerful ball of evil power. Hurts good monsters greatly.");
639 if (info) return info_damage(0, 0, dam);
643 if (!get_aim_dir(&dir)) return NULL;
645 fire_ball(GF_HELL_FIRE, dir, dam, rad);
646 take_hit(DAMAGE_USELIFE, 20 + randint1(30), _("地獄の劫火の呪文を唱えた疲労", "the strain of casting Hellfire"), -1);
652 if (name) return _("幽体化", "Wraithform");
653 if (desc) return _("一定時間、壁を通り抜けることができ受けるダメージが軽減される幽体の状態に変身する。",
654 "Becomes wraith form which gives ability to pass walls and makes all damages half.");
659 if (info) return info_duration(base, base);
663 set_wraith_form(randint1(base) + base, FALSE);