OSDN Git Service

[Refactor] #39963 Separated spells-common.c.h from spells1.c/spells.h
authorHourier <hourier@users.sourceforge.jp>
Wed, 29 Apr 2020 02:05:38 +0000 (11:05 +0900)
committerHourier <hourier@users.sourceforge.jp>
Wed, 29 Apr 2020 02:05:38 +0000 (11:05 +0900)
16 files changed:
Hengband_vcs2017/Hengband/Hengband.vcxproj
Hengband_vcs2017/Hengband/Hengband.vcxproj.filters
src/Makefile.am
src/cmd/cmd-hissatsu.c
src/cmd/cmd-spell.c
src/core.c
src/knowledge/knowledge-experiences.c
src/player-class.h
src/player-status.c
src/realm-hex.c
src/realm-hissatsu.c
src/spell/spells-common.c [new file with mode: 0644]
src/spell/spells-common.h [new file with mode: 0644]
src/spells.h
src/spells1.c
src/spells3.c

index e2486c8..8e1c8f6 100644 (file)
     <ClCompile Include="..\..\src\realm-nature.c" />\r
     <ClCompile Include="..\..\src\realm-song.c" />\r
     <ClCompile Include="..\..\src\realm-sorcery.c" />\r
+    <ClCompile Include="..\..\src\spell\spells-common.c" />\r
     <ClInclude Include="..\..\src\artifact.h" />\r
     <ClInclude Include="..\..\src\autopick\autopick-command-menu.h" />\r
     <ClInclude Include="..\..\src\autopick\autopick-commands-table.h" />\r
     <ClInclude Include="..\..\src\room\pit-nest-kinds-table.h" />\r
     <ClInclude Include="..\..\src\io\signal-handlers.h" />\r
     <ClInclude Include="..\..\src\io\uid-checker.h" />\r
+    <ClInclude Include="..\..\src\spell\spells-common.h" />\r
     <ClInclude Include="..\..\src\view\display-characteristic.h" />\r
     <ClInclude Include="..\..\src\view\display-fruit.h" />\r
     <ClInclude Include="..\..\src\view\display-player-middle.h" />\r
index 8feb5de..3da005d 100644 (file)
@@ -7,31 +7,31 @@
     <ClCompile Include="..\..\src\z-term.c" />
     <ClCompile Include="..\..\src\warning.c" />
     <ClCompile Include="..\..\src\spells1.c">
-      <Filter>spells</Filter>
+      <Filter>spell</Filter>
     </ClCompile>
     <ClCompile Include="..\..\src\spells2.c">
-      <Filter>spells</Filter>
+      <Filter>spell</Filter>
     </ClCompile>
     <ClCompile Include="..\..\src\spells3.c">
-      <Filter>spells</Filter>
+      <Filter>spell</Filter>
     </ClCompile>
     <ClCompile Include="..\..\src\spells-diceroll.c">
-      <Filter>spells</Filter>
+      <Filter>spell</Filter>
     </ClCompile>
     <ClCompile Include="..\..\src\spells-floor.c">
-      <Filter>spells</Filter>
+      <Filter>spell</Filter>
     </ClCompile>
     <ClCompile Include="..\..\src\spells-object.c">
-      <Filter>spells</Filter>
+      <Filter>spell</Filter>
     </ClCompile>
     <ClCompile Include="..\..\src\spells-status.c">
-      <Filter>spells</Filter>
+      <Filter>spell</Filter>
     </ClCompile>
     <ClCompile Include="..\..\src\spells-summon.c">
-      <Filter>spells</Filter>
+      <Filter>spell</Filter>
     </ClCompile>
     <ClCompile Include="..\..\src\spells-world.c">
-      <Filter>spells</Filter>
+      <Filter>spell</Filter>
     </ClCompile>
     <ClCompile Include="..\..\src\floor-events.c">
       <Filter>floor</Filter>
       <Filter>player</Filter>
     </ClCompile>
     <ClCompile Include="..\..\src\realm-arcane.c">
-      <Filter>spells</Filter>
+      <Filter>spell</Filter>
     </ClCompile>
     <ClCompile Include="..\..\src\realm-chaos.c">
