COMMENT
{
    This defines our data structures in a more maintainable and
    readable manner than raw .cpp files.
}

DEFINE ROLE
{
    CST		name	"job"
}

ROLE NONE
{
    name	"unemployed"
}

ROLE THIEF
{
    name	"thief"
}

ROLE WIZARD
{
    name	"wizard"
}

ROLE FIGHTER
{
    name	"fighter"
}

DEFINE ROLELIST
{
    ENM		role	ROLE	NONE
    ENM		next	ROLELIST	NONE
}

ROLELIST NONE

ROLELIST W
{
    role	WIZARD
}

ROLELIST T
{
    role	THIEF
}

ROLELIST F
{
    role	FIGHTER
}

ROLELIST WT
{
    role	THIEF
    next	W
}

ROLELIST WF
{
    role	FIGHTER
    next	W
}

ROLELIST TF
{
    role	FIGHTER
    next	T
}

ROLELIST ALL
{
    role	FIGHTER
    next	WT
}

DEFINE STRATEGY
{
    CST		name	"lemur"
}

STRATEGY NONE
{
    name	"None"
}
STRATEGY CHARGE
{
    name	"Charge!"
}
STRATEGY PINCER
{
    name	"Pincer"
}
STRATEGY LINE
{
    name	"Line"
}
STRATEGY HOLDCENTER
{
    name	"Hold Center"
}
STRATEGY RESERVE
{
    name	"Reserve"
}
STRATEGY PAIR
{
    name	"Pair-up"
}
STRATEGY FLANK
{
    name	"Flank"
}

COMMENT { The idea is "You are now %s" }
DEFINE HEALTHLEVEL
{
    CST		normal	"at nominal health"
    CST		construct	"operational"
    CST		histogram	"nominal"
    ENM		attr		ATTR		NORMAL
}

HEALTHLEVEL DEAD
{
    normal	"dead"
    construct	"destroyed"
    histogram	"dead"
    attr	DKRED
}

HEALTHLEVEL DEATHSGATE
{
    normal	"at death's gate"
    construct	"barely held together"
    histogram	"death's gate"
    attr	FIRE
}

HEALTHLEVEL CRITICALLYINJURED
{
    normal	"critically injured"
    construct	"almost destroyed"
    histogram	"critically injured"
    attr	RED
}

HEALTHLEVEL SEVERELYINJURED
{
    normal	"severely injured"
    construct	"broken"
    histogram	"severely injured"
    attr	ORANGE
}

HEALTHLEVEL INJURED
{
    normal	"injured"
    construct	"greatly damaged"
    histogram	"injured"
    attr	YELLOW
}

HEALTHLEVEL BLOODIED
{
    normal	"bloodied"
    construct	"damaged"
    histogram	"bloodied"
    attr	YELLOW
}

HEALTHLEVEL BRUISED
{
    normal	"bruised"
    construct	"lightly damaged"
    histogram	"bruised"
    attr	NORMAL
}

HEALTHLEVEL SCRATCHED
{
    normal	"scratched"
    construct	"chipped"
    histogram	"scratched"
    attr	NORMAL
}

HEALTHLEVEL FULL
{
    normal	"at full health"
    construct	"pristine condition"
    histogram	"unscratched"
    attr	WHITE
}

DEFINE FOODLEVEL
{
    CST		normal	"peckish"
    ENM		attr	ATTR	NORMAL
}

FOODLEVEL STARVING
{
    normal	"starving"
    attr	LTRED
}

FOODLEVEL VERYHUNGRY
{
    normal	"very hungry"
    attr	YOLK
}

FOODLEVEL HUNGRY
{
    normal	"hungry"
    attr	NORMAL
}

FOODLEVEL FULL
{
    normal	"full"
    attr	NORMAL
}

FOODLEVEL SATIATED
{
    normal	"satiated"
    attr	NORMAL
}

DEFINE MANALEVEL
{
    CST		normal	"at nominal mana"
    ENM		attr		ATTR		NORMAL
}

MANALEVEL EMPTY
{
    normal	"empty"
    attr	DKGREY
}

MANALEVEL LOW
{
    normal	"weak charge"
    attr	BLUE
}

MANALEVEL MED
{
    normal	"medium charge"
    attr	DKCYAN
}

MANALEVEL NORMAL
{
    normal	"charged"
    attr	CYAN
}

MANALEVEL FULL
{
    normal	"at full mana"
    attr	WHITE
}

DEFINE CORETEMPLEVEL
{
    CST		normal	"at normal temperature"
    ENM		attr		ATTR		NORMAL
    INT		cutoff		0
}

CORETEMPLEVEL FROZEN
{
    normal	"frozen"
    attr	WHITE
    cutoff	-1000
}

CORETEMPLEVEL FREEZING
{
    normal	"freezing"
    attr	CYAN
    cutoff	-700
}

CORETEMPLEVEL SHIVERING
{
    normal	"shivering"
    attr	LTBLUE
    cutoff	-500
}

CORETEMPLEVEL COLD
{
    normal	"cold"
    attr	BLUE
    cutoff	-300
}

CORETEMPLEVEL CHILLED
{
    normal	"chilled"
    attr	BLUE
    cutoff	-200
}

CORETEMPLEVEL COOL
{
    normal	"cool"
    attr	DKBLUE
    cutoff	-100
}

CORETEMPLEVEL NOMINAL
{
    normal	"comfortable"
    attr	NORMAL
    cutoff	100
}

CORETEMPLEVEL WARM
{
    normal	"warm"
    attr	DKRED
    cutoff	250
}

CORETEMPLEVEL HOT
{
    normal	"hot"
    attr	RED
    cutoff	450
}

CORETEMPLEVEL OVERHEATING
{
    normal	"overheating"
    attr	FIRE
    cutoff	500
}

DEFINE SOLDIER
{
}

SOLDIER WAIT
SOLDIER MARCH
SOLDIER FIRE
SOLDIER SENDMESSAGE
SOLDIER RETURN



DEFINE PHASE
{
}

PHASE NORMAL
PHASE FAST
PHASE SLOW
PHASE QUICK


DEFINE SIZE
{
    CST		name	"unusual"
    INT		weight	0
}

SIZE NONE
{
    name	"intangible"
    weight	0
}

SIZE TINY
{
    name	"tiny"
    weight	1
}

SIZE SMALL
{
    name	"small"
    weight	2
}

SIZE MEDIUM
{
    name	"medium"
    weight	4
}

SIZE LARGE
{
    name	"large"
    weight	8
}

SIZE GIANT
{
    name	"giant"
    weight	16
}

DEFINE EFFECTCLASS
{
}

EFFECTCLASS NONE
EFFECTCLASS HEAL
EFFECTCLASS GAINMANA
EFFECTCLASS LOSEMANA
EFFECTCLASS GAINFOOD
EFFECTCLASS LOSEFOOD
EFFECTCLASS POISON
EFFECTCLASS CURE
EFFECTCLASS DAMAGE
EFFECTCLASS SCALED_DAMAGE
EFFECTCLASS RESIST
EFFECTCLASS VULNERABLE
EFFECTCLASS GAINITEM

DEFINE EFFECT
{
    ENM		type	EFFECTCLASS	NONE
    ENM		element	ELEMENT		NONE
    DICE	duration	0

    DICE	amount		0

    ENM		itemflag	ITEM	NONE
    ENM		itemresist	ITEM	NONE
    ENM		next	EFFECT	NONE
}

EFFECT NONE

EFFECT VULN_FIRE
{
    type 	VULNERABLE
    element	FIRE
    duration	5
}

EFFECT VULN_ICE
{
    type 	VULNERABLE
    element	ICE
    duration	5
}

EFFECT VULN_POISON
{
    type 	VULNERABLE
    element	POISON
    duration	5
}

EFFECT VULN_ACID
{
    type 	VULNERABLE
    element	ACID
    duration	5
}

EFFECT VULN_ELECTRICITY
{
    type 	VULNERABLE
    element	ELECTRICITY
    duration	5
}

EFFECT CORPSE_APPLYPOISON
{
    type	POISON
    duration	20
}

EFFECT CORPSE_RESIST_FIRE
{
    type	RESIST
    element	FIRE
    duration	200
}

EFFECT CORPSE_RESIST_ICE
{
    type	RESIST
    element	ICE
    duration	200
}

EFFECT CORPSE_RESIST_POISON
{
    type	RESIST
    element	POISON
    duration	200
}

EFFECT CORPSE_RESIST_ELECTRICITY
{
    type	RESIST
    element	ELECTRICITY
    duration	200
}

EFFECT CORPSE_RESIST_ACID
{
    type	RESIST
    element	ACID
    duration	200
}

DEFINE ELEMENT
{
    CST		name		"ether"
    u8		symbol		'0'
    ENM		attr		ATTR		CYAN
    CST		damageverb	"disintegrate"
}

ELEMENT NONE
{
    name		"none"
    symbol		'-'
    attr		LIGHTBLACK
    damageverb		"enunciate"
}

ELEMENT PHYSICAL
{
    name		"physical"
    symbol		'K'
    attr		BROWN
    damageverb		"hit"
}

ELEMENT POISON
{
    name		"poison"
    symbol		'P'
    attr		GREEN
    damageverb		"poison"
}

ELEMENT ACID
{
    name		"acid"
    symbol		'A'
    attr		ORANGE
    damageverb		"dissolve"
}

ELEMENT LIGHT
{
    name		"light"
    symbol		'L'
    attr		YELLOW
    damageverb		"blind"
}

ELEMENT ELECTRICITY
{
    name		"shock"
    symbol		'E'
    attr		PURPLE
    damageverb		"zap"
}

ELEMENT FIRE
{
    name		"fire"
    symbol		'F'
    attr		RED
    damageverb		"burn"
}

ELEMENT ICE
{
    name		"ice"
    symbol		'I'
    attr		ICE
    damageverb		"freeze"
}

DEFINE DAMAGECLASS
{
    CST		name	"misc"
}

DAMAGECLASS NONE
{
    name	"normal"
}
DAMAGECLASS PIERCE
{
    name	"piercing"
}
DAMAGECLASS BLUNT
{
    name	"blunt"
}
DAMAGECLASS SLASH
{
    name	"slashing"
}
DAMAGECLASS BYPASS
{
    name	"unavoidable"
}
DAMAGECLASS SPLASH
{
    name	"splash"
}
DAMAGECLASS DODGE
{
    name	"dodgeable"
}

DEFINE ATTACKSTYLE
{
}

ATTACKSTYLE MELEE
ATTACKSTYLE RANGE
ATTACKSTYLE INTERNAL
ATTACKSTYLE EXTERNAL

DEFINE CHAMBER
{
    CST		descr		"between rooms"
}

CHAMBER NONE

CHAMBER LARGEROOM
{
    descr	"a large room"
}

CHAMBER LONGHALLWAY_NS
{
    descr	"a long north to south hallway"
}

CHAMBER LONGHALLWAY_WE
{
    descr	"a long west to east hallway"
}

CHAMBER SHORTHALLWAY_NS
{
    descr	"a short north to south hallway"
}

CHAMBER SHORTHALLWAY_WE
{
    descr	"a short west to east hallway"
}

CHAMBER ELBOW_NE
{
    descr	"an elbow extending north and east"
}

CHAMBER ELBOW_SE
{
    descr	"an elbow extending south and east"
}

CHAMBER ELBOW_NW
{
    descr	"an elbow extending north and west"
}

CHAMBER ELBOW_SW
{
    descr	"an elbow extending south and west"
}

CHAMBER SMALLROOM
{
    descr	"a small room"
}

DEFINE ROOMTYPE
{
    CST		prefix		""
    BOOL	randomorient	true

    BOOL	allowportal	true

    BOOL	usegenerator	false
    BOOl	shrinktofit	false
    BOOL	hastraps	false

    ENM		wall_tile	TILE	WALL
    ENM		floor_tile	TILE	FLOOR
    ENM		path_tile	TILE	PATH
    ENM		door_tile	TILE	DOOR_CLOSED
    ENM		tunnelwall_tile	TILE	TUNNELWALL
    CST		name		"room"
    BOOL	deadend		false
}

ROOMTYPE NONE
{
    prefix	"x"
}

ROOMTYPE POINTLESS_FINAL
{
    prefix	"pointless"
    randomorient        false
    allowportal         false
    wall_tile		CAVEWALL
    floor_tile		CAVEFLOOR
    path_tile		DARKCAVEFLOOR
}

ROOMTYPE THIEF_FINAL
{
    prefix      "thief"
    randomorient        false
    allowportal         false
    wall_tile		STUCCOWALL
    floor_tile		CARPET
    path_tile		FLOOR
    tunnelwall_tile	CORRIDORWALL
}

ROOMTYPE FIGHTER_FINAL
{
    prefix      "fighter"
    
    randomorient        false
    allowportal         false
    wall_tile		CAVEWALL
    floor_tile		CAVEFLOOR
    path_tile		DARKCAVEFLOOR
}

ROOMTYPE WIZARD_FINAL
{
    prefix      "wizard"

    randomorient        false
    allowportal         false
}

ROOMTYPE VILLAGE
{
    prefix	"village"
    randomorient	false
    allowportal		false
}

ROOMTYPE FACE
{
    prefix	"y"
    randomorient	false
    allowportal		false
    usegenerator	true
    tunnelwall_tile	INVALID
}

ROOMTYPE ATRIUM
{
    prefix	"y"
    randomorient	false
    allowportal		false
    usegenerator	true
    tunnelwall_tile	INVALID
    name	"atrium"
}
ROOMTYPE CORRIDOR
{
    prefix	"y"
    randomorient	false
    allowportal		false
    usegenerator	true
    tunnelwall_tile	INVALID
    name	"corridor"
}
ROOMTYPE BARRACKS
{
    prefix	"y"
    randomorient	false
    allowportal		false
    usegenerator	true
    tunnelwall_tile	INVALID
    name	"barracks"
}
ROOMTYPE GUARDHOUSE
{
    prefix	"y"
    randomorient	false
    allowportal		false
    usegenerator	true
    tunnelwall_tile	INVALID
    name	"guardhouse"
}

ROOMTYPE THRONEROOM
{
    prefix	"y"
    randomorient	false
    allowportal		false
    usegenerator	true
    tunnelwall_tile	INVALID
    name	"throneroom"
}

ROOMTYPE VAULT
{
    prefix	"y"
    randomorient	false
    allowportal		false
    usegenerator	true
    tunnelwall_tile	INVALID
    name	"vault"
    deadend	true
}

ROOMTYPE LIBRARY
{
    prefix	"y"
    randomorient	false
    allowportal		false
    usegenerator	true
    tunnelwall_tile	INVALID
    name	"library"
}

ROOMTYPE KITCHEN
{
    prefix	"y"
    randomorient	false
    allowportal		false
    usegenerator	true
    tunnelwall_tile	INVALID
    name	"kitchen"
}

ROOMTYPE DININGROOM
{
    prefix	"y"
    randomorient	false
    allowportal		false
    usegenerator	true
    tunnelwall_tile	INVALID
    name	"dining room"
}


ROOMTYPE PANTRY
{
    prefix	"y"
    randomorient	false
    allowportal		false
    usegenerator	true
    tunnelwall_tile	INVALID
    name	"pantry"
}

ROOMTYPE ROGUE
{
    prefix	"y"
    randomorient	false
    allowportal		true
    usegenerator	true
}

ROOMTYPE CAVE
{
    prefix	"y"
    randomorient	false
    allowportal		true
    usegenerator	true
    wall_tile		CAVEWALL
    floor_tile		CAVEFLOOR
}

ROOMTYPE DARKCAVE
{
    prefix	"y"
    randomorient	false
    allowportal		true
    usegenerator	true
    wall_tile		CAVEWALL
    floor_tile		DARKCAVEFLOOR
}

ROOMTYPE MAZE
{
    prefix	"y"
    randomorient	false
    allowportal		true
    usegenerator	true

    door_tile		MAZEDOOR
    wall_tile		MAZEWALL
    floor_tile		MAZEFLOOR
}

ROOMTYPE MAGE
{
    prefix	"y"
    randomorient	false
    allowportal		true
    usegenerator	true
}

ROOMTYPE LABYRINTH
{
    prefix	"y"
    randomorient	false
    shrinktofit		true
    allowportal		true
    usegenerator	true
    wall_tile		CAVEWALL
    floor_tile		MAZEFLOOR
    path_tile		CAVEFLOOR
}

ROOMTYPE PALACE
{
    prefix	"y"
    randomorient	false
    allowportal		true
    usegenerator	true
    hastraps		true
    wall_tile		STUCCOWALL
    floor_tile		CARPET
    path_tile		FLOOR
    tunnelwall_tile	CORRIDORWALL
}

ROOMTYPE CAVEROOMS
{
    prefix	"y"
    randomorient	false
    allowportal		true
    usegenerator	true
    wall_tile		CAVEWALL
    floor_tile		CAVEFLOOR
    path_tile		DARKCAVEFLOOR
}

ROOMTYPE BIGROOM
{
    prefix	"y"
    randomorient	false
    allowportal		true
    usegenerator	true
}

ROOMTYPE WILDERNESS
{
    prefix	"y"
    randomorient	false
    allowportal		false
    usegenerator	true
    floor_tile		GRASS
}

ROOMTYPE ISLAND
{
    prefix	"y"
    randomorient	false
    allowportal		false
    usegenerator	true
    floor_tile		GRASS
}

ROOMTYPE PREBUILTSLICE
{
    prefix	"y"
    randomorient	false
    usegenerator	false
    shrinktofit		false
    floor_tile		GRASS
}

DEFINE LEVEL
{
    int		numcreated	0
    ENM		roomtype	ROOMTYPE	LABYRINTH
}

LEVEL NONE

LEVEL ONE
{
    roomtype	MAGE
}

DEFINE GAMERULES
{
    int		bosslevel	10
}

GAMERULES OFFICIAL
{
    bosslevel	20
}

DEFINE YELL
{
}

YELL MURDERER


DEFINE HELP
{
    CST		name	"None"
    u8		key 	' '
}

HELP POINTLESS
{
    name	"Pointless"
}
HELP ROGUELIKES
{
    name	"Roguelikes"
}
HELP MOVEMENT
{
    name	"Movement"
}
HELP INVENTORY
{
    name	"Inventory"
}
HELP KEYBOARD
{
    name	"Key Bindings"
}
HELP CRAFTING
{
    name	"Making Things"
}
HELP LENSES
{
    name	"Map Lenses"
}


HELP WELCOME
{
    name	"Repeat Welcome Message"
}

HELP ABOUT
{
    name	"Making of Pointless"
}

DEFINE OPTION
{
    CST		name	"None"
    u8		key	' '
}

OPTION HELP
{
    name	"Help"
}

COMMENT
{
OPTION DISPLAYMAP
{
    name	"Toggle Map Display"
}

OPTION SPEECH_OFF
{
    name	"Speech Off"
}

OPTION SPEECH_SLOW
{
    name	"Speech Slow"
}

OPTION SPEECH_NORMAL
{
    name	"Speech Normal"
}

OPTION SPEECH_FAST
{
    name	"Speech Fast"
}

OPTION SPEECH_VERYFAST
{
    name	"Speech Very Fast"
}
}

