1 /* Purpose: Object flavor code */
4 * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke
6 * This software may be copied and distributed for educational, research,
7 * and not for profit purposes provided that this copyright and statement
8 * are included in all such copies. Other copyrights may also apply.
14 * Certain items, if aware, are known instantly
15 * This function is used only by "flavor_init()"
17 static bool object_easy_know(int i)
19 object_kind *k_ptr = &k_info[i];
21 /* Analyze the "tval" */
36 case TV_HISSATSU_BOOK:
53 /* All Food, Potions, Scrolls, Rods */
69 * Create a name from random parts.
71 void get_table_name_aux(char *out_string)
75 get_rnd_line("aname_j.txt", 1, Syllable);
76 strcpy(out_string, Syllable);
77 get_rnd_line("aname_j.txt", 2, Syllable);
78 strcat(out_string, Syllable);
80 #define MAX_SYLLABLES 164 /* Used with scrolls (see below) */
82 static cptr syllables[MAX_SYLLABLES] = {
83 "a", "ab", "ag", "aks", "ala", "an", "ankh", "app",
84 "arg", "arze", "ash", "aus", "ban", "bar", "bat", "bek",
85 "bie", "bin", "bit", "bjor", "blu", "bot", "bu",
86 "byt", "comp", "con", "cos", "cre", "dalf", "dan",
87 "den", "der", "doe", "dok", "eep", "el", "eng", "er", "ere", "erk",
88 "esh", "evs", "fa", "fid", "flit", "for", "fri", "fu", "gan",
89 "gar", "glen", "gop", "gre", "ha", "he", "hyd", "i",
90 "ing", "ion", "ip", "ish", "it", "ite", "iv", "jo",
91 "kho", "kli", "klis", "la", "lech", "man", "mar",
92 "me", "mi", "mic", "mik", "mon", "mung", "mur", "nag", "nej",
93 "nelg", "nep", "ner", "nes", "nis", "nih", "nin", "o",
94 "od", "ood", "org", "orn", "ox", "oxy", "pay", "pet",
95 "ple", "plu", "po", "pot", "prok", "re", "rea", "rhov",
96 "ri", "ro", "rog", "rok", "rol", "sa", "san", "sat",
97 "see", "sef", "seh", "shu", "ski", "sna", "sne", "snik",
98 "sno", "so", "sol", "sri", "sta", "sun", "ta", "tab",
99 "tem", "ther", "ti", "tox", "trol", "tue", "turs", "u",
100 "ulk", "um", "un", "uni", "ur", "val", "viv", "vly",
101 "vom", "wah", "wed", "werg", "wex", "whon", "wun", "x",
102 "yerg", "yp", "zun", "tri", "blaa", "jah", "bul", "on",
106 int testcounter = randint1(3) + 1;
108 strcpy(out_string, "");
110 if (randint1(3) == 2)
112 while (testcounter--)
113 strcat(out_string, syllables[randint0(MAX_SYLLABLES)]);
118 testcounter = randint1(2) + 1;
119 while (testcounter--)
121 (void)get_rnd_line("elvish.txt", 0, Syllable);
122 strcat(out_string, Syllable);
126 out_string[0] = toupper(out_string[1]);
128 out_string[16] = '\0';
134 * Create a name from random parts with quotes.
136 void get_table_name(char *out_string)
139 get_table_name_aux(buff);
142 sprintf(out_string, "¡Ø%s¡Ù", buff);
144 sprintf(out_string, "'%s'", buff);
150 * Make random Sindarin name
152 void get_table_sindarin_aux(char *out_string)
159 get_rnd_line("sname.txt", 1, Syllable);
161 strcpy(tmp, Syllable);
163 strcpy(out_string, Syllable);
166 get_rnd_line("sname.txt", 2, Syllable);
168 strcat(tmp, Syllable);
169 sindarin_to_kana(out_string, tmp);
171 strcat(out_string, Syllable);
177 * Make random Sindarin name with quotes
179 void get_table_sindarin(char *out_string)
182 get_table_sindarin_aux(buff);
185 sprintf(out_string, "¡Ø%s¡Ù", buff);
187 sprintf(out_string, "'%s'", buff);
193 * Shuffle flavor indices of a group of objects with given tval
195 static void shuffle_flavors(byte tval)
198 int k_idx_list_num = 0;
201 /* Allocate an array for a list of k_idx */
202 C_MAKE(k_idx_list, max_k_idx, s16b);
204 /* Search objects with given tval for shuffle */
205 for (i = 0; i < max_k_idx; i++)
207 object_kind *k_ptr = &k_info[i];
210 if (k_ptr->tval != tval) continue;
212 /* Paranoia -- Skip objects without flavor */
213 if (!k_ptr->flavor) continue;
215 /* Skip objects with a fixed flavor name */
216 if (have_flag(k_ptr->flags, TR_FIXED_FLAVOR)) continue;
219 k_idx_list[k_idx_list_num] = i;
221 /* Increase number of remembered indices */
225 /* Shuffle flavors */
226 for (i = 0; i < k_idx_list_num; i++)
228 object_kind *k1_ptr = &k_info[k_idx_list[i]];
229 object_kind *k2_ptr = &k_info[k_idx_list[randint0(k_idx_list_num)]];
231 /* Swap flavors of this pair */
232 s16b tmp = k1_ptr->flavor;
233 k1_ptr->flavor = k2_ptr->flavor;
234 k2_ptr->flavor = tmp;
237 /* Free an array for a list of k_idx */
238 C_KILL(k_idx_list, max_k_idx, s16b);
242 * Prepare the "variable" part of the "k_info" array.
244 * The "color"/"metal"/"type" of an item is its "flavor".
245 * For the most part, flavors are assigned randomly each game.
247 * Initialize descriptions for the "colored" objects, including:
248 * Rings, Amulets, Staffs, Wands, Rods, Food, Potions, Scrolls.
250 * The first 4 entries for potions are fixed (Water, Apple Juice,
251 * Slime Mold Juice, Unused Potion).
253 * Scroll titles are always between 6 and 14 letters long. This is
254 * ensured because every title is composed of whole words, where every
255 * word is from 1 to 8 letters long (one or two syllables of 1 to 4
256 * letters each), and that no scroll is finished until it attempts to
257 * grow beyond 15 letters. The first time this can happen is when the
258 * current title has 6 letters and the new word has 8 letters, which
259 * would result in a 6 letter scroll title.
261 * Duplicate titles are avoided by requiring that no two scrolls share
262 * the same first four letters (not the most efficient method, and not
263 * the least efficient method, but it will always work).
265 * Hack -- make sure everything stays the same for each saved game
266 * This is accomplished by the use of a saved "random seed", as in
267 * "town_gen()". Since no other functions are called while the special
268 * seed is in effect, so this function is pretty "safe".
270 * Note that the "hacked seed" may provide an RNG with alternating parity!
272 void flavor_init(void)
275 u32b state_backup[4];
277 /* Hack -- Backup the RNG state */
278 Rand_state_backup(state_backup);
280 /* Hack -- Induce consistant flavors */
281 Rand_state_init(seed_flavor);
284 /* Initialize flavor index of each object by itself */
285 for (i = 0; i < max_k_idx; i++)
287 object_kind *k_ptr = &k_info[i];
289 /* Skip objects without flavor name */
290 if (!k_ptr->flavor_name) continue;
293 * Initialize flavor index to itself
294 * -> Shuffle it later
300 shuffle_flavors(TV_RING);
302 /* Shuffle Amulets */
303 shuffle_flavors(TV_AMULET);
306 shuffle_flavors(TV_STAFF);
309 shuffle_flavors(TV_WAND);
312 shuffle_flavors(TV_ROD);
314 /* Shuffle Mushrooms */
315 shuffle_flavors(TV_FOOD);
317 /* Shuffle Potions */
318 shuffle_flavors(TV_POTION);
320 /* Shuffle Scrolls */
321 shuffle_flavors(TV_SCROLL);
324 /* Hack -- Restore the RNG state */
325 Rand_state_restore(state_backup);
327 /* Analyze every object */
328 for (i = 1; i < max_k_idx; i++)
330 object_kind *k_ptr = &k_info[i];
332 /* Skip "empty" objects */
333 if (!k_ptr->name) continue;
335 /* No flavor yields aware */
336 if (!k_ptr->flavor) k_ptr->aware = TRUE;
338 /* Check for "easily known" */
339 k_ptr->easy_know = object_easy_know(i);
345 * Print a char "c" into a string "t", as if by sprintf(t, "%c", c),
346 * and return a pointer to the terminator (t + 1).
348 static char *object_desc_chr(char *t, char c)
362 * Print a string "s" into a string "t", as if by strcpy(t, s),
363 * and return a pointer to the terminator.
365 static char *object_desc_str(char *t, cptr s)
367 /* Copy the string */
368 while (*s) *t++ = *s++;
380 * Print an unsigned number "n" into a string "t", as if by
381 * sprintf(t, "%u", n), and return a pointer to the terminator.
383 static char *object_desc_num(char *t, uint n)
387 /* Find "size" of "n" */
388 for (p = 1; n >= p * 10; p = p * 10) /* loop */;
390 /* Dump each digit */
396 /* Remove the digit */
399 /* Process next digit */
415 * ÆüËܸì¤Î¸Ä¿ôɽ¼¨¥ë¡¼¥Á¥ó
416 *¡Êcmd1.c ¤ÇήÍѤ¹¤ë¤¿¤á¤Ë object_desc_japanese ¤«¤é°ÜÆ°¤·¤¿¡£¡Ë
419 char *object_desc_kosuu(char *t, object_type *o_ptr)
421 t = object_desc_num(t, o_ptr->number);
433 t = object_desc_str(t, "ËÜ");
438 t = object_desc_str(t, "´¬");
443 t = object_desc_str(t, "Éþ");
447 case TV_SORCERY_BOOK:
455 case TV_CRUSADE_BOOK:
457 case TV_HISSATSU_BOOK:
460 t = object_desc_str(t, "ºý");
468 t = object_desc_str(t, "Ãå");
475 t = object_desc_str(t, "¿¶");
480 t = object_desc_str(t, "");
485 t = object_desc_str(t, "Ëç");
488 /* ¿©¤Ù¤â¤Î by ita */
491 if(o_ptr->sval == SV_FOOD_JERKY)
493 t = object_desc_str(t, "ÀÚ¤ì");
499 if (o_ptr->number < 10)
501 t = object_desc_str(t, "¤Ä");
505 t = object_desc_str(t, "¸Ä");
515 * Print an signed number "v" into a string "t", as if by
516 * sprintf(t, "%+d", n), and return a pointer to the terminator.
517 * Note that we always print a sign, either "+" or "-".
519 static char *object_desc_int(char *t, sint v)
526 /* Take the absolute value */
529 /* Use a "minus" sign */
533 /* Positive (or zero) */
536 /* Use the actual number */
539 /* Use a "plus" sign */
543 /* Find "size" of "n" */
544 for (p = 1; n >= p * 10; p = p * 10) /* loop */;
546 /* Dump each digit */
552 /* Remove the digit */
555 /* Process next digit */
568 * Structs and tables for Auto Inscription for flags
571 typedef struct flag_insc_table
582 static flag_insc_table flag_insc_plus[] =
584 { "¹¶", "At", TR_BLOWS, -1 },
585 { "®", "Sp", TR_SPEED, -1 },
586 { "ÏÓ", "St", TR_STR, -1 },
587 { "ÃÎ", "In", TR_INT, -1 },
588 { "¸", "Wi", TR_WIS, -1 },
589 { "´ï", "Dx", TR_DEX, -1 },
590 { "ÂÑ", "Cn", TR_CON, -1 },
591 { "̥", "Ch", TR_CHR, -1 },
592 { "ƻ", "Md", TR_MAGIC_MASTERY, -1 },
593 { "±£", "Sl", TR_STEALTH, -1 },
594 { "õ", "Sr", TR_SEARCH, -1 },
595 { "ÀÖ", "If", TR_INFRA, -1 },
596 { "·¡", "Dg", TR_TUNNEL, -1 },
597 { NULL, NULL, 0, -1 }
600 static flag_insc_table flag_insc_immune[] =
602 { "»À", "Ac", TR_IM_ACID, -1 },
603 { "ÅÅ", "El", TR_IM_ELEC, -1 },
604 { "²Ð", "Fi", TR_IM_FIRE, -1 },
605 { "Îä", "Co", TR_IM_COLD, -1 },
606 { NULL, NULL, 0, -1 }
609 static flag_insc_table flag_insc_resistance[] =
611 { "»À", "Ac", TR_RES_ACID, TR_IM_ACID },
612 { "ÅÅ", "El", TR_RES_ELEC, TR_IM_ELEC },
613 { "²Ð", "Fi", TR_RES_FIRE, TR_IM_FIRE },
614 { "Îä", "Co", TR_RES_COLD, TR_IM_COLD },
615 { "ÆÇ", "Po", TR_RES_POIS, -1 },
616 { "Á®", "Li", TR_RES_LITE, -1 },
617 { "°Å", "Dk", TR_RES_DARK, -1 },
618 { "ÇË", "Sh", TR_RES_SHARDS, -1 },
619 { "ÌÕ", "Bl", TR_RES_BLIND, -1 },
620 { "Íð", "Cf", TR_RES_CONF, -1 },
621 { "¹ì", "So", TR_RES_SOUND, -1 },
622 { "¹ö", "Nt", TR_RES_NETHER, -1 },
623 { "°ø", "Nx", TR_RES_NEXUS, -1 },
624 { "ÆÙ", "Ca", TR_RES_CHAOS, -1 },
625 { "Îô", "Di", TR_RES_DISEN, -1 },
626 { "¶²", "Fe", TR_RES_FEAR, -1 },
627 { NULL, NULL, 0, -1 }
630 static flag_insc_table flag_insc_misc[] =
632 { "°×", "Es", TR_EASY_SPELL, -1 },
633 { "¸º", "Dm", TR_DEC_MANA, -1 },
634 { "Åê", "Th", TR_THROW, -1 },
635 { "ȿ", "Rf", TR_REFLECT, -1 },
636 { "Ëã", "Fa", TR_FREE_ACT, -1 },
637 { "ȑ", "Si", TR_SEE_INVIS, -1 },
638 { "·Ð", "Hl", TR_HOLD_LIFE, -1 },
639 { "ÃÙ", "Sd", TR_SLOW_DIGEST, -1 },
640 { "³è", "Rg", TR_REGEN, -1 },
641 { "Éâ", "Lv", TR_LEVITATION, -1 },
642 { "ÌÀ", "Lu", TR_LITE, -1 },
643 { "·Ù", "Wr", TR_WARNING, -1 },
644 { "ÇÜ", "Xm", TR_XTRA_MIGHT, -1 },
645 { "¼Í", "Xs", TR_XTRA_SHOTS, -1 },
646 { "½Ö", "Te", TR_TELEPORT, -1 },
647 { "ÅÜ", "Ag", TR_AGGRAVATE, -1 },
648 { "½Ë", "Bs", TR_BLESSED, -1 },
649 { "´÷", "Ty", TR_TY_CURSE, -1 },
650 { "¼ö", "C-", TR_ADD_L_CURSE, -1 },
651 { "ëÇ", "C+", TR_ADD_H_CURSE, -1 },
652 { NULL, NULL, 0, -1 }
655 static flag_insc_table flag_insc_aura[] =
657 { "±ê", "F", TR_SH_FIRE, -1 },
658 { "ÅÅ", "E", TR_SH_ELEC, -1 },
659 { "Îä", "C", TR_SH_COLD, -1 },
660 { "Ëâ", "M", TR_NO_MAGIC, -1 },
661 { "½Ö", "T", TR_NO_TELE, -1 },
662 { NULL, NULL, 0, -1 }
665 static flag_insc_table flag_insc_brand[] =
667 { "»À", "A", TR_BRAND_ACID, -1 },
668 { "ÅÅ", "E", TR_BRAND_ELEC, -1 },
669 { "¾Æ", "F", TR_BRAND_FIRE, -1 },
670 { "Åà", "Co", TR_BRAND_COLD, -1 },
671 { "ÆÇ", "P", TR_BRAND_POIS, -1 },
672 { "ÆÙ", "Ca", TR_CHAOTIC, -1 },
673 { "µÛ", "V", TR_VAMPIRIC, -1 },
674 { "¿Ì", "Q", TR_IMPACT, -1 },
675 { "ÀÚ", "S", TR_VORPAL, -1 },
676 { "Íý", "M", TR_FORCE_WEAPON, -1 },
677 { NULL, NULL, 0, -1 }
680 static flag_insc_table flag_insc_kill[] =
682 { "¼Ù", "*", TR_KILL_EVIL, -1 },
683 { "¿Í", "p", TR_KILL_HUMAN, -1 },
684 { "ζ", "D", TR_KILL_DRAGON, -1 },
685 { "¥ª", "o", TR_KILL_ORC, -1 },
686 { "¥È", "T", TR_KILL_TROLL, -1 },
687 { "µð", "P", TR_KILL_GIANT, -1 },
688 { "¥Ç", "U", TR_KILL_DEMON, -1 },
689 { "Ȉ", "L", TR_KILL_UNDEAD, -1 },
690 { "ư", "Z", TR_KILL_ANIMAL, -1 },
691 { NULL, NULL, 0, -1 }
694 static flag_insc_table flag_insc_slay[] =
696 { "¼Ù", "*", TR_SLAY_EVIL, TR_KILL_EVIL },
697 { "¿Í", "p", TR_SLAY_HUMAN, TR_KILL_HUMAN },
698 { "ε", "D", TR_SLAY_DRAGON, TR_KILL_DRAGON },
699 { "¥ª", "o", TR_SLAY_ORC, TR_KILL_ORC },
700 { "¥È", "T", TR_SLAY_TROLL, TR_KILL_TROLL },
701 { "µð", "P", TR_SLAY_GIANT, TR_KILL_GIANT },
702 { "¥Ç", "U", TR_SLAY_DEMON, TR_KILL_DEMON },
703 { "Ȉ", "L", TR_SLAY_UNDEAD, TR_KILL_UNDEAD },
704 { "ư", "Z", TR_SLAY_ANIMAL, TR_KILL_ANIMAL },
705 { NULL, NULL, 0, -1 }
708 static flag_insc_table flag_insc_esp1[] =
710 { "´¶", "Tele", TR_TELEPATHY, -1 },
711 { "¼Ù", "Evil", TR_ESP_EVIL, -1 },
712 { "Á±", "Good", TR_ESP_GOOD, -1 },
713 { "̵", "Nolv", TR_ESP_NONLIVING, -1 },
714 { "¸Ä", "Uniq", TR_ESP_UNIQUE, -1 },
715 { NULL, NULL, 0, -1 }
718 static flag_insc_table flag_insc_esp2[] =
720 { "¿Í", "p", TR_ESP_HUMAN, -1 },
721 { "ε", "D", TR_ESP_DRAGON, -1 },
722 { "¥ª", "o", TR_ESP_ORC, -1 },
723 { "¥È", "T", TR_ESP_TROLL, -1 },
724 { "µð", "P", TR_ESP_GIANT, -1 },
725 { "¥Ç", "U", TR_ESP_DEMON, -1 },
726 { "Ȉ", "L", TR_ESP_UNDEAD, -1 },
727 { "ư", "Z", TR_ESP_ANIMAL, -1 },
728 { NULL, NULL, 0, -1 }
731 static flag_insc_table flag_insc_sust[] =
733 { "ÏÓ", "St", TR_SUST_STR, -1 },
734 { "ÃÎ", "In", TR_SUST_INT, -1 },
735 { "¸", "Wi", TR_SUST_WIS, -1 },
736 { "´ï", "Dx", TR_SUST_DEX, -1 },
737 { "ÂÑ", "Cn", TR_SUST_CON, -1 },
738 { "̥", "Ch", TR_SUST_CHR, -1 },
739 { NULL, NULL, 0, -1 }
743 static flag_insc_table flag_insc_plus[] =
745 { "At", TR_BLOWS, -1 },
746 { "Sp", TR_SPEED, -1 },
747 { "St", TR_STR, -1 },
748 { "In", TR_INT, -1 },
749 { "Wi", TR_WIS, -1 },
750 { "Dx", TR_DEX, -1 },
751 { "Cn", TR_CON, -1 },
752 { "Ch", TR_CHR, -1 },
753 { "Md", TR_MAGIC_MASTERY, -1 },
754 { "Sl", TR_STEALTH, -1 },
755 { "Sr", TR_SEARCH, -1 },
756 { "If", TR_INFRA, -1 },
757 { "Dg", TR_TUNNEL, -1 },
761 static flag_insc_table flag_insc_immune[] =
763 { "Ac", TR_IM_ACID, -1 },
764 { "El", TR_IM_ELEC, -1 },
765 { "Fi", TR_IM_FIRE, -1 },
766 { "Co", TR_IM_COLD, -1 },
770 static flag_insc_table flag_insc_resistance[] =
772 { "Ac", TR_RES_ACID, TR_IM_ACID },
773 { "El", TR_RES_ELEC, TR_IM_ELEC },
774 { "Fi", TR_RES_FIRE, TR_IM_FIRE },
775 { "Co", TR_RES_COLD, TR_IM_COLD },
776 { "Po", TR_RES_POIS, -1 },
777 { "Li", TR_RES_LITE, -1 },
778 { "Dk", TR_RES_DARK, -1 },
779 { "Sh", TR_RES_SHARDS, -1 },
780 { "Bl", TR_RES_BLIND, -1 },
781 { "Cf", TR_RES_CONF, -1 },
782 { "So", TR_RES_SOUND, -1 },
783 { "Nt", TR_RES_NETHER, -1 },
784 { "Nx", TR_RES_NEXUS, -1 },
785 { "Ca", TR_RES_CHAOS, -1 },
786 { "Di", TR_RES_DISEN, -1 },
787 { "Fe", TR_RES_FEAR, -1 },
791 static flag_insc_table flag_insc_misc[] =
793 { "Es", TR_EASY_SPELL, -1 },
794 { "Dm", TR_DEC_MANA, -1 },
795 { "Th", TR_THROW, -1 },
796 { "Rf", TR_REFLECT, -1 },
797 { "Fa", TR_FREE_ACT, -1 },
798 { "Si", TR_SEE_INVIS, -1 },
799 { "Hl", TR_HOLD_LIFE, -1 },
800 { "Sd", TR_SLOW_DIGEST, -1 },
801 { "Rg", TR_REGEN, -1 },
802 { "Lv", TR_LEVITATION, -1 },
803 { "Lu", TR_LITE, -1 },
804 { "Wr", TR_WARNING, -1 },
805 { "Xm", TR_XTRA_MIGHT, -1 },
806 { "Xs", TR_XTRA_SHOTS, -1 },
807 { "Te", TR_TELEPORT, -1 },
808 { "Ag", TR_AGGRAVATE, -1 },
809 { "Bs", TR_BLESSED, -1 },
810 { "Ty", TR_TY_CURSE, -1 },
811 { "C-", TR_ADD_L_CURSE, -1 },
812 { "C+", TR_ADD_H_CURSE, -1 },
816 static flag_insc_table flag_insc_aura[] =
818 { "F", TR_SH_FIRE, -1 },
819 { "E", TR_SH_ELEC, -1 },
820 { "C", TR_SH_COLD, -1 },
821 { "M", TR_NO_MAGIC, -1 },
822 { "T", TR_NO_TELE, -1 },
826 static flag_insc_table flag_insc_brand[] =
828 { "A", TR_BRAND_ACID, -1 },
829 { "E", TR_BRAND_ELEC, -1 },
830 { "F", TR_BRAND_FIRE, -1 },
831 { "Co", TR_BRAND_COLD, -1 },
832 { "P", TR_BRAND_POIS, -1 },
833 { "Ca", TR_CHAOTIC, -1 },
834 { "V", TR_VAMPIRIC, -1 },
835 { "Q", TR_IMPACT, -1 },
836 { "S", TR_VORPAL, -1 },
837 { "M", TR_FORCE_WEAPON, -1 },
841 static flag_insc_table flag_insc_kill[] =
843 { "*", TR_KILL_EVIL, -1 },
844 { "p", TR_KILL_HUMAN, -1 },
845 { "D", TR_KILL_DRAGON, -1 },
846 { "o", TR_KILL_ORC, -1 },
847 { "T", TR_KILL_TROLL, -1 },
848 { "P", TR_KILL_GIANT, -1 },
849 { "U", TR_KILL_DEMON, -1 },
850 { "L", TR_KILL_UNDEAD, -1 },
851 { "Z", TR_KILL_ANIMAL, -1 },
855 static flag_insc_table flag_insc_slay[] =
857 { "*", TR_SLAY_EVIL, TR_KILL_EVIL },
858 { "p", TR_SLAY_HUMAN, TR_KILL_HUMAN },
859 { "D", TR_SLAY_DRAGON, TR_KILL_DRAGON },
860 { "o", TR_SLAY_ORC, TR_KILL_ORC },
861 { "T", TR_SLAY_TROLL, TR_KILL_TROLL },
862 { "P", TR_SLAY_GIANT, TR_KILL_GIANT },
863 { "U", TR_SLAY_DEMON, TR_KILL_DEMON },
864 { "L", TR_SLAY_UNDEAD, TR_KILL_UNDEAD },
865 { "Z", TR_SLAY_ANIMAL, TR_KILL_ANIMAL },
869 static flag_insc_table flag_insc_esp1[] =
871 { "Tele", TR_TELEPATHY, -1 },
872 { "Evil", TR_ESP_EVIL, -1 },
873 { "Good", TR_ESP_GOOD, -1 },
874 { "Nolv", TR_ESP_NONLIVING, -1 },
875 { "Uniq", TR_ESP_UNIQUE, -1 },
879 static flag_insc_table flag_insc_esp2[] =
881 { "p", TR_ESP_HUMAN, -1 },
882 { "D", TR_ESP_DRAGON, -1 },
883 { "o", TR_ESP_ORC, -1 },
884 { "T", TR_ESP_TROLL, -1 },
885 { "P", TR_ESP_GIANT, -1 },
886 { "U", TR_ESP_DEMON, -1 },
887 { "L", TR_ESP_UNDEAD, -1 },
888 { "Z", TR_ESP_ANIMAL, -1 },
892 static flag_insc_table flag_insc_sust[] =
894 { "St", TR_SUST_STR, -1 },
895 { "In", TR_SUST_INT, -1 },
896 { "Wi", TR_SUST_WIS, -1 },
897 { "Dx", TR_SUST_DEX, -1 },
898 { "Cn", TR_SUST_CON, -1 },
899 { "Ch", TR_SUST_CHR, -1 },
904 /* Simple macro for get_inscription() */
905 #define ADD_INSC(STR) (void)(ptr = object_desc_str(ptr, (STR)))
908 * Helper function for get_inscription()
910 static char *inscribe_flags_aux(flag_insc_table *fi_ptr, u32b flgs[TR_FLAG_SIZE], bool kanji, char *ptr)
916 while (fi_ptr->english)
918 if (have_flag(flgs, fi_ptr->flag) &&
919 (fi_ptr->except_flag == -1 || !have_flag(flgs, fi_ptr->except_flag)))
921 ADD_INSC(kanji ? fi_ptr->japanese : fi_ptr->english);
923 ADD_INSC(fi_ptr->english);
933 * Special variation of have_flag for auto-inscription
935 static bool have_flag_of(flag_insc_table *fi_ptr, u32b flgs[TR_FLAG_SIZE])
937 while (fi_ptr->english)
939 if (have_flag(flgs, fi_ptr->flag) &&
940 (fi_ptr->except_flag == -1 || !have_flag(flgs, fi_ptr->except_flag)))
948 static char *get_ability_abbreviation(char *ptr, object_type *o_ptr, bool kanji, bool all)
950 char *prev_ptr = ptr;
951 u32b flgs[TR_FLAG_SIZE];
953 /* Extract the flags */
954 object_flags(o_ptr, flgs);
957 /* Remove obvious flags */
960 object_kind *k_ptr = &k_info[o_ptr->k_idx];
964 for (j = 0; j < TR_FLAG_SIZE; j++)
965 flgs[j] &= ~k_ptr->flags[j];
967 if (object_is_fixed_artifact(o_ptr))
969 artifact_type *a_ptr = &a_info[o_ptr->name1];
971 for (j = 0; j < TR_FLAG_SIZE; j++)
972 flgs[j] &= ~a_ptr->flags[j];
975 if (object_is_ego(o_ptr))
977 ego_item_type *e_ptr = &e_info[o_ptr->name2];
979 for (j = 0; j < TR_FLAG_SIZE; j++)
980 flgs[j] &= ~e_ptr->flags[j];
986 if (have_flag_of(flag_insc_plus, flgs))
991 ptr = inscribe_flags_aux(flag_insc_plus, flgs, kanji, ptr);
994 if (have_flag_of(flag_insc_immune, flgs))
996 if (!kanji && ptr != prev_ptr)
1003 ptr = inscribe_flags_aux(flag_insc_immune, flgs, kanji, ptr);
1006 if (have_flag_of(flag_insc_resistance, flgs))
1010 else if (ptr != prev_ptr)
1016 ptr = inscribe_flags_aux(flag_insc_resistance, flgs, kanji, ptr);
1019 if (have_flag_of(flag_insc_misc, flgs))
1021 if (ptr != prev_ptr)
1027 ptr = inscribe_flags_aux(flag_insc_misc, flgs, kanji, ptr);
1030 if (have_flag_of(flag_insc_aura, flgs))
1034 ptr = inscribe_flags_aux(flag_insc_aura, flgs, kanji, ptr);
1037 if (have_flag_of(flag_insc_brand, flgs))
1039 ptr = inscribe_flags_aux(flag_insc_brand, flgs, kanji, ptr);
1042 if (have_flag_of(flag_insc_kill, flgs))
1044 ptr = inscribe_flags_aux(flag_insc_kill, flgs, kanji, ptr);
1047 if (have_flag_of(flag_insc_slay, flgs))
1049 ptr = inscribe_flags_aux(flag_insc_slay, flgs, kanji, ptr);
1054 if (have_flag_of(flag_insc_esp1, flgs) ||
1055 have_flag_of(flag_insc_esp2, flgs))
1057 ptr = inscribe_flags_aux(flag_insc_esp1, flgs, kanji, ptr);
1058 ptr = inscribe_flags_aux(flag_insc_esp2, flgs, kanji, ptr);
1062 if (have_flag_of(flag_insc_esp1, flgs))
1064 ptr = inscribe_flags_aux(flag_insc_esp1, flgs, kanji, ptr);
1065 if (have_flag_of(flag_insc_esp2, flgs))
1067 ptr = inscribe_flags_aux(flag_insc_esp2, flgs, kanji, ptr);
1071 if (have_flag_of(flag_insc_sust, flgs))
1075 ptr = inscribe_flags_aux(flag_insc_sust, flgs, kanji, ptr);
1084 * Get object inscription with auto inscription of object flags.
1086 static void get_inscription(char *buff, object_type *o_ptr)
1088 cptr insc = quark_str(o_ptr->inscription);
1091 /* Not fully identified */
1092 if (!(o_ptr->ident & IDENT_MENTAL))
1094 /* Copy until end of line or '#' */
1097 if (*insc == '#') break;
1099 if (iskanji(*insc)) *buff++ = *insc++;
1109 for (; *insc; insc++)
1111 /* Ignore fake artifact inscription */
1112 if (*insc == '#') break;
1114 /* {%} will be automatically converted */
1115 else if ('%' == *insc)
1121 /* check for too long inscription */
1122 if (ptr >= buff + MAX_NLEN) continue;
1135 if ('a' == insc[1] && 'l' == insc[2] && 'l' == insc[3])
1145 ptr = get_ability_abbreviation(ptr, o_ptr, kanji, all);
1158 bool object_is_quest_target(object_type *o_ptr)
1160 if (p_ptr->inside_quest)
1162 int a_idx = quest[p_ptr->inside_quest].k_idx;
1165 artifact_type *a_ptr = &a_info[a_idx];
1166 if (!(a_ptr->gen_flags & TRG_INSTA_ART))
1168 if((o_ptr->tval == a_ptr->tval) && (o_ptr->sval == a_ptr->sval))
1180 * Creates a description of the item "o_ptr", and stores it in "out_val".
1182 * One can choose the "verbosity" of the description, including whether
1183 * or not the "number" of items should be described, and how much detail
1184 * should be used when describing the item.
1186 * The given "buf" must be MAX_NLEN chars long to hold the longest possible
1187 * description, which can get pretty long, including incriptions, such as:
1188 * "no more Maces of Disruption (Defender) (+10,+10) [+5] (+3 to stealth)".
1189 * Note that the inscription will be clipped to keep the total description
1190 * under MAX_NLEN-1 chars (plus a terminator).
1192 * Note the use of "object_desc_num()" and "object_desc_int()" as hyper-efficient,
1193 * portable, versions of some common "sprintf()" commands.
1195 * Note that all ego-items (when known) append an "Ego-Item Name", unless
1196 * the item is also an artifact, which should NEVER happen.
1198 * Note that all artifacts (when known) append an "Artifact Name", so we
1199 * have special processing for "Specials" (artifact Lites, Rings, Amulets).
1200 * The "Specials" never use "modifiers" if they are "known", since they
1201 * have special "descriptions", such as "The Necklace of the Dwarves".
1203 * Special Lite's use the "k_info" base-name (Phial, Star, or Arkenstone),
1204 * plus the artifact name, just like any other artifact, if known.
1206 * Special Ring's and Amulet's, if not "aware", use the same code as normal
1207 * rings and amulets, and if "aware", use the "k_info" base-name (Ring or
1208 * Amulet or Necklace). They will NEVER "append" the "k_info" name. But,
1209 * they will append the artifact name, just like any artifact, if known.
1211 * Hack -- Display "The One Ring" as "a Plain Gold Ring" until aware.
1214 * OD_NAME_ONLY : The Cloak of Death
1215 * OD_NAME_AND_ENCHANT : The Cloak of Death [1,+3]
1216 * OD_OMIT_INSCRIPTION : The Cloak of Death [1,+3] (+2 to Stealth)
1217 * 0 : The Cloak of Death [1,+3] (+2 to Stealth) {nifty}
1219 * OD_OMIT_PREFIX : Forbidden numeric prefix
1220 * OD_NO_PLURAL : Forbidden use of plural
1221 * OD_STORE : Assume to be aware and known
1222 * OD_NO_FLAVOR : Allow to hidden flavor
1223 * OD_FORCE_FLAVOR : Get un-shuffled flavor name
1225 void object_desc(char *buf, object_type *o_ptr, u32b mode)
1227 /* Extract object kind name */
1228 cptr kindname = k_name + k_info[o_ptr->k_idx].name;
1230 /* Extract default "base" string */
1231 cptr basenm = kindname;
1233 /* Assume no "modifier" string */
1243 bool show_weapon = FALSE;
1244 bool show_armour = FALSE;
1249 char p1 = '(', p2 = ')';
1250 char b1 = '[', b2 = ']';
1251 char c1 = '{', c2 = '}';
1253 char tmp_val[MAX_NLEN+160];
1254 char tmp_val2[MAX_NLEN+10];
1255 char fake_insc_buf[30];
1257 u32b flgs[TR_FLAG_SIZE];
1259 object_type *bow_ptr;
1261 object_kind *k_ptr = &k_info[o_ptr->k_idx];
1262 object_kind *flavor_k_ptr = &k_info[k_ptr->flavor];
1264 /* Extract some flags */
1265 object_flags(o_ptr, flgs);
1267 /* See if the object is "aware" */
1268 if (object_is_aware(o_ptr)) aware = TRUE;
1270 /* See if the object is "known" */
1271 if (object_is_known(o_ptr)) known = TRUE;
1273 /* Allow flavors to be hidden when aware */
1274 if (aware && ((mode & OD_NO_FLAVOR) || plain_descriptions)) flavor = FALSE;
1276 /* Object is in the inventory of a store or spoiler */
1277 if ((mode & OD_STORE) || (o_ptr->ident & IDENT_STORE))
1279 /* Don't show flavors */
1282 /* Pretend known and aware */
1287 /* Force to be flavor name only */
1288 if (mode & OD_FORCE_FLAVOR)
1294 /* Cancel shuffling */
1295 flavor_k_ptr = k_ptr;
1298 /* Analyze the object */
1299 switch (o_ptr->tval)
1301 /* Some objects are easy to describe */
1315 monster_race *r_ptr = &r_info[o_ptr->pval];
1324 modstr = " (empty)";
1330 sprintf(tmp_val2, " (%s)",r_name + r_ptr->name);
1333 cptr t = r_name + r_ptr->name;
1335 if (!(r_ptr->flags1 & RF1_UNIQUE))
1337 sprintf(tmp_val2, " (%s%s)", (is_a_vowel(*t) ? "an " : "a "), t);
1343 sprintf(tmp_val2, "(%s)", t);
1353 /* Figurines/Statues */
1357 monster_race *r_ptr = &r_info[o_ptr->pval];
1360 modstr = r_name + r_ptr->name;
1362 cptr t = r_name + r_ptr->name;
1364 if (!(r_ptr->flags1 & RF1_UNIQUE))
1366 sprintf(tmp_val2, "%s%s", (is_a_vowel(*t) ? "an " : "a "), t);
1383 monster_race *r_ptr = &r_info[o_ptr->pval];
1385 modstr = r_name + r_ptr->name;
1390 if (r_ptr->flags1 & RF1_UNIQUE)
1391 basenm = "& % of #";
1399 /* Missiles/ Bows/ Weapons */
1428 /* Lites (including a few "Specials") */
1434 /* Amulets (including a few "Specials") */
1437 /* Known artifacts */
1440 if (object_is_fixed_artifact(o_ptr)) break;
1441 if (k_ptr->gen_flags & TRG_INSTA_ART) break;
1444 /* Color the object */
1445 modstr = k_name + flavor_k_ptr->flavor_name;
1448 if (!flavor) basenm = "%¤Î¥¢¥ß¥å¥ì¥Ã¥È";
1449 else if (aware) basenm = "%¤Î#¥¢¥ß¥å¥ì¥Ã¥È";
1450 else basenm = "#¥¢¥ß¥å¥ì¥Ã¥È";
1452 if (!flavor) basenm = "& Amulet~ of %";
1453 else if (aware) basenm = "& # Amulet~ of %";
1454 else basenm = "& # Amulet~";
1460 /* Rings (including a few "Specials") */
1463 /* Known artifacts */
1466 if (object_is_fixed_artifact(o_ptr)) break;
1467 if (k_ptr->gen_flags & TRG_INSTA_ART) break;
1470 /* Color the object */
1471 modstr = k_name + flavor_k_ptr->flavor_name;
1474 if (!flavor) basenm = "%¤Î»ØÎØ";
1475 else if (aware) basenm = "%¤Î#»ØÎØ";
1476 else basenm = "#»ØÎØ";
1478 if (!flavor) basenm = "& Ring~ of %";
1479 else if (aware) basenm = "& # Ring~ of %";
1480 else basenm = "& # Ring~";
1483 if (!k_ptr->to_h && !k_ptr->to_d && (o_ptr->to_h || o_ptr->to_d)) show_weapon = TRUE;
1495 /* Color the object */
1496 modstr = k_name + flavor_k_ptr->flavor_name;
1499 if (!flavor) basenm = "%¤Î¾ó";
1500 else if (aware) basenm = "%¤Î#¾ó";
1501 else basenm = "#¾ó";
1503 if (!flavor) basenm = "& Staff~ of %";
1504 else if (aware) basenm = "& # Staff~ of %";
1505 else basenm = "& # Staff~";
1513 /* Color the object */
1514 modstr = k_name + flavor_k_ptr->flavor_name;
1517 if (!flavor) basenm = "%¤ÎËâË¡ËÀ";
1518 else if (aware) basenm = "%¤Î#ËâË¡ËÀ";
1519 else basenm = "#ËâË¡ËÀ";
1521 if (!flavor) basenm = "& Wand~ of %";
1522 else if (aware) basenm = "& # Wand~ of %";
1523 else basenm = "& # Wand~";
1531 /* Color the object */
1532 modstr = k_name + flavor_k_ptr->flavor_name;
1535 if (!flavor) basenm = "%¤Î¥í¥Ã¥É";
1536 else if (aware) basenm = "%¤Î#¥í¥Ã¥É";
1537 else basenm = "#¥í¥Ã¥É";
1539 if (!flavor) basenm = "& Rod~ of %";
1540 else if (aware) basenm = "& # Rod~ of %";
1541 else basenm = "& # Rod~";
1549 /* Color the object */
1550 modstr = k_name + flavor_k_ptr->flavor_name;
1553 if (!flavor) basenm = "%¤Î´¬Êª";
1554 else if (aware) basenm = "¡Ö#¡×¤È½ñ¤«¤ì¤¿%¤Î´¬Êª";
1555 else basenm = "¡Ö#¡×¤È½ñ¤«¤ì¤¿´¬Êª";
1557 if (!flavor) basenm = "& Scroll~ of %";
1558 else if (aware) basenm = "& Scroll~ titled \"#\" of %";
1559 else basenm = "& Scroll~ titled \"#\"";
1567 /* Color the object */
1568 modstr = k_name + flavor_k_ptr->flavor_name;
1571 if (!flavor) basenm = "%¤ÎÌô";
1572 else if (aware) basenm = "%¤Î#Ìô";
1573 else basenm = "#Ìô";
1575 if (!flavor) basenm = "& Potion~ of %";
1576 else if (aware) basenm = "& # Potion~ of %";
1577 else basenm = "& # Potion~";
1585 /* Ordinary food is "boring" */
1586 if (!k_ptr->flavor_name) break;
1588 /* Color the object */
1589 modstr = k_name + flavor_k_ptr->flavor_name;
1592 if (!flavor) basenm = "%¤Î¥¥Î¥³";
1593 else if (aware) basenm = "%¤Î#¥¥Î¥³";
1594 else basenm = "#¥¥Î¥³";
1596 if (!flavor) basenm = "& Mushroom~ of %";
1597 else if (aware) basenm = "& # Mushroom~ of %";
1598 else basenm = "& # Mushroom~";
1607 basenm = "ÍÓÈé»æ - %";
1609 basenm = "& Parchment~ - %";
1618 basenm = "À¸Ì¿¤ÎËâË¡½ñ%";
1620 if (mp_ptr->spell_book == TV_LIFE_BOOK)
1621 basenm = "& Book~ of Life Magic %";
1623 basenm = "& Life Spellbook~ %";
1629 case TV_SORCERY_BOOK:
1632 basenm = "Àç½Ñ¤ÎËâË¡½ñ%";
1634 if (mp_ptr->spell_book == TV_LIFE_BOOK)
1635 basenm = "& Book~ of Sorcery %";
1637 basenm = "& Sorcery Spellbook~ %";
1643 case TV_NATURE_BOOK:
1646 basenm = "¼«Á³¤ÎËâË¡½ñ%";
1648 if (mp_ptr->spell_book == TV_LIFE_BOOK)
1649 basenm = "& Book~ of Nature Magic %";
1651 basenm = "& Nature Spellbook~ %";
1660 basenm = "¥«¥ª¥¹¤ÎËâË¡½ñ%";
1662 if (mp_ptr->spell_book == TV_LIFE_BOOK)
1663 basenm = "& Book~ of Chaos Magic %";
1665 basenm = "& Chaos Spellbook~ %";
1674 basenm = "°Å¹õ¤ÎËâË¡½ñ%";
1676 if (mp_ptr->spell_book == TV_LIFE_BOOK)
1677 basenm = "& Book~ of Death Magic %";
1679 basenm = "& Death Spellbook~ %";
1688 basenm = "¥È¥é¥ó¥×¤ÎËâË¡½ñ%";
1690 if (mp_ptr->spell_book == TV_LIFE_BOOK)
1691 basenm = "& Book~ of Trump Magic %";
1693 basenm = "& Trump Spellbook~ %";
1699 case TV_ARCANE_BOOK:
1702 basenm = "Èë½Ñ¤ÎËâË¡½ñ%";
1704 if (mp_ptr->spell_book == TV_LIFE_BOOK)
1705 basenm = "& Book~ of Arcane Magic %";
1707 basenm = "& Arcane Spellbook~ %";
1716 basenm = "¾¢¤ÎËâË¡½ñ%";
1718 if (mp_ptr->spell_book == TV_LIFE_BOOK)
1719 basenm = "& Book~ of Craft Magic %";
1721 basenm = "& Craft Spellbook~ %";
1727 case TV_DAEMON_BOOK:
1730 basenm = "°Ëâ¤ÎËâË¡½ñ%";
1732 if (mp_ptr->spell_book == TV_LIFE_BOOK)
1733 basenm = "& Book~ of Daemon Magic %";
1735 basenm = "& Daemon Spellbook~ %";
1741 case TV_CRUSADE_BOOK:
1744 basenm = "Ç˼٤ÎËâË¡½ñ%";
1746 if (mp_ptr->spell_book == TV_LIFE_BOOK)
1747 basenm = "& Book~ of Crusade Magic %";
1749 basenm = "& Crusade Spellbook~ %";
1760 basenm = "& Song Book~ %";
1766 case TV_HISSATSU_BOOK:
1769 basenm = "& Éð·Ý¤Î½ñ%";
1771 basenm = "Book~ of Kendo %";
1780 basenm = "¼ö½Ñ¤ÎËâË¡½ñ%";
1782 if (mp_ptr->spell_book == TV_LIFE_BOOK)
1783 basenm = "& Book~ of Crusade Magic %";
1785 basenm = "& Crusade Spellbook~ %";
1791 /* Hack -- Gold/Gems */
1794 strcpy(buf, basenm);
1798 /* Used in the "inventory" routine */
1802 strcpy(buf, "(¤Ê¤·)");
1804 strcpy(buf, "(nothing)");
1811 /* Use full name from k_info or a_info */
1812 if (aware && have_flag(flgs, TR_FULL_NAME))
1814 if (known && o_ptr->name1) basenm = a_name + a_info[o_ptr->name1].name;
1815 else basenm = kindname;
1818 /* Start dumping the result */
1822 if (basenm[0] == '&')
1828 if (mode & OD_OMIT_PREFIX)
1832 else if (o_ptr->number > 1)
1834 t = object_desc_kosuu(t, o_ptr);
1835 t = object_desc_str(t, "¤Î ");
1838 /* ±Ñ¸ì¤Î¾ì¹ç¥¢¡¼¥Æ¥£¥Õ¥¡¥¯¥È¤Ï The ¤¬ÉÕ¤¯¤Î¤Çʬ¤«¤ë¤¬
1839 * ÆüËܸì¤Ç¤Ïʬ¤«¤é¤Ê¤¤¤Î¤Ç¥Þ¡¼¥¯¤ò¤Ä¤±¤ë
1843 if (object_is_fixed_artifact(o_ptr)) t = object_desc_str(t, "¡ú");
1844 else if (o_ptr->art_name) t = object_desc_str(t, "¡ù");
1849 /* The object "expects" a "number" */
1850 if (basenm[0] == '&')
1852 /* Skip the ampersand (and space) */
1856 if (mode & OD_OMIT_PREFIX)
1861 /* Hack -- None left */
1862 else if (o_ptr->number <= 0)
1864 t = object_desc_str(t, "no more ");
1867 /* Extract the number */
1868 else if (o_ptr->number > 1)
1870 t = object_desc_num(t, o_ptr->number);
1871 t = object_desc_chr(t, ' ');
1874 /* Hack -- The only one of its kind */
1875 else if ((known && object_is_artifact(o_ptr)) ||
1876 ((o_ptr->tval == TV_CORPSE) &&
1877 (r_info[o_ptr->pval].flags1 & RF1_UNIQUE)))
1879 t = object_desc_str(t, "The ");
1889 case '#': vowel = is_a_vowel(modstr[0]); break;
1890 case '%': vowel = is_a_vowel(*kindname); break;
1891 default: vowel = is_a_vowel(*s); break;
1896 /* A single one, with a vowel */
1897 t = object_desc_str(t, "an ");
1901 /* A single one, without a vowel */
1902 t = object_desc_str(t, "a ");
1907 /* Hack -- objects that "never" take an article */
1914 if (mode & OD_OMIT_PREFIX)
1919 /* Hack -- all gone */
1920 else if (o_ptr->number <= 0)
1922 t = object_desc_str(t, "no more ");
1925 /* Prefix a number if required */
1926 else if (o_ptr->number > 1)
1928 t = object_desc_num(t, o_ptr->number);
1929 t = object_desc_chr(t, ' ');
1932 /* Hack -- The only one of its kind */
1933 else if (known && object_is_artifact(o_ptr))
1935 t = object_desc_str(t, "The ");
1938 /* Hack -- single items get no prefix */
1946 /* Paranoia -- skip illegal tildes */
1947 /* while (*s == '~') s++; */
1950 if (object_is_smith(o_ptr))
1952 t = object_desc_str(t, format("ÃÃÌê»Õ%s¤Î", player_name));
1955 /* ÅÁÀâ¤Î¥¢¥¤¥Æ¥à¡¢Ì¾¤Î¤¢¤ë¥¢¥¤¥Æ¥à¤Î̾Á°¤òÉղ乤ë */
1958 /* ¥é¥ó¥À¥à¡¦¥¢¡¼¥Æ¥£¥Õ¥¡¥¯¥È */
1959 if (o_ptr->art_name)
1961 cptr temp = quark_str(o_ptr->art_name);
1963 /* '¡Ø' ¤«¤é»Ï¤Þ¤é¤Ê¤¤ÅÁÀâ¤Î¥¢¥¤¥Æ¥à¤Î̾Á°¤ÏºÇ½é¤ËÉղ乤ë */
1964 /* ±Ñ¸ìÈǤΥ»¡¼¥Ö¥Õ¥¡¥¤¥ë¤«¤éÍ褿 'of XXX' ¤Ï,¡ÖXXX¤Î¡×¤Èɽ¼¨¤¹¤ë */
1965 if (strncmp(temp, "of ", 3) == 0)
1967 t = object_desc_str(t, &temp[3]);
1968 t = object_desc_str(t, "¤Î");
1970 else if ((strncmp(temp, "¡Ø", 2) != 0) &&
1971 (strncmp(temp, "¡Ô", 2) != 0) &&
1973 t = object_desc_str(t, temp);
1975 /* ÅÁÀâ¤Î¥¢¥¤¥Æ¥à */
1976 else if (o_ptr->name1 && !have_flag(flgs, TR_FULL_NAME))
1978 artifact_type *a_ptr = &a_info[o_ptr->name1];
1979 /* '¡Ø' ¤«¤é»Ï¤Þ¤é¤Ê¤¤ÅÁÀâ¤Î¥¢¥¤¥Æ¥à¤Î̾Á°¤ÏºÇ½é¤ËÉղ乤ë */
1980 if (strncmp(a_name + a_ptr->name, "¡Ø", 2) != 0)
1982 t = object_desc_str(t, a_name + a_ptr->name);
1985 /* ̾¤Î¤¢¤ë¥¢¥¤¥Æ¥à */
1986 else if (object_is_ego(o_ptr))
1988 ego_item_type *e_ptr = &e_info[o_ptr->name2];
1989 t = object_desc_str(t, e_name + e_ptr->name);
1994 /* Copy the string */
1995 for (s0 = NULL; *s || s0; )
1997 /* The end of the flavour/kind string. */
2004 /* Begin to append the modifier (flavor) */
2005 else if ((*s == '#') && !s0)
2010 /* Paranoia -- Never append multiple modstrs */
2014 /* Begin to append the kind name */
2015 else if ((*s == '%') && !s0)
2020 /* Paranoia -- Never append multiple kindnames */
2028 /* Add a plural if needed */
2029 if (!(mode & OD_NO_PLURAL) && (o_ptr->number != 1))
2033 /* XXX XXX XXX Mega-Hack */
2035 /* Hack -- "Cutlass-es" and "Torch-es" */
2036 if ((k == 's') || (k == 'h')) *t++ = 'e';
2058 /* '¡Ø'¤«¤é»Ï¤Þ¤ëÅÁÀâ¤Î¥¢¥¤¥Æ¥à¤Î̾Á°¤ÏºÇ¸å¤ËÉղ乤ë */
2061 /* ¥é¥ó¥À¥à¥¢¡¼¥Æ¥£¥Õ¥¡¥¯¥È¤Î̾Á°¤Ï¥»¡¼¥Ö¥Õ¥¡¥¤¥ë¤ËµÏ¿
2062 ¤µ¤ì¤ë¤Î¤Ç¡¢±Ñ¸ìÈǤÎ̾Á°¤â¤½¤ì¤é¤·¤¯ÊÑ´¹¤¹¤ë */
2063 if (o_ptr->art_name)
2067 strcpy(temp, quark_str(o_ptr->art_name));
2068 /* MEGA HACK by ita */
2069 if (strncmp(temp, "¡Ø", 2) == 0 ||
2070 strncmp(temp, "¡Ô", 2) == 0)
2071 t = object_desc_str(t, temp);
2072 else if (temp[0] == '\'')
2074 itemp = strlen(temp);
2075 temp[itemp - 1] = 0;
2076 t = object_desc_str(t, "¡Ø");
2077 t = object_desc_str(t, &temp[1]);
2078 t = object_desc_str(t, "¡Ù");
2081 else if (object_is_fixed_artifact(o_ptr))
2083 artifact_type *a_ptr = &a_info[o_ptr->name1];
2084 if (strncmp(a_name + a_ptr->name, "¡Ø", 2) == 0)
2086 t = object_desc_str(t, a_name + a_ptr->name);
2089 else if (o_ptr->inscription)
2091 cptr str = quark_str(o_ptr->inscription);
2100 if (*str == '#') break;
2106 cptr str = my_strchr(quark_str(o_ptr->inscription), '#');
2108 /* Add the false name */
2109 t = object_desc_str(t,"¡Ø");
2110 t = object_desc_str(t, &str[1]);
2111 t = object_desc_str(t,"¡Ù");
2116 if (object_is_smith(o_ptr))
2118 t = object_desc_str(t,format(" of %s the Smith",player_name));
2121 /* Hack -- Append "Artifact" or "Special" names */
2122 if (known && !have_flag(flgs, TR_FULL_NAME))
2124 /* Is it a new random artifact ? */
2125 if (o_ptr->art_name)
2127 t = object_desc_chr(t, ' ');
2128 t = object_desc_str(t, quark_str(o_ptr->art_name));
2131 /* Grab any artifact name */
2132 else if (object_is_fixed_artifact(o_ptr))
2134 artifact_type *a_ptr = &a_info[o_ptr->name1];
2136 t = object_desc_chr(t, ' ');
2137 t = object_desc_str(t, a_name + a_ptr->name);
2140 /* Grab any ego-item name */
2143 if (object_is_ego(o_ptr))
2145 ego_item_type *e_ptr = &e_info[o_ptr->name2];
2147 t = object_desc_chr(t, ' ');
2148 t = object_desc_str(t, e_name + e_ptr->name);
2151 if (o_ptr->inscription && my_strchr(quark_str(o_ptr->inscription), '#'))
2154 cptr str = my_strchr(quark_str(o_ptr->inscription), '#');
2156 /* Add the false name */
2157 t = object_desc_chr(t, ' ');
2158 t = object_desc_str(t, &str[1]);
2165 /* No more details wanted */
2166 if (mode & OD_NAME_ONLY) goto object_desc_done;
2168 /* Hack -- Chests must be described in detail */
2169 if (o_ptr->tval == TV_CHEST)
2171 /* Not searched yet */
2177 /* May be "empty" */
2178 else if (!o_ptr->pval)
2181 t = object_desc_str(t, "(¶õ)");
2183 t = object_desc_str(t, " (empty)");
2187 /* May be "disarmed" */
2188 else if (o_ptr->pval < 0)
2190 if (chest_traps[0 - o_ptr->pval])
2193 t = object_desc_str(t, "(²ò½üºÑ)");
2195 t = object_desc_str(t, " (disarmed)");
2201 t = object_desc_str(t, "(Èó»Ü¾û)");
2203 t = object_desc_str(t, " (unlocked)");
2208 /* Describe the traps, if any */
2211 /* Describe the traps */
2212 switch (chest_traps[o_ptr->pval])
2217 t = object_desc_str(t, "(»Ü¾û)");
2219 t = object_desc_str(t, " (Locked)");
2223 case CHEST_LOSE_STR:
2226 t = object_desc_str(t, "(ÆÇ¿Ë)");
2228 t = object_desc_str(t, " (Poison Needle)");
2232 case CHEST_LOSE_CON:
2235 t = object_desc_str(t, "(ÆÇ¿Ë)");
2237 t = object_desc_str(t, " (Poison Needle)");
2244 t = object_desc_str(t, "(¥¬¥¹¡¦¥È¥é¥Ã¥×)");
2246 t = object_desc_str(t, " (Gas Trap)");
2250 case CHEST_PARALYZE:
2253 t = object_desc_str(t, "(¥¬¥¹¡¦¥È¥é¥Ã¥×)");
2255 t = object_desc_str(t, " (Gas Trap)");
2262 t = object_desc_str(t, "(ÇúȯÁõÃÖ)");
2264 t = object_desc_str(t, " (Explosion Device)");
2269 case CHEST_BIRD_STORM:
2270 case CHEST_E_SUMMON:
2271 case CHEST_H_SUMMON:
2274 t = object_desc_str(t, "(¾¤´¤Î¥ë¡¼¥ó)");
2276 t = object_desc_str(t, " (Summoning Runes)");
2280 case CHEST_RUNES_OF_EVIL:
2283 t = object_desc_str(t, "(¼Ù°¤Ê¥ë¡¼¥ó)");
2285 t = object_desc_str(t, " (Gleaming Black Runes)");
2292 t = object_desc_str(t, "(·ÙÊóÁõÃÖ)");
2294 t = object_desc_str(t, " (Alarm)");
2301 t = object_desc_str(t, "(¥Þ¥ë¥Á¡¦¥È¥é¥Ã¥×)");
2303 t = object_desc_str(t, " (Multiple Traps)");
2312 /* Display the item like a weapon */
2313 if (have_flag(flgs, TR_SHOW_MODS)) show_weapon = TRUE;
2315 /* Display the item like a weapon */
2316 if (object_is_smith(o_ptr) && (o_ptr->xtra3 == 1 + ESSENCE_SLAY_GLOVE))
2319 /* Display the item like a weapon */
2320 if (o_ptr->to_h && o_ptr->to_d) show_weapon = TRUE;
2322 /* Display the item like armour */
2323 if (o_ptr->ac) show_armour = TRUE;
2326 /* Dump base weapon info */
2327 switch (o_ptr->tval)
2329 /* Missiles and Weapons */
2338 /* In Vault Quest, hide the dice of target weapon. */
2339 if(object_is_quest_target(o_ptr) && !known)
2344 /* Append a "damage" string */
2345 t = object_desc_chr(t, ' ');
2346 t = object_desc_chr(t, p1);
2347 t = object_desc_num(t, o_ptr->dd);
2348 t = object_desc_chr(t, 'd');
2349 t = object_desc_num(t, o_ptr->ds);
2350 t = object_desc_chr(t, p2);
2356 /* Bows get a special "damage string" */
2359 /* Mega-Hack -- Extract the "base power" */
2360 power = bow_tmul(o_ptr->sval);
2362 /* Apply the "Extra Might" flag */
2363 if (have_flag(flgs, TR_XTRA_MIGHT)) power++;
2365 /* Append a special "damage" string */
2366 t = object_desc_chr(t, ' ');
2367 t = object_desc_chr(t, p1);
2368 t = object_desc_chr(t, 'x');
2369 t = object_desc_num(t, power);
2370 t = object_desc_chr(t, p2);
2372 fire_rate = calc_num_fire(o_ptr);
2373 /* Show Fire rate */
2374 if (fire_rate != 0 && power > 0 && known)
2376 fire_rate = bow_energy(o_ptr->sval) / fire_rate;
2378 t = object_desc_chr(t, ' ');
2379 t = object_desc_chr(t, p1);
2380 t = object_desc_num(t, fire_rate/100);
2381 t = object_desc_chr(t, '.');
2382 t = object_desc_num(t, fire_rate%100);
2383 t = object_desc_str(t, "turn");
2384 t = object_desc_chr(t, p2);
2392 /* Add the weapon bonuses */
2395 /* Show the tohit/todam on request */
2398 t = object_desc_chr(t, ' ');
2399 t = object_desc_chr(t, p1);
2400 t = object_desc_int(t, o_ptr->to_h);
2401 t = object_desc_chr(t, ',');
2402 t = object_desc_int(t, o_ptr->to_d);
2403 t = object_desc_chr(t, p2);
2406 /* Show the tohit if needed */
2407 else if (o_ptr->to_h)
2409 t = object_desc_chr(t, ' ');
2410 t = object_desc_chr(t, p1);
2411 t = object_desc_int(t, o_ptr->to_h);
2412 t = object_desc_chr(t, p2);
2415 /* Show the todam if needed */
2416 else if (o_ptr->to_d)
2418 t = object_desc_chr(t, ' ');
2419 t = object_desc_chr(t, p1);
2420 t = object_desc_int(t, o_ptr->to_d);
2421 t = object_desc_chr(t, p2);
2425 bow_ptr = &inventory[INVEN_BOW];
2427 /* If have a firing weapon + ammo matches bow */
2428 if (bow_ptr->k_idx && (o_ptr->tval == p_ptr->tval_ammo))
2430 int avgdam = o_ptr->dd * (o_ptr->ds + 1) * 10 / 2;
2431 int tmul = bow_tmul(bow_ptr->sval);
2432 s16b energy_fire = bow_energy(bow_ptr->sval);
2434 /* See if the bow is "known" - then set damage bonus */
2435 if (object_is_known(bow_ptr)) avgdam += (bow_ptr->to_d * 10);
2437 /* Effect of ammo */
2438 if (known) avgdam += (o_ptr->to_d * 10);
2440 /* Get extra "power" from "extra might" */
2441 if (p_ptr->xtra_might) tmul++;
2443 tmul = tmul * (100 + (int)(adj_str_td[p_ptr->stat_ind[A_STR]]) - 128);
2445 /* Launcher multiplier */
2447 avgdam /= (100 * 10);
2449 /* Get extra damage from concentration */
2450 if (p_ptr->concent) avgdam = boost_concentration_damage(avgdam);
2452 if (avgdam < 0) avgdam = 0;
2454 /* Display (shot damage/ shot damage with critical/ avg damage with critical) */
2455 t = object_desc_chr(t, ' ');
2456 t = object_desc_chr(t, p1);
2458 if(show_ammo_no_crit)
2460 /* Damage with no-crit */
2461 t = object_desc_num(t, avgdam);
2462 t = object_desc_str(t, show_ammo_detail ? "/shot " : "/");
2465 /* Apply Expect damage of Critical */
2466 avgdam = calc_expect_crit_shot(o_ptr->weight, o_ptr->to_h, bow_ptr->to_h, avgdam);
2467 t = object_desc_num(t, avgdam);
2469 t = show_ammo_no_crit ? object_desc_str(t, show_ammo_detail ? "/crit " : "/")
2470 : object_desc_str(t, show_ammo_detail ? "/shot " : "/");
2472 if (p_ptr->num_fire == 0)
2474 t = object_desc_chr(t, '0');
2478 /* Calc effects of energy */
2479 avgdam *= (p_ptr->num_fire * 100);
2480 avgdam /= energy_fire;
2481 t = object_desc_num(t, avgdam);
2482 t = object_desc_str(t, show_ammo_detail ? "/turn" : "");
2484 if(show_ammo_crit_ratio)
2486 int percent = calc_crit_ratio_shot(o_ptr->weight,
2487 known ? o_ptr->to_h : 0,
2488 object_is_known(bow_ptr) ? bow_ptr->to_h : 0, avgdam);
2490 t = object_desc_chr(t, '/');
2491 t = object_desc_num(t, percent / 100);
2492 t = object_desc_chr(t, '.');
2493 t = object_desc_num(t, percent % 100);
2494 t = object_desc_str(t, show_ammo_detail ? "% crit" : "%");
2498 t = object_desc_chr(t, p2);
2500 else if ((p_ptr->pclass == CLASS_NINJA) && (o_ptr->tval == TV_SPIKE))
2502 int avgdam = p_ptr->mighty_throw ? (1 + 3) : 1;
2503 s16b energy_fire = 100 - p_ptr->lev;
2505 avgdam += ((p_ptr->lev + 30) * (p_ptr->lev + 30) - 900) / 55;
2507 /* Display (shot damage/ avg damage) */
2508 t = object_desc_chr(t, ' ');
2509 t = object_desc_chr(t, p1);
2510 t = object_desc_num(t, avgdam);
2511 t = object_desc_chr(t, '/');
2513 /* Calc effects of energy */
2514 avgdam = 100 * avgdam / energy_fire;
2516 t = object_desc_num(t, avgdam);
2517 t = object_desc_chr(t, p2);
2520 /* Add the armor bonuses */
2523 /* Show the armor class info */
2526 t = object_desc_chr(t, ' ');
2527 t = object_desc_chr(t, b1);
2528 t = object_desc_num(t, o_ptr->ac);
2529 t = object_desc_chr(t, ',');
2530 t = object_desc_int(t, o_ptr->to_a);
2531 t = object_desc_chr(t, b2);
2534 /* No base armor, but does increase armor */
2535 else if (o_ptr->to_a)
2537 t = object_desc_chr(t, ' ');
2538 t = object_desc_chr(t, b1);
2539 t = object_desc_int(t, o_ptr->to_a);
2540 t = object_desc_chr(t, b2);
2544 /* Hack -- always show base armor */
2545 else if (show_armour)
2547 t = object_desc_chr(t, ' ');
2548 t = object_desc_chr(t, b1);
2549 t = object_desc_num(t, o_ptr->ac);
2550 t = object_desc_chr(t, b2);
2554 /* No more details wanted */
2555 if (mode & OD_NAME_AND_ENCHANT) goto object_desc_done;
2558 if (known) /* Known item only */
2561 * Hack -- Wands and Staffs have charges. Make certain how many charges
2562 * a stack of staffs really has is clear. -LM-
2564 if (((o_ptr->tval == TV_STAFF) || (o_ptr->tval == TV_WAND)))
2566 /* Dump " (N charges)" */
2567 t = object_desc_chr(t, ' ');
2568 t = object_desc_chr(t, p1);
2570 /* Clear explaination for staffs. */
2571 if ((o_ptr->tval == TV_STAFF) && (o_ptr->number > 1))
2573 t = object_desc_num(t, o_ptr->number);
2574 t = object_desc_str(t, "x ");
2576 t = object_desc_num(t, o_ptr->pval);
2578 t = object_desc_str(t, "²óʬ");
2580 t = object_desc_str(t, " charge");
2581 if (o_ptr->pval != 1) t = object_desc_chr(t, 's');
2584 t = object_desc_chr(t, p2);
2586 /* Hack -- Rods have a "charging" indicator. Now that stacks of rods may
2587 * be in any state of charge or discharge, this now includes a number. -LM-
2589 else if (o_ptr->tval == TV_ROD)
2591 /* Hack -- Dump " (# charging)" if relevant */
2594 /* Stacks of rods display an exact count of charging rods. */
2595 if (o_ptr->number > 1)
2598 if (k_ptr->pval == 0) k_ptr->pval = 1;
2600 /* Find out how many rods are charging, by dividing
2601 * current timeout by each rod's maximum timeout.
2602 * Ensure that any remainder is rounded up. Display
2603 * very discharged stacks as merely fully discharged.
2605 power = (o_ptr->timeout + (k_ptr->pval - 1)) / k_ptr->pval;
2606 if (power > o_ptr->number) power = o_ptr->number;
2608 /* Display prettily. */
2609 t = object_desc_str(t, " (");
2610 t = object_desc_num(t, power);
2612 t = object_desc_str(t, "ËÜ ½¼Å¶Ãæ)");
2614 t = object_desc_str(t, " charging)");
2618 /* "one Rod of Perception (1 charging)" would look tacky. */
2622 t = object_desc_str(t, "(½¼Å¶Ãæ)");
2624 t = object_desc_str(t, " (charging)");
2630 /* Dump "pval" flags for wearable items */
2631 if (have_pval_flags(flgs))
2633 /* Start the display */
2634 t = object_desc_chr(t, ' ');
2635 t = object_desc_chr(t, p1);
2637 /* Dump the "pval" itself */
2638 t = object_desc_int(t, o_ptr->pval);
2640 /* Do not display the "pval" flags */
2641 if (have_flag(flgs, TR_HIDE_TYPE))
2647 else if (have_flag(flgs, TR_SPEED))
2649 /* Dump " to speed" */
2651 t = object_desc_str(t, "²Ã®");
2653 t = object_desc_str(t, " to speed");
2658 else if (have_flag(flgs, TR_BLOWS))
2662 t = object_desc_str(t, "¹¶·â");
2664 t = object_desc_str(t, " attack");
2667 if (ABS(o_ptr->pval) != 1) t = object_desc_chr(t, 's');
2672 else if (have_flag(flgs, TR_STEALTH))
2674 /* Dump " to stealth" */
2676 t = object_desc_str(t, "±£Ì©");
2678 t = object_desc_str(t, " to stealth");
2683 else if (have_flag(flgs, TR_SEARCH))
2685 /* Dump " to searching" */
2687 t = object_desc_str(t, "õº÷");
2689 t = object_desc_str(t, " to searching");
2694 else if (have_flag(flgs, TR_INFRA))
2696 /* Dump " to infravision" */
2698 t = object_desc_str(t, "ÀÖ³°Àþ»ëÎÏ");
2700 t = object_desc_str(t, " to infravision");
2704 /* Finish the display */
2705 t = object_desc_chr(t, p2);
2708 /* Hack -- Process Lanterns/Torches */
2709 if ((o_ptr->tval == TV_LITE) && (!(object_is_fixed_artifact(o_ptr) || (o_ptr->sval == SV_LITE_FEANOR))))
2711 /* Hack -- Turns of light for normal lites */
2713 t = object_desc_chr(t, '(');
2715 t = object_desc_str(t, " (with ");
2718 if (o_ptr->name2 == EGO_LITE_LONG) t = object_desc_num(t, o_ptr->xtra4 * 2);
2719 else t = object_desc_num(t, o_ptr->xtra4);
2721 t = object_desc_str(t, "¥¿¡¼¥ó¤Î¼÷Ì¿)");
2723 t = object_desc_str(t, " turns of light)");
2727 /* Indicate charging objects, but not rods. */
2728 if (o_ptr->timeout && (o_ptr->tval != TV_ROD))
2730 /* Hack -- Dump " (charging)" if relevant */
2732 t = object_desc_str(t, "(½¼Å¶Ãæ)");
2734 t = object_desc_str(t, " (charging)");
2740 /* No more details wanted */
2741 if (mode & OD_OMIT_INSCRIPTION) goto object_desc_done;
2744 /* Prepare real inscriptions in a buffer */
2747 /* Auto abbreviation inscribe */
2748 if ((abbrev_extra || abbrev_all) && (o_ptr->ident & IDENT_MENTAL))
2750 if (!o_ptr->inscription || !my_strchr(quark_str(o_ptr->inscription), '%'))
2761 get_ability_abbreviation(tmp_val2, o_ptr, kanji, all);
2765 /* Use the standard inscription if available */
2766 if (o_ptr->inscription)
2770 if (tmp_val2[0]) strcat(tmp_val2, ", ");
2772 /* Get inscription and convert {%} */
2773 get_inscription(buff, o_ptr);
2775 /* strcat with correct treating of kanji */
2776 my_strcat(tmp_val2, buff, sizeof(tmp_val2));
2780 /* No fake inscription yet */
2781 fake_insc_buf[0] = '\0';
2783 /* Use the game-generated "feeling" otherwise, if available */
2786 strcpy(fake_insc_buf, game_inscriptions[o_ptr->feeling]);
2789 /* Note "cursed" if the item is known to be cursed */
2790 else if (object_is_cursed(o_ptr) && (known || (o_ptr->ident & IDENT_SENSE)))
2793 strcpy(fake_insc_buf, "¼ö¤ï¤ì¤Æ¤¤¤ë");
2795 strcpy(fake_insc_buf, "cursed");
2799 /* Note "unidentified" if the item is unidentified */
2800 else if (((o_ptr->tval == TV_RING) || (o_ptr->tval == TV_AMULET)
2801 || (o_ptr->tval == TV_LITE) || (o_ptr->tval == TV_FIGURINE))
2803 && !(o_ptr->ident & IDENT_SENSE))
2806 strcpy(fake_insc_buf, "̤´ÕÄê");
2808 strcpy(fake_insc_buf, "unidentified");
2812 /* Mega-Hack -- note empty wands/staffs */
2813 else if (!known && (o_ptr->ident & IDENT_EMPTY))
2816 strcpy(fake_insc_buf, "¶õ");
2818 strcpy(fake_insc_buf, "empty");
2822 /* Note "tried" if the object has been tested unsuccessfully */
2823 else if (!aware && object_is_tried(o_ptr))
2826 strcpy(fake_insc_buf, "̤ȽÌÀ");
2828 strcpy(fake_insc_buf, "tried");
2832 /* Note the discount, if any */
2833 if (o_ptr->discount)
2835 /* Hidden by real inscription unless in a store */
2836 if (!tmp_val2[0] || (o_ptr->ident & IDENT_STORE))
2838 char discount_num_buf[4];
2840 /* Append to other fake inscriptions if any */
2841 if (fake_insc_buf[0]) strcat(fake_insc_buf, ", ");
2843 (void)object_desc_num(discount_num_buf, o_ptr->discount);
2844 strcat(fake_insc_buf, discount_num_buf);
2846 strcat(fake_insc_buf, "%°ú¤");
2848 strcat(fake_insc_buf, "% off");
2854 /* Append the inscription, if any */
2855 if (fake_insc_buf[0] || tmp_val2[0])
2857 /* Append the inscription */
2858 t = object_desc_chr(t, ' ');
2859 t = object_desc_chr(t, c1);
2861 /* Append fake inscriptions */
2862 if (fake_insc_buf[0])
2864 t = object_desc_str(t, fake_insc_buf);
2867 /* Append a separater */
2868 if (fake_insc_buf[0] && tmp_val2[0])
2870 t = object_desc_chr(t, ',');
2871 t = object_desc_chr(t, ' ');
2874 /* Append real inscriptions */
2877 t = object_desc_str(t, tmp_val2);
2880 t = object_desc_chr(t, c2);
2884 my_strcpy(buf, tmp_val, MAX_NLEN);