-      <Filter>spells</Filter>
+      <Filter>spell</Filter>
     </ClCompile>
     <ClCompile Include="..\..\src\realm-craft.c">
-      <Filter>spells</Filter>
+      <Filter>spell</Filter>
     </ClCompile>
     <ClCompile Include="..\..\src\realm-crusade.c">
-      <Filter>spells</Filter>
+      <Filter>spell</Filter>
     </ClCompile>
     <ClCompile Include="..\..\src\realm-daemon.c">
-      <Filter>spells</Filter>
+      <Filter>spell</Filter>
     </ClCompile>
     <ClCompile Include="..\..\src\realm-death.c">
-      <Filter>spells</Filter>
+      <Filter>spell</Filter>
     </ClCompile>
     <ClCompile Include="..\..\src\realm-hex.c">
-      <Filter>spells</Filter>
+      <Filter>spell</Filter>
     </ClCompile>
     <ClCompile Include="..\..\src\realm-hissatsu.c">
-      <Filter>spells</Filter>
+      <Filter>spell</Filter>
     </ClCompile>
     <ClCompile Include="..\..\src\realm-life.c">
-      <Filter>spells</Filter>
+      <Filter>spell</Filter>
     </ClCompile>
     <ClCompile Include="..\..\src\realm-nature.c">
-      <Filter>spells</Filter>
+      <Filter>spell</Filter>
     </ClCompile>
     <ClCompile Include="..\..\src\realm-song.c">
-      <Filter>spells</Filter>
+      <Filter>spell</Filter>
     </ClCompile>
     <ClCompile Include="..\..\src\realm-sorcery.c">
-      <Filter>spells</Filter>
+      <Filter>spell</Filter>
     </ClCompile>
     <ClCompile Include="..\..\src\realm-trump.c">
-      <Filter>spells</Filter>
+      <Filter>spell</Filter>
     </ClCompile>
     <ClCompile Include="..\..\src\mspells4.c">
-      <Filter>spells</Filter>
+      <Filter>spell</Filter>
     </ClCompile>
     <ClCompile Include="..\..\src\mspells1.c">
-      <Filter>spells</Filter>
+      <Filter>spell</Filter>
     </ClCompile>
     <ClCompile Include="..\..\src\mspells2.c">
-      <Filter>spells</Filter>
+      <Filter>spell</Filter>
     </ClCompile>
     <ClCompile Include="..\..\src\mspells3.c">
-      <Filter>spells</Filter>
+      <Filter>spell</Filter>
     </ClCompile>
     <ClCompile Include="..\..\src\geometry.c">
       <Filter>floor</Filter>
       <Filter>io</Filter>
     </ClCompile>
     <ClCompile Include="..\..\src\mind.c">
-      <Filter>spells</Filter>
+      <Filter>spell</Filter>
     </ClCompile>
     <ClCompile Include="..\..\src\player-skill.c">
       <Filter>player</Filter>
       <Filter>io</Filter>
     </ClCompile>
     <ClCompile Include="..\..\src\realm.c">
-      <Filter>spells</Filter>
+      <Filter>spell</Filter>
     </ClCompile>
     <ClCompile Include="..\..\src\creature.c">
       <Filter>creature</Filter>
     <ClCompile Include="..\..\src\effect\effect-item.c">
       <Filter>effect</Filter>
     </ClCompile>
+    <ClCompile Include="..\..\src\spell\spells-common.c">
+      <Filter>spell</Filter>
+    </ClCompile>
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="..\..\src\gamevalue.h" />
     <ClInclude Include="..\..\src\z-term.h" />
     <ClInclude Include="..\..\src\warning.h" />
     <ClInclude Include="..\..\src\spells.h">
-      <Filter>spells</Filter>
+      <Filter>spell</Filter>
     </ClInclude>
     <ClInclude Include="..\..\src\spells-diceroll.h">
-      <Filter>spells</Filter>
+      <Filter>spell</Filter>
     </ClInclude>
     <ClInclude Include="..\..\src\spells-floor.h">
-      <Filter>spells</Filter>
+      <Filter>spell</Filter>
     </ClInclude>
     <ClInclude Include="..\..\src\spells-object.h">
-      <Filter>spells</Filter>
+      <Filter>spell</Filter>
     </ClInclude>
     <ClInclude Include="..\..\src\spells-status.h">