OPTION FULLSCREEN
{
    name	"Toggle Full Screen"
}

OPTION USEMENUS
{
    name	"Toggle Pop-Up Menus"
}

OPTION VERBOSITY
{
    name	"Toggle Verbose Messages"
}

OPTION WALLSLIDE
{
    name	"Toggle Wall Sliding"
}

OPTION PLAY
{
    name	"Continue Playing"
}

OPTION QUIT
{
    name	"Quit and Save"
}


DEFINE ACTION
{
}

ACTION NONE
ACTION RESTART
ACTION BUMP
ACTION FIRE
ACTION READYRANGED
ACTION ROTATE
ACTION REBOOTAVATAR
ACTION DROP
ACTION DROPALL
ACTION DROPTOP
ACTION BAGSHAKE
ACTION BAGSWAPTOP
ACTION BREAK
ACTION BREAKTOP
ACTION INSPECT
ACTION QUAFF
ACTION QUAFFTOP
ACTION FORGET
ACTION EAT
ACTION EATGROUND
ACTION READ
ACTION EATTOP
ACTION SUICIDE
ACTION MEDITATE
ACTION SEARCH
ACTION WAIT
ACTION WAITUNTIL
ACTION STOPWAITING
ACTION EXAMINE
ACTION SAVE
ACTION SHUTDOWN
ACTION CREATEITEM
ACTION CAST
ACTION THROW
ACTION THROWTOP
ACTION WEAR
ACTION WIELD
ACTION WEARTOP
ACTION CLIMB
ACTION PICKUP
ACTION PICKUPSPECIFIC
ACTION TRANSMUTE
ACTION MARK_QUEUE_EMPTY
ACTION GHOSTMOVE
ACTION GHOSTMOVEABS
ACTION GHOSTRECENTER
ACTION PORTAL
ACTION OPEN
ACTION CLOSE
ACTION KICK
ACTION APPLY
ACTION WORLDSHIFT
ACTION WORLDFOCUS
ACTION AUTOMATE
ACTION CLEARSNOW
ACTION HARVEST
ACTION BUILD

DEFINE GOSSIP
{
    CST		name		"none"
}

GOSSIP INTRO
{
    name	"intro"
}

GOSSIP MEDITATE
{
    name	"meditate"
}

GOSSIP EQUIP
{
    name	"equip"
}

DEFINE ATTR
{
    U8		bg_r		0
    U8		bg_g		0
    U8		bg_b		0
    U8		fg_r		255
    U8		fg_g		255
    U8		fg_b		255
    BOOL	pulse		false
}

ATTR NONE
{
}

ATTR TERMINAL
{
    bg_r		0
    bg_g		0
    bg_b		0
    fg_r		255
    fg_g		196
    fg_b		64
}

ATTR HEALTH
{
    bg_r		255
    bg_g		0
    bg_b		0
    fg_r		0
    fg_g		0
    fg_b		0
}

ATTR MANA
{
    bg_r		0
    bg_g		128
    bg_b		0
    fg_r		255
    fg_g		255
    fg_b		255
}

ATTR FOOD
{
    bg_r		192
    bg_g		255
    bg_b		128
    fg_r		0
    fg_g		0
    fg_b		0
}

ATTR POWERBAR
{
    bg_r		32
    bg_g		32
    bg_b		32
    fg_r		192
    fg_g		192
    fg_b		192
}

ATTR BORDER
{
    bg_r		64
    bg_g		128
    bg_b		64
    fg_r		255
    fg_g		255
    fg_b		255
}

ATTR VICTORYBORDER
{
    bg_r		128
    bg_g		128
    bg_b		0
    fg_r		255
    fg_g		255
    fg_b		255
}

ATTR DEATHBORDER
{
    bg_r		64
    bg_g		64
    bg_b		64
    fg_r		255
    fg_g		255
    fg_b		255
}

ATTR DEATHBAR
{
    bg_r		96
    bg_g		32
    bg_b		32
    fg_r		192
    fg_g		192
    fg_b		192
}

ATTR WAITBAR
{
    bg_r		96
    bg_g		32
    bg_b		32
    fg_r		192
    fg_g		192
    fg_b		192
}

ATTR INVULNERABLE
{
    bg_r		196
    bg_g		196
    bg_b		196
    fg_r		0
    fg_g		0
    fg_b		0

}

ATTR HILITE
{
    bg_r		255
    bg_g		255
    bg_b		255
    fg_r		0
    fg_g		0
    fg_b		0

}
ATTR DKHILITE
{
    bg_r		128
    bg_g		128
    bg_b		128
    fg_r		0
    fg_g		0
    fg_b		0

}

ATTR LTHILITE
{
    bg_r		128
    bg_g		128
    bg_b		128
    fg_r		0
    fg_g		0
    fg_b		0

}

ATTR AVATARMEDITATE
{
    bg_r		20
    bg_g		40
    bg_b		196
    fg_r		0
    fg_g		0
    fg_b		0

}

ATTR WAYPOINT
{
    bg_r		196
    bg_g		64
    bg_b		196
    fg_r		0
    fg_g		0
    fg_b		0
}

ATTR LTWAYPOINT
{
    bg_r		255
    bg_g		128
    bg_b		255
    fg_r		0
    fg_g		0
    fg_b		0
}


ATTR ELECTRICBLUE
{
    bg_r		0
    bg_g		16
    bg_b		32
    fg_r		32
    fg_g		128
    fg_b		255

}

ATTR METAL
{
    bg_r		0
    bg_g		0
    bg_b		0
    fg_r		32
    fg_g		128
    fg_b		196

}

ATTR BLUEPORTAL
{
    bg_r		0
    bg_g		0
    bg_b		0
    fg_r		20
    fg_g		30
    fg_b		128

    pulse		true
}

ATTR ORANGEPORTAL
{
    bg_r		0
    bg_g		0
    bg_b		0
    fg_r		128
    fg_g		96
    fg_b		32

    pulse		true
}

ATTR WISH
{
    bg_r		0
    bg_g		0
    bg_b		0
    fg_r		64
    fg_g		255
    fg_b		255

    pulse		true
}

ATTR FIRE
{
    bg_r		0
    bg_g		0
    bg_b		0
    fg_r		192
    fg_g		128
    fg_b		64

    pulse		true
}

ATTR ICE
{
    bg_r		0
    bg_g		0
    bg_b		0
    fg_r		192
    fg_g		192
    fg_b		255
}

ATTR SEARCH
{
    bg_r		196
    bg_g		196
    bg_b		0
    fg_r		0
    fg_g		0
    fg_b		0
}

ATTR GOLD
{
    bg_r		0
    bg_g		0
    bg_b		0
    fg_r		255
    fg_g		255
    fg_b		0

}

ATTR YELLOW
{
    bg_r		0
    bg_g		0
    bg_b		0
    fg_r		255
    fg_g		255
    fg_b		0
}

ATTR LTYELLOW
{
    bg_r		0
    bg_g		0
    bg_b		0
    fg_r		255
    fg_g		255
    fg_b		128
}

ATTR INV_YELLOW
{
    bg_r		255
    bg_g		255
    bg_b		0
    fg_r		0
    fg_g		0
    fg_b		0
}

ATTR YOLK
{
    bg_r		0
    bg_g		0
    bg_b		0
    fg_r		196
    fg_g		196
    fg_b		128
}

ATTR SHOUT
{
    bg_r		0
    bg_g		0
    bg_b		0
    fg_r		128
    fg_g		255
    fg_b		128
}

ATTR EMOTE
{
    bg_r		0
    bg_g		0
    bg_b		0
    fg_r		255
    fg_g		196
    fg_b		128

}

ATTR PINK
{
    bg_r		0
    bg_g		0
    bg_b		0
    fg_r		255
    fg_g		128
    fg_b		128
}

ATTR PURPLE
{
    bg_r		0
    bg_g		0
    bg_b		0
    fg_r		255
    fg_g		128
    fg_b		255
}

ATTR NORMAL
{
    bg_r		0
    bg_g		0
    bg_b		0
    fg_r		192
    fg_g		192
    fg_b		192

}

ATTR LIGHTBLACK
{
    bg_r		0
    bg_g		0
    bg_b		0
    fg_r		96
    fg_g		96
    fg_b		96

}

ATTR OUTOFFOV
{
    bg_r		0
    bg_g		0
    bg_b		0
    fg_r		96
    fg_g		96
    fg_b		96

}

ATTR WHITE
{
    bg_r		0
    bg_g		0
    bg_b		0
    fg_r		255
    fg_g		255
    fg_b		255

}

ATTR INV_WHITE
{
    bg_r		255
    bg_g		255
    bg_b		255
    fg_r		0
    fg_g		0
    fg_b		0

}

ATTR AMBER
{
    bg_r		0
    bg_g		0
    bg_b		0
    fg_r		255
    fg_g		192
    fg_b		128
}
ATTR ORANGE
{
    bg_r		0
    bg_g		0
    bg_b		0
    fg_r		255
    fg_g		192
    fg_b		64
}
ATTR DKORANGE
{
    bg_r		0
    bg_g		0
    bg_b		0
    fg_r		192
    fg_g		128
    fg_b		64
}

ATTR INV_ORANGE
{
    bg_r		255
    bg_g		192
    bg_b		64
    fg_r		0
    fg_g		0
    fg_b		0

}

ATTR LIGHTBROWN
{
    bg_r		0
    bg_g		0
    bg_b		0
    fg_r		255
    fg_g		192
    fg_b		128

}

ATTR BROWN
{
    bg_r		0
    bg_g		0
    bg_b		0
    fg_r		192
    fg_g		128
    fg_b		64

}
ATTR DKBROWN
{
    bg_r		0
    bg_g		0
    bg_b		0
    fg_r		128
    fg_g		96
    fg_b		32

}

ATTR LTRED
{
    bg_r		0
    bg_g		0
    bg_b		0
    fg_r		255
    fg_g		128
    fg_b		128

}

ATTR RED
{
    bg_r		0
    bg_g		0
    bg_b		0
    fg_r		255
    fg_g		32
    fg_b		32

}

ATTR INV_RED
{
    bg_r		255
    bg_g		32
    bg_b		32
    fg_r		0
    fg_g		0
    fg_b		0
}

ATTR DKRED
{
    bg_r		0
    bg_g		0
    bg_b		0
    fg_r		196
    fg_g		32
    fg_b		32

}

ATTR GREEN
{
    bg_r		0
    bg_g		0
    bg_b		0
    fg_r		0
    fg_g		255
    fg_b		0
}
ATTR LTGREEN
{
    bg_r		0
    bg_g		0
    bg_b		0
    fg_r		128
    fg_g		255
    fg_b		128
}
ATTR INV_GREEN
{
    bg_r		0
    bg_g		255
    bg_b		0
    fg_r		0
    fg_g		0
    fg_b		0

}

ATTR GREEN_ISLE
{
    bg_r		0
    bg_g		0
    bg_b		192
    fg_r		0
    fg_g		255
    fg_b		0

}

ATTR DKGREEN
{
    bg_r		0
    bg_g		0
    bg_b		0
    fg_r		0
    fg_g		196
    fg_b		0

}
ATTR DKRGREEN
{
    bg_r		0
    bg_g		0
    bg_b		0
    fg_r		0
    fg_g		128
    fg_b		0

}

ATTR BLUE
{
    bg_r		0
    bg_g		0
    bg_b		0
    fg_r		64
    fg_g		64
    fg_b		255
}
ATTR DKBLUE
{
    bg_r		0
    bg_g		0
    bg_b		0
    fg_r		32
    fg_g		32
    fg_b		128
}
ATTR DKGREENBLUE
{
    bg_r		0
    bg_g		0
    bg_b		0
    fg_r		64
    fg_g		196
    fg_b		128
}
ATTR GREENBLUE
{
    bg_r		0
    bg_g		0
    bg_b		0
    fg_r		64
    fg_g		255
    fg_b		128
}
ATTR LTBLUE
{
    bg_r		0
    bg_g		0
    bg_b		0
    fg_r		128
    fg_g		128
    fg_b		255
}

ATTR INV_BLUE
{
    bg_r		64
    bg_g		64
    bg_b		255
    fg_r		0
    fg_g		0
    fg_b		0
}

ATTR LIGHTBLUE
{
    bg_r		0
    bg_g		0
    bg_b		0
    fg_r		128
    fg_g		128
    fg_b		255
}

ATTR TEAL
{
    bg_r		0
    bg_g		0
    bg_b		0
    fg_r		64
    fg_g		128
    fg_b		128
}

ATTR CYAN
{
    bg_r		0
    bg_g		0
    bg_b		0
    fg_r		64
    fg_g		255
    fg_b		255
}

ATTR DKCYAN
{
    bg_r		0
    bg_g		0
    bg_b		0
    fg_r		64
    fg_g		192
    fg_b		192

}

ATTR DKGREY
{
    bg_r		0
    bg_g		0
    bg_b		0
    fg_r		128
    fg_g		128
    fg_b		128
}

ATTR GREY
{
    bg_r		0
    bg_g		0
    bg_b		0
    fg_r		196
    fg_g		196
    fg_b		196
}

ATTR LTGREY
{
    bg_r		0
    bg_g		0
    bg_b		0
    fg_r		220
    fg_g		220
    fg_b		220
}

ATTR PERCENT_SELECT
{
    bg_r		196
    bg_g		196
    bg_b		196
    fg_r		0
    fg_g		0
    fg_b		0
}

ATTR PERCENT_HILIGHT
{
    bg_r		128
    bg_g		128
    bg_b		128
    fg_r		0
    fg_g		0
    fg_b		0
}

ATTR PERCENT_SELECTHILIGHT
{
    bg_r		255
    bg_g		255
    bg_b		255
    fg_r		0
    fg_g		0
    fg_b		0
}

DEFINE MAPFLAG
{
}

MAPFLAG NONE 0
MAPFLAG FOV 1
MAPFLAG FOVCACHE 2
MAPFLAG PORTAL 4
MAPFLAG TRAP 8
MAPFLAG SEEN_PUSHER 16
MAPFLAG MOB 32
MAPFLAG ITEM 64
MAPFLAG MAPPED 128

MAPFLAG HARVESTED 256
MAPFLAG BROKENSNOW 512
MAPFLAG LIT 1024
MAPFLAG TEMPLIT 2048
MAPFLAG ONFIRE 4096

DEFINE EVENTTYPE
{
}

EVENTTYPE NONE 0
EVENTTYPE FORE 1
EVENTTYPE BACK 2
EVENTTYPE SYM 4
EVENTTYPE FORESYM 5
EVENTTYPE FOREBACK 3
EVENTTYPE ALL 7
EVENTTYPE SHOUT 8

EVENTTYPE LONG 128

DEFINE TREE
{
    ENM		attr		ATTR		NORMAL
    CST		name		"wood"
    ENM		tile		TILE		FOREST
    ENM		potion		ITEM		POTION_RED
    
    bool	hardwood	false
}

TREE NONE
{
    attr	BROWN
    name	"no tree"
}

TREE MAPLE
{
    attr	BROWN
    name	"maple"
    tile	FOREST_MAPLE
    potion	POTION_RED
    hardwood	true
}

TREE OAK
{
    attr	DKBROWN
    name	"oak"
    tile	FOREST_OAK
    potion	POTION_YELLOW
    hardwood	true
}

TREE ASH
{
    attr	GREY
    name	"ash"
    tile	FOREST_ASH
    potion	POTION_ORANGE
    hardwood	true
}

TREE BIRCH
{
    attr	WHITE
    name	"birch"
    tile	FOREST_BIRCH
    potion	POTION_GREEN
    hardwood	true
}


TREE POPLAR
{
    attr	LTGREY
    name	"poplar"
    tile	FOREST_POPLAR
    potion	POTION_BLUE
    hardwood	true
}

TREE PINE
{
    attr	BROWN
    name	"pine"
    tile	FOREST_PINE
    potion	POTION_PURPLE
    hardwood	false
}
TREE SPRUCE
{
    attr	BROWN
    name	"spruce"
    tile	FOREST_SPRUCE
    potion	POTION_WHITE
    hardwood	false
}
TREE FIR
{
    attr	LIGHTBROWN
    name	"fir"
    tile	FOREST_FIR
    potion	POTION_GLOWING
    hardwood	false
}
TREE CEDAR
{
    attr	LIGHTBROWN
    name	"cedar"
    tile	FOREST_CEDAR
    potion	POTION_CYAN
    hardwood	false
}
TREE HEMLOCK
{
    attr	BROWN
    name	"hemlock"
    tile	FOREST_HEMLOCK
    potion	POTION_PINK
    hardwood	false
}

DEFINE ORE
{
    CST		name		"rock"
    ENM		tile		TILE		MOUNTAIN
    ENM		item		ITEM		ROCK
}

ORE NONE
{
    name	"none"
    tile	MOUNTAIN
    item	ROCK
}

ORE IRON
{
    name	"iron"
    tile	IRON_MOUNTAIN
    item	IRONORE
}

ORE FLINT
{
    name	"flint"
    tile	FLINT_MOUNTAIN
    item	FLINT
}

ORE COAL
{
    name	"coal"
    tile	COAL_MOUNTAIN
    item	COAL
}

ORE GOLD
{
    name	"gold"
    tile	GOLD_MOUNTAIN
    item	GOLD_INGOT
}

ORE ROCK
{
    name	"rock"
    tile	MOUNTAIN
    item	LARGEROCK
}

DEFINE TILE
{
    U8		symbol		'&'
    ENM		attr		ATTR		NORMAL
    CST		legend		"none"
    ENM		tree		TREE		NONE
    ENM		ore		ORE		NONE

    BOOL	ispassable	true
    BOOL	istransparent	true
    BOOL	isphaseable	true
    BOOL	isdiggable	false
    BOOL	replaceable	false
    BOOL	describe	false
    BOOL	semitransparent	false
    BOOL	forbidrandomwander	false
    BOOL	roomcolor	false
    BOOL	roomsymbol	false
    bool	isdoorway	false
    u8		height		0
    bool	tilehides	false

    int		fuel		0
    int		combust_heat	-1
    ENM		burntile	TILE		NONE
}

TILE INVALID
{
    symbol	'#'
    attr	BROWN
    legend	"unknown"
    ispassable		false
    istransparent	false
    isphaseable		false
}

TILE NONE
{
}

TILE PUSHER
{
    symbol	'X'
    attr	INV_RED
    legend	"engraved monolith"
    describe	true
    istransparent true
    ispassable	false
    roomcolor		true
    roomsymbol		true
}

TILE STATUE
{
    symbol	'K'
    attr	RED
    legend	"large kobold statue"
    ispassable	true
    istransparent	true
    describe	true
}

TILE ALTAR
{
    symbol	'_'
    attr	FIRE
    legend	"glowing altar of the apocalypse"
    ispassable	false
    istransparent	true
    describe	true
}

TILE ALTAR_BROKEN
{
    symbol	'_'
    attr	GREY
    legend	"broken altar of the apocalypse"
    ispassable	false
    istransparent	true
    describe	true
}


TILE FLOOR
{
    symbol	'.'
    attr	BROWN
    legend	"wooden floor"
    ispassable		true
    istransparent	true
    replaceable		true
    burntile		DIRT
    fuel		10
}

