Changeset 594

Show
Ignore:
Timestamp:
09/29/07 17:37:36 (1 year ago)
Author:
takkaria
Message:

Finish off #357:

  • Make {average} items automatically ID
  • Make wands/staffs stack even when un-ID'd
Files:

Legend:

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

    r591 r594  
    170170 
    171171                /* It has already been sensed, do not sense it again */ 
    172                 if (o_ptr->ident & (IDENT_SENSE)
     172                if (o_ptr->ident & IDENT_SENSE
    173173                { 
    174174                        /* Small chance of wielded, sensed items getting complete ID */ 
     
    201201                if (disturb_minor) disturb(0, 0); 
    202202 
    203                 /* Get an object description */ 
    204                 object_desc(o_name, sizeof(o_name), o_ptr, FALSE, 0); 
    205  
    206                 /* Message (equipment) */ 
    207                 sound(MSG_PSEUDOID); 
    208  
    209                 if (i >= INVEN_WIELD) 
    210                 { 
    211                         msg_format("You feel the %s (%c) you are %s %s %s...", 
    212                                    o_name, index_to_label(i), describe_use(i), 
    213                                    ((o_ptr->number == 1) ? "is" : "are"), 
    214                                    inscrip_text[feel - INSCRIP_NULL]); 
    215                 } 
    216  
    217                 /* Message (inventory) */ 
     203                /* Average pseudo-ID means full ID */ 
     204                if (feel == INSCRIP_AVERAGE) 
     205                { 
     206                        do_ident_item(i, o_ptr); 
     207                } 
    218208                else 
    219209                { 
    220                         msg_format("You feel the %s (%c) in your pack %s %s...", 
    221                                    o_name, index_to_label(i), 
    222                                    ((o_ptr->number == 1) ? "is" : "are"), 
    223                                    inscrip_text[feel - INSCRIP_NULL]); 
    224                 } 
    225  
    226                 /* Sense the object */ 
    227                 o_ptr->pseudo = feel; 
    228  
    229                 /* The object has been "sensed" */ 
    230                 o_ptr->ident |= (IDENT_SENSE); 
     210                        object_desc(o_name, sizeof(o_name), o_ptr, FALSE, 0); 
     211 
     212                        if (i >= INVEN_WIELD) 
     213                        { 
     214                                message_format(MSG_PSEUDOID, 0, "You feel the %s (%c) you are %s %s %s...", 
     215                                           o_name, index_to_label(i), describe_use(i), 
     216                                           ((o_ptr->number == 1) ? "is" : "are"), 
     217                                           inscrip_text[feel - INSCRIP_NULL]); 
     218                        } 
     219                        else 
     220                        { 
     221                                message_format(MSG_PSEUDOID, 0, "You feel the %s (%c) in your pack %s %s...", 
     222                                           o_name, index_to_label(i), 
     223                                           ((o_ptr->number == 1) ? "is" : "are"), 
     224                                           inscrip_text[feel - INSCRIP_NULL]); 
     225                        } 
     226 
     227                        /* Sense the object */ 
     228                        o_ptr->pseudo = feel; 
     229 
     230                        /* The object has been "sensed" */ 
     231                        o_ptr->ident |= (IDENT_SENSE); 
     232                } 
     233 
    231234 
    232235                /* Set squelch flag as appropriate */ 
  • trunk/src/object2.c

    r532 r594  
    11431143                case TV_WAND: 
    11441144                { 
    1145                         /* Require either knowledge or known empty for both wands/staves */ 
    1146                         if ((!(o_ptr->ident & (IDENT_EMPTY)) && 
    1147                                 !object_known_p(o_ptr)) || 
    1148                                 (!(j_ptr->ident & (IDENT_EMPTY)) && 
    1149                                 !object_known_p(j_ptr))) return(0); 
    1150  
    11511145                        /* Assume okay */ 
    11521146                        break; 
     
    12171211 
    12181212                        /* Lites must have same amount of fuel */ 
    1219                         else if(o_ptr->timeout != j_ptr->timeout && o_ptr->tval == TV_LITE) 
     1213                        else if (o_ptr->timeout != j_ptr->timeout && o_ptr->tval == TV_LITE) 
    12201214                                return FALSE; 
    12211215