OSDN Git Service

[Implement] 荒野に出現するモンスター一覧のスポイラー出力
authordis- <dis.rogue@gmail.com>
Sat, 20 Feb 2021 06:46:03 +0000 (15:46 +0900)
committerdis- <dis.rogue@gmail.com>
Sat, 20 Feb 2021 06:48:51 +0000 (15:48 +0900)
スポイラー一覧出力を拡張し、WILD_*フラグを保持するモンスターの一覧を出力するように変更した。

src/wizard/monster-info-spoiler.c
src/wizard/monster-info-spoiler.h
src/wizard/wizard-spoiler.c

index 0de1b20..3582dba 100644 (file)
@@ -3,9 +3,11 @@
 #include "monster-race/monster-race.h"
 #include "monster-race/race-flags1.h"
 #include "monster-race/race-flags7.h"
+#include "monster-race/race-flags8.h"
 #include "system/angband-version.h"
 #include "term/term-color-types.h"
 #include "util/angband-files.h"
+#include "util/bit-flags-calculator.h"
 #include "util/sort.h"
 #include "view/display-lore.h"
 #include "view/display-messages.h"
@@ -65,12 +67,7 @@ static concptr attr_to_text(monster_race *r_ptr)
     return _("変な色の", "Icky");
 }
 
-/*!
- * @brief モンスター簡易情報のスポイラー出力を行うメインルーチン /
- * Create a spoiler file for monsters   -BEN-
- * @param fname 生成ファイル名
- */
-spoiler_output_status spoil_mon_desc(concptr fname)
+spoiler_output_status spoil_mon_desc(concptr fname, bool show_all, race_flags8 RF8_flags)
 {
     player_type dummy;
     u16b why = 2;
@@ -113,6 +110,9 @@ spoiler_output_status spoil_mon_desc(concptr fname)
     for (int i = 0; i < n; i++) {
         monster_race *r_ptr = &r_info[who[i]];
         concptr name = (r_name + r_ptr->name);
+        if (!show_all && !test_bit(r_ptr->flags8, RF8_flags))
+            continue;
+
         if (r_ptr->flags7 & RF7_KAGE)
             continue;
         else if (r_ptr->flags1 & (RF1_UNIQUE))
@@ -147,6 +147,13 @@ spoiler_output_status spoil_mon_desc(concptr fname)
 }
 
 /*!
+ * @brief モンスター簡易情報のスポイラー出力を行うメインルーチン /
+ * Create a spoiler file for monsters   -BEN-
+ * @param fname 生成ファイル名
+ */
+spoiler_output_status spoil_mon_desc_all(concptr fname) { return spoil_mon_desc(fname, TRUE, RF8_WILD_ALL); }
+
+/*!
  * @brief 関数ポインタ用の出力関数 /
  * Hook function used in spoil_mon_info()
  * @param attr 未使用
index 340be5b..b1d4eea 100644 (file)
@@ -3,5 +3,6 @@
 #include "system/angband.h"
 #include "wizard/spoiler-util.h"
 
-spoiler_output_status spoil_mon_desc(concptr fname);
+spoiler_output_status spoil_mon_desc_all(concptr fname);
+spoiler_output_status spoil_mon_desc(concptr fname, bool show_all, BIT_FLAGS RF8_flags);
 spoiler_output_status spoil_mon_info(concptr fname);
index 9412fd9..8a149a5 100644 (file)
@@ -15,6 +15,7 @@
 #include "io/input-key-acceptor.h"
 #include "main/sound-of-music.h"
 #include "monster-race/monster-race.h"
+#include "monster-race/race-flags8.h"
 #include "system/angband-version.h"
 #include "term/screen-processor.h"
 #include "util/angband-files.h"
@@ -190,7 +191,7 @@ void exe_output_spoilers(void)
             status = spoil_fixed_artifact("artifact.txt");
             break;
         case '3':
-            status = spoil_mon_desc("mon-desc.txt");
+            status = spoil_mon_desc_all("mon-desc.txt");
             break;
         case '4':
             status = spoil_mon_info("mon-info.txt");
@@ -234,7 +235,38 @@ spoiler_output_status output_all_spoilers(void)
     if (status != SPOILER_OUTPUT_SUCCESS)
         return status;
 
-    status = spoil_mon_desc("mon-desc.txt");
+    status = spoil_mon_desc_all("mon-desc.txt");
+    if (status != SPOILER_OUTPUT_SUCCESS)
+        return status;
+
+    status = spoil_mon_desc("mon-desc-wildonly.txt", FALSE, RF8_WILD_ONLY);
+    if (status != SPOILER_OUTPUT_SUCCESS)
+        return status;
+    status = spoil_mon_desc("mon-desc-town.txt", FALSE, RF8_WILD_TOWN);
+    if (status != SPOILER_OUTPUT_SUCCESS)
+        return status;
+    status = spoil_mon_desc("mon-desc-shore.txt", FALSE, RF8_WILD_SHORE);
+    if (status != SPOILER_OUTPUT_SUCCESS)
+        return status;
+    status = spoil_mon_desc("mon-desc-ocean.txt", FALSE, RF8_WILD_OCEAN);
+    if (status != SPOILER_OUTPUT_SUCCESS)
+        return status;
+    status = spoil_mon_desc("mon-desc-waste.txt", FALSE, RF8_WILD_WASTE);
+    if (status != SPOILER_OUTPUT_SUCCESS)
+        return status;
+    status = spoil_mon_desc("mon-desc-wood.txt", FALSE, RF8_WILD_WOOD);
+    if (status != SPOILER_OUTPUT_SUCCESS)
+        return status;
+    status = spoil_mon_desc("mon-desc-volcano.txt", FALSE, RF8_WILD_VOLCANO);
+    if (status != SPOILER_OUTPUT_SUCCESS)
+        return status;
+    status = spoil_mon_desc("mon-desc-mountain.txt", FALSE, RF8_WILD_MOUNTAIN);
+    if (status != SPOILER_OUTPUT_SUCCESS)
+        return status;
+    status = spoil_mon_desc("mon-desc-grass.txt", FALSE, RF8_WILD_GRASS);
+    if (status != SPOILER_OUTPUT_SUCCESS)
+        return status;
+    status = spoil_mon_desc("mon-desc-wildall.txt", FALSE, RF8_WILD_ALL);
     if (status != SPOILER_OUTPUT_SUCCESS)
         return status;