# File: trap.txt


# This file is used to initialize the rune and trap definitions for 
# PWMAngband.

# Do not modify this file unless you know exactly what you are doing,
# unless you wish to risk possible system crashes and broken savefiles.

# === Understanding trap.txt ===

# name : trap name : short description
# graphics : ASCII char used to represent the feature : color symbol
# appear : rarity : minimum depth : maximum number on level
# visibility: player trap visibility value
# desc : description

# flags : trap flags
#    These include:
#    - DOWN: after running effects, drops the player down a dungeon level
#    - ONETIME: after running effects, trap disappears
#    - MAGICAL: uses the magic disarm skill - other traps use physical disarm
#    - VISIBLE: trap will not be hidden when generated
#    - FLOOR: * can be set on the floor
#    - TRAP: * is a trap
#
#    Flags marked '*' must be set for a trap to be generated as part of
#    normal dungeon generation.
#
#    See list-trap-flags.h for a full list.

# msg : activation message
#    This is shown to the user when the trap is triggered.

# save : object flags that provide a saving throw
# msg-good : save message
# msg-bad : fail to save message
#    There are two ways to give the player a chance of avoiding the trap:
#
#    1. If the 'save' line is provided, then if player has the flags
#       specified on the 'save' line, the trap is avoided, and/or
#    2. If the 'msg-bad' line is provided, then a roll is made against the
#       player's AC, which if successful avoids the trap.
#
#    If the trap is avoided, the 'msg-good' line is printed instead. If it
#    isn't, 'msg-bad' is printed.

# effect : trap effect
# dice : dice string for effect
# expr : dice expression for effect
#    If there is no saving throw, or it fails, then these effects are
#    triggered.

# msg-xtra : extra effect message
# effect-xtra : extra effect
# dice-xtra : dice string for extra effect
# expr-xtra : dice expression for extra effect
#    If there is no saving throw, or it fails, then these effects are
#    also triggered 50% of the time. If they are triggered, the 'msg-xtra'
#    line is printed, if present.

# msg-death : type : death message


name:no trap:no trap
graphics: :w

name:glyph of warding:glyph of warding
graphics:;:y
appear:0:0:0
flags:RUNE | VISIBLE | FLOOR
desc:A magical rune which monsters cannot pass without difficulty.

name:door lock:door lock
graphics: :w
appear:0:0:0
flags:LOCK | INVISIBLE
desc:A device which makes a closed door harder to open.

## Player traps ##

# trap door

name:trap door:trap door
graphics:^:w
appear:1:2:0
visibility:2d10M50
flags:TRAP | FLOOR | DOWN
effect:DAMAGE
dice:2d8
save:FEATHER
desc:It looks like floor, but step incautiously and you will fall through.
msg:You fall through a trap door!
msg-good:You float gently down to the next level.
msg-death:1:broke %s neck after falling from 50ft high

# open pit

name:pit:pit
graphics:^:s
appear:1:2:0
visibility:90
flags:TRAP | FLOOR | PIT
effect:DAMAGE
dice:2d6
save:FEATHER
desc:A hole dug to snare the unwary.
msg:You fall into a pit!
msg-good:You float gently to the bottom of the pit.
msg-death:1:broke %s neck after falling into a pit

# spiked pit

name:pit:spiked pit
graphics:^:s
appear:1:2:0
visibility:80
flags:TRAP | FLOOR | PIT
effect:DAMAGE
dice:2d6
effect-xtra:TIMED_INC:CUT
dice-xtra:4d6
effect-xtra:DAMAGE
dice-xtra:2d6
save:FEATHER
desc:A hole dug to snare the unwary, with spikes.
msg:You fall into a spiked pit!
msg-good:You float gently to the bottom of the pit, neatly avoiding the spikes.
msg-xtra:You are impaled!
msg-death:2:impaled %s on sharp spikes

# poison pit

name:pit:poison pit
graphics:^:s
appear:1:2:0
visibility:70
flags:TRAP | FLOOR | PIT
effect:DAMAGE
dice:2d6
effect-xtra:TIMED_INC:POISONED
dice-xtra:8d6
effect-xtra:TIMED_INC:CUT
dice-xtra:4d6
save:FEATHER
desc:A hole dug to snare the unwary, with poisoned spikes.
msg:You fall into a spiked pit!
msg-good:You float gently to the bottom of the pit, neatly avoiding the spikes.
msg-xtra:You are impaled on poisonous spikes!
msg-death:2:impaled %s on poisonous spikes

# rune -- summon (OoD) monster

name:strange rune:rune of summon foe
graphics:^:B
appear:1:3:0
visibility:0
flags:TRAP | FLOOR | ONETIME | MAGICAL
effect:SUMMON:MONSTER:5
param:0:-2
dice:1
desc:A magical rune which calls a monster to attack you.
msg:A new foe appears from nowhere!

# rune -- summon monsters

name:strange rune:rune of summoning
graphics:^:B
appear:2:3:0
visibility:0
flags:TRAP | FLOOR | ONETIME | MAGICAL
effect:SUMMON
param:0:-2
dice:2+1d3
desc:A magical rune which calls up monsters to attack you.
msg:You are enveloped in a cloud of smoke!

# rune -- summon undead

name:strange rune:rune of necromancy
graphics:^:B
appear:1:20:0
visibility:0
flags:TRAP | FLOOR | ONETIME | MAGICAL
effect:SUMMON:UNDEAD
param:0:-2
dice:1d3M2
desc:A magical rune which calls the undead to attack you.
msg:A sense of dread washes over you...

# rune -- summon dragons

name:strange rune:rune of dragonsong
graphics:^:B
appear:1:20:0
visibility:0
flags:TRAP | FLOOR | ONETIME | MAGICAL
effect:SUMMON:DRAGON
param:0:-2
dice:1d3
desc:A magical rune which calls dragons to attack you.
msg:You hear a dragon's call!

# rune -- summon demons

name:strange rune:hellhole
graphics:^:B
appear:1:20:0
visibility:0
flags:TRAP | FLOOR | ONETIME | MAGICAL
effect:SUMMON:DEMON
param:0:-2
dice:1+1d3
desc:A magical rune which calls demons to attack you.
msg:Demons appear!

# rune -- teleport

name:strange rune:teleport rune
graphics:^:o
appear:1:1:0
visibility:30+d30
flags:TRAP | FLOOR | MAGICAL
effect:TELEPORT
dice:100
desc:A magical rune which teleports you to a random location.
msg:You hit a teleport trap!

# spot -- fire

name:discolored spot:fire trap
graphics:^:u
appear:1:2:0
visibility:20
flags:TRAP | FLOOR | MAGICAL
effect:SPOT:FIRE:0
dice:4d$S
expr:S:DUNGEON_LEVEL:/ 2
desc:A strange coloured spot on the ground - beware its fiery attack.
msg:You are enveloped in flames!
msg-death:0:was fried by a fire trap

# spot -- acid

name:discolored spot:acid trap
graphics:^:u
appear:1:2:0
visibility:0
flags:TRAP | FLOOR | MAGICAL
effect:SPOT:ACID:0
dice:4d$S
expr:S:DUNGEON_LEVEL:/ 2
desc:A strange coloured spot on the ground - beware its acidic attack.
msg:You are splashed with acid!
msg-death:0:was dissolved by an acid trap

# dart -- slow

name:dart trap:slow dart
graphics:^:r
appear:1:2:0
visibility:M50
flags:TRAP | FLOOR | SAVE_ARMOR
effect:TIMED_INC_NO_RES:SLOW
dice:20+1d20
effect:DAMAGE
dice:1d4
desc:A trap which shoots slowing darts.
msg-good:A small dart barely misses you.
msg-bad:A small dart hits you!
msg-death:0:was shot by a slowing dart

# dart -- lose str

name:dart trap:strength loss dart
graphics:^:r
appear:2:6:0
visibility:30
flags:TRAP | FLOOR | SAVE_ARMOR
effect:DRAIN_STAT:STR
effect:DAMAGE
dice:1d4
desc:A trap which shoots damaging darts.
msg-good:A small dart barely misses you.
msg-bad:A small dart hits you!
msg-death:0:was shot by a weakening dart

# dart -- lose dex

