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

DEFINE WORLD
{
    CST		name	"Rogue"
    int		font	0
    ENM		avatar	MOB	NONE
    ENM		roomtype	ROOMTYPE	MAGE
    ENM         finalroom       ROOMTYPE        WIZARD_FINAL
    ENM		macguffin	ITEM		MACGUFFIN
}

WORLD WIZARD
{
    name	"Tower"
    font	2
    avatar	AVATAR_WIZARD
    roomtype	MAGE
    finalroom   WIZARD_FINAL
    macguffin	KNOWLEDGE_ORB
}

WORLD THIEF
{
    name	"Palace"
    font	1
    avatar	AVATAR_THIEF
    roomtype	PALACE
    finalroom   THIEF_FINAL
    macguffin	MIDAS_WAND
}

WORLD FIGHTER
{
    name	"Caves"
    font	0
    avatar	AVATAR_FIGHTER
    roomtype	CAVEROOMS
    finalroom   FIGHTER_FINAL
    macguffin	STEEL_CLOAK
}

DEFINE WORLDLIST
{
    ENM	world	WORLD	THIEF
    ENM next	WORLDLIST NONE
}

WORLDLIST NONE

WORLDLIST THIEF
{
    world	THIEF
}

WORLDLIST WIZARD
{
    world	WIZARD
}

WORLDLIST FIGHTER
{
    world	FIGHTER
}

WORLDLIST ALL
{
    world THIEF next { 
    world WIZARD next { 
    world FIGHTER 
    } }
}

WORLDLIST WF
{
    world WIZARD next { 
    world FIGHTER 
    }
}

WORLDLIST WT
{
    world THIEF next { 
    world WIZARD 
    }
}

WORLDLIST TF
{
    world THIEF next { 
    world FIGHTER 
    }
}

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"
    ENM		attr		ATTR		NORMAL
}

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

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

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

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

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

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

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

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

HEALTHLEVEL FULL
{
    normal	"at full health"
    construct	"pristine condition"
    attr	NORMAL
}

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

FOODLEVEL STARVING
{
    normal	"starving"
    attr	LTRED
}

FOODLEVEL HUNGRY
{
    normal	"hungry"
    attr	NORMAL
}

FOODLEVEL FULL
{
    normal	"full"
    attr	NORMAL
}

FOODLEVEL SATIATED
{
    normal	"satiated"
    attr	NORMAL
}

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

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	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 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 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
}

DEFINE LEVEL
{
    int		numcreated	0
    ENM		roomtype	ROOMTYPE	MAGE
}

LEVEL NONE

LEVEL ONE
{
    roomtype	MAGE
}

DEFINE GAMERULES
{
    int		bosslevel	10
}

GAMERULES OFFICIAL
{
    bosslevel	20
}

DEFINE YELL
{
}

YELL KEEPOUT
YELL MURDERER
YELL INVADER
YELL KILL
YELL KILLCHASE
YELL LOCATION
YELL HEARDLOCATION
YELL TAUNT
YELL VICTORY
YELL RANGED


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

HELP WTF
{
    name	"Wizard-Thief-Fighter"
}
HELP ROGUELIKES
{
    name	"Roguelikes"
}
HELP MOVEMENT
{
    name	"Movement"
}
HELP INVENTORY
{
    name	"Inventory"
}
HELP KEYBOARD
{
    name	"Key Bindings"
}

HELP WELCOME
{
    name	"Repeat Welcome Message"
}

HELP ABOUT
{
    name	"Making of Wizard-Thief-Fighter"
}

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

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		255
    bg_g		192
    bg_b		128
    fg_r		0
    fg_g		0
    fg_b		0
}

ATTR POWERBAR
{
    bg_r		16
    bg_g		96
    bg_b		16
    fg_r		192
    fg_g		192
    fg_b		192
}

