OSDN Git Service

[Refactor] #37353 ゲームバランス定数を gamevalue.h へ整理。 / Move constant value in game to gameva...
authorDeskull <deskull@users.sourceforge.jp>
Sat, 8 Sep 2018 15:22:18 +0000 (00:22 +0900)
committerDeskull <deskull@users.sourceforge.jp>
Sat, 8 Sep 2018 15:22:18 +0000 (00:22 +0900)
13 files changed:
Hengband_vcs2015/Hengband/Hengband.vcxproj
Hengband_vcs2015/Hengband/Hengband.vcxproj.filters
src/angband.h
src/artifact.c
src/cmd1.c
src/dungeon.c
src/gamevalue.h
src/generate.h
src/melee2.c
src/monster2.c
src/object2.c
src/spells1.c
src/spells3.c

index 2793217..4b208a9 100644 (file)
     <ClInclude Include="..\..\src\cmd-usestaff.h" />\r
     <ClInclude Include="..\..\src\defines.h" />\r
     <ClInclude Include="..\..\src\externs.h" />\r
+    <ClInclude Include="..\..\src\gamevalue.h" />\r
     <ClInclude Include="..\..\src\generate.h" />\r
     <ClInclude Include="..\..\src\grid.h" />\r
     <ClInclude Include="..\..\src\h-basic.h" />\r
index 70401f8..f342be1 100644 (file)
     <ClInclude Include="..\..\src\cmd-magiceat.h">\r
       <Filter>Header</Filter>\r
     </ClInclude>\r
+    <ClInclude Include="..\..\src\gamevalue.h">\r
+      <Filter>Header</Filter>\r
+    </ClInclude>\r
   </ItemGroup>\r
   <ItemGroup>\r
     <ResourceCompile Include="..\..\src\angband.rc" />\r
index b5623f0..742242f 100644 (file)
@@ -43,6 +43,7 @@
  * Now, include the define's, the type's, and the extern's
  */
 #include "defines.h"
+#include "gamevalue.h"
 #include "types.h"
 #include "externs.h"
 
index b63b8cc..3f8f3ef 100644 (file)
@@ -17,21 +17,6 @@ static int suppression_evil_dam(object_type *o_ptr);
 static int weakening_artifact(object_type *o_ptr);
 
 
-/* Chance of using syllables to form the name instead of the "template" files */
-#define SINDARIN_NAME   10 /*!< ランダムアーティファクトにシンダリン銘をつける確率 */
-#define TABLE_NAME      20 /*!< ランダムアーティファクトに漢字銘をつける確率(正確には TABLE_NAME - SINDARIN_NAME %)となる */
-#define A_CURSED        13 /*!< 1/nの確率で生成の巻物以外のランダムアーティファクトが呪いつきになる。 */
-#define WEIRD_LUCK      12 /*!< 1/nの確率でrandom_resistance()の処理中バイアス外の耐性がつき、create_artifactで4を超えるpvalが許可される。*/
-#define BIAS_LUCK       20 /*!< 1/nの確率でrandom_resistance()で付加する元素耐性が免疫になる */
-#define IM_LUCK         7 /*!< 1/nの確率でrandom_resistance()で複数免疫の除去処理が免除される */
-
-/*! @note
- * Bias luck needs to be higher than weird luck,
- * since it is usually tested several times...
- */
-
-#define ACTIVATION_CHANCE 3 /*!< 1/nの確率でランダムアーティファクトに発動が付加される。ただし防具はさらに1/2 */
-
 
 /*!
  * @brief 対象のオブジェクトにランダムな上位耐性を一つ付加する。/ Choose one random high resistance
index ee3358e..82bbf42 100644 (file)
 
 
 #include "angband.h"
-#define MAX_VAMPIRIC_DRAIN 50 /*!< 吸血処理の最大回復HP */
 
 
 /*!
index f24b3f4..ccd704a 100644 (file)
@@ -20,9 +20,6 @@
 #include "cmd-zaprod.h"
 #include "cmd-zapwand.h"
 
-#define TY_CURSE_CHANCE 200 /*!<太古の怨念の1ターン毎の発動確率(1/n)*/
-#define CHAINSWORD_NOISE 100 /*!<チェンソーの1ターン毎の発動確率(1/n)*/
-
 static bool load = TRUE; /*!<ロード処理中の分岐フラグ*/
 static int wild_regen = 20; /*!<広域マップ移動時の自然回復処理カウンタ(広域マップ1マス毎に20回処理を基本とする)*/
 
