Changeset 431

Show
Ignore:
Timestamp:
08/01/07 22:30:03 (1 year ago)
Author:
takkaria
Message:

Fix the new lose-one-gain-one stat potions; only increase one of the pair if the other can be drained.

Files:

Legend:

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

    r421 r431  
    402402                case EF_BRAWN: 
    403403                { 
     404                        if (!do_dec_stat(A_INT, TRUE)) return FALSE; 
    404405                        if (do_inc_stat(A_STR)) *ident = TRUE; 
    405                         if (dec_stat(A_INT, 10, TRUE)) *ident = TRUE; 
    406406                        return TRUE; 
    407407                } 
     
    409409                case EF_INTELLECT: 
    410410                { 
     411                        if (!do_dec_stat(A_CON, TRUE)) return FALSE; 
    411412                        if (do_inc_stat(A_INT)) *ident = TRUE; 
    412                         if (do_dec_stat(A_CON, TRUE)) *ident = TRUE; 
    413413                        return TRUE; 
    414414                } 
     
    416416                case EF_CONTEMPLATION: 
    417417                { 
     418                        if (!do_dec_stat(A_DEX, TRUE)) return FALSE; 
    418419                        if (do_inc_stat(A_WIS)) *ident = TRUE; 
    419                         if (do_dec_stat(A_DEX, TRUE)) *ident = TRUE; 
    420420                        return TRUE; 
    421421                } 
     
    423423                case EF_TOUGHNESS: 
    424424                { 
     425                        if (!do_dec_stat(A_CHR, TRUE)) return FALSE; 
    425426                        if (do_inc_stat(A_CON)) *ident = TRUE; 
    426                         if (do_dec_stat(A_CHR, TRUE)) *ident = TRUE; 
    427427                        return TRUE; 
    428428                } 
     
    430430                case EF_NIMBLENESS: 
    431431                { 
     432                        if (!do_dec_stat(A_STR, TRUE)) return FALSE; 
    432433                        if (do_inc_stat(A_DEX)) *ident = TRUE; 
    433                         if (do_dec_stat(A_STR, TRUE)) *ident = TRUE; 
    434434                        return TRUE; 
    435435                } 
     
    437437                case EF_PLEASING: 
    438438                { 
     439                        if (!do_dec_stat(A_WIS, TRUE)) return FALSE; 
    439440                        if (do_inc_stat(A_CHR)) *ident = TRUE; 
    440                         if (do_dec_stat(A_WIS, TRUE)) *ident = TRUE; 
    441441                        return TRUE; 
    442442                }