1 #include "system/angband.h"
4 #include "world/world.h"
6 #include "effect/effect-characteristics.h"
7 #include "spell/spells-type.h"
8 #include "spell/spells-object.h"
9 #include "spell/spells-summon.h"
10 #include "spell/spells-status.h"
11 #include "spell/spells-floor.h"
12 #include "spell/spells-diceroll.h"
13 #include "player/player-class.h"
14 #include "player/player-effects.h"
15 #include "targeting.h"
16 #include "realm/realm-crusade.h"
17 #include "spell/process-effect.h"
18 #include "spell/spells2.h"
19 #include "spell/spells3.h"
22 * @brief 破邪領域魔法の各処理を行う
23 * @param caster_ptr プレーヤーへの参照ポインタ
25 * @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST)
26 * @return SPELL_NAME / SPELL_DESC / SPELL_INFO 時には文字列ポインタを返す。SPELL_CAST時はNULL文字列を返す。
28 concptr do_crusade_spell(player_type *caster_ptr, SPELL_IDX spell, spell_type mode)
30 bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
31 bool desc = (mode == SPELL_DESC) ? TRUE : FALSE;
32 bool info = (mode == SPELL_INFO) ? TRUE : FALSE;
33 bool cast = (mode == SPELL_CAST) ? TRUE : FALSE;
36 PLAYER_LEVEL plev = caster_ptr->lev;
41 if (name) return _("懲罰", "Punishment");
42 if (desc) return _("電撃のボルトもしくはビームを放つ。", "Fires a bolt or beam of lightning.");
44 DICE_NUMBER dice = 3 + (plev - 1) / 5;
46 if (info) return info_damage(dice, sides, 0);
49 if (!get_aim_dir(caster_ptr, &dir)) return NULL;
50 fire_bolt_or_beam(caster_ptr, beam_chance(caster_ptr) - 10, GF_ELEC, dir, damroll(dice, sides));
56 if (name) return _("邪悪存在感知", "Detect Evil");
57 if (desc) return _("近くの邪悪なモンスターを感知する。", "Detects all evil monsters in your vicinity.");
59 POSITION rad = DETECT_RAD_DEFAULT;
60 if (info) return info_radius(rad);
63 detect_monsters_evil(caster_ptr, rad);
69 if (name) return _("恐怖除去", "Remove Fear");
70 if (desc) return _("恐怖を取り除く。", "Removes fear.");
72 if (cast) set_afraid(caster_ptr, 0);
77 if (name) return _("威圧", "Scare Monster");
78 if (desc) return _("モンスター1体を恐怖させる。抵抗されると無効。", "Attempts to scare a monster.");
81 PLAYER_LEVEL power = plev;
82 if (info) return info_power(power);
85 if (!get_aim_dir(caster_ptr, &dir)) return NULL;
86 fear_monster(caster_ptr, dir, power);
92 if (name) return _("聖域", "Sanctuary");
93 if (desc) return _("隣接した全てのモンスターを眠らせる。抵抗されると無効。", "Attempts to put to sleep monsters in the adjacent squares.");
95 PLAYER_LEVEL power = plev;
96 if (info) return info_power(power);
97 if (cast) sleep_monsters_touch(caster_ptr);
102 if (name) return _("入口", "Portal");
103 if (desc) return _("中距離のテレポートをする。", "Teleports you a medium distance.");
106 POSITION range = 25 + plev / 2;
107 if (info) return info_range(range);
108 if (cast) teleport_player(caster_ptr, range, TELEPORT_SPONTANEOUS);
113 if (name) return _("スターダスト", "Star Dust");
114 if (desc) return _("ターゲット付近に閃光のボルトを連射する。", "Fires many bolts of light near the target.");
117 DICE_NUMBER dice = 3 + (plev - 1) / 9;
119 if (info) return info_multi_damage_dice(dice, sides);
122 if (!get_aim_dir(caster_ptr, &dir)) return NULL;
123 fire_blast(caster_ptr, GF_LITE, dir, dice, sides, 10, 3);
129 if (name) return _("身体浄化", "Purify");
130 if (desc) return _("傷、毒、朦朧から全快する。", "Heals all cuts, poisons and being stunned.");
134 set_cut(caster_ptr,0);
135 set_poisoned(caster_ptr, 0);
136 set_stun(caster_ptr, 0);
142 if (name) return _("邪悪飛ばし", "Scatter Evil");
143 if (desc) return _("邪悪なモンスター1体をテレポートさせる。抵抗されると無効。", "Attempts to teleport an evil monster away.");
146 int power = MAX_SIGHT * 5;
147 if (info) return info_power(power);
150 if (!get_aim_dir(caster_ptr, &dir)) return NULL;
151 fire_ball(caster_ptr, GF_AWAY_EVIL, dir, power, 0);
157 if (name) return _("聖なる光球", "Holy Orb");
158 if (desc) return _("聖なる力をもつ宝珠を放つ。邪悪なモンスターに対して大きなダメージを与えるが、善良なモンスターには効果がない。",
159 "Fires a ball with holy power. Hurts evil monsters greatly but doesn't affect good monsters.");
162 DICE_NUMBER dice = 3;
164 POSITION rad = (plev < 30) ? 2 : 3;
166 if (caster_ptr->pclass == CLASS_PRIEST ||
167 caster_ptr->pclass == CLASS_HIGH_MAGE ||
168 caster_ptr->pclass == CLASS_SORCERER)
169 base = plev + plev / 2;
171 base = plev + plev / 4;
174 if (info) return info_damage(dice, sides, base);
178 if (!get_aim_dir(caster_ptr, &dir)) return NULL;
180 fire_ball(caster_ptr, GF_HOLY_FIRE, dir, damroll(dice, sides) + base, rad);
186 if (name) return _("悪魔払い", "Exorcism");
187 if (desc) return _("視界内の全てのアンデッド及び悪魔にダメージを与え、邪悪なモンスターを恐怖させる。",
188 "Damages all undead and demons in sight, and scares all evil monsters in sight.");
190 DICE_SID sides = plev;
192 if (info) return info_damage(1, sides, 0);
195 dispel_undead(caster_ptr, randint1(sides));
196 dispel_demons(caster_ptr, randint1(sides));
197 turn_evil(caster_ptr, power);
203 if (name) return _("解呪", "Remove Curse");
204 if (desc) return _("アイテムにかかった弱い呪いを解除する。", "Removes normal curses from equipped items.");
206 if (cast) (void)remove_curse(caster_ptr);
211 if (name) return _("透明視認", "Sense Unseen");
212 if (desc) return _("一定時間、透明なものが見えるようになる。", "Gives see invisible for a while.");
217 if (info) return info_duration(base, base);
221 set_tim_invis(caster_ptr, randint1(base) + base, FALSE);
227 if (name) return _("対邪悪結界", "Protection from Evil");
228 if (desc) return _("邪悪なモンスターの攻撃を防ぐバリアを張る。", "Gives aura which protects you from evil monster's physical attack.");
232 DICE_SID sides = 3 * plev;
234 if (info) return info_duration(base, sides);
238 set_protevil(caster_ptr, randint1(sides) + base, FALSE);
244 if (name) return _("裁きの雷", "Judgment Thunder");
245 if (desc) return _("強力な電撃のボルトを放つ。", "Fires a powerful bolt of lightning.");
248 HIT_POINT dam = plev * 5;
250 if (info) return info_damage(0, 0, dam);
254 if (!get_aim_dir(caster_ptr, &dir)) return NULL;
255 fire_bolt(caster_ptr, GF_ELEC, dir, dam);
261 if (name) return _("聖なる御言葉", "Holy Word");
262 if (desc) return _("視界内の邪悪な存在に大きなダメージを与え、体力を回復し、毒、恐怖、朦朧状態、負傷から全快する。",
263 "Damages all evil monsters in sight, heals HP somewhat and completely cures fear, poisons, cuts and being stunned.");
266 int dam_sides = plev * 6;
269 if (info) return format(_("損:1d%d/回%d", "dam:d%d/h%d"), dam_sides, heal);
272 dispel_evil(caster_ptr, randint1(dam_sides));
273 hp_player(caster_ptr, heal);
274 set_afraid(caster_ptr, 0);
275 set_poisoned(caster_ptr, 0);
276 set_stun(caster_ptr, 0);
277 set_cut(caster_ptr,0);
283 if (name) return _("開かれた道", "Unbarring Ways");
284 if (desc) return _("一直線上の全ての罠と扉を破壊する。", "Fires a beam which destroy traps and doors.");
289 if (!get_aim_dir(caster_ptr, &dir)) return NULL;
291 destroy_door(caster_ptr, dir);
297 if (name) return _("封魔", "Arrest");
298 if (desc) return _("邪悪なモンスターの動きを止める。", "Attempts to paralyze an evil monster.");
301 int power = plev * 2;
303 if (info) return info_power(power);
307 if (!get_aim_dir(caster_ptr, &dir)) return NULL;
308 stasis_evil(caster_ptr, dir);
314 if (name) return _("聖なるオーラ", "Holy Aura");
315 if (desc) return _("一定時間、邪悪なモンスターを傷つける聖なるオーラを得る。",
316 "Gives aura of holy power that injures evil monsters which attacked you for a while.");
321 if (info) return info_duration(base, base);
325 set_tim_sh_holy(caster_ptr, randint1(base) + base, FALSE);
331 if (name) return _("アンデッド&悪魔退散", "Dispel Undead & Demons");
332 if (desc) return _("視界内の全てのアンデッド及び悪魔にダメージを与える。", "Damages all undead and demons in sight.");
335 DICE_SID sides = plev * 4;
337 if (info) return info_damage(1, sides, 0);
341 dispel_undead(caster_ptr, randint1(sides));
342 dispel_demons(caster_ptr, randint1(sides));
348 if (name) return _("邪悪退散", "Dispel Evil");
349 if (desc) return _("視界内の全ての邪悪なモンスターにダメージを与える。", "Damages all evil monsters in sight.");
352 DICE_SID sides = plev * 4;
354 if (info) return info_damage(1, sides, 0);
358 dispel_evil(caster_ptr, randint1(sides));
364 if (name) return _("聖なる刃", "Holy Blade");
365 if (desc) return _("通常の武器に滅邪の属性をつける。", "Makes current weapon especially deadly against evil monsters.");
370 brand_weapon(caster_ptr, 13);
376 if (name) return _("スターバースト", "Star Burst");
377 if (desc) return _("巨大な閃光の球を放つ。", "Fires a huge ball of powerful light.");
380 HIT_POINT dam = 100 + plev * 2;
383 if (info) return info_damage(0, 0, dam);
387 if (!get_aim_dir(caster_ptr, &dir)) return NULL;
389 fire_ball(caster_ptr, GF_LITE, dir, dam, rad);
395 if (name) return _("天使召喚", "Summon Angel");
396 if (desc) return _("天使を1体召喚する。", "Summons an angel.");
401 bool pet = !one_in_(3);
404 if (pet) flg |= PM_FORCE_PET;
405 else flg |= PM_NO_PET;
406 if (!(pet && (plev < 50))) flg |= PM_ALLOW_GROUP;
408 if (summon_specific(caster_ptr, (pet ? -1 : 0), caster_ptr->y, caster_ptr->x, (plev * 3) / 2, SUMMON_ANGEL, flg))
412 msg_print(_("「ご用でございますか、ご主人様」", "'What is thy bidding... Master?'"));
416 msg_print(_("「我は汝の下僕にあらず! 悪行者よ、悔い改めよ!」", "Mortal! Repent of thy impiousness."));
424 if (name) return _("士気高揚", "Heroism");
425 if (desc) return _("一定時間、ヒーロー気分になる。", "Removes fear. Gives a bonus to hit for a while. Heals you for 10 HP.");
430 if (info) return info_duration(base, base);
434 (void)heroism(caster_ptr, base);
440 if (name) return _("呪い退散", "Dispel Curse");
441 if (desc) return _("アイテムにかかった強力な呪いを解除する。", "Removes normal and heavy curse from equipped items.");
444 if (cast) (void)remove_all_curse(caster_ptr);
449 if (name) return _("邪悪追放", "Banish Evil");
450 if (desc) return _("視界内の全ての邪悪なモンスターをテレポートさせる。抵抗されると無効。",
451 "Teleports all evil monsters in sight away unless resisted.");
456 if (info) return info_power(power);
460 if (banish_evil(caster_ptr, power))
462 msg_print(_("神聖な力が邪悪を打ち払った!", "The holy power banishes evil!"));
469 if (name) return _("ハルマゲドン", "Armageddon");
470 if (desc) return _("周辺のアイテム、モンスター、地形を破壊する。", "Destroys everything in nearby area.");
478 destroy_area(caster_ptr, caster_ptr->y, caster_ptr->x, base + randint1(sides), FALSE);
484 if (name) return _("目には目を", "An Eye for an Eye");
485 if (desc) return _("一定時間、自分がダメージを受けたときに攻撃を行ったモンスターに対して同等のダメージを与える。",
486 "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.");
491 if (info) return info_duration(base, base);
495 set_tim_eyeeye(caster_ptr, randint1(base) + base, FALSE);
501 if (name) return _("神の怒り", "Wrath of the God");
502 if (desc) return _("ターゲットの周囲に分解の球を多数落とす。", "Drops many balls of disintegration near the target.");
505 HIT_POINT dam = plev * 3 + 25;
508 if (info) return info_multi_damage(dam);
512 if (!cast_wrath_of_the_god(caster_ptr, dam, rad)) return NULL;
518 if (name) return _("神威", "Divine Intervention");
519 if (desc) return _("隣接するモンスターに聖なるダメージを与え、視界内のモンスターにダメージ、減速、朦朧、混乱、恐怖、眠りを与える。さらに体力を回復する。",
520 "Damages all adjacent monsters with holy power. Damages and attempt to slow, stun, confuse, scare and freeze all monsters in sight. And heals HP.");
523 int b_dam = plev * 11;
524 int d_dam = plev * 4;
526 int power = plev * 4;
528 if (info) return format(_("回%d/損%d+%d", "h%d/dm%d+%d"), heal, d_dam, b_dam / 2);
531 project(caster_ptr, 0, 1, caster_ptr->y, caster_ptr->x, b_dam, GF_HOLY_FIRE, PROJECT_KILL, -1);
532 dispel_monsters(caster_ptr, d_dam);
533 slow_monsters(caster_ptr, plev);
534 stun_monsters(caster_ptr, power);
535 confuse_monsters(caster_ptr, power);
536 turn_monsters(caster_ptr, power);
537 stasis_monsters(caster_ptr, power);
538 hp_player(caster_ptr, heal);
544 if (name) return _("聖戦", "Crusade");
545 if (desc) return _("視界内の善良なモンスターをペットにしようとし、ならなかった場合及び善良でないモンスターを恐怖させる。さらに多数の加速された騎士を召喚し、ヒーロー、祝福、加速、対邪悪結界を得る。",
546 "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.");
552 int sp_sides = 20 + plev;
557 for (i = 0; i < 12; i++)
560 POSITION my = 0, mx = 0;
564 scatter(caster_ptr, &my, &mx, caster_ptr->y, caster_ptr->x, 4, 0);
566 /* Require empty grids */
567 if (is_cave_empty_bold2(caster_ptr, my, mx)) break;
569 if (attempt < 0) continue;
570 summon_specific(caster_ptr, -1, my, mx, plev, SUMMON_KNIGHTS, (PM_ALLOW_GROUP | PM_FORCE_PET | PM_HASTE));
572 set_hero(caster_ptr, randint1(base) + base, FALSE);
573 set_blessed(caster_ptr, randint1(base) + base, FALSE);
574 set_fast(caster_ptr, randint1(sp_sides) + sp_base, FALSE);
575 set_protevil(caster_ptr, randint1(base) + base, FALSE);
576 set_afraid(caster_ptr, 0);