# File: curse.txt

# name: effect name
# type: valid object base
# weight: adjustment amount or scale factor (implicitly divided by 100)
# combat: to_hit : to_dam : to_ac
# effect: random effect : ? parameter : ? parameter : ? parameter
# dice:dice string
# expr:dice expression
# time: average frequency of random effect
# flags: flag | flag | etc.
# values: label[value] | label[value] | etc.
# msg: text
# desc: description
# conflict: curse_name
# conflict-flags: flag | flag | etc.

# 'type' appends a kind of object (from object_base.txt) to the kinds which
# can be afflicted with the curse.

# 'weight' sets an adjustment to the weight of the object with the curse.  If
# not supplied the adjustment is zero.  If the flags for the curse do not
# include MULTIPLY_WEIGHT, the adjustment is additive in units of 1/10ths of a
# pound.  Negative adjustments (as well as non-negative ones) are allowed in
# that case.  If the flags for the curse do include MULTIPLY_WEIGHT, the
# adjustment is a multiplicative factor, the given value divided by 100.  The
# adjustment must be non-negative in that case.  With a multiplicative weight,
# the incoming weight, w, is changed to be MAX(1, w) before applying the
# muliplicative factor what that factor is greater than one (i.e. the value
# given for the weight adjustment is greater than 100).  That is to allow the
# multiplicative factors to be of some use with otherwise weightless items.
# When applying a multiplicative factor, the result is rounded to the nearest
# integer.  Curses will never reduce the weight to be less than zero or
# greater than 32767.  The ordering of curses in this file sets the order in
# which the order adjustments are applied.  If all the curses on an item use
# additive weight adjustments, the order of the adjustments only matters if
# the adjusted weight would fall outside the [0, 32767] range at some point.
# For all multiplicative adjustments (because of the rounding) or a mix of
# additive or multiplicative adjustments, the order will matter.  Setting up
# additive and multiplicative curses to conflict with one another is a way to
# reduce the dependence on the ordering of curses in this file.

# 'combat' sets the adjustments to to-hit, to-damage, and AC for a cursed
# object.  If not supplied, the adjustments are all zero.

# 'effect' sets the name of the effect that'll randomly trigger on the cursed
# object.  The fields are the name of the effect (from src/list-effects.h),
# the subtype which is either an index or a name (look at effect_subtype()
# in src/effects.c for more information), the radius, and the other parameter.
# The effect name is required.  The others are optional, and the trailing ones
# that are unused can be omitted.

# 'dice' provides a random value to be used by the effect (for damage, healing,
# duration, ...).

# 'expr' provides an expression for use in the dice value for the effect.
# It consists of a code letter (eg B) for the expression, a base function to
# use (for example PLAYER_LEVEL), and a sequence of operations to perform on
# that base.

# 'msg' sets the text to display when the curse effect triggers.  If there
# multiple 'msg' lines for a curse, they'll be concatenated.

# 'time' sets a random expression.  Each time the curse effect happens, that
# expression will be reevaluated to determine the number of turns until the
# next time the curse effect will happen.

# 'flags' is for the flags that the cursed object will have.  Those flags can
# either be object flags (as found in src/list-object-flags.h) or element
# flags (IGNORE_ or HATES_ with an element name from src/list-elements.h
# appended).  As many 'flags' lines may be used as are needed to specify all
# of the flags.  More than one flag can be set per line:  use '|' to separate
# one flag from the next.

# 'values' is for the object modifiers which take a value (stats, resistances,
# and so on) that'll be present on the cursed item.  Like 'flags', values
# are separated by '|' and as many 'values' lines as needed can be used.

# 'desc' is for the description of the curse.  It will be included in the
# description of the cursed object when the curse is known.  As many 'desc'
# lines may be used as are needed to describe the curse.

# 'conflict' sets the name of a curse that conflicts with this curse.
# Two curses that conflict will not both be present on an object.  You may
# use multiple 'conflict' lines to specify that this curse conflicts with
# more than one other curse.

# 'conflict-flags' lists the object flags (from src/list-object-flags.h) that
# conflict with this curse:  this curse will not appear on an object that has
# one or more of those flags.  More than one flag can be included on the line:
# separate them with '|', and more than one 'conflicts-flags' lines may be
# used to specify all of the conflicting flags.

