Changeset 618

Show
Ignore:
Timestamp:
12/21/07 20:39:09 (1 year ago)
Author:
takkaria
Message:

A number of people suggested that instead of the previously proposed system for gain-one-lose-one stat potions, the gain should be guaranteed but the loss should be random.

Files:

Legend:

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

    r580 r618  
    404404                case EF_BRAWN: 
    405405                { 
    406                         if (!do_dec_stat(A_INT, TRUE)) return FALSE; 
     406                        int stat = rand_int(A_MAX); 
     407                        if (!do_dec_stat(stat, TRUE)) return FALSE; 
    407408                        if (do_inc_stat(A_STR)) *ident = TRUE; 
    408409                        return TRUE; 
     
    411412                case EF_INTELLECT: 
    412413                { 
    413                         if (!do_dec_stat(A_CON, TRUE)) return FALSE; 
     414                        int stat = rand_int(A_MAX); 
     415                        if (!do_dec_stat(stat, TRUE)) return FALSE; 
    414416                        if (do_inc_stat(A_INT)) *ident = TRUE; 
    415417                        return TRUE; 
     
    418420                case EF_CONTEMPLATION: 
    419421                { 
    420                         if (!do_dec_stat(A_DEX, TRUE)) return FALSE; 
     422                        int stat = rand_int(A_MAX); 
     423                        if (!do_dec_stat(stat, TRUE)) return FALSE; 
    421424                        if (do_inc_stat(A_WIS)) *ident = TRUE; 
    422425                        return TRUE; 
     
    425428                case EF_TOUGHNESS: 
    426429                { 
    427                         if (!do_dec_stat(A_CHR, TRUE)) return FALSE; 
     430                        int stat = rand_int(A_MAX); 
     431                        if (!do_dec_stat(stat, TRUE)) return FALSE; 
    428432                        if (do_inc_stat(A_CON)) *ident = TRUE; 
    429433                        return TRUE; 
     
    432436                case EF_NIMBLENESS: 
    433437                { 
    434                         if (!do_dec_stat(A_STR, TRUE)) return FALSE; 
     438                        int stat = rand_int(A_MAX); 
     439                        if (!do_dec_stat(stat, TRUE)) return FALSE; 
    435440                        if (do_inc_stat(A_DEX)) *ident = TRUE; 
    436441                        return TRUE; 
     
    439444                case EF_PLEASING: 
    440445                { 
    441                         if (!do_dec_stat(A_WIS, TRUE)) return FALSE; 
     446                        int stat = rand_int(A_MAX); 
     447                        if (!do_dec_stat(stat, TRUE)) return FALSE; 
    442448                        if (do_inc_stat(A_CHR)) *ident = TRUE; 
    443449                        return TRUE;