TILE CARPET
{
    symbol	'.'
    attr	PURPLE
    legend	"carpet"
    ispassable		true
    istransparent	true
    replaceable		true
    burntile		FLOOR
}

TILE CAVEFLOOR
{
    symbol	'.'
    attr	BROWN
    legend	"rocky ground"
    ispassable		true
    istransparent	true
    replaceable		true
    burntile		CHARREDGROUND
}

TILE MAZEFLOOR
{
    symbol	'.'
    attr	NORMAL
    legend	"floor"
    ispassable		true
    istransparent	true
    replaceable		true
    burntile		CHARREDGROUND
}

TILE DARKCAVEFLOOR
{
    symbol	'.'
    attr	NORMAL
    legend	"rocky ground"
    ispassable		true
    istransparent	true
    semitransparent	false
    replaceable		true
    burntile		CHARREDGROUND
}

TILE CHAIR
{
    symbol	'h'
    attr	BROWN
    legend	"wooden chair"
    ispassable		true
    istransparent	true
    describe	true
    replaceable		true
}

TILE TABLE
{
    symbol	'O'
    attr	LIGHTBROWN
    legend	"wooden table"
    ispassable		false
    istransparent	true
    describe	true
}

TILE DOWNSTAIRS
{
    symbol	'>'
    attr	WHITE
    legend	"downstairs"
    ispassable		true
    istransparent 	true
    describe	true
    height	255
}

TILE UPSTAIRS
{
    symbol	'<'
    attr	WHITE
    legend	"upstairs"
    ispassable		true
    istransparent 	true
    describe	true
    height	255
}

TILE SNOW
{
    symbol	'-'
    attr	WHITE
    legend	"unbroken snow"
    ispassable	true
    istransparent true
    replaceable		true
}

TILE BROKENSNOW
{
    symbol	'~'
    attr	WHITE
    legend	"trampled snow"
    ispassable	true
    istransparent true
    replaceable		true
}

TILE SNOWYPATH
{
    symbol	'.'
    attr	WHITE
    legend	"snow covered ground"
    ispassable	true
    istransparent true
    replaceable		true
    burntile		PATH
}

TILE PATH
{
    symbol	'.'
    attr	BROWN
    legend	"path"
    ispassable		true
    istransparent	true
    replaceable		true
    burntile		CHARREDGROUND
}

TILE GRASS
{
    symbol	'.'
    attr	LIGHTBROWN
    legend	"dormant grass"
    ispassable		true
    istransparent	true
    replaceable		true

    burntile		DIRT
    combust_heat	200
    fuel		10
}

TILE CLAY
{
    symbol	'.'
    attr	RED
    legend	"clay"
    ispassable		true
    istransparent	true
    replaceable		true

    burntile		BARESTONE
}

TILE CHARREDGROUND
{
    symbol	'-'
    attr	DKHILITE
    legend	"charred ground"
    ispassable		true
    istransparent	true
    replaceable		true
}

TILE DIRT
{
    symbol	'.'
    attr	BROWN
    legend	"dirt"
    ispassable		true
    istransparent	true
    replaceable		true
    burntile		CHARREDGROUND
}
TILE BARESTONE
{
    symbol	'.'
    attr	GREY
    legend	"exposed stone"
    ispassable		true
    istransparent	true
    replaceable		true
    burntile		CHARREDGROUND
}

TILE MEDITATIONSPOT
{
    symbol	'*'
    attr	BLUEPORTAL
    legend	"exit portal"
    ispassable		true
    istransparent	true
    describe            true
}

TILE REEDS
{
    symbol	'"'
    attr	LIGHTBROWN
    legend	"reeds"
    ispassable		true
    istransparent	true
    height		3
    replaceable		true

    burntile		DIRT
    combust_heat	200
    fuel		20
}
TILE FIELD
{
    symbol	'"'
    attr	BROWN
    legend	"field"
    ispassable		true
    istransparent	true
    replaceable		true
}

TILE FROZENFIELD
{
    symbol	'"'
    attr	LIGHTBLACK
    legend	"frost-killed field"
    ispassable		true
    istransparent	true
    replaceable		true
}

TILE FIRE
{
    symbol	'&'
    attr	FIRE
    legend	"cooking fire"
    ispassable	false
    istransparent true
    describe	true
}

TILE TUNNELWALL
{
    symbol	' '
    attr	NORMAL
    legend	"tunnel wall"

    ispassable		false
    istransparent	false
    isdiggable		true
}

TILE CORRIDORWALL
{
    symbol	' '
    attr	NORMAL
    legend	"corridor wall"

    ispassable		false
    istransparent	false
    isdiggable		true
}

TILE ICEWALL
{
    symbol      '#'
    attr        CYAN
    legend      "wall of ice"

    ispassable		false
    istransparent	true
    isdiggable		true
}

TILE WALL
{
    symbol	'#'
    attr	NORMAL
    legend	"wall"

    ispassable		false
    istransparent	false
    isdiggable		true
}

TILE STUCCOWALL
{
    symbol	'#'
    attr	WHITE
    legend	"stucco wall"

    ispassable		false
    istransparent	false
    isdiggable		true
}

TILE MAZEWALL
{
    symbol	'#'
    attr	NORMAL
    legend	"maze wall"

    ispassable		false
    istransparent	false
    isdiggable		true
}

TILE CAVEWALL
{
    symbol	'#'
    attr	NORMAL
    legend	"cave wall"

    ispassable		false
    istransparent	false
    isdiggable		true
}

TILE FUTURE_FORGE
{
    symbol	'#'
    attr	NORMAL
    legend	"wall"

    ispassable		false
    istransparent	false
    isdiggable		false
}

TILE WOODWALL
{
    symbol	'#'
    attr	BROWN
    legend	"wooden wall"

    ispassable		false
    istransparent	false
    isdiggable		true
}

TILE SOLIDWALL
{
    symbol	'#'
    attr	BROWN
    legend	"wall"

    ispassable		false
    istransparent	false
    isdiggable		false
}

TILE PORTAL
{
    symbol	'*'
    attr	PURPLE
    legend	"portal"

    ispassable		true
    istransparent	true
    isdiggable		false
}

TILE ORANGEPORTAL
{
    symbol	'*'
    attr	ORANGEPORTAL
    legend	"orange portal"

    ispassable		true
    istransparent	true
    isdiggable		false
}

TILE BLUEPORTAL
{
    symbol	'*'
    attr	BLUEPORTAL
    legend	"blue portal"

    ispassable		true
    istransparent	true
    isdiggable		false
}

TILE MOUNTAINPROTOPORTAL
{
    symbol	'^'
    attr	NORMAL
    legend	"mountain"

    ispassable		false
    istransparent	false
    isdiggable		false
}

TILE PROTOPORTAL
{
    symbol	'#'
    attr	NORMAL
    legend	"wall"

    ispassable		false
    istransparent	false
    isdiggable		false
}

TILE USERPROTOPORTAL
{
    symbol	'^'
    attr	NORMAL
    legend	"mountain"

    ispassable		false
    istransparent	false
    isdiggable		false
}

TILE BROKENWALL
{
    symbol	'%'
    attr	NORMAL
    legend	"broken wall"

    ispassable		false
    istransparent	false
    isdiggable		true
}

TILE DOOR_CLOSED
{
    symbol	'+'
    attr	BROWN
    legend	"closed door"

    ispassable		false
    istransparent	false
    describe	true
    isdoorway	true
}

TILE DOOR_OPEN
{
    symbol	'-'
    attr	BROWN
    legend	"opened door"

    ispassable		true
    istransparent	true
    describe	true
    isdoorway	true
}

TILE DOOR_BROKEN
{
    symbol	'-'
    attr	BROWN
    legend	"broken door"

    ispassable		true
    istransparent	true
    describe	true
    isdoorway	true
}

TILE DOOR_LOCKED_UNKNOWN
{
    symbol	'+'
    attr	BROWN
    legend	"closed door"

    ispassable		false
    istransparent	false
    describe	true
    isdoorway	true
}

TILE DOOR_JAMMED_UNKNOWN
{
    symbol	'+'
    attr	BROWN
    legend	"closed door"

    ispassable		false
    istransparent	false
    describe	true
    isdoorway	true
}

TILE DOOR_LOCKED
{
    symbol	'+'
    attr	BROWN
    legend	"locked door"

    ispassable		false
    istransparent	false
    describe	true
    isdoorway	true
}

TILE DOOR_JAMMED
{
    symbol	'+'
    attr	BROWN
    legend	"jammed door"

    ispassable		false
    istransparent	false
    describe	true
    isdoorway	true
}

TILE DOOR_EMPTY
{
    symbol	'.'
    attr	GREY
    legend	"doorway"

    ispassable		true
    istransparent	true
    describe	true
    isdoorway	true
}

TILE MAZEDOOR
{
    symbol	'+'
    attr	BROWN
    legend	"door"

    ispassable		true
    istransparent	false
    describe	true
}

TILE SECRETDOOR
{
    symbol	'#'
    attr	WHITE
    legend	"wall"

    ispassable		false
    istransparent	false
}

TILE MOUNTAIN
{
    symbol	'^'
    attr	NORMAL
    legend	"mountain"
    ispassable		false
    istransparent	false
    ore		ROCK
    height	255
}

TILE IRON_MOUNTAIN
{
    symbol	'^'
    attr	RED
    legend	"iron ore seam"
    ispassable		true
    istransparent	false
    ore		IRON
    describe	true
    height	255
}

TILE FLINT_MOUNTAIN
{
    symbol	'^'
    attr	CYAN
    legend	"flint deposit"
    ispassable		true
    istransparent	false
    describe	true
    ore		FLINT
    height	255
}

TILE COAL_MOUNTAIN
{
    symbol	'^'
    attr	LTHILITE
    legend	"coal seam"
    ispassable		true
    istransparent	false
    describe	true
    ore		COAL
    height	255
}

TILE GOLD_MOUNTAIN
{
    symbol	'^'
    attr	GOLD
    legend	"gold seam"
    ispassable		true
    istransparent	false
    describe	true
    ore		GOLD
    height	255
}

TILE ICEMOUNTAIN
{
    symbol	'^'
    attr	WHITE
    legend	"icy mountain"
    ispassable		false
    istransparent	false
    height	255
}

TILE SNOWYPASS
{
    symbol	'W'
    attr	WHITE
    legend	"snowed in pass"
    ispassable		false
    istransparent	true
}

TILE BRIDGE
{
    symbol	'='
    attr	BROWN
    legend	"bridge"

    ispassable		true
    istransparent	true
    describe	true
}

TILE BOAT
{
    symbol	'O'
    attr	LIGHTBROWN
    legend	"boat"

    ispassable		true
    istransparent	true
    tilehides		true
}

TILE WATER
{
    symbol	'~'
    attr	BLUE
    legend	"water"
    ispassable		false
    istransparent	true
}

TILE ICE
{
    symbol	'~'
    attr	CYAN
    legend	"ice"
    ispassable		true
    istransparent	true
    forbidrandomwander	true
}

TILE BUSH
{
    symbol	'+'
    attr	BROWN
    legend	"bare bushes"

    ispassable		true
    istransparent	true
    height		3
    replaceable		true

    burntile		DIRT
    combust_heat	250
    fuel		100
}

TILE FOREST
{
    symbol	'&'
    attr	DKRGREEN
    legend	"forest"

    ispassable		true
    istransparent	false
    semitransparent	true
    height		25

    burntile		DIRT
    combust_heat	350
    fuel		200
}
TILE STUMP
{
    symbol	'\''
    attr	BROWN
    legend	"stump"

    ispassable		true
    istransparent	true
    height		1
    replaceable		true

    burntile		DIRT
    combust_heat	250
    fuel		100
}

TILE FOREST_MAPLE
{
    symbol	'Y'
    attr	BROWN
    legend	"maple tree"
    tree	MAPLE

    ispassable		true
    istransparent	true
    height		25

    burntile		DIRT
    combust_heat	350
    fuel		200
    describe	true
}

TILE FOREST_OAK
{
    symbol	'Y'
    attr	DKBROWN
    legend	"oak tree"
    tree	OAK

    ispassable		true
    istransparent	true
    height		25

    burntile		DIRT
    combust_heat	350
    fuel		200
    describe	true
}

TILE FOREST_ASH
{
    symbol	'Y'
    attr	GREY
    legend	"ash tree"
    tree	ASH

    ispassable		true
    istransparent	true
    height		25

    burntile		DIRT
    combust_heat	350
    fuel		200
    describe	true
}

TILE FOREST_BIRCH
{
    symbol	'Y'
    attr	WHITE
    legend	"birch tree"
    tree	BIRCH

    ispassable		true
    istransparent	true
    height		10

    burntile		DIRT
    combust_heat	250
    fuel		300
    describe	true
}

TILE FOREST_POPLAR
{
    symbol	'Y'
    attr	LTGREY
    legend	"poplar tree"
    tree	POPLAR

    ispassable		true
    istransparent	true
    height		10

    burntile		DIRT
    combust_heat	350
    fuel		200
    describe	true
}

TILE FOREST_PINE
{
    symbol	'&'
    attr	DKGREEN
    legend	"pine tree"
    tree	PINE

    ispassable		true
    istransparent	false
    semitransparent	true
    height		25

    burntile		DIRT
    combust_heat	300
    fuel		200
    describe	true
}

TILE FOREST_SPRUCE
{
    symbol	'&'
    attr	DKGREENBLUE
    legend	"spruce tree"
    tree	SPRUCE

    ispassable		true
    istransparent	false
    semitransparent	true
    height		25

    burntile		DIRT
    combust_heat	300
    fuel		200
    describe	true
}

TILE FOREST_FIR
{
    symbol	'&'
    attr	GREENBLUE
    legend	"fir tree"
    tree	FIR

    ispassable		true
    istransparent	false
    semitransparent	true
    height		25

    burntile		DIRT
    combust_heat	300
    fuel		200
    describe	true
}
TILE FOREST_CEDAR
{
    symbol	'&'
    attr	GREEN
    legend	"cedar tree"
    tree	CEDAR

    ispassable		true
    istransparent	false
    semitransparent	true
    height		30

    burntile		DIRT
    combust_heat	300
    fuel		200
    describe	true
}
TILE FOREST_HEMLOCK
{
    symbol	'&'
    attr	LTGREEN
    legend	"hemlock tree"
    tree	HEMLOCK

    ispassable		true
    istransparent	false
    semitransparent	true
    height		25

    burntile		DIRT
    combust_heat	300
    fuel		200
    describe	true
}

TILE BAREFOREST
{
    symbol	'&'
    attr	LIGHTBLACK
    legend	"leafless trees"

    ispassable		true
    istransparent	true
    height		25

    burntile		DIRT
    combust_heat	350
    fuel		200
}

DEFINE TERRAIN
{
    ENM		tile	TILE 	NONE

    u8		grass	0
    u8		dirt	0
    u8		bush	0
    u8		tree	0
    int		sightrange	30
    int		armyrange	500
}

TERRAIN NONE
{
}

TERRAIN PLAINS
{
    tile	GRASS

    grass	90
    bush	10
    sightrange	100
    armyrange	500
}

TERRAIN BUSHES
{
    tile	BUSH

    grass	10
    bush	90
    sightrange	40
    armyrange	300
}

TERRAIN FOREST
{
    tile	FOREST

    tree	90
    bush	10
    sightrange	15
    armyrange	100
}

TERRAIN WASTE
{
    tile	DIRT

    dirt	90
    grass	10
    sightrange	130
    armyrange	600
}


DEFINE AI
{
    CST		name	"brainless"
    CST		descr	"They are known to wander aimlessly about."
}

AI NONE
{
    name	"Do Nothing"
    descr	"They stand still doing nothing all day.  Much like your brother John."
}

AI STAYHOME
{
    name	"Stay at Home"
    descr	"They stay at their home and do not wander off."
}

AI HOME
{
    name	"Hang around Home"
    descr	"They keep near their home territory."
}

AI CHARGE
{
    name	"Charge on Sight"
    descr	"They charge at any foes as soon as they see them."
}

AI RAT
{
    name	"Attack with Friends"
    descr	"They wait to form a pack before attacking."
}

AI STRAIGHTLINE
{
    name	"Move in Straight Lines"
    descr	"They like to run straight and avoid turning."
}

AI PATHTO
{
    name	"Tracker"
    descr	"They can track a foe across a trackless wasteland."
}

AI ORTHO
{
    name	"Avoids Diagonals"
    descr	"They avoid taking any shortcuts."
}

AI FLANK
{
    name	"Flanks"
    descr	"They dance around to attack from the flanks."
}

AI RANGECOWARD
{
    name	"Attacks from Afar"
    descr	"They keep their distance to attack from afar."
}

AI COWARD
{
    name	"Runs Away"
    descr	"They flee any danger."
}

AI MOUSE
{
    name	"Hugs Walls"
    descr	"They keep close to walls."
}

AI PEACEFUL
{
    name	"Peaceful"
    descr	"They do not seek any battle."
}

AI ADVENTURER
{
    name	"Commits Genocide for Profit"
    descr	"They kill any and all, even if it nets them naught but a dirty rag."
}

AI RANDOMBUMP
{
    name	"Stumbles about Randomly"
    descr	"Stumbles about randomly, woe to those in their way."
}

AI ORC
{
    name	"Peacefully Inhabits Dungeons"
    descr	"They form the backbone of properly civilized dungeons."
}

DEFINE DISTRIBUTION
{
    CST		name	"none"
    CST		descr	"none"
}

DISTRIBUTION CONSTANT
{
    name	"Always Same"
    descr	"exactly"
}

DISTRIBUTION GAUSSIAN
{
    name	"Usually Similar"
    descr	"about"
}

DISTRIBUTION UNIFORM
{
    name	"Widely Spread"
    descr	"a variable"
}

DISTRIBUTION BIMODAL
{
    name	"Either BIG or small"
    descr	"a highly variable"
}


DEFINE ATTACK
{
    CST		verb	"attack"
    CST		noun	"attack"
    CST		fireball "cloud of daggers appears"

    ENM		effect	EFFECT	NONE
    ENM		element	ELEMENT	PHYSICAL
    ENM		damageclass DAMAGECLASS NONE
    DICE	damage		0
    int		chancebonus	0
}

ATTACK NONE

ATTACK KICK
{
    verb	"kick"
    noun	"feet"
    damageclass	BLUNT
    damage	1d3
}

EFFECT POISONCORPSE
{
    type	POISON
    duration	5
}

EFFECT HASTECORPSE
{
    type	GAINITEM
    itemflag	HASTED
    duration	5
}

EFFECT PLAGUECORPSE
{
    type	GAINITEM
    itemflag	PLAGUE
    duration	100
}

EFFECT ACIDCORPSE
{
    type	DAMAGE
    amount	3
    element	ACID
}


COMMENT { We had a perfectly good enum list that did not survive python }

DEFINE ITEMLIST
{
    ENM	item	ITEM	NONE
    ENM itemclass ITEMCLASS NONE
    INT	chance	100
    DICE	count	1
    ENM next	ITEMLIST NONE
}

ITEMLIST NONE

ITEMLIST STARTER_AVATAR
{
    itemclass FOOD count 1 next { 
    item FLINT_AXE next {
    item SNOWSHOES
    } }
}