index a14b509..d3c34b9 100644 (file)
 */\r
 #define MAX_REPRO       100\r
 \r
+#define MAX_VAMPIRIC_DRAIN 50 /*!< \8bz\8c\8c\8f\88\97\9d\82Ì\8dÅ\91å\89ñ\95\9cHP */\r
 \r
+/*\r
+* Dungeon generation values\r
+*/\r
+#define DUN_UNUSUAL 250 /*!< \92Ê\8fí\82Å\82Í\82È\82¢\95\94\89®\82ª\90\90¬\82³\82ê\82é\8aî\96{\8am\97¦(\83\8c\83x\83\8b/\92è\90\94) / Level/chance of unusual room (was 200) */\r
+#define DUN_DEST    18  /*!< \94j\89ó\92n\8c`\82ª\83t\83\8d\83A\82É\94­\90\82·\82é\8aî\96{\8am\97¦(1/\92è\90\94) / 1/chance of having a destroyed level */\r
+#define SMALL_LEVEL 3   /*!< \8f¬\82³\82¢\83t\83\8d\83A\82Ì\90\90¬\82³\82ê\82é\8aî\96{\8am\97¦(1/\92è\90\94) / 1/chance of smaller size (3) */\r
+#define EMPTY_LEVEL 24  /*!< \83A\83\8a\81[\83i\83\8c\83x\83\8b(\8aO\95Ç\82Ì\82È\82¢\83t\83\8d\83A)\82Ì\90\90¬\82³\82ê\82é\8aî\96{\8am\97¦(1/\92è\90\94) / 1/chance of being 'empty' (15) */\r
+#define LAKE_LEVEL  24  /*!< \90ì\82â\8cÎ\82Ì\82 \82é\83t\83\8d\83A\82Ì\90\90¬\82³\82ê\82é\8am\97¦(1/\92è\90\94) / 1/chance of being a lake on the level */\r
+#define DARK_EMPTY  5   /*!< \83t\83\8d\83A\91S\91Ì\82ª\88Ã\82¢\89Â\94\\90«\82Ì\8aî\96{\8am\97¦(1/\92è\90\94) / 1/chance of arena level NOT being lit (2) */\r
+#define DUN_CAVERN  20 /*!< \93´\8cA\8fó\82Ì\83_\83\93\83W\83\87\83\93\82ª\90\90¬\82³\82ê\82é\8aî\96{\8am\97¦(1/\92è\90\94) / 1/chance of having a cavern level */\r
+\r
+/*\r
+ * Dungeon tunnel generation values\r
+ */\r
+#define DUN_TUN_RND_MIN         5 /* Chance of random direction (was 10) */\r
+#define DUN_TUN_RND_MAX        20\r
+#define DUN_TUN_CHG_MIN        20 /* Chance of changing direction (was 30) */\r
+#define DUN_TUN_CHG_MAX        60\r
+#define DUN_TUN_CON_MIN 10 /* Chance of extra tunneling (was 15) */\r
+#define DUN_TUN_CON_MAX        40\r
+#define DUN_TUN_PEN_MIN 30 /* Chance of doors at room entrances (was 25) */\r
+#define DUN_TUN_PEN_MAX 70\r
+#define DUN_TUN_JCT_MIN 60 /* Chance of doors at tunnel junctions (was 90) */\r
+#define DUN_TUN_JCT_MAX 90\r
+\r
+/*\r
+ * Dungeon streamer generation values\r
+ */\r
+#define DUN_STR_DEN     5      /* Density of streamers */\r
+#define DUN_STR_RNG     5      /* Width of streamers */\r
+#define DUN_STR_MAG     6      /* Number of magma streamers */\r
+#define DUN_STR_MC     30      /* 1/chance of treasure per magma */\r
+#define DUN_STR_QUA     4      /* Number of quartz streamers */\r
+#define DUN_STR_QC     15      /* 1/chance of treasure per quartz */\r
+#define DUN_STR_WLW     1      /* Width of lava & water streamers -KMW- */\r
+#define DUN_STR_DWLW    8      /* Density of water & lava streams -KMW- */\r
+\r
+#define DUN_MOS_DEN    2       /* Density of moss streamers */\r
+#define DUN_MOS_RNG    10      /* Width of moss streamers */\r
+#define DUN_STR_MOS    2       /* Number of moss streamers */\r
+#define DUN_WAT_DEN    15      /* Density of rivers */\r
+#define DUN_WAT_RNG    2       /* Width of rivers */\r
+#define DUN_STR_WAT    3       /* Max number of rivers */\r
+#define DUN_WAT_CHG    50      /* 1 in 50 chance of junction in river */\r
+\r
+/*\r
+ * Dungeon treausre allocation values\r
+ */\r
+#define DUN_AMT_ROOM   9       /* Amount of objects for rooms */\r
+#define DUN_AMT_ITEM   3       /* Amount of objects for rooms/corridors */\r
+#define DUN_AMT_GOLD   3       /* Amount of treasure for rooms/corridors */\r
+#define DUN_AMT_INVIS  3       /* Amount of invisible walls for rooms/corridors */\r
+\r
+ /* Chance of using syllables to form the name instead of the "template" files */\r
+#define SINDARIN_NAME   10 /*!< \83\89\83\93\83_\83\80\83A\81[\83e\83B\83t\83@\83N\83g\82É\83V\83\93\83_\83\8a\83\93\96Á\82ð\82Â\82¯\82é\8am\97¦ */\r
+#define TABLE_NAME      20 /*!< \83\89\83\93\83_\83\80\83A\81[\83e\83B\83t\83@\83N\83g\82É\8a¿\8e\9a\96Á\82ð\82Â\82¯\82é\8am\97¦(\90³\8am\82É\82Í TABLE_NAME - SINDARIN_NAME %)\82Æ\82È\82é */\r
+#define A_CURSED        13 /*!< 1/n\82Ì\8am\97¦\82Å\90\90¬\82Ì\8aª\95¨\88È\8aO\82Ì\83\89\83\93\83_\83\80\83A\81[\83e\83B\83t\83@\83N\83g\82ª\8eô\82¢\82Â\82«\82É\82È\82é\81B */\r
+#define WEIRD_LUCK      12 /*!< 1/n\82Ì\8am\97¦\82Årandom_resistance()\82Ì\8f\88\97\9d\92\86\83o\83C\83A\83X\8aO\82Ì\91Ï\90«\82ª\82Â\82«\81Acreate_artifact\82Å4\82ð\92´\82¦\82épval\82ª\8b\96\89Â\82³\82ê\82é\81B*/\r
+#define BIAS_LUCK       20 /*!< 1/n\82Ì\8am\97¦\82Årandom_resistance()\82Å\95t\89Á\82·\82é\8c³\91f\91Ï\90«\82ª\96Æ\89u\82É\82È\82é */\r
+#define IM_LUCK         7 /*!< 1/n\82Ì\8am\97¦\82Årandom_resistance()\82Å\95¡\90\94\96Æ\89u\82Ì\8f\9c\8b\8e\8f\88\97\9d\82ª\96Æ\8f\9c\82³\82ê\82é */\r
+\r
+ /*! @note\r
+ * Bias luck needs to be higher than weird luck,\r
+ * since it is usually tested several times...\r
+ */\r
+\r
+#define ACTIVATION_CHANCE 3 /*!< 1/n\82Ì\8am\97¦\82Å\83\89\83\93\83_\83\80\83A\81[\83e\83B\83t\83@\83N\83g\82É\94­\93®\82ª\95t\89Á\82³\82ê\82é\81B\82½\82¾\82µ\96h\8bï\82Í\82³\82ç\82É1/2 */\r
+\r
+#define TY_CURSE_CHANCE 200 /*!<\91¾\8cÃ\82Ì\89\85\94O\82Ì1\83^\81[\83\93\96\88\82Ì\94­\93®\8am\97¦(1/n)*/\r
+#define CHAINSWORD_NOISE 100 /*!<\83`\83F\83\93\83\\81[\82Ì1\83^\81[\83\93\96\88\82Ì\94­\93®\8am\97¦(1/n)*/\r
+\r
+#define SPEAK_CHANCE 8\r
+#define GRINDNOISE 20\r
+#define CYBERNOISE 20\r
+\r
+#define GROUP_MAX 32 /*!< place_monster_group() \8aÖ\90\94\82É\82æ\82é\83\82\83\93\83X\83^\81[\82ÌGROUP\90\90¬\8e\9e\82Ì\94z\92u\8dÅ\91å\90\94 / Maximum size of a group of monsters */\r
+\r
+ /* ToDo: Make this global */\r
+#define HURT_CHANCE 16 /*!< \91®\90«\8dU\8c\82\82ð\8eó\82¯\82½\8dÛ\82É\94\\97Í\92l\92á\89º\82ð\8bN\82±\82·\8am\97¦(1/X) / 1/x chance of reducing stats (for elemental attacks) */\r
index 32bc28a..8147634 100644 (file)
 
 #define SAFE_MAX_ATTEMPTS 5000 /*!< 生成処理基本試行回数 */
 
