OSDN Git Service

[Refactor] #40416 Separated monster-attack-effect.h from melee.h
authorHourier <hourier@users.sourceforge.jp>
Thu, 21 May 2020 10:20:27 +0000 (19:20 +0900)
committerHourier <hourier@users.sourceforge.jp>
Thu, 21 May 2020 10:20:27 +0000 (19:20 +0900)
Hengband/Hengband/Hengband.vcxproj
Hengband/Hengband/Hengband.vcxproj.filters
src/Makefile.am
src/combat/melee.c
src/combat/melee.h
src/combat/monster-attack-effect.h [new file with mode: 0644]
src/monster/monster-status.c
src/monster/monster1.c
src/monster/monsterrace-hook.c
src/object/warning.c

index aaa18d1..5a508ae 100644 (file)
     <ClInclude Include="..\..\src\combat\hallucination-attacks-table.h" />\r
     <ClInclude Include="..\..\src\combat\insults-moans.h" />\r
     <ClInclude Include="..\..\src\combat\martial-arts-table.h" />\r
+    <ClInclude Include="..\..\src\combat\monster-attack-effect.h" />\r
     <ClInclude Include="..\..\src\combat\monster-attack-types.h" />\r
     <ClInclude Include="..\..\src\io\pref-file-expressor.h" />\r
     <ClInclude Include="..\..\src\market\arena.h" />\r
index 41689c4..436c3a6 100644 (file)
     <ClInclude Include="..\..\src\combat\combat-options-type.h">
       <Filter>combat</Filter>
     </ClInclude>
+    <ClInclude Include="..\..\src\combat\monster-attack-effect.h">
+      <Filter>combat</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <None Include="..\..\src\wall.bmp" />
index d6fd93e..42a4a71 100644 (file)
@@ -338,6 +338,7 @@ hengband_SOURCES = \
        combat/monster-attack-types.c combat/monster-attack-types.h \
        combat/martial-arts-table.c combat/martial-arts-table.h \
        combat/insults-moans.c combat/insults-moans.h \
+       combat/monster-attack-effects.h \
        combat/combat-options-type.h \
        combat/shoot.c combat/shoot.h \
        combat/snipe.c combat/snipe.h \
index 559aaaa..5c8b1c7 100644 (file)
@@ -53,6 +53,7 @@
 #include "combat/monster-attack-types.h"
 #include "combat/martial-arts-table.h"
 #include "combat/insults-moans.h"
+#include "combat/monster-attack-effect.h"
 
 #define BLOW_EFFECT_TYPE_NONE  0
 #define BLOW_EFFECT_TYPE_FEAR  1
index 2fa36ed..613e81a 100644 (file)
@@ -1,44 +1,5 @@
 #include "combat/combat-options-type.h"
 