ITEMLIST WIZARD
{
    item	DAGGER next { 
    item ROBES next { 
    itemclass SPELLBOOK next { 
    itemclass SPELLBOOK next { 
    itemclass SCROLL count 1d2 next { 
    item WRITINGSET next {
    itemclass POTION count 1d2 next 
    STARTER_AVATAR 
    } } } } } }
}

ITEMLIST THIEF
{
    item SHORTSWORD next { 
    item LEATHER next { 
    item BOW next { 
    item ARROW count 3 next {
    item LOCKPICK count 2 next
    STARTER_AVATAR 
    } } } }
}

ITEMLIST FIGHTER
{
    item	LONGSWORD next { 
    item RINGMAIL next  {
    item PICKAXE next {
    itemclass WAND count 1 next {
    itemclass FOOD count 1 next 
    STARTER_AVATAR 
    } } } }
}

ITEMLIST GOLD
{
    chance	40
    item	COIN
}

ITEMLIST BOW_AND_GOLD
{
    item	BOW next {
    item	ARROW count 3 next GOLD
    }
}


DEFINE STARTITEMS
{
    ENM itemlist	ITEMLIST NONE
    int	rarity		100
    ENM next 		STARTITEMS	NONE
}

STARTITEMS NONE

STARTITEMS AVATAR
{
    itemlist WIZARD
    rarity	100
    next
{
    itemlist THIEF
    rarity	100
    next
{
    itemlist FIGHTER
    rarity	100
} } }

STARTITEMS KOBOLD
{
    itemlist
    {
	item	DAGGER
	next { item ROBES }
    }
    rarity 	100
    next
{
    itemlist
    {
	item	MACE
	next { item RINGMAIL next GOLD }
    }
    rarity	25
    next
{
    itemlist
    {
	item	BOW
	next { item ARROW count 2 next GOLD }
    }
    rarity	50
    next
{
    itemlist
    {
	item	SLING
	next { item ROCK count 2 next GOLD }
    }
    rarity	50
} } } }

ATTACK BROKEN
{
    verb	"bash"
    noun	"broken weapon"
    damageclass	BLUNT

    damage	1
    chancebonus	-3
}


DEFINE MOB
{
    U8		symbol		'?'
    ENM		attr		ATTR		NORMAL

    CST		name		"unnamed"
    CST		descr		""
    BOOL	isfriendly	false
    BOOL	isavatarform	false

    ENM		melee_attack	ATTACK	NONE

    ENM		role		ROLE		NONE

    bool	range_valid	false
    ENM		range_attack	ATTACK	NONE
    int		range_range	0
    int		range_area	1
    int		range_recharge	0
    U8		range_symbol	'*'
    CST		range_announce	"%S <shoot>."
    ENM		range_attr	ATTR	NORMAL
    ENM		range_ammo	ITEM	NONE

    DICE	max_hp		1
    DICE	max_mp		0
    DICE        hp_gain         1d4+4
    DICE        mp_gain         1d4+4

    int		damagereduction		0
    int		dodgebonus	0

    int		depth		0
    int		rarity		100
    bool	wilderness	false

    ENM		ai		AI		CHARGE

    int		corpsechance	30
    ENM		corpse_effect	EFFECT	NONE

    ENM		butcheritems	STARTITEMS	NONE

    ENM		eggtype		MOB	NONE

    int		loot		-1

    ENM		startitems	STARTITEMS NONE

    ENM		vulnerability	ELEMENT	NONE
    ENM		resistance	ELEMENT NONE

    BOOL	isslow		false
    BOOL	isfast		false
    BOOL	isvampire	false
    BOOL	canbreathe	true
    BOOL	hidefromlos	false
    BOOL	isregenerate	false
    BOOL	passwall	false
    BOOL	candig		false
    BOOL	opendoors	false
    BOOL	breakdoors	false
    BOOL	kickdoors	false
    BOOL	swallows	false
    BOOL	breeder		false
    BOOL	isthief		false
    BOOL	canleap		false
    BOOL        cansleep        true
    int		sightrange	25
    int		fleerange	25
    BOOL	corrosiveblood	false
    BOOL	isconstruct	false
    BOOL	useitems	false
    BOOL	canread		false
    BOOL	canwield	false
    BOOL	canequip	false
    BOOL	covetous	false
    int		emitlight	0
    BOOL	walkonsnow	false
    BOOL	canfly		false
    bool	extinguishfire	false

    INT		totalkillsever	0

    ENM		size		SIZE SMALL
}

MOB NONE
{
    symbol	'!'
    attr	WHITE
    name	"program error"

    rarity	0
}

MOB AVATAR
{
    symbol	'@'
    attr	CYAN
    isfriendly	true
    isavatarform true

    role	THIEF

    ai		ADVENTURER
    size	MEDIUM

    damagereduction	0
    dodgebonus		0

    opendoors	true
    kickdoors	true
    useitems	true
    canread	true
    canwield	true
    canequip	true
    covetous	true
    extinguishfire	true

    melee_attack
    {
	verb	"punch"
	noun	"fists"
	damageclass	BLUNT

	damage	1
    }

    startitems	NONE

    max_hp	20
    hp_gain     1d3+3

    max_mp	10
    mp_gain	1d2+1

    name	"you"
    corpsechance	100
    corpse_effect	PLAGUECORPSE
}

MOB RABBIT
{
    symbol	'r'
    depth	0
    wilderness	true
    max_hp	1d4
    attr	WHITE
    ai		COWARD
    size	TINY
    isfast	true
    corpsechance	100
    fleerange	4
    walkonsnow	true
    melee_attack	
    {
	verb	"bite"
	noun	"teeth"
	damageclass	PIERCE
	damage	1d2
    }
    name	"rabbit"
}

MOB BLUEJAY
{
    symbol	'B'
    depth	0
    wilderness	true
    max_hp	1d4
    attr	LTBLUE
    ai		COWARD
    size	TINY
    rarity	50
    corpsechance	100
    fleerange	4
    walkonsnow	true
    canfly	true
    melee_attack	
    {
	verb	"bite"
	noun	"beak"
	damageclass	PIERCE
	damage	1d2
    }
    butcheritems
    {
	itemlist { item FEATHER count 1d3 
		 }
    }
    name	"blue jay"
}
MOB CARDINAL
{
    symbol	'B'
    depth	0
    wilderness	true
    max_hp	1d4
    attr	RED
    ai		COWARD
    size	TINY
    rarity	50
    fleerange	4
    corpsechance	100
    walkonsnow	true
    canfly	true
    melee_attack	
    {
	verb	"bite"
	noun	"beak"
	damageclass	PIERCE
	damage	1d2
    }
    butcheritems
    {
	itemlist { item FEATHER count 1d3
		 }
    }
    name	"cardinal"
}
MOB DEER
{
    symbol	'C'
    depth	0
    wilderness	true
    max_hp	2d8
    attr	BROWN
    ai		COWARD
    size	MEDIUM
    rarity	100
    fleerange	5
    walkonsnow	true
    corpsechance	100
    melee_attack	
    {
	verb	"butt"
	noun	"antlers"
	damageclass	PIERCE
	damage	1d4
    }
    butcheritems
    {
	itemlist { item HIDE count 1d4 
		 }
    }
    name	"deer"
}

MOB COYOTE
{
    symbol	'd'
    depth	0
    wilderness	true
    max_hp	2d8
    attr	YELLOW
    ai		RAT
    size	MEDIUM
    rarity	100
    corpsechance	100
    walkonsnow	true
    fleerange	10
    melee_attack	
    {
	verb	"bite"
	noun	"teeth"
	damageclass	PIERCE
	damage	1d4
    }
    butcheritems
    {
	itemlist { item HIDE count 1d2 
		 }
    }
    name	"coyote"
}

MOB BLACKBEAR
{
    symbol	'b'
    depth	0
    wilderness	true
    max_hp	5d8+10
    attr	DKBROWN
    ai		PEACEFUL
    size	LARGE
    rarity	100
    walkonsnow	true
    corpsechance	100
    melee_attack	
    {
	verb	"slash"
	noun	"claws"
	damageclass	SLASH
	damage	3d4
    }
    butcheritems
    {
	itemlist { item HIDE count 2d4
		 }
    }
    name	"black bear"
}

MOB RAT
{
    symbol	'r'
    depth	1
    max_hp	1d8
    attr	BROWN
    ai		RAT
    size	TINY
    melee_attack	
    {
	verb	"bite"
	noun	"teeth"
	damageclass	PIERCE
	damage	1d2
    }
    name	"rat"
}

MOB BAT
{
    symbol	'B'
    depth	1
    max_hp	1d4
    attr	BROWN
    ai		FLANK
    size	TINY
    isfast	true
    dodgebonus	2
    canfly	true
    melee_attack	
    {
	verb	"bite"
	noun	"teeth"
	damageclass	PIERCE
	damage	1d3
    }
    name	"bat"
}

MOB VAMPIREBAT
{
    symbol	'B'
    depth	3
    max_hp	3d4
    attr	RED
    ai		FLANK
    size	TINY
    isfast	true
    isvampire	true
    dodgebonus	2
    canfly	true
    melee_attack	
    {
	verb	"bite"
	noun	"teeth"
	damageclass	PIERCE
	damage	1d3+2
	chancebonus	2
    }
    name	"vampire bat"
}

MOB SLUG
{
    symbol	's'
    depth	1
    max_hp	1d8+8
    attr	BROWN
    ai		CHARGE
    size	TINY
    isslow	true
    dodgebonus	-1
    melee_attack	
    {
	verb	"bite"
	noun	"radulae"
	damageclass	SLASH
	damage	1d4
    }
    name	"slug"
}

MOB ACIDSLUG
{
    symbol	's'
    depth	3
    max_hp	2d8+12
    attr	YELLOW
    ai		CHARGE
    size	SMALL
    isslow	true
    dodgebonus	-1
    corpse_effect	CORPSE_RESIST_ACID
    melee_attack	
    {
	verb	"dissolve"
	noun	"slime"
	damageclass	SPLASH
	damage	2d4
	element	ACID
    }
    name	"acid slug"
}

MOB DEATHSLUG
{
    symbol	's'
    depth	11
    max_hp	3d8+16
    attr	PURPLE
    ai		CHARGE
    size	MEDIUM
    canwield	true
    canequip	true
    corpsechance	50
    corpse_effect	CORPSE_RESIST_ACID
    isslow	true
    dodgebonus	-1
    melee_attack	
    {
	verb	"pierce"
	noun	"horn"
	damageclass	PIERCE
	damage	2d6
	effect { type DAMAGE amount 2d4 element ACID }
    }
    name	"death slug"
}

MOB PURPLEWORM
{
    symbol	'W'
    depth	13
    max_hp	3d8+16
    attr	PURPLE
    ai		CHARGE
    size	GIANT
    corpsechance	75
    corpse_effect	CORPSE_RESIST_ACID
    swallows	true
    melee_attack	
    {
	verb	"bite"
	noun	"teeth"
	damageclass	PIERCE
	damage	2d6
	effect { type DAMAGE amount 2d4 element ACID }
    }
    name	"purple worm"
}

MOB TRIDUDE
{
    symbol	'Y'
    depth	3
    max_hp	1d8+4
    attr	GREEN
    ai		CHARGE
    size	MEDIUM
    canwield	true
    canequip	true
    extinguishfire	true
    corpsechance	50
    melee_attack	
    { 
	verb	"smash"
	noun	"arm"
	damageclass	BLUNT
	damage  1d4 
    }
    name	"tridude"
}

MOB IMP
{
    symbol	'&'
    depth	3
    max_hp	1d8+4
    attr	BLUE
    ai		RANGECOWARD
    size	SMALL
    useitems	true
    canwield	true
    canequip	true
    canread	true
    opendoors	true
    extinguishfire	true
    corpsechance	50
    melee_attack	
    { 
	verb	"punch"
	noun	"fists"
	damageclass	BLUNT
	damage  1d3 
    }
    range_valid		true
    range_attack
    {
	verb		"burn"
	noun		"fire"
	damageclass	DODGE
	element		FIRE
	damage		1d6
    }
    range_range		6
    range_recharge	4
    range_symbol	'*'
    range_announce	"%S <cast> fire bolt."
    range_attr		FIRE
    name	"imp"
}

MOB DEVIL
{
    symbol	'&'
    depth	9
    max_hp	3d8+8
    attr	ORANGE
    ai		CHARGE
    size	MEDIUM
    useitems	true
    canwield	true
    canequip	true
    canread	true
    opendoors	true
    extinguishfire	true
    corpsechance	50
    melee_attack	
    { 
	verb	"claw"
	noun	"claws"
	damageclass	SLASH
	damage  1d8
    }
    range_valid		true
    range_attack
    {
	verb		"freeze"
	noun		"ice"
	damageclass	DODGE
	element		ICE
	damage		1d6
    }
    range_range		6
    range_recharge	4
    range_symbol	'*'
    range_announce	"%S <cast> ice bolt."
    range_attr		FIRE
    name		"devil"
}

MOB DOG
{
    symbol	'd'
    depth	1
    max_hp	1d8
    attr	LIGHTBROWN
    ai		CHARGE
    size	SMALL
    melee_attack	
    { 
	verb	"bite"
	noun	"teeth"
	damageclass	PIERCE
	damage  1d2 
    }
    name	"dog"
}

MOB WOLF
{
    symbol	'd'
    depth	9
    max_hp	3d8+8
    attr	NORMAL
    ai		CHARGE
    size	SMALL
    corpsechance	50
    melee_attack	
    { 
	verb	"bite"
	noun	"teeth"
	damageclass	PIERCE
	damage  1d8 
    }
    name	"wolf"
}

MOB ICEWOLF
{
    symbol	'd'
    depth	9
    max_hp	2d8+8
    attr	ICE
    ai		CHARGE
    size	SMALL
    corpsechance	50
    melee_attack	
    { 
	verb	"bite"
	noun	"teeth"
	damageclass	PIERCE
	damage  1d8 
    }
    range_valid		true
    range_attack
    {
	verb		"freeze"
	noun		"frost breath"
	damageclass	DODGE
	element		ICE
	damage		2d6
    }
    range_range		3
    range_recharge 	4
    range_symbol	'*'
    range_announce	"%S <breathe> frost."
    range_attr		WHITE
    name	"ice wolf"
}

MOB CULTIST
{
    symbol	'@'
    depth	1
    max_hp	1d4
    attr	WHITE
    ai		PEACEFUL
    size	MEDIUM
    rarity	10

    corpsechance	50
    corpse_effect PLAGUECORPSE

    opendoors	true
    useitems	true
    canread	true
    canwield	true
    canequip	true
    covetous	false
    extinguishfire	true

    melee_attack	
    { 
	verb	"punch"
	noun	"fists"
	damageclass	BLUNT
	damage  1d2 
    }
    name	"cultist"
}

MOB GUARD
{
    symbol	'@'
    depth	3
    max_hp	2d8+4
    attr	BROWN
    ai		CHARGE
    size	MEDIUM

    startitems
    {
	itemlist { item DAGGER } next {
	itemlist { item CLUB }
	}
    }

    opendoors	true
    useitems	true
    canread	false
    canwield	true
    canequip	true
    covetous	true
    extinguishfire	true

    corpsechance	50
    corpse_effect PLAGUECORPSE

    melee_attack	
    { 
	verb	"punch"
	noun	"fists"
	damageclass	BLUNT
	damage  1d2 
    }
    name	"guard"
}

MOB ARCHER
{
    symbol	'@'
    depth	5
    max_hp	2d8+4
    attr	GREEN
    ai		RANGECOWARD
    size	MEDIUM

    startitems
    {
	itemlist { item DAGGER next {
		   item BOW next {
		   item ARROW count 3 next GOLD
		 } }
	}
    }

    opendoors	true
    useitems	true
    canread	true
    canwield	true
    canequip	true
    covetous	true
    extinguishfire	true

    corpsechance	50
    corpse_effect PLAGUECORPSE

    melee_attack	
    { 
	verb	"punch"
	noun	"fists"
	damageclass	BLUNT
	damage  1d2 
    }
    name	"archer"
}

MOB THIEF
{
    symbol	'@'
    depth	7
    max_hp	3d8+8
    attr	LIGHTBROWN
    ai		CHARGE
    size	MEDIUM

    opendoors	true
    useitems	true
    canread	true
    canwield	true
    canequip	true
    covetous	true
    dodgebonus	1
    extinguishfire	true

    startitems
    {
	itemlist
	{
	    item SHORTSWORD next {
	    item LEATHER next {
	    itemclass SCROLL chance 50 next {
	    itemclass POTION chance 50 next {
	    itemclass WAND chance 10 next GOLD
	    } } } }
	}
    }

    isthief	true

    corpsechance	50
    corpse_effect PLAGUECORPSE

    melee_attack	
    { 
	verb	"punch"
	noun	"fists"
	damageclass	BLUNT
	damage  1d2 
    }
    name	"thief"
}

MOB ASSASSIN
{
    symbol	'@'
    depth	7
    max_hp	2d8+8
    attr	LIGHTBLACK
    ai		RANGECOWARD
    size	MEDIUM

    dodgebonus	2

    startitems
    {
	itemlist { item DAGGER next {
		   item ROBES next {
		   itemclass SCROLL count 1d4-1 next {
		   itemclass POTION count 1d4-1 next {
		   itemclass WAND chance 5 next {
		   item BOW next {
		   item ARROW count 3 next GOLD
		 } } } } } }
	}
    }

    opendoors	true
    useitems	true
    canread	true
    canwield	true
    canequip	true
    covetous	true
    extinguishfire	true

    corpsechance	50
    corpse_effect PLAGUECORPSE

    melee_attack	
    { 
	verb	"punch"
	noun	"fists"
	damageclass	BLUNT
	damage  1d2 
    }
    name	"assassin"
}

MOB SKELETON
{
    symbol	'Z'
    depth	3
    max_hp	3d8
    attr	WHITE
    ai		CHARGE

    size	MEDIUM
    
    isconstruct	true
    canbreathe	false
    cansleep    false
    canwield	true
    canequip	true
    corpsechance 0

    melee_attack	
    { 
	verb	"punch"
	noun	"fists"
	damageclass	BLUNT
	damage  1d6 
    }
    name	"skeleton"
}

MOB ZOMBIE
{
    symbol	'Z'
    depth	5
    max_hp	3d8+8
    attr	BROWN
    ai		CHARGE

    size	MEDIUM
    
    canbreathe	false
    cansleep    false
    canwield	true
    canequip	true
    corpsechance 30
    corpse_effect PLAGUECORPSE
    isslow	true

    melee_attack	
    { 
	verb	"claw"
	noun	"nails"
	damageclass	SLASH
	damage  2d4
    }
    name	"zombie"
}

MOB GHOST
{
    symbol	' '
    depth	9
    max_hp	3d8
    attr	LIGHTBLACK
    ai		CHARGE

    size	MEDIUM
    
    isconstruct	true
    canbreathe	false
    cansleep    false
    corpsechance 0
    passwall	true
    resistance	PHYSICAL

    melee_attack	
    { 
	verb	"freeze"
	noun	"frightening aspect"
	damageclass	DODGE
	damage  1d6 
    }
    name	"ghost"
}

