diff options
Diffstat (limited to 'src/spells2.cc')
-rw-r--r-- | src/spells2.cc | 111 |
1 files changed, 0 insertions, 111 deletions
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); |