2010-12-02 12:17:54 +11:00
|
|
|
#ifndef __DEFS_H
|
|
|
|
#define __DEFS_H
|
|
|
|
|
|
|
|
// MACROS
|
|
|
|
#define MAXOF(a,b) (a > b ? a : b)
|
|
|
|
|
|
|
|
// save/load
|
|
|
|
#define MAPDIR "data/maps"
|
|
|
|
#define SAVEDIR "data/save"
|
2010-12-07 18:34:26 +11:00
|
|
|
#define DUMMYCELLTYPE 0xabcd
|
2010-12-02 12:17:54 +11:00
|
|
|
|
|
|
|
// SPECIAL NUMBERS/CONSTANTS
|
|
|
|
#define UNLIMITED (-9876)
|
|
|
|
#define ALL (-9875)
|
|
|
|
#define NA (-9874)
|
2011-02-01 06:16:13 +11:00
|
|
|
#define NOBODY (-1)
|
|
|
|
#define ALLCONFERRED (-9873)
|
|
|
|
|
|
|
|
|
2011-03-18 12:25:18 +11:00
|
|
|
enum GAMEMODE {
|
|
|
|
GM_FIRST,
|
|
|
|
GM_INIT,
|
|
|
|
GM_VALIDATION,
|
|
|
|
GM_LOADING,
|
|
|
|
GM_LOADED,
|
|
|
|
GM_GAMESTARTED,
|
|
|
|
};
|
|
|
|
|
2011-02-01 06:16:13 +11:00
|
|
|
enum ATTRIB {
|
|
|
|
A_NONE = -1,
|
|
|
|
A_STR = 0,
|
|
|
|
A_DEX = 1,
|
|
|
|
A_IQ = 2,
|
2011-03-10 16:47:18 +11:00
|
|
|
A_CON = 3,
|
2011-02-01 06:16:13 +11:00
|
|
|
};
|
2011-03-10 16:47:18 +11:00
|
|
|
#define MAXATTS 4
|
2011-02-01 06:16:13 +11:00
|
|
|
|
2011-03-04 12:22:36 +11:00
|
|
|
enum CHECKTYPE {
|
|
|
|
SC_STR,
|
|
|
|
SC_DEX,
|
|
|
|
SC_IQ,
|
2011-03-10 16:47:18 +11:00
|
|
|
SC_CON,
|
2011-03-04 12:22:36 +11:00
|
|
|
//////////
|
|
|
|
SC_DODGE,
|
|
|
|
SC_SLIP,
|
|
|
|
SC_MORALE,
|
2011-03-10 16:47:18 +11:00
|
|
|
SC_OPENLOCKS,
|
2011-03-04 12:22:36 +11:00
|
|
|
};
|
|
|
|
|
2011-02-01 06:16:13 +11:00
|
|
|
enum BURDENED {
|
|
|
|
BR_NONE = 0,
|
|
|
|
BR_BURDENED = 1,
|
2011-02-16 05:21:33 +11:00
|
|
|
BR_STRAINED = 2,
|
|
|
|
BR_OVERLOADED = 3,
|
2011-02-01 06:16:13 +11:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
enum LFCONDITION {
|
|
|
|
C_DEAD = 0,
|
|
|
|
C_CRITICAL = 1,
|
|
|
|
C_SERIOUS = 2,
|
|
|
|
C_WOUNDED = 3,
|
|
|
|
C_HURT = 4,
|
|
|
|
C_HEALTHY = 5,
|
|
|
|
};
|
|
|
|
|
|
|
|
// AI defs
|
|
|
|
|
|
|
|
// if target lf is out of view for this many turns, abandon chase
|
|
|
|
#define AI_FOLLOWTIME (10)
|
|
|
|
|
|
|
|
|
|
|
|
// object confitions for random objects
|
|
|
|
#define RO_NONE 0
|
|
|
|
#define RO_DAMTYPE 1
|
|
|
|
#define RO_OBCLASS 2
|
|
|
|
|
|
|
|
// for flags
|
|
|
|
#define PERMENANT (-9873)
|
|
|
|
#define FROMRACE (-9872)
|
|
|
|
#define FROMJOB (-9871)
|
|
|
|
#define FROMOBEQUIP (-9870)
|
|
|
|
#define FROMOBHOLD (-9869)
|
|
|
|
#define FROMOBACTIVATE (-9868)
|
|
|
|
#define FROMMAT (-9867)
|
|
|
|
#define FROMBLESSING (-9866)
|
2011-03-10 16:47:18 +11:00
|
|
|
#define FROMBRAND (-9865)
|
|
|
|
#define FROMOBMOD (-9864)
|
2011-02-01 06:16:13 +11:00
|
|
|
|
|
|
|
|
|
|
|
#define IFKNOWN (-9772) // used by f_xxconfer. only confer a flag if item is known.
|
|
|
|
#define IFACTIVE (-9771) // used by f_prodeuceslight. only does so if object is activated
|
|
|
|
|
2011-03-04 12:22:36 +11:00
|
|
|
#define NOCONDITION (0)
|
2011-02-16 05:21:33 +11:00
|
|
|
#define IFMONSTER (-9769) // used in v2 of f_ifpct job flags
|
|
|
|
#define IFPLAYER (-9768) // used in v2 of f_ifpct job flags
|
|
|
|
|
2011-02-01 06:16:13 +11:00
|
|
|
#define ANYROOM (-9770)
|
|
|
|
|
|
|
|
#define TICK_INTERVAL (20)
|
2010-12-02 12:17:54 +11:00
|
|
|
|
|
|
|
|
|
|
|
// STRINGS
|
|
|
|
#define BUFLENSMALL 64
|
|
|
|
#define BUFLEN 128
|
|
|
|
#define HUGEBUFLEN 1024
|
|
|
|
|
|
|
|
|
|
|
|
#define MORESTRING "--More--"
|
2011-03-16 15:45:46 +11:00
|
|
|
#define SOLDOUTSTRING "--SOLD OUT--"
|
2010-12-02 12:17:54 +11:00
|
|
|
|
2011-02-01 06:16:13 +11:00
|
|
|
// hunger constant
|
|
|
|
#define HUNGERCONST 10000
|
|
|
|
|
2010-12-02 12:17:54 +11:00
|
|
|
|
|
|
|
// LIMITS
|
|
|
|
|
|
|
|
|
2011-02-01 06:16:13 +11:00
|
|
|
#define DEF_SCREENW 80
|
|
|
|
#define DEF_SCREENH 24
|
2010-12-02 12:17:54 +11:00
|
|
|
|
|
|
|
#define MAXPILEOBS 52
|
|
|
|
|
2011-02-01 06:16:13 +11:00
|
|
|
#define MAXCHOICES 150
|
|
|
|
|
|
|
|
#define MAXDEPTH 25 // max dungeon depth
|
|
|
|
|
2010-12-02 12:17:54 +11:00
|
|
|
#define MAXRANDOMOBCANDIDATES 100
|
2010-12-07 18:34:26 +11:00
|
|
|
#define MAXRANDOMLFCANDIDATES 100
|
2011-03-04 12:22:36 +11:00
|
|
|
#define MAXCANDIDATES 200
|
2010-12-02 12:17:54 +11:00
|
|
|
|
2011-02-01 06:16:13 +11:00
|
|
|
//#define MAX_MAPW 80
|
|
|
|
//#define MAX_MAPH 50
|
2010-12-02 12:17:54 +11:00
|
|
|
#define MAX_MAPW 80
|
2011-02-01 06:16:13 +11:00
|
|
|
#define MAX_MAPH 20
|
|
|
|
|
|
|
|
|
2010-12-02 12:17:54 +11:00
|
|
|
//#define MAX_MAPROOMS 10
|
|
|
|
|
|
|
|
#define MIN_ROOMH 4
|
|
|
|
#define MIN_ROOMW 4
|
|
|
|
#define MAX_ROOMW (MAX_MAPW / 5)
|
|
|
|
#define MAX_ROOMH (MAX_MAPH / 5)
|
|
|
|
|
|
|
|
#define MAXDIR_ORTH 4
|
|
|
|
#define MAXDIR_COMPASS 8
|
|
|
|
|
2011-02-01 06:16:13 +11:00
|
|
|
#define MAXHISTORY 20 // max lines of history to keep
|
|
|
|
|
2010-12-02 12:17:54 +11:00
|
|
|
// MAP BUILDING
|
|
|
|
#define DEF_TURNPCT 40
|
2011-02-01 06:16:13 +11:00
|
|
|
//#define DEF_SPARSENESS 14
|
|
|
|
#define DEF_SPARSENESS 20
|
2010-12-02 12:17:54 +11:00
|
|
|
//#define DEF_SPARSENESS 0
|
2011-02-16 05:21:33 +11:00
|
|
|
//#define DEF_LOOPPCT 70
|
2011-03-04 12:22:36 +11:00
|
|
|
#define DEF_LOOPPCT 95
|
2010-12-02 12:17:54 +11:00
|
|
|
//#define DEF_LOOPPCT 0
|
2011-02-01 06:16:13 +11:00
|
|
|
#define MINROOMS 5
|
|
|
|
#define MAXROOMS 10
|
2010-12-02 12:17:54 +11:00
|
|
|
#define DEF_WINDOWPCT 5
|
|
|
|
|
|
|
|
//
|
|
|
|
#define ANIMDELAY (1000000 / 100) // 1/100 of a second
|
|
|
|
|
2011-02-01 06:16:13 +11:00
|
|
|
#define MAXVISRANGE 10 // max visible range in full light
|
|
|
|
|
2010-12-07 18:34:26 +11:00
|
|
|
|
|
|
|
// askobject options
|
|
|
|
#define AO_NONE 0
|
|
|
|
#define AO_INCLUDENOTHING 1
|
|
|
|
#define AO_ONLYEQUIPPED 2
|
2011-02-01 06:16:13 +11:00
|
|
|
#define AO_EDIBLE 4
|
|
|
|
#define AO_NOTIDENTIFIED 8
|
|
|
|
#define AO_WEARABLE 16
|
|
|
|
#define AO_OPERABLE 32
|
|
|
|
#define AO_POURABLE 64
|
|
|
|
#define AO_EQUIPPEDARMOUR 128
|
|
|
|
#define AO_WEILDABLE 256
|
|
|
|
#define AO_SPECIFIED 512
|
2011-02-16 05:21:33 +11:00
|
|
|
#define AO_READABLE 1024
|
|
|
|
#define AO_ARMOUR 2048
|
2011-03-10 16:47:18 +11:00
|
|
|
#define AO_NOTKNOWN 4096
|
2011-02-01 06:16:13 +11:00
|
|
|
|
|
|
|
// askcoords target types
|
|
|
|
#define TT_NONE 0
|
|
|
|
#define TT_MONSTER 1
|
|
|
|
#define TT_OBJECT 2
|
|
|
|
#define TT_DOOR 4
|
|
|
|
#define TT_PLAYER 8
|
|
|
|
|
|
|
|
// target requirements
|
|
|
|
#define TR_NONE 0
|
|
|
|
#define TR_NEEDLOS 1
|
|
|
|
#define TR_NEEDLOF 2
|
2010-12-07 18:34:26 +11:00
|
|
|
|
2010-12-02 12:17:54 +11:00
|
|
|
// CONTROLLERS
|
|
|
|
#define C_AI 0
|
|
|
|
#define C_PLAYER 1
|
|
|
|
|
2011-02-01 06:16:13 +11:00
|
|
|
// deafult
|
|
|
|
//#define DEF_HEALTIME 100 // time to heal 1 hp
|
|
|
|
|
|
|
|
// speeds
|
|
|
|
#define SP_GODLIKE 1
|
|
|
|
#define SP_ULTRAFAST 5
|
|
|
|
#define SP_VERYFAST 10
|
|
|
|
#define SP_FAST 15
|
|
|
|
#define SP_NORMAL 20
|
|
|
|
#define SP_SLOW 25
|
|
|
|
#define SP_VERYSLOW 30
|
|
|
|
#define SP_ULTRASLOW 35
|
|
|
|
#define SP_SLOWEST 40
|
|
|
|
|
2010-12-02 12:17:54 +11:00
|
|
|
// speed settings (lower is faster)
|
2011-02-01 06:16:13 +11:00
|
|
|
#define SPEED_ATTACK SP_NORMAL
|
2010-12-02 12:17:54 +11:00
|
|
|
#define SPEED_DEAD 50
|
2011-02-16 05:21:33 +11:00
|
|
|
#define SPEED_ACTION SP_NORMAL
|
2011-02-01 06:16:13 +11:00
|
|
|
#define SPEED_MOVE SP_NORMAL
|
|
|
|
#define SPEED_DROP SP_FAST
|
|
|
|
#define SPEED_PICKUP SP_FAST
|
|
|
|
#define SPEED_THROW SP_FAST
|
|
|
|
#define SPEED_WAIT SP_NORMAL
|
|
|
|
#define SPEED_READ SP_NORMAL
|
|
|
|
#define SPEED_DRINK SP_FAST
|
2010-12-02 12:17:54 +11:00
|
|
|
|
|
|
|
|
|
|
|
// DIRECTION TYPES
|
|
|
|
#define DT_ORTH 0
|
|
|
|
#define DT_COMPASS 1
|
|
|
|
|
|
|
|
// DIRECTIONS
|
|
|
|
|
|
|
|
|
|
|
|
#define D_NONE -1
|
|
|
|
#define D_UNKNOWN -2
|
|
|
|
|
|
|
|
// Orthogonal directions
|
|
|
|
#define D_N 0
|
|
|
|
#define D_E 1
|
|
|
|
#define D_S 2
|
|
|
|
#define D_W 3
|
|
|
|
|
|
|
|
// Compass directions
|
|
|
|
#define DC_N 4
|
|
|
|
#define DC_NE 5
|
|
|
|
#define DC_E 6
|
|
|
|
#define DC_SE 7
|
|
|
|
#define DC_S 8
|
|
|
|
#define DC_SW 9
|
|
|
|
#define DC_W 10
|
|
|
|
#define DC_NW 11
|
|
|
|
|
2011-02-01 06:16:13 +11:00
|
|
|
// altitude directions
|
|
|
|
#define D_UP 12
|
|
|
|
#define D_DOWN 13
|
2011-02-16 05:21:33 +11:00
|
|
|
#define D_IN 14
|
2011-02-01 06:16:13 +11:00
|
|
|
|
2010-12-02 12:17:54 +11:00
|
|
|
|
|
|
|
|
|
|
|
// Cell types
|
2011-02-01 06:16:13 +11:00
|
|
|
enum CELLTYPE {
|
|
|
|
CT_WALL,
|
|
|
|
CT_ROOMWALL,
|
|
|
|
CT_CORRIDOR,
|
|
|
|
CT_ROOM,
|
|
|
|
CT_LOOPCORRIDOR,
|
|
|
|
};
|
|
|
|
|
2011-03-04 12:22:36 +11:00
|
|
|
|
2011-02-01 06:16:13 +11:00
|
|
|
enum SPELLSCHOOL {
|
2011-03-04 12:22:36 +11:00
|
|
|
SS_NONE,
|
|
|
|
SS_DIVINE,
|
|
|
|
SS_ABILITY,
|
|
|
|
SS_ALLOMANCY,
|
|
|
|
SS_AIR,
|
|
|
|
SS_DEATH,
|
|
|
|
SS_DIVINATION,
|
|
|
|
SS_FIRE,
|
|
|
|
SS_ICE,
|
|
|
|
SS_GRAVITY,
|
|
|
|
SS_LIFE,
|
|
|
|
SS_MODIFICATION,
|
|
|
|
SS_MENTAL,
|
|
|
|
SS_SUMMONING,
|
|
|
|
SS_TRANSLOCATION,
|
|
|
|
SS_WILD,
|
|
|
|
SS_LAST,
|
2011-02-01 06:16:13 +11:00
|
|
|
};
|
|
|
|
|
|
|
|
enum STRBRACKET {
|
2011-03-10 16:47:18 +11:00
|
|
|
ST_RANDOM = -1,
|
2011-02-01 06:16:13 +11:00
|
|
|
ST_HELPLESS = 0,
|
|
|
|
ST_FEEBLE = 1,
|
|
|
|
ST_VWEAK = 2,
|
|
|
|
ST_WEAK = 3,
|
|
|
|
ST_AVERAGE = 4,
|
|
|
|
ST_STRONG = 5,
|
|
|
|
ST_MIGHTY = 6,
|
|
|
|
ST_TITANIC = 7,
|
|
|
|
};
|
|
|
|
|
|
|
|
enum DEXBRACKET {
|
2011-03-10 16:47:18 +11:00
|
|
|
DX_RANDOM = -1,
|
2011-02-01 06:16:13 +11:00
|
|
|
DX_INCOMPETENT = 0,
|
|
|
|
DX_OAFISH = 1,
|
|
|
|
DX_INEPT = 2,
|
|
|
|
DX_CLUMSY = 3,
|
|
|
|
DX_AWKWARD = 4,
|
|
|
|
DX_AVERAGE = 5,
|
|
|
|
DX_DEXTROUS = 6,
|
|
|
|
DX_NIMBLE = 7,
|
|
|
|
DX_AGILE = 8,
|
|
|
|
DX_SWIFT = 9,
|
|
|
|
DX_SUPERSONIC = 10,
|
|
|
|
};
|
|
|
|
|
|
|
|
enum IQBRACKET {
|
2011-03-10 16:47:18 +11:00
|
|
|
IQ_RANDOM = -1,
|
2011-02-01 06:16:13 +11:00
|
|
|
IQ_MINDLESS = 0,
|
|
|
|
IQ_VEGETABLE = 1,
|
|
|
|
IQ_ANIMAL = 2,
|
|
|
|
IQ_STUPID = 3,
|
|
|
|
IQ_DIMWITTED = 4,
|
|
|
|
IQ_DOPEY = 5,
|
|
|
|
IQ_AVERAGE = 6,
|
|
|
|
IQ_SMART = 7,
|
|
|
|
IQ_ENLIGHTENED = 8,
|
|
|
|
IQ_GENIUS = 9,
|
|
|
|
};
|
2010-12-02 12:17:54 +11:00
|
|
|
|
2011-03-10 16:47:18 +11:00
|
|
|
enum CONBRACKET {
|
|
|
|
CN_RANDOM = -1,
|
|
|
|
CN_FRAIL = 0,
|
|
|
|
CN_SICKLY = 1,
|
|
|
|
CN_UNHEALTHY = 2,
|
|
|
|
CN_UNFIT = 3,
|
|
|
|
CN_AVERAGE = 4,
|
|
|
|
CN_HEALTHY = 5,
|
|
|
|
CN_FIT = 6,
|
|
|
|
CN_HARDY = 7,
|
|
|
|
};
|
|
|
|
|
2010-12-07 18:34:26 +11:00
|
|
|
// damage type
|
|
|
|
enum DAMTYPE {
|
2011-02-16 05:21:33 +11:00
|
|
|
DT_ALL = -1,
|
2011-02-01 06:16:13 +11:00
|
|
|
DT_PIERCE = 0,
|
|
|
|
DT_SLASH = 1,
|
|
|
|
DT_FIRE = 2,
|
|
|
|
DT_COLD = 3,
|
|
|
|
DT_CLAW = 4,
|
|
|
|
DT_BASH = 5,
|
|
|
|
DT_BITE = 6,
|
|
|
|
DT_CHOP = 7,
|
|
|
|
DT_PROJECTILE = 8,
|
|
|
|
DT_HOLY = 9,
|
|
|
|
DT_WATER = 10,
|
|
|
|
DT_ACID = 11,
|
|
|
|
DT_MELT = 12,
|
|
|
|
DT_DIRECT = 13, // eg. from f_obhpdrain flag
|
|
|
|
DT_ELECTRIC = 14,
|
|
|
|
DT_EXPLOSIVE = 15,
|
|
|
|
DT_DECAY = 16,
|
|
|
|
DT_MAGIC = 17,
|
|
|
|
DT_TOUCH = 18,
|
|
|
|
DT_POISONGAS = 19,
|
2011-03-04 12:22:36 +11:00
|
|
|
DT_UNARMED = 20,
|
2011-03-10 16:47:18 +11:00
|
|
|
DT_LIGHT = 21,
|
|
|
|
DT_CRUSH = 22,
|
2011-03-16 15:45:46 +11:00
|
|
|
DT_FALL = 23,
|
|
|
|
DT_NONE = 24, // for direclty dealt damage, not really any type
|
2010-12-07 18:34:26 +11:00
|
|
|
};
|
2011-03-16 15:45:46 +11:00
|
|
|
#define MAXDAMTYPE 25
|
2010-12-07 18:34:26 +11:00
|
|
|
|
2010-12-02 12:17:54 +11:00
|
|
|
// Object Classes
|
|
|
|
enum OBCLASS {
|
|
|
|
OC_MONEY,
|
|
|
|
OC_WEAPON,
|
|
|
|
OC_ARMOUR,
|
2011-03-04 12:22:36 +11:00
|
|
|
OC_MISSILE,
|
2011-02-01 06:16:13 +11:00
|
|
|
OC_RING,
|
2010-12-02 12:17:54 +11:00
|
|
|
OC_SCROLL,
|
|
|
|
OC_POTION,
|
2011-02-16 05:21:33 +11:00
|
|
|
OC_WAND,
|
2010-12-02 12:17:54 +11:00
|
|
|
OC_FOOD,
|
2011-02-01 06:16:13 +11:00
|
|
|
OC_CORPSE,
|
2010-12-02 12:17:54 +11:00
|
|
|
OC_ROCK,
|
2011-03-11 12:25:38 +11:00
|
|
|
OC_TOOLS,
|
2011-02-01 06:16:13 +11:00
|
|
|
OC_TECH,
|
2010-12-02 12:17:54 +11:00
|
|
|
OC_MISC,
|
2010-12-07 18:34:26 +11:00
|
|
|
OC_SPELL,
|
2011-02-01 06:16:13 +11:00
|
|
|
OC_ABILITY,
|
|
|
|
OC_EFFECT,
|
|
|
|
OC_DFEATURE,
|
2011-02-16 05:21:33 +11:00
|
|
|
OC_BOOK,
|
2010-12-02 12:17:54 +11:00
|
|
|
OC_NULL = -999
|
|
|
|
};
|
|
|
|
|
|
|
|
enum BLESSTYPE {
|
|
|
|
B_UNCURSED = 0,
|
|
|
|
B_BLESSED = 1,
|
|
|
|
B_CURSED = -1
|
|
|
|
};
|
|
|
|
|
|
|
|
enum HABITAT {
|
|
|
|
H_DUNGEON = 1,
|
|
|
|
H_ALL = 999
|
|
|
|
};
|
|
|
|
|
2011-02-01 06:16:13 +11:00
|
|
|
/*
|
2010-12-02 12:17:54 +11:00
|
|
|
enum RARITY {
|
2010-12-07 18:34:26 +11:00
|
|
|
RR_UNIQUE = 7,
|
2010-12-02 12:17:54 +11:00
|
|
|
RR_NEVER = 6,
|
|
|
|
RR_VERYRARE = 5,
|
|
|
|
RR_RARE = 4,
|
|
|
|
RR_UNCOMMON = 3,
|
|
|
|
RR_COMMON = 2,
|
|
|
|
RR_FREQUENT = 1,
|
|
|
|
};
|
2011-02-01 06:16:13 +11:00
|
|
|
*/
|
2010-12-02 12:17:54 +11:00
|
|
|
|
|
|
|
|
|
|
|
enum RACE {
|
2011-02-01 06:16:13 +11:00
|
|
|
R_NONE, R_RANDOM,
|
|
|
|
R_HUMAN,
|
|
|
|
// monsters
|
2011-02-16 05:21:33 +11:00
|
|
|
R_BUGBEAR,
|
2011-03-10 16:47:18 +11:00
|
|
|
R_DARKMANTLE,
|
2011-02-01 06:16:13 +11:00
|
|
|
R_EYEBAT,
|
2011-03-04 12:22:36 +11:00
|
|
|
R_GIANTHILL,
|
|
|
|
R_GIANTFIRE,
|
|
|
|
R_GIANTFIREFC,
|
|
|
|
R_GIANTFIRETITAN,
|
2011-02-16 05:21:33 +11:00
|
|
|
R_GNOLL,
|
2011-03-04 12:22:36 +11:00
|
|
|
R_GNOLLHM,
|
|
|
|
R_GNOLLMR,
|
2011-02-01 06:16:13 +11:00
|
|
|
R_GOBLIN,
|
2011-03-04 12:22:36 +11:00
|
|
|
R_GOBLINWAR,
|
|
|
|
R_GOBLINSHOOTER,
|
|
|
|
R_GOBLINHEXER,
|
2011-02-16 05:21:33 +11:00
|
|
|
R_HOBGOBLIN,
|
2011-03-04 12:22:36 +11:00
|
|
|
R_HOBGOBLINWAR,
|
|
|
|
R_KOBOLD,
|
2011-02-01 06:16:13 +11:00
|
|
|
R_LIZARDMAN,
|
2011-02-16 05:21:33 +11:00
|
|
|
R_LURKINGHORROR,
|
2011-02-01 06:16:13 +11:00
|
|
|
R_OGRE,
|
2011-03-04 12:22:36 +11:00
|
|
|
R_OGRESAVAGE,
|
|
|
|
R_OGREWARHULK,
|
|
|
|
R_OOZEGREY,
|
2011-02-01 06:16:13 +11:00
|
|
|
R_ORC,
|
2011-03-04 12:22:36 +11:00
|
|
|
R_ORCWARRIOR,
|
2011-02-01 06:16:13 +11:00
|
|
|
R_ORK,
|
|
|
|
R_POLTERGEIST,
|
2011-02-16 05:21:33 +11:00
|
|
|
R_SHADOWCAT,
|
|
|
|
R_SPRITEFIRE,
|
2011-03-04 12:22:36 +11:00
|
|
|
R_TROGLODYTE,
|
2011-02-01 06:16:13 +11:00
|
|
|
R_TROLL,
|
2011-02-16 05:21:33 +11:00
|
|
|
R_XAT,
|
2011-02-01 06:16:13 +11:00
|
|
|
// small animals
|
2010-12-02 12:17:54 +11:00
|
|
|
R_BAT,
|
2011-02-01 06:16:13 +11:00
|
|
|
R_NEWT,
|
2010-12-07 18:34:26 +11:00
|
|
|
R_RAT,
|
2011-02-01 06:16:13 +11:00
|
|
|
R_WOLF,
|
|
|
|
// insects
|
2011-03-04 12:22:36 +11:00
|
|
|
R_BUTTERFLY,
|
2011-02-01 06:16:13 +11:00
|
|
|
R_GLOWBUG,
|
2010-12-02 12:17:54 +11:00
|
|
|
R_GIANTFLY,
|
|
|
|
R_GIANTBLOWFLY,
|
2011-02-01 06:16:13 +11:00
|
|
|
// undead
|
|
|
|
R_GHAST,
|
|
|
|
R_GHOUL,
|
|
|
|
R_SKELETON,
|
|
|
|
R_ZOMBIE,
|
|
|
|
// special
|
|
|
|
R_GASCLOUD,
|
|
|
|
R_DANCINGWEAPON,
|
|
|
|
};
|
|
|
|
|
|
|
|
enum JOB {
|
|
|
|
J_NONE,
|
|
|
|
J_GOD,
|
|
|
|
J_ADVENTURER,
|
|
|
|
J_ALLOMANCER,
|
|
|
|
J_COMMANDO,
|
|
|
|
J_PLUMBER,
|
|
|
|
J_PRINCE,
|
2011-02-16 05:21:33 +11:00
|
|
|
J_WIZARD,
|
2010-12-02 12:17:54 +11:00
|
|
|
};
|
|
|
|
|
2011-03-18 12:25:18 +11:00
|
|
|
enum MATSTATE {
|
|
|
|
MS_SOLID,
|
|
|
|
MS_LIQUID,
|
|
|
|
MS_GAS,
|
|
|
|
MS_OTHER,
|
|
|
|
};
|
|
|
|
|
2010-12-02 12:17:54 +11:00
|
|
|
// Object Materials
|
|
|
|
enum MATERIAL {
|
2011-02-01 06:16:13 +11:00
|
|
|
MT_NOTHING = 0,
|
|
|
|
MT_BONE = 1,
|
|
|
|
MT_STONE = 2,
|
|
|
|
MT_FIRE = 3,
|
|
|
|
MT_PLASTIC = 4,
|
|
|
|
MT_METAL = 5,
|
|
|
|
MT_GLASS = 6,
|
|
|
|
MT_FLESH = 7,
|
|
|
|
MT_WOOD = 8,
|
|
|
|
MT_GOLD = 9,
|
|
|
|
MT_PAPER = 10,
|
|
|
|
MT_WETPAPER = 11,
|
|
|
|
MT_ICE = 12,
|
|
|
|
MT_WATER = 13,
|
|
|
|
MT_BLOOD = 14,
|
|
|
|
MT_LEATHER = 15,
|
|
|
|
MT_CLOTH = 16,
|
|
|
|
MT_FOOD = 17,
|
|
|
|
MT_RUBBER = 18,
|
|
|
|
MT_MAGIC = 19,
|
|
|
|
MT_GAS = 20,
|
|
|
|
MT_SLIME = 21,
|
2011-03-18 12:25:18 +11:00
|
|
|
MT_WAX = 22,
|
2010-12-02 12:17:54 +11:00
|
|
|
};
|
|
|
|
|
|
|
|
// Object Types
|
|
|
|
enum OBTYPE {
|
2011-02-01 06:16:13 +11:00
|
|
|
OT_NONE,
|
|
|
|
// dungeon features
|
|
|
|
OT_BOULDER,
|
2011-03-04 12:22:36 +11:00
|
|
|
OT_STATUE,
|
2011-02-01 06:16:13 +11:00
|
|
|
OT_WOODENDOOR,
|
|
|
|
OT_WOODENTABLE,
|
|
|
|
OT_WOODENBARREL,
|
|
|
|
OT_WOODENSTOOL,
|
|
|
|
OT_STAIRSDOWN,
|
|
|
|
OT_STAIRSUP,
|
|
|
|
OT_VENDINGMACHINE,
|
2011-02-16 05:21:33 +11:00
|
|
|
OT_PORTAL,
|
2010-12-02 12:17:54 +11:00
|
|
|
// rocks
|
|
|
|
OT_GOLD,
|
|
|
|
OT_STONE,
|
2011-02-01 06:16:13 +11:00
|
|
|
OT_ASH,
|
|
|
|
OT_GEMOFSEEING,
|
|
|
|
// food
|
|
|
|
OT_BERRY,
|
|
|
|
OT_NUT,
|
|
|
|
OT_BANANA,
|
2011-03-04 12:22:36 +11:00
|
|
|
OT_BANANASKIN, // not really food
|
2011-02-01 06:16:13 +11:00
|
|
|
OT_APPLE,
|
|
|
|
OT_MUSHROOM,
|
|
|
|
OT_BREADSTALE,
|
|
|
|
OT_CHEESE,
|
|
|
|
OT_ROASTMEAT,
|
|
|
|
OT_BREADFRESH,
|
|
|
|
OT_CHOCOLATE,
|
2010-12-02 12:17:54 +11:00
|
|
|
// corpses
|
2011-02-16 05:21:33 +11:00
|
|
|
OT_CORPSE,
|
|
|
|
OT_HEAD,
|
|
|
|
/*
|
2011-02-01 06:16:13 +11:00
|
|
|
OT_CORPSEEYEBAT,
|
2010-12-02 12:17:54 +11:00
|
|
|
OT_CORPSEBAT,
|
|
|
|
OT_CORPSEFLY,
|
2011-02-01 06:16:13 +11:00
|
|
|
OT_CORPSEGLOWBUG,
|
|
|
|
OT_CORPSEGOBLIN,
|
|
|
|
OT_CORPSEHUMAN,
|
|
|
|
OT_CORPSELIZARD,
|
|
|
|
OT_CORPSEOGRE,
|
|
|
|
OT_CORPSEORK,
|
|
|
|
OT_CORPSERODENT,
|
|
|
|
OT_CORPSETROLL,
|
|
|
|
OT_CORPSEWOLF,
|
2011-02-16 05:21:33 +11:00
|
|
|
*/
|
2010-12-07 18:34:26 +11:00
|
|
|
// potions
|
2011-02-01 06:16:13 +11:00
|
|
|
OT_POT_ACID,
|
|
|
|
OT_POT_ACROBATICS,
|
|
|
|
OT_POT_AMBROSIA,
|
|
|
|
OT_POT_COMPETENCE,
|
|
|
|
OT_POT_ELEMENTENDURE,
|
|
|
|
OT_POT_ELEMENTIMMUNE,
|
2011-02-16 05:21:33 +11:00
|
|
|
OT_POT_ETHEREALNESS,
|
2011-03-04 12:22:36 +11:00
|
|
|
OT_POT_EXPERIENCE,
|
2011-02-01 06:16:13 +11:00
|
|
|
OT_POT_GASEOUSFORM,
|
2010-12-07 18:34:26 +11:00
|
|
|
OT_POT_HEALING,
|
2011-02-01 06:16:13 +11:00
|
|
|
OT_POT_HEALINGMIN,
|
2011-03-16 15:45:46 +11:00
|
|
|
OT_POT_INVIS,
|
2011-02-01 06:16:13 +11:00
|
|
|
OT_POT_INVULN,
|
|
|
|
OT_POT_MAGIC,
|
|
|
|
OT_POT_OIL,
|
|
|
|
OT_POT_POLYMORPH,
|
|
|
|
OT_POT_RESTORATION,
|
|
|
|
OT_POT_SANCTUARY,
|
|
|
|
OT_POT_SPEED,
|
|
|
|
OT_POT_WATER,
|
|
|
|
OT_POT_JUICE,
|
2010-12-07 18:34:26 +11:00
|
|
|
// scrolls
|
|
|
|
OT_MAP,
|
2011-02-01 06:16:13 +11:00
|
|
|
OT_SCR_NOTHING,
|
|
|
|
OT_SCR_CREATEMONSTER,
|
|
|
|
OT_SCR_DETECTAURA,
|
|
|
|
OT_SCR_DETECTLIFE,
|
2011-02-16 05:21:33 +11:00
|
|
|
OT_SCR_DETECTMAGIC,
|
2011-02-01 06:16:13 +11:00
|
|
|
OT_SCR_FLAMEPILLAR,
|
2011-03-04 12:22:36 +11:00
|
|
|
OT_SCR_FLAMEBURST,
|
2011-02-01 06:16:13 +11:00
|
|
|
OT_SCR_IDENTIFY,
|
2011-02-16 05:21:33 +11:00
|
|
|
OT_SCR_KNOCK,
|
2011-02-01 06:16:13 +11:00
|
|
|
OT_SCR_LIGHT,
|
2010-12-07 18:34:26 +11:00
|
|
|
OT_SCR_MAPPING,
|
2011-02-01 06:16:13 +11:00
|
|
|
OT_SCR_MINDSCAN,
|
2011-02-16 05:21:33 +11:00
|
|
|
OT_SCR_ENCHANT,
|
2011-02-01 06:16:13 +11:00
|
|
|
OT_SCR_FREEZEOB,
|
2011-02-16 05:21:33 +11:00
|
|
|
OT_SCR_REMOVECURSE,
|
2011-03-16 15:45:46 +11:00
|
|
|
OT_SCR_TELEPORT,
|
2011-02-16 05:21:33 +11:00
|
|
|
OT_SCR_TURNUNDEAD,
|
2011-02-01 06:16:13 +11:00
|
|
|
OT_SCR_WISH,
|
2011-03-18 12:25:18 +11:00
|
|
|
// BOOKS
|
|
|
|
OT_MAN_ATHLETICS,
|
|
|
|
OT_MAN_FIRSTAID,
|
|
|
|
OT_MAN_LOCKPICKING,
|
|
|
|
OT_MAN_RESEARCH,
|
|
|
|
OT_MAN_SPELLCASTING,
|
|
|
|
// manuals of weaponry
|
|
|
|
OT_MAN_AXES,
|
|
|
|
OT_MAN_CLUBS,
|
|
|
|
OT_MAN_LONGBLADES,
|
|
|
|
OT_MAN_POLEARMS,
|
|
|
|
OT_MAN_SHORTBLADES,
|
|
|
|
OT_MAN_STAVES,
|
|
|
|
OT_MAN_UNARMED,
|
|
|
|
// manuals of spells
|
|
|
|
OT_MAN_SS_ALLOMANCY,
|
|
|
|
OT_MAN_SS_AIR,
|
|
|
|
OT_MAN_SS_DEATH,
|
|
|
|
OT_MAN_SS_DIVINATION,
|
|
|
|
OT_MAN_SS_FIRE,
|
|
|
|
OT_MAN_SS_ICE,
|
|
|
|
OT_MAN_SS_GRAVITY,
|
|
|
|
OT_MAN_SS_LIFE,
|
|
|
|
OT_MAN_SS_MODIFICATION,
|
|
|
|
OT_MAN_SS_MENTAL,
|
|
|
|
OT_MAN_SS_SUMMONING,
|
|
|
|
OT_MAN_SS_TRANSLOCATION,
|
|
|
|
OT_MAN_SS_WILD,
|
|
|
|
OT_MAN_TECHUSAGE,
|
2011-02-16 05:21:33 +11:00
|
|
|
// SPELLBOOKS
|
|
|
|
// allomancy can't be learned from books
|
|
|
|
// -- death
|
2011-03-04 12:22:36 +11:00
|
|
|
OT_SB_ANIMATEDEAD,
|
|
|
|
OT_SB_PAIN,
|
2011-02-16 05:21:33 +11:00
|
|
|
OT_SB_INFINITEDEATH,
|
|
|
|
OT_SB_WEAKEN,
|
2011-03-04 12:22:36 +11:00
|
|
|
OT_SB_BLINDNESS,
|
2011-02-16 05:21:33 +11:00
|
|
|
// -- divination
|
|
|
|
OT_SB_DETECTAURA,
|
|
|
|
OT_SB_DETECTLIFE,
|
|
|
|
OT_SB_IDENTIFY,
|
|
|
|
OT_SB_MAPPING,
|
2011-03-04 12:22:36 +11:00
|
|
|
// -- elemental - air
|
|
|
|
OT_SB_CLOUDKILL,
|
|
|
|
// -- elemental - fire
|
|
|
|
OT_SB_SPARK,
|
2011-02-16 05:21:33 +11:00
|
|
|
OT_SB_FIREDART,
|
|
|
|
OT_SB_FIREBALL,
|
|
|
|
OT_SB_FLAMEPILLAR,
|
2011-03-04 12:22:36 +11:00
|
|
|
OT_SB_FLAMEBURST,
|
|
|
|
OT_SB_BURNINGWAVE,
|
|
|
|
// -- elemental - ice
|
|
|
|
OT_SB_CONECOLD,
|
|
|
|
OT_SB_FREEZEOB,
|
2011-02-16 05:21:33 +11:00
|
|
|
// -- gravity
|
|
|
|
OT_SB_GRAVBOOST,
|
|
|
|
OT_SB_HASTE,
|
|
|
|
OT_SB_SLOW,
|
|
|
|
// -- life
|
|
|
|
OT_SB_HEALING,
|
|
|
|
OT_SB_HEALINGMIN,
|
|
|
|
OT_SB_TURNUNDEAD,
|
|
|
|
// -- mental
|
|
|
|
OT_SB_MINDSCAN,
|
|
|
|
OT_SB_TELEKINESIS,
|
|
|
|
// -- modification
|
|
|
|
OT_SB_GASEOUSFORM,
|
|
|
|
OT_SB_KNOCK,
|
|
|
|
OT_SB_INSCRIBE,
|
2011-03-16 15:45:46 +11:00
|
|
|
OT_SB_INVISIBILITY,
|
2011-02-16 05:21:33 +11:00
|
|
|
OT_SB_LIGHT,
|
2011-03-04 12:22:36 +11:00
|
|
|
OT_SB_DARKNESS,
|
2011-02-16 05:21:33 +11:00
|
|
|
OT_SB_PASSWALL,
|
2011-03-04 12:22:36 +11:00
|
|
|
OT_SB_PETRIFY,
|
2011-02-16 05:21:33 +11:00
|
|
|
OT_SB_POLYMORPH,
|
|
|
|
// -- summoning
|
|
|
|
OT_SB_CREATEMONSTER,
|
|
|
|
// -- translocation
|
|
|
|
OT_SB_BLINK,
|
|
|
|
OT_SB_DISPERSAL,
|
|
|
|
OT_SB_GATE,
|
|
|
|
OT_SB_TELEPORT,
|
|
|
|
// -- wild can't be learned from books
|
2011-02-01 06:16:13 +11:00
|
|
|
// spells
|
|
|
|
// -- allomancy
|
|
|
|
OT_S_ABSORBMETAL,
|
|
|
|
OT_S_ACCELMETAL,
|
|
|
|
OT_S_ANIMATEMETAL,
|
2011-02-16 05:21:33 +11:00
|
|
|
OT_S_EXPLODEMETAL,
|
2011-02-01 06:16:13 +11:00
|
|
|
OT_S_PULLMETAL,
|
|
|
|
OT_S_MAGSHIELD,
|
2011-02-16 05:21:33 +11:00
|
|
|
OT_S_METALHEAL,
|
2011-02-01 06:16:13 +11:00
|
|
|
// -- death
|
2011-03-04 12:22:36 +11:00
|
|
|
OT_S_ANIMATEDEAD,
|
|
|
|
OT_S_PAIN,
|
2011-02-01 06:16:13 +11:00
|
|
|
OT_S_INFINITEDEATH,
|
|
|
|
OT_S_WEAKEN,
|
2011-03-04 12:22:36 +11:00
|
|
|
OT_S_BLINDNESS,
|
2011-02-01 06:16:13 +11:00
|
|
|
// -- divination
|
|
|
|
OT_S_DETECTAURA,
|
|
|
|
OT_S_DETECTLIFE,
|
2011-02-16 05:21:33 +11:00
|
|
|
OT_S_DETECTMAGIC,
|
2011-02-01 06:16:13 +11:00
|
|
|
OT_S_IDENTIFY,
|
|
|
|
OT_S_MAPPING,
|
2011-03-04 12:22:36 +11:00
|
|
|
// -- elemental - air
|
|
|
|
OT_S_CLOUDKILL,
|
|
|
|
// -- elemental - fire
|
|
|
|
OT_S_SPARK,
|
2011-02-01 06:16:13 +11:00
|
|
|
OT_S_FIREDART,
|
|
|
|
OT_S_FIREBALL,
|
|
|
|
OT_S_FLAMEPILLAR,
|
2011-03-04 12:22:36 +11:00
|
|
|
OT_S_FLAMEBURST,
|
|
|
|
OT_S_BURNINGWAVE,
|
|
|
|
// -- elemental - ice
|
|
|
|
OT_S_CONECOLD,
|
|
|
|
OT_S_FREEZEOB,
|
2011-02-01 06:16:13 +11:00
|
|
|
// -- gravity
|
|
|
|
OT_S_GRAVBOOST,
|
|
|
|
OT_S_HASTE,
|
|
|
|
OT_S_SLOW,
|
|
|
|
// -- life
|
|
|
|
OT_S_HEALING,
|
|
|
|
OT_S_HEALINGMIN,
|
|
|
|
OT_S_TURNUNDEAD,
|
|
|
|
// -- mental
|
|
|
|
OT_S_MINDSCAN,
|
2011-03-04 12:22:36 +11:00
|
|
|
OT_S_SLEEP,
|
2011-02-01 06:16:13 +11:00
|
|
|
OT_S_TELEKINESIS,
|
|
|
|
// -- modification
|
2011-02-16 05:21:33 +11:00
|
|
|
OT_S_ENCHANT,
|
2011-02-01 06:16:13 +11:00
|
|
|
OT_S_GASEOUSFORM,
|
|
|
|
OT_S_INSCRIBE,
|
2011-03-16 15:45:46 +11:00
|
|
|
OT_S_INVISIBILITY,
|
2011-02-16 05:21:33 +11:00
|
|
|
OT_S_KNOCK,
|
2011-02-01 06:16:13 +11:00
|
|
|
OT_S_LIGHT,
|
2011-03-04 12:22:36 +11:00
|
|
|
OT_S_DARKNESS,
|
2011-02-16 05:21:33 +11:00
|
|
|
OT_S_PASSWALL,
|
2011-03-04 12:22:36 +11:00
|
|
|
OT_S_PETRIFY,
|
2011-02-01 06:16:13 +11:00
|
|
|
OT_S_POLYMORPH,
|
|
|
|
OT_S_POLYMORPHRND,
|
|
|
|
// -- summoning
|
|
|
|
OT_S_CREATEMONSTER,
|
|
|
|
// -- translocation
|
2011-02-16 05:21:33 +11:00
|
|
|
OT_S_BLINK,
|
2011-02-01 06:16:13 +11:00
|
|
|
OT_S_DISPERSAL,
|
2011-02-16 05:21:33 +11:00
|
|
|
OT_S_GATE,
|
2011-02-01 06:16:13 +11:00
|
|
|
OT_S_TELEPORT,
|
|
|
|
// -- wild
|
|
|
|
OT_S_MANASPIKE,
|
2011-02-16 05:21:33 +11:00
|
|
|
OT_S_DETONATE,
|
2011-02-01 06:16:13 +11:00
|
|
|
OT_S_ENERGYBOLT,
|
|
|
|
OT_S_ENERGYBLAST,
|
|
|
|
OT_S_FLASH,
|
|
|
|
// -- divine powers
|
|
|
|
OT_S_WISH,
|
2011-02-16 05:21:33 +11:00
|
|
|
OT_S_GIFT,
|
2011-03-18 12:25:18 +11:00
|
|
|
OT_A_DEBUG,
|
|
|
|
OT_A_LEARN,
|
2011-02-01 06:16:13 +11:00
|
|
|
// abilities
|
2011-03-04 12:22:36 +11:00
|
|
|
OT_A_GRAB,
|
2011-03-10 16:47:18 +11:00
|
|
|
OT_A_CRUSH,
|
2011-02-01 06:16:13 +11:00
|
|
|
OT_A_JUMP,
|
2011-02-16 05:21:33 +11:00
|
|
|
OT_A_SPRINT,
|
|
|
|
OT_A_EMPLOY,
|
2011-03-04 12:22:36 +11:00
|
|
|
OT_A_HEAVYBLOW,
|
2011-03-10 16:47:18 +11:00
|
|
|
OT_A_INSPECT,
|
2011-02-16 05:21:33 +11:00
|
|
|
// wands
|
|
|
|
OT_WAND_COLD,
|
|
|
|
OT_WAND_DETONATION,
|
2011-03-16 15:45:46 +11:00
|
|
|
OT_WAND_DISPERSAL,
|
2011-02-16 05:21:33 +11:00
|
|
|
OT_WAND_FIRE,
|
|
|
|
OT_WAND_FIREBALL,
|
|
|
|
OT_WAND_HASTE,
|
2011-03-16 15:45:46 +11:00
|
|
|
OT_WAND_INVIS,
|
2011-02-16 05:21:33 +11:00
|
|
|
OT_WAND_KNOCK,
|
|
|
|
OT_WAND_LIGHT,
|
|
|
|
OT_WAND_POLYMORPH,
|
|
|
|
OT_WAND_SLOW,
|
|
|
|
OT_WAND_WEAKNESS,
|
2011-03-04 12:22:36 +11:00
|
|
|
OT_WAND_WONDER,
|
2011-03-11 12:25:38 +11:00
|
|
|
// tools
|
2011-02-01 06:16:13 +11:00
|
|
|
OT_BLINDFOLD,
|
2011-03-11 12:25:38 +11:00
|
|
|
OT_BUGLAMP,
|
2011-03-18 12:25:18 +11:00
|
|
|
OT_CANDLE,
|
2011-03-11 12:25:38 +11:00
|
|
|
OT_GUNPOWDER,
|
|
|
|
OT_LANTERNOIL,
|
|
|
|
OT_LOCKPICK,
|
|
|
|
OT_PICKAXE,
|
2011-03-18 12:25:18 +11:00
|
|
|
OT_TORCH,
|
2011-03-11 12:25:38 +11:00
|
|
|
// tech
|
2011-02-01 06:16:13 +11:00
|
|
|
OT_POCKETWATCH,
|
|
|
|
OT_C4,
|
|
|
|
OT_CREDITCARD,
|
|
|
|
OT_DIGITALWATCH,
|
|
|
|
OT_FLASHBANG,
|
|
|
|
OT_GRENADE,
|
|
|
|
OT_INFOVISOR,
|
|
|
|
OT_INSECTICIDE,
|
|
|
|
OT_JETPACK,
|
|
|
|
OT_LANTERNLED,
|
|
|
|
OT_LOCKHACKER,
|
|
|
|
OT_MOTIONSCANNER,
|
|
|
|
OT_NVGOGGLES,
|
|
|
|
OT_PAPERCLIP,
|
|
|
|
OT_TELEPAD,
|
|
|
|
OT_XRAYGOGGLES,
|
2010-12-07 18:34:26 +11:00
|
|
|
// misc objects
|
2011-02-01 06:16:13 +11:00
|
|
|
OT_BONE,
|
2010-12-07 18:34:26 +11:00
|
|
|
OT_EMPTYFLASK,
|
2011-02-01 06:16:13 +11:00
|
|
|
OT_EMPTYVIAL,
|
|
|
|
OT_CALTROP,
|
2010-12-07 18:34:26 +11:00
|
|
|
OT_BROKENGLASS,
|
2011-02-01 06:16:13 +11:00
|
|
|
OT_ICECHUNK,
|
2011-03-04 12:22:36 +11:00
|
|
|
OT_ICESHEET,
|
2010-12-07 18:34:26 +11:00
|
|
|
OT_PUDDLEWATER,
|
2011-02-16 05:21:33 +11:00
|
|
|
OT_PUDDLEWATERL,
|
2011-02-01 06:16:13 +11:00
|
|
|
OT_SLIMEPOOL,
|
|
|
|
OT_VOMITPOOL,
|
|
|
|
OT_BLOODSTAIN,
|
2011-03-04 12:22:36 +11:00
|
|
|
OT_BLOODSPLASH,
|
2011-02-01 06:16:13 +11:00
|
|
|
OT_BLOODPOOL,
|
2011-03-18 12:25:18 +11:00
|
|
|
OT_MELTEDWAX,
|
2011-02-01 06:16:13 +11:00
|
|
|
OT_SOGGYPAPER,
|
|
|
|
OT_FLESHCHUNK,
|
|
|
|
// effects
|
|
|
|
OT_FIRELARGE,
|
|
|
|
OT_FIREMED,
|
|
|
|
OT_FIRESMALL,
|
|
|
|
OT_MAGICBARRIER,
|
|
|
|
OT_SMOKECLOUD,
|
|
|
|
OT_SMOKEPUFF,
|
|
|
|
OT_POISONCLOUD,
|
|
|
|
OT_POISONPUFF,
|
|
|
|
// armour - body
|
|
|
|
OT_ARMOURLEATHER,
|
2011-03-04 12:22:36 +11:00
|
|
|
OT_ARMOURRING,
|
|
|
|
OT_ARMOURSCALE,
|
|
|
|
OT_ARMOURCHAIN,
|
|
|
|
OT_ARMOURSPLINT,
|
|
|
|
OT_ARMOURPLATE,
|
2011-02-01 06:16:13 +11:00
|
|
|
OT_FLAKJACKET,
|
|
|
|
OT_OVERALLS,
|
|
|
|
OT_COTTONSHIRT,
|
|
|
|
OT_SILKSHIRT,
|
2011-02-16 05:21:33 +11:00
|
|
|
OT_ROBE,
|
|
|
|
OT_VELVETROBE,
|
2011-02-01 06:16:13 +11:00
|
|
|
// armour - shoulders
|
|
|
|
OT_CLOAK,
|
2011-02-16 05:21:33 +11:00
|
|
|
// armour - waist
|
|
|
|
OT_BELTLEATHER,
|
2011-02-01 06:16:13 +11:00
|
|
|
// armour - legs
|
|
|
|
OT_CLOTHTROUSERS,
|
|
|
|
OT_RIDINGTROUSERS,
|
|
|
|
OT_COMBATPANTS,
|
2010-12-07 18:34:26 +11:00
|
|
|
// armour - feet
|
2011-02-01 06:16:13 +11:00
|
|
|
OT_SANDALS,
|
|
|
|
OT_SHOESLEATHER,
|
2010-12-07 18:34:26 +11:00
|
|
|
OT_BOOTSLEATHER,
|
2011-02-01 06:16:13 +11:00
|
|
|
OT_BOOTSRUBBER,
|
2011-03-04 12:22:36 +11:00
|
|
|
OT_BOOTSSPIKED,
|
2010-12-07 18:34:26 +11:00
|
|
|
// armour - hands
|
2011-02-01 06:16:13 +11:00
|
|
|
OT_GLOVESCLOTH,
|
2010-12-07 18:34:26 +11:00
|
|
|
OT_GLOVESLEATHER,
|
2011-02-01 06:16:13 +11:00
|
|
|
OT_GAUNTLETS,
|
|
|
|
// armour - head
|
|
|
|
OT_SUNHAT,
|
|
|
|
OT_CAP,
|
|
|
|
OT_HELM,
|
|
|
|
OT_GASMASK,
|
|
|
|
OT_GOLDCROWN,
|
|
|
|
OT_HELMBONE,
|
|
|
|
OT_HELMFOOTBALL,
|
|
|
|
// armour - eyes
|
|
|
|
OT_SUNGLASSES,
|
|
|
|
// armour - shields
|
|
|
|
OT_BUCKLER,
|
2011-03-04 12:22:36 +11:00
|
|
|
OT_SHIELD,
|
|
|
|
OT_SHIELDLARGE,
|
2011-02-01 06:16:13 +11:00
|
|
|
// rings
|
2011-03-16 15:45:46 +11:00
|
|
|
OT_RING_INVIS,
|
2011-02-01 06:16:13 +11:00
|
|
|
OT_RING_INVULN,
|
|
|
|
OT_RING_MPREGEN,
|
|
|
|
OT_RING_PROTFIRE,
|
|
|
|
OT_RING_REGENERATION,
|
|
|
|
OT_RING_RESISTMAG,
|
2011-03-16 15:45:46 +11:00
|
|
|
OT_RING_SEEINVIS,
|
2010-12-07 18:34:26 +11:00
|
|
|
// animal weapons
|
2011-02-01 06:16:13 +11:00
|
|
|
OT_CLAWS,
|
2010-12-07 18:34:26 +11:00
|
|
|
OT_FISTS,
|
2011-02-01 06:16:13 +11:00
|
|
|
OT_TAIL,
|
|
|
|
OT_TEETH,
|
2011-03-10 16:47:18 +11:00
|
|
|
OT_TENTACLE,
|
2011-02-01 06:16:13 +11:00
|
|
|
OT_ZAPPER,
|
|
|
|
// monster weapons
|
|
|
|
OT_ACIDATTACK,
|
|
|
|
OT_TOUCHPARALYZE,
|
|
|
|
OT_TOUCHPARALYZE2,
|
2011-03-04 12:22:36 +11:00
|
|
|
// missiles / ammo
|
|
|
|
OT_ARROW,
|
|
|
|
OT_BOLT,
|
|
|
|
OT_DART,
|
|
|
|
OT_NANODART,
|
|
|
|
OT_JAVELIN,
|
|
|
|
OT_BULLET,
|
|
|
|
OT_RUBBERBULLET,
|
2010-12-07 18:34:26 +11:00
|
|
|
// stabbing weapons
|
|
|
|
OT_DAGGER,
|
2011-02-01 06:16:13 +11:00
|
|
|
OT_COMBATKNIFE,
|
|
|
|
OT_ORNDAGGER,
|
2010-12-07 18:34:26 +11:00
|
|
|
OT_RAPIER,
|
|
|
|
OT_TRIDENT,
|
|
|
|
OT_QUICKBLADE,
|
2011-02-01 06:16:13 +11:00
|
|
|
// chopping weapons
|
|
|
|
OT_AXE,
|
2011-03-04 12:22:36 +11:00
|
|
|
OT_HANDAXE,
|
2011-02-01 06:16:13 +11:00
|
|
|
OT_BATTLEAXE,
|
|
|
|
OT_GREATAXE,
|
2010-12-07 18:34:26 +11:00
|
|
|
// slashing weapons
|
2011-02-01 06:16:13 +11:00
|
|
|
OT_KNIFE,
|
|
|
|
OT_STEAKKNIFE,
|
2010-12-07 18:34:26 +11:00
|
|
|
OT_SCYTHE,
|
|
|
|
OT_SHORTSWORD,
|
|
|
|
OT_SCIMITAR,
|
|
|
|
OT_LONGSWORD,
|
2011-03-04 12:22:36 +11:00
|
|
|
OT_GREATSWORD,
|
2011-02-01 06:16:13 +11:00
|
|
|
OT_ORNSWORD,
|
2010-12-07 18:34:26 +11:00
|
|
|
// polearms
|
|
|
|
OT_SPEAR,
|
|
|
|
OT_QUARTERSTAFF,
|
|
|
|
// bashing weapons
|
2011-02-01 06:16:13 +11:00
|
|
|
OT_STICK,
|
|
|
|
OT_SPANNER,
|
2010-12-07 18:34:26 +11:00
|
|
|
OT_CLUB,
|
2011-03-04 12:22:36 +11:00
|
|
|
OT_FLAIL,
|
|
|
|
OT_FLAILHEAVY,
|
2010-12-07 18:34:26 +11:00
|
|
|
OT_MACE,
|
|
|
|
OT_MORNINGSTAR,
|
|
|
|
OT_GREATCLUB,
|
|
|
|
OT_SICKLE,
|
2011-02-01 06:16:13 +11:00
|
|
|
// projectile weapons
|
|
|
|
OT_REVOLVER,
|
|
|
|
OT_SLING,
|
2011-03-04 12:22:36 +11:00
|
|
|
OT_BOW,
|
|
|
|
OT_LONGBOW,
|
|
|
|
OT_CROSSBOWHAND,
|
2011-02-01 06:16:13 +11:00
|
|
|
// holy weapons
|
2010-12-07 18:34:26 +11:00
|
|
|
OT_HANDOFGOD,
|
2011-02-16 05:21:33 +11:00
|
|
|
|
|
|
|
|
2010-12-07 18:34:26 +11:00
|
|
|
};
|
|
|
|
|
2011-02-01 06:16:13 +11:00
|
|
|
|
|
|
|
#define BP_NONE (-1)
|
2010-12-07 18:34:26 +11:00
|
|
|
enum BODYPART {
|
2011-02-01 06:16:13 +11:00
|
|
|
BP_WEAPON = 0,
|
|
|
|
BP_SECWEAPON,
|
|
|
|
BP_EYES,
|
2010-12-07 18:34:26 +11:00
|
|
|
BP_HEAD,
|
|
|
|
BP_SHOULDERS,
|
2011-02-01 06:16:13 +11:00
|
|
|
BP_BODY,
|
|
|
|
BP_HANDS,
|
2011-02-16 05:21:33 +11:00
|
|
|
BP_WAIST,
|
2011-02-01 06:16:13 +11:00
|
|
|
BP_LEGS,
|
2010-12-07 18:34:26 +11:00
|
|
|
BP_FEET,
|
2011-02-01 06:16:13 +11:00
|
|
|
BP_RIGHTHAND,
|
|
|
|
BP_LEFTHAND,
|
|
|
|
};
|
2011-02-16 05:21:33 +11:00
|
|
|
#define MAXBODYPARTS (12)
|
2011-02-01 06:16:13 +11:00
|
|
|
|
|
|
|
// empty types
|
|
|
|
#define WE_NOTSOLID 1
|
|
|
|
#define WE_EMPTY 2
|
2011-02-16 05:21:33 +11:00
|
|
|
#define WE_PORTAL 3
|
2011-02-01 06:16:13 +11:00
|
|
|
|
|
|
|
enum NOISETYPE {
|
|
|
|
N_GETANGRY,
|
|
|
|
};
|
|
|
|
|
|
|
|
enum LFSIZE {
|
2011-03-04 12:22:36 +11:00
|
|
|
SZ_MINI = 0, // ie. fly
|
|
|
|
SZ_TINY = 1, // ie. mouse
|
|
|
|
SZ_SMALL = 2, // ie. cat
|
|
|
|
SZ_MEDIUM = 3, // ie. wolf/dog
|
|
|
|
SZ_HUMAN = 4, // ie. human-sized
|
|
|
|
SZ_LARGE = 5, // ie. bear/horse
|
|
|
|
SZ_HUGE = 6, // ie. elephant, dragon, giant
|
|
|
|
SZ_ENORMOUS = 7, // ie. ??? kraken, titan
|
|
|
|
SZ_MAX = 100
|
2010-12-02 12:17:54 +11:00
|
|
|
};
|
|
|
|
|
2011-02-01 06:16:13 +11:00
|
|
|
|
2010-12-02 12:17:54 +11:00
|
|
|
enum FLAG {
|
2011-02-01 06:16:13 +11:00
|
|
|
F_NONE, // dummy flag
|
2010-12-02 12:17:54 +11:00
|
|
|
// object flags
|
2011-02-01 06:16:13 +11:00
|
|
|
F_DEAD, // object will be removed
|
2011-02-16 05:21:33 +11:00
|
|
|
F_ENCHANTABLE, // object can get +1/-1 ect
|
2010-12-02 12:17:54 +11:00
|
|
|
F_STACKABLE, // can stack multiple objects togethr
|
|
|
|
F_NO_PLURAL, // this obname doesn't need an 's' for plurals (eg. gold, money)
|
|
|
|
F_NO_A, // this obname doesn't need to start with 'a' for singular (eg. gold)
|
2011-03-16 15:45:46 +11:00
|
|
|
F_CONTAINSOB, // for vending machiens. v0 is ob letter
|
|
|
|
// text is an object it contains.
|
2011-02-01 06:16:13 +11:00
|
|
|
// for items in shops
|
|
|
|
F_SHOPITEM, // causes shops to show this item as identified
|
|
|
|
F_VALUE, // how much an item is worth (over its base weight+material)
|
|
|
|
// weapon/armour flags
|
2010-12-07 18:34:26 +11:00
|
|
|
F_EQUIPPED, // val0 = where it is equipped. CLEAR WHEN OB MOVED!
|
2011-02-01 06:16:13 +11:00
|
|
|
F_CURAMMO, // currently equipped ammo
|
2010-12-07 18:34:26 +11:00
|
|
|
F_GOESON, // val0 = where it can be equipped.
|
2011-02-01 06:16:13 +11:00
|
|
|
F_BONUS, // val0=bonus/penalty to damage/armour. ie. +1 sword
|
|
|
|
F_MISSILE, // weapon would make a good missle - used by AI
|
|
|
|
F_UNIQUE, // only one may appear
|
|
|
|
F_GLYPH, // override the glyph with the first char of text
|
|
|
|
F_NOPICKUP, // cannot pick this up
|
2011-03-04 12:22:36 +11:00
|
|
|
F_IMPASSABLE, // cannot walk past this if your size if v0 or smaller
|
|
|
|
F_CRUSHABLE, // if you are bigger than size v0, walking on this crushes it
|
2011-02-01 06:16:13 +11:00
|
|
|
F_BLOCKSVIEW, // cannot see past this
|
|
|
|
F_BLOCKSTHROW, // cannot throw past this
|
|
|
|
F_DIETEXT, // text when the object dies
|
|
|
|
F_DIECONVERTTEXT, // text when the object converts. eg. "melts"
|
|
|
|
F_DIECONVERTTEXTPL, // text when the object converts, if there are more than 1. eg. "melt"
|
|
|
|
F_DIECONVERT, // val0 = what this turns into when dying
|
|
|
|
F_NOBLESS, // can't be blessed or cursed
|
|
|
|
F_CORPSEOF, // this is a corpse of montype val0.
|
|
|
|
F_DTCONVERT, // damtype val0 converts this to f->text
|
2011-03-18 12:25:18 +11:00
|
|
|
F_NODTCONVERT, // overrides DTCONVERT .
|
|
|
|
F_NOMATCONVERT, // overrides MATCONVERT .
|
2011-02-01 06:16:13 +11:00
|
|
|
F_MATCONVERT, // touching material id val0 converts this to f->text
|
|
|
|
F_MATCONVERTTEXT, // description when F_MATCONVERT happens. ie. "is consumed in flame"
|
|
|
|
F_MATCONVERTTEXTPL, // plural for matconverttext.
|
|
|
|
F_DTIMMUNE, // immune to damtype val0
|
|
|
|
F_DTRESIST, // half dam from damtype val0
|
|
|
|
F_DTVULN, // double dam from damtype val0
|
2011-03-10 16:47:18 +11:00
|
|
|
// if dam=0, set dam to textfield dice (eg.text="2d6")
|
2011-02-01 06:16:13 +11:00
|
|
|
F_MATIMMUNE, // immune to damage from obs with material 'mat'
|
|
|
|
F_DAMAGABLE, // this ob can be damaged via takedamage()
|
|
|
|
F_TINTED, // when worn on eyes, protects against bright lights
|
2011-03-10 16:47:18 +11:00
|
|
|
F_HASBRAND, // has the object mod v0 (ie. OM_FLAMESTRIKE)
|
2011-02-01 06:16:13 +11:00
|
|
|
F_HOLDCONFER, // gives flag v0+v1 when carried. v2 specifies if it must be id'd.
|
|
|
|
F_EQUIPCONFER, // gives flag v0+v1 when weilded/worn. v2 specifies if it must be id'd.
|
|
|
|
F_ACTIVATECONFER, // gives flag v0+v1 when activated. v2 specifies if it must be id'd.
|
|
|
|
|
|
|
|
F_HITCONFER, // hitting with this gives flagid=v0
|
|
|
|
// with flagval0 = val1
|
|
|
|
// with flagval1 = val2
|
|
|
|
// with timeleft = text ("min-max")
|
|
|
|
F_ACTIVATED, // val0 = is this object turned on?
|
|
|
|
F_GRENADE, // this obkejct will drain charge when activated, then die
|
|
|
|
F_EXPLODEONDEATH, // explodes when it dies, deals val0 vamage.
|
|
|
|
// val1 = BIG means hit surrounding cells
|
|
|
|
// val2 = ifactivated, only explodes if activated.
|
|
|
|
F_EXPLODEONDAM, // explodes when it is damaged, deals val0 vamage.
|
|
|
|
// val1 = BIG means hit surrounding cells
|
|
|
|
// val2 = ifactivated, only explodes if activated.
|
|
|
|
F_FLASHONDEATH, // produce a bright flash when it dies,v0=range
|
|
|
|
F_FLASHONDAM, // produces a bright flash when it is damaged,v0=range,v2=ifacctivated
|
|
|
|
F_LASTDAMTYPE, // object equivilant of lf->lastdamtype
|
|
|
|
F_OPERONOFF, // operating this will just turn it on/off
|
|
|
|
F_OPERUSECHARGE, // operating this will use 1 charge
|
|
|
|
F_OPERNEEDTARGET, // need to ask for a target of type val0 when opering
|
2011-02-16 05:21:33 +11:00
|
|
|
// v0 is target requirements (los/lof)
|
2011-02-01 06:16:13 +11:00
|
|
|
// text is prompt
|
2011-02-16 05:21:33 +11:00
|
|
|
F_OPERNEEDDIR, // need to ask a direction when operating this. text is prompt
|
2011-03-18 12:25:18 +11:00
|
|
|
|
|
|
|
// tool flags
|
|
|
|
F_LIGHTSOURCE, // a light source like a torch, lantern etc
|
|
|
|
F_CHARGELOWMSG, // text = msg when charges are nearly out
|
|
|
|
F_CHARGEOUTMSG, // text = msg when charges are gone
|
2011-03-11 12:25:38 +11:00
|
|
|
// technology flags
|
|
|
|
F_TECHLEVEL, // v0 is a PR_xxx enum for tech usage skill
|
|
|
|
// what can you do with this object?
|
2011-03-16 15:45:46 +11:00
|
|
|
F_TAINTED, // will give food poisoning if you eat/drink it
|
|
|
|
F_EDIBLE, // you can eat this. val1 = nutrition. 100 = a meal
|
|
|
|
// -1 means "nutrition is weight x abs(val1)"
|
|
|
|
F_DRINKABLE, // you can drink this. val1 = nutrition. 100 = a meal
|
2011-02-01 06:16:13 +11:00
|
|
|
// -1 means "nutrition is weight x abs(val1)"
|
|
|
|
F_OPERABLE, // can operate?
|
|
|
|
F_POURABLE, // can pour?
|
|
|
|
F_PUSHABLE, // can push this object
|
|
|
|
F_PICKLOCKS, // can pick locks? val0=% change,
|
|
|
|
// val1=b_false, f_dieonfail, f_bluntonfail
|
|
|
|
F_LOCKABLE,// this object can be locked
|
|
|
|
// doors
|
|
|
|
F_DOOR, // this object is a door - ie. can open it
|
|
|
|
F_OPEN, // is this door open?
|
|
|
|
F_LOCKED,// door is locked
|
2011-02-16 05:21:33 +11:00
|
|
|
F_JAMMED, // is this door jammed?
|
2011-02-01 06:16:13 +11:00
|
|
|
// stairs / teleporters / portals
|
|
|
|
F_CLIMBABLE, // this is a stiarcase
|
|
|
|
F_STAIRDIR, // val0 = direcion
|
|
|
|
F_OPPOSITESTAIRS, // val0 = opposite kind of stairs
|
2011-02-16 05:21:33 +11:00
|
|
|
F_MAPLINK, // val0 = map to link to. optional v1/v2 = x/y
|
2011-03-04 12:22:36 +11:00
|
|
|
|
|
|
|
// ob interaction flags
|
2011-03-16 15:45:46 +11:00
|
|
|
F_HARD, // object is hard (ie. punching it will hurt!)
|
2011-03-04 12:22:36 +11:00
|
|
|
F_SHARP, // does damage when you step on it. v0/1 are min/max dam
|
|
|
|
F_SLIPPERY, // you might slip when stepping on it. v0 is amt
|
|
|
|
F_SLIPMOVE, // if someone slips on this, it will move to an adj cell
|
2011-03-11 12:25:38 +11:00
|
|
|
F_FLAMMABLE, // object will catch alight if burnt (ie fire damage)
|
2011-02-01 06:16:13 +11:00
|
|
|
// object mods/effects
|
|
|
|
F_ONFIRE, // burning, also deals extra fire damage
|
2011-03-04 12:22:36 +11:00
|
|
|
F_HEADLESS, // for corpses. can go on LFs too.
|
2011-03-10 16:47:18 +11:00
|
|
|
F_MASTERWORK, // weps do higher damager, armour protects better
|
|
|
|
F_SHODDY, // weps do less damage, armour protects less.
|
2011-02-01 06:16:13 +11:00
|
|
|
// weapon flags
|
2011-02-16 05:21:33 +11:00
|
|
|
F_OBATTACKDELAY, // how long weapon takes to attack
|
2011-03-18 12:25:18 +11:00
|
|
|
F_USESSKILL, // weapon needs skill sk_v0
|
2010-12-07 18:34:26 +11:00
|
|
|
F_DAMTYPE, // val0 = damage type
|
|
|
|
F_DAM, // val0 = ndice, val1 = nsidesondie, val2 = mod
|
2011-03-04 12:22:36 +11:00
|
|
|
F_MISSILEDAM, // val0 = dam if it hits (without speed multiplier)
|
2010-12-07 18:34:26 +11:00
|
|
|
F_ACCURACY, // 100 - val0 = penalty to tohit% (ie. higher is better)
|
2011-03-04 12:22:36 +11:00
|
|
|
F_ARMOURPIERCE, // goes through armour
|
2010-12-07 18:34:26 +11:00
|
|
|
F_TWOHANDED, // weapon uses two hands to weild
|
2011-02-01 06:16:13 +11:00
|
|
|
F_FIREARM, // this weapon is equipped in bp_secweapon, not _weapon.
|
|
|
|
F_FIRESPEED, // how fast this weapon shoots projectimes
|
|
|
|
F_AMMOOB, // what object this weapon fires
|
|
|
|
F_RANGE, // range of projectile firing weapon
|
|
|
|
F_FLAMESTRIKE, // causes fires where you hit
|
2011-02-16 05:21:33 +11:00
|
|
|
F_BALANCE, // heals target if their maxhp < your maxhp
|
2011-03-04 12:22:36 +11:00
|
|
|
F_REVENGE, // causes damage based on your hp
|
2011-02-01 06:16:13 +11:00
|
|
|
// tech flags
|
|
|
|
F_RNDCHARGES, // ob starts with between val0 and val1 charges
|
|
|
|
// this will cause F_CHARGES to be filled in
|
|
|
|
F_CHARGES, // generally the number of uses left,v0=min, v1=max
|
|
|
|
F_DONTSHOWCHARGES, // don't show 'xx charges left' when id'd
|
|
|
|
F_RECHARGEWHENOFF, // get power back when you turn it off
|
|
|
|
F_REFILLWITH, // pour obj id val0 onto this to refill its charges
|
2011-03-11 12:25:38 +11:00
|
|
|
//
|
|
|
|
F_POWDER, // this item is a powder
|
2011-02-01 06:16:13 +11:00
|
|
|
// ob appearance flags
|
|
|
|
F_SHINY,
|
2010-12-07 18:34:26 +11:00
|
|
|
// armour flags
|
|
|
|
F_ARMOURRATING, // val0 * 2 = pct of damage reduced
|
2011-02-01 06:16:13 +11:00
|
|
|
F_SHIELD, // this is a shield - use special bodyhitchance code
|
|
|
|
F_OBHP, // val0 = object health, val1 = object maxhealth
|
|
|
|
F_OBHPDRAIN, // val0 = amt hp to lose each second. val1 = NA or damtype
|
|
|
|
// if no damtype specified, it will be DT_DIRECT
|
|
|
|
F_NOOBDAMTEXT, // don't anounce damage to this object
|
|
|
|
F_NOOBDIETEXT, // don't anounce destruction of this object
|
2011-02-16 05:21:33 +11:00
|
|
|
F_NODIECONVERTTEXT, // don't anounce when this object changes
|
2010-12-07 18:34:26 +11:00
|
|
|
// scroll flags
|
|
|
|
F_LINKSPELL, // val0 = spell this scroll will cast when read
|
2011-03-16 15:45:46 +11:00
|
|
|
// v1 = spell power
|
2011-03-18 12:25:18 +11:00
|
|
|
// book flags
|
|
|
|
F_MANUALOF, // val0 = spellschool this book trains
|
2010-12-07 18:34:26 +11:00
|
|
|
// ob identification flags
|
|
|
|
F_HASHIDDENNAME, // whether this object class has a hidden name
|
|
|
|
F_IDENTIFIED, // whether this object is fully identified
|
2011-02-01 06:16:13 +11:00
|
|
|
// bad flags
|
|
|
|
F_WALKDAM, // val0 = dam per sec, val1 = damtype
|
|
|
|
// magic
|
|
|
|
F_SPELLSCHOOL, // val0 = SPELLSCHOOL enum
|
|
|
|
F_SPELLLEVEL, // val0 = difficulty level of spell
|
2011-03-16 15:45:46 +11:00
|
|
|
F_MAXPOWER, // val0 = max power of this spell (1-10)
|
2011-02-01 06:16:13 +11:00
|
|
|
F_MPCOST, // v0=mp cost of spell. if missing, mpcost if splev^2
|
|
|
|
//F_SPELLLETTER, // text[0] = letter to cast this spell
|
2011-03-18 12:25:18 +11:00
|
|
|
F_AICASTTOFLEE, // AI can cast this spell to help flee
|
|
|
|
// v0 is who to target
|
|
|
|
F_AICASTTOATTACK, // AI can cast this spell to help flee
|
|
|
|
// v0 is who to target
|
2011-03-16 15:45:46 +11:00
|
|
|
F_AIBOOSTITEM, // ai will use this item to boost/buff itself.
|
|
|
|
// if using this on wands, update aiobok() !
|
2011-03-04 12:22:36 +11:00
|
|
|
F_AIHEALITEM, // ai will use this item when low on hp
|
|
|
|
F_AIFLEEITEM, // ai will use this item when fleeing
|
2011-03-16 15:45:46 +11:00
|
|
|
// if using this on wands, update aiobok() !
|
2011-03-11 12:25:38 +11:00
|
|
|
// object _AND_ lifeform flags
|
|
|
|
F_NOSTRDAMMOD, // this object/lf does not have attacks modified
|
|
|
|
// using their strength
|
2011-03-18 12:25:18 +11:00
|
|
|
// player only flags
|
|
|
|
F_DONEDARKMSG, // tells the game not to say 'it is very dark here'
|
2010-12-02 12:17:54 +11:00
|
|
|
// lifeform flags
|
2011-02-16 05:21:33 +11:00
|
|
|
F_DEBUG, // debugging enabled
|
2011-02-01 06:16:13 +11:00
|
|
|
F_ATTRMOD, // modify attribute val0 by val1. ie. 0=A_STR,1=-3
|
2011-02-16 05:21:33 +11:00
|
|
|
F_ATTRSET, // forces attribute val0 to be val1. ie. 0=A_STR,1=18
|
2011-02-01 06:16:13 +11:00
|
|
|
F_SIZE, // val0 = lf size (enum LFSIZE)
|
|
|
|
F_RESTCOUNT, // val0 = how long you've been resting for
|
|
|
|
F_RESTHEALTIME, // val0 = how long to rest before healing hp
|
|
|
|
F_RESTHEALAMT, // val0 = how many hp to gain after resting x turns
|
2011-02-16 05:21:33 +11:00
|
|
|
F_RESTHEALMPAMT, // val0 = how many MP to gain after resting x turns
|
2011-02-01 06:16:13 +11:00
|
|
|
F_AUTOCMD, // val0 = how many times to repeat this
|
|
|
|
F_LASTCMD, // text[0] = last command performed, v0/1 = x/y of cell, v2=various
|
2010-12-07 18:34:26 +11:00
|
|
|
F_STARTOB, // val0 = %chance of starting with it, text = ob name
|
2011-02-01 06:16:13 +11:00
|
|
|
// val1,2 = min/max amounts. if NA, min=max=1.
|
2011-03-10 16:47:18 +11:00
|
|
|
F_STARTSKILL, // val0 = skill id
|
2010-12-07 18:34:26 +11:00
|
|
|
F_STARTOBDT, // val0 = %chance of starting with damtype val1
|
2011-02-01 06:16:13 +11:00
|
|
|
F_STARTOBCLASS, // val0 = %chance of starting with obclass val1
|
2011-02-16 05:21:33 +11:00
|
|
|
F_STARTJOB, // val0 = %chance of starting with it, v1 = jobid
|
2011-03-10 16:47:18 +11:00
|
|
|
F_STARTATT, // val0 = A_xxx, val0 = start bracket (ie. IQ_GENIUS)
|
2010-12-02 12:17:54 +11:00
|
|
|
F_CORPSETYPE, // text field specifies what corpse obtype to leave
|
2011-02-01 06:16:13 +11:00
|
|
|
F_NOCORPSE, // monster's body crumbles to dust after death
|
2011-03-04 12:22:36 +11:00
|
|
|
F_LFSUFFIX, // text = suffix. eg. "skeleton"
|
2011-02-01 06:16:13 +11:00
|
|
|
F_VISRANGE, // how far you can see (in the light)
|
|
|
|
F_VISRANGEMOD, // modifications to visrange
|
|
|
|
F_GUNTARGET, // current projectile weapon target
|
2011-02-16 05:21:33 +11:00
|
|
|
F_CASTINGSPELL, // set while the player is casting a spell
|
|
|
|
// v0 is spell id
|
2011-03-10 16:47:18 +11:00
|
|
|
// ABILITY FLAGS
|
|
|
|
F_FAILEDINSPECT, // lf has failed an inspect check for item id v0
|
2011-02-01 06:16:13 +11:00
|
|
|
// MONSTER AI FLAGS
|
2011-03-18 12:25:18 +11:00
|
|
|
F_XPVAL, // force xp val for killing this lf to v0
|
2011-02-01 06:16:13 +11:00
|
|
|
F_HOSTILE, // lf will attack the player if in sight
|
|
|
|
F_FRIENDLY, // lf will attack all non-players if in sight
|
|
|
|
F_WANTS, // lf will try to pick up object type val0. if
|
|
|
|
// val1 = B_COVETS, will even abandon attacks
|
|
|
|
// for it!
|
|
|
|
F_WANTSOBFLAG, // lf will look for obs with this flag. val1=covets
|
|
|
|
F_WANTSBETTERWEP, // lf will look for better weapons, val1=covets
|
|
|
|
F_WANTSBETTERARM, // lf will look for better armour, val1=covets
|
|
|
|
F_FLEEONDAM, // lf will run away instead of counterattacking
|
2011-03-04 12:22:36 +11:00
|
|
|
F_FLEEONHPPCT, // lf will run away if its hp drop to v0% or lower
|
|
|
|
F_NOFLEE, // lf will not run away
|
2011-02-01 06:16:13 +11:00
|
|
|
F_TARGET, // lf will attack lfid v0. lastknown x/y is v1/v2
|
|
|
|
F_TARGETCELL, // lf will go towards this place. val0=x,val1=y
|
|
|
|
F_FLEEFROM, // lf will run away from this lf id
|
|
|
|
|
|
|
|
// TEMP FLAGS
|
|
|
|
F_KILLEDBYPLAYER, // did the player kill this lf?
|
|
|
|
// monster noise flags
|
|
|
|
F_NOISETEXT, // val0 is a enum NOISETYPE
|
|
|
|
// text is "verb^noun"
|
|
|
|
// eg. "shouts^a shout"
|
|
|
|
F_SPELLCASTTEXT, // text is announcement for spellcast
|
2010-12-02 12:17:54 +11:00
|
|
|
F_NODEATHANNOUNCE, // don't say 'the xx dies' if this lf dies
|
2011-02-16 05:21:33 +11:00
|
|
|
F_BEHEADED, // use special corpse drop code
|
2010-12-02 12:17:54 +11:00
|
|
|
F_MOVESPEED, // override default move speed
|
2011-02-16 05:21:33 +11:00
|
|
|
F_ACTIONSPEED, // override default action speed
|
2011-02-01 06:16:13 +11:00
|
|
|
F_SPELLSPEED, // override default spellcast speed (ie. movespeed)
|
2010-12-02 12:17:54 +11:00
|
|
|
F_RARITY, // val[0] = habitat, val[1] = rarity
|
|
|
|
F_NUMAPPEAR, // when randomly appearing, can have > 1. val[0] = min, val[1] = max
|
2011-02-01 06:16:13 +11:00
|
|
|
F_HITDICE, // val0: # d4 to roll for maxhp per level. val1: +xx
|
|
|
|
F_MPDICE, // val0: # d4 to roll for maxmp per level. val1: +xx
|
|
|
|
F_JOB, // val0 = player's class/job
|
|
|
|
F_NAME, // text = player's name
|
2011-02-16 05:21:33 +11:00
|
|
|
F_XPMOD, // add/subtract this much from calculated xpval
|
2011-02-01 06:16:13 +11:00
|
|
|
F_BLOODOB, // text = type of object to drop for blood
|
|
|
|
F_OBESE, // double base weight for race!
|
|
|
|
F_ORIGRACE, // original player race (if you polymorphed)
|
|
|
|
F_ORIGJOB, // original player job (if you polymorphed)
|
|
|
|
F_POLYMORPHED, // lf has been polymorphed
|
2011-03-16 15:45:46 +11:00
|
|
|
F_SHORTCUT, // spell keyboard shortcut.
|
|
|
|
// v0=slot (0-9)
|
|
|
|
// text=spell text
|
2011-02-01 06:16:13 +11:00
|
|
|
// for monsters
|
|
|
|
F_INSECT, // this race is classed as an insect
|
|
|
|
F_ANIMAL, // this race is classed as an animal
|
|
|
|
F_UNDEAD, // this race is classed as undead
|
|
|
|
F_COLDBLOOD, // this race is coldblooded
|
|
|
|
F_NOBODYPART, // this race doesn't have bodypart val0
|
|
|
|
F_NOPACK, // this race cannot hold objects
|
|
|
|
F_NOSPELLS, // this race cannot cast spells
|
|
|
|
F_INDUCEFEAR, // causes fear when you attack it
|
2011-02-16 05:21:33 +11:00
|
|
|
F_AUTOCREATEOB, // produces obtype 'text' wherever it walks, v0=radius
|
|
|
|
// (only if ob of that type not already there)
|
2011-03-04 12:22:36 +11:00
|
|
|
F_PACKATTACK, // deal v0 extra damage of type v1 if there are
|
|
|
|
// v2 or more monsters matching f->text next
|
|
|
|
// to the victim
|
|
|
|
F_PHALANX, // gain v0 AR if v2 or more adj monsters matching f->text
|
2011-02-01 06:16:13 +11:00
|
|
|
// INTRINSICS
|
2011-03-04 12:22:36 +11:00
|
|
|
F_ASLEEP, // is asleep
|
2011-02-01 06:16:13 +11:00
|
|
|
F_BLIND, // cannot see anything
|
|
|
|
F_CANCAST, // can cast the spell val0 (need MP)
|
|
|
|
F_CANWILL, // can cast the spell val0 without using MP
|
2011-03-04 12:22:36 +11:00
|
|
|
// v1 is counter untiluse
|
|
|
|
// v2 is what you need to use it
|
|
|
|
// ie. when v1 == v2, ability is ready.
|
2011-02-01 06:16:13 +11:00
|
|
|
F_DETECTAURAS, // autodetect bless/curse
|
2011-02-16 05:21:33 +11:00
|
|
|
F_DETECTLIFE, // autodetect nearby lifeforms in orthogonal dist v0
|
|
|
|
F_DETECTMAGIC, // autodetect magic/special objects
|
2011-02-01 06:16:13 +11:00
|
|
|
F_DETECTMETAL, // autodetect nearby metal
|
|
|
|
F_EXTRAINFO, // knows extra info
|
|
|
|
F_FLYING, // lf is flying
|
2011-02-16 05:21:33 +11:00
|
|
|
F_FASTACT, // modifier for action speed
|
2011-02-01 06:16:13 +11:00
|
|
|
F_FASTMOVE, // modifier for move speed
|
|
|
|
F_FOODPOISONED, // has food poisoning
|
|
|
|
F_FREEZINGTOUCH,// next thing touched turns to ice!
|
2011-03-04 12:22:36 +11:00
|
|
|
F_GRABBEDBY,// you've been grabbed by lf id v0
|
|
|
|
F_GRABBING, // you are grabbing lf id v0
|
|
|
|
F_HEAVYBLOW, // next attack is a heavy blow
|
2011-03-16 15:45:46 +11:00
|
|
|
F_INVISIBLE, // lifeform is invisible
|
|
|
|
F_INVULNERABLE,// immune to most damage
|
2011-03-04 12:22:36 +11:00
|
|
|
F_QUICKBITE, // deals v0 d d1 + d2 damage when you hit a bleeding victim
|
|
|
|
// (bypasses armour)
|
2011-02-01 06:16:13 +11:00
|
|
|
F_GRAVBOOSTED,// cannot walk or throw stuff
|
2011-03-04 12:22:36 +11:00
|
|
|
F_PAIN, // take damage if you walk
|
2011-02-01 06:16:13 +11:00
|
|
|
F_PARALYZED,// cannot do anything
|
2011-02-16 05:21:33 +11:00
|
|
|
F_FROZEN, // made of ice
|
|
|
|
F_LEVITATING, // like flying but uncontrolled
|
2011-02-01 06:16:13 +11:00
|
|
|
F_MAGSHIELD,// magnetic shield
|
2011-03-04 12:22:36 +11:00
|
|
|
F_NAUSEATED, // lf has a stench penalty of v0 (-v0*10 to hit).
|
2011-02-16 05:21:33 +11:00
|
|
|
F_NONCORPOREAL,// can walk through walls
|
2011-02-01 06:16:13 +11:00
|
|
|
F_OMNIPOTENT, // knows extra info
|
|
|
|
F_PHOTOMEM, // you don't forget your surroundings
|
|
|
|
F_REGENERATES, // regenerate HP at val0 per turn
|
|
|
|
F_RESISTMAG, // immune to most magic effects
|
|
|
|
F_MPREGEN, // regenerate MP at val0 per turn
|
|
|
|
F_SEEINDARK, // nightvis range is val0
|
2011-03-16 15:45:46 +11:00
|
|
|
F_SEEINVIS, // can see invisible things
|
2011-03-04 12:22:36 +11:00
|
|
|
F_SEEWITHOUTEYES, // doesn't need eyes to see
|
|
|
|
F_STABILITY, // doesn't slip over
|
|
|
|
F_STENCH, // creatures within v0 gain f_nauseated = v1
|
2011-02-01 06:16:13 +11:00
|
|
|
F_PRODUCESLIGHT, // produces light of val0 radius.
|
|
|
|
// (but not for obs in pack)
|
|
|
|
// if val2 is true, will only make light if ob
|
|
|
|
// is activated!
|
2011-02-16 05:21:33 +11:00
|
|
|
F_SLOWACT, // modifier for action speed
|
2011-02-01 06:16:13 +11:00
|
|
|
F_SLOWMOVE, // modifier for move speed
|
|
|
|
F_XRAYVIS, //val0=num of walls we can see through
|
2011-02-16 05:21:33 +11:00
|
|
|
F_CANSEETHROUGHMAT, //val0=kind of material you can see through
|
|
|
|
F_SPRINTING, // you are sprinting
|
|
|
|
F_TIRED, // you are too tired to sprint
|
2011-03-04 12:22:36 +11:00
|
|
|
F_DODGES, // you dodge missed attacks
|
|
|
|
F_NOTIME, // this lf's actions don't take time
|
2011-03-10 16:47:18 +11:00
|
|
|
// skills
|
|
|
|
F_HASSKILL, // lf has skill v0 at level v1
|
2010-12-07 18:34:26 +11:00
|
|
|
// COMBAT
|
2011-02-01 06:16:13 +11:00
|
|
|
F_HASATTACK, // objecttype id to use when attacking unarmed
|
|
|
|
// if val0-3 are filled in, they override the object's
|
|
|
|
// damage (x y-sided dice + z)
|
2010-12-07 18:34:26 +11:00
|
|
|
F_EVASION, // % chance of evading an attack
|
2011-02-01 06:16:13 +11:00
|
|
|
|
|
|
|
// healing
|
2011-03-16 15:45:46 +11:00
|
|
|
F_STATGAINREADY, // ready to increase str/int etc. v2 is how many times
|
|
|
|
// we can do it.
|
2011-02-01 06:16:13 +11:00
|
|
|
F_RESTING, // are we resting? cleared on any action other than rest.
|
2011-03-16 15:45:46 +11:00
|
|
|
// v2 = if not, NA it is the training counter.
|
|
|
|
// when it hits 0, you finish trainign.
|
2011-02-01 06:16:13 +11:00
|
|
|
//
|
|
|
|
F_RUNNING, // are we running?
|
|
|
|
// nutrition
|
|
|
|
F_HUNGER, // val0 = hunger, higher = hungrier
|
|
|
|
|
2011-02-16 05:21:33 +11:00
|
|
|
// for jobs
|
|
|
|
F_IFPCT, // only add the NEXT job flag if rnd(1,100) <= v0.
|
2011-03-04 12:22:36 +11:00
|
|
|
F_ELSE,
|
|
|
|
F_IFPLAYER,
|
|
|
|
F_IFMONSTER,
|
|
|
|
F_ENDIFPLAYER,
|
|
|
|
F_ENDIFMONSTER,
|
2011-02-16 05:21:33 +11:00
|
|
|
|
2010-12-02 12:17:54 +11:00
|
|
|
//
|
|
|
|
F_NULL = -1
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2011-02-01 06:16:13 +11:00
|
|
|
// hunger levels
|
|
|
|
enum HUNGER {
|
|
|
|
H_STUFFED = -2,
|
|
|
|
H_FULL = -1,
|
|
|
|
H_NONE = 0,
|
|
|
|
H_PECKISH = 1,
|
|
|
|
H_HUNGRY = 2,
|
|
|
|
H_VHUNGRY = 3,
|
|
|
|
H_STARVING = 4,
|
|
|
|
H_STARVED = 5
|
|
|
|
};
|
|
|
|
|
2010-12-02 12:17:54 +11:00
|
|
|
// probabilities
|
|
|
|
//#define CH_DEADENDOB 35
|
|
|
|
//#define CH_EMPTYCELLOB 3
|
|
|
|
#define CH_PILLAR 5
|
|
|
|
|
2011-02-01 06:16:13 +11:00
|
|
|
|
2010-12-02 12:17:54 +11:00
|
|
|
// Booleans
|
|
|
|
#define B_FALSE (0)
|
|
|
|
#define B_TRUE (-1)
|
|
|
|
|
2011-03-04 12:22:36 +11:00
|
|
|
//#define B_TEMP (-1)
|
|
|
|
//#define B_PERM (-2)
|
|
|
|
//#define B_NOT (-3)
|
|
|
|
|
|
|
|
enum LIGHTLEV {
|
2011-03-10 16:47:18 +11:00
|
|
|
L_PERMDARK = -1,
|
2011-03-04 12:22:36 +11:00
|
|
|
L_NOTLIT = 0,
|
|
|
|
L_TEMP = 1,
|
2011-03-10 16:47:18 +11:00
|
|
|
L_PERMLIGHT = 2,
|
2011-03-04 12:22:36 +11:00
|
|
|
};
|
2011-02-01 06:16:13 +11:00
|
|
|
|
2011-03-10 16:47:18 +11:00
|
|
|
|
2011-03-18 12:25:18 +11:00
|
|
|
// spell targets
|
|
|
|
enum SPELLTARGET {
|
|
|
|
ST_VICTIM, // cast at victim
|
|
|
|
ST_ADJVICTIM, // cast at victim who is next to us
|
|
|
|
ST_SELF, // cast at myself
|
|
|
|
ST_ADJSELF, // cast at self, while next to victim
|
|
|
|
ST_ANYWHERE, // cast anywere
|
|
|
|
ST_SPECIAL, // spell targetting will be hardcoded
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2011-02-01 06:16:13 +11:00
|
|
|
#define B_DIEONFAIL (-1)
|
|
|
|
#define B_BLUNTONFAIL (-2)
|
|
|
|
|
|
|
|
#define B_COVETS (-1)
|
|
|
|
#define B_ANY (0)
|
|
|
|
|
|
|
|
#define B_SINGLE (0)
|
|
|
|
#define B_MULTI (-1)
|
|
|
|
#define B_MULTIPLE (-1)
|
|
|
|
|
|
|
|
#define B_NOOBS (0)
|
|
|
|
#define B_WITHOBS (-1)
|
|
|
|
|
2010-12-07 18:34:26 +11:00
|
|
|
#define B_UNKNOWN (0)
|
|
|
|
#define B_KNOWN (-1)
|
|
|
|
|
|
|
|
#define B_NOBADMOVES (0)
|
|
|
|
#define B_BADMOVESOK (1)
|
|
|
|
|
2010-12-02 12:17:54 +11:00
|
|
|
#define B_NOSTACK (0)
|
|
|
|
#define B_STACK (-1)
|
|
|
|
#define B_STACKOK (-1)
|
|
|
|
|
|
|
|
#define NOOWNER (NULL)
|
|
|
|
#define NOLOC (NULL)
|
|
|
|
|
|
|
|
#define B_NOTSOLID (0)
|
|
|
|
#define B_EMPTY (0)
|
|
|
|
#define B_SOLID (-1)
|
|
|
|
|
|
|
|
#define B_OPAQUE (0)
|
|
|
|
#define B_TRANSPARENT (-1)
|
|
|
|
#define B_TRANS (-1)
|
|
|
|
|
|
|
|
|
2011-02-01 06:16:13 +11:00
|
|
|
#define B_IFACTIVATED (-1)
|
|
|
|
|
|
|
|
#define B_BIG (-1)
|
|
|
|
|
2010-12-02 12:17:54 +11:00
|
|
|
// errors
|
|
|
|
enum ERROR {
|
|
|
|
E_OK = 0,
|
|
|
|
E_WALLINWAY = 1,
|
|
|
|
E_LFINWAY = 2,
|
2010-12-07 18:34:26 +11:00
|
|
|
E_NOSPACE = 3,
|
|
|
|
E_SELNOTHING = 4,
|
|
|
|
E_ALREADYUSING = 5,
|
|
|
|
E_WEARINGSOMETHINGELSE = 6,
|
|
|
|
E_NOUNARMEDATTACK = 7,
|
|
|
|
E_NOTEQUIPPED = 8,
|
2011-02-01 06:16:13 +11:00
|
|
|
E_NOPICKUP = 9,
|
|
|
|
E_MONSTERNEARBY = 10,
|
|
|
|
E_NOEFFECT = 11,
|
|
|
|
E_FAILED = 12,
|
|
|
|
E_WRONGCELLTYPE = 13,
|
|
|
|
E_OBINWAY = 14,
|
|
|
|
E_TOOHEAVY = 15,
|
|
|
|
E_NOHANDS = 16,
|
|
|
|
E_NOPACK = 17,
|
|
|
|
E_INSUBSTANTIAL = 18,
|
|
|
|
E_WRONGOBTYPE = 19,
|
|
|
|
E_CURSED = 20,
|
|
|
|
E_NOLOS = 21,
|
|
|
|
E_NOLOF = 22,
|
|
|
|
E_IMPOSSIBLE = 23,
|
|
|
|
E_NOTARGET = 24,
|
|
|
|
E_NOAMMO = 25,
|
|
|
|
E_GRAVBOOSTED = 26,
|
|
|
|
E_NOMP = 27,
|
2011-02-16 05:21:33 +11:00
|
|
|
E_AVOIDOB = 28,
|
|
|
|
E_FROZEN = 29,
|
2011-03-04 12:22:36 +11:00
|
|
|
E_TOOBIG = 30,
|
|
|
|
E_NOTREADY = 31,
|
|
|
|
E_BLIND = 32,
|
|
|
|
E_GRABBEDBY = 33,
|
|
|
|
E_CANTMOVE = 34,
|
2011-03-11 12:25:38 +11:00
|
|
|
E_NOTKNOWN = 35,
|
2011-03-16 15:45:46 +11:00
|
|
|
E_TOOPOWERFUL = 36,
|
2010-12-02 12:17:54 +11:00
|
|
|
};
|
|
|
|
|
2011-03-04 12:22:36 +11:00
|
|
|
|
|
|
|
enum COMMAND {
|
|
|
|
CMD_AIM,
|
|
|
|
CMD_CLOSE,
|
|
|
|
CMD_DOWN,
|
|
|
|
CMD_DROP,
|
|
|
|
CMD_DROPMULTI,
|
|
|
|
CMD_EAT,
|
|
|
|
CMD_FIRE,
|
|
|
|
CMD_FIRENEW,
|
|
|
|
CMD_FORCEATTACK,
|
|
|
|
CMD_HELP,
|
|
|
|
CMD_INFOARMOUR,
|
|
|
|
CMD_INFOKNOWLEDGE,
|
|
|
|
CMD_INFOPLAYER,
|
|
|
|
CMD_INV,
|
|
|
|
CMD_LOOKAROUND,
|
|
|
|
CMD_LOOKHERE,
|
|
|
|
CMD_MAGIC,
|
2011-03-16 15:45:46 +11:00
|
|
|
CMD_MEMMAGIC,
|
2011-03-04 12:22:36 +11:00
|
|
|
CMD_MSGHIST,
|
|
|
|
CMD_OPERATE,
|
|
|
|
CMD_PICKLOCK,
|
|
|
|
CMD_PICKUP,
|
|
|
|
CMD_POUR,
|
|
|
|
CMD_QUAFF,
|
|
|
|
CMD_QUIT,
|
|
|
|
CMD_READ,
|
|
|
|
CMD_REST,
|
|
|
|
CMD_RESTFULL,
|
|
|
|
CMD_SAVEQUIT,
|
|
|
|
CMD_TAKEOFF,
|
|
|
|
CMD_UP,
|
|
|
|
CMD_WEAR,
|
|
|
|
CMD_WEILD,
|
|
|
|
};
|
|
|
|
|
|
|
|
// command types
|
|
|
|
typedef struct command_s {
|
|
|
|
enum COMMAND id;
|
|
|
|
char ch;
|
|
|
|
char *desc;
|
|
|
|
struct command_s *next, *prev;
|
|
|
|
} command_t;
|
|
|
|
|
|
|
|
|
2010-12-02 12:17:54 +11:00
|
|
|
typedef struct map_s {
|
|
|
|
int id;
|
2011-02-01 06:16:13 +11:00
|
|
|
int depth;
|
2010-12-02 12:17:54 +11:00
|
|
|
char *name; // name of this map
|
|
|
|
enum HABITAT habitat; // eg. dungeon, forest, etc
|
|
|
|
unsigned int seed;
|
|
|
|
int w,h; // width/height of this map
|
|
|
|
struct cell_s *cell[MAX_MAPW*MAX_MAPH]; // list of cells in this map
|
|
|
|
int nextmap[MAXDIR_ORTH]; // which map is in each direction
|
|
|
|
|
|
|
|
struct lifeform_s *lf,*lastlf;
|
|
|
|
|
|
|
|
struct map_s *next, *prev;
|
|
|
|
} map_t; //////////////// remember to modify save/load for new props!!
|
|
|
|
|
|
|
|
typedef struct cell_s {
|
|
|
|
map_t *map; // pointer back to map
|
|
|
|
int x,y; // map coords
|
|
|
|
int roomid;
|
|
|
|
struct celltype_s *type;
|
|
|
|
struct obpile_s *obpile;
|
2011-03-04 12:22:36 +11:00
|
|
|
enum LIGHTLEV lit;
|
2011-03-10 16:47:18 +11:00
|
|
|
enum LIGHTLEV origlit;
|
|
|
|
int littimer;
|
2011-02-01 06:16:13 +11:00
|
|
|
|
|
|
|
char *writing;
|
2010-12-02 12:17:54 +11:00
|
|
|
|
|
|
|
// lifeform pile
|
|
|
|
struct lifeform_s *lf;
|
|
|
|
// known to player?
|
|
|
|
int known;
|
|
|
|
|
|
|
|
// FOR CONSTRUCTION
|
|
|
|
int visited;
|
|
|
|
} cell_t;
|
|
|
|
|
|
|
|
typedef struct celltype_s {
|
|
|
|
int id; // eg. dungeonfloor, wall, door
|
|
|
|
char glyph; // how to display it
|
2011-02-01 06:16:13 +11:00
|
|
|
char *name; // name of cell type
|
2010-12-02 12:17:54 +11:00
|
|
|
int solid; // can you walk through it?
|
|
|
|
int transparent; // can you see through it?
|
2011-02-01 06:16:13 +11:00
|
|
|
struct material_s *material;
|
|
|
|
|
|
|
|
struct flagpile_s *flags;
|
|
|
|
|
2010-12-02 12:17:54 +11:00
|
|
|
struct celltype_s *next, *prev;
|
2011-02-01 06:16:13 +11:00
|
|
|
|
2010-12-02 12:17:54 +11:00
|
|
|
} celltype_t;
|
|
|
|
|
|
|
|
typedef struct race_s {
|
|
|
|
enum RACE id;
|
2011-03-04 12:22:36 +11:00
|
|
|
enum RACE baseid;
|
2011-02-01 06:16:13 +11:00
|
|
|
struct material_s *material;
|
2010-12-02 12:17:54 +11:00
|
|
|
char *name;
|
|
|
|
char glyph;
|
2011-02-01 06:16:13 +11:00
|
|
|
float weight;
|
2010-12-02 12:17:54 +11:00
|
|
|
struct flagpile_s *flags;
|
|
|
|
// speed modifiers
|
|
|
|
// hit dice
|
|
|
|
struct race_s *next, *prev;
|
|
|
|
} race_t;
|
|
|
|
|
|
|
|
typedef struct lifeform_s {
|
|
|
|
int id;
|
|
|
|
int controller;
|
|
|
|
struct race_s *race;
|
2010-12-07 18:34:26 +11:00
|
|
|
int level;
|
2011-02-01 06:16:13 +11:00
|
|
|
long xp;
|
2011-03-16 15:45:46 +11:00
|
|
|
int skillpoints;
|
2010-12-02 12:17:54 +11:00
|
|
|
int hp,maxhp;
|
2011-02-01 06:16:13 +11:00
|
|
|
int mp,maxmp;
|
2010-12-02 12:17:54 +11:00
|
|
|
int alive;
|
|
|
|
char *lastdam;
|
2011-02-01 06:16:13 +11:00
|
|
|
enum DAMTYPE lastdamtype;
|
2010-12-02 12:17:54 +11:00
|
|
|
|
|
|
|
int timespent;
|
|
|
|
int sorted;
|
|
|
|
|
2011-02-01 06:16:13 +11:00
|
|
|
int att[MAXATTS];
|
|
|
|
int baseatt[MAXATTS];
|
|
|
|
|
2010-12-07 18:34:26 +11:00
|
|
|
float forgettimer;
|
|
|
|
|
2010-12-02 12:17:54 +11:00
|
|
|
struct obpile_s *pack;
|
|
|
|
|
|
|
|
struct flagpile_s *flags;
|
|
|
|
|
2011-02-01 06:16:13 +11:00
|
|
|
int created; // set to TRUE once lf creation is done.
|
|
|
|
|
|
|
|
int polyrevert; // about to revert form a polymorph?
|
|
|
|
|
2010-12-02 12:17:54 +11:00
|
|
|
// for loading
|
|
|
|
long oblist[MAXPILEOBS];
|
|
|
|
int x,y;
|
|
|
|
|
2011-02-01 06:16:13 +11:00
|
|
|
int nlos;
|
|
|
|
cell_t **los;
|
|
|
|
|
2011-02-16 05:21:33 +11:00
|
|
|
// set to TRUE after lf has being created
|
|
|
|
int born;
|
|
|
|
|
2011-02-01 06:16:13 +11:00
|
|
|
// for ai movement - don't need to save.
|
|
|
|
struct cell_s *ignorecell;
|
2010-12-02 12:17:54 +11:00
|
|
|
|
|
|
|
struct cell_s *cell;
|
|
|
|
struct lifeform_s *next, *prev;
|
|
|
|
} lifeform_t;
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct obpile_s {
|
|
|
|
lifeform_t *owner;// } Only one of these
|
|
|
|
cell_t *where; // } should be filled in
|
|
|
|
struct object_s *first,*last;
|
|
|
|
|
|
|
|
// for loading
|
|
|
|
long oblist[MAXPILEOBS];
|
|
|
|
} obpile_t;
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct flagpile_s {
|
2011-02-01 06:16:13 +11:00
|
|
|
lifeform_t *owner;
|
|
|
|
struct object_s *ob;
|
2010-12-02 12:17:54 +11:00
|
|
|
struct flag_s *first,*last;
|
|
|
|
} flagpile_t;
|
|
|
|
|
|
|
|
typedef struct flag_s {
|
|
|
|
enum FLAG id;
|
|
|
|
int nvals;
|
|
|
|
int val[3];
|
|
|
|
char *text;
|
2011-02-01 06:16:13 +11:00
|
|
|
|
|
|
|
long obfrom; // for conferred flags, link to object->id. -1 if not conferred.
|
|
|
|
|
|
|
|
//
|
|
|
|
int known;
|
|
|
|
int lifetime;
|
|
|
|
|
2010-12-02 12:17:54 +11:00
|
|
|
struct flagpile_s *pile;
|
|
|
|
struct flag_s *next, *prev;
|
|
|
|
} flag_t;
|
|
|
|
|
|
|
|
typedef struct material_s {
|
2010-12-07 18:34:26 +11:00
|
|
|
enum MATERIAL id;
|
2010-12-02 12:17:54 +11:00
|
|
|
char *name;
|
2011-02-01 06:16:13 +11:00
|
|
|
float weightrating;
|
|
|
|
struct flagpile_s *flags;
|
2010-12-02 12:17:54 +11:00
|
|
|
struct material_s *next,*prev;
|
|
|
|
} material_t;
|
|
|
|
|
2011-03-10 16:47:18 +11:00
|
|
|
|
2011-03-18 12:25:18 +11:00
|
|
|
#define SK_NONE -1
|
2011-03-10 16:47:18 +11:00
|
|
|
enum SKILL {
|
2011-03-11 12:25:38 +11:00
|
|
|
SK_ATHLETICS,
|
2011-03-18 12:25:18 +11:00
|
|
|
SK_FIRSTAID,
|
2011-03-10 16:47:18 +11:00
|
|
|
SK_LOCKPICKING,
|
|
|
|
SK_RESEARCH,
|
2011-03-16 15:45:46 +11:00
|
|
|
SK_SPELLCASTING,
|
2011-03-18 12:25:18 +11:00
|
|
|
// weaponry
|
|
|
|
SK_AXES,
|
|
|
|
SK_CLUBS,
|
|
|
|
SK_LONGBLADES,
|
|
|
|
SK_POLEARMS,
|
|
|
|
SK_SHORTBLADES,
|
|
|
|
SK_STAVES,
|
|
|
|
SK_UNARMED,
|
|
|
|
// spell schools
|
|
|
|
SK_SS_ALLOMANCY,
|
|
|
|
SK_SS_AIR,
|
|
|
|
SK_SS_DEATH,
|
|
|
|
SK_SS_DIVINATION,
|
|
|
|
SK_SS_FIRE,
|
|
|
|
SK_SS_ICE,
|
|
|
|
SK_SS_GRAVITY,
|
|
|
|
SK_SS_LIFE,
|
|
|
|
SK_SS_MODIFICATION,
|
|
|
|
SK_SS_MENTAL,
|
|
|
|
SK_SS_SUMMONING,
|
|
|
|
SK_SS_TRANSLOCATION,
|
|
|
|
SK_SS_WILD,
|
2011-03-11 12:25:38 +11:00
|
|
|
SK_TECHUSAGE,
|
2011-03-10 16:47:18 +11:00
|
|
|
};
|
2011-03-18 12:25:18 +11:00
|
|
|
#define MAXSKILLS 31
|
2011-03-10 16:47:18 +11:00
|
|
|
|
|
|
|
// proficiency levels
|
|
|
|
enum SKILLLEVEL {
|
|
|
|
PR_INEPT = 0,
|
|
|
|
PR_NOVICE = 1,
|
|
|
|
PR_BEGINNER = 2,
|
|
|
|
PR_ADEPT = 3,
|
|
|
|
PR_SKILLED = 4,
|
|
|
|
PR_EXPERT = 5,
|
|
|
|
PR_MASTER = 6,
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct skill_s {
|
|
|
|
enum SKILL id;
|
|
|
|
char *name;
|
|
|
|
char *desc;
|
|
|
|
struct skill_s *next, *prev;
|
|
|
|
} skill_t;
|
|
|
|
|
|
|
|
typedef struct hiddenname_s {
|
|
|
|
enum OBCLASS obclass;
|
|
|
|
char *text;
|
|
|
|
int used;
|
|
|
|
struct hiddenname_s *next, *prev;
|
|
|
|
} hiddenname_t;
|
|
|
|
|
2010-12-07 18:34:26 +11:00
|
|
|
typedef struct knowledge_s {
|
|
|
|
enum OBTYPE id;
|
|
|
|
char *hiddenname;
|
|
|
|
int known;
|
|
|
|
struct knowledge_s *next, *prev;
|
|
|
|
} knowledge_t;
|
|
|
|
|
2011-02-01 06:16:13 +11:00
|
|
|
typedef struct job_s {
|
|
|
|
enum JOB id;
|
|
|
|
char *name;
|
|
|
|
flagpile_t *flags;
|
|
|
|
struct job_s *next, *prev;
|
|
|
|
} job_t;
|
|
|
|
|
2010-12-02 12:17:54 +11:00
|
|
|
typedef struct objectclass_s {
|
|
|
|
enum OBCLASS id;
|
|
|
|
char *name;
|
2010-12-07 18:34:26 +11:00
|
|
|
char *desc;
|
2010-12-02 12:17:54 +11:00
|
|
|
char glyph;
|
2010-12-07 18:34:26 +11:00
|
|
|
struct flagpile_s *flags;
|
2010-12-02 12:17:54 +11:00
|
|
|
struct objectclass_s *next, *prev;
|
|
|
|
} objectclass_t;
|
|
|
|
|
|
|
|
typedef struct objecttype_s {
|
|
|
|
enum OBTYPE id;
|
|
|
|
char *name;
|
|
|
|
char *desc;
|
|
|
|
struct objectclass_s *obclass;
|
|
|
|
material_t *material;
|
|
|
|
float weight; // in kilograms
|
|
|
|
struct flagpile_s *flags;
|
|
|
|
struct objecttype_s *next, *prev;
|
|
|
|
} objecttype_t;
|
|
|
|
|
|
|
|
typedef struct object_s {
|
|
|
|
long id; // unique for every ob in the game!
|
|
|
|
struct objecttype_s *type;
|
|
|
|
struct obpile_s *pile; // reverse pointer back to pile
|
|
|
|
// these variables are initially
|
|
|
|
// inherited from objecttype:
|
|
|
|
material_t *material;
|
|
|
|
float weight; // in kilograms
|
|
|
|
// flags
|
|
|
|
// these variables are NOT inherited
|
|
|
|
char *inscription;
|
|
|
|
char letter;
|
|
|
|
enum BLESSTYPE blessed;
|
|
|
|
int blessknown;
|
|
|
|
int amt; // for stackable objects
|
2011-02-01 06:16:13 +11:00
|
|
|
long birthtime;
|
2010-12-02 12:17:54 +11:00
|
|
|
flagpile_t *flags;
|
|
|
|
|
|
|
|
struct object_s *next, *prev;
|
|
|
|
} object_t;
|
|
|
|
|
2011-02-16 05:21:33 +11:00
|
|
|
enum OBMOD {
|
2011-03-10 16:47:18 +11:00
|
|
|
OM_FLAMING,
|
2011-03-16 15:45:46 +11:00
|
|
|
OM_FROZEN,
|
2011-03-10 16:47:18 +11:00
|
|
|
OM_HEADLESS,
|
|
|
|
OM_MASTERWORK,
|
|
|
|
OM_SHODDY,
|
|
|
|
};
|
|
|
|
#define MAXOBMODS 4
|
|
|
|
|
|
|
|
enum BRAND {
|
|
|
|
BR_BALANCE,
|
|
|
|
BR_DEXTERITY,
|
|
|
|
BR_FEEBLENESS,
|
|
|
|
BR_FLIGHT,
|
|
|
|
BR_GIANTSTRENGTH,
|
|
|
|
BR_IMPACT,
|
|
|
|
BR_INTELLIGENCE,
|
|
|
|
BR_KNOWLEDGE,
|
|
|
|
BR_LEVITATION,
|
2011-03-16 15:45:46 +11:00
|
|
|
BR_FEATHERFALL,
|
|
|
|
BR_ANTIMAG,
|
|
|
|
BR_CONCEALMENT,
|
2011-03-10 16:47:18 +11:00
|
|
|
BR_SHARPNESS,
|
|
|
|
BR_PYROMANIA,
|
|
|
|
BR_REVENGE,
|
|
|
|
BR_SLOTH,
|
|
|
|
BR_SPEED,
|
|
|
|
BR_STRENGTH,
|
|
|
|
BR_SWIFTNESS,
|
|
|
|
BR_TELEKINESIS,
|
|
|
|
BR_TELEPATHY,
|
|
|
|
BR_WEAKNESS,
|
2011-02-16 05:21:33 +11:00
|
|
|
};
|
|
|
|
|
2011-03-10 16:47:18 +11:00
|
|
|
typedef struct brand_s {
|
|
|
|
enum BRAND id;
|
2011-02-16 05:21:33 +11:00
|
|
|
char *description;
|
|
|
|
char *suffix;
|
|
|
|
flagpile_t *flags;
|
|
|
|
enum BODYPART bp;
|
2011-03-10 16:47:18 +11:00
|
|
|
struct brand_s *next, *prev;
|
|
|
|
} brand_t;
|
|
|
|
|
|
|
|
typedef struct obmod_s {
|
|
|
|
enum OBMOD id;
|
|
|
|
char *prefix;
|
|
|
|
flagpile_t *flags;
|
2011-02-16 05:21:33 +11:00
|
|
|
struct obmod_s *next, *prev;
|
|
|
|
} obmod_t;
|
|
|
|
|
2011-02-01 06:16:13 +11:00
|
|
|
typedef struct choice_s {
|
|
|
|
char ch;
|
|
|
|
char *text;
|
|
|
|
char *desc;
|
|
|
|
void *data;
|
|
|
|
int heading;
|
|
|
|
int valid; // used in askchoicestr
|
|
|
|
} choice_t;
|
|
|
|
|
|
|
|
|
2011-02-16 05:21:33 +11:00
|
|
|
#define MAXPROMPTQUESTIONS 5
|
2011-02-01 06:16:13 +11:00
|
|
|
typedef struct prompt_s {
|
2011-02-16 05:21:33 +11:00
|
|
|
char *q[MAXPROMPTQUESTIONS];
|
|
|
|
int nqs;
|
|
|
|
int whichq;
|
2011-02-01 06:16:13 +11:00
|
|
|
void *result;
|
|
|
|
choice_t choice[MAXCHOICES];
|
|
|
|
int selection;
|
|
|
|
int nchoices;
|
|
|
|
int maycancel;
|
|
|
|
} prompt_t;
|
|
|
|
|
2010-12-02 12:17:54 +11:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|