OSDN Git Service

[Refactor] #37353 monster-spell.h を追加。
authordeskull <deskull@users.sourceforge.jp>
Fri, 22 Mar 2019 15:32:15 +0000 (00:32 +0900)
committerdeskull <deskull@users.sourceforge.jp>
Fri, 22 Mar 2019 15:32:15 +0000 (00:32 +0900)
18 files changed:
Hengband_vcs2017/Hengband/Hengband.vcxproj
Hengband_vcs2017/Hengband/Hengband.vcxproj.filters
src/Makefile.am
src/defines.h
src/melee1.c
src/monster-process.c
src/monster-status.c
src/monster1.c
src/monster2.c
src/monsterrace-hook.c
src/mspells1.c
src/mspells2.c
src/mspells3.c
src/mspells4.c
src/player-move.c
src/shoot.c
src/spells1.c
src/spells3.c

index ed33df0..89174d2 100644 (file)
     <ClInclude Include="..\..\src\init.h" />\r
     <ClInclude Include="..\..\src\kajitips.h" />\r
     <ClInclude Include="..\..\src\melee.h" />\r
+    <ClInclude Include="..\..\src\monster-spell.h" />\r
     <ClInclude Include="..\..\src\monster-status.h" />\r
     <ClInclude Include="..\..\src\monster.h" />\r
     <ClInclude Include="..\..\src\monsterrace-hook.h" />\r
index dd609bc..534e694 100644 (file)
     <ClInclude Include="..\..\src\floor-generate.h">
       <Filter>floor</Filter>
     </ClInclude>
+    <ClInclude Include="..\..\src\monster-spell.h">
+      <Filter>monster</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <ResourceCompile Include="..\..\src\angband.rc" />
index e225666..d5b0aa9 100644 (file)
@@ -37,7 +37,7 @@ hengband_SOURCES = \
        monster.h \
        monsterrace-hook.c monsterrace-hook.h monster-process.c \
        monster-process.h monster-status.c monster-status.h monster1.c \
-       monster2.c mspells1.c mspells2.c mspells3.c mspells4.c \
+       monster2.c mspells1.c mspells2.c mspells3.c mspells4.c monster-spell.h \
        \
        mutation.h mutation.c \
        \
index 19b61ec..aa6e240 100644 (file)
 #define RFR_XXX31           0x80000000
 
 
