Changeset 446

Show
Ignore:
Timestamp:
08/05/07 03:36:27 (1 year ago)
Author:
ctate
Message:

* Revert chest changes to former random-content-level formula
* Initialize object origin depth in wiz_create_item()

Files:

Legend:

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

    r445 r446  
    182182static void chest_death(int y, int x, s16b o_idx) 
    183183{ 
    184         int number
     184        int number, value
    185185 
    186186        bool tiny; 
     
    207207        opening_chest = TRUE; 
    208208 
     209        /* Determine the "value" of the items */ 
     210        value = ABS(o_ptr->pval) + 10; 
     211 
    209212        /* Drop some objects (non-chests) */ 
    210213        for (; number > 0; --number) 
     
    220223                { 
    221224                        /* Make some gold */ 
    222                         if (!make_gold(i_ptr, o_ptr->origin_depth)) continue; 
     225                        if (!make_gold(i_ptr, value)) continue; 
    223226                } 
    224227 
     
    227230                { 
    228231                        /* Make an object */ 
    229                         if (!make_object(i_ptr, o_ptr->origin_depth, FALSE, FALSE)) continue; 
     232                        if (!make_object(i_ptr, value, FALSE, FALSE)) continue; 
    230233                } 
    231234 
  • trunk/src/object2.c

    r444 r446  
    24492449                        if (o_ptr->pval > 55) o_ptr->pval = (s16b)(55 + rand_int(5)); 
    24502450 
    2451                         /* The contents of a chest are based on its level of origin */ 
    2452                         o_ptr->origin_depth = level; 
    2453  
    24542451                        break; 
    24552452                } 
  • trunk/src/wizard2.c

    r443 r446  
    10311031        apply_magic(i_ptr, p_ptr->depth, FALSE, FALSE, FALSE); 
    10321032 
    1033         /* Mark as cheat */ 
     1033        /* Mark as cheat, and where created */ 
    10341034        i_ptr->origin = ORIGIN_CHEAT; 
     1035        i_ptr->origin_depth = p_ptr->depth; 
    10351036 
    10361037        if (k_info[k_idx].tval == TV_GOLD)