/* 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 #define ROW_LEVEL 4 #define COL_LEVEL 0 /* "LEVEL xxxxxx" */ #define ROW_EXP 5 #define COL_EXP 0 /* "EXP xxxxxxxx" */ #define ROW_GOLD 6 #define COL_GOLD 0 /* "AU xxxxxxxxx" */ #define ROW_STAT 8 #define COL_STAT 0 /* "xxx xxxxxx" */ #define ROW_SHAPE 14 #define COL_SHAPE 0 /* "Mouse" (or whatever else the player might be) */ #define ROW_AC 15 #define COL_AC 0 /* "Cur AC xxxxx" */ #define ROW_MAXHP 16 #define COL_MAXHP 0 /* "Max HP xxxxx" */ #define ROW_CURHP 17 #define COL_CURHP 0 /* "Cur HP xxxxx" */ #define ROW_MAXSP 18 #define COL_MAXSP 0 /* "Max SP xxxxx" */ #define ROW_CURSP 19 #define COL_CURSP 0 /* "Cur SP xxxxx" */ #define ROW_INFO 20 #define COL_INFO 0 /* "xxxxxxxxxxxx" (the monster health bar) */ #define ROW_CUT 21 #define COL_CUT 0 /**/ */ #define ROW_STUN 22 #define COL_STUN 0 /**/ # #define COL_HUNGRY 0 /* "Weak" / "Hungry" / "Full" / "Gorged" */ #define COL_BLIND 7 /* "Blind" */ #define COL_CONFUSED 13 /* "Confused" */ #define COL_AFRAID 22 /* "Afraid" */ #define COL_POISONED 29 /* "Poisoned" */ #define COL_STATE 38 /**/ #define COL_SPEED 49 /* "Slow (-NN)" or "Fast (+NN)" */ #define COL_DTRAP 60 /* "DTrap" */ #define COL_STUDY 66 /* "Study" */ #define ROW_MAP 1 #define COL_MAP 13 /*** General index values ***/ /* * Legal restrictions for "summon_specific()" */ #define SUMMON_KIN 1 #define SUMMON_ANT 11 #define SUMMON_SPIDER 12 #define SUMMON_HOUND 13 #define SUMMON_ANIMAL 14 #define SUMMON_BERTBILLTOM 15 #define SUMMON_DEMON 16 #define SUMMON_UNDEAD 17 #define SUMMON_DRAGON 18 #define SUMMON_HI_DEMON 20 #define SUMMON_HI_UNDEAD 21 #define SUMMON_HI_DRAGON 22 #define SUMMON_WRAITH 31 #define SUMMON_UNIQUE 32 #define SUMMON_ELEMENTAL 33 #define SUMMON_VORTEX 34 #define SUMMON_HYBRID 35 #define SUMMON_BIRD 36 #define SUMMON_THIEF 38 /* * Spell types used by project(), and related functions. */ #define GF_ROCK 1 /* Physical missiles */ #define GF_SHOT 2 #define GF_ARROW 3 #define GF_MISSILE 4 #define GF_PMISSILE 5 #define GF_WHIP 6 /* Used for lash/spit attacks. */ #define GF_ACID 8 /* The basic elements & poison */ #define GF_ELEC 9 #define GF_FIRE 10 #define GF_COLD 11 #define GF_POIS 12 #define GF_PLASMA 13 /* Variations on the elements */ #define GF_HELLFIRE 14 #define GF_ICE 15 #define GF_LITE_WEAK 20 /* Light and darkness */ #define GF_LITE 21 #define GF_DARK_WEAK 23 #define GF_DARK 24 #define GF_MORGUL_DARK 25 #define GF_CONFUSION 26 /* Physical */ #define GF_SOUND 27 #define GF_SHARD 28 #define GF_INERTIA 29 #define GF_GRAVITY 30 #define GF_FORCE 31 #define GF_WATER 32 #define GF_STORM 33 #define GF_NEXUS 36 /* Magical */ #define GF_NETHER 37 #define GF_CHAOS 38 #define GF_DISENCHANT 39 #define GF_TIME 40 #define GF_MANA 43 /* Special */ #define GF_HOLY_ORB 44 #define GF_METEOR 45 #define GF_SPIRIT 46 #define GF_KILL_WALL 50 /* Dungeon-altering */ #define GF_KILL_DOOR 51 #define GF_KILL_TRAP 52 #define GF_MAKE_WALL 53 #define GF_MAKE_DOOR 54 #define GF_MAKE_TRAP 55 #define GF_HOLD 59 /* Area-effect */ #define GF_HOLD_UNDEAD 60 #define GF_AWAY_UNDEAD 61 #define GF_AWAY_EVIL 62 #define GF_AWAY_ALL 63 #define GF_TURN_UNDEAD 64 #define GF_TURN_EVIL 65 #define GF_TURN_ALL 66 #define GF_DISP_UNDEAD 67 #define GF_DISP_EVIL 68 #define GF_DISP_NOT_EVIL 69 #define GF_DISP_DEMON 70 #define GF_DISP_DRAGON 71 #define GF_DISP_ALL 72 #define GF_DISP_SMALL_ALL 73 #define GF_OLD_CLONE 74 #define GF_OLD_POLY 75 #define GF_OLD_HEAL 76 #define GF_OLD_SPEED 77 #define GF_OLD_SLOW 78 #define GF_OLD_CONF 79 #define GF_OLD_SLEEP 80 #define GF_OLD_DRAIN 81 #define GF_XXX8 82 /* * Some constants for the "learn" code. These generalized from the * old DRS constants. */ #define LRN_FREE_SAVE 14 #define LRN_MANA 15 #define LRN_ACID 16 #define LRN_ELEC 17 #define LRN_FIRE 18 #define LRN_COLD 19 #define LRN_POIS 20 #define LRN_FEAR_SAVE 21 #define LRN_LITE 22 #define LRN_DARK 23 #define LRN_BLIND 24 #define LRN_CONFU 25 #define LRN_SOUND 26 #define LRN_SHARD 27 #define LRN_NEXUS 28 #define LRN_NETHR 29 #define LRN_CHAOS 30 #define LRN_DISEN 31 /* new in Oangband 0.5 and beyond */ #define LRN_SAVE 39 #define LRN_ARCH 40 #define LRN_PARCH 41 #define LRN_ICE 42 #define LRN_PLAS 43 #define LRN_SOUND2 44 /* attacks which aren't resisted, but res sound prevent stun */ #define LRN_STORM 45 #define LRN_WATER 46 #define LRN_NEXUS_SAVE 47 /* Both resist Nexus and Saves apply */ #define LRN_BLIND_SAVE 48 /* Both resist Blind and Saves apply */ #define LRN_CONFU_SAVE 49 /* Both resist Confusion and Saves apply */ /* * Number of keymap modes */ #define KEYMAP_MODES 2 /* * Mode for original keyset commands */ #define KEYMAP_MODE_ORIG 0 /* * Mode for roguelike keyset commands */ #define KEYMAP_MODE_ROGUE 1 /*** Feature Indexes (see "lib/edit/f_info.txt") ***/ /* Nothing */ #define FEAT_NONE 0x00 /* Various */ #define FEAT_FLOOR 0x01 #define FEAT_INVIS 0x02 #define FEAT_GLYPH 0x03 #define FEAT_OPEN 0x04 #define FEAT_BROKEN 0x05 #define FEAT_LESS 0x06 #define FEAT_MORE 0x07 /* Special dungeon features. -LM- */ #define FEAT_LAVA 0x08 #define FEAT_WATER 0x09 #define FEAT_TREE 0x0A /* Traps */ #define FEAT_TRAP_HEAD 0x10 #define FEAT_TRAP_TAIL 0x1F /* Doors */ #define FEAT_DOOR_HEAD 0x20 #define FEAT_DOOR_TAIL 0x2F /* Extra */ #define FEAT_SECRET 0x30 #define FEAT_RUBBLE 0x31 /* Seams */ #define FEAT_MAGMA 0x32 #define FEAT_QUARTZ 0x33 #define FEAT_MAGMA_H 0x34 #define FEAT_QUARTZ_H 0x35 #define FEAT_MAGMA_K 0x36 #define FEAT_QUARTZ_K 0x37 /* Walls */ #define FEAT_WALL_EXTRA 0x38 #define FEAT_WALL_INNER 0x39 #define FEAT_WALL_OUTER 0x3A #define FEAT_WALL_SOLID 0x3B #define FEAT_PERM_EXTRA 0x3C #define FEAT_PERM_INNER 0x3D #define FEAT_PERM_OUTER 0x3E #define FEAT_PERM_SOLID 0x3F /* * Oangband shops are moved to 0x40 to 0x48 to make room for * the extra bookstore. Method borrowed from Zangband. -LM- */ #define FEAT_SHOP_HEAD 0x40 #define FEAT_SHOP_TAIL 0x48 /* Specials trap that only effects monsters. Created only by rogues. -LM- */ #define FEAT_MTRAP_HEAD 0x50 #define FEAT_MTRAP_TAIL 0x5F #define FEAT_MTRAP_BASE 0x50 /* Level 1 */ #define FEAT_MTRAP_STURDY 0x51 /* Level 1 */ #define FEAT_MTRAP_NET 0x52 /* Level 6 */ #define FEAT_MTRAP_CONF 0x53 /* Level 12 */ #define FEAT_MTRAP_POISON 0x54 /* Level 18 */ #define FEAT_MTRAP_SPIRIT 0x55 /* Level 24 */ #define FEAT_MTRAP_ELEC 0x56 /* Level 30 */ #define FEAT_MTRAP_EXPLOSIVE 0x57 /* Level 36 */ #define FEAT_MTRAP_PORTAL 0x58 /* Level 42 */ #define FEAT_MTRAP_STASIS 0x59 /* Level 48 */ /*** Artifact indexes (see "lib/edit/a_info.txt") ***/ /* Lites */ #define ART_GALADRIEL 1 #define ART_ELENDIL 2 #define ART_THRAIN 3 #define ART_STONE_LORE 15 /* Amulets */ #define ART_CARLAMMAS 4 #define ART_INGWE 5 #define ART_DWARVES 6 #define ART_BOROMIR 7 #define ART_FARAMIR 8 /* Rings */ #define ART_BARAHIR 9 #define ART_TULKAS 10 #define ART_NARYA 11 #define ART_NENYA 12 #define ART_VILYA 13 #define ART_POWER 14 /* Dragon Scale */ #define ART_RAZORBACK 22 #define ART_BLADETURNER 23 /* Hard Armour */ #define ART_SOULKEEPER 26 #define ART_ISILDUR 27 #define ART_ROHIRRIM 28 #define ART_BELEGENNON 29 #define ART_CELEBORN 30 #define ART_ARVEDUI 31 #define ART_CASPANION 32 /* Soft Armour */ #define ART_HIMRING 36 #define ART_HITHLOMIR 37 #define ART_THALKETTOTH 38 /* Shields */ #define ART_ELEMENTS 43 #define ART_THORIN 44 #define ART_CELEGORM 45 #define ART_ANARION 46 #define ART_EARENDIL 47 #define ART_GIL_GALAD 48 /* Helms and Crowns */ #define ART_MORGOTH 51 #define ART_BERUTHIEL 52 #define ART_THRANDUIL 53 #define ART_THENGEL 54 #define ART_HAMMERHAND 55 #define ART_DOR 56 #define ART_HOLHENNETH 57 #define ART_GORLIM 58 #define ART_GONDOR 61 #define ART_NUMENOR 62 /* Cloaks */ #define ART_VALINOR 66 #define ART_HOLCOLLETH 67 #define ART_THINGOL 68 #define ART_THORONGIL 69 #define ART_COLANNON 70 #define ART_LUTHIEN 71 #define ART_TUOR 72 /* Gloves */ #define ART_CAMBELEG 77 #define ART_CAMMITHRIM 78 #define ART_EOL 79 #define ART_PAURNIMMEN 80 #define ART_PAURAEGEN 81 #define ART_PAURNEN 82 #define ART_CAMLOST 83 #define ART_FINGOLFIN 84 /* Boots */ #define ART_FEANOR 89 #define ART_DAL 90 #define ART_THROR 91 #define ART_NEVRAST 92 #define ART_GIMLI 93 /* Swords */ #define ART_MAEDHROS 97 #define ART_ANGRIST 98 #define ART_NARTHANC 99 #define ART_NIMTHANC 100 #define ART_DETHANC 101 #define ART_RILIA 102 #define ART_BELANGIL 103 #define ART_CALRIS 104 #define ART_ARUNRUTH 105 #define ART_GLAMDRING 106 #define ART_AEGLIN 107 #define ART_ORCRIST 108 #define ART_GURTHANG 109 #define ART_ZARCUTHRA 110 #define ART_MORMEGIL 111 #define ART_GONDRICAM 112 #define ART_CRISDURIAN 113 #define ART_AGLARANG 114 #define ART_RINGIL 115 #define ART_ANDURIL 116 #define ART_ANGUIREL 117 #define ART_ELVAGIL 118 #define ART_FORASGIL 119 #define ART_CARETH 120 #define ART_STING 121 #define ART_HARADEKKET 122 #define ART_GILETTAR 123 #define ART_DOOMCALLER 124 /* Polearms */ #define ART_THEODEN 133 #define ART_PAIN 134 #define ART_OSONDIR 135 #define ART_TIL 136 #define ART_AEGLOS 137 #define ART_OROME 138 #define ART_NIMLOTH 139 #define ART_EORLINGAS 140 #define ART_DURIN 141 #define ART_EONWE 142 #define ART_BALLI 143 #define ART_LOTHARANG 144 #define ART_MUNDWINE 145 #define ART_BARUKKHELED 146 #define ART_WRATH 147 #define ART_ULMO 148 #define ART_AVAVIR 149 /* Hafted */ #define ART_GROND 158 #define ART_TOTILA 159 #define ART_THUNDERFIST 160 #define ART_BLOODSPIKE 161 #define ART_FIRESTAR 162 #define ART_TARATOL 163 #define ART_AULE 164 #define ART_NAR 165 #define ART_ERIRIL 166 #define ART_OLORIN 167 #define ART_DEATHWREAKER 168 #define ART_TURMIL 169 /* Bows */ #define ART_HARAD 178 #define ART_BELTHRONDING 179 #define ART_BARD 180 #define ART_CUBRAGOL 181 #define ART_BUCKLAND 182 #define ART_AMROD 183 #define ART_AMRAS 184 /* Non-wearable artifacts that can recharge in the backpack. */ #define ART_STAFF_SARUMAN 149 #define ART_STAFF_WINDS 150 #define ART_STAFF_MENELTARMA 151 #define ART_STAFF_RADAGAST 152 #define ART_WAND_ILKORIN 154 #define ART_WAND_GANDALF 155 #define ART_WAND_COMMAND 156 #define ART_WAND_ULPION 157 #define ART_ROD_DELVING 159 #define ART_ROD_SHADOW 160 #define ART_ROD_AIR 161 #define ART_ROD_PORTALS 162 /*** Ego-Item indexes (see "lib/edit/e_info.txt") ***/ /* Nothing */ /* xxx */ /* xxx */ /* xxx */ /* Body Armor */ #define EGO_RESIST_ACID 4 #define EGO_RESIST_ELEC 5 #define EGO_RESIST_FIRE 6 #define EGO_RESIST_COLD 7 #define EGO_RESISTANCE 8 #define EGO_ELVENKIND 9 #define EGO_DWARVEN 10 #define EGO_PERMANENCE 11 /* xxx */ /* xxx */ /* xxx */ /* xxx */ /* Shields */ #define EGO_ENDURE_ACID 16 #define EGO_ENDURE_ELEC 17 #define EGO_ENDURE_FIRE 18 #define EGO_ENDURE_COLD 19 #define EGO_ENDURANCE 20 #define EGO_NIGHT_DAY 21 /* Added in Oangband. */ /* xxx */ /* xxx */ /* Crowns and Helms */ #define EGO_INTELLIGENCE 24 #define EGO_WISDOM 25 #define EGO_BEAUTY 26 #define EGO_MAGI 27 #define EGO_MIGHT 28 #define EGO_LORDLINESS 29 #define EGO_SEEING 30 #define EGO_SERENITY 31 /* Changed in Oangband. */ #define EGO_LITE 32 #define EGO_TELEPATHY 33 #define EGO_REGENERATION 34 #define EGO_TELEPORTATION 35 #define EGO_STUPIDITY 36 #define EGO_NAIVETY 37 #define EGO_UGLINESS 38 #define EGO_SICKLINESS 39 /* Cloaks */ #define EGO_PROTECTION 40 #define EGO_STEALTH 41 #define EGO_AMAN 42 /* xxx */ #define EGO_ENVELOPING 44 #define EGO_VULNERABILITY 45 #define EGO_IRRITATION 46 #define EGO_SHARD_PROT 47 /* Added in Oangband. */ /* Gloves */ #define EGO_FREE_ACTION 48 #define EGO_SLAYING 49 #define EGO_AGILITY 50 #define EGO_POWER 51 #define EGO_MAGIC_MASTERY 52 /* Added in Oangband. */ /* xxx */ #define EGO_WEAKNESS 54 #define EGO_CLUMSINESS 55 /* Boots */ #define EGO_SLOW_DESCENT 56 #define EGO_QUIET 57 #define EGO_MOTION 58 #define EGO_SPEED 59 #define EGO_STABILITY 60 /* Added in Oangband. */ #define EGO_NOISE 61 #define EGO_SLOWNESS 62 #define EGO_TORMENT 63 /* Weapons */ #define EGO_HA 64 #define EGO_DF 65 #define EGO_BLESS_BLADE 66 /* xxx */ #define EGO_WEST 68 /* xxx */ /* xxx */ /* xxx */ #define EGO_BRAND_ACID 72 #define EGO_BRAND_ELEC 73 #define EGO_BRAND_FIRE 74 #define EGO_BRAND_COLD 75 #define EGO_BRAND_POIS 76 /* Added in Oangband. */ #define EGO_BALROG 77 /* Added in Oangband. */ /* xxx */ /* xxx */ #define EGO_SLAY_ANIMAL 80 #define EGO_SLAY_EVIL 81 #define EGO_SLAY_UNDEAD 82 #define EGO_SLAY_DEMON 83 #define EGO_SLAY_ORC 84 #define EGO_SLAY_TROLL 85 #define EGO_SLAY_GIANT 86 #define EGO_SLAY_DRAGON 87 #define EGO_KILL_ANIMAL 88 #define EGO_KILL_EVIL 89 #define EGO_KILL_UNDEAD 90 #define EGO_KILL_DEMON 83 #define EGO_KILL_ORC 84 #define EGO_KILL_TROLL 85 #define EGO_KILL_GIANT 86 #define EGO_KILL_DRAGON 95 /* xxx */ /* xxx */ /* xxx */ /* xxx */ #define EGO_DIGGING 100 /* xxx */ #define EGO_MORGUL 102 /* xxx */ /* Bows */ #define EGO_ACCURACY 104 #define EGO_VELOCITY 105 /* xxx */ #define EGO_EXTRA_MIGHT2 107 #define EGO_EXTRA_MIGHT1 108 #define EGO_EXTRA_SHOTS 109 /* xxx */ /* xxx */ /* Ammo */ #define EGO_HURT_ANIMAL 111 #define EGO_HURT_EVIL 112 #define EGO_HURT_UNDEAD 113 #define EGO_HURT_DEMON 114 #define EGO_HURT_ORC 115 #define EGO_HURT_TROLL 116 #define EGO_HURT_GIANT 117 #define EGO_HURT_DRAGON 118 #define EGO_ACIDIC 119 /* Added in Oangband. */ #define EGO_ELECT 120 /* Added in Oangband. */ #define EGO_FLAME 121 #define EGO_FROST 122 #define EGO_POISON 123 /* Added in Oangband. */ #define EGO_WOUNDING 124 #define EGO_BACKBITING 125 #define EGO_SHATTERED 126 #define EGO_BLASTED 127 /*** Activation Indexes. Max is 255. -LM- ***/ /* Special Artifact activations. */ #define ACT_GALADRIEL 1 #define ACT_ELENDIL 2 #define ACT_THRAIN 3 #define ACT_CARLAMMAS 4 #define ACT_INGWE 5 #define ACT_BOROMIR 7 #define ACT_FARAMIR 8 #define ACT_BARAHIR 9 #define ACT_TULKAS 10 #define ACT_NARYA 11 #define ACT_NENYA 12 #define ACT_VILYA 13 #define ACT_POWER 14 #define ACT_STONE_LORE 15 /* Armour Activations. */ #define ACT_RAZORBACK 22 #define ACT_BLADETURNER 23 #define ACT_SOULKEEPER 24 #define ACT_BELEGENNON 25 #define ACT_CELEBORN 26 #define ACT_CASPANION 27 #define ACT_HIMRING 28 #define ACT_ELEMENTS 32 #define ACT_EARENDIL 33 #define ACT_GIL_GALAD 34 #define ACT_HOLHENNETH 37 #define ACT_GONDOR 38 #define ACT_VALINOR 41 #define ACT_HOLCOLLETH 42 #define ACT_THINGOL 43 #define ACT_COLANNON 44 #define ACT_LUTHIEN 45 #define ACT_CAMMITHRIM 52 #define ACT_EOL 53 #define ACT_PAURNIMMEN 54 #define ACT_PAURAEGEN 55 #define ACT_PAURNEN 56 #define ACT_FINGOLFIN 57 #define ACT_FEANOR 61 #define ACT_DAL 62 #define ACT_GIMLI 63 /* Artifact Weapon Activations. */ #define ACT_NARTHANC 66 #define ACT_NIMTHANC 67 #define ACT_DETHANC 68 #define ACT_RILIA 69 #define ACT_BELANGIL 70 #define ACT_ARUNRUTH 71 #define ACT_RINGIL 72 #define ACT_ANDURIL 73 #define ACT_THEODEN 78 #define ACT_AEGLOS 79 #define ACT_OROME 80 #define ACT_EONWE 81 #define ACT_LOTHARANG 82 #define ACT_ULMO 83 #define ACT_AVAVIR 84 #define ACT_TOTILA 89 #define ACT_FIRESTAR 90 #define ACT_TARATOL 91 #define ACT_ERIRIL 92 #define ACT_OLORIN 93 #define ACT_TURMIL 94 #define ACT_HARAD 99 #define ACT_CUBRAGOL 100 #define ACT_BUCKLAND 101 /* Random Artifacts */ #define ACT_RANDOM_FIRE1 135 #define ACT_RANDOM_FIRE2 136 #define ACT_RANDOM_FIRE3 137 #define ACT_RANDOM_COLD1 138 #define ACT_RANDOM_COLD2 139 #define ACT_RANDOM_COLD3 140 #define ACT_RANDOM_ACID1 141 #define ACT_RANDOM_ACID2 142 #define ACT_RANDOM_ACID3 143 #define ACT_RANDOM_ELEC1 144 #define ACT_RANDOM_ELEC2 145 #define ACT_RANDOM_ELEC3 146 #define ACT_RANDOM_POIS1 147 #define ACT_RANDOM_POIS2 148 #define ACT_RANDOM_LIGHT1 149 #define ACT_RANDOM_LIGHT2 150 #define ACT_RANDOM_DISPEL_UNDEAD 151 #define ACT_RANDOM_DISPEL_EVIL 152 #define ACT_RANDOM_SMITE_UNDEAD 153 #define ACT_RANDOM_SMITE_DEMON 154 #define ACT_RANDOM_SMITE_DRAGON 155 #define ACT_RANDOM_HOLY_ORB 156 #define ACT_RANDOM_BLESS 157 #define ACT_RANDOM_FRIGHTEN_ALL 158 #define ACT_RANDOM_HEAL1 159 #define ACT_RANDOM_HEAL2 160 #define ACT_RANDOM_HEAL3 161 #define ACT_RANDOM_CURE 162 #define ACT_RANDOM_PROT_FROM_EVIL 163 #define ACT_RANDOM_CHAOS 164 #define ACT_RANDOM_SHARD_SOUND 165 #define ACT_RANDOM_NETHR 166 #define ACT_RANDOM_LINE_LIGHT 167 #define ACT_RANDOM_STARLIGHT 168 #define ACT_RANDOM_EARTHQUAKE 169 #define ACT_RANDOM_IDENTIFY 170 #define ACT_RANDOM_SPEED 171 #define ACT_RANDOM_TELEPORT_AWAY 172 #define ACT_RANDOM_HEROISM 173 #define ACT_RANDOM_STORM_DANCE 174 #define ACT_RANDOM_RESIST_ELEMENTS 175 #define ACT_RANDOM_RESIST_ALL 176 #define ACT_RANDOM_TELEPORT1 177 #define ACT_RANDOM_TELEPORT2 178 #define ACT_RANDOM_RECALL 179 #define ACT_RANDOM_REGAIN 180 #define ACT_RANDOM_RESTORE 181 #define ACT_RANDOM_SHIELD 182 #define ACT_RANDOM_BRAND_MISSILE 183 #define ACT_RANDOM_SUPER_SHOOTING 184 #define ACT_RANDOM_DETECT_MONSTERS 185 #define ACT_RANDOM_DETECT_EVIL 186 #define ACT_RANDOM_DETECT_ALL 187 #define ACT_RANDOM_MAGIC_MAP 188 #define ACT_RANDOM_DETECT_D_S_T 189 #define ACT_RANDOM_CONFU_FOE 190 #define ACT_RANDOM_SLEEP_FOE 191 #define ACT_RANDOM_TURN_FOE 192 #define ACT_RANDOM_SLOW_FOE 193 #define ACT_RANDOM_BANISH_EVIL 194 #define ACT_RANDOM_DISARM 195 #define ACT_RANDOM_CONFU_FOES 196 #define ACT_RANDOM_SLEEP_FOES 197 #define ACT_RANDOM_TURN_FOES 198 #define ACT_RANDOM_SLOW_FOES 199 /* Dragon Scale Mails */ #define ACT_DRAGON_BLUE 200 #define ACT_DRAGON_WHITE 201 #define ACT_DRAGON_BLACK 202 #define ACT_DRAGON_GREEN 203 #define ACT_DRAGON_RED 204 #define ACT_DRAGON_MULTIHUED 205 #define ACT_DRAGON_BRONZE 206 #define ACT_DRAGON_GOLD 207 #define ACT_DRAGON_CHAOS 208 #define ACT_DRAGON_LAW 209 #define ACT_DRAGON_BALANCE 210 #define ACT_DRAGON_SHINING 211 #define ACT_DRAGON_POWER 212 /* Rings and Amulets */ #define ACT_RING_ACID 220 #define ACT_RING_ELEC 221 #define ACT_RING_FIRE 222 #define ACT_RING_COLD 223 #define ACT_AMULET_ESCAPING 224 #define ACT_AMULET_LION 225 /* Ego-items */ #define ACT_BALROG_WHIP 245 /*** Object "tval" and "sval" codes ***/ /* * The values for the "tval" field of various objects. * * This value is the primary means by which items are sorted in the * player inventory, followed by "sval" and "cost". * * Note that a "BOW" with tval = 19 and sval S = 10*N+P takes a missile * weapon with tval = 16+N, and does (xP) damage when so combined. This * fact is not actually used in the source, but it is kind of interesting. * * Note that as of 2.7.8, the "item flags" apply to all items, though * only armor and weapons and a few other items use any of these flags. */ #define TV_SKELETON 1 /* Skeletons ('`') */ #define TV_BOTTLE 2 /* Empty bottles ('!') */ #define TV_JUNK 3 /* Sticks, Pottery, etc ('`'). */ #define TV_SPIKE 5 /* Spikes ('`') */ #define TV_CHEST 7 /* Chests ('~') */ #define TV_SHOT 16 /* Ammo for slings */ #define TV_ARROW 17 /* Ammo for bows */ #define TV_BOLT 18 /* Ammo for x-bows */ #define TV_BOW 19 /* Slings/Bows/Xbows */ #define TV_DIGGING 20 /* Shovels/Picks */ #define TV_HAFTED 21 /* Priest Weapons */ #define TV_POLEARM 22 /* Axes and Pikes */ #define TV_SWORD 23 /* Edged Weapons */ #define TV_BOOTS 30 /* Boots */ #define TV_GLOVES 31 /* Gloves */ #define TV_HELM 32 /* Helms */ #define TV_CROWN 33 /* Crowns */ #define TV_SHIELD 34 /* Shields */ #define TV_CLOAK 35 /* Cloaks */ #define TV_SOFT_ARMOR 36 /* Soft Armor */ #define TV_HARD_ARMOR 37 /* Hard Armor */ #define TV_DRAG_ARMOR 38 /* Dragon Scale Mail */ #define TV_LITE 39 /* Lites (including Specials) */ #define TV_AMULET 40 /* Amulets (including Specials) */ #define TV_RING 45 /* Rings (including Specials) */ #define TV_STAFF 55 /* Staffs */ #define TV_WAND 65 /* Wands */ #define TV_ROD 66 /* Rods */ #define TV_SCROLL 70 /* Scrolls */ #define TV_POTION 75 /* Potions */ #define TV_FLASK 77 /* Flasks */ #define TV_FOOD 80 /* Food and mushrooms */ #define TV_MAGIC_BOOK 90 /* Mage and Rogue books */ #define TV_PRAYER_BOOK 91 /* Priest and Paladin books */ #define TV_DRUID_BOOK 92 /* Druid and Ranger books */ #define TV_NECRO_BOOK 93 /* Necromancer and Assassin books */ #define TV_GOLD 100 /* Gold can only be picked up by players */ /* Special note: the constant "TV_MAGIC_BOOK" is used as a base index in * all tables concerning player spells, so make certain all the tvals for * spell books follow each other in sequential order. At some point, I * may replace it with the more flexible MAX_REALM. -LM- */ /* The "sval" codes for TV_CHEST. -LM- */ #define SV_SW_CHEST 1 /* Small wooden chest. */ #define SV_SI_CHEST 2 /* Small iron chest. */ #define SV_SS_CHEST 3 /* Small steel chest. */ #define SV_SJ_CHEST 4 /* Small jeweled chest. */ #define SV_LW_CHEST 5 /* Large wooden chest. */ #define SV_LI_CHEST 6 /* Large iron chest. */ #define SV_LS_CHEST 7 /* Large steel chest. */ #define SV_LJ_CHEST 8 /* Large jeweled chest. */ /* The "sval" codes for TV_SHOT/TV_ARROW/TV_BOLT */ #define SV_AMMO_NORMAL 1 /* shots, arrows, bolts */ #define SV_AMMO_HEAVY 2 /* seeker shots, arrows, bolts */ /* The "sval" codes for TV_BOW (note information in "sval") */ #define SV_SLING 2 /* (x2) */ #define SV_SHORT_BOW 12 /* (x2) */ #define SV_LONG_BOW 13 /* (x3) */ #define SV_LIGHT_XBOW 23 /* (x3) */ #define SV_HEAVY_XBOW 24 /* (x4) */ /* The "sval" codes for TV_DIGGING */ #define SV_SHOVEL 1 #define SV_GNOMISH_SHOVEL 2 #define SV_DWARVEN_SHOVEL 3 #define SV_PICK 4 #define SV_ORCISH_PICK 5 #define SV_DWARVEN_PICK 6 /* The "sval" values for TV_HAFTED */ #define SV_WHIP 2 /* 1d5 */ #define SV_QUARTERSTAFF 3 /* 1d7 */ #define SV_THROWING_HAMMER 4 /* 2d4 */ #define SV_MACE 5 /* 2d4 */ #define SV_BALL_AND_CHAIN 6 /* 2d4 */ #define SV_WAR_HAMMER 8 /* 3d3 */ #define SV_SPIKED_CLUB 10 /* 1d7 */ #define SV_MORNING_STAR 12 /* 2d6 */ #define SV_FLAIL 13 /* 2d6 */ #define SV_LEAD_FILLED_MACE 15 /* 3d4 */ #define SV_STORM_HAMMER 17 /* 1d11 */ #define SV_TWO_HANDED_FLAIL 18 /* 3d6 */ #define SV_MACE_OF_DISRUPTION 20 /* 4d8 */ #define SV_GROND 50 /* 3d4 */ /* The "sval" values for TV_POLEARM */ #define SV_SPEAR 2 /* 1d6 */ #define SV_THRUSTING_SPEAR 3 /* 1d7 */ #define SV_TRIDENT 5 /* 1d7 */ #define SV_PIKE 8 /* 1d11 */ #define SV_BEAKED_AXE 10 /* 2d6 */ #define SV_BROAD_AXE 11 /* 2d6 */ #define SV_GLAIVE 13 /* 3d4 */ #define SV_THROWING_AXE 14 /* 2d3 */ #define SV_HALBERD 15 /* 3d5 */ #define SV_SCYTHE 17 /* 5d3 */ #define SV_LANCE 20 /* 3d8 */ #define SV_BATTLE_AXE 22 /* 2d8 */ #define SV_GREAT_AXE 25 /* 4d4 */ #define SV_DART 28 /* 1d5 */ #define SV_SCYTHE_OF_SLICING 30 /* 6d4 */ /* The "sval" codes for TV_SWORD */ #define SV_BROKEN_SWORD 2 /* 1d2 */ #define SV_DAGGER 4 /* 1d4 */ #define SV_MAIN_GAUCHE 5 /* 1d5 */ #define SV_RAPIER 7 /* 1d6 */ #define SV_SMALL_SWORD 8 /* 1d6 */ #define SV_SHORT_SWORD 10 /* 1d7 */ #define SV_SABRE 11 /* 1d7 */ #define SV_CUTLASS 12 /* 1d7 */ #define SV_FALCHION 15 /* 2d4 */ #define SV_BROAD_SWORD 16 /* 2d5 */ #define SV_LONG_SWORD 17 /* 2d5 */ #define SV_SCIMITAR 18 /* 2d5 */ #define SV_KATANA 20 /* 3d4 */ #define SV_BASTARD_SWORD 21 /* 3d4 */ #define SV_TWO_HANDED_SWORD 25 /* 3d6 */ #define SV_EXECUTIONERS_SWORD 28 /* 4d5 */ #define SV_BLADE_OF_CHAOS 30 /* 4d6 */ /* The "sval" codes for TV_SHIELD */ #define SV_WICKER_SHIELD 1 #define SV_SMALL_LEATHER_SHIELD 2 #define SV_SMALL_METAL_SHIELD 3 #define SV_LARGE_LEATHER_SHIELD 4 #define SV_LARGE_METAL_SHIELD 5 #define SV_KNIGHTS_SHIELD 6 #define SV_BODY_SHIELD 7 #define SV_SHIELD_OF_DEFLECTION 10 /* The "sval" codes for TV_HELM */ #define SV_HARD_LEATHER_CAP 2 #define SV_METAL_CAP 3 #define SV_BARBUT 4 #define SV_IRON_HELM 5 #define SV_STEEL_HELM 6 /* The "sval" codes for TV_CROWN */ #define SV_IRON_CROWN 10 #define SV_GOLDEN_CROWN 11 #define SV_JEWELED_CROWN 12 #define SV_MORGOTH 50 /* The "sval" codes for TV_BOOTS */ #define SV_PAIR_OF_LEATHER_SANDALS 1 #define SV_PAIR_OF_SOFT_LEATHER_BOOTS 2 #define SV_PAIR_OF_HARD_LEATHER_BOOTS 3 #define SV_PAIR_OF_METAL_SHOD_BOOTS 4 #define SV_PAIR_OF_DWARVEN_BOOTS 5 /* The "sval" codes for TV_CLOAK */ #define SV_CLOAK 1 #define SV_ELVEN_CLOAK 2 #define SV_SHADOW_CLOAK 4 #define SV_ETHEREAL_CLOAK 6 /* The "sval" codes for TV_GLOVES */ #define SV_SET_OF_LEATHER_GLOVES 1 #define SV_SET_OF_MAIL_GAUNTLETS 2 #define SV_SET_OF_STEEL_GAUNTLETS 2 #define SV_SET_OF_CESTI 4 /* The "sval" codes for TV_SOFT_ARMOR */ #define SV_FILTHY_RAG 1 #define SV_ROBE 2 #define SV_SOFT_LEATHER_ARMOR 4 #define SV_SOFT_STUDDED_LEATHER 5 #define SV_HARD_LEATHER_ARMOR 6 #define SV_HARD_STUDDED_LEATHER 7 #define SV_LEATHER_SCALE_MAIL 11 /* The "sval" codes for TV_HARD_ARMOR */ #define SV_RUSTY_CHAIN_MAIL 1 /* 14- */ #define SV_METAL_SCALE_MAIL 3 /* 13 */ #define SV_CHAIN_MAIL 4 /* 14 */ #define SV_AUGMENTED_CHAIN_MAIL 6 /* 16 */ #define SV_DOUBLE_CHAIN_MAIL 7 /* 16 */ #define SV_BAR_CHAIN_MAIL 8 /* 18 */ #define SV_METAL_BRIGANDINE_ARMOUR 9 /* 19 */ #define SV_PARTIAL_PLATE_ARMOUR 12 /* 22 */ #define SV_METAL_LAMELLAR_ARMOUR 13 /* 23 */ #define SV_FULL_PLATE_ARMOUR 15 /* 25 */ #define SV_RIBBED_PLATE_ARMOUR 18 /* 28 */ #define SV_MITHRIL_CHAIN_MAIL 20 /* 28+ */ #define SV_MITHRIL_PLATE_MAIL 25 /* 35+ */ #define SV_ADAMANTITE_PLATE_MAIL 30 /* 40+ */ /* The "sval" codes for TV_DRAG_ARMOR */ #define SV_DRAGON_BLACK 1 #define SV_DRAGON_BLUE 2 #define SV_DRAGON_WHITE 3 #define SV_DRAGON_RED 4 #define SV_DRAGON_GREEN 5 #define SV_DRAGON_MULTIHUED 6 #define SV_DRAGON_SHINING 10 #define SV_DRAGON_LAW 12 #define SV_DRAGON_BRONZE 14 #define SV_DRAGON_GOLD 16 #define SV_DRAGON_CHAOS 18 #define SV_DRAGON_BALANCE 20 #define SV_DRAGON_POWER 30 /* The sval codes for TV_LITE */ #define SV_LITE_TORCH 0 #define SV_LITE_LANTERN 1 #define SV_LITE_GALADRIEL 4 #define SV_LITE_ELENDIL 5 #define SV_LITE_THRAIN 6 #define SV_STONE_LORE 15 /* The "sval" codes for TV_AMULET */ #define SV_AMULET_DOOM 0 #define SV_AMULET_TELEPORT 1 #define SV_AMULET_INTELLIGENCE 2 #define SV_AMULET_SLOW_DIGEST 3 #define SV_AMULET_RESIST_ACID 4 #define SV_AMULET_MAGIC_MASTERY 5 #define SV_AMULET_WISDOM 6 #define SV_AMULET_CHARISMA 7 #define SV_AMULET_THE_MAGI 8 #define SV_AMULET_ESCAPING 9 #define SV_AMULET_CARLAMMAS 10 #define SV_AMULET_INGWE 11 #define SV_AMULET_DWARVES 12 #define SV_AMULET_BOROMIR 13 #define SV_AMULET_FARAMIR 14 #define SV_AMULET_LION 15 /* The sval codes for TV_RING */ #define SV_RING_WOE 0 #define SV_RING_AGGRAVATION 1 #define SV_RING_WEAKNESS 2 #define SV_RING_STUPIDITY 3 #define SV_RING_TELEPORTATION 4 #define SV_RING_ESP 5 #define SV_RING_SLOW_DIGESTION 6 #define SV_RING_FEATHER_FALL 7 #define SV_RING_RESIST_FIRE 8 #define SV_RING_RESIST_COLD 9 #define SV_RING_SUST_STR_CHR 10 #define SV_RING_SUST_INT_WIS 11 #define SV_RING_SUST_DEX_CON 12 #define SV_RING_RESIST_NETHER 13 #define SV_RING_RESIST_LIGHT_DARK 14 #define SV_RING_ELEC 15 #define SV_RING_PROTECTION 16 #define SV_RING_ACID 17 #define SV_RING_FLAMES 18 #define SV_RING_ICE 19 #define SV_RING_RESIST_POIS 20 #define SV_RING_FREE_ACTION 21 #define SV_RING_SEE_INVIS 22 #define SV_RING_SEARCHING 23 #define SV_RING_STR 24 /* xxx */ #define SV_RING_DEX 26 #define SV_RING_CON 27 #define SV_RING_SKILL 28 #define SV_RING_DEADLINESS 29 #define SV_RING_COMBAT 30 #define SV_RING_SPEED 31 #define SV_RING_BARAHIR 32 #define SV_RING_TULKAS 33 #define SV_RING_NARYA 34 #define SV_RING_NENYA 35 #define SV_RING_VILYA 36 #define SV_RING_POWER 37 /* The "sval" codes for TV_STAFF */ #define SV_STAFF_DARKNESS 0 #define SV_STAFF_SLOWNESS 1 #define SV_STAFF_HASTE_MONSTERS 2 #define SV_STAFF_SUMMONING 3 #define SV_STAFF_TELEPORTATION 4 #define SV_STAFF_IDENTIFY 5 #define SV_STAFF_REMOVE_CURSE 6 #define SV_STAFF_STARLIGHT 7 #define SV_STAFF_LITE 8 #define SV_STAFF_MAPPING 9 #define SV_STAFF_DETECT_GOLD 10 #define SV_STAFF_DETECT_ITEM 11 #define SV_STAFF_DETECT_TRAP 12 #define SV_STAFF_DETECT_DOOR 13 #define SV_STAFF_DETECT_INVIS 14 #define SV_STAFF_DETECT_EVIL 15 #define SV_STAFF_CURE_MEDIUM 16 #define SV_STAFF_CURING 17 #define SV_STAFF_HEALING 18 #define SV_STAFF_BANISHMENT 19 #define SV_STAFF_SLEEP_MONSTERS 20 #define SV_STAFF_SLOW_MONSTERS 21 #define SV_STAFF_SPEED 22 #define SV_STAFF_PROBING 23 #define SV_STAFF_DISPEL_EVIL 24 #define SV_STAFF_POWER 25 #define SV_STAFF_HOLINESS 26 #define SV_STAFF_GENOCIDE 27 #define SV_STAFF_EARTHQUAKES 28 #define SV_STAFF_DESTRUCTION 29 #define SV_STAFF_DETECTION 30 #define SV_STAFF_MSTORM 31 #define SV_STAFF_STARBURST 32 #define SV_STAFF_MASS_CONFU 33 #define SV_STAFF_GANDALF 40 #define SV_STAFF_WINDS 41 #define SV_STAFF_MENELTARMA 42 #define SV_STAFF_RADAGAST 43 /* The "sval" codes for TV_WAND */ #define SV_WAND_HEAL_MONSTER 0 #define SV_WAND_HASTE_MONSTER 1 #define SV_WAND_CLONE_MONSTER 2 #define SV_WAND_TELEPORT_AWAY 3 #define SV_WAND_DISARMING 4 #define SV_WAND_DOOR_DEST 5 #define SV_WAND_STONE_TO_MUD 6 #define SV_WAND_LITE 7 #define SV_WAND_SLEEP_MONSTER 8 #define SV_WAND_SLOW_MONSTER 9 #define SV_WAND_CONFUSE_MONSTER 10 #define SV_WAND_FEAR_MONSTER 11 #define SV_WAND_DRAIN_LIFE 12 #define SV_WAND_POLYMORPH 13 #define SV_WAND_STINKING_CLOUD 14 #define SV_WAND_MAGIC_MISSILE 15 #define SV_WAND_ACID_BOLT 16 #define SV_WAND_ELEC_BOLT 17 #define SV_WAND_FIRE_BOLT 18 #define SV_WAND_COLD_BOLT 19 #define SV_WAND_ACID_BALL 20 #define SV_WAND_ELEC_BALL 21 #define SV_WAND_FIRE_BALL 22 #define SV_WAND_COLD_BALL 23 #define SV_WAND_WONDER 24 #define SV_WAND_ANNIHILATION 25 #define SV_WAND_DRAGON_FIRE 26 #define SV_WAND_DRAGON_COLD 27 #define SV_WAND_DRAGON_BREATH 28 #define SV_WAND_STRIKING 29 #define SV_WAND_STORMS 30 #define SV_WAND_SHARD_BOLT 31 #define SV_WAND_ILKORIN 40 #define SV_WAND_SARUMAN 41 #define SV_WAND_UNMAKING 42 #define SV_WAND_ULPION 43 /* The "sval" codes for TV_ROD */ #define SV_ROD_DETECT_TRAP 0 #define SV_ROD_DETECT_DOOR 1 #define SV_ROD_IDENTIFY 2 #define SV_ROD_RECALL 3 #define SV_ROD_ILLUMINATION 4 #define SV_ROD_MAPPING 5 /* xxx (aimed) */ #define SV_ROD_PROBING 7 #define SV_ROD_CURING 8 #define SV_ROD_HEALING 9 #define SV_ROD_RESTORATION 10 #define SV_ROD_SPEED 11 /* xxx (aimed) */ #define SV_ROD_TELEPORT_AWAY 13 #define SV_ROD_DISARMING 14 #define SV_ROD_LITE 15 #define SV_ROD_SLEEP_MONSTER 16 #define SV_ROD_SLOW_MONSTER 17 #define SV_ROD_DRAIN_LIFE 18 #define SV_ROD_POLYMORPH 19 #define SV_ROD_ACID_BOLT 20 #define SV_ROD_ELEC_BOLT 21 #define SV_ROD_FIRE_BOLT 22 #define SV_ROD_COLD_BOLT 23 #define SV_ROD_ACID_BALL 24 #define SV_ROD_ELEC_BALL 25 #define SV_ROD_FIRE_BALL 26 #define SV_ROD_COLD_BALL 27 #define SV_ROD_LIGHTINGSTRIKE 28 #define SV_ROD_NORTHWINDS 29 #define SV_ROD_DRAGONFIRE 30 #define SV_ROD_GLAURUNGS 31 #define SV_ROD_ROUSE_LEVEL 32 #define SV_ROD_DELVING 40 #define SV_ROD_SHADOW 41 #define SV_ROD_AIR 42 #define SV_ROD_PORTALS 43 /* The "sval" codes for TV_SCROLL */ #define SV_SCROLL_DARKNESS 0 #define SV_SCROLL_AGGRAVATE_MONSTER 1 #define SV_SCROLL_CURSE_ARMOR 2 #define SV_SCROLL_CURSE_WEAPON 3 #define SV_SCROLL_SUMMON_MONSTER 4 #define SV_SCROLL_SUMMON_UNDEAD 5 /* xxx (summon?) */ #define SV_SCROLL_TRAP_CREATION 7 #define SV_SCROLL_PHASE_DOOR 8 #define SV_SCROLL_TELEPORT 9 #define SV_SCROLL_TELEPORT_LEVEL 10 #define SV_SCROLL_WORD_OF_RECALL 11 #define SV_SCROLL_IDENTIFY 12 #define SV_SCROLL_STAR_IDENTIFY 13 #define SV_SCROLL_REMOVE_CURSE 14 #define SV_SCROLL_STAR_REMOVE_CURSE 15 #define SV_SCROLL_ENCHANT_ARMOR 16 #define SV_SCROLL_ENCHANT_WEAPON_TO_HIT 17 #define SV_SCROLL_ENCHANT_WEAPON_TO_DAM 18 #define SV_SCROLL_STAR_RECHARGING 19 #define SV_SCROLL_STAR_ENCHANT_ARMOR 20 #define SV_SCROLL_STAR_ENCHANT_WEAPON 21 #define SV_SCROLL_RECHARGING 22 #define SV_SCROLL_BRANDING 23 #define SV_SCROLL_LIGHT 24 #define SV_SCROLL_MAPPING 25 #define SV_SCROLL_DETECT_GOLD 26 #define SV_SCROLL_DETECT_ITEM 27 #define SV_SCROLL_DETECT_TRAP 28 #define SV_SCROLL_DETECT_DOOR 29 #define SV_SCROLL_DETECT_INVIS 30 /* xxx (detect evil?) */ #define SV_SCROLL_SATISFY_HUNGER 32 #define SV_SCROLL_BLESSING 33 #define SV_SCROLL_HOLY_CHANT 34 #define SV_SCROLL_HOLY_PRAYER 35 #define SV_SCROLL_MONSTER_CONFUSION 36 #define SV_SCROLL_PROTECTION_FROM_EVIL 37 #define SV_SCROLL_RUNE_OF_PROTECTION 38 #define SV_SCROLL_DOOR_DESTRUCTION 39 #define SV_SCROLL_FRIGHTENING 40 #define SV_SCROLL_STAR_DESTRUCTION 41 #define SV_SCROLL_DISPEL_UNDEAD 42 /* xxx */ #define SV_SCROLL_GENOCIDE 44 #define SV_SCROLL_MASS_GENOCIDE 45 #define SV_SCROLL_ACQUIREMENT 46 #define SV_SCROLL_STAR_ACQUIREMENT 47 #define SV_SCROLL_ELE_ATTACKS 48 /* The "sval" codes for TV_POTION */ #define SV_POTION_WATER 0 #define SV_POTION_APPLE_JUICE 1 #define SV_POTION_SLIME_MOLD 2 /* xxx (fixed color) */ #define SV_POTION_SLOWNESS 4 #define SV_POTION_SALT_WATER 5 #define SV_POTION_POISON 6 #define SV_POTION_BLINDNESS 7 /* xxx */ #define SV_POTION_CONFUSION 9 /* xxx */ #define SV_POTION_SLEEP 11 /* xxx */ #define SV_POTION_LOSE_MEMORIES 13 /* xxx */ #define SV_POTION_RUINATION 15 #define SV_POTION_DEC_STR 16 #define SV_POTION_DEC_INT 17 #define SV_POTION_DEC_WIS 18 #define SV_POTION_DEC_DEX 19 #define SV_POTION_DEC_CON 20 #define SV_POTION_DEC_CHR 21 #define SV_POTION_DETONATIONS 22 #define SV_POTION_DEATH 23 #define SV_POTION_INFRAVISION 24 #define SV_POTION_DETECT_INVIS 25 #define SV_POTION_SLOW_POISON 26 #define SV_POTION_CURE_POISON 27 #define SV_POTION_BOLDNESS 28 #define SV_POTION_SPEED 29 #define SV_POTION_RESIST_HEAT_COLD 30 #define SV_POTION_RESIST_ACID_ELEC 31 #define SV_POTION_HEROISM 32 #define SV_POTION_BERSERK_STR 33 #define SV_POTION_CURE_LIGHT 34 #define SV_POTION_CURE_SERIOUS 35 #define SV_POTION_CURE_CRITICAL 36 #define SV_POTION_HEALING 37 #define SV_POTION_STAR_HEALING 38 #define SV_POTION_LIFE 39 #define SV_POTION_RESTORE_MANA 40 #define SV_POTION_RESTORE_EXP 41 #define SV_POTION_RES_STR 42 #define SV_POTION_RES_INT 43 #define SV_POTION_RES_WIS 44 #define SV_POTION_RES_DEX 45 #define SV_POTION_RES_CON 46 #define SV_POTION_RES_CHR 47 #define SV_POTION_INC_STR 48 #define SV_POTION_INC_INT 49 #define SV_POTION_INC_WIS 50 #define SV_POTION_INC_DEX 51 #define SV_POTION_INC_CON 52 #define SV_POTION_INC_CHR 53 #define SV_POTION_RESIST_ALL 54 #define SV_POTION_AUGMENTATION 55 #define SV_POTION_ENLIGHTENMENT 56 #define SV_POTION_STAR_ENLIGHTENMENT 57 #define SV_POTION_SELF_KNOWLEDGE 58 #define SV_POTION_EXPERIENCE 59 #define SV_POTION_VAMPIRE 60 /* The "sval" codes for TV_FOOD */ #define SV_FOOD_POISON 0 #define SV_FOOD_BLINDNESS 1 #define SV_FOOD_PARANOIA 2 #define SV_FOOD_CONFUSION 3 #define SV_FOOD_HALLUCINATION 4 #define SV_FOOD_PARALYSIS 5 #define SV_FOOD_WEAKNESS 6 #define SV_FOOD_SICKNESS 7 #define SV_FOOD_STUPIDITY 8 #define SV_FOOD_NAIVETY 9 #define SV_FOOD_UNHEALTH 10 #define SV_FOOD_DISEASE 11 #define SV_FOOD_CURE_POISON 12 #define SV_FOOD_CURE_BLINDNESS 13 #define SV_FOOD_CURE_PARANOIA 14 #define SV_FOOD_CURE_CONFUSION 15 #define SV_FOOD_CURE_SERIOUS 16 #define SV_FOOD_RESTORE_STR 17 #define SV_FOOD_RESTORE_CON 18 #define SV_FOOD_RESTORING 19 /* many missing mushrooms */ #define SV_FOOD_BISCUIT 32 #define SV_FOOD_JERKY 33 #define SV_FOOD_RATION 35 #define SV_FOOD_SLIME_MOLD 36 #define SV_FOOD_WAYBREAD 37 #define SV_FOOD_PINT_OF_ALE 38 #define SV_FOOD_PINT_OF_WINE 39 #define SV_FOOD_ATHELAS 40 #define SV_FOOD_BEORNING 41 /* The "sval" codes for TV_GOLD -LM- */ #define SV_COPPER 1 #define SV_SILVER 2 #define SV_GARNETS 3 #define SV_GOLD 4 #define SV_OPALS 5 #define SV_SAPPHIRES 6 #define SV_RUBIES 7 #define SV_DIAMONDS 8 #define SV_EMERALDS 9 #define SV_MITHRIL 10 #define SV_ADAMANTITE 11 /* * Special "sval" limit -- first "normal" food (no longer requires a flavor) */ #define SV_FOOD_MIN_FOOD 32 /* * Maximum base AC of current shield types (used in deflecting missiles and bolts) */ #define MAX_SHIELD_BASE_AC 12 /* * Special "sval" limit -- first "aimed" rod */ #define SV_ROD_MIN_DIRECTION 12 /* * Special "sval" limit -- first "large" chest */ #define SV_CHEST_MIN_LARGE 5 /* * Special "sval" limit -- first "good" magic/prayer book */ #define SV_BOOK_MIN_GOOD 4 /* * Special "sval" limit -- maximum allowed spellbook sval (used to prevent * illegal access to tables) */ #define SV_BOOK_MAX 8 /* * Special "sval" limit -- max treasure sval (used in function "make_gold") */ #define SV_GOLD_MAX 11 /*** Monster blow constants ***/ /* * New monster blow methods */ #define RBM_HIT 1 #define RBM_TOUCH 2 #define RBM_PUNCH 3 #define RBM_KICK 4 #define RBM_CLAW 5 #define RBM_BITE 6 #define RBM_STING 7 #define RBM_XXX1 8 #define RBM_BUTT 9 #define RBM_CRUSH 10 #define RBM_ENGULF 11 #define RBM_XXX2 12 #define RBM_CRAWL 13 #define RBM_DROOL 14 #define RBM_SPIT 15 #define RBM_XXX3 16 #define RBM_GAZE 17 #define RBM_WAIL 18 #define RBM_SPORE 19 #define RBM_XXX4 20 #define RBM_BEG 21 #define RBM_INSULT 22 #define RBM_SNEER 23 #define RBM_REQUEST 24 /* * New monster blow effects */ #define RBE_HURT 1 #define RBE_POISON 2 #define RBE_UN_BONUS 3 #define RBE_UN_POWER 4 #define RBE_EAT_GOLD 5 #define RBE_EAT_ITEM 6 #define RBE_EAT_FOOD 7 #define RBE_EAT_LITE 8 #define RBE_ACID 9 #define RBE_ELEC 10 #define RBE_FIRE 11 #define RBE_COLD 12 #define RBE_BLIND 13 #define RBE_CONFUSE 14 #define RBE_TERRIFY 15 #define RBE_PARALYZE 16 #define RBE_LOSE_STR 17 #define RBE_LOSE_INT 18 #define RBE_LOSE_WIS 19 #define RBE_LOSE_DEX 20 #define RBE_LOSE_CON 21 #define RBE_LOSE_CHR 22 #define RBE_LOSE_ALL 23 #define RBE_SHATTER 24 #define RBE_EXP_10 25 #define RBE_EXP_20 26 #define RBE_EXP_40 27 #define RBE_EXP_80 28 /* 1/x chance of reducing stats (for elemental attacks). From Zangband * -LM- */ #define HURT_CHANCE 25 /*** Function flags ***/ #define PROJECT_NO 0 #define PROJECT_NOT_CLEAR 1 #define PROJECT_CLEAR 2 /* * Bit flags for the "project()" function * * JUMP: Jump directly to the target location (this is a hack) * BEAM: Work as a beam weapon (affect every grid passed through) * ARC: Act as an arc spell (a portion of a caster-centered ball) * THRU: Continue "through" the target (used for "bolts"/"beams") * STOP: Stop as soon as we hit a monster (used for "bolts") * GRID: Affect each grid in the "blast area" in some way * ITEM: Affect each object in the "blast area" in some way * KILL: Affect each monster in the "blast area" in some way * PLAY: Explicitly affect the player * HIDE: Hack -- disable "visual" feedback from projection * CHCK: Note occupied grids, but do not stop at them. */ #define PROJECT_JUMP 0x0001 #define PROJECT_BEAM 0x0002 #define PROJECT_SAFE 0x0004 #define PROJECT_ARC 0x0008 #define PROJECT_THRU 0x0010 #define PROJECT_STOP 0x0020 #define PROJECT_GRID 0x0040 #define PROJECT_ITEM 0x0080 #define PROJECT_KILL 0x0100 #define PROJECT_PLAY 0x0200 #define PROJECT_HIDE 0x0400 #define PROJECT_CHCK 0x0800 /* * Bit flags for the "enchant()" function */ #define ENCH_TOHIT 0x01 #define ENCH_TODAM 0x02 #define ENCH_TOAC 0x04 /* * Bit flags for the "target_set" function * * KILL: Target monsters * LOOK: Describe grid fully * XTRA: Currently unused flag * GRID: Select from all grids */ #define TARGET_KILL 0x01 #define TARGET_LOOK 0x02 #define TARGET_XTRA 0x04 #define TARGET_GRID 0x08 /* * Bit flags for the "monster_desc" function */ #define MDESC_OBJE 0x01 /* Objective (or Reflexive) */ #define MDESC_POSS 0x02 /* Possessive (or Reflexive) */ #define MDESC_IND1 0x04 /* Indefinites for hidden monsters */ #define MDESC_IND2 0x08 /* Indefinites for visible monsters */ #define MDESC_PRO1 0x10 /* Pronominalize hidden monsters */ #define MDESC_PRO2 0x20 /* Pronominalize visible monsters */ #define MDESC_HIDE 0x40 /* Assume the monster is hidden */ #define MDESC_SHOW 0x80 /* Assume the monster is visible */ /* * Bit flags for the "get_item" function */ #define USE_EQUIP 0x01 /* Allow equip items */ #define USE_INVEN 0x02 /* Allow inven items */ #define USE_FLOOR 0x04 /* Allow floor items */ #define CAN_SQUELCH 0x10 /* Allow selection of all squelched items */ /*** Player flags ***/ /* * Bit flags for the "p_ptr->notice" variable */ #define PN_COMBINE 0x00000001L /* Combine the pack */ #define PN_REORDER 0x00000002L /* Reorder the pack */ /* xxx (many) */ /* * Bit flags for the "p_ptr->update" variable */ #define PU_BONUS 0x00000001L /* Calculate bonuses */ #define PU_TORCH 0x00000002L /* Calculate torch radius */ /* xxx (many) */ #define PU_HP 0x00000010L /* Calculate chp and mhp */ #define PU_MANA 0x00000020L /* Calculate csp and msp */ #define PU_SPELLS 0x00000040L /* Calculate spells */ #define PU_SPECIALTY 0x00000080L /* Calculate spells */ /* xxx (many) */ #define PU_FORGET_VIEW 0x00010000L /* Forget field of view */ #define PU_UPDATE_VIEW 0x00020000L /* Update field of view */ /* xxx (many) */ #define PU_MONSTERS 0x10000000L /* Update monsters */ #define PU_DISTANCE 0x20000000L /* Update distances */ /* xxx */ #define PU_PANEL 0x80000000L /* Update panel */ /* * Bit flags for the "p_ptr->redraw" variable */ #define PR_MISC 0x00000001L /* Display Race/Class */ #define PR_TITLE 0x00000002L /* Display Title */ #define PR_LEV 0x00000004L /* Display Level */ #define PR_EXP 0x00000008L /* Display Experience */ #define PR_STATS 0x00000010L /* Display Stats */ #define PR_ARMOR 0x00000020L /* Display Armor */ #define PR_HP 0x00000040L /* Display Hitpoints */ #define PR_MANA 0x00000080L /* Display Mana */ #define PR_GOLD 0x00000100L /* Display Gold */ #define PR_DEPTH 0x00000200L /* Display Depth */ #define PR_SHAPE 0x00000400L /* Display Shape. -LM- */ #define PR_HEALTH 0x00000800L /* Display Health Bar */ #define PR_CUT 0x00001000L /* Display Extra (Cut) */ #define PR_STUN 0x00002000L /* Display Extra (Stun) */ #define PR_HUNGER 0x00004000L /* Display Extra (Hunger) */ #define PR_EQUIPPY 0x00008000L /* Display equippy chars */ #define PR_BLIND 0x00010000L /* Display Extra (Blind) */ #define PR_CONFUSED 0x00020000L /* Display Extra (Confused) */ #define PR_AFRAID 0x00040000L /* Display Extra (Afraid) */ #define PR_POISONED 0x00080000L /* Display Extra (Poisoned) */ #define PR_STATE 0x00100000L /* Display Extra (State) */ #define PR_SPEED 0x00200000L /* Display Extra (Speed) */ #define PR_STUDY 0x00400000L /* Display Extra (Study) */ #define PR_DTRAP 0x00800000L /* Display Extra (DTrap) */ #define PR_EXTRA 0x01000000L /* Display Extra Info */ #define PR_BASIC 0x02000000L /* Display Basic Info */ /* xxx */ #define PR_MAP 0x08000000L /* Display Map */ #define PR_WIPE 0x10000000L /* Hack -- Total Redraw */ /* xxx (many) */ #define PR_STATUS 0x80000000L /* Display extra status messages */ /* * Bit flags for the "p_ptr->window" variable (etc) */ #define PW_INVEN 0x00000001L /* Display inven/equip */ #define PW_EQUIP 0x00000002L /* Display equip/inven */ #define PW_PLAYER_0 0x00000004L /* Display player (basic) */ #define PW_PLAYER_1 0x00000008L /* Display player (extra) */ #define PW_SPELL 0x00000010L /* Display spell list */ /* xxx */ /* xxx */ #define PW_MESSAGE 0x00000040L /* Display messages */ #define PW_OVERHEAD 0x00000080L /* Display overhead view */ #define PW_MONSTER 0x00000100L /* Display monster recall */ #define PW_OBJECT 0x00000200L /* Display object recall */ #define PW_DUNGEON 0x00000400L /* Display dungeon view */ #define PW_SNAPSHOT 0x00000800L /* Display snap-shot */ /* xxx */ /* xxx */ #define PW_BORG_1 0x00004000L /* Display borg messages */ #define PW_BORG_2 0x00008000L /* Display borg status */ /* * Bit flags for the "p_ptr->special_attack" variable. -LM- * * Note: The elemental and poison attacks should be managed using the * function "set_ele_attack", in spell2.c. This provides for timeouts and * prevents the player from getting more than one at a time. */ #define ATTACK_NORMAL 0x00000000 #define ATTACK_CONFUSE 0x00000001 #define ATTACK_BLKBRTH 0x00000002 #define ATTACK_FLEE 0x00000004 #define ATTACK_SUPERSHOT 0x00000008 #define ATTACK_ACID 0x00000010 #define ATTACK_ELEC 0x00000020 #define ATTACK_FIRE 0x00000040 #define ATTACK_COLD 0x00000080 #define ATTACK_POIS 0x00000100 #define ATTACK_HOLY 0x00000200 #define ATTACK_DRUID_CONFU 0x00010000 /* Special attack states that may be displayed on screen */ #define ATTACK_NOTICE 0x000003ff /* * Values for shapechanges. From Sangband. */ #define SHAPE_NORMAL 0 /* Unaltered form. */ #define SHAPE_MOUSE 1 #define SHAPE_FERRET 2 #define SHAPE_HOUND 3 #define SHAPE_GAZELLE 4 #define SHAPE_LION 5 #define SHAPE_ENT 6 #define SHAPE_BAT 7 #define SHAPE_WEREWOLF 8 #define SHAPE_VAMPIRE 9 #define SHAPE_WYRM 10 #define SHAPE_BEAR 11 #define SCHANGE \ (p_ptr->schange > 0 && p_ptr->schange < 12) /*** Cave flags ***/ /* * Special cave grid flags */ #define CAVE_MARK 0x01 /* memorized feature */ #define CAVE_GLOW 0x02 /* self-illuminating */ #define CAVE_ICKY 0x04 /* part of a vault */ #define CAVE_ROOM 0x08 /* part of a room */ #define CAVE_SEEN 0x10 /* seen flag */ #define CAVE_VIEW 0x20 /* view flag */ #define CAVE_TEMP 0x40 /* temp flag */ #define CAVE_WALL 0x80 /* wall flag */ /*** Object flags ***/ /* * Chest trap flags (see "tables.c") */ #define CHEST_LOSE_STR 0x0001 #define CHEST_LOSE_CON 0x0002 #define CHEST_POISON 0x0004 #define CHEST_PARALYZE 0x0008 #define CHEST_EXPLODE 0x0010 #define CHEST_SUMMON 0x0020 #define CHEST_SCATTER 0x0040 #define CHEST_E_SUMMON 0x0080 #define CHEST_BIRD_STORM 0x0100 #define CHEST_H_SUMMON 0x0200 #define CHEST_RUNES_OF_EVIL 0x0400 /* * Special Object Flags */ #define IDENT_SENSE 0x01 /* Item has been "sensed" */ #define IDENT_FIXED 0x02 /* Item has been "haggled" */ #define IDENT_EMPTY 0x04 /* Item charges are known */ #define IDENT_KNOWN 0x08 /* Item abilities are known */ #define IDENT_RUMOUR 0x10 /* Item background is known */ #define IDENT_MENTAL 0x20 /* Item information is known */ #define IDENT_CURSED 0x40 /* Item is temporarily cursed */ #define IDENT_BROKEN 0x80 /* Item is permanently worthless */ /* * Game-generated feelings. Used for inscriptions. */ #define FEEL_NONE 0 #define FEEL_BROKEN 1 #define FEEL_TERRIBLE 2 #define FEEL_WORTHLESS 3 #define FEEL_CURSED 4 #define FEEL_UNCURSED 5 #define FEEL_AVERAGE 6 #define FEEL_GOOD 7 #define FEEL_EXCELLENT 8 #define FEEL_SPECIAL 9 #define FEEL_MAX 10 /* * Some bit-flags for the "smart" field * * Most of these map to the "TR2_xxx" flags */ #define SM_OPP_ACID 0x00000001 #define SM_OPP_ELEC 0x00000002 #define SM_OPP_FIRE 0x00000004 #define SM_OPP_COLD 0x00000008 #define SM_OPP_POIS 0x00000010 #define SM_OPP_XXX1 0x00000020 #define SM_OPP_XXX2 0x00000040 #define SM_OPP_XXX3 0x00000080 #define SM_GOOD_SAVE 0x00000100 #define SM_PERF_SAVE 0x00000200 #define SM_IMM_FREE 0x00000400 #define SM_IMM_MANA 0x00000800 #define SM_IMM_ACID 0x00001000 #define SM_IMM_ELEC 0x00002000 #define SM_IMM_FIRE 0x00004000 #define SM_IMM_COLD 0x00008000 #define SM_RES_ACID 0x00010000 #define SM_RES_ELEC 0x00020000 #define SM_RES_FIRE 0x00040000 #define SM_RES_COLD 0x00080000 #define SM_RES_POIS 0x00100000 #define SM_RES_FEAR 0x00200000 #define SM_RES_LITE 0x00400000 #define SM_RES_DARK 0x00800000 #define SM_RES_BLIND 0x01000000 #define SM_RES_CONFU 0x02000000 #define SM_RES_SOUND 0x04000000 #define SM_RES_SHARD 0x08000000 #define SM_RES_NEXUS 0x10000000 #define SM_RES_NETHR 0x20000000 #define SM_RES_CHAOS 0x40000000 #define SM_RES_DISEN 0x80000000 /* Player race Special flags, used for p-info * -BR- */ #define PS_SWORD_SKILL 0x00000001L #define PS_POLEARM_SKILL 0x00000002L #define PS_HAFTED_SKILL 0x00000004L #define PS_SLING_SKILL 0x00000008L #define PS_BOW_SKILL 0x00000010L #define PS_XBOW_SKILL 0x00000020L #define PS_XXX1 0x00000040L #define PS_XXX2 0x00000080L #define PS_XXX3 0x00000100L #define PS_SWORD_UNSKILL 0x00000200L #define PS_POLEARM_UNSKILL 0x00000400L #define PS_HAFTED_UNSKILL 0x00000800L #define PS_SLING_UNSKILL 0x00001000L #define PS_BOW_UNSKILL 0x00002000L #define PS_XBOW_UNSKILL 0x00004000L #define PS_XXX4 0x00008000L #define PS_XXX5 0x00010000L #define PS_XXX6 0x00020000L #define PS_HARDY 0x00040000L #define PS_HUNGRY 0x00080000L #define PS_DIVINE 0x00100000L #define PS_SHADOW 0x00200000L #define PS_WOODEN 0x00400000L #define PS_BEARSKIN 0x00800000L #define PS_XXX8 0x01000000L #define PS_XXX9 0x03000000L #define PS_XX10 0x04000000L #define PS_XX11 0x08000000L #define PS_XX12 0x10000000L #define PS_XX13 0x30000000L #define PS_XX14 0x40000000L #define PS_XX15 0x80000000L /* * As of 2.7.8, the "object flags" are valid for all objects, and as * of 2.7.9, these flags are not actually stored with the object, but * rather in the object_kind, ego_item, and artifact structures. * * Note that "flags1" contains all flags dependant on "pval" (including * stat bonuses, but NOT stat sustainers), plus all "extra attack damage" * flags (SLAY_XXX and BRAND_XXX). * * Note that "flags2" contains all "resistances" (including "sustain" flags, * immunity flags, and resistance flags). Note that "free action" and "hold * life" are no longer considered to be "immunities". * * Note that "flags3" contains everything else (including eight good flags, * seven unused flags, four bad flags, four damage ignoring flags, six weird * flags, and three cursed flags). */ #define TR1_STR 0x00000001L /* STR += "pval" */ #define TR1_INT 0x00000002L /* INT += "pval" */ #define TR1_WIS 0x00000004L /* WIS += "pval" */ #define TR1_DEX 0x00000008L /* DEX += "pval" */ #define TR1_CON 0x00000010L /* CON += "pval" */ #define TR1_CHR 0x00000020L /* CHR += "pval" */ #define TR1_XXX1 0x00000040L /* (reserved) */ #define TR1_MAGIC_MASTERY 0x00000080L /* Magic Use += 10 * "pval" -LM- */ #define TR1_STEALTH 0x00000100L /* Stealth += "pval" */ #define TR1_SEARCH 0x00000200L /* Search += "pval" */ #define TR1_INFRA 0x00000400L /* Infra += "pval" */ #define TR1_TUNNEL 0x00000800L /* Tunnel += "pval" */ #define TR1_SPEED 0x00001000L /* Speed += "pval" */ #define TR1_MIGHT2 0x00002000L /* Might + 2. Was extra blows. -LM- */ #define TR1_SHOTS 0x00004000L /* Extra shot. */ #define TR1_MIGHT1 0x00008000L /* Might + 1. */ #define TR1_SLAY_ANIMAL 0x00010000L /* Weapon slays animals */ #define TR1_SLAY_EVIL 0x00020000L /* Weapon slays evil */ #define TR1_SLAY_UNDEAD 0x00040000L /* Weapon slays undead */ #define TR1_SLAY_DEMON 0x00080000L /* Weapon slays demon */ #define TR1_SLAY_ORC 0x00100000L /* Weapon slays orc */ #define TR1_SLAY_TROLL 0x00200000L /* Weapon slays troll */ #define TR1_SLAY_GIANT 0x00400000L /* Weapon slays giant */ #define TR1_SLAY_DRAGON 0x00800000L /* Weapon slays dragon */ #define TR1_SLAY_KILL 0x02000000L /* Weapon has strong slays -BR- */ #define TR1_THROWING 0x02000000L /* Weapon can be thrown. -LM- */ #define TR1_PERFECT_BALANCE 0x04000000L /* Weapon is perfectly balanced. -LM- */ #define TR1_BRAND_POIS 0x08000000L /* Weapon has poison brand */ #define TR1_BRAND_ACID 0x10000000L /* Weapon has acid brand */ #define TR1_BRAND_ELEC 0x20000000L /* Weapon has elec brand */ #define TR1_BRAND_FIRE 0x40000000L /* Weapon has fire brand */ #define TR1_BRAND_COLD 0x80000000L /* Weapon has cold brand */ #define TR2_SUST_STR 0x00000001L /* Sustain STR */ #define TR2_SUST_INT 0x00000002L /* Sustain INT */ #define TR2_SUST_WIS 0x00000004L /* Sustain WIS */ #define TR2_SUST_DEX 0x00000008L /* Sustain DEX */ #define TR2_SUST_CON 0x00000010L /* Sustain CON */ #define TR2_SUST_CHR 0x00000020L /* Sustain CHR */ #define TR2_XXX1 0x00000040L /* (reserved) */ #define TR2_XXX2 0x00000080L /* (reserved) */ #define TR2_XXX3 0x00001000L /* (reserved) */ #define TR2_XXX4 0x00002000L /* (reserved) */ #define TR2_XXX5 0x00004000L /* (reserved) */ #define TR2_XXX6 0x00008000L /* (reserved) */ #define TR2_IM_ACID 0x00001000L /* Immunity to acid */ #define TR2_IM_ELEC 0x00002000L /* Immunity to elec */ #define TR2_IM_FIRE 0x00004000L /* Immunity to fire */ #define TR2_IM_COLD 0x00008000L /* Immunity to cold */ #define TR2_RES_ACID 0x00010000L /* Resist acid */ #define TR2_RES_ELEC 0x00020000L /* Resist elec */ #define TR2_RES_FIRE 0x00040000L /* Resist fire */ #define TR2_RES_COLD 0x00080000L /* Resist cold */ #define TR2_RES_POIS 0x00100000L /* Resist poison */ #define TR2_RES_FEAR 0x00200000L /* Resist fear */ #define TR2_RES_LITE 0x00400000L /* Resist lite */ #define TR2_RES_DARK 0x00800000L /* Resist dark */ #define TR2_RES_BLIND 0x01000000L /* Resist blind */ #define TR2_RES_CONFU 0x02000000L /* Resist confusion */ #define TR2_RES_SOUND 0x04000000L /* Resist sound */ #define TR2_RES_SHARD 0x08000000L /* Resist shards */ #define TR2_RES_NEXUS 0x10000000L /* Resist nexus */ #define TR2_RES_NETHR 0x20000000L /* Resist nether */ #define TR2_RES_CHAOS 0x40000000L /* Resist chaos */ #define TR2_RES_DISEN 0x80000000L /* Resist disenchant */ #define TR3_SLOW_DIGEST 0x00000001L /* Slow digest */ #define TR3_FEATHER 0x00000002L /* Feather Falling */ #define TR3_LITE 0x00000004L /* Perma-Light */ #define TR3_REGEN 0x00000008L /* Regeneration */ #define TR3_TELEPATHY 0x00000010L /* Telepathy */ #define TR3_SEE_INVIS 0x00000020L /* See Invis */ #define TR3_FREE_ACT 0x00000040L /* Free action */ #define TR3_HOLD_LIFE 0x00000080L /* Hold life */ #define TR3_XXX1 0x00000100L #define TR3_XXX2 0x00000200L #define TR3_XXX3 0x00000400L #define TR3_XXX4 0x00000800L #define TR3_IMPACT 0x00001000L /* Earthquake blows */ #define TR3_TELEPORT 0x00002000L /* Random teleportation */ #define TR3_AGGRAVATE 0x00004000L /* Aggravate monsters */ #define TR3_DRAIN_EXP 0x00008000L /* Experience drain */ #define TR3_IGNORE_ACID 0x00010000L /* Item ignores Acid Damage */ #define TR3_IGNORE_ELEC 0x00020000L /* Item ignores Elec Damage */ #define TR3_IGNORE_FIRE 0x00040000L /* Item ignores Fire Damage */ #define TR3_IGNORE_COLD 0x00080000L /* Item ignores Cold Damage */ #define TR3_TWO_HANDED_REQ 0x00100000L /* Weapon can only be used effectively two-handed. -LM- */ #define TR3_TWO_HANDED_DES 0x00200000L /* Only very strong players can wield this weapon one-handed. -LM- */ #define TR3_BLESSED 0x00400000L /* Item has been blessed */ #define TR3_ACTIVATE 0x00800000L /* Item can be activated */ #define TR3_INSTA_ART 0x01000000L /* Item makes an artifact */ #define TR3_EASY_KNOW 0x02000000L /* Item is known if aware */ #define TR3_HIDE_TYPE 0x04000000L /* Item hides description */ #define TR3_SHOW_MODS 0x08000000L /* Item shows Tohit/Todam */ #define TR3_XXX7 0x10000000L /* (reserved) */ #define TR3_LIGHT_CURSE 0x20000000L /* Item has Light Curse */ #define TR3_HEAVY_CURSE 0x40000000L /* Item has Heavy Curse */ #define TR3_PERMA_CURSE 0x80000000L /* Item has Perma Curse */ /* * Hack -- flag set 1 -- mask for "pval-dependant" flags. * Note that all "pval" dependant flags must be in "flags1". */ #define TR1_PVAL_MASK \ (TR1_STR | TR1_INT | TR1_WIS | TR1_DEX | \ TR1_CON | TR1_CHR | TR1_XXX1 | TR1_MAGIC_MASTERY | \ TR1_STEALTH | TR1_SEARCH | TR1_INFRA | TR1_TUNNEL | \ TR1_SPEED) /* * Hack -- special "xtra" object flag info (type) */ #define OBJECT_XTRA_TYPE_SUSTAIN 1 #define OBJECT_XTRA_TYPE_RESIST 2 #define OBJECT_XTRA_TYPE_POWER 3 #define OBJECT_XTRA_TYPE_BALANCE 4 /* Expansion to handle all activations. -LM- */ #define OBJECT_XTRA_TYPE_ACTIVATION 255 /* * Hack -- special "xtra" object flag info (what flag set) */ #define OBJECT_XTRA_WHAT_SUSTAIN 2 #define OBJECT_XTRA_WHAT_RESIST 2 #define OBJECT_XTRA_WHAT_POWER 3 #define OBJECT_XTRA_WHAT_BALANCE 1 /* * Hack -- special "xtra" object flag info (base flag value) */ #define OBJECT_XTRA_BASE_SUSTAIN TR2_SUST_STR #define OBJECT_XTRA_BASE_RESIST TR2_RES_POIS #define OBJECT_XTRA_BASE_POWER TR3_SLOW_DIGEST #define OBJECT_XTRA_BASE_BALANCE TR1_PERFECT_BALANCE /* * Hack -- special "xtra" object flag info (number of flags) */ #define OBJECT_XTRA_SIZE_SUSTAIN 6 #define OBJECT_XTRA_SIZE_RESIST 12 #define OBJECT_XTRA_SIZE_POWER 8 #define OBJECT_XTRA_SIZE_BALANCE 1 /*** Monster flags ***/ /* * Special Monster Flags (all temporary) */ #define MFLAG_VIEW 0x01 /* Monster is in line of sight */ #define MFLAG_XXX1 0x02 /* */ #define MFLAG_XXX2 0x04 /* */ #define MFLAG_ACTV 0x08 /* Monster is in active mode */ #define MFLAG_WARY 0x10 /* Monster is wary of traps */ #define MFLAG_XXX5 0x20 /* */ #define MFLAG_SHOW 0x40 /* Monster is recently memorized */ #define MFLAG_MARK 0x80 /* Monster is currently memorized */ /* * New monster race bit flags */ #define RF1_UNIQUE 0x00000001 /* Unique Monster */ #define RF1_QUESTOR 0x00000002 /* Quest Monster */ #define RF1_MALE 0x00000004 /* Male gender */ #define RF1_FEMALE 0x00000008 /* Female gender */ #define RF1_CHAR_CLEAR 0x00000010 /* Absorbs symbol */ #define RF1_CHAR_MULTI 0x00000020 /* Changes symbol */ #define RF1_ATTR_CLEAR 0x00000040 /* Absorbs color */ #define RF1_ATTR_MULTI 0x00000080 /* Changes color */ #define RF1_FORCE_DEPTH 0x00000100 /* Start at "correct" depth */ #define RF1_FORCE_MAXHP 0x00000200 /* Start with max hitpoints */ #define RF1_FORCE_SLEEP 0x00000400 /* Start out sleeping */ #define RF1_FORCE_EXTRA 0x00000800 /* Start out something */ #define RF1_FRIEND 0x00001000 /* Arrive with a friend */ #define RF1_FRIENDS 0x00002000 /* Arrive with some friends */ #define RF1_ESCORT 0x00004000 /* Arrive with an escort */ #define RF1_ESCORTS 0x00008000 /* Arrive with some escorts */ #define RF1_NEVER_BLOW 0x00010000 /* Never make physical blow */ #define RF1_NEVER_MOVE 0x00020000 /* Never make physical move */ #define RF1_RAND_25 0x00040000 /* Moves randomly (25%) */ #define RF1_RAND_50 0x00080000 /* Moves randomly (50%) */ #define RF1_ONLY_GOLD 0x00100000 /* Drop only gold */ #define RF1_ONLY_ITEM 0x00200000 /* Drop only items */ #define RF1_DROP_60 0x00400000 /* Drop an item/gold (60%) */ #define RF1_DROP_90 0x00800000 /* Drop an item/gold (90%) */ #define RF1_DROP_1D2 0x01000000 /* Drop 1d2 items/gold */ #define RF1_DROP_2D2 0x02000000 /* Drop 2d2 items/gold */ #define RF1_DROP_3D2 0x04000000 /* Drop 3d2 items/gold */ #define RF1_DROP_4D2 0x08000000 /* Drop 4d2 items/gold */ #define RF1_DROP_GOOD 0x10000000 /* Drop good items */ #define RF1_DROP_GREAT 0x20000000 /* Drop great items */ #define RF1_DROP_CHEST 0x40000000 /* Drop "useful" items */ #define RF1_DROP_CHOSEN 0x80000000 /* Drop "chosen" items */ /* * New monster race bit flags */ #define RF2_STUPID 0x00000001 /* Monster is stupid */ #define RF2_SMART 0x00000002 /* Monster is smart */ #define RF2_SPEAKING 0x00000004 /* Monster can speak. From Zangband. */ #define RF2_PLAYER_GHOST 0x00000008 /* Monster is a player ghost. -LM- */ #define RF2_INVISIBLE 0x00000010 /* Monster avoids vision */ #define RF2_COLD_BLOOD 0x00000020 /* Monster avoids infra */ #define RF2_EMPTY_MIND 0x00000040 /* Monster avoids telepathy */ #define RF2_WEIRD_MIND 0x00000080 /* Monster partially avoids tlepathy */ #define RF2_MULTIPLY 0x00000100 /* Monster reproduces */ #define RF2_REGENERATE 0x00000200 /* Monster regenerates */ #define RF2_XXX1 0x00000400 /* (?) */ #define RF2_XXX2 0x00000800 /* (?) */ #define RF2_XXX3 0x00001000 /* (?) */ #define RF2_XXX4 0x00002000 /* (?) */ #define RF2_XXX5 0x00004000 /* (?) */ #define RF2_XXX6 0x00008000 /* (?) */ #define RF2_OPEN_DOOR 0x00010000 /* Monster can open doors */ #define RF2_BASH_DOOR 0x00020000 /* Monster can bash doors */ #define RF2_PASS_WALL 0x00040000 /* Monster can pass walls */ #define RF2_KILL_WALL 0x00080000 /* Monster can destroy walls */ #define RF2_MOVE_BODY 0x00100000 /* Monster can move monsters */ #define RF2_KILL_BODY 0x00200000 /* Monster can kill monsters */ #define RF2_TAKE_ITEM 0x00400000 /* Monster can pick up items */ #define RF2_KILL_ITEM 0x00800000 /* Monster can crush items */ #define RF2_FLYING 0x01000000 /* Monster can fly. */ #define RF2_LOW_MANA_RUN 0x02000000 /* Runs away/teleports when low on mana */ #define RF2_BRAIN_1 0x04000000 /* */ #define RF2_POWERFUL 0x08000000 /* Breath loses less power with distance */ #define RF2_ARCHER 0x10000000 /* No 1_IN_X limits on missiles. */ #define RF2_MORGUL_MAGIC 0x20000000 /* Some spells more necromantic */ #define RF2_UDUN_MAGIC 0x40000000 /* Some spells more hellish */ #define RF2_BRAIN_2 0x80000000 /* Magic is ? */ /* * New monster race bit flags */ #define RF3_ORC 0x00000001 /* Orc */ #define RF3_TROLL 0x00000002 /* Troll */ #define RF3_GIANT 0x00000004 /* Giant */ #define RF3_DRAGON 0x00000008 /* Dragon */ #define RF3_DEMON 0x00000010 /* Demon */ #define RF3_UNDEAD 0x00000020 /* Undead */ #define RF3_EVIL 0x00000040 /* Evil */ #define RF3_ANIMAL 0x00000080 /* Animal */ #define RF3_XXX1 0x00000100 /* (?) */ #define RF3_XXX2 0x00000200 /* (?) */ #define RF3_XXX3 0x00000400 /* Non-Vocal (?) */ #define RF3_XXX4 0x00000800 /* Non-Living (?) */ #define RF3_HURT_LITE 0x00001000 /* Hurt by lite */ #define RF3_HURT_ROCK 0x00002000 /* Hurt by rock remover */ #define RF3_HURT_FIRE 0x00004000 /* Hurt badly by fire */ #define RF3_HURT_COLD 0x00008000 /* Hurt badly by cold */ #define RF3_IM_ACID 0x00010000 /* Resist acid a lot */ #define RF3_IM_ELEC 0x00020000 /* Resist elec a lot */ #define RF3_IM_FIRE 0x00040000 /* Resist fire a lot */ #define RF3_IM_COLD 0x00080000 /* Resist cold a lot */ #define RF3_IM_POIS 0x00100000 /* Resist poison a lot */ #define RF3_XXX5 0x00200000 /* Immune to (?) */ #define RF3_RES_NETH 0x00400000 /* Resist nether a lot */ #define RF3_RES_WATE 0x00800000 /* Resist water */ #define RF3_RES_PLAS 0x01000000 /* Resist plasma */ #define RF3_RES_NEXU 0x02000000 /* Resist nexus */ #define RF3_RES_DISE 0x04000000 /* Resist disenchantment */ #define RF3_XXX6 0x08000000 #define RF3_NO_FEAR 0x10000000 /* Cannot be scared */ #define RF3_NO_STUN 0x20000000 /* Cannot be stunned */ #define RF3_NO_CONF 0x40000000 /* Cannot be confused */ #define RF3_NO_SLEEP 0x80000000 /* Cannot be slept */ /* * Monster racial flags - innate or physical ranged attacks */ #define RF4_SHRIEK 0x00000001 /* Shriek for help */ #define RF4_LASH 0x00000002 /* Use a melee attack at range 2 or 3 */ #define RF4_BOULDER 0x00000004 /* Throw a boulder */ #define RF4_SHOT 0x00000008 /* Fire sling shot */ #define RF4_ARROW 0x00000010 /* Fire arrows */ #define RF4_BOLT 0x00000020 /* Fire crossbow quarrels */ #define RF4_MISSL 0x00000040 /* Fire other physical missiles */ #define RF4_PMISSL 0x00000080 /* Fire poisoned missiles */ #define RF4_BRTH_ACID 0x00000100 /* Breathe Acid */ #define RF4_BRTH_ELEC 0x00000200 /* Breathe Elec */ #define RF4_BRTH_FIRE 0x00000400 /* Breathe Fire */ #define RF4_BRTH_COLD 0x00000800 /* Breathe Cold */ #define RF4_BRTH_POIS 0x00001000 /* Breathe Poison */ #define RF4_BRTH_PLAS 0x00002000 /* Breathe Plasma */ #define RF4_BRTH_LITE 0x00004000 /* Breathe Light */ #define RF4_BRTH_DARK 0x00008000 /* Breathe Dark */ #define RF4_BRTH_CONFU 0x00010000 /* Breathe Confusion */ #define RF4_BRTH_SOUND 0x00020000 /* Breathe Sound */ #define RF4_BRTH_SHARD 0x00040000 /* Breathe Shards */ #define RF4_BRTH_INER 0x00080000 /* Breathe Inertia */ #define RF4_BRTH_GRAV 0x00100000 /* Breathe Gravity */ #define RF4_BRTH_FORCE 0x00200000 /* Breathe Force */ #define RF4_BRTH_NEXUS 0x00400000 /* Breathe Nexus */ #define RF4_BRTH_NETHR 0x00800000 /* Breathe Nether */ #define RF4_BRTH_CHAOS 0x01000000 /* Breathe Chaos */ #define RF4_BRTH_DISEN 0x02000000 /* Breathe Disenchant */ #define RF4_BRTH_TIME 0x04000000 /* Breathe Time */ #define RF4_XXX2 0x08000000 /* */ #define RF4_XXX3 0x10000000 /* */ #define RF4_XXX4 0x20000000 /* */ #define RF4_XXX5 0x40000000 /* */ #define RF4_XXX6 0x80000000 /* */ /* * Monster racial flags - defined-area projection spells */ #define RF5_BALL_ACID 0x00000001 /* Acid Ball -> Acid Storm */ #define RF5_BALL_ELEC 0x00000002 /* Elec Ball -> Elec Storm */ #define RF5_BALL_FIRE 0x00000004 /* Fire Ball -> Fire Storm */ #define RF5_BALL_COLD 0x00000008 /* Cold Ball -> Cold Storm */ #define RF5_BALL_POIS 0x00000010 /* Stinking Cloud -> Poison Storm */ #define RF5_BALL_LITE 0x00000020 /* Light Ball / Starburst */ #define RF5_BALL_DARK 0x00000040 /* Darkness Ball -> Dark Storm */ #define RF5_BALL_CONFU 0x00000200 /* Confusion Ball -> Conf Storm */ #define RF5_BALL_SOUND 0x00000080 /* Sound Ball -> Sound Storm */ #define RF5_BALL_SHARD 0x00000100 /* Shard Ball -> Shard Storm */ #define RF5_BALL_STORM 0x00000400 /* Storm Ball -> Tempest */ #define RF5_BALL_NETHR 0x00000800 /* Nether Ball -> Nether Storm */ #define RF5_BALL_CHAOS 0x00001000 /* Chaos Ball -> Chaos Storm */ #define RF5_BALL_MANA 0x00002000 /* Mana Ball -> Mana Storm */ #define RF5_XXX1 0x00004000 /* */ #define RF5_XXX2 0x00008000 /* */ #define RF5_BOLT_ACID 0x00010000 /* Acid Bolt */ #define RF5_BOLT_ELEC 0x00020000 /* Elec Bolt */ #define RF5_BOLT_FIRE 0x00040000 /* Fire Bolt */ #define RF5_BOLT_COLD 0x00080000 /* Cold Bolt */ #define RF5_BOLT_POIS 0x00100000 /* Poison Bolt */ #define RF5_BOLT_PLAS 0x00200000 /* Plasma Bolt */ #define RF5_BOLT_ICE 0x00400000 /* Ice Bolt */ #define RF5_BOLT_WATER 0x00800000 /* Water Bolt */ #define RF5_BOLT_NETHR 0x01000000 /* Nether Bolt */ #define RF5_BOLT_MANA 0x02000000 /* Magic Missile -> Mana Bolt */ #define RF5_XXX3 0x04000000 /* */ #define RF5_BEAM_ELEC 0x08000000 /* Electric spark */ #define RF5_BEAM_ICE 0x10000000 /* Ice Lance */ #define RF5_BEAM_NETHR 0x20000000 /* Spear of Nether */ #define RF5_ARC__HFIRE 0x40000000 /* Arc/Column of hellfire */ #define RF5_ARC__FORCE 0x80000000 /* Arc of force */ /* * Monster racial flags - help self, hinder character, and special magics */ #define RF6_HASTE 0x00000001 /* Speed self */ #define RF6_ADD_MANA 0x00000002 /* Regain Mana */ #define RF6_HEAL 0x00000004 /* Heal self */ #define RF6_CURE 0x00000008 /* Cure self */ #define RF6_BLINK 0x00000010 /* Teleport Short */ #define RF6_TPORT 0x00000020 /* Teleport Long */ #define RF6_XXX1 0x00000040 /* */ #define RF6_TELE_SELF_TO 0x00000080 /* */ #define RF6_TELE_TO 0x00000100 /* Move player to monster */ #define RF6_TELE_AWAY 0x00000200 /* Move player far away */ #define RF6_TELE_LEVEL 0x00000400 /* Move player vertically */ #define RF6_XXX3 0x00000800 /* */ #define RF6_DARKNESS 0x00001000 /* Create Darkness */ #define RF6_TRAPS 0x00002000 /* Create Traps */ #define RF6_FORGET 0x00004000 /* Cause amnesia */ #define RF6_DRAIN_MANA 0x00008000 /* Drain Mana */ #define RF6_DISPEL 0x00010000 /* Dispel Magic */ #define RF6_XXX5 0x00020000 /* */ #define RF6_MIND_BLAST 0x00040000 /* Blast Mind */ #define RF6_BRAIN_SMASH 0x00080000 /* Smash Brain */ #define RF6_WOUND 0x00100000 /* Cause Wounds */ #define RF6_XXX6 0x00200000 /* */ #define RF6_XXX7 0x00400000 /* */ #define RF6_XXX8 0x00800000 /* */ #define RF6_XX9 0x01000000 /* */ #define RF6_HUNGER 0x02000000 /* Make Player Hungry */ #define RF6_XX11 0x04000000 /* */ #define RF6_SCARE 0x08000000 /* Frighten Player */ #define RF6_BLIND 0x10000000 /* Blind Player */ #define RF6_CONF 0x20000000 /* Confuse Player */ #define RF6_SLOW 0x40000000 /* Slow Player */ #define RF6_HOLD 0x80000000 /* Paralyze Player */ /* * Monster racial flags - summons */ #define RF7_S_KIN 0x00000001 /* Summon Similar */ #define RF7_XXX1 0x00000002 /* */ #define RF7_XXX2 0x00000004 /* */ #define RF7_S_MONSTER 0x00000008 /* Summon Monster */ #define RF7_S_MONSTERS 0x00000010 /* Summon Monsters */ #define RF7_XXX3 0x00000020 /* */ #define RF7_XXX4 0x00000040 /* */ #define RF7_XXX5 0x00000080 /* */ #define RF7_S_ANT 0x00000100 /* Summon Ants */ #define RF7_S_SPIDER 0x00000200 /* Summon Spiders */ #define RF7_S_HOUND 0x00000400 /* Summon Hounds */ #define RF7_S_ANIMAL 0x00000800 /* Summon Animals */ #define RF7_XXX6 0x00001000 /* */ #define RF7_XXX7 0x00002000 /* */ #define RF7_S_THIEF 0x00004000 /* Summon Thieves */ #define RF7_S_BERTBILLTOM 0x00008000 /* Summon Bert, Bill, and Tom */ #define RF7_XXX8 0x00010000 /* */ #define RF7_XXX9 0x00020000 /* */ #define RF7_XX10 0x00040000 /* */ #define RF7_XX11 0x00080000 /* */ #define RF7_S_DRAGON 0x00100000 /* Summon Dragon */ #define RF7_S_HI_DRAGON 0x00200000 /* Summon Ancient Dragons */ #define RF7_XX12 0x00400000 /* */ #define RF7_XX13 0x00800000 /* */ #define RF7_S_DEMON 0x01000000 /* Summon Demon(s) */ #define RF7_S_HI_DEMON 0x02000000 /* Summon Greater Demons */ #define RF7_XX14 0x04000000 /* */ #define RF7_XX15 0x08000000 /* */ #define RF7_S_UNDEAD 0x10000000 /* Summon Undead */ #define RF7_S_HI_UNDEAD 0x20000000 /* Summon Greater Undead */ #define RF7_S_WRAITH 0x40000000 /* Summon Unique Wraith */ #define RF7_S_UNIQUE 0x80000000 /* Summon Unique Monster */ /* * Breath attacks. * Need special treatment in movement AI. */ #define RF4_BREATH_MASK \ (RF4_BRTH_ACID | RF4_BRTH_ELEC | RF4_BRTH_FIRE | RF4_BRTH_COLD | \ RF4_BRTH_POIS | RF4_BRTH_PLAS | RF4_BRTH_LITE | RF4_BRTH_DARK | \ RF4_BRTH_CONFU | RF4_BRTH_SOUND | RF4_BRTH_SHARD | RF4_BRTH_INER | \ RF4_BRTH_GRAV | RF4_BRTH_FORCE | RF4_BRTH_NEXUS | RF4_BRTH_NETHR | \ RF4_BRTH_CHAOS | RF4_BRTH_DISEN | RF4_BRTH_TIME) #define RF5_BREATH_MASK \ (0L) #define RF6_BREATH_MASK \ (0L) #define RF7_BREATH_MASK \ (0L) /* * Harassment (not direct damage) attacks. * Need special treatment in AI. */ #define RF4_HARASS_MASK \ (RF4_SHRIEK) #define RF5_HARASS_MASK \ (0L) #define RF6_HARASS_MASK \ (RF6_DARKNESS | RF6_TRAPS | RF6_FORGET | RF6_HUNGER | RF6_DRAIN_MANA | \ RF6_SCARE | RF6_BLIND | RF6_CONF | RF6_SLOW | RF6_HOLD | RF6_DISPEL) #define RF7_HARASS_MASK \ (0L) /* Number of times harassment spells get special treatment */ #define BASE_HARASS 5 /* Number of times harassment spells get special treatment from weaker creatures */ #define LOW_HARASS 2 /* * Hack -- "bolt" spells that may hurt fellow monsters * Need special treatment in AI. */ #define RF4_BOLT_MASK \ (RF4_ARROW | RF4_BOLT | RF4_SHOT | RF4_MISSL | RF4_PMISSL | RF4_BOULDER) #define RF5_BOLT_MASK \ (RF5_BOLT_ACID | RF5_BOLT_ELEC | RF5_BOLT_FIRE | RF5_BOLT_COLD | \ RF5_BOLT_POIS | RF5_BOLT_NETHR | RF5_BOLT_WATER | RF5_BOLT_MANA | \ RF5_BOLT_PLAS | RF5_BOLT_ICE) #define RF6_BOLT_MASK \ 0L #define RF7_BOLT_MASK \ 0L /* * Archery attacks * Need special treatment in AI. */ #define RF4_ARCHERY_MASK \ (RF4_ARROW | RF4_BOLT | RF4_SHOT | RF4_MISSL | RF4_PMISSL | RF4_BOULDER) #define RF5_ARCHERY_MASK \ (0L) #define RF6_ARCHERY_MASK \ (0L) #define RF7_ARCHERY_MASK \ (0L) /* * Spells that can be can without a player in sight * Need special treatment in AI. */ #define RF4_NO_PLAYER_MASK \ (0L) #define RF5_NO_PLAYER_MASK \ (0L) #define RF6_NO_PLAYER_MASK \ (RF6_HEAL | RF6_ADD_MANA | RF6_TELE_SELF_TO | RF6_CURE) #define RF7_NO_PLAYER_MASK \ (0L) /* Spell Desire Table Columns */ #define D_BASE 0 #define D_SUMM 1 #define D_HURT 2 #define D_MANA 3 #define D_ESC 4 #define D_TACT 5 #define D_RES 6 #define D_RANGE 7 /*** Option Definitions ***/ #define OPT_MAX 256 #define OPT_PAGE_MAX 6 #define OPT_PAGE_PER 20 #define OPT_birth_start 128 #define OPT_birth_end 137 #define OPT_adult_start 192 #define OPT_adult_end 201 #define OPT_cheat_start 160 #define OPT_cheat_end 169 #define OPT_score_start 224 #define OPT_score_end 233 /* * Indexes */ #define OPT_rogue_like_commands 0 #define OPT_quick_messages 1 #define OPT_floor_query_flag 2 #define OPT_carry_query_flag 3 #define OPT_use_old_target 4 #define OPT_always_pickup 5 #define OPT_always_repeat 6 #define OPT_depth_in_feet 7 #define OPT_stack_force_notes 8 #define OPT_stack_force_costs 9 #define OPT_show_labels 10 #define OPT_show_weights 11 #define OPT_show_choices 12 #define OPT_show_details 13 #define OPT_metric 14 #define OPT_show_flavors 15 #define OPT_run_ignore_stairs 16 #define OPT_run_ignore_doors 17 #define OPT_run_cut_corners 18 #define OPT_run_use_corners 19 #define OPT_disturb_move 20 #define OPT_disturb_near 21 #define OPT_disturb_panel 22 #define OPT_disturb_state 23 #define OPT_disturb_minor 24 #define OPT_disturb_other 25 #define OPT_alert_hitpoint 26 #define OPT_alert_failure 27 #define OPT_verify_destroy 28 #define OPT_verify_special 29 #define OPT_ring_bell 30 #define OPT_verify_destroy_junk 31 #define OPT_auto_haggle 32 #define OPT_auto_scum 33 #define OPT_easy_open 34 #define OPT_easy_disarm 35 #define OPT_expand_look 36 #define OPT_expand_list 37 #define OPT_view_perma_grids 38 #define OPT_view_torch_grids 39 /* xxx */ #define OPT_dungeon_stair 41 /* xxx */ /* xxx */ /* xxx */ /* xxx */ /* xxx */ #define OPT_smart_cheat 47 #define OPT_view_reduce_lite 48 #define OPT_hidden_player 49 #define OPT_avoid_abort 50 #define OPT_avoid_other 51 #define OPT_flush_failure 52 #define OPT_flush_disturb 53 #define OPT_center_player 54 #define OPT_fresh_before 55 #define OPT_fresh_after 56 #define OPT_center_running 57 #define OPT_compress_savefile 58 #define OPT_hilite_player 59 #define OPT_view_yellow_lite 60 #define OPT_view_bright_lite 61 #define OPT_view_granite_lite 62 #define OPT_view_special_lite 63 #define OPT_show_piles 67 #define OPT_show_detect 69 /*This is really quite out of order -BR-*/ #define OPT_disturb_trap_detect 70 /*This is really quite out of order -BR-*/ #define OPT_birth_point_based 128/*(OPT_BIRTH_START+0)*/ #define OPT_birth_auto_roller 129/*(OPT_BIRTH_START+1)*/ #define OPT_birth_preserve 131/*(OPT_BIRTH_START+3)*/ /* No Ironman options */ #define OPT_cheat_peek 160 /*(OPT_CHEAT+0)*/ #define OPT_cheat_hear 161 /*(OPT_CHEAT+1)*/ #define OPT_cheat_room 162 /*(OPT_CHEAT+2)*/ #define OPT_cheat_xtra 163 /*(OPT_CHEAT+3)*/ #define OPT_cheat_know 164 /*(OPT_CHEAT+4)*/ #define OPT_cheat_live 165 /*(OPT_CHEAT+5)*/ #define OPT_adult_point_based 192/*(OPT_ADULT_START+0)*/ #define OPT_adult_auto_roller 193/*(OPT_ADULT_START+1)*/ #define OPT_adult_preserve 195/*(OPT_ADULT_START+3)*/ /* No Ironman options */ /* xxx xxx */ #define OPT_score_peek 224 /* (OPT_SCORE+0)*/ #define OPT_score_hear 225 /* (OPT_SCORE+1)*/ #define OPT_score_room 226 /* (OPT_SCORE+2)*/ #define OPT_score_xtra 227 /* (OPT_SCORE+3)*/ #define OPT_score_know 228 /* (OPT_SCORE+4)*/ #define OPT_score_live 229 /* (OPT_SCORE+5)*/ /* xxx xxx */ /* * Hack -- Option symbols */ #define rogue_like_commands op_ptr->opt[OPT_rogue_like_commands] #define quick_messages op_ptr->opt[OPT_quick_messages] #define floor_query_flag op_ptr->opt[OPT_floor_query_flag] #define carry_query_flag op_ptr->opt[OPT_carry_query_flag] #define use_old_target op_ptr->opt[OPT_use_old_target] #define always_pickup op_ptr->opt[OPT_always_pickup] #define always_repeat op_ptr->opt[OPT_always_repeat] #define depth_in_feet op_ptr->opt[OPT_depth_in_feet] #define stack_force_notes op_ptr->opt[OPT_stack_force_notes] #define stack_force_costs op_ptr->opt[OPT_stack_force_costs] #define show_labels op_ptr->opt[OPT_show_labels] #define show_weights op_ptr->opt[OPT_show_weights] #define show_choices op_ptr->opt[OPT_show_choices] #define show_details op_ptr->opt[OPT_show_details] #define use_metric op_ptr->opt[OPT_metric] #define show_flavors op_ptr->opt[OPT_show_flavors] #define show_detect op_ptr->opt[OPT_show_detect] #define run_ignore_stairs op_ptr->opt[OPT_run_ignore_stairs] #define run_ignore_doors op_ptr->opt[OPT_run_ignore_doors] #define run_cut_corners op_ptr->opt[OPT_run_cut_corners] #define run_use_corners op_ptr->opt[OPT_run_use_corners] #define disturb_move op_ptr->opt[OPT_disturb_move] #define disturb_near op_ptr->opt[OPT_disturb_near] #define disturb_panel op_ptr->opt[OPT_disturb_panel] #define disturb_trap_detect op_ptr->opt[OPT_disturb_trap_detect] #define disturb_state op_ptr->opt[OPT_disturb_state] #define disturb_minor op_ptr->opt[OPT_disturb_minor] #define disturb_other op_ptr->opt[OPT_disturb_other] #define alert_hitpoint op_ptr->opt[OPT_alert_hitpoint] #define alert_failure op_ptr->opt[OPT_alert_failure] #define verify_destroy op_ptr->opt[OPT_verify_destroy] #define verify_special op_ptr->opt[OPT_verify_special] #define ring_bell op_ptr->opt[OPT_ring_bell] #define verify_destroy_junk op_ptr->opt[OPT_verify_destroy_junk] #define auto_haggle op_ptr->opt[OPT_auto_haggle] #define auto_scum op_ptr->opt[OPT_auto_scum] #define easy_open op_ptr->opt[OPT_easy_open] /* TNB */ #define easy_disarm op_ptr->opt[OPT_easy_disarm] /* TNB */ #define expand_look op_ptr->opt[OPT_expand_look] #define expand_list op_ptr->opt[OPT_expand_list] #define view_perma_grids op_ptr->opt[OPT_view_perma_grids] #define view_torch_grids op_ptr->opt[OPT_view_torch_grids] /* xxx */ #define dungeon_stair op_ptr->opt[OPT_dungeon_stair] /* xxx */ /* xxx */ /* xxx */ /* xxx */ /* xxx */ #define smart_cheat op_ptr->opt[OPT_smart_cheat] #define view_reduce_lite op_ptr->opt[OPT_view_reduce_lite] #define hidden_player op_ptr->opt[OPT_hidden_player] #define avoid_abort op_ptr->opt[OPT_avoid_abort] #define avoid_other op_ptr->opt[OPT_avoid_other] #define flush_failure op_ptr->opt[OPT_flush_failure] #define flush_disturb op_ptr->opt[OPT_flush_disturb] #define center_player op_ptr->opt[OPT_center_player] #define fresh_before op_ptr->opt[OPT_fresh_before] #define fresh_after op_ptr->opt[OPT_fresh_after] #define center_running op_ptr->opt[OPT_center_running] #define compress_savefile op_ptr->opt[OPT_compress_savefile] #define hilite_player op_ptr->opt[OPT_hilite_player] #define view_yellow_lite op_ptr->opt[OPT_view_yellow_lite] #define view_bright_lite op_ptr->opt[OPT_view_bright_lite] #define view_granite_lite op_ptr->opt[OPT_view_granite_lite] #define view_special_lite op_ptr->opt[OPT_view_special_lite] #define show_piles op_ptr->opt[OPT_show_piles] #define birth_point_based op_ptr->opt[OPT_birth_point_based] #define birth_auto_roller op_ptr->opt[OPT_birth_auto_roller] #define birth_preserve op_ptr->opt[OPT_birth_preserve] #define cheat_peek op_ptr->opt[OPT_cheat_peek] #define cheat_hear op_ptr->opt[OPT_cheat_hear] #define cheat_room op_ptr->opt[OPT_cheat_room] #define cheat_xtra op_ptr->opt[OPT_cheat_xtra] #define cheat_know op_ptr->opt[OPT_cheat_know] #define cheat_live op_ptr->opt[OPT_cheat_live] #define adult_point_based op_ptr->opt[OPT_adult_point_based] #define adult_auto_roller op_ptr->opt[OPT_adult_auto_roller] #define adult_preserve op_ptr->opt[OPT_adult_preserve] #define score_peek op_ptr->opt[OPT_score_peek] #define score_hear op_ptr->opt[OPT_score_hear] #define score_room op_ptr->opt[OPT_score_room] #define score_xtra op_ptr->opt[OPT_score_xtra] #define score_know op_ptr->opt[OPT_score_know] #define score_live op_ptr->opt[OPT_score_live] /*** Macro Definitions ***/ /* * Hack -- The main "screen" */ #define term_screen (angband_term[0]) /* * Hack -- random number generation */ #define randint(M) \ (rand_int(M) + 1) /* * Determine if a given inventory item is "aware" */ #define object_aware_p(T) \ (k_info[(T)->k_idx].aware) /* * Determine if a given inventory item is "tried" */ #define object_tried_p(T) \ (k_info[(T)->k_idx].tried) /* * Determine if a given inventory item is "known" * Test One -- Check for special "known" tag * Test Two -- Check for "Easy Know" + "Aware" */ #define object_known_p(T) \ (((T)->ident & (IDENT_KNOWN)) || \ (k_info[(T)->k_idx].easy_know && k_info[(T)->k_idx].aware)) /* * Return the "attr" for a given item. * Use "flavor" if available. * Default to user definitions. */ #define object_attr(T) \ ((k_info[(T)->k_idx].flavor) ? \ (misc_to_attr[k_info[(T)->k_idx].flavor]) : \ (k_info[(T)->k_idx].x_attr)) /* * Return the "char" for a given item. * Use "flavor" if available. * Default to user definitions. */ #define object_char(T) \ ((k_info[(T)->k_idx].flavor) ? \ (misc_to_char[k_info[(T)->k_idx].flavor]) : \ (k_info[(T)->k_idx].x_char)) /* * Artifacts use the "name1" field */ #define artifact_p(T) \ ((T)->name1 ? TRUE : FALSE) /* * Ego-Items use the "name2" field */ #define ego_item_p(T) \ ((T)->name2 ? TRUE : FALSE) /* * Broken items. */ #define broken_p(T) \ ((T)->ident & (IDENT_BROKEN)) /* * Cursed items. */ #define cursed_p(T) \ ((T)->ident & (IDENT_CURSED)) /* * Convert an "attr"/"char" pair into a "pict" (P) */ #define PICT(A,C) \ ((((u16b)(A)) << 8) | ((byte)(C))) /* * Convert a "pict" (P) into an "attr" (A) */ #define PICT_A(P) \ ((byte)((P) >> 8)) /* * Convert a "pict" (P) into an "char" (C) */ #define PICT_C(P) \ ((char)((byte)(P))) /* * Convert a "location" (Y,X) into a "grid" (G) */ #define GRID(Y,X) \ (256 * (Y) + (X)) /* * Convert a "grid" (G) into a "location" (Y) */ #define GRID_Y(G) \ ((int)((G) / 256U)) /* * Convert a "grid" (G) into a "location" (X) */ #define GRID_X(G) \ ((int)((G) % 256U)) /* * Determines if a map location is "meaningful" */ #define in_bounds(Y,X) \ (((unsigned)(Y) < (unsigned)(DUNGEON_HGT)) && \ ((unsigned)(X) < (unsigned)(DUNGEON_WID))) /* * Determines if a map location is fully inside the outer walls * This is more than twice as expensive as "in_bounds()", but * often we need to exclude the outer walls from calculations. */ #define in_bounds_fully(Y,X) \ (((Y) > 0) && ((Y) < DUNGEON_HGT-1) && \ ((X) > 0) && ((X) < DUNGEON_WID-1)) /* * Determine if a "legal" grid is a "floor" grid * * Line 1 -- forbid doors, rubble, seams, walls * * Note that the terrain features are split by a one bit test * into those features which block line of sight and those that * do not, allowing an extremely fast single bit check below. * * Add in the fact that some new terrain (water & lava) do NOT block sight * -KMW- */ #define cave_floor_grid(C) \ (!((C)->feat & 0x20)) /* * Determines if a map location is currently "on screen" * Note that "panel_contains(Y,X)" always implies "in_bounds(Y,X)". * Pre-storing this into a cave_info flag would be nice. XXX XXX */ #define panel_contains(Y,X) \ (((Y) >= panel_row_min) && ((Y) <= panel_row_max) && \ ((X) >= panel_col_min) && ((X) <= panel_col_max)) /* * Determine if a "legal" grid is a "floor" grid * * Line 1 -- forbid doors, seams, walls, rubble and trees. * * Note the use of the new "CAVE_WALL" flag. */ #define cave_floor_bold(Y,X) \ (!(cave_info[Y][X] & (CAVE_WALL))) /* * Determine if a "legal" grid is able to be passed through by creatures * that cannot bore or pass through walls. This new definition is needed, * because some terrain can now be traversed, but ends LOS. It is also * used in the projectable function. -LM- * * Line 1 -- forbid doors, seams, walls, etc. * Line 2 -- but allow trees * Line 3 -- but allow rubble * * Note the use of the new "CAVE_WALL" flag. */ #define cave_passable_bold(Y,X) \ (!(cave_info[Y][X] & (CAVE_WALL)) || \ (cave_feat[Y][X] == FEAT_TREE) || \ (cave_feat[Y][X] == FEAT_RUBBLE)) /* * Determine if a "legal" grid is a "clean" floor grid * * Line 1 -- forbid non-floors * Line 2 -- forbid normal objects */ #define cave_clean_bold(Y,X) \ ((cave_feat[Y][X] == FEAT_FLOOR) && \ (cave_o_idx[Y][X] == 0)) /* * Determine if a "legal" grid is an "empty" floor grid * * Line 1 -- forbid doors, seams, walls, trees, and rubble * Line 2 -- forbid player/monsters */ #define cave_empty_bold(Y,X) \ (cave_floor_bold(Y,X) && \ (cave_m_idx[Y][X] == 0)) /* * Determine if a "legal" grid is a "naked" floor grid * * Line 1 -- forbid non-floors * Line 2 -- forbid normal objects * Line 3 -- forbid player/monsters */ #define cave_naked_bold(Y,X) \ ((cave_feat[Y][X] == FEAT_FLOOR) && \ (cave_o_idx[Y][X] == 0) && \ (cave_m_idx[Y][X] == 0)) /* * Determine if a "legal" grid is "permanent" * * Line 1 -- perma-walls * Line 2-3 -- stairs * Line 4-5 -- shop doors */ #define cave_perma_bold(Y,X) \ ((cave_feat[Y][X] >= FEAT_PERM_EXTRA) || \ ((cave_feat[Y][X] == FEAT_LESS) || \ (cave_feat[Y][X] == FEAT_MORE)) || \ ((cave_feat[Y][X] >= FEAT_SHOP_HEAD) && \ (cave_feat[Y][X] <= FEAT_SHOP_TAIL))) /* * Determine if a "legal" grid is within "los" of the player * * Note the use of comparison to zero to force a "boolean" result */ #define player_has_los_bold(Y,X) \ ((cave_info[Y][X] & (CAVE_VIEW)) != 0) /* * Determine if a "legal" grid can be "seen" by the player * * Note the use of comparison to zero to force a "boolean" result */ #define player_can_see_bold(Y,X) \ ((cave_info[Y][X] & (CAVE_SEEN)) != 0) /* * Hack -- Prepare to use the "Secure" routines */ #if defined(SET_UID) && defined(SECURE) extern int PlayerUID; # define getuid() PlayerUID # define geteuid() PlayerUID #endif /*** Color constants ***/ /* * Angband "attributes" (with symbols, and base (R,G,B) codes) * * The "(R,G,B)" codes are given in "fourths" of the "maximal" value, * and should "gamma corrected" on most (non-Macintosh) machines. */ #define TERM_DARK 0 /* 'd' */ /* 0,0,0 */ #define TERM_WHITE 1 /* 'w' */ /* 4,4,4 */ #define TERM_SLATE 2 /* 's' */ /* 2,2,2 */ #define TERM_ORANGE 3 /* 'o' */ /* 4,2,0 */ #define TERM_RED 4 /* 'r' */ /* 3,0,0 */ #define TERM_GREEN 5 /* 'g' */ /* 0,2,1 */ #define TERM_BLUE 6 /* 'b' */ /* 0,0,4 */ #define TERM_UMBER 7 /* 'u' */ /* 2,1,0 */ #define TERM_L_DARK 8 /* 'D' */ /* 1,1,1 */ #define TERM_L_WHITE 9 /* 'W' */ /* 3,3,3 */ #define TERM_VIOLET 10 /* 'v' */ /* 4,0,4 */ #define TERM_YELLOW 11 /* 'y' */ /* 4,4,0 */ #define TERM_L_RED 12 /* 'R' */ /* 4,0,0 */ #define TERM_L_GREEN 13 /* 'G' */ /* 0,4,0 */ #define TERM_L_BLUE 14 /* 'B' */ /* 0,4,4 */ #define TERM_L_UMBER 15 /* 'U' */ /* 3,2,1 */ /* Color code identifiers for messages */ #define MSG_GENERIC 0 #define MSG_HIT 1 #define MSG_MISS 2 #define MSG_FLEE 3 #define MSG_DROP 4 #define MSG_KILL 5 #define MSG_LEVEL 6 #define MSG_DEATH 7 #define MSG_STUDY 8 #define MSG_TELEPORT 9 #define MSG_SHOOT 10 #define MSG_QUAFF 11 #define MSG_ZAP 12 #define MSG_WALK 13 #define MSG_TPOTHER 14 #define MSG_HITWALL 15 #define MSG_EAT 16 #define MSG_STORE1 17 #define MSG_STORE2 18 #define MSG_STORE3 19 #define MSG_STORE4 20 #define MSG_DIG 21 #define MSG_OPENDOOR 22 #define MSG_SHUTDOOR 23 #define MSG_TPLEVEL 24 #define MSG_BELL 25 #define MSG_NOTHING_TO_OPEN 26 #define MSG_LOCKPICK_FAIL 27 #define MSG_STAIRS 28 #define MSG_MAX 29 /*** Sound constants ***/ /* * Mega-Hack -- some primitive sound support (see "main-win.c") * * Some "sound" constants for "Term_xtra(TERM_XTRA_SOUND, val)" */ #define SOUND_HIT 1 #define SOUND_MISS 2 #define SOUND_FLEE 3 #define SOUND_DROP 4 #define SOUND_KILL 5 #define SOUND_LEVEL 6 #define SOUND_DEATH 7 #define SOUND_STUDY 8 #define SOUND_TELEPORT 9 #define SOUND_SHOOT 10 #define SOUND_QUAFF 11 #define SOUND_ZAP 12 #define SOUND_WALK 13 #define SOUND_TPOTHER 14 #define SOUND_HITWALL 15 #define SOUND_EAT 16 #define SOUND_STORE1 17 #define SOUND_STORE2 18 #define SOUND_STORE3 19 #define SOUND_STORE4 20 #define SOUND_DIG 21 #define SOUND_OPENDOOR 22 #define SOUND_SHUTDOOR 23 #define SOUND_TPLEVEL 24 /* * Mega-Hack -- maximum known sounds */ #define SOUND_MAX 25 /*** Hack ***/ /* * Hack -- attempt to reduce various values */ #ifdef ANGBAND_LITE # undef MACRO_MAX # define MACRO_MAX 128 # undef QUARK_MAX # define QUARK_MAX 128 # undef MESSAGE_MAX # define MESSAGE_MAX 128 # undef MESSAGE_BUF # define MESSAGE_BUF 4096 #endif /* * Parse errors */ #define PARSE_ERROR_GENERIC 1 #define PARSE_ERROR_OBSOLETE_FILE 2 #define PARSE_ERROR_MISSING_RECORD_HEADER 3 #define PARSE_ERROR_NON_SEQUENTIAL_RECORDS 4 #define PARSE_ERROR_INVALID_FLAG 5 #define PARSE_ERROR_UNDEFINED_DIRECTIVE 6 #define PARSE_ERROR_OUT_OF_MEMORY 7 #define PARSE_ERROR_OUT_OF_BOUNDS 8 #define PARSE_ERROR_TOO_FEW_ARGUMENTS 9 #define PARSE_ERROR_TOO_MANY_ARGUMENTS 10 #define PARSE_ERROR_MAX 11 /* * Specialty Abilities -BR- */ /* Defense/Armor */ #define SP_ARMOR_MAST 0 /* Increased Body Armor AC */ #define SP_SHIELD_MAST 1 /* Increased Shield AC, Deflection, and Bashing */ #define SP_ARMOR_PROFICIENCY 2 /* Reduced mana penalty for armor */ #define SP_EVASION 3 /* Chance to dodge attacks */ #define SP_MAGIC_RESIST 4 /* Improved Saves */ #define SP_TELEPORT_RESIST 5 /* Save vs Teleport Attacks; Immune to Teleport Level */ #define SP_UNLIGHT 6 /* Improved Stealth, Res Dark, function w/o light, Reduced Light */ /* Physical Attacks */ #define SP_ARMSMAN 20 /* Extra Melee Crits */ #define SP_FAST_ATTACK 21 /* Extra Melee Attacks */ #define SP_MARKSMAN 22 /* Extra Ranged Crits */ #define SP_PIERCE_SHOT 23 /* Ranged Attacks Pierce */ #define SP_MIGHTY_THROW 24 /* Extend Range on Throwing Attacks */ #define SP_POWER_STRIKE 25 /* More Confusion Attacks and Better Attacks (Druids) */ #define SP_MARTIAL_ARTS 26 /* Druid-like Unarmed Combat */ /* Magic and Mana */ #define SP_BEGUILE 40 /* More effective monster status attacks */ #define SP_EXTEND_MAGIC 41 /* Longer duration powerups */ #define SP_FAST_CAST 42 /* Less energy to cast (low level) spells */ #define SP_POWER_SIPHON 43 /* Gain mana when monsters cast */ #define SP_HEIGHTEN_MAGIC 44 /* Cast spells at higher effective level */ #define SP_SOUL_SIPHON 45 /* Gain mana when taking damage */ #define SP_HARMONY 46 /* Gain hp when casting spells */ /* Other */ #define SP_ATHLETICS 60 /* Increase and Partial Sustain Dex/Con */ #define SP_CLARITY 61 /* Increase and Partial Sustain Int/Wis */ #define SP_FURY 63 /* Gain energy when taking damage */ #define SP_MEDITATION 64 /* Faster Mana Regen */ #define SP_REGENERATION 65 /* Faster HP Regen */ #define SP_EXTRA_TRAP 66 /* Set more traps at once */ #define SP_HOLY_LIGHT 67 /* Increased light radius, resist light, damage to undead */ #define SP_NO_SPECIALTY 255