3 #include "spells-summon.h"
4 #include "projection.h"
5 #include "spells-status.h"
10 * @brief 破邪領域魔法の各処理を行う
12 * @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST)
13 * @return SPELL_NAME / SPELL_DESC / SPELL_INFO 時には文字列ポインタを返す。SPELL_CAST時はNULL文字列を返す。
15 concptr do_crusade_spell(SPELL_IDX spell, BIT_FLAGS mode)
17 bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
18 bool desc = (mode == SPELL_DESC) ? TRUE : FALSE;
19 bool info = (mode == SPELL_INFO) ? TRUE : FALSE;
20 bool cast = (mode == SPELL_CAST) ? TRUE : FALSE;
23 PLAYER_LEVEL plev = p_ptr->lev;
28 if (name) return _("懲罰", "Punishment");
29 if (desc) return _("電撃のボルトもしくはビームを放つ。", "Fires a bolt or beam of lightning.");
31 DICE_NUMBER dice = 3 + (plev - 1) / 5;
33 if (info) return info_damage(dice, sides, 0);
36 if (!get_aim_dir(&dir)) return NULL;
37 fire_bolt_or_beam(beam_chance() - 10, GF_ELEC, dir, damroll(dice, sides));
43 if (name) return _("邪悪存在感知", "Detect Evil");
44 if (desc) return _("近くの邪悪なモンスターを感知する。", "Detects all evil monsters in your vicinity.");
46 POSITION rad = DETECT_RAD_DEFAULT;
47 if (info) return info_radius(rad);
50 detect_monsters_evil(rad);
56 if (name) return _("恐怖除去", "Remove Fear");
57 if (desc) return _("恐怖を取り除く。", "Removes fear.");
59 if (cast) set_afraid(0);
64 if (name) return _("威圧", "Scare Monster");
65 if (desc) return _("モンスター1体を恐怖させる。抵抗されると無効。", "Attempts to scare a monster.");
68 PLAYER_LEVEL power = plev;
69 if (info) return info_power(power);
72 if (!get_aim_dir(&dir)) return NULL;
73 fear_monster(dir, power);
79 if (name) return _("聖域", "Sanctuary");
80 if (desc) return _("隣接した全てのモンスターを眠らせる。抵抗されると無効。", "Attempts to put to sleep monsters in the adjacent squares.");
82 PLAYER_LEVEL power = plev;
83 if (info) return info_power(power);
84 if (cast) sleep_monsters_touch();
89 if (name) return _("入口", "Portal");
90 if (desc) return _("中距離のテレポートをする。", "Teleports you a medium distance.");
93 POSITION range = 25 + plev / 2;
94 if (info) return info_range(range);
95 if (cast) teleport_player(range, 0L);
100 if (name) return _("スターダスト", "Star Dust");
101 if (desc) return _("ターゲット付近に閃光のボルトを連射する。", "Fires many bolts of light near the target.");
104 DICE_NUMBER dice = 3 + (plev - 1) / 9;
106 if (info) return info_multi_damage_dice(dice, sides);
109 if (!get_aim_dir(&dir)) return NULL;
110 fire_blast(GF_LITE, dir, dice, sides, 10, 3);
116 if (name) return _("身体浄化", "Purify");
117 if (desc) return _("傷、毒、朦朧から全快する。", "Heals all cuts, poisons and being stunned.");
129 if (name) return _("邪悪飛ばし", "Scatter Evil");
130 if (desc) return _("邪悪なモンスター1体をテレポートさせる。抵抗されると無効。", "Attempts to teleport an evil monster away.");
133 int power = MAX_SIGHT * 5;
134 if (info) return info_power(power);
137 if (!get_aim_dir(&dir)) return NULL;
138 fire_ball(GF_AWAY_EVIL, dir, power, 0);
144 if (name) return _("聖なる光球", "Holy Orb");
145 if (desc) return _("聖なる力をもつ宝珠を放つ。邪悪なモンスターに対して大きなダメージを与えるが、善良なモンスターには効果がない。",
146 "Fires a ball with holy power. Hurts evil monsters greatly but doesn't affect good monsters.");
149 DICE_NUMBER dice = 3;
151 POSITION rad = (plev < 30) ? 2 : 3;
153 if (p_ptr->pclass == CLASS_PRIEST ||
154 p_ptr->pclass == CLASS_HIGH_MAGE ||
155 p_ptr->pclass == CLASS_SORCERER)
156 base = plev + plev / 2;
158 base = plev + plev / 4;
161 if (info) return info_damage(dice, sides, base);
165 if (!get_aim_dir(&dir)) return NULL;
167 fire_ball(GF_HOLY_FIRE, dir, damroll(dice, sides) + base, rad);
173 if (name) return _("悪魔払い", "Exorcism");
174 if (desc) return _("視界内の全てのアンデッド及び悪魔にダメージを与え、邪悪なモンスターを恐怖させる。",
175 "Damages all undead and demons in sight, and scares all evil monsters in sight.");
177 DICE_SID sides = plev;
179 if (info) return info_damage(1, sides, 0);
182 dispel_undead(randint1(sides));
183 dispel_demons(randint1(sides));
190 if (name) return _("解呪", "Remove Curse");
191 if (desc) return _("アイテムにかかった弱い呪いを解除する。", "Removes normal curses from equipped items.");
193 if (cast) (void)remove_curse();
198 if (name) return _("透明視認", "Sense Unseen");
199 if (desc) return _("一定時間、透明なものが見えるようになる。", "Gives see invisible for a while.");
204 if (info) return info_duration(base, base);
208 set_tim_invis(randint1(base) + base, FALSE);
214 if (name) return _("対邪悪結界", "Protection from Evil");
215 if (desc) return _("邪悪なモンスターの攻撃を防ぐバリアを張る。", "Gives aura which protects you from evil monster's physical attack.");
219 DICE_SID sides = 3 * plev;
221 if (info) return info_duration(base, sides);
225 set_protevil(randint1(sides) + base, FALSE);
231 if (name) return _("裁きの雷", "Judgment Thunder");
232 if (desc) return _("強力な電撃のボルトを放つ。", "Fires a powerful bolt of lightning.");
235 HIT_POINT dam = plev * 5;
237 if (info) return info_damage(0, 0, dam);
241 if (!get_aim_dir(&dir)) return NULL;
242 fire_bolt(GF_ELEC, dir, dam);
248 if (name) return _("聖なる御言葉", "Holy Word");
249 if (desc) return _("視界内の邪悪な存在に大きなダメージを与え、体力を回復し、毒、恐怖、朦朧状態、負傷から全快する。",
250 "Damages all evil monsters in sight, heals HP somewhat and completely cures fear, poisons, cuts and being stunned.");
253 int dam_sides = plev * 6;
256 if (info) return format(_("損:1d%d/回%d", "dam:d%d/h%d"), dam_sides, heal);
259 dispel_evil(randint1(dam_sides));
270 if (name) return _("開かれた道", "Unbarring Ways");
271 if (desc) return _("一直線上の全ての罠と扉を破壊する。", "Fires a beam which destroy traps and doors.");
276 if (!get_aim_dir(&dir)) return NULL;
284 if (name) return _("封魔", "Arrest");
285 if (desc) return _("邪悪なモンスターの動きを止める。", "Attempts to paralyze an evil monster.");
288 int power = plev * 2;
290 if (info) return info_power(power);
294 if (!get_aim_dir(&dir)) return NULL;
301 if (name) return _("聖なるオーラ", "Holy Aura");
302 if (desc) return _("一定時間、邪悪なモンスターを傷つける聖なるオーラを得る。",
303 "Gives aura of holy power that injures evil monsters which attacked you for a while.");
308 if (info) return info_duration(base, base);
312 set_tim_sh_holy(randint1(base) + base, FALSE);
318 if (name) return _("アンデッド&悪魔退散", "Dispel Undead & Demons");
319 if (desc) return _("視界内の全てのアンデッド及び悪魔にダメージを与える。", "Damages all undead and demons in sight.");
322 DICE_SID sides = plev * 4;
324 if (info) return info_damage(1, sides, 0);
328 dispel_undead(randint1(sides));
329 dispel_demons(randint1(sides));
335 if (name) return _("邪悪退散", "Dispel Evil");
336 if (desc) return _("視界内の全ての邪悪なモンスターにダメージを与える。", "Damages all evil monsters in sight.");
339 DICE_SID sides = plev * 4;
341 if (info) return info_damage(1, sides, 0);
345 dispel_evil(randint1(sides));
351 if (name) return _("聖なる刃", "Holy Blade");
352 if (desc) return _("通常の武器に滅邪の属性をつける。", "Makes current weapon especially deadly against evil monsters.");
363 if (name) return _("スターバースト", "Star Burst");
364 if (desc) return _("巨大な閃光の球を放つ。", "Fires a huge ball of powerful light.");
367 HIT_POINT dam = 100 + plev * 2;
370 if (info) return info_damage(0, 0, dam);
374 if (!get_aim_dir(&dir)) return NULL;
376 fire_ball(GF_LITE, dir, dam, rad);
382 if (name) return _("天使召喚", "Summon Angel");
383 if (desc) return _("天使を1体召喚する。", "Summons an angel.");
388 bool pet = !one_in_(3);
391 if (pet) flg |= PM_FORCE_PET;
392 else flg |= PM_NO_PET;
393 if (!(pet && (plev < 50))) flg |= PM_ALLOW_GROUP;
395 if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, (plev * 3) / 2, SUMMON_ANGEL, flg, '\0'))
399 msg_print(_("「ご用でございますか、ご主人様」", "'What is thy bidding... Master?'"));
403 msg_print(_("「我は汝の下僕にあらず! 悪行者よ、悔い改めよ!」", "Mortal! Repent of thy impiousness."));
411 if (name) return _("士気高揚", "Heroism");
412 if (desc) return _("一定時間、ヒーロー気分になる。", "Removes fear. Gives a bonus to hit for a while. Heals you for 10 HP.");
417 if (info) return info_duration(base, base);
427 if (name) return _("呪い退散", "Dispel Curse");
428 if (desc) return _("アイテムにかかった強力な呪いを解除する。", "Removes normal and heavy curse from equipped items.");
431 if (cast) (void)remove_all_curse();
436 if (name) return _("邪悪追放", "Banish Evil");
437 if (desc) return _("視界内の全ての邪悪なモンスターをテレポートさせる。抵抗されると無効。",
438 "Teleports all evil monsters in sight away unless resisted.");
443 if (info) return info_power(power);
447 if (banish_evil(power))
449 msg_print(_("神聖な力が邪悪を打ち払った!", "The holy power banishes evil!"));
456 if (name) return _("ハルマゲドン", "Armageddon");
457 if (desc) return _("周辺のアイテム、モンスター、地形を破壊する。", "Destroys everything in nearby area.");
465 destroy_area(p_ptr->y, p_ptr->x, base + randint1(sides), FALSE);
471 if (name) return _("目には目を", "An Eye for an Eye");
472 if (desc) return _("一定時間、自分がダメージを受けたときに攻撃を行ったモンスターに対して同等のダメージを与える。",
473 "Gives special aura for a while. When you are attacked by a monster, the monster is injured with same amount of damage as you took.");
478 if (info) return info_duration(base, base);
482 set_tim_eyeeye(randint1(base) + base, FALSE);
488 if (name) return _("神の怒り", "Wrath of the God");
489 if (desc) return _("ターゲットの周囲に分解の球を多数落とす。", "Drops many balls of disintegration near the target.");
492 HIT_POINT dam = plev * 3 + 25;
495 if (info) return info_multi_damage(dam);
499 if (!cast_wrath_of_the_god(dam, rad)) return NULL;
505 if (name) return _("神威", "Divine Intervention");
506 if (desc) return _("隣接するモンスターに聖なるダメージを与え、視界内のモンスターにダメージ、減速、朦朧、混乱、恐怖、眠りを与える。さらに体力を回復する。",
507 "Damages all adjacent monsters with holy power. Damages and attempt to slow, stun, confuse, scare and freeze all monsters in sight. And heals HP.");
510 int b_dam = plev * 11;
511 int d_dam = plev * 4;
513 int power = plev * 4;
515 if (info) return format(_("回%d/損%d+%d", "h%d/dm%d+%d"), heal, d_dam, b_dam / 2);
518 project(0, 1, p_ptr->y, p_ptr->x, b_dam, GF_HOLY_FIRE, PROJECT_KILL, -1);
519 dispel_monsters(d_dam);
521 stun_monsters(power);
522 confuse_monsters(power);
523 turn_monsters(power);
524 stasis_monsters(power);
531 if (name) return _("聖戦", "Crusade");
532 if (desc) return _("視界内の善良なモンスターをペットにしようとし、ならなかった場合及び善良でないモンスターを恐怖させる。さらに多数の加速された騎士を召喚し、ヒーロー、祝福、加速、対邪悪結界を得る。",
533 "Attempts to charm all good monsters in sight and scares all non-charmed monsters. Summons a great number of knights. Gives heroism, bless, speed and protection from evil to the caster.");
539 int sp_sides = 20 + plev;
544 for (i = 0; i < 12; i++)
547 POSITION my = 0, mx = 0;
551 scatter(&my, &mx, p_ptr->y, p_ptr->x, 4, 0);
553 /* Require empty grids */
554 if (cave_empty_bold2(my, mx)) break;
556 if (attempt < 0) continue;
557 summon_specific(-1, my, mx, plev, SUMMON_KNIGHTS, (PM_ALLOW_GROUP | PM_FORCE_PET | PM_HASTE), '\0');
559 set_hero(randint1(base) + base, FALSE);
560 set_blessed(randint1(base) + base, FALSE);
561 set_fast(randint1(sp_sides) + sp_base, FALSE);
562 set_protevil(randint1(base) + base, FALSE);