2 * @brief 武器/防具/アクセサリアイテムにおける、耐性やスレイ等の表記
7 #include "flavor/flavor-describer.h"
8 #include "combat/shoot.h"
9 #include "flavor/flag-inscriptions-table.h"
10 #include "flavor/flavor-util.h"
11 #include "flavor/named-item-describer.h"
12 #include "flavor/object-flavor-types.h"
13 #include "game-option/text-display-options.h"
14 #include "grid/trap.h"
15 #include "inventory/inventory-slot-types.h"
16 #include "mind/mind-sniper.h"
17 #include "mind/mind-weaponsmith.h"
18 #include "object-enchant/object-ego.h"
19 #include "object-enchant/object-smith.h"
20 #include "object-enchant/smith-types.h"
21 #include "object-enchant/special-object-flags.h"
22 #include "object-enchant/tr-types.h"
23 #include "object-enchant/trg-types.h"
24 #include "object-hook/hook-quest.h"
25 #include "object/object-flags.h"
26 #include "object/object-kind.h"
27 #include "perception/object-perception.h"
28 #include "player/player-status-table.h"
29 #include "player/player-status.h"
30 #include "specific-object/bow.h"
31 #include "sv-definition/sv-lite-types.h"
32 #include "sv-definition/sv-weapon-types.h"
33 #include "system/floor-type-definition.h"
34 #include "system/object-type-definition.h"
35 #include "system/player-type-definition.h"
36 #include "util/bit-flags-calculator.h"
37 #include "util/string-processor.h"
38 #include "window/display-sub-window-items.h"
40 static void describe_chest_trap(flavor_type *flavor_ptr)
42 auto trap_kinds = chest_traps[flavor_ptr->o_ptr->pval];
43 if (trap_kinds.count() >= 2) {
44 flavor_ptr->t = object_desc_str(flavor_ptr->t, _("(マルチ・トラップ)", " (Multiple Traps)"));
48 auto trap_kind = trap_kinds.first();
49 if (!trap_kind.has_value()) {
50 flavor_ptr->t = object_desc_str(flavor_ptr->t, _("(施錠)", " (Locked)"));
54 switch (trap_kind.value()) {
55 case ChestTrapType::LOSE_STR:
56 flavor_ptr->t = object_desc_str(flavor_ptr->t, _("(毒針)", " (Poison Needle)"));
58 case ChestTrapType::LOSE_CON:
59 flavor_ptr->t = object_desc_str(flavor_ptr->t, _("(毒針)", " (Poison Needle)"));
61 case ChestTrapType::POISON:
62 flavor_ptr->t = object_desc_str(flavor_ptr->t, _("(ガス・トラップ)", " (Gas Trap)"));
64 case ChestTrapType::PARALYZE:
65 flavor_ptr->t = object_desc_str(flavor_ptr->t, _("(ガス・トラップ)", " (Gas Trap)"));
67 case ChestTrapType::EXPLODE:
68 flavor_ptr->t = object_desc_str(flavor_ptr->t, _("(爆発装置)", " (Explosion Device)"));
70 case ChestTrapType::SUMMON:
71 case ChestTrapType::BIRD_STORM:
72 case ChestTrapType::E_SUMMON:
73 case ChestTrapType::H_SUMMON:
74 flavor_ptr->t = object_desc_str(flavor_ptr->t, _("(召喚のルーン)", " (Summoning Runes)"));
76 case ChestTrapType::RUNES_OF_EVIL:
77 flavor_ptr->t = object_desc_str(flavor_ptr->t, _("(邪悪なルーン)", " (Gleaming Black Runes)"));
79 case ChestTrapType::ALARM:
80 flavor_ptr->t = object_desc_str(flavor_ptr->t, _("(警報装置)", " (Alarm)"));
83 throw("Invalid chest trap type is specified!");
87 static void describe_chest(flavor_type *flavor_ptr)
89 if (flavor_ptr->o_ptr->tval != ItemKindType::CHEST)
92 if (!flavor_ptr->known)
95 if (!flavor_ptr->o_ptr->pval) {
96 flavor_ptr->t = object_desc_str(flavor_ptr->t, _("(空)", " (empty)"));
100 if (flavor_ptr->o_ptr->pval < 0) {
101 if (chest_traps[0 - flavor_ptr->o_ptr->pval].any())
102 flavor_ptr->t = object_desc_str(flavor_ptr->t, _("(解除済)", " (disarmed)"));
104 flavor_ptr->t = object_desc_str(flavor_ptr->t, _("(非施錠)", " (unlocked)"));
109 describe_chest_trap(flavor_ptr);
112 static void decide_tval_show(flavor_type *flavor_ptr)
114 if (flavor_ptr->tr_flags.has(TR_SHOW_MODS))
115 flavor_ptr->show_weapon = true;
117 if (flavor_ptr->o_ptr->is_smith() && (Smith::object_effect(flavor_ptr->o_ptr) == SmithEffect::SLAY_GLOVE))
118 flavor_ptr->show_weapon = true;
120 if (flavor_ptr->o_ptr->to_h && flavor_ptr->o_ptr->to_d)
121 flavor_ptr->show_weapon = true;
123 if (flavor_ptr->o_ptr->ac)
124 flavor_ptr->show_armour = true;
127 static void describe_weapon_dice(player_type *player_ptr, flavor_type *flavor_ptr)
129 if (!flavor_ptr->known && object_is_quest_target(player_ptr->current_floor_ptr->inside_quest, flavor_ptr->o_ptr))
132 flavor_ptr->t = object_desc_chr(flavor_ptr->t, ' ');
133 flavor_ptr->t = object_desc_chr(flavor_ptr->t, flavor_ptr->p1);
134 auto is_bonus = (player_ptr->riding > 0) && flavor_ptr->o_ptr->is_lance();
135 auto bonus = is_bonus ? 2 : 0;
136 flavor_ptr->t = object_desc_num(flavor_ptr->t, flavor_ptr->o_ptr->dd + bonus);
137 flavor_ptr->t = object_desc_chr(flavor_ptr->t, 'd');
138 flavor_ptr->t = object_desc_num(flavor_ptr->t, flavor_ptr->o_ptr->ds);
139 flavor_ptr->t = object_desc_chr(flavor_ptr->t, flavor_ptr->p2);
142 static void describe_bow(player_type *player_ptr, flavor_type *flavor_ptr)
144 flavor_ptr->power = bow_tmul(flavor_ptr->o_ptr->sval);
145 if (flavor_ptr->tr_flags.has(TR_XTRA_MIGHT))
148 flavor_ptr->t = object_desc_chr(flavor_ptr->t, ' ');
149 flavor_ptr->t = object_desc_chr(flavor_ptr->t, flavor_ptr->p1);
150 flavor_ptr->t = object_desc_chr(flavor_ptr->t, 'x');
151 flavor_ptr->t = object_desc_num(flavor_ptr->t, flavor_ptr->power);
152 flavor_ptr->t = object_desc_chr(flavor_ptr->t, flavor_ptr->p2);
155 if (!(flavor_ptr->mode & OD_DEBUG)) {
156 num_fire = calc_num_fire(player_ptr, flavor_ptr->o_ptr);
158 auto flgs = object_flags(flavor_ptr->o_ptr);
159 if (flgs.has(TR_XTRA_SHOTS))
162 if ((num_fire == 0) || (flavor_ptr->power <= 0) || !flavor_ptr->known)
165 flavor_ptr->fire_rate = bow_energy(flavor_ptr->o_ptr->sval) / num_fire;
166 flavor_ptr->t = object_desc_chr(flavor_ptr->t, ' ');
167 flavor_ptr->t = object_desc_chr(flavor_ptr->t, flavor_ptr->p1);
168 flavor_ptr->t = object_desc_num(flavor_ptr->t, flavor_ptr->fire_rate / 100);
169 flavor_ptr->t = object_desc_chr(flavor_ptr->t, '.');
170 flavor_ptr->t = object_desc_num(flavor_ptr->t, flavor_ptr->fire_rate % 100);
171 flavor_ptr->t = object_desc_str(flavor_ptr->t, "turn");
172 flavor_ptr->t = object_desc_chr(flavor_ptr->t, flavor_ptr->p2);
175 static void describe_tval(player_type *player_ptr, flavor_type *flavor_ptr)
177 switch (flavor_ptr->o_ptr->tval) {
178 case ItemKindType::SHOT:
179 case ItemKindType::BOLT:
180 case ItemKindType::ARROW:
181 case ItemKindType::HAFTED:
182 case ItemKindType::POLEARM:
183 case ItemKindType::SWORD:
184 case ItemKindType::DIGGING:
185 describe_weapon_dice(player_ptr, flavor_ptr);
187 case ItemKindType::BOW:
188 describe_bow(player_ptr, flavor_ptr);
196 static void describe_named_item_tval(flavor_type *flavor_ptr)
198 if (!flavor_ptr->known)
201 if (flavor_ptr->show_weapon) {
202 flavor_ptr->t = object_desc_chr(flavor_ptr->t, ' ');
203 flavor_ptr->t = object_desc_chr(flavor_ptr->t, flavor_ptr->p1);
204 flavor_ptr->t = object_desc_int(flavor_ptr->t, flavor_ptr->o_ptr->to_h);
205 flavor_ptr->t = object_desc_chr(flavor_ptr->t, ',');
206 flavor_ptr->t = object_desc_int(flavor_ptr->t, flavor_ptr->o_ptr->to_d);
207 flavor_ptr->t = object_desc_chr(flavor_ptr->t, flavor_ptr->p2);
211 if (flavor_ptr->o_ptr->to_h != 0) {
212 flavor_ptr->t = object_desc_chr(flavor_ptr->t, ' ');
213 flavor_ptr->t = object_desc_chr(flavor_ptr->t, flavor_ptr->p1);
214 flavor_ptr->t = object_desc_int(flavor_ptr->t, flavor_ptr->o_ptr->to_h);
215 flavor_ptr->t = object_desc_chr(flavor_ptr->t, flavor_ptr->p2);
219 if (flavor_ptr->o_ptr->to_d != 0) {
220 flavor_ptr->t = object_desc_chr(flavor_ptr->t, ' ');
221 flavor_ptr->t = object_desc_chr(flavor_ptr->t, flavor_ptr->p1);
222 flavor_ptr->t = object_desc_int(flavor_ptr->t, flavor_ptr->o_ptr->to_d);
223 flavor_ptr->t = object_desc_chr(flavor_ptr->t, flavor_ptr->p2);
227 static void describe_fire_energy(player_type *player_ptr, flavor_type *flavor_ptr)
229 ENERGY energy_fire = bow_energy(flavor_ptr->bow_ptr->sval);
230 if (player_ptr->num_fire == 0) {
231 flavor_ptr->t = object_desc_chr(flavor_ptr->t, '0');
235 flavor_ptr->avgdam *= (player_ptr->num_fire * 100);
236 flavor_ptr->avgdam /= energy_fire;
237 flavor_ptr->t = object_desc_num(flavor_ptr->t, flavor_ptr->avgdam);
238 flavor_ptr->t = object_desc_str(flavor_ptr->t, show_ammo_detail ? "/turn" : "");
239 if (!show_ammo_crit_ratio)
242 int percent = calc_crit_ratio_shot(player_ptr, flavor_ptr->known ? flavor_ptr->o_ptr->to_h : 0, flavor_ptr->known ? flavor_ptr->bow_ptr->to_h : 0);
243 flavor_ptr->t = object_desc_chr(flavor_ptr->t, '/');
244 flavor_ptr->t = object_desc_num(flavor_ptr->t, percent / 100);
245 flavor_ptr->t = object_desc_chr(flavor_ptr->t, '.');
246 if (percent % 100 < 10)
247 flavor_ptr->t = object_desc_chr(flavor_ptr->t, '0');
249 flavor_ptr->t = object_desc_num(flavor_ptr->t, percent % 100);
250 flavor_ptr->t = object_desc_str(flavor_ptr->t, show_ammo_detail ? "% crit" : "%");
253 static void describe_bow_power(player_type *player_ptr, flavor_type *flavor_ptr)
255 flavor_ptr->avgdam = flavor_ptr->o_ptr->dd * (flavor_ptr->o_ptr->ds + 1) * 10 / 2;
256 int tmul = bow_tmul(flavor_ptr->bow_ptr->sval);
257 if (flavor_ptr->bow_ptr->is_known())
258 flavor_ptr->avgdam += (flavor_ptr->bow_ptr->to_d * 10);
260 if (flavor_ptr->known)
261 flavor_ptr->avgdam += (flavor_ptr->o_ptr->to_d * 10);
263 if (player_ptr->xtra_might)
266 tmul = tmul * (100 + (int)(adj_str_td[player_ptr->stat_index[A_STR]]) - 128);
267 flavor_ptr->avgdam *= tmul;
268 flavor_ptr->avgdam /= (100 * 10);
269 flavor_ptr->avgdam = boost_concentration_damage(player_ptr, flavor_ptr->avgdam);
271 if (flavor_ptr->avgdam < 0)
272 flavor_ptr->avgdam = 0;
274 flavor_ptr->t = object_desc_chr(flavor_ptr->t, ' ');
275 flavor_ptr->t = object_desc_chr(flavor_ptr->t, flavor_ptr->p1);
276 if (show_ammo_no_crit) {
277 flavor_ptr->t = object_desc_num(flavor_ptr->t, flavor_ptr->avgdam);
278 flavor_ptr->t = object_desc_str(flavor_ptr->t, show_ammo_detail ? "/shot " : "/");
281 flavor_ptr->avgdam = calc_expect_crit_shot(player_ptr, flavor_ptr->o_ptr->weight, flavor_ptr->o_ptr->to_h, flavor_ptr->bow_ptr->to_h, flavor_ptr->avgdam);
282 flavor_ptr->t = object_desc_num(flavor_ptr->t, flavor_ptr->avgdam);
283 flavor_ptr->t = show_ammo_no_crit ? object_desc_str(flavor_ptr->t, show_ammo_detail ? "/crit " : "/")
284 : object_desc_str(flavor_ptr->t, show_ammo_detail ? "/shot " : "/");
285 describe_fire_energy(player_ptr, flavor_ptr);
286 flavor_ptr->t = object_desc_chr(flavor_ptr->t, flavor_ptr->p2);
289 static void describe_spike_power(player_type *player_ptr, flavor_type *flavor_ptr)
291 int avgdam = player_ptr->mighty_throw ? (1 + 3) : 1;
292 int16_t energy_fire = 100 - player_ptr->lev;
293 avgdam += ((player_ptr->lev + 30) * (player_ptr->lev + 30) - 900) / 55;
294 flavor_ptr->t = object_desc_chr(flavor_ptr->t, ' ');
295 flavor_ptr->t = object_desc_chr(flavor_ptr->t, flavor_ptr->p1);
296 flavor_ptr->t = object_desc_num(flavor_ptr->t, avgdam);
297 flavor_ptr->t = object_desc_chr(flavor_ptr->t, '/');
298 avgdam = 100 * avgdam / energy_fire;
299 flavor_ptr->t = object_desc_num(flavor_ptr->t, avgdam);
300 flavor_ptr->t = object_desc_chr(flavor_ptr->t, flavor_ptr->p2);
303 static void describe_known_item_ac(flavor_type *flavor_ptr)
305 if (flavor_ptr->show_armour) {
306 flavor_ptr->t = object_desc_chr(flavor_ptr->t, ' ');
307 flavor_ptr->t = object_desc_chr(flavor_ptr->t, flavor_ptr->b1);
308 flavor_ptr->t = object_desc_num(flavor_ptr->t, flavor_ptr->o_ptr->ac);
309 flavor_ptr->t = object_desc_chr(flavor_ptr->t, ',');
310 flavor_ptr->t = object_desc_int(flavor_ptr->t, flavor_ptr->o_ptr->to_a);
311 flavor_ptr->t = object_desc_chr(flavor_ptr->t, flavor_ptr->b2);
315 if (flavor_ptr->o_ptr->to_a == 0)
318 flavor_ptr->t = object_desc_chr(flavor_ptr->t, ' ');
319 flavor_ptr->t = object_desc_chr(flavor_ptr->t, flavor_ptr->b1);
320 flavor_ptr->t = object_desc_int(flavor_ptr->t, flavor_ptr->o_ptr->to_a);
321 flavor_ptr->t = object_desc_chr(flavor_ptr->t, flavor_ptr->b2);
324 static void describe_ac(flavor_type *flavor_ptr)
326 if (flavor_ptr->known) {
327 describe_known_item_ac(flavor_ptr);
331 if (!flavor_ptr->show_armour)
334 flavor_ptr->t = object_desc_chr(flavor_ptr->t, ' ');
335 flavor_ptr->t = object_desc_chr(flavor_ptr->t, flavor_ptr->b1);
336 flavor_ptr->t = object_desc_num(flavor_ptr->t, flavor_ptr->o_ptr->ac);
337 flavor_ptr->t = object_desc_chr(flavor_ptr->t, flavor_ptr->b2);
340 static void describe_charges_staff_wand(flavor_type *flavor_ptr)
342 flavor_ptr->t = object_desc_chr(flavor_ptr->t, ' ');
343 flavor_ptr->t = object_desc_chr(flavor_ptr->t, flavor_ptr->p1);
344 if ((flavor_ptr->o_ptr->tval == ItemKindType::STAFF) && (flavor_ptr->o_ptr->number > 1)) {
345 flavor_ptr->t = object_desc_num(flavor_ptr->t, flavor_ptr->o_ptr->number);
346 flavor_ptr->t = object_desc_str(flavor_ptr->t, "x ");
349 flavor_ptr->t = object_desc_num(flavor_ptr->t, flavor_ptr->o_ptr->pval);
350 flavor_ptr->t = object_desc_str(flavor_ptr->t, _("回分", " charge"));
353 if (flavor_ptr->o_ptr->pval != 1)
354 flavor_ptr->t = object_desc_chr(flavor_ptr->t, 's');
357 flavor_ptr->t = object_desc_chr(flavor_ptr->t, flavor_ptr->p2);
360 static void describe_charges_rod(flavor_type *flavor_ptr)
362 if (flavor_ptr->o_ptr->timeout == 0)
365 if (flavor_ptr->o_ptr->number <= 1) {
366 flavor_ptr->t = object_desc_str(flavor_ptr->t, _("(充填中)", " (charging)"));
370 if (flavor_ptr->k_ptr->pval == 0)
371 flavor_ptr->k_ptr->pval = 1;
373 flavor_ptr->power = (flavor_ptr->o_ptr->timeout + (flavor_ptr->k_ptr->pval - 1)) / flavor_ptr->k_ptr->pval;
374 if (flavor_ptr->power > flavor_ptr->o_ptr->number)
375 flavor_ptr->power = flavor_ptr->o_ptr->number;
377 flavor_ptr->t = object_desc_str(flavor_ptr->t, " (");
378 flavor_ptr->t = object_desc_num(flavor_ptr->t, flavor_ptr->power);
379 flavor_ptr->t = object_desc_str(flavor_ptr->t, _("本 充填中)", " charging)"));
382 static void describe_specific_pval(flavor_type *flavor_ptr)
384 if (flavor_ptr->tr_flags.has(TR_SPEED)) {
385 flavor_ptr->t = object_desc_str(flavor_ptr->t, _("加速", " to speed"));
389 if (flavor_ptr->tr_flags.has(TR_BLOWS)) {
390 flavor_ptr->t = object_desc_str(flavor_ptr->t, _("攻撃", " attack"));
393 if (ABS(flavor_ptr->o_ptr->pval) != 1)
394 flavor_ptr->t = object_desc_chr(flavor_ptr->t, 's');
400 if (flavor_ptr->tr_flags.has(TR_STEALTH)) {
401 flavor_ptr->t = object_desc_str(flavor_ptr->t, _("隠密", " to stealth"));
405 if (flavor_ptr->tr_flags.has(TR_SEARCH)) {
406 flavor_ptr->t = object_desc_str(flavor_ptr->t, _("探索", " to searching"));
410 if (flavor_ptr->tr_flags.has(TR_INFRA))
411 flavor_ptr->t = object_desc_str(flavor_ptr->t, _("赤外線視力", " to infravision"));
414 static void describe_pval(flavor_type *flavor_ptr)
416 if (flavor_ptr->tr_flags.has_none_of(TR_PVAL_FLAG_MASK))
419 flavor_ptr->t = object_desc_chr(flavor_ptr->t, ' ');
420 flavor_ptr->t = object_desc_chr(flavor_ptr->t, flavor_ptr->p1);
421 flavor_ptr->t = object_desc_int(flavor_ptr->t, flavor_ptr->o_ptr->pval);
422 if (flavor_ptr->tr_flags.has(TR_HIDE_TYPE)) {
423 flavor_ptr->t = object_desc_chr(flavor_ptr->t, flavor_ptr->p2);
427 describe_specific_pval(flavor_ptr);
428 flavor_ptr->t = object_desc_chr(flavor_ptr->t, flavor_ptr->p2);
431 static void describe_lamp_life(flavor_type *flavor_ptr)
433 if ((flavor_ptr->o_ptr->tval != ItemKindType::LITE) || (flavor_ptr->o_ptr->is_fixed_artifact() || (flavor_ptr->o_ptr->sval == SV_LITE_FEANOR)))
436 flavor_ptr->t = object_desc_str(flavor_ptr->t, _("(", " (with "));
437 if (flavor_ptr->o_ptr->name2 == EGO_LITE_LONG)
438 flavor_ptr->t = object_desc_num(flavor_ptr->t, flavor_ptr->o_ptr->xtra4 * 2);
440 flavor_ptr->t = object_desc_num(flavor_ptr->t, flavor_ptr->o_ptr->xtra4);
442 flavor_ptr->t = object_desc_str(flavor_ptr->t, _("ターンの寿命)", " turns of light)"));
446 * @brief 杖や光源等、寿命のあるアイテムの残り回数やターン表記
447 * @param アイテム表記への参照ポインタ
449 static void describe_remaining(flavor_type *flavor_ptr)
451 if (!flavor_ptr->known)
454 if (((flavor_ptr->o_ptr->tval == ItemKindType::STAFF) || (flavor_ptr->o_ptr->tval == ItemKindType::WAND)))
455 describe_charges_staff_wand(flavor_ptr);
456 else if (flavor_ptr->o_ptr->tval == ItemKindType::ROD)
457 describe_charges_rod(flavor_ptr);
459 describe_pval(flavor_ptr);
460 describe_lamp_life(flavor_ptr);
461 if (flavor_ptr->o_ptr->timeout && (flavor_ptr->o_ptr->tval != ItemKindType::ROD))
462 flavor_ptr->t = object_desc_str(flavor_ptr->t, _("(充填中)", " (charging)"));
465 static void decide_item_feeling(flavor_type *flavor_ptr)
467 flavor_ptr->fake_insc_buf[0] = '\0';
468 if (flavor_ptr->o_ptr->feeling) {
469 strcpy(flavor_ptr->fake_insc_buf, game_inscriptions[flavor_ptr->o_ptr->feeling]);
473 if (flavor_ptr->o_ptr->is_cursed() && (flavor_ptr->known || (flavor_ptr->o_ptr->ident & IDENT_SENSE))) {
474 strcpy(flavor_ptr->fake_insc_buf, _("呪われている", "cursed"));
478 if (((flavor_ptr->o_ptr->tval == ItemKindType::RING) || (flavor_ptr->o_ptr->tval == ItemKindType::AMULET) || (flavor_ptr->o_ptr->tval == ItemKindType::LITE)
479 || (flavor_ptr->o_ptr->tval == ItemKindType::FIGURINE))
480 && flavor_ptr->aware && !flavor_ptr->known && !(flavor_ptr->o_ptr->ident & IDENT_SENSE)) {
481 strcpy(flavor_ptr->fake_insc_buf, _("未鑑定", "unidentified"));
485 if (!flavor_ptr->known && (flavor_ptr->o_ptr->ident & IDENT_EMPTY)) {
486 strcpy(flavor_ptr->fake_insc_buf, _("空", "empty"));
490 if (!flavor_ptr->aware && flavor_ptr->o_ptr->is_tried())
491 strcpy(flavor_ptr->fake_insc_buf, _("未判明", "tried"));
495 * @brief オブジェクトの各表記を返すメイン関数 / Creates a description of the item "o_ptr", and stores it in "out_val".
496 * @param player_ptr プレイヤーへの参照ポインタ
497 * @param buf 表記を返すための文字列参照ポインタ
498 * @param o_ptr 特性短縮表記を得たいオブジェクト構造体の参照ポインタ
499 * @param mode 表記に関するオプション指定
500 * @return 現在クエスト達成目的のアイテムならばTRUEを返す
502 void describe_flavor(player_type *player_ptr, char *buf, object_type *o_ptr, BIT_FLAGS mode)
504 flavor_type tmp_flavor;
505 flavor_type *flavor_ptr = initialize_flavor_type(&tmp_flavor, buf, o_ptr, mode);
506 describe_named_item(player_ptr, flavor_ptr);
507 if (flavor_ptr->mode & OD_NAME_ONLY || o_ptr->k_idx == 0) {
508 angband_strcpy(flavor_ptr->buf, flavor_ptr->tmp_val, MAX_NLEN);
512 describe_chest(flavor_ptr);
513 decide_tval_show(flavor_ptr);
514 describe_tval(player_ptr, flavor_ptr);
515 describe_named_item_tval(flavor_ptr);
516 if (!(mode & OD_DEBUG)) {
517 flavor_ptr->bow_ptr = &player_ptr->inventory_list[INVEN_BOW];
518 if ((flavor_ptr->bow_ptr->k_idx != 0) && (flavor_ptr->o_ptr->tval == bow_tval_ammo(flavor_ptr->bow_ptr)))
519 describe_bow_power(player_ptr, flavor_ptr);
520 else if ((player_ptr->pclass == PlayerClassType::NINJA) && (flavor_ptr->o_ptr->tval == ItemKindType::SPIKE))
521 describe_spike_power(player_ptr, flavor_ptr);
524 describe_ac(flavor_ptr);
525 if (flavor_ptr->mode & OD_NAME_AND_ENCHANT) {
526 angband_strcpy(flavor_ptr->buf, flavor_ptr->tmp_val, MAX_NLEN);
530 describe_remaining(flavor_ptr);
531 if (flavor_ptr->mode & OD_OMIT_INSCRIPTION) {
532 angband_strcpy(flavor_ptr->buf, flavor_ptr->tmp_val, MAX_NLEN);
536 display_short_flavors(flavor_ptr);
537 decide_item_feeling(flavor_ptr);
538 display_item_discount(flavor_ptr);
539 display_item_fake_inscription(flavor_ptr);
540 angband_strcpy(flavor_ptr->buf, flavor_ptr->tmp_val, MAX_NLEN);