ATTR BORDER
{
    bg_r		128
    bg_g		128
    bg_b		128
    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 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 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 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 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 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

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 TILE
{
    U8		symbol		'&'
    ENM		attr		ATTR		NORMAL
    CST		legend		"none"

    BOOL	ispassable	true
    BOOL	istransparent	true
    BOOL	isphaseable	true
    BOOL	isdiggable	false
    BOOL	describe	false
    BOOL	semitransparent	false
    BOOL	forbidrandomwander	false
    BOOL	roomcolor	false
    BOOL	roomsymbol	false
    bool	isdoorway	false
}

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	YELLOW
    legend	"bug covered stone altar"
    ispassable	true
    istransparent	true
    describe	true
}

TILE FLOOR
{
    symbol	'.'
    attr	BROWN
    legend	"wooden floor"
    ispassable		true
    istransparent	true
}

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

TILE CAVEFLOOR
{
    symbol	'.'
    attr	NORMAL
    legend	"rocky ground"
    ispassable		true
    istransparent	true
}

TILE MAZEFLOOR
{
    symbol	'.'
    attr	BROWN
    legend	"floor"
    ispassable		true
    istransparent	true
}

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

TILE CHAIR
{
    symbol	'h'
    attr	BROWN
    legend	"wooden chair"
    ispassable		true
    istransparent	true
    describe	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
}

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

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

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

TILE GRASS
{
    symbol	'.'
    attr	GREEN
    legend	"grass"
    ispassable		true
    istransparent	true
}

TILE DIRT
{
    symbol	'.'
    attr	BROWN
    legend	"dirt"
    ispassable		true
    istransparent	true
}

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

TILE FIELD
{
    symbol	'"'
    attr	BROWN
    legend	"field"
    ispassable		true
    istransparent	true
}

TILE FROZENFIELD
{
    symbol	'"'
    attr	LIGHTBLACK
    legend	"frost-killed field"
    ispassable		true
    istransparent	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
}

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

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 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	DKGREEN
    legend	"bushes"

    ispassable		true
    istransparent	true
}

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

    ispassable		true
    istransparent	false
    semitransparent	true
}

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

    ispassable		true
    istransparent	true
}

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 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 { 
    }
}

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 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		worlds		WORLDLIST	FIGHTER
    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
    int		max_mp		0
    DICE        hp_gain         1d4+4

    int		damagereduction		0
    int		dodgebonus	0

    int		depth		0
    int		rarity		100

    ENM		ai		AI		CHARGE

    int		corpsechance	30
    ENM		corpse_effect	EFFECT	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	swallows	false
    BOOL	breeder		false
    BOOL	isthief		false
    BOOL	canleap		false
    BOOL        cansleep        true
    int		sightrange	8
    BOOL	corrosiveblood	false
    BOOL	isconstruct	false
    BOOL	useitems	false
    BOOL	covetous	false

    INT		totalkillsever	0

    ENM		size		SIZE SMALL
}

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

    rarity	0
}

MOB AVATAR_WIZARD
{
    symbol	'@'
    attr	LIGHTBLUE
    isfriendly	true
    isavatarform true

    role	WIZARD

    ai		HOME
    size	MEDIUM

    damagereduction	0
    dodgebonus		0

    opendoors	true
    useitems	true
    covetous	true

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

	damage	1d2
    }

    startitems	{ itemlist WIZARD }

    max_hp	10
    hp_gain     1d2+2

    name	"you"
    corpsechance	100
    corpse_effect	PLAGUECORPSE
}

MOB AVATAR_THIEF
{
    symbol	'@'
    attr	LIGHTBROWN
    isfriendly	true
    isavatarform true

    role	THIEF

    ai		HOME
    size	MEDIUM

    damagereduction	0
    dodgebonus		0

    opendoors	true
    useitems	true
    covetous	true

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

	damage	1d2
    }

    startitems	{ itemlist THIEF }

    max_hp	20
    hp_gain     1d3+3

    name	"you"
    corpsechance	100
    corpse_effect	PLAGUECORPSE
}

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

    role	FIGHTER

    ai		HOME
    size	MEDIUM

    damagereduction	0
    dodgebonus		0

    opendoors	true
    useitems	true
    covetous	true

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

	damage	1d2
    }

    startitems	{ itemlist FIGHTER }

    max_hp	25
    hp_gain     1d4+4

    name	"you"
    corpsechance	100
    corpse_effect	PLAGUECORPSE
}

