Changeset 678
- Timestamp:
- 02/01/08 05:30:53 (8 months ago)
- Files:
-
- trunk/src/cmd3.c (modified) (2 diffs)
- trunk/src/defines.h (modified) (2 diffs)
- trunk/src/load.c (modified) (4 diffs)
- trunk/src/obj-make.c (modified) (21 diffs)
- trunk/src/obj-util.c (modified) (4 diffs)
- trunk/src/object.h (modified) (2 diffs)
- trunk/src/spells2.c (modified) (4 diffs)
- trunk/src/tables.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/cmd3.c
r653 r678 282 282 /* Verify destruction */ 283 283 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; 285 285 286 286 /* Artifacts cannot be destroyed */ … … 297 297 { 298 298 /* Already sensed objects always get improved feelings */ 299 if (cursed_p(o_ptr) || broken_p(o_ptr))299 if (cursed_p(o_ptr)) 300 300 o_ptr->pseudo = INSCRIP_TERRIBLE; 301 301 else trunk/src/defines.h
r676 r678 1704 1704 #define IDENT_STORE 0x10 /* Item is in the inventory of a store */ 1705 1705 /* ... */ 1706 #define IDENT_BROKEN 0x80 /* Item is permanently worthless */1707 1706 1708 1707 … … 2440 2439 ((T)->name2 ? TRUE : FALSE) 2441 2440 2442 2443 /*2444 * Broken items.2445 */2446 #define broken_p(T) \2447 ((T)->ident & (IDENT_BROKEN))2448 2449 2441 /* 2450 2442 * Cursed items. trunk/src/load.c
r644 r678 476 476 477 477 478 /* Hack -- notice "broken" items */479 if (k_ptr->cost <= 0) o_ptr->ident |= (IDENT_BROKEN);480 481 482 478 /* 483 479 * Ensure that rods and wands get the appropriate pvals, … … 574 570 o_ptr->weight = k_ptr->weight; 575 571 576 /* Hack -- extract the "broken" flag */577 if (o_ptr->pval < 0) o_ptr->ident |= (IDENT_BROKEN);578 579 572 580 573 /* Artifacts */ … … 596 589 /* Get the new artifact weight */ 597 590 o_ptr->weight = a_ptr->weight; 598 599 /* Hack -- extract the "broken" flag */600 if (!a_ptr->cost) o_ptr->ident |= (IDENT_BROKEN);601 591 } 602 592 … … 615 605 o_ptr->dd = old_dd; 616 606 } 617 618 /* Hack -- extract the "broken" flag */619 if (!e_ptr->cost) o_ptr->ident |= (IDENT_BROKEN);620 607 621 608 /* Hack -- enforce legal pval */ trunk/src/obj-make.c
r677 r678 694 694 if (power < 0) 695 695 { 696 /* Broken */697 o_ptr->ident |= (IDENT_BROKEN);698 699 696 /* Cursed */ 700 697 o_ptr->flags3 |= TR3_LIGHT_CURSE; … … 719 716 if (power < 0) 720 717 { 721 /* Broken */722 o_ptr->ident |= (IDENT_BROKEN);723 724 718 /* Cursed */ 725 719 o_ptr->flags3 |= TR3_LIGHT_CURSE; … … 751 745 if (power < 0) 752 746 { 753 /* Broken */754 o_ptr->ident |= (IDENT_BROKEN);755 756 747 /* Cursed */ 757 748 o_ptr->flags3 |= TR3_LIGHT_CURSE; 749 758 750 /* Reverse pval */ 759 751 o_ptr->pval = 0 - (o_ptr->pval); … … 778 770 case SV_RING_STUPIDITY: 779 771 { 780 /* Broken */781 o_ptr->ident |= (IDENT_BROKEN);782 783 772 /* Cursed */ 784 773 o_ptr->flags3 |= TR3_LIGHT_CURSE; … … 793 782 case SV_RING_WOE: 794 783 { 795 /* Broken */796 o_ptr->ident |= (IDENT_BROKEN);797 798 784 /* Cursed */ 799 785 o_ptr->flags3 |= TR3_LIGHT_CURSE; … … 815 801 if (power < 0) 816 802 { 817 /* Broken */818 o_ptr->ident |= (IDENT_BROKEN);819 820 803 /* Cursed */ 821 804 o_ptr->flags3 |= TR3_LIGHT_CURSE; … … 837 820 if (power < 0) 838 821 { 839 /* Broken */840 o_ptr->ident |= (IDENT_BROKEN);841 842 822 /* Cursed */ 843 823 o_ptr->flags3 |= TR3_LIGHT_CURSE; … … 859 839 if (power < 0) 860 840 { 861 /* Broken */862 o_ptr->ident |= (IDENT_BROKEN);863 864 841 /* Cursed */ 865 842 o_ptr->flags3 |= TR3_LIGHT_CURSE; … … 882 859 if (power < 0) 883 860 { 884 /* Broken */885 o_ptr->ident |= (IDENT_BROKEN);886 887 861 /* Cursed */ 888 862 o_ptr->flags3 |= TR3_LIGHT_CURSE; … … 915 889 if (power < 0) 916 890 { 917 /* Broken */918 o_ptr->ident |= (IDENT_BROKEN);919 920 891 /* Cursed */ 921 892 o_ptr->flags3 |= TR3_LIGHT_CURSE; … … 936 907 if (power < 0) 937 908 { 938 /* Broken */939 o_ptr->ident |= (IDENT_BROKEN);940 941 909 /* Cursed */ 942 910 o_ptr->flags3 |= TR3_LIGHT_CURSE; … … 1019 987 case SV_AMULET_DOOM: 1020 988 { 1021 /* Broken */1022 o_ptr->ident |= (IDENT_BROKEN);1023 1024 989 /* Cursed */ 1025 990 o_ptr->flags3 |= TR3_LIGHT_CURSE; … … 1263 1228 o_ptr->weight = a_ptr->weight; 1264 1229 1265 /* Hack -- extract the "broken" flag */1266 if (!a_ptr->cost) o_ptr->ident |= (IDENT_BROKEN);1267 1268 1230 /* Hack -- extract the "cursed" flag */ 1269 1231 if (a_ptr->flags3 & TR3_LIGHT_CURSE) … … 1392 1354 } 1393 1355 1394 /* Hack -- acquire "broken" flag */1395 if (!e_ptr->cost) o_ptr->ident |= (IDENT_BROKEN);1396 1397 1356 /* Hack -- acquire "cursed" flag */ 1398 1357 if (e_ptr->flags3 & (TR3_LIGHT_CURSE)) … … 1400 1359 1401 1360 /* Hack -- apply extra penalties if needed */ 1402 if (cursed_p(o_ptr) || broken_p(o_ptr))1361 if (cursed_p(o_ptr)) 1403 1362 { 1404 1363 /* Hack -- obtain bonuses */ … … 1438 1397 { 1439 1398 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);1443 1399 1444 1400 /* Hack -- acquire "cursed" flag */ … … 1631 1587 1632 1588 /* 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)) 1635 1590 { 1636 1591 /* Rating increase */ … … 1703 1658 if (artifact_p(o_ptr)) 1704 1659 { 1705 if (cursed_p(o_ptr) || broken_p(o_ptr))1660 if (cursed_p(o_ptr)) 1706 1661 return INSCRIP_TERRIBLE; 1707 1662 else … … 1711 1666 if (ego_item_p(o_ptr)) 1712 1667 { 1713 if (cursed_p(o_ptr) || broken_p(o_ptr))1668 if (cursed_p(o_ptr)) 1714 1669 return INSCRIP_WORTHLESS; 1715 1670 else … … 1719 1674 if (cursed_p(o_ptr)) 1720 1675 return INSCRIP_CURSED; 1721 else if (broken_p(o_ptr))1722 return INSCRIP_BROKEN;1723 1676 1724 1677 else if (o_ptr->to_a == 0 && o_ptr->to_h == 0 && o_ptr->to_d == 0) … … 1742 1695 if (cursed_p(o_ptr)) return (INSCRIP_CURSED); 1743 1696 1744 /* Broken items (all of them) */1745 if (broken_p(o_ptr)) return (INSCRIP_BROKEN);1746 1747 1697 /* Artifacts -- except cursed/broken ones */ 1748 1698 if (artifact_p(o_ptr)) return (INSCRIP_EXCELLENT); trunk/src/obj-util.c
r668 r678 1627 1627 if (object_known_p(o_ptr)) 1628 1628 { 1629 /* Broken items -- worthless */1630 if (broken_p(o_ptr)) return (0L);1631 1632 1629 /* Cursed items -- worthless */ 1633 1630 if (cursed_p(o_ptr)) return (0L); … … 1640 1637 else 1641 1638 { 1642 /* Hack -- Felt broken items */1643 if ((o_ptr->ident & (IDENT_SENSE)) && broken_p(o_ptr)) return (0L);1644 1645 1639 /* Hack -- Felt cursed items */ 1646 1640 if ((o_ptr->ident & (IDENT_SENSE)) && cursed_p(o_ptr)) return (0L); … … 1798 1792 1799 1793 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 1807 1794 /* Hack -- Require compatible inscriptions */ 1808 1795 if (o_ptr->note != j_ptr->note) … … 2006 1993 o_ptr->dd = k_ptr->dd; 2007 1994 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);2011 1995 2012 1996 /* Hack -- cursed items are always "cursed" */ trunk/src/object.h
r677 r678 34 34 INSCRIP_WORTHLESS = 2, /*!< Worthless item */ 35 35 INSCRIP_CURSED = 3, /*!< Cursed normal item */ 36 INSCRIP_ BROKEN = 4, /*!< Cursed ego-item*/36 INSCRIP_STRANGE = 4, /*!< Item that has mixed combat bonuses */ 37 37 INSCRIP_AVERAGE = 5, /*!< Item with no interesting features */ 38 38 INSCRIP_MAGICAL = 6, /*!< Item with combat bonuses */ … … 41 41 INSCRIP_UNCURSED = 9, /*!< Item previous cursed, now uncursed */ 42 42 INSCRIP_INDESTRUCTIBLE = 10, /*!< Artifact that was tried to be destroyed */ 43 INSCRIP_STRANGE = 12, /*!< Item that has mixed combat bonuses */44 43 45 44 INSCRIP_MAX /*!< Maximum number of pseudo-ID markers */ trunk/src/spells2.c
r675 r678 3440 3440 o_ptr->flags3 |= TR3_LIGHT_CURSE; 3441 3441 3442 /* Break it */3443 o_ptr->ident |= (IDENT_BROKEN);3444 3445 3442 /* Recalculate bonuses */ 3446 3443 p_ptr->update |= (PU_BONUS); … … 3504 3501 o_ptr->flags3 |= TR3_LIGHT_CURSE; 3505 3502 3506 /* Break it */3507 o_ptr->ident |= (IDENT_BROKEN);3508 3509 3503 /* Recalculate bonuses */ 3510 3504 p_ptr->update |= (PU_BONUS); … … 3530 3524 { 3531 3525 /* 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)) 3536 3529 { 3537 3530 cptr act = "magical"; … … 3567 3560 /* Window stuff */ 3568 3561 p_ptr->redraw |= (PR_INVEN | PR_EQUIP); 3569 3562 3570 3563 /* Enchant */ 3571 3564 enchant(o_ptr, rand_int(3) + 4, ENCH_TOHIT | ENCH_TODAM); trunk/src/tables.c
r677 r678 1405 1405 "worthless", 1406 1406 "cursed", 1407 " broken",1407 "strange", 1408 1408 "average", 1409 1409 "magical", … … 1411 1411 "special", 1412 1412 "uncursed", 1413 "indestructible", 1414 "strange" 1413 "indestructible" 1415 1414 }; 1416 1415