- /*!
-  * @note モンスターの攻撃効果 / New monster blow effects
-  */
-#define RBE_HURT         1 /*!< モンスターの攻撃効果: 攻撃する*/
-#define RBE_POISON       2 /*!< モンスターの攻撃効果: 毒をくらわす*/
-#define RBE_UN_BONUS     3 /*!< モンスターの攻撃効果: 劣化させる*/
-#define RBE_UN_POWER     4 /*!< モンスターの攻撃効果: 充填魔力を吸収する*/
-#define RBE_EAT_GOLD     5 /*!< モンスターの攻撃効果: 金を盗む*/
-#define RBE_EAT_ITEM     6 /*!< モンスターの攻撃効果: アイテムを盗む*/
-#define RBE_EAT_FOOD     7 /*!< モンスターの攻撃効果: あなたの食糧を食べる*/
-#define RBE_EAT_LITE     8 /*!< モンスターの攻撃効果: 明かりを吸収する*/
-#define RBE_ACID         9 /*!< モンスターの攻撃効果: 酸を飛ばす*/
-#define RBE_ELEC        10 /*!< モンスターの攻撃効果: 感電させる*/
-#define RBE_FIRE        11 /*!< モンスターの攻撃効果: 燃やす*/
-#define RBE_COLD        12 /*!< モンスターの攻撃効果: 凍らせる*/
-#define RBE_BLIND       13 /*!< モンスターの攻撃効果: 盲目にする*/
-#define RBE_CONFUSE     14 /*!< モンスターの攻撃効果: 混乱させる*/
-#define RBE_TERRIFY     15 /*!< モンスターの攻撃効果: 恐怖させる*/
-#define RBE_PARALYZE    16 /*!< モンスターの攻撃効果: 麻痺させる*/
-#define RBE_LOSE_STR    17 /*!< モンスターの攻撃効果: 腕力を減少させる*/
-#define RBE_LOSE_INT    18 /*!< モンスターの攻撃効果: 知能を減少させる*/
-#define RBE_LOSE_WIS    19 /*!< モンスターの攻撃効果: 賢さを減少させる*/
-#define RBE_LOSE_DEX    20 /*!< モンスターの攻撃効果: 器用さを減少させる*/
-#define RBE_LOSE_CON    21 /*!< モンスターの攻撃効果: 耐久力を減少させる*/
-#define RBE_LOSE_CHR    22 /*!< モンスターの攻撃効果: 魅力を減少させる*/
-#define RBE_LOSE_ALL    23 /*!< モンスターの攻撃効果: 全ステータスを減少させる*/
-#define RBE_SHATTER     24 /*!< モンスターの攻撃効果: 粉砕する*/
-#define RBE_EXP_10      25 /*!< モンスターの攻撃効果: 経験値を減少(10d6+)させる*/
-#define RBE_EXP_20      26 /*!< モンスターの攻撃効果: 経験値を減少(20d6+)させる*/
-#define RBE_EXP_40      27 /*!< モンスターの攻撃効果: 経験値を減少(40d6+)させる*/
-#define RBE_EXP_80      28 /*!< モンスターの攻撃効果: 経験値を減少(80d6+)させる*/
-#define RBE_DISEASE     29 /*!< モンスターの攻撃効果: 病気にする*/
-#define RBE_TIME        30 /*!< モンスターの攻撃効果: 時間を逆戻りさせる*/
-#define RBE_DR_LIFE     31 /*!< モンスターの攻撃効果: 生命力を吸収する*/
-#define RBE_DR_MANA     32 /*!< モンスターの攻撃効果: 魔力を奪う*/
-#define RBE_SUPERHURT   33 /*!< モンスターの攻撃効果: 強力に攻撃する*/
-#define RBE_INERTIA     34 /*!< モンスターの攻撃効果: 減速させる*/
-#define RBE_STUN        35 /*!< モンスターの攻撃効果: 朦朧とさせる*/
-
 extern bool test_hit_norm(player_type *attacker_ptr, HIT_RELIABILITY chance, ARMOUR_CLASS ac, bool visible);
 extern PERCENTAGE hit_chance(player_type *attacker_ptr, HIT_RELIABILITY chance, ARMOUR_CLASS ac);
 extern HIT_POINT tot_dam_aux(player_type *attacker_ptr, object_type *o_ptr, HIT_POINT tdam, monster_type *m_ptr, combat_options mode, bool thrown);