-/*
- * Hack -- choose "intelligent" spells when desperate
- * Including "summon" spells
- */
-#define RF4_INT_MASK \
-       (RF4_SUMMON_MASK | RF4_DISPEL)
-
-#define RF5_INT_MASK \
-       (RF5_SUMMON_MASK | \
-        RF5_HOLD | RF5_SLOW | RF5_CONF | RF5_BLIND | RF5_SCARE)
-
-#define RF6_INT_MASK \
-       (RF6_SUMMON_MASK | \
-        RF6_BLINK | RF6_TPORT | RF6_TELE_LEVEL | RF6_TELE_AWAY | \
-        RF6_HEAL | RF6_INVULNER | RF6_HASTE | RF6_TRAPS)
-
-/*
- * Hack -- spells that cannot be used while player riding on the monster
- */
-#define RF4_RIDING_MASK \
-       (RF4_SHRIEK)
-
-#define RF5_RIDING_MASK 0UL
-
-#define RF6_RIDING_MASK \
-       (RF6_BLINK | RF6_TPORT | RF6_TRAPS | RF6_DARKNESS | RF6_SPECIAL)
-
-/*
- * Hack -- "bolt" spells that may hurt fellow monsters
- * Currently "bolt" spells are included in "attack"
- */
-#define RF4_BOLT_MASK \
-       (RF4_ROCKET | RF4_SHOOT)
-
-#define RF5_BOLT_MASK \
-       (RF5_BO_ACID | RF5_BO_ELEC | RF5_BO_FIRE | RF5_BO_COLD | \
-        RF5_BO_NETH | RF5_BO_WATE | RF5_BO_MANA | RF5_BO_PLAS | \
-        RF5_BO_ICEE | RF5_MISSILE)
-
-#define RF6_BOLT_MASK 0UL
-
-/*
- * Hack -- "beam" spells that may hurt fellow monsters
- * Currently "beam" spells are included in "attack"
- */
-#define RF4_BEAM_MASK 0UL
-
-#define RF5_BEAM_MASK 0UL
-
-#define RF6_BEAM_MASK (RF6_PSY_SPEAR)
-
-/*
- * Hack -- "ball" spells that may hurt friends
- * Including "radius 4 ball" and "breath" spells
- * Currently "ball" spells are included in "attack"
- */
-#define RF4_BALL_MASK \
-       (RF4_BIG_BALL_MASK | RF4_BREATH_MASK | \
-        RF4_ROCKET | RF4_BA_NUKE)
-
-#define RF5_BALL_MASK \
-       (RF5_BIG_BALL_MASK | RF5_BREATH_MASK | \
-        RF5_BA_ACID | RF5_BA_ELEC | RF5_BA_FIRE | RF5_BA_COLD | \
-        RF5_BA_POIS | RF5_BA_NETH)
-
-#define RF6_BALL_MASK \
-       (RF6_BIG_BALL_MASK | RF6_BREATH_MASK)
-
-/*
- * Hack -- "ball" spells with radius 4 that may hurt friends
- * Currently "radius 4 ball" spells are included in "ball"
- */
-#define RF4_BIG_BALL_MASK \
-       (RF4_BA_CHAO)
-
-#define RF5_BIG_BALL_MASK \
-       (RF5_BA_LITE | RF5_BA_DARK | RF5_BA_WATE | RF5_BA_MANA)
-
-#define RF6_BIG_BALL_MASK 0UL
-
-/*
- * Hack -- "breath" spells that may hurt friends
- * Currently "breath" spells are included in "ball" and "non-magic"
- */
-#define RF4_BREATH_MASK \
-       (RF4_BR_ACID | RF4_BR_ELEC | RF4_BR_FIRE | RF4_BR_COLD | \
-        RF4_BR_POIS | RF4_BR_NETH | RF4_BR_LITE | RF4_BR_DARK | \
-        RF4_BR_CONF | RF4_BR_SOUN | RF4_BR_CHAO | RF4_BR_DISE | \
-        RF4_BR_NEXU | RF4_BR_SHAR | RF4_BR_TIME | RF4_BR_INER | \
-        RF4_BR_GRAV | RF4_BR_PLAS | RF4_BR_WALL | RF4_BR_MANA | \
-        RF4_BR_NUKE | RF4_BR_DISI)
-
-#define RF5_BREATH_MASK 0UL
-
-#define RF6_BREATH_MASK 0UL
-
-/*
- * Hack -- "summon" spells
- * Currently "summon" spells are included in "intelligent" and "indirect"
- */
-#define RF4_SUMMON_MASK 0UL
-
-#define RF5_SUMMON_MASK 0UL
-
-#define RF6_SUMMON_MASK \
-       (RF6_S_KIN | RF6_S_CYBER | RF6_S_MONSTER | RF6_S_MONSTERS | RF6_S_ANT | \
-        RF6_S_SPIDER | RF6_S_HOUND | RF6_S_HYDRA | RF6_S_ANGEL | RF6_S_DEMON | \
-        RF6_S_UNDEAD | RF6_S_DRAGON | RF6_S_HI_UNDEAD | RF6_S_HI_DRAGON | \
-        RF6_S_AMBERITES | RF6_S_UNIQUE)
-
-/*
- * Hack -- "attack" spells
- * Including "bolt", "beam" and "ball" spells
- */
-#define RF4_ATTACK_MASK \
-       (RF4_BOLT_MASK | RF4_BEAM_MASK | RF4_BALL_MASK | RF4_DISPEL)
-
-#define RF5_ATTACK_MASK \
-       (RF5_BOLT_MASK | RF5_BEAM_MASK | RF5_BALL_MASK | \
-        RF5_DRAIN_MANA | RF5_MIND_BLAST | RF5_BRAIN_SMASH | \
-        RF5_CAUSE_1 | RF5_CAUSE_2 | RF5_CAUSE_3 | RF5_CAUSE_4 | \
-        RF5_SCARE | RF5_BLIND | RF5_CONF | RF5_SLOW | RF5_HOLD)
-
-#define RF6_ATTACK_MASK \
-       (RF6_BOLT_MASK | RF6_BEAM_MASK | RF6_BALL_MASK | \
-        RF6_HAND_DOOM | RF6_TELE_TO | RF6_TELE_AWAY | RF6_TELE_LEVEL | \
-        RF6_DARKNESS | RF6_TRAPS | RF6_FORGET)
-
-/*
- * Hack -- "indirect" spells
- * Including "summon" spells
- */
-#define RF4_INDIRECT_MASK \
-       (RF4_SUMMON_MASK | RF4_SHRIEK)
-
-#define RF5_INDIRECT_MASK \
-       (RF5_SUMMON_MASK)
-
-#define RF6_INDIRECT_MASK \
-       (RF6_SUMMON_MASK | \
-        RF6_HASTE | RF6_HEAL | RF6_INVULNER | RF6_BLINK | RF6_WORLD | \
-        RF6_TPORT | RF6_RAISE_DEAD)
-
-/*
- * Hack -- "non-magic" spells
- * Including "breath" spells
- */
-#define RF4_NOMAGIC_MASK \
-       (RF4_BREATH_MASK | RF4_SHRIEK | RF4_ROCKET | RF4_SHOOT)
-
-#define RF5_NOMAGIC_MASK \
-       (RF5_BREATH_MASK)
-
-#define RF6_NOMAGIC_MASK \
-       (RF6_BREATH_MASK | RF6_SPECIAL)
-
-/*
- * Hack -- "torch" masks
- */
+ /*
+  * Hack -- "torch" masks
+  */
 #define RF7_LITE_MASK \
        (RF7_HAS_LITE_1 | RF7_SELF_LITE_1 | RF7_HAS_LITE_2 | RF7_SELF_LITE_2)
 
 #define RF7_SELF_LD_MASK \
        (RF7_SELF_LITE_1 | RF7_SELF_LITE_2 | RF7_SELF_DARK_1 | RF7_SELF_DARK_2)
 
