/* File: defines.h */

/* Version #, grid, etc. size, MAX_* figures, limits, constants, critical
 * values, etc. for every characteristic of Angband.  Indexes, text locat-
 * ions, list of summonable monsters. Feature, artifact and ego-item codes.
 * Object tval (kind) and sval (specific type) with sval limitations.
 * Monster blow constants, function, player, object and monster bit flags
 * (translation from code to flag).  Definitions of options and object in-
 * scriptions.
 *
 * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke
 *
 * This software may be copied and distributed for educational, research,
 * and not for profit purposes provided that this copyright and statement
 * are included in all such copies.  Other copyrights may also apply.
 */


/*
 * Do not edit this file unless you know *exactly* what you are doing.
 *
 * Some of the values in this file were chosen to preserve game balance,
 * while others are hard-coded based on the format of old save-files, the
 * definition of arrays in various places, mathematical properties, fast
 * computation, storage limits, or the format of external text files.
 *
 * Changing some of these values will induce crashes or memory errors or
 * savefile mis-reads.  Most of the comments in this file are meant as
 * reminders, not complete descriptions, and even a complete knowledge
 * of the source may not be sufficient to fully understand the effects
 * of changing certain definitions.
 *
 * Lastly, note that the code does not always use the symbolic constants
 * below, and sometimes uses various hard-coded values that may not even
 * be defined in this file, but which may be related to definitions here.
 * This is of course bad programming practice, but nobody is perfect...
 *
 * For example, there are MANY things that depend on the screen being
 * 80x24, with the top line used for messages, the bottom line being
 * used for status, and exactly 22 lines used to show the dungeon.
 * Just because your screen can hold 46 lines does not mean that the
 * game will work if you try to use 44 lines to show the dungeon.
 *
 * You have been warned.
 */


/*
 * Current version string - according to Oangband reckoning.
 */
#define VERSION_STRING	"0.6.1"

/*
 * Version of Angband from which this version of Oangband is derived.
 */
#define VERSION_MAJOR	2
#define VERSION_MINOR	9
#define VERSION_PATCH	1

/*
 * The version_extra space in savefiles is used for encryption, oddly enough...
 */
#define VERSION_EXTRA	0

/*
 * Current Oangband version numbers.
 */
#define O_VERSION_MAJOR	0
#define O_VERSION_MINOR	6
#define O_VERSION_PATCH	1

/* Currently unused. */
#define O_VERSION_EXTRA	0

/*
 * Number of grids in each block (vertically)
 * Probably hard-coded to 11, see "generate.c"
 */
#define BLOCK_HGT	11

/*
 * Number of grids in each block (horizontally)
 * Probably hard-coded to 11, see "generate.c"
 */
#define BLOCK_WID	11


/*
 * Number of grids in each panel (vertically)
 * Must be a multiple of BLOCK_HGT
 */
#define PANEL_HGT	11

/*
 * Number of grids in each panel (horizontally)
 * Must be a multiple of BLOCK_WID
 */
#define PANEL_WID	33


/*
 * Number of grids in each screen (vertically)
 * Must be a multiple of PANEL_HGT (at least 2x)
 */
#define OLD_SCREEN_HGT	22

/*
 * Number of grids in each screen (horizontally)
 * Must be a multiple of PANEL_WID (at least 2x)
 */
#define OLD_SCREEN_WID	66


/*
 * Number of grids in each dungeon (from top to bottom)
 * Must be a multiple of SCREEN_HGT
 * Must be less or equal to 256
 */
#define DUNGEON_HGT		66

/*
 * Number of grids in each dungeon (from left to right)
 * Must be a multiple of SCREEN_WID
 * Must be less or equal to 256
 */
#define DUNGEON_WID		198

/*
 * Radii for various detection spells. -BR-
 */
#define DETECT_RAD_DEFAULT      30
#define DETECT_RAD_MAP          255

/*
 * Total number of stores (see "store.c", etc)
 */
#define MAX_STORES	9

/*
 * Store number of the player's home (see "store.c", etc)
 * Taken from Sangband.
 */
#define STORE_HOME 		7

/*
 * Store number of the Black Market
 */
#define STORE_BLACKM 		6

/*
 * Maximum number of player "sex" types (see "table.c", etc)
 */
#define MAX_SEXES            2

/*
 * Maximum number of player "class" types (see "table.c", etc)
 */
#define MAX_CLASS            9


/*
 * Maximum number of magical realms (see "table.c", etc)
 * Taken from Sangband.
 */
#define MAX_REALM            4

/*
 * Maximum number of specialty abilities for a single character
 */
#define MAX_SPECIALTIES      10

/*
 * Number of specialty abilities available to a character class
 */
#define CLASS_SPECIALTIES      15

/*
 * Maximum array bounds for template based arrays
 */
#define MAX_F_IDX	96	/* Max size for "f_info[]" */
#define MAX_K_IDX	755	/* Max size for "k_info[]" */
#define MAX_A_IDX	250	/* Max size for "a_info[]" */
#define MAX_E_IDX	128	/* Max size for "e_info[]" */
#define MAX_R_IDX	800	/* Max size for "r_info[]" */
#define MAX_V_IDX	150	/* Max size for "v_info[]" */
#define MAX_H_IDX	223	/* Max size for "h_info[]" */
#define MAX_B_IDX	6	/* Max size for "b_info[]" */
#define MAX_P_IDX	14	/* Max size for "p_info[]" */
#define MAX_S_IDX	6	/* Max size for "s_info[]" */

/*
 * Size of the "fake" array for reading in names of monsters, objects,
 * artifacts, store-owners, player-races, ...
 */
#define FAKE_NAME_SIZE 20480


/*
 * Size of the "fake" array for reading in the descriptions of monsters,
 * vaults, and the player-histories
 */
#define FAKE_TEXT_SIZE 61440


/*
 * Hack -- first normal and random artifact in the artifact list.  
 * All of the artifacts with indexes from 1 to 22 are special (lights, 
 * rings, amulets), the ones from 23 to 209 are normal, and the ones from 
 * 210 to 249 are random.
 */
#define ART_MIN_NORMAL		23
#define ART_MIN_RANDOM		210

/*
 * Maximum array bounds for entity list arrays
 */
#define MAX_O_IDX	256	/* Max size for "o_list[]" */
#define MAX_M_IDX	512	/* Max size for "m_list[]" */

/*
 * Hack -- Maximum number of quests
 */
#define MAX_Q_IDX	4

/*
 * Maximum number of high scores in the high score file
 */
#define MAX_HISCORES	100


/*
 * Maximum dungeon level.  The player can never reach this level
 * in the dungeon, and this value is used for various calculations
 * involving object and monster creation.  It must be at least 100.
 * Setting it below 128 may prevent the creation of some objects.
 */
#define MAX_DEPTH	128


/*
 * Maximum size of the "view" array (see "cave.c")
 * Note that the "view radius" will NEVER exceed 20, and even if the "view"
 * was octagonal, we would never require more than 1520 entries in the array.
 */
#define VIEW_MAX 1536

/*
 * Maximum size of the "temp" array (see "cave.c")
 * Note that we must be as large as "VIEW_MAX" for proper functioning
 * of the "update_view()" function, and we must also be as large as the
 * largest illuminatable room, but no room is larger than 800 grids.  We
 * must also be large enough to allow "good enough" use as a circular queue,
 * to calculate monster flow, but note that the flow code is "paranoid".
 */
#define TEMP_MAX 1536

/*
 * Maximum distance from the character to store flow (noise) information
 */
#define NOISE_STRENGTH 45

/*
 * Character turns it takes for smell to totally dissipate
 */
#define SMELL_STRENGTH 60

/*
 * OPTION: Maximum number of macros (see "io.c")
 * Default: assume at most 256 macros 
 */
#define MACRO_MAX	256

/*
 * OPTION: Maximum number of "quarks" (see "io.c")
 * Default: assume at most 512 different inscriptions are used
 */
#define QUARK_MAX	512

/*
 * OPTION: Maximum number of messages to remember (see "io.c")
 * Default: assume maximal memorization of 2048 total messages
 */
#define MESSAGE_MAX	2048

/*
 * OPTION: Maximum space for the message text buffer (see "io.c")
 * Default: assume that each of the 2048 messages is repeated an
 * average of three times, and has an average length of 48
 */
#define MESSAGE_BUF	32768


/*
 * Maximum value storable in a "byte" (hard-coded)
 */
#define MAX_UCHAR       255

/*
 * Maximum value storable in a "s16b" (hard-coded)
 */
#define MAX_SHORT       32767



/*** Oangband Themed Levels ***/

/*
 * No current theme (player is on a normal level)
 */
#define THEME_NONE		0

/*
 * Themed level indices.  Used to activate any theme-specific code. 
 * See generate.c for the table of themed level information.
 */
#define THEME_ELEMENTAL		1
#define THEME_DRAGON		2
#define THEME_WILDERNESS	3
#define THEME_DEMON		4
#define THEME_MORIA		5
#define THEME_WARLORDS		6

/*
 * Current number of defined themes.  The maximum theoretical number is 32.
 */
#define THEME_MAX		6


/*
 * Store constants
 */
#define STORE_INVEN_MAX	24		/* Max number of discrete objs in inven */
#define STORE_CHOICES	32		/* Number of items to choose stock from */
#define STORE_OBJ_LEVEL	5		/* Magic Level for normal stores */
#define STORE_TURNOVER	9		/* Normal shop turnover, per day */
#define STORE_MIN_KEEP	6		/* Min slots to "always" keep full */
#define STORE_MAX_KEEP	18		/* Max slots to "always" keep full */
#define STORE_SHUFFLE	20		/* 1/Chance (per day) of an owner changing */
#define STORE_TURNS		1000	/* Number of turns between turnovers */


/*
 * Misc constants
 */
#define TOWN_DAWN		10000	/* Number of turns from dawn to dawn XXX */
#define BREAK_GLYPH		400		/* Rune of protection resistance */
#define BTH_PLUS_ADJ    1       /* Adjust BTH per plus-to-hit */
#define MON_MULT_ADJ	8		/* High value slows multiplication */
#define MON_SUMMON_ADJ	2		/* Adjust level of summoned creatures */
#define MON_DRAIN_LIFE	2		/* Percent of player exp drained per hit */
#define USE_DEVICE      3		/* x> Harder devices x< Easier devices     */

/*
 * Percentage likelihood that monsters will be disturbed by the
 * character each ten game turns, assuming a stealth of zero.
 *
 * This value is 100 in Angband.  It has been lowered in Oangband because
 * combat and other actions can temporarily increase the noise level.
 */
#define WAKEUP_ADJ    90


/*
 * There is a 1/25 (4%) chance of inflating the requested object_level
 * during the creation of an object (see "get_obj_num()" in "object.c").
 * Lower values yield better objects more often.
 */
#define GREAT_OBJ	25

/*
 * There is a 1/40 (2.5%) chance of inflating the requested monster_level
 * during the creation of a monsters (see "get_mon_num()" in "monster2.c").
 * Lower values yield harder monsters more often.  Value lowered in Oangband.
 */
#define NASTY_MON	40		/* 1/chance of inflated monster level */

/*
 * Fraction of turns in which the extend magic special ability causes timers to
 * not decrement.
 */
#define EXTEND_MAGIC_FRACTION	3	/* Skip every 3rd turn -> 50% longer durations */

/*
 * Refueling constants
 */
#define FUEL_TORCH	5000	/* Maximum amount of fuel in a torch */
#define FUEL_LAMP	15000   /* Maximum amount of fuel in a lantern */


/*
 * More maximum values
 */
#define MAX_SIGHT	20	/* Maximum view distance */
#define MAX_RANGE	20	/* Maximum range (spells, etc) */



/*
 * There is a 1/160 chance per round of creating a new monster
 */
#define MAX_M_ALLOC_CHANCE	160

/*
 * Normal levels get at least 16 monsters
 */
#define MIN_M_ALLOC_LEVEL	16

/*
 * The town starts out with 4 residents during the day
 */
#define MIN_M_ALLOC_TD		4

/*
 * The town starts out with 8 residents during the night
 */
#define MIN_M_ALLOC_TN		8


/*
 * A monster can only "multiply" (reproduce) if there are fewer than 100
 * monsters on the level capable of such spontaneous reproduction.  This
 * is a hack which prevents the "m_list[]" array from exploding due to
 * reproducing monsters.  Messy, but necessary.
 */
#define MAX_REPRO	100


/*
 * Player constants
 */
#define PY_MAX_EXP	99999999L	/* Maximum exp */
#define PY_MAX_GOLD	999999999L	/* Maximum gold */
#define PY_MAX_LEVEL	50		/* Maximum level */

/*
 * Player "food" crucial values
 */
#define PY_FOOD_MAX		15000	/* Food value (Bloated) */
#define PY_FOOD_FULL	10000	/* Food value (Normal) */
#define PY_FOOD_ALERT	2000	/* Food value (Hungry) */
#define PY_FOOD_WEAK	1000	/* Food value (Weak) */
#define PY_FOOD_FAINT	500		/* Food value (Fainting) */
#define PY_FOOD_STARVE	100		/* Food value (Starving) */

/*
 * Player regeneration constants
 */
#define PY_REGEN_NORMAL		197		/* Regen factor*2^16 when full */
#define PY_REGEN_WEAK		98		/* Regen factor*2^16 when weak */
#define PY_REGEN_FAINT		33		/* Regen factor*2^16 when fainting */
#define PY_REGEN_HPBASE		1442	/* Min amount hp regen*2^16 */
#define PY_REGEN_MNBASE		524		/* Min amount mana regen*2^16 */


/* Maximum number of blow types available to Druids. -LM- */
#define NUM_D_BLOWS		20


/*
 * Maximum number of "normal" pack slots, and the index of the "overflow"
 * slot, which can hold an item, but only temporarily, since it causes the
 * pack to "overflow", dropping the "last" item onto the ground.  Since this
 * value is used as an actual slot, it must be less than "INVEN_WIELD" (below).
 * Note that "INVEN_PACK" is probably hard-coded by its use in savefiles, and
 * by the fact that the screen can only show 23 items plus a one-line prompt.
 */
#define INVEN_PACK		23

/*
 * Indexes used for various "equipment" slots (hard-coded by savefiles, etc).
 */
#define INVEN_WIELD	24
#define INVEN_BOW       25
#define INVEN_LEFT      26
#define INVEN_RIGHT     27
#define INVEN_NECK      28
#define INVEN_LITE      29
#define INVEN_BODY      30
#define INVEN_OUTER     31
#define INVEN_ARM       32
#define INVEN_HEAD      33
#define INVEN_HANDS     34
#define INVEN_FEET      35

#define INVEN_SUBTOTAL	36
#define INVEN_BLANK     36	/* Blank separator line. */

/* 10 quiver slots */
#define INVEN_Q0        37
#define INVEN_Q1        38
#define INVEN_Q2        39
#define INVEN_Q3        40
#define INVEN_Q4        41
#define INVEN_Q5        42
#define INVEN_Q6        43
#define INVEN_Q7        44
#define INVEN_Q8        45
#define INVEN_Q9        46

/*
 * Total number of inventory slots (hard-coded to be <= 47).
 */
#define INVEN_TOTAL	47

/*
 * Special 'Item' Identifier corresponding to all Squelched items.
 */
#define ALL_SQUELCHED   101


/*
 * A "stack" of items is limited to less than 100 items (hard-coded).
 */
#define MAX_STACK_SIZE			100



/*
 * Indexes of the various "stats" (hard-coded by savefiles, etc).
 */
#define A_STR	0
#define A_INT	1
#define A_WIS	2
#define A_DEX	3
#define A_CON	4
#define A_CHR	5

/*
 * Total number of stats.
 */
#define A_MAX   6

/*
 * Player sex constants (hard-coded by save-files, arrays, etc)
 */
#define SEX_FEMALE	0
#define SEX_MALE		1

/*
 * Player class constants (hard-coded by save-files, arrays, etc)
 */
#define CLASS_WARRIOR	0
#define CLASS_MAGE	1
#define CLASS_PRIEST	2
#define CLASS_ROGUE	3
#define CLASS_RANGER	4
#define CLASS_PALADIN	5
#define CLASS_DRUID	6
#define CLASS_NECRO	7
#define CLASS_ASSASSIN	8

/* Different realms here.  From Sangband */
#define REALM_NONE		0
#define REALM_SORCERY		1
#define REALM_PIETY		2
#define REALM_NATURE		3
#define REALM_NECROMANTIC	4

/*** Screen Locations ***/

/*
 * Some screen locations for various display routines
 * Currently, row 7 is the only "blank" rows.
 * That leaves a "border" around the "stat" values.
 */

#define ROW_RACE		1
#define COL_RACE		0	/*  */

#define ROW_CLASS		2
#define COL_CLASS		0	/*  */

