1 #include "mspell/mspell-breath.h"
2 #include "main/sound-definitions-table.h"
3 #include "mind/drs-types.h"
4 #include "monster-race/race-indice-types.h"
5 #include "monster/monster-info.h"
6 #include "monster/monster-update.h"
7 #include "mspell/monster-spell.h"
8 #include "mspell/mspell-damage-calculator.h"
9 #include "mspell/mspell-util.h"
10 #include "player/player-move.h"
11 #include "spell/spells-type.h"
14 * @brief RF4_BR_*の処理。各種ブレス。 /
15 * @param target_ptr プレーヤーへの参照ポインタ
16 * @param GF_TYPE ブレスの属性
19 * @param m_idx 呪文を唱えるモンスターID
20 * @param t_idx 呪文を受けるモンスターID。プレイヤーの場合はdummyで0とする。
21 * @param TARGET_TYPE プレイヤーを対象とする場合MONSTER_TO_PLAYER、モンスターを対象とする場合MONSTER_TO_MONSTER
24 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)
26 HIT_POINT dam, ms_type, drs_type = 0;
28 bool smart_learn_aux = TRUE;
29 floor_type *floor_ptr = target_ptr->current_floor_ptr;
30 monster_type *m_ptr = &floor_ptr->m_list[m_idx];
31 bool known = monster_near_player(floor_ptr, m_idx, t_idx);
32 bool see_either = see_monster(target_ptr->current_floor_ptr, m_idx) || see_monster(target_ptr->current_floor_ptr, t_idx);
33 bool mon_to_mon = (TARGET_TYPE == MONSTER_TO_MONSTER);
34 bool mon_to_player = (TARGET_TYPE == MONSTER_TO_PLAYER);
35 GAME_TEXT m_name[MAX_NLEN], t_name[MAX_NLEN];
36 monster_name(target_ptr, m_idx, m_name);
37 monster_name(target_ptr, t_idx, t_name);
41 dam = monspell_damage(target_ptr, (MS_BR_ACID), m_idx, DAM_ROLL);
42 type_s = _("酸", "acid");
47 dam = monspell_damage(target_ptr, (MS_BR_ELEC), m_idx, DAM_ROLL);
48 type_s = _("稲妻", "lightning");
53 dam = monspell_damage(target_ptr, (MS_BR_FIRE), m_idx, DAM_ROLL);
54 type_s = _("火炎", "fire");
59 dam = monspell_damage(target_ptr, (MS_BR_COLD), m_idx, DAM_ROLL);
60 type_s = _("冷気", "frost");
65 dam = monspell_damage(target_ptr, (MS_BR_POIS), m_idx, DAM_ROLL);
66 type_s = _("ガス", "gas");
71 dam = monspell_damage(target_ptr, (MS_BR_NETHER), m_idx, DAM_ROLL);
72 type_s = _("地獄", "nether");
73 ms_type = MS_BR_NETHER;
77 dam = monspell_damage(target_ptr, (MS_BR_LITE), m_idx, DAM_ROLL);
78 type_s = _("閃光", "light");
83 dam = monspell_damage(target_ptr, (MS_BR_DARK), m_idx, DAM_ROLL);
84 type_s = _("暗黒", "darkness");
89 dam = monspell_damage(target_ptr, (MS_BR_CONF), m_idx, DAM_ROLL);
90 type_s = _("混乱", "confusion");
95 dam = monspell_damage(target_ptr, (MS_BR_SOUND), m_idx, DAM_ROLL);
96 type_s = _("轟音", "sound");
97 ms_type = MS_BR_SOUND;
101 dam = monspell_damage(target_ptr, (MS_BR_CHAOS), m_idx, DAM_ROLL);
102 type_s = _("カオス", "chaos");
103 ms_type = MS_BR_CHAOS;
104 drs_type = DRS_CHAOS;
107 dam = monspell_damage(target_ptr, (MS_BR_DISEN), m_idx, DAM_ROLL);
108 type_s = _("劣化", "disenchantment");
109 ms_type = MS_BR_DISEN;
110 drs_type = DRS_DISEN;
113 dam = monspell_damage(target_ptr, (MS_BR_NEXUS), m_idx, DAM_ROLL);
114 type_s = _("因果混乱", "nexus");
115 ms_type = MS_BR_NEXUS;
116 drs_type = DRS_NEXUS;
119 dam = monspell_damage(target_ptr, (MS_BR_TIME), m_idx, DAM_ROLL);
120 type_s = _("時間逆転", "time");
121 ms_type = MS_BR_TIME;
122 smart_learn_aux = FALSE;
125 dam = monspell_damage(target_ptr, (MS_BR_INERTIA), m_idx, DAM_ROLL);
126 type_s = _("遅鈍", "inertia");
127 ms_type = MS_BR_INERTIA;
128 smart_learn_aux = FALSE;
131 dam = monspell_damage(target_ptr, (MS_BR_GRAVITY), m_idx, DAM_ROLL);
132 type_s = _("重力", "gravity");
133 ms_type = MS_BR_GRAVITY;
134 smart_learn_aux = FALSE;
137 dam = monspell_damage(target_ptr, (MS_BR_SHARDS), m_idx, DAM_ROLL);
138 type_s = _("破片", "shards");
139 ms_type = MS_BR_SHARDS;
140 drs_type = DRS_SHARD;
143 dam = monspell_damage(target_ptr, (MS_BR_PLASMA), m_idx, DAM_ROLL);
144 type_s = _("プラズマ", "plasma");
145 ms_type = MS_BR_PLASMA;
146 smart_learn_aux = FALSE;
149 dam = monspell_damage(target_ptr, (MS_BR_FORCE), m_idx, DAM_ROLL);
150 type_s = _("フォース", "force");
151 ms_type = MS_BR_FORCE;
152 smart_learn_aux = FALSE;
155 dam = monspell_damage(target_ptr, (MS_BR_MANA), m_idx, DAM_ROLL);
156 type_s = _("魔力", "mana");
157 ms_type = MS_BR_MANA;
158 smart_learn_aux = FALSE;
161 dam = monspell_damage(target_ptr, (MS_BR_NUKE), m_idx, DAM_ROLL);
162 type_s = _("放射性廃棄物", "toxic waste");
163 ms_type = MS_BR_NUKE;
166 case GF_DISINTEGRATE:
167 dam = monspell_damage(target_ptr, (MS_BR_DISI), m_idx, DAM_ROLL);
168 type_s = _("分解", "disintegration");
169 ms_type = MS_BR_DISI;
170 smart_learn_aux = FALSE;
173 /* Do not reach here */
175 type_s = _("不明", "Unknown");
176 ms_type = MS_BR_ACID;
177 smart_learn_aux = FALSE;
181 if (mon_to_player || (mon_to_mon && known && see_either))
182 disturb(target_ptr, TRUE, TRUE);
184 if (m_ptr->r_idx == MON_JAIAN && GF_TYPE == GF_SOUND) {
185 msg_format(_("「ボォエ~~~~~~」", "'Booooeeeeee'"));
186 } else if (m_ptr->r_idx == MON_BOTEI && GF_TYPE == GF_SHARDS) {
187 msg_format(_("「ボ帝ビルカッター!!!」", "'Boty-Build cutter!!!'"));
188 } else if (target_ptr->blind) {
189 if (mon_to_player || (mon_to_mon && known && see_either))
190 msg_format(_("%^sが何かのブレスを吐いた。", "%^s breathes."), m_name);
193 msg_format(_("%^sが%^sのブレスを吐いた。", "%^s breathes %^s."), m_name, type_s);
194 } else if (mon_to_mon && known && see_either) {
195 _(msg_format("%^sが%^sに%^sのブレスを吐いた。", m_name, t_name, type_s), msg_format("%^s breathes %^s at %^s.", m_name, type_s, t_name));
199 if (mon_to_mon && known && !see_either)
200 floor_ptr->monster_noise = TRUE;
203 breath(target_ptr, y, x, m_idx, GF_TYPE, dam, 0, TRUE, ms_type, TARGET_TYPE);
204 if (smart_learn_aux && mon_to_player)
205 update_smart_learn(target_ptr, m_idx, drs_type);