-/*
- * Dungeon generation values
- */
-#define DUN_UNUSUAL 250 /*!< 通常ではない部屋が生成される基本確率(レベル/定数) / Level/chance of unusual room (was 200) */
-#define DUN_DEST    18  /*!< 破壊地形がフロアに発生する基本確率(1/定数) / 1/chance of having a destroyed level */
-#define SMALL_LEVEL 3   /*!< 小さいフロアの生成される基本確率(1/定数) / 1/chance of smaller size (3) */
-#define EMPTY_LEVEL 24  /*!< アリーナレベル(外壁のないフロア)の生成される基本確率(1/定数) / 1/chance of being 'empty' (15) */
-#define LAKE_LEVEL  24  /*!< 川や湖のあるフロアの生成される確率(1/定数) / 1/chance of being a lake on the level */
-#define DARK_EMPTY  5   /*!< フロア全体が暗い可能性の基本確率(1/定数) / 1/chance of arena level NOT being lit (2) */
-#define DUN_CAVERN  20 /*!< 洞窟状のダンジョンが生成される基本確率(1/定数) / 1/chance of having a cavern level */
-
-/*
- * Dungeon tunnel generation values
- */
-#define DUN_TUN_RND_MIN         5 /* Chance of random direction (was 10) */
-#define DUN_TUN_RND_MAX        20
-#define DUN_TUN_CHG_MIN        20 /* Chance of changing direction (was 30) */
-#define DUN_TUN_CHG_MAX        60
-#define DUN_TUN_CON_MIN 10 /* Chance of extra tunneling (was 15) */
-#define DUN_TUN_CON_MAX        40
-#define DUN_TUN_PEN_MIN 30 /* Chance of doors at room entrances (was 25) */
-#define DUN_TUN_PEN_MAX 70
-#define DUN_TUN_JCT_MIN 60 /* Chance of doors at tunnel junctions (was 90) */
-#define DUN_TUN_JCT_MAX 90
 
 
 extern int dun_tun_rnd; /*!< ダンジョンの通路方向を掻き回す頻度(一回の試行ごとに%で判定している) */
