• R/O
  • HTTP
  • SSH
  • HTTPS

hengbandosx: 提交

The master and develop branches track hengband.

OS X development happens on the macos-1-6-2, macos-2-2-1, and macos-develop branches.


Commit MetaInfo

修订版55f1ec806b1fa0af3ef84cbf8b38b6084dfc5d5c (tree)
时间2022-08-01 11:32:06
作者Eric Branlund <ebranlund@fast...>
CommiterEric Branlund

Log Message

Merge branch 'develop' into macos-develop

更改概述

差异

--- a/doxygen/Hengband.doxyfile
+++ b/doxygen/Hengband.doxyfile
@@ -38,7 +38,7 @@ PROJECT_NAME = Hengband
3838 # could be handy for archiving the generated documentation or if some version
3939 # control system is used.
4040
41-PROJECT_NUMBER = 3.0.0Alpha63
41+PROJECT_NUMBER = 3.0.0Alpha64
4242
4343 # Using the PROJECT_BRIEF tag one can provide an optional one line description
4444 # for a project that appears at the top of each page and should give viewer a
--- a/lib/edit/r_info.txt
+++ b/lib/edit/r_info.txt
@@ -5564,8 +5564,6 @@ S:1_IN_3
55645564 S:SPECIAL
55655565 D:$An agent of supernatural beings, this creature looks like a
55665566 D:$huge eagle.
5567-#D:この生き物はなにか超自然的な存在の使いだ。
5568-#D:そしてそれは大きな鷲のように見える。
55695567 D:マンウェに遣わされた偉大な大鷲は人の言葉を話し、
55705568 D:マイアールと同じ魂を持っていると言われる。
55715569 D:この大鷲はその一族の一員である。
@@ -6432,8 +6430,6 @@ S:1_IN_2
64326430 S:SPECIAL | S_KIN
64336431 D:$An agent of supernatural beings, this creature looks like a
64346432 D:$huge eagle.
6435-#D:この生き物はなにか超自然的な存在の使いだ。
6436-#D:そしてそれは大きな鷲のように見える。
64376433 D:マンウェに遣わされた偉大な大鷲は人の言葉を話し、
64386434 D:マイアールと同じ魂を持っていると言われる。
64396435 D:メネルドールは一族の中でグワイヒアとその弟ランドローバルに継いで速く、
@@ -6896,8 +6892,6 @@ S:1_IN_2
68966892 S:SPECIAL | S_KIN
68976893 D:$An agent of supernatural beings, this creature looks like a
68986894 D:$huge eagle.
6899-#D:この生き物はなにか超自然的な存在の使いだ。
6900-#D:そしてそれは大きな鷲のように見える。
69016895 D:マンウェに遣わされた偉大な大鷲は人の言葉を話し、
69026896 D:マイアールと同じ魂を持っていると言われる。
69036897 D:グワイヒアは大鷲の王であり、一族の中で最も強く、速い。
@@ -8024,7 +8018,6 @@ F:ANIMAL | GOOD | RIDING
80248018 S:1_IN_2
80258019 S:SPECIAL | S_KIN
80268020 D:$An agent of supernatural being, Thorondor is the lord of eagles.
8027-#D:ソロンドールは超自然的な存在の使いで、大鷲たちの王だ。
80288021 D:マンウェに遣わされた偉大な大鷲は人の言葉を話し、
80298022 D:マイアールと同じ魂を持っていると言われる。
80308023 D:ソロンドールは全ての大鷲のうちで最初に現れた者であり、最強かつ最大の王だ。
@@ -8731,12 +8724,10 @@ B:SLASH:HURT:9d1
87318724 B:SLASH:HURT:6d5
87328725 B:SLASH:HURT:25d1
87338726 B:SLASH:HURT:30d1
8734-#F:UNIQUE | MALE | WEIRD_MIND | SPEAK_ALL |
87358727 F:UNIQUE | MALE | SPEAK_ALL | HUMAN |
87368728 F:FORCE_MAXHP | WILD_ALL | DROP_CORPSE
87378729 F:ONLY_ITEM | DROP_1D2 | DROP_GOOD |
87388730 F:OPEN_DOOR | BASH_DOOR |
8739-#F:TROLL | IM_COLD | IM_POIS
87408731 F:IM_COLD | IM_POIS
87418732 A:150:100
87428733
@@ -9238,8 +9229,6 @@ F:NO_CONF | NO_SLEEP | NO_FEAR | NONLIVING
92389229 D:$It is a massive deep brown statue, striding towards you with an
92399230 D:$all-too-familiar purpose. Your magic surprisingly feels much less
92409231 D:$powerful now.
9241-#D:それは深い茶色の堂々たる巨像で、みんなと仲良くしようと思って大股で歩み寄って
9242-#D:くる。このモンスターに対してはあまりの魔法の無力さに呆然とするであろう。
92439232 D:それは深い茶色の堂々たる巨像で、誰にも明らかなありふれた目的
92449233 D:――侵入者を殺す事!――を果たす為にあなたに向って大股で歩み寄ってくる。
92459234 D:このモンスターに対してはあまりの魔法の無力さに呆然とするであろう。
@@ -9514,9 +9503,6 @@ S:BR_FORC
95149503 D:$A deep brown shape is visible before you, its canine form strikes you with
95159504 D:$an almost physical force. The dungeon floor buckles as if struck by a
95169505 D:$powerful blow as it stalks towards you.
9517-#D:深茶色の体をしたこの犬は精神的な力で冒険者を攻撃をしてくるが、
9518-#D:その力はあまりに強いためにほとんど物理的な力とかわりがない。
9519-#D:それが忍び寄ってくると、ダンジョンの床がまるで何かに叩かれたように歪む。
95209506 D:深い褐色の何かの形が目の前に浮かんでいる。
95219507 D:その犬のような形があなたに触れるとあたかも物体が当たったかのような衝撃を受ける。
95229508 D:それが"歩く"時、ダンジョンの床がまるで強い打撃を受けたようにへこむのが見える。
@@ -16127,7 +16113,7 @@ F:DROP_60 | DROP_GOOD | POWERFUL | AURA_ELEC | AURA_FIRE | AURA_COLD |
1612716113 F:BASH_DOOR | IM_ELEC | IM_FIRE | IM_COLD | IM_POIS | IM_ACID |
1612816114 F:RES_LITE | RES_DARK | RES_WATE | RES_PLAS | RES_SHAR | RES_SOUN |
1612916115 F:RES_CHAO | RES_NEXU | RES_DISE | RES_WALL | RES_INER | RES_TIME | RES_GRAV |
16130-F:COLD_BLOOD | NONLIVING | RAND_50
16116+F:COLD_BLOOD | NONLIVING | RAND_50 | SPEAK_DEATH
1613116117 S:1_IN_5 | BR_CHAO
1613216118 D:$Summoned from the Courts of Chaos, it is a mass of sentient Logrus,
1613316119 D:$spreading uncontrollably and destroying everything in its path.
@@ -20421,7 +20407,7 @@ F:MALE | FORCE_MAXHP | SPEAK_ALL | DROP_SKELETON | DROP_CORPSE
2042120407 F:NO_CONF | NO_SLEEP | NO_STUN | NO_FEAR | HAS_LITE_2 | HUMAN |
2042220408 F:RES_TELE | RAND_50 | ESCORT | IM_FIRE |
2042320409 F:ONLY_ITEM | DROP_1D2 | DROP_GOOD | UNIQUE |
20424-F:OPEN_DOOR | EVIL | BASH_DOOR | SMART
20410+F:OPEN_DOOR | EVIL | BASH_DOOR | SMART | SPEAK_DEATH
2042520411 V:166
2042620412 S:1_IN_3
2042720413 S:BA_FIRE | HASTE | SPECIAL
@@ -20968,6 +20954,7 @@ D:$ may be its favorite food.
2096820954 D:ディオが隠れ棲む館の門番であるこの鳥は犬が
2096920955 D:大好物なのかもしれない。
2097020956
20957+#原稿が遅れるとやってくるワニ。
2097120958 N:1044:白ワニ
2097220959 E:White crocodile
2097320960 G:R:w
@@ -20983,7 +20970,6 @@ F:OPEN_DOOR | BASH_DOOR | CAN_SWIM |
2098320970 F:ANIMAL | IM_POIS | RES_WATE
2098420971 D:$This crocodile grew huge in the sewer.
2098520972 D:$For him, an adventurer is only game.
20986-#D:原稿が遅れるとやってくるワニ。
2098720973 D:このワニは下水道の中で巨大に成長した。
2098820974 D:彼にとっては冒険者など獲物にすぎない。
2098920975
@@ -21244,7 +21230,6 @@ W:0:255:0:0:0:0
2124421230 B:HIT:EAT_GOLD:1d3
2124521231 F:UNIQUE | MALE | SPEAK_ALL | UNDEAD |
2124621232 F:FORCE_MAXHP | DROP_CORPSE | WILD_TOWN | WILD_ONLY |
21247-#F:ONLY_ITEM | DROP_90 | DROP_GOOD | FRIENDLY |
2124821233 F:OPEN_DOOR | BASH_DOOR |
2124921234 F:RES_NETH | NO_CONF | NO_SLEEP
2125021235 S:1_IN_4 |
@@ -21260,7 +21245,6 @@ W:0:255:0:0:0:0
2126021245 B:HIT:HURT:1d3
2126121246 F:UNIQUE | MALE | GIANT | SPEAK_ALL | HUMAN |
2126221247 F:FORCE_MAXHP | DROP_CORPSE | WILD_TOWN | WILD_ONLY
21263-#F:ONLY_ITEM | DROP_90 | DROP_GOOD | FRIENDLY |
2126421248 F:OPEN_DOOR | BASH_DOOR | HAS_LITE_1 |
2126521249 F:NO_CONF | NO_SLEEP
2126621250 D:$Brazen faced, this creature is more impudent than a normal troll.
@@ -21295,7 +21279,6 @@ B:HIT:HURT:25d1
2129521279 B:HIT:HURT:30d1
2129621280 F:UNIQUE | MALE | WEIRD_MIND | SPEAK_ALL |
2129721281 F:FORCE_MAXHP | WILD_ALL | DROP_CORPSE
21298-#F:ONLY_ITEM | DROP_1D2 | DROP_GOOD |
2129921282 F:OPEN_DOOR | BASH_DOOR |
2130021283 F:TROLL | IM_COLD | IM_POIS
2130121284 D:$He who laughs at Groo's brains will find there is nothing to laugh
@@ -23175,7 +23158,7 @@ B:SLASH:HURT:2d13
2317523158 B:HIT:HURT:2d15
2317623159 B:TOUCH:TERRIFY
2317723160 F:UNIQUE | FORCE_MAXHP | HUMAN | MALE | EVIL
23178-F:DROP_60 | DROP_90 | ONLY_ITEM | DROP_GOOD
23161+F:DROP_60 | DROP_90 | ONLY_ITEM | DROP_GOOD | SPEAK_DEATH
2317923162 S:1_IN_6 | S_KIN
2318023163 D:$A man without pride who hunts ogres just for money.
2318123164 D:$ This stupid man can not determine his enemy's ability.
@@ -23925,7 +23908,7 @@ B:CLAW:HURT:7d2
2392523908 B:BITE:HURT:8d2
2392623909 F:UNIQUE | FORCE_MAXHP | DROP_CORPSE | DROP_SKELETON | EVIL
2392723910 F:ONLY_ITEM | DROP_90 | DROP_1D2 | DROP_GOOD
23928-F:CAN_FLY | IM_FIRE | HURT_COLD
23911+F:SPEAK_DEATH | CAN_FLY | IM_FIRE | HURT_COLD
2392923912 F:BASH_DOOR | MOVE_BODY | DRAGON | NO_CONF | NO_SLEEP | RIDING
2393023913 S:1_IN_7 | SCARE | BR_FIRE | BA_FIRE
2393123914 D:$This dragon is the most loyal subordinate
@@ -25061,7 +25044,7 @@ B:CRUSH:SHATTER:7d12
2506125044 B:CRUSH:TERRIFY:7d12
2506225045 F:UNIQUE | FORCE_MAXHP | ANIMAL | POWERFUL | MOVE_BODY | EVIL
2506325046 F:NO_CONF | NO_SLEEP | NO_FEAR | IM_ELEC | RES_GRAV | BASH_DOOR
25064-F:DROP_GOOD | DROP_2D2 | ONLY_ITEM
25047+F:DROP_GOOD | DROP_2D2 | ONLY_ITEM | SPEAK_DEATH
2506525048 S:1_IN_6 | BA_ELEC | BR_GRAV | TELE_AWAY
2506625049 D:$It is very gentle when its head is stepped on,
2506725050 D:$ but it gets angry when a stake is driven into its ass.
--- a/lib/file/mondeath.txt
+++ b/lib/file/mondeath.txt
@@ -26,6 +26,9 @@ says, 'My God, Please visit a punishment upon this unrighteous sinner!'
2626 N:780:Vlad Dracula, Prince of Darkness
2727 says, 'Faugh, I'll be back...so long as human psyche has a blackness. Ho-ho.'
2828
29+N:815:Unmaker
30+sprinkled the remaining incense from Logrus!
31+
2932 N:873:Combat-Echizen
3033 says shiftlessly, 'Oh. No.'
3134
@@ -47,15 +50,27 @@ shouts, 'JuliaAAAAAAA!!!'
4750 N:1004:Pip, the Braver from Another World
4851 is killed by a cruel venturer. Go to 14.
4952
53+N:1013:Rolento
54+blew himself up with grenades!
55+
5056 N:1018:Raou
5157 points at himself and shouts, 'I finished my life with no regrets!'
5258
5359 N:1063:lousy, the King of louses
5460 says, 'Ah, Hengband is too difficult!'
5561
62+N:1164:Senior, the nameless member of Demon Slayer Corps
63+'s body is chopped into dice by your fighting spirit!
64+
65+N:1203:Mirmulnir, the vanguard of Alduin
66+screams, 'Dov@hkiin! No!!'
67+
5668 N:1240:Yamato, the sword master
5769 's editor says, 'Believe that Yamato's bravery will save the world...! Thank you for reading!'
5870
71+N:1268:Raphael, the Big Raven
72+became a constellation!
73+
5974 N:1291:Diavolo
6075 says, 'Don't get close to me Ahhhhhhh!!!!!!'
6176
--- a/lib/file/mondeath_j.txt
+++ b/lib/file/mondeath_j.txt
@@ -26,6 +26,9 @@ N:769:Raphael, the Messenger
2626 N:780:Vlad Dracula, Prince of Darkness
2727 「フフフ、私はまた甦るだろう…人間の心に暗黒がある限り。ハハハハ!」
2828
29+N:815:混沌
30+は辺りにログルスの残り香を撒き散らした!
31+
2932 N:873:Combat-Echizen, SEKKAKUDAKARA
3033 「おーのー。」
3134
@@ -47,6 +50,9 @@ N:936:Kenshirou of hokuto
4750 N:1004:Pip, the Braver from Another World
4851 は無慈悲な冒険者によって殺されてしまった。14へ行け。
4952
53+N:1013:『ロレント』
54+は手榴弾を抱えて自爆した!
55+
5056 N:1018:Raou
5157 は自分の胸の秘孔を突いた!「我が生涯に一片の悔いなし!」
5258
@@ -74,9 +80,18 @@ N:1106:光の堕天使『エミリオ・ミハイロフ』
7480 N:1123:巴流『葦名弦一郎』
7581 「あし…な……」
7682
83+N:1164:鬼殺隊の『先輩』
84+の身体はあなたの闘気でサイコロ状に切り刻まれた!
85+
86+N:1203:アルドゥインの尖兵『ミルムルニル』
87+「ドヴ@ーキン、やめろぉ!」
88+
7789 N:1240:ソードマスター『ヤマト』
7890 の勇気が世界を救うと信じて…! ご愛読ありがとうございました!
7991
92+N:1268:『ビッグキューちゃん』
93+はお星さまになった!
94+
8095 N:1291:『ディアボロ』
8196 「オレのそばに近寄るなああーーーーーーーーッ!!!!!!」
8297
--- a/src/flavor/named-item-describer.cpp
+++ b/src/flavor/named-item-describer.cpp
@@ -58,7 +58,7 @@ static void set_base_name(flavor_type *flavor_ptr)
5858 return;
5959 }
6060
61- flavor_ptr->basenm = (flavor_ptr->known && (flavor_ptr->o_ptr->fixed_artifact_idx != 0) && !(flavor_ptr->mode & OD_BASE_NAME)) ? a_info[flavor_ptr->o_ptr->fixed_artifact_idx].name.c_str() : flavor_ptr->kindname;
61+ flavor_ptr->basenm = (flavor_ptr->known && (flavor_ptr->o_ptr->fixed_artifact_idx != 0) && !any_bits(flavor_ptr->mode, OD_BASE_NAME)) ? a_info[flavor_ptr->o_ptr->fixed_artifact_idx].name.c_str() : flavor_ptr->kindname;
6262 }
6363
6464 #ifdef JP
@@ -82,7 +82,7 @@ static void describe_prefix_ja(flavor_type *flavor_ptr)
8282 */
8383 static void describe_artifact_prefix_ja(flavor_type *flavor_ptr)
8484 {
85- if (!flavor_ptr->known || (flavor_ptr->mode & OD_BASE_NAME)) {
85+ if (!flavor_ptr->known || any_bits(flavor_ptr->mode, OD_BASE_NAME)) {
8686 return;
8787 }
8888
@@ -100,7 +100,7 @@ static void describe_artifact_prefix_ja(flavor_type *flavor_ptr)
100100 */
101101 static void describe_artifact_ja(flavor_type *flavor_ptr)
102102 {
103- if (!flavor_ptr->known || (flavor_ptr->mode & OD_BASE_NAME)) {
103+ if (!flavor_ptr->known || any_bits(flavor_ptr->mode, OD_BASE_NAME)) {
104104 return;
105105 }
106106
@@ -204,7 +204,7 @@ static void describe_ego_body_ja(flavor_type *flavor_ptr)
204204 */
205205 static void describe_artifact_body_ja(flavor_type *flavor_ptr)
206206 {
207- if (!flavor_ptr->known || (flavor_ptr->mode & OD_BASE_NAME)) {
207+ if (!flavor_ptr->known || any_bits(flavor_ptr->mode, OD_BASE_NAME)) {
208208 return;
209209 }
210210
@@ -307,7 +307,7 @@ static void describe_basename_en(flavor_type *flavor_ptr)
307307
308308 static void describe_artifact_body_en(flavor_type *flavor_ptr)
309309 {
310- if (!flavor_ptr->known || flavor_ptr->tr_flags.has(TR_FULL_NAME) || (flavor_ptr->mode & OD_BASE_NAME)) {
310+ if (!flavor_ptr->known || flavor_ptr->tr_flags.has(TR_FULL_NAME) || any_bits(flavor_ptr->mode, OD_BASE_NAME)) {
311311 return;
312312 }
313313
@@ -398,7 +398,7 @@ void describe_named_item(PlayerType *player_ptr, flavor_type *flavor_ptr)
398398 #endif
399399
400400 #ifdef JP
401- if (flavor_ptr->o_ptr->is_smith() && !(flavor_ptr->mode & OD_BASE_NAME)) {
401+ if (flavor_ptr->o_ptr->is_smith() && !any_bits(flavor_ptr->mode, OD_BASE_NAME)) {
402402 flavor_ptr->t = object_desc_str(flavor_ptr->t, format("鍛冶師%sの", player_ptr->name));
403403 }
404404
@@ -411,7 +411,7 @@ void describe_named_item(PlayerType *player_ptr, flavor_type *flavor_ptr)
411411 #ifdef JP
412412 describe_artifact_body_ja(flavor_ptr);
413413 #else
414- if (flavor_ptr->o_ptr->is_smith() && !(flavor_ptr->mode & OD_BASE_NAME)) {
414+ if (flavor_ptr->o_ptr->is_smith() && !any_bits(flavor_ptr->mode, OD_BASE_NAME)) {
415415 flavor_ptr->t = object_desc_str(flavor_ptr->t, format(" of %s the Smith", player_ptr->name));
416416 }
417417
--- a/src/main-win.cpp
+++ b/src/main-win.cpp
@@ -2663,12 +2663,15 @@ void create_debug_spoiler(void)
26632663 init_angband(p_ptr, true);
26642664
26652665 switch (output_all_spoilers()) {
2666- case SpoilerOutputResultType::SPOILER_OUTPUT_SUCCESS:
2666+ case SpoilerOutputResultType::SUCCESSFUL:
26672667 fprintf(stdout, "Successfully created a spoiler file.");
2668- case SpoilerOutputResultType::SPOILER_OUTPUT_FAIL_FOPEN:
2668+ break;
2669+ case SpoilerOutputResultType::FILE_OPEN_FAILED:
26692670 fprintf(stderr, "Cannot create spoiler file.");
2670- case SpoilerOutputResultType::SPOILER_OUTPUT_FAIL_FCLOSE:
2671+ break;
2672+ case SpoilerOutputResultType::FILE_CLOSE_FAILED:
26712673 fprintf(stderr, "Cannot close spoiler file.");
2674+ break;
26722675 default:
26732676 break;
26742677 }
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -26,6 +26,7 @@
2626 #include "util/angband-files.h"
2727 #include "util/string-processor.h"
2828 #include "view/display-scores.h"
29+#include "wizard/spoiler-util.h"
2930 #include "wizard/wizard-spoiler.h"
3031 #include <string>
3132
@@ -273,14 +274,14 @@ static bool parse_long_opt(const char *opt)
273274 init_stuff();
274275 init_angband(p_ptr, true);
275276 switch (output_all_spoilers()) {
276- case SpoilerOutputResultType::SPOILER_OUTPUT_SUCCESS:
277+ case SpoilerOutputResultType::SUCCESSFUL:
277278 puts("Successfully created a spoiler file.");
278279 quit(nullptr);
279280 break;
280- case SpoilerOutputResultType::SPOILER_OUTPUT_FAIL_FOPEN:
281+ case SpoilerOutputResultType::FILE_OPEN_FAILED:
281282 quit("Cannot create spoiler file.");
282283 break;
283- case SpoilerOutputResultType::SPOILER_OUTPUT_FAIL_FCLOSE:
284+ case SpoilerOutputResultType::FILE_CLOSE_FAILED:
284285 quit("Cannot close spoiler file.");
285286 break;
286287 default:
--- a/src/monster-floor/monster-move.cpp
+++ b/src/monster-floor/monster-move.cpp
@@ -471,6 +471,36 @@ bool process_monster_movement(PlayerType *player_ptr, turn_flags *turn_flags_ptr
471471 return true;
472472 }
473473
474+static bool can_speak(const monster_race &ap_r_ref, MonsterSpeakType mon_speak_type)
475+{
476+ const auto can_speak_all = ap_r_ref.speak_flags.has(MonsterSpeakType::SPEAK_ALL);
477+ const auto can_speak_specific = ap_r_ref.speak_flags.has(mon_speak_type);
478+ return can_speak_all || can_speak_specific;
479+}
480+
481+static std::string_view get_speak_filename(monster_type *m_ptr)
482+{
483+ const auto &ap_r_ref = r_info[m_ptr->ap_r_idx];
484+ if (monster_fear_remaining(m_ptr) && can_speak(ap_r_ref, MonsterSpeakType::SPEAK_FEAR)) {
485+ return _("monfear_j.txt", "monfear.txt");
486+ }
487+
488+ constexpr auto monspeak_txt(_("monspeak_j.txt", "monspeak.txt"));
489+ if (is_pet(m_ptr) && can_speak(ap_r_ref, MonsterSpeakType::SPEAK_BATTLE)) {
490+ return monspeak_txt;
491+ }
492+
493+ if (is_friendly(m_ptr) && can_speak(ap_r_ref, MonsterSpeakType::SPEAK_FRIEND)) {
494+ return _("monfrien_j.txt", "monfrien.txt");
495+ }
496+
497+ if (can_speak(ap_r_ref, MonsterSpeakType::SPEAK_BATTLE)) {
498+ return monspeak_txt;
499+ }
500+
501+ return "";
502+}
503+
474504 /*!
475505 * @brief モンスターを喋らせたり足音を立てたりする
476506 * @param player_ptr プレイヤーへの参照ポインタ
@@ -486,7 +516,6 @@ void process_speak_sound(PlayerType *player_ptr, MONSTER_IDX m_idx, POSITION oy,
486516 }
487517
488518 auto *m_ptr = &player_ptr->current_floor_ptr->m_list[m_idx];
489- monster_race *ap_r_ptr = &r_info[m_ptr->ap_r_idx];
490519 if (m_ptr->ap_r_idx == MonsterRaceId::CYBER && one_in_(CYBERNOISE) && !m_ptr->ml && (m_ptr->cdis <= MAX_SIGHT)) {
491520 if (disturb_minor) {
492521 disturb(player_ptr, false, false);
@@ -494,31 +523,25 @@ void process_speak_sound(PlayerType *player_ptr, MONSTER_IDX m_idx, POSITION oy,
494523 msg_print(_("重厚な足音が聞こえた。", "You hear heavy steps."));
495524 }
496525
497- if ((ap_r_ptr->speak_flags.has_not(MonsterSpeakType::SPEAK_ALL)) || !aware || !one_in_(SPEAK_CHANCE) || !player_has_los_bold(player_ptr, oy, ox) || !projectable(player_ptr, oy, ox, player_ptr->y, player_ptr->x)) {
526+ auto can_speak = r_info[m_ptr->ap_r_idx].speak_flags.any();
527+ if (!can_speak || !aware || !one_in_(SPEAK_CHANCE) || !player_has_los_bold(player_ptr, oy, ox) || !projectable(player_ptr, oy, ox, player_ptr->y, player_ptr->x)) {
498528 return;
499529 }
500530
501531 GAME_TEXT m_name[MAX_NLEN];
502532 char monmessage[1024];
503- concptr filename;
504-
505533 if (m_ptr->ml) {
506534 monster_desc(player_ptr, m_name, m_ptr, 0);
507535 } else {
508536 strcpy(m_name, _("それ", "It"));
509537 }
510538
511- if (monster_fear_remaining(m_ptr)) {
512- filename = _("monfear_j.txt", "monfear.txt");
513- } else if (is_pet(m_ptr)) {
514- filename = _("monpet_j.txt", "monpet.txt");
515- } else if (is_friendly(m_ptr)) {
516- filename = _("monfrien_j.txt", "monfrien.txt");
517- } else {
518- filename = _("monspeak_j.txt", "monspeak.txt");
539+ auto filename = get_speak_filename(m_ptr);
540+ if (filename.empty()) {
541+ return;
519542 }
520543
521- if (get_rnd_line(filename, enum2i(m_ptr->ap_r_idx), monmessage) == 0) {
544+ if (get_rnd_line(filename.data(), enum2i(m_ptr->ap_r_idx), monmessage) == 0) {
522545 msg_format(_("%^s%s", "%^s %s"), m_name, monmessage);
523546 }
524547 }
--- a/src/monster-floor/monster-runaway.cpp
+++ b/src/monster-floor/monster-runaway.cpp
@@ -27,16 +27,27 @@
2727 #include "view/display-messages.h"
2828
2929 /*!
30- * @brief HPが1/3未満になった有効的なユニークモンスターの逃走処理を行う
30+ * @brief monspeak.txt において、発話ではなく行動のみが描写されているモンスターであるかを調べる
31+ * @param r_idx モンスター種族ID
32+ * @return 会話内容が行動のみのモンスターか否か
33+ */
34+static bool is_acting_monster(const MonsterRaceId r_idx)
35+{
36+ auto is_acting_monster = r_idx == MonsterRaceId::GRIP;
37+ is_acting_monster |= r_idx == MonsterRaceId::WOLF;
38+ is_acting_monster |= r_idx == MonsterRaceId::FANG;
39+ return is_acting_monster;
40+}
41+
42+/*!
43+ * @brief HPが1/3未満になった友好的なユニークモンスターの逃走処理を行う
3144 * @param player_ptr プレイヤーへの参照ポインタ
3245 * @param is_riding_mon 騎乗状態ならばTRUE
3346 * @param m_ptr モンスターへの参照ポインタ
3447 * @param m_name モンスター名称
35- * @param see_m モンスターが視界内にいたらTRUE
3648 */
3749 static void escape_monster(PlayerType *player_ptr, turn_flags *turn_flags_ptr, monster_type *m_ptr, GAME_TEXT *m_name)
3850 {
39- auto *r_ptr = &r_info[m_ptr->r_idx];
4051 if (turn_flags_ptr->is_riding_mon) {
4152 msg_format(_("%sはあなたの束縛から脱出した。", "%^s succeeded to escape from your restriction!"), m_name);
4253 if (process_fall_off_horse(player_ptr, -1, false)) {
@@ -45,7 +56,17 @@ static void escape_monster(PlayerType *player_ptr, turn_flags *turn_flags_ptr, m
4556 }
4657
4758 if (turn_flags_ptr->see_m) {
48- if ((r_ptr->speak_flags.has(MonsterSpeakType::SPEAK_ALL)) && (m_ptr->r_idx != MonsterRaceId::GRIP) && (m_ptr->r_idx != MonsterRaceId::WOLF) && (m_ptr->r_idx != MonsterRaceId::FANG) && player_has_los_bold(player_ptr, m_ptr->fy, m_ptr->fx) && projectable(player_ptr, m_ptr->fy, m_ptr->fx, player_ptr->y, player_ptr->x)) {
59+ const auto flags = {
60+ MonsterSpeakType::SPEAK_ALL,
61+ MonsterSpeakType::SPEAK_BATTLE,
62+ MonsterSpeakType::SPEAK_FEAR,
63+ };
64+
65+ auto speak = r_info[m_ptr->r_idx].speak_flags.has_any_of(flags);
66+ speak &= !is_acting_monster(m_ptr->r_idx);
67+ speak &= player_has_los_bold(player_ptr, m_ptr->fy, m_ptr->fx);
68+ speak &= projectable(player_ptr, m_ptr->fy, m_ptr->fx, player_ptr->y, player_ptr->x);
69+ if (speak) {
4970 msg_format(_("%^s「ピンチだ!退却させてもらう!」", "%^s says 'It is the pinch! I will retreat'."), m_name);
5071 }
5172
--- a/src/monster-floor/special-death-switcher.cpp
+++ b/src/monster-floor/special-death-switcher.cpp
@@ -162,17 +162,6 @@ static void on_dead_dawn(PlayerType *player_ptr, monster_death_type *md_ptr)
162162 summon_self(player_ptr, md_ptr, SUMMON_DAWN, 7, 20, _("新たな戦士が現れた!", "A new warrior steps forth!"));
163163 }
164164
165-static void on_dead_unmaker(PlayerType *player_ptr, monster_death_type *md_ptr)
166-{
167- if (is_seen(player_ptr, md_ptr->m_ptr)) {
168- GAME_TEXT m_name[MAX_NLEN];
169- monster_desc(player_ptr, m_name, md_ptr->m_ptr, MD_NONE);
170- msg_format(_("%sは辺りにログルスの残り香を撒き散らした!", "%^s sprinkled the remaining incense from Logrus!"), m_name);
171- }
172-
173- (void)project(player_ptr, md_ptr->m_idx, 6, md_ptr->md_y, md_ptr->md_x, 100, AttributeType::CHAOS, PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL);
174-}
175-
176165 static void on_dead_sacred_treasures(PlayerType *player_ptr, monster_death_type *md_ptr)
177166 {
178167 if ((player_ptr->ppersonality != PERSONALITY_LAZY) || !md_ptr->drop_chosen_item) {
@@ -259,17 +248,6 @@ static void on_dead_can_angel(PlayerType *player_ptr, monster_death_type *md_ptr
259248 (void)drop_near(player_ptr, q_ptr, -1, md_ptr->md_y, md_ptr->md_x);
260249 }
261250
262-static void on_dead_rolento(PlayerType *player_ptr, monster_death_type *md_ptr)
263-{
264- if (is_seen(player_ptr, md_ptr->m_ptr)) {
265- GAME_TEXT m_name[MAX_NLEN];
266- monster_desc(player_ptr, m_name, md_ptr->m_ptr, MD_NONE);
267- msg_format(_("%sは手榴弾を抱えて自爆した!", "%^s blew himself up with grenades!"), m_name);
268- }
269-
270- (void)project(player_ptr, md_ptr->m_idx, 3, md_ptr->md_y, md_ptr->md_x, damroll(20, 10), AttributeType::FIRE, PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL);
271-}
272-
273251 static void on_dead_aqua_illusion(PlayerType *player_ptr, monster_death_type *md_ptr)
274252 {
275253 if (player_ptr->current_floor_ptr->inside_arena || player_ptr->phase_out) {
@@ -305,28 +283,6 @@ static void on_dead_totem_moai(PlayerType *player_ptr, monster_death_type *md_pt
305283 summon_self(player_ptr, md_ptr, SUMMON_TOTEM_MOAI, 8, 5, _("新たなモアイが現れた!", "A new moai steps forth!"));
306284 }
307285
308-static void on_dead_demon_slayer_senior(PlayerType *player_ptr, monster_death_type *md_ptr)
309-{
310- if (!is_seen(player_ptr, md_ptr->m_ptr)) {
311- return;
312- }
313-
314- GAME_TEXT m_name[MAX_NLEN];
315- monster_desc(player_ptr, m_name, md_ptr->m_ptr, MD_NONE);
316- msg_format(_("あなたの闘気が%sの身体をサイコロ状に切り刻んだ!", "Your fighting spirit chopped %^s's body into dice!"), m_name);
317-}
318-
319-static void on_dead_mirmulnir(PlayerType *player_ptr, monster_death_type *md_ptr)
320-{
321- if (!is_seen(player_ptr, md_ptr->m_ptr)) {
322- return;
323- }
324-
325- GAME_TEXT m_name[MAX_NLEN];
326- monster_desc(player_ptr, m_name, md_ptr->m_ptr, MD_NONE);
327- msg_format(_("%s「ドヴ@ーキン、やめろぉ!」", "%^s says, 'Dov@hkiin! No!!'"), m_name);
328-}
329-
330286 static void on_dead_dragon_centipede(PlayerType *player_ptr, monster_death_type *md_ptr)
331287 {
332288 if (player_ptr->current_floor_ptr->inside_arena || player_ptr->phase_out) {
@@ -355,21 +311,6 @@ static void on_dead_dragon_centipede(PlayerType *player_ptr, monster_death_type
355311 }
356312 }
357313
358-/*!
359- * @brief ビッグキューちゃん撃破時メッセージ
360- * @todo 死亡時の特殊メッセージを表示するだけの処理を複数作るなら、switch/case文に分けられるように汎用化すること
361- */
362-static void on_dead_big_raven(PlayerType *player_ptr, monster_death_type *md_ptr)
363-{
364- if (!is_seen(player_ptr, md_ptr->m_ptr)) {
365- return;
366- }
367-
368- GAME_TEXT m_name[MAX_NLEN];
369- monster_desc(player_ptr, m_name, md_ptr->m_ptr, MD_NONE);
370- msg_format(_("%sはお星さまになった!", "%^s became a constellation!"), m_name);
371-}
372-
373314 /*
374315 * @brief 装備品の生成を試みる
375316 * @param player_ptr プレイヤーへの参照ポインタ
@@ -603,7 +544,7 @@ void switch_special_death(PlayerType *player_ptr, monster_death_type *md_ptr, At
603544 on_dead_dawn(player_ptr, md_ptr);
604545 return;
605546 case MonsterRaceId::UNMAKER:
606- on_dead_unmaker(player_ptr, md_ptr);
547+ (void)project(player_ptr, md_ptr->m_idx, 6, md_ptr->md_y, md_ptr->md_x, 100, AttributeType::CHAOS, PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL);
607548 break;
608549 case MonsterRaceId::UNICORN_ORD:
609550 case MonsterRaceId::MORGOTH:
@@ -621,7 +562,7 @@ void switch_special_death(PlayerType *player_ptr, monster_death_type *md_ptr, At
621562 on_dead_can_angel(player_ptr, md_ptr);
622563 return;
623564 case MonsterRaceId::ROLENTO:
624- on_dead_rolento(player_ptr, md_ptr);
565+ (void)project(player_ptr, md_ptr->m_idx, 3, md_ptr->md_y, md_ptr->md_x, damroll(20, 10), AttributeType::FIRE, PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL);
625566 return;
626567 case MonsterRaceId::MIDDLE_AQUA_FIRST:
627568 case MonsterRaceId::LARGE_AQUA_FIRST:
@@ -634,12 +575,6 @@ void switch_special_death(PlayerType *player_ptr, monster_death_type *md_ptr, At
634575 case MonsterRaceId::TOTEM_MOAI:
635576 on_dead_totem_moai(player_ptr, md_ptr);
636577 return;
637- case MonsterRaceId::DEMON_SLAYER_SENIOR:
638- on_dead_demon_slayer_senior(player_ptr, md_ptr);
639- return;
640- case MonsterRaceId::MIRMULNIR:
641- on_dead_mirmulnir(player_ptr, md_ptr);
642- return;
643578 case MonsterRaceId::DRAGON_CENTIPEDE:
644579 case MonsterRaceId::DRAGON_WORM:
645580 on_dead_dragon_centipede(player_ptr, md_ptr);
@@ -647,9 +582,6 @@ void switch_special_death(PlayerType *player_ptr, monster_death_type *md_ptr, At
647582 case MonsterRaceId::CAIT_SITH:
648583 drop_specific_item_on_dead(player_ptr, md_ptr, kind_is_boots);
649584 return;
650- case MonsterRaceId::BIG_RAVEN:
651- on_dead_big_raven(player_ptr, md_ptr);
652- return;
653585 case MonsterRaceId::YENDOR_WIZARD_1:
654586 on_dead_random_artifact(player_ptr, md_ptr, kind_is_amulet);
655587 return;
--- a/src/monster-race/race-indice-types.h
+++ b/src/monster-race/race-indice-types.h
@@ -165,7 +165,6 @@ enum class MonsterRaceId : int16_t {
165165 ULT_BEHOLDER = 1185,
166166 G_TITAN = 1187,
167167 WYRM_COLOURS = 1198,
168- MIRMULNIR = 1203,
169168 ALDUIN = 1209,
170169 FOLLOWER_WARRIOR = 1210,
171170 FOLLOWER_MAGE = 1211,
@@ -181,7 +180,6 @@ enum class MonsterRaceId : int16_t {
181180 DRAGON_CENTIPEDE = 1257,
182181 CAIT_SITH = 1262,
183182 SHIVA_BOOTS = 1264,
184- BIG_RAVEN = 1268,
185183 YENDOR_WIZARD_1 = 1284,
186184 YENDOR_WIZARD_2 = 1285,
187185 DOPPIO = 1290,
--- a/src/monster/monster-damage.cpp
+++ b/src/monster/monster-damage.cpp
@@ -335,7 +335,7 @@ void MonsterDamageProcessor::dying_scream(GAME_TEXT *m_name)
335335 {
336336 auto *m_ptr = &this->player_ptr->current_floor_ptr->m_list[this->m_idx];
337337 auto *r_ptr = real_r_ptr(m_ptr);
338- if (r_ptr->speak_flags.has_not(MonsterSpeakType::SPEAK_ALL)) {
338+ if (r_ptr->speak_flags.has_none_of({ MonsterSpeakType::SPEAK_ALL, MonsterSpeakType::SPEAK_DEATH })) {
339339 return;
340340 }
341341
--- a/src/system/angband-version.h
+++ b/src/system/angband-version.h
@@ -23,7 +23,7 @@ constexpr std::string_view ROOT_VARIANT_NAME("Hengband");
2323 #define H_VER_MAJOR 3 //!< ゲームのバージョン定義(メジャー番号)
2424 #define H_VER_MINOR 0 //!< ゲームのバージョン定義(マイナー番号)
2525 #define H_VER_PATCH 0 //!< ゲームのバージョン定義(パッチ番号)
26-#define H_VER_EXTRA 63 //!< ゲームのバージョン定義(エクストラ番号)
26+#define H_VER_EXTRA 64 //!< ゲームのバージョン定義(エクストラ番号)
2727
2828 /*!
2929 * @brief セーブファイルのバージョン(3.0.0から導入)
--- a/src/target/projection-path-calculator.h
+++ b/src/target/projection-path-calculator.h
@@ -9,7 +9,7 @@ class projection_path {
99 public:
1010 using const_iterator = std::vector<std::pair<int, int>>::const_iterator;
1111
12- projection_path(PlayerType *player_ptr, int range, int y1, int x1, int y2, int x2, BIT_FLAGS flg);
12+ projection_path(PlayerType *player_ptr, POSITION range, POSITION y1, POSITION x1, POSITION y2, POSITION x2, BIT_FLAGS flag);
1313 const_iterator begin() const;
1414 const_iterator end() const;
1515 const std::pair<int, int> &front() const;
--- a/src/wizard/fixed-artifacts-spoiler.cpp
+++ b/src/wizard/fixed-artifacts-spoiler.cpp
@@ -154,7 +154,7 @@ SpoilerOutputResultType spoil_fixed_artifact(concptr fname)
154154 path_build(buf, sizeof(buf), ANGBAND_DIR_USER, fname);
155155 spoiler_file = angband_fopen(buf, "w");
156156 if (!spoiler_file) {
157- return SpoilerOutputResultType::SPOILER_OUTPUT_FAIL_FOPEN;
157+ return SpoilerOutputResultType::FILE_OPEN_FAILED;
158158 }
159159
160160 print_header();
@@ -183,6 +183,6 @@ SpoilerOutputResultType spoil_fixed_artifact(concptr fname)
183183 }
184184 }
185185
186- return ferror(spoiler_file) || angband_fclose(spoiler_file) ? SpoilerOutputResultType::SPOILER_OUTPUT_FAIL_FCLOSE
187- : SpoilerOutputResultType::SPOILER_OUTPUT_SUCCESS;
186+ return ferror(spoiler_file) || angband_fclose(spoiler_file) ? SpoilerOutputResultType::FILE_CLOSE_FAILED
187+ : SpoilerOutputResultType::SUCCESSFUL;
188188 }
--- a/src/wizard/items-spoiler.cpp
+++ b/src/wizard/items-spoiler.cpp
@@ -95,7 +95,7 @@ SpoilerOutputResultType spoil_obj_desc(concptr fname)
9595 path_build(buf, sizeof(buf), ANGBAND_DIR_USER, fname);
9696 spoiler_file = angband_fopen(buf, "w");
9797 if (!spoiler_file) {
98- return SpoilerOutputResultType::SPOILER_OUTPUT_FAIL_FOPEN;
98+ return SpoilerOutputResultType::FILE_OPEN_FAILED;
9999 }
100100
101101 char title[200];
@@ -139,6 +139,6 @@ SpoilerOutputResultType spoil_obj_desc(concptr fname)
139139 }
140140 }
141141
142- return ferror(spoiler_file) || angband_fclose(spoiler_file) ? SpoilerOutputResultType::SPOILER_OUTPUT_FAIL_FCLOSE
143- : SpoilerOutputResultType::SPOILER_OUTPUT_SUCCESS;
142+ return ferror(spoiler_file) || angband_fclose(spoiler_file) ? SpoilerOutputResultType::FILE_CLOSE_FAILED
143+ : SpoilerOutputResultType::SUCCESSFUL;
144144 }
--- a/src/wizard/monster-info-spoiler.cpp
+++ b/src/wizard/monster-info-spoiler.cpp
@@ -87,7 +87,7 @@ SpoilerOutputResultType spoil_mon_desc(concptr fname, std::function<bool(const m
8787 path_build(buf, sizeof(buf), ANGBAND_DIR_USER, fname);
8888 spoiler_file = angband_fopen(buf, "w");
8989 if (!spoiler_file) {
90- return SpoilerOutputResultType::SPOILER_OUTPUT_FAIL_FOPEN;
90+ return SpoilerOutputResultType::FILE_OPEN_FAILED;
9191 }
9292
9393 char title[200];
@@ -160,8 +160,8 @@ SpoilerOutputResultType spoil_mon_desc(concptr fname, std::function<bool(const m
160160 }
161161
162162 fprintf(spoiler_file, "\n");
163- return ferror(spoiler_file) || angband_fclose(spoiler_file) ? SpoilerOutputResultType::SPOILER_OUTPUT_FAIL_FCLOSE
164- : SpoilerOutputResultType::SPOILER_OUTPUT_SUCCESS;
163+ return ferror(spoiler_file) || angband_fclose(spoiler_file) ? SpoilerOutputResultType::FILE_CLOSE_FAILED
164+ : SpoilerOutputResultType::SUCCESSFUL;
165165 }
166166
167167 /*!
@@ -188,7 +188,7 @@ SpoilerOutputResultType spoil_mon_info(concptr fname)
188188 path_build(buf, sizeof(buf), ANGBAND_DIR_USER, fname);
189189 spoiler_file = angband_fopen(buf, "w");
190190 if (!spoiler_file) {
191- return SpoilerOutputResultType::SPOILER_OUTPUT_FAIL_FOPEN;
191+ return SpoilerOutputResultType::FILE_OPEN_FAILED;
192192 }
193193
194194 char title[200];
@@ -249,6 +249,6 @@ SpoilerOutputResultType spoil_mon_info(concptr fname)
249249 spoil_out(nullptr);
250250 }
251251
252- return ferror(spoiler_file) || angband_fclose(spoiler_file) ? SpoilerOutputResultType::SPOILER_OUTPUT_FAIL_FCLOSE
253- : SpoilerOutputResultType::SPOILER_OUTPUT_SUCCESS;
252+ return ferror(spoiler_file) || angband_fclose(spoiler_file) ? SpoilerOutputResultType::FILE_CLOSE_FAILED
253+ : SpoilerOutputResultType::SUCCESSFUL;
254254 }
--- a/src/wizard/spoiler-util.h
+++ b/src/wizard/spoiler-util.h
@@ -10,10 +10,10 @@
1010 #define N_ELEMENTS(a) (sizeof(a) / sizeof((a)[0]))
1111
1212 enum class SpoilerOutputResultType {
13- SPOILER_OUTPUT_CANCEL,
14- SPOILER_OUTPUT_SUCCESS,
15- SPOILER_OUTPUT_FAIL_FOPEN,
16- SPOILER_OUTPUT_FAIL_FCLOSE
13+ CANCELED,
14+ SUCCESSFUL,
15+ FILE_OPEN_FAILED,
16+ FILE_CLOSE_FAILED,
1717 };
1818
1919 /* A special type used just for deailing with pvals */
--- a/src/wizard/wizard-spoiler.cpp
+++ b/src/wizard/wizard-spoiler.cpp
@@ -46,6 +46,15 @@
4646 #include <set>
4747 #include <string>
4848
49+static constexpr std::array<std::string_view, 6> wiz_spell_stat = { {
50+ _("腕力", "STR"),
51+ _("知能", "INT"),
52+ _("賢さ", "WIS"),
53+ _("器用さ", "DEX"),
54+ _("耐久力", "CON"),
55+ _("魅力", "CHR"),
56+} };
57+
4958 /**
5059 * @brief 進化ツリーの一番根元となるモンスターのIDのリストを取得する
5160 *
@@ -92,7 +101,7 @@ static SpoilerOutputResultType spoil_mon_evol(concptr fname)
92101 path_build(buf, sizeof buf, ANGBAND_DIR_USER, fname);
93102 spoiler_file = angband_fopen(buf, "w");
94103 if (!spoiler_file) {
95- return SpoilerOutputResultType::SPOILER_OUTPUT_FAIL_FOPEN;
104+ return SpoilerOutputResultType::FILE_OPEN_FAILED;
96105 }
97106
98107 char title[200];
@@ -117,65 +126,56 @@ static SpoilerOutputResultType spoil_mon_evol(concptr fname)
117126 fputc('\n', spoiler_file);
118127 }
119128
120- return ferror(spoiler_file) || angband_fclose(spoiler_file) ? SpoilerOutputResultType::SPOILER_OUTPUT_FAIL_FCLOSE
121- : SpoilerOutputResultType::SPOILER_OUTPUT_SUCCESS;
129+ return ferror(spoiler_file) || angband_fclose(spoiler_file) ? SpoilerOutputResultType::FILE_CLOSE_FAILED
130+ : SpoilerOutputResultType::SUCCESSFUL;
122131 }
123132
124-SpoilerOutputResultType spoil_categorized_mon_desc()
133+static SpoilerOutputResultType spoil_categorized_mon_desc()
125134 {
126135 auto status = spoil_mon_desc("mon-desc-ridable.txt", [](const monster_race *r_ptr) { return any_bits(r_ptr->flags7, RF7_RIDING); });
127- if (status == SpoilerOutputResultType::SPOILER_OUTPUT_SUCCESS) {
136+ if (status == SpoilerOutputResultType::SUCCESSFUL) {
128137 status = spoil_mon_desc("mon-desc-wildonly.txt", [](const monster_race *r_ptr) { return r_ptr->wilderness_flags.has(MonsterWildernessType::WILD_ONLY); });
129138 }
130139
131- if (status == SpoilerOutputResultType::SPOILER_OUTPUT_SUCCESS) {
140+ if (status == SpoilerOutputResultType::SUCCESSFUL) {
132141 status = spoil_mon_desc("mon-desc-town.txt", [](const monster_race *r_ptr) { return r_ptr->wilderness_flags.has(MonsterWildernessType::WILD_TOWN); });
133142 }
134143
135- if (status == SpoilerOutputResultType::SPOILER_OUTPUT_SUCCESS) {
144+ if (status == SpoilerOutputResultType::SUCCESSFUL) {
136145 status = spoil_mon_desc("mon-desc-shore.txt", [](const monster_race *r_ptr) { return r_ptr->wilderness_flags.has(MonsterWildernessType::WILD_SHORE); });
137146 }
138147
139- if (status == SpoilerOutputResultType::SPOILER_OUTPUT_SUCCESS) {
148+ if (status == SpoilerOutputResultType::SUCCESSFUL) {
140149 status = spoil_mon_desc("mon-desc-ocean.txt", [](const monster_race *r_ptr) { return r_ptr->wilderness_flags.has(MonsterWildernessType::WILD_OCEAN); });
141150 }
142151
143- if (status == SpoilerOutputResultType::SPOILER_OUTPUT_SUCCESS) {
152+ if (status == SpoilerOutputResultType::SUCCESSFUL) {
144153 status = spoil_mon_desc("mon-desc-waste.txt", [](const monster_race *r_ptr) { return r_ptr->wilderness_flags.has(MonsterWildernessType::WILD_WASTE); });
145154 }
146155
147- if (status == SpoilerOutputResultType::SPOILER_OUTPUT_SUCCESS) {
156+ if (status == SpoilerOutputResultType::SUCCESSFUL) {
148157 status = spoil_mon_desc("mon-desc-wood.txt", [](const monster_race *r_ptr) { return r_ptr->wilderness_flags.has(MonsterWildernessType::WILD_WOOD); });
149158 }
150159
151- if (status == SpoilerOutputResultType::SPOILER_OUTPUT_SUCCESS) {
160+ if (status == SpoilerOutputResultType::SUCCESSFUL) {
152161 status = spoil_mon_desc("mon-desc-volcano.txt", [](const monster_race *r_ptr) { return r_ptr->wilderness_flags.has(MonsterWildernessType::WILD_VOLCANO); });
153162 }
154163
155- if (status == SpoilerOutputResultType::SPOILER_OUTPUT_SUCCESS) {
164+ if (status == SpoilerOutputResultType::SUCCESSFUL) {
156165 status = spoil_mon_desc("mon-desc-mountain.txt", [](const monster_race *r_ptr) { return r_ptr->wilderness_flags.has(MonsterWildernessType::WILD_MOUNTAIN); });
157166 }
158167
159- if (status == SpoilerOutputResultType::SPOILER_OUTPUT_SUCCESS) {
168+ if (status == SpoilerOutputResultType::SUCCESSFUL) {
160169 status = spoil_mon_desc("mon-desc-grass.txt", [](const monster_race *r_ptr) { return r_ptr->wilderness_flags.has(MonsterWildernessType::WILD_GRASS); });
161170 }
162171
163- if (status == SpoilerOutputResultType::SPOILER_OUTPUT_SUCCESS) {
172+ if (status == SpoilerOutputResultType::SUCCESSFUL) {
164173 status = spoil_mon_desc("mon-desc-wildall.txt", [](const monster_race *r_ptr) { return r_ptr->wilderness_flags.has(MonsterWildernessType::WILD_ALL); });
165174 }
166175
167176 return status;
168177 }
169178
170-const std::array<const std::string_view, 6> wiz_spell_stat = { {
171- _("腕力", "STR"),
172- _("知能", "INT"),
173- _("賢さ", "WIS"),
174- _("器用さ", "DEX"),
175- _("耐久力", "CON"),
176- _("魅力", "CHR"),
177-} };
178-
179179 static SpoilerOutputResultType spoil_player_spell(concptr fname)
180180 {
181181 char buf[1024];
@@ -183,7 +183,7 @@ static SpoilerOutputResultType spoil_player_spell(concptr fname)
183183 path_build(buf, sizeof buf, ANGBAND_DIR_USER, fname);
184184 spoiler_file = angband_fopen(buf, "w");
185185 if (!spoiler_file) {
186- return SpoilerOutputResultType::SPOILER_OUTPUT_FAIL_FOPEN;
186+ return SpoilerOutputResultType::FILE_OPEN_FAILED;
187187 }
188188
189189 char title[200];
@@ -234,8 +234,8 @@ static SpoilerOutputResultType spoil_player_spell(concptr fname)
234234 }
235235 }
236236
237- return ferror(spoiler_file) || angband_fclose(spoiler_file) ? SpoilerOutputResultType::SPOILER_OUTPUT_FAIL_FCLOSE
238- : SpoilerOutputResultType::SPOILER_OUTPUT_SUCCESS;
237+ return ferror(spoiler_file) || angband_fclose(spoiler_file) ? SpoilerOutputResultType::FILE_CLOSE_FAILED
238+ : SpoilerOutputResultType::SUCCESSFUL;
239239 }
240240
241241 /*!
@@ -246,7 +246,7 @@ void exe_output_spoilers(void)
246246 {
247247 screen_save();
248248 while (true) {
249- auto status = SpoilerOutputResultType::SPOILER_OUTPUT_CANCEL;
249+ auto status = SpoilerOutputResultType::CANCELED;
250250 term_clear();
251251 prt("Create a spoiler file.", 2, 0);
252252 prt("(1) Brief Object Info (obj-desc.txt)", 5, 5);
@@ -288,16 +288,16 @@ void exe_output_spoilers(void)
288288 }
289289
290290 switch (status) {
291- case SpoilerOutputResultType::SPOILER_OUTPUT_FAIL_FOPEN:
291+ case SpoilerOutputResultType::FILE_OPEN_FAILED:
292292 msg_print("Cannot create spoiler file.");
293293 break;
294- case SpoilerOutputResultType::SPOILER_OUTPUT_FAIL_FCLOSE:
294+ case SpoilerOutputResultType::FILE_CLOSE_FAILED:
295295 msg_print("Cannot close spoiler file.");
296296 break;
297- case SpoilerOutputResultType::SPOILER_OUTPUT_SUCCESS:
297+ case SpoilerOutputResultType::SUCCESSFUL:
298298 msg_print("Successfully created a spoiler file.");
299299 break;
300- case SpoilerOutputResultType::SPOILER_OUTPUT_CANCEL:
300+ case SpoilerOutputResultType::CANCELED:
301301 break;
302302 }
303303 msg_erase();
@@ -312,34 +312,34 @@ void exe_output_spoilers(void)
312312 SpoilerOutputResultType output_all_spoilers(void)
313313 {
314314 auto status = spoil_obj_desc("obj-desc.txt");
315- if (status != SpoilerOutputResultType::SPOILER_OUTPUT_SUCCESS) {
315+ if (status != SpoilerOutputResultType::SUCCESSFUL) {
316316 return status;
317317 }
318318
319319 status = spoil_fixed_artifact("artifact.txt");
320- if (status != SpoilerOutputResultType::SPOILER_OUTPUT_SUCCESS) {
320+ if (status != SpoilerOutputResultType::SUCCESSFUL) {
321321 return status;
322322 }
323323
324324 status = spoil_mon_desc("mon-desc.txt");
325- if (status != SpoilerOutputResultType::SPOILER_OUTPUT_SUCCESS) {
325+ if (status != SpoilerOutputResultType::SUCCESSFUL) {
326326 return status;
327327 }
328328
329329 status = spoil_categorized_mon_desc();
330- if (status != SpoilerOutputResultType::SPOILER_OUTPUT_SUCCESS) {
330+ if (status != SpoilerOutputResultType::SUCCESSFUL) {
331331 return status;
332332 }
333333
334334 status = spoil_mon_info("mon-info.txt");
335- if (status != SpoilerOutputResultType::SPOILER_OUTPUT_SUCCESS) {
335+ if (status != SpoilerOutputResultType::SUCCESSFUL) {
336336 return status;
337337 }
338338
339339 status = spoil_mon_evol("mon-evol.txt");
340- if (status != SpoilerOutputResultType::SPOILER_OUTPUT_SUCCESS) {
340+ if (status != SpoilerOutputResultType::SUCCESSFUL) {
341341 return status;
342342 }
343343
344- return SpoilerOutputResultType::SPOILER_OUTPUT_SUCCESS;
344+ return SpoilerOutputResultType::SUCCESSFUL;
345345 }
--- a/src/wizard/wizard-spoiler.h
+++ b/src/wizard/wizard-spoiler.h
@@ -1,7 +1,7 @@
11 #pragma once
22
33 #include "system/angband.h"
4-#include "wizard/spoiler-util.h"
54
5+enum class SpoilerOutputResultType;
66 void exe_output_spoilers(void);
77 SpoilerOutputResultType output_all_spoilers(void);
Show on old repository browser