4 #include "spells-summon.h"
5 #include "spells-status.h"
7 #include "player-status.h"
12 * @brief 暗黒領域魔法の各処理を行う
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_death_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;
25 PLAYER_LEVEL plev = p_ptr->lev;
30 if (name) return _("無生命感知", "Detect Unlife");
31 if (desc) return _("近くの生命のないモンスターを感知する。", "Detects all nonliving monsters in your vicinity.");
34 POSITION rad = DETECT_RAD_DEFAULT;
36 if (info) return info_radius(rad);
40 detect_monsters_nonliving(rad);
46 if (name) return _("呪殺弾", "Malediction");
47 if (desc) return _("ごく小さな邪悪な力を持つボールを放つ。善良なモンスターには大きなダメージを与える。",
48 "Fires a tiny ball of evil power which hurts good monsters greatly.");
51 DICE_NUMBER dice = 3 + (plev - 1) / 5;
55 if (info) return info_damage(dice, sides, 0);
59 if (!get_aim_dir(&dir)) return NULL;
62 * A radius-0 ball may (1) be aimed at
63 * objects etc., and will affect them;
64 * (2) may be aimed at ANY visible
65 * monster, unlike a 'bolt' which must
66 * travel to the monster.
69 fire_ball(GF_HELL_FIRE, dir, damroll(dice, sides), rad);
73 /* Special effect first */
74 int effect = randint1(1000);
77 fire_ball_hide(GF_DEATH_RAY, dir, plev * 200, 0);
78 else if (effect < 500)
79 fire_ball_hide(GF_TURN_ALL, dir, plev, 0);
80 else if (effect < 800)
81 fire_ball_hide(GF_OLD_CONF, dir, plev, 0);
83 fire_ball_hide(GF_STUN, dir, plev, 0);
90 if (name) return _("邪悪感知", "Detect Evil");
91 if (desc) return _("近くの邪悪なモンスターを感知する。", "Detects all evil monsters in your vicinity.");
94 POSITION rad = DETECT_RAD_DEFAULT;
96 if (info) return info_radius(rad);
100 detect_monsters_evil(rad);
106 if (name) return _("悪臭雲", "Stinking Cloud");
107 if (desc) return _("毒の球を放つ。", "Fires a ball of poison.");
110 HIT_POINT dam = 10 + plev / 2;
113 if (info) return info_damage(0, 0, dam);
117 if (!get_aim_dir(&dir)) return NULL;
119 fire_ball(GF_POIS, dir, dam, rad);
125 if (name) return _("黒い眠り", "Black Sleep");
126 if (desc) return _("1体のモンスターを眠らせる。抵抗されると無効。", "Attempts to sleep a monster.");
131 if (info) return info_power(power);
135 if (!get_aim_dir(&dir)) return NULL;
137 sleep_monster(dir, plev);
143 if (name) return _("耐毒", "Resist Poison");
144 if (desc) return _("一定時間、毒への耐性を得る。装備による耐性に累積する。",
145 "Gives resistance to poison. This resistance can be added to which from equipment for more powerful resistance.");
150 if (info) return info_duration(base, base);
154 set_oppose_pois(randint1(base) + base, FALSE);
160 if (name) return _("恐慌", "Horrify");
161 if (desc) return _("モンスター1体を恐怖させ、朦朧させる。抵抗されると無効。", "Attempts to scare and stun a monster.");
166 if (info) return info_power(power);
170 if (!get_aim_dir(&dir)) return NULL;
172 fear_monster(dir, plev);
173 stun_monster(dir, plev);
179 if (name) return _("アンデッド従属", "Enslave Undead");
180 if (desc) return _("アンデッド1体を魅了する。抵抗されると無効。", "Attempts to charm an undead monster.");
185 if (info) return info_power(power);
189 if (!get_aim_dir(&dir)) return NULL;
191 control_one_undead(dir, plev);
197 if (name) return _("エントロピーの球", "Orb of Entropy");
198 if (desc) return _("生命のある者のHPと最大HP双方にダメージを与える効果のある球を放つ。", "Fires a ball which damages to both HP and MaxHP of living monsters.");
201 DICE_NUMBER dice = 3;
203 POSITION rad = (plev < 30) ? 2 : 3;
206 if (IS_WIZARD_CLASS())
207 base = plev + plev / 2;
209 base = plev + plev / 4;
212 if (info) return info_damage(dice, sides, base);
216 if (!get_aim_dir(&dir)) return NULL;
218 fire_ball(GF_HYPODYNAMIA, dir, damroll(dice, sides) + base, rad);
224 if (name) return _("地獄の矢", "Nether Bolt");
225 if (desc) return _("地獄のボルトもしくはビームを放つ。", "Fires a bolt or beam of nether.");
228 DICE_NUMBER dice = 8 + (plev - 5) / 4;
231 if (info) return info_damage(dice, sides, 0);
235 if (!get_aim_dir(&dir)) return NULL;
237 fire_bolt_or_beam(beam_chance(), GF_NETHER, dir, damroll(dice, sides));
243 if (name) return _("殺戮雲", "Cloud kill");
244 if (desc) return _("自分を中心とした毒の球を発生させる。", "Generate a ball of poison centered on you.");
247 HIT_POINT dam = (30 + plev) * 2;
248 POSITION rad = plev / 10 + 2;
250 if (info) return info_damage(0, 0, dam / 2);
254 project(0, rad, p_ptr->y, p_ptr->x, dam, GF_POIS, PROJECT_KILL | PROJECT_ITEM, -1);
260 if (name) return _("モンスター消滅", "Genocide One");
261 if (desc) return _("モンスター1体を消し去る。経験値やアイテムは手に入らない。抵抗されると無効。", "Attempts to vanish a monster.");
264 int power = plev + 50;
266 if (info) return info_power(power);
270 if (!get_aim_dir(&dir)) return NULL;
272 fire_ball_hide(GF_GENOCIDE, dir, power, 0);
278 if (name) return _("毒の刃", "Poison Branding");
279 if (desc) return _("武器に毒の属性をつける。", "Makes current weapon poison branded.");
290 if (name) return _("吸血の矢", "Vampiric Bolt");
291 if (desc) return _("ボルトによりモンスター1体から生命力を吸いとる。吸いとった生命力によって満腹度が上がる。",
292 "Absorbs some HP from a monster and gives them to you by bolt. You will also gain nutritional sustenance from this.");
295 DICE_NUMBER dice = 1;
296 DICE_SID sides = plev * 2;
299 if (info) return info_damage(dice, sides, base);
303 HIT_POINT dam = base + damroll(dice, sides);
305 if (!get_aim_dir(&dir)) return NULL;
307 if (hypodynamic_bolt(dir, dam))
309 chg_virtue(V_SACRIFICE, -1);
310 chg_virtue(V_VITALITY, -1);
315 * Gain nutritional sustenance:
318 * A Food ration gives 5000
319 * food points (by contrast)
320 * Don't ever get more than
321 * "Full" this way But if we
322 * ARE Gorged, it won't cure
325 dam = p_ptr->food + MIN(5000, 100 * dam);
327 /* Not gorged already */
328 if (p_ptr->food < PY_FOOD_MAX)
329 set_food(dam >= PY_FOOD_MAX ? PY_FOOD_MAX - 1 : dam);
336 if (name) return _("反魂の術", "Animate dead");
337 if (desc) return _("周囲の死体や骨を生き返す。", "Resurrects nearby corpse and skeletons. And makes these your pets.");
342 animate_dead(0, p_ptr->y, p_ptr->x);
348 if (name) return _("抹殺", "Genocide");
349 if (desc) return _("指定した文字のモンスターを現在の階から消し去る。抵抗されると無効。",
350 "Eliminates an entire class of monster, exhausting you. Powerful or unique monsters may resist.");
353 int power = plev + 50;
355 if (info) return info_power(power);
359 symbol_genocide(power, TRUE);
365 if (name) return _("狂戦士化", "Berserk");
366 if (desc) return _("狂戦士化し、恐怖を除去する。", "Gives bonus to hit and HP, immunity to fear for a while. But decreases AC.");
371 if (info) return info_duration(base, base);
375 (void)berserk(base + randint1(base));
381 if (name) return _("悪霊召喚", "Invoke Spirits");
382 if (desc) return _("ランダムで様々な効果が起こる。", "Causes random effects.");
385 if (info) return KWD_RANDOM;
389 if (!get_aim_dir(&dir)) return NULL;
391 cast_invoke_spirits(dir);
397 if (name) return _("暗黒の矢", "Dark Bolt");
398 if (desc) return _("暗黒のボルトもしくはビームを放つ。", "Fires a bolt or beam of darkness.");
401 DICE_NUMBER dice = 4 + (plev - 5) / 4;
404 if (info) return info_damage(dice, sides, 0);
408 if (!get_aim_dir(&dir)) return NULL;
410 fire_bolt_or_beam(beam_chance(), GF_DARK, dir, damroll(dice, sides));
416 if (name) return _("狂乱戦士", "Battle Frenzy");
417 if (desc) return _("狂戦士化し、恐怖を除去し、加速する。",
418 "Gives another bonus to hit and HP, immunity to fear for a while. Hastes you. But decreases AC.");
422 int sp_base = plev / 2;
423 int sp_sides = 20 + plev / 2;
425 if (info) return info_duration(b_base, b_base);
429 (void)berserk(b_base + randint1(b_base));
430 set_fast(randint1(sp_sides) + sp_base, FALSE);
436 if (name) return _("吸血の刃", "Vampiric Branding");
437 if (desc) return _("武器に吸血の属性をつける。", "Makes current weapon Vampiric.");
448 if (name) return _("吸血の連矢", "Vampiric Bolts");
449 if (desc) return _("3連射のボルトによりモンスター1体から生命力を吸いとる。吸いとった生命力によって体力が回復する。",
450 "Fires 3 bolts. Each of the bolts absorbs some HP from a monster and gives them to you.");
454 if (info) return format("%s3*%d", KWD_DAM, dam);
460 if (!get_aim_dir(&dir)) return NULL;
462 chg_virtue(V_SACRIFICE, -1);
463 chg_virtue(V_VITALITY, -1);
465 for (i = 0; i < 3; i++)
467 if (hypodynamic_bolt(dir, dam))
475 if (name) return _("死の言魂", "Nether Wave");
476 if (desc) return _("視界内の生命のあるモンスターにダメージを与える。", "Damages all living monsters in sight.");
479 DICE_SID sides = plev * 3;
481 if (info) return info_damage(1, sides, 0);
485 dispel_living(randint1(sides));
491 if (name) return _("暗黒の嵐", "Darkness Storm");
492 if (desc) return _("巨大な暗黒の球を放つ。", "Fires a huge ball of darkness.");
495 HIT_POINT dam = 100 + plev * 2;
498 if (info) return info_damage(0, 0, dam);
502 if (!get_aim_dir(&dir)) return NULL;
504 fire_ball(GF_DARK, dir, dam, rad);
510 if (name) return _("死の光線", "Death Ray");
511 if (desc) return _("死の光線を放つ。", "Fires a beam of death.");
516 if (!get_aim_dir(&dir)) return NULL;
518 death_ray(dir, plev);
524 if (name) return _("死者召喚", "Raise the Dead");
525 if (desc) return _("1体のアンデッドを召喚する。", "Summons an undead monster.");
526 if (cast) cast_summon_undead(p_ptr, (plev * 3) / 2);
530 if (name) return _("死者の秘伝", "Esoteria");
531 if (desc) return _("アイテムを1つ識別する。レベルが高いとアイテムの能力を完全に知ることができる。",
532 "Identifies an item. Or *identifies* an item at higher level.");
537 if (randint1(50) > plev)
539 if (!ident_spell(FALSE)) return NULL;
543 if (!identify_fully(FALSE)) return NULL;
550 if (name) return _("吸血鬼変化", "Polymorph Vampire");
551 if (desc) return _("一定時間、吸血鬼に変化する。変化している間は本来の種族の能力を失い、代わりに吸血鬼としての能力を得る。",
552 "Mimic a vampire for a while. Loses abilities of original race and gets abilities as a vampire.");
555 int base = 10 + plev / 2;
557 if (info) return info_duration(base, base);
561 set_mimic(base + randint1(base), MIMIC_VAMPIRE, FALSE);
567 if (name) return _("経験値復活", "Restore Life");
568 if (desc) return _("失った経験値を回復する。", "Restore lost experience.");
579 if (name) return _("周辺抹殺", "Mass Genocide");
580 if (desc) return _("自分の周囲にいるモンスターを現在の階から消し去る。抵抗されると無効。",
581 "Eliminates all nearby monsters, exhausting you. Powerful or unique monsters may be able to resist.");
584 int power = plev + 50;
586 if (info) return info_power(power);
590 mass_genocide(power, TRUE);
596 if (name) return _("地獄の劫火", "Hellfire");
597 if (desc) return _("邪悪な力を持つ宝珠を放つ。善良なモンスターには大きなダメージを与える。",
598 "Fires a powerful ball of evil power. Hurts good monsters greatly.");
604 if (info) return info_damage(0, 0, dam);
608 if (!get_aim_dir(&dir)) return NULL;
610 fire_ball(GF_HELL_FIRE, dir, dam, rad);
611 take_hit(DAMAGE_USELIFE, 20 + randint1(30), _("地獄の劫火の呪文を唱えた疲労", "the strain of casting Hellfire"), -1);
617 if (name) return _("幽体化", "Wraithform");
618 if (desc) return _("一定時間、壁を通り抜けることができ受けるダメージが軽減される幽体の状態に変身する。",
619 "Becomes wraith form which gives ability to pass walls and makes all damages half.");
624 if (info) return info_duration(base, base);
628 set_wraith_form(randint1(base) + base, FALSE);