-/*
- * Hack -- effective elemental and poison immunity mask
- */
+  /*
  * Hack -- effective elemental and poison immunity mask
  */
 #define RFR_EFF_IM_ACID_MASK  (RFR_IM_ACID | RFR_RES_ALL)
 #define RFR_EFF_IM_ELEC_MASK  (RFR_IM_ELEC | RFR_RES_ALL)
 #define RFR_EFF_IM_FIRE_MASK  (RFR_IM_FIRE | RFR_RES_ALL)
index 824a3e0..0be5ea6 100644 (file)
@@ -19,6 +19,7 @@
 #include "melee.h"
 #include "projection.h"
 #include "monster-status.h"
+#include "monster-spell.h"
 #include "avatar.h"
 #include "player-status.h"
 #include "realm-hex.h"
index 5dbd8c8..506892f 100644 (file)
@@ -27,6 +27,7 @@
 #include "grid.h"
 #include "player-move.h"
 #include "monster-status.h"
+#include "monster-spell.h"
 
 
 /*!
index 7c9111d..4485b11 100644 (file)
@@ -1,6 +1,7 @@
 #include "angband.h"
 #include "monster.h"
 #include "monster-status.h"
+#include "monster-spell.h"
 #include "spells-summon.h"
 #include "monsterrace-hook.h"
 #include "object-curse.h"
index a6fbf4e..f322f2f 100644 (file)
@@ -16,6 +16,7 @@
 #include "objectkind-hook.h"
 #include "projection.h"
 #include "monster.h"
+#include "monster-spell.h"
 #include "spells-summon.h"
 #include "patron.h"
 #include "quest.h"
index 0f6bc55..0f272d4 100644 (file)
@@ -23,6 +23,7 @@
 #include "wild.h"
 #include "warning.h"
 #include "player-status.h"
+#include "monster-spell.h"
 
 #define HORDE_NOGOOD 0x01 /*!< (未実装フラグ)HORDE生成でGOODなモンスターの生成を禁止する? */
 #define HORDE_NOEVIL 0x02 /*!< (未実装フラグ)HORDE生成でEVILなモンスターの生成を禁止する? */
index 827f83d..774133f 100644 (file)
@@ -1,5 +1,6 @@
 #include "angband.h"
 #include "monsterrace-hook.h"
+#include "monster-spell.h"
 
 /*! 通常pit生成時のモンスターの構成条件ID / Race index for "monster pit (clone)" */
 int vault_aux_race;
index e0ff777..6f1e4a3 100644 (file)
@@ -45,6 +45,7 @@
 #include "realm-hex.h"
 #include "player-move.h"
 #include "player-status.h"
+#include "monster-spell.h"
 
 
 /*!
index 3b8f6e9..87cbc55 100644 (file)
@@ -17,6 +17,7 @@
 #include "realm-hex.h"
 #include "player-move.h"
 #include "monster-status.h"
+#include "monster-spell.h"
 
 /*!
  * @brief モンスターが敵対モンスターにビームを当てること可能かを判定する /
index e36e41d..5c178fb 100644 (file)
@@ -17,6 +17,7 @@
 #include "spells-status.h"
 #include "cmd-spell.h"
 #include "player-status.h"
+#include "monster-spell.h"
 
 #define pseudo_plev() (((p_ptr->lev + 40) * (p_ptr->lev + 40) - 1550) / 130) /*!< モンスター魔法をプレイヤーが使用する場合の換算レベル */
 
index 82fc870..b5aa130 100644 (file)
@@ -13,6 +13,7 @@
 #include "player-status.h"
 #include "realm-hex.h"
 #include "player-move.h"
+#include "monster-spell.h"
 
 /*!
 * @brief モンスターIDを取り、モンスター名をm_nameに代入する /
index 524ad4f..169b0c0 100644 (file)
 #include "spells-floor.h"
 #include "feature.h"
 #include "warning.h"
+#include "monster-spell.h"
 
 
 
index 3de0388..37da67e 100644 (file)
@@ -1,6 +1,7 @@
 #include "angband.h"
 #include "projection.h"
 #include "monster-status.h"
+#include "monster-spell.h"
 #include "artifact.h"
 #include "avatar.h"
 #include "player-status.h"
index fff3b7a..fc62542 100644 (file)
@@ -19,6 +19,7 @@
 
 #include "monster.h"
 #include "monster-status.h"
+#include "monster-spell.h"
 #include "spells-status.h"
 #include "spells-diceroll.h"
 #include "spells-summon.h"
index e27f18c..5885af8 100644 (file)
@@ -24,6 +24,7 @@
 #include "avatar.h"
 #include "spells-floor.h"
 #include "monster-status.h"
+#include "monster-spell.h"
 
 
 /*! テレポート先探索の試行数 / Maximum number of tries for teleporting */