-      <Filter>spells</Filter>
+      <Filter>spell</Filter>
     </ClInclude>
     <ClInclude Include="..\..\src\spells-summon.h">
-      <Filter>spells</Filter>
+      <Filter>spell</Filter>
     </ClInclude>
     <ClInclude Include="..\..\src\spells-world.h">
-      <Filter>spells</Filter>
+      <Filter>spell</Filter>
     </ClInclude>
     <ClInclude Include="..\..\src\floor.h">
       <Filter>floor</Filter>
       <Filter>player</Filter>
     </ClInclude>
     <ClInclude Include="..\..\src\realm-arcane.h">
-      <Filter>spells</Filter>
+      <Filter>spell</Filter>
     </ClInclude>
     <ClInclude Include="..\..\src\realm-chaos.h">
-      <Filter>spells</Filter>
+      <Filter>spell</Filter>
     </ClInclude>
     <ClInclude Include="..\..\src\realm-craft.h">
-      <Filter>spells</Filter>
+      <Filter>spell</Filter>
     </ClInclude>
     <ClInclude Include="..\..\src\realm-crusade.h">
-      <Filter>spells</Filter>
+      <Filter>spell</Filter>
     </ClInclude>
     <ClInclude Include="..\..\src\realm-daemon.h">
-      <Filter>spells</Filter>
+      <Filter>spell</Filter>
     </ClInclude>
     <ClInclude Include="..\..\src\realm-death.h">
-      <Filter>spells</Filter>
+      <Filter>spell</Filter>
     </ClInclude>
     <ClInclude Include="..\..\src\realm-hex.h">
-      <Filter>spells</Filter>
+      <Filter>spell</Filter>
     </ClInclude>
     <ClInclude Include="..\..\src\realm-hissatsu.h">
-      <Filter>spells</Filter>
+      <Filter>spell</Filter>
     </ClInclude>
     <ClInclude Include="..\..\src\realm-life.h">
-      <Filter>spells</Filter>
+      <Filter>spell</Filter>
     </ClInclude>
     <ClInclude Include="..\..\src\realm-nature.h">
-      <Filter>spells</Filter>
+      <Filter>spell</Filter>
     </ClInclude>
     <ClInclude Include="..\..\src\realm-song.h">
-      <Filter>spells</Filter>
+      <Filter>spell</Filter>
     </ClInclude>
     <ClInclude Include="..\..\src\realm-sorcery.h">
-      <Filter>spells</Filter>
+      <Filter>spell</Filter>
     </ClInclude>
     <ClInclude Include="..\..\src\realm-trump.h">
-      <Filter>spells</Filter>
+      <Filter>spell</Filter>
     </ClInclude>
     <ClInclude Include="..\..\src\monster-spell.h">
-      <Filter>spells</Filter>
+      <Filter>spell</Filter>
     </ClInclude>
     <ClInclude Include="..\..\src\geometry.h">
       <Filter>floor</Filter>
       <Filter>player</Filter>
     </ClInclude>
     <ClInclude Include="..\..\src\mind.h">
-      <Filter>spells</Filter>
+      <Filter>spell</Filter>
     </ClInclude>
     <ClInclude Include="..\..\src\object.h">
       <Filter>object</Filter>
       <Filter>cmd</Filter>
     </ClInclude>
     <ClInclude Include="..\..\src\realm.h">
-      <Filter>spells</Filter>
+      <Filter>spell</Filter>
     </ClInclude>
     <ClInclude Include="..\..\src\targeting.h">
       <Filter>io</Filter>
     <ClInclude Include="..\..\src\effect\effect-item.h">
       <Filter>effect</Filter>
     </ClInclude>
+    <ClInclude Include="..\..\src\spell\spells-common.h">
+      <Filter>spell</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <None Include="..\..\src\wall.bmp" />
     <Filter Include="io">
       <UniqueIdentifier>{1be1a971-e67f-4d7c-ace0-aab22a039851}</UniqueIdentifier>
     </Filter>