@@ -41,33 +17,6 @@ extern int dun_tun_chg; /*!< ダンジョンの通路をクランクさせる頻
 extern int dun_tun_con; /*!< ダンジョンの通路を継続して引き延ばす頻度(一回の試行ごとに%で判定している) */
 extern int dun_tun_pen; /*!< ダンジョンの部屋入口にドアを設置する頻度(一回の試行ごとに%で判定している) */
 extern int dun_tun_jct; /*!< ダンジョンの通路交差地点付近にドアを設置する頻度(一回の試行ごとに%で判定している) */
-/*
- * Dungeon streamer generation values
- */
-#define DUN_STR_DEN     5      /* Density of streamers */
-#define DUN_STR_RNG     5      /* Width of streamers */
-#define DUN_STR_MAG     6      /* Number of magma streamers */
-#define DUN_STR_MC     30      /* 1/chance of treasure per magma */
-#define DUN_STR_QUA    4       /* Number of quartz streamers */
-#define DUN_STR_QC     15      /* 1/chance of treasure per quartz */
-#define DUN_STR_WLW     1      /* Width of lava & water streamers -KMW- */
-#define DUN_STR_DWLW    8      /* Density of water & lava streams -KMW- */
-
-#define DUN_MOS_DEN    2       /* Density of moss streamers */
-#define DUN_MOS_RNG    10      /* Width of moss streamers */
-#define DUN_STR_MOS    2       /* Number of moss streamers */
-#define DUN_WAT_DEN    15      /* Density of rivers */
-#define DUN_WAT_RNG    2       /* Width of rivers */
-#define DUN_STR_WAT    3       /* Max number of rivers */
-#define DUN_WAT_CHG    50      /* 1 in 50 chance of junction in river */
-
-/*
- * Dungeon treausre allocation values
- */
-#define DUN_AMT_ROOM   9       /* Amount of objects for rooms */
-#define DUN_AMT_ITEM   3       /* Amount of objects for rooms/corridors */
-#define DUN_AMT_GOLD   3       /* Amount of treasure for rooms/corridors */
-#define DUN_AMT_INVIS 3        /* Amount of invisible walls for rooms/corridors */
 
 /*
  * Hack -- Dungeon allocation "places"
index 3e22720..f7b0d36 100644 (file)
@@ -15,9 +15,6 @@
 
 #include "angband.h"
 
-#define SPEAK_CHANCE 8
-#define GRINDNOISE 20
-#define CYBERNOISE 20
 
 /*!
  * @brief モンスターが敵に接近するための方向を決める /
index f5d71f1..a772745 100644 (file)
@@ -3463,8 +3463,6 @@ static bool mon_scatter(MONRACE_IDX r_idx, POSITION *yp, POSITION *xp, POSITION
        return TRUE;
 }
 
-#define GROUP_MAX 32 /*!< place_monster_group() 関数によるモンスターのGROUP生成時の配置最大数 / Maximum size of a group of monsters */
-
 /*!
  * @brief モンスターを目標地点に集団生成する / Attempt to place a "group" of monsters around the given location
  * @param who 召喚主のモンスター情報ID
index 16475bf..b800143 100644 (file)
@@ -3123,7 +3123,7 @@ static void a_m_aux_2(object_type *o_ptr, int level, int power)
                                        o_ptr->to_d -= 6;
                                        o_ptr->to_h -= 6;
                                        break;
-                                 case EGO_NAZGUL:
+                               case EGO_NAZGUL:
                                        o_ptr->to_d -= 3;
                                        o_ptr->to_h -= 3;
                                        if (one_in_(3)) add_flag(o_ptr->art_flags, TR_COWARDICE);
index db223d2..50e789c 100644 (file)
@@ -13,8 +13,6 @@
 
 #include "angband.h"
 
-/* ToDo: Make this global */
-#define HURT_CHANCE 16 /*!< 属性攻撃を受けた際に能力値低下を起こす確率(1/X) / 1/x chance of reducing stats (for elemental attacks) */
 
 static int rakubadam_m; /*!< 振り落とされた際のダメージ量 */
 static int rakubadam_p; /*!< 落馬した際のダメージ量 */
index d8dce01..586a853 100644 (file)
@@ -16,9 +16,6 @@
 /*! テレポート先探索の試行数 / Maximum number of tries for teleporting */
 #define MAX_TRIES 100
 
-/*! 能力値現象の基本確率(1 / HURT_CHANCE) / 1/x chance of reducing stats (for elemental attacks) */
-#define HURT_CHANCE 16
-
 /*!
  * @brief 指定されたマスがモンスターのテレポート可能先かどうかを判定する。
  * @param m_idx モンスターID