nexus/defs.h

5555 lines
138 KiB
C

#ifndef __DEFS_H
#define __DEFS_H
//#include "findleak.h"
// MACROS
#define MAXOF(a,b) (a > b ? a : b)
#define MINOF(a,b) (a < b ? a : b)
#define OB1(o,one,many) (o->amt == 1) ? one : many
#define OBS1(o) (o->amt == 1) ? "s" : ""
#define OBNOS1(o) (o->amt == 1) ? "" : "s"
#define ISINRANGE(a,min,max) ((a >= min) && (a <= max))
// #define PRACTICETIME 15 // #attempts it takes to learn new weapon skill
// how much your str/agi/etc goes up every few levels
#define STATAMTPERLEVEL 5
// Probabilities
#define ONEIN_FOUNTAINDRYUP 3
#define PCTCH_PILLAR 5
// skill check difficulty
#define D_ALWAYSFAIL -99
#define D_BADFEELING 120
// how many blood splashes you need before you
// can fill a flask with it.
#define BLOODFORPOT 2
#define TEMPVAULTLOCK "temporary vaultcell lock"
// Text
#define TEXT_WARN_ATTACK_NOXP "You will not gain experience until you train. Really attack?"
#define TEXT_WARN_CLIMB "Really attempt to climb without Climbing skill?"
#define TEXT_WARN_FLY "Warning: while airborne you will not map your surroundings."
#define TEXT_WARN_MUTABLE "(you can now gain attributes by eating corpses)"
#define TEXT_WARN_NOXP_GOODVSPEACEFUL "Warning: Only Evil players gain XP for peaceful kills."
// F_SCOREBONUS text args
#define SCB_DONATIONS "charitable donations"
// Defaults
#define DEF_AIFOLLOWTIME (20) // if target lf is out of view
#define DEF_BURNTIMEMIN (3)
#define DEF_BURNTIMEMAX (6)
// for this many turns, abandon chase
//#define DEF_ANIMDELAY (1000000 / 50) // 1/100 of a second
#define DEF_ANIMDELAY (1000000 / 25) // 1/50 of a second
#define DEF_RESTHEALTIME (3)
#define DEF_SCREENW 80
#define DEF_SCREENH 24
#define DEF_RAGETIME 10
//#define DEF_SHOPIDENTPRICE (50) // cost to identify a just-purchased item
#define DEF_VAULTMARGIN (3)
#define DEF_VISRANGE (9)
// Map building defaults
#define DEF_LOOPPCT 95
//#define DEF_SPARSENESS 25
#define DEF_SPARSENESS 35
//#define DEF_TURNPCT 40
#define DEF_TURNPCT 30
#define DEF_WINDOWPCT 5
#define DEF_WARNINGTIME 20
// lifeform defaults
#define DEF_HITDICE "1d4"
// unicode chars
#define UNI_DYNAMIC 0x2500 // use surrounding cells and box chars
#define UNI_FOUNTAIN 0x26F2
#define UNI_SOLID 0x2588
#define UNI_SHADELIGHT 0x2591
#define UNI_SHADEMED 0x2592
#define UNI_SHADEDARK 0x2593
#define UNI_SPIRAL 0x2202
#define UNI_SUN 0x203B
#define UNI_SWARM 0x2026
#define UNI_CHAIR 0x2441
#define UNI_CLOUD 0x203B
//#define UNI_SOLID '#'
#define UNI_HOUSE 0x2302
#define UNI_PI 0x03C0
#define UNI_TUNNEL 0x2126
#define UNI_TREELOTS 0x2051
#define UNI_TREE 0x2042
// getrandomemptycell() params
/*
#define WE_NONE 0
#define WE_WALKABLE 1
#define WE_EMPTY 2
#define WE_PORTAL 3
#define WE_NOTWALL 4
#define WE_NOLF 5
#define WE_SOLID 6
*/
// Booleans
#define B_FALSE (0)
#define B_TRUE (-1)
#define B_MAYBE (-2)
#define B_ONEOF (-3)
#define B_FROMCRIT (-1)
#define B_NOCRIT (0)
#define B_BLINDABLE (-1)
#define B_ALLOWEXTRA (-1)
#define B_NOEXTRA (0)
#define B_ADD 1
#define B_REMOVE -1
#define B_INADJCELL (-1)
#define B_DODAM (-1)
#define B_NODAM (0)
#define B_DOANNOUNCE (-1)
#define B_NOANNOUNCE (0)
#define B_NORANGED (0)
#define B_RANGED (-1)
#define B_NOABSORB (0)
#define B_ABSORB (-1)
#define B_ALLOWID (-1)
#define B_NOID (0)
#define B_ALLOWDONATE (-1)
#define B_NODONATE (0)
#define B_ONLYIFARMED (-1)
#define B_INCLUDEDISTANT (-1)
#define B_NODISTANT (0)
#define B_INCLUDECENTRE (-1)
#define B_NOCENTRE (0)
#define B_MAYCHASE (-1)
#define B_NOCHASE (0)
#define B_ONLYEXTERNAL (-1)
#define B_FORCE (-2)
#define B_ONPURPOSE (-1)
#define B_NOTONPURPOSE (0)
#define B_CHANGEDIR (-1)
#define B_NOCHANGEDIR (0)
#define B_VIS (1)
#define B_UNKNOWN (0)
#define B_NOVIS (-1)
#define B_KEEPLOF (-1)
//#define B_MALE (0)
//#define B_FEMALE (-1)
#define B_MAYCHASE (-1)
#define B_NODOORS (0)
#define B_DONTKILL (-1)
#define B_APPENDYOU (-1)
#define B_SPLATTER (-1)
#define B_NOSPLATTER (0)
#define B_FROMINJURY (-2)
#define B_KEEPDIR (-2)
#define B_VERT (0)
#define B_HORZ (1)
#define B_MELEEONLY (-1)
//#define B_TEMP (-1)
//#define B_PERM (-2)
//#define B_NOT (-3)
#define B_DIEONFAIL (-1)
#define B_BLUNTONFAIL (-2)
#define B_COVETS (-1)
#define B_ANY (0)
#define B_FIRSTONE (0)
#define B_ANYONE (-1)
#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 NOOB (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_ALWAYS (-2)
#define B_IFNOTBLESSED (-3)
#define B_BIG (-1)
// for losehp_real
#define B_DAMADJUST (-1)
#define B_NODAMADJUST (0)
#define B_RETALIATE (-1)
#define B_NORETALIATE (0)
#define B_DAMEFFECTS (-1)
#define B_NODAMEFFECTS (0)
// for real_getobname
#define B_PREMODS (-1)
#define B_NOPREMODS (0)
#define B_CONDITION (-1)
#define B_NOCONDITION (0)
#define B_BLINDADJUST (-1)
#define B_NOBLINDADJUST (0)
#define B_BLESSINGS (-1)
#define B_NOBLESSINGS (0)
#define B_USED (-1)
#define B_NOUSED (0)
#define B_SHOWALL (-1)
#define B_NOSHOWALL (0)
// for real_getlfname
#define B_REALRACE (-1)
#define B_CURRACE (0)
// Limits
// must be >= max # of spells/abilities AND
// >= max # of cells on the map
// >= MAXFLAGS
#define MAXCANDIDATES 2048
#define MAXCHOICES 400
#define MAXDEPTH 25 // max dungeon depth
#define MAXDIR_ORTH 4
#define MAXDIR_COMPASS 8
#define MAXFLAGS 500
#define MAXFOLLOWLFS 15 // max # of lfs who will follow you up/down stairs
#define MAXHISTORY 20 // max lines of history to keep
#define MAX_MAPW 80
#define MAX_MAPH 30
#define MAX_PATHFIND_ADJ (MAX_MAPW*MAX_MAPH*10)
#define MAX_PATHFIND_STEPS (MAX_MAPW*MAX_MAPH)
#define MAX_HITS 100
#define MAXPILEOBS 52
#define MAXRANDOMOBCANDIDATES 100
#define MAXRANDOMLFCANDIDATES 100
#define MAXRETCELLS 80
#define MAXSPELLLEV 6
#define MAXVISRANGE 10 // max visible range in full light
#define MAXVISLIMIT (MAXVISRANGE*20)
//#define MAX_EYEADJ 20
#define MINCLEARINGRADIUS 4
#define MAXCLEARINGRADIUS 7
#define MAX_ATTRIBVAL 100
#define MAXMAPROOMS 80
// note: -1 is treated as zero
#define MINROOMS_WOODS -1
#define MAXROOMS_WOODS 3
#define MINROOMS_DUN 5
#define MAXROOMS_DUN 10
#define MINROOMS 5
#define MAXROOMS 20
//#define MIN_ROOMH 4
//#define MIN_ROOMW 4
#define MIN_ROOMH 5
#define MIN_ROOMW 5
#define MAX_ROOMW (MAX_MAPW / 3)
#define MAX_ROOMH (MAX_MAPH / 3)
#define MIN_TEMPERATURE -10
#define MAX_TEMPERATURE 45
// 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_SPECIFIED -1
#define TT_NONE 0
#define TT_MONSTER 1
#define TT_OBJECT 2
#define TT_DOOR 4
#define TT_PLAYER 8
#define TT_ALLY 16
#define TT_IMPASSABLE 32
// target requirements
#define TR_NONE 0
#define TR_NEEDLOS 1
#define TR_NEEDLOF 2
// CONTROLLERS
#define C_AI 0
#define C_PLAYER 1
// 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
// experience
#define SKILLXPPERPOINT 150
// 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_ULTRAFAST
#define SPEED_PICKUP SP_ULTRAFAST
#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
#define D_ALL -3
#define D_MYSELF -4
// 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
// light dirs
#define D_DARKER 1
#define D_LIGHTER -1
// altitude directions
#define D_UP 12
#define D_DOWN 13
#define D_IN 14
#define MAXDIR_MAP 15
enum CELLADJUSTTYPE {
CA_NONE = 0,
CA_CH,
CA_COL,
CA_BOTH,
};
enum TEMPERATURE {
T_VCOLD = -3,
T_COLD = -2,
T_CHILLY = -1,
T_NORMAL = 0,
T_WARM = 1,
T_HOT = 2,
T_VHOT = 3,
};
enum CONTAINERCONTENTS {
CC_AMMO,
CC_FOOD,
CC_FOODDRINK,
CC_GUNPOWDER,
CC_CONDIMENTS,
CC_CORPSE,
CC_WATER,
};
enum CELLCONDITION {
CC_NONE, //
// CELLS
CC_CELLTYPE, // arg is celltype id
CC_DANGEROUSFOR, // arg is lf id
CC_EMPTY, // no arg
CC_OKFORPORTAL, // no arg
CC_OKFORSTAIRS, // no arg
CC_HASLF, // no arg
CC_HASOBTYPE, // arg is ob id
CC_HASROOMID, // arg is room id
CC_IMPASSABLE, // no arg
CC_ISROOM, // arg is ob id
CC_SOLID, // no arg
CC_WALKABLE, // no arg
CC_WALKABLEFOR, // arg is lfid
// RACES
CC_HASCORPSE, // no arg
// SHARED
CC_HASFLAG, // arg is flagid, races+objects
CC_HASMATERIAL, // arg is material id, cells+objects
CC_HASSIZE, // arg is enum lfsize, races+objects
// OBJECTS/OBTYPES
CC_ARMOUR,
CC_DAMAGED,
CC_DAMTYPE,
CC_DRINKABLE,
CC_EQUIPPED,
CC_EDIBLE,
CC_KNOWN,
CC_IDENTIFIED,
CC_MINAR, // arg
CC_MAXAR, // arg
CC_MINDR, // arg
CC_MAXDR, // arg
CC_MAXSIZE, // arg is max size
CC_OBCLASS,
CC_OPERABLE,
CC_POURABLE,
CC_READABLE,
CC_SPECIFIED, // hard - does retlist contain this ??
CC_WEARABLE,
CC_WEILDABLE,
CC_WEAPON,
CC_WEPSK
};
enum GODBONUS {
GB_DTRESIST, // resist damtype 'arg'
GB_DTIMMUNE, // immune to damtype 'arg'
GB_CANWILL, // canwill spellid 'arg'
// every targ[0] turns.
GB_FLAG, // grant flag 'arg', v0/1/2='text x,x,x'
GB_MAGICBOOST, // set magic boost to arg (special case: you CAN
// have multiple flags from this.)
GB_FIREBODY,
};
enum TIMEPHASE {
TP_SUNRISE, // 6am - 6:59
TP_MORNING, // 7am - 9:59
TP_MORNINGLATE, // 10 - 12
TP_NOON, // 12:00 - 12:59
TP_AFTERNOON, // 1pm - 4:59
TP_DUSK, // 5pm - 5:59
TP_SUNSET, // 6pm - 6:59
TP_EVENING, // 7pm - 9:59, also 'dusk'
TP_NIGHT, // 10pm - 11:59
TP_MIDNIGHT, // 0:00 - 00:59
TP_NIGHTLATE, // 1am - 3:59
TP_DAWN, // 4am - 4:59
TP_TWILIGHTMORN, // 5am - 5:59
};
enum BEHAVIOUR {
BH_NONE = 0,
BH_INSANE,
BH_HUNGRY,
BH_TIMID,
BH_DRUGGED,
BH_DRUNK,
BH_DETERMINED,
BH_LAZY,
BH_MUSCLED,
BH_SCRAWNY,
};
// relative directions
enum RELATIVEDIR {
RD_FORWARDS,
RD_BACKWARDS,
RD_SIDEWAYS,
};
enum REGIONNAMEFORMAT {
RF_SHORT, // %s
RF_WITHLEVEL, // %s (L%d)
RF_LONG, // on level %d of %s
};
enum TURNDIR {
TD_RIGHT,
TD_LEFT
};
enum TRADEINFOTYPE {
TI_SKILL,
TI_SPELL,
};
enum SHOPACTION {
SA_NONE,
SA_BUY,
SA_SELL,
SA_DONATE,
SA_ID,
};
///////////////////////////////////////
// STRINGS
///////////////////////////////////////
// String buffer lengths
#define BUFLENTINY 10
#define BUFLENSMALL 64
#define BUFLEN 256
#define BIGBUFLEN 512
#define HUGEBUFLEN 4092
#define MAXPNAMELEN 12 // max player name length
// file i/o
#define DATADIR "data"
#define SAVEDIR "data"
#define VAULTDIR "data/vaults"
#define BONESDIR "data/bones"
// rank, score, name, job, killer
#define HISCOREFORMAT "%-4s%-7s%-10s%-23s"
// game strings
#define MORESTRING "--More--"
#define MSGMORESTRING "^n--More--"
#define SOLDOUTSTRING "--SOLD OUT--"
// COMMAND CHARACTERS
#define CH_TURN_W (8) // ctrl-h
#define CH_TURN_N (10) // ctrl-j
#define CH_TURN_S (11) // ctrl-k
#define CH_TURN_E (12) // ctrl-l
#define CH_TURN_NW (25) // ctrl-y
#define CH_TURN_NE (21) // ctrl-u
#define CH_TURN_SW (2) // ctrl-b
#define CH_TURN_SE (14) // ctrl-n
#define CH_HISTORY (16) // ctrl-p
#define CH_BREAK (3) // ctrl-c
// SPECIAL NUMBERS/CONSTANTS
#define DUMMYCELLTYPE 0xabcd
#define UNLIMITED (-9876)
#define ALL (-9875)
#define NA (-9874)
#define NOBODY (-1)
#define ALLCONFERRED (-9873)
#define PCT (65432) // must be POSITIVE
#define RANDOM (-2610)
#define AUTO (-7654)
#define HEAVYWEPKG (5)
#define HITDIESIDES (6)
#define B_NEWINJURY (-6654)
// how quickly the game clock increments
// 1 = roughly 30 secs per turn
#define TIMECONST (3)
// hunger constant - this is how many turns
// it will take to go from 'normal' to 'peckish' etc
// ... try to make this roughly 4 hours (check TIMECONST.
#define HUNGERCONST 500
#define STAMREGEN (0.3) // base amount of stamina to regain each turn
#define STAMTOATTACK ((float)STAMREGEN+0.2) // base amount of stamina to attack
// Time periods
#define TM_DRUNKTIME (10) // how long it takes for alcohol to wear off
#define TM_WETTIME (10) // how long it takes for things to dry
#define TM_SCENT (30) // how long scents take to fade
#define TM_FOOTPRINT (35) // how long footprints take to fade
// object conditions for random objects
#define RO_NONE 0
#define RO_DAMTYPE 1
#define RO_OBCLASS 2
#define RO_HOLDABLE 3
// flag lifetimes
#define PERMENANT (-9873)
#define FROMSPELL (-9863)
#define FROMPOISON (-9862)
#define FROMLYCANTHROPY (-9861)
#define FROMGAMESTART (-9860)
#define FROMABIL (-9859)
#define IMPOSSIBLE (9999)
// flag lifetimes - external sources (ie. don't kill them)
#define FROMEXTERNAL_HIGH (-7000)
#define FROMRACE (-7872)
#define FROMJOB (-7871)
#define FROMOBEQUIP (-7870)
#define FROMOBHOLD (-7869)
#define FROMOBACTIVATE (-7868)
#define FROMMAT (-7867)
#define FROMBLESSING (-9866)
#define FROMBRAND (-7865)
#define FROMOBMOD (-7864)
#define FROMSKILL (-7863)
#define FROMGODGIFT (-7862)
#define FROMGODPIETY (-7861)
#define FROMINJURY (-7860)
#define FROMEXTERNAL_LOW (-7999)
#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, f_extradamwithchanges, ect. only does so if object is activated
// Misc constants
#define ANYROOM (-9770)
#define FALLTHRU (-8765) // for walkdambp
#define TICK_INTERVAL (20)
#define DAYSECS (86400) // # seconds in a day
// additional colours
/*
enum ADCOLOR {
COLOR_DARKBROWN = 500,
};
*/
// ncurses colourpairs
#define C_NONE (-1)
enum COLOUR {
C_RANDOM = -1,
// regular colours
C_BLACK = 0,
C_RED = 1,
C_AQUA,
C_GREEN,
C_BROWN,
C_BLUE,
C_INDIGO,
C_MAGENTA,
C_PINK,
C_CYAN,
C_GREY,
C_YELLOW,
C_WHITE,
// specific colours
C_BONE,
C_BRICK,
C_METAL,
C_MOSS,
C_FLESH,
C_FOG,
C_CARPET1,
C_CARPET2,
C_SMOKE,
C_STONE,
C_WOOD,
// dark colours
C_DARKCYAN,
C_DARKBLUE,
C_DARKMAGENTA,
C_DARKYELLOW,
C_ORANGE,
C_DARKGREEN,
C_DARKGREY,
C_DARKBROWN,
C_DARKRED,
C_VDARKGREY,
// light colours
C_LIGHTBLUE,
C_LIGHTBROWN,
C_LIGHTCYAN,
C_LIGHTGREEN,
C_LIGHTMAGENTA,
C_LIGHTRED,
C_LIGHTYELLOW,
C_LIGHTPINK,
C_LAST
};
#define C_FIRST C_RED
#define COLBASE 64
#define BGGAP (C_LAST+1)
#define BLACKBG 0
#define BLUEBG (BGGAP)
#define GREENBG ((BGGAP*2))
#define REDBG ((BGGAP*3))
enum CASTTYPE {
CT_NORMAL = 0,
CT_GAZE,
CT_EYESPIT,
CT_SOUNDBASED,
};
enum DRAINTYPE {
DR_NONE = 0,
DR_FROMBITE,
DR_FROMWEP
};
enum GODANGERREASON {
GA_ATTACKALLY,
GA_ATTACKHELPLESS, // attacked someone who was sleeping etc
GA_ATTACKOBJECT, // attacked or broke an object
GA_ASSAULT, // attacked someone peaceful
GA_COWARD, // acted in a cowardly manner
GA_EAT, // ate something the god doesn't like
GA_HERESY, // blessed or cursed an object
GA_MERCY, // allowed something to flee
GA_MONEY, // paid money to someone
GA_MURDER, // killed someone peaceful
GA_PEACEHOUR, // attacked during glorana's peace
GA_POISON, // used poison
GA_PRAY, // pestering through constant prayer
GA_RACE, // prayed while a hated race.
GA_SPELL, // cast a spell from the wrong school
GA_GODSTONE, // picked up this god's godstone
};
enum NOISECLASS {
NC_NONE = 0,
NC_MOVEMENT = 1,
NC_SPEECH = 2,
NC_FIGHTING = 3,
NC_SPELLEFFECT = 4,
NC_ENVIRONMENTAL = 6,
NC_DANGER = 7,
NC_OTHER = 99,
};
enum QUADRANT {
Q_NONE = -1,
Q_NNE = 0,
Q_ENE = 1,
Q_ESE = 2,
Q_SSE = 3,
Q_SSW = 4,
Q_WSW = 5,
Q_WNW = 6,
Q_NNW = 7,
};
enum SAYPHRASE {
SP_ALLY_ATTACK,
SP_ALLY_ATTACKUNSEEN,
SP_ALLY_INPAIN,
SP_ALLY_TARGETKILL,
SP_BEG,
SP_BEGATTACK,
SP_BEGTHANKS,
SP_CLOSEDTILMORN,
SP_CLOSEDTILNIGHT,
SP_CLOSEDTILTIME,
SP_DIE,
SP_DRUNK,
SP_LIFEOB_DESTROYED,
SP_MERCYACCEPT,
SP_INFO_ACCEPT,
SP_INFO_ASKPRICE,
SP_INFO_REFUSE,
SP_INFO_REFUSE_AGAIN,
SP_INFO_DECLINE_WONTPAY,
SP_PAYWARN,
SP_PAYTHREAT,
SP_PAYTHANKS,
SP_RECRUIT_ACCEPT,
SP_RECRUIT_ASKPRICE,
SP_RECRUIT_DECLINE,
SP_RECRUIT_DECLINE_CANTPAY,
SP_RECRUIT_DECLINE_WONTPAY,
SP_ROBBED,
SP_SORRY,
SP_THANKS,
SP_TOOCLOSE,
SP_TRADEINFO_ACCEPT,
SP_TRADEINFO_CANCEL,
SP_TRADEINFO_DECLINE_ALREADYDONE,
SP_TRADEINFO_DECLINE_OTHERBAD,
SP_TRADEINFO_DECLINE_PLAYERBAD,
};
enum SPEECHVOL {
SV_SILENT = 0,
SV_WHISPER = 1,
SV_TALK = 2,
SV_SHOUT = 3,
SV_CAR = 4,
SV_TRUCK = 5,
SV_PLANE = 6,
};
#define MINVOL SV_SILENT
#define MAXVOL SV_PLANE
enum SKILL {
SK_NONE = 0,
SK_ARMOUR = 1,
SK_ATHLETICS,
SK_BACKSTAB,
SK_CARTOGRAPHY,
SK_CHANNELING,
SK_CLIMBING,
SK_COMBAT,
SK_COOKING,
SK_EVASION,
SK_FIRSTAID,
SK_FLIGHT,
SK_LISTEN,
SK_LOCKPICKING,
SK_METALWORK,
SK_PERCEPTION,
SK_RANGED,
SK_SEWING,
SK_SHIELDS,
SK_SPEECH,
SK_STEALTH,
SK_SWIMMING,
SK_TECHUSAGE,
SK_THIEVERY,
SK_THROWING,
SK_ENGINEERING,
SK_TWOWEAPON,
// knowledge
SK_LORE_ARCANA,
SK_LORE_CHEMISTRY,
SK_LORE_DEMONS,
SK_LORE_DRAGONS,
SK_LORE_HUMANOID,
SK_LORE_LANGUAGE,
SK_LORE_NATURE,
SK_LORE_RELICS,
SK_LORE_UNDEAD,
// weaponry
SK_AXES,
SK_CLUBS,
SK_EXOTICWEPS,
SK_LONGBLADES,
SK_POLEARMS,
SK_SHORTBLADES,
SK_STAVES,
SK_UNARMED,
SK_WHIPS,
// spell schools
SK_SS_ALLOMANCY,
SK_SS_MENTAL,
SK_SS_NATURE,
SK_SS_AIR,
SK_SS_DEATH,
SK_SS_DIVINATION,
SK_SS_FIRE,
SK_SS_COLD,
SK_SS_LIFE,
SK_SS_SUMMONING,
SK_SS_TRANSLOCATION,
SK_SS_WILD,
};
#define MAXSKILLS 57
// 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,
};
#define MAXSKILLLEVEL 7
#define MAXSKILLWILLS (MAXSKILLLEVEL*5)
enum GAMEMODE {
GM_FIRST,
GM_INIT,
GM_VALIDATION,
GM_LOADING,
GM_LOADED,
GM_CHARGEN,
GM_GAMESTARTED,
GM_GAMEOVER,
GM_CLEANUP,
};
enum WINGAMETYPE {
WT_NONE = 0,
WT_GOD,
WT_DEMIGOD,
};
enum ATTRIB {
A_NONE = -1,
A_STR = 0,
A_AGI = 1,
A_WIS = 2,
A_IQ = 3,
A_CON = 4,
A_CHA = 5,
};
#define MAXATTS 6
enum CHECKTYPE {
SC_NONE = 0,
SC_STR,
SC_DEX,
SC_IQ,
SC_CON,
SC_CHA,
SC_WIS,
//////////
SC_CLIMB,
SC_DISARM,
SC_DODGE,
SC_SHIELDBLOCK,
SC_FALL,
SC_SLIP,
SC_LEARNMAGIC,
SC_LISTEN,
SC_MORALE,
SC_OPENLOCKS,
SC_POISON,
SC_RESISTMAG,
SC_SEARCH,
SC_SPEECH,
SC_STEAL,
SC_STEALTH,
SC_TUMBLE,
SC_WILL,
};
enum BURDENED {
BR_NONE = 0,
BR_BURDENED = 1,
BR_STRAINED = 2,
BR_OVERLOADED = 3,
};
enum HELPLESSTYPE {
HL_NONE = 0,
HL_CANTSEE = 1,
HL_FLEEING = 2,
};
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,
};
enum GAINORLOSS {
GL_LOSS = 0,
GL_GAIN = 1,
};
enum FLAGCONDITION {
FC_NOCONDITION = 0,
FC_IFPLAYER,
FC_IFMONSTER,
};
enum MSGCHARCOL {
CC_VBAD,
CC_BAD,
CC_NORMAL,
CC_GOOD,
CC_VGOOD,
};
enum MODTYPE {
M_PCT,
M_VAL,
};
// line of fire args
enum LOFTYPE {
LOF_DONTNEED = 0,
LOF_WALLSTOP = 2,
LOF_LFSSTOP = 4,
LOF_NEED = 6, // walls AND lfs block
};
// Cell types
enum CELLTYPE {
CT_NONE = 0,
// walls
CT_WALL,
CT_WALLBRICK,
CT_WALLDIRT,
CT_WALLFLESH,
CT_WALLGLASS,
CT_WALLICE,
CT_WALLMETAL,
CT_WALLTREE,
CT_WALLWOOD,
CT_WALLDWOOD,
CT_WALLDURANITE,
// empty
CT_CORRIDOR,
CT_MOSSROCK,
CT_DIRT,
CT_VILLAGEGROUND,
CT_FAKE,
CT_FLOORFLESH,
CT_FLOORCARPET,
CT_FLOORDURANITE,
CT_FLOORSHOP,
CT_FLOORSNOW,
CT_FLOORTILE,
CT_FLOORWOOD,
CT_GRASS,
CT_LOOPCORRIDOR,
CT_LOWFLOOR,
CT_VLOWFLOOR,
};
enum SPELLSCHOOL {
SS_NONE,
SS_DIVINE,
SS_ABILITY,
SS_ALLOMANCY,
SS_AIR,
SS_DEATH,
SS_DIVINATION,
SS_FIRE,
SS_COLD,
SS_LIFE,
SS_MENTAL,
SS_NATURE,
SS_SUMMONING,
SS_TRANSLOCATION,
SS_WILD,
SS_LAST,
};
enum ATTRBRACKET {
AT_RANDOM = -99,
AT_EXLOW = -4,
AT_VLOW = -3,
AT_LOW = -2,
AT_LTAVERAGE = -1,
AT_AVERAGE = 0,
AT_GTAVERAGE = 1,
AT_HIGH = 2,
AT_VHIGH = 3,
AT_EXHIGH = 4,
};
#define IQ_MINDLESS AT_EXLOW
#define IQ_ANIMAL AT_VLOW
// 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_SONIC = 26,
DT_HEAT = 27,
DT_NONE = 28, // for direclty dealt damage, not really any type
};
#define MAXDAMTYPE 29
// Object Classes
enum OBCLASS {
OC_NONE,
OC_ABILITY,
OC_AMULET,
OC_ARMOUR,
OC_BOOK,
OC_BUILDING,
OC_CORPSE,
OC_DFEATURE,
OC_EFFECT,
OC_FLORA,
OC_FOOD,
OC_FURNITURE,
OC_GODSTONE,
OC_MISC,
OC_MISSILE,
OC_MONEY,
OC_POTION,
OC_RING,
OC_ROCK,
OC_SCROLL,
OC_TECH,
OC_TERRAIN,
OC_TOOLS,
OC_TRAP,
OC_SPELL,
OC_WAND,
OC_WEAPON,
OC_NULL = -999
};
enum BLESSTYPE {
B_UNCURSED = 0,
B_BLESSED = 1,
B_CURSED = -1
};
#define RARITYVARIANCELF (1)
#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,
RR_NONE = 0,
};
// for genericising weapons, etc
enum GOODNESS {
G_NA = 0,
G_AVERAGE,
G_GOOD,
G_GREAT,
G_EXCELLENT,
};
enum RACECLASS {
RC_ANY, // not actually ever defined
RC_ANIMAL,
RC_AQUATIC,
RC_DEMON,
RC_DRAGON,
RC_GOD,
RC_HUMANOID,
RC_INSECT,
RC_ROBOT,
RC_SLIME,
RC_MAGIC,
RC_OTHER,
RC_PLANT,
RC_UNDEAD,
};
#define R_GODFIRST R_GODPURITY
#define MAXGODS 9
enum RACE {
R_NONE = 0,
R_RANDOM, R_SPECIFIED,
// unique monstesr
R_CLANK,
R_BABAYAGAHUT,
R_BABAYAGA,
R_JAILER,
R_PETE,
R_RATTUS,
R_SEBASTIAN,
// playable races
R_ASHKARI,
R_AVIAD,
R_CYBORG,
R_DWARF,
R_ELF,
R_ELFDARK,
R_HUMAN,
R_MAMMOAN,
R_WYRMSPAWN,
// robots
R_ANDROID,
R_BOTRIOT,
R_BOTSECURITY,
R_DROID,
R_FLAMETURRET,
R_HOVERSCOUT,
// human monsters
R_BANDITLDR,
R_BANDIT,
R_BEGGAR,
R_DRUNK,
R_PRISONER,
R_TOWNGUARD,
// gods
R_GODPURITY, // amberon - R_FIRSTGOD
R_GODTHIEVES, // felix
R_GODDEATH, // hecta
R_GODFIRE, // klikirak
R_GODLIFE, // glorana
R_GODMERCY, // yumi
R_GODNATURE, // ekrub
R_GODBATTLE, // bjorn
R_GODMAGIC, // lumara
// monsters
R_BASILISK,
R_BEHOLDER,
R_BOGGART,
R_BUGBEAR,
R_CENTAUR,
R_CHIMERA,
R_COCKATRICE,
R_COINS,
R_CREEPINGCLAW,
R_CRYMIDIA,
R_DARKMANTLE,
R_DJINNI,
R_DRYAD,
R_EFREETI,
R_EYEBAT,
R_GARGOYLE,
R_GIANTHILL,
R_GIANTFIRE,
R_GIANTFIREFC,
R_GNOLL,
R_GOBLIN,
R_GOBLINR,
R_GOBLINS,
R_GOBLINHEXER,
R_GOBLINKING,
R_GOBLINWAR,
R_GOBLINSHOOTER,
R_GREMLIN,
R_GRIFFON,
R_HAG,
R_HIPPOGRIFF,
R_HOBGOBLIN,
R_HOBGOBLINWAR,
R_HOMUNCULUS,
R_HYDRA,
R_KOBOLD,
R_LEPRECHAUN,
R_LESHY,
R_LAVAX,
R_LIZARDMAN,
R_MALIK,
R_MANTICORE,
R_MIMIC,
R_MINOTAUR,
R_NAIAD,
R_NIXIE,
R_OGRA,
R_OGRE,
R_OGREWARHULK,
R_ORCB,
R_ORC,
R_ORCGREY,
R_ORCGRAND,
R_ORCN,
R_ORK,
R_PEGASUS,
R_PIXIE,
R_POLTERGEIST,
R_PRIMALFIRE,
R_PRIMALFIREL,
R_PRIMALFIREG,
R_PRIMALSTONE,
R_PRIMALSTONEL,
R_PRIMALSTONEG,
R_PRIMALSTORM,
R_PRIMALSTORML,
R_PRIMALSTORMG,
R_SANDMAN,
R_SASQUATCH,
R_SATYR,
R_SINKMITE,
R_SKOOB,
R_SPRIGGAN,
R_SPRITEFIRE,
R_SPRITEGRAVE,
R_SPRITEICE,
R_SPRITEWEED,
R_TREANTYOUNG,
R_TREANT,
R_TREANTOLD,
R_TRICLOPS,
R_TROGLODYTE,
R_TROLL,
R_TROLLKIN,
R_TROLLSNOW,
R_TROLLSWAMP,
R_UNICORN,
R_WEREBEAR,
R_WERERAT,
R_WEREWOLF,
R_XAT,
// fish
R_CRAB,
R_FISHFOLK,
R_MERLOCH,
R_MERMAN,
R_PIRANHA,
R_PIRANHAKING,
R_EELELEC,
R_EELGIANT,
// plants
R_BINGEBARK,
R_BRIARTHRASH,
R_CACTUS,
R_IVYRAPID,
R_FUNGUSDREAM,
R_FUNGUSPETRIFY,
R_FUNGUSRAGE,
R_NUTTER,
R_SAWGRASS,
R_SCREAMER,
R_UNYON,
// animals
R_ANT,
R_ANTQUEEN,
R_ANTS,
R_ANTW,
R_ANTLION,
R_BAT,
R_BATBRAIN,
R_BATMUTATED,
R_BATVAMPIRE,
R_BEAR,
R_BEARCUB,
R_BEARGRIZZLY,
R_BEAROWL,
R_BEARPOLAR,
R_BILCO,
R_CATCHEETAH,
R_CATLION,
R_CATPANTHER,
R_CATTIGER,
R_CATSHADOW,
R_CHICKEN,
R_CRYSTALCUR,
R_DOG,
R_DOGBLINK,
R_DOGDEATH,
R_DOGFIRE,
R_DOGWAR,
R_ELEPHANT,
R_GOAT,
R_GYRFALCON,
R_HARPY,
R_HAWK,
R_HAWKYOUNG,
R_HAWKBLOOD,
R_HAWKFROST,
R_HORSE,
R_FROG,
R_MAMMOTH,
R_NEWT,
R_PORCUPINE,
R_RAT,
R_RATDIRE,
R_RATMIND,
R_RATPLAGUE,
R_ROC,
R_SCORPION,
R_SCORPIONL,
R_SLUG,
R_SNAIL,
R_SNAKE,
R_SNAKECARPET,
R_SNAKECOBRABLACK,
R_SNAKECOBRAGOLDEN,
R_SNAKECONSTRICTOR,
R_SNAKETREE,
R_SNAKEWATER,
R_SPIDER,
R_SPIDERPHASE,
R_SPIDERFUNNELWEB,
R_SPIDERREDBACK,
R_SPIDERTOMB,
R_SWAN,
R_SWARMSPIDER,
R_SWARMRAT,
R_SWARMLOCUST,
R_WOLFYOUNG,
R_WOLF,
R_WOLFDIRE,
R_WOLFWINTER,
R_WORMGLUT,
// slimes / leeches
R_GLUON,
R_LEECH,
R_LEECHMIND,
R_LEECHMINDA,
R_OOZEGREY,
// dragons
R_DRAGONBLUE,
R_DRAGONBLUEY,
R_DRAGONBLUEA,
R_DRAGONRED,
R_DRAGONREDY,
R_DRAGONREDA,
R_DRAGONWHITE,
R_DRAGONWHITEY,
R_DRAGONWHITEA,
R_EARTHWYRM,
R_WYVERN,
// insects
R_BEE,
R_BEETLE,
R_BLASTBUG,
R_BUTTERFLY,
R_CENTIPEDE,
R_COCKROACH,
R_FIREBUG,
R_GLOWBUG,
R_GIANTFLY,
R_GIANTBLOWFLY,
R_LIZARDBATB,
R_LIZARDBAT,
R_MOTHTEMP,
R_STINKBUG,
R_STIRGE,
// demons
R_BALROG,
R_DEECH,
R_DRETCH,
R_GRIDDLER,
R_LURKINGHORROR,
R_ICEDEMON,
R_IMP,
R_LINGEXTERMINATOR,
R_LINGHARVESTER,
R_LINGPARASITE,
R_LINGREAPER,
R_LINGSOWER,
R_LINGTRAPPER,
R_QUASIT,
// undead
R_BANSHEE,
R_GHAST,
R_GHOST,
R_GHOUL,
R_LICH,
R_MUMMY,
R_MUMMYG,
R_REVENANT,
R_SHADOW,
R_SKELETON,
R_SKELETONFIRE,
R_SKELLION,
R_VAMPIRE,
R_WIGHT,
R_WRAITHBOG,
R_WRAITHICE,
R_ZOMBIE,
R_ZOMBIECON,
// special
R_DANCINGWEAPONS,
R_DANCINGWEAPON,
R_DANCINGWEAPONL,
R_FLOATINGDISC,
R_GASCLOUD,
R_HECTASSERVANT,
R_TOOTH,
};
enum JOB {
J_NONE,
J_GOD,
J_ADVENTURER,
J_ALLOMANCER,
J_WARRIOR,
J_BATTLEMAGE,
J_GLADIATOR,
J_PALADIN,
J_SCOURGE,
J_CHEF,
J_COMMANDO,
J_DRUID,
J_HUNTER,
J_MECHANIC,
J_MONK,
J_NINJA,
J_PIRATE,
J_PRINCE,
J_ROGUE,
J_ASSASSIN,
J_KNIFEDANCER,
//J_SHOPKEEPER,
//J_WIZARD,
J_AIRMAGE,
J_ICEMAGE,
J_FIREMAGE,
J_NECROMANCER,
J_WILDMAGE,
// monster-only jobs
J_BERZERKER,
J_DEMONOLOGIST,
J_GUARD,
J_SHAMAN,
};
#define J_RANDOM J_NONE
enum JOBCATEGORY {
JC_NONE,
JC_FIGHTER,
JC_FIGHTERRANGED,
JC_FIGHTERSPEC,
JC_MAGE,
JC_THIEF,
JC_FIGHTERMAGE,
JC_FIGHTERTHIEF,
JC_GENERAL,
};
#define JC_FIRST JC_NONE
#define JC_LAST JC_GENERAL
/*
enum SUBJOB {
SJ_NONE,
SJ_RANDOM,
// mage
SJ_AIRMAGE,
SJ_ICEMAGE,
SJ_FIREMAGE,
SJ_NECROMANCER,
SJ_WILDMAGE,
// warrior
SJ_BATTLEMAGE,
SJ_PALADIN,
SJ_SCOURGE,
// rogue
SJ_KNIFEDANCER,
};
*/
enum MATSTATE {
MS_SOLID,
MS_LIQUID,
MS_GAS,
MS_OTHER,
MS_ALL,
};
// 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,
MT_WIRE = 27,
MT_SILVER = 28,
MT_DRAGONWOOD = 29,
MT_DIRT = 30,
MT_CRYSTAL = 31,
MT_DURANITE = 32,
MT_BRICK = 33,
MT_SNOW = 34,
};
// Object Types
enum OBTYPE {
OT_NONE,
// dungeon features
OT_BARRICADE,
OT_BOULDER,
OT_BOULDERGOLD,
OT_GRATINGFLOOR,
OT_GRATINGROOF,
OT_ICICLE,
OT_IRONBARS,
OT_STATUE,
OT_DOORWOOD,
OT_DOORIRON,
OT_FENCEBONE,
OT_FENCEWOOD,
OT_FOUNTAIN,
OT_GATEBONE,
OT_GATEIRON,
OT_GATEWOOD,
OT_SIGN,
OT_HOLYCIRCLE,
OT_PENTAGRAM,
OT_HOLEINGROUND,
OT_HOLEINROOF,
OT_RUBBLE,
OT_STAIRSDOWN,
OT_STAIRSUP,
OT_VSTAIRSDOWN,
OT_VSTAIRSUP,
OT_TREEDOWN,
OT_TREEUP,
OT_ICESTAIRSDOWN,
OT_ICESTAIRSUP,
OT_TUNNELDOWN,
OT_TUNNELUP,
OT_LUNARGATE,
OT_PORTAL,
OT_STOMACHEXIT,
OT_MAGICLIGHT,
OT_MAGICDARK,
// buildings - rememebr to update MAXBUILDINGTYPES!
OT_BABAYAGAHUT,
OT_BYHUTDOOR,
OT_MOTEL,
OT_SHOPARMOUR,
OT_SHOPBOOK,
OT_SHOPFOOD,
OT_SHOPGENERAL,
OT_SHOPHARDWARE,
OT_SHOPPOTION,
OT_SHOPRECYCLE,
OT_SHOPRING,
OT_SHOPWEAPON,
OT_TEMPLE,
// terrain
OT_WATERDEEP,
// traps
OT_TRAPALARM,
OT_TRAPARROW,
OT_TRAPARROWP,
OT_TRAPDOORFALL,
OT_TRAPEBLAST,
OT_TRAPFIRE,
OT_TRAPGAS,
OT_TRAPLIGHTNING,
OT_TRAPMINE,
OT_TRAPNEEDLEP,
OT_TRAPPIT,
OT_TRAPROCK,
OT_TRAPSUMMON,
OT_TRAPTELEPORT,
OT_TRAPTRIP,
OT_TRAPWIND,
// traps - hiding monsters
OT_COINSHIDING,
OT_GARGOYLE,
OT_MIMIC,
// rocks
OT_ASH,
OT_ASHLARGE,
OT_ASHHUGE,
OT_ASHEXPLODE,
OT_ASHCONCEAL,
OT_ASHINVIS,
OT_ASHSLEEP,
OT_BRICK,
OT_GEMOFSEEING,
OT_STONE,
// gems
OT_AQUAMARINE,
OT_AMETHYST,
OT_DIAMOND,
OT_EMERALD,
OT_OPAL,
OT_PEARL,
OT_RUBY,
OT_SAPPHIRE,
OT_TOPAZ,
// money
OT_GOLD,
// godstones
OT_GODSTONE_BATTLE,
OT_GODSTONE_DEATH,
OT_GODSTONE_DESTRUCTION,
OT_GODSTONE_LIFE,
OT_GODSTONE_MAGIC,
OT_GODSTONE_MERCY,
OT_GODSTONE_NATURE,
OT_GODSTONE_PURITY,
OT_GODSTONE_REVENGE,
// flora
OT_FLOWER,
OT_LEAF,
OT_MISTLETOE,
OT_MOSSMOON,
OT_MOSSSUN,
OT_SHRUB,
OT_STICK,
OT_STUMP,
OT_TREE,
// food
OT_APPLE,
OT_BANANA,
OT_BANANASKIN, // not really food
OT_BERRY,
OT_BREADFRESH,
OT_BREADGARLIC,
OT_BREADSTALE,
OT_CACFRUIT,
OT_CAKEFRUIT,
OT_CARROT,
OT_CHEESE,
OT_CHOCOLATE,
OT_CLOVER,
OT_CURADOUGH,
OT_GARLIC,
OT_HOTDOG,
OT_JERKY,
OT_MUSHROOMGREY,
OT_MUSHROOMSHI,
OT_MUSHROOMTOAD,
OT_MUSHROOMSTUFFED,
OT_NUT,
OT_ONION,
OT_PASSIONFRUIT,
OT_POISONSAC,
OT_POISONSACBL,
OT_PSITRUFFLE,
OT_ROASTMEAT,
OT_RUMBALL,
OT_SALT,
OT_SANDWICHCHEESE,
OT_SANDWICHPB,
OT_SCREAMERSLICE,
OT_SUGAR,
OT_TOAST,
OT_TOMATO,
// corpses
OT_CORPSE,
OT_FINGER,
OT_HEAD,
// potions
OT_POT_ACID,
OT_POT_ACROBATICS,
OT_POT_AMBROSIA,
OT_POT_BLINDNESS,
OT_POT_BLOOD,
OT_POT_BLOODC,
OT_POT_CANINETRACKING,
OT_POT_COFFEE,
OT_POT_COMPETENCE,
OT_POT_ELEMENTIMMUNE,
OT_POT_ETHEREALNESS,
OT_POT_EXPERIENCE,
OT_POT_FISHLUNG,
OT_POT_FURY,
OT_POT_GASEOUSFORM,
OT_POT_GROWTH,
OT_POT_HEALING,
OT_POT_HEALINGMIN,
OT_POT_HEALINGMAJ,
OT_POT_INVIS,
OT_POT_INVULN,
OT_POT_LEVITATION,
OT_POT_LYCANTHROPY,
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_SPIDERCLIMB,
OT_POT_WATER,
OT_POT_JUICE,
// soup from recipes
OT_POT_SOUPCHICKEN,
OT_POT_SOUPMUSHROOM,
OT_POT_SOUPTOMATO,
OT_POT_STROGONOFF,
OT_POT_SUGARWATER,
// scrolls
OT_MAP,
OT_GRAPHPAPER,
OT_SCR_AMNESIA,
OT_SCR_AWARENESS,
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_REPLENISHMENT,
OT_SCR_TELEPORT,
OT_SCR_TURNUNDEAD,
OT_SCR_WISH,
// BOOKS
OT_GRIMOIRE,
OT_MANUAL,
OT_SPELLBOOK,
// spells
// -- allomancy
OT_S_ABSORBMETAL,
OT_S_ACCELMETAL,
OT_S_ALCHEMY,
OT_S_ANIMATEMETAL,
OT_S_EXPLODEMETAL,
OT_S_HEATMETAL,
OT_S_HONEMETAL,
OT_S_PULLMETAL,
OT_S_MAGSHIELD,
OT_S_METALHEAL,
OT_S_SHAPEMETAL,
// -- death magic / necromency
OT_S_ANIMATEDEAD,
OT_S_BLIGHT,
OT_S_COMMANDUNDEAD,
OT_S_CURSE,
OT_S_DEATHKEEN,
OT_S_DRAINLIFE,
OT_S_FEAR,
OT_S_FLAYFLESH,
OT_S_HECTASSERVANT,
OT_S_PAIN,
OT_S_PARALYZE,
OT_S_PROTGOOD,
OT_S_INFINITEDEATH,
OT_S_WEAKEN,
OT_S_FEEBLEMIND,
OT_S_BLINDNESS,
OT_S_POISONBOLT,
OT_S_POSSESSION,
OT_S_SMITEGOOD,
OT_S_STENCH,
// -- divination
OT_S_AWARENESS,
OT_S_CANINETRACKING,
OT_S_DETECTAURA,
OT_S_DETECTLIFE,
OT_S_DETECTOBS,
OT_S_DETECTMAGIC,
OT_S_IDENTIFY,
OT_S_LOCATEOBJECT,
OT_S_LORE,
OT_S_MAPPING,
OT_S_REVEALHIDDEN,
OT_S_SEEINVIS,
OT_S_SIXTHSENSE,
// -- elemental - air
OT_S_JOLT,
OT_S_AIRBLAST,
OT_S_CHAINLIGHTNING,
OT_S_CLOUDKILL,
OT_S_ETHEREALSTEED,
OT_S_GUSTOFWIND,
OT_S_HURRICANE,
OT_S_MIST,
OT_S_PROPELMISSILE,
OT_S_REFRACTION,
OT_S_SHATTER,
OT_S_TAILWIND,
OT_S_TORNADO,
OT_S_WHIRLWIND,
OT_S_WINDSHIELD,
// -- elemental - fire magic
OT_S_BLADEBURN,
OT_S_BLOODBOIL,
OT_S_BURNINGFEET,
OT_S_BURNINGWAVE,
OT_S_CLEANSINGFIRE,
OT_S_DANCINGFLAME,
OT_S_ENDUREFIRE,
OT_S_FIREDART,
OT_S_FIREBALL,
OT_S_FLAMEPILLAR,
OT_S_FLAMEBURST,
OT_S_GATHERFLAME,
OT_S_HEATWAVE,
OT_S_IMMOLATE,
OT_S_METEOR,
OT_S_NEGATEFIRE,
OT_S_PYROMANIA,
OT_S_QUICKENFIRE,
OT_S_SPARK,
OT_S_SUPERHEAT,
OT_S_WALLOFFIRE,
// -- elemental - ice
OT_S_ABSOLUTEZERO,
OT_S_CHILL,
OT_S_COLDBURST,
OT_S_COLDRAY,
OT_S_COLDSNAP,
OT_S_CRYSTALARM,
OT_S_CRYSTALSHIELD,
OT_S_ENDURECOLD,
OT_S_FREEZEOB,
OT_S_FROSTBITE,
OT_S_GLACIATE,
OT_S_ICECRUST,
OT_S_ICICLE,
OT_S_NEGATECOLD,
OT_S_SLIDE,
OT_S_SHARDSHOT,
OT_S_SNAPFREEZE,
OT_S_SNOWBALL,
OT_S_WALLOFICE,
// -- gravity
OT_S_EQANDOP,
OT_S_FLIGHT,
OT_S_FORCESPHERE,
OT_S_GRAVLOWER,
OT_S_GRAVBOOST,
OT_S_HASTE,
OT_S_LEVITATION,
OT_S_SILENCE,
OT_S_SLOW,
OT_S_TRUESTRIKE,
OT_S_WHATGOESUP,
// -- life magic / cleric
OT_S_DISRUPTUNDEAD,
OT_S_HEALING,
OT_S_HEALINGMIN,
OT_S_HEALINGMAJ,
OT_S_HEAVENARM,
OT_S_HOLYAURA,
OT_S_PROTEVIL,
OT_S_RESTORATION,
OT_S_RESSURECTION,
OT_S_SMITEEVIL,
OT_S_SPEAKDEAD,
OT_S_TURNUNDEAD,
// -- mental / psionic
OT_S_ANTICIPATE,
OT_S_BAFFLE,
OT_S_BOOSTCONFIDENCE,
OT_S_CHARM,
OT_S_CHIBOLT,
OT_S_CHISTRIKE,
OT_S_DELAYDEATH,
OT_S_DISORIENT,
OT_S_DRAINIQ,
OT_S_HUNGER,
OT_S_LETHARGY,
OT_S_LOWERMETAB,
OT_S_KNOWWEAKNESS,
OT_S_MFEEDBACK,
OT_S_MINDSCAN,
OT_S_MINDSHIELD,
OT_S_MINDWHIP,
OT_S_MIRRORIMAGE,
OT_S_PACIFY,
OT_S_PRECOGNITION,
OT_S_PSIBLAST,
OT_S_PSYARMOUR,
OT_S_PSYSHOVE,
OT_S_REMOTEKO,
OT_S_SLEEP,
OT_S_SLEEPMASS,
OT_S_SLOWMISSILES,
OT_S_SOULLINK,
OT_S_STASIS,
OT_S_STUN,
OT_S_TELEKINESIS,
OT_S_VENTRILOQUISM,
// nature / enviromancy
OT_S_ABSORBWOOD,
OT_S_ANIMATETREE,
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_EARTHQUAKE,
OT_S_EVAPORATE,
OT_S_EXCAVATE,
OT_S_WEB,
OT_S_ENDUREELEMENTS,
OT_S_ENTANGLE,
OT_S_FLOOD,
OT_S_HAILSTORM,
OT_S_LIGHTNINGBOLT,
OT_S_LIGHTNINGSTORM,
OT_S_PLANTWALK,
OT_S_PURIFYFOOD,
OT_S_QUENCH,
OT_S_LESSENPOISON,
OT_S_REPELINSECTS,
OT_S_SATEHUNGER,
OT_S_SLEETSTORM,
OT_S_SOFTENEARTH,
OT_S_STICKTOSNAKE,
OT_S_SUMMONANIMALSSM,
OT_S_SUMMONANIMALSMD,
OT_S_SUMMONANIMALSLG,
OT_S_SUMMONDEMON,
OT_S_THORNS,
OT_S_WARPWOOD,
OT_S_WATERJET,
// -- summoning
OT_S_CLONE,
OT_S_CREATEFOOD,
OT_S_EXORCISE,
OT_S_EXORCISEMASS,
OT_S_FLOATINGDISC,
OT_S_FRIENDS,
OT_S_GLYPHWARDING,
OT_S_CLEARLEVEL,
OT_S_CREATEMONSTER,
OT_S_SUMMONSWARM,
OT_S_SUMMONWEAPON,
// -- translocation
OT_S_APPORTATION,
OT_S_BLINK,
OT_S_BLINKASS,
OT_S_DISPERSAL,
OT_S_GATE,
OT_S_INSTANTDISROBE,
OT_S_PLANESHIFT,
OT_S_SUCK,
OT_S_TELEPORT,
OT_S_TRAVEL,
OT_S_TWIDDLE,
// -- wild magic
//OT_S_INSCRIBE,
OT_S_ALARM,
OT_S_ANIMATESTATUE,
OT_S_CREATEWATER, // also nature
OT_S_DARKNESS,
OT_S_FIREWORKS,
OT_S_DETONATE,
OT_S_DETONATEDELAY,
OT_S_ENERGYBOLT,
OT_S_ENERGYBLAST,
OT_S_ENCHANT,
OT_S_FLASH,
OT_S_GASEOUSFORM,
OT_S_GREASE,
OT_S_HOLDPORTAL,
OT_S_INVISIBILITY,
OT_S_KNOCK,
OT_S_LIGHT,
OT_S_MANASPIKE,
OT_S_MENDING,
OT_S_NULLIFY,
OT_S_OBJECTGROWTH,
OT_S_OBJECTSHRINK,
OT_S_PASSWALL,
OT_S_PETRIFY,
OT_S_POLYMORPH,
OT_S_POLYMORPHRND,
OT_S_QUICKENSTONE,
OT_S_REPLENISH,
OT_S_SHAPESHIFT,
OT_S_SIZEUP,
OT_S_SIZEDOWN,
OT_S_SPIKEVOLLEY,
// -- divine powers
OT_A_DUMPMON,
OT_S_CREATEVAULT,
OT_S_GIFT,
OT_S_WISH,
OT_S_WISHLIMITED,
OT_A_BLINDALL,
OT_S_CONFISCATE,
OT_A_DEBUG,
OT_A_PATHFIND,
OT_A_PETIFY,
OT_A_ENHANCE,
OT_A_LEARN,
OT_A_LEVELUP,
// abilities
OT_A_AIMEDSTRIKE,
OT_A_ALTERATTACK,
OT_A_BUILD,
OT_A_CHECKSTAIRS,
OT_A_CLIMB,
OT_A_COOK,
OT_A_DARKWALK,
OT_A_DISARM, // disarm a trap
OT_A_DISARMLF, // disarm an opponent
OT_A_DISMANTLE,
OT_A_DRAGUNDERGROUND,
OT_A_ENHANCEOB,
OT_A_EXPLODESELF,
OT_A_FEIGNDEATH,
OT_A_FLIP,
OT_A_FLURRY,
OT_A_FLY,
OT_A_FULLSHIELD,
OT_A_GRAB,
OT_A_CHARGE,
OT_A_COMBOSTRIKE,
OT_A_CRUSH,
OT_A_JUMP,
OT_A_PRAY,
OT_A_REFLEXDODGE,
OT_A_RAGE,
OT_A_REPAIR,
OT_A_RESIZE,
OT_A_SCREAM,
OT_A_SHIELDBASH,
OT_A_SNATCH,
OT_A_SONICBOLT,
OT_A_SPRINT,
OT_A_STUDYSCROLL,
OT_A_STINGACID, // need to define dam in f_canwill
OT_A_STRIKETOKO,
OT_A_SUCKBLOOD,
OT_A_SWALLOW,
OT_A_SWOOP,
OT_A_TIPTOE,
OT_A_TRIPLF, // trip an opponent
OT_A_EMPLOY,
OT_A_EXPOSEDSTRIKE,
OT_A_HEAVYBLOW,
OT_A_HIDE,
OT_A_INSPECT,
OT_A_IRONFIST,
OT_A_HURRICANESTRIKE,
OT_A_PICKLOCK,
OT_A_POLYREVERT,
OT_A_QUIVERINGPALM,
OT_A_STEAL,
OT_A_THRUST, // attack up to 2 cells away with a piercing weapon.
OT_A_TRAIN,
OT_A_TUMBLE,
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_CREATEFOOD,
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_NULLIFY,
OT_WAND_POLYMORPH,
OT_WAND_REVEALHIDDEN,
OT_WAND_SLOW,
OT_WAND_TURNUNDEAD,
OT_WAND_WEAKNESS,
OT_WAND_WONDER,
// tools - unique
OT_ORBDUNGEONEXIT,
OT_KEYIRON,
OT_KEYMOSS,
OT_KEYSTONE,
// tools
OT_BAGOFHOLDING,
OT_BAGOFHOLDINGLARGE,
OT_BAGOFHOLDINGHUGE,
OT_BANDAGE,
OT_BLANKET,
OT_BLINDFOLD,
OT_BUGLAMP,
OT_CANDLE,
OT_FRIDGE,
OT_GUNPOWDER,
OT_LAMPOIL,
OT_LANTERNOIL,
OT_LOCKPICK,
OT_PANPIPES,
OT_PEACEPIPES,
OT_PICKAXE,
OT_ROPE,
OT_SACK,
OT_SACKLARGE,
OT_SACKHUGE,
OT_SAFEBOX,
OT_SHOVEL,
OT_SPANNER,
OT_TORCH,
OT_TOWEL,
OT_UNICORNHORN,
// tech l0
OT_CHEWINGGUM,
OT_COMPUTER,
OT_CREDITCARD,
OT_PAPERCLIP,
OT_ROLLERSKATES,
OT_SLEEPINGBAG,
// tech l1
OT_BUTANETORCH,
OT_POCKETWATCH,
OT_DIGITALWATCH,
OT_INSECTICIDE,
OT_LANTERNLED,
OT_SOLDERINGIRON,
// tech l2
OT_BATTERY,
OT_ENERGYPACK,
OT_CHARGEKNIFE,
OT_CATTLEPROD,
OT_C4,
OT_FLASHBANG,
OT_GRENADE,
OT_GRENADEICE,
OT_GRENADESMOKE,
OT_JACKHAMMER,
OT_MOTIONSCANNER,
OT_NVGOGGLES,
OT_POWERCORE,
OT_STYPTIC,
OT_TENT,
OT_VIBROBLADE,
// tech l3
OT_BOOMSTICK,
OT_GUNBLADE,
OT_INFOVISOR,
OT_JETSKATES,
OT_LASERSWORD,
OT_LOCKHACKER,
OT_NANOBLADE,
OT_PORTLADDER,
OT_PROXMINE,
// tech l4
OT_JETPACK,
// tech l5
OT_TELEPAD,
OT_XRAYGOGGLES,
// tech l6
// none yet.
// furniture
OT_ARMOURRACK,
OT_BED,
OT_BEDSTRAW,
OT_BOOKSHELF,
OT_CANDELABRUM,
OT_COFFIN,
OT_FIREPLACE,
OT_WARDROBE,
OT_WEAPONRACK,
OT_WOODENTABLE,
OT_WOODENBARREL,
OT_WOODENCHAIR,
// misc objects
OT_BONE,
OT_CHEST,
OT_CHESTORNATE,
OT_EMPTYFLASK,
OT_EMPTYVIAL,
OT_FORK,
OT_STEAKKNIFE,
OT_GLASSJAR,
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_SLIMEPUDDLE,
OT_SLIMEPOOL,
OT_VOMITPOOL,
OT_BLOODSTAIN,
OT_BLOODSPLASH,
OT_BLOODPOOL,
OT_METALCHUNK,
OT_MELTEDWAX,
OT_SOGGYPAPER,
OT_FLESHCHUNK,
OT_TUSK,
OT_WOODPLANK,
OT_WOODSHARD,
OT_METALSHEET,
// trail objects
OT_FOOTPRINT,
OT_SCENT,
// effects
OT_COLDNESS,
OT_DUSTCLOUD,
OT_DUSTPUFF,
OT_FIRELARGE,
OT_FIREMED,
OT_FIRESMALL,
OT_HEAT,
OT_HAILSTORM,
OT_HURRICANE,
OT_ICEWALL,
OT_MAGICBARRIER,
OT_STEAMCLOUD,
OT_STEAMPUFF,
OT_SLEETSTORM,
OT_MIST,
OT_SMOKECLOUD,
OT_SMOKEPUFF,
OT_METHANEPUFF,
OT_POISONCLOUD,
OT_POISONPUFF,
OT_TORNADO,
OT_VIBCLOUD,
OT_VINE,
OT_WEB,
OT_WHIRLWIND,
// armour - multipart
OT_WETSUIT,
// armour - body
OT_ARMOURDEMON,
OT_ARMOURLEATHER,
OT_ARMOURTHORN,
OT_ARMOURRING,
OT_ARMOURSCALE,
OT_ARMOURCHAIN,
OT_ARMOURSPLINT,
OT_ARMOURPLATE,
OT_FLAKJACKET,
OT_OVERALLS,
OT_CHEFJACKET,
OT_COTTONSHIRT,
OT_SILKSHIRT,
OT_ROBE,
OT_VELVETROBE,
// armour - shoulders
OT_APRON,
OT_CLOAK,
OT_CLOAKFUR,
OT_PAULDRON,
// armour - waist
OT_BELTLEATHER,
// armour - legs
OT_CLOTHTROUSERS,
OT_COMBATPANTS,
OT_GREAVES,
OT_RIDINGTROUSERS,
// armour - feet
OT_SANDALS,
OT_SHOESLEATHER,
OT_BOOTSLEATHER,
OT_BOOTSMETAL,
OT_BOOTSRUBBER,
OT_BOOTSSPIKED,
// armour - hands
OT_GLOVESCLOTH,
OT_GLOVESLEATHER,
OT_GAUNTLETS,
// armour - head
OT_SUNHAT,
OT_PIRATEHAT,
OT_POINTYHAT,
OT_BALACLAVA,
OT_CAP,
OT_CHEFHAT,
OT_HELM,
OT_GASMASK,
OT_GOLDCROWN,
OT_HELMBONE,
OT_HELMFOOTBALL,
// armour - ears
OT_EARPLUGS,
// armour - eyes
OT_SAFETYGLASSES,
OT_SPECTACLES,
OT_EYEPATCH,
OT_SUNGLASSES,
// armour - shields
OT_APSIS,
OT_BUCKLER,
OT_SHIELD,
OT_SHIELDHIDE,
OT_SHIELDLARGE,
OT_SHIELDTOWER,
// amulets
OT_AMU_ACROBAT,
OT_AMU_ANGER,
OT_AMU_BLOOD,
OT_AMU_BRAVERY,
OT_AMU_CHEF,
OT_AMU_CHOKING,
OT_AMU_ESCAPE,
OT_AMU_ENERGYABS,
OT_AMU_EVOLUTION,
OT_AMU_FALLING,
OT_AMU_FLIGHT,
OT_AMU_LIGHT,
OT_AMU_LISTEN,
OT_AMU_NOINJURY,
OT_AMU_PARANOIA,
OT_AMU_PIETY,
OT_AMU_PROT_MIN,
OT_AMU_PROT_MAJ,
OT_AMU_SLEEP,
OT_AMU_SOULS,
OT_AMU_SPELLBOOST,
OT_AMU_SWIMMING,
OT_AMU_THIEF,
OT_AMU_TRAVEL,
OT_AMU_VICTIM,
OT_AMU_VSESP,
OT_AMU_VSMAGIC,
OT_AMU_VSPOISON,
// rings
OT_RING_ENDURANCE,
OT_RING_GREED,
OT_RING_INVIS,
OT_RING_INVULN,
OT_RING_LUCK,
OT_RING_CONTROL,
OT_RING_CON,
OT_RING_DECELERATION,
OT_RING_DETECTLIFE,
OT_RING_DEX,
OT_RING_EDUCATION,
OT_RING_HUNGER,
OT_RING_IQ,
OT_RING_STR,
OT_RING_MANA,
OT_RING_MEDITATION,
OT_RING_MIRACLES,
OT_RING_SPELLBOOST,
OT_RING_MPREGEN,
OT_RING_PROTFIRE,
OT_RING_PROTCOLD,
OT_RING_REFLECTION,
OT_RING_REGENERATION,
OT_RING_RESISTMAG,
OT_RING_SIGHT,
OT_RING_STENCH,
OT_RING_UNHOLINESS,
OT_RING_WATERBREATHING,
OT_RING_WOUNDING,
// innate / animal weapons
OT_BEAK,
OT_CLAWS,
OT_DRILL,
OT_FISTS,
OT_AIRFISTS,
OT_HOOKHAND, // for pirate
OT_SAWBLADE,
OT_STING,
OT_BUTT,
OT_HOOF,
OT_HORN,
OT_TAIL,
OT_TEETH,
OT_TEETHSM,
OT_TENTACLE,
OT_TRAMPLE,
OT_TONGUE,
OT_WHIPATTACK,
OT_ZAPPER,
// monster weapons
OT_ACIDATTACK,
OT_TOUCHBURN,
OT_TOUCHCHILL,
OT_TOUCHCONFUSE,
OT_TOUCHHOLY,
OT_TOUCHNECROTIC,
OT_TOUCHPARALYZE,
OT_TOUCHPARALYZE2,
OT_TOUCHPOISON,
// missiles / ammo
OT_ARROW,
OT_BOLT,
OT_DART,
OT_DARTNANO,
OT_DARTTRANQ,
OT_KNIFETHROWING,
OT_MANRIKI,
OT_NEEDLE,
OT_NET,
OT_JAVELIN,
OT_JAVELINLT,
OT_BULLET,
OT_RUBBERBULLET,
OT_SHURIKEN,
OT_SPIKEVOLLEY,
// axes
OT_AXE,
OT_HANDAXE,
OT_HATCHET,
OT_BATTLEAXE,
OT_GREATAXE,
OT_WARAXE,
// short blades
OT_BASELARD,
OT_COMBATKNIFE,
OT_DAGGER,
OT_GLADIUS,
OT_KNIFE,
OT_MEATCLEAVER,
OT_ORNDAGGER,
OT_RAPIER,
OT_SABRE,
OT_SHORTSWORD,
OT_SICKLE,
// long swords
OT_BASTARDSWORD,
OT_BROADSWORD,
OT_CLAYMORE,
OT_CUTLASS,
OT_EPEE,
OT_FALCHION,
OT_GREATSWORD,
OT_LONGSWORD,
OT_ORNSWORD,
OT_SCIMITAR,
OT_ZWEIHANDER,
// exotic
OT_KATANA,
OT_NUNCHAKU,
OT_SAI,
OT_UCHIGATANA,
OT_WAKAZASHI,
// polearms
OT_GLAIVE,
OT_GUISARME,
OT_HALBERD,
OT_LANCE,
OT_PITCHFORK,
OT_RANSEUR,
OT_SCYTHE,
OT_SPEAR,
OT_TRIDENT,
// staves
OT_QUARTERSTAFF,
OT_BAMBOOSTAFF,
OT_IRONSTAFF,
OT_BLADEDSTAFF,
OT_WIZARDSTAFF,
OT_WIZARDSTAFF2,
OT_WIZARDSTAFF3,
OT_WIZARDSTAFF4,
OT_WIZARDSTAFF5,
OT_WIZARDSTAFF6,
// whips
OT_WHIPBARBED,
OT_WHIPBULL,
OT_WHIPMT,
OT_FLAIL,
OT_FLAILHEAVY,
// clubs
OT_CLUB,
OT_CLUBSPIKE,
OT_CUDGEL,
OT_GREATCLUB,
OT_MACE,
OT_MORNINGSTAR,
OT_SHILLELAGH,
// hammers
OT_WARHAMMER,
OT_SLEDGEHAMMER,
// projectile weapons
OT_BLOWGUN,
OT_BOW,
OT_COMPOSITEBOW,
OT_CROSSBOW,
OT_CROSSBOWHAND,
OT_LONGBOW,
OT_REVOLVER,
OT_SHOTGUN,
OT_SLING,
// special weapons
OT_ENERGYBLADE,
OT_HANDOFGOD,
OT_ICEARMOUR,
OT_ICEBOOTS,
OT_ICEGLOVES,
OT_ICEHELMET,
OT_ICESHIELD,
// special obs
OT_GENERATOR,
OT_PLAYERSTART,
OT_PUSHN,
OT_PUSHE,
OT_PUSHS,
OT_PUSHW,
};
#define MAXBUILDINGTYPES (11)
//#define BP_NONE (-1)
enum BODYPART {
BP_NONE = -1,
// humanoid parts
BP_WEAPON = 0,
BP_SECWEAPON = 1,
BP_EARS = 2,
BP_EYES = 3,
BP_HEAD = 4, // <- core bodypart
BP_NECK = 5,
BP_SHOULDERS = 6,
BP_BODY = 7, // <- core bodypart
BP_HANDS = 8, // <- core bodypart
BP_WAIST = 9,
BP_LEGS = 10, // <- core bodypart
BP_FEET = 11,
BP_RIGHTFINGER = 12,
BP_LEFTFINGER = 13,
// others...
BP_BACKLEGS = 14,
BP_FRONTLEGS = 15,
BP_WINGS = 16, // <- core bodypart
BP_TAIL = 17, // <- core bodypart
BP_HEAD2 = 18,
BP_HEAD3 = 19,
};
#define MAXBODYPARTS (20)
// depth on a human
#define DP_MAX DP_OVERHEAD4
#define DP_FIRST DP_TOE
enum DEPTH {
/*
DP_HEAD = 4,
DP_SHOULDERS = 3,
DP_WAIST = 2,
DP_FEET = 1,
DP_NONE = 0,
*/
DP_OVERHEAD4 = 15,
DP_OVERHEAD3 = 14,
DP_OVERHEAD2 = 13,
DP_OVERHEAD = 12,
DP_HEAD = 11,
DP_SHOULDERS = 10,
DP_CHEST = 9,
DP_BELLY = 8,
DP_WAIST = 7,
DP_THIGH = 6,
DP_KNEE = 5,
DP_CALF = 4,
DP_FEET = 3,
DP_ANKLE = 2,
DP_TOE = 1,
DP_NONE = 0,
};
enum NOISETYPE {
N_DEATHKEEN,
N_GETANGRY,
N_WALK,
N_FLY,
N_LOWHP,
N_FRUSTRATED,
N_SONICBOLT,
N_DEAFENSCREAM,
N_WARCRY,
N_SPELLCAST,
N_TOOCLOSE,
};
enum LFSIZE {
SZ_ANY = -2,
SZ_MIN = -1,
SZ_MINI = 0, // ie. fly
SZ_TINY = 1, // ie. mouse
SZ_SMALL = 2, // ie. cat
SZ_MEDIUM = 3, // ie. wolf/large 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 ALIGNMENT {
AL_NONE,
AL_GOOD,
AL_NEUTRAL,
AL_EVIL,
};
enum POISONSEVERITY {
PS_DISEASE,
PS_POISON,
PS_CURSE,
};
enum POISONTYPE {
P_COLD,
P_FOOD,
P_FOODBAD,
P_GAS,
P_LYCANTHROPY,
P_MIGRAINE,
P_ROT,
P_TETANUS,
P_VENOM,
P_WEAKNESS,
};
enum RANGEATTACK {
RA_NONE = 0,
RA_GUN,
RA_THROW,
RA_WAND,
};
enum SLEEPTYPE {
ST_ASLEEP = 0,
ST_MEDITATING,
ST_KO,
};
enum GENDER {
G_NONE = 0,
G_MALE,
G_FEMALE
};
enum ANIMALTYPE {
AT_AVIAN,
AT_CANINE,
AT_EQUINE,
AT_FELINE,
};
enum FLAG {
F_NONE = 0, // dummy flag
// map flags
F_FIRSTINBRANCH, // this map is the first level in its branch
F_MAPCOORDS, // v0+v1 are x/y coords for this map area
F_MAPSHAPE, // v0 = enum MAPSHAPE
F_ROOMEXIT, // there is an exit from room v0 at x=v1,y=v2
F_NEWWATERDEPTH, // temp flag for the spread of f_deepwater obs.
// v0+1 are x/y, v2 is new depth.
F_STOMACHOF, // this map is the stomach of lf id V0, name = f->text
// map or vault flags
F_CELLTYPESOLID, // use celltype v0 for solid cells (walls)
F_CELLTYPEEMPTY, // use celltype v0 for empty cells (corridors/rooms)
// object flags
F_GODSTONE, // this is a godstone.
// if v2 = TRUE, means we need to warn when we walk onto it.
F_VAULTKEY, // this object is a vault key - it unlocks vault
// stair objects.
F_BADOBJECT, // this object is dangerous. ie. potion of poison,
// potion of sleep, etc.
F_BATTLESPOILS, // this obejct was dropped by a monster which the
// player killed, and has not yet been touched.
F_UNTOUCHED, // this obejct has not yet been picked up by anyone
F_BEINGUSED, // this object is currently being used
F_BEENOPENED, // this container has been opened by
// the player.
F_BRANDCHANCE, // this object has v0% extra chance of being branded
F_DEAD, // object will be removed. v0 = lfid who killed it
F_ONEPERCELL, // only one of these objects can exist per cell
F_ONLYINROOM, // object nay only appear in rooms (not corridors)
F_CREATEDBY, // object was made by lf id v0, text=real lfname
F_CREATEDBYSPELL, // object was made by spell id v0
F_ENCHANTABLE, // object can get +1/-1 ect
F_FILLPOT, // can fill empty flasks with this object to create
// a potion of obtype v0.
// v1 = how many objects need to exist before oyu
// can fill a flask from it.
// v2 = need lore of this creature's race to
// fill .
F_GEM, // this object is a gem.
F_JEWELERY, // this object counts as jewelery
F_GODGIFT, // this was a gift form god with race v0.
F_GROWSTO, // used for spells. v0=new oid or celltype.
// v1 = VT_OB or VT_CELL
F_SHRINKSTO, // used for spells. v0=new oid or celltype.
// v1 = VT_OB or VT_CELL
F_NOSHATTER, // object will not shatter, even if it's material should.
F_NUMCONVERT, // if o->amt is >= v0, object type changes into either
// f->text (if given), or obtype v1.
F_STACKABLE, // can stack multiple objects togethr
F_THE, // say "the xxx", not "a xxx"
F_WIZSTAFF, // this object counts as a wizard staff
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_MAPTO, // this object is a map to a regionlink.:
// v0=region containing entrance
// v1=depth of entrance
// v2=regionthing ID of RT_BRANCHLINK thing
// text = what this is a map to ie. "the goblin caves"
F_ORIGMAP, // for amulet of the traveller - v0 = original map id
// where the amulet was put on. v1/v2 is x/y coords.
F_NEWMAP, // for amulet of the traveller - v0 = target map id
// where amulet takes us. v1/v2 is x/y coords.
F_NOSACRIFICE, // cannot be sacrificed.
F_SIGNTEXT, // for 'sign' objects. f->text is what is says.
F_IMPORTANT, // don't destroy this object
F_IMMUTABLE, // this object cannot be damaged OR repaired.
F_IDWHENUSED, // fully identify an object when worn/weilded/operated/etc
F_STARTBLESSED, // v0 = b_blessed or b_cursed
// v1 = pct chance. NA = 100.
F_REPELBLESSED, // v0 = b_blessed or b_cursed. repels other obejcts
// of this blesstype.
// if v1 == b_blessed or b_cursed, will ID these blessings/curses
F_KNOCKAWAY, // this obejct will cause a knockback() effect on
// other objects of lifeforms in its space.
// v0 is the distance to knock lfs.
// v1 = skillcheck difficulty to avoid falling
// v2 = speed to fire objects
// text = "xdx" (damage to deal)
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.
F_NOFEEL, // when blind, don't show "you can feel xxx"
F_FEELTEXT, // when blind, show "you can feel"+f->text
F_TEMPMOD, // this object will change its cell's temperature by
// v0.
// for items in shops
F_VENDITEM, // causes vending machine to show this item as identified
//F_SHOPITEM, // v0 is object value.
// v1 is the shop it is from
// causes shops to show (worth $xx) after the ob's name.
// also used for detecting theft!
F_VALUE, // how much an item is worth (over its base weight+material)
F_NOPOINTS, // object is worth 0 points (but might still have a
// monetary value)
// for object brands
F_ONLYFOROBTYPE, // brand can only go on obtype v0
F_ONLYFOROBCLASS, // brand can only go on obclass v0
F_ONLYFOROBWITHFLAG, // brand can only go on obs with flag v0
F_ONLYFORDAMTYPE, // brand can only go on obs with damtype v0
F_ONLYFORWEPSKILL, // brand can only go on obclass v0
// weapon/armour flags
F_EQUIPPED, // val0 = where it is equipped. CLEAR WHEN OB MOVED!
F_SECONDARY, // this object is player's secondary weapon.
F_GOESON, // val0 = where it can be equipped.
F_GOESONMULTI, // ob is equipped on _ALL_ F_GOESON flags, rather than
// equipped on _ONE OF_ the.
F_UNDERCLOTHING, // yuo can wear other armour on top of this one
// (on the same body part)
F_BONUS, // val0=bonus/penalty to damage+accuracy/armour. ie. +1 sword
F_THROWMISSILE, // weapon would make a good thrown missle - used by AI
F_THROWNBY, // this object was thrown by lifeform id v0.
F_CANHOME, // this object can have the 'homing' flag
F_UNIQUE, // only one may appear
// if v0 > 0, it means the % chance of this lf appearing.
// v1 = branch id to appear in (ie. BH_xxx)
// text = "min-max" (depth to appear at)
F_GLYPH, // override the glyph with f->val[1]
// v0 is either NA (white) or colourid (C_xxx).
// OPTIONAL v2: if you lorelev for this race is less
// then v2,
F_NOGLYPH, // this object doesn't appear normally
F_COSMETIC, // this object is mostly cosmetic, don't say 'you see xx'
// also don't stop the player running past it.
F_INVISOB, // this object cannot be seen
F_NOPICKUP, // cannot pick this up
F_ATTACKABLE, // can attack this with 'A'
F_IMPASSABLE, // cannot walk past this if your size is between v0 and v1
// (inclusive)
F_REALLYIMPASSABLE, // even gaseous form etc won't let you get through
// this.
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_DIMONDISTURB, // when a lf walks on this ob, its f_produceslight
// flag v0 reduces by one.
// if it gets to 0 (or doesnt have produceslight),
// the object will vanish.
//
// same happens if object is removed from the ground.
F_BLOCKSVIEW, // if v0 = true, cannot see past this
// if v0 > 0, reduces your vision by v0.
// if v1 = true then don't block sight if you are
// standing on it.
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_OBMOVESRANDOMLY, // object will randomly move around
// if v0 is true, it can destroy
// walls
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, // text = what this turns into when dying
// v0 = radius to scatter new object in
// (0 or NA means just convert the object)
// v1 = dirtype for radius
F_BREAKOB, // if killed by damtype v0, change to
// object 'text'.
// IMPORTANT: can only have up to 2 of these per
// damage type.
F_NOBLESS, // can't be blessed or cursed
F_NOQUALITY, // can't be masterwork / shoddy
F_NOSTEAL, // this object can't be stolen, blown away, etc.
F_SALTED, // this corpse has been salted and will not decay.
F_CORPSEOF, // this is a corpse of montype val0.
// v1 is its level when it died
// text is how it died.
F_ISMONSTER, // this object is really a mosnter staying still to
// trick you!
// v0 = race id of monster
// v1 = object id to hide as
// v2 = spot check difficulty (or NA)
// text = dist,xdy
// dist = reveal ourselves if prey <= dist
// xdy = dice string amount of obs to appear
//
// Also see: F_PRETENDSTOBE
F_REVIVETIMER, // v0 = cur, v1 = max. v0 incremenets each tick.
// when v0 == v1, this object changes into lf of race
// v2.
// text = what to say when they come back to life.
// eg. "comes to life!", "rises from the dead."
F_LIFEOBFOR, // this ob is the lifeobject for lf id v0.
F_HOMEOBFOR, // this ob is a homeobject for lf id v0.
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 'v0'
F_MATVULN, // vulnarable to damage from obs with material 'v0'
// v1 = this % of damage is done. ie. 110%
// if v2 > 0, you take this much dam just from touching it
F_PURIFIESTO, // v0 = new obid after purify food spell
F_CLIMBOBSTACLE, // must pass climb check of difficulty v0 to
// walk onto this object. if you fail, you fall
// in a random direction
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_ACTIVATEPREFIX, // when activated, prefix this objects name with
// text
F_CRITKNOCKDOWN, // lf knocks down victims on a critical hit
F_DRAINONHIT, // victims hit by this lf get v0 xplevs drained unless
// they pass a skillcheck of type v1, diff v2.
// v1 can be SC_NONE.
// if successful, lf gains 'text' hp (in dice format)
F_DRAINATTONHIT, // victims hit by this lf lose 'text' (dice format)
// from attrib v0, unless they make a skill check
// of type v1, diff v2. v1 can be SC_NONE.
// if ATT drops to zero, target dies.
F_HITCONFER, // hitting with this gives flagid=v0
// with timeleft = text ("min-max"
// or NULL for permenant)
// unless you pass a val1 skillcheck, diff val2
// if val1 = NA, no check.
// MUST ALSO HAVE HITCONFERVALS.
F_HITCONFERVALS,// specifies values for conferred flag.
F_HITCONFERRC, // hitconfer only works against victims of raceclass
// v0
F_HITCONFERDEADONLY, // hitconfer only works on fatal hits
F_ACTIVATED, // val0 = is this object turned on?
F_GRENADE, // this object will drain charge when activated, then die
F_EXPLODEONDEATH, // explodes when it dies, deals TEXT damage.
// val1 = explosion radius (dtorth)
// val2 = ifactivated, only explodes if activated.
F_EXPLODEONMOTION, // explodes when something walks onto it and
// deals TEXT damage.
// val1 = explosion radius (dtorth)
// val2 = ifactivated, only explodes if activated.
F_EXPLODEONDAM, // explodes when it is damaged, deals TEXT damage.
// v0 = damage type which makes it explode.
// NA means 'any damage type'
// val1 = explosion radius (dtorth)
// 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_SPELLCLOUDONDEATH, // cast spell v0 in radius v1 (orth) upon death.
// v2 = ifactivated
// text = "seebuf^noseebuf^spell_power"
F_SPELLCLOUDONDAM, // cast spell v0 in radius v1 upon damage.
// v2 = ifactivated
// text = "seebuf^noseebuf^spell_power"
F_SPELLCLOUDGLYPH, // v0 = enum COLOUR of the cloud
// v1 = glyph char
F_LASTDAMTYPE, // object equivilant of lf->lastdamtype
// v0 = damtype
// v1 = lfid who caused last dam
F_SCROLLNEEDSOB, // this scroll targets an object
// v0 = B_ALWAYS (always targets an ob)
// v0 = B_IFNOTBLESSED (only targets an ob if unblessed)
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
// v1 is bitmask of:
// TR_NEEDLOS, TR_NEEDLOF, TR_NONE
// optional v2 is range (otherwise unlimited)
// 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
F_HELPSCLIMB, // object gives v0 bonus to sc_climb checks.
F_HELPSDIG, // object can dig. does v0 dam to cells.
// also makes noise 'text' at volume v1
F_DIGCELLTYPE, // object can dig through this celltype
F_DIGCELLMAT, // object can dig through cells of this material
F_HELPSDISARM, // object gives v0 bonus to disarm trap checks.
F_HELPSREPAIR, // object gives v1 bonus to repairing obejcts
// made of material v0. Also decreases the
// damage cutoff by v2.
F_HELPSREST, // makes you heal mp/hp faster when using 'R'
// reduces skillcheck difficulty by v0.
// optional v1 = how many fewer turns between
// skillchecks. should not go more than
// DEFAULTRESTHEALTIME.
F_DONTSHOWDEST, // don't show destination of this stair
// object. ie say "staircase", not "staircase
// to level 4"
// technology flags
F_TECHLEVEL, // v0 is a PR_xxx enum for tech usage skill
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_REPLENISHABLE, // the 'replenish' spell works on this object
F_DONTSHOWCHARGES, // don't show 'xx charges left' when id'd
F_RECHARGEWHENOFF, // get power back when you turn it off
F_RECHARGE, // get v0 charges back each turn.
F_REFILLWITH, // pour obj id val0 onto this to refill its charges
F_PLAYERMISSILE, // this was a missile fired/thrown by the player
// used with the 'autopickup used missiles' option.
// what can you do with this object?
F_TAINTED, // will give food poisoning if you eat/drink it
F_PREPARED, // raw meat has been prepared using cooking skill
F_ISMEAT, // this food contains meat parts - not suitable for
// vegetarians
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_OPERSOUND, // v0 = volume of sound when operating this
// text = noise
F_OPERABLE, // can operate?
F_OPERWITHOUTHANDS, // can operate without having hands or being
// humanoid
F_OPERWITHOUTID, // can operate without knowing what it is?
F_NOTRIED, // don't show '[tried]' or update knowledge
// after you have tried this object.
F_POURABLE, // can pour?
F_PUSHABLE, // can push this object
F_PICKLOCKS, // can pick locks? val0=% chance,
// val1=b_false, f_dieonfail, f_bluntonfail
F_LOCKABLE,// this object can be locked
F_CANBEDIFFMAT, // v0 is different material id which this ob could be
// v1 is the chance of it being this material
// NOTE: when adding this to objects,always put the
// less commons ones first. if a lf starts
// with an object whose material they are
// vulnerable to, the object's material will be
// automatically changed to the first listed.
// CANBEDIFFMAT.
F_CANHAVELFINSIDE, // this object might start with a monster
// hiding inside it.
// v0 = base pct chance
// v1 = extra pct chance every 5 levels
// v2 = max chance
F_CANBETRAPPED, // this object might start with a trap
// v0 = base pct chance
// v1 = extra pct chance every 5 levels
// v2 = max trap chance
F_CANBEJAMMED, // this object might start off jammed
// v0 = base pct chance
// v1 = extra pct chance every 5 levels
F_CANBELOCKED, // this object might start off locked
// v0 = base pct chance
// v1 = extra pct chance every 5 levels
F_TRAPPED, // this object HAS a trap.
// v0 is the trap object type
// v1 - 'curtime' when this trap was last triggered
// v2 = TRUE means we've spotted this.
F_TRAP, // this object _IS_ a trap. v0 is sc_disarm/sc_spot difficulty.
// (NA = impossible)
// if v1 = true, trap will go off if you fail your 2nd disarm
// check.
// v2 = sc_dodge difficulty
// if text == "ground", then this trap only goes off
// if you're on the ground (ie not flying)
F_OBJECTTRAP, // this trap can go onto an object (door, chest, etc)
F_DOORTRAPONLY, // this trap can only go on to doors
F_DOORFALLOB, // if this object is trapped with OT_TRAPDOORFALL,
// text is the object it turns into after falling
// on you.
F_SMELLY, // lfs with enhacned scent can smell this object
F_MAKESNOISE, // object periodically makes noise.
// v0 = % chance of noise.
// v1 = volume.
// v2 = enum noiseclass
// f->text is the sound made. ie. "a splash."
// shops
F_BANNEDLF, // lfid v0 is not allowed to enter this shop
F_SHOP, // this object is a shop
F_SHOPDONATED, // v0 = how much gold worth you have donated
F_SHOPACCEPTSFLAG, // v0 = can sell/id items with flag v0 to this shop, for
// v1 percent of full value you can sell for
// NA means 'you can't sell it' (ie. id only)
// v2 = must be this objectclass (or NA)
F_SHOPMENU, // defines a menu for interaction with a shop
// v0 = (menuid*100) + itemorder
// ie. menu0 would have 0, 1, 2, 3
// menu1 would have 100, 101, 102, 103
// etc.
// v1 = enum MENUACTION
// v2 = value for action (optional)
// text = "x:whatever" (x is letter to press)
F_OPENHOURS, // v0 = shop open time (inclusive)
// v1 = shop close time (inclusive)
// v2 = enuim sayphrase SP_xxx when closed
// doors
F_DOOR, // this object is a door - ie. can open it
// v0 and v1 are like F_IMPASSABLE
F_OPEN, // is this door open?
F_LOCKED,// door is locked
// v1 is difficulty to disarm
// if v2 is set, this objcet can't be magically unlocked.
F_JAMMED, // is this door/container jammed?
// v0 is # turns it'll take to open it.
// v1 = have we tried this door/ob yet?
// (ie do we know it's jammed)
// v2 = unjam difficulty
F_SECRET, // this object is secret. v0 is sc_search difficulty
// to find it.
// NA means 'can never find this'
// stairs / teleporters / portals
F_STAIRS, // this object counts as a 'staircase'
F_CLIMBABLE, // this is a stiarcase, v0 = up/down/in
// also use this for portals
// text = you climb down a/an XXXX
// OPTIONAL v1 = id of region to link to.
F_PIT, // this is a pit which we can fall down.
// v0 = up/down
F_PORTAL, // this object counts as a 'magic portal'
//F_STAIRDIR//, // val0 = direcion
F_OPPOSITESTAIRS, // val0 = opposite kind of stairs
F_MAPLINK, // val0 = map id to link to.
// v1/v2 = x/y
// OR
// text = obid to link to
// ob interaction flags
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.
// if v2 is TRUE, it affects flying creatures
//
// 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_SCOREBONUS, // player gains (v1*65535)+v0 points at end game.
// text = reason (ie 'donated items' etc)
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_FLAMMABLELF, // lf is covered in something flammable
// if hurt by dt_fire, object id v0 will apepar under
// them.
// f->Text is what you are covered with (for desc)
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_BRUISABLE, // object can get bruised through bashing/projectile
// damage.
F_BRUISED, // object is bruised (nutrition penalty)
F_WET, // object is wet
F_RUSTED, // object is rusty
// v0 = enum RUSTINESS.
// object mods/effects
F_ONFIRE, // burning, also deals extra fire damage
//v1 = how much damage the object itself will take
// each turn. (NA or negative means '0')
// option text = xdx amount of extra damage to deal for
// weapons.
F_HOT, // object is very hot to the touch.
// v0 = amt of damage to deal if touched while gloveless
// text = amt of extra damage for weapons to deal
F_ENCHANTED, // weapon also deals 'text' extra fire 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 AMOUNT (not pct) is
// between v0 and v1.
// should always be singular
F_KILLVERB, // text=verb this weapon uses for a fatal attacking.
// ie. "kill" "behead"
// if v0/v1 are set, only use this text if
// dam PCT (not amount) 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_MAGICBOOST, // boost power of all spells by v0
F_TEMPMAGICBOOST, // boost power of next spell cast (only) by v0
F_WHIP, // this weapon is a whip - use different damtext.
F_STARTSPLAIN, // this object is never randomly generated with
// a bless/curse or with a +xxx bonus.
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
// v2 = "boostlev"
// text = scalepct.
// if attrib is less than v1, apply "scalepct" % penalty
// per 10 points under.
// if v2 != NA, and attrib is >= v2, apply "scalepct"% bonus
// per 10 points over.
// (up to a max of 20 points higher/lower)
//
// if scalepct == 0, then you MUST meet the base req.
//F_DAMTYPE, // val0 = damage type
F_CRITCHANCE, // v0 = %chance of critical hit with this weapon
F_CRITPROTECTION, // v0 = %chance of preventing critical hits
//F_DAM, // v0 = damtype, text = 1d1+1
F_DAM, // v0 = damtype,
// v1=DR (this takes precedence)
F_ALTDAM, // this weapon deal multiple damage types.
// v0 = damtype
// v1 = DR
// (add this flag multiple times for each damtype,
// and remember to include the one listed in its
// F_DAM)
F_MISSILEDAM, // text = dam if it hits (without speed multiplier)
F_MISSILEALWAYSDIES, // this object will always be destroyed when thrown
F_TANGLEMISSILE, // this object will trip anyone it is thrown at
// (if it hits), unless they pass a SC_SLIP
// check of difficulty v0
// if V1/V2 are set, then F_RESTRICTMOVEMENT
// v1->v0, v2->v1 is added to this object after it hits.
F_ACCURACY, // 100 - val0 = modify to tohit% (ie. higher is better)
F_ADJACCMOD, // +v0% tohit adjacent enemies
F_UNARMEDWEP, // this is not a real weapon, ie. claws, teeth etc
F_ARMOURIGNORE, // armour has no effect
F_ARMOURPIERCE, // goes through armour. armour can't reduce the
// damage dealt to less than v0.
// if v0 = b_true (or less than 0) it will
// pierce ALL armour
F_TWOHANDED, // weapon uses two hands to weild, if lf is size v0
// or smaller.
F_NEEDSSPACE, // weapon needs space to swing - 75% chance of hitting
// a wall if used with < 3 empty cells around you
// gun flags
F_FIREARM, // this weapon is equipped in bp_secweapon, not _weapon.
F_FIRESPEED, // how fast this weapon shoots projectiles
F_AMMOOB, // v0 = what object this weapon fires. can have multiple types.
// the first flag of this type added to an object becomes
// the default ammo type.
// v2 = B_TRUE means this is the basic ammotype.
F_AMMOCAPACITY, // v0 = max ammo that can be loaded
F_RANGE, // v0 = range of projectile firing weapon or spell
// optional v1 = minrange (for spells only)
F_RELOADTURNS, // # actions it takes to reload this gun
// end gun flags
F_GENERATES, // this object has a v0 pct chance of generating
// the object 'text' each turn.
// v1 = radius to generate obejcts within (including
// centre)
// if v2 is set, obs will be created in a random
// adjacent cell.
F_FLAMESTRIKE, // causes fires where you hit
F_BALANCE, // heals target if their maxhp < your maxhp
F_HOMING, // missile always hits
F_MERCIFUL, // puts to sleep instead of killing.
F_REVENGE, // causes damage based on your hp
//
F_POWDER, // this item is a powder
// ob appearance flags
F_SHINY,
// armour flags
F_MULTISIZE, // this object comes in varying sizes - calculate and
// assign a random f_armoursize on creation.
F_ARMOURSIZE, // v0 = sz_xxx, can be "medium", "human" or "large".
F_ARMOURRATING, // val0 * 2 = pct of damage reduced
F_COVERSFACE, // this armour copmletely covers the body part it is
// equipped on.
F_SHIELD, // this is a shield - use special bodyhitchance code
// v0 = amount to add to shieldblock skillcheck when using
// this.
F_CANBLOCK, // this objcet can block damtype xxx
F_DECAY, // v0 = decay level of this object.
// v2 = how much to decay each turn.
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
F_LINKGOD, // val0 = linked god race id
// container flags
F_LFINSIDE, // lf of race v0 is inside.
// scroll flags
F_LINKSPELL, // val0 = spell this scroll will cast when read
// v1 = spell power (optional)
// book flags
F_MANUALOF, // val0 = skill this book trains
F_LINKSCHOOL, // val0 = spellschool this book has spells from
// ob identification flags
F_HASHIDDENNAME, // whether this object class has a hidden name
// text is the name if you don't know what it is
F_IDENTIFIED, // whether this object is fully identified
F_KNOWNBAD, // you know this object is somehow bad
F_MOVELFS, // v0 = dir which this object will move lfs
// bad flags
F_DEEPWATER, // v0 = depth.
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_PLEASESGOD, // god id val0 likes this spell. pietymod=v1
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 is splev^2
F_STAMCOST, // v0=stamina cost of ability. default is 0.
F_ONGOING, // this spell has an ongoing cost
F_CASTINGTIME, // this spell takes v0 turns to cast
F_EXTRADESC, // text=extra descriptions for this object
// v0 is the order in which these are displayed (0-5)
F_BONDESC, // text=extra description for playable races.
// v0 is the display order.
// v1=true means 'don't display this one during
// player race selection)
F_PENDESC, // text=extra description for playable races.
// v0 is the display order.
// v1=true means 'don't display this one during
// player race selection)
//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
// v1 is pct chance of using this
F_AICASTTOATTACK, // AI can cast this spell to attack
// v0 is who to target
// v1 is pct chance of using this
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
F_HARDNESS, // must do >= v0 damage to hurt this
F_EATCONFER, // if you eat this lf's corpse, you have a
// text% chance of gaining flag v0.
// with vals v1,v2,text.
// OR
// eating this object gives it.
F_EATMUTATE, // same as eatconfer, but only works if you have
// f_mutable.
// player only flags
F_AICONTROLLED, // player will be controlled by the computer
// if v2 = F_RAGE, then this is because we are
// enraged.
F_DONEBURNMSG, // tells the game not to say 'the {celltype} burns!'
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 / monster flags
F_ABSORBKINETIC, // this lf is healed by kinetic attacks.
// optional v0: gain extradam +v0 damage of damtype
// v1, for v2 turns.
F_ADHESIVE, // this lf's skin is sticky. must pass a str check
// of difficulty v0 to avoid your weapon sticking
// to it, or it taking your shield if you block
// it.
F_ARBOOST, // modify lf's armour rating by v0
// this is slightly different from f_armourrating.
// f_armourrating is used for innate armour.
// f_arboost is used by objects "of protection" which
// enhance your armour rating.
F_BLOODBOIL, // lf will explode into flames upon death
F_CANSEVER, // critical slash attacks might sever bodypart v0
// v1: (optional) this will also remove HASATTACK
// flags with v2=this.
// v2: (optional) will also remove flags of CANCAST
// with v0 = this.
// text: object name of severed limb to drop
F_DIEAFTERUSING, // after this lf uses ability/spell id v0, they
// instantly die.
F_DONEPICKUP, // lf has used their free pickup/drop for this turn.
F_DONEKNOWLEDGETRADE, // you've already traded knowledge with this
// person.
F_FOLLOWTIME, // v0 = how long will ai chase you for? defaults to
// DEF_AIFOLLOWTIME.
F_FOUNDGODSTONE, // this flag is added once the player picks up their
// first godstone, and a god appears.
F_DAYBOOST, // this lf gets +v0 acc during the day
F_NIGHTBOOST, // this lf gets +v0 acc during the night
F_WINNER, // player has won the game!
// if you won by becoming a god, v1 = godid
// if you won by becoming a demigod, v1 = godid
// text = copied F_GODFLAG text from god.
F_BEHAVIOUR, // v0 = enum behaviour.
F_RNDSPELLCOUNT, // this monster starts with v0 random spells.
// needs to also have either f_rndspellschool OR
// f_rndspellposs.
F_RNDSPELLSCHOOL, // monster's random spells can come from
// school v0, between level v1 and v2.
// if v0 is SS_NONE, pick a random school.
// (optional) text = "pw:xxx;" to show spell
// power. if not given, power comes from depth.
F_RNDSPELLPOSS, // monster's random spells can be spellid v0.
// (optional) text = "pw:xxx;" to show spell
// power. if not given, power comes from depth.
F_NOSMELL, // lf can't smell. not affected by stench, and
// can't get enhancesmell.
F_NONAUSEA, // lf can't get nauseated but can still smell.
F_NOSTAM, // this lf has infinite stamina
F_NOTALK, // override ability to talk
F_NOGIVECRITS, // monsters can't take critical hits
F_NOTAKECRITS, // monsters can't take critical hits
F_RESTINGINMOTEL, // sounds will not wake up this lf. monster won't
// see them.
// v0 = max time allowed to rest before checkout
// v1 = total time rested
// text = obid of hotel
F_SWARM, // this lf is a swarm, its maxattacks are reduced
// based on its remaining hp pct.
F_SWIMEVASION, // +v0 evasion if swimming
F_ALIGNMENT, // v0 = al_good, al_neutral, al_evil. default neutral.
// if al_none is selected for the player, they
// can pick what alignment they want to be.
// text shows the choices ("g", "n" or "e")
F_PIETY, // for god lifeforms - tracks player's piety with them
F_NOPIETYLOSS, // piety for god v0 cannot be lowered. used
// to give a 'grace period'. NOTE: this flag goes
// on the _player_ ,not the god lfs.
F_AUTOTANGLE, // v0% chance to auto entangle on hit. spellpower=v1
F_PLANTFRIEND, // for player druids - makes plants friendly.
F_HOMEMAP, // which map did this lf get created on?
F_TOOKACTION, // lf purposely took action in their last turn.
F_JUSTENTERED, // lf just entered a new map.
F_DAMAGEGROUNDOBS, // lf causes v0 damage of type v1 to ground objects
// if v2 is TRUE, this happens even when lf is airborne
F_MOVED, // lf purposely walked/flew/swum/moved in prev turn
F_SYLVANWARN, // this lf has been warned by the sylvan forest not
// to attack it
F_HASBEENMOVED, // an object moved this lf since their last turn.
F_HOTFEET, // target takes v0 damage of type v1 unless they move.
// text = killed by xxx
F_MELEEDAMPCT, // all melee damage is changed to v0% of value.
F_NUMDEATHS, // # times died and saved
F_WASROBBED, // your stuff was stolen while you were
// unconscious. announce it when you wake up.
F_WOKENBY, // at the start of your next turn, you will wake up
// due to actions taken by lf id v0.
// if text is set, and it was the player waking up,
// then print this text.
F_TURNED, // lf turned this turn.
F_GODOFFERDONE, // player has been offered a position with a god
F_PRAYEDTO, // player has prayed to this god before.
F_GODBLOCKED, // player may NOT pray to this god
F_GIFTTIMER, // v0 = ticks down to zero whenever you please this
// god. when at 0, they might give you a gift.
// v1 = what v0 will reset to once you get a gift.
// increases by 50% each time you get one.
F_HPDRAIN, // lf loses v0 hit points eath turn.
// v1 = damtype
// text = killer damage string
F_GAVEMONEY, // v0 tracks how much money we gave away this turn
// used for r_godgreed anger effects.
F_CLIMBING, // lf is currently climbing a wall
F_CONSUMESOULS, // lf gains hp from those who die within v1 cells.
// up to v0% of their maxhp.
F_COUNTER, // generic counter flag for race abilities.
F_DEBUG, // debugging enabled
F_ACCURACYMOD, // modify your accuracy by val0
F_PLAYABLE, // player can select to be this race.
F_RACESLAY, // deal 4x damage to creatures of raceclass v0
F_NOFATALTEXT, // never say 'you kill xxx' for this lf
F_NOSTAIRS, // lf can't use stairs
// THIS CAN ALSO GO ON VAULTS:
// for vaults, it means that randomly created stairs
// cannot be created in this vault.
F_VAMPIRIC, // when on a lf:
// successful bite attacks from this lf will heal it
// when on an object
// successful attacks with this weapon will heal lf
// v0 = TRUE means always drain, otherwise only drain
// if victim has low hp.
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_SHADOWED, // can't see this lf if you are > v0 away.
F_SHIELDPENALTY, // lower your acc/ev by val0 due to a cumbersome
// shield. lowered by sk_shield skill.
// v0 is accuracy penalty, v1 is evasion penalty.
F_ARMOURPENALTY, // lower your acc/ev by val0 due to cumbersome
// armour. lowered by sk_armour skill.
// v0 is accuracy penalty, v1 is evasion penalty.
F_MINCRITCHANCE, // minimum critical hit chance % for this lf
// is v0.
F_MINDSHIELD, // lf is immune to psionic attacks
F_MISCASTCHANCE, // lf has +v0% chance of spell failure
F_LEVRACE, // at level v0, this race is promoted to race v1
// must apply this to the BASE race.
F_JOBATTRMOD, // add v1 to attr v0. only used in jobs.
F_SKILLCHECKMOD, // modify skillchecks of type v0 by v1.
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_SIZETIMER, // lf weill resize to LFSIZE val0 in val1 turns.
// v2 = B_FALSE = don't resize armour.
// B_TRUE = resize armour too
// text = "origSTR,origMAXHP"
F_UNSEENATTACKER, // this lf attacked lfid v0 while lfid v0 couldn't
// see them. used to mark 'X' on the player's map
// for unseen attackers.
F_USEDPOISON, // this lf used a poisoned weapon to attack
F_RANDOMTALKPCT, // v0 = chance of randomly saying something each turn
F_RANDOMTALK, // EITHER:
// v0 = sp_xxx for what to say when we randomly talk.
// v1/v2 are min/max volume
// OR
// text = what to say
// v1/v2 are min/max volume
//
// can have multiple of these flags, if so then
// randomly select one each time.
F_RESTCOUNT, // val0 = how long you've been resting for
F_NORESTHEAL, // this lf never gains hp from resting.
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_CAREFULMOVE, // 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_WILLTHROW, // this lf will treat obid v0 as a thrown missile.
F_CANLEARN, // lf is able to learn skill val0
// v1 = max lev
F_STAMBOOST, // lf gets v0 extra stamina
F_STARTOB, // val0 = %chance of starting with it, text = ob name
// val1,2 = min/max amounts. if NA, min=max=1.
F_STARTOBDT, // val0 = %chance of starting with damtype val1
// option val2 = addition to map depth for rarity
// calculation
F_STARTOBCLASS, // val0 = %chance of starting with obclass val1
// option val2 = addition to map depth for rarity
// calculation
F_STARTOBRND, // val0 = %chance of starting with a random ob
// v1 = depth modifier. can use 'RANDOM'
F_STARTOBWEPSK, // val0 = %chance of starting with wepskill val1
// v1 = wepskill of object
// optional val2 = addition to map depth for rarity
// calculation
// optional text = prefix for ob name.
// eg "good" "branded" "cursed" etc
// if this text is a rarity (ie. common) then
// it will be specially handled.
F_CONTAINER, // this object is a container - you can use 'o'
// to take stuff out or put it in.
F_CONTENTS, // v0 = enum CONTAINERCONTENTS for this container
// when object is generated, a random F_CONTENTS
// flag will be chosen.
F_HOLDING, // this container is a xxx of holding and makes objects
// inside become weightless
F_STARTJOB, // val0 = %chance of starting with it, v1 = jobid
F_STARTSKILL, // val0 = skill id
F_STARTATT, // val0 = A_xxx, val0 = start bracket (ie. IQ_GENIUS)
// if text is set, it overrides val0.
// text can be:
// x (single number)
// x-y (range)
F_STARTASLEEPPCT, // v0=pct chance this mosnter starts off asleep
F_STARTHIDDENPCT, // val0 = pct chance auto-generated monster will
// start off hidden
F_CORPSETYPE, // text field specifies what corpse obtype to leave
// NULL no corpse.
F_CORPSEFLAG, // add flag v0 to our corpse.
// v1->v0, v2->v1, text->text
F_EXTRACORPSE, // text field specifies what additional corpse
// obtype to leave
// v0 = pct change for this to happen. NA = 100.
F_CORPSELF, // v0 = race of lf to create when this lf dies.
F_LIFEOB, // v0 = obtype of life object
// OR
// text field contains obid of life object
// (text overrise v0)
// if lf is not witihn v1 dist of this object(s),
// they lose v2 hp
// (used by ghosts)
F_NOCHARM, // monster is not charmable
F_NOCORPSE, // monster's body crumbles to dust after death
F_NOCTURNAL, // monster sleeps during the day
F_DIURNAL, // monster sleeps at night
F_NOSLEEP, // monster doesn't sleep
F_NOSKILL, // lifeform CANNOT ever learn skill v0
F_LFSUFFIX, // text = suffix. eg. "skeleton"
F_VISRANGE, // how far you can see (in the light)
F_VISRANGEMOD, // v0:modifications to visrange
F_NIGHTVISRANGEMOD, // v0:modifications to nightvisrange
F_GUNTARGET, // current projectile weapon target
// v0 is guntarget id.
// text is targetting string (ie. Orc [50%])
F_THROWING, // set while the player is throwing/firing something
// f->text = obid of what we're throwing
// if f->text is NULL, we're using a firearm.
F_CASTINGSPELL, // set while the player is casting a spell
// for instant spells:
// v0 is spell id
// for noninstant spells:
// v0 is spell id
// v1 is spell power
// v2 is counter until casting
// text is: "targlfid;targobid;mapid;cellx;celly;"
F_AVOIDOB, // for AI - they will avoid walking on obid 'text'
// (text is a long)
// if v0 is not NA, then only avoid it if its blessed
// value == v0.
F_AVOIDOBTYPE, // AI won't walk on top of obtype v0.
// if v1 == B_TRUE, then avoid lfs weilding this
// object too.
F_AVOIDCELL, // AI won't walk on top of cell x/y = v0/v1
F_STAYINHABITAT, // lf will not walk onto a cell of a different
// habitat
F_STAYINROOM, // lf will not walk out of roomid v0
// if v0 is not set, we won't leave our current room.
// if v1 is B_MAYCHASE, then we are allowed to chase
// our targets out of the room.
// THIS CAN ALSO GO ON VAULTS:
// for vaults, it means that monsters created in
// this vault will have: f_stayinroom, na, maychase, na
F_FALLDISTANCE, // how many floors this lf has fallen through.
// ABILITY/SPELL FLAGS / ability flags / spell flags
F_FAILEDINSPECT, // lf has failed an inspect check for objecttype v0
F_TARGETTEDSPELL, // this spell needs you to specify a target cell
// v0 is the tt_targettype
// if V1/v2 are set, then this is only spells with
// power in the range v1-v2 are targetted.
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_CASTCHANCE, // this lf has v0% chance of using spell/abil
// (default is 15%)
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_NOSCORE, // denotes that the player received 0 points.
// ie. cheating or they quit.
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_HIRABLE, // this job/lf can be recruited by chatting and paying
F_TAMABLE, // this lf can be made into a pet by giving objects
// which they want.
// must pass SC_SPEECH of difficulty v0
F_HIREPRICE, // how much it costs to hire this lf.
F_NOHIRE, // this lf will not be hired.
F_INFOPRICE, // v0=price this lf wants to share info
F_NOINFO, // this lf will NOT share info
F_KNOWSABOUT, // text is a list of things this lf knows about:
// e = exits
// s = shops
// t = traps
// o = rare Objects
// m = rare Monsters
// eg: text=="st" means they know of shops+traps
F_NOJOBTEXT, // this lf's name is 'a xxx', not 'a xxx wizard' etc
F_LASTDIR, // this is the last direction we moved.
F_LASTATTACKHIT, // did our last attack hit or miss?
// v0 = B_TRUE = hit
// v0 = B_FALSE = miss
//F_OWNERLASTDIR, // for pets, this it the last dir our owner moved
// when we could see them.
F_ISPRISONER, // this lf wants to escape to the surface
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.
// note: can also go on corpse objects to show that this
// is the corpse of a pet.
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_OWNSSHOP, // v0 is roomid of the shop which this shopkeeper owns.
F_GUARD, // this lf is a guard, who can be called by shopkeepers
F_HATESALL, // lf will attack ALL other lfs on sight
F_HATESRACE, // lf will attack lfs with race=v0 or baseid=v0 on
// sight
F_HATESRACECLASS, // lf will attack lfs with raceclass->id=v0
F_HATESRACEWITHFLAG, // lf will attack lfs with flag v0 on sight
// will also check flag v0=this v1 and
// flag v1 = this v2
F_TERRITORIAL, // lf will attack ALL other visible lfs within range v0
F_HARMLESS, // it is safe to rest around this lf
F_RNDHOSTILE, // v0% chance of being hostile.
F_HOSTILE, // lf will attack the player if in sight
F_FRIENDLY, // lf will attack all non-players if in sight
F_FATALFOOD, // if lf eats food with id = v0, they die.
F_NATURALFLIGHT, // lf can fly natural using wings or similar
F_WANTS, // lf will try to pick up object type val0.
// if val1 = B_COVETS, will even abandon attacks
// for it!
F_WANTSOBMAT, // lf will look for obs of material v0. val1=covets
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_GERMS, // lf taints any good it walks onto
F_HECTAESCAPEE, // v0 drops by 1 each turn until the player
// can see us. if it gets to 0, anger
// hecta by v1.
F_NOFLEE, // lf will not run away
F_NOPRAY, // lf cannor pray
F_ATTACKRANGE, // v0/v1 = min/max celldist to stay away
// from f_targetlf (ie. lf we are attacking)
F_FOLLOWRANGE, // v0/v1 = min/max celldist to stay away
// from pet's master
F_FEIGNFOOLEDBY, // lf shouldn't attack lf id v0 because they
// are feigning death
F_AIPATH, // text = list of coordinates for ai path,
// in form:
// x,y-x,y-x,y-x,y...
//
// v0/v1 = x/y of end cell
F_AIHITBYRANGED, // ai lf has been hit by a ranged attack.
// used to figure out when to use our
// fullshield ability
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_TURNSINPEACE, // v0 is a counter for how many turns this ai
// mosnter has gone without being in battle.
F_PHANTASM, // this lf is a phantasm - can deal no damage, and
// uses v0 as a fake hp counter.
//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
F_ALREADYFLED, // player has already gained piety from letting
// this lf run away.
// TEMP FLAGS
F_KILLEDBYPLAYER, // did the player (or an ally) kill this lf?
// monster noise flags
F_WALKVERB, // text is verb for moving. 'walk' 'slither'
// 'bounce' 'hop' etc
F_NOISETEXT, // val0 is a enum NOISETYPE
// val1 is the volume of the noise
// text is "verb^noun"
// eg. "shouts^a shout"
// if this flag occurs more than once with
// the same v0, a random one is selected.
// if val2 is not NA, then ignore 'text'
// and just call say() with
// SAYPHRASE val2 (SP_xxx)
F_SPELLCASTTEXT, // text is announcement for spellcast
// if text is empty, then don't announce
// this lf's spell casting at all.
// if v0 != OT_NONE, only use text
// for spellid v0
// if v2 is 'appendyou' " at xxx" will
// be appended.
F_SPELLCASTCONTTEXT, // text is announcement for "xx continues
// casting a spell".
// if v0 != OT_NONE, only use text
// for spellid v0
F_SPELLCASTTIME, // override F_CASTINGTIME to v0 when this lf
// casts spellid v1.
F_AISPELLTARGETOVERRIDE, // when casting spellid v0,
// use AICASTTOxxx=v1 instead of the one
// from the spell.
// use targettype = v2, intsead of the one
// from the spell.
// OPTIONAL: text = pctchance to cast for
// thispurpose. if not given, chance is 100.
F_NODEATHANNOUNCE, // don't say 'the xx dies' if this lf dies
F_NODEATHSPEECH, // lf doesn't talk when dying
F_BEHEADED, // use special corpse drop code
F_MUTILATED, // this corpse has had its head removed, or been split
// in half. this will stop some monsters from
// reviving.
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%
// val[2] = commonality (enum RARITY RR_xxx)
// NA means rr_common
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, // v0 = number of hitdice to roll per level
// v1 = +xxx
// v2 = hitdie sides, if NA, use HITDIESIDES
F_TR, // v0 = threat rating of this race.
F_MAXHPMOD, // maxhp = pctof(v0, maxhp)
F_MPDICE, // val0: # d4 to roll for maxmp per level. val1: +xx
F_GENDER, // v0 = G_MALE or G_FEMALE. default if G_NONE if this
// flag isn't set.
F_JOB, // val0 = player's job
F_GODBONUS, // this god gives enum GODBONUS v1 at pietylev v0
// v2 = arg to GB..
// text = arg2
F_GODBONUSTEXT, // text = what the god says when you get a bonus
F_GODNOBONUSTEXT, // text = what the god says when you lose a bonus
F_GODGIFTTEXT, // text = what the god says when you get a gift
F_GODASK1, // text = how the god asks you to join them
F_GODASK2, // text = how the god asks you to join them (2nd line)
F_GODDECLINE, // text = what the god says if you decline offer to join
F_GODTEXTAPPEAR, // text = godname ->xxxxx<- (when they teleport in)
F_GODOF, // text = what this lf is the god of. use capitals.
F_GODLIKES, // text = something this god likes (ie. incs piety)
F_GODDISLIKES, // text = something this god likes (ie. decs piety)
F_GODBATTLE, // text = what this god will do for you during battle
F_GODNOBATTLE, // text = what this god will do for you outside battle
F_GODPOISON, // v0=TRUE: god likes using poison. gain v1 piety
// v0=FALSE: god hates using poison. lose v1 piety
// for all sacrifice flags:
// v2: amt of piety for each sacrifice
// text: "the xxx disappears in yyyy"
// (yyyy is text)
// IS is replaced with "is" or "are"
// OB is replace with object name
F_SACRIFICEOBWITHFLAG, // v0 = can sacrifice obs with flag v0 to this go
F_SACRIFICEOB, // v0 = can sacrifice obtype v0 to this god
// if v1 is set, object must be the
// corpse of something with raceclass v1.
F_SACRIFICEOBCLASS, // v0 = can sacrifice obclass v0 to this god
F_SACRIFICEOBBLESSED, // v0 = can sacrifice obs with ->blessed=v0 and blessknown!
F_SACRIFICEOBMAGIC, // can sacrifice obs which are magical.
// v2 = piety per ob
F_GETKILLEDVERB, // text = verb describing how this lf dies.
// NOTE: overrides F_KILLVERB on weapons!
F_NAME, // text = lf's name. ie. lfname = "Fred"
// also used for names of OT_GRIMOIRE objects
F_NAMED, // text = lf's name. ie. lfname = "xat named Fred"
F_NOKO, // this lf cannot be knocked unconscious
F_XPMOD, // add/subtract this much from calculated xpval
// for killing this monster.
F_BLOODOB, // text = type of object to drop for blood
// corpses will inherit the FIRST one of these only.
F_UNSUMMONOB, // text = type of object to drop when this creature
// uis unsummoned.
F_DIESPLATTER, // this lf will splatter objcets of type 'text'
// when it dies.
// v0 = max distance to splatter (or UNLIMITED)
// v1 = how fast to shoot objects (0 = just place them)
// 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_RETAINHPONPOLY, // don't take on hp/mp of what you polymorph
// into
F_SHORTCUT, // spell keyboard shortcut.
// v0=slot (0-9)
// text=spell text
F_ANTICIPATE, // next v1 attacks from lfid v0 will auto miss.
// when v1 drops to 0, flag vanishes.
// for monsters
F_MPMOD, // this race gains/loses v0 mp each level
F_AUTOROTATE, // this race will rotate by v0 each turn (positive =
// clockwise).
// also means they won't respond to noises.
F_DOESNTMOVE, // this race doesn't move (but can still attack)
// if v2 is TRUE, it won't attack either, or even
// try to change its facing.
F_CANTALK, // this lf can talk, even if its raceclass normally
// wouldn't be able to.
F_CANEATMATERIAL, // this lf can eat objects with material v0,
// even if it's not normally edible.
F_AQUATIC, // this race can attack normally in water and suffers no
// movement penalties. they can also swim at master
// level.
F_AVIAN, // this race is an avian
F_CANINE, // this race is a canine
F_EQUINE, // this race is an equine
F_FELINE, // this race is a feline
F_HUMANOID, // this race is a humanoid
// (can wear armour / use weapons)
F_INSECT, // this race is classed as an insect
F_LYCANTHROPE, // this race is a lycanthrope.
// text = what to turn into.
// v0 = # of automatic full moon chnages left.
// each auto change will decrement this, down
// to zero.
// -1 means always change on full moon.
F_UNDEAD, // this race is classed as undead
F_COLDBLOOD, // this race is coldblooded
F_LOTSOFLEGS, // this race is centipede-like - heaps of legs
F_NOBODYPART, // this race doesn't have bodypart val0
// if v0 is true or b_frominjury, you can regrow it
// via a healing potion.
F_NOINJURIES, // this race cannot sustain injuries.
F_NOATTACK, // this lf can't attack
F_NOPACK, // this race cannot hold objects
F_NOSPELLS, // this race cannot cast spells (except for ones
// with FROMRACE)
F_NOPRINTS, // this race doesn't leave footprints
F_INDUCEFEAR, // causes fear when you attack it
F_POISONCORPSE, // lf's corpse will be poisonous
F_AUTOCREATEOB, // produces obtype 'text' wherever it walks,.
// (only if ob of that type not already there)
// v0=radius around the lf to create it in.
// if (v0 == -1), then create object in front
F_PHALANX, // gain v0 AR if v2 or more adj monsters matching f->text
F_MORALE, // gain +v0 in morale checks.
F_6SENSEWARNED, // player's th sense spell has warned them
// about this lf already.
F_SPOTTED, // you have spotted hiding lf id v0. you lsoe this if they
// go out of sight.
F_TIMID, // monster will only move close if behind its target.
F_VULNTOSALT, // salt kills this monster
// special attack flags
F_AIMEDSTRIKE, // next attack is an aimed strike
F_COMBOSTRIKE, // lf is performing a combination strike
F_HEAVYBLOW, // next attack is a heavy blow
F_QUIVERINGPALM, // your next strike will be a quivpalm attack
F_STRIKETOKO, // your attacks will never kill, just KO.
F_TKTHROW, // when you throw an object, use your
// attrib = v0 and skilltype = v1
// rather than AGI and SK_THROWING like normal
F_TRUESTRIKE, // your attacks ALWAYS hit. turnsleft=v0
F_HURRICANESTRIKE, // lf is performing a hurricane strike
F_PROTALIGN, // attacks from lfs with aligh = v1 are repelled.
// turnsleft=v0 (can be PERMENANT)
// INTRINSICS
F_MAGICARMOUR,// armour is magically boosted. f->text is the description
// ie 'magic armour', 'force field'
// v0 is power left.
F_ANONYMOUS, // when worn on eyes, shopkeepers can't ban you
F_ASLEEP, // lf is asleep.
// v1 is enum sleeptype st_xxx
// if v2 is set, means we are sleeping on
// purpose and will wake up when at full hp/mp/etc.
// ie. "resting"
// text = obid of light source which you turned off.
F_ATTACHEDTO, // you are attached to lf id v0, and will move with it
F_AWARENESS, // you can see 360 degrees around yourself
F_BEINGSTONED,// turn to stone when v0 drops to zero. (drops 1/turn)
F_BLIND, // cannot see anything
F_SOULLINK, // lf is soul-linked to lfid v0. if they take damage, so do
// we.
// text = damstring, ie. "x's soullink spell"
F_CONFUSED, // move randomly about
F_DEAF, // cannot hear
F_SILENCED, // cannot make nosies
F_NEEDOBFORSPELLS, // if v0 != NA, lf can only cast spells if
// it has object v0
// if v1 != NA, lf can only cast spells if they
// have an object with flag v1.
// text = name of object you need, only used for
// messages.
F_CASTTYPE, // lf uses enum CASTTYPE v1 for spellid v0. (ot_none=all)
// optional v2 is colour for casttype-based animations
// (ie. spit spells)
F_CAFFEINATED, // can't sleep.
F_CANEATRAW, // lf can eat raw food with no issues
F_CANCAST, // can cast the spell val0 (need MP)
F_CASTWITHOUTIQ, // can cast spells even eith low iq.
F_CANHEARLF, // you can hear lifeform id v0
// if v1 is TRUE:
// show their glyph on the map
// when cursor is over them, desc is their name.
// if v1 is _NOT_ TRUE:
// show a generic 'noise' symbol on the map
// when cursor is over them, use f->text
// this flag does not get announced.
F_LOWHPABIL, // will automatically use the ability v0 when
// this lf starts bleeding.
F_NOBREATH, // this lf doesn't need to breath.
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;
// gaze (this is a gaze spell)
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 of type v1 in orthog dist v0
// v1 = NA means everything.
F_DISEASEIMMUNE, // lf can't be diseased
F_DRUNK, // v0 is drunknness - 1-5.
F_ENHANCESEARCH, // gives v0 bonus on search checks.
F_ENHANCESMELL, // can 'see' scents with v0 range.
F_EXTRADAM, // FOR LIFEFORMS OR WEAPONS!
// if V2 is not NA, inflict this much extra dam of
// damtype v0.
// if V2 _IS_ NA, then:
// this lf does 'text' extra damage of damtype v0
// if v1 is TRUE, also deal extra damage based on
// the flagpile's F_BONUS flag.
//
// if v0 is NA, damage is added to initial damage
// roll.
F_EXTRADAMWITHCHARGES, // if this objects has charges remaining,
// deal an extra "text" damage of type v0.
// if v2 = IFACTIVE , only works if ob has been
// activated.
F_EXTRAINFO, // knows extra info
F_EXTRALUCK, // lf gets +v0 to all skill checks!
// higher chance of rare objects
// lower chance of rare monsters
F_EXTRAMP, // lf has +v0 % extra maxmp
F_FEIGNINGDEATH, // lf is pretending to be dead
F_FLYING, // lf is flying. v0 = feet height
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_FEARLESS, // cannot be scared.
F_INCUBATING, // will become poisoned when v1 drops to 0.
// ie obfrom is being used as a timer.
// v0 = poison thpe
// v1 = invubation time left
// v2 = howlong
// obfrom = if you ate a corpse, this records its race
// otherwise, NA.
// text = power^fromwhat .eg'a bad egg'
F_VENOMSAC, // this object is a venom sac, used to create poison
// potions
F_POISONED, // has poisoning. v0 = poison type,
// v1 = power
// v2 = if you ate a corpse, this records its race
// otherwise, NA.
// text = what from.eg'a bad egg'
F_FREEZINGTOUCH,// next thing touched turns to ice!
// v1 = power
// v2 is save difficulty
F_FULLSHIELD, // lf is fully hiding behind a shield (obid v0).
// text = obid of shield being used.
F_GRABBEDBY,// you've been grabbed by lf id v0
F_GRABBING, // you are grabbing lf id v0
F_HIDING, // lifeform is hiding. v0 is modifier to stealth checks.
F_ICESLIDE, // lf has "slide" spell active.
// v0 = timeleft (since 'lifetime' is used for FROMSPELL)
F_INJURY, // v0 = enum injury, v1 = where (enum bp), v2 = damtype
// text is desc, ie "rib is cracked"
// special: 'obfrom' is used to determine whether this
// is a new injury.
F_INVISIBLE, // lifeform is invisible
F_INVULNERABLE,// immune to most damage
// this can apply to objects too!
F_KNOWSTIME, // this lf knows what time it is.
// v0 = false means you know 12 hour time
// v0 = true means you know 24 hour time
F_GRAVBOOSTED,// cannot walk or throw stuff
F_GRAVLESSENED,// knockback maeks you go further, can jump further
// your current load is reduce by v0 * 15kg.
F_MEDITATES, // meditates instead of sleeping.
F_MUTABLE, // you can mutate by eating corpses.
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_PARANOIA, // mosnters randomly appear out of sight, or random
// noises happen from behind you.
F_PRETENDSTOBE, // this lf will pretend to be object v0.
// when bored, revert to an ob of type v0.
//
// if 'text' is set, then v0's contents object
// should be this.
//
// Also see: F_ISMONSTER
F_PRONE, // lying on the ground
F_FROZEN, // made of ice
F_HEAVENARM, // prevent the next v0 damage received.
// when v0 drops to <= 0, flag goes.
// text = name of armour.
F_HOLYAURA, // holy aura - attacks deal holy damage to vulnerable
// enemies.
F_HOLYTOUCH, // weilded weapons/armour become temporarily blessed.
F_LEARNBOOST, // +v0% xp and skillxp
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= resist%
F_POLYIMMUNE, // cannot be polymorphed.
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_REFLECTION, // missiles are reflected back at thrower
F_RETALIATE, // deal damage to anyone who hits you
// v0=ndice, v1=dsides, v2=damtype, text=obname
// new:v0=damtype, text=dam^obname
// obname must have at least TWO words
F_RISEASGHOST, // become a ghost when you die.
F_SEEWITHOUTEYES, // doesn't need eyes to see
F_SEEINDARK, // nightvis range is val0
// if v1 is B_BLINDABLE, then bright light will
// blind us.
F_SEEINVIS, // can see invisible things
F_SPIDERCLIMB, // lf can climb at 100% success rate, and climbing
// does not drain their stamina.
F_SILENTMOVE, // lf makes no noise when walking/flying
F_SIXTHSENSE, // warned about nearby enemies. v0 = power.
F_STABILITY, // doesn't slip over
F_STAMREGEN, // boost stamina regeneration at 'text' per turn
// (this is a float)
F_STENCH, // on lifeforms:
// creatures within v0 gain f_nauseated = v1
// on objects:
// creatures standing on it gain f_nauseated = v1
F_STUNNED, // cannot attack or cast spells
// or use firearms, or throw, or operate stuff
F_TREMORSENSE, // doesn't need eyes to see, can see in dark with v0
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_STASIS, // many startlfturn effects don't happen.
F_SLOWACT, // modifier for action speed
F_SLOWMETAB, // hunger counter increases slower, poison cures slower.
// v0 is multiplier
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_CANSEETHROUGHLF, // larger lifeforms don't block los for us
F_PATHFINDING, // you are following a path via 'G'
// to coords v0,v1 on mapid v2
F_SPRINTING, // you are sprinting.
F_WOUNDING, // increase all damage done by this lf by v0
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
// skills
F_HASSKILL, // lf has skill v0 at level v1
// if v2 is B_TRUE, it means we've used this
// skill since gaining/increasing it.
// (ie. it's a candidate for a random increase
// at levelup)
F_PRACTICINGSKILL, // lf is practicing skill v0
// COMBAT
F_MAXATTACKS, // v0 = min # attacks this lf can make per round
// v1 = max # attacks this lf can make per round
F_HASATTACK, // v0 = obid to use when attacking unarmed
// if v1 is set, it overrides DR(damagerating)
// if text is set, it overrides the damage
F_FORCEATTACK, // this lf may only attack using F_HASATTACK v0
F_EVASION, // % chance of evading an attack
// healing/resting/training
F_STATGAINED, // keeps track of what attrib we picked to increase
// on each levelup (used for subsequent level drains)
// v0 = level , v1 = stat selected
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/training/eating. stop!
F_EATING, // lf is eating obid v0
F_DIGGING, // v0/v1 = cell where lf is digging.
// v2 is how much to dig per turn.
// text = obid of tool we are using to dig.
F_REPAIRING, // text = obid of held item we are repairing.
F_TRAINING, // are we training? cleared on any action other than rest.
// v0 = current training amount
// v1 = training target.
// when v0 == v1 , you finish trainign.
F_RESTUNTILBETTER, // resting until we have full mp/hp/stam
//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? (shift+dir)
// v0 is last dir moved.
// v1 is whether we have turned yet.
// v2 = what walls to our left and right are:
// 0 = l+r cells clear
// 1 = l cell walled, r cell clear
// 2 = l cell clear, r cell walled
// 3 = l+r cells walled
// nutrition
F_HUNGER, // val0 = hunger, higher = hungrier
// for jobs (job flags)
F_SELECTWEAPON, // this job gets to pick their starting weapon
// and obtype v0 is one of the options.
F_NOSELECTWEAPON, // override F_SELECTWEAPON from job
F_NOPLAYER, // players can't pick this job
F_HASPET, // this job starts with a pet of race f->text
//F_CANHAVESUBJOB, // this job can have subjob = v0
//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 from any school they are skilled in.
// if v0 is >100, this triggers every (v0-100) levels.
F_LEVSPELLSCHOOLFROMX, // at level v0, this job gains f_cancast for a
// spell from school v1. you can pick one from
// v2. if v1 is SS_NONE, they can
// pick from 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
// vault flags
F_AUTODOORS, // automatically create at least one door
// v0 is pct chance of door (as opposed to empty
// doorway with no door).
F_AUTOPOPULATE, // fill this vault with obs/mons/pillars like normal rooms
F_MAINTAINEDGE, // when calling fixreachability(), only allow
// corridors to enter this vault through cells
// marked as exits.
F_NORANDOM, // this vault does not randomly appear
// OR this spell doesn't apear in books
F_MONSTERSSTAY, // monsters in this vault won't leave it
F_VAULTATOB, // v0/1=x/y, v2=pctchance, text=obname
F_VAULTATLF, // v0/1=x/y, v2=pctchance, text=lfname
F_VAULTATCELL, // v0/1=x/y, v2=pctchance, text=cellname
F_VAULTATONEOF, // v0=thingtype, v1 = pctchance
// text=(x,y)(x,y)(x,y)...(x,y) thingname
F_VAULTBOX, // v0=thingtype, v1=pctchance, v2=fill?, text=x1,y1,x2,y2,thingname
F_VAULTENTERTEXT, // text = what to show when player enters
F_VAULTDLEVMIN, // v0 = mininum map depth/difficulty for this vault
F_VAULTDLEVMAX, // v0 = maximum map depth/difficulty for this vault
F_VAULTEXIT, // v0/1=x,y for exit.
F_VAULTHABITAT, // call cells in this vault have habitat=v0
F_VAULTGOESIN, // this vault randomly appears in habitat type v0.
// can be repeated multiple times
// if a vault doesnt have this flag, it can go anywhere
F_VAULTISPLAYERSTART, // player can start in this vault
//F_VAULTISSHOP, // this vault is a shop, so add f_shopitem to objects
// here.
F_VAULTHASFIRE, // this vault contains obejcts/lfs made of fire
// ... so don't place it on a map where the floor
// is flammable!
F_VAULTISSHRINE, // this vault is a godstone shrine
F_VAULTRARITY, // v0=rr_xxx
F_VAULTSCATTER, // v0=thingtype, v1=pctchance
// text=x1,y1,x2,y2,mincount-maxcount,thingname
// if maxcount is PCT, mincount is a percentage
// of the total space.
F_VAULTTAG, // vault has tag 'text'. for use with
// vt_rndvaultwithtag.
F_VAULTMAYROTATE, // may rotate this vault in 90degree increments.
F_VAULTMAYFLIPX, // may flip this vault horizontally
F_VAULTMAYFLIPY, // may flip this vault vertically
F_VAULTNOLINK, // this vault doesn't have to be connected to the
// rest of the map.
F_VAULTRANDOMMAP, // v0=minwidth, v1=minheight. this vault's map is
// v0/1 can be NA.
// OPTIONAL: v2 = floor cell type id
// OPTIONAL: text = wall cell type id (int)
// just a normal random room
F_KEEPMARGIN, // this vault must be at least v0 from e/w of map
// and at least v1 from n/s of map
F_LAST,
F_NULL = -1
};
// move reasons
enum MOVEREASON {
MR_OTHER,
MR_LF,
MR_OB,
MR_SOUND,
};
// 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
};
// injuries
enum INJURY {
IJ_NONE,
// bashing
IJ_ANKLESWOLLEN,
IJ_HANDSWOLLEN,
IJ_BLACKEYE,
IJ_CONCUSSION,
IJ_FINGERBROKEN,
IJ_LEGBROKEN,
IJ_LEGBRUISE,
IJ_NOSEBROKEN,
IJ_RIBBROKEN, // can be from explosive too
IJ_RIBCRACKED, // can be from explosive too
IJ_SHOULDERDISLOCATED,
IJ_TAILBRUISED,
IJ_TAILBROKEN,
IJ_TORSOBRUISED,
IJ_TORSOBRUISEDBAD,
IJ_WINDED,
IJ_WINDPIPECRUSHED,
IJ_WINGBRUISED,
// slashing
IJ_ARTERYPIERCE,
IJ_BRAINRUPTURED,
IJ_CHESTBLEED,
IJ_HAMSTRUNG,
IJ_HANDBLEED,
IJ_HEARTPIERCED,
IJ_LEGBLEED,
IJ_TENDONCUT,
IJ_FINGERMISSING,
IJ_EYELIDSCRAPED,
IJ_EYEDESTROYED,
IJ_TAILBLEED,
IJ_WINGBLEED,
IJ_WINGTORN,
// explosive
IJ_BLINDED,
IJ_EARSRINGING,
IJ_HANDMISSING,
IJ_LUNGCOLLAPSED,
IJ_TAILLACERATED,
IJ_WINGDESTROYED,
};
#define PIETYPRAYLOSS 75
#define PIETY_MIN -200
#define PIETY_MAX 400
enum PIETYLEV {
PL_ENRAGED = -4,
PL_FURIOUS = -3,
PL_ANGRY = -2,
PL_TOLERATED = -1,
PL_INDIFFERENT = 0,
PL_PLEASED = 1,
PL_DELIGHTED = 2,
PL_ECSTATIC = 3,
};
/*
enum LIGHTLEV {
L_PERMDARK = -1,
L_NOTLIT = 0,
L_TEMP = 1,
L_PERMLIGHT = 2,
};
*/
// spell targets
enum SPELLTARGET {
ST_NONE = 0, // dont cast at all. for debugging.
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
};
// errors
enum ERROR {
E_OK = 0,
E_WALLINWAY = 1,
E_LFINWAY,
E_NOSPACE,
E_BADCLIMBDIR,
E_BADCLIMBDIR2,
E_STOPCLIMBING,
E_SELNOTHING,
E_ALREADYUSING,
E_WEARINGSOMETHINGELSE,
E_NOUNARMEDATTACK,
E_NOTEQUIPPED,
E_EQUIPPED,
E_UNDERNEATH,
E_NOPICKUP,
E_STUCK,
E_MONSTERNEARBY,
E_NOEFFECT,
E_RESISTED,
E_FAILED,
E_WRONGCELLTYPE,
E_OBINWAY,
E_TOOHEAVY,
E_TOOHARD,
E_TOOSOON,
E_NOHANDS,
E_NOPACK,
E_INSUBSTANTIAL,
E_WRONGOBTYPE,
E_CURSED,
E_NOLOS,
E_NOLOF,
E_IMPOSSIBLE,
E_PALADIN,
E_PALADIN2,
E_NOTARGET,
E_NOAMMO,
E_GRAVBOOSTED,
E_NOABIL,
E_NOMP,
E_NOSTAM,
E_NOSPELLS,
E_AVOIDOB,
E_FROZEN,
E_TOOBIG,
E_TOOSMALL,
E_NOTREADY,
E_BLIND,
E_GRABBEDBY,
E_CANTMOVE,
E_NOTKNOWN,
E_TOOPOWERFUL,
E_NEEDGRAB,
E_DOORINWAY,
E_NOCANNIBUL,
E_LOWCON,
E_LOWDEX,
E_LOWIQ,
E_LOWSTR,
E_LOWCHA,
E_LOWWIS,
E_WONT,
E_OFFMAP,
E_RAGE,
E_STUNNED,
E_SILENCED,
// charm failure reasons
// LOWIQ
E_UNDEAD,
E_ROBOT,
E_DRUNK,
//
E_NOBP,
E_DOESNTFIT,
E_VEGETARIAN,
E_PARTVEGETARIAN,
E_CARNIVORE,
E_NOOB,
E_LEVITATING,
E_PRONE,
E_PENTAGRAM,
E_SWIMMING,
E_CLIMBING,
E_DANGEROUS,
E_INJURED,
E_STASIS,
E_TOOCOLD,
E_FACECOVERED,
};
enum COMMAND {
CMD_NONE,
// movement
CMD_MOVE_N,
CMD_MOVE_NE,
CMD_MOVE_E,
CMD_MOVE_SE,
CMD_MOVE_S,
CMD_MOVE_SW,
CMD_MOVE_W,
CMD_MOVE_NW,
CMD_RUN_N,
CMD_RUN_NE,
CMD_RUN_E,
CMD_RUN_SE,
CMD_RUN_S,
CMD_RUN_SW,
CMD_RUN_W,
CMD_RUN_NW,
CMD_TURN_N,
CMD_TURN_NE,
CMD_TURN_E,
CMD_TURN_SE,
CMD_TURN_S,
CMD_TURN_SW,
CMD_TURN_W,
CMD_TURN_NW,
//
CMD_AGAIN,
CMD_AIM,
CMD_CLOSE,
CMD_COMMS,
CMD_COMMSALL,
CMD_DOWN,
CMD_DROP,
CMD_DROPMULTI,
CMD_EAT,
CMD_FIRE,
CMD_FIRENEW,
CMD_FORCEATTACK,
CMD_GO,
CMD_GUNRELOAD,
CMD_HELP,
CMD_INFOARMOUR,
CMD_INFOKNOWLEDGE,
CMD_INFOPLAYER,
CMD_INTERACT,
CMD_INV,
CMD_LOOKAROUND,
CMD_LOOKHERE,
CMD_MAGIC,
CMD_MEMMAGIC,
CMD_MSGHIST,
CMD_MSGHIST2, // ie. ctrl-p
CMD_NEXTTARGET,
CMD_OFFER,
CMD_OPERATE,
CMD_OPTIONS,
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,
CMD_EXCHANGE,
};
typedef struct condset_s {
enum CELLCONDITION cond[MAXCANDIDATES];
int arg[MAXCANDIDATES];
int val[MAXCANDIDATES];
int nconds;
} condset_t;
typedef struct behaviour_s {
enum BEHAVIOUR id;
char *name;
struct flagpile_s *flags;
struct behaviour_s *next, *prev;
} behaviour_t;
typedef struct npcname_s {
char *name;
int valid;
} npcname_t;
typedef struct coord_s {
int x,y;
} coord_t;
enum BODYTYPE {
BT_BIRD,
BT_FISH,
BT_HUMANOID,
BT_FLYINGINSECT,
BT_QUADRAPED,
BT_SNAKE,
BT_SPIDER,
};
typedef struct bodypart_s {
enum BODYPART id;
char *name;
int armourok;
} bodypart_t;
// command types
typedef struct command_s {
enum COMMAND id;
char ch;
char *desc;
struct command_s *next, *prev;
} command_t;
typedef struct warning_s {
char *text;
int lifetime;
struct warning_s *next, *prev;
} warning_t;
enum OPTION {
OPT_ALWAYSSHOWTRAILS,
OPT_AUTORELOAD,
OPT_RETRIEVE_MISSILES,
OPT_STOPRUNONNOISE,
OPT_TIMEDEBUG,
};
typedef struct option_s {
enum OPTION id;
char *text;
int letter;
int enabled;
int def;
struct option_s *next, *prev;
} option_t;
typedef struct plural_s {
char *singular;
char *plural;
int stopafter; // stop parsing strings after finding this?
struct plural_s *next, *prev;
} plural_t;
enum BRANCH {
BH_CAVE,
BH_WORLDMAP,
BH_MAINDUNGEON,
BH_HEAVEN,
BH_PIT,
BH_SEWER,
BH_STOMACH,
BH_WOODS,
BH_BABAYAGAHUT,
BH_MASTERVAULTS,
BH_ICECAVERNS,
};
enum HABITAT {
H_CAVE = 1,
H_DUNGEON = 2,
H_FOREST = 3,
H_HEAVEN = 4,
H_PIT = 5,
H_VILLAGE = 6,
H_SEWER = 7,
H_STOMACH = 8,
H_SWAMP = 9,
H_BYHUT = 10,
H_ANTNEST = 11,
H_MASTERVAULTS = 12,
H_ICECAVE = 13,
H_ALL = 999
};
typedef struct branch_s {
enum BRANCH id;
enum HABITAT defaulthabitat;
char *name;
int pluralname;
int maxdepth;
int stairsperlev;
int deeperdir;
int majorbranch;
int depthmod;
int addparentdepth;
struct branch_s *next, *prev;
} branch_t;
enum REGIONTHING {
RT_NONE = 0,
RT_HABITAT, // val is habitat
RT_LF, // text is a mosnter definition
// val is how many to place.
RT_OBJECT, // what is object name
RT_BRANCHLINK, // val is enum branch to link to.
// what is stair object type
RT_VAULT, // what is vaultname
RT_RNDVAULTWITHFLAG, // val is wantedflag
RT_RNDVAULTWITHTAG, // what is wanted tag
};
typedef struct regionthing_s {
struct regionoutline_s *parent;
int id;
int depth; // only need depth OR x,y
int x,y;
enum REGIONTHING whatkind;
int value;
char *what;
} regionthing_t;
#define MAXOUTLINETHINGS 60
typedef struct regionoutline_s {
int id;
branch_t *rtype;
regionthing_t thing[MAXOUTLINETHINGS];
int nthings;
struct regionoutline_s *next, *prev;
} regionoutline_t;
// a region is a link of a branch and an outline
typedef struct region_s {
int id;
branch_t *rtype;
regionoutline_t *outline;
struct region_s *parentregion;
int nthings; // is this used???
int depthmod;
int createdbymapid; // which map ID created this region ?
// used to figure out which regions to delete
// if/when we have to regenerate a map.
// -1 means "Created at start of game"
struct region_s *next, *prev;
} region_t;
typedef struct habitat_s {
enum HABITAT id;
char *name;
int randthingpct; // % chance each empty cell has something
int randobpct; // % chance that 'something' is an ob rather than monster
int randvaultpct; // % chance that a room will be a vault
//int maxvisrange;
int temperature; // base temperature. roughly corresponds to celcius
enum OBTYPE upstairtype, downstairtype;
int stairsinrooms;
enum CELLTYPE emptycelltype,solidcelltype;
struct habitat_s *next, *prev;
} habitat_t;
typedef struct poisontype_s {
enum POISONTYPE id;
char *name;
char *desc;
char *contracttext;
char *damverb; // can use macros: YOU YOUR and #S
enum OBTYPE vomitob;
int dam;
int dampct;
int incubationtime;
enum POISONSEVERITY severity;
struct poisontype_s *next, *prev;
} poisontype_t;
/*
typedef struct subjob_s {
enum SUBJOB id;
char *name;
char *desc;
char letter;
struct subjob_s *next, *prev;
} subjob_t;
*/
typedef struct room_s {
int id;
int x1,y1,x2,y2;
struct vault_s *vault;
int prevault; // don't need to save this
int exitslinked; // don't need to save this.
} room_t;
enum ILLUMINATION {
IL_FULLLIT, // all cells are light
IL_WELLLIT, // dark, candelabras in every room, moss every 4 steps
IL_DIM, // dark, torches in every room, moss every 6 steps
IL_SHADOWY, // dark, torches in some rooms, moss every 8 steps
IL_FULLDARK, // occasionally moss in rooms
};
typedef struct map_s {
int id;
region_t *region;
int depth;
enum ILLUMINATION illumination;
struct room_s room[MAXMAPROOMS];
int nrooms; // how many rooms on this map
char *name; // name of this map
habitat_t *habitat;
long lastplayervisit;
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;
int nfixedrooms; // used for map creation only, not saved.
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 cellstore_s {
struct cell_s **c;
int ncells;
int max;
int cutoff;
} cellstore_t;
#define MAXVAULTARGS 10
enum VAULTSTATE {
VS_ALLOCATED,
VS_NOID,
VS_LOADING,
VS_LOADINGMAP,
VS_LOADINGLEGEND,
VS_LOADINGFLAGS,
};
enum VAULTTHING {
VT_NONE,
VT_EXIT,
VT_OB,
VT_LF,
VT_CELL,
VT_REUSABLE,
};
typedef struct vlegend_s {
char ch;
enum VAULTTHING tt;
enum VAULTTHING tt2;
char *what;
char *what2;
int pct;
struct vault_s *vault;
struct vlegend_s *next, *prev;
} vlegend_t;
// in map[0], data is the real data
// in others, data is an index into map[0]
typedef struct vaultmap_s {
int data[MAX_MAPW*MAX_MAPH];
int mlen;
int w,h;
} vaultmap_t;
typedef struct vault_s {
char *filename;
char *id;
int numid;
int valid;
int state;
struct vaultmap_s map[4];
int nmaps;
struct vlegend_s *legend, *lastlegend;
struct vault_s *next, *prev;
struct flagpile_s *flags;
} vault_t;
typedef struct glyph_s {
int ch;
int colour;
} glyph_t;
typedef struct buildingusage_s {
enum OBTYPE oid;
int count;
} buildingusage_t;
typedef struct hiddennamewithcol_s {
char *name;
enum COLOUR col;
} hiddennamewithcol_t;
enum MAPSHAPE {
MS_NORMAL,
MS_CROSS,
MS_CIRCLE,
MS_TURRET,
MS_HORZ,
MS_VERT,
};
#define MAXMAPSHAPES (6)
enum CORRIDORTYPE {
CDT_NORMAL, // make corridors, remove deadends, add rooms, autolink
CDT_SIMPLE, // add rooms, autolink
};
typedef struct cell_s {
map_t *map; // pointer back to map
int x,y; // map coords
struct room_s *room;
struct celltype_s *type;
struct obpile_s *obpile;
//enum LIGHTLEV lit;
//enum LIGHTLEV origlit; // for timed light
//enum LIGHTLEV lastlit;
habitat_t *habitat;
//int origlittimer;
//int littimer;
int hp;
int temperature;
char *reason;
char *lockedreason;
char *writing;
int writinglifetime;
int locked; // cannot make rooms on top of this.
// lifeform pile
struct lifeform_s *lf;
// known to player?
int known;
struct glyph_s knownglyph;
int knowntime;
int isroomwall;
// FOR CONSTRUCTION
int visited;
int filled;
} cell_t;
typedef struct celltype_s {
enum CELLTYPE id; // eg. dungeonfloor, wall, door
struct glyph_s glyph;
/*
char glyph; // how to display it
int colour; // which colour?
*/
int altcol;
char *name; // name of cell type
int solid; // can you walk through it?
int transparent; // can you see through it?
int floorheight; // 0 is default. <0 is low.
int hp; // hit points left. <0 = invulnerable
int volumemod; // modifer to footstep volume
int absorbent; // will this cell absorb liquids?
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;
char *desc;
struct glyph_s glyph;
float weight;
struct flagpile_s *flags;
struct bodypart_s bodypart[MAXBODYPARTS];
int nbodyparts;
int known;
// 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,skillxp;
int skillpoints;
long totskillpoints;
int hp,maxhp;
int mp,maxmp;
float stamina;
int alive;
int lastdamlf; // id of lf who just hurt us
char *lastdam;
char *killverb;
struct material_s *material;
enum DAMTYPE lastdamtype;
int timespent;
int sorted;
int att[MAXATTS];
int baseatt[MAXATTS];
int origatt[MAXATTS]; // used when polymorphed
float forgettimer;
struct obpile_s *pack;
struct obpile_s *polypack; // for melded objects when polymorphed
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 facing; // which way are we facing
int turncounter; // keeps track of # direction changes in a row
int losdirty;
int nlos; // cells which we can see
cell_t **los;
/*
int nlosdark; // cells which we'd be able to see if they
cell_t **losdark; // were lit.
*/
//int *viscell;
int visw;
int visrange;
/*
int eyeadjustment; // have your eyes adjusted to the dark?
// your nightvision is increased by eyeadj / 10
// max is MAX_EYEADJ
*/
int damlastturn; // for hp bar. not saved.
int mplastturn; // for mp bar. not saved.
float stamlastturn; // for stam bar. not saved.
int bartimer; // not saved.
// tracks whether this lf has rotated or not this turn.
// the first rotation in a turn is free, others cost time.
int rotated;
// is the player in the process of changing levels
int changinglev;
// set to TRUE after lf has being created
int born;
// not saved - don't ever recalc this lf's los
int loslock;
// debugging
int redraws; // # actual screen redraws during this lf's turn.
// for ai movement and pushers. DO save these.
struct cell_s *prevcell[2];
struct cell_s *cell;
struct lifeform_s *next, *prev;
} lifeform_t;
typedef struct obpile_s {
lifeform_t *owner;// } Only one of
cell_t *where; // } these should be
struct object_s *parentob; // } 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;
struct flag_s *item[MAXFLAGS];
int nitems;
} flagpile_t;
typedef struct altflagval_s {
enum FLAG id;
int val[3];
char *text;
} altflagval_t;
typedef struct flag_s {
enum FLAG id;
int nvals;
int val[3];
char *text;
struct altflagval_s *altval; // don't need to save this.
enum FLAGCONDITION condition;
int chance;
struct skill_s *skillfrom; // only used if ->lifetime is FROMSKILL.
long obfrom; // for conferred flags, link to object->id. -1 if not conferred.
// for FROMGODGIFT or FROMGODPIETY, this is the race->id of
// the god who gifted you this flag.
int fromlev; // we got this flag from achieveing job level xx.
//
int known;
int lifetime;
int origlifetime;
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 *shortname;
char *desc;
enum SKILLLEVEL skilldesclev[MAXSKILLLEVEL*2];
char *skilldesctext[MAXSKILLLEVEL*2];
int skilldescmsg[MAXSKILLLEVEL*2];
int nskilldesc;
struct skillwill_s {
enum SKILLLEVEL lev;
enum OBTYPE abilid;
int timeout;
char *text;
} skillwill[MAXSKILLWILLS];
int nskillwills;
int traintime;
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;
#define MAXRECIPEINGREDIENTS 5
typedef struct recipe_s {
int ningredients;
enum OBTYPE ingredient[MAXRECIPEINGREDIENTS];
int count[MAXRECIPEINGREDIENTS];
int consume[MAXRECIPEINGREDIENTS];
enum OBTYPE result;
struct recipe_s *next, *prev;
} recipe_t;
typedef struct knowledge_s {
enum OBTYPE id;
char *hiddenname;
int known;
char *triedon;
struct knowledge_s *next, *prev;
} knowledge_t;
typedef struct job_s {
enum JOB id;
enum JOBCATEGORY category;
char *name;
char *desc;
flagpile_t *flags;
struct job_s *next, *prev;
} job_t;
#define MAXOCNOUNS 5
typedef struct objectclass_s {
enum OBCLASS id;
enum RARITY rarity;
char *name;
char *desc;
char *noun[MAXOCNOUNS];
int nnouns;
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;
enum LFSIZE size;
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;
int dying; // not saved, just used to avoid flag messages for dying
// objects.
flagpile_t *flags;
struct obpile_s *contents;
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_ENCHANTED,
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_MERCY,
BR_NIMBLENESS,
BR_FEEBLENESS,
BR_FLIGHT,
BR_GIANTSTRENGTH,
BR_HEALTH,
BR_HOMING,
BR_IMPACT,
BR_THINKING,
BR_KNOWLEDGE,
BR_LEVITATION,
BR_LIFESUCK,
BR_PROTECTION,
BR_FEATHERFALL,
BR_ANTIMAG,
BR_CONCEALMENT,
BR_SHARPNESS,
BR_PUNISHMENT,
BR_PYROMANIA,
BR_REVENGE,
BR_REFLECTION,
BR_SHADOWS,
BR_SLOTH,
BR_SPEED,
BR_SPIDERCLIMB,
BR_STEALTH,
BR_POWER,
BR_SWIFTNESS,
BR_TELEKINESIS,
BR_TELEPATHY,
BR_WEAKNESS,
BR_SLAY_ANIMAL,
BR_SLAY_DRAGON,
BR_SLAY_MAGIC,
BR_SLAY_PLANT,
BR_SLAY_UNDEAD,
};
typedef struct brand_s {
enum BRAND id;
char *description;
char *suffix;
flagpile_t *flags;
enum BODYPART bp;
enum BLESSTYPE blessed;
int blesschance;
struct brand_s *next, *prev;
} brand_t;
#define MAXOMPREFIXES 20
typedef struct obmod_s {
enum OBMOD id;
char *prefix;
char *altprefix[MAXOMPREFIXES];
int naltprefix;
flagpile_t *flags;
struct obmod_s *next, *prev;
} obmod_t;
typedef struct choice_s {
char ch;
char *text; // what you type to select this one
char *desc; // what is displayed on the screen
char *longdesc; // what to display once you've selected this
void *data;
int heading;
int hilite;
int shortcutslot; // used when selecting spells/abilities
int valid; // used in askchoicestr
} choice_t;
enum MENUACTION {
MA_NONE = 0,
MA_GOTOMENU,
MA_QUIT,
};
// special shop menus - must all be < 0
enum SHOPMENU {
// shops
SM_PURCHASEITEMS = -1,
SM_DONATE = -2,
SM_SELLITEMS = -3,
// temples
SM_ABSOLVE = -4,
SM_BLESS = -5,
SM_DETECTCURSE = -6,
SM_MIRACLE = -7,
// motels
SM_REST = -8,
// weapon/armour shops
SM_RESIZE = -9,
SM_REPAIR = -10,
// various shops
SM_ID = -11,
};
enum SHOPRETURN {
SR_BACK,
SR_CONTINUE,
SR_QUIT
};
#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;
int hilite;
} prompt_t;
// for a* pathfinding
typedef struct node_s {
struct cell_s *c;
struct node_s *parent;
int dirfromparent;
int fromstart, heur, cost;
} node_t;
#endif