3 /* Purpose: Spoiler generation -BEN- */
12 * The spoiler file being created
14 static FILE *fff = NULL;
19 * Extract a textual representation of an attribute
21 static cptr attr_to_text(byte a)
26 case TERM_DARK: return ("XXX¤¤");
27 case TERM_WHITE: return ("Çò¤¤");
28 case TERM_SLATE: return ("Àij¥¿§¤Î");
29 case TERM_ORANGE: return ("¥ª¥ì¥ó¥¸¤Î");
30 case TERM_RED: return ("ÀÖ¤¤");
31 case TERM_GREEN: return ("ÎФÎ");
32 case TERM_BLUE: return ("ÀĤ¤");
33 case TERM_UMBER: return ("àèàῧ¤Î");
34 case TERM_L_DARK: return ("³¥¿§¤Î");
35 case TERM_L_WHITE: return ("ÌÀÀij¥¿§¤Î");
36 case TERM_VIOLET: return ("»ç¤Î");
37 case TERM_YELLOW: return ("²«¿§¤¤");
38 case TERM_L_RED: return ("ÌÀ¤¤ÀÖ¤Î");
39 case TERM_L_GREEN: return ("ÌÀ¤¤ÎФÎ");
40 case TERM_L_BLUE: return ("ÌÀ¤¤ÀĤÎ");
41 case TERM_L_UMBER: return ("ÌÀ¤¤àèàῧ¤Î");
43 case TERM_DARK: return ("xxx");
44 case TERM_WHITE: return ("White");
45 case TERM_SLATE: return ("Slate");
46 case TERM_ORANGE: return ("Orange");
47 case TERM_RED: return ("Red");
48 case TERM_GREEN: return ("Green");
49 case TERM_BLUE: return ("Blue");
50 case TERM_UMBER: return ("Umber");
51 case TERM_L_DARK: return ("L.Dark");
52 case TERM_L_WHITE: return ("L.Slate");
53 case TERM_VIOLET: return ("Violet");
54 case TERM_YELLOW: return ("Yellow");
55 case TERM_L_RED: return ("L.Red");
56 case TERM_L_GREEN: return ("L.Green");
57 case TERM_L_BLUE: return ("L.Blue");
58 case TERM_L_UMBER: return ("L.Umber");
86 * Item Spoilers by: benh@phial.com (Ben Harrison)
91 * The basic items categorized by type
93 static grouper group_item[] =
96 { TV_SHOT, "¼Í·âʪ" },
112 { TV_SWORD, "Éð´ï" },
114 { TV_SWORD, "Weapons" },
117 { TV_POLEARM, NULL },
119 { TV_DIGGING, NULL },
122 { TV_SOFT_ARMOR, "Ëɶñ¡ÊÂΡË" },
124 { TV_SOFT_ARMOR, "Armour (Body)" },
127 { TV_HARD_ARMOR, NULL },
128 { TV_DRAG_ARMOR, NULL },
131 { TV_CLOAK, "Ëɶñ¡Ê¤½¤Î¾¡Ë" },
133 { TV_CLOAK, "Armour (Misc)" },
143 { TV_AMULET, "¥¢¥ß¥å¥ì¥Ã¥È" },
146 { TV_AMULET, "Amulets" },
147 { TV_RING, "Rings" },
152 { TV_SCROLL, "´¬Êª" },
156 { TV_SCROLL, "Scrolls" },
157 { TV_POTION, "Potions" },
163 { TV_ROD, "¥í¥Ã¥É" },
164 { TV_WAND, "ËâË¡ËÀ" },
168 { TV_WAND, "Wands" },
169 { TV_STAFF, "Staffs" },
174 { TV_LIFE_BOOK, "ËâË¡½ñ¡ÊÀ¸Ì¿¡Ë" },
175 { TV_SORCERY_BOOK, "ËâË¡½ñ¡ÊÀç½Ñ¡Ë" },
176 { TV_NATURE_BOOK, "ËâË¡½ñ¡Ê¼«Á³¡Ë" },
177 { TV_CHAOS_BOOK, "ËâË¡½ñ¡Ê¥«¥ª¥¹¡Ë" },
178 { TV_DEATH_BOOK, "ËâË¡½ñ¡Ê°Å¹õ¡Ë" },
179 { TV_TRUMP_BOOK, "ËâË¡½ñ¡Ê¥È¥é¥ó¥×¡Ë" },
180 { TV_ARCANE_BOOK, "ËâË¡½ñ¡ÊÈë½Ñ¡Ë" },
181 { TV_ENCHANT_BOOK, "ËâË¡½ñ¡Ê¾¢¡Ë" },
182 { TV_DAEMON_BOOK, "ËâË¡½ñ¡Ê°Ëâ¡Ë" },
183 { TV_MUSIC_BOOK, "²Î½¸" },
184 { TV_HISSATSU_BOOK, "Éð·Ý¤Î½ñ" },
186 { TV_LIFE_BOOK, "Books (Life)" },
187 { TV_SORCERY_BOOK, "Books (Sorcery)" },
188 { TV_NATURE_BOOK, "Books (Nature)" },
189 { TV_CHAOS_BOOK, "Books (Chaos)" },
190 { TV_DEATH_BOOK, "Books (Death)" },
191 { TV_TRUMP_BOOK, "Books (Trump)" },
192 { TV_ARCANE_BOOK, "Books (Arcane)" },
193 { TV_ENCHANT_BOOK, "Books (Craft)" },
194 { TV_DAEMON_BOOK, "Books (Daemon)" },
195 { TV_MUSIC_BOOK, "Song Books" },
196 { TV_HISSATSU_BOOK, "Books (Kendo)" },
200 { TV_PARCHEMENT, "ÍÓÈé»æ" },
202 { TV_PARCHEMENT, "Parchement" },
208 { TV_CHEST, "Chests" },
212 { TV_CAPTURE, "¥¥ã¥×¥Á¥ã¡¼¡¦¥Ü¡¼¥ë" },
214 { TV_CAPTURE, "Capture Ball" },
218 { TV_CARD, "¥¨¥¯¥¹¥×¥ì¥¹¥«¡¼¥É" },
220 { TV_CARD, "Express Card" },
223 { TV_FIGURINE, "Magical Figurines" },
224 { TV_STATUE, "Statues" },
225 { TV_CORPSE, "Corpses" },
230 { TV_WHISTLE, "Whistle" },
234 { TV_SPIKE, "¤¯¤µ¤Ó" },
236 { TV_SPIKE, "Spike" },
243 { TV_SKELETON, NULL },
252 static void kind_info(char *buf, char *dam, char *wgt, int *lev, s32b *val, int k)
258 /* Get local object */
261 /* Prepare a fake item */
262 object_prep(q_ptr, k);
265 q_ptr->ident |= (IDENT_KNOWN);
275 (*lev) = get_object_level(q_ptr);
278 (*val) = object_value(q_ptr);
282 if (!buf || !dam || !wgt) return;
285 /* Description (too brief) */
286 object_desc_store(buf, q_ptr, FALSE, 0);
306 sprintf(dam, "%dd%d", q_ptr->dd, q_ptr->ds);
316 sprintf(dam, "%dd%d", q_ptr->dd, q_ptr->ds);
331 sprintf(dam, "%d", q_ptr->ac);
338 sprintf(wgt, "%3d.%d", q_ptr->weight / 10, q_ptr->weight % 10);
343 * Create a spoiler file for items
345 static void spoil_obj_desc(cptr fname)
347 int i, k, s, t, n = 0;
357 /* Build the filename */
358 path_build(buf, 1024, ANGBAND_DIR_USER, fname);
360 /* File type is "TEXT" */
361 FILE_TYPE(FILE_TYPE_TEXT);
364 fff = my_fopen(buf, "w");
369 msg_print("Cannot create spoiler file.");
375 fprintf(fff, "Spoiler File -- Basic Items (Hengband %d.%d.%d)\n\n\n",
376 FAKE_VER_MAJOR-10, FAKE_VER_MINOR, FAKE_VER_PATCH);
379 fprintf(fff, "%-45s %8s%7s%5s%9s\n",
380 "Description", "Dam/AC", "Wgt", "Lev", "Cost");
381 fprintf(fff, "%-45s %8s%7s%5s%9s\n",
382 "----------------------------------------",
383 "------", "---", "---", "----");
385 /* List the groups */
386 for (i = 0; TRUE; i++)
388 /* Write out the group title */
389 if (group_item[i].name)
391 /* Hack -- bubble-sort by cost and then level */
392 for (s = 0; s < n - 1; s++)
394 for (t = 0; t < n - 1; t++)
405 kind_info(NULL, NULL, NULL, &e1, &t1, who[i1]);
406 kind_info(NULL, NULL, NULL, &e2, &t2, who[i2]);
408 if ((t1 > t2) || ((t1 == t2) && (e1 > e2)))
417 /* Spoil each item */
418 for (s = 0; s < n; s++)
423 /* Describe the kind */
424 kind_info(buf, dam, wgt, &e, &v, who[s]);
427 fprintf(fff, " %-45s%8s%7s%5d%9ld\n",
428 buf, dam, wgt, e, (long)(v));
431 /* Start a new set */
435 if (!group_item[i].tval) break;
437 /* Start a new set */
438 fprintf(fff, "\n\n%s\n\n", group_item[i].name);
441 /* Acquire legal item types */
442 for (k = 1; k < max_k_idx; k++)
444 object_kind *k_ptr = &k_info[k];
446 /* Skip wrong tval's */
447 if (k_ptr->tval != group_item[i].tval) continue;
449 /* Hack -- Skip instant-artifacts */
450 if (k_ptr->gen_flags & (TRG_INSTA_ART)) continue;
458 /* Check for errors */
459 if (ferror(fff) || my_fclose(fff))
461 msg_print("Cannot close spoiler file.");
466 msg_print("Successfully created a spoiler file.");
471 * Artifact Spoilers by: randy@PICARD.tamu.edu (Randy Hutson)
476 * Returns a "+" string if a number is non-negative and an empty
479 #define POSITIZE(v) (((v) >= 0) ? "+" : "")
482 * These are used to format the artifact spoiler file. INDENT1 is used
483 * to indent all but the first line of an artifact spoiler. INDENT2 is
484 * used when a line "wraps". (Bladeturner's resistances cause this.)
490 * MAX_LINE_LEN specifies when a line should wrap.
492 #define MAX_LINE_LEN 75
495 * Given an array, determine how many elements are in the array
497 #define N_ELEMENTS(a) (sizeof (a) / sizeof ((a)[0]))
500 * The artifacts categorized by type
502 static grouper group_artifact[] =
505 { TV_SWORD, "Åá·õ" },
506 { TV_POLEARM, "Áä/Éà" },
507 { TV_HAFTED, "Æß´ï" },
508 { TV_DIGGING, "¥·¥ã¥Ù¥ë/¤Ä¤ë¤Ï¤·" },
509 { TV_BOW, "Èô¤ÓÆ»¶ñ" },
512 { TV_SOFT_ARMOR, "³»" },
513 { TV_HARD_ARMOR, NULL },
514 { TV_DRAG_ARMOR, NULL },
516 { TV_CLOAK, "¥¯¥í¡¼¥¯" },
519 { TV_HELM, "³õ/´§" },
521 { TV_GLOVES, "äƼê" },
525 { TV_AMULET, "¥¢¥ß¥å¥ì¥Ã¥È" },
528 { TV_SWORD, "Edged Weapons" },
529 { TV_POLEARM, "Polearms" },
530 { TV_HAFTED, "Hafted Weapons" },
531 { TV_DIGGING, "Shovels/Picks" },
533 { TV_ARROW, "Ammo" },
535 { TV_SOFT_ARMOR, "Body Armor" },
536 { TV_HARD_ARMOR, NULL },
537 { TV_DRAG_ARMOR, NULL },
539 { TV_CLOAK, "Cloaks" },
540 { TV_SHIELD, "Shields" },
542 { TV_HELM, "Helms/Crowns" },
544 { TV_GLOVES, "Gloves" },
545 { TV_BOOTS, "Boots" },
547 { TV_LITE, "Light Sources" },
548 { TV_AMULET, "Amulets" },
549 { TV_RING, "Rings" },
558 * Pair together a constant flag with a textual description.
560 * Used by both "init.c" and "wiz-spo.c".
562 * Note that it sometimes more efficient to actually make an array
563 * of textual names, where entry 'N' is assumed to be paired with
564 * the flag whose value is "1L << N", but that requires hard-coding.
567 typedef struct flag_desc flag_desc;
572 const char *const desc;
578 * These are used for "+3 to STR, DEX", etc. These are separate from
579 * the other pval affected traits to simplify the case where an object
580 * affects all stats. In this case, "All stats" is used instead of
581 * listing each stat individually.
584 static flag_desc stat_flags_desc[] =
590 { TR1_DEX, "´ïÍѤµ" },
591 { TR1_CON, "Âѵ×ÎÏ" },
604 * Besides stats, these are the other player traits
605 * which may be affected by an object's pval
608 static flag_desc pval_flags1_desc[] =
611 { TR1_MAGIC_MASTERY, "ËâË¡Æ»¶ñ»ÈÍÑǽÎÏ" },
612 { TR1_STEALTH, "±£Ì©" },
613 { TR1_SEARCH, "õº÷" },
614 { TR1_INFRA, "ÀÖ³°Àþ»ëÎÏ" },
615 { TR1_TUNNEL, "ºÎ·¡" },
616 { TR1_BLOWS, "¹¶·â²ó¿ô" },
617 { TR1_SPEED, "¥¹¥Ô¡¼¥É" }
619 { TR1_STEALTH, "Stealth" },
620 { TR1_SEARCH, "Searching" },
621 { TR1_INFRA, "Infravision" },
622 { TR1_TUNNEL, "Tunneling" },
623 { TR1_BLOWS, "Attacks" },
624 { TR1_SPEED, "Speed" }
629 * Slaying preferences for weapons
632 static flag_desc slay_flags_desc[] =
635 { TR1_SLAY_ANIMAL, "ưʪ" },
636 { TR1_SLAY_EVIL, "¼Ù°" },
637 { TR3_SLAY_HUMAN, "¿Í´Ö" },
638 { TR1_SLAY_UNDEAD, "¥¢¥ó¥Ç¥Ã¥É" },
639 { TR1_SLAY_DEMON, "°Ëâ" },
640 { TR1_SLAY_ORC, "¥ª¡¼¥¯" },
641 { TR1_SLAY_TROLL, "¥È¥í¥ë" },
642 { TR1_SLAY_GIANT, "µð¿Í" },
643 { TR1_SLAY_DRAGON, "¥É¥é¥´¥ó" },
644 { TR1_KILL_DRAGON, "*¥É¥é¥´¥ó*" },
646 { TR1_SLAY_ANIMAL, "Animal" },
647 { TR1_SLAY_EVIL, "Evil" },
648 { TR3_SLAY_HUMAN, "Human" },
649 { TR1_SLAY_UNDEAD, "Undead" },
650 { TR1_SLAY_DEMON, "Demon" },
651 { TR1_SLAY_ORC, "Orc" },
652 { TR1_SLAY_TROLL, "Troll" },
653 { TR1_SLAY_GIANT, "Giant" },
654 { TR1_SLAY_DRAGON, "Dragon" },
655 { TR1_KILL_DRAGON, "Xdragon" }
660 * Elemental brands for weapons
662 * Clearly, TR1_IMPACT is a bit out of place here. To simplify
663 * coding, it has been included here along with the elemental
664 * brands. It does seem to fit in with the brands and slaying
665 * more than the miscellaneous section.
667 static flag_desc brand_flags_desc[] =
670 { TR1_BRAND_ACID, "Íϲò" },
671 { TR1_BRAND_ELEC, "ÅÅ·â" },
672 { TR1_BRAND_FIRE, "¾Æ´þ" },
673 { TR1_BRAND_COLD, "Åà·ë" },
674 { TR1_BRAND_POIS, "ÆÇ»¦" },
676 { TR1_FORCE_WEAPON, "ÍýÎÏ" },
677 { TR1_CHAOTIC, "º®ÆÙ" },
678 { TR1_VAMPIRIC, "µÛ·ì" },
679 { TR1_IMPACT, "ÃÏ¿Ì" },
680 { TR1_VORPAL, "ÀÚ¤ìÌ£" },
682 { TR1_BRAND_ACID, "Acid Brand" },
683 { TR1_BRAND_ELEC, "Lightning Brand" },
684 { TR1_BRAND_FIRE, "Flame Tongue" },
685 { TR1_BRAND_COLD, "Frost Brand" },
686 { TR1_BRAND_POIS, "Poisoned" },
688 { TR1_FORCE_WEAPON, "Force" },
689 { TR1_CHAOTIC, "Mark of Chaos" },
690 { TR1_VAMPIRIC, "Vampiric" },
691 { TR1_IMPACT, "Earthquake impact on hit" },
692 { TR1_VORPAL, "Very sharp" },
700 static const flag_desc resist_flags_desc[] =
703 { TR2_RES_ACID, "»À" },
704 { TR2_RES_ELEC, "ÅÅ·â" },
705 { TR2_RES_FIRE, "²Ð±ê" },
706 { TR2_RES_COLD, "Î䵤" },
707 { TR2_RES_POIS, "ÆÇ" },
708 { TR2_RES_FEAR, "¶²ÉÝ"},
709 { TR2_RES_LITE, "Á®¸÷" },
710 { TR2_RES_DARK, "°Å¹õ" },
711 { TR2_RES_BLIND, "ÌÕÌÜ" },
712 { TR2_RES_CONF, "º®Íð" },
713 { TR2_RES_SOUND, "¹ì²»" },
714 { TR2_RES_SHARDS, "ÇËÊÒ" },
715 { TR2_RES_NETHER, "ÃϹö" },
716 { TR2_RES_NEXUS, "°ø²Ìº®Íð" },
717 { TR2_RES_CHAOS, "¥«¥ª¥¹" },
718 { TR2_RES_DISEN, "Îô²½" },
720 { TR2_RES_ACID, "Acid" },
721 { TR2_RES_ELEC, "Lightning" },
722 { TR2_RES_FIRE, "Fire" },
723 { TR2_RES_COLD, "Cold" },
724 { TR2_RES_POIS, "Poison" },
725 { TR2_RES_FEAR, "Fear"},
726 { TR2_RES_LITE, "Light" },
727 { TR2_RES_DARK, "Dark" },
728 { TR2_RES_BLIND, "Blindness" },
729 { TR2_RES_CONF, "Confusion" },
730 { TR2_RES_SOUND, "Sound" },
731 { TR2_RES_SHARDS, "Shards" },
732 { TR2_RES_NETHER, "Nether" },
733 { TR2_RES_NEXUS, "Nexus" },
734 { TR2_RES_CHAOS, "Chaos" },
735 { TR2_RES_DISEN, "Disenchantment" },
740 * Elemental immunities (along with poison)
743 static const flag_desc immune_flags_desc[] =
746 { TR2_IM_ACID, "»À" },
747 { TR2_IM_ELEC, "ÅÅ·â" },
748 { TR2_IM_FIRE, "²Ð±ê" },
749 { TR2_IM_COLD, "Î䵤" },
751 { TR2_IM_ACID, "Acid" },
752 { TR2_IM_ELEC, "Lightning" },
753 { TR2_IM_FIRE, "Fire" },
754 { TR2_IM_COLD, "Cold" },
759 * Sustain stats - these are given their "own" line in the
760 * spoiler file, mainly for simplicity
762 static const flag_desc sustain_flags_desc[] =
765 { TR2_SUST_STR, "ÏÓÎÏ" },
766 { TR2_SUST_INT, "ÃÎǽ" },
767 { TR2_SUST_WIS, "¸¤µ" },
768 { TR2_SUST_DEX, "´ïÍѤµ" },
769 { TR2_SUST_CON, "Âѵ×ÎÏ" },
770 { TR2_SUST_CHR, "Ì¥ÎÏ" },
772 { TR2_SUST_STR, "STR" },
773 { TR2_SUST_INT, "INT" },
774 { TR2_SUST_WIS, "WIS" },
775 { TR2_SUST_DEX, "DEX" },
776 { TR2_SUST_CON, "CON" },
777 { TR2_SUST_CHR, "CHR" },
782 * Miscellaneous magic given by an object's "flags2" field
785 static const flag_desc misc_flags2_desc[] =
788 { TR2_THROW, "ÅêÚ³" },
789 { TR2_REFLECT, "È¿¼Í" },
790 { TR2_FREE_ACT, "ËãáãÃΤ餺" },
791 { TR2_HOLD_LIFE, "À¸Ì¿ÎÏ°Ý»ý" },
793 { TR2_THROW, "Throwing" },
794 { TR2_REFLECT, "Reflection" },
795 { TR2_FREE_ACT, "Free Action" },
796 { TR2_HOLD_LIFE, "Hold Life" },
801 * Miscellaneous magic given by an object's "flags3" field
803 * Note that cursed artifacts and objects with permanent light
804 * are handled "directly" -- see analyze_misc_magic()
807 static const flag_desc misc_flags3_desc[] =
810 { TR3_SH_FIRE, "²Ð±ê¥ª¡¼¥é" },
811 { TR3_SH_ELEC, "Åŷ⥪¡¼¥é" },
812 { TR3_SH_COLD, "Î䵤¥ª¡¼¥é" },
813 { TR3_NO_TELE, "È¿¥Æ¥ì¥Ý¡¼¥È" },
814 { TR3_NO_MAGIC, "È¿ËâË¡" },
815 { TR3_FEATHER, "ÉâÍ·" },
816 { TR3_SEE_INVIS, "²Ä»ëÆ©ÌÀ" },
817 { TR3_TELEPATHY, "¥Æ¥ì¥Ñ¥·¡¼" },
818 { TR3_SLOW_DIGEST, "Ãپò½" },
819 { TR3_REGEN, "µÞ®²óÉü" },
820 { TR3_WARNING, "·Ù¹ð" },
821 /* { TR3_XTRA_MIGHT, "¶¯Îϼͷâ" }, */
822 { TR3_XTRA_SHOTS, "Äɲüͷâ" }, /* always +1? */
823 { TR3_DRAIN_EXP, "·Ð¸³Ã͵ۼý" },
824 { TR3_AGGRAVATE, "È¿´¶" },
825 { TR3_BLESSED, "½ËÊ¡" },
826 { TR3_DEC_MANA, "¾ÃÈñËâÎϸº¾¯" },
828 { TR3_SH_FIRE, "Fiery Aura" },
829 { TR3_SH_ELEC, "Electric Aura" },
830 { TR3_SH_COLD, "Coldly Aura" },
831 { TR3_NO_TELE, "Prevent Teleportation" },
832 { TR3_NO_MAGIC, "Anti-Magic" },
833 { TR3_FEATHER, "Levitation" },
834 { TR3_SEE_INVIS, "See Invisible" },
835 { TR3_TELEPATHY, "ESP" },
836 { TR3_SLOW_DIGEST, "Slow Digestion" },
837 { TR3_REGEN, "Regeneration" },
838 { TR3_WARNING, "Warning" },
839 /* { TR3_XTRA_MIGHT, "Extra Might" }, */
840 { TR3_XTRA_SHOTS, "+1 Extra Shot" }, /* always +1? */
841 { TR3_DRAIN_EXP, "Drains Experience" },
842 { TR3_AGGRAVATE, "Aggravates" },
843 { TR3_BLESSED, "Blessed Blade" },
844 { TR3_DEC_MANA, "Decrease Shouhi Mana" },
850 * A special type used just for deailing with pvals
855 * This will contain a string such as "+2", "-10", etc.
860 * A list of various player traits affected by an object's pval such
861 * as stats, speed, stealth, etc. "Extra attacks" is NOT included in
862 * this list since it will probably be desirable to format its
863 * description differently.
865 * Note that room need only be reserved for the number of stats - 1
866 * since the description "All stats" is used if an object affects all
867 * all stats. Also, room must be reserved for a sentinel NULL pointer.
869 * This will be a list such as ["STR", "DEX", "Stealth", NULL] etc.
871 * This list includes extra attacks, for simplicity.
873 cptr pval_affects[N_ELEMENTS(stat_flags_desc) - 1 +
874 N_ELEMENTS(pval_flags1_desc) + 1];
880 * An "object analysis structure"
882 * It will be filled with descriptive strings detailing an object's
883 * various magical powers. The "ignore X" traits are not noted since
884 * all artifacts ignore "normal" destruction.
889 /* "The Longsword Dragonsmiter (6d4) (+20, +25)" */
890 char description[MAX_NLEN];
892 /* Description of what is affected by an object's pval */
893 pval_info_type pval_info;
895 /* A list of an object's slaying preferences */
896 cptr slays[N_ELEMENTS(slay_flags_desc) + 1];
898 /* A list if an object's elemental brands */
899 cptr brands[N_ELEMENTS(brand_flags_desc) + 1];
901 /* A list of immunities granted by an object */
902 cptr immunities[N_ELEMENTS(immune_flags_desc) + 1];
904 /* A list of resistances granted by an object */
905 cptr resistances[N_ELEMENTS(resist_flags_desc) + 1];
907 /* A list of stats sustained by an object */
908 cptr sustains[N_ELEMENTS(sustain_flags_desc) - 1 + 1];
910 /* A list of various magical qualities an object may have */
911 cptr misc_magic[N_ELEMENTS(misc_flags2_desc) + N_ELEMENTS(misc_flags3_desc)
912 + 1 /* Permanent Light */
914 + 1 /* type of curse */
915 + 1]; /* sentinel NULL */
917 /* A string describing an artifact's activation */
920 /* "Level 20, Rarity 30, 3.0 lbs, 20000 Gold" */
926 * Write out `n' of the character `c' to the spoiler file
928 static void spoiler_out_n_chars(int n, char c)
930 while (--n >= 0) fputc(c, fff);
935 * Write out `n' blank lines to the spoiler file
937 static void spoiler_blanklines(int n)
939 spoiler_out_n_chars(n, '\n');
944 * Write a line to the spoiler file and then "underline" it with hypens
946 static void spoiler_underline(cptr str)
948 fprintf(fff, "%s\n", str);
949 spoiler_out_n_chars(strlen(str), '-');
956 * This function does most of the actual "analysis". Given a set of bit flags
957 * (which will be from one of the flags fields from the object in question),
958 * a "flag description structure", a "description list", and the number of
959 * elements in the "flag description structure", this function sets the
960 * "description list" members to the appropriate descriptions contained in
961 * the "flag description structure".
963 * The possibly updated description pointer is returned.
965 static cptr *spoiler_flag_aux(const u32b art_flags, const flag_desc *flag_ptr,
966 cptr *desc_ptr, const int n_elmnts)
970 for (i = 0; i < n_elmnts; ++i)
972 if (art_flags & flag_ptr[i].flag)
974 *desc_ptr++ = flag_ptr[i].desc;
983 * Acquire a "basic" description "The Cloak of Death [1,+10]"
985 static void analyze_general (object_type *o_ptr, char *desc_ptr)
987 /* Get a "useful" description of the object */
988 object_desc_store(desc_ptr, o_ptr, TRUE, 1);
993 * List "player traits" altered by an artifact's pval. These include stats,
994 * speed, infravision, tunneling, stealth, searching, and extra attacks.
996 static void analyze_pval (object_type *o_ptr, pval_info_type *p_ptr)
998 const u32b all_stats = (TR1_STR | TR1_INT | TR1_WIS |
999 TR1_DEX | TR1_CON | TR1_CHR);
1005 /* If pval == 0, there is nothing to do. */
1008 /* An "empty" pval description indicates that pval == 0 */
1009 p_ptr->pval_desc[0] = '\0';
1013 /* Extract the flags */
1014 object_flags(o_ptr, &f1, &f2, &f3);
1016 affects_list = p_ptr->pval_affects;
1018 /* Create the "+N" string */
1019 sprintf(p_ptr->pval_desc, "%s%d", POSITIZE(o_ptr->pval), o_ptr->pval);
1021 /* First, check to see if the pval affects all stats */
1022 if ((f1 & all_stats) == all_stats)
1025 *affects_list++ = "Á´Ç½ÎÏ";
1027 *affects_list++ = "All stats";
1031 /* Are any stats affected? */
1032 else if (f1 & all_stats)
1034 affects_list = spoiler_flag_aux(f1, stat_flags_desc,
1036 N_ELEMENTS(stat_flags_desc));
1039 /* And now the "rest" */
1040 affects_list = spoiler_flag_aux(f1, pval_flags1_desc,
1042 N_ELEMENTS(pval_flags1_desc));
1044 /* Terminate the description list */
1045 *affects_list = NULL;
1049 /* Note the slaying specialties of a weapon */
1050 static void analyze_slay (object_type *o_ptr, cptr *slay_list)
1054 object_flags(o_ptr, &f1, &f2, &f3);
1056 slay_list = spoiler_flag_aux(f1, slay_flags_desc, slay_list,
1057 N_ELEMENTS(slay_flags_desc));
1059 /* Terminate the description list */
1063 /* Note an object's elemental brands */
1064 static void analyze_brand (object_type *o_ptr, cptr *brand_list)
1068 object_flags(o_ptr, &f1, &f2, &f3);
1070 brand_list = spoiler_flag_aux(f1, brand_flags_desc, brand_list,
1071 N_ELEMENTS(brand_flags_desc));
1073 /* Terminate the description list */
1078 /* Note the resistances granted by an object */
1079 static void analyze_resist (object_type *o_ptr, cptr *resist_list)
1083 object_flags(o_ptr, &f1, &f2, &f3);
1085 resist_list = spoiler_flag_aux(f2, resist_flags_desc,
1086 resist_list, N_ELEMENTS(resist_flags_desc));
1088 /* Terminate the description list */
1089 *resist_list = NULL;
1093 /* Note the immunities granted by an object */
1094 static void analyze_immune (object_type *o_ptr, cptr *immune_list)
1098 object_flags(o_ptr, &f1, &f2, &f3);
1100 immune_list = spoiler_flag_aux(f2, immune_flags_desc,
1101 immune_list, N_ELEMENTS(immune_flags_desc));
1103 /* Terminate the description list */
1104 *immune_list = NULL;
1107 /* Note which stats an object sustains */
1109 static void analyze_sustains (object_type *o_ptr, cptr *sustain_list)
1111 const u32b all_sustains = (TR2_SUST_STR | TR2_SUST_INT | TR2_SUST_WIS |
1112 TR2_SUST_DEX | TR2_SUST_CON | TR2_SUST_CHR);
1116 object_flags(o_ptr, &f1, &f2, &f3);
1118 /* Simplify things if an item sustains all stats */
1119 if ((f2 & all_sustains) == all_sustains)
1122 *sustain_list++ = "Á´Ç½ÎÏ";
1124 *sustain_list++ = "All stats";
1128 /* Should we bother? */
1129 else if ((f2 & all_sustains))
1131 sustain_list = spoiler_flag_aux(f2, sustain_flags_desc,
1133 N_ELEMENTS(sustain_flags_desc));
1136 /* Terminate the description list */
1137 *sustain_list = NULL;
1142 * Note miscellaneous powers bestowed by an artifact such as see invisible,
1143 * free action, permanent light, etc.
1145 static void analyze_misc_magic (object_type *o_ptr, cptr *misc_list)
1149 object_flags(o_ptr, &f1, &f2, &f3);
1151 misc_list = spoiler_flag_aux(f2, misc_flags2_desc, misc_list,
1152 N_ELEMENTS(misc_flags2_desc));
1154 misc_list = spoiler_flag_aux(f3, misc_flags3_desc, misc_list,
1155 N_ELEMENTS(misc_flags3_desc));
1158 * Artifact lights -- large radius light.
1160 if ((o_ptr->tval == TV_LITE) && artifact_p(o_ptr))
1163 *misc_list++ = "±Êµ×¸÷¸»(Ⱦ·Â3)";
1165 *misc_list++ = "Permanent Light(3)";
1170 * Glowing artifacts -- small radius light.
1172 if (f3 & (TR3_LITE))
1175 *misc_list++ = "±Êµ×¸÷¸»(Ⱦ·Â1)";
1177 *misc_list++ = "Permanent Light(1)";
1182 * Handle cursed objects here to avoid redundancies such as noting
1183 * that a permanently cursed object is heavily cursed as well as
1184 * being "lightly cursed".
1187 /* if (cursed_p(o_ptr)) */
1190 if (f3 & TR3_TY_CURSE)
1193 *misc_list++ = "ÂÀ¸Å¤Î±åÇ°";
1195 *misc_list++ = "Ancient Curse";
1198 if (o_ptr->curse_flags & TRC_PERMA_CURSE)
1201 *misc_list++ = "±Ê±ó¤Î¼ö¤¤";
1203 *misc_list++ = "Permanently Cursed";
1206 else if (o_ptr->curse_flags & TRC_HEAVY_CURSE)
1209 *misc_list++ = "¶¯ÎϤʼö¤¤";
1211 *misc_list++ = "Heavily Cursed";
1215 else if (o_ptr->curse_flags & TRC_CURSED)
1218 *misc_list++ = "¼ö¤¤";
1220 *misc_list++ = "Cursed";
1225 /* Terminate the description list */
1233 * Determine the minimum depth an artifact can appear, its rarity, its weight,
1234 * and its value in gold pieces
1236 static void analyze_misc (object_type *o_ptr, char *misc_desc)
1238 artifact_type *a_ptr = &a_info[o_ptr->name1];
1241 sprintf(misc_desc, "¥ì¥Ù¥ë %u, ´õ¾¯ÅÙ %u, %d.%d kg, ¡ð%ld",
1242 a_ptr->level, a_ptr->rarity,
1243 lbtokg1(a_ptr->weight), lbtokg2(a_ptr->weight), a_ptr->cost);
1245 sprintf(misc_desc, "Level %u, Rarity %u, %d.%d lbs, %ld Gold",
1246 a_ptr->level, a_ptr->rarity,
1247 a_ptr->weight / 10, a_ptr->weight % 10, a_ptr->cost);
1253 * Fill in an object description structure for a given object
1255 static void object_analyze(object_type *o_ptr, obj_desc_list *desc_ptr)
1257 analyze_general(o_ptr, desc_ptr->description);
1259 analyze_pval(o_ptr, &desc_ptr->pval_info);
1261 analyze_brand(o_ptr, desc_ptr->brands);
1263 analyze_slay(o_ptr, desc_ptr->slays);
1265 analyze_immune(o_ptr, desc_ptr->immunities);
1267 analyze_resist(o_ptr, desc_ptr->resistances);
1269 analyze_sustains(o_ptr, desc_ptr->sustains);
1271 analyze_misc_magic(o_ptr, desc_ptr->misc_magic);
1273 analyze_misc(o_ptr, desc_ptr->misc_desc);
1275 desc_ptr->activation = item_activation(o_ptr);
1279 static void print_header(void)
1283 #ifndef FAKE_VERSION
1284 sprintf(buf, "Artifact Spoilers for Angband Version %d.%d.%d",
1285 VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH);
1286 spoiler_underline(buf);
1287 #else /* FAKE_VERSION */
1288 sprintf(buf, "Artifact Spoilers for Hengband Version %d.%d.%d",
1289 FAKE_VER_MAJOR-10, FAKE_VER_MINOR, FAKE_VER_PATCH);
1290 spoiler_underline(buf);
1291 #endif /* FAKE_VERSION */
1296 * This is somewhat ugly.
1298 * Given a header ("Resist", e.g.), a list ("Fire", "Cold", Acid", e.g.),
1299 * and a separator character (',', e.g.), write the list to the spoiler file
1300 * in a "nice" format, such as:
1302 * Resist Fire, Cold, Acid
1304 * That was a simple example, but when the list is long, a line wrap
1305 * should occur, and this should induce a new level of indention if
1306 * a list is being spread across lines. So for example, Bladeturner's
1307 * list of resistances should look something like this
1309 * Resist Acid, Lightning, Fire, Cold, Poison, Light, Dark, Blindness,
1310 * Confusion, Sound, Shards, Nether, Nexus, Chaos, Disenchantment
1312 * However, the code distinguishes between a single list of many items vs.
1313 * many lists. (The separator is used to make this determination.) A single
1314 * list of many items will not cause line wrapping (since there is no
1315 * apparent reason to do so). So the lists of Ulmo's miscellaneous traits
1316 * might look like this:
1318 * Free Action; Hold Life; See Invisible; Slow Digestion; Regeneration
1321 * So comparing the two, "Regeneration" has no trailing separator and
1322 * "Blessed Blade" was not indented. (Also, Ulmo's lists have no headers,
1323 * but that's not relevant to line wrapping and indention.)
1326 /* ITEM_SEP separates items within a list */
1327 #define ITEM_SEP ','
1330 /* LIST_SEP separates lists */
1332 #define LIST_SEP ','
1334 #define LIST_SEP ';'
1337 static void spoiler_outlist(cptr header, cptr *list, char separator)
1339 int line_len, buf_len;
1340 char line[MAX_LINE_LEN+1], buf[80];
1342 /* Ignore an empty list */
1343 if (*list == NULL) return;
1345 /* This function always indents */
1346 strcpy(line, INDENT1);
1348 /* Create header (if one was given) */
1349 if (header && (header[0]))
1351 strcat(line, header);
1355 line_len = strlen(line);
1357 /* Now begin the tedious task */
1360 /* Copy the current item to a buffer */
1363 /* Note the buffer's length */
1364 buf_len = strlen(buf);
1367 * If there is an item following this one, pad with separator and
1368 * a space and adjust the buffer length
1373 sprintf(buf + buf_len, "%c ", separator);
1378 * If the buffer will fit on the current line, just append the
1379 * buffer to the line and adjust the line length accordingly.
1382 if (line_len + buf_len <= MAX_LINE_LEN)
1385 line_len += buf_len;
1388 /* Apply line wrapping and indention semantics described above */
1392 * Don't print a trailing list separator but do print a trailing
1395 if (line_len > 1 && line[line_len - 1] == ' '
1396 && line[line_len - 2] == LIST_SEP)
1398 /* Ignore space and separator */
1399 line[line_len - 2] = '\0';
1401 /* Write to spoiler file */
1402 fprintf(fff, "%s\n", line);
1404 /* Begin new line at primary indention level */
1405 sprintf(line, "%s%s", INDENT1, buf);
1410 /* Write to spoiler file */
1411 fprintf(fff, "%s\n", line);
1413 /* Begin new line at secondary indention level */
1414 sprintf(line, "%s%s", INDENT2, buf);
1417 line_len = strlen(line);
1420 /* Advance, with break */
1421 if (!*++list) break;
1424 /* Write what's left to the spoiler file */
1425 fprintf(fff, "%s\n", line);
1429 /* Create a spoiler file entry for an artifact */
1431 static void spoiler_print_art(obj_desc_list *art_ptr)
1433 pval_info_type *pval_ptr = &art_ptr->pval_info;
1437 /* Don't indent the first line */
1438 fprintf(fff, "%s\n", art_ptr->description);
1440 /* An "empty" pval description indicates that the pval affects nothing */
1441 if (pval_ptr->pval_desc[0])
1443 /* Mention the effects of pval */
1445 sprintf(buf, "%s¤Î½¤Àµ:", pval_ptr->pval_desc);
1447 sprintf(buf, "%s to", pval_ptr->pval_desc);
1449 spoiler_outlist(buf, pval_ptr->pval_affects, ITEM_SEP);
1452 /* Now deal with the description lists */
1455 spoiler_outlist("ÂÐ:", art_ptr->slays, ITEM_SEP);
1457 spoiler_outlist("Éð´ï°À:", art_ptr->brands, LIST_SEP);
1459 spoiler_outlist("ÌȱÖ:", art_ptr->immunities, ITEM_SEP);
1461 spoiler_outlist("ÂÑÀ:", art_ptr->resistances, ITEM_SEP);
1463 spoiler_outlist("°Ý»ý:", art_ptr->sustains, ITEM_SEP);
1465 spoiler_outlist("Slay", art_ptr->slays, ITEM_SEP);
1467 spoiler_outlist("", art_ptr->brands, LIST_SEP);
1469 spoiler_outlist("Immunity to", art_ptr->immunities, ITEM_SEP);
1471 spoiler_outlist("Resist", art_ptr->resistances, ITEM_SEP);
1473 spoiler_outlist("Sustain", art_ptr->sustains, ITEM_SEP);
1475 spoiler_outlist("", art_ptr->misc_magic, LIST_SEP);
1478 /* Write out the possible activation at the primary indention level */
1479 if (art_ptr->activation)
1482 fprintf(fff, "%sȯư: %s\n", INDENT1, art_ptr->activation);
1484 fprintf(fff, "%sActivates for %s\n", INDENT1, art_ptr->activation);
1488 /* End with the miscellaneous facts */
1489 fprintf(fff, "%s%s\n\n", INDENT1, art_ptr->misc_desc);
1494 * Hack -- Create a "forged" artifact
1496 static bool make_fake_artifact(object_type *o_ptr, int name1)
1500 artifact_type *a_ptr = &a_info[name1];
1503 /* Ignore "empty" artifacts */
1504 if (!a_ptr->name) return FALSE;
1506 /* Acquire the "kind" index */
1507 i = lookup_kind(a_ptr->tval, a_ptr->sval);
1510 if (!i) return (FALSE);
1512 /* Create the artifact */
1513 object_prep(o_ptr, i);
1516 o_ptr->name1 = name1;
1518 /* Extract the fields */
1519 o_ptr->pval = a_ptr->pval;
1520 o_ptr->ac = a_ptr->ac;
1521 o_ptr->dd = a_ptr->dd;
1522 o_ptr->ds = a_ptr->ds;
1523 o_ptr->to_a = a_ptr->to_a;
1524 o_ptr->to_h = a_ptr->to_h;
1525 o_ptr->to_d = a_ptr->to_d;
1526 o_ptr->weight = a_ptr->weight;
1534 * Create a spoiler file for artifacts
1536 static void spoil_artifact(cptr fname)
1543 obj_desc_list artifact;
1548 /* Build the filename */
1549 path_build(buf, 1024, ANGBAND_DIR_USER, fname);
1551 /* File type is "TEXT" */
1552 FILE_TYPE(FILE_TYPE_TEXT);
1555 fff = my_fopen(buf, "w");
1560 msg_print("Cannot create spoiler file.");
1564 /* Dump the header */
1567 /* List the artifacts by tval */
1568 for (i = 0; group_artifact[i].tval; i++)
1570 /* Write out the group title */
1571 if (group_artifact[i].name)
1573 spoiler_blanklines(2);
1574 spoiler_underline(group_artifact[i].name);
1575 spoiler_blanklines(1);
1578 /* Now search through all of the artifacts */
1579 for (j = 1; j < max_a_idx; ++j)
1581 artifact_type *a_ptr = &a_info[j];
1583 /* We only want objects in the current group */
1584 if (a_ptr->tval != group_artifact[i].tval) continue;
1586 /* Get local object */
1589 /* Wipe the object */
1592 /* Attempt to "forge" the artifact */
1593 if (!make_fake_artifact(q_ptr, j)) continue;
1595 /* Analyze the artifact */
1596 object_analyze(q_ptr, &artifact);
1598 /* Write out the artifact description to the spoiler file */
1599 spoiler_print_art(&artifact);
1603 /* Check for errors */
1604 if (ferror(fff) || my_fclose(fff))
1606 msg_print("Cannot close spoiler file.");
1611 msg_print("Successfully created a spoiler file.");
1619 * Create a spoiler file for monsters -BEN-
1621 static void spoil_mon_desc(cptr fname)
1638 /* Build the filename */
1639 path_build(buf, 1024, ANGBAND_DIR_USER, fname);
1641 /* File type is "TEXT" */
1642 FILE_TYPE(FILE_TYPE_TEXT);
1645 fff = my_fopen(buf, "w");
1650 msg_print("Cannot create spoiler file.");
1654 /* Allocate the "who" array */
1655 C_MAKE(who, max_r_idx, s16b);
1657 /* Dump the header */
1659 #ifndef FAKE_VERSION
1660 fprintf(fff, "Monster Spoilers for Angband Version %d.%d.%d\n",
1661 VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH);
1662 fprintf(fff, "------------------------------------------\n\n");
1664 fprintf(fff, "Monster Spoilers for Hengband Version %d.%d.%d\n",
1665 FAKE_VER_MAJOR-10, FAKE_VER_MINOR, FAKE_VER_PATCH);
1666 fprintf(fff, "------------------------------------------\n\n");
1669 /* Dump the header */
1670 fprintf(fff, " %-38.38s%4s%4s%4s%7s%5s %11.11s\n",
1671 "Name", "Lev", "Rar", "Spd", "Hp", "Ac", "Visual Info");
1672 fprintf(fff, "%-42.42s%4s%4s%4s%7s%5s %11.11s\n",
1673 "--------", "---", "---", "---", "--", "--", "-----------");
1676 /* Scan the monsters */
1677 for (i = 1; i < max_r_idx; i++)
1679 monster_race *r_ptr = &r_info[i];
1681 /* Use that monster */
1682 if (r_ptr->name) who[n++] = i;
1685 /* Select the sort method */
1686 ang_sort_comp = ang_sort_comp_hook;
1687 ang_sort_swap = ang_sort_swap_hook;
1689 /* Sort the array by dungeon depth of monsters */
1690 ang_sort(who, &why, n);
1693 for (i = 0; i < n; i++)
1695 monster_race *r_ptr = &r_info[who[i]];
1697 cptr name = (r_name + r_ptr->name);
1698 if (r_ptr->flags7 & (RF7_KAGE)) continue;
1700 /* Get the "name" */
1701 /* if (r_ptr->flags1 & (RF1_QUESTOR)) */
1704 sprintf(nam, "[Q] %s", name);
1706 else if (r_ptr->flags1 & (RF1_UNIQUE))
1708 sprintf(nam, "[U] %s", name);
1713 sprintf(nam, " %s", name);
1715 sprintf(nam, "The %s", name);
1721 sprintf(lev, "%d", r_ptr->level);
1724 sprintf(rar, "%d", r_ptr->rarity);
1727 if (r_ptr->speed >= 110)
1729 sprintf(spd, "+%d", (r_ptr->speed - 110));
1733 sprintf(spd, "-%d", (110 - r_ptr->speed));
1737 sprintf(ac, "%d", r_ptr->ac);
1740 if ((r_ptr->flags1 & (RF1_FORCE_MAXHP)) || (r_ptr->hside == 1))
1742 sprintf(hp, "%d", r_ptr->hdice * r_ptr->hside);
1746 sprintf(hp, "%dd%d", r_ptr->hdice, r_ptr->hside);
1751 sprintf(exp, "%ld", (long)(r_ptr->mexp));
1753 /* Hack -- use visual instead */
1754 sprintf(exp, "%s '%c'", attr_to_text(r_ptr->d_attr), r_ptr->d_char);
1757 fprintf(fff, "%-42.42s%4s%4s%4s%7s%5s %11.11s\n",
1758 nam, lev, rar, spd, hp, ac, exp);
1765 /* Free the "who" array */
1766 C_KILL(who, max_r_idx, s16b);
1768 /* Check for errors */
1769 if (ferror(fff) || my_fclose(fff))
1771 msg_print("Cannot close spoiler file.");
1776 msg_print("Successfully created a spoiler file.");
1783 * Monster spoilers by: smchorse@ringer.cs.utsa.edu (Shawn McHorse)
1785 * Primarily based on code already in mon-desc.c, mostly by -BEN-
1791 static cptr wd_che[3] =
1793 { "¤½¤ì", "Èà", "Èà½÷" };
1795 { "It", "He", "She" };
1799 static cptr wd_lhe[3] =
1800 { "it", "he", "she" };
1805 * Buffer text to the given file. (-SHAWN-)
1806 * This is basically c_roff() from mon-desc.c with a few changes.
1808 static void spoil_out(cptr str)
1813 static char roff_buf[256];
1818 /* Current pointer into line roff_buf */
1819 static char *roff_p = roff_buf;
1821 /* Last space saved into roff_buf */
1822 static char *roff_s = NULL;
1824 /* Special handling for "new sequence" */
1827 if (roff_p != roff_buf) roff_p--;
1828 while (*roff_p == ' ' && roff_p != roff_buf) roff_p--;
1829 if (roff_p == roff_buf) fprintf(fff, "\n");
1832 *(roff_p + 1) = '\0';
1833 fprintf(fff, "%s\n\n", roff_buf);
1841 /* Scan the given string, character at a time */
1846 int k_flag = iskanji((unsigned char)(*str));
1849 int wrap = (ch == '\n');
1852 if (!isprint(ch) && !k_flag && !iskanji2) ch = ' ';
1853 if(k_flag && !iskanji2)iskanji2=1;else iskanji2=0;
1855 if (!isprint(ch)) ch = ' ';
1859 if ( roff_p >= roff_buf+( (k_flag) ? 74 : 75) ) wrap=1;
1860 if ((ch == ' ') && (roff_p + 2 >= roff_buf + ((k_flag) ? 74 : 75))) wrap = 1;
1862 if (roff_p >= roff_buf + 75) wrap = 1;
1863 if ((ch == ' ') && (roff_p + 2 >= roff_buf + 75)) wrap = 1;
1867 /* Handle line-wrap */
1875 if (roff_s && (ch != ' '))
1883 fprintf(fff, "%s\n", roff_buf);
1887 if(cbak != ' ') *roff_p++ = cbak;
1889 while (*r) *roff_p++ = *r++;
1893 if ((roff_p > roff_buf) || (ch != ' '))
1897 if (ch == ' ' || ch == '(' ) roff_s = roff_p;
1901 strncmp(str, "¡£", 2) != 0 &&
1902 strncmp(str, "¡¢", 2) != 0 &&
1903 strncmp(str, "¥£", 2) != 0 &&
1904 strncmp(str, "¡¼", 2) != 0) roff_s = roff_p;
1907 if (ch == ' ') roff_s = roff_p;
1917 * Create a spoiler file for monsters (-SHAWN-)
1919 static void spoil_mon_info(cptr fname)
1922 int msex, vn, i, j, k, l, n=0;
1923 bool breath, magic, sin;
1926 u32b flags1, flags2, flags3, flags4, flags5, flags6, flags7;
1935 /* Build the filename */
1936 path_build(buf, 1024, ANGBAND_DIR_USER, fname);
1938 /* File type is "TEXT" */
1939 FILE_TYPE(FILE_TYPE_TEXT);
1942 fff = my_fopen(buf, "w");
1947 msg_print("Cannot create spoiler file.");
1952 /* Dump the header */
1953 #ifndef FAKE_VERSION
1954 sprintf(buf, "Monster Spoilers for Angband Version %d.%d.%d\n",
1955 VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH);
1957 sprintf(buf, "Monster Spoilers for Hengband Version %d.%d.%d\n",
1958 FAKE_VER_MAJOR-10, FAKE_VER_MINOR, FAKE_VER_PATCH);
1962 spoil_out("------------------------------------------\n\n");
1964 /* Allocate the "who" array */
1965 C_MAKE(who, max_r_idx, s16b);
1967 /* Scan the monsters */
1968 for (i = 1; i < max_r_idx; i++)
1970 monster_race *r_ptr = &r_info[i];
1972 /* Use that monster */
1973 if (r_ptr->name) who[n++] = i;
1976 /* Select the sort method */
1977 ang_sort_comp = ang_sort_comp_hook;
1978 ang_sort_swap = ang_sort_swap_hook;
1980 /* Sort the array by dungeon depth of monsters */
1981 ang_sort(who, &why, n);
1985 * List all monsters in order
1987 for (l = 0; l < n; l++)
1989 monster_race *r_ptr = &r_info[who[l]];
1991 /* Extract the flags */
1992 flags1 = r_ptr->flags1;
1993 flags2 = r_ptr->flags2;
1994 flags3 = r_ptr->flags3;
1995 flags4 = r_ptr->flags4;
1996 flags5 = r_ptr->flags5;
1997 flags6 = r_ptr->flags6;
1998 flags7 = r_ptr->flags7;
2002 /* Extract a gender (if applicable) */
2003 if (flags1 & (RF1_FEMALE)) msex = 2;
2004 else if (flags1 & (RF1_MALE)) msex = 1;
2009 if (flags1 & (RF1_QUESTOR))
2013 else if (flags1 & (RF1_UNIQUE))
2026 sprintf(buf, "%s/%s (", (r_name + r_ptr->name),(r_name+r_ptr->E_name)); /* ---)--- */
2028 sprintf(buf, "%s (", (r_name + r_ptr->name)); /* ---)--- */
2034 spoil_out(attr_to_text(r_ptr->d_attr));
2037 sprintf(buf, " '%c')\n", r_ptr->d_char);
2042 sprintf(buf, "=== ");
2046 sprintf(buf, "Num:%d ", n);
2050 sprintf(buf, "Lev:%d ", r_ptr->level);
2054 sprintf(buf, "Rar:%d ", r_ptr->rarity);
2058 if (r_ptr->speed >= 110)
2060 sprintf(buf, "Spd:+%d ", (r_ptr->speed - 110));
2064 sprintf(buf, "Spd:-%d ", (110 - r_ptr->speed));
2069 if ((flags1 & (RF1_FORCE_MAXHP)) || (r_ptr->hside == 1))
2071 sprintf(buf, "Hp:%d ", r_ptr->hdice * r_ptr->hside);
2075 sprintf(buf, "Hp:%dd%d ", r_ptr->hdice, r_ptr->hside);
2080 sprintf(buf, "Ac:%d ", r_ptr->ac);
2084 sprintf(buf, "Exp:%ld\n", (long)(r_ptr->mexp));
2089 spoil_out(r_text + r_ptr->text);
2101 if (flags2 & RF2_ELDRITCH_HORROR) spoil_out("¶¸µ¤¤òͶ¤¦");/*nuke me*/
2102 if (flags3 & RF3_ANIMAL) spoil_out("¼«Á³³¦¤Î");
2103 if (flags3 & RF3_EVIL) spoil_out("¼Ù°¤Ê¤ë");
2104 if (flags3 & RF3_GOOD) spoil_out("Á±ÎɤÊ");
2105 if (flags3 & RF3_UNDEAD) spoil_out("¥¢¥ó¥Ç¥Ã¥É¤Î");
2106 if (flags3 & RF3_AMBERITE) spoil_out("¥¢¥ó¥Ð¡¼¤Î²¦Â²¤Î");
2108 if ((flags3 & (RF3_DRAGON | RF3_DEMON | RF3_GIANT | RF3_TROLL | RF3_ORC)) || (flags2 & (RF2_QUANTUM | RF2_HUMAN)))
2110 if (flags3 & RF3_DRAGON) spoil_out("¥É¥é¥´¥ó");
2111 if (flags3 & RF3_DEMON) spoil_out("¥Ç¡¼¥â¥ó");
2112 if (flags3 & RF3_GIANT) spoil_out("¥¸¥ã¥¤¥¢¥ó¥È");
2113 if (flags3 & RF3_TROLL) spoil_out("¥È¥í¥ë");
2114 if (flags3 & RF3_ORC) spoil_out("¥ª¡¼¥¯");
2115 if (flags2 & RF2_HUMAN) spoil_out("¿Í´Ö");/*nuke me*/
2116 if (flags2 & RF2_QUANTUM) spoil_out("ÎÌ»ÒÀ¸Êª");
2118 else spoil_out("¥â¥ó¥¹¥¿¡¼");
2122 if (flags2 & (RF2_ELDRITCH_HORROR)) spoil_out (" sanity-blasting");
2123 if (flags3 & (RF3_ANIMAL)) spoil_out(" natural");
2124 if (flags3 & (RF3_EVIL)) spoil_out(" evil");
2125 if (flags3 & (RF3_GOOD)) spoil_out(" good");
2126 if (flags3 & (RF3_UNDEAD)) spoil_out(" undead");
2127 if (flags3 & (RF3_AMBERITE)) spoil_out (" Amberite");
2129 if (flags3 & (RF3_DRAGON)) spoil_out(" dragon");
2130 else if (flags3 & (RF3_DEMON)) spoil_out(" demon");
2131 else if (flags3 & (RF3_GIANT)) spoil_out(" giant");
2132 else if (flags3 & (RF3_TROLL)) spoil_out(" troll");
2133 else if (flags3 & (RF3_ORC)) spoil_out(" orc");
2134 else if (flags2 & (RF2_HUMAN)) spoil_out (" Human");
2135 else spoil_out(" creature");
2142 spoil_out(" moves");
2146 if ((flags1 & (RF1_RAND_50)) && (flags1 & (RF1_RAND_25)))
2149 spoil_out("¤«¤Ê¤êÉÔµ¬Â§¤Ë");
2151 spoil_out(" extremely erratically");
2155 else if (flags1 & (RF1_RAND_50))
2158 spoil_out("´öʬÉÔµ¬Â§¤Ë");
2160 spoil_out(" somewhat erratically");
2164 else if (flags1 & (RF1_RAND_25))
2167 spoil_out("¾¯¡¹ÉÔµ¬Â§¤Ë");
2169 spoil_out(" a bit erratically");
2176 spoil_out("ÉáÄ̤Ë");
2178 spoil_out(" normally");
2184 spoil_out("Æ°¤¤¤Æ¤¤¤ë");
2186 if (flags1 & (RF1_NEVER_MOVE))
2189 spoil_out("¤¬¡¢¿¯Æþ¼Ô¤òÄÉÀפ·¤Ê¤¤");
2191 spoil_out(", but does not deign to chase intruders");
2197 spoil_out("¤³¤È¤¬¤¢¤ë¡£");
2203 if (!r_ptr->level || (flags1 & (RF1_FORCE_DEPTH)))
2205 sprintf(buf, "%s is never found out of depth. ", wd_che[msex]);
2209 if (flags1 & (RF1_FORCE_SLEEP))
2211 sprintf(buf, "%s is always created sluggish. ", wd_che[msex]);
2215 if (flags2 & (RF2_AURA_FIRE))
2217 sprintf(buf, "%s is surrounded by flames. ", wd_che[msex]);
2221 if (flags3 & (RF3_AURA_COLD))
2223 sprintf(buf, "%s is surrounded by ice. ", wd_che[msex]);
2227 if (flags2 & (RF2_AURA_ELEC))
2229 sprintf(buf, "%s is surrounded by electricity. ", wd_che[msex]);
2233 if (flags2 & (RF2_REFLECTING))
2235 sprintf(buf, "%s reflects bolt spells. ", wd_che[msex]);
2239 if (flags1 & (RF1_ESCORT))
2241 sprintf(buf, "%s usually appears with ", wd_che[msex]);
2243 if (flags1 & (RF1_ESCORTS)) spoil_out("escorts. ");
2244 else spoil_out("an escort. ");
2247 if (flags1 & RF1_FRIENDS)
2249 sprintf(buf, "%s usually appears in groups. ", wd_che[msex]);
2253 /* Collect inate attacks */
2256 if (flags4 & RF4_SHRIEK) vp[vn++] = "ÈáÌĤǽõ¤±¤òµá¤á¤ë";
2257 if (flags4 & RF4_ROCKET) vp[vn++] = "¥í¥±¥Ã¥È¤òȯ¼Í¤¹¤ë";
2258 if (flags4 & RF4_SHOOT) vp[vn++] = "¼Í·â¤ò¤¹¤ë";
2259 if (flags6 & (RF6_SPECIAL)) vp[vn++] = "ÆÃÊ̤ʹÔÆ°¤ò¤¹¤ë";
2261 if (flags4 & RF4_SHRIEK) vp[vn++] = "shriek for help";
2262 if (flags4 & RF4_ROCKET) vp[vn++] = "shoot a rocket";
2263 if (flags4 & RF4_SHOOT) vp[vn++] = "fire missiles";
2264 if (flags6 & (RF6_SPECIAL)) vp[vn++] = "do something";
2271 spoil_out(wd_che[msex]);
2274 spoil_out(wd_che[msex]);
2277 for (i = 0; i < vn; i++)
2281 jverb3(vp[i],jverb_buf);
2282 spoil_out(jverb_buf);
2285 else spoil_out(vp[i]);
2287 if (!i) spoil_out(" may ");
2288 else if (i < vn-1) spoil_out(", ");
2289 else spoil_out(" or ");
2295 spoil_out("¤³¤È¤¬¤Ç¤¤ë¡£");
2302 /* Collect breaths */
2305 if (flags4 & (RF4_BR_ACID)) vp[vn++] = "»À";
2306 if (flags4 & (RF4_BR_ELEC)) vp[vn++] = "°ðºÊ";
2307 if (flags4 & (RF4_BR_FIRE)) vp[vn++] = "²Ð±ê";
2308 if (flags4 & (RF4_BR_COLD)) vp[vn++] = "Î䵤";
2309 if (flags4 & (RF4_BR_POIS)) vp[vn++] = "ÆÇ";
2310 if (flags4 & (RF4_BR_NETH)) vp[vn++] = "ÃϹö";
2311 if (flags4 & (RF4_BR_LITE)) vp[vn++] = "Á®¸÷";
2312 if (flags4 & (RF4_BR_DARK)) vp[vn++] = "°Å¹õ";
2313 if (flags4 & (RF4_BR_CONF)) vp[vn++] = "º®Íð";
2314 if (flags4 & (RF4_BR_SOUN)) vp[vn++] = "¹ì²»";
2315 if (flags4 & (RF4_BR_CHAO)) vp[vn++] = "¥«¥ª¥¹";
2316 if (flags4 & (RF4_BR_DISE)) vp[vn++] = "Îô²½";
2317 if (flags4 & (RF4_BR_NEXU)) vp[vn++] = "°ø²Ìº®Íð";
2318 if (flags4 & (RF4_BR_TIME)) vp[vn++] = "»þ´ÖµÕž";
2319 if (flags4 & (RF4_BR_INER)) vp[vn++] = "ÃÙÆß";
2320 if (flags4 & (RF4_BR_GRAV)) vp[vn++] = "½ÅÎÏ";
2321 if (flags4 & (RF4_BR_SHAR)) vp[vn++] = "ÇËÊÒ";
2322 if (flags4 & (RF4_BR_PLAS)) vp[vn++] = "¥×¥é¥º¥Þ";
2323 if (flags4 & (RF4_BR_WALL)) vp[vn++] = "¥Õ¥©¡¼¥¹";
2324 if (flags4 & (RF4_BR_MANA)) vp[vn++] = "ËâÎÏ";
2325 if (flags4 & (RF4_BR_NUKE)) vp[vn++] = "Êü¼ÍÀÇÑ´þʪ";
2326 if (flags4 & (RF4_BR_DISI)) vp[vn++] = "ʬ²ò";
2328 if (flags4 & (RF4_BR_ACID)) vp[vn++] = "acid";
2329 if (flags4 & (RF4_BR_ELEC)) vp[vn++] = "lightning";
2330 if (flags4 & (RF4_BR_FIRE)) vp[vn++] = "fire";
2331 if (flags4 & (RF4_BR_COLD)) vp[vn++] = "frost";
2332 if (flags4 & (RF4_BR_POIS)) vp[vn++] = "poison";
2333 if (flags4 & (RF4_BR_NETH)) vp[vn++] = "nether";
2334 if (flags4 & (RF4_BR_LITE)) vp[vn++] = "light";
2335 if (flags4 & (RF4_BR_DARK)) vp[vn++] = "darkness";
2336 if (flags4 & (RF4_BR_CONF)) vp[vn++] = "confusion";
2337 if (flags4 & (RF4_BR_SOUN)) vp[vn++] = "sound";
2338 if (flags4 & (RF4_BR_CHAO)) vp[vn++] = "chaos";
2339 if (flags4 & (RF4_BR_DISE)) vp[vn++] = "disenchantment";
2340 if (flags4 & (RF4_BR_NEXU)) vp[vn++] = "nexus";
2341 if (flags4 & (RF4_BR_TIME)) vp[vn++] = "time";
2342 if (flags4 & (RF4_BR_INER)) vp[vn++] = "inertia";
2343 if (flags4 & (RF4_BR_GRAV)) vp[vn++] = "gravity";
2344 if (flags4 & (RF4_BR_SHAR)) vp[vn++] = "shards";
2345 if (flags4 & (RF4_BR_PLAS)) vp[vn++] = "plasma";
2346 if (flags4 & (RF4_BR_WALL)) vp[vn++] = "force";
2347 if (flags4 & (RF4_BR_MANA)) vp[vn++] = "mana";
2348 if (flags4 & (RF4_BR_NUKE)) vp[vn++] = "toxic waste";
2349 if (flags4 & (RF4_BR_DISI)) vp[vn++] = "disintegration";
2357 spoil_out(wd_che[msex]);
2360 spoil_out(wd_che[msex]);
2366 for (i = 0; i < vn; i++)
2369 if ( i != 0 ) spoil_out("¤ä");
2371 if (!i) spoil_out(" may breathe ");
2372 else if (i < vn-1) spoil_out(", ");
2373 else spoil_out(" or ");
2379 spoil_out("¤Î¥Ö¥ì¥¹¤ò");
2380 if (flags2 & (RF2_POWERFUL)) spoil_out("¶¯ÎϤË");
2381 spoil_out("ÅǤ¯¤³¤È¤¬¤¢");
2383 if (flags2 & (RF2_POWERFUL)) spoil_out(" powerfully");
2388 /* Collect spells */
2391 if (flags5 & (RF5_BA_ACID)) vp[vn++] = "¥¢¥·¥Ã¥É¡¦¥Ü¡¼¥ë¤Î";
2392 if (flags5 & (RF5_BA_ELEC)) vp[vn++] = "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë¤Î";
2393 if (flags5 & (RF5_BA_FIRE)) vp[vn++] = "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë¤Î";
2394 if (flags5 & (RF5_BA_COLD)) vp[vn++] = "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë¤Î";
2395 if (flags5 & (RF5_BA_POIS)) vp[vn++] = "°½±À¤Î";
2396 if (flags5 & (RF5_BA_NETH)) vp[vn++] = "ÃϹöµå¤Î";
2397 if (flags5 & (RF5_BA_WATE)) vp[vn++] = "¥¦¥©¡¼¥¿¡¼¡¦¥Ü¡¼¥ë¤Î";
2398 if (flags4 & (RF4_BA_NUKE)) vp[vn++] = "Êü¼Íǽµå¤Î";
2400 if (flags5 & (RF5_BA_ACID)) vp[vn++] = "produce acid balls";
2401 if (flags5 & (RF5_BA_ELEC)) vp[vn++] = "produce lightning balls";
2402 if (flags5 & (RF5_BA_FIRE)) vp[vn++] = "produce fire balls";
2403 if (flags5 & (RF5_BA_COLD)) vp[vn++] = "produce frost balls";
2404 if (flags5 & (RF5_BA_POIS)) vp[vn++] = "produce poison balls";
2405 if (flags5 & (RF5_BA_NETH)) vp[vn++] = "produce nether balls";
2406 if (flags5 & (RF5_BA_WATE)) vp[vn++] = "produce water balls";
2407 if (flags4 & (RF4_BA_NUKE)) vp[vn++] = "produce balls of radiation";
2411 if (flags5 & (RF5_BA_MANA)) vp[vn++] = "ËâÎϤÎÍò¤Î";
2412 if (flags5 & (RF5_BA_DARK)) vp[vn++] = "°Å¹õ¤ÎÍò¤Î";
2413 if (flags5 & (RF5_BA_LITE)) vp[vn++] = "¥¹¥¿¡¼¥Ð¡¼¥¹¥È¤Î";
2414 if (flags4 & (RF4_BA_CHAO)) vp[vn++] = "½ã¥í¥°¥ë¥¹¤Î";
2416 if (flags5 & (RF5_BA_MANA)) vp[vn++] = "produce mana storms";
2417 if (flags5 & (RF5_BA_DARK)) vp[vn++] = "produce darkness storms";
2418 if (flags4 & (RF5_BA_LITE)) vp[vn++] = "produce starburst";
2419 if (flags4 & (RF4_BA_CHAO)) vp[vn++] = "invoke raw Logrus";
2422 if (flags6 & (RF6_HAND_DOOM)) vp[vn++] = "ÇËÌǤμê¤Î";
2423 if (flags6 & (RF6_PSY_SPEAR)) vp[vn++] = "¸÷¤Î·õ¤Î";
2424 if (flags5 & (RF5_DRAIN_MANA)) vp[vn++] = "ËâÎϤòµÛ¤¤¼è¤ë";
2425 if (flags5 & (RF5_MIND_BLAST)) vp[vn++] = "Àº¿À¤ò¹¶·â¤¹¤ë";
2426 if (flags5 & (RF5_BRAIN_SMASH)) vp[vn++] = "Ǿ¤ò¹¶·â¤¹¤ë";
2427 if (flags5 & (RF5_CAUSE_1)) vp[vn++] = "·Ú½ý¤ò°ú¤µ¯¤³¤·¤Æ¼ö¤¤¤ò¤«¤±¤ë";
2428 if (flags5 & (RF5_CAUSE_2)) vp[vn++] = "½Å½ý¤ò°ú¤µ¯¤³¤·¤Æ¼ö¤¤¤ò¤«¤±¤ë";
2429 if (flags5 & (RF5_CAUSE_3)) vp[vn++] = "Ã×Ì¿½ý¤ò°ú¤µ¯¤³¤·¤Æ¼ö¤¤¤ò¤«¤±¤ë";
2430 if (flags5 & (RF5_CAUSE_4)) vp[vn++] = "È빦¤òÆͤ¯";
2431 if (flags5 & (RF5_BO_ACID)) vp[vn++] = "¥¢¥·¥Ã¥É¡¦¥Ü¥ë¥È¤Î";
2432 if (flags5 & (RF5_BO_ELEC)) vp[vn++] = "¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È¤Î";
2433 if (flags5 & (RF5_BO_FIRE)) vp[vn++] = "¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È¤Î";
2434 if (flags5 & (RF5_BO_COLD)) vp[vn++] = "¥¢¥¤¥¹¡¦¥Ü¥ë¥È¤Î";
2435 if (flags5 & (RF5_BO_NETH)) vp[vn++] = "ÃϹö¤ÎÌð¤Î";
2436 if (flags5 & (RF5_BO_WATE)) vp[vn++] = "¥¦¥©¡¼¥¿¡¼¡¦¥Ü¥ë¥È¤Î";
2437 if (flags5 & (RF5_BO_MANA)) vp[vn++] = "ËâÎϤÎÌð¤Î";
2438 if (flags5 & (RF5_BO_PLAS)) vp[vn++] = "¥×¥é¥º¥Þ¡¦¥Ü¥ë¥È¤Î";
2439 if (flags5 & (RF5_BO_ICEE)) vp[vn++] = "¶Ë´¨¤ÎÌð¤Î";
2440 if (flags5 & (RF5_MISSILE)) vp[vn++] = "¥Þ¥¸¥Ã¥¯¥ß¥µ¥¤¥ë¤Î";
2441 if (flags5 & (RF5_SCARE)) vp[vn++] = "¶²Éݤò¸Æ¤Óµ¯¤³¤¹";
2442 if (flags5 & (RF5_BLIND)) vp[vn++] = "Ìܤò¤¯¤é¤Þ¤»¤ë";
2443 if (flags5 & (RF5_CONF)) vp[vn++] = "º®Í𤵤»¤ë";
2444 if (flags5 & (RF5_SLOW)) vp[vn++] = "¸ºÂ®¤µ¤»¤ë";
2445 if (flags5 & (RF5_HOLD)) vp[vn++] = "Ëãá㤵¤»¤ë";
2446 if (flags6 & (RF6_HASTE)) vp[vn++] = "¼«Ê¬¤ò²Ã®¤¹¤ë";
2447 if (flags6 & (RF6_HEAL)) vp[vn++] = "¼«Ê¬¤ò¼£Ìþ¤¹¤ë";
2448 if (flags6 & (RF6_INVULNER)) vp[vn++] = "̵½ý¤Îµå¤Î";
2449 if (flags4 & (RF4_DISPEL)) vp[vn++] = "ËâÎϤò¾Ã¤·µî¤ë";
2450 if (flags6 & (RF6_BLINK)) vp[vn++] = "½Ö»þ¤Ë¾Ã¤¨¤ë";
2451 if (flags6 & (RF6_TPORT)) vp[vn++] = "¥Æ¥ì¥Ý¡¼¥È¤¹¤ë";
2452 if (flags6 & (RF6_WORLD)) vp[vn++] = "»þ¤ò»ß¤á¤ë";
2453 if (flags6 & (RF6_TELE_TO)) vp[vn++] = "¥Æ¥ì¥Ý¡¼¥È¤Ç°ú¤Ì᤹";
2454 if (flags6 & (RF6_TELE_AWAY)) vp[vn++] = "¥Æ¥ì¥Ý¡¼¥È¤µ¤»¤ë";
2455 if (flags6 & (RF6_TELE_LEVEL)) vp[vn++] = "¥Æ¥ì¥Ý¡¼¥È¡¦¥ì¥Ù¥ë¤µ¤»¤ë";
2456 if (flags6 & (RF6_DARKNESS)) vp[vn++] = "°Å°Ç¤òºî¤ë";
2457 if (flags6 & (RF6_TRAPS)) vp[vn++] = "¥È¥é¥Ã¥×¤òºî¤ë";
2458 if (flags6 & (RF6_FORGET)) vp[vn++] = "µ²±¤ò¾Ãµî¤¹¤ë";
2459 if (flags6 & (RF6_RAISE_DEAD)) vp[vn++] = "»à¼Ô¤òᴤ餻¤ë";
2460 if (flags6 & (RF6_S_MONSTER)) vp[vn++] = "°ìÂΤΥâ¥ó¥¹¥¿¡¼¤ò¾¤´¤¹¤ë";
2461 if (flags6 & (RF6_S_MONSTERS)) vp[vn++] = "Ê£¿ô¤Î¥â¥ó¥¹¥¿¡¼¤ò¾¤´¤¹¤ë";
2462 if (flags6 & (RF6_S_KIN)) vp[vn++] = "µß±ç¤ò¾¤´¤¹¤ë";
2463 if (flags6 & (RF6_S_ANT)) vp[vn++] = "¥¢¥ê¤ò¾¤´¤¹¤ë";
2464 if (flags6 & (RF6_S_SPIDER)) vp[vn++] = "¥¯¥â¤ò¾¤´¤¹¤ë";
2465 if (flags6 & (RF6_S_HOUND)) vp[vn++] = "¥Ï¥¦¥ó¥É¤ò¾¤´¤¹¤ë";
2466 if (flags6 & (RF6_S_HYDRA)) vp[vn++] = "¥Ò¥É¥é¤ò¾¤´¤¹¤ë";
2467 if (flags6 & (RF6_S_ANGEL)) vp[vn++] = "°ìÂΤÎÅ·»È¤ò¾¤´¤¹¤ë";
2468 if (flags6 & (RF6_S_DEMON)) vp[vn++] = "°ìÂΤΥǡ¼¥â¥ó¤ò¾¤´¤¹¤ë";
2469 if (flags6 & (RF6_S_UNDEAD)) vp[vn++] = "°ìÂΤΥ¢¥ó¥Ç¥Ã¥É¤ò¾¤´¤¹¤ë";
2470 if (flags6 & (RF6_S_DRAGON)) vp[vn++] = "°ìÂΤΥɥ饴¥ó¤ò¾¤´¤¹¤ë";
2471 if (flags6 & (RF6_S_HI_UNDEAD)) vp[vn++] = "¶¯ÎϤʥ¢¥ó¥Ç¥Ã¥É¤ò¾¤´¤¹¤ë";
2472 if (flags6 & (RF6_S_HI_DRAGON)) vp[vn++] = "¸ÅÂå¥É¥é¥´¥ó¤ò¾¤´¤¹¤ë";
2473 if (flags6 & (RF6_S_CYBER)) vp[vn++] = "¥µ¥¤¥Ð¡¼¥Ç¡¼¥â¥ó¤ò¾¤´¤¹¤ë";
2474 if (flags6 & (RF6_S_AMBERITES)) vp[vn++] = "¥¢¥ó¥Ð¡¼¤Î²¦Â²¤ò¾¤´¤¹¤ë";
2475 if (flags6 & (RF6_S_UNIQUE)) vp[vn++] = "¥æ¥Ë¡¼¥¯¡¦¥â¥ó¥¹¥¿¡¼¤ò¾¤´¤¹¤ë";
2477 if (flags6 & (RF6_HAND_DOOM)) vp[vn++] = "invoke the Hand of Doom";
2478 if (flags6 & (RF6_PSY_SPEAR)) vp[vn++] = "psycho-spear";
2479 if (flags5 & (RF5_DRAIN_MANA)) vp[vn++] = "drain mana";
2480 if (flags5 & (RF5_MIND_BLAST)) vp[vn++] = "cause mind blasting";
2481 if (flags5 & (RF5_BRAIN_SMASH)) vp[vn++] = "cause brain smashing";
2482 if (flags5 & (RF5_CAUSE_1)) vp[vn++] = "cause light wounds and cursing";
2483 if (flags5 & (RF5_CAUSE_2)) vp[vn++] = "cause serious wounds and cursing";
2484 if (flags5 & (RF5_CAUSE_3)) vp[vn++] = "cause critical wounds and cursing";
2485 if (flags5 & (RF5_CAUSE_4)) vp[vn++] = "cause mortal wounds";
2486 if (flags5 & (RF5_BO_ACID)) vp[vn++] = "produce acid bolts";
2487 if (flags5 & (RF5_BO_ELEC)) vp[vn++] = "produce lightning bolts";
2488 if (flags5 & (RF5_BO_FIRE)) vp[vn++] = "produce fire bolts";
2489 if (flags5 & (RF5_BO_COLD)) vp[vn++] = "produce frost bolts";
2490 if (flags5 & (RF5_BO_NETH)) vp[vn++] = "produce nether bolts";
2491 if (flags5 & (RF5_BO_WATE)) vp[vn++] = "produce water bolts";
2492 if (flags5 & (RF5_BO_MANA)) vp[vn++] = "produce mana bolts";
2493 if (flags5 & (RF5_BO_PLAS)) vp[vn++] = "produce plasma bolts";
2494 if (flags5 & (RF5_BO_ICEE)) vp[vn++] = "produce ice bolts";
2495 if (flags5 & (RF5_MISSILE)) vp[vn++] = "produce magic missiles";
2496 if (flags5 & (RF5_SCARE)) vp[vn++] = "terrify";
2497 if (flags5 & (RF5_BLIND)) vp[vn++] = "blind";
2498 if (flags5 & (RF5_CONF)) vp[vn++] = "confuse";
2499 if (flags5 & (RF5_SLOW)) vp[vn++] = "slow";
2500 if (flags5 & (RF5_HOLD)) vp[vn++] = "paralyze";
2501 if (flags6 & (RF6_HASTE)) vp[vn++] = "haste-self";
2502 if (flags6 & (RF6_HEAL)) vp[vn++] = "heal-self";
2503 if (flags6 & (RF6_INVULNER)) vp[vn++] = "make invulnerable";
2504 if (flags6 & (RF6_BLINK)) vp[vn++] = "blink-self";
2505 if (flags6 & (RF6_TPORT)) vp[vn++] = "teleport-self";
2506 if (flags6 & (RF6_WORLD)) vp[vn++] = "stop the time";
2507 if (flags6 & (RF6_TELE_TO)) vp[vn++] = "teleport to";
2508 if (flags6 & (RF6_TELE_AWAY)) vp[vn++] = "teleport away";
2509 if (flags6 & (RF6_TELE_LEVEL)) vp[vn++] = "teleport level";
2510 if (flags6 & (RF6_DARKNESS)) vp[vn++] = "create darkness";
2511 if (flags6 & (RF6_TRAPS)) vp[vn++] = "create traps";
2512 if (flags6 & (RF6_FORGET)) vp[vn++] = "cause amnesia";
2513 if (flags6 & (RF6_RAISE_DEAD)) vp[vn++] = "raise dead";
2514 if (flags6 & (RF6_S_MONSTER)) vp[vn++] = "summon a monster";
2515 if (flags6 & (RF6_S_MONSTERS)) vp[vn++] = "summon monsters";
2516 if (flags6 & (RF6_S_KIN)) vp[vn++] = "summon aid";
2517 if (flags6 & (RF6_S_ANT)) vp[vn++] = "summon ants";
2518 if (flags6 & (RF6_S_SPIDER)) vp[vn++] = "summon spiders";
2519 if (flags6 & (RF6_S_HOUND)) vp[vn++] = "summon hounds";
2520 if (flags6 & (RF6_S_HYDRA)) vp[vn++] = "summon hydras";
2521 if (flags6 & (RF6_S_ANGEL)) vp[vn++] = "summon an angel";
2522 if (flags6 & (RF6_S_DEMON)) vp[vn++] = "summon a demon";
2523 if (flags6 & (RF6_S_UNDEAD)) vp[vn++] = "summon an undead";
2524 if (flags6 & (RF6_S_DRAGON)) vp[vn++] = "summon a dragon";
2525 if (flags6 & (RF6_S_HI_UNDEAD)) vp[vn++] = "summon greater undead";
2526 if (flags6 & (RF6_S_HI_DRAGON)) vp[vn++] = "summon ancient dragons";
2527 if (flags6 & (RF6_S_CYBER)) vp[vn++] = "summon Cyberdemons";
2528 if (flags6 & (RF6_S_AMBERITES)) vp[vn++] = "summon Lords of Amber";
2529 if (flags6 & (RF6_S_UNIQUE)) vp[vn++] = "summon unique monsters";
2539 spoil_out("¤ê¡¢¤Ê¤ª¤«¤Ä");
2541 spoil_out(", and is also");
2548 spoil_out(wd_che[msex]);
2551 spoil_out(wd_che[msex]);
2559 if (flags2 & (RF2_SMART)) spoil_out("Ū³Î¤Ë");
2562 spoil_out("ËâË¡¤ò»È¤¦¤³¤È¤¬¤Ç¤¡¢");
2564 spoil_out(" magical, casting spells");
2565 if (flags2 & (RF2_SMART)) spoil_out(" intelligently");
2569 for (i = 0; i < vn; i++)
2572 if ( i != 0 ) spoil_out("¼öʸ¡¢");
2574 if (!i) spoil_out(" which ");
2575 else if (i < vn-1) spoil_out(", ");
2576 else spoil_out(" or ");
2582 spoil_out("¼öʸ¤ò¾§¤¨¤ë¤³¤È¤¬¤¢");
2586 if (breath || magic)
2589 sprintf(buf, "¤ë(³ÎΨ:Ìó1/%d)¡£",
2590 200 / (r_ptr->freq_inate + r_ptr->freq_spell));
2593 sprintf(buf, "; 1 time in %d. ",
2594 200 / (r_ptr->freq_inate + r_ptr->freq_spell));
2600 /* Collect special abilities. */
2603 if (flags7 & (RF7_HAS_LITE_1 | RF7_HAS_LITE_2)) vp[vn++] = "¥À¥ó¥¸¥ç¥ó¤ò¾È¤é¤¹";
2604 if (flags7 & (RF7_SELF_LITE_1 | RF7_SELF_LITE_2)) vp[vn++] = "¸÷¤Ã¤Æ¤¤¤ë";
2605 if (flags2 & (RF2_OPEN_DOOR)) vp[vn++] = "¥É¥¢¤ò³«¤±¤ë";
2606 if (flags2 & (RF2_BASH_DOOR)) vp[vn++] = "¥É¥¢¤òÂǤÁÇˤë";
2607 if (flags2 & (RF2_PASS_WALL)) vp[vn++] = "Êɤò¤¹¤êÈ´¤±¤ë";
2608 if (flags2 & (RF2_KILL_WALL)) vp[vn++] = "Êɤò·¡¤ê¿Ê¤à";
2609 if (flags2 & (RF2_MOVE_BODY)) vp[vn++] = "¼å¤¤¥â¥ó¥¹¥¿¡¼¤ò²¡¤·¤Î¤±¤ë";
2610 if (flags2 & (RF2_KILL_BODY)) vp[vn++] = "¼å¤¤¥â¥ó¥¹¥¿¡¼¤òÅݤ¹";
2611 if (flags2 & (RF2_TAKE_ITEM)) vp[vn++] = "¥¢¥¤¥Æ¥à¤ò½¦¤¦";
2612 if (flags2 & (RF2_KILL_ITEM)) vp[vn++] = "¥¢¥¤¥Æ¥à¤ò²õ¤¹";
2614 if (flags7 & (RF7_HAS_LITE_1 | RF7_HAS_LITE_2)) vp[vn++] = "illuminate the dungeon";
2615 if (flags7 & (RF7_SELF_LITE_1 | RF7_SELF_LITE_2)) vp[vn++] = "illuminate the dungeon";
2616 if (flags2 & (RF2_OPEN_DOOR)) vp[vn++] = "open doors";
2617 if (flags2 & (RF2_BASH_DOOR)) vp[vn++] = "bash down doors";
2618 if (flags2 & (RF2_PASS_WALL)) vp[vn++] = "pass through walls";
2619 if (flags2 & (RF2_KILL_WALL)) vp[vn++] = "bore through walls";
2620 if (flags2 & (RF2_MOVE_BODY)) vp[vn++] = "push past weaker monsters";
2621 if (flags2 & (RF2_KILL_BODY)) vp[vn++] = "destroy weaker monsters";
2622 if (flags2 & (RF2_TAKE_ITEM)) vp[vn++] = "pick up objects";
2623 if (flags2 & (RF2_KILL_ITEM)) vp[vn++] = "destroy objects";
2629 spoil_out(wd_che[msex]);
2630 for (i = 0; i < vn; i++)
2634 jverb1(vp[i],jverb_buf);
2635 spoil_out(jverb_buf);
2638 else spoil_out(vp[i]);
2640 if (!i) spoil_out(" can ");
2641 else if (i < vn-1) spoil_out(", ");
2642 else spoil_out(" and ");
2650 if (flags2 & (RF2_INVISIBLE))
2652 spoil_out(wd_che[msex]);
2654 spoil_out("¤ÏÆ©ÌÀ¤ÇÌܤ˸«¤¨¤Ê¤¤¡£");
2656 spoil_out(" is invisible. ");
2660 if (flags2 & (RF2_COLD_BLOOD))
2662 spoil_out(wd_che[msex]);
2664 spoil_out("¤ÏÎä·ìưʪ¤Ç¤¢¤ë¡£");
2666 spoil_out(" is cold blooded. ");
2670 if (flags2 & (RF2_EMPTY_MIND))
2672 spoil_out(wd_che[msex]);
2674 spoil_out("¤Ï¥Æ¥ì¥Ñ¥·¡¼¤Ç¤Ï´¶ÃΤǤ¤Ê¤¤¡£");
2676 spoil_out(" is not detected by telepathy. ");
2680 if (flags2 & (RF2_WEIRD_MIND))
2682 spoil_out(wd_che[msex]);
2684 spoil_out("¤Ï¤Þ¤ì¤Ë¥Æ¥ì¥Ñ¥·¡¼¤Ç´¶ÃΤǤ¤ë¡£");
2686 spoil_out(" is rarely detected by telepathy. ");
2690 if (flags2 & (RF2_MULTIPLY))
2692 spoil_out(wd_che[msex]);
2694 spoil_out("¤ÏÇúȯŪ¤ËÁý¿£¤¹¤ë¡£");
2696 spoil_out(" breeds explosively. ");
2700 if (flags2 & (RF2_REGENERATE))
2702 spoil_out(wd_che[msex]);
2704 spoil_out("¤ÏÁÇÁ᤯ÂÎÎϤò²óÉü¤¹¤ë¡£");
2706 spoil_out(" regenerates quickly. ");
2711 /* Collect susceptibilities */
2714 if (flags3 & (RF3_HURT_ROCK)) vp[vn++] = "´ä¤ò½üµî¤¹¤ë¤â¤Î";
2715 if (flags3 & (RF3_HURT_LITE)) vp[vn++] = "ÌÀ¤ë¤¤¸÷";
2716 if (flags3 & (RF3_HURT_FIRE)) vp[vn++] = "²Ð";
2717 if (flags3 & (RF3_HURT_COLD)) vp[vn++] = "Î䵤";
2719 if (flags3 & (RF3_HURT_ROCK)) vp[vn++] = "rock remover";
2720 if (flags3 & (RF3_HURT_LITE)) vp[vn++] = "bright light";
2721 if (flags3 & (RF3_HURT_FIRE)) vp[vn++] = "fire";
2722 if (flags3 & (RF3_HURT_COLD)) vp[vn++] = "cold";
2728 spoil_out(wd_che[msex]);
2729 for (i = 0; i < vn; i++)
2731 if (!i) spoil_out(" is hurt by ");
2732 else if (i < vn-1) spoil_out(", ");
2733 else spoil_out(" and ");
2739 /* Collect immunities */
2742 if (flags3 & (RF3_IM_ACID)) vp[vn++] = "»À";
2743 if (flags3 & (RF3_IM_ELEC)) vp[vn++] = "ÅÅ·â";
2744 if (flags3 & (RF3_IM_FIRE)) vp[vn++] = "²Ð";
2745 if (flags3 & (RF3_IM_COLD)) vp[vn++] = "Î䵤";
2746 if (flags3 & (RF3_IM_POIS)) vp[vn++] = "ÆÇ";
2748 if (flags3 & (RF3_IM_ACID)) vp[vn++] = "acid";
2749 if (flags3 & (RF3_IM_ELEC)) vp[vn++] = "lightning";
2750 if (flags3 & (RF3_IM_FIRE)) vp[vn++] = "fire";
2751 if (flags3 & (RF3_IM_COLD)) vp[vn++] = "cold";
2752 if (flags3 & (RF3_IM_POIS)) vp[vn++] = "poison";
2758 spoil_out(wd_che[msex]);
2759 for (i = 0; i < vn; i++)
2761 if (!i) spoil_out(" resists ");
2762 else if (i < vn-1) spoil_out(", ");
2763 else spoil_out(" and ");
2769 /* Collect resistances */
2772 if (flags3 & (RF3_RES_NETH)) vp[vn++] = "ÃϹö";
2773 if (flags3 & (RF3_RES_WATE)) vp[vn++] = "¿å";
2774 if (flags3 & (RF3_RES_PLAS)) vp[vn++] = "¥×¥é¥º¥Þ";
2775 if (flags3 & (RF3_RES_NEXU)) vp[vn++] = "°ø²Ìº®Íð";
2776 if (flags3 & (RF3_RES_DISE)) vp[vn++] = "Îô²½";
2777 if (flags3 & (RF3_RES_ALL )) vp[vn++] = "¤¢¤é¤æ¤ë¸ú²Ì";
2779 if (flags3 & (RF3_RES_NETH)) vp[vn++] = "nether";
2780 if (flags3 & (RF3_RES_WATE)) vp[vn++] = "water";
2781 if (flags3 & (RF3_RES_PLAS)) vp[vn++] = "plasma";
2782 if (flags3 & (RF3_RES_NEXU)) vp[vn++] = "nexus";
2783 if (flags3 & (RF3_RES_DISE)) vp[vn++] = "disenchantment";
2784 if (flags3 & (RF3_RES_ALL )) vp[vn++] = "all";
2787 if (flags3 & (RF3_RES_TELE)) vp[vn++] = "teleportation";
2789 if ((flags3 & RF3_RES_TELE) && !(r_ptr->flags1 & RF1_UNIQUE)) vp[vn++] = "¥Æ¥ì¥Ý¡¼¥È";
2791 if ((flags3 & RF3_RES_TELE) && !(r_ptr->flags1 & RF1_UNIQUE)) vp[vn++] = "teleportation";
2797 spoil_out(wd_che[msex]);
2798 for (i = 0; i < vn; i++)
2800 if (!i) spoil_out(" resists ");
2801 else if (i < vn-1) spoil_out(", ");
2802 else spoil_out(" and ");
2808 /* Collect non-effects */
2811 if (flags3 & (RF3_NO_STUN)) vp[vn++] = "Û¯Û°¤È¤·¤Ê¤¤";
2812 if (flags3 & (RF3_NO_FEAR)) vp[vn++] = "¶²Éݤò´¶¤¸¤Ê¤¤";
2813 if (flags3 & (RF3_NO_CONF)) vp[vn++] = "º®Í𤷤ʤ¤";
2814 if (flags3 & (RF3_NO_SLEEP)) vp[vn++] = "̲¤é¤µ¤ì¤Ê¤¤";
2815 if ((flags3 & RF3_RES_TELE) && (r_ptr->flags1 & RF1_UNIQUE)) vp[vn++] = "¥Æ¥ì¥Ý¡¼¥È¤µ¤ì¤Ê¤¤";
2817 if (flags3 & (RF3_NO_STUN)) vp[vn++] = "stunned";
2818 if (flags3 & (RF3_NO_FEAR)) vp[vn++] = "frightened";
2819 if (flags3 & (RF3_NO_CONF)) vp[vn++] = "confused";
2820 if (flags3 & (RF3_NO_SLEEP)) vp[vn++] = "slept";
2821 if ((flags3 & RF3_RES_TELE) && (r_ptr->flags1 & RF1_UNIQUE)) vp[vn++] = "teleported";
2827 spoil_out(wd_che[msex]);
2828 for (i = 0; i < vn; i++)
2830 if (!i) spoil_out(" cannot be ");
2831 else if (i < vn-1) spoil_out(", ");
2832 else spoil_out(" or ");
2838 spoil_out(wd_che[msex]);
2840 spoil_out("¤Ï¿¯Æþ¼Ô");
2841 if (r_ptr->sleep > 200) spoil_out("¤ò̵»ë¤·¤¬¤Á¤Ç¤¢¤ë¤¬");
2842 else if (r_ptr->sleep > 95) spoil_out("¤ËÂФ·¤Æ¤Û¤È¤ó¤ÉÃí°Õ¤òʧ¤ï¤Ê¤¤¤¬");
2843 else if (r_ptr->sleep > 75) spoil_out("¤ËÂФ·¤Æ¤¢¤Þ¤êÃí°Õ¤òʧ¤ï¤Ê¤¤¤¬");
2844 else if (r_ptr->sleep > 45) spoil_out("¤ò¸«²á¤´¤·¤¬¤Á¤Ç¤¢¤ë¤¬");
2845 else if (r_ptr->sleep > 25) spoil_out("¤ò¤Û¤ó¤Î¾¯¤·¤Ï¸«¤Æ¤ª¤ê");
2846 else if (r_ptr->sleep > 10) spoil_out("¤ò¤·¤Ð¤é¤¯¤Ï¸«¤Æ¤ª¤ê");
2847 else if (r_ptr->sleep > 5) spoil_out("¤ò´öʬÃí°Õ¿¼¤¯¸«¤Æ¤ª¤ê");
2848 else if (r_ptr->sleep > 3) spoil_out("¤òÃí°Õ¿¼¤¯¸«¤Æ¤ª¤ê");
2849 else if (r_ptr->sleep > 1) spoil_out("¤ò¤«¤Ê¤êÃí°Õ¿¼¤¯¸«¤Æ¤ª¤ê");
2850 else if (r_ptr->sleep > 0) spoil_out("¤ò·Ù²ü¤·¤Æ¤ª¤ê");
2851 else spoil_out("¤ò¤«¤Ê¤ê·Ù²ü¤·¤Æ¤ª¤ê");
2853 sprintf(buf, " %d ¥Õ¥£¡¼¥ÈÀ褫¤é¿¯Æþ¼Ô¤Ëµ¤ÉÕ¤¯¤³¤È¤¬¤¢¤ë¡£",
2857 if (r_ptr->sleep > 200) spoil_out(" prefers to ignore");
2858 else if (r_ptr->sleep > 95) spoil_out(" pays very little attention to");
2859 else if (r_ptr->sleep > 75) spoil_out(" pays little attention to");
2860 else if (r_ptr->sleep > 45) spoil_out(" tends to overlook");
2861 else if (r_ptr->sleep > 25) spoil_out(" takes quite a while to see");
2862 else if (r_ptr->sleep > 10) spoil_out(" takes a while to see");
2863 else if (r_ptr->sleep > 5) spoil_out(" is fairly observant of");
2864 else if (r_ptr->sleep > 3) spoil_out(" is observant of");
2865 else if (r_ptr->sleep > 1) spoil_out(" is very observant of");
2866 else if (r_ptr->sleep > 0) spoil_out(" is vigilant for");
2867 else spoil_out(" is ever vigilant for");
2869 sprintf(buf, " intruders, which %s may notice from %d feet. ",
2870 wd_lhe[msex], 10 * r_ptr->aaf);
2876 if (flags1 & (RF1_DROP_60)) i += 1;
2877 if (flags1 & (RF1_DROP_90)) i += 2;
2878 if (flags1 & (RF1_DROP_1D2)) i += 2;
2879 if (flags1 & (RF1_DROP_2D2)) i += 4;
2880 if (flags1 & (RF1_DROP_3D2)) i += 6;
2881 if (flags1 & (RF1_DROP_4D2)) i += 8;
2883 /* Drops gold and/or items */
2887 spoil_out(wd_che[msex]);
2888 spoil_out(" will carry");
2892 spoil_out(" a"); sin = TRUE;
2896 spoil_out(" one or two");
2901 sprintf(buf, " up to %u", i);
2905 if (flags1 & (RF1_DROP_GREAT))
2907 if (sin) spoil_out("n");
2908 spoil_out(" exceptional object");
2910 else if (flags1 & (RF1_DROP_GOOD))
2912 spoil_out(" good object");
2914 else if (flags1 & (RF1_ONLY_ITEM))
2916 spoil_out(" object");
2918 else if (flags1 & (RF1_ONLY_GOLD))
2920 spoil_out(" treasure");
2924 spoil_out(" object");
2925 if (i > 1) spoil_out("s");
2926 spoil_out(" or treasure");
2928 if (i > 1) spoil_out("s");
2933 /* Count the actual attacks */
2934 for (i = 0, j = 0; j < 4; j++)
2936 if (r_ptr->blow[j].method) i++;
2939 /* Examine the actual attacks */
2940 for (k = 0, j = 0; j < 4; j++)
2942 if (!r_ptr->blow[j].method) continue;
2944 if (r_ptr->blow[j].method == RBM_SHOOT) continue;
2949 /* Acquire the method */
2950 switch (r_ptr->blow[j].method)
2953 case RBM_HIT: p = "²¥¤ë"; break;
2954 case RBM_TOUCH: p = "¿¨¤ë"; break;
2955 case RBM_PUNCH: p = "¥Ñ¥ó¥Á¤¹¤ë"; break;
2956 case RBM_KICK: p = "½³¤ë"; break;
2957 case RBM_CLAW: p = "¤Ò¤Ã¤«¤¯"; break;
2958 case RBM_BITE: p = "³ú¤à"; break;
2959 case RBM_STING: p = "»É¤¹"; break;
2960 case RBM_SLASH: p = "»Â¤ë"; break;
2962 case RBM_HIT: p = "hit"; break;
2963 case RBM_TOUCH: p = "touch"; break;
2964 case RBM_PUNCH: p = "punch"; break;
2965 case RBM_KICK: p = "kick"; break;
2966 case RBM_CLAW: p = "claw"; break;
2967 case RBM_BITE: p = "bite"; break;
2968 case RBM_STING: p = "sting"; break;
2969 case RBM_SLASH: p = "slash"; break;
2972 case RBM_BUTT: p = "³Ñ¤ÇÆͤ¯"; break;
2973 case RBM_CRUSH: p = "ÂÎÅö¤¿¤ê¤¹¤ë"; break;
2974 case RBM_ENGULF: p = "°û¤ß¹þ¤à"; break;
2975 case RBM_CHARGE: p = "ÀÁµá½ñ¤ò¤è¤³¤¹"; break;
2976 case RBM_CRAWL: p = "ÂΤξå¤òÇ礤²ó¤ë"; break;
2977 case RBM_DROOL: p = "¤è¤À¤ì¤ò¤¿¤é¤¹"; break;
2978 case RBM_SPIT: p = "¤Ä¤Ð¤òÅǤ¯"; break;
2979 case RBM_EXPLODE: p = "Çúȯ¤¹¤ë"; break;
2980 case RBM_GAZE: p = "¤Ë¤é¤à"; break;
2981 case RBM_WAIL: p = "µã¤¶«¤Ö"; break;
2982 case RBM_SPORE: p = "˦»Ò¤òÈô¤Ð¤¹"; break;
2984 case RBM_BUTT: p = "butt"; break;
2985 case RBM_CRUSH: p = "crush"; break;
2986 case RBM_ENGULF: p = "engulf"; break;
2987 case RBM_CHARGE: p = "charge"; break;
2988 case RBM_CRAWL: p = "crawl on you"; break;
2989 case RBM_DROOL: p = "drool on you"; break;
2990 case RBM_SPIT: p = "spit"; break;
2991 case RBM_EXPLODE: p = "explode"; break;
2992 case RBM_GAZE: p = "gaze"; break;
2993 case RBM_WAIL: p = "wail"; break;
2994 case RBM_SPORE: p = "release spores"; break;
2997 case RBM_XXX4: break;
2999 case RBM_BEG: p = "¶â¤ò¤»¤¬¤à"; break;
3000 case RBM_INSULT: p = "Éî¿«¤¹¤ë"; break;
3001 case RBM_MOAN: p = "¤¦¤á¤¯"; break;
3002 case RBM_SHOW: p = "²Î¤¦"; break;
3004 case RBM_BEG: p = "beg"; break;
3005 case RBM_INSULT: p = "insult"; break;
3006 case RBM_MOAN: p = "moan"; break;
3007 case RBM_SHOW: p = "sing"; break;
3013 /* Default effect */
3016 /* Acquire the effect */
3017 switch (r_ptr->blow[j].effect)
3021 case RBE_HURT: q = "¹¶·â¤¹¤ë"; break;
3022 case RBE_POISON: q = "ÆǤò¤¯¤é¤ï¤¹"; break;
3023 case RBE_UN_BONUS: q = "Îô²½¤µ¤»¤ë"; break;
3024 case RBE_UN_POWER: q = "ËâÎϤòµÛ¤¤¼è¤ë"; break;
3025 case RBE_EAT_GOLD: q = "¶â¤òÅð¤à"; break;
3026 case RBE_EAT_ITEM: q = "¥¢¥¤¥Æ¥à¤òÅð¤à"; break;
3027 case RBE_EAT_FOOD: q = "¤¢¤Ê¤¿¤Î¿©ÎÁ¤ò¿©¤Ù¤ë"; break;
3028 case RBE_EAT_LITE: q = "ÌÀ¤«¤ê¤òµÛ¼ý¤¹¤ë"; break;
3029 case RBE_ACID: q = "»À¤òÈô¤Ð¤¹"; break;
3030 case RBE_ELEC: q = "´¶ÅŤµ¤»¤ë"; break;
3033 case RBE_HURT: q = "attack"; break;
3034 case RBE_POISON: q = "poison"; break;
3035 case RBE_UN_BONUS: q = "disenchant"; break;
3036 case RBE_UN_POWER: q = "drain charges"; break;
3037 case RBE_EAT_GOLD: q = "steal gold"; break;
3038 case RBE_EAT_ITEM: q = "steal items"; break;
3039 case RBE_EAT_FOOD: q = "eat your food"; break;
3040 case RBE_EAT_LITE: q = "absorb light"; break;
3041 case RBE_ACID: q = "shoot acid"; break;
3042 case RBE_ELEC: q = "electrocute"; break;
3046 case RBE_FIRE: q = "dz¤ä¤¹"; break;
3047 case RBE_COLD: q = "Åà¤é¤»¤ë"; break;
3048 case RBE_BLIND: q = "ÌÕÌܤˤ¹¤ë"; break;
3049 case RBE_CONFUSE: q = "º®Í𤵤»¤ë"; break;
3050 case RBE_TERRIFY: q = "¶²Éݤµ¤»¤ë"; break;
3051 case RBE_PARALYZE: q = "Ëãá㤵¤»¤ë"; break;
3052 case RBE_LOSE_STR: q = "ÏÓÎϤò¸º¾¯¤µ¤»¤ë"; break;
3053 case RBE_LOSE_INT: q = "ÃÎǽ¤ò¸º¾¯¤µ¤»¤ë"; break;
3054 case RBE_LOSE_WIS: q = "¸¤µ¤ò¸º¾¯¤µ¤»¤ë"; break;
3055 case RBE_LOSE_DEX: q = "´ïÍѤµ¤ò¸º¾¯¤µ¤»¤ë"; break;
3056 case RBE_LOSE_CON: q = "Âѵ×ÎϤò¸º¾¯¤µ¤»¤ë"; break;
3057 case RBE_LOSE_CHR: q = "Ì¥ÎϤò¸º¾¯¤µ¤»¤ë"; break;
3058 case RBE_LOSE_ALL: q = "Á´¥¹¥Æ¡¼¥¿¥¹¤ò¸º¾¯¤µ¤»¤ë"; break;
3059 case RBE_SHATTER: q = "Ê´ºÕ¤¹¤ë"; break;
3060 case RBE_EXP_10: q = "·Ð¸³Ãͤò¸º¾¯(10d6+)¤µ¤»¤ë"; break;
3061 case RBE_EXP_20: q = "·Ð¸³Ãͤò¸º¾¯(20d6+)¤µ¤»¤ë"; break;
3062 case RBE_EXP_40: q = "·Ð¸³Ãͤò¸º¾¯(40d6+)¤µ¤»¤ë"; break;
3063 case RBE_EXP_80: q = "·Ð¸³Ãͤò¸º¾¯(80d6+)¤µ¤»¤ë"; break;
3064 case RBE_DISEASE: q = "ɵ¤¤Ë¤¹¤ë"; break;
3065 case RBE_TIME: q = "»þ´ÖµÕž"; break;
3066 case RBE_EXP_VAMP: q = "À¸Ì¿ÎϤòµÛ¼ý¤¹¤ë"; break;
3067 case RBE_DR_MANA: q = "ËâÎϤòÃ¥¤¦"; break;
3069 case RBE_FIRE: q = "burn"; break;
3070 case RBE_COLD: q = "freeze"; break;
3071 case RBE_BLIND: q = "blind"; break;
3072 case RBE_CONFUSE: q = "confuse"; break;
3073 case RBE_TERRIFY: q = "terrify"; break;
3074 case RBE_PARALYZE: q = "paralyze"; break;
3075 case RBE_LOSE_STR: q = "reduce strength"; break;
3076 case RBE_LOSE_INT: q = "reduce intelligence"; break;
3077 case RBE_LOSE_WIS: q = "reduce wisdom"; break;
3078 case RBE_LOSE_DEX: q = "reduce dexterity"; break;
3079 case RBE_LOSE_CON: q = "reduce constitution"; break;
3080 case RBE_LOSE_CHR: q = "reduce charisma"; break;
3081 case RBE_LOSE_ALL: q = "reduce all stats"; break;
3082 case RBE_SHATTER: q = "shatter"; break;
3083 case RBE_EXP_10: q = "lower experience (by 10d6+)"; break;
3084 case RBE_EXP_20: q = "lower experience (by 20d6+)"; break;
3085 case RBE_EXP_40: q = "lower experience (by 40d6+)"; break;
3086 case RBE_EXP_80: q = "lower experience (by 80d6+)"; break;
3087 case RBE_DISEASE: q = "disease"; break;
3088 case RBE_TIME: q = "time"; break;
3089 case RBE_EXP_VAMP: q = "drain life force"; break;
3090 case RBE_DR_MANA: q = "drain mana force"; break;
3097 spoil_out(wd_che[msex]);
3106 spoil_out(", and ");
3109 /* Describe the method */
3112 /* Describe the effect, if any */
3113 if (r_ptr->blow[j].effect)
3117 if (r_ptr->blow[j].d_dice && r_ptr->blow[j].d_side)
3119 spoil_out(" with damage");
3120 if (r_ptr->blow[j].d_side == 1)
3121 sprintf(buf, " %d", r_ptr->blow[j].d_dice);
3123 sprintf(buf, " %dd%d",
3124 r_ptr->blow[j].d_dice, r_ptr->blow[j].d_side);
3136 else if (flags1 & (RF1_NEVER_BLOW))
3138 sprintf(buf, "%s has no physical attacks. ", wd_che[msex]);
3145 /* Free the "who" array */
3146 C_KILL(who, max_r_idx, s16b);
3148 /* Check for errors */
3149 if (ferror(fff) || my_fclose(fff))
3151 msg_print("Cannot close spoiler file.");
3155 msg_print("Successfully created a spoiler file.");
3166 extern void do_cmd_spoilers(void);
3169 * Create Spoiler files -BEN-
3171 void do_cmd_spoilers(void)
3176 /* Save the screen */
3191 prt("Create a spoiler file.", 2, 0);
3193 /* Prompt for a file */
3194 prt("(1) Brief Object Info (obj-desc.spo)", 5, 5);
3195 prt("(2) Brief Artifact Info (artifact.spo)", 6, 5);
3196 prt("(3) Brief Monster Info (mon-desc.spo)", 7, 5);
3197 prt("(4) Full Monster Info (mon-info.spo)", 8, 5);
3201 prt("¥³¥Þ¥ó¥É:", 18, 0);
3203 prt("Command: ", 12, 0);
3219 spoil_obj_desc("obj-desc.spo");
3225 spoil_artifact("artifact.spo");
3231 spoil_mon_desc("mon-desc.spo");
3237 spoil_mon_info("mon-info.spo");
3246 /* Flush messages */
3255 /* Restore the screen */
3260 * Fill in an object description structure for a given object
3262 static void random_artifact_analyze(object_type *o_ptr, obj_desc_list *desc_ptr)
3264 analyze_general(o_ptr, desc_ptr->description);
3265 analyze_pval(o_ptr, &desc_ptr->pval_info);
3266 analyze_brand(o_ptr, desc_ptr->brands);
3267 analyze_slay(o_ptr, desc_ptr->slays);
3268 analyze_immune(o_ptr, desc_ptr->immunities);
3269 analyze_resist(o_ptr, desc_ptr->resistances);
3270 analyze_sustains(o_ptr, desc_ptr->sustains);
3271 analyze_misc_magic(o_ptr, desc_ptr->misc_magic);
3272 desc_ptr->activation = item_activation(o_ptr);
3274 sprintf(desc_ptr->misc_desc, "½Å¤µ %d.%d kg",
3275 lbtokg1(o_ptr->weight), lbtokg2(o_ptr->weight));
3277 sprintf(desc_ptr->misc_desc, "Weight %d.%d lbs",
3278 o_ptr->weight / 10, o_ptr->weight % 10);
3282 /* Create a spoiler file entry for an artifact */
3284 static void spoiler_print_randart(object_type *o_ptr, obj_desc_list *art_ptr)
3286 pval_info_type *pval_ptr = &art_ptr->pval_info;
3290 /* Don't indent the first line */
3291 fprintf(fff, "%s\n", art_ptr->description);
3294 if (!(o_ptr->ident & (IDENT_MENTAL)))
3297 fprintf(fff, "%sÉÔÌÀ\n",INDENT1);
3299 fprintf(fff, "%sUnknown\n",INDENT1);
3303 /* An "empty" pval description indicates that the pval affects nothing */
3304 if (pval_ptr->pval_desc[0])
3306 /* Mention the effects of pval */
3308 sprintf(buf, "%s¤Î½¤Àµ:", pval_ptr->pval_desc);
3310 sprintf(buf, "%s to", pval_ptr->pval_desc);
3312 spoiler_outlist(buf, pval_ptr->pval_affects, ITEM_SEP);
3315 /* Now deal with the description lists */
3318 spoiler_outlist("ÂÐ:", art_ptr->slays, ITEM_SEP);
3319 spoiler_outlist("Éð´ï°À:", art_ptr->brands, LIST_SEP);
3320 spoiler_outlist("ÌȱÖ:", art_ptr->immunities, ITEM_SEP);
3321 spoiler_outlist("ÂÑÀ:", art_ptr->resistances, ITEM_SEP);
3322 spoiler_outlist("°Ý»ý:", art_ptr->sustains, ITEM_SEP);
3324 spoiler_outlist("Slay", art_ptr->slays, ITEM_SEP);
3325 spoiler_outlist("", art_ptr->brands, LIST_SEP);
3326 spoiler_outlist("Immunity to", art_ptr->immunities, ITEM_SEP);
3327 spoiler_outlist("Resist", art_ptr->resistances, ITEM_SEP);
3328 spoiler_outlist("Sustain", art_ptr->sustains, ITEM_SEP);
3330 spoiler_outlist("", art_ptr->misc_magic, LIST_SEP);
3332 /* Write out the possible activation at the primary indention level */
3333 if (art_ptr->activation)
3336 fprintf(fff, "%sȯư: %s\n", INDENT1, art_ptr->activation);
3338 fprintf(fff, "%sActivates for %s\n", INDENT1, art_ptr->activation);
3342 /* End with the miscellaneous facts */
3343 fprintf(fff, "%s%s\n\n", INDENT1, art_ptr->misc_desc);
3346 /* Create a part of file for random artifacts */
3348 static void spoil_random_artifact_aux(object_type *o_ptr, int i)
3350 obj_desc_list artifact;
3352 if (!object_known_p(o_ptr) || !o_ptr->art_name
3353 || o_ptr->tval != group_artifact[i].tval)
3356 /* Analyze the artifact */
3357 random_artifact_analyze(o_ptr, &artifact);
3359 /* Write out the artifact description to the spoiler file */
3360 spoiler_print_randart(o_ptr, &artifact);
3364 * Create a list file for random artifacts
3366 void spoil_random_artifact(cptr fname)
3379 /* Build the filename */
3380 path_build(buf, 1024, ANGBAND_DIR_USER, fname);
3382 /* File type is "TEXT" */
3383 FILE_TYPE(FILE_TYPE_TEXT);
3386 fff = my_fopen(buf, "w");
3391 msg_print("Cannot create list file.");
3395 /* Dump the header */
3396 sprintf(buf, "Random artifacts list.\r");
3397 spoiler_underline(buf);
3399 /* List the artifacts by tval */
3400 for (j = 0; group_artifact[j].tval; j++)
3402 /* random artifacts wielding */
3403 for (i = INVEN_RARM; i < INVEN_TOTAL; i++)
3405 q_ptr = &inventory[i];
3406 spoil_random_artifact_aux(q_ptr, j);
3409 /* random artifacts in inventory */
3410 for (i = 0; i < INVEN_PACK; i++)
3412 q_ptr = &inventory[i];
3413 spoil_random_artifact_aux(q_ptr, j);
3416 /* random artifacts in home */
3417 st_ptr = &town[1].store[STORE_HOME];
3418 for (i = 0; i < st_ptr->stock_num; i++)
3420 q_ptr = &st_ptr->stock[i];
3421 spoil_random_artifact_aux(q_ptr, j);
3424 /* random artifacts in museum */
3425 st_ptr = &town[1].store[STORE_MUSEUM];
3426 for (i = 0; i < st_ptr->stock_num; i++)
3428 q_ptr = &st_ptr->stock[i];
3429 spoil_random_artifact_aux(q_ptr, j);
3433 /* Check for errors */
3434 if (ferror(fff) || my_fclose(fff))
3436 msg_print("Cannot close list file.");
3444 msg_print("Successfully created a list file.");
3451 #endif /* MACINTOSH */