-    <Filter Include="spells">
-      <UniqueIdentifier>{4e443fe1-9ff8-4786-b43f-7e4d106760dc}</UniqueIdentifier>
-    </Filter>
     <Filter Include="combat">
       <UniqueIdentifier>{dae7a35f-36af-4097-905f-b9b9aad50d6e}</UniqueIdentifier>
     </Filter>
     <Filter Include="effect">
       <UniqueIdentifier>{ed8a9f97-b54e-4204-9076-f32f646f3762}</UniqueIdentifier>
     </Filter>
+    <Filter Include="spell">
+      <UniqueIdentifier>{4e443fe1-9ff8-4786-b43f-7e4d106760dc}</UniqueIdentifier>
+    </Filter>
   </ItemGroup>
   <ItemGroup>
     <ResourceCompile Include="..\..\src\angband.rc" />
index 53c284d..564870b 100644 (file)
@@ -161,6 +161,7 @@ hengband_SOURCES = \
        effect/effect-feature.c effect/effect-feature.h \
        effect/effect-item.c effect/effect-item.h \
        \
+       spell/spells-common.c spell/spells-common.h \
        spells.h \
        spells1.c spells2.c spells3.c \
        spells-diceroll.c spells-diceroll.h \
@@ -225,7 +226,7 @@ LIBS += $(XFT_LIBS)
 COMPILE = $(srcdir)/gcc-wrap $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
        $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) \
        -Iautopick -Icmd -Icombat -Icore -Ieffect -Iio -Iknowledge -Imarket \
-       -Imonster -Iobject -Iplayer -Iroom -Iview
+       -Imonster -Iobject -Iplayer -Iroom -Ispell -Iview
 
 install-exec-hook:
 if SET_GID
index a31c916..4af1bd7 100644 (file)
@@ -19,7 +19,7 @@
 #include "player-status.h"
 #include "player-effects.h"
 #include "player-inventory.h"
-#include "spells.h"
+#include "spell/spells-common.h"
 
 #include "cmd-basic.h"
 #include "cmd-spell.h"
index 343fc43..cc18517 100644 (file)
@@ -15,6 +15,7 @@
 #include "io/write-diary.h"
 #include "cmd/cmd-dump.h"
 #include "selfinfo.h"
+#include "spell/spells-common.h"
 #include "spells.h"
 #include "spells-summon.h"
 #include "realm-hex.h"
index aeff614..a7c44c5 100644 (file)
@@ -63,7 +63,7 @@
 #include "knowledge/knowledge-autopick.h"
 #include "knowledge/knowledge-quests.h"
 #include "market/store.h"
-#include "spells.h"
+#include "spell/spells-common.h"
 #include "spells-summon.h"
 #include "spells-object.h"
 #include "spells-status.h"
index 55694b6..1822586 100644 (file)
@@ -11,6 +11,7 @@
 #include "object-flavor.h"
 #include "object/object-kind.h"
 #include "player-skill.h"
