1 #include "mspell/mspell-breath.h"
2 #include "core/disturbance.h"
3 #include "main/sound-definitions-table.h"
4 #include "main/sound-of-music.h"
5 #include "mind/drs-types.h"
6 #include "monster-race/race-indice-types.h"
7 #include "monster/monster-info.h"
8 #include "monster/monster-update.h"
9 #include "mspell/mspell-damage-calculator.h"
10 #include "mspell/mspell-util.h"
11 #include "mspell/mspells1.h"
12 #include "spell/spell-types.h"
13 #include "view/display-messages.h"
16 * @brief RF4_BR_*の処理。各種ブレス。 /
17 * @param target_ptr プレーヤーへの参照ポインタ
18 * @param GF_TYPE ブレスの属性
21 * @param m_idx 呪文を唱えるモンスターID
22 * @param t_idx 呪文を受けるモンスターID。プレイヤーの場合はdummyで0とする。
23 * @param TARGET_TYPE プレイヤーを対象とする場合MONSTER_TO_PLAYER、モンスターを対象とする場合MONSTER_TO_MONSTER
26 HIT_POINT spell_RF4_BREATH(player_type *target_ptr, int GF_TYPE, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
28 HIT_POINT dam, ms_type, drs_type = 0;
30 bool smart_learn_aux = TRUE;
31 floor_type *floor_ptr = target_ptr->current_floor_ptr;
32 monster_type *m_ptr = &floor_ptr->m_list[m_idx];
33 bool known = monster_near_player(floor_ptr, m_idx, t_idx);
34 bool see_either = see_monster(target_ptr, m_idx) || see_monster(target_ptr, t_idx);
35 bool mon_to_mon = (TARGET_TYPE == MONSTER_TO_MONSTER);
36 bool mon_to_player = (TARGET_TYPE == MONSTER_TO_PLAYER);
37 GAME_TEXT m_name[MAX_NLEN], t_name[MAX_NLEN];
38 monster_name(target_ptr, m_idx, m_name);
39 monster_name(target_ptr, t_idx, t_name);
43 dam = monspell_damage(target_ptr, (MS_BR_ACID), m_idx, DAM_ROLL);
44 type_s = _("酸", "acid");
49 dam = monspell_damage(target_ptr, (MS_BR_ELEC), m_idx, DAM_ROLL);
50 type_s = _("稲妻", "lightning");
55 dam = monspell_damage(target_ptr, (MS_BR_FIRE), m_idx, DAM_ROLL);
56 type_s = _("火炎", "fire");
61 dam = monspell_damage(target_ptr, (MS_BR_COLD), m_idx, DAM_ROLL);
62 type_s = _("冷気", "frost");
67 dam = monspell_damage(target_ptr, (MS_BR_POIS), m_idx, DAM_ROLL);
68 type_s = _("ガス", "gas");
73 dam = monspell_damage(target_ptr, (MS_BR_NETHER), m_idx, DAM_ROLL);
74 type_s = _("地獄", "nether");
75 ms_type = MS_BR_NETHER;
79 dam = monspell_damage(target_ptr, (MS_BR_LITE), m_idx, DAM_ROLL);
80 type_s = _("閃光", "light");
85 dam = monspell_damage(target_ptr, (MS_BR_DARK), m_idx, DAM_ROLL);
86 type_s = _("暗黒", "darkness");
91 dam = monspell_damage(target_ptr, (MS_BR_CONF), m_idx, DAM_ROLL);
92 type_s = _("混乱", "confusion");
97 dam = monspell_damage(target_ptr, (MS_BR_SOUND), m_idx, DAM_ROLL);
98 type_s = _("轟音", "sound");
99 ms_type = MS_BR_SOUND;
100 drs_type = DRS_SOUND;
103 dam = monspell_damage(target_ptr, (MS_BR_CHAOS), m_idx, DAM_ROLL);
104 type_s = _("カオス", "chaos");
105 ms_type = MS_BR_CHAOS;
106 drs_type = DRS_CHAOS;
109 dam = monspell_damage(target_ptr, (MS_BR_DISEN), m_idx, DAM_ROLL);
110 type_s = _("劣化", "disenchantment");
111 ms_type = MS_BR_DISEN;
112 drs_type = DRS_DISEN;
115 dam = monspell_damage(target_ptr, (MS_BR_NEXUS), m_idx, DAM_ROLL);
116 type_s = _("因果混乱", "nexus");
117 ms_type = MS_BR_NEXUS;
118 drs_type = DRS_NEXUS;
121 dam = monspell_damage(target_ptr, (MS_BR_TIME), m_idx, DAM_ROLL);
122 type_s = _("時間逆転", "time");
123 ms_type = MS_BR_TIME;
124 smart_learn_aux = FALSE;
127 dam = monspell_damage(target_ptr, (MS_BR_INERTIA), m_idx, DAM_ROLL);
128 type_s = _("遅鈍", "inertia");
129 ms_type = MS_BR_INERTIA;
130 smart_learn_aux = FALSE;
133 dam = monspell_damage(target_ptr, (MS_BR_GRAVITY), m_idx, DAM_ROLL);
134 type_s = _("重力", "gravity");
135 ms_type = MS_BR_GRAVITY;
136 smart_learn_aux = FALSE;
139 dam = monspell_damage(target_ptr, (MS_BR_SHARDS), m_idx, DAM_ROLL);
140 type_s = _("破片", "shards");
141 ms_type = MS_BR_SHARDS;
142 drs_type = DRS_SHARD;
145 dam = monspell_damage(target_ptr, (MS_BR_PLASMA), m_idx, DAM_ROLL);
146 type_s = _("プラズマ", "plasma");
147 ms_type = MS_BR_PLASMA;
148 smart_learn_aux = FALSE;
151 dam = monspell_damage(target_ptr, (MS_BR_FORCE), m_idx, DAM_ROLL);
152 type_s = _("フォース", "force");
153 ms_type = MS_BR_FORCE;
154 smart_learn_aux = FALSE;
157 dam = monspell_damage(target_ptr, (MS_BR_MANA), m_idx, DAM_ROLL);
158 type_s = _("魔力", "mana");
159 ms_type = MS_BR_MANA;
160 smart_learn_aux = FALSE;
163 dam = monspell_damage(target_ptr, (MS_BR_NUKE), m_idx, DAM_ROLL);
164 type_s = _("放射性廃棄物", "toxic waste");
165 ms_type = MS_BR_NUKE;
168 case GF_DISINTEGRATE:
169 dam = monspell_damage(target_ptr, (MS_BR_DISI), m_idx, DAM_ROLL);
170 type_s = _("分解", "disintegration");
171 ms_type = MS_BR_DISI;
172 smart_learn_aux = FALSE;
175 /* Do not reach here */
177 type_s = _("不明", "Unknown");
178 ms_type = MS_BR_ACID;
179 smart_learn_aux = FALSE;
183 if (mon_to_player || (mon_to_mon && known && see_either))
184 disturb(target_ptr, TRUE, TRUE);
186 if (m_ptr->r_idx == MON_JAIAN && GF_TYPE == GF_SOUND) {
187 msg_format(_("「ボォエ~~~~~~」", "'Booooeeeeee'"));
188 } else if (m_ptr->r_idx == MON_BOTEI && GF_TYPE == GF_SHARDS) {
189 msg_format(_("「ボ帝ビルカッター!!!」", "'Boty-Build cutter!!!'"));
190 } else if (target_ptr->blind) {
191 if (mon_to_player || (mon_to_mon && known && see_either))
192 msg_format(_("%^sが何かのブレスを吐いた。", "%^s breathes."), m_name);
195 msg_format(_("%^sが%^sのブレスを吐いた。", "%^s breathes %^s."), m_name, type_s);
196 } else if (mon_to_mon && known && see_either) {
197 _(msg_format("%^sが%^sに%^sのブレスを吐いた。", m_name, t_name, type_s), msg_format("%^s breathes %^s at %^s.", m_name, type_s, t_name));
201 if (mon_to_mon && known && !see_either)
202 floor_ptr->monster_noise = TRUE;
205 breath(target_ptr, y, x, m_idx, GF_TYPE, dam, 0, TRUE, ms_type, TARGET_TYPE);
206 if (smart_learn_aux && mon_to_player)
207 update_smart_learn(target_ptr, m_idx, drs_type);