MOB KOBOLD
{
    symbol	'k'
    depth	5
    max_hp	1d8+4
    attr	PURPLE
    ai		CHARGE
    startitems	KOBOLD
    size	SMALL
    opendoors	true
    useitems	true
    canread	true
    canwield	true
    canequip	true
    covetous	true
    extinguishfire	true
    melee_attack	
    { 
	verb	"scratch"
	noun	"nails"
	damageclass	SLASH
	damage  1d2 
    }
    name	"kobold"
}

MOB KOBOLD_THIEF
{
    symbol	'k'
    depth	7
    max_hp	2d8
    attr	LIGHTBLACK
    ai		CHARGE
    opendoors	true
    useitems	true
    canread	true
    canwield	true
    canequip	true
    covetous	true
    extinguishfire	true
    dodgebonus	1
    startitems
    {
	itemlist
	{
	    item SHORTSWORD next {
	    item ROBES next {
	    itemclass SCROLL chance 50 next {
	    itemclass POTION chance 50 next {
	    itemclass WAND chance 5 next GOLD
	    } } } }
	}
    }
    size	SMALL

    isthief	true

    melee_attack	
    { 
	verb	"scratch"
	noun	"nails"
	damageclass	SLASH
	damage  1d2 
    }
    name	"kobold thief"
}

MOB ORC
{
    symbol	'o'
    depth	9
    max_hp	3d8+8
    attr	WHITE
    ai		CHARGE
    opendoors	true
    useitems	true
    canread	true
    canwield	true
    canequip	true
    covetous	true
    corpsechance	50
    extinguishfire	true

    startitems
    {
	itemlist
	{
	    item LONGSWORD next {
	    item RINGMAIL next {
	    next GOLD
	    } }
	}
	next
    {
	itemlist
	{
	    item MACE next {
	    item CHAINMAIL next {
	    next GOLD
	    } }
	}
	next
    {
	itemlist
	{
	    item WARHAMMER next {
	    item STUDDEDLEATHER next {
	    next GOLD
	    } }
	}
	next
    {
	itemlist
	{
	    item GREATAXE next {
	    item LEATHER next {
	    next GOLD
	    } }
	}
	next
    {
	itemlist
	{
	    item WARHAMMER next {
	    item STUDDEDLEATHER next {
	    next GOLD
	    } }
	}
    } } } } }

    size	MEDIUM

    melee_attack	
    { 
	verb	"punch"
	noun	"fists"
	damageclass	BLUNT
	damage  1d4 
    }
    name	"orc"
}

MOB TROLL
{
    symbol	'T'
    depth	13
    max_hp	2d8+12
    attr	GREEN
    ai		CHARGE
    opendoors	true
    canread	false
    canwield	true
    canequip	true
    covetous	true
    extinguishfire	true
    corpsechance	75
    isregenerate	true
    corpse_effect { type GAINITEM itemflag REGEN duration 20 }
    size	MEDIUM

    melee_attack	
    { 
	verb	"slash"
	noun	"claws"
	damageclass	SLASH
	damage  1d8 
    }
    name	"troll"
}

MOB VAMPIRE
{
    symbol	'V'
    depth	13
    max_hp	2d8+16
    attr	RED
    ai		CHARGE
    opendoors	true
    useitems	true
    canread	true
    canwield	true
    canequip	true
    isvampire	true
    extinguishfire	true
    size	MEDIUM
    cansleep    false
    canbreathe	false
    corpsechance	50

    melee_attack	
    { 
	verb	"bite"
	noun	"fangs"
	damageclass	PIERCE
	damage  1d8 
    }
    name	"vampire"
}

MOB GIANT
{
    symbol	'G'
    depth	13
    max_hp	4d8+12
    attr	GREY
    ai		CHARGE
    size	GIANT
    corpsechance	75

    covetous	true
    canread	false
    canwield	true
    canequip	true
    extinguishfire	true

    startitems { itemlist { item BOULDER count 1d2 } }

    melee_attack	
    { 
	verb	"bash"
	noun	"fists"
	damageclass	BLUNT
	damage  2d3
    }

    range_valid		true
    range_attack	
    {
	verb	"crush"
	noun	"boulder"
	damageclass	BLUNT
	damage	2d6
    }
    range_range		5
    range_recharge	0
    range_symbol	'0'
    range_attr		GREY
    range_ammo		BOULDER
    range_announce	"%S <throw> %O."

    name	"giant"
}

MOB WHITEDRAGON
{
    symbol	'D'
    depth	15
    max_hp	5d8+16
    attr	WHITE
    ai		CHARGE
    size	GIANT
    rarity	100

    corpsechance	75
    corpse_effect CORPSE_RESIST_ICE
    breakdoors	true
    resistance	ICE
    canfly	true

    covetous	true
    canread	true
    extinguishfire	true

    melee_attack	
    { 
	verb	"bite"
	noun	"fangs"
	damageclass	PIERCE
	damage  1d10
    }

    range_valid		true
    range_attack	
    {
	verb	"freeze"
	noun	"ice breath"
	damageclass	DODGE
	damage	2d6
	element	ICE
    }
    range_range		4
    range_recharge	6
    range_symbol	'/'
    range_attr		ICE
    range_announce	"%S <breathe> ice."

    name	"white dragon"
}

MOB BLACKDRAGON
{
    symbol	'D'
    depth	15
    max_hp	5d8+16
    attr	LIGHTBLACK
    ai		CHARGE
    size	GIANT
    rarity	100

    corpsechance	75
    corpse_effect CORPSE_RESIST_ACID
    breakdoors	true
    resistance	ACID
    canfly	true

    covetous	true
    canread	true
    extinguishfire	true

    melee_attack	
    { 
	verb	"smash"
	noun	"tail"
	damageclass	BLUNT
	damage  2d4
    }

    range_valid		true
    range_attack	
    {
	verb	"dissolve"
	noun	"acid breath"
	fireball	"cloud of acid condenses"
	damageclass	DODGE
	damage	3d6
	element	ACID
    }
    range_range		2
    range_area		2
    range_recharge	3
    range_symbol	'*'
    range_attr		ORANGE
    range_announce	"%S <breathe> a cloud of acid."

    name	"black dragon"
}

MOB BLUEDRAGON
{
    symbol	'D'
    depth	15
    max_hp	5d8+16
    attr	BLUE
    ai		CHARGE
    size	GIANT
    rarity	100

    corpsechance	75
    corpse_effect CORPSE_RESIST_ELECTRICITY
    breakdoors	true
    resistance	ELECTRICITY

    covetous	true
    canread	true
    extinguishfire	true
    canfly	true

    melee_attack	
    { 
	verb	"smash"
	noun	"tail"
	damageclass	BLUNT
	damage  2d4
    }

    range_valid		true
    range_attack	
    {
	verb	"zap"
	noun	"lightning breath"
	damageclass	DODGE
	damage	2d6
	element	ELECTRICITY
    }
    range_range		8
    range_recharge	6
    range_symbol	'/'
    range_attr		YELLOW
    range_announce	"%S <breathe> lightning."

    name	"blue dragon"
}

MOB REDDRAGON
{
    symbol	'D'
    depth	15
    max_hp	5d8+16
    attr	RED
    ai		CHARGE
    size	GIANT
    rarity	100

    corpsechance	75
    corpse_effect CORPSE_RESIST_FIRE

    covetous	true
    canread	true
    breakdoors	true
    resistance	FIRE
    extinguishfire	true
    canfly	true

    melee_attack	
    { 
	verb	"slash"
	noun	"claws"
	damageclass	SLASH
	damage  1d8
    }

    range_valid		true
    range_attack	
    {
	verb	"burn"
	noun	"fire breath"
	fireball	"ball of fire explodes"
	damageclass	DODGE
	damage	2d6
	element	FIRE
    }
    range_range		5
    range_area		2
    range_recharge	6
    range_symbol	'*'
    range_attr		FIRE
    range_announce	"%S <breathe> fire."

    name	"red dragon"
}

MOB GREENDRAGON
{
    symbol	'D'
    depth	15
    max_hp	5d8+16
    attr	GREEN
    ai		CHARGE
    size	GIANT
    rarity	100

    corpsechance	75
    corpse_effect { type POISON duration 20 next CORPSE_RESIST_POISON }
    breakdoors	true
    resistance	POISON

    covetous	true
    canread	true
    extinguishfire	true
    canfly	true

    melee_attack	
    { 
	verb	"bite"
	noun	"fangs"
	damageclass	PIERCE
	damage  1d10
	effect	{ type POISON duration 20 }
    }

    name	"green dragon"
}

MOB GRIDBUG
{
    symbol	'x'
    depth	1
    max_hp	1d8
    attr	PURPLE
    ai		ORTHO
    size	MEDIUM
    resistance	ELECTRICITY
    corpse_effect CORPSE_RESIST_ELECTRICITY
    cansleep    false
    melee_attack	
    { 
	verb	"zap"
	noun	"electric aura"
	damageclass	BYPASS
	damage  1d6
	element	ELECTRICITY
    }
    name	"grid bug"
}

MOB SPIDERLING
{
    symbol	'a'
    depth	1
    rarity	0
    max_hp	1d4+4
    attr	WHITE
    ai		CHARGE
    size	TINY
    resistance	POISON
    corpse_effect CORPSE_APPLYPOISON
    melee_attack	
    { 
	verb	"bite"
	noun	"fangs"
	damageclass	PIERCE
	damage  1d2 
    }
    name	"spiderling"
}

MOB CAVESPIDER
{
    symbol	'a'
    depth	5
    max_hp	1d8+4
    attr	GREY
    ai		CHARGE
    size	SMALL
    resistance	POISON
    corpse_effect CORPSE_APPLYPOISON
    eggtype	SPIDERLING
    melee_attack	
    { 
	verb	"bite"
	noun	"fangs"
	damageclass	PIERCE
	damage  1d5 
	effect
	{
	    type 	POISON
	    duration	5
	}
    }
    name	"cave spider"
}

MOB FIREANT
{
    symbol	'a'
    depth	7
    max_hp	2d8+8
    attr	RED
    ai		CHARGE
    size	MEDIUM
    resistance	FIRE
    corpse_effect CORPSE_RESIST_FIRE
    melee_attack	
    { 
	verb	"burn"
	noun	"mandibles"
	damageclass	PIERCE
	damage  1d8
	element	FIRE
    }
    name	"fire ant"
}

MOB GIANTSPIDER
{
    symbol	'a'
    depth	11
    max_hp	2d8+8
    attr	LIGHTBLACK
    ai		CHARGE
    size	MEDIUM
    extinguishfire	true
    resistance	POISON
    eggtype	CAVESPIDER
    corpse_effect CORPSE_APPLYPOISON
    corpsechance	50
    melee_attack	
    { 
	verb	"bite"
	noun	"fangs"
	damageclass	PIERCE
	damage  2d5 
	effect
	{
	    type 	POISON
	    duration	10
	}
    }
    name	"giant spider"
}

MOB BAEZLBUB
{
    symbol	'&'
    attr	RED
    depth	20
    rarity	0

    dodgebonus	5

    melee_attack	
    {
	verb	"claw"
	noun	"claws"
	damageclass	SLASH
	damage	2d6
    }

    size		GIANT

    range_valid		true
    range_attack
    {
	verb		"zap"
	noun		"lightning"
	damageclass	DODGE
	element		ELECTRICITY
	damage		2d6
    }
    range_range		5
    range_recharge	4
    range_symbol	'%'
    range_announce	"%S <zap> lightning bolt."
    range_attr		YELLOW

    name	"Beezlbub"

    ai		PATHTO
    opendoors	true
    canread	true
    canwield	true
    canequip	true
    corpsechance	100
    extinguishfire	true
    corpse_effect PLAGUECORPSE
    cansleep    false

    max_hp	100
    mp_gain     0
}

DEFINE ARMOURSLOT
{
    CST		name		"body"
    INT		coverage	50
}

ARMOURSLOT NONE

ARMOURSLOT BODY
{
    name		"body"
    coverage		100
}

ARMOURSLOT FEET
{
    name		"feet"
    coverage		0
}

DEFINE ITEMCLASS
{
    CST		name	"no class"
    U8		symbol	'~'
    INT		rarity	100
}

ITEMCLASS NONE
{
    name	"miscellaneous"
}

ITEMCLASS MELEEWEAPON
{
    name	"weapon"
    symbol	')'
    rarity	0
}

ITEMCLASS RANGEWEAPON
{
    name	"weapon"
    symbol	')'
    rarity	0
}

ITEMCLASS AMMO
{
    name	"ammo"
    symbol	'\\'
    rarity	0
}

ITEMCLASS WAND
{
    name	"wand"
    symbol	'/'
    rarity	0
}

ITEMCLASS TOOL
{
    name	"tool"
    symbol	'('
    rarity	0
}

ITEMCLASS ARMOUR
{
    name	"armour"
    symbol	'['
    rarity      0
}

ITEMCLASS POTION
{
    name	"potion"
    symbol	'!'
    rarity	0
}

ITEMCLASS SCROLL
{
    name	"scroll"
    symbol	'?'
    rarity	0
}

ITEMCLASS SPELLBOOK
{
    name	"spellbook"
    symbol	'+'
    rarity	0
}

ITEMCLASS RING
{
    name	"ring"
    symbol	'='
    rarity	0
}

ITEMCLASS FOOD
{
    name	"food"
    symbol	'%'
    rarity	10
}

ITEMCLASS FURNITURE
{
    name	"furniture"
    symbol	'O'
    rarity	0
}

ITEMCLASS TREASURE
{
    name	"treasure"
    symbol	'$'
    rarity	100
}

ITEMCLASS MATERIAL
{
    name	"material"
    symbol	']'
    rarity	0
}

DEFINE ITEM
{
    CST		name		"unnamed"
    INT		timer		-1
    BOOL	applytimer	true
    ENM		aftertimer	ITEM		NONE
    INT		rarity		100
    INT		depth		0
    BOOL	thesaurus	false
    ENM		roles		ROLELIST	ALL

    BOOL	isflag		false

    U8		symbol		'&'
    ENM		attr	ATTR	CYAN
    
    BOOL	exclusive	false

    BOOL	needsmaterial	false
    BOOL	gildable	false
    int		mass		1
    INT		foodval		0
    ENM		size		SIZE		TINY

    int		emitlight	0
    int		emitheat	0

    ENM		itemclass	ITEMCLASS	NONE

    CST		gaintxt		0
    CST		losetxt		0
    BOOL	needtarget	false
    BOOL	unstackable	false    
    DICE	startstack	1

    ENM		gemsetting	ITEM	NONE

    ENM		melee_attack	ATTACK	NONE

    int		stackpriority	0

    int		damagereduction	0
    int		ac_slash	0
    int		ac_blunt	0
    int		ac_pierce	0
    int		ac_splash	0
    int		ac_dodge	0
    enm		armourslot	ARMOURSLOT	NONE
    int		noise		0

    int		range_range	0
    ENM		range_attack	ATTACK	NONE
    int		range_area	1
    CST		range_announce	"%S <shoot>."
    U8		range_symbol	'*'
    ENM		range_attr	ATTR	NORMAL
    ENM		ammo		ITEM	NONE

    BOOL	startsbroken	false
    int		breakchance	0
    BOOL	discardextra	false
    bool	throwable	false
    bool	quest		false
}

ITEM NONE
{
    name	"Programming Error"
    symbol	'!'
    attr	WHITE
    rarity	0
}

ITEM FLINT_DAGGER
{
    name	"flint dagger"
    symbol	')'
    attr	GREY
    depth	1
    itemclass	MELEEWEAPON
    roles	ALL
    melee_attack
    {
	verb	"stab"
	noun	"dagger"

	damageclass	PIERCE
	damage		1d4
	chancebonus	0
    }
    throwable	false
    noise	1
}

ITEM DAGGER
{
    name	"dagger"
    symbol	')'
    attr	CYAN
    depth	1
    itemclass	MELEEWEAPON
    roles	ALL
    melee_attack
    {
	verb	"stab"
	noun	"dagger"

	damageclass	PIERCE
	damage		1d4
	chancebonus	2
    }
    throwable	true
    noise	1
}

ITEM FLINT_AXE
{
    name	"flint axe"
    symbol	')'
    attr	GREY
    depth	1
    itemclass	MELEEWEAPON
    roles	ALL
    melee_attack
    {
	verb	"slash"
	noun	"axe"

	damageclass	SLASH
	damage		1d3
	chancebonus	0
    }
    throwable	false
    noise	1
}

ITEM STONE_HAMMER
{
    name	"stone hammer"
    symbol	')'
    attr	DKGREY
    depth	0
    itemclass	MELEEWEAPON
    size	SMALL
    roles	F
    melee_attack	
    {
	verb	"bash"
	noun	"hammer"

	damageclass BLUNT
	damage	1d4
    }
    noise	3
}

ITEM SHORTSWORD
{
    name	"shortsword"
    symbol	')'
    attr	CYAN
    depth	1
    itemclass	MELEEWEAPON
    roles	TF
    melee_attack	
    {
	verb		"slash"
	noun		"shortsword"

	damageclass	SLASH
	damage		1d6
	chancebonus	1
    }
    noise	2
}

ITEM LONGSWORD
{
    name	"longsword"
    symbol	')'
    attr	CYAN
    depth	1
    itemclass	MELEEWEAPON
    roles	TF
    melee_attack
    {
	verb	"slash"
	noun	"longsword"

	damageclass	SLASH
	damage		1d8
	chancebonus	0
    }
    noise	2
}

ITEM GREATAXE
{
    name	"great axe"
    symbol	')'
    attr	CYAN
    depth	1
    itemclass	MELEEWEAPON
    size	SMALL
    roles	F
    melee_attack
    {
	verb	"slash"
	noun	"greataxe"

	damageclass	SLASH
	damage		1d12
	chancebonus	-1
    }
    noise	3
}

ITEM CLUB
{
    name	"club"
    symbol	')'
    attr	BROWN
    depth	1
    itemclass	MELEEWEAPON
    roles	TF
    melee_attack
    {
	verb	"club"
	noun	"club"

	damageclass BLUNT
	damage	2d3-1
    }
    noise	1
}

ITEM MACE
{
    name	"mace"
    symbol	')'
    attr	CYAN
    depth	1
    itemclass	MELEEWEAPON
    roles	TF
    melee_attack
    {
	verb	"smash"
	noun	"mace"

	damageclass BLUNT
	damage	2d4-1
    }
    noise	2
}

ITEM WARHAMMER
{
    name	"warhammer"
    symbol	')'
    attr	CYAN
    depth	1
    itemclass	MELEEWEAPON
    size	SMALL
    roles	F
    melee_attack	
    {
	verb	"crush"
	noun	"warhammer"

	damageclass BLUNT
	damage	3d4-2
    }
    noise	3
}

ITEM SPEAR
{
    name	"spear"
    symbol	')'
    attr	LIGHTBROWN
    depth	1
    itemclass	MELEEWEAPON
    roles	TF
    melee_attack
    {
	verb	"stab"
	noun	"spear"

	damageclass PIERCE
	damage	1d6
    }
    throwable	true
    noise	1
}

