2655 lines
60 KiB
C
2655 lines
60 KiB
C
#ifndef __DEFS_H
|
|
#define __DEFS_H
|
|
|
|
// MACROS
|
|
#define MAXOF(a,b) (a > b ? a : b)
|
|
|
|
#define PRACTICETIME 15 // #attempts it takes to learn new weapon skill
|
|
|
|
#define WETTIME 10 // how long it takes for things to dry
|
|
#define DRUNKTIME 10 // how long it takes for alcohol to wear off
|
|
|
|
/*
|
|
#define POISONDAMCHANCE 33 // chance of vomitting when poisoned
|
|
#define POISONDAM 2 // damage taken from vomiting when poisoned
|
|
*/
|
|
|
|
// ncurses colours
|
|
enum COLOUR {
|
|
C_BLACK = 0,
|
|
C_RED = 1,
|
|
C_GREEN = 2,
|
|
C_BROWN = 3,
|
|
C_BLUE = 4,
|
|
C_MAGENTA = 5,
|
|
C_CYAN = 6,
|
|
C_GREY = 7,
|
|
// bolded colours
|
|
C_YELLOW = 8,
|
|
C_WHITE = 9,
|
|
C_BOLDCYAN = 10,
|
|
C_BOLDBLUE = 11,
|
|
C_BOLDMAGENTA = 12,
|
|
C_ORANGE = 13,
|
|
C_BOLDGREEN = 14,
|
|
};
|
|
|
|
enum SKILL {
|
|
SK_NONE = 0,
|
|
SK_ARMOUR = 1,
|
|
SK_ATHLETICS,
|
|
SK_BACKSTAB,
|
|
SK_CARTOGRAPHY,
|
|
SK_CHANNELING,
|
|
SK_COOKING,
|
|
SK_FIRSTAID,
|
|
SK_LISTEN,
|
|
SK_LOCKPICKING,
|
|
SK_RANGED,
|
|
SK_SHIELDS,
|
|
SK_SPELLCASTING,
|
|
SK_SPOTHIDDEN,
|
|
SK_STEALTH,
|
|
SK_SWIMMING,
|
|
SK_TECHUSAGE,
|
|
SK_TRACKING,
|
|
SK_TRAPS,
|
|
SK_TWOWEAPON,
|
|
// knowledge
|
|
SK_LORE_ARCANA,
|
|
SK_LORE_DEMONS,
|
|
SK_LORE_HUMANOID,
|
|
SK_LORE_NATURE,
|
|
SK_LORE_UNDEAD,
|
|
// 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_COLD,
|
|
SK_SS_GRAVITY,
|
|
SK_SS_LIFE,
|
|
SK_SS_MODIFICATION,
|
|
SK_SS_MENTAL,
|
|
SK_SS_NATURE,
|
|
SK_SS_SUMMONING,
|
|
SK_SS_TRANSLOCATION,
|
|
SK_SS_WILD,
|
|
};
|
|
#define MAXSKILLS 46
|
|
|
|
// 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,
|
|
};
|
|
|
|
|
|
// save/load
|
|
#define MAPDIR "data/maps"
|
|
#define SAVEDIR "data/save"
|
|
#define DUMMYCELLTYPE 0xabcd
|
|
|
|
// SPECIAL NUMBERS/CONSTANTS
|
|
#define UNLIMITED (-9876)
|
|
#define ALL (-9875)
|
|
#define NA (-9874)
|
|
#define NOBODY (-1)
|
|
#define ALLCONFERRED (-9873)
|
|
|
|
#define AUTO (-7654)
|
|
|
|
|
|
enum GAMEMODE {
|
|
GM_FIRST,
|
|
GM_INIT,
|
|
GM_VALIDATION,
|
|
GM_LOADING,
|
|
GM_LOADED,
|
|
GM_GAMESTARTED,
|
|
GM_GAMEOVER,
|
|
};
|
|
|
|
enum ATTRIB {
|
|
A_NONE = -1,
|
|
A_STR = 0,
|
|
A_DEX = 1,
|
|
A_IQ = 2,
|
|
A_CON = 3,
|
|
};
|
|
#define MAXATTS 4
|
|
|
|
enum CHECKTYPE {
|
|
SC_STR,
|
|
SC_DEX,
|
|
SC_IQ,
|
|
SC_CON,
|
|
//////////
|
|
SC_DISARM,
|
|
SC_DODGE,
|
|
SC_SHIELDBLOCK,
|
|
SC_FALL,
|
|
SC_SLIP,
|
|
SC_LISTEN,
|
|
SC_MORALE,
|
|
SC_OPENLOCKS,
|
|
SC_POISON,
|
|
SC_RESISTMAG,
|
|
SC_SEARCH,
|
|
SC_STEALTH,
|
|
SC_WILL,
|
|
};
|
|
|
|
enum BURDENED {
|
|
BR_NONE = 0,
|
|
BR_BURDENED = 1,
|
|
BR_STRAINED = 2,
|
|
BR_OVERLOADED = 3,
|
|
};
|
|
|
|
|
|
enum LFCONDITION {
|
|
C_DEAD = 0,
|
|
C_CRITICAL = 1,
|
|
C_SERIOUS = 2,
|
|
C_WOUNDED = 3,
|
|
C_HURT = 4,
|
|
C_HEALTHY = 5,
|
|
};
|
|
|
|
enum SENSE {
|
|
S_HEARING,
|
|
S_SIGHT,
|
|
S_SMELL,
|
|
S_TASTE,
|
|
S_TOUCH,
|
|
};
|
|
|
|
// AI defs
|
|
|
|
// if target lf is out of view for this many turns, abandon chase
|
|
#define AI_FOLLOWTIME (10)
|
|
|
|
#define DEFAULTRESTHEALTIME (3)
|
|
|
|
|
|
// 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)
|
|
#define FROMBRAND (-9865)
|
|
#define FROMOBMOD (-9864)
|
|
#define FROMSPELL (-9863)
|
|
#define FROMPOISON (-9862)
|
|
|
|
#define LEVABILITYDONE (-8000)
|
|
|
|
#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
|
|
|
|
#define NOCONDITION (0)
|
|
#define IFMONSTER (-9769) // used in v2 of f_ifpct job flags
|
|
#define IFPLAYER (-9768) // used in v2 of f_ifpct job flags
|
|
|
|
#define ANYROOM (-9770)
|
|
|
|
#define TICK_INTERVAL (20)
|
|
|
|
|
|
#define SCENTTIME (15)
|
|
#define FOOTPRINTTIME (20)
|
|
|
|
// STRINGS
|
|
#define BUFLENTINY 10
|
|
#define BUFLENSMALL 64
|
|
#define BUFLEN 128
|
|
#define HUGEBUFLEN 1024
|
|
|
|
|
|
#define MORESTRING "--More--"
|
|
#define SOLDOUTSTRING "--SOLD OUT--"
|
|
|
|
// hunger constant - this is how many turns
|
|
// it will take to go from 'normal' to 'hungry' etc
|
|
#define HUNGERCONST 200
|
|
|
|
|
|
// LIMITS
|
|
|
|
|
|
#define DEF_SCREENW 80
|
|
#define DEF_SCREENH 24
|
|
|
|
#define MAXPILEOBS 52
|
|
|
|
#define MAXSPELLLEV 9
|
|
|
|
#define MAXRETCELLS 80
|
|
|
|
#define MAXCHOICES 200
|
|
|
|
#define MAXDEPTH 25 // max dungeon depth
|
|
|
|
#define MAXRANDOMOBCANDIDATES 100
|
|
#define MAXRANDOMLFCANDIDATES 100
|
|
#define MAXCANDIDATES 200
|
|
|
|
//#define MAX_MAPW 80
|
|
//#define MAX_MAPH 50
|
|
#define MAX_MAPW 80
|
|
#define MAX_MAPH 20
|
|
|
|
|
|
#define MINCLEARINGRADIUS 2
|
|
#define MAXCLEARINGRADIUS 5
|
|
|
|
//#define MAX_MAPROOMS 10
|
|
|
|
#define MIN_ROOMH 4
|
|
#define MIN_ROOMW 4
|
|
#define MAX_ROOMW (MAX_MAPW / 3)
|
|
#define MAX_ROOMH (MAX_MAPH / 3)
|
|
|
|
#define MAXDIR_ORTH 4
|
|
#define MAXDIR_COMPASS 8
|
|
|
|
#define MAXHISTORY 20 // max lines of history to keep
|
|
|
|
// MAP BUILDING
|
|
#define DEF_TURNPCT 40
|
|
//#define DEF_SPARSENESS 14
|
|
#define DEF_SPARSENESS 20
|
|
//#define DEF_SPARSENESS 0
|
|
//#define DEF_LOOPPCT 70
|
|
#define DEF_LOOPPCT 95
|
|
//#define DEF_LOOPPCT 0
|
|
#define MINROOMS 5
|
|
#define MAXROOMS 10
|
|
#define DEF_WINDOWPCT 5
|
|
|
|
//
|
|
//#define ANIMDELAY (1000000 / 100) // 1/100 of a second
|
|
#define ANIMDELAY (1000000 / 50) // 1/100 of a second
|
|
|
|
#define MAXVISRANGE 10 // max visible range in full light
|
|
|
|
|
|
// askobject options
|
|
#define AO_NONE 0
|
|
#define AO_INCLUDENOTHING 1
|
|
#define AO_ONLYEQUIPPED 2
|
|
#define AO_EDIBLE 4
|
|
#define AO_NOTIDENTIFIED 8
|
|
#define AO_WEARABLE 16
|
|
#define AO_OPERABLE 32
|
|
#define AO_POURABLE 64
|
|
#define AO_EQUIPPEDNONWEAPON 128
|
|
#define AO_WEILDABLE 256
|
|
#define AO_SPECIFIED 512
|
|
#define AO_READABLE 1024
|
|
#define AO_ARMOUR 2048
|
|
#define AO_NOTKNOWN 4096
|
|
#define AO_DAMAGED 8192
|
|
#define AO_DRINKABLE 16384
|
|
|
|
// askcoords target types
|
|
#define TT_NONE 0
|
|
#define TT_MONSTER 1
|
|
#define TT_OBJECT 2
|
|
#define TT_DOOR 4
|
|
#define TT_PLAYER 8
|
|
#define TT_ALLY 16
|
|
|
|
// target requirements
|
|
#define TR_NONE 0
|
|
#define TR_NEEDLOS 1
|
|
#define TR_NEEDLOF 2
|
|
|
|
// line of fire args
|
|
enum LOFTYPE {
|
|
LOF_DONTNEED = 0,
|
|
LOF_WALLSTOP = 2,
|
|
LOF_LFSSTOP = 4,
|
|
LOF_NEED = 6, // walls AND lfs block
|
|
};
|
|
|
|
// CONTROLLERS
|
|
#define C_AI 0
|
|
#define C_PLAYER 1
|
|
|
|
// 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
|
|
|
|
#define SPEEDUNIT 5
|
|
|
|
// speed settings (lower is faster)
|
|
#define SPEED_ATTACK SP_NORMAL
|
|
#define SPEED_DEAD 50
|
|
#define SPEED_ACTION SP_NORMAL
|
|
#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
|
|
|
|
|
|
// 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
|
|
|
|
// altitude directions
|
|
#define D_UP 12
|
|
#define D_DOWN 13
|
|
#define D_IN 14
|
|
|
|
#define MAXDIR_MAP 15
|
|
|
|
|
|
|
|
// Cell types
|
|
enum CELLTYPE {
|
|
// walls
|
|
CT_WALL,
|
|
CT_ROOMWALL,
|
|
// empty
|
|
CT_CORRIDOR,
|
|
CT_DIRT,
|
|
CT_GRASS,
|
|
CT_LOOPCORRIDOR,
|
|
// rooms
|
|
CT_ROOM,
|
|
};
|
|
|
|
enum SPECIALROOMTYPE {
|
|
RT_NONE = 0,
|
|
RT_FLOODED,
|
|
};
|
|
|
|
|
|
enum SPELLSCHOOL {
|
|
SS_NONE,
|
|
SS_DIVINE,
|
|
SS_ABILITY,
|
|
SS_ALLOMANCY,
|
|
SS_AIR,
|
|
SS_DEATH,
|
|
SS_DIVINATION,
|
|
SS_FIRE,
|
|
SS_COLD,
|
|
SS_GRAVITY,
|
|
SS_LIFE,
|
|
SS_MODIFICATION,
|
|
SS_MENTAL,
|
|
SS_NATURE,
|
|
SS_SUMMONING,
|
|
SS_TRANSLOCATION,
|
|
SS_WILD,
|
|
SS_LAST,
|
|
};
|
|
|
|
enum STRBRACKET {
|
|
ST_RANDOM = -1,
|
|
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 {
|
|
DX_RANDOM = -1,
|
|
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 {
|
|
IQ_RANDOM = -1,
|
|
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,
|
|
};
|
|
|
|
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,
|
|
};
|
|
|
|
// damage type
|
|
enum DAMTYPE {
|
|
DT_ALL = -1,
|
|
DT_PIERCE = 0,
|
|
DT_SLASH = 1,
|
|
DT_FIRE = 2,
|
|
DT_COLD = 3,
|
|
DT_BASH = 4,
|
|
DT_BITE = 5,
|
|
DT_CHOP = 6,
|
|
DT_PROJECTILE = 7,
|
|
DT_HOLY = 8,
|
|
DT_WATER = 9,
|
|
DT_ACID = 10,
|
|
DT_MELT = 11,
|
|
DT_DIRECT = 12, // eg. from f_obhpdrain flag
|
|
DT_ELECTRIC = 13,
|
|
DT_EXPLOSIVE = 14,
|
|
DT_DECAY = 15,
|
|
DT_MAGIC = 16,
|
|
DT_TOUCH = 17,
|
|
DT_POISONGAS = 18,
|
|
DT_UNARMED = 19,
|
|
DT_LIGHT = 20,
|
|
DT_CRUSH = 21,
|
|
DT_FALL = 22,
|
|
DT_PETRIFY = 23,
|
|
DT_POISON = 24,
|
|
DT_NECROTIC = 25,
|
|
DT_NONE = 26, // for direclty dealt damage, not really any type
|
|
};
|
|
#define MAXDAMTYPE 27
|
|
|
|
// Object Classes
|
|
enum OBCLASS {
|
|
OC_TERRAIN,
|
|
OC_MONEY,
|
|
OC_WEAPON,
|
|
OC_ARMOUR,
|
|
OC_MISSILE,
|
|
OC_RING,
|
|
OC_SCROLL,
|
|
OC_POTION,
|
|
OC_WAND,
|
|
OC_FOOD,
|
|
OC_CORPSE,
|
|
OC_ROCK,
|
|
OC_TOOLS,
|
|
OC_TECH,
|
|
OC_MISC,
|
|
OC_FLORA,
|
|
OC_SPELL,
|
|
OC_ABILITY,
|
|
OC_EFFECT,
|
|
OC_DFEATURE,
|
|
OC_BOOK,
|
|
OC_NULL = -999
|
|
};
|
|
|
|
enum BLESSTYPE {
|
|
B_UNCURSED = 0,
|
|
B_BLESSED = 1,
|
|
B_CURSED = -1
|
|
};
|
|
|
|
enum HABITAT {
|
|
H_DUNGEON = 1,
|
|
H_FOREST = 2,
|
|
H_ALL = 999
|
|
};
|
|
|
|
#define RARITYVARIANCELF (5)
|
|
#define RARITYVARIANCEOB (10)
|
|
|
|
/*
|
|
enum RARITY {
|
|
RR_UNIQUE = 7,
|
|
RR_NEVER = 6,
|
|
RR_VERYRARE = 5,
|
|
RR_RARE = 4,
|
|
RR_UNCOMMON = 3,
|
|
RR_COMMON = 2,
|
|
RR_FREQUENT = 1,
|
|
};
|
|
*/
|
|
|
|
enum RACECLASS {
|
|
RC_ANY, // not actually ever defined
|
|
RC_ANIMAL,
|
|
RC_AQUATIC,
|
|
RC_DEMON,
|
|
RC_HUMANOID,
|
|
RC_INSECT,
|
|
RC_SLIME,
|
|
RC_MAGIC,
|
|
RC_OTHER,
|
|
RC_PLANT,
|
|
RC_UNDEAD,
|
|
};
|
|
|
|
enum RACE {
|
|
R_NONE, R_RANDOM,
|
|
R_HUMAN,
|
|
// human monsters
|
|
R_BANDIT,
|
|
// monsters
|
|
R_BEHOLDER,
|
|
R_BUGBEAR,
|
|
R_COCKATRICE,
|
|
R_CREEPINGCLAW,
|
|
R_DARKMANTLE,
|
|
R_EYEBAT,
|
|
R_GIANTHILL,
|
|
R_GIANTFIRE,
|
|
R_GIANTFIREFC,
|
|
R_GIANTFIRETITAN,
|
|
R_GNOLL,
|
|
R_GNOLLHM,
|
|
R_GNOLLMR,
|
|
R_GOBLIN,
|
|
R_GOBLINWAR,
|
|
R_GOBLINSHOOTER,
|
|
R_GOBLINHEXER,
|
|
R_HOBGOBLIN,
|
|
R_HOBGOBLINWAR,
|
|
R_KOBOLD,
|
|
R_LIZARDMAN,
|
|
R_LURKINGHORROR,
|
|
R_OGRE,
|
|
R_OGRESAVAGE,
|
|
R_OGREWARHULK,
|
|
R_OOZEGREY,
|
|
R_ORC,
|
|
R_ORCWARRIOR,
|
|
R_ORK,
|
|
R_PEGASUS,
|
|
R_POLTERGEIST,
|
|
R_SATYR,
|
|
R_SHADOWCAT,
|
|
R_SPRITEFIRE,
|
|
R_TROGLODYTE,
|
|
R_TROLL,
|
|
R_XAT,
|
|
// fish
|
|
R_CRAB,
|
|
R_PIRANHA,
|
|
R_PIRANHAKING,
|
|
R_EELELEC,
|
|
R_EELGIANT,
|
|
// plants
|
|
R_CACTUS,
|
|
R_DREAMFUNGUS,
|
|
R_SAWGRASS,
|
|
// animals
|
|
R_ANT,
|
|
R_ANTS,
|
|
R_ANTLION,
|
|
R_BAT,
|
|
R_BEAR,
|
|
R_BEARGRIZZLY,
|
|
R_DOGBLINK,
|
|
R_DOGDEATH,
|
|
R_DOGWAR,
|
|
R_HAWK,
|
|
R_HAWKYOUNG,
|
|
R_HAWKBLOOD,
|
|
R_HAWKFROST,
|
|
R_LEECH,
|
|
R_NEWT,
|
|
R_PORCUPINE,
|
|
R_RAT,
|
|
R_SNAKE,
|
|
R_SNAKECARPET,
|
|
R_SNAKECOBRA,
|
|
R_SNAKECONSTRICTOR,
|
|
R_SNAKETREE,
|
|
R_SNAKEWATER,
|
|
R_SPIDER,
|
|
R_SPIDERFUNNELWEB,
|
|
R_SPIDERREDBACK,
|
|
R_WOLF,
|
|
R_WOLFYOUNG,
|
|
// insects
|
|
R_BUTTERFLY,
|
|
R_CENTIPEDE,
|
|
R_GLOWBUG,
|
|
R_GIANTFLY,
|
|
R_GIANTBLOWFLY,
|
|
R_STIRGE,
|
|
// undead
|
|
R_GHAST,
|
|
R_GHOST,
|
|
R_GHOUL,
|
|
R_SKELETON,
|
|
R_ZOMBIE,
|
|
// special
|
|
R_GASCLOUD,
|
|
R_DANCINGWEAPON,
|
|
};
|
|
|
|
enum JOB {
|
|
J_NONE,
|
|
J_GOD,
|
|
J_ADVENTURER,
|
|
J_ALLOMANCER,
|
|
J_BARBARIAN,
|
|
J_COMMANDO,
|
|
J_DRUID,
|
|
J_PIRATE,
|
|
J_PLUMBER,
|
|
J_PRINCE,
|
|
J_ROGUE,
|
|
J_WIZARD,
|
|
};
|
|
|
|
enum MATSTATE {
|
|
MS_SOLID,
|
|
MS_LIQUID,
|
|
MS_GAS,
|
|
MS_OTHER,
|
|
};
|
|
|
|
// Object Materials
|
|
enum MATERIAL {
|
|
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,
|
|
MT_WAX = 22,
|
|
MT_ACID = 23,
|
|
MT_SILK = 24,
|
|
MT_OIL = 25,
|
|
MT_PLANT = 26,
|
|
};
|
|
|
|
// Object Types
|
|
enum OBTYPE {
|
|
OT_NONE,
|
|
// dungeon features
|
|
OT_BOULDER,
|
|
OT_ICICLE,
|
|
OT_STATUE,
|
|
OT_DOORWOOD,
|
|
OT_DOORIRON,
|
|
OT_WOODENTABLE,
|
|
OT_WOODENBARREL,
|
|
OT_WOODENSTOOL,
|
|
OT_HOLYCIRCLE,
|
|
OT_PENTAGRAM,
|
|
OT_STAIRSDOWN,
|
|
OT_STAIRSUP,
|
|
OT_VENDINGMACHINE,
|
|
OT_PORTAL,
|
|
// terrain
|
|
OT_WATERSHALLOW,
|
|
OT_WATERDEEP,
|
|
// traps
|
|
OT_TRAPROCK,
|
|
OT_TRAPARROW,
|
|
OT_TRAPARROWP,
|
|
OT_TRAPGAS,
|
|
OT_TRAPFIRE,
|
|
OT_TRAPMINE,
|
|
OT_TRAPTRIP,
|
|
// rocks / plants
|
|
OT_GOLD,
|
|
OT_STONE,
|
|
OT_ASH,
|
|
OT_ASHEXPLODE,
|
|
OT_ASHCONCEAL,
|
|
OT_ASHSLEEP,
|
|
OT_GEMOFSEEING,
|
|
// flora
|
|
OT_FLOWER,
|
|
OT_LEAF,
|
|
OT_SHRUB,
|
|
OT_STUMP,
|
|
OT_TREE,
|
|
// food
|
|
OT_BERRY,
|
|
OT_NUT,
|
|
OT_BANANA,
|
|
OT_BANANASKIN, // not really food
|
|
OT_APPLE,
|
|
OT_MUSHROOM,
|
|
OT_BREADSTALE,
|
|
OT_CHEESE,
|
|
OT_STEW,
|
|
OT_JERKY,
|
|
OT_ROASTMEAT,
|
|
OT_BREADFRESH,
|
|
OT_CHOCOLATE,
|
|
OT_CLOVER,
|
|
// corpses
|
|
OT_CORPSE,
|
|
OT_HEAD,
|
|
// potions
|
|
OT_POT_ACID,
|
|
OT_POT_ACROBATICS,
|
|
OT_POT_AMBROSIA,
|
|
OT_POT_BLOOD,
|
|
OT_POT_BLOODC,
|
|
OT_POT_COMPETENCE,
|
|
OT_POT_ELEMENTIMMUNE,
|
|
OT_POT_ETHEREALNESS,
|
|
OT_POT_EXPERIENCE,
|
|
OT_POT_GASEOUSFORM,
|
|
OT_POT_HEALING,
|
|
OT_POT_HEALINGMIN,
|
|
OT_POT_HEALINGMAJ,
|
|
OT_POT_INVIS,
|
|
OT_POT_INVULN,
|
|
OT_POT_MAGIC,
|
|
OT_POT_OIL,
|
|
OT_POT_POISON,
|
|
OT_POT_POLYMORPH,
|
|
OT_POT_RESTORATION,
|
|
OT_POT_RUM,
|
|
OT_POT_SANCTUARY,
|
|
OT_POT_SLEEP,
|
|
OT_POT_SPEED,
|
|
OT_POT_WATER,
|
|
OT_POT_JUICE,
|
|
// scrolls
|
|
OT_MAP,
|
|
OT_SCR_NOTHING,
|
|
OT_SCR_CREATEMONSTER,
|
|
OT_SCR_DETECTAURA,
|
|
OT_SCR_DETECTLIFE,
|
|
OT_SCR_DETECTOBS,
|
|
OT_SCR_DETECTMAGIC,
|
|
OT_SCR_FLAMEPILLAR,
|
|
OT_SCR_FLAMEBURST,
|
|
OT_SCR_IDENTIFY,
|
|
OT_SCR_KNOCK,
|
|
OT_SCR_LIGHT,
|
|
OT_SCR_MAPPING,
|
|
OT_SCR_MENDING,
|
|
OT_SCR_MINDSCAN,
|
|
OT_SCR_PERMENANCE,
|
|
OT_SCR_ENCHANT,
|
|
OT_SCR_FREEZEOB,
|
|
OT_SCR_REMOVECURSE,
|
|
OT_SCR_TELEPORT,
|
|
OT_SCR_TURNUNDEAD,
|
|
OT_SCR_WISH,
|
|
// BOOKS
|
|
OT_MANUAL,
|
|
OT_SPELLBOOK,
|
|
/*
|
|
OT_MAN_ARMOUR,
|
|
OT_MAN_ATHLETICS,
|
|
OT_MAN_BACKSTAB,
|
|
OT_MAN_COOKING,
|
|
OT_MAN_FIRSTAID,
|
|
OT_MAN_LISTEN,
|
|
OT_MAN_LOCKPICKING,
|
|
OT_MAN_MAGITEMUSAGE,
|
|
OT_MAN_RANGED,
|
|
OT_MAN_SHIELDS,
|
|
OT_MAN_SPELLCASTING,
|
|
OT_MAN_SPOTHIDDEN,
|
|
OT_MAN_STEALTH,
|
|
OT_MAN_TECHUSAGE,
|
|
OT_MAN_TRAPS,
|
|
OT_MAN_TWOWEAPON,
|
|
// manuals of knowledge
|
|
OT_MAN_LORE_ARCANA,
|
|
OT_MAN_LORE_DEMONS,
|
|
OT_MAN_LORE_HUMANOID,
|
|
OT_MAN_LORE_NATURE,
|
|
OT_MAN_LORE_UNDEAD,
|
|
// 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_NATURE,
|
|
OT_MAN_SS_FIRE,
|
|
OT_MAN_SS_COLD,
|
|
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,
|
|
// SPELLBOOKS
|
|
// allomancy can't be learned from books
|
|
// -- death
|
|
OT_SB_ANIMATEDEAD,
|
|
OT_SB_DRAINLIFE,
|
|
OT_SB_FEAR,
|
|
OT_SB_PAIN,
|
|
OT_SB_PARALYZE,
|
|
OT_SB_POISONBOLT,
|
|
OT_SB_INFINITEDEATH,
|
|
OT_SB_WEAKEN,
|
|
OT_SB_FEEBLEMIND,
|
|
OT_SB_BLINDNESS,
|
|
OT_SB_POSSESSION,
|
|
OT_SB_STENCH,
|
|
// -- divination
|
|
OT_SB_DETECTAURA,
|
|
OT_SB_DETECTLIFE,
|
|
OT_SB_DETECTOBS,
|
|
OT_SB_LOCATEOBJECT,
|
|
OT_SB_LORE,
|
|
OT_SB_REVEALHIDDEN,
|
|
OT_SB_IDENTIFY,
|
|
OT_SB_MAPPING,
|
|
OT_SB_SEEINVIS,
|
|
// -- elemental - air
|
|
OT_SB_AIRBLAST,
|
|
OT_SB_CALLLIGHTNING,
|
|
OT_SB_CLOUDKILL,
|
|
OT_SB_GUSTOFWIND,
|
|
OT_SB_LIGHTNINGSTORM,
|
|
OT_SB_WINDSHIELD,
|
|
// -- elemental - fire
|
|
OT_SB_BLADEBURN,
|
|
OT_SB_BURNINGWAVE,
|
|
OT_SB_FIREDART,
|
|
OT_SB_FIREBALL,
|
|
OT_SB_FLAMEPILLAR,
|
|
OT_SB_FLAMEBURST,
|
|
OT_SB_SPARK,
|
|
// -- elemental - ice
|
|
OT_SB_CHILL,
|
|
OT_SB_CONECOLD,
|
|
OT_SB_COLDBURST,
|
|
OT_SB_FREEZEOB,
|
|
OT_SB_FROSTBITE,
|
|
OT_SB_ICEEDGE,
|
|
OT_SB_ICICLE,
|
|
OT_SB_WALLOFICE,
|
|
// -- elemental - earth
|
|
OT_SB_DIG,
|
|
// -- gravity
|
|
OT_SB_GRAVLOWER,
|
|
OT_SB_GRAVBOOST,
|
|
OT_SB_HASTE,
|
|
OT_SB_FLIGHT,
|
|
OT_SB_SLOW,
|
|
OT_SB_LEVITATION,
|
|
// -- life
|
|
OT_SB_HEALING,
|
|
OT_SB_HEALINGMIN,
|
|
OT_SB_HEALINGMAJ,
|
|
OT_SB_TURNUNDEAD,
|
|
// -- mental / psionic
|
|
OT_SB_MINDSCAN,
|
|
OT_SB_SLEEP,
|
|
OT_SB_TELEKINESIS,
|
|
OT_SB_PACIFY,
|
|
OT_SB_PSYARMOUR,
|
|
OT_SB_CHARM,
|
|
// -- modification
|
|
OT_SB_GASEOUSFORM,
|
|
OT_SB_GREASE,
|
|
OT_SB_KNOCK,
|
|
OT_SB_HOLDPORTAL,
|
|
OT_SB_INSCRIBE,
|
|
OT_SB_INVISIBILITY,
|
|
OT_SB_LIGHT,
|
|
OT_SB_DARKNESS,
|
|
OT_SB_MENDING,
|
|
OT_SB_PASSWALL,
|
|
OT_SB_PETRIFY,
|
|
OT_SB_POLYMORPH,
|
|
OT_SB_STICKTOSNAKE,
|
|
// -- summoning
|
|
OT_SB_CREATEMONSTER,
|
|
OT_SB_SUMMONWEAPON,
|
|
// -- translocation
|
|
OT_SB_BLINK,
|
|
OT_SB_DISPERSAL,
|
|
OT_SB_GATE,
|
|
OT_SB_TELEPORT,
|
|
OT_SB_TWIDDLE,
|
|
// -- wild can't be learned from books
|
|
*/
|
|
// spells
|
|
// -- allomancy
|
|
OT_S_ABSORBMETAL,
|
|
OT_S_ACCELMETAL,
|
|
OT_S_ANIMATEMETAL,
|
|
OT_S_EXPLODEMETAL,
|
|
OT_S_PULLMETAL,
|
|
OT_S_MAGSHIELD,
|
|
OT_S_METALHEAL,
|
|
// -- death
|
|
OT_S_ANIMATEDEAD,
|
|
OT_S_DRAINLIFE,
|
|
OT_S_FEAR,
|
|
OT_S_PAIN,
|
|
OT_S_PARALYZE,
|
|
OT_S_INFINITEDEATH,
|
|
OT_S_WEAKEN,
|
|
OT_S_FEEBLEMIND,
|
|
OT_S_BLINDNESS,
|
|
OT_S_POISONBOLT,
|
|
OT_S_POSSESSION,
|
|
OT_S_STENCH,
|
|
// -- divination
|
|
OT_S_DETECTAURA,
|
|
OT_S_DETECTLIFE,
|
|
OT_S_DETECTOBS,
|
|
OT_S_DETECTMAGIC,
|
|
OT_S_LOCATEOBJECT,
|
|
OT_S_LORE,
|
|
OT_S_REVEALHIDDEN,
|
|
OT_S_SEEINVIS,
|
|
OT_S_IDENTIFY,
|
|
OT_S_MAPPING,
|
|
// -- elemental - air
|
|
OT_S_JOLT,
|
|
OT_S_AIRBLAST,
|
|
OT_S_CLOUDKILL,
|
|
OT_S_GUSTOFWIND,
|
|
OT_S_MIST,
|
|
OT_S_WINDSHIELD,
|
|
// -- elemental - fire
|
|
OT_S_BLADEBURN,
|
|
OT_S_BURNINGWAVE,
|
|
OT_S_FIREDART,
|
|
OT_S_FIREBALL,
|
|
OT_S_FLAMEPILLAR,
|
|
OT_S_FLAMEBURST,
|
|
OT_S_SPARK,
|
|
// -- elemental - ice
|
|
OT_S_CHILL,
|
|
OT_S_COLDBURST,
|
|
OT_S_COLDRAY,
|
|
OT_S_FREEZEOB,
|
|
OT_S_FROSTBITE,
|
|
OT_S_ICEEDGE,
|
|
OT_S_ICICLE,
|
|
OT_S_WALLOFICE,
|
|
// -- gravity
|
|
OT_S_GRAVLOWER,
|
|
OT_S_GRAVBOOST,
|
|
OT_S_HASTE,
|
|
OT_S_SLOW,
|
|
OT_S_LEVITATION,
|
|
OT_S_FLIGHT,
|
|
// -- life
|
|
OT_S_HEALING,
|
|
OT_S_HEALINGMIN,
|
|
OT_S_HEALINGMAJ,
|
|
OT_S_TURNUNDEAD,
|
|
// -- mental / psionic
|
|
OT_S_MINDSCAN,
|
|
OT_S_SLEEP,
|
|
OT_S_TELEKINESIS,
|
|
OT_S_PACIFY,
|
|
OT_S_PSYARMOUR,
|
|
OT_S_CHARM,
|
|
// -- modification
|
|
OT_S_DARKNESS,
|
|
OT_S_ENCHANT,
|
|
OT_S_GASEOUSFORM,
|
|
OT_S_GREASE,
|
|
OT_S_HOLDPORTAL,
|
|
OT_S_INSCRIBE,
|
|
OT_S_INVISIBILITY,
|
|
OT_S_KNOCK,
|
|
OT_S_LIGHT,
|
|
OT_S_MENDING,
|
|
OT_S_PASSWALL,
|
|
OT_S_PETRIFY,
|
|
OT_S_POLYMORPH,
|
|
OT_S_POLYMORPHRND,
|
|
// nature
|
|
OT_S_BARKSKIN,
|
|
OT_S_CALLLIGHTNING,
|
|
OT_S_CALLWIND,
|
|
OT_S_CALMANIMALS,
|
|
OT_S_CALMINGSCENT,
|
|
OT_S_CHARMANIMAL,
|
|
OT_S_CUREPOISON,
|
|
OT_S_DETECTPOISON,
|
|
OT_S_DIG,
|
|
OT_S_WEB,
|
|
OT_S_ENDUREELEMENTS,
|
|
OT_S_ENTANGLE,
|
|
OT_S_FLOOD,
|
|
OT_S_HAILSTORM,
|
|
OT_S_LIGHTNINGBOLT,
|
|
OT_S_LIGHTNINGSTORM,
|
|
OT_S_PURIFYFOOD,
|
|
OT_S_QUENCH,
|
|
OT_S_LESSENPOISON,
|
|
OT_S_REPELINSECTS,
|
|
OT_S_SLEETSTORM,
|
|
OT_S_SOFTENEARTH,
|
|
OT_S_STICKTOSNAKE,
|
|
OT_S_SUMMONANIMALSSM,
|
|
OT_S_SUMMONANIMALSMD,
|
|
OT_S_SUMMONANIMALSLG,
|
|
OT_S_THORNS,
|
|
OT_S_WARPWOOD,
|
|
OT_S_WATERJET,
|
|
// -- summoning
|
|
OT_S_CREATEMONSTER,
|
|
OT_S_SUMMONWEAPON,
|
|
// -- translocation
|
|
OT_S_BLINK,
|
|
OT_S_PULL,
|
|
OT_S_DISPERSAL,
|
|
OT_S_GATE,
|
|
OT_S_TELEPORT,
|
|
OT_S_TWIDDLE,
|
|
// -- wild
|
|
OT_S_MANASPIKE,
|
|
OT_S_DETONATE,
|
|
OT_S_ENERGYBOLT,
|
|
OT_S_ENERGYBLAST,
|
|
OT_S_FLASH,
|
|
// -- divine powers
|
|
OT_S_WISH,
|
|
OT_S_GIFT,
|
|
OT_A_DEBUG,
|
|
OT_A_ENHANCE,
|
|
OT_A_LEARN,
|
|
OT_A_LEVELUP,
|
|
// abilities
|
|
OT_A_COOK,
|
|
OT_A_DARKWALK,
|
|
OT_A_DISARM,
|
|
OT_A_FLURRY,
|
|
OT_A_GRAB,
|
|
OT_A_CHARGE,
|
|
OT_A_CRUSH,
|
|
OT_A_JUMP,
|
|
OT_A_RAGE,
|
|
OT_A_SPRINT,
|
|
OT_A_STINGACID, // need to define dam in f_canwill
|
|
OT_A_SUCKBLOOD,
|
|
OT_A_SWOOP,
|
|
OT_A_EMPLOY,
|
|
OT_A_HEAVYBLOW,
|
|
OT_A_HIDE,
|
|
OT_A_INSPECT,
|
|
OT_A_HURRICANESTRIKE,
|
|
OT_A_POLYREVERT,
|
|
OT_A_WARCRY, // uses F_NOISETEXT -> N_WARCRY if it is there.
|
|
// otherwise 'shouts a blood-curdling war cry'
|
|
// wands
|
|
OT_WAND_COLD,
|
|
OT_WAND_DETONATION,
|
|
OT_WAND_DIGGING,
|
|
OT_WAND_DISPERSAL,
|
|
OT_WAND_FIRE,
|
|
OT_WAND_FIREBALL,
|
|
OT_WAND_HASTE,
|
|
OT_WAND_INVIS,
|
|
OT_WAND_KNOCK,
|
|
OT_WAND_LIGHT,
|
|
OT_WAND_POLYMORPH,
|
|
OT_WAND_REVEALHIDDEN,
|
|
OT_WAND_SLOW,
|
|
OT_WAND_WEAKNESS,
|
|
OT_WAND_WONDER,
|
|
// tools
|
|
OT_BLANKET,
|
|
OT_BLINDFOLD,
|
|
OT_BUGLAMP,
|
|
OT_CANDLE,
|
|
OT_GUNPOWDER,
|
|
OT_LAMPOIL,
|
|
OT_LANTERNOIL,
|
|
OT_LOCKPICK,
|
|
OT_PANPIPES,
|
|
OT_PICKAXE,
|
|
OT_TORCH,
|
|
OT_TOWEL,
|
|
// tech
|
|
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_SLEEPINGBAG,
|
|
OT_TELEPAD,
|
|
OT_TENT,
|
|
OT_XRAYGOGGLES,
|
|
// misc objects
|
|
OT_BONE,
|
|
OT_EMPTYFLASK,
|
|
OT_EMPTYVIAL,
|
|
OT_CALTROP,
|
|
OT_BROKENGLASS,
|
|
OT_ICECHUNK,
|
|
OT_ICESHEET,
|
|
OT_MUDPOOL,
|
|
OT_PUDDLEOIL,
|
|
OT_SPLASHWATER,
|
|
OT_PUDDLEWATER,
|
|
OT_PUDDLEWATERL,
|
|
OT_ACIDSPLASH,
|
|
OT_ACIDPUDDLE,
|
|
OT_ACIDPOOL,
|
|
OT_SLIMEPOOL,
|
|
OT_VOMITPOOL,
|
|
OT_BLOODSTAIN,
|
|
OT_BLOODSPLASH,
|
|
OT_BLOODPOOL,
|
|
OT_BLOODCSPLASH,
|
|
OT_MELTEDWAX,
|
|
OT_SOGGYPAPER,
|
|
OT_FLESHCHUNK,
|
|
// trail objects
|
|
OT_FOOTPRINT,
|
|
OT_SCENT,
|
|
// effects
|
|
OT_FIRELARGE,
|
|
OT_FIREMED,
|
|
OT_FIRESMALL,
|
|
OT_HAILSTORM,
|
|
OT_ICEWALL,
|
|
OT_MAGICBARRIER,
|
|
OT_STEAMCLOUD,
|
|
OT_STEAMPUFF,
|
|
OT_SLEETSTORM,
|
|
OT_MIST,
|
|
OT_SMOKECLOUD,
|
|
OT_SMOKEPUFF,
|
|
OT_POISONCLOUD,
|
|
OT_POISONPUFF,
|
|
OT_VINE,
|
|
OT_WEB,
|
|
// armour - body
|
|
OT_ARMOURLEATHER,
|
|
OT_ARMOURRING,
|
|
OT_ARMOURSCALE,
|
|
OT_ARMOURCHAIN,
|
|
OT_ARMOURSPLINT,
|
|
OT_ARMOURPLATE,
|
|
OT_FLAKJACKET,
|
|
OT_OVERALLS,
|
|
OT_COTTONSHIRT,
|
|
OT_SILKSHIRT,
|
|
OT_ROBE,
|
|
OT_VELVETROBE,
|
|
// armour - shoulders
|
|
OT_CLOAK,
|
|
// armour - waist
|
|
OT_BELTLEATHER,
|
|
// armour - legs
|
|
OT_CLOTHTROUSERS,
|
|
OT_RIDINGTROUSERS,
|
|
OT_COMBATPANTS,
|
|
// armour - feet
|
|
OT_SANDALS,
|
|
OT_SHOESLEATHER,
|
|
OT_BOOTSLEATHER,
|
|
OT_BOOTSRUBBER,
|
|
OT_BOOTSSPIKED,
|
|
// armour - hands
|
|
OT_GLOVESCLOTH,
|
|
OT_GLOVESLEATHER,
|
|
OT_GAUNTLETS,
|
|
// armour - head
|
|
OT_SUNHAT,
|
|
OT_PIRATEHAT,
|
|
OT_CAP,
|
|
OT_HELM,
|
|
OT_GASMASK,
|
|
OT_GOLDCROWN,
|
|
OT_HELMBONE,
|
|
OT_HELMFOOTBALL,
|
|
// armour - eyes
|
|
OT_SUNGLASSES,
|
|
OT_EYEPATCH,
|
|
// armour - shields
|
|
OT_BUCKLER,
|
|
OT_SHIELD,
|
|
OT_SHIELDLARGE,
|
|
OT_SHIELDTOWER,
|
|
// rings
|
|
OT_RING_INVIS,
|
|
OT_RING_INVULN,
|
|
OT_RING_LUCK,
|
|
OT_RING_CONTROL,
|
|
OT_RING_CON,
|
|
OT_RING_DEX,
|
|
OT_RING_HUNGER,
|
|
OT_RING_IQ,
|
|
OT_RING_STR,
|
|
OT_RING_MANA,
|
|
OT_RING_MIRACLES,
|
|
OT_RING_MPREGEN,
|
|
OT_RING_PROTFIRE,
|
|
OT_RING_PROTCOLD,
|
|
OT_RING_REGENERATION,
|
|
OT_RING_RESISTMAG,
|
|
OT_RING_SIGHT,
|
|
OT_RING_WOUNDING,
|
|
// innate / animal weapons
|
|
OT_CLAWS,
|
|
OT_FISTS,
|
|
OT_HOOKHAND, // for pirate
|
|
OT_STING,
|
|
OT_BUTT,
|
|
OT_HOOF,
|
|
OT_TAIL,
|
|
OT_TEETH,
|
|
OT_TEETHSM,
|
|
OT_TENTACLE,
|
|
OT_ZAPPER,
|
|
// monster weapons
|
|
OT_ACIDATTACK,
|
|
OT_TOUCHPARALYZE,
|
|
OT_TOUCHPARALYZE2,
|
|
// missiles / ammo
|
|
OT_ARROW,
|
|
OT_BOLT,
|
|
OT_DART,
|
|
OT_NANODART,
|
|
OT_JAVELIN,
|
|
OT_BULLET,
|
|
OT_RUBBERBULLET,
|
|
// axes
|
|
OT_AXE,
|
|
OT_HANDAXE,
|
|
OT_BATTLEAXE,
|
|
OT_GREATAXE,
|
|
OT_WARAXE,
|
|
// short blades
|
|
OT_COMBATKNIFE,
|
|
OT_DAGGER,
|
|
OT_KNIFE,
|
|
OT_ORNDAGGER,
|
|
OT_QUICKBLADE,
|
|
OT_RAPIER,
|
|
OT_SAI,
|
|
OT_SHORTSWORD,
|
|
OT_STEAKKNIFE,
|
|
OT_SICKLE,
|
|
// long swords
|
|
OT_FALCHION,
|
|
OT_GREATSWORD,
|
|
OT_LONGSWORD,
|
|
OT_ORNSWORD,
|
|
OT_SCIMITAR,
|
|
OT_CUTLASS,
|
|
// polearms
|
|
OT_GLAIVE,
|
|
OT_GUISARME,
|
|
OT_HALBERD,
|
|
OT_LANCE,
|
|
OT_RANSEUR,
|
|
OT_SCYTHE,
|
|
OT_SPEAR,
|
|
OT_TRIDENT,
|
|
// staves
|
|
OT_QUARTERSTAFF,
|
|
OT_BAMBOOSTAFF,
|
|
OT_IRONSTAFF,
|
|
OT_BLADEDSTAFF,
|
|
// clubs
|
|
OT_CLUB,
|
|
OT_FLAIL,
|
|
OT_FLAILHEAVY,
|
|
OT_GREATCLUB,
|
|
OT_MACE,
|
|
OT_MORNINGSTAR,
|
|
OT_NUNCHAKU,
|
|
OT_SPANNER,
|
|
OT_STICK,
|
|
// projectile weapons
|
|
OT_BOW,
|
|
OT_CROSSBOW,
|
|
OT_CROSSBOWHAND,
|
|
OT_LONGBOW,
|
|
OT_REVOLVER,
|
|
OT_SLING,
|
|
// special weapons
|
|
OT_ENERGYBLADE,
|
|
OT_HANDOFGOD,
|
|
|
|
|
|
};
|
|
|
|
|
|
#define BP_NONE (-1)
|
|
enum BODYPART {
|
|
BP_WEAPON = 0,
|
|
BP_SECWEAPON,
|
|
BP_EYES,
|
|
BP_HEAD,
|
|
BP_SHOULDERS,
|
|
BP_BODY,
|
|
BP_HANDS,
|
|
BP_WAIST,
|
|
BP_LEGS,
|
|
BP_FEET,
|
|
BP_RIGHTHAND,
|
|
BP_LEFTHAND,
|
|
};
|
|
#define MAXBODYPARTS (12)
|
|
|
|
// depth on a human
|
|
enum DEPTH {
|
|
DP_HEAD = 4,
|
|
DP_SHOULDERS = 3,
|
|
DP_WAIST = 2,
|
|
DP_FEET = 1,
|
|
DP_NONE = 0,
|
|
};
|
|
|
|
// empty types
|
|
#define WE_WALKABLE 1
|
|
#define WE_EMPTY 2
|
|
#define WE_PORTAL 3
|
|
#define WE_NOTWALL 4
|
|
|
|
enum NOISETYPE {
|
|
N_GETANGRY,
|
|
N_WALK,
|
|
N_FLY,
|
|
N_WARCRY,
|
|
N_LOWHP,
|
|
};
|
|
|
|
enum LFSIZE {
|
|
SZ_ANY = -1,
|
|
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
|
|
};
|
|
|
|
enum ALLEGIENCE {
|
|
AL_HOSTILE, // will attack you on sight
|
|
AL_PEACEFUL, // won't attack you on sight
|
|
AL_FRIENDLY, // will help you fight
|
|
};
|
|
|
|
enum POISONTYPE {
|
|
P_COLD,
|
|
P_FOOD,
|
|
P_GAS,
|
|
P_VENOM,
|
|
P_WEAKNESS,
|
|
};
|
|
|
|
enum RANGEATTACK {
|
|
RA_NONE = 0,
|
|
RA_GUN,
|
|
RA_THROW,
|
|
RA_WAND,
|
|
};
|
|
|
|
enum FLAG {
|
|
F_NONE, // dummy flag
|
|
// map flags
|
|
F_MAPCOORDS, // v0+v1 are x/y coords for this map area
|
|
// object flags
|
|
F_DEAD, // object will be removed
|
|
F_CREATEDBY, // object was made by lf id v0, text=real lfname
|
|
F_ENCHANTABLE, // object can get +1/-1 ect
|
|
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)
|
|
F_CONTAINSOB, // for vending machiens. v0 is ob letter
|
|
// text is an object it contains.
|
|
F_IDWHENUSED, // fully identify an object when worn/weilded/operated/etc
|
|
F_STARTBLESSED, // v0 = b_blessed or b_cursed
|
|
F_REPELBLESSED, // v0 = b_blessed or b_cursed. repels other obejcts
|
|
// of this blesstype.
|
|
F_TRAIL, // this object denotes the trail left by a lf.
|
|
// v0 = raceid of lf who left it
|
|
// v1 = direction the lf moved out of this cell
|
|
// v2 = enum sense used to see this (ie. s_smell, s_sight)
|
|
// (optional) text = lfid of lf who left this.
|
|
// should only be used for SCENT, not footprints.
|
|
// 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
|
|
F_EQUIPPED, // val0 = where it is equipped. CLEAR WHEN OB MOVED!
|
|
F_CURAMMO, // currently equipped ammo
|
|
F_GOESON, // val0 = where it can be equipped.
|
|
F_BONUS, // val0=bonus/penalty to damage/armour. ie. +1 sword
|
|
F_THROWMISSILE, // weapon would make a good thrown missle - used by AI
|
|
F_UNIQUE, // only one may appear
|
|
F_GLYPH, // override the glyph with the first char of text.
|
|
// v0 is either NA (white) or colourid (C_xxx).
|
|
F_NOGLYPH, // this object doesn't appear normally
|
|
F_COSMETIC, // this object is mostly cosmetic, don't say 'you see xx'
|
|
F_NOPICKUP, // cannot pick this up
|
|
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
|
|
F_CAUSESCOUGH, // being in this ob's cell will make you cough unless
|
|
// immune to gas.
|
|
// v0 = con skillcheck difficulty.
|
|
F_BLOCKSVIEW, // if v0 = true, cannot see past this
|
|
// if v0 > 0, reduces your vision by v0.
|
|
F_BLOCKSLOF, // this object interrupts line of fire
|
|
F_THEREISHERE, // announce "there is xx here!", not "you see xx here"
|
|
// text[0] is punctuation to use.
|
|
F_OBDIETEXT, // 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_NOQUALITY, // can't be masterwork / shoddy
|
|
F_CORPSEOF, // this is a corpse of montype val0.
|
|
F_DTCONVERT, // damtype val0 converts this to f->text
|
|
F_DTCREATEOB, // damtype val0 creates object f->text here
|
|
// v1 = radius to burst in
|
|
// v2 = dirtype
|
|
F_NODTCONVERT, // overrides DTCONVERT .
|
|
F_NOMATCONVERT, // overrides MATCONVERT .
|
|
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
|
|
// if dam=0, set dam to textfield dice (eg.text="2d6")
|
|
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
|
|
F_HASBRAND, // has the object mod v0 (ie. OM_FLAMESTRIKE)
|
|
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_CRITKNOCKDOWN, // lf knocks down victims on a critical hit
|
|
F_HITCONFER, // hitting with this gives flagid=v0
|
|
// unless you pass a val1 skillcheck, diff val2
|
|
// with timeleft = text ("min-max")
|
|
F_HITCONFERVALS,// specifies values for conferred flag.
|
|
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 TEXT damage.
|
|
// val1 = BIG means hit surrounding cells
|
|
// val2 = ifactivated, only explodes if activated.
|
|
F_EXPLODEONDAM, // explodes when it is damaged, deals TEXT damage.
|
|
// 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
|
|
// v0 is target requirements (los/lof)
|
|
// text is prompt
|
|
F_OPERNEEDDIR, // need to ask a direction when operating this. text is prompt
|
|
|
|
// 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
|
|
// technology flags
|
|
F_TECHLEVEL, // v0 is a PR_xxx enum for tech usage skill
|
|
// what can you do with this object?
|
|
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)"
|
|
// v2 = nutrition left when partially eaten
|
|
F_DRINKABLE, // you can drink this. val1 = nutrition. 100 = a meal
|
|
// -1 means "nutrition is weight x abs(val1)"
|
|
// if v2=DONTKILL, this object does NOT die when drunk.
|
|
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
|
|
F_TRAP, // this object is a trap. v0 is sc_disarm difficulty.
|
|
// (NA = impossible)
|
|
// if v1 = true, trap will go off if you fail your 2nd disarm
|
|
// check.
|
|
// v2 = sc_dodge difficulty
|
|
// doors
|
|
F_DOOR, // this object is a door - ie. can open it
|
|
F_OPEN, // is this door open?
|
|
F_LOCKED,// door is locked
|
|
// v1 is difficulty to disarm
|
|
F_JAMMED, // is this door jammed? v0 is # turns it'll take to open it.
|
|
F_SECRET, // this object is secret. v0 is sc_search difficulty
|
|
// to find it.
|
|
// NA means 'can never find this'
|
|
// stairs / teleporters / portals
|
|
F_CLIMBABLE, // this is a stiarcase, v0 = up/down/in
|
|
// also use this for portals
|
|
//F_STAIRDIR//, // val0 = direcion
|
|
F_OPPOSITESTAIRS, // val0 = opposite kind of stairs
|
|
F_MAPLINK, // val0 = map to link to.
|
|
// v1/v2 = x/y
|
|
// OR
|
|
// text = obid to link to
|
|
|
|
// ob interaction flags
|
|
F_HARD, // object is hard (ie. punching it will hurt!)
|
|
F_REDUCEMOVEMENT, // time to move off here is multiplied by v0.
|
|
F_RESTRICTMOVEMENT, // must pass a diff=v0 STR check to move off it.
|
|
// if v1 is B_TRUE, then it takes 1 damage if you fail.
|
|
//
|
|
// for multiple objects, each one adds half its difficulty
|
|
|
|
F_RODSHAPED, // for sticks-to-snakes
|
|
F_SHARP, // does damage when you step on it. v0/1 are min/max dam
|
|
F_SCARY, // gives other lfs a penalty to morale checks against you,
|
|
// v0 = penalty amt.
|
|
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
|
|
F_FLAMMABLE, // object will catch alight if burnt (ie fire damage)
|
|
// v0 = how long it will burn for
|
|
// text (optional) = what it will convert to
|
|
// instead of just being set alight
|
|
F_CANGETWET, // object will get F_WET if hit by water
|
|
// v0 = enum WETNESS. v1 = how long
|
|
F_WATERPROOF, // object doesn't get wet. note: overrides CANGETWET!
|
|
F_WET, // object is wet
|
|
F_RUSTED, // object is rusty
|
|
// v0 = enum RUSTINESS.
|
|
// object mods/effects
|
|
F_ONFIRE, // burning, also deals extra fire damage
|
|
// option text = xdx amount of damage.
|
|
F_HEADLESS, // for corpses. can go on LFs too.
|
|
F_MASTERWORK, // weps do higher damager, armour protects better
|
|
F_SHODDY, // weps do less damage, armour protects less.
|
|
// weapon flags
|
|
F_ATTACKVERB, // text=verb for attacking. ie. "hit" "slash" "sting" etc
|
|
// if v0/v1 are set, only use this text if dam pct is
|
|
// between v0 and v1.
|
|
// should always be singular
|
|
F_KILLVERB, // text=verb for a fatal attacking. ie. "kill" "behead"
|
|
// if v0/v1 are set, only use this text if dam pct is
|
|
// between v0 and v1.
|
|
// should always be singular
|
|
F_OBATTACKDELAY, // how long weapon takes to attack
|
|
F_USESSKILL, // weapon needs skill sk_v0
|
|
F_CANHAVEOBMOD, // weapon can have obmod om_v0 applied
|
|
// optional: v1 is chance of randomly having it
|
|
F_ATTREQ, // requires attrib v0 to be at least v1
|
|
//F_DAMTYPE, // val0 = damage type
|
|
//F_DAM, // val0 = ndice, val1 = nsidesondie, val2 = mod
|
|
F_DAM, // v0 = damtype, text = 1d1+1
|
|
F_MISSILEDAM, // val0 = dam if it hits (without speed multiplier)
|
|
F_ACCURACY, // 100 - val0 = modify to tohit% (ie. higher is better)
|
|
F_UNARMEDWEP, // this is not a real weapon, ie. claws, teeth etc
|
|
F_ARMOURPIERCE, // goes through armour
|
|
F_TWOHANDED, // weapon uses two hands to weild
|
|
F_TRIPATTACK, // weapon can trip the victim
|
|
F_DISARMATTACK, // weapon can disarm the victim
|
|
F_FIREARM, // this weapon is equipped in bp_secweapon, not _weapon.
|
|
F_FIRESPEED, // how fast this weapon shoots projectiles
|
|
F_AMMOOB, // what object this weapon fires
|
|
F_RANGE, // range of projectile firing weapon
|
|
F_FLAMESTRIKE, // causes fires where you hit
|
|
F_BALANCE, // heals target if their maxhp < your maxhp
|
|
F_REVENGE, // causes damage based on your hp
|
|
F_HELPSREST, // makes you heal mp/hp faster when using 'R'
|
|
// reduces skillcheck difficulty by v0.
|
|
// optional v1 = how many less turns between
|
|
// skillchecks. should not go more than
|
|
// DEFAULTRESTHEALTIME.
|
|
// 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
|
|
//
|
|
F_POWDER, // this item is a powder
|
|
// ob appearance flags
|
|
F_SHINY,
|
|
// armour flags
|
|
F_ARMOURRATING, // val0 * 2 = pct of damage reduced
|
|
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
|
|
F_NODIECONVERTTEXT, // don't anounce when this object changes
|
|
// misc flags
|
|
F_LINKOB, // val0 = linked object id
|
|
F_LINKRACE, // val0 = linked race id
|
|
// scroll flags
|
|
F_LINKSPELL, // val0 = spell this scroll will cast when read
|
|
// v1 = spell power
|
|
// book flags
|
|
F_MANUALOF, // val0 = spellschool this book trains
|
|
// ob identification flags
|
|
F_HASHIDDENNAME, // whether this object class has a hidden name
|
|
F_IDENTIFIED, // whether this object is fully identified
|
|
// bad flags
|
|
F_DEEPWATER, // v0 = depth.oooooooooooo
|
|
F_WALKDAM, // val0 = damtype, text = dam per sec
|
|
F_WALKDAMBP, // v0 = bodypart, v1 = damtype, text = dam per sec
|
|
// if v2 == FALLTHRU, damage falls through to lf if
|
|
// no armour is there.
|
|
// abilities
|
|
F_NEEDSGRAB, // this ability needs to to grab someone first.
|
|
F_NOANNOUNCE, // don't announce when you gain/lose this ability
|
|
// magic
|
|
F_SPELLSCHOOL, // val0 = SPELLSCHOOL enum
|
|
F_SPELLLEVEL, // val0 = difficulty level of spell
|
|
F_VARPOWER, // can cast this spell at variable power level
|
|
// for spells with this flag, the MP cost goes up
|
|
// based on the power level.
|
|
F_MAXPOWER, // val0 = max power of this spell (1-10)
|
|
F_MPCOST, // v0=mp cost of spell. if missing, mpcost if splev^2
|
|
F_ONGOING, // this spell has an ongoing cost
|
|
//F_SPELLLETTER, // text[0] = letter to cast this spell
|
|
F_AICASTTOFLEE, // AI can cast this spell to help flee/heal
|
|
// v0 is who to target
|
|
F_AICASTTOATTACK, // AI can cast this spell to attack
|
|
// v0 is who to target
|
|
F_AIBOOSTITEM, // ai will use this item to boost/buff itself.
|
|
// if using this on wands, update aiobok() !
|
|
F_AIHEALITEM, // ai will use this item when low on hp
|
|
F_AIFLEEITEM, // ai will use this item when fleeing
|
|
// if using this on wands, update aiobok() !
|
|
// object _AND_ lifeform flags
|
|
F_NOSTRDAMMOD, // this object/lf does not have attacks modified
|
|
// using their strength
|
|
// player only flags
|
|
F_DONEDARKMSG, // tells the game not to say 'it is very dark here'
|
|
F_DONELISTEN, // supress further 'you hear xx' messages this turn.
|
|
// lifeform flags / lf flags
|
|
F_COUNTER, // generic counter flag for race abilities.
|
|
F_DEBUG, // debugging enabled
|
|
F_ACCURACYMOD, // modify your accuracy by val0
|
|
F_VEGETARIAN, // this lf will not eat meat.
|
|
F_PARTVEGETARIAN,// this lf will only eat if hunger >= 'hungry'
|
|
F_CARNIVORE, // this lf will only eat meat.
|
|
F_SHIELDPENALTY, // lower your accuracy by val0 due to a cumbersome
|
|
// shield
|
|
F_LEVRACE, // at level v0, this race is promoted to race v1
|
|
// must apply this to the BASE race.
|
|
F_ATTRMOD, // modify attribute val0 by val1. ie. 0=A_STR,1=-3
|
|
F_ATTRSET, // forces attribute val0 to be val1. ie. 0=A_STR,1=18
|
|
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
|
|
F_RESTHEALMPAMT, // val0 = how many MP to gain after resting x turns
|
|
F_HOMEOB, // when this monster is auto generated on a level, place
|
|
// this object underneath them.
|
|
// text = object name
|
|
F_HOMELEVOB, // when this monster is auto generated on a level, place
|
|
// between v0 and v1 objects of type 'text' somewhere on
|
|
// the level.
|
|
F_SNEAK, // moving slowly on purpose to avoid slipping.
|
|
F_AUTOCMD, // val0 = how many times to repeat this
|
|
F_LASTCMD, // text[0] = last command performed, v0/1 = x/y of cell, v2=various
|
|
F_CANLEARN, // lf is able to learn skill val0
|
|
F_STARTOB, // val0 = %chance of starting with it, text = ob name
|
|
// val1,2 = min/max amounts. if NA, min=max=1.
|
|
F_STARTSKILL, // val0 = skill id
|
|
F_STARTOBDT, // val0 = %chance of starting with damtype val1
|
|
F_STARTOBCLASS, // val0 = %chance of starting with obclass val1
|
|
// option val2 = addition to map depth for rarity
|
|
// calculation
|
|
F_STARTJOB, // val0 = %chance of starting with it, v1 = jobid
|
|
F_STARTATT, // val0 = A_xxx, val0 = start bracket (ie. IQ_GENIUS)
|
|
F_STARTHIDDENPCT, // val0 = pct chance auto-generated monster will
|
|
// start off hidden
|
|
F_CORPSETYPE, // text field specifies what corpse obtype to leave
|
|
F_CORPSEFLAG, // add flag v0 to our corpse.
|
|
// v1->v0, v2->v1, text->text
|
|
F_MYCORPSE, // text field contains obid of my corpse.
|
|
// (for ghosts)
|
|
F_NOCORPSE, // monster's body crumbles to dust after death
|
|
F_LFSUFFIX, // text = suffix. eg. "skeleton"
|
|
F_VISRANGE, // how far you can see (in the light)
|
|
F_VISRANGEMOD, // modifications to visrange
|
|
F_GUNTARGET, // current projectile weapon target
|
|
F_CASTINGSPELL, // set while the player is casting a spell
|
|
// v0 is spell id
|
|
F_AVOIDCURSEDOB, // for AI animals - they will avoid walking on obid 'text'
|
|
// (text is a long)
|
|
// ABILITY/SPELL FLAGS / ability flags / spell flags
|
|
F_FAILEDINSPECT, // lf has failed an inspect check for item id v0
|
|
F_BOOSTSPELL, // v0 is active boost spell, v1 is ongoing mpcost, v2 is power
|
|
F_SWOOPRANGE, // v0 = how far a flying creature can swoop
|
|
F_LOSLOF, // v0 = whether this spell needs line of sight
|
|
// v1 = whether this spell needs line of fire
|
|
// MONSTER AI FLAGS
|
|
F_DEMANDSBRIBE, // lf will demand gold from the player.
|
|
F_NOSWAP, // other mosnters won't swap with this one.
|
|
// cleared at start of turn.
|
|
F_VARLEVEL, // lf is generated with random level between
|
|
// 1 and its map dificulty/depth.
|
|
// if v0 is set, this is the max level.
|
|
F_MINION, // v0=lfid of minion
|
|
F_XPVAL, // force xp val for killing this lf to v0
|
|
// ...OR if applied to an ability...
|
|
// monsters with this abil/spell are worth
|
|
// v0 more xp.
|
|
F_XPMULTIPLY, // multiply xp val for killing this lf by v0
|
|
F_NOJOBTEXT, // this lf's name is 'a xxx', not 'a xxx wizard' etc
|
|
F_LASTDIR, // this is the last direction we moved.
|
|
//F_OWNERLASTDIR, // for pets, this it the last dir our owner moved
|
|
// when we could see them.
|
|
F_PETOF, // this lf is a pet of lfid v0
|
|
// v1/2 = last known location of my owner.
|
|
// optional text is last known movement dir.
|
|
F_SUMMONEDBY, // this lf was summoned by lfid v0. if they die, we
|
|
// vanish.
|
|
// v1 is lifetime left. this decrements each turn.
|
|
// when at zero, lf vanishes.
|
|
F_HATESRACE, // lf will attack lfs with race=v0 or baseid=v0 on
|
|
// sight
|
|
F_HARMLESS, // it is safe to rest around this lf
|
|
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
|
|
F_FLEEONHPPCT, // lf will run away if its hp drop to v0% or lower
|
|
F_NOFLEE, // lf will not run away
|
|
F_ATTACKRANGE, // v0/v1 = min/max celldist to stay away
|
|
// from f_targetlf (ie. lf we are attacking)
|
|
F_TARGETLF, // lf will attack lfid v0. lastknown x/y is v1/v2
|
|
// optional text is last known movement dir.
|
|
F_IGNORECELL, // won't accept targetcells of v0=x v1=y
|
|
// this is cleared at start of turn.
|
|
F_TARGETCELL, // lf will go towards this place. val0=x,val1=y
|
|
// optional: v2 = mr_lf or mr_ob. text=lf or ob id.
|
|
F_STABBEDBY, // lf has been stabbed by lfid v0. can't be stabbed
|
|
// by them again until they go out of sight.
|
|
F_FLEEFROM, // lf will run away from this lf id
|
|
F_NOFLEEFROM, // lf can not get f_fleefrom lfid v0
|
|
|
|
// TEMP FLAGS
|
|
F_KILLEDBYPLAYER, // did the player kill this lf?
|
|
// monster noise flags
|
|
F_NOISETEXT, // val0 is a enum NOISETYPE
|
|
// val1 is the volume of the noise
|
|
// text is "verb^noun"
|
|
// eg. "shouts^a shout"
|
|
F_SPELLCASTTEXT, // text is announcement for spellcast
|
|
// if text is empty, then don't announce
|
|
// this lf's spell casting at all.
|
|
F_NODEATHANNOUNCE, // don't say 'the xx dies' if this lf dies
|
|
F_BEHEADED, // use special corpse drop code
|
|
F_SILENTMOVE, // lf makes no noise when walking/flying
|
|
F_MOVESPEED, // override default move speed
|
|
F_ACTIONSPEED, // override default action speed
|
|
F_SPELLSPEED, // override default spellcast speed (ie. movespeed)
|
|
F_RARITY, // val[0] = habitat, val[1] = rarity
|
|
F_NUMAPPEAR, // when randomly appearing, can have > 1. val[0] = min, val[1] = max
|
|
F_MINIONS, // val0 % chance of appearing with v1-v2 lf of type text
|
|
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
|
|
F_XPMOD, // add/subtract this much from calculated xpval
|
|
F_BLOODOB, // text = type of object to drop for blood
|
|
F_DIESPLATTER, // this lf will splatter objcets of type 'text'
|
|
// when it dies.
|
|
// v0 = max distance to splatter (or UNLIMITED)
|
|
// text = type of object to splatter
|
|
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
|
|
F_SHORTCUT, // spell keyboard shortcut.
|
|
// v0=slot (0-9)
|
|
// text=spell text
|
|
// for monsters
|
|
F_DOESNTMOVE, // this race doesn't move (but can still attack)
|
|
F_AQUATIC, // this race can attack normally in water and suffers no
|
|
// movement penalties
|
|
F_HUMANOID, // this race can wear armour / use weapons
|
|
F_INSECT, // this race is classed as an insect
|
|
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
|
|
F_POISONOUS, // lf's corpse will be poisonous
|
|
F_AUTOCREATEOB, // produces obtype 'text' wherever it walks, v0=radius
|
|
// (only if ob of that type not already there)
|
|
F_PACKATTACK, // deal v0 extra damage of type v1 if there are
|
|
// v2 or more monsters of the same baseid
|
|
// next to the attacker
|
|
F_PHALANX, // gain v0 AR if v2 or more adj monsters matching f->text
|
|
F_MORALE, // gain +v0 in morale checks.
|
|
F_SPOTTED, // you have spotted hiding lf id v0
|
|
// INTRINSICS
|
|
F_MAGICARMOUR,// armour is magically boosted. f->text is the description
|
|
// ie 'magic armour', 'force field'
|
|
// v0 is power left.
|
|
F_ASLEEP, // is asleep. if v2 is set, means we are sleeping on
|
|
// purpose and will wake up when at full hp/mp/etc.
|
|
F_ATTACHEDTO, // you are attached to lf id v0, and will move with it
|
|
F_BEINGSTONED,// turn to stone when v0 drops to zero. (drops 1/turn)
|
|
F_BLIND, // cannot see anything
|
|
F_DEAF, // cannot hear
|
|
F_NEEDOBFORSPELLS, // lf can only cast spells if it has object v0
|
|
F_CANCAST, // can cast the spell val0 (need MP)
|
|
F_CANHEARLF, // you can hear lifeform id v0 (show their glyph)
|
|
// this flag does not get announced.
|
|
F_BLEEDABIL, // will automatically use the ability v0 when
|
|
// this lf starts bleeding.
|
|
F_BREATHWATER, // can breath normally underwater
|
|
F_CANWILL, // can cast the spell/ability val0 without using MP
|
|
// v1 is counter untiluse
|
|
// v2 is what you need to use it
|
|
// ie. when v1 == v2, ability is ready.
|
|
// text is other options, semicolon seperated:
|
|
// pw:xx; cast the spell at power xx
|
|
// dam:xdy+b; damage
|
|
// needgrab:xx; do you need to grab first?
|
|
// range:xx;
|
|
F_CHARMEDBY,// you've been charmed by lf id v0
|
|
F_CONTROL,// you control polymorphs, teleports and createmonsters
|
|
F_DETECTAURAS, // autodetect bless/curse
|
|
F_DETECTLIFE, // autodetect nearby lifeforms in orthogonal dist v0
|
|
// if v1 is true, actual lf glyphs are shown.
|
|
// otherwise just an indicative size is shown
|
|
F_DETECTMAGIC, // autodetect magic/special objects
|
|
F_DETECTMETAL, // autodetect nearby metal
|
|
F_DETECTOBS, // autodetect nearby obs in orthog dist v0
|
|
F_DRUNK, // v1 is drunknness - 1-5.
|
|
F_ENHANCESEARCH, // gives v0 bonus on search checks.
|
|
F_ENHANCESMELL, // can 'see' scents.
|
|
F_EXTRADAM, // do 'text' extra damage of damtype v0 when you hit
|
|
// if v1 is TRUE, also deal extra damage based on
|
|
// the flagpile's F_BONUS flag.
|
|
F_EXTRAINFO, // knows extra info
|
|
F_EXTRALUCK, // lf gets +v0 to all skill checks!
|
|
F_EXTRAMP, // lf has +v0 % extra maxmp
|
|
F_FLYING, // lf is flying
|
|
F_FASTACT, // modifier for action speed
|
|
F_FASTMETAB, // hunger counter increases faster, poison cures faster.
|
|
// v0 is multiplier.
|
|
F_FASTMOVE, // modifier for move speed
|
|
F_FASTACTMOVE, // modifier for action and move speed
|
|
F_POISONED, // has poisoning. v0 = poison type,
|
|
// v1 = power
|
|
// text = what from.eg'a bad egg'
|
|
F_FREEZINGTOUCH,// next thing touched turns to ice!
|
|
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
|
|
F_HIDING, // lifeform is hiding. v0 is modifier to stealth checks.
|
|
F_INVISIBLE, // lifeform is invisible
|
|
F_INVULNERABLE,// immune to most damage
|
|
// this can apply to objects too!
|
|
F_QUICKBITE, // deals v0 d d1 + d2 damage when you hit a bleeding victim
|
|
// (bypasses armour)
|
|
F_GRAVBOOSTED,// cannot walk or throw stuff
|
|
F_NEEDSWATER, // cannot survive out of deep water
|
|
F_PAIN, // take damage if you walk. v0=damtype,text is damage (xdy+z).
|
|
// if text not set, default dam is 1d2
|
|
F_PARALYZED,// cannot do anything
|
|
F_PRONE, // lying on the ground
|
|
F_FROZEN, // made of ice
|
|
F_LEVITATING, // like flying but uncontrolled
|
|
F_MAGSHIELD,// magnetic shield
|
|
F_NAUSEATED, // lf has a stench penalty of v0 (-v0*10 to hit).
|
|
F_NONCORPOREAL,// can walk through walls
|
|
// when this comes from the passwall spell, 'obfrom'
|
|
// be set to the ot_s_passwall.
|
|
F_OMNIPOTENT, // knows extra info
|
|
F_PHOTOMEM, // you don't forget your surroundings
|
|
F_REGENERATES, // regenerate HP at val0 per turn
|
|
F_RESISTMAG, // immunity to magic effects. v0=amt (1-20)
|
|
F_MPREGEN, // regenerate MP at val0 per turn
|
|
F_RAGE, // you are enraged. v0/v1 will be set to player's old hp/maxhp
|
|
F_RETALIATE, // deal damage to anyone who hits you
|
|
// v0=ndice, v1=dsides, v2=damtype, text=obname
|
|
// text must have at least TWO words
|
|
F_RISEASGHOST, // become a ghost when you die.
|
|
F_SEEINDARK, // nightvis range is val0
|
|
F_TREMORSENSE, // doesn't need eyes to see, can see in dark with v0
|
|
F_SEEINVIS, // can see invisible things
|
|
F_STABILITY, // doesn't slip over
|
|
F_STENCH, // creatures within v0 gain f_nauseated = v1
|
|
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!
|
|
F_SLOWACT, // modifier for action speed
|
|
F_SLOWMOVE, // modifier for move speed
|
|
F_SLOWACTMOVE, // modifier for move and action speed
|
|
F_XRAYVIS, //val0=num of walls we can see through
|
|
F_CANSEETHROUGHMAT, //val0=kind of material you can see through
|
|
F_SPRINTING, // v0=true: you are sprinting. false=you are tired
|
|
F_TIRED, // you are too tired to sprint, rage, etc
|
|
F_WINDSHIELD,// has a windshield protecting against missiles of speed
|
|
// v0 or lower.
|
|
F_DODGES, // you dodge missed attacks
|
|
F_NOTIME, // this lf's actions don't take time
|
|
F_PERCEPTION, // v0 = 0-20. perception level.
|
|
// skills
|
|
F_HASSKILL, // lf has skill v0 at level v1
|
|
F_PRACTICINGSKILL, // lf is pract skill v0
|
|
// COMBAT
|
|
F_MAXATTACKS, // v0 = max # attacks this lf can make per round
|
|
F_HASATTACK, // v0 = obid to use when attacking unarmed
|
|
// if text is set, it overrides the damage
|
|
F_EVASION, // % chance of evading an attack
|
|
|
|
// healing/resting/training
|
|
F_HASNEWLEVEL, // we have a new xp lev, but haven't trained yet.
|
|
F_STATGAINREADY, // ready to increase str/int etc. v2 is how many times
|
|
// we can do it.
|
|
F_INTERRUPTED, // somethign interrupted our rest. stop!
|
|
F_EATING, // lf is eating obid v0
|
|
F_TRAINING, // are we training? cleared on any action other than rest.
|
|
// v2 = if not NA, it is the training counter.
|
|
// when it hits 0, you finish trainign.
|
|
F_RESTUNTILHP, // resting until we have full hp
|
|
F_RESTUNTILMP, // resting until we have full mp
|
|
F_RESTUNTILALLIES, // resting until allies have full hp
|
|
//
|
|
F_RUNNING, // are we running?
|
|
// nutrition
|
|
F_HUNGER, // val0 = hunger, higher = hungrier
|
|
|
|
// for jobs
|
|
F_HASPET, // this job starts with a pet of race f->text
|
|
F_IFPCT, // only add the NEXT job flag if rnd(1,100) <= v0.
|
|
F_ELSE,
|
|
F_IFPLAYER,
|
|
F_IFMONSTER,
|
|
F_ENDIFPLAYER,
|
|
F_ENDIFMONSTER,
|
|
F_LEVSKILL, // at level v0, this job gains 1 point in skill v1
|
|
F_LEVABIL, // at level v0, this job gains f_canwill v1.
|
|
// v2 = how often you can do it (or NA for unlimited)
|
|
// text = options
|
|
F_LEVSPELL, // at level v0, this job gains f_cancast v1.
|
|
F_LEVSPELLSCHOOL, // at level v0, this job gains f_cancast for a spell
|
|
// of their choice from school v1. if v1 is SS_NONE, they can
|
|
// pick form any school they are skilled in.
|
|
// if v0 is >100, this triggers every (v0-100) levels.
|
|
F_LEVFLAG, // at level v0, this job gains flagid v1, flagval0=v2,
|
|
// flagtext = text
|
|
|
|
//
|
|
F_NULL = -1
|
|
};
|
|
|
|
// move reasons
|
|
enum MOVEREASON {
|
|
MR_OTHER,
|
|
MR_LF,
|
|
MR_OB,
|
|
};
|
|
|
|
|
|
// 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
|
|
};
|
|
|
|
// probabilities
|
|
//#define CH_DEADENDOB 35
|
|
//#define CH_EMPTYCELLOB 3
|
|
#define CH_PILLAR 5
|
|
|
|
|
|
// Booleans
|
|
#define B_FALSE (0)
|
|
#define B_TRUE (-1)
|
|
|
|
#define B_DONTKILL (-1)
|
|
|
|
#define FALLTHRU (-8765)
|
|
|
|
//#define B_TEMP (-1)
|
|
//#define B_PERM (-2)
|
|
//#define B_NOT (-3)
|
|
|
|
enum LIGHTLEV {
|
|
L_PERMDARK = -1,
|
|
L_NOTLIT = 0,
|
|
L_TEMP = 1,
|
|
L_PERMLIGHT = 2,
|
|
};
|
|
|
|
|
|
// 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
|
|
};
|
|
|
|
|
|
#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)
|
|
|
|
#define B_UNKNOWN (0)
|
|
#define B_KNOWN (-1)
|
|
#define B_TRIED (1)
|
|
|
|
#define B_NOBADMOVES (0)
|
|
#define B_BADMOVESOK (1)
|
|
|
|
#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)
|
|
|
|
#define B_ALLOWEXPAND (-1)
|
|
#define B_NOEXPAND (0)
|
|
|
|
#define B_IFACTIVATED (-1)
|
|
|
|
#define B_BIG (-1)
|
|
|
|
// errors
|
|
enum ERROR {
|
|
E_OK = 0,
|
|
E_WALLINWAY = 1,
|
|
E_LFINWAY = 2,
|
|
E_NOSPACE = 3,
|
|
E_SELNOTHING = 4,
|
|
E_ALREADYUSING = 5,
|
|
E_WEARINGSOMETHINGELSE = 6,
|
|
E_NOUNARMEDATTACK = 7,
|
|
E_NOTEQUIPPED = 8,
|
|
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,
|
|
E_AVOIDOB = 28,
|
|
E_FROZEN = 29,
|
|
E_TOOBIG = 30,
|
|
E_NOTREADY = 31,
|
|
E_BLIND = 32,
|
|
E_GRABBEDBY = 33,
|
|
E_CANTMOVE = 34,
|
|
E_NOTKNOWN = 35,
|
|
E_TOOPOWERFUL = 36,
|
|
E_NEEDGRAB = 37,
|
|
E_DOORINWAY = 38,
|
|
E_NOCANNIBUL = 39,
|
|
E_LOWCON = 40,
|
|
E_LOWDEX = 41,
|
|
E_LOWIQ = 42,
|
|
E_LOWSTR = 43,
|
|
E_WONT = 44,
|
|
E_OFFMAP = 45,
|
|
// charm failure reasons
|
|
// LOWIQ = 42
|
|
E_UNDEAD = 46,
|
|
E_DRUNK = 47,
|
|
//
|
|
E_NOBP = 48,
|
|
E_VEGETARIAN = 49,
|
|
E_PARTVEGETARIAN = 50,
|
|
E_CARNIVORE = 51,
|
|
E_NOOB = 52,
|
|
E_LEVITATING = 53,
|
|
E_PRONE = 54,
|
|
E_PENTAGRAM = 55,
|
|
E_SWIMMING = 56,
|
|
E_DANGEROUS = 57,
|
|
};
|
|
|
|
|
|
enum COMMAND {
|
|
CMD_AIM,
|
|
CMD_CLOSE,
|
|
CMD_COMMS,
|
|
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,
|
|
CMD_MEMMAGIC,
|
|
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_THROW,
|
|
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;
|
|
|
|
#define RG_WORLDMAP 0
|
|
#define RG_FIRSTDUNGEON 1
|
|
|
|
typedef struct map_s {
|
|
int id;
|
|
int region;
|
|
int depth;
|
|
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_MAP]; // which map is in each direction
|
|
int beingcreated;
|
|
|
|
struct lifeform_s *lf,*lastlf;
|
|
|
|
struct flagpile_s *flags;
|
|
|
|
struct map_s *next, *prev;
|
|
} map_t; //////////////// remember to modify save/load for new props!!
|
|
|
|
typedef struct glyph_s {
|
|
int ch;
|
|
int colour;
|
|
} glyph_t;
|
|
|
|
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;
|
|
enum LIGHTLEV lit;
|
|
enum LIGHTLEV origlit; // for timed light
|
|
enum LIGHTLEV lastlit;
|
|
int origlittimer;
|
|
int littimer;
|
|
|
|
char *writing;
|
|
|
|
// lifeform pile
|
|
struct lifeform_s *lf;
|
|
// known to player?
|
|
int known;
|
|
struct glyph_s knownglyph;
|
|
|
|
// FOR CONSTRUCTION
|
|
int visited;
|
|
} cell_t;
|
|
|
|
typedef struct celltype_s {
|
|
int id; // eg. dungeonfloor, wall, door
|
|
struct glyph_s glyph;
|
|
/*
|
|
char glyph; // how to display it
|
|
int colour; // which colour?
|
|
*/
|
|
char *name; // name of cell type
|
|
int solid; // can you walk through it?
|
|
int transparent; // can you see through it?
|
|
struct material_s *material;
|
|
|
|
struct flagpile_s *flags;
|
|
|
|
struct celltype_s *next, *prev;
|
|
|
|
} celltype_t;
|
|
|
|
typedef struct raceclass_s {
|
|
enum RACECLASS id;
|
|
char *name;
|
|
char *pluralname;
|
|
enum SKILL skill;
|
|
struct raceclass_s *next, *prev;
|
|
} raceclass_t;
|
|
|
|
typedef struct race_s {
|
|
enum RACE id;
|
|
enum RACE baseid;
|
|
struct raceclass_s *raceclass;
|
|
struct material_s *material;
|
|
char *name;
|
|
struct glyph_s glyph;
|
|
float weight;
|
|
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;
|
|
int level;
|
|
int newlevel;
|
|
long xp;
|
|
int skillpoints;
|
|
int hp,maxhp;
|
|
int mp,maxmp;
|
|
int alive;
|
|
char *lastdam;
|
|
enum DAMTYPE lastdamtype;
|
|
|
|
int timespent;
|
|
int sorted;
|
|
|
|
int att[MAXATTS];
|
|
int baseatt[MAXATTS];
|
|
|
|
float forgettimer;
|
|
|
|
struct obpile_s *pack;
|
|
|
|
struct flagpile_s *flags;
|
|
|
|
int created; // set to TRUE once lf creation is done.
|
|
|
|
int polyrevert; // about to revert form a polymorph?
|
|
|
|
int turnsskipped; // don't need to save this
|
|
|
|
// for loading
|
|
long oblist[MAXPILEOBS];
|
|
int x,y;
|
|
|
|
int nlos;
|
|
cell_t **los;
|
|
|
|
// set to TRUE after lf has being created
|
|
int born;
|
|
|
|
// for ai movement - don't need to save.
|
|
|
|
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 {
|
|
lifeform_t *owner;
|
|
struct object_s *ob;
|
|
struct flag_s *first,*last;
|
|
} flagpile_t;
|
|
|
|
typedef struct flag_s {
|
|
enum FLAG id;
|
|
int nvals;
|
|
int val[3];
|
|
char *text;
|
|
|
|
long obfrom; // for conferred flags, link to object->id. -1 if not conferred.
|
|
|
|
//
|
|
int known;
|
|
int lifetime;
|
|
|
|
struct flagpile_s *pile;
|
|
struct flag_s *next, *prev;
|
|
} flag_t;
|
|
|
|
typedef struct material_s {
|
|
enum MATERIAL id;
|
|
char *name;
|
|
float weightrating;
|
|
struct flagpile_s *flags;
|
|
struct material_s *next,*prev;
|
|
} material_t;
|
|
|
|
|
|
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;
|
|
|
|
|
|
typedef struct knowledge_s {
|
|
enum OBTYPE id;
|
|
char *hiddenname;
|
|
int known;
|
|
struct knowledge_s *next, *prev;
|
|
} knowledge_t;
|
|
|
|
typedef struct job_s {
|
|
enum JOB id;
|
|
char *name;
|
|
flagpile_t *flags;
|
|
struct job_s *next, *prev;
|
|
} job_t;
|
|
|
|
typedef struct objectclass_s {
|
|
enum OBCLASS id;
|
|
char *name;
|
|
char *desc;
|
|
glyph_t glyph;
|
|
struct flagpile_s *flags;
|
|
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
|
|
long birthtime;
|
|
flagpile_t *flags;
|
|
|
|
struct object_s *next, *prev;
|
|
} object_t;
|
|
|
|
// wetness
|
|
enum WETNESS {
|
|
W_DRY = 0,
|
|
W_DAMP = 1,
|
|
W_WET = 2,
|
|
W_SOAKED = 3,
|
|
};
|
|
enum RUSTINESS {
|
|
R_RUSTY = 1,
|
|
R_VRUSTY = 2,
|
|
R_TRUSTY = 3,
|
|
};
|
|
|
|
enum OBMOD {
|
|
OM_BLOODSTAINED,
|
|
OM_FLAMING,
|
|
OM_FROZEN,
|
|
OM_HEADLESS,
|
|
OM_MASTERWORK,
|
|
OM_POISONED,
|
|
OM_SHODDY,
|
|
OM_WET1,
|
|
OM_WET2,
|
|
OM_WET3,
|
|
OM_RUSTY1,
|
|
OM_RUSTY2,
|
|
OM_RUSTY3,
|
|
};
|
|
#define MAXOBMODS 4
|
|
|
|
enum BRAND {
|
|
BR_BALANCE,
|
|
BR_NIMBLENESS,
|
|
BR_FEEBLENESS,
|
|
BR_FLIGHT,
|
|
BR_GIANTSTRENGTH,
|
|
BR_HEALTH,
|
|
BR_IMPACT,
|
|
BR_THINKING,
|
|
BR_KNOWLEDGE,
|
|
BR_LEVITATION,
|
|
BR_FEATHERFALL,
|
|
BR_ANTIMAG,
|
|
BR_CONCEALMENT,
|
|
BR_SHARPNESS,
|
|
BR_PYROMANIA,
|
|
BR_REVENGE,
|
|
BR_SHADOWS,
|
|
BR_SLOTH,
|
|
BR_SPEED,
|
|
BR_POWER,
|
|
BR_SWIFTNESS,
|
|
BR_TELEKINESIS,
|
|
BR_TELEPATHY,
|
|
BR_WEAKNESS,
|
|
};
|
|
|
|
typedef struct brand_s {
|
|
enum BRAND id;
|
|
char *description;
|
|
char *suffix;
|
|
flagpile_t *flags;
|
|
enum BODYPART bp;
|
|
struct brand_s *next, *prev;
|
|
} brand_t;
|
|
|
|
typedef struct obmod_s {
|
|
enum OBMOD id;
|
|
char *prefix;
|
|
flagpile_t *flags;
|
|
struct obmod_s *next, *prev;
|
|
} obmod_t;
|
|
|
|
typedef struct choice_s {
|
|
char ch;
|
|
char *text;
|
|
char *desc;
|
|
void *data;
|
|
int heading;
|
|
int valid; // used in askchoicestr
|
|
} choice_t;
|
|
|
|
|
|
#define MAXPROMPTQUESTIONS 5
|
|
typedef struct prompt_s {
|
|
char *q[MAXPROMPTQUESTIONS];
|
|
int nqs;
|
|
int whichq;
|
|
void *result;
|
|
choice_t choice[MAXCHOICES];
|
|
int selection;
|
|
int nchoices;
|
|
int maycancel;
|
|
} prompt_t;
|
|
|
|
|
|
#endif
|
|
|