name:vulnerability
combat:0:0:-50
type:cloak
type:soft armor
type:hard armor
type:dragon armor
type:shield
flags:AGGRAVATE
desc:attracts opponents and weakens the defences

name:teleportation
type:helm
type:crown
type:amulet
type:ring
effect:TELEPORT
dice:40
time:d100
msg:Space warps around you.
desc:randomly makes you teleport
conflict:anti-teleportation
conflict-flags:NO_TELEPORT

name:dullness
type:helm
type:crown
values:INT[-5] | WIS[-5]
desc:makes you mentally slow

name:sickliness
type:helm
type:crown
values:STR[-5] | DEX[-5] | CON[-5]
desc:makes you frail

name:enveloping
combat:-5:-5:20
type:cloak
desc:protects you at the expense of free movement

name:irritation
combat:-15:-15:0
type:cloak
flags:AGGRAVATE
desc:annoys monsters and makes it hard for you to hit them

name:weakness
type:gloves
values:STR[-10]
desc:weakens your grasp

name:clumsiness
type:gloves
values:DEX[-10]
desc:makes your hands fumble and betray you

name:slowness
type:boots
values:SPEED[-5]
desc:drags at your feet

name:annoyance
type:boots
values:SPEED[-10] | STEALTH[-10]
flags:AGGRAVATE
desc:wakes up and annoys nearby monsters, and delays your escape

name:poison
type:bow
type:digger
type:hafted
type:polearm
type:sword
type:boots
type:gloves
type:helm
type:crown
type:shield
type:cloak
type:soft armor
type:hard armor
type:dragon armor
type:light
type:amulet
type:ring
effect:TIMED_INC:POISONED
dice:10+d10
time:1d500
desc:poisons you from time to time

name:siren
type:bow
type:digger
type:hafted
type:polearm
type:sword
type:boots
type:gloves
type:helm
type:crown
type:shield
type:cloak
type:soft armor
type:hard armor
type:dragon armor
type:light
type:amulet
type:ring
effect:WAKE
time:100+1d50
msg:A horn blares out!
desc:occasionally sounds a blaring horn, waking everything nearby

name:hallucination
type:bow
type:digger
type:hafted
type:polearm
type:sword
type:boots
type:gloves
type:helm
type:crown
type:shield
type:cloak
type:soft armor
type:hard armor
type:dragon armor
type:light
type:amulet
type:ring
effect:TIMED_INC:IMAGE
dice:10+d10
time:1d500
desc:makes you hallucinate sometimes

name:paralysis
type:bow
type:digger
type:hafted
type:polearm
type:sword
type:boots
type:gloves
type:helm
type:crown
type:shield
type:cloak
type:soft armor
type:hard armor
type:dragon armor
type:light
type:amulet
type:ring
effect:TIMED_INC:PARALYZED
dice:5+1d5
time:1d1000
msg:Your equipment grabs you!
desc:paralyses you every now and then

name:dragon summon
type:dragon armor
effect:SUMMON:DRAGON
dice:1
time:1d500
msg:Your armour lets out a cry...
desc:sometimes summons a dragon

name:demon summon
type:digger
type:hafted
type:polearm
type:sword
effect:SUMMON:DEMON
dice:1
time:1d500
msg:Your weapon gives out a demonic shriek!
desc:occasionally summons a demon

name:undead summon
type:digger
type:hafted
type:polearm
type:sword
effect:SUMMON:UNDEAD
dice:1
time:1d500
msg:Your weapon calls beyond the grave!
desc:occasionally summons an undead

name:impair mana recovery
type:helm
type:crown
flags:IMPAIR_MANA
conflict-flags:IMPAIR_MANA
desc:makes you slow to recover mana

name:impair hitpoint recovery
type:boots
type:gloves
type:shield
type:cloak
type:soft armor
type:hard armor
type:dragon armor
flags:IMPAIR_HP
conflict-flags:IMPAIR_HP
desc:makes you slow to recover hitpoints

name:cowardice
type:amulet
type:ring
flags:AFRAID
conflict-flags:AFRAID | PROT_FEAR
desc:makes you too scared to fight

name:stone
type:amulet
type:ring
effect:TIMED_INC:STONESKIN
dice:20+1d20
time:1d1000
desc:periodically turns your skin to stone