ITEM ARROW
{
    name	"arrow"
    symbol	'\\'
    attr	BROWN
    depth	1

    startstack	1d4

    breakchance	50

    itemclass	AMMO
}

ITEM ROCK
{
    name	"rock"
    symbol	'*'
    attr	GREY
    depth	1

    throwable	true

    startstack	1d4

    melee_attack
    {
	verb	"smash"
	noun	"rock"
	damageclass BLUNT
	damage	1d4
    }

    noise	2

    itemclass	AMMO
}

ITEM LARGEROCK
{
    name	"large rock"
    symbol	'o'
    attr	GREY
    depth	0
    rarity	0
    size	MEDIUM

    startstack 	1

    itemclass	MATERIAL
}

ITEM DRESSEDSTONE
{
    name	"dressed stone"
    symbol	'o'
    attr	WHITE
    depth	0
    rarity	0
    size	MEDIUM

    startstack 	1

    itemclass	MATERIAL
}

ITEM FLINT
{
    name	"flint"
    symbol	'*'
    attr	DKGREY
    depth	0
    rarity	0

    startstack 	1

    itemclass	MATERIAL
}

ITEM IRONORE
{
    name	"iron ore"
    symbol	'*'
    attr	RED
    depth	0
    rarity	0

    startstack 	1

    itemclass	MATERIAL
}

ITEM GOLD_INGOT
{
    name	"gold ingot"
    symbol	'*'
    attr	GOLD
    depth	0
    rarity	0

    startstack 	1

    itemclass	MATERIAL
}

ITEM IRON_INGOT
{
    name	"iron ingot"
    symbol	'*'
    attr	CYAN
    depth	0
    rarity	0

    startstack 	1

    itemclass	MATERIAL
}

ITEM STEEL_INGOT
{
    name	"steel ingot"
    symbol	'*'
    attr	WHITE
    depth	0
    rarity	0

    startstack 	1

    itemclass	MATERIAL
}

ITEM COAL
{
    name	"coal lump"
    symbol	'*'
    attr	DKHILITE
    depth	0
    rarity	0

    startstack 	1

    itemclass	MATERIAL
}

ITEM CHARCOAL
{
    name	"charcoal lump"
    symbol	'*'
    attr	DKHILITE
    depth	0
    rarity	0

    startstack 	1

    itemclass	MATERIAL
}

ITEM FEATHER
{
    name	"feather"
    symbol	'/'
    attr	WHITE
    depth	0
    rarity	0

    startstack 	1

    itemclass	MATERIAL
}

ITEM REEDS
{
    name	"reed bundle"
    symbol	'"'
    attr	LIGHTBROWN
    depth	0
    rarity	0

    startstack 	1

    itemclass	MATERIAL
}

ITEM CLAY
{
    name	"clay lump"
    symbol	'*'
    attr	DKRED
    depth	0
    rarity	0

    startstack 	1

    itemclass	MATERIAL
}

ITEM RINGMOLD
{
    name	"ring mold"
    symbol	'*'
    attr	BROWN
    depth	0
    rarity	0
    startstack	1
    itemclass	MATERIAL
}

ITEM PAPER
{
    name	"paper sheet"
    symbol	'?'
    attr	LIGHTBROWN
    depth	0
    rarity	0

    startstack 	1

    itemclass	MATERIAL
}

ITEM HIDE
{
    name	"hide"
    symbol	']'
    attr	LIGHTBROWN
    depth	0
    rarity	0

    startstack 	1

    itemclass	MATERIAL
}

ITEM PITCH
{
    name	"pitch blob"
    symbol	'*'
    attr	AMBER

    depth	0
    rarity	0

    startstack 	1

    itemclass	MATERIAL
}

ITEM STICK
{
    name	"stick"
    symbol	'/'
    attr	BROWN
    depth	0
    rarity	0

    startstack 	1

    itemclass	MATERIAL
}

ITEM WAND_RAW
{
    name	"plain wand"
    symbol	'/'
    attr	BROWN
    depth	0
    rarity	0

    startstack 	1

    itemclass	TOOL
}

ITEM LOG
{
    name	"log"
    symbol	'o'
    attr	BROWN
    depth	0
    rarity	0
    stackpriority	-2

    size	MEDIUM

    startstack 	1

    itemclass	MATERIAL
}

ITEM CAMPFIRE
{
    name	"fire"
    symbol	'v'
    attr	FIRE
    depth	0
    rarity	0
    size	GIANT
    emitlight	8
    emitheat	4
    timer	150
    stackpriority	1
    itemclass	MATERIAL
}

ITEM TORCH
{
    name	"torch"
    symbol	'('
    timer	250
    applytimer	false
    attr	DKBROWN
    depth	0
    rarity	0
    itemclass	TOOL
}

ITEM LIT_TORCH
{
    name	"lit torch"
    symbol	'('
    attr	FIRE
    depth	0
    rarity	0
    emitlight	6
    itemclass	TOOL
}

ITEM FORGE
{
    name	"forge"
    symbol	'V'
    attr	GREY
    depth	0
    rarity	0
    size	GIANT
    itemclass	MATERIAL
}
ITEM LIT_FORGE
{
    name	"lit forge"
    symbol	'V'
    timer	40
    aftertimer	FORGE
    attr	FIRE
    depth	0
    rarity	0
    size	GIANT
    emitlight	4
    emitheat	5
    itemclass	MATERIAL
}
ITEM KILN
{
    name	"kiln"
    symbol	'k'
    attr	GREY
    depth	0
    rarity	0
    size	GIANT
    itemclass	MATERIAL
}
ITEM LIT_KILN
{
    name	"lit kiln"
    symbol	'k'
    attr	FIRE
    timer	40
    aftertimer	KILN
    depth	0
    rarity	0
    size	GIANT
    emitlight	4
    emitheat	5
    itemclass	MATERIAL
}

ITEM BOULDER
{
    name	"boulder"
    symbol	'0'
    attr	GREY
    depth	1
    rarity	10
    size	LARGE

    throwable	true

    noise	3

    startstack 	1

    melee_attack
    {
	verb	"smash"
	noun	"boulder"
	damageclass BLUNT
	damage	2d6
    }

    itemclass	AMMO
}

ITEM BOW
{
    name	"bow"
    symbol	')'
    attr	BROWN
    depth	1

    itemclass	RANGEWEAPON
    roles	TF
    melee_attack	BROKEN

    noise	0

    range_range		10
    range_attack
    {
	verb	"pierce"
	noun	"arrow"

	damageclass PIERCE
	damage	1d8
    }
    range_symbol	'\\'
    range_attr		BROWN
    range_announce	"%S <shoot> %O."
    ammo		ARROW
    breakchance	25
}

ITEM SLING
{
    name	"sling"
    symbol	')'
    attr	BROWN
    depth	1

    itemclass	RANGEWEAPON
    roles	ALL
    melee_attack	BROKEN

    noise	0

    range_range		6
    range_attack
    {
	verb	"smash"
	noun	"rock"

	damageclass BLUNT
	damage	1d6
    }
    range_symbol	'*'
    range_announce	"%S <sling> %O."
    range_attr		GREY
    ammo		ROCK
}

ITEM ROBES
{
    name	"robes"
    symbol	'['
    attr	LIGHTBLUE
    depth	1
    itemclass	ARMOUR
    roles	ALL
    armourslot	BODY

    ac_slash	1
    ac_blunt	0
    ac_pierce	0
    ac_splash	2
    ac_dodge	0
    noise	0
}

ITEM LEATHER
{
    name	"leather armour"
    symbol	'['
    attr	BROWN
    depth	1
    size	SMALL
    itemclass	ARMOUR
    roles	TF
    armourslot	BODY

    ac_slash	2
    ac_blunt	1
    ac_pierce	2
    ac_splash	1
    ac_dodge	0
    noise	0
}

ITEM STUDDEDLEATHER
{
    name	"studded leather armour"
    symbol	'['
    attr	BROWN
    depth	2
    size	SMALL
    itemclass	ARMOUR
    roles	TF
    armourslot	BODY

    ac_slash	3
    ac_blunt	2
    ac_pierce	3
    ac_splash	1
    ac_dodge	0
    noise	0
}

ITEM RINGMAIL
{
    name	"ringmail"
    symbol	'['
    attr	CYAN
    depth	3
    size	SMALL
    itemclass	ARMOUR
    roles	F
    armourslot	BODY

    ac_slash	4
    ac_blunt	3
    ac_pierce	3
    ac_splash	1
    ac_dodge	-1
    noise	1
}

ITEM CHAINMAIL
{
    name	"chainmail"
    symbol	'['
    attr	CYAN
    depth	4
    size	SMALL
    itemclass	ARMOUR
    roles	F
    armourslot	BODY

    ac_slash	5
    ac_blunt	3
    ac_pierce	5
    ac_splash	2
    ac_dodge	0
    noise	1
}

ITEM SCALEMAIL
{
    name	"scalemail"
    symbol	'['
    attr	CYAN
    depth	5
    size	SMALL
    itemclass	ARMOUR
    roles	F
    armourslot	BODY

    ac_slash	6
    ac_blunt	6
    ac_pierce	5
    ac_splash	2
    ac_dodge	-1
    noise	2
}

ITEM PLATEMAIL
{
    name	"plate mail"
    symbol	'['
    attr	WHITE
    depth	6
    size	SMALL
    itemclass	ARMOUR
    roles	F
    armourslot	BODY

    ac_slash	6
    ac_blunt	7
    ac_pierce	6
    ac_splash	3
    ac_dodge	-2
    noise	3
}

ITEM FULLPLATE
{
    name	"fullplate"
    symbol	'['
    attr	WHITE
    depth	8
    size	MEDIUM
    itemclass	ARMOUR
    roles	F
    armourslot	BODY

    ac_slash	7
    ac_blunt	8
    ac_pierce	6
    ac_splash	4
    ac_dodge	-3
    noise	4
}

ITEM SNOWSHOES
{
    name	"snowshoes"
    symbol	'['
    attr	LIGHTBROWN
    depth	0
    size	SMALL
    itemclass	ARMOUR
    armourslot	FEET

    noise	3
}

ITEM PICKAXE
{
    name	"pick axe"
    symbol	'('
    attr	GREY
    depth	1
    size	SMALL
    itemclass	TOOL

    noise	3

    melee_attack 
    { 
	verb "pierce" 
	noun "pick axe" 
	damageclass PIERCE 
	damage 3d4 
	chancebonus -3 
    }
}

ITEM LOCKPICK
{
    name	"lockpick"
    symbol	'('
    attr	WHITE
    depth	1
    size	TINY
    itemclass	TOOL
}

ITEM WRITINGSET
{
    name	"writing set"
    symbol	'('
    attr	PURPLE
    depth	1
    size	TINY
    itemclass	TOOL
}

ITEM MEATCHUNK
{
    name	"chunk of meat"
    symbol	'%'
    attr	RED
    depth	0
    size	TINY
    itemclass	FOOD
    foodval	20
}

ITEM COOKED_MEATCHUNK
{
    name	"cooked chunk of meat"
    symbol	'%'
    attr	BROWN
    depth	0
    size	TINY
    itemclass	FOOD
    foodval	50
}

ITEM APPLE
{
    name	"apple"
    symbol	'%'
    attr	GREEN
    depth	1
    size	TINY
    itemclass	FOOD
    foodval	50
}

ITEM BISCUIT
{
    name	"biscuit"
    symbol	'%'
    attr	BROWN
    depth	1
    size	TINY
    itemclass	FOOD
    foodval	50
}

ITEM EGG
{
    name	"egg"
    symbol	'%'
    attr	WHITE
    depth	1
    size	TINY
    itemclass	FOOD
    foodval	20
    throwable	true
}

ITEM EGG_BOILED
{
    name	"boiled egg"
    symbol	'%'
    attr	WHITE
    depth	0
    size	TINY
    itemclass	FOOD
    foodval	50
    throwable	true
}

ITEM MUSHROOM
{
    name	"cave mushroom"
    symbol	'%'
    attr	BROWN
    depth	1
    size	TINY
    itemclass	FOOD
    foodval	25
}

ITEM TREE_MUSHROOM
{
    name	"mushroom"
    symbol	'%'
    attr	GREY
    depth	0
    size	TINY
    itemclass	FOOD
    foodval	25
}

ITEM SAUSAGES
{
    name	"sausages"
    symbol	'%'
    attr	DKRED
    depth	1
    size	TINY
    itemclass	FOOD
    foodval	75
}

ITEM RATION
{
    name	"ration"
    symbol	'%'
    attr	CYAN
    depth	1
    size	TINY
    itemclass	FOOD
    foodval	150
}

ITEM CHAIR
{
    name	"chair"
    symbol	'h'
    attr	BROWN
    depth	1
    size	SMALL
    itemclass	FURNITURE
    needsmaterial	true
    gildable	true
    unstackable	true
    mass	2
}

ITEM TABLE
{
    name	"table"
    symbol	'O'
    attr	BROWN
    depth	1
    itemclass	FURNITURE
    needsmaterial	true
    gildable	true
    unstackable	true
    size	LARGE
    mass	4
}

ITEM SHELF
{
    name	"shelf"
    symbol	']'
    attr	BROWN
    depth	1
    itemclass	FURNITURE
    needsmaterial	true
    gildable	true
    unstackable	true
    size	LARGE
    mass	2
}

ITEM BED
{
    name	"bed"
    symbol	'~'
    attr	BROWN
    depth	1
    itemclass	FURNITURE
    needsmaterial	true
    gildable	true
    unstackable	true
    size	GIANT
    mass	2
}

ITEM STATUE
{
    name	"statue"
    symbol	'@'
    attr	BROWN
    depth	1
    itemclass	FURNITURE
    needsmaterial	true
    gildable	true
    unstackable	true
    size	LARGE
    mass	3
}

ITEM MACGUFFIN
{
    name	"heart of Baezl'bub"
    symbol	'*'
    attr	RED
    rarity	0
    itemclass	FOOD
    quest	true
}

ITEM MIDAS_WAND
{
    name	"Midas Wand"
    symbol	'/'
    attr	GOLD
    rarity	0
    itemclass	TOOL
    size        SMALL
    quest	true
}

ITEM KNOWLEDGE_ORB
{
    name	"Orb of Knowledge"
    symbol	'('
    attr	CYAN
    rarity	0
    itemclass	TOOL
    size        SMALL
    quest	true
}

ITEM STEEL_CLOAK
{
    name	"Cloak of Steel"
    symbol	'['
    attr	GREEN
    rarity	0
    itemclass	ARMOUR
    armourslot	BODY
    size        SMALL
    quest	true
}

ITEM CORPSE
{
    name	"corpse"
    symbol	'%'
    stackpriority	-1
    attr	DKRED
    rarity	0
    itemclass	FOOD
}

ITEM COIN
{
    symbol	'$'
    attr	GOLD
    rarity	1
    startstack	3d4
    depth	1
    name	"gold coin"
    itemclass	TREASURE
}

COMMENT
{
    Gems:
    emerald
    sapphire
    diamond
    amethyst
    topaz
    jade
    beryl
}

ITEM EMERALD
{
    symbol	'*'
    attr	GREEN
    rarity	30
    depth	1
    name	"emerald"
    itemclass	TREASURE
}

ITEM SAPPHIRE
{
    symbol	'*'
    attr	LTBLUE
    rarity	30
    depth	1
    name	"sapphire"
    itemclass	TREASURE
}

ITEM DIAMOND
{
    symbol	'*'
    attr	WHITE
    rarity	30
    depth	1
    name	"diamond"
    itemclass	TREASURE
}


ITEM AMETHYST
{
    symbol	'*'
    attr	PURPLE
    rarity	30
    depth	1
    name	"amethyst"
    itemclass	TREASURE
}

ITEM TOPAZ
{
    symbol	'*'
    attr	ORANGE
    rarity	30
    depth	1
    name	"topaz"
    itemclass	TREASURE
}

ITEM JADE
{
    symbol	'*'
    attr	DKGREEN
    rarity	30
    depth	1
    name	"jade"
    itemclass	TREASURE
}

ITEM BERYL
{
    symbol	'*'
    attr	YELLOW
    rarity	30
    depth	1
    name	"beryl"
    itemclass	TREASURE
}

ITEM QUICKBOOST
{
    symbol	'!'
    attr	GREEN

    isflag	true
    size	NONE

    name	"running"
    timer	-1
    rarity	0
}

ITEM SWIMMING
{
    symbol	'!'
    attr	CYAN

    isflag	true
    size	NONE

    name	"swimming"
    timer	-1
    rarity	0
    gaintxt	"%S <start> swimming."
    losetxt	"%S <leave> the water."
}

ITEM WET
{
    symbol	'!'
    attr	BLUE

    isflag	true
    size	NONE

    name	"wet"
    timer	50
    rarity	0
    gaintxt	"%S <be> soaked!"
    losetxt	"%S <dry> out!"
}

ITEM HASTED
{
    symbol	'!'
    attr	GREEN

    isflag	true
    size	NONE

    name	"hasted"
    timer	10
    rarity	0
    gaintxt	"%S <be> sped up!"
    losetxt	"%S <slow> down!"
}

ITEM BLIND
{
    name	"blinded"
    timer	10
    rarity	0
    isflag	true
    size	NONE
    exclusive	true
    gaintxt	"%S <be> blinded!"
    losetxt	"%S can see!"
}

ITEM POLYMORPH
{
    name	"polymorphed"
    timer	150
    rarity	0
    isflag	true
    size	NONE
    exclusive	true
    gaintxt	"The light forms the shape of %S0!"
    losetxt	"%S <revert> to %r original shape!"
}

ITEM CHOKING
{
    name	"choking"
    timer	10
    rarity	0
    isflag	true
    size	NONE
    exclusive	true
    gaintxt	"%S <be> choking!"
    losetxt	"%S can breathe!"
}

ITEM ENRAGED
{
    name	"enraged"
    rarity	0
    isflag	true
    size	NONE
    exclusive	true
    gaintxt	"%S <be> enraged!"
    losetxt	"%S <calm> down."
}

ITEM POISON
{
    name	"poisoned"
    timer	10
    rarity	0
    size	NONE
    isflag	true
    gaintxt	"%S <be> poisoned!"
    losetxt	"%S <be> cured."
}

ITEM REGEN
{
    name	"regenerate"
    timer	10
    rarity	0
    isflag	true
    size	NONE
    gaintxt	"%S <heal> at a rapid rate!"
    losetxt	"%S <stop> healing quickly."
}

ITEM RESIST
{
    name	"resistant to"
    timer	10
    rarity	0
    isflag	true
    size	NONE
    gaintxt	"%S <resist> %E!"
    losetxt	"%S no longer <resist> %E."
}

ITEM VULNERABLE
{
    name	"vulnerable to"
    timer	10
    rarity	0
    isflag	true
    size	NONE
    gaintxt	"%S <be> vulnerable to %E!"
    losetxt	"%S <be> no longer vulnerable to %E."
}

ITEM PLAGUE
{
    name	"sick"
    rarity	0
    isflag	true
    size	NONE
    exclusive	true
    gaintxt	"%S <fall> sick."
    losetxt	"%S <get> well."
}

