From: dis- Date: Sat, 20 Feb 2021 06:46:03 +0000 (+0900) Subject: [Implement] 荒野に出現するモンスター一覧のスポイラー出力 X-Git-Tag: vmacos3.0.0-alpha52~363^2~3^2 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=014f17daf183e3bb23a7f8954f4d70d96b046620;hp=f22641bc466a49d3768cd8bd7bd59968a028add9;p=hengbandforosx%2Fhengbandosx.git [Implement] 荒野に出現するモンスター一覧のスポイラー出力 スポイラー一覧出力を拡張し、WILD_*フラグを保持するモンスターの一覧を出力するように変更した。 --- diff --git a/src/wizard/monster-info-spoiler.c b/src/wizard/monster-info-spoiler.c index 0de1b2082..3582dba98 100644 --- a/src/wizard/monster-info-spoiler.c +++ b/src/wizard/monster-info-spoiler.c @@ -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 未使用 diff --git a/src/wizard/monster-info-spoiler.h b/src/wizard/monster-info-spoiler.h index 340be5b90..b1d4eea34 100644 --- a/src/wizard/monster-info-spoiler.h +++ b/src/wizard/monster-info-spoiler.h @@ -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); diff --git a/src/wizard/wizard-spoiler.c b/src/wizard/wizard-spoiler.c index 9412fd939..8a149a522 100644 --- a/src/wizard/wizard-spoiler.c +++ b/src/wizard/wizard-spoiler.c @@ -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;