Merge remote-tracking branch 'origin/NetHack-3.6.0'
This commit is contained in:
@@ -56,14 +56,16 @@ struct artifact {
|
||||
};
|
||||
|
||||
/* invoked properties with special powers */
|
||||
#define TAMING (LAST_PROP + 1)
|
||||
#define HEALING (LAST_PROP + 2)
|
||||
#define ENERGY_BOOST (LAST_PROP + 3)
|
||||
#define UNTRAP (LAST_PROP + 4)
|
||||
#define CHARGE_OBJ (LAST_PROP + 5)
|
||||
#define LEV_TELE (LAST_PROP + 6)
|
||||
#define CREATE_PORTAL (LAST_PROP + 7)
|
||||
#define ENLIGHTENING (LAST_PROP + 8)
|
||||
#define CREATE_AMMO (LAST_PROP + 9)
|
||||
enum invoke_prop_types {
|
||||
TAMING = (LAST_PROP + 1),
|
||||
HEALING,
|
||||
ENERGY_BOOST,
|
||||
UNTRAP,
|
||||
CHARGE_OBJ,
|
||||
LEV_TELE,
|
||||
CREATE_PORTAL,
|
||||
ENLIGHTENING,
|
||||
CREATE_AMMO
|
||||
};
|
||||
|
||||
#endif /* ARTIFACT_H */
|
||||
|
||||
@@ -924,6 +924,11 @@ E int NDECL(phase_of_the_moon);
|
||||
E boolean NDECL(friday_13th);
|
||||
E int NDECL(night);
|
||||
E int NDECL(midnight);
|
||||
E void FDECL(strbuf_init, (strbuf_t *));
|
||||
E void FDECL(strbuf_append, (strbuf_t *, const char *));
|
||||
E void FDECL(strbuf_reserve, (strbuf_t *, int));
|
||||
E void FDECL(strbuf_empty, (strbuf_t *));
|
||||
E void FDECL(strbuf_nl_to_crlf, (strbuf_t *));
|
||||
|
||||
/* ### invent.c ### */
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 flag.h $NHDT-Date: 1505214875 2017/09/12 11:14:35 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.123 $ */
|
||||
/* NetHack 3.6 flag.h $NHDT-Date: 1508827590 2017/10/24 06:46:30 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.129 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -191,6 +191,7 @@ struct instance_flags {
|
||||
* behaviour of various NetHack functions and probably warrant
|
||||
* a structure of their own elsewhere some day.
|
||||
*/
|
||||
boolean defer_plname; /* X11 hack: askname() might not set plname */
|
||||
boolean herecmd_menu; /* use menu when mouseclick on yourself */
|
||||
boolean invis_goldsym; /* gold symbol is ' '? */
|
||||
int parse_config_file_src; /* hack for parse_config_line() */
|
||||
@@ -349,25 +350,24 @@ struct instance_flags {
|
||||
int wc_fontsiz_menu; /* font size for the menu window */
|
||||
int wc_fontsiz_text; /* font size for text windows */
|
||||
int wc_scroll_amount; /* scroll this amount at scroll_margin */
|
||||
int wc_scroll_margin; /* scroll map when this far from
|
||||
the edge */
|
||||
int wc_scroll_margin; /* scroll map when this far from the edge */
|
||||
int wc_map_mode; /* specify map viewing options, mostly
|
||||
for backward compatibility */
|
||||
* for backward compatibility */
|
||||
int wc_player_selection; /* method of choosing character */
|
||||
boolean wc_splash_screen; /* display an opening splash screen or not */
|
||||
boolean wc_popup_dialog; /* put queries in pop up dialogs instead of
|
||||
in the message window */
|
||||
* in the message window */
|
||||
boolean wc_eight_bit_input; /* allow eight bit input */
|
||||
boolean wc_mouse_support; /* allow mouse support */
|
||||
boolean wc2_fullscreen; /* run fullscreen */
|
||||
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 wc2_hitpointbar; /* show graphical bar representing hit points */
|
||||
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 */
|
||||
boolean wc2_darkgray; /* try to use dark-gray color for black glyphs */
|
||||
boolean wc2_hitpointbar; /* show graphical bar representing hit points */
|
||||
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 */
|
||||
struct autopickup_exception *autopickup_exceptions[2];
|
||||
#define AP_LEAVE 0
|
||||
#define AP_GRAB 1
|
||||
@@ -381,6 +381,11 @@ struct instance_flags {
|
||||
Bitfield(save_uswallow, 1);
|
||||
Bitfield(save_uinwater, 1);
|
||||
Bitfield(save_uburied, 1);
|
||||
/* item types used to acomplish "special achievements"; find the target
|
||||
object and you'll be flagged as having achieved something... */
|
||||
short mines_prize_type; /* luckstone */
|
||||
short soko_prize_type1; /* bag of holding or */
|
||||
short soko_prize_type2; /* amulet of reflection */
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
@@ -151,6 +151,12 @@ enum game_end_types {
|
||||
ASCENDED
|
||||
};
|
||||
|
||||
typedef struct strbuf {
|
||||
int len;
|
||||
char * str;
|
||||
char buf[256];
|
||||
} strbuf_t;
|
||||
|
||||
#include "align.h"
|
||||
#include "dungeon.h"
|
||||
#include "monsym.h"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 obj.h $NHDT-Date: 1456618994 2016/02/28 00:23:14 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.53 $ */
|
||||
/* NetHack 3.6 obj.h $NHDT-Date: 1508827590 2017/10/24 06:46:30 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.60 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -343,13 +343,19 @@ struct obj {
|
||||
&& !undiscovered_artifact(ART_EYES_OF_THE_OVERWORLD)))
|
||||
#define pair_of(o) ((o)->otyp == LENSES || is_gloves(o) || is_boots(o))
|
||||
|
||||
/* 'PRIZE' values override obj->corpsenm so prizes mustn't be object types
|
||||
which use that field for monster type (or other overloaded purpose) */
|
||||
#define MINES_PRIZE 1
|
||||
#define SOKO_PRIZE1 2
|
||||
#define SOKO_PRIZE2 3
|
||||
#define is_mines_prize(o) \
|
||||
((o)->otyp == LUCKSTONE && Is_mineend_level(&u.uz))
|
||||
#define is_soko_prize(o) \
|
||||
(((o)->otyp == AMULET_OF_REFLECTION \
|
||||
|| (o)->otyp == BAG_OF_HOLDING) \
|
||||
&& Is_sokoend_level(&u.uz))
|
||||
|
||||
((o)->otyp == iflags.mines_prize_type \
|
||||
&& (o)->record_achieve_special == MINES_PRIZE)
|
||||
#define is_soko_prize(o) \
|
||||
(((o)->otyp == iflags.soko_prize_type1 \
|
||||
&& (o)->record_achieve_special == SOKO_PRIZE1) \
|
||||
|| ((o)->otyp == iflags.soko_prize_type2 \
|
||||
&& (o)->record_achieve_special == SOKO_PRIZE2))
|
||||
|
||||
/* Flags for get_obj_location(). */
|
||||
#define CONTAINED_TOO 0x1
|
||||
|
||||
148
include/prop.h
148
include/prop.h
@@ -11,79 +11,81 @@
|
||||
* Property #0 is not used.
|
||||
*/
|
||||
/* Resistances to troubles */
|
||||
#define FIRE_RES 1
|
||||
#define COLD_RES 2
|
||||
#define SLEEP_RES 3
|
||||
#define DISINT_RES 4
|
||||
#define SHOCK_RES 5
|
||||
#define POISON_RES 6
|
||||
#define ACID_RES 7
|
||||
#define STONE_RES 8
|
||||
/* note: for the first eight properties, MR_xxx == (1 << (xxx_RES - 1)) */
|
||||
#define DRAIN_RES 9
|
||||
#define SICK_RES 10
|
||||
#define INVULNERABLE 11
|
||||
#define ANTIMAGIC 12
|
||||
/* Troubles */
|
||||
#define STUNNED 13
|
||||
#define CONFUSION 14
|
||||
#define BLINDED 15
|
||||
#define DEAF 16
|
||||
#define SICK 17
|
||||
#define STONED 18
|
||||
#define STRANGLED 19
|
||||
#define VOMITING 20
|
||||
#define GLIB 21
|
||||
#define SLIMED 22
|
||||
#define HALLUC 23
|
||||
#define HALLUC_RES 24
|
||||
#define FUMBLING 25
|
||||
#define WOUNDED_LEGS 26
|
||||
#define SLEEPY 27
|
||||
#define HUNGER 28
|
||||
/* Vision and senses */
|
||||
#define SEE_INVIS 29
|
||||
#define TELEPAT 30
|
||||
#define WARNING 31
|
||||
#define WARN_OF_MON 32
|
||||
#define WARN_UNDEAD 33
|
||||
#define SEARCHING 34
|
||||
#define CLAIRVOYANT 35
|
||||
#define INFRAVISION 36
|
||||
#define DETECT_MONSTERS 37
|
||||
/* Appearance and behavior */
|
||||
#define ADORNED 38
|
||||
#define INVIS 39
|
||||
#define DISPLACED 40
|
||||
#define STEALTH 41
|
||||
#define AGGRAVATE_MONSTER 42
|
||||
#define CONFLICT 43
|
||||
/* Transportation */
|
||||
#define JUMPING 44
|
||||
#define TELEPORT 45
|
||||
#define TELEPORT_CONTROL 46
|
||||
#define LEVITATION 47
|
||||
#define FLYING 48
|
||||
#define WWALKING 49
|
||||
#define SWIMMING 50
|
||||
#define MAGICAL_BREATHING 51
|
||||
#define PASSES_WALLS 52
|
||||
/* Physical attributes */
|
||||
#define SLOW_DIGESTION 53
|
||||
#define HALF_SPDAM 54
|
||||
#define HALF_PHDAM 55
|
||||
#define REGENERATION 56
|
||||
#define ENERGY_REGENERATION 57
|
||||
#define PROTECTION 58
|
||||
#define PROT_FROM_SHAPE_CHANGERS 59
|
||||
#define POLYMORPH 60
|
||||
#define POLYMORPH_CONTROL 61
|
||||
#define UNCHANGING 62
|
||||
#define FAST 63
|
||||
#define REFLECTING 64
|
||||
#define FREE_ACTION 65
|
||||
#define FIXED_ABIL 66
|
||||
#define LIFESAVED 67
|
||||
enum prop_types {
|
||||
FIRE_RES = 1,
|
||||
COLD_RES,
|
||||
SLEEP_RES,
|
||||
DISINT_RES,
|
||||
SHOCK_RES,
|
||||
POISON_RES,
|
||||
ACID_RES,
|
||||
STONE_RES,
|
||||
/* note: for the first eight properties, MR_xxx == (1 << (xxx_RES - 1)) */
|
||||
DRAIN_RES,
|
||||
SICK_RES,
|
||||
INVULNERABLE,
|
||||
ANTIMAGIC,
|
||||
/* Troubles */
|
||||
STUNNED,
|
||||
CONFUSION,
|
||||
BLINDED,
|
||||
DEAF,
|
||||
SICK,
|
||||
STONED,
|
||||
STRANGLED,
|
||||
VOMITING,
|
||||
GLIB,
|
||||
SLIMED,
|
||||
HALLUC,
|
||||
HALLUC_RES,
|
||||
FUMBLING,
|
||||
WOUNDED_LEGS,
|
||||
SLEEPY,
|
||||
HUNGER,
|
||||
/* Vision and senses */
|
||||
SEE_INVIS,
|
||||
TELEPAT,
|
||||
WARNING,
|
||||
WARN_OF_MON,
|
||||
WARN_UNDEAD,
|
||||
SEARCHING,
|
||||
CLAIRVOYANT,
|
||||
INFRAVISION,
|
||||
DETECT_MONSTERS,
|
||||
/* Appearance and behavior */
|
||||
ADORNED,
|
||||
INVIS,
|
||||
DISPLACED,
|
||||
STEALTH,
|
||||
AGGRAVATE_MONSTER,
|
||||
CONFLICT,
|
||||
/* Transportation */
|
||||
JUMPING,
|
||||
TELEPORT,
|
||||
TELEPORT_CONTROL,
|
||||
LEVITATION,
|
||||
FLYING,
|
||||
WWALKING,
|
||||
SWIMMING,
|
||||
MAGICAL_BREATHING,
|
||||
PASSES_WALLS,
|
||||
/* Physical attributes */
|
||||
SLOW_DIGESTION,
|
||||
HALF_SPDAM,
|
||||
HALF_PHDAM,
|
||||
REGENERATION,
|
||||
ENERGY_REGENERATION,
|
||||
PROTECTION,
|
||||
PROT_FROM_SHAPE_CHANGERS,
|
||||
POLYMORPH,
|
||||
POLYMORPH_CONTROL,
|
||||
UNCHANGING,
|
||||
FAST,
|
||||
REFLECTING,
|
||||
FREE_ACTION,
|
||||
FIXED_ABIL,
|
||||
LIFESAVED
|
||||
};
|
||||
#define LAST_PROP (LIFESAVED)
|
||||
|
||||
/*** Where the properties come from ***/
|
||||
|
||||
@@ -85,7 +85,8 @@ enum levl_typ_types {
|
||||
#define IS_STWALL(typ) ((typ) <= DBWALL) /* STONE <= (typ) <= DBWALL */
|
||||
#define IS_ROCK(typ) ((typ) < POOL) /* absolutely nonaccessible */
|
||||
#define IS_DOOR(typ) ((typ) == DOOR)
|
||||
#define IS_TREE(typ) \
|
||||
#define IS_DOORJOIN(typ) (IS_ROCK(typ) || (typ) == IRONBARS)
|
||||
#define IS_TREE(typ) \
|
||||
((typ) == TREE || (level.flags.arboreal && (typ) == STONE))
|
||||
#define ACCESSIBLE(typ) ((typ) >= DOOR) /* good position */
|
||||
#define IS_ROOM(typ) ((typ) >= ROOM) /* ROOM, STAIRS, furniture.. */
|
||||
@@ -300,6 +301,8 @@ extern const struct symdef defsyms[MAXPCHARS]; /* defaults */
|
||||
extern const struct symdef def_warnsyms[WARNCOUNT];
|
||||
extern int currentgraphics; /* from drawing.c */
|
||||
extern nhsym showsyms[];
|
||||
extern nhsym l_syms[];
|
||||
extern nhsym r_syms[];
|
||||
|
||||
extern struct symsetentry symset[NUM_GRAPHICS]; /* from drawing.c */
|
||||
#define SYMHANDLING(ht) (symset[currentgraphics].handling == (ht))
|
||||
|
||||
Reference in New Issue
Block a user