1 #include "realm/realm-death.h"
2 #include "cmd-action/cmd-spell.h"
3 #include "core/hp-mp-processor.h"
4 #include "effect/effect-characteristics.h"
5 #include "effect/effect-processor.h"
6 #include "player-info/avatar.h"
7 #include "player/digestion-processor.h"
8 #include "player/player-damage.h"
9 #include "player/player-race.h"
10 #include "player/player-realm.h"
11 #include "spell-kind/spells-charm.h"
12 #include "spell-kind/spells-detection.h"
13 #include "spell-kind/spells-genocide.h"
14 #include "spell-kind/spells-launcher.h"
15 #include "spell-kind/spells-neighbor.h"
16 #include "spell-kind/spells-perception.h"
17 #include "spell-kind/spells-sight.h"
18 #include "spell-kind/spells-specific-bolt.h"
19 #include "spell/spell-types.h"
20 #include "spell/spells-diceroll.h"
21 #include "spell/spells-object.h"
22 #include "spell/spells-status.h"
23 #include "spell/spells-summon.h"
24 #include "status/buff-setter.h"
25 #include "status/element-resistance.h"
26 #include "status/experience.h"
27 #include "status/shape-changer.h"
28 #include "target/target-getter.h"
31 * @brief 暗黒領域魔法の各処理を行う
32 * @param caster_ptr プレーヤーへの参照ポインタ
34 * @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST)
35 * @return SPELL_NAME / SPELL_DESC / SPELL_INFO 時には文字列ポインタを返す。SPELL_CAST時はNULL文字列を返す。
37 concptr do_death_spell(player_type *caster_ptr, SPELL_IDX spell, spell_type mode)
39 bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
40 bool desc = (mode == SPELL_DESC) ? TRUE : FALSE;
41 bool info = (mode == SPELL_INFO) ? TRUE : FALSE;
42 bool cast = (mode == SPELL_CAST) ? TRUE : FALSE;
45 PLAYER_LEVEL plev = caster_ptr->lev;
50 return _("無生命感知", "Detect Unlife");
52 return _("近くの生命のないモンスターを感知する。", "Detects all nonliving monsters in your vicinity.");
55 POSITION rad = DETECT_RAD_DEFAULT;
58 return info_radius(rad);
61 detect_monsters_nonliving(caster_ptr, rad);
68 return _("呪殺弾", "Malediction");
70 return _("ごく小さな邪悪な力を持つボールを放つ。善良なモンスターには大きなダメージを与える。",
71 "Fires a tiny ball of evil power which hurts good monsters greatly.");
74 DICE_NUMBER dice = 3 + (plev - 1) / 5;
79 return info_damage(dice, sides, 0);
82 if (!get_aim_dir(caster_ptr, &dir))
86 * A radius-0 ball may (1) be aimed at
87 * objects etc., and will affect them;
88 * (2) may be aimed at ANY visible
89 * monster, unlike a 'bolt' which must
90 * travel to the monster.
93 fire_ball(caster_ptr, GF_HELL_FIRE, dir, damroll(dice, sides), rad);
96 /* Special effect first */
97 int effect = randint1(1000);
100 fire_ball_hide(caster_ptr, GF_DEATH_RAY, dir, plev * 200, 0);
101 else if (effect < 500)
102 fire_ball_hide(caster_ptr, GF_TURN_ALL, dir, plev, 0);
103 else if (effect < 800)
104 fire_ball_hide(caster_ptr, GF_OLD_CONF, dir, plev, 0);
106 fire_ball_hide(caster_ptr, GF_STUN, dir, plev, 0);
114 return _("邪悪感知", "Detect Evil");
116 return _("近くの邪悪なモンスターを感知する。", "Detects all evil monsters in your vicinity.");
119 POSITION rad = DETECT_RAD_DEFAULT;
122 return info_radius(rad);
125 detect_monsters_evil(caster_ptr, rad);
132 return _("悪臭雲", "Stinking Cloud");
134 return _("毒の球を放つ。", "Fires a ball of poison.");
137 HIT_POINT dam = 10 + plev / 2;
141 return info_damage(0, 0, dam);
144 if (!get_aim_dir(caster_ptr, &dir))
147 fire_ball(caster_ptr, GF_POIS, dir, dam, rad);
154 return _("黒い眠り", "Black Sleep");
156 return _("1体のモンスターを眠らせる。抵抗されると無効。", "Attempts to put a monster to sleep.");
162 return info_power(power);
165 if (!get_aim_dir(caster_ptr, &dir))
168 sleep_monster(caster_ptr, dir, plev);
175 return _("耐毒", "Resist Poison");
177 return _("一定時間、毒への耐性を得る。装備による耐性に累積する。",
178 "Gives resistance to poison. This resistance can be added to that from equipment for more powerful resistance.");
184 return info_duration(base, base);
187 set_oppose_pois(caster_ptr, randint1(base) + base, FALSE);
194 return _("恐慌", "Horrify");
196 return _("モンスター1体を恐怖させ、朦朧させる。抵抗されると無効。", "Attempts to scare and stun a monster.");
202 return info_power(power);
205 if (!get_aim_dir(caster_ptr, &dir))
208 fear_monster(caster_ptr, dir, plev);
209 stun_monster(caster_ptr, dir, plev);
216 return _("アンデッド従属", "Enslave Undead");
218 return _("アンデッド1体を魅了する。抵抗されると無効。", "Attempts to charm an undead monster.");
224 return info_power(power);
227 if (!get_aim_dir(caster_ptr, &dir))
230 control_one_undead(caster_ptr, dir, plev);
237 return _("エントロピーの球", "Orb of Entropy");
240 "生命のある者のHPと最大HP双方にダメージを与える効果のある球を放つ。", "Fires a ball which damages to both HP and MaxHP of living monsters.");
243 DICE_NUMBER dice = 3;
245 POSITION rad = (plev < 30) ? 2 : 3;
248 if (is_wizard_class(caster_ptr))
249 base = plev + plev / 2;
251 base = plev + plev / 4;
254 return info_damage(dice, sides, base);
257 if (!get_aim_dir(caster_ptr, &dir))
260 fire_ball(caster_ptr, GF_HYPODYNAMIA, dir, damroll(dice, sides) + base, rad);
267 return _("地獄の矢", "Nether Bolt");
269 return _("地獄のボルトもしくはビームを放つ。", "Fires a bolt or beam of nether.");
272 DICE_NUMBER dice = 8 + (plev - 5) / 4;
276 return info_damage(dice, sides, 0);
279 if (!get_aim_dir(caster_ptr, &dir))
282 fire_bolt_or_beam(caster_ptr, beam_chance(caster_ptr), GF_NETHER, dir, damroll(dice, sides));
289 return _("殺戮雲", "Cloud kill");
291 return _("自分を中心とした毒の球を発生させる。", "Generates a ball of poison centered on you.");
294 HIT_POINT dam = (30 + plev) * 2;
295 POSITION rad = plev / 10 + 2;
298 return info_damage(0, 0, dam / 2);
301 project(caster_ptr, 0, rad, caster_ptr->y, caster_ptr->x, dam, GF_POIS, PROJECT_KILL | PROJECT_ITEM, -1);
308 return _("モンスター消滅", "Genocide One");
310 return _("モンスター1体を消し去る。経験値やアイテムは手に入らない。抵抗されると無効。", "Attempts to eradicate one monster.");
313 int power = plev + 50;
316 return info_power(power);
319 if (!get_aim_dir(caster_ptr, &dir))
322 fire_ball_hide(caster_ptr, GF_GENOCIDE, dir, power, 0);
329 return _("毒の刃", "Poison Branding");
331 return _("武器に毒の属性をつける。", "Makes current weapon poison branded.");
335 brand_weapon(caster_ptr, 3);
342 return _("吸血の矢", "Vampiric Bolt");
344 return _("ボルトによりモンスター1体から生命力を吸いとる。吸いとった生命力によって満腹度が上がる。",
345 "Fires a bolt which transfers HP from a monster to you. You will also gain nutritional sustenance from this.");
348 DICE_NUMBER dice = 1;
349 DICE_SID sides = plev * 2;
353 return info_damage(dice, sides, base);
356 HIT_POINT dam = base + damroll(dice, sides);
358 if (!get_aim_dir(caster_ptr, &dir))
361 if (hypodynamic_bolt(caster_ptr, dir, dam)) {
362 chg_virtue(caster_ptr, V_SACRIFICE, -1);
363 chg_virtue(caster_ptr, V_VITALITY, -1);
365 hp_player(caster_ptr, dam);
368 * Gain nutritional sustenance:
371 * A Food ration gives 5000
372 * food points (by contrast)
373 * Don't ever get more than
374 * "Full" this way But if we
375 * ARE Gorged, it won't cure
378 dam = caster_ptr->food + MIN(5000, 100 * dam);
380 /* Not gorged already */
381 if (caster_ptr->food < PY_FOOD_MAX)
382 set_food(caster_ptr, dam >= PY_FOOD_MAX ? PY_FOOD_MAX - 1 : dam);
390 return _("反魂の術", "Animate dead");
392 return _("周囲の死体や骨を生き返す。", "Resurrects nearby corpse and skeletons. And makes these your pets.");
396 animate_dead(caster_ptr, 0, caster_ptr->y, caster_ptr->x);
403 return _("抹殺", "Genocide");
405 return _("指定した文字のモンスターを現在の階から消し去る。抵抗されると無効。",
406 "Eliminates an entire class of monster, exhausting you. Powerful or unique monsters may resist.");
409 int power = plev + 50;
412 return info_power(power);
415 symbol_genocide(caster_ptr, power, TRUE);
422 return _("狂戦士化", "Berserk");
424 return _("狂戦士化し、恐怖を除去する。", "Gives a bonus to hit and HP, immunity to fear for a while. But decreases AC.");
430 return info_duration(base, base);
433 (void)berserk(caster_ptr, base + randint1(base));
440 return _("悪霊召喚", "Invoke Spirits");
442 return _("ランダムで様々な効果が起こる。", "Causes random effects.");
449 if (!get_aim_dir(caster_ptr, &dir))
452 cast_invoke_spirits(caster_ptr, dir);
459 return _("暗黒の矢", "Dark Bolt");
461 return _("暗黒のボルトもしくはビームを放つ。", "Fires a bolt or beam of darkness.");
464 DICE_NUMBER dice = 4 + (plev - 5) / 4;
468 return info_damage(dice, sides, 0);
471 if (!get_aim_dir(caster_ptr, &dir))
474 fire_bolt_or_beam(caster_ptr, beam_chance(caster_ptr), GF_DARK, dir, damroll(dice, sides));
481 return _("狂乱戦士", "Battle Frenzy");
483 return _("狂戦士化し、恐怖を除去し、加速する。", "Gives another bonus to hit and HP, immunity to fear for a while. Hastes you. But decreases AC.");
487 int sp_base = plev / 2;
488 int sp_sides = 20 + plev / 2;
491 return info_duration(b_base, b_base);
494 (void)berserk(caster_ptr, b_base + randint1(b_base));
495 set_fast(caster_ptr, randint1(sp_sides) + sp_base, FALSE);
502 return _("吸血の刃", "Vampiric Branding");
504 return _("武器に吸血の属性をつける。", "Makes current weapon Vampiric.");
508 brand_weapon(caster_ptr, 4);
515 return _("吸血の連矢", "Vampiric Bolts");
517 return _("3連射のボルトによりモンスター1体から生命力を吸いとる。吸いとった生命力によって体力が回復する。",
518 "Fires 3 bolts. Each of the bolts absorbs some HP from a monster and gives them to you.");
523 return format("%s3*%d", KWD_DAM, dam);
528 if (!get_aim_dir(caster_ptr, &dir))
531 chg_virtue(caster_ptr, V_SACRIFICE, -1);
532 chg_virtue(caster_ptr, V_VITALITY, -1);
534 for (i = 0; i < 3; i++) {
535 if (hypodynamic_bolt(caster_ptr, dir, dam))
536 hp_player(caster_ptr, dam);
544 return _("死の言魂", "Nether Wave");
546 return _("視界内の生命のあるモンスターにダメージを与える。", "Damages all living monsters in sight.");
549 DICE_SID sides = plev * 3;
552 return info_damage(1, sides, 0);
555 dispel_living(caster_ptr, randint1(sides));
562 return _("暗黒の嵐", "Darkness Storm");
564 return _("巨大な暗黒の球を放つ。", "Fires a huge ball of darkness.");
567 HIT_POINT dam = 100 + plev * 2;
571 return info_damage(0, 0, dam);
574 if (!get_aim_dir(caster_ptr, &dir))
577 fire_ball(caster_ptr, GF_DARK, dir, dam, rad);
584 return _("死の光線", "Death Ray");
586 return _("死の光線を放つ。", "Fires a beam of death.");
590 if (!get_aim_dir(caster_ptr, &dir))
593 death_ray(caster_ptr, dir, plev);
600 return _("死者召喚", "Raise the Dead");
602 return _("1体のアンデッドを召喚する。", "Summons an undead monster.");
604 cast_summon_undead(caster_ptr, (plev * 3) / 2);
609 return _("死者の秘伝", "Secrets of the Dead");
611 return _("アイテムを1つ識別する。レベルが高いとアイテムの能力を完全に知ることができる。", "Identifies or, at higher levels, *identifies* an item.");
615 if (randint1(50) > plev) {
616 if (!ident_spell(caster_ptr, FALSE, 0))
619 if (!identify_fully(caster_ptr, FALSE, 0))
628 return _("吸血鬼変化", "Polymorph Vampire");
630 return _("一定時間、吸血鬼に変化する。変化している間は本来の種族の能力を失い、代わりに吸血鬼としての能力を得る。",
631 "Causes you to mimic a vampire for a while. You lose the abilities of your original race and get the abilities of a vampire for that time.");
634 int base = 10 + plev / 2;
637 return info_duration(base, base);
640 set_mimic(caster_ptr, base + randint1(base), MIMIC_VAMPIRE, FALSE);
647 return _("経験値復活", "Restore Life");
649 return _("失った経験値を回復する。", "Restores lost experience.");
653 restore_level(caster_ptr);
660 return _("周辺抹殺", "Mass Genocide");
662 return _("自分の周囲にいるモンスターを現在の階から消し去る。抵抗されると無効。",
663 "Eliminates all nearby monsters, exhausting you. Powerful or unique monsters may be able to resist.");
666 int power = plev + 50;
669 return info_power(power);
672 mass_genocide(caster_ptr, power, TRUE);
679 return _("地獄の劫火", "Hellfire");
682 "邪悪な力を持つ宝珠を放つ。善良なモンスターには大きなダメージを与える。", "Fires a powerful ball of evil power. Hurts good monsters greatly.");
689 return info_damage(0, 0, dam);
692 if (!get_aim_dir(caster_ptr, &dir))
695 fire_ball(caster_ptr, GF_HELL_FIRE, dir, dam, rad);
696 take_hit(caster_ptr, DAMAGE_USELIFE, 20 + randint1(30), _("地獄の劫火の呪文を唱えた疲労", "the strain of casting Hellfire"), -1);
703 return _("幽体化", "Wraithform");
705 return _("一定時間、壁を通り抜けることができ受けるダメージが軽減される幽体の状態に変身する。",
706 "Causes you to be ghost-like for a while. That reduces the damage you take and allows you to pass through walls.");
712 return info_duration(base, base);
715 set_wraith_form(caster_ptr, randint1(base) + base, FALSE);