name:anti-teleportation
type:boots
type:cloak
type:soft armor
type:hard armor
type:dragon armor
type:amulet
type:ring
flags:NO_TELEPORT
desc:prevents you from teleporting
conflict:teleportation
conflict-flags:NO_TELEPORT

name:treacherous weapon
type:digger
type:hafted
type:polearm
type:sword
effect:DAMAGE
dice:$B
expr:B:WEAPON_DAMAGE:+ 0
time:1d200
msg:Your weapon turns on you!
desc:makes your weapon attack you

name:burning up
type:boots
type:gloves
type:helm
type:crown
type:shield
type:cloak
type:soft armor
type:hard armor
type:dragon armor
values:RES_FIRE[-1] | RES_COLD[1]
desc:makes you vulnerable to fire attacks, but resistant to cold
conflict:chilled to the bone

name:chilled to the bone
type:boots
type:gloves
type:helm
type:crown
type:shield
type:cloak
type:soft armor
type:hard armor
type:dragon armor
values:RES_FIRE[1] | RES_COLD[-1]
desc:makes you vulnerable to cold attacks, but resistant to fire
conflict:burning up

name:steelskin
type:digger
type:hafted
type:polearm
type:sword
type:helm
type:crown
type:shield
type:hard armor
type:dragon armor
type:light
type:amulet
type:ring
combat:0:0:20
values:RES_ELEC[-1] | RES_SHARD[1]
desc:makes your skin harder to damage, but conduct electricity

name:air swing
combat:-20:0:0
type:digger
type:hafted
type:polearm
type:sword
desc:makes it hard to hit anything

# Ravenloft-themed gothic horror curses

name:mist touched
type:cloak
type:soft armor
type:hard armor
type:dragon armor
type:amulet
type:ring
effect:TELEPORT
dice:20+d40
time:100+d200
values:STEALTH[-5]
flags:AGGRAVATE
msg:The Mists swirl around you, pulling you away!
desc:marks you as claimed by the Mists, causing random displacement
conflict:anti-teleportation
conflict-flags:NO_TELEPORT

name:vistani hex
type:helm
type:crown
type:amulet
type:ring
effect:TIMED_INC:CONFUSED
dice:5+1d10
time:d400
msg:The Vistani curse clouds your mind!
desc:hexed by the Vistani, bringing confusion and misfortune

name:vampiric thirst
type:digger
type:hafted
type:polearm
type:sword
type:amulet
type:ring
effect:TIMED_INC:CUT
dice:20+d20
time:200+d300
values:RES_DARK[1] | LIGHT[-1]
flags:AGGRAVATE
msg:The vampiric thirst consumes you!
desc:grants you the thirst of the undead, slowly draining your life

name:dark powers' mark
type:helm
type:crown
type:amulet
type:ring
combat:5:5:-20
values:STR[2] | INT[2] | WIS[-3] | INFRA[3]
flags:AGGRAVATE | IMPAIR_HP
msg:The Dark Powers take their price...
desc:marked by the Dark Powers - grants strength but attracts evil

name:lycanthropic affliction
type:cloak
type:ring
type:amulet
effect:TIMED_INC:SHERO
dice:10+1d20
time:500+d500
values:STR[1] | CON[1] | INT[-2]
flags:AGGRAVATE
msg:The beast within stirs uncontrollably!
desc:cursed with lycanthropy, prone to uncontrolled rage

name:haunted
type:helm
type:crown
type:light
type:amulet
effect:TIMED_INC:AFRAID
dice:10+1d20
time:d300
msg:Spectral whispers fill your mind with dread!
desc:haunted by vengeful spirits that fill you with terror
conflict:cowardice
conflict-flags:PROT_FEAR

name:withering touch
type:gloves
type:ring
values:STR[-3] | DEX[-3] | CON[-5]
flags:IMPAIR_HP
desc:cursed to slowly wither away, draining vitality

name:soul drain
type:digger
type:hafted
type:polearm
type:sword
type:amulet
type:ring
effect:DAMAGE
dice:10+1d20
time:d600
values:LIGHT[-2]
msg:The weapon feeds on your very soul!
desc:drains your life essence to feed dark powers

