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/floor.h"
7 #include "io/targeting.h"
8 #include "monster-floor/monster-summon.h"
9 #include "monster-floor/place-monster-types.h"
10 #include "monster-race/monster-race.h"
11 #include "monster-race/race-flags-resistance.h"
12 #include "monster-race/race-flags1.h"
13 #include "monster/monster-describer.h"
14 #include "monster/monster-info.h"
15 #include "monster/monster-status.h"
16 #include "mspell/mspell-damage-calculator.h"
17 #include "mspell/mspell-type.h"
18 #include "spell-kind/spells-launcher.h"
19 #include "spell-kind/spells-lite.h"
20 #include "spell-kind/spells-neighbor.h"
21 #include "spell-kind/spells-sight.h"
22 #include "spell-kind/spells-teleport.h"
23 #include "spell-kind/spells-world.h"
24 #include "spell/spell-types.h"
25 #include "spell/spells-status.h"
26 #include "spell/spells-summon.h"
27 #include "status/bad-status-setter.h"
28 #include "status/body-improvement.h"
29 #include "status/buff-setter.h"
30 #include "system/floor-type-definition.h"
31 #include "view/display-messages.h"
35 * @param caster_ptr プレーヤーへの参照ポインタ
38 static bool cast_blue_shriek(player_type *caster_ptr)
40 msg_print(_("かん高い金切り声をあげた。", "You make a high pitched shriek."));
41 aggravate_monsters(caster_ptr, 0);
45 static bool cast_blue_dispel(player_type *caster_ptr)
47 if (!target_set(caster_ptr, TARGET_KILL))
50 MONSTER_IDX m_idx = caster_ptr->current_floor_ptr->grid_array[target_row][target_col].m_idx;
51 if ((m_idx == 0) || !player_has_los_bold(caster_ptr, target_row, target_col)
52 || !projectable(caster_ptr, caster_ptr->y, caster_ptr->x, target_row, target_col))
55 dispel_monster_status(caster_ptr, m_idx);
59 static bool cast_blue_rocket(player_type *caster_ptr, blue_magic_type *bm_ptr)
61 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
64 msg_print(_("ロケットを発射した。", "You fire a rocket."));
65 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_ROCKET), bm_ptr->plev, DAM_ROLL);
66 fire_rocket(caster_ptr, GF_ROCKET, bm_ptr->dir, bm_ptr->damage, 2);
70 static bool cast_blue_shoot(player_type *caster_ptr, blue_magic_type *bm_ptr)
72 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
75 msg_print(_("矢を放った。", "You fire an arrow."));
76 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_SHOOT), bm_ptr->plev, DAM_ROLL);
77 fire_bolt(caster_ptr, GF_ARROW, bm_ptr->dir, bm_ptr->damage);
81 static bool cast_blue_breath_acid(player_type *caster_ptr, blue_magic_type *bm_ptr)
83 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
86 msg_print(_("酸のブレスを吐いた。", "You breathe acid."));
87 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BR_ACID), bm_ptr->plev, DAM_ROLL);
88 fire_breath(caster_ptr, GF_ACID, bm_ptr->dir, bm_ptr->damage, (bm_ptr->plev > 40 ? 3 : 2));
92 static bool cast_blue_breath_elec(player_type *caster_ptr, blue_magic_type *bm_ptr)
94 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
97 msg_print(_("稲妻のブレスを吐いた。", "You breathe lightning."));
98 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BR_ELEC), bm_ptr->plev, DAM_ROLL);
99 fire_breath(caster_ptr, GF_ELEC, bm_ptr->dir, bm_ptr->damage, (bm_ptr->plev > 40 ? 3 : 2));
103 static bool cast_blue_breath_fire(player_type *caster_ptr, blue_magic_type *bm_ptr)
105 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
108 msg_print(_("火炎のブレスを吐いた。", "You breathe fire."));
109 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BR_FIRE), bm_ptr->plev, DAM_ROLL);
110 fire_breath(caster_ptr, GF_FIRE, bm_ptr->dir, bm_ptr->damage, (bm_ptr->plev > 40 ? 3 : 2));
114 static bool cast_blue_breath_cold(player_type *caster_ptr, blue_magic_type *bm_ptr)
116 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
119 msg_print(_("冷気のブレスを吐いた。", "You breathe frost."));
120 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BR_COLD), bm_ptr->plev, DAM_ROLL);
121 fire_breath(caster_ptr, GF_COLD, bm_ptr->dir, bm_ptr->damage, (bm_ptr->plev > 40 ? 3 : 2));
125 static bool cast_blue_breath_pois(player_type *caster_ptr, blue_magic_type *bm_ptr)
127 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
130 msg_print(_("ガスのブレスを吐いた。", "You breathe gas."));
131 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BR_POIS), bm_ptr->plev, DAM_ROLL);
132 fire_breath(caster_ptr, GF_POIS, bm_ptr->dir, bm_ptr->damage, (bm_ptr->plev > 40 ? 3 : 2));
138 * do_cmd_cast calls this function if the player's class is 'blue-mage'.
139 * @param spell 発動するモンスター攻撃のID
140 * @param success TRUEは成功時、FALSEは失敗時の処理を行う
141 * @return 処理を実行したらTRUE、キャンセルした場合FALSEを返す。
143 bool cast_learned_spell(player_type *caster_ptr, int spell, const bool success)
145 blue_magic_type tmp_bm;
146 blue_magic_type *bm_ptr = initialize_blue_magic_type(caster_ptr, &tmp_bm, success, get_pseudo_monstetr_level);
147 floor_type *floor_ptr = caster_ptr->current_floor_ptr;
150 (void)cast_blue_shriek(caster_ptr);
158 if (!cast_blue_dispel(caster_ptr))
163 if (!cast_blue_rocket(caster_ptr, bm_ptr))
168 if (!cast_blue_shoot(caster_ptr, bm_ptr))
173 if (!cast_blue_breath_acid(caster_ptr, bm_ptr))
178 if (!cast_blue_breath_elec(caster_ptr, bm_ptr))
183 if (!cast_blue_breath_fire(caster_ptr, bm_ptr))
188 if (!cast_blue_breath_cold(caster_ptr, bm_ptr))
193 if (!cast_blue_breath_pois(caster_ptr, bm_ptr))
198 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
201 msg_print(_("地獄のブレスを吐いた。", "You breathe nether."));
202 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BR_NETHER), bm_ptr->plev, DAM_ROLL);
203 fire_breath(caster_ptr, GF_NETHER, bm_ptr->dir, bm_ptr->damage, (bm_ptr->plev > 40 ? 3 : 2));
206 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
209 msg_print(_("閃光のブレスを吐いた。", "You breathe light."));
210 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BR_LITE), bm_ptr->plev, DAM_ROLL);
211 fire_breath(caster_ptr, GF_LITE, bm_ptr->dir, bm_ptr->damage, (bm_ptr->plev > 40 ? 3 : 2));
214 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
217 msg_print(_("暗黒のブレスを吐いた。", "You breathe darkness."));
218 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BR_DARK), bm_ptr->plev, DAM_ROLL);
219 fire_breath(caster_ptr, GF_DARK, bm_ptr->dir, bm_ptr->damage, (bm_ptr->plev > 40 ? 3 : 2));
222 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
225 msg_print(_("混乱のブレスを吐いた。", "You breathe confusion."));
226 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BR_CONF), bm_ptr->plev, DAM_ROLL);
227 fire_breath(caster_ptr, GF_CONFUSION, bm_ptr->dir, bm_ptr->damage, (bm_ptr->plev > 40 ? 3 : 2));
230 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
233 msg_print(_("轟音のブレスを吐いた。", "You breathe sound."));
234 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BR_SOUND), bm_ptr->plev, DAM_ROLL);
235 fire_breath(caster_ptr, GF_SOUND, bm_ptr->dir, bm_ptr->damage, (bm_ptr->plev > 40 ? 3 : 2));
238 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
241 msg_print(_("カオスのブレスを吐いた。", "You breathe chaos."));
242 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BR_CHAOS), bm_ptr->plev, DAM_ROLL);
243 fire_breath(caster_ptr, GF_CHAOS, bm_ptr->dir, bm_ptr->damage, (bm_ptr->plev > 40 ? 3 : 2));
246 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
249 msg_print(_("劣化のブレスを吐いた。", "You breathe disenchantment."));
250 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BR_DISEN), bm_ptr->plev, DAM_ROLL);
251 fire_breath(caster_ptr, GF_DISENCHANT, bm_ptr->dir, bm_ptr->damage, (bm_ptr->plev > 40 ? 3 : 2));
254 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
257 msg_print(_("因果混乱のブレスを吐いた。", "You breathe nexus."));
258 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BR_NEXUS), bm_ptr->plev, DAM_ROLL);
259 fire_breath(caster_ptr, GF_NEXUS, bm_ptr->dir, bm_ptr->damage, (bm_ptr->plev > 40 ? 3 : 2));
262 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
265 msg_print(_("時間逆転のブレスを吐いた。", "You breathe time."));
266 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BR_TIME), bm_ptr->plev, DAM_ROLL);
267 fire_breath(caster_ptr, GF_TIME, bm_ptr->dir, bm_ptr->damage, (bm_ptr->plev > 40 ? 3 : 2));
270 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
273 msg_print(_("遅鈍のブレスを吐いた。", "You breathe inertia."));
274 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BR_INERTIA), bm_ptr->plev, DAM_ROLL);
275 fire_breath(caster_ptr, GF_INERTIAL, bm_ptr->dir, bm_ptr->damage, (bm_ptr->plev > 40 ? 3 : 2));
278 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
281 msg_print(_("重力のブレスを吐いた。", "You breathe gravity."));
282 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BR_GRAVITY), bm_ptr->plev, DAM_ROLL);
283 fire_breath(caster_ptr, GF_GRAVITY, bm_ptr->dir, bm_ptr->damage, (bm_ptr->plev > 40 ? 3 : 2));
286 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
289 msg_print(_("破片のブレスを吐いた。", "You breathe shards."));
290 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BR_SHARDS), bm_ptr->plev, DAM_ROLL);
291 fire_breath(caster_ptr, GF_SHARDS, bm_ptr->dir, bm_ptr->damage, (bm_ptr->plev > 40 ? 3 : 2));
294 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
297 msg_print(_("プラズマのブレスを吐いた。", "You breathe plasma."));
298 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BR_PLASMA), bm_ptr->plev, DAM_ROLL);
299 fire_breath(caster_ptr, GF_PLASMA, bm_ptr->dir, bm_ptr->damage, (bm_ptr->plev > 40 ? 3 : 2));
302 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
305 msg_print(_("フォースのブレスを吐いた。", "You breathe force."));
306 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BR_FORCE), bm_ptr->plev, DAM_ROLL);
307 fire_breath(caster_ptr, GF_FORCE, bm_ptr->dir, bm_ptr->damage, (bm_ptr->plev > 40 ? 3 : 2));
310 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
313 msg_print(_("魔力のブレスを吐いた。", "You breathe mana."));
314 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BR_MANA), bm_ptr->plev, DAM_ROLL);
315 fire_breath(caster_ptr, GF_MANA, bm_ptr->dir, bm_ptr->damage, (bm_ptr->plev > 40 ? 3 : 2));
318 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
321 msg_print(_("放射能球を放った。", "You cast a ball of radiation."));
322 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BALL_NUKE), bm_ptr->plev, DAM_ROLL);
323 fire_ball(caster_ptr, GF_NUKE, bm_ptr->dir, bm_ptr->damage, 2);
326 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
329 msg_print(_("放射性廃棄物のブレスを吐いた。", "You breathe toxic waste."));
330 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BR_NUKE), bm_ptr->plev, DAM_ROLL);
331 fire_breath(caster_ptr, GF_NUKE, bm_ptr->dir, bm_ptr->damage, (bm_ptr->plev > 40 ? 3 : 2));
334 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
337 msg_print(_("純ログルスを放った。", "You invoke a raw Logrus."));
338 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BALL_CHAOS), bm_ptr->plev, DAM_ROLL);
339 fire_ball(caster_ptr, GF_CHAOS, bm_ptr->dir, bm_ptr->damage, 4);
342 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
345 msg_print(_("分解のブレスを吐いた。", "You breathe disintegration."));
346 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BR_DISI), bm_ptr->plev, DAM_ROLL);
347 fire_breath(caster_ptr, GF_DISINTEGRATE, bm_ptr->dir, bm_ptr->damage, (bm_ptr->plev > 40 ? 3 : 2));
350 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
353 msg_print(_("アシッド・ボールの呪文を唱えた。", "You cast an acid ball."));
354 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BALL_ACID), bm_ptr->plev, DAM_ROLL);
355 fire_ball(caster_ptr, GF_ACID, bm_ptr->dir, bm_ptr->damage, 2);
358 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
361 msg_print(_("サンダー・ボールの呪文を唱えた。", "You cast a lightning ball."));
362 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BALL_ELEC), bm_ptr->plev, DAM_ROLL);
363 fire_ball(caster_ptr, GF_ELEC, bm_ptr->dir, bm_ptr->damage, 2);
366 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
369 msg_print(_("ファイア・ボールの呪文を唱えた。", "You cast a fire ball."));
370 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BALL_FIRE), bm_ptr->plev, DAM_ROLL);
371 fire_ball(caster_ptr, GF_FIRE, bm_ptr->dir, bm_ptr->damage, 2);
374 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
377 msg_print(_("アイス・ボールの呪文を唱えた。", "You cast a frost ball."));
378 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BALL_COLD), bm_ptr->plev, DAM_ROLL);
379 fire_ball(caster_ptr, GF_COLD, bm_ptr->dir, bm_ptr->damage, 2);
382 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
385 msg_print(_("悪臭雲の呪文を唱えた。", "You cast a stinking cloud."));
386 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BALL_POIS), bm_ptr->plev, DAM_ROLL);
387 fire_ball(caster_ptr, GF_POIS, bm_ptr->dir, bm_ptr->damage, 2);
390 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
393 msg_print(_("地獄球の呪文を唱えた。", "You cast a nether ball."));
394 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BALL_NETHER), bm_ptr->plev, DAM_ROLL);
395 fire_ball(caster_ptr, GF_NETHER, bm_ptr->dir, bm_ptr->damage, 2);
398 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
401 msg_print(_("流れるような身振りをした。", "You gesture fluidly."));
402 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BALL_WATER), bm_ptr->plev, DAM_ROLL);
403 fire_ball(caster_ptr, GF_WATER, bm_ptr->dir, bm_ptr->damage, 4);
406 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
409 msg_print(_("魔力の嵐の呪文を念じた。", "You invoke a mana storm."));
410 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BALL_MANA), bm_ptr->plev, DAM_ROLL);
411 fire_ball(caster_ptr, GF_MANA, bm_ptr->dir, bm_ptr->damage, 4);
414 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
417 msg_print(_("暗黒の嵐の呪文を念じた。", "You invoke a darkness storm."));
418 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BALL_DARK), bm_ptr->plev, DAM_ROLL);
419 fire_ball(caster_ptr, GF_DARK, bm_ptr->dir, bm_ptr->damage, 4);
422 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
425 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_DRAIN_MANA), bm_ptr->plev, DAM_ROLL);
426 fire_ball_hide(caster_ptr, GF_DRAIN_MANA, bm_ptr->dir, bm_ptr->damage, 0);
429 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
432 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_MIND_BLAST), bm_ptr->plev, DAM_ROLL);
433 fire_ball_hide(caster_ptr, GF_MIND_BLAST, bm_ptr->dir, bm_ptr->damage, 0);
436 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
439 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BRAIN_SMASH), bm_ptr->plev, DAM_ROLL);
440 fire_ball_hide(caster_ptr, GF_BRAIN_SMASH, bm_ptr->dir, bm_ptr->damage, 0);
443 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
446 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_CAUSE_1), bm_ptr->plev, DAM_ROLL);
447 fire_ball_hide(caster_ptr, GF_CAUSE_1, bm_ptr->dir, bm_ptr->damage, 0);
450 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
453 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_CAUSE_2), bm_ptr->plev, DAM_ROLL);
454 fire_ball_hide(caster_ptr, GF_CAUSE_2, bm_ptr->dir, bm_ptr->damage, 0);
457 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
460 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_CAUSE_3), bm_ptr->plev, DAM_ROLL);
461 fire_ball_hide(caster_ptr, GF_CAUSE_3, bm_ptr->dir, bm_ptr->damage, 0);
464 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
467 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_CAUSE_4), bm_ptr->plev, DAM_ROLL);
468 fire_ball_hide(caster_ptr, GF_CAUSE_4, bm_ptr->dir, bm_ptr->damage, 0);
471 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
474 msg_print(_("アシッド・ボルトの呪文を唱えた。", "You cast an acid bolt."));
475 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BOLT_ACID), bm_ptr->plev, DAM_ROLL);
476 fire_bolt(caster_ptr, GF_ACID, bm_ptr->dir, bm_ptr->damage);
479 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
482 msg_print(_("サンダー・ボルトの呪文を唱えた。", "You cast a lightning bolt."));
483 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BOLT_ELEC), bm_ptr->plev, DAM_ROLL);
484 fire_bolt(caster_ptr, GF_ELEC, bm_ptr->dir, bm_ptr->damage);
487 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
490 msg_print(_("ファイア・ボルトの呪文を唱えた。", "You cast a fire bolt."));
491 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BOLT_FIRE), bm_ptr->plev, DAM_ROLL);
492 fire_bolt(caster_ptr, GF_FIRE, bm_ptr->dir, bm_ptr->damage);
495 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
498 msg_print(_("アイス・ボルトの呪文を唱えた。", "You cast a frost bolt."));
499 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BOLT_COLD), bm_ptr->plev, DAM_ROLL);
500 fire_bolt(caster_ptr, GF_COLD, bm_ptr->dir, bm_ptr->damage);
503 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
506 msg_print(_("スターバーストの呪文を念じた。", "You invoke a starburst."));
507 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_STARBURST), bm_ptr->plev, DAM_ROLL);
508 fire_ball(caster_ptr, GF_LITE, bm_ptr->dir, bm_ptr->damage, 4);
511 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
514 msg_print(_("地獄の矢の呪文を唱えた。", "You cast a nether bolt."));
515 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BOLT_NETHER), bm_ptr->plev, DAM_ROLL);
516 fire_bolt(caster_ptr, GF_NETHER, bm_ptr->dir, bm_ptr->damage);
519 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
522 msg_print(_("ウォーター・ボルトの呪文を唱えた。", "You cast a water bolt."));
523 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BOLT_WATER), bm_ptr->plev, DAM_ROLL);
524 fire_bolt(caster_ptr, GF_WATER, bm_ptr->dir, bm_ptr->damage);
527 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
530 msg_print(_("魔力の矢の呪文を唱えた。", "You cast a mana bolt."));
531 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BOLT_MANA), bm_ptr->plev, DAM_ROLL);
532 fire_bolt(caster_ptr, GF_MANA, bm_ptr->dir, bm_ptr->damage);
535 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
538 msg_print(_("プラズマ・ボルトの呪文を唱えた。", "You cast a plasma bolt."));
539 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BOLT_PLASMA), bm_ptr->plev, DAM_ROLL);
540 fire_bolt(caster_ptr, GF_PLASMA, bm_ptr->dir, bm_ptr->damage);
543 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
546 msg_print(_("極寒の矢の呪文を唱えた。", "You cast a ice bolt."));
547 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_BOLT_ICE), bm_ptr->plev, DAM_ROLL);
548 fire_bolt(caster_ptr, GF_ICE, bm_ptr->dir, bm_ptr->damage);
550 case MS_MAGIC_MISSILE:
551 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
554 msg_print(_("マジック・ミサイルの呪文を唱えた。", "You cast a magic missile."));
555 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_MAGIC_MISSILE), bm_ptr->plev, DAM_ROLL);
556 fire_bolt(caster_ptr, GF_MISSILE, bm_ptr->dir, bm_ptr->damage);
559 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
562 msg_print(_("恐ろしげな幻覚を作り出した。", "You cast a fearful illusion."));
563 fear_monster(caster_ptr, bm_ptr->dir, bm_ptr->plev + 10);
566 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
568 confuse_monster(caster_ptr, bm_ptr->dir, bm_ptr->plev * 2);
571 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
574 msg_print(_("誘惑的な幻覚をつくり出した。", "You cast a mesmerizing illusion."));
575 confuse_monster(caster_ptr, bm_ptr->dir, bm_ptr->plev * 2);
578 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
580 slow_monster(caster_ptr, bm_ptr->dir, bm_ptr->plev);
583 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
585 sleep_monster(caster_ptr, bm_ptr->dir, bm_ptr->plev);
588 (void)set_fast(caster_ptr, randint1(20 + bm_ptr->plev) + bm_ptr->plev, FALSE);
591 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
594 msg_print(_("<破滅の手>を放った!", "You invoke the Hand of Doom!"));
595 fire_ball_hide(caster_ptr, GF_HAND_DOOM, bm_ptr->dir, bm_ptr->plev * 3, 0);
599 msg_print(_("自分の傷に念を集中した。", "You concentrate on your wounds!"));
600 (void)hp_player(caster_ptr, bm_ptr->plev * 4);
601 (void)set_stun(caster_ptr, 0);
602 (void)set_cut(caster_ptr, 0);
605 msg_print(_("無傷の球の呪文を唱えた。", "You cast a Globe of Invulnerability."));
606 (void)set_invuln(caster_ptr, randint1(4) + 4, FALSE);
609 teleport_player(caster_ptr, 10, TELEPORT_SPONTANEOUS);
612 teleport_player(caster_ptr, bm_ptr->plev * 5, TELEPORT_SPONTANEOUS);
615 (void)time_walk(caster_ptr);
622 GAME_TEXT m_name[MAX_NLEN];
624 if (!target_set(caster_ptr, TARGET_KILL))
627 if (!floor_ptr->grid_array[target_row][target_col].m_idx)
630 if (!player_has_los_bold(caster_ptr, target_row, target_col))
633 if (!projectable(caster_ptr, caster_ptr->y, caster_ptr->x, target_row, target_col))
636 m_ptr = &floor_ptr->m_list[floor_ptr->grid_array[target_row][target_col].m_idx];
637 r_ptr = &r_info[m_ptr->r_idx];
638 monster_desc(caster_ptr, m_name, m_ptr, 0);
639 if (r_ptr->flagsr & RFR_RES_TELE) {
640 if ((r_ptr->flags1 & RF1_UNIQUE) || (r_ptr->flagsr & RFR_RES_ALL)) {
641 if (is_original_ap_and_seen(caster_ptr, m_ptr))
642 r_ptr->r_flagsr |= RFR_RES_TELE;
643 msg_format(_("%sには効果がなかった!", "%s is unaffected!"), m_name);
645 } else if (r_ptr->level > randint1(100)) {
646 if (is_original_ap_and_seen(caster_ptr, m_ptr))
647 r_ptr->r_flagsr |= RFR_RES_TELE;
648 msg_format(_("%sには耐性がある!", "%s resists!"), m_name);
653 msg_format(_("%sを引き戻した。", "You command %s to return."), m_name);
654 teleport_monster_to(caster_ptr, floor_ptr->grid_array[target_row][target_col].m_idx, caster_ptr->y, caster_ptr->x, 100, TELEPORT_PASSIVE);
658 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
661 (void)fire_beam(caster_ptr, GF_AWAY_ALL, bm_ptr->dir, 100);
664 return teleport_level_other(caster_ptr);
667 if (!get_aim_dir(caster_ptr, &bm_ptr->dir))
670 msg_print(_("光の剣を放った。", "You throw a psycho-spear."));
671 bm_ptr->damage = monspell_bluemage_damage(caster_ptr, (MS_PSY_SPEAR), bm_ptr->plev, DAM_ROLL);
672 (void)fire_beam(caster_ptr, GF_PSY_SPEAR, bm_ptr->dir, bm_ptr->damage);
676 msg_print(_("暗闇の中で手を振った。", "You gesture in shadow."));
677 (void)unlite_area(caster_ptr, 10, 3);
680 if (!target_set(caster_ptr, TARGET_KILL))
683 msg_print(_("呪文を唱えて邪悪に微笑んだ。", "You cast a spell and cackle evilly."));
684 trap_creation(caster_ptr, target_row, target_col);
687 msg_print(_("しかし何も起きなかった。", "Nothing happen."));
690 msg_print(_("死者復活の呪文を唱えた。", "You animate the dead."));
691 (void)animate_dead(caster_ptr, 0, caster_ptr->y, caster_ptr->x);
694 msg_print(_("援軍を召喚した。", "You summon one of your kin."));
695 for (int k = 0; k < 1; k++) {
696 if (summon_kin_player(caster_ptr, bm_ptr->summon_lev, caster_ptr->y, caster_ptr->x, (bm_ptr->pet ? PM_FORCE_PET : 0L))) {
698 msg_print(_("召喚された仲間は怒っている!", "The summoned companion is angry!"));
700 bm_ptr->no_trump = TRUE;
707 msg_print(_("サイバーデーモンを召喚した!", "You summon a Cyberdemon!"));
708 for (int k = 0; k < 1; k++) {
709 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)) {
711 msg_print(_("召喚されたサイバーデーモンは怒っている!", "The summoned Cyberdemon are angry!"));
713 bm_ptr->no_trump = TRUE;
719 msg_print(_("仲間を召喚した。", "You summon help."));
720 for (int k = 0; k < 1; k++) {
721 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)) {
723 msg_print(_("召喚されたモンスターは怒っている!", "The summoned monster is angry!"));
725 bm_ptr->no_trump = TRUE;
731 case MS_S_MONSTERS: {
732 msg_print(_("モンスターを召喚した!", "You summon monsters!"));
733 for (int k = 0; k < bm_ptr->plev / 15 + 2; k++) {
734 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))) {
736 msg_print(_("召喚されたモンスターは怒っている!", "The summoned monsters are angry!"));
738 bm_ptr->no_trump = TRUE;
745 msg_print(_("アリを召喚した。", "You summon ants."));
747 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))) {
749 msg_print(_("召喚されたアリは怒っている!", "The summoned ants are angry!"));
751 bm_ptr->no_trump = TRUE;
757 msg_print(_("蜘蛛を召喚した。", "You summon spiders."));
759 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))) {
761 msg_print(_("召喚された蜘蛛は怒っている!", "Summoned spiders are angry!"));
763 bm_ptr->no_trump = TRUE;
769 msg_print(_("ハウンドを召喚した。", "You summon hounds."));
771 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))) {
773 msg_print(_("召喚されたハウンドは怒っている!", "Summoned hounds are angry!"));
775 bm_ptr->no_trump = TRUE;
781 msg_print(_("ヒドラを召喚した。", "You summon a hydras."));
783 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))) {
785 msg_print(_("召喚されたヒドラは怒っている!", "Summoned hydras are angry!"));
787 bm_ptr->no_trump = TRUE;
793 msg_print(_("天使を召喚した!", "You summon an angel!"));
795 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))) {
797 msg_print(_("召喚された天使は怒っている!", "The summoned angel is angry!"));
799 bm_ptr->no_trump = TRUE;
805 msg_print(_("混沌の宮廷から悪魔を召喚した!", "You summon a demon from the Courts of Chaos!"));
807 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))) {
809 msg_print(_("召喚されたデーモンは怒っている!", "The summoned demon is angry!"));
811 bm_ptr->no_trump = TRUE;
817 msg_print(_("アンデッドの強敵を召喚した!", "You summon an undead adversary!"));
819 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))) {
821 msg_print(_("召喚されたアンデッドは怒っている!", "The summoned undead is angry!"));
823 bm_ptr->no_trump = TRUE;
829 msg_print(_("ドラゴンを召喚した!", "You summon a dragon!"));
831 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))) {
833 msg_print(_("召喚されたドラゴンは怒っている!", "The summoned dragon is angry!"));
835 bm_ptr->no_trump = TRUE;
840 case MS_S_HI_UNDEAD: {
841 msg_print(_("強力なアンデッドを召喚した!", "You summon a greater undead!"));
842 if (summon_specific(caster_ptr, (bm_ptr->pet ? -1 : 0), caster_ptr->y, caster_ptr->x, bm_ptr->summon_lev, SUMMON_HI_UNDEAD,
843 (bm_ptr->g_mode | bm_ptr->p_mode | bm_ptr->u_mode))) {
845 msg_print(_("召喚された上級アンデッドは怒っている!", "The summoned greater undead is angry!"));
847 bm_ptr->no_trump = TRUE;
852 case MS_S_HI_DRAGON: {
853 msg_print(_("古代ドラゴンを召喚した!", "You summon an ancient dragon!"));
854 if (summon_specific(caster_ptr, (bm_ptr->pet ? -1 : 0), caster_ptr->y, caster_ptr->x, bm_ptr->summon_lev, SUMMON_HI_DRAGON,
855 (bm_ptr->g_mode | bm_ptr->p_mode | bm_ptr->u_mode))) {
857 msg_print(_("召喚された古代ドラゴンは怒っている!", "The summoned ancient dragon is angry!"));
859 bm_ptr->no_trump = TRUE;
864 case MS_S_AMBERITE: {
865 msg_print(_("アンバーの王族を召喚した!", "You summon a Lord of Amber!"));
866 if (summon_specific(caster_ptr, (bm_ptr->pet ? -1 : 0), caster_ptr->y, caster_ptr->x, bm_ptr->summon_lev, SUMMON_AMBERITES,
867 (bm_ptr->g_mode | bm_ptr->p_mode | bm_ptr->u_mode))) {
869 msg_print(_("召喚されたアンバーの王族は怒っている!", "The summoned Lord of Amber is angry!"));
871 bm_ptr->no_trump = TRUE;
878 msg_print(_("特別な強敵を召喚した!", "You summon a special opponent!"));
879 for (k = 0; k < 1; k++) {
880 if (summon_specific(caster_ptr, (bm_ptr->pet ? -1 : 0), caster_ptr->y, caster_ptr->x, bm_ptr->summon_lev, SUMMON_UNIQUE,
881 (bm_ptr->g_mode | bm_ptr->p_mode | PM_ALLOW_UNIQUE))) {
884 msg_print(_("召喚されたユニーク・モンスターは怒っている!", "The summoned special opponent is angry!"));
888 for (k = count; k < 1; k++) {
889 if (summon_specific(caster_ptr, (bm_ptr->pet ? -1 : 0), caster_ptr->y, caster_ptr->x, bm_ptr->summon_lev, SUMMON_HI_UNDEAD,
890 (bm_ptr->g_mode | bm_ptr->p_mode | PM_ALLOW_UNIQUE))) {
893 msg_print(_("召喚された上級アンデッドは怒っている!", "The summoned greater undead is angry!"));
898 bm_ptr->no_trump = TRUE;
906 if (bm_ptr->no_trump)
907 msg_print(_("何も現れなかった。", "No one appeared."));