5 #include "player-class.h"
8 #include "spells-summon.h"
9 #include "spells-floor.h"
10 #include "spells-status.h"
11 #include "spells-object.h"
12 #include "player-effects.h"
13 #include "player-race.h"
14 #include "player-damage.h"
15 #include "targeting.h"
18 * @brief 悪魔領域魔法の各処理を行う
20 * @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST)
21 * @return SPELL_NAME / SPELL_DESC / SPELL_INFO 時には文字列ポインタを返す。SPELL_CAST時はNULL文字列を返す。
23 concptr do_daemon_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mode)
25 bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
26 bool desc = (mode == SPELL_DESC) ? TRUE : FALSE;
27 bool info = (mode == SPELL_INFO) ? TRUE : FALSE;
28 bool cast = (mode == SPELL_CAST) ? TRUE : FALSE;
31 PLAYER_LEVEL plev = caster_ptr->lev;
36 if (name) return _("マジック・ミサイル", "Magic Missile");
37 if (desc) return _("弱い魔法の矢を放つ。", "Fires a weak bolt of magic.");
40 DICE_NUMBER dice = 3 + (plev - 1) / 5;
43 if (info) return info_damage(dice, sides, 0);
47 if (!get_aim_dir(&dir)) return NULL;
49 fire_bolt_or_beam(beam_chance() - 10, GF_MISSILE, dir, damroll(dice, sides));
55 if (name) return _("無生命感知", "Detect Unlife");
56 if (desc) return _("近くの生命のないモンスターを感知する。", "Detects all nonliving monsters in your vicinity.");
59 POSITION rad = DETECT_RAD_DEFAULT;
61 if (info) return info_radius(rad);
65 detect_monsters_nonliving(rad);
71 if (name) return _("邪なる祝福", "Evil Bless");
72 if (desc) return _("一定時間、命中率とACにボーナスを得る。", "Gives bonus to hit and AC for a few turns.");
77 if (info) return info_duration(base, base);
81 set_blessed(caster_ptr, randint1(base) + base, FALSE);
87 if (name) return _("耐火炎", "Resist Fire");
88 if (desc) return _("一定時間、炎への耐性を得る。装備による耐性に累積する。",
89 "Gives resistance to fire, cold and electricity for a while. These resistances can be added to which from equipment for more powerful resistances.");
94 if (info) return info_duration(base, base);
98 set_oppose_fire(caster_ptr, randint1(base) + base, FALSE);
104 if (name) return _("恐慌", "Horrify");
105 if (desc) return _("モンスター1体を恐怖させ、朦朧させる。抵抗されると無効。", "Attempts to scare and stun a monster.");
108 PLAYER_LEVEL power = plev;
110 if (info) return info_power(power);
114 if (!get_aim_dir(&dir)) return NULL;
116 fear_monster(dir, power);
117 stun_monster(dir, power);
123 if (name) return _("地獄の矢", "Nether Bolt");
124 if (desc) return _("地獄のボルトもしくはビームを放つ。", "Fires a bolt or beam of nether.");
127 DICE_NUMBER dice = 6 + (plev - 5) / 4;
130 if (info) return info_damage(dice, sides, 0);
134 if (!get_aim_dir(&dir)) return NULL;
136 fire_bolt_or_beam(beam_chance(), GF_NETHER, dir, damroll(dice, sides));
142 if (name) return _("古代の死霊召喚", "Summon Manes");
143 if (desc) return _("古代の死霊を召喚する。", "Summons a manes.");
148 if (!summon_specific(-1, caster_ptr->y, caster_ptr->x, (plev * 3) / 2, SUMMON_MANES, (PM_ALLOW_GROUP | PM_FORCE_PET)))
150 msg_print(_("古代の死霊は現れなかった。", "No Manes arrive."));
157 if (name) return _("地獄の焔", "Hellish Flame");
158 if (desc) return _("邪悪な力を持つボールを放つ。善良なモンスターには大きなダメージを与える。",
159 "Fires a ball of evil power. Hurts good monsters greatly.");
162 DICE_NUMBER dice = 3;
164 POSITION rad = (plev < 30) ? 2 : 3;
167 if (IS_WIZARD_CLASS(caster_ptr))
168 base = plev + plev / 2;
170 base = plev + plev / 4;
173 if (info) return info_damage(dice, sides, base);
177 if (!get_aim_dir(&dir)) return NULL;
179 fire_ball(GF_HELL_FIRE, dir, damroll(dice, sides) + base, rad);
185 if (name) return _("デーモン支配", "Dominate Demon");
186 if (desc) return _("悪魔1体を魅了する。抵抗されると無効", "Attempts to charm a demon.");
191 if (info) return info_power(power);
195 if (!get_aim_dir(&dir)) return NULL;
197 control_one_demon(dir, plev);
203 if (name) return _("ビジョン", "Vision");
204 if (desc) return _("周辺の地形を感知する。", "Maps nearby area.");
207 POSITION rad = DETECT_RAD_MAP;
209 if (info) return info_radius(rad);
219 if (name) return _("耐地獄", "Resist Nether");
220 if (desc) return _("一定時間、地獄への耐性を得る。", "Gives resistance to nether for a while.");
225 if (info) return info_duration(base, base);
229 set_tim_res_nether(caster_ptr, randint1(base) + base, FALSE);
235 if (name) return _("プラズマ・ボルト", "Plasma bolt");
236 if (desc) return _("プラズマのボルトもしくはビームを放つ。", "Fires a bolt or beam of plasma.");
239 DICE_NUMBER dice = 11 + (plev - 5) / 4;
242 if (info) return info_damage(dice, sides, 0);
246 if (!get_aim_dir(&dir)) return NULL;
248 fire_bolt_or_beam(beam_chance(), GF_PLASMA, dir, damroll(dice, sides));
254 if (name) return _("ファイア・ボール", "Fire Ball");
255 if (desc) return _("炎の球を放つ。", "Fires a ball of fire.");
258 HIT_POINT dam = plev + 55;
261 if (info) return info_damage(0, 0, dam);
265 if (!get_aim_dir(&dir)) return NULL;
267 fire_ball(GF_FIRE, dir, dam, rad);
273 if (name) return _("炎の刃", "Fire Branding");
274 if (desc) return _("武器に炎の属性をつける。", "Makes current weapon fire branded.");
279 brand_weapon(caster_ptr, 1);
285 if (name) return _("地獄球", "Nether Ball");
286 if (desc) return _("大きな地獄の球を放つ。", "Fires a huge ball of nether.");
289 HIT_POINT dam = plev * 3 / 2 + 100;
290 POSITION rad = plev / 20 + 2;
292 if (info) return info_damage(0, 0, dam);
296 if (!get_aim_dir(&dir)) return NULL;
298 fire_ball(GF_NETHER, dir, dam, rad);
304 if (name) return _("デーモン召喚", "Summon Demon");
305 if (desc) return _("悪魔1体を召喚する。", "Summons a demon.");
310 cast_summon_demon(caster_ptr, plev * 2 / 3 + randint1(plev / 2));
316 if (name) return _("悪魔の目", "Devilish Eye");
317 if (desc) return _("一定時間、テレパシー能力を得る。", "Gives telepathy for a while.");
323 if (info) return info_duration(base, sides);
327 set_tim_esp(caster_ptr, randint1(sides) + base, FALSE);
333 if (name) return _("悪魔のクローク", "Devil Cloak");
334 if (desc) return _("恐怖を取り除き、一定時間、炎と冷気の耐性、炎のオーラを得る。耐性は装備による耐性に累積する。",
335 "Removes fear. Gives resistance to fire and cold, and aura of fire. These resistances can be added to which from equipment for more powerful resistances.");
338 TIME_EFFECT base = 20;
340 if (info) return info_duration(base, base);
344 TIME_EFFECT dur = randint1(base) + base;
346 set_oppose_fire(caster_ptr, dur, FALSE);
347 set_oppose_cold(caster_ptr, dur, FALSE);
348 set_tim_sh_fire(caster_ptr, dur, FALSE);
349 set_afraid(caster_ptr, 0);
356 if (name) return _("溶岩流", "The Flow of Lava");
357 if (desc) return _("自分を中心とした炎の球を作り出し、床を溶岩に変える。",
358 "Generates a ball of fire centered on you which transforms floors to magma.");
361 HIT_POINT dam = (55 + plev) * 2;
364 if (info) return info_damage(0, 0, dam / 2);
368 fire_ball(GF_FIRE, 0, dam, rad);
369 fire_ball_hide(GF_LAVA_FLOW, 0, 2 + randint1(2), rad);
375 if (name) return _("プラズマ球", "Plasma Ball");
376 if (desc) return _("プラズマの球を放つ。", "Fires a ball of plasma.");
379 HIT_POINT dam = plev * 3 / 2 + 80;
380 POSITION rad = 2 + plev / 40;
382 if (info) return info_damage(0, 0, dam);
386 if (!get_aim_dir(&dir)) return NULL;
388 fire_ball(GF_PLASMA, dir, dam, rad);
394 if (name) return _("悪魔変化", "Polymorph Demon");
395 if (desc) return _("一定時間、悪魔に変化する。変化している間は本来の種族の能力を失い、代わりに悪魔としての能力を得る。",
396 "Mimic a demon for a while. Loses abilities of original race and gets abilities as a demon.");
399 int base = 10 + plev / 2;
401 if (info) return info_duration(base, base);
405 set_mimic(caster_ptr, base + randint1(base), MIMIC_DEMON, FALSE);
411 if (name) return _("地獄の波動", "Nather Wave");
412 if (desc) return _("視界内の全てのモンスターにダメージを与える。善良なモンスターに特に大きなダメージを与える。",
413 "Damages all monsters in sight. Hurts good monsters greatly.");
416 int sides1 = plev * 2;
417 int sides2 = plev * 2;
419 if (info) return format("%sd%d+d%d", KWD_DAM, sides1, sides2);
423 dispel_monsters(randint1(sides1));
424 dispel_good(randint1(sides2));
430 if (name) return _("サキュバスの接吻", "Kiss of Succubus");
431 if (desc) return _("因果混乱の球を放つ。", "Fires a ball of nexus.");
434 HIT_POINT dam = 100 + plev * 2;
437 if (info) return info_damage(0, 0, dam);
441 if (!get_aim_dir(&dir)) return NULL;
442 fire_ball(GF_NEXUS, dir, dam, rad);
448 if (name) return _("破滅の手", "Doom Hand");
449 if (desc) return _("破滅の手を放つ。食らったモンスターはそのときのHPの半分前後のダメージを受ける。", "Attempts to make a monster's HP almost half.");
454 if (!get_aim_dir(&dir))
457 msg_print(_("<破滅の手>を放った!", "You invoke the Hand of Doom!"));
459 fire_ball_hide(GF_HAND_DOOM, dir, plev * 2, 0);
465 if (name) return _("士気高揚", "Raise the Morale");
466 if (desc) return _("一定時間、ヒーロー気分になる。", "Removes fear, and gives bonus to hit and 10 more HP for a while.");
470 if (info) return info_duration(base, base);
471 if (cast)heroism(p_ptr, base);
476 if (name) return _("不滅の肉体", "Immortal Body");
477 if (desc) return _("一定時間、時間逆転への耐性を得る。", "Gives resistance to time for a while.");
482 if (info) return info_duration(base, base);
486 set_tim_res_time(caster_ptr, randint1(base) + base, FALSE);
492 if (name) return _("狂気の円環", "Insanity Circle");
493 if (desc) return _("自分を中心としたカオスの球、混乱の球を発生させ、近くのモンスターを魅了する。",
494 "Generate balls of chaos, confusion and charm centered on you.");
497 HIT_POINT dam = 50 + plev;
498 int power = 20 + plev;
499 POSITION rad = 3 + plev / 20;
501 if (info) return format("%s%d+%d", KWD_DAM, dam / 2, dam / 2);
505 fire_ball(GF_CHAOS, 0, dam, rad);
506 fire_ball(GF_CONFUSION, 0, dam, rad);
507 fire_ball(GF_CHARM, 0, power, rad);
513 if (name) return _("ペット爆破", "Explode Pets");
514 if (desc) return _("全てのペットを強制的に爆破させる。", "Makes all pets explode.");
525 if (name) return _("グレーターデーモン召喚", "Summon Greater Demon");
526 if (desc) return _("上級デーモンを召喚する。召喚するには人間('p','h','t'で表されるモンスター)の死体を捧げなければならない。",
527 "Summons greater demon. It need to sacrifice a corpse of human ('p','h' or 't').");
532 if (!cast_summon_greater_demon()) return NULL;
538 if (name) return _("地獄嵐", "Nether Storm");
539 if (desc) return _("超巨大な地獄の球を放つ。", "Generate a huge ball of nether.");
542 HIT_POINT dam = plev * 15;
543 POSITION rad = plev / 5;
545 if (info) return info_damage(0, 0, dam);
549 if (!get_aim_dir(&dir)) return NULL;
551 fire_ball(GF_NETHER, dir, dam, rad);
557 if (name) return _("血の呪い", "Bloody Curse");
558 if (desc) return _("自分がダメージを受けることによって対象に呪いをかけ、ダメージを与え様々な効果を引き起こす。",
559 "Puts blood curse which damages and causes various effects on a monster. You also take damage.");
565 if (info) return info_damage(0, 0, dam);
569 if (!get_aim_dir(&dir)) return NULL;
571 fire_ball_hide(GF_BLOOD_CURSE, dir, dam, rad);
572 take_hit(caster_ptr, DAMAGE_USELIFE, 20 + randint1(30), _("血の呪い", "Blood curse"), -1);
578 if (name) return _("魔王変化", "Polymorph Demonlord");
579 if (desc) return _("悪魔の王に変化する。変化している間は本来の種族の能力を失い、代わりに悪魔の王としての能力を得、壁を破壊しながら歩く。",
580 "Mimic a demon lord for a while. Loses abilities of original race and gets great abilities as a demon lord. Even hard walls can't stop your walking.");
585 if (info) return info_duration(base, base);
589 set_mimic(caster_ptr, base + randint1(base), MIMIC_DEMON_LORD, FALSE);