OSDN Git Service

[Refactor] #2680 MON_MULT_ADJ が1箇所からしか参照されていないのでmonster-processor.cpp に移した
authorHourier <66951241+Hourier@users.noreply.github.com>
Wed, 2 Nov 2022 14:00:03 +0000 (23:00 +0900)
committerHourier <66951241+Hourier@users.noreply.github.com>
Thu, 3 Nov 2022 00:55:52 +0000 (09:55 +0900)
src/monster/monster-processor.cpp
src/system/gamevalue.h

index fb4f604..1c8af92 100644 (file)
@@ -446,7 +446,8 @@ bool decide_monster_multiplication(PlayerType *player_ptr, MONSTER_IDX m_idx, PO
         k = 8;
     }
 
-    if ((k < 4) && (!k || !randint0(k * MON_MULT_ADJ))) {
+    constexpr auto chance_reproduction = 8;
+    if ((k < 4) && (!k || !randint0(k * chance_reproduction))) {
         if (multiply_monster(player_ptr, m_idx, false, (m_ptr->is_pet() ? PM_FORCE_PET : 0))) {
             if (player_ptr->current_floor_ptr->m_list[hack_m_idx_ii].ml && is_original_ap_and_seen(player_ptr, m_ptr)) {
                 r_ptr->r_flags2 |= RF2_MULTIPLY;
index 3428ba3..0e3c839 100644 (file)
@@ -16,7 +16,6 @@
 #define BREAK_RUNE_PROTECTION 550 /*!< 守りのルーンの強靭度 / Rune of protection resistance */
 #define BREAK_RUNE_EXPLOSION 299 /*!< 爆発のルーンの発動しやすさ / For explosive runes */
 #define BTH_PLUS_ADJ 3 /*!< 武器経験値及びプレイヤーの打撃/射撃能力に応じた修正値倍率 / Adjust BTH per plus-to-hit */
-#define MON_MULT_ADJ 8 /*!< モンスターの増殖しにくさの基本倍率 / High value slows ENERGY_MULTIPLICATION */
 #define MON_SUMMON_ADJ 2 /*!< 現在未使用 Adjust level of summoned creatures */
 #define MON_DRAIN_LIFE 2 /*!< モンスターの打撃によるプレイヤーの経験値吸収基本倍率(%) / Percent of player exp drained per hit */
 #define USE_DEVICE 3 /*!< 魔道具の最低失敗基準値 x> Harder devices x< Easier devices     */