home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zephyr.ens.tek.com!master!saab!billr
- From: billr@saab.CNA.TEK.COM (Bill Randle)
- Newsgroups: comp.sources.games
- Subject: v14i042: umoria4 - single player dungeon simulation (ver. 5.5), Part10/39
- Message-ID: <3400@master.CNA.TEK.COM>
- Date: 20 Aug 92 18:03:38 GMT
- Sender: news@master.CNA.TEK.COM
- Lines: 1294
- Approved: billr@saab.CNA.TEK.COM
-
- Submitted-by: grabiner@math.harvard.edu (David Grabiner)
- Posting-number: Volume 14, Issue 42
- Archive-name: umoria4/Part10
- Supersedes: umoria3: Volume 9, Issue 55-97; Volume 10, Issue 15-17
- Environment: Curses, Unix, Mac, MS-DOS, Atari-ST, Amiga, VMS
-
-
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then unpack
- # it by saving it into a file and typing "sh file". To overwrite existing
- # files, type "sh file -c". You can also feed this as standard input via
- # unshar, or by typing "sh <file", e.g.. If this archive is complete, you
- # will see the following message at the end:
- # "End of archive 10 (of 39)."
- # Contents: source/monsters.c source/store1.c
- # Wrapped by billr@saab on Thu Aug 20 09:11:28 1992
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -f 'source/monsters.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'source/monsters.c'\"
- else
- echo shar: Extracting \"'source/monsters.c'\" \(40791 characters\)
- sed "s/^X//" >'source/monsters.c' <<'END_OF_FILE'
- X/* source/monsters.c: monster 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, and
- 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 creature arrays and variables */
- X /* Creatures must be defined here */
- X /* See types.h under creature_type for a complete list
- X of all variables for creatures. Some of the less obvious
- X are explained below.
- X
- X Hit points: #1, #2: where #2 is the range of each roll and
- X #1 is the number of added up rolls to make.
- X Example: a creature with 5 eight-sided hit die
- X is given {5,8}.
- X
- X Attack types:
- X 1 Normal attack
- X 2 Poison Strength
- X 3 Confusion attack
- X 4 Fear attack
- X 5 Fire attack
- X 6 Acid attack
- X 7 Cold attack
- X 8 Lightning attack
- X 9 Corrosion attack
- X 10 Blindness attack
- X 11 Paralysis attack
- X 12 Steal Money
- X 13 Steal Object
- X 14 Poison
- X 15 Lose dexterity
- X 16 Lose constitution
- X 17 Lose intelligence
- X 18 Lose wisdom
- X 19 Lose experience
- X 20 Aggravation
- X 21 Disenchants
- X 22 Eats food
- X 23 Eats light
- X 24 Eats charges
- X 99 Blank
- X
- X Attack descriptions:
- X 1 hits you.
- X 2 bites you.
- X 3 claws you.
- X 4 stings you.
- X 5 touches you.
- X 6 kicks you.
- X 7 gazes at you.
- X 8 breathes on you.
- X 9 spits on you.
- X 10 makes a horrible wail.
- X 11 embraces you.
- X 12 crawls on you.
- X 13 releases a cloud of spores.
- X 14 begs you for money.
- X 15 You've been slimed.
- X 16 crushes you.
- X 17 tramples you.
- X 18 drools on you.
- X 19 insults you.
- X 99 is repelled.
- X
- X Example: For a creature which bites for 1d6, then stings for
- X 2d4 and loss of dex you would use:
- X {1,2,1,6},{15,4,2,4}
- X
- X CMOVE flags:
- XMovement. 00000001 Move only to attack
- X . 00000002 Move, attack normal
- X . 00000008 20% random movement
- X . 00000010 40% random movement
- X . 00000020 75% random movement
- XSpecial + 00010000 Invisible movement
- X + 00020000 Move through door
- X + 00040000 Move through wall
- X + 00080000 Move through creatures
- X + 00100000 Picks up objects
- X + 00200000 Multiply monster
- XCarries = 01000000 Carries objects.
- X = 02000000 Carries gold.
- X = 04000000 Has 60% of time.
- X = 08000000 Has 90% of time.
- X = 10000000 1d2 objects/gold.
- X = 20000000 2d2 objects/gold.
- X = 40000000 4d2 objects/gold.
- XSpecial ~ 80000000 Win-the-Game creature.
- X
- X SPELL Flags:
- XFrequency 000001 1 These add up to x. Then
- X(1 in x). 000002 2 if RANDINT(X) = 1 the
- X . 000004 4 creature casts a spell.
- X . 000008 8
- XSpells = 000010 Teleport short (blink)
- X = 000020 Teleport long
- X = 000040 Teleport player to monster
- X = 000080 Cause light wound
- X = 000100 Cause serious wound
- X = 000200 Hold person (Paralysis)
- X = 000400 Cause blindness
- X = 000800 Cause confusion
- X = 001000 Cause fear
- X = 002000 Summon monster
- X = 004000 Summon undead
- X = 008000 Slow Person
- X = 010000 Drain Mana
- X = 020000 Not Used
- X = 040000 Not Used
- XBreaths + 080000 Breath Lightning
- X + 100000 Breath Gas
- X + 200000 Breath Acid
- X + 400000 Breath Frost
- X + 800000 Breath Fire
- X
- X CDEFENSE flags:
- X 0001 Hurt by Slay Dragon.
- X 0002 Hurt by Slay Animal.
- X 0004 Hurt by Slay Evil.
- X 0008 Hurt by Slay Undead.
- X 0010 Hurt by Frost.
- X 0020 Hurt by Fire.
- X 0040 Hurt by Poison.
- X 0080 Hurt by Acid.
- X 0100 Hurt by Light-Wand.
- X 0200 Hurt by Stone-to-Mud.
- X 0400 Not used.
- X 0800 Not used.
- X 1000 Cannot be charmed or slept.
- X 2000 Can be seen with infra-vision.
- X 4000 Max Hit points.
- X 8000 Not used.
- X
- X
- X Sleep (sleep) : A measure in turns of how fast creature
- X will notice player (on the average).
- X Area of affect (aaf) : Max range that creature is able to "notice"
- X the player.
- X */
- X
- X#ifdef MACGAME
- Xcreature_type *c_list;
- X#else
- Xcreature_type c_list[MAX_CREATURES] = {
- X{"Filthy Street Urchin" ,0x0012000AL,0x00000000L,0x2034, 0, 40,
- X 4, 1, 11, 'p', {1,4} , {72,148,0,0} , 0},
- X{"Blubbering Idiot" ,0x0012000AL,0x00000000L,0x2030, 0, 0,
- X 6, 1, 11, 'p', {1,2} , {79,0,0,0} , 0},
- X{"Pitiful-Looking Beggar" ,0x0012000AL,0x00000000L,0x2030, 0, 40,
- X 10, 1, 11, 'p', {1,4} , {72,0,0,0} , 0},
- X{"Mangy-Looking Leper" ,0x0012000AL,0x00000000L,0x2030, 0, 50,
- X 10, 1, 11, 'p', {1,1} , {72,0,0,0} , 0},
- X{"Squint-Eyed Rogue" ,0x07120002L,0x00000000L,0x2034, 0, 99,
- X 10, 8, 11, 'p', {2,8} , {5,149,0,0} , 0},
- X{"Singing, Happy Drunk" ,0x06120038L,0x00000000L,0x2030, 0, 0,
- X 10, 1, 11, 'p', {2,3} , {72,0,0,0} , 0},
- X{"Mean-Looking Mercenary" ,0x0B12000AL,0x00000000L,0x2034, 0, 250,
- X 10, 20, 11, 'p', {5,8} , {9,0,0,0} , 0},
- X{"Battle-Scarred Veteran" ,0x0B12000AL,0x00000000L,0x2030, 0, 250,
- X 10, 30, 11, 'p', {7,8} , {15,0,0,0} , 0},
- X{"Grey Mushroom patch" ,0x00000001L,0x00000000L,0x10A0, 1, 0,
- X 2, 1, 11, ',', {1,2} , {91,0,0,0} , 1},
- X{"Giant Yellow Centipede" ,0x00000002L,0x00000000L,0x0002, 2, 30,
- X 8, 12, 11, 'c', {2,6} , {26,60,0,0} , 1},
- X{"Giant White Centipede" ,0x0000000AL,0x00000000L,0x0002, 2, 40,
- X 7, 10, 11, 'c', {3,5} , {25,59,0,0} , 1},
- X{"White Icky-Thing" ,0x00000012L,0x00000000L,0x0020, 2, 10,
- X 12, 7, 11, 'i', {3,5} , {63,0,0,0} , 1},
- X{"Clear Icky-Thing" ,0x00010012L,0x00000000L,0x0020, 1, 10,
- X 12, 6, 11, 'i', {2,5} , {63,0,0,0} , 1},
- X{"Giant White Mouse" ,0x0020000AL,0x00000000L,0x2072, 1, 20,
- X 8, 4, 11, 'r', {1,3} , {25,0,0,0} , 1},
- X{"Large Brown Snake" ,0x0000000AL,0x00000000L,0x00B2, 3, 99,
- X 4, 35, 10, 'R', {4,6} , {26,73,0,0} , 1},
- X{"Large White Snake" ,0x00000012L,0x00000000L,0x00B2, 2, 99,
- X 4, 30, 11, 'R', {3,6} , {24,0,0,0} , 1},
- X{"Kobold" ,0x07020002L,0x00000000L,0x2030, 5, 10,
- X 20, 16, 11, 'k', {3,7} , {5,0,0,0} , 1},
- X{"White Worm mass" ,0x00200022L,0x00000000L,0x01B2, 2, 10,
- X 7, 1, 10, 'w', {4,4} , {173,0,0,0} , 1},
- X{"Floating Eye" ,0x00000001L,0x0001000DL,0x2100, 1, 10,
- X 2, 6, 11, 'e', {3,6} , {146,0,0,0} , 1},
- X{"Shrieker Mushroom patch" ,0x00000001L,0x00000000L,0x10A0, 1, 0,
- X 2, 1, 11, ',', {1,1} , {203,0,0,0} , 2},
- X{"Blubbering Icky-Thing" ,0x0B180012L,0x00000000L,0x0020, 8, 10,
- X 14, 4, 11, 'i', {5,8} , {174,210,0,0} , 2},
- X{"Metallic Green Centipede" ,0x00000012L,0x00000000L,0x0002, 3, 10,
- X 5, 4, 12, 'c', {4,4} , {68,0,0,0} , 2},
- X{"Novice Warrior" ,0x07020002L,0x00000000L,0x2030, 6, 5,
- X 20, 16, 11, 'p', {9,4} , {6,0,0,0} , 2},
- X{"Novice Rogue" ,0x07020002L,0x00000000L,0x2034, 6, 5,
- X 20, 12, 11, 'p', {8,4} , {5,148,0,0} , 2},
- X{"Novice Priest" ,0x07020002L,0x0000108CL,0x2030, 7, 5,
- X 20, 10, 11, 'p', {7,4} , {4,0,0,0} , 2},
- X{"Novice Mage" ,0x07020002L,0x0000089CL,0x2030, 7, 5,
- X 20, 6, 11, 'p', {6,4} , {3,0,0,0} , 2},
- X{"Yellow Mushroom patch" ,0x00000001L,0x00000000L,0x10A0, 2, 0,
- X 2, 1, 11, ',', {1,1} , {100,0,0,0} , 2},
- X{"White Jelly" ,0x00000001L,0x00000000L,0x11A0, 10, 99,
- X 2, 1, 12, 'J', {8,8} , {168,0,0,0} , 2},
- X{"Giant Green Frog" ,0x0000000AL,0x00000000L,0x00A2, 6, 30,
- X 12, 8, 11, 'f', {2,8} , {26,0,0,0} , 2},
- X{"Giant Black Ant" ,0x0000000AL,0x00000000L,0x0002, 8, 80,
- X 8, 20, 11, 'a', {3,6} , {27,0,0,0} , 2},
- X{"White Harpy" ,0x00000012L,0x00000000L,0x2034, 5, 10,
- X 16, 17, 11, 'h', {2,5} , {49,49,25,0} , 2},
- X{"Blue Yeek" ,0x07020002L,0x00000000L,0x2030, 4, 10,
- X 18, 14, 11, 'y', {2,6} , {4,0,0,0} , 2},
- X{"Green Worm mass" ,0x00200022L,0x00000000L,0x0132, 3, 10,
- X 7, 3, 10, 'w', {6,4} , {140,0,0,0} , 2},
- X{"Large Black Snake" ,0x0000000AL,0x00000000L,0x00B2, 9, 75,
- X 5, 38, 10, 'R', {4,8} , {27,74,0,0} , 2},
- X{"Poltergeist" ,0x0F15003AL,0x0000001FL,0x110C, 6, 10,
- X 8, 15, 13, 'G', {2,5} , {93,0,0,0} , 3},
- X{"Metallic Blue Centipede" ,0x00000012L,0x00000000L,0x0002, 7, 15,
- X 6, 6, 12, 'c', {4,5} , {69,0,0,0} , 3},
- X{"Giant White Louse" ,0x00200022L,0x00000000L,0x01F2, 1, 10,
- X 6, 5, 12, 'l', {1,1} , {24,0,0,0} , 3},
- X{"Black Naga" ,0x0710000AL,0x00000000L,0x20E4, 20, 120,
- X 16, 40, 11, 'n', {6,8} , {75,0,0,0} , 3},
- X{"Spotted Mushroom patch" ,0x00000001L,0x00000000L,0x10A0, 3, 0,
- X 2, 1, 11, ',', {1,1} , {175,0,0,0} , 3},
- X{"Yellow Jelly" ,0x00000001L,0x0001000FL,0x11A0, 12, 99,
- X 2, 1, 12, 'J', {10,8} , {169,0,0,0} , 3},
- X{"Scruffy-Looking Hobbit" ,0x07020002L,0x00000000L,0x2034, 4, 10,
- X 16, 8, 11, 'p', {3,5} , {3,148,0,0} , 3},
- X{"Huge Brown Bat" ,0x00000022L,0x00000000L,0x2162, 4, 40,
- X 8, 12, 13, 'b', {2,6} , {25,0,0,0} , 3},
- X{"Giant White Ant" ,0x00000002L,0x00000000L,0x0002, 7, 80,
- X 8, 16, 11, 'a', {3,6} , {27,0,0,0} , 3},
- X{"Yellow Mold" ,0x00000001L,0x00000000L,0x10A0, 9, 99,
- X 2, 10, 11, 'm', {8,8} , {3,0,0,0} , 3},
- X{"Metallic Red Centipede" ,0x0000000AL,0x00000000L,0x0002, 12, 20,
- X 8, 9, 12, 'c', {4,8} , {69,0,0,0} , 3},
- X{"Yellow Worm mass" ,0x00200022L,0x00000000L,0x01B2, 4, 10,
- X 7, 4, 10, 'w', {4,8} , {182,0,0,0} , 3},
- X{"Large Green Snake" ,0x0000000AL,0x00000000L,0x00B2, 10, 70,
- X 5, 40, 10, 'R', {6,8} , {27,74,0,0} , 3},
- X{"Radiation Eye" ,0x00000001L,0x0001000BL,0x2100, 6, 10,
- X 2, 6, 11, 'e', {3,6} , {88,0,0,0} , 3},
- X{"Drooling Harpy" ,0x00000012L,0x00000000L,0x2034, 7, 10,
- X 16, 22, 11, 'h', {2,8} , {49,49,25,79} , 3},
- X{"Silver Mouse" ,0x0020000AL,0x00000000L,0x0072, 1, 10,
- X 8, 5, 11, 'r', {1,1} , {212,0,0,0} , 4},
- X{"Black Mushroom patch" ,0x00000001L,0x00000000L,0x10A0, 8, 0,
- X 2, 1, 11, ',', {8,8} , {71,0,0,0} , 4},
- X{"Blue Jelly" ,0x00000001L,0x00000000L,0x11A0, 14, 99,
- X 2, 1, 11, 'J', {12,8} , {125,0,0,0} , 4},
- X{"Creeping Copper Coins" ,0x12000002L,0x00000000L,0x1000, 9, 10,
- X 3, 24, 10, '$', {7,8} , {3,170,0,0} , 4},
- X{"Giant White Rat" ,0x0020000AL,0x00000000L,0x2072, 1, 30,
- X 8, 7, 11, 'r', {2,2} , {153,0,0,0} , 4},
- X{"Giant Black Centipede" ,0x0000000AL,0x00000000L,0x0002, 11, 30,
- X 8, 20, 11, 'c', {5,8} , {25,59,0,0} , 4},
- X{"Giant Blue Centipede" ,0x00000002L,0x00000000L,0x0002, 10, 50,
- X 8, 20, 11, 'c', {4,8} , {26,61,0,0} , 4},
- X{"Blue Worm mass" ,0x00200022L,0x00000000L,0x01A2, 5, 10,
- X 7, 12, 10, 'w', {5,8} , {129,0,0,0} , 4},
- X{"Large Grey Snake" ,0x0000000AL,0x00000000L,0x00B2, 14, 50,
- X 6, 41, 10, 'R', {6,8} , {28,75,0,0} , 4},
- X{"Jackal" ,0x00000012L,0x00000000L,0x2032, 8, 30,
- X 12, 16, 11, 'j', {3,8} , {29,0,0,0} , 4},
- X{"Green Naga" ,0x0710000AL,0x00000000L,0x2064, 30, 120,
- X 18, 40, 11, 'n', {9,8} , {75,118,0,0} , 5},
- X{"Green Glutton Ghost" ,0x0F150032L,0x0000003FL,0x110C, 15, 10,
- X 10, 20, 13, 'G', {3,6} , {211,0,0,0} , 5},
- X{"White Mushroom patch" ,0x00000001L,0x00000000L,0x10A0, 5, 0,
- X 2, 1, 11, ',', {1,1} , {147,0,0,0} , 5},
- X{"Green Jelly" ,0x00000001L,0x00000000L,0x1120, 18, 99,
- X 2, 1, 12, 'J', {22,8} , {136,0,0,0} , 5},
- X{"Skeleton Kobold" ,0x00020002L,0x00000000L,0x100C, 12, 40,
- X 20, 26, 11, 's', {5,8} , {5,0,0,0} , 5},
- X{"Silver Jelly" ,0x00000001L,0x00000000L,0x10A0, 15, 40,
- X 2, 25, 11, 'J', {20,8} , {213,0,0,0} , 5},
- X{"Giant Black Frog" ,0x0000000AL,0x00000000L,0x00A2, 12, 40,
- X 12, 18, 11, 'f', {4,8} , {29,0,0,0} , 5},
- X{"Grey Icky-Thing" ,0x00000012L,0x00000000L,0x0020, 10, 15,
- X 14, 12, 11, 'i', {4,8} , {66,0,0,0} , 5},
- X{"Disenchanter Eye" ,0x00000001L,0x00010009L,0x2100, 20, 10,
- X 2, 10, 10, 'e', {7,8} , {207,0,0,0} , 5},
- X{"Black Yeek" ,0x07020002L,0x00000000L,0x2030, 8, 10,
- X 18, 16, 11, 'y', {2,8} , {4,0,0,0} , 5},
- X{"Red Worm mass" ,0x00200022L,0x00000000L,0x2192, 6, 10,
- X 7, 12, 10, 'w', {5,8} , {111,0,0,0} , 5},
- X{"Giant House Fly" ,0x00000022L,0x00000000L,0x0062, 10, 20,
- X 12, 16, 13, 'F', {3,8} , {25,0,0,0} , 5},
- X{"Copperhead Snake" ,0x00000012L,0x00000000L,0x00B2, 15, 1,
- X 6, 20, 11, 'R', {4,6} , {158,0,0,0} , 5},
- X{"Rot Jelly" ,0x00000001L,0x00000000L,0x10A0, 15, 99,
- X 2, 30, 11, 'J', {20,8} , {209,0,0,0} , 5},
- X{"Purple Mushroom patch" ,0x00000001L,0x00000000L,0x10A0, 12, 0,
- X 2, 1, 12, ',', {1,1} , {183,0,0,0} , 6},
- X{"Brown Mold" ,0x00000001L,0x00000000L,0x10A0, 20, 99,
- X 2, 12, 11, 'm', {15,8} , {89,0,0,0} , 6},
- X{"Giant Brown Bat" ,0x0000001AL,0x00000000L,0x2162, 10, 30,
- X 10, 15, 13, 'b', {3,8} , {26,0,0,0} , 6},
- X{"Creeping Silver Coins" ,0x16000002L,0x00000000L,0x1000, 18, 10,
- X 4, 30, 10, '$', {12,8} , {5,171,0,0} , 6},
- X{"Orc" ,0x0B020002L,0x00000000L,0x2034, 16, 30,
- X 20, 32, 11, 'o', {9,8} , {7,0,0,0} , 6},
- X{"Grey Harpy" ,0x00000012L,0x00000000L,0x2034, 14, 10,
- X 16, 20, 12, 'h', {3,8} , {50,50,25,0} , 6},
- X{"Blue Icky-Thing" ,0x00000012L,0x00000000L,0x0020, 12, 20,
- X 14, 14, 11, 'i', {4,8} , {126,0,0,0} , 6},
- X{"Rattlesnake" ,0x00000012L,0x00000000L,0x00B2, 20, 1,
- X 6, 24, 11, 'R', {6,7} , {159,0,0,0} , 6},
- X{"Bloodshot Eye" ,0x00000001L,0x00010007L,0x2100, 15, 10,
- X 2, 6, 11, 'e', {4,8} , {143,0,0,0} , 7},
- X{"Red Naga" ,0x0710000AL,0x00000000L,0x20E4, 40, 120,
- X 20, 40, 11, 'n', {11,8} , {76,82,0,0} , 7},
- X{"Red Jelly" ,0x00000001L,0x00000000L,0x11A0, 26, 99,
- X 2, 1, 11, 'J', {26,8} , {87,0,0,0} , 7},
- X{"Giant Red Frog" ,0x0000000AL,0x00000000L,0x00A2, 16, 50,
- X 12, 16, 11, 'f', {5,8} , {83,0,0,0} , 7},
- X{"Green Icky-Thing" ,0x00000012L,0x00000000L,0x0020, 18, 20,
- X 14, 12, 11, 'i', {5,8} , {137,0,0,0} , 7},
- X{"Zombie Kobold" ,0x00020002L,0x00000000L,0x102C, 14, 30,
- X 20, 14, 11, 'z', {6,8} , {1,1,0,0} , 7},
- X{"Lost Soul" ,0x0F15001AL,0x0001002FL,0x110C, 18, 10,
- X 12, 10, 11, 'G', {2,8} , {11,185,0,0} , 7},
- X{"Greedy Little Gnome" ,0x0B020002L,0x00000000L,0x2034, 13, 10,
- X 18, 14, 11, 'p', {3,8} , {6,149,0,0} , 7},
- X{"Giant Green Fly" ,0x00000022L,0x00000000L,0x0062, 15, 20,
- X 12, 14, 12, 'F', {3,8} , {27,0,0,0} , 7},
- X{"Brown Yeek" ,0x07020002L,0x00000000L,0x2030, 11, 10,
- X 18, 18, 11, 'y', {3,8} , {5,0,0,0} , 8},
- X{"Green Mold" ,0x00000001L,0x00000000L,0x10A0, 28, 75,
- X 2, 14, 11, 'm', {21,8} , {94,0,0,0} , 8},
- X{"Skeleton Orc" ,0x00020002L,0x00000000L,0x100C, 26, 40,
- X 20, 36, 11, 's', {10,8} , {14,0,0,0} , 8},
- X{"Seedy Looking Human" ,0x13020002L,0x00000000L,0x2034, 22, 20,
- X 20, 26, 11, 'p', {8,8} , {17,0,0,0} , 8},
- X{"Red Icky-Thing" ,0x00000012L,0x00000000L,0x0020, 22, 20,
- X 14, 18, 12, 'i', {4,8} , {64,117,0,0} , 8},
- X{"Bandit" ,0x13020002L,0x00000000L,0x2034, 26, 10,
- X 20, 24, 11, 'p', {8,8} , {13,148,0,0} , 8},
- X{"Yeti" ,0x00020002L,0x00000000L,0x2024, 30, 10,
- X 20, 24, 11, 'Y', {11,8} , {51,51,27,0} , 9},
- X{"Bloodshot Icky-Thing" ,0x00000012L,0x0001000BL,0x0020, 24, 20,
- X 14, 18, 11, 'i', {7,8} , {65,139,0,0} , 9},
- X{"Giant Grey Rat" ,0x0020000AL,0x00000000L,0x2072, 2, 20,
- X 8, 12, 11, 'r', {2,3} , {154,0,0,0} , 9},
- X{"Black Harpy" ,0x0000000AL,0x00000000L,0x2034, 19, 10,
- X 16, 22, 12, 'h', {3,8} , {50,50,26,0} , 9},
- X{"Giant Black Bat" ,0x00000012L,0x00000000L,0x2162, 16, 25,
- X 12, 18, 13, 'b', {2,8} , {29,0,0,0} , 9},
- X{"Clear Yeek" ,0x07030002L,0x00000000L,0x0030, 14, 10,
- X 18, 24, 11, 'y', {3,6} , {4,0,0,0} , 9},
- X{"Orc Shaman" ,0x0B020002L,0x00008085L,0x2034, 30, 20,
- X 20, 15, 11, 'o', {7,8} , {5,0,0,0} , 9},
- X{"Giant Red Ant" ,0x00000002L,0x00000000L,0x0002, 22, 60,
- X 12, 34, 11, 'a', {4,8} , {27,85,0,0} , 9},
- X{"King Cobra" ,0x00000012L,0x00000000L,0x00B2, 28, 1,
- X 8, 30, 11, 'R', {8,8} , {144,161,0,0} , 9},
- X{"Clear Mushroom patch" ,0x00210001L,0x00000000L,0x10A0, 1, 0,
- X 4, 1, 12, ',', {1,1} , {70,0,0,0} , 10},
- X{"Giant White Tick" ,0x0000000AL,0x00000000L,0x0022, 27, 20,
- X 12, 40, 10, 't', {15,8} , {160,0,0,0} , 10},
- X{"Hairy Mold" ,0x00000001L,0x00000000L,0x10A0, 32, 70,
- X 2, 15, 11, 'm', {15,8} , {151,0,0,0} , 10},
- X{"Disenchanter Mold" ,0x00000001L,0x0001000BL,0x10A0, 40, 70,
- X 2, 20, 11, 'm', {16,8} , {206,0,0,0} , 10},
- X{"Giant Red Centipede" ,0x00000002L,0x00000000L,0x0002, 24, 50,
- X 12, 26, 12, 'c', {3,8} , {25,164,0,0} , 10},
- X{"Creeping Gold Coins" ,0x1A000002L,0x00000000L,0x1000, 32, 10,
- X 5, 36, 10, '$', {18,8} , {14,172,0,0} , 10},
- X{"Giant Fruit Fly" ,0x00200022L,0x00000000L,0x0062, 4, 10,
- X 8, 14, 12, 'F', {2,2} , {25,0,0,0} , 10},
- X{"Brigand" ,0x13020002L,0x00000000L,0x2034, 35, 10,
- X 20, 32, 11, 'p', {9,8} , {13,149,0,0} , 10},
- X{"Orc Zombie" ,0x00020002L,0x00000000L,0x102C, 30, 25,
- X 20, 24, 11, 'z', {11,8} , {3,3,0,0} , 11},
- X{"Orc Warrior" ,0x0B020002L,0x00000000L,0x2034, 34, 25,
- X 20, 36, 11, 'o', {11,8} , {15,0,0,0} , 11},
- X{"Vorpal Bunny" ,0x0020000AL,0x00000000L,0x2072, 2, 30,
- X 8, 10, 12, 'r', {2,3} , {28,0,0,0} , 11},
- X{"Nasty Little Gnome" ,0x13020002L,0x000020B5L,0x2034, 32, 10,
- X 18, 10, 11, 'p', {4,8} , {4,0,0,0} , 11},
- X{"Hobgoblin" ,0x0F020002L,0x00000000L,0x2034, 38, 30,
- X 20, 38, 11, 'H', {12,8} , {9,0,0,0} , 11},
- X{"Black Mamba" ,0x00000012L,0x00000000L,0x00B2, 40, 1,
- X 10, 32, 12, 'R', {10,8} , {163,0,0,0} , 12},
- X{"Grape Jelly" ,0x00000001L,0x0001000BL,0x11A0, 60, 99,
- X 2, 1, 11, 'J', {52,8} , {186,0,0,0} , 12},
- X{"Master Yeek" ,0x07020002L,0x00008018L,0x2030, 28, 10,
- X 18, 24, 11, 'y', {5,8} , {7,0,0,0} , 12},
- X{"Priest" ,0x13020002L,0x00000285L,0x2030, 36, 40,
- X 20, 22, 11, 'p', {7,8} , {12,0,0,0} , 12},
- X{"Giant Clear Ant" ,0x00010002L,0x00000000L,0x0002, 24, 60,
- X 12, 18, 11, 'a', {3,7} , {27,0,0,0} , 12},
- X{"Air Spirit" ,0x00030022L,0x00000000L,0x1000, 40, 20,
- X 12, 20, 13, 'E', {5,8} , {2,0,0,0} , 12},
- X{"Skeleton Human" ,0x00020002L,0x00000000L,0x100C, 38, 30,
- X 20, 30, 11, 's', {12,8} , {7,0,0,0} , 12},
- X{"Human Zombie" ,0x00020002L,0x00000000L,0x102C, 34, 20,
- X 20, 24, 11, 'z', {11,8} , {3,3,0,0} , 12},
- X{"Moaning Spirit" ,0x0F15000AL,0x0001002FL,0x110C, 44, 10,
- X 14, 20, 11, 'G', {4,8} , {99,178,0,0} , 12},
- X{"Swordsman" ,0x13020002L,0x00000000L,0x2030, 40, 20,
- X 20, 34, 11, 'p', {11,8} , {18,0,0,0} , 12},
- X{"Killer Brown Beetle" ,0x0000000AL,0x00000000L,0x0002, 38, 30,
- X 10, 40, 11, 'K', {13,8} , {41,0,0,0} , 13},
- X{"Ogre" ,0x07020002L,0x00000000L,0x2034, 42, 30,
- X 20, 32, 11, 'o', {13,8} , {16,0,0,0} , 13},
- X{"Giant Red Speckled Frog" ,0x0000000AL,0x00000000L,0x00A2, 32, 30,
- X 12, 20, 11, 'f', {6,8} , {41,0,0,0} , 13},
- X{"Magic User" ,0x13020002L,0x00002413L,0x2030, 35, 10,
- X 20, 10, 11, 'p', {7,8} , {11,0,0,0} , 13},
- X{"Black Orc" ,0x0B020002L,0x00000000L,0x2034, 40, 20,
- X 20, 36, 11, 'o', {12,8} , {17,0,0,0} , 13},
- X{"Giant Long-Eared Bat" ,0x00000012L,0x00000000L,0x2162, 20, 20,
- X 12, 20, 13, 'b', {5,8} , {27,50,50,0} , 13},
- X{"Giant Gnat" ,0x00200022L,0x00000000L,0x0062, 1, 10,
- X 8, 4, 13, 'F', {1,2} , {24,0,0,0} , 13},
- X{"Killer Green Beetle" ,0x0000000AL,0x00000000L,0x0002, 46, 30,
- X 12, 45, 11, 'K', {16,8} , {43,0,0,0} , 14},
- X{"Giant Flea" ,0x00200022L,0x00000000L,0x0062, 1, 10,
- X 8, 25, 12, 'F', {2,2} , {25,0,0,0} , 14},
- X{"Giant White Dragon Fly" ,0x00000012L,0x0040000AL,0x0062, 54, 50,
- X 20, 20, 11, 'F', {5,8} , {122,0,0,0} , 14},
- X{"Hill Giant" ,0x07020002L,0x00000000L,0x2034, 52, 50,
- X 20, 36, 11, 'P', {16,8} , {19,0,0,0} , 14},
- X{"Skeleton Hobgoblin" ,0x00020002L,0x00000000L,0x100C, 46, 30,
- X 20, 34, 11, 's', {13,8} , {14,0,0,0} , 14},
- X{"Flesh Golem" ,0x00000002L,0x00000000L,0x1030, 48, 10,
- X 12, 10, 11, 'g', {12,8} , {5,5,0,0} , 14},
- X{"White Dragon Bat" ,0x00000012L,0x00400004L,0x0162, 40, 50,
- X 12, 20, 13, 'b', {2,6} , {121,0,0,0} , 14},
- X{"Giant Black Louse" ,0x00200012L,0x00000000L,0x01F2, 1, 10,
- X 6, 7, 12, 'l', {1,1} , {25,0,0,0} , 14},
- X{"Guardian Naga" ,0x1710000AL,0x00000000L,0x20E4, 60, 120,
- X 20, 50, 11, 'n', {24,8} , {77,31,0,0} , 15},
- X{"Giant Grey Bat" ,0x00000012L,0x00000000L,0x2162, 22, 15,
- X 12, 22, 13, 'b', {4,8} , {29,50,50,0} , 15},
- X{"Giant Clear Centipede" ,0x00010002L,0x00000000L,0x0002, 30, 30,
- X 12, 30, 11, 'c', {5,8} , {34,62,0,0} , 15},
- X{"Giant Yellow Tick" ,0x0000000AL,0x00000000L,0x0022, 48, 20,
- X 12, 48, 10, 't', {20,8} , {162,0,0,0} , 15},
- X{"Giant Ebony Ant" ,0x00200002L,0x00000000L,0x0002, 3, 60,
- X 12, 24, 11, 'a', {3,4} , {33,0,0,0} , 15},
- X{"Frost Giant" ,0x07020002L,0x00000000L,0x0024, 54, 50,
- X 20, 38, 11, 'P', {17,8} , {120,0,0,0} , 15},
- X{"Clay Golem" ,0x00000002L,0x00000000L,0x1200, 50, 10,
- X 12, 20, 11, 'g', {14,8} , {7,7,0,0} , 15},
- X{"Huge White Bat" ,0x00200012L,0x00000000L,0x2162, 3, 40,
- X 7, 12, 12, 'b', {3,8} , {29,0,0,0} , 15},
- X{"Giant Tan Bat" ,0x00000012L,0x00000000L,0x2162, 18, 40,
- X 12, 18, 12, 'b', {3,8} , {95,49,49,0} , 15},
- X{"Violet Mold" ,0x00000001L,0x00010009L,0x10A0, 50, 70,
- X 2, 15, 11, 'm', {17,8} , {145,0,0,0} , 15},
- X{"Umber Hulk" ,0x00020002L,0x00000000L,0x2124, 75, 10,
- X 20, 20, 11, 'U', {20,8} , {92,5,5,36} , 16},
- X{"Gelatinous Cube" ,0x2F18000AL,0x00000000L,0x1020, 36, 1,
- X 12, 18, 10, 'C', {45,8} , {115,0,0,0} , 16},
- X{"Giant Black Rat" ,0x0020000AL,0x00000000L,0x2072, 3, 20,
- X 8, 16, 11, 'r', {3,4} , {155,0,0,0} , 16},
- X{"Giant Green Dragon Fly" ,0x00000012L,0x0010000AL,0x0032, 58, 50,
- X 20, 20, 11, 'F', {5,8} , {156,0,0,0} , 16},
- X{"Fire Giant" ,0x07020002L,0x00000000L,0x2014, 62, 50,
- X 20, 40, 11, 'P', {20,8} , {102,0,0,0} , 16},
- X{"Green Dragon Bat" ,0x00000012L,0x00100004L,0x2112, 44, 50,
- X 12, 22, 13, 'b', {2,7} , {153,0,0,0} , 16},
- X{"Quasit" ,0x1103000AL,0x000010FAL,0x1004, 48, 20,
- X 20, 30, 11, 'q', {5,8} , {176,51,51,0} , 16},
- X{"Troll" ,0x0F020002L,0x00000000L,0x2024, 64, 40,
- X 20, 40, 11, 'T', {17,8} , {3,3,29,0} , 17},
- X{"Water Spirit" ,0x0000000AL,0x00000000L,0x1020, 58, 40,
- X 12, 28, 12, 'E', {8,8} , {13,0,0,0} , 17},
- X{"Giant Brown Scorpion" ,0x0000000AL,0x00000000L,0x0002, 62, 20,
- X 12, 44, 11, 'S', {11,8} , {34,86,0,0} , 17},
- X{"Earth Spirit" ,0x0016000AL,0x00000000L,0x1200, 64, 50,
- X 10, 40, 11, 'E', {13,8} , {7,7,0,0} , 17},
- X{"Fire Spirit" ,0x0000000AL,0x00000000L,0x3010, 66, 20,
- X 16, 30, 12, 'E', {10,8} , {101,0,0,0} , 18},
- X{"Uruk-Hai Orc" ,0x0B020002L,0x00000000L,0x2034, 68, 20,
- X 20, 42, 11, 'o', {14,8} , {18,0,0,0} , 18},
- X{"Stone Giant" ,0x07020002L,0x00000000L,0x2204, 80, 50,
- X 20, 40, 11, 'P', {22,8} , {20,0,0,0} , 18},
- X{"Stone Golem" ,0x00000002L,0x00000000L,0x1200, 100, 10,
- X 12, 75, 10, 'g', {28,8} , {9,9,0,0} , 19},
- X{"Grey Ooze" ,0x07180022L,0x00000000L,0x10A0, 40, 1,
- X 15, 10, 11, 'O', {6,8} , {127,0,0,0} , 19},
- X{"Disenchanter Ooze" ,0x07180022L,0x00000000L,0x10B0, 50, 1,
- X 15, 15, 11, 'O', {6,8} , {205,0,0,0} , 19},
- X{"Giant Spotted Rat" ,0x0020000AL,0x00000000L,0x2072, 3, 20,
- X 8, 20, 11, 'r', {4,3} , {155,0,0,0} , 19},
- X{"Mummified Kobold" ,0x0B020002L,0x00000000L,0x102C, 46, 75,
- X 20, 24, 11, 'M', {13,8} , {5,5,0,0} , 19},
- X{"Killer Black Beetle" ,0x0000000AL,0x00000000L,0x0002, 75, 30,
- X 12, 46, 11, 'K', {18,8} , {44,0,0,0} , 19},
- X{"Red Mold" ,0x00000001L,0x00000000L,0x3090, 64, 70,
- X 2, 16, 11, 'm', {17,8} , {108,0,0,0} , 19},
- X{"Quylthulg" ,0x00010004L,0x00002017L,0x5000, 200, 0,
- X 10, 1, 11, 'Q', {4,8} , {0,0,0,0} , 20},
- X{"Giant Red Bat" ,0x00000012L,0x00000000L,0x2162, 40, 20,
- X 12, 24, 12, 'b', {5,8} , {30,51,51,0} , 20},
- X{"Giant Black Dragon Fly" ,0x00000012L,0x00200009L,0x0072, 58, 50,
- X 20, 22, 11, 'F', {4,8} , {141,0,0,0} , 20},
- X{"Cloud Giant" ,0x07020002L,0x00000000L,0x2034, 125, 50,
- X 20, 44, 11, 'P', {24,8} , {130,0,0,0} , 20},
- X{"Black Dragon Bat" ,0x00000012L,0x00200004L,0x2152, 50, 50,
- X 12, 24, 13, 'b', {2,8} , {112,0,0,0} , 21},
- X{"Blue Dragon Bat" ,0x00000012L,0x00080004L,0x2052, 54, 50,
- X 12, 26, 13, 'b', {3,6} , {131,0,0,0} , 21},
- X{"Mummified Orc" ,0x0B020002L,0x00000000L,0x102C, 56, 75,
- X 20, 28, 11, 'M', {14,8} , {13,13,0,0} , 21},
- X{"Killer Boring Beetle" ,0x0000000AL,0x00000000L,0x0002, 70, 30,
- X 12, 48, 11, 'K', {18,8} , {44,0,0,0} , 21},
- X{"Killer Stag Beetle" ,0x0000000AL,0x00000000L,0x0002, 80, 30,
- X 12, 50, 11, 'K', {20,8} , {41,10,0,0} , 22},
- X{"Black Mold" ,0x00000081L,0x00000000L,0x10A0, 68, 50,
- X 2, 18, 11, 'm', {15,8} , {21,0,0,0} , 22},
- X{"Iron Golem" ,0x00000002L,0x00000000L,0x1080, 160, 10,
- X 12, 99, 9, 'g', {80,8} , {10,10,0,0} , 22},
- X{"Giant Yellow Scorpion" ,0x0000000AL,0x00000000L,0x0002, 60, 20,
- X 12, 38, 11, 'S', {12,8} , {31,167,0,0} , 22},
- X{"Green Ooze" ,0x073A0012L,0x00000000L,0x1030, 6, 1,
- X 15, 5, 10, 'O', {4,8} , {116,0,0,0} , 22},
- X{"Black Ooze" ,0x073A0012L,0x0001000BL,0x1030, 7, 1,
- X 10, 6, 9, 'O', {6,8} , {138,0,0,0} , 23},
- X{"Warrior" ,0x13020002L,0x00000000L,0x2030, 60, 40,
- X 20, 40, 11, 'p', {15,8} , {18,0,0,0} , 23},
- X{"Red Dragon Bat" ,0x00000012L,0x00800004L,0x2152, 60, 50,
- X 12, 28, 13, 'b', {3,8} , {105,0,0,0} , 23},
- X{"Killer Blue Beetle" ,0x0000000AL,0x00000000L,0x0002, 85, 30,
- X 14, 50, 11, 'K', {20,8} , {44,0,0,0} , 23},
- X{"Giant Silver Ant" ,0x0000000AL,0x00000000L,0x0002, 45, 60,
- X 10, 38, 11, 'a', {6,8} , {114,0,0,0} , 23},
- X{"Crimson Mold" ,0x00000001L,0x00000000L,0x10A0, 65, 50,
- X 2, 18, 11, 'm', {16,8} , {2,97,0,0} , 23},
- X{"Forest Wight" ,0x0F02000AL,0x0000100FL,0x112C, 140, 30,
- X 20, 30, 11, 'W', {12,8} , {5,5,187,0} , 24},
- X{"Berzerker" ,0x13020002L,0x00000000L,0x2030, 65, 10,
- X 20, 20, 11, 'p', {15,8} , {7,7,0,0} , 24},
- X{"Mummified Human" ,0x0B020002L,0x00000000L,0x102C, 70, 60,
- X 20, 34, 11, 'M', {17,8} , {13,13,0,0} , 24},
- X{"Banshee" ,0x0F15001AL,0x0001002FL,0x110C, 60, 10,
- X 20, 24, 12, 'G', {6,8} , {99,188,0,0} , 24},
- X{"Giant Troll" ,0x0F020002L,0x00000000L,0x2024, 85, 50,
- X 20, 40, 11, 'T', {19,8} , {5,5,41,0} , 25},
- X{"Giant Brown Tick" ,0x0000000AL,0x00000000L,0x0022, 70, 20,
- X 12, 50, 10, 't', {18,8} , {157,142,0,0} , 25},
- X{"Killer Red Beetle" ,0x0000000AL,0x00000000L,0x0002, 85, 30,
- X 14, 50, 11, 'K', {20,8} , {84,0,0,0} , 25},
- X{"Wooden Mold" ,0x00000001L,0x00000000L,0x10A0, 100, 50,
- X 2, 50, 11, 'm', {25,8} , {171,0,0,0} , 25},
- X{"Giant Blue Dragon Fly" ,0x00000012L,0x00080009L,0x0072, 75, 50,
- X 20, 24, 11, 'F', {6,8} , {29,0,0,0} , 25},
- X{"Giant Grey Ant Lion" ,0x0008000AL,0x00000000L,0x0032, 90, 40,
- X 10, 40, 11, 'A', {19,8} , {39,0,0,0} , 26},
- X{"Disenchanter Bat" ,0x00000012L,0x00000000L,0x2162, 75, 1,
- X 14, 24, 13, 'b', {4,8} , {204,0,0,0} , 26},
- X{"Giant Fire Tick" ,0x0000000AL,0x00000000L,0x2012, 90, 20,
- X 14, 54, 11, 't', {16,8} , {109,0,0,0} , 26},
- X{"White Wraith" ,0x0F02000AL,0x0000100CL,0x112C, 165, 10,
- X 20, 40, 11, 'W', {15,8} , {5,5,189,0} , 26},
- X{"Giant Black Scorpion" ,0x0000000AL,0x00000000L,0x0002, 85, 20,
- X 12, 50, 11, 'S', {13,8} , {32,167,0,0} , 26},
- X{"Clear Ooze" ,0x0719000AL,0x00000000L,0x10B0, 12, 1,
- X 10, 14, 11, 'O', {4,8} , {90,0,0,0} , 26},
- X{"Killer Fire Beetle" ,0x0000000AL,0x00000000L,0x2012, 95, 30,
- X 14, 45, 11, 'K', {13,8} , {41,110,0,0} , 27},
- X{"Vampire" ,0x17020002L,0x00001209L,0x112C, 175, 10,
- X 20, 45, 11, 'V', {20,8} , {5,5,190,0} , 27},
- X{"Giant Red Dragon Fly" ,0x00000012L,0x00800008L,0x2052, 75, 50,
- X 20, 24, 11, 'F', {7,8} , {96,0,0,0} , 27},
- X{"Shimmering Mold" ,0x00000081L,0x00000000L,0x10A0, 180, 50,
- X 2, 24, 11, 'm', {32,8} , {135,0,0,0} , 27},
- X{"Black Knight" ,0x13020002L,0x0000010FL,0x2034, 140, 10,
- X 20, 60, 11, 'p', {25,8} , {23,0,0,0} , 28},
- X{"Mage" ,0x13020002L,0x00002C73L,0x2030, 150, 10,
- X 20, 30, 11, 'p', {10,8} , {14,0,0,0} , 28},
- X{"Ice Troll" ,0x0F020002L,0x00000000L,0x0024, 160, 50,
- X 20, 46, 11, 'T', {22,8} , {4,4,123,0} , 28},
- X{"Giant Purple Worm" ,0x0000000AL,0x00000000L,0x2032, 400, 30,
- X 14, 65, 11, 'w', {65,8} , {7,113,166,0} , 29},
- X{"Young Blue Dragon" ,0x1F00000AL,0x0008100BL,0x2005, 300, 70,
- X 20, 50, 11, 'd', {33,8} , {52,52,29,0} , 29},
- X{"Young White Dragon" ,0x1F00000AL,0x0040100BL,0x0025, 275, 70,
- X 20, 50, 11, 'd', {32,8} , {52,52,29,0} , 29},
- X{"Young Green Dragon" ,0x1F00000AL,0x0010100BL,0x2005, 290, 70,
- X 20, 50, 11, 'd', {32,8} , {52,52,29,0} , 29},
- X{"Giant Fire Bat" ,0x00000012L,0x00000000L,0x2152, 85, 10,
- X 14, 30, 12, 'b', {5,8} , {106,52,52,0} , 29},
- X{"Giant Glowing Rat" ,0x0020000AL,0x00000000L,0x2072, 4, 20,
- X 8, 24, 11, 'r', {3,3} , {132,0,0,0} , 29},
- X /* Now things are going to get tough. */
- X /* Some of the creatures have Max hit points, denoted in */
- X /* their CDEFENSE flags as the '4000' bit set */
- X{"Skeleton Troll" ,0x00020002L,0x00000000L,0x500C, 225, 20,
- X 20, 55, 11, 's', {14,8} , {5,5,41,0} , 30},
- X{"Giant Lightning Bat" ,0x00000012L,0x00000000L,0x2042, 80, 10,
- X 15, 34, 12, 'b', {8,8} , {133,53,53,0} , 30},
- X{"Giant Static Ant" ,0x0000000AL,0x00000000L,0x0002, 80, 60,
- X 10, 40, 11, 'a', {8,8} , {134,0,0,0} , 30},
- X{"Grave Wight" ,0x0F02000AL,0x0000110AL,0x512C, 325, 30,
- X 20, 35, 11, 'W', {12,8} , {6,6,191,0} , 30},
- X{"Killer Slicer Beetle" ,0x0000000AL,0x00000000L,0x0002, 200, 30,
- X 14, 55, 11, 'K', {22,8} , {48,0,0,0} , 30},
- X{"Giant White Ant Lion" ,0x0008000AL,0x00000000L,0x0022, 175, 40,
- X 12, 45, 11, 'A', {20,8} , {124,0,0,0} , 30},
- X{"Ghost" ,0x1715000AL,0x0001002FL,0x510C, 350, 10,
- X 20, 30, 12, 'G', {13,8} , {99,192,184,0} , 31},
- X{"Giant Black Ant Lion" ,0x0008000AL,0x00000000L,0x0032, 170, 40,
- X 14, 45, 11, 'A', {23,8} , {39,119,0,0} , 31},
- X{"Death Watch Beetle" ,0x0000000AL,0x00000000L,0x0002, 190, 30,
- X 16, 60, 11, 'K', {25,8} , {47,67,0,0} , 31},
- X{"Ogre Mage" ,0x0B020002L,0x0000A355L,0x6034, 250, 30,
- X 20, 42, 11, 'o', {14,8} , {19,0,0,0} , 31},
- X{"Two-Headed Troll" ,0x0F020002L,0x00000000L,0x6024, 275, 50,
- X 20, 48, 11, 'T', {14,8} , {7,7,29,29} , 32},
- X{"Invisible Stalker" ,0x00030022L,0x00000000L,0x1000, 200, 20,
- X 20, 46, 13, 'E', {19,8} , {5,0,0,0} , 32},
- X{"Giant Hunter Ant" ,0x00000002L,0x00000000L,0x0002, 150, 1,
- X 16, 40, 11, 'a', {12,8} , {46,0,0,0} , 32},
- X{"Ninja" ,0x13020002L,0x00000000L,0x6034, 300, 10,
- X 20, 65, 11, 'p', {15,8} , {152,80,0,0} , 32},
- X{"Barrow Wight" ,0x0F02000AL,0x00001308L,0x512C, 375, 10,
- X 20, 40, 11, 'W', {13,8} , {7,7,193,0} , 33},
- X{"Skeleton 2-Headed Troll" ,0x00020002L,0x00000000L,0x500C, 325, 20,
- X 20, 48, 11, 's', {20,8} , {8,8,28,28} , 33},
- X{"Water Elemental" ,0x0008000AL,0x00000000L,0x1020, 325, 50,
- X 12, 36, 11, 'E', {25,8} , {9,9,0,0} , 33},
- X{"Fire Elemental" ,0x0008000AL,0x00000000L,0x3010, 350, 70,
- X 16, 40, 10, 'E', {25,8} , {103,0,0,0} , 33},
- X{"Lich" ,0x1F020002L,0x00019F75L,0x510C, 750, 60,
- X 20, 50, 11, 'L', {25,8} , {179,194,214,0} , 34},
- X{"Master Vampire" ,0x17020002L,0x00001307L,0x512C, 700, 10,
- X 20, 55, 11, 'V', {23,8} , {5,5,195,0} , 34},
- X{"Spirit Troll" ,0x17150002L,0x00000000L,0x510C, 425, 10,
- X 20, 40, 11, 'G', {15,8} , {53,53,29,185} , 34},
- X{"Giant Red Scorpion" ,0x0000000AL,0x00000000L,0x0002, 275, 40,
- X 12, 50, 12, 'S', {18,8} , {29,165,0,0} , 34},
- X{"Earth Elemental" ,0x001E000AL,0x00000000L,0x1200, 375, 90,
- X 10, 60, 10, 'E', {30,8} , {22,22,0,0} , 34},
- X{"Young Black Dragon" ,0x1F00000AL,0x0020100BL,0x6005, 600, 50,
- X 20, 55, 11, 'd', {32,8} , {53,53,29,0} , 35},
- X{"Young Red Dragon" ,0x1F00000AL,0x0080100AL,0x6015, 650, 50,
- X 20, 60, 11, 'd', {36,8} , {54,54,37,0} , 35},
- X{"Necromancer" ,0x13020002L,0x00005763L,0x6030, 600, 10,
- X 20, 40, 11, 'p', {17,8} , {15,0,0,0} , 35},
- X{"Mummified Troll" ,0x0F020002L,0x00000000L,0x502C, 400, 50,
- X 20, 38, 11, 'M', {18,8} , {15,15,0,0} , 35},
- X{"Giant Red Ant Lion" ,0x0008000AL,0x00000000L,0x2012, 350, 40,
- X 14, 48, 11, 'A', {23,8} , {107,0,0,0} , 35},
- X{"Mature White Dragon" ,0x2F00000AL,0x0040100AL,0x4025, 1000, 70,
- X 20, 65, 11, 'd', {48,8} , {54,54,37,0} , 35},
- X{"Xorn" ,0x00160002L,0x00000000L,0x4200, 650, 10,
- X 20, 80, 11, 'X', {20,8} , {5,5,5,0} , 36},
- X{"Giant Mottled Ant Lion" ,0x0008000AL,0x00000000L,0x0032, 350, 40,
- X 14, 50, 12, 'A', {24,8} , {38,0,0,0} , 36},
- X{"Grey Wraith" ,0x0F02000AL,0x00001308L,0x512C, 700, 10,
- X 20, 50, 11, 'W', {23,8} , {9,9,196,0} , 36},
- X{"Young Multi-Hued Dragon" ,0x4F00000AL,0x00F81005L,0x6005, 1250, 50,
- X 20, 55, 11, 'd', {40,8} , {55,55,38,0} , 36},
- X{"Mature Blue Dragon" ,0x2F00000AL,0x00081009L,0x6005, 1200, 70,
- X 20, 75, 11, 'd', {48,8} , {54,54,38,0} , 36},
- X{"Mature Green Dragon" ,0x2F00000AL,0x0010100AL,0x6005, 1100, 70,
- X 20, 70, 11, 'd', {48,8} , {52,52,29,0} , 36},
- X{"Iridescent Beetle" ,0x0000000AL,0x00000000L,0x0002, 850, 30,
- X 16, 60, 11, 'K', {32,8} , {45,10,146,0} , 37},
- X{"King Vampire" ,0x17020002L,0x00001307L,0x512C, 1000, 10,
- X 20, 65, 11, 'V', {38,8} , {5,5,198,0} , 37},
- X{"King Lich" ,0x1F020002L,0x00019F73L,0x510C, 1400, 50,
- X 20, 65, 11, 'L', {52,8} , {180,197,214,0} , 37},
- X{"Mature Red Dragon" ,0x2F00000AL,0x00801808L,0x6015, 1400, 30,
- X 20, 80, 11, 'd', {60,8} , {56,56,39,0} , 37},
- X{"Mature Black Dragon" ,0x2F00000AL,0x00201009L,0x6005, 1350, 30,
- X 20, 55, 11, 'd', {58,8} , {54,54,38,0} , 37},
- X{"Mature Multi-Hued Dragon" ,0x6F00000AL,0x00F81A05L,0x6005, 1650, 50,
- X 20, 65, 11, 'd', {80,8} , {56,56,39,0} , 38},
- X{"Ancient White Dragon" ,0x4F000002L,0x00401A09L,0x4025, 1500, 80,
- X 20, 80, 12, 'D', {88,8} , {54,54,37,0} , 38},
- X{"Emperor Wight" ,0x1B02000AL,0x00001306L,0x512C, 1600, 10,
- X 20, 40, 12, 'W', {48,8} , {10,10,199,0} , 38},
- X{"Black Wraith" ,0x1F02000AL,0x00001307L,0x512C, 1700, 10,
- X 20, 55, 11, 'W', {50,8} , {10,10,200,0} , 38},
- X{"Nether Wraith" ,0x1F07000AL,0x00005316L,0x512C, 2100, 10,
- X 20, 55, 11, 'W', {58,8} , {10,10,202,0} , 39},
- X{"Sorcerer" ,0x1F020002L,0x0000FF73L,0x6030, 2150, 10,
- X 20, 50, 12, 'p', {30,8} , {16,0,0,0} , 39},
- X{"Ancient Blue Dragon" ,0x4F000002L,0x00081A08L,0x6005, 2500, 80,
- X 20, 90, 12, 'D', {87,8} , {55,55,39,0} , 39},
- X{"Ancient Green Dragon" ,0x4F000002L,0x00101A09L,0x6005, 2400, 80,
- X 20, 85, 12, 'D', {90,8} , {54,54,38,0} , 39},
- X{"Ancient Black Dragon" ,0x4F000002L,0x00201A07L,0x6005, 2500, 70,
- X 20, 90, 12, 'D', {90,8} , {55,55,38,0} , 39},
- X{"Crystal Ooze" ,0x073B000AL,0x00000000L,0x10A0, 8, 1,
- X 10, 30, 9, 'O', {12,8} , {128,0,0,0} , 40},
- X{"Disenchanter Worm" ,0x00200022L,0x00000000L,0x01B2, 30, 10,
- X 7, 5, 10, 'w', {10,8} , {208,0,0,0} , 40},
- X{"Rotting Quylthulg" ,0x00010004L,0x00004014L,0x5000, 1000, 0,
- X 20, 1, 12, 'Q', {12,8} , {0,0,0,0} , 40},
- X{"Ancient Red Dragon" ,0x6F000002L,0x00801E06L,0x6015, 2750, 70,
- X 20, 100, 12, 'D', {105,8} , {56,56,40,0} , 40},
- X{"Death Quasit" ,0x1103000AL,0x000010FAL,0x1004, 1000, 0,
- X 20, 80, 13, 'q', {55,8} , {177,58,58,0} , 40},
- X{"Emperor Lich" ,0x2F020002L,0x00019F72L,0x510C,10000, 50,
- X 20, 75, 12, 'L', {38,40} , {181,201,214,0} , 40},
- X{"Ancient Multi-Hued Dragon",0x7F000002L,0x00F89E05L,0x6005,12000, 70,
- X 20, 100, 12, 'D', {52,40} , {57,57,42,0} , 40},
- X /* Winning creatures should follow here. */
- X /* Winning creatures are denoted by the 32 bit in CMOVE */
- X /* Iggy is not a win creature, just a royal pain in the ass. */
- X{"Evil Iggy" ,0x7F130002L,0x0001D713L,0x5004,18000, 0,
- X 30, 80, 12, 'p', {60,40} , {81,150,0,0} , 50},
- X /* Here is the only actual win creature. */
- X{"Balrog" ,0xFF1F0002L,0x0081C743L,0x5004,55000L, 0,
- X 40, 125, 13, 'B', {75,40} , {104,78,214,0} , 100}
- X};
- X#endif
- X
- X/* ERROR: attack #35 is no longer used */
- Xstruct m_attack_type monster_attacks[N_MONS_ATTS] = {
- X/* 0 */ {0, 0, 0, 0}, {1, 1, 1, 2}, {1, 1, 1, 3}, {1, 1, 1, 4},
- X {1, 1, 1, 5}, {1, 1, 1, 6}, {1, 1, 1, 7}, {1, 1, 1, 8},
- X {1, 1, 1, 9}, {1, 1, 1, 10}, {1, 1, 1, 12}, {1, 1, 2, 2},
- X {1, 1, 2, 3}, {1, 1, 2, 4}, {1, 1, 2, 5}, {1, 1, 2, 6},
- X {1, 1, 2, 8}, {1, 1, 3, 4}, {1, 1, 3, 5}, {1, 1, 3, 6},
- X/* 20 */{1, 1, 3, 8}, {1, 1, 4, 3}, {1, 1, 4, 6}, {1, 1, 5, 5},
- X {1, 2, 1, 1}, {1, 2, 1, 2}, {1, 2, 1, 3}, {1, 2, 1, 4},
- X {1, 2, 1, 5}, {1, 2, 1, 6}, {1, 2, 1, 7}, {1, 2, 1, 8},
- X {1, 2, 1, 10}, {1, 2, 2, 3}, {1, 2, 2, 4}, {1, 2, 2, 5},
- X {1, 2, 2, 6}, {1, 2, 2, 8}, {1, 2, 2, 10}, {1, 2, 2, 12},
- X/* 40 */{1, 2, 2, 14}, {1, 2, 3, 4}, {1, 2, 3, 12}, {1, 2, 4, 4},
- X {1, 2, 4, 5}, {1, 2, 4, 6}, {1, 2, 4, 8}, {1, 2, 5, 4},
- X {1, 2, 5, 8}, {1, 3, 1, 1}, {1, 3, 1, 2}, {1, 3, 1, 3},
- X {1, 3, 1, 4}, {1, 3, 1, 5}, {1, 3, 1, 8}, {1, 3, 1, 9},
- X {1, 3, 1, 10}, {1, 3, 1, 12}, {1, 3, 3, 3}, {1, 4, 1, 2},
- X/* 60 */{1, 4, 1, 3}, {1, 4, 1, 4}, {1, 4, 2, 4}, {1, 5, 1, 2},
- X {1, 5, 1, 3}, {1, 5, 1, 4}, {1, 5, 1, 5}, {1, 10, 5, 6},
- X {1, 12, 1, 1}, {1, 12, 1, 2}, {1, 13, 1, 1}, {1, 13, 1, 3},
- X {1, 14, 0, 0}, {1, 16, 1, 4}, {1, 16, 1, 6}, {1, 16, 1, 8},
- X {1, 16, 1, 10}, {1, 16, 2, 8}, {1, 17, 8, 12}, {1, 18, 0, 0},
- X/* 80 */{2, 1, 3, 4}, {2, 1, 4, 6}, {2, 2, 1, 4}, {2, 2, 2, 4},
- X {2, 2, 4, 4}, {2, 4, 1, 4}, {2, 4, 1, 7}, {2, 5, 1, 5},
- X {2, 7, 1, 6}, {3, 1, 1, 4}, {3, 5, 1, 8}, {3, 13, 1, 4},
- X {3, 7, 0, 0}, {4, 1, 1, 1}, {4, 1, 1, 4}, {4, 2, 1, 2},
- X {4, 2, 1, 6}, {4, 5, 0, 0}, {4, 7, 0, 0}, {4, 10, 0, 0},
- X/*100 */{4, 13, 1, 6}, {5, 1, 2, 6}, {5, 1, 3, 7}, {5, 1, 4, 6},
- X {5, 1, 10, 12}, {5, 2, 1, 3}, {5, 2, 3, 6}, {5, 2, 3, 12},
- X {5, 5, 4, 4}, {5, 9, 3, 7}, {5, 9, 4, 5}, {5, 12, 1, 6},
- X {6, 2, 1, 3}, {6, 2, 2, 8}, {6, 2, 4, 4}, {6, 5, 1, 10},
- X {6, 5, 2, 3}, {6, 8, 1, 5}, {6, 9, 2, 6}, {6, 9, 3, 6},
- X/*120 */{7, 1, 3, 6}, {7, 2, 1, 3}, {7, 2, 1, 6}, {7, 2, 3, 6},
- X {7, 2, 3, 10}, {7, 5, 1, 6}, {7, 5, 2, 3}, {7, 5, 2, 6},
- X {7, 5, 4, 4}, {7, 12, 1, 4}, {8, 1, 3, 8}, {8, 2, 1, 3},
- X {8, 2, 2, 6}, {8, 2, 3, 8}, {8, 2, 5, 5}, {8, 5, 5, 4},
- X {9, 5, 1, 2}, {9, 5, 2, 5}, {9, 5, 2, 6}, {9, 8, 2, 4},
- X/*140 */{9, 12, 1, 3}, {10, 2, 1, 6}, {10, 4, 1, 1}, {10, 7, 2, 6},
- X {10, 9, 1, 2}, {11, 1, 1, 2}, {11, 7, 0, 0}, {11, 13, 2, 4},
- X {12, 5, 0, 0}, {13, 5, 0, 0}, {13, 19, 0, 0}, {14, 1, 1, 3},
- X {14, 1, 3, 4}, {14, 2, 1, 3}, {14, 2, 1, 4}, {14, 2, 1, 5},
- X {14, 2, 1, 6}, {14, 2, 1, 10}, {14, 2, 2, 4}, {14, 2, 2, 5},
- X/*160 */{14, 2, 2, 6}, {14, 2, 3, 4}, {14, 2, 3, 9}, {14, 2, 4, 4},
- X {14, 4, 1, 2}, {14, 4, 1, 4}, {14, 4, 1, 8}, {14, 4, 2, 5},
- X {14, 5, 1, 2}, {14, 5, 1, 3}, {14, 5, 2, 4}, {14, 5, 2, 6},
- X {14, 5, 3, 5}, {14, 12, 1, 2}, {14, 12, 1, 4}, {14, 13, 2, 4},
- X {15, 2, 1, 6}, {15, 2, 3, 6}, {15, 5, 1, 8}, {15, 5, 2, 8},
- X/*180 */{15, 5, 2, 10}, {15, 5, 2, 12}, {15, 12, 1, 3}, {16, 13, 1, 2},
- X {17, 3, 1, 10}, {18, 5, 0, 0}, {19, 5, 5, 8}, {19, 5, 12, 8},
- X {19, 5, 14, 8}, {19, 5, 15, 8}, {19, 5, 18, 8}, {19, 5, 20, 8},
- X {19, 5, 22, 8}, {19, 5, 26, 8}, {19, 5, 30, 8}, {19, 5, 32, 8},
- X {19, 5, 34, 8}, {19, 5, 36, 8}, {19, 5, 38, 8}, {19, 5, 42, 8},
- X/*200 */{19, 5, 44, 8}, {19, 5, 46, 8}, {19, 5, 52, 8}, {20, 10, 0, 0},
- X {21, 1, 0, 0}, {21, 5, 0, 0}, {21, 5, 1, 6}, {21, 7, 0, 0},
- X {21, 12, 1, 4}, {22, 5, 2, 3}, {22, 12, 0, 0}, {22, 15, 1, 1},
- X/*212 */{23, 1, 1, 1}, {23, 5, 1, 3}, {24, 5, 0, 0}
- X};
- X
- X
- Xmonster_type m_list[MAX_MALLOC];
- Xint16 m_level[MAX_MONS_LEVEL+1];
- X
- X/* Blank monster values */
- Xmonster_type blank_monster = {0,0,0,0,0,0,0,FALSE,0,FALSE};
- Xint16 mfptr; /* Cur free monster ptr */
- Xint16 mon_tot_mult; /* # of repro's of creature */
- END_OF_FILE
- if test 40791 -ne `wc -c <'source/monsters.c'`; then
- echo shar: \"'source/monsters.c'\" unpacked with wrong size!
- fi
- # end of 'source/monsters.c'
- fi
- if test -f 'source/store1.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'source/store1.c'\"
- else
- echo shar: Extracting \"'source/store1.c'\" \(11775 characters\)
- sed "s/^X//" >'source/store1.c' <<'END_OF_FILE'
- X/* source/store1.c: store code, updating store inventory, pricing objects
- X
- X Copyright (c) 1989-92 James E. Wilson, Robert A. Koeneke
- X
- X This software may be copied and distributed for educational, research, and
- 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#include "externs.h"
- X
- X#ifdef USG
- X#ifndef ATARIST_MWC
- X#include <string.h>
- X#endif
- X#else
- X#include <strings.h>
- X#endif
- X
- X#if defined(LINT_ARGS)
- Xstatic void insert_store(int, int, int32, struct inven_type *);
- Xstatic void store_create(int);
- X#else
- Xstatic void insert_store();
- Xstatic void store_create();
- X#endif
- X
- X
- X/* Returns the value for any given object -RAK- */
- Xint32 item_value(i_ptr)
- Xregister inven_type *i_ptr;
- X{
- X register int32 value;
- X
- X value = i_ptr->cost;
- X /* don't purchase known cursed items */
- X if (i_ptr->ident & ID_DAMD)
- X value = 0;
- X else if (((i_ptr->tval >= TV_BOW) && (i_ptr->tval <= TV_SWORD)) ||
- X ((i_ptr->tval >= TV_BOOTS) && (i_ptr->tval <= TV_SOFT_ARMOR)))
- X { /* Weapons and armor */
- X if (!known2_p(i_ptr))
- X value = object_list[i_ptr->index].cost;
- X else if ((i_ptr->tval >= TV_BOW) && (i_ptr->tval <= TV_SWORD))
- X {
- X if (i_ptr->tohit < 0)
- X value = 0;
- X else if (i_ptr->todam < 0)
- X value = 0;
- X else if (i_ptr->toac < 0)
- X value = 0;
- X else
- X value = i_ptr->cost+(i_ptr->tohit+i_ptr->todam+i_ptr->toac)*100;
- X }
- X else
- X {
- X if (i_ptr->toac < 0)
- X value = 0;
- X else
- X value = i_ptr->cost+i_ptr->toac*100;
- X }
- X }
- X else if ((i_ptr->tval >= TV_SLING_AMMO) && (i_ptr->tval <= TV_SPIKE))
- X { /* Ammo */
- X if (!known2_p(i_ptr))
- X value = object_list[i_ptr->index].cost;
- X else
- X {
- X if (i_ptr->tohit < 0)
- X value = 0;
- X else if (i_ptr->todam < 0)
- X value = 0;
- X else if (i_ptr->toac < 0)
- X value = 0;
- X else
- X /* use 5, because missiles generally appear in groups of 20,
- X so 20 * 5 == 100, which is comparable to weapon bonus above */
- X value = i_ptr->cost+(i_ptr->tohit+i_ptr->todam+i_ptr->toac)*5;
- X }
- X }
- X else if ((i_ptr->tval == TV_SCROLL1) || (i_ptr->tval == TV_SCROLL2) ||
- X (i_ptr->tval == TV_POTION1) || (i_ptr->tval == TV_POTION2))
- X { /* Potions, Scrolls, and Food */
- X if (!known1_p(i_ptr))
- X value = 20;
- X }
- X else if (i_ptr->tval == TV_FOOD)
- X {
- X if ((i_ptr->subval < (ITEM_SINGLE_STACK_MIN + MAX_MUSH))
- X && !known1_p(i_ptr))
- X value = 1;
- X }
- X else if ((i_ptr->tval == TV_AMULET) || (i_ptr->tval == TV_RING))
- X { /* Rings and amulets */
- X if (!known1_p(i_ptr))
- X /* player does not know what type of ring/amulet this is */
- X value = 45;
- X else if (!known2_p(i_ptr))
- X /* player knows what type of ring, but does not know whether it is
- X cursed or not, if refuse to buy cursed objects here, then
- X player can use this to 'identify' cursed objects */
- X value = object_list[i_ptr->index].cost;
- X }
- X else if ((i_ptr->tval == TV_STAFF) || (i_ptr->tval == TV_WAND))
- X { /* Wands and staffs*/
- X if (!known1_p(i_ptr))
- X {
- X if (i_ptr->tval == TV_WAND)
- X value = 50;
- X else
- X value = 70;
- X }
- X else if (known2_p(i_ptr))
- X value = i_ptr->cost + (i_ptr->cost / 20) * i_ptr->p1;
- X }
- X /* picks and shovels */
- X else if (i_ptr->tval == TV_DIGGING)
- X {
- X if (!known2_p(i_ptr))
- X value = object_list[i_ptr->index].cost;
- X else
- X {
- X if (i_ptr->p1 < 0)
- X value = 0;
- X else
- X {
- X /* some digging tools start with non-zero p1 values, so only
- X multiply the plusses by 100, make sure result is positive */
- X value = i_ptr->cost
- X + (i_ptr->p1 - object_list[i_ptr->index].p1) * 100;
- X if (value < 0)
- X value = 0;
- X }
- X }
- X }
- X /* multiply value by number of items if it is a group stack item */
- X if (i_ptr->subval > ITEM_GROUP_MIN) /* do not include torches here */
- X value = value * i_ptr->number;
- X return(value);
- X}
- X
- X
- X/* Asking price for an item -RAK- */
- Xint32 sell_price(snum, max_sell, min_sell, item)
- Xint snum;
- Xint32 *max_sell, *min_sell;
- Xinven_type *item;
- X{
- X register int32 i;
- X register store_type *s_ptr;
- X
- X s_ptr = &store[snum];
- X i = item_value(item);
- X /* check item->cost in case it is cursed, check i in case it is damaged */
- X if ((item->cost > 0) && (i > 0))
- X {
- X i = i * rgold_adj[owners[s_ptr->owner].owner_race][py.misc.prace] / 100;
- X if (i < 1) i = 1;
- X *max_sell = i * owners[s_ptr->owner].max_inflate / 100;
- X *min_sell = i * owners[s_ptr->owner].min_inflate / 100;
- X if (min_sell > max_sell) min_sell = max_sell;
- X return(i);
- X }
- X else
- X /* don't let the item get into the store inventory */
- X return(0);
- X}
- X
- X
- X/* Check to see if he will be carrying too many objects -RAK- */
- Xint store_check_num(t_ptr, store_num)
- Xinven_type *t_ptr;
- Xint store_num;
- X{
- X register int store_check, i;
- X register store_type *s_ptr;
- X register inven_type *i_ptr;
- X
- X store_check = FALSE;
- X s_ptr = &store[store_num];
- X if (s_ptr->store_ctr < STORE_INVEN_MAX)
- X store_check = TRUE;
- X else if (t_ptr->subval >= ITEM_SINGLE_STACK_MIN)
- X for (i = 0; i < s_ptr->store_ctr; i++)
- X {
- X i_ptr = &s_ptr->store_inven[i].sitem;
- X /* note: items with subval of gte ITEM_SINGLE_STACK_MAX only stack
- X if their subvals match */
- X if (i_ptr->tval == t_ptr->tval && i_ptr->subval == t_ptr->subval
- X && ((int)i_ptr->number + (int)t_ptr->number < 256)
- X && (t_ptr->subval < ITEM_GROUP_MIN
- X || (i_ptr->p1 == t_ptr->p1)))
- X store_check = TRUE;
- X }
- X return(store_check);
- X}
- X
- X
- X/* Insert INVEN_MAX at given location */
- Xstatic void insert_store(store_num, pos, icost, i_ptr)
- Xregister int pos;
- Xint store_num;
- Xint32 icost;
- Xinven_type *i_ptr;
- X{
- X register int i;
- X register store_type *s_ptr;
- X
- X s_ptr = &store[store_num];
- X for (i = s_ptr->store_ctr-1; i >= pos; i--)
- X s_ptr->store_inven[i+1] = s_ptr->store_inven[i];
- X s_ptr->store_inven[pos].sitem = *i_ptr;
- X s_ptr->store_inven[pos].scost = -icost;
- X s_ptr->store_ctr++;
- X}
- X
- X
- X/* Add the item in INVEN_MAX to stores inventory. -RAK- */
- Xvoid store_carry(store_num, ipos, t_ptr)
- Xint store_num;
- Xint *ipos;
- Xinven_type *t_ptr;
- X{
- X int item_num, item_val, flag;
- X register int typ, subt;
- X int32 icost, dummy;
- X register inven_type *i_ptr;
- X register store_type *s_ptr;
- X
- X *ipos = -1;
- X if (sell_price(store_num, &icost, &dummy, t_ptr) > 0)
- X {
- X s_ptr = &store[store_num];
- X item_val = 0;
- X item_num = t_ptr->number;
- X flag = FALSE;
- X typ = t_ptr->tval;
- X subt = t_ptr->subval;
- X do
- X {
- X i_ptr = &s_ptr->store_inven[item_val].sitem;
- X if (typ == i_ptr->tval)
- X {
- X if (subt == i_ptr->subval && /* Adds to other item */
- X subt >= ITEM_SINGLE_STACK_MIN
- X && (subt < ITEM_GROUP_MIN || i_ptr->p1 == t_ptr->p1))
- X {
- X *ipos = item_val;
- X i_ptr->number += item_num;
- X /* must set new scost for group items, do this only for items
- X strictly greater than group_min, not for torches, this
- X must be recalculated for entire group */
- X if (subt > ITEM_GROUP_MIN)
- X {
- X (void) sell_price (store_num, &icost, &dummy, i_ptr);
- X s_ptr->store_inven[item_val].scost = -icost;
- X }
- X /* must let group objects (except torches) stack over 24
- X since there may be more than 24 in the group */
- X else if (i_ptr->number > 24)
- X i_ptr->number = 24;
- X flag = TRUE;
- X }
- X }
- X else if (typ > i_ptr->tval)
- X { /* Insert into list */
- X insert_store(store_num, item_val, icost, t_ptr);
- X flag = TRUE;
- X *ipos = item_val;
- X }
- X item_val++;
- X }
- X while ((item_val < s_ptr->store_ctr) && (!flag));
- X if (!flag) /* Becomes last item in list */
- X {
- X insert_store(store_num, (int)s_ptr->store_ctr, icost, t_ptr);
- X *ipos = s_ptr->store_ctr - 1;
- X }
- X }
- X}
- X
- X/* Destroy an item in the stores inventory. Note that if */
- X/* "one_of" is false, an entire slot is destroyed -RAK- */
- Xvoid store_destroy(store_num, item_val, one_of)
- Xint store_num, item_val;
- Xint one_of;
- X{
- X register int j, number;
- X register store_type *s_ptr;
- X register inven_type *i_ptr;
- X
- X s_ptr = &store[store_num];
- X i_ptr = &s_ptr->store_inven[item_val].sitem;
- X
- X /* for single stackable objects, only destroy one half on average,
- X this will help ensure that general store and alchemist have
- X reasonable selection of objects */
- X if ((i_ptr->subval >= ITEM_SINGLE_STACK_MIN) &&
- X (i_ptr->subval <= ITEM_SINGLE_STACK_MAX))
- X {
- X if (one_of)
- X number = 1;
- X else
- X number = randint((int)i_ptr->number);
- X }
- X else
- X number = i_ptr->number;
- X
- X if (number != i_ptr->number)
- X i_ptr->number -= number;
- X else
- X {
- X for (j = item_val; j < s_ptr->store_ctr-1; j++)
- X s_ptr->store_inven[j] = s_ptr->store_inven[j+1];
- X invcopy(&s_ptr->store_inven[s_ptr->store_ctr-1].sitem, OBJ_NOTHING);
- X s_ptr->store_inven[s_ptr->store_ctr-1].scost = 0;
- X s_ptr->store_ctr--;
- X }
- X}
- X
- X
- X/* Initializes the stores with owners -RAK- */
- Xvoid store_init()
- X{
- X register int i, j, k;
- X register store_type *s_ptr;
- X
- X i = MAX_OWNERS / MAX_STORES;
- X for (j = 0; j < MAX_STORES; j++)
- X {
- X s_ptr = &store[j];
- X s_ptr->owner = MAX_STORES*(randint(i)-1) + j;
- X s_ptr->insult_cur = 0;
- X s_ptr->store_open = 0;
- X s_ptr->store_ctr = 0;
- X s_ptr->good_buy = 0;
- X s_ptr->bad_buy = 0;
- X for (k = 0; k < STORE_INVEN_MAX; k++)
- X {
- X invcopy(&s_ptr->store_inven[k].sitem, OBJ_NOTHING);
- X s_ptr->store_inven[k].scost = 0;
- X }
- X }
- X}
- X
- X
- X/* Creates an item and inserts it into store's inven -RAK- */
- Xstatic void store_create(store_num)
- Xint store_num;
- X{
- X register int i, tries;
- X int cur_pos, dummy;
- X register store_type *s_ptr;
- X register inven_type *t_ptr;
- X
- X tries = 0;
- X cur_pos = popt();
- X s_ptr = &store[store_num];
- X do
- X {
- X i = store_choice[store_num][randint(STORE_CHOICES)-1];
- X invcopy(&t_list[cur_pos], i);
- X magic_treasure(cur_pos, OBJ_TOWN_LEVEL);
- X t_ptr = &t_list[cur_pos];
- X if (store_check_num(t_ptr, store_num))
- X {
- X if ((t_ptr->cost > 0) && /* Item must be good */
- X (t_ptr->cost < owners[s_ptr->owner].max_cost))
- X {
- X /* equivalent to calling ident_spell(), except will not
- X change the object_ident array */
- X store_bought(t_ptr);
- X store_carry(store_num, &dummy, t_ptr);
- X tries = 10;
- X }
- X }
- X tries++;
- X }
- X while (tries <= 3);
- X pusht((int8u)cur_pos);
- X}
- X
- X
- X/* Initialize and up-keep the store's inventory. -RAK- */
- Xvoid store_maint()
- X{
- X register int i, j;
- X register store_type *s_ptr;
- X
- X for (i = 0; i < MAX_STORES; i++)
- X {
- X s_ptr = &store[i];
- X s_ptr->insult_cur = 0;
- X if (s_ptr->store_ctr >= STORE_MIN_INVEN)
- X {
- X j = randint(STORE_TURN_AROUND);
- X if (s_ptr->store_ctr >= STORE_MAX_INVEN)
- X j += 1 + s_ptr->store_ctr - STORE_MAX_INVEN;
- X while (--j >= 0)
- X store_destroy(i, randint((int)s_ptr->store_ctr)-1, FALSE);
- X }
- X
- X if (s_ptr->store_ctr <= STORE_MAX_INVEN)
- X {
- X j = randint(STORE_TURN_AROUND);
- X if (s_ptr->store_ctr < STORE_MIN_INVEN)
- X j += STORE_MIN_INVEN - s_ptr->store_ctr;
- X while (--j >= 0)
- X store_create(i);
- X }
- X }
- X}
- X
- X/* eliminate need to bargain if player has haggled well in the past -DJB- */
- Xint noneedtobargain(store_num, minprice)
- Xint store_num;
- Xint32 minprice;
- X{
- X register int flagnoneed;
- X register store_type *s_ptr;
- X
- X s_ptr = &store[store_num];
- X flagnoneed = ((s_ptr->good_buy == MAX_SHORT)
- X || (s_ptr->good_buy > 3 * s_ptr->bad_buy + 5 + minprice/50));
- X return (flagnoneed);
- X}
- X
- X
- X/* update the bargin info -DJB- */
- Xvoid updatebargain(store_num, price, minprice)
- Xint store_num;
- Xint32 price, minprice;
- X{
- X register store_type *s_ptr;
- X
- X s_ptr = &store[store_num];
- X if (minprice > 9)
- X if (price == minprice)
- X {
- X if (s_ptr->good_buy < MAX_SHORT)
- X s_ptr->good_buy++;
- X }
- X else
- X {
- X if (s_ptr->bad_buy < MAX_SHORT)
- X s_ptr->bad_buy++;
- X }
- X}
- END_OF_FILE
- if test 11775 -ne `wc -c <'source/store1.c'`; then
- echo shar: \"'source/store1.c'\" unpacked with wrong size!
- fi
- # end of 'source/store1.c'
- fi
- echo shar: End of archive 10 \(of 39\).
- cp /dev/null ark10isdone
- MISSING=""
- 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
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 39 archives.
- echo "Now run "bldfiles.sh" to build split files"
- rm -f ark[1-9]isdone ark[1-9][0-9]isdone
- else
- echo You still need to unpack the following archives:
- echo " " ${MISSING}
- fi
- ## End of shell archive.
- exit 0
-