1 #include "blue-magic/blue-magic-caster.h"
2 #include "blue-magic/blue-magic-util.h"
3 #include "blue-magic/learnt-info.h"
4 #include "core/hp-mp-processor.h"
5 #include "floor/cave.h"
6 #include "floor/floor.h"
8 #include "io/targeting.h"
9 #include "monster-floor/monster-summon.h"
10 #include "monster-floor/place-monster-types.h"
11 #include "monster-race/monster-race.h"
12 #include "monster-race/race-flags-resistance.h"
13 #include "monster-race/race-flags1.h"
14 #include "monster/monster-describer.h"
15 #include "monster/monster-info.h"
16 #include "monster/monster-status.h"
17 #include "mspell/mspell-damage-calculator.h"
18 #include "mspell/mspell-type.h"
19 #include "spell-kind/spells-launcher.h"
20 #include "spell-kind/spells-lite.h"
21 #include "spell-kind/spells-neighbor.h"
22 #include "spell-kind/spells-sight.h"
23 #include "spell-kind/spells-teleport.h"
24 #include "spell-kind/spells-world.h"
25 #include "spell/spell-types.h"
26 #include "spell/spells-status.h"
27 #include "spell/spells-summon.h"
28 #include "status/bad-status-setter.h"
29 #include "status/body-improvement.h"
30 #include "status/buff-setter.h"
31 #include "system/floor-type-definition.h"
32 #include "view/display-messages.h"
34 static bool cast_blue_dispel(player_type *caster_ptr)
36 if (!target_set(caster_ptr, TARGET_KILL))
39 MONSTER_IDX m_idx = caster_ptr->current_floor_ptr->grid_array[target_row][target_col].m_idx;
40 if ((m_idx == 0) || !player_has_los_bold(caster_ptr, target_row, target_col)
41 || !projectable(caster_ptr, caster_ptr->y, caster_ptr->x, target_row, target_col))
44 dispel_monster_status(caster_ptr, m_idx);
48 static bool cast_blue_rocket(player_type *caster_ptr, blue_magic_type *bm_ptr)
50 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
53 msg_print(_("ロケットを発射した。", "You fire a rocket."));
54 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_ROCKET), bm_ptr->plev, DAM_ROLL);
55 fire_rocket(caster_ptr, GF_ROCKET, bm_ptr->dir, bm_ptr->damage, 2);
59 static bool cast_blue_shoot(player_type *caster_ptr, blue_magic_type *bm_ptr)
61 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
64 msg_print(_("矢を放った。", "You fire an arrow."));
65 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_SHOOT), bm_ptr->plev, DAM_ROLL);
66 fire_bolt(caster_ptr, GF_ARROW, bm_ptr->dir, bm_ptr->damage);
70 static bool cast_blue_breath_acid(player_type *caster_ptr, blue_magic_type *bm_ptr)
72 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
75 msg_print(_("酸のブレスを吐いた。", "You breathe acid."));
76 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BR_ACID), bm_ptr->plev, DAM_ROLL);
77 fire_breath(caster_ptr, GF_ACID, bm_ptr->dir, bm_ptr->damage, (bm_ptr->plev > 40 ? 3 : 2));
81 static bool cast_blue_breath_elec(player_type *caster_ptr, blue_magic_type *bm_ptr)
83 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
86 msg_print(_("稲妻のブレスを吐いた。", "You breathe lightning."));
87 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BR_ELEC), bm_ptr->plev, DAM_ROLL);
88 fire_breath(caster_ptr, GF_ELEC, bm_ptr->dir, bm_ptr->damage, (bm_ptr->plev > 40 ? 3 : 2));
92 static bool cast_blue_breath_fire(player_type *caster_ptr, blue_magic_type *bm_ptr)
94 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
97 msg_print(_("火炎のブレスを吐いた。", "You breathe fire."));
98 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BR_FIRE), bm_ptr->plev, DAM_ROLL);
99 fire_breath(caster_ptr, GF_FIRE, bm_ptr->dir, bm_ptr->damage, (bm_ptr->plev > 40 ? 3 : 2));
103 static bool cast_blue_breath_cold(player_type *caster_ptr, blue_magic_type *bm_ptr)
105 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
108 msg_print(_("冷気のブレスを吐いた。", "You breathe frost."));
109 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BR_COLD), bm_ptr->plev, DAM_ROLL);
110 fire_breath(caster_ptr, GF_COLD, bm_ptr->dir, bm_ptr->damage, (bm_ptr->plev > 40 ? 3 : 2));
114 static bool cast_blue_breath_pois(player_type *caster_ptr, blue_magic_type *bm_ptr)
116 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
119 msg_print(_("ガスのブレスを吐いた。", "You breathe gas."));
120 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BR_POIS), bm_ptr->plev, DAM_ROLL);
121 fire_breath(caster_ptr, GF_POIS, bm_ptr->dir, bm_ptr->damage, (bm_ptr->plev > 40 ? 3 : 2));
125 static bool cast_blue_breath_nether(player_type *caster_ptr, blue_magic_type *bm_ptr)
127 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
130 msg_print(_("地獄のブレスを吐いた。", "You breathe nether."));
131 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BR_NETHER), bm_ptr->plev, DAM_ROLL);
132 fire_breath(caster_ptr, GF_NETHER, bm_ptr->dir, bm_ptr->damage, (bm_ptr->plev > 40 ? 3 : 2));
136 static bool cast_blue_breath_lite(player_type *caster_ptr, blue_magic_type *bm_ptr)
138 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
141 msg_print(_("閃光のブレスを吐いた。", "You breathe light."));
142 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BR_LITE), bm_ptr->plev, DAM_ROLL);
143 fire_breath(caster_ptr, GF_LITE, bm_ptr->dir, bm_ptr->damage, (bm_ptr->plev > 40 ? 3 : 2));
147 static bool cast_blue_breath_dark(player_type *caster_ptr, blue_magic_type *bm_ptr)
149 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
152 msg_print(_("暗黒のブレスを吐いた。", "You breathe darkness."));
153 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BR_DARK), bm_ptr->plev, DAM_ROLL);
154 fire_breath(caster_ptr, GF_DARK, bm_ptr->dir, bm_ptr->damage, (bm_ptr->plev > 40 ? 3 : 2));
158 static bool cast_blue_breath_conf(player_type *caster_ptr, blue_magic_type *bm_ptr)
160 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
163 msg_print(_("混乱のブレスを吐いた。", "You breathe confusion."));
164 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BR_CONF), bm_ptr->plev, DAM_ROLL);
165 fire_breath(caster_ptr, GF_CONFUSION, bm_ptr->dir, bm_ptr->damage, (bm_ptr->plev > 40 ? 3 : 2));
169 static bool cast_blue_breath_sound(player_type *caster_ptr, blue_magic_type *bm_ptr)
171 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
174 msg_print(_("轟音のブレスを吐いた。", "You breathe sound."));
175 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BR_SOUND), bm_ptr->plev, DAM_ROLL);
176 fire_breath(caster_ptr, GF_SOUND, bm_ptr->dir, bm_ptr->damage, (bm_ptr->plev > 40 ? 3 : 2));
180 static bool cast_blue_breath_chaos(player_type *caster_ptr, blue_magic_type *bm_ptr)
182 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
185 msg_print(_("カオスのブレスを吐いた。", "You breathe chaos."));
186 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BR_CHAOS), bm_ptr->plev, DAM_ROLL);
187 fire_breath(caster_ptr, GF_CHAOS, bm_ptr->dir, bm_ptr->damage, (bm_ptr->plev > 40 ? 3 : 2));
191 static bool cast_blue_breath_disenchant(player_type *caster_ptr, blue_magic_type *bm_ptr)
193 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
196 msg_print(_("劣化のブレスを吐いた。", "You breathe disenchantment."));
197 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BR_DISEN), bm_ptr->plev, DAM_ROLL);
198 fire_breath(caster_ptr, GF_DISENCHANT, bm_ptr->dir, bm_ptr->damage, (bm_ptr->plev > 40 ? 3 : 2));
202 static bool cast_blue_breath_nexus(player_type *caster_ptr, blue_magic_type *bm_ptr)
204 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
207 msg_print(_("因果混乱のブレスを吐いた。", "You breathe nexus."));
208 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BR_NEXUS), bm_ptr->plev, DAM_ROLL);
209 fire_breath(caster_ptr, GF_NEXUS, bm_ptr->dir, bm_ptr->damage, (bm_ptr->plev > 40 ? 3 : 2));
213 static bool cast_blue_breath_time(player_type *caster_ptr, blue_magic_type *bm_ptr)
215 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
218 msg_print(_("時間逆転のブレスを吐いた。", "You breathe time."));
219 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BR_TIME), bm_ptr->plev, DAM_ROLL);
220 fire_breath(caster_ptr, GF_TIME, bm_ptr->dir, bm_ptr->damage, (bm_ptr->plev > 40 ? 3 : 2));
224 static bool cast_blue_breath_inertia(player_type *caster_ptr, blue_magic_type *bm_ptr)
226 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
229 msg_print(_("遅鈍のブレスを吐いた。", "You breathe inertia."));
230 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BR_INERTIA), bm_ptr->plev, DAM_ROLL);
231 fire_breath(caster_ptr, GF_INERTIAL, bm_ptr->dir, bm_ptr->damage, (bm_ptr->plev > 40 ? 3 : 2));
235 static bool cast_blue_breath_gravity(player_type *caster_ptr, blue_magic_type *bm_ptr)
237 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
240 msg_print(_("重力のブレスを吐いた。", "You breathe gravity."));
241 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BR_GRAVITY), bm_ptr->plev, DAM_ROLL);
242 fire_breath(caster_ptr, GF_GRAVITY, bm_ptr->dir, bm_ptr->damage, (bm_ptr->plev > 40 ? 3 : 2));
246 static bool cast_blue_breath_shards(player_type *caster_ptr, blue_magic_type *bm_ptr)
248 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
251 msg_print(_("破片のブレスを吐いた。", "You breathe shards."));
252 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BR_SHARDS), bm_ptr->plev, DAM_ROLL);
253 fire_breath(caster_ptr, GF_SHARDS, bm_ptr->dir, bm_ptr->damage, (bm_ptr->plev > 40 ? 3 : 2));
257 static bool cast_blue_breath_plasma(player_type *caster_ptr, blue_magic_type *bm_ptr)
259 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
262 msg_print(_("プラズマのブレスを吐いた。", "You breathe plasma."));
263 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BR_PLASMA), bm_ptr->plev, DAM_ROLL);
264 fire_breath(caster_ptr, GF_PLASMA, bm_ptr->dir, bm_ptr->damage, (bm_ptr->plev > 40 ? 3 : 2));
268 static bool cast_blue_breath_force(player_type *caster_ptr, blue_magic_type *bm_ptr)
270 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
273 msg_print(_("フォースのブレスを吐いた。", "You breathe force."));
274 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BR_FORCE), bm_ptr->plev, DAM_ROLL);
275 fire_breath(caster_ptr, GF_FORCE, bm_ptr->dir, bm_ptr->damage, (bm_ptr->plev > 40 ? 3 : 2));
279 static bool cast_blue_breath_mana(player_type *caster_ptr, blue_magic_type *bm_ptr)
281 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
284 msg_print(_("魔力のブレスを吐いた。", "You breathe mana."));
285 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BR_MANA), bm_ptr->plev, DAM_ROLL);
286 fire_breath(caster_ptr, GF_MANA, bm_ptr->dir, bm_ptr->damage, (bm_ptr->plev > 40 ? 3 : 2));
292 * do_cmd_cast calls this function if the player's class is 'blue-mage'.
293 * @param spell 発動するモンスター攻撃のID
294 * @param success TRUEは成功時、FALSEは失敗時の処理を行う
295 * @return 処理を実行したらTRUE、キャンセルした場合FALSEを返す。
297 bool cast_learned_spell(player_type *caster_ptr, int spell, const bool success)
299 blue_magic_type tmp_bm;
300 blue_magic_type *bm_ptr = initialize_blue_magic_type(caster_ptr, &tmp_bm, success, get_pseudo_monstetr_level);
301 floor_type *floor_ptr = caster_ptr->current_floor_ptr;
304 msg_print(_("かん高い金切り声をあげた。", "You make a high pitched shriek."));
305 aggravate_monsters(caster_ptr, 0);
306 break; // 関数分割後に'return TRUE;' に差し替え
313 if (!cast_blue_dispel(caster_ptr))
318 if (!cast_blue_rocket(caster_ptr, bm_ptr))
323 if (!cast_blue_shoot(caster_ptr, bm_ptr))
328 if (!cast_blue_breath_acid(caster_ptr, bm_ptr))
333 if (!cast_blue_breath_elec(caster_ptr, bm_ptr))
338 if (!cast_blue_breath_fire(caster_ptr, bm_ptr))
343 if (!cast_blue_breath_cold(caster_ptr, bm_ptr))
348 if (!cast_blue_breath_pois(caster_ptr, bm_ptr))
353 if (!cast_blue_breath_nether(caster_ptr, bm_ptr))
358 if (!cast_blue_breath_lite(caster_ptr, bm_ptr))
363 if (!cast_blue_breath_dark(caster_ptr, bm_ptr))
368 if (!cast_blue_breath_conf(caster_ptr, bm_ptr))
373 if (!cast_blue_breath_sound(caster_ptr, bm_ptr))
378 if (!cast_blue_breath_chaos(caster_ptr, bm_ptr))
383 if (!cast_blue_breath_disenchant(caster_ptr, bm_ptr))
388 if (!cast_blue_breath_nexus(caster_ptr, bm_ptr))
393 if (!cast_blue_breath_time(caster_ptr, bm_ptr))
398 if (!cast_blue_breath_inertia(caster_ptr, bm_ptr))
403 if (!cast_blue_breath_gravity(caster_ptr, bm_ptr))
408 if (!cast_blue_breath_shards(caster_ptr, bm_ptr))
413 if (!cast_blue_breath_plasma(caster_ptr, bm_ptr))
418 if (!cast_blue_breath_force(caster_ptr, bm_ptr))
423 if (!cast_blue_breath_mana(caster_ptr, bm_ptr))
428 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
431 msg_print(_("放射能球を放った。", "You cast a ball of radiation."));
432 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BALL_NUKE), bm_ptr->plev, DAM_ROLL);
433 fire_ball(caster_ptr, GF_NUKE, bm_ptr->dir, bm_ptr->damage, 2);
436 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
439 msg_print(_("放射性廃棄物のブレスを吐いた。", "You breathe toxic waste."));
440 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BR_NUKE), bm_ptr->plev, DAM_ROLL);
441 fire_breath(caster_ptr, GF_NUKE, bm_ptr->dir, bm_ptr->damage, (bm_ptr->plev > 40 ? 3 : 2));
444 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
447 msg_print(_("純ログルスを放った。", "You invoke a raw Logrus."));
448 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BALL_CHAOS), bm_ptr->plev, DAM_ROLL);
449 fire_ball(caster_ptr, GF_CHAOS, bm_ptr->dir, bm_ptr->damage, 4);
452 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
455 msg_print(_("分解のブレスを吐いた。", "You breathe disintegration."));
456 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BR_DISI), bm_ptr->plev, DAM_ROLL);
457 fire_breath(caster_ptr, GF_DISINTEGRATE, bm_ptr->dir, bm_ptr->damage, (bm_ptr->plev > 40 ? 3 : 2));
460 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
463 msg_print(_("アシッド・ボールの呪文を唱えた。", "You cast an acid ball."));
464 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BALL_ACID), bm_ptr->plev, DAM_ROLL);
465 fire_ball(caster_ptr, GF_ACID, bm_ptr->dir, bm_ptr->damage, 2);
468 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
471 msg_print(_("サンダー・ボールの呪文を唱えた。", "You cast a lightning ball."));
472 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BALL_ELEC), bm_ptr->plev, DAM_ROLL);
473 fire_ball(caster_ptr, GF_ELEC, bm_ptr->dir, bm_ptr->damage, 2);
476 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
479 msg_print(_("ファイア・ボールの呪文を唱えた。", "You cast a fire ball."));
480 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BALL_FIRE), bm_ptr->plev, DAM_ROLL);
481 fire_ball(caster_ptr, GF_FIRE, bm_ptr->dir, bm_ptr->damage, 2);
484 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
487 msg_print(_("アイス・ボールの呪文を唱えた。", "You cast a frost ball."));
488 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BALL_COLD), bm_ptr->plev, DAM_ROLL);
489 fire_ball(caster_ptr, GF_COLD, bm_ptr->dir, bm_ptr->damage, 2);
492 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
495 msg_print(_("悪臭雲の呪文を唱えた。", "You cast a stinking cloud."));
496 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BALL_POIS), bm_ptr->plev, DAM_ROLL);
497 fire_ball(caster_ptr, GF_POIS, bm_ptr->dir, bm_ptr->damage, 2);
500 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
503 msg_print(_("地獄球の呪文を唱えた。", "You cast a nether ball."));
504 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BALL_NETHER), bm_ptr->plev, DAM_ROLL);
505 fire_ball(caster_ptr, GF_NETHER, bm_ptr->dir, bm_ptr->damage, 2);
508 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
511 msg_print(_("流れるような身振りをした。", "You gesture fluidly."));
512 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BALL_WATER), bm_ptr->plev, DAM_ROLL);
513 fire_ball(caster_ptr, GF_WATER, bm_ptr->dir, bm_ptr->damage, 4);
516 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
519 msg_print(_("魔力の嵐の呪文を念じた。", "You invoke a mana storm."));
520 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BALL_MANA), bm_ptr->plev, DAM_ROLL);
521 fire_ball(caster_ptr, GF_MANA, bm_ptr->dir, bm_ptr->damage, 4);
524 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
527 msg_print(_("暗黒の嵐の呪文を念じた。", "You invoke a darkness storm."));
528 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BALL_DARK), bm_ptr->plev, DAM_ROLL);
529 fire_ball(caster_ptr, GF_DARK, bm_ptr->dir, bm_ptr->damage, 4);
532 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
535 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_DRAIN_MANA), bm_ptr->plev, DAM_ROLL);
536 fire_ball_hide(caster_ptr, GF_DRAIN_MANA, bm_ptr->dir, bm_ptr->damage, 0);
539 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
542 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_MIND_BLAST), bm_ptr->plev, DAM_ROLL);
543 fire_ball_hide(caster_ptr, GF_MIND_BLAST, bm_ptr->dir, bm_ptr->damage, 0);
546 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
549 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BRAIN_SMASH), bm_ptr->plev, DAM_ROLL);
550 fire_ball_hide(caster_ptr, GF_BRAIN_SMASH, bm_ptr->dir, bm_ptr->damage, 0);
553 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
556 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_CAUSE_1), bm_ptr->plev, DAM_ROLL);
557 fire_ball_hide(caster_ptr, GF_CAUSE_1, bm_ptr->dir, bm_ptr->damage, 0);
560 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
563 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_CAUSE_2), bm_ptr->plev, DAM_ROLL);
564 fire_ball_hide(caster_ptr, GF_CAUSE_2, bm_ptr->dir, bm_ptr->damage, 0);
567 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
570 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_CAUSE_3), bm_ptr->plev, DAM_ROLL);
571 fire_ball_hide(caster_ptr, GF_CAUSE_3, bm_ptr->dir, bm_ptr->damage, 0);
574 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
577 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_CAUSE_4), bm_ptr->plev, DAM_ROLL);
578 fire_ball_hide(caster_ptr, GF_CAUSE_4, bm_ptr->dir, bm_ptr->damage, 0);
581 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
584 msg_print(_("アシッド・ボルトの呪文を唱えた。", "You cast an acid bolt."));
585 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BOLT_ACID), bm_ptr->plev, DAM_ROLL);
586 fire_bolt(caster_ptr, GF_ACID, bm_ptr->dir, bm_ptr->damage);
589 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
592 msg_print(_("サンダー・ボルトの呪文を唱えた。", "You cast a lightning bolt."));
593 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BOLT_ELEC), bm_ptr->plev, DAM_ROLL);
594 fire_bolt(caster_ptr, GF_ELEC, bm_ptr->dir, bm_ptr->damage);
597 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
600 msg_print(_("ファイア・ボルトの呪文を唱えた。", "You cast a fire bolt."));
601 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BOLT_FIRE), bm_ptr->plev, DAM_ROLL);
602 fire_bolt(caster_ptr, GF_FIRE, bm_ptr->dir, bm_ptr->damage);
605 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
608 msg_print(_("アイス・ボルトの呪文を唱えた。", "You cast a frost bolt."));
609 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BOLT_COLD), bm_ptr->plev, DAM_ROLL);
610 fire_bolt(caster_ptr, GF_COLD, bm_ptr->dir, bm_ptr->damage);
613 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
616 msg_print(_("スターバーストの呪文を念じた。", "You invoke a starburst."));
617 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_STARBURST), bm_ptr->plev, DAM_ROLL);
618 fire_ball(caster_ptr, GF_LITE, bm_ptr->dir, bm_ptr->damage, 4);
621 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
624 msg_print(_("地獄の矢の呪文を唱えた。", "You cast a nether bolt."));
625 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BOLT_NETHER), bm_ptr->plev, DAM_ROLL);
626 fire_bolt(caster_ptr, GF_NETHER, bm_ptr->dir, bm_ptr->damage);
629 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
632 msg_print(_("ウォーター・ボルトの呪文を唱えた。", "You cast a water bolt."));
633 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BOLT_WATER), bm_ptr->plev, DAM_ROLL);
634 fire_bolt(caster_ptr, GF_WATER, bm_ptr->dir, bm_ptr->damage);
637 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
640 msg_print(_("魔力の矢の呪文を唱えた。", "You cast a mana bolt."));
641 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BOLT_MANA), bm_ptr->plev, DAM_ROLL);
642 fire_bolt(caster_ptr, GF_MANA, bm_ptr->dir, bm_ptr->damage);
645 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
648 msg_print(_("プラズマ・ボルトの呪文を唱えた。", "You cast a plasma bolt."));
649 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BOLT_PLASMA), bm_ptr->plev, DAM_ROLL);
650 fire_bolt(caster_ptr, GF_PLASMA, bm_ptr->dir, bm_ptr->damage);
653 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
656 msg_print(_("極寒の矢の呪文を唱えた。", "You cast a ice bolt."));
657 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BOLT_ICE), bm_ptr->plev, DAM_ROLL);
658 fire_bolt(caster_ptr, GF_ICE, bm_ptr->dir, bm_ptr->damage);
660 case MS_MAGIC_MISSILE:
661 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
664 msg_print(_("マジック・ミサイルの呪文を唱えた。", "You cast a magic missile."));
665 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_MAGIC_MISSILE), bm_ptr->plev, DAM_ROLL);
666 fire_bolt(caster_ptr, GF_MISSILE, bm_ptr->dir, bm_ptr->damage);
669 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
672 msg_print(_("恐ろしげな幻覚を作り出した。", "You cast a fearful illusion."));
673 fear_monster(caster_ptr, bm_ptr->dir, bm_ptr->plev + 10);
676 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
679 confuse_monster(caster_ptr, bm_ptr->dir, bm_ptr->plev * 2);
682 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
685 msg_print(_("誘惑的な幻覚をつくり出した。", "You cast a mesmerizing illusion."));
686 confuse_monster(caster_ptr, bm_ptr->dir, bm_ptr->plev * 2);
689 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
692 slow_monster(caster_ptr, bm_ptr->dir, bm_ptr->plev);
695 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
698 sleep_monster(caster_ptr, bm_ptr->dir, bm_ptr->plev);
701 (void)set_fast(caster_ptr, randint1(20 + bm_ptr->plev) + bm_ptr->plev, FALSE);
704 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
707 msg_print(_("<破滅の手>を放った!", "You invoke the Hand of Doom!"));
708 fire_ball_hide(caster_ptr, GF_HAND_DOOM, bm_ptr->dir, bm_ptr->plev * 3, 0);
712 msg_print(_("自分の傷に念を集中した。", "You concentrate on your wounds!"));
713 (void)hp_player(caster_ptr, bm_ptr->plev * 4);
714 (void)set_stun(caster_ptr, 0);
715 (void)set_cut(caster_ptr, 0);
718 msg_print(_("無傷の球の呪文を唱えた。", "You cast a Globe of Invulnerability."));
719 (void)set_invuln(caster_ptr, randint1(4) + 4, FALSE);
722 teleport_player(caster_ptr, 10, TELEPORT_SPONTANEOUS);
725 teleport_player(caster_ptr, bm_ptr->plev * 5, TELEPORT_SPONTANEOUS);
728 (void)time_walk(caster_ptr);
735 GAME_TEXT m_name[MAX_NLEN];
737 if (!target_set(caster_ptr, TARGET_KILL))
740 if (!floor_ptr->grid_array[target_row][target_col].m_idx)
743 if (!player_has_los_bold(caster_ptr, target_row, target_col))
746 if (!projectable(caster_ptr, caster_ptr->y, caster_ptr->x, target_row, target_col))
749 m_ptr = &floor_ptr->m_list[floor_ptr->grid_array[target_row][target_col].m_idx];
750 r_ptr = &r_info[m_ptr->r_idx];
751 monster_desc(caster_ptr, m_name, m_ptr, 0);
752 if (r_ptr->flagsr & RFR_RES_TELE) {
753 if ((r_ptr->flags1 & RF1_UNIQUE) || (r_ptr->flagsr & RFR_RES_ALL)) {
754 if (is_original_ap_and_seen(caster_ptr, m_ptr))
755 r_ptr->r_flagsr |= RFR_RES_TELE;
756 msg_format(_("%sには効果がなかった!", "%s is unaffected!"), m_name);
758 } else if (r_ptr->level > randint1(100)) {
759 if (is_original_ap_and_seen(caster_ptr, m_ptr))
760 r_ptr->r_flagsr |= RFR_RES_TELE;
761 msg_format(_("%sには耐性がある!", "%s resists!"), m_name);
766 msg_format(_("%sを引き戻した。", "You command %s to return."), m_name);
767 teleport_monster_to(caster_ptr, floor_ptr->grid_array[target_row][target_col].m_idx, caster_ptr->y, caster_ptr->x, 100, TELEPORT_PASSIVE);
771 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
774 (void)fire_beam(caster_ptr, GF_AWAY_ALL, bm_ptr->dir, 100);
777 return teleport_level_other(caster_ptr);
780 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
783 msg_print(_("光の剣を放った。", "You throw a psycho-spear."));
784 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_PSY_SPEAR), bm_ptr->plev, DAM_ROLL);
785 (void)fire_beam(caster_ptr, GF_PSY_SPEAR, bm_ptr->dir, bm_ptr->damage);
789 msg_print(_("暗闇の中で手を振った。", "You gesture in shadow."));
790 (void)unlite_area(caster_ptr, 10, 3);
793 if (!target_set(caster_ptr, TARGET_KILL))
796 msg_print(_("呪文を唱えて邪悪に微笑んだ。", "You cast a spell and cackle evilly."));
797 trap_creation(caster_ptr, target_row, target_col);
800 msg_print(_("しかし何も起きなかった。", "Nothing happen."));
803 msg_print(_("死者復活の呪文を唱えた。", "You animate the dead."));
804 (void)animate_dead(caster_ptr, 0, caster_ptr->y, caster_ptr->x);
807 msg_print(_("援軍を召喚した。", "You summon one of your kin."));
808 for (int k = 0; k < 1; k++) {
809 if (summon_kin_player(caster_ptr, bm_ptr->summon_lev, caster_ptr->y, caster_ptr->x, (bm_ptr->pet ? PM_FORCE_PET : 0L))) {
811 msg_print(_("召喚された仲間は怒っている!", "The summoned companion is angry!"));
813 bm_ptr->no_trump = TRUE;
820 msg_print(_("サイバーデーモンを召喚した!", "You summon a Cyberdemon!"));
821 for (int k = 0; k < 1; k++) {
822 if (summon_specific(caster_ptr, (bm_ptr->pet ? -1 : 0), caster_ptr->y, caster_ptr->x, bm_ptr->summon_lev, SUMMON_CYBER, bm_ptr->p_mode)) {
824 msg_print(_("召喚されたサイバーデーモンは怒っている!", "The summoned Cyberdemon are angry!"));
826 bm_ptr->no_trump = TRUE;
833 msg_print(_("仲間を召喚した。", "You summon help."));
834 for (int k = 0; k < 1; k++) {
835 if (summon_specific(caster_ptr, (bm_ptr->pet ? -1 : 0), caster_ptr->y, caster_ptr->x, bm_ptr->summon_lev, 0, bm_ptr->p_mode)) {
837 msg_print(_("召喚されたモンスターは怒っている!", "The summoned monster is angry!"));
839 bm_ptr->no_trump = TRUE;
845 case MS_S_MONSTERS: {
846 msg_print(_("モンスターを召喚した!", "You summon monsters!"));
847 for (int k = 0; k < bm_ptr->plev / 15 + 2; k++) {
848 if (summon_specific(caster_ptr, (bm_ptr->pet ? -1 : 0), caster_ptr->y, caster_ptr->x, bm_ptr->summon_lev, 0, (bm_ptr->p_mode | bm_ptr->u_mode))) {
850 msg_print(_("召喚されたモンスターは怒っている!", "The summoned monsters are angry!"));
852 bm_ptr->no_trump = TRUE;
859 msg_print(_("アリを召喚した。", "You summon ants."));
861 caster_ptr, (bm_ptr->pet ? -1 : 0), caster_ptr->y, caster_ptr->x, bm_ptr->summon_lev, SUMMON_ANT, (PM_ALLOW_GROUP | bm_ptr->p_mode))) {
863 msg_print(_("召喚されたアリは怒っている!", "The summoned ants are angry!"));
865 bm_ptr->no_trump = TRUE;
871 msg_print(_("蜘蛛を召喚した。", "You summon spiders."));
873 caster_ptr, (bm_ptr->pet ? -1 : 0), caster_ptr->y, caster_ptr->x, bm_ptr->summon_lev, SUMMON_SPIDER, (PM_ALLOW_GROUP | bm_ptr->p_mode))) {
875 msg_print(_("召喚された蜘蛛は怒っている!", "Summoned spiders are angry!"));
877 bm_ptr->no_trump = TRUE;
883 msg_print(_("ハウンドを召喚した。", "You summon hounds."));
885 caster_ptr, (bm_ptr->pet ? -1 : 0), caster_ptr->y, caster_ptr->x, bm_ptr->summon_lev, SUMMON_HOUND, (PM_ALLOW_GROUP | bm_ptr->p_mode))) {
887 msg_print(_("召喚されたハウンドは怒っている!", "Summoned hounds are angry!"));
889 bm_ptr->no_trump = TRUE;
895 msg_print(_("ヒドラを召喚した。", "You summon a hydras."));
897 caster_ptr, (bm_ptr->pet ? -1 : 0), caster_ptr->y, caster_ptr->x, bm_ptr->summon_lev, SUMMON_HYDRA, (bm_ptr->g_mode | bm_ptr->p_mode))) {
899 msg_print(_("召喚されたヒドラは怒っている!", "Summoned hydras are angry!"));
901 bm_ptr->no_trump = TRUE;
907 msg_print(_("天使を召喚した!", "You summon an angel!"));
909 caster_ptr, (bm_ptr->pet ? -1 : 0), caster_ptr->y, caster_ptr->x, bm_ptr->summon_lev, SUMMON_ANGEL, (bm_ptr->g_mode | bm_ptr->p_mode))) {
911 msg_print(_("召喚された天使は怒っている!", "The summoned angel is angry!"));
913 bm_ptr->no_trump = TRUE;
919 msg_print(_("混沌の宮廷から悪魔を召喚した!", "You summon a demon from the Courts of Chaos!"));
921 caster_ptr, (bm_ptr->pet ? -1 : 0), caster_ptr->y, caster_ptr->x, bm_ptr->summon_lev, SUMMON_DEMON, (bm_ptr->g_mode | bm_ptr->p_mode))) {
923 msg_print(_("召喚されたデーモンは怒っている!", "The summoned demon is angry!"));
925 bm_ptr->no_trump = TRUE;
931 msg_print(_("アンデッドの強敵を召喚した!", "You summon an undead adversary!"));
933 caster_ptr, (bm_ptr->pet ? -1 : 0), caster_ptr->y, caster_ptr->x, bm_ptr->summon_lev, SUMMON_UNDEAD, (bm_ptr->g_mode | bm_ptr->p_mode))) {
935 msg_print(_("召喚されたアンデッドは怒っている!", "The summoned undead is angry!"));
937 bm_ptr->no_trump = TRUE;
943 msg_print(_("ドラゴンを召喚した!", "You summon a dragon!"));
945 caster_ptr, (bm_ptr->pet ? -1 : 0), caster_ptr->y, caster_ptr->x, bm_ptr->summon_lev, SUMMON_DRAGON, (bm_ptr->g_mode | bm_ptr->p_mode))) {
947 msg_print(_("召喚されたドラゴンは怒っている!", "The summoned dragon is angry!"));
949 bm_ptr->no_trump = TRUE;
954 case MS_S_HI_UNDEAD: {
955 msg_print(_("強力なアンデッドを召喚した!", "You summon a greater undead!"));
956 if (summon_specific(caster_ptr, (bm_ptr->pet ? -1 : 0), caster_ptr->y, caster_ptr->x, bm_ptr->summon_lev, SUMMON_HI_UNDEAD,
957 (bm_ptr->g_mode | bm_ptr->p_mode | bm_ptr->u_mode))) {
959 msg_print(_("召喚された上級アンデッドは怒っている!", "The summoned greater undead is angry!"));
961 bm_ptr->no_trump = TRUE;
966 case MS_S_HI_DRAGON: {
967 msg_print(_("古代ドラゴンを召喚した!", "You summon an ancient dragon!"));
968 if (summon_specific(caster_ptr, (bm_ptr->pet ? -1 : 0), caster_ptr->y, caster_ptr->x, bm_ptr->summon_lev, SUMMON_HI_DRAGON,
969 (bm_ptr->g_mode | bm_ptr->p_mode | bm_ptr->u_mode))) {
971 msg_print(_("召喚された古代ドラゴンは怒っている!", "The summoned ancient dragon is angry!"));
973 bm_ptr->no_trump = TRUE;
978 case MS_S_AMBERITE: {
979 msg_print(_("アンバーの王族を召喚した!", "You summon a Lord of Amber!"));
980 if (summon_specific(caster_ptr, (bm_ptr->pet ? -1 : 0), caster_ptr->y, caster_ptr->x, bm_ptr->summon_lev, SUMMON_AMBERITES,
981 (bm_ptr->g_mode | bm_ptr->p_mode | bm_ptr->u_mode))) {
983 msg_print(_("召喚されたアンバーの王族は怒っている!", "The summoned Lord of Amber is angry!"));
985 bm_ptr->no_trump = TRUE;
992 msg_print(_("特別な強敵を召喚した!", "You summon a special opponent!"));
993 for (int k = 0; k < 1; k++) {
994 if (summon_specific(caster_ptr, (bm_ptr->pet ? -1 : 0), caster_ptr->y, caster_ptr->x, bm_ptr->summon_lev, SUMMON_UNIQUE,
995 (bm_ptr->g_mode | bm_ptr->p_mode | PM_ALLOW_UNIQUE))) {
998 msg_print(_("召喚されたユニーク・モンスターは怒っている!", "The summoned special opponent is angry!"));
1002 for (int k = count; k < 1; k++) {
1003 if (summon_specific(caster_ptr, (bm_ptr->pet ? -1 : 0), caster_ptr->y, caster_ptr->x, bm_ptr->summon_lev, SUMMON_HI_UNDEAD,
1004 (bm_ptr->g_mode | bm_ptr->p_mode | PM_ALLOW_UNIQUE))) {
1007 msg_print(_("召喚された上級アンデッドは怒っている!", "The summoned greater undead is angry!"));
1012 bm_ptr->no_trump = TRUE;
1020 if (bm_ptr->no_trump)
1021 msg_print(_("何も現れなかった。", "No one appeared."));