home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / sources / games / 172 < prev    next >
Encoding:
Internet Message Format  |  1992-08-20  |  55.0 KB

  1. Path: sparky!uunet!zephyr.ens.tek.com!master!saab!billr
  2. From: billr@saab.CNA.TEK.COM (Bill Randle)
  3. Newsgroups: comp.sources.games
  4. Subject: v14i042:  umoria4 - single player dungeon simulation (ver. 5.5), Part10/39
  5. Message-ID: <3400@master.CNA.TEK.COM>
  6. Date: 20 Aug 92 18:03:38 GMT
  7. Sender: news@master.CNA.TEK.COM
  8. Lines: 1294
  9. Approved: billr@saab.CNA.TEK.COM
  10.  
  11. Submitted-by: grabiner@math.harvard.edu (David Grabiner)
  12. Posting-number: Volume 14, Issue 42
  13. Archive-name: umoria4/Part10
  14. Supersedes: umoria3: Volume 9, Issue 55-97; Volume 10, Issue 15-17
  15. Environment: Curses, Unix, Mac, MS-DOS, Atari-ST, Amiga, VMS
  16.  
  17.  
  18.  
  19. #! /bin/sh
  20. # This is a shell archive.  Remove anything before this line, then unpack
  21. # it by saving it into a file and typing "sh file".  To overwrite existing
  22. # files, type "sh file -c".  You can also feed this as standard input via
  23. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  24. # will see the following message at the end:
  25. #        "End of archive 10 (of 39)."
  26. # Contents:  source/monsters.c source/store1.c
  27. # Wrapped by billr@saab on Thu Aug 20 09:11:28 1992
  28. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  29. if test -f 'source/monsters.c' -a "${1}" != "-c" ; then 
  30.   echo shar: Will not clobber existing file \"'source/monsters.c'\"
  31. else
  32. echo shar: Extracting \"'source/monsters.c'\" \(40791 characters\)
  33. sed "s/^X//" >'source/monsters.c' <<'END_OF_FILE'
  34. X/* source/monsters.c: monster definitions
  35. X
  36. X   Copyright (c) 1989-92 James E. Wilson, Robert A. Koeneke
  37. X
  38. X   This software may be copied and distributed for educational, research, and
  39. X   not for profit purposes provided that this copyright and statement are
  40. X   included in all such copies. */
  41. X
  42. X#include "config.h"
  43. X#include "constant.h"
  44. X#include "types.h"
  45. X
  46. X/* Following are creature arrays and variables            */
  47. X    /* Creatures must be defined here                */
  48. X    /*    See types.h under creature_type for a complete list
  49. X        of all variables for creatures.     Some of the less obvious
  50. X        are explained below.
  51. X
  52. X    Hit points:    #1, #2: where #2 is the range of each roll and
  53. X            #1 is the number of added up rolls to make.
  54. X            Example: a creature with 5 eight-sided hit die
  55. X            is given {5,8}.
  56. X
  57. X        Attack types:
  58. X        1    Normal attack
  59. X        2    Poison Strength
  60. X        3    Confusion attack
  61. X        4    Fear attack
  62. X        5    Fire attack
  63. X        6    Acid attack
  64. X        7    Cold attack
  65. X        8    Lightning attack
  66. X        9    Corrosion attack
  67. X        10    Blindness attack
  68. X        11    Paralysis attack
  69. X        12    Steal Money
  70. X        13    Steal Object
  71. X        14    Poison
  72. X        15    Lose dexterity
  73. X        16    Lose constitution
  74. X        17    Lose intelligence
  75. X        18    Lose wisdom
  76. X        19    Lose experience
  77. X        20    Aggravation
  78. X        21    Disenchants
  79. X        22    Eats food
  80. X        23    Eats light
  81. X        24    Eats charges
  82. X        99    Blank
  83. X
  84. X        Attack descriptions:
  85. X        1    hits you.
  86. X        2    bites you.
  87. X        3    claws you.
  88. X        4    stings you.
  89. X        5    touches you.
  90. X        6    kicks you.
  91. X        7    gazes at you.
  92. X        8    breathes on you.
  93. X        9    spits on you.
  94. X        10    makes a horrible wail.
  95. X        11    embraces you.
  96. X        12    crawls on you.
  97. X        13    releases a cloud of spores.
  98. X        14    begs you for money.
  99. X        15    You've been slimed.
  100. X        16    crushes you.
  101. X        17    tramples you.
  102. X        18    drools on you.
  103. X        19    insults you.
  104. X        99    is repelled.
  105. X
  106. X    Example:  For a creature which bites for 1d6, then stings for
  107. X          2d4 and loss of dex you would use:
  108. X            {1,2,1,6},{15,4,2,4}
  109. X
  110. X        CMOVE flags:
  111. XMovement.    00000001    Move only to attack
  112. X    .    00000002    Move, attack normal
  113. X    .    00000008    20% random movement
  114. X    .    00000010    40% random movement
  115. X    .    00000020    75% random movement
  116. XSpecial +    00010000    Invisible movement
  117. X    +    00020000    Move through door
  118. X    +    00040000    Move through wall
  119. X    +    00080000    Move through creatures
  120. X    +    00100000    Picks up objects
  121. X    +    00200000    Multiply monster
  122. XCarries =    01000000    Carries objects.
  123. X    =    02000000    Carries gold.
  124. X    =    04000000    Has 60% of time.
  125. X    =    08000000    Has 90% of time.
  126. X    =    10000000    1d2 objects/gold.
  127. X    =    20000000    2d2 objects/gold.
  128. X    =    40000000    4d2 objects/gold.
  129. XSpecial ~    80000000    Win-the-Game creature.
  130. X
  131. X        SPELL Flags:
  132. XFrequency    000001      1    These add up to x.  Then
  133. X(1 in x).    000002      2    if RANDINT(X) = 1 the
  134. X    .    000004      4    creature casts a spell.
  135. X    .    000008      8
  136. XSpells    =    000010    Teleport short (blink)
  137. X    =    000020    Teleport long
  138. X    =    000040    Teleport player to monster
  139. X    =    000080    Cause light wound
  140. X    =    000100    Cause serious wound
  141. X    =    000200    Hold person (Paralysis)
  142. X    =    000400    Cause blindness
  143. X    =    000800    Cause confusion
  144. X    =    001000    Cause fear
  145. X    =    002000    Summon monster
  146. X    =    004000    Summon undead
  147. X    =    008000    Slow Person
  148. X    =    010000    Drain Mana
  149. X    =    020000    Not Used
  150. X    =    040000    Not Used
  151. XBreaths +    080000    Breath Lightning
  152. X    +    100000    Breath Gas
  153. X    +    200000    Breath Acid
  154. X    +    400000    Breath Frost
  155. X    +    800000    Breath Fire
  156. X
  157. X        CDEFENSE flags:
  158. X        0001    Hurt by Slay Dragon.
  159. X        0002    Hurt by Slay Animal.
  160. X        0004    Hurt by Slay Evil.
  161. X        0008    Hurt by Slay Undead.
  162. X        0010    Hurt by Frost.
  163. X        0020    Hurt by Fire.
  164. X        0040    Hurt by Poison.
  165. X        0080    Hurt by Acid.
  166. X        0100    Hurt by Light-Wand.
  167. X        0200    Hurt by Stone-to-Mud.
  168. X        0400    Not used.
  169. X        0800    Not used.
  170. X        1000    Cannot be charmed or slept.
  171. X        2000    Can be seen with infra-vision.
  172. X        4000    Max Hit points.
  173. X        8000    Not used.
  174. X
  175. X
  176. X    Sleep (sleep)    :    A measure in turns of how fast creature
  177. X                will notice player (on the average).
  178. X    Area of affect (aaf) :    Max range that creature is able to "notice"
  179. X                the player.
  180. X                                    */
  181. X
  182. X#ifdef MACGAME
  183. Xcreature_type *c_list;
  184. X#else
  185. Xcreature_type c_list[MAX_CREATURES] = {
  186. X{"Filthy Street Urchin"        ,0x0012000AL,0x00000000L,0x2034,    0,  40,
  187. X   4,    1, 11, 'p', {1,4}   , {72,148,0,0}        ,    0},
  188. X{"Blubbering Idiot"        ,0x0012000AL,0x00000000L,0x2030,    0,   0,
  189. X   6,    1, 11, 'p', {1,2}   , {79,0,0,0}        ,    0},
  190. X{"Pitiful-Looking Beggar"   ,0x0012000AL,0x00000000L,0x2030,    0,  40,
  191. X  10,    1, 11, 'p', {1,4}   , {72,0,0,0}        ,    0},
  192. X{"Mangy-Looking Leper"        ,0x0012000AL,0x00000000L,0x2030,    0,  50,
  193. X  10,    1, 11, 'p', {1,1}   , {72,0,0,0}        ,    0},
  194. X{"Squint-Eyed Rogue"        ,0x07120002L,0x00000000L,0x2034,    0,  99,
  195. X  10,    8, 11, 'p', {2,8}   , {5,149,0,0}        ,    0},
  196. X{"Singing, Happy Drunk"        ,0x06120038L,0x00000000L,0x2030,    0,   0,
  197. X  10,    1, 11, 'p', {2,3}   , {72,0,0,0}        ,    0},
  198. X{"Mean-Looking Mercenary"   ,0x0B12000AL,0x00000000L,0x2034,    0, 250,
  199. X  10,  20, 11, 'p', {5,8}   , {9,0,0,0}            ,    0},
  200. X{"Battle-Scarred Veteran"   ,0x0B12000AL,0x00000000L,0x2030,    0, 250,
  201. X  10,  30, 11, 'p', {7,8}   , {15,0,0,0}        ,    0},
  202. X{"Grey Mushroom patch"        ,0x00000001L,0x00000000L,0x10A0,    1,   0,
  203. X   2,    1, 11, ',', {1,2}   , {91,0,0,0}        ,    1},
  204. X{"Giant Yellow Centipede"   ,0x00000002L,0x00000000L,0x0002,    2,  30,
  205. X   8,  12, 11, 'c', {2,6}   , {26,60,0,0}        ,    1},
  206. X{"Giant White Centipede"    ,0x0000000AL,0x00000000L,0x0002,    2,  40,
  207. X   7,  10, 11, 'c', {3,5}   , {25,59,0,0}        ,    1},
  208. X{"White Icky-Thing"        ,0x00000012L,0x00000000L,0x0020,    2,  10,
  209. X  12,    7, 11, 'i', {3,5}   , {63,0,0,0}        ,    1},
  210. X{"Clear Icky-Thing"        ,0x00010012L,0x00000000L,0x0020,    1,  10,
  211. X  12,    6, 11, 'i', {2,5}   , {63,0,0,0}        ,    1},
  212. X{"Giant White Mouse"        ,0x0020000AL,0x00000000L,0x2072,    1,  20,
  213. X   8,    4, 11, 'r', {1,3}   , {25,0,0,0}        ,    1},
  214. X{"Large Brown Snake"        ,0x0000000AL,0x00000000L,0x00B2,    3,  99,
  215. X   4,  35, 10, 'R', {4,6}   , {26,73,0,0}        ,    1},
  216. X{"Large White Snake"        ,0x00000012L,0x00000000L,0x00B2,    2,  99,
  217. X   4,  30, 11, 'R', {3,6}   , {24,0,0,0}        ,    1},
  218. X{"Kobold"            ,0x07020002L,0x00000000L,0x2030,    5,  10,
  219. X  20,  16, 11, 'k', {3,7}   , {5,0,0,0}            ,    1},
  220. X{"White Worm mass"        ,0x00200022L,0x00000000L,0x01B2,    2,  10,
  221. X   7,    1, 10, 'w', {4,4}   , {173,0,0,0}        ,    1},
  222. X{"Floating Eye"            ,0x00000001L,0x0001000DL,0x2100,    1,  10,
  223. X   2,    6, 11, 'e', {3,6}   , {146,0,0,0}        ,    1},
  224. X{"Shrieker Mushroom patch"  ,0x00000001L,0x00000000L,0x10A0,    1,   0,
  225. X   2,    1, 11, ',', {1,1}   , {203,0,0,0}        ,    2},
  226. X{"Blubbering Icky-Thing"    ,0x0B180012L,0x00000000L,0x0020,    8,  10,
  227. X  14,    4, 11, 'i', {5,8}   , {174,210,0,0}        ,    2},
  228. X{"Metallic Green Centipede" ,0x00000012L,0x00000000L,0x0002,    3,  10,
  229. X   5,    4, 12, 'c', {4,4}   , {68,0,0,0}        ,    2},
  230. X{"Novice Warrior"        ,0x07020002L,0x00000000L,0x2030,    6,   5,
  231. X  20,  16, 11, 'p', {9,4}   , {6,0,0,0}            ,    2},
  232. X{"Novice Rogue"            ,0x07020002L,0x00000000L,0x2034,    6,   5,
  233. X  20,  12, 11, 'p', {8,4}   , {5,148,0,0}        ,    2},
  234. X{"Novice Priest"        ,0x07020002L,0x0000108CL,0x2030,    7,   5,
  235. X  20,  10, 11, 'p', {7,4}   , {4,0,0,0}            ,    2},
  236. X{"Novice Mage"            ,0x07020002L,0x0000089CL,0x2030,    7,   5,
  237. X  20,    6, 11, 'p', {6,4}   , {3,0,0,0}            ,    2},
  238. X{"Yellow Mushroom patch"    ,0x00000001L,0x00000000L,0x10A0,    2,   0,
  239. X   2,    1, 11, ',', {1,1}   , {100,0,0,0}        ,    2},
  240. X{"White Jelly"            ,0x00000001L,0x00000000L,0x11A0,   10,  99,
  241. X   2,    1, 12, 'J', {8,8}   , {168,0,0,0}        ,    2},
  242. X{"Giant Green Frog"        ,0x0000000AL,0x00000000L,0x00A2,    6,  30,
  243. X  12,    8, 11, 'f', {2,8}   , {26,0,0,0}        ,    2},
  244. X{"Giant Black Ant"        ,0x0000000AL,0x00000000L,0x0002,    8,  80,
  245. X   8,  20, 11, 'a', {3,6}   , {27,0,0,0}        ,    2},
  246. X{"White Harpy"            ,0x00000012L,0x00000000L,0x2034,    5,  10,
  247. X  16,  17, 11, 'h', {2,5}   , {49,49,25,0}        ,    2},
  248. X{"Blue Yeek"            ,0x07020002L,0x00000000L,0x2030,    4,  10,
  249. X  18,  14, 11, 'y', {2,6}   , {4,0,0,0}            ,    2},
  250. X{"Green Worm mass"        ,0x00200022L,0x00000000L,0x0132,    3,  10,
  251. X   7,    3, 10, 'w', {6,4}   , {140,0,0,0}        ,    2},
  252. X{"Large Black Snake"        ,0x0000000AL,0x00000000L,0x00B2,    9,  75,
  253. X   5,  38, 10, 'R', {4,8}   , {27,74,0,0}        ,    2},
  254. X{"Poltergeist"            ,0x0F15003AL,0x0000001FL,0x110C,    6,  10,
  255. X   8,  15, 13, 'G', {2,5}   , {93,0,0,0}        ,    3},
  256. X{"Metallic Blue Centipede"  ,0x00000012L,0x00000000L,0x0002,    7,  15,
  257. X   6,    6, 12, 'c', {4,5}   , {69,0,0,0}        ,    3},
  258. X{"Giant White Louse"        ,0x00200022L,0x00000000L,0x01F2,    1,  10,
  259. X   6,    5, 12, 'l', {1,1}   , {24,0,0,0}        ,    3},
  260. X{"Black Naga"            ,0x0710000AL,0x00000000L,0x20E4,   20, 120,
  261. X  16,  40, 11, 'n', {6,8}   , {75,0,0,0}        ,    3},
  262. X{"Spotted Mushroom patch"   ,0x00000001L,0x00000000L,0x10A0,    3,   0,
  263. X   2,    1, 11, ',', {1,1}   , {175,0,0,0}        ,    3},
  264. X{"Yellow Jelly"            ,0x00000001L,0x0001000FL,0x11A0,   12,  99,
  265. X   2,    1, 12, 'J', {10,8}  , {169,0,0,0}        ,    3},
  266. X{"Scruffy-Looking Hobbit"   ,0x07020002L,0x00000000L,0x2034,    4,  10,
  267. X  16,    8, 11, 'p', {3,5}   , {3,148,0,0}        ,    3},
  268. X{"Huge Brown Bat"        ,0x00000022L,0x00000000L,0x2162,    4,  40,
  269. X   8,  12, 13, 'b', {2,6}   , {25,0,0,0}        ,    3},
  270. X{"Giant White Ant"        ,0x00000002L,0x00000000L,0x0002,    7,  80,
  271. X   8,  16, 11, 'a', {3,6}   , {27,0,0,0}        ,    3},
  272. X{"Yellow Mold"            ,0x00000001L,0x00000000L,0x10A0,    9,  99,
  273. X   2,  10, 11, 'm', {8,8}   , {3,0,0,0}            ,    3},
  274. X{"Metallic Red Centipede"   ,0x0000000AL,0x00000000L,0x0002,   12,  20,
  275. X   8,    9, 12, 'c', {4,8}   , {69,0,0,0}        ,    3},
  276. X{"Yellow Worm mass"        ,0x00200022L,0x00000000L,0x01B2,    4,  10,
  277. X   7,    4, 10, 'w', {4,8}   , {182,0,0,0}        ,    3},
  278. X{"Large Green Snake"        ,0x0000000AL,0x00000000L,0x00B2,   10,  70,
  279. X   5,  40, 10, 'R', {6,8}   , {27,74,0,0}        ,    3},
  280. X{"Radiation Eye"        ,0x00000001L,0x0001000BL,0x2100,    6,  10,
  281. X   2,    6, 11, 'e', {3,6}   , {88,0,0,0}        ,    3},
  282. X{"Drooling Harpy"        ,0x00000012L,0x00000000L,0x2034,    7,  10,
  283. X  16,  22, 11, 'h', {2,8}   , {49,49,25,79}        ,    3},
  284. X{"Silver Mouse"            ,0x0020000AL,0x00000000L,0x0072,    1,  10,
  285. X   8,    5, 11, 'r', {1,1}   , {212,0,0,0}        ,    4},
  286. X{"Black Mushroom patch"        ,0x00000001L,0x00000000L,0x10A0,    8,   0,
  287. X   2,    1, 11, ',', {8,8}   , {71,0,0,0}        ,    4},
  288. X{"Blue Jelly"            ,0x00000001L,0x00000000L,0x11A0,   14,  99,
  289. X   2,    1, 11, 'J', {12,8}  , {125,0,0,0}        ,    4},
  290. X{"Creeping Copper Coins"    ,0x12000002L,0x00000000L,0x1000,    9,  10,
  291. X   3,  24, 10, '$', {7,8}   , {3,170,0,0}        ,    4},
  292. X{"Giant White Rat"        ,0x0020000AL,0x00000000L,0x2072,    1,  30,
  293. X   8,    7, 11, 'r', {2,2}   , {153,0,0,0}        ,    4},
  294. X{"Giant Black Centipede"    ,0x0000000AL,0x00000000L,0x0002,   11,  30,
  295. X   8,  20, 11, 'c', {5,8}   , {25,59,0,0}        ,    4},
  296. X{"Giant Blue Centipede"        ,0x00000002L,0x00000000L,0x0002,   10,  50,
  297. X   8,  20, 11, 'c', {4,8}   , {26,61,0,0}        ,    4},
  298. X{"Blue Worm mass"        ,0x00200022L,0x00000000L,0x01A2,    5,  10,
  299. X   7,  12, 10, 'w', {5,8}   , {129,0,0,0}        ,    4},
  300. X{"Large Grey Snake"        ,0x0000000AL,0x00000000L,0x00B2,   14,  50,
  301. X   6,  41, 10, 'R', {6,8}   , {28,75,0,0}        ,    4},
  302. X{"Jackal"            ,0x00000012L,0x00000000L,0x2032,    8,  30,
  303. X  12,  16, 11, 'j', {3,8}   , {29,0,0,0}        ,    4},
  304. X{"Green Naga"            ,0x0710000AL,0x00000000L,0x2064,   30, 120,
  305. X  18,  40, 11, 'n', {9,8}   , {75,118,0,0}        ,    5},
  306. X{"Green Glutton Ghost"        ,0x0F150032L,0x0000003FL,0x110C,   15,  10,
  307. X  10,  20, 13, 'G', {3,6}   , {211,0,0,0}        ,    5},
  308. X{"White Mushroom patch"        ,0x00000001L,0x00000000L,0x10A0,    5,   0,
  309. X   2,    1, 11, ',', {1,1}   , {147,0,0,0}        ,    5},
  310. X{"Green Jelly"            ,0x00000001L,0x00000000L,0x1120,   18,  99,
  311. X   2,    1, 12, 'J', {22,8}  , {136,0,0,0}        ,    5},
  312. X{"Skeleton Kobold"        ,0x00020002L,0x00000000L,0x100C,   12,  40,
  313. X  20,  26, 11, 's', {5,8}   , {5,0,0,0}            ,    5},
  314. X{"Silver Jelly"            ,0x00000001L,0x00000000L,0x10A0,   15,  40,
  315. X   2,  25, 11, 'J', {20,8}  , {213,0,0,0}        ,    5},
  316. X{"Giant Black Frog"        ,0x0000000AL,0x00000000L,0x00A2,   12,  40,
  317. X  12,  18, 11, 'f', {4,8}   , {29,0,0,0}        ,    5},
  318. X{"Grey Icky-Thing"        ,0x00000012L,0x00000000L,0x0020,   10,  15,
  319. X  14,  12, 11, 'i', {4,8}   , {66,0,0,0}        ,    5},
  320. X{"Disenchanter Eye"        ,0x00000001L,0x00010009L,0x2100,   20,  10,
  321. X   2,  10, 10, 'e', {7,8}   , {207,0,0,0}        ,    5},
  322. X{"Black Yeek"            ,0x07020002L,0x00000000L,0x2030,    8,  10,
  323. X  18,  16, 11, 'y', {2,8}   , {4,0,0,0}            ,    5},
  324. X{"Red Worm mass"        ,0x00200022L,0x00000000L,0x2192,    6,  10,
  325. X   7,  12, 10, 'w', {5,8}   , {111,0,0,0}        ,    5},
  326. X{"Giant House Fly"        ,0x00000022L,0x00000000L,0x0062,   10,  20,
  327. X  12,  16, 13, 'F', {3,8}   , {25,0,0,0}        ,    5},
  328. X{"Copperhead Snake"        ,0x00000012L,0x00000000L,0x00B2,   15,   1,
  329. X   6,  20, 11, 'R', {4,6}   , {158,0,0,0}        ,    5},
  330. X{"Rot Jelly"            ,0x00000001L,0x00000000L,0x10A0,   15,  99,
  331. X   2,  30, 11, 'J', {20,8}  , {209,0,0,0}        ,    5},
  332. X{"Purple Mushroom patch"    ,0x00000001L,0x00000000L,0x10A0,   12,   0,
  333. X   2,    1, 12, ',', {1,1}   , {183,0,0,0}        ,    6},
  334. X{"Brown Mold"            ,0x00000001L,0x00000000L,0x10A0,   20,  99,
  335. X   2,  12, 11, 'm', {15,8}  , {89,0,0,0}        ,    6},
  336. X{"Giant Brown Bat"        ,0x0000001AL,0x00000000L,0x2162,   10,  30,
  337. X  10,  15, 13, 'b', {3,8}   , {26,0,0,0}        ,    6},
  338. X{"Creeping Silver Coins"    ,0x16000002L,0x00000000L,0x1000,   18,  10,
  339. X   4,  30, 10, '$', {12,8}  , {5,171,0,0}        ,    6},
  340. X{"Orc"                ,0x0B020002L,0x00000000L,0x2034,   16,  30,
  341. X  20,  32, 11, 'o', {9,8}   , {7,0,0,0}            ,    6},
  342. X{"Grey Harpy"            ,0x00000012L,0x00000000L,0x2034,   14,  10,
  343. X  16,  20, 12, 'h', {3,8}   , {50,50,25,0}        ,    6},
  344. X{"Blue Icky-Thing"        ,0x00000012L,0x00000000L,0x0020,   12,  20,
  345. X  14,  14, 11, 'i', {4,8}   , {126,0,0,0}        ,    6},
  346. X{"Rattlesnake"            ,0x00000012L,0x00000000L,0x00B2,   20,   1,
  347. X   6,  24, 11, 'R', {6,7}   , {159,0,0,0}        ,    6},
  348. X{"Bloodshot Eye"        ,0x00000001L,0x00010007L,0x2100,   15,  10,
  349. X   2,    6, 11, 'e', {4,8}   , {143,0,0,0}        ,    7},
  350. X{"Red Naga"            ,0x0710000AL,0x00000000L,0x20E4,   40, 120,
  351. X  20,  40, 11, 'n', {11,8}  , {76,82,0,0}        ,    7},
  352. X{"Red Jelly"            ,0x00000001L,0x00000000L,0x11A0,   26,  99,
  353. X   2,    1, 11, 'J', {26,8}  , {87,0,0,0}        ,    7},
  354. X{"Giant Red Frog"        ,0x0000000AL,0x00000000L,0x00A2,   16,  50,
  355. X  12,  16, 11, 'f', {5,8}   , {83,0,0,0}        ,    7},
  356. X{"Green Icky-Thing"        ,0x00000012L,0x00000000L,0x0020,   18,  20,
  357. X  14,  12, 11, 'i', {5,8}   , {137,0,0,0}        ,    7},
  358. X{"Zombie Kobold"        ,0x00020002L,0x00000000L,0x102C,   14,  30,
  359. X  20,  14, 11, 'z', {6,8}   , {1,1,0,0}            ,    7},
  360. X{"Lost Soul"            ,0x0F15001AL,0x0001002FL,0x110C,   18,  10,
  361. X  12,  10, 11, 'G', {2,8}   , {11,185,0,0}        ,    7},
  362. X{"Greedy Little Gnome"        ,0x0B020002L,0x00000000L,0x2034,   13,  10,
  363. X  18,  14, 11, 'p', {3,8}   , {6,149,0,0}        ,    7},
  364. X{"Giant Green Fly"        ,0x00000022L,0x00000000L,0x0062,   15,  20,
  365. X  12,  14, 12, 'F', {3,8}   , {27,0,0,0}        ,    7},
  366. X{"Brown Yeek"            ,0x07020002L,0x00000000L,0x2030,   11,  10,
  367. X  18,  18, 11, 'y', {3,8}   , {5,0,0,0}            ,    8},
  368. X{"Green Mold"            ,0x00000001L,0x00000000L,0x10A0,   28,  75,
  369. X   2,  14, 11, 'm', {21,8}  , {94,0,0,0}        ,    8},
  370. X{"Skeleton Orc"            ,0x00020002L,0x00000000L,0x100C,   26,  40,
  371. X  20,  36, 11, 's', {10,8}  , {14,0,0,0}        ,    8},
  372. X{"Seedy Looking Human"        ,0x13020002L,0x00000000L,0x2034,   22,  20,
  373. X  20,  26, 11, 'p', {8,8}   , {17,0,0,0}        ,    8},
  374. X{"Red Icky-Thing"        ,0x00000012L,0x00000000L,0x0020,   22,  20,
  375. X  14,  18, 12, 'i', {4,8}   , {64,117,0,0}        ,    8},
  376. X{"Bandit"            ,0x13020002L,0x00000000L,0x2034,   26,  10,
  377. X  20,  24, 11, 'p', {8,8}   , {13,148,0,0}        ,    8},
  378. X{"Yeti"                ,0x00020002L,0x00000000L,0x2024,   30,  10,
  379. X  20,  24, 11, 'Y', {11,8}  , {51,51,27,0}        ,    9},
  380. X{"Bloodshot Icky-Thing"        ,0x00000012L,0x0001000BL,0x0020,   24,  20,
  381. X  14,  18, 11, 'i', {7,8}   , {65,139,0,0}        ,    9},
  382. X{"Giant Grey Rat"        ,0x0020000AL,0x00000000L,0x2072,    2,  20,
  383. X   8,  12, 11, 'r', {2,3}   , {154,0,0,0}        ,    9},
  384. X{"Black Harpy"            ,0x0000000AL,0x00000000L,0x2034,   19,  10,
  385. X  16,  22, 12, 'h', {3,8}   , {50,50,26,0}        ,    9},
  386. X{"Giant Black Bat"        ,0x00000012L,0x00000000L,0x2162,   16,  25,
  387. X  12,  18, 13, 'b', {2,8}   , {29,0,0,0}        ,    9},
  388. X{"Clear Yeek"            ,0x07030002L,0x00000000L,0x0030,   14,  10,
  389. X  18,  24, 11, 'y', {3,6}   , {4,0,0,0}            ,    9},
  390. X{"Orc Shaman"            ,0x0B020002L,0x00008085L,0x2034,   30,  20,
  391. X  20,  15, 11, 'o', {7,8}   , {5,0,0,0}            ,    9},
  392. X{"Giant Red Ant"        ,0x00000002L,0x00000000L,0x0002,   22,  60,
  393. X  12,  34, 11, 'a', {4,8}   , {27,85,0,0}        ,    9},
  394. X{"King Cobra"            ,0x00000012L,0x00000000L,0x00B2,   28,   1,
  395. X   8,  30, 11, 'R', {8,8}   , {144,161,0,0}        ,    9},
  396. X{"Clear Mushroom patch"        ,0x00210001L,0x00000000L,0x10A0,    1,   0,
  397. X   4,    1, 12, ',', {1,1}   , {70,0,0,0}        ,   10},
  398. X{"Giant White Tick"        ,0x0000000AL,0x00000000L,0x0022,   27,  20,
  399. X  12,  40, 10, 't', {15,8}  , {160,0,0,0}        ,   10},
  400. X{"Hairy Mold"            ,0x00000001L,0x00000000L,0x10A0,   32,  70,
  401. X   2,  15, 11, 'm', {15,8}  , {151,0,0,0}        ,   10},
  402. X{"Disenchanter Mold"        ,0x00000001L,0x0001000BL,0x10A0,   40,  70,
  403. X   2,  20, 11, 'm', {16,8}  , {206,0,0,0}        ,   10},
  404. X{"Giant Red Centipede"        ,0x00000002L,0x00000000L,0x0002,   24,  50,
  405. X  12,  26, 12, 'c', {3,8}   , {25,164,0,0}        ,   10},
  406. X{"Creeping Gold Coins"        ,0x1A000002L,0x00000000L,0x1000,   32,  10,
  407. X   5,  36, 10, '$', {18,8}  , {14,172,0,0}        ,   10},
  408. X{"Giant Fruit Fly"        ,0x00200022L,0x00000000L,0x0062,    4,  10,
  409. X   8,  14, 12, 'F', {2,2}   , {25,0,0,0}        ,   10},
  410. X{"Brigand"            ,0x13020002L,0x00000000L,0x2034,   35,  10,
  411. X  20,  32, 11, 'p', {9,8}   , {13,149,0,0}        ,   10},
  412. X{"Orc Zombie"            ,0x00020002L,0x00000000L,0x102C,   30,  25,
  413. X  20,  24, 11, 'z', {11,8}  , {3,3,0,0}            ,   11},
  414. X{"Orc Warrior"            ,0x0B020002L,0x00000000L,0x2034,   34,  25,
  415. X  20,  36, 11, 'o', {11,8}  , {15,0,0,0}        ,   11},
  416. X{"Vorpal Bunny"            ,0x0020000AL,0x00000000L,0x2072,    2,  30,
  417. X   8,  10, 12, 'r', {2,3}   , {28,0,0,0}        ,   11},
  418. X{"Nasty Little Gnome"        ,0x13020002L,0x000020B5L,0x2034,   32,  10,
  419. X  18,  10, 11, 'p', {4,8}   , {4,0,0,0}            ,   11},
  420. X{"Hobgoblin"            ,0x0F020002L,0x00000000L,0x2034,   38,  30,
  421. X  20,  38, 11, 'H', {12,8}  , {9,0,0,0}            ,   11},
  422. X{"Black Mamba"            ,0x00000012L,0x00000000L,0x00B2,   40,   1,
  423. X  10,  32, 12, 'R', {10,8}  , {163,0,0,0}        ,   12},
  424. X{"Grape Jelly"            ,0x00000001L,0x0001000BL,0x11A0,   60,  99,
  425. X   2,    1, 11, 'J', {52,8}  , {186,0,0,0}        ,   12},
  426. X{"Master Yeek"            ,0x07020002L,0x00008018L,0x2030,   28,  10,
  427. X  18,  24, 11, 'y', {5,8}   , {7,0,0,0}            ,   12},
  428. X{"Priest"            ,0x13020002L,0x00000285L,0x2030,   36,  40,
  429. X  20,  22, 11, 'p', {7,8}   , {12,0,0,0}        ,   12},
  430. X{"Giant Clear Ant"        ,0x00010002L,0x00000000L,0x0002,   24,  60,
  431. X  12,  18, 11, 'a', {3,7}   , {27,0,0,0}        ,   12},
  432. X{"Air Spirit"            ,0x00030022L,0x00000000L,0x1000,   40,  20,
  433. X  12,  20, 13, 'E', {5,8}   , {2,0,0,0}            ,   12},
  434. X{"Skeleton Human"        ,0x00020002L,0x00000000L,0x100C,   38,  30,
  435. X  20,  30, 11, 's', {12,8}  , {7,0,0,0}            ,   12},
  436. X{"Human Zombie"            ,0x00020002L,0x00000000L,0x102C,   34,  20,
  437. X  20,  24, 11, 'z', {11,8}  , {3,3,0,0}            ,   12},
  438. X{"Moaning Spirit"        ,0x0F15000AL,0x0001002FL,0x110C,   44,  10,
  439. X  14,  20, 11, 'G', {4,8}   , {99,178,0,0}        ,   12},
  440. X{"Swordsman"            ,0x13020002L,0x00000000L,0x2030,   40,  20,
  441. X  20,  34, 11, 'p', {11,8}  , {18,0,0,0}        ,   12},
  442. X{"Killer Brown Beetle"        ,0x0000000AL,0x00000000L,0x0002,   38,  30,
  443. X  10,  40, 11, 'K', {13,8}  , {41,0,0,0}        ,   13},
  444. X{"Ogre"                ,0x07020002L,0x00000000L,0x2034,   42,  30,
  445. X  20,  32, 11, 'o', {13,8}  , {16,0,0,0}        ,   13},
  446. X{"Giant Red Speckled Frog"  ,0x0000000AL,0x00000000L,0x00A2,   32,  30,
  447. X  12,  20, 11, 'f', {6,8}   , {41,0,0,0}        ,   13},
  448. X{"Magic User"            ,0x13020002L,0x00002413L,0x2030,   35,  10,
  449. X  20,  10, 11, 'p', {7,8}   , {11,0,0,0}        ,   13},
  450. X{"Black Orc"            ,0x0B020002L,0x00000000L,0x2034,   40,  20,
  451. X  20,  36, 11, 'o', {12,8}  , {17,0,0,0}        ,   13},
  452. X{"Giant Long-Eared Bat"        ,0x00000012L,0x00000000L,0x2162,   20,  20,
  453. X  12,  20, 13, 'b', {5,8}   , {27,50,50,0}        ,   13},
  454. X{"Giant Gnat"            ,0x00200022L,0x00000000L,0x0062,    1,  10,
  455. X   8,    4, 13, 'F', {1,2}   , {24,0,0,0}        ,   13},
  456. X{"Killer Green Beetle"        ,0x0000000AL,0x00000000L,0x0002,   46,  30,
  457. X  12,  45, 11, 'K', {16,8}  , {43,0,0,0}        ,   14},
  458. X{"Giant Flea"            ,0x00200022L,0x00000000L,0x0062,    1,  10,
  459. X   8,  25, 12, 'F', {2,2}   , {25,0,0,0}        ,   14},
  460. X{"Giant White Dragon Fly"   ,0x00000012L,0x0040000AL,0x0062,   54,  50,
  461. X  20,  20, 11, 'F', {5,8}   , {122,0,0,0}        ,   14},
  462. X{"Hill Giant"            ,0x07020002L,0x00000000L,0x2034,   52,  50,
  463. X  20,  36, 11, 'P', {16,8}  , {19,0,0,0}        ,   14},
  464. X{"Skeleton Hobgoblin"        ,0x00020002L,0x00000000L,0x100C,   46,  30,
  465. X  20,  34, 11, 's', {13,8}  , {14,0,0,0}        ,   14},
  466. X{"Flesh Golem"            ,0x00000002L,0x00000000L,0x1030,   48,  10,
  467. X  12,  10, 11, 'g', {12,8}  , {5,5,0,0}            ,   14},
  468. X{"White Dragon Bat"        ,0x00000012L,0x00400004L,0x0162,   40,  50,
  469. X  12,  20, 13, 'b', {2,6}   , {121,0,0,0}        ,   14},
  470. X{"Giant Black Louse"        ,0x00200012L,0x00000000L,0x01F2,    1,  10,
  471. X   6,    7, 12, 'l', {1,1}   , {25,0,0,0}        ,   14},
  472. X{"Guardian Naga"        ,0x1710000AL,0x00000000L,0x20E4,   60, 120,
  473. X  20,  50, 11, 'n', {24,8}  , {77,31,0,0}        ,   15},
  474. X{"Giant Grey Bat"        ,0x00000012L,0x00000000L,0x2162,   22,  15,
  475. X  12,  22, 13, 'b', {4,8}   , {29,50,50,0}        ,   15},
  476. X{"Giant Clear Centipede"    ,0x00010002L,0x00000000L,0x0002,   30,  30,
  477. X  12,  30, 11, 'c', {5,8}   , {34,62,0,0}        ,   15},
  478. X{"Giant Yellow Tick"        ,0x0000000AL,0x00000000L,0x0022,   48,  20,
  479. X  12,  48, 10, 't', {20,8}  , {162,0,0,0}        ,   15},
  480. X{"Giant Ebony Ant"        ,0x00200002L,0x00000000L,0x0002,    3,  60,
  481. X  12,  24, 11, 'a', {3,4}   , {33,0,0,0}        ,   15},
  482. X{"Frost Giant"            ,0x07020002L,0x00000000L,0x0024,   54,  50,
  483. X  20,  38, 11, 'P', {17,8}  , {120,0,0,0}        ,   15},
  484. X{"Clay Golem"            ,0x00000002L,0x00000000L,0x1200,   50,  10,
  485. X  12,  20, 11, 'g', {14,8}  , {7,7,0,0}            ,   15},
  486. X{"Huge White Bat"        ,0x00200012L,0x00000000L,0x2162,    3,  40,
  487. X   7,  12, 12, 'b', {3,8}   , {29,0,0,0}        ,   15},
  488. X{"Giant Tan Bat"        ,0x00000012L,0x00000000L,0x2162,   18,  40,
  489. X  12,  18, 12, 'b', {3,8}   , {95,49,49,0}        ,   15},
  490. X{"Violet Mold"            ,0x00000001L,0x00010009L,0x10A0,   50,  70,
  491. X   2,  15, 11, 'm', {17,8}  , {145,0,0,0}        ,   15},
  492. X{"Umber Hulk"            ,0x00020002L,0x00000000L,0x2124,   75,  10,
  493. X  20,  20, 11, 'U', {20,8}  , {92,5,5,36}        ,   16},
  494. X{"Gelatinous Cube"        ,0x2F18000AL,0x00000000L,0x1020,   36,   1,
  495. X  12,  18, 10, 'C', {45,8}  , {115,0,0,0}        ,   16},
  496. X{"Giant Black Rat"        ,0x0020000AL,0x00000000L,0x2072,    3,  20,
  497. X   8,  16, 11, 'r', {3,4}   , {155,0,0,0}        ,   16},
  498. X{"Giant Green Dragon Fly"   ,0x00000012L,0x0010000AL,0x0032,   58,  50,
  499. X  20,  20, 11, 'F', {5,8}   , {156,0,0,0}        ,   16},
  500. X{"Fire Giant"            ,0x07020002L,0x00000000L,0x2014,   62,  50,
  501. X  20,  40, 11, 'P', {20,8}  , {102,0,0,0}        ,   16},
  502. X{"Green Dragon Bat"        ,0x00000012L,0x00100004L,0x2112,   44,  50,
  503. X  12,  22, 13, 'b', {2,7}   , {153,0,0,0}        ,   16},
  504. X{"Quasit"            ,0x1103000AL,0x000010FAL,0x1004,   48,  20,
  505. X  20,  30, 11, 'q', {5,8}   , {176,51,51,0}        ,   16},
  506. X{"Troll"            ,0x0F020002L,0x00000000L,0x2024,   64,  40,
  507. X  20,  40, 11, 'T', {17,8}  , {3,3,29,0}        ,   17},
  508. X{"Water Spirit"            ,0x0000000AL,0x00000000L,0x1020,   58,  40,
  509. X  12,  28, 12, 'E', {8,8}   , {13,0,0,0}        ,   17},
  510. X{"Giant Brown Scorpion"        ,0x0000000AL,0x00000000L,0x0002,   62,  20,
  511. X  12,  44, 11, 'S', {11,8}  , {34,86,0,0}        ,   17},
  512. X{"Earth Spirit"            ,0x0016000AL,0x00000000L,0x1200,   64,  50,
  513. X  10,  40, 11, 'E', {13,8}  , {7,7,0,0}            ,   17},
  514. X{"Fire Spirit"            ,0x0000000AL,0x00000000L,0x3010,   66,  20,
  515. X  16,  30, 12, 'E', {10,8}  , {101,0,0,0}        ,   18},
  516. X{"Uruk-Hai Orc"            ,0x0B020002L,0x00000000L,0x2034,   68,  20,
  517. X  20,  42, 11, 'o', {14,8}  , {18,0,0,0}        ,   18},
  518. X{"Stone Giant"            ,0x07020002L,0x00000000L,0x2204,   80,  50,
  519. X  20,  40, 11, 'P', {22,8}  , {20,0,0,0}        ,   18},
  520. X{"Stone Golem"            ,0x00000002L,0x00000000L,0x1200,  100,  10,
  521. X  12,  75, 10, 'g', {28,8}  , {9,9,0,0}            ,   19},
  522. X{"Grey Ooze"            ,0x07180022L,0x00000000L,0x10A0,   40,   1,
  523. X  15,  10, 11, 'O', {6,8}   , {127,0,0,0}        ,   19},
  524. X{"Disenchanter Ooze"        ,0x07180022L,0x00000000L,0x10B0,   50,   1,
  525. X  15,  15, 11, 'O', {6,8}   , {205,0,0,0}        ,   19},
  526. X{"Giant Spotted Rat"        ,0x0020000AL,0x00000000L,0x2072,    3,  20,
  527. X   8,  20, 11, 'r', {4,3}   , {155,0,0,0}        ,   19},
  528. X{"Mummified Kobold"        ,0x0B020002L,0x00000000L,0x102C,   46,  75,
  529. X  20,  24, 11, 'M', {13,8}  , {5,5,0,0}            ,   19},
  530. X{"Killer Black Beetle"        ,0x0000000AL,0x00000000L,0x0002,   75,  30,
  531. X  12,  46, 11, 'K', {18,8}  , {44,0,0,0}        ,   19},
  532. X{"Red Mold"            ,0x00000001L,0x00000000L,0x3090,   64,  70,
  533. X   2,  16, 11, 'm', {17,8}  , {108,0,0,0}        ,   19},
  534. X{"Quylthulg"            ,0x00010004L,0x00002017L,0x5000,  200,   0,
  535. X  10,    1, 11, 'Q', {4,8}   , {0,0,0,0}            ,   20},
  536. X{"Giant Red Bat"        ,0x00000012L,0x00000000L,0x2162,   40,  20,
  537. X  12,  24, 12, 'b', {5,8}   , {30,51,51,0}        ,   20},
  538. X{"Giant Black Dragon Fly"   ,0x00000012L,0x00200009L,0x0072,   58,  50,
  539. X  20,  22, 11, 'F', {4,8}   , {141,0,0,0}        ,   20},
  540. X{"Cloud Giant"            ,0x07020002L,0x00000000L,0x2034,  125,  50,
  541. X  20,  44, 11, 'P', {24,8}  , {130,0,0,0}        ,   20},
  542. X{"Black Dragon Bat"        ,0x00000012L,0x00200004L,0x2152,   50,  50,
  543. X  12,  24, 13, 'b', {2,8}   , {112,0,0,0}        ,   21},
  544. X{"Blue Dragon Bat"        ,0x00000012L,0x00080004L,0x2052,   54,  50,
  545. X  12,  26, 13, 'b', {3,6}   , {131,0,0,0}        ,   21},
  546. X{"Mummified Orc"        ,0x0B020002L,0x00000000L,0x102C,   56,  75,
  547. X  20,  28, 11, 'M', {14,8}  , {13,13,0,0}        ,   21},
  548. X{"Killer Boring Beetle"        ,0x0000000AL,0x00000000L,0x0002,   70,  30,
  549. X  12,  48, 11, 'K', {18,8}  , {44,0,0,0}        ,   21},
  550. X{"Killer Stag Beetle"        ,0x0000000AL,0x00000000L,0x0002,   80,  30,
  551. X  12,  50, 11, 'K', {20,8}  , {41,10,0,0}        ,   22},
  552. X{"Black Mold"            ,0x00000081L,0x00000000L,0x10A0,   68,  50,
  553. X   2,  18, 11, 'm', {15,8}  , {21,0,0,0}        ,   22},
  554. X{"Iron Golem"            ,0x00000002L,0x00000000L,0x1080,  160,  10,
  555. X  12,  99,  9, 'g', {80,8}  , {10,10,0,0}        ,   22},
  556. X{"Giant Yellow Scorpion"    ,0x0000000AL,0x00000000L,0x0002,   60,  20,
  557. X  12,  38, 11, 'S', {12,8}  , {31,167,0,0}        ,   22},
  558. X{"Green Ooze"            ,0x073A0012L,0x00000000L,0x1030,    6,   1,
  559. X  15,    5, 10, 'O', {4,8}   , {116,0,0,0}        ,   22},
  560. X{"Black Ooze"            ,0x073A0012L,0x0001000BL,0x1030,    7,   1,
  561. X  10,    6,  9, 'O', {6,8}   , {138,0,0,0}        ,   23},
  562. X{"Warrior"            ,0x13020002L,0x00000000L,0x2030,   60,  40,
  563. X  20,  40, 11, 'p', {15,8}  , {18,0,0,0}        ,   23},
  564. X{"Red Dragon Bat"        ,0x00000012L,0x00800004L,0x2152,   60,  50,
  565. X  12,  28, 13, 'b', {3,8}   , {105,0,0,0}        ,   23},
  566. X{"Killer Blue Beetle"        ,0x0000000AL,0x00000000L,0x0002,   85,  30,
  567. X  14,  50, 11, 'K', {20,8}  , {44,0,0,0}        ,   23},
  568. X{"Giant Silver Ant"        ,0x0000000AL,0x00000000L,0x0002,   45,  60,
  569. X  10,  38, 11, 'a', {6,8}   , {114,0,0,0}        ,   23},
  570. X{"Crimson Mold"            ,0x00000001L,0x00000000L,0x10A0,   65,  50,
  571. X   2,  18, 11, 'm', {16,8}  , {2,97,0,0}        ,   23},
  572. X{"Forest Wight"            ,0x0F02000AL,0x0000100FL,0x112C,  140,  30,
  573. X  20,  30, 11, 'W', {12,8}  , {5,5,187,0}        ,   24},
  574. X{"Berzerker"            ,0x13020002L,0x00000000L,0x2030,   65,  10,
  575. X  20,  20, 11, 'p', {15,8}  , {7,7,0,0}            ,   24},
  576. X{"Mummified Human"        ,0x0B020002L,0x00000000L,0x102C,   70,  60,
  577. X  20,  34, 11, 'M', {17,8}  , {13,13,0,0}        ,   24},
  578. X{"Banshee"            ,0x0F15001AL,0x0001002FL,0x110C,   60,  10,
  579. X  20,  24, 12, 'G', {6,8}   , {99,188,0,0}        ,   24},
  580. X{"Giant Troll"            ,0x0F020002L,0x00000000L,0x2024,   85,  50,
  581. X  20,  40, 11, 'T', {19,8}  , {5,5,41,0}        ,   25},
  582. X{"Giant Brown Tick"        ,0x0000000AL,0x00000000L,0x0022,   70,  20,
  583. X  12,  50, 10, 't', {18,8}  , {157,142,0,0}        ,   25},
  584. X{"Killer Red Beetle"        ,0x0000000AL,0x00000000L,0x0002,   85,  30,
  585. X  14,  50, 11, 'K', {20,8}  , {84,0,0,0}        ,   25},
  586. X{"Wooden Mold"            ,0x00000001L,0x00000000L,0x10A0,  100,  50,
  587. X   2,  50, 11, 'm', {25,8}  , {171,0,0,0}        ,   25},
  588. X{"Giant Blue Dragon Fly"    ,0x00000012L,0x00080009L,0x0072,   75,  50,
  589. X  20,  24, 11, 'F', {6,8}   , {29,0,0,0}        ,   25},
  590. X{"Giant Grey Ant Lion"        ,0x0008000AL,0x00000000L,0x0032,   90,  40,
  591. X  10,  40, 11, 'A', {19,8}  , {39,0,0,0}        ,   26},
  592. X{"Disenchanter Bat"        ,0x00000012L,0x00000000L,0x2162,   75,   1,
  593. X  14,  24, 13, 'b', {4,8}   , {204,0,0,0}        ,   26},
  594. X{"Giant Fire Tick"        ,0x0000000AL,0x00000000L,0x2012,   90,  20,
  595. X  14,  54, 11, 't', {16,8}  , {109,0,0,0}        ,   26},
  596. X{"White Wraith"            ,0x0F02000AL,0x0000100CL,0x112C,  165,  10,
  597. X  20,  40, 11, 'W', {15,8}  , {5,5,189,0}        ,   26},
  598. X{"Giant Black Scorpion"        ,0x0000000AL,0x00000000L,0x0002,   85,  20,
  599. X  12,  50, 11, 'S', {13,8}  , {32,167,0,0}        ,   26},
  600. X{"Clear Ooze"            ,0x0719000AL,0x00000000L,0x10B0,   12,   1,
  601. X  10,  14, 11, 'O', {4,8}   , {90,0,0,0}        ,   26},
  602. X{"Killer Fire Beetle"        ,0x0000000AL,0x00000000L,0x2012,   95,  30,
  603. X  14,  45, 11, 'K', {13,8}  , {41,110,0,0}        ,   27},
  604. X{"Vampire"            ,0x17020002L,0x00001209L,0x112C,  175,  10,
  605. X  20,  45, 11, 'V', {20,8}  , {5,5,190,0}        ,   27},
  606. X{"Giant Red Dragon Fly"        ,0x00000012L,0x00800008L,0x2052,   75,  50,
  607. X  20,  24, 11, 'F', {7,8}   , {96,0,0,0}        ,   27},
  608. X{"Shimmering Mold"        ,0x00000081L,0x00000000L,0x10A0,  180,  50,
  609. X   2,  24, 11, 'm', {32,8}  , {135,0,0,0}        ,   27},
  610. X{"Black Knight"            ,0x13020002L,0x0000010FL,0x2034,  140,  10,
  611. X  20,  60, 11, 'p', {25,8}  , {23,0,0,0}        ,   28},
  612. X{"Mage"                ,0x13020002L,0x00002C73L,0x2030,  150,  10,
  613. X  20,  30, 11, 'p', {10,8}  , {14,0,0,0}        ,   28},
  614. X{"Ice Troll"            ,0x0F020002L,0x00000000L,0x0024,  160,  50,
  615. X  20,  46, 11, 'T', {22,8}  , {4,4,123,0}        ,   28},
  616. X{"Giant Purple Worm"        ,0x0000000AL,0x00000000L,0x2032,  400,  30,
  617. X  14,  65, 11, 'w', {65,8}  , {7,113,166,0}        ,   29},
  618. X{"Young Blue Dragon"        ,0x1F00000AL,0x0008100BL,0x2005,  300,  70,
  619. X  20,  50, 11, 'd', {33,8}  , {52,52,29,0}        ,   29},
  620. X{"Young White Dragon"        ,0x1F00000AL,0x0040100BL,0x0025,  275,  70,
  621. X  20,  50, 11, 'd', {32,8}  , {52,52,29,0}        ,   29},
  622. X{"Young Green Dragon"        ,0x1F00000AL,0x0010100BL,0x2005,  290,  70,
  623. X  20,  50, 11, 'd', {32,8}  , {52,52,29,0}        ,   29},
  624. X{"Giant Fire Bat"        ,0x00000012L,0x00000000L,0x2152,   85,  10,
  625. X  14,  30, 12, 'b', {5,8}   , {106,52,52,0}        ,   29},
  626. X{"Giant Glowing Rat"        ,0x0020000AL,0x00000000L,0x2072,    4,  20,
  627. X   8,  24, 11, 'r', {3,3}   , {132,0,0,0}        ,   29},
  628. X    /* Now things are going to get tough.             */
  629. X    /* Some of the creatures have Max hit points, denoted in */
  630. X    /* their CDEFENSE flags as the '4000' bit set         */
  631. X{"Skeleton Troll"        ,0x00020002L,0x00000000L,0x500C,  225,  20,
  632. X  20,  55, 11, 's', {14,8}  , {5,5,41,0}        ,   30},
  633. X{"Giant Lightning Bat"        ,0x00000012L,0x00000000L,0x2042,   80,  10,
  634. X  15,  34, 12, 'b', {8,8}   , {133,53,53,0}        ,   30},
  635. X{"Giant Static Ant"        ,0x0000000AL,0x00000000L,0x0002,   80,  60,
  636. X  10,  40, 11, 'a', {8,8}   , {134,0,0,0}        ,   30},
  637. X{"Grave Wight"            ,0x0F02000AL,0x0000110AL,0x512C,  325,  30,
  638. X  20,  35, 11, 'W', {12,8}  , {6,6,191,0}        ,   30},
  639. X{"Killer Slicer Beetle"        ,0x0000000AL,0x00000000L,0x0002,  200,  30,
  640. X  14,  55, 11, 'K', {22,8}  , {48,0,0,0}        ,   30},
  641. X{"Giant White Ant Lion"        ,0x0008000AL,0x00000000L,0x0022,  175,  40,
  642. X  12,  45, 11, 'A', {20,8}  , {124,0,0,0}        ,   30},
  643. X{"Ghost"            ,0x1715000AL,0x0001002FL,0x510C,  350,  10,
  644. X  20,  30, 12, 'G', {13,8}  , {99,192,184,0}        ,   31},
  645. X{"Giant Black Ant Lion"        ,0x0008000AL,0x00000000L,0x0032,  170,  40,
  646. X  14,  45, 11, 'A', {23,8}  , {39,119,0,0}        ,   31},
  647. X{"Death Watch Beetle"        ,0x0000000AL,0x00000000L,0x0002,  190,  30,
  648. X  16,  60, 11, 'K', {25,8}  , {47,67,0,0}        ,   31},
  649. X{"Ogre Mage"            ,0x0B020002L,0x0000A355L,0x6034,  250,  30,
  650. X  20,  42, 11, 'o', {14,8}  , {19,0,0,0}        ,   31},
  651. X{"Two-Headed Troll"        ,0x0F020002L,0x00000000L,0x6024,  275,  50,
  652. X  20,  48, 11, 'T', {14,8}  , {7,7,29,29}        ,   32},
  653. X{"Invisible Stalker"        ,0x00030022L,0x00000000L,0x1000,  200,  20,
  654. X  20,  46, 13, 'E', {19,8}  , {5,0,0,0}            ,   32},
  655. X{"Giant Hunter Ant"        ,0x00000002L,0x00000000L,0x0002,  150,   1,
  656. X  16,  40, 11, 'a', {12,8}   , {46,0,0,0}        ,   32},
  657. X{"Ninja"            ,0x13020002L,0x00000000L,0x6034,  300,  10,
  658. X  20,  65, 11, 'p', {15,8}  , {152,80,0,0}        ,   32},
  659. X{"Barrow Wight"            ,0x0F02000AL,0x00001308L,0x512C,  375,  10,
  660. X  20,  40, 11, 'W', {13,8}  , {7,7,193,0}        ,   33},
  661. X{"Skeleton 2-Headed Troll"  ,0x00020002L,0x00000000L,0x500C,  325,  20,
  662. X  20,  48, 11, 's', {20,8}  , {8,8,28,28}        ,   33},
  663. X{"Water Elemental"        ,0x0008000AL,0x00000000L,0x1020,  325,  50,
  664. X  12,  36, 11, 'E', {25,8}  , {9,9,0,0}            ,   33},
  665. X{"Fire Elemental"        ,0x0008000AL,0x00000000L,0x3010,  350,  70,
  666. X  16,  40, 10, 'E', {25,8}  , {103,0,0,0}        ,   33},
  667. X{"Lich"                ,0x1F020002L,0x00019F75L,0x510C,  750,  60,
  668. X  20,  50, 11, 'L', {25,8}  , {179,194,214,0}        ,   34},
  669. X{"Master Vampire"        ,0x17020002L,0x00001307L,0x512C,  700,  10,
  670. X  20,  55, 11, 'V', {23,8}  , {5,5,195,0}        ,   34},
  671. X{"Spirit Troll"            ,0x17150002L,0x00000000L,0x510C,  425,  10,
  672. X  20,  40, 11, 'G', {15,8}  , {53,53,29,185}        ,   34},
  673. X{"Giant Red Scorpion"        ,0x0000000AL,0x00000000L,0x0002,  275,  40,
  674. X  12,  50, 12, 'S', {18,8}  , {29,165,0,0}        ,   34},
  675. X{"Earth Elemental"        ,0x001E000AL,0x00000000L,0x1200,  375,  90,
  676. X  10,  60, 10, 'E', {30,8}  , {22,22,0,0}        ,   34},
  677. X{"Young Black Dragon"        ,0x1F00000AL,0x0020100BL,0x6005,  600,  50,
  678. X  20,  55, 11, 'd', {32,8}  , {53,53,29,0}        ,   35},
  679. X{"Young Red Dragon"        ,0x1F00000AL,0x0080100AL,0x6015,  650,  50,
  680. X  20,  60, 11, 'd', {36,8}  , {54,54,37,0}        ,   35},
  681. X{"Necromancer"            ,0x13020002L,0x00005763L,0x6030,  600,  10,
  682. X  20,  40, 11, 'p', {17,8}  , {15,0,0,0}        ,   35},
  683. X{"Mummified Troll"        ,0x0F020002L,0x00000000L,0x502C,  400,  50,
  684. X  20,  38, 11, 'M', {18,8}  , {15,15,0,0}        ,   35},
  685. X{"Giant Red Ant Lion"        ,0x0008000AL,0x00000000L,0x2012,  350,  40,
  686. X  14,  48, 11, 'A', {23,8}  , {107,0,0,0}        ,   35},
  687. X{"Mature White Dragon"        ,0x2F00000AL,0x0040100AL,0x4025, 1000,  70,
  688. X  20,  65, 11, 'd', {48,8}  , {54,54,37,0}        ,   35},
  689. X{"Xorn"                ,0x00160002L,0x00000000L,0x4200,  650,  10,
  690. X  20,  80, 11, 'X', {20,8}  , {5,5,5,0}            ,   36},
  691. X{"Giant Mottled Ant Lion"   ,0x0008000AL,0x00000000L,0x0032,  350,  40,
  692. X  14,  50, 12, 'A', {24,8}  , {38,0,0,0}        ,   36},
  693. X{"Grey Wraith"            ,0x0F02000AL,0x00001308L,0x512C,  700,  10,
  694. X  20,  50, 11, 'W', {23,8}  , {9,9,196,0}        ,   36},
  695. X{"Young Multi-Hued Dragon"  ,0x4F00000AL,0x00F81005L,0x6005, 1250,  50,
  696. X  20,  55, 11, 'd', {40,8}  , {55,55,38,0}        ,   36},
  697. X{"Mature Blue Dragon"        ,0x2F00000AL,0x00081009L,0x6005, 1200,  70,
  698. X  20,  75, 11, 'd', {48,8}  , {54,54,38,0}        ,   36},
  699. X{"Mature Green Dragon"        ,0x2F00000AL,0x0010100AL,0x6005, 1100,  70,
  700. X  20,  70, 11, 'd', {48,8}  , {52,52,29,0}        ,   36},
  701. X{"Iridescent Beetle"        ,0x0000000AL,0x00000000L,0x0002,  850,  30,
  702. X  16,  60, 11, 'K', {32,8}  , {45,10,146,0}        ,   37},
  703. X{"King Vampire"            ,0x17020002L,0x00001307L,0x512C, 1000,  10,
  704. X  20,  65, 11, 'V', {38,8}  , {5,5,198,0}        ,   37},
  705. X{"King Lich"            ,0x1F020002L,0x00019F73L,0x510C, 1400,  50,
  706. X  20,  65, 11, 'L', {52,8}  , {180,197,214,0}        ,   37},
  707. X{"Mature Red Dragon"        ,0x2F00000AL,0x00801808L,0x6015, 1400,  30,
  708. X  20,  80, 11, 'd', {60,8}  , {56,56,39,0}        ,   37},
  709. X{"Mature Black Dragon"        ,0x2F00000AL,0x00201009L,0x6005, 1350,  30,
  710. X  20,  55, 11, 'd', {58,8}  , {54,54,38,0}        ,   37},
  711. X{"Mature Multi-Hued Dragon" ,0x6F00000AL,0x00F81A05L,0x6005, 1650,  50,
  712. X  20,  65, 11, 'd', {80,8}  , {56,56,39,0}        ,   38},
  713. X{"Ancient White Dragon"        ,0x4F000002L,0x00401A09L,0x4025, 1500,  80,
  714. X  20,  80, 12, 'D', {88,8}  , {54,54,37,0}        ,   38},
  715. X{"Emperor Wight"        ,0x1B02000AL,0x00001306L,0x512C, 1600,  10,
  716. X  20,  40, 12, 'W', {48,8}  , {10,10,199,0}        ,   38},
  717. X{"Black Wraith"            ,0x1F02000AL,0x00001307L,0x512C, 1700,  10,
  718. X  20,  55, 11, 'W', {50,8}  , {10,10,200,0}        ,   38},
  719. X{"Nether Wraith"        ,0x1F07000AL,0x00005316L,0x512C, 2100,  10,
  720. X  20,  55, 11, 'W', {58,8}  , {10,10,202,0}        ,   39},
  721. X{"Sorcerer"            ,0x1F020002L,0x0000FF73L,0x6030, 2150,  10,
  722. X  20,  50, 12, 'p', {30,8}  , {16,0,0,0}        ,   39},
  723. X{"Ancient Blue Dragon"        ,0x4F000002L,0x00081A08L,0x6005, 2500,  80,
  724. X  20,  90, 12, 'D', {87,8}  , {55,55,39,0}        ,   39},
  725. X{"Ancient Green Dragon"        ,0x4F000002L,0x00101A09L,0x6005, 2400,  80,
  726. X  20,  85, 12, 'D', {90,8}  , {54,54,38,0}        ,   39},
  727. X{"Ancient Black Dragon"        ,0x4F000002L,0x00201A07L,0x6005, 2500,  70,
  728. X  20,  90, 12, 'D', {90,8}  , {55,55,38,0}        ,   39},
  729. X{"Crystal Ooze"            ,0x073B000AL,0x00000000L,0x10A0,    8,   1,
  730. X  10,  30,  9, 'O', {12,8}  , {128,0,0,0}        ,   40},
  731. X{"Disenchanter Worm"        ,0x00200022L,0x00000000L,0x01B2,   30,  10,
  732. X   7,    5, 10, 'w', {10,8}  , {208,0,0,0}        ,   40},
  733. X{"Rotting Quylthulg"        ,0x00010004L,0x00004014L,0x5000, 1000,   0,
  734. X  20,    1, 12, 'Q', {12,8}  , {0,0,0,0}            ,   40},
  735. X{"Ancient Red Dragon"        ,0x6F000002L,0x00801E06L,0x6015, 2750,  70,
  736. X  20, 100, 12, 'D', {105,8} , {56,56,40,0}        ,   40},
  737. X{"Death Quasit"            ,0x1103000AL,0x000010FAL,0x1004, 1000,   0,
  738. X  20,  80, 13, 'q', {55,8}  , {177,58,58,0}        ,   40},
  739. X{"Emperor Lich"            ,0x2F020002L,0x00019F72L,0x510C,10000,  50,
  740. X  20,  75, 12, 'L', {38,40} , {181,201,214,0}        ,   40},
  741. X{"Ancient Multi-Hued Dragon",0x7F000002L,0x00F89E05L,0x6005,12000,  70,
  742. X  20, 100, 12, 'D', {52,40} , {57,57,42,0}        ,   40},
  743. X    /* Winning creatures should follow here.             */
  744. X    /* Winning creatures are denoted by the 32 bit in CMOVE         */
  745. X    /* Iggy is not a win creature, just a royal pain in the ass.     */
  746. X{"Evil Iggy"            ,0x7F130002L,0x0001D713L,0x5004,18000,   0,
  747. X  30,  80, 12, 'p', {60,40} , {81,150,0,0}        ,   50},
  748. X    /* Here is the only actual win creature.             */
  749. X{"Balrog"            ,0xFF1F0002L,0x0081C743L,0x5004,55000L,   0,
  750. X  40, 125, 13, 'B', {75,40} , {104,78,214,0}        ,  100}
  751. X};
  752. X#endif
  753. X
  754. X/* ERROR: attack #35 is no longer used */
  755. Xstruct m_attack_type monster_attacks[N_MONS_ATTS] = {
  756. X/* 0 */    {0, 0, 0, 0},    {1, 1, 1, 2},    {1, 1, 1, 3},    {1, 1, 1, 4},
  757. X    {1, 1, 1, 5},    {1, 1, 1, 6},    {1, 1, 1, 7},    {1, 1, 1, 8},
  758. X    {1, 1, 1, 9},    {1, 1, 1, 10},    {1, 1, 1, 12},    {1, 1, 2, 2},
  759. X    {1, 1, 2, 3},    {1, 1, 2, 4},    {1, 1, 2, 5},    {1, 1, 2, 6},
  760. X    {1, 1, 2, 8},    {1, 1, 3, 4},    {1, 1, 3, 5},    {1, 1, 3, 6},
  761. X/* 20 */{1, 1, 3, 8},    {1, 1, 4, 3},    {1, 1, 4, 6},    {1, 1, 5, 5},
  762. X    {1, 2, 1, 1},    {1, 2, 1, 2},    {1, 2, 1, 3},    {1, 2, 1, 4},
  763. X    {1, 2, 1, 5},    {1, 2, 1, 6},    {1, 2, 1, 7},    {1, 2, 1, 8},
  764. X    {1, 2, 1, 10},    {1, 2, 2, 3},    {1, 2, 2, 4},    {1, 2, 2, 5},
  765. X    {1, 2, 2, 6},    {1, 2, 2, 8},    {1, 2, 2, 10},    {1, 2, 2, 12},
  766. X/* 40 */{1, 2, 2, 14},    {1, 2, 3, 4},    {1, 2, 3, 12},    {1, 2, 4, 4},
  767. X    {1, 2, 4, 5},    {1, 2, 4, 6},    {1, 2, 4, 8},    {1, 2, 5, 4},
  768. X    {1, 2, 5, 8},    {1, 3, 1, 1},    {1, 3, 1, 2},    {1, 3, 1, 3},
  769. X    {1, 3, 1, 4},    {1, 3, 1, 5},    {1, 3, 1, 8},    {1, 3, 1, 9},
  770. X    {1, 3, 1, 10},    {1, 3, 1, 12},    {1, 3, 3, 3},    {1, 4, 1, 2},
  771. X/* 60 */{1, 4, 1, 3},    {1, 4, 1, 4},    {1, 4, 2, 4},    {1, 5, 1, 2},
  772. X    {1, 5, 1, 3},    {1, 5, 1, 4},    {1, 5, 1, 5},    {1, 10, 5, 6},
  773. X    {1, 12, 1, 1},    {1, 12, 1, 2},    {1, 13, 1, 1},    {1, 13, 1, 3},
  774. X    {1, 14, 0, 0},    {1, 16, 1, 4},    {1, 16, 1, 6},    {1, 16, 1, 8},
  775. X    {1, 16, 1, 10},    {1, 16, 2, 8},    {1, 17, 8, 12},    {1, 18, 0, 0},
  776. X/* 80 */{2, 1, 3, 4},    {2, 1, 4, 6},    {2, 2, 1, 4},    {2, 2, 2, 4},
  777. X    {2, 2, 4, 4},    {2, 4, 1, 4},    {2, 4, 1, 7},    {2, 5, 1, 5},
  778. X    {2, 7, 1, 6},    {3, 1, 1, 4},    {3, 5, 1, 8},    {3, 13, 1, 4},
  779. X    {3, 7, 0, 0},    {4, 1, 1, 1},    {4, 1, 1, 4},    {4, 2, 1, 2},
  780. X    {4, 2, 1, 6},    {4, 5, 0, 0},    {4, 7, 0, 0},    {4, 10, 0, 0},
  781. X/*100 */{4, 13, 1, 6},    {5, 1, 2, 6},    {5, 1, 3, 7},    {5, 1, 4, 6},
  782. X    {5, 1, 10, 12},    {5, 2, 1, 3},    {5, 2, 3, 6},    {5, 2, 3, 12},
  783. X    {5, 5, 4, 4},    {5, 9, 3, 7},    {5, 9, 4, 5},    {5, 12, 1, 6},
  784. X    {6, 2, 1, 3},    {6, 2, 2, 8},    {6, 2, 4, 4},    {6, 5, 1, 10},
  785. X    {6, 5, 2, 3},    {6, 8, 1, 5},    {6, 9, 2, 6},    {6, 9, 3, 6},
  786. X/*120 */{7, 1, 3, 6},    {7, 2, 1, 3},    {7, 2, 1, 6},    {7, 2, 3, 6},
  787. X    {7, 2, 3, 10},    {7, 5, 1, 6},    {7, 5, 2, 3},    {7, 5, 2, 6},
  788. X    {7, 5, 4, 4},    {7, 12, 1, 4},    {8, 1, 3, 8},    {8, 2, 1, 3},
  789. X    {8, 2, 2, 6},    {8, 2, 3, 8},    {8, 2, 5, 5},    {8, 5, 5, 4},
  790. X    {9, 5, 1, 2},    {9, 5, 2, 5},    {9, 5, 2, 6},    {9, 8, 2, 4},
  791. X/*140 */{9, 12, 1, 3},    {10, 2, 1, 6},    {10, 4, 1, 1},    {10, 7, 2, 6},
  792. X    {10, 9, 1, 2},    {11, 1, 1, 2},    {11, 7, 0, 0},    {11, 13, 2, 4},
  793. X    {12, 5, 0, 0},    {13, 5, 0, 0},    {13, 19, 0, 0},    {14, 1, 1, 3},
  794. X    {14, 1, 3, 4},    {14, 2, 1, 3},    {14, 2, 1, 4},    {14, 2, 1, 5},
  795. X    {14, 2, 1, 6},    {14, 2, 1, 10},    {14, 2, 2, 4},    {14, 2, 2, 5},
  796. X/*160 */{14, 2, 2, 6},    {14, 2, 3, 4},    {14, 2, 3, 9},    {14, 2, 4, 4},
  797. X    {14, 4, 1, 2},    {14, 4, 1, 4},    {14, 4, 1, 8},    {14, 4, 2, 5},
  798. X    {14, 5, 1, 2},    {14, 5, 1, 3},    {14, 5, 2, 4},    {14, 5, 2, 6},
  799. X    {14, 5, 3, 5},    {14, 12, 1, 2},    {14, 12, 1, 4},    {14, 13, 2, 4},
  800. X    {15, 2, 1, 6},    {15, 2, 3, 6},    {15, 5, 1, 8},    {15, 5, 2, 8},
  801. X/*180 */{15, 5, 2, 10},    {15, 5, 2, 12},    {15, 12, 1, 3},    {16, 13, 1, 2},
  802. X    {17, 3, 1, 10},    {18, 5, 0, 0},    {19, 5, 5, 8},    {19, 5, 12, 8},
  803. X    {19, 5, 14, 8},    {19, 5, 15, 8},    {19, 5, 18, 8},    {19, 5, 20, 8},
  804. X    {19, 5, 22, 8},    {19, 5, 26, 8},    {19, 5, 30, 8},    {19, 5, 32, 8},
  805. X    {19, 5, 34, 8},    {19, 5, 36, 8},    {19, 5, 38, 8},    {19, 5, 42, 8},
  806. X/*200 */{19, 5, 44, 8},    {19, 5, 46, 8},    {19, 5, 52, 8},    {20, 10, 0, 0},
  807. X    {21, 1, 0, 0},    {21, 5, 0, 0},    {21, 5, 1, 6},    {21, 7, 0, 0},
  808. X    {21, 12, 1, 4},    {22, 5, 2, 3},    {22, 12, 0, 0},    {22, 15, 1, 1},
  809. X/*212 */{23, 1, 1, 1},    {23, 5, 1, 3},    {24, 5, 0, 0}
  810. X};
  811. X
  812. X
  813. Xmonster_type m_list[MAX_MALLOC];
  814. Xint16 m_level[MAX_MONS_LEVEL+1];
  815. X
  816. X/* Blank monster values    */
  817. Xmonster_type blank_monster = {0,0,0,0,0,0,0,FALSE,0,FALSE};
  818. Xint16 mfptr;            /* Cur free monster ptr    */
  819. Xint16 mon_tot_mult;        /* # of repro's of creature    */
  820. END_OF_FILE
  821. if test 40791 -ne `wc -c <'source/monsters.c'`; then
  822.     echo shar: \"'source/monsters.c'\" unpacked with wrong size!
  823. fi
  824. # end of 'source/monsters.c'
  825. fi
  826. if test -f 'source/store1.c' -a "${1}" != "-c" ; then 
  827.   echo shar: Will not clobber existing file \"'source/store1.c'\"
  828. else
  829. echo shar: Extracting \"'source/store1.c'\" \(11775 characters\)
  830. sed "s/^X//" >'source/store1.c' <<'END_OF_FILE'
  831. X/* source/store1.c: store code, updating store inventory, pricing objects
  832. X
  833. X   Copyright (c) 1989-92 James E. Wilson, Robert A. Koeneke
  834. X
  835. X   This software may be copied and distributed for educational, research, and
  836. X   not for profit purposes provided that this copyright and statement are
  837. X   included in all such copies. */
  838. X
  839. X#include "config.h"
  840. X#include "constant.h"
  841. X#include "types.h"
  842. X#include "externs.h"
  843. X
  844. X#ifdef USG
  845. X#ifndef ATARIST_MWC
  846. X#include <string.h>
  847. X#endif
  848. X#else
  849. X#include <strings.h>
  850. X#endif
  851. X
  852. X#if defined(LINT_ARGS)
  853. Xstatic void insert_store(int, int, int32, struct inven_type *);
  854. Xstatic void store_create(int);
  855. X#else
  856. Xstatic void insert_store();
  857. Xstatic void store_create();
  858. X#endif
  859. X
  860. X
  861. X/* Returns the value for any given object        -RAK-    */
  862. Xint32 item_value(i_ptr)
  863. Xregister inven_type *i_ptr;
  864. X{
  865. X  register int32 value;
  866. X
  867. X  value = i_ptr->cost;
  868. X  /* don't purchase known cursed items */
  869. X  if (i_ptr->ident & ID_DAMD)
  870. X    value = 0;
  871. X  else if (((i_ptr->tval >= TV_BOW) && (i_ptr->tval <= TV_SWORD)) ||
  872. X       ((i_ptr->tval >= TV_BOOTS) && (i_ptr->tval <= TV_SOFT_ARMOR)))
  873. X    {    /* Weapons and armor    */
  874. X      if (!known2_p(i_ptr))
  875. X    value = object_list[i_ptr->index].cost;
  876. X      else if ((i_ptr->tval >= TV_BOW) && (i_ptr->tval <= TV_SWORD))
  877. X    {
  878. X      if (i_ptr->tohit < 0)
  879. X        value = 0;
  880. X      else if (i_ptr->todam < 0)
  881. X        value = 0;
  882. X      else if (i_ptr->toac < 0)
  883. X        value = 0;
  884. X      else
  885. X        value = i_ptr->cost+(i_ptr->tohit+i_ptr->todam+i_ptr->toac)*100;
  886. X    }
  887. X      else
  888. X    {
  889. X      if (i_ptr->toac < 0)
  890. X        value = 0;
  891. X      else
  892. X        value = i_ptr->cost+i_ptr->toac*100;
  893. X    }
  894. X    }
  895. X  else if ((i_ptr->tval >= TV_SLING_AMMO) && (i_ptr->tval <= TV_SPIKE))
  896. X    {    /* Ammo            */
  897. X      if (!known2_p(i_ptr))
  898. X    value = object_list[i_ptr->index].cost;
  899. X      else
  900. X    {
  901. X      if (i_ptr->tohit < 0)
  902. X        value = 0;
  903. X      else if (i_ptr->todam < 0)
  904. X        value = 0;
  905. X      else if (i_ptr->toac < 0)
  906. X        value = 0;
  907. X      else
  908. X        /* use 5, because missiles generally appear in groups of 20,
  909. X           so 20 * 5 == 100, which is comparable to weapon bonus above */
  910. X        value = i_ptr->cost+(i_ptr->tohit+i_ptr->todam+i_ptr->toac)*5;
  911. X    }
  912. X    }
  913. X  else if ((i_ptr->tval == TV_SCROLL1) || (i_ptr->tval == TV_SCROLL2) ||
  914. X       (i_ptr->tval == TV_POTION1) || (i_ptr->tval == TV_POTION2))
  915. X    {    /* Potions, Scrolls, and Food    */
  916. X      if (!known1_p(i_ptr))
  917. X    value = 20;
  918. X    }
  919. X  else if (i_ptr->tval == TV_FOOD)
  920. X    {
  921. X      if ((i_ptr->subval < (ITEM_SINGLE_STACK_MIN + MAX_MUSH))
  922. X      && !known1_p(i_ptr))
  923. X    value = 1;
  924. X    }
  925. X  else if ((i_ptr->tval == TV_AMULET) || (i_ptr->tval == TV_RING))
  926. X    {    /* Rings and amulets    */
  927. X      if (!known1_p(i_ptr))
  928. X    /* player does not know what type of ring/amulet this is */
  929. X    value = 45;
  930. X      else if (!known2_p(i_ptr))
  931. X    /* player knows what type of ring, but does not know whether it is
  932. X       cursed or not, if refuse to buy cursed objects here, then
  933. X       player can use this to 'identify' cursed objects */
  934. X    value = object_list[i_ptr->index].cost;
  935. X    }
  936. X  else if ((i_ptr->tval == TV_STAFF) || (i_ptr->tval == TV_WAND))
  937. X    {    /* Wands and staffs*/
  938. X      if (!known1_p(i_ptr))
  939. X    {
  940. X      if (i_ptr->tval == TV_WAND)
  941. X        value = 50;
  942. X      else
  943. X        value = 70;
  944. X    }
  945. X      else if (known2_p(i_ptr))
  946. X    value = i_ptr->cost + (i_ptr->cost / 20) * i_ptr->p1;
  947. X    }
  948. X  /* picks and shovels */
  949. X  else if (i_ptr->tval == TV_DIGGING)
  950. X    {
  951. X      if (!known2_p(i_ptr))
  952. X    value = object_list[i_ptr->index].cost;
  953. X      else
  954. X    {
  955. X      if (i_ptr->p1 < 0)
  956. X        value = 0;
  957. X      else
  958. X        {
  959. X          /* some digging tools start with non-zero p1 values, so only
  960. X         multiply the plusses by 100, make sure result is positive */
  961. X          value = i_ptr->cost
  962. X        + (i_ptr->p1 - object_list[i_ptr->index].p1) * 100;
  963. X          if (value < 0)
  964. X        value = 0;
  965. X        }
  966. X    }
  967. X    }
  968. X  /* multiply value by number of items if it is a group stack item */
  969. X  if (i_ptr->subval > ITEM_GROUP_MIN) /* do not include torches here */
  970. X    value = value * i_ptr->number;
  971. X  return(value);
  972. X}
  973. X
  974. X
  975. X/* Asking price for an item                -RAK-    */
  976. Xint32 sell_price(snum, max_sell, min_sell, item)
  977. Xint snum;
  978. Xint32 *max_sell, *min_sell;
  979. Xinven_type *item;
  980. X{
  981. X  register int32 i;
  982. X  register store_type *s_ptr;
  983. X
  984. X  s_ptr = &store[snum];
  985. X  i = item_value(item);
  986. X  /* check item->cost in case it is cursed, check i in case it is damaged */
  987. X  if ((item->cost > 0) && (i > 0))
  988. X    {
  989. X      i = i * rgold_adj[owners[s_ptr->owner].owner_race][py.misc.prace] / 100;
  990. X      if (i < 1)  i = 1;
  991. X      *max_sell = i * owners[s_ptr->owner].max_inflate / 100;
  992. X      *min_sell = i * owners[s_ptr->owner].min_inflate / 100;
  993. X      if (min_sell > max_sell)    min_sell = max_sell;
  994. X      return(i);
  995. X    }
  996. X  else
  997. X    /* don't let the item get into the store inventory */
  998. X    return(0);
  999. X}
  1000. X
  1001. X
  1002. X/* Check to see if he will be carrying too many objects    -RAK-    */
  1003. Xint store_check_num(t_ptr, store_num)
  1004. Xinven_type *t_ptr;
  1005. Xint store_num;
  1006. X{
  1007. X  register int store_check, i;
  1008. X  register store_type *s_ptr;
  1009. X  register inven_type *i_ptr;
  1010. X
  1011. X  store_check = FALSE;
  1012. X  s_ptr = &store[store_num];
  1013. X  if (s_ptr->store_ctr < STORE_INVEN_MAX)
  1014. X    store_check = TRUE;
  1015. X  else if (t_ptr->subval >= ITEM_SINGLE_STACK_MIN)
  1016. X    for (i = 0; i < s_ptr->store_ctr; i++)
  1017. X      {
  1018. X    i_ptr = &s_ptr->store_inven[i].sitem;
  1019. X    /* note: items with subval of gte ITEM_SINGLE_STACK_MAX only stack
  1020. X       if their subvals match */
  1021. X    if (i_ptr->tval == t_ptr->tval && i_ptr->subval == t_ptr->subval
  1022. X        && ((int)i_ptr->number + (int)t_ptr->number < 256)
  1023. X        && (t_ptr->subval < ITEM_GROUP_MIN
  1024. X        || (i_ptr->p1 == t_ptr->p1)))
  1025. X      store_check = TRUE;
  1026. X      }
  1027. X  return(store_check);
  1028. X}
  1029. X
  1030. X
  1031. X/* Insert INVEN_MAX at given location    */
  1032. Xstatic void insert_store(store_num, pos, icost, i_ptr)
  1033. Xregister int pos;
  1034. Xint store_num;
  1035. Xint32 icost;
  1036. Xinven_type *i_ptr;
  1037. X{
  1038. X  register int i;
  1039. X  register store_type *s_ptr;
  1040. X
  1041. X  s_ptr = &store[store_num];
  1042. X  for (i = s_ptr->store_ctr-1; i >= pos; i--)
  1043. X    s_ptr->store_inven[i+1] = s_ptr->store_inven[i];
  1044. X  s_ptr->store_inven[pos].sitem = *i_ptr;
  1045. X  s_ptr->store_inven[pos].scost = -icost;
  1046. X  s_ptr->store_ctr++;
  1047. X}
  1048. X
  1049. X
  1050. X/* Add the item in INVEN_MAX to stores inventory.    -RAK-    */
  1051. Xvoid store_carry(store_num, ipos, t_ptr)
  1052. Xint store_num;
  1053. Xint *ipos;
  1054. Xinven_type *t_ptr;
  1055. X{
  1056. X  int item_num, item_val, flag;
  1057. X  register int typ, subt;
  1058. X  int32 icost, dummy;
  1059. X  register inven_type *i_ptr;
  1060. X  register store_type *s_ptr;
  1061. X
  1062. X  *ipos = -1;
  1063. X  if (sell_price(store_num, &icost, &dummy, t_ptr) > 0)
  1064. X    {
  1065. X      s_ptr = &store[store_num];
  1066. X      item_val = 0;
  1067. X      item_num = t_ptr->number;
  1068. X      flag = FALSE;
  1069. X      typ  = t_ptr->tval;
  1070. X      subt = t_ptr->subval;
  1071. X      do
  1072. X    {
  1073. X      i_ptr = &s_ptr->store_inven[item_val].sitem;
  1074. X      if (typ == i_ptr->tval)
  1075. X        {
  1076. X          if (subt == i_ptr->subval && /* Adds to other item    */
  1077. X          subt >= ITEM_SINGLE_STACK_MIN
  1078. X          && (subt < ITEM_GROUP_MIN || i_ptr->p1 == t_ptr->p1))
  1079. X        {
  1080. X          *ipos = item_val;
  1081. X          i_ptr->number += item_num;
  1082. X          /* must set new scost for group items, do this only for items
  1083. X             strictly greater than group_min, not for torches, this
  1084. X             must be recalculated for entire group */
  1085. X          if (subt > ITEM_GROUP_MIN)
  1086. X            {
  1087. X              (void) sell_price (store_num, &icost, &dummy, i_ptr);
  1088. X              s_ptr->store_inven[item_val].scost = -icost;
  1089. X            }
  1090. X          /* must let group objects (except torches) stack over 24
  1091. X             since there may be more than 24 in the group */
  1092. X          else if (i_ptr->number > 24)
  1093. X            i_ptr->number = 24;
  1094. X          flag = TRUE;
  1095. X        }
  1096. X        }
  1097. X      else if (typ > i_ptr->tval)
  1098. X        {        /* Insert into list        */
  1099. X          insert_store(store_num, item_val, icost, t_ptr);
  1100. X          flag = TRUE;
  1101. X          *ipos = item_val;
  1102. X        }
  1103. X      item_val++;
  1104. X    }
  1105. X      while ((item_val < s_ptr->store_ctr) && (!flag));
  1106. X      if (!flag)    /* Becomes last item in list    */
  1107. X    {
  1108. X      insert_store(store_num, (int)s_ptr->store_ctr, icost, t_ptr);
  1109. X      *ipos = s_ptr->store_ctr - 1;
  1110. X    }
  1111. X    }
  1112. X}
  1113. X
  1114. X/* Destroy an item in the stores inventory.  Note that if    */
  1115. X/* "one_of" is false, an entire slot is destroyed    -RAK-    */
  1116. Xvoid store_destroy(store_num, item_val, one_of)
  1117. Xint store_num, item_val;
  1118. Xint one_of;
  1119. X{
  1120. X  register int j, number;
  1121. X  register store_type *s_ptr;
  1122. X  register inven_type *i_ptr;
  1123. X
  1124. X  s_ptr = &store[store_num];
  1125. X  i_ptr = &s_ptr->store_inven[item_val].sitem;
  1126. X
  1127. X  /* for single stackable objects, only destroy one half on average,
  1128. X     this will help ensure that general store and alchemist have
  1129. X     reasonable selection of objects */
  1130. X  if ((i_ptr->subval >= ITEM_SINGLE_STACK_MIN) &&
  1131. X      (i_ptr->subval <= ITEM_SINGLE_STACK_MAX))
  1132. X    {
  1133. X      if (one_of)
  1134. X    number = 1;
  1135. X      else
  1136. X    number = randint((int)i_ptr->number);
  1137. X    }
  1138. X  else
  1139. X    number = i_ptr->number;
  1140. X
  1141. X  if (number != i_ptr->number)
  1142. X    i_ptr->number -= number;
  1143. X  else
  1144. X    {
  1145. X      for (j = item_val; j < s_ptr->store_ctr-1; j++)
  1146. X    s_ptr->store_inven[j] = s_ptr->store_inven[j+1];
  1147. X      invcopy(&s_ptr->store_inven[s_ptr->store_ctr-1].sitem, OBJ_NOTHING);
  1148. X      s_ptr->store_inven[s_ptr->store_ctr-1].scost = 0;
  1149. X      s_ptr->store_ctr--;
  1150. X    }
  1151. X}
  1152. X
  1153. X
  1154. X/* Initializes the stores with owners            -RAK-    */
  1155. Xvoid store_init()
  1156. X{
  1157. X  register int i, j, k;
  1158. X  register store_type *s_ptr;
  1159. X
  1160. X  i = MAX_OWNERS / MAX_STORES;
  1161. X  for (j = 0; j < MAX_STORES; j++)
  1162. X    {
  1163. X      s_ptr = &store[j];
  1164. X      s_ptr->owner = MAX_STORES*(randint(i)-1) + j;
  1165. X      s_ptr->insult_cur = 0;
  1166. X      s_ptr->store_open = 0;
  1167. X      s_ptr->store_ctr    = 0;
  1168. X      s_ptr->good_buy = 0;
  1169. X      s_ptr->bad_buy = 0;
  1170. X      for (k = 0; k < STORE_INVEN_MAX; k++)
  1171. X    {
  1172. X      invcopy(&s_ptr->store_inven[k].sitem, OBJ_NOTHING);
  1173. X      s_ptr->store_inven[k].scost = 0;
  1174. X    }
  1175. X    }
  1176. X}
  1177. X
  1178. X
  1179. X/* Creates an item and inserts it into store's inven    -RAK-    */
  1180. Xstatic void store_create(store_num)
  1181. Xint store_num;
  1182. X{
  1183. X  register int i, tries;
  1184. X  int cur_pos, dummy;
  1185. X  register store_type *s_ptr;
  1186. X  register inven_type *t_ptr;
  1187. X
  1188. X  tries = 0;
  1189. X  cur_pos = popt();
  1190. X  s_ptr = &store[store_num];
  1191. X  do
  1192. X    {
  1193. X      i = store_choice[store_num][randint(STORE_CHOICES)-1];
  1194. X      invcopy(&t_list[cur_pos], i);
  1195. X      magic_treasure(cur_pos, OBJ_TOWN_LEVEL);
  1196. X      t_ptr = &t_list[cur_pos];
  1197. X      if (store_check_num(t_ptr, store_num))
  1198. X    {
  1199. X      if ((t_ptr->cost > 0) &&    /* Item must be good    */
  1200. X          (t_ptr->cost < owners[s_ptr->owner].max_cost))
  1201. X        {
  1202. X          /* equivalent to calling ident_spell(), except will not
  1203. X         change the object_ident array */
  1204. X          store_bought(t_ptr);
  1205. X          store_carry(store_num, &dummy, t_ptr);
  1206. X          tries = 10;
  1207. X        }
  1208. X    }
  1209. X      tries++;
  1210. X    }
  1211. X  while (tries <= 3);
  1212. X  pusht((int8u)cur_pos);
  1213. X}
  1214. X
  1215. X
  1216. X/* Initialize and up-keep the store's inventory.        -RAK-    */
  1217. Xvoid store_maint()
  1218. X{
  1219. X  register int i, j;
  1220. X  register store_type *s_ptr;
  1221. X
  1222. X  for (i = 0; i < MAX_STORES; i++)
  1223. X    {
  1224. X      s_ptr = &store[i];
  1225. X      s_ptr->insult_cur = 0;
  1226. X      if (s_ptr->store_ctr >= STORE_MIN_INVEN)
  1227. X    {
  1228. X      j = randint(STORE_TURN_AROUND);
  1229. X      if (s_ptr->store_ctr >= STORE_MAX_INVEN)
  1230. X        j += 1 + s_ptr->store_ctr - STORE_MAX_INVEN;
  1231. X      while (--j >= 0)
  1232. X        store_destroy(i, randint((int)s_ptr->store_ctr)-1, FALSE);
  1233. X    }
  1234. X
  1235. X      if (s_ptr->store_ctr <= STORE_MAX_INVEN)
  1236. X    {
  1237. X      j = randint(STORE_TURN_AROUND);
  1238. X      if (s_ptr->store_ctr < STORE_MIN_INVEN)
  1239. X        j += STORE_MIN_INVEN - s_ptr->store_ctr;
  1240. X      while (--j >= 0)
  1241. X        store_create(i);
  1242. X    }
  1243. X    }
  1244. X}
  1245. X
  1246. X/* eliminate need to bargain if player has haggled well in the past   -DJB- */
  1247. Xint noneedtobargain(store_num, minprice)
  1248. Xint store_num;
  1249. Xint32 minprice;
  1250. X{
  1251. X  register int flagnoneed;
  1252. X  register store_type *s_ptr;
  1253. X
  1254. X  s_ptr = &store[store_num];
  1255. X  flagnoneed = ((s_ptr->good_buy == MAX_SHORT)
  1256. X        || (s_ptr->good_buy > 3 * s_ptr->bad_buy + 5 + minprice/50));
  1257. X  return (flagnoneed);
  1258. X}
  1259. X
  1260. X
  1261. X/* update the bargin info                    -DJB- */
  1262. Xvoid updatebargain(store_num, price, minprice)
  1263. Xint store_num;
  1264. Xint32 price, minprice;
  1265. X{
  1266. X  register store_type *s_ptr;
  1267. X
  1268. X  s_ptr = &store[store_num];
  1269. X  if (minprice > 9)
  1270. X    if (price == minprice)
  1271. X      {
  1272. X    if (s_ptr->good_buy < MAX_SHORT)
  1273. X      s_ptr->good_buy++;
  1274. X      }
  1275. X    else
  1276. X      {
  1277. X    if (s_ptr->bad_buy < MAX_SHORT)
  1278. X      s_ptr->bad_buy++;
  1279. X      }
  1280. X}
  1281. END_OF_FILE
  1282. if test 11775 -ne `wc -c <'source/store1.c'`; then
  1283.     echo shar: \"'source/store1.c'\" unpacked with wrong size!
  1284. fi
  1285. # end of 'source/store1.c'
  1286. fi
  1287. echo shar: End of archive 10 \(of 39\).
  1288. cp /dev/null ark10isdone
  1289. MISSING=""
  1290. for I in 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 ; do
  1291.     if test ! -f ark${I}isdone ; then
  1292.     MISSING="${MISSING} ${I}"
  1293.     fi
  1294. done
  1295. if test "${MISSING}" = "" ; then
  1296.     echo You have unpacked all 39 archives.
  1297.     echo "Now run "bldfiles.sh" to build split files"
  1298.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1299. else
  1300.     echo You still need to unpack the following archives:
  1301.     echo "        " ${MISSING}
  1302. fi
  1303. ##  End of shell archive.
  1304. exit 0
  1305.