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));
215 * do_cmd_cast calls this function if the player's class is 'blue-mage'.
216 * @param spell 発動するモンスター攻撃のID
217 * @param success TRUEは成功時、FALSEは失敗時の処理を行う
218 * @return 処理を実行したらTRUE、キャンセルした場合FALSEを返す。
220 bool cast_learned_spell(player_type *caster_ptr, int spell, const bool success)
222 blue_magic_type tmp_bm;
223 blue_magic_type *bm_ptr = initialize_blue_magic_type(caster_ptr, &tmp_bm, success, get_pseudo_monstetr_level);
224 floor_type *floor_ptr = caster_ptr->current_floor_ptr;
227 msg_print(_("かん高い金切り声をあげた。", "You make a high pitched shriek."));
228 aggravate_monsters(caster_ptr, 0);
229 break; // 関数分割後に'return TRUE;' に差し替え
236 if (!cast_blue_dispel(caster_ptr))
241 if (!cast_blue_rocket(caster_ptr, bm_ptr))
246 if (!cast_blue_shoot(caster_ptr, bm_ptr))
251 if (!cast_blue_breath_acid(caster_ptr, bm_ptr))
256 if (!cast_blue_breath_elec(caster_ptr, bm_ptr))
261 if (!cast_blue_breath_fire(caster_ptr, bm_ptr))
266 if (!cast_blue_breath_cold(caster_ptr, bm_ptr))
271 if (!cast_blue_breath_pois(caster_ptr, bm_ptr))
276 if (!cast_blue_breath_nether(caster_ptr, bm_ptr))
281 if (!cast_blue_breath_lite(caster_ptr, bm_ptr))
286 if (!cast_blue_breath_dark(caster_ptr, bm_ptr))
291 if (!cast_blue_breath_conf(caster_ptr, bm_ptr))
296 if (!cast_blue_breath_sound(caster_ptr, bm_ptr))
301 if (!cast_blue_breath_chaos(caster_ptr, bm_ptr))
306 if (!cast_blue_breath_disenchant(caster_ptr, bm_ptr))
311 if (!cast_blue_breath_nexus(caster_ptr, bm_ptr))
316 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
319 msg_print(_("時間逆転のブレスを吐いた。", "You breathe time."));
320 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BR_TIME), bm_ptr->plev, DAM_ROLL);
321 fire_breath(caster_ptr, GF_TIME, bm_ptr->dir, bm_ptr->damage, (bm_ptr->plev > 40 ? 3 : 2));
324 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
327 msg_print(_("遅鈍のブレスを吐いた。", "You breathe inertia."));
328 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BR_INERTIA), bm_ptr->plev, DAM_ROLL);
329 fire_breath(caster_ptr, GF_INERTIAL, bm_ptr->dir, bm_ptr->damage, (bm_ptr->plev > 40 ? 3 : 2));
332 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
335 msg_print(_("重力のブレスを吐いた。", "You breathe gravity."));
336 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BR_GRAVITY), bm_ptr->plev, DAM_ROLL);
337 fire_breath(caster_ptr, GF_GRAVITY, bm_ptr->dir, bm_ptr->damage, (bm_ptr->plev > 40 ? 3 : 2));
340 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
343 msg_print(_("破片のブレスを吐いた。", "You breathe shards."));
344 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BR_SHARDS), bm_ptr->plev, DAM_ROLL);
345 fire_breath(caster_ptr, GF_SHARDS, bm_ptr->dir, bm_ptr->damage, (bm_ptr->plev > 40 ? 3 : 2));
348 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
351 msg_print(_("プラズマのブレスを吐いた。", "You breathe plasma."));
352 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BR_PLASMA), bm_ptr->plev, DAM_ROLL);
353 fire_breath(caster_ptr, GF_PLASMA, bm_ptr->dir, bm_ptr->damage, (bm_ptr->plev > 40 ? 3 : 2));
356 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
359 msg_print(_("フォースのブレスを吐いた。", "You breathe force."));
360 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BR_FORCE), bm_ptr->plev, DAM_ROLL);
361 fire_breath(caster_ptr, GF_FORCE, bm_ptr->dir, bm_ptr->damage, (bm_ptr->plev > 40 ? 3 : 2));
364 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
367 msg_print(_("魔力のブレスを吐いた。", "You breathe mana."));
368 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BR_MANA), bm_ptr->plev, DAM_ROLL);
369 fire_breath(caster_ptr, GF_MANA, bm_ptr->dir, bm_ptr->damage, (bm_ptr->plev > 40 ? 3 : 2));
372 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
375 msg_print(_("放射能球を放った。", "You cast a ball of radiation."));
376 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BALL_NUKE), bm_ptr->plev, DAM_ROLL);
377 fire_ball(caster_ptr, GF_NUKE, bm_ptr->dir, bm_ptr->damage, 2);
380 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
383 msg_print(_("放射性廃棄物のブレスを吐いた。", "You breathe toxic waste."));
384 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BR_NUKE), bm_ptr->plev, DAM_ROLL);
385 fire_breath(caster_ptr, GF_NUKE, bm_ptr->dir, bm_ptr->damage, (bm_ptr->plev > 40 ? 3 : 2));
388 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
391 msg_print(_("純ログルスを放った。", "You invoke a raw Logrus."));
392 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BALL_CHAOS), bm_ptr->plev, DAM_ROLL);
393 fire_ball(caster_ptr, GF_CHAOS, bm_ptr->dir, bm_ptr->damage, 4);
396 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
399 msg_print(_("分解のブレスを吐いた。", "You breathe disintegration."));
400 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BR_DISI), bm_ptr->plev, DAM_ROLL);
401 fire_breath(caster_ptr, GF_DISINTEGRATE, bm_ptr->dir, bm_ptr->damage, (bm_ptr->plev > 40 ? 3 : 2));
404 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
407 msg_print(_("アシッド・ボールの呪文を唱えた。", "You cast an acid ball."));
408 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BALL_ACID), bm_ptr->plev, DAM_ROLL);
409 fire_ball(caster_ptr, GF_ACID, bm_ptr->dir, bm_ptr->damage, 2);
412 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
415 msg_print(_("サンダー・ボールの呪文を唱えた。", "You cast a lightning ball."));
416 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BALL_ELEC), bm_ptr->plev, DAM_ROLL);
417 fire_ball(caster_ptr, GF_ELEC, bm_ptr->dir, bm_ptr->damage, 2);
420 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
423 msg_print(_("ファイア・ボールの呪文を唱えた。", "You cast a fire ball."));
424 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BALL_FIRE), bm_ptr->plev, DAM_ROLL);
425 fire_ball(caster_ptr, GF_FIRE, bm_ptr->dir, bm_ptr->damage, 2);
428 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
431 msg_print(_("アイス・ボールの呪文を唱えた。", "You cast a frost ball."));
432 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BALL_COLD), bm_ptr->plev, DAM_ROLL);
433 fire_ball(caster_ptr, GF_COLD, bm_ptr->dir, bm_ptr->damage, 2);
436 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
439 msg_print(_("悪臭雲の呪文を唱えた。", "You cast a stinking cloud."));
440 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BALL_POIS), bm_ptr->plev, DAM_ROLL);
441 fire_ball(caster_ptr, GF_POIS, bm_ptr->dir, bm_ptr->damage, 2);
444 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
447 msg_print(_("地獄球の呪文を唱えた。", "You cast a nether ball."));
448 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BALL_NETHER), bm_ptr->plev, DAM_ROLL);
449 fire_ball(caster_ptr, GF_NETHER, bm_ptr->dir, bm_ptr->damage, 2);
452 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
455 msg_print(_("流れるような身振りをした。", "You gesture fluidly."));
456 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BALL_WATER), bm_ptr->plev, DAM_ROLL);
457 fire_ball(caster_ptr, GF_WATER, bm_ptr->dir, bm_ptr->damage, 4);
460 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
463 msg_print(_("魔力の嵐の呪文を念じた。", "You invoke a mana storm."));
464 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BALL_MANA), bm_ptr->plev, DAM_ROLL);
465 fire_ball(caster_ptr, GF_MANA, bm_ptr->dir, bm_ptr->damage, 4);
468 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
471 msg_print(_("暗黒の嵐の呪文を念じた。", "You invoke a darkness storm."));
472 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BALL_DARK), bm_ptr->plev, DAM_ROLL);
473 fire_ball(caster_ptr, GF_DARK, bm_ptr->dir, bm_ptr->damage, 4);
476 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
479 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_DRAIN_MANA), bm_ptr->plev, DAM_ROLL);
480 fire_ball_hide(caster_ptr, GF_DRAIN_MANA, bm_ptr->dir, bm_ptr->damage, 0);
483 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
486 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_MIND_BLAST), bm_ptr->plev, DAM_ROLL);
487 fire_ball_hide(caster_ptr, GF_MIND_BLAST, bm_ptr->dir, bm_ptr->damage, 0);
490 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
493 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BRAIN_SMASH), bm_ptr->plev, DAM_ROLL);
494 fire_ball_hide(caster_ptr, GF_BRAIN_SMASH, bm_ptr->dir, bm_ptr->damage, 0);
497 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
500 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_CAUSE_1), bm_ptr->plev, DAM_ROLL);
501 fire_ball_hide(caster_ptr, GF_CAUSE_1, bm_ptr->dir, bm_ptr->damage, 0);
504 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
507 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_CAUSE_2), bm_ptr->plev, DAM_ROLL);
508 fire_ball_hide(caster_ptr, GF_CAUSE_2, bm_ptr->dir, bm_ptr->damage, 0);
511 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
514 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_CAUSE_3), bm_ptr->plev, DAM_ROLL);
515 fire_ball_hide(caster_ptr, GF_CAUSE_3, bm_ptr->dir, bm_ptr->damage, 0);
518 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
521 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_CAUSE_4), bm_ptr->plev, DAM_ROLL);
522 fire_ball_hide(caster_ptr, GF_CAUSE_4, bm_ptr->dir, bm_ptr->damage, 0);
525 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
528 msg_print(_("アシッド・ボルトの呪文を唱えた。", "You cast an acid bolt."));
529 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BOLT_ACID), bm_ptr->plev, DAM_ROLL);
530 fire_bolt(caster_ptr, GF_ACID, bm_ptr->dir, bm_ptr->damage);
533 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
536 msg_print(_("サンダー・ボルトの呪文を唱えた。", "You cast a lightning bolt."));
537 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BOLT_ELEC), bm_ptr->plev, DAM_ROLL);
538 fire_bolt(caster_ptr, GF_ELEC, bm_ptr->dir, bm_ptr->damage);
541 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
544 msg_print(_("ファイア・ボルトの呪文を唱えた。", "You cast a fire bolt."));
545 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BOLT_FIRE), bm_ptr->plev, DAM_ROLL);
546 fire_bolt(caster_ptr, GF_FIRE, bm_ptr->dir, bm_ptr->damage);
549 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
552 msg_print(_("アイス・ボルトの呪文を唱えた。", "You cast a frost bolt."));
553 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BOLT_COLD), bm_ptr->plev, DAM_ROLL);
554 fire_bolt(caster_ptr, GF_COLD, bm_ptr->dir, bm_ptr->damage);
557 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
560 msg_print(_("スターバーストの呪文を念じた。", "You invoke a starburst."));
561 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_STARBURST), bm_ptr->plev, DAM_ROLL);
562 fire_ball(caster_ptr, GF_LITE, bm_ptr->dir, bm_ptr->damage, 4);
565 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
568 msg_print(_("地獄の矢の呪文を唱えた。", "You cast a nether bolt."));
569 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BOLT_NETHER), bm_ptr->plev, DAM_ROLL);
570 fire_bolt(caster_ptr, GF_NETHER, bm_ptr->dir, bm_ptr->damage);
573 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
576 msg_print(_("ウォーター・ボルトの呪文を唱えた。", "You cast a water bolt."));
577 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BOLT_WATER), bm_ptr->plev, DAM_ROLL);
578 fire_bolt(caster_ptr, GF_WATER, bm_ptr->dir, bm_ptr->damage);
581 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
584 msg_print(_("魔力の矢の呪文を唱えた。", "You cast a mana bolt."));
585 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BOLT_MANA), bm_ptr->plev, DAM_ROLL);
586 fire_bolt(caster_ptr, GF_MANA, bm_ptr->dir, bm_ptr->damage);
589 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
592 msg_print(_("プラズマ・ボルトの呪文を唱えた。", "You cast a plasma bolt."));
593 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BOLT_PLASMA), bm_ptr->plev, DAM_ROLL);
594 fire_bolt(caster_ptr, GF_PLASMA, bm_ptr->dir, bm_ptr->damage);
597 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
600 msg_print(_("極寒の矢の呪文を唱えた。", "You cast a ice bolt."));
601 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BOLT_ICE), bm_ptr->plev, DAM_ROLL);
602 fire_bolt(caster_ptr, GF_ICE, bm_ptr->dir, bm_ptr->damage);
604 case MS_MAGIC_MISSILE:
605 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
608 msg_print(_("マジック・ミサイルの呪文を唱えた。", "You cast a magic missile."));
609 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_MAGIC_MISSILE), bm_ptr->plev, DAM_ROLL);
610 fire_bolt(caster_ptr, GF_MISSILE, bm_ptr->dir, bm_ptr->damage);
613 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
616 msg_print(_("恐ろしげな幻覚を作り出した。", "You cast a fearful illusion."));
617 fear_monster(caster_ptr, bm_ptr->dir, bm_ptr->plev + 10);
620 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
623 confuse_monster(caster_ptr, bm_ptr->dir, bm_ptr->plev * 2);
626 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
629 msg_print(_("誘惑的な幻覚をつくり出した。", "You cast a mesmerizing illusion."));
630 confuse_monster(caster_ptr, bm_ptr->dir, bm_ptr->plev * 2);
633 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
636 slow_monster(caster_ptr, bm_ptr->dir, bm_ptr->plev);
639 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
642 sleep_monster(caster_ptr, bm_ptr->dir, bm_ptr->plev);
645 (void)set_fast(caster_ptr, randint1(20 + bm_ptr->plev) + bm_ptr->plev, FALSE);
648 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
651 msg_print(_("<破滅の手>を放った!", "You invoke the Hand of Doom!"));
652 fire_ball_hide(caster_ptr, GF_HAND_DOOM, bm_ptr->dir, bm_ptr->plev * 3, 0);
656 msg_print(_("自分の傷に念を集中した。", "You concentrate on your wounds!"));
657 (void)hp_player(caster_ptr, bm_ptr->plev * 4);
658 (void)set_stun(caster_ptr, 0);
659 (void)set_cut(caster_ptr, 0);
662 msg_print(_("無傷の球の呪文を唱えた。", "You cast a Globe of Invulnerability."));
663 (void)set_invuln(caster_ptr, randint1(4) + 4, FALSE);
666 teleport_player(caster_ptr, 10, TELEPORT_SPONTANEOUS);
669 teleport_player(caster_ptr, bm_ptr->plev * 5, TELEPORT_SPONTANEOUS);
672 (void)time_walk(caster_ptr);
679 GAME_TEXT m_name[MAX_NLEN];
681 if (!target_set(caster_ptr, TARGET_KILL))
684 if (!floor_ptr->grid_array[target_row][target_col].m_idx)
687 if (!player_has_los_bold(caster_ptr, target_row, target_col))
690 if (!projectable(caster_ptr, caster_ptr->y, caster_ptr->x, target_row, target_col))
693 m_ptr = &floor_ptr->m_list[floor_ptr->grid_array[target_row][target_col].m_idx];
694 r_ptr = &r_info[m_ptr->r_idx];
695 monster_desc(caster_ptr, m_name, m_ptr, 0);
696 if (r_ptr->flagsr & RFR_RES_TELE) {
697 if ((r_ptr->flags1 & RF1_UNIQUE) || (r_ptr->flagsr & RFR_RES_ALL)) {
698 if (is_original_ap_and_seen(caster_ptr, m_ptr))
699 r_ptr->r_flagsr |= RFR_RES_TELE;
700 msg_format(_("%sには効果がなかった!", "%s is unaffected!"), m_name);
702 } else if (r_ptr->level > randint1(100)) {
703 if (is_original_ap_and_seen(caster_ptr, m_ptr))
704 r_ptr->r_flagsr |= RFR_RES_TELE;
705 msg_format(_("%sには耐性がある!", "%s resists!"), m_name);
710 msg_format(_("%sを引き戻した。", "You command %s to return."), m_name);
711 teleport_monster_to(caster_ptr, floor_ptr->grid_array[target_row][target_col].m_idx, caster_ptr->y, caster_ptr->x, 100, TELEPORT_PASSIVE);
715 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
718 (void)fire_beam(caster_ptr, GF_AWAY_ALL, bm_ptr->dir, 100);
721 return teleport_level_other(caster_ptr);
724 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
727 msg_print(_("光の剣を放った。", "You throw a psycho-spear."));
728 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_PSY_SPEAR), bm_ptr->plev, DAM_ROLL);
729 (void)fire_beam(caster_ptr, GF_PSY_SPEAR, bm_ptr->dir, bm_ptr->damage);
733 msg_print(_("暗闇の中で手を振った。", "You gesture in shadow."));
734 (void)unlite_area(caster_ptr, 10, 3);
737 if (!target_set(caster_ptr, TARGET_KILL))
740 msg_print(_("呪文を唱えて邪悪に微笑んだ。", "You cast a spell and cackle evilly."));
741 trap_creation(caster_ptr, target_row, target_col);
744 msg_print(_("しかし何も起きなかった。", "Nothing happen."));
747 msg_print(_("死者復活の呪文を唱えた。", "You animate the dead."));
748 (void)animate_dead(caster_ptr, 0, caster_ptr->y, caster_ptr->x);
751 msg_print(_("援軍を召喚した。", "You summon one of your kin."));
752 for (int k = 0; k < 1; k++) {
753 if (summon_kin_player(caster_ptr, bm_ptr->summon_lev, caster_ptr->y, caster_ptr->x, (bm_ptr->pet ? PM_FORCE_PET : 0L))) {
755 msg_print(_("召喚された仲間は怒っている!", "The summoned companion is angry!"));
757 bm_ptr->no_trump = TRUE;
764 msg_print(_("サイバーデーモンを召喚した!", "You summon a Cyberdemon!"));
765 for (int k = 0; k < 1; k++) {
766 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)) {
768 msg_print(_("召喚されたサイバーデーモンは怒っている!", "The summoned Cyberdemon are angry!"));
770 bm_ptr->no_trump = TRUE;
777 msg_print(_("仲間を召喚した。", "You summon help."));
778 for (int k = 0; k < 1; k++) {
779 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)) {
781 msg_print(_("召喚されたモンスターは怒っている!", "The summoned monster is angry!"));
783 bm_ptr->no_trump = TRUE;
789 case MS_S_MONSTERS: {
790 msg_print(_("モンスターを召喚した!", "You summon monsters!"));
791 for (int k = 0; k < bm_ptr->plev / 15 + 2; k++) {
792 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))) {
794 msg_print(_("召喚されたモンスターは怒っている!", "The summoned monsters are angry!"));
796 bm_ptr->no_trump = TRUE;
803 msg_print(_("アリを召喚した。", "You summon ants."));
805 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))) {
807 msg_print(_("召喚されたアリは怒っている!", "The summoned ants are angry!"));
809 bm_ptr->no_trump = TRUE;
815 msg_print(_("蜘蛛を召喚した。", "You summon spiders."));
817 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))) {
819 msg_print(_("召喚された蜘蛛は怒っている!", "Summoned spiders are angry!"));
821 bm_ptr->no_trump = TRUE;
827 msg_print(_("ハウンドを召喚した。", "You summon hounds."));
829 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))) {
831 msg_print(_("召喚されたハウンドは怒っている!", "Summoned hounds are angry!"));
833 bm_ptr->no_trump = TRUE;
839 msg_print(_("ヒドラを召喚した。", "You summon a hydras."));
841 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))) {
843 msg_print(_("召喚されたヒドラは怒っている!", "Summoned hydras are angry!"));
845 bm_ptr->no_trump = TRUE;
851 msg_print(_("天使を召喚した!", "You summon an angel!"));
853 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))) {
855 msg_print(_("召喚された天使は怒っている!", "The summoned angel is angry!"));
857 bm_ptr->no_trump = TRUE;
863 msg_print(_("混沌の宮廷から悪魔を召喚した!", "You summon a demon from the Courts of Chaos!"));
865 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))) {
867 msg_print(_("召喚されたデーモンは怒っている!", "The summoned demon is angry!"));
869 bm_ptr->no_trump = TRUE;
875 msg_print(_("アンデッドの強敵を召喚した!", "You summon an undead adversary!"));
877 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))) {
879 msg_print(_("召喚されたアンデッドは怒っている!", "The summoned undead is angry!"));
881 bm_ptr->no_trump = TRUE;
887 msg_print(_("ドラゴンを召喚した!", "You summon a dragon!"));
889 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))) {
891 msg_print(_("召喚されたドラゴンは怒っている!", "The summoned dragon is angry!"));
893 bm_ptr->no_trump = TRUE;
898 case MS_S_HI_UNDEAD: {
899 msg_print(_("強力なアンデッドを召喚した!", "You summon a greater undead!"));
900 if (summon_specific(caster_ptr, (bm_ptr->pet ? -1 : 0), caster_ptr->y, caster_ptr->x, bm_ptr->summon_lev, SUMMON_HI_UNDEAD,
901 (bm_ptr->g_mode | bm_ptr->p_mode | bm_ptr->u_mode))) {
903 msg_print(_("召喚された上級アンデッドは怒っている!", "The summoned greater undead is angry!"));
905 bm_ptr->no_trump = TRUE;
910 case MS_S_HI_DRAGON: {
911 msg_print(_("古代ドラゴンを召喚した!", "You summon an ancient dragon!"));
912 if (summon_specific(caster_ptr, (bm_ptr->pet ? -1 : 0), caster_ptr->y, caster_ptr->x, bm_ptr->summon_lev, SUMMON_HI_DRAGON,
913 (bm_ptr->g_mode | bm_ptr->p_mode | bm_ptr->u_mode))) {
915 msg_print(_("召喚された古代ドラゴンは怒っている!", "The summoned ancient dragon is angry!"));
917 bm_ptr->no_trump = TRUE;
922 case MS_S_AMBERITE: {
923 msg_print(_("アンバーの王族を召喚した!", "You summon a Lord of Amber!"));
924 if (summon_specific(caster_ptr, (bm_ptr->pet ? -1 : 0), caster_ptr->y, caster_ptr->x, bm_ptr->summon_lev, SUMMON_AMBERITES,
925 (bm_ptr->g_mode | bm_ptr->p_mode | bm_ptr->u_mode))) {
927 msg_print(_("召喚されたアンバーの王族は怒っている!", "The summoned Lord of Amber is angry!"));
929 bm_ptr->no_trump = TRUE;
936 msg_print(_("特別な強敵を召喚した!", "You summon a special opponent!"));
937 for (int k = 0; k < 1; k++) {
938 if (summon_specific(caster_ptr, (bm_ptr->pet ? -1 : 0), caster_ptr->y, caster_ptr->x, bm_ptr->summon_lev, SUMMON_UNIQUE,
939 (bm_ptr->g_mode | bm_ptr->p_mode | PM_ALLOW_UNIQUE))) {
942 msg_print(_("召喚されたユニーク・モンスターは怒っている!", "The summoned special opponent is angry!"));
946 for (int k = count; k < 1; k++) {
947 if (summon_specific(caster_ptr, (bm_ptr->pet ? -1 : 0), caster_ptr->y, caster_ptr->x, bm_ptr->summon_lev, SUMMON_HI_UNDEAD,
948 (bm_ptr->g_mode | bm_ptr->p_mode | PM_ALLOW_UNIQUE))) {
951 msg_print(_("召喚された上級アンデッドは怒っている!", "The summoned greater undead is angry!"));
956 bm_ptr->no_trump = TRUE;
964 if (bm_ptr->no_trump)
965 msg_print(_("何も現れなかった。", "No one appeared."));