Changeset 678

Show
Ignore:
Timestamp:
02/01/08 05:30:53 (8 months ago)
Author:
takkaria
Message:

Remove the IDENT_BROKEN flag and the pseudo-ID "broken" state, since they were unnecessary.

Files:

Legend:

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

    r653 r678  
    282282        /* Verify destruction */ 
    283283        strnfmt(out_val, sizeof(out_val), "Really destroy %s? ", o_name); 
    284         if (!get_check(out_val)) return;  
     284        if (!get_check(out_val)) return; 
    285285 
    286286        /* Artifacts cannot be destroyed */ 
     
    297297                { 
    298298                        /* Already sensed objects always get improved feelings */ 
    299                         if (cursed_p(o_ptr) || broken_p(o_ptr)
     299                        if (cursed_p(o_ptr)
    300300                                o_ptr->pseudo = INSCRIP_TERRIBLE; 
    301301                        else 
  • trunk/src/defines.h

    r676 r678  
    17041704#define IDENT_STORE     0x10    /* Item is in the inventory of a store */ 
    17051705/* ... */ 
    1706 #define IDENT_BROKEN    0x80    /* Item is permanently worthless */ 
    17071706 
    17081707 
     
    24402439        ((T)->name2 ? TRUE : FALSE) 
    24412440 
    2442  
    2443 /* 
    2444  * Broken items. 
    2445  */ 
    2446 #define broken_p(T) \ 
    2447         ((T)->ident & (IDENT_BROKEN)) 
    2448  
    24492441/* 
    24502442 * Cursed items. 
  • trunk/src/load.c

    r644 r678  
    476476 
    477477 
    478         /* Hack -- notice "broken" items */ 
    479         if (k_ptr->cost <= 0) o_ptr->ident |= (IDENT_BROKEN); 
    480  
    481  
    482478        /* 
    483479         * Ensure that rods and wands get the appropriate pvals, 
     
    574570        o_ptr->weight = k_ptr->weight; 
    575571 
    576         /* Hack -- extract the "broken" flag */ 
    577         if (o_ptr->pval < 0) o_ptr->ident |= (IDENT_BROKEN); 
    578  
    579572 
    580573        /* Artifacts */ 
     
    596589                /* Get the new artifact weight */ 
    597590                o_ptr->weight = a_ptr->weight; 
    598  
    599                 /* Hack -- extract the "broken" flag */ 
    600                 if (!a_ptr->cost) o_ptr->ident |= (IDENT_BROKEN); 
    601591        } 
    602592 
     
    615605                        o_ptr->dd = old_dd; 
    616606                } 
    617  
    618                 /* Hack -- extract the "broken" flag */ 
    619                 if (!e_ptr->cost) o_ptr->ident |= (IDENT_BROKEN); 
    620607 
    621608                /* Hack -- enforce legal pval */ 
  • trunk/src/obj-make.c

    r677 r678  
    694694                                        if (power < 0) 
    695695                                        { 
    696                                                 /* Broken */ 
    697                                                 o_ptr->ident |= (IDENT_BROKEN); 
    698  
    699696                                                /* Cursed */ 
    700697                                                o_ptr->flags3 |= TR3_LIGHT_CURSE; 
     
    719716                                        if (power < 0) 
    720717                                        { 
    721                                                 /* Broken */ 
    722                                                 o_ptr->ident |= (IDENT_BROKEN); 
    723  
    724718                                                /* Cursed */ 
    725719                                                o_ptr->flags3 |= TR3_LIGHT_CURSE; 
     
    751745                                        if (power < 0) 
    752746                                        { 
    753                                                 /* Broken */ 
    754                                                 o_ptr->ident |= (IDENT_BROKEN); 
    755  
    756747                                                /* Cursed */ 
    757748                                                o_ptr->flags3 |= TR3_LIGHT_CURSE; 
     749 
    758750                                                /* Reverse pval */ 
    759751                                                o_ptr->pval = 0 - (o_ptr->pval); 
     
    778770                                case SV_RING_STUPIDITY: 
    779771                                { 
    780                                         /* Broken */ 
    781                                         o_ptr->ident |= (IDENT_BROKEN); 
    782  
    783772                                        /* Cursed */ 
    784773                                        o_ptr->flags3 |= TR3_LIGHT_CURSE; 
     
    793782                                case SV_RING_WOE: 
    794783                                { 
    795                                         /* Broken */ 
    796                                         o_ptr->ident |= (IDENT_BROKEN); 
    797  
    798784                                        /* Cursed */ 
    799785                                        o_ptr->flags3 |= TR3_LIGHT_CURSE; 
     
    815801                                        if (power < 0) 
    816802                                        { 
    817                                                 /* Broken */ 
    818                                                 o_ptr->ident |= (IDENT_BROKEN); 
    819  
    820803                                                /* Cursed */ 
    821804                                                o_ptr->flags3 |= TR3_LIGHT_CURSE; 
     
    837820                                        if (power < 0) 
    838821                                        { 
    839                                                 /* Broken */ 
    840                                                 o_ptr->ident |= (IDENT_BROKEN); 
    841  
    842822                                                /* Cursed */ 
    843823                                                o_ptr->flags3 |= TR3_LIGHT_CURSE; 
     
    859839                                        if (power < 0) 
    860840                                        { 
    861                                                 /* Broken */ 
    862                                                 o_ptr->ident |= (IDENT_BROKEN); 
    863  
    864841                                                /* Cursed */ 
    865842                                                o_ptr->flags3 |= TR3_LIGHT_CURSE; 
     
    882859                                        if (power < 0) 
    883860                                        { 
    884                                                 /* Broken */ 
    885                                                 o_ptr->ident |= (IDENT_BROKEN); 
    886  
    887861                                                /* Cursed */ 
    888862                                                o_ptr->flags3 |= TR3_LIGHT_CURSE; 
     
    915889                                        if (power < 0) 
    916890                                        { 
    917                                                 /* Broken */ 
    918                                                 o_ptr->ident |= (IDENT_BROKEN); 
    919  
    920891                                                /* Cursed */ 
    921892                                                o_ptr->flags3 |= TR3_LIGHT_CURSE; 
     
    936907                                        if (power < 0) 
    937908                                        { 
    938                                                 /* Broken */ 
    939                                                 o_ptr->ident |= (IDENT_BROKEN); 
    940  
    941909                                                /* Cursed */ 
    942910                                                o_ptr->flags3 |= TR3_LIGHT_CURSE; 
     
    1019987                                case SV_AMULET_DOOM: 
    1020988                                { 
    1021                                         /* Broken */ 
    1022                                         o_ptr->ident |= (IDENT_BROKEN); 
    1023  
    1024989                                        /* Cursed */ 
    1025990                                        o_ptr->flags3 |= TR3_LIGHT_CURSE; 
     
    12631228                o_ptr->weight = a_ptr->weight; 
    12641229 
    1265                 /* Hack -- extract the "broken" flag */ 
    1266                 if (!a_ptr->cost) o_ptr->ident |= (IDENT_BROKEN); 
    1267  
    12681230                /* Hack -- extract the "cursed" flag */ 
    12691231                if (a_ptr->flags3 & TR3_LIGHT_CURSE) 
     
    13921354                } 
    13931355 
    1394                 /* Hack -- acquire "broken" flag */ 
    1395                 if (!e_ptr->cost) o_ptr->ident |= (IDENT_BROKEN); 
    1396  
    13971356                /* Hack -- acquire "cursed" flag */ 
    13981357                if (e_ptr->flags3 & (TR3_LIGHT_CURSE)) 
     
    14001359 
    14011360                /* Hack -- apply extra penalties if needed */ 
    1402                 if (cursed_p(o_ptr) || broken_p(o_ptr)
     1361                if (cursed_p(o_ptr)
    14031362                { 
    14041363                        /* Hack -- obtain bonuses */ 
     
    14381397        { 
    14391398                object_kind *k_ptr = &k_info[o_ptr->k_idx]; 
    1440  
    1441                 /* Hack -- acquire "broken" flag */ 
    1442                 if (!k_ptr->cost) o_ptr->ident |= (IDENT_BROKEN); 
    14431399 
    14441400                /* Hack -- acquire "cursed" flag */ 
     
    16311587 
    16321588        /* Notice "okay" out-of-depth objects */ 
    1633         if (!cursed_p(j_ptr) && !broken_p(j_ptr) && 
    1634             (k_info[j_ptr->k_idx].level > p_ptr->depth)) 
     1589        if (!cursed_p(j_ptr) && (k_info[j_ptr->k_idx].level > p_ptr->depth)) 
    16351590        { 
    16361591                /* Rating increase */ 
     
    17031658        if (artifact_p(o_ptr)) 
    17041659        { 
    1705                 if (cursed_p(o_ptr) || broken_p(o_ptr)
     1660                if (cursed_p(o_ptr)
    17061661                        return INSCRIP_TERRIBLE; 
    17071662                else 
     
    17111666        if (ego_item_p(o_ptr)) 
    17121667        { 
    1713                 if (cursed_p(o_ptr) || broken_p(o_ptr)
     1668                if (cursed_p(o_ptr)
    17141669                        return INSCRIP_WORTHLESS; 
    17151670                else 
     
    17191674        if (cursed_p(o_ptr)) 
    17201675                return INSCRIP_CURSED; 
    1721         else if (broken_p(o_ptr)) 
    1722                 return INSCRIP_BROKEN; 
    17231676 
    17241677        else if (o_ptr->to_a == 0 && o_ptr->to_h == 0 && o_ptr->to_d == 0) 
     
    17421695        if (cursed_p(o_ptr)) return (INSCRIP_CURSED); 
    17431696 
    1744         /* Broken items (all of them) */ 
    1745         if (broken_p(o_ptr)) return (INSCRIP_BROKEN); 
    1746  
    17471697        /* Artifacts -- except cursed/broken ones */ 
    17481698        if (artifact_p(o_ptr)) return (INSCRIP_EXCELLENT); 
  • trunk/src/obj-util.c

    r668 r678  
    16271627        if (object_known_p(o_ptr)) 
    16281628        { 
    1629                 /* Broken items -- worthless */ 
    1630                 if (broken_p(o_ptr)) return (0L); 
    1631  
    16321629                /* Cursed items -- worthless */ 
    16331630                if (cursed_p(o_ptr)) return (0L); 
     
    16401637        else 
    16411638        { 
    1642                 /* Hack -- Felt broken items */ 
    1643                 if ((o_ptr->ident & (IDENT_SENSE)) && broken_p(o_ptr)) return (0L); 
    1644  
    16451639                /* Hack -- Felt cursed items */ 
    16461640                if ((o_ptr->ident & (IDENT_SENSE)) && cursed_p(o_ptr)) return (0L); 
     
    17981792 
    17991793 
    1800         /* Hack -- Require identical "broken" status */ 
    1801         if ((o_ptr->ident & IDENT_BROKEN) != (j_ptr->ident & IDENT_BROKEN)) 
    1802         { 
    1803                 return (0); 
    1804         } 
    1805  
    1806  
    18071794        /* Hack -- Require compatible inscriptions */ 
    18081795        if (o_ptr->note != j_ptr->note) 
     
    20061993        o_ptr->dd = k_ptr->dd; 
    20071994        o_ptr->ds = k_ptr->ds; 
    2008  
    2009         /* Hack -- worthless items are always "broken" */ 
    2010         if (k_ptr->cost <= 0) o_ptr->ident |= (IDENT_BROKEN); 
    20111995 
    20121996        /* Hack -- cursed items are always "cursed" */ 
  • trunk/src/object.h

    r677 r678  
    3434        INSCRIP_WORTHLESS = 2,       /*!< Worthless item */ 
    3535        INSCRIP_CURSED = 3,          /*!< Cursed normal item */ 
    36         INSCRIP_BROKEN = 4,          /*!< Cursed ego-item */ 
     36        INSCRIP_STRANGE = 4,         /*!< Item that has mixed combat bonuses */ 
    3737        INSCRIP_AVERAGE = 5,         /*!< Item with no interesting features */ 
    3838        INSCRIP_MAGICAL = 6,         /*!< Item with combat bonuses */ 
     
    4141        INSCRIP_UNCURSED = 9,        /*!< Item previous cursed, now uncursed */ 
    4242        INSCRIP_INDESTRUCTIBLE = 10, /*!< Artifact that was tried to be destroyed */ 
    43         INSCRIP_STRANGE = 12,        /*!< Item that has mixed combat bonuses */ 
    4443 
    4544        INSCRIP_MAX                  /*!< Maximum number of pseudo-ID markers */ 
  • trunk/src/spells2.c

    r675 r678  
    34403440                o_ptr->flags3 |= TR3_LIGHT_CURSE; 
    34413441 
    3442                 /* Break it */ 
    3443                 o_ptr->ident |= (IDENT_BROKEN); 
    3444  
    34453442                /* Recalculate bonuses */ 
    34463443                p_ptr->update |= (PU_BONUS); 
     
    35043501                o_ptr->flags3 |= TR3_LIGHT_CURSE; 
    35053502 
    3506                 /* Break it */ 
    3507                 o_ptr->ident |= (IDENT_BROKEN); 
    3508  
    35093503                /* Recalculate bonuses */ 
    35103504                p_ptr->update |= (PU_BONUS); 
     
    35303524{ 
    35313525        /* you can never modify artifacts / ego-items */ 
    3532         /* you can never modify broken / cursed items */ 
    3533         if ((o_ptr->k_idx) && 
    3534             (!artifact_p(o_ptr)) && (!ego_item_p(o_ptr)) && 
    3535             (!broken_p(o_ptr)) && (!cursed_p(o_ptr))) 
     3526        /* you can never modify cursed / worthless items */ 
     3527        if (o_ptr->k_idx && !cursed_p(o_ptr) && k_info[o_ptr->k_idx].cost && 
     3528            !artifact_p(o_ptr) && !ego_item_p(o_ptr)) 
    35363529        { 
    35373530                cptr act = "magical"; 
     
    35673560                /* Window stuff */ 
    35683561                p_ptr->redraw |= (PR_INVEN | PR_EQUIP); 
    3569          
     3562 
    35703563                /* Enchant */ 
    35713564                enchant(o_ptr, rand_int(3) + 4, ENCH_TOHIT | ENCH_TODAM); 
  • trunk/src/tables.c

    r677 r678  
    14051405        "worthless", 
    14061406        "cursed", 
    1407         "broken", 
     1407        "strange", 
    14081408        "average", 
    14091409        "magical", 
     
    14111411        "special", 
    14121412        "uncursed", 
    1413         "indestructible", 
    1414         "strange" 
     1413        "indestructible" 
    14151414}; 
    14161415