MOB RAT
{
    symbol	'r'
    depth	1
    worlds	ALL
    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
    worlds	WF
    max_hp	1d4
    attr	BROWN
    ai		FLANK
    size	TINY
    isfast	true
    dodgebonus	2
    melee_attack	
    {
	verb	"bite"
	noun	"teeth"
	damageclass	PIERCE
	damage	1d3
    }
    name	"bat"
}

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

MOB SLUG
{
    symbol	's'
    depth	1
    worlds	FIGHTER
    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
    worlds	FIGHTER
    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
    worlds	FIGHTER
    max_hp	3d8+16
    attr	PURPLE
    ai		CHARGE
    size	MEDIUM
    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 TRIDUDE
{
    symbol	'Y'
    depth	3
    worlds	WIZARD
    max_hp	1d8+4
    attr	GREEN
    ai		CHARGE
    size	MEDIUM
    corpsechance	50
    melee_attack	
    { 
	verb	"smash"
	noun	"arm"
	damageclass	BLUNT
	damage  1d4 
    }
    name	"tridude"
}

MOB IMP
{
    symbol	'&'
    depth	3
    worlds	WIZARD
    max_hp	1d8+4
    attr	BLUE
    ai		RANGECOWARD
    size	SMALL
    useitems	true
    opendoors	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
    worlds	WIZARD
    max_hp	3d8+8
    attr	ORANGE
    ai		CHARGE
    size	MEDIUM
    useitems	true
    opendoors	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
    worlds	THIEF
    max_hp	1d8
    attr	LIGHTBROWN
    ai		CHARGE
    size	SMALL
    melee_attack	
    { 
	verb	"bite"
	noun	"teeth"
	damageclass	PIERCE
	damage  1d2 
    }
    name	"dog"
}

MOB GUARDDOG
{
    symbol	'd'
    depth	5
    worlds	THIEF
    max_hp	1d8+8
    attr	BROWN
    ai		CHARGE
    size	SMALL
    melee_attack	
    { 
	verb	"bite"
	noun	"teeth"
	damageclass	PIERCE
	damage  1d4 
    }
    name	"guard dog"
}

MOB WOLF
{
    symbol	'd'
    depth	9
    worlds	THIEF
    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
    worlds	FIGHTER
    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 SERVANT
{
    symbol	'@'
    depth	1
    worlds	THIEF
    max_hp	1d4
    attr	WHITE
    ai		PEACEFUL
    size	MEDIUM
    rarity	10

    corpsechance	50
    corpse_effect PLAGUECORPSE

    opendoors	true
    useitems	true
    covetous	false

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

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

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

    opendoors	true
    useitems	true
    covetous	true

    corpsechance	50
    corpse_effect PLAGUECORPSE

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

MOB ARCHER
{
    symbol	'@'
    depth	5
    worlds	THIEF
    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
    covetous	true

    corpsechance	50
    corpse_effect PLAGUECORPSE

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

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

    opendoors	true
    useitems	true
    covetous	true
    dodgebonus	1

    startitems
    {
	itemlist
	{
	    item SHORTSWORD next {
	    item LEATHER next {
	    itemclass SCROLL chance 50 next {
	    itemclass POTION chance 50 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
    worlds	THIEF
    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 {
		   item BOW next {
		   item ARROW count 3 next GOLD
		 } } } } }
	}
    }

    opendoors	true
    useitems	true
    covetous	true

    corpsechance	50
    corpse_effect PLAGUECORPSE

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

MOB SERGEANT
{
    symbol	'@'
    depth	9
    worlds	THIEF
    max_hp	3d8+12
    attr	LTRED
    ai		CHARGE
    size	MEDIUM

    startitems
    {
	itemlist { item SHORTSWORD next { item LEATHER next GOLD } } next {
	itemlist { item MACE next { item LEATHER next GOLD } } next {
	itemlist { item SPEAR next { item LEATHER next GOLD } } next {
	itemlist { item DAGGER next { item STUDDEDLEATHER next GOLD } } next {
	itemlist { item CLUB next { item STUDDEDLEATHER next GOLD } }
	} } } }
    }

    opendoors	true
    useitems	true
    covetous	true

    corpsechance	50
    corpse_effect PLAGUECORPSE

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

MOB CAPTAIN
{
    symbol	'@'
    depth	11
    worlds	THIEF
    max_hp	4d8+16
    attr	YELLOW
    ai		CHARGE
    size	MEDIUM

    startitems
    {
	itemlist { item LONGSWORD next { item RINGMAIL next GOLD } } next {
	itemlist { item WARHAMMER next { item RINGMAIL next GOLD } } next {
	itemlist { item SHORTSWORD next { item CHAINMAIL next GOLD } } next {
	itemlist { item MACE next { item CHAINMAIL next GOLD } }
	} } }
    }

    opendoors	true
    useitems	true
    covetous	true

    corpsechance	50
    corpse_effect PLAGUECORPSE

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

MOB ELITEGUARD
{
    symbol	'@'
    depth	15
    worlds	THIEF
    max_hp	5d8+20
    attr	CYAN
    ai		CHARGE
    size	MEDIUM

    startitems
    {
	itemlist { item GREATAXE next { item PLATEMAIL next BOW_AND_GOLD } } next {
	itemlist { item WARHAMMER next { item PLATEMAIL next BOW_AND_GOLD } } next {
	itemlist { item LONGSWORD next { item FULLPLATE next BOW_AND_GOLD } } next {
	itemlist { item MACE next { item FULLPLATE next BOW_AND_GOLD } }
	} } }
    }

    opendoors	true
    useitems	true
    covetous	true

    dodgebonus	2

    corpsechance	50
    corpse_effect PLAGUECORPSE

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

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

    size	MEDIUM
    
    isconstruct	true
    canbreathe	false
    cansleep    false
    corpsechance 0

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

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

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

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

MOB GHOST
{
    symbol	' '
    depth	9
    worlds	WIZARD
    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
    worlds	FIGHTER
    max_hp	1d8+4
    attr	PURPLE
    ai		CHARGE
    startitems	KOBOLD
    size	SMALL
    opendoors	true
    useitems	true
    covetous	true
    melee_attack	
    { 
	verb	"scratch"
	noun	"nails"
	damageclass	SLASH
	damage  1d2 
    }
    name	"kobold"
}

MOB KOBOLD_THIEF
{
    symbol	'k'
    depth	7
    worlds	FIGHTER
    max_hp	2d8
    attr	LIGHTBLACK
    ai		CHARGE
    opendoors	true
    useitems	true
    covetous	true
    dodgebonus	1
    startitems
    {
	itemlist
	{
	    item SHORTSWORD next {
	    item ROBES next {
	    itemclass SCROLL chance 50 next {
	    itemclass POTION chance 50 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
    worlds	FIGHTER
    max_hp	3d8+8
    attr	WHITE
    ai		CHARGE
    opendoors	true
    useitems	true
    covetous	true
    corpsechance	50

    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
    worlds	TF
    max_hp	2d8+12
    attr	GREEN
    ai		CHARGE
    opendoors	true
    covetous	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
    worlds	WIZARD
    max_hp	2d8+16
    attr	RED
    ai		CHARGE
    opendoors	true
    isvampire	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
    worlds	TF
    max_hp	4d8+12
    attr	GREY
    ai		CHARGE
    size	GIANT
    corpsechance	75

    covetous	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
    worlds	ALL
    max_hp	5d8+16
    attr	WHITE
    ai		CHARGE
    size	GIANT
    rarity	100

    corpsechance	75
    corpse_effect CORPSE_RESIST_ICE
    breakdoors	true
    resistance	ICE

    covetous	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
    worlds	ALL
    attr	LIGHTBLACK
    ai		CHARGE
    size	GIANT
    rarity	100

    corpsechance	75
    corpse_effect CORPSE_RESIST_ACID
    breakdoors	true
    resistance	ACID

    covetous	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
    worlds	ALL
    attr	BLUE
    ai		CHARGE
    size	GIANT
    rarity	100

    corpsechance	75
    corpse_effect CORPSE_RESIST_ELECTRICITY
    breakdoors	true
    resistance	ELECTRICITY

    covetous	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
    worlds	ALL
    attr	RED
    ai		CHARGE
    size	GIANT
    rarity	100

    corpsechance	75
    corpse_effect CORPSE_RESIST_FIRE

    covetous	true
    breakdoors	true
    resistance	FIRE

    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
    worlds	ALL
    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

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

    name	"green dragon"
}

MOB GRIDBUG
{
    symbol	'x'
    depth	1
    worlds	WIZARD
    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 CAVESPIDER
{
    symbol	'a'
    depth	5
    worlds	WF
    max_hp	1d8+4
    attr	GREY
    ai		CHARGE
    size	SMALL
    resistance	POISON
    corpse_effect CORPSE_APPLYPOISON
    melee_attack	
    { 
	verb	"bite"
	noun	"fangs"
	damageclass	PIERCE
	damage  1d5 
	effect
	{
	    type 	POISON
	    duration	5
	}
    }
    name	"cave spider"
}

MOB FIREANT
{
    symbol	'a'
    depth	7
    worlds	FIGHTER
    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
    worlds	WF
    max_hp	2d8+8
    attr	LIGHTBLACK
    ai		CHARGE
    size	MEDIUM
    resistance	POISON
    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
    corpsechance	100
    corpse_effect PLAGUECORPSE
    cansleep    false

    max_hp	100
}

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

ARMOURSLOT NONE

ARMOURSLOT BODY
{
    name		"body"
    coverage		100
}

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

ITEMCLASS NONE
{
    name	"miscellaneous"
}

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

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

ITEMCLASS AMMO
{
    name	"ammo"
    symbol	'/'
    rarity	25
}

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

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

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

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

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

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

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

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

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

DEFINE ITEM
{
    CST		name		"unnamed"
    INT		timer		-1
    INT		rarity		100
    INT		depth		0
    BOOL	thesaurus	false
    ENM		worlds		WORLDLIST	ALL
    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

    ENM		itemclass	ITEMCLASS	NONE

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

    ENM		melee_attack	ATTACK	NONE

    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
}

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

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 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	CYAN
    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 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 jacket"
    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 jacket"
    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 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 MUSHROOM
{
    name	"mushroom"
    symbol	'%'
    attr	BROWN
    depth	1
    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
}

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

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

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

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

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

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

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

ITEM DIAMOND
{
    symbol	'*'
    attr	WHITE
    rarity	5
    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 QUICKBOOST
{
    symbol	'!'
    attr	GREEN

    isflag	true
    size	NONE

    name	"running"
    timer	-1
    rarity	0
}

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 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"
}

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

    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

    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

    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

    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

    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

    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

    needsdir	true
    blast       true
    radius	2
}

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

    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

    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

    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

    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

    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

    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
}

ITEM RING_RUBY
{
    name	"ruby ring"
    symbol	'='
    attr	RED
    itemclass	RING
    depth	1
}

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

ITEM RING_GOLD
{
    name	"gold ring"
    symbol	'='
    attr	GOLD
    itemclass	RING
    depth	1
}

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

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

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

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 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 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 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 CHAMBERSCAN
{
    val		'C'
}
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'
}
KEY WORLDSHIFT
{
    val		'S'
}
