Changeset 843

Show
Ignore:
Timestamp:
04/28/08 09:30:20 (3 months ago)
Author:
takkaria
Message:

Fix #569:

  • Add minimum depths for each kind of trap. As such, only teleport and confusion traps occur at dlev1. This should help some people.
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/trap.c

    r783 r843  
    4141{ 
    4242        int feat; 
     43 
     44        const static int min_level[] = 
     45        { 
     46                2,              /* Trap door */ 
     47                2,              /* Open pit */ 
     48                2,              /* Spiked pit */ 
     49                2,              /* Poison pit */ 
     50                3,              /* Summoning rune */ 
     51                1,              /* Teleport rune */ 
     52                2,              /* Fire rune */ 
     53                2,              /* Acid rune */ 
     54                2,              /* Slow rune */ 
     55                6,              /* Strength dart */ 
     56                6,              /* Dexterity dart */ 
     57                6,              /* Constitution dart */ 
     58                2,              /* Gas blind */ 
     59                1,              /* Gas confuse */ 
     60                2,              /* Gas poison */ 
     61                2,              /* Gas sleep */ 
     62        }; 
    4363 
    4464        /* Paranoia */ 
     
    5070                /* Hack -- pick a trap */ 
    5171                feat = FEAT_TRAP_HEAD + rand_int(16); 
     72 
     73                /* Check against minimum depth */ 
     74                if (min_level[feat - FEAT_TRAP_HEAD] > p_ptr->depth) continue; 
    5275 
    5376                /* Hack -- no trap doors on quest levels */