1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305 6306 6307 6308 6309 6310 6311 6312 6313 6314 6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330 6331 6332 6333 6334 6335 6336 6337 6338 6339 6340 6341 6342 6343 6344 6345 6346 6347 6348 6349 6350 6351 6352 6353 6354 6355 6356 6357 6358 6359 6360 6361 6362 6363 6364 6365 6366 6367 6368 6369 6370 6371 6372 6373 6374 6375 6376 6377 6378 6379 6380 6381 6382 6383 6384 6385 6386 6387 6388 6389 6390 6391 6392 6393 6394 6395 6396 6397 6398 6399 6400 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410 6411 6412 6413 6414 6415 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 6426 6427 6428 6429 6430 6431 6432 6433 6434 6435 6436 6437 6438 6439 6440 6441 6442 6443 6444 6445 6446 6447 6448 6449 6450 6451 6452 6453 6454 6455 6456 6457 6458 6459 6460 6461 6462 6463 6464 6465 6466 6467 6468 6469 6470 6471 6472 6473 6474 6475 6476 6477 6478 6479 6480 6481 6482 6483 6484 6485 6486 6487 6488 6489 6490 6491 6492 6493 6494 6495 6496 6497 6498 6499 6500 6501 6502 6503 6504 6505 6506 6507 6508 6509 6510 6511 6512 6513 6514 6515 6516 6517 6518 6519 6520 6521 6522 6523 6524 6525 6526 6527 6528 6529 6530 6531 6532 6533 6534 6535 6536 6537 6538 6539 6540 6541 6542 6543 6544 6545 6546 6547 6548 6549 6550 6551 6552 6553 6554 6555 6556 6557 6558 6559 6560 6561 6562 6563 6564 6565 6566 6567 6568 6569 6570 6571 6572 6573 6574 6575 6576 6577 6578 6579 6580 6581 6582 6583 6584 6585 6586 6587 6588 6589 6590 6591 6592 6593 6594 6595 6596 6597 6598 6599 6600 6601 6602 6603 6604 6605 6606 6607 6608 6609 6610 6611 6612 6613 6614 6615 6616 6617 6618 6619 6620 6621 6622 6623 6624 6625 6626 6627 6628 6629 6630 6631 6632 6633 6634 6635 6636 6637 6638 6639 6640 6641 6642 6643 6644 6645 6646 6647 6648 6649 6650 6651 6652 6653 6654 6655 6656 6657 6658 6659 6660 6661 6662 6663 6664 6665 6666 6667 6668 6669 6670 6671 6672 6673 6674 6675 6676 6677 6678 6679 6680 6681 6682 6683 6684 6685 6686 6687 6688 6689
|
/*
* File: describe.cc
* Summary: Functions used to print information about various game objects.
* Written by: Linley Henzell
*
* Change History (most recent first):
*
* <4> 10/14/99 BCR enummed describe_god()
* <3> 10/13/99 BCR Added GOD_NO_GOD case in describe_god()
* <2> 5/20/99 BWR Replaced is_artifact with
* is_dumpable_artifact
* <1> 4/20/99 JDJ Reformatted, uses string objects,
* split out 10 new functions from
* describe_item(), added
* get_item_description and
* is_artifact.
*/
#include "AppHdr.h"
#include "describe.h"
#include <stdlib.h>
#include <stdio.h>
#include <string>
#ifdef DOS
#include <conio.h>
#endif
#include "externs.h"
#include "abl-show.h"
#include "debug.h"
#include "fight.h"
#include "itemname.h"
#include "macro.h"
#include "mon-util.h"
#include "player.h"
#include "randart.h"
#include "religion.h"
#include "skills2.h"
#include "stuff.h"
#include "wpn-misc.h"
#include "spl-util.h"
// ========================================================================
// Internal Functions
// ========================================================================
//---------------------------------------------------------------
//
// append_value
//
// Appends a value to the string. If plussed == 1, will add a + to
// positive values (itoa always adds - to -ve ones).
//
//---------------------------------------------------------------
static void append_value( std::string & description, int valu, bool plussed )
{
if (valu >= 0 && plussed == 1)
description += "+";
char value_str[80];
itoa( valu, value_str, 10 );
description += value_str;
} // end append_value()
//---------------------------------------------------------------
//
// print_description
//
// Takes a descpr string filled up with stuff from other functions,
// and displays it with minor formatting to avoid cut-offs in mid
// word and such. The character $ is interpreted as a CR.
//
//---------------------------------------------------------------
static void print_description( const std::string &d )
{
unsigned int nextLine = std::string::npos;
unsigned int currentPos = 0;
#ifdef DOS
const unsigned int lineWidth = 52;
#else
const unsigned int lineWidth = 70;
#endif
bool nlSearch = true; // efficiency
textcolor(LIGHTGREY);
while(currentPos < d.length())
{
if (currentPos != 0)
{
#ifdef PLAIN_TERM
gotoxy(1, wherey() + 1);
#endif
#ifdef DOS_TERM
cprintf(EOL);
#endif
}
// see if $ sign is within one lineWidth
if (nlSearch)
{
nextLine = d.find('$', currentPos);
if (nextLine >= currentPos && nextLine < currentPos + lineWidth)
{
cprintf((d.substr(currentPos, nextLine - currentPos)).c_str());
currentPos = nextLine + 1;
continue;
}
if (nextLine == std::string::npos)
nlSearch = false; // there are no newlines, don't search again.
}
// no newline -- see if rest of string will fit.
if (currentPos + lineWidth >= d.length())
{
cprintf((d.substr(currentPos)).c_str());
return;
}
// ok.. try to truncate at space.
nextLine = d.rfind(' ', currentPos + lineWidth);
if (nextLine > 0)
{
cprintf((d.substr(currentPos, nextLine - currentPos)).c_str());
currentPos = nextLine + 1;
continue;
}
// oops. just truncate.
nextLine = currentPos + lineWidth;
if (nextLine > d.length())
nextLine = d.length();
cprintf((d.substr(currentPos, nextLine - currentPos)).c_str());
currentPos = nextLine;
}
}
//---------------------------------------------------------------
//
// randart_descpr
//
// Appends the various powers of a random artefact to the description
// string.
//
//---------------------------------------------------------------
static void randart_descpr( std::string &description, const item_def &item )
{
unsigned int old_length = description.length();
FixedVector< char, RA_PROPERTIES > proprt;
randart_wpn_properties( item, proprt );
if (proprt[ RAP_AC ])
{
description += "$It affects your AC (";
append_value(description, proprt[ RAP_AC ], true);
description += ").";
}
if (proprt[ RAP_EVASION ])
{
description += "$It affects your evasion (";
append_value(description, proprt[ RAP_EVASION ], true);
description += ").";
}
if (proprt[ RAP_STRENGTH ])
{
description += "$It affects your strength (";
append_value(description, proprt[ RAP_STRENGTH ], true);
description += ").";
}
if (proprt[ RAP_INTELLIGENCE ])
{
description += "$It affects your intelligence (";
append_value(description, proprt[ RAP_INTELLIGENCE ], true);
description += ").";
}
if (proprt[ RAP_DEXTERITY ])
{
description += "$It affects your dexterity (";
append_value(description, proprt[ RAP_DEXTERITY ], true);
description += ").";
}
if (proprt[ RAP_ACCURACY ])
{
description += "$It affects your accuracy (";
append_value(description, proprt[ RAP_ACCURACY ], true);
description += ").";
}
if (proprt[ RAP_DAMAGE ])
{
description += "$It affects your damage-dealing abilities (";
append_value(description, proprt[ RAP_DAMAGE ], true);
description += ").";
}
if (proprt[ RAP_FIRE ] < -2)
description += "$It makes you highly vulnerable to fire. ";
else if (proprt[ RAP_FIRE ] == -2)
description += "$It makes you greatly susceptible to fire. ";
else if (proprt[ RAP_FIRE ] == -1)
description += "$It makes you susceptible to fire. ";
else if (proprt[ RAP_FIRE ] == 1)
description += "$It protects you from fire. ";
else if (proprt[ RAP_FIRE ] == 2)
description += "$It greatly protects you from fire. ";
else if (proprt[ RAP_FIRE ] > 2)
description += "$It renders you almost immune to fire. ";
if (proprt[ RAP_COLD ] < -2)
description += "$It makes you highly susceptible to cold. ";
else if (proprt[ RAP_COLD ] == -2)
description += "$It makes you greatly susceptible to cold. ";
else if (proprt[ RAP_COLD ] == -1)
description += "$It makes you susceptible to cold. ";
else if (proprt[ RAP_COLD ] == 1)
description += "$It protects you from cold. ";
else if (proprt[ RAP_COLD ] == 2)
description += "$It greatly protects you from cold. ";
else if (proprt[ RAP_COLD ] > 2)
description += "$It renders you almost immune to cold. ";
if (proprt[ RAP_ELECTRICITY ])
description += "$It insulates you from electricity. ";
if (proprt[ RAP_POISON ])
description += "$It protects you from poison. ";
if (proprt[ RAP_NEGATIVE_ENERGY ] == 1)
description += "$It partially protects you from negative energy. ";
else if (proprt[ RAP_NEGATIVE_ENERGY ] == 2)
description += "$It protects you from negative energy. ";
else if (proprt[ RAP_NEGATIVE_ENERGY ] > 2)
description += "$It renders you almost immune negative energy. ";
if (proprt[ RAP_MAGIC ])
description += "$It protects you from magic. ";
if (proprt[ RAP_STEALTH ] < 0)
{
if (proprt[ RAP_STEALTH ] < -20)
description += "$It makes you much less stealthy. ";
else
description += "$It makes you less stealthy. ";
}
else if (proprt[ RAP_STEALTH ] > 0)
{
if (proprt[ RAP_STEALTH ] > 20)
description += "$It makes you much more stealthy. ";
else
description += "$It makes you more stealthy. ";
}
if (proprt[ RAP_EYESIGHT ])
description += "$It enhances your eyesight. ";
if (proprt[ RAP_INVISIBLE ])
description += "$It lets you turn invisible. ";
if (proprt[ RAP_LEVITATE ])
description += "$It lets you levitate. ";
if (proprt[ RAP_BLINK ])
description += "$It lets you blink. ";
if (proprt[ RAP_CAN_TELEPORT ])
description += "$It lets you teleport. ";
if (proprt[ RAP_BERSERK ])
description += "$It lets you go berserk. ";
if (proprt[ RAP_MAPPING ])
description += "$It lets you sense your surroundings. ";
if (proprt[ RAP_NOISES ])
description += "$It makes noises. ";
if (proprt[ RAP_PREVENT_SPELLCASTING ])
description += "$It prevents spellcasting. ";
if (proprt[ RAP_CAUSE_TELEPORTATION ])
description += "$It causes teleportation. ";
if (proprt[ RAP_PREVENT_TELEPORTATION ])
description += "$It prevents most forms of teleportation. ";
if (proprt[ RAP_ANGRY ])
description += "$It makes you angry. ";
if (proprt[ RAP_METABOLISM ] >= 3)
description += "$It greatly speeds your metabolism. ";
else if (proprt[ RAP_METABOLISM ])
description += "$It speeds your metabolism. ";
if (proprt[ RAP_MUTAGENIC ] > 3)
description += "$It glows with mutagenic radiation.";
else if (proprt[ RAP_MUTAGENIC ])
description += "$It emits mutagenic radiations.";
if (old_length != description.length())
description += "$";
if (is_unrandom_artefact( item ))
{
const char *desc = unrandart_descrip( 0, item );
if (strlen( desc ) > 0)
{
description += desc;
description += "$";
}
}
}
//---------------------------------------------------------------
//
// describe_demon
//
// Describes the random demons you find in Pandemonium.
//
//---------------------------------------------------------------
static std::string describe_demon(void)
{
long globby = 0;
for (unsigned int i = 0; i < strlen( ghost.name ); i++)
globby += ghost.name[i];
globby *= strlen( ghost.name );
srand( globby );
std::string description = "A powerful demon, ";
description += ghost.name;
description += " has a";
switch (random2(31))
{
case 0:
description += " huge, barrel-shaped ";
break;
case 1:
description += " wispy, insubstantial ";
break;
case 2:
description += " spindly ";
break;
case 3:
description += " skeletal ";
break;
case 4:
description += " horribly deformed ";
break;
case 5:
description += " spiny ";
break;
case 6:
description += " waif-like ";
break;
case 7:
description += " scaly ";
break;
case 8:
description += " sickeningly deformed ";
break;
case 9:
description += " bruised and bleeding ";
break;
case 10:
description += " sickly ";
break;
case 11:
description += " mass of writhing tentacles for a ";
break;
case 12:
description += " mass of ropey tendrils for a ";
break;
case 13:
description += " tree trunk-like ";
break;
case 14:
description += " hairy ";
break;
case 15:
description += " furry ";
break;
case 16:
description += " fuzzy ";
break;
case 17:
description += "n obese ";
break;
case 18:
description += " fat ";
break;
case 19:
description += " slimy ";
break;
case 20:
description += " wrinkled ";
break;
case 21:
description += " metallic ";
break;
case 22:
description += " glassy ";
break;
case 23:
description += " crystalline ";
break;
case 24:
description += " muscular ";
break;
case 25:
description += "n icky ";
break;
case 26:
description += " swollen ";
break;
case 27:
description += " lumpy ";
break;
case 28:
description += " armoured ";
break;
case 29:
description += " carapaced ";
break;
case 30:
description += " slender ";
break;
}
description += "body";
switch (ghost.values[GVAL_DEMONLORD_FLY])
{
case 1: // proper flight
switch (random2(10))
{
case 0:
description += " with small insectoid wings";
break;
case 1:
description += " with large insectoid wings";
break;
case 2:
description += " with moth-like wings";
break;
case 3:
description += " with butterfly wings";
break;
case 4:
description += " with huge, bat-like wings";
break;
case 5:
description += " with fleshy wings";
break;
case 6:
description += " with small, bat-like wings";
break;
case 7:
description += " with hairy wings";
break;
case 8:
description += " with great feathered wings";
break;
case 9:
description += " with shiny metal wings";
break;
default:
break;
}
break;
case 2: // levitation
if (coinflip())
description += " which hovers in mid-air";
else
description += " with sacs of gas hanging from its back";
break;
default: // does not fly
switch (random2(40))
{
default:
break;
case 12:
description += " covered in tiny crawling spiders";
break;
case 13:
description += " covered in tiny crawling insects";
break;
case 14:
description += " and the head of a crocodile";
break;
case 15:
description += " and the head of a hippopotamus";
break;
case 16:
description += " and a cruel curved beak for a mouth";
break;
case 17:
description += " and a straight sharp beak for a mouth";
break;
case 18:
description += " and no head at all";
break;
case 19:
description += " and a hideous tangle of tentacles for a mouth";
break;
case 20:
description += " and an elephantine trunk";
break;
case 21:
description += " and an evil-looking proboscis";
break;
case 22:
description += " and dozens of eyes";
break;
case 23:
description += " and two ugly heads";
break;
case 24:
description += " and a long serpentine tail";
break;
case 25:
description += " and a pair of huge tusks growing from its jaw";
break;
case 26:
description +=
" and a single huge eye, in the centre of its forehead";
break;
case 27:
description += " and spikes of black metal for teeth";
break;
case 28:
description += " and a disc-shaped sucker for a head";
break;
case 29:
description += " and huge, flapping ears";
break;
case 30:
description += " and a huge, toothy maw in the centre of its chest";
break;
case 31:
description += " and a giant snail shell on its back";
break;
case 32:
description += " and a dozen heads";
break;
case 33:
description += " and the head of a jackal";
break;
case 34:
description += " and the head of a baboon";
break;
case 35:
description += " and a huge, slobbery tongue";
break;
case 36:
description += " which is covered in oozing lacerations";
break;
case 37:
description += " and the head of a frog";
break;
case 38:
description += " and the head of a yak";
break;
case 39:
description += " and eyes out on stalks";
break;
}
break;
}
description += ".";
switch (random2(40) + (you.species == SP_MUMMY ? 3 : 0))
{
case 0:
description += " It stinks of brimstone.";
break;
case 1:
description += " It smells like rotting flesh";
if (you.species == SP_GHOUL)
description += " - yum!";
else
description += ".";
break;
case 2:
description += " It is surrounded by a sickening stench.";
break;
case 3:
description += " It seethes with hatred of the living.";
break;
case 4:
description += " Tiny orange flames dance around it.";
break;
case 5:
description += " Tiny purple flames dance around it.";
break;
case 6:
description += " It is surrounded by a weird haze.";
break;
case 7:
description += " It glows with a malevolent light.";
break;
case 8:
description += " It looks incredibly angry.";
break;
case 9:
description += " It oozes with slime.";
break;
case 10:
description += " It dribbles constantly.";
break;
case 11:
description += " Mould grows all over it.";
break;
case 12:
description += " It looks diseased.";
break;
case 13:
description += " It looks as frightened of you as you are of it.";
break;
case 14:
description += " It moves in a series of hideous convulsions.";
break;
case 15:
description += " It moves with an unearthly grace.";
break;
case 16:
description += " It hungers for your soul!";
break;
case 17:
description += " It leaves a glistening oily trail.";
break;
case 18:
description += " It shimmers before your eyes.";
break;
case 19:
description += " It is surrounded by a brilliant glow.";
break;
case 20:
description += " It radiates an aura of extreme power.";
break;
default:
break;
}
return description;
} // end describe_demon()
//---------------------------------------------------------------
//
// describe_weapon
//
//---------------------------------------------------------------
static std::string describe_weapon( const item_def &item, char verbose)
{
std::string description;
description.reserve(200);
description = "";
if (is_fixed_artefact( item ))
{
if (item_ident( item, ISFLAG_KNOW_PROPERTIES ))
{
description += "$";
switch (item.special)
{
case SPWPN_SINGING_SWORD:
description += "This blessed weapon loves nothing more "
"than to sing to its owner, "
"whether they want it to or not. ";
break;
case SPWPN_WRATH_OF_TROG:
description += "This was the favourite weapon of "
"the old god Trog, before he lost it one day. "
"It induces a bloodthirsty berserker rage in "
"anyone who uses it to strike another. ";
break;
case SPWPN_SCYTHE_OF_CURSES:
description += "This weapon carries a "
"terrible and highly irritating curse. ";
break;
case SPWPN_MACE_OF_VARIABILITY:
description += "It is rather unreliable. ";
break;
case SPWPN_GLAIVE_OF_PRUNE:
description += "It is the creation of a mad god, and "
"carries a curse which transforms anyone "
"possessing it into a prune. Fortunately, "
"the curse works very slowly, and one can "
"use it briefly with no consequences "
"worse than slightly purple skin and a few wrinkles. ";
break;
case SPWPN_SCEPTRE_OF_TORMENT:
description += "This truly accursed weapon is "
"an instrument of Hell. ";
break;
case SPWPN_SWORD_OF_ZONGULDROK:
description += "This dreadful weapon is used "
"at the user's peril. ";
break;
case SPWPN_SWORD_OF_CEREBOV:
description += "Eerie flames cover its twisted blade. ";
break;
case SPWPN_STAFF_OF_DISPATER:
description += "This legendary item can unleash "
"the fury of Hell. ";
break;
case SPWPN_SCEPTRE_OF_ASMODEUS:
description += "It carries some of the powers of "
"the arch-fiend Asmodeus. ";
break;
case SPWPN_SWORD_OF_POWER:
description += "It rewards the powerful with power "
"and the meek with weakness. ";
break;
case SPWPN_KNIFE_OF_ACCURACY:
description += "It is almost unerringly accurate. ";
break;
case SPWPN_STAFF_OF_OLGREB:
description += "It was the magical weapon wielded by the "
"mighty wizard Olgreb before he met his "
"fate somewhere within these dungeons. It "
"grants its wielder resistance to the "
"effects of poison and increases their "
"ability to use venomous magic, and "
"carries magical powers which can be evoked. ";
break;
case SPWPN_VAMPIRES_TOOTH:
description += "It is lethally vampiric. ";
break;
case SPWPN_STAFF_OF_WUCAD_MU:
description += "Its power varies in proportion to "
"its wielder's intelligence. "
"Using it can be a bit risky. ";
break;
}
description += "$";
}
else if (item_ident( item, ISFLAG_KNOW_TYPE ))
{
// We know it's an artefact type weapon, but not what it does.
description += "$This weapon may have some hidden properties.$";
}
}
else if (is_unrandom_artefact( item )
&& strlen(unrandart_descrip(1, item)) != 0)
{
description += unrandart_descrip(1, item);
description += "$";
}
else
{
if (verbose == 1)
{
switch (item.sub_type)
{
case WPN_CLUB:
description += "A heavy piece of wood. ";
break;
case WPN_MACE:
description += "A long handle "
"with a heavy lump on one end. ";
break;
case WPN_FLAIL:
description += "Like a mace, but with a length of chain "
"between the handle and the lump of metal. ";
break;
case WPN_DAGGER:
description += "A long knife or a very short sword, "
"which can be held or thrown. ";
break;
case WPN_KNIFE:
description += "A simple survival knife. "
"Designed more for utility than combat, "
"it looks quite capable of butchering a corpse. ";
break;
case WPN_MORNINGSTAR:
description += "A mace covered in spikes. ";
break;
case WPN_SHORT_SWORD:
description += "A sword with a short, slashing blade. ";
break;
case WPN_LONG_SWORD:
description += "A sword with a long, slashing blade. ";
break;
case WPN_GREAT_SWORD:
description += "A sword with a very long, heavy blade "
"and a long handle. ";
break;
case WPN_SCIMITAR:
description += "A long sword with a curved blade. ";
break;
case WPN_HAND_AXE:
description += "An small axe designed for either hand combat "
"or throwing. ";
// "It might also make a good tool.";
break;
case WPN_BATTLEAXE:
description += "A large axe with a double-headed blade. ";
break;
case WPN_SPEAR:
description += "A long stick with a pointy blade on one end, "
"to be held or thrown. ";
break;
case WPN_TRIDENT:
description +=
"A hafted weapon with three points at one end. ";
break;
case WPN_HALBERD:
description +=
"A long pole with a spiked axe head on one end. ";
break;
case WPN_SLING:
description +=
"A piece of cloth and leather for launching stones, "
"which do a small amount of damage on impact. ";
break;
case WPN_BOW:
description += "A curved piece of wood and string, "
"for shooting arrows. It does good damage in combat, "
"and a skilled user can use it to great effect. ";
break;
case WPN_BLOWGUN:
description += "A long, light tube, open at both ends. Doing "
"very little damage, its main use is to fire poisoned "
"needles from afar. It makes very little noise. ";
break;
case WPN_CROSSBOW:
description += "A piece of machinery used for firing bolts, "
"which takes some time to load and fire. "
"It does very good damage in combat. ";
break;
case WPN_HAND_CROSSBOW:
description += "A small crossbow, for firing darts. ";
break;
case WPN_GLAIVE:
description +=
"A pole with a large, heavy blade on one end. ";
break;
case WPN_QUARTERSTAFF:
description += "A sturdy wooden pole. ";
break;
case WPN_SCYTHE:
description +=
"A farm implement, usually unsuited to combat. ";
break;
case WPN_GIANT_CLUB:
description += "A giant lump of wood, "
"shaped for an ogre's hands. ";
break;
case WPN_GIANT_SPIKED_CLUB:
description +=
"A giant lump of wood with sharp spikes at one end. ";
break;
case WPN_EVENINGSTAR:
description += "The opposite of a morningstar. ";
break;
case WPN_QUICK_BLADE:
description += "A small and magically quick sword. ";
break;
case WPN_KATANA:
description += "A very rare and extremely effective "
"imported weapon, featuring a long "
"single-edged blade. ";
break;
case WPN_EXECUTIONERS_AXE:
description += "A huge axe. ";
break;
case WPN_DOUBLE_SWORD:
description +=
"A magical weapon with two razor-sharp blades. ";
break;
case WPN_TRIPLE_SWORD:
description += "A magical weapon with three "
"great razor-sharp blades. ";
break;
case WPN_HAMMER:
description += "The kind of thing you hit nails with, "
"adapted for battle. ";
break;
case WPN_ANCUS:
description += "A large and vicious toothed club. ";
break;
case WPN_WHIP:
description += "A whip. ";
break;
case WPN_SABRE:
description += "A sword with a medium length slashing blade. ";
break;
case WPN_DEMON_BLADE:
description +=
"A terrible weapon, forged in the fires of Hell. ";
break;
case WPN_DEMON_WHIP:
description += "A terrible weapon, woven "
"in the depths of the inferno. ";
break;
case WPN_DEMON_TRIDENT:
description +=
"A terrible weapon, molded by fire and brimstone. ";
break;
case WPN_BROAD_AXE:
description += "An axe with a large blade. ";
break;
case WPN_WAR_AXE:
description += "An axe intended for hand to hand combat. ";
break;
case WPN_SPIKED_FLAIL:
description +=
"A flail with large spikes on the metal lump. ";
break;
case WPN_GREAT_MACE:
description += "A large and heavy mace. ";
break;
case WPN_GREAT_FLAIL:
description += "A large and heavy flail. ";
break;
case WPN_FALCHION:
description += "A sword with a broad slashing blade. ";
break;
default:
DEBUGSTR("Unknown weapon");
}
description += "$";
}
}
if (verbose == 1 && !launches_things( item.sub_type ))
{
description += "$Damage rating: ";
append_value(description, property( item, PWPN_DAMAGE ), false);
description += "$Accuracy rating: ";
append_value(description, property( item, PWPN_HIT ), true);
description += "$Base attack delay: ";
append_value(description, property( item, PWPN_SPEED ) * 10, false);
description += "%%";
}
description += "$";
if (!is_fixed_artefact( item ))
{
int spec_ench = get_weapon_brand( item );
if (!is_random_artefact( item ) && verbose == 0)
spec_ench = SPWPN_NORMAL;
// special weapon descrip
if (spec_ench != SPWPN_NORMAL && item_ident( item, ISFLAG_KNOW_TYPE ))
{
description += "$";
switch (spec_ench)
{
case SPWPN_FLAMING:
description += "It emits flame when wielded, "
"causing extra injury to most foes "
"and up to double damage against "
"particularly susceptible opponents. ";
break;
case SPWPN_FREEZING:
description += "It has been specially enchanted to "
"freeze those struck by it, causing "
"extra injury to most foes and "
"up to double damage against "
"particularly susceptible opponents. ";
break;
case SPWPN_HOLY_WRATH:
description += "It has been blessed by the Shining One "
"to harm undead and cause great damage to "
"the unholy creatures of Hell or Pandemonium. ";
break;
case SPWPN_ELECTROCUTION:
description += "Occasionally upon striking a foe "
"it will discharge some electrical energy "
"and cause terrible harm. ";
break;
case SPWPN_ORC_SLAYING:
description += "It is especially effective against "
"all of orcish descent. ";
break;
case SPWPN_VENOM:
if (launches_things( item.sub_type ))
description += "It poisons the unbranded ammo it fires. ";
else
description += "It poisons the flesh of those it strikes. ";
break;
case SPWPN_PROTECTION:
description += "It protects the one who wields it against "
"injury (+5 to AC). ";
break;
case SPWPN_DRAINING:
description += "A truly terrible weapon, "
"it drains the life of those it strikes. ";
break;
case SPWPN_SPEED:
if (launches_things( item.sub_type ))
{
description += "It allows its wielder to fire twice when "
"they would otherwise have fired only once. ";
}
else
{
description += "It allows its wielder to attack twice when "
"they would otherwise have struck only once. ";
}
break;
case SPWPN_VORPAL:
description += "It inflicts extra damage upon your enemies. ";
break;
case SPWPN_FLAME:
description += "It turns projectiles fired from it into "
"bolts of fire. ";
break;
case SPWPN_FROST:
description += "It turns projectiles fired from it into "
"bolts of frost. ";
break;
case SPWPN_VAMPIRICISM:
description += "It inflicts no extra harm, "
"but heals its wielder somewhat when "
"he or she strikes a living foe. ";
break;
case SPWPN_DISRUPTION:
description += "It is a weapon blessed by Zin, "
"and can inflict up to fourfold damage "
"when used against the undead. ";
break;
case SPWPN_PAIN:
description += "In the hands of one skilled in "
"necromantic magic it inflicts "
"extra damage on living creatures. ";
break;
case SPWPN_DISTORTION:
description += "It warps and distorts space around it. ";
break;
case SPWPN_REACHING:
description += "It can be evoked to extend its reach. ";
break;
}
}
if (is_random_artefact( item ))
{
if (item_ident( item, ISFLAG_KNOW_PROPERTIES ))
{
unsigned int old_length = description.length();
randart_descpr( description, item );
if (description.length() == old_length)
description += "$";
}
else if (item_ident( item, ISFLAG_KNOW_TYPE ))
{
description += "$This weapon may have some hidden properties.$";
}
}
else if (spec_ench != SPWPN_NORMAL && item_ident( item, ISFLAG_KNOW_TYPE ))
{
description += "$";
}
}
if (item_known_cursed( item ))
{
description += "$It has a curse placed upon it.";
}
if (verbose == 1 && !launches_things( item.sub_type ))
{
#ifdef USE_NEW_COMBAT_STATS
const int str_weight = weapon_str_weight( item.base_type, item.sub_type );
if (str_weight >= 8)
description += "$This weapon is best used by the strong.";
else if (str_weight > 5)
description += "$This weapon is better for the strong.";
else if (str_weight <= 2)
description += "$This weapon is best used by the dexterous.";
else if (str_weight < 5)
description += "$This weapon is better for the dexterous.";
#endif
switch (hands_reqd_for_weapon(item.base_type, item.sub_type))
{
case HANDS_ONE_HANDED:
description += "$It is a one handed weapon.";
break;
case HANDS_ONE_OR_TWO_HANDED:
description += "$It can be used with one hand, or more "
"effectively with two (i.e. when not using a shield).";
break;
case HANDS_TWO_HANDED:
description += "$It is a two handed weapon.";
break;
}
}
if (!is_random_artefact( item ))
{
switch (get_equip_race( item ))
{
case ISFLAG_DWARVEN:
description += "$It is well-crafted and very durable.";
break;
}
if (launches_things( item.sub_type ))
{
switch (get_equip_race( item ))
{
case ISFLAG_DWARVEN:
description += "$It is most deadly when used with "
"dwarven ammunition.";
break;
case ISFLAG_ELVEN:
description += "$It is most deadly when used with "
"elven ammunition.";
break;
case ISFLAG_ORCISH:
description += "$It is most deadly when used with "
"orcish ammunition.";
break;
}
}
}
if (verbose == 1)
{
description += "$It falls into the";
switch (item.sub_type)
{
case WPN_SLING:
description += " 'slings' category. ";
break;
case WPN_BOW:
description += " 'bows' category. ";
break;
case WPN_HAND_CROSSBOW:
case WPN_CROSSBOW:
description += " 'crossbows' category. ";
break;
case WPN_BLOWGUN:
description += " 'darts' category. ";
break;
default:
// Melee weapons
switch (weapon_skill(item.base_type, item.sub_type))
{
case SK_SHORT_BLADES:
description += " 'short blades' category. ";
break;
case SK_LONG_SWORDS:
description += " 'long swords' category. ";
break;
case SK_AXES:
description += " 'axes' category. ";
break;
case SK_MACES_FLAILS:
description += " 'maces and flails' category. ";
break;
case SK_POLEARMS:
description += " 'pole-arms' category. ";
break;
case SK_STAVES:
description += " 'staves' category. ";
break;
default:
description += " 'bug' category. ";
DEBUGSTR("Unknown weapon type");
break;
}
}
}
return (description);
}
//---------------------------------------------------------------
//
// describe_ammo
//
//---------------------------------------------------------------
static std::string describe_ammo( const item_def &item )
{
std::string description;
description.reserve(64);
switch (item.sub_type)
{
case MI_STONE:
description += "A stone. ";
break;
case MI_ARROW:
description += "An arrow. ";
break;
case MI_NEEDLE:
description += "A needle. ";
break;
case MI_BOLT:
description += "A crossbow bolt. ";
break;
case MI_DART:
description += "A small throwing weapon. ";
break;
case MI_LARGE_ROCK:
description += "A rock, used by giants as a missile. ";
break;
case MI_EGGPLANT:
description += "A purple vegetable. "
"The presence of this object in the game "
"indicates a bug (or some kind of cheating on your part). ";
break;
default:
DEBUGSTR("Unknown ammo type");
break;
}
if (item.special != 0 && item_ident( item, ISFLAG_KNOW_TYPE ))
{
switch (item.special)
{
case 1:
description += "$When fired from an appropriate launcher, "
"it turns into a bolt of flame. ";
break;
case 2:
description += "$When fired from an appropriate launcher, "
"it turns into a bolt of ice. ";
break;
case 3:
case 4:
description += "$It is coated with poison. ";
break;
}
}
description += "$";
return (description);
}
//---------------------------------------------------------------
//
// describe_armour
//
//---------------------------------------------------------------
static std::string describe_armour( const item_def &item, char verbose )
{
std::string description;
description.reserve(200);
if (is_unrandom_artefact( item )
&& strlen(unrandart_descrip(1, item)) != 0)
{
description += "$";
description += unrandart_descrip(1, item);
description += "$$";
}
else
{
if (verbose == 1)
{
switch (item.sub_type)
{
case ARM_ROBE:
description += "A cloth robe. ";
break;
case ARM_LEATHER_ARMOUR:
description += "A suit made of hardened leather. ";
break;
case ARM_RING_MAIL:
description += "A leather suit covered in little rings. ";
break;
case ARM_SCALE_MAIL:
description +=
"A leather suit covered in little metal plates. ";
break;
case ARM_CHAIN_MAIL:
description += "A suit made of interlocking metal rings. ";
break;
case ARM_SPLINT_MAIL:
description += "A suit made of splints of metal. ";
break;
case ARM_BANDED_MAIL:
description += "A suit made of bands of metal. ";
break;
case ARM_PLATE_MAIL:
description += "A suit of mail and large plates of metal. ";
break;
case ARM_SHIELD:
description +=
"A piece of metal, to be strapped on one's arm. "
"It is cumbersome to wear, and slightly slows "
"the rate at which you may attack. ";
break;
case ARM_CLOAK:
description += "A cloth cloak. ";
break;
case ARM_HELMET:
switch (get_helmet_type( item ))
{
case THELM_HELMET:
case THELM_HELM:
description += "A piece of metal headgear. ";
break;
case THELM_CAP:
description += "A cloth or leather cap. ";
break;
case THELM_WIZARD_HAT:
description += "A conical cloth hat. ";
break;
}
break;
case ARM_GLOVES:
description += "A pair of gloves. ";
break;
case ARM_BOOTS:
if (item.plus2 == TBOOT_NAGA_BARDING)
description += "A special armour made for Nagas, "
"to wear over their tails. ";
else if (item.plus2 == TBOOT_CENTAUR_BARDING)
description += "An armour made for centaurs, "
"to wear over their equine half. ";
else
description += "A pair of sturdy boots. ";
break;
case ARM_BUCKLER:
description += "A small shield. ";
break;
case ARM_LARGE_SHIELD:
description += "Like a normal shield, only larger. ";
if (you.species == SP_TROLL || you.species == SP_OGRE
|| you.species == SP_OGRE_MAGE
|| player_genus(GENPC_DRACONIAN))
{
description += "It looks like it would fit you well. ";
}
else
{
description += "It is very cumbersome to wear, and "
"slows the rate at which you may attack. ";
}
break;
case ARM_DRAGON_HIDE:
description += "The scaly skin of a dragon. I suppose "
"you could wear it if you really wanted to. ";
break;
case ARM_TROLL_HIDE:
description += "The stiff and knobbly hide of a troll. "
"I suppose you could wear it "
"if you really wanted to. ";
break;
case ARM_CRYSTAL_PLATE_MAIL:
description += "An incredibly heavy but extremely effective "
"suit of crystalline armour. "
"It is somewhat resistant to corrosion. ";
break;
case ARM_DRAGON_ARMOUR:
description += "A magical armour, made from the scales of "
"a fire-breathing dragon. It provides "
"great protection from the effects of fire, "
"but renders its wearer more susceptible to "
"the effects of cold. ";
break;
case ARM_TROLL_LEATHER_ARMOUR:
description += "A magical armour, made from the stiff and "
"knobbly skin of a common troll. It magically regenerates "
"its wearer's flesh at a fairly slow rate "
"(unless already a troll). ";
break;
case ARM_ICE_DRAGON_HIDE:
description += "The scaly skin of a dragon. I suppose "
"you could wear it if you really wanted to. ";
break;
case ARM_ICE_DRAGON_ARMOUR:
description += "A magical armour, made from the scales of "
"a cold-breathing dragon. It provides "
"great protection from the effects of cold, "
"but renders its wearer more susceptible to "
"the effects of fire and heat. ";
break;
case ARM_STEAM_DRAGON_HIDE:
description += "The soft and supple scaley skin of "
"a steam dragon. I suppose you could "
"wear it if you really wanted to. ";
break;
case ARM_STEAM_DRAGON_ARMOUR:
description += "A magical armour, made from the scales of "
"a steam-breathing dragon. Although unlike "
"the armour made from the scales of some "
"larger dragons it does not provide its wearer "
"with much in the way of special magical "
"protection, it is extremely light and "
"as supple as cloth. ";
break; /* Protects from steam */
case ARM_MOTTLED_DRAGON_HIDE:
description += "The weirdly-patterned scaley skin of "
"a mottled dragon. I suppose you could "
"wear it if you really wanted to. ";
break;
case ARM_MOTTLED_DRAGON_ARMOUR:
description += "A magical armour made from the scales of a "
"mottled dragon. Although unlike the armour "
"made from the scales of some larger dragons "
"it does not provide its wearer with much in "
"the way of special magical protection, it is "
"as light and relatively uncumbersome as "
"leather armour. ";
break; /* Protects from napalm */
case ARM_STORM_DRAGON_HIDE:
description += "The hide of a storm dragon, covered in "
"extremely hard blue scales. I suppose "
"you could wear it if you really wanted to. ";
break;
case ARM_STORM_DRAGON_ARMOUR:
description += "A magical armour made from the scales of "
"a lightning-breathing dragon. It is heavier "
"than most dragon scale armours, but gives "
"its wearer great resistance to "
"electrical discharges. ";
break;
case ARM_GOLD_DRAGON_HIDE:
description += "The extremely tough and heavy skin of a "
"golden dragon, covered in shimmering golden "
"scales. I suppose you could wear it if "
"you really wanted to. ";
break;
case ARM_GOLD_DRAGON_ARMOUR:
description += "A magical armour made from the golden scales "
"of a golden dragon. It is extremely heavy and "
"cumbersome, but confers resistances to fire, "
"cold, and poison on its wearer. ";
break;
case ARM_ANIMAL_SKIN:
description += "The skins of several animals. ";
break;
case ARM_SWAMP_DRAGON_HIDE:
description += "The slimy";
if (you.species != SP_MUMMY)
description += ", smelly";
description += " skin of a swamp-dwelling dragon. I suppose "
"you could wear it if you really wanted to. ";
break;
case ARM_SWAMP_DRAGON_ARMOUR:
description += "A magical armour made from the scales of "
"a swamp dragon. It confers resistance to "
"poison on its wearer. ";
break;
default:
DEBUGSTR("Unknown armour");
}
description += "$";
}
}
if (verbose == 1
&& item.sub_type != ARM_SHIELD
&& item.sub_type != ARM_BUCKLER
&& item.sub_type != ARM_LARGE_SHIELD)
{
description += "$Armour rating: ";
if (item.sub_type == ARM_HELMET
&& (get_helmet_type( item ) == THELM_CAP
|| get_helmet_type( item ) == THELM_WIZARD_HAT))
{
// caps and wizard hats don't have a base AC
append_value(description, 0, false);
}
else if (item.sub_type == ARM_BOOTS && item.plus2 != TBOOT_BOOTS)
{
// Barding has AC value 4.
append_value(description, 4, false);
}
else
{
append_value(description, property( item, PARM_AC ), false);
}
description += "$Evasion modifier: ";
append_value(description, property( item, PARM_EVASION ), true);
description += "$";
}
int ego = get_armour_ego_type( item );
if (ego != SPARM_NORMAL
&& item_ident( item, ISFLAG_KNOW_TYPE )
&& verbose == 1)
{
description += "$";
switch (ego)
{
case SPARM_RUNNING:
description += "It allows its wearer to run at a great speed. ";
break;
case SPARM_FIRE_RESISTANCE:
description += "It protects its wearer from heat and fire. ";
break;
case SPARM_COLD_RESISTANCE:
description += "It protects its wearer from cold. ";
break;
case SPARM_POISON_RESISTANCE:
description += "It protects its wearer from poison. ";
break;
case SPARM_SEE_INVISIBLE:
description += "It allows its wearer to see invisible things. ";
break;
case SPARM_DARKNESS:
description += "When activated it hides its wearer from "
"the sight of others, but also increases "
"their metabolic rate by a large amount. ";
break;
case SPARM_STRENGTH:
description += "It increases the physical power of its wearer (+3 to strength). ";
break;
case SPARM_DEXTERITY:
description += "It increases the dexterity of its wearer (+3 to dexterity). ";
break;
case SPARM_INTELLIGENCE:
description += "It makes you more clever (+3 to intelligence). ";
break;
case SPARM_PONDEROUSNESS:
description += "It is very cumbersome (-2 to EV, slows movement). ";
break;
case SPARM_LEVITATION:
description += "It can be activated to allow its wearer to "
"float above the ground and remain so indefinitely. ";
break;
case SPARM_MAGIC_RESISTANCE:
description += "It increases its wearer's resistance "
"to enchantments. ";
break;
case SPARM_PROTECTION:
description += "It protects its wearer from harm (+3 to AC). ";
break;
case SPARM_STEALTH:
description += "It enhances the stealth of its wearer. ";
break;
case SPARM_RESISTANCE:
description += "It protects its wearer from the effects "
"of both cold and heat. ";
break;
// these two are robes only:
case SPARM_POSITIVE_ENERGY:
description += "It partially protects its wearer from "
"the effects of negative energy. ";
break;
case SPARM_ARCHMAGI:
description += "It greatly increases the power of its "
"wearer's magical spells, but is only "
"intended for those who have " "very little left to learn. ";
break;
case SPARM_PRESERVATION:
description += "It protects its wearer's possessions "
"from damage and destruction. ";
break;
}
description += "$";
}
if (is_random_artefact( item ))
{
if (item_ident( item, ISFLAG_KNOW_PROPERTIES ))
randart_descpr( description, item );
else if (item_ident( item, ISFLAG_KNOW_TYPE ))
description += "$This armour may have some hidden properties.$";
}
else
{
switch (get_equip_race( item ))
{
case ISFLAG_ELVEN:
//jmf: not light
description += "$It is well-crafted and unobstructive";
if (item.sub_type == ARM_CLOAK || item.sub_type == ARM_BOOTS)
description += ", and helps its wearer avoid being noticed";
description += ".";
break;
case ISFLAG_DWARVEN:
description += "$It is well-crafted and very durable.";
break;
case ISFLAG_ORCISH:
default:
break;
}
}
if (item_known_cursed( item ))
{
description += "$It has a curse placed upon it.";
}
return description;
}
//---------------------------------------------------------------
//
// describe_stick
//
//---------------------------------------------------------------
static std::string describe_stick( const item_def &item )
{
std::string description;
description.reserve(64);
if (get_ident_type( OBJ_WANDS, item.sub_type ) != ID_KNOWN_TYPE)
description += "A stick. Maybe it's magical. ";
else
{
description += "A magical device which ";
switch (item.sub_type)
{
case WAND_FLAME:
description += "throws little bits of flame. ";
break;
case WAND_FROST:
description += "throws little bits of frost. ";
break;
case WAND_SLOWING:
description += "casts enchantments to slow down the actions of "
"a creature at which it is directed. ";
break;
case WAND_HASTING:
description += "casts enchantments to speed up the actions of "
"a creature at which it is directed. ";
break;
case WAND_MAGIC_DARTS:
description += "throws small bolts of destructive energy. ";
break;
case WAND_HEALING:
description += "can heal a creature's wounds. ";
break;
case WAND_PARALYSIS:
description += "can render a creature immobile. ";
break;
case WAND_FIRE:
description += "throws great bolts of fire. ";
break;
case WAND_COLD:
description += "throws great bolts of cold. ";
break;
case WAND_CONFUSION:
description += "induces confusion and bewilderment in "
"a target creature. ";
break;
case WAND_INVISIBILITY:
description += "hides a creature from the view of others. ";
break;
case WAND_DIGGING:
description += "drills tunnels through unworked rock. ";
break;
case WAND_FIREBALL:
description += "throws exploding blasts of flame. ";
break;
case WAND_TELEPORTATION:
description += "causes a creature to be randomly translocated. ";
break;
case WAND_LIGHTNING:
description += "throws great bolts of lightning. ";
break;
case WAND_POLYMORPH_OTHER:
description += "causes a creature to be transmogrified into "
"another form. "
"It doesn't work on you, so don't even try. ";
break;
case WAND_ENSLAVEMENT:
description += "causes slavish obedience in a creature. ";
break;
case WAND_DRAINING:
description += "throws a bolt of negative energy which "
"drains the life essences of living creatures, "
"but is useless against the undead. ";
break;
case WAND_RANDOM_EFFECTS:
description += "can produce a variety of effects. ";
break;
case WAND_DISINTEGRATION:
description += "disrupts the physical structure of "
"an object, especially a creature's body. ";
break;
default:
DEBUGSTR("Unknown stick");
}
if (item_ident( item, ISFLAG_KNOW_PLUSES ) && item.plus == 0)
description += "Unfortunately, it has no charges left. ";
}
return description;
}
//---------------------------------------------------------------
//
// describe_food
//
//---------------------------------------------------------------
static std::string describe_food( const item_def &item )
{
std::string description;
description.reserve(100);
switch (item.sub_type)
{
// rations
case FOOD_MEAT_RATION:
case FOOD_BREAD_RATION:
description += "A filling ration of ";
switch (item.sub_type)
{
case FOOD_MEAT_RATION:
description += "dried and preserved meats";
break;
case FOOD_BREAD_RATION:
description += "breads";
break;
}
description += ". ";
break;
// fruits
case FOOD_PEAR:
case FOOD_APPLE:
case FOOD_APRICOT:
case FOOD_ORANGE:
case FOOD_BANANA:
case FOOD_STRAWBERRY:
case FOOD_RAMBUTAN:
case FOOD_LEMON:
case FOOD_GRAPE:
case FOOD_LYCHEE:
case FOOD_SULTANA:
description += "A";
switch (item.sub_type)
{
case FOOD_PEAR:
description += " delicious juicy";
break;
case FOOD_APPLE:
description += " delicious red or green";
break;
case FOOD_APRICOT:
description += " delicious orange";
break;
case FOOD_ORANGE:
description += " delicious juicy orange";
break;
case FOOD_BANANA:
description += " delicious yellow";
break;
case FOOD_STRAWBERRY:
description += " small but delicious red";
break;
case FOOD_RAMBUTAN:
description += " small but delicious tropical";
break;
case FOOD_LEMON:
description += " yellow";
break;
case FOOD_GRAPE:
description += " small";
break;
case FOOD_LYCHEE:
description += " tropical";
break;
case FOOD_SULTANA:
description += " dried";
break;
}
description += " fruit";
switch (item.sub_type)
{
case FOOD_BANANA:
description += ", probably grown and imported by "
"some amoral multinational as the "
"result of a corrupt trade deal";
break;
case FOOD_RAMBUTAN:
description += ". How it got into this dungeon "
"is anyone's guess";
break;
case FOOD_SULTANA:
description += " of some sort, possibly a grape";
break;
}
description += ". ";
break;
// vegetables
case FOOD_CHOKO:
case FOOD_SNOZZCUMBER:
description += "A";
switch (item.sub_type)
{
case FOOD_CHOKO:
description += "n almost tasteless green";
break;
case FOOD_SNOZZCUMBER:
description += " repulsive cucumber-shaped";
break;
}
description += " vegetable";
switch (item.sub_type)
{
case FOOD_CHOKO:
description += ", which grows on a vine";
break;
}
description += ". ";
break;
// lumps, slices, chunks, and strips
case FOOD_HONEYCOMB:
case FOOD_ROYAL_JELLY:
case FOOD_PIZZA:
case FOOD_CHEESE:
case FOOD_BEEF_JERKY:
case FOOD_SAUSAGE:
case FOOD_CHUNK:
description += "A";
switch (item.sub_type)
{
case FOOD_SAUSAGE:
description += "n elongated";
break;
}
switch (item.sub_type)
{
case FOOD_HONEYCOMB:
case FOOD_ROYAL_JELLY:
case FOOD_CHEESE:
case FOOD_SAUSAGE:
description += " lump";
break;
case FOOD_PIZZA:
description += " slice";
break;
case FOOD_BEEF_JERKY:
description += " strip";
break;
case FOOD_CHUNK:
description += " piece";
}
description += " of ";
switch (item.sub_type)
{
case FOOD_SAUSAGE:
description += "low-grade gristle, entrails and "
"cereal products encased in an intestine";
break;
case FOOD_HONEYCOMB:
description += "the delicious honeycomb made by giant bees";
break;
case FOOD_ROYAL_JELLY:
description += "the magical substance produced by giant bees "
"to be fed to their queens";
break;
case FOOD_PIZZA:
description += "pizza";
break;
case FOOD_CHEESE:
description += "cheese";
break;
case FOOD_BEEF_JERKY:
description += "preserved dead cow or bull";
break;
case FOOD_CHUNK:
description += "dungeon meat";
break;
}
description += ". ";
switch (item.sub_type)
{
case FOOD_SAUSAGE:
description += "Yum! ";
break;
case FOOD_PIZZA:
description += "Don't tell me you don't know what that is! ";
break;
case FOOD_CHUNK:
if (you.species != SP_GHOUL)
description += "It looks rather unpleasant. ";
if (item.special < 100)
{
if (you.species == SP_GHOUL)
description += "It looks nice and ripe. ";
else if (you.species != SP_MUMMY)
{
description += "In fact, it is "
"rotting away before your eyes. "
"Eating it would probably be unwise. ";
}
}
break;
}
break;
default:
DEBUGSTR("Unknown food");
}
description += "$";
return (description);
}
//---------------------------------------------------------------
//
// describe_potion
//
//---------------------------------------------------------------
static std::string describe_potion( const item_def &item )
{
std::string description;
description.reserve(64);
if (get_ident_type( OBJ_POTIONS, item.sub_type ) != ID_KNOWN_TYPE)
description += "A small bottle of liquid.";
else
{
description += "A";
switch (item.sub_type)
{
case POT_HEALING:
description += " blessed";
break;
case POT_HEAL_WOUNDS:
description += " magical healing";
break;
case POT_SPEED:
description += "n enchanted";
break;
case POT_MIGHT:
description += " magic";
break;
case POT_POISON:
description += " nasty poisonous";
break;
case POT_PORRIDGE:
description += " filling";
break;
case POT_DEGENERATION:
description += " noxious";
break;
case POT_DECAY:
description += " vile and putrid cursed";
break;
case POT_WATER:
description += " unique";
break;
case POT_EXPERIENCE:
description += " truly wonderful and very rare";
break;
case POT_MAGIC:
description += " valuable";
break;
case POT_STRONG_POISON:
description += " terribly venomous";
break;
}
description += " ";
switch (item.sub_type)
{
case POT_MIGHT:
case POT_GAIN_STRENGTH:
case POT_GAIN_DEXTERITY:
case POT_GAIN_INTELLIGENCE:
case POT_LEVITATION:
case POT_SLOWING:
case POT_PARALYSIS:
case POT_CONFUSION:
case POT_INVISIBILITY:
case POT_PORRIDGE:
case POT_MAGIC:
case POT_RESTORE_ABILITIES:
case POT_STRONG_POISON:
case POT_BERSERK_RAGE:
case POT_CURE_MUTATION:
case POT_MUTATION:
description += "potion";
break;
case POT_HEALING:
description += "fluid";
break;
case POT_HEAL_WOUNDS:
description += "elixir";
break;
case POT_SPEED:
description += "beverage";
break;
case POT_POISON:
case POT_DECAY:
description += "liquid";
break;
case POT_DEGENERATION:
description += "concoction";
break;
case POT_WATER:
description += "substance";
break;
case POT_EXPERIENCE:
description += "drink";
break;
}
switch (item.sub_type)
{
case POT_HEALING:
case POT_HEAL_WOUNDS:
case POT_SPEED:
case POT_MIGHT:
case POT_LEVITATION:
case POT_SLOWING:
case POT_PARALYSIS:
case POT_CONFUSION:
case POT_INVISIBILITY:
case POT_DEGENERATION:
case POT_DECAY:
case POT_MAGIC:
case POT_RESTORE_ABILITIES:
case POT_BERSERK_RAGE:
case POT_CURE_MUTATION:
case POT_MUTATION:
description += " which ";
break;
case POT_GAIN_STRENGTH:
case POT_GAIN_DEXTERITY:
case POT_GAIN_INTELLIGENCE:
case POT_PORRIDGE:
description += " of ";
break;
}
switch (item.sub_type)
{
case POT_HEALING:
description += "heals some wounds, clears the mind, "
"and cures diseases";
break;
case POT_HEAL_WOUNDS:
description += "causes wounds to close and heal "
"almost instantly";
break;
case POT_SPEED:
description += "speeds the actions of anyone who drinks it";
break;
case POT_MIGHT:
description += "greatly increases the strength and "
"physical power of one who drinks it";
break;
case POT_GAIN_STRENGTH:
case POT_GAIN_DEXTERITY:
case POT_GAIN_INTELLIGENCE:
description += "beneficial mutation";
break;
case POT_LEVITATION:
description += "confers great buoyancy on one who consumes it";
break;
case POT_SLOWING:
description += "slows your actions";
break;
case POT_PARALYSIS:
description += "eliminates your control over your own body";
break;
case POT_CONFUSION:
description += "confuses your perceptions and reduces "
"your control over your own actions";
break;
case POT_INVISIBILITY:
description += "hides you from the sight of others";
break;
case POT_PORRIDGE:
description += "sludge, high in cereal fibre";
break;
case POT_DEGENERATION:
description += "can do terrible things to your "
"body, brain and reflexes";
break;
case POT_DECAY:
description += "causes your flesh to decay "
"before your very eyes";
break;
case POT_WATER:
description += ", vital for the existence of most life";
break;
case POT_MAGIC:
description += "grants a person with an "
"infusion of magical energy";
break;
case POT_RESTORE_ABILITIES:
description += "restores the abilities of one who drinks it";
break;
case POT_BERSERK_RAGE:
description += "can send one into an incoherent rage";
break;
case POT_CURE_MUTATION:
description += "removes some or all of any mutations "
"which may be afflicting you";
break;
case POT_MUTATION:
description += "does very strange things to you";
break;
}
description += ". ";
switch (item.sub_type)
{
case POT_HEALING:
case POT_HEAL_WOUNDS:
description += "If one uses it when they are "
"at or near full health, it can also ";
if (item.sub_type == POT_HEALING)
description += "slightly ";
description += "repair permanent injuries. ";
break;
}
//default:
// DEBUGSTR("Unknown potion"); // I had no idea where to put this back 16jan2000 {dlb}
}
description += "$";
return (description);
}
//---------------------------------------------------------------
//
// describe_scroll
//
//---------------------------------------------------------------
static std::string describe_scroll( const item_def &item )
{
std::string description;
description.reserve(64);
if (get_ident_type( OBJ_SCROLLS, item.sub_type ) != ID_KNOWN_TYPE)
description += "A scroll of paper covered in magical writing.";
else
{
switch (item.sub_type)
{
case SCR_IDENTIFY:
description += "This useful magic scroll allows you to "
"determine the properties of any object. ";
break;
case SCR_TELEPORTATION:
description += "Reading the words on this scroll "
"translocates you to a random position. ";
break;
case SCR_FEAR:
description += "This scroll causes great fear in those "
"who see the one who reads it. ";
break;
case SCR_NOISE:
description += "This prank scroll, often slipped into a wizard's "
"backpack by a devious apprentice, causes a loud noise. "
"It is not otherwise noted for its usefulness. ";
break;
case SCR_REMOVE_CURSE:
description += "Reading this scroll removes curses from "
"the items you are using. ";
break;
case SCR_DETECT_CURSE:
description += "This scroll allows you to detect the presence "
"of cursed items among your possessions. ";
break;
case SCR_SUMMONING:
description += "This scroll opens a conduit to the Abyss "
"and draws a terrible beast to this world "
"for a limited time. ";
break;
case SCR_ENCHANT_WEAPON_I:
description += "This scroll places an enchantment on a weapon, "
"making it more accurate in combat. It may fail "
"to affect weapons already heavily enchanted. ";
break;
case SCR_ENCHANT_ARMOUR:
description += "This scroll places an enchantment "
"on a piece of armour. ";
break;
case SCR_TORMENT:
description += "This scroll calls on the powers of Hell to "
"inflict great pain on any nearby creature - "
"including you! ";
break;
case SCR_RANDOM_USELESSNESS:
description += "It is easy to be blinded to the essential "
"uselessness of this scroll by the sense of achievement "
"you get from getting it to work at all.";
// -- The Hitchhiker's Guide to the Galaxy (paraphrase)
break;
case SCR_CURSE_WEAPON:
description += "This scroll places a curse on a weapon. ";
break;
case SCR_CURSE_ARMOUR:
description += "This scroll places a curse "
"on a piece of armour. ";
break;
case SCR_IMMOLATION:
description += "Small writing on the back of the scroll reads: "
"\"Warning: contents under pressure. Do not use near"
" flammable objects.\"";
break;
case SCR_BLINKING:
description += "This scroll allows its reader to teleport "
"a short distance, with precise control. Be wary that "
"controlled teleports will cause the subject to "
"become contaminated with magical energy. ";
break;
case SCR_PAPER:
description += "Apart from a label, this scroll is blank. ";
break;
case SCR_MAGIC_MAPPING:
description += "This scroll reveals the nearby surroundings "
"of one who reads it. ";
break;
case SCR_FORGETFULNESS:
description += "This scroll induces "
"an irritating disorientation. ";
break;
case SCR_ACQUIREMENT:
description += "This wonderful scroll causes the "
"creation of a valuable item to "
"appear before the reader. "
"It is especially treasured by specialist "
"magicians, as they can use it to obtain "
"the powerful spells of their specialty. ";
break;
case SCR_ENCHANT_WEAPON_II:
description += "This scroll places an enchantment on a weapon, "
"making it inflict greater damage in combat. "
"It may fail to affect weapons already "
"heavily enchanted. ";
break;
case SCR_VORPALISE_WEAPON:
description += "This scroll enchants a weapon so as to make "
"it far more effective at inflicting harm on "
"its wielder's enemies. Using it on a weapon "
"already affected by some kind of special "
"enchantment (other than that produced by a "
"normal scroll of enchant weapon) is not advised. ";
break;
case SCR_RECHARGING:
description += "This scroll restores the charges of "
"any magical wand wielded by its reader. ";
break;
case SCR_ENCHANT_WEAPON_III:
description += "This scroll enchants a weapon to be "
"far more effective in combat. Although "
"it can be used in the creation of especially "
"enchanted weapons, it may fail to affect those "
"already heavily enchanted. ";
break;
default:
DEBUGSTR("Unknown scroll");
}
}
description += "$";
return (description);
}
//---------------------------------------------------------------
//
// describe_jewellery
//
//---------------------------------------------------------------
static std::string describe_jewellery( const item_def &item, char verbose)
{
std::string description;
description.reserve(200);
if (is_unrandom_artefact( item ) && strlen(unrandart_descrip(1, item)) != 0)
{
description += "$";
description += unrandart_descrip(1, item);
description += "$$";
}
else if ((!is_random_artefact( item )
&& get_ident_type( OBJ_JEWELLERY, item.sub_type ) != ID_KNOWN_TYPE)
|| (is_random_artefact( item )
&& item_not_ident( item, ISFLAG_KNOW_TYPE )))
{
description += "A piece of jewellery.";
}
else if (verbose == 1 || is_random_artefact( item ))
{
switch (item.sub_type)
{
case RING_REGENERATION:
description += "This wonderful ring greatly increases the "
"recuperative powers of its wearer, but also "
"considerably speeds his or her metabolism. ";
break;
case RING_PROTECTION:
description +=
"This ring either protects its wearer from harm or makes "
"them more vulnerable to injury, to a degree dependent "
"on its power. ";
break;
case RING_PROTECTION_FROM_FIRE:
description +=
"This ring provides protection from heat and fire. ";
break;
case RING_POISON_RESISTANCE:
description +=
"This ring provides protection from the effects of poisons and venom. ";
break;
case RING_PROTECTION_FROM_COLD:
description += "This ring provides protection from cold. ";
break;
case RING_STRENGTH:
description +=
"This ring increases or decreases the physical strength "
"of its wearer, to a degree dependent on its power. ";
break;
case RING_SLAYING:
description +=
"This ring increases the hand-to-hand and missile combat "
"skills of its wearer.";
break;
case RING_SEE_INVISIBLE:
description +=
"This ring allows its wearer to see those things hidden "
"from view by magic. ";
break;
case RING_INVISIBILITY:
description +=
"This powerful ring can be activated to hide its wearer "
"from the view of others, but increases the speed of his "
"or her metabolism greatly while doing so. ";
break;
case RING_HUNGER:
description +=
"This accursed ring causes its wearer to hunger "
"considerably more quickly. ";
break;
case RING_TELEPORTATION:
description +=
"This ring occasionally exerts its power to randomly "
"translocate its wearer to another place, and can be "
"deliberately activated for the same effect. ";
break;
case RING_EVASION:
description +=
"This ring makes its wearer either more or less capable "
"of avoiding attacks, depending on its degree "
"of enchantment. ";
break;
case RING_SUSTAIN_ABILITIES:
description +=
"This ring protects its wearer from the loss of their "
"strength, dexterity and intelligence. ";
break;
case RING_SUSTENANCE:
description +=
"This ring provides energy to its wearer, so that they "
"need eat less often. ";
break;
case RING_DEXTERITY:
description +=
"This ring increases or decreases the dexterity of its "
"wearer, depending on the degree to which it has been "
"enchanted. ";
break;
case RING_INTELLIGENCE:
description +=
"This ring increases or decreases the mental ability of "
"its wearer, depending on the degree to which it has "
"been enchanted. ";
break;
case RING_WIZARDRY:
description +=
"This ring increases the ability of its wearer to use "
"magical spells. ";
break;
case RING_MAGICAL_POWER:
description +=
"This ring increases its wearer's reserves of magical "
"power. ";
break;
case RING_LEVITATION:
description +=
"This ring allows its wearer to hover above the floor. ";
break;
case RING_LIFE_PROTECTION:
description +=
"This blessed ring protects the life-force of its wearer "
"from negative energy, making them partially immune to "
"the draining effects of undead and necromantic magic. ";
break;
case RING_PROTECTION_FROM_MAGIC:
description +=
"This ring increases its wearer's resistance to "
"hostile enchantments. ";
break;
case RING_FIRE:
description +=
"This ring brings its wearer more in contact with "
"the powers of fire. He or she gains resistance to "
"heat and can use fire magic more effectively, but "
"becomes more vulnerable to the effects of cold. ";
break;
case RING_ICE:
description +=
"This ring brings its wearer more in contact with "
"the powers of cold and ice. He or she gains resistance "
"to cold and can use ice magic more effectively, but "
"becomes more vulnerable to the effects of fire. ";
break;
case RING_TELEPORT_CONTROL:
description += "This ring allows its wearer to control the "
"destination of any teleportation, although without "
"perfect accuracy. Trying to teleport into a solid "
"object will result in a random teleportation, at "
"least in the case of a normal teleportation. Also "
"be wary that controlled teleports will contaminate "
"the subject with residual magical energy.";
break;
case AMU_RAGE:
description +=
"This amulet enables its wearer to attempt to enter "
"a state of berserk rage, and increases their chance "
"of successfully doing so. It also partially protects "
"the user from passing out when coming out of that rage. ";
break;
case AMU_RESIST_SLOW:
description +=
"This amulet protects its wearer from some magically "
"induced forms of slowness, and increases the duration "
"of enchantments which speed his or her actions. ";
break;
case AMU_CLARITY:
description +=
"This amulet protects its wearer from some forms of "
"mental confusion. ";
break;
case AMU_WARDING:
description +=
"This amulet repels some of the attacks of creatures "
"which have been magically summoned. ";
break;
case AMU_RESIST_CORROSION:
description +=
"This amulet protects the armour and weaponry of its "
"wearer from corrosion caused by acids, although not "
"infallibly so. ";
break;
case AMU_THE_GOURMAND:
description +=
"This amulet allows its wearer to consume meat in "
"various states of decay without suffering unduly as "
"a result. Poisonous or cursed flesh is still not "
"recommended. ";
break;
case AMU_CONSERVATION:
description +=
"This amulet protects some of the possessions of "
"its wearer from outright destruction, but not "
"infallibly so. ";
break;
case AMU_CONTROLLED_FLIGHT:
description +=
"Should the wearer of this amulet be levitated "
"by magical means, he or she will be able to exercise "
"some control over the resulting motion. This allows "
"the descent of staircases and the retrieval of items "
"lying on the ground, for example, but does not "
"deprive the wearer of the benefits of levitation. ";
break;
case AMU_INACCURACY:
description +=
"This amulet makes its wearer less accurate in hand combat. ";
break;
case AMU_RESIST_MUTATION:
description +=
"This amulet protects its wearer from mutations, "
"although not infallibly so. ";
break;
default:
DEBUGSTR("Unknown jewellery");
}
description += "$";
}
if ((verbose == 1 || is_random_artefact( item ))
&& item_ident( item, ISFLAG_KNOW_PLUSES ))
{
// Explicit description of ring power (useful for randarts)
// Note that for randarts we'll print out the pluses even
// in the case that its zero, just to avoid confusion. -- bwr
if (item.plus != 0
|| (item.sub_type == RING_SLAYING && item.plus2 != 0)
|| is_random_artefact( item ))
{
switch (item.sub_type)
{
case RING_PROTECTION:
description += "$It affects your AC (";
append_value( description, item.plus, true );
description += ").";
break;
case RING_EVASION:
description += "$It affects your evasion (";
append_value( description, item.plus, true );
description += ").";
break;
case RING_STRENGTH:
description += "$It affects your strength (";
append_value( description, item.plus, true );
description += ").";
break;
case RING_INTELLIGENCE:
description += "$It affects your intelligence (";
append_value( description, item.plus, true );
description += ").";
break;
case RING_DEXTERITY:
description += "$It affects your dexterity (";
append_value( description, item.plus, true );
description += ").";
break;
case RING_SLAYING:
if (item.plus != 0 || is_random_artefact( item ))
{
description += "$It affects your accuracy (";
append_value( description, item.plus, true );
description += ").";
}
if (item.plus2 != 0 || is_random_artefact( item ))
{
description += "$It affects your damage-dealing abilities (";
append_value( description, item.plus2, true );
description += ").";
}
break;
default:
break;
}
}
}
// randart properties
if (is_random_artefact( item ))
{
if (item_ident( item, ISFLAG_KNOW_PROPERTIES ))
randart_descpr( description, item );
else if (item_ident( item, ISFLAG_KNOW_TYPE ))
{
if (item.sub_type >= AMU_RAGE)
description += "$This amulet may have hidden properties.$";
else
description += "$This ring may have hidden properties.$";
}
}
if (item_known_cursed( item ))
{
description += "$It has a curse placed upon it.";
}
return (description);
} // end describe_jewellery()
//---------------------------------------------------------------
//
// describe_staff
//
//---------------------------------------------------------------
static std::string describe_staff( const item_def &item )
{
std::string description;
description.reserve(200);
if (item_ident( item, ISFLAG_KNOW_TYPE ))
{
// NB: the leading space is here {dlb}
description += "This " + std::string( item_is_staff( item ) ? "staff "
: "rod " );
switch (item.sub_type)
{
case STAFF_WIZARDRY:
description +=
"increases the magical proficiency of its wielder by "
"a considerable degree, increasing the power of their spells. ";
break;
case STAFF_POWER:
description +=
"provides a reservoir of magical power to its wielder. ";
break;
case STAFF_FIRE:
description +=
"increases the power of fire spells cast by its wielder, "
"and protects him or her from the effects of heat and fire. "
"It can burn those struck by it. ";
break;
case STAFF_COLD:
description +=
"increases the power of ice spells cast by its wielder, "
"and protects him or her from the effects of cold. It can "
"freeze those struck by it. ";
break;
case STAFF_POISON:
description +=
"increases the power of poisoning spells cast by its "
"wielder, and protects him or her from the effects of "
"poison. It can poison those struck by it. ";
break;
case STAFF_ENERGY:
description +=
"allows its wielder to cast magical spells without "
"hungering as a result. ";
break;
case STAFF_DEATH:
description +=
"increases the power of necromantic spells cast by its "
"wielder. It can cause great pain in those living souls "
"its wielder strikes. ";
break;
case STAFF_CONJURATION:
description +=
"increases the power of conjurations cast by its wielder. ";
break;
case STAFF_ENCHANTMENT:
description +=
"increases the power of enchantments cast by its wielder. ";
break;
case STAFF_SUMMONING:
description +=
"increases the power of summonings cast by its wielder. ";
break;
case STAFF_SMITING:
description +=
"allows its wielder to smite foes from afar. The wielder "
"must be at least level four to safely use this ability, "
"which costs 4 magic points. ";
break;
case STAFF_STRIKING:
description += "allows its wielder to strike foes from afar. ";
break;
case STAFF_SPELL_SUMMONING:
description += "contains spells of summoning. ";
break;
case STAFF_WARDING:
description +=
"contains spells designed to repel one's enemies. ";
break;
case STAFF_DISCOVERY:
description +=
"contains spells which reveal various aspects of "
"an explorer's surroundings to them. ";
break;
case STAFF_AIR:
description +=
"increases the power of air spells cast by its wielder. "
"It can shock those struck by it. ";
break;
case STAFF_EARTH:
description +=
"increases the power of earth spells cast by its wielder. "
"It can crush those struck by it. ";
break;
case STAFF_CHANNELING:
description +=
"allows its caster to channel ambient magical energy for "
"his or her own purposes. ";
break;
default:
description +=
"contains spells of mayhem and destruction. ";
break;
}
if (item_is_rod( item ))
{
description +=
"Casting a spell from it consumes no food, and will not fail.$";
}
else
{
description +=
"$$Damage rating: 7 $Accuracy rating: +6 $Attack delay: 120%%";
description += "$$It falls into the 'staves' category. ";
}
}
else
{
description += "A stick imbued with magical properties.$";
}
return (description);
}
//---------------------------------------------------------------
//
// describe_misc_item
//
//---------------------------------------------------------------
static std::string describe_misc_item( const item_def &item )
{
std::string description;
description.reserve(100);
if (item_ident( item, ISFLAG_KNOW_TYPE ))
{
switch (item.sub_type)
{
case MISC_BOTTLED_EFREET:
description +=
"A mighty efreet, captured by some wizard and bound into "
"a bronze flask. Breaking the flask's seal will release it "
"to wreak havoc - possibly on you. ";
break;
case MISC_CRYSTAL_BALL_OF_SEEING:
description +=
"A magical device which allows one to see the layout of "
"their surroundings. It requires a degree of magical "
"ability to be used reliably, otherwise it can produce "
"unpredictable and possibly harmful results. ";
break;
case MISC_AIR_ELEMENTAL_FAN:
description += "A magical device for summoning air "
"elementals. It is rather unreliable, and usually requires "
"several attempts to function correctly. Using it carries "
"an element of risk, which is reduced if one is skilled in "
"the appropriate elemental magic. ";
break;
case MISC_LAMP_OF_FIRE:
description += "A magical device for summoning fire "
"elementals. It is rather unreliable, and usually "
"requires several attempts to function correctly. Using "
"it carries an element of risk, which is reduced if one "
"is skilled in the appropriate elemental magic.";
break;
case MISC_STONE_OF_EARTH_ELEMENTALS:
description += "A magical device for summoning earth "
"elementals. It is rather unreliable, and usually "
"requires several attempts to function correctly. "
"Using it carries an element of risk, which is reduced "
"if one is skilled in the appropriate elemental magic.";
break;
case MISC_LANTERN_OF_SHADOWS:
description +=
"An unholy device which calls on the powers of darkness "
"to assist its user, with a small cost attached. ";
break;
case MISC_HORN_OF_GERYON:
description +=
"The horn belonging to Geryon, guardian of the Vestibule "
"of Hell. Legends say that a mortal who desires access "
"into one of the Hells must use it in order to gain entry. ";
break;
case MISC_BOX_OF_BEASTS:
description +=
"A magical box containing many wild beasts. One may "
"allow them to escape by opening the box's lid. ";
break;
case MISC_DECK_OF_WONDERS:
description +=
"A deck of highly mysterious and magical cards. One may "
"draw a random card from it, but should be prepared to "
"suffer the possible consequences! ";
break;
case MISC_DECK_OF_SUMMONINGS:
description +=
"A deck of magical cards, depicting a range of weird and "
"wondrous creatures. ";
break;
case MISC_CRYSTAL_BALL_OF_ENERGY:
description +=
"A magical device which can be used to restore one's "
"reserves of magical energy, but the use of which carries "
"the risk of draining all of those energies completely. "
"This risk varies inversely with the proportion of their "
"maximum energy which the user possesses; a user near his "
"or her full potential will find this item most beneficial. ";
break;
case MISC_EMPTY_EBONY_CASKET:
description += "A magical box after its power is spent. ";
break;
case MISC_CRYSTAL_BALL_OF_FIXATION:
description +=
"A dangerous item which hypnotises anyone so unwise as "
"to gaze into it, leaving them helpless for a significant "
"length of time. ";
break;
case MISC_DISC_OF_STORMS:
description +=
"This extremely powerful item can unleash a destructive "
"storm of electricity. It is especially effective in the "
"hands of one skilled in air elemental magic, but cannot "
"be used by one who is not a conductor. ";
break;
case MISC_RUNE_OF_ZOT:
description +=
"A talisman which allows entry into Zot's domain. ";
break;
case MISC_DECK_OF_TRICKS:
description +=
"A deck of magical cards, full of amusing tricks. ";
break;
case MISC_DECK_OF_POWER:
description += "A deck of powerful magical cards. ";
break;
case MISC_PORTABLE_ALTAR_OF_NEMELEX:
description +=
"An altar to Nemelex Xobeh, built for easy assembly and "
"disassembly. Evoke it to place it on a clear patch of floor, "
"then pick it up again when you've finished. ";
break;
default:
DEBUGSTR("Unknown misc item (2)");
}
}
else
{
switch (item.sub_type)
{
case MISC_BOTTLED_EFREET:
description += "A heavy bronze flask, warm to the touch. ";
break;
case MISC_CRYSTAL_BALL_OF_ENERGY:
case MISC_CRYSTAL_BALL_OF_FIXATION:
case MISC_CRYSTAL_BALL_OF_SEEING:
description += "A sphere of clear crystal. ";
break;
case MISC_AIR_ELEMENTAL_FAN:
description += "A fan. ";
break;
case MISC_LAMP_OF_FIRE:
description += "A lamp. ";
break;
case MISC_STONE_OF_EARTH_ELEMENTALS:
description += "A lump of rock. ";
break;
case MISC_LANTERN_OF_SHADOWS:
description += "A strange lantern made out of ancient bones. ";
break;
case MISC_HORN_OF_GERYON:
description += "A great silver horn, radiating unholy energies. ";
break;
case MISC_BOX_OF_BEASTS:
case MISC_EMPTY_EBONY_CASKET:
description += "A small black box. I wonder what's inside? ";
break;
case MISC_DECK_OF_WONDERS:
case MISC_DECK_OF_TRICKS:
case MISC_DECK_OF_POWER:
case MISC_DECK_OF_SUMMONINGS:
description += "A deck of cards. ";
break;
case MISC_RUNE_OF_ZOT:
description += "A talisman of some sort. ";
break;
case MISC_DISC_OF_STORMS:
description += "A grey disc. ";
break;
case MISC_PORTABLE_ALTAR_OF_NEMELEX:
description +=
"An altar to Nemelex Xobeh, built for easy assembly and "
"disassembly. Evoke it to place on a clear patch of floor, "
"then pick it up again when you've finished. ";
break;
default:
DEBUGSTR("Unknown misc item");
}
}
description += "$";
return (description);
}
#if MAC
#pragma mark -
#endif
// ========================================================================
// Public Functions
// ========================================================================
bool is_dumpable_artifact( const item_def &item, char verbose)
{
bool ret = false;
if (is_random_artefact( item ) || is_fixed_artefact( item ))
{
ret = item_ident( item, ISFLAG_KNOW_PROPERTIES );
}
else if (item.base_type == OBJ_ARMOUR
&& (verbose == 1 && item_ident( item, ISFLAG_KNOW_TYPE )))
{
const int spec_ench = get_armour_ego_type( item );
ret = (spec_ench >= SPARM_RUNNING && spec_ench <= SPARM_PRESERVATION);
}
else if (item.base_type == OBJ_JEWELLERY
&& (verbose == 1
&& get_ident_type(OBJ_JEWELLERY, item.sub_type) == ID_KNOWN_TYPE))
{
ret = true;
}
return (ret);
} // end is_dumpable_artifact()
//---------------------------------------------------------------
//
// get_item_description
//
// Note that the string will include dollar signs which should
// be interpreted as carriage returns.
//
//---------------------------------------------------------------
std::string get_item_description( const item_def &item, char verbose, bool dump )
{
std::string description;
description.reserve(500);
if (!dump)
{
char str_pass[ ITEMNAME_SIZE ];
item_name( item, DESC_INVENTORY_EQUIP, str_pass );
description += std::string(str_pass);
}
description += "$$";
#if DEBUG_DIAGNOSTICS
if (!dump)
{
snprintf( info, INFO_SIZE,
"base: %d; sub: %d; plus: %d; plus2: %d; special: %ld$"
"quant: %d; colour: %d; flags: 0x%08lx$"
"x: %d; y: %d; link: %d$ident_type: %d$$",
item.base_type, item.sub_type, item.plus, item.plus2,
item.special, item.quantity, item.colour, item.flags,
item.x, item.y, item.link,
get_ident_type( item.base_type, item.sub_type ) );
description += info;
}
#endif
switch (item.base_type)
{
case OBJ_WEAPONS:
description += describe_weapon( item, verbose );
break;
case OBJ_MISSILES:
description += describe_ammo( item );
break;
case OBJ_ARMOUR:
description += describe_armour( item, verbose );
break;
case OBJ_WANDS:
description += describe_stick( item );
break;
case OBJ_FOOD:
description += describe_food( item );
break;
case OBJ_SCROLLS:
description += describe_scroll( item );
break;
case OBJ_JEWELLERY:
description += describe_jewellery( item, verbose );
break;
case OBJ_POTIONS:
description += describe_potion( item );
break;
case OBJ_STAVES:
description += describe_staff( item );
break;
case OBJ_BOOKS:
switch (item.sub_type)
{
case BOOK_DESTRUCTION:
description += "An extremely powerful but unpredictable book "
"of magic. ";
break;
case BOOK_MANUAL:
description += "A valuable book of magic which allows one to "
"practise a certain skill greatly. As it is used, it gradually "
"disintegrates and will eventually fall apart. ";
break;
default:
description += "A book of magic spells. Beware, for some of the "
"more powerful grimoires are not to be toyed with. ";
break;
}
break;
case OBJ_ORBS:
description += "Once you have escaped to the surface with "
"this invaluable artefact, your quest is complete. ";
break;
case OBJ_MISCELLANY:
description += describe_misc_item( item );
break;
case OBJ_CORPSES:
description +=
((item.sub_type == CORPSE_BODY) ? "A corpse. "
: "A decaying skeleton. ");
break;
default:
DEBUGSTR("Bad item class");
description += "This item should not exist. Mayday! Mayday! ";
}
if (verbose == 1)
{
description += "$It weighs around ";
const int mass = mass_item( item );
char item_mass[16];
itoa( mass / 10, item_mass, 10 );
for (int i = 0; i < 14; i++)
{
if (item_mass[i] == '\0')
{
item_mass[i] = '.';
item_mass[i+1] = (mass % 10) + '0';
item_mass[i+2] = '\0';
break;
}
}
description += item_mass;
description += " aum. "; // arbitrary unit of mass
}
return (description);
} // end get_item_description()
//---------------------------------------------------------------
//
// describe_item
//
// Describes all items in the game.
//
//---------------------------------------------------------------
void describe_item( const item_def &item )
{
#ifdef DOS_TERM
char buffer[3400];
gettext(25, 1, 80, 25, buffer);
window(25, 1, 80, 25);
#endif
clrscr();
std::string description = get_item_description( item, 1 );
print_description(description);
if (getch() == 0)
getch();
#ifdef DOS_TERM
puttext(25, 1, 80, 25, buffer);
window(1, 1, 80, 25);
#endif
} // end describe_item()
//---------------------------------------------------------------
//
// describe_spell
//
// Describes (most) every spell in the game.
//
//---------------------------------------------------------------
void describe_spell(int spelled)
{
std::string description;
description.reserve(500);
#ifdef DOS_TERM
char buffer[3400];
gettext(25, 1, 80, 25, buffer);
window(25, 1, 80, 25);
#endif
clrscr();
description += spell_title( spelled );
description += "$$This spell "; // NB: the leading space is here {dlb}
switch (spelled)
{
case SPELL_IDENTIFY:
description += "allows the caster to determine the properties of "
"an otherwise inscrutable magic item. ";
break;
case SPELL_TELEPORT_SELF:
description += "teleports the caster to a random location. ";
break;
case SPELL_CAUSE_FEAR:
description += "causes fear in those near to the caster. ";
break;
case SPELL_CREATE_NOISE:
description += "causes a loud noise to be heard. ";
break;
case SPELL_REMOVE_CURSE:
description += "removes curses from any items which are "
"being used by the caster. ";
break;
case SPELL_MAGIC_DART:
description += "hurls a small bolt of magical energy. ";
break;
case SPELL_FIREBALL:
description += "hurls an exploding bolt of fire. This spell "
"does not cost additional spell levels if the learner already "
"knows Delayed Fireball. ";
break;
case SPELL_DELAYED_FIREBALL:
description = "$$Successfully casting this spell gives the caster "
"the ability to instantaneously release a fireball at a later "
"time. Knowing this spell allows the learner to memorise "
"Fireball for no additional spell levels. ";
break;
case SPELL_BOLT_OF_MAGMA:
description += "hurls a sizzling bolt of molten rock. ";
break;
// spells 7 through 12 ??? {dlb}
case SPELL_CONJURE_FLAME:
description += "creates a column of roaring flame. ";
break;
case SPELL_DIG:
description += "digs a tunnel through unworked rock. ";
break;
case SPELL_BOLT_OF_FIRE:
description += "hurls a great bolt of flames. ";
break;
case SPELL_BOLT_OF_COLD:
description += "hurls a great bolt of ice and frost. ";
break;
case SPELL_LIGHTNING_BOLT:
description += "hurls a mighty bolt of lightning. "
"Although this spell inflicts less damage than "
"similar fire and ice spells, it can at once "
"rip through whole rows of creatures. ";
break;
// spells 18 and 19 ??? {dlb}
case SPELL_POLYMORPH_OTHER:
description += "randomly alters the form of another creature. ";
break;
case SPELL_SLOW:
description += "slows the actions of a creature. ";
break;
case SPELL_HASTE:
description += "speeds the actions of a creature. ";
break;
case SPELL_PARALYZE:
description += "prevents a creature from moving. ";
break;
case SPELL_CONFUSING_TOUCH:
description += "enchants the casters hands with magical energy. "
"This energy is released when the caster touches "
"a monster with their bare hands, and may induce "
"a state of confusing in the monster. ";
break;
case SPELL_CONFUSE:
description += "induces a state of bewilderment and confusion "
"in a creature's mind. ";
break;
case SPELL_SURE_BLADE:
description += "forms a mystical bond between the caster and "
"a wielded short blade, making the blade much " "easier to use. ";
break;
case SPELL_INVISIBILITY:
description += "hides a creature from the sight of others. ";
break;
case SPELL_THROW_FLAME:
description += "throws a small bolt of flame. ";
break;
case SPELL_THROW_FROST:
description += "throws a small bolt of frost. ";
break;
case SPELL_CONTROLLED_BLINK:
description +=
"allows short-range translocation, with precise control. "
"Be wary that controlled teleports will cause the subject to "
"become contaminated with magical energy. ";
break;
case SPELL_FREEZING_CLOUD:
description += "conjures up a large cloud of lethally cold vapour. ";
break;
case SPELL_MEPHITIC_CLOUD:
description +=
"conjures up a large but short-lived cloud of vile fumes. ";
break;
case SPELL_RING_OF_FLAMES:
description += "surrounds the caster with a mobile ring of searing "
"flame, and keeps other fire clouds away from the caster. "
"This spell attunes the caster to the forces of fire, "
"increasing their fire magic and giving protection from fire. "
"However, it also makes them much more susceptible to the forces "
"of ice. "; // well, if it survives the fire wall it's a risk -- bwr
break;
case SPELL_RESTORE_STRENGTH:
description += "restores the physical strength of the caster. ";
break;
case SPELL_RESTORE_INTELLIGENCE:
description += "restores the intelligence of the caster. ";
break;
case SPELL_RESTORE_DEXTERITY:
description += "restores the dexterity of the caster. ";
break;
case SPELL_VENOM_BOLT:
description += "throws a bolt of poison. ";
break;
case SPELL_POISON_ARROW:
description +=
"hurls a magical arrow of the most vile and noxious toxin. "
"No living thing is completely immune to it's effects. ";
break;
case SPELL_OLGREBS_TOXIC_RADIANCE:
description +=
"bathes the caster's surroundings in poisonous green light. ";
break;
case SPELL_TELEPORT_OTHER:
description += "randomly translocates another creature. ";
break;
case SPELL_LESSER_HEALING:
description +=
"heals a small amount of damage to the caster's body. ";
break;
case SPELL_GREATER_HEALING:
description +=
"heals a large amount of damage to the caster's body. ";
break;
case SPELL_CURE_POISON_I:
description += "removes poison from the caster's system. ";
break;
case SPELL_PURIFICATION:
description += "purifies the caster's body, removing "
"poison, disease, and certain malign enchantments. ";
break;
case SPELL_DEATHS_DOOR:
description += "is extremely powerful, but carries a degree of risk. "
"It renders living casters nigh invulnerable to harm "
"for a brief period, but can bring them dangerously "
"close to death (how close depends on one's necromantic "
"abilities). The spell can be cancelled at any time by "
"any healing effect, and the caster will receive one "
"warning shortly before the spell expires. "
"Undead cannot use this spell. ";
break;
case SPELL_SELECTIVE_AMNESIA:
description += "allows the caster to selectively erase one spell "
"from memory to recapture the magical energy bound "
"up with it. Casters will be able to memorise this "
"spell should even their minds be otherwise full of "
"magic (i.e., already possessing the maximum number "
"of spells). ";
break;
case SPELL_MASS_CONFUSION:
description += "causes confusion in all who gaze upon the caster. ";
break;
case SPELL_STRIKING:
description += "hurls a small bolt of force. ";
break;
case SPELL_SMITING:
description += "smites one creature of the caster's choice. ";
break;
case SPELL_REPEL_UNDEAD:
description += "calls on a divine power to repel the unholy. ";
break;
case SPELL_HOLY_WORD:
description += "involves the intonation of a word of power "
"which repels and can destroy unholy creatures. ";
break;
case SPELL_DETECT_CURSE:
description += "alerts the caster to the presence of curses "
"on his or her possessions. ";
break;
case SPELL_SUMMON_SMALL_MAMMAL:
description += "summons one or more "
"small creatures to the caster's aid. ";
break;
case SPELL_ABJURATION_I:
description += "attempts to send hostile summoned creatures to "
"the place from whence they came, or at least "
"shorten their stay in the caster's locality. ";
break;
case SPELL_SUMMON_SCORPIONS:
description += "summons one or more "
"giant scorpions to the caster's assistance. ";
break;
case SPELL_LEVITATION:
description += "allows the caster to float in the air. ";
break;
case SPELL_BOLT_OF_DRAINING:
description += "hurls a deadly bolt of negative energy, "
"which drains the life from any living creature " "it strikes. ";
break;
case SPELL_LEHUDIBS_CRYSTAL_SPEAR:
description += "hurls a lethally sharp bolt of crystal. ";
break;
case SPELL_BOLT_OF_INACCURACY:
description += "inflicts enormous damage upon any creature struck "
"by the bolt of incandescent energy conjured into "
"existence. Unfortunately, it is very difficult to "
"aim and very rarely hits anything. Pity, that. ";
break;
case SPELL_POISONOUS_CLOUD:
description += "conjures forth a great cloud of lethal gasses. ";
break;
case SPELL_FIRE_STORM:
description += "creates a mighty storm of roaring flame. ";
break;
case SPELL_DETECT_TRAPS:
description += "reveals traps in the caster's vicinity. ";
break;
case SPELL_BLINK:
description += "randomly translocates the caster a short distance. ";
break;
case SPELL_ISKENDERUNS_MYSTIC_BLAST:
description += "throws a crackling sphere of destructive energy. ";
break;
case SPELL_SWARM:
description += "summons forth a pestilential swarm. ";
break;
case SPELL_SUMMON_HORRIBLE_THINGS:
description += "opens a gate to the Abyss and calls through "
"one or more hideous abominations from that dreadful place."
" The powers who answer this invocation require of casters "
"a portion of their intellect in exchange for this service.";
break;
case SPELL_ENSLAVEMENT:
description += "causes an otherwise hostile creature "
"to fight on your side for a while. ";
break;
case SPELL_MAGIC_MAPPING:
description += "reveals details about the caster's surroundings. ";
break;
case SPELL_HEAL_OTHER:
description += "heals another creature from a distance. ";
break;
case SPELL_ANIMATE_DEAD:
description += "causes the dead to rise up and serve the caster; "
"every corpse within a certain distance of the caster "
"is affected. By means of this spell, powerful casters "
"could press into service an army of the mindless undead. ";
break;
case SPELL_PAIN:
description += "inflicts an extremely painful injury "
"upon one living creature. ";
break;
case SPELL_EXTENSION:
description +=
"extends the duration of most beneficial enchantments "
"affecting the caster. ";
break;
case SPELL_CONTROL_UNDEAD:
description +=
"attempts to enslave any undead in the vicinity of the caster. ";
break;
case SPELL_ANIMATE_SKELETON:
description += "raises an inert skeleton to a state of unlife. ";
break;
case SPELL_VAMPIRIC_DRAINING:
description += "steals the life of a living creature and grants it "
"to the caster. Life will not be drained in excess of "
"what the caster can capably absorb. ";
break;
case SPELL_SUMMON_WRAITHS:
description +=
"calls on the powers of the undead to aid the caster. ";
break;
case SPELL_DETECT_ITEMS:
description +=
"detects any items lying about the caster's general vicinity. ";
break;
case SPELL_BORGNJORS_REVIVIFICATION:
description += "instantly heals any and all wounds suffered by the "
"caster with an attendant, but also permanently lessens his or her "
"resilience to injury -- the severity of which is dependent on "
"(and inverse to) magical skill. ";
break;
case SPELL_BURN:
description += "burns a creature. ";
break;
case SPELL_FREEZE:
description += "freezes a creature. This may temporarily slow the "
"metabolism of a cold-blooded creature. ";
break;
case SPELL_SUMMON_ELEMENTAL:
description += "calls forth "
"a spirit from the elemental planes to aid the caster. "
"A large quantity of the desired element must be "
"available; this is rarely a problem for earth and air, "
"but may be for fire or water. The elemental will usually "
"be friendly to casters -- especially those skilled in "
"the appropriate form of elemental magic.";
break;
case SPELL_OZOCUBUS_REFRIGERATION:
description += "drains the heat from the caster and her "
"surroundings, causing harm to all creatures not resistant to "
"cold. ";
break;
case SPELL_STICKY_FLAME:
description += "conjures a sticky glob of liquid fire, which will "
"adhere to and burn any creature it strikes. ";
break;
case SPELL_SUMMON_ICE_BEAST:
description += "calls forth " "a beast of ice to serve the caster. ";
break;
case SPELL_OZOCUBUS_ARMOUR:
description += "encases the caster's body in a protective layer "
"of ice, the power of which depends on his or her "
"skill with Ice magic. The caster and the caster's "
"equipment are protected from the cold, but the "
"spell will not function for casters already wearing "
"heavy armour. The effects of this spell are boosted "
"if the caster is in Ice Form. ";
break;
case SPELL_CALL_IMP:
description += "calls forth " "a minor demon from the pits of Hell. ";
break;
case SPELL_REPEL_MISSILES:
description += "reduces the chance of projectile attacks striking "
"the caster. Even powerful attacks such as "
"lightning bolts or dragon breath are affected, "
"although smaller missiles are repelled to a "
"much greater extent. ";
break;
case SPELL_BERSERKER_RAGE:
description += "sends the caster into a temporary psychotic rage. ";
break;
case SPELL_DISPEL_UNDEAD:
description +=
"inflicts a great deal of damage on an undead creature. ";
break;
// spell 86 - Guardian
// spell 87 - Pestilence
// spell 99 - Thunderbolt
// spell 100 - Flame of Cleansing
// spell 101 - Shining Light
// spell 102 - Summon Daeva
// spell 103 - Abjuration II
case SPELL_TWISTED_RESURRECTION:
description += "allows its caster to imbue a mass of deceased flesh "
"with a magical life force. Casting this spell involves "
"the assembling several corpses together; the greater "
"the combined mass of flesh available, the greater the "
"chances of success. ";
break;
case SPELL_REGENERATION:
description += "dramatically but temporarily increases the caster's "
"recuperative abilities, while also increasing the rate "
"of food consumption. ";
break;
case SPELL_BONE_SHARDS:
description += "uses the bones of a skeleton (or similar materials: "
"the rigid exoskeleton of an insect, for example) to "
"dispense a lethal spray of slicing fragments, allowing "
"its caster to dispense with conjurations in favour of "
"necromancy alone to provide a low-level yet very "
"powerful offensive spell. The use of a large and "
"heavy skeleton (by wielding it) amplifies this spell's "
"effect. ";
break;
case SPELL_BANISHMENT:
description += "banishes one creature to the Abyss. Those wishing "
"to visit that unpleasant place in person may always "
"banish themselves. ";
break;
case SPELL_CIGOTUVIS_DEGENERATION:
description +=
"mutates one creature into a pulsating mass of flesh. ";
break;
case SPELL_STING:
description += "throws a magical dart of poison. ";
break;
case SPELL_SUBLIMATION_OF_BLOOD:
description += "converts flesh, blood, and other bodily fluids "
"into magical energy. Casters may focus this spell "
"on their own bodies (which can be dangerous but "
"never directly lethal) or can wield freshly butchered "
"flesh in order to draw power into themselves. ";
break;
case SPELL_TUKIMAS_DANCE:
description += "causes a weapon held in the caster's hand to dance "
"into the air and strike the caster's enemies. It will "
"not function on magical staves and certain "
"willful artefacts. ";
break;
case SPELL_HELLFIRE: // basically, a debug message {dlb}
description += "should only be available from Dispater's staff. "
"So how are you reading this? (describe.cc)";
break;
case SPELL_SUMMON_DEMON:
description += "opens a gate to the realm of Pandemonium "
"and draws forth one of its inhabitants "
"to serve the caster for a time. ";
break;
case SPELL_DEMONIC_HORDE:
description += "calls forth "
"a small swarm of small demons "
"to do battle with the caster's foes. ";
break;
case SPELL_SUMMON_GREATER_DEMON:
description += "calls forth one of the greater demons of Pandemonium "
"to serve the caster. Beware, for the spell binding it "
"to service may not outlast "
"that which binds it to this world! ";
break;
case SPELL_CORPSE_ROT:
description += "rapidly accelerates the decomposition of any "
"corpses lying around the caster, emitting in"
"process a foul miasmic vapour, which eats away "
"at the life force of any creature it envelops. ";
break;
case SPELL_TUKIMAS_VORPAL_BLADE:
description += "bestows a lethal but temporary sharpness "
"on a sword held by the caster. It will not affect "
"weapons otherwise subject to special enchantments. ";
break;
case SPELL_FIRE_BRAND:
description += "sets a weapon held by the caster ablaze. It will not "
"affect weapons otherwise subject to special enchantments. ";
break;
case SPELL_FREEZING_AURA:
description +=
"surrounds a weapon held by the caster with an aura of "
"freezing cold. It will not affect weapons which are "
"otherwise subject to special enchantments. ";
break;
case SPELL_LETHAL_INFUSION:
description += "infuses a weapon held by the caster with unholy "
"energies. It will not affect weapons which are "
"otherwise subject to special enchantments. ";
break;
case SPELL_CRUSH: // a theory of gravity in Crawl? {dlb}
description += "crushes a nearby creature with waves of "
"gravitational force. ";
break;
case SPELL_BOLT_OF_IRON:
description += "hurls "
"a large and heavy metal bolt " "at the caster's foes. ";
break;
case SPELL_STONE_ARROW:
description += "hurls "
"a sharp spine of rock outward from the caster. ";
break;
case SPELL_TOMB_OF_DOROKLOHE:
description += "entombs the caster within four walls of rock. These "
"walls will destroy most objects in their way, but "
"their growth is obstructed by the presence of any "
"creature. Beware - only the unwise cast this spell "
"without reliable means of escape. ";
break;
case SPELL_STONEMAIL:
description += "covers the caster with chunky scales of stone, "
"the durability of which depends on his or her "
"skill with Earth magic. These scales can coexist "
"with other forms of armour, but are in and of "
"themselves extremely heavy and cumbersome. The effects "
"of this spell are increased if the caster is in Statue Form. ";
break;
case SPELL_SHOCK:
description += "throws a bolt of electricity. ";
break;
case SPELL_SWIFTNESS:
description += "imbues its caster with the ability to achieve "
"great movement speeds. Flying spellcasters can move even "
"faster.";
break;
case SPELL_FLY:
description +=
"grants to the caster the ability to fly through the air. ";
break;
case SPELL_INSULATION:
description += "protects the caster from electric shocks. ";
break;
case SPELL_ORB_OF_ELECTROCUTION:
description += "hurls "
"a crackling orb of electrical energy "
"which explodes with immense force on impact. ";
break;
case SPELL_DETECT_CREATURES:
description += "allows the caster to detect any creatures "
"within a certain radius. ";
break;
case SPELL_CURE_POISON_II:
description +=
"removes some or all toxins from the caster's system. ";
break;
case SPELL_CONTROL_TELEPORT:
description += "allows the caster to control translocations. Be "
"wary that controlled teleports will cause the subject to "
"become contaminated with magical energy. ";
break;
case SPELL_POISON_AMMUNITION:
description += "envenoms missile ammunition held by the caster. ";
break;
case SPELL_POISON_WEAPON:
description +=
"temporarily coats any sharp bladed weapon with poison. Will only "
"work on weapons without an existing enchantment.";
break;
case SPELL_RESIST_POISON:
description += "protects the caster from exposure to all poisons "
"for a period of time. ";
break;
case SPELL_PROJECTED_NOISE:
description += "produces a noise emanating "
"from a place of the caster's own choosing. ";
break;
case SPELL_ALTER_SELF:
description += "causes aberrations to form in the caster's body, "
"leaving the caster in a weakened state "
"(though it is not fatal in and of itself). "
"It may fail to affect those who are already "
"heavily mutated. ";
break;
// spell 145 - debugging ray
case SPELL_RECALL:
description += "is greatly prized by summoners and necromancers, "
"as it allows the caster to recall any friendly "
"creatures nearby to a position adjacent to the caster. ";
break;
case SPELL_PORTAL:
description += "creates a gate allowing long-distance travel "
"in relatively ordinary environments "
"(i.e., the Dungeon only). The portal lasts "
"long enough for the caster and nearby creatures "
"to enter. Casters are never taken past the level "
"limits of the current area. ";
break;
case SPELL_AGONY:
description += "cuts the resilience of a target creature in half, "
"although it will never cause death directly. ";
break;
case SPELL_SPIDER_FORM:
description += "temporarily transforms the caster into a venomous, "
"spider-like creature. Spellcasting is slightly more difficult "
"in this form. This spell is not powerful enough to allow "
"the caster to slip out of cursed equipment. ";
break;
case SPELL_DISRUPT:
description += "disrupts space around another creature, "
"causing injury.";
break;
case SPELL_DISINTEGRATE:
description += "violently rends apart anything in a small volume of "
"space. Can be used to cause severe damage.";
break;
case SPELL_BLADE_HANDS:
description += "causes long, scythe-shaped blades to grow "
"from the caster's hands. It makes spellcasting somewhat "
"difficult. This spell is not powerful enough to force "
"a cursed weapon from the caster's hands.";
break;
case SPELL_STATUE_FORM:
description += "temporarily transforms the caster into a "
"slow-moving (but extremely robust) stone statue. ";
break;
case SPELL_ICE_FORM:
description += "temporarily transforms the caster's body into a "
"frozen ice-creature. ";
break;
case SPELL_DRAGON_FORM:
description += "temporarily transforms the caster into a "
"great, fire-breathing dragon. ";
break;
case SPELL_NECROMUTATION:
description += "first transforms the caster into a "
"semi-corporeal apparition receptive to negative energy, "
"then infuses that form with the powers of Death. "
"The caster becomes resistant to "
"cold, poison, magic and hostile negative energies. ";
break;
case SPELL_DEATH_CHANNEL:
description += "raises living creatures slain by the caster "
"into a state of unliving slavery as spectral horrors. ";
break;
case SPELL_SYMBOL_OF_TORMENT:
description += "calls on the powers of Hell to cause agonising "
"injury to any living thing in the caster's vicinity. "
"It carries within itself a degree of danger, "
"for any brave enough to invoke it, for the Symbol "
"also affects its caller and indeed will not function "
"if he or she is immune to its terrible effects. "
"Despite its ominous power, this spell is never lethal. ";
break;
case SPELL_DEFLECT_MISSILES:
description += "protects the caster from "
"any kind of projectile attack, "
"although particularly powerful attacks "
"(lightning bolts, etc.) are deflected "
"to a lesser extent than lighter missiles. ";
break;
case SPELL_ORB_OF_FRAGMENTATION:
description += "throws a heavy sphere of metal "
"which explodes on impact into a rain of "
"deadly, jagged fragments. "
"It can rip a creature to shreds, "
"but proves ineffective against heavily-armoured targets. ";
break;
case SPELL_ICE_BOLT:
description += "throws forth a chunk of ice. "
"It is particularly effective against "
"those creatures not immune to the effects of freezing, "
"but the half of its destructive potential that comes from "
"its weight and cutting edges "
"cannot be ignored by even cold-resistant creatures. ";
break;
case SPELL_ICE_STORM:
description += "conjures forth "
"a raging blizzard of ice, sleet and freezing gasses. ";
break;
case SPELL_ARC:
description += "zaps at random a nearby creature with a powerful "
"electrical current.";
break;
case SPELL_AIRSTRIKE: // jet planes in Crawl ??? {dlb}
description +=
"causes the air around a creature to twist itself into "
"a whirling vortex of meteorological fury. ";
break;
case SPELL_SHADOW_CREATURES:
description += "weaves a creature from shadows and threads of "
"Abyssal matter. The creature thus brought into "
"existence will recreate some type of creature "
"found in the caster's immediate vicinity. "
"The spell even creates appropriate equipment for "
"the creature, which are given a lasting substance "
//jmf: if also conjuration:
//"by the spell's conjuration component. ";
//jmf: else:
"by their firm contact with reality. ";
break;
//jmf: new spells
case SPELL_FLAME_TONGUE:
description += "creates a short burst of flame.";
break;
case SPELL_PASSWALL:
description += "tunes the caster's body such that it can instantly "
"pass through solid rock. This can be dangerous, "
"since it is possible for the spell to expire while "
"the caster is en route, and it also takes time for the "
"caster to attune to the rock, during which time they will "
"be helpless. ";
break;
case SPELL_IGNITE_POISON:
description += "attempts to convert all poison within the caster's "
"view into liquid flame. It is very effective against "
"poisonous creatures or those carrying poison potions. "
"It is also an amazingly painful way to eliminate "
"poison from one's own system. ";
break;
case SPELL_STICKS_TO_SNAKES: // FIXME: description sucks
description += "uses wooden items in the caster's grasp as raw "
"material for a powerful summoning. Note that highly "
"enchanted items, such as wizard's staves, will not be "
"affected. ";
// "Good examples of sticks include arrows, quarterstaves and clubs.";
break;
case SPELL_SUMMON_LARGE_MAMMAL:
description += "summons a canine to the caster's aid.";
break;
case SPELL_SUMMON_DRAGON: //jmf: reworking, currently unavailable
description += "summons and binds a powerful dragon to perform the "
"caster's bidding. Beware, for the summons may succeed "
"even as the binding fails. ";
break;
case SPELL_TAME_BEASTS:
description += "attempts to tame animals in the caster's vicinity. "
"It works best on animals amenable to domestication. ";
break;
case SPELL_SLEEP:
description += "tries to lower its target's metabolic rate, "
"inducing hypothermic hibernation. It may have side effects "
"on cold-blooded creatures. ";
break;
case SPELL_MASS_SLEEP:
description += "tries to lower the metabolic rate of every creature "
"within the caster's view enough to induce hypothermic hibernation. "
"It may have side effects on cold-blooded creatures. ";
break;
/* ******************************************************************
// not implemented {dlb}:
case SPELL_DETECT_MAGIC:
description += "probes one or more items lying nearby for enchantment. "
"An experienced diviner may glean additional information. ";
break;
****************************************************************** */
case SPELL_DETECT_SECRET_DOORS:
description += "is beloved by lazy dungeoneers everywhere, for it can "
"greatly reduce time-consuming searches. ";
break;
case SPELL_SEE_INVISIBLE:
description += "enables the caster to perceive things that are "
"shielded from ordinary sight. ";
break;
case SPELL_FORESCRY:
description += "makes the caster aware of the immediate future; "
"while not far enough to predict the result of a "
"fight, it does give the caster ample time to get "
"out of the way of a punch (reflexes allowing). ";
break;
case SPELL_SUMMON_BUTTERFLIES:
description +=
"creates a shower of colourful butterflies. How pretty!";
break;
case SPELL_WARP_BRAND:
description += "temporarily binds a localized warp field to the "
"invoker's weapon. This spell is very dangerous to cast, "
"as the field is likely to effect the caster as well. ";
break;
case SPELL_SILENCE:
description += "eliminates all sound near the caster. This makes "
"reading scrolls, casting spells, praying or yelling "
"in the caster's vicinity impossible. (Applies to "
"caster too, of course.) This spell will not hide your "
"presence, since its oppressive, unnatural effect "
"will almost certainly alert any living creature that something "
"is very wrong. ";
break;
case SPELL_SHATTER:
description +=
"causes a burst of concussive force around the caster, "
"which will damage most creatures, although those "
"composed of stone, metal or crystal, or otherwise "
"brittle, will particularly suffer. The magic has been "
"known to adversely affect walls. ";
break;
case SPELL_DISPERSAL:
description += "tries to teleport away any monsters directly beside "
"the caster. ";
break;
case SPELL_DISCHARGE:
description += "releases electric charges against those "
"next to the caster. These may arc to "
"adjacent monsters (or even the caster) before "
"they eventually ground out. ";
break;
case SPELL_BEND:
description +=
"applies a localized spatial distortion to the detriment"
" of some nearby creature. ";
break;
case SPELL_BACKLIGHT:
description += "causes a halo of glowing light to surround and "
"effectively outline a creature. This glow offsets "
"the dark, musty atmosphere of the dungeon, and "
"thereby makes the affected creature appreciably easier to hit.";
break;
case SPELL_INTOXICATE:
description += "works by converting a small portion of brain matter "
"into alcohol. It affects all intelligent humanoids within "
"the caster's view (presumably including the caster). It "
"is frequently used as an icebreaker at wizard parties. ";
break;
case SPELL_GLAMOUR: // intended only as Grey Elf ability
description += "is an Elvish magic, which draws upon the viewing "
"creature's credulity and the caster's comeliness "
"to charm, confuse or render comatose. ";
break;
case SPELL_EVAPORATE:
description += "heats a potion causing it to explode into a large "
"cloud when thrown. The potion must be thrown immediately, "
"as part of the spell, for this to work. ";
break;
case SPELL_FULSOME_DISTILLATION:
description += "extracts the vile and poisonous essences from a "
"corpse. A rotten corpse may produce a stronger potion."
"$$You probably don't want to drink the results. ";
break;
/* ******************************************************************
// not implemented {dlb}:
case SPELL_ERINGYAS_SURPRISING_BOUQUET:
description += "transmutes any wooden items in the caster's grasp "
"into a bouquet of beautiful flowers. ";
break;
****************************************************************** */
case SPELL_FRAGMENTATION:
description +=
"creates a concussive explosion within a large body of "
"rock (or other hard material), to the detriment of "
"any who happen to be standing nearby. ";
break;
case SPELL_AIR_WALK:
description += "transforms the caster's body into an insubstantial "
"cloud. The caster becomes immaterial and nearly immune "
"to physical harm, but is vulnerable to magical fire "
"and ice. While insubstantial the caster is, of course, "
"unable to interact with physical objects (but may still "
"cast spells). ";
break;
case SPELL_SANDBLAST:
description += "creates a short blast of high-velocity particles. "
"It works best when the caster provides some source "
"(by wielding a stone), but will do what it can with "
"whatever ambient grit is available. ";
break;
case SPELL_ROTTING:
description += "causes the flesh of all those near the caster to "
"rot. It will affect the living and many of the "
"corporeal undead. ";
break;
case SPELL_SHUGGOTH_SEED:
description += "implants a shuggoth seed, the larval parasitic form "
"of the fearsome shuggoth, in a living host. The "
"shuggoth seed will draw life from its host and then "
"hatch, whereupon a fully grown shuggoth will burst "
"from the unfortunate host's chest. ";
break;
case SPELL_MAXWELLS_SILVER_HAMMER:
description += "bestows a lethal but temporary gravitic field "
"to a crushing implement held by the caster. "
"It will not affect weapons otherwise subject to "
"special enchantments. ";
break;
case SPELL_CONDENSATION_SHIELD:
description += "causes a disc of dense vapour to condense out of the "
"air surrounding the caster. It acts like a normal "
"shield, but its density (and therefore stopping power) "
"depends upon the caster's skill with Ice Magic. The "
"disc is controlled by the caster's mind and thus will "
"not conflict with the wielding of a two-handed weapon. ";
break;
case SPELL_STONESKIN:
description += "hardens the one's skin to a degree determined "
"by one's skill in Earth Magic. This only works on relatively "
"normal flesh; it will aid neither the undead nor the bodily "
"transformed. The effects of this spell are boosted if the "
"caster is in Statue Form. ";
break;
case SPELL_SIMULACRUM:
description += "uses a piece of a flesh in hand to create a replica "
"of the original being out of ice. This magic is "
"unstable so eventually the replica will sublimate "
"into a freezing cloud, if it isn't hacked or melted "
"into a small puddle of water first. ";
break;
case SPELL_CONJURE_BALL_LIGHTNING:
description += "allows the conjurer to create ball lightning. "
"Using the spell is not without risk - ball lighting "
"can be difficult to control. ";
break;
case SPELL_TWIST:
description += "causes a slight spatial distortion around a monster "
"in line of sight of the caster, causing injury. ";
break;
case SPELL_FAR_STRIKE:
description += "allows the caster to transfer the force of a "
"weapon strike to any target the caster can see. "
"This spell will only deliver the impact of the blow; "
"magical side-effects and enchantments cannot be "
"transferred in this way. The force transferred by "
"this spell has little to do with one's skill with "
"weapons, and more to do with personal strength, "
"translocation skill, and magic ability. ";
break;
case SPELL_SWAP:
description += "allows the caster to swap positions with an adjacent "
"being. ";
break;
case SPELL_APPORTATION:
description += "allows the caster to pull the top item or group of "
"similar items from a distant pile to the floor "
"near the caster. The mass of the target item(s) will "
"make the task more difficult, with some items too "
"massive to ever be moved by this spell. Using this "
"spell on a group of items can be risky; insufficient "
"power will cause some of the items to be lost in the "
"infinite void.";
break;
default:
DEBUGSTR("Bad spell");
description += "apparently does not exist. "
"Casting it may therefore be unwise. "
#if DEBUG
"Instead, go fix it. ";
#else
"Please contact Dungeon Tech Support "
"at /dev/null for details. ";
#endif // DEBUG
}
print_description(description);
if (getch() == 0)
getch();
#ifdef DOS_TERM
puttext(25, 1, 80, 25, buffer);
window(1, 1, 80, 25);
#endif
} // end describe_spell()
//---------------------------------------------------------------
//
// describe_monsters
//
// Contains sketchy descriptions of every monster in the game.
//
//---------------------------------------------------------------
void describe_monsters(int class_described, unsigned char which_mons)
{
std::string description;
description.reserve(200);
#ifdef DOS_TERM
char buffer[3400];
gettext(25, 1, 80, 25, buffer);
window(25, 1, 80, 25);
#endif
clrscr();
description = std::string( ptr_monam( &(menv[ which_mons ]), DESC_CAP_A ) );
description += "$$";
switch (class_described)
{
// (missing) case 423 - MONS_ANOTHER_LAVA_THING ??? 15jan2000 {dlb}
// no entry in m_list.h 17jan200 {dlb}
// monster has no stats!
// mv: changed ANOTHER_LAVA_THING to SALAMANDER, added stats and
// description
// (missing) case 250 - MONS_PROGRAM_BUG ??? 16jan2000 {dlb}
case MONS_KILLER_BEE_LARVA:
description += "A small, powerless larva of killer bee.";
break;
case MONS_QUASIT:
description += "A small twisted demon with long sharply pointed tail.";
break;
case MONS_ANGEL:
description += "A winged holy being of unnatural beauty. "
"It's surrounded by aura of brilliant golden light. ";
break;
case MONS_HUMAN:
// These should only be possible from polymorphing or shapeshifting.
description += "A remarkably nondescript person. How odd!";
break;
case MONS_GIANT_ANT:
description += "A black ant with poisonous pincers,"
" about the size of a large dog.";
break;
case MONS_SOLDIER_ANT:
description += "A giant ant with large mandibles and a vicious sting.";
break;
case MONS_QUEEN_ANT:
description += "A bloated insect, covered in thick chitinous armour."
"Now you know where all those ants keep coming from!";
break;
case MONS_ANT_LARVA:
description += "A baby ant. Isn't it cute?";
break;
case MONS_GIANT_BAT:
description += "A huge black bat.";
break;
case MONS_CENTAUR:
case MONS_CENTAUR_WARRIOR:
description += "A hybrid with the torso of a "
"human atop the body of a large horse. ";
if (class_described == MONS_CENTAUR_WARRIOR)
description += "It looks strong and aggressive. ";
break;
case MONS_YAKTAUR:
case MONS_YAKTAUR_CAPTAIN:
description += "Like a centaur, but half yak. ";
if (class_described == MONS_YAKTAUR_CAPTAIN)
description += "It looks very strong and aggressive. ";
break;
case MONS_RED_DEVIL:
description += "The Red Devil is slightly shorter than a human, "
"but muscular and covered in spikes and horns. Two "
"short wings sprout from its shoulders.";
break;
case MONS_ROTTING_DEVIL:
description += "A hideous decaying form.";
if (you.species == SP_GHOUL)
description += "$It smells great!";
else if (you.species != SP_MUMMY)
description += "$It stinks.";
break;
case MONS_HAIRY_DEVIL:
description += "A small humanoid demon covered in brown hair. "
"Watch out - it may have fleas!";
break;
case MONS_ICE_DEVIL:
description += "A man-sized demon covered in glittering ice.";
break;
case MONS_BLUE_DEVIL:
description += "A strange and nasty blue thing. It looks cold.";
break;
case MONS_IRON_DEVIL:
description += "A hideous humanoid figure with metal skin.";
break;
case MONS_ETTIN:
description += "A large, two headed humanoid. Most often seen "
"wielding two weapons, so that the heads will have one less "
"thing to bicker about.";
break;
case MONS_FUNGUS:
description += "A lumpy grey fungus, "
"growing well in the dank underground dungeon.";
break;
case MONS_GOBLIN:
description += "A race of short, ugly and unfriendly humanoids.";
break;
case MONS_HOUND:
description += "A fearsome hunting dog.";
break;
case MONS_HELL_HOUND:
description += "A huge black dog, with glowing red eyes and "
"smoke pouring from its fanged mouth.";
break;
case MONS_WAR_DOG:
description += "A vicious dog, trained to kill."
"Its neck is protected by massive spiked collar.";
break;
case MONS_IMP:
description += "A small, ugly minor demon.";
break;
case MONS_JACKAL:
description += "A small, dog-like scavenger. Packs of these creatures "
"roam the underworld, searching for carrion to devour.";
break;
case MONS_KILLER_BEE:
description += "A giant bee, bearing a deadly barb which can sting "
"repeatedly.";
break;
case MONS_QUEEN_BEE:
description += "Even larger and more dangerous-looking than its "
"offspring, this creature wants you out of its hive. Now!";
break;
case MONS_BUMBLEBEE:
description += "A very large and fat hairy bee.";
break;
case MONS_MANTICORE:
description += "A hideous cross-breed, bearing the features of a "
"human and a lion, with great bat-like wings. Its tail "
"bristles with spikes, which can be loosed at potential prey.";
break;
case MONS_NECROPHAGE:
description += "A vile undead creation of the most unholy necromancy,"
" these creatures are made from the decaying corpses "
"of humanoid creatures. They exist to spread disease "
"and decay, and gain power from the decaying corpses "
"of other beings.";
break;
case MONS_GHOUL:
description += "An undead humanoid creature created from the decaying "
"corpse by some unholy means of necromancy. It "
"exists to spread disease and decay, and gains power"
"from the decaying corpses same way as necrophage does.";
break;
case MONS_ORC:
description += "An ugly subterranean race, orcs combine the"
" worst features of humans, pigs, and several"
" other unpleasant creatures.";
break;
case MONS_ORC_KNIGHT:
description += "A heavily armoured orc, covered in scars from many "
"past battles.";
break;
case MONS_ORC_PRIEST:
description += "A servant of the ancient and cruel gods of the orcs,"
" dressed in long robe. he's mumbling some strange prayers. "
"Hope that they will remain unheard.";
break;
case MONS_ORC_HIGH_PRIEST:
description += "An exalted servant of the orc god.";
break;
case MONS_ORC_SORCERER:
description += "An orc who draws magical power from Hell.";
break;
case MONS_ORC_WARLORD:
description += "A very large and strong looking orc.";
break;
case MONS_ORC_WARRIOR:
description += "An armoured orc, obviously experienced in the ways of "
"hacking other creatures apart.";
break;
case MONS_ORC_WIZARD:
description += "While orcs are generally quite stupid, occasionally"
" one develops an aptitude for magic.";
break;
case MONS_PHANTOM:
description += "A transparent man-like undead spirit.";
break;
case MONS_RAT:
description += "Rats which have grown large and aggressive in "
"the pestilential dungeon environment.";
break;
case MONS_GREY_RAT:
description += "A very large grey rat.";
break;
case MONS_GREEN_RAT:
description += "A very large rat, with hair and skin of a "
"most peculiar green colour.";
break;
case MONS_ORANGE_RAT:
description += "A huge rat, with weird knobbly orange skin."
"It glows with unholy energies. ";
break;
case MONS_SCORPION:
description += "A giant black scorpion, its body covered in thick"
" armour plating, and its tail tipped by a nasty "
"venomous sting.";
break;
/* ******************************************************************
// the tunneling worm is no more ...
// not until it can be re-implemented safely {dlb}
case MONS_TUNNELING_WORM:
case MONS_WORM_TAIL:
description += "A gargantuan worm, its huge maw capable of crushing rock into dust with little trouble.";
break;
****************************************************************** */
case MONS_BRAIN_WORM:
description += "A slimy mauve worm with a greatly distended head.";
break;
case MONS_LAVA_WORM:
description += "A vicious red worm which swims through molten rock.";
break;
case MONS_SPINY_WORM:
description += "A great black worm, its many-segmented body covered "
"in spiky plates of chitinous armour. Acidic venom drips "
"from its toothy maw.";
break;
case MONS_SWAMP_WORM:
description += "A large slimy worm, adept at swimming through the "
"muck of this foul swamp.";
break;
case MONS_WORM:
description += "A giant worm, with unusually large teeth.";
break;
case MONS_UGLY_THING:
description += "An ugly thing. Yuck.";
break;
case MONS_VERY_UGLY_THING:
description += "A very ugly thing. Double yuck.";
break;
case MONS_FIRE_VORTEX:
description += "A swirling cloud of flame.";
break;
case MONS_SPATIAL_VORTEX:
description += "A crazily shifting twist in the fabric of reality.";
break;
case MONS_ABOMINATION_SMALL:
description +=
"A hideous form, created or summoned by some arcane process.";
break;
case MONS_ABOMINATION_LARGE:
description += "A huge and hideous form, created or summoned "
"by some arcane process.";
break;
case MONS_YELLOW_WASP:
description += "A giant wasp covered with thick plates of yellow "
"chitinous armour.";
break;
case MONS_RED_WASP:
description += "A huge red wasp with a viciously barbed stinger.";
break;
case MONS_ZOMBIE_SMALL:
description += "A corpse raised to undeath by necromancy. ";
break;
case MONS_ZOMBIE_LARGE:
description += "A large corpse raised to undeath by necromancy. ";
break;
case MONS_SIMULACRUM_LARGE:
case MONS_SIMULACRUM_SMALL:
description += "An ice replica of a monster, that's animated by "
"the powers of necromancy. ";
break;
case MONS_CYCLOPS:
description += "A giant with one eye in the centre of its forehead."
" Despite their lack of binocular vision, cyclopes "
"throw boulders with fearsomely accuracy.";
break;
case MONS_DRAGON:
description += "A great reptilian beast, covered in thick green "
"scales and with two huge bat-like wings. Little trails "
"of smoke spill from its toothy maw.";
break;
case MONS_GOLDEN_DRAGON:
description += "A great dragon covered in shining golden scales. ";
break;
case MONS_ICE_DRAGON:
description +=
"Like a normal dragon, only white and covered in frost.";
break;
case MONS_IRON_DRAGON:
description += "A very heavy and apparently flightless dragon.";
break;
case MONS_MOTTLED_DRAGON:
description += "A small dragon with strangely mottled scales.";
break;
case MONS_QUICKSILVER_DRAGON:
description += "A long and sinuous dragon, seemingly more neck and "
"tail than anything else. Its skin shines like molten mercury, "
"and magical energies arc from its pointed snout.";
break;
case MONS_SHADOW_DRAGON:
description += "A great shadowy shape, radiating evil and death.";
break;
case MONS_SKELETAL_DRAGON:
description += "A huge undead abomination, pieced together from "
"the broken bones of many dragons.";
break;
case MONS_STEAM_DRAGON:
description += "A relatively small grey dragon, with steam pouring "
"from its mouth.";
break;
case MONS_STORM_DRAGON:
description += "A huge and very powerful dragon. "
"Sparks crackle along its enormous scaly wings.";
break;
case MONS_SWAMP_DRAGON:
description += "A slimy dragon, covered in swamp muck. "
"Poisonous gasses dribble from its snout.";
break;
case MONS_SERPENT_OF_HELL:
description += "A huge red glowing dragon, burning with hellfire. ";
break;
case MONS_SWAMP_DRAKE:
description += "A small and slimy dragon, covered in swamp muck. ";
if (you.species != SP_MUMMY)
description += "It smells horrible.";
break;
case MONS_FIREDRAKE:
description += "A small dragon, puffing clouds of smoke.";
break;
case MONS_TWO_HEADED_OGRE:
description += "A huge ogre with two heads on top of a "
"bloated ogre body. It is capable of holding a weapon "
"in each giant hand.";
break;
case MONS_FIEND:
description += "One of the most fearsome denizens of any Hell. "
"A huge and powerful demon wreathed in hellfire,"
" with great scaly wings.";
break;
case MONS_ICE_FIEND:
description += "One of the most terrible denizens of the "
"many Hells, the Ice Fiend is a huge icy figure, "
"covered in frost and wreathed in freezing air.";
break;
case MONS_SHADOW_FIEND:
description += "One of the most terrible denizens of the many Hells, "
"this horrible being appears as a great mass of "
"writhing shadows which occasionally reveal a huge, "
"horned skeleton.";
break;
case MONS_GIANT_SPORE:
description += "A volatile floating ball of spores, "
"covered in knobbly rhizome growths.";
break;
case MONS_HOBGOBLIN:
description += "A larger and stronger relatives of goblins.";
break;
case MONS_ICE_BEAST:
description +=
"A terrible creature, formed of snow and crystalline ice. "
"Its feet leave puddles of icy water on the floor.";
break;
case MONS_KOBOLD:
description += "Reputedly the creation of an ancient demon-god, "
"kobolds are small goblin-like creatures with canine heads.";
break;
case MONS_BIG_KOBOLD:
description += "An unusually large kobold.";
break;
case MONS_KOBOLD_DEMONOLOGIST:
description += "A kobold who has learned to summon and direct demons.";
break;
case MONS_LICH:
description +=
"A wizard who didn't want to die, a Lich is a skeletal,"
" desiccated corpse kept alive by a mighty exercise of "
"necromancy. These undead creatures can wield great "
"magic and are best avoided by all but the most confident.";
break;
case MONS_ANCIENT_LICH:
description += "A lich who has grown mighty over countless years. ";
break;
case MONS_MUMMY:
description += "An undead figure covered in "
"bandages and embalming fluids, "
"compelled to walk by an ancient curse. "
"It radiates a malign aura to those who intrude on its domain. ";
break;
case MONS_GUARDIAN_MUMMY:
description += "An ancient warrior, embalmed "
"and cursed to walk in undeath for eternity.";
break;
case MONS_GREATER_MUMMY:
case MONS_MUMMY_PRIEST:
description += "The embalmed and undead corpse of an ancient ";
if (class_described == MONS_GREATER_MUMMY)
description += "ruler";
else
description += "servant of darkness";
description += ".";
break;
case MONS_NAGA:
case MONS_NAGA_MAGE:
case MONS_NAGA_WARRIOR:
case MONS_GUARDIAN_NAGA:
case MONS_GREATER_NAGA:
if (you.species == SP_NAGA)
description = "An attractive";
else
description = "A strange";
description += " hybrid; human from the chest up,"
" with a scaly, muscular torso trailing off like "
" that of a snake. ";
switch (class_described)
{
case MONS_GUARDIAN_NAGA:
description += "These nagas are "
"often used as guardians by powerful creatures.";
break;
case MONS_GREATER_NAGA:
description += "It looks strong and aggressive.";
break;
case MONS_NAGA_MAGE:
description += "An eldritch nimbus trails its motions. ";
break;
case MONS_NAGA_WARRIOR:
description += "It bears scars of many past battles. ";
break;
}
break;
case MONS_OGRE:
description += "A larger, uglier and fatter relative "
"of orcs and goblins.";
break;
case MONS_OGRE_MAGE:
description += "A rare breed of ogre, skilled in the use of magic.";
break;
case MONS_PLANT:
description += "Few plants can grow in the unpleasant dungeon "
"environment, but some have managed to adapt and even thrive "
"underground in the absence of the sun.";
break;
case MONS_OKLOB_PLANT:
description += "A vicious plant, dripping with vitriol.";
break;
case MONS_RAKSHASA:
case MONS_RAKSHASA_FAKE:
description += "A type of demon who comes to the material world in "
"search of power and knowledge. Rakshasas are experts"
" in the art of illusion, among other things.";
break;
case MONS_SNAKE:
description += "The common dungeon snake. ";
break;
case MONS_BLACK_SNAKE:
description += "A large black snake. ";
break;
case MONS_BROWN_SNAKE:
description += "A large brown snake.";
break;
case MONS_GREY_SNAKE:
description += "A very large grey python.";
break;
case MONS_LAVA_SNAKE:
description += "A burning red snake which rears up from pools "
"of lava and tries to bite you.";
break;
case MONS_SMALL_SNAKE:
description += "The lesser dungeon snake.";
break;
case MONS_YELLOW_SNAKE:
description += "A large yellow tubular reptile.";
break;
case MONS_GIANT_NEWT:
description += "Several times the size of a normal newt, but still "
"not really impressive.";
break;
case MONS_GIANT_GECKO:
description += "A lizard with pads on its toes allowing it to cling "
"to walls and ceilings. It's much larger than a normal gecko... "
"perhaps it's something in the water?";
break;
case MONS_GIANT_IGUANA:
case MONS_GIANT_LIZARD:
description += "A huge lizard with great crunching jaws.";
break;
case MONS_GILA_MONSTER:
description += "A large lizard with brightly coloured stripes and "
"splotches.";
break;
case MONS_KOMODO_DRAGON:
description += "An enormous monitor lizard. It's more than capable "
"of preying on large animals. Bits of fetid and rotting flesh "
"from its last few meals are stuck in its teeth.";
break;
case MONS_LINDWURM:
description += "A small serpentine dragon with a pair of strong "
"forelimbs. Its thick scales give off an eerie green glow.";
break;
case MONS_TROLL:
description +=
"A huge, nasty-looking creature. Its thick and knobbly hide "
"seems to heal almost instantly from most wounds.";
break;
case MONS_DEEP_TROLL:
description += "A stooped troll.";
break;
case MONS_IRON_TROLL:
description +=
"A great troll, plated with thick scales of rusty iron.";
// you can't see its hide, but think it's thick and kobbly, too :P {dlb}
//jmf: I thought its skin *was* the rusty iron. If so, ought to change
// shatter_monsters in spells4.cc.
break;
case MONS_ROCK_TROLL:
description +=
"An enormous and very nasty-looking humanoid creature. Its "
"rocky hide seems to heal almost instantaneously from most wounds.";
break;
case MONS_UNSEEN_HORROR:
description +=
"These creatures are usually unseen by the eyes of most,"
" and those few who have seen them would rather not have.";
break;
case MONS_VAMPIRE:
description += "A powerful undead.";
if (you.is_undead == US_ALIVE)
description += " It wants to drink your blood! ";
break;
case MONS_VAMPIRE_KNIGHT:
description +=
"A powerful warrior, with skills undiminished by undeath.";
if (you.is_undead == US_ALIVE)
description += " It wants to drink your blood! ";
break;
case MONS_VAMPIRE_MAGE:
description += "Undeath has not lessened this powerful mage.";
if (you.is_undead == US_ALIVE)
description += " It wants to drink your blood! ";
break;
case MONS_WRAITH:
description += "This undead spirit appears as a cloud of black mist "
"surrounding an insubstantial skeletal form. Its eyes "
"burn bright with unholy malevolence.";
break;
case MONS_FREEZING_WRAITH:
description += "A cloud of freezing air surrounding an incorporeal "
"skeletal form.";
break;
case MONS_SHADOW_WRAITH:
description += "A mist-wreathed skeletal shadow hanging in mid-air, "
"this creature is almost invisible even to your enhanced sight. ";
// assumes: to read this message, has see invis
break;
case MONS_YAK:
description += "The common dungeon yak, covered in shaggy yak hair "
"and bearing a nasty pair of yak horns.";
break;
case MONS_DEATH_YAK:
description += "A larger and beefier relative of the common dungeon "
"yak. Its little red eyes gleam with hunger for living flesh.";
break;
case MONS_WYVERN:
description += "A dragon-like creature with long sharply pointed tail."
" Although smaller and less formidable than true dragons, "
"wyverns are nonetheless a foe to be reckoned with.";
break;
case MONS_GIANT_EYEBALL:
description += "A giant eyeball, with a captivating stare.";
break;
case MONS_GREAT_ORB_OF_EYES:
description += "A levitating ball, covered in malignant eyes.";
break;
case MONS_EYE_OF_DEVASTATION:
description += "A huge eyeball, encased in a levitating globe of "
"incandescent energy. ";
break;
case MONS_SHINING_EYE:
description += "A huge and strangely deformed eyeball, "
"pulsating with light. "
"Beauty is certainly nowhere to be found " "in this beholder. ";
break;
case MONS_EYE_OF_DRAINING:
description +=
"These hovering horrors are especially loathed by wizards.";
break;
case MONS_WIGHT:
description += "An ancient warrior, kept in a state of undeath "
"by its will to live.";
break;
case MONS_WOLF_SPIDER:
description += "A large hairy spider with vicious mandibles, "
"roaming the dungeon in search of food.";
break;
case MONS_REDBACK:
description += "A vicious black spider with a splash of red on its "
"swollen abdomen. Its mandibles drip with lethal poison.";
break;
case MONS_SHADOW:
description +=
"An wisp of unliving shadow, drifting on the edge of vision.";
break;
case MONS_HUNGRY_GHOST:
description += "The undead form of someone who died of starvation,"
" this creature wants the same thing to happen to you!";
break;
case MONS_BUTTERFLY:
description += "A large multicoloured butterfly with beautifully "
"patterned wings.";
break;
case MONS_WANDERING_MUSHROOM:
description += "A large, fat mushroom.";
break;
case MONS_EFREET:
description +=
"A huge and muscular figure engulfed in a cloud of searing flame.";
break;
case MONS_GIANT_ORANGE_BRAIN:
description += "A huge wrinkled brain, floating just off the floor."
" Every now and then it seems to pulsate.";
break;
case MONS_GIANT_BEETLE:
description += "A huge black beetle with great crunching mandibles "
"and very hard chitinous armour.";
break;
case MONS_BORING_BEETLE:
description +=
"A large brown beetle with huge, rock-crushing mandibles.";
break;
case MONS_BOULDER_BEETLE:
description +=
"A huge grey beetle with an almost impenetrable rocky carapace.";
break;
case MONS_FLYING_SKULL:
description +=
"Unholy magic keeps a disembodied undead skull hovering "
"above the floor. It has a nasty set of teeth.";
break;
case MONS_MINOTAUR:
description += "A large muscular human with the head of a bull. "
"It makes its home in secluded labyrinths.";
break;
case MONS_SLIME_CREATURE:
description +=
"An icky glob of slime, which slithers along the ground.";
break;
case MONS_HELLION:
description += "A frightful demon, covered in roaring hellfire.";
break;
case MONS_TORMENTOR:
description += "This malign devil is covered in all manner "
"of claws, spines and cruel hooks.";
break;
case MONS_REAPER:
description += "A skeletal form wielding a giant scythe. ";
if (you.is_undead == US_ALIVE)
description += "It has come for your soul!";
break;
case MONS_SOUL_EATER:
description +=
"This greater demon looks like a shadow gliding through "
"the air towards you. It radiates an intense aura of negative power.";
break;
case MONS_BEAST:
description += "A weird and hideous cross between beast and human.";
break;
case MONS_GLOWING_SHAPESHIFTER:
description += "A shapeshifter who has lost control over its "
"transformations, and is constantly changing form.";
break;
case MONS_SHAPESHIFTER:
description += "A weird creature with the power to change its form. "
"It is very rarely observed alive in its natural state.";
break;
case MONS_GIANT_MITE:
description += "A large arachnid with vicious poisoned mouth-parts.";
break;
case MONS_GRIFFON:
case MONS_HIPPOGRIFF:
description += "A large creature with the hindquarters of a ";
if (class_described == MONS_HIPPOGRIFF)
description += "horse";
else
description += "lion";
description += " and the wings, head, and talons of a great eagle. ";
break;
case MONS_HYDRA:
description +=
"A great reptilian beast, distantly related to the dragon."
" It has many heads, and the potential to grow many more!";
break;
case MONS_SKELETON_SMALL: //MONS_SMALL_SKELETON:
case MONS_SKELETON_LARGE: //MONS_LARGE_SKELETON:
description +=
"A skeleton compelled to unlife by the exercise of necromancy.";
break;
case MONS_SKELETAL_WARRIOR:
description += "The vicious and heavily armed skeleton of a humanoid "
"creature, animated by unholy power.";
break;
case MONS_HELL_KNIGHT:
description += "A heavily armoured warrior, in league with the powers"
" of Hell.";
break;
case MONS_WIZARD:
description += "An rather eccentric person, dabbling in all sorts of"
" arcanities.";
break;
case MONS_NECROMANCER:
description +=
"A wizard specializing in the practices of necromantic magic.";
break;
case MONS_GNOLL:
description +=
"A taller and better equipt relative of goblins and orcs.";
break;
case MONS_CLAY_GOLEM:
description += "A huge animated clay statue.";
break;
case MONS_WOOD_GOLEM:
description += "An animated wooden statue.";
break;
case MONS_STONE_GOLEM:
description += "A huge animated stone statue.";
break;
case MONS_IRON_GOLEM:
description += "A huge animated metal statue.";
break;
case MONS_CRYSTAL_GOLEM:
description += "A huge animated crystal statue.";
break;
case MONS_TOENAIL_GOLEM:
description += "A huge animated statue made entirely from toenail "
"clippings. Some people just have too much time on their hands.";
break;
case MONS_ELECTRIC_GOLEM:
description += "An animated figure made completely of electricity. ";
break;
case MONS_EARTH_ELEMENTAL:
description += "A spirit drawn from the elemental plane of earth, "
"which exists in this world by inhabiting a lump of earth and rocks.";
break;
case MONS_FIRE_ELEMENTAL:
description += "A spirit drawn from the elemental plane of fire, "
"which exists in this world as a brilliant column of raging flames.";
break;
case MONS_AIR_ELEMENTAL:
description += "A spirit drawn from the elemental plane of air. "
"It exists in this world as a swirling vortex of air, "
"often dissipating and reforming.";
break;
case MONS_WATER_ELEMENTAL:
description += "A spirit drawn from the elemental plane of water. "
"It exists on this world as part of a body of water.";
break;
case MONS_SPECTRAL_WARRIOR: // spectre
description += "A hideous translucent green undead spirit.";
break;
case MONS_CURSE_TOE:
description += "A disembodied toe, hanging in the air and"
" radiating an intense field of negative energy.";
break;
case MONS_PULSATING_LUMP:
description += "A revolting glob of writhing flesh.";
break;
case MONS_OOZE:
description += "A disgusting glob of grey sludge.";
break;
case MONS_BROWN_OOZE:
description += "A viscous liquid, flowing along the floor "
"in search of organic matter to corrode. ";
break;
case MONS_DEATH_OOZE:
description += "A putrid mass of decaying flesh. ";
break;
case MONS_GIANT_AMOEBA:
description += "A pulsating lump of protoplasm. ";
break;
case MONS_JELLY:
description += "A pulsating mass of acidic protoplasm. It can and "
"will eat almost anything, and grows a little each time...";
break;
case MONS_AZURE_JELLY:
description += "A frosty blob of bright blue cytoplasm. ";
break;
case MONS_ACID_BLOB:
description +=
"A lump of sickly green flesh, dripping with lethal acid.";
break;
case MONS_JELLYFISH:
description += "A pulsating glob of transparent flesh, waiting just "
"below the surface to sting you with its many tentacles.";
break;
case MONS_ROYAL_JELLY:
description += "A particularly rich and golden gelatinous thing. ";
break;
case MONS_FIRE_GIANT:
description += "A huge ruddy humanoid with bright hair. ";
break;
case MONS_FROST_GIANT:
description += "A huge blue humanoid with hoarfrost hair.";
break;
case MONS_HILL_GIANT:
description +=
"Although one of the smaller giant varieties, this hill giant is still big enough to be dangerous.";
break;
case MONS_STONE_GIANT:
description +=
"A gigantic humanoid with grey skin almost as hard as rock. "
"It carries several boulders - are you up for a game of 'catch'?";
break;
case MONS_TITAN:
description += "This lightning-limned humanoid is unusually large "
"and powerful, even among giants.";
break;
case MONS_FLAYED_GHOST:
description += "A hideous undead creature, with torn skin hanging "
"from an emaciated body.";
break;
case MONS_INSUBSTANTIAL_WISP:
description += "A thin wisp of floating gas.";
break;
case MONS_VAPOUR:
description += "A normally invisible cloud of weird-looking vapour.";
break;
case MONS_DANCING_WEAPON:
description += "A weapon dancing in the air. ";
break;
case MONS_ELEPHANT_SLUG:
description += "A huge grey slug with folds of wrinkled skin. ";
break;
case MONS_GIANT_SLUG:
description += "A huge and disgusting gastropod. ";
break;
case MONS_GIANT_SNAIL:
description +=
"A huge and disgusting gastropod with light green shell. ";
break;
case MONS_SHEEP:
description += "A stupid woolly animal, with murder in its eyes. ";
break;
case MONS_HOG:
description += "A large, fat and very ugly pig. ";
break;
case MONS_HELL_HOG:
description += "A large, fat and very ugly pig, suckled "
"in the pits of Hell. ";
break;
case MONS_GIANT_MOSQUITO:
description += "A huge, bloated mosquito. It looks diseased.";
break;
case MONS_GIANT_CENTIPEDE:
description += "It has a lot of legs.";
break;
case MONS_GIANT_BLOWFLY:
description += "A huge and irritating fly.";
break;
case MONS_GIANT_FROG:
description +=
"It probably didn't get this big by eating little insects.";
break;
case MONS_GIANT_BROWN_FROG:
description += "A very large and vicious-looking carnivorous frog. "
"Its knobbly brown skin blends in with the rough rock of your surroundings.";
break;
case MONS_SPINY_FROG:
description +=
"Although slightly smaller than its cousin, the giant brown"
" frog, the spiny frog makes up for lack of size by being"
" covered in wickedly barbed spines and spurs.";
break;
case MONS_BLINK_FROG:
description +=
"A weird-looking frog, constantly blinking in and out of reality.";
break;
case MONS_GIANT_COCKROACH:
description += "A large brown cockroach.";
break;
case MONS_PIT_FIEND:
description += "A huge winged fiend with incredibly tough skin.";
break;
case MONS_GARGOYLE:
description += "A hideous stone statue come to life.";
break;
case MONS_METAL_GARGOYLE:
description += "A hideous metal statue come to life.";
break;
case MONS_MOLTEN_GARGOYLE:
description += "A hideous melting stone statue come to life.";
break;
case MONS_ELF:
case MONS_DEEP_ELF_SOLDIER:
case MONS_DEEP_ELF_FIGHTER:
case MONS_DEEP_ELF_KNIGHT:
case MONS_DEEP_ELF_MAGE:
case MONS_DEEP_ELF_SUMMONER:
case MONS_DEEP_ELF_CONJURER:
case MONS_DEEP_ELF_PRIEST:
case MONS_DEEP_ELF_HIGH_PRIEST:
case MONS_DEEP_ELF_DEMONOLOGIST:
case MONS_DEEP_ELF_ANNIHILATOR:
case MONS_DEEP_ELF_SORCERER:
case MONS_DEEP_ELF_DEATH_MAGE:
description +=
"One of the race of elves which inhabits this dreary cave.$";
switch (class_described)
{
case MONS_DEEP_ELF_SOLDIER:
description += "This one is just common soldier.";
break;
case MONS_DEEP_ELF_FIGHTER:
description += "This soldier has learned some magic.";
break;
case MONS_DEEP_ELF_KNIGHT:
description += "This one bears the scars of battles past.";
break;
case MONS_DEEP_ELF_MAGE:
description += "Mana crackles between this one's long fingers.";
break;
case MONS_DEEP_ELF_SUMMONER:
case MONS_DEEP_ELF_CONJURER:
description += "This one is a mage specialized in the ancient art ";
if (class_described == MONS_DEEP_ELF_SUMMONER)
description += "of summoning servants";
else
description += "of hurling energies";
description += " of destruction.";
break;
case MONS_DEEP_ELF_PRIEST:
description += "This one is a servant of the deep elves' god.";
break;
case MONS_DEEP_ELF_HIGH_PRIEST:
description +=
"This one is an exalted servant of the deep elves' god.";
break;
case MONS_DEEP_ELF_DEMONOLOGIST:
description +=
"This mage specialized in demonology, and is marked heavily "
"from long years in contact with unnatural demonic forces.";
break;
case MONS_DEEP_ELF_ANNIHILATOR:
description += "This one likes destructive magics more than most, "
"and is better at them.";
break;
case MONS_DEEP_ELF_SORCERER:
description += "This mighty spellcaster draws power from Hell.";
break;
case MONS_DEEP_ELF_DEATH_MAGE:
description += "A strong negative aura surrounds this one.";
break;
case MONS_ELF:
// These are only possible from polymorphing or shapeshifting.
description += "This one is remarkably plain looking.";
break;
}
break;
case MONS_WHITE_IMP:
description += "A small and mischievous minor demon. ";
break;
case MONS_LEMURE:
description += "A vaguely humanoid blob of putrid white flesh. ";
break;
case MONS_UFETUBUS:
description += "A chattering and shrieking minor demon. ";
break;
case MONS_MANES:
description += "An ugly, twisted little minor demon. ";
break;
case MONS_MIDGE:
description += "A small flying demon. ";
break;
case MONS_NEQOXEC:
description += "A weirdly shaped demon. ";
break;
case MONS_ORANGE_DEMON:
description += "A bright orange demon with a venomous stinger. ";
break;
case MONS_HELLWING:
description +=
"A hideous skeletal demon, with wings of ancient withered skin. ";
break;
case MONS_SMOKE_DEMON:
description += "A writhing cloud of smoke hanging in the air. ";
break;
case MONS_YNOXINUL:
description += "A demon with shiny metallic scales. ";
break;
case MONS_EXECUTIONER:
description += "A horribly powerful demon. ";
break;
case MONS_GREEN_DEATH:
description +=
"A bloated form covered in oozing sores and exhaling clouds of lethal poison. ";
break;
case MONS_BLUE_DEATH:
description += "A blue greater demon. ";
break;
case MONS_BALRUG:
description +=
"A huge and very powerful demon, wreathed in fire and shadows. ";
break;
case MONS_CACODEMON:
description += "A hideously ugly demon of rage and legendary power. ";
break;
case MONS_DEMONIC_CRAWLER:
description += "A long and bloated body, supported by "
"dozens of short legs and topped with an evil-looking head. ";
break;
case MONS_SUN_DEMON:
description +=
"A demonic figure shining with the light and fury of a fallen star.";
break;
case MONS_SHADOW_IMP:
description += "A small and shadowy minor demon.";
break;
case MONS_SHADOW_DEMON:
description += "A mysterious demonic figure,"
" constantly blurring into multiple shadows of itself.";
break;
case MONS_LOROCYPROCA:
description += "A tall and gaunt figure, "
"draped in long robes which flow as if alive.";
break;
case MONS_GERYON:
description +=
"A huge and slithery arch-demon, guarding the gates of Hell. ";
break;
case MONS_DISPATER:
description += "The lord of the Iron City of Dis. ";
break;
case MONS_ASMODEUS:
description +=
"One of the arch-demons who dwell in the depths of Hell. ";
break;
case MONS_ANTAEUS:
description += "A great titan who lives in the depths of Cocytus. ";
break;
case MONS_ERESHKIGAL:
description +=
"A fearsome arch-fiend who rules the deathly netherworld of Tartarus. ";
break;
case MONS_VAULT_GUARD:
description += "A heavily armed and armoured guardian of the Vaults. ";
break;
case MONS_CURSE_SKULL:
description +=
"A charred skull floating in the air and rotating slowly. "
"Mystic symbols carved into its blackened surface indicate "
"its resistance to almost any form of attack. ";
break;
case MONS_ORB_GUARDIAN:
description +=
"A huge and glowing purple creature, created by the Orb to "
"defend itself. ";
break;
case MONS_DAEVA:
description +=
"A divine agent of the Shining One. It manifests as a winged "
"figure obscured by an aura of brilliant golden light. ";
break;
case MONS_SPECTRAL_THING:
description += "A hideous glowing apparition.";
break;
case MONS_TENTACLED_MONSTROSITY:
description +=
"A writhing mass of tentacles, all covered in putrid mucous.";
break;
case MONS_SPHINX:
description +=
"A large creature with a human head, the body of a lion, and "
"the wings of a huge bird.";
break;
case MONS_ROTTING_HULK:
description += "A shambling undead, related to the ghoul.";
break;
case MONS_KILLER_KLOWN:
description += "A comical figure full of life and laughter. It"
" looks very happy to see you... but is there a slightly malicious"
" cast to its features? Is that red facepaint or something"
" altogether less pleasant? Join in the fun, and maybe you'll"
" find out!";
break;
case MONS_MOTH_OF_WRATH:
description += "A huge moth, as violent as it is hairy.";
break;
case MONS_DEATH_COB:
description += "A dreadful undead cob of corn.";
break;
case MONS_BOGGART:
description +=
"A twisted little sprite-goblin. Beware of its magical tricks!";
break;
case MONS_LAVA_FISH:
description += "A fish which lives in lava.";
break;
case MONS_BIG_FISH:
description += "A fish of unusual size.";
break;
case MONS_GIANT_GOLDFISH:
description +=
"This is what happens when you give your pet goldfish too much food!";
break;
case MONS_ELECTRICAL_EEL:
description +=
"A small and slimy eel, crackling with electrical discharge.";
break;
case MONS_PLAYER_GHOST:
{
char tmp_buff[ INFO_SIZE ];
// We're fudgins stats so that unarmed combat gets based off
// of the ghost's species, not the player's stats... exact
// stats are required anyways, all that matters is whether
// dex >= str. -- bwr
const int dex = 10;
int str;
switch (ghost.values[GVAL_SPECIES])
{
case SP_HILL_DWARF:
case SP_MOUNTAIN_DWARF:
case SP_TROLL:
case SP_OGRE:
case SP_OGRE_MAGE:
case SP_MINOTAUR:
case SP_HILL_ORC:
case SP_CENTAUR:
case SP_NAGA:
case SP_MUMMY:
case SP_GHOUL:
str = 15;
break;
case SP_HUMAN:
case SP_DEMIGOD:
case SP_DEMONSPAWN:
str = 10;
break;
default:
str = 5;
break;
}
snprintf( tmp_buff, sizeof(tmp_buff),
"The apparition of %s the %s, a%s %s %s.$",
ghost.name,
skill_title( ghost.values[GVAL_BEST_SKILL],
ghost.values[GVAL_SKILL_LEVEL],
ghost.values[GVAL_SPECIES],
str, dex, GOD_NO_GOD ),
(ghost.values[GVAL_EXP_LEVEL] < 4) ? " weakling" :
(ghost.values[GVAL_EXP_LEVEL] < 7) ? "n average" :
(ghost.values[GVAL_EXP_LEVEL] < 11) ? "n experienced" :
(ghost.values[GVAL_EXP_LEVEL] < 16) ? " powerful" :
(ghost.values[GVAL_EXP_LEVEL] < 22) ? " mighty" :
(ghost.values[GVAL_EXP_LEVEL] < 26) ? " great" :
(ghost.values[GVAL_EXP_LEVEL] < 27) ? "n awesomely powerful"
: " legendary",
species_name( ghost.values[GVAL_SPECIES],
ghost.values[GVAL_EXP_LEVEL] ),
get_class_name( ghost.values[GVAL_CLASS] ) );
description += tmp_buff;
}
break;
case MONS_PANDEMONIUM_DEMON:
description += describe_demon();
break;
// mimics -- I'm not considering these descriptions a bug. -- bwr
case MONS_GOLD_MIMIC:
description +=
"An apparently harmless pile of gold coins hides a nasty "
"venomous shapechanging predator.";
break;
case MONS_WEAPON_MIMIC:
description +=
"An apparently abandoned weapon, actually a vicious little "
"beast in disguise.";
break;
case MONS_ARMOUR_MIMIC:
description +=
"An apparently abandoned suit of finely-made armour, actually "
"a vicious little beast in disguise.";
break;
case MONS_SCROLL_MIMIC:
description +=
"An ancient parchment covered in arcane runes. Did it just twitch?";
break;
case MONS_POTION_MIMIC:
description += "A delicious looking magical drink. Go on, pick it up!";
break;
case MONS_BALL_LIGHTNING:
description += "An oddity of nature, ball lightning bounces around "
"behaving almost, but not quite, entirely unlike "
"regular lightning. ";
break;
case MONS_ORB_OF_FIRE:
description += "A globe of raw primordial fire, capable of "
"impressive pyrotechnics.";
break;
// the quokka is no more ... {dlb}
// the quokka is back, without cyberware -- bwr
case MONS_QUOKKA:
description += "A small marsupial. Don't call it a rat.";
break;
// uniques
case MONS_MNOLEG: // was: Nemelex Xobeh - and wrong! {dlb}
description += "A weirdly glowing figure, "
"dancing through the twisted air of Pandemonium. ";
break;
case MONS_LOM_LOBON: // was: Sif Muna - and wrong! {dlb}
description += "An ancient and strangely serene demon. "
"It regards you coldly from "
"the huge glowing eye in the centre of its forehead. ";
break;
case MONS_CEREBOV: // was: Okawaru - and wrong! {dlb}
description += "A violent and wrathful demon, "
"Cerebov appears as a giant human "
"covered in shining golden armour "
"and wielding a huge twisted sword. ";
break;
case MONS_GLOORX_VLOQ: // was: Kikubaaqudgha - and wrong! {dlb}
description += "A shadowy figure clothed in profound darkness. ";
break;
case MONS_TERENCE:
description += "An evil human fighter.";
break;
case MONS_JESSICA:
description += "An evil apprentice sorceress.";
break;
case MONS_SIGMUND:
description += "An evil and spry old human, whose eyes "
"twinkle with madness. Sigmund wields a nasty looking scythe.";
break;
case MONS_EDMUND:
description += "A lightly armoured warrior.";
break;
case MONS_PSYCHE:
description += "A fair-haired magess.";
break;
case MONS_DONALD:
description += "An adventurer like you, trying to find the Orb.";
break;
case MONS_MICHAEL:
description += "A powerful spellcaster, dressed in a long robe.";
break;
case MONS_JOSEPH:
description += "Looks like a mercenary.";
break;
case MONS_ERICA:
description += "A comely spellweaver.";
break;
case MONS_JOSEPHINE:
description += "An ugly elderly figure, dressed in Druidic clothes.";
break;
case MONS_HAROLD:
description += "An evil human bounty hunter.";
break;
case MONS_NORBERT:
description += "A skilled warrior.";
break;
case MONS_JOZEF:
description += "A tall bounty hunter.";
break;
case MONS_AGNES:
description += "A lanky warrior.";
break;
case MONS_MAUD:
description += "An evil warrior who looks inexplicably like a rodent.";
break;
case MONS_LOUISE:
description += "An unusually heavily armoured spellcaster.";
break;
case MONS_FRANCIS:
description += "A wizened spellcaster.";
break;
case MONS_FRANCES:
description += "A stout warrior, bearing a deep facial scar.";
break;
case MONS_RUPERT:
description += "An evil berserker.";
break;
case MONS_WAYNE:
description += "A fat, evil dwarf in a stupid looking hat.";
break;
case MONS_DUANE:
description += "An evil mercenary with unusually large ears.";
break;
case MONS_NORRIS:
description += "A tan, fit and thoroughly evil surfer.";
break;
case MONS_ADOLF:
description += "A svelte fighter-mage with unfortunate facial hair.";
break;
case MONS_MARGERY:
description += "A lithe spellcaster.";
break;
case MONS_IJYB:
description += "A small and twisted goblin, wearing some ugly blue rags.";
break;
case MONS_BLORK_THE_ORC:
description += "A particularly fat and ugly orc.";
break;
case MONS_EROLCHA:
description += "An especially cunning ogre magess.";
break;
case MONS_URUG:
description += "A rude";
if (you.species != SP_MUMMY)
description += ", smelly";
description += " orc.";
break;
case MONS_SNORG:
description += "A hairy troll.";
break;
case MONS_XTAHUA:
description += "An ancient and mighty dragon.";
break;
case MONS_BORIS:
description +=
"An ancient lich. The air around his shrouded form crackles with evil energy. ";
break;
case MONS_SHUGGOTH:
description += "A vile creature with an elongated head, spiked tail "
"and wicked six-fingered claws. Its awesome strength is matched by "
"its umbrage at being transported to this backwater dimension. ";
break;
case MONS_WOLF:
description += "A large and strong grey canine.";
break;
case MONS_WARG:
description += "A particularly large and evil looking wolf, usually "
"found in the company of orcs.";
break;
case MONS_BEAR:
description += "The common dungeon bear.";
break;
case MONS_GRIZZLY_BEAR:
description += "A large, nasty bear with grey fur.";
break;
case MONS_POLAR_BEAR:
description += "A large and very strong bear covered in glistening "
"white fur. ";
break;
case MONS_BLACK_BEAR:
description += "A small black bear.";
break;
case MONS_SALAMANDER: // mv: was ANOTHER_LAVA_THING
description += "A strange half-human half-snake creature "
"covered in thick red scales and thorns.";
break;
case MONS_PROGRAM_BUG:
default:
description += "If this monster is a \"program bug\", then it's "
"recommended that you save your game and reload. Please report "
"monsters who masquerade as program bugs or run around the "
"dungeon without a proper description to the authorities.";
break;
// onocentaur - donkey
}
#if DEBUG_DIAGNOSTICS
if (mons_flag( menv[ which_mons ].type, M_SPELLCASTER ))
{
int hspell_pass[6] = { MS_NO_SPELL, MS_NO_SPELL, MS_NO_SPELL,
MS_NO_SPELL, MS_NO_SPELL, MS_NO_SPELL };
int msecc = ((class_described == MONS_HELLION) ? MST_BURNING_DEVIL :
(class_described == MONS_PANDEMONIUM_DEMON) ? MST_GHOST
: menv[ which_mons ].number);
mons_spell_list(msecc, hspell_pass);
bool found_spell = false;
for (int i = 0; i < 6; i++)
{
if (hspell_pass[i] != MS_NO_SPELL)
{
if (!found_spell)
{
description += "$Monster Spells:$";
found_spell = true;
}
snprintf( info, INFO_SIZE, " %d: %s$", i,
mons_spell_name( hspell_pass[i] ) );
description += info;
}
}
}
bool has_item = false;
for (int i = 0; i < NUM_MONSTER_SLOTS; i++)
{
if (menv[ which_mons ].inv[i] != NON_ITEM)
{
if (!has_item)
{
description += "$Monster Inventory:$";
has_item = true;
}
char buff[ ITEMNAME_SIZE ];
item_def item = mitm[ menv[which_mons].inv[i] ];
set_ident_flags( item, ISFLAG_IDENT_MASK );
item_name( item, DESC_NOCAP_A, buff );
snprintf( info, INFO_SIZE, " %d: %s$", i, buff );
description += info;
}
}
#endif
print_description(description);
if (getch() == 0)
getch();
#ifdef DOS_TERM
puttext(25, 1, 80, 25, buffer);
window(1, 1, 80, 25);
#endif
} // end describe_monsters
static void print_god_abil_desc( int abil )
{
const ability_def &abil_info = get_ability_def( abil );
const std::string cost = "(" + make_cost_description( abil_info ) + ")";
// Produce a 79 character string with cost right justified:
std::string str( abil_info.name );
str += std::string( 79 - str.length() - cost.length(), ' ' ) + cost + EOL;
cprintf( str.c_str() );
}
//---------------------------------------------------------------
//
// describe_god
//
// Describes all gods. Accessible through altars (by praying), or
// by the ^ key if player is a worshipper.
//
//---------------------------------------------------------------
void describe_god( int which_god, bool give_title )
{
const char *description; // mv: tmp string used for printing description
int colour; // mv: colour used for some messages
#ifdef DOS_TERM
char buffer[4000];
gettext( 1, 1, 80, 25, buffer );
window( 1, 1, 80, 25 );
#endif
clrscr();
if (give_title)
{
textcolor( WHITE );
cprintf( " Religion" EOL );
textcolor( LIGHTGREY );
}
if (which_god == GOD_NO_GOD) //mv:no god -> say it and go away
{
cprintf( EOL "You are not religious." );
goto end_god_info;
}
colour = god_colour(which_god);
//mv: print god's name and title - if you can think up better titles
//I have nothing against
textcolor(colour);
cprintf (god_name(which_god,true)); //print long god's name
cprintf (EOL EOL);
//mv: print god's description
textcolor (LIGHTGRAY);
switch (which_god)
{
case GOD_ZIN:
description = "Zin is an ancient and revered God, dedicated to the establishment of order" EOL
"and the destruction of the forces of chaos and night. Valued worshippers " EOL
"can gain a variety of powers useful in the fight against the evil, but must" EOL
"abstain from the use of necromancy and other forms of unholy magic." EOL
"Zin appreciates long-standing faith as well as sacrifices of valued objects." EOL;
break;
case GOD_SHINING_ONE:
description = "The Shining One is a powerful crusading deity, allied with Zin in the fight" EOL
"against evil. Followers may be granted with the ability to summarily dispense" EOL
"the wrath of heaven, but must never use any form of evil magic and should" EOL
"fight honourably. The Shining One appreciates long-standing persistence in " EOL
"the endless crusade, as well as the dedicated destruction of unholy creatures.";
break;
case GOD_KIKUBAAQUDGHA:
description = "Kikubaaqudgha is a terrible Demon-God, served by those who seek knowledge of" EOL
"the powers of death. Followers gain special powers over the undead, and " EOL
"especially favoured servants can call on mighty demons to slay their foes." EOL
"Kikubaaqudgha requires the deaths of living creatures as often as possible," EOL
"but is not interested in the offering of corpses except at an appropriate" EOL
"altar.";
break;
case GOD_YREDELEMNUL:
description = "Yredelemnul is worshipped by those who seek powers over death and the undead" EOL
"without having to learn to use necromancy. Followers can raise legions of " EOL
"servile undead and gain a number of other useful (if unpleasant) powers." EOL
"Yredelemnul appreciates killing, but prefers corpses to be put to use rather" EOL
"than sacrificed.";
break;
case GOD_XOM:
description = "Xom is a wild and unpredictable God of chaos, who seeks not worshippers but" EOL
"playthings to toy with. Many choose to follow Xom in the hope of receiving" EOL
"fabulous rewards and mighty powers, but Xom is nothing if not capricious. ";
break;
case GOD_VEHUMET:
description = "Vehumet is a God of the destructive powers of magic. Followers gain various" EOL
"useful powers to enhance their command of the hermetic arts, and the most" EOL
"favoured stand to gain access to some of the fearsome spells in Vehumet's" EOL
"library. One's devotion to Vehumet can be proved by the causing of as much" EOL
"carnage and destruction as possible.";
break;
case GOD_OKAWARU:
description = "Okawaru is a dangerous and powerful God of battle. Followers can gain a " EOL
"number of powers useful in combat as well as various rewards, but must " EOL
"constantly prove themselves through battle and the sacrifice of corpses" EOL
"and valuable items.";
break;
case GOD_MAKHLEB:
description = "Makhleb the Destroyer is a fearsome God of chaos and violent death. Followers," EOL
"who must constantly appease Makhleb with blood, stand to gain various powers " EOL
"of death and destruction. The Destroyer appreciates sacrifices of corpses and" EOL
"valuable items.";
break;
case GOD_SIF_MUNA:
description = "Sif Muna is a contemplative but powerful deity, served by those who seek" EOL
"magical knowledge. Sif Muna appreciates sacrifices of valuable items, and" EOL
"the casting of spells as often as possible.";
break;
case GOD_TROG:
description = "Trog is an ancient God of anger and violence. Followers are expected to kill" EOL
"in Trog's name and sacrifice the dead, and in return gain power in battle and" EOL
"occasional rewards. Trog hates wizards, and followers are forbidden the use" EOL
"of spell magic. ";
break;
case GOD_NEMELEX_XOBEH:
description = "Nemelex is a strange and unpredictable trickster God, whose powers can be" EOL
"invoked through the magical packs of cards which Nemelex paints in the ichor" EOL
"of demons. Followers receive occasional gifts, and should use these gifts as" EOL
"as much as possible. Offerings of any type of item are also appreciated.";
break;
case GOD_ELYVILON:
description = "Elyvilon the Healer is worshipped by the healers (among others), who gain" EOL
"their healing powers by long worship and devotion. Although Elyvilon prefers" EOL
"a creed of pacifism, those who crusade against evil are not excluded. Elyvilon" EOL
"appreciates the offering of weapons. ";
break;
default:
description = "God of Program Bugs is a weird and dangerous God and his presence should" EOL
"be reported to dev-team.";
}
cprintf(description);
//end of printing description
// title only shown for our own god
if (you.religion == which_god)
{
//mv: print title based on piety
cprintf( EOL EOL "Title - " );
textcolor(colour);
// mv: if your piety is high enough you get title
// based on your god
if (you.piety > 160)
{
cprintf((which_god == GOD_SHINING_ONE) ? "Champion of Law" :
(which_god == GOD_ZIN) ? "Divine Warrior" :
(which_god == GOD_ELYVILON) ? "Champion of Light" :
(which_god == GOD_OKAWARU) ? "Master of Thousand Battles" :
(which_god == GOD_YREDELEMNUL) ? "Master of Eternal Death" :
(which_god == GOD_KIKUBAAQUDGHA) ? "Lord of Darkness" :
(which_god == GOD_MAKHLEB) ? "Champion of Chaos" :
(which_god == GOD_VEHUMET) ? "Lord of Destruction" :
(which_god == GOD_TROG) ? "Great Slayer" :
(which_god == GOD_NEMELEX_XOBEH) ? "Great Trickster" :
(which_god == GOD_SIF_MUNA) ? "Master of Arcane" :
(which_god == GOD_XOM) ? "Teddy Bear" :
"Bogy the Lord of the Bugs"); // Xom and no god is handled before
}
else
{
//mv: most titles are still universal - if any one wants to
//he might write specific titles for all gods or rewrite current
//ones (I know they are not perfect)
//btw. titles are divided according to piety levels on which you get
//new abilities.In the main it means - new ability = new title
switch (which_god)
{
case GOD_ZIN:
case GOD_SHINING_ONE:
case GOD_KIKUBAAQUDGHA:
case GOD_YREDELEMNUL:
case GOD_VEHUMET:
case GOD_OKAWARU:
case GOD_MAKHLEB:
case GOD_SIF_MUNA:
//mv: what about
//sinner, believer, apprentice, disciple, adept, scholar, oracle
case GOD_TROG:
case GOD_NEMELEX_XOBEH:
case GOD_ELYVILON:
cprintf ( (you.piety >= 120) ? "High Priest" :
(you.piety >= 100) ? "Elder" :
(you.piety >= 75) ? "Priest" :
(you.piety >= 50) ? "Deacon" :
(you.piety >= 30) ? "Novice" :
(you.piety > 5) ? "Believer"
: "Sinner" );
break;
case GOD_XOM:
cprintf( (you.experience_level >= 20) ? "Xom's favourite toy"
: "Toy" );
break;
default:
cprintf ("Bug");
}
}
}
// end of print title
// mv: now let's print favor as Brent suggested
// I know these messages aren't perfect so if you can
// think up something better, do it
textcolor(LIGHTGRAY);
cprintf(EOL EOL "Favour - ");
textcolor(colour);
//mv: player is praying at altar without appropriate religion
//it means player isn't checking his own religion and so we only
//display favour and will go out
if (you.religion != which_god)
{
textcolor (colour);
snprintf( info, INFO_SIZE,
(you.penance[which_god] >= 50) ? "%s's wrath is upon you!" :
(you.penance[which_god] >= 20) ? "%s is annoyed with you." :
(you.penance[which_god] >= 5) ? "%s well remembers your sins." :
(you.penance[which_god] > 0) ? "%s is ready to forgive your sins." :
(you.worshipped[which_god]) ? "%s is ambivalent towards you."
: "%s is neutral towards you.",
god_name(which_god) );
cprintf(info);
}
else
{
if (player_under_penance()) //mv: penance check
{
cprintf( (you.penance[which_god] >= 50) ? "Godly wrath is upon you!" :
(you.penance[which_god] >= 20) ? "You've transgressed heavily! Be penitent!" :
(you.penance[which_god] >= 5 ) ? "You are under penance."
: "You should show more discipline." );
}
else
{
if (which_god == GOD_XOM)
cprintf("You are ignored.");
else
{
snprintf( info, INFO_SIZE,
(you.piety > 130) ? "A prized avatar of %s.":
(you.piety > 100) ? "A shining star in the eyes of %s." :
(you.piety > 70) ? "A rising star in the eyes of %s." :
(you.piety > 40) ? "%s is most pleased with you." :
(you.piety > 20) ? "%s has noted your presence." :
(you.piety > 5) ? "%s is noncommittal."
: "You are beneath notice.",
god_name(which_god)
);
cprintf(info);
}
}
//end of favour
//mv: following code shows abilities given from god (if any)
textcolor(LIGHTGRAY);
cprintf(EOL EOL "Granted powers : (Cost)" EOL);
textcolor(colour);
// mv: these gods protects you during your prayer (not mentioning XOM)
// chance for doing so is (random2(you.piety) >= 30)
// Note that it's not depending on penance.
// Btw. I'm not sure how to explain such divine protection
// because god isn't really protecting player - he only sometimes
// saves his life (probably it shouldn't be displayed at all).
// What about this ?
if ((which_god == GOD_ZIN
|| which_god == GOD_SHINING_ONE
|| which_god == GOD_ELYVILON
|| which_god == GOD_OKAWARU
|| which_god == GOD_YREDELEMNUL)
&& you.piety >= 30)
{
snprintf( info, INFO_SIZE,
"%s %s watches over you during prayer." EOL,
god_name(which_god),
(you.piety >= 150) ? "carefully": // > 4/5
(you.piety >= 90) ? "often" : // > 2/3
"sometimes" // less than 2:3
);
cprintf(info);
}
// mv: No abilities (except divine protection)
// under penance (fix me if I'm wrong)
if (player_under_penance())
{
cprintf( "None." EOL );
}
else
{
switch (which_god) //mv: finaly let's print abilities
{
case GOD_ZIN:
if (you.piety >= 30)
print_god_abil_desc( ABIL_ZIN_REPEL_UNDEAD );
else
cprintf( "None." EOL );
if (you.piety >= 50)
print_god_abil_desc( ABIL_ZIN_HEALING );
if (you.piety >= 75)
print_god_abil_desc( ABIL_ZIN_PESTILENCE );
if (you.piety >= 100)
print_god_abil_desc( ABIL_ZIN_HOLY_WORD );
if (you.piety >= 120)
print_god_abil_desc( ABIL_ZIN_SUMMON_GUARDIAN );
break;
case GOD_SHINING_ONE:
if (you.piety >= 30)
print_god_abil_desc( ABIL_TSO_REPEL_UNDEAD );
else
cprintf( "None." EOL );
if (you.piety >= 50)
print_god_abil_desc( ABIL_TSO_SMITING );
if (you.piety >= 75)
print_god_abil_desc( ABIL_TSO_ANNIHILATE_UNDEAD );
if (you.piety >= 100)
print_god_abil_desc( ABIL_TSO_THUNDERBOLT );
if (you.piety >= 120)
print_god_abil_desc( ABIL_TSO_SUMMON_DAEVA );
break;
case GOD_KIKUBAAQUDGHA:
if (you.piety >= 30)
print_god_abil_desc( ABIL_KIKU_RECALL_UNDEAD_SLAVES );
else
cprintf( "None." EOL );
if (you.piety >= 50)
cprintf("You are protected from some of the side-effects of death magic." EOL);
if (you.piety >= 75)
print_god_abil_desc( ABIL_KIKU_ENSLAVE_UNDEAD );
if (you.piety >= 120)
print_god_abil_desc( ABIL_KIKU_INVOKE_DEATH );
break;
case GOD_YREDELEMNUL:
if (you.piety >= 30)
print_god_abil_desc( ABIL_YRED_ANIMATE_CORPSE );
else
cprintf( "None." EOL );
if (you.piety >= 50)
print_god_abil_desc( ABIL_YRED_RECALL_UNDEAD );
if (you.piety >= 75)
print_god_abil_desc( ABIL_YRED_ANIMATE_DEAD );
if (you.piety >= 100)
print_god_abil_desc( ABIL_YRED_DRAIN_LIFE );
if (you.piety >= 120)
print_god_abil_desc( ABIL_YRED_CONTROL_UNDEAD );
break;
case GOD_VEHUMET:
if (you.piety >= 30)
{
cprintf( "You can gain power from the those you kill " EOL
" in Vehumet's name, or those slain by your servants." EOL );
}
else
cprintf( "None." EOL );
if (you.piety >= 50)
cprintf( "Vehumet assists with destructive magics during prayer." EOL );
if (you.piety >= 75)
cprintf( "During prayer you have some protection from summoned creatures." EOL );
if (you.piety >= 100)
print_god_abil_desc( ABIL_VEHUMET_CHANNEL_ENERGY );
break;
case GOD_OKAWARU:
if (you.piety >= 30)
print_god_abil_desc( ABIL_OKAWARU_MIGHT );
else
cprintf( "None." EOL );
if (you.piety >= 50)
print_god_abil_desc( ABIL_OKAWARU_HEALING );
if (you.piety >= 120)
print_god_abil_desc( ABIL_OKAWARU_HASTE );
break;
case GOD_MAKHLEB:
if (you.piety >= 30)
{
cprintf( "You can gain power from the deaths " EOL
" of those you kill in Makhleb's name." EOL );
}
else
cprintf( "None." EOL );
if (you.piety >= 50)
print_god_abil_desc( ABIL_MAKHLEB_MINOR_DESTRUCTION );
if (you.piety >= 75)
print_god_abil_desc( ABIL_MAKHLEB_LESSER_SERVANT_OF_MAKHLEB );
if (you.piety >= 100)
print_god_abil_desc( ABIL_MAKHLEB_MAJOR_DESTRUCTION );
if (you.piety >= 120)
print_god_abil_desc( ABIL_MAKHLEB_GREATER_SERVANT_OF_MAKHLEB );
break;
case GOD_SIF_MUNA:
if (you.piety >= 50)
print_god_abil_desc( ABIL_SIF_MUNA_FORGET_SPELL );
else
cprintf( "None." EOL );
if (you.piety >= 100)
cprintf( "You are protected from some side-effects of spellcasting." EOL );
break;
case GOD_TROG:
if (you.piety >= 30)
print_god_abil_desc( ABIL_TROG_BERSERK );
else
cprintf( "None." EOL );
if (you.piety >= 50)
print_god_abil_desc( ABIL_TROG_MIGHT );
if (you.piety >= 100)
print_god_abil_desc( ABIL_TROG_HASTE_SELF );
break;
case GOD_ELYVILON:
if (you.piety >= 30)
print_god_abil_desc( ABIL_ELYVILON_LESSER_HEALING );
else
cprintf( "None." EOL );
if (you.piety >= 50)
print_god_abil_desc( ABIL_ELYVILON_PURIFICATION );
if (you.piety >= 75)
print_god_abil_desc( ABIL_ELYVILON_HEALING );
if (you.piety >= 100)
print_god_abil_desc( ABIL_ELYVILON_RESTORATION );
if (you.piety >= 120)
print_god_abil_desc( ABIL_ELYVILON_GREATER_HEALING );
break;
default: //mv: default is Xom, Nemelex and all bugs.
cprintf( "None." EOL );
} //end of printing abilities
}
}
end_god_info: //end of everything (life, world, universe etc.)
getch(); // wait until keypressed
#ifdef DOS_TERM //mv: if DOS_TERM is defined than buffer is returned to screen
//if not redraw_screen() is called everytime when this function is
//called
puttext(1, 1, 80, 25, buffer);
window(1, 1, 80, 25);
#endif
} //mv: That's all folks.
|