Changeset 91

Show
Ignore:
Timestamp:
04/27/07 16:23:34 (1 year ago)
Author:
pmac
Message:

Whoops, also found a bug -- if cut > 1000, adjust was getting set to 0,
so any potential decrement in TMD_STUN also got set to 0.

Files:

Legend:

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

    r90 r91  
    612612        { 
    613613                int decr = 1; 
    614  
    615                 if (p_ptr->timed[i]) 
    616                 { 
    617                         switch (i) 
    618                         { 
    619                                 case TMD_CUT: 
    620                                 { 
    621                                         /* Hack -- Truly "mortal" wound */ 
    622                                         if (p_ptr->timed[TMD_CUT] > 1000)  
    623                                                 adjust = 0; 
    624                                 } 
    625  
    626                                 case TMD_POISONED: 
    627                                 case TMD_STUN: 
    628                                 { 
    629                                         decr = adjust; 
    630                                         break; 
    631                                 } 
    632                         } 
    633  
    634                         /* Decrement the effect */ 
    635                         dec_timed(i, decr); 
    636                 } 
     614                if (!p_ptr->timed[i]) 
     615                        continue; 
     616 
     617                switch (i) 
     618                { 
     619                        case TMD_CUT: 
     620                        { 
     621                                /* Hack -- check for truly "mortal" wound */ 
     622                                decr = (p_ptr->timed[i] > 1000) ? 0 : adjust; 
     623                                break; 
     624                        } 
     625 
     626                        case TMD_POISONED: 
     627                        case TMD_STUN: 
     628                        { 
     629                                decr = adjust; 
     630                                break; 
     631                        } 
     632                } 
     633                /* Decrement the effect */ 
     634                dec_timed(i, decr); 
    637635        } 
    638636