ITEM SLOW
{
    name	"slow"
    timer	4
    rarity	0
    isflag	true
    size	NONE
    exclusive	true
    gaintxt	"%r muscles slow."
    losetxt	"%S <regain> normal movement."
}

ITEM INVULNERABLE
{
    name	"invulnerable"
    timer	50
    isflag	true
    size	NONE
    rarity	0
    gaintxt	"%S <become> invulnerable."
    losetxt	"%S <feel> vulnerable."
}

ITEM ASLEEP
{
    name	"asleep"
    isflag	true
    size	NONE
    rarity	0
    timer	100
    gaintxt	"%S <fall> asleep."
    losetxt	"%S <wake> up."
}

DEFINE SCROLL
{
    CST		name		"blank"
}

SCROLL NONE
{
    name		"empty"
}

SCROLL FIRE
{
    name		"fire scroll"
}

EFFECT SCROLL_FIRE
{
    type	DAMAGE
    element	FIRE
    amount	2d6
}

SCROLL IDENTIFY
{
    name		"identify scroll"
}

SCROLL TELEPORT
{
    name		"teleport scroll"
}

SCROLL ENCHANT_WEAPON
{
    name		"enchant weapon scroll"
}

SCROLL ENCHANT_ARMOUR
{
    name		"enchant armour scroll"
}

SCROLL MAP
{
    name		"magic mapping scroll"
}

SCROLL SUMMON
{
    name		"summoning scroll"
}

SCROLL LIGHT
{
    name		"light scroll"
}

DEFINE WAND
{
    CST		name		"wand of dreaming"
    u8		breakchance	20
    int		range		1
}

WAND NONE
{
    name		"plain wand"
}

WAND NOTHING
{
    name		"wand of nothing"
    breakchance		0
}

WAND RESTORATION
{
    name		"wand of restoration"
}

WAND TELEPORT
{
    name		"wand of teleport"
}

EFFECT WAND_FIRE
{
    type	DAMAGE
    element	FIRE
    amount	2d6
}

WAND FIRE
{
    name		"wand of fire"
    range		4
}

WAND OPEN
{
    name		"wand of opening"
}

WAND DIG
{
    name		"wand of digging"
    range		4
}

WAND POLY
{
    name		"wand of polymorph"
}

DEFINE SPELL
{
    CST		name		"unnamed"
    CST		verb		"zap"
    CST		fireball	"burst of magic appears"
    CST		runes		"~~~"
    CST		descr		"Does nothing."
    U8		symbol		'*'
    ENM		attr		ATTR		FIRE

    int		difficulty	1

    int		mana		0
    bool	reqfullmana	false
    int		timeout		0

    BOOL	needsdir	true
    BOOL	piercing	false
    BOOL	friendlyfire	false
    int		radius		1
    int		range		10
    BOOL	blast		false
    BOOL	cone		false
    ENM		effect		EFFECT		NONE
    ENM		item		ITEM		NONE
}

SPELL NONE
{
}

SPELL MAGICMISSILE
{
    name	"Magic Missile"
    verb	"strike"
    descr	"Sends a magical missile at a foe."
    attr	PURPLE
    symbol	'/'
    difficulty	1

    mana	5

    needsdir	true
    piercing	false
    radius	1
    range	10
    effect	
    {
	element PHYSICAL
	type	DAMAGE
	amount	2d4
    }
}

SPELL TELEPORT
{
    name	"Teleport"
    verb	"warp"
    descr	"A spatial warp that scatters targets to the winds."
    attr	YELLOW
    symbol	'^'
    difficulty	2

    mana	10

    needsdir	true
    piercing	false
    radius	0
    range	1
}

SPELL TSUNAMI
{
    name	"Tidal Wave"
    verb	"drown"
    descr	"A powerful wave of water that flows forth."
    fireball	"wave of water flows"
    attr	LTBLUE
    symbol	'~'
    difficulty	2

    mana	15

    needsdir	true
    piercing	true
    radius	3
    range	1
    cone	true

    effect
    {
	element	PHYSICAL
	type	DAMAGE
	amount	1d4
	next {
	    type	GAINITEM
	    itemflag	CHOKING
	    duration	1d4
	}
    }
}

SPELL FORCEBOLT
{
    name	"Force Bolt"
    verb	"strike"
    descr	"A strong bolt of force that knocks people back."
    attr	PURPLE
    symbol	'/'
    difficulty	1

    mana	5

    needsdir	true
    piercing	false
    radius	1
    range	1
    effect	
    {
	element PHYSICAL
	type	DAMAGE
	amount	2d4
    }
}

SPELL ICEWALL
{
    name	"Ice Wall"
    verb	"creates"
    descr	"Creates a wall of ice."
    attr	ICE
    symbol	'#'
    difficulty	2

    mana	15

    needsdir	true
    piercing	false
    radius	1
    range	1

    effect
    {
        element ICE
        type    DAMAGE
        amount  1d8
    }
}

SPELL DISINTEGRATE
{
    name	"Disintegrate"
    verb	"disintegrate"
    descr	"Sovereign acid from the plane of acid dissolves everything."
    attr	ORANGE
    symbol	'%'
    difficulty	3

    mana	20

    needsdir	true
    piercing	false
    radius	1
    range	1
    effect	
    {
	element ACID
	type	SCALED_DAMAGE
	amount	50
    }
}

EFFECT COLOURSPRAY_RED
{
    type        DAMAGE
    element     FIRE
    amount      1d6
    next { type VULNERABLE element FIRE duration 10 }
}

EFFECT COLOURSPRAY_ORANGE
{
    type        DAMAGE
    element     ACID
    amount      1d6
    next { type VULNERABLE element ACID duration 10 }
}

EFFECT COLOURSPRAY_YELLOW
{
    type        DAMAGE
    element     ELECTRICITY
    amount      1d6
    next { type VULNERABLE element ELECTRICITY duration 10 }
}

EFFECT COLOURSPRAY_GREEN
{
    type        DAMAGE
    element     POISON
    amount      1d6
    next { type VULNERABLE element POISON duration 10 }
}

EFFECT COLOURSPRAY_BLUE
{
    type        DAMAGE
    element     ICE
    amount      1d6
    next { type VULNERABLE element ICE duration 10 }
}

EFFECT COLOURSPRAY_VIOLET
{
    type        DAMAGE
    element     PHYSICAL
    amount      1d6
    next { type VULNERABLE element PHYSICAL duration 10 }
}

SPELL COLOURSPRAY
{
    name	"Colour Spray"
    verb	"dazzle"
    descr	"A coruscating spray of elemental colour."
    fireball	"sphere of dazzling colours burst forth"
    attr	PURPLE
    symbol	'%'
    difficulty	1

    mana	10

    needsdir	true
    blast       true
    radius	2
}

SPELL CURE
{
    name	"Cure"
    verb	"cure"
    descr	"Cures poison."
    attr	GREEN

    mana	5

    friendlyfire	true
    needsdir	false
    range	1
    radius	1
    effect	
    {
        type    CURE
        element PHYSICAL
        next
    {
        type            RESIST
        element         POISON
        duration        5
    } }

    difficulty	2
}

SPELL SLEEP
{
    name	"Sleep"
    verb	"dazzle"
    descr	"Soporific rays lull creatures to sleep."
    fireball	"ring of soporific rays originate"
    attr	BLUE
    symbol	'Z'
    difficulty	2

    mana	10

    needsdir	false
    range	1
    radius	3
}

SPELL LIGHTNINGBOLT
{
    name	"Lightning"
    verb	"zap"
    descr	"Sends a bolt of lightning through one's foes."
    attr	YELLOW

    difficulty	3

    mana	15

    needsdir	true
    piercing	true

    radius	1
    range	15
    effect	SPELL_LIGHTNINGBOLT
}

EFFECT SPELL_LIGHTNINGBOLT
{
    type	DAMAGE
    element	ELECTRICITY
    amount	4d6
}

SPELL SHOCK
{
    name	"Shock"
    verb	"zap"
    fireball	"ring of sparks strikes"
    descr	"A burst of high voltage energy zaps those too close."
    attr	YELLOW

    difficulty	1
    mana	5

    needsdir	false
    piercing	false
    range	1
    radius	2
    effect	SPELL_SHOCK
}

EFFECT SPELL_SHOCK
{
    type	DAMAGE
    element	ELECTRICITY
    amount	1d6
    next
    {
	type	GAINITEM
	duration	5
	itemflag	SLOW
    }
}

SPELL POISONCLOUD
{
    name	"Poison Cloud"
    verb	"poison"
    fireball	"poisonous cloud appears"
    descr	"Creates a cloud of noxious poison."
    attr	GREEN

    difficulty	2

    mana	10

    needsdir	true
    piercing	false
    friendlyfire	true
    radius	2
    range	5
    effect	
    {
	type	DAMAGE
	element POISON
	amount	2d6
	next
    {
	type 		POISON
	duration	10
    } }
}

SPELL FIREBALL
{
    name	"Fireball"
    verb	"burn"
    fireball	"ball of fire explodes"
    descr	"Sends a fireball to explode on your foes."
    attr	RED

    difficulty	3

    mana	15

    needsdir	true
    piercing	false
    friendlyfire true
    radius	2
    range	10
    effect	SPELL_FIREBALL
}

EFFECT SPELL_FIREBALL
{
    type	DAMAGE
    element	FIRE
    amount	4d6
}

DEFINE RING
{
    CST		name		"none"

    ENM		resist		ELEMENT		NONE
    INT		resist_amt	0

    INT		deflect		0
}

RING NONE
{
    name	"plain ring"
}

RING ACID
{
    name	"ring of acid resist"

    resist	ACID
    resist_amt	3
}

RING ICE
{
    name	"ring of ice resist"

    resist	ICE
    resist_amt	3
}

RING FIRE
{
    name	"ring of fire resist"

    resist	FIRE
    resist_amt	3
}

RING HEALTH
{
    name	"ring of poison resist"

    resist	POISON
    resist_amt	3
}

RING ELECTRIC
{
    name	"ring of shock resist"

    resist	ELECTRICITY
    resist_amt	3
}

RING HUNGER
{
    name	"ring of hunger"
}

RING REGENERATION
{
    name	"ring of regeneration"
}

ITEM RING_RAW
{
    name	"gold ring"
    symbol	'='
    attr	GOLD
    depth	0
    itemclass	TOOL
}

ITEM RING_EMERALD
{
    name	"emerald ring"
    symbol	'='
    attr	GREEN
    itemclass	RING
    depth	1
    gemsetting	EMERALD
}

ITEM RING_SAPPHIRE
{
    name	"sapphire ring"
    symbol	'='
    attr	LTBLUE
    itemclass	RING
    depth	1
    gemsetting	SAPPHIRE
}

ITEM RING_DIAMOND
{
    name	"diamond ring"
    symbol	'='
    attr	WHITE
    itemclass	RING
    depth	1
    gemsetting	DIAMOND
}

ITEM RING_AMETHYST
{
    name	"amethyst ring"
    symbol	'='
    attr	PURPLE
    itemclass	RING
    depth	1
    gemsetting	AMETHYST
}

ITEM RING_TOPAZ
{
    name	"topaz ring"
    symbol	'='
    attr	ORANGE
    itemclass	RING
    depth	1
    gemsetting	TOPAZ
}

ITEM RING_JADE
{
    name	"jade ring"
    symbol	'='
    attr	DKGREEN
    itemclass	RING
    depth	1
    gemsetting	JADE
}

ITEM RING_BERYL
{
    name	"beryl ring"
    symbol	'='
    attr	YELLOW
    itemclass	RING
    depth	1
    gemsetting	BERYL
}

ITEM SCROLL_BLANK
{
    name	"blank scroll"
    symbol	'?'
    attr	WHITE
    depth	1
}

COMMENT
{
    Scrolls:
    xyzzy
    foobar
    helloworld
    abracadabra
    plugh
    xylotomous
    readme
    drowssap
}

ITEM SCROLL_XYZZY
{
    name	"scroll labelled [XYZZY]"
    symbol	'?'
    attr	WHITE
    itemclass	SCROLL
    depth 	1
}

ITEM SCROLL_FOOBAR
{
    name	"scroll labelled FOOBAR"
    symbol	'?'
    attr	WHITE
    itemclass	SCROLL
    depth 	1
}

ITEM SCROLL_HELLOWORLD
{
    name	"scroll labelled HELLO WORLD"
    symbol	'?'
    attr	WHITE
    itemclass	SCROLL
    depth 	1
}

ITEM SCROLL_ABRACADABRA
{
    name	"scroll labelled ABRACADABRA"
    symbol	'?'
    attr	WHITE
    itemclass	SCROLL
    depth 	1
}

ITEM SCROLL_PLUGH
{
    name	"scroll labelled PLUGH"
    symbol	'?'
    attr	WHITE
    itemclass	SCROLL
    depth 	1
}

ITEM SCROLL_XYLOTOMOUS
{
    name	"scroll labelled XYLOTOMOUS"
    symbol	'?'
    attr	WHITE
    itemclass	SCROLL
    depth 	1
}

ITEM SCROLL_README
{
    name	"scroll labelled READ ME"
    symbol	'?'
    attr	WHITE
    itemclass	SCROLL
    depth 	1
}

ITEM SCROLL_DROWSSAP
{
    name	"scroll labelled DROWSSAP"
    symbol	'?'
    attr	WHITE
    itemclass	SCROLL
    depth 	1
}

ITEM WAND_EMERALD
{
    name	"emerald wand"
    symbol	'/'
    attr	GREEN
    itemclass	WAND
    depth 	1
    gemsetting	EMERALD
}

ITEM WAND_SAPPHIRE
{
    name	"sapphire wand"
    symbol	'/'
    attr	LTBLUE
    itemclass	WAND
    depth 	1
    gemsetting	SAPPHIRE
}

ITEM WAND_DIAMOND
{
    name	"diamond wand"
    symbol	'/'
    attr	WHITE
    itemclass	WAND
    depth 	1
    gemsetting	DIAMOND
}

ITEM WAND_AMETHYST
{
    name	"amethyst wand"
    symbol	'/'
    attr	PURPLE
    itemclass	WAND
    depth 	1
    gemsetting	AMETHYST
}

ITEM WAND_TOPAZ
{
    name	"topaz wand"
    symbol	'/'
    attr	ORANGE
    itemclass	WAND
    depth 	1
    gemsetting	TOPAZ
}

ITEM WAND_JADE
{
    name	"jade wand"
    symbol	'/'
    attr	DKGREEN
    itemclass	WAND
    depth 	1
    gemsetting	JADE
}

ITEM WAND_BERYL
{
    name	"beryl wand"
    symbol	'/'
    attr	YELLOW
    itemclass	WAND
    depth 	1
    gemsetting	BERYL
}

ITEM SPELLBOOK_BLANK
{
    name	"blank book"
    symbol	'+'
    attr	WHITE
    depth	1
}

ITEM SPELLBOOK_RED
{
    name	"red book"
    symbol	'+'
    attr	RED
    itemclass	SPELLBOOK
    depth	1
}

ITEM SPELLBOOK_GREEN
{
    name	"green tome"
    symbol	'+'
    attr	GREEN
    itemclass	SPELLBOOK
    depth	1
}

ITEM SPELLBOOK_ORANGE
{
    name	"orange tome"
    symbol	'+'
    attr	ORANGE
    itemclass	SPELLBOOK
    depth	1
}

ITEM SPELLBOOK_YELLOW
{
    name	"yellow grimoire"
    symbol	'+'
    attr	YELLOW
    itemclass	SPELLBOOK
    depth	1
}

ITEM SPELLBOOK_WHITE
{
    name	"white book"
    symbol	'+'
    attr	WHITE
    itemclass	SPELLBOOK
    depth	1
}

ITEM SPELLBOOK_GLOWING
{
    name	"glowing grimoire"
    symbol	'+'
    attr	FIRE
    itemclass	SPELLBOOK
    depth	1
}

ITEM SPELLBOOK_CYAN
{
    name	"metalbound book"
    symbol	'+'
    attr	CYAN
    itemclass	SPELLBOOK
    depth	1
}

ITEM SPELLBOOK_GREY
{
    name	"monochrome monograph"
    symbol	'+'
    attr	GREY
    itemclass	SPELLBOOK
    depth	1
}

ITEM SPELLBOOK_PURPLE
{
    name        "book of pugnacious polemics"
    symbol	'+'
    attr	PURPLE
    itemclass	SPELLBOOK
    depth	1
}

ITEM SPELLBOOK_BLUE
{
    name        "blue book"
    symbol	'+'
    attr	BLUE
    itemclass	SPELLBOOK
    depth	1
}

ITEM SPELLBOOK_LEATHER
{
    name        "leather bound book"
    symbol	'+'
    attr	LIGHTBROWN
    itemclass	SPELLBOOK
    depth	1
}

ITEM SPELLBOOK_BLOODY
{
    name        "blood-stained book"
    symbol	'+'
    attr	DKRED
    itemclass	SPELLBOOK
    depth	1
}

ITEM SPELLBOOK_GILT
{
    name        "gilded book"
    symbol	'+'
    attr	LTYELLOW
    itemclass	SPELLBOOK
    depth	1
}

COMMENT
{
    Existing:
    name	"red book"
    name	"green tome"
    name	"orange tome"
    name	"yellow grimoire"
    name	"white book"
    name	"glowing grimoire"
    name	"metalbound book"
    name	"monochrome monograph"
    name        "book of pugnacious polemics"
    name        "blue book"
    name        "leather bound book"
    name        "blood-stained book"
    name        "gilded book"

    Potential?
}

ITEM BOTTLE
{
    name	"empty bottle"
    symbol	'!'
    attr	WHITE
    depth	0
}

ITEM POTION_RED
{
    name	"red potion"
    symbol	'!'
    attr	RED
    itemclass	POTION
    depth	1
    throwable	true
}

ITEM POTION_YELLOW
{
    name	"yellow potion"
    symbol	'!'
    attr	YELLOW
    itemclass	POTION
    depth	1
    throwable	true
}

ITEM POTION_ORANGE
{
    name	"orange potion"
    symbol	'!'
    attr	ORANGE
    itemclass	POTION
    depth	1
    throwable	true
}

ITEM POTION_GREEN
{
    name	"green potion"
    symbol	'!'
    attr	GREEN
    itemclass	POTION
    depth	1
    throwable	true
}

ITEM POTION_BLUE
{
    name	"blue potion"
    symbol	'!'
    attr	BLUE
    itemclass	POTION
    depth	1
    throwable	true
}

ITEM POTION_PURPLE
{
    name	"purple potion"
    symbol	'!'
    attr	PURPLE
    itemclass	POTION
    depth	1
    throwable	true
}

ITEM POTION_WHITE
{
    name	"white potion"
    symbol	'!'
    attr	WHITE
    itemclass	POTION
    depth	1
    throwable	true
}

ITEM POTION_GLOWING
{
    name	"glowing potion"
    symbol	'!'
    attr	BLUEPORTAL
    itemclass	POTION
    depth	1
    throwable	true
}

ITEM POTION_CYAN
{
    name	"cyan potion"
    symbol	'!'
    attr	CYAN
    itemclass	POTION
    depth	1
    throwable	true
}

ITEM POTION_PINK
{
    name	"pink potion"
    symbol	'!'
    attr	PINK
    itemclass	POTION
    depth	1
    throwable	true
}

