Source:NetHack 2.3e/monst.c

From NetHackWiki
Jump to navigation Jump to search

Below is the full text to monst.c from the source code of NetHack 2.3e.

Warning! This is the source code from an old release. For newer releases, see Source code

Screenshots and source code from Hack are used under the CWI license.

1.    /*	SCCS Id: @(#)monst.c	2.3	87/12/16
2.    /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
3.    
4.    #include "hack.h"
5.    #include "eshk.h"
6.    #include "edog.h"
7.    extern char plname[PL_NSIZ];
8.    
9.    struct permonst mons[CMNUM+2] = {
10.   	{ "bat",		'B',  1, 22, 8,  0, 1,  4, 0 },
11.   	{ "gnome",		'G',  1,  6, 5,  0, 1,  6, 0 },
12.   	{ "hobgoblin",		'H',  1,  9, 5,  0, 1,  8, 0 },
13.   	{ "jackal",		'J',  0, 12, 7,  0, 1,  2, 0 },
14.   #ifdef KOPS
15.   	{ "Keystone Kop",       'K',  1,  6, 7, 10, 1,  4, 0 },
16.   #else
17.   	{ "kobold",		'K',  1,  6, 7,  0, 1,  4, 0 },
18.   #endif
19.   #ifndef ROCKMOLE
20.   	{ "giant rat",		'r',  0, 12, 7,  0, 1,  3, 0 },
21.   #endif
22.   	{ "acid blob",		'a',  2,  3, 8,  0, 0,  0, 0 },
23.   	{ "floating eye",	'E',  2,  1, 9, 10, 0,  0, 0 },
24.   	{ "homunculus",		'h',  2,  6, 6, 10, 1,  3, 0 },
25.   	{ "imp",		'i',  2,  6, 2, 20, 1,  4, 0 },
26.   	{ "leprechaun",		'L',  5, 15, 8, 20, 1,  2, 0 },
27.   	{ "orc",		'O',  2,  9, 6,  0, 1,  8, 0 },
28.   	{ "yellow light",	'y',  3, 15, 0,  0, 0,  0, 0 },
29.   	{ "zombie",		'Z',  2,  6, 8,  0, 1,  8, 0 },
30.   	{ "giant ant",		'A',  3, 18, 3,  0, 1,  6, 0 },
31.   #ifdef ROCKMOLE
32.   	{ "rock mole",          'r',  3,  3, 0, 20, 1,  6, 0 },
33.   #endif
34.   	{ "fog cloud",		'f',  3,  1, 0,  0, 1,  6, 0 },
35.   	{ "nymph",		'N',  6, 12, 9, 20, 1,  2, 0 },
36.   	{ "piercer",		'p',  3,  1, 3,  0, 2,  6, 0 },
37.   #ifdef KAA
38.   	{ "quantum mechanic",	'Q',  6, 12, 3, 10, 1,  4, 0 },
39.   #else
40.   	{ "quasit",		'Q',  3, 15, 3, 20, 1,  4, 0 },
41.   #endif
42.   	{ "quivering blob",	'q',  3,  1, 8,  0, 1,  8, 0 },
43.   #ifdef KAA
44.   	{ "violet fungus",	'v',  3,  1, 7,  0, 1,  4, 0 },
45.   #else
46.   	{ "violet fungi",	'v',  3,  1, 7,  0, 1,  4, 0 },
47.   #endif
48.   	{ "giant beetle",	'b',  4,  6, 4,  0, 3,  4, 0 },
49.   	{ "centaur",		'C',  4, 18, 4, 10, 1,  6, 0 },
50.   	{ "cockatrice",		'c',  4,  6, 6, 30, 1,  3, 0 },
51.   	{ "gelatinous cube",	'g',  4,  6, 8,  0, 2,  4, 0 },
52.   	{ "jaguar",		'j',  4, 15, 6,  0, 1,  8, 0 },
53.   	{ "killer bee",		'k',  4, 14, 4,  0, 2,  4, 0 },
54.   	{ "snake",		'S',  4, 15, 3,  0, 1,  6, 0 },
55.   	{ "freezing sphere",	'F',  2, 13, 4,  0, 0,  0, 0 },
56.   	{ "owlbear",		'o',  5, 12, 5,  0, 2,  6, 0 },
57.   	{ "rust monster",	'R', 10, 18, 3,  0, 0,  0, 0 },
58.   #ifdef SPIDERS
59.   	{ "giant spider",	's',  5, 15, 3,  0, 1,  4, 0 },
60.   #else
61.   	{ "scorpion",		's',  5, 15, 3,  0, 1,  4, 0 },
62.   #endif
63.   	{ "tengu",		't',  5, 13, 5, 30, 1,  7, 0 },
64.   	{ "wraith",		'W',  5, 12, 5, 15, 1,  6, 0 },
65.   #ifdef NOWORM
66.   	{ "wumpus",		'w',  8,  3, 2, 10, 3,  6, 0 },
67.   #else
68.   	{ "long worm",		'w',  8,  3, 5, 10, 1,  4, 0 },
69.   #endif
70.   	{ "large dog",		'd',  6, 15, 4,  0, 2,  4, 0 },
71.   	{ "leocrotta",		'l',  6, 18, 4, 10, 3,  6, 0 },
72.   	{ "mimic",		'M',  7,  3, 7,  0, 3,  4, 0 },
73.   	{ "troll",		'T',  7, 12, 4,  0, 2,  7, 0 },
74.   	{ "unicorn",		'u',  8, 24, 5, 70, 1, 10, 0 },
75.   	{ "yeti",		'Y',  5, 15, 6,  0, 1,  6, 0 },
76.   	{ "stalker",		'I',  8, 12, 3,  0, 4,  4, 0 },
77.   	{ "umber hulk",		'U',  9,  6, 2, 25, 2, 10, 0 },
78.   	{ "vampire",		'V',  8, 12, 1, 25, 1,  6, 0 },
79.   	{ "xorn",		'X',  8,  9,-2, 20, 4,  6, 0 },
80.   	{ "xan",		'x',  7, 18,-2,  0, 2,  4, 0 },
81.   	{ "zruty",		'z',  9,  8, 3,  0, 3,  6, 0 },
82.   	{ "chameleon",		':',  6,  5, 6, 10, 4,  2, 0 },
83.   	{ "giant",		'9',  9, 18, 5,  0, 2, 12, 0 },
84.   	{ "dragon",		'D', 10,  9,-1, 20, 3,  8, 0 },
85.   	{ "ettin",		'e', 10, 12, 3,  0, 2,  8, 0 },
86.   	{ "lurker above",	'\'',10,  3, 3,  0, 0,  0, 0 },
87.   	{ "nurse",		'n', 11,  6, 0,  0, 2,  6, 0 },
88.   	{ "trapper",		',', 12,  3, 3,  0, 0,  0, 0 },
89.   	{ "purple worm",	'P', 15,  9, 6, 20, 2,  8, 0 },
90.   	{ "demon",		'&', 10, 12,-4, 30, 1,  4, 0 },
91.   	{ "minotaur",		'm', 15, 15, 6,  0, 4, 10, 0 },
92.   	{ "shopkeeper", 	'@', 12, 18, 0, 50, 4,  8, sizeof(struct eshk) }
93.   };
94.   
95.   struct permonst pm_ghost = { "ghost", ' ', 10, 3, -5, 50, 1, 1, sizeof(plname) };
96.   #ifdef SAC
97.   struct permonst pm_soldier = { "soldier", '3', 12, 4, -3, 15, 10, 4, 0 };
98.   struct permonst pm_wizard = { "wizard of Yendor", '1', 20, 12, -8, 100, 2, 12, 0 };
99.   #else
100.  struct permonst pm_wizard = { "wizard of Yendor", '1', 15, 12, -2, 70, 1, 12, 0 };
101.  #endif
102.  #ifdef RPH
103.  struct permonst pm_medusa = {"medusa", '8', 15, 12, 2, 50, 1, 8, 0};
104.  #endif
105.  #ifdef MAIL
106.  struct permonst pm_mail_daemon = { "mail daemon", '2', 100, 1, 10, 127, 0, 0, 0 };
107.  #endif
108.  struct permonst pm_eel    = {"electric eel", ';', 15, 6, -3, 0, 3, 6, 0};
109.  struct permonst pm_djinni = {"djinni",  '&', 10, 12, 0, 30, 2, 8, 0};
110.  struct permonst pm_gremlin= {"gremlin", 'G', 3, 12, 2, 25, 1, 8, 0};
111.  #ifdef STOOGES
112.  struct permonst pm_larry  = {"Larry",   '@', 3, 12, 10, 0, 1, 6, 0};
113.  struct permonst pm_curly  = {"Curly",   '@', 3, 12, 10, 0, 1, 6, 0};
114.  struct permonst pm_moe    = {"Moe",     '@', 3, 12, 10, 0, 1, 6, 0};
115.  #endif