OSDN Git Service

[Fix] #41316 get_mon_num() の最小生成階範囲処理ミスを修正. / Fix min level range of get_mon_num().
authordeskull <deskull@users.sourceforge.jp>
Tue, 26 Jan 2021 12:40:19 +0000 (21:40 +0900)
committerdeskull <deskull@users.sourceforge.jp>
Tue, 26 Jan 2021 12:40:19 +0000 (21:40 +0900)
src/market/bounty.c
src/monster/monster-list.c

index f4c9f3f..876ac79 100644 (file)
@@ -6,6 +6,7 @@
 #include "core/stuff-handler.h"
 #include "dungeon/dungeon.h"
 #include "flavor/flavor-describer.h"
+#include "game-option/cheat-options.h"
 #include "inventory/inventory-object.h"
 #include "inventory/inventory-slot-types.h"
 #include "io/input-key-acceptor.h"
@@ -283,11 +284,14 @@ void determine_daily_bounty(player_type *player_ptr, bool conv_old)
     get_mon_num_prep(player_ptr, NULL, NULL);
 
     while (TRUE) {
-//        today_mon = get_mon_num(player_ptr, 0, max_dl, GMN_ARENA);
         today_mon = get_mon_num(player_ptr, MIN(max_dl / 2, 40), max_dl, GMN_ARENA);
         monster_race *r_ptr;
         r_ptr = &r_info[today_mon];
 
+        if (cheat_hear) {
+            msg_format("日替わり: %s ", r_ptr->name + r_name);
+        }
+
         if (r_ptr->flags1 & RF1_UNIQUE)
             continue;
         if (r_ptr->flags7 & (RF7_NAZGUL | RF7_UNIQUE2))
index a263ab1..612390d 100644 (file)
@@ -134,8 +134,8 @@ MONRACE_IDX get_mon_num(player_type *player_ptr, DEPTH min_level, DEPTH max_leve
 
     /* Process probabilities */
     for (i = 0; i < alloc_race_size; i++) {
-        if (table[i].level < min_level || max_level < table[i].level)
-            break;
+        if (table[i].level < min_level) continue; 
+        if (max_level < table[i].level) break; // sorted by depth array,
         table[i].prob3 = 0;
         r_idx = table[i].index;
         r_ptr = &r_info[r_idx];