-+-+-+-+-+-+-+-+ START OF PART 70 -+-+-+-+-+-+-+-+ X/*Half-Troll`09 */`09 `7B 110, 115,`09 115, 110, 110, 130,`09 110, 11 V0`7D X`09`09`09`7D; X/* object_list`5B`5D index of objects that may appear in the store */ Xint16u store_choice`5BMAX_STORES`5D`5BSTORE_CHOICES`5D = `7B X`09/* General Store */ X`7B366,365,364,84,84,365,123,366,365,350,349,348,347,346,346,345,345,345, X`09344,344,344,344,344,344,344,344`7D, X`09/* Armory`09 */ X`7B94,95,96,109,103,104,105,106,110,111,112,114,116,124,125,126,127,129,103, X`09104,124,125,91,92,95,96`7D, X`09/* Weaponsmith`09 */ X`7B29,30,34,37,45,49,57,58,59,65,67,68,73,74,75,77,79,80,81,83,29,30,80,83, X`0980,83`7D, X`09/* Temple`09 */ X`7B322,323,324,325,180,180,233,237,240,241,361,362,57,58,59,260,358,359,265, X`09237,237,240,240,241,323,359`7D, X`09/* Alchemy shop`09 */ X`7B173,174,175,351,351,352,353,354,355,356,357,206,227,230,236,252,253,352, X`09353,354,355,356,359,363,359,359`7D, X`09/* Magic-User store*/ X`7B318,141,142,153,164,167,168,140,319,320,320,321,269,270,282,286,287,292, X`09293,294,295,308,269,290,319,282`7D X`7D; X X#ifndef MAC X/* MPW doesn't seem to handle this very well, so replace store_buy array X with a function call on mac */ X/* functions defined in sets.c */ Xextern int general_store(), armory(), weaponsmith(), temple(), X alchemist(), magic_shop(); X X/* Each store will buy only certain items, based on TVAL */ Xint (*store_buy`5BMAX_STORES`5D)() = `7B X general_store, armory, weaponsmith, temple, alchemist, magic_shop`7D; X#endif X X/* Following are arrays for descriptive pieces`09`09`09*/ X X#ifdef MACGAME X Xchar **colors; Xchar **mushrooms; Xchar **woods; Xchar **metals; Xchar **rocks; Xchar **amulets; Xchar **syllables; X X#else X Xchar *colors`5BMAX_COLORS`5D = `7B X/* Do not move the first three */ X "Icky Green", "Light Brown", "Clear", X "Azure","Blue","Blue Speckled","Black","Brown","Brown Speckled","Bubbling" V, X "Chartreuse","Cloudy","Copper Speckled","Crimson","Cyan","Dark Blue", X "Dark Green","Dark Red","Gold Speckled","Green","Green Speckled","Grey", X "Grey Speckled","Hazy","Indigo","Light Blue","Light Green","Magenta", X "Metallic Blue","Metallic Red","Metallic Green","Metallic Purple","Misty", X "Orange","Orange Speckled","Pink","Pink Speckled","Puce","Purple", X "Purple Speckled","Red","Red Speckled","Silver Speckled","Smoky", X "Tangerine","Violet","Vermilion","White","Yellow" X`7D; X Xchar *mushrooms`5BMAX_MUSH`5D = `7B X "Blue","Black","Black Spotted","Brown","Dark Blue","Dark Green","Dark Red" V, X "Ecru","Furry","Green","Grey","Light Blue","Light Green","Plaid","Red", X "Slimy","Tan","White","White Spotted","Wooden","Wrinkled","Yellow", X`7D; X Xchar *woods`5BMAX_WOODS`5D = `7B X "Aspen","Balsa","Banyan","Birch","Cedar","Cottonwood","Cypress","Dogwood", X "Elm","Eucalyptus","Hemlock","Hickory","Ironwood","Locust","Mahogany", X "Maple","Mulberry","Oak","Pine","Redwood","Rosewood","Spruce","Sycamore", X "Teak","Walnut", X`7D; X Xchar *metals`5BMAX_METALS`5D = `7B X "Aluminum","Cast Iron","Chromium","Copper","Gold","Iron","Magnesium", X "Molybdenum","Nickel","Rusty","Silver","Steel","Tin","Titanium","Tungsten" V, X "Zirconium","Zinc","Aluminum-Plated","Copper-Plated","Gold-Plated", X "Nickel-Plated","Silver-Plated","Steel-Plated","Tin-Plated","Zinc-Plated" X`7D; X Xchar *rocks`5BMAX_ROCKS`5D = `7B X "Alexandrite","Amethyst","Aquamarine","Azurite","Beryl","Bloodstone", X "Calcite","Carnelian","Corundum","Diamond","Emerald","Fluorite","Garnet", X "Granite","Jade","Jasper","Lapis Lazuli","Malachite","Marble","Moonstone", X "Onyx","Opal","Pearl","Quartz","Quartzite","Rhodonite","Ruby","Sapphire", X "Tiger Eye","Topaz","Turquoise","Zircon" X`7D; X Xchar *amulets`5BMAX_AMULETS`5D = `7B X "Amber","Driftwood","Coral","Agate","Ivory","Obsidian", X "Bone","Brass","Bronze","Pewter","Tortoise Shell" X`7D; X Xchar *syllables`5BMAX_SYLLABLES`5D = `7B X "a","ab","ag","aks","ala","an","ankh","app", X "arg","arze","ash","aus","ban","bar","bat","bek", X "bie","bin","bit","bjor","blu","bot","bu", X "byt","comp","con","cos","cre","dalf","dan", X "den","doe","dok","eep","el","eng","er","ere","erk", X "esh","evs","fa","fid","for","fri","fu","gan", X "gar","glen","gop","gre","ha","he","hyd","i", X "ing","ion","ip","ish","it","ite","iv","jo", X "kho","kli","klis","la","lech","man","mar", X "me","mi","mic","mik","mon","mung","mur","nej", X "nelg","nep","ner","nes","nis","nih","nin","o", X "od","ood","org","orn","ox","oxy","pay","pet", X "ple","plu","po","pot","prok","re","rea","rhov", X "ri","ro","rog","rok","rol","sa","san","sat", X "see","sef","seh","shu","ski","sna","sne","snik", X "sno","so","sol","sri","sta","sun","ta","tab", X "tem","ther","ti","tox","trol","tue","turs","u", X "ulk","um","un","uni","ur","val","viv","vly", X "vom","wah","wed","werg","wex","whon","wun","x", X "yerg","yp","zun" X`7D; X#endif X X/* used to calculate the number of blows the player gets in combat */ Xint8u blows_table`5B7`5D`5B6`5D = `7B X/* STR/W:`09 9 18 67 107 117 118 : DEX */ X/* <2 */`09`7B 1, 1, 1, 1, 1, 1 `7D, X/* <3 */`09`7B 1, 1, 1, 1, 2, 2 `7D, X/* <4 */`09`7B 1, 1, 1, 2, 2, 3 `7D, X/* <5 */`09`7B 1, 1, 2, 2, 3, 3 `7D, X/* <7 */`09`7B 1, 2, 2, 3, 3, 4 `7D, X/* <9 */`09`7B 1, 2, 2, 3, 4, 4 `7D, X/* >9 */`09`7B 2, 2, 3, 3, 4, 4 `7D X`7D; X X/* this table is used to generate a psuedo-normal distribution.`09 See the X function randnor() in misc1.c, this is much faster than calling X transcendental function to calculate a true normal distribution */ Xint16u normal_table`5BNORMAL_TABLE_SIZE`5D = `7B X 206, 613, 1022, 1430,`091838,`09 2245,`09 2652,`09 3058, X 3463, 3867, 4271, 4673,`095075,`09 5475,`09 5874,`09 6271, X 6667, 7061, 7454, 7845,`098234,`09 8621,`09 9006,`09 9389, X 9770, 10148, 10524, 10898, 11269,`0911638,`09 12004,`09 12367, X 12727, 13085, 13440, 13792, 14140,`0914486,`09 14828,`09 15168, X 15504, 15836, 16166, 16492, 16814,`0917133,`09 17449,`09 17761, X 18069, 18374, 18675, 18972, 19266,`0919556,`09 19842,`09 20124, X 20403, 20678, 20949, 21216, 21479,`0921738,`09 21994,`09 22245, X 22493, 22737, 22977, 23213, 23446,`0923674,`09 23899,`09 24120, X 24336, 24550, 24759, 24965, 25166,`0925365,`09 25559,`09 25750, X 25937, 26120, 26300, 26476, 26649,`0926818,`09 26983,`09 27146, X 27304, 27460, 27612, 27760, 27906,`0928048,`09 28187,`09 28323, X 28455, 28585, 28711, 28835, 28955,`0929073,`09 29188,`09 29299, X 29409, 29515, 29619, 29720, 29818,`0929914,`09 30007,`09 30098, X 30186, 30272, 30356, 30437, 30516,`0930593,`09 30668,`09 30740, X 30810, 30879, 30945, 31010, 31072,`0931133,`09 31192,`09 31249, X 31304, 31358, 31410, 31460, 31509,`0931556,`09 31601,`09 31646, X 31688, 31730, 31770, 31808, 31846,`0931882,`09 31917,`09 31950, X 31983, 32014, 32044, 32074, 32102,`0932129,`09 32155,`09 32180, X 32205, 32228, 32251, 32273, 32294,`0932314,`09 32333,`09 32352, X 32370, 32387, 32404, 32420, 32435,`0932450,`09 32464,`09 32477, X 32490, 32503, 32515, 32526, 32537,`0932548,`09 32558,`09 32568, X 32577, 32586, 32595, 32603, 32611,`0932618,`09 32625,`09 32632, X 32639, 32645, 32651, 32657, 32662,`0932667,`09 32672,`09 32677, X 32682, 32686, 32690, 32694, 32698,`0932702,`09 32705,`09 32708, X 32711, 32714, 32717, 32720, 32722,`0932725,`09 32727,`09 32729, X 32731, 32733, 32735, 32737, 32739,`0932740,`09 32742,`09 32743, X 32745, 32746, 32747, 32748, 32749,`0932750,`09 32751,`09 32752, X 32753, 32754, 32755, 32756, 32757,`0932757,`09 32758,`09 32758, X 32759, 32760, 32760, 32761, 32761,`0932761,`09 32762,`09 32762, X 32763, 32763, 32763, 32764, 32764,`0932764,`09 32764,`09 32765, X 32765, 32765, 32765, 32766, 32766,`0932766,`09 32766,`09 32766, X`7D; $ CALL UNPACK TABLES.C;1 1768095577 $ create 'f' X/* source/treasure.c: dungeon object definitions X X Copyright (c) 1989-92 James E. Wilson, Robert A. Koeneke X X This software may be copied and distributed for educational, research, an Vd X not for profit purposes provided that this copyright and statement are X included in all such copies. */ X X#include "config.h" X#include "constant.h" X#include "types.h" X X/* Following are treasure arrays`09and variables`09`09`09*/ X X/* Object description:`09Objects are defined here. Each object has X the following attributes: X`09Descriptor : Name of item and formats. X`09`09& is replaced with 'a', 'an', or a number. X`09`09`7E is replaced with null or 's'. X`09Character : Character that represents the item. X`09Type value : Value representing the type of object. X`09Sub value : separate value for each item of a type. X`09`090 - 63: object can not stack X`09`0964 - 127: dungeon object, can stack with other D object X`09`09128 - 191: unused, previously for store items X`09`09192: stack with other iff have same p1 value, always X`09`09`09treated as individual objects X`09`09193 - 255: object can stack with others iff they have X`09`09`09the same p1 value, usually considered one group X`09`09Objects which have two type values, e.g. potions and X`09`09scrolls, need to have distinct subvals for X`09`09each item regardless of its tval X`09Damage`09 : amount of damage item can cause. X`09Weight`09 : relative weight of an item. X`09Number`09 : number of items appearing in group. X`09To hit`09 : magical plusses to hit. X`09To damage : magical plusses to damage. X`09AC`09 : objects relative armor class. X`09`091 is worse than 5 is worse than 10 etc. X`09To AC`09 : Magical bonuses to AC. X`09P1`09 : Catch all for magical abilities such as X`09`09 plusses to strength, minuses to searching. X`09Flags`09 : Abilities of object. Each ability is a X`09`09 bit. Bits 1-31 are used. (Signed integer) X`09Level`09 : Minimum level on which item can be found. X`09Cost`09 : Relative cost of item. X X`09Special Abilities can be added to item by magic_init(), X`09found in misc.c. X X`09Scrolls, Potions, and Food: X`09Flags is used to define a function which reading/quaffing X`09will cause. Most scrolls and potions have only one bit X`09set. Potions will generally have some food value, found X`09in p1. X X`09Wands and Staffs: X`09Flags defines a function, p1 contains number of charges X`09for item. p1 is set in magic_init() in misc.c. X X`09Chests: X`09Traps are added randomly by magic_init() in misc.c.`09*/ X X/* Object list (All objects must be defined here)`09`09 */ X X#if defined(MACGAME) `7C`7C defined(RSRC_PART2) Xtreasure_type *object_list; X#else Xtreasure_type object_list`5BMAX_OBJECTS`5D = `7B X/* Dungeon items from 0 to MAX_DUNGEON_OBJ */ X`7B"Poison"`09`09`09,0x00000001L,`09TV_FOOD, ',',`09/* 0*/ X 500,`09 0,`0964, 1, 1,`090, 0,`09 0, 0, `7B0,0`7D`09, 7`7D, X`7B"Blindness"`09`09`09,0x00000002L,`09TV_FOOD, ',',`09/* 1*/ X 500,`09 0,`0965, 1, 1,`090, 0,`09 0, 0, `7B0,0`7D`09, 9`7D, X`7B"Paranoia"`09`09`09,0x00000004L,`09TV_FOOD, ',',`09/* 2*/ X 500,`09 0,`0966, 1, 1,`090, 0,`09 0, 0, `7B0,0`7D`09, 9`7D, X`7B"Confusion"`09`09`09,0x00000008L,`09TV_FOOD, ',',`09/* 3*/ X 500,`09 0,`0967, 1, 1,`090, 0,`09 0, 0, `7B0,0`7D`09, 7`7D, X`7B"Hallucination"`09`09,0x00000010L,`09TV_FOOD, ',',`09/* 4*/ X 500,`09 0,`0968, 1, 1,`090, 0,`09 0, 0, `7B0,0`7D`09, 13`7D, X`7B"Cure Poison"`09`09`09,0x00000020L,`09TV_FOOD, ',',`09/* 5*/ X 500,`09 60,`0969, 1, 1,`090, 0,`09 0, 0, `7B0,0`7D`09, 8`7D, X`7B"Cure Blindness"`09`09,0x00000040L,`09TV_FOOD, ',',`09/* 6*/ X 500,`09 50,`0970, 1, 1,`090, 0,`09 0, 0, `7B0,0`7D`09, 10`7D, X`7B"Cure Paranoia"`09`09,0x00000080L,`09TV_FOOD, ',',`09/* 7*/ X 500,`09 25,`0971, 1, 1,`090, 0,`09 0, 0, `7B0,0`7D`09, 12`7D, X`7B"Cure Confusion"`09`09,0x00000100L,`09TV_FOOD, ',',`09/* 8*/ X 500,`09 50,`0972, 1, 1,`090, 0,`09 0, 0, `7B0,0`7D`09, 6`7D, X`7B"Weakness"`09`09`09,0x04000200L,`09TV_FOOD, ',',`09/* 9*/ X 500,`09 0,`0973, 1, 1,`090, 0,`09 0, 0, `7B0,0`7D`09, 7`7D, X`7B"Unhealth"`09`09`09,0x04000400L,`09TV_FOOD, ',',`09/* 10*/ X 500,`09 50,`0974, 1, 1,`090, 0,`09 0, 0, `7B10,10`7D, 15`7D, X`7B"Restore Constitution"`09`09,0x00010000L,`09TV_FOOD, ',',`09/* 11*/ X 500,`09 350,`0975, 1, 1,`090, 0,`09 0, 0, `7B0,0`7D`09, 20`7D, X`7B"First-Aid"`09`09`09,0x00200000L,`09TV_FOOD, ',',`09/* 12*/ X 500,`09 5,`0976, 1, 1,`090, 0,`09 0, 0, `7B0,0`7D`09, 6`7D, X`7B"Minor Cures"`09`09`09,0x00400000L,`09TV_FOOD, ',',`09/* 13*/ X 500,`09 20,`0977, 1, 1,`090, 0,`09 0, 0, `7B0,0`7D`09, 7`7D, X`7B"Light Cures"`09`09`09,0x00800000L,`09TV_FOOD, ',',`09/* 14*/ X 500,`09 30,`0978, 1, 1,`090, 0,`09 0, 0, `7B0,0`7D`09, 10`7D, X`7B"Restoring"`09`09`09,0x001F8040L,`09TV_FOOD, ',',`09/* 15*/ X 500,`091000,`0979, 1, 1,`090, 0,`09 0, 0, `7B0,0`7D`09, 30`7D, X`7B"Poison"`09`09`09,0x00000001L,`09TV_FOOD, ',',`09/* 16*/ X 1200,`09 0,`0980, 1, 1,`090, 0,`09 0, 0, `7B0,0`7D`09, 15`7D, X`7B"Hallucinations"`09`09,0x00000010L,`09TV_FOOD, ',',`09/* 17*/ X 1200,`09 0,`0981, 1, 1,`090, 0,`09 0, 0, `7B0,0`7D`09, 18`7D, X`7B"Cure Poison"`09`09`09,0x00000020L,`09TV_FOOD, ',',`09/* 18*/ X 1200,`09 75,`0982, 1, 1,`090, 0,`09 0, 0, `7B0,0`7D`09, 19`7D, X`7B"Unhealth"`09`09`09,0x00000400L,`09TV_FOOD, ',',`09/* 19*/ X 1200,`09 25,`0983, 1, 1,`090, 0,`09 0, 0, `7B6,8`7D`09, 28`7D, X`7B"Cure Serious Wounds"`09`09,0x02000000L,`09TV_FOOD, ',',`09/* 20*/ X 1200,`09 75,`0984, 1, 2,`090, 0,`09 0, 0, `7B0,0`7D`09, 16`7D, X`7B"& Ration`7E of Food"`09`09,0x00000000L,`09TV_FOOD, ',',`09/* 21*/ X 5000,`09 3,`0990, 1, 10,`090, 0,`09 0, 0, `7B0,0`7D`09, 0`7D, X`7B"& Ration`7E of Food"`09`09,0x00000000L,`09TV_FOOD, ',',`09/* 22*/ X 5000,`09 3,`0990, 1, 10,`090, 0,`09 0, 0, `7B0,0`7D`09, 5`7D, X`7B"& Ration`7E of Food"`09`09,0x00000000L,`09TV_FOOD, ',',`09/* 23*/ X 5000,`09 3,`0990, 1, 10,`090, 0,`09 0, 0, `7B0,0`7D`09, 10`7D, X`7B"& Slime Mold`7E"`09`09,0x00000000L,`09TV_FOOD, ',',`09/* 24*/ X 3000,`09 2,`0991, 1, 5,`090, 0,`09 0, 0, `7B0,0`7D`09, 1`7D, X`7B"& Piece`7E of Elvish Waybread"`09,0x02000020L,`09TV_FOOD, ',',`09/* 25*/ X 7500,`09 10,`0992, 1, 3,`090, 0,`09 0, 0, `7B0,0`7D`09, 6`7D, +-+-+-+-+-+-+-+- END OF PART 70 +-+-+-+-+-+-+-+-