1 /*	SCCS Id: @(#)eshk.h	3.3	97/05/01	*/
2 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
3 /* NetHack may be freely redistributed.  See license for details. */
4 
5 #ifndef ESHK_H
6 #define ESHK_H
7 
8 #define REPAIR_DELAY	5	/* minimum delay between shop damage & repair */
9 
10 #define BILLSZ	200
11 
12 struct bill_x {
13 	unsigned bo_id;
14 	boolean useup;
15 	long price;		/* price per unit */
16 	long bquan;		/* amount used up */
17 };
18 
19 struct eshk {
20 	long robbed;		/* amount stolen by most recent customer */
21 	long credit;		/* amount credited to customer */
22 	long debit;		/* amount of debt for using unpaid items */
23 	long loan;		/* shop-gold picked (part of debit) */
24 	int shoptype;		/* the value of rooms[shoproom].rtype */
25 	schar shoproom;		/* index in rooms; set by inshop() */
26 	schar unused;		/* to force alignment for stupid compilers */
27 	boolean following;	/* following customer since he owes us sth */
28 	boolean surcharge;	/* angry shk inflates prices */
29 	coord shk;		/* usual position shopkeeper */
30 	coord shd;		/* position shop door */
31 	d_level shoplevel;	/* level (& dungeon) of his shop */
32 	int billct;		/* no. of entries of bill[] in use */
33 	struct bill_x bill[BILLSZ];
34 	struct bill_x *bill_p;
35 	int visitct;		/* nr of visits by most recent customer */
36 	char customer[PL_NSIZ]; /* most recent customer */
37 	char shknam[PL_NSIZ];
38 };
39 
40 #define ESHK(mon)	((struct eshk *)&(mon)->mextra[0])
41 
42 #define NOTANGRY(mon)	((mon)->mpeaceful)
43 #define ANGRY(mon)	(!NOTANGRY(mon))
44 
45 #endif /* ESHK_H */
46