00001 /* SCCS Id: @(#)eshk.h 3.4 1997/05/01 */ 00002 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ 00003 /* NetHack may be freely redistributed. See license for details. */ 00004 00005 #ifndef ESHK_H 00006 #define ESHK_H 00007 00008 #define REPAIR_DELAY 5 /* minimum delay between shop damage & repair */ 00009 00010 #define BILLSZ 200 00011 00012 struct bill_x { 00013 unsigned bo_id; 00014 boolean useup; 00015 long price; /* price per unit */ 00016 long bquan; /* amount used up */ 00017 }; 00018 00019 struct eshk { 00020 long robbed; /* amount stolen by most recent customer */ 00021 long credit; /* amount credited to customer */ 00022 long debit; /* amount of debt for using unpaid items */ 00023 long loan; /* shop-gold picked (part of debit) */ 00024 int shoptype; /* the value of rooms[shoproom].rtype */ 00025 schar shoproom; /* index in rooms; set by inshop() */ 00026 schar unused; /* to force alignment for stupid compilers */ 00027 boolean following; /* following customer since he owes us sth */ 00028 boolean surcharge; /* angry shk inflates prices */ 00029 boolean cheapskate; /* offers less than normal for sold goods */ 00030 coord shk; /* usual position shopkeeper */ 00031 coord shd; /* position shop door */ 00032 d_level shoplevel; /* level (& dungeon) of his shop */ 00033 int billct; /* no. of entries of bill[] in use */ 00034 struct bill_x bill[BILLSZ]; 00035 struct bill_x *bill_p; 00036 int visitct; /* nr of visits by most recent customer */ 00037 char customer[PL_NSIZ]; /* most recent customer */ 00038 char shknam[PL_NSIZ]; 00039 }; 00040 00041 #define ESHK(mon) ((struct eshk *)&(mon)->mextra[0]) 00042 00043 #define NOTANGRY(mon) ((mon)->mpeaceful) 00044 #define ANGRY(mon) (!NOTANGRY(mon)) 00045 00046 #endif /* ESHK_H */