diff --git a/src/combat/monster-attack-effect.h b/src/combat/monster-attack-effect.h
new file mode 100644 (file)
index 0000000..e3d3b72
--- /dev/null
@@ -0,0 +1,42 @@
+#pragma once
+
+/*!
+ * @note モンスターの攻撃効果 / New monster blow effects
+ */
+typedef enum rbe_type {
+    RBE_HURT = 1, /*!< モンスターの攻撃効果: 攻撃する*/
+    RBE_POISON = 2, /*!< モンスターの攻撃効果: 毒をくらわす*/
+    RBE_UN_BONUS = 3, /*!< モンスターの攻撃効果: 劣化させる*/
+    RBE_UN_POWER = 4, /*!< モンスターの攻撃効果: 充填魔力を吸収する*/
+    RBE_EAT_GOLD = 5, /*!< モンスターの攻撃効果: 金を盗む*/
+    RBE_EAT_ITEM = 6, /*!< モンスターの攻撃効果: アイテムを盗む*/
+    RBE_EAT_FOOD = 7, /*!< モンスターの攻撃効果: あなたの食糧を食べる*/
+    RBE_EAT_LITE = 8, /*!< モンスターの攻撃効果: 明かりを吸収する*/
+    RBE_ACID = 9, /*!< モンスターの攻撃効果: 酸を飛ばす*/
+    RBE_ELEC = 10, /*!< モンスターの攻撃効果: 感電させる*/
+    RBE_FIRE = 11, /*!< モンスターの攻撃効果: 燃やす*/
+    RBE_COLD = 12, /*!< モンスターの攻撃効果: 凍らせる*/
+    RBE_BLIND = 13, /*!< モンスターの攻撃効果: 盲目にする*/
+    RBE_CONFUSE = 14, /*!< モンスターの攻撃効果: 混乱させる*/
+    RBE_TERRIFY = 15, /*!< モンスターの攻撃効果: 恐怖させる*/
+    RBE_PARALYZE = 16, /*!< モンスターの攻撃効果: 麻痺させる*/
+    RBE_LOSE_STR = 17, /*!< モンスターの攻撃効果: 腕力を減少させる*/
+    RBE_LOSE_INT = 18, /*!< モンスターの攻撃効果: 知能を減少させる*/
+    RBE_LOSE_WIS = 19, /*!< モンスターの攻撃効果: 賢さを減少させる*/
+    RBE_LOSE_DEX = 20, /*!< モンスターの攻撃効果: 器用さを減少させる*/
+    RBE_LOSE_CON = 21, /*!< モンスターの攻撃効果: 耐久力を減少させる*/
+    RBE_LOSE_CHR = 22, /*!< モンスターの攻撃効果: 魅力を減少させる*/
+    RBE_LOSE_ALL = 23, /*!< モンスターの攻撃効果: 全ステータスを減少させる*/
+    RBE_SHATTER = 24, /*!< モンスターの攻撃効果: 粉砕する*/
+    RBE_EXP_10 = 25, /*!< モンスターの攻撃効果: 経験値を減少(10d6+)させる*/
+    RBE_EXP_20 = 26, /*!< モンスターの攻撃効果: 経験値を減少(20d6+)させる*/
+    RBE_EXP_40 = 27, /*!< モンスターの攻撃効果: 経験値を減少(40d6+)させる*/
+    RBE_EXP_80 = 28, /*!< モンスターの攻撃効果: 経験値を減少(80d6+)させる*/
+    RBE_DISEASE = 29, /*!< モンスターの攻撃効果: 病気にする*/
+    RBE_TIME = 30, /*!< モンスターの攻撃効果: 時間を逆戻りさせる*/
+    RBE_DR_LIFE = 31, /*!< モンスターの攻撃効果: 生命力を吸収する*/
+    RBE_DR_MANA = 32, /*!< モンスターの攻撃効果: 魔力を奪う*/
+    RBE_SUPERHURT = 33, /*!< モンスターの攻撃効果: 強力に攻撃する*/
+    RBE_INERTIA = 34, /*!< モンスターの攻撃効果: 減速させる*/
+    RBE_STUN = 35, /*!< モンスターの攻撃効果: 朦朧とさせる*/
+} rbe_type;
index 671ae36..b140469 100644 (file)
@@ -27,7 +27,7 @@
 #include "view/display-main-window.h"
 #include "world/world.h"
 #include "io/report.h"
-#include "melee.h"
+#include "combat/monster-attack-effect.h"
 #include "combat/monster-attack-types.h"
 
 /*!
index acc2e33..56fcca1 100644 (file)
@@ -43,6 +43,7 @@
 #include "mspell/mspell-type.h"
 #include "mspell/mspell-damage-calculator.h"
 #include "combat/monster-attack-types.h"
+#include "combat/monster-attack-effect.h"
 
  /*
   * Pronoun arrays, by gender.
index 5eb8df4..01bef53 100644 (file)
@@ -7,7 +7,7 @@
 #include "floor/floor.h"
 #include "dungeon/dungeon.h"
 #include "monster/monster-race.h"
-#include "melee.h"
+#include "combat/monster-attack-effect.h"
 #include "combat/monster-attack-types.h"
 
 /*! 通常pit生成時のモンスターの構成条件ID / Race index for "monster pit (clone)" */
index 600daee..f88394e 100644 (file)
@@ -15,7 +15,7 @@
 #include "dungeon/dungeon.h"
 #include "player/mimic-info-table.h"
 #include "player/player-class.h"
-#include "melee.h"
+#include "combat/monster-attack-effect.h"
 #include "mspell/mspell-type.h"
 #include "mspell/mspell-damage-calculator.h"
 #include "player/player-races-table.h"