• 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

修订版19c1095adfb20fe9b69f02105ee80ebc0c3c10ae (tree)
时间2022-11-26 05:05:32
作者Eric Branlund <ebranlund@fast...>
CommiterEric Branlund

Log Message

Merge branch 'develop' into macos-develop

更改概述

差异

--- a/src/artifact/random-art-generator.cpp
+++ b/src/artifact/random-art-generator.cpp
@@ -419,7 +419,7 @@ static void generate_unnatural_random_artifact(
419419 msg_format_wizard(player_ptr, CHEAT_OBJECT,
420420 _("パワー %d で 価値%ld のランダムアーティファクト生成 バイアスは「%s」", "Random artifact generated - Power:%d Value:%d Bias:%s."), max_powers,
421421 total_flags, artifact_bias_name[o_ptr->artifact_bias]);
422- set_bits(player_ptr->window_flags, PW_INVEN | PW_EQUIP | PW_FLOOR_ITEM_LIST);
422+ set_bits(player_ptr->window_flags, PW_INVEN | PW_EQUIP | PW_FLOOR_ITEM_LIST | PW_FOUND_ITEM_LIST);
423423 }
424424
425425 /*!
--- a/src/artifact/random-art-pval-investor.cpp
+++ b/src/artifact/random-art-pval-investor.cpp
@@ -156,7 +156,7 @@ void random_plus(ItemEntity *o_ptr)
156156 return;
157157 }
158158
159- int this_type = o_ptr->is_weapon_ammo() ? 23 : 19;
159+ const auto this_type = o_ptr->is_weapon_ammo() ? 23 : 19;
160160 switch (randint1(this_type)) {
161161 case 1:
162162 case 2:
--- a/src/cmd-item/cmd-eat.cpp
+++ b/src/cmd-item/cmd-eat.cpp
@@ -204,7 +204,7 @@ bool exe_eat_charge_of_magic_device(PlayerType *player_ptr, ItemEntity *o_ptr, I
204204 }
205205
206206 if (item >= 0) {
207- inven_item_charges(player_ptr, item);
207+ inven_item_charges(player_ptr->inventory_list[item]);
208208 } else {
209209 floor_item_charges(player_ptr->current_floor_ptr, 0 - item);
210210 }
--- a/src/cmd-item/cmd-item.cpp
+++ b/src/cmd-item/cmd-item.cpp
@@ -195,7 +195,7 @@ void do_cmd_uninscribe(PlayerType *player_ptr)
195195 msg_print(_("銘を消した。", "Inscription removed."));
196196 o_ptr->inscription = 0;
197197 set_bits(player_ptr->update, PU_COMBINE);
198- set_bits(player_ptr->window_flags, PW_INVEN | PW_EQUIP | PW_FLOOR_ITEM_LIST);
198+ set_bits(player_ptr->window_flags, PW_INVEN | PW_EQUIP | PW_FLOOR_ITEM_LIST | PW_FOUND_ITEM_LIST);
199199 set_bits(player_ptr->update, PU_BONUS);
200200 }
201201
@@ -227,7 +227,7 @@ void do_cmd_inscribe(PlayerType *player_ptr)
227227 if (get_string(_("銘: ", "Inscription: "), out_val, MAX_INSCRIPTION)) {
228228 o_ptr->inscription = quark_add(out_val);
229229 set_bits(player_ptr->update, PU_COMBINE);
230- set_bits(player_ptr->window_flags, PW_INVEN | PW_EQUIP | PW_FLOOR_ITEM_LIST);
230+ set_bits(player_ptr->window_flags, PW_INVEN | PW_EQUIP | PW_FLOOR_ITEM_LIST | PW_FOUND_ITEM_LIST);
231231 set_bits(player_ptr->update, PU_BONUS);
232232 }
233233 }
--- a/src/core/window-redrawer.cpp
+++ b/src/core/window-redrawer.cpp
@@ -298,4 +298,9 @@ void window_stuff(PlayerType *player_ptr)
298298 // ウィンドウサイズ変更に対応できず。カーソル位置を取る必要がある。
299299 fix_floor_item_list(player_ptr, player_ptr->y, player_ptr->x);
300300 }
301+
302+ if (any_bits(window_flags, PW_FOUND_ITEM_LIST)) {
303+ reset_bits(player_ptr->window_flags, PW_FOUND_ITEM_LIST);
304+ fix_found_item_list(player_ptr);
305+ }
301306 }
--- a/src/core/window-redrawer.h
+++ b/src/core/window-redrawer.h
@@ -18,9 +18,10 @@ enum window_redraw_type {
1818 PW_OBJECT = 1U << 9, /*!<サブウィンドウ描画フラグ: アイテムの知識 / Display object recall */
1919 PW_DUNGEON = 1U << 10, /*!<サブウィンドウ描画フラグ: ダンジョンの地形 / Display dungeon view */
2020 PW_SNAPSHOT = 1U << 11, /*!<サブウィンドウ描画フラグ: 記念写真 / Display snap-shot */
21- PW_FLOOR_ITEM_LIST = 1U << 12, /*!<サブウィンドウ描画フラグ: 床上のアイテム一覧 / Display items at feet */
21+ PW_FLOOR_ITEM_LIST = 1U << 12, /*!<サブウィンドウ描画フラグ: 床上のアイテム一覧 / Display items on grid */
22+ PW_FOUND_ITEM_LIST = 1U << 13, /*!<サブウィンドウ描画フラグ: 発見済みのアイテム一覧 / Display found items*/
2223
23- PW_ALL = (PW_INVEN | PW_EQUIP | PW_SPELL | PW_PLAYER | PW_MONSTER_LIST | PW_MESSAGE | PW_OVERHEAD | PW_MONSTER | PW_OBJECT | PW_DUNGEON | PW_SNAPSHOT | PW_FLOOR_ITEM_LIST),
24+ PW_ALL = (PW_INVEN | PW_EQUIP | PW_SPELL | PW_PLAYER | PW_MONSTER_LIST | PW_MESSAGE | PW_OVERHEAD | PW_MONSTER | PW_OBJECT | PW_DUNGEON | PW_SNAPSHOT | PW_FLOOR_ITEM_LIST | PW_FOUND_ITEM_LIST),
2425 };
2526
2627 // clang-format on
--- a/src/floor/floor-object.cpp
+++ b/src/floor/floor-object.cpp
@@ -234,7 +234,7 @@ void floor_item_increase(PlayerType *player_ptr, INVENTORY_IDX item, ITEM_NUMBER
234234 num -= o_ptr->number;
235235 o_ptr->number += num;
236236
237- set_bits(player_ptr->window_flags, PW_FLOOR_ITEM_LIST);
237+ set_bits(player_ptr->window_flags, PW_FLOOR_ITEM_LIST | PW_FOUND_ITEM_LIST);
238238 }
239239
240240 /*!
@@ -255,7 +255,7 @@ void floor_item_optimize(PlayerType *player_ptr, INVENTORY_IDX item)
255255
256256 delete_object_idx(player_ptr, item);
257257
258- set_bits(player_ptr->window_flags, PW_FLOOR_ITEM_LIST);
258+ set_bits(player_ptr->window_flags, PW_FLOOR_ITEM_LIST | PW_FOUND_ITEM_LIST);
259259 }
260260
261261 /*!
@@ -282,7 +282,7 @@ void delete_object_idx(PlayerType *player_ptr, OBJECT_IDX o_idx)
282282 j_ptr->wipe();
283283 floor_ptr->o_cnt--;
284284
285- set_bits(player_ptr->window_flags, PW_FLOOR_ITEM_LIST);
285+ set_bits(player_ptr->window_flags, PW_FLOOR_ITEM_LIST | PW_FOUND_ITEM_LIST);
286286 }
287287
288288 /*!
@@ -559,7 +559,7 @@ OBJECT_IDX drop_near(PlayerType *player_ptr, ItemEntity *j_ptr, PERCENTAGE chanc
559559 sound(SOUND_DROP);
560560
561561 if (player_bold(player_ptr, by, bx)) {
562- set_bits(player_ptr->window_flags, PW_FLOOR_ITEM_LIST);
562+ set_bits(player_ptr->window_flags, PW_FLOOR_ITEM_LIST | PW_FOUND_ITEM_LIST);
563563 }
564564
565565 if (chance && player_bold(player_ptr, by, bx)) {
--- a/src/grid/grid.cpp
+++ b/src/grid/grid.cpp
@@ -359,6 +359,7 @@ void note_spot(PlayerType *player_ptr, POSITION y, POSITION x)
359359
360360 /* Memorize objects */
361361 o_ptr->marked.set(OmType::FOUND);
362+ player_ptr->window_flags |= PW_FOUND_ITEM_LIST;
362363 }
363364
364365 /* Hack -- memorize grids */
--- a/src/mind/mind-mindcrafter.cpp
+++ b/src/mind/mind-mindcrafter.cpp
@@ -87,7 +87,7 @@ bool psychometry(PlayerType *player_ptr)
8787 o_ptr->marked.set(OmType::TOUCHED);
8888
8989 set_bits(player_ptr->update, PU_COMBINE | PU_REORDER);
90- set_bits(player_ptr->window_flags, PW_INVEN | PW_EQUIP | PW_PLAYER | PW_FLOOR_ITEM_LIST);
90+ set_bits(player_ptr->window_flags, PW_INVEN | PW_EQUIP | PW_PLAYER | PW_FLOOR_ITEM_LIST | PW_FOUND_ITEM_LIST);
9191
9292 bool okay = false;
9393 switch (o_ptr->tval) {
--- a/src/mind/mind-priest.cpp
+++ b/src/mind/mind-priest.cpp
@@ -58,7 +58,7 @@ bool bless_weapon(PlayerType *player_ptr)
5858 set_bits(o_ptr->ident, IDENT_SENSE);
5959 o_ptr->feeling = FEEL_NONE;
6060 set_bits(player_ptr->update, PU_BONUS);
61- set_bits(player_ptr->window_flags, PW_EQUIP | PW_FLOOR_ITEM_LIST);
61+ set_bits(player_ptr->window_flags, PW_EQUIP | PW_FLOOR_ITEM_LIST | PW_FOUND_ITEM_LIST);
6262 }
6363
6464 /*
@@ -132,7 +132,7 @@ bool bless_weapon(PlayerType *player_ptr)
132132 }
133133
134134 set_bits(player_ptr->update, PU_BONUS);
135- set_bits(player_ptr->window_flags, PW_EQUIP | PW_PLAYER | PW_FLOOR_ITEM_LIST);
135+ set_bits(player_ptr->window_flags, PW_EQUIP | PW_PLAYER | PW_FLOOR_ITEM_LIST | PW_FOUND_ITEM_LIST);
136136 calc_android_exp(player_ptr);
137137 return true;
138138 }
--- a/src/monster-floor/monster-object.cpp
+++ b/src/monster-floor/monster-object.cpp
@@ -30,6 +30,7 @@
3030 #include "system/player-type-definition.h"
3131 #include "util/bit-flags-calculator.h"
3232 #include "view/display-messages.h"
33+#include <core/window-redrawer.h>
3334
3435 /*!
3536 * @brief オブジェクトのフラグを更新する
@@ -154,6 +155,7 @@ static void monster_pickup_object(PlayerType *player_ptr, turn_flags *turn_flags
154155 o_ptr->iy = o_ptr->ix = 0;
155156 o_ptr->held_m_idx = m_idx;
156157 m_ptr->hold_o_idx_list.add(player_ptr->current_floor_ptr, this_o_idx);
158+ player_ptr->window_flags |= PW_FOUND_ITEM_LIST;
157159 return;
158160 }
159161
--- a/src/object-enchant/weapon/abstract-weapon-enchanter.cpp
+++ b/src/object-enchant/weapon/abstract-weapon-enchanter.cpp
@@ -32,7 +32,7 @@ void AbstractWeaponEnchanter::give_killing_bonus()
3232 auto tohit2 = static_cast<short>(m_bonus(10, this->level));
3333 auto todam2 = static_cast<short>(m_bonus(10, this->level));
3434
35- if ((this->o_ptr->tval == ItemKindType::BOLT) || (this->o_ptr->tval == ItemKindType::ARROW) || (this->o_ptr->tval == ItemKindType::SHOT)) {
35+ if (this->o_ptr->is_ammo()) {
3636 tohit2 = (tohit2 + 1) / 2;
3737 todam2 = (todam2 + 1) / 2;
3838 }
--- a/src/object-hook/hook-weapon.cpp
+++ b/src/object-hook/hook-weapon.cpp
@@ -16,8 +16,7 @@
1616 */
1717 bool object_is_favorite(PlayerType *player_ptr, const ItemEntity *o_ptr)
1818 {
19- /* Only melee weapons match */
20- if (!(o_ptr->tval == ItemKindType::POLEARM || o_ptr->tval == ItemKindType::SWORD || o_ptr->tval == ItemKindType::DIGGING || o_ptr->tval == ItemKindType::HAFTED)) {
19+ if (!o_ptr->is_melee_weapon()) {
2120 return false;
2221 }
2322
--- a/src/object-use/use-execution.cpp
+++ b/src/object-use/use-execution.cpp
@@ -117,7 +117,7 @@ void ObjectUseEntity::execute()
117117 gain_exp(this->player_ptr, (lev + (this->player_ptr->lev >> 1)) / this->player_ptr->lev);
118118 }
119119
120- set_bits(this->player_ptr->window_flags, PW_INVEN | PW_EQUIP | PW_PLAYER | PW_FLOOR_ITEM_LIST);
120+ set_bits(this->player_ptr->window_flags, PW_INVEN | PW_EQUIP | PW_PLAYER | PW_FLOOR_ITEM_LIST | PW_FOUND_ITEM_LIST);
121121 set_bits(this->player_ptr->update, inventory_flags);
122122 if (!use_charge) {
123123 return;
@@ -136,7 +136,7 @@ void ObjectUseEntity::execute()
136136 }
137137
138138 if (this->item >= 0) {
139- inven_item_charges(this->player_ptr, this->item);
139+ inven_item_charges(this->player_ptr->inventory_list[this->item]);
140140 } else {
141141 floor_item_charges(this->player_ptr->current_floor_ptr, 0 - this->item);
142142 }
--- a/src/object-use/zaprod-execution.cpp
+++ b/src/object-use/zaprod-execution.cpp
@@ -140,7 +140,7 @@ void ObjectZapRodEntity::execute(INVENTORY_IDX item)
140140 gain_exp(this->player_ptr, (lev + (this->player_ptr->lev >> 1)) / this->player_ptr->lev);
141141 }
142142
143- set_bits(this->player_ptr->window_flags, PW_INVEN | PW_EQUIP | PW_PLAYER | PW_FLOOR_ITEM_LIST);
143+ set_bits(this->player_ptr->window_flags, PW_INVEN | PW_EQUIP | PW_PLAYER | PW_FLOOR_ITEM_LIST | PW_FOUND_ITEM_LIST);
144144 }
145145
146146 bool ObjectZapRodEntity::check_can_zap()
--- a/src/object-use/zapwand-execution.cpp
+++ b/src/object-use/zapwand-execution.cpp
@@ -121,11 +121,11 @@ void ObjectZapWandEntity::execute(INVENTORY_IDX item)
121121 gain_exp(this->player_ptr, (lev + (this->player_ptr->lev >> 1)) / this->player_ptr->lev);
122122 }
123123
124- set_bits(this->player_ptr->window_flags, PW_INVEN | PW_EQUIP | PW_PLAYER | PW_FLOOR_ITEM_LIST);
124+ set_bits(this->player_ptr->window_flags, PW_INVEN | PW_EQUIP | PW_PLAYER | PW_FLOOR_ITEM_LIST | PW_FOUND_ITEM_LIST);
125125 set_bits(this->player_ptr->update, inventory_flags);
126126 o_ptr->pval--;
127127 if (item >= 0) {
128- inven_item_charges(this->player_ptr, item);
128+ inven_item_charges(this->player_ptr->inventory_list[item]);
129129 return;
130130 }
131131
--- a/src/object/tval-types.h
+++ b/src/object/tval-types.h
@@ -76,8 +76,6 @@ enum class ItemKindType : short {
7676
7777 #define TV_EQUIP_BEGIN ItemKindType::SHOT
7878 #define TV_EQUIP_END ItemKindType::CARD
79-#define TV_MISSILE_BEGIN ItemKindType::SHOT
80-#define TV_MISSILE_END ItemKindType::BOLT
8179 #define TV_WEARABLE_BEGIN ItemKindType::BOW
8280 #define TV_WEARABLE_END ItemKindType::CARD
8381 #define TV_WEAPON_BEGIN ItemKindType::BOW
--- a/src/perception/object-perception.cpp
+++ b/src/perception/object-perception.cpp
@@ -62,8 +62,7 @@ void object_aware(PlayerType *player_ptr, const ItemEntity *o_ptr)
6262 return;
6363 }
6464
65- // 未鑑定名の無いアイテムは記録しない
66- if (!((o_ptr->tval >= ItemKindType::AMULET && o_ptr->tval <= ItemKindType::POTION) || o_ptr->tval == ItemKindType::FOOD)) {
65+ if (!o_ptr->has_unidentified_name()) {
6766 return;
6867 }
6968
--- a/src/player/player-move.cpp
+++ b/src/player/player-move.cpp
@@ -234,7 +234,7 @@ bool move_player_effect(PlayerType *player_ptr, POSITION ny, POSITION nx, BIT_FL
234234
235235 if (!player_ptr->running) {
236236 // 自動拾い/自動破壊により床上のアイテムリストが変化した可能性があるので表示を更新
237- set_bits(player_ptr->window_flags, PW_FLOOR_ITEM_LIST);
237+ set_bits(player_ptr->window_flags, PW_FLOOR_ITEM_LIST | PW_FOUND_ITEM_LIST);
238238 window_stuff(player_ptr);
239239 }
240240
--- a/src/player/player-status.cpp
+++ b/src/player/player-status.cpp
@@ -333,8 +333,7 @@ static void update_bonuses(PlayerType *player_ptr)
333333 update_ability_scores(player_ptr);
334334 o_ptr = &player_ptr->inventory_list[INVEN_BOW];
335335 if (o_ptr->bi_id) {
336- const BaseitemKey key(o_ptr->tval, o_ptr->sval);
337- player_ptr->tval_ammo = key.get_arrow_kind();
336+ player_ptr->tval_ammo = o_ptr->get_arrow_kind();
338337 player_ptr->num_fire = calc_num_fire(player_ptr, o_ptr);
339338 }
340339
@@ -1048,8 +1047,7 @@ int16_t calc_num_fire(PlayerType *player_ptr, ItemEntity *o_ptr)
10481047 return (int16_t)num;
10491048 }
10501049
1051- const BaseitemKey key(o_ptr->tval, o_ptr->sval);
1052- const auto tval_ammo = key.get_arrow_kind();
1050+ const auto tval_ammo = o_ptr->get_arrow_kind();
10531051 PlayerClass pc(player_ptr);
10541052 if (pc.equals(PlayerClassType::RANGER) && (tval_ammo == ItemKindType::ARROW)) {
10551053 num += (player_ptr->lev * 4);
--- a/src/smith/object-smith.cpp
+++ b/src/smith/object-smith.cpp
@@ -167,7 +167,7 @@ int Smith::get_essence_consumption(SmithEffectType effect, const ItemEntity *o_p
167167 return consumption;
168168 }
169169
170- if ((o_ptr->tval >= ItemKindType::SHOT) && (o_ptr->tval <= ItemKindType::BOLT)) {
170+ if (o_ptr->is_ammo()) {
171171 consumption = (consumption + 9) / 10;
172172 }
173173
--- a/src/spell-kind/spells-detection.cpp
+++ b/src/spell-kind/spells-detection.cpp
@@ -262,6 +262,7 @@ bool detect_objects_normal(PlayerType *player_ptr, POSITION range)
262262 detect = false;
263263 }
264264 if (detect) {
265+ player_ptr->window_flags |= PW_FOUND_ITEM_LIST;
265266 msg_print(_("アイテムの存在を感じとった!", "You sense the presence of objects!"));
266267 }
267268
@@ -272,19 +273,28 @@ bool detect_objects_normal(PlayerType *player_ptr, POSITION range)
272273 return detect;
273274 }
274275
276+static bool is_object_magically(const ItemKindType tval)
277+{
278+ switch (tval) {
279+ case ItemKindType::WHISTLE:
280+ case ItemKindType::AMULET:
281+ case ItemKindType::RING:
282+ case ItemKindType::STAFF:
283+ case ItemKindType::WAND:
284+ case ItemKindType::ROD:
285+ case ItemKindType::SCROLL:
286+ case ItemKindType::POTION:
287+ return true;
288+ default:
289+ return false;
290+ }
291+}
292+
275293 /*!
276- * @brief 魔法効果のあるのアイテムオブジェクトを感知する / Detect all "magic" objects on the current panel.
294+ * @brief 魔法効果のあるのアイテムオブジェクトを感知する
277295 * @param player_ptr プレイヤーへの参照ポインタ
278296 * @param range 効果範囲
279- * @return 効力があった場合TRUEを返す
280- * @details
281- * <pre>
282- * This will light up all spaces with "magic" items, including artifacts,
283- * ego-items, potions, scrolls, books, rods, wands, staffs, amulets, rings,
284- * and "enchanted" items of the "good" variety.
285- *
286- * It can probably be argued that this function is now too powerful.
287- * </pre>
297+ * @return 1つ以上感知したか否か
288298 */
289299 bool detect_objects_magic(PlayerType *player_ptr, POSITION range)
290300 {
@@ -292,27 +302,22 @@ bool detect_objects_magic(PlayerType *player_ptr, POSITION range)
292302 range /= 3;
293303 }
294304
295- ItemKindType tv;
296- bool detect = false;
305+ auto detect = false;
297306 for (OBJECT_IDX i = 1; i < player_ptr->current_floor_ptr->o_max; i++) {
298307 auto *o_ptr = &player_ptr->current_floor_ptr->o_list[i];
299-
300- if (!o_ptr->is_valid()) {
301- continue;
302- }
303- if (o_ptr->is_held_by_monster()) {
308+ if (!o_ptr->is_valid() || o_ptr->is_held_by_monster()) {
304309 continue;
305310 }
306311
307- POSITION y = o_ptr->iy;
308- POSITION x = o_ptr->ix;
309-
312+ auto y = o_ptr->iy;
313+ auto x = o_ptr->ix;
310314 if (distance(player_ptr->y, player_ptr->x, y, x) > range) {
311315 continue;
312316 }
313317
314- tv = o_ptr->tval;
315- if (o_ptr->is_artifact() || o_ptr->is_ego() || (tv == ItemKindType::WHISTLE) || (tv == ItemKindType::AMULET) || (tv == ItemKindType::RING) || (tv == ItemKindType::STAFF) || (tv == ItemKindType::WAND) || (tv == ItemKindType::ROD) || (tv == ItemKindType::SCROLL) || (tv == ItemKindType::POTION) || (tv == ItemKindType::LIFE_BOOK) || (tv == ItemKindType::SORCERY_BOOK) || (tv == ItemKindType::NATURE_BOOK) || (tv == ItemKindType::CHAOS_BOOK) || (tv == ItemKindType::DEATH_BOOK) || (tv == ItemKindType::TRUMP_BOOK) || (tv == ItemKindType::ARCANE_BOOK) || (tv == ItemKindType::CRAFT_BOOK) || (tv == ItemKindType::DEMON_BOOK) || (tv == ItemKindType::CRUSADE_BOOK) || (tv == ItemKindType::MUSIC_BOOK) || (tv == ItemKindType::HISSATSU_BOOK) || (tv == ItemKindType::HEX_BOOK) || ((o_ptr->to_a > 0) || (o_ptr->to_h + o_ptr->to_d > 0))) {
318+ auto has_bonus = o_ptr->to_a > 0;
319+ has_bonus |= o_ptr->to_h + o_ptr->to_d > 0;
320+ if (o_ptr->is_artifact() || o_ptr->is_ego() || is_object_magically(o_ptr->tval) || o_ptr->is_spell_book() || has_bonus) {
316321 o_ptr->marked.set(OmType::FOUND);
317322 lite_spot(player_ptr, y, x);
318323 detect = true;
@@ -320,6 +325,7 @@ bool detect_objects_magic(PlayerType *player_ptr, POSITION range)
320325 }
321326
322327 if (detect) {
328+ player_ptr->window_flags |= PW_FOUND_ITEM_LIST;
323329 msg_print(_("魔法のアイテムの存在を感じとった!", "You sense the presence of magic objects!"));
324330 }
325331
--- a/src/spell-kind/spells-floor.cpp
+++ b/src/spell-kind/spells-floor.cpp
@@ -123,7 +123,7 @@ void wiz_lite(PlayerType *player_ptr, bool ninja)
123123
124124 player_ptr->update |= (PU_MONSTERS);
125125 player_ptr->redraw |= (PR_MAP);
126- player_ptr->window_flags |= (PW_OVERHEAD | PW_DUNGEON);
126+ player_ptr->window_flags |= (PW_OVERHEAD | PW_DUNGEON | PW_FOUND_ITEM_LIST);
127127
128128 if (player_ptr->current_floor_ptr->grid_array[player_ptr->y][player_ptr->x].info & CAVE_GLOW) {
129129 set_superstealth(player_ptr, false);
@@ -181,7 +181,7 @@ void wiz_dark(PlayerType *player_ptr)
181181 player_ptr->update |= (PU_VIEW | PU_LITE | PU_MON_LITE);
182182 player_ptr->update |= (PU_MONSTERS);
183183 player_ptr->redraw |= (PR_MAP);
184- player_ptr->window_flags |= (PW_OVERHEAD | PW_DUNGEON);
184+ player_ptr->window_flags |= (PW_OVERHEAD | PW_DUNGEON | PW_FOUND_ITEM_LIST);
185185 }
186186
187187 /*
--- a/src/spell-kind/spells-perception.cpp
+++ b/src/spell-kind/spells-perception.cpp
@@ -76,7 +76,7 @@ bool identify_item(PlayerType *player_ptr, ItemEntity *o_ptr)
7676 o_ptr->marked.set(OmType::TOUCHED);
7777
7878 set_bits(player_ptr->update, PU_BONUS | PU_COMBINE | PU_REORDER);
79- set_bits(player_ptr->window_flags, PW_INVEN | PW_EQUIP | PW_PLAYER | PW_FLOOR_ITEM_LIST);
79+ set_bits(player_ptr->window_flags, PW_INVEN | PW_EQUIP | PW_PLAYER | PW_FLOOR_ITEM_LIST | PW_FOUND_ITEM_LIST);
8080
8181 strcpy(record_o_name, o_name);
8282 record_turn = w_ptr->game_turn;
--- a/src/spell/spells-object.cpp
+++ b/src/spell/spells-object.cpp
@@ -509,7 +509,7 @@ bool enchant_equipment(PlayerType *player_ptr, ItemEntity *o_ptr, int n, int efl
509509 return false;
510510 }
511511 set_bits(player_ptr->update, PU_BONUS | PU_COMBINE | PU_REORDER);
512- set_bits(player_ptr->window_flags, PW_INVEN | PW_EQUIP | PW_PLAYER | PW_FLOOR_ITEM_LIST);
512+ set_bits(player_ptr->window_flags, PW_INVEN | PW_EQUIP | PW_PLAYER | PW_FLOOR_ITEM_LIST | PW_FOUND_ITEM_LIST);
513513
514514 /* Success */
515515 return true;
--- a/src/status/base-status.cpp
+++ b/src/status/base-status.cpp
@@ -304,7 +304,7 @@ bool lose_all_info(PlayerType *player_ptr)
304304 }
305305
306306 set_bits(player_ptr->update, PU_BONUS | PU_COMBINE | PU_REORDER);
307- set_bits(player_ptr->window_flags, PW_INVEN | PW_EQUIP | PW_PLAYER | PW_FLOOR_ITEM_LIST);
307+ set_bits(player_ptr->window_flags, PW_INVEN | PW_EQUIP | PW_PLAYER | PW_FLOOR_ITEM_LIST | PW_FOUND_ITEM_LIST);
308308 wiz_dark(player_ptr);
309309 return true;
310310 }
--- a/src/system/baseitem-info.cpp
+++ b/src/system/baseitem-info.cpp
@@ -10,6 +10,7 @@
1010 #include "system/baseitem-info.h"
1111 #include "object/tval-types.h"
1212 #include "sv-definition/sv-bow-types.h"
13+#include "sv-definition/sv-food-types.h"
1314
1415 BaseitemKey::BaseitemKey(const ItemKindType type_value, const std::optional<int> &subtype_value)
1516 : type_value(type_value)
@@ -113,6 +114,86 @@ bool BaseitemKey::is_high_level_book() const
113114 return this->subtype_value >= 2;
114115 }
115116
117+bool BaseitemKey::is_melee_weapon() const
118+{
119+ switch (this->type_value) {
120+ case ItemKindType::POLEARM:
121+ case ItemKindType::SWORD:
122+ case ItemKindType::DIGGING:
123+ case ItemKindType::HAFTED:
124+ return true;
125+ default:
126+ return false;
127+ }
128+}
129+
130+bool BaseitemKey::is_ammo() const
131+{
132+ switch (this->type_value) {
133+ case ItemKindType::SHOT:
134+ case ItemKindType::ARROW:
135+ case ItemKindType::BOLT:
136+ return true;
137+ default:
138+ return false;
139+ }
140+}
141+
142+/*
143+ * @brief 未鑑定名を持つか否かの判定
144+ * @details FOODはキノコが該当する
145+ */
146+bool BaseitemKey::has_unidentified_name() const
147+{
148+ switch (this->type_value) {
149+ case ItemKindType::AMULET:
150+ case ItemKindType::RING:
151+ case ItemKindType::STAFF:
152+ case ItemKindType::WAND:
153+ case ItemKindType::ROD:
154+ case ItemKindType::SCROLL:
155+ case ItemKindType::POTION:
156+ return true;
157+ case ItemKindType::FOOD:
158+ return this->is_mushrooms();
159+ default:
160+ return false;
161+ }
162+}
163+
164+bool BaseitemKey::is_mushrooms() const
165+{
166+ if (!this->subtype_value.has_value()) {
167+ return false;
168+ }
169+
170+ switch (this->subtype_value.value()) {
171+ case SV_FOOD_POISON:
172+ case SV_FOOD_BLINDNESS:
173+ case SV_FOOD_PARANOIA:
174+ case SV_FOOD_CONFUSION:
175+ case SV_FOOD_HALLUCINATION:
176+ case SV_FOOD_PARALYSIS:
177+ case SV_FOOD_WEAKNESS:
178+ case SV_FOOD_SICKNESS:
179+ case SV_FOOD_STUPIDITY:
180+ case SV_FOOD_NAIVETY:
181+ case SV_FOOD_UNHEALTH:
182+ case SV_FOOD_DISEASE:
183+ case SV_FOOD_CURE_POISON:
184+ case SV_FOOD_CURE_BLINDNESS:
185+ case SV_FOOD_CURE_PARANOIA:
186+ case SV_FOOD_CURE_CONFUSION:
187+ case SV_FOOD_CURE_SERIOUS:
188+ case SV_FOOD_RESTORE_STR:
189+ case SV_FOOD_RESTORE_CON:
190+ case SV_FOOD_RESTORING:
191+ return true;
192+ default:
193+ return false;
194+ }
195+}
196+
116197 BaseitemInfo::BaseitemInfo()
117198 : bi_key(ItemKindType::NONE)
118199 {
--- a/src/system/baseitem-info.h
+++ b/src/system/baseitem-info.h
@@ -40,10 +40,15 @@ public:
4040 ItemKindType get_arrow_kind() const;
4141 bool is_spell_book() const;
4242 bool is_high_level_book() const;
43+ bool is_melee_weapon() const;
44+ bool is_ammo() const;
45+ bool has_unidentified_name() const;
4346
4447 private:
4548 ItemKindType type_value;
4649 std::optional<int> subtype_value;
50+
51+ bool is_mushrooms() const;
4752 };
4853
4954 enum class ItemKindType : short;
--- a/src/system/item-entity.cpp
+++ b/src/system/item-entity.cpp
@@ -117,13 +117,12 @@ bool ItemEntity::is_weapon() const
117117 }
118118
119119 /*!
120- * @brief アイテムが武器や矢弾として使用できるかを返す / Check if an object is weapon (including bows and ammo)
121- * Rare weapons/aromors including Blade of Chaos, Dragon armors, etc.
120+ * @brief アイテムが武器や矢弾として使用できるかを返す
122121 * @return 武器や矢弾として使えるならばtrueを返す
123122 */
124123 bool ItemEntity::is_weapon_ammo() const
125124 {
126- return (TV_MISSILE_BEGIN <= this->tval) && (this->tval <= TV_WEAPON_END);
125+ return this->is_weapon() || this->is_ammo();
127126 }
128127
129128 /*!
@@ -141,7 +140,7 @@ bool ItemEntity::is_weapon_armour_ammo() const
141140 */
142141 bool ItemEntity::is_melee_weapon() const
143142 {
144- return (ItemKindType::DIGGING <= this->tval) && (this->tval <= ItemKindType::SWORD);
143+ return BaseitemKey(this->tval).is_melee_weapon();
145144 }
146145
147146 /*!
@@ -302,7 +301,7 @@ bool ItemEntity::allow_two_hands_wielding() const
302301 */
303302 bool ItemEntity::is_ammo() const
304303 {
305- return (TV_MISSILE_BEGIN <= this->tval) && (this->tval <= TV_MISSILE_END);
304+ return BaseitemKey(this->tval).is_ammo();
306305 }
307306
308307 /*!
@@ -808,3 +807,13 @@ bool ItemEntity::is_specific_artifact(FixedArtifactId id) const
808807 {
809808 return this->fixed_artifact_idx == id;
810809 }
810+
811+bool ItemEntity::has_unidentified_name() const
812+{
813+ return BaseitemKey(this->tval).has_unidentified_name();
814+}
815+
816+ItemKindType ItemEntity::get_arrow_kind() const
817+{
818+ return BaseitemKey(this->tval, this->sval).get_arrow_kind();
819+}
--- a/src/system/item-entity.h
+++ b/src/system/item-entity.h
@@ -121,6 +121,8 @@ public:
121121 char get_symbol() const;
122122 int get_price() const;
123123 bool is_specific_artifact(FixedArtifactId id) const;
124+ bool has_unidentified_name() const;
125+ ItemKindType get_arrow_kind() const;
124126
125127 private:
126128 int get_baseitem_price() const;
--- a/src/term/gameterm.cpp
+++ b/src/term/gameterm.cpp
@@ -118,8 +118,8 @@ const concptr window_flag_desc[32] = {
118118 _("アイテムの詳細", "Display object recall"),
119119 _("自分の周囲を表示", "Display dungeon view"),
120120 _("記念撮影", "Display snap-shot"),
121- _("足元/床上のアイテム一覧", "Display items on floor"),
122- nullptr,
121+ _("足元/床上のアイテム一覧", "Display items on grid"),
122+ _("発見済みのアイテム一覧", "Display found items"),
123123 nullptr,
124124 nullptr,
125125 nullptr,
--- a/src/util/object-sort.cpp
+++ b/src/util/object-sort.cpp
@@ -14,6 +14,23 @@
1414 #include "system/monster-race-info.h"
1515 #include "system/player-type-definition.h"
1616
17+static int get_item_sort_rank(const ItemEntity &item)
18+{
19+ if (item.is_fixed_artifact()) {
20+ return 3;
21+ }
22+
23+ if (item.art_name) {
24+ return 2;
25+ }
26+
27+ if (item.is_ego()) {
28+ return 1;
29+ }
30+
31+ return 0;
32+}
33+
1734 /*!
1835 * @brief オブジェクトを定義された基準に従いソートするための関数 /
1936 * Check if we have space for an item in the pack without overflow
@@ -24,81 +41,73 @@
2441 */
2542 bool object_sort_comp(PlayerType *player_ptr, ItemEntity *o_ptr, int32_t o_value, ItemEntity *j_ptr)
2643 {
27- int o_type, j_type;
28- if (!j_ptr->bi_id) {
44+ if (j_ptr->bi_id == 0) {
2945 return true;
3046 }
3147
32- if ((o_ptr->tval == get_realm1_book(player_ptr)) && (j_ptr->tval != get_realm1_book(player_ptr))) {
48+ const auto o_tval = o_ptr->tval;
49+ const auto j_tval = j_ptr->tval;
50+ if ((o_tval == get_realm1_book(player_ptr)) && (j_tval != get_realm1_book(player_ptr))) {
3351 return true;
3452 }
35- if ((j_ptr->tval == get_realm1_book(player_ptr)) && (o_ptr->tval != get_realm1_book(player_ptr))) {
53+
54+ if ((j_tval == get_realm1_book(player_ptr)) && (o_tval != get_realm1_book(player_ptr))) {
3655 return false;
3756 }
3857
39- if ((o_ptr->tval == get_realm2_book(player_ptr)) && (j_ptr->tval != get_realm2_book(player_ptr))) {
58+ if ((o_tval == get_realm2_book(player_ptr)) && (j_tval != get_realm2_book(player_ptr))) {
4059 return true;
4160 }
42- if ((j_ptr->tval == get_realm2_book(player_ptr)) && (o_ptr->tval != get_realm2_book(player_ptr))) {
61+
62+ if ((j_tval == get_realm2_book(player_ptr)) && (o_tval != get_realm2_book(player_ptr))) {
4363 return false;
4464 }
4565
46- if (o_ptr->tval > j_ptr->tval) {
66+ if (o_tval > j_tval) {
4767 return true;
4868 }
49- if (o_ptr->tval < j_ptr->tval) {
69+
70+ if (o_tval < j_tval) {
5071 return false;
5172 }
5273
5374 if (!o_ptr->is_aware()) {
5475 return false;
5576 }
77+
5678 if (!j_ptr->is_aware()) {
5779 return true;
5880 }
5981
60- if (o_ptr->sval < j_ptr->sval) {
82+ const auto o_sval = o_ptr->sval;
83+ const auto j_sval = j_ptr->sval;
84+ if (o_sval < j_sval) {
6185 return true;
6286 }
63- if (o_ptr->sval > j_ptr->sval) {
87+
88+ if (o_sval > j_sval) {
6489 return false;
6590 }
6691
6792 if (!o_ptr->is_known()) {
6893 return false;
6994 }
95+
7096 if (!j_ptr->is_known()) {
7197 return true;
7298 }
7399
74- if (o_ptr->is_fixed_artifact()) {
75- o_type = 3;
76- } else if (o_ptr->art_name) {
77- o_type = 2;
78- } else if (o_ptr->is_ego()) {
79- o_type = 1;
80- } else {
81- o_type = 0;
82- }
83-
84- if (j_ptr->is_fixed_artifact()) {
85- j_type = 3;
86- } else if (j_ptr->art_name) {
87- j_type = 2;
88- } else if (j_ptr->is_ego()) {
89- j_type = 1;
90- } else {
91- j_type = 0;
92- }
93-
94- if (o_type < j_type) {
100+ const auto o_rank = get_item_sort_rank(*o_ptr);
101+ const auto j_rank = get_item_sort_rank(*j_ptr);
102+ if (o_rank < j_rank) {
95103 return true;
96104 }
97- if (o_type > j_type) {
105+
106+ if (o_rank > j_rank) {
98107 return false;
99108 }
100109
101- switch (o_ptr->tval) {
110+ switch (o_tval) {
102111 case ItemKindType::FIGURINE:
103112 case ItemKindType::STATUE:
104113 case ItemKindType::CORPSE:
@@ -108,32 +117,35 @@ bool object_sort_comp(PlayerType *player_ptr, ItemEntity *o_ptr, int32_t o_value
108117 if (monraces_info[o_r_idx].level < monraces_info[j_r_idx].level) {
109118 return true;
110119 }
120+
111121 if ((monraces_info[o_r_idx].level == monraces_info[j_r_idx].level) && (o_ptr->pval < j_ptr->pval)) {
112122 return true;
113123 }
124+
114125 return false;
115126 }
116-
117127 case ItemKindType::SHOT:
118128 case ItemKindType::ARROW:
119129 case ItemKindType::BOLT:
120130 if (o_ptr->to_h + o_ptr->to_d < j_ptr->to_h + j_ptr->to_d) {
121131 return true;
122132 }
133+
123134 if (o_ptr->to_h + o_ptr->to_d > j_ptr->to_h + j_ptr->to_d) {
124135 return false;
125136 }
126- break;
127137
138+ break;
128139 case ItemKindType::ROD:
129140 if (o_ptr->pval < j_ptr->pval) {
130141 return true;
131142 }
143+
132144 if (o_ptr->pval > j_ptr->pval) {
133145 return false;
134146 }
135- break;
136147
148+ break;
137149 default:
138150 break;
139151 }
--- a/src/view/object-describer.cpp
+++ b/src/view/object-describer.cpp
@@ -14,34 +14,31 @@
1414 #include "view/display-messages.h"
1515
1616 /*!
17- * @brief 魔道具の使用回数の残量を示すメッセージを表示する /
18- * Describe the charges on an item in the inventory.
19- * @param player_ptr プレイヤーへの参照ポインタ
20- * @param item 残量を表示したいプレイヤーのアイテム所持スロット
17+ * @brief 魔道具の使用回数の残量を示すメッセージを表示する
18+ * @param item 残量を表示したいインベントリ内のアイテム
2119 */
22-void inven_item_charges(PlayerType *player_ptr, INVENTORY_IDX item)
20+void inven_item_charges(const ItemEntity &item)
2321 {
24- auto *o_ptr = &player_ptr->inventory_list[item];
25- if ((o_ptr->tval != ItemKindType::STAFF) && (o_ptr->tval != ItemKindType::WAND)) {
22+ const auto tval = item.tval;
23+ if ((tval != ItemKindType::STAFF) && (tval != ItemKindType::WAND)) {
2624 return;
2725 }
28- if (!o_ptr->is_known()) {
26+
27+ if (!item.is_known()) {
2928 return;
3029 }
3130
3231 #ifdef JP
33- if (o_ptr->pval <= 0) {
32+ if (item.pval <= 0) {
3433 msg_print("もう魔力が残っていない。");
3534 } else {
36- msg_format("あと %d 回分の魔力が残っている。", o_ptr->pval);
35+ msg_format("あと %d 回分の魔力が残っている。", item.pval);
3736 }
3837 #else
39- if (o_ptr->pval != 1) {
40- msg_format("You have %d charges remaining.", o_ptr->pval);
41- }
42-
43- else {
44- msg_format("You have %d charge remaining.", o_ptr->pval);
38+ if (item.pval != 1) {
39+ msg_format("You have %d charges remaining.", item.pval);
40+ } else {
41+ msg_format("You have %d charge remaining.", item.pval);
4542 }
4643 #endif
4744 }
@@ -52,7 +49,7 @@ void inven_item_charges(PlayerType *player_ptr, INVENTORY_IDX item)
5249 * @param player_ptr プレイヤーへの参照ポインタ
5350 * @param item 残量を表示したいプレイヤーのアイテム所持スロット
5451 */
55-void inven_item_describe(PlayerType *player_ptr, INVENTORY_IDX item)
52+void inven_item_describe(PlayerType *player_ptr, short item)
5653 {
5754 auto *o_ptr = &player_ptr->inventory_list[item];
5855 GAME_TEXT o_name[MAX_NLEN];
--- a/src/view/object-describer.h
+++ b/src/view/object-describer.h
@@ -1,8 +1,7 @@
11 #pragma once
22
3-#include "system/angband.h"
4-
3+class ItemEntity;
54 class PlayerType;
6-void inven_item_charges(PlayerType *player_ptr, INVENTORY_IDX item);
7-void inven_item_describe(PlayerType *player_ptr, INVENTORY_IDX item);
5+void inven_item_charges(const ItemEntity &item);
6+void inven_item_describe(PlayerType *player_ptr, short item);
87 void display_koff(PlayerType *player_ptr, short bi_id);
--- a/src/window/display-sub-windows.cpp
+++ b/src/window/display-sub-windows.cpp
@@ -51,6 +51,7 @@
5151 #include <mutex>
5252 #include <sstream>
5353 #include <string>
54+#include <util/object-sort.h>
5455
5556 /*! サブウィンドウ表示用の ItemTester オブジェクト */
5657 static std::unique_ptr<ItemTester> fix_item_tester = std::make_unique<AllMatchItemTester>();
@@ -670,6 +671,105 @@ void fix_floor_item_list(PlayerType *player_ptr, const int y, const int x)
670671 }
671672
672673 /*!
674+ * @brief 発見済みのアイテム一覧を作成し、表示する
675+ * @param プレイヤー情報への参照ポインタ
676+ */
677+static void display_found_item_list(PlayerType *player_ptr)
678+{
679+ // Term の行数を取得。
680+ TERM_LEN term_h;
681+ TERM_LEN term_w;
682+ term_get_size(&term_w, &term_h);
683+
684+ if (term_h <= 0) {
685+ return;
686+ }
687+
688+ auto *floor_ptr = player_ptr->current_floor_ptr;
689+
690+ // 所持品一覧と同じ順にソートする
691+ // あらかじめfloor_ptr->o_list から↓項目を取り除く
692+ // bi_idが0
693+ // OM_FOUNDフラグが立っていない
694+ // ItemKindTypeがGOLD
695+ std::vector<ItemEntity *> found_item_list;
696+ for (auto &item : floor_ptr->o_list) {
697+ auto item_entity_ptr = &item;
698+ if (item_entity_ptr->bi_id > 0 && item_entity_ptr->marked.has(OmType::FOUND) && item_entity_ptr->tval != ItemKindType::GOLD) {
699+ found_item_list.push_back(item_entity_ptr);
700+ }
701+ }
702+
703+ std::sort(
704+ found_item_list.begin(), found_item_list.end(),
705+ [player_ptr](ItemEntity *left, ItemEntity *right) -> bool {
706+ return object_sort_comp(player_ptr, left, left->get_price(), right);
707+ });
708+
709+ term_clear();
710+ term_gotoxy(0, 0);
711+
712+ // 先頭行を書く。
713+ term_addstr(-1, TERM_WHITE, _("発見済みのアイテム一覧", "Found items"));
714+
715+ // 発見済みのアイテムを表示
716+ TERM_LEN term_y = 1;
717+ for (auto item : found_item_list) {
718+ // 途中で行数が足りなくなったら終了。
719+ if (term_y >= term_h) {
720+ break;
721+ }
722+
723+ term_gotoxy(0, term_y);
724+
725+ // アイテムシンボル表示
726+ const auto symbol_code = item->get_symbol();
727+ const std::string symbol = format(" %c ", symbol_code);
728+ const auto color_code_for_symbol = item->get_color();
729+ term_addstr(-1, color_code_for_symbol, symbol.data());
730+
731+ // アイテム名表示
732+ char temp[512];
733+ describe_flavor(player_ptr, temp, item, 0);
734+ const std::string item_description(temp);
735+ const auto color_code_for_item = tval_to_attr[enum2i(item->tval) % 128];
736+ term_addstr(-1, color_code_for_item, item_description.data());
737+
738+ // アイテム座標表示
739+ const std::string item_location = format("(X:%3d Y:%3d)", item->ix, item->iy);
740+ prt(item_location.data(), term_y, term_w - item_location.length() - 1);
741+
742+ ++term_y;
743+ }
744+}
745+
746+/*!
747+ * @brief 発見済みのアイテム一覧をサブウィンドウに表示する
748+ */
749+void fix_found_item_list(PlayerType *player_ptr)
750+{
751+ for (int j = 0; j < 8; j++) {
752+ if (!angband_term[j]) {
753+ continue;
754+ }
755+ if (angband_term[j]->never_fresh) {
756+ continue;
757+ }
758+ if (none_bits(window_flag[j], PW_FOUND_ITEM_LIST)) {
759+ continue;
760+ }
761+
762+ term_type *old = game_term;
763+ term_activate(angband_term[j]);
764+
765+ display_found_item_list(player_ptr);
766+ term_fresh();
767+
768+ term_activate(old);
769+ }
770+}
771+
772+/*!
673773 * @brief サブウィンドウに所持品、装備品リストの表示を行う /
674774 * Flip "inven" and "equip" in any sub-windows
675775 */
--- a/src/window/display-sub-windows.h
+++ b/src/window/display-sub-windows.h
@@ -18,6 +18,7 @@ void fix_dungeon(PlayerType *player_ptr);
1818 void fix_monster(PlayerType *player_ptr);
1919 void fix_object(PlayerType *player_ptr);
2020 void fix_floor_item_list(PlayerType *player_ptr, const int y, const int x);
21+void fix_found_item_list(PlayerType *player_ptr);
2122 void toggle_inventory_equipment(PlayerType *player_ptr);
2223
2324 /*!
--- a/src/wizard/wizard-item-modifier.cpp
+++ b/src/wizard/wizard-item-modifier.cpp
@@ -579,7 +579,7 @@ static void wiz_reroll_item(PlayerType *player_ptr, ItemEntity *o_ptr)
579579
580580 o_ptr->copy_from(q_ptr);
581581 set_bits(player_ptr->update, PU_BONUS | PU_COMBINE | PU_REORDER);
582- set_bits(player_ptr->window_flags, PW_INVEN | PW_EQUIP | PW_SPELL | PW_PLAYER | PW_FLOOR_ITEM_LIST);
582+ set_bits(player_ptr->window_flags, PW_INVEN | PW_EQUIP | PW_SPELL | PW_PLAYER | PW_FLOOR_ITEM_LIST | PW_FOUND_ITEM_LIST);
583583 }
584584
585585 /*!
@@ -724,7 +724,7 @@ void wiz_modify_item(PlayerType *player_ptr)
724724
725725 o_ptr->copy_from(q_ptr);
726726 set_bits(player_ptr->update, PU_BONUS | PU_COMBINE | PU_REORDER);
727- set_bits(player_ptr->window_flags, PW_INVEN | PW_EQUIP | PW_SPELL | PW_PLAYER | PW_FLOOR_ITEM_LIST);
727+ set_bits(player_ptr->window_flags, PW_INVEN | PW_EQUIP | PW_SPELL | PW_PLAYER | PW_FLOOR_ITEM_LIST | PW_FOUND_ITEM_LIST);
728728 } else {
729729 msg_print("Changes ignored.");
730730 }
Show on old repository browser