Merge remote-tracking branch 'origin/NetHack-3.6.0'

(required manual merge in include/config.h)
This commit is contained in:
keni
2018-04-15 13:50:59 -04:00
75 changed files with 5333 additions and 5062 deletions

View File

@@ -514,6 +514,11 @@ typedef unsigned char uchar;
but it isn't necessary for successful operation of the program */
#define FREE_ALL_MEMORY /* free all memory at exit */
/* EDIT_GETLIN makes the string input in TTY, Qt4, and X11
so some prompts will remember the previously input text
(within the same session) */
/* #define EDIT_GETLIN */
/* Section 4b - Features causing save file incompatibility
* Features listed in this section change the format of save and/or
* bones files, so in addition to the warning at the start of Section 4

View File

@@ -25,10 +25,12 @@ struct container {
genericptr_t list;
};
#define CONS_OBJ 0
#define CONS_MON 1
#define CONS_HERO 2
#define CONS_TRAP 3
enum bubble_contains_types {
CONS_OBJ = 0,
CONS_MON,
CONS_HERO,
CONS_TRAP
};
struct bubble {
xchar x, y; /* coordinates of the upper left corner */

View File

@@ -19,13 +19,15 @@
* that there are enough situations which might make a monster change its
* weapon that this is impractical. --KAA
*/
#define NO_WEAPON_WANTED 0
#define NEED_WEAPON 1
#define NEED_RANGED_WEAPON 2
#define NEED_HTH_WEAPON 3
#define NEED_PICK_AXE 4
#define NEED_AXE 5
#define NEED_PICK_OR_AXE 6
enum wpn_chk_flags {
NO_WEAPON_WANTED = 0,
NEED_WEAPON,
NEED_RANGED_WEAPON,
NEED_HTH_WEAPON,
NEED_PICK_AXE,
NEED_AXE,
NEED_PICK_OR_AXE
};
/* The following flags are used for the second argument to display_minventory
* in invent.c:
@@ -39,6 +41,13 @@
#define MINV_NOLET 0x04
#define MINV_ALL 0x08
enum m_ap_types {
M_AP_NOTHING = 0, /* mappearance unused--monster appears as itself */
M_AP_FURNITURE, /* stairs, a door, an altar, etc. */
M_AP_OBJECT, /* an object */
M_AP_MONSTER /* a monster */
};
struct monst {
struct monst *nmon;
struct permonst *data;
@@ -56,11 +65,7 @@ struct monst {
coord mtrack[MTSZ]; /* monster track */
int mhp, mhpmax;
unsigned mappearance; /* for undetected mimics and the wiz */
uchar m_ap_type; /* what mappearance is describing: */
#define M_AP_NOTHING 0 /* mappearance unused--monster appears as itself */
#define M_AP_FURNITURE 1 /* stairs, a door, an altar, etc. */
#define M_AP_OBJECT 2 /* an object */
#define M_AP_MONSTER 3 /* a monster */
uchar m_ap_type; /* what mappearance is describing, m_ap_types */
schar mtame; /* level of tameness, implies peaceful */
unsigned short mintrinsics; /* low 8 correspond to mresists */

View File

@@ -6,6 +6,39 @@
#define OBJCLASS_H
/* [misnamed] definition of a type of object */
enum obj_material_types {
LIQUID = 1, /* currently only for venom */
WAX,
VEGGY, /* foodstuffs */
FLESH, /* ditto */
PAPER,
CLOTH,
LEATHER,
WOOD,
BONE,
DRAGON_HIDE, /* not leather! */
IRON, /* Fe - includes steel */
METAL, /* Sn, &c. */
COPPER, /* Cu - includes brass */
SILVER, /* Ag */
GOLD, /* Au */
PLATINUM, /* Pt */
MITHRIL,
PLASTIC,
GLASS,
GEMSTONE,
MINERAL
};
enum obj_armor_types {
ARM_SUIT = 0,
ARM_SHIELD, /* needed for special wear function */
ARM_HELM,
ARM_GLOVES,
ARM_BOOTS,
ARM_CLOAK,
ARM_SHIRT
};
struct objclass {
short oc_name_idx; /* index of actual name */
@@ -40,28 +73,7 @@ struct objclass {
/*Bitfield(oc_subtyp,3);*/ /* Now too big for a bitfield... see below */
Bitfield(oc_material, 5);
#define LIQUID 1 /* currently only for venom */
#define WAX 2
#define VEGGY 3 /* foodstuffs */
#define FLESH 4 /* ditto */
#define PAPER 5
#define CLOTH 6
#define LEATHER 7
#define WOOD 8
#define BONE 9
#define DRAGON_HIDE 10 /* not leather! */
#define IRON 11 /* Fe - includes steel */
#define METAL 12 /* Sn, &c. */
#define COPPER 13 /* Cu - includes brass */
#define SILVER 14 /* Ag */
#define GOLD 15 /* Au */
#define PLATINUM 16 /* Pt */
#define MITHRIL 17
#define PLASTIC 18
#define GLASS 19
#define GEMSTONE 20
#define MINERAL 21
Bitfield(oc_material, 5); /* one of obj_material_types */
#define is_organic(otmp) (objects[otmp->otyp].oc_material <= WOOD)
#define is_metallic(otmp) \
@@ -84,13 +96,6 @@ struct objclass {
schar oc_subtyp;
#define oc_skill oc_subtyp /* Skills of weapons, spellbooks, tools, gems */
#define oc_armcat oc_subtyp /* for armor */
#define ARM_SHIELD 1 /* needed for special wear function */
#define ARM_HELM 2
#define ARM_GLOVES 3
#define ARM_BOOTS 4
#define ARM_CLOAK 5
#define ARM_SHIRT 6
#define ARM_SUIT 0
uchar oc_oprop; /* property (invis, &c.) conveyed */
char oc_class; /* object class */

View File

@@ -146,43 +146,47 @@ enum opcode_defs {
* mean.
*/
/* MONSTER */
#define SP_M_V_PEACEFUL 0
#define SP_M_V_ALIGN 1
#define SP_M_V_ASLEEP 2
#define SP_M_V_APPEAR 3
#define SP_M_V_NAME 4
enum sp_mon_var_flags {
SP_M_V_PEACEFUL = 0,
SP_M_V_ALIGN,
SP_M_V_ASLEEP,
SP_M_V_APPEAR,
SP_M_V_NAME,
SP_M_V_FEMALE,
SP_M_V_INVIS,
SP_M_V_CANCELLED,
SP_M_V_REVIVED,
SP_M_V_AVENGE,
SP_M_V_FLEEING,
SP_M_V_BLINDED,
SP_M_V_PARALYZED,
SP_M_V_STUNNED,
SP_M_V_CONFUSED,
SP_M_V_SEENTRAPS,
#define SP_M_V_FEMALE 5
#define SP_M_V_INVIS 6
#define SP_M_V_CANCELLED 7
#define SP_M_V_REVIVED 8
#define SP_M_V_AVENGE 9
#define SP_M_V_FLEEING 10
#define SP_M_V_BLINDED 11
#define SP_M_V_PARALYZED 12
#define SP_M_V_STUNNED 13
#define SP_M_V_CONFUSED 14
#define SP_M_V_SEENTRAPS 15
#define SP_M_V_END 16 /* end of variable parameters */
SP_M_V_END
};
/* OBJECT */
#define SP_O_V_SPE 0
#define SP_O_V_CURSE 1
#define SP_O_V_CORPSENM 2
#define SP_O_V_NAME 3
#define SP_O_V_QUAN 4
#define SP_O_V_BURIED 5
#define SP_O_V_LIT 6
#define SP_O_V_ERODED 7
#define SP_O_V_LOCKED 8
#define SP_O_V_TRAPPED 9
#define SP_O_V_RECHARGED 10
#define SP_O_V_INVIS 11
#define SP_O_V_GREASED 12
#define SP_O_V_BROKEN 13
#define SP_O_V_COORD 14
#define SP_O_V_END 15 /* end of variable parameters */
enum sp_obj_var_flags {
SP_O_V_SPE = 0,
SP_O_V_CURSE,
SP_O_V_CORPSENM,
SP_O_V_NAME,
SP_O_V_QUAN,
SP_O_V_BURIED,
SP_O_V_LIT,
SP_O_V_ERODED,
SP_O_V_LOCKED,
SP_O_V_TRAPPED,
SP_O_V_RECHARGED,
SP_O_V_INVIS,
SP_O_V_GREASED,
SP_O_V_BROKEN,
SP_O_V_COORD,
SP_O_V_END
};
/* When creating objects, we need to know whether
* it's a container and/or contents.

View File

@@ -254,6 +254,15 @@ struct Align {
extern const struct Align aligns[]; /* table of available alignments */
enum utraptypes {
TT_BEARTRAP = 0,
TT_PIT,
TT_WEB,
TT_LAVA,
TT_INFLOOR,
TT_BURIEDBALL
};
/*** Information about the player ***/
struct you {
xchar ux, uy; /* current map coordinates */
@@ -270,13 +279,7 @@ struct you {
int ulevel; /* 1 to MAXULEV */
int ulevelmax;
unsigned utrap; /* trap timeout */
unsigned utraptype; /* defined if utrap nonzero */
#define TT_BEARTRAP 0
#define TT_PIT 1
#define TT_WEB 2
#define TT_LAVA 3
#define TT_INFLOOR 4
#define TT_BURIEDBALL 5
unsigned utraptype; /* defined if utrap nonzero. one of utraptypes */
char urooms[5]; /* rooms (roomno + 3) occupied now */
char urooms0[5]; /* ditto, for previous position */
char uentered[5]; /* rooms (roomno + 3) entered this turn */