#define ROW_TITLE		3
#define COL_TITLE		0	/*  or <mode> */</font>
<a name=#574>
<a name=#575>#define ROW_LEVEL		4
<a name=#576>#define COL_LEVEL		0	<font color=#ff7f00>/* "LEVEL xxxxxx" */</font>
<a name=#577>
<a name=#578>#define ROW_EXP			5
<a name=#579>#define COL_EXP			0	<font color=#ff7f00>/* "EXP xxxxxxxx" */</font>
<a name=#580>
<a name=#581>#define ROW_GOLD		6
<a name=#582>#define COL_GOLD		0	<font color=#ff7f00>/* "AU xxxxxxxxx" */</font>
<a name=#583>
<a name=#584>#define ROW_STAT		8
<a name=#585>#define COL_STAT		0	<font color=#ff7f00>/* "xxx   xxxxxx" */</font>
<a name=#586>
<a name=#587>#define ROW_SHAPE		14
<a name=#588>#define COL_SHAPE		0	<font color=#ff7f00>/* "Mouse" (or whatever else the player might be) */</font>
<a name=#589>
<a name=#590>#define ROW_AC			15
<a name=#591>#define COL_AC			0	<font color=#ff7f00>/* "Cur AC xxxxx" */</font>
<a name=#592>
<a name=#593>#define ROW_MAXHP		16
<a name=#594>#define COL_MAXHP		0	<font color=#ff7f00>/* "Max HP xxxxx" */</font>
<a name=#595>
<a name=#596>#define ROW_CURHP		17
<a name=#597>#define COL_CURHP		0	<font color=#ff7f00>/* "Cur HP xxxxx" */</font>
<a name=#598>
<a name=#599>#define ROW_MAXSP		18
<a name=#600>#define COL_MAXSP		0	<font color=#ff7f00>/* "Max SP xxxxx" */</font>
<a name=#601>
<a name=#602>#define ROW_CURSP		19
<a name=#603>#define COL_CURSP		0	<font color=#ff7f00>/* "Cur SP xxxxx" */</font>
<a name=#604>
<a name=#605>#define ROW_INFO		20
<a name=#606>#define COL_INFO		0	<font color=#ff7f00>/* "xxxxxxxxxxxx" (the monster health bar) */</font>
<a name=#607>
<a name=#608>#define ROW_CUT			21
<a name=#609>#define COL_CUT			0	<font color=#ff7f00>/* <cut> */</font>
<a name=#610>
<a name=#611>#define ROW_STUN		22
<a name=#612>#define COL_STUN		0	<font color=#ff7f00>/* <stun> */</font>
<a name=#613>
<a name=#614>#
<a name=#615>#define COL_HUNGRY              0       <font color=#ff7f00>/* "Weak" / "Hungry" / "Full" / "Gorged" */</font>
<a name=#616>
<a name=#617>#define COL_BLIND               7       <font color=#ff7f00>/* "Blind" */</font>
<a name=#618>
<a name=#619>#define COL_CONFUSED    		13      <font color=#ff7f00>/* "Confused" */</font>
<a name=#620>
<a name=#621>#define COL_AFRAID              22      <font color=#ff7f00>/* "Afraid" */</font>
<a name=#622>
<a name=#623>#define COL_POISONED		    29      <font color=#ff7f00>/* "Poisoned" */</font>
<a name=#624>
<a name=#625>#define COL_STATE               38      <font color=#ff7f00>/* <state> */</font>
<a name=#626>
<a name=#627>#define COL_SPEED               49      <font color=#ff7f00>/* "Slow (-NN)" or "Fast (+NN)" */</font>
<a name=#628>
<a name=#629>#define COL_DTRAP               60      <font color=#ff7f00>/* "DTrap" */</font>
<a name=#630>
<a name=#631>#define COL_STUDY               66      <font color=#ff7f00>/* "Study" */</font>
<a name=#632>
<a name=#633>#define ROW_MAP			1
<a name=#634>#define COL_MAP			13
<a name=#635>
<a name=#636>
<a name=#637><font color=#ff7f00>/*** General index values ***/</font>
<a name=#638>
<a name=#639>
<a name=#640><font color=#ff7f00>/*
<a name=#641> * Legal restrictions for "summon_specific()"
<a name=#642> */</font>
<a name=#643>#define SUMMON_KIN		 1
<a name=#644>#define SUMMON_ANT		11
<a name=#645>#define SUMMON_SPIDER		12
<a name=#646>#define SUMMON_HOUND		13
<a name=#647>#define SUMMON_ANIMAL		14
<a name=#648>#define SUMMON_BERTBILLTOM     	15
<a name=#649>#define SUMMON_DEMON		16
<a name=#650>#define SUMMON_UNDEAD		17
<a name=#651>#define SUMMON_DRAGON		18
<a name=#652>#define SUMMON_HI_DEMON		20
<a name=#653>#define SUMMON_HI_UNDEAD	21
<a name=#654>#define SUMMON_HI_DRAGON	22
<a name=#655>#define SUMMON_WRAITH		31
<a name=#656>#define SUMMON_UNIQUE		32
<a name=#657>#define SUMMON_ELEMENTAL	33
<a name=#658>#define SUMMON_VORTEX		34
<a name=#659>#define SUMMON_HYBRID		35
<a name=#660>#define SUMMON_BIRD		36
<a name=#661>#define SUMMON_THIEF		38
<a name=#662>
<a name=#663>
<a name=#664><font color=#ff7f00>/*
<a name=#665> * Spell types used by project(), and related functions.
<a name=#666> */</font>
<a name=#667>#define GF_ROCK	     	1	<font color=#ff7f00>/* Physical missiles */</font>
<a name=#668>#define GF_SHOT         2
<a name=#669>#define GF_ARROW        3
<a name=#670>#define GF_MISSILE      4
<a name=#671>#define GF_PMISSILE     5
<a name=#672>#define GF_WHIP         6	<font color=#ff7f00>/* Used for lash/spit attacks. */</font>
<a name=#673>
<a name=#674>#define GF_ACID         8	<font color=#ff7f00>/* The basic elements & poison */</font>
<a name=#675>#define GF_ELEC         9
<a name=#676>#define GF_FIRE         10
<a name=#677>#define GF_COLD         11
<a name=#678>#define GF_POIS         12
<a name=#679>
<a name=#680>#define GF_PLASMA       13	<font color=#ff7f00>/* Variations on the elements */</font>
<a name=#681>#define GF_HELLFIRE	14
<a name=#682>#define GF_ICE          15
<a name=#683>
<a name=#684>
<a name=#685>#define GF_LITE_WEAK	20	<font color=#ff7f00>/* Light and darkness */</font>
<a name=#686>#define GF_LITE         21
<a name=#687>#define GF_DARK_WEAK	23
<a name=#688>#define GF_DARK         24
<a name=#689>#define GF_MORGUL_DARK	25
<a name=#690>
<a name=#691>#define GF_CONFUSION    26	<font color=#ff7f00>/* Physical */</font>
<a name=#692>#define GF_SOUND        27
<a name=#693>#define GF_SHARD        28
<a name=#694>#define GF_INERTIA      29
<a name=#695>#define GF_GRAVITY      30
<a name=#696>#define GF_FORCE        31
<a name=#697>#define GF_WATER        32
<a name=#698>#define GF_STORM        33
<a name=#699>
<a name=#700>#define GF_NEXUS        36	<font color=#ff7f00>/* Magical */</font>
<a name=#701>#define GF_NETHER       37
<a name=#702>#define GF_CHAOS        38
<a name=#703>#define GF_DISENCHANT   39
<a name=#704>#define GF_TIME         40
<a name=#705>
<a name=#706>#define GF_MANA         43	<font color=#ff7f00>/* Special */</font>
<a name=#707>#define GF_HOLY_ORB     44
<a name=#708>#define GF_METEOR       45
<a name=#709>#define GF_SPIRIT		46
<a name=#710>
<a name=#711>#define GF_KILL_WALL	50	<font color=#ff7f00>/* Dungeon-altering */</font>
<a name=#712>#define GF_KILL_DOOR	51
<a name=#713>#define GF_KILL_TRAP	52
<a name=#714>#define GF_MAKE_WALL	53
<a name=#715>#define GF_MAKE_DOOR	54
<a name=#716>#define GF_MAKE_TRAP	55
<a name=#717>
<a name=#718>#define GF_HOLD		59	<font color=#ff7f00>/* Area-effect */</font>
<a name=#719>#define GF_HOLD_UNDEAD	60
<a name=#720>#define GF_AWAY_UNDEAD	61
<a name=#721>#define GF_AWAY_EVIL	62
<a name=#722>#define GF_AWAY_ALL		63
<a name=#723>#define GF_TURN_UNDEAD	64
<a name=#724>#define GF_TURN_EVIL	65
<a name=#725>#define GF_TURN_ALL		66
<a name=#726>#define GF_DISP_UNDEAD		67
<a name=#727>#define GF_DISP_EVIL		68
<a name=#728>#define GF_DISP_NOT_EVIL	69
<a name=#729>#define GF_DISP_DEMON		70
<a name=#730>#define GF_DISP_DRAGON		71
<a name=#731>#define GF_DISP_ALL		72
<a name=#732>#define GF_DISP_SMALL_ALL	73
<a name=#733>#define GF_OLD_CLONE	74
<a name=#734>#define GF_OLD_POLY		75
<a name=#735>#define GF_OLD_HEAL		76
<a name=#736>#define GF_OLD_SPEED	77
<a name=#737>#define GF_OLD_SLOW		78
<a name=#738>#define GF_OLD_CONF		79
<a name=#739>#define GF_OLD_SLEEP	80
<a name=#740>#define GF_OLD_DRAIN	81
<a name=#741>#define GF_XXX8			82
<a name=#742>
<a name=#743><font color=#ff7f00>/*
<a name=#744> * Some constants for the "learn" code.  These generalized from the
<a name=#745> * old DRS constants.
<a name=#746> */</font>
<a name=#747>#define LRN_FREE_SAVE	14
<a name=#748>#define LRN_MANA	15
<a name=#749>#define LRN_ACID	16
<a name=#750>#define LRN_ELEC	17
<a name=#751>#define LRN_FIRE	18
<a name=#752>#define LRN_COLD	19
<a name=#753>#define LRN_POIS	20
<a name=#754>#define LRN_FEAR_SAVE	21
<a name=#755>#define LRN_LITE	22
<a name=#756>#define LRN_DARK	23
<a name=#757>#define LRN_BLIND	24
<a name=#758>#define LRN_CONFU	25
<a name=#759>#define LRN_SOUND	26
<a name=#760>#define LRN_SHARD	27
<a name=#761>#define LRN_NEXUS	28
<a name=#762>#define LRN_NETHR	29
<a name=#763>#define LRN_CHAOS	30
<a name=#764>#define LRN_DISEN	31
<a name=#765><font color=#ff7f00>/* new in Oangband 0.5 and beyond */</font>
<a name=#766>#define LRN_SAVE        39
<a name=#767>#define LRN_ARCH        40
<a name=#768>#define LRN_PARCH       41
<a name=#769>#define LRN_ICE         42
<a name=#770>#define LRN_PLAS        43
<a name=#771>#define LRN_SOUND2      44 <font color=#ff7f00>/* attacks which aren't resisted, but res sound prevent stun */</font>
<a name=#772>#define LRN_STORM       45
<a name=#773>#define LRN_WATER       46
<a name=#774>#define LRN_NEXUS_SAVE  47 <font color=#ff7f00>/* Both resist Nexus and Saves apply */</font>
<a name=#775>#define LRN_BLIND_SAVE  48 <font color=#ff7f00>/* Both resist Blind and Saves apply */</font>
<a name=#776>#define LRN_CONFU_SAVE  49 <font color=#ff7f00>/* Both resist Confusion and Saves apply */</font>
<a name=#777>
<a name=#778><font color=#ff7f00>/*
<a name=#779> * Number of keymap modes
<a name=#780> */</font>
<a name=#781>#define KEYMAP_MODES	2
<a name=#782>
<a name=#783><font color=#ff7f00>/*
<a name=#784> * Mode for original keyset commands
<a name=#785> */</font>
<a name=#786>#define KEYMAP_MODE_ORIG	0
<a name=#787>
<a name=#788><font color=#ff7f00>/*
<a name=#789> * Mode for roguelike keyset commands
<a name=#790> */</font>
<a name=#791>#define KEYMAP_MODE_ROGUE	1
<a name=#792>
<a name=#793>
<a name=#794><font color=#ff7f00>/*** Feature Indexes (see "lib/edit/f_info.txt") ***/</font>
<a name=#795>
<a name=#796><font color=#ff7f00>/* Nothing */</font>
<a name=#797>#define FEAT_NONE		0x00
<a name=#798>
<a name=#799><font color=#ff7f00>/* Various */</font>
<a name=#800>#define FEAT_FLOOR		0x01
<a name=#801>#define FEAT_INVIS		0x02
<a name=#802>#define FEAT_GLYPH		0x03
<a name=#803>#define FEAT_OPEN		0x04
<a name=#804>#define FEAT_BROKEN		0x05
<a name=#805>#define FEAT_LESS		0x06
<a name=#806>#define FEAT_MORE		0x07
<a name=#807>
<a name=#808><font color=#ff7f00>/* Special dungeon features. -LM- */</font>
<a name=#809>#define FEAT_LAVA		0x08
<a name=#810>#define FEAT_WATER	0x09
<a name=#811>#define FEAT_TREE		0x0A
<a name=#812>
<a name=#813><font color=#ff7f00>/* Traps */</font>
<a name=#814>#define FEAT_TRAP_HEAD	0x10
<a name=#815>#define FEAT_TRAP_TAIL	0x1F
<a name=#816>
<a name=#817><font color=#ff7f00>/* Doors */</font>
<a name=#818>#define FEAT_DOOR_HEAD	0x20
<a name=#819>#define FEAT_DOOR_TAIL	0x2F
<a name=#820>
<a name=#821><font color=#ff7f00>/* Extra */</font>
<a name=#822>#define FEAT_SECRET		0x30
<a name=#823>#define FEAT_RUBBLE		0x31
<a name=#824>
<a name=#825><font color=#ff7f00>/* Seams */</font>
<a name=#826>#define FEAT_MAGMA		0x32
<a name=#827>#define FEAT_QUARTZ		0x33
<a name=#828>#define FEAT_MAGMA_H	0x34
<a name=#829>#define FEAT_QUARTZ_H	0x35
<a name=#830>#define FEAT_MAGMA_K	0x36
<a name=#831>#define FEAT_QUARTZ_K	0x37
<a name=#832>
<a name=#833><font color=#ff7f00>/* Walls */</font>
<a name=#834>#define FEAT_WALL_EXTRA	0x38
<a name=#835>#define FEAT_WALL_INNER	0x39
<a name=#836>#define FEAT_WALL_OUTER	0x3A
<a name=#837>#define FEAT_WALL_SOLID	0x3B
<a name=#838>#define FEAT_PERM_EXTRA	0x3C
<a name=#839>#define FEAT_PERM_INNER	0x3D
<a name=#840>#define FEAT_PERM_OUTER	0x3E
<a name=#841>#define FEAT_PERM_SOLID	0x3F
<a name=#842>
<a name=#843><font color=#ff7f00>/*
<a name=#844> * Oangband shops are moved to 0x40 to 0x48 to make room for
<a name=#845> * the extra bookstore.  Method borrowed from Zangband. -LM-
<a name=#846> */</font>
<a name=#847>#define FEAT_SHOP_HEAD 0x40
<a name=#848>#define FEAT_SHOP_TAIL 0x48
<a name=#849>
<a name=#850><font color=#ff7f00>/* Specials trap that only effects monsters.  Created only by rogues. -LM- */</font>
<a name=#851>#define FEAT_MTRAP_HEAD		0x50
<a name=#852>#define FEAT_MTRAP_TAIL		0x5F
<a name=#853>#define FEAT_MTRAP_BASE		0x50 <font color=#ff7f00>/* Level 1 */</font>
<a name=#854>#define FEAT_MTRAP_STURDY	0x51 <font color=#ff7f00>/* Level 1 */</font>
<a name=#855>#define FEAT_MTRAP_NET		0x52 <font color=#ff7f00>/* Level 6 */</font>
<a name=#856>#define FEAT_MTRAP_CONF		0x53 <font color=#ff7f00>/* Level 12 */</font>
<a name=#857>#define FEAT_MTRAP_POISON	0x54 <font color=#ff7f00>/* Level 18 */</font>
<a name=#858>#define FEAT_MTRAP_SPIRIT	0x55 <font color=#ff7f00>/* Level 24 */</font>
<a name=#859>#define FEAT_MTRAP_ELEC		0x56 <font color=#ff7f00>/* Level 30 */</font>
<a name=#860>#define FEAT_MTRAP_EXPLOSIVE	0x57 <font color=#ff7f00>/* Level 36 */</font>
<a name=#861>#define FEAT_MTRAP_PORTAL	0x58 <font color=#ff7f00>/* Level 42 */</font>
<a name=#862>#define FEAT_MTRAP_STASIS	0x59 <font color=#ff7f00>/* Level 48 */</font>
<a name=#863>
<a name=#864><font color=#ff7f00>/*** Artifact indexes (see "lib/edit/a_info.txt") ***/</font>
<a name=#865>
<a name=#866><font color=#ff7f00>/* Lites */</font>
<a name=#867>#define ART_GALADRIEL		1
<a name=#868>#define ART_ELENDIL			2
<a name=#869>#define ART_THRAIN			3
<a name=#870>#define ART_STONE_LORE		15
<a name=#871>
<a name=#872><font color=#ff7f00>/* Amulets */</font>
<a name=#873>#define ART_CARLAMMAS		4
<a name=#874>#define ART_INGWE			5
<a name=#875>#define ART_DWARVES			6
<a name=#876>#define ART_BOROMIR		7
<a name=#877>#define ART_FARAMIR		8
<a name=#878>
<a name=#879><font color=#ff7f00>/* Rings */</font>
<a name=#880>#define ART_BARAHIR			9
<a name=#881>#define ART_TULKAS			10
<a name=#882>#define ART_NARYA			11
<a name=#883>#define ART_NENYA			12
<a name=#884>#define ART_VILYA			13
<a name=#885>#define ART_POWER			14
<a name=#886>
<a name=#887><font color=#ff7f00>/* Dragon Scale */</font>
<a name=#888>#define ART_RAZORBACK		22
<a name=#889>#define ART_BLADETURNER		23
<a name=#890>
<a name=#891><font color=#ff7f00>/* Hard Armour */</font>
<a name=#892>#define ART_SOULKEEPER		26
<a name=#893>#define ART_ISILDUR		27
<a name=#894>#define ART_ROHIRRIM		28
<a name=#895>#define ART_BELEGENNON		29
<a name=#896>#define ART_CELEBORN		30
<a name=#897>#define ART_ARVEDUI		31
<a name=#898>#define ART_CASPANION		32
<a name=#899>
<a name=#900><font color=#ff7f00>/* Soft Armour */</font>
<a name=#901>#define ART_HIMRING		36
<a name=#902>#define ART_HITHLOMIR		37
<a name=#903>#define ART_THALKETTOTH		38
<a name=#904>
<a name=#905><font color=#ff7f00>/* Shields */</font>
<a name=#906>#define ART_ELEMENTS		43
<a name=#907>#define ART_THORIN		44
<a name=#908>#define ART_CELEGORM		45
<a name=#909>#define ART_ANARION		46
<a name=#910>#define ART_EARENDIL		47
<a name=#911>#define ART_GIL_GALAD		48
<a name=#912>
<a name=#913><font color=#ff7f00>/* Helms and Crowns */</font>
<a name=#914>#define ART_MORGOTH			51
<a name=#915>#define ART_BERUTHIEL			52
<a name=#916>#define ART_THRANDUIL			53
<a name=#917>#define ART_THENGEL			54
<a name=#918>#define ART_HAMMERHAND			55
<a name=#919>#define ART_DOR				56
<a name=#920>#define ART_HOLHENNETH			57
<a name=#921>#define ART_GORLIM			58
<a name=#922>
<a name=#923>#define ART_GONDOR			61
<a name=#924>#define ART_NUMENOR			62
<a name=#925>
<a name=#926><font color=#ff7f00>/* Cloaks */</font>
<a name=#927>#define ART_VALINOR			66
<a name=#928>#define ART_HOLCOLLETH			67
<a name=#929>#define ART_THINGOL			68
<a name=#930>#define ART_THORONGIL			69
<a name=#931>#define ART_COLANNON			70
<a name=#932>#define ART_LUTHIEN			71
<a name=#933>#define ART_TUOR				72
<a name=#934>
<a name=#935><font color=#ff7f00>/* Gloves */</font>
<a name=#936>#define ART_CAMBELEG		77
<a name=#937>#define ART_CAMMITHRIM		78
<a name=#938>#define ART_EOL			79
<a name=#939>#define ART_PAURNIMMEN		80
<a name=#940>#define ART_PAURAEGEN		81
<a name=#941>#define ART_PAURNEN		82
<a name=#942>#define ART_CAMLOST		83
<a name=#943>#define ART_FINGOLFIN		84
<a name=#944>
<a name=#945><font color=#ff7f00>/* Boots */</font>
<a name=#946>#define ART_FEANOR		89
<a name=#947>#define ART_DAL			90
<a name=#948>#define ART_THROR			91
<a name=#949>#define ART_NEVRAST		92
<a name=#950>#define ART_GIMLI			93
<a name=#951>
<a name=#952><font color=#ff7f00>/* Swords */</font>
<a name=#953>#define ART_MAEDHROS		97
<a name=#954>#define ART_ANGRIST			98
<a name=#955>#define ART_NARTHANC		99
<a name=#956>#define ART_NIMTHANC		100
<a name=#957>#define ART_DETHANC			101
<a name=#958>#define ART_RILIA			102
<a name=#959>#define ART_BELANGIL		103
<a name=#960>#define ART_CALRIS			104
<a name=#961>#define ART_ARUNRUTH		105
<a name=#962>#define ART_GLAMDRING		106
<a name=#963>#define ART_AEGLIN		107
<a name=#964>#define ART_ORCRIST		108
<a name=#965>#define ART_GURTHANG		109
<a name=#966>#define ART_ZARCUTHRA		110
<a name=#967>#define ART_MORMEGIL		111
<a name=#968>#define ART_GONDRICAM		112
<a name=#969>#define ART_CRISDURIAN		113
<a name=#970>#define ART_AGLARANG		114
<a name=#971>#define ART_RINGIL		115
<a name=#972>#define ART_ANDURIL		116
<a name=#973>#define ART_ANGUIREL		117
<a name=#974>#define ART_ELVAGIL		118
<a name=#975>#define ART_FORASGIL		119
<a name=#976>#define ART_CARETH		120
<a name=#977>#define ART_STING			121
<a name=#978>#define ART_HARADEKKET		122
<a name=#979>#define ART_GILETTAR		123
<a name=#980>#define ART_DOOMCALLER		124
<a name=#981>
<a name=#982><font color=#ff7f00>/* Polearms */</font>
<a name=#983>#define ART_THEODEN		133
<a name=#984>#define ART_PAIN			134
<a name=#985>#define ART_OSONDIR		135
<a name=#986>#define ART_TIL			136
<a name=#987>#define ART_AEGLOS		137
<a name=#988>#define ART_OROME			138
<a name=#989>#define ART_NIMLOTH		139
<a name=#990>#define ART_EORLINGAS		140
<a name=#991>#define ART_DURIN			141
<a name=#992>#define ART_EONWE			142
<a name=#993>#define ART_BALLI			143
<a name=#994>#define ART_LOTHARANG		144
<a name=#995>#define ART_MUNDWINE		145
<a name=#996>#define ART_BARUKKHELED		146
<a name=#997>#define ART_WRATH			147
<a name=#998>#define ART_ULMO			148
<a name=#999>#define ART_AVAVIR		149
<a name=#1000>
<a name=#1001><font color=#ff7f00>/* Hafted */</font>
<a name=#1002>#define ART_GROND			158
<a name=#1003>#define ART_TOTILA			159
<a name=#1004>#define ART_THUNDERFIST		160
<a name=#1005>#define ART_BLOODSPIKE		161
<a name=#1006>#define ART_FIRESTAR		162
<a name=#1007>#define ART_TARATOL			163
<a name=#1008>#define ART_AULE			164
<a name=#1009>#define ART_NAR				165
<a name=#1010>#define ART_ERIRIL			166
<a name=#1011>#define ART_OLORIN			167
<a name=#1012>#define ART_DEATHWREAKER	168
<a name=#1013>#define ART_TURMIL		169
<a name=#1014>
<a name=#1015><font color=#ff7f00>/* Bows */</font>
<a name=#1016>#define ART_HARAD			178
<a name=#1017>#define ART_BELTHRONDING	179
<a name=#1018>#define ART_BARD			180
<a name=#1019>#define ART_CUBRAGOL		181
<a name=#1020>#define ART_BUCKLAND		182
<a name=#1021>#define ART_AMROD		183
<a name=#1022>#define ART_AMRAS		184
<a name=#1023>
<a name=#1024>
<a name=#1025><font color=#ff7f00>/* Non-wearable artifacts that can recharge in the backpack. */</font>
<a name=#1026>
<a name=#1027>#define ART_STAFF_SARUMAN		149
<a name=#1028>#define ART_STAFF_WINDS			150
<a name=#1029>#define ART_STAFF_MENELTARMA		151
<a name=#1030>#define ART_STAFF_RADAGAST		152
<a name=#1031>
<a name=#1032>#define ART_WAND_ILKORIN		154
<a name=#1033>#define ART_WAND_GANDALF		155
<a name=#1034>#define ART_WAND_COMMAND		156
<a name=#1035>#define ART_WAND_ULPION			157
<a name=#1036>
<a name=#1037>#define ART_ROD_DELVING			159
<a name=#1038>#define ART_ROD_SHADOW			160
<a name=#1039>#define ART_ROD_AIR			161
<a name=#1040>#define ART_ROD_PORTALS			162
<a name=#1041>
<a name=#1042>
<a name=#1043>
<a name=#1044>
<a name=#1045>
<a name=#1046><font color=#ff7f00>/*** Ego-Item indexes (see "lib/edit/e_info.txt") ***/</font>
<a name=#1047>
<a name=#1048>
<a name=#1049><font color=#ff7f00>/* Nothing */</font>
<a name=#1050><font color=#ff7f00>/* xxx */</font>
<a name=#1051><font color=#ff7f00>/* xxx */</font>
<a name=#1052><font color=#ff7f00>/* xxx */</font>
<a name=#1053>
<a name=#1054><font color=#ff7f00>/* Body Armor */</font>
<a name=#1055>#define EGO_RESIST_ACID		4
<a name=#1056>#define EGO_RESIST_ELEC		5
<a name=#1057>#define EGO_RESIST_FIRE		6
<a name=#1058>#define EGO_RESIST_COLD		7
<a name=#1059>#define EGO_RESISTANCE		8
<a name=#1060>#define EGO_ELVENKIND		9
<a name=#1061>#define EGO_DWARVEN		10
<a name=#1062>#define EGO_PERMANENCE		11
<a name=#1063><font color=#ff7f00>/* xxx */</font>
<a name=#1064><font color=#ff7f00>/* xxx */</font>
<a name=#1065><font color=#ff7f00>/* xxx */</font>
<a name=#1066><font color=#ff7f00>/* xxx */</font>
<a name=#1067>
<a name=#1068><font color=#ff7f00>/* Shields */</font>
<a name=#1069>#define EGO_ENDURE_ACID		16
<a name=#1070>#define EGO_ENDURE_ELEC		17
<a name=#1071>#define EGO_ENDURE_FIRE		18
<a name=#1072>#define EGO_ENDURE_COLD		19
<a name=#1073>#define EGO_ENDURANCE		20
<a name=#1074>#define EGO_NIGHT_DAY		21	<font color=#ff7f00>/* Added in Oangband. */</font>
<a name=#1075><font color=#ff7f00>/* xxx */</font>
<a name=#1076><font color=#ff7f00>/* xxx */</font>
<a name=#1077>
<a name=#1078><font color=#ff7f00>/* Crowns and Helms */</font>
<a name=#1079>#define EGO_INTELLIGENCE	24
<a name=#1080>#define EGO_WISDOM		25
<a name=#1081>#define EGO_BEAUTY		26
<a name=#1082>#define EGO_MAGI			27
<a name=#1083>#define EGO_MIGHT			28
<a name=#1084>#define EGO_LORDLINESS		29
<a name=#1085>#define EGO_SEEING		30
<a name=#1086>#define EGO_SERENITY		31	<font color=#ff7f00>/* Changed in Oangband. */</font>
<a name=#1087>#define EGO_LITE			32
<a name=#1088>#define EGO_TELEPATHY		33
<a name=#1089>#define EGO_REGENERATION	34
<a name=#1090>#define EGO_TELEPORTATION	35
<a name=#1091>#define EGO_STUPIDITY		36
<a name=#1092>#define EGO_NAIVETY		37
<a name=#1093>#define EGO_UGLINESS		38
<a name=#1094>#define EGO_SICKLINESS		39
<a name=#1095>
<a name=#1096><font color=#ff7f00>/* Cloaks */</font>
<a name=#1097>#define EGO_PROTECTION		40
<a name=#1098>#define EGO_STEALTH		41
<a name=#1099>#define EGO_AMAN			42
<a name=#1100><font color=#ff7f00>/* xxx */</font>
<a name=#1101>#define EGO_ENVELOPING		44
<a name=#1102>#define EGO_VULNERABILITY	45
<a name=#1103>#define EGO_IRRITATION		46
<a name=#1104>#define EGO_SHARD_PROT		47	<font color=#ff7f00>/* Added in Oangband. */</font>
<a name=#1105>
<a name=#1106><font color=#ff7f00>/* Gloves */</font>
<a name=#1107>#define EGO_FREE_ACTION		48
<a name=#1108>#define EGO_SLAYING		49
<a name=#1109>#define EGO_AGILITY		50
<a name=#1110>#define EGO_POWER			51
<a name=#1111>#define EGO_MAGIC_MASTERY	52	<font color=#ff7f00>/* Added in Oangband. */</font>
<a name=#1112><font color=#ff7f00>/* xxx */</font>
<a name=#1113>#define EGO_WEAKNESS		54
<a name=#1114>#define EGO_CLUMSINESS		55
<a name=#1115>
<a name=#1116><font color=#ff7f00>/* Boots */</font>
<a name=#1117>#define EGO_SLOW_DESCENT	56
<a name=#1118>#define EGO_QUIET			57
<a name=#1119>#define EGO_MOTION		58
<a name=#1120>#define EGO_SPEED			59
<a name=#1121>#define EGO_STABILITY		60	<font color=#ff7f00>/* Added in Oangband. */</font>
<a name=#1122>#define EGO_NOISE			61
<a name=#1123>#define EGO_SLOWNESS		62
<a name=#1124>#define EGO_TORMENT		63
<a name=#1125>
<a name=#1126><font color=#ff7f00>/* Weapons */</font>
<a name=#1127>#define EGO_HA			64
<a name=#1128>#define EGO_DF			65
<a name=#1129>#define EGO_BLESS_BLADE		66
<a name=#1130><font color=#ff7f00>/* xxx */</font>
<a name=#1131>#define EGO_WEST			68
<a name=#1132><font color=#ff7f00>/* xxx */</font>
<a name=#1133><font color=#ff7f00>/* xxx */</font>
<a name=#1134><font color=#ff7f00>/* xxx */</font>
<a name=#1135>#define EGO_BRAND_ACID		72
<a name=#1136>#define EGO_BRAND_ELEC		73
<a name=#1137>#define EGO_BRAND_FIRE		74
<a name=#1138>#define EGO_BRAND_COLD		75
<a name=#1139>#define EGO_BRAND_POIS		76	<font color=#ff7f00>/* Added in Oangband. */</font>
<a name=#1140>#define EGO_BALROG		77	<font color=#ff7f00>/* Added in Oangband. */</font>
<a name=#1141><font color=#ff7f00>/* xxx */</font>
<a name=#1142><font color=#ff7f00>/* xxx */</font>
<a name=#1143>#define EGO_SLAY_ANIMAL		80
<a name=#1144>#define EGO_SLAY_EVIL		81
<a name=#1145>#define EGO_SLAY_UNDEAD		82
<a name=#1146>#define EGO_SLAY_DEMON		83
<a name=#1147>#define EGO_SLAY_ORC		84
<a name=#1148>#define EGO_SLAY_TROLL		85
<a name=#1149>#define EGO_SLAY_GIANT		86
<a name=#1150>#define EGO_SLAY_DRAGON		87
<a name=#1151>#define EGO_KILL_ANIMAL		88
<a name=#1152>#define EGO_KILL_EVIL		89
<a name=#1153>#define EGO_KILL_UNDEAD		90
<a name=#1154>#define EGO_KILL_DEMON		83
<a name=#1155>#define EGO_KILL_ORC		84
<a name=#1156>#define EGO_KILL_TROLL		85
<a name=#1157>#define EGO_KILL_GIANT		86
<a name=#1158>#define EGO_KILL_DRAGON		95
<a name=#1159><font color=#ff7f00>/* xxx */</font>
<a name=#1160><font color=#ff7f00>/* xxx */</font>
<a name=#1161><font color=#ff7f00>/* xxx */</font>
<a name=#1162><font color=#ff7f00>/* xxx */</font>
<a name=#1163>#define EGO_DIGGING			100
<a name=#1164><font color=#ff7f00>/* xxx */</font>
<a name=#1165>#define EGO_MORGUL			102
<a name=#1166><font color=#ff7f00>/* xxx */</font>
<a name=#1167>
<a name=#1168><font color=#ff7f00>/* Bows */</font>
<a name=#1169>#define EGO_ACCURACY		104
<a name=#1170>#define EGO_VELOCITY		105
<a name=#1171><font color=#ff7f00>/* xxx */</font>
<a name=#1172>#define EGO_EXTRA_MIGHT2	107
<a name=#1173>#define EGO_EXTRA_MIGHT1	108
<a name=#1174>#define EGO_EXTRA_SHOTS		109
<a name=#1175><font color=#ff7f00>/* xxx */</font>
<a name=#1176><font color=#ff7f00>/* xxx */</font>
<a name=#1177>
<a name=#1178><font color=#ff7f00>/* Ammo */</font>
<a name=#1179>#define EGO_HURT_ANIMAL		111
<a name=#1180>#define EGO_HURT_EVIL		112
<a name=#1181>#define EGO_HURT_UNDEAD		113
<a name=#1182>#define EGO_HURT_DEMON		114
<a name=#1183>#define EGO_HURT_ORC		115
<a name=#1184>#define EGO_HURT_TROLL		116
<a name=#1185>#define EGO_HURT_GIANT		117
<a name=#1186>#define EGO_HURT_DRAGON		118
<a name=#1187>#define EGO_ACIDIC		119	<font color=#ff7f00>/* Added in Oangband. */</font>
<a name=#1188>#define EGO_ELECT			120	<font color=#ff7f00>/* Added in Oangband. */</font>
<a name=#1189>#define EGO_FLAME			121
<a name=#1190>#define EGO_FROST			122
<a name=#1191>#define EGO_POISON		123	<font color=#ff7f00>/* Added in Oangband. */</font>
<a name=#1192>#define EGO_WOUNDING		124
<a name=#1193>#define EGO_BACKBITING		125
<a name=#1194>#define EGO_SHATTERED		126
<a name=#1195>#define EGO_BLASTED			127
<a name=#1196>
<a name=#1197><font color=#ff7f00>/*** Activation Indexes.  Max is 255. -LM- ***/</font>
<a name=#1198><font color=#ff7f00>/* Special Artifact activations. */</font>
<a name=#1199>#define ACT_GALADRIEL			1
<a name=#1200>#define ACT_ELENDIL			2
<a name=#1201>#define ACT_THRAIN			3
<a name=#1202>#define ACT_CARLAMMAS			4
<a name=#1203>#define ACT_INGWE	       		5
<a name=#1204>#define ACT_BOROMIR			7
<a name=#1205>#define ACT_FARAMIR			8
<a name=#1206>#define ACT_BARAHIR			9
<a name=#1207>#define ACT_TULKAS			10
<a name=#1208>#define ACT_NARYA	       		11
<a name=#1209>#define ACT_NENYA	       		12
<a name=#1210>#define ACT_VILYA	       		13
<a name=#1211>#define ACT_POWER	       		14
<a name=#1212>#define ACT_STONE_LORE			15
<a name=#1213>
<a name=#1214>
<a name=#1215><font color=#ff7f00>/* Armour Activations. */</font>
<a name=#1216>#define ACT_RAZORBACK			22
<a name=#1217>#define ACT_BLADETURNER			23
<a name=#1218>#define ACT_SOULKEEPER			24
<a name=#1219>#define ACT_BELEGENNON			25
<a name=#1220>#define ACT_CELEBORN			26
<a name=#1221>#define ACT_CASPANION			27
<a name=#1222>#define ACT_HIMRING			28
<a name=#1223>
<a name=#1224>#define ACT_ELEMENTS			32
<a name=#1225>#define ACT_EARENDIL			33
<a name=#1226>#define ACT_GIL_GALAD			34
<a name=#1227>
<a name=#1228>#define ACT_HOLHENNETH			37
<a name=#1229>#define ACT_GONDOR			38
<a name=#1230>
<a name=#1231>#define ACT_VALINOR			41
<a name=#1232>#define ACT_HOLCOLLETH			42
<a name=#1233>#define ACT_THINGOL			43
<a name=#1234>#define ACT_COLANNON			44
<a name=#1235>#define ACT_LUTHIEN			45
<a name=#1236>
<a name=#1237>#define ACT_CAMMITHRIM			52
<a name=#1238>#define ACT_EOL				53
<a name=#1239>#define ACT_PAURNIMMEN			54
<a name=#1240>#define ACT_PAURAEGEN			55
<a name=#1241>#define ACT_PAURNEN			56
<a name=#1242>#define ACT_FINGOLFIN			57
<a name=#1243>
<a name=#1244>#define ACT_FEANOR			61
<a name=#1245>#define ACT_DAL				62
<a name=#1246>#define ACT_GIMLI		       	63
<a name=#1247>
<a name=#1248>
<a name=#1249><font color=#ff7f00>/* Artifact Weapon Activations.  */</font>
<a name=#1250>#define ACT_NARTHANC			66
<a name=#1251>#define ACT_NIMTHANC			67
<a name=#1252>#define ACT_DETHANC			68
<a name=#1253>#define ACT_RILIA			69
<a name=#1254>#define ACT_BELANGIL			70
<a name=#1255>#define ACT_ARUNRUTH			71
<a name=#1256>#define ACT_RINGIL			72
<a name=#1257>#define ACT_ANDURIL			73
<a name=#1258>
<a name=#1259>#define ACT_THEODEN			78
<a name=#1260>#define ACT_AEGLOS			79
<a name=#1261>#define ACT_OROME		       	80
<a name=#1262>#define ACT_EONWE		       	81
<a name=#1263>#define ACT_LOTHARANG			82
<a name=#1264>#define ACT_ULMO		       	83
<a name=#1265>#define ACT_AVAVIR			84
<a name=#1266>
<a name=#1267>#define ACT_TOTILA			89
<a name=#1268>#define ACT_FIRESTAR			90
<a name=#1269>#define ACT_TARATOL			91
<a name=#1270>#define ACT_ERIRIL			92
<a name=#1271>#define ACT_OLORIN			93
<a name=#1272>#define ACT_TURMIL			94
<a name=#1273>
<a name=#1274>#define ACT_HARAD		       	99
<a name=#1275>#define ACT_CUBRAGOL			100
<a name=#1276>#define ACT_BUCKLAND			101
<a name=#1277>
<a name=#1278>
<a name=#1279><font color=#ff7f00>/* Random Artifacts */</font>
<a name=#1280>#define ACT_RANDOM_FIRE1		135
<a name=#1281>#define ACT_RANDOM_FIRE2		136
<a name=#1282>#define ACT_RANDOM_FIRE3		137
<a name=#1283>#define ACT_RANDOM_COLD1		138
<a name=#1284>#define ACT_RANDOM_COLD2		139
<a name=#1285>#define ACT_RANDOM_COLD3		140
<a name=#1286>#define ACT_RANDOM_ACID1		141
<a name=#1287>#define ACT_RANDOM_ACID2		142
<a name=#1288>#define ACT_RANDOM_ACID3		143
<a name=#1289>#define ACT_RANDOM_ELEC1		144
<a name=#1290>#define ACT_RANDOM_ELEC2		145
<a name=#1291>#define ACT_RANDOM_ELEC3		146
<a name=#1292>#define ACT_RANDOM_POIS1		147
<a name=#1293>#define ACT_RANDOM_POIS2		148
<a name=#1294>#define ACT_RANDOM_LIGHT1		149
<a name=#1295>#define ACT_RANDOM_LIGHT2		150
<a name=#1296>#define ACT_RANDOM_DISPEL_UNDEAD	151
<a name=#1297>#define ACT_RANDOM_DISPEL_EVIL	152
<a name=#1298>#define ACT_RANDOM_SMITE_UNDEAD	153
<a name=#1299>#define ACT_RANDOM_SMITE_DEMON	154
<a name=#1300>#define ACT_RANDOM_SMITE_DRAGON	155
<a name=#1301>#define ACT_RANDOM_HOLY_ORB		156
<a name=#1302>#define ACT_RANDOM_BLESS		157
<a name=#1303>#define ACT_RANDOM_FRIGHTEN_ALL	158
<a name=#1304>#define ACT_RANDOM_HEAL1		159
<a name=#1305>#define ACT_RANDOM_HEAL2		160
<a name=#1306>#define ACT_RANDOM_HEAL3		161
<a name=#1307>#define ACT_RANDOM_CURE			162
<a name=#1308>#define ACT_RANDOM_PROT_FROM_EVIL	163
<a name=#1309>#define ACT_RANDOM_CHAOS		164
<a name=#1310>#define ACT_RANDOM_SHARD_SOUND	165
<a name=#1311>#define ACT_RANDOM_NETHR		166
<a name=#1312>#define ACT_RANDOM_LINE_LIGHT		167
<a name=#1313>#define ACT_RANDOM_STARLIGHT		168
<a name=#1314>#define ACT_RANDOM_EARTHQUAKE		169
<a name=#1315>#define ACT_RANDOM_IDENTIFY		170
<a name=#1316>#define ACT_RANDOM_SPEED		171
<a name=#1317>#define ACT_RANDOM_TELEPORT_AWAY	172
<a name=#1318>#define ACT_RANDOM_HEROISM		173
<a name=#1319>#define ACT_RANDOM_STORM_DANCE	174
<a name=#1320>#define ACT_RANDOM_RESIST_ELEMENTS	175
<a name=#1321>#define ACT_RANDOM_RESIST_ALL		176
<a name=#1322>#define ACT_RANDOM_TELEPORT1		177
<a name=#1323>#define ACT_RANDOM_TELEPORT2		178
<a name=#1324>#define ACT_RANDOM_RECALL		179
<a name=#1325>#define ACT_RANDOM_REGAIN		180
<a name=#1326>#define ACT_RANDOM_RESTORE		181
<a name=#1327>#define ACT_RANDOM_SHIELD		182
<a name=#1328>#define ACT_RANDOM_BRAND_MISSILE	183
<a name=#1329>#define ACT_RANDOM_SUPER_SHOOTING	184
<a name=#1330>#define ACT_RANDOM_DETECT_MONSTERS	185
<a name=#1331>#define ACT_RANDOM_DETECT_EVIL	186
<a name=#1332>#define ACT_RANDOM_DETECT_ALL		187
<a name=#1333>#define ACT_RANDOM_MAGIC_MAP		188
<a name=#1334>#define ACT_RANDOM_DETECT_D_S_T	189
<a name=#1335>#define ACT_RANDOM_CONFU_FOE		190
<a name=#1336>#define ACT_RANDOM_SLEEP_FOE		191
<a name=#1337>#define ACT_RANDOM_TURN_FOE		192
<a name=#1338>#define ACT_RANDOM_SLOW_FOE		193
<a name=#1339>#define ACT_RANDOM_BANISH_EVIL	194
<a name=#1340>#define ACT_RANDOM_DISARM		195
<a name=#1341>#define ACT_RANDOM_CONFU_FOES		196
<a name=#1342>#define ACT_RANDOM_SLEEP_FOES		197
<a name=#1343>#define ACT_RANDOM_TURN_FOES		198
<a name=#1344>#define ACT_RANDOM_SLOW_FOES		199
<a name=#1345>
<a name=#1346><font color=#ff7f00>/* Dragon Scale Mails */</font>
<a name=#1347>#define ACT_DRAGON_BLUE				200
<a name=#1348>#define ACT_DRAGON_WHITE			201
<a name=#1349>#define ACT_DRAGON_BLACK			202
<a name=#1350>#define ACT_DRAGON_GREEN			203
<a name=#1351>#define ACT_DRAGON_RED				204
<a name=#1352>#define ACT_DRAGON_MULTIHUED			205
<a name=#1353>#define ACT_DRAGON_BRONZE			206
<a name=#1354>#define ACT_DRAGON_GOLD				207
<a name=#1355>#define ACT_DRAGON_CHAOS			208
<a name=#1356>#define ACT_DRAGON_LAW				209
<a name=#1357>#define ACT_DRAGON_BALANCE			210
<a name=#1358>#define ACT_DRAGON_SHINING			211
<a name=#1359>#define ACT_DRAGON_POWER			212
<a name=#1360>
<a name=#1361><font color=#ff7f00>/* Rings and Amulets */</font>
<a name=#1362>#define ACT_RING_ACID				220
<a name=#1363>#define ACT_RING_ELEC				221
<a name=#1364>#define ACT_RING_FIRE				222
<a name=#1365>#define ACT_RING_COLD				223
<a name=#1366>#define ACT_AMULET_ESCAPING			224
<a name=#1367>#define ACT_AMULET_LION			225
<a name=#1368>
<a name=#1369><font color=#ff7f00>/* Ego-items */</font>
<a name=#1370>#define ACT_BALROG_WHIP				245
<a name=#1371>
<a name=#1372>
<a name=#1373>
<a name=#1374><font color=#ff7f00>/*** Object "tval" and "sval" codes ***/</font>
<a name=#1375>
<a name=#1376><font color=#ff7f00>/*
<a name=#1377> * The values for the "tval" field of various objects.
<a name=#1378> *
<a name=#1379> * This value is the primary means by which items are sorted in the
<a name=#1380> * player inventory, followed by "sval" and "cost".
<a name=#1381> *
<a name=#1382> * Note that a "BOW" with tval = 19 and sval S = 10*N+P takes a missile
<a name=#1383> * weapon with tval = 16+N, and does (xP) damage when so combined.  This
<a name=#1384> * fact is not actually used in the source, but it is kind of interesting.
<a name=#1385> *
<a name=#1386> * Note that as of 2.7.8, the "item flags" apply to all items, though
<a name=#1387> * only armor and weapons and a few other items use any of these flags.
<a name=#1388> */</font>
<a name=#1389>
<a name=#1390>#define TV_SKELETON      1	<font color=#ff7f00>/* Skeletons ('`') */</font>
<a name=#1391>#define TV_BOTTLE		 2	<font color=#ff7f00>/* Empty bottles ('!') */</font>
<a name=#1392>#define TV_JUNK          3	<font color=#ff7f00>/* Sticks, Pottery, etc ('`'). */</font>
<a name=#1393>#define TV_SPIKE         5	<font color=#ff7f00>/* Spikes ('`') */</font>
<a name=#1394>#define TV_CHEST         7	<font color=#ff7f00>/* Chests ('~') */</font>
<a name=#1395>
<a name=#1396>#define TV_SHOT		16	<font color=#ff7f00>/* Ammo for slings */</font>
<a name=#1397>#define TV_ARROW        17	<font color=#ff7f00>/* Ammo for bows */</font>
<a name=#1398>#define TV_BOLT         18	<font color=#ff7f00>/* Ammo for x-bows */</font>
<a name=#1399>#define TV_BOW          19	<font color=#ff7f00>/* Slings/Bows/Xbows */</font>
<a name=#1400>#define TV_DIGGING      20	<font color=#ff7f00>/* Shovels/Picks */</font>
<a name=#1401>#define TV_HAFTED       21	<font color=#ff7f00>/* Priest Weapons */</font>
<a name=#1402>#define TV_POLEARM      22	<font color=#ff7f00>/* Axes and Pikes */</font>
<a name=#1403>#define TV_SWORD        23	<font color=#ff7f00>/* Edged Weapons */</font>
<a name=#1404>#define TV_BOOTS        30	<font color=#ff7f00>/* Boots */</font>
<a name=#1405>#define TV_GLOVES       31	<font color=#ff7f00>/* Gloves */</font>
<a name=#1406>#define TV_HELM         32	<font color=#ff7f00>/* Helms */</font>
<a name=#1407>#define TV_CROWN        33	<font color=#ff7f00>/* Crowns */</font>
<a name=#1408>#define TV_SHIELD       34	<font color=#ff7f00>/* Shields */</font>
<a name=#1409>#define TV_CLOAK        35	<font color=#ff7f00>/* Cloaks */</font>
<a name=#1410>#define TV_SOFT_ARMOR   36	<font color=#ff7f00>/* Soft Armor */</font>
<a name=#1411>#define TV_HARD_ARMOR   37	<font color=#ff7f00>/* Hard Armor */</font>
<a name=#1412>#define TV_DRAG_ARMOR	38	<font color=#ff7f00>/* Dragon Scale Mail */</font>
<a name=#1413>
<a name=#1414>#define TV_LITE         39	<font color=#ff7f00>/* Lites (including Specials) */</font>
<a name=#1415>#define TV_AMULET       40	<font color=#ff7f00>/* Amulets (including Specials) */</font>
<a name=#1416>#define TV_RING         45	<font color=#ff7f00>/* Rings (including Specials) */</font>
<a name=#1417>#define TV_STAFF        55	<font color=#ff7f00>/* Staffs */</font>
<a name=#1418>#define TV_WAND         65	<font color=#ff7f00>/* Wands */</font>
<a name=#1419>#define TV_ROD          66	<font color=#ff7f00>/* Rods */</font>
<a name=#1420>#define TV_SCROLL       70	<font color=#ff7f00>/* Scrolls */</font>
<a name=#1421>#define TV_POTION       75	<font color=#ff7f00>/* Potions */</font>
<a name=#1422>#define TV_FLASK        77	<font color=#ff7f00>/* Flasks */</font>
<a name=#1423>#define TV_FOOD         80	<font color=#ff7f00>/* Food and mushrooms */</font>
<a name=#1424>#define TV_MAGIC_BOOK   90	<font color=#ff7f00>/* Mage and Rogue books */</font>
<a name=#1425>#define TV_PRAYER_BOOK  91	<font color=#ff7f00>/* Priest and Paladin books */</font>
<a name=#1426>#define TV_DRUID_BOOK	92	<font color=#ff7f00>/* Druid and Ranger books */</font>
<a name=#1427>#define TV_NECRO_BOOK	93	<font color=#ff7f00>/* Necromancer and Assassin books */</font>
<a name=#1428>#define TV_GOLD         100	<font color=#ff7f00>/* Gold can only be picked up by players */</font>
<a name=#1429>
<a name=#1430><font color=#ff7f00>/* Special note:  the constant "TV_MAGIC_BOOK" is used as a base index in
<a name=#1431> * all tables concerning player spells, so make certain all the tvals for
<a name=#1432> * spell books follow each other in sequential order.  At some point, I
<a name=#1433> * may replace it with the more flexible MAX_REALM. -LM-
<a name=#1434> */</font>
<a name=#1435>
<a name=#1436><font color=#ff7f00>/* The "sval" codes for TV_CHEST.  -LM- */</font>
<a name=#1437>#define SV_SW_CHEST		1	<font color=#ff7f00>/*  Small wooden chest. */</font>
<a name=#1438>#define SV_SI_CHEST		2	<font color=#ff7f00>/*  Small iron chest. */</font>
<a name=#1439>#define SV_SS_CHEST		3	<font color=#ff7f00>/*  Small steel chest. */</font>
<a name=#1440>#define SV_SJ_CHEST		4	<font color=#ff7f00>/*  Small jeweled chest. */</font>
<a name=#1441>#define SV_LW_CHEST		5	<font color=#ff7f00>/*  Large wooden chest. */</font>
<a name=#1442>#define SV_LI_CHEST		6	<font color=#ff7f00>/*  Large iron chest. */</font>
<a name=#1443>#define SV_LS_CHEST		7	<font color=#ff7f00>/*  Large steel chest. */</font>
<a name=#1444>#define SV_LJ_CHEST		8	<font color=#ff7f00>/*  Large jeweled chest. */</font>
<a name=#1445>
<a name=#1446>
<a name=#1447><font color=#ff7f00>/* The "sval" codes for TV_SHOT/TV_ARROW/TV_BOLT */</font>
<a name=#1448>#define SV_AMMO_NORMAL		1	<font color=#ff7f00>/* shots, arrows, bolts */</font>
<a name=#1449>#define SV_AMMO_HEAVY		2	<font color=#ff7f00>/* seeker shots, arrows, bolts */</font>
<a name=#1450>
<a name=#1451><font color=#ff7f00>/* The "sval" codes for TV_BOW (note information in "sval") */</font>
<a name=#1452>#define SV_SLING			2	<font color=#ff7f00>/* (x2) */</font>
<a name=#1453>#define SV_SHORT_BOW		12	<font color=#ff7f00>/* (x2) */</font>
<a name=#1454>#define SV_LONG_BOW		13	<font color=#ff7f00>/* (x3) */</font>
<a name=#1455>#define SV_LIGHT_XBOW		23	<font color=#ff7f00>/* (x3) */</font>
<a name=#1456>#define SV_HEAVY_XBOW		24	<font color=#ff7f00>/* (x4) */</font>
<a name=#1457>
<a name=#1458><font color=#ff7f00>/* The "sval" codes for TV_DIGGING */</font>
<a name=#1459>#define SV_SHOVEL			1
<a name=#1460>#define SV_GNOMISH_SHOVEL	2
<a name=#1461>#define SV_DWARVEN_SHOVEL	3
<a name=#1462>#define SV_PICK			4
<a name=#1463>#define SV_ORCISH_PICK		5
<a name=#1464>#define SV_DWARVEN_PICK		6
<a name=#1465>
<a name=#1466><font color=#ff7f00>/* The "sval" values for TV_HAFTED */</font>
<a name=#1467>#define SV_WHIP				2	<font color=#ff7f00>/* 1d5 */</font>
<a name=#1468>#define SV_QUARTERSTAFF			3	<font color=#ff7f00>/* 1d7 */</font>
<a name=#1469>#define SV_THROWING_HAMMER		4	<font color=#ff7f00>/* 2d4 */</font>
<a name=#1470>#define SV_MACE				5	<font color=#ff7f00>/* 2d4 */</font>
<a name=#1471>#define SV_BALL_AND_CHAIN		6	<font color=#ff7f00>/* 2d4 */</font>
<a name=#1472>#define SV_WAR_HAMMER			8	<font color=#ff7f00>/* 3d3 */</font>
<a name=#1473>#define SV_SPIKED_CLUB			10	<font color=#ff7f00>/* 1d7 */</font>
<a name=#1474>#define SV_MORNING_STAR			12	<font color=#ff7f00>/* 2d6 */</font>
<a name=#1475>#define SV_FLAIL				13	<font color=#ff7f00>/* 2d6 */</font>
<a name=#1476>#define SV_LEAD_FILLED_MACE		15	<font color=#ff7f00>/* 3d4 */</font>
<a name=#1477>#define SV_STORM_HAMMER			17	<font color=#ff7f00>/* 1d11 */</font>
<a name=#1478>#define SV_TWO_HANDED_FLAIL		18	<font color=#ff7f00>/* 3d6 */</font>
<a name=#1479>#define SV_MACE_OF_DISRUPTION		20	<font color=#ff7f00>/* 4d8 */</font>
<a name=#1480>#define SV_GROND				50	<font color=#ff7f00>/* 3d4 */</font>
<a name=#1481>
<a name=#1482><font color=#ff7f00>/* The "sval" values for TV_POLEARM */</font>
<a name=#1483>#define SV_SPEAR				2	<font color=#ff7f00>/* 1d6 */</font>
<a name=#1484>#define SV_THRUSTING_SPEAR		3	<font color=#ff7f00>/* 1d7 */</font>
<a name=#1485>#define SV_TRIDENT			5	<font color=#ff7f00>/* 1d7 */</font>
<a name=#1486>#define SV_PIKE				8	<font color=#ff7f00>/* 1d11 */</font>
<a name=#1487>#define SV_BEAKED_AXE			10	<font color=#ff7f00>/* 2d6 */</font>
<a name=#1488>#define SV_BROAD_AXE			11	<font color=#ff7f00>/* 2d6 */</font>
<a name=#1489>#define SV_GLAIVE				13	<font color=#ff7f00>/* 3d4 */</font>
<a name=#1490>#define SV_THROWING_AXE			14	<font color=#ff7f00>/* 2d3 */</font>
<a name=#1491>#define SV_HALBERD			15	<font color=#ff7f00>/* 3d5 */</font>
<a name=#1492>#define SV_SCYTHE				17	<font color=#ff7f00>/* 5d3 */</font>
<a name=#1493>#define SV_LANCE				20	<font color=#ff7f00>/* 3d8 */</font>
<a name=#1494>#define SV_BATTLE_AXE			22	<font color=#ff7f00>/* 2d8 */</font>
<a name=#1495>#define SV_GREAT_AXE			25	<font color=#ff7f00>/* 4d4 */</font>
<a name=#1496>#define SV_DART				28	<font color=#ff7f00>/* 1d5 */</font>
<a name=#1497>#define SV_SCYTHE_OF_SLICING		30	<font color=#ff7f00>/* 6d4 */</font>
<a name=#1498>
<a name=#1499><font color=#ff7f00>/* The "sval" codes for TV_SWORD */</font>
<a name=#1500>#define SV_BROKEN_SWORD			2	<font color=#ff7f00>/* 1d2 */</font>
<a name=#1501>#define SV_DAGGER				4	<font color=#ff7f00>/* 1d4 */</font>
<a name=#1502>#define SV_MAIN_GAUCHE			5	<font color=#ff7f00>/* 1d5 */</font>
<a name=#1503>#define SV_RAPIER				7	<font color=#ff7f00>/* 1d6 */</font>
<a name=#1504>#define SV_SMALL_SWORD			8	<font color=#ff7f00>/* 1d6 */</font>
<a name=#1505>#define SV_SHORT_SWORD			10	<font color=#ff7f00>/* 1d7 */</font>
<a name=#1506>#define SV_SABRE				11	<font color=#ff7f00>/* 1d7 */</font>
<a name=#1507>#define SV_CUTLASS			12	<font color=#ff7f00>/* 1d7 */</font>
<a name=#1508>#define SV_FALCHION			15	<font color=#ff7f00>/* 2d4 */</font>
<a name=#1509>#define SV_BROAD_SWORD			16	<font color=#ff7f00>/* 2d5 */</font>
<a name=#1510>#define SV_LONG_SWORD			17	<font color=#ff7f00>/* 2d5 */</font>
<a name=#1511>#define SV_SCIMITAR			18	<font color=#ff7f00>/* 2d5 */</font>
<a name=#1512>#define SV_KATANA				20	<font color=#ff7f00>/* 3d4 */</font>
<a name=#1513>#define SV_BASTARD_SWORD		21	<font color=#ff7f00>/* 3d4 */</font>
<a name=#1514>#define SV_TWO_HANDED_SWORD		25	<font color=#ff7f00>/* 3d6 */</font>
<a name=#1515>#define SV_EXECUTIONERS_SWORD		28	<font color=#ff7f00>/* 4d5 */</font>
<a name=#1516>#define SV_BLADE_OF_CHAOS		30	<font color=#ff7f00>/* 4d6 */</font>
<a name=#1517>
<a name=#1518><font color=#ff7f00>/* The "sval" codes for TV_SHIELD */</font>
<a name=#1519>#define SV_WICKER_SHIELD		1
<a name=#1520>#define SV_SMALL_LEATHER_SHIELD	2
<a name=#1521>#define SV_SMALL_METAL_SHIELD		3
<a name=#1522>#define SV_LARGE_LEATHER_SHIELD	4
<a name=#1523>#define SV_LARGE_METAL_SHIELD		5
<a name=#1524>#define SV_KNIGHTS_SHIELD		6
<a name=#1525>#define SV_BODY_SHIELD			7
<a name=#1526>#define SV_SHIELD_OF_DEFLECTION	10
<a name=#1527>
<a name=#1528>
<a name=#1529><font color=#ff7f00>/* The "sval" codes for TV_HELM */</font>
<a name=#1530>#define SV_HARD_LEATHER_CAP		2
<a name=#1531>#define SV_METAL_CAP			3
<a name=#1532>#define SV_BARBUT				4
<a name=#1533>#define SV_IRON_HELM			5
<a name=#1534>#define SV_STEEL_HELM			6
<a name=#1535>
<a name=#1536><font color=#ff7f00>/* The "sval" codes for TV_CROWN */</font>
<a name=#1537>#define SV_IRON_CROWN			10
<a name=#1538>#define SV_GOLDEN_CROWN			11
<a name=#1539>#define SV_JEWELED_CROWN		12
<a name=#1540>#define SV_MORGOTH			50
<a name=#1541>
<a name=#1542><font color=#ff7f00>/* The "sval" codes for TV_BOOTS */</font>
<a name=#1543>#define SV_PAIR_OF_LEATHER_SANDALS		1
<a name=#1544>#define SV_PAIR_OF_SOFT_LEATHER_BOOTS	2
<a name=#1545>#define SV_PAIR_OF_HARD_LEATHER_BOOTS	3
<a name=#1546>#define SV_PAIR_OF_METAL_SHOD_BOOTS		4
<a name=#1547>#define SV_PAIR_OF_DWARVEN_BOOTS		5
<a name=#1548>
<a name=#1549><font color=#ff7f00>/* The "sval" codes for TV_CLOAK */</font>
<a name=#1550>#define SV_CLOAK				1
<a name=#1551>#define SV_ELVEN_CLOAK			2
<a name=#1552>#define SV_SHADOW_CLOAK			4
<a name=#1553>#define SV_ETHEREAL_CLOAK		6
<a name=#1554>
<a name=#1555><font color=#ff7f00>/* The "sval" codes for TV_GLOVES */</font>
<a name=#1556>#define SV_SET_OF_LEATHER_GLOVES	1
<a name=#1557>#define SV_SET_OF_MAIL_GAUNTLETS	2
<a name=#1558>#define SV_SET_OF_STEEL_GAUNTLETS	2
<a name=#1559>#define SV_SET_OF_CESTI			4
<a name=#1560>
<a name=#1561><font color=#ff7f00>/* The "sval" codes for TV_SOFT_ARMOR */</font>
<a name=#1562>#define SV_FILTHY_RAG			1
<a name=#1563>#define SV_ROBE				2
<a name=#1564>#define SV_SOFT_LEATHER_ARMOR		4
<a name=#1565>#define SV_SOFT_STUDDED_LEATHER	5
<a name=#1566>#define SV_HARD_LEATHER_ARMOR		6
<a name=#1567>#define SV_HARD_STUDDED_LEATHER	7
<a name=#1568>#define SV_LEATHER_SCALE_MAIL		11
<a name=#1569>
<a name=#1570><font color=#ff7f00>/* The "sval" codes for TV_HARD_ARMOR */</font>
<a name=#1571>#define SV_RUSTY_CHAIN_MAIL		1	<font color=#ff7f00>/* 14- */</font>
<a name=#1572>#define SV_METAL_SCALE_MAIL		3	<font color=#ff7f00>/* 13 */</font>
<a name=#1573>#define SV_CHAIN_MAIL			4	<font color=#ff7f00>/* 14 */</font>
<a name=#1574>#define SV_AUGMENTED_CHAIN_MAIL	6	<font color=#ff7f00>/* 16 */</font>
<a name=#1575>#define SV_DOUBLE_CHAIN_MAIL		7	<font color=#ff7f00>/* 16 */</font>
<a name=#1576>#define SV_BAR_CHAIN_MAIL		8	<font color=#ff7f00>/* 18 */</font>
<a name=#1577>#define SV_METAL_BRIGANDINE_ARMOUR	9	<font color=#ff7f00>/* 19 */</font>
<a name=#1578>#define SV_PARTIAL_PLATE_ARMOUR	12	<font color=#ff7f00>/* 22 */</font>
<a name=#1579>#define SV_METAL_LAMELLAR_ARMOUR	13	<font color=#ff7f00>/* 23 */</font>
<a name=#1580>#define SV_FULL_PLATE_ARMOUR		15	<font color=#ff7f00>/* 25 */</font>
<a name=#1581>#define SV_RIBBED_PLATE_ARMOUR	18	<font color=#ff7f00>/* 28 */</font>
<a name=#1582>#define SV_MITHRIL_CHAIN_MAIL		20	<font color=#ff7f00>/* 28+ */</font>
<a name=#1583>#define SV_MITHRIL_PLATE_MAIL		25	<font color=#ff7f00>/* 35+ */</font>
<a name=#1584>#define SV_ADAMANTITE_PLATE_MAIL	30	<font color=#ff7f00>/* 40+ */</font>
<a name=#1585>
<a name=#1586><font color=#ff7f00>/* The "sval" codes for TV_DRAG_ARMOR */</font>
<a name=#1587>#define SV_DRAGON_BLACK			1
<a name=#1588>#define SV_DRAGON_BLUE			2
<a name=#1589>#define SV_DRAGON_WHITE			3
<a name=#1590>#define SV_DRAGON_RED			4
<a name=#1591>#define SV_DRAGON_GREEN			5
<a name=#1592>#define SV_DRAGON_MULTIHUED		6
<a name=#1593>#define SV_DRAGON_SHINING		10
<a name=#1594>#define SV_DRAGON_LAW			12
<a name=#1595>#define SV_DRAGON_BRONZE		14
<a name=#1596>#define SV_DRAGON_GOLD			16
<a name=#1597>#define SV_DRAGON_CHAOS			18
<a name=#1598>#define SV_DRAGON_BALANCE		20
<a name=#1599>#define SV_DRAGON_POWER			30
<a name=#1600>
<a name=#1601><font color=#ff7f00>/* The sval codes for TV_LITE */</font>
<a name=#1602>#define SV_LITE_TORCH		0
<a name=#1603>#define SV_LITE_LANTERN		1
<a name=#1604>#define SV_LITE_GALADRIEL	4
<a name=#1605>#define SV_LITE_ELENDIL		5
<a name=#1606>#define SV_LITE_THRAIN		6
<a name=#1607>#define SV_STONE_LORE		15
<a name=#1608>
<a name=#1609><font color=#ff7f00>/* The "sval" codes for TV_AMULET */</font>
<a name=#1610>#define SV_AMULET_DOOM			0
<a name=#1611>#define SV_AMULET_TELEPORT		1
<a name=#1612>#define SV_AMULET_INTELLIGENCE	2
<a name=#1613>#define SV_AMULET_SLOW_DIGEST		3
<a name=#1614>#define SV_AMULET_RESIST_ACID		4
<a name=#1615>#define SV_AMULET_MAGIC_MASTERY	5
<a name=#1616>#define SV_AMULET_WISDOM		6
<a name=#1617>#define SV_AMULET_CHARISMA		7
<a name=#1618>#define SV_AMULET_THE_MAGI		8
<a name=#1619>#define SV_AMULET_ESCAPING		9
<a name=#1620>#define SV_AMULET_CARLAMMAS		10
<a name=#1621>#define SV_AMULET_INGWE			11
<a name=#1622>#define SV_AMULET_DWARVES		12
<a name=#1623>#define SV_AMULET_BOROMIR		13
<a name=#1624>#define SV_AMULET_FARAMIR		14
<a name=#1625>#define SV_AMULET_LION		15
<a name=#1626>
<a name=#1627><font color=#ff7f00>/* The sval codes for TV_RING */</font>
<a name=#1628>#define SV_RING_WOE			0
<a name=#1629>#define SV_RING_AGGRAVATION		1
<a name=#1630>#define SV_RING_WEAKNESS		2
<a name=#1631>#define SV_RING_STUPIDITY		3
<a name=#1632>#define SV_RING_TELEPORTATION		4
<a name=#1633>#define SV_RING_ESP			5
<a name=#1634>#define SV_RING_SLOW_DIGESTION	6
<a name=#1635>#define SV_RING_FEATHER_FALL		7
<a name=#1636>#define SV_RING_RESIST_FIRE		8
<a name=#1637>#define SV_RING_RESIST_COLD		9
<a name=#1638>#define SV_RING_SUST_STR_CHR		10
<a name=#1639>#define SV_RING_SUST_INT_WIS		11
<a name=#1640>#define SV_RING_SUST_DEX_CON		12
<a name=#1641>#define SV_RING_RESIST_NETHER		13
<a name=#1642>#define SV_RING_RESIST_LIGHT_DARK	14
<a name=#1643>#define SV_RING_ELEC			15
<a name=#1644>#define SV_RING_PROTECTION		16
<a name=#1645>#define SV_RING_ACID			17
<a name=#1646>#define SV_RING_FLAMES			18
<a name=#1647>#define SV_RING_ICE			19
<a name=#1648>#define SV_RING_RESIST_POIS		20
<a name=#1649>#define SV_RING_FREE_ACTION		21
<a name=#1650>#define SV_RING_SEE_INVIS		22
<a name=#1651>#define SV_RING_SEARCHING		23
<a name=#1652>#define SV_RING_STR			24
<a name=#1653><font color=#ff7f00>/* xxx */</font>
<a name=#1654>#define SV_RING_DEX			26
<a name=#1655>#define SV_RING_CON			27
<a name=#1656>#define SV_RING_SKILL			28
<a name=#1657>#define SV_RING_DEADLINESS		29
<a name=#1658>#define SV_RING_COMBAT			30
<a name=#1659>#define SV_RING_SPEED			31
<a name=#1660>#define SV_RING_BARAHIR			32
<a name=#1661>#define SV_RING_TULKAS			33
<a name=#1662>#define SV_RING_NARYA			34
<a name=#1663>#define SV_RING_NENYA			35
<a name=#1664>#define SV_RING_VILYA			36
<a name=#1665>#define SV_RING_POWER			37
<a name=#1666>
<a name=#1667><font color=#ff7f00>/* The "sval" codes for TV_STAFF */</font>
<a name=#1668>#define SV_STAFF_DARKNESS		0
<a name=#1669>#define SV_STAFF_SLOWNESS		1
<a name=#1670>#define SV_STAFF_HASTE_MONSTERS	2
<a name=#1671>#define SV_STAFF_SUMMONING		3
<a name=#1672>#define SV_STAFF_TELEPORTATION	4
<a name=#1673>#define SV_STAFF_IDENTIFY		5
<a name=#1674>#define SV_STAFF_REMOVE_CURSE		6
<a name=#1675>#define SV_STAFF_STARLIGHT		7
<a name=#1676>#define SV_STAFF_LITE			8
<a name=#1677>#define SV_STAFF_MAPPING		9
<a name=#1678>#define SV_STAFF_DETECT_GOLD		10
<a name=#1679>#define SV_STAFF_DETECT_ITEM		11
<a name=#1680>#define SV_STAFF_DETECT_TRAP		12
<a name=#1681>#define SV_STAFF_DETECT_DOOR		13
<a name=#1682>#define SV_STAFF_DETECT_INVIS		14
<a name=#1683>#define SV_STAFF_DETECT_EVIL		15
<a name=#1684>#define SV_STAFF_CURE_MEDIUM		16
<a name=#1685>#define SV_STAFF_CURING			17
<a name=#1686>#define SV_STAFF_HEALING		18
<a name=#1687>#define SV_STAFF_BANISHMENT		19
<a name=#1688>#define SV_STAFF_SLEEP_MONSTERS	20
<a name=#1689>#define SV_STAFF_SLOW_MONSTERS	21
<a name=#1690>#define SV_STAFF_SPEED			22
<a name=#1691>#define SV_STAFF_PROBING		23
<a name=#1692>#define SV_STAFF_DISPEL_EVIL		24
<a name=#1693>#define SV_STAFF_POWER			25
<a name=#1694>#define SV_STAFF_HOLINESS		26
<a name=#1695>#define SV_STAFF_GENOCIDE		27
<a name=#1696>#define SV_STAFF_EARTHQUAKES		28
<a name=#1697>#define SV_STAFF_DESTRUCTION		29
<a name=#1698>#define SV_STAFF_DETECTION		30
<a name=#1699>#define SV_STAFF_MSTORM			31
<a name=#1700>#define SV_STAFF_STARBURST		32
<a name=#1701>#define SV_STAFF_MASS_CONFU		33
<a name=#1702>
<a name=#1703>#define SV_STAFF_GANDALF		40
<a name=#1704>#define SV_STAFF_WINDS			41
<a name=#1705>#define SV_STAFF_MENELTARMA		42
<a name=#1706>#define SV_STAFF_RADAGAST		43
<a name=#1707>
<a name=#1708><font color=#ff7f00>/* The "sval" codes for TV_WAND */</font>
<a name=#1709>#define SV_WAND_HEAL_MONSTER		0
<a name=#1710>#define SV_WAND_HASTE_MONSTER		1
<a name=#1711>#define SV_WAND_CLONE_MONSTER		2
<a name=#1712>#define SV_WAND_TELEPORT_AWAY		3
<a name=#1713>#define SV_WAND_DISARMING		4
<a name=#1714>#define SV_WAND_DOOR_DEST		5
<a name=#1715>#define SV_WAND_STONE_TO_MUD		6
<a name=#1716>#define SV_WAND_LITE			7
<a name=#1717>#define SV_WAND_SLEEP_MONSTER		8
<a name=#1718>#define SV_WAND_SLOW_MONSTER		9
<a name=#1719>#define SV_WAND_CONFUSE_MONSTER	10
<a name=#1720>#define SV_WAND_FEAR_MONSTER		11
<a name=#1721>#define SV_WAND_DRAIN_LIFE		12
<a name=#1722>#define SV_WAND_POLYMORPH		13
<a name=#1723>#define SV_WAND_STINKING_CLOUD	14
<a name=#1724>#define SV_WAND_MAGIC_MISSILE		15
<a name=#1725>#define SV_WAND_ACID_BOLT		16
<a name=#1726>#define SV_WAND_ELEC_BOLT		17
<a name=#1727>#define SV_WAND_FIRE_BOLT		18
<a name=#1728>#define SV_WAND_COLD_BOLT		19
<a name=#1729>#define SV_WAND_ACID_BALL		20
<a name=#1730>#define SV_WAND_ELEC_BALL		21
<a name=#1731>#define SV_WAND_FIRE_BALL		22
<a name=#1732>#define SV_WAND_COLD_BALL		23
<a name=#1733>#define SV_WAND_WONDER			24
<a name=#1734>#define SV_WAND_ANNIHILATION		25
<a name=#1735>#define SV_WAND_DRAGON_FIRE		26
<a name=#1736>#define SV_WAND_DRAGON_COLD		27
<a name=#1737>#define SV_WAND_DRAGON_BREATH		28
<a name=#1738>#define SV_WAND_STRIKING		29
<a name=#1739>#define SV_WAND_STORMS			30
<a name=#1740>#define SV_WAND_SHARD_BOLT		31
<a name=#1741>
<a name=#1742>#define SV_WAND_ILKORIN		40
<a name=#1743>#define SV_WAND_SARUMAN		41
<a name=#1744>#define SV_WAND_UNMAKING	42
<a name=#1745>#define SV_WAND_ULPION		43
<a name=#1746>
<a name=#1747><font color=#ff7f00>/* The "sval" codes for TV_ROD */</font>
<a name=#1748>#define SV_ROD_DETECT_TRAP		0
<a name=#1749>#define SV_ROD_DETECT_DOOR		1
<a name=#1750>#define SV_ROD_IDENTIFY			2
<a name=#1751>#define SV_ROD_RECALL			3
<a name=#1752>#define SV_ROD_ILLUMINATION		4
<a name=#1753>#define SV_ROD_MAPPING			5
<a name=#1754><font color=#ff7f00>/* xxx (aimed) */</font>
<a name=#1755>#define SV_ROD_PROBING			7
<a name=#1756>#define SV_ROD_CURING			8
<a name=#1757>#define SV_ROD_HEALING			9
<a name=#1758>#define SV_ROD_RESTORATION		10
<a name=#1759>#define SV_ROD_SPEED			11
<a name=#1760><font color=#ff7f00>/* xxx (aimed) */</font>
<a name=#1761>#define SV_ROD_TELEPORT_AWAY		13
<a name=#1762>#define SV_ROD_DISARMING		14
<a name=#1763>#define SV_ROD_LITE			15
<a name=#1764>#define SV_ROD_SLEEP_MONSTER		16
<a name=#1765>#define SV_ROD_SLOW_MONSTER		17
<a name=#1766>#define SV_ROD_DRAIN_LIFE		18
<a name=#1767>#define SV_ROD_POLYMORPH		19
<a name=#1768>#define SV_ROD_ACID_BOLT		20
<a name=#1769>#define SV_ROD_ELEC_BOLT		21
<a name=#1770>#define SV_ROD_FIRE_BOLT		22
<a name=#1771>#define SV_ROD_COLD_BOLT		23
<a name=#1772>#define SV_ROD_ACID_BALL		24
<a name=#1773>#define SV_ROD_ELEC_BALL		25
<a name=#1774>#define SV_ROD_FIRE_BALL		26
<a name=#1775>#define SV_ROD_COLD_BALL		27
<a name=#1776>#define SV_ROD_LIGHTINGSTRIKE		28
<a name=#1777>#define SV_ROD_NORTHWINDS		29
<a name=#1778>#define SV_ROD_DRAGONFIRE		30
<a name=#1779>#define SV_ROD_GLAURUNGS		31
<a name=#1780>#define SV_ROD_ROUSE_LEVEL		32
<a name=#1781>
<a name=#1782>#define SV_ROD_DELVING		40
<a name=#1783>#define SV_ROD_SHADOW		41
<a name=#1784>#define SV_ROD_AIR		42
<a name=#1785>#define SV_ROD_PORTALS		43
<a name=#1786>
<a name=#1787>
<a name=#1788><font color=#ff7f00>/* The "sval" codes for TV_SCROLL */</font>
<a name=#1789>
<a name=#1790>#define SV_SCROLL_DARKNESS				0
<a name=#1791>#define SV_SCROLL_AGGRAVATE_MONSTER			1
<a name=#1792>#define SV_SCROLL_CURSE_ARMOR				2
<a name=#1793>#define SV_SCROLL_CURSE_WEAPON			3
<a name=#1794>#define SV_SCROLL_SUMMON_MONSTER			4
<a name=#1795>#define SV_SCROLL_SUMMON_UNDEAD			5
<a name=#1796><font color=#ff7f00>/* xxx (summon?) */</font>
<a name=#1797>#define SV_SCROLL_TRAP_CREATION			7
<a name=#1798>#define SV_SCROLL_PHASE_DOOR				8
<a name=#1799>#define SV_SCROLL_TELEPORT				9
<a name=#1800>#define SV_SCROLL_TELEPORT_LEVEL			10
<a name=#1801>#define SV_SCROLL_WORD_OF_RECALL			11
<a name=#1802>#define SV_SCROLL_IDENTIFY				12
<a name=#1803>#define SV_SCROLL_STAR_IDENTIFY			13
<a name=#1804>#define SV_SCROLL_REMOVE_CURSE			14
<a name=#1805>#define SV_SCROLL_STAR_REMOVE_CURSE			15
<a name=#1806>#define SV_SCROLL_ENCHANT_ARMOR			16
<a name=#1807>#define SV_SCROLL_ENCHANT_WEAPON_TO_HIT		17
<a name=#1808>#define SV_SCROLL_ENCHANT_WEAPON_TO_DAM		18
<a name=#1809>#define SV_SCROLL_STAR_RECHARGING			19
<a name=#1810>#define SV_SCROLL_STAR_ENCHANT_ARMOR		20
<a name=#1811>#define SV_SCROLL_STAR_ENCHANT_WEAPON		21
<a name=#1812>#define SV_SCROLL_RECHARGING				22
<a name=#1813>#define SV_SCROLL_BRANDING				23
<a name=#1814>#define SV_SCROLL_LIGHT					24
<a name=#1815>#define SV_SCROLL_MAPPING				25
<a name=#1816>#define SV_SCROLL_DETECT_GOLD				26
<a name=#1817>#define SV_SCROLL_DETECT_ITEM				27
<a name=#1818>#define SV_SCROLL_DETECT_TRAP				28
<a name=#1819>#define SV_SCROLL_DETECT_DOOR				29
<a name=#1820>#define SV_SCROLL_DETECT_INVIS			30
<a name=#1821><font color=#ff7f00>/* xxx (detect evil?) */</font>
<a name=#1822>#define SV_SCROLL_SATISFY_HUNGER			32
<a name=#1823>#define SV_SCROLL_BLESSING				33
<a name=#1824>#define SV_SCROLL_HOLY_CHANT				34
<a name=#1825>#define SV_SCROLL_HOLY_PRAYER				35
<a name=#1826>#define SV_SCROLL_MONSTER_CONFUSION			36
<a name=#1827>#define SV_SCROLL_PROTECTION_FROM_EVIL		37
<a name=#1828>#define SV_SCROLL_RUNE_OF_PROTECTION		38
<a name=#1829>#define SV_SCROLL_DOOR_DESTRUCTION			39
<a name=#1830>#define SV_SCROLL_FRIGHTENING				40
<a name=#1831>#define SV_SCROLL_STAR_DESTRUCTION			41
<a name=#1832>#define SV_SCROLL_DISPEL_UNDEAD			42
<a name=#1833><font color=#ff7f00>/* xxx */</font>
<a name=#1834>#define SV_SCROLL_GENOCIDE				44
<a name=#1835>#define SV_SCROLL_MASS_GENOCIDE			45
<a name=#1836>#define SV_SCROLL_ACQUIREMENT			46
<a name=#1837>#define SV_SCROLL_STAR_ACQUIREMENT		47
<a name=#1838>#define SV_SCROLL_ELE_ATTACKS			48
<a name=#1839>
<a name=#1840><font color=#ff7f00>/* The "sval" codes for TV_POTION */</font>
<a name=#1841>#define SV_POTION_WATER				0
<a name=#1842>#define SV_POTION_APPLE_JUICE			1
<a name=#1843>#define SV_POTION_SLIME_MOLD			2
<a name=#1844><font color=#ff7f00>/* xxx (fixed color) */</font>
<a name=#1845>#define SV_POTION_SLOWNESS			4
<a name=#1846>#define SV_POTION_SALT_WATER			5
<a name=#1847>#define SV_POTION_POISON			6
<a name=#1848>#define SV_POTION_BLINDNESS			7
<a name=#1849><font color=#ff7f00>/* xxx */</font>
<a name=#1850>#define SV_POTION_CONFUSION			9
<a name=#1851><font color=#ff7f00>/* xxx */</font>
<a name=#1852>#define SV_POTION_SLEEP				11
<a name=#1853><font color=#ff7f00>/* xxx */</font>
<a name=#1854>#define SV_POTION_LOSE_MEMORIES		13
<a name=#1855><font color=#ff7f00>/* xxx */</font>
<a name=#1856>#define SV_POTION_RUINATION			15
<a name=#1857>#define SV_POTION_DEC_STR			16
<a name=#1858>#define SV_POTION_DEC_INT			17
<a name=#1859>#define SV_POTION_DEC_WIS			18
<a name=#1860>#define SV_POTION_DEC_DEX			19
<a name=#1861>#define SV_POTION_DEC_CON			20
<a name=#1862>#define SV_POTION_DEC_CHR			21
<a name=#1863>#define SV_POTION_DETONATIONS			22
<a name=#1864>#define SV_POTION_DEATH				23
<a name=#1865>#define SV_POTION_INFRAVISION			24
<a name=#1866>#define SV_POTION_DETECT_INVIS		25
<a name=#1867>#define SV_POTION_SLOW_POISON			26
<a name=#1868>#define SV_POTION_CURE_POISON			27
<a name=#1869>#define SV_POTION_BOLDNESS			28
<a name=#1870>#define SV_POTION_SPEED				29
<a name=#1871>#define SV_POTION_RESIST_HEAT_COLD		30
<a name=#1872>#define SV_POTION_RESIST_ACID_ELEC		31
<a name=#1873>#define SV_POTION_HEROISM			32
<a name=#1874>#define SV_POTION_BERSERK_STR			33
<a name=#1875>#define SV_POTION_CURE_LIGHT			34
<a name=#1876>#define SV_POTION_CURE_SERIOUS		35
<a name=#1877>#define SV_POTION_CURE_CRITICAL		36
<a name=#1878>#define SV_POTION_HEALING			37
<a name=#1879>#define SV_POTION_STAR_HEALING		38
<a name=#1880>#define SV_POTION_LIFE				39
<a name=#1881>#define SV_POTION_RESTORE_MANA		40
<a name=#1882>#define SV_POTION_RESTORE_EXP			41
<a name=#1883>#define SV_POTION_RES_STR			42
<a name=#1884>#define SV_POTION_RES_INT			43
<a name=#1885>#define SV_POTION_RES_WIS			44
<a name=#1886>#define SV_POTION_RES_DEX			45
<a name=#1887>#define SV_POTION_RES_CON			46
<a name=#1888>#define SV_POTION_RES_CHR			47
<a name=#1889>#define SV_POTION_INC_STR			48
<a name=#1890>#define SV_POTION_INC_INT			49
<a name=#1891>#define SV_POTION_INC_WIS			50
<a name=#1892>#define SV_POTION_INC_DEX			51
<a name=#1893>#define SV_POTION_INC_CON			52
<a name=#1894>#define SV_POTION_INC_CHR			53
<a name=#1895>#define SV_POTION_RESIST_ALL			54
<a name=#1896>#define SV_POTION_AUGMENTATION		55
<a name=#1897>#define SV_POTION_ENLIGHTENMENT		56
<a name=#1898>#define SV_POTION_STAR_ENLIGHTENMENT	57
<a name=#1899>#define SV_POTION_SELF_KNOWLEDGE		58
<a name=#1900>#define SV_POTION_EXPERIENCE			59
<a name=#1901>#define SV_POTION_VAMPIRE			60
<a name=#1902>
<a name=#1903>
<a name=#1904><font color=#ff7f00>/* The "sval" codes for TV_FOOD */</font>
<a name=#1905>#define SV_FOOD_POISON			0
<a name=#1906>#define SV_FOOD_BLINDNESS		1
<a name=#1907>#define SV_FOOD_PARANOIA		2
<a name=#1908>#define SV_FOOD_CONFUSION		3
<a name=#1909>#define SV_FOOD_HALLUCINATION		4
<a name=#1910>#define SV_FOOD_PARALYSIS		5
<a name=#1911>#define SV_FOOD_WEAKNESS		6
<a name=#1912>#define SV_FOOD_SICKNESS		7
<a name=#1913>#define SV_FOOD_STUPIDITY		8
<a name=#1914>#define SV_FOOD_NAIVETY			9
<a name=#1915>#define SV_FOOD_UNHEALTH		10
<a name=#1916>#define SV_FOOD_DISEASE			11
<a name=#1917>#define SV_FOOD_CURE_POISON		12
<a name=#1918>#define SV_FOOD_CURE_BLINDNESS	13
<a name=#1919>#define SV_FOOD_CURE_PARANOIA		14
<a name=#1920>#define SV_FOOD_CURE_CONFUSION	15
<a name=#1921>#define SV_FOOD_CURE_SERIOUS		16
<a name=#1922>#define SV_FOOD_RESTORE_STR		17
<a name=#1923>#define SV_FOOD_RESTORE_CON		18
<a name=#1924>#define SV_FOOD_RESTORING		19
<a name=#1925><font color=#ff7f00>/* many missing mushrooms */</font>
<a name=#1926>#define SV_FOOD_BISCUIT			32
<a name=#1927>#define SV_FOOD_JERKY			33
<a name=#1928>#define SV_FOOD_RATION			35
<a name=#1929>#define SV_FOOD_SLIME_MOLD		36
<a name=#1930>#define SV_FOOD_WAYBREAD		37
<a name=#1931>#define SV_FOOD_PINT_OF_ALE		38
<a name=#1932>#define SV_FOOD_PINT_OF_WINE		39
<a name=#1933>#define SV_FOOD_ATHELAS			40
<a name=#1934>#define SV_FOOD_BEORNING		41
<a name=#1935>
<a name=#1936><font color=#ff7f00>/* The "sval" codes for TV_GOLD -LM- */</font>
<a name=#1937>#define SV_COPPER				1
<a name=#1938>#define SV_SILVER				2
<a name=#1939>#define SV_GARNETS			3
<a name=#1940>#define SV_GOLD				4
<a name=#1941>#define SV_OPALS				5
<a name=#1942>#define SV_SAPPHIRES			6
<a name=#1943>#define SV_RUBIES				7
<a name=#1944>#define SV_DIAMONDS			8
<a name=#1945>#define SV_EMERALDS			9
<a name=#1946>#define SV_MITHRIL			10
<a name=#1947>#define SV_ADAMANTITE			11
<a name=#1948>
<a name=#1949><font color=#ff7f00>/*
<a name=#1950> * Special "sval" limit -- first "normal" food (no longer requires a flavor)
<a name=#1951> */</font>
<a name=#1952>#define SV_FOOD_MIN_FOOD	32
<a name=#1953>
<a name=#1954><font color=#ff7f00>/*
<a name=#1955> * Maximum base AC of current shield types (used in deflecting missiles and bolts)
<a name=#1956> */</font>
<a name=#1957>#define MAX_SHIELD_BASE_AC		12
<a name=#1958>
<a name=#1959>
<a name=#1960><font color=#ff7f00>/*
<a name=#1961> * Special "sval" limit -- first "aimed" rod
<a name=#1962> */</font>
<a name=#1963>#define SV_ROD_MIN_DIRECTION	12
<a name=#1964>
<a name=#1965><font color=#ff7f00>/*
<a name=#1966> * Special "sval" limit -- first "large" chest
<a name=#1967> */</font>
<a name=#1968>#define SV_CHEST_MIN_LARGE	5
<a name=#1969>
<a name=#1970><font color=#ff7f00>/*
<a name=#1971> * Special "sval" limit -- first "good" magic/prayer book
<a name=#1972> */</font>
<a name=#1973>#define SV_BOOK_MIN_GOOD	4
<a name=#1974>
<a name=#1975><font color=#ff7f00>/*
<a name=#1976> * Special "sval" limit -- maximum allowed spellbook sval (used to prevent 
<a name=#1977> * illegal access to tables)
<a name=#1978> */</font>
<a name=#1979>#define SV_BOOK_MAX		8
<a name=#1980>
<a name=#1981><font color=#ff7f00>/*
<a name=#1982> * Special "sval" limit -- max treasure sval (used in function "make_gold")
<a name=#1983> */</font>
<a name=#1984>#define SV_GOLD_MAX		11
<a name=#1985>
<a name=#1986>
<a name=#1987><font color=#ff7f00>/*** Monster blow constants ***/</font>
<a name=#1988>
<a name=#1989>
<a name=#1990><font color=#ff7f00>/*
<a name=#1991> * New monster blow methods
<a name=#1992> */</font>
<a name=#1993>#define RBM_HIT		1
<a name=#1994>#define RBM_TOUCH	2
<a name=#1995>#define RBM_PUNCH	3
<a name=#1996>#define RBM_KICK	4
<a name=#1997>#define RBM_CLAW	5
<a name=#1998>#define RBM_BITE	6
<a name=#1999>#define RBM_STING	7
<a name=#2000>#define RBM_XXX1	8
<a name=#2001>#define RBM_BUTT	9
<a name=#2002>#define RBM_CRUSH	10
<a name=#2003>#define RBM_ENGULF	11
<a name=#2004>#define RBM_XXX2	12
<a name=#2005>#define RBM_CRAWL	13
<a name=#2006>#define RBM_DROOL	14
<a name=#2007>#define RBM_SPIT	15
<a name=#2008>#define RBM_XXX3	16
<a name=#2009>#define RBM_GAZE	17
<a name=#2010>#define RBM_WAIL	18
<a name=#2011>#define RBM_SPORE	19
<a name=#2012>#define RBM_XXX4	20
<a name=#2013>#define RBM_BEG		21
<a name=#2014>#define RBM_INSULT	22
<a name=#2015>#define RBM_SNEER		23
<a name=#2016>#define RBM_REQUEST	24
<a name=#2017>
<a name=#2018>
<a name=#2019><font color=#ff7f00>/*
<a name=#2020> * New monster blow effects
<a name=#2021> */</font>
<a name=#2022>#define RBE_HURT		1
<a name=#2023>#define RBE_POISON		2
<a name=#2024>#define RBE_UN_BONUS	3
<a name=#2025>#define RBE_UN_POWER	4
<a name=#2026>#define RBE_EAT_GOLD	5
<a name=#2027>#define RBE_EAT_ITEM	6
<a name=#2028>#define RBE_EAT_FOOD	7
<a name=#2029>#define RBE_EAT_LITE	8
<a name=#2030>#define RBE_ACID		9
<a name=#2031>#define RBE_ELEC		10
<a name=#2032>#define RBE_FIRE		11
<a name=#2033>#define RBE_COLD		12
<a name=#2034>#define RBE_BLIND		13
<a name=#2035>#define RBE_CONFUSE		14
<a name=#2036>#define RBE_TERRIFY		15
<a name=#2037>#define RBE_PARALYZE	16
<a name=#2038>#define RBE_LOSE_STR	17
<a name=#2039>#define RBE_LOSE_INT	18
<a name=#2040>#define RBE_LOSE_WIS	19
<a name=#2041>#define RBE_LOSE_DEX	20
<a name=#2042>#define RBE_LOSE_CON	21
<a name=#2043>#define RBE_LOSE_CHR	22
<a name=#2044>#define RBE_LOSE_ALL	23
<a name=#2045>#define RBE_SHATTER		24
<a name=#2046>#define RBE_EXP_10		25
<a name=#2047>#define RBE_EXP_20		26
<a name=#2048>#define RBE_EXP_40		27
<a name=#2049>#define RBE_EXP_80		28
<a name=#2050>
<a name=#2051>
<a name=#2052><font color=#ff7f00>/* 1/x chance of reducing stats (for elemental attacks).  From Zangband
<a name=#2053> * -LM-
<a name=#2054> */</font>
<a name=#2055>#define HURT_CHANCE	25
<a name=#2056>
<a name=#2057>
<a name=#2058><font color=#ff7f00>/*** Function flags ***/</font>
<a name=#2059>
<a name=#2060>
<a name=#2061>#define PROJECT_NO          0
<a name=#2062>#define PROJECT_NOT_CLEAR   1
<a name=#2063>#define PROJECT_CLEAR       2
<a name=#2064>
<a name=#2065><font color=#ff7f00>/*
<a name=#2066> * Bit flags for the "project()" function
<a name=#2067> *
<a name=#2068> *   JUMP:  Jump directly to the target location (this is a hack)
<a name=#2069> *   BEAM:  Work as a beam weapon (affect every grid passed through)
<a name=#2070> *   ARC:   Act as an arc spell (a portion of a caster-centered ball)
<a name=#2071> *   THRU:  Continue "through" the target (used for "bolts"/"beams")
<a name=#2072> *   STOP:  Stop as soon as we hit a monster (used for "bolts")
<a name=#2073> *   GRID:  Affect each grid in the "blast area" in some way
<a name=#2074> *   ITEM:  Affect each object in the "blast area" in some way
<a name=#2075> *   KILL:  Affect each monster in the "blast area" in some way
<a name=#2076> *   PLAY:  Explicitly affect the player
<a name=#2077> *   HIDE:  Hack -- disable "visual" feedback from projection
<a name=#2078> *   CHCK:  Note occupied grids, but do not stop at them.
<a name=#2079> */</font>
<a name=#2080>#define PROJECT_JUMP	0x0001
<a name=#2081>#define PROJECT_BEAM	0x0002
<a name=#2082>#define PROJECT_SAFE    0x0004
<a name=#2083>#define PROJECT_ARC	0x0008
<a name=#2084>#define PROJECT_THRU	0x0010
<a name=#2085>#define PROJECT_STOP	0x0020
<a name=#2086>#define PROJECT_GRID	0x0040
<a name=#2087>#define PROJECT_ITEM	0x0080
<a name=#2088>#define PROJECT_KILL	0x0100
<a name=#2089>#define PROJECT_PLAY	0x0200
<a name=#2090>#define PROJECT_HIDE	0x0400
<a name=#2091>#define PROJECT_CHCK	0x0800
<a name=#2092>
<a name=#2093><font color=#ff7f00>/*
<a name=#2094> * Bit flags for the "enchant()" function
<a name=#2095> */</font>
<a name=#2096>#define ENCH_TOHIT   0x01
<a name=#2097>#define ENCH_TODAM   0x02
<a name=#2098>#define ENCH_TOAC    0x04
<a name=#2099>
<a name=#2100>
<a name=#2101><font color=#ff7f00>/*
<a name=#2102> * Bit flags for the "target_set" function
<a name=#2103> *
<a name=#2104> *	KILL: Target monsters
<a name=#2105> *	LOOK: Describe grid fully
<a name=#2106> *	XTRA: Currently unused flag
<a name=#2107> *	GRID: Select from all grids
<a name=#2108> */</font>
<a name=#2109>#define TARGET_KILL		0x01
<a name=#2110>#define TARGET_LOOK		0x02
<a name=#2111>#define TARGET_XTRA		0x04
<a name=#2112>#define TARGET_GRID		0x08
<a name=#2113>
<a name=#2114>
<a name=#2115><font color=#ff7f00>/*
<a name=#2116> * Bit flags for the "monster_desc" function
<a name=#2117> */</font>
<a name=#2118>#define MDESC_OBJE	0x01	<font color=#ff7f00>/* Objective (or Reflexive) */</font>
<a name=#2119>#define MDESC_POSS	0x02	<font color=#ff7f00>/* Possessive (or Reflexive) */</font>
<a name=#2120>#define MDESC_IND1	0x04	<font color=#ff7f00>/* Indefinites for hidden monsters */</font>
<a name=#2121>#define MDESC_IND2	0x08	<font color=#ff7f00>/* Indefinites for visible monsters */</font>
<a name=#2122>#define MDESC_PRO1	0x10	<font color=#ff7f00>/* Pronominalize hidden monsters */</font>
<a name=#2123>#define MDESC_PRO2	0x20	<font color=#ff7f00>/* Pronominalize visible monsters */</font>
<a name=#2124>#define MDESC_HIDE	0x40	<font color=#ff7f00>/* Assume the monster is hidden */</font>
<a name=#2125>#define MDESC_SHOW	0x80	<font color=#ff7f00>/* Assume the monster is visible */</font>
<a name=#2126>
<a name=#2127>
<a name=#2128><font color=#ff7f00>/*
<a name=#2129> * Bit flags for the "get_item" function
<a name=#2130> */</font>
<a name=#2131>#define USE_EQUIP	0x01	<font color=#ff7f00>/* Allow equip items */</font>
<a name=#2132>#define USE_INVEN	0x02	<font color=#ff7f00>/* Allow inven items */</font>
<a name=#2133>#define USE_FLOOR	0x04	<font color=#ff7f00>/* Allow floor items */</font>
<a name=#2134>#define CAN_SQUELCH	0x10	<font color=#ff7f00>/* Allow selection of all squelched items */</font>
<a name=#2135>
<a name=#2136><font color=#ff7f00>/*** Player flags ***/</font>
<a name=#2137>
<a name=#2138>
<a name=#2139><font color=#ff7f00>/*
<a name=#2140> * Bit flags for the "p_ptr->notice" variable
<a name=#2141> */</font>
<a name=#2142>#define PN_COMBINE	0x00000001L	<font color=#ff7f00>/* Combine the pack */</font>
<a name=#2143>#define PN_REORDER	0x00000002L	<font color=#ff7f00>/* Reorder the pack */</font>
<a name=#2144><font color=#ff7f00>/* xxx (many) */</font>
<a name=#2145>
<a name=#2146>
<a name=#2147><font color=#ff7f00>/*
<a name=#2148> * Bit flags for the "p_ptr->update" variable
<a name=#2149> */</font>
<a name=#2150>#define PU_BONUS	0x00000001L	<font color=#ff7f00>/* Calculate bonuses */</font>
<a name=#2151>#define PU_TORCH	0x00000002L	<font color=#ff7f00>/* Calculate torch radius */</font>
<a name=#2152><font color=#ff7f00>/* xxx (many) */</font>
<a name=#2153>#define PU_HP		0x00000010L	<font color=#ff7f00>/* Calculate chp and mhp */</font>
<a name=#2154>#define PU_MANA		0x00000020L	<font color=#ff7f00>/* Calculate csp and msp */</font>
<a name=#2155>#define PU_SPELLS	0x00000040L	<font color=#ff7f00>/* Calculate spells */</font>
<a name=#2156>#define PU_SPECIALTY	0x00000080L	<font color=#ff7f00>/* Calculate spells */</font>
<a name=#2157><font color=#ff7f00>/* xxx (many) */</font>
<a name=#2158>#define PU_FORGET_VIEW	0x00010000L	<font color=#ff7f00>/* Forget field of view */</font>
<a name=#2159>#define PU_UPDATE_VIEW	        0x00020000L	<font color=#ff7f00>/* Update field of view */</font>
<a name=#2160><font color=#ff7f00>/* xxx (many) */</font>
<a name=#2161>#define PU_MONSTERS	0x10000000L	<font color=#ff7f00>/* Update monsters */</font>
<a name=#2162>#define PU_DISTANCE	0x20000000L	<font color=#ff7f00>/* Update distances */</font>
<a name=#2163><font color=#ff7f00>/* xxx */</font>
<a name=#2164>#define PU_PANEL	0x80000000L	<font color=#ff7f00>/* Update panel */</font>
<a name=#2165>
<a name=#2166>
<a name=#2167><font color=#ff7f00>/*
<a name=#2168> * Bit flags for the "p_ptr->redraw" variable
<a name=#2169> */</font>
<a name=#2170>#define PR_MISC		0x00000001L	<font color=#ff7f00>/* Display Race/Class */</font>
<a name=#2171>#define PR_TITLE	0x00000002L	<font color=#ff7f00>/* Display Title */</font>
<a name=#2172>#define PR_LEV		0x00000004L	<font color=#ff7f00>/* Display Level */</font>
<a name=#2173>#define PR_EXP		0x00000008L	<font color=#ff7f00>/* Display Experience */</font>
<a name=#2174>#define PR_STATS	0x00000010L	<font color=#ff7f00>/* Display Stats */</font>
<a name=#2175>#define PR_ARMOR	0x00000020L	<font color=#ff7f00>/* Display Armor */</font>
<a name=#2176>#define PR_HP		0x00000040L	<font color=#ff7f00>/* Display Hitpoints */</font>
<a name=#2177>#define PR_MANA		0x00000080L	<font color=#ff7f00>/* Display Mana */</font>
<a name=#2178>#define PR_GOLD		0x00000100L	<font color=#ff7f00>/* Display Gold */</font>
<a name=#2179>#define PR_DEPTH	0x00000200L	<font color=#ff7f00>/* Display Depth */</font>
<a name=#2180>#define PR_SHAPE	0x00000400L	<font color=#ff7f00>/* Display Shape.  -LM- */</font>
<a name=#2181>#define PR_HEALTH	0x00000800L	<font color=#ff7f00>/* Display Health Bar */</font>
<a name=#2182>#define PR_CUT		0x00001000L	<font color=#ff7f00>/* Display Extra (Cut) */</font>
<a name=#2183>#define PR_STUN		0x00002000L	<font color=#ff7f00>/* Display Extra (Stun) */</font>
<a name=#2184>#define PR_HUNGER	0x00004000L	<font color=#ff7f00>/* Display Extra (Hunger) */</font>
<a name=#2185>#define PR_EQUIPPY      0x00008000L     <font color=#ff7f00>/* Display equippy chars */</font>
<a name=#2186>#define PR_BLIND	0x00010000L	<font color=#ff7f00>/* Display Extra (Blind) */</font>
<a name=#2187>#define PR_CONFUSED	0x00020000L	<font color=#ff7f00>/* Display Extra (Confused) */</font>
<a name=#2188>#define PR_AFRAID	0x00040000L	<font color=#ff7f00>/* Display Extra (Afraid) */</font>
<a name=#2189>#define PR_POISONED	0x00080000L	<font color=#ff7f00>/* Display Extra (Poisoned) */</font>
<a name=#2190>#define PR_STATE	0x00100000L	<font color=#ff7f00>/* Display Extra (State) */</font>
<a name=#2191>#define PR_SPEED	0x00200000L	<font color=#ff7f00>/* Display Extra (Speed) */</font>
<a name=#2192>#define PR_STUDY	0x00400000L	<font color=#ff7f00>/* Display Extra (Study) */</font>
<a name=#2193>#define PR_DTRAP        0x00800000L     <font color=#ff7f00>/* Display Extra (DTrap) */</font>
<a name=#2194>#define PR_EXTRA	0x01000000L	<font color=#ff7f00>/* Display Extra Info */</font>
<a name=#2195>#define PR_BASIC	0x02000000L	<font color=#ff7f00>/* Display Basic Info */</font>
<a name=#2196><font color=#ff7f00>/* xxx */</font>
<a name=#2197>#define PR_MAP		0x08000000L	<font color=#ff7f00>/* Display Map */</font>
<a name=#2198>#define PR_WIPE         0x10000000L     <font color=#ff7f00>/* Hack -- Total Redraw */</font>
<a name=#2199><font color=#ff7f00>/* xxx (many) */</font>
<a name=#2200>#define PR_STATUS	0x80000000L <font color=#ff7f00>/* Display extra status messages */</font>
<a name=#2201>
<a name=#2202><font color=#ff7f00>/*
<a name=#2203> * Bit flags for the "p_ptr->window" variable (etc)
<a name=#2204> */</font>
<a name=#2205>#define PW_INVEN	0x00000001L	<font color=#ff7f00>/* Display inven/equip */</font>
<a name=#2206>#define PW_EQUIP	0x00000002L	<font color=#ff7f00>/* Display equip/inven */</font>
<a name=#2207>#define PW_PLAYER_0	0x00000004L	<font color=#ff7f00>/* Display player (basic) */</font>
<a name=#2208>#define PW_PLAYER_1	0x00000008L	<font color=#ff7f00>/* Display player (extra) */</font>
<a name=#2209>#define PW_SPELL        0x00000010L     <font color=#ff7f00>/* Display spell list */</font>
<a name=#2210><font color=#ff7f00>/* xxx */</font>
<a name=#2211><font color=#ff7f00>/* xxx */</font>
<a name=#2212>#define PW_MESSAGE	0x00000040L	<font color=#ff7f00>/* Display messages */</font>
<a name=#2213>#define PW_OVERHEAD	0x00000080L	<font color=#ff7f00>/* Display overhead view */</font>
<a name=#2214>#define PW_MONSTER	0x00000100L	<font color=#ff7f00>/* Display monster recall */</font>
<a name=#2215>#define PW_OBJECT	0x00000200L	<font color=#ff7f00>/* Display object recall */</font>
<a name=#2216>#define PW_DUNGEON      0x00000400L     <font color=#ff7f00>/* Display dungeon view */</font>
<a name=#2217>#define PW_SNAPSHOT	0x00000800L	<font color=#ff7f00>/* Display snap-shot */</font>
<a name=#2218><font color=#ff7f00>/* xxx */</font>
<a name=#2219><font color=#ff7f00>/* xxx */</font>
<a name=#2220>#define PW_BORG_1	0x00004000L	<font color=#ff7f00>/* Display borg messages */</font>
<a name=#2221>#define PW_BORG_2	0x00008000L	<font color=#ff7f00>/* Display borg status */</font>
<a name=#2222>
<a name=#2223>
<a name=#2224><font color=#ff7f00>/*
<a name=#2225> * Bit flags for the "p_ptr->special_attack" variable. -LM-
<a name=#2226> *
<a name=#2227> * Note:  The elemental and poison attacks should be managed using the 
<a name=#2228> * function "set_ele_attack", in spell2.c.  This provides for timeouts and
<a name=#2229> * prevents the player from getting more than one at a time.
<a name=#2230> */</font>
<a name=#2231>#define ATTACK_NORMAL           0x00000000
<a name=#2232>#define ATTACK_CONFUSE		0x00000001
<a name=#2233>#define ATTACK_BLKBRTH		0x00000002
<a name=#2234>#define ATTACK_FLEE		0x00000004
<a name=#2235>#define ATTACK_SUPERSHOT	0x00000008
<a name=#2236>#define ATTACK_ACID		0x00000010
<a name=#2237>#define ATTACK_ELEC		0x00000020
<a name=#2238>#define ATTACK_FIRE		0x00000040
<a name=#2239>#define ATTACK_COLD		0x00000080
<a name=#2240>#define ATTACK_POIS		0x00000100
<a name=#2241>#define ATTACK_HOLY		0x00000200
<a name=#2242>
<a name=#2243>#define ATTACK_DRUID_CONFU	0x00010000
<a name=#2244>
<a name=#2245><font color=#ff7f00>/* Special attack states that may be displayed on screen */</font>
<a name=#2246>#define ATTACK_NOTICE		0x000003ff
<a name=#2247>
<a name=#2248><font color=#ff7f00>/*
<a name=#2249> * Values for shapechanges.  From Sangband.
<a name=#2250> */</font>
<a name=#2251>#define SHAPE_NORMAL 0			<font color=#ff7f00>/* Unaltered form. */</font>
<a name=#2252>#define SHAPE_MOUSE 1
<a name=#2253>#define SHAPE_FERRET 2
<a name=#2254>#define SHAPE_HOUND 3
<a name=#2255>#define SHAPE_GAZELLE 4
<a name=#2256>#define SHAPE_LION 5
<a name=#2257>#define SHAPE_ENT 6
<a name=#2258>#define SHAPE_BAT 7
<a name=#2259>#define SHAPE_WEREWOLF 8
<a name=#2260>#define SHAPE_VAMPIRE 9
<a name=#2261>#define SHAPE_WYRM 10
<a name=#2262>#define SHAPE_BEAR 11
<a name=#2263>
<a name=#2264>#define SCHANGE \
<a name=#2265>    (p_ptr->schange > 0 && p_ptr->schange < 12)
<a name=#2266>
<a name=#2267>
<a name=#2268><font color=#ff7f00>/*** Cave flags ***/</font>
<a name=#2269>
<a name=#2270><font color=#ff7f00>/*
<a name=#2271> * Special cave grid flags
<a name=#2272> */</font>
<a name=#2273>#define CAVE_MARK	0x01 	<font color=#ff7f00>/* memorized feature */</font>
<a name=#2274>#define CAVE_GLOW	0x02 	<font color=#ff7f00>/* self-illuminating */</font>
<a name=#2275>#define CAVE_ICKY	0x04 	<font color=#ff7f00>/* part of a vault */</font>
<a name=#2276>#define CAVE_ROOM	0x08 	<font color=#ff7f00>/* part of a room */</font>
<a name=#2277>#define CAVE_SEEN	0x10 	<font color=#ff7f00>/* seen flag */</font>
<a name=#2278>#define CAVE_VIEW	0x20 	<font color=#ff7f00>/* view flag */</font>
<a name=#2279>#define CAVE_TEMP	0x40 	<font color=#ff7f00>/* temp flag */</font>
<a name=#2280>#define CAVE_WALL	0x80 	<font color=#ff7f00>/* wall flag */</font>
<a name=#2281>
<a name=#2282>
<a name=#2283>
<a name=#2284><font color=#ff7f00>/*** Object flags ***/</font>
<a name=#2285>
<a name=#2286>
<a name=#2287><font color=#ff7f00>/*
<a name=#2288> * Chest trap flags (see "tables.c")
<a name=#2289> */</font>
<a name=#2290>#define CHEST_LOSE_STR		0x0001
<a name=#2291>#define CHEST_LOSE_CON		0x0002
<a name=#2292>#define CHEST_POISON		0x0004
<a name=#2293>#define CHEST_PARALYZE		0x0008
<a name=#2294>#define CHEST_EXPLODE		0x0010
<a name=#2295>#define CHEST_SUMMON		0x0020
<a name=#2296>#define CHEST_SCATTER		0x0040
<a name=#2297>#define CHEST_E_SUMMON		0x0080
<a name=#2298>#define CHEST_BIRD_STORM	0x0100
<a name=#2299>#define CHEST_H_SUMMON		0x0200
<a name=#2300>#define CHEST_RUNES_OF_EVIL	0x0400
<a name=#2301>
<a name=#2302>
<a name=#2303>
<a name=#2304>
<a name=#2305><font color=#ff7f00>/*
<a name=#2306> * Special Object Flags
<a name=#2307> */</font>
<a name=#2308>#define IDENT_SENSE		0x01	<font color=#ff7f00>/* Item has been "sensed" */</font>
<a name=#2309>#define IDENT_FIXED		0x02	<font color=#ff7f00>/* Item has been "haggled" */</font>
<a name=#2310>#define IDENT_EMPTY		0x04	<font color=#ff7f00>/* Item charges are known */</font>
<a name=#2311>#define IDENT_KNOWN		0x08	<font color=#ff7f00>/* Item abilities are known */</font>
<a name=#2312>#define IDENT_RUMOUR	0x10	<font color=#ff7f00>/* Item background is known */</font>
<a name=#2313>#define IDENT_MENTAL	0x20	<font color=#ff7f00>/* Item information is known */</font>
<a name=#2314>#define IDENT_CURSED	0x40	<font color=#ff7f00>/* Item is temporarily cursed */</font>
<a name=#2315>#define IDENT_BROKEN	0x80	<font color=#ff7f00>/* Item is permanently worthless */</font>
<a name=#2316>
<a name=#2317><font color=#ff7f00>/*
<a name=#2318> * Game-generated feelings.  Used for inscriptions.
<a name=#2319> */</font>
<a name=#2320>#define FEEL_NONE              0
<a name=#2321>#define FEEL_BROKEN            1
<a name=#2322>#define FEEL_TERRIBLE          2
<a name=#2323>#define FEEL_WORTHLESS         3
<a name=#2324>#define FEEL_CURSED            4
<a name=#2325>#define FEEL_UNCURSED          5
<a name=#2326>#define FEEL_AVERAGE           6
<a name=#2327>#define FEEL_GOOD              7
<a name=#2328>#define FEEL_EXCELLENT         8
<a name=#2329>#define FEEL_SPECIAL           9
<a name=#2330>#define FEEL_MAX               10
<a name=#2331>
<a name=#2332>
<a name=#2333><font color=#ff7f00>/*
<a name=#2334> * Some bit-flags for the "smart" field
<a name=#2335> *
<a name=#2336> * Most of these map to the "TR2_xxx" flags
<a name=#2337> */</font>
<a name=#2338>#define SM_OPP_ACID		0x00000001
<a name=#2339>#define SM_OPP_ELEC		0x00000002
<a name=#2340>#define SM_OPP_FIRE		0x00000004
<a name=#2341>#define SM_OPP_COLD		0x00000008
<a name=#2342>#define SM_OPP_POIS		0x00000010
<a name=#2343>#define SM_OPP_XXX1		0x00000020
<a name=#2344>#define SM_OPP_XXX2		0x00000040
<a name=#2345>#define SM_OPP_XXX3		0x00000080
<a name=#2346>#define SM_GOOD_SAVE		0x00000100
<a name=#2347>#define SM_PERF_SAVE		0x00000200
<a name=#2348>#define SM_IMM_FREE		0x00000400
<a name=#2349>#define SM_IMM_MANA		0x00000800
<a name=#2350>#define SM_IMM_ACID		0x00001000
<a name=#2351>#define SM_IMM_ELEC		0x00002000
<a name=#2352>#define SM_IMM_FIRE		0x00004000
<a name=#2353>#define SM_IMM_COLD		0x00008000
<a name=#2354>#define SM_RES_ACID		0x00010000
<a name=#2355>#define SM_RES_ELEC		0x00020000
<a name=#2356>#define SM_RES_FIRE		0x00040000
<a name=#2357>#define SM_RES_COLD		0x00080000
<a name=#2358>#define SM_RES_POIS		0x00100000
<a name=#2359>#define SM_RES_FEAR		0x00200000
<a name=#2360>#define SM_RES_LITE		0x00400000
<a name=#2361>#define SM_RES_DARK		0x00800000
<a name=#2362>#define SM_RES_BLIND	0x01000000
<a name=#2363>#define SM_RES_CONFU	0x02000000
<a name=#2364>#define SM_RES_SOUND	0x04000000
<a name=#2365>#define SM_RES_SHARD	0x08000000
<a name=#2366>#define SM_RES_NEXUS	0x10000000
<a name=#2367>#define SM_RES_NETHR	0x20000000
<a name=#2368>#define SM_RES_CHAOS	0x40000000
<a name=#2369>#define SM_RES_DISEN	0x80000000
<a name=#2370>
<a name=#2371>
<a name=#2372><font color=#ff7f00>/* Player race Special flags, used for p-info
<a name=#2373> * -BR-
<a name=#2374> */</font>
<a name=#2375>
<a name=#2376>#define PS_SWORD_SKILL  		0x00000001L
<a name=#2377>#define PS_POLEARM_SKILL       	        0x00000002L
<a name=#2378>#define PS_HAFTED_SKILL  		0x00000004L
<a name=#2379>#define PS_SLING_SKILL  		0x00000008L
<a name=#2380>#define PS_BOW_SKILL  		        0x00000010L
<a name=#2381>#define PS_XBOW_SKILL   		0x00000020L
<a name=#2382>#define PS_XXX1	                	0x00000040L
<a name=#2383>#define PS_XXX2	                	0x00000080L
<a name=#2384>#define PS_XXX3	                	0x00000100L
<a name=#2385>#define PS_SWORD_UNSKILL		0x00000200L
<a name=#2386>#define PS_POLEARM_UNSKILL		0x00000400L
<a name=#2387>#define PS_HAFTED_UNSKILL	        0x00000800L
<a name=#2388>#define PS_SLING_UNSKILL		0x00001000L
<a name=#2389>#define PS_BOW_UNSKILL		        0x00002000L
<a name=#2390>#define PS_XBOW_UNSKILL 		0x00004000L
<a name=#2391>#define PS_XXX4	                	0x00008000L
<a name=#2392>#define PS_XXX5	                	0x00010000L
<a name=#2393>#define PS_XXX6	                	0x00020000L
<a name=#2394>#define PS_HARDY	              	0x00040000L
<a name=#2395>#define PS_HUNGRY	              	0x00080000L
<a name=#2396>#define PS_DIVINE	              	0x00100000L
<a name=#2397>#define PS_SHADOW	              	0x00200000L
<a name=#2398>#define PS_WOODEN	              	0x00400000L
<a name=#2399>#define PS_BEARSKIN                    	0x00800000L
<a name=#2400>#define PS_XXX8                       	0x01000000L
<a name=#2401>#define PS_XXX9	                	0x03000000L
<a name=#2402>#define PS_XX10	                	0x04000000L
<a name=#2403>#define PS_XX11	                	0x08000000L
<a name=#2404>#define PS_XX12	                	0x10000000L
<a name=#2405>#define PS_XX13	                	0x30000000L
<a name=#2406>#define PS_XX14	                	0x40000000L
<a name=#2407>#define PS_XX15	                	0x80000000L
<a name=#2408>
<a name=#2409><font color=#ff7f00>/*   
<a name=#2410> * As of 2.7.8, the "object flags" are valid for all objects, and as
<a name=#2411> * of 2.7.9, these flags are not actually stored with the object, but
<a name=#2412> * rather in the object_kind, ego_item, and artifact structures.
<a name=#2413> *
<a name=#2414> * Note that "flags1" contains all flags dependant on "pval" (including
<a name=#2415> * stat bonuses, but NOT stat sustainers), plus all "extra attack damage"
<a name=#2416> * flags (SLAY_XXX and BRAND_XXX).
<a name=#2417> *
<a name=#2418> * Note that "flags2" contains all "resistances" (including "sustain" flags,
<a name=#2419> * immunity flags, and resistance flags).  Note that "free action" and "hold
<a name=#2420> * life" are no longer considered to be "immunities".
<a name=#2421> *
<a name=#2422> * Note that "flags3" contains everything else (including eight good flags,
<a name=#2423> * seven unused flags, four bad flags, four damage ignoring flags, six weird
<a name=#2424> * flags, and three cursed flags).
<a name=#2425> */</font>
<a name=#2426>
<a name=#2427>
<a name=#2428>#define TR1_STR				0x00000001L	<font color=#ff7f00>/* STR += "pval" */</font>
<a name=#2429>#define TR1_INT				0x00000002L	<font color=#ff7f00>/* INT += "pval" */</font>
<a name=#2430>#define TR1_WIS				0x00000004L	<font color=#ff7f00>/* WIS += "pval" */</font>
<a name=#2431>#define TR1_DEX				0x00000008L	<font color=#ff7f00>/* DEX += "pval" */</font>
<a name=#2432>#define TR1_CON				0x00000010L	<font color=#ff7f00>/* CON += "pval" */</font>
<a name=#2433>#define TR1_CHR				0x00000020L	<font color=#ff7f00>/* CHR += "pval" */</font>
<a name=#2434>#define TR1_XXX1				0x00000040L	<font color=#ff7f00>/* (reserved) */</font>
<a name=#2435>#define TR1_MAGIC_MASTERY		0x00000080L	<font color=#ff7f00>/* Magic Use += 10 * "pval" -LM- */</font>
<a name=#2436>#define TR1_STEALTH			0x00000100L	<font color=#ff7f00>/* Stealth += "pval" */</font>
<a name=#2437>#define TR1_SEARCH			0x00000200L	<font color=#ff7f00>/* Search += "pval" */</font>
<a name=#2438>#define TR1_INFRA			0x00000400L	<font color=#ff7f00>/* Infra += "pval" */</font>
<a name=#2439>#define TR1_TUNNEL			0x00000800L	<font color=#ff7f00>/* Tunnel += "pval" */</font>
<a name=#2440>#define TR1_SPEED			0x00001000L	<font color=#ff7f00>/* Speed += "pval" */</font>
<a name=#2441>#define TR1_MIGHT2		0x00002000L <font color=#ff7f00>/* Might + 2. Was extra blows. -LM- */</font>
<a name=#2442>#define TR1_SHOTS			0x00004000L	<font color=#ff7f00>/* Extra shot. */</font>
<a name=#2443>#define TR1_MIGHT1		0x00008000L	<font color=#ff7f00>/* Might + 1. */</font>
<a name=#2444>#define TR1_SLAY_ANIMAL		0x00010000L	<font color=#ff7f00>/* Weapon slays animals */</font>
<a name=#2445>#define TR1_SLAY_EVIL		0x00020000L	<font color=#ff7f00>/* Weapon slays evil */</font>
<a name=#2446>#define TR1_SLAY_UNDEAD		0x00040000L	<font color=#ff7f00>/* Weapon slays undead */</font>
<a name=#2447>#define TR1_SLAY_DEMON		0x00080000L	<font color=#ff7f00>/* Weapon slays demon */</font>
<a name=#2448>#define TR1_SLAY_ORC		0x00100000L	<font color=#ff7f00>/* Weapon slays orc */</font>
<a name=#2449>#define TR1_SLAY_TROLL		0x00200000L	<font color=#ff7f00>/* Weapon slays troll */</font>
<a name=#2450>#define TR1_SLAY_GIANT		0x00400000L	<font color=#ff7f00>/* Weapon slays giant */</font>
<a name=#2451>#define TR1_SLAY_DRAGON		0x00800000L	<font color=#ff7f00>/* Weapon slays dragon */</font>
<a name=#2452>#define TR1_SLAY_KILL		0x02000000L <font color=#ff7f00>/* Weapon has strong slays -BR- */</font>
<a name=#2453>#define TR1_THROWING		0x02000000L <font color=#ff7f00>/* Weapon can be thrown. -LM- */</font>
<a name=#2454>#define TR1_PERFECT_BALANCE	0x04000000L <font color=#ff7f00>/* Weapon is perfectly balanced. -LM- */</font>
<a name=#2455>#define TR1_BRAND_POIS		0x08000000L <font color=#ff7f00>/* Weapon has poison brand */</font>
<a name=#2456>#define TR1_BRAND_ACID		0x10000000L	<font color=#ff7f00>/* Weapon has acid brand */</font>
<a name=#2457>#define TR1_BRAND_ELEC		0x20000000L	<font color=#ff7f00>/* Weapon has elec brand */</font>
<a name=#2458>#define TR1_BRAND_FIRE		0x40000000L	<font color=#ff7f00>/* Weapon has fire brand */</font>
<a name=#2459>#define TR1_BRAND_COLD		0x80000000L	<font color=#ff7f00>/* Weapon has cold brand */</font>
<a name=#2460>
<a name=#2461>#define TR2_SUST_STR		0x00000001L	<font color=#ff7f00>/* Sustain STR */</font>
<a name=#2462>#define TR2_SUST_INT		0x00000002L	<font color=#ff7f00>/* Sustain INT */</font>
<a name=#2463>#define TR2_SUST_WIS		0x00000004L	<font color=#ff7f00>/* Sustain WIS */</font>
<a name=#2464>#define TR2_SUST_DEX		0x00000008L	<font color=#ff7f00>/* Sustain DEX */</font>
<a name=#2465>#define TR2_SUST_CON		0x00000010L	<font color=#ff7f00>/* Sustain CON */</font>
<a name=#2466>#define TR2_SUST_CHR		0x00000020L	<font color=#ff7f00>/* Sustain CHR */</font>
<a name=#2467>#define TR2_XXX1			0x00000040L	<font color=#ff7f00>/* (reserved) */</font>
<a name=#2468>#define TR2_XXX2			0x00000080L	<font color=#ff7f00>/* (reserved) */</font>
<a name=#2469>#define TR2_XXX3			0x00001000L	<font color=#ff7f00>/* (reserved) */</font>
<a name=#2470>#define TR2_XXX4			0x00002000L	<font color=#ff7f00>/* (reserved) */</font>
<a name=#2471>#define TR2_XXX5			0x00004000L	<font color=#ff7f00>/* (reserved) */</font>
<a name=#2472>#define TR2_XXX6		 	0x00008000L	<font color=#ff7f00>/* (reserved) */</font>
<a name=#2473>#define TR2_IM_ACID			0x00001000L	<font color=#ff7f00>/* Immunity to acid */</font>
<a name=#2474>#define TR2_IM_ELEC			0x00002000L	<font color=#ff7f00>/* Immunity to elec */</font>
<a name=#2475>#define TR2_IM_FIRE			0x00004000L	<font color=#ff7f00>/* Immunity to fire */</font>
<a name=#2476>#define TR2_IM_COLD			0x00008000L	<font color=#ff7f00>/* Immunity to cold */</font>
<a name=#2477>#define TR2_RES_ACID		0x00010000L	<font color=#ff7f00>/* Resist acid */</font>
<a name=#2478>#define TR2_RES_ELEC		0x00020000L	<font color=#ff7f00>/* Resist elec */</font>
<a name=#2479>#define TR2_RES_FIRE		0x00040000L	<font color=#ff7f00>/* Resist fire */</font>
<a name=#2480>#define TR2_RES_COLD		0x00080000L	<font color=#ff7f00>/* Resist cold */</font>
<a name=#2481>#define TR2_RES_POIS		0x00100000L	<font color=#ff7f00>/* Resist poison */</font>
<a name=#2482>#define TR2_RES_FEAR		0x00200000L <font color=#ff7f00>/* Resist fear */</font>
<a name=#2483>#define TR2_RES_LITE		0x00400000L	<font color=#ff7f00>/* Resist lite */</font>
<a name=#2484>#define TR2_RES_DARK		0x00800000L	<font color=#ff7f00>/* Resist dark */</font>
<a name=#2485>#define TR2_RES_BLIND		0x01000000L	<font color=#ff7f00>/* Resist blind */</font>
<a name=#2486>#define TR2_RES_CONFU		0x02000000L	<font color=#ff7f00>/* Resist confusion */</font>
<a name=#2487>#define TR2_RES_SOUND		0x04000000L	<font color=#ff7f00>/* Resist sound */</font>
<a name=#2488>#define TR2_RES_SHARD		0x08000000L	<font color=#ff7f00>/* Resist shards */</font>
<a name=#2489>#define TR2_RES_NEXUS		0x10000000L	<font color=#ff7f00>/* Resist nexus */</font>
<a name=#2490>#define TR2_RES_NETHR		0x20000000L	<font color=#ff7f00>/* Resist nether */</font>
<a name=#2491>#define TR2_RES_CHAOS		0x40000000L	<font color=#ff7f00>/* Resist chaos */</font>
<a name=#2492>#define TR2_RES_DISEN		0x80000000L	<font color=#ff7f00>/* Resist disenchant */</font>
<a name=#2493>
<a name=#2494>#define TR3_SLOW_DIGEST		0x00000001L	<font color=#ff7f00>/* Slow digest */</font>
<a name=#2495>#define TR3_FEATHER	 	0x00000002L	<font color=#ff7f00>/* Feather Falling */</font>
<a name=#2496>#define TR3_LITE			0x00000004L	<font color=#ff7f00>/* Perma-Light */</font>
<a name=#2497>#define TR3_REGEN			0x00000008L	<font color=#ff7f00>/* Regeneration */</font>
<a name=#2498>#define TR3_TELEPATHY		0x00000010L	<font color=#ff7f00>/* Telepathy */</font>
<a name=#2499>#define TR3_SEE_INVIS		0x00000020L	<font color=#ff7f00>/* See Invis */</font>
<a name=#2500>#define TR3_FREE_ACT		0x00000040L	<font color=#ff7f00>/* Free action */</font>
<a name=#2501>#define TR3_HOLD_LIFE		0x00000080L	<font color=#ff7f00>/* Hold life */</font>
<a name=#2502>#define TR3_XXX1			0x00000100L
<a name=#2503>#define TR3_XXX2			0x00000200L
<a name=#2504>#define TR3_XXX3			0x00000400L
<a name=#2505>#define TR3_XXX4			0x00000800L 
<a name=#2506>#define TR3_IMPACT			0x00001000L	<font color=#ff7f00>/* Earthquake blows */</font>
<a name=#2507>#define TR3_TELEPORT		0x00002000L	<font color=#ff7f00>/* Random teleportation */</font>
<a name=#2508>#define TR3_AGGRAVATE		0x00004000L	<font color=#ff7f00>/* Aggravate monsters */</font>
<a name=#2509>#define TR3_DRAIN_EXP		0x00008000L	<font color=#ff7f00>/* Experience drain */</font>
<a name=#2510>#define TR3_IGNORE_ACID		0x00010000L	<font color=#ff7f00>/* Item ignores Acid Damage */</font>
<a name=#2511>#define TR3_IGNORE_ELEC		0x00020000L	<font color=#ff7f00>/* Item ignores Elec Damage */</font>
<a name=#2512>#define TR3_IGNORE_FIRE		0x00040000L	<font color=#ff7f00>/* Item ignores Fire Damage */</font>
<a name=#2513>#define TR3_IGNORE_COLD		0x00080000L	<font color=#ff7f00>/* Item ignores Cold Damage */</font>
<a name=#2514>#define TR3_TWO_HANDED_REQ		0x00100000L
<a name=#2515>	<font color=#ff7f00>/* Weapon can only be used effectively two-handed. -LM- */</font>
<a name=#2516>#define TR3_TWO_HANDED_DES		0x00200000L
<a name=#2517>	<font color=#ff7f00>/* Only very strong players can wield this weapon one-handed. -LM- */</font>
<a name=#2518>#define TR3_BLESSED			0x00400000L	<font color=#ff7f00>/* Item has been blessed */</font>
<a name=#2519>#define TR3_ACTIVATE		0x00800000L	<font color=#ff7f00>/* Item can be activated */</font>
<a name=#2520>#define TR3_INSTA_ART		0x01000000L	<font color=#ff7f00>/* Item makes an artifact */</font>
<a name=#2521>#define TR3_EASY_KNOW		0x02000000L	<font color=#ff7f00>/* Item is known if aware */</font>
<a name=#2522>#define TR3_HIDE_TYPE		0x04000000L	<font color=#ff7f00>/* Item hides description */</font>
<a name=#2523>#define TR3_SHOW_MODS		0x08000000L	<font color=#ff7f00>/* Item shows Tohit/Todam */</font>
<a name=#2524>#define TR3_XXX7			0x10000000L	<font color=#ff7f00>/* (reserved) */</font>
<a name=#2525>#define TR3_LIGHT_CURSE		0x20000000L	<font color=#ff7f00>/* Item has Light Curse */</font>
<a name=#2526>#define TR3_HEAVY_CURSE		0x40000000L	<font color=#ff7f00>/* Item has Heavy Curse */</font>
<a name=#2527>#define TR3_PERMA_CURSE		0x80000000L	<font color=#ff7f00>/* Item has Perma Curse */</font>
<a name=#2528>
<a name=#2529>
<a name=#2530><font color=#ff7f00>/*
<a name=#2531> * Hack -- flag set 1 -- mask for "pval-dependant" flags.
<a name=#2532> * Note that all "pval" dependant flags must be in "flags1".
<a name=#2533> */</font>
<a name=#2534>#define TR1_PVAL_MASK	\
<a name=#2535>        (TR1_STR | TR1_INT | TR1_WIS | TR1_DEX | \
<a name=#2536>         TR1_CON | TR1_CHR | TR1_XXX1 | TR1_MAGIC_MASTERY | \
<a name=#2537>         TR1_STEALTH | TR1_SEARCH | TR1_INFRA | TR1_TUNNEL | \
<a name=#2538>         TR1_SPEED)
<a name=#2539>
<a name=#2540>
<a name=#2541><font color=#ff7f00>/*
<a name=#2542> * Hack -- special "xtra" object flag info (type)
<a name=#2543> */</font>
<a name=#2544>#define OBJECT_XTRA_TYPE_SUSTAIN		1
<a name=#2545>#define OBJECT_XTRA_TYPE_RESIST		2
<a name=#2546>#define OBJECT_XTRA_TYPE_POWER		3
<a name=#2547>#define OBJECT_XTRA_TYPE_BALANCE		4
<a name=#2548>
<a name=#2549><font color=#ff7f00>/* Expansion to handle all activations. -LM- */</font>
<a name=#2550>#define OBJECT_XTRA_TYPE_ACTIVATION		255
<a name=#2551>
<a name=#2552>
<a name=#2553>
<a name=#2554><font color=#ff7f00>/*
<a name=#2555> * Hack -- special "xtra" object flag info (what flag set)
<a name=#2556> */</font>
<a name=#2557>#define OBJECT_XTRA_WHAT_SUSTAIN		2
<a name=#2558>#define OBJECT_XTRA_WHAT_RESIST		2
<a name=#2559>#define OBJECT_XTRA_WHAT_POWER		3
<a name=#2560>#define OBJECT_XTRA_WHAT_BALANCE		1
<a name=#2561>
<a name=#2562><font color=#ff7f00>/*
<a name=#2563> * Hack -- special "xtra" object flag info (base flag value)
<a name=#2564> */</font>
<a name=#2565>#define OBJECT_XTRA_BASE_SUSTAIN		TR2_SUST_STR
<a name=#2566>#define OBJECT_XTRA_BASE_RESIST		TR2_RES_POIS
<a name=#2567>#define OBJECT_XTRA_BASE_POWER		TR3_SLOW_DIGEST
<a name=#2568>#define OBJECT_XTRA_BASE_BALANCE		TR1_PERFECT_BALANCE
<a name=#2569>
<a name=#2570><font color=#ff7f00>/*
<a name=#2571> * Hack -- special "xtra" object flag info (number of flags)
<a name=#2572> */</font>
<a name=#2573>#define OBJECT_XTRA_SIZE_SUSTAIN	6
<a name=#2574>#define OBJECT_XTRA_SIZE_RESIST		12
<a name=#2575>#define OBJECT_XTRA_SIZE_POWER		8
<a name=#2576>#define OBJECT_XTRA_SIZE_BALANCE		1
<a name=#2577>
<a name=#2578>
<a name=#2579>
<a name=#2580><font color=#ff7f00>/*** Monster flags ***/</font>
<a name=#2581>
<a name=#2582>
<a name=#2583><font color=#ff7f00>/*
<a name=#2584> * Special Monster Flags (all temporary)
<a name=#2585> */</font>
<a name=#2586>#define MFLAG_VIEW	0x01	<font color=#ff7f00>/* Monster is in line of sight */</font>
<a name=#2587>#define MFLAG_XXX1	0x02	<font color=#ff7f00>/*  */</font>
<a name=#2588>#define MFLAG_XXX2	0x04	<font color=#ff7f00>/*  */</font>
<a name=#2589>#define MFLAG_ACTV	0x08	<font color=#ff7f00>/* Monster is in active mode */</font>
<a name=#2590>#define MFLAG_WARY	0x10	<font color=#ff7f00>/* Monster is wary of traps */</font>
<a name=#2591>#define MFLAG_XXX5	0x20	<font color=#ff7f00>/*  */</font>
<a name=#2592>#define MFLAG_SHOW	0x40	<font color=#ff7f00>/* Monster is recently memorized */</font>
<a name=#2593>#define MFLAG_MARK	0x80	<font color=#ff7f00>/* Monster is currently memorized */</font>
<a name=#2594>
<a name=#2595><font color=#ff7f00>/*
<a name=#2596> * New monster race bit flags
<a name=#2597> */</font>
<a name=#2598>#define RF1_UNIQUE			0x00000001	<font color=#ff7f00>/* Unique Monster */</font>
<a name=#2599>#define RF1_QUESTOR			0x00000002	<font color=#ff7f00>/* Quest Monster */</font>
<a name=#2600>#define RF1_MALE			0x00000004	<font color=#ff7f00>/* Male gender */</font>
<a name=#2601>#define RF1_FEMALE			0x00000008	<font color=#ff7f00>/* Female gender */</font>
<a name=#2602>#define RF1_CHAR_CLEAR		0x00000010	<font color=#ff7f00>/* Absorbs symbol */</font>
<a name=#2603>#define RF1_CHAR_MULTI		0x00000020	<font color=#ff7f00>/* Changes symbol */</font>
<a name=#2604>#define RF1_ATTR_CLEAR		0x00000040	<font color=#ff7f00>/* Absorbs color */</font>
<a name=#2605>#define RF1_ATTR_MULTI		0x00000080	<font color=#ff7f00>/* Changes color */</font>
<a name=#2606>#define RF1_FORCE_DEPTH		0x00000100	<font color=#ff7f00>/* Start at "correct" depth */</font>
<a name=#2607>#define RF1_FORCE_MAXHP		0x00000200	<font color=#ff7f00>/* Start with max hitpoints */</font>
<a name=#2608>#define RF1_FORCE_SLEEP		0x00000400	<font color=#ff7f00>/* Start out sleeping */</font>
<a name=#2609>#define RF1_FORCE_EXTRA		0x00000800	<font color=#ff7f00>/* Start out something */</font>
<a name=#2610>#define RF1_FRIEND			0x00001000	<font color=#ff7f00>/* Arrive with a friend */</font>
<a name=#2611>#define RF1_FRIENDS			0x00002000	<font color=#ff7f00>/* Arrive with some friends */</font>
<a name=#2612>#define RF1_ESCORT			0x00004000	<font color=#ff7f00>/* Arrive with an escort */</font>
<a name=#2613>#define RF1_ESCORTS			0x00008000	<font color=#ff7f00>/* Arrive with some escorts */</font>
<a name=#2614>#define RF1_NEVER_BLOW		0x00010000	<font color=#ff7f00>/* Never make physical blow */</font>
<a name=#2615>#define RF1_NEVER_MOVE		0x00020000	<font color=#ff7f00>/* Never make physical move */</font>
<a name=#2616>#define RF1_RAND_25			0x00040000	<font color=#ff7f00>/* Moves randomly (25%) */</font>
<a name=#2617>#define RF1_RAND_50			0x00080000	<font color=#ff7f00>/* Moves randomly (50%) */</font>
<a name=#2618>#define RF1_ONLY_GOLD		0x00100000	<font color=#ff7f00>/* Drop only gold */</font>
<a name=#2619>#define RF1_ONLY_ITEM		0x00200000	<font color=#ff7f00>/* Drop only items */</font>
<a name=#2620>#define RF1_DROP_60			0x00400000	<font color=#ff7f00>/* Drop an item/gold (60%) */</font>
<a name=#2621>#define RF1_DROP_90			0x00800000	<font color=#ff7f00>/* Drop an item/gold (90%) */</font>
<a name=#2622>#define RF1_DROP_1D2		0x01000000	<font color=#ff7f00>/* Drop 1d2 items/gold */</font>
<a name=#2623>#define RF1_DROP_2D2		0x02000000	<font color=#ff7f00>/* Drop 2d2 items/gold */</font>
<a name=#2624>#define RF1_DROP_3D2		0x04000000	<font color=#ff7f00>/* Drop 3d2 items/gold */</font>
<a name=#2625>#define RF1_DROP_4D2		0x08000000	<font color=#ff7f00>/* Drop 4d2 items/gold */</font>
<a name=#2626>#define RF1_DROP_GOOD		0x10000000	<font color=#ff7f00>/* Drop good items */</font>
<a name=#2627>#define RF1_DROP_GREAT		0x20000000	<font color=#ff7f00>/* Drop great items */</font>
<a name=#2628>#define RF1_DROP_CHEST		0x40000000	<font color=#ff7f00>/* Drop "useful" items */</font>
<a name=#2629>#define RF1_DROP_CHOSEN		0x80000000	<font color=#ff7f00>/* Drop "chosen" items */</font>
<a name=#2630>
<a name=#2631><font color=#ff7f00>/*
<a name=#2632> * New monster race bit flags
<a name=#2633> */</font>
<a name=#2634>#define RF2_STUPID		0x00000001	<font color=#ff7f00>/* Monster is stupid */</font>
<a name=#2635>#define RF2_SMART			0x00000002	<font color=#ff7f00>/* Monster is smart */</font>
<a name=#2636>#define RF2_SPEAKING		0x00000004	<font color=#ff7f00>/* Monster can speak.  From Zangband. */</font>
<a name=#2637>#define RF2_PLAYER_GHOST	0x00000008	<font color=#ff7f00>/* Monster is a player ghost. -LM- */</font>
<a name=#2638>#define RF2_INVISIBLE		0x00000010	<font color=#ff7f00>/* Monster avoids vision */</font>
<a name=#2639>#define RF2_COLD_BLOOD		0x00000020	<font color=#ff7f00>/* Monster avoids infra */</font>
<a name=#2640>#define RF2_EMPTY_MIND		0x00000040	<font color=#ff7f00>/* Monster avoids telepathy */</font>
<a name=#2641>#define RF2_WEIRD_MIND		0x00000080	<font color=#ff7f00>/* Monster partially avoids tlepathy */</font>
<a name=#2642>#define RF2_MULTIPLY		0x00000100	<font color=#ff7f00>/* Monster reproduces */</font>
<a name=#2643>#define RF2_REGENERATE		0x00000200	<font color=#ff7f00>/* Monster regenerates */</font>
<a name=#2644>#define RF2_XXX1			0x00000400	<font color=#ff7f00>/* (?) */</font>
<a name=#2645>#define RF2_XXX2			0x00000800	<font color=#ff7f00>/* (?) */</font>
<a name=#2646>#define RF2_XXX3		0x00001000	<font color=#ff7f00>/* (?) */</font>
<a name=#2647>#define RF2_XXX4			0x00002000	<font color=#ff7f00>/* (?) */</font>
<a name=#2648>#define RF2_XXX5			0x00004000	<font color=#ff7f00>/* (?) */</font>
<a name=#2649>#define RF2_XXX6			0x00008000      <font color=#ff7f00>/* (?) */</font>
<a name=#2650>#define RF2_OPEN_DOOR		0x00010000	        <font color=#ff7f00>/* Monster can open doors */</font>
<a name=#2651>#define RF2_BASH_DOOR		0x00020000	        <font color=#ff7f00>/* Monster can bash doors */</font>
<a name=#2652>#define RF2_PASS_WALL		0x00040000	        <font color=#ff7f00>/* Monster can pass walls */</font>
<a name=#2653>#define RF2_KILL_WALL		0x00080000	        <font color=#ff7f00>/* Monster can destroy walls */</font>
<a name=#2654>#define RF2_MOVE_BODY		0x00100000	        <font color=#ff7f00>/* Monster can move monsters */</font>
<a name=#2655>#define RF2_KILL_BODY		0x00200000	        <font color=#ff7f00>/* Monster can kill monsters */</font>
<a name=#2656>#define RF2_TAKE_ITEM		0x00400000	        <font color=#ff7f00>/* Monster can pick up items */</font>
<a name=#2657>#define RF2_KILL_ITEM		0x00800000	        <font color=#ff7f00>/* Monster can crush items */</font>
<a name=#2658>#define RF2_FLYING		0x01000000              <font color=#ff7f00>/* Monster can fly. */</font>
<a name=#2659>
<a name=#2660>#define RF2_LOW_MANA_RUN	0x02000000  <font color=#ff7f00>/* Runs away/teleports when low on mana */</font>
<a name=#2661>#define RF2_BRAIN_1		0x04000000	<font color=#ff7f00>/*  */</font>
<a name=#2662>#define RF2_POWERFUL		0x08000000	<font color=#ff7f00>/* Breath loses less power with distance */</font>
<a name=#2663>#define RF2_ARCHER		0x10000000	<font color=#ff7f00>/* No 1_IN_X limits on missiles. */</font>
<a name=#2664>#define RF2_MORGUL_MAGIC	0x20000000	<font color=#ff7f00>/* Some spells more necromantic */</font>
<a name=#2665>#define RF2_UDUN_MAGIC		0x40000000	<font color=#ff7f00>/* Some spells more hellish */</font>
<a name=#2666>#define RF2_BRAIN_2		0x80000000	<font color=#ff7f00>/* Magic is ? */</font>
<a name=#2667>
<a name=#2668><font color=#ff7f00>/*
<a name=#2669> * New monster race bit flags
<a name=#2670> */</font>
<a name=#2671>#define RF3_ORC				0x00000001	<font color=#ff7f00>/* Orc */</font>
<a name=#2672>#define RF3_TROLL			0x00000002	<font color=#ff7f00>/* Troll */</font>
<a name=#2673>#define RF3_GIANT			0x00000004	<font color=#ff7f00>/* Giant */</font>
<a name=#2674>#define RF3_DRAGON			0x00000008	<font color=#ff7f00>/* Dragon */</font>
<a name=#2675>#define RF3_DEMON			0x00000010	<font color=#ff7f00>/* Demon */</font>
<a name=#2676>#define RF3_UNDEAD			0x00000020	<font color=#ff7f00>/* Undead */</font>
<a name=#2677>#define RF3_EVIL			0x00000040	<font color=#ff7f00>/* Evil */</font>
<a name=#2678>#define RF3_ANIMAL			0x00000080	<font color=#ff7f00>/* Animal */</font>
<a name=#2679>#define RF3_XXX1			0x00000100	<font color=#ff7f00>/* (?) */</font>
<a name=#2680>#define RF3_XXX2			0x00000200	<font color=#ff7f00>/* (?) */</font>
<a name=#2681>#define RF3_XXX3			0x00000400	<font color=#ff7f00>/* Non-Vocal (?) */</font>
<a name=#2682>#define RF3_XXX4			0x00000800	<font color=#ff7f00>/* Non-Living (?) */</font>
<a name=#2683>#define RF3_HURT_LITE		0x00001000	<font color=#ff7f00>/* Hurt by lite */</font>
<a name=#2684>#define RF3_HURT_ROCK		0x00002000	<font color=#ff7f00>/* Hurt by rock remover */</font>
<a name=#2685>#define RF3_HURT_FIRE		0x00004000	<font color=#ff7f00>/* Hurt badly by fire */</font>
<a name=#2686>#define RF3_HURT_COLD		0x00008000	<font color=#ff7f00>/* Hurt badly by cold */</font>
<a name=#2687>#define RF3_IM_ACID			0x00010000	<font color=#ff7f00>/* Resist acid a lot */</font>
<a name=#2688>#define RF3_IM_ELEC			0x00020000	<font color=#ff7f00>/* Resist elec a lot */</font>
<a name=#2689>#define RF3_IM_FIRE			0x00040000	<font color=#ff7f00>/* Resist fire a lot */</font>
<a name=#2690>#define RF3_IM_COLD			0x00080000	<font color=#ff7f00>/* Resist cold a lot */</font>
<a name=#2691>#define RF3_IM_POIS			0x00100000	<font color=#ff7f00>/* Resist poison a lot */</font>
<a name=#2692>#define RF3_XXX5			0x00200000	<font color=#ff7f00>/* Immune to (?) */</font>
<a name=#2693>#define RF3_RES_NETH		0x00400000	<font color=#ff7f00>/* Resist nether a lot */</font>
<a name=#2694>#define RF3_RES_WATE		0x00800000	<font color=#ff7f00>/* Resist water */</font>
<a name=#2695>#define RF3_RES_PLAS		0x01000000	<font color=#ff7f00>/* Resist plasma */</font>
<a name=#2696>#define RF3_RES_NEXU		0x02000000	<font color=#ff7f00>/* Resist nexus */</font>
<a name=#2697>#define RF3_RES_DISE		0x04000000	<font color=#ff7f00>/* Resist disenchantment */</font>
<a name=#2698>#define RF3_XXX6			0x08000000	
<a name=#2699>#define RF3_NO_FEAR			0x10000000	<font color=#ff7f00>/* Cannot be scared */</font>
<a name=#2700>#define RF3_NO_STUN			0x20000000	<font color=#ff7f00>/* Cannot be stunned */</font>
<a name=#2701>#define RF3_NO_CONF			0x40000000	<font color=#ff7f00>/* Cannot be confused */</font>
<a name=#2702>#define RF3_NO_SLEEP		0x80000000	<font color=#ff7f00>/* Cannot be slept */</font>
<a name=#2703>
<a name=#2704><font color=#ff7f00>/*
<a name=#2705> * Monster racial flags - innate or physical ranged attacks
<a name=#2706> */</font>
<a name=#2707>#define RF4_SHRIEK 		0x00000001	<font color=#ff7f00>/* Shriek for help */</font>
<a name=#2708>#define RF4_LASH   		0x00000002	<font color=#ff7f00>/* Use a melee attack at range 2 or 3 */</font>
<a name=#2709>#define RF4_BOULDER		0x00000004	<font color=#ff7f00>/* Throw a boulder */</font>
<a name=#2710>#define RF4_SHOT   		0x00000008	<font color=#ff7f00>/* Fire sling shot */</font>
<a name=#2711>#define RF4_ARROW  		0x00000010	<font color=#ff7f00>/* Fire arrows */</font>
<a name=#2712>#define RF4_BOLT   		0x00000020	<font color=#ff7f00>/* Fire crossbow quarrels */</font>
<a name=#2713>#define RF4_MISSL  		0x00000040	<font color=#ff7f00>/* Fire other physical missiles */</font>
<a name=#2714>#define RF4_PMISSL 		0x00000080	<font color=#ff7f00>/* Fire poisoned missiles */</font>
<a name=#2715>#define RF4_BRTH_ACID		0x00000100	<font color=#ff7f00>/* Breathe Acid */</font>
<a name=#2716>#define RF4_BRTH_ELEC		0x00000200	<font color=#ff7f00>/* Breathe Elec */</font>
<a name=#2717>#define RF4_BRTH_FIRE		0x00000400	<font color=#ff7f00>/* Breathe Fire */</font>
<a name=#2718>#define RF4_BRTH_COLD		0x00000800	<font color=#ff7f00>/* Breathe Cold */</font>
<a name=#2719>#define RF4_BRTH_POIS		0x00001000	<font color=#ff7f00>/* Breathe Poison */</font>
<a name=#2720>#define RF4_BRTH_PLAS		0x00002000	<font color=#ff7f00>/* Breathe Plasma */</font>
<a name=#2721>#define RF4_BRTH_LITE		0x00004000	<font color=#ff7f00>/* Breathe Light */</font>
<a name=#2722>#define RF4_BRTH_DARK		0x00008000	<font color=#ff7f00>/* Breathe Dark */</font>
<a name=#2723>#define RF4_BRTH_CONFU		0x00010000	<font color=#ff7f00>/* Breathe Confusion */</font>
<a name=#2724>#define RF4_BRTH_SOUND		0x00020000	<font color=#ff7f00>/* Breathe Sound */</font>
<a name=#2725>#define RF4_BRTH_SHARD		0x00040000	<font color=#ff7f00>/* Breathe Shards */</font>
<a name=#2726>#define RF4_BRTH_INER		0x00080000	<font color=#ff7f00>/* Breathe Inertia */</font>
<a name=#2727>#define RF4_BRTH_GRAV		0x00100000	<font color=#ff7f00>/* Breathe Gravity */</font>
<a name=#2728>#define RF4_BRTH_FORCE		0x00200000	<font color=#ff7f00>/* Breathe Force */</font>
<a name=#2729>#define RF4_BRTH_NEXUS		0x00400000	<font color=#ff7f00>/* Breathe Nexus */</font>
<a name=#2730>#define RF4_BRTH_NETHR		0x00800000	<font color=#ff7f00>/* Breathe Nether */</font>
<a name=#2731>#define RF4_BRTH_CHAOS		0x01000000	<font color=#ff7f00>/* Breathe Chaos */</font>
<a name=#2732>#define RF4_BRTH_DISEN		0x02000000	<font color=#ff7f00>/* Breathe Disenchant */</font>
<a name=#2733>#define RF4_BRTH_TIME		0x04000000	<font color=#ff7f00>/* Breathe Time */</font>
<a name=#2734>#define RF4_XXX2			0x08000000	<font color=#ff7f00>/*  */</font>
<a name=#2735>#define RF4_XXX3   		0x10000000	<font color=#ff7f00>/*  */</font>
<a name=#2736>#define RF4_XXX4   		0x20000000	<font color=#ff7f00>/*  */</font>
<a name=#2737>#define RF4_XXX5   		0x40000000	<font color=#ff7f00>/*  */</font>
<a name=#2738>#define RF4_XXX6   		0x80000000	<font color=#ff7f00>/*  */</font>
<a name=#2739>
<a name=#2740><font color=#ff7f00>/*
<a name=#2741> * Monster racial flags - defined-area projection spells
<a name=#2742> */</font>
<a name=#2743>#define RF5_BALL_ACID 			0x00000001	<font color=#ff7f00>/* Acid Ball -> Acid Storm */</font>
<a name=#2744>#define RF5_BALL_ELEC 			0x00000002	<font color=#ff7f00>/* Elec Ball -> Elec Storm */</font>
<a name=#2745>#define RF5_BALL_FIRE 			0x00000004	<font color=#ff7f00>/* Fire Ball -> Fire Storm */</font>
<a name=#2746>#define RF5_BALL_COLD 			0x00000008	<font color=#ff7f00>/* Cold Ball -> Cold Storm */</font>
<a name=#2747>#define RF5_BALL_POIS 			0x00000010	<font color=#ff7f00>/* Stinking Cloud -> Poison Storm */</font>
<a name=#2748>#define RF5_BALL_LITE 			0x00000020	<font color=#ff7f00>/* Light Ball / Starburst */</font>
<a name=#2749>#define RF5_BALL_DARK 			0x00000040	<font color=#ff7f00>/* Darkness Ball -> Dark Storm */</font>
<a name=#2750>#define RF5_BALL_CONFU			0x00000200	<font color=#ff7f00>/* Confusion Ball -> Conf Storm */</font>
<a name=#2751>#define RF5_BALL_SOUND			0x00000080	<font color=#ff7f00>/* Sound Ball -> Sound Storm */</font>
<a name=#2752>#define RF5_BALL_SHARD			0x00000100	<font color=#ff7f00>/* Shard Ball -> Shard Storm */</font>
<a name=#2753>#define RF5_BALL_STORM			0x00000400	<font color=#ff7f00>/* Storm Ball -> Tempest */</font>
<a name=#2754>#define RF5_BALL_NETHR			0x00000800	<font color=#ff7f00>/* Nether Ball -> Nether Storm */</font>
<a name=#2755>#define RF5_BALL_CHAOS			0x00001000	<font color=#ff7f00>/* Chaos Ball -> Chaos Storm */</font>
<a name=#2756>#define RF5_BALL_MANA 			0x00002000	<font color=#ff7f00>/* Mana Ball -> Mana Storm */</font>
<a name=#2757>#define RF5_XXX1	    			0x00004000	<font color=#ff7f00>/*  */</font>
<a name=#2758>#define RF5_XXX2	    			0x00008000	<font color=#ff7f00>/*  */</font>
<a name=#2759>#define RF5_BOLT_ACID 			0x00010000	<font color=#ff7f00>/* Acid Bolt */</font>
<a name=#2760>#define RF5_BOLT_ELEC 			0x00020000	<font color=#ff7f00>/* Elec Bolt */</font>
<a name=#2761>#define RF5_BOLT_FIRE 			0x00040000	<font color=#ff7f00>/* Fire Bolt */</font>
<a name=#2762>#define RF5_BOLT_COLD 			0x00080000	<font color=#ff7f00>/* Cold Bolt */</font>
<a name=#2763>#define RF5_BOLT_POIS 			0x00100000	<font color=#ff7f00>/* Poison Bolt */</font>
<a name=#2764>#define RF5_BOLT_PLAS 			0x00200000	<font color=#ff7f00>/* Plasma Bolt */</font>
<a name=#2765>#define RF5_BOLT_ICE  			0x00400000	<font color=#ff7f00>/* Ice Bolt */</font>
<a name=#2766>#define RF5_BOLT_WATER			0x00800000	<font color=#ff7f00>/* Water Bolt */</font>
<a name=#2767>#define RF5_BOLT_NETHR			0x01000000	<font color=#ff7f00>/* Nether Bolt */</font>
<a name=#2768>#define RF5_BOLT_MANA 			0x02000000	<font color=#ff7f00>/* Magic Missile -> Mana Bolt */</font>
<a name=#2769>#define RF5_XXX3      			0x04000000	<font color=#ff7f00>/*  */</font>
<a name=#2770>#define RF5_BEAM_ELEC 			0x08000000	<font color=#ff7f00>/* Electric spark */</font>
<a name=#2771>#define RF5_BEAM_ICE  			0x10000000	<font color=#ff7f00>/* Ice Lance */</font>
<a name=#2772>#define RF5_BEAM_NETHR			0x20000000	<font color=#ff7f00>/* Spear of Nether */</font>
<a name=#2773>#define RF5_ARC__HFIRE			0x40000000	<font color=#ff7f00>/* Arc/Column of hellfire */</font>
<a name=#2774>#define RF5_ARC__FORCE			0x80000000	<font color=#ff7f00>/* Arc of force */</font>
<a name=#2775>
<a name=#2776><font color=#ff7f00>/*
<a name=#2777> * Monster racial flags - help self, hinder character, and special magics
<a name=#2778> */</font>
<a name=#2779>#define RF6_HASTE			0x00000001	<font color=#ff7f00>/* Speed self */</font>
<a name=#2780>#define RF6_ADD_MANA		0x00000002  <font color=#ff7f00>/* Regain Mana */</font>
<a name=#2781>#define RF6_HEAL			0x00000004	<font color=#ff7f00>/* Heal self */</font>
<a name=#2782>#define RF6_CURE			0x00000008	<font color=#ff7f00>/* Cure self */</font>
<a name=#2783>#define RF6_BLINK			0x00000010	<font color=#ff7f00>/* Teleport Short */</font>
<a name=#2784>#define RF6_TPORT			0x00000020	<font color=#ff7f00>/* Teleport Long */</font>
<a name=#2785>#define RF6_XXX1			0x00000040	<font color=#ff7f00>/*  */</font>
<a name=#2786>#define RF6_TELE_SELF_TO       		0x00000080	<font color=#ff7f00>/*  */</font>
<a name=#2787>#define RF6_TELE_TO		0x00000100	<font color=#ff7f00>/* Move player to monster */</font>
<a name=#2788>#define RF6_TELE_AWAY		0x00000200	<font color=#ff7f00>/* Move player far away */</font>
<a name=#2789>#define RF6_TELE_LEVEL		0x00000400	<font color=#ff7f00>/* Move player vertically */</font>
<a name=#2790>#define RF6_XXX3			0x00000800	<font color=#ff7f00>/*  */</font>
<a name=#2791>#define RF6_DARKNESS		0x00001000	<font color=#ff7f00>/* Create Darkness */</font>
<a name=#2792>#define RF6_TRAPS			0x00002000	<font color=#ff7f00>/* Create Traps */</font>
<a name=#2793>#define RF6_FORGET		0x00004000	<font color=#ff7f00>/* Cause amnesia */</font>
<a name=#2794>#define RF6_DRAIN_MANA		0x00008000	<font color=#ff7f00>/* Drain Mana */</font>
<a name=#2795>#define RF6_DISPEL		0x00010000	<font color=#ff7f00>/* Dispel Magic */</font>
<a name=#2796>#define RF6_XXX5			0x00020000	<font color=#ff7f00>/*  */</font>
<a name=#2797>#define RF6_MIND_BLAST		0x00040000	<font color=#ff7f00>/* Blast Mind */</font>
<a name=#2798>#define RF6_BRAIN_SMASH		0x00080000	<font color=#ff7f00>/* Smash Brain */</font>
<a name=#2799>#define RF6_WOUND			0x00100000	<font color=#ff7f00>/* Cause Wounds */</font>
<a name=#2800>#define RF6_XXX6			0x00200000	<font color=#ff7f00>/*  */</font>
<a name=#2801>#define RF6_XXX7			0x00400000	<font color=#ff7f00>/*  */</font>
<a name=#2802>#define RF6_XXX8			0x00800000	<font color=#ff7f00>/*  */</font>
<a name=#2803>#define RF6_XX9			0x01000000	<font color=#ff7f00>/*  */</font>
<a name=#2804>#define RF6_HUNGER		0x02000000	<font color=#ff7f00>/* Make Player Hungry */</font>
<a name=#2805>#define RF6_XX11			0x04000000	<font color=#ff7f00>/*  */</font>
<a name=#2806>#define RF6_SCARE			0x08000000	<font color=#ff7f00>/* Frighten Player */</font>
<a name=#2807>#define RF6_BLIND			0x10000000	<font color=#ff7f00>/* Blind Player */</font>
<a name=#2808>#define RF6_CONF			0x20000000	<font color=#ff7f00>/* Confuse Player */</font>
<a name=#2809>#define RF6_SLOW			0x40000000	<font color=#ff7f00>/* Slow Player */</font>
<a name=#2810>#define RF6_HOLD			0x80000000	<font color=#ff7f00>/* Paralyze Player */</font>
<a name=#2811>
<a name=#2812>
<a name=#2813><font color=#ff7f00>/*
<a name=#2814> * Monster racial flags - summons
<a name=#2815> */</font>
<a name=#2816>#define RF7_S_KIN			0x00000001	<font color=#ff7f00>/* Summon Similar */</font>
<a name=#2817>#define RF7_XXX1			0x00000002	<font color=#ff7f00>/*  */</font>
<a name=#2818>#define RF7_XXX2			0x00000004	<font color=#ff7f00>/*  */</font>
<a name=#2819>#define RF7_S_MONSTER		0x00000008	<font color=#ff7f00>/* Summon Monster */</font>
<a name=#2820>#define RF7_S_MONSTERS		0x00000010	<font color=#ff7f00>/* Summon Monsters */</font>
<a name=#2821>#define RF7_XXX3			0x00000020	<font color=#ff7f00>/*  */</font>
<a name=#2822>#define RF7_XXX4			0x00000040	<font color=#ff7f00>/*  */</font>
<a name=#2823>#define RF7_XXX5			0x00000080	<font color=#ff7f00>/*  */</font>
<a name=#2824>#define RF7_S_ANT			0x00000100	<font color=#ff7f00>/* Summon Ants */</font>
<a name=#2825>#define RF7_S_SPIDER		0x00000200	<font color=#ff7f00>/* Summon Spiders */</font>
<a name=#2826>#define RF7_S_HOUND		0x00000400	<font color=#ff7f00>/* Summon Hounds */</font>
<a name=#2827>#define RF7_S_ANIMAL		0x00000800	<font color=#ff7f00>/* Summon Animals */</font>
<a name=#2828>#define RF7_XXX6			0x00001000	<font color=#ff7f00>/*  */</font>
<a name=#2829>#define RF7_XXX7			0x00002000	<font color=#ff7f00>/*  */</font>
<a name=#2830>#define RF7_S_THIEF		0x00004000	<font color=#ff7f00>/* Summon Thieves */</font>
<a name=#2831>#define RF7_S_BERTBILLTOM	0x00008000	<font color=#ff7f00>/* Summon Bert, Bill, and Tom */</font>
<a name=#2832>#define RF7_XXX8			0x00010000	<font color=#ff7f00>/*  */</font>
<a name=#2833>#define RF7_XXX9			0x00020000	<font color=#ff7f00>/*  */</font>
<a name=#2834>#define RF7_XX10			0x00040000	<font color=#ff7f00>/*  */</font>
<a name=#2835>#define RF7_XX11			0x00080000	<font color=#ff7f00>/*  */</font>
<a name=#2836>#define RF7_S_DRAGON		0x00100000	<font color=#ff7f00>/* Summon Dragon */</font>
<a name=#2837>#define RF7_S_HI_DRAGON		0x00200000	<font color=#ff7f00>/* Summon Ancient Dragons */</font>
<a name=#2838>#define RF7_XX12			0x00400000	<font color=#ff7f00>/*  */</font>
<a name=#2839>#define RF7_XX13			0x00800000	<font color=#ff7f00>/*  */</font>
<a name=#2840>#define RF7_S_DEMON		0x01000000	<font color=#ff7f00>/* Summon Demon(s) */</font>
<a name=#2841>#define RF7_S_HI_DEMON		0x02000000	<font color=#ff7f00>/* Summon Greater Demons */</font>
<a name=#2842>#define RF7_XX14			0x04000000	<font color=#ff7f00>/*  */</font>
<a name=#2843>#define RF7_XX15			0x08000000	<font color=#ff7f00>/*  */</font>
<a name=#2844>#define RF7_S_UNDEAD		0x10000000	<font color=#ff7f00>/* Summon Undead */</font>
<a name=#2845>#define RF7_S_HI_UNDEAD		0x20000000	<font color=#ff7f00>/* Summon Greater Undead */</font>
<a name=#2846>#define RF7_S_WRAITH		0x40000000	<font color=#ff7f00>/* Summon Unique Wraith */</font>
<a name=#2847>#define RF7_S_UNIQUE		0x80000000	<font color=#ff7f00>/* Summon Unique Monster */</font>
<a name=#2848>
<a name=#2849>
<a name=#2850><font color=#ff7f00>/*
<a name=#2851> * Breath attacks.
<a name=#2852> * Need special treatment in movement AI.
<a name=#2853> */</font>
<a name=#2854>#define RF4_BREATH_MASK \
<a name=#2855>        (RF4_BRTH_ACID | RF4_BRTH_ELEC | RF4_BRTH_FIRE | RF4_BRTH_COLD | \
<a name=#2856>         RF4_BRTH_POIS | RF4_BRTH_PLAS | RF4_BRTH_LITE | RF4_BRTH_DARK | \
<a name=#2857>         RF4_BRTH_CONFU | RF4_BRTH_SOUND | RF4_BRTH_SHARD | RF4_BRTH_INER | \
<a name=#2858>         RF4_BRTH_GRAV | RF4_BRTH_FORCE | RF4_BRTH_NEXUS | RF4_BRTH_NETHR | \
<a name=#2859>         RF4_BRTH_CHAOS | RF4_BRTH_DISEN | RF4_BRTH_TIME)
<a name=#2860>
<a name=#2861>#define RF5_BREATH_MASK \
<a name=#2862>	(0L)
<a name=#2863>
<a name=#2864>#define RF6_BREATH_MASK \
<a name=#2865>	(0L)
<a name=#2866>
<a name=#2867>#define RF7_BREATH_MASK \
<a name=#2868>	(0L)
<a name=#2869>
<a name=#2870><font color=#ff7f00>/*
<a name=#2871> * Harassment (not direct damage) attacks.
<a name=#2872> * Need special treatment in AI.
<a name=#2873> */</font>
<a name=#2874>#define RF4_HARASS_MASK \
<a name=#2875>        (RF4_SHRIEK)
<a name=#2876>
<a name=#2877>#define RF5_HARASS_MASK \
<a name=#2878>	(0L)
<a name=#2879>
<a name=#2880>#define RF6_HARASS_MASK \
<a name=#2881>	(RF6_DARKNESS | RF6_TRAPS | RF6_FORGET | RF6_HUNGER | RF6_DRAIN_MANA | \
<a name=#2882>         RF6_SCARE | RF6_BLIND | RF6_CONF | RF6_SLOW | RF6_HOLD | RF6_DISPEL)
<a name=#2883>
<a name=#2884>#define RF7_HARASS_MASK \
<a name=#2885>	(0L)
<a name=#2886>
<a name=#2887><font color=#ff7f00>/* Number of times harassment spells get special treatment */</font>
<a name=#2888>#define BASE_HARASS 5
<a name=#2889>
<a name=#2890><font color=#ff7f00>/* Number of times harassment spells get special treatment from weaker creatures */</font>
<a name=#2891>#define LOW_HARASS 2
<a name=#2892>
<a name=#2893><font color=#ff7f00>/*
<a name=#2894> * Hack -- "bolt" spells that may hurt fellow monsters
<a name=#2895> * Need special treatment in AI.
<a name=#2896> */</font>
<a name=#2897>#define RF4_BOLT_MASK \
<a name=#2898>        (RF4_ARROW | RF4_BOLT | RF4_SHOT | RF4_MISSL | RF4_PMISSL | RF4_BOULDER)
<a name=#2899>
<a name=#2900>#define RF5_BOLT_MASK \
<a name=#2901>	(RF5_BOLT_ACID | RF5_BOLT_ELEC | RF5_BOLT_FIRE | RF5_BOLT_COLD | \
<a name=#2902>	 RF5_BOLT_POIS | RF5_BOLT_NETHR | RF5_BOLT_WATER | RF5_BOLT_MANA | \
<a name=#2903>	 RF5_BOLT_PLAS | RF5_BOLT_ICE)
<a name=#2904>
<a name=#2905>#define RF6_BOLT_MASK \
<a name=#2906>   0L
<a name=#2907>
<a name=#2908>
<a name=#2909>#define RF7_BOLT_MASK \
<a name=#2910>   0L
<a name=#2911>
<a name=#2912><font color=#ff7f00>/*
<a name=#2913> * Archery attacks
<a name=#2914> * Need special treatment in AI.
<a name=#2915> */</font>
<a name=#2916>#define RF4_ARCHERY_MASK \
<a name=#2917>        (RF4_ARROW | RF4_BOLT | RF4_SHOT | RF4_MISSL | RF4_PMISSL | RF4_BOULDER)
<a name=#2918>
<a name=#2919>#define RF5_ARCHERY_MASK \
<a name=#2920>	(0L)
<a name=#2921>
<a name=#2922>#define RF6_ARCHERY_MASK \
<a name=#2923>	(0L)
<a name=#2924>
<a name=#2925>#define RF7_ARCHERY_MASK \
<a name=#2926>	(0L)
<a name=#2927>
<a name=#2928><font color=#ff7f00>/*
<a name=#2929> * Spells that can be can without a player in sight
<a name=#2930> * Need special treatment in AI.
<a name=#2931> */</font>
<a name=#2932>#define RF4_NO_PLAYER_MASK \
<a name=#2933>        (0L)
<a name=#2934>
<a name=#2935>#define RF5_NO_PLAYER_MASK \
<a name=#2936>        (0L)
<a name=#2937>
<a name=#2938>#define RF6_NO_PLAYER_MASK \
<a name=#2939>        (RF6_HEAL | RF6_ADD_MANA | RF6_TELE_SELF_TO | RF6_CURE)
<a name=#2940>
<a name=#2941>#define RF7_NO_PLAYER_MASK \
<a name=#2942>        (0L)
<a name=#2943>
<a name=#2944>
<a name=#2945><font color=#ff7f00>/* Spell Desire Table Columns */</font>
<a name=#2946>#define D_BASE     0
<a name=#2947>#define D_SUMM     1
<a name=#2948>#define D_HURT     2
<a name=#2949>#define D_MANA     3
<a name=#2950>#define D_ESC      4
<a name=#2951>#define D_TACT     5
<a name=#2952>#define D_RES      6
<a name=#2953>#define D_RANGE    7
<a name=#2954>
<a name=#2955>
<a name=#2956><font color=#ff7f00>/*** Option Definitions ***/</font>
<a name=#2957>
<a name=#2958>#define OPT_MAX	                       256
<a name=#2959>#define OPT_PAGE_MAX                     6
<a name=#2960>#define OPT_PAGE_PER                    20
<a name=#2961>#define OPT_birth_start                128
<a name=#2962>#define OPT_birth_end                  137
<a name=#2963>#define OPT_adult_start                192
<a name=#2964>#define OPT_adult_end                  201
<a name=#2965>#define OPT_cheat_start                160
<a name=#2966>#define OPT_cheat_end                  169
<a name=#2967>#define OPT_score_start                224
<a name=#2968>#define OPT_score_end                  233
<a name=#2969>
<a name=#2970>
<a name=#2971><font color=#ff7f00>/*
<a name=#2972> * Indexes
<a name=#2973> */</font>
<a name=#2974>#define OPT_rogue_like_commands		0
<a name=#2975>#define OPT_quick_messages			1
<a name=#2976>#define OPT_floor_query_flag		2
<a name=#2977>#define OPT_carry_query_flag		3
<a name=#2978>#define OPT_use_old_target			4
<a name=#2979>#define OPT_always_pickup			5
<a name=#2980>#define OPT_always_repeat			6
<a name=#2981>#define OPT_depth_in_feet			7
<a name=#2982>#define OPT_stack_force_notes		8
<a name=#2983>#define OPT_stack_force_costs		9
<a name=#2984>#define OPT_show_labels				10
<a name=#2985>#define OPT_show_weights			11
<a name=#2986>#define OPT_show_choices			12
<a name=#2987>#define OPT_show_details			13
<a name=#2988>#define OPT_metric					14
<a name=#2989>#define OPT_show_flavors			15
<a name=#2990>
<a name=#2991>#define OPT_run_ignore_stairs		16
<a name=#2992>#define OPT_run_ignore_doors		17
<a name=#2993>#define OPT_run_cut_corners			18
<a name=#2994>#define OPT_run_use_corners			19
<a name=#2995>#define OPT_disturb_move			20
<a name=#2996>#define OPT_disturb_near			21
<a name=#2997>#define OPT_disturb_panel			22
<a name=#2998>#define OPT_disturb_state			23
<a name=#2999>#define OPT_disturb_minor			24
<a name=#3000>#define OPT_disturb_other			25
<a name=#3001>#define OPT_alert_hitpoint			26
<a name=#3002>#define OPT_alert_failure			27
<a name=#3003>#define OPT_verify_destroy			28
<a name=#3004>#define OPT_verify_special			29
<a name=#3005>#define OPT_ring_bell				30
<a name=#3006>#define OPT_verify_destroy_junk		31
<a name=#3007>
<a name=#3008>#define OPT_auto_haggle				32
<a name=#3009>#define OPT_auto_scum				33
<a name=#3010>#define OPT_easy_open				34
<a name=#3011>#define OPT_easy_disarm 			35
<a name=#3012>#define OPT_expand_look				36
<a name=#3013>#define OPT_expand_list				37
<a name=#3014>#define OPT_view_perma_grids	 	38
<a name=#3015>#define OPT_view_torch_grids		39
<a name=#3016><font color=#ff7f00>/* xxx */</font>
<a name=#3017>#define OPT_dungeon_stair			41
<a name=#3018><font color=#ff7f00>/* xxx */</font>
<a name=#3019><font color=#ff7f00>/* xxx */</font>
<a name=#3020><font color=#ff7f00>/* xxx */</font>
<a name=#3021><font color=#ff7f00>/* xxx */</font>
<a name=#3022><font color=#ff7f00>/* xxx */</font>
<a name=#3023>#define OPT_smart_cheat				47
<a name=#3024>
<a name=#3025>#define OPT_view_reduce_lite		48
<a name=#3026>#define OPT_hidden_player			49
<a name=#3027>#define OPT_avoid_abort				50
<a name=#3028>#define OPT_avoid_other				51
<a name=#3029>#define OPT_flush_failure			52
<a name=#3030>#define OPT_flush_disturb			53
<a name=#3031>
<a name=#3032>#define OPT_center_player			54
<a name=#3033>
<a name=#3034>#define OPT_fresh_before			55
<a name=#3035>#define OPT_fresh_after				56
<a name=#3036>
<a name=#3037>#define OPT_center_running			57
<a name=#3038>
<a name=#3039>#define OPT_compress_savefile		58
<a name=#3040>#define OPT_hilite_player			59
<a name=#3041>#define OPT_view_yellow_lite		60
<a name=#3042>#define OPT_view_bright_lite		61
<a name=#3043>#define OPT_view_granite_lite		62
<a name=#3044>#define OPT_view_special_lite		63
<a name=#3045>#define OPT_show_piles                  67
<a name=#3046>
<a name=#3047>#define OPT_show_detect         69 <font color=#ff7f00>/*This is really quite out of order -BR-*/</font>
<a name=#3048>#define OPT_disturb_trap_detect         70 <font color=#ff7f00>/*This is really quite out of order -BR-*/</font>
<a name=#3049>
<a name=#3050>#define OPT_birth_point_based           128<font color=#ff7f00>/*(OPT_BIRTH_START+0)*/</font>
<a name=#3051>#define OPT_birth_auto_roller           129<font color=#ff7f00>/*(OPT_BIRTH_START+1)*/</font>
<a name=#3052>#define OPT_birth_preserve              131<font color=#ff7f00>/*(OPT_BIRTH_START+3)*/</font>
<a name=#3053><font color=#ff7f00>/* No Ironman options */</font>
<a name=#3054>#define OPT_cheat_peek                  160        <font color=#ff7f00>/*(OPT_CHEAT+0)*/</font>
<a name=#3055>#define OPT_cheat_hear                  161        <font color=#ff7f00>/*(OPT_CHEAT+1)*/</font>
<a name=#3056>#define OPT_cheat_room                  162        <font color=#ff7f00>/*(OPT_CHEAT+2)*/</font>
<a name=#3057>#define OPT_cheat_xtra                  163        <font color=#ff7f00>/*(OPT_CHEAT+3)*/</font>
<a name=#3058>#define OPT_cheat_know                  164        <font color=#ff7f00>/*(OPT_CHEAT+4)*/</font>
<a name=#3059>#define OPT_cheat_live                  165        <font color=#ff7f00>/*(OPT_CHEAT+5)*/</font>
<a name=#3060>
<a name=#3061>#define OPT_adult_point_based           192<font color=#ff7f00>/*(OPT_ADULT_START+0)*/</font>
<a name=#3062>#define OPT_adult_auto_roller           193<font color=#ff7f00>/*(OPT_ADULT_START+1)*/</font>
<a name=#3063>#define OPT_adult_preserve              195<font color=#ff7f00>/*(OPT_ADULT_START+3)*/</font>
<a name=#3064><font color=#ff7f00>/* No Ironman options */</font>
<a name=#3065><font color=#ff7f00>/* xxx xxx */</font>
<a name=#3066>#define OPT_score_peek                  224      <font color=#ff7f00>/*  (OPT_SCORE+0)*/</font>
<a name=#3067>#define OPT_score_hear                  225      <font color=#ff7f00>/*  (OPT_SCORE+1)*/</font>
<a name=#3068>#define OPT_score_room                  226      <font color=#ff7f00>/*  (OPT_SCORE+2)*/</font>
<a name=#3069>#define OPT_score_xtra                  227      <font color=#ff7f00>/*  (OPT_SCORE+3)*/</font>
<a name=#3070>#define OPT_score_know                  228      <font color=#ff7f00>/*  (OPT_SCORE+4)*/</font>
<a name=#3071>#define OPT_score_live                  229      <font color=#ff7f00>/*  (OPT_SCORE+5)*/</font>
<a name=#3072><font color=#ff7f00>/* xxx xxx */</font>
<a name=#3073>
<a name=#3074>
<a name=#3075>
<a name=#3076><font color=#ff7f00>/*
<a name=#3077> * Hack -- Option symbols
<a name=#3078> */</font>
<a name=#3079>#define rogue_like_commands		op_ptr->opt[OPT_rogue_like_commands]
<a name=#3080>#define quick_messages			op_ptr->opt[OPT_quick_messages]
<a name=#3081>#define floor_query_flag		op_ptr->opt[OPT_floor_query_flag]
<a name=#3082>#define carry_query_flag		op_ptr->opt[OPT_carry_query_flag]
<a name=#3083>#define use_old_target			op_ptr->opt[OPT_use_old_target]
<a name=#3084>#define always_pickup			op_ptr->opt[OPT_always_pickup]
<a name=#3085>#define always_repeat			op_ptr->opt[OPT_always_repeat]
<a name=#3086>#define depth_in_feet			op_ptr->opt[OPT_depth_in_feet]
<a name=#3087>#define stack_force_notes		op_ptr->opt[OPT_stack_force_notes]
<a name=#3088>#define stack_force_costs		op_ptr->opt[OPT_stack_force_costs]
<a name=#3089>#define show_labels				op_ptr->opt[OPT_show_labels]
<a name=#3090>#define show_weights			op_ptr->opt[OPT_show_weights]
<a name=#3091>#define show_choices			op_ptr->opt[OPT_show_choices]
<a name=#3092>#define show_details			op_ptr->opt[OPT_show_details]
<a name=#3093>#define use_metric				op_ptr->opt[OPT_metric]
<a name=#3094>#define show_flavors			op_ptr->opt[OPT_show_flavors]
<a name=#3095>#define show_detect    		op_ptr->opt[OPT_show_detect]
<a name=#3096>
<a name=#3097>#define run_ignore_stairs		op_ptr->opt[OPT_run_ignore_stairs]
<a name=#3098>#define run_ignore_doors		op_ptr->opt[OPT_run_ignore_doors]
<a name=#3099>#define run_cut_corners			op_ptr->opt[OPT_run_cut_corners]
<a name=#3100>#define run_use_corners			op_ptr->opt[OPT_run_use_corners]
<a name=#3101>#define disturb_move			op_ptr->opt[OPT_disturb_move]
<a name=#3102>#define disturb_near			op_ptr->opt[OPT_disturb_near]
<a name=#3103>#define disturb_panel			op_ptr->opt[OPT_disturb_panel]
<a name=#3104>#define disturb_trap_detect    		op_ptr->opt[OPT_disturb_trap_detect]
<a name=#3105>#define disturb_state			op_ptr->opt[OPT_disturb_state]
<a name=#3106>#define disturb_minor			op_ptr->opt[OPT_disturb_minor]
<a name=#3107>#define disturb_other			op_ptr->opt[OPT_disturb_other]
<a name=#3108>#define alert_hitpoint			op_ptr->opt[OPT_alert_hitpoint]
<a name=#3109>#define alert_failure			op_ptr->opt[OPT_alert_failure]
<a name=#3110>#define verify_destroy			op_ptr->opt[OPT_verify_destroy]
<a name=#3111>#define verify_special			op_ptr->opt[OPT_verify_special]
<a name=#3112>#define ring_bell				op_ptr->opt[OPT_ring_bell]
<a name=#3113>#define verify_destroy_junk		op_ptr->opt[OPT_verify_destroy_junk]
<a name=#3114>
<a name=#3115>#define auto_haggle				op_ptr->opt[OPT_auto_haggle]
<a name=#3116>#define auto_scum				op_ptr->opt[OPT_auto_scum]
<a name=#3117>#define easy_open				op_ptr->opt[OPT_easy_open]  <font color=#ff7f00>/* TNB */</font>
<a name=#3118>#define easy_disarm				op_ptr->opt[OPT_easy_disarm]  <font color=#ff7f00>/* TNB */</font>
<a name=#3119>#define expand_look				op_ptr->opt[OPT_expand_look]
<a name=#3120>#define expand_list				op_ptr->opt[OPT_expand_list]
<a name=#3121>#define view_perma_grids		op_ptr->opt[OPT_view_perma_grids]
<a name=#3122>#define view_torch_grids		op_ptr->opt[OPT_view_torch_grids]
<a name=#3123><font color=#ff7f00>/* xxx */</font>
<a name=#3124>#define dungeon_stair			op_ptr->opt[OPT_dungeon_stair]
<a name=#3125><font color=#ff7f00>/* xxx */</font>
<a name=#3126><font color=#ff7f00>/* xxx */</font>
<a name=#3127><font color=#ff7f00>/* xxx */</font>
<a name=#3128><font color=#ff7f00>/* xxx */</font>
<a name=#3129><font color=#ff7f00>/* xxx */</font>
<a name=#3130>#define smart_cheat				op_ptr->opt[OPT_smart_cheat]
<a name=#3131>
<a name=#3132>#define view_reduce_lite		op_ptr->opt[OPT_view_reduce_lite]
<a name=#3133>#define hidden_player			op_ptr->opt[OPT_hidden_player]
<a name=#3134>#define avoid_abort				op_ptr->opt[OPT_avoid_abort]
<a name=#3135>#define avoid_other				op_ptr->opt[OPT_avoid_other]
<a name=#3136>#define flush_failure			op_ptr->opt[OPT_flush_failure]
<a name=#3137>#define flush_disturb			op_ptr->opt[OPT_flush_disturb]
<a name=#3138>
<a name=#3139>#define center_player			op_ptr->opt[OPT_center_player]
<a name=#3140>
<a name=#3141>#define fresh_before			op_ptr->opt[OPT_fresh_before]
<a name=#3142>#define fresh_after				op_ptr->opt[OPT_fresh_after]
<a name=#3143>
<a name=#3144>#define center_running			op_ptr->opt[OPT_center_running]
<a name=#3145>
<a name=#3146>#define compress_savefile		op_ptr->opt[OPT_compress_savefile]
<a name=#3147>#define hilite_player			op_ptr->opt[OPT_hilite_player]
<a name=#3148>#define view_yellow_lite		op_ptr->opt[OPT_view_yellow_lite]
<a name=#3149>#define view_bright_lite		op_ptr->opt[OPT_view_bright_lite]
<a name=#3150>#define view_granite_lite		op_ptr->opt[OPT_view_granite_lite]
<a name=#3151>#define view_special_lite		op_ptr->opt[OPT_view_special_lite]
<a name=#3152>#define show_piles                              op_ptr->opt[OPT_show_piles]
<a name=#3153>
<a name=#3154>
<a name=#3155>#define birth_point_based               op_ptr->opt[OPT_birth_point_based]          
<a name=#3156>#define birth_auto_roller               op_ptr->opt[OPT_birth_auto_roller]          
<a name=#3157>#define birth_preserve                  op_ptr->opt[OPT_birth_preserve]        
<a name=#3158>
<a name=#3159>#define cheat_peek				op_ptr->opt[OPT_cheat_peek]
<a name=#3160>#define cheat_hear				op_ptr->opt[OPT_cheat_hear]		
<a name=#3161>#define cheat_room				op_ptr->opt[OPT_cheat_room]	
<a name=#3162>#define cheat_xtra				op_ptr->opt[OPT_cheat_xtra]	
<a name=#3163>#define cheat_know				op_ptr->opt[OPT_cheat_know]	
<a name=#3164>#define cheat_live				op_ptr->opt[OPT_cheat_live]	
<a name=#3165>
<a name=#3166>#define adult_point_based               op_ptr->opt[OPT_adult_point_based]          
<a name=#3167>#define adult_auto_roller               op_ptr->opt[OPT_adult_auto_roller]          
<a name=#3168>#define adult_preserve                  op_ptr->opt[OPT_adult_preserve]        
<a name=#3169>
<a name=#3170>#define score_peek				op_ptr->opt[OPT_score_peek]
<a name=#3171>#define score_hear				op_ptr->opt[OPT_score_hear]		
<a name=#3172>#define score_room				op_ptr->opt[OPT_score_room]	
<a name=#3173>#define score_xtra				op_ptr->opt[OPT_score_xtra]	
<a name=#3174>#define score_know				op_ptr->opt[OPT_score_know]	
<a name=#3175>#define score_live				op_ptr->opt[OPT_score_live]	
<a name=#3176>
<a name=#3177>
<a name=#3178><font color=#ff7f00>/*** Macro Definitions ***/</font>
<a name=#3179>
<a name=#3180>
<a name=#3181><font color=#ff7f00>/*
<a name=#3182> * Hack -- The main "screen"
<a name=#3183> */</font>
<a name=#3184>#define term_screen	(angband_term[0])
<a name=#3185>
<a name=#3186><font color=#ff7f00>/*
<a name=#3187> * Hack -- random number generation
<a name=#3188> */</font>
<a name=#3189>#define randint(M) \
<a name=#3190>	(rand_int(M) + 1)
<a name=#3191>
<a name=#3192>
<a name=#3193><font color=#ff7f00>/*
<a name=#3194> * Determine if a given inventory item is "aware"
<a name=#3195> */</font>
<a name=#3196>#define object_aware_p(T) \
<a name=#3197>	(k_info[(T)->k_idx].aware)
<a name=#3198>
<a name=#3199><font color=#ff7f00>/*
<a name=#3200> * Determine if a given inventory item is "tried"
<a name=#3201> */</font>
<a name=#3202>#define object_tried_p(T) \
<a name=#3203>	(k_info[(T)->k_idx].tried)
<a name=#3204>
<a name=#3205>
<a name=#3206><font color=#ff7f00>/*
<a name=#3207> * Determine if a given inventory item is "known"
<a name=#3208> * Test One -- Check for special "known" tag
<a name=#3209> * Test Two -- Check for "Easy Know" + "Aware"
<a name=#3210> */</font>
<a name=#3211>#define object_known_p(T) \
<a name=#3212>	(((T)->ident & (IDENT_KNOWN)) || \
<a name=#3213>	 (k_info[(T)->k_idx].easy_know && k_info[(T)->k_idx].aware))
<a name=#3214>
<a name=#3215>
<a name=#3216><font color=#ff7f00>/*
<a name=#3217> * Return the "attr" for a given item.
<a name=#3218> * Use "flavor" if available.
<a name=#3219> * Default to user definitions.
<a name=#3220> */</font>
<a name=#3221>#define object_attr(T) \
<a name=#3222>	((k_info[(T)->k_idx].flavor) ? \
<a name=#3223>	 (misc_to_attr[k_info[(T)->k_idx].flavor]) : \
<a name=#3224>	 (k_info[(T)->k_idx].x_attr))
<a name=#3225>
<a name=#3226><font color=#ff7f00>/*
<a name=#3227> * Return the "char" for a given item.
<a name=#3228> * Use "flavor" if available.
<a name=#3229> * Default to user definitions.
<a name=#3230> */</font>
<a name=#3231>#define object_char(T) \
<a name=#3232>	((k_info[(T)->k_idx].flavor) ? \
<a name=#3233>	 (misc_to_char[k_info[(T)->k_idx].flavor]) : \
<a name=#3234>	 (k_info[(T)->k_idx].x_char))
<a name=#3235>
<a name=#3236>
<a name=#3237>
<a name=#3238>
<a name=#3239><font color=#ff7f00>/*
<a name=#3240> * Artifacts use the "name1" field
<a name=#3241> */</font>
<a name=#3242>#define artifact_p(T) \
<a name=#3243>	((T)->name1 ? TRUE : FALSE)
<a name=#3244>
<a name=#3245><font color=#ff7f00>/*
<a name=#3246> * Ego-Items use the "name2" field
<a name=#3247> */</font>
<a name=#3248>#define ego_item_p(T) \
<a name=#3249>	((T)->name2 ? TRUE : FALSE)
<a name=#3250>
<a name=#3251>
<a name=#3252><font color=#ff7f00>/*
<a name=#3253> * Broken items.
<a name=#3254> */</font>
<a name=#3255>#define broken_p(T) \
<a name=#3256>	((T)->ident & (IDENT_BROKEN))
<a name=#3257>
<a name=#3258><font color=#ff7f00>/*
<a name=#3259> * Cursed items.
<a name=#3260> */</font>
<a name=#3261>#define cursed_p(T) \
<a name=#3262>	((T)->ident & (IDENT_CURSED))
<a name=#3263>
<a name=#3264>
<a name=#3265><font color=#ff7f00>/*
<a name=#3266> * Convert an "attr"/"char" pair into a "pict" (P)
<a name=#3267> */</font>
<a name=#3268>#define PICT(A,C) \
<a name=#3269>	((((u16b)(A)) << 8) | ((byte)(C)))
<a name=#3270>
<a name=#3271><font color=#ff7f00>/*
<a name=#3272> * Convert a "pict" (P) into an "attr" (A)
<a name=#3273> */</font>
<a name=#3274>#define PICT_A(P) \
<a name=#3275>	((byte)((P) >> 8))
<a name=#3276>
<a name=#3277><font color=#ff7f00>/*
<a name=#3278> * Convert a "pict" (P) into an "char" (C)
<a name=#3279> */</font>
<a name=#3280>#define PICT_C(P) \
<a name=#3281>	((char)((byte)(P)))
<a name=#3282>
<a name=#3283>
<a name=#3284><font color=#ff7f00>/*
<a name=#3285> * Convert a "location" (Y,X) into a "grid" (G)
<a name=#3286> */</font>
<a name=#3287>#define GRID(Y,X) \
<a name=#3288>	(256 * (Y) + (X))
<a name=#3289>
<a name=#3290><font color=#ff7f00>/*
<a name=#3291> * Convert a "grid" (G) into a "location" (Y)
<a name=#3292> */</font>
<a name=#3293>#define GRID_Y(G) \
<a name=#3294>	((int)((G) / 256U))
<a name=#3295>
<a name=#3296><font color=#ff7f00>/*
<a name=#3297> * Convert a "grid" (G) into a "location" (X)
<a name=#3298> */</font>
<a name=#3299>#define GRID_X(G) \
<a name=#3300>	((int)((G) % 256U))
<a name=#3301>
<a name=#3302>
<a name=#3303><font color=#ff7f00>/*
<a name=#3304> * Determines if a map location is "meaningful"
<a name=#3305> */</font>
<a name=#3306>#define in_bounds(Y,X) \
<a name=#3307>	(((unsigned)(Y) < (unsigned)(DUNGEON_HGT)) && \
<a name=#3308>	 ((unsigned)(X) < (unsigned)(DUNGEON_WID)))
<a name=#3309>
<a name=#3310><font color=#ff7f00>/*
<a name=#3311> * Determines if a map location is fully inside the outer walls
<a name=#3312> * This is more than twice as expensive as "in_bounds()", but
<a name=#3313> * often we need to exclude the outer walls from calculations.
<a name=#3314> */</font>
<a name=#3315>#define in_bounds_fully(Y,X) \
<a name=#3316>	(((Y) > 0) && ((Y) < DUNGEON_HGT-1) && \
<a name=#3317>	 ((X) > 0) && ((X) < DUNGEON_WID-1))
<a name=#3318>
<a name=#3319>
<a name=#3320><font color=#ff7f00>/*
<a name=#3321> * Determine if a "legal" grid is a "floor" grid
<a name=#3322> *
<a name=#3323> * Line 1 -- forbid doors, rubble, seams, walls
<a name=#3324> *
<a name=#3325> * Note that the terrain features are split by a one bit test
<a name=#3326> * into those features which block line of sight and those that
<a name=#3327> * do not, allowing an extremely fast single bit check below.
<a name=#3328> *
<a name=#3329> * Add in the fact that some new terrain (water & lava) do NOT block sight
<a name=#3330> * -KMW-
<a name=#3331> */</font>
<a name=#3332>#define cave_floor_grid(C) \
<a name=#3333>    (!((C)->feat & 0x20))
<a name=#3334>
<a name=#3335><font color=#ff7f00>/*
<a name=#3336> * Determines if a map location is currently "on screen"
<a name=#3337> * Note that "panel_contains(Y,X)" always implies "in_bounds(Y,X)".
<a name=#3338> * Pre-storing this into a cave_info flag would be nice.  XXX XXX
<a name=#3339> */</font>
<a name=#3340>#define panel_contains(Y,X) \
<a name=#3341>  (((Y) >= panel_row_min) && ((Y) <= panel_row_max) && \
<a name=#3342>   ((X) >= panel_col_min) && ((X) <= panel_col_max))
<a name=#3343>
<a name=#3344><font color=#ff7f00>/*
<a name=#3345> * Determine if a "legal" grid is a "floor" grid
<a name=#3346> *
<a name=#3347> * Line 1 -- forbid doors, seams, walls, rubble and trees.
<a name=#3348> *
<a name=#3349> * Note the use of the new "CAVE_WALL" flag.
<a name=#3350> */</font>
<a name=#3351>#define cave_floor_bold(Y,X) \
<a name=#3352>	(!(cave_info[Y][X] & (CAVE_WALL)))
<a name=#3353>
<a name=#3354>
<a name=#3355><font color=#ff7f00>/*
<a name=#3356> * Determine if a "legal" grid is able to be passed through by creatures 
<a name=#3357> * that cannot bore or pass through walls.  This new definition is needed, 
<a name=#3358> * because some terrain can now be traversed,  but ends LOS.  It is also
<a name=#3359> * used in the projectable function. -LM-
<a name=#3360> *
<a name=#3361> * Line 1 -- forbid doors, seams, walls, etc.
<a name=#3362> * Line 2 -- but allow trees
<a name=#3363> * Line 3 -- but allow rubble
<a name=#3364> *
<a name=#3365> * Note the use of the new "CAVE_WALL" flag.
<a name=#3366> */</font>
<a name=#3367>#define cave_passable_bold(Y,X) \
<a name=#3368>	(!(cave_info[Y][X] & (CAVE_WALL)) || \
<a name=#3369>	(cave_feat[Y][X] == FEAT_TREE) || \
<a name=#3370>	(cave_feat[Y][X] == FEAT_RUBBLE))
<a name=#3371>
<a name=#3372>
<a name=#3373>
<a name=#3374>
<a name=#3375><font color=#ff7f00>/*
<a name=#3376> * Determine if a "legal" grid is a "clean" floor grid
<a name=#3377> *
<a name=#3378> * Line 1 -- forbid non-floors
<a name=#3379> * Line 2 -- forbid normal objects
<a name=#3380> */</font>
<a name=#3381>#define cave_clean_bold(Y,X) \
<a name=#3382>	((cave_feat[Y][X] == FEAT_FLOOR) && \
<a name=#3383>	 (cave_o_idx[Y][X] == 0))
<a name=#3384>
<a name=#3385><font color=#ff7f00>/*
<a name=#3386> * Determine if a "legal" grid is an "empty" floor grid
<a name=#3387> *
<a name=#3388> * Line 1 -- forbid doors, seams, walls, trees, and rubble
<a name=#3389> * Line 2 -- forbid player/monsters
<a name=#3390> */</font>
<a name=#3391>#define cave_empty_bold(Y,X) \
<a name=#3392>	(cave_floor_bold(Y,X) && \
<a name=#3393>	 (cave_m_idx[Y][X] == 0))
<a name=#3394>
<a name=#3395><font color=#ff7f00>/*
<a name=#3396> * Determine if a "legal" grid is a "naked" floor grid
<a name=#3397> *
<a name=#3398> * Line 1 -- forbid non-floors
<a name=#3399> * Line 2 -- forbid normal objects
<a name=#3400> * Line 3 -- forbid player/monsters
<a name=#3401> */</font>
<a name=#3402>#define cave_naked_bold(Y,X) \
<a name=#3403>	((cave_feat[Y][X] == FEAT_FLOOR) && \
<a name=#3404>	 (cave_o_idx[Y][X] == 0) && \
<a name=#3405>	 (cave_m_idx[Y][X] == 0))
<a name=#3406>
<a name=#3407>
<a name=#3408><font color=#ff7f00>/*
<a name=#3409> * Determine if a "legal" grid is "permanent"
<a name=#3410> *
<a name=#3411> * Line 1 -- perma-walls
<a name=#3412> * Line 2-3 -- stairs
<a name=#3413> * Line 4-5 -- shop doors
<a name=#3414> */</font>
<a name=#3415>#define cave_perma_bold(Y,X) \
<a name=#3416>	((cave_feat[Y][X] >= FEAT_PERM_EXTRA) || \
<a name=#3417>	 ((cave_feat[Y][X] == FEAT_LESS) || \
<a name=#3418>	  (cave_feat[Y][X] == FEAT_MORE)) || \
<a name=#3419>	 ((cave_feat[Y][X] >= FEAT_SHOP_HEAD) && \
<a name=#3420>	  (cave_feat[Y][X] <= FEAT_SHOP_TAIL)))
<a name=#3421>
<a name=#3422>
<a name=#3423><font color=#ff7f00>/*
<a name=#3424> * Determine if a "legal" grid is within "los" of the player
<a name=#3425> *
<a name=#3426> * Note the use of comparison to zero to force a "boolean" result
<a name=#3427> */</font>
<a name=#3428>#define player_has_los_bold(Y,X) \
<a name=#3429>	((cave_info[Y][X] & (CAVE_VIEW)) != 0)
<a name=#3430>
<a name=#3431>
<a name=#3432><font color=#ff7f00>/*
<a name=#3433> * Determine if a "legal" grid can be "seen" by the player
<a name=#3434> *
<a name=#3435> * Note the use of comparison to zero to force a "boolean" result
<a name=#3436> */</font>
<a name=#3437>#define player_can_see_bold(Y,X) \
<a name=#3438>	((cave_info[Y][X] & (CAVE_SEEN)) != 0)
<a name=#3439>
<a name=#3440>
<a name=#3441>
<a name=#3442>
<a name=#3443><font color=#ff7f00>/*
<a name=#3444> * Hack -- Prepare to use the "Secure" routines
<a name=#3445> */</font>
<a name=#3446>#if defined(SET_UID) && defined(SECURE)
<a name=#3447>extern int PlayerUID;
<a name=#3448># define getuid() PlayerUID
<a name=#3449># define geteuid() PlayerUID
<a name=#3450>#endif
<a name=#3451>
<a name=#3452>
<a name=#3453>
<a name=#3454><font color=#ff7f00>/*** Color constants ***/</font>
<a name=#3455>
<a name=#3456>
<a name=#3457><font color=#ff7f00>/*
<a name=#3458> * Angband "attributes" (with symbols, and base (R,G,B) codes)
<a name=#3459> *
<a name=#3460> * The "(R,G,B)" codes are given in "fourths" of the "maximal" value,
<a name=#3461> * and should "gamma corrected" on most (non-Macintosh) machines.
<a name=#3462> */</font>
<a name=#3463>#define TERM_DARK		0	<font color=#ff7f00>/* 'd' */</font>	<font color=#ff7f00>/* 0,0,0 */</font>
<a name=#3464>#define TERM_WHITE		1	<font color=#ff7f00>/* 'w' */</font>	<font color=#ff7f00>/* 4,4,4 */</font>
<a name=#3465>#define TERM_SLATE		2	<font color=#ff7f00>/* 's' */</font>	<font color=#ff7f00>/* 2,2,2 */</font>
<a name=#3466>#define TERM_ORANGE		3	<font color=#ff7f00>/* 'o' */</font>	<font color=#ff7f00>/* 4,2,0 */</font>
<a name=#3467>#define TERM_RED		4	<font color=#ff7f00>/* 'r' */</font>	<font color=#ff7f00>/* 3,0,0 */</font>
<a name=#3468>#define TERM_GREEN		5	<font color=#ff7f00>/* 'g' */</font>	<font color=#ff7f00>/* 0,2,1 */</font>
<a name=#3469>#define TERM_BLUE		6	<font color=#ff7f00>/* 'b' */</font>	<font color=#ff7f00>/* 0,0,4 */</font>
<a name=#3470>#define TERM_UMBER		7	<font color=#ff7f00>/* 'u' */</font>	<font color=#ff7f00>/* 2,1,0 */</font>
<a name=#3471>#define TERM_L_DARK		8	<font color=#ff7f00>/* 'D' */</font>	<font color=#ff7f00>/* 1,1,1 */</font>
<a name=#3472>#define TERM_L_WHITE	9	<font color=#ff7f00>/* 'W' */</font>	<font color=#ff7f00>/* 3,3,3 */</font>
<a name=#3473>#define TERM_VIOLET		10	<font color=#ff7f00>/* 'v' */</font>	<font color=#ff7f00>/* 4,0,4 */</font>
<a name=#3474>#define TERM_YELLOW		11	<font color=#ff7f00>/* 'y' */</font>	<font color=#ff7f00>/* 4,4,0 */</font>
<a name=#3475>#define TERM_L_RED		12	<font color=#ff7f00>/* 'R' */</font>	<font color=#ff7f00>/* 4,0,0 */</font>
<a name=#3476>#define TERM_L_GREEN	13	<font color=#ff7f00>/* 'G' */</font>	<font color=#ff7f00>/* 0,4,0 */</font>
<a name=#3477>#define TERM_L_BLUE		14	<font color=#ff7f00>/* 'B' */</font>	<font color=#ff7f00>/* 0,4,4 */</font>
<a name=#3478>#define TERM_L_UMBER	15	<font color=#ff7f00>/* 'U' */</font>	<font color=#ff7f00>/* 3,2,1 */</font>
<a name=#3479>
<a name=#3480><font color=#ff7f00>/* Color code identifiers for messages */</font>
<a name=#3481>#define MSG_GENERIC          0
<a name=#3482>#define MSG_HIT              1
<a name=#3483>#define MSG_MISS             2
<a name=#3484>#define MSG_FLEE             3
<a name=#3485>#define MSG_DROP             4
<a name=#3486>#define MSG_KILL             5
<a name=#3487>#define MSG_LEVEL            6
<a name=#3488>#define MSG_DEATH            7
<a name=#3489>#define MSG_STUDY            8
<a name=#3490>#define MSG_TELEPORT         9
<a name=#3491>#define MSG_SHOOT           10
<a name=#3492>#define MSG_QUAFF           11
<a name=#3493>#define MSG_ZAP             12
<a name=#3494>#define MSG_WALK            13
<a name=#3495>#define MSG_TPOTHER         14
<a name=#3496>#define MSG_HITWALL         15
<a name=#3497>#define MSG_EAT             16
<a name=#3498>#define MSG_STORE1          17
<a name=#3499>#define MSG_STORE2          18
<a name=#3500>#define MSG_STORE3          19
<a name=#3501>#define MSG_STORE4          20
<a name=#3502>#define MSG_DIG             21
<a name=#3503>#define MSG_OPENDOOR        22
<a name=#3504>#define MSG_SHUTDOOR        23
<a name=#3505>#define MSG_TPLEVEL         24
<a name=#3506>#define MSG_BELL            25
<a name=#3507>#define MSG_NOTHING_TO_OPEN 26
<a name=#3508>#define MSG_LOCKPICK_FAIL   27
<a name=#3509>#define MSG_STAIRS          28
<a name=#3510>
<a name=#3511>#define MSG_MAX             29
<a name=#3512>
<a name=#3513>
<a name=#3514><font color=#ff7f00>/*** Sound constants ***/</font>
<a name=#3515>
<a name=#3516>
<a name=#3517><font color=#ff7f00>/*
<a name=#3518> * Mega-Hack -- some primitive sound support (see "main-win.c")
<a name=#3519> *
<a name=#3520> * Some "sound" constants for "Term_xtra(TERM_XTRA_SOUND, val)"
<a name=#3521> */</font>
<a name=#3522>#define SOUND_HIT	    1
<a name=#3523>#define SOUND_MISS	    2
<a name=#3524>#define SOUND_FLEE	    3
<a name=#3525>#define SOUND_DROP	    4
<a name=#3526>#define SOUND_KILL	    5
<a name=#3527>#define SOUND_LEVEL	    6
<a name=#3528>#define SOUND_DEATH	    7
<a name=#3529>#define SOUND_STUDY     8
<a name=#3530>#define SOUND_TELEPORT  9
<a name=#3531>#define SOUND_SHOOT     10
<a name=#3532>#define SOUND_QUAFF     11
<a name=#3533>#define SOUND_ZAP       12
<a name=#3534>#define SOUND_WALK      13
<a name=#3535>#define SOUND_TPOTHER   14
<a name=#3536>#define SOUND_HITWALL   15
<a name=#3537>#define SOUND_EAT       16
<a name=#3538>#define SOUND_STORE1    17
<a name=#3539>#define SOUND_STORE2    18
<a name=#3540>#define SOUND_STORE3    19
<a name=#3541>#define SOUND_STORE4    20
<a name=#3542>#define SOUND_DIG       21
<a name=#3543>#define SOUND_OPENDOOR  22
<a name=#3544>#define SOUND_SHUTDOOR  23
<a name=#3545>#define SOUND_TPLEVEL   24
<a name=#3546>
<a name=#3547><font color=#ff7f00>/*
<a name=#3548> * Mega-Hack -- maximum known sounds
<a name=#3549> */</font>
<a name=#3550>#define SOUND_MAX 25
<a name=#3551>
<a name=#3552>
<a name=#3553><font color=#ff7f00>/*** Hack ***/</font>
<a name=#3554>
<a name=#3555>
<a name=#3556><font color=#ff7f00>/*
<a name=#3557> * Hack -- attempt to reduce various values
<a name=#3558> */</font>
<a name=#3559>#ifdef ANGBAND_LITE
<a name=#3560># undef MACRO_MAX
<a name=#3561># define MACRO_MAX	128
<a name=#3562># undef QUARK_MAX
<a name=#3563># define QUARK_MAX	128
<a name=#3564># undef MESSAGE_MAX
<a name=#3565># define MESSAGE_MAX	128
<a name=#3566># undef MESSAGE_BUF
<a name=#3567># define MESSAGE_BUF	4096
<a name=#3568>#endif
<a name=#3569>
<a name=#3570><font color=#ff7f00>/*
<a name=#3571> * Parse errors
<a name=#3572> */</font>
<a name=#3573>#define PARSE_ERROR_GENERIC                  1
<a name=#3574>#define PARSE_ERROR_OBSOLETE_FILE            2
<a name=#3575>#define PARSE_ERROR_MISSING_RECORD_HEADER    3
<a name=#3576>#define PARSE_ERROR_NON_SEQUENTIAL_RECORDS   4
<a name=#3577>#define PARSE_ERROR_INVALID_FLAG             5
<a name=#3578>#define PARSE_ERROR_UNDEFINED_DIRECTIVE      6
<a name=#3579>#define PARSE_ERROR_OUT_OF_MEMORY            7
<a name=#3580>#define PARSE_ERROR_OUT_OF_BOUNDS            8
<a name=#3581>#define PARSE_ERROR_TOO_FEW_ARGUMENTS        9
<a name=#3582>#define PARSE_ERROR_TOO_MANY_ARGUMENTS      10
<a name=#3583>
<a name=#3584>#define PARSE_ERROR_MAX                     11
<a name=#3585>
<a name=#3586><font color=#ff7f00>/*
<a name=#3587> * Specialty Abilities -BR-
<a name=#3588> */</font>
<a name=#3589><font color=#ff7f00>/* Defense/Armor */</font>
<a name=#3590>#define SP_ARMOR_MAST		0	<font color=#ff7f00>/* Increased Body Armor AC */</font>
<a name=#3591>#define SP_SHIELD_MAST		1	<font color=#ff7f00>/* Increased Shield AC, Deflection, and Bashing */</font>
<a name=#3592>#define SP_ARMOR_PROFICIENCY	2	<font color=#ff7f00>/* Reduced mana penalty for armor */</font>
<a name=#3593>#define SP_EVASION		3	<font color=#ff7f00>/* Chance to dodge attacks */</font>
<a name=#3594>#define SP_MAGIC_RESIST		4	<font color=#ff7f00>/* Improved Saves */</font>
<a name=#3595>#define SP_TELEPORT_RESIST	5	<font color=#ff7f00>/* Save vs Teleport Attacks; Immune to Teleport Level */</font>
<a name=#3596>#define SP_UNLIGHT		6	<font color=#ff7f00>/* Improved Stealth, Res Dark, function w/o light, Reduced Light */</font>
<a name=#3597>
<a name=#3598><font color=#ff7f00>/* Physical Attacks */</font>
<a name=#3599>#define SP_ARMSMAN		20	<font color=#ff7f00>/* Extra Melee Crits */</font>
<a name=#3600>#define SP_FAST_ATTACK		21	<font color=#ff7f00>/* Extra Melee Attacks */</font>
<a name=#3601>#define SP_MARKSMAN		22	<font color=#ff7f00>/* Extra Ranged Crits */</font>
<a name=#3602>#define SP_PIERCE_SHOT		23	<font color=#ff7f00>/* Ranged Attacks Pierce */</font>
<a name=#3603>#define SP_MIGHTY_THROW		24	<font color=#ff7f00>/* Extend Range on Throwing Attacks */</font>
<a name=#3604>#define SP_POWER_STRIKE		25	<font color=#ff7f00>/* More Confusion Attacks and Better Attacks (Druids) */</font>
<a name=#3605>#define SP_MARTIAL_ARTS		26	<font color=#ff7f00>/* Druid-like Unarmed Combat */</font>
<a name=#3606>
<a name=#3607><font color=#ff7f00>/* Magic and Mana */</font>
<a name=#3608>#define SP_BEGUILE		40	<font color=#ff7f00>/* More effective monster status attacks */</font>
<a name=#3609>#define SP_EXTEND_MAGIC		41	<font color=#ff7f00>/* Longer duration powerups */</font>
<a name=#3610>#define SP_FAST_CAST		42	<font color=#ff7f00>/* Less energy to cast (low level) spells */</font>
<a name=#3611>#define SP_POWER_SIPHON		43	<font color=#ff7f00>/* Gain mana when monsters cast */</font>
<a name=#3612>#define SP_HEIGHTEN_MAGIC	44	<font color=#ff7f00>/* Cast spells at higher effective level */</font>
<a name=#3613>#define SP_SOUL_SIPHON		45	<font color=#ff7f00>/* Gain mana when taking damage */</font>
<a name=#3614>#define SP_HARMONY		46	<font color=#ff7f00>/* Gain hp when casting spells */</font>
<a name=#3615>
<a name=#3616><font color=#ff7f00>/* Other */</font>
<a name=#3617>#define SP_ATHLETICS		60	<font color=#ff7f00>/* Increase and Partial Sustain Dex/Con */</font>
<a name=#3618>#define SP_CLARITY		61	<font color=#ff7f00>/* Increase and Partial Sustain Int/Wis */</font>
<a name=#3619>#define SP_FURY			63	<font color=#ff7f00>/* Gain energy when taking damage */</font>
<a name=#3620>#define SP_MEDITATION		64	<font color=#ff7f00>/* Faster Mana Regen */</font>
<a name=#3621>#define SP_REGENERATION		65	<font color=#ff7f00>/* Faster HP Regen */</font>
<a name=#3622>#define SP_EXTRA_TRAP		66	<font color=#ff7f00>/* Set more traps at once */</font>
<a name=#3623>#define SP_HOLY_LIGHT		67	<font color=#ff7f00>/* Increased light radius, resist light, damage to undead */</font>
<a name=#3624>
<a name=#3625>#define SP_NO_SPECIALTY		255
<a name=#3626>
<a name=#3627>
<a name=#3628>
<a name=#3629></pre>
</body>
</html>