1 #include "blue-magic/blue-magic-breath.h"
2 #include "blue-magic/blue-magic-util.h"
3 #include "mind/mind-blue-mage.h"
4 #include "mspell/mspell-damage-calculator.h"
5 #include "mspell/mspell-type.h"
6 #include "spell-kind/spells-launcher.h"
7 #include "spell/spell-types.h"
8 #include "target/target-getter.h"
9 #include "view/display-messages.h"
11 bool cast_blue_breath_acid(player_type *caster_ptr, bmc_type *bmc_ptr)
13 if (!get_aim_dir(caster_ptr, &bmc_ptr->dir))
16 msg_print(_("酸のブレスを吐いた。", "You breathe acid."));
17 bmc_ptr->damage = monspell_bluemage_damage(caster_ptr, MS_BR_ACID, bmc_ptr->plev, DAM_ROLL);
18 fire_breath(caster_ptr, GF_ACID, bmc_ptr->dir, bmc_ptr->damage, (bmc_ptr->plev > 40 ? 3 : 2));
22 bool cast_blue_breath_elec(player_type *caster_ptr, bmc_type *bmc_ptr)
24 if (!get_aim_dir(caster_ptr, &bmc_ptr->dir))
27 msg_print(_("稲妻のブレスを吐いた。", "You breathe lightning."));
28 bmc_ptr->damage = monspell_bluemage_damage(caster_ptr, MS_BR_ELEC, bmc_ptr->plev, DAM_ROLL);
29 fire_breath(caster_ptr, GF_ELEC, bmc_ptr->dir, bmc_ptr->damage, (bmc_ptr->plev > 40 ? 3 : 2));
33 bool cast_blue_breath_fire(player_type *caster_ptr, bmc_type *bmc_ptr)
35 if (!get_aim_dir(caster_ptr, &bmc_ptr->dir))
38 msg_print(_("火炎のブレスを吐いた。", "You breathe fire."));
39 bmc_ptr->damage = monspell_bluemage_damage(caster_ptr, MS_BR_FIRE, bmc_ptr->plev, DAM_ROLL);
40 fire_breath(caster_ptr, GF_FIRE, bmc_ptr->dir, bmc_ptr->damage, (bmc_ptr->plev > 40 ? 3 : 2));
44 bool cast_blue_breath_cold(player_type *caster_ptr, bmc_type *bmc_ptr)
46 if (!get_aim_dir(caster_ptr, &bmc_ptr->dir))
49 msg_print(_("冷気のブレスを吐いた。", "You breathe frost."));
50 bmc_ptr->damage = monspell_bluemage_damage(caster_ptr, MS_BR_COLD, bmc_ptr->plev, DAM_ROLL);
51 fire_breath(caster_ptr, GF_COLD, bmc_ptr->dir, bmc_ptr->damage, (bmc_ptr->plev > 40 ? 3 : 2));
55 bool cast_blue_breath_pois(player_type *caster_ptr, bmc_type *bmc_ptr)
57 if (!get_aim_dir(caster_ptr, &bmc_ptr->dir))
60 msg_print(_("ガスのブレスを吐いた。", "You breathe gas."));
61 bmc_ptr->damage = monspell_bluemage_damage(caster_ptr, MS_BR_POIS, bmc_ptr->plev, DAM_ROLL);
62 fire_breath(caster_ptr, GF_POIS, bmc_ptr->dir, bmc_ptr->damage, (bmc_ptr->plev > 40 ? 3 : 2));
66 bool cast_blue_breath_nether(player_type *caster_ptr, bmc_type *bmc_ptr)
68 if (!get_aim_dir(caster_ptr, &bmc_ptr->dir))
71 msg_print(_("地獄のブレスを吐いた。", "You breathe nether."));
72 bmc_ptr->damage = monspell_bluemage_damage(caster_ptr, MS_BR_NETHER, bmc_ptr->plev, DAM_ROLL);
73 fire_breath(caster_ptr, GF_NETHER, bmc_ptr->dir, bmc_ptr->damage, (bmc_ptr->plev > 40 ? 3 : 2));
77 bool cast_blue_breath_lite(player_type *caster_ptr, bmc_type *bmc_ptr)
79 if (!get_aim_dir(caster_ptr, &bmc_ptr->dir))
82 msg_print(_("閃光のブレスを吐いた。", "You breathe light."));
83 bmc_ptr->damage = monspell_bluemage_damage(caster_ptr, MS_BR_LITE, bmc_ptr->plev, DAM_ROLL);
84 fire_breath(caster_ptr, GF_LITE, bmc_ptr->dir, bmc_ptr->damage, (bmc_ptr->plev > 40 ? 3 : 2));
88 bool cast_blue_breath_dark(player_type *caster_ptr, bmc_type *bmc_ptr)
90 if (!get_aim_dir(caster_ptr, &bmc_ptr->dir))
93 msg_print(_("暗黒のブレスを吐いた。", "You breathe darkness."));
94 bmc_ptr->damage = monspell_bluemage_damage(caster_ptr, MS_BR_DARK, bmc_ptr->plev, DAM_ROLL);
95 fire_breath(caster_ptr, GF_DARK, bmc_ptr->dir, bmc_ptr->damage, (bmc_ptr->plev > 40 ? 3 : 2));
99 bool cast_blue_breath_conf(player_type *caster_ptr, bmc_type *bmc_ptr)
101 if (!get_aim_dir(caster_ptr, &bmc_ptr->dir))
104 msg_print(_("混乱のブレスを吐いた。", "You breathe confusion."));
105 bmc_ptr->damage = monspell_bluemage_damage(caster_ptr, MS_BR_CONF, bmc_ptr->plev, DAM_ROLL);
106 fire_breath(caster_ptr, GF_CONFUSION, bmc_ptr->dir, bmc_ptr->damage, (bmc_ptr->plev > 40 ? 3 : 2));
110 bool cast_blue_breath_sound(player_type *caster_ptr, bmc_type *bmc_ptr)
112 if (!get_aim_dir(caster_ptr, &bmc_ptr->dir))
115 msg_print(_("轟音のブレスを吐いた。", "You breathe sound."));
116 bmc_ptr->damage = monspell_bluemage_damage(caster_ptr, MS_BR_SOUND, bmc_ptr->plev, DAM_ROLL);
117 fire_breath(caster_ptr, GF_SOUND, bmc_ptr->dir, bmc_ptr->damage, (bmc_ptr->plev > 40 ? 3 : 2));
121 bool cast_blue_breath_chaos(player_type *caster_ptr, bmc_type *bmc_ptr)
123 if (!get_aim_dir(caster_ptr, &bmc_ptr->dir))
126 msg_print(_("カオスのブレスを吐いた。", "You breathe chaos."));
127 bmc_ptr->damage = monspell_bluemage_damage(caster_ptr, MS_BR_CHAOS, bmc_ptr->plev, DAM_ROLL);
128 fire_breath(caster_ptr, GF_CHAOS, bmc_ptr->dir, bmc_ptr->damage, (bmc_ptr->plev > 40 ? 3 : 2));
132 bool cast_blue_breath_disenchant(player_type *caster_ptr, bmc_type *bmc_ptr)
134 if (!get_aim_dir(caster_ptr, &bmc_ptr->dir))
137 msg_print(_("劣化のブレスを吐いた。", "You breathe disenchantment."));
138 bmc_ptr->damage = monspell_bluemage_damage(caster_ptr, MS_BR_DISEN, bmc_ptr->plev, DAM_ROLL);
139 fire_breath(caster_ptr, GF_DISENCHANT, bmc_ptr->dir, bmc_ptr->damage, (bmc_ptr->plev > 40 ? 3 : 2));
143 bool cast_blue_breath_nexus(player_type *caster_ptr, bmc_type *bmc_ptr)
145 if (!get_aim_dir(caster_ptr, &bmc_ptr->dir))
148 msg_print(_("因果混乱のブレスを吐いた。", "You breathe nexus."));
149 bmc_ptr->damage = monspell_bluemage_damage(caster_ptr, MS_BR_NEXUS, bmc_ptr->plev, DAM_ROLL);
150 fire_breath(caster_ptr, GF_NEXUS, bmc_ptr->dir, bmc_ptr->damage, (bmc_ptr->plev > 40 ? 3 : 2));
154 bool cast_blue_breath_time(player_type *caster_ptr, bmc_type *bmc_ptr)
156 if (!get_aim_dir(caster_ptr, &bmc_ptr->dir))
159 msg_print(_("時間逆転のブレスを吐いた。", "You breathe time."));
160 bmc_ptr->damage = monspell_bluemage_damage(caster_ptr, MS_BR_TIME, bmc_ptr->plev, DAM_ROLL);
161 fire_breath(caster_ptr, GF_TIME, bmc_ptr->dir, bmc_ptr->damage, (bmc_ptr->plev > 40 ? 3 : 2));
165 bool cast_blue_breath_inertia(player_type *caster_ptr, bmc_type *bmc_ptr)
167 if (!get_aim_dir(caster_ptr, &bmc_ptr->dir))
170 msg_print(_("遅鈍のブレスを吐いた。", "You breathe inertia."));
171 bmc_ptr->damage = monspell_bluemage_damage(caster_ptr, MS_BR_INERTIA, bmc_ptr->plev, DAM_ROLL);
172 fire_breath(caster_ptr, GF_INERTIAL, bmc_ptr->dir, bmc_ptr->damage, (bmc_ptr->plev > 40 ? 3 : 2));
176 bool cast_blue_breath_gravity(player_type *caster_ptr, bmc_type *bmc_ptr)
178 if (!get_aim_dir(caster_ptr, &bmc_ptr->dir))
181 msg_print(_("重力のブレスを吐いた。", "You breathe gravity."));
182 bmc_ptr->damage = monspell_bluemage_damage(caster_ptr, MS_BR_GRAVITY, bmc_ptr->plev, DAM_ROLL);
183 fire_breath(caster_ptr, GF_GRAVITY, bmc_ptr->dir, bmc_ptr->damage, (bmc_ptr->plev > 40 ? 3 : 2));
187 bool cast_blue_breath_shards(player_type *caster_ptr, bmc_type *bmc_ptr)
189 if (!get_aim_dir(caster_ptr, &bmc_ptr->dir))
192 msg_print(_("破片のブレスを吐いた。", "You breathe shards."));
193 bmc_ptr->damage = monspell_bluemage_damage(caster_ptr, MS_BR_SHARDS, bmc_ptr->plev, DAM_ROLL);
194 fire_breath(caster_ptr, GF_SHARDS, bmc_ptr->dir, bmc_ptr->damage, (bmc_ptr->plev > 40 ? 3 : 2));
198 bool cast_blue_breath_plasma(player_type *caster_ptr, bmc_type *bmc_ptr)
200 if (!get_aim_dir(caster_ptr, &bmc_ptr->dir))
203 msg_print(_("プラズマのブレスを吐いた。", "You breathe plasma."));
204 bmc_ptr->damage = monspell_bluemage_damage(caster_ptr, MS_BR_PLASMA, bmc_ptr->plev, DAM_ROLL);
205 fire_breath(caster_ptr, GF_PLASMA, bmc_ptr->dir, bmc_ptr->damage, (bmc_ptr->plev > 40 ? 3 : 2));
209 bool cast_blue_breath_force(player_type *caster_ptr, bmc_type *bmc_ptr)
211 if (!get_aim_dir(caster_ptr, &bmc_ptr->dir))
214 msg_print(_("フォースのブレスを吐いた。", "You breathe force."));
215 bmc_ptr->damage = monspell_bluemage_damage(caster_ptr, MS_BR_FORCE, bmc_ptr->plev, DAM_ROLL);
216 fire_breath(caster_ptr, GF_FORCE, bmc_ptr->dir, bmc_ptr->damage, (bmc_ptr->plev > 40 ? 3 : 2));
220 bool cast_blue_breath_mana(player_type *caster_ptr, bmc_type *bmc_ptr)
222 if (!get_aim_dir(caster_ptr, &bmc_ptr->dir))
225 msg_print(_("魔力のブレスを吐いた。", "You breathe mana."));
226 bmc_ptr->damage = monspell_bluemage_damage(caster_ptr, MS_BR_MANA, bmc_ptr->plev, DAM_ROLL);
227 fire_breath(caster_ptr, GF_MANA, bmc_ptr->dir, bmc_ptr->damage, (bmc_ptr->plev > 40 ? 3 : 2));
231 bool cast_blue_breath_nuke(player_type *caster_ptr, bmc_type *bmc_ptr)
233 if (!get_aim_dir(caster_ptr, &bmc_ptr->dir))
236 msg_print(_("放射性廃棄物のブレスを吐いた。", "You breathe toxic waste."));
237 bmc_ptr->damage = monspell_bluemage_damage(caster_ptr, MS_BR_NUKE, bmc_ptr->plev, DAM_ROLL);
238 fire_breath(caster_ptr, GF_NUKE, bmc_ptr->dir, bmc_ptr->damage, (bmc_ptr->plev > 40 ? 3 : 2));
244 * @param caster_ptr プレーヤーへの参照ポインタ
245 * @param bmc_ptr 青魔法詠唱への参照ポインタ
246 * @details 永久の刻は過ぎ去れリ.
248 bool cast_blue_breath_disintegration(player_type *caster_ptr, bmc_type *bmc_ptr)
250 if (!get_aim_dir(caster_ptr, &bmc_ptr->dir))
253 msg_print(_("分解のブレスを吐いた。", "You breathe disintegration."));
254 bmc_ptr->damage = monspell_bluemage_damage(caster_ptr, MS_BR_DISI, bmc_ptr->plev, DAM_ROLL);
255 fire_breath(caster_ptr, GF_DISINTEGRATE, bmc_ptr->dir, bmc_ptr->damage, (bmc_ptr->plev > 40 ? 3 : 2));