4 #include "spells-summon.h"
5 #include "spells-status.h"
6 #include "spells-object.h"
8 #include "player-status.h"
9 #include "player-effects.h"
10 #include "targeting.h"
11 #include "player-class.h"
12 #include "player-damage.h"
13 #include "player-race.h"
16 * @brief 暗黒領域魔法の各処理を行う
18 * @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST)
19 * @return SPELL_NAME / SPELL_DESC / SPELL_INFO 時には文字列ポインタを返す。SPELL_CAST時はNULL文字列を返す。
21 concptr do_death_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mode)
23 bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
24 bool desc = (mode == SPELL_DESC) ? TRUE : FALSE;
25 bool info = (mode == SPELL_INFO) ? TRUE : FALSE;
26 bool cast = (mode == SPELL_CAST) ? TRUE : FALSE;
29 PLAYER_LEVEL plev = caster_ptr->lev;
34 if (name) return _("無生命感知", "Detect Unlife");
35 if (desc) return _("近くの生命のないモンスターを感知する。", "Detects all nonliving monsters in your vicinity.");
38 POSITION rad = DETECT_RAD_DEFAULT;
40 if (info) return info_radius(rad);
44 detect_monsters_nonliving(rad);
50 if (name) return _("呪殺弾", "Malediction");
51 if (desc) return _("ごく小さな邪悪な力を持つボールを放つ。善良なモンスターには大きなダメージを与える。",
52 "Fires a tiny ball of evil power which hurts good monsters greatly.");
55 DICE_NUMBER dice = 3 + (plev - 1) / 5;
59 if (info) return info_damage(dice, sides, 0);
63 if (!get_aim_dir(&dir)) return NULL;
66 * A radius-0 ball may (1) be aimed at
67 * objects etc., and will affect them;
68 * (2) may be aimed at ANY visible
69 * monster, unlike a 'bolt' which must
70 * travel to the monster.
73 fire_ball(caster_ptr, GF_HELL_FIRE, dir, damroll(dice, sides), rad);
77 /* Special effect first */
78 int effect = randint1(1000);
81 fire_ball_hide(GF_DEATH_RAY, dir, plev * 200, 0);
82 else if (effect < 500)
83 fire_ball_hide(GF_TURN_ALL, dir, plev, 0);
84 else if (effect < 800)
85 fire_ball_hide(GF_OLD_CONF, dir, plev, 0);
87 fire_ball_hide(GF_STUN, dir, plev, 0);
94 if (name) return _("邪悪感知", "Detect Evil");
95 if (desc) return _("近くの邪悪なモンスターを感知する。", "Detects all evil monsters in your vicinity.");
98 POSITION rad = DETECT_RAD_DEFAULT;
100 if (info) return info_radius(rad);
104 detect_monsters_evil(rad);
110 if (name) return _("悪臭雲", "Stinking Cloud");
111 if (desc) return _("毒の球を放つ。", "Fires a ball of poison.");
114 HIT_POINT dam = 10 + plev / 2;
117 if (info) return info_damage(0, 0, dam);
121 if (!get_aim_dir(&dir)) return NULL;
123 fire_ball(caster_ptr, GF_POIS, dir, dam, rad);
129 if (name) return _("黒い眠り", "Black Sleep");
130 if (desc) return _("1体のモンスターを眠らせる。抵抗されると無効。", "Attempts to sleep a monster.");
135 if (info) return info_power(power);
139 if (!get_aim_dir(&dir)) return NULL;
141 sleep_monster(dir, plev);
147 if (name) return _("耐毒", "Resist Poison");
148 if (desc) return _("一定時間、毒への耐性を得る。装備による耐性に累積する。",
149 "Gives resistance to poison. This resistance can be added to which from equipment for more powerful resistance.");
154 if (info) return info_duration(base, base);
158 set_oppose_pois(caster_ptr, randint1(base) + base, FALSE);
164 if (name) return _("恐慌", "Horrify");
165 if (desc) return _("モンスター1体を恐怖させ、朦朧させる。抵抗されると無効。", "Attempts to scare and stun a monster.");
170 if (info) return info_power(power);
174 if (!get_aim_dir(&dir)) return NULL;
176 fear_monster(dir, plev);
177 stun_monster(dir, plev);
183 if (name) return _("アンデッド従属", "Enslave Undead");
184 if (desc) return _("アンデッド1体を魅了する。抵抗されると無効。", "Attempts to charm an undead monster.");
189 if (info) return info_power(power);
193 if (!get_aim_dir(&dir)) return NULL;
195 control_one_undead(dir, plev);
201 if (name) return _("エントロピーの球", "Orb of Entropy");
202 if (desc) return _("生命のある者のHPと最大HP双方にダメージを与える効果のある球を放つ。", "Fires a ball which damages to both HP and MaxHP of living monsters.");
205 DICE_NUMBER dice = 3;
207 POSITION rad = (plev < 30) ? 2 : 3;
210 if (IS_WIZARD_CLASS(caster_ptr))
211 base = plev + plev / 2;
213 base = plev + plev / 4;
216 if (info) return info_damage(dice, sides, base);
220 if (!get_aim_dir(&dir)) return NULL;
222 fire_ball(caster_ptr, GF_HYPODYNAMIA, dir, damroll(dice, sides) + base, rad);
228 if (name) return _("地獄の矢", "Nether Bolt");
229 if (desc) return _("地獄のボルトもしくはビームを放つ。", "Fires a bolt or beam of nether.");
232 DICE_NUMBER dice = 8 + (plev - 5) / 4;
235 if (info) return info_damage(dice, sides, 0);
239 if (!get_aim_dir(&dir)) return NULL;
241 fire_bolt_or_beam(beam_chance(), GF_NETHER, dir, damroll(dice, sides));
247 if (name) return _("殺戮雲", "Cloud kill");
248 if (desc) return _("自分を中心とした毒の球を発生させる。", "Generate a ball of poison centered on you.");
251 HIT_POINT dam = (30 + plev) * 2;
252 POSITION rad = plev / 10 + 2;
254 if (info) return info_damage(0, 0, dam / 2);
258 project(caster_ptr, 0, rad, caster_ptr->y, caster_ptr->x, dam, GF_POIS, PROJECT_KILL | PROJECT_ITEM, -1);
264 if (name) return _("モンスター消滅", "Genocide One");
265 if (desc) return _("モンスター1体を消し去る。経験値やアイテムは手に入らない。抵抗されると無効。", "Attempts to vanish a monster.");
268 int power = plev + 50;
270 if (info) return info_power(power);
274 if (!get_aim_dir(&dir)) return NULL;
276 fire_ball_hide(GF_GENOCIDE, dir, power, 0);
282 if (name) return _("毒の刃", "Poison Branding");
283 if (desc) return _("武器に毒の属性をつける。", "Makes current weapon poison branded.");
288 brand_weapon(caster_ptr, 3);
294 if (name) return _("吸血の矢", "Vampiric Bolt");
295 if (desc) return _("ボルトによりモンスター1体から生命力を吸いとる。吸いとった生命力によって満腹度が上がる。",
296 "Absorbs some HP from a monster and gives them to you by bolt. You will also gain nutritional sustenance from this.");
299 DICE_NUMBER dice = 1;
300 DICE_SID sides = plev * 2;
303 if (info) return info_damage(dice, sides, base);
307 HIT_POINT dam = base + damroll(dice, sides);
309 if (!get_aim_dir(&dir)) return NULL;
311 if (hypodynamic_bolt(dir, dam))
313 chg_virtue(caster_ptr, V_SACRIFICE, -1);
314 chg_virtue(caster_ptr, V_VITALITY, -1);
316 hp_player(caster_ptr, dam);
319 * Gain nutritional sustenance:
322 * A Food ration gives 5000
323 * food points (by contrast)
324 * Don't ever get more than
325 * "Full" this way But if we
326 * ARE Gorged, it won't cure
329 dam = caster_ptr->food + MIN(5000, 100 * dam);
331 /* Not gorged already */
332 if (caster_ptr->food < PY_FOOD_MAX)
333 set_food(caster_ptr, dam >= PY_FOOD_MAX ? PY_FOOD_MAX - 1 : dam);
340 if (name) return _("反魂の術", "Animate dead");
341 if (desc) return _("周囲の死体や骨を生き返す。", "Resurrects nearby corpse and skeletons. And makes these your pets.");
346 animate_dead(0, caster_ptr->y, caster_ptr->x);
352 if (name) return _("抹殺", "Genocide");
353 if (desc) return _("指定した文字のモンスターを現在の階から消し去る。抵抗されると無効。",
354 "Eliminates an entire class of monster, exhausting you. Powerful or unique monsters may resist.");
357 int power = plev + 50;
359 if (info) return info_power(power);
363 symbol_genocide(caster_ptr, power, TRUE);
369 if (name) return _("狂戦士化", "Berserk");
370 if (desc) return _("狂戦士化し、恐怖を除去する。", "Gives bonus to hit and HP, immunity to fear for a while. But decreases AC.");
375 if (info) return info_duration(base, base);
379 (void)berserk(caster_ptr, base + randint1(base));
385 if (name) return _("悪霊召喚", "Invoke Spirits");
386 if (desc) return _("ランダムで様々な効果が起こる。", "Causes random effects.");
389 if (info) return KWD_RANDOM;
393 if (!get_aim_dir(&dir)) return NULL;
395 cast_invoke_spirits(caster_ptr, dir);
401 if (name) return _("暗黒の矢", "Dark Bolt");
402 if (desc) return _("暗黒のボルトもしくはビームを放つ。", "Fires a bolt or beam of darkness.");
405 DICE_NUMBER dice = 4 + (plev - 5) / 4;
408 if (info) return info_damage(dice, sides, 0);
412 if (!get_aim_dir(&dir)) return NULL;
414 fire_bolt_or_beam(beam_chance(), GF_DARK, dir, damroll(dice, sides));
420 if (name) return _("狂乱戦士", "Battle Frenzy");
421 if (desc) return _("狂戦士化し、恐怖を除去し、加速する。",
422 "Gives another bonus to hit and HP, immunity to fear for a while. Hastes you. But decreases AC.");
426 int sp_base = plev / 2;
427 int sp_sides = 20 + plev / 2;
429 if (info) return info_duration(b_base, b_base);
433 (void)berserk(caster_ptr, b_base + randint1(b_base));
434 set_fast(caster_ptr, randint1(sp_sides) + sp_base, FALSE);
440 if (name) return _("吸血の刃", "Vampiric Branding");
441 if (desc) return _("武器に吸血の属性をつける。", "Makes current weapon Vampiric.");
446 brand_weapon(caster_ptr, 4);
452 if (name) return _("吸血の連矢", "Vampiric Bolts");
453 if (desc) return _("3連射のボルトによりモンスター1体から生命力を吸いとる。吸いとった生命力によって体力が回復する。",
454 "Fires 3 bolts. Each of the bolts absorbs some HP from a monster and gives them to you.");
458 if (info) return format("%s3*%d", KWD_DAM, dam);
464 if (!get_aim_dir(&dir)) return NULL;
466 chg_virtue(caster_ptr, V_SACRIFICE, -1);
467 chg_virtue(caster_ptr, V_VITALITY, -1);
469 for (i = 0; i < 3; i++)
471 if (hypodynamic_bolt(dir, dam))
472 hp_player(caster_ptr, dam);
479 if (name) return _("死の言魂", "Nether Wave");
480 if (desc) return _("視界内の生命のあるモンスターにダメージを与える。", "Damages all living monsters in sight.");
483 DICE_SID sides = plev * 3;
485 if (info) return info_damage(1, sides, 0);
489 dispel_living(randint1(sides));
495 if (name) return _("暗黒の嵐", "Darkness Storm");
496 if (desc) return _("巨大な暗黒の球を放つ。", "Fires a huge ball of darkness.");
499 HIT_POINT dam = 100 + plev * 2;
502 if (info) return info_damage(0, 0, dam);
506 if (!get_aim_dir(&dir)) return NULL;
508 fire_ball(caster_ptr, GF_DARK, dir, dam, rad);
514 if (name) return _("死の光線", "Death Ray");
515 if (desc) return _("死の光線を放つ。", "Fires a beam of death.");
520 if (!get_aim_dir(&dir)) return NULL;
522 death_ray(dir, plev);
528 if (name) return _("死者召喚", "Raise the Dead");
529 if (desc) return _("1体のアンデッドを召喚する。", "Summons an undead monster.");
530 if (cast) cast_summon_undead(caster_ptr, (plev * 3) / 2);
534 if (name) return _("死者の秘伝", "Esoteria");
535 if (desc) return _("アイテムを1つ識別する。レベルが高いとアイテムの能力を完全に知ることができる。",
536 "Identifies an item. Or *identifies* an item at higher level.");
541 if (randint1(50) > plev)
543 if (!ident_spell(caster_ptr, FALSE)) return NULL;
547 if (!identify_fully(FALSE)) return NULL;
554 if (name) return _("吸血鬼変化", "Polymorph Vampire");
555 if (desc) return _("一定時間、吸血鬼に変化する。変化している間は本来の種族の能力を失い、代わりに吸血鬼としての能力を得る。",
556 "Mimic a vampire for a while. Loses abilities of original race and gets abilities as a vampire.");
559 int base = 10 + plev / 2;
561 if (info) return info_duration(base, base);
565 set_mimic(caster_ptr, base + randint1(base), MIMIC_VAMPIRE, FALSE);
571 if (name) return _("経験値復活", "Restore Life");
572 if (desc) return _("失った経験値を回復する。", "Restore lost experience.");
577 restore_level(caster_ptr);
583 if (name) return _("周辺抹殺", "Mass Genocide");
584 if (desc) return _("自分の周囲にいるモンスターを現在の階から消し去る。抵抗されると無効。",
585 "Eliminates all nearby monsters, exhausting you. Powerful or unique monsters may be able to resist.");
588 int power = plev + 50;
590 if (info) return info_power(power);
594 mass_genocide(caster_ptr, power, TRUE);
600 if (name) return _("地獄の劫火", "Hellfire");
601 if (desc) return _("邪悪な力を持つ宝珠を放つ。善良なモンスターには大きなダメージを与える。",
602 "Fires a powerful ball of evil power. Hurts good monsters greatly.");
608 if (info) return info_damage(0, 0, dam);
612 if (!get_aim_dir(&dir)) return NULL;
614 fire_ball(caster_ptr, GF_HELL_FIRE, dir, dam, rad);
615 take_hit(caster_ptr, DAMAGE_USELIFE, 20 + randint1(30), _("地獄の劫火の呪文を唱えた疲労", "the strain of casting Hellfire"), -1);
621 if (name) return _("幽体化", "Wraithform");
622 if (desc) return _("一定時間、壁を通り抜けることができ受けるダメージが軽減される幽体の状態に変身する。",
623 "Becomes wraith form which gives ability to pass walls and makes all damages half.");
628 if (info) return info_duration(base, base);
632 set_wraith_form(caster_ptr, randint1(base) + base, FALSE);