4 #include "spells-summon.h"
5 #include "spells-status.h"
7 #include "player-status.h"
8 #include "player-effects.h"
14 * @brief 暗黒領域魔法の各処理を行う
16 * @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST)
17 * @return SPELL_NAME / SPELL_DESC / SPELL_INFO 時には文字列ポインタを返す。SPELL_CAST時はNULL文字列を返す。
19 concptr do_death_spell(SPELL_IDX spell, BIT_FLAGS mode)
21 bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
22 bool desc = (mode == SPELL_DESC) ? TRUE : FALSE;
23 bool info = (mode == SPELL_INFO) ? TRUE : FALSE;
24 bool cast = (mode == SPELL_CAST) ? TRUE : FALSE;
27 PLAYER_LEVEL plev = p_ptr->lev;
32 if (name) return _("無生命感知", "Detect Unlife");
33 if (desc) return _("近くの生命のないモンスターを感知する。", "Detects all nonliving monsters in your vicinity.");
36 POSITION rad = DETECT_RAD_DEFAULT;
38 if (info) return info_radius(rad);
42 detect_monsters_nonliving(rad);
48 if (name) return _("呪殺弾", "Malediction");
49 if (desc) return _("ごく小さな邪悪な力を持つボールを放つ。善良なモンスターには大きなダメージを与える。",
50 "Fires a tiny ball of evil power which hurts good monsters greatly.");
53 DICE_NUMBER dice = 3 + (plev - 1) / 5;
57 if (info) return info_damage(dice, sides, 0);
61 if (!get_aim_dir(&dir)) return NULL;
64 * A radius-0 ball may (1) be aimed at
65 * objects etc., and will affect them;
66 * (2) may be aimed at ANY visible
67 * monster, unlike a 'bolt' which must
68 * travel to the monster.
71 fire_ball(GF_HELL_FIRE, dir, damroll(dice, sides), rad);
75 /* Special effect first */
76 int effect = randint1(1000);
79 fire_ball_hide(GF_DEATH_RAY, dir, plev * 200, 0);
80 else if (effect < 500)
81 fire_ball_hide(GF_TURN_ALL, dir, plev, 0);
82 else if (effect < 800)
83 fire_ball_hide(GF_OLD_CONF, dir, plev, 0);
85 fire_ball_hide(GF_STUN, dir, plev, 0);
92 if (name) return _("邪悪感知", "Detect Evil");
93 if (desc) return _("近くの邪悪なモンスターを感知する。", "Detects all evil monsters in your vicinity.");
96 POSITION rad = DETECT_RAD_DEFAULT;
98 if (info) return info_radius(rad);
102 detect_monsters_evil(rad);
108 if (name) return _("悪臭雲", "Stinking Cloud");
109 if (desc) return _("毒の球を放つ。", "Fires a ball of poison.");
112 HIT_POINT dam = 10 + plev / 2;
115 if (info) return info_damage(0, 0, dam);
119 if (!get_aim_dir(&dir)) return NULL;
121 fire_ball(GF_POIS, dir, dam, rad);
127 if (name) return _("黒い眠り", "Black Sleep");
128 if (desc) return _("1体のモンスターを眠らせる。抵抗されると無効。", "Attempts to sleep a monster.");
133 if (info) return info_power(power);
137 if (!get_aim_dir(&dir)) return NULL;
139 sleep_monster(dir, plev);
145 if (name) return _("耐毒", "Resist Poison");
146 if (desc) return _("一定時間、毒への耐性を得る。装備による耐性に累積する。",
147 "Gives resistance to poison. This resistance can be added to which from equipment for more powerful resistance.");
152 if (info) return info_duration(base, base);
156 set_oppose_pois(randint1(base) + base, FALSE);
162 if (name) return _("恐慌", "Horrify");
163 if (desc) return _("モンスター1体を恐怖させ、朦朧させる。抵抗されると無効。", "Attempts to scare and stun a monster.");
168 if (info) return info_power(power);
172 if (!get_aim_dir(&dir)) return NULL;
174 fear_monster(dir, plev);
175 stun_monster(dir, plev);
181 if (name) return _("アンデッド従属", "Enslave Undead");
182 if (desc) return _("アンデッド1体を魅了する。抵抗されると無効。", "Attempts to charm an undead monster.");
187 if (info) return info_power(power);
191 if (!get_aim_dir(&dir)) return NULL;
193 control_one_undead(dir, plev);
199 if (name) return _("エントロピーの球", "Orb of Entropy");
200 if (desc) return _("生命のある者のHPと最大HP双方にダメージを与える効果のある球を放つ。", "Fires a ball which damages to both HP and MaxHP of living monsters.");
203 DICE_NUMBER dice = 3;
205 POSITION rad = (plev < 30) ? 2 : 3;
208 if (IS_WIZARD_CLASS())
209 base = plev + plev / 2;
211 base = plev + plev / 4;
214 if (info) return info_damage(dice, sides, base);
218 if (!get_aim_dir(&dir)) return NULL;
220 fire_ball(GF_HYPODYNAMIA, dir, damroll(dice, sides) + base, rad);
226 if (name) return _("地獄の矢", "Nether Bolt");
227 if (desc) return _("地獄のボルトもしくはビームを放つ。", "Fires a bolt or beam of nether.");
230 DICE_NUMBER dice = 8 + (plev - 5) / 4;
233 if (info) return info_damage(dice, sides, 0);
237 if (!get_aim_dir(&dir)) return NULL;
239 fire_bolt_or_beam(beam_chance(), GF_NETHER, dir, damroll(dice, sides));
245 if (name) return _("殺戮雲", "Cloud kill");
246 if (desc) return _("自分を中心とした毒の球を発生させる。", "Generate a ball of poison centered on you.");
249 HIT_POINT dam = (30 + plev) * 2;
250 POSITION rad = plev / 10 + 2;
252 if (info) return info_damage(0, 0, dam / 2);
256 project(0, rad, p_ptr->y, p_ptr->x, dam, GF_POIS, PROJECT_KILL | PROJECT_ITEM, -1);
262 if (name) return _("モンスター消滅", "Genocide One");
263 if (desc) return _("モンスター1体を消し去る。経験値やアイテムは手に入らない。抵抗されると無効。", "Attempts to vanish a monster.");
266 int power = plev + 50;
268 if (info) return info_power(power);
272 if (!get_aim_dir(&dir)) return NULL;
274 fire_ball_hide(GF_GENOCIDE, dir, power, 0);
280 if (name) return _("毒の刃", "Poison Branding");
281 if (desc) return _("武器に毒の属性をつける。", "Makes current weapon poison branded.");
292 if (name) return _("吸血の矢", "Vampiric Bolt");
293 if (desc) return _("ボルトによりモンスター1体から生命力を吸いとる。吸いとった生命力によって満腹度が上がる。",
294 "Absorbs some HP from a monster and gives them to you by bolt. You will also gain nutritional sustenance from this.");
297 DICE_NUMBER dice = 1;
298 DICE_SID sides = plev * 2;
301 if (info) return info_damage(dice, sides, base);
305 HIT_POINT dam = base + damroll(dice, sides);
307 if (!get_aim_dir(&dir)) return NULL;
309 if (hypodynamic_bolt(dir, dam))
311 chg_virtue(V_SACRIFICE, -1);
312 chg_virtue(V_VITALITY, -1);
317 * Gain nutritional sustenance:
320 * A Food ration gives 5000
321 * food points (by contrast)
322 * Don't ever get more than
323 * "Full" this way But if we
324 * ARE Gorged, it won't cure
327 dam = p_ptr->food + MIN(5000, 100 * dam);
329 /* Not gorged already */
330 if (p_ptr->food < PY_FOOD_MAX)
331 set_food(dam >= PY_FOOD_MAX ? PY_FOOD_MAX - 1 : dam);
338 if (name) return _("反魂の術", "Animate dead");
339 if (desc) return _("周囲の死体や骨を生き返す。", "Resurrects nearby corpse and skeletons. And makes these your pets.");
344 animate_dead(0, p_ptr->y, p_ptr->x);
350 if (name) return _("抹殺", "Genocide");
351 if (desc) return _("指定した文字のモンスターを現在の階から消し去る。抵抗されると無効。",
352 "Eliminates an entire class of monster, exhausting you. Powerful or unique monsters may resist.");
355 int power = plev + 50;
357 if (info) return info_power(power);
361 symbol_genocide(power, TRUE);
367 if (name) return _("狂戦士化", "Berserk");
368 if (desc) return _("狂戦士化し、恐怖を除去する。", "Gives bonus to hit and HP, immunity to fear for a while. But decreases AC.");
373 if (info) return info_duration(base, base);
377 (void)berserk(base + randint1(base));
383 if (name) return _("悪霊召喚", "Invoke Spirits");
384 if (desc) return _("ランダムで様々な効果が起こる。", "Causes random effects.");
387 if (info) return KWD_RANDOM;
391 if (!get_aim_dir(&dir)) return NULL;
393 cast_invoke_spirits(dir);
399 if (name) return _("暗黒の矢", "Dark Bolt");
400 if (desc) return _("暗黒のボルトもしくはビームを放つ。", "Fires a bolt or beam of darkness.");
403 DICE_NUMBER dice = 4 + (plev - 5) / 4;
406 if (info) return info_damage(dice, sides, 0);
410 if (!get_aim_dir(&dir)) return NULL;
412 fire_bolt_or_beam(beam_chance(), GF_DARK, dir, damroll(dice, sides));
418 if (name) return _("狂乱戦士", "Battle Frenzy");
419 if (desc) return _("狂戦士化し、恐怖を除去し、加速する。",
420 "Gives another bonus to hit and HP, immunity to fear for a while. Hastes you. But decreases AC.");
424 int sp_base = plev / 2;
425 int sp_sides = 20 + plev / 2;
427 if (info) return info_duration(b_base, b_base);
431 (void)berserk(b_base + randint1(b_base));
432 set_fast(randint1(sp_sides) + sp_base, FALSE);
438 if (name) return _("吸血の刃", "Vampiric Branding");
439 if (desc) return _("武器に吸血の属性をつける。", "Makes current weapon Vampiric.");
450 if (name) return _("吸血の連矢", "Vampiric Bolts");
451 if (desc) return _("3連射のボルトによりモンスター1体から生命力を吸いとる。吸いとった生命力によって体力が回復する。",
452 "Fires 3 bolts. Each of the bolts absorbs some HP from a monster and gives them to you.");
456 if (info) return format("%s3*%d", KWD_DAM, dam);
462 if (!get_aim_dir(&dir)) return NULL;
464 chg_virtue(V_SACRIFICE, -1);
465 chg_virtue(V_VITALITY, -1);
467 for (i = 0; i < 3; i++)
469 if (hypodynamic_bolt(dir, dam))
477 if (name) return _("死の言魂", "Nether Wave");
478 if (desc) return _("視界内の生命のあるモンスターにダメージを与える。", "Damages all living monsters in sight.");
481 DICE_SID sides = plev * 3;
483 if (info) return info_damage(1, sides, 0);
487 dispel_living(randint1(sides));
493 if (name) return _("暗黒の嵐", "Darkness Storm");
494 if (desc) return _("巨大な暗黒の球を放つ。", "Fires a huge ball of darkness.");
497 HIT_POINT dam = 100 + plev * 2;
500 if (info) return info_damage(0, 0, dam);
504 if (!get_aim_dir(&dir)) return NULL;
506 fire_ball(GF_DARK, dir, dam, rad);
512 if (name) return _("死の光線", "Death Ray");
513 if (desc) return _("死の光線を放つ。", "Fires a beam of death.");
518 if (!get_aim_dir(&dir)) return NULL;
520 death_ray(dir, plev);
526 if (name) return _("死者召喚", "Raise the Dead");
527 if (desc) return _("1体のアンデッドを召喚する。", "Summons an undead monster.");
528 if (cast) cast_summon_undead(p_ptr, (plev * 3) / 2);
532 if (name) return _("死者の秘伝", "Esoteria");
533 if (desc) return _("アイテムを1つ識別する。レベルが高いとアイテムの能力を完全に知ることができる。",
534 "Identifies an item. Or *identifies* an item at higher level.");
539 if (randint1(50) > plev)
541 if (!ident_spell(FALSE)) return NULL;
545 if (!identify_fully(FALSE)) return NULL;
552 if (name) return _("吸血鬼変化", "Polymorph Vampire");
553 if (desc) return _("一定時間、吸血鬼に変化する。変化している間は本来の種族の能力を失い、代わりに吸血鬼としての能力を得る。",
554 "Mimic a vampire for a while. Loses abilities of original race and gets abilities as a vampire.");
557 int base = 10 + plev / 2;
559 if (info) return info_duration(base, base);
563 set_mimic(base + randint1(base), MIMIC_VAMPIRE, FALSE);
569 if (name) return _("経験値復活", "Restore Life");
570 if (desc) return _("失った経験値を回復する。", "Restore lost experience.");
581 if (name) return _("周辺抹殺", "Mass Genocide");
582 if (desc) return _("自分の周囲にいるモンスターを現在の階から消し去る。抵抗されると無効。",
583 "Eliminates all nearby monsters, exhausting you. Powerful or unique monsters may be able to resist.");
586 int power = plev + 50;
588 if (info) return info_power(power);
592 mass_genocide(power, TRUE);
598 if (name) return _("地獄の劫火", "Hellfire");
599 if (desc) return _("邪悪な力を持つ宝珠を放つ。善良なモンスターには大きなダメージを与える。",
600 "Fires a powerful ball of evil power. Hurts good monsters greatly.");
606 if (info) return info_damage(0, 0, dam);
610 if (!get_aim_dir(&dir)) return NULL;
612 fire_ball(GF_HELL_FIRE, dir, dam, rad);
613 take_hit(DAMAGE_USELIFE, 20 + randint1(30), _("地獄の劫火の呪文を唱えた疲労", "the strain of casting Hellfire"), -1);
619 if (name) return _("幽体化", "Wraithform");
620 if (desc) return _("一定時間、壁を通り抜けることができ受けるダメージが軽減される幽体の状態に変身する。",
621 "Becomes wraith form which gives ability to pass walls and makes all damages half.");
626 if (info) return info_duration(base, base);
630 set_wraith_form(randint1(base) + base, FALSE);