Changeset 285

Show
Ignore:
Timestamp:
07/05/07 15:55:35 (1 year ago)
Author:
ajps
Message:

Add ability to create gold with debug commands. Allow normal gold pickup when gold has not been 'seen'. Closes #201.

Files:

Legend:

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

    r274 r285  
    521521                /* Get the next object */ 
    522522                next_o_idx = o_ptr->next_o_idx; 
    523  
    524                 /* Ignore all hidden objects */ 
    525                 if (!o_ptr->marked) continue; 
    526523 
    527524                /* Ignore if not legal treasure */ 
  • trunk/src/wizard2.c

    r274 r285  
    409409        { TV_BOTTLE,            "Empty bottle"         }, 
    410410        { TV_JUNK,              "Junk"                 }, 
     411        { TV_GOLD,              "Gold"                 }, 
    411412        { 0,                    NULL                   } 
    412413}; 
     
    10261027        /* Apply magic (no messages, no artifacts) */ 
    10271028        apply_magic(i_ptr, p_ptr->depth, FALSE, FALSE, FALSE); 
     1029 
     1030        if (k_info[k_idx].tval == TV_GOLD) 
     1031        { 
     1032                /* Hack -- Base coin cost */ 
     1033                s32b base = k_info[k_idx].cost; 
     1034 
     1035                /* Determine how much the treasure is "worth" */ 
     1036                i_ptr->pval = (base + (8L * randint(base)) + randint(8)); 
     1037        } 
    10281038 
    10291039        /* Drop the object from heaven */