• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

変愚蛮怒のメインリポジトリです


Commit MetaInfo

Revision1237893d11c284e2413716b9fdbd2867899ffc96 (tree)
Time2014-02-26 16:00:40
Authordis- <dis.rogue@gmai...>
Commiterdis-

Log Message

refactor: blue-mage spell damage explain

Change Summary

Incremental Difference

--- a/src/defines.h
+++ b/src/defines.h
@@ -5716,3 +5716,8 @@ extern int PlayerUID;
57165716 #define DAM_ROLL 1
57175717 #define DAM_MAX 2
57185718 #define DAM_MIN 3
5719+#define DICE_NUM 4
5720+#define DICE_SIDE 5
5721+#define DICE_MULT 6
5722+#define DICE_DIV 7
5723+#define BASE_DAM 8
--- a/src/externs.h
+++ b/src/externs.h
@@ -964,6 +964,7 @@ extern bool are_enemies(monster_type *m_ptr1, monster_type *m_ptr2);
964964 extern bool monster_has_hostile_align(monster_type *m_ptr, int pa_good, int pa_evil, monster_race *r_ptr);
965965 extern bool monster_living(monster_race *r_ptr);
966966 extern bool no_questor_or_bounty_uniques(int r_idx);
967+extern void dice_to_string(int base_damage, int dice_num, int dice_side, int dice_mult, int dice_div, char* msg);
967968
968969
969970 /* monster2.c */
@@ -1594,7 +1595,6 @@ extern void learn_spell(int monspell);
15941595 extern void set_rf_masks(s32b *f4, s32b *f5, s32b *f6, int mode);
15951596
15961597 /* mspells4.c */
1597-extern int monspell_num(int SPELL_NUM_BASE, u32b SPELL_FLAG);
15981598 extern bool spell_learnable(int m_idx);
15991599 extern int monspell_to_player(int SPELL_NUM, int y, int x, int m_idx);
16001600 extern int monspell_to_monster(int SPELL_NUM, int y, int x, int m_idx, int t_idx);
--- a/src/monster1.c
+++ b/src/monster1.c
@@ -129,22 +129,62 @@ static void hooked_roff(cptr str)
129129 }
130130
131131 /*!
132- * @brief 文字列にモンスターの攻撃力を加える
133- * @param r_idx モンスターの種族ID
134- * @param SPELL_NUM 呪文番号
135- * @param msg 表示する文字列
136- * @param tmp 返すメッセージを格納する配列
137- * @param min_max TRUEなら(最小-最大)形式で、FALSEなら(最大値)形式で返す
138- * @return なし
139- */
140-void set_damage(int r_idx, int SPELL_NUM, char* msg, char* tmp, bool min_max)
132+* @brief ダイス目を文字列に変換する
133+* @param base_damage 固定値
134+* @param dice_num ダイス数
135+* @param dice_side ダイス面
136+* @param dice_mult ダイス倍率
137+* @param dice_div ダイス除数
138+* @param msg 文字列を格納するポインタ
139+* @return なし
140+*/
141+void dice_to_string(int base_damage, int dice_num, int dice_side, int dice_mult, int dice_div, char* msg)
141142 {
142- int dam_min = monspell_race_damage(SPELL_NUM, r_idx, DAM_MIN);
143- int dam_max = monspell_race_damage(SPELL_NUM, r_idx, DAM_MAX);
144- if(min_max)
145- sprintf(tmp, msg, dam_min, dam_max);
146- else
147- sprintf(tmp, msg, dam_max);
143+ char base[80] = "", dice[80] = "", mult[80]="";
144+
145+ if (dice_num == 0)
146+ {
147+ sprintf(msg, "%d", base_damage);
148+ }
149+ else
150+ {
151+ if (base_damage != 0)
152+ sprintf(base, "%d+", base_damage);
153+
154+ if (dice_num == 1)
155+ sprintf(dice, "d%d", dice_side);
156+ else
157+ sprintf(dice, "%dd%d", dice_num, dice_side);
158+
159+ if (dice_mult != 1 || dice_div != 1)
160+ {
161+ if (dice_div == 1)
162+ sprintf(mult, "*%d", dice_mult);
163+ else
164+ sprintf(mult, "*(%d/%d)", dice_mult, dice_div);
165+ }
166+ sprintf(msg, "%s%s%s", base, dice, mult);
167+ }
168+}
169+
170+/*!
171+* @brief 文字列にモンスターの攻撃力を加える
172+* @param r_idx モンスターの種族ID
173+* @param SPELL_NUM 呪文番号
174+* @param msg 表示する文字列
175+* @param tmp 返すメッセージを格納する配列
176+* @return なし
177+*/
178+void set_damage(int r_idx, int SPELL_NUM, char* msg, char* tmp)
179+{
180+ int base_damage = monspell_race_damage(SPELL_NUM, r_idx, BASE_DAM);
181+ int dice_num = monspell_race_damage(SPELL_NUM, r_idx, DICE_NUM);
182+ int dice_side = monspell_race_damage(SPELL_NUM, r_idx, DICE_SIDE);
183+ int dice_mult = monspell_race_damage(SPELL_NUM, r_idx, DICE_MULT);
184+ int dice_div = monspell_race_damage(SPELL_NUM, r_idx, DICE_DIV);
185+ char dmg_str[80];
186+ dice_to_string(base_damage, dice_num, dice_side, dice_mult, dice_div, dmg_str);
187+ sprintf(tmp, msg, dmg_str);
148188 }
149189
150190 /*!
@@ -741,7 +781,7 @@ static void roff_aux(int r_idx, int mode)
741781 if (flags4 & RF4_SHRIEK) { vp[vn] = _("悲鳴で助けを求める", "shriek for help"); color[vn++] = TERM_L_WHITE; }
742782 if (flags4 & RF4_ROCKET)
743783 {
744- set_damage(r_idx, monspell_num(RF4_SPELL_START, RF4_ROCKET), _("ロケット(%d)を発射する", "shoot a rocket(%d)"), tmp_msg[vn], FALSE);
784+ set_damage(r_idx, (MS_ROCKET), _("ロケット(%s)を発射する", "shoot a rocket(%s)"), tmp_msg[vn]);
745785 vp[vn] = tmp_msg[vn];
746786 color[vn++] = TERM_UMBER;
747787 }
@@ -800,133 +840,133 @@ static void roff_aux(int r_idx, int mode)
800840 vn = 0;
801841 if (flags4 & (RF4_BR_ACID))
802842 {
803- set_damage(r_idx, monspell_num(RF4_SPELL_START, RF4_BR_ACID), _("酸(%d)", "acid(%d)"), tmp_msg[vn], FALSE);
843+ set_damage(r_idx, (MS_BR_ACID), _("酸(%s)", "acid(%s)"), tmp_msg[vn]);
804844 vp[vn] = tmp_msg[vn];
805845 color[vn++] = TERM_GREEN;
806846 }
807847 if (flags4 & (RF4_BR_ELEC))
808848 {
809- set_damage(r_idx, monspell_num(RF4_SPELL_START, RF4_BR_ELEC), _("稲妻(%d)", "lightning(%d)"), tmp_msg[vn], FALSE);
849+ set_damage(r_idx, (MS_BR_ELEC), _("稲妻(%s)", "lightning(%s)"), tmp_msg[vn]);
810850 vp[vn] = tmp_msg[vn];
811851 color[vn++] = TERM_BLUE;
812852 }
813853 if (flags4 & (RF4_BR_FIRE))
814854 {
815- set_damage(r_idx, monspell_num(RF4_SPELL_START, RF4_BR_FIRE), _("火炎(%d)", "fire(%d)"), tmp_msg[vn], FALSE);
855+ set_damage(r_idx, (MS_BR_FIRE), _("火炎(%s)", "fire(%s)"), tmp_msg[vn]);
816856 vp[vn] = tmp_msg[vn];
817857 color[vn++] = TERM_RED;
818858 }
819- if (flags4 & (RF4_BR_FIRE))
859+ if (flags4 & (RF4_BR_COLD))
820860 {
821- set_damage(r_idx, monspell_num(RF4_SPELL_START, RF4_BR_COLD), _("冷気(%d)", "frost(%d)"), tmp_msg[vn], FALSE);
861+ set_damage(r_idx, (MS_BR_COLD), _("冷気(%s)", "frost(%s)"), tmp_msg[vn]);
822862 vp[vn] = tmp_msg[vn];
823863 color[vn++] = TERM_L_WHITE;
824864 }
825865 if (flags4 & (RF4_BR_POIS))
826866 {
827- set_damage(r_idx, monspell_num(RF4_SPELL_START, RF4_BR_POIS), _("毒(%d)", "poison(%d)"), tmp_msg[vn], FALSE);
867+ set_damage(r_idx, (MS_BR_POIS), _("毒(%s)", "poison(%s)"), tmp_msg[vn]);
828868 vp[vn] = tmp_msg[vn];
829869 color[vn++] = TERM_L_GREEN;
830870 }
831871 if (flags4 & (RF4_BR_NETH))
832872 {
833- set_damage(r_idx, monspell_num(RF4_SPELL_START, RF4_BR_NETH), _("地獄(%d)", "nether(%d)"), tmp_msg[vn], FALSE);
873+ set_damage(r_idx, (MS_BR_NETHER), _("地獄(%s)", "nether(%s)"), tmp_msg[vn]);
834874 vp[vn] = tmp_msg[vn];
835875 color[vn++] = TERM_L_DARK;
836876 }
837877 if (flags4 & (RF4_BR_LITE))
838878 {
839- set_damage(r_idx, monspell_num(RF4_SPELL_START, RF4_BR_LITE), _("閃光(%d)", "light(%d)"), tmp_msg[vn], FALSE);
879+ set_damage(r_idx, (MS_BR_LITE), _("閃光(%s)", "light(%s)"), tmp_msg[vn]);
840880 vp[vn] = tmp_msg[vn];
841881 color[vn++] = TERM_YELLOW;
842882 }
843883 if (flags4 & (RF4_BR_DARK))
844884 {
845- set_damage(r_idx, monspell_num(RF4_SPELL_START, RF4_BR_DARK), _("暗黒(%d)", "darkness(%d)"), tmp_msg[vn], FALSE);
885+ set_damage(r_idx, (MS_BR_DARK), _("暗黒(%s)", "darkness(%s)"), tmp_msg[vn]);
846886 vp[vn] = tmp_msg[vn];
847887 color[vn++] = TERM_L_DARK;
848888 }
849889 if (flags4 & (RF4_BR_CONF))
850890 {
851- set_damage(r_idx, monspell_num(RF4_SPELL_START, RF4_BR_CONF), _("混乱(%d)", "confusion(%d)"), tmp_msg[vn], FALSE);
891+ set_damage(r_idx, (MS_BR_CONF), _("混乱(%s)", "confusion(%s)"), tmp_msg[vn]);
852892 vp[vn] = tmp_msg[vn];
853893 color[vn++] = TERM_L_UMBER;
854894 }
855895 if (flags4 & (RF4_BR_SOUN))
856896 {
857- set_damage(r_idx, monspell_num(RF4_SPELL_START, RF4_BR_SOUN), _("轟音(%d)", "sound(%d)"), tmp_msg[vn], FALSE);
897+ set_damage(r_idx, (MS_BR_SOUND), _("轟音(%s)", "sound(%s)"), tmp_msg[vn]);
858898 vp[vn] = tmp_msg[vn];
859899 color[vn++] = TERM_ORANGE;
860900 }
861901 if (flags4 & (RF4_BR_CHAO))
862902 {
863- set_damage(r_idx, monspell_num(RF4_SPELL_START, RF4_BR_CHAO), _("カオス(%d)", "chaos(%d)"), tmp_msg[vn], FALSE);
903+ set_damage(r_idx, (MS_BR_CHAOS), _("カオス(%s)", "chaos(%s)"), tmp_msg[vn]);
864904 vp[vn] = tmp_msg[vn];
865905 color[vn++] = TERM_VIOLET;
866906 }
867907 if (flags4 & (RF4_BR_DISE))
868908 {
869- set_damage(r_idx, monspell_num(RF4_SPELL_START, RF4_BR_DISE), _("劣化(%d)", "disenchantment(%d)"), tmp_msg[vn], FALSE);
909+ set_damage(r_idx, (MS_BR_DISEN), _("劣化(%s)", "disenchantment(%s)"), tmp_msg[vn]);
870910 vp[vn] = tmp_msg[vn];
871911 color[vn++] = TERM_VIOLET;
872912 }
873913 if (flags4 & (RF4_BR_NEXU))
874914 {
875- set_damage(r_idx, monspell_num(RF4_SPELL_START, RF4_BR_NEXU), _("因果混乱(%d)", "nexus(%d)"), tmp_msg[vn], FALSE);
915+ set_damage(r_idx, (MS_BR_NEXUS), _("因果混乱(%s)", "nexus(%s)"), tmp_msg[vn]);
876916 vp[vn] = tmp_msg[vn];
877917 color[vn++] = TERM_VIOLET;
878918 }
879919 if (flags4 & (RF4_BR_TIME))
880920 {
881- set_damage(r_idx, monspell_num(RF4_SPELL_START, RF4_BR_TIME), _("時間逆転(%d)", "time(%d)"), tmp_msg[vn], FALSE);
921+ set_damage(r_idx, (MS_BR_TIME), _("時間逆転(%s)", "time(%s)"), tmp_msg[vn]);
882922 vp[vn] = tmp_msg[vn];
883923 color[vn++] = TERM_L_BLUE;
884924 }
885925 if (flags4 & (RF4_BR_INER))
886926 {
887- set_damage(r_idx, monspell_num(RF4_SPELL_START, RF4_BR_INER), _("遅鈍(%d)", "inertia(%d)"), tmp_msg[vn], FALSE);
927+ set_damage(r_idx, (MS_BR_INERTIA), _("遅鈍(%s)", "inertia(%s)"), tmp_msg[vn]);
888928 vp[vn] = tmp_msg[vn];
889929 color[vn++] = TERM_SLATE;
890930 }
891931 if (flags4 & (RF4_BR_GRAV))
892932 {
893- set_damage(r_idx, monspell_num(RF4_SPELL_START, RF4_BR_GRAV), _("重力(%d)", "gravity(%d)"), tmp_msg[vn], FALSE);
933+ set_damage(r_idx, (MS_BR_GRAVITY), _("重力(%s)", "gravity(%s)"), tmp_msg[vn]);
894934 vp[vn] = tmp_msg[vn];
895935 color[vn++] = TERM_SLATE;
896936 }
897937 if (flags4 & (RF4_BR_SHAR))
898938 {
899- set_damage(r_idx, monspell_num(RF4_SPELL_START, RF4_BR_SHAR), _("破片(%d)", "shards(%d)"), tmp_msg[vn], FALSE);
939+ set_damage(r_idx, (MS_BR_SHARDS), _("破片(%s)", "shards(%s)"), tmp_msg[vn]);
900940 vp[vn] = tmp_msg[vn];
901941 color[vn++] = TERM_L_UMBER;
902942 }
903943 if (flags4 & (RF4_BR_PLAS))
904944 {
905- set_damage(r_idx, monspell_num(RF4_SPELL_START, RF4_BR_PLAS), _("プラズマ(%d)", "plasma(%d)"), tmp_msg[vn], FALSE);
945+ set_damage(r_idx, (MS_BR_PLASMA), _("プラズマ(%s)", "plasma(%s)"), tmp_msg[vn]);
906946 vp[vn] = tmp_msg[vn];
907947 color[vn++] = TERM_L_RED;
908948 }
909949 if (flags4 & (RF4_BR_WALL))
910950 {
911- set_damage(r_idx, monspell_num(RF4_SPELL_START, RF4_BR_WALL), _("フォース(%d)", "force(%d)"), tmp_msg[vn], FALSE);
951+ set_damage(r_idx, (MS_BR_FORCE), _("フォース(%s)", "force(%s)"), tmp_msg[vn]);
912952 vp[vn] = tmp_msg[vn];
913953 color[vn++] = TERM_UMBER;
914954 }
915955 if (flags4 & (RF4_BR_MANA))
916956 {
917- set_damage(r_idx, monspell_num(RF4_SPELL_START, RF4_BR_MANA), _("魔力(%d)", "mana(%d)"), tmp_msg[vn], FALSE);
957+ set_damage(r_idx, (MS_BR_MANA), _("魔力(%s)", "mana(%s)"), tmp_msg[vn]);
918958 vp[vn] = tmp_msg[vn];
919959 color[vn++] = TERM_L_BLUE;
920960 }
921961 if (flags4 & (RF4_BR_NUKE))
922962 {
923- set_damage(r_idx, monspell_num(RF4_SPELL_START, RF4_BR_NUKE), _("放射性廃棄物(%d)", "toxic waste(%d)"), tmp_msg[vn], FALSE);
963+ set_damage(r_idx, (MS_BR_NUKE), _("放射性廃棄物(%s)", "toxic waste(%s)"), tmp_msg[vn]);
924964 vp[vn] = tmp_msg[vn];
925965 color[vn++] = TERM_L_GREEN;
926966 }
927967 if (flags4 & (RF4_BR_DISI))
928968 {
929- set_damage(r_idx, monspell_num(RF4_SPELL_START, RF4_BR_DISI), _("分解(%d)", "disintegration(%d)"), tmp_msg[vn], FALSE);
969+ set_damage(r_idx, (MS_BR_DISI), _("分解(%s)", "disintegration(%s)"), tmp_msg[vn]);
930970 vp[vn] = tmp_msg[vn];
931971 color[vn++] = TERM_SLATE;
932972 }
@@ -966,186 +1006,186 @@ static void roff_aux(int r_idx, int mode)
9661006 vn = 0;
9671007 if (flags5 & (RF5_BA_ACID))
9681008 {
969- set_damage(r_idx, monspell_num(RF5_SPELL_START, RF5_BA_ACID), _("アシッド・ボール(%d-%d)", "produce acid balls(%d-%d)"), tmp_msg[vn], TRUE);
1009+ set_damage(r_idx, (MS_BALL_ACID), _("アシッド・ボール(%s)", "produce acid balls(%s)"), tmp_msg[vn]);
9701010 vp[vn] = tmp_msg[vn];
9711011 color[vn++] = TERM_GREEN;
9721012 }
9731013 if (flags5 & (RF5_BA_ELEC))
9741014 {
975- set_damage(r_idx, monspell_num(RF5_SPELL_START, RF5_BA_ELEC), _("サンダー・ボール(%d-%d)", "produce lightning balls(%d-%d)"), tmp_msg[vn], TRUE);
1015+ set_damage(r_idx, (MS_BALL_ELEC), _("サンダー・ボール(%s)", "produce lightning balls(%s)"), tmp_msg[vn]);
9761016 vp[vn] = tmp_msg[vn];
9771017 color[vn++] = TERM_BLUE;
9781018 }
9791019 if (flags5 & (RF5_BA_FIRE))
9801020 {
981- set_damage(r_idx, monspell_num(RF5_SPELL_START, RF5_BA_FIRE), _("ファイア・ボール(%d-%d)", "produce fire balls(%d-%d)"), tmp_msg[vn], TRUE);
1021+ set_damage(r_idx, (MS_BALL_FIRE), _("ファイア・ボール(%s)", "produce fire balls(%s)"), tmp_msg[vn]);
9821022 vp[vn] = tmp_msg[vn];
9831023 color[vn++] = TERM_RED;
9841024 }
9851025 if (flags5 & (RF5_BA_COLD))
9861026 {
987- set_damage(r_idx, monspell_num(RF5_SPELL_START, RF5_BA_COLD), _("アイス・ボール(%d-%d)", "produce frost balls(%d-%d)"), tmp_msg[vn], TRUE);
1027+ set_damage(r_idx, (MS_BALL_COLD), _("アイス・ボール(%s)", "produce frost balls(%s)"), tmp_msg[vn]);
9881028 vp[vn] = tmp_msg[vn];
9891029 color[vn++] = TERM_L_WHITE;
9901030 }
9911031 if (flags5 & (RF5_BA_POIS))
9921032 {
993- set_damage(r_idx, monspell_num(RF5_SPELL_START, RF5_BA_POIS), _("悪臭雲(%d-%d)", "produce poison balls(%d-%d)"), tmp_msg[vn], TRUE);
1033+ set_damage(r_idx, (MS_BALL_POIS), _("悪臭雲(%s)", "produce poison balls(%s)"), tmp_msg[vn]);
9941034 vp[vn] = tmp_msg[vn];
9951035 color[vn++] = TERM_L_GREEN;
9961036 }
9971037 if (flags5 & (RF5_BA_NETH))
9981038 {
999- set_damage(r_idx, monspell_num(RF5_SPELL_START, RF5_BA_NETH), _("地獄球(%d-%d)", "produce nether balls(%d-%d)"), tmp_msg[vn], TRUE);
1039+ set_damage(r_idx, (MS_BALL_NETHER), _("地獄球(%s)", "produce nether balls(%s)"), tmp_msg[vn]);
10001040 vp[vn] = tmp_msg[vn];
10011041 color[vn++] = TERM_L_DARK;
10021042 }
10031043 if (flags5 & (RF5_BA_WATE))
10041044 {
1005- set_damage(r_idx, monspell_num(RF5_SPELL_START, RF5_BA_WATE), _("ウォーター・ボール(%d-%d)", "produce water balls(%d-%d)"), tmp_msg[vn], TRUE);
1045+ set_damage(r_idx, (MS_BALL_WATER), _("ウォーター・ボール(%s)", "produce water balls(%s)"), tmp_msg[vn]);
10061046 vp[vn] = tmp_msg[vn];
10071047 color[vn++] = TERM_BLUE;
10081048 }
10091049 if (flags4 & (RF4_BA_NUKE))
10101050 {
1011- set_damage(r_idx, monspell_num(RF4_SPELL_START, RF4_BA_NUKE), _("放射能球(%d-%d)", "produce balls of radiation(%d-%d)"), tmp_msg[vn], TRUE);
1051+ set_damage(r_idx, (MS_BALL_NUKE), _("放射能球(%s)", "produce balls of radiation(%s)"), tmp_msg[vn]);
10121052 vp[vn] = tmp_msg[vn];
10131053 color[vn++] = TERM_L_GREEN;
10141054 }
10151055 if (flags5 & (RF5_BA_MANA))
10161056 {
1017- set_damage(r_idx, monspell_num(RF5_SPELL_START, RF5_BA_MANA), _("魔力の嵐(%d-%d)", "invoke mana storms(%d-%d)"), tmp_msg[vn], TRUE);
1057+ set_damage(r_idx, (MS_BALL_MANA), _("魔力の嵐(%s)", "invoke mana storms(%s)"), tmp_msg[vn]);
10181058 vp[vn] = tmp_msg[vn];
10191059 color[vn++] = TERM_L_BLUE;
10201060 }
10211061 if (flags5 & (RF5_BA_DARK))
10221062 {
1023- set_damage(r_idx, monspell_num(RF5_SPELL_START, RF5_BA_DARK), _("暗黒の嵐(%d-%d)", "invoke darkness storms(%d-%d)"), tmp_msg[vn], TRUE);
1063+ set_damage(r_idx, (MS_BALL_DARK), _("暗黒の嵐(%s)", "invoke darkness storms(%s)"), tmp_msg[vn]);
10241064 vp[vn] = tmp_msg[vn];
10251065 color[vn++] = TERM_L_DARK;
10261066 }
10271067 if (flags5 & (RF5_BA_LITE))
10281068 {
1029- set_damage(r_idx, monspell_num(RF5_SPELL_START, RF5_BA_LITE), _("スターバースト(%d-%d)", "invoke starburst(%d-%d)"), tmp_msg[vn], TRUE);
1069+ set_damage(r_idx, (MS_STARBURST), _("スターバースト(%s)", "invoke starburst(%s)"), tmp_msg[vn]);
10301070 vp[vn] = tmp_msg[vn];
10311071 color[vn++] = TERM_YELLOW;
10321072 }
10331073 if (flags4 & (RF4_BA_CHAO))
10341074 {
1035- set_damage(r_idx, monspell_num(RF4_SPELL_START, RF4_BA_CHAO), _("純ログルス(%d-%d)", "invoke raw Logrus(%d-%d)"), tmp_msg[vn], TRUE);
1075+ set_damage(r_idx, (MS_BALL_CHAOS), _("純ログルス(%s)", "invoke raw Logrus(%s)"), tmp_msg[vn]);
10361076 vp[vn] = tmp_msg[vn];
10371077 color[vn++] = TERM_VIOLET;
10381078 }
10391079 if (flags6 & (RF6_HAND_DOOM)){ vp[vn] = _("破滅の手(40%-60%)", "invoke the Hand of Doom(40%-60%)"); color[vn++] = TERM_VIOLET; }
10401080 if (flags6 & (RF6_PSY_SPEAR))
10411081 {
1042- set_damage(r_idx, monspell_num(RF6_SPELL_START, RF6_PSY_SPEAR), _("光の剣(%d-%d)", "psycho-spear(%d-%d)"), tmp_msg[vn], TRUE);
1082+ set_damage(r_idx, (MS_PSY_SPEAR), _("光の剣(%s)", "psycho-spear(%s)"), tmp_msg[vn]);
10431083 vp[vn] = tmp_msg[vn];
10441084 color[vn++] = TERM_YELLOW;
10451085 }
10461086 if (flags5 & (RF5_DRAIN_MANA))
10471087 {
1048- set_damage(r_idx, monspell_num(RF5_SPELL_START, RF5_DRAIN_MANA), _("魔力吸収(%d-%d)", "drain mana(%d-%d)"), tmp_msg[vn], TRUE);
1088+ set_damage(r_idx, (MS_DRAIN_MANA), _("魔力吸収(%s)", "drain mana(%s)"), tmp_msg[vn]);
10491089 vp[vn] = tmp_msg[vn];
10501090 color[vn++] = TERM_SLATE;
10511091 }
10521092 if (flags5 & (RF5_MIND_BLAST))
10531093 {
1054- set_damage(r_idx, monspell_num(RF5_SPELL_START, RF5_MIND_BLAST), _("精神攻撃(%d-%d)", "cause mind blasting(%d-%d)"), tmp_msg[vn], TRUE);
1094+ set_damage(r_idx, (MS_MIND_BLAST), _("精神攻撃(%s)", "cause mind blasting(%s)"), tmp_msg[vn]);
10551095 vp[vn] = tmp_msg[vn];
10561096 color[vn++] = TERM_L_RED;
10571097 }
10581098 if (flags5 & (RF5_BRAIN_SMASH))
10591099 {
1060- set_damage(r_idx, monspell_num(RF5_SPELL_START, RF5_BRAIN_SMASH), _("脳攻撃(%d-%d)", "cause brain smashing(%d-%d)"), tmp_msg[vn], TRUE);
1100+ set_damage(r_idx, (MS_BRAIN_SMASH), _("脳攻撃(%s)", "cause brain smashing(%s)"), tmp_msg[vn]);
10611101 vp[vn] = tmp_msg[vn];
10621102 color[vn++] = TERM_RED;
10631103 }
10641104 if (flags5 & (RF5_CAUSE_1))
10651105 {
1066- set_damage(r_idx, monspell_num(RF5_SPELL_START, RF5_CAUSE_1),
1067- _("軽傷+呪い(%d-%d)", "cause light wounds and cursing(%d-%d)"), tmp_msg[vn], TRUE);
1106+ set_damage(r_idx, (MS_CAUSE_1),
1107+ _("軽傷+呪い(%s)", "cause light wounds and cursing(%s)"), tmp_msg[vn]);
10681108 vp[vn] = tmp_msg[vn];
10691109 color[vn++] = TERM_L_WHITE;
10701110 }
10711111 if (flags5 & (RF5_CAUSE_2))
10721112 {
1073- set_damage(r_idx, monspell_num(RF5_SPELL_START, RF5_CAUSE_2),
1074- _("重傷+呪い(%d-%d)", "cause serious wounds and cursing(%d-%d)"), tmp_msg[vn], TRUE);
1113+ set_damage(r_idx, (MS_CAUSE_2),
1114+ _("重傷+呪い(%s)", "cause serious wounds and cursing(%s)"), tmp_msg[vn]);
10751115 vp[vn] = tmp_msg[vn];
10761116 color[vn++] = TERM_L_WHITE;
10771117 }
10781118 if (flags5 & (RF5_CAUSE_3))
10791119 {
1080- set_damage(r_idx, monspell_num(RF5_SPELL_START, RF5_CAUSE_3),
1081- _("致命傷+呪い(%d-%d)", "cause critical wounds and cursing(%d-%d)"), tmp_msg[vn], TRUE);
1120+ set_damage(r_idx, (MS_CAUSE_3),
1121+ _("致命傷+呪い(%s)", "cause critical wounds and cursing(%s)"), tmp_msg[vn]);
10821122 vp[vn] = tmp_msg[vn];
10831123 color[vn++] = TERM_L_WHITE;
10841124 }
10851125 if (flags5 & (RF5_CAUSE_4))
10861126 {
1087- set_damage(r_idx, monspell_num(RF5_SPELL_START, RF5_CAUSE_4),
1088- _("秘孔を突く(%d-%d)", "cause mortal wounds(%d-%d)"), tmp_msg[vn], TRUE);
1127+ set_damage(r_idx, (MS_CAUSE_4),
1128+ _("秘孔を突く(%s)", "cause mortal wounds(%s)"), tmp_msg[vn]);
10891129 vp[vn] = tmp_msg[vn];
10901130 color[vn++] = TERM_L_WHITE;
10911131 }
10921132 if (flags5 & (RF5_BO_ACID))
10931133 {
1094- set_damage(r_idx, monspell_num(RF5_SPELL_START, RF5_BO_ACID), _("アシッド・ボルト(%d-%d)", "produce acid bolts(%d-%d)"), tmp_msg[vn], TRUE);
1134+ set_damage(r_idx, (MS_BOLT_ACID), _("アシッド・ボルト(%s)", "produce acid bolts(%s)"), tmp_msg[vn]);
10951135 vp[vn] = tmp_msg[vn];
10961136 color[vn++] = TERM_GREEN;
10971137 }
10981138 if (flags5 & (RF5_BO_ELEC))
10991139 {
1100- set_damage(r_idx, monspell_num(RF5_SPELL_START, RF5_BO_ELEC), _("サンダー・ボルト(%d-%d)", "produce lightning bolts(%d-%d)"), tmp_msg[vn], TRUE);
1140+ set_damage(r_idx, (MS_BOLT_ELEC), _("サンダー・ボルト(%s)", "produce lightning bolts(%s)"), tmp_msg[vn]);
11011141 vp[vn] = tmp_msg[vn];
11021142 color[vn++] = TERM_BLUE;
11031143 }
11041144 if (flags5 & (RF5_BO_FIRE))
11051145 {
1106- set_damage(r_idx, monspell_num(RF5_SPELL_START, RF5_BO_FIRE), _("ファイア・ボルト(%d-%d)", "produce fire bolts(%d-%d)"), tmp_msg[vn], TRUE);
1146+ set_damage(r_idx, (MS_BOLT_FIRE), _("ファイア・ボルト(%s)", "produce fire bolts(%s)"), tmp_msg[vn]);
11071147 vp[vn] = tmp_msg[vn];
11081148 color[vn++] = TERM_RED;
11091149 }
11101150 if (flags5 & (RF5_BO_COLD))
11111151 {
1112- set_damage(r_idx, monspell_num(RF5_SPELL_START, RF5_BO_COLD), _("アイス・ボルト(%d-%d)", "produce frost bolts(%d-%d)"), tmp_msg[vn], TRUE);
1152+ set_damage(r_idx, (MS_BOLT_COLD), _("アイス・ボルト(%s)", "produce frost bolts(%s)"), tmp_msg[vn]);
11131153 vp[vn] = tmp_msg[vn];
11141154 color[vn++] = TERM_L_WHITE;
11151155 }
11161156 if (flags5 & (RF5_BO_NETH))
11171157 {
1118- set_damage(r_idx, monspell_num(RF5_SPELL_START, RF5_BO_NETH), _("地獄の矢(%d-%d)", "produce nether bolts(%d-%d)"), tmp_msg[vn], TRUE);
1158+ set_damage(r_idx, (MS_BOLT_NETHER), _("地獄の矢(%s)", "produce nether bolts(%s)"), tmp_msg[vn]);
11191159 vp[vn] = tmp_msg[vn];
11201160 color[vn++] = TERM_L_DARK;
11211161 }
11221162 if (flags5 & (RF5_BO_WATE))
11231163 {
1124- set_damage(r_idx, monspell_num(RF5_SPELL_START, RF5_BO_WATE), _("ウォーター・ボルト(%d-%d)", "produce water bolts(%d-%d)"), tmp_msg[vn], TRUE);
1164+ set_damage(r_idx, (MS_BOLT_WATER), _("ウォーター・ボルト(%s)", "produce water bolts(%s)"), tmp_msg[vn]);
11251165 vp[vn] = tmp_msg[vn];
11261166 color[vn++] = TERM_BLUE;
11271167 }
11281168 if (flags5 & (RF5_BO_MANA))
11291169 {
1130- set_damage(r_idx, monspell_num(RF5_SPELL_START, RF5_BO_MANA), _("魔力の矢(%d-%d)", "produce mana bolts(%d-%d)"), tmp_msg[vn], TRUE);
1170+ set_damage(r_idx, (MS_BOLT_MANA), _("魔力の矢(%s)", "produce mana bolts(%s)"), tmp_msg[vn]);
11311171 vp[vn] = tmp_msg[vn];
11321172 color[vn++] = TERM_L_BLUE;
11331173 }
11341174 if (flags5 & (RF5_BO_PLAS))
11351175 {
1136- set_damage(r_idx, monspell_num(RF5_SPELL_START, RF5_BO_PLAS), _("プラズマ・ボルト(%d-%d)", "produce plasma bolts(%d-%d)"), tmp_msg[vn], TRUE);
1176+ set_damage(r_idx, (MS_BOLT_PLASMA), _("プラズマ・ボルト(%s)", "produce plasma bolts(%s)"), tmp_msg[vn]);
11371177 vp[vn] = tmp_msg[vn];
11381178 color[vn++] = TERM_L_RED;
11391179 }
11401180 if (flags5 & (RF5_BO_ICEE))
11411181 {
1142- set_damage(r_idx, monspell_num(RF5_SPELL_START, RF5_BO_ICEE), _("極寒の矢(%d-%d)", "produce ice bolts(%d-%d)"), tmp_msg[vn], TRUE);
1182+ set_damage(r_idx, (MS_BOLT_ICE), _("極寒の矢(%s)", "produce ice bolts(%s)"), tmp_msg[vn]);
11431183 vp[vn] = tmp_msg[vn];
11441184 color[vn++] = TERM_WHITE;
11451185 }
11461186 if (flags5 & (RF5_MISSILE))
11471187 {
1148- set_damage(r_idx, monspell_num(RF5_SPELL_START, RF5_MISSILE), _("マジックミサイル(%d-%d)", "produce magic missiles(%d-%d)"), tmp_msg[vn], TRUE);
1188+ set_damage(r_idx, (MS_MAGIC_MISSILE), _("マジックミサイル(%s)", "produce magic missiles(%s)"), tmp_msg[vn]);
11491189 vp[vn] = tmp_msg[vn];
11501190 color[vn++] = TERM_SLATE;
11511191 }
--- a/src/mspells3.c
+++ b/src/mspells3.c
@@ -14,6 +14,27 @@
1414
1515 #define pseudo_plev() (((p_ptr->lev + 40) * (p_ptr->lev + 40) - 1550) / 130) /*!< モンスター魔法をプレイヤーが使用する場合の換算レベル */
1616
17+
18+/*!
19+* @brief 文字列に青魔導師の呪文の攻撃力を加える
20+* @param r_idx モンスターの種族ID
21+* @param SPELL_NUM 呪文番号
22+* @param msg 表示する文字列
23+* @param tmp 返すメッセージを格納する配列
24+* @return なし
25+*/
26+void set_bluemage_damage(int SPELL_NUM, int plev, cptr msg, char* tmp)
27+{
28+ int base_damage = monspell_bluemage_damage(SPELL_NUM, plev, BASE_DAM);
29+ int dice_num = monspell_bluemage_damage(SPELL_NUM, plev, DICE_NUM);
30+ int dice_side = monspell_bluemage_damage(SPELL_NUM, plev, DICE_SIDE);
31+ int dice_mult = monspell_bluemage_damage(SPELL_NUM, plev, DICE_MULT);
32+ int dice_div = monspell_bluemage_damage(SPELL_NUM, plev, DICE_DIV);
33+ char dmg_str[80];
34+ dice_to_string(base_damage, dice_num, dice_side, dice_mult, dice_div, dmg_str);
35+ sprintf(tmp, msg, dmg_str);
36+}
37+
1738 /*!
1839 * @brief 受け取ったモンスター魔法のIDに応じて青魔法の効果情報をまとめたフォーマットを返す
1940 * @param p 情報を返す文字列参照ポインタ
@@ -26,15 +47,15 @@ static void learned_info(char *p, int power)
2647 int hp = p_ptr->chp;
2748
2849 #ifdef JP
29- cptr s_dam = "損傷:";
50+ cptr s_dam = " 損傷:%s";
3051 cptr s_dur = "期間:";
3152 cptr s_range = "範囲:";
32- cptr s_heal = "回復:";
53+ cptr s_heal = " 回復:%s";
3354 #else
34- cptr s_dam = "dam ";
55+ cptr s_dam = " dam %s";
3556 cptr s_dur = "dur ";
3657 cptr s_range = "range ";
37- cptr s_heal = "heal ";
58+ cptr s_heal = " heal %s";
3859 #endif
3960
4061 strcpy(p, "");
@@ -77,149 +98,70 @@ static void learned_info(char *p, int power)
7798 case MS_S_AMBERITE:
7899 case MS_S_UNIQUE:
79100 break;
80- case MS_BALL_MANA:
81- case MS_BALL_DARK:
82- case MS_STARBURST:
83- sprintf(p, " %s%d+10d10", s_dam, plev * 8 + 50);
84- break;
101+ case MS_BALL_MANA:
102+ case MS_BALL_DARK:
103+ case MS_STARBURST:
104+ set_bluemage_damage((power), plev, s_dam, p); break;
85105 case MS_DISPEL:
86106 break;
87- case MS_ROCKET:
88- sprintf(p, " %s%d", s_dam, hp/4);
89- break;
90- case MS_SHOOT:
91- {
92- object_type *o_ptr = NULL;
93- if (buki_motteruka(INVEN_RARM)) o_ptr = &inventory[INVEN_RARM];
94- else if (buki_motteruka(INVEN_LARM)) o_ptr = &inventory[INVEN_LARM];
95- else
96- sprintf(p, " %s1", s_dam);
97- if (o_ptr)
98- sprintf(p, " %s%dd%d+%d", s_dam, o_ptr->dd, o_ptr->ds, o_ptr->to_d);
99- break;
100- }
101- case MS_BR_ACID:
102- case MS_BR_ELEC:
103- case MS_BR_FIRE:
104- case MS_BR_COLD:
105- case MS_BR_POIS:
106- case MS_BR_NUKE:
107- sprintf(p, " %s%d", s_dam, hp/3);
108- break;
109- case MS_BR_NEXUS:
110- sprintf(p, " %s%d", s_dam, MIN(hp/3, 250));
111- break;
112- case MS_BR_TIME:
113- sprintf(p, " %s%d", s_dam, MIN(hp/3, 150));
114- break;
115- case MS_BR_GRAVITY:
116- sprintf(p, " %s%d", s_dam, MIN(hp/3, 200));
117- break;
118- case MS_BR_MANA:
119- sprintf(p, " %s%d", s_dam, MIN(hp/3, 250));
120- break;
121- case MS_BR_NETHER:
122- case MS_BR_LITE:
123- case MS_BR_DARK:
124- case MS_BR_CONF:
125- case MS_BR_SOUND:
126- case MS_BR_CHAOS:
127- case MS_BR_DISEN:
128- case MS_BR_SHARDS:
129- case MS_BR_PLASMA:
130- sprintf(p, " %s%d", s_dam, hp/6);
131- break;
132- case MS_BR_INERTIA:
133- case MS_BR_FORCE:
134- sprintf(p, " %s%d", s_dam, MIN(hp/6, 200));
135- break;
136- case MS_BR_DISI:
137- sprintf(p, " %s%d", s_dam, MIN(hp/6, 150));
138- break;
139- case MS_BALL_NUKE:
140- sprintf(p, " %s%d+10d6", s_dam, plev * 2);
141- break;
142- case MS_BALL_CHAOS:
143- sprintf(p, " %s%d+10d10", s_dam, plev * 4);
144- break;
145- case MS_BALL_ACID:
146- sprintf(p, " %s15+d%d", s_dam, plev * 6);
147- break;
148- case MS_BALL_ELEC:
149- sprintf(p, " %s8+d%d", s_dam, plev * 3);
150- break;
151- case MS_BALL_FIRE:
152- sprintf(p, " %s10+d%d", s_dam, plev * 7);
153- break;
154- case MS_BALL_COLD:
155- sprintf(p, " %s10+d%d", s_dam, plev * 3);
156- break;
157- case MS_BALL_POIS:
158- sprintf(p, " %s12d2", s_dam);
159- break;
160- case MS_BALL_NETHER:
161- sprintf(p, " %s%d+10d10", s_dam, plev * 2 + 50);
162- break;
163- case MS_BALL_WATER:
164- sprintf(p, " %s50+d%d", s_dam, plev * 4);
165- break;
166- case MS_DRAIN_MANA:
167- sprintf(p, " %sd%d+%d", s_heal, plev, plev);
168- break;
169- case MS_MIND_BLAST:
170- sprintf(p, " %s8d8", s_dam);
171- break;
172- case MS_BRAIN_SMASH:
173- sprintf(p, " %s12d15", s_dam);
174- break;
175- case MS_CAUSE_1:
176- sprintf(p, " %s3d8", s_dam);
177- break;
178- case MS_CAUSE_2:
179- sprintf(p, " %s8d8", s_dam);
180- break;
181- case MS_CAUSE_3:
182- sprintf(p, " %s10d15", s_dam);
183- break;
184- case MS_CAUSE_4:
185- sprintf(p, " %s15d15", s_dam);
186- break;
187- case MS_BOLT_ACID:
188- sprintf(p, " %s%d+7d8", s_dam, plev * 2 / 3);
189- break;
190- case MS_BOLT_ELEC:
191- sprintf(p, " %s%d+4d8", s_dam, plev * 2 / 3);
192- break;
193- case MS_BOLT_FIRE:
194- sprintf(p, " %s%d+9d8", s_dam, plev * 2 / 3);
195- break;
196- case MS_BOLT_COLD:
197- sprintf(p, " %s%d+6d8", s_dam, plev * 2 / 3);
198- break;
199- case MS_BOLT_NETHER:
200- sprintf(p, " %s%d+5d5", s_dam, 30 + plev * 8 / 3);
201- break;
202- case MS_BOLT_WATER:
203- sprintf(p, " %s%d+10d10", s_dam, plev * 2);
204- break;
205- case MS_BOLT_MANA:
206- sprintf(p, " %s50+d%d", s_dam, plev * 7);
207- break;
208- case MS_BOLT_PLASMA:
209- sprintf(p, " %s%d+8d7", s_dam, plev * 2 + 10);
210- break;
211- case MS_BOLT_ICE:
212- sprintf(p, " %s%d+6d6", s_dam, plev * 2);
213- break;
214- case MS_MAGIC_MISSILE:
215- sprintf(p, " %s%d+2d6", s_dam, plev * 2 / 3);
216- break;
107+ case MS_ROCKET:
108+ case MS_SHOOT:
109+ case MS_BR_ACID:
110+ case MS_BR_ELEC:
111+ case MS_BR_FIRE:
112+ case MS_BR_COLD:
113+ case MS_BR_POIS:
114+ case MS_BR_NUKE:
115+ case MS_BR_NEXUS:
116+ case MS_BR_TIME:
117+ case MS_BR_GRAVITY:
118+ case MS_BR_MANA:
119+ case MS_BR_NETHER:
120+ case MS_BR_LITE:
121+ case MS_BR_DARK:
122+ case MS_BR_CONF:
123+ case MS_BR_SOUND:
124+ case MS_BR_CHAOS:
125+ case MS_BR_DISEN:
126+ case MS_BR_SHARDS:
127+ case MS_BR_PLASMA:
128+ case MS_BR_INERTIA:
129+ case MS_BR_FORCE:
130+ case MS_BR_DISI:
131+ case MS_BALL_NUKE:
132+ case MS_BALL_CHAOS:
133+ case MS_BALL_ACID:
134+ case MS_BALL_ELEC:
135+ case MS_BALL_FIRE:
136+ case MS_BALL_COLD:
137+ case MS_BALL_POIS:
138+ case MS_BALL_NETHER:
139+ case MS_BALL_WATER:
140+ set_bluemage_damage((power), plev, s_dam, p); break;
141+ case MS_DRAIN_MANA:
142+ set_bluemage_damage((power), plev, s_heal, p); break;
143+ case MS_MIND_BLAST:
144+ case MS_BRAIN_SMASH:
145+ case MS_CAUSE_1:
146+ case MS_CAUSE_2:
147+ case MS_CAUSE_3:
148+ case MS_CAUSE_4:
149+ case MS_BOLT_ACID:
150+ case MS_BOLT_ELEC:
151+ case MS_BOLT_FIRE:
152+ case MS_BOLT_COLD:
153+ case MS_BOLT_NETHER:
154+ case MS_BOLT_WATER:
155+ case MS_BOLT_MANA:
156+ case MS_BOLT_PLASMA:
157+ case MS_BOLT_ICE:
158+ case MS_MAGIC_MISSILE:
159+ set_bluemage_damage((power), plev, s_dam, p); break;
217160 case MS_SPEED:
218161 sprintf(p, " %sd%d+%d", s_dur, 20+plev, plev);
219162 break;
220- case MS_HEAL:
221- sprintf(p, " %s%d", s_heal, plev*4);
222- break;
163+ case MS_HEAL:
164+ set_bluemage_damage((power), plev, s_heal, p); break;
223165 case MS_INVULNER:
224166 sprintf(p, " %sd7+7", s_dur);
225167 break;
@@ -229,8 +171,8 @@ static void learned_info(char *p, int power)
229171 case MS_TELEPORT:
230172 sprintf(p, " %s%d", s_range, plev * 5);
231173 break;
232- case MS_PSY_SPEAR:
233- sprintf(p, " %s100+d%d", s_dam, plev * 3);
174+ case MS_PSY_SPEAR:
175+ set_bluemage_damage((power), plev, s_dam, p); break;
234176 break;
235177 case MS_RAISE_DEAD:
236178 sprintf(p, " %s5", s_range);
@@ -745,7 +687,7 @@ static bool cast_learned_spell(int spell, bool success)
745687 if (!get_aim_dir(&dir)) return FALSE;
746688
747689 msg_print(_("ロケットを発射した。", "You fire a rocket."));
748- damage = monspell_bluemage_damage(monspell_num(RF4_SPELL_START, RF4_ROCKET), plev, DAM_ROLL);
690+ damage = monspell_bluemage_damage((MS_ROCKET), plev, DAM_ROLL);
749691 fire_rocket(GF_ROCKET, dir, damage, 2);
750692 break;
751693 case MS_SHOOT:
@@ -755,7 +697,7 @@ static bool cast_learned_spell(int spell, bool success)
755697 if (!get_aim_dir(&dir)) return FALSE;
756698
757699 msg_print(_("矢を放った。", "You fire an arrow."));
758- damage = monspell_bluemage_damage(monspell_num(RF4_SPELL_START, RF4_SHOOT), plev, DAM_ROLL);
700+ damage = monspell_bluemage_damage((MS_SHOOT), plev, DAM_ROLL);
759701 fire_bolt(GF_ARROW, dir, damage);
760702 break;
761703 }
@@ -769,350 +711,350 @@ static bool cast_learned_spell(int spell, bool success)
769711 if (!get_aim_dir(&dir)) return FALSE;
770712
771713 msg_print(_("酸のブレスを吐いた。", "You breathe acid."));
772- damage = monspell_bluemage_damage(monspell_num(RF4_SPELL_START, RF4_BR_ACID), plev, DAM_ROLL);
714+ damage = monspell_bluemage_damage((MS_BR_ACID), plev, DAM_ROLL);
773715 fire_ball(GF_ACID, dir, damage, (plev > 40 ? -3 : -2));
774716 break;
775717 case MS_BR_ELEC:
776718 if (!get_aim_dir(&dir)) return FALSE;
777719
778720 msg_print(_("稲妻のブレスを吐いた。", "You breathe lightning."));
779- damage = monspell_bluemage_damage(monspell_num(RF4_SPELL_START, RF4_BR_ELEC), plev, DAM_ROLL);
721+ damage = monspell_bluemage_damage((MS_BR_ELEC), plev, DAM_ROLL);
780722 fire_ball(GF_ELEC, dir, damage, (plev > 40 ? -3 : -2));
781723 break;
782724 case MS_BR_FIRE:
783725 if (!get_aim_dir(&dir)) return FALSE;
784726
785727 msg_print(_("火炎のブレスを吐いた。", "You breathe fire."));
786- damage = monspell_bluemage_damage(monspell_num(RF4_SPELL_START, RF4_BR_FIRE), plev, DAM_ROLL);
728+ damage = monspell_bluemage_damage((MS_BR_FIRE), plev, DAM_ROLL);
787729 fire_ball(GF_FIRE, dir, damage, (plev > 40 ? -3 : -2));
788730 break;
789731 case MS_BR_COLD:
790732 if (!get_aim_dir(&dir)) return FALSE;
791733
792734 msg_print(_("冷気のブレスを吐いた。", "You breathe frost."));
793- damage = monspell_bluemage_damage(monspell_num(RF4_SPELL_START, RF4_BR_COLD), plev, DAM_ROLL);
735+ damage = monspell_bluemage_damage((MS_BR_COLD), plev, DAM_ROLL);
794736 fire_ball(GF_COLD, dir, damage, (plev > 40 ? -3 : -2));
795737 break;
796738 case MS_BR_POIS:
797739 if (!get_aim_dir(&dir)) return FALSE;
798740
799741 msg_print(_("ガスのブレスを吐いた。", "You breathe gas."));
800- damage = monspell_bluemage_damage(monspell_num(RF4_SPELL_START, RF4_BR_POIS), plev, DAM_ROLL);
742+ damage = monspell_bluemage_damage((MS_BR_POIS), plev, DAM_ROLL);
801743 fire_ball(GF_POIS, dir, damage, (plev > 40 ? -3 : -2));
802744 break;
803745 case MS_BR_NETHER:
804746 if (!get_aim_dir(&dir)) return FALSE;
805747
806748 msg_print(_("地獄のブレスを吐いた。", "You breathe nether."));
807- damage = monspell_bluemage_damage(monspell_num(RF4_SPELL_START, RF4_BR_NETH), plev, DAM_ROLL);
749+ damage = monspell_bluemage_damage((MS_BR_NETHER), plev, DAM_ROLL);
808750 fire_ball(GF_NETHER, dir, damage, (plev > 40 ? -3 : -2));
809751 break;
810752 case MS_BR_LITE:
811753 if (!get_aim_dir(&dir)) return FALSE;
812754
813755 msg_print(_("閃光のブレスを吐いた。", "You breathe light."));
814- damage = monspell_bluemage_damage(monspell_num(RF4_SPELL_START, RF4_BR_LITE), plev, DAM_ROLL);
756+ damage = monspell_bluemage_damage((MS_BR_LITE), plev, DAM_ROLL);
815757 fire_ball(GF_LITE, dir, damage, (plev > 40 ? -3 : -2));
816758 break;
817759 case MS_BR_DARK:
818760 if (!get_aim_dir(&dir)) return FALSE;
819761
820762 msg_print(_("暗黒のブレスを吐いた。", "You breathe darkness."));
821- damage = monspell_bluemage_damage(monspell_num(RF4_SPELL_START, RF4_BR_DARK), plev, DAM_ROLL);
763+ damage = monspell_bluemage_damage((MS_BR_DARK), plev, DAM_ROLL);
822764 fire_ball(GF_DARK, dir, damage, (plev > 40 ? -3 : -2));
823765 break;
824766 case MS_BR_CONF:
825767 if (!get_aim_dir(&dir)) return FALSE;
826768
827769 msg_print(_("混乱のブレスを吐いた。", "You breathe confusion."));
828- damage = monspell_bluemage_damage(monspell_num(RF4_SPELL_START, RF4_BR_CONF), plev, DAM_ROLL);
770+ damage = monspell_bluemage_damage((MS_BR_CONF), plev, DAM_ROLL);
829771 fire_ball(GF_CONFUSION, dir, damage, (plev > 40 ? -3 : -2));
830772 break;
831773 case MS_BR_SOUND:
832774 if (!get_aim_dir(&dir)) return FALSE;
833775
834776 msg_print(_("轟音のブレスを吐いた。", "You breathe sound."));
835- damage = monspell_bluemage_damage(monspell_num(RF4_SPELL_START, RF4_BR_SOUN), plev, DAM_ROLL);
777+ damage = monspell_bluemage_damage((MS_BR_SOUND), plev, DAM_ROLL);
836778 fire_ball(GF_SOUND, dir, damage, (plev > 40 ? -3 : -2));
837779 break;
838780 case MS_BR_CHAOS:
839781 if (!get_aim_dir(&dir)) return FALSE;
840782
841783 msg_print(_("カオスのブレスを吐いた。", "You breathe chaos."));
842- damage = monspell_bluemage_damage(monspell_num(RF4_SPELL_START, RF4_BR_CHAO), plev, DAM_ROLL);
784+ damage = monspell_bluemage_damage((MS_BR_CHAOS), plev, DAM_ROLL);
843785 fire_ball(GF_CHAOS, dir, damage, (plev > 40 ? -3 : -2));
844786 break;
845787 case MS_BR_DISEN:
846788 if (!get_aim_dir(&dir)) return FALSE;
847789
848790 msg_print(_("劣化のブレスを吐いた。", "You breathe disenchantment."));
849- damage = monspell_bluemage_damage(monspell_num(RF4_SPELL_START, RF4_BR_DISE), plev, DAM_ROLL);
791+ damage = monspell_bluemage_damage((MS_BR_DISEN), plev, DAM_ROLL);
850792 fire_ball(GF_DISENCHANT, dir, damage, (plev > 40 ? -3 : -2));
851793 break;
852794 case MS_BR_NEXUS:
853795 if (!get_aim_dir(&dir)) return FALSE;
854796
855797 msg_print(_("因果混乱のブレスを吐いた。", "You breathe nexus."));
856- damage = monspell_bluemage_damage(monspell_num(RF4_SPELL_START, RF4_BR_NEXU), plev, DAM_ROLL);
798+ damage = monspell_bluemage_damage((MS_BR_NEXUS), plev, DAM_ROLL);
857799 fire_ball(GF_NEXUS, dir, damage, (plev > 40 ? -3 : -2));
858800 break;
859801 case MS_BR_TIME:
860802 if (!get_aim_dir(&dir)) return FALSE;
861803
862804 msg_print(_("時間逆転のブレスを吐いた。", "You breathe time."));
863- damage = monspell_bluemage_damage(monspell_num(RF4_SPELL_START, RF4_BR_TIME), plev, DAM_ROLL);
805+ damage = monspell_bluemage_damage((MS_BR_TIME), plev, DAM_ROLL);
864806 fire_ball(GF_TIME, dir, damage, (plev > 40 ? -3 : -2));
865807 break;
866808 case MS_BR_INERTIA:
867809 if (!get_aim_dir(&dir)) return FALSE;
868810
869811 msg_print(_("遅鈍のブレスを吐いた。", "You breathe inertia."));
870- damage = monspell_bluemage_damage(monspell_num(RF4_SPELL_START, RF4_BR_INER), plev, DAM_ROLL);
812+ damage = monspell_bluemage_damage((MS_BR_INERTIA), plev, DAM_ROLL);
871813 fire_ball(GF_INERTIA, dir, damage, (plev > 40 ? -3 : -2));
872814 break;
873815 case MS_BR_GRAVITY:
874816 if (!get_aim_dir(&dir)) return FALSE;
875817
876818 msg_print(_("重力のブレスを吐いた。", "You breathe gravity."));
877- damage = monspell_bluemage_damage(monspell_num(RF4_SPELL_START, RF4_BR_GRAV), plev, DAM_ROLL);
819+ damage = monspell_bluemage_damage((MS_BR_GRAVITY), plev, DAM_ROLL);
878820 fire_ball(GF_GRAVITY, dir, damage, (plev > 40 ? -3 : -2));
879821 break;
880822 case MS_BR_SHARDS:
881823 if (!get_aim_dir(&dir)) return FALSE;
882824
883825 msg_print(_("破片のブレスを吐いた。", "You breathe shards."));
884- damage = monspell_bluemage_damage(monspell_num(RF4_SPELL_START, RF4_BR_SHAR), plev, DAM_ROLL);
826+ damage = monspell_bluemage_damage((MS_BR_SHARDS), plev, DAM_ROLL);
885827 fire_ball(GF_SHARDS, dir, damage, (plev > 40 ? -3 : -2));
886828 break;
887829 case MS_BR_PLASMA:
888830 if (!get_aim_dir(&dir)) return FALSE;
889831
890832 msg_print(_("プラズマのブレスを吐いた。", "You breathe plasma."));
891- damage = monspell_bluemage_damage(monspell_num(RF4_SPELL_START, RF4_BR_PLAS), plev, DAM_ROLL);
833+ damage = monspell_bluemage_damage((MS_BR_PLASMA), plev, DAM_ROLL);
892834 fire_ball(GF_PLASMA, dir, damage, (plev > 40 ? -3 : -2));
893835 break;
894836 case MS_BR_FORCE:
895837 if (!get_aim_dir(&dir)) return FALSE;
896838
897839 msg_print(_("フォースのブレスを吐いた。", "You breathe force."));
898- damage = monspell_bluemage_damage(monspell_num(RF4_SPELL_START, RF4_BR_WALL), plev, DAM_ROLL);
840+ damage = monspell_bluemage_damage((MS_BR_FORCE), plev, DAM_ROLL);
899841 fire_ball(GF_FORCE, dir, damage, (plev > 40 ? -3 : -2));
900842 break;
901843 case MS_BR_MANA:
902844 if (!get_aim_dir(&dir)) return FALSE;
903845
904846 msg_print(_("魔力のブレスを吐いた。", "You breathe mana."));
905- damage = monspell_bluemage_damage(monspell_num(RF4_SPELL_START, RF4_BR_MANA), plev, DAM_ROLL);
847+ damage = monspell_bluemage_damage((MS_BR_MANA), plev, DAM_ROLL);
906848 fire_ball(GF_MANA, dir, damage, (plev > 40 ? -3 : -2));
907849 break;
908850 case MS_BALL_NUKE:
909851 if (!get_aim_dir(&dir)) return FALSE;
910852
911853 msg_print(_("放射能球を放った。", "You cast a ball of radiation."));
912- damage = monspell_bluemage_damage(monspell_num(RF4_SPELL_START, RF4_BA_NUKE), plev, DAM_ROLL);
854+ damage = monspell_bluemage_damage((MS_BALL_NUKE), plev, DAM_ROLL);
913855 fire_ball(GF_NUKE, dir, damage, 2);
914856 break;
915857 case MS_BR_NUKE:
916858 if (!get_aim_dir(&dir)) return FALSE;
917859
918860 msg_print(_("放射性廃棄物のブレスを吐いた。", "You breathe toxic waste."));
919- damage = monspell_bluemage_damage(monspell_num(RF4_SPELL_START, RF4_BR_NUKE), plev, DAM_ROLL);
861+ damage = monspell_bluemage_damage((MS_BR_NUKE), plev, DAM_ROLL);
920862 fire_ball(GF_NUKE, dir, damage, (plev > 40 ? -3 : -2));
921863 break;
922864 case MS_BALL_CHAOS:
923865 if (!get_aim_dir(&dir)) return FALSE;
924866
925867 msg_print(_("純ログルスを放った。", "You invoke a raw Logrus."));
926- damage = monspell_bluemage_damage(monspell_num(RF4_SPELL_START, RF4_BA_CHAO), plev, DAM_ROLL);
868+ damage = monspell_bluemage_damage((MS_BALL_CHAOS), plev, DAM_ROLL);
927869 fire_ball(GF_CHAOS, dir, damage, 4);
928870 break;
929871 case MS_BR_DISI:
930872 if (!get_aim_dir(&dir)) return FALSE;
931873
932874 msg_print(_("分解のブレスを吐いた。", "You breathe disintegration."));
933- damage = monspell_bluemage_damage(monspell_num(RF4_SPELL_START, RF4_BR_DISI), plev, DAM_ROLL);
875+ damage = monspell_bluemage_damage((MS_BR_DISI), plev, DAM_ROLL);
934876 fire_ball(GF_DISINTEGRATE, dir, damage, (plev > 40 ? -3 : -2));
935877 break;
936878 case MS_BALL_ACID:
937879 if (!get_aim_dir(&dir)) return FALSE;
938880
939881 msg_print(_("アシッド・ボールの呪文を唱えた。", "You cast an acid ball."));
940- damage = monspell_bluemage_damage(monspell_num(RF5_SPELL_START, RF5_BA_ACID), plev, DAM_ROLL);
882+ damage = monspell_bluemage_damage((MS_BALL_ACID), plev, DAM_ROLL);
941883 fire_ball(GF_ACID, dir, damage, 2);
942884 break;
943885 case MS_BALL_ELEC:
944886 if (!get_aim_dir(&dir)) return FALSE;
945887
946888 msg_print(_("サンダー・ボールの呪文を唱えた。", "You cast a lightning ball."));
947- damage = monspell_bluemage_damage(monspell_num(RF5_SPELL_START, RF5_BA_ELEC), plev, DAM_ROLL);
889+ damage = monspell_bluemage_damage((MS_BALL_ELEC), plev, DAM_ROLL);
948890 fire_ball(GF_ELEC, dir, damage, 2);
949891 break;
950892 case MS_BALL_FIRE:
951893 if (!get_aim_dir(&dir)) return FALSE;
952894
953895 msg_print(_("ファイア・ボールの呪文を唱えた。", "You cast a fire ball."));
954- damage = monspell_bluemage_damage(monspell_num(RF5_SPELL_START, RF5_BA_FIRE), plev, DAM_ROLL);
896+ damage = monspell_bluemage_damage((MS_BALL_FIRE), plev, DAM_ROLL);
955897 fire_ball(GF_FIRE, dir, damage, 2);
956898 break;
957899 case MS_BALL_COLD:
958900 if (!get_aim_dir(&dir)) return FALSE;
959901
960902 msg_print(_("アイス・ボールの呪文を唱えた。", "You cast a frost ball."));
961- damage = monspell_bluemage_damage(monspell_num(RF5_SPELL_START, RF5_BA_COLD), plev, DAM_ROLL);
903+ damage = monspell_bluemage_damage((MS_BALL_COLD), plev, DAM_ROLL);
962904 fire_ball(GF_COLD, dir, damage, 2);
963905 break;
964906 case MS_BALL_POIS:
965907 if (!get_aim_dir(&dir)) return FALSE;
966908
967909 msg_print(_("悪臭雲の呪文を唱えた。", "You cast a stinking cloud."));
968- damage = monspell_bluemage_damage(monspell_num(RF5_SPELL_START, RF5_BA_POIS), plev, DAM_ROLL);
910+ damage = monspell_bluemage_damage((MS_BALL_POIS), plev, DAM_ROLL);
969911 fire_ball(GF_POIS, dir, damage, 2);
970912 break;
971913 case MS_BALL_NETHER:
972914 if (!get_aim_dir(&dir)) return FALSE;
973915
974916 msg_print(_("地獄球の呪文を唱えた。", "You cast a nether ball."));
975- damage = monspell_bluemage_damage(monspell_num(RF5_SPELL_START, RF5_BA_NETH), plev, DAM_ROLL);
917+ damage = monspell_bluemage_damage((MS_BALL_NETHER), plev, DAM_ROLL);
976918 fire_ball(GF_NETHER, dir, damage, 2);
977919 break;
978920 case MS_BALL_WATER:
979921 if (!get_aim_dir(&dir)) return FALSE;
980922
981923 msg_print(_("流れるような身振りをした。", "You gesture fluidly."));
982- damage = monspell_bluemage_damage(monspell_num(RF5_SPELL_START, RF5_BA_WATE), plev, DAM_ROLL);
924+ damage = monspell_bluemage_damage((MS_BALL_WATER), plev, DAM_ROLL);
983925 fire_ball(GF_WATER, dir, damage, 4);
984926 break;
985927 case MS_BALL_MANA:
986928 if (!get_aim_dir(&dir)) return FALSE;
987929
988930 msg_print(_("魔力の嵐の呪文を念じた。", "You invoke a mana storm."));
989- damage = monspell_bluemage_damage(monspell_num(RF5_SPELL_START, RF5_BA_MANA), plev, DAM_ROLL);
931+ damage = monspell_bluemage_damage((MS_BALL_MANA), plev, DAM_ROLL);
990932 fire_ball(GF_MANA, dir, damage, 4);
991933 break;
992934 case MS_BALL_DARK:
993935 if (!get_aim_dir(&dir)) return FALSE;
994936
995937 msg_print(_("暗黒の嵐の呪文を念じた。", "You invoke a darkness storm."));
996- damage = monspell_bluemage_damage(monspell_num(RF5_SPELL_START, RF5_BA_DARK), plev, DAM_ROLL);
938+ damage = monspell_bluemage_damage((MS_BALL_DARK), plev, DAM_ROLL);
997939 fire_ball(GF_DARK, dir, damage, 4);
998940 break;
999941 case MS_DRAIN_MANA:
1000942 if (!get_aim_dir(&dir)) return FALSE;
1001943
1002- damage = monspell_bluemage_damage(monspell_num(RF5_SPELL_START, RF5_DRAIN_MANA), plev, DAM_ROLL);
944+ damage = monspell_bluemage_damage((MS_DRAIN_MANA), plev, DAM_ROLL);
1003945 fire_ball_hide(GF_DRAIN_MANA, dir, damage, 0);
1004946 break;
1005947 case MS_MIND_BLAST:
1006948 if (!get_aim_dir(&dir)) return FALSE;
1007949
1008- damage = monspell_bluemage_damage(monspell_num(RF5_SPELL_START, RF5_MIND_BLAST), plev, DAM_ROLL);
950+ damage = monspell_bluemage_damage((MS_MIND_BLAST), plev, DAM_ROLL);
1009951 fire_ball_hide(GF_MIND_BLAST, dir, damage, 0);
1010952 break;
1011953 case MS_BRAIN_SMASH:
1012954 if (!get_aim_dir(&dir)) return FALSE;
1013955
1014- damage = monspell_bluemage_damage(monspell_num(RF5_SPELL_START, RF5_BRAIN_SMASH), plev, DAM_ROLL);
956+ damage = monspell_bluemage_damage((MS_BRAIN_SMASH), plev, DAM_ROLL);
1015957 fire_ball_hide(GF_BRAIN_SMASH, dir, damage, 0);
1016958 break;
1017959 case MS_CAUSE_1:
1018960 if (!get_aim_dir(&dir)) return FALSE;
1019961
1020- damage = monspell_bluemage_damage(monspell_num(RF5_SPELL_START, RF5_CAUSE_1), plev, DAM_ROLL);
962+ damage = monspell_bluemage_damage((MS_CAUSE_1), plev, DAM_ROLL);
1021963 fire_ball_hide(GF_CAUSE_1, dir, damage, 0);
1022964 break;
1023965 case MS_CAUSE_2:
1024966 if (!get_aim_dir(&dir)) return FALSE;
1025967
1026- damage = monspell_bluemage_damage(monspell_num(RF5_SPELL_START, RF5_CAUSE_2), plev, DAM_ROLL);
968+ damage = monspell_bluemage_damage((MS_CAUSE_2), plev, DAM_ROLL);
1027969 fire_ball_hide(GF_CAUSE_2, dir, damage, 0);
1028970 break;
1029971 case MS_CAUSE_3:
1030972 if (!get_aim_dir(&dir)) return FALSE;
1031973
1032- damage = monspell_bluemage_damage(monspell_num(RF5_SPELL_START, RF5_CAUSE_3), plev, DAM_ROLL);
974+ damage = monspell_bluemage_damage((MS_CAUSE_3), plev, DAM_ROLL);
1033975 fire_ball_hide(GF_CAUSE_3, dir, damage, 0);
1034976 break;
1035977 case MS_CAUSE_4:
1036978 if (!get_aim_dir(&dir)) return FALSE;
1037979
1038- damage = monspell_bluemage_damage(monspell_num(RF5_SPELL_START, RF5_CAUSE_4), plev, DAM_ROLL);
980+ damage = monspell_bluemage_damage((MS_CAUSE_4), plev, DAM_ROLL);
1039981 fire_ball_hide(GF_CAUSE_4, dir, damage, 0);
1040982 break;
1041983 case MS_BOLT_ACID:
1042984 if (!get_aim_dir(&dir)) return FALSE;
1043985
1044986 msg_print(_("アシッド・ボルトの呪文を唱えた。", "You cast an acid bolt."));
1045- damage = monspell_bluemage_damage(monspell_num(RF5_SPELL_START, RF5_BO_ACID), plev, DAM_ROLL);
987+ damage = monspell_bluemage_damage((MS_BOLT_ACID), plev, DAM_ROLL);
1046988 fire_bolt(GF_ACID, dir, damage);
1047989 break;
1048990 case MS_BOLT_ELEC:
1049991 if (!get_aim_dir(&dir)) return FALSE;
1050992
1051993 msg_print(_("サンダー・ボルトの呪文を唱えた。", "You cast a lightning bolt."));
1052- damage = monspell_bluemage_damage(monspell_num(RF5_SPELL_START, RF5_BO_ELEC), plev, DAM_ROLL);
994+ damage = monspell_bluemage_damage((MS_BOLT_ELEC), plev, DAM_ROLL);
1053995 fire_bolt(GF_ELEC, dir, damage);
1054996 break;
1055997 case MS_BOLT_FIRE:
1056998 if (!get_aim_dir(&dir)) return FALSE;
1057999
10581000 msg_print(_("ファイア・ボルトの呪文を唱えた。", "You cast a fire bolt."));
1059- damage = monspell_bluemage_damage(monspell_num(RF5_SPELL_START, RF5_BO_FIRE), plev, DAM_ROLL);
1001+ damage = monspell_bluemage_damage((MS_BOLT_FIRE), plev, DAM_ROLL);
10601002 fire_bolt(GF_FIRE, dir, damage);
10611003 break;
10621004 case MS_BOLT_COLD:
10631005 if (!get_aim_dir(&dir)) return FALSE;
10641006
10651007 msg_print(_("アイス・ボルトの呪文を唱えた。", "You cast a frost bolt."));
1066- damage = monspell_bluemage_damage(monspell_num(RF5_SPELL_START, RF5_BO_COLD), plev, DAM_ROLL);
1008+ damage = monspell_bluemage_damage((MS_BOLT_COLD), plev, DAM_ROLL);
10671009 fire_bolt(GF_COLD, dir, damage);
10681010 break;
10691011 case MS_STARBURST:
10701012 if (!get_aim_dir(&dir)) return FALSE;
10711013
10721014 msg_print(_("スターバーストの呪文を念じた。", "You invoke a starburst."));
1073- damage = monspell_bluemage_damage(monspell_num(RF5_SPELL_START, RF5_BA_LITE), plev, DAM_ROLL);
1015+ damage = monspell_bluemage_damage((MS_STARBURST), plev, DAM_ROLL);
10741016 fire_ball(GF_LITE, dir, damage, 4);
10751017 break;
10761018 case MS_BOLT_NETHER:
10771019 if (!get_aim_dir(&dir)) return FALSE;
10781020
10791021 msg_print(_("地獄の矢の呪文を唱えた。", "You cast a nether bolt."));
1080- damage = monspell_bluemage_damage(monspell_num(RF5_SPELL_START, RF5_BO_NETH), plev, DAM_ROLL);
1022+ damage = monspell_bluemage_damage((MS_BOLT_NETHER), plev, DAM_ROLL);
10811023 fire_bolt(GF_NETHER, dir, damage);
10821024 break;
10831025 case MS_BOLT_WATER:
10841026 if (!get_aim_dir(&dir)) return FALSE;
10851027
10861028 msg_print(_("ウォーター・ボルトの呪文を唱えた。", "You cast a water bolt."));
1087- damage = monspell_bluemage_damage(monspell_num(RF5_SPELL_START, RF5_BO_WATE), plev, DAM_ROLL);
1029+ damage = monspell_bluemage_damage((MS_BOLT_WATER), plev, DAM_ROLL);
10881030 fire_bolt(GF_WATER, dir, damage);
10891031 break;
10901032 case MS_BOLT_MANA:
10911033 if (!get_aim_dir(&dir)) return FALSE;
10921034
10931035 msg_print(_("魔力の矢の呪文を唱えた。", "You cast a mana bolt."));
1094- damage = monspell_bluemage_damage(monspell_num(RF5_SPELL_START, RF5_BO_MANA), plev, DAM_ROLL);
1036+ damage = monspell_bluemage_damage((MS_BOLT_MANA), plev, DAM_ROLL);
10951037 fire_bolt(GF_MANA, dir, damage);
10961038 break;
10971039 case MS_BOLT_PLASMA:
10981040 if (!get_aim_dir(&dir)) return FALSE;
10991041
11001042 msg_print(_("プラズマ・ボルトの呪文を唱えた。", "You cast a plasma bolt."));
1101- damage = monspell_bluemage_damage(monspell_num(RF5_SPELL_START, RF5_BO_PLAS), plev, DAM_ROLL);
1043+ damage = monspell_bluemage_damage((MS_BOLT_PLASMA), plev, DAM_ROLL);
11021044 fire_bolt(GF_PLASMA, dir, damage);
11031045 break;
11041046 case MS_BOLT_ICE:
11051047 if (!get_aim_dir(&dir)) return FALSE;
11061048
11071049 msg_print(_("極寒の矢の呪文を唱えた。", "You cast a ice bolt."));
1108- damage = monspell_bluemage_damage(monspell_num(RF5_SPELL_START, RF5_BO_ICEE), plev, DAM_ROLL);
1050+ damage = monspell_bluemage_damage((MS_BOLT_ICE), plev, DAM_ROLL);
11091051 fire_bolt(GF_ICE, dir, damage);
11101052 break;
11111053 case MS_MAGIC_MISSILE:
11121054 if (!get_aim_dir(&dir)) return FALSE;
11131055
11141056 msg_print(_("マジック・ミサイルの呪文を唱えた。", "You cast a magic missile."));
1115- damage = monspell_bluemage_damage(monspell_num(RF5_SPELL_START, RF5_MISSILE), plev, DAM_ROLL);
1057+ damage = monspell_bluemage_damage((MS_MAGIC_MISSILE), plev, DAM_ROLL);
11161058 fire_bolt(GF_MISSILE, dir, damage);
11171059 break;
11181060 case MS_SCARE:
@@ -1253,7 +1195,7 @@ static bool cast_learned_spell(int spell, bool success)
12531195 if (!get_aim_dir(&dir)) return FALSE;
12541196
12551197 msg_print(_("光の剣を放った。", "You throw a psycho-spear."));
1256- damage = monspell_bluemage_damage(monspell_num(RF6_SPELL_START, RF6_PSY_SPEAR), plev, DAM_ROLL);
1198+ damage = monspell_bluemage_damage((MS_PSY_SPEAR), plev, DAM_ROLL);
12571199 (void)fire_beam(GF_PSY_SPEAR, dir, damage);
12581200 break;
12591201 case MS_DARKNESS:
--- a/src/mspells4.c
+++ b/src/mspells4.c
@@ -1,23 +1,6 @@
11 #include "angband.h"
22
33 /*!
4-* @brief モンスターの呪文の通し番号を取得する /
5-* @param SPELL_NUM_BASE RF4ならRF4_SPELL_STARTのように32区切りのベースとなる数値
6-* @param SPELL_FLAG RF4_SHRIEKなどのスペルフラグ
7-* @return 呪文の通し番号。
8-*/
9-int monspell_num(int SPELL_NUM_BASE, u32b SPELL_FLAG)
10-{
11- int k;
12- for (k = 0; k < 32; k++)
13- {
14- if (SPELL_FLAG & (1L << k)) return k + SPELL_NUM_BASE;
15- }
16- return 0;
17-}
18-
19-
20-/*!
214 * @brief モンスターIDを取り、モンスター名をm_nameに代入する /
225 * @param m_idx モンスターID
236 * @param m_name モンスター名を入力する配列
@@ -89,7 +72,8 @@ bool monster_is_powerful(int m_idx)
8972 {
9073 monster_type *m_ptr = &m_list[m_idx];
9174 monster_race *r_ptr = &r_info[m_ptr->r_idx];
92- return (r_ptr->flags2 & RF2_POWERFUL);
75+ bool powerful = r_ptr->flags2 & RF2_POWERFUL ? TRUE : FALSE;
76+ return powerful;
9377 }
9478
9579 /*!
@@ -268,7 +252,7 @@ int spell_RF4_ROCKET(int y, int x, int m_idx, int t_idx, int TARGET_TYPE)
268252 _("%^sが%sにロケットを発射した。", "%^s fires a rocket at %s."),
269253 TARGET_TYPE);
270254
271- dam = monspell_damage(monspell_num(RF4_SPELL_START, RF4_ROCKET), m_idx, DAM_ROLL);
255+ dam = monspell_damage((MS_ROCKET), m_idx, DAM_ROLL);
272256 breath(y, x, m_idx, GF_ROCKET, dam, 2, FALSE, MS_ROCKET, TARGET_TYPE);
273257 if (TARGET_TYPE == MONSTER_TO_PLAYER)
274258 update_smart_learn(m_idx, DRS_SHARD);
@@ -294,7 +278,7 @@ int spell_RF4_SHOOT(int y, int x, int m_idx, int t_idx,int TARGET_TYPE)
294278 _("%^sが%sに矢を放った。", "%^s fires an arrow at %s."),
295279 TARGET_TYPE);
296280
297- dam = monspell_damage(monspell_num(RF4_SPELL_START, RF4_SHOOT), m_idx, DAM_ROLL);
281+ dam = monspell_damage((MS_SHOOT), m_idx, DAM_ROLL);
298282 bolt(m_idx, y, x, GF_ARROW, dam, MS_SHOOT, TARGET_TYPE);
299283 sound(SOUND_SHOOT);
300284
@@ -328,133 +312,133 @@ int spell_RF4_BREATH(int GF_TYPE, int y, int x, int m_idx, int t_idx, int TARGET
328312 switch (GF_TYPE)
329313 {
330314 case GF_ACID:
331- dam = monspell_damage(monspell_num(RF4_SPELL_START, RF4_BR_ACID), m_idx, DAM_ROLL);
315+ dam = monspell_damage((MS_BR_ACID), m_idx, DAM_ROLL);
332316 type_s = _("酸", "acid");
333317 ms_type = MS_BR_ACID;
334318 drs_type = DRS_ACID;
335319 break;
336320 case GF_ELEC:
337- dam = monspell_damage(monspell_num(RF4_SPELL_START, RF4_BR_ELEC), m_idx, DAM_ROLL);
321+ dam = monspell_damage((MS_BR_ELEC), m_idx, DAM_ROLL);
338322 type_s = _("稲妻", "lightning");
339323 ms_type = MS_BR_ELEC;
340324 drs_type = DRS_ELEC;
341325 break;
342326 case GF_FIRE:
343- dam = monspell_damage(monspell_num(RF4_SPELL_START, RF4_BR_FIRE), m_idx, DAM_ROLL);
327+ dam = monspell_damage((MS_BR_FIRE), m_idx, DAM_ROLL);
344328 type_s = _("火炎", "fire");
345329 ms_type = MS_BR_FIRE;
346330 drs_type = DRS_FIRE;
347331 break;
348332 case GF_COLD:
349- dam = monspell_damage(monspell_num(RF4_SPELL_START, RF4_BR_COLD), m_idx, DAM_ROLL);
333+ dam = monspell_damage((MS_BR_COLD), m_idx, DAM_ROLL);
350334 type_s = _("冷気", "frost");
351335 ms_type = MS_BR_COLD;
352336 drs_type = DRS_COLD;
353337 break;
354338 case GF_POIS:
355- dam = monspell_damage(monspell_num(RF4_SPELL_START, RF4_BR_POIS), m_idx, DAM_ROLL);
339+ dam = monspell_damage((MS_BR_POIS), m_idx, DAM_ROLL);
356340 type_s = _("ガス", "gas");
357341 ms_type = MS_BR_POIS;
358342 drs_type = DRS_POIS;
359343 break;
360344 case GF_NETHER:
361- dam = monspell_damage(monspell_num(RF4_SPELL_START, RF4_BR_NETH), m_idx, DAM_ROLL);
345+ dam = monspell_damage((MS_BR_NETHER), m_idx, DAM_ROLL);
362346 type_s = _("地獄", "nether");
363347 ms_type = MS_BR_NETHER;
364348 drs_type = DRS_NETH;
365349 break;
366350 case GF_LITE:
367- dam = monspell_damage(monspell_num(RF4_SPELL_START, RF4_BR_LITE), m_idx, DAM_ROLL);
351+ dam = monspell_damage((MS_BR_LITE), m_idx, DAM_ROLL);
368352 type_s = _("閃光", "light");
369353 ms_type = MS_BR_LITE;
370354 drs_type = DRS_LITE;
371355 break;
372356 case GF_DARK:
373- dam = monspell_damage(monspell_num(RF4_SPELL_START, RF4_BR_DARK), m_idx, DAM_ROLL);
357+ dam = monspell_damage((MS_BR_DARK), m_idx, DAM_ROLL);
374358 type_s = _("暗黒", "darkness");
375359 ms_type = MS_BR_DARK;
376360 drs_type = DRS_DARK;
377361 break;
378362 case GF_CONFUSION:
379- dam = monspell_damage(monspell_num(RF4_SPELL_START, RF4_BR_CONF), m_idx, DAM_ROLL);
363+ dam = monspell_damage((MS_BR_CONF), m_idx, DAM_ROLL);
380364 type_s = _("混乱", "confusion");
381365 ms_type = MS_BR_CONF;
382366 drs_type = DRS_CONF;
383367 break;
384368 case GF_SOUND:
385- dam = monspell_damage(monspell_num(RF4_SPELL_START, RF4_BR_SOUN), m_idx, DAM_ROLL);
369+ dam = monspell_damage((MS_BR_SOUND), m_idx, DAM_ROLL);
386370 type_s = _("轟音", "sound");
387371 ms_type = MS_BR_SOUND;
388372 drs_type = DRS_SOUND;
389373 break;
390374 case GF_CHAOS:
391- dam = monspell_damage(monspell_num(RF4_SPELL_START, RF4_BR_CHAO), m_idx, DAM_ROLL);
375+ dam = monspell_damage((MS_BR_CHAOS), m_idx, DAM_ROLL);
392376 type_s = _("カオス", "chaos");
393377 ms_type = MS_BR_CHAOS;
394378 drs_type = DRS_CHAOS;
395379 break;
396380 case GF_DISENCHANT:
397- dam = monspell_damage(monspell_num(RF4_SPELL_START, RF4_BR_DISE), m_idx, DAM_ROLL);
381+ dam = monspell_damage((MS_BR_DISEN), m_idx, DAM_ROLL);
398382 type_s = _("劣化", "disenchantment");
399383 ms_type = MS_BR_DISEN;
400384 drs_type = DRS_DISEN;
401385 break;
402386 case GF_NEXUS:
403- dam = monspell_damage(monspell_num(RF4_SPELL_START, RF4_BR_NEXU), m_idx, DAM_ROLL);
387+ dam = monspell_damage((MS_BR_NEXUS), m_idx, DAM_ROLL);
404388 type_s = _("因果混乱", "nexus");
405389 ms_type = MS_BR_NEXUS;
406390 drs_type = DRS_NEXUS;
407391 break;
408392 case GF_TIME:
409- dam = monspell_damage(monspell_num(RF4_SPELL_START, RF4_BR_TIME), m_idx, DAM_ROLL);
393+ dam = monspell_damage((MS_BR_TIME), m_idx, DAM_ROLL);
410394 type_s = _("時間逆転", "time");
411395 ms_type = MS_BR_TIME;
412396 smart_learn = FALSE;
413397 break;
414398 case GF_INERTIA:
415- dam = monspell_damage(monspell_num(RF4_SPELL_START, RF4_BR_INER), m_idx, DAM_ROLL);
399+ dam = monspell_damage((MS_BR_INERTIA), m_idx, DAM_ROLL);
416400 type_s = _("遅鈍", "inertia");
417401 ms_type = MS_BR_INERTIA;
418402 smart_learn = FALSE;
419403 break;
420404 case GF_GRAVITY:
421- dam = monspell_damage(monspell_num(RF4_SPELL_START, RF4_BR_GRAV), m_idx, DAM_ROLL);
405+ dam = monspell_damage((MS_BR_GRAVITY), m_idx, DAM_ROLL);
422406 type_s = _("重力", "gravity");
423407 ms_type = MS_BR_GRAVITY;
424408 smart_learn = FALSE;
425409 break;
426410 case GF_SHARDS:
427- dam = monspell_damage(monspell_num(RF4_SPELL_START, RF4_BR_SHAR), m_idx, DAM_ROLL);
411+ dam = monspell_damage((MS_BR_SHARDS), m_idx, DAM_ROLL);
428412 type_s = _("破片", "shards");
429413 ms_type = MS_BR_SHARDS;
430414 drs_type = DRS_SHARD;
431415 break;
432416 case GF_PLASMA:
433- dam = monspell_damage(monspell_num(RF4_SPELL_START, RF4_BR_PLAS), m_idx, DAM_ROLL);
417+ dam = monspell_damage((MS_BR_PLASMA), m_idx, DAM_ROLL);
434418 type_s = _("プラズマ", "plasma");
435419 ms_type = MS_BR_PLASMA;
436420 smart_learn = FALSE;
437421 break;
438422 case GF_FORCE:
439- dam = monspell_damage(monspell_num(RF4_SPELL_START, RF4_BR_WALL), m_idx, DAM_ROLL);
423+ dam = monspell_damage((MS_BR_FORCE), m_idx, DAM_ROLL);
440424 type_s = _("フォース", "force");
441425 ms_type = MS_BR_FORCE;
442426 smart_learn = FALSE;
443427 break;
444428 case GF_MANA:
445- dam = monspell_damage(monspell_num(RF4_SPELL_START, RF4_BR_MANA), m_idx, DAM_ROLL);
429+ dam = monspell_damage((MS_BR_MANA), m_idx, DAM_ROLL);
446430 type_s = _("魔力", "mana");
447431 ms_type = MS_BR_MANA;
448432 smart_learn = FALSE;
449433 break;
450434 case GF_NUKE:
451- dam = monspell_damage(monspell_num(RF4_SPELL_START, RF4_BR_NUKE), m_idx, DAM_ROLL);
435+ dam = monspell_damage((MS_BR_NUKE), m_idx, DAM_ROLL);
452436 type_s = _("放射性廃棄物", "toxic waste");
453437 ms_type = MS_BR_NUKE;
454438 drs_type = DRS_POIS;
455439 break;
456440 case GF_DISINTEGRATE:
457- dam = monspell_damage(monspell_num(RF4_SPELL_START, RF4_BR_DISI), m_idx, DAM_ROLL);
441+ dam = monspell_damage((MS_BR_DISI), m_idx, DAM_ROLL);
458442 type_s = _("分解", "disintegration");
459443 ms_type = MS_BR_DISI;
460444 smart_learn = FALSE;
@@ -522,7 +506,7 @@ int spell_RF4_BA_NUKE(int y, int x, int m_idx, int t_idx, int TARGET_TYPE)
522506 _("%^sが%sに放射能球を放った。", "%^s casts a ball of radiation at %s."),
523507 TARGET_TYPE);
524508
525- dam = monspell_damage(monspell_num(RF4_SPELL_START, RF4_BA_NUKE), m_idx, DAM_ROLL);
509+ dam = monspell_damage((MS_BALL_NUKE), m_idx, DAM_ROLL);
526510 breath(y, x, m_idx, GF_NUKE, dam, 2, FALSE, MS_BALL_NUKE, TARGET_TYPE);
527511 if (TARGET_TYPE == MONSTER_TO_PLAYER)
528512 update_smart_learn(m_idx, DRS_POIS);
@@ -549,7 +533,7 @@ int spell_RF4_BA_CHAO(int y, int x, int m_idx, int t_idx, int TARGET_TYPE)
549533 _("%^sが%sに純ログルスを放った。", "%^s invokes raw Logrus upon %s."),
550534 TARGET_TYPE);
551535
552- dam = monspell_damage(monspell_num(RF4_SPELL_START, RF4_BA_CHAO), m_idx, DAM_ROLL);
536+ dam = monspell_damage((MS_BALL_CHAOS), m_idx, DAM_ROLL);
553537 breath(y, x, m_idx, GF_CHAOS, dam, 4, FALSE, MS_BALL_CHAOS, TARGET_TYPE);
554538 if (TARGET_TYPE == MONSTER_TO_PLAYER)
555539 update_smart_learn(m_idx, DRS_CHAOS);
@@ -578,7 +562,7 @@ int spell_RF5_BA_ACID(int y, int x, int m_idx, int t_idx, int TARGET_TYPE)
578562 TARGET_TYPE);
579563
580564 rad = monster_is_powerful(m_idx) ? 4 : 2;
581- dam = monspell_damage(monspell_num(RF5_SPELL_START, RF5_BA_ACID), m_idx, DAM_ROLL);
565+ dam = monspell_damage((MS_BALL_ACID), m_idx, DAM_ROLL);
582566 breath(y, x, m_idx, GF_ACID, dam, rad, FALSE, MS_BALL_ACID, TARGET_TYPE);
583567 if (TARGET_TYPE == MONSTER_TO_PLAYER)
584568 update_smart_learn(m_idx, DRS_ACID);
@@ -607,7 +591,7 @@ int spell_RF5_BA_ELEC(int y, int x, int m_idx, int t_idx, int TARGET_TYPE)
607591 TARGET_TYPE);
608592
609593 rad = monster_is_powerful(m_idx) ? 4 : 2;
610- dam = monspell_damage(monspell_num(RF5_SPELL_START, RF5_BA_ELEC), m_idx, DAM_ROLL);
594+ dam = monspell_damage((MS_BALL_ELEC), m_idx, DAM_ROLL);
611595 breath(y, x, m_idx, GF_ELEC, dam, rad, FALSE, MS_BALL_ELEC, TARGET_TYPE);
612596 if (TARGET_TYPE == MONSTER_TO_PLAYER)
613597 update_smart_learn(m_idx, DRS_ELEC);
@@ -647,7 +631,7 @@ int spell_RF5_BA_FIRE(int y, int x, int m_idx, int t_idx, int TARGET_TYPE)
647631 TARGET_TYPE);
648632 }
649633 rad = monster_is_powerful(m_idx) ? 4 : 2;
650- dam = monspell_damage(monspell_num(RF5_SPELL_START, RF5_BA_FIRE), m_idx, DAM_ROLL);
634+ dam = monspell_damage((MS_BALL_FIRE), m_idx, DAM_ROLL);
651635 breath(y, x, m_idx, GF_FIRE, dam, rad, FALSE, MS_BALL_FIRE, TARGET_TYPE);
652636 if (TARGET_TYPE == MONSTER_TO_PLAYER)
653637 update_smart_learn(m_idx, DRS_FIRE);
@@ -676,7 +660,7 @@ int spell_RF5_BA_COLD(int y, int x, int m_idx, int t_idx, int TARGET_TYPE)
676660 TARGET_TYPE);
677661
678662 rad = monster_is_powerful(m_idx) ? 4 : 2;
679- dam = monspell_damage(monspell_num(RF5_SPELL_START, RF5_BA_COLD), m_idx, DAM_ROLL);
663+ dam = monspell_damage((MS_BALL_COLD), m_idx, DAM_ROLL);
680664 breath(y, x, m_idx, GF_COLD, dam, rad, FALSE, MS_BALL_COLD, TARGET_TYPE);
681665 if (TARGET_TYPE == MONSTER_TO_PLAYER)
682666 update_smart_learn(m_idx, DRS_COLD);
@@ -703,7 +687,7 @@ int spell_RF5_BA_POIS(int y, int x, int m_idx, int t_idx, int TARGET_TYPE)
703687 _("%^sが%sに向かって悪臭雲の呪文を唱えた。", "%^s casts a stinking cloud at %s."),
704688 TARGET_TYPE);
705689
706- dam = monspell_damage(monspell_num(RF5_SPELL_START, RF5_BA_POIS), m_idx, DAM_ROLL);
690+ dam = monspell_damage((MS_BALL_POIS), m_idx, DAM_ROLL);
707691 breath(y, x, m_idx, GF_POIS, dam, 2, FALSE, MS_BALL_POIS, TARGET_TYPE);
708692 if (TARGET_TYPE == MONSTER_TO_PLAYER)
709693 update_smart_learn(m_idx, DRS_POIS);
@@ -730,7 +714,7 @@ int spell_RF5_BA_NETH(int y, int x, int m_idx, int t_idx, int TARGET_TYPE)
730714 _("%^sが%sに向かって地獄球の呪文を唱えた。", "%^s casts a nether ball at %s."),
731715 TARGET_TYPE);
732716
733- dam = monspell_damage(monspell_num(RF5_SPELL_START, RF5_BA_NETH), m_idx, DAM_ROLL);
717+ dam = monspell_damage((MS_BALL_NETHER), m_idx, DAM_ROLL);
734718 breath(y, x, m_idx, GF_NETHER, dam, 2, FALSE, MS_BALL_NETHER, TARGET_TYPE);
735719 if (TARGET_TYPE == MONSTER_TO_PLAYER)
736720 update_smart_learn(m_idx, DRS_NETH);
@@ -773,7 +757,7 @@ int spell_RF5_BA_WATE(int y, int x, int m_idx, int t_idx, int TARGET_TYPE)
773757 msg_format(_("%^sは渦巻に飲み込まれた。", "%^s is engulfed in a whirlpool."), t_name);
774758 }
775759
776- dam = monspell_damage(monspell_num(RF5_SPELL_START, RF5_BA_WATE), m_idx, DAM_ROLL);
760+ dam = monspell_damage((MS_BALL_WATER), m_idx, DAM_ROLL);
777761 breath(y, x, m_idx, GF_WATER, dam, 4, FALSE, MS_BALL_WATER, TARGET_TYPE);
778762 return dam;
779763 }
@@ -797,7 +781,7 @@ int spell_RF5_BA_MANA(int y, int x, int m_idx, int t_idx, int TARGET_TYPE)
797781 _("%^sが%sに対して魔力の嵐の呪文を念じた。", "%^s invokes a mana storm upon %s."),
798782 TARGET_TYPE);
799783
800- dam = monspell_damage(monspell_num(RF5_SPELL_START, RF5_BA_MANA), m_idx, DAM_ROLL);
784+ dam = monspell_damage((MS_BALL_MANA), m_idx, DAM_ROLL);
801785 breath(y, x, m_idx, GF_MANA, dam, 4, FALSE, MS_BALL_MANA, TARGET_TYPE);
802786 return dam;
803787 }
@@ -821,7 +805,7 @@ int spell_RF5_BA_DARK(int y, int x, int m_idx, int t_idx, int TARGET_TYPE)
821805 _("%^sが%sに対して暗黒の嵐の呪文を念じた。", "%^s invokes a darkness storm upon %s."),
822806 TARGET_TYPE);
823807
824- dam = monspell_damage(monspell_num(RF5_SPELL_START, RF5_BA_DARK), m_idx, DAM_ROLL);
808+ dam = monspell_damage((MS_BALL_DARK), m_idx, DAM_ROLL);
825809 breath(y, x, m_idx, GF_DARK, dam, 4, FALSE, MS_BALL_DARK, TARGET_TYPE);
826810 if (TARGET_TYPE == MONSTER_TO_PLAYER)
827811 update_smart_learn(m_idx, DRS_DARK);
@@ -856,7 +840,7 @@ int spell_RF5_DRAIN_MANA(int y, int x, int m_idx, int t_idx, int TARGET_TYPE)
856840 msg_format(_("%^sは精神エネルギーを%sから吸いとった。", "%^s draws psychic energy from %s."), m_name, t_name);
857841 }
858842
859- dam = monspell_damage(monspell_num(RF5_SPELL_START, RF5_DRAIN_MANA), m_idx, DAM_ROLL);
843+ dam = monspell_damage((MS_DRAIN_MANA), m_idx, DAM_ROLL);
860844 breath(y, x, m_idx, GF_DRAIN_MANA, dam, 0, FALSE, MS_DRAIN_MANA, TARGET_TYPE);
861845 if (TARGET_TYPE == MONSTER_TO_PLAYER)
862846 update_smart_learn(m_idx, DRS_MANA);
@@ -896,7 +880,7 @@ int spell_RF5_MIND_BLAST(int y, int x, int m_idx, int t_idx, int TARGET_TYPE)
896880 msg_format(_("%^sは%sをじっと睨んだ。", "%^s gazes intently at %s."), m_name, t_name);
897881 }
898882
899- dam = monspell_damage(monspell_num(RF5_SPELL_START, RF5_MIND_BLAST), m_idx, DAM_ROLL);
883+ dam = monspell_damage((MS_MIND_BLAST), m_idx, DAM_ROLL);
900884 breath(y, x, m_idx, GF_MIND_BLAST, dam, 0, FALSE, MS_MIND_BLAST, TARGET_TYPE);
901885 return dam;
902886 }
@@ -933,7 +917,7 @@ int spell_RF5_BRAIN_SMASH(int y, int x, int m_idx, int t_idx, int TARGET_TYPE)
933917 msg_format(_("%^sは%sをじっと睨んだ。", "%^s gazes intently at %s."), m_name, t_name);
934918 }
935919
936- dam = monspell_damage(monspell_num(RF5_SPELL_START, RF5_BRAIN_SMASH), m_idx, DAM_ROLL);
920+ dam = monspell_damage((MS_BRAIN_SMASH), m_idx, DAM_ROLL);
937921 breath(y, x, m_idx, GF_BRAIN_SMASH, dam, 0, FALSE, MS_BRAIN_SMASH, TARGET_TYPE);
938922 return dam;
939923 }
@@ -994,7 +978,7 @@ int spell_RF5_CAUSE_1(int y, int x, int m_idx, int t_idx, int TARGET_TYPE)
994978 {
995979 cptr msg1, msg2, msg3;
996980 int dam;
997- dam = monspell_damage(monspell_num(RF5_SPELL_START, RF5_CAUSE_1), m_idx, DAM_ROLL);
981+ dam = monspell_damage((MS_CAUSE_1), m_idx, DAM_ROLL);
998982
999983 msg1 = _("%^sが何かをつぶやいた。", "%^s mumbles.");
1000984 msg2 = _("%^sがあなたを指さして呪った。", "%^s points at you and curses.");
@@ -1017,7 +1001,7 @@ int spell_RF5_CAUSE_2(int y, int x, int m_idx, int t_idx, int TARGET_TYPE)
10171001 {
10181002 cptr msg1, msg2, msg3;
10191003 int dam;
1020- dam = monspell_damage(monspell_num(RF5_SPELL_START, RF5_CAUSE_2), m_idx, DAM_ROLL);
1004+ dam = monspell_damage((MS_CAUSE_2), m_idx, DAM_ROLL);
10211005
10221006 msg1 = _("%^sが何かをつぶやいた。", "%^s mumbles.");
10231007 msg2 = _("%^sがあなたを指さして恐ろしげに呪った。", "%^s points at you and curses horribly.");
@@ -1040,7 +1024,7 @@ int spell_RF5_CAUSE_3(int y, int x, int m_idx, int t_idx, int TARGET_TYPE)
10401024 {
10411025 cptr msg1, msg2, msg3;
10421026 int dam;
1043- dam = monspell_damage(monspell_num(RF5_SPELL_START, RF5_CAUSE_3), m_idx, DAM_ROLL);
1027+ dam = monspell_damage((MS_CAUSE_3), m_idx, DAM_ROLL);
10441028
10451029 msg1 = _("%^sが何かを大声で叫んだ。", "%^s mumbles loudly.");
10461030 msg2 = _("%^sがあなたを指さして恐ろしげに呪文を唱えた!", "%^s points at you, incanting terribly!");
@@ -1063,7 +1047,7 @@ int spell_RF5_CAUSE_4(int y, int x, int m_idx, int t_idx, int TARGET_TYPE)
10631047 {
10641048 cptr msg1, msg2, msg3;
10651049 int dam;
1066- dam = monspell_damage(monspell_num(RF5_SPELL_START, RF5_CAUSE_4), m_idx, DAM_ROLL);
1050+ dam = monspell_damage((MS_CAUSE_4), m_idx, DAM_ROLL);
10671051
10681052 msg1 = _("%^sが「お前は既に死んでいる」と叫んだ。", "%^s screams the word 'DIE!'");
10691053 msg2 = _("%^sがあなたの秘孔を突いて「お前は既に死んでいる」と叫んだ。", "%^s points at you, screaming the word DIE!");
@@ -1092,7 +1076,7 @@ int spell_RF5_BO_ACID(int y, int x, int m_idx, int t_idx, int TARGET_TYPE)
10921076 _("%sが%sに向かってアシッド・ボルトの呪文を唱えた。", "%^s casts an acid bolt at %s."),
10931077 TARGET_TYPE);
10941078
1095- dam = monspell_damage(monspell_num(RF5_SPELL_START, RF5_BO_ACID), m_idx, DAM_ROLL);
1079+ dam = monspell_damage((MS_BOLT_ACID), m_idx, DAM_ROLL);
10961080 bolt(m_idx, y, x, GF_ACID, dam, MS_BOLT_ACID, TARGET_TYPE);
10971081 if (TARGET_TYPE == MONSTER_TO_PLAYER)
10981082 {
@@ -1121,7 +1105,7 @@ int spell_RF5_BO_ELEC(int y, int x, int m_idx, int t_idx, int TARGET_TYPE)
11211105 _("%^sが%sに向かってサンダー・ボルトの呪文を唱えた。", "%^s casts a lightning bolt at %s."),
11221106 TARGET_TYPE);
11231107
1124- dam = monspell_damage(monspell_num(RF5_SPELL_START, RF5_BO_ELEC), m_idx, DAM_ROLL);
1108+ dam = monspell_damage((MS_BOLT_ELEC), m_idx, DAM_ROLL);
11251109 bolt(m_idx, y, x, GF_ELEC, dam, MS_BOLT_ELEC, TARGET_TYPE);
11261110 if (TARGET_TYPE == MONSTER_TO_PLAYER)
11271111 {
@@ -1150,7 +1134,7 @@ int spell_RF5_BO_FIRE(int y, int x, int m_idx, int t_idx, int TARGET_TYPE)
11501134 _("%^sが%sに向かってファイア・ボルトの呪文を唱えた。", "%^s casts a fire bolt at %s."),
11511135 TARGET_TYPE);
11521136
1153- dam = monspell_damage(monspell_num(RF5_SPELL_START, RF5_BO_FIRE), m_idx, DAM_ROLL);
1137+ dam = monspell_damage((MS_BOLT_FIRE), m_idx, DAM_ROLL);
11541138 bolt(m_idx, y, x, GF_FIRE, dam, MS_BOLT_FIRE, TARGET_TYPE);
11551139 if (TARGET_TYPE == MONSTER_TO_PLAYER)
11561140 {
@@ -1179,7 +1163,7 @@ int spell_RF5_BO_COLD(int y, int x, int m_idx, int t_idx, int TARGET_TYPE)
11791163 _("%^sが%sに向かってアイス・ボルトの呪文を唱えた。", "%^s casts a frost bolt at %s."),
11801164 TARGET_TYPE);
11811165
1182- dam = monspell_damage(monspell_num(RF5_SPELL_START, RF5_BO_COLD), m_idx, DAM_ROLL);
1166+ dam = monspell_damage((MS_BOLT_COLD), m_idx, DAM_ROLL);
11831167 bolt(m_idx, y, x, GF_COLD, dam, MS_BOLT_COLD, TARGET_TYPE);
11841168 if (TARGET_TYPE == MONSTER_TO_PLAYER)
11851169 {
@@ -1208,7 +1192,7 @@ int spell_RF5_BA_LITE(int y, int x, int m_idx, int t_idx, int TARGET_TYPE)
12081192 _("%^sが%sに対してスターバーストの呪文を念じた。", "%^s invokes a starburst upon %s."),
12091193 TARGET_TYPE);
12101194
1211- dam = monspell_damage(monspell_num(RF5_SPELL_START, RF5_BA_LITE), m_idx, DAM_ROLL);
1195+ dam = monspell_damage((MS_STARBURST), m_idx, DAM_ROLL);
12121196 breath(y, x, m_idx, GF_LITE, dam, 4, FALSE, MS_STARBURST, TARGET_TYPE);
12131197 if (TARGET_TYPE == MONSTER_TO_PLAYER)
12141198 update_smart_learn(m_idx, DRS_LITE);
@@ -1235,7 +1219,7 @@ int spell_RF5_BO_NETH(int y, int x, int m_idx, int t_idx, int TARGET_TYPE)
12351219 _("%^sが%sに向かって地獄の矢の呪文を唱えた。", "%^s casts a nether bolt at %s."),
12361220 TARGET_TYPE);
12371221
1238- dam = monspell_damage(monspell_num(RF5_SPELL_START, RF5_BO_NETH), m_idx, DAM_ROLL);
1222+ dam = monspell_damage((MS_BOLT_NETHER), m_idx, DAM_ROLL);
12391223 bolt(m_idx, y, x, GF_NETHER, dam, MS_BOLT_NETHER, TARGET_TYPE);
12401224 if (TARGET_TYPE == MONSTER_TO_PLAYER)
12411225 {
@@ -1265,7 +1249,7 @@ int spell_RF5_BO_WATE(int y, int x, int m_idx, int t_idx, int TARGET_TYPE)
12651249 _("%^sが%sに向かってウォーター・ボルトの呪文を唱えた。", "%^s casts a water bolt at %s."),
12661250 TARGET_TYPE);
12671251
1268- dam = monspell_damage(monspell_num(RF5_SPELL_START, RF5_BO_WATE), m_idx, DAM_ROLL);
1252+ dam = monspell_damage((MS_BOLT_WATER), m_idx, DAM_ROLL);
12691253 bolt(m_idx, y, x, GF_WATER, dam, MS_BOLT_WATER, TARGET_TYPE);
12701254 if (TARGET_TYPE == MONSTER_TO_PLAYER)
12711255 {
@@ -1294,7 +1278,7 @@ int spell_RF5_BO_MANA(int y, int x, int m_idx, int t_idx, int TARGET_TYPE)
12941278 _("%^sが%sに向かって魔力の矢の呪文を唱えた。", "%^s casts a mana bolt at %s."),
12951279 TARGET_TYPE);
12961280
1297- dam = monspell_damage(monspell_num(RF5_SPELL_START, RF5_BO_MANA), m_idx, DAM_ROLL);
1281+ dam = monspell_damage((MS_BOLT_MANA), m_idx, DAM_ROLL);
12981282 bolt(m_idx, y, x, GF_MANA, dam, MS_BOLT_MANA, TARGET_TYPE);
12991283 if (TARGET_TYPE == MONSTER_TO_PLAYER)
13001284 {
@@ -1323,7 +1307,7 @@ int spell_RF5_BO_PLAS(int y, int x, int m_idx, int t_idx, int TARGET_TYPE)
13231307 _("%^sが%sに向かってプラズマ・ボルトの呪文を唱えた。", "%^s casts a plasma bolt at %s."),
13241308 TARGET_TYPE);
13251309
1326- dam = monspell_damage(monspell_num(RF5_SPELL_START, RF5_BO_PLAS), m_idx, DAM_ROLL);
1310+ dam = monspell_damage((MS_BOLT_PLASMA), m_idx, DAM_ROLL);
13271311 bolt(m_idx, y, x, GF_PLASMA, dam, MS_BOLT_PLASMA, TARGET_TYPE);
13281312 if (TARGET_TYPE == MONSTER_TO_PLAYER)
13291313 {
@@ -1352,7 +1336,7 @@ int spell_RF5_BO_ICEE(int y, int x, int m_idx, int t_idx, int TARGET_TYPE)
13521336 _("%^sが%sに向かって極寒の矢の呪文を唱えた。", "%^s casts an ice bolt at %s."),
13531337 TARGET_TYPE);
13541338
1355- dam = monspell_damage(monspell_num(RF5_SPELL_START, RF5_BO_ICEE), m_idx, DAM_ROLL);
1339+ dam = monspell_damage((MS_BOLT_ICE), m_idx, DAM_ROLL);
13561340 bolt(m_idx, y, x, GF_ICE, dam, MS_BOLT_ICE, TARGET_TYPE);
13571341 if (TARGET_TYPE == MONSTER_TO_PLAYER)
13581342 {
@@ -1382,7 +1366,7 @@ int spell_RF5_MISSILE(int y, int x, int m_idx, int t_idx, int TARGET_TYPE)
13821366 _("%^sが%sに向かってマジック・ミサイルの呪文を唱えた。", "%^s casts a magic missile at %s."),
13831367 TARGET_TYPE);
13841368
1385- dam = monspell_damage(monspell_num(RF5_SPELL_START, RF5_MISSILE), m_idx, DAM_ROLL);
1369+ dam = monspell_damage((MS_MAGIC_MISSILE), m_idx, DAM_ROLL);
13861370 bolt(m_idx, y, x, GF_MISSILE, dam, MS_MAGIC_MISSILE, TARGET_TYPE);
13871371 if (TARGET_TYPE == MONSTER_TO_PLAYER)
13881372 {
@@ -1794,7 +1778,7 @@ int spell_RF6_HAND_DOOM(int y, int x, int m_idx, int t_idx, int TARGET_TYPE)
17941778
17951779 if (TARGET_TYPE == MONSTER_TO_PLAYER)
17961780 {
1797- dam = monspell_damage(monspell_num(RF6_SPELL_START, RF6_HAND_DOOM), m_idx, DAM_ROLL);
1781+ dam = monspell_damage((MS_HAND_DOOM), m_idx, DAM_ROLL);
17981782 breath(y, x, m_idx, GF_HAND_DOOM, dam, 0, FALSE, MS_HAND_DOOM, MONSTER_TO_PLAYER);
17991783 }
18001784 else if (TARGET_TYPE == MONSTER_TO_MONSTER)
@@ -2409,7 +2393,7 @@ int spell_RF6_PSY_SPEAR(int y, int x, int m_idx, int t_idx, int TARGET_TYPE)
24092393 _("%^sが%sに向かって光の剣を放った。", "%^s throw a Psycho-spear at %s."),
24102394 TARGET_TYPE);
24112395
2412- dam = monspell_damage(monspell_num(RF6_SPELL_START, RF6_PSY_SPEAR), m_idx, DAM_ROLL);
2396+ dam = monspell_damage((MS_PSY_SPEAR), m_idx, DAM_ROLL);
24132397 beam(m_idx, y, x, GF_PSY_SPEAR, dam, MS_PSY_SPEAR, MONSTER_TO_PLAYER);
24142398 return dam;
24152399 }
@@ -3677,6 +3661,33 @@ int monspell_to_monster(int SPELL_NUM, int y, int x, int m_idx, int t_idx)
36773661 }
36783662
36793663 /*!
3664+* @brief モンスターの使う呪文の威力を決定する /
3665+* @param dam 定数値
3666+* @param dice_num ダイス数
3667+* @param dice_side ダイス面
3668+* @param mult ダイス倍率
3669+* @param div ダイス倍率
3670+* @param TYPE DAM_MAXで最大値を返し、DAM_MINで最小値を返す。DAM_ROLLはダイスを振って値を決定する。
3671+* @return 攻撃呪文のダメージを返す。攻撃呪文以外は-1を返す。
3672+*/
3673+int monspell_damage_roll(int dam, int dice_num, int dice_side, int mult, int div, int TYPE)
3674+{
3675+ switch (TYPE)
3676+ {
3677+ case DAM_MAX: dam += maxroll(dice_num, dice_side) * mult / div; break;
3678+ case DAM_MIN: dam += dice_num * 1 * mult / div; break;
3679+ case DAM_ROLL: dam += damroll(dice_num, dice_side) * mult / div; break;
3680+ case DICE_NUM: return dice_num;
3681+ case DICE_SIDE: return dice_side;
3682+ case DICE_MULT: return mult;
3683+ case DICE_DIV: return div;
3684+ case BASE_DAM: return dam;
3685+ }
3686+ if (dam < 1) dam = 1;
3687+ return dam;
3688+}
3689+
3690+/*!
36803691 * @brief モンスターの使う呪文の威力を返す /
36813692 * @param SPELL_NUM 呪文番号
36823693 * @param hp 呪文を唱えるモンスターの体力
@@ -3693,109 +3704,109 @@ int monspell_damage_base(int SPELL_NUM, int hp, int rlev, bool powerful, int sho
36933704
36943705 switch (SPELL_NUM)
36953706 {
3696- case RF4_SPELL_START + 0: return -1; /* RF4_SHRIEK */
3697- case RF4_SPELL_START + 1: return -1; /* RF4_XXX1 */
3698- case RF4_SPELL_START + 2: return -1; /* RF4_DISPEL */
3707+ case MS_SHRIEK: return -1; /* RF4_SHRIEK */
3708+ case MS_XXX1: return -1; /* RF4_XXX1 */
3709+ case MS_DISPEL: return -1; /* RF4_DISPEL */
36993710
37003711 /* RF4_ROCKET */
3701- case RF4_SPELL_START + 3:
3712+ case MS_ROCKET:
37023713 dam = (hp / 4) > 800 ? 800 : (hp / 4);
37033714 break;
37043715
37053716 /* RF4_SHOOT */
3706- case RF4_SPELL_START + 4:
3717+ case MS_SHOOT:
37073718 dice_num = shoot_dd;
37083719 dice_side = shoot_ds;
37093720 dam = shoot_base;
37103721 break;
3711- case RF4_SPELL_START + 5: return -1; /* RF4_XXX2 */
3712- case RF4_SPELL_START + 6: return -1; /* RF4_XXX3 */
3713- case RF4_SPELL_START + 7: return -1; /* RF4_XXX4 */
3722+ case MS_XXX2: return -1; /* RF4_XXX2 */
3723+ case MS_XXX3: return -1; /* RF4_XXX3 */
3724+ case MS_XXX4: return -1; /* RF4_XXX4 */
37143725
37153726 /* RF4_BR_ACID */
37163727 /* RF4_BR_ELEC */
37173728 /* RF4_BR_FIRE */
37183729 /* RF4_BR_COLD */
3719- case RF4_SPELL_START + 8:
3720- case RF4_SPELL_START + 9:
3721- case RF4_SPELL_START + 10:
3722- case RF4_SPELL_START + 11:
3730+ case MS_BR_ACID:
3731+ case MS_BR_ELEC:
3732+ case MS_BR_FIRE:
3733+ case MS_BR_COLD:
37233734 dam = ((hp / 3) > 1600 ? 1600 : (hp / 3));
37243735 break;
37253736
37263737 /* RF4_BR_POIS */
3727- case RF4_SPELL_START + 12:
3738+ case MS_BR_POIS:
37283739 dam = ((hp / 3) > 800 ? 800 : (hp / 3));
37293740 break;
37303741
37313742 /* RF4_BR_NETH */
3732- case RF4_SPELL_START + 13:
3743+ case MS_BR_NETHER:
37333744 dam = ((hp / 6) > 550 ? 550 : (hp / 6));
37343745 break;
37353746
37363747 /* RF4_BR_LITE */
37373748 /* RF4_BR_DARK */
3738- case RF4_SPELL_START + 14:
3739- case RF4_SPELL_START + 15:
3749+ case MS_BR_LITE:
3750+ case MS_BR_DARK:
37403751 dam = ((hp / 6) > 400 ? 400 : (hp / 6));
37413752 break;
37423753
37433754 /* RF4_BR_CONF */
37443755 /* RF4_BR_SOUN */
3745- case RF4_SPELL_START + 16:
3746- case RF4_SPELL_START + 17:
3756+ case MS_BR_CONF:
3757+ case MS_BR_SOUND:
37473758 dam = ((hp / 6) > 450 ? 450 : (hp / 6));
37483759 break;
37493760
37503761 /* RF4_BR_CHAO */
3751- case RF4_SPELL_START + 18:
3762+ case MS_BR_CHAOS:
37523763 dam = ((hp / 6) > 600 ? 600 : (hp / 6));
37533764 break;
37543765
37553766 /* RF4_BR_DISE */
3756- case RF4_SPELL_START + 19:
3767+ case MS_BR_DISEN:
37573768 dam = ((hp / 6) > 500 ? 500 : (hp / 6));
37583769 break;
37593770
37603771 /* RF4_BR_NEXU */
3761- case RF4_SPELL_START + 20:
3772+ case MS_BR_NEXUS:
37623773 dam = ((hp / 3) > 250 ? 250 : (hp / 3));
37633774 break;
37643775
37653776 /* RF4_BR_TIME */
3766- case RF4_SPELL_START + 21:
3777+ case MS_BR_TIME:
37673778 dam = ((hp / 3) > 150 ? 150 : (hp / 3));
37683779 break;
37693780
37703781 /* RF4_BR_INER */
37713782 /* RF4_BR_GRAV */
3772- case RF4_SPELL_START + 22:
3773- case RF4_SPELL_START + 23:
3783+ case MS_BR_INERTIA:
3784+ case MS_BR_GRAVITY:
37743785 dam = ((hp / 6) > 200 ? 200 : (hp / 6));
37753786 break;
37763787
37773788 /* RF4_BR_SHAR */
3778- case RF4_SPELL_START + 24:
3789+ case MS_BR_SHARDS:
37793790 dam = ((hp / 6) > 500 ? 500 : (hp / 6));
37803791 break;
37813792
37823793 /* RF4_BR_PLAS */
3783- case RF4_SPELL_START + 25:
3794+ case MS_BR_PLASMA:
37843795 dam = ((hp / 6) > 150 ? 150 : (hp / 6));
37853796 break;
37863797
37873798 /* RF4_BR_WALL */
3788- case RF4_SPELL_START + 26:
3799+ case MS_BR_FORCE:
37893800 dam = ((hp / 6) > 200 ? 200 : (hp / 6));
37903801 break;
37913802
37923803 /* RF4_BR_MANA */
3793- case RF4_SPELL_START + 27:
3804+ case MS_BR_MANA:
37943805 dam = ((hp / 3) > 250 ? 250 : (hp / 3));
37953806 break;
37963807
37973808 /* RF4_BA_NUKE */
3798- case RF4_SPELL_START + 28:
3809+ case MS_BALL_NUKE:
37993810 mult = powerful ? 2 : 1;
38003811 dam = rlev * (mult / div);
38013812 dice_num = 10;
@@ -3803,24 +3814,24 @@ int monspell_damage_base(int SPELL_NUM, int hp, int rlev, bool powerful, int sho
38033814 break;
38043815
38053816 /* RF4_BR_NUKE */
3806- case RF4_SPELL_START + 29:
3817+ case MS_BR_NUKE:
38073818 dam = ((hp / 3) > 800 ? 800 : (hp / 3));
38083819 break;
38093820
38103821 /* RF4_BA_CHAO */
3811- case RF4_SPELL_START + 30:
3822+ case MS_BALL_CHAOS:
38123823 dam = (powerful ? (rlev * 3) : (rlev * 2));
38133824 dice_num = 10;
38143825 dice_side = 10;
38153826 break;
38163827
38173828 /* RF4_BR_DISI */
3818- case RF4_SPELL_START + 31:
3829+ case MS_BR_DISI:
38193830 dam = ((hp / 6) > 150 ? 150 : (hp / 6));
38203831 break;
38213832
38223833 /* RF5_BA_ACID */
3823- case RF5_SPELL_START + 0:
3834+ case MS_BALL_ACID:
38243835 if (powerful)
38253836 {
38263837 dam = (rlev * 4) + 50;
@@ -3836,7 +3847,7 @@ int monspell_damage_base(int SPELL_NUM, int hp, int rlev, bool powerful, int sho
38363847 break;
38373848
38383849 /* RF5_BA_ELEC */
3839- case RF5_SPELL_START + 1:
3850+ case MS_BALL_ELEC:
38403851 if (powerful)
38413852 {
38423853 dam = (rlev * 4) + 50;
@@ -3852,7 +3863,7 @@ int monspell_damage_base(int SPELL_NUM, int hp, int rlev, bool powerful, int sho
38523863 break;
38533864
38543865 /* RF5_BA_FIRE */
3855- case RF5_SPELL_START + 2:
3866+ case MS_BALL_FIRE:
38563867 if (powerful)
38573868 {
38583869 dam = (rlev * 4) + 50;
@@ -3868,7 +3879,7 @@ int monspell_damage_base(int SPELL_NUM, int hp, int rlev, bool powerful, int sho
38683879 break;
38693880
38703881 /* RF5_BA_COLD */
3871- case RF5_SPELL_START + 3:
3882+ case MS_BALL_COLD:
38723883 if (powerful)
38733884 {
38743885 dam = (rlev * 4) + 50;
@@ -3884,21 +3895,21 @@ int monspell_damage_base(int SPELL_NUM, int hp, int rlev, bool powerful, int sho
38843895 break;
38853896
38863897 /* RF5_BA_POIS */
3887- case RF5_SPELL_START + 4:
3898+ case MS_BALL_POIS:
38883899 mult = powerful ? 2 : 1;
38893900 dice_num = 12;
38903901 dice_side = 2;
38913902 break;
38923903
38933904 /* RF5_BA_NETH */
3894- case RF5_SPELL_START + 5:
3895- dam = 50 + (rlev * powerful ? 2 : 1);
3905+ case MS_BALL_NETHER:
3906+ dam = 50 + rlev * (powerful ? 2 : 1);
38963907 dice_num = 10;
38973908 dice_side = 10;
38983909 break;
38993910
39003911 /* RF5_BA_WATE */
3901- case RF5_SPELL_START + 6:
3912+ case MS_BALL_WATER:
39023913 dam = 50;
39033914 dice_num = 1;
39043915 dice_side = powerful ? (rlev * 3) : (rlev * 2);
@@ -3906,59 +3917,59 @@ int monspell_damage_base(int SPELL_NUM, int hp, int rlev, bool powerful, int sho
39063917
39073918 /* RF5_BA_MANA */
39083919 /* RF5_BA_DARK */
3909- case RF5_SPELL_START + 7:
3910- case RF5_SPELL_START + 8:
3920+ case MS_BALL_MANA:
3921+ case MS_BALL_DARK:
39113922 dam = (rlev * 4) + 50;
39123923 dice_num = 10;
39133924 dice_side = 10;
39143925 break;
39153926
39163927 /* RF5_DRAIN_MANA */
3917- case RF5_SPELL_START + 9:
3918- dam = 1;
3919- div = 2;
3928+ case MS_DRAIN_MANA:
3929+ dam = rlev;
3930+ div = 1;
39203931 dice_num = 1;
39213932 dice_side = rlev;
39223933 break;
39233934
39243935 /* RF5_MIND_BLAST */
3925- case RF5_SPELL_START + 10:
3936+ case MS_MIND_BLAST:
39263937 dice_num = 7;
39273938 dice_side = 7;
39283939 break;
39293940
39303941 /* RF5_BRAIN_SMASH */
3931- case RF5_SPELL_START + 11:
3942+ case MS_BRAIN_SMASH:
39323943 dice_num = 12;
39333944 dice_side = 12;
39343945 break;
39353946
39363947 /* RF5_CAUSE_1 */
3937- case RF5_SPELL_START + 12:
3948+ case MS_CAUSE_1:
39383949 dice_num = 3;
39393950 dice_side = 8;
39403951 break;
39413952
39423953 /* RF5_CAUSE_2 */
3943- case RF5_SPELL_START + 13:
3954+ case MS_CAUSE_2:
39443955 dice_num = 8;
39453956 dice_side = 8;
39463957 break;
39473958
39483959 /* RF5_CAUSE_3 */
3949- case RF5_SPELL_START + 14:
3960+ case MS_CAUSE_3:
39503961 dice_num = 10;
39513962 dice_side = 15;
39523963 break;
39533964
39543965 /* RF5_CAUSE_4 */
3955- case RF5_SPELL_START + 15:
3966+ case MS_CAUSE_4:
39563967 dice_num = 15;
39573968 dice_side = 15;
39583969 break;
39593970
39603971 /* RF5_BO_ACID */
3961- case RF5_SPELL_START + 16:
3972+ case MS_BOLT_ACID:
39623973 mult = powerful ? 2 : 1;
39633974 dam = rlev / 3 * (mult / div);
39643975 dice_num = 7;
@@ -3966,7 +3977,7 @@ int monspell_damage_base(int SPELL_NUM, int hp, int rlev, bool powerful, int sho
39663977 break;
39673978
39683979 /* RF5_BO_ELEC */
3969- case RF5_SPELL_START + 17:
3980+ case MS_BOLT_ELEC:
39703981 mult = powerful ? 2 : 1;
39713982 dam = rlev / 3 * (mult / div);
39723983 dice_num = 4;
@@ -3974,7 +3985,7 @@ int monspell_damage_base(int SPELL_NUM, int hp, int rlev, bool powerful, int sho
39743985 break;
39753986
39763987 /* RF5_BO_FIRE */
3977- case RF5_SPELL_START + 18:
3988+ case MS_BOLT_FIRE:
39783989 mult = powerful ? 2 : 1;
39793990 dam = rlev / 3 * (mult / div);
39803991 dice_num = 9;
@@ -3982,7 +3993,7 @@ int monspell_damage_base(int SPELL_NUM, int hp, int rlev, bool powerful, int sho
39823993 break;
39833994
39843995 /* RF5_BO_COLD */
3985- case RF5_SPELL_START + 19:
3996+ case MS_BOLT_COLD:
39863997 mult = powerful ? 2 : 1;
39873998 dam = rlev / 3 * (mult / div);
39883999 dice_num = 6;
@@ -3990,63 +4001,63 @@ int monspell_damage_base(int SPELL_NUM, int hp, int rlev, bool powerful, int sho
39904001 break;
39914002
39924003 /* RF5_BA_LITE */
3993- case RF5_SPELL_START + 20:
4004+ case MS_STARBURST:
39944005 dam = (rlev * 4) + 50;
39954006 dice_num = 10;
39964007 dice_side = 10;
39974008 break;
39984009
39994010 /* RF5_BO_NETH */
4000- case RF5_SPELL_START + 21:
4011+ case MS_BOLT_NETHER:
40014012 dam = 30 + (rlev * 4) / (powerful ? 2 : 3);
40024013 dice_num = 5;
40034014 dice_side = 5;
40044015 break;
40054016
40064017 /* RF5_BO_WATE */
4007- case RF5_SPELL_START + 22:
4018+ case MS_BOLT_WATER:
40084019 dam = (rlev * 3 / (powerful ? 2 : 3));
40094020 dice_num = 10;
40104021 dice_side = 10;
40114022 break;
40124023
40134024 /* RF5_BO_MANA */
4014- case RF5_SPELL_START + 23:
4025+ case MS_BOLT_MANA:
40154026 dam = 50;
40164027 dice_num = 1;
40174028 dice_side = rlev * 7 / 2;
40184029 break;
40194030
40204031 /* RF5_BO_PLAS */
4021- case RF5_SPELL_START + 24:
4032+ case MS_BOLT_PLASMA:
40224033 dam = 10 + (rlev * 3 / (powerful ? 2 : 3));
40234034 dice_num = 8;
40244035 dice_side = 7;
40254036 break;
40264037
40274038 /* RF5_BO_ICEE */
4028- case RF5_SPELL_START + 25:
4039+ case MS_BOLT_ICE:
40294040 dam = (rlev * 3 / (powerful ? 2 : 3));
40304041 dice_num = 6;
40314042 dice_side = 6;
40324043 break;
40334044
40344045 /* RF5_MISSILE */
4035- case RF5_SPELL_START + 26:
4046+ case MS_MAGIC_MISSILE:
40364047 dam = (rlev / 3);
40374048 dice_num = 2;
40384049 dice_side = 6;
40394050 break;
40404051
4041- case RF5_SPELL_START + 27: return -1; /* RF5_SCARE */
4042- case RF5_SPELL_START + 28: return -1; /* RF5_BLIND */
4043- case RF5_SPELL_START + 29: return -1; /* RF5_CONF */
4044- case RF5_SPELL_START + 30: return -1; /* RF5_SLOW */
4045- case RF5_SPELL_START + 31: return -1; /* RF5_HOLD */
4046- case RF6_SPELL_START + 0: return -1; /* RF6_HASTE */
4052+ case MS_SCARE: return -1; /* RF5_SCARE */
4053+ case MS_BLIND: return -1; /* RF5_BLIND */
4054+ case MS_CONF: return -1; /* RF5_CONF */
4055+ case MS_SLOW: return -1; /* RF5_SLOW */
4056+ case MS_SLEEP: return -1; /* RF5_HOLD */
4057+ case MS_SPEED: return -1; /* RF6_HASTE */
40474058
40484059 /* RF6_HAND_DOOM */
4049- case RF6_SPELL_START + 1:
4060+ case MS_HAND_DOOM:
40504061 mult = p_ptr->chp;
40514062 div = 100;
40524063 dam = 40 * (mult / div);
@@ -4054,53 +4065,46 @@ int monspell_damage_base(int SPELL_NUM, int hp, int rlev, bool powerful, int sho
40544065 dice_side = 20;
40554066 break;
40564067
4057- case RF6_SPELL_START + 2: return -1; /* RF6_HEAL */
4058- case RF6_SPELL_START + 3: return -1; /* RF6_INVULNER */
4059- case RF6_SPELL_START + 4: return -1; /* RF6_BLINK */
4060- case RF6_SPELL_START + 5: return -1; /* RF6_TPORT */
4061- case RF6_SPELL_START + 6: return -1; /* RF6_WORLD */
4062- case RF6_SPELL_START + 7: return -1; /* RF6_SPECIAL */
4063- case RF6_SPELL_START + 8: return -1; /* RF6_TELE_TO */
4064- case RF6_SPELL_START + 9: return -1; /* RF6_TELE_AWAY */
4065- case RF6_SPELL_START + 10: return -1; /* RF6_TELE_LEVEL */
4068+ case MS_HEAL: return -1; /* RF6_HEAL */
4069+ case MS_INVULNER: return -1; /* RF6_INVULNER */
4070+ case MS_BLINK: return -1; /* RF6_BLINK */
4071+ case MS_TELEPORT: return -1; /* RF6_TPORT */
4072+ case MS_WORLD: return -1; /* RF6_WORLD */
4073+ case MS_SPECIAL: return -1; /* RF6_SPECIAL */
4074+ case MS_TELE_TO: return -1; /* RF6_TELE_TO */
4075+ case MS_TELE_AWAY: return -1; /* RF6_TELE_AWAY */
4076+ case MS_TELE_LEVEL: return -1; /* RF6_TELE_LEVEL */
40664077
40674078 /* RF6_PSY_SPEAR */
4068- case RF6_SPELL_START + 11:
4079+ case MS_PSY_SPEAR:
40694080 dam = powerful ? 150 : 100;
40704081 dice_num = 1;
40714082 dice_side = powerful ? (rlev * 2) : (rlev * 3 / 2);
40724083 break;
40734084
4074- case RF6_SPELL_START + 12: return -1; /* RF6_DARKNESS */
4075- case RF6_SPELL_START + 13: return -1; /* RF6_TRAPS */
4076- case RF6_SPELL_START + 14: return -1; /* RF6_FORGET */
4077- case RF6_SPELL_START + 15: return -1; /* RF6_RAISE_DEAD */
4078- case RF6_SPELL_START + 16: return -1; /* RF6_S_KIN */
4079- case RF6_SPELL_START + 17: return -1; /* RF6_S_CYBER */
4080- case RF6_SPELL_START + 18: return -1; /* RF6_S_MONSTER */
4081- case RF6_SPELL_START + 19: return -1; /* RF6_S_MONSTER */
4082- case RF6_SPELL_START + 20: return -1; /* RF6_S_ANT */
4083- case RF6_SPELL_START + 21: return -1; /* RF6_S_SPIDER */
4084- case RF6_SPELL_START + 22: return -1; /* RF6_S_HOUND */
4085- case RF6_SPELL_START + 23: return -1; /* RF6_S_HYDRA */
4086- case RF6_SPELL_START + 24: return -1; /* RF6_S_ANGEL */
4087- case RF6_SPELL_START + 25: return -1; /* RF6_S_DEMON */
4088- case RF6_SPELL_START + 26: return -1; /* RF6_S_UNDEAD */
4089- case RF6_SPELL_START + 27: return -1; /* RF6_S_DRAGON */
4090- case RF6_SPELL_START + 28: return -1; /* RF6_S_HI_UNDEAD */
4091- case RF6_SPELL_START + 29: return -1; /* RF6_S_HI_DRAGON */
4092- case RF6_SPELL_START + 30: return -1; /* RF6_S_AMBERITES */
4093- case RF6_SPELL_START + 31: return -1; /* RF6_S_UNIQUE */
4085+ case MS_DARKNESS: return -1; /* RF6_DARKNESS */
4086+ case MS_MAKE_TRAP: return -1; /* RF6_TRAPS */
4087+ case MS_FORGET: return -1; /* RF6_FORGET */
4088+ case MS_RAISE_DEAD: return -1; /* RF6_RAISE_DEAD */
4089+ case MS_S_KIN: return -1; /* RF6_S_KIN */
4090+ case MS_S_CYBER: return -1; /* RF6_S_CYBER */
4091+ case MS_S_MONSTER: return -1; /* RF6_S_MONSTER */
4092+ case MS_S_MONSTERS: return -1; /* RF6_S_MONSTER */
4093+ case MS_S_ANT: return -1; /* RF6_S_ANT */
4094+ case MS_S_SPIDER: return -1; /* RF6_S_SPIDER */
4095+ case MS_S_HOUND: return -1; /* RF6_S_HOUND */
4096+ case MS_S_HYDRA: return -1; /* RF6_S_HYDRA */
4097+ case MS_S_ANGEL: return -1; /* RF6_S_ANGEL */
4098+ case MS_S_DEMON: return -1; /* RF6_S_DEMON */
4099+ case MS_S_UNDEAD: return -1; /* RF6_S_UNDEAD */
4100+ case MS_S_DRAGON: return -1; /* RF6_S_DRAGON */
4101+ case MS_S_HI_UNDEAD: return -1; /* RF6_S_HI_UNDEAD */
4102+ case MS_S_HI_DRAGON: return -1; /* RF6_S_HI_DRAGON */
4103+ case MS_S_AMBERITE: return -1; /* RF6_S_AMBERITES */
4104+ case MS_S_UNIQUE: return -1; /* RF6_S_UNIQUE */
40944105 }
40954106
4096- switch (TYPE)
4097- {
4098- case DAM_MAX: dam += maxroll(dice_num, dice_side) * mult / div ; break;
4099- case DAM_MIN: dam += dice_num * 1 * mult / div; break;
4100- case DAM_ROLL: dam += damroll(dice_num, dice_side) * mult / div; break;
4101- }
4102- if (dam < 1) dam = 1;
4103- return dam;
4107+ return monspell_damage_roll(dam, dice_num, dice_side, mult, div, TYPE);
41044108 }
41054109
41064110
@@ -4120,14 +4124,14 @@ int monspell_damage(int SPELL_NUM, int m_idx, int TYPE)
41204124 int shoot_dd = r_ptr->blow[0].d_dice;
41214125 int shoot_ds = r_ptr->blow[0].d_side;
41224126
4123- if (TYPE == DAM_MAX)
4124- {
4125- hp = m_ptr->max_maxhp;
4126- }
4127- else if (TYPE == DAM_ROLL)
4127+ if (TYPE == DAM_ROLL)
41284128 {
41294129 hp = m_ptr->hp;
41304130 }
4131+ else
4132+ {
4133+ hp = m_ptr->max_maxhp;
4134+ }
41314135 return monspell_damage_base(SPELL_NUM, hp, rlev, monster_is_powerful(m_idx), shoot_dd, shoot_ds, 0, TYPE);
41324136 }
41334137
@@ -4142,7 +4146,7 @@ int monspell_race_damage(int SPELL_NUM, int r_idx, int TYPE)
41424146 {
41434147 monster_race *r_ptr = &r_info[r_idx];
41444148 int rlev = ((r_ptr->level >= 1) ? r_ptr->level : 1);
4145- bool powerful = r_ptr->flags2 & RF2_POWERFUL;
4149+ bool powerful = r_ptr->flags2 & RF2_POWERFUL ? TRUE : FALSE;
41464150 u32b hp = r_ptr->hdice * (ironman_nightmare ? 2 : 1) * r_ptr->hside;
41474151 int shoot_dd = r_ptr->blow[0].d_dice;
41484152 int shoot_ds = r_ptr->blow[0].d_side;
--- a/src/object2.c
+++ b/src/object2.c
@@ -7147,10 +7147,10 @@ static void spell_damcalc(monster_type *m_ptr, int typ, int dam, int *max)
71477147 * @param max 算出した最大ダメージを返すポインタ
71487148 * @return なし
71497149 */
7150-void spell_damcalc_by_spellnum(int spell_num, int spell_flag, int typ, int m_idx, int *max)
7150+void spell_damcalc_by_spellnum(int spell_num, int typ, int m_idx, int *max)
71517151 {
71527152 monster_type *m_ptr = &m_list[m_idx];
7153- int dam = monspell_damage(monspell_num(spell_num, spell_flag), m_idx, DAM_MAX);
7153+ int dam = monspell_damage((spell_num), m_idx, DAM_MAX);
71547154 spell_damcalc(m_ptr, typ, dam, max);
71557155 }
71567156
@@ -7278,36 +7278,36 @@ bool process_warning(int xx, int yy)
72787278
72797279 if (!(d_info[dungeon_type].flags1 & DF1_NO_MAGIC))
72807280 {
7281- if (f4 & RF4_BA_CHAO) spell_damcalc_by_spellnum(RF4_SPELL_START, RF4_BA_CHAO, GF_CHAOS, c_ptr->m_idx, &dam_max0);
7282- if (f5 & RF5_BA_MANA) spell_damcalc_by_spellnum(RF5_SPELL_START, RF5_BA_MANA, GF_MANA, c_ptr->m_idx, &dam_max0);
7283- if (f5 & RF5_BA_DARK) spell_damcalc_by_spellnum(RF5_SPELL_START, RF5_BA_DARK, GF_DARK, c_ptr->m_idx, &dam_max0);
7284- if (f5 & RF5_BA_LITE) spell_damcalc_by_spellnum(RF5_SPELL_START, RF5_BA_LITE, GF_LITE, c_ptr->m_idx, &dam_max0);
7285- if (f6 & RF6_HAND_DOOM) spell_damcalc_by_spellnum(RF6_SPELL_START, RF6_HAND_DOOM, GF_HAND_DOOM, c_ptr->m_idx, &dam_max0);
7286- if (f6 & RF6_PSY_SPEAR) spell_damcalc_by_spellnum(RF6_SPELL_START, RF6_PSY_SPEAR, GF_PSY_SPEAR, c_ptr->m_idx, &dam_max0);
7281+ if (f4 & RF4_BA_CHAO) spell_damcalc_by_spellnum(MS_BALL_CHAOS, GF_CHAOS, c_ptr->m_idx, &dam_max0);
7282+ if (f5 & RF5_BA_MANA) spell_damcalc_by_spellnum(MS_BALL_MANA, GF_MANA, c_ptr->m_idx, &dam_max0);
7283+ if (f5 & RF5_BA_DARK) spell_damcalc_by_spellnum(MS_BALL_DARK, GF_DARK, c_ptr->m_idx, &dam_max0);
7284+ if (f5 & RF5_BA_LITE) spell_damcalc_by_spellnum(MS_STARBURST, GF_LITE, c_ptr->m_idx, &dam_max0);
7285+ if (f6 & RF6_HAND_DOOM) spell_damcalc_by_spellnum(MS_HAND_DOOM, GF_HAND_DOOM, c_ptr->m_idx, &dam_max0);
7286+ if (f6 & RF6_PSY_SPEAR) spell_damcalc_by_spellnum(MS_PSY_SPEAR, GF_PSY_SPEAR, c_ptr->m_idx, &dam_max0);
72877287 }
7288- if (f4 & RF4_ROCKET) spell_damcalc_by_spellnum(RF4_SPELL_START, RF4_ROCKET, GF_ROCKET, c_ptr->m_idx, &dam_max0);
7289- if (f4 & RF4_BR_ACID) spell_damcalc_by_spellnum(RF4_SPELL_START, RF4_BR_ACID, GF_ACID, c_ptr->m_idx, &dam_max0);
7290- if (f4 & RF4_BR_ELEC) spell_damcalc_by_spellnum(RF4_SPELL_START, RF4_BR_ELEC, GF_ELEC, c_ptr->m_idx, &dam_max0);
7291- if (f4 & RF4_BR_FIRE) spell_damcalc_by_spellnum(RF4_SPELL_START, RF4_BR_FIRE, GF_FIRE, c_ptr->m_idx, &dam_max0);
7292- if (f4 & RF4_BR_COLD) spell_damcalc_by_spellnum(RF4_SPELL_START, RF4_BR_COLD, GF_COLD, c_ptr->m_idx, &dam_max0);
7293- if (f4 & RF4_BR_POIS) spell_damcalc_by_spellnum(RF4_SPELL_START, RF4_BR_POIS, GF_POIS, c_ptr->m_idx, &dam_max0);
7294- if (f4 & RF4_BR_NETH) spell_damcalc_by_spellnum(RF4_SPELL_START, RF4_BR_NETH, GF_NETHER, c_ptr->m_idx, &dam_max0);
7295- if (f4 & RF4_BR_LITE) spell_damcalc_by_spellnum(RF4_SPELL_START, RF4_BR_LITE, GF_LITE, c_ptr->m_idx, &dam_max0);
7296- if (f4 & RF4_BR_DARK) spell_damcalc_by_spellnum(RF4_SPELL_START, RF4_BR_DARK, GF_DARK, c_ptr->m_idx, &dam_max0);
7297- if (f4 & RF4_BR_CONF) spell_damcalc_by_spellnum(RF4_SPELL_START, RF4_BR_CONF, GF_CONFUSION, c_ptr->m_idx, &dam_max0);
7298- if (f4 & RF4_BR_SOUN) spell_damcalc_by_spellnum(RF4_SPELL_START, RF4_BR_SOUN, GF_SOUND, c_ptr->m_idx, &dam_max0);
7299- if (f4 & RF4_BR_CHAO) spell_damcalc_by_spellnum(RF4_SPELL_START, RF4_BR_CHAO, GF_CHAOS, c_ptr->m_idx, &dam_max0);
7300- if (f4 & RF4_BR_DISE) spell_damcalc_by_spellnum(RF4_SPELL_START, RF4_BR_DISE, GF_DISENCHANT, c_ptr->m_idx, &dam_max0);
7301- if (f4 & RF4_BR_NEXU) spell_damcalc_by_spellnum(RF4_SPELL_START, RF4_BR_NEXU, GF_NEXUS, c_ptr->m_idx, &dam_max0);
7302- if (f4 & RF4_BR_TIME) spell_damcalc_by_spellnum(RF4_SPELL_START, RF4_BR_TIME, GF_TIME, c_ptr->m_idx, &dam_max0);
7303- if (f4 & RF4_BR_INER) spell_damcalc_by_spellnum(RF4_SPELL_START, RF4_BR_INER, GF_INERTIA, c_ptr->m_idx, &dam_max0);
7304- if (f4 & RF4_BR_GRAV) spell_damcalc_by_spellnum(RF4_SPELL_START, RF4_BR_GRAV, GF_GRAVITY, c_ptr->m_idx, &dam_max0);
7305- if (f4 & RF4_BR_SHAR) spell_damcalc_by_spellnum(RF4_SPELL_START, RF4_BR_SHAR, GF_SHARDS, c_ptr->m_idx, &dam_max0);
7306- if (f4 & RF4_BR_PLAS) spell_damcalc_by_spellnum(RF4_SPELL_START, RF4_BR_PLAS, GF_PLASMA, c_ptr->m_idx, &dam_max0);
7307- if (f4 & RF4_BR_WALL) spell_damcalc_by_spellnum(RF4_SPELL_START, RF4_BR_WALL, GF_FORCE, c_ptr->m_idx, &dam_max0);
7308- if (f4 & RF4_BR_MANA) spell_damcalc_by_spellnum(RF4_SPELL_START, RF4_BR_MANA, GF_MANA, c_ptr->m_idx, &dam_max0);
7309- if (f4 & RF4_BR_NUKE) spell_damcalc_by_spellnum(RF4_SPELL_START, RF4_BR_NUKE, GF_NUKE, c_ptr->m_idx, &dam_max0);
7310- if (f4 & RF4_BR_DISI) spell_damcalc_by_spellnum(RF4_SPELL_START, RF4_BR_DISI, GF_DISINTEGRATE, c_ptr->m_idx, &dam_max0);
7288+ if (f4 & RF4_ROCKET) spell_damcalc_by_spellnum(MS_ROCKET, GF_ROCKET, c_ptr->m_idx, &dam_max0);
7289+ if (f4 & RF4_BR_ACID) spell_damcalc_by_spellnum(MS_BR_ACID, GF_ACID, c_ptr->m_idx, &dam_max0);
7290+ if (f4 & RF4_BR_ELEC) spell_damcalc_by_spellnum(MS_BR_ELEC, GF_ELEC, c_ptr->m_idx, &dam_max0);
7291+ if (f4 & RF4_BR_FIRE) spell_damcalc_by_spellnum(MS_BR_FIRE, GF_FIRE, c_ptr->m_idx, &dam_max0);
7292+ if (f4 & RF4_BR_COLD) spell_damcalc_by_spellnum(MS_BR_COLD, GF_COLD, c_ptr->m_idx, &dam_max0);
7293+ if (f4 & RF4_BR_POIS) spell_damcalc_by_spellnum(MS_BR_POIS, GF_POIS, c_ptr->m_idx, &dam_max0);
7294+ if (f4 & RF4_BR_NETH) spell_damcalc_by_spellnum(MS_BR_NETHER, GF_NETHER, c_ptr->m_idx, &dam_max0);
7295+ if (f4 & RF4_BR_LITE) spell_damcalc_by_spellnum(MS_BR_LITE, GF_LITE, c_ptr->m_idx, &dam_max0);
7296+ if (f4 & RF4_BR_DARK) spell_damcalc_by_spellnum(MS_BR_DARK, GF_DARK, c_ptr->m_idx, &dam_max0);
7297+ if (f4 & RF4_BR_CONF) spell_damcalc_by_spellnum(MS_BR_CONF, GF_CONFUSION, c_ptr->m_idx, &dam_max0);
7298+ if (f4 & RF4_BR_SOUN) spell_damcalc_by_spellnum(MS_BR_SOUND, GF_SOUND, c_ptr->m_idx, &dam_max0);
7299+ if (f4 & RF4_BR_CHAO) spell_damcalc_by_spellnum(MS_BR_CHAOS, GF_CHAOS, c_ptr->m_idx, &dam_max0);
7300+ if (f4 & RF4_BR_DISE) spell_damcalc_by_spellnum(MS_BR_DISEN, GF_DISENCHANT, c_ptr->m_idx, &dam_max0);
7301+ if (f4 & RF4_BR_NEXU) spell_damcalc_by_spellnum(MS_BR_NEXUS, GF_NEXUS, c_ptr->m_idx, &dam_max0);
7302+ if (f4 & RF4_BR_TIME) spell_damcalc_by_spellnum(MS_BR_TIME, GF_TIME, c_ptr->m_idx, &dam_max0);
7303+ if (f4 & RF4_BR_INER) spell_damcalc_by_spellnum(MS_BR_INERTIA, GF_INERTIA, c_ptr->m_idx, &dam_max0);
7304+ if (f4 & RF4_BR_GRAV) spell_damcalc_by_spellnum(MS_BR_GRAVITY, GF_GRAVITY, c_ptr->m_idx, &dam_max0);
7305+ if (f4 & RF4_BR_SHAR) spell_damcalc_by_spellnum(MS_BR_SHARDS, GF_SHARDS, c_ptr->m_idx, &dam_max0);
7306+ if (f4 & RF4_BR_PLAS) spell_damcalc_by_spellnum(MS_BR_PLASMA, GF_PLASMA, c_ptr->m_idx, &dam_max0);
7307+ if (f4 & RF4_BR_WALL) spell_damcalc_by_spellnum(MS_BR_FORCE, GF_FORCE, c_ptr->m_idx, &dam_max0);
7308+ if (f4 & RF4_BR_MANA) spell_damcalc_by_spellnum(MS_BR_MANA, GF_MANA, c_ptr->m_idx, &dam_max0);
7309+ if (f4 & RF4_BR_NUKE) spell_damcalc_by_spellnum(MS_BR_NUKE, GF_NUKE, c_ptr->m_idx, &dam_max0);
7310+ if (f4 & RF4_BR_DISI) spell_damcalc_by_spellnum(MS_BR_DISI, GF_DISINTEGRATE, c_ptr->m_idx, &dam_max0);
73117311 }
73127312
73137313 /* Monster melee attacks */
--- a/src/spells1.c
+++ b/src/spells1.c
@@ -4951,7 +4951,7 @@ note_dies = "
49514951 if (caster_ptr->hp < caster_ptr->maxhp)
49524952 {
49534953 /* Heal */
4954- caster_ptr->hp += 6 * dam;
4954+ caster_ptr->hp += dam;
49554955 if (caster_ptr->hp > caster_ptr->maxhp) caster_ptr->hp = caster_ptr->maxhp;
49564956
49574957 /* Redraw (later) if needed */
@@ -7463,7 +7463,7 @@ static bool project_p(int who, cptr who_name, int r, int y, int x, int dam, int
74637463 if (m_ptr->hp < m_ptr->maxhp)
74647464 {
74657465 /* Heal */
7466- m_ptr->hp += (6 * dam);
7466+ m_ptr->hp += dam;
74677467 if (m_ptr->hp > m_ptr->maxhp) m_ptr->hp = m_ptr->maxhp;
74687468
74697469 /* Redraw (later) if needed */
Show on old repository browser