DEFINE POTION
{
    CST		name		"none"
    ENM		effect		EFFECT		NONE
}

POTION NONE
{
    name		"water"
}

POTION WATER
{
    name		"bottle of water"
}

POTION SPEED
{
    name		"potion of speed"
    effect
    {
	type	GAINITEM
	duration	10
	itemflag	HASTED
	amount	10
    }
}

POTION HEAL
{
    name		"healing potion"
    effect
    {
	type	HEAL
	amount	20
    }
}

POTION GREATERHEAL
{
    name		"greater healing potion"
    effect
    {
	type	HEAL
	amount	40
    }
}

POTION ACIDVULN
{
    name		"vial of acid vulnerability"
    effect
    {
	type	VULNERABLE
	element	ACID
	duration	15
    }
}

POTION ACIDRESIST
{
    name		"oil of acid resistance"
    effect
    {
	type	RESIST
	element	ACID
	duration	15
    }
}

POTION ACID
{
    name		"bottle of acid"
    effect
    {
	type	DAMAGE
	element	ACID
	amount	3d6
    }
}

POTION POISON
{
    name		"poison potion"
    effect
    {
	type	POISON
	duration	10
    }
}

POTION CURE
{
    name		"cure potion"
    effect
    {
	type	CURE
    }
}

POTION SLEEP
{
    name		"sleeping potion"
}

DEFINE RECIPE_INPUT
{
    ENM		item	ITEM	NONE
    INT		count	1
    BOOL	consume	true
    BOOL	nearby	false
    ENM		next	RECIPE_INPUT	NONE
}

RECIPE_INPUT NONE

DEFINE RECIPE
{
    CST		name		"basket"
    CST		action		"%S <weave> a basket."
    ENM		newitem		ITEM	NONE
    ENM		newtile		TILE	NONE
    DICE	newstacksize	1		
    BOOL	needsdir	false
    ENM		material	RECIPE_INPUT	NONE
}

COMMENT
{
    Recipe order is important to keep things ergonomic.
    We want 'f' for campfire, for example.

tools:
    stone hammer
    flint dagger
    flint axe
    pick axe
    torch
    fire
    lock pick
    writing set
spammable:
    dressed stone
    charcoal
    iron ignot
    steel ingot
    gold ingot
    bottle
    paper
    scroll
    spellbook
    arrow
    spear
misc:
    wand
    ring mold
    ring
armour:
    snowshoes
    robes
    leather
    studd
    ring chain
    scale plate
    full
weapons:
    dagger
    shrotswor
    longsword
    greataxe
    club
    mace
    warhammer
    bow
    sling
costructs (has dir?)
    forge
    light a forge
    kiln
    light a kiln
    wall
    bridge
    boat
}

RECIPE NONE

RECIPE STONE_HAMMER
{
    name	"stone hammer"
    action	"%S <tie> a stone to a stick."
    newitem	STONE_HAMMER
    material
    {
		item	STICK
	next {	item	ROCK
	}
    }
}

RECIPE FLINT_DAGGER
{
    name	"flint dagger"
    action	"%S <knap> a flint dagger."
    newitem	FLINT_DAGGER
    material
    {
	item	FLINT
    }
}

RECIPE FLINT_AXE
{
    name	"flint axe"
    action	"%S <knap> and <bind> a flint axe."
    newitem	FLINT_AXE
    material
    {
	item	FLINT
	next { item STICK }
    }
}

RECIPE PICKAXE
{
    name	"pick axe"
    action	"%S <forge> a pick axe."

    newitem	PICKAXE

    material
    {
	    item IRON_INGOT 
    next {  item STICK 
    next {  item LIT_FORGE nearby true consume false
    } }
    }
}

RECIPE TORCH
{
    name	"torch"
    action	"%S <assemble> a torch."
    newitem	TORCH
    material
    {
	item	STICK
	next
    {
	item	PITCH
    } }
}

RECIPE CAMPFIRE
{
    name	"campfire"
    action	"%S <light> a campfire."
    newitem	CAMPFIRE
    needsdir	true
    material
    {
	item	STICK
	count	2
    }
}

RECIPE LOCKPICK
{
    name	"lockpick"
    action	"%S <devise> a lockpick."

    newitem	LOCKPICK

    material
    {
	    item STEEL_INGOT 
    next {  item LIT_FORGE nearby true consume false
    }
    }
}

RECIPE WRITINGSET
{
    name	"writing set"
    action	"%S <assemble> a writing set."
    newitem	WRITINGSET
    material
    {
	item	CHARCOAL
	count	1
	next
    {
	item	FEATHER
	count	1
    } }
}

RECIPE DRESSEDSTONE
{
    name	"dressed stone"
    action	"%S <dress> the stone to a useful shape."
    newitem	DRESSEDSTONE
    material
    {
	    item LARGEROCK 
    next {  item STONE_HAMMER consume false
    }
    }
}

RECIPE CHARCOAL
{
    name	"charcoal"
    action	"%S carefully <char> a stick."
    newitem	CHARCOAL

    material
    {
	    item STICK 
    next {  item CAMPFIRE nearby true consume false }
    }
}

RECIPE IRON_INGOT
{
    name	"iron ingot"
    action	"%S <smelt> an iron ingot."
    newitem	IRON_INGOT

    material
    {
	    item IRONORE 
    next {  item LIT_FORGE nearby true consume false }
    }
}

RECIPE STEEL_INGOT
{
    name	"steel ingot"
    action	"%S <refine> a steel ingot."
    newitem	STEEL_INGOT

    material
    {
	    item IRON_INGOT 
    next {  item COAL 
    next {  item LIT_FORGE nearby true consume false
    } }
    }
}

RECIPE GOLD_INGOT
{
    name	"gold ingot"
    action	"%S <melt> gold coins into a single ingot."
    newitem	GOLD_INGOT

    material
    {
	    item COIN count 10
    next {  item LIT_FORGE nearby true consume false 
    }
    }
}

RECIPE BOTTLE
{
    name	"bottle"
    action	"%S <fire> clay into a bottle."
    newitem	BOTTLE

    material
    {
	    item CLAY
    next {  item LIT_KILN nearby true consume false 
    }
    }
}

RECIPE PAPER
{
    name	"paper"
    action	"%S <pound> reeds into a rough sheet of paper."
    newitem	PAPER
    material
    {
	    item REEDS 
    }
}

RECIPE SCROLL
{
    name	"blank scroll"
    action	"%S <roll> a blank scroll."
    newitem	SCROLL_BLANK
    material
    {
	item	PAPER
    }
}

RECIPE SPELLBOOK
{
    name	"blank spellbook"
    action	"%S <bind> a blank spellbook."
    newitem	SPELLBOOK_BLANK
    material
    {
	item	PAPER
	count	5
	next
    {
	item	HIDE
	count	1
    } }
}


RECIPE ARROW
{
    name	"arrows"
    action	"%S <fletch> arrows."
    newitem	ARROW
    newstacksize	1d3
    material
    {
	item	STICK
	next
    {
	item	FEATHER
    } }
}

RECIPE SPEAR
{
    name	"spear"
    action	"%S <sharpen> and <heat-treat> a spear."
    newitem	SPEAR

    material
    {
	    item STICK 
    next {  item CAMPFIRE nearby true consume false }
    }
}

RECIPE WAND
{
    name	"wand"
    action	"%S <trim> a stick into a wand."
    newitem	WAND_RAW

    material
    {
	item	STICK 
    }
}

RECIPE RINGMOLD
{
    name	"ring mold"
    action	"%S <fire> a mold for a ring."
    newitem	RINGMOLD

    material
    {
	    item CLAY
    next {  item LIT_KILN nearby true consume false 
    }
    }
}

RECIPE RING
{
    name	"ring"
    action	"%S <cast> gold into a simple ring."
    newitem	RING_RAW

    material
    {
	    item RINGMOLD
    next {  item GOLD_INGOT
    next {  item LIT_FORGE nearby true consume false 
    } }
    }
}

RECIPE SNOWSHOES
{
    name	"snow shoes"
    action	"%S <weave> together a pair of snow shoes."
    newitem	SNOWSHOES

    material
    {
	item	STICK count 2
	next { item	REEDS
	}
    }
}

RECIPE LEATHER
{
    name	"leather armour"
    action	"%S <stitch> leather armour."
    newitem	LEATHER

    material
    {
	    item HIDE count 4 
    }
}

RECIPE STUDDEDLEATHER
{
    name	"studded leather armour"
    action	"%S <stitch> studded leather armour."
    newitem	STUDDEDLEATHER

    material
    {
	    item LEATHER
    next {  item IRON_INGOT }
    }
}

RECIPE RINGMAIL
{
    name	"ringmail"
    action	"%S <hammer> together ringmail."
    newitem	RINGMAIL

    material
    {
	    item HIDE count 5 
    next {  item IRON_INGOT count 2
    next {  item LIT_FORGE nearby true consume false
    } }
    }
}

RECIPE CHAINMAIL
{
    name	"chainmail"
    action	"%S <link> together chainmail."
    newitem	CHAINMAIL

    material
    {
	    item IRON_INGOT count 4
    next {  item LIT_FORGE nearby true consume false
    }
    }
}

RECIPE SCALEMAIL
{
    name	"scalemail"
    action	"%S <smith> scalemail."
    newitem	SCALEMAIL

    material
    {
	    item LEATHER
    next {  item IRON_INGOT count 6
    next {  item LIT_FORGE nearby true consume false
    } }
    }
}

RECIPE PLATEMAIL
{
    name	"plate mail"
    action	"%S <craft> plate mail."
    newitem	PLATEMAIL

    material
    {
	    item STEEL_INGOT count 8
    next {  item LIT_FORGE nearby true consume false
    }
    }
}

RECIPE FULLPLATE
{
    name	"fullplate"
    action	"%S <build> fullplate."
    newitem	FULLPLATE

    material
    {
	    item STEEL_INGOT count 10
    next {  item PLATEMAIL count 1
    next {  item LIT_FORGE nearby true consume false
    } }
    }
}

RECIPE CLUB
{
    name	"club"
    action	"%S <makeshift> a club."
    newitem	CLUB
    material
    {
	item	STICK
    }
}

RECIPE MACE
{
    name	"mace"
    action	"%S <forge> a mace."

    newitem	MACE

    material
    {
	    item IRON_INGOT count 2
    next {  item LIT_FORGE nearby true consume false
    }
    }
}

RECIPE WARHAMMER
{
    name	"warhammer"
    action	"%S <forge> a warhammer."

    newitem	WARHAMMER

    material
    {
	    item IRON_INGOT count 4
    next {  item LIT_FORGE nearby true consume false
    }
    }
}

RECIPE DAGGER
{
    name	"dagger"
    action	"%S <forge> a dagger."

    newitem	DAGGER

    material
    {
	    item IRON_INGOT count 2
    next {  item LIT_FORGE nearby true consume false
    }
    }
}

RECIPE SHORTSWORD
{
    name	"shortsword"
    action	"%S <forge> a shortsword."

    newitem	SHORTSWORD

    material
    {
	    item IRON_INGOT count 4
    next {  item LIT_FORGE nearby true consume false
    }
    }
}

RECIPE LONGSWORD
{
    name	"longsword"
    action	"%S <forge> a longsword."

    newitem	LONGSWORD

    material
    {
	    item STEEL_INGOT count 2
    next {  item LIT_FORGE nearby true consume false
    }
    }
}

RECIPE GREATAXE
{
    name	"great axe"
    action	"%S <forge> a great axe."

    newitem	GREATAXE

    material
    {
	    item STEEL_INGOT count 3
    next {  item STICK
    next {  item LIT_FORGE nearby true consume false
    } }
    }
}


RECIPE SLING
{
    name	"sling"
    action	"%S <make> a sling."
    newitem	SLING
    material
    {
	item	HIDE
    }
}

RECIPE BOW
{
    name	"bow"
    action	"%S <string> a bow."
    newitem	BOW
    material
    {
	item	STICK
    }
}

RECIPE FORGE
{
    name	"forge"
    action	"%S <build> a forge."
    newitem	FORGE
    needsdir	true

    material
    {
	    item DRESSEDSTONE count 4 
    }
}

RECIPE LIT_FORGE
{
    name	"light a forge"
    action	"%S <ignite> the forge from a log."
    newitem	LIT_FORGE
    needsdir	true

    material
    {
	    item LOG nearby true
    next {  item FORGE nearby true }
    }
}

RECIPE KILN
{
    name	"kiln"
    action	"%S <construct> a kiln."
    newitem	KILN
    needsdir	true

    material
    {
	    item DRESSEDSTONE count 4 
    }
}

RECIPE LIT_KILN
{
    name	"light a kiln"
    action	"Using a log, %S <set> fire to the kiln."
    newitem	LIT_KILN
    needsdir	true

    material
    {
	    item LOG nearby true
    next {  item KILN nearby true }
    }
}

RECIPE ROBES
{
    name	"robes"
    action	"%S <weave> coarse robes from reeds."
    newitem	ROBES
    material
    {
	    item REEDS count 5
    }
}

RECIPE WALL
{
    name	"wall"
    action	"%S <build> a wall."
    newitem	NONE
    newtile	WALL
    needsdir	true

    material
    {
	    item DRESSEDSTONE count 4 nearby true
    }
}
RECIPE BRIDGE
{
    name	"bridge"
    action	"%S <build> a bridge."
    newitem	NONE
    newtile	BRIDGE
    needsdir	true

    material
    {
	    item LOG count 1 nearby true
    }
}

RECIPE BOAT
{
    name	"boat"
    action	"%S <build> a boat."
    newitem	NONE
    newtile	BOAT
    needsdir	true

    material
    {
	    item LOG count 5 nearby true
    next {  item HIDE count 20
    next {  item STICK count 10
    next {  item REEDS count 10
    next {  item PITCH count 20
    next {  item LARGEROCK count 2 nearby true
    } } } } }
    }
}

DEFINE MATERIAL
{
    CST		name		"ether"
    CST		adjname		"ether"

    BOOL	gildable	false
    int		depth		0
    ENM		attr		ATTR		WHITE
    BOOL	burnable	false
    BOOL	corrodable	false
}

MATERIAL NONE
{
    name	"plogiston"
}

MATERIAL WOOD
{
    name	"wood"
    adjname	"wooden"
    depth	1
    attr	BROWN
    burnable	true
}

MATERIAL STONE
{
    name	"stone"
    adjname	"stone"
    depth	2
    attr	DKGREY
}

MATERIAL IRON
{
    name	"iron"
    adjname	"iron"
    depth	3
    gildable	true
    attr	GREY
    corrodable	true
}

MATERIAL SILVER
{
    name	"silver"
    adjname	"silver"
    depth	4
    gildable	true
    attr	WHITE
}

MATERIAL GOLD
{
    name	"gold"
    adjname	"gold"
    depth	6
    gildable	true
    attr	GOLD
}

DEFINE TRAP
{
    CST		name	"unknown trap"

    U8		sym 	'^'
    ENM		attr	ATTR		NORMAL

    ENM		attack	ATTACK		NONE
}

TRAP NONE

TRAP FLASH
{
    name	"flash trap"
    attr	YELLOW
    attack	
    {
	verb	"blind"
	effect	
	{
	    type	GAINITEM
	    duration	3d4+3
	    itemflag	BLIND
	    itemresist	BLIND
	}
    }
}

TRAP POISON
{
    name	"poison gas trap"
    attr	GREEN
    attack	
    {
	verb	"poison"
	element	POISON
	damage	1d4
	effect	
	{
	    type	POISON
	    duration	1d4
	}
    }
}

TRAP SLEEP
{
    name	"sleeping gas trap"
    attr	PURPLE
    attack	
    {
	effect	
	{
	    type	GAINITEM
	    duration	3d4
	    itemflag	ASLEEP
	}
    }
}

TRAP TRIPWIRE
{
    name	"tripwire trap"
    attr	WHITE
    attack	
    {
	effect	
	{
	    type	GAINITEM
	    duration	4d4
	    itemflag	SLOW
	}
    }
}

TRAP POISON_DART
{
    name	"poison dart trap"
    attr	LTGREEN
    attack	
    {
	verb	"stab"
	element	PHYSICAL
	damage	1d4
	effect	
	{
	    type	POISON
	    duration	1d2
	}
    }
}

TRAP DART
{
    name	"dart trap"
    attr	CYAN
    attack	
    {
	verb	"stab"
	element	PHYSICAL
	damage	2d4
    }
}

TRAP FIRE
{
    name	"fire trap"
    attr	FIRE
    attack	
    {
	verb	"burn"
	element	FIRE
	damage	1d8
    }
}

DEFINE KEY
{
    u8		val	' '
}

KEY MOVE_N
{
    val		'k'
}
KEY MOVE_NE
{
    val		'u'
}
KEY MOVE_NW
{
    val		'y'
}
KEY MOVE_S
{
    val		'j'
}
KEY MOVE_SE
{
    val		'n'
}
KEY MOVE_SW
{
    val		'b'
}
KEY MOVE_STAY
{
    val		'.'
}
KEY MOVE_E
{
    val		'l'
}
KEY MOVE_W
{
    val		'h'
}
KEY INVENTORY
{
    val		'i'
}
KEY INTRINSICS
{
    val		'I'
}
KEY OPTIONS
{
    val		'O'
}
KEY QUIT
{
    val		'Q'
}
KEY RELOAD
{
    val		'~'
}

KEY PICKUP
{
    val		'g'
}
KEY PICKUP2
{
    val		','
}
KEY PICKUPSPECIFIC
{
    val		'G'
}
KEY EXAMINE
{
    val		'x'
}
KEY LOOKAROUND
{
    val		'X'
}
KEY SEARCH
{
    val		'S'
}
KEY FIRE
{
    val		'f'
}
KEY READYRANGED
{
    val		'R'
}
KEY CLOSE
{
    val		'c'
}
KEY CLIMBUP
{
    val		'<'
}
KEY CLIMBDOWN
{
    val		'>'
}
KEY OPEN
{
    val		'o'
}
KEY THROW
{
    val		't'
}
KEY EAT
{
    val		'e'
}
KEY QUAFF
{
    val		'q'
}
KEY READWRITING
{
    val		'r'
}
KEY DROP
{
    val		'd'
}
KEY DROPALL
{
    val		'D'
}
KEY ENHANCE
{
    val		'E'
}
KEY FORGET
{
    val		'F'
}
KEY WIELD
{
    val		'w'
}
KEY WEAR
{
    val		'W'
}
KEY TAKEOFF
{
    val		'T'
}
KEY CAST
{
    val		'z'
}
KEY KICK
{
    val		'K'
}
KEY MEDITATE
{
    val		'M'
}
KEY APPLY
{
    val		'a'
}
KEY STATUS
{
    val		'Z'
}
COMMENT {
    Crazily, this still works, but 8gb to do one move!
KEY WORLDSHIFT
{
    val		'S'
}
KEY CHAMBERSCAN
{
    val		'C'
}
KEY HARVEST
{
    val		'H'
}
}
KEY AUTOMATE
{
    val		'A'
}
KEY CLEARSNOW
{
    val		's'
}
KEY BUILD
{
    val		'm'
}