+#include "spell/spells-common.h"
 
 /*
  * Display weapon-exp
index ebe90f6..f0ec5ed 100644 (file)
@@ -1,5 +1,6 @@
 #pragma once
 #include "spells.h"
+#include "spell/spells-common.h"
 #include "player-status.h"
 
 /*
index b7ab80c..6b3f279 100644 (file)
@@ -19,7 +19,7 @@
 #include "feature.h"
 #include "artifact.h"
 #include "avatar.h"
-#include "spells.h"
+#include "spell/spells-common.h"
 #include "spells-status.h"
 #include "object.h"
 #include "object-hook.h"
index 0894ccd..3934420 100644 (file)
@@ -25,7 +25,7 @@
 #include "object-hook.h"
 #include "object-curse.h"
 #include "spells-status.h"
-#include "spells.h"
+#include "spell/spells-common.h"
 #include "player-status.h"
 #include "player-effects.h"
 #include "player-skill.h"
index cad6e44..a34d798 100644 (file)
@@ -15,7 +15,7 @@
 #include "player-effects.h"
 #include "player-damage.h"
 #include "feature.h"
-#include "spells.h"
+#include "spell/spells-common.h"
 #include "grid.h"
 #include "targeting.h"
 #include "view/display-main-window.h"
diff --git a/src/spell/spells-common.c b/src/spell/spells-common.c
new file mode 100644 (file)
index 0000000..53dc4d2
--- /dev/null
@@ -0,0 +1,125 @@
+#include "angband.h"
+#include "spell/spells-common.h"
+
+/*!
+ * @brief \89Ì\81A\8c\95\8fp\81A\8eô\8fp\97Ì\88æ\8fî\95ñ\83e\81[\83u\83\8b
+ */
+const magic_type technic_info[NUM_TECHNIC][32] =
+{
+       {
+               /* Music */
+               { 1,  1,  10,   2},
+               { 2,  1,  10,   2},
+               { 3,  2,  20,   3},
+               { 4,  2,  20,   4},
+               { 5,  2,  20,   6},
+               { 7,  4,  30,   8},
+               { 9,  3,  30,   10},
+               { 10, 2,  30,   12},
+
+               { 12,  3,   40,   20},
+               { 15, 16,  42,   35},
+               { 17, 18,  40,   25},
+               { 18,  2,  45,   30},
+               { 23,  8,  50,   38},
+               { 28, 30,  50,   41},
+               { 33, 35,  60,   42},
+               { 38, 35,  70,   46},
+
+               { 10,  4,  20,   13},
+               { 22,  5,  30,   26},
+               { 23,  3,  35,   27},
+               { 26,  28,  37,   29},
+               { 32,  37,  41,   36},
+               { 33,  22,  43,   40},
+               { 37,  35,  46,   42},
+               { 45,  60,  50,   56},
+
+               { 23,  18,  20,   23},
+               { 30,  30,  30,   26},
+               { 33,  65,  41,   30},
+               { 37,  35,  43,   35},
+               { 40,  30,  46,   50},
+               { 42,  75,  50,   68},
+               { 45,  58,  62,   73},
+               { 49,  48,  70,  200}
+       },
+
+       {
+               /* Hissatsu */
+               { 1,   15,   0,   0},
+               { 3,   10,   0,   0},
+               { 6,   15,   0,   0},
+               { 9,    8,   0,   0},
+               { 10,  12,   0,   0},
+               { 12,  25,   0,   0},
+               { 14,   7,   0,   0},
+               { 17,  20,   0,   0},
+
+               { 19,  10,   0,   0},
+               { 22,  20,   0,   0},
+               { 24,  30,   0,   0},
+               { 25,  10,   0,   0},
+               { 27,  15,   0,   0},
+               { 29,  45,   0,   0},
+               { 32,  70,   0,   0},
+               { 35,  50,   0,   0},
+
+               { 18,  40,   0,   0},
+               { 22,  22,   0,   0},
+               { 24,  30,   0,   0},
+               { 26,  35,   0,   0},
+               { 30,  30,   0,   0},
+               { 32,  60,   0,   0},
+               { 36,  40,   0,   0},
+               { 39,  80,   0,   0},
+
+               { 26,  20,   0,   0},
+               { 29,  40,   0,   0},
+               { 31,  35,   0,   0},
+               { 36,  80,   0,   0},
+               { 39, 100,   0,   0},
+               { 42, 110,   0,   0},
+               { 45, 130,   0,   0},
+               { 50, 255,   0,   0}
+       },
+
+       {
+               /* Hex */
+               {  1,  2, 20,   2},
+               {  1,  2, 20,   2},
+               {  3,  2, 30,   3},
+               {  5,  3, 30,   4},
+               {  7,  3, 40,   6},
+               {  8, 10, 60,   8},
+               {  9,  3, 30,  10},
+               { 10,  5, 40,  12},
+
+               { 12,  8, 40,  15},
+               { 12,  9, 35,  15},
+               { 15, 10, 50,  20},
+               { 20, 12, 45,  35},
+               { 25, 15, 50,  50},
+               { 30, 12, 60,  70},
+               { 35, 10, 60,  80},
+               { 40, 16, 70, 100},
+
+               { 15,  8, 20,  20},
+               { 18, 15, 50,  20},
+               { 22, 10, 65,  35},
+               { 25, 28, 70,  50},
+               { 28, 10, 70,  60},
+               { 30, 20, 60,  60},
+               { 36, 22, 70,  80},
+               { 40, 28, 70, 100},
+
+               {  5,  6, 35,   5},
+               { 22, 24, 70,  40},
+               { 25,  2, 65,  50},
+               { 32, 20, 50,  70},
+               { 35, 35, 70,  80},
+               { 38, 32, 70,  90},
+               { 42, 24, 70, 120},
+               { 46, 45, 80, 200}
+       },
+};
diff --git a/src/spell/spells-common.h b/src/spell/spells-common.h
new file mode 100644 (file)
index 0000000..888caf2
--- /dev/null
@@ -0,0 +1,15 @@
+#pragma once
+
+/*
+ * The "name" of spell 'N' is stored as spell_names[X][N],
+ * where X is 0 for mage-spells and 1 for priest-spells.
+ */
+typedef struct
+{
+       PLAYER_LEVEL slevel;    /* Required level (to learn) */
+       MANA_POINT smana;               /* Required mana (to cast) */
+       PERCENTAGE sfail;               /* Minimum chance of failure */
+       EXP sexp;                               /* Encoded experience bonus */
+} magic_type;
+
+extern const magic_type technic_info[NUM_TECHNIC][32];
index 4795be3..7644fe9 100644 (file)
@@ -126,20 +126,6 @@ extern concptr exe_spell(player_type *caster_ptr, REALM_IDX realm, SPELL_IDX spe
 
 #define MAX_GF         117
 
-/*
- * The "name" of spell 'N' is stored as spell_names[X][N],
- * where X is 0 for mage-spells and 1 for priest-spells.
- */
-typedef struct magic_type magic_type;
-
-struct magic_type
-{
-       PLAYER_LEVEL slevel;    /* Required level (to learn) */
-       MANA_POINT smana;               /* Required mana (to cast) */
-       PERCENTAGE sfail;               /* Minimum chance of failure */
-       EXP sexp;                               /* Encoded experience bonus */
-};
-
 extern int cap_mon;
 extern int cap_mspeed;
 extern HIT_POINT cap_hp;
@@ -147,8 +133,6 @@ extern HIT_POINT cap_maxhp;
 extern STR_OFFSET cap_nickname;
 extern bool sukekaku;
 
-extern const magic_type technic_info[NUM_TECHNIC][32];
-
 /* spells1.c */
 extern bool in_disintegration_range(floor_type *floor_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2);
 extern void breath_shape(player_type *caster_ptr, u16b *path_g, int dist, int *pgrids, POSITION *gx, POSITION *gy, POSITION *gm, POSITION *pgm_rad, POSITION rad, POSITION y1, POSITION x1, POSITION y2, POSITION x2, EFFECT_ID typ);
index 27c8319..a65e743 100644 (file)
@@ -81,130 +81,6 @@ HIT_POINT cap_maxhp;
 STR_OFFSET cap_nickname;
 
 /*!
- * @brief 歌、剣術、呪術領域情報テーブル
- */
-const magic_type technic_info[NUM_TECHNIC][32] =
-{
-       {
-               /* Music */
-               { 1,  1,  10,   2},
-               { 2,  1,  10,   2},
-               { 3,  2,  20,   3},
-               { 4,  2,  20,   4},
-               { 5,  2,  20,   6},
-               { 7,  4,  30,   8},
-               { 9,  3,  30,   10},
-               { 10, 2,  30,   12},
-
-               { 12,  3,   40,   20},
-               { 15, 16,  42,   35},
-               { 17, 18,  40,   25},
-               { 18,  2,  45,   30},
-               { 23,  8,  50,   38},
-               { 28, 30,  50,   41},
-               { 33, 35,  60,   42},
-               { 38, 35,  70,   46},
-
-               { 10,  4,  20,   13},
-               { 22,  5,  30,   26},
-               { 23,  3,  35,   27},
-               { 26,  28,  37,   29},
-               { 32,  37,  41,   36},
-               { 33,  22,  43,   40},
-               { 37,  35,  46,   42},
-               { 45,  60,  50,   56},
-
-               { 23,  18,  20,   23},
-               { 30,  30,  30,   26},
-               { 33,  65,  41,   30},
-               { 37,  35,  43,   35},
-               { 40,  30,  46,   50},
-               { 42,  75,  50,   68},
-               { 45,  58,  62,   73},
-               { 49,  48,  70,  200}
-       },
-
-       {
-               /* Hissatsu */
-               { 1,   15,   0,   0},
-               { 3,   10,   0,   0},
-               { 6,   15,   0,   0},
-               { 9,    8,   0,   0},
-               { 10,  12,   0,   0},
-               { 12,  25,   0,   0},
-               { 14,   7,   0,   0},
-               { 17,  20,   0,   0},
-
-               { 19,  10,   0,   0},
-               { 22,  20,   0,   0},
-               { 24,  30,   0,   0},
-               { 25,  10,   0,   0},
-               { 27,  15,   0,   0},
-               { 29,  45,   0,   0},
-               { 32,  70,   0,   0},
-               { 35,  50,   0,   0},
-
-               { 18,  40,   0,   0},
-               { 22,  22,   0,   0},
-               { 24,  30,   0,   0},
-               { 26,  35,   0,   0},
-               { 30,  30,   0,   0},
-               { 32,  60,   0,   0},
-               { 36,  40,   0,   0},
-               { 39,  80,   0,   0},
-
-               { 26,  20,   0,   0},
-               { 29,  40,   0,   0},
-               { 31,  35,   0,   0},
-               { 36,  80,   0,   0},
-               { 39, 100,   0,   0},
-               { 42, 110,   0,   0},
-               { 45, 130,   0,   0},
-               { 50, 255,   0,   0}
-       },
-
-       {
-               /* Hex */
-               {  1,  2, 20,   2},
-               {  1,  2, 20,   2},
-               {  3,  2, 30,   3},
-               {  5,  3, 30,   4},
-               {  7,  3, 40,   6},
-               {  8, 10, 60,   8},
-               {  9,  3, 30,  10},
-               { 10,  5, 40,  12},
-
-               { 12,  8, 40,  15},
-               { 12,  9, 35,  15},
-               { 15, 10, 50,  20},
-               { 20, 12, 45,  35},
-               { 25, 15, 50,  50},
-               { 30, 12, 60,  70},
-               { 35, 10, 60,  80},
-               { 40, 16, 70, 100},
-
-               { 15,  8, 20,  20},
-               { 18, 15, 50,  20},
-               { 22, 10, 65,  35},
-               { 25, 28, 70,  50},
-               { 28, 10, 70,  60},
-               { 30, 20, 60,  60},
-               { 36, 22, 70,  80},
-               { 40, 28, 70, 100},
-
-               {  5,  6, 35,   5},
-               { 22, 24, 70,  40},
-               { 25,  2, 65,  50},
-               { 32, 20, 50,  70},
-               { 35, 35, 70,  80},
-               { 38, 32, 70,  90},
-               { 42, 24, 70, 120},
-               { 46, 45, 80, 200}
-       },
-};
-
-
-/*!
  * @brief 魔法処理のメインルーチン
  * @param realm 魔法領域のID
  * @param spell 各領域の魔法ID
@@ -350,8 +226,6 @@ static POSITION monster_target_y; /*!< モンスターの攻撃目標Y座標 */
  */
 static bool project_m(player_type *caster_ptr, MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_POINT dam, EFFECT_ID typ, BIT_FLAGS flg, bool see_s_msg)
 {
-       int tmp;
-
        floor_type *floor_ptr = caster_ptr->current_floor_ptr;
        grid_type *g_ptr = &floor_ptr->grid_array[y][x];
 
@@ -2458,7 +2332,7 @@ static bool project_m(player_type *caster_ptr, MONSTER_IDX who, POSITION r, POSI
                if (!(r_ptr->flags3 & RF3_EVIL) || one_in_(5)) chg_virtue(caster_ptr, V_HONOUR, -1);
        }
 
-       tmp = dam;
+       int tmp = dam;
        dam = mon_damage_mod(caster_ptr, m_ptr, dam, (bool)(typ == GF_PSY_SPEAR));
        if ((tmp > 0) && (dam == 0)) note = _("はダメージを受けていない。", " is unharmed.");
 
index e72e573..2a5f1f9 100644 (file)
@@ -39,6 +39,7 @@
 #include "avatar.h"
 #include "spells.h"
 #include "spells-floor.h"
+#include "spell/spells-common.h"
 #include "grid.h"
 #include "market/building-util.h"
 #include "monster-process.h"