]>
git.cameronkatri.com Git - bsdgames-darwin.git/blob - hack/def.monst.h
2 * Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985.
4 * $NetBSD: def.monst.h,v 1.3 1995/03/23 08:29:30 cgd Exp $
12 xchar mdx
,mdy
; /* if mdispl then pos where last displayed */
14 coord mtrack
[MTSZ
]; /* monster track */
16 char mappearance
; /* nonzero for undetected 'M's and for '1's */
17 Bitfield(mimic
,1); /* undetected mimic */
18 Bitfield(mdispl
,1); /* mdx,mdy valid */
19 Bitfield(minvis
,1); /* invisible */
20 Bitfield(cham
,1); /* shape-changer */
21 Bitfield(mhide
,1); /* hides beneath objects */
22 Bitfield(mundetected
,1); /* not seen in present hiding place */
27 Bitfield(mflee
,1); /* fleeing */
28 Bitfield(mfleetim
,7); /* timeout for mflee */
29 Bitfield(mcan
,1); /* has been cancelled */
30 Bitfield(mtame
,1); /* implies peaceful */
31 Bitfield(mpeaceful
,1); /* does not attack unprovoked */
32 Bitfield(isshk
,1); /* is shopkeeper */
33 Bitfield(isgd
,1); /* is guard */
34 Bitfield(mcansee
,1); /* cansee 1, temp.blinded 0, blind 0 */
35 Bitfield(mblinded
,7); /* cansee 0, temp.blinded n, blind 0 */
36 Bitfield(mtrapped
,1); /* trapped in a pit or bear trap */
37 Bitfield(mnamelth
,6); /* length of name (following mxlth) */
39 Bitfield(wormno
,5); /* at most 31 worms on any level */
41 unsigned mtrapseen
; /* bitmap of traps we've been trapped in */
42 long mlstmv
; /* prevent two moves at once */
45 unsigned mxlth
; /* length of following data */
46 /* in order to prevent alignment problems mextra should
47 be (or follow) a long int */
48 long mextra
[1]; /* monster dependent info */
51 #define newmonst(xl) (struct monst *) alloc((unsigned)(xl) + sizeof(struct monst))
53 extern struct monst
*fmon
;
54 extern struct monst
*fallen_down
;
57 /* these are in mspeed */
58 #define MSLOW 1 /* slow monster */
59 #define MFAST 2 /* speeded monster */
61 #define NAME(mtmp) (((char *) mtmp->mextra) + mtmp->mxlth)