Merge branch 'master' into derek-farming

* master: (41 commits)
  Add more explicit helpless reasons
  add data.base suggestion for whistle
  Use existing function to count containers
  ...

Conflicts:
	src/do.c
	src/hack.c
	src/invent.c
	src/mon.c
	src/objnam.c
This commit is contained in:
Derek S. Ray
2015-03-29 17:32:12 -04:00
56 changed files with 3316 additions and 2131 deletions

View File

@@ -73,6 +73,11 @@ struct warntype_info {
short speciesidx; /* index of above in mons[] (for save/restore) */
};
struct polearm_info {
struct monst *hitmon; /* the monster we tried to hit last */
unsigned m_id; /* monster id of hitmon, in save file */
};
struct context_info {
unsigned ident; /* social security number for each monster */
unsigned no_of_wizards; /* 0, 1 or 2 (wizard and his shadow) */
@@ -103,6 +108,7 @@ struct context_info {
struct book_info spbook;
struct takeoff_info takeoff;
struct warntype_info warntype;
struct polearm_info polearm;
};
extern NEARDATA struct context_info context;

View File

@@ -28,6 +28,7 @@ E char SAVEP[];
E NEARDATA int bases[MAXOCLASSES];
E NEARDATA int multi;
E const char *multi_reason;
E NEARDATA int nroom;
E NEARDATA int nsubroom;
E NEARDATA int occtime;

View File

@@ -364,6 +364,7 @@ E void NDECL(heal_legs);
/* ### do_name.c ### */
E int FDECL(getpos, (coord *,BOOLEAN_P,const char *));
E void FDECL(getpos_sethilite, (void (*f)(int) ));
E void FDECL(new_mname, (struct monst *,int));
E void FDECL(free_mname, (struct monst *));
E void FDECL(new_oname, (struct obj *,int));
@@ -1827,6 +1828,7 @@ E long NDECL(random);
/* ### read.c ### */
E void FDECL(learnscroll, (struct obj *));
E char *FDECL(tshirt_text, (struct obj *, char *));
E int NDECL(doread);
E boolean FDECL(is_chargeable, (struct obj *));
E void FDECL(recharge, (struct obj *,int));
@@ -2630,7 +2632,7 @@ E boolean FDECL(obj_resists, (struct obj *,int,int));
E boolean FDECL(obj_shudders, (struct obj *));
E void FDECL(do_osshock, (struct obj *));
E int FDECL(bhito, (struct obj *,struct obj *));
E int FDECL(bhitpile, (struct obj *,int (*)(OBJ_P,OBJ_P),int,int));
E int FDECL(bhitpile, (struct obj *,int (*)(OBJ_P,OBJ_P),int,int,SCHAR_P));
E int FDECL(zappable, (struct obj *));
E void FDECL(zapnodir, (struct obj *));
E int NDECL(dozap);

View File

@@ -295,6 +295,7 @@ struct instance_flags {
boolean wc2_softkeyboard; /* use software keyboard */
boolean wc2_wraptext; /* wrap text */
boolean wc2_selectsaved; /* display a menu of user's saved games */
boolean wc2_darkgray; /* try to use dark-gray color for black glyphs */
boolean cmdassist; /* provide detailed assistance for some commands */
boolean clicklook; /* allow right-clicking for look */
boolean obsolete; /* obsolete options can point at this, it isn't used */

View File

@@ -308,6 +308,17 @@ struct obj {
|| (otmp)->otyp == WAX_CANDLE\
|| (otmp)->otyp == POT_OIL)
/* things that can be read */
#define is_readable(otmp) ((otmp)->otyp == FORTUNE_COOKIE\
|| (otmp)->otyp == T_SHIRT\
|| (otmp)->otyp == ALCHEMY_SMOCK\
|| (otmp)->otyp == CREDIT_CARD\
|| (otmp)->otyp == CAN_OF_GREASE\
|| (otmp)->otyp == MAGIC_MARKER\
|| (otmp)->oclass == COIN_CLASS\
|| (otmp)->oartifact == ART_ORB_OF_FATE\
|| (otmp)->otyp == CANDY_BAR)
/* special stones */
#define is_graystone(obj) ((obj)->otyp == LUCKSTONE || \
(obj)->otyp == LOADSTONE || \

View File

@@ -14,7 +14,7 @@
* Incrementing EDITLEVEL can be used to force invalidation of old bones
* and save files.
*/
#define EDITLEVEL 58
#define EDITLEVEL 59
#define COPYRIGHT_BANNER_A \
"NetHack, Copyright 1985-2015"

View File

@@ -219,7 +219,8 @@ NEARDATA struct window_procs windowprocs;
#define WC2_WRAPTEXT 0x04L /* 03 wrap long lines of text */
#define WC2_HILITE_STATUS 0x08L /* 04 hilite fields in status */
#define WC2_SELECTSAVED 0x10L /* 05 saved game selection menu */
/* 27 free bits */
#define WC2_DARKGRAY 0x20L /* 06 use bold black for black glyphs */
/* 26 free bits */
#define ALIGN_LEFT 1
#define ALIGN_RIGHT 2