1 #include "system/angband.h"
2 #include "mspell/mspell-breath.h"
3 #include "mspell/monster-spell.h"
4 #include "spell/spells-type.h"
5 #include "main/sound-definitions-table.h"
6 #include "mspell/mspell-util.h"
7 #include "mspell/mspell-damage-calculator.h"
8 #include "player/player-move.h"
11 * @brief RF4_BR_*の処理。各種ブレス。 /
12 * @param target_ptr プレーヤーへの参照ポインタ
13 * @param GF_TYPE ブレスの属性
16 * @param m_idx 呪文を唱えるモンスターID
17 * @param t_idx 呪文を受けるモンスターID。プレイヤーの場合はdummyで0とする。
18 * @param TARGET_TYPE プレイヤーを対象とする場合MONSTER_TO_PLAYER、モンスターを対象とする場合MONSTER_TO_MONSTER
21 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)
23 HIT_POINT dam, ms_type, drs_type = 0;
25 bool smart_learn_aux = TRUE;
26 floor_type* floor_ptr = target_ptr->current_floor_ptr;
27 monster_type* m_ptr = &floor_ptr->m_list[m_idx];
28 bool known = monster_near_player(floor_ptr, m_idx, t_idx);
29 bool see_either = see_monster(target_ptr->current_floor_ptr, m_idx) || see_monster(target_ptr->current_floor_ptr, t_idx);
30 bool mon_to_mon = (TARGET_TYPE == MONSTER_TO_MONSTER);
31 bool mon_to_player = (TARGET_TYPE == MONSTER_TO_PLAYER);
32 GAME_TEXT m_name[MAX_NLEN], t_name[MAX_NLEN];
33 monster_name(target_ptr, m_idx, m_name);
34 monster_name(target_ptr, t_idx, t_name);
38 dam = monspell_damage(target_ptr, (MS_BR_ACID), m_idx, DAM_ROLL);
39 type_s = _("酸", "acid");
44 dam = monspell_damage(target_ptr, (MS_BR_ELEC), m_idx, DAM_ROLL);
45 type_s = _("稲妻", "lightning");
50 dam = monspell_damage(target_ptr, (MS_BR_FIRE), m_idx, DAM_ROLL);
51 type_s = _("火炎", "fire");
56 dam = monspell_damage(target_ptr, (MS_BR_COLD), m_idx, DAM_ROLL);
57 type_s = _("冷気", "frost");
62 dam = monspell_damage(target_ptr, (MS_BR_POIS), m_idx, DAM_ROLL);
63 type_s = _("ガス", "gas");
68 dam = monspell_damage(target_ptr, (MS_BR_NETHER), m_idx, DAM_ROLL);
69 type_s = _("地獄", "nether");
70 ms_type = MS_BR_NETHER;
74 dam = monspell_damage(target_ptr, (MS_BR_LITE), m_idx, DAM_ROLL);
75 type_s = _("閃光", "light");
80 dam = monspell_damage(target_ptr, (MS_BR_DARK), m_idx, DAM_ROLL);
81 type_s = _("暗黒", "darkness");
86 dam = monspell_damage(target_ptr, (MS_BR_CONF), m_idx, DAM_ROLL);
87 type_s = _("混乱", "confusion");
92 dam = monspell_damage(target_ptr, (MS_BR_SOUND), m_idx, DAM_ROLL);
93 type_s = _("轟音", "sound");
94 ms_type = MS_BR_SOUND;
98 dam = monspell_damage(target_ptr, (MS_BR_CHAOS), m_idx, DAM_ROLL);
99 type_s = _("カオス", "chaos");
100 ms_type = MS_BR_CHAOS;
101 drs_type = DRS_CHAOS;
104 dam = monspell_damage(target_ptr, (MS_BR_DISEN), m_idx, DAM_ROLL);
105 type_s = _("劣化", "disenchantment");
106 ms_type = MS_BR_DISEN;
107 drs_type = DRS_DISEN;
110 dam = monspell_damage(target_ptr, (MS_BR_NEXUS), m_idx, DAM_ROLL);
111 type_s = _("因果混乱", "nexus");
112 ms_type = MS_BR_NEXUS;
113 drs_type = DRS_NEXUS;
116 dam = monspell_damage(target_ptr, (MS_BR_TIME), m_idx, DAM_ROLL);
117 type_s = _("時間逆転", "time");
118 ms_type = MS_BR_TIME;
119 smart_learn_aux = FALSE;
122 dam = monspell_damage(target_ptr, (MS_BR_INERTIA), m_idx, DAM_ROLL);
123 type_s = _("遅鈍", "inertia");
124 ms_type = MS_BR_INERTIA;
125 smart_learn_aux = FALSE;
128 dam = monspell_damage(target_ptr, (MS_BR_GRAVITY), m_idx, DAM_ROLL);
129 type_s = _("重力", "gravity");
130 ms_type = MS_BR_GRAVITY;
131 smart_learn_aux = FALSE;
134 dam = monspell_damage(target_ptr, (MS_BR_SHARDS), m_idx, DAM_ROLL);
135 type_s = _("破片", "shards");
136 ms_type = MS_BR_SHARDS;
137 drs_type = DRS_SHARD;
140 dam = monspell_damage(target_ptr, (MS_BR_PLASMA), m_idx, DAM_ROLL);
141 type_s = _("プラズマ", "plasma");
142 ms_type = MS_BR_PLASMA;
143 smart_learn_aux = FALSE;
146 dam = monspell_damage(target_ptr, (MS_BR_FORCE), m_idx, DAM_ROLL);
147 type_s = _("フォース", "force");
148 ms_type = MS_BR_FORCE;
149 smart_learn_aux = FALSE;
152 dam = monspell_damage(target_ptr, (MS_BR_MANA), m_idx, DAM_ROLL);
153 type_s = _("魔力", "mana");
154 ms_type = MS_BR_MANA;
155 smart_learn_aux = FALSE;
158 dam = monspell_damage(target_ptr, (MS_BR_NUKE), m_idx, DAM_ROLL);
159 type_s = _("放射性廃棄物", "toxic waste");
160 ms_type = MS_BR_NUKE;
163 case GF_DISINTEGRATE:
164 dam = monspell_damage(target_ptr, (MS_BR_DISI), m_idx, DAM_ROLL);
165 type_s = _("分解", "disintegration");
166 ms_type = MS_BR_DISI;
167 smart_learn_aux = FALSE;
170 /* Do not reach here */
172 type_s = _("不明", "Unknown");
173 ms_type = MS_BR_ACID;
174 smart_learn_aux = FALSE;
178 if (mon_to_player || (mon_to_mon && known && see_either))
179 disturb(target_ptr, TRUE, TRUE);
181 if (m_ptr->r_idx == MON_JAIAN && GF_TYPE == GF_SOUND) {
182 msg_format(_("「ボォエ~~~~~~」", "'Booooeeeeee'"));
183 } else if (m_ptr->r_idx == MON_BOTEI && GF_TYPE == GF_SHARDS) {
184 msg_format(_("「ボ帝ビルカッター!!!」", "'Boty-Build cutter!!!'"));
185 } else if (target_ptr->blind) {
186 if (mon_to_player || (mon_to_mon && known && see_either))
187 msg_format(_("%^sが何かのブレスを吐いた。", "%^s breathes."), m_name);
190 msg_format(_("%^sが%^sのブレスを吐いた。", "%^s breathes %^s."), m_name, type_s);
191 } else if (mon_to_mon && known && see_either) {
192 _(msg_format("%^sが%^sに%^sのブレスを吐いた。", m_name, t_name, type_s),
193 msg_format("%^s breathes %^s at %^s.", m_name, type_s, t_name));
197 if (mon_to_mon && known && !see_either)
198 floor_ptr->monster_noise = TRUE;
201 breath(target_ptr, y, x, m_idx, GF_TYPE, dam, 0, TRUE, ms_type, TARGET_TYPE);
202 if (smart_learn_aux && mon_to_player)
203 update_smart_learn(target_ptr, m_idx, drs_type);