else old_damage = old_damage/2;
c_ptr = &cave[yy][xx];
- if (((is_trap(c_ptr->feat) && !easy_disarm) || (c_ptr->info & CAVE_TRAP)) && !one_in_(13))
+ if (((!easy_disarm && (is_trap(c_ptr->feat) || c_ptr->feat == FEAT_INVIS))
+ || (c_ptr->info & CAVE_TRAP)) && !one_in_(13))
{
object_type *o_ptr = choose_warning_item();
}
/* Destroy traps */
- if ((c_ptr->info & CAVE_TRAP) || is_trap(c_ptr->feat))
+ if ((c_ptr->info & CAVE_TRAP) || is_trap(c_ptr->feat) ||
+ c_ptr->feat == FEAT_INVIS)
{
/* Check line of sight */
if (known)
{
/* Destroy all doors and traps */
if ((c_ptr->feat == FEAT_OPEN) ||
- (c_ptr->feat == FEAT_BROKEN) ||
- (c_ptr->info & CAVE_TRAP) ||
- (is_trap(c_ptr->feat)) ||
- ((c_ptr->feat >= FEAT_DOOR_HEAD) &&
- (c_ptr->feat <= FEAT_DOOR_TAIL)))
+ (c_ptr->feat == FEAT_BROKEN) ||
+ (c_ptr->info & CAVE_TRAP) ||
+ is_trap(c_ptr->feat) ||
+ (c_ptr->feat == FEAT_INVIS) ||
+ ((c_ptr->feat >= FEAT_DOOR_HEAD) &&
+ (c_ptr->feat <= FEAT_DOOR_TAIL)))
{
/* Check line of sight */
if (known)
pick_trap(y, x);
}
+ /* Detect invisible open traps */
+ if (c_ptr->feat == FEAT_INVIS)
+ c_ptr->feat = FEAT_TRAP_OPEN;
+
/* Detect traps */
if (is_trap(c_ptr->feat))
{
- if (c_ptr->feat == FEAT_INVIS)
- c_ptr->feat = FEAT_TRAP_OPEN;
-
/* Hack -- Memorize */
c_ptr->info |= (CAVE_MARK);