summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2016-10-05 18:45:09 +0200
committerBardur Arantsson <bardur@scientician.net>2016-10-05 18:49:38 +0200
commitcbafbc638c2e1d5bb40ee6bc419007062e9615e4 (patch)
tree0a4644c9c935a2a54d8b52613c67a09fc2fbf4be
parent551339813797a9b274ccf5f3f0c4f0d0b44cbf64 (diff)
Remove traps
Credit goes mostly to "miramor" <danlev@norwoodlight.com> who did most of the actual work. I just did a few minor tweaks and fixes + rebased onto master.
-rw-r--r--lib/edit/a_info.txt52
-rw-r--r--lib/edit/ab_info.txt7
-rw-r--r--lib/edit/d_info.txt1
-rw-r--r--lib/edit/e_info.txt144
-rw-r--r--lib/edit/k_info.txt115
-rw-r--r--lib/edit/p_info.txt82
-rw-r--r--lib/edit/r_info.txt26
-rw-r--r--lib/edit/re_info.txt1
-rw-r--r--lib/edit/s_info.txt27
-rw-r--r--lib/edit/st_info.txt1
-rw-r--r--lib/help/debug.txt9
-rw-r--r--lib/mods/theme/edit/a_info.txt47
-rw-r--r--lib/mods/theme/edit/ab_info.txt7
-rw-r--r--lib/mods/theme/edit/d_info.txt1
-rw-r--r--lib/mods/theme/edit/e_info.txt144
-rw-r--r--lib/mods/theme/edit/k_info.txt122
-rw-r--r--lib/mods/theme/edit/p_info.txt113
-rw-r--r--lib/mods/theme/edit/r_info.txt33
-rw-r--r--lib/mods/theme/edit/re_info.txt1
-rw-r--r--lib/mods/theme/edit/s_info.txt27
-rw-r--r--lib/mods/theme/edit/st_info.txt1
-rw-r--r--lib/mods/theme/help/debug.txt9
-rw-r--r--src/CMakeLists.txt1
-rw-r--r--src/birth.cc35
-rw-r--r--src/cave.cc108
-rw-r--r--src/cave_type.hpp2
-rw-r--r--src/cmd1.cc232
-rw-r--r--src/cmd1.hpp4
-rw-r--r--src/cmd2.cc499
-rw-r--r--src/cmd2.hpp2
-rw-r--r--src/cmd4.cc52
-rw-r--r--src/cmd5.cc7
-rw-r--r--src/cmd6.cc41
-rw-r--r--src/cmd7.cc11
-rw-r--r--src/defines.h243
-rw-r--r--src/dungeon.cc42
-rw-r--r--src/files.cc55
-rw-r--r--src/game_edit_data.hpp6
-rw-r--r--src/generate.cc279
-rw-r--r--src/help.cc38
-rw-r--r--src/init1.cc219
-rw-r--r--src/init2.cc16
-rw-r--r--src/loadsave.cc31
-rw-r--r--src/melee2.cc30
-rw-r--r--src/monster1.cc1
-rw-r--r--src/monster_spell_flag_list.hpp1
-rw-r--r--src/object1.cc89
-rw-r--r--src/object2.cc76
-rw-r--r--src/object2.hpp1
-rw-r--r--src/object_flag_list.hpp10
-rw-r--r--src/player_type.hpp4
-rw-r--r--src/powers.cc7
-rw-r--r--src/powers.hpp1
-rw-r--r--src/q_eol.cc6
-rw-r--r--src/q_fireprof.cc46
-rw-r--r--src/q_god.cc3
-rw-r--r--src/q_haunted.cc14
-rw-r--r--src/q_library.cc1
-rw-r--r--src/skills.cc4
-rw-r--r--src/skills_defs.hpp4
-rw-r--r--src/spells1.cc109
-rw-r--r--src/spells2.cc111
-rw-r--r--src/spells3.cc21
-rw-r--r--src/spells4.cc1
-rw-r--r--src/spells5.cc24
-rw-r--r--src/store.cc1
-rw-r--r--src/tables.cc9
-rw-r--r--src/trap_type.hpp24
-rw-r--r--src/traps.cc3113
-rw-r--r--src/traps.hpp13
-rw-r--r--src/wizard2.cc7
-rw-r--r--src/xtra1.cc55
-rw-r--r--src/xtra2.cc33
73 files changed, 167 insertions, 6545 deletions
diff --git a/lib/edit/a_info.txt b/lib/edit/a_info.txt
index 4f52a413..6ab4bf5d 100644
--- a/lib/edit/a_info.txt
+++ b/lib/edit/a_info.txt
@@ -3708,58 +3708,6 @@ D:This helm, designed by Petty-Dwarves ages ago to act as the brain of a
D:long lost project, is made of finest glass. Its light banishes all secrets,
D:and makes audible whispers from the deceased.
-
-### Trapping Kits ###
-
-### note prices and rarities may have to be adjusted ###
-
-# The Catapult Trap Set of Ahromarwar
-
-N:161:of Ahromarwar
-I:46:1:3
-W:20:10:40:20000
-P:0:0d0:25:15:30
-F:AUTOMATIC_99
-F:HIDE_TYPE
-F:STEALTH
-F:XTRA_MIGHT
-D:A trap that can almost never be detected. Its missiles may be mere pebbles,
-D:but fired at an incredibly high velocity to penetrate even the toughest
-D:hide or armour.
-
-
-# The Device Trap Set 'Hanisbroner's Surprise'
-
-N:162:'Hanisbroner's Surprise'
-I:46:6:3
-W:20:20:40:20000
-P:0:0d0:0:0:25
-F:AUTOMATIC_99
-F:HIDE_TYPE
-F:STEALTH
-F:TELEPORT_TO
-F:XTRA_SHOTS
-D:A magical trap, armed with a wand. Unaccountably, its victims keep
-D:on coming back for more...
-
-
-# The Bolt Trap Set 'Merlion Karc's Demonbane'
-
-N:163:'Merlion Karc's Demonbane'
-I:46:3:2
-W:20:20:200:20000
-P:0:0d0:17:27:37
-F:HIDE_TYPE
-F:ONLY_DEMON
-F:STEALTH
-F:XTRA_MIGHT
-F:XTRA_SHOTS
-D:A snare set not for animals, or people, but for demons alone, and
-D:enchanted so that whenever the demon sets foot or claw into the
-D:(hidden) pentagram, its hide is immediately pierced by many magical
-D:crossbow bolts.
-
-
# The Broken Sword 'Narsil'
N:164:'Narsil'
diff --git a/lib/edit/ab_info.txt b/lib/edit/ab_info.txt
index ec878c67..579368f4 100644
--- a/lib/edit/ab_info.txt
+++ b/lib/edit/ab_info.txt
@@ -84,13 +84,6 @@ A:102:Far reaching attack
k:15:Combat
k:15:Polearm-mastery
-N:9:Trapping
-D:Ability to set monster traps
-D:Prereq: Disarming@15
-I:10
-A:14:Set trap
-k:15:Disarming
-
N:10:Undead Form
D:Ability to turn into a weak undead being when you "die".
D:You must then kill enough monsters to absorb enough life energy
diff --git a/lib/edit/d_info.txt b/lib/edit/d_info.txt
index 1029f547..fe20c276 100644
--- a/lib/edit/d_info.txt
+++ b/lib/edit/d_info.txt
@@ -343,7 +343,6 @@ S:BR_CONF
S:CONF
S:FORGET
S:MULTIPLY
-S:TRAPS
# The Maze
# Levels 25-37
diff --git a/lib/edit/e_info.txt b/lib/edit/e_info.txt
index 0116d47c..0b85ce93 100644
--- a/lib/edit/e_info.txt
+++ b/lib/edit/e_info.txt
@@ -2150,150 +2150,6 @@ R:1
F:PVAL_M3
F:PVAL_M5
-
-### Trapping Kits ###
-
-N:151:of Extra Might
-X:A:0:5
-T:46:1:3
-W:0:1:10:1000
-C:20:20:0:2
-R:100
-F:XTRA_MIGHT
-f:XTRA_MIGHT
-
-N:152:of Extra Shots
-X:A:0:10
-T:46:0:99
-W:0:1:10:2000
-C:20:20:0:3
-R:100
-F:XTRA_SHOTS
-f:XTRA_SHOTS
-
-N:153:Automatic
-X:B:0:15
-T:46:0:99
-W:0:1:10:3000
-C:10:10:0:0
-R:100
-F:AUTOMATIC_5
-F:IGNORE_ACID
-F:IGNORE_COLD
-F:IGNORE_ELEC
-F:IGNORE_FIRE
-f:AUTOMATIC_5
-
-N:154:Fully Automatic
-X:B:0:15
-T:46:0:99
-W:0:1:15:5000
-C:10:10:0:0
-R:100
-F:AUTOMATIC_99
-F:IGNORE_ACID
-F:IGNORE_COLD
-F:IGNORE_ELEC
-F:IGNORE_FIRE
-f:AUTOMATIC_99
-
-N:155:Well-hidden
-X:B:0:5
-T:46:0:99
-W:0:1:8:1000
-C:15:15:5:12
-R:100
-F:HIDE_TYPE
-F:IGNORE_ACID
-F:IGNORE_COLD
-F:IGNORE_ELEC
-F:IGNORE_FIRE
-F:STEALTH
-f:STEALTH
-
-N:156:Complicated
-X:B:0:10
-T:46:0:99
-W:0:1:12:2000
-C:15:15:30:0
-R:100
-F:IGNORE_ACID
-F:IGNORE_COLD
-F:IGNORE_ELEC
-F:IGNORE_FIRE
-
-N:157:Obvious
-X:B:0:0
-T:46:0:99
-W:0:1:1:0
-C:-20:-20:-20:-20
-R:100
-F:CURSED
-F:HIDE_TYPE
-F:STEALTH
-f:STEALTH
-
-N:158:for Dragons
-X:A:0:5
-T:46:0:99
-W:0:3:10:500
-C:20:20:10:4
-R:100
-F:HIDE_TYPE
-F:IGNORE_ACID
-F:IGNORE_FIRE
-F:ONLY_DRAGON
-F:STEALTH
-F:XTRA_SHOTS
-
-N:159:for Demons
-X:A:0:5
-T:46:0:99
-W:0:3:10:500
-C:20:20:10:4
-R:100
-F:HIDE_TYPE
-F:IGNORE_ACID
-F:IGNORE_FIRE
-F:ONLY_DEMON
-F:STEALTH
-F:XTRA_SHOTS
-
-N:160:for Animals
-X:A:0:5
-T:46:0:99
-W:0:3:10:500
-C:20:20:10:4
-R:100
-F:HIDE_TYPE
-F:ONLY_ANIMAL
-F:STEALTH
-F:XTRA_SHOTS
-
-N:161:for Undead
-X:A:0:5
-T:46:0:99
-W:0:3:10:500
-C:20:20:10:4
-R:100
-F:HIDE_TYPE
-F:KILL_GHOST
-F:ONLY_UNDEAD
-F:STEALTH
-F:XTRA_SHOTS
-
-N:162:for Evil
-X:A:0:5
-T:46:0:99
-W:0:3:10:500
-C:20:20:10:4
-R:100
-F:HIDE_TYPE
-F:KILL_GHOST
-F:ONLY_EVIL
-F:STEALTH
-F:XTRA_SHOTS
-
# Lite ego
N:163:of the Magi
X:A:0:0
diff --git a/lib/edit/k_info.txt b/lib/edit/k_info.txt
index 7bc01b5e..e998ac71 100644
--- a/lib/edit/k_info.txt
+++ b/lib/edit/k_info.txt
@@ -2015,14 +2015,6 @@ A:0/1
D:This scroll shows nearby objects to you. It only makes you aware of items on the floor,
D:however, not those carried by creatures.
-N:194:Trap Detection
-G:?:d
-I:70:28:0
-W:5:0:5:35
-A:5/1:10/1
-D:This scroll is very helpful, because it reveals the locations of nearby snares and traps which you
-D:might otherwise blunder into.
-
##### Extra ammunition #####
N:195:& Sheaf Arrow~
@@ -2095,22 +2087,6 @@ W:5:0:5:0
A:5/1
D:This nasty scroll will make a loud noise, waking up foes in your vicinity.
-N:203:Trap Creation
-G:?:d
-I:70:7:0
-W:10:0:5:0
-A:10/1
-D:If you read this rather annoying scroll, snares and pitfalls will magically be planted all around
-D:you, ready to do nasty things to you once you walk onto them.
-
-N:204:Trap/Door Destruction
-G:?:d
-I:70:39:0
-W:10:0:5:50
-A:10/1
-D:A very specifically destructive spell is written on this scroll. It will smash all traps and all
-D:doors immediately next to you.
-
N:205:Artifact Creation
G:?:d
I:70:52:0
@@ -2982,13 +2958,6 @@ W:30:0:50:100
A:30/1
P:0:1d2:0:0:0
-N:307:Disarm
-G:_:d
-I:55:8:-1:SPELL=Disarm
-W:2:0:50:100
-A:2/1
-P:0:1d2:0:0:0
-
N:308:Teleportation
G:_:d
I:55:9:-1:SPELL=Teleportation
@@ -3330,14 +3299,6 @@ A:15/1
P:0:1d1:0:0:0
D:When fuelled with enough ambient mana, this rod can detect nearby passages.
-N:352:Trap Location
-G:-:d
-I:66:29:8
-W:5:0:15:100
-A:5/1:10/1:20/1
-P:0:1d1:0:0:0
-D:Zapping this rod will release a minor detection magic, alerting you of nearby pits and snares.
-
N:354:Recall
G:-:d
I:66:3:80
@@ -3427,14 +3388,6 @@ A:45/2
P:0:1d1:0:0:0
D:This rod of movement will displace its target to another location.
-N:365:Disarming
-G:-:d
-I:66:14:50
-W:35:0:15:2100
-A:35/1
-P:0:1d1:0:0:0
-D:This rod will clear a path for you, triggering and thus rendering harmless all traps on the way.
-
N:366:Lightning Balls
G:-:d
I:66:25:50
@@ -4960,27 +4913,6 @@ f:MUST2H
D:This is a larger version of the curved oriental blade.
D:Runes of war decorate its golden hilt.
-
-### Trapping Kits
-
-N:549:Arrow
-G:`:r
-I:46:2:0
-W:10:0:60:150
-A:10/2:50/2
-F:SHOW_MODS
-D:It must be loaded with arrows, which will be
-D:fired at the monster who triggers the trap.
-
-N:550:Bolt
-G:`:o
-I:46:3:0
-W:20:0:220:300
-A:20/2:50/2
-F:SHOW_MODS
-D:It must be loaded with crossbow bolts, which will
-D:be fired at the monster who triggers the trap.
-
N:551:& Fauchard~
G:/:s
I:22:6:0
@@ -5028,17 +4960,6 @@ D:This is a two-edged dagger with a long blade. A favourite among travellers
D:and warriors alike, it can be worn comfortably with plain clothes
D:as well as armour.
-### Trapping Kits
-
-N:555:Catapult
-G:`:R
-I:46:1:0
-W:1:0:50:40
-A:1/2:20/2
-F:SHOW_MODS
-D:It must be loaded with sling bullets, which will
-D:be fired at the monster who triggers the trap.
-
N:556:& Ring Mail~
G:[:s
I:37:2:0
@@ -5075,16 +4996,6 @@ P:4:1d1:0:0:0
D:Heavy, multi-layered cloth sewn together to cover the body,
D:with extra padding between layers.
-### Trapping Kits
-
-N:560:Fumes
-G:`:G
-I:46:4:0
-W:2:0:20:50
-A:2/2:30/2
-D:It must be loaded with potions, which will splatter
-D:over the monster who triggers the trap.
-
N:561:& Stone and Hide Armour~
G:(:U
I:36:15:0
@@ -5093,32 +5004,6 @@ A:35/7
P:15:1d1:-1:0:0
D:A primitive armour made from a thick hide reinforced by stone shards.
-### Trapping Kits
-
-N:562:Magic
-G:`:g
-I:46:5:0
-W:5:0:20:50
-A:5/2:40/2
-F:IGNORE_ACID
-F:IGNORE_COLD
-F:IGNORE_ELEC
-F:IGNORE_FIRE
-D:It must be loaded with scrolls, which will release
-D:their spells at the monster who triggers the trap.
-
-N:563:Device
-G:`:v
-I:46:6:0
-W:20:0:20:50
-A:20/2:40/2:60/2
-F:IGNORE_ACID
-F:IGNORE_COLD
-F:IGNORE_ELEC
-F:IGNORE_FIRE
-D:It must be loaded with a magic device (wand, staff, or rod), which
-D:will fire its spell at the monster who triggers the trap.
-
N:564:Nothing
G:?:d
I:70:53:0
diff --git a/lib/edit/p_info.txt b/lib/edit/p_info.txt
index 8fdfb96e..dd78db25 100644
--- a/lib/edit/p_info.txt
+++ b/lib/edit/p_info.txt
@@ -78,9 +78,7 @@ C:k:+0:+400:Axe-mastery
C:k:+0:+400:Hafted-mastery
C:k:+0:+400:Polearm-mastery
C:k:+1000:+600:Archery
-C:k:+1000:+900:Sneakiness
C:k:+0000:+400:Stealth
-C:k:+1000:+900:Disarming
C:k:+1000:+300:Magic
C:k:+1000:+400:Spirituality
C:k:+0:+550:Antimagic
@@ -169,8 +167,6 @@ C:a:k:=0:=0:Axe-mastery
C:a:k:=0:=0:Hafted-mastery
C:a:k:=0:=0:Polearm-mastery
C:a:k:+1000:-200:Archery
-C:a:k:+1000:+900:Sneakiness
-C:a:k:+1000:+900:Disarming
C:a:k:+1000:+400:Magic
C:a:k:+1000:+300:Spirituality
C:a:k:=0:=0:Antimagic
@@ -216,7 +212,6 @@ C:k:+0:+700:Thaumaturgy
C:k:+1000:+550:Spirituality
C:k:+1000:+200:Combat
C:k:+700:+500:Weaponmastery
-C:k:+1000:+900:Sneakiness
C:k:+0000:+400:Stealth
C:b:1:Perfect casting
C:g:All Gods
@@ -358,9 +353,7 @@ C:k:+0:+300:Crossbow-mastery
C:k:+0:+300:Sling-mastery
C:k:+0:+300:Boomerang-mastery
C:k:+0:%150:Boulder-throwing
-C:k:+1000:+900:Sneakiness
C:k:+0000:+400:Stealth
-C:k:+1000:+900:Disarming
C:k:+1000:+300:Magic
C:k:+0:+100:Magic-Device
C:k:+1000:+400:Spirituality
@@ -388,8 +381,6 @@ C:a:k:+0:+400:Magic
C:a:k:+0:+500:Nature
C:a:k:+0:+500:Divination
C:a:k:+0:+500:Conveyance
-C:a:k:+0:+700:Disarming
-C:a:k:+0:+50:Sneakiness
C:a:k:+0:+200:Monster-lore
C:a:O:19:12:1d1
C:a:O:17:1:10d3
@@ -401,7 +392,7 @@ C:a:g:Yavanna Kementari
C:N:3:2:Rogue
C:D:0:Rogues are masters of tricks. They can steal from shops and monsters,
-C:D:0:and lure monsters into deadly monster traps.
+C:D:0:and excel at stealthily exploring the dungeon.
C:D:1:Cutpurse
C:D:1:Robber
C:D:1:Burglar
@@ -460,9 +451,7 @@ C:k:+0:+500:Conveyance
C:k:+0:+500:Divination
C:k:+0:+500:Temporal
C:k:+1000:+700:Spirituality
-C:k:+1000:+2000:Sneakiness
C:k:+1000:+1500:Stealth
-C:k:+1000:+2000:Disarming
C:k:+1000:+1000:Backstab
C:k:+1000:+2000:Stealing
C:k:+1000:+2000:Dodging
@@ -472,8 +461,6 @@ C:b:10:Extra Max Blow(1)
C:a:N:Rogue
C:a:D:Rogues are masters of tricks. They can steal from shops and monsters,
C:a:D:and lure monsters into deadly monster traps.
-C:a:b:1:Trapping
-C:a:O:46:1:1d1
C:a:N:Assassin
C:a:D:Assassins are stealthy killers.
@@ -487,7 +474,6 @@ C:a:k:+0:-400:Conveyance
C:a:k:+0:-400:Divination
C:a:k:+0:-300:Temporal
C:a:k:+0:+500:Stealth
-C:a:k:+0:-1000:Disarming
C:a:k:+0:+1000:Backstab
C:a:k:+0:-1800:Stealing
C:a:k:+0:-800:Magic-Device
@@ -513,9 +499,7 @@ C:k:+1000:+700:Weaponmastery
C:k:+1000:+700:Archery
C:k:+1000:+700:Barehand-combat
C:k:+0:+600:Magic
-C:k:+1000:+700:Sneakiness
C:k:+1000:+700:Stealth
-C:k:+1000:+700:Disarming
C:k:+1000:+700:Spirituality
C:k:+1000:+600:Monster-lore
C:k:+0:+500:Possession
@@ -544,7 +528,6 @@ C:a:k:+0:-100:Combat
C:a:k:+0:-100:Weaponmastery
C:a:k:+0:-300:Archery
C:a:k:-1000:-700:Barehand-combat
-C:a:k:+0:-200:Disarming
C:a:k:+0:-200:Spirituality
C:a:k:+1000:+300:Possession
C:a:k:+0:+200:Corpse-preservation
@@ -562,7 +545,6 @@ C:a:k:+0:+100:Combat
C:a:k:+0:+100:Weaponmastery
C:a:k:+0:-100:Barehand-combat
C:a:k:+1000:+100:Magic
-C:a:k:+0:+100:Sneakiness
C:a:k:+0:+100:Stealth
C:a:k:+0:-200:Spirituality
C:a:k:+0:-400:Possession
@@ -580,7 +562,6 @@ C:a:k:+0:+100:Combat
C:a:k:+0:+100:Weaponmastery
C:a:k:+0:-100:Barehand-combat
C:a:k:+1000:+100:Magic
-C:a:k:+0:+100:Sneakiness
C:a:k:+0:+100:Stealth
C:a:k:+0:-200:Spirituality
C:a:k:+0:-400:Possession
@@ -599,9 +580,7 @@ C:a:k:+0:-100:Weaponmastery
C:a:k:+0:-300:Archery
C:a:k:-1000:-700:Barehand-combat
C:a:k:+1000:+200:Magic
-C:a:k:+0:+0:Sneakiness
C:a:k:+0:+0:Stealth
-C:a:k:+0:-200:Disarming
C:a:k:+0:-200:Spirituality
C:a:k:+15000:+100:Monster-lore
C:a:k:+0:-500:Possession
@@ -620,9 +599,7 @@ C:a:k:-1000:-400:Weaponmastery
C:a:k:-1000:-300:Archery
C:a:k:+0:+200:Barehand-combat
C:a:k:+0:+0:Magic
-C:a:k:+0:+200:Sneakiness
C:a:k:+0:+200:Stealth
-C:a:k:+0:+200:Disarming
C:a:k:+0:+200:Spirituality
C:a:k:+0:-400:Possession
C:a:k:+0:-200:Corpse-preservation
@@ -644,7 +621,6 @@ C:a:O:14:59:1d1
C:a:k:+1000:+0:Magic
C:a:k:-1000:-700:Archery
C:a:k:+0:-100:Barehand-combat
-C:a:k:+0:-100:Disarming
C:a:k:+0:+100:Spirituality
C:a:k:+0:-500:Possession
C:a:k:+0:-100:Summoning
@@ -679,8 +655,6 @@ C:k:+1000:+1000:Spirituality
C:k:+1000:+700:Prayer
C:k:+2000:+700:Combat
C:k:+1000:+700:Weaponmastery
-C:k:+1000:+900:Sneakiness
-C:k:+0000:+900:Disarming
C:k:+0000:+400:Stealth
C:k:+0:+50:Magic-Device
C:b:1:Perfect casting
@@ -748,7 +722,6 @@ C:a:g:Yavanna Kementari
C:a:k:+0:-300:Prayer
C:a:k:+0:-200:Necromancy
C:a:k:+1000:+300:Mindcraft
-C:a:k:+0:+200:Sneakiness
C:a:k:+0:+100:Magic-Device
@@ -802,11 +775,9 @@ R:C:Priest
R:C:Rogue
R:C:Warrior
R:G:ELF
-R:k:+200:+000:Disarming
R:k:+300:+000:Magic-Device
R:k:+1500:+000:Spirituality
R:k:+1000:+000:Stealth
-R:k:+600:+000:Sneakiness
R:k:-100:+000:Weaponmastery
R:k:+500:+000:Archery
@@ -825,11 +796,9 @@ R:C:Mage
R:C:Priest
R:C:Warrior
R:G:ELF
-R:k:+500:+000:Disarming
R:k:+600:+000:Magic-Device
R:k:+3000:+000:Spirituality
R:k:+2000:+000:Stealth
-R:k:+800:+000:Sneakiness
R:k:-500:+000:Weaponmastery
R:k:+1500:+000:Archery
@@ -850,11 +819,9 @@ R:C:Mage
R:C:Rogue
R:C:Warrior
R:k:+0:+300:Sling-mastery
-R:k:+1500:+000:Disarming
R:k:+1800:+000:Magic-Device
R:k:+9000:+000:Spirituality
R:k:+5000:+000:Stealth
-R:k:+1200:+000:Sneakiness
R:k:-1000:+000:Weaponmastery
R:k:+2000:+000:Archery
@@ -870,11 +837,9 @@ R:F:FREE_ACT
R:C:Mage
R:C:Rogue
R:C:Warrior
-R:k:+1000:+000:Disarming
R:k:+1200:+000:Magic-Device
R:k:+6000:+000:Spirituality
R:k:+3000:+000:Stealth
-R:k:+600:+000:Sneakiness
R:k:-800:+000:Weaponmastery
R:k:+1200:+000:Archery
@@ -890,11 +855,9 @@ R:F:RES_BLIND
R:C:Priest
R:C:Warrior
R:k:+0:+200:Axe-mastery
-R:k:+200:+000:Disarming
R:k:+900:+000:Magic-Device
R:k:+5000:+000:Spirituality
R:k:-1000:+000:Stealth
-R:k:+700:+000:Sneakiness
R:k:+1500:+000:Weaponmastery
R:k:+500:+000:Archery
@@ -910,11 +873,9 @@ R:C:Archer
R:C:Priest
R:C:Rogue
R:C:Warrior
-R:k:-300:+000:Disarming
R:k:-300:+000:Magic-Device
R:k:-1000:+000:Spirituality
R:k:-1000:+000:Stealth
-R:k:+000:+000:Sneakiness
R:k:+1200:+000:Weaponmastery
R:k:-500:+000:Archery
@@ -930,11 +891,9 @@ R:F:SUST_STR
R:R:15:0
R:F:REGEN
R:C:Warrior
-R:k:-500:+000:Disarming
R:k:-800:+000:Magic-Device
R:k:-4000:+000:Spirituality
R:k:-2000:+000:Stealth
-R:k:-100:+000:Sneakiness
R:k:+2000:+000:Weaponmastery
R:k:-1000:+000:Archery
@@ -953,11 +912,9 @@ R:C:Mage
R:C:Priest
R:C:Rogue
R:C:Warrior
-R:k:+400:+000:Disarming
R:k:+500:+000:Magic-Device
R:k:+2500:+000:Spirituality
R:k:+2000:+000:Stealth
-R:k:+800:+000:Sneakiness
R:k:+1500:+000:Weaponmastery
R:k:+1000:+000:Archery
@@ -977,11 +934,9 @@ R:C:Loremaster
R:C:Mage
R:C:Priest
R:C:Warrior
-R:k:+400:+000:Disarming
R:k:+2000:+000:Magic-Device
R:k:+10000:+000:Spirituality
R:k:+4000:+000:Stealth
-R:k:+300:+000:Sneakiness
R:k:+1000:+000:Weaponmastery
R:k:+2500:+000:Archery
@@ -997,11 +952,9 @@ R:F:RES_DARK
R:F:SUST_STR
R:C:Priest
R:C:Warrior
-R:k:-300:+000:Disarming
R:k:-500:+000:Magic-Device
R:k:-2500:+000:Spirituality
R:k:-2000:+000:Stealth
-R:k:-100:+000:Sneakiness
R:k:+2000:+000:Weaponmastery
R:k:+000:+000:Archery
@@ -1020,11 +973,9 @@ R:C:Loremaster
R:C:Rogue
R:C:Warrior
R:k:+1000:+1000:Bearform-combat
-R:k:-600:+000:Disarming
R:k:-800:+000:Magic-Device
R:k:-3000:+000:Spirituality
R:k:-2000:+000:Stealth
-R:k:-100:+000:Sneakiness
R:k:+2500:+000:Weaponmastery
R:k:+500:+000:Archery
@@ -1039,11 +990,9 @@ R:F:RES_POIS
R:C:Archer
R:C:Rogue
R:C:Warrior
-R:k:-200:+000:Disarming
R:k:-300:+000:Magic-Device
R:k:-1000:+000:Spirituality
R:k:-1000:+000:Stealth
-R:k:+100:+000:Sneakiness
R:k:+1000:+000:Weaponmastery
R:k:-800:+000:Archery
@@ -1059,11 +1008,9 @@ R:F:RES_DARK
R:F:RES_DISEN
R:C:Rogue
R:C:Warrior
-R:k:+300:+000:Disarming
R:k:+500:+000:Magic-Device
R:k:+5000:+000:Spirituality
R:k:+1000:+000:Stealth
-R:k:+500:+000:Sneakiness
R:k:+000:+000:Weaponmastery
R:k:+000:+000:Archery
@@ -1086,11 +1033,9 @@ R:C:Rogue
R:C:Warrior
R:G:ELF
R:k:+0:+200:Magic
-R:k:+500:+000:Disarming
R:k:+1500:+000:Magic-Device
R:k:+10000:+000:Spirituality
R:k:+3000:+000:Stealth
-R:k:+800:+000:Sneakiness
R:k:-500:+000:Weaponmastery
R:k:+1000:+000:Archery
@@ -1121,11 +1066,9 @@ R:O:70:32:2d3
R:b:1:Tree walking
R:k:+0:+200:Barehand-combat
R:k:+0:+600:Boulder-throwing
-R:k:+500:+000:Disarming
R:k:+500:+000:Magic-Device
R:k:+10000:+000:Spirituality
R:k:-6000:+000:Stealth
-R:k:+500:+000:Sneakiness
R:k:-300:+000:Weaponmastery
R:k:-200:+000:Archery
@@ -1158,14 +1101,11 @@ R:R:45:1
R:F:SPEED
R:C:Priest
R:C:Warrior
-R:k:+1000:+000:Disarming
R:k:+500:+000:Magic-Device
R:k:+2500:+000:Spirituality
R:k:-8000:+000:Stealth
-R:k:+100:+000:Sneakiness
R:k:+100:+200:Weaponmastery
R:k:+500:+000:Archery
-
R:N:17:Thunderlord
R:D:A thunderlord is a Great Eagle of Manwe, ridden by a Maia of Manwe.
R:D:They carry the power of wind and thunder.
@@ -1193,11 +1133,9 @@ R:C:Archer
R:C:Mage
R:C:Priest
R:C:Warrior
-R:k:+600:+000:Disarming
R:k:+000:+000:Magic-Device
R:k:+5000:+000:Spirituality
R:k:-16000:+000:Stealth
-R:k:+3000:+000:Sneakiness
R:k:+1500:+000:Weaponmastery
R:k:+500:+000:Archery
@@ -1217,11 +1155,9 @@ R:F:RES_NEXUS
R:C:Mage
R:C:Priest
R:k:+0:+200:Necromancy
-R:k:+1500:+000:Disarming
R:k:-500:+000:Magic-Device
R:k:+7500:+000:Spirituality
R:k:+25000:+000:Stealth
-R:k:+000:+000:Sneakiness
R:k:+2500:+000:Weaponmastery
R:k:+2500:+000:Archery
@@ -1236,11 +1172,9 @@ R:C:Mage
R:C:Priest
R:C:Rogue
R:C:Warrior
-R:k:-500:+000:Disarming
R:k:-500:+000:Magic-Device
R:k:-2500:+000:Spirituality
R:k:-5000:+000:Stealth
-R:k:-500:+000:Sneakiness
R:k:-500:+000:Weaponmastery
R:k:-500:+000:Archery
@@ -1262,11 +1196,9 @@ R:C:Warrior
R:G:ELF
R:k:+0:+200:Archery
R:b:1:Tree walking
-R:k:+500:+000:Disarming
R:k:+600:+000:Magic-Device
R:k:+3000:+000:Spirituality
R:k:+5000:+000:Stealth
-R:k:+800:+000:Sneakiness
R:k:-2500:+000:Weaponmastery
R:k:+4000:+000:Archery
@@ -1340,12 +1272,10 @@ R:F:WIS
R:C:Archer
R:C:Mage
R:C:Warrior
-R:k:+000:+000:Disarming
R:k:+000:+000:Magic-Device
R:k:+000:+000:Spirituality
R:k:=0:=0:Prayer
R:k:+000:+000:Stealth
-R:k:+000:+000:Sneakiness
R:k:+000:+000:Weaponmastery
R:k:+000:+000:Archery
@@ -1465,11 +1395,9 @@ S:F:RES_POIS
S:F:SEE_INVIS
S:F:SLOW_DIGEST
S:O:70:32:2d3
-S:k:+200:+000:Disarming
S:k:+800:+000:Magic-Device
S:k:+700:+000:Spirituality
S:k:+2000:+000:Stealth
-S:k:+200:+000:Sneakiness
S:k:-500:+000:Weaponmastery
S:k:-200:+000:Archery
@@ -1509,11 +1437,9 @@ S:F:SEE_INVIS
S:R:10:0
S:F:RES_COLD
S:O:70:32:2d3
-S:k:-500:+000:Disarming
S:k:-500:+000:Magic-Device
S:k:+500:+000:Spirituality
S:k:-1000:+000:Stealth
-S:k:-100:+000:Sneakiness
S:k:+800:+000:Weaponmastery
S:k:+000:+000:Archery
@@ -1552,11 +1478,9 @@ S:F:SLOW_DIGEST
S:R:5:0
S:F:RES_COLD
S:O:70:32:2d3
-S:k:-200:+000:Disarming
S:k:-200:+000:Magic-Device
S:k:+500:+000:Spirituality
S:k:-1000:+000:Stealth
-S:k:-100:+000:Sneakiness
S:k:+500:+000:Weaponmastery
S:k:+000:+000:Archery
@@ -1574,11 +1498,9 @@ S:A:Troll
S:C:F:Mage
S:R:10:0
S:F:RES_FEAR
-S:k:-200:+000:Disarming
S:k:-1000:+000:Magic-Device
S:k:+200:+000:Spirituality
S:k:-2000:+000:Stealth
-S:k:+000:+000:Sneakiness
S:k:+1200:+000:Weaponmastery
S:k:+500:+000:Archery
@@ -1607,11 +1529,9 @@ S:A:Wood-Elf
S:A:Yeek
S:C:F:Archer
S:C:F:Warrior
-S:k:+500:+000:Disarming
S:k:+1000:+000:Magic-Device
S:k:+500:+000:Spirituality
S:k:+3000:+000:Stealth
-S:k:+400:+000:Sneakiness
S:k:-500:+000:Weaponmastery
S:k:-500:+000:Archery
diff --git a/lib/edit/r_info.txt b/lib/edit/r_info.txt
index 9c9c852e..8af0e634 100644
--- a/lib/edit/r_info.txt
+++ b/lib/edit/r_info.txt
@@ -3059,7 +3059,6 @@ S:BA_POIS
S:BO_COLD
S:HEAL
S:SLOW
-S:TRAPS
D:He's been spying for Saruman. He is a snivelling wretch with no morals.
N:138:Robin Hood, the Outlaw
@@ -3095,7 +3094,6 @@ F:ZANGBAND
S:1_IN_5
S:ARROW_2
S:HEAL
-S:TRAPS
D:The legendary archer steals from the rich (you qualify).
N:139:Nurgling
@@ -9384,7 +9382,6 @@ S:S_MONSTER
S:S_UNDEAD
S:TELE_AWAY
S:TELE_TO
-S:TRAPS
D:Nobody has ever seen It.
N:394:Banshee
@@ -9802,7 +9799,6 @@ S:SCARE
S:SLOW
S:S_KIN
S:S_UNDEAD
-S:TRAPS
D:He is out to have revenge on those who have desecrated his tomb.
N:410:Gwaihir the Windlord
@@ -10264,7 +10260,6 @@ S:CONF
S:HASTE
S:HOLD
S:SHRIEK
-S:TRAPS
D:This creature look like a pillar of rock. However, a closer
D:inspection reveals a glaring eye and powerful tentacles,
D:which crush its prey and feed it to the creature's hungry
@@ -11824,7 +11819,6 @@ S:HEAL
S:SCARE
S:SLOW
S:S_SPIDER
-S:TRAPS
D:Shelob is an enormous bloated spider, the last daughter of Ungoliant the
D:Unlight. Her poison is legendary, as is her ego. She normally guards the
D:pass through Cirith Ungol, but occasionally goes out foraging for food to
@@ -12316,7 +12310,6 @@ S:FORGET
S:HASTE
S:HOLD
S:SCARE
-S:TRAPS
D:An embodiment of all the cardinal vices, he beholds you scornfully.
N:498:Chaos master
@@ -12932,7 +12925,6 @@ F:TAKE_ITEM
S:1_IN_6
S:ARROW_2
S:BLINK
-S:TRAPS
D:Cool and confident, fast and lithe; protect your possessions quickly!
N:517:The Watcher in the Water
@@ -15484,7 +15476,6 @@ S:BO_ELEC
S:BO_FIRE
S:BO_ICEE
S:HEAL
-S:TRAPS
D:A Black Numenorean who usurped the throne of Gondor, he is treacherous and
D:evil.
@@ -16841,7 +16832,6 @@ S:S_DRAGON
S:S_MONSTER
S:S_UNDEAD
S:TELE_TO
-S:TRAPS
D:A human figure in robes, he moves with magically improved speed, and his
D:hands are ablur with spell casting.
@@ -19050,7 +19040,6 @@ S:BLINK
S:CONF
S:TELE_TO
S:TPORT
-S:TRAPS
D:A class of its own: you are already too late to protect your possessions -
D:and he seems to have studied magic too, and is a master of setting traps.
@@ -20351,7 +20340,6 @@ F:TAKE_ITEM
F:UNIQUE
S:1_IN_6
S:S_BUG
-S:TRAPS
D:He may not code worth a dime, but he certainly knows how to make money.
N:733:Santa Claus
@@ -20402,7 +20390,6 @@ S:S_HI_UNDEAD
S:S_UNDEAD
S:S_UNIQUE
S:TELE_AWAY
-S:TRAPS
D:Why would anybody want to kill Santa Claus? To get all the presents,
D:of course!
@@ -20638,7 +20625,6 @@ S:S_HI_DRAGON
S:S_MONSTER
S:S_UNDEAD
S:TELE_TO
-S:TRAPS
D:A human figure in robes, he moves with magically improved speed, and his
D:hands are ablur with spell casting. You stagger at the mighty sound of his
D:spells as they echo hollowly through the dungeon.
@@ -21138,7 +21124,6 @@ S:CAUSE_4
S:MIND_BLAST
S:SLOW
S:S_UNDEAD
-S:TRAPS
D:A glowing skull possessed by sorcerous power. It need not move, but
D:merely blast you with mighty magic.
@@ -22137,7 +22122,6 @@ S:S_HI_DRAGON
S:S_UNDEAD
S:TELE_AWAY
S:TPORT
-S:TRAPS
D:Originally known as the White, Saruman fell prey to Sauron's wiles. He
D:searches forever for the One Ring, to become a mighty Sorcerer-King of the
D:world.
@@ -22170,7 +22154,6 @@ F:TAKE_ITEM
F:UNIQUE
S:1_IN_6
S:TELE_TO
-S:TRAPS
D:He is a master of disguise, an expert of stealth, a genius at traps, and
D:moves with blinding speed. Check your pockets!
@@ -23511,7 +23494,6 @@ S:S_KIN
S:S_MONSTERS
S:S_UNDEAD
S:TELE_TO
-S:TRAPS
D:A stench of corruption and decay surrounds this sorcerer, who has clearly
D:risen from the dead to continue his foul plots and schemes.
@@ -24165,7 +24147,6 @@ S:HOLD
S:S_HI_DEMON
S:S_HI_UNDEAD
S:TELE_TO
-S:TRAPS
D:The Mouth of Sauron is a mighty spell caster. So old that even he cannot
D:remember his own name, his power and evil are undeniable. He believes
D:unshakeably that he is unbeatable and laughs as he weaves his awesome
@@ -24218,7 +24199,6 @@ S:HAND_DOOM
S:HOLD
S:S_HI_UNDEAD
S:TELE_TO
-S:TRAPS
D:The dark master of the terrible fortress of southern Mirkwood. It is
D:rumoured that this is in fact none other than Sauron in disguise:
D:although if this is so, he has yet to reveal his full power - and perhaps
@@ -26366,7 +26346,6 @@ S:S_RNG
S:S_THUNDERLORD
S:TELE_TO
S:TPORT
-S:TRAPS
D:He is the master of coding; none can match his skill. He created the
D:Variant Maintainer, the RNGs, and the software bugs. Bull Gates is
D:nothing next to him. Do not think that since he loves the novels of
@@ -28273,7 +28252,6 @@ S:S_KIN
S:S_MONSTERS
S:TELE_AWAY
S:TPORT
-S:TRAPS
D:The wizard who opposed Sauron and, in the end, was the only
D:one of the Istari to succeed in his task. Gandalf is very
D:wise and specialises in fire magic.
@@ -29844,7 +29822,6 @@ S:S_ANGEL
S:S_UNIQUE
S:TELE_TO
S:TPORT
-S:TRAPS
D:A woman of mind-shattering beauty, none can match her beauty. She is perfect,
D:and totally evil. She loves nothing but herself and her evil is as
D:great as her beauty. No one can stand against her, even DarkGod.
@@ -31914,7 +31891,6 @@ S:SCARE
S:SHRIEK
S:S_KIN
S:S_MONSTER
-S:TRAPS
D:A strange creature that disguises itself as an object to lure
D:unsuspecting adventurers within reach of its venomous claws.
@@ -32364,7 +32340,6 @@ S:HEAL
S:SCARE
S:SHRIEK
S:TELE_AWAY
-S:TRAPS
D:Hopefully you will kill this spirit before you realise it exists.
# Spirit of ickyness
@@ -32616,7 +32591,6 @@ S:ARROW_3
S:BLINK
S:CONF
S:TELE_TO
-S:TRAPS
D:There is something attractive about this spirit, and it seems
D:to have a full purse.
diff --git a/lib/edit/re_info.txt b/lib/edit/re_info.txt
index 2b111067..9b89f19d 100644
--- a/lib/edit/re_info.txt
+++ b/lib/edit/re_info.txt
@@ -284,7 +284,6 @@ S:HEAL
S:HOLD
S:S_MONSTER
S:TPORT
-S:TRAPS
N:10:Archer
G:*:W
diff --git a/lib/edit/s_info.txt b/lib/edit/s_info.txt
index b6c195dc..d708f177 100644
--- a/lib/edit/s_info.txt
+++ b/lib/edit/s_info.txt
@@ -338,19 +338,10 @@ E:Thaumaturgy:Antimagic
################################## SNEAKINESS SKILLS ###############################
-N:35:Sneakiness
-D:General ability at the sneakiness skills.
-D:It also affects the searching abilities
-F:RANDOM_GAIN
-
N:36:Stealth
D:Ability to move unnoticed, silently
F:RANDOM_GAIN
-N:37:Disarming
-D:Ability to disarm the various traps
-F:RANDOM_GAIN
-
N:40:Stealing
D:Ability to steal objects
A:15:Steal object
@@ -359,11 +350,9 @@ N:46:Dodging
D:Ability to dodge blows and bolts
A:16:Check dodge chance
-f:Stealth:Sneakiness%15
-f:Disarming:Sneakiness%10
-f:Backstab:Sneakiness%5
-f:Stealing:Sneakiness%15
-f:Dodging:Sneakiness%10
+f:Backstab:Stealth%5
+f:Stealing:Stealth%15
+f:Dodging:Stealth%10
################################## MONSTER SKILLS ################################
@@ -426,12 +415,10 @@ T:Combat:Bearform-combat
T:Combat:Boulder-throwing
T:Combat:Antimagic
-T:Main:Sneakiness
-T:Sneakiness:Stealth
-T:Sneakiness:Disarming
-T:Sneakiness:Backstab
-T:Sneakiness:Stealing
-T:Sneakiness:Dodging
+T:Main:Stealth
+T:Stealth:Backstab
+T:Stealth:Stealing
+T:Stealth:Dodging
T:Main:Magic
T:Magic:Magic-Device
diff --git a/lib/edit/st_info.txt b/lib/edit/st_info.txt
index f2e6f281..b5ae29cf 100644
--- a/lib/edit/st_info.txt
+++ b/lib/edit/st_info.txt
@@ -165,7 +165,6 @@ I:100:Monster Confusion
I:100:Magic Mapping
I:100:Treasure Detection
I:100:Object Detection
-I:100:Trap Detection
I:100:Detect Invisible
I:100:Recharging
I:100:Satisfy Hunger
diff --git a/lib/help/debug.txt b/lib/help/debug.txt
index 5328af35..8aea13ee 100644
--- a/lib/help/debug.txt
+++ b/lib/help/debug.txt
@@ -29,7 +29,7 @@ will not be scored if you use debug commands.
*****debug.txt*29[o Edit object attributes] O (unused)
*****debug.txt*31[p Phase door] P (unused)
*****debug.txt*33[q Get a quest] Q (unused)
- r (unused) *****debug.txt*36[R Create a trap]
+ r (unused) R (unused)
*****debug.txt*37[s Summon monster] *****debug.txt*38[S Change the feature of the map]
*****debug.txt*39[t Teleport] *****debug.txt*40[T Teleport to a town]
*****debug.txt*41[u Complete map] *****debug.txt*42[U Become undead]
@@ -105,7 +105,7 @@ maximal legal value.
For example : 03^AC will create the Arkenstone of Thrane (+3)
~~~~~7
[[[[[GDetect all (d)]
- Sense ways out/monsters/objects/traps.
+ Sense ways out/monsters/objects.
~~~~~8
[[[[[GTeleport to the wilderness (D)]
From a dungeon this will teleport you to the wilderness level
@@ -179,11 +179,6 @@ maximal legal value.
~~~~~35
[[[[[GGain reward (r)]
Some high being grants you a reward.
-~~~~~36
-[[[[[GCreate a trap (R)]
- Use the "Command count", aka 0, to specify a number from
- tr_info.txt to put a trap on the ground where you are
- standing.
~~~~~37
[[[[[GSummon monster (s)]
Summon a random monster, next to where you stand.
diff --git a/lib/mods/theme/edit/a_info.txt b/lib/mods/theme/edit/a_info.txt
index b822ab60..65e931c1 100644
--- a/lib/mods/theme/edit/a_info.txt
+++ b/lib/mods/theme/edit/a_info.txt
@@ -3725,53 +3725,6 @@ D:This helm, designed by Petty-Dwarves ages ago to act as the brain of a
D:long lost project, is made of finest glass. Its light banishes all secrets,
D:and makes audible whispers from the deceased.
-
-### Trapping Kits ###
-
-# The Catapult Trap Set of the Edain
-
-N:161:of the Edain
-I:46:3:3
-W:20:10:40:20000
-P:0:0d0:25:15:30
-F:AUTOMATIC_99
-F:HIDE_TYPE
-F:STEALTH
-F:XTRA_MIGHT
-D:A trap that can almost never be detected. Its missiles may be mere pebbles,
-D:but fired at an incredibly high velocity to penetrate even the toughest
-D:hide or armour.
-
-# The Device Trap Set of the Noegyth Nibin
-
-N:162:of the Noegyth Nibin
-I:46:6:3
-W:20:20:40:20000
-P:0:0d0:0:0:25
-F:AUTOMATIC_99
-F:HIDE_TYPE
-F:STEALTH
-F:TELEPORT_TO
-F:XTRA_SHOTS
-D:A magical trap, armed with a wand. Unaccountably, its victims keep
-D:on coming back for more...
-
-# The Bolt Trap Set of the Naugrim
-
-N:163:of the Naugrim
-I:46:2:2
-W:20:20:200:20000
-P:0:0d0:17:27:37
-F:HIDE_TYPE
-F:ONLY_DEMON
-F:STEALTH
-F:XTRA_MIGHT
-F:XTRA_SHOTS
-D:A snare set not for animals, or people, but for demons alone, and
-D:enchanted so that whenever the demon sets foot or claw into the
-D:(hidden) pentagram, its hide is immediately pierced by many magical
-D:crossbow bolts.
-
# The Broken Sword 'Narsil'
N:164:'Narsil'
diff --git a/lib/mods/theme/edit/ab_info.txt b/lib/mods/theme/edit/ab_info.txt
index ec878c67..579368f4 100644
--- a/lib/mods/theme/edit/ab_info.txt
+++ b/lib/mods/theme/edit/ab_info.txt
@@ -84,13 +84,6 @@ A:102:Far reaching attack
k:15:Combat
k:15:Polearm-mastery
-N:9:Trapping
-D:Ability to set monster traps
-D:Prereq: Disarming@15
-I:10
-A:14:Set trap
-k:15:Disarming
-
N:10:Undead Form
D:Ability to turn into a weak undead being when you "die".
D:You must then kill enough monsters to absorb enough life energy
diff --git a/lib/mods/theme/edit/d_info.txt b/lib/mods/theme/edit/d_info.txt
index 149c2a73..0f8680af 100644
--- a/lib/mods/theme/edit/d_info.txt
+++ b/lib/mods/theme/edit/d_info.txt
@@ -344,7 +344,6 @@ S:BR_CONF
S:CONF
S:FORGET
S:MULTIPLY
-S:TRAPS
# The Maze
# Levels 25-37
diff --git a/lib/mods/theme/edit/e_info.txt b/lib/mods/theme/edit/e_info.txt
index c17a589d..9fe63b5d 100644
--- a/lib/mods/theme/edit/e_info.txt
+++ b/lib/mods/theme/edit/e_info.txt
@@ -2179,150 +2179,6 @@ R:1
F:PVAL_M3
F:PVAL_M5
-
-### Trapping Kits ###
-
-N:151:of Extra Might
-X:A:0:5
-T:46:1:3
-W:0:1:10:1000
-C:20:20:0:2
-R:100
-F:XTRA_MIGHT
-f:XTRA_MIGHT
-
-N:152:of Extra Shots
-X:A:0:10
-T:46:0:99
-W:0:1:10:2000
-C:20:20:0:3
-R:100
-F:XTRA_SHOTS
-f:XTRA_SHOTS
-
-N:153:Automatic
-X:B:0:15
-T:46:0:99
-W:0:1:10:3000
-C:10:10:0:0
-R:100
-F:AUTOMATIC_5
-F:IGNORE_ACID
-F:IGNORE_COLD
-F:IGNORE_ELEC
-F:IGNORE_FIRE
-f:AUTOMATIC_5
-
-N:154:Fully Automatic
-X:B:0:15
-T:46:0:99
-W:0:1:15:5000
-C:10:10:0:0
-R:100
-F:AUTOMATIC_99
-F:IGNORE_ACID
-F:IGNORE_COLD
-F:IGNORE_ELEC
-F:IGNORE_FIRE
-f:AUTOMATIC_99
-
-N:155:Well-hidden
-X:B:0:5
-T:46:0:99
-W:0:1:8:1000
-C:15:15:5:12
-R:100
-F:HIDE_TYPE
-F:IGNORE_ACID
-F:IGNORE_COLD
-F:IGNORE_ELEC
-F:IGNORE_FIRE
-F:STEALTH
-f:STEALTH
-
-N:156:Complicated
-X:B:0:10
-T:46:0:99
-W:0:1:12:2000
-C:15:15:30:0
-R:100
-F:IGNORE_ACID
-F:IGNORE_COLD
-F:IGNORE_ELEC
-F:IGNORE_FIRE
-
-N:157:Obvious
-X:B:0:0
-T:46:0:99
-W:0:1:1:0
-C:-20:-20:-20:-20
-R:100
-F:CURSED
-F:HIDE_TYPE
-F:STEALTH
-f:STEALTH
-
-N:158:for Dragons
-X:A:0:5
-T:46:0:99
-W:0:3:10:500
-C:20:20:10:4
-R:100
-F:HIDE_TYPE
-F:IGNORE_ACID
-F:IGNORE_FIRE
-F:ONLY_DRAGON
-F:STEALTH
-F:XTRA_SHOTS
-
-N:159:for Demons
-X:A:0:5
-T:46:0:99
-W:0:3:10:500
-C:20:20:10:4
-R:100
-F:HIDE_TYPE
-F:IGNORE_ACID
-F:IGNORE_FIRE
-F:ONLY_DEMON
-F:STEALTH
-F:XTRA_SHOTS
-
-N:160:for Animals
-X:A:0:5
-T:46:0:99
-W:0:3:10:500
-C:20:20:10:4
-R:100
-F:HIDE_TYPE
-F:ONLY_ANIMAL
-F:STEALTH
-F:XTRA_SHOTS
-
-N:161:for Undead
-X:A:0:5
-T:46:0:99
-W:0:3:10:500
-C:20:20:10:4
-R:100
-F:HIDE_TYPE
-F:KILL_GHOST
-F:ONLY_UNDEAD
-F:STEALTH
-F:XTRA_SHOTS
-
-N:162:for Evil
-X:A:0:5
-T:46:0:99
-W:0:3:10:500
-C:20:20:10:4
-R:100
-F:HIDE_TYPE
-F:KILL_GHOST
-F:ONLY_EVIL
-F:STEALTH
-F:XTRA_SHOTS
-
# Lite ego
N:163:of the Magi
X:A:0:0
diff --git a/lib/mods/theme/edit/k_info.txt b/lib/mods/theme/edit/k_info.txt
index a4c5d2db..30700595 100644
--- a/lib/mods/theme/edit/k_info.txt
+++ b/lib/mods/theme/edit/k_info.txt
@@ -1941,14 +1941,6 @@ A:0/1
D:This scroll shows nearby objects to you. It only makes you aware of items on the floor,
D:however, not those carried by creatures.
-N:194:Trap Detection
-G:?:d
-I:70:28:0
-W:5:0:5:35
-A:5/1:10/1
-D:This scroll is very helpful, because it reveals the locations of nearby snares and traps which you
-D:might otherwise blunder into.
-
##### Extra ammunition #####
N:195:& Sheaf Arrow~
@@ -2021,22 +2013,6 @@ W:5:0:5:0
A:5/1
D:This nasty scroll will make a loud noise when read, waking up foes in your vicinity.
-N:203:Trap Creation
-G:?:d
-I:70:7:0
-W:10:0:5:0
-A:10/1
-D:If you read this rather annoying scroll, snares and pitfalls will magically be planted all around
-D:you, ready to do nasty things to you once you walk onto them.
-
-N:204:Trap/Door Destruction
-G:?:d
-I:70:39:0
-W:10:0:5:50
-A:10/1
-D:A very specifically destructive spell is written on this scroll. It will smash all traps and all
-D:doors immediately next to you.
-
N:205:Artifact Creation
G:?:d
I:70:52:0
@@ -2908,13 +2884,6 @@ W:30:0:50:100
A:30/1
P:0:1d2:0:0:0
-N:307:Disarm
-G:_:d
-I:55:8:-1:SPELL=Disarm
-W:2:0:50:100
-A:2/1
-P:0:1d2:0:0:0
-
N:308:Teleportation
G:_:d
I:55:9:-1:SPELL=Teleportation
@@ -3265,18 +3234,6 @@ F:IGNORE_ELEC
F:IGNORE_FIRE
D:When fuelled with enough ambient mana, this rod can detect nearby passages.
-N:352:Trap Location
-G:-:d
-I:66:29:8
-W:5:0:15:100
-A:5/1:10/1:20/1
-P:0:1d1:0:0:0
-F:IGNORE_ACID
-F:IGNORE_COLD
-F:IGNORE_ELEC
-F:IGNORE_FIRE
-D:Zapping this rod will release a minor detection magic, alerting you of nearby pits and snares.
-
N:354:Recall
G:-:d
I:66:3:80
@@ -3412,18 +3369,6 @@ F:IGNORE_ELEC
F:IGNORE_FIRE
D:This rod of movement will displace its target to another location.
-N:365:Disarming
-G:-:d
-I:66:14:50
-W:35:0:15:2100
-A:35/1
-P:0:1d1:0:0:0
-F:IGNORE_ACID
-F:IGNORE_COLD
-F:IGNORE_ELEC
-F:IGNORE_FIRE
-D:This rod will clear a path for you, triggering and thus rendering harmless all traps on the way.
-
N:366:Lightning Balls
G:-:d
I:66:25:50
@@ -5000,26 +4945,6 @@ D:This is a larger version of the curved oriental blade.
D:Runes of war decorate its golden hilt.
-### Trapping Kits
-
-N:549:Arrow
-G:`:r
-I:46:2:0
-W:10:0:60:150
-A:10/2:50/2
-F:SHOW_MODS
-D:It must be loaded with arrows, which will be
-D:fired at the monster who triggers the trap.
-
-N:550:Bolt
-G:`:o
-I:46:3:0
-W:20:0:220:300
-A:20/2:50/2
-F:SHOW_MODS
-D:It must be loaded with crossbow bolts, which will
-D:be fired at the monster who triggers the trap.
-
N:551:& Fauchard~
G:/:s
I:22:6:0
@@ -5067,17 +4992,6 @@ D:This is a two-edged dagger with a long blade. A favourite among travellers
D:and warriors alike, because it can be worn comfortably with plain clothes
D:as well as armour.
-### Trapping Kits
-
-N:555:Catapult
-G:`:R
-I:46:1:0
-W:1:0:50:40
-A:1/2:20/2
-F:SHOW_MODS
-D:It must be loaded with sling bullets, which will
-D:be fired at the monster who triggers the trap.
-
N:556:& Ring Mail~
G:[:s
I:37:2:0
@@ -5116,16 +5030,6 @@ P:4:1d1:0:0:0
D:Heavy, multi-layered cloth sewn together to cover the body,
D:with extra padding between layers.
-### Trapping Kits
-
-N:560:Fumes
-G:`:G
-I:46:4:0
-W:2:0:20:50
-A:2/2:30/2
-D:It must be loaded with potions, which will splatter
-D:over the monster who triggers the trap.
-
N:561:& Golden Ring Mail~
G:(:y
I:36:15:0
@@ -5135,32 +5039,6 @@ P:8:1d4:-1:0:0
D:A suit of non-overlapping thin golden rings sewn onto a soft leather
D:backing. It looks beautiful, and is worn on special occasions.
-### Trapping Kits
-
-N:562:Magic
-G:`:g
-I:46:5:0
-W:5:0:20:50
-A:5/2:40/2
-F:IGNORE_ACID
-F:IGNORE_COLD
-F:IGNORE_ELEC
-F:IGNORE_FIRE
-D:It must be loaded with scrolls, which will release
-D:their spells at the monster who triggers the trap.
-
-N:563:Device
-G:`:v
-I:46:6:0
-W:20:0:20:50
-A:20/2:40/2:60/2
-F:IGNORE_ACID
-F:IGNORE_COLD
-F:IGNORE_ELEC
-F:IGNORE_FIRE
-D:It must be loaded with a magic device (wand, staff, or rod), which
-D:will fire its spell at the monster who triggers the trap.
-
# XXX
# XXX
# XXX
diff --git a/lib/mods/theme/edit/p_info.txt b/lib/mods/theme/edit/p_info.txt
index e1b06ca5..5cf09fea 100644
--- a/lib/mods/theme/edit/p_info.txt
+++ b/lib/mods/theme/edit/p_info.txt
@@ -78,9 +78,7 @@ C:k:+0:+400:Axe-mastery
C:k:+0:+400:Hafted-mastery
C:k:+0:+400:Polearm-mastery
C:k:+1000:+600:Archery
-C:k:+1000:+900:Sneakiness
C:k:+0000:+400:Stealth
-C:k:+1000:+900:Disarming
C:k:+1000:+300:Magic
C:k:+1000:+400:Spirituality
C:k:+0:+550:Antimagic
@@ -178,8 +176,6 @@ C:a:k:=0:=0:Axe-mastery
C:a:k:=0:=0:Hafted-mastery
C:a:k:=0:=0:Polearm-mastery
C:a:k:+1000:-200:Archery
-C:a:k:+1000:+900:Sneakiness
-C:a:k:+1000:+900:Disarming
C:a:k:+1000:+400:Magic
C:a:k:+1000:+300:Spirituality
C:a:k:=0:=0:Antimagic
@@ -241,7 +237,6 @@ C:k:+0:+700:Thaumaturgy
C:k:+1000:+550:Spirituality
C:k:+1000:+200:Combat
C:k:+700:+500:Weaponmastery
-C:k:+1000:+900:Sneakiness
C:k:+0000:+400:Stealth
C:b:1:Perfect casting
C:g:All Gods
@@ -421,9 +416,7 @@ C:k:+0:+300:Crossbow-mastery
C:k:+0:+300:Sling-mastery
C:k:+0:+300:Boomerang-mastery
C:k:+0:%150:Boulder-throwing
-C:k:+1000:+900:Sneakiness
C:k:+0000:+400:Stealth
-C:k:+1000:+900:Disarming
C:k:+1000:+300:Magic
C:k:+0:+100:Magic-Device
C:k:+1000:+400:Spirituality
@@ -451,8 +444,6 @@ C:a:k:+0:+200:Weaponmastery
C:a:k:+0:+400:Magic
C:a:k:+0:+500:Nature
C:a:k:+0:+500:Divination
-C:a:k:+0:+700:Disarming
-C:a:k:+0:+50:Sneakiness
C:a:k:+0:+200:Monster-lore
C:a:k:+0:+300:Summoning
C:a:O:19:12:1d1
@@ -467,15 +458,12 @@ C:a:g:Varda Elentari
C:a:g:Aule the Smith
C:a:g:Ulmo
C:a:g:Mandos
-C:a:b:1:Trapping
C:a:N:Sniper
C:a:D:Snipers are very stealthy archers without much hand-to-hand combat
C:a:D:ability, but with a penchant to disappear when it suits them.
C:a:k:+0:-300:Combat
-C:a:k:+1000:+100:Sneakiness
C:a:k:+1000:+700:Stealth
-C:a:k:+0:+100:Disarming
C:a:k:+1000:+700:Backstab
C:a:k:+0:+300:Magic
C:a:k:+1000:+500:Conveyance
@@ -485,7 +473,7 @@ C:a:g:All Gods
C:N:3:2:Rogue
C:D:0:Rogues are masters of tricks. They can steal from shops and monsters,
-C:D:0:and lure monsters into deadly monster traps.
+C:D:0:and excel at stealthily exploring the dungeon.
C:D:1:Cutpurse
C:D:1:Robber
C:D:1:Burglar
@@ -544,9 +532,7 @@ C:k:+0:+500:Conveyance
C:k:+0:+500:Divination
C:k:+0:+500:Temporal
C:k:+1000:+700:Spirituality
-C:k:+1000:+2000:Sneakiness
C:k:+1000:+1500:Stealth
-C:k:+1000:+2000:Disarming
C:k:+1000:+1000:Backstab
C:k:+1000:+2000:Stealing
C:k:+1000:+2000:Dodging
@@ -556,7 +542,6 @@ C:b:10:Extra Max Blow(1)
C:a:N:Rogue
C:a:D:Rogues are masters of tricks. They can steal from shops and monsters,
C:a:D:and lure monsters into deadly monster traps.
-C:a:b:1:Trapping
C:a:O:46:1:1d1
C:a:N:Assassin
@@ -571,7 +556,6 @@ C:a:k:+0:-400:Conveyance
C:a:k:+0:-400:Divination
C:a:k:+0:-300:Temporal
C:a:k:+0:+500:Stealth
-C:a:k:+0:-1000:Disarming
C:a:k:+0:+1000:Backstab
C:a:k:+0:-1800:Stealing
C:a:k:+0:-550:Magic-Device
@@ -610,9 +594,7 @@ C:k:+1000:+700:Weaponmastery
C:k:+1000:+700:Archery
C:k:+1000:+700:Barehand-combat
C:k:+0:+600:Magic
-C:k:+1000:+700:Sneakiness
C:k:+1000:+700:Stealth
-C:k:+1000:+700:Disarming
C:k:+1000:+700:Spirituality
C:k:+1000:+600:Monster-lore
C:k:+0:+500:Possession
@@ -641,7 +623,6 @@ C:a:k:+0:-100:Combat
C:a:k:+0:-100:Weaponmastery
C:a:k:+0:-300:Archery
C:a:k:-1000:-700:Barehand-combat
-C:a:k:+0:-200:Disarming
C:a:k:+0:-200:Spirituality
C:a:k:+1000:+300:Possession
C:a:k:+0:+200:Corpse-preservation
@@ -660,7 +641,6 @@ C:a:k:+0:+100:Combat
C:a:k:+0:+100:Weaponmastery
C:a:k:+0:-100:Barehand-combat
C:a:k:+1000:+100:Magic
-C:a:k:+0:+100:Sneakiness
C:a:k:+0:+100:Stealth
C:a:k:+0:-200:Spirituality
C:a:k:+0:-400:Possession
@@ -679,7 +659,6 @@ C:a:k:+0:+100:Combat
C:a:k:+0:+100:Weaponmastery
C:a:k:+0:-100:Barehand-combat
C:a:k:+1000:+100:Magic
-C:a:k:+0:+100:Sneakiness
C:a:k:+0:+100:Stealth
C:a:k:+0:-200:Spirituality
C:a:k:+0:-400:Possession
@@ -699,9 +678,7 @@ C:a:k:+0:-100:Weaponmastery
C:a:k:+0:-300:Archery
C:a:k:-1000:-700:Barehand-combat
C:a:k:+1000:+200:Magic
-C:a:k:+0:+0:Sneakiness
C:a:k:+0:+0:Stealth
-C:a:k:+0:-200:Disarming
C:a:k:+0:-200:Spirituality
C:a:k:+15000:+100:Monster-lore
C:a:k:+0:-500:Possession
@@ -721,9 +698,7 @@ C:a:k:-1000:-400:Weaponmastery
C:a:k:-1000:-300:Archery
C:a:k:+0:+200:Barehand-combat
C:a:k:+0:+0:Magic
-C:a:k:+0:+200:Sneakiness
C:a:k:+0:+200:Stealth
-C:a:k:+0:+200:Disarming
C:a:k:+0:+200:Spirituality
C:a:k:+0:-400:Possession
C:a:k:+0:-200:Corpse-preservation
@@ -746,7 +721,6 @@ C:a:O:14:59:1d1
C:a:k:+1000:+0:Magic
C:a:k:-1000:-700:Archery
C:a:k:+0:-100:Barehand-combat
-C:a:k:+0:-100:Disarming
C:a:k:+0:+100:Spirituality
C:a:k:+0:-500:Possession
C:a:k:+0:-100:Summoning
@@ -762,7 +736,6 @@ C:a:k:+0:+200:Combat
C:a:k:=0:=0:Weaponmastery
C:a:k:+0:+200:Barehand-combat
C:a:k:+1000:+1000:Antimagic
-C:a:k:+0:+200:Disarming
C:a:k:+0:+300:Stealth
C:a:k:+0:+1000:Dodging
C:a:k:=0:=0:Magic
@@ -807,10 +780,8 @@ C:k:=0:=0:Combat
C:k:=0:=0:Weaponmastery
C:k:=0:=0:Archery
C:k:=0:=0:Barehand-combat
-C:k:+0:+600:Sneakiness
C:k:+0:+600:Stealth
C:k:+1000:+700:Dodging
-C:k:+1000:+600:Disarming
C:k:+1000:+600:Magic
C:k:=0:=0:Magic-Device
C:k:+0:+500:Spell-power
@@ -824,14 +795,6 @@ C:k:=0:=0:Music
C:b:15:Perfect casting
C:g:All Gods
-C:a:N:Trapper
-C:a:D:These pacifists use traps to snare monsters, and
-C:a:D:make totems from corpses to summon aid.
-C:O:46:1:1d1
-C:a:k:+1000:+600:Summoning
-C:a:b:1:Trapping
-C:a:b:10:Ammo creation
-
C:a:N:Peace-mage
C:a:D:These pacifists use magic to escape danger, and
C:a:D:rely on symbiotic relationships to defend themselves.
@@ -869,8 +832,6 @@ C:k:+1000:+1000:Spirituality
C:k:+1000:+700:Prayer
C:k:+2000:+700:Combat
C:k:+1000:+700:Weaponmastery
-C:k:+1000:+900:Sneakiness
-C:k:+0000:+900:Disarming
C:k:+0000:+400:Stealth
C:k:+0:+50:Magic-Device
C:b:1:Perfect casting
@@ -942,7 +903,6 @@ C:a:g:Mandos
C:a:k:+0:-300:Prayer
C:a:k:+0:-200:Necromancy
C:a:k:+1000:+300:Mindcraft
-C:a:k:+0:+200:Sneakiness
C:a:k:+0:+100:Magic-Device
C:a:N:Stonewright
@@ -1039,11 +999,9 @@ R:C:Priest
R:C:Rogue
R:C:Warrior
R:G:ELF
-R:k:+200:+000:Disarming
R:k:+300:+000:Magic-Device
R:k:+1500:+000:Spirituality
R:k:+1000:+000:Stealth
-R:k:+600:+000:Sneakiness
R:k:-100:+000:Weaponmastery
R:k:+500:+000:Archery
@@ -1063,11 +1021,9 @@ R:C:Pacifist
R:C:Priest
R:C:Warrior
R:G:ELF
-R:k:+500:+000:Disarming
R:k:+600:+000:Magic-Device
R:k:+3000:+000:Spirituality
R:k:+2000:+000:Stealth
-R:k:+800:+000:Sneakiness
R:k:-500:+000:Weaponmastery
R:k:+1500:+000:Archery
@@ -1089,11 +1045,9 @@ R:C:Pacifist
R:C:Rogue
R:C:Warrior
R:k:+0:+300:Sling-mastery
-R:k:+1500:+000:Disarming
R:k:+1800:+000:Magic-Device
R:k:+9000:+000:Spirituality
R:k:+6000:+000:Stealth
-R:k:+1200:+000:Sneakiness
R:k:-1000:+000:Weaponmastery
R:k:+2000:+000:Archery
@@ -1110,11 +1064,9 @@ R:C:Mage
R:C:Pacifist
R:C:Rogue
R:C:Warrior
-R:k:+1000:+000:Disarming
R:k:+1200:+000:Magic-Device
R:k:+6000:+000:Spirituality
R:k:+3000:+000:Stealth
-R:k:+600:+000:Sneakiness
R:k:-800:+000:Weaponmastery
R:k:+1200:+000:Archery
@@ -1132,11 +1084,9 @@ R:C:Pacifist
R:C:Priest
R:C:Warrior
R:k:+0:+200:Axe-mastery
-R:k:+200:+000:Disarming
R:k:+900:+000:Magic-Device
R:k:+5000:+000:Spirituality
R:k:-1000:+000:Stealth
-R:k:+700:+000:Sneakiness
R:k:+1500:+000:Weaponmastery
R:k:+500:+000:Archery
@@ -1152,11 +1102,9 @@ R:C:Archer
R:C:Priest
R:C:Rogue
R:C:Warrior
-R:k:-300:+000:Disarming
R:k:-300:+000:Magic-Device
R:k:-1000:+000:Spirituality
R:k:-1000:+000:Stealth
-R:k:+000:+000:Sneakiness
R:k:+1200:+000:Weaponmastery
R:k:-500:+000:Archery
@@ -1172,11 +1120,9 @@ R:F:SUST_STR
R:R:15:0
R:F:REGEN
R:C:Warrior
-R:k:-500:+000:Disarming
R:k:-800:+000:Magic-Device
R:k:-4000:+000:Spirituality
R:k:-2000:+000:Stealth
-R:k:-100:+000:Sneakiness
R:k:+2000:+000:Weaponmastery
R:k:+0:+200:Hafted-mastery
R:k:-1000:+000:Archery
@@ -1197,11 +1143,9 @@ R:C:Pacifist
R:C:Priest
R:C:Rogue
R:C:Warrior
-R:k:+400:+000:Disarming
R:k:+500:+000:Magic-Device
R:k:+2500:+000:Spirituality
R:k:+2000:+000:Stealth
-R:k:+800:+000:Sneakiness
R:k:+1500:+000:Weaponmastery
R:k:+1000:+000:Archery
@@ -1222,11 +1166,9 @@ R:C:Mage
R:C:Pacifist
R:C:Priest
R:C:Warrior
-R:k:+400:+000:Disarming
R:k:+2000:+000:Magic-Device
R:k:+10000:+000:Spirituality
R:k:+4000:+000:Stealth
-R:k:+300:+000:Sneakiness
R:k:+1000:+000:Weaponmastery
R:k:+2500:+000:Archery
@@ -1243,11 +1185,9 @@ R:F:SUST_STR
R:C:Pacifist
R:C:Priest
R:C:Warrior
-R:k:-300:+000:Disarming
R:k:-500:+000:Magic-Device
R:k:-2500:+000:Spirituality
R:k:-2000:+000:Stealth
-R:k:-100:+000:Sneakiness
R:k:+2000:+000:Weaponmastery
R:k:+000:+000:Archery
@@ -1266,11 +1206,9 @@ R:C:Loremaster
R:C:Rogue
R:C:Warrior
R:k:+1000:+1000:Bearform-combat
-R:k:-600:+000:Disarming
R:k:-800:+000:Magic-Device
R:k:-3000:+000:Spirituality
R:k:-2000:+000:Stealth
-R:k:-100:+000:Sneakiness
R:k:+2500:+000:Weaponmastery
R:k:+500:+000:Archery
@@ -1292,11 +1230,9 @@ R:C:Pacifist
R:C:Rogue
R:C:Warrior
R:k:+0:+250:Boomerang-mastery
-R:k:-200:+000:Disarming
R:k:-300:+000:Magic-Device
R:k:-1000:+000:Spirituality
R:k:+1000:+000:Stealth
-R:k:+100:+000:Sneakiness
R:k:+1000:+000:Weaponmastery
R:k:+800:+000:Archery
@@ -1313,11 +1249,9 @@ R:F:RES_DARK
R:F:RES_DISEN
R:C:Rogue
R:C:Warrior
-R:k:+300:+000:Disarming
R:k:+500:+000:Magic-Device
R:k:+5000:+000:Spirituality
R:k:+1000:+000:Stealth
-R:k:+500:+000:Sneakiness
R:k:+000:+000:Weaponmastery
R:k:+000:+000:Archery
@@ -1340,11 +1274,9 @@ R:C:Rogue
R:C:Warrior
R:G:ELF
R:k:+0:+200:Magic
-R:k:+500:+000:Disarming
R:k:+1500:+000:Magic-Device
R:k:+10000:+000:Spirituality
R:k:+3000:+000:Stealth
-R:k:+800:+000:Sneakiness
R:k:-500:+000:Weaponmastery
R:k:+1000:+000:Archery
@@ -1377,11 +1309,9 @@ R:O:70:32:2d3
R:b:1:Tree walking
R:k:+0:+200:Barehand-combat
R:k:+0:+600:Boulder-throwing
-R:k:+500:+000:Disarming
R:k:+500:+000:Magic-Device
R:k:+10000:+000:Spirituality
R:k:-6000:+000:Stealth
-R:k:+500:+000:Sneakiness
R:k:-300:+000:Weaponmastery
R:k:-200:+000:Archery
@@ -1415,11 +1345,9 @@ R:F:SPEED
R:C:Pacifist
R:C:Priest
R:C:Warrior
-R:k:+1000:+000:Disarming
R:k:+500:+000:Magic-Device
R:k:+2500:+000:Spirituality
R:k:-8000:+000:Stealth
-R:k:+100:+000:Sneakiness
R:k:+100:+200:Weaponmastery
R:k:+500:+000:Archery
@@ -1455,11 +1383,9 @@ R:C:Loremaster
R:C:Mage
R:C:Pacifist
R:C:Priest
-R:k:+600:+000:Disarming
R:k:+000:+000:Magic-Device
R:k:+5000:+000:Spirituality
R:k:-16000:+000:Stealth
-R:k:+3000:+000:Sneakiness
### Base race characteristics tweaked from Annals of Ea for Theme.
@@ -1481,11 +1407,9 @@ R:C:Mage
R:C:Pacifist
R:C:Priest
#R:G:EVIL
-R:k:+1000:+000:Disarming
R:k:+500:+000:Magic-Device
R:k:-4000:+000:Spirituality
R:k:-10000:+000:Stealth
-R:k:+000:+000:Sneakiness
R:N:19:Yeek
R:D:The weakest of all the races, bad at everything except gaining levels quickly.
@@ -1499,11 +1423,9 @@ R:C:Pacifist
R:C:Priest
R:C:Rogue
R:C:Warrior
-R:k:-500:+000:Disarming
R:k:-500:+000:Magic-Device
R:k:-2500:+000:Spirituality
R:k:-5000:+000:Stealth
-R:k:-500:+000:Sneakiness
R:k:-500:+000:Weaponmastery
R:k:-500:+000:Archery
@@ -1529,11 +1451,9 @@ R:C:Warrior
R:G:ELF
R:k:+0:+200:Archery
R:b:1:Tree walking
-R:k:+500:+000:Disarming
R:k:+600:+000:Magic-Device
R:k:+3000:+000:Spirituality
R:k:+5000:+000:Stealth
-R:k:+800:+000:Sneakiness
R:k:+1000:+000:Weaponmastery
R:k:+4000:+000:Archery
@@ -1608,12 +1528,10 @@ R:C:Archer
R:C:Mage
R:C:Pacifist
R:C:Warrior
-R:k:+000:+000:Disarming
R:k:+000:+000:Magic-Device
R:k:+000:+000:Spirituality
R:k:=0:=0:Prayer
R:k:+000:+000:Stealth
-R:k:+000:+000:Sneakiness
R:k:+000:+000:Weaponmastery
R:k:+000:+000:Archery
@@ -1641,9 +1559,7 @@ R:k:+0:+200:Axe-mastery
R:k:+0:+200:Hafted-mastery
R:k:+0:+200:Polearm-mastery
R:k:+2000:+200:Archery
-R:k:+1000:+300:Sneakiness
R:k:+1000:+200:Stealth
-R:k:+1000:+200:Disarming
R:k:=0:=0:Magic
R:k:=0:=0:Magic-Device
R:k:=0:=0:Spell-power
@@ -1672,11 +1588,9 @@ R:F:HOLD_LIFE
R:F:RES_DARK
R:F:RES_FEAR
R:Z:spear of darkness
-R:k:+500:+000:Disarming
R:k:+050:+000:Magic-Device
R:k:-5000:+000:Spirituality
R:k:+000:+000:Stealth
-R:k:+000:+000:Sneakiness
R:k:+000:+000:Weaponmastery
R:k:+000:+000:Archery
@@ -1798,11 +1712,9 @@ S:F:RES_POIS
S:F:SEE_INVIS
S:F:SLOW_DIGEST
S:O:70:32:2d3
-S:k:+200:+000:Disarming
S:k:+800:+000:Magic-Device
S:k:+700:+000:Spirituality
S:k:+2000:+000:Stealth
-S:k:+200:+000:Sneakiness
S:k:-500:+000:Weaponmastery
S:k:-200:+000:Archery
@@ -1843,11 +1755,9 @@ S:F:SEE_INVIS
S:R:10:0
S:F:RES_COLD
S:O:70:32:2d3
-S:k:-500:+000:Disarming
S:k:-500:+000:Magic-Device
S:k:+500:+000:Spirituality
S:k:-1000:+000:Stealth
-S:k:-100:+000:Sneakiness
S:k:+800:+000:Weaponmastery
S:k:+000:+000:Archery
@@ -1887,11 +1797,9 @@ S:F:SLOW_DIGEST
S:R:5:0
S:F:RES_COLD
S:O:70:32:2d3
-S:k:-200:+000:Disarming
S:k:-200:+000:Magic-Device
S:k:+500:+000:Spirituality
S:k:-1000:+000:Stealth
-S:k:-100:+000:Sneakiness
S:k:+500:+000:Weaponmastery
S:k:+000:+000:Archery
@@ -1911,11 +1819,9 @@ S:A:Troll
S:C:F:Mage
S:R:10:0
S:F:RES_FEAR
-S:k:-200:+000:Disarming
S:k:-1000:+000:Magic-Device
S:k:+200:+000:Spirituality
S:k:-2000:+000:Stealth
-S:k:+000:+000:Sneakiness
S:k:+1200:+000:Weaponmastery
S:k:+500:+000:Archery
@@ -1943,11 +1849,9 @@ S:A:Wood-Elf
S:A:Yeek
S:C:F:Archer
S:C:F:Warrior
-S:k:+500:+000:Disarming
S:k:+1000:+000:Magic-Device
S:k:+500:+000:Spirituality
S:k:+3000:+000:Stealth
-S:k:+400:+000:Sneakiness
S:k:-500:+000:Weaponmastery
S:k:-500:+000:Archery
@@ -2219,8 +2123,6 @@ S:F:SPEED
S:Z:poison dart
R:k:-200:+000:Weaponmastery
R:k:+1000:+300:Archery
-R:k:+1000:+000:Sneakiness
-R:k:+500:+200:Disarming
S:k:+1000:+500:Stealth
R:k:+050:+000:Magic-Device
S:k:+0:+200:Magic
@@ -2251,8 +2153,6 @@ S:R:50:0
S:F:CLIMB
R:k:-400:+000:Weaponmastery
R:k:+000:+300:Archery
-R:k:+1000:+000:Sneakiness
-R:k:+500:+100:Disarming
S:k:+500:+200:Stealth
S:k:+0:+200:Magic
S:k:+1000:+300:Mind
@@ -2296,7 +2196,6 @@ S:F:SEARCH
S:Z:smell monsters
S:Z:smell metal
R:k:+500:+300:Stealth
-R:k:+500:+200:Sneakiness
R:k:+000:+000:Weaponmastery
R:k:+000:+000:Archery
@@ -2336,7 +2235,6 @@ S:F:TUNNEL
S:k:+1000:+500:Boulder-throwing
S:Z:eat rock
R:k:-800:+000:Stealth
-R:k:-500:+000:Sneakiness
R:k:-500:+000:Archery
S:N:20:(Caborrog)
@@ -2370,7 +2268,6 @@ S:k:+0:+300:Conveyance
S:k:+0:+300:Temporal
S:Z:panic hit
R:k:-1000:+000:Stealth
-R:k:-500:+000:Sneakiness
S:N:21:(Draugrog)
S:D:A:These doglike demons are of a higher order than the Huroeg,
@@ -2416,7 +2313,6 @@ S:k:+0:+200:Magic
S:k:+0:+200:Spirituality
S:k:+1000:+500:Mindcraft
R:k:-10000:+000:Stealth
-R:k:-500:+200:Sneakiness
R:k:+300:+000:Weaponmastery
R:k:+200:+000:Archery
@@ -2535,7 +2431,6 @@ S:R:50:1
S:F:LUCK
S:F:SPEED
R:k:+25000:+500:Stealth
-R:k:+2000:+200:Sneakiness
R:k:+2000:+300:Magic-Device
S:N:23:(Limrog)
@@ -2553,8 +2448,6 @@ S:F:WATER_BREATH
S:R:50:0
S:F:MAGIC_BREATH
R:k:+3000:+300:Stealth
-R:k:+500:+200:Sneakiness
-R:k:+2000:+200:Disarming
S:k:+0:+200:Magic
S:k:+0:+500:Conveyance
S:k:+0:+500:Temporal
@@ -2588,8 +2481,6 @@ S:k:+1000:+100:Combat
S:k:+1000:+100:Weaponmastery
R:k:+1000:+100:Archery
R:k:-300:+000:Stealth
-R:k:+500:+200:Sneakiness
-R:k:+500:+100:Disarming
S:Z:scare monster
S:Z:berserk
@@ -2615,8 +2506,6 @@ S:Z:turn into a Balrog
R:k:+1000:+300:Weaponmastery
R:k:+1000:+300:Archery
R:k:+1000:+200:Stealth
-R:k:+500:+200:Sneakiness
-R:k:+1000:+200:Disarming
R:k:+500:+200:Magic
##############################################################################
diff --git a/lib/mods/theme/edit/r_info.txt b/lib/mods/theme/edit/r_info.txt
index 4d53dd1d..4c83746f 100644
--- a/lib/mods/theme/edit/r_info.txt
+++ b/lib/mods/theme/edit/r_info.txt
@@ -2513,7 +2513,6 @@ S:ROCKET
S:SCARE
S:TELE_AWAY
S:TPORT
-S:TRAPS
D:This annoying little gnome won't stop bragging about his great
D:magical powers and shiny new equipment--unless someone silences
D:him permanently. Unfortunately, your own weapons and spells
@@ -3289,7 +3288,6 @@ S:BA_POIS
S:BO_COLD
S:HEAL
S:SLOW
-S:TRAPS
D:He was once the chief counsellor to King Theoden of Rohan.
D:He betrayed king and country by becoming a spy for the
D:corrupted Istari Saruman.
@@ -3327,7 +3325,6 @@ F:WILD_WOOD
S:1_IN_5
S:ARROW_2
S:HEAL
-S:TRAPS
D:The legendary archer who steals from the rich (you qualify).
# New monster added by furiosity for the Theme module
@@ -6698,7 +6695,6 @@ F:WILD_TOO
S:1_IN_3
S:CONF
S:SCARE
-S:TRAPS
D:The fourth son of Feanor, who turned on his own kind because of the
D:Oath of his father. He searches forever for the Silmarils of Feanor.
@@ -6755,7 +6751,6 @@ S:BLINK
S:TELE_AWAY
S:TELE_TO
S:TPORT
-S:TRAPS
D:The fifth son of Feanor, closely associated with his elder
D:brother Celegorm. Bound by the Oath of Feanor, he searches
D:forever for the Silmarils.
@@ -8911,7 +8906,6 @@ S:S_KIN
S:S_MONSTERS
S:TELE_AWAY
S:TPORT
-S:TRAPS
D:He is dressed in blue from head to toe. He is one of the five Istari
D:who came to the northwest of Middle-earth in the Third Age; he
D:journeyed into the east with Pallando, and never returned to the western
@@ -9122,7 +9116,6 @@ S:S_HI_DRAGON
S:S_HI_UNDEAD
S:TELE_AWAY
S:TPORT
-S:TRAPS
D:He is dressed in blue from head to toe. He is one of the five Istari
D:who came to the northwest of Middle-earth in the Third Age; he
D:journeyed into the east with Alatar, and never returned to the western
@@ -9950,7 +9943,6 @@ S:S_MONSTER
S:S_UNDEAD
S:TELE_AWAY
S:TELE_TO
-S:TRAPS
D:Nobody has ever seen It.
N:394:Banshee
@@ -10868,7 +10860,6 @@ S:S_KIN
S:TELE_AWAY
S:TELE_TO
S:TPORT
-S:TRAPS
D:The proud former 'king' of Gondor, he has been driven mad
D:by his contact with Sauron through the Palantir. You see
D:the glint of a terrible fire in his eyes.
@@ -10992,7 +10983,6 @@ S:CONF
S:HASTE
S:HOLD
S:SHRIEK
-S:TRAPS
D:This creature look like a pillar of rock. However, a closer
D:inspection reveals a glaring eye and powerful tentacles,
D:which crush its prey and feed it to the creature's hungry
@@ -12261,7 +12251,6 @@ S:BA_POIS
S:BO_COLD
S:HEAL
S:SLOW
-S:TRAPS
D:He's a trustworthy man... or is he? Morgoth seem's sending spies in
D:disguise, and perhaps this is one of them.
@@ -12555,7 +12544,6 @@ S:HEAL
S:SCARE
S:S_ANIMAL
S:TPORT
-S:TRAPS
D:Sometimes belittled as a bird-loving fool, Radagast is weaker
D:mentally and magically than his fellows among the Istari.
D:Nonetheless, his knowledge of woodcraft and command over the
@@ -12699,7 +12687,6 @@ S:HEAL
S:SCARE
S:SLOW
S:S_SPIDER
-S:TRAPS
D:Shelob is an enormous bloated spider, the last daughter of Ungoliant the
D:Unlight. She normally guards the pass through Cirith Ungol, but
D:occasionally goes out foraging for food to feed her voracious appetite.
@@ -13960,7 +13947,6 @@ F:TAKE_ITEM
S:1_IN_6
S:ARROW_2
S:BLINK
-S:TRAPS
D:Cool and confident, fast and lithe; protect your possessions quickly!
N:517:The Watcher in the Water
@@ -15819,7 +15805,6 @@ S:CAUSE_2
S:MIND_BLAST
S:SLOW
S:S_UNDEAD
-S:TRAPS
# Spells chez thaumaturgy and having killed Morgy:
S:BR_DISI
S:BR_MANA
@@ -16751,7 +16736,6 @@ S:BO_ELEC
S:BO_FIRE
S:BO_ICEE
S:HEAL
-S:TRAPS
D:A Black Numenorean who usurped the throne of Gondor, he is treacherous and
D:evil.
@@ -17986,7 +17970,6 @@ S:S_DRAGON
S:S_MONSTER
S:S_UNDEAD
S:TELE_TO
-S:TRAPS
D:A human figure in robes, he moves with magically improved speed, and his
D:hands are ablur with spellcasting.
@@ -19881,7 +19864,6 @@ S:BLINK
S:CONF
S:TELE_TO
S:TPORT
-S:TRAPS
D:A class of its own: you are already too late to protect your possessions -
D:and he seems to have studied magic too, and is a master of setting traps.
@@ -21310,7 +21292,6 @@ S:S_HI_DRAGON
S:S_MONSTER
S:S_UNDEAD
S:TELE_TO
-S:TRAPS
D:A human figure in robes, he moves with magically improved speed, and his
D:hands are ablur with spellcasting. You stagger at the mighty sound of his
D:spells as they echo hollowly through the dungeon.
@@ -21746,7 +21727,6 @@ S:CAUSE_4
S:MIND_BLAST
S:SLOW
S:S_UNDEAD
-S:TRAPS
D:A glowing skull possessed by sorcerous power. It need not move, but
D:merely blast you with mighty magic.
@@ -22500,7 +22480,6 @@ S:S_HI_DRAGON
S:S_UNDEAD
S:TELE_AWAY
S:TPORT
-S:TRAPS
D:Originally known as the White, Saruman fell prey to Sauron's wiles. He
D:searches forever for the One Ring, to become a mighty Sorcerer-King of the
D:world.
@@ -22533,7 +22512,6 @@ F:TAKE_ITEM
F:UNIQUE
S:1_IN_6
S:TELE_TO
-S:TRAPS
D:He is a master of disguise, an expert of stealth, a genius at traps, and
D:moves with blinding speed.
@@ -23793,7 +23771,6 @@ S:S_KIN
S:S_MONSTERS
S:S_UNDEAD
S:TELE_TO
-S:TRAPS
D:A stench of corruption and decay surrounds this sorcerer, who has
D:risen from the dead to continue his foul plots and schemes.
@@ -24394,7 +24371,6 @@ S:HOLD
S:S_HI_DEMON
S:S_HI_UNDEAD
S:TELE_TO
-S:TRAPS
D:The Mouth of Sauron is a mighty spellcaster. So old that even he cannot
D:remember his own name, his power and evil are undeniable. He believes
D:unshakably that he is unbeatable and laughs as he weaves his awesome
@@ -24449,7 +24425,6 @@ S:HAND_DOOM
S:HOLD
S:S_HI_UNDEAD
S:TELE_TO
-S:TRAPS
D:The dark master of the terrible fortress of southern Mirkwood. It is
D:rumoured that this is in fact none other than Sauron in disguise:
D:although if this is so, he has yet to reveal his full power - and perhaps
@@ -25895,7 +25870,6 @@ S:S_RNG
S:S_THUNDERLORD
S:TELE_TO
S:TPORT
-S:TRAPS
D:He is the master of coding; none can match his skill. He created the
D:Variant Maintainer, the RNGs, and the software bugs. Bull Gates is
D:nothing next to him. Do not think that since he loves the novels of
@@ -27836,7 +27810,6 @@ S:S_KIN
S:S_MONSTERS
S:TELE_AWAY
S:TPORT
-S:TRAPS
D:The wizard who opposed Sauron and, in the end, was the only
D:one of the Istari to succeed in his task. Gandalf is very
D:wise and specialises in fire magic.
@@ -29371,7 +29344,6 @@ S:SLOW
S:S_UNIQUE
S:TELE_TO
S:TPORT
-S:TRAPS
D:A woman of mind-shattering beauty, none can match her beauty. She is perfect,
D:and totaly evil. She loves nothing but herself and her evilness is as
D:great as her beauty. No one can stand against her, even DarkGod.
@@ -29957,7 +29929,6 @@ S:SCARE
S:SHRIEK
S:SLOW
S:S_KIN
-S:TRAPS
D:A twisted elemental spirit, this creature serves the Dark with
D:perversions of the magics of nature.
@@ -30316,7 +30287,6 @@ F:TAKE_ITEM
S:1_IN_6
S:ARROW_2
S:BLINK
-S:TRAPS
D:A little gnome, fast and stealthy. He is eyeing your backpack.
N:1012:Vermicious Knid
@@ -31251,7 +31221,6 @@ S:SCARE
S:SHRIEK
S:S_KIN
S:S_MONSTER
-S:TRAPS
D:A strange creature that disguises itself as an object to lure
D:unsuspecting adventurers within reach of its venomous claws.
@@ -31707,7 +31676,6 @@ S:HEAL
S:SCARE
S:SHRIEK
S:TELE_AWAY
-S:TRAPS
D:Hopefully you will kill this spirit before you realise it exists.
# Spirit of ickyness
@@ -31959,7 +31927,6 @@ S:ARROW_3
S:BLINK
S:CONF
S:TELE_TO
-S:TRAPS
D:There is something attractive about this spirit, and it seems
D:to have a full purse.
diff --git a/lib/mods/theme/edit/re_info.txt b/lib/mods/theme/edit/re_info.txt
index 2b111067..9b89f19d 100644
--- a/lib/mods/theme/edit/re_info.txt
+++ b/lib/mods/theme/edit/re_info.txt
@@ -284,7 +284,6 @@ S:HEAL
S:HOLD
S:S_MONSTER
S:TPORT
-S:TRAPS
N:10:Archer
G:*:W
diff --git a/lib/mods/theme/edit/s_info.txt b/lib/mods/theme/edit/s_info.txt
index 5d57dbe6..b40e20b5 100644
--- a/lib/mods/theme/edit/s_info.txt
+++ b/lib/mods/theme/edit/s_info.txt
@@ -340,19 +340,10 @@ E:Thaumaturgy:Antimagic
################################## SNEAKINESS SKILLS ###############################
-N:35:Sneakiness
-D:General ability at the sneakiness skills.
-D:It also affects the searching abilities
-F:RANDOM_GAIN
-
N:36:Stealth
D:Ability to move unnoticed, silently
F:RANDOM_GAIN
-N:37:Disarming
-D:Ability to disarm the various traps
-F:RANDOM_GAIN
-
N:40:Stealing
D:Ability to steal objects
A:15:Steal object
@@ -361,11 +352,9 @@ N:46:Dodging
D:Ability to dodge blows and bolts
A:16:Check dodge chance
-f:Stealth:Sneakiness%15
-f:Disarming:Sneakiness%10
-f:Backstab:Sneakiness%5
-f:Stealing:Sneakiness%15
-f:Dodging:Sneakiness%10
+f:Backstab:Stealth%5
+f:Stealing:Stealth%15
+f:Dodging:Stealth%10
################################## MONSTER SKILLS ################################
@@ -428,12 +417,10 @@ T:Combat:Bearform-combat
T:Combat:Boulder-throwing
T:Combat:Antimagic
-T:Main:Sneakiness
-T:Sneakiness:Stealth
-T:Sneakiness:Disarming
-T:Sneakiness:Backstab
-T:Sneakiness:Stealing
-T:Sneakiness:Dodging
+T:Main:Stealth
+T:Stealth:Backstab
+T:Stealth:Stealing
+T:Stealth:Dodging
T:Main:Magic
T:Magic:Magic-Device
diff --git a/lib/mods/theme/edit/st_info.txt b/lib/mods/theme/edit/st_info.txt
index d00e3415..6f8514b1 100644
--- a/lib/mods/theme/edit/st_info.txt
+++ b/lib/mods/theme/edit/st_info.txt
@@ -163,7 +163,6 @@ I:100:Monster Confusion
I:100:Magic Mapping
I:100:Treasure Detection
I:100:Object Detection
-I:100:Trap Detection
I:100:Detect Invisible
I:100:Recharging
I:100:Satisfy Hunger
diff --git a/lib/mods/theme/help/debug.txt b/lib/mods/theme/help/debug.txt
index 3cb444f4..a3a90468 100644
--- a/lib/mods/theme/help/debug.txt
+++ b/lib/mods/theme/help/debug.txt
@@ -29,7 +29,7 @@ will not be scored if you use debug commands.
*****debug.txt*29[o Edit object attributes] O (unused)
*****debug.txt*31[p Phase door] *****debug.txt*32[P Panic save]
*****debug.txt*33[q Get a quest] Q (unused)
- r (unused) *****debug.txt*36[R Create a trap]
+ r (unused) R (unused)
*****debug.txt*37[s Summon monster] *****debug.txt*38[S Change the feature of the map]
*****debug.txt*39[t Teleport] *****debug.txt*40[T Teleport to a town]
*****debug.txt*41[u Complete map] *****debug.txt*42[U Become undead]
@@ -105,7 +105,7 @@ maximal legal value.
For example : 03^AC will create the Arkenstone of Thrane (+3)
~~~~~7
[[[[[GDetect all (d)]
- Sense ways out/monsters/objects/traps.
+ Sense ways out/monsters/objects.
~~~~~8
[[[[[GTeleport to the wilderness (D)]
From a dungeon this will teleport you to the wilderness level
@@ -182,11 +182,6 @@ maximal legal value.
~~~~~35
[[[[[GGain reward (r)]
Some high being grants you a reward.
-~~~~~36
-[[[[[GCreate a trap (R)]
- Use the "Command count", aka 0, to specify a number from
- tr_info.txt to put a trap on the ground where you are
- standing.
~~~~~37
[[[[[GSummon monster (s)]
Summon a random monster, next to where you stand.
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 035c42d1..3b8189b5 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -104,7 +104,6 @@ SET(SRCS_COMMON
squeltch.cc
store.cc
tables.cc
- traps.cc
util.cc
variable.cc
wild.cc
diff --git a/src/birth.cc b/src/birth.cc
index b18a4b9a..c6e1d922 100644
--- a/src/birth.cc
+++ b/src/birth.cc
@@ -48,7 +48,6 @@
#include "store.hpp"
#include "tables.hpp"
#include "town_type.hpp"
-#include "trap_type.hpp"
#include "util.hpp"
#include "util.h"
#include "variable.h"
@@ -723,7 +722,6 @@ static void player_wipe(void)
auto &r_info = game->edit_data.r_info;
auto &k_info = game->edit_data.k_info;
auto &a_info = game->edit_data.a_info;
- auto &t_info = game->edit_data.t_info;
/* Wipe special levels */
wipe_saved();
@@ -882,13 +880,6 @@ static void player_wipe(void)
inscription_known = false;
}
- /* Wipe the known traps list */
- for (auto &t_ref: t_info)
- {
- t_ref.known = 0;
- t_ref.ident = FALSE;
- }
-
/* Reset wild_mode to FALSE */
p_ptr->wild_mode = FALSE;
p_ptr->old_wild_mode = FALSE;
@@ -986,8 +977,6 @@ static void player_outfit_spellbook(cptr spell_name)
*/
static void player_outfit(void)
{
- auto &t_info = game->edit_data.t_info;
-
// Shorthand names for convenience
cptr class_name = spp_ptr->title;
auto const &subrace_name = rmp_ptr->title;
@@ -1152,30 +1141,6 @@ static void player_outfit(void)
(void)inven_carry(q_ptr, FALSE);
}
- /* Rogues have a better knowledge of traps */
- if (p_ptr->has_ability(AB_TRAPPING))
- {
- t_info[TRAP_OF_DAGGER_I].known = randint(50) + 50;
- t_info[TRAP_OF_POISON_NEEDLE].known = randint(50) + 50;
- t_info[TRAP_OF_FIRE_BOLT].known = randint(50) + 50;
- t_info[TRAP_OF_DAGGER_I].ident = TRUE;
- t_info[TRAP_OF_POISON_NEEDLE].ident = TRUE;
- t_info[TRAP_OF_FIRE_BOLT].ident = TRUE;
-
- /* Hack -- Give the player a some ammo for the traps */
- object_type forge;
- object_type *q_ptr = &forge;
- object_prep(q_ptr, lookup_kind(TV_SHOT, SV_AMMO_NORMAL));
- q_ptr->number = (byte)rand_range(5, 15);
- object_aware(q_ptr);
- object_known(q_ptr);
-
- /* These objects are "storebought" */
- q_ptr->ident |= IDENT_MENTAL;
-
- (void)inven_carry(q_ptr, FALSE);
- }
-
/* Outfit the player with starting items */
outfit_objs(rp_ptr->object_protos);
outfit_objs(rmp_ptr->object_protos);
diff --git a/src/cave.cc b/src/cave.cc
index 14046eb2..66e274f1 100644
--- a/src/cave.cc
+++ b/src/cave.cc
@@ -20,7 +20,6 @@
#include "spells1.hpp"
#include "store_info_type.hpp"
#include "tables.hpp"
-#include "trap_type.hpp"
#include "util.hpp"
#include "util.h"
#include "variable.h"
@@ -854,7 +853,6 @@ static void map_info(int y, int x, byte *ap, char *cp)
auto const &r_info = game->edit_data.r_info;
auto const &f_info = game->edit_data.f_info;
auto const &k_info = game->edit_data.k_info;
- auto const &t_info = game->edit_data.t_info;
byte a;
@@ -911,41 +909,6 @@ static void map_info(int y, int x, byte *ap, char *cp)
a = TERM_VIOLET;
}
- /* Mega-Hack 3 -- Traps don't have f_info entries either */
- if ((info & (CAVE_TRDT)) && (feat != FEAT_ILLUS_WALL))
- {
- /* Trap index */
- auto t_idx = c_ptr->t_idx;
-
- /*
- * If trap is set on a floor grid that is not
- * one of "interesting" features, use a special
- * symbol to display it. Check for doors is no longer
- * necessary because they have REMEMBER flag now.
- *
- * Cave macros cannot be used safely here, because of
- * c_ptr->mimic XXX XXX
- */
- if ((f_ptr->flags & (FF_FLOOR | FF_REMEMBER)) == FF_FLOOR)
- {
- c = f_info[FEAT_TRAP].x_char;
- }
-
- /* Add attr XXX XXX XXX */
- a = t_info[t_idx].color;
-
- /* Get a new color with a strange formula :) XXX XXX XXX */
- if (t_info[t_idx].flags & FTRAP_CHANGE)
- {
- s32b tmp;
-
- tmp = dun_level + dungeon_type + feat;
-
- a = tmp % 16;
- }
- }
-
-
/**** Step 2 -- Apply special random effects ****/
if (!options->avoid_other && !options->avoid_shimmer)
{
@@ -969,7 +932,6 @@ static void map_info(int y, int x, byte *ap, char *cp)
* Special lighting effects, if specified and applicable
* This will never happen for
* - any grids in the overhead map
- * - traps
* - (graphics modes) terrain features without corresponding
* "darker" tiles.
*
@@ -981,7 +943,7 @@ static void map_info(int y, int x, byte *ap, char *cp)
if (options->view_special_lite &&
((f_ptr->flags & (FF_FLOOR | FF_REMEMBER)) == FF_FLOOR))
{
- if (!p_ptr->wild_mode && !(info & (CAVE_TRDT)))
+ if (!p_ptr->wild_mode)
{
/* Handle "seen" grids */
if (info & (CAVE_SEEN))
@@ -1021,7 +983,7 @@ static void map_info(int y, int x, byte *ap, char *cp)
else if (options->view_granite_lite &&
(f_ptr->flags & (FF_NO_VISION | FF_DOOR)))
{
- if (!p_ptr->wild_mode && !(info & (CAVE_TRDT)))
+ if (!p_ptr->wild_mode)
{
/* Handle "seen" grids */
if (info & (CAVE_SEEN))
@@ -1082,7 +1044,6 @@ static void map_info(int y, int x, byte *ap, char *cp)
/**** Layer 2 -- Objects ****/
- if (feat != FEAT_MON_TRAP)
{
for (auto const o_idx: c_ptr->o_idxs)
{
@@ -1286,7 +1247,6 @@ void map_info_default(int y, int x, byte *ap, char *cp)
auto const &r_info = game->edit_data.r_info;
auto const &f_info = game->edit_data.f_info;
auto const &k_info = game->edit_data.k_info;
- auto const &t_info = game->edit_data.t_info;
byte a;
@@ -1346,41 +1306,6 @@ void map_info_default(int y, int x, byte *ap, char *cp)
a = TERM_VIOLET;
}
- /* Mega-Hack 3 -- Traps don't have f_info entries either */
- if ((info & (CAVE_TRDT)) && (feat != FEAT_ILLUS_WALL))
- {
- /* Trap index */
- auto t_idx = c_ptr->t_idx;
-
- /*
- * If trap is set on a floor grid that is not
- * one of "interesting" features, use a special
- * symbol to display it. Check for doors is no longer
- * necessary because they have REMEMBER flag now.
- *
- * Cave macros cannot be used safely here, because of
- * c_ptr->mimic XXX XXX
- */
- if ((f_ptr->flags & (FF_FLOOR | FF_REMEMBER)) == FF_FLOOR)
- {
- c = f_info[FEAT_TRAP].d_char;
- }
-
- /* Add attr */
- a = t_info[t_idx].color;
-
- /* Get a new color with a strange formula :) */
- if (t_info[t_idx].flags & FTRAP_CHANGE)
- {
- s32b tmp;
-
- tmp = dun_level + dungeon_type + feat;
-
- a = tmp % 16;
- }
- }
-
-
/**** Step 2 -- Apply special random effects ****/
if (!avoid_other)
{
@@ -1404,7 +1329,6 @@ void map_info_default(int y, int x, byte *ap, char *cp)
* Special lighting effects, if specified and applicable
* This will never happen for
* - any grids in the overhead map
- * - traps
* - (graphics modes) terrain features without corresponding
* "darker" tiles.
*
@@ -1416,7 +1340,7 @@ void map_info_default(int y, int x, byte *ap, char *cp)
if (options->view_special_lite &&
((f_ptr->flags & (FF_FLOOR | FF_REMEMBER)) == FF_FLOOR))
{
- if (!p_ptr->wild_mode && !(info & (CAVE_TRDT)))
+ if (!p_ptr->wild_mode)
{
/* Handle "seen" grids */
if (info & (CAVE_SEEN))
@@ -1456,7 +1380,7 @@ void map_info_default(int y, int x, byte *ap, char *cp)
else if (options->view_granite_lite &&
(f_ptr->flags & (FF_NO_VISION | FF_DOOR)))
{
- if (!p_ptr->wild_mode && !(info & (CAVE_TRDT)))
+ if (!p_ptr->wild_mode)
{
/* Handle "seen" grids */
if (info & (CAVE_SEEN))
@@ -1512,7 +1436,6 @@ void map_info_default(int y, int x, byte *ap, char *cp)
/**** Layer 2 -- Objects ****/
- if (feat != FEAT_MON_TRAP)
{
for (auto const this_o_idx: c_ptr->o_idxs)
{
@@ -1813,8 +1736,7 @@ void note_spot(int y, int x)
if (cave_plain_floor_grid(c_ptr))
{
/* Option -- memorise certain floors */
- if ((info & CAVE_TRDT) ||
- ((info & CAVE_GLOW) && options->view_perma_grids) ||
+ if (((info & CAVE_GLOW) && options->view_perma_grids) ||
options->view_torch_grids)
{
/* Memorize */
@@ -4412,7 +4334,7 @@ void object_track(object_type *o_ptr)
*
* All disturbance cancels repeated commands, resting, and running.
*/
-void disturb(int stop_search)
+void disturb(int)
{
/* Cancel auto-commands */
/* command_new = 0; */
@@ -4447,19 +4369,6 @@ void disturb(int stop_search)
p_ptr->update |= (PU_TORCH);
}
- /* Cancel searching if requested */
- if (stop_search && p_ptr->searching)
- {
- /* Cancel */
- p_ptr->searching = FALSE;
-
- /* Recalculate bonuses */
- p_ptr->update |= (PU_BONUS);
-
- /* Redraw the state */
- p_ptr->redraw |= (PR_FRAME);
- }
-
/* Flush the input if requested */
if (options->flush_disturb)
{
@@ -4587,7 +4496,7 @@ bool cave_floor_grid(cave_type const *c)
{
auto const &f_info = game->edit_data.f_info;
- return (f_info[c->feat].flags & FF_FLOOR) && (c->feat != FEAT_MON_TRAP);
+ return bool(f_info[c->feat].flags & FF_FLOOR);
}
@@ -4654,7 +4563,6 @@ bool cave_clean_bold(int y, int x)
return
(f_info[cave[y][x].feat].flags & FF_FLOOR) &&
- (cave[y][x].feat != FEAT_MON_TRAP) &&
(cave[y][x].o_idxs.empty()) &&
!(f_info[cave[y][x].feat].flags & FF_PERMANENT);
}
@@ -4688,7 +4596,6 @@ bool cave_naked_bold(int y, int x)
return
(f_info[cave[y][x].feat].flags & FF_FLOOR) &&
- (cave[y][x].feat != FEAT_MON_TRAP) &&
!(f_info[cave[y][x].feat].flags & FF_PERMANENT) &&
(cave[y][x].o_idxs.empty()) &&
(cave[y][x].m_idx == 0);
@@ -4700,7 +4607,6 @@ bool cave_naked_bold2(int y, int x)
return
(f_info[cave[y][x].feat].flags & FF_FLOOR) &&
- (cave[y][x].feat != FEAT_MON_TRAP) &&
(cave[y][x].o_idxs.empty()) &&
(cave[y][x].m_idx == 0);
}
diff --git a/src/cave_type.hpp b/src/cave_type.hpp
index 958ace1d..08e6002f 100644
--- a/src/cave_type.hpp
+++ b/src/cave_type.hpp
@@ -38,8 +38,6 @@ struct cave_type
s16b m_idx = 0; /* Monster in this grid */
- s16b t_idx = 0; /* trap index (in t_list) or zero */
-
s16b special = 0; /* Special cave info */
s16b special2 = 0; /* Special cave info */
diff --git a/src/cmd1.cc b/src/cmd1.cc
index 6f8a26e3..b2843327 100644
--- a/src/cmd1.cc
+++ b/src/cmd1.cc
@@ -41,8 +41,6 @@
#include "spells2.hpp"
#include "spells3.hpp"
#include "tables.hpp"
-#include "traps.hpp"
-#include "trap_type.hpp"
#include "util.hpp"
#include "util.h"
#include "variable.h"
@@ -438,89 +436,6 @@ s16b tot_dam_aux(object_type *o_ptr, int tdam, monster_type *m_ptr,
/*
- * Search for hidden things
- */
-void search(void)
-{
- /* Start with base search ability */
- int chance = p_ptr->skill_srh;
-
- /* Penalize various conditions */
- if (p_ptr->blind || no_lite()) chance = chance / 10;
- if (p_ptr->confused || p_ptr->image) chance = chance / 10;
-
- /* Search the nearby grids, which are always in bounds */
- for (int y = (p_ptr->py - 1); y <= (p_ptr->py + 1); y++)
- {
- for (int x = (p_ptr->px - 1); x <= (p_ptr->px + 1); x++)
- {
- /* Sometimes, notice things */
- if (rand_int(100) < chance)
- {
- /* Access the grid */
- cave_type *c_ptr = &cave[y][x];
-
- /* Invisible trap */
- if ((c_ptr->t_idx != 0) && !(c_ptr->info & CAVE_TRDT))
- {
- /* Pick a trap */
- pick_trap(y, x);
-
- /* Message */
- msg_print("You have found a trap.");
-
- /* Disturb */
- disturb(0);
- }
-
- /* Secret door */
- if (c_ptr->feat == FEAT_SECRET)
- {
- /* Message */
- msg_print("You have found a secret door.");
-
- /* Pick a door XXX XXX XXX */
- cave_set_feat(y, x, FEAT_DOOR_HEAD + 0x00);
- cave[y][x].mimic = 0;
- lite_spot(y, x);
-
- /* Disturb */
- disturb(0);
- }
-
- /* Scan all objects in the grid */
- for (auto const o_idx: c_ptr->o_idxs)
- {
- object_type * o_ptr = &o_list[o_idx];
-
- /* Skip non-chests */
- if (o_ptr->tval != TV_CHEST) continue;
-
- /* Skip non-trapped chests */
- if (!o_ptr->pval) continue;
-
- /* Identify once */
- if (!object_known_p(o_ptr))
- {
- /* Message */
- msg_print("You have discovered a trap on the chest!");
-
- /* Know the trap */
- object_known(o_ptr);
-
- /* Notice it */
- disturb(0);
- }
- }
- }
- }
- }
-}
-
-
-
-
-/*
* Player "wants" to pick up an object or gold.
* Note that we ONLY handle things that can be picked up.
* See "move_player()" for handling of other things.
@@ -534,36 +449,6 @@ void carry(int pickup)
}
-/*
- * Handle player hitting a real trap
- */
-static void hit_trap(void)
-{
- auto &t_info = game->edit_data.t_info;
-
- bool_ ident = FALSE;
-
- cave_type *c_ptr;
-
-
- /* Disturb the player */
- disturb(0);
-
- /* Get the cave grid */
- c_ptr = &cave[p_ptr->py][p_ptr->px];
- if (c_ptr->t_idx != 0)
- {
- ident = player_activate_trap_type(p_ptr->py, p_ptr->px, NULL, -1);
- if (ident)
- {
- t_info[c_ptr->t_idx].ident = TRUE;
- msg_format("You identified the trap as %s.",
- t_info[c_ptr->t_idx].name);
- }
- }
-}
-
-
void touch_zap_player(monster_type *m_ptr)
{
auto r_ptr = m_ptr->race();
@@ -2665,7 +2550,7 @@ static bool_ easy_open_door(int y, int x)
else if (c_ptr->feat >= FEAT_DOOR_HEAD + 0x01)
{
/* Disarm factor */
- i = p_ptr->skill_dis;
+ i = 100;
/* Penalize some conditions */
if (p_ptr->blind || no_lite()) i = i / 10;
@@ -2686,9 +2571,6 @@ static bool_ easy_open_door(int y, int x)
/* Message */
msg_print("You have picked the lock.");
- /* Set off trap */
- if (c_ptr->t_idx != 0) player_activate_door_trap(y, x);
-
/* Open the door */
cave_set_feat(y, x, FEAT_OPEN);
@@ -2713,9 +2595,6 @@ static bool_ easy_open_door(int y, int x)
/* Closed door */
else
{
- /* Set off trap */
- if (c_ptr->t_idx != 0) player_activate_door_trap(y, x);
-
/* Open the door */
cave_set_feat(y, x, FEAT_OPEN);
@@ -2736,7 +2615,7 @@ static bool_ easy_open_door(int y, int x)
* any monster which might be in the destination grid. Previously,
* moving into walls was "free" and did NOT hit invisible monsters.
*/
-void move_player_aux(int dir, int do_pickup, int run, bool_ disarm)
+void move_player_aux(int dir, int do_pickup, int run)
{
auto const &d_info = game->edit_data.d_info;
auto const &r_info = game->edit_data.r_info;
@@ -2752,8 +2631,6 @@ void move_player_aux(int dir, int do_pickup, int run, bool_ disarm)
char m_name[80];
- bool_ old_dtrap, new_dtrap;
-
bool_ oktomove = TRUE;
@@ -2981,14 +2858,6 @@ void move_player_aux(int dir, int do_pickup, int run, bool_ disarm)
oktomove = FALSE;
}
- /* Don't step on known traps. */
- else if (disarm && (c_ptr->info & (CAVE_TRDT)) && !(p_ptr->confused || p_ptr->stun || p_ptr->image))
- {
- msg_print("You stop to avoid triggering the trap.");
- energy_use = 0;
- oktomove = FALSE;
- }
-
/* Player can't enter ? soo bad for him/her ... */
else if (!player_can_enter(c_ptr->feat))
{
@@ -3074,37 +2943,6 @@ void move_player_aux(int dir, int do_pickup, int run, bool_ disarm)
}
}
- /*
- * Check trap detection status -- retrieve them here
- * because they are used by the movement code as well
- */
- old_dtrap = ((cave[p_ptr->py][p_ptr->px].info & CAVE_DETECT) != 0);
- new_dtrap = ((cave[y][x].info & CAVE_DETECT) != 0);
-
- /* Normal movement */
- if (oktomove && running && options->disturb_detect)
- {
- /*
- * Disturb the player when about to leave the trap detected
- * area
- */
- if (old_dtrap && !new_dtrap)
- {
- /* Disturb player */
- disturb(0);
-
- /* but don't take a turn */
- energy_use = 0;
-
- /* Tell player why */
- cmsg_print(TERM_VIOLET, "You are about to leave a trap detected zone.");
- /* Flush */
- /* msg_print(NULL); */
-
- oktomove = FALSE;
- }
- }
-
/* Normal movement */
if (oktomove)
{
@@ -3138,20 +2976,6 @@ void move_player_aux(int dir, int do_pickup, int run, bool_ disarm)
/* Check for new panel (redraw map) */
verify_panel();
- /* Check detection status */
- if (old_dtrap && !new_dtrap)
- {
- cmsg_print(TERM_VIOLET, "You leave a trap detected zone.");
- if (running) msg_print(NULL);
- p_ptr->redraw |= (PR_FRAME);
- }
- else if (!old_dtrap && new_dtrap)
- {
- cmsg_print(TERM_L_BLUE, "You enter a trap detected zone.");
- if (running) msg_print(NULL);
- p_ptr->redraw |= (PR_FRAME);
- }
-
/* Update stuff */
p_ptr->update |= (PU_VIEW | PU_FLOW | PU_MON_LITE);
@@ -3178,18 +3002,6 @@ void move_player_aux(int dir, int do_pickup, int run, bool_ disarm)
if (running) msg_print(NULL);
}
- /* Spontaneous Searching */
- if ((p_ptr->skill_fos >= 50) || (0 == rand_int(50 - p_ptr->skill_fos)))
- {
- search();
- }
-
- /* Continuous Searching */
- if (p_ptr->searching)
- {
- search();
- }
-
/* Handle "objects" */
carry(do_pickup);
@@ -3215,26 +3027,6 @@ void move_player_aux(int dir, int do_pickup, int run, bool_ disarm)
if (running) msg_print(NULL);
}
- /* Discover invisible traps */
- else if ((c_ptr->t_idx != 0) &&
- !(f_info[cave[y][x].feat].flags & FF_DOOR))
- {
- /* Disturb */
- disturb(0);
-
- if (!(c_ptr->info & (CAVE_TRDT)))
- {
- /* Message */
- msg_print("You found a trap!");
-
- /* Pick a trap */
- pick_trap(p_ptr->py, p_ptr->px);
- }
-
- /* Hit the trap */
- hit_trap();
- }
-
/* Execute the inscription */
else if (c_ptr->inscription)
{
@@ -3263,9 +3055,9 @@ void move_player_aux(int dir, int do_pickup, int run, bool_ disarm)
}
}
-void move_player(int dir, int do_pickup, bool_ disarm)
+void move_player(int dir, int do_pickup)
{
- move_player_aux(dir, do_pickup, 0, disarm);
+ move_player_aux(dir, do_pickup, 0);
}
@@ -3276,14 +3068,6 @@ static int see_obstacle_grid(cave_type *c_ptr)
{
auto const &f_info = game->edit_data.f_info;
- /*
- * Hack -- Avoid hitting detected traps, because we cannot rely on
- * the CAVE_MARK check below, and traps can be set to nearly
- * everything the player can move on to XXX XXX XXX
- */
- if (c_ptr->info & (CAVE_TRDT)) return (TRUE);
-
-
/* Hack -- Handle special cases XXX XXX */
switch (c_ptr->feat)
{
@@ -3765,9 +3549,6 @@ static bool_ run_test(void)
notice = FALSE;
}
- /* A detected trap is interesting */
- if (c_ptr->info & (CAVE_TRDT)) notice = TRUE;
-
/* Interesting feature */
if (notice) return (TRUE);
@@ -3775,9 +3556,6 @@ static bool_ run_test(void)
inv = FALSE;
}
- /* Mega-Hack -- Maze code removes CAVE_MARK XXX XXX XXX */
- if (c_ptr->info & (CAVE_TRDT)) return (TRUE);
-
/* Analyze unknown grids and floors */
if (inv || cave_floor_bold(row, col))
{
@@ -4050,7 +3828,7 @@ void run_step(int dir)
/* Move the player, using the "pickup" flag */
- move_player_aux(find_current, options->always_pickup, 1, TRUE);
+ move_player_aux(find_current, options->always_pickup, 1);
}
diff --git a/src/cmd1.hpp b/src/cmd1.hpp
index 3ae44ed2..c7c4f064 100644
--- a/src/cmd1.hpp
+++ b/src/cmd1.hpp
@@ -14,8 +14,8 @@ extern void search(void);
extern void carry(int pickup);
extern void py_attack(int y, int x, int max_blow);
extern bool_ player_can_enter(byte feature);
-extern void move_player(int dir, int do_pickup, bool_ disarm);
-extern void move_player_aux(int dir, int do_pickup, int run, bool_ disarm);
+extern void move_player(int dir, int do_pickup);
+extern void move_player_aux(int dir, int do_pickup, int run);
extern void run_step(int dir);
extern void do_cmd_pet(void);
extern void do_cmd_integrate_body();
diff --git a/src/cmd2.cc b/src/cmd2.cc
index e4378699..dce9273d 100644
--- a/src/cmd2.cc
+++ b/src/cmd2.cc
@@ -44,8 +44,6 @@
#include "spells3.hpp"
#include "stats.hpp"
#include "tables.hpp"
-#include "trap_type.hpp"
-#include "traps.hpp"
#include "util.hpp"
#include "util.h"
#include "variable.h"
@@ -368,8 +366,6 @@ void do_cmd_go_down(void)
bool_ go_down = FALSE, go_down_many = FALSE, prob_traveling = FALSE;
- bool_ fall_trap = FALSE;
-
char i;
int old_dun = dun_level;
@@ -385,8 +381,6 @@ void do_cmd_go_down(void)
if (p_ptr->astral && (dun_level == 98)) return;
- if (c_ptr->t_idx == TRAP_OF_SINKING) fall_trap = TRUE;
-
/* test if on special level */
if (dungeon_flags & DF_ASK_LEAVE)
{
@@ -475,7 +469,7 @@ void do_cmd_go_down(void)
}
}
- else if (!(fall_trap))
+ else
{
msg_print("I see no down staircase here.");
return;
@@ -485,15 +479,10 @@ void do_cmd_go_down(void)
{
energy_use = 0;
- if (fall_trap)
- msg_print("You deliberately jump through the trap door.");
+ if (c_ptr->feat == FEAT_WAY_MORE)
+ msg_print("You enter the next area.");
else
- {
- if (c_ptr->feat == FEAT_WAY_MORE)
- msg_print("You enter the next area.");
- else
- msg_print("You enter a maze of down staircases.");
- }
+ msg_print("You enter a maze of down staircases.");
autosave_checkpoint();
@@ -563,58 +552,9 @@ void do_cmd_go_down(void)
/* Leaving */
p_ptr->leaving = TRUE;
-
- if (!fall_trap)
- {
- /* Create a way back */
- if (go_down_many)
- create_up_shaft = TRUE;
- else
- create_up_stair = TRUE;
- }
- }
-}
-
-
-
-/*
- * Simple command to "search" for one turn
- */
-void do_cmd_search(void)
-{
- /* Allow repeated command */
- if (command_arg)
- {
- /* Set repeat count */
- command_rep = command_arg - 1;
-
- /* Redraw the state */
- p_ptr->redraw |= (PR_FRAME);
-
- /* Cancel the arg */
- command_arg = 0;
}
-
- /* Take a turn */
- energy_use = 100;
-
- /* Search */
- search();
-}
-
-
-/*
- * Hack -- toggle search mode
- */
-void do_cmd_toggle_search(void)
-{
- p_ptr->update |= (PU_BONUS);
- p_ptr->redraw |= (PR_FRAME);
- p_ptr->searching = !p_ptr->searching;
}
-
-
/*
* Determine if a grid contains a chest
*/
@@ -726,43 +666,6 @@ static void chest_death(int y, int x, s16b o_idx)
/*
- * Chests have traps too.
- *
- * Exploding chest destroys contents (and traps).
- * Note that the chest itself is never destroyed.
- */
-static void chest_trap(int y, int x, s16b o_idx)
-{
- auto &t_info = game->edit_data.t_info;
-
- int trap;
-
- object_type *o_ptr = &o_list[o_idx];
-
- bool_ ident = FALSE;
-
-
- /* Ignore disarmed chests */
- if (o_ptr->pval <= 0) return;
-
- /* Obtain the trap */
- trap = o_ptr->pval;
-
- /* Message */
- msg_print("You found a trap!");
-
- /* Set off trap */
- ident = player_activate_trap_type(y, x, o_ptr, o_idx);
- if (ident)
- {
- t_info[o_ptr->pval].ident = TRUE;
- msg_format("You identified the trap as %s.",
- t_info[trap].name);
- }
-}
-
-
-/*
* Attempt to open the given chest at the given location
*
* Assume there is no monster blocking the destination
@@ -801,7 +704,7 @@ static bool_ do_cmd_open_chest(int y, int x, s16b o_idx)
flag = FALSE;
/* Get the "disarm" factor */
- i = p_ptr->skill_dis;
+ i = 100;
/* Penalize some conditions */
if (p_ptr->blind || no_lite()) i = i / 10;
@@ -836,9 +739,6 @@ static bool_ do_cmd_open_chest(int y, int x, s16b o_idx)
/* Allowed to open */
if (flag)
{
- /* Apply chest traps, if any */
- chest_trap(y, x, o_idx);
-
/* Let the Chest drop items */
chest_death(y, x, o_idx);
}
@@ -875,16 +775,6 @@ static bool_ is_closed(cave_type *c_ptr)
return ((feat >= FEAT_DOOR_HEAD) && (feat <= FEAT_DOOR_TAIL));
}
-
-/*
- * Return TRUE if the given grid has a trap
- */
-static bool_ is_trap(cave_type *c_ptr)
-{
- return ((c_ptr->info & (CAVE_TRDT)) != 0);
-}
-
-
/*
* Return the number of doors/traps around (or under)
* the character using the filter function 'test'
@@ -966,9 +856,6 @@ static int count_chests(int *y, int *x, bool_ trapped)
/* Already open */
if (o_ptr->pval == 0) continue;
- /* No (known) traps here */
- if (trapped && (!object_known_p(o_ptr) || !o_ptr->pval)) continue;
-
/* OK */
++count;
@@ -1052,7 +939,7 @@ static bool_ do_cmd_open_aux(int y, int x, int dir)
else if (c_ptr->feat >= FEAT_DOOR_HEAD + 0x01)
{
/* Disarm factor */
- i = p_ptr->skill_dis;
+ i = 100;
/* Penalize some conditions */
if (p_ptr->blind || no_lite()) i = i / 10;
@@ -1073,9 +960,6 @@ static bool_ do_cmd_open_aux(int y, int x, int dir)
/* Message */
msg_print("You have picked the lock.");
- /* Set off trap */
- if (c_ptr->t_idx != 0) player_activate_door_trap(y, x);
-
/* Open the door */
cave_set_feat(y, x, FEAT_OPEN);
@@ -1103,9 +987,6 @@ static bool_ do_cmd_open_aux(int y, int x, int dir)
/* Closed door */
else
{
- /* Set off trap */
- if (c_ptr->t_idx != 0) player_activate_door_trap(y, x);
-
/* Open the door */
cave_set_feat(y, x, FEAT_OPEN);
@@ -1274,9 +1155,6 @@ static bool_ do_cmd_close_aux(int y, int x, int dir)
/* Get grid and contents */
c_ptr = &cave[y][x];
- /* Set off trap */
- if (c_ptr->t_idx != 0) player_activate_door_trap(y, x);
-
/* Broken door */
if (c_ptr->feat == FEAT_BROKEN)
{
@@ -1532,9 +1410,6 @@ static bool_ do_cmd_tunnel_aux(int y, int x, int dir)
/* We may continue chopping */
msg_print(f_ptr->tunnel);
more = TRUE;
-
- /* Occasional Search XXX XXX */
- if (rand_int(100) < 25) search();
}
}
@@ -1685,9 +1560,6 @@ static bool_ do_cmd_tunnel_aux(int y, int x, int dir)
msg_print("You have finished the tunnel.");
c_ptr->mimic = 0;
lite_spot(y, x);
-
- /* Set off trap */
- if (c_ptr->t_idx != 0) player_activate_door_trap(y, x);
}
/* Keep trying */
@@ -1702,9 +1574,6 @@ static bool_ do_cmd_tunnel_aux(int y, int x, int dir)
/* We may continue tunelling */
msg_print(f_info[feat].tunnel);
more = TRUE;
-
- /* Occasional Search XXX XXX */
- if (rand_int(100) < 25) search();
}
}
@@ -1796,16 +1665,8 @@ void do_cmd_tunnel(void)
/* Get grid */
c_ptr = &cave[y][x];
- /* No tunnelling through doors */
- if (((c_ptr->feat >= FEAT_DOOR_HEAD) &&
- (c_ptr->feat <= FEAT_DOOR_TAIL)) || (c_ptr->feat == FEAT_SHOP))
- {
- /* Message */
- msg_print("You cannot tunnel through doors.");
- }
-
/* No tunnelling through air */
- else if (cave_floor_grid(c_ptr))
+ if (cave_floor_grid(c_ptr))
{
/* Message */
msg_print("You cannot tunnel through air.");
@@ -1836,308 +1697,6 @@ void do_cmd_tunnel(void)
if (!more) disturb(0);
}
-
-/*
- * Perform the basic "disarm" command
- *
- * Assume destination is a visible trap
- *
- * Assume there is no monster blocking the destination
- *
- * Returns TRUE if repeated commands may continue
- */
-static bool_ do_cmd_disarm_chest(int y, int x, s16b o_idx)
-{
- auto const &t_info = game->edit_data.t_info;
-
- int i, j;
-
- bool_ more = FALSE;
-
- object_type *o_ptr = &o_list[o_idx];
-
- auto t_ptr = &t_info[o_ptr->pval];
-
-
- /* Take a turn */
- energy_use = 100;
-
- /* Get the "disarm" factor */
- i = p_ptr->skill_dis;
-
- /* Penalize some conditions */
- if (p_ptr->blind || no_lite()) i = i / 10;
- if (p_ptr->confused || p_ptr->image) i = i / 10;
-
- /* Extract the difficulty */
- j = i - t_ptr->difficulty * 3;
-
- /* Always have a small chance of success */
- if (j < 2) j = 2;
-
- /* Must find the trap first. */
- if (!object_known_p(o_ptr))
- {
- msg_print("I don't see any traps.");
- }
-
- /* Already disarmed/unlocked */
- else if (o_ptr->pval <= 0)
- {
- msg_print("The chest is not trapped.");
- }
-
- /* Success (get a lot of experience) */
- else if (rand_int(100) < j)
- {
- msg_print("You have disarmed the chest.");
- gain_exp(t_ptr->difficulty * 3);
- o_ptr->pval = (0 - o_ptr->pval);
- }
-
- /* Failure -- Keep trying */
- else if ((i > 5) && (randint(i) > 5))
- {
- /* We may keep trying */
- more = TRUE;
- flush_on_failure();
- msg_print("You failed to disarm the chest.");
- }
-
- /* Failure -- Set off the trap */
- else
- {
- msg_print("You set off a trap!");
- chest_trap(y, x, o_idx);
- }
-
- /* Result */
- return (more);
-}
-
-
-/*
- * Perform the basic "disarm" command
- *
- * Assume destination is a visible trap
- *
- * Assume there is no monster blocking the destination
- *
- * Returns TRUE if repeated commands may continue
- */
-static bool_ do_cmd_disarm_aux(int y, int x, int dir, int do_pickup)
-{
- auto const &f_info = game->edit_data.f_info;
- auto const &t_info = game->edit_data.t_info;
-
- int i, j, power;
-
- cptr name;
-
- bool_ more = FALSE;
-
-
- /* Take a turn */
- energy_use = 100;
-
- /* Get grid and contents */
- auto c_ptr = &cave[y][x];
-
- /* Access trap name */
- if (t_info[c_ptr->t_idx].ident)
- {
- name = t_info[c_ptr->t_idx].name;
- }
- else
- {
- name = "unknown trap";
- }
-
- /* Get the "disarm" factor */
- i = p_ptr->skill_dis;
-
- /* Penalize some conditions */
- if (p_ptr->blind || no_lite()) i = i / 10;
- if (p_ptr->confused || p_ptr->image) i = i / 10;
-
- /* XXX XXX XXX Variable power? */
-
- /* Extract trap "power" */
- power = t_info[c_ptr->t_idx].difficulty;
-
- /* Extract the difficulty */
- j = i - power;
-
- /* Always have a small chance of success */
- if (j < 2) j = 2;
-
- /* Success */
- if (rand_int(100) < j)
- {
- /* Message */
- msg_format("You have disarmed the %s.", name);
-
- /* Reward */
- gain_exp(power);
-
- /* Forget the trap */
- c_ptr->info &= ~(CAVE_MARK | CAVE_TRDT);
-
- /* Remove the trap */
- c_ptr->t_idx = 0;
-
- /* Move the player onto the trap */
- if (!(f_info[c_ptr->feat].flags & FF_DOOR))
- move_player_aux(dir, do_pickup, 0, TRUE);
-
- /* Remove trap attr from grid */
- note_spot(y, x);
- lite_spot(y, x);
- }
-
- /* Failure -- Keep trying */
- else if ((i > 5) && (randint(i) > 5))
- {
- /* Failure */
- flush_on_failure();
-
- /* Message */
- msg_format("You failed to disarm the %s.", name);
-
- /* We may keep trying */
- more = TRUE;
- }
-
- /* Failure -- Set off the trap */
- else
- {
- /* Message */
- msg_format("You set off the %s!", name);
-
- /* Move the player onto the trap */
- if (!(f_info[c_ptr->feat].flags & FF_DOOR))
- move_player_aux(dir, do_pickup, 0, FALSE);
- }
-
- /* Result */
- return (more);
-}
-
-
-/*
- * Disamrs the monster traps(no failure)
- */
-void do_cmd_disarm_mon_trap(int y, int x)
-{
- msg_print("You disarm the monster trap.");
-
- place_floor_convert_glass(y, x);
- cave[p_ptr->py][p_ptr->px].special = cave[p_ptr->py][p_ptr->px].special2 = 0;
-}
-
-
-/*
- * Disarms a trap, or chest
- */
-void do_cmd_disarm(void)
-{
- int y, x, dir;
-
- s16b o_idx;
-
- cave_type *c_ptr;
-
- bool_ more = FALSE;
-
-
- /* Pick a direction if there's an obvious choice */
- {
- int num_traps, num_chests;
-
- /* Count visible traps */
- num_traps = count_feats(&y, &x, is_trap, TRUE);
-
- /* Count chests (trapped) */
- num_chests = count_chests(&y, &x, TRUE);
-
- /* See if only one target */
- if (num_traps || num_chests)
- {
- if (num_traps + num_chests <= 1)
- command_dir = coords_to_dir(y, x);
- }
- }
-
- /* Allow repeated command */
- if (command_arg)
- {
- /* Set repeat count */
- command_rep = command_arg - 1;
-
- /* Redraw the state */
- p_ptr->redraw |= (PR_FRAME);
-
- /* Cancel the arg */
- command_arg = 0;
- }
-
- /* Get a direction (or abort) */
- if (get_rep_dir(&dir))
- {
- /* Get location */
- y = p_ptr->py + ddy[dir];
- x = p_ptr->px + ddx[dir];
-
- /* Get grid and contents */
- c_ptr = &cave[y][x];
-
- /* Check for chests */
- o_idx = chest_check(y, x);
-
- /* Disarm a trap */
- if (((c_ptr->t_idx == 0) || (!(c_ptr->info & CAVE_TRDT))) &&
- !o_idx && (c_ptr->feat != FEAT_MON_TRAP))
- {
- /* Message */
- msg_print("You see nothing there to disarm.");
- }
-
- /* Monster in the way */
- else if (c_ptr->m_idx)
- {
- /* Message */
- msg_print("There is a monster in the way!");
-
- /* Attack */
- py_attack(y, x, -1);
- }
-
- /* Disarm chest */
- else if (o_idx)
- {
- /* Disarm the chest */
- more = do_cmd_disarm_chest(y, x, o_idx);
- }
-
- /* Disarm trap */
- else
- {
- /* Disarm the trap */
- if (c_ptr->feat == FEAT_MON_TRAP)
- {
- do_cmd_disarm_mon_trap(y, x);
- more = FALSE;
- }
- else
- more = do_cmd_disarm_aux(y, x, dir, options->always_pickup);
- }
- }
-
- /* Cancel repeat unless told not to */
- if (!more) disturb(0);
-}
-
-
/*
* Perform the basic "bash" command
*
@@ -2198,23 +1757,17 @@ static bool_ do_cmd_bash_aux(int y, int x, int dir)
/* Break down the door */
if (rand_int(100) < 50)
{
- /* Set off trap */
- if (c_ptr->t_idx != 0) player_activate_door_trap(y, x);
-
cave_set_feat(y, x, FEAT_BROKEN);
}
/* Open the door */
else
{
- /* Set off trap */
- if (c_ptr->t_idx != 0) player_activate_door_trap(y, x);
-
cave_set_feat(y, x, FEAT_OPEN);
}
/* Hack -- Fall through the door. Can't disarm while falling. */
- move_player_aux(dir, options->always_pickup, 0, FALSE);
+ move_player_aux(dir, options->always_pickup, 0);
/* Update some things */
p_ptr->update |= (PU_VIEW | PU_MON_LITE);
@@ -2418,13 +1971,6 @@ void do_cmd_alter(void)
more = do_cmd_tunnel_aux(y, x, dir);
}
- /* Disarm traps */
- else if (c_ptr->t_idx != 0)
- {
- /* Tunnel */
- more = do_cmd_disarm_aux(y, x, dir, options->always_pickup);
- }
-
/* Oops */
else
{
@@ -2545,7 +2091,7 @@ void do_cmd_spike(void)
}
-static void do_cmd_walk_jump(int pickup, bool_ disarm)
+static void do_cmd_walk_jump(int pickup)
{
auto const &wf_info = game->edit_data.wf_info;
@@ -2574,7 +2120,7 @@ static void do_cmd_walk_jump(int pickup, bool_ disarm)
energy_use = 100;
/* Actually move the character */
- move_player(dir, pickup, disarm);
+ move_player(dir, pickup);
/* Allow more walking */
more = TRUE;
@@ -2749,7 +2295,7 @@ static void do_cmd_unwalk()
else if (((feat >= FEAT_QUEST_ENTER) && (feat <= FEAT_QUEST_UP)) ||
((feat >= FEAT_LESS) && (feat <= FEAT_MORE)))
{
- move_player(dir, options->always_pickup, TRUE);
+ move_player(dir, options->always_pickup);
more = FALSE;
}
@@ -2766,7 +2312,7 @@ static void do_cmd_unwalk()
while (dir == 5);
}
- move_player(dir, options->always_pickup, TRUE);
+ move_player(dir, options->always_pickup);
}
/* Walking semantics */
@@ -2783,7 +2329,7 @@ static void do_cmd_unwalk()
/*
* Support code for the "Walk" and "Jump" commands
*/
-void do_cmd_walk(int pickup, bool_ disarm)
+void do_cmd_walk(int pickup)
{
/* Move (usually pickup) */
@@ -2793,7 +2339,7 @@ void do_cmd_walk(int pickup, bool_ disarm)
}
else
{
- do_cmd_walk_jump(pickup, disarm);
+ do_cmd_walk_jump(pickup);
}
}
@@ -2866,20 +2412,6 @@ void do_cmd_stay(int pickup)
/* Take a turn */
energy_use = 100;
-
- /* Spontaneous Searching */
- if ((p_ptr->skill_fos >= 50) || (0 == rand_int(50 - p_ptr->skill_fos)))
- {
- search();
- }
-
- /* Continuous Searching */
- if (p_ptr->searching)
- {
- search();
- }
-
-
/* Handle "objects" */
carry(pickup);
@@ -2973,9 +2505,6 @@ void do_cmd_rest(void)
/* Save the rest code */
resting = command_arg;
- /* Cancel searching */
- p_ptr->searching = FALSE;
-
/* Recalculate bonuses */
p_ptr->update |= (PU_BONUS);
diff --git a/src/cmd2.hpp b/src/cmd2.hpp
index 142238ab..f811cf45 100644
--- a/src/cmd2.hpp
+++ b/src/cmd2.hpp
@@ -19,7 +19,7 @@ extern void do_cmd_disarm(void);
extern void do_cmd_bash(void);
extern void do_cmd_alter(void);
extern void do_cmd_spike(void);
-extern void do_cmd_walk(int pickup, bool_ disarm);
+extern void do_cmd_walk(int pickup);
extern void do_cmd_stay(int pickup);
extern void do_cmd_run(void);
extern void do_cmd_rest(void);
diff --git a/src/cmd4.cc b/src/cmd4.cc
index 8d1b0079..2dcb0beb 100644
--- a/src/cmd4.cc
+++ b/src/cmd4.cc
@@ -34,7 +34,6 @@
#include "squeltch.hpp"
#include "tables.hpp"
#include "town_type.hpp"
-#include "trap_type.hpp"
#include "util.hpp"
#include "util.h"
#include "variable.h"
@@ -3237,35 +3236,6 @@ void do_cmd_knowledge_artifacts(void)
}
-/*
- * Check the status of traps
- */
-void do_cmd_knowledge_traps(void)
-{
- auto const &t_info = game->edit_data.t_info;
-
- fmt::MemoryWriter w;
- /* Scan the traps */
- for (auto const &t_ref: t_info)
- {
- /* Get the trap */
- auto t_ptr = &t_ref;
-
- /* Skip "empty" traps */
- if (!t_ptr->name) continue;
-
- /* Skip unidentified traps */
- if (!t_ptr->ident) continue;
-
- /* Hack -- Build the trap name */
- w.write(" {}\n", t_ptr->name);
- }
-
- /* Display the file contents */
- show_string(w.c_str(), "Traps known");
-}
-
-
static int monster_get_race_level(int r_idx)
{
auto const &r_info = game->edit_data.r_info;
@@ -3822,12 +3792,11 @@ void do_cmd_knowledge(void)
prt("(7) Display current pets", 10, 5);
prt("(8) Display current quests", 11, 5);
prt("(9) Display current fates", 12, 5);
- prt("(0) Display known traps", 13, 5);
- prt("(A) Display known dungeon towns", 14, 5);
- prt("(B) Display notes", 15, 5);
+ prt("(0) Display known dungeon towns", 13, 5);
+ prt("(A) Display notes", 14, 5);
/* Prompt */
- prt("Command: ", 17, 0);
+ prt("Command: ", 16, 0);
/* Prompt */
i = inkey();
@@ -3909,17 +3878,8 @@ void do_cmd_knowledge(void)
break;
}
- /* Traps */
- case '0':
- {
- do_cmd_knowledge_traps();
-
- break;
- }
-
/* Dungeon towns */
- case 'A':
- case 'a':
+ case '0':
{
do_cmd_knowledge_towns();
@@ -3927,8 +3887,8 @@ void do_cmd_knowledge(void)
}
/* Notes */
- case 'B':
- case 'b':
+ case 'A':
+ case 'a':
{
do_cmd_knowledge_notes();
diff --git a/src/cmd5.cc b/src/cmd5.cc
index a94f925a..91c12e83 100644
--- a/src/cmd5.cc
+++ b/src/cmd5.cc
@@ -1570,13 +1570,6 @@ static void apply_monster_power(monster_race const *r_ptr, std::size_t monster_s
break;
}
- case SF_TRAPS_IDX:
- {
- trap_creation();
-
- break;
- }
-
case SF_S_THUNDERLORD_IDX:
{
for (int k = 0; k < 1; k++)
diff --git a/src/cmd6.cc b/src/cmd6.cc
index d6df7570..70f35bd0 100644
--- a/src/cmd6.cc
+++ b/src/cmd6.cc
@@ -2296,7 +2296,6 @@ static bool_ quaff_potion(int tval, int sval, int pval, int pval2)
wiz_lite_extra();
(void)do_inc_stat(A_INT);
(void)do_inc_stat(A_WIS);
- (void)detect_traps(DEFAULT_RADIUS);
(void)detect_doors(DEFAULT_RADIUS);
(void)detect_stairs(DEFAULT_RADIUS);
(void)detect_treasure(DEFAULT_RADIUS);
@@ -3094,13 +3093,6 @@ void do_cmd_read_scroll(void)
break;
}
- case SV_SCROLL_TRAP_CREATION:
- {
- if (trap_creation()) ident = TRUE;
-
- break;
- }
-
case SV_SCROLL_PHASE_DOOR:
{
teleport_player(10);
@@ -3278,13 +3270,6 @@ void do_cmd_read_scroll(void)
break;
}
- case SV_SCROLL_DETECT_TRAP:
- {
- if (detect_traps(DEFAULT_RADIUS)) ident = TRUE;
-
- break;
- }
-
case SV_SCROLL_DETECT_DOOR:
{
if (detect_doors(DEFAULT_RADIUS)) ident = TRUE;
@@ -3360,13 +3345,6 @@ void do_cmd_read_scroll(void)
break;
}
- case SV_SCROLL_TRAP_DOOR_DESTRUCTION:
- {
- if (destroy_doors_touch()) ident = TRUE;
-
- break;
- }
-
case SV_SCROLL_STAR_DESTRUCTION:
{
/* Prevent destruction of quest levels and town */
@@ -4142,7 +4120,6 @@ void do_cmd_zap_rod(void)
{
switch (o_ptr->pval)
{
- case SV_ROD_DETECT_TRAP:
case SV_ROD_HAVOC:
case SV_ROD_HOME:
{
@@ -4254,13 +4231,6 @@ void do_cmd_zap_rod(void)
break;
}
- case SV_ROD_DETECT_TRAP:
- {
- if (detect_traps(DEFAULT_RADIUS)) ident = TRUE;
-
- break;
- }
-
case SV_ROD_DETECT_DOOR:
{
if (detect_doors(DEFAULT_RADIUS)) ident = TRUE;
@@ -4374,13 +4344,6 @@ void do_cmd_zap_rod(void)
break;
}
- case SV_ROD_DISARMING:
- {
- if (disarm_trap(dir)) ident = TRUE;
-
- break;
- }
-
case SV_ROD_LITE:
{
msg_print("A line of blue shimmering light appears.");
@@ -5670,7 +5633,6 @@ const char *activation_aux(object_type * o_ptr, bool_ doit, int item)
if (!doit) return "clairvoyance every 100+d100 turns";
msg_print("The stone glows a deep green...");
wiz_lite_extra();
- (void)detect_traps(DEFAULT_RADIUS);
(void)detect_doors(DEFAULT_RADIUS);
(void)detect_stairs(DEFAULT_RADIUS);
@@ -7282,8 +7244,7 @@ const char *activation_aux(object_type * o_ptr, bool_ doit, int item)
c_ptr->info &= ~(CAVE_GLOW);
/* Hack -- Forget "boring" grids */
- if (cave_plain_floor_grid(c_ptr) &&
- !(c_ptr->info & (CAVE_TRDT)))
+ if (cave_plain_floor_grid(c_ptr))
{
/* Forget the grid */
c_ptr->info &= ~(CAVE_MARK);
diff --git a/src/cmd7.cc b/src/cmd7.cc
index 85da374c..48747cfb 100644
--- a/src/cmd7.cc
+++ b/src/cmd7.cc
@@ -484,7 +484,6 @@ void do_cmd_mindcraft(void)
{
b = detect_monsters_normal(DEFAULT_RADIUS);
if (plev > 14) b |= detect_monsters_invis(DEFAULT_RADIUS);
- if (plev > 4) b |= detect_traps(DEFAULT_RADIUS);
}
else
{
@@ -3508,7 +3507,7 @@ void do_cmd_unbeliever()
/* Select what to do */
while (TRUE)
{
- if (!get_com("Disrupt [C]ontinuum or [D]etect Traps", &ch))
+ if (!get_com("Disrupt [C]ontinuum or [D]estroy Doors", &ch))
{
ext = 0;
break;
@@ -3534,20 +3533,18 @@ void do_cmd_unbeliever()
break;
}
- /* Detect Traps */
+ /* Destroy Doors */
case 2:
{
s16b skill = get_skill(SKILL_ANTIMAGIC);
if (skill < 25)
{
- msg_print("You cannot use your detection abilities yet.");
+ msg_print("You cannot use your door destruction abilities yet.");
break;
}
- detect_traps(DEFAULT_RADIUS);
-
- if (skill >= 35) destroy_doors_touch();
+ destroy_doors_touch();
break;
}
diff --git a/src/defines.h b/src/defines.h
index 082fb291..7da8e038 100644
--- a/src/defines.h
+++ b/src/defines.h
@@ -114,13 +114,6 @@
*/
#define DEFAULT_RADIUS 25
-
-#define CHANCE_TRAP_JAMMED_DOOR 2500
-#define CHANCE_TRAP_SECRET_DOOR 1500
-#define CHANCE_TRAP_LOCKED_DOOR 1000
-#define CHANCE_TRAP_DOOR 500 /* in 10000 */
-#define CHANCE_TRAP_FLOOR 4 /* in 10000 chance of placing a trap */
-
#define MAX_SPELLS 100
#define MAX_RUNES 100
@@ -383,7 +376,6 @@
#define MAX_STACK_SIZE 100
-/* XXX */
#define MKEY_MINDCRAFT 2
#define MKEY_ANTIMAGIC 3
#define MKEY_MIMIC 6
@@ -393,7 +385,6 @@
#define MKEY_FORGING 10
#define MKEY_INCARNATION 11
#define MKEY_SUMMON 13
-#define MKEY_TRAP 14
#define MKEY_STEAL 15
#define MKEY_DODGE 16
#define MKEY_SCHOOL 17
@@ -489,9 +480,6 @@
/* Feature 0x10 -- web */
-/* Traps */
-#define FEAT_TRAP 0x11
-
/* Features 0x12 - 0x1F -- unused */
/* Doors */
@@ -575,7 +563,6 @@
#define FEAT_MARKER 0xAC /* 172 */
/* Feature 0xAD -- Underground Tunnel */
#define FEAT_TAINTED_WATER 0xAE /* 174 */
-#define FEAT_MON_TRAP 0xAF /* 175 */
#define FEAT_BETWEEN2 0xB0 /* 176 */
#define FEAT_LAVA_WALL 0xB1 /* 177 */
#define FEAT_GREAT_FIRE 0xB2 /* 178 */
@@ -972,7 +959,6 @@
#define TV_LITE 39 /* Lites (including Specials) */
#define TV_AMULET 40 /* Amulets (including Specials) */
#define TV_RING 45 /* Rings (including Specials) */
-#define TV_TRAPKIT 46 /* Trapkits */
#define TV_TOTEM 54 /* Summoner totems */
#define TV_STAFF 55
#define TV_WAND 65
@@ -1016,14 +1002,6 @@
#define SV_HARP 59
#define SV_HORN 60
-/* The "sval" codes for TV_TRAPKIT */
-#define SV_TRAPKIT_SLING 1
-#define SV_TRAPKIT_BOW 2
-#define SV_TRAPKIT_XBOW 3
-#define SV_TRAPKIT_POTION 4
-#define SV_TRAPKIT_SCROLL 5
-#define SV_TRAPKIT_DEVICE 6
-
/* The "sval" codes for TV_BOOMERANG */
#define SV_BOOM_S_WOOD 1 /* 1d4 */
#define SV_BOOM_WOOD 2 /* 1d8 */
@@ -1387,7 +1365,6 @@
#define SV_ROD_RESTORATION 10
#define SV_ROD_SPEED 11
#define SV_ROD_TELEPORT_AWAY 13
-#define SV_ROD_DISARMING 14
#define SV_ROD_LITE 15
#define SV_ROD_SLEEP_MONSTER 16
#define SV_ROD_SLOW_MONSTER 17
@@ -1402,7 +1379,6 @@
#define SV_ROD_FIRE_BALL 26
#define SV_ROD_COLD_BALL 27
#define SV_ROD_HAVOC 28
-#define SV_ROD_DETECT_TRAP 29
#define SV_ROD_HOME 30
@@ -1428,7 +1404,6 @@
#define SV_SCROLL_SUMMON_MONSTER 4
#define SV_SCROLL_SUMMON_UNDEAD 5
#define SV_SCROLL_SUMMON_MINE 6
-#define SV_SCROLL_TRAP_CREATION 7
#define SV_SCROLL_PHASE_DOOR 8
#define SV_SCROLL_TELEPORT 9
#define SV_SCROLL_TELEPORT_LEVEL 10
@@ -1449,7 +1424,6 @@
#define SV_SCROLL_MAPPING 25
#define SV_SCROLL_DETECT_GOLD 26
#define SV_SCROLL_DETECT_ITEM 27
-#define SV_SCROLL_DETECT_TRAP 28
#define SV_SCROLL_DETECT_DOOR 29
#define SV_SCROLL_DETECT_INVIS 30
#define SV_SCROLL_DIVINATION 31
@@ -1460,7 +1434,6 @@
#define SV_SCROLL_MONSTER_CONFUSION 36
#define SV_SCROLL_PROTECTION_FROM_EVIL 37
#define SV_SCROLL_RUNE_OF_PROTECTION 38
-#define SV_SCROLL_TRAP_DOOR_DESTRUCTION 39
#define SV_SCROLL_DEINCARNATION 40
#define SV_SCROLL_STAR_DESTRUCTION 41
#define SV_SCROLL_DISPEL_UNDEAD 42
@@ -1492,7 +1465,6 @@
#define SV_POTION_SLEEP 11
#define SV_POTION_LEARNING 12
#define SV_POTION_LOSE_MEMORIES 13
-/* xxx */
#define SV_POTION_RUINATION 15
#define SV_POTION_DEC_STR 16
#define SV_POTION_DEC_INT 17
@@ -1532,7 +1504,6 @@
#define SV_POTION_INC_DEX 51
#define SV_POTION_INC_CON 52
#define SV_POTION_INC_CHR 53
-/* xxx */
#define SV_POTION_AUGMENTATION 55
#define SV_POTION_ENLIGHTENMENT 56
#define SV_POTION_STAR_ENLIGHTENMENT 57
@@ -1620,13 +1591,6 @@
*/
#define SV_BOOK_MAX_GOOD 49
-/* flags for operation in get_random_trap in object3.c */
-
-#define TRAP_EXISTS 0x00000001L
-#define TRAP_FOUND 0x00000002L
-#define TRAP_NOTFOUND 0x00000004L
-#define TRAP_IDENTIFIED 0x00000008L
-
/*** General flag values ***/
@@ -1641,11 +1605,9 @@
#define CAVE_VIEW 0x0020 /* view flag */
#define CAVE_TEMP 0x0040 /* temp flag */
#define CAVE_WALL 0x0080 /* wall flag */
-#define CAVE_TRDT 0x0100 /* trap detected */
#define CAVE_IDNT 0x0200 /* grid identified (fountains) */
#define CAVE_SPEC 0x0400 /* special mark(quests) */
#define CAVE_FREE 0x0800 /* no random generation on it */
-#define CAVE_DETECT 0x1000 /* Traps detected here */
#define CAVE_PLIT 0x2000 /* Player lit grid */
#define CAVE_MLIT 0x4000 /* Monster lit grid */
@@ -1728,7 +1690,6 @@
#define SM_OPP_POIS 0x00100000
#define SM_OPP_XXX1 0x00200000
#define SM_CLONED 0x00400000
-#define SM_NOTE_TRAP 0x00800000
#define SM_IMM_ACID 0x01000000
#define SM_IMM_ELEC 0x02000000
#define SM_IMM_FIRE 0x04000000
@@ -1775,17 +1736,12 @@
#define PU_MANA 0x00000020L /* Calculate csp and msp */
#define PU_SPELLS 0x00000040L /* Calculate spells */
#define PU_POWERS 0x00000080L /* Calculate powers */
-/* xxx (many) */
#define PU_UN_VIEW 0x00010000L /* Forget view */
-/* xxx (many) */
#define PU_VIEW 0x00100000L /* Update view */
#define PU_MON_LITE 0x00200000L /* Update monster light */
-/* xxx */
#define PU_MONSTERS 0x01000000L /* Update monsters */
#define PU_DISTANCE 0x02000000L /* Update distances */
-/* xxx */
#define PU_FLOW 0x10000000L /* Update flow */
-/* xxx (many) */
/*
@@ -1800,215 +1756,20 @@
*/
#define PW_INVEN 0x00000001L /* Display inven/equip */
#define PW_EQUIP 0x00000002L /* Display equip/inven */
-/* xxx */
#define PW_PLAYER 0x00000008L /* Display character */
#define PW_M_LIST 0x00000010L /* Show monster list */
-/* xxx */
#define PW_MESSAGE 0x00000040L /* Display messages */
#define PW_OVERHEAD 0x00000080L /* Display overhead view */
#define PW_MONSTER 0x00000100L /* Display monster recall */
#define PW_OBJECT 0x00000200L /* Display object recall */
-/* xxx */
#define PW_SNAPSHOT 0x00000800L /* Display snap-shot */
-/* xxx */
/* jk */
-#define FTRAP_CHEST 0x000000001 /* may appear on chests */
-#define FTRAP_DOOR 0x000000002 /* may appear on doors/floors */
-#define FTRAP_FLOOR 0x000000004 /* may appear on floor */
-#define FTRAP_CHANGE 0x000000008 /* Color changing */
-#define FTRAP_XXX5 0x000000010
-#define FTRAP_XXX6 0x000000020
-#define FTRAP_XXX7 0x000000040
-#define FTRAP_XXX8 0x000000080
-#define FTRAP_XXX9 0x000000100
-#define FTRAP_XXX10 0x000000200
-#define FTRAP_XXX11 0x000000400
-#define FTRAP_XXX12 0x000000800
-#define FTRAP_XXX13 0x000001000
-#define FTRAP_XXX14 0x000002000
-#define FTRAP_XXX15 0x000004000
-#define FTRAP_XXX16 0x000008000
-#define FTRAP_LEVEL1 0x000010000 /* low level ball/bolt trap */
-#define FTRAP_LEVEL2 0x000020000 /* medium level ball/bolt trap */
-#define FTRAP_LEVEL3 0x000040000 /* high level ball/bolt trap */
-#define FTRAP_LEVEL4 0x000080000 /* oops level ball/bolt trap */
-#define FTRAP_XXX21 0x000100000
-#define FTRAP_XXX22 0x000200000
-#define FTRAP_XXX23 0x000400000
-#define FTRAP_XXX24 0x000800000
-#define FTRAP_XXX25 0x001000000
-#define FTRAP_XXX26 0x002000000
-#define FTRAP_XXX27 0x004000000
-#define FTRAP_XXX28 0x008000000
-#define FTRAP_XXX29 0x010000000
-#define FTRAP_XXX30 0x020000000
-#define FTRAP_XXX31 0x040000000
-#define FTRAP_XXX32 0x080000000
-
-/* jk */
#define STAT_DEC_TEMPORARY 1
#define STAT_DEC_NORMAL 2
#define STAT_DEC_PERMANENT 3
-/* jk - which trap is which number */
-#define TRAP_OF_WEAKNESS_I 1
-#define TRAP_OF_WEAKNESS_II 2
-#define TRAP_OF_WEAKNESS_III 3
-#define TRAP_OF_INTELLIGENCE_I 4
-#define TRAP_OF_INTELLIGENCE_II 5
-#define TRAP_OF_INTELLIGENCE_III 6
-#define TRAP_OF_WISDOM_I 7
-#define TRAP_OF_WISDOM_II 8
-#define TRAP_OF_WISDOM_III 9
-#define TRAP_OF_FUMBLING_I 10
-#define TRAP_OF_FUMBLING_II 11
-#define TRAP_OF_FUMBLING_III 12
-#define TRAP_OF_WASTING_I 13
-#define TRAP_OF_WASTING_II 14
-#define TRAP_OF_WASTING_III 15
-#define TRAP_OF_BEAUTY_I 16
-#define TRAP_OF_BEAUTY_II 17
-#define TRAP_OF_BEAUTY_III 18
-
-#define TRAP_OF_CURSE_WEAPON 20
-#define TRAP_OF_CURSE_ARMOR 21
-#define TRAP_OF_EARTHQUAKE 22
-#define TRAP_OF_POISON_NEEDLE 23
-#define TRAP_OF_SUMMON_MONSTER 24
-#define TRAP_OF_SUMMON_UNDEAD 25
-#define TRAP_OF_SUMMON_GREATER_UNDEAD 26
-#define TRAP_OF_TELEPORT 27
-#define TRAP_OF_PARALYZING 28
-#define TRAP_OF_EXPLOSIVE_DEVICE 29
-#define TRAP_OF_TELEPORT_AWAY 30
-#define TRAP_OF_LOSE_MEMORY 31
-#define TRAP_OF_BITTER_REGRET 32
-#define TRAP_OF_BOWEL_CRAMPS 33
-#define TRAP_OF_BLINDNESS_CONFUSION 34
-#define TRAP_OF_AGGRAVATION 35
-#define TRAP_OF_MULTIPLICATION 36
-#define TRAP_OF_STEAL_ITEM 37
-#define TRAP_OF_SUMMON_FAST_QUYLTHULGS 38
-#define TRAP_OF_SINKING 39
-#define TRAP_OF_MANA_DRAIN 40
-#define TRAP_OF_MISSING_MONEY 41
-#define TRAP_OF_NO_RETURN 42
-#define TRAP_OF_SILENT_SWITCHING 43
-#define TRAP_OF_WALLS 44
-#define TRAP_OF_CALLING_OUT 45
-#define TRAP_OF_SLIDING 46
-#define TRAP_OF_CHARGES_DRAIN 47
-#define TRAP_OF_STAIR_MOVEMENT 48
-#define TRAP_OF_NEW 49
-#define TRAP_OF_SCATTER_ITEMS 50
-#define TRAP_OF_DECAY 51
-#define TRAP_OF_WASTING_WANDS 52
-#define TRAP_OF_FILLING 53
-#define TRAP_OF_DRAIN_SPEED 54
-
-#define TRAP_OF_ELEC_BOLT 60
-#define TRAP_OF_POIS_BOLT 61
-#define TRAP_OF_ACID_BOLT 62
-#define TRAP_OF_COLD_BOLT 63
-#define TRAP_OF_FIRE_BOLT 64
-#define TRAP_OF_PLASMA_BOLT 65
-#define TRAP_OF_WATER_BOLT 66
-#define TRAP_OF_LITE_BOLT 67
-#define TRAP_OF_DARK_BOLT 68
-#define TRAP_OF_SHARDS_BOLT 69
-#define TRAP_OF_SOUND_BOLT 70
-#define TRAP_OF_CONFUSION_BOLT 71
-#define TRAP_OF_FORCE_BOLT 72
-#define TRAP_OF_INERTIA_BOLT 73
-#define TRAP_OF_MANA_BOLT 74
-#define TRAP_OF_ICE_BOLT 75
-#define TRAP_OF_CHAOS_BOLT 76
-#define TRAP_OF_NETHER_BOLT 77
-#define TRAP_OF_DISENCHANT_BOLT 78
-#define TRAP_OF_NEXUS_BOLT 79
-#define TRAP_OF_TIME_BOLT 80
-#define TRAP_OF_GRAVITY_BOLT 81
-
-#define TRAP_OF_ELEC_BALL 82
-#define TRAP_OF_POIS_BALL 83
-#define TRAP_OF_ACID_BALL 84
-#define TRAP_OF_COLD_BALL 85
-#define TRAP_OF_FIRE_BALL 86
-#define TRAP_OF_PLASMA_BALL 87
-#define TRAP_OF_WATER_BALL 88
-#define TRAP_OF_LITE_BALL 89
-#define TRAP_OF_DARK_BALL 90
-#define TRAP_OF_SHARDS_BALL 91
-#define TRAP_OF_SOUND_BALL 92
-#define TRAP_OF_CONFUSION_BALL 93
-#define TRAP_OF_FORCE_BALL 94
-#define TRAP_OF_INERTIA_BALL 95
-#define TRAP_OF_MANA_BALL 96
-#define TRAP_OF_ICE_BALL 97
-#define TRAP_OF_CHAOS_BALL 98
-#define TRAP_OF_NETHER_BALL 99
-#define TRAP_OF_DISENCHANT_BALL 100
-#define TRAP_OF_NEXUS_BALL 101
-#define TRAP_OF_TIME_BALL 102
-#define TRAP_OF_GRAVITY_BALL 103
-
-#define TRAP_OF_ARROW_I 110
-#define TRAP_OF_ARROW_II 111
-#define TRAP_OF_ARROW_III 112
-#define TRAP_OF_ARROW_IV 113
-#define TRAP_OF_POISON_ARROW_I 114
-#define TRAP_OF_POISON_ARROW_II 115
-#define TRAP_OF_POISON_ARROW_III 116
-#define TRAP_OF_POISON_ARROW_IV 117
-#define TRAP_OF_DAGGER_I 118
-#define TRAP_OF_DAGGER_II 119
-#define TRAP_OF_POISON_DAGGER_I 120
-#define TRAP_OF_POISON_DAGGER_II 121
-#define TRAP_OF_ARROWS_I 122
-#define TRAP_OF_ARROWS_II 123
-#define TRAP_OF_ARROWS_III 124
-#define TRAP_OF_ARROWS_IV 125
-#define TRAP_OF_POISON_ARROWS_I 126
-#define TRAP_OF_POISON_ARROWS_II 127
-#define TRAP_OF_POISON_ARROWS_III 128
-#define TRAP_OF_POISON_ARROWS_IV 129
-#define TRAP_OF_DAGGERS_I 130
-#define TRAP_OF_DAGGERS_II 131
-#define TRAP_OF_POISON_DAGGERS_I 132
-#define TRAP_OF_POISON_DAGGERS_II 133
-
-#define TRAP_OF_DROP_ITEMS 140
-#define TRAP_OF_DROP_ALL_ITEMS 141
-#define TRAP_OF_DROP_EVERYTHING 142
-
-#define TRAP_OF_ELDRITCH_HORROR 156
-
-#define TRAP_OF_DIVINE_ANGER 158
-#define TRAP_OF_DIVINE_WRATH 159
-#define TRAP_OF_HALLUCINATION 160
-
-#define TRAP_OF_ROCKET 161
-#define TRAP_OF_NUKE_BOLT 162
-#define TRAP_OF_DEATH_RAY 163
-#define TRAP_OF_HOLY_FIRE 164
-#define TRAP_OF_HELL_FIRE 165
-#define TRAP_OF_PSI_BOLT 166
-#define TRAP_OF_PSI_DRAIN 167
-#define TRAP_OF_NUKE_BALL 168
-#define TRAP_OF_PSI_BALL 169
-
-/* DG */
-#define TRAP_OF_ACQUIREMENT 170
-
-/* Runescrye */
-#define TRAP_G_ELEC_BOLT 171
-#define TRAP_G_POIS_BOLT 172
-#define TRAP_G_ACID_BOLT 173
-#define TRAP_G_COLD_BOLT 174
-#define TRAP_G_FIRE_BOLT 175
-
/*** General index values ***/
@@ -2089,10 +1850,8 @@
#define GF_GRAVITY 35
#define GF_KILL_WALL 40
#define GF_KILL_DOOR 41
-#define GF_KILL_TRAP 42
#define GF_MAKE_WALL 45
#define GF_MAKE_DOOR 46
-#define GF_MAKE_TRAP 47
#define GF_OLD_CLONE 51
#define GF_OLD_POLY 52
#define GF_OLD_HEAL 53
@@ -2768,7 +2527,6 @@
#define CMD_DUMP_HTML -8186
#define CMD_MACRO -8185
#define CMD_QUEST -8184
-#define CMD_BLUNDER -8183
#define CMD_SHOW_ABILITY -8182
#define CLI_MAX 128
@@ -2791,7 +2549,6 @@
#define AB_AMMO_CREATION 5
#define AB_DEATH_TOUCH 6
#define AB_FAR_REACHING 8
-#define AB_TRAPPING 9
#define AB_UNDEAD_FORM 10
/**
diff --git a/src/dungeon.cc b/src/dungeon.cc
index 1f3f6253..e73c9ac5 100644
--- a/src/dungeon.cc
+++ b/src/dungeon.cc
@@ -329,7 +329,6 @@ static sense_function_t select_sense(object_type *o_ptr, sense_function_t combat
case TV_HARD_ARMOR:
case TV_DRAG_ARMOR:
case TV_BOOMERANG:
- case TV_TRAPKIT:
{
return combat;
}
@@ -1674,8 +1673,8 @@ static void process_world(void)
}
- /* Searching or Resting */
- if (p_ptr->searching || resting)
+ /* Resting boosts regeneration */
+ if (resting)
{
regen_amount = regen_amount * 2;
}
@@ -3387,7 +3386,7 @@ static void process_command(void)
{
if (do_control_walk()) break;
- do_cmd_walk(options->always_pickup, TRUE);
+ do_cmd_walk(options->always_pickup);
break;
}
@@ -3397,7 +3396,7 @@ static void process_command(void)
{
if (do_control_walk()) break;
- do_cmd_walk(!options->always_pickup, TRUE);
+ do_cmd_walk(!options->always_pickup);
break;
}
@@ -3437,23 +3436,6 @@ static void process_command(void)
break;
}
- /* Search for traps/doors */
- case 's':
- {
- if (p_ptr->control) break;
- do_cmd_search();
- break;
- }
-
- /* Toggle search mode */
- case 'S':
- {
- if (p_ptr->control) break;
- do_cmd_toggle_search();
- break;
- }
-
-
/*** Stairs and Doors and Chests and Traps ***/
/* Enter store */
@@ -3618,15 +3600,6 @@ static void process_command(void)
break;
}
- /* Disarm a trap or chest */
- case 'D':
- {
- if (p_ptr->control) break;
- if (!p_ptr->wild_mode) do_cmd_disarm();
- break;
- }
-
-
/*** Magic and Prayers ***/
/* Interact with skills */
@@ -4154,12 +4127,7 @@ static void process_command(void)
do_cmd_macro_recorder();
break;
}
- case CMD_BLUNDER:
- {
- if (do_control_walk()) break;
- do_cmd_walk(options->always_pickup, FALSE);
- break;
- }
+
/* Hack -- Unknown command */
default:
{
diff --git a/src/files.cc b/src/files.cc
index 91ead001..d073f7fc 100644
--- a/src/files.cc
+++ b/src/files.cc
@@ -50,7 +50,6 @@
#include "store_type.hpp"
#include "tables.hpp"
#include "town_type.hpp"
-#include "trap_type.hpp"
#include "util.hpp"
#include "util.h"
#include "variable.h"
@@ -222,7 +221,6 @@ errr process_pref_file_aux(char *buf)
auto &r_info = game->edit_data.r_info;
auto &f_info = game->edit_data.f_info;
auto &k_info = game->edit_data.k_info;
- auto &t_info = game->edit_data.t_info;
int i, j, n1, n2;
@@ -331,34 +329,6 @@ errr process_pref_file_aux(char *buf)
return (0);
}
}
-
- /* Process "G:T:<num>:<a>/<c>" -- attr/char for traps */
- if (buf[2] == 'T')
- {
- if (tokenize(buf + 4, 3, zz, ':', '/') == 3)
- {
- std::size_t i = strtoul(zz[0], NULL, 0);
- n1 = strtol(zz[1], NULL, 0);
- n2 = strtol(zz[2], NULL, 0);
-
- if (i >= t_info.size())
- {
- return 1;
- }
-
- auto t_ptr = &t_info[i];
-
- if (n1)
- {
- t_ptr->g_attr = n1;
- }
- if (n2)
- {
- t_ptr->g_char = n2;
- }
- return (0);
- }
- }
}
@@ -1310,8 +1280,6 @@ static void display_player_middle(void)
put_str("Speed ", 13, 52);
speed = p_ptr->pspeed;
- /* Hack -- Visually "undo" the Search Mode Slowdown */
- if (p_ptr->searching) speed += 10;
if (speed > 110)
{
char s[11];
@@ -1429,8 +1397,8 @@ static void display_player_various(void)
auto const &r_info = game->edit_data.r_info;
int tmp, tmp2, damdice, damsides, dambonus, blows;
- int xthn, xthb, xfos, xsrh;
- int xdis, xdev, xsav, xstl;
+ int xthn, xthb;
+ int xdev, xsav, xstl;
cptr desc;
int i;
@@ -1452,12 +1420,9 @@ static void display_player_various(void)
blows = p_ptr->num_blow;
/* Basic abilities */
- xdis = p_ptr->skill_dis;
xdev = p_ptr->skill_dev;
xsav = p_ptr->skill_sav;
xstl = p_ptr->skill_stl;
- xsrh = p_ptr->skill_srh;
- xfos = p_ptr->skill_fos;
put_str("Fighting :", 16, 1);
@@ -1477,21 +1442,9 @@ static void display_player_various(void)
c_put_str(likert_color, desc, 19, 15);
- put_str("Perception :", 16, 28);
- desc = likert(xfos, 6);
- c_put_str(likert_color, desc, 16, 42);
-
- put_str("Searching :", 17, 28);
- desc = likert(xsrh, 6);
- c_put_str(likert_color, desc, 17, 42);
-
- put_str("Disarming :", 18, 28);
- desc = likert(xdis, 8);
- c_put_str(likert_color, desc, 18, 42);
-
- put_str("Magic Device:", 19, 28);
+ put_str("Magic Device:", 20, 1);
desc = likert(xdev, 6);
- c_put_str(likert_color, desc, 19, 42);
+ c_put_str(likert_color, desc, 20, 15);
put_str("Blows/Round:", 16, 55);
diff --git a/src/game_edit_data.hpp b/src/game_edit_data.hpp
index cd0a0b6b..cc3af2dc 100644
--- a/src/game_edit_data.hpp
+++ b/src/game_edit_data.hpp
@@ -19,7 +19,6 @@
#include "skill_descriptor.hpp"
#include "store_action_type.hpp"
#include "store_info_type.hpp"
-#include "trap_type.hpp"
#include "vault_type.hpp"
#include "wilderness_type_info.hpp"
@@ -142,9 +141,4 @@ struct GameEditData {
*/
std::vector<ability_type> ab_info;
- /**
- * Traps
- */
- std::vector<trap_type> t_info;
-
};
diff --git a/src/generate.cc b/src/generate.cc
index 856b593f..714238a8 100644
--- a/src/generate.cc
+++ b/src/generate.cc
@@ -35,7 +35,6 @@
#include "spells1.hpp"
#include "tables.hpp"
#include "town_type.hpp"
-#include "traps.hpp"
#include "util.hpp"
#include "variable.hpp"
#include "vault_type.hpp"
@@ -198,7 +197,6 @@
* Hack -- Dungeon allocation "types"
*/
#define ALLOC_TYP_RUBBLE 1 /* Rubble */
-#define ALLOC_TYP_TRAP 3 /* Trap */
#define ALLOC_TYP_GOLD 4 /* Gold */
#define ALLOC_TYP_OBJECT 5 /* Object */
#define ALLOC_TYP_ALTAR 6 /* Altar */
@@ -943,45 +941,6 @@ static void place_locked_door(int y, int x)
/*
- * Place a secret door at the given location
- */
-static void place_secret_door(int y, int x)
-{
- cave_type *c_ptr = &cave[y][x];
-
- /* Vaults */
- if (c_ptr->info & CAVE_ICKY)
- {
- c_ptr->mimic = FEAT_WALL_INNER;
- }
-
- /* Ordinary room -- use current outer or inner wall */
- else if (c_ptr->info & CAVE_ROOM)
- {
- /* Determine if it's inner or outer XXX XXX XXX */
- if ((cave[y - 1][x].info & CAVE_ROOM) &&
- (cave[y + 1][x].info & CAVE_ROOM) &&
- (cave[y][x - 1].info & CAVE_ROOM) &&
- (cave[y][x + 1].info & CAVE_ROOM))
- {
- c_ptr->mimic = feat_wall_inner;
- }
- else
- {
- c_ptr->mimic = feat_wall_outer;
- }
- }
- else
- {
- c_ptr->mimic = fill_type[rand_int(100)];
- }
-
- /* Create secret door */
- cave_set_feat(y, x, FEAT_SECRET);
-}
-
-
-/*
* Place a random type of door at the given location
*/
static void place_random_door(int y, int x)
@@ -1005,11 +964,11 @@ static void place_random_door(int y, int x)
cave_set_feat(y, x, FEAT_BROKEN);
}
- /* Secret doors (200/1000) */
+ /* Secret doors (200/1000) - now locked instead */
else if (tmp < 600)
{
- /* Create secret door */
- place_secret_door(y, x);
+ /* Create locked door */
+ place_locked_door(y, x);
}
/* Closed doors (300/1000) */
@@ -1188,12 +1147,6 @@ static void alloc_object(int set, int typ, int num)
break;
}
- case ALLOC_TYP_TRAP:
- {
- place_trap(y, x);
- break;
- }
-
case ALLOC_TYP_GOLD:
{
place_gold(y, x);
@@ -1890,61 +1843,6 @@ static void vault_objects(int y, int x, int num)
/*
- * Place a trap with a given displacement of point
- */
-static void vault_trap_aux(int y, int x, int yd, int xd)
-{
- int count = 0, y1 = y, x1 = x;
- int dummy = 0;
-
- /* Place traps */
- for (count = 0; count <= 5; count++)
- {
- /* Get a location */
- while (dummy < SAFE_MAX_ATTEMPTS)
- {
- y1 = rand_spread(y, yd);
- x1 = rand_spread(x, xd);
- dummy++;
- if (in_bounds(y1, x1)) break;
- }
-
- if (dummy >= SAFE_MAX_ATTEMPTS)
- {
- if (options->cheat_room)
- {
- msg_print("Warning! Could not place vault trap!");
- }
- }
-
-
- /* Require "naked" floor grids */
- if (!cave_naked_bold(y1, x1)) continue;
-
- /* Place the trap */
- place_trap(y1, x1);
-
- /* Done */
- break;
- }
-}
-
-
-/*
- * Place some traps with a given displacement of given location
- */
-static void vault_traps(int y, int x, int yd, int xd, int num)
-{
- int i;
-
- for (i = 0; i < num; i++)
- {
- vault_trap_aux(y, x, yd, xd);
- }
-}
-
-
-/*
* Hack -- Place some sleeping monsters near the given location
*/
static void vault_monsters(int y1, int x1, int num)
@@ -2290,20 +2188,20 @@ static void build_type3(int by0, int bx0)
/* Build the vault */
build_rectangle(y1b, x1a, y2b, x2a, feat_wall_inner, info);
- /* Place a secret door on the inner room */
+ /* Place a locked door on the inner room */
switch (rand_int(4))
{
case 0:
- place_secret_door(y1b, xval);
+ place_locked_door(y1b, xval);
break;
case 1:
- place_secret_door(y2b, xval);
+ place_locked_door(y2b, xval);
break;
case 2:
- place_secret_door(yval, x1a);
+ place_locked_door(yval, x1a);
break;
case 3:
- place_secret_door(yval, x2a);
+ place_locked_door(yval, x2a);
break;
}
@@ -2313,9 +2211,6 @@ static void build_type3(int by0, int bx0)
/* Let's guard the treasure well */
vault_monsters(yval, xval, rand_int(2) + 3);
- /* Traps naturally */
- vault_traps(yval, xval, 4, 4, rand_int(3) + 2);
-
break;
}
@@ -2341,13 +2236,13 @@ static void build_type3(int by0, int bx0)
cave_set_feat(y2b + 1, x, feat_wall_inner);
}
- /* Sometimes shut using secret doors */
+ /* Sometimes shut using locked doors */
if (rand_int(3) == 0)
{
- place_secret_door(yval, x1a - 1);
- place_secret_door(yval, x2a + 1);
- place_secret_door(y1b - 1, xval);
- place_secret_door(y2b + 1, xval);
+ place_locked_door(yval, x1a - 1);
+ place_locked_door(yval, x2a + 1);
+ place_locked_door(y1b - 1, xval);
+ place_locked_door(y2b + 1, xval);
}
}
@@ -2427,20 +2322,20 @@ static void build_type4(int by0, int bx0)
/* Just an inner room with a monster */
case 1:
{
- /* Place a secret door */
+ /* Place a locked door */
switch (randint(4))
{
case 1:
- place_secret_door(y1 - 1, xval);
+ place_locked_door(y1 - 1, xval);
break;
case 2:
- place_secret_door(y2 + 1, xval);
+ place_locked_door(y2 + 1, xval);
break;
case 3:
- place_secret_door(yval, x1 - 1);
+ place_locked_door(yval, x1 - 1);
break;
case 4:
- place_secret_door(yval, x2 + 1);
+ place_locked_door(yval, x2 + 1);
break;
}
@@ -2453,20 +2348,20 @@ static void build_type4(int by0, int bx0)
/* Treasure Vault (with a door) */
case 2:
{
- /* Place a secret door */
+ /* Place a locked door */
switch (randint(4))
{
case 1:
- place_secret_door(y1 - 1, xval);
+ place_locked_door(y1 - 1, xval);
break;
case 2:
- place_secret_door(y2 + 1, xval);
+ place_locked_door(y2 + 1, xval);
break;
case 3:
- place_secret_door(yval, x1 - 1);
+ place_locked_door(yval, x1 - 1);
break;
case 4:
- place_secret_door(yval, x2 + 1);
+ place_locked_door(yval, x2 + 1);
break;
}
@@ -2506,29 +2401,26 @@ static void build_type4(int by0, int bx0)
place_random_stairs(yval, xval);
}
- /* Traps to protect the treasure */
- vault_traps(yval, xval, 4, 10, 2 + randint(3));
-
break;
}
/* Inner pillar(s). */
case 3:
{
- /* Place a secret door */
+ /* Place a locked door */
switch (randint(4))
{
case 1:
- place_secret_door(y1 - 1, xval);
+ place_locked_door(y1 - 1, xval);
break;
case 2:
- place_secret_door(y2 + 1, xval);
+ place_locked_door(y2 + 1, xval);
break;
case 3:
- place_secret_door(yval, x1 - 1);
+ place_locked_door(yval, x1 - 1);
break;
case 4:
- place_secret_door(yval, x2 + 1);
+ place_locked_door(yval, x2 + 1);
break;
}
@@ -2572,9 +2464,9 @@ static void build_type4(int by0, int bx0)
cave_set_feat(yval, xval - 5, feat_wall_inner);
cave_set_feat(yval, xval + 5, feat_wall_inner);
- /* Secret doors (random top/bottom) */
- place_secret_door(yval - 3 + (randint(2) * 2), xval - 3);
- place_secret_door(yval - 3 + (randint(2) * 2), xval + 3);
+ /* Locked doors (random top/bottom) */
+ place_locked_door(yval - 3 + (randint(2) * 2), xval - 3);
+ place_locked_door(yval - 3 + (randint(2) * 2), xval + 3);
/* Monsters */
vault_monsters(yval, xval - 2, randint(2));
@@ -2591,20 +2483,20 @@ static void build_type4(int by0, int bx0)
/* Maze inside. */
case 4:
{
- /* Place a secret door */
+ /* Place a locked door */
switch (randint(4))
{
case 1:
- place_secret_door(y1 - 1, xval);
+ place_locked_door(y1 - 1, xval);
break;
case 2:
- place_secret_door(y2 + 1, xval);
+ place_locked_door(y2 + 1, xval);
break;
case 3:
- place_secret_door(yval, x1 - 1);
+ place_locked_door(yval, x1 - 1);
break;
case 4:
- place_secret_door(yval, x2 + 1);
+ place_locked_door(yval, x2 + 1);
break;
}
@@ -2624,10 +2516,6 @@ static void build_type4(int by0, int bx0)
vault_monsters(yval, xval - 5, randint(3));
vault_monsters(yval, xval + 5, randint(3));
- /* Traps make them entertaining. */
- vault_traps(yval, xval - 3, 2, 8, randint(3));
- vault_traps(yval, xval + 3, 2, 8, randint(3));
-
/* Mazes should have some treasure too. */
vault_objects(yval, xval, 3);
@@ -2652,18 +2540,18 @@ static void build_type4(int by0, int bx0)
if (rand_int(100) < 50)
{
int i = randint(10);
- place_secret_door(y1 - 1, xval - i);
- place_secret_door(y1 - 1, xval + i);
- place_secret_door(y2 + 1, xval - i);
- place_secret_door(y2 + 1, xval + i);
+ place_locked_door(y1 - 1, xval - i);
+ place_locked_door(y1 - 1, xval + i);
+ place_locked_door(y2 + 1, xval - i);
+ place_locked_door(y2 + 1, xval + i);
}
else
{
int i = randint(3);
- place_secret_door(yval + i, x1 - 1);
- place_secret_door(yval - i, x1 - 1);
- place_secret_door(yval + i, x2 + 1);
- place_secret_door(yval - i, x2 + 1);
+ place_locked_door(yval + i, x1 - 1);
+ place_locked_door(yval - i, x1 - 1);
+ place_locked_door(yval + i, x2 + 1);
+ place_locked_door(yval - i, x2 + 1);
}
/* Treasure, centered at the center of the cross */
@@ -2994,20 +2882,20 @@ static void build_type5(int by0, int bx0)
/* The inner walls */
build_rectangle(y1 - 1, x1 - 1, y2 + 1, x2 + 1, feat_wall_inner, CAVE_ROOM);
- /* Place a secret door */
+ /* Place a locked door */
switch (randint(4))
{
case 1:
- place_secret_door(y1 - 1, xval);
+ place_locked_door(y1 - 1, xval);
break;
case 2:
- place_secret_door(y2 + 1, xval);
+ place_locked_door(y2 + 1, xval);
break;
case 3:
- place_secret_door(yval, x1 - 1);
+ place_locked_door(yval, x1 - 1);
break;
case 4:
- place_secret_door(yval, x2 + 1);
+ place_locked_door(yval, x2 + 1);
break;
}
@@ -3233,20 +3121,20 @@ static void build_type6(int by0, int bx0)
/* The inner walls */
build_rectangle(y1 - 1, x1 - 1, y2 + 1, x2 + 1, feat_wall_outer, CAVE_ROOM);
- /* Place a secret door */
+ /* Place a locked door */
switch (randint(4))
{
case 1:
- place_secret_door(y1 - 1, xval);
+ place_locked_door(y1 - 1, xval);
break;
case 2:
- place_secret_door(y2 + 1, xval);
+ place_locked_door(y2 + 1, xval);
break;
case 3:
- place_secret_door(yval, x1 - 1);
+ place_locked_door(yval, x1 - 1);
break;
case 4:
- place_secret_door(yval, x2 + 1);
+ place_locked_door(yval, x2 + 1);
break;
}
@@ -3592,22 +3480,22 @@ static void build_vault(int yval, int xval, int ymax, int xmax, std::string cons
}
else
{
- place_trap(y, x);
+ /* Do nothing */
}
break;
}
- /* Secret doors */
+ /* locked doors */
case '+':
{
- place_secret_door(y, x);
+ place_locked_door(y, x);
break;
}
/* Trap */
case '^':
{
- place_trap(y, x);
+ /* Do nothing */
break;
}
@@ -4647,30 +4535,30 @@ static void build_small_room(int x0, int y0)
{
build_rectangle(y0 - 1, x0 - 1, y0 + 1, x0 + 1, feat_wall_inner, CAVE_ROOM);
- /* Place a secret door on one side */
+ /* Place a locked door on one side */
switch (rand_int(4))
{
case 0:
{
- place_secret_door(y0, x0 - 1);
+ place_locked_door(y0, x0 - 1);
break;
}
case 1:
{
- place_secret_door(y0, x0 + 1);
+ place_locked_door(y0, x0 + 1);
break;
}
case 2:
{
- place_secret_door(y0 - 1, x0);
+ place_locked_door(y0 - 1, x0);
break;
}
case 3:
{
- place_secret_door(y0 + 1, x0);
+ place_locked_door(y0 + 1, x0);
break;
}
}
@@ -4706,8 +4594,8 @@ static void add_door(int x, int y)
(cave[y][x - 1].feat == feat_wall_outer) &&
(cave[y][x + 1].feat == feat_wall_outer))
{
- /* secret door */
- place_secret_door(y, x);
+ /* locked door */
+ place_locked_door(y, x);
/* set boundarys so don't get wide doors */
place_filler(y, x - 1);
@@ -4728,8 +4616,8 @@ static void add_door(int x, int y)
(cave[y + 1][x].feat == feat_wall_outer) &&
get_is_floor(x - 1, y) && get_is_floor(x + 1, y))
{
- /* secret door */
- place_secret_door(y, x);
+ /* locked door */
+ place_locked_door(y, x);
/* set boundarys so don't get wide doors */
place_filler(y - 1, x);
@@ -4818,18 +4706,13 @@ static void fill_treasure(int x1, int x2, int y1, int y2, int difficulty)
{
place_object(y, x, FALSE, FALSE, OBJ_FOUND_FLOOR);
}
- else
- {
- place_trap(y, x);
- }
}
else if (value < 30)
{
- /* Monster and trap */
+ /* Monster */
monster_level = dun_level + 5;
place_monster(y, x, TRUE, TRUE);
monster_level = dun_level;
- place_trap(y, x);
}
else if (value < 40)
{
@@ -4849,8 +4732,7 @@ static void fill_treasure(int x1, int x2, int y1, int y2, int difficulty)
}
else if (value < 50)
{
- /* Trap */
- place_trap(y, x);
+ /* Do nothing */
}
else
{
@@ -4863,7 +4745,7 @@ static void fill_treasure(int x1, int x2, int y1, int y2, int difficulty)
}
else if (rand_int(100) < 50)
{
- place_trap(y, x);
+ /* Do nothing */
}
else if (rand_int(100) < 50)
{
@@ -6140,9 +6022,6 @@ static void build_type12(int by0, int bx0)
/* Let's guard the treasure well */
vault_monsters(y0, x0, rand_int(2) + 3);
-
- /* Traps naturally */
- vault_traps(y0, x0, 4, 4, rand_int(3) + 2);
}
}
@@ -6590,7 +6469,7 @@ static void try_doors(int y, int x)
/* Clear OK flags XXX */
for (i = 0; i < 4; i++) dir_ok[i] = FALSE;
- /* Put one or two secret doors */
+ /* Put one or two locked doors */
dir_ok[rand_int(4)] = TRUE;
dir_ok[rand_int(4)] = TRUE;
}
@@ -6608,7 +6487,7 @@ static void try_doors(int y, int x)
}
}
- /* Place secret door(s) */
+ /* Place locked door(s) */
for (i = 0; i < 4; i++)
{
/* Bad location */
@@ -6618,8 +6497,8 @@ static void try_doors(int y, int x)
yy = y + ddy_ddd[i];
xx = x + ddx_ddd[i];
- /* Place a secret door */
- place_secret_door(yy, xx);
+ /* Place a locked door */
+ place_locked_door(yy, xx);
}
}
}
@@ -7973,14 +7852,8 @@ static bool_ cave_gen(void)
}
}
- /* Place traps and rubble */
- {
- /* Place some traps in the dungeon */
- alloc_object(ALLOC_SET_BOTH, ALLOC_TYP_TRAP, randint(k * 2));
-
- /* Put some rubble in corridors */
- alloc_object(ALLOC_SET_CORR, ALLOC_TYP_RUBBLE, randint(k));
- }
+ /* Put some rubble in corridors */
+ alloc_object(ALLOC_SET_CORR, ALLOC_TYP_RUBBLE, randint(k));
/* Place objects and treasure */
{
diff --git a/src/help.cc b/src/help.cc
index e5014b45..7af521a9 100644
--- a/src/help.cc
+++ b/src/help.cc
@@ -24,7 +24,7 @@
#include "variable.hpp"
#define DESC_MAX 14
-#define TRIGGERED_HELP_MAX 18
+#define TRIGGERED_HELP_MAX 17
#define HELP_VOID_JUMPGATE 0
#define HELP_FOUNTAIN 1
@@ -34,16 +34,15 @@
#define HELP_GET_RUNE 5
#define HELP_GET_ROD 6
#define HELP_GET_ROD_TIP 7
-#define HELP_GET_TRAP_KIT 8
-#define HELP_GET_DEVICE 9
-#define HELP_WILDERNESS 10
-#define HELP_GAME_TOME 11
-#define HELP_GAME_THEME 12
-#define HELP_1ST_LEVEL 13
-#define HELP_20TH_LEVEL 14
-#define HELP_ID_SPELL_ITM 15
-#define HELP_MELEE_SKILLS 16
-#define HELP_MON_ASK_HELP 17
+#define HELP_GET_DEVICE 8
+#define HELP_WILDERNESS 9
+#define HELP_GAME_TOME 10
+#define HELP_GAME_THEME 11
+#define HELP_1ST_LEVEL 12
+#define HELP_20TH_LEVEL 13
+#define HELP_ID_SPELL_ITM 14
+#define HELP_MELEE_SKILLS 15
+#define HELP_MON_ASK_HELP 16
/**
* Game started?
@@ -200,7 +199,6 @@ context_help_type class_table[] =
{ "Priest(Varda)", "c_pr_varda.txt", 0 },
{ "Sniper", "c_sniper.txt", 0 },
{ "Stonewright", "c_stonewr.txt", 0 },
- { "Trapper", "c_trapper.txt", 0 },
{ "Wainrider", "c_wainrid.txt", 0 },
{ "War-mage", "c_warmage.txt", 0 },
/* End of list */
@@ -302,7 +300,6 @@ context_help_type ability_table[] =
{ "Ammo creation", "ability.txt", 7 },
{ "Touch of death", "ability.txt", 8 },
{ "Far reaching attack", "ability.txt", 10 },
- { "Trapping", "ability.txt", 11 },
{ "Undead Form", "ability.txt", 12 },
{ NULL, NULL, 0 },
};
@@ -352,11 +349,6 @@ static bool_ trigger_get_rod_tip(void *in, void *out) {
return (g->o_ptr->tval == TV_ROD);
}
-static bool_ trigger_get_trap_kit(void *in, void *out) {
- hook_get_in *g = (hook_get_in *) in;
- return (g->o_ptr->tval == TV_TRAPKIT);
-}
-
static bool_ trigger_get_magic_device(void *in, void *out) {
hook_get_in *g = (hook_get_in *) in;
return ((g->o_ptr->tval == TV_WAND) ||
@@ -479,16 +471,6 @@ static triggered_help_type triggered_help[TRIGGERED_HELP_MAX] =
NULL
}
},
- { HELP_GET_TRAP_KIT,
- HOOK_GET,
- trigger_get_trap_kit,
- { "Ooooh, a trapping kit. If you have ability in the trapping skill,",
- "you can lay this trap (via the 'm' key) to harm unsuspecting foes.",
- "You'll generally need either some ammo or magic device depending",
- "on the exact type of trap kit.",
- NULL
- }
- },
{ HELP_GET_DEVICE,
HOOK_GET,
trigger_get_magic_device,
diff --git a/src/init1.cc b/src/init1.cc
index 105aadda..6fd08ed2 100644
--- a/src/init1.cc
+++ b/src/init1.cc
@@ -40,8 +40,6 @@
#include "store_info_type.hpp"
#include "tables.hpp"
#include "town_type.hpp"
-#include "trap_type.hpp"
-#include "traps.hpp"
#include "util.hpp"
#include "util.h"
#include "variable.h"
@@ -170,46 +168,6 @@ static cptr r_info_blow_effect[] =
/*
- * Trap flags
- */
-static cptr t_info_flags[] =
-{
- "CHEST",
- "DOOR",
- "FLOOR",
- "XXX4",
- "XXX5",
- "XXX6",
- "XXX7",
- "XXX8",
- "XXX9",
- "XXX10",
- "XXX11",
- "XXX12",
- "XXX13",
- "XXX14",
- "XXX15",
- "XXX16",
- "LEVEL1",
- "LEVEL2",
- "LEVEL3",
- "LEVEL4",
- "XXX21",
- "XXX22",
- "XXX23",
- "XXX24",
- "XXX25",
- "XXX26",
- "XXX27",
- "XXX28",
- "XXX29",
- "XXX30",
- "XXX31",
- "XXX32"
-};
-
-
-/*
* Helpers for looking up flags in the above arrays
* and extracting "bitmasks" from them.
*/
@@ -1370,7 +1328,6 @@ errr init_player_info_txt(FILE *fp)
return (1);
}
- /* Next... */
continue;
}
@@ -4814,177 +4771,8 @@ errr init_re_info_txt(FILE *fp)
/*
- * Grab one flag in an trap_type from a textual string
- */
-static errr grab_one_trap_type_flag(trap_type *t_ptr, cptr what)
-{
- if (lookup_flags(what, flag_tie(&t_ptr->flags, t_info_flags)))
- {
- return (0);
- }
-
- /* Oops */
- msg_format("Unknown trap_type flag '%s'.", what);
-
- /* Error */
- return (1);
-}
-
-
-/*
- * Initialize the "tr_info" array, by parsing an ascii "template" file
+ * Grab one flag for a dungeon type from a textual string
*/
-errr init_t_info_txt(FILE *fp)
-{
- auto &t_info = game->edit_data.t_info;
-
- int i;
- char buf[1024];
- char *s, *t;
-
- /* Current entry */
- trap_type *t_ptr = NULL;
-
- /* Just before the first record */
- error_idx = -1;
-
- /* Just before the first line */
- error_line = -1;
-
- /* Parse */
- while (0 == my_fgets(fp, buf, 1024))
- {
- /* Advance the line number */
- error_line++;
-
- /* Skip comments and blank lines */
- if (!buf[0] || (buf[0] == '#')) continue;
-
- /* Verify correct "colon" format */
- if (buf[1] != ':') return (1);
-
- /* Process 'N' for "New/Number/Name" */
- if (buf[0] == 'N')
- {
- /* Find the colon before the name */
- s = strchr(buf + 2, ':');
-
- /* Verify that colon */
- if (!s) return (1);
-
- /* Nuke the colon, advance to the name */
- *s++ = '\0';
-
- /* Paranoia -- require a name */
- if (!*s) return (1);
-
- /* Get the index */
- i = atoi(buf + 2);
-
- /* Verify information */
- if (i <= error_idx) return (4);
-
- /* Save the index */
- error_idx = i;
-
- /* Point at the "info" */
- t_ptr = &expand_to_fit_index(t_info, i);
-
- /* Copy name */
- t_ptr->name = my_strdup(s);
-
- /* Initialize */
- t_ptr->text = my_strdup("");
-
- /* Next... */
- continue;
- }
-
- /* There better be a current t_ptr */
- if (!t_ptr) return (3);
-
-
- /* Process 'I' for "Information" */
- if (buf[0] == 'I')
- {
- int probability, another, p1valinc, difficulty;
- int minlevel;
- int dd, ds;
- char color;
-
- /* Scan for the values */
- if (8 != sscanf(buf + 2, "%d:%d:%d:%d:%d:%dd%d:%c",
- &difficulty, &probability, &another,
- &p1valinc, &minlevel, &dd, &ds,
- &color)) return (1);
-
- t_ptr->difficulty = (byte)difficulty;
- t_ptr->probability = (s16b)probability;
- t_ptr->another = (s16b)another;
- t_ptr->p1valinc = (s16b)p1valinc;
- t_ptr->minlevel = (byte)minlevel;
- t_ptr->dd = (s16b)dd;
- t_ptr->ds = (s16b)ds;
- t_ptr->color = color_char_to_attr(color);
-
- /* Next... */
- continue;
- }
-
-
- /* Process 'D' for "Description" */
- if (buf[0] == 'D')
- {
- /* Acquire the text */
- s = buf + 2;
-
- /* Append chars to the name */
- strappend(&t_ptr->text, s);
-
- /* Next... */
- continue;
- }
-
-
- /* Hack -- Process 'F' for flags */
- if (buf[0] == 'F')
- {
-
- t_ptr->flags = 0;
-
- /* Parse every entry textually */
- for (s = buf + 2; *s; )
- {
- /* Find the end of this entry */
- for (t = s; *t && (*t != ' ') && (*t != '|'); ++t) /* loop */;
-
- /* Nuke and skip any dividers */
- if (*t)
- {
- *t++ = '\0';
- while (*t == ' ' || *t == '|') t++;
- }
-
- /* Parse this entry */
- if (0 != grab_one_trap_type_flag(t_ptr, s)) return (5);
-
- /* Start the next entry */
- s = t;
- }
-
- /* Next... */
- continue;
- }
-
-
- /* Oops */
- return (6);
- }
-
- /* Success */
- return (0);
-}
-
errr grab_one_dungeon_flag(dungeon_flag_set *flags, const char *str)
{
#define DF(tier, index, name) \
@@ -6490,7 +6278,7 @@ static errr process_dungeon_file_aux(char *buf, int *yval, int *xval, int xvalst
}
else
{
- place_trap(y, x);
+ /* No traps - do nothing */
}
object_level = level;
@@ -6525,10 +6313,9 @@ static errr process_dungeon_file_aux(char *buf, int *yval, int *xval, int xvalst
place_object(y, x, TRUE, TRUE, OBJ_FOUND_SPECIAL);
}
}
- /* Random trap */
else if (random & RANDOM_TRAP)
{
- place_trap(y, x);
+ /* Do nothing */
}
else if (object_index)
{
diff --git a/src/init2.cc b/src/init2.cc
index bb909328..1b83851e 100644
--- a/src/init2.cc
+++ b/src/init2.cc
@@ -45,7 +45,6 @@
#include "store_info_type.hpp"
#include "store_type.hpp"
#include "tables.hpp"
-#include "trap_type.hpp"
#include "tome/make_array.hpp"
#include "town_type.hpp"
#include "util.hpp"
@@ -436,17 +435,6 @@ namespace {
};
- struct tr_info_traits {
-
- static constexpr char const *name = "tr_info.txt";
-
- static errr parse(FILE *fp)
- {
- return init_t_info_txt(fp);
- }
-
- };
-
struct v_info_traits {
static constexpr char const *name = "v_info.txt";
@@ -1254,10 +1242,6 @@ void init_angband(void)
note("[Initialising arrays... (towns)]");
if (init_towns()) quit("Cannot initialise towns");
- /* Initialise trap info */
- note("[Initialising arrays... (traps)]");
- if (init_x_info<tr_info_traits>()) quit("Cannot initialise traps");
-
/* Initialise some other arrays */
note("[Initialising arrays... (other)]");
if (init_other()) quit("Cannot initialise other stuff");
diff --git a/src/loadsave.cc b/src/loadsave.cc
index f412cc52..e91e8993 100644
--- a/src/loadsave.cc
+++ b/src/loadsave.cc
@@ -30,7 +30,6 @@
#include "tables.hpp"
#include "timer_type.hpp"
#include "town_type.hpp"
-#include "trap_type.hpp"
#include "util.hpp"
#include "util.h"
#include "wilderness_map.hpp"
@@ -851,7 +850,6 @@ static bool_ do_extra(ls_flag_t flag)
do_byte(&p_ptr->confusing, flag);
do_bool(&p_ptr->black_breath, flag);
do_bool(&fate_flag, flag);
- do_byte(&p_ptr->searching, flag);
do_bool(&ambush_flag, flag);
do_byte(&p_ptr->allow_one_death, flag);
@@ -1039,7 +1037,6 @@ static bool_ wearable_p(object_type *o_ptr)
case TV_HYPNOS:
case TV_INSTRUMENT:
case TV_DAEMON_BOOK:
- case TV_TRAPKIT:
case TV_TOOL:
{
return (TRUE);
@@ -1246,7 +1243,6 @@ static void do_cave_type(cave_type *c_ptr, ls_flag_t flag)
do_byte(&c_ptr->mimic, flag);
do_s16b(&c_ptr->special, flag);
do_s16b(&c_ptr->special2, flag);
- do_s16b(&c_ptr->t_idx, flag);
do_s16b(&c_ptr->inscription, flag);
do_byte(&c_ptr->mana, flag);
do_s16b(&c_ptr->effect, flag);
@@ -2380,28 +2376,6 @@ static bool do_fates(ls_flag_t flag)
return true;
}
-static bool do_traps(ls_flag_t flag)
-{
- auto &t_info = game->edit_data.t_info;
-
- u16b n_traps = t_info.size();
-
- do_u16b(&n_traps, flag);
-
- if ((flag == ls_flag_t::LOAD) && (n_traps > t_info.size()))
- {
- note("Too many traps!");
- return false;
- }
-
- for (std::size_t i = 0; i < n_traps; i++)
- {
- do_bool(&t_info[i].ident, flag);
- }
-
- return true;
-}
-
static bool do_floor_inscriptions(ls_flag_t flag)
{
u16b n_inscriptions = MAX_INSCRIPTIONS;
@@ -2553,11 +2527,6 @@ static bool_ do_savefile_aux(ls_flag_t flag)
return FALSE;
}
- if (!do_traps(flag))
- {
- return FALSE;
- }
-
if (!do_floor_inscriptions(flag))
{
return FALSE;
diff --git a/src/melee2.cc b/src/melee2.cc
index 415fd478..df9ee6d3 100644
--- a/src/melee2.cc
+++ b/src/melee2.cc
@@ -44,7 +44,6 @@
#include "spells2.hpp"
#include "stats.hpp"
#include "tables.hpp"
-#include "traps.hpp"
#include "util.hpp"
#include "variable.hpp"
#include "xtra2.hpp"
@@ -2126,12 +2125,6 @@ static bool_ monst_spell_monst(int m_idx)
break;
}
- case SF_TRAPS_IDX:
- {
- /* Not implemented */
- break;
- }
-
case SF_FORGET_IDX:
{
/* Not implemented */
@@ -3628,15 +3621,6 @@ static bool_ make_attack_spell(int m_idx)
break;
}
- case SF_TRAPS_IDX:
- {
- disturb(1);
- if (blind) msg_format("%^s mumbles, and then cackles evilly.", m_name);
- else msg_format("%^s casts a spell and cackles evilly.", m_name);
- (void)trap_creation();
- break;
- }
-
case SF_FORGET_IDX:
{
disturb(1);
@@ -5683,13 +5667,6 @@ static void process_monster(int m_idx, bool_ is_frien)
do_move = TRUE;
}
- /* Floor is trapped? */
- else if (c_ptr->feat == FEAT_MON_TRAP)
- {
- /* Go ahead and move */
- do_move = TRUE;
- }
-
/* Hack -- check for Glyph of Warding */
if ((c_ptr->feat == FEAT_GLYPH) &&
!(r_ptr->flags & RF_NEVER_BLOW))
@@ -6158,12 +6135,7 @@ static void process_monster(int m_idx, bool_ is_frien)
disturb(0);
}
- /* Check for monster trap */
- if (c_ptr->feat == FEAT_MON_TRAP)
- {
- if (mon_hit_trap(m_idx)) return;
- }
- else
+
{
/* Copy list of objects; we need a copy because we're mutating the list. */
auto const object_idxs(c_ptr->o_idxs);
diff --git a/src/monster1.cc b/src/monster1.cc
index 5ad3c696..244fbf94 100644
--- a/src/monster1.cc
+++ b/src/monster1.cc
@@ -478,7 +478,6 @@ static void roff_aux(std::shared_ptr<monster_race const> r_ptr)
if (spells & SF_TELE_LEVEL) vp[vn++] = "teleport level";
if (spells & SF_S_THUNDERLORD) vp[vn++] = "summon a Thunderlord";
if (spells & SF_DARKNESS) vp[vn++] = "create darkness";
- if (spells & SF_TRAPS) vp[vn++] = "create traps";
if (spells & SF_FORGET) vp[vn++] = "cause amnesia";
if (spells & SF_RAISE_DEAD) vp[vn++] = "raise dead";
if (spells & SF_S_MONSTER) vp[vn++] = "summon a monster";
diff --git a/src/monster_spell_flag_list.hpp b/src/monster_spell_flag_list.hpp
index 4a201db5..42d8a5e9 100644
--- a/src/monster_spell_flag_list.hpp
+++ b/src/monster_spell_flag_list.hpp
@@ -78,7 +78,6 @@ SF(3, 6, TELE_TO , false, true , false, false, false, false, false, false,
SF(3, 7, TELE_AWAY , false, false, false, false, true , false, true , false, false, false)
SF(3, 8, TELE_LEVEL , false, false, false, false, true , false, true , false, false, false)
SF(3, 9, DARKNESS , false, true , false, false, false, false, false, false, false, false)
-SF(3, 10, TRAPS , false, true , false, false, true , false, false, false, false, false)
SF(3, 11, FORGET , false, true , false, false, false, false, false, false, false, false)
SF(3, 12, RAISE_DEAD , false, false, false, false, false, false, false, false, false, false)
SF(3, 13, S_BUG , true , false, false, false, true , false, false, false, false, false)
diff --git a/src/object1.cc b/src/object1.cc
index d04c7ab2..e81c5742 100644
--- a/src/object1.cc
+++ b/src/object1.cc
@@ -47,7 +47,6 @@
#include "stats.hpp"
#include "store_info_type.hpp"
#include "tables.hpp"
-#include "trap_type.hpp"
#include "util.hpp"
#include "util.h"
#include "variable.h"
@@ -636,7 +635,6 @@ void reset_visuals(void)
auto &r_info = game->edit_data.r_info;
auto &f_info = game->edit_data.f_info;
auto &k_info = game->edit_data.k_info;
- auto &t_info = game->edit_data.t_info;
/* Extract some info about terrain features */
for (auto &f_ref: f_info)
@@ -685,15 +683,6 @@ void reset_visuals(void)
rmp.g_char = 0;
}
- /* Reset attr/char code for trap overlay graphics */
- for (auto &t_ref: t_info)
- {
- /* Default attr/char */
- t_ref.g_attr = 0;
- t_ref.g_char = 0;
- }
-
-
/* Normal symbols */
process_pref_file("font.prf");
}
@@ -1033,7 +1022,6 @@ static std::string object_desc_aux(object_type const *o_ptr, int pref, int mode)
auto const &k_info = game->edit_data.k_info;
auto const &a_info = game->edit_data.a_info;
auto const &e_info = game->edit_data.e_info;
- auto const &t_info = game->edit_data.t_info;
static auto const TR_PVAL_MASK = compute_pval_mask();
bool_ hack_name = FALSE;
@@ -1097,14 +1085,6 @@ static std::string object_desc_aux(object_type const *o_ptr, int pref, int mode)
break;
}
- /* Trapping Kits */
- case TV_TRAPKIT:
- {
- modstr = basenm;
- basenm = "& # Trap Set~";
- break;
- }
-
/* Armour */
case TV_BOOTS:
case TV_GLOVES:
@@ -1769,23 +1749,6 @@ static std::string object_desc_aux(object_type const *o_ptr, int pref, int mode)
{
t += " (empty)";
}
-
- /* May be "disarmed" */
- else if (o_ptr->pval < 0)
- {
- t += " (disarmed)";
- }
-
- /* Describe the traps, if any */
- else
- {
- /* Describe the traps */
- auto trap_name = (t_info[o_ptr->pval].ident)
- ? t_info[o_ptr->pval].name
- : "trapped";
-
- t += fmt::format(" ({})", trap_name);
- }
}
@@ -2704,7 +2667,6 @@ bool_ object_out_desc(object_type *o_ptr, FILE *fff, bool_ trim_down, bool_ wait
if (flags & TR_DEX) vp[vn++] = "dexterity";
if (flags & TR_CON) vp[vn++] = "constitution";
if (flags & TR_CHR) vp[vn++] = "charisma";
- if ((o_ptr->tval != TV_TRAPKIT) && (flags & TR_STEALTH)) vp[vn++] = "stealth";
if (flags & TR_SEARCH) vp[vn++] = "searching";
if (flags & TR_INFRA) vp[vn++] = "infravision";
if (flags & TR_TUNNEL) vp[vn++] = "ability to tunnel";
@@ -2781,11 +2743,6 @@ bool_ object_out_desc(object_type *o_ptr, FILE *fff, bool_ trim_down, bool_ wait
text_out(". ");
}
- if ((o_ptr->tval == TV_TRAPKIT) && (flags & TR_STEALTH))
- {
- text_out("It is well-hidden. ");
- }
-
vn = 0;
if (flags & TR_BRAND_ACID)
{
@@ -2919,7 +2876,6 @@ bool_ object_out_desc(object_type *o_ptr, FILE *fff, bool_ trim_down, bool_ wait
text_out("It makes you invisible. ");
}
- if (o_ptr->tval != TV_TRAPKIT)
{
vn = 0;
if (flags & TR_SUST_STR)
@@ -3016,45 +2972,6 @@ bool_ object_out_desc(object_type *o_ptr, FILE *fff, bool_ trim_down, bool_ wait
text_out(". ");
}
}
- else
- {
- if (flags & TR_AUTOMATIC_5)
- {
- text_out("It can rearm itself. ");
- }
- if (flags & TR_AUTOMATIC_99)
- {
- text_out("It rearms itself. ");
- }
- if (flags & TR_KILL_GHOST)
- {
- text_out("It is effective against Ghosts. ");
- }
- if (flags & TR_TELEPORT_TO)
- {
- text_out("It can teleport monsters to you. ");
- }
- if (flags & TR_ONLY_DRAGON)
- {
- text_out("It can only be set off by dragons. ");
- }
- if (flags & TR_ONLY_DEMON)
- {
- text_out("It can only be set off by demons. ");
- }
- if (flags & TR_ONLY_UNDEAD)
- {
- text_out("It can only be set off by undead. ");
- }
- if (flags & TR_ONLY_ANIMAL)
- {
- text_out("It can only be set off by animals. ");
- }
- if (flags & TR_ONLY_EVIL)
- {
- text_out("It can only be set off by evil creatures. ");
- }
- }
if (flags & TR_FREE_ACT)
{
@@ -5861,12 +5778,6 @@ void py_pickup_floor(int pickup)
/* Get the tile */
auto c_ptr = &cave[p_ptr->py][p_ptr->px];
- /* Hack -- ignore monster traps */
- if (c_ptr->feat == FEAT_MON_TRAP)
- {
- return;
- }
-
/* Try to grab ammo */
pickup_ammo();
diff --git a/src/object2.cc b/src/object2.cc
index 7c2bd7db..6a584ffc 100644
--- a/src/object2.cc
+++ b/src/object2.cc
@@ -40,7 +40,6 @@
#include "spells3.hpp"
#include "spells5.hpp"
#include "tables.hpp"
-#include "traps.hpp"
#include "util.hpp"
#include "variable.hpp"
#include "wilderness_map.hpp"
@@ -1185,7 +1184,6 @@ s32b object_value_real(object_type const *o_ptr)
case TV_AMULET:
case TV_RING:
case TV_MSTAFF:
- case TV_TRAPKIT:
case TV_INSTRUMENT:
{
/* No pval */
@@ -1345,7 +1343,6 @@ s32b object_value_real(object_type const *o_ptr)
case TV_DAEMON_BOOK:
case TV_AXE:
case TV_POLEARM:
- case TV_TRAPKIT:
{
/* Hack -- negative hit/damage bonuses */
if (o_ptr->to_h + o_ptr->to_d < 0 && !value) return (0L);
@@ -1660,7 +1657,6 @@ bool_ object_similar(object_type const *o_ptr, object_type const *j_ptr)
case TV_SOFT_ARMOR:
case TV_HARD_ARMOR:
case TV_DRAG_ARMOR:
- case TV_TRAPKIT:
case TV_DAEMON_BOOK:
{
/* Fall through */
@@ -2516,7 +2512,7 @@ static void a_m_aux_1(object_type *o_ptr, int level, int power)
if (power > 1)
{
/* Make ego item */
- if ((rand_int(RANDART_WEAPON) == 1) && (o_ptr->tval != TV_TRAPKIT)) create_artifact(o_ptr, FALSE, TRUE);
+ if (rand_int(RANDART_WEAPON) == 1) create_artifact(o_ptr, FALSE, TRUE);
else make_ego_item(o_ptr, TRUE);
}
else if (power < -1)
@@ -2563,22 +2559,6 @@ static void a_m_aux_1(object_type *o_ptr, int level, int power)
/* Some special cases */
switch (o_ptr->tval)
{
- case TV_TRAPKIT:
- {
- /* Good */
- if (power > 0) o_ptr->to_a += randint(5);
-
- /* Very good */
- if (power > 1) o_ptr->to_a += randint(5);
-
- /* Bad */
- if (power < 0) o_ptr->to_a -= randint(5);
-
- /* Very bad */
- if (power < -1) o_ptr->to_a -= randint(5);
-
- break;
- }
case TV_MSTAFF:
{
if (is_ego_p(o_ptr, EGO_MSTAFF_SPELL))
@@ -3452,9 +3432,6 @@ static void a_m_aux_4(object_type *o_ptr, int level, int power)
/* Hack -- skip ruined chests */
if (k_info[o_ptr->k_idx].level <= 0) break;
- /* Pick a trap */
- place_trap_object(o_ptr);
-
/* Hack - set pval2 to the number of objects in it */
if (o_ptr->pval)
o_ptr->pval2 = (o_ptr->sval % SV_CHEST_MIN_LARGE) * 2;
@@ -3517,22 +3494,6 @@ static void a_m_aux_4(object_type *o_ptr, int level, int power)
}
}
-void trap_hack(object_type *o_ptr)
-{
- if (o_ptr->tval != TV_TRAPKIT) return;
-
- switch (o_ptr->sval)
- {
- case SV_TRAPKIT_POTION:
- case SV_TRAPKIT_SCROLL:
- case SV_TRAPKIT_DEVICE:
- o_ptr->to_h = 0;
- o_ptr->to_d = 0;
- default:
- return;
- }
-}
-
/* Add a random glag to the ego item */
void add_random_ego_flag(object_type *o_ptr, ego_flag_set const &fego, bool_ *limit_blows)
{
@@ -4179,7 +4140,6 @@ void apply_magic(object_type *o_ptr, int lev, bool_ okay, bool_ good, bool_ grea
case TV_SHOT:
case TV_ARROW:
case TV_BOLT:
- case TV_TRAPKIT:
{
if (power) a_m_aux_1(o_ptr, lev, power);
break;
@@ -4358,9 +4318,6 @@ try_an_other_ego:
o_ptr->timeout = o_ptr->pval2;
}
-
- /* Remove some unnecessary stuff hack */
- if (o_ptr->tval == TV_TRAPKIT) trap_hack(o_ptr);
}
}
@@ -4573,9 +4530,6 @@ static bool kind_is_theme(obj_theme const *theme, int k_idx)
case TV_INSTRUMENT:
prob = theme->tools;
break;
- case TV_TRAPKIT:
- prob = theme->tools;
- break;
}
/* Roll to see if it can be made */
@@ -4667,7 +4621,6 @@ static bool_ kind_is_good(int k_idx)
case TV_HAFTED:
case TV_POLEARM:
case TV_DIGGING:
- case TV_TRAPKIT:
case TV_MSTAFF:
case TV_BOOMERANG:
{
@@ -5211,9 +5164,6 @@ s16b drop_near(object_type *j_ptr, int chance, int y, int x)
/* Require floor space (or shallow terrain) -KMW- */
if (!(f_info[c_ptr->feat].flags & FF_FLOOR)) continue;
- /* No traps */
- if (c_ptr->t_idx) continue;
-
/* No objects */
k = 0;
@@ -5449,30 +5399,6 @@ void acquirement(int y1, int x1, int num, bool_ great, bool_ known)
}
-
-/*
- * Hack -- instantiate a trap
- *
- * XXX XXX XXX This routine should be redone to reflect trap "level".
- * That is, it does not make sense to have spiked pits at 50 feet.
- * Actually, it is not this routine, but the "trap instantiation"
- * code, which should also check for "trap doors" on quest levels.
- */
-void pick_trap(int y, int x)
-{
- cave_type *c_ptr = &cave[y][x];
-
- /* Paranoia */
- if ((c_ptr->t_idx == 0) || (c_ptr->info & CAVE_TRDT)) return;
-
- /* Activate the trap */
- c_ptr->info |= (CAVE_TRDT);
-
- /* Notice and redraw */
- note_spot(y, x);
- lite_spot(y, x);
-}
-
/*
* Describe the charges on an item in the inventory.
*/
diff --git a/src/object2.hpp b/src/object2.hpp
index 8a99753d..7c16be85 100644
--- a/src/object2.hpp
+++ b/src/object2.hpp
@@ -59,7 +59,6 @@ extern bool_ make_gold(object_type *j_ptr);
extern void place_gold(int y, int x);
extern s16b drop_near(object_type *o_ptr, int chance, int y, int x);
extern void acquirement(int y1, int x1, int num, bool_ great, bool_ known);
-extern void pick_trap(int y, int x);
extern void combine_pack(void);
extern void reorder_pack(void);
extern void random_artifact_resistance (object_type * o_ptr);
diff --git a/src/object_flag_list.hpp b/src/object_flag_list.hpp
index 56cf1b88..05dbb3be 100644
--- a/src/object_flag_list.hpp
+++ b/src/object_flag_list.hpp
@@ -170,16 +170,6 @@ TR(5, 17, TR_RANDOM_RESIST , RANDOM_RESIST , nullptr , -1, -1, -1,
TR(5, 18, TR_RANDOM_POWER , RANDOM_POWER , nullptr , -1, -1, -1, BINARY , 0, false, false)
TR(5, 19, TR_RANDOM_RES_OR_POWER, RANDOM_RES_OR_POWER, nullptr , -1, -1, -1, BINARY , 0, false, false)
-TR(6, 0, TR_AUTOMATIC_5 , AUTOMATIC_5 , nullptr , -1, -1, -1, BINARY , 0, false, false)
-TR(6, 1, TR_AUTOMATIC_99 , AUTOMATIC_99 , nullptr , -1, -1, -1, BINARY , 0, false, false)
-TR(6, 2, TR_KILL_GHOST , KILL_GHOST , nullptr , -1, -1, -1, BINARY , 0, false, false)
-TR(6, 3, TR_TELEPORT_TO , TELEPORT_TO , nullptr , -1, -1, -1, BINARY , 0, false, false)
-TR(6, 4, TR_ONLY_DRAGON , ONLY_DRAGON , nullptr , -1, -1, -1, BINARY , 0, false, false)
-TR(6, 5, TR_ONLY_DEMON , ONLY_DEMON , nullptr , -1, -1, -1, BINARY , 0, false, false)
-TR(6, 8, TR_ONLY_ANIMAL , ONLY_ANIMAL , nullptr , -1, -1, -1, BINARY , 0, false, false)
-TR(6, 9, TR_ONLY_UNDEAD , ONLY_UNDEAD , nullptr , -1, -1, -1, BINARY , 0, false, false)
-TR(6, 10, TR_ONLY_EVIL , ONLY_EVIL , nullptr , -1, -1, -1, BINARY , 0, false, false)
-
TR(7, 0, ESP_ORC , ESP_ORC , "Orc.ESP" , 3, 1, 0, BINARY , 0, false, true )
TR(7, 1, ESP_TROLL , ESP_TROLL , "Troll.ESP" , 3, 1, 1, BINARY , 0, false, true )
TR(7, 2, ESP_DRAGON , ESP_DRAGON , "Dragon.ESP", 3, 1, 2, BINARY , 0, false, true )
diff --git a/src/player_type.hpp b/src/player_type.hpp
index 680c3df0..0015eaef 100644
--- a/src/player_type.hpp
+++ b/src/player_type.hpp
@@ -177,7 +177,6 @@ struct player_type
s16b food = 0; /* Current nutrition */
byte confusing = 0; /* Glowing hands */
- byte searching = 0; /* Currently searching */
bool_ old_cumber_armor = FALSE;
bool_ old_cumber_glove = FALSE;
@@ -304,12 +303,9 @@ struct player_type
s16b see_infra; /* Infravision range */
- s16b skill_dis = 0; /* Skill: Disarming */
s16b skill_dev = 0; /* Skill: Magic Devices */
s16b skill_sav = 0; /* Skill: Saving throw */
s16b skill_stl = 0; /* Skill: Stealth factor */
- s16b skill_srh = 0; /* Skill: Searching ability */
- s16b skill_fos = 0; /* Skill: Searching frequency */
s16b skill_thn = 0; /* Skill: To hit (normal) */
s16b skill_thb = 0; /* Skill: To hit (shooting) */
s16b skill_tht = 0; /* Skill: To hit (throwing) */
diff --git a/src/powers.cc b/src/powers.cc
index b92d7731..5d26b7dd 100644
--- a/src/powers.cc
+++ b/src/powers.cc
@@ -34,7 +34,6 @@
#include "spells2.hpp"
#include "stats.hpp"
#include "tables.hpp"
-#include "traps.hpp"
#include "util.hpp"
#include "util.h"
#include "variable.h"
@@ -201,11 +200,6 @@ static void power_activate(int power)
}
}
break;
- case PWR_LAY_TRAP:
- {
- do_cmd_set_trap();
- }
- break;
case PWR_MAGIC_MAP:
{
msg_print("You sense the world around you.");
@@ -334,7 +328,6 @@ static void power_activate(int power)
case PWR_DETECT_TD:
{
msg_print("You examine your surroundings.");
- (void)detect_traps(DEFAULT_RADIUS);
(void)detect_doors(DEFAULT_RADIUS);
(void)detect_stairs(DEFAULT_RADIUS);
}
diff --git a/src/powers.hpp b/src/powers.hpp
index 35d317b0..fcb39ef3 100644
--- a/src/powers.hpp
+++ b/src/powers.hpp
@@ -64,7 +64,6 @@ extern void do_cmd_power();
#define PWR_UNHYPNO 53
#define PWR_INCARNATE 54
#define PWR_MAGIC_MAP 55
-#define PWR_LAY_TRAP 56
#define PWR_COMPANION 58
#define PWR_BEAR 59
#define PWR_DODGE 60
diff --git a/src/q_eol.cc b/src/q_eol.cc
index 4392b001..24825da3 100644
--- a/src/q_eol.cc
+++ b/src/q_eol.cc
@@ -15,7 +15,6 @@
#include "object2.hpp"
#include "player_type.hpp"
#include "tables.hpp"
-#include "traps.hpp"
#include "util.hpp"
#include "variable.hpp"
#include "z-rand.hpp"
@@ -96,11 +95,6 @@ static bool_ quest_eol_gen_hook(void *, void *, void *)
if (m_idx) m_list[m_idx].mflag |= MFLAG_QUEST;
}
- if (magik(18))
- {
- place_trap(y, x);
- }
-
/* Place player at one end */
p_ptr->py = y;
p_ptr->px = x;
diff --git a/src/q_fireprof.cc b/src/q_fireprof.cc
index 03190889..693248e3 100644
--- a/src/q_fireprof.cc
+++ b/src/q_fireprof.cc
@@ -4,7 +4,6 @@
#include "dungeon_flag.hpp"
#include "feature_flag.hpp"
#include "feature_type.hpp"
-#include "game.hpp"
#include "hook_get_in.hpp"
#include "hooks.hpp"
#include "lua_bind.hpp"
@@ -14,7 +13,6 @@
#include "object_type.hpp"
#include "player_type.hpp"
#include "tables.hpp"
-#include "traps.hpp"
#include "util.hpp"
#include "variable.hpp"
#include "z-rand.hpp"
@@ -471,8 +469,6 @@ std::string quest_fireproof_describe()
static bool_ fireproof_gen_hook(void *, void *, void *)
{
- auto const &f_info = game->edit_data.f_info;
-
fireproof_settings const *settings = fireproof_get_settings();
/* Only if player doing this quest */
@@ -483,8 +479,6 @@ static bool_ fireproof_gen_hook(void *, void *, void *)
/* Go ahead */
{
- int traps, trap_y, trap_x;
-
/* load the map */
{
int x0 = 2;
@@ -515,46 +509,6 @@ static bool_ fireproof_gen_hook(void *, void *, void *)
drop_near(&forge, -1, y, x);
}
- /* how many traps to generate */
- traps = rand_range(10, 30);
-
- /* generate the traps */
- while (traps > 0)
- {
- int tries = 0, trap_level = 0;
-
- /* make sure it's a safe place */
- while (tries == 0)
- {
- /* get grid coordinates */
- trap_y = randint(19) + 2;
- trap_x = randint(45) + 2;
- cave_type *c_ptr = &cave[trap_y][trap_x];
-
- /* are the coordinates on a stair, or a wall? */
- if (bool(f_info[c_ptr->feat].flags & FF_PERMANENT) ||
- (f_info[c_ptr->feat].flags & FF_FLOOR).empty())
- {
- /* try again */
- tries = 0;
- }
- else
- {
- /* not a stair, then stop this 'while' */
- tries = 1;
- }
- }
-
- /* randomise level of trap */
- trap_level = rand_range(20, 40);
-
- /* put the trap there */
- place_trap_leveled(trap_y, trap_x, trap_level);
-
- /* that's one less trap to place */
- traps = traps - 1;
- }
-
return TRUE;
}
}
diff --git a/src/q_god.cc b/src/q_god.cc
index 79a25232..14052fe4 100644
--- a/src/q_god.cc
+++ b/src/q_god.cc
@@ -381,8 +381,7 @@ static void quest_god_generate_relic()
/* are the coordinates on a floor, not on a permanent feature (eg stairs), and not on a trap ? */
if ((f_info[c_ptr->feat].flags & FF_FLOOR) &&
- (!(f_info[c_ptr->feat].flags & FF_PERMANENT)) &&
- (c_ptr->t_idx == 0))
+ (!(f_info[c_ptr->feat].flags & FF_PERMANENT)))
{
break;
}
diff --git a/src/q_haunted.cc b/src/q_haunted.cc
index df90435c..f3725830 100644
--- a/src/q_haunted.cc
+++ b/src/q_haunted.cc
@@ -12,7 +12,6 @@
#include "monster2.hpp"
#include "monster_type.hpp"
#include "player_type.hpp"
-#include "traps.hpp"
#include "tables.hpp"
#include "util.hpp"
#include "variable.hpp"
@@ -86,19 +85,6 @@ static bool_ quest_haunted_gen_hook(void *, void *, void *)
}
}
- /* Place some random traps */
- for (i = 10 + damroll(4, 4); i > 0; )
- {
- y = rand_int(21) + 3;
- x = rand_int(31) + 3;
- auto const flags = f_info[cave[y][x].feat].flags;
- if (!(flags & FF_PERMANENT) && (flags & FF_FLOOR))
- {
- --i;
- place_trap(y, x);
- }
- }
-
process_hooks_restart = TRUE;
return TRUE;
diff --git a/src/q_library.cc b/src/q_library.cc
index 96c93980..8d2e8a54 100644
--- a/src/q_library.cc
+++ b/src/q_library.cc
@@ -58,7 +58,6 @@ void initialize_bookable_spells()
push_spell(RECHARGE);
push_spell(DISPERSEMAGIC);
push_spell(BLINK);
- push_spell(DISARM);
push_spell(TELEPORT);
push_spell(SENSEMONSTERS);
push_spell(SENSEHIDDEN);
diff --git a/src/skills.cc b/src/skills.cc
index 96d34e06..652f925e 100644
--- a/src/skills.cc
+++ b/src/skills.cc
@@ -33,7 +33,6 @@
#include "spells1.hpp"
#include "spells4.hpp"
#include "tables.hpp"
-#include "traps.hpp"
#include "util.hpp"
#include "util.h"
#include "variable.h"
@@ -1146,9 +1145,6 @@ void do_cmd_activate_skill()
case MKEY_SYMBIOTIC:
do_cmd_symbiotic();
break;
- case MKEY_TRAP:
- do_cmd_set_trap();
- break;
case MKEY_STEAL:
do_cmd_steal();
break;
diff --git a/src/skills_defs.hpp b/src/skills_defs.hpp
index a39fd027..b21ea0fb 100644
--- a/src/skills_defs.hpp
+++ b/src/skills_defs.hpp
@@ -37,9 +37,9 @@
#define SKILL_MIMICRY 32
#define SKILL_ANTIMAGIC 33
#define SKILL_RUNECRAFT 34
-#define SKILL_SNEAK 35
+/* XXX */
#define SKILL_STEALTH 36
-#define SKILL_DISARMING 37
+/* XXX */
#define SKILL_STEALING 40
#define SKILL_SORCERY 41
#define SKILL_HAND 42
diff --git a/src/spells1.cc b/src/spells1.cc
index e2a66184..7f03703d 100644
--- a/src/spells1.cc
+++ b/src/spells1.cc
@@ -41,8 +41,6 @@
#include "squeltch.hpp"
#include "stats.hpp"
#include "tables.hpp"
-#include "traps.hpp"
-#include "trap_type.hpp"
#include "util.hpp"
#include "util.h"
#include "variable.hpp"
@@ -622,8 +620,6 @@ void teleport_player(int dis)
/* Update the monsters */
p_ptr->update |= (PU_DISTANCE);
- /* Redraw trap detection status */
- p_ptr->redraw |= (PR_FRAME);
/* Window stuff */
p_ptr->window |= (PW_OVERHEAD);
@@ -846,9 +842,6 @@ void teleport_player_to(int ny, int nx)
/* Update the monsters */
p_ptr->update |= (PU_DISTANCE);
- /* Redraw trap detection status */
- p_ptr->redraw |= (PR_FRAME);
-
/* Window stuff */
p_ptr->window |= (PW_OVERHEAD);
@@ -3224,71 +3217,12 @@ static bool_ project_f(int who, int r, int y, int x, int dam, int typ)
break;
}
- /* Destroy Traps (and Locks) */
- case GF_KILL_TRAP:
- {
- /* Destroy normal traps and disarm monster traps */
- if ((c_ptr->t_idx != 0) || (c_ptr->feat == FEAT_MON_TRAP))
- {
- /* Check line of sight */
- if (player_has_los_bold(y, x))
- {
- msg_print("There is a bright flash of light!");
- obvious = TRUE;
- }
-
- /* Forget the trap */
- c_ptr->info &= ~(CAVE_MARK | CAVE_TRDT);
-
- /* Destroy normal traps */
- c_ptr->t_idx = 0;
-
- /* Disarm monster traps */
- if (c_ptr->feat == FEAT_MON_TRAP)
- {
- c_ptr->special = c_ptr->special2 = 0;
-
- /* Remove the feature */
- if (!(f_info[c_ptr->feat].flags & FF_PERMANENT))
- place_floor_convert_glass(y, x);
- }
-
- /* Hack -- Force redraw */
- note_spot(y, x);
- lite_spot(y, x);
- }
-
- /* Secret / Locked doors are found and unlocked */
- else if ((c_ptr->feat == FEAT_SECRET) ||
- ((c_ptr->feat >= FEAT_DOOR_HEAD + 0x01) &&
- (c_ptr->feat <= FEAT_DOOR_HEAD + 0x07)))
- {
-
- /* Check line of sound */
- if (player_has_los_bold(y, x))
- {
- msg_print("Click!");
- obvious = TRUE;
- }
-
- /* Remove feature mimic */
- cave[y][x].mimic = 0;
-
- /* Unlock the door */
- cave_set_feat(y, x, FEAT_DOOR_HEAD + 0x00);
- }
-
- break;
- }
-
- /* Destroy Doors (and traps) */
+ /* Destroy Doors */
case GF_KILL_DOOR:
{
- /* Destroy all doors and traps, and disarm monster traps */
+ /* Destroy all doors */
if ((c_ptr->feat == FEAT_OPEN) ||
(c_ptr->feat == FEAT_BROKEN) ||
- (c_ptr->t_idx != 0) ||
- (c_ptr->feat == FEAT_MON_TRAP) ||
((c_ptr->feat >= FEAT_DOOR_HEAD) &&
(c_ptr->feat <= FEAT_DOOR_TAIL)))
{
@@ -3309,14 +3243,7 @@ static bool_ project_f(int who, int r, int y, int x, int dam, int typ)
}
/* Forget the door */
- c_ptr->info &= ~(CAVE_MARK | CAVE_TRDT);
-
- /* Remove normal traps */
- c_ptr->t_idx = 0;
-
- /* Disarm monster traps */
- if (c_ptr->feat == FEAT_MON_TRAP)
- c_ptr->special = c_ptr->special2 = 0;
+ c_ptr->info &= ~(CAVE_MARK);
/* Remove the feature */
if (!(f_info[c_ptr->feat].flags & FF_PERMANENT))
@@ -3502,19 +3429,6 @@ static bool_ project_f(int who, int r, int y, int x, int dam, int typ)
break;
}
- /* Make traps */
- case GF_MAKE_TRAP:
- {
- /* Require a "naked" floor grid */
- if (!cave_clean_bold(y, x)) break;
-
- /* Place a trap */
- place_trap(y, x);
-
- break;
- }
-
-
case GF_MAKE_GLYPH:
{
/* Require a "naked" floor grid */
@@ -4030,7 +3944,6 @@ static bool_ project_o(int who, int r, int y, int x, int dam, int typ)
}
/* Unlock chests */
- case GF_KILL_TRAP:
case GF_KILL_DOOR:
{
/* Chests are noticed only if trapped or locked */
@@ -6918,7 +6831,6 @@ static bool_ project_p(int who, int r, int y, int x, int dam, int typ, int a_rad
auto const &d_info = game->edit_data.d_info;
auto const &r_info = game->edit_data.r_info;
auto const &f_info = game->edit_data.f_info;
- auto const &t_info = game->edit_data.t_info;
int k = 0, do_move = 0, a = 0, b = 0, x1 = 0, y1 = 0;
@@ -7004,9 +6916,6 @@ static bool_ project_p(int who, int r, int y, int x, int dam, int typ, int a_rad
/* If the player is blind, be more descriptive */
if (blind) fuzzy = TRUE;
- /* If the player is hit by a trap, be more descritive */
- if (who == -2) fuzzy = TRUE;
-
/* Did ``God'' do it? */
if (who == -99)
{
@@ -7041,12 +6950,6 @@ static bool_ project_p(int who, int r, int y, int x, int dam, int typ, int a_rad
monster_desc(killer, m_ptr, 0x88);
}
- if (who == -2)
- {
- sprintf(killer, "%s",
- t_info[cave[p_ptr->py][p_ptr->px].t_idx].name);
- }
-
/* Analyze the damage */
switch (typ)
{
@@ -8875,18 +8778,12 @@ static void describe_attack_fully(int type, char* r)
case GF_KILL_DOOR:
strcpy(r, "door destruction");
break;
- case GF_KILL_TRAP:
- strcpy(r, "trap destruction");
- break;
case GF_STONE_WALL:
strcpy(r, "wall creation");
break;
case GF_MAKE_DOOR:
strcpy(r, "door creation");
break;
- case GF_MAKE_TRAP:
- strcpy(r, "trap creation");
- break;
case GF_DESTRUCTION:
strcpy(r, "destruction");
break;
diff --git a/src/spells2.cc b/src/spells2.cc
index 5c1215d0..ab872dc6 100644
--- a/src/spells2.cc
+++ b/src/spells2.cc
@@ -1108,8 +1108,6 @@ void self_knowledge(FILE *fff)
info[i++] = "You can teleport level.";
if (r_ptr->spells & SF_DARKNESS)
info[i++] = "You can create darkness.";
- if (r_ptr->spells & SF_TRAPS)
- info[i++] = "You can create traps.";
if (r_ptr->spells & SF_FORGET)
info[i++] = "You can fade memories.";
if (r_ptr->spells & SF_RAISE_DEAD)
@@ -1276,10 +1274,6 @@ void self_knowledge(FILE *fff)
{
info[i++] = "Your hands are glowing dull red.";
}
- if (p_ptr->searching)
- {
- info[i++] = "You are looking around very carefully.";
- }
if (p_ptr->word_recall)
{
info[i++] = "You will soon be recalled.";
@@ -2024,76 +2018,6 @@ bool_ lose_all_info(void)
}
-
-
-/*
- * Detect all traps on current panel
- */
-bool_ detect_traps(int rad)
-{
- int x, y;
- bool_ detect = FALSE;
- cave_type *c_ptr;
-
-
- /* Scan the current panel */
- for (y = p_ptr->py - rad; y <= p_ptr->py + rad; y++)
- {
- for (x = p_ptr->px - rad; x <= p_ptr->px + rad; x++)
- {
- /* Reject locations outside of dungeon */
- if (!in_bounds(y, x)) continue;
-
- /* Reject those out of radius */
- if (distance(p_ptr->py, p_ptr->px, y, x) > rad) continue;
-
- /* Access the grid */
- c_ptr = &cave[y][x];
-
- /* mark as detected */
- c_ptr->info |= CAVE_DETECT;
-
- /* Detect invisible traps */
- if (c_ptr->t_idx != 0)
- {
- /* Hack -- Remember detected traps */
- c_ptr->info |= (CAVE_MARK);
-
- /* Pick a trap */
- pick_trap(y, x);
-
- /* Obvious */
- detect = TRUE;
- }
- }
- }
-
- /* Describe */
- if (detect)
- {
- msg_print("You sense the presence of traps!");
- }
-
- /*
- * This reveals un-identified trap detection items,
- * but so does leaving/entering trap-detected areas...
- * There are a couple of possible solutions:
- * (1) Immediately self-id such items (i.e. always returns TRUE)
- * (2) add another parameter to function which tells if unaware
- * item is used for trap detection, and if it is the case,
- * do two-pass scanning, first scanning for traps if an unaware
- * item is used and return FALSE there are none,
- * followed by current implementation --pelpel
- */
- p_ptr->redraw |= (PR_FRAME);
-
- /* Result -- see my comment above -- pelpel */
- /* return (detect); */
- return (TRUE);
-}
-
-
-
/*
* Detect all doors on current panel
*/
@@ -2540,7 +2464,6 @@ bool_ detect_all(int rad)
bool_ detect = FALSE;
/* Detect everything */
- if (detect_traps(rad)) detect = TRUE;
if (detect_doors(rad)) detect = TRUE;
if (detect_stairs(rad)) detect = TRUE;
if (detect_treasure(rad)) detect = TRUE;
@@ -5191,9 +5114,6 @@ void teleport_swap(int dir)
/* Update the monsters */
p_ptr->update |= (PU_DISTANCE);
- /* Redraw trap detection status */
- p_ptr->redraw |= (PR_FRAME);
-
/* Window stuff */
p_ptr->window |= (PW_OVERHEAD);
@@ -5242,9 +5162,6 @@ void swap_position(int lty, int ltx)
/* Update the monsters */
p_ptr->update |= (PU_DISTANCE);
- /* Redraw trap detection status */
- p_ptr->redraw |= (PR_FRAME);
-
/* Window stuff */
p_ptr->window |= (PW_OVERHEAD);
@@ -5289,9 +5206,6 @@ void swap_position(int lty, int ltx)
/* Update the monsters */
p_ptr->update |= (PU_DISTANCE);
- /* Redraw trap detection status */
- p_ptr->redraw |= (PR_FRAME);
-
/* Window stuff */
p_ptr->window |= (PW_OVERHEAD);
@@ -5397,14 +5311,6 @@ bool_ wizard_lock(int dir)
return (project_hook(GF_JAM_DOOR, dir, 20 + randint(30), flg));
}
-
-bool_ disarm_trap(int dir)
-{
- int flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_ITEM;
- return (project_hook(GF_KILL_TRAP, dir, 0, flg));
-}
-
-
bool_ slow_monster(int dir)
{
int flg = PROJECT_STOP | PROJECT_KILL;
@@ -5453,14 +5359,6 @@ bool_ teleport_monster(int dir)
return (project_hook(GF_AWAY_ALL, dir, MAX_SIGHT * 5, flg));
}
-
-bool_ trap_creation(void)
-{
- int flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_HIDE;
- return (project(0, 1, p_ptr->py, p_ptr->px, 0, GF_MAKE_TRAP, flg));
-}
-
-
bool_ wall_stone(int y, int x)
{
auto const &f_info = game->edit_data.f_info;
@@ -5496,12 +5394,6 @@ bool_ destroy_doors_touch(void)
return (project(0, 1, p_ptr->py, p_ptr->px, 0, GF_KILL_DOOR, flg));
}
-bool_ destroy_traps_touch(void)
-{
- int flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_HIDE;
- return (project(0, 1, p_ptr->py, p_ptr->px, 0, GF_KILL_TRAP, flg));
-}
-
bool_ sleep_monsters_touch(void)
{
int flg = PROJECT_KILL | PROJECT_HIDE;
@@ -6085,9 +5977,6 @@ bool_ passwall(int dir, bool_ safe)
/* Update the monsters */
p_ptr->update |= (PU_DISTANCE);
- /* Redraw trap detection status */
- p_ptr->redraw |= (PR_FRAME);
-
/* Window stuff */
p_ptr->window |= (PW_OVERHEAD);
diff --git a/src/spells3.cc b/src/spells3.cc
index f64a22bf..95357ba0 100644
--- a/src/spells3.cc
+++ b/src/spells3.cc
@@ -44,7 +44,6 @@ s32b THUNDERSTORM;
s32b STERILIZE;
s32b BLINK;
-s32b DISARM;
s32b TELEPORT;
s32b TELEAWAY;
s32b RECALL;
@@ -401,19 +400,6 @@ const char *convey_blink_info()
return buf;
}
-casting_result convey_disarm()
-{
- casting_result result = NO_CAST;
-
- result = cplus(result, destroy_doors_touch());
- if (get_level_s(DISARM, 50) >= 10)
- {
- result = cplus(result, destroy_traps_touch());
- }
-
- return result;
-}
-
casting_result convey_teleport()
{
p_ptr->energy -= (25 - get_level_s(TELEPORT, 50));
@@ -960,12 +946,7 @@ casting_result divination_vision()
casting_result divination_sense_hidden()
{
casting_result result = NO_CAST;
-
- result = cplus(result, detect_traps(15 + get_level(SENSEHIDDEN, 40)));
- if (get_level_s(SENSEHIDDEN, 50) >= 15)
- {
- result = cplus(result, set_tim_invis(10 + randint(20) + get_level_s(SENSEHIDDEN, 40)));
- }
+ result = cplus(result, set_tim_invis(10 + randint(20) + get_level_s(SENSEHIDDEN, 40)));
return result;
}
diff --git a/src/spells4.cc b/src/spells4.cc
index 199aea98..97c3d523 100644
--- a/src/spells4.cc
+++ b/src/spells4.cc
@@ -210,7 +210,6 @@ void init_school_books()
push_spell(TOME_TRANSLOCATION, RECALL);
push_spell(TOME_TRANSLOCATION, TELEAWAY);
push_spell(TOME_TRANSLOCATION, TELEPORT);
- push_spell(TOME_TRANSLOCATION, DISARM);
push_spell(TOME_TRANSLOCATION, BLINK);
/* Create the book of the tree */
diff --git a/src/spells5.cc b/src/spells5.cc
index dc237382..ba2e6d05 100644
--- a/src/spells5.cc
+++ b/src/spells5.cc
@@ -919,30 +919,6 @@ void school_spells_init()
}
{
- spell_type *spell = spell_new(&DISARM, "Disarm");
- spell_type_describe(spell, "Destroys doors and traps");
- spell_type_describe(spell, "At level 10 it destroys doors and traps, then reveals and unlocks any secret");
- spell_type_describe(spell, "doors");
- spell_type_set_mana(spell, 2, 4);
- spell_type_set_difficulty(spell, 3, 15);
- spell_type_init_mage(spell,
- RANDOM,
- SCHOOL_CONVEYANCE,
- no_info,
- convey_disarm);
-
- spell_type_set_device_charges(spell, "10+d15");
-
- {
- device_allocation *device_allocation = device_allocation_new(TV_STAFF);
- device_allocation->rarity = 4;
- range_init(&device_allocation->base_level, 1, 10);
- range_init(&device_allocation->max_level, 10, 50);
- spell_type_add_device_allocation(spell, device_allocation);
- }
- }
-
- {
spell_type *spell = spell_new(&TELEPORT, "Teleportation");
spell_type_describe(spell, "Teleports you around the level. The casting time decreases with level");
spell_type_set_mana(spell, 8, 14);
diff --git a/src/store.cc b/src/store.cc
index cdf87d13..8771fcd4 100644
--- a/src/store.cc
+++ b/src/store.cc
@@ -810,7 +810,6 @@ static bool store_will_buy(object_type const *o_ptr)
{
switch (o_ptr->tval)
{
- case TV_TRAPKIT:
case TV_BOOMERANG:
case TV_SHOT:
case TV_BOLT:
diff --git a/src/tables.cc b/src/tables.cc
index 8853b938..0662da0f 100644
--- a/src/tables.cc
+++ b/src/tables.cc
@@ -3750,7 +3750,6 @@ monster_power monster_powers[] =
{ SF_TELE_AWAY_IDX, "Teleport Away", 20, FALSE },
{ SF_TELE_LEVEL_IDX, "Teleport Level", 20, TRUE },
{ SF_DARKNESS_IDX, "Darkness", 3, FALSE },
- { SF_TRAPS_IDX, "Create Traps", 10, TRUE },
{ SF_RAISE_DEAD_IDX, "Raise the Dead", 400, TRUE },
{ SF_S_THUNDERLORD_IDX, "Summon Thunderlords", 90, TRUE },
{ SF_S_KIN_IDX, "Summon Kin", 80, FALSE },
@@ -3820,7 +3819,6 @@ tval_desc tvals[] =
{ TV_RUNE1, "Rune 1" },
{ TV_RUNE2, "Rune 2" },
{ TV_JUNK, "Junk" },
- { TV_TRAPKIT, "Trapping Kit" },
{ 0, NULL }
};
@@ -3924,11 +3922,6 @@ tval_desc tval_descs[] =
"arcane magics."
},
{
- TV_TRAPKIT,
- "Trapping kits are used with the trapping ability to set "
- "deadly monster traps."
- },
- {
TV_STAFF,
"Staves are objects imbued with mystical powers."
},
@@ -4158,10 +4151,8 @@ gf_name_type gf_names[] =
{ GF_GRAVITY, "gravity" },
{ GF_KILL_WALL, "wall destruction" },
{ GF_KILL_DOOR, "door destruction" },
- { GF_KILL_TRAP, "trap destruction" },
{ GF_MAKE_WALL, "wall creation" },
{ GF_MAKE_DOOR, "door creation" },
- { GF_MAKE_TRAP, "trap creation" },
{ GF_OLD_CLONE, "clone" },
{ GF_OLD_POLY, "polymorph" },
{ GF_OLD_HEAL, "healing" },
diff --git a/src/trap_type.hpp b/src/trap_type.hpp
deleted file mode 100644
index d82c925b..00000000
--- a/src/trap_type.hpp
+++ /dev/null
@@ -1,24 +0,0 @@
-#pragma once
-
-#include "h-basic.h"
-
-/**
- * Trap descriptor.
- */
-struct trap_type
-{
- s16b probability; /* probability of existence */
- s16b another; /* does this trap easily combine */
- s16b p1valinc; /* how much does this trap attribute to p1val */
- byte difficulty; /* how difficult to disarm */
- byte minlevel; /* what is the minimum level on which the traps should be */
- byte color; /* what is the color on screen */
- u32b flags; /* where can these traps go - and perhaps other flags */
- bool_ ident; /* do we know the name */
- s16b known; /* how well is this trap known */
- const char *name; /* normal name like weakness */
- s16b dd, ds; /* base damage */
- char *text; /* longer description once you've met this trap */
- byte g_attr; /* Overlay graphic attribute */
- char g_char; /* Overlay graphic character */
-};
diff --git a/src/traps.cc b/src/traps.cc
deleted file mode 100644
index a646d221..00000000
--- a/src/traps.cc
+++ /dev/null
@@ -1,3113 +0,0 @@
-/* the below copyright probably still applies, but it is heavily changed
- * copied, adapted & re-engineered by JK.
- * Copyright (c) 1989 James E. Wilson, Robert A. Koeneke
- *
- * This software may be copied and distributed for educational, research, and
- * not for profit purposes provided that this copyright and statement are
- * included in all such copies.
- */
-
-#include "traps.hpp"
-
-#include "artifact_type.hpp"
-#include "cave.hpp"
-#include "cave_type.hpp"
-#include "cmd1.hpp"
-#include "cmd2.hpp"
-#include "dungeon_flag.hpp"
-#include "dungeon_info_type.hpp"
-#include "feature_flag.hpp"
-#include "feature_type.hpp"
-#include "files.hpp"
-#include "game.hpp"
-#include "gods.hpp"
-#include "monster2.hpp"
-#include "monster_race.hpp"
-#include "monster_race_flag.hpp"
-#include "monster_type.hpp"
-#include "object1.hpp"
-#include "object2.hpp"
-#include "object_flag.hpp"
-#include "object_kind.hpp"
-#include "player_race.hpp"
-#include "player_race_mod.hpp"
-#include "player_spec.hpp"
-#include "player_type.hpp"
-#include "spells1.hpp"
-#include "spells2.hpp"
-#include "stats.hpp"
-#include "tables.hpp"
-#include "trap_type.hpp"
-#include "util.hpp"
-#include "variable.hpp"
-#include "xtra1.hpp"
-#include "xtra2.hpp"
-#include "z-rand.hpp"
-
-bool_ do_player_trap_call_out(void)
-{
- s16b i, sn, cx, cy;
- s16b h_index = 0;
- s16b h_level = 0;
- monster_type *m_ptr;
- char m_name[80];
- bool_ ident = FALSE;
-
- for (i = 1; i < m_max; i++)
- {
- m_ptr = &m_list[i];
-
- /* Paranoia -- Skip dead monsters */
- if (!m_ptr->r_idx) continue;
-
- if (m_ptr->level >= h_level)
- {
- h_level = m_ptr->level;
- h_index = i;
- }
- }
-
- /* if the level is empty of monsters, h_index will be 0 */
- if (!h_index) return (FALSE);
-
- m_ptr = &m_list[h_index];
-
- sn = 0;
- for (i = 0; i < 8; i++)
- {
- cx = p_ptr->px + ddx[i];
- cy = p_ptr->py + ddy[i];
-
- /* Skip non-empty grids */
- if (!cave_valid_bold(cy, cx)) continue;
- if (cave[cy][cx].feat == FEAT_GLYPH) continue;
- if ((cx == p_ptr->px) && (cy == p_ptr->py)) continue;
- sn++;
-
- /* Randomize choice */
- if (rand_int(sn) > 0) continue;
- cave[cy][cx].m_idx = h_index;
- cave[m_ptr->fy][m_ptr->fx].m_idx = 0;
- m_ptr->fx = cx;
- m_ptr->fy = cy;
-
- /* we do not change the sublevel! */
- ident = TRUE;
- update_mon(h_index, TRUE);
- monster_desc(m_name, m_ptr, 0x08);
- msg_format("You hear a rapid-shifting wail, and %s appears!", m_name);
- break;
- }
-
- return (ident);
-}
-
-static bool_ do_trap_teleport_away(object_type *i_ptr, s16b y, s16b x)
-{
- auto const &f_info = game->edit_data.f_info;
-
- bool_ ident = FALSE;
- char o_name[80];
-
- s16b o_idx = 0;
- object_type *o_ptr;
- cave_type *c_ptr;
-
- s16b x1;
- s16b y1;
-
- if (i_ptr == NULL) return (FALSE);
-
- if (i_ptr->name1 == ART_POWER) return (FALSE);
-
- while (o_idx == 0)
- {
- x1 = rand_int(cur_wid);
- y1 = rand_int(cur_hgt);
-
- /* Obtain grid */
- c_ptr = &cave[y1][x1];
-
- /* Require floor space (or shallow terrain) -KMW- */
- if (!(f_info[c_ptr->feat].flags & FF_FLOOR)) continue;
-
- o_idx = drop_near(i_ptr, 0, y1, x1);
- }
-
- o_ptr = &o_list[o_idx];
-
- x1 = o_ptr->ix;
- y1 = o_ptr->iy;
-
- if (!p_ptr->blind)
- {
- note_spot(y, x);
- lite_spot(y, x);
- ident = TRUE;
- object_desc(o_name, i_ptr, FALSE, 0);
- if (player_has_los_bold(y1, x1))
- {
- lite_spot(y1, x1);
- msg_format("The %s suddenly stands elsewhere.", o_name);
-
- }
- else
- {
- msg_format("You suddenly don't see the %s any more!", o_name);
- }
- }
- else
- {
- msg_print("You hear something move.");
- }
- return (ident);
-}
-
-/*
- * this handles a trap that places walls around the player
- */
-static bool_ player_handle_trap_of_walls(void)
-{
- auto const &f_info = game->edit_data.f_info;
-
- bool_ ident;
-
- s16b dx, dy, cx, cy;
- s16b sx = 0, sy = 0, sn, i;
- cave_type *cv_ptr;
- bool_ map[5][5] =
- {
- {FALSE, FALSE, FALSE, FALSE, FALSE},
- {FALSE, FALSE, FALSE, FALSE, FALSE},
- {FALSE, FALSE, FALSE, FALSE, FALSE},
- {FALSE, FALSE, FALSE, FALSE, FALSE},
- {FALSE, FALSE, FALSE, FALSE, FALSE}
- };
-
- for (dy = -2; dy <= 2; dy++)
- for (dx = -2; dx <= 2; dx++)
- {
- /* Extract the location */
- cx = p_ptr->px + dx;
- cy = p_ptr->py + dy;
-
- if (!in_bounds(cy, cx)) continue;
-
- cv_ptr = &cave[cy][cx];
-
- if (cv_ptr->m_idx) continue;
-
- /* Lose room and vault */
- cv_ptr->info &= ~(CAVE_ROOM | CAVE_ICKY);
- /* Lose light and knowledge */
- cv_ptr->info &= ~(CAVE_GLOW | CAVE_MARK);
-
- /* Skip the center */
- if (!dx && !dy) continue;
-
- /* test for dungeon level */
- if (randint(100) > 10 + max_dlv[dungeon_type]) continue;
-
- /* Damage this grid */
- map[2 + dx][2 + dy] = TRUE;
- }
-
- for (dy = -2; dy <= 2; dy++)
- for (dx = -2; dx <= 2; dx++)
- {
- /* Extract the location */
- cx = p_ptr->px + dx;
- cy = p_ptr->py + dy;
-
- /* Skip unaffected grids */
- if (!map[2 + dx][2 + dy]) continue;
-
- cv_ptr = &cave[cy][cx];
-
- if (cv_ptr->m_idx)
- {
- monster_type *m_ptr = &m_list[cv_ptr->m_idx];
- auto const r_ptr = m_ptr->race();
-
- /* Most monsters cannot co-exist with rock */
- if ((!(r_ptr->flags & RF_KILL_WALL)) &&
- (!(r_ptr->flags & RF_PASS_WALL)))
- {
- char m_name[80];
-
- /* Assume not safe */
- sn = 0;
-
- /* Monster can move to escape the wall */
- if (!(r_ptr->flags & RF_NEVER_MOVE))
- {
- /* Look for safety */
- for (i = 0; i < 8; i++)
- {
- /* Access the grid */
- cy = p_ptr->py + ddy[i];
- cx = p_ptr->px + ddx[i];
-
- /* Skip non-empty grids */
- if (!cave_clean_bold(cy, cx)) continue;
-
- /* Hack -- no safety on glyph of warding */
- if (cave[cy][cx].feat == FEAT_GLYPH) continue;
-
- /* Important -- Skip "quake" grids */
- if (map[2 + (cx - p_ptr->px)][2 + (cy - p_ptr->py)]) continue;
-
- /* Count "safe" grids */
- sn++;
-
- /* Randomize choice */
- if (rand_int(sn) > 0) continue;
-
- /* Save the safe grid */
- sx = cx;
- sy = cy;
-
- ident = TRUE;
-
- break; /* discontinue for loop - safe grid found */
- }
- }
-
- /* Describe the monster */
- monster_desc(m_name, m_ptr, 0);
-
- /* Scream in pain */
- msg_format("%^s wails out in pain!", m_name);
-
- /* Monster is certainly awake */
- m_ptr->csleep = 0;
-
- /* Apply damage directly */
- m_ptr->hp -= (sn ? damroll(4, 8) : 200);
-
- /* Delete (not kill) "dead" monsters */
- if (m_ptr->hp < 0)
- {
- /* Message */
- msg_format("%^s is entombed in the rock!", m_name);
-
- /* Delete the monster */
- delete_monster_idx(cave[cy][cx].m_idx);
-
- /* No longer safe */
- sn = 0;
- }
-
- /* Hack -- Escape from the rock */
- if (sn)
- {
- s16b m_idx = cave[cy][cx].m_idx;
-
- /* Update the new location */
- cave[sy][sx].m_idx = m_idx;
-
- /* Update the old location */
- cave[cy][cx].m_idx = 0;
-
- /* Move the monster */
- m_ptr->fy = sy;
- m_ptr->fx = sx;
-
- /* do not change fz */
- /* don't make rock on that square! */
- if ((sx >= (p_ptr->px - 2)) && (sx <= (p_ptr->px + 2)) &&
- (sy >= (p_ptr->py - 2)) && (sy <= (p_ptr->py + 2)))
- {
- map[2 + (sx - p_ptr->px)][2 + (sy - p_ptr->py)] = FALSE;
- }
-
- /* Update the monster (new location) */
- update_mon(m_idx, TRUE);
-
- /* Redraw the old grid */
- lite_spot(cy, cx);
-
- /* Redraw the new grid */
- lite_spot(sy, sx);
- } /* if sn */
- } /* if monster can co-exist with rock */
- } /* if monster on square */
- }
-
- /* Examine the quaked region */
- for (dy = -2; dy <= 2; dy++)
- for (dx = -2; dx <= 2; dx++)
- {
- /* Extract the location */
- cx = p_ptr->px + dx;
- cy = p_ptr->py + dy;
-
- /* Skip unaffected grids */
- if (!map[2 + dx][2 + dy]) continue;
-
- /* Access the cave grid */
- cv_ptr = &cave[cy][cx];
-
- /* Paranoia -- never affect player */
- if (!dy && !dx) continue;
-
- /* Destroy location (if valid) */
- if ((cx < cur_wid) && (cy < cur_hgt) && cave_valid_bold(cy, cx))
- {
- bool floor = bool(f_info[cave[cy][cx].feat].flags & FF_FLOOR);
-
- /* Delete any object that is still there */
- delete_object(cy, cx);
-
- if (floor)
- {
- cave_set_feat(cy, cx, FEAT_WALL_OUTER);
- }
- else
- {
- /* Clear previous contents, add floor */
- cave_set_feat(cy, cx, FEAT_FLOOR);
- }
- }
- }
-
- /* Mega-Hack -- Forget the view and lite */
- p_ptr->update |= PU_UN_VIEW;
-
- /* Update stuff */
- p_ptr->update |= (PU_VIEW | PU_FLOW | PU_MON_LITE);
-
- /* Update the monsters */
- p_ptr->update |= (PU_DISTANCE);
-
- /* Update the health bar */
- p_ptr->redraw |= (PR_FRAME);
-
- /* Redraw map */
- p_ptr->redraw |= (PR_MAP);
-
- /* Window stuff */
- p_ptr->window |= (PW_OVERHEAD);
- handle_stuff();
-
- msg_print("Suddenly the cave shifts around you. The air is getting stale!");
-
- ident = TRUE;
-
- return (ident);
-}
-
-
-/*
- * this function handles arrow & dagger traps, in various types.
- * num = number of missiles
- * tval, sval = kind of missiles
- * dd,ds = damage roll for missiles
- * poison_dam = additional poison damage
- * name = name given if you should die from it...
- *
- * return value = ident (always TRUE)
- */
-static bool_ player_handle_missile_trap(s16b num, s16b tval, s16b sval, s16b dd, s16b ds,
- s16b pdam, cptr name)
-{
- object_type *o_ptr, forge;
- s16b i, k_idx = lookup_kind(tval, sval);
- char i_name[80];
-
- o_ptr = &forge;
- object_prep(o_ptr, k_idx);
- o_ptr->number = num;
- apply_magic(o_ptr, max_dlv[dungeon_type], FALSE, FALSE, FALSE);
- object_desc(i_name, o_ptr, TRUE, 0);
-
- msg_format("Suddenly %s hit%s you!", i_name,
- ((num == 1) ? "" : "s"));
-
- for (i = 0; i < num; i++)
- {
- take_hit(damroll(dd, ds), name);
-
- redraw_stuff();
-
- if (pdam > 0)
- {
- if (!(p_ptr->resist_pois || p_ptr->oppose_pois))
- {
- (void)set_poisoned(p_ptr->poisoned + pdam);
- }
- }
- }
-
- drop_near(o_ptr, -1, p_ptr->py, p_ptr->px);
-
- return TRUE;
-}
-
-/*
- * this function handles a "breath" type trap - acid bolt, lightning balls etc.
- */
-static bool_ player_handle_breath_trap(s16b rad, s16b type, u16b trap)
-{
- auto const &t_info = game->edit_data.t_info;
-
- auto t_ptr = &t_info[trap];
- bool_ ident;
- s16b my_dd, my_ds, dam;
-
- my_dd = t_ptr->dd;
- my_ds = t_ptr->ds;
-
- /* these traps gets nastier as levels progress */
- if (max_dlv[dungeon_type] > (2 * t_ptr->minlevel))
- {
- my_dd += (max_dlv[dungeon_type] / 15);
- my_ds += (max_dlv[dungeon_type] / 15);
- }
- dam = damroll(my_dd, my_ds);
-
- ident = project( -2, rad, p_ptr->py, p_ptr->px, dam, type, PROJECT_KILL | PROJECT_JUMP);
-
- return (ident);
-}
-
-/*
- * this function activates one trap type, and returns
- * a bool_ indicating if this trap is now identified
- */
-bool_ player_activate_trap_type(s16b y, s16b x, object_type *i_ptr, s16b item)
-{
- auto const &a_info = game->edit_data.a_info;
-
- bool_ ident = FALSE;
- s16b trap;
-
- s16b k, l;
-
- trap = cave[y][x].t_idx;
-
- if (i_ptr != NULL)
- {
- trap = i_ptr->pval;
- }
-
- switch (trap)
- {
- /* stat traps */
- case TRAP_OF_WEAKNESS_I:
- ident = do_dec_stat(A_STR, STAT_DEC_TEMPORARY);
- break;
- case TRAP_OF_WEAKNESS_II:
- ident = do_dec_stat(A_STR, STAT_DEC_NORMAL);
- break;
- case TRAP_OF_WEAKNESS_III:
- ident = do_dec_stat(A_STR, STAT_DEC_PERMANENT);
- break;
- case TRAP_OF_INTELLIGENCE_I:
- ident = do_dec_stat(A_INT, STAT_DEC_TEMPORARY);
- break;
- case TRAP_OF_INTELLIGENCE_II:
- ident = do_dec_stat(A_INT, STAT_DEC_NORMAL);
- break;
- case TRAP_OF_INTELLIGENCE_III:
- ident = do_dec_stat(A_INT, STAT_DEC_PERMANENT);
- break;
- case TRAP_OF_WISDOM_I:
- ident = do_dec_stat(A_WIS, STAT_DEC_TEMPORARY);
- break;
- case TRAP_OF_WISDOM_II:
- ident = do_dec_stat(A_WIS, STAT_DEC_NORMAL);
- break;
- case TRAP_OF_WISDOM_III:
- ident = do_dec_stat(A_WIS, STAT_DEC_PERMANENT);
- break;
- case TRAP_OF_FUMBLING_I:
- ident = do_dec_stat(A_DEX, STAT_DEC_TEMPORARY);
- break;
- case TRAP_OF_FUMBLING_II:
- ident = do_dec_stat(A_DEX, STAT_DEC_NORMAL);
- break;
- case TRAP_OF_FUMBLING_III:
- ident = do_dec_stat(A_DEX, STAT_DEC_PERMANENT);
- break;
- case TRAP_OF_WASTING_I:
- ident = do_dec_stat(A_CON, STAT_DEC_TEMPORARY);
- break;
- case TRAP_OF_WASTING_II:
- ident = do_dec_stat(A_CON, STAT_DEC_NORMAL);
- break;
- case TRAP_OF_WASTING_III:
- ident = do_dec_stat(A_CON, STAT_DEC_PERMANENT);
- break;
- case TRAP_OF_BEAUTY_I:
- ident = do_dec_stat(A_CHR, STAT_DEC_TEMPORARY);
- break;
- case TRAP_OF_BEAUTY_II:
- ident = do_dec_stat(A_CHR, STAT_DEC_NORMAL);
- break;
- case TRAP_OF_BEAUTY_III:
- ident = do_dec_stat(A_CHR, STAT_DEC_PERMANENT);
- break;
-
- /* Trap of Curse Weapon */
- case TRAP_OF_CURSE_WEAPON:
- {
- ident = curse_weapon();
- break;
- }
-
- /* Trap of Curse Armor */
- case TRAP_OF_CURSE_ARMOR:
- {
- ident = curse_armor();
- break;
- }
-
- /* Earthquake Trap */
- case TRAP_OF_EARTHQUAKE:
- {
- msg_print("As you touch the trap, the ground starts to shake.");
- earthquake(y, x, 10);
- ident = TRUE;
- break;
- }
-
- /* Poison Needle Trap */
- case TRAP_OF_POISON_NEEDLE:
- {
- if (!(p_ptr->resist_pois || p_ptr->oppose_pois))
- {
- msg_print("You prick yourself on a poisoned needle.");
- (void)set_poisoned(p_ptr->poisoned + rand_int(15) + 10);
- ident = TRUE;
- }
- else
- {
- msg_print("You prick yourself on a needle.");
- }
- break;
- }
-
- /* Summon Monster Trap */
- case TRAP_OF_SUMMON_MONSTER:
- {
- msg_print("A spell hangs in the air.");
- for (k = 0; k < randint(3); k++)
- {
- ident |= summon_specific(y, x, max_dlv[dungeon_type], 0);
- }
- break;
- }
-
- /* Summon Undead Trap */
- case TRAP_OF_SUMMON_UNDEAD:
- {
- msg_print("A mighty spell hangs in the air.");
- for (k = 0; k < randint(3); k++)
- {
- ident |= summon_specific(y, x, max_dlv[dungeon_type],
- SUMMON_UNDEAD);
- }
- break;
- }
-
- /* Summon Greater Undead Trap */
- case TRAP_OF_SUMMON_GREATER_UNDEAD:
- {
- msg_print("An old and evil spell hangs in the air.");
- for (k = 0; k < randint(3); k++)
- {
- ident |= summon_specific(y, x, max_dlv[dungeon_type],
- SUMMON_HI_UNDEAD);
- }
- break;
- }
-
- /* Teleport Trap */
- case TRAP_OF_TELEPORT:
- {
- msg_print("The world whirls around you.");
- teleport_player(RATIO * 67);
- ident = TRUE;
- break;
- }
-
- /* Paralyzing Trap */
- case TRAP_OF_PARALYZING:
- {
- if (!p_ptr->free_act)
- {
- msg_print("You touch a poisoned part and can't move.");
- (void)set_paralyzed(rand_int(10) + 10);
- ident = TRUE;
- }
- else
- {
- msg_print("You prick yourself on a needle.");
- }
- break;
- }
-
- /* Explosive Device */
- case TRAP_OF_EXPLOSIVE_DEVICE:
- {
- msg_print("A hidden explosive device explodes in your face.");
- take_hit(damroll(5, 8), "an explosion");
- ident = TRUE;
- break;
- }
-
- /* Teleport Away Trap */
- case TRAP_OF_TELEPORT_AWAY:
- {
- /* teleport away all items */
- while (!cave[y][x].o_idxs.empty())
- {
- auto item = cave[y][x].o_idxs.front();
-
- object_type *o_ptr = &o_list[item];
-
- int amt = o_ptr->number;
-
- ident = do_trap_teleport_away(o_ptr, y, x);
-
- floor_item_increase(item, -amt);
- floor_item_optimize(item);
- }
- break;
- }
-
- /* Lose Memory Trap */
- case TRAP_OF_LOSE_MEMORY:
- {
- lose_exp(p_ptr->exp / 4);
-
- ident |= dec_stat(A_WIS, rand_int(20) + 10, STAT_DEC_NORMAL);
- ident |= dec_stat(A_INT, rand_int(20) + 10, STAT_DEC_NORMAL);
-
- if (!p_ptr->resist_conf)
- {
- ident |= set_confused(p_ptr->confused + rand_int(100) + 50);
- }
-
- if (ident)
- {
- msg_print("You suddenly don't remember what you were doing.");
- }
- else
- {
- msg_print("You feel an alien force probing your mind.");
- }
- break;
- }
- /* Bitter Regret Trap */
- case TRAP_OF_BITTER_REGRET:
- {
- msg_print("An age-old and hideous-sounding spell reverberates off the walls.");
-
- ident |= dec_stat(A_DEX, 25, TRUE);
- ident |= dec_stat(A_WIS, 25, TRUE);
- ident |= dec_stat(A_CON, 25, TRUE);
- ident |= dec_stat(A_STR, 25, TRUE);
- ident |= dec_stat(A_CHR, 25, TRUE);
- ident |= dec_stat(A_INT, 25, TRUE);
- break;
- }
-
- /* Bowel Cramps Trap */
- case TRAP_OF_BOWEL_CRAMPS:
- {
- msg_print("A wretched-smelling gas cloud upsets your stomach.");
-
- (void)set_food(PY_FOOD_STARVE - 1);
- (void)set_poisoned(0);
-
- if (!p_ptr->free_act)
- {
- (void)set_paralyzed(rand_int(dun_level) + 6);
- }
- ident = TRUE;
- break;
- }
-
- /* Blindness/Confusion Trap */
- case TRAP_OF_BLINDNESS_CONFUSION:
- {
- msg_print("A powerful magic protected this.");
-
- if (!p_ptr->resist_blind)
- {
- ident |= set_blind(p_ptr->blind + rand_int(100) + 100);
- }
- if (!p_ptr->resist_conf)
- {
- ident |= set_confused(p_ptr->confused + rand_int(20) + 15);
- }
- break;
- }
-
- /* Aggravation Trap */
- case TRAP_OF_AGGRAVATION:
- {
- msg_print("You hear a hollow noise echoing through the dungeons.");
- aggravate_monsters(1);
- break;
- }
-
- /* Multiplication Trap */
- case TRAP_OF_MULTIPLICATION:
- {
- msg_print("You hear a loud click.");
- for (k = -1; k <= 1; k++)
- for (l = -1; l <= 1; l++)
- {
- if ((in_bounds(p_ptr->py + l, p_ptr->px + k)) &&
- (!cave[p_ptr->py + l][p_ptr->px + k].t_idx))
- {
- place_trap(p_ptr->py + l, p_ptr->px + k);
- }
- }
- ident = TRUE;
- break;
- }
-
- /* Steal Item Trap */
- case TRAP_OF_STEAL_ITEM:
- {
- /*
- * please note that magical stealing is not so
- * easily circumvented
- */
- if (!p_ptr->paralyzed &&
- (rand_int(160) < (adj_dex_safe[p_ptr->stat_ind[A_DEX]] +
- p_ptr->lev)))
- {
- /* Saving throw message */
- msg_print("Your backpack seems to vibrate strangely!");
- break;
- }
-
- /* Find an item */
- for (k = 0; k < rand_int(10); k++)
- {
- char i_name[80];
- object_type *j_ptr, *q_ptr, forge;
-
- /* Pick an item */
- s16b i = rand_int(INVEN_PACK);
-
- /* Obtain the item */
- j_ptr = &p_ptr->inventory[i];
-
- /* Accept real items */
- if (!j_ptr->k_idx) continue;
-
- /* Don't steal artifacts -CFT */
- if (artifact_p(j_ptr)) continue;
-
- /* Get a description */
- object_desc(i_name, j_ptr, FALSE, 3);
-
- /* Message */
- msg_format("%sour %s (%c) was stolen!",
- ((j_ptr->number > 1) ? "One of y" : "Y"),
- i_name, index_to_label(i));
-
- /* Create the item */
- q_ptr = &forge;
- object_copy(q_ptr, j_ptr);
- q_ptr->number = 1;
-
- /* Drop it somewhere */
- do_trap_teleport_away(q_ptr, y, x);
-
- inc_stack_size_ex(i, -1, OPTIMIZE, NO_DESCRIBE);
-
- ident = TRUE;
- }
- break;
- }
-
- /* Summon Fast Quylthulgs Trap */
- case TRAP_OF_SUMMON_FAST_QUYLTHULGS:
- {
- for (k = 0; k < randint(3); k++)
- {
- ident |= summon_specific(y, x, max_dlv[dungeon_type], SUMMON_QUYLTHULG);
- }
-
- if (ident)
- {
- msg_print("You suddenly have company.");
- (void)set_slow(p_ptr->slow + randint(25) + 15);
- }
- break;
- }
-
- /* Trap of Sinking */
- case TRAP_OF_SINKING:
- {
- msg_print("You fell through a trap door!");
-
- if (p_ptr->ffall)
- {
- if (dungeon_flags & DF_TOWER)
- {
- msg_print("You float gently down to the previous level.");
- }
- else
- {
- msg_print("You float gently down to the next level.");
- }
- }
- else
- {
- take_hit(damroll(2, 8), "a trap door");
- }
-
- /* Still alive and autosave enabled */
- if (p_ptr->chp >= 0)
- {
- autosave_checkpoint();
- }
-
- if (dungeon_flags & DF_TOWER) dun_level--;
- else dun_level++;
-
- /* Leaving */
- p_ptr->leaving = TRUE;
- break;
- }
-
- /* Trap of Mana Drain */
- case TRAP_OF_MANA_DRAIN:
- {
- if (p_ptr->csp > 0)
- {
- p_ptr->csp = 0;
- p_ptr->csp_frac = 0;
- p_ptr->redraw |= (PR_FRAME);
- msg_print("You sense a great loss.");
- ident = TRUE;
- }
- else if (p_ptr->msp == 0)
- {
- /* no sense saying this unless you never have mana */
- msg_format("Suddenly you feel glad you're a mere %s",
- spp_ptr->title);
- }
- else
- {
- msg_print("Your head feels dizzy for a moment.");
- }
- break;
- }
- /* Trap of Missing Money */
- case TRAP_OF_MISSING_MONEY:
- {
- s32b gold = (p_ptr->au / 10) + randint(25);
-
- if (gold < 2) gold = 2;
- if (gold > 5000) gold = (p_ptr->au / 20) + randint(3000);
- if (gold > p_ptr->au) gold = p_ptr->au;
-
- p_ptr->au -= gold;
- if (gold <= 0)
- {
- msg_print("You feel something touching you.");
- }
- else if (p_ptr->au)
- {
- msg_print("Your purse feels lighter.");
- msg_format("%ld coins were stolen!", (long)gold);
- ident = TRUE;
- }
- else
- {
- msg_print("Your purse feels empty.");
- msg_print("All of your coins were stolen!");
- ident = TRUE;
- }
- p_ptr->redraw |= (PR_FRAME);
- break;
- }
-
- /* Trap of No Return */
- case TRAP_OF_NO_RETURN:
- {
- object_type *j_ptr;
- s16b j;
-
- for (j = 0; j < INVEN_WIELD; j++)
- {
- if (!p_ptr->inventory[j].k_idx) continue;
-
- j_ptr = &p_ptr->inventory[j];
-
- if ((j_ptr->tval == TV_SCROLL) &&
- (j_ptr->sval == SV_SCROLL_WORD_OF_RECALL))
- {
- inc_stack_size_ex(j, -j_ptr->number, OPTIMIZE, NO_DESCRIBE);
-
- combine_pack();
- reorder_pack();
-
- if (!ident)
- {
- msg_print("A small fire works its way through your backpack. "
- "Some scrolls are burnt.");
- }
- else
- {
- msg_print("The fire hasn't finished.");
- }
- ident = TRUE;
- }
- else if ((j_ptr->tval == TV_ROD_MAIN) &&
- (j_ptr->pval == SV_ROD_RECALL))
- {
- j_ptr->timeout = 0; /* a long time */
- if (!ident) msg_print("You feel the air stabilise around you.");
- ident = TRUE;
- }
- }
- if ((!ident) && (p_ptr->word_recall))
- {
- msg_print("You feel like staying around.");
- p_ptr->word_recall = 0;
- ident = TRUE;
- }
- break;
- }
-
- /* Trap of Silent Switching */
- case TRAP_OF_SILENT_SWITCHING:
- {
- s16b i, j, slot1, slot2;
- object_type *j_ptr, *k_ptr;
-
- for (i = INVEN_WIELD; i < INVEN_TOTAL; i++)
- {
- j_ptr = &p_ptr->inventory[i];
-
- if (!j_ptr->k_idx) continue;
-
- /* Do not allow this trap to touch the One Ring */
- auto const j_flags = object_flags(j_ptr);
- if(j_flags & TR_PERMA_CURSE) continue;
-
- slot1 = wield_slot(j_ptr);
-
- for (j = 0; j < INVEN_WIELD; j++)
- {
- k_ptr = &p_ptr->inventory[j];
-
- if (!k_ptr->k_idx) continue;
-
- /* Do not allow this trap to touch the One Ring */
- auto const k_flags = object_flags(k_ptr);
- if(k_flags & TR_PERMA_CURSE) continue;
-
- /* this is a crude hack, but it prevent wielding 6 torches... */
- if (k_ptr->number > 1) continue;
-
- slot2 = wield_slot(k_ptr);
-
- /* a chance of 4 in 5 of switching something, then 2 in 5 to do it again */
- if ((slot1 == slot2) &&
- (rand_int(100) < (80 - (ident * 40))))
- {
- object_type tmp_obj;
-
- if (p_ptr->inventory[j].name1)
- wield_set(p_ptr->inventory[j].name1, a_info[p_ptr->inventory[j].name1].set, FALSE);
- if (p_ptr->inventory[i].name1)
- takeoff_set(p_ptr->inventory[i].name1, a_info[p_ptr->inventory[i].name1].set);
-
- tmp_obj = p_ptr->inventory[j];
- p_ptr->inventory[j] = p_ptr->inventory[i];
- p_ptr->inventory[i] = tmp_obj;
- ident = TRUE;
- }
- }
- }
-
- if (ident)
- {
- p_ptr->update |= (PU_BONUS);
- p_ptr->update |= (PU_TORCH);
- p_ptr->update |= (PU_MANA);
- msg_print("You somehow feel like another person.");
- }
- else
- {
- msg_print("You feel a lack of useful items.");
- }
- break;
- }
-
- /* Trap of Walls */
- case TRAP_OF_WALLS:
- {
- ident = player_handle_trap_of_walls();
- break;
- }
-
- /* Trap of Calling Out */
- case TRAP_OF_CALLING_OUT:
- {
- ident = do_player_trap_call_out();
-
- if (!ident)
- {
- /* Increase "afraid" */
- if (p_ptr->resist_fear)
- {
- msg_print("You feel as if you had a nightmare!");
- }
- else if (rand_int(100) < p_ptr->skill_sav)
- {
- msg_print("You remember having a nightmare!");
- }
- else
- {
- if (set_afraid(p_ptr->afraid + 3 + randint(40)))
- {
- msg_print("You have a vision of a powerful enemy.");
- }
- }
- }
- break;
- }
-
- /* Trap of Sliding */
- case TRAP_OF_SLIDING:
- break;
-
- /* Trap of Charges Drain */
- case TRAP_OF_CHARGES_DRAIN:
- {
- /* Find an item */
- for (k = 0; k < 10; k++)
- {
- s16b i = rand_int(INVEN_PACK);
-
- object_type *j_ptr = &p_ptr->inventory[i];
-
- /* Drain charged wands/staffs
- Hack -- don't let artifacts get drained */
- if (((j_ptr->tval == TV_STAFF) ||
- (j_ptr->tval == TV_WAND)) &&
- (j_ptr->pval) &&
- !artifact_p(j_ptr))
- {
- ident = TRUE;
- j_ptr->pval = j_ptr->pval / (randint(4) + 1);
-
- /* 60% chance of only 1 */
- if (randint(10) > 3) break;
- }
- }
-
- if (ident)
- {
- /* Window stuff */
- p_ptr->window |= PW_INVEN;
- /* Combine / Reorder the pack */
- p_ptr->notice |= (PN_COMBINE | PN_REORDER);
-
- msg_print("Your backpack seems to be turned upside down.");
- }
- else
- {
- msg_print("You hear a wail of great disappointment.");
- }
- break;
- }
-
- /* Trap of Stair Movement */
- case TRAP_OF_STAIR_MOVEMENT:
- {
- s16b cx, cy, i, j;
- s16b cnt = 0;
- s16b cnt_seen = 0;
- s16b tmps, tmpx;
- s16b tmpspecial, tmpspecial2;
- u32b tmpf;
- bool_ seen = FALSE;
- s16b index_x[20], index_y[20]; /* 20 stairs per level is enough? */
- cave_type *cv_ptr;
-
- if (max_dlv[dungeon_type] == 99)
- {
- /* no sense in relocating that stair! */
- msg_print("You have a feeling that this trap could be dangerous.");
- break;
- }
-
- for (cx = 0; cx < cur_wid; cx++)
- for (cy = 0; cy < cur_hgt; cy++)
- {
- cv_ptr = &cave[cy][cx];
-
- if ((cv_ptr->feat != FEAT_LESS) &&
- (cv_ptr->feat != FEAT_MORE) &&
- (cv_ptr->feat != FEAT_SHAFT_UP) &&
- (cv_ptr->feat != FEAT_SHAFT_DOWN)) continue;
-
- index_x[cnt] = cx;
- index_y[cnt] = cy;
- cnt++;
- }
-
- if (cnt == 0)
- {
- if (wizard) msg_print("Executing moving stairs trap on level with no stairs!");
- break;
- }
-
- for (i = 0; i < cnt; i++)
- {
- seen = FALSE;
-
- for (j = 0; j < 10; j++) /* try 10 times to relocate */
- {
- cave_type *cv_ptr = &cave[index_y[i]][index_x[i]];
- cave_type *cv_ptr2;
-
- cx = rand_int(cur_wid);
- cy = rand_int(cur_hgt);
-
- if ((cx == index_x[i]) || (cy == index_y[i])) continue;
-
- cv_ptr2 = &cave[cy][cx];
-
- if (!cave_valid_bold(cy, cx) || (!cv_ptr2->o_idxs.empty())) continue;
-
- /* don't put anything in vaults */
- if (cv_ptr2->info & CAVE_ICKY) continue;
-
- tmpx = cv_ptr2->mimic;
- tmps = cv_ptr2->info;
- tmpf = cv_ptr2->feat;
- tmpspecial = cv_ptr2->special;
- tmpspecial2 = cv_ptr2->special2;
- cave[cy][cx].mimic = cv_ptr->mimic;
- cave[cy][cx].info = cv_ptr->info;
- cave[cy][cx].special = cv_ptr->special;
- cave[cy][cx].special2 = cv_ptr->special2;
- cave_set_feat(cy, cx, cv_ptr->feat);
- cv_ptr->mimic = tmpx;
- cv_ptr->info = tmps;
- cv_ptr->special = tmpspecial;
- cv_ptr->special2 = tmpspecial2;
- cave_set_feat(index_y[i], index_x[i], tmpf);
-
- /* if we are placing walls in rooms, make them rubble instead */
- if ((cv_ptr->info & CAVE_ROOM) &&
- (cv_ptr->feat >= FEAT_WALL_EXTRA) &&
- (cv_ptr->feat <= FEAT_PERM_SOLID))
- {
- cave_set_feat(index_y[i], index_x[i], FEAT_RUBBLE);
- }
-
- if (player_has_los_bold(cy, cx))
- {
- note_spot(cy, cx);
- lite_spot(cy, cx);
- seen = TRUE;
- }
- else
- {
- cv_ptr2->info &= ~CAVE_MARK;
- }
-
- if (player_has_los_bold(index_y[i], index_x[i]))
- {
- note_spot(index_y[i], index_x[i]);
- lite_spot(index_y[i], index_x[i]);
- seen = TRUE;
- }
- else
- {
- cv_ptr->info &= ~CAVE_MARK;
- }
- break;
- }
-
- if (seen) cnt_seen++;
- }
-
- ident = (cnt_seen > 0);
-
- if ((ident) && (cnt_seen > 1))
- {
- msg_print("You see some stairs move.");
- }
- else if (ident)
- {
- msg_print("You see a stair move.");
- }
- else
- {
- msg_print("You hear distant scraping noises.");
- }
- p_ptr->redraw |= PR_MAP;
- break;
- }
-
- /* Trap of New Trap */
- case TRAP_OF_NEW:
- {
- /* if we're on a floor or on a door, place a new trap */
- if ((item == -1) || (item == -2))
- {
- place_trap(y, x);
- if (player_has_los_bold(y, x))
- {
- note_spot(y, x);
- lite_spot(y, x);
- }
- }
- else
- {
- /* re-trap the chest */
- place_trap(y, x);
- }
- msg_print("You hear a noise, and then its echo.");
- ident = FALSE;
- break;
- }
-
- /* Trap of Acquirement */
- case TRAP_OF_ACQUIREMENT:
- {
- /* Get a nice thing */
- msg_print("You notice something falling off the trap.");
- acquirement(y, x, 1, TRUE, FALSE);
-
- /* If we're on a floor or on a door, place a new trap */
- if ((item == -1) || (item == -2))
- {
- place_trap(y, x);
- if (player_has_los_bold(y, x))
- {
- note_spot(y, x);
- lite_spot(y, x);
- }
- }
- else
- {
- /* Re-trap the chest */
- place_trap(y, x);
- }
- msg_print("You hear a noise, and then its echo.");
-
- /* Never known */
- ident = FALSE;
- }
- break;
-
- /* Trap of Scatter Items */
- case TRAP_OF_SCATTER_ITEMS:
- {
- s16b i, j;
- bool_ message = FALSE;
-
- for (i = 0; i < INVEN_PACK; i++)
- {
-
- if (!p_ptr->inventory[i].k_idx) continue;
-
- if (rand_int(10) < 3) continue;
-
- for (j = 0; j < 10; j++)
- {
- object_type tmp_obj, *j_ptr = &tmp_obj;
- s16b cx = x + 15 - rand_int(30);
- s16b cy = y + 15 - rand_int(30);
-
- if (!in_bounds(cy, cx)) continue;
-
- if (!cave_floor_bold(cy, cx)) continue;
-
- object_copy(j_ptr, &p_ptr->inventory[i]);
-
- inc_stack_size_ex(i, -999, OPTIMIZE, NO_DESCRIBE);
-
- p_ptr->notice |= (PN_COMBINE | PN_REORDER);
-
- (void)floor_carry(cy, cx, j_ptr);
-
- if (!message)
- {
- msg_print("You feel light-footed.");
- message = TRUE;
- }
-
- if (player_has_los_bold(cy, cx))
- {
- char i_name[80];
-
- object_desc(i_name, &tmp_obj, TRUE, 3);
- note_spot(cy, cx);
- lite_spot(cy, cx);
- ident = TRUE;
- msg_format("Suddenly %s appear%s!", i_name,
- (j_ptr->number > 1) ? "" : "s");
- }
- break;
- }
- }
- ident = message;
- break;
- }
-
- /* Trap of Decay */
- case TRAP_OF_DECAY:
- break;
-
- /* Trap of Wasting Wands */
- case TRAP_OF_WASTING_WANDS:
- {
- s16b i;
- object_type *j_ptr;
-
- for (i = 0; i < INVEN_PACK; i++)
- {
- if (!p_ptr->inventory[i].k_idx) continue;
-
- j_ptr = &p_ptr->inventory[i];
-
- if ((j_ptr->tval == TV_WAND) && (rand_int(5) == 1))
- {
- if (object_known_p(j_ptr)) ident = TRUE;
-
- /* Create a Wand of Nothing */
- object_prep(j_ptr, lookup_kind(TV_WAND, SV_WAND_NOTHING));
- apply_magic(j_ptr, 0, FALSE, FALSE, FALSE, boost::make_optional(0));
- j_ptr->ident &= ~IDENT_KNOWN;
- p_ptr->notice |= (PN_COMBINE | PN_REORDER);
- }
- else if ((j_ptr->tval == TV_STAFF) && (rand_int(5) == 1))
- {
- if (object_known_p(j_ptr)) ident = TRUE;
-
- /* Create a Staff of Nothing */
- object_prep(j_ptr, lookup_kind(TV_STAFF, SV_STAFF_NOTHING));
- apply_magic(j_ptr, 0, FALSE, FALSE, FALSE, boost::make_optional(0));
- j_ptr->ident &= ~IDENT_KNOWN;
- p_ptr->notice |= (PN_COMBINE | PN_REORDER);
- }
- }
- if (ident)
- {
- msg_print("You have lost trust in your backpack!");
- }
- else
- {
- msg_print("You hear an echoing cry of rage.");
- }
- break;
- }
-
- /* Trap of Filling */
- case TRAP_OF_FILLING:
- {
- s16b nx, ny;
-
- for (nx = x - 8; nx <= x + 8; nx++)
- for (ny = y - 8; ny <= y + 8; ny++)
- {
- if (!in_bounds (ny, nx)) continue;
-
- if (rand_int(distance(ny, nx, y, x)) > 3)
- {
- place_trap(ny, nx);
- }
- }
-
- msg_print("The floor vibrates in a strange way.");
- ident = FALSE;
- break;
- }
-
- case TRAP_OF_DRAIN_SPEED:
- {
- s16b j, chance = 75;
-
- for (j = 0; j < INVEN_TOTAL; j++)
- {
- /* don't bother the overflow slot */
- if (j == INVEN_PACK) continue;
-
- if (!p_ptr->inventory[j].k_idx) continue;
-
- auto j_ptr = &p_ptr->inventory[j];
- auto const flags = object_flags(j_ptr);
-
- /* is it a non-artifact speed item? */
- if ((!j_ptr->name1) && (flags & TR_SPEED))
- {
- if (randint(100) < chance)
- {
- j_ptr->pval = j_ptr->pval / 2;
- if (j_ptr->pval == 0)
- {
- j_ptr->pval--;
- }
- chance /= 2;
- ident = TRUE;
- }
- inven_item_optimize(j);
- }
- }
- if (!ident)
- {
- msg_print("You feel some things in your pack vibrating.");
- }
- else
- {
- combine_pack();
- reorder_pack();
- msg_print("You suddenly feel you have time for self-reflection.");
-
- /* Recalculate bonuses */
- p_ptr->update |= (PU_BONUS);
-
- /* Recalculate mana */
- p_ptr->update |= (PU_MANA);
-
- /* Window stuff */
- p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_PLAYER);
- }
- break;
- }
-
- /*
- * single missile traps
- */
- case TRAP_OF_ARROW_I:
- ident = player_handle_missile_trap(1, TV_ARROW, SV_AMMO_NORMAL, 4, 8, 0, "Arrow Trap");
- break;
- case TRAP_OF_ARROW_II:
- ident = player_handle_missile_trap(1, TV_BOLT, SV_AMMO_NORMAL, 5, 8, 0, "Bolt Trap");
- break;
- case TRAP_OF_ARROW_III:
- ident = player_handle_missile_trap(1, TV_ARROW, SV_AMMO_HEAVY, 6, 8, 0, "Seeker Arrow Trap");
- break;
- case TRAP_OF_ARROW_IV:
- ident = player_handle_missile_trap(1, TV_BOLT, SV_AMMO_HEAVY, 8, 10, 0, "Seeker Bolt Trap");
- break;
- case TRAP_OF_POISON_ARROW_I:
- ident = player_handle_missile_trap(1, TV_ARROW, SV_AMMO_NORMAL, 4, 8, 10 + randint(20), "Poison Arrow Trap");
- break;
- case TRAP_OF_POISON_ARROW_II:
- ident = player_handle_missile_trap(1, TV_BOLT, SV_AMMO_NORMAL, 5, 8, 15 + randint(30), "Poison Bolt Trap");
- break;
- case TRAP_OF_POISON_ARROW_III:
- ident = player_handle_missile_trap(1, TV_ARROW, SV_AMMO_HEAVY, 6, 8, 30 + randint(50), "Poison Seeker Arrow Trap");
- break;
- case TRAP_OF_POISON_ARROW_IV:
- ident = player_handle_missile_trap(1, TV_BOLT, SV_AMMO_HEAVY, 8, 10, 40 + randint(70), "Poison Seeker Bolt Trap");
- break;
- case TRAP_OF_DAGGER_I:
- ident = player_handle_missile_trap(1, TV_SWORD, SV_BROKEN_DAGGER, 2, 8, 0, "Dagger Trap");
- break;
- case TRAP_OF_DAGGER_II:
- ident = player_handle_missile_trap(1, TV_SWORD, SV_DAGGER, 3, 8, 0, "Dagger Trap");
- break;
- case TRAP_OF_POISON_DAGGER_I:
- ident = player_handle_missile_trap(1, TV_SWORD, SV_BROKEN_DAGGER, 2, 8, 15 + randint(20), "Poison Dagger Trap");
- break;
- case TRAP_OF_POISON_DAGGER_II:
- ident = player_handle_missile_trap(1, TV_SWORD, SV_DAGGER, 3, 8, 20 + randint(30), "Poison Dagger Trap");
- break;
-
- /*
- * multiple missile traps
- * numbers range from 2 (level 0 to 14) to 10 (level 120 and up)
- */
- case TRAP_OF_ARROWS_I:
- ident = player_handle_missile_trap(2 + (max_dlv[dungeon_type] / 15), TV_ARROW, SV_AMMO_NORMAL, 4, 8, 0, "Arrow Trap");
- break;
- case TRAP_OF_ARROWS_II:
- ident = player_handle_missile_trap(2 + (max_dlv[dungeon_type] / 15), TV_BOLT, SV_AMMO_NORMAL, 5, 8, 0, "Bolt Trap");
- break;
- case TRAP_OF_ARROWS_III:
- ident = player_handle_missile_trap(2 + (max_dlv[dungeon_type] / 15), TV_ARROW, SV_AMMO_HEAVY, 6, 8, 0, "Seeker Arrow Trap");
- break;
- case TRAP_OF_ARROWS_IV:
- ident = player_handle_missile_trap(2 + (max_dlv[dungeon_type] / 15), TV_BOLT, SV_AMMO_HEAVY, 8, 10, 0, "Seeker Bolt Trap");
- break;
- case TRAP_OF_POISON_ARROWS_I:
- ident = player_handle_missile_trap(2 + (max_dlv[dungeon_type] / 15), TV_ARROW, SV_AMMO_NORMAL, 4, 8, 10 + randint(20), "Poison Arrow Trap");
- break;
- case TRAP_OF_POISON_ARROWS_II:
- ident = player_handle_missile_trap(2 + (max_dlv[dungeon_type] / 15), TV_BOLT, SV_AMMO_NORMAL, 5, 8, 15 + randint(30), "Poison Bolt Trap");
- break;
- case TRAP_OF_POISON_ARROWS_III:
- ident = player_handle_missile_trap(2 + (max_dlv[dungeon_type] / 15), TV_ARROW, SV_AMMO_HEAVY, 6, 8, 30 + randint(50), "Poison Seeker Arrow Trap");
- break;
- case TRAP_OF_POISON_ARROWS_IV:
- ident = player_handle_missile_trap(2 + (max_dlv[dungeon_type] / 15), TV_BOLT, SV_AMMO_HEAVY, 8, 10, 40 + randint(70), "Poison Seeker Bolt Trap");
- break;
- case TRAP_OF_DAGGERS_I:
- ident = player_handle_missile_trap(2 + (max_dlv[dungeon_type] / 15), TV_SWORD, SV_BROKEN_DAGGER, 2, 8, 0, "Dagger Trap");
- break;
- case TRAP_OF_DAGGERS_II:
- ident = player_handle_missile_trap(2 + (max_dlv[dungeon_type] / 15), TV_SWORD, SV_DAGGER, 3, 8, 0, "Dagger Trap");
- break;
- case TRAP_OF_POISON_DAGGERS_I:
- ident = player_handle_missile_trap(2 + (max_dlv[dungeon_type] / 15), TV_SWORD, SV_BROKEN_DAGGER, 2, 8, 15 + randint(20), "Poison Dagger Trap");
- break;
- case TRAP_OF_POISON_DAGGERS_II:
- ident = player_handle_missile_trap(2 + (max_dlv[dungeon_type] / 15), TV_SWORD, SV_DAGGER, 3, 8, 20 + randint(30), "Poison Dagger Trap");
- break;
-
- case TRAP_OF_DROP_ITEMS:
- {
- s16b i;
- bool_ message = FALSE;
-
- for (i = 0; i < INVEN_PACK; i++)
- {
- object_type tmp_obj;
-
- if (!p_ptr->inventory[i].k_idx) continue;
- if (randint(100) < 80) continue;
- if (p_ptr->inventory[i].name1 == ART_POWER) continue;
-
- tmp_obj = p_ptr->inventory[i];
-
- /* drop carefully */
- drop_near(&tmp_obj, 0, y, x);
-
- inc_stack_size_ex(i, -999, OPTIMIZE, NO_DESCRIBE);
-
- p_ptr->notice |= (PN_COMBINE | PN_REORDER);
-
- if (!message)
- {
- msg_print("You are startled by a sudden sound.");
- message = TRUE;
- }
- ident = TRUE;
- }
- if (!ident)
- {
- msg_print("You hear a sudden, strange sound.");
- }
- break;
- }
-
- case TRAP_OF_DROP_ALL_ITEMS:
- {
- s16b i;
- bool_ message = FALSE;
-
- for (i = 0; i < INVEN_PACK; i++)
- {
- object_type tmp_obj;
-
- if (!p_ptr->inventory[i].k_idx) continue;
- if (randint(100) < 10) continue;
- if (p_ptr->inventory[i].name1 == ART_POWER) continue;
-
- tmp_obj = p_ptr->inventory[i];
-
- /* drop carefully */
- drop_near(&tmp_obj, 0, y, x);
-
- inc_stack_size_ex(i, -999, OPTIMIZE, NO_DESCRIBE);
-
- p_ptr->notice |= (PN_COMBINE | PN_REORDER);
-
- if (!message)
- {
- msg_print("You are greatly startled by a sudden sound.");
- message = TRUE;
- }
- ident = TRUE;
- }
- if (!ident)
- {
- msg_print("You hear a sudden, strange sound.");
- }
- break;
- }
-
- case TRAP_OF_DROP_EVERYTHING:
- {
- s16b i;
- bool_ message = FALSE;
-
- for (i = 0; i < INVEN_TOTAL; i++)
- {
- object_type tmp_obj;
- if (!p_ptr->inventory[i].k_idx) continue;
- if (randint(100) < 30) continue;
- if (p_ptr->inventory[i].name1 == ART_POWER) continue;
-
- tmp_obj = p_ptr->inventory[i];
- /* drop carefully */
-
- drop_near(&tmp_obj, 0, y, x);
-
- inc_stack_size_ex(i, -999, OPTIMIZE, NO_DESCRIBE);
-
- p_ptr->notice |= (PN_COMBINE | PN_REORDER);
-
- if (!message)
- {
- msg_print("You are completely startled by a sudden sound.");
- message = TRUE;
- }
- ident = TRUE;
- }
- if (!ident)
- {
- msg_print("You hear a sudden, strange sound.");
- }
- break;
- }
-
- /* Bolt Trap */
- case TRAP_G_ELEC_BOLT:
- ident = player_handle_breath_trap(1, GF_ELEC, TRAP_G_ELEC_BOLT);
- break;
- case TRAP_G_POIS_BOLT:
- ident = player_handle_breath_trap(1, GF_POIS, TRAP_G_POIS_BOLT);
- break;
- case TRAP_G_ACID_BOLT:
- ident = player_handle_breath_trap(1, GF_ACID, TRAP_G_ACID_BOLT);
- break;
- case TRAP_G_COLD_BOLT:
- ident = player_handle_breath_trap(1, GF_COLD, TRAP_G_COLD_BOLT);
- break;
- case TRAP_G_FIRE_BOLT:
- ident = player_handle_breath_trap(1, GF_FIRE, TRAP_G_FIRE_BOLT);
- break;
- case TRAP_OF_ELEC_BOLT:
- ident = player_handle_breath_trap(1, GF_ELEC, TRAP_OF_ELEC_BOLT);
- break;
- case TRAP_OF_POIS_BOLT:
- ident = player_handle_breath_trap(1, GF_POIS, TRAP_OF_POIS_BOLT);
- break;
- case TRAP_OF_ACID_BOLT:
- ident = player_handle_breath_trap(1, GF_ACID, TRAP_OF_ACID_BOLT);
- break;
- case TRAP_OF_COLD_BOLT:
- ident = player_handle_breath_trap(1, GF_COLD, TRAP_OF_COLD_BOLT);
- break;
- case TRAP_OF_FIRE_BOLT:
- ident = player_handle_breath_trap(1, GF_FIRE, TRAP_OF_FIRE_BOLT);
- break;
- case TRAP_OF_PLASMA_BOLT:
- ident = player_handle_breath_trap(1, GF_PLASMA, TRAP_OF_PLASMA_BOLT);
- break;
- case TRAP_OF_WATER_BOLT:
- ident = player_handle_breath_trap(1, GF_WATER, TRAP_OF_WATER_BOLT);
- break;
- case TRAP_OF_LITE_BOLT:
- ident = player_handle_breath_trap(1, GF_LITE, TRAP_OF_LITE_BOLT);
- break;
- case TRAP_OF_DARK_BOLT:
- ident = player_handle_breath_trap(1, GF_DARK, TRAP_OF_DARK_BOLT);
- break;
- case TRAP_OF_SHARDS_BOLT:
- ident = player_handle_breath_trap(1, GF_SHARDS, TRAP_OF_SHARDS_BOLT);
- break;
- case TRAP_OF_SOUND_BOLT:
- ident = player_handle_breath_trap(1, GF_SOUND, TRAP_OF_SOUND_BOLT);
- break;
- case TRAP_OF_CONFUSION_BOLT:
- ident = player_handle_breath_trap(1, GF_CONFUSION, TRAP_OF_CONFUSION_BOLT);
- break;
- case TRAP_OF_FORCE_BOLT:
- ident = player_handle_breath_trap(1, GF_FORCE, TRAP_OF_FORCE_BOLT);
- break;
- case TRAP_OF_INERTIA_BOLT:
- ident = player_handle_breath_trap(1, GF_INERTIA, TRAP_OF_INERTIA_BOLT);
- break;
- case TRAP_OF_MANA_BOLT:
- ident = player_handle_breath_trap(1, GF_MANA, TRAP_OF_MANA_BOLT);
- break;
- case TRAP_OF_ICE_BOLT:
- ident = player_handle_breath_trap(1, GF_ICE, TRAP_OF_ICE_BOLT);
- break;
- case TRAP_OF_CHAOS_BOLT:
- ident = player_handle_breath_trap(1, GF_CHAOS, TRAP_OF_CHAOS_BOLT);
- break;
- case TRAP_OF_NETHER_BOLT:
- ident = player_handle_breath_trap(1, GF_NETHER, TRAP_OF_NETHER_BOLT);
- break;
- case TRAP_OF_DISENCHANT_BOLT:
- ident = player_handle_breath_trap(1, GF_DISENCHANT, TRAP_OF_DISENCHANT_BOLT);
- break;
- case TRAP_OF_NEXUS_BOLT:
- ident = player_handle_breath_trap(1, GF_NEXUS, TRAP_OF_NEXUS_BOLT);
- break;
- case TRAP_OF_TIME_BOLT:
- ident = player_handle_breath_trap(1, GF_TIME, TRAP_OF_TIME_BOLT);
- break;
- case TRAP_OF_GRAVITY_BOLT:
- ident = player_handle_breath_trap(1, GF_GRAVITY, TRAP_OF_GRAVITY_BOLT);
- break;
-
- /* Ball Trap */
- case TRAP_OF_ELEC_BALL:
- ident = player_handle_breath_trap(3, GF_ELEC, TRAP_OF_ELEC_BALL);
- break;
- case TRAP_OF_POIS_BALL:
- ident = player_handle_breath_trap(3, GF_POIS, TRAP_OF_POIS_BALL);
- break;
- case TRAP_OF_ACID_BALL:
- ident = player_handle_breath_trap(3, GF_ACID, TRAP_OF_ACID_BALL);
- break;
- case TRAP_OF_COLD_BALL:
- ident = player_handle_breath_trap(3, GF_COLD, TRAP_OF_COLD_BALL);
- break;
- case TRAP_OF_FIRE_BALL:
- ident = player_handle_breath_trap(3, GF_FIRE, TRAP_OF_FIRE_BALL);
- break;
- case TRAP_OF_PLASMA_BALL:
- ident = player_handle_breath_trap(3, GF_PLASMA, TRAP_OF_PLASMA_BALL);
- break;
- case TRAP_OF_WATER_BALL:
- ident = player_handle_breath_trap(3, GF_WATER, TRAP_OF_WATER_BALL);
- break;
- case TRAP_OF_LITE_BALL:
- ident = player_handle_breath_trap(3, GF_LITE, TRAP_OF_LITE_BALL);
- break;
- case TRAP_OF_DARK_BALL:
- ident = player_handle_breath_trap(3, GF_DARK, TRAP_OF_DARK_BALL);
- break;
- case TRAP_OF_SHARDS_BALL:
- ident = player_handle_breath_trap(3, GF_SHARDS, TRAP_OF_SHARDS_BALL);
- break;
- case TRAP_OF_SOUND_BALL:
- ident = player_handle_breath_trap(3, GF_SOUND, TRAP_OF_SOUND_BALL);
- break;
- case TRAP_OF_CONFUSION_BALL:
- ident = player_handle_breath_trap(3, GF_CONFUSION, TRAP_OF_CONFUSION_BALL);
- break;
- case TRAP_OF_FORCE_BALL:
- ident = player_handle_breath_trap(3, GF_FORCE, TRAP_OF_FORCE_BALL);
- break;
- case TRAP_OF_INERTIA_BALL:
- ident = player_handle_breath_trap(3, GF_INERTIA, TRAP_OF_INERTIA_BALL);
- break;
- case TRAP_OF_MANA_BALL:
- ident = player_handle_breath_trap(3, GF_MANA, TRAP_OF_MANA_BALL);
- break;
- case TRAP_OF_ICE_BALL:
- ident = player_handle_breath_trap(3, GF_ICE, TRAP_OF_ICE_BALL);
- break;
- case TRAP_OF_CHAOS_BALL:
- ident = player_handle_breath_trap(3, GF_CHAOS, TRAP_OF_CHAOS_BALL);
- break;
- case TRAP_OF_NETHER_BALL:
- ident = player_handle_breath_trap(3, GF_NETHER, TRAP_OF_NETHER_BALL);
- break;
- case TRAP_OF_DISENCHANT_BALL:
- ident = player_handle_breath_trap(3, GF_DISENCHANT, TRAP_OF_DISENCHANT_BALL);
- break;
- case TRAP_OF_NEXUS_BALL:
- ident = player_handle_breath_trap(3, GF_NEXUS, TRAP_OF_NEXUS_BALL);
- break;
- case TRAP_OF_TIME_BALL:
- ident = player_handle_breath_trap(3, GF_TIME, TRAP_OF_TIME_BALL);
- break;
- case TRAP_OF_GRAVITY_BALL:
- ident = player_handle_breath_trap(3, GF_GRAVITY, TRAP_OF_GRAVITY_BALL);
- break;
-
- /* Trap of Divine Anger */
- case TRAP_OF_DIVINE_ANGER:
- {
- if (p_ptr->pgod == 0)
- {
- msg_format("Suddenly you feel glad you're a mere %s", spp_ptr->title);
- }
- else
- {
- cptr name;
-
- name = deity_info[p_ptr->pgod].name;
- msg_format("You feel you have angered %s.", name);
- inc_piety(p_ptr->pgod, -3000);
- }
- break;
- }
-
- /* Trap of Divine Wrath */
- case TRAP_OF_DIVINE_WRATH:
- {
- if (p_ptr->pgod == 0)
- {
- msg_format("Suddenly you feel glad you're a mere %s", spp_ptr->title);
- }
- else
- {
- cptr name;
-
- name = deity_info[p_ptr->pgod].name;
-
- msg_format("%s quakes in rage: ``Thou art supremely insolent, mortal!!''", name);
- inc_piety(p_ptr->pgod, -500 * p_ptr->lev);
- }
- break;
- }
-
- /* Trap of hallucination */
- case TRAP_OF_HALLUCINATION:
- {
- msg_print("Scintillating colors hypnotise you for a moment.");
-
- set_image(80);
- }
- break;
-
- /* Bolt Trap */
- case TRAP_OF_ROCKET:
- ident = player_handle_breath_trap(1, GF_ROCKET, trap);
- break;
- case TRAP_OF_NUKE_BOLT:
- ident = player_handle_breath_trap(1, GF_NUKE, trap);
- break;
- case TRAP_OF_HOLY_FIRE:
- ident = player_handle_breath_trap(1, GF_HOLY_FIRE, trap);
- break;
- case TRAP_OF_HELL_FIRE:
- ident = player_handle_breath_trap(1, GF_HELL_FIRE, trap);
- break;
- case TRAP_OF_PSI_BOLT:
- ident = player_handle_breath_trap(1, GF_PSI, trap);
- break;
- case TRAP_OF_PSI_DRAIN:
- ident = player_handle_breath_trap(1, GF_PSI_DRAIN, trap);
- break;
-
- /* Ball Trap */
- case TRAP_OF_NUKE_BALL:
- ident = player_handle_breath_trap(3, GF_NUKE, TRAP_OF_NUKE_BALL);
- break;
- case TRAP_OF_PSI_BALL:
- ident = player_handle_breath_trap(3, GF_PSI, TRAP_OF_NUKE_BALL);
- break;
-
- default:
- {
- msg_print(format("Executing unknown trap %d", trap));
- }
- }
- return ident;
-}
-
-void player_activate_door_trap(s16b y, s16b x)
-{
- auto const &f_info = game->edit_data.f_info;
- auto &t_info = game->edit_data.t_info;
-
- cave_type *c_ptr;
- bool_ ident = FALSE;
-
- c_ptr = &cave[y][x];
-
- /* Return if trap or door not found */
- if ((c_ptr->t_idx == 0) ||
- !(f_info[c_ptr->feat].flags & FF_DOOR)) return;
-
- /* Disturb */
- disturb(0);
-
- /* Message */
- msg_print("You found a trap!");
-
- /* Pick a trap */
- pick_trap(y, x);
-
- /* Hit the trap */
- ident = player_activate_trap_type(y, x, NULL, -1);
- if (ident)
- {
- t_info[c_ptr->t_idx].ident = TRUE;
- msg_format("You identified that trap as %s.",
- t_info[c_ptr->t_idx].name);
- }
-}
-
-
-/*
- * Places a random trap at the given location.
- *
- * The location must be a valid, empty, clean, floor grid.
- */
-void place_trap(int y, int x)
-{
- auto const &d_info = game->edit_data.d_info;
- auto const &f_info = game->edit_data.f_info;
- auto const &t_info = game->edit_data.t_info;
-
- int cnt;
- u32b flags;
- cave_type *c_ptr = &cave[y][x];
- auto d_ptr = &d_info[dungeon_type];
-
- /* No traps in town or on first level */
- if (dun_level <= 1) return;
-
- /*
- * Avoid open doors -- because DOOR flag is added to make much more
- * important processing faster
- */
- if (c_ptr->feat == FEAT_OPEN) return;
- if (c_ptr->feat == FEAT_BROKEN) return;
-
- /* Traps only appears on empty floor */
- if (!cave_floor_grid(c_ptr) &&
- !(f_info[c_ptr->feat].flags & FF_DOOR)) return;
-
- /* Set flags */
- if (f_info[c_ptr->feat].flags & FF_DOOR) flags = FTRAP_DOOR;
- else flags = FTRAP_FLOOR;
-
- /* Try 100 times */
- cnt = 100;
- while (cnt--)
- {
- std::size_t trap = rand_int(t_info.size());
- auto t_ptr = &t_info[trap];
-
- /* No traps below their minlevel */
- if (t_ptr->minlevel > dun_level) continue;
-
- /* is this a correct trap now? */
- if (!(t_ptr->flags & flags)) continue;
-
- /*
- * Hack -- No trap door at the bottom of dungeon or in flat
- * (non dungeon) places or on quest levels
- */
- if ((trap == TRAP_OF_SINKING) &&
- ((d_ptr->maxdepth == dun_level) ||
- (dungeon_flags & DF_FLAT) || is_quest(dun_level)) )
- {
- continue;
- }
-
- /* How probable is this trap */
- if (rand_int(100) < t_ptr->probability)
- {
- c_ptr->t_idx = trap;
- break;
- }
- }
-
- return;
-}
-
-
-/*
- * Place a leveled trap at given position
- */
-void place_trap_leveled(int y, int x, int lev)
-{
- int prev_dun_level = dun_level;
- dun_level = lev;
- place_trap(y,x);
- dun_level = prev_dun_level;
-}
-
-/*
- * Places a random trap on the given chest.
- *
- * The object must be a valid chest.
- */
-void place_trap_object(object_type *o_ptr)
-{
- auto const &t_info = game->edit_data.t_info;
-
- int cnt;
-
- /* No traps in town or on first level */
- if (dun_level <= 1)
- {
- /* empty chest were already looted, therefore known */
- o_ptr->ident |= IDENT_KNOWN;
- return;
- }
-
- /* Try 100 times */
- cnt = 100;
- while (cnt--)
- {
- std::size_t trap = rand_int(t_info.size());
- auto t_ptr = &t_info[trap];
-
- /* no traps below their minlevel */
- if (t_ptr->minlevel > dun_level) continue;
-
- /* Is this a correct trap now? */
- if (!(t_ptr->flags & FTRAP_CHEST)) continue;
-
- /* How probable is this trap */
- if (rand_int(100) < t_ptr->probability)
- {
- o_ptr->pval = trap;
- break;
- }
- }
-
- return;
-}
-
-/* Dangerous trap placing function */
-void wiz_place_trap(int y, int x, int idx)
-{
- auto const &f_info = game->edit_data.f_info;
-
- cave_type *c_ptr = &cave[y][x];
-
- /* Dangerous enough as it is... */
- if (!cave_floor_grid(c_ptr) && (!(f_info[c_ptr->feat].flags & FF_DOOR))) return;
-
- c_ptr->t_idx = idx;
-}
-
-/*
- * Here begin monster traps code
- */
-
-/*
- * Hook to determine if an object is a device
- */
-static bool item_tester_hook_device(object_type const *o_ptr)
-{
- return (((o_ptr->tval == TV_ROD_MAIN) && (o_ptr->pval != 0)) ||
- (o_ptr->tval == TV_STAFF) ||
- (o_ptr->tval == TV_WAND));
-}
-
-/*
- * The trap setting code for rogues -MWK-
- *
- * Also, it will fail or give weird results if the tvals are resorted!
- */
-void do_cmd_set_trap(void)
-{
- int item_kit, item_load, i;
- int num;
-
- object_type *o_ptr, *j_ptr, *i_ptr;
-
- cptr q, s, c;
-
- object_type object_type_body;
-
- /* Check some conditions */
- if (p_ptr->blind)
- {
- msg_print("You can't see anything.");
- return;
- }
- if (no_lite())
- {
- msg_print("You don't dare to set a trap in the darkness.");
- return;
- }
- if (p_ptr->confused)
- {
- msg_print("You are too confused!");
- return;
- }
-
- /* Only set traps on clean floor grids */
- if (!cave_clean_bold(p_ptr->py, p_ptr->px))
- {
- msg_print("You cannot set a trap on this.");
- return;
- }
-
- /* Get an item */
- q = "Use which trapping kit? ";
- s = "You have no trapping kits.";
- if (!get_item(&item_kit,
- q, s,
- USE_INVEN,
- object_filter::TVal(TV_TRAPKIT)))
- {
- return;
- }
-
- o_ptr = &p_ptr->inventory[item_kit];
-
- /* Trap kits need a second object */
- object_filter_t object_filter = object_filter::Or(
- object_filter::And(
- object_filter::SVal(SV_TRAPKIT_BOW),
- object_filter::TVal(TV_ARROW)),
- object_filter::And(
- object_filter::SVal(SV_TRAPKIT_XBOW),
- object_filter::TVal(TV_BOLT)),
- object_filter::And(
- object_filter::SVal(SV_TRAPKIT_SLING),
- object_filter::TVal(TV_SHOT)),
- object_filter::And(
- object_filter::SVal(SV_TRAPKIT_POTION),
- object_filter::Or(
- object_filter::TVal(TV_POTION),
- object_filter::TVal(TV_POTION2))),
- object_filter::And(
- object_filter::SVal(SV_TRAPKIT_SCROLL),
- object_filter::TVal(TV_SCROLL)),
- object_filter::And(
- object_filter::SVal(SV_TRAPKIT_DEVICE),
- &item_tester_hook_device));
-
- /* Get the second item */
- q = "Load with what? ";
- s = "You have nothing to load that trap with.";
- if (!get_item(&item_load, q, s, USE_INVEN, object_filter)) return;
-
- /* Get the second object */
- j_ptr = &p_ptr->inventory[item_load];
-
- /* Assume a single object */
- num = 1;
-
- /* In some cases, take multiple objects to load */
- if (o_ptr->sval != SV_TRAPKIT_DEVICE)
- {
- auto const flags = object_flags(o_ptr);
-
- if ((flags & TR_XTRA_SHOTS) && (o_ptr->pval > 0)) num += o_ptr->pval;
-
- if (flags & (TR_AUTOMATIC_5 | TR_AUTOMATIC_99)) num = 99;
-
- if (num > j_ptr->number) num = j_ptr->number;
-
- c = format("How many (1-%d)? ", num);
-
- /* Ask for number of items to use */
- num = get_quantity(c, num);
- }
-
- /* Canceled */
- if (!num) return;
-
- /* Take a turn */
- energy_use = 100;
-
- /* Get local object */
- i_ptr = &object_type_body;
-
- /* Obtain local object for trap content */
- object_copy(i_ptr, j_ptr);
-
- /* Set number */
- i_ptr->number = num;
-
- /* Drop it here */
- cave[p_ptr->py][p_ptr->px].special = floor_carry(p_ptr->py, p_ptr->px, i_ptr);
-
- /* Obtain local object for trap trigger kit */
- object_copy(i_ptr, o_ptr);
-
- /* Set number */
- i_ptr->number = 1;
-
- /* Drop it here */
- cave[p_ptr->py][p_ptr->px].special2 = floor_carry(p_ptr->py, p_ptr->px, i_ptr);
-
- /* Modify, Describe, Optimize */
- inc_stack_size_ex(item_kit, -1, NO_OPTIMIZE, DESCRIBE);
- inc_stack_size_ex(item_load, -num, NO_OPTIMIZE, DESCRIBE);
-
- for (i = 0; i < INVEN_WIELD; i++)
- {
- if (inven_item_optimize(i)) break;
- }
- for (i = 0; i < INVEN_WIELD; i++)
- {
- inven_item_optimize(i);
- }
-
- /* Actually set the trap */
- cave_set_feat(p_ptr->py, p_ptr->px, FEAT_MON_TRAP);
-}
-
-/*
- * Monster hitting a rod trap -MWK-
- *
- * Return TRUE if the monster died
- */
-bool_ mon_hit_trap_aux_rod(int m_idx, object_type *o_ptr)
-{
- int dam = 0, typ = 0;
- int rad = 0;
- monster_type *m_ptr = &m_list[m_idx];
- int y = m_ptr->fy;
- int x = m_ptr->fx;
-
- /* Depend on rod type */
- switch (o_ptr->pval)
- {
- case SV_ROD_DETECT_TRAP:
- m_ptr->smart |= SM_NOTE_TRAP;
- break;
- case SV_ROD_DETECTION:
- m_ptr->smart |= SM_NOTE_TRAP;
- break;
- case SV_ROD_ILLUMINATION:
- typ = GF_LITE_WEAK;
- dam = damroll(2, 15);
- rad = 3;
- lite_room(y, x);
- break;
- case SV_ROD_CURING:
- typ = GF_OLD_HEAL;
- dam = damroll(3, 4); /* and heal conf? */
- break;
- case SV_ROD_HEALING:
- typ = GF_OLD_HEAL;
- dam = 300;
- break;
- case SV_ROD_SPEED:
- typ = GF_OLD_SPEED;
- dam = 50;
- break;
- case SV_ROD_TELEPORT_AWAY:
- typ = GF_AWAY_ALL;
- dam = MAX_SIGHT * 5;
- break;
- case SV_ROD_DISARMING:
- break;
- case SV_ROD_LITE:
- typ = GF_LITE_WEAK;
- dam = damroll(6, 8);
- break;
- case SV_ROD_SLEEP_MONSTER:
- typ = GF_OLD_SLEEP;
- dam = 50;
- break;
- case SV_ROD_SLOW_MONSTER:
- typ = GF_OLD_SLOW;
- dam = 50;
- break;
- case SV_ROD_DRAIN_LIFE:
- typ = GF_OLD_DRAIN;
- dam = 75;
- break;
- case SV_ROD_POLYMORPH:
- typ = GF_OLD_POLY;
- dam = 50;
- break;
- case SV_ROD_ACID_BOLT:
- typ = GF_ACID;
- dam = damroll(6, 8);
- break;
- case SV_ROD_ELEC_BOLT:
- typ = GF_ELEC;
- dam = damroll(3, 8);
- break;
- case SV_ROD_FIRE_BOLT:
- typ = GF_FIRE;
- dam = damroll(8, 8);
- break;
- case SV_ROD_COLD_BOLT:
- typ = GF_COLD;
- dam = damroll(5, 8);
- break;
- case SV_ROD_ACID_BALL:
- typ = GF_ACID;
- dam = 60;
- rad = 2;
- break;
- case SV_ROD_ELEC_BALL:
- typ = GF_ELEC;
- dam = 32;
- rad = 2;
- break;
- case SV_ROD_FIRE_BALL:
- typ = GF_FIRE;
- dam = 72;
- rad = 2;
- break;
- case SV_ROD_COLD_BALL:
- typ = GF_COLD;
- dam = 48;
- rad = 2;
- break;
- default:
- return (FALSE);
- }
-
- /* Actually hit the monster */
- if (typ) (void) project( -2, rad, y, x, dam, typ, PROJECT_KILL | PROJECT_ITEM | PROJECT_JUMP);
- return (cave[y][x].m_idx == 0 ? TRUE : FALSE);
-}
-
-/*
- * Monster hitting a staff trap -MWK-
- *
- * Return TRUE if the monster died
- */
-bool_ mon_hit_trap_aux_staff(int m_idx, object_type *o_ptr)
-{
- return (FALSE);
-}
-
-/*
- * Monster hitting a scroll trap -MWK-
- *
- * Return TRUE if the monster died
- */
-bool_ mon_hit_trap_aux_scroll(int m_idx, int sval)
-{
- auto const &r_info = game->edit_data.r_info;
-
- monster_type *m_ptr = &m_list[m_idx];
- int dam = 0, typ = 0;
- int rad = 0;
- int y = m_ptr->fy;
- int x = m_ptr->fx;
- int k;
-
- /* Depend on scroll type */
- switch (sval)
- {
- case SV_SCROLL_CURSE_ARMOR:
- case SV_SCROLL_CURSE_WEAPON:
- case SV_SCROLL_TRAP_CREATION: /* these don't work :-( */
- case SV_SCROLL_WORD_OF_RECALL: /* should these? */
- case SV_SCROLL_IDENTIFY:
- case SV_SCROLL_STAR_IDENTIFY:
- case SV_SCROLL_MAPPING:
- case SV_SCROLL_DETECT_GOLD:
- case SV_SCROLL_DETECT_ITEM:
- case SV_SCROLL_REMOVE_CURSE:
- case SV_SCROLL_STAR_REMOVE_CURSE:
- case SV_SCROLL_ENCHANT_ARMOR:
- case SV_SCROLL_ENCHANT_WEAPON_TO_HIT:
- case SV_SCROLL_ENCHANT_WEAPON_TO_DAM:
- case SV_SCROLL_STAR_ENCHANT_ARMOR:
- case SV_SCROLL_STAR_ENCHANT_WEAPON:
- case SV_SCROLL_RECHARGING:
- case SV_SCROLL_DETECT_DOOR:
- case SV_SCROLL_DETECT_INVIS:
- case SV_SCROLL_SATISFY_HUNGER:
- case SV_SCROLL_RUNE_OF_PROTECTION:
- case SV_SCROLL_TRAP_DOOR_DESTRUCTION:
- case SV_SCROLL_PROTECTION_FROM_EVIL:
- return (FALSE);
- case SV_SCROLL_DARKNESS:
- unlite_room(y, x);
- typ = GF_DARK_WEAK;
- dam = 10;
- rad = 3;
- break;
- case SV_SCROLL_AGGRAVATE_MONSTER:
- aggravate_monsters(m_idx);
- return (FALSE);
- case SV_SCROLL_SUMMON_MONSTER:
- for (k = 0; k < randint(3) ; k++) summon_specific(y, x, dun_level, 0);
- return (FALSE);
- case SV_SCROLL_SUMMON_UNDEAD:
- for (k = 0; k < randint(3) ; k++) summon_specific(y, x, dun_level, SUMMON_UNDEAD);
- return (FALSE);
- case SV_SCROLL_PHASE_DOOR:
- typ = GF_AWAY_ALL;
- dam = 10;
- break;
- case SV_SCROLL_TELEPORT:
- typ = GF_AWAY_ALL;
- dam = 100;
- break;
- case SV_SCROLL_TELEPORT_LEVEL:
- delete_monster(y, x);
- return (TRUE);
- case SV_SCROLL_LIGHT:
- lite_room(y, x);
- typ = GF_LITE_WEAK;
- dam = damroll(2, 8);
- rad = 2;
- break;
- case SV_SCROLL_DETECT_TRAP:
- m_ptr->smart |= SM_NOTE_TRAP;
- return (FALSE);
- case SV_SCROLL_BLESSING:
- typ = GF_HOLY_FIRE;
- dam = damroll(1, 4);
- break;
- case SV_SCROLL_HOLY_CHANT:
- typ = GF_HOLY_FIRE;
- dam = damroll(2, 4);
- break;
- case SV_SCROLL_HOLY_PRAYER:
- typ = GF_HOLY_FIRE;
- dam = damroll(4, 4);
- break;
- case SV_SCROLL_MONSTER_CONFUSION:
- typ = GF_OLD_CONF;
- dam = damroll(5, 10);
- break;
- case SV_SCROLL_STAR_DESTRUCTION:
- destroy_area(y, x, 15);
- return (FALSE);
- case SV_SCROLL_DISPEL_UNDEAD:
- typ = GF_DISP_UNDEAD;
- rad = 5;
- dam = 60;
- break;
- case SV_SCROLL_GENOCIDE:
- {
- auto r_ptr = &r_info[m_ptr->r_idx];
- genocide_aux(FALSE, r_ptr->d_char);
- /* although there's no point in a multiple genocide trap... */
- return (!(r_ptr->flags & RF_UNIQUE));
- }
- case SV_SCROLL_MASS_GENOCIDE:
- for (k = 0; k < 8; k++)
- delete_monster(y + ddy[k], x + ddx[k]);
- delete_monster(y, x);
- return (TRUE);
- case SV_SCROLL_ACQUIREMENT:
- acquirement(y, x, 1, TRUE, FALSE);
- return (FALSE);
- case SV_SCROLL_STAR_ACQUIREMENT:
- acquirement(y, x, randint(2) + 1, TRUE, FALSE);
- return (FALSE);
- default:
- return (FALSE);
- }
-
- /* Actually hit the monster */
- (void) project( -2, rad, y, x, dam, typ, PROJECT_KILL | PROJECT_ITEM | PROJECT_JUMP);
- return (cave[y][x].m_idx == 0 ? TRUE : FALSE);
-}
-
-/*
- * Monster hitting a wand trap -MWK-
- *
- * Return TRUE if the monster died
- */
-bool_ mon_hit_trap_aux_wand(int m_idx, object_type *o_ptr)
-{
- return (FALSE);
-}
-
-/*
- * Monster hitting a potions trap -MWK-
- *
- * Return TRUE if the monster died
- */
-bool_ mon_hit_trap_aux_potion(int m_idx, object_type *o_ptr)
-{
- auto const &r_info = game->edit_data.r_info;
-
- monster_type *m_ptr = &m_list[m_idx];
- int dam = 0, typ = 0;
- int y = m_ptr->fy;
- int x = m_ptr->fx;
- int sval = o_ptr->sval;
-
- /* Depend on potion type */
- if (o_ptr->tval == TV_POTION)
- {
- switch (sval)
- {
- /* Nothing happens */
- case SV_POTION_WATER:
- case SV_POTION_APPLE_JUICE:
- case SV_POTION_SLIME_MOLD:
- case SV_POTION_SALT_WATER:
- case SV_POTION_DEC_STR:
- case SV_POTION_DEC_INT:
- case SV_POTION_DEC_WIS:
- case SV_POTION_DEC_DEX:
- case SV_POTION_DEC_CON:
- case SV_POTION_DEC_CHR:
- case SV_POTION_INFRAVISION:
- case SV_POTION_DETECT_INVIS:
- case SV_POTION_SLOW_POISON:
- case SV_POTION_CURE_POISON:
- case SV_POTION_RESIST_HEAT:
- case SV_POTION_RESIST_COLD:
- case SV_POTION_RESTORE_MANA:
- case SV_POTION_RESTORE_EXP:
- case SV_POTION_RES_STR:
- case SV_POTION_RES_INT:
- case SV_POTION_RES_WIS:
- case SV_POTION_RES_DEX:
- case SV_POTION_RES_CON:
- case SV_POTION_RES_CHR:
- case SV_POTION_INC_STR:
- case SV_POTION_INC_INT:
- case SV_POTION_INC_WIS:
- case SV_POTION_INC_DEX:
- case SV_POTION_INC_CON:
- case SV_POTION_INC_CHR:
- case SV_POTION_AUGMENTATION:
- case SV_POTION_RUINATION: /* ??? */
- case SV_POTION_ENLIGHTENMENT:
- case SV_POTION_STAR_ENLIGHTENMENT:
- case SV_POTION_SELF_KNOWLEDGE:
- return (FALSE);
-
- case SV_POTION_EXPERIENCE:
- if (m_ptr->level < MONSTER_LEVEL_MAX)
- {
- m_ptr->exp = monster_exp(m_ptr->level + 1);
- monster_check_experience(m_idx, FALSE);
- }
- return (FALSE);
- case SV_POTION_SLOWNESS:
- typ = GF_OLD_SLOW;
- dam = damroll(4, 6);
- break;
- case SV_POTION_POISON:
- typ = GF_POIS;
- dam = damroll(8, 6);
- break;
- case SV_POTION_CONFUSION:
- typ = GF_CONFUSION;
- dam = damroll(4, 6);
- break;
- case SV_POTION_BLINDNESS:
- typ = GF_DARK;
- dam = 10;
- break;
- case SV_POTION_SLEEP:
- typ = GF_OLD_SLEEP;
- dam = damroll (4, 6);
- break;
- case SV_POTION_LOSE_MEMORIES:
- typ = GF_OLD_CONF;
- dam = damroll(10, 10);
- break;
- case SV_POTION_DETONATIONS:
- typ = GF_DISINTEGRATE;
- dam = damroll(20, 20);
- break;
- case SV_POTION_DEATH:
- typ = GF_NETHER;
- dam = damroll(100, 20);
- break;
- case SV_POTION_BOLDNESS:
- m_ptr->monfear = 0;
- return (FALSE);
- case SV_POTION_SPEED:
- typ = GF_OLD_SPEED;
- dam = damroll(5, 10);
- break;
- case SV_POTION_HEROISM:
- case SV_POTION_BESERK_STRENGTH:
- m_ptr->monfear = 0;
- typ = GF_OLD_HEAL;
- dam = damroll(2, 10);
- break;
- case SV_POTION_CURE_LIGHT:
- typ = GF_OLD_HEAL;
- dam = damroll(3, 4);
- break;
- case SV_POTION_CURE_SERIOUS:
- typ = GF_OLD_HEAL;
- dam = damroll(4, 6);
- break;
- case SV_POTION_CURE_CRITICAL:
- typ = GF_OLD_HEAL;
- dam = damroll(6, 8);
- break;
- case SV_POTION_HEALING:
- typ = GF_OLD_HEAL;
- dam = 300;
- break;
- case SV_POTION_STAR_HEALING:
- typ = GF_OLD_HEAL;
- dam = 1000;
- break;
- case SV_POTION_LIFE:
- {
- auto r_ptr = &r_info[m_ptr->r_idx];
- if (r_ptr->flags & RF_UNDEAD)
- {
- typ = GF_HOLY_FIRE;
- dam = damroll(20, 20);
- }
- else
- {
- typ = GF_OLD_HEAL;
- dam = 5000;
- }
- break;
- }
- default:
- return (FALSE);
-
- }
- }
- else
- {}
-
- /* Actually hit the monster */
- (void) project_m( -2, 0, y, x, dam, typ);
- return (cave[y][x].m_idx == 0 ? TRUE : FALSE);
-}
-
-/*
- * Monster hitting a monster trap -MWK-
- * Returns True if the monster died, false otherwise
- */
-bool_ mon_hit_trap(int m_idx)
-{
- auto const &r_info = game->edit_data.r_info;
- auto const &k_info = game->edit_data.k_info;
-
- monster_type *m_ptr = &m_list[m_idx];
- auto r_ptr = &r_info[m_ptr->r_idx];
-
- object_type object_type_body;
-
- int mx = m_ptr->fx;
- int my = m_ptr->fy;
-
- int difficulty;
- int smartness;
-
- char m_name[80];
-
- bool_ notice = FALSE;
- bool_ disarm = FALSE;
- bool_ remove = FALSE;
- bool_ dead = FALSE;
- bool_ fear = FALSE;
- s32b special = 0;
-
- int dam, chance, shots;
- int mul = 0;
- int breakage = -1;
-
- int cost = 0;
-
- /* Get the trap objects */
- auto kit_o_idx = cave[my][mx].special2;
- auto kit_o_ptr = &o_list[kit_o_idx];
- auto load_o_ptr = &o_list[cave[my][mx].special];
- auto j_ptr = &object_type_body;
-
- /* Get trap properties */
- auto const flags = object_flags(kit_o_ptr);
-
- /* Can set off check */
- /* Ghosts only set off Ghost traps */
- if ((r_ptr->flags & RF_PASS_WALL) && !(flags & TR_KILL_GHOST)) return (FALSE);
-
- /* Some traps are specialized to some creatures */
- if (flags & (TR_ONLY_DRAGON | TR_ONLY_DEMON | TR_ONLY_ANIMAL | TR_ONLY_UNDEAD | TR_ONLY_EVIL))
- {
- bool_ affect = FALSE;
- if ((flags & TR_ONLY_DRAGON) && (r_ptr->flags & RF_DRAGON)) affect = TRUE;
- if ((flags & TR_ONLY_DEMON) && (r_ptr->flags & RF_DEMON)) affect = TRUE;
- if ((flags & TR_ONLY_UNDEAD) && (r_ptr->flags & RF_UNDEAD)) affect = TRUE;
- if ((flags & TR_ONLY_EVIL) && (r_ptr->flags & RF_EVIL)) affect = TRUE;
- if ((flags & TR_ONLY_ANIMAL) && (r_ptr->flags & RF_ANIMAL)) affect = TRUE;
-
- /* Don't set it off if forbidden */
- if (!affect) return (FALSE);
- }
-
- /* Get detection difficulty */
- difficulty = 25;
-
- /* Some traps are well-hidden */
- if (flags & TR_STEALTH)
- {
- difficulty += 10 * (kit_o_ptr->pval);
- }
-
- /* Get monster smartness for trap detection */
- /* Higher level monsters are smarter */
- smartness = r_ptr->level;
-
- /* Smart monsters are better at detecting traps */
- if (r_ptr->flags & RF_SMART) smartness += 10;
-
- /* Some monsters have already noticed one of out traps */
- if (m_ptr->smart & SM_NOTE_TRAP) smartness += 20;
-
- /* Stupid monsters are no good at detecting traps */
- if (r_ptr->flags & (RF_STUPID | RF_EMPTY_MIND)) smartness = -150;
-
- /* Check if the monster notices the trap */
- if (randint(300) > (difficulty - smartness + 150)) notice = TRUE;
-
- /* Disarm check */
- if (notice)
- {
- /* The next traps will be easier to spot! */
- m_ptr->smart |= SM_NOTE_TRAP;
-
- /* Get trap disarming difficulty */
- difficulty = (kit_o_ptr->ac + kit_o_ptr->to_a);
-
- /* Get monster disarming ability */
- /* Higher level monsters are better */
- smartness = r_ptr->level / 5;
-
- /* Smart monsters are better at disarming */
- if (r_ptr->flags & RF_SMART) smartness *= 2;
-
- /* Stupid monsters never disarm traps */
- if (r_ptr->flags & RF_STUPID) smartness = -150;
-
- /* Nonsmart animals never disarm traps */
- if ((r_ptr->flags & RF_ANIMAL) && !(r_ptr->flags & RF_SMART)) smartness = -150;
-
- /* Check if the monster disarms the trap */
- if (randint(120) > (difficulty - smartness + 80)) disarm = TRUE;
- }
-
- /* If disarmed, remove the trap and print a message */
- if (disarm)
- {
- remove = TRUE;
-
- if (m_ptr->ml)
- {
- /* Get the name */
- monster_desc(m_name, m_ptr, 0);
-
- /* Print a message */
- msg_format("%^s disarms a trap!", m_name);
- }
- }
-
- /* Otherwise, activate the trap! */
- else
- {
- /* Message for visible monster */
- if (m_ptr->ml)
- {
- /* Get the name */
- monster_desc(m_name, m_ptr, 0);
-
- /* Print a message */
- msg_format("%^s sets off a trap!", m_name);
- }
- else
- {
- /* No message if monster isn't visible ? */
- }
-
- /* Next time be more careful */
- if (randint(100) < 80) m_ptr->smart |= SM_NOTE_TRAP;
-
- /* Actually activate the trap */
- switch (kit_o_ptr->sval)
- {
- case SV_TRAPKIT_BOW:
- case SV_TRAPKIT_XBOW:
- case SV_TRAPKIT_SLING:
- {
- /* Get number of shots */
- shots = 1;
- if (flags & TR_XTRA_SHOTS) shots += kit_o_ptr->pval;
- if (shots <= 0) shots = 1;
- if (shots > load_o_ptr->number) shots = load_o_ptr->number;
-
- while (shots-- && !dead)
- {
- /* Total base damage */
- dam = damroll(load_o_ptr->dd, load_o_ptr->ds) + load_o_ptr->to_d + kit_o_ptr->to_d;
-
- /* Total hit probability */
- chance = (kit_o_ptr->to_h + load_o_ptr->to_h + 20) * BTH_PLUS_ADJ;
-
- /* Damage multiplier */
- if (kit_o_ptr->sval == SV_TRAPKIT_BOW) mul = 3;
- if (kit_o_ptr->sval == SV_TRAPKIT_XBOW) mul = 4;
- if (kit_o_ptr->sval == SV_TRAPKIT_SLING) mul = 2;
- if (flags & TR_XTRA_MIGHT) mul += kit_o_ptr->pval;
- if (mul < 0) mul = 0;
-
- /* Multiply damage */
- dam *= mul;
-
- /* Check if we hit the monster */
- if (test_hit_fire(chance, r_ptr->ac, TRUE))
- {
- /* Assume a default death */
- cptr note_dies = " dies.";
-
- /* Some monsters get "destroyed" */
- if ((r_ptr->flags & RF_DEMON) ||
- (r_ptr->flags & RF_UNDEAD) ||
- (r_ptr->flags & RF_STUPID) ||
- (strchr("Evg", r_ptr->d_char)))
- {
- /* Special note at death */
- note_dies = " is destroyed.";
- }
-
- /* Message if visible */
- if (m_ptr->ml)
- {
- /* describe the monster (again, just in case :-) */
- monster_desc(m_name, m_ptr, 0);
-
- /* Print a message */
- msg_format("%^s is hit by a missile.", m_name);
- }
-
- /* Apply slays, brand, critical hits */
- dam = tot_dam_aux(load_o_ptr, dam, m_ptr, &special);
- dam = critical_shot(load_o_ptr->weight, load_o_ptr->to_h, dam, SKILL_ARCHERY);
-
- /* No negative damage */
- if (dam < 0) dam = 0;
-
- /* Hit the monster, check for death */
- if (mon_take_hit(m_idx, dam, &fear, note_dies))
- {
- /* Dead monster */
- dead = TRUE;
- }
-
- /* No death */
- else
- {
- /* Message */
- message_pain(m_idx, dam);
-
- if (special) attack_special(m_ptr, special, dam);
-
- /* Take note */
- if (fear && m_ptr->ml)
- {
- /* Message */
- msg_format("%^s flees in terror!", m_name);
- }
- }
-
- }
-
- /* Exploding ammo */
- if (load_o_ptr->pval2 != 0)
- {
- int rad = 0;
- int dam = (damroll(load_o_ptr->dd, load_o_ptr->ds) + load_o_ptr->to_d)*2;
- int flag = PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL |
- PROJECT_JUMP;
-
- switch (load_o_ptr->sval)
- {
- case SV_AMMO_LIGHT:
- rad = 2;
- dam /= 2;
- break;
- case SV_AMMO_NORMAL:
- rad = 3;
- break;
- case SV_AMMO_HEAVY:
- rad = 4;
- dam *= 2;
- break;
- }
-
- project(0, rad, my, mx, dam, load_o_ptr->pval2, flag);
-
- breakage = 100;
- }
- else
- {
- breakage = breakage_chance(load_o_ptr);
- }
-
- /* Copy and decrease ammo */
- object_copy(j_ptr, load_o_ptr);
-
- j_ptr->number = 1;
-
- load_o_ptr->number--;
-
- if (load_o_ptr->number <= 0)
- {
- remove = TRUE;
- delete_object_idx(kit_o_idx);
- }
-
- /* Drop (or break) near that location */
- drop_near(j_ptr, breakage, my, mx);
-
- }
-
- break;
- }
-
- case SV_TRAPKIT_POTION:
- {
- /* Get number of shots */
- shots = 1;
- if (flags & TR_XTRA_SHOTS) shots += kit_o_ptr->pval;
- if (shots <= 0) shots = 1;
- if (shots > load_o_ptr->number) shots = load_o_ptr->number;
-
- while (shots-- && !dead)
- {
-
- /* Message if visible */
- if (m_ptr->ml)
- {
- /* describe the monster (again, just in case :-) */
- monster_desc(m_name, m_ptr, 0);
-
- /* Print a message */
- msg_format("%^s is hit by fumes.", m_name);
- }
-
- /* Get the potion effect */
- dead = mon_hit_trap_aux_potion(m_idx, load_o_ptr);
-
- /* Copy and decrease ammo */
- object_copy(j_ptr, load_o_ptr);
-
- j_ptr->number = 1;
-
- load_o_ptr->number--;
-
- if (load_o_ptr->number <= 0)
- {
- remove = TRUE;
- delete_object_idx(kit_o_idx);
- }
- }
-
- break;
- }
-
- case SV_TRAPKIT_SCROLL:
- {
- /* Get number of shots */
- shots = 1;
- if (flags & TR_XTRA_SHOTS) shots += kit_o_ptr->pval;
- if (shots <= 0) shots = 1;
- if (shots > load_o_ptr->number) shots = load_o_ptr->number;
-
- while (shots-- && !dead)
- {
-
- /* Message if visible */
- if (m_ptr->ml)
- {
- /* describe the monster (again, just in case :-) */
- monster_desc(m_name, m_ptr, 0);
-
- /* Print a message */
- msg_format("%^s activates a spell!", m_name);
- }
-
- /* Get the potion effect */
- dead = mon_hit_trap_aux_scroll(m_idx, load_o_ptr->sval);
-
- /* Copy and decrease ammo */
- object_copy(j_ptr, load_o_ptr);
-
- j_ptr->number = 1;
-
- load_o_ptr->number--;
-
- if (load_o_ptr->number <= 0)
- {
- remove = TRUE;
- delete_object_idx(kit_o_idx);
- }
- }
-
- break;
- }
-
- case SV_TRAPKIT_DEVICE:
- {
- if (load_o_ptr->tval == TV_ROD_MAIN)
- {
- /* Extract mana cost of the rod tip */
- auto tip_o_ptr = &k_info[lookup_kind(TV_ROD, load_o_ptr->pval)];
- auto const tflags = object_flags(load_o_ptr);
- cost = (tflags & TR_CHEAPNESS) ? tip_o_ptr->pval / 2 : tip_o_ptr->pval;
- if (cost <= 0) cost = 1;
- }
-
- /* Get number of shots */
- shots = 1;
- if (flags & TR_XTRA_SHOTS) shots += kit_o_ptr->pval;
- if (shots <= 0) shots = 1;
-
- if (load_o_ptr->tval == TV_ROD_MAIN)
- {
- if (shots > load_o_ptr->timeout / cost) shots = load_o_ptr->timeout / cost;
- }
- else
- {
- if (shots > load_o_ptr->pval) shots = load_o_ptr->pval;
- }
-
- while (shots-- && !dead)
- {
- /* Get the effect effect */
- switch (load_o_ptr->tval)
- {
- case TV_ROD_MAIN:
- dead = mon_hit_trap_aux_rod(m_idx, load_o_ptr);
- break;
- case TV_WAND:
- dead = mon_hit_trap_aux_wand(m_idx, load_o_ptr);
- break;
- case TV_STAFF:
- dead = mon_hit_trap_aux_staff(m_idx, load_o_ptr);
- break;
- }
-
- if (load_o_ptr->tval == TV_ROD_MAIN)
- {
- /* decrease stored mana (timeout) for rods */
- load_o_ptr->timeout -= cost;
- }
- else
- {
- /* decrease charges for wands and staves */
- load_o_ptr->pval--;
- }
- }
-
- break;
- }
-
- default:
- msg_print("oops! nonexistant trap!");
-
- }
-
- /* Non-automatic traps are removed */
- if (!(flags & (TR_AUTOMATIC_5 | TR_AUTOMATIC_99)))
- {
- remove = TRUE;
- }
- else if (flags & TR_AUTOMATIC_5) remove = (randint(5) == 1);
-
- }
-
- /* Special trap effect -- teleport to */
- if ((flags & TR_TELEPORT_TO) && (!disarm) && (!dead))
- {
- teleport_monster_to(m_idx, p_ptr->py, p_ptr->px);
- }
-
- /* Remove the trap if inactive now */
- if (remove) place_floor_convert_glass(my, mx);
-
- /* did it die? */
- return (dead);
-}
-
diff --git a/src/traps.hpp b/src/traps.hpp
deleted file mode 100644
index 3df1e430..00000000
--- a/src/traps.hpp
+++ /dev/null
@@ -1,13 +0,0 @@
-#pragma once
-
-#include "h-basic.h"
-#include "object_type_fwd.hpp"
-
-extern bool_ player_activate_trap_type(s16b y, s16b x, object_type *i_ptr, s16b item);
-extern void player_activate_door_trap(s16b y, s16b x);
-extern void place_trap(int y, int x);
-extern void place_trap_leveled(int y, int x, int lev);
-extern void place_trap_object(object_type *o_ptr);
-extern void wiz_place_trap(int y, int x, int idx);
-extern void do_cmd_set_trap(void);
-extern bool_ mon_hit_trap(int);
diff --git a/src/wizard2.cc b/src/wizard2.cc
index e3e93918..0c431066 100644
--- a/src/wizard2.cc
+++ b/src/wizard2.cc
@@ -32,7 +32,6 @@
#include "spells2.hpp"
#include "stats.hpp"
#include "tables.hpp"
-#include "traps.hpp"
#include "util.hpp"
#include "util.h"
#include "variable.h"
@@ -1659,11 +1658,6 @@ void do_cmd_debug()
gain_random_corruption();
break;
- /* Create a trap */
- case 'R':
- wiz_place_trap(p_ptr->py, p_ptr->px, command_arg);
- break;
-
/* Summon _friendly_ named monster */
case 'N':
do_cmd_wiz_named_friendly(command_arg, TRUE);
@@ -1807,7 +1801,6 @@ void do_cmd_debug()
/* Change the feature of the map */
case 'F':
- msg_format("Trap: %d", cave[p_ptr->py][p_ptr->px].t_idx);
msg_format("Old feature: %d", cave[p_ptr->py][p_ptr->px].feat);
msg_format("Special: %d", cave[p_ptr->py][p_ptr->px].special);
cave_set_feat(p_ptr->py, p_ptr->px, command_arg);
diff --git a/src/xtra1.cc b/src/xtra1.cc
index c64b26ac..3ed902dd 100644
--- a/src/xtra1.cc
+++ b/src/xtra1.cc
@@ -701,12 +701,6 @@ static void prt_state(int row, int col)
}
}
- /* Searching */
- else if (p_ptr->searching)
- {
- strcpy(text, "Searching ");
- }
-
/* Nothing interesting */
else
{
@@ -728,9 +722,6 @@ static void prt_speed(int row, int col)
byte attr = TERM_WHITE;
char buf[32] = "";
- /* Hack -- Visually "undo" the Search Mode Slowdown */
- if (p_ptr->searching) i += 10;
-
/* Fast */
if (i > 110)
{
@@ -831,17 +822,6 @@ static void prt_status_line(void)
put_str(" ", row, col);
}
- /* Dtrap */
- col = 32;
- if (cave[p_ptr->py][p_ptr->px].info & CAVE_DETECT)
- {
- c_put_str(TERM_L_GREEN, "DTrap", row, col);
- }
- else
- {
- put_str(" ", row, col);
- }
-
/* State */
col = 38;
prt_state(row, col);
@@ -2622,12 +2602,6 @@ void apply_flags(object_flag_set const &f, s16b pval, s16b tval, s16b to_h, s16b
/* Affect stealth */
if (f & TR_STEALTH) p_ptr->skill_stl += pval;
- /* Affect searching ability (factor of five) */
- if (f & TR_SEARCH) p_ptr->skill_srh += (pval * 5);
-
- /* Affect searching frequency (factor of five) */
- if (f & TR_SEARCH) p_ptr->skill_fos += (pval * 5);
-
/* Affect infravision */
if (f & TR_INFRA) p_ptr->see_infra += pval;
@@ -2960,10 +2934,6 @@ void calc_bonuses(bool_ silent)
/* Base infravision (purely racial) */
p_ptr->see_infra = rp_ptr->infra + rmp_ptr->infra;
-
- /* Base skill -- disarming */
- p_ptr->skill_dis = 0;
-
/* Base skill -- magic devices */
p_ptr->skill_dev = 0;
@@ -2973,12 +2943,6 @@ void calc_bonuses(bool_ silent)
/* Base skill -- stealth */
p_ptr->skill_stl = 0;
- /* Base skill -- searching ability */
- p_ptr->skill_srh = 0;
-
- /* Base skill -- searching frequency */
- p_ptr->skill_fos = 0;
-
/* Base skill -- combat (normal) */
p_ptr->skill_thn = 0;
@@ -3296,12 +3260,9 @@ void calc_bonuses(bool_ silent)
p_ptr->to_a += tactic_info[(byte)p_ptr->tactic].to_ac;
p_ptr->skill_stl += tactic_info[(byte)p_ptr->tactic].to_stealth;
- p_ptr->skill_dis += tactic_info[(byte)p_ptr->tactic].to_disarm;
p_ptr->skill_sav += tactic_info[(byte)p_ptr->tactic].to_saving;
p_ptr->pspeed += move_info[(byte)p_ptr->movement].to_speed;
- p_ptr->skill_srh += move_info[(byte)p_ptr->movement].to_search;
- p_ptr->skill_fos += move_info[(byte)p_ptr->movement].to_percep;
p_ptr->skill_stl += move_info[(byte)p_ptr->movement].to_stealth;
/* Apply temporary "stun" */
@@ -3535,9 +3496,6 @@ void calc_bonuses(bool_ silent)
/* Bloating slows the player down (a little) */
if (p_ptr->food >= PY_FOOD_MAX) p_ptr->pspeed -= 10;
- /* Searching slows the player down */
- if (p_ptr->searching) p_ptr->pspeed -= 10;
-
/* Display the speed (if needed) */
if (p_ptr->pspeed != old_speed) p_ptr->redraw |= (PR_FRAME);
@@ -3930,10 +3888,6 @@ void calc_bonuses(bool_ silent)
/* Affect Skill -- stealth (bonus one) */
p_ptr->skill_stl += 1;
- /* Affect Skill -- disarming (DEX and INT) */
- p_ptr->skill_dis += adj_dex_dis[p_ptr->stat_ind[A_DEX]];
- p_ptr->skill_dis += adj_int_dis[p_ptr->stat_ind[A_INT]];
-
/* Affect Skill -- magic devices (INT) */
p_ptr->skill_dev += get_skill_scale(SKILL_DEVICE, 20);
@@ -3943,9 +3897,6 @@ void calc_bonuses(bool_ silent)
/* Affect Skill -- digging (STR) */
p_ptr->skill_dig += adj_str_dig[p_ptr->stat_ind[A_STR]];
- /* Affect Skill -- disarming (skill) */
- p_ptr->skill_dis += (get_skill_scale(SKILL_DISARMING, 75));
-
/* Affect Skill -- magic devices (skill) */
p_ptr->skill_dev += (get_skill_scale(SKILL_DEVICE, 150));
@@ -3955,12 +3906,6 @@ void calc_bonuses(bool_ silent)
/* Affect Skill -- stealth (skill) */
p_ptr->skill_stl += (get_skill_scale(SKILL_STEALTH, 25));
- /* Affect Skill -- search ability (Sneakiness skill) */
- p_ptr->skill_srh += (get_skill_scale(SKILL_SNEAK, 35));
-
- /* Affect Skill -- search frequency (Sneakiness skill) */
- p_ptr->skill_fos += (get_skill_scale(SKILL_SNEAK, 25));
-
/* Affect Skill -- combat (Combat skill + mastery) */
p_ptr->skill_thn += (50 * (((7 * get_skill(p_ptr->melee_style)) + (3 * get_skill(SKILL_COMBAT))) / 10) / 10);
diff --git a/src/xtra2.cc b/src/xtra2.cc
index 890ce975..8e859f14 100644
--- a/src/xtra2.cc
+++ b/src/xtra2.cc
@@ -51,7 +51,6 @@
#include "stats.hpp"
#include "store_info_type.hpp"
#include "tables.hpp"
-#include "trap_type.hpp"
#include "util.hpp"
#include "util.h"
#include "variable.h"
@@ -3777,9 +3776,6 @@ static bool_ target_set_accept(int y, int x)
/* Interesting memorized features */
if (c_ptr->info & (CAVE_MARK))
{
- /* Traps are interesting */
- if (c_ptr->info & (CAVE_TRDT)) return (TRUE);
-
/* Hack -- Doors are boring */
if (c_ptr->feat == FEAT_OPEN) return (FALSE);
if (c_ptr->feat == FEAT_BROKEN) return (FALSE);
@@ -3902,7 +3898,6 @@ static int target_set_aux(int y, int x, int mode, cptr info)
auto const &wf_info = game->edit_data.wf_info;
auto const &f_info = game->edit_data.f_info;
auto const &k_info = game->edit_data.k_info;
- auto const &t_info = game->edit_data.t_info;
cave_type *c_ptr = &cave[y][x];
@@ -4166,34 +4161,6 @@ static int target_set_aux(int y, int x, int mode, cptr info)
}
}
- /* Actual traps */
- if ((c_ptr->info & (CAVE_TRDT)) && c_ptr->t_idx)
- {
- cptr name = "a trap", s4;
-
- /* Name trap */
- if (t_info[c_ptr->t_idx].ident)
- {
- s4 = format("(%s)", t_info[c_ptr->t_idx].name);
- }
- else
- {
- s4 = "an unknown trap";
- }
-
- /* Display a message */
- sprintf(out_val, "%s%s%s%s [%s]", s1, s2, s3, name, s4);
- prt(out_val, 0, 0);
- move_cursor_relative(y, x);
- query = inkey();
-
- /* Stop on everything but "return" */
- if ((query != '\r') && (query != '\n')) break;
-
- /* Repeat forever */
- continue;
- }
-
/* Feature (apply "mimic") */
if (c_ptr->mimic)
{