summaryrefslogtreecommitdiff
path: root/src/spells1.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/spells1.cc')
-rw-r--r--src/spells1.cc109
1 files changed, 3 insertions, 106 deletions
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;