name:dart trap:dexterity loss dart
graphics:^:r
appear:2:6:0
visibility:30
flags:TRAP | FLOOR | SAVE_ARMOR
effect:DRAIN_STAT:DEX
effect:DAMAGE
dice:1d4
desc:A trap which shoots damaging darts.
msg-good:A small dart barely misses you.
msg-bad:A small dart hits you!
msg-death:0:was shot by a small dart

# dart -- lose con

name:dart trap:constitution loss dart
graphics:^:r
appear:2:6:0
visibility:30
flags:TRAP | FLOOR | SAVE_ARMOR
effect:DRAIN_STAT:CON
effect:DAMAGE
dice:1d4
desc:A trap which shoots damaging darts.
msg-good:A small dart barely misses you.
msg-bad:A small dart hits you!
msg-death:0:was shot by an exhausting dart

# gas -- blind

name:gas trap:blinding gas trap
graphics:^:g
appear:1:2:0
visibility:20+d5
flags:TRAP | FLOOR
effect:TIMED_INC:BLIND
dice:25+1d50
desc:A trap that releases gas to blind you.
msg:You are surrounded by a black gas!

# gas -- confuse

name:gas trap:confusion gas trap
graphics:^:g
appear:1:1:0
visibility:20+d5
flags:TRAP | FLOOR
effect:TIMED_INC:CONFUSED
dice:10+1d20
desc:A trap that releases gas to confuse you.
msg:You are surrounded by a gas of scintillating colors!

# gas -- poison

name:gas trap:poison gas trap
graphics:^:g
appear:1:2:0
visibility:20+d5
flags:TRAP | FLOOR
effect:TIMED_INC:POISONED
dice:10+1d20
desc:A trap that releases gas to poison you.
msg:You are surrounded by a pungent green gas!

# gas -- sleep

name:gas trap:sleep gas trap
graphics:^:g
appear:1:2:0
visibility:20+d5
flags:TRAP | FLOOR
effect:TIMED_INC:PARALYZED
dice:5+1d10
desc:A trap that releases gas to put you to sleep.
msg:You are surrounded by a strange white mist!

# alarm -- aggravation

name:alarm:aggravation trap
graphics:^:R
appear:1:5:0
visibility:M50
flags:TRAP | FLOOR | MAGICAL
effect:PROJECT_LOS:MON_SPEED
dice:25
effect:WAKE
desc:A trap that wakes nearby monsters and impels them toward you.
msg:A high-pitched whistle blares through the dungeon!

# explosion -- mine

name:explosion:mine trap
graphics:^:M
appear:1:15:0
visibility:10+d5
flags:TRAP | FLOOR | ONETIME
effect:SPOT:SHARD:2
dice:$B
expr:B:DUNGEON_LEVEL:* 2
desc:A trap that blows up the floor.
msg:The floor explodes around you!

# explosion -- blast

name:explosion:blast trap
graphics:^:M
appear:2:25:0
visibility:0
flags:TRAP | FLOOR | ONETIME
effect:SPOT:FORCE:2
dice:$B
expr:B:DUNGEON_LEVEL:+ 0
effect:SPOT:FIRE:2
dice:$B
expr:B:DUNGEON_LEVEL:+ 0
effect:SPOT:SOUND:2
dice:$B
expr:B:DUNGEON_LEVEL:/ 2
effect:SPOT:LIGHT:1
dice:2d6
desc:A trap that creates an explosion.
msg:The air seems to catch fire!

# mental assault -- mind blast

name:mind blast trap:mind blasting trap
graphics:^:G
appear:1:20:0
visibility:30+d10
flags:TRAP | FLOOR | MAGICAL | SAVE_THROW
effect:TIMED_INC:CONFUSED
dice:3+1d4
effect:DAMAGE
dice:8d$S
expr:S:DUNGEON_LEVEL:/ 10
desc:A trap that blasts your senses.
msg:You feel pressure on your mind.
msg-good:You shake your head and are back to normal.
msg-bad:Your mind is blasted by psionic energy!

# mental assault -- brain smash

name:mind blast trap:brain smashing trap
graphics:^:G
appear:2:40:0
visibility:30+d10
flags:TRAP | FLOOR | MAGICAL | SAVE_THROW
effect:TIMED_INC:BLIND
dice:7+1d8
effect:TIMED_INC:PARALYZED
dice:3+1d4
effect:TIMED_INC:CONFUSED
dice:3+1d4
effect:TIMED_INC:SLOW
dice:3+1d4
effect:DAMAGE
dice:10d$S
expr:S:DUNGEON_LEVEL:/ 5
desc:A trap that blasts your senses.
msg:You feel pressure on your mind.
msg-good:You shake your head and are back to normal.
msg-bad:Your mind is blasted by psionic energy!

# dungeon alter -- rock fall

name:ancient mechanism:rock fall trap
graphics:^:U
appear:1:4:0
visibility:40+d5
flags:TRAP | FLOOR | ONETIME
effect:RUBBLE
effect:TIMED_INC_NO_RES:STUN
dice:2d20
effect:DAMAGE
dice:$Dd5
expr:D:DUNGEON_LEVEL:/ 10 + 1
desc:A trap that drops a boulder on you.
msg:A rock falls on your head!

# dungeon alter -- earthquake

name:ancient mechanism:earthquake trap
graphics:^:U
appear:1:30:0
visibility:30+d5
flags:TRAP | FLOOR
effect:DAMAGE
dice:$Dd5
expr:D:DUNGEON_LEVEL:/ 10 + 1
effect:EARTHQUAKE
param:5
desc:A trap that causes an earthquake.
msg:The ground shakes.

# dungeon alter - stone to mud

name:ancient mechanism:area blast trap
graphics:^:U
appear:2:40:0
visibility:20+d5
flags:TRAP | FLOOR | ONETIME
effect:RUBBLE
effect:BALL:FORCE:2
dice:$B
expr:B:DUNGEON_LEVEL:+ 0
effect:BALL:KILL_WALL:2
dice:20
desc:A trap that clears the surrounding area.
msg:The trap explodes, blasting the area clear!

# blinding flash

name:trap:blinding flash trap
graphics:^:light yellow
appear:1:5:0
visibility:30+d5
flags:TRAP | FLOOR | MAGICAL | ONETIME
effect:BALL:LIGHT:4
dice:$Dd8
expr:D:DUNGEON_LEVEL:/ 10 + 2
desc:A trap that creates a ball of light.
msg:A blazing light descends on you!

# blinding trap

name:trap:blinding trap
graphics:^:light slate
appear:1:5:0
visibility:20+d5
flags:TRAP | FLOOR | MAGICAL | ONETIME
effect:DRAIN_LIGHT
dice:100+1d100
effect:BALL:DARK:4
dice:$Dd8
expr:D:DUNGEON_LEVEL:/ 10 + 2
desc:A trap that envelops you in darkness.
msg:Everything starts to fade...

# mana drain

name:trap:mana drain trap
graphics:^:light purple
appear:1:5:0
visibility:50+d10
flags:TRAP | FLOOR | MAGICAL
effect:DRAIN_MANA
dice:1d$D
expr:D:DUNGEON_LEVEL:/ 2 + 1
desc:A trap that drains your mana.
msg:You feel your energies sap away.

# whirling knives

name:trap:knife trap
graphics:^:yellow
appear:1:20:0
visibility:20+d5
flags:TRAP | FLOOR
effect:TIMED_INC:CUT
dice:150
effect:DAMAGE
dice:$D
expr:D:DUNGEON_LEVEL:/ 2
desc:A trap designed to bleed you to death.
msg:Blades whirl around you, slicing your skin!

# petrifier

name:trap:petrifying trap
graphics:^:blue
appear:1:5:0
visibility:20+d5
flags:TRAP | FLOOR | MAGICAL
effect:TIMED_INC:STUN
dice:20+1d20
effect:TIMED_INC:STONESKIN
dice:20+1d20
desc:A trap that stuns you and gives you stoneskin.
msg:You feel yourself turning to stone!

# alarm -- aggravation

name:alarm:siren
graphics:^:R
appear:1:1:0
visibility:60+d10
flags:TRAP | FLOOR | MAGICAL
effect:WAKE
desc:A trap that wakes nearby monsters.
msg:A horn blast sounds!