Changeset 677
- Timestamp:
- 02/01/08 05:16:06 (7 months ago)
- Files:
-
- trunk/src/obj-make.c (modified) (7 diffs)
- trunk/src/object.h (modified) (1 diff)
- trunk/src/squelch.c (modified) (7 diffs)
- trunk/src/tables.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/obj-make.c
r676 r677 532 532 o_ptr->to_d -= todam2; 533 533 } 534 535 /* Cursed (if "bad") */536 if (o_ptr->to_h < 0 || o_ptr->to_d < 0)537 o_ptr->flags3 |= TR3_LIGHT_CURSE;538 534 } 539 535 … … 647 643 o_ptr->to_a -= toac2; 648 644 } 649 650 /* Cursed (if "bad") */651 if (o_ptr->to_a < 0)652 o_ptr->flags3 |= TR3_LIGHT_CURSE;653 645 } 654 646 … … 1531 1523 return (FALSE); 1532 1524 } 1533 1525 1534 1526 /* Potions -- Potions of life, healing, *healing* are good, 1535 1527 * restore mana for spell casters are good, … … 1537 1529 * as is augmentation (acts as a potion of 'restoration' if all 1538 1530 * stats are maximised). 1539 * 1531 * 1540 1532 * XXX If we make too many useful items 'good' we may want to 1541 1533 * consider limiting the total number of good drops to uniques … … 1702 1694 } 1703 1695 1696 1697 1704 1698 /* 1705 1699 * Return a "feeling" (or NULL) about an item. Method 1 (Heavy). … … 1727 1721 else if (broken_p(o_ptr)) 1728 1722 return INSCRIP_BROKEN; 1729 else if (o_ptr->to_a > 0 || (o_ptr->to_h + o_ptr->to_d > 0)) 1730 return INSCRIP_GOOD; 1731 1732 /* Default to "average" */ 1733 return (INSCRIP_AVERAGE); 1723 1724 else if (o_ptr->to_a == 0 && o_ptr->to_h == 0 && o_ptr->to_d == 0) 1725 return INSCRIP_AVERAGE; 1726 else if (o_ptr->to_a >= 0 && o_ptr->to_h >= 0 && o_ptr->to_d >= 0) 1727 return INSCRIP_MAGICAL; 1728 else if (o_ptr->to_a <= 0 && o_ptr->to_h <= 0 && o_ptr->to_d <= 0) 1729 return INSCRIP_MAGICAL; 1730 1731 return INSCRIP_STRANGE; 1734 1732 } 1735 1733 … … 1748 1746 1749 1747 /* Artifacts -- except cursed/broken ones */ 1750 if (artifact_p(o_ptr)) return (INSCRIP_ GOOD);1748 if (artifact_p(o_ptr)) return (INSCRIP_EXCELLENT); 1751 1749 1752 1750 /* Ego-Items -- except cursed/broken ones */ 1753 if (ego_item_p(o_ptr)) return (INSCRIP_ GOOD);1751 if (ego_item_p(o_ptr)) return (INSCRIP_EXCELLENT); 1754 1752 1755 1753 /* Good armor bonus */ 1756 if (o_ptr->to_a > 0) return (INSCRIP_GOOD); 1757 1758 /* Good weapon bonuses */ 1759 if (o_ptr->to_h + o_ptr->to_d > 0) return (INSCRIP_GOOD); 1754 if (o_ptr->to_a > 0 || o_ptr->to_h != 0 || o_ptr->to_d > 0) 1755 return (INSCRIP_MAGICAL); 1760 1756 1761 1757 /* No feeling */ trunk/src/object.h
r676 r677 36 36 INSCRIP_BROKEN = 4, /*!< Cursed ego-item */ 37 37 INSCRIP_AVERAGE = 5, /*!< Item with no interesting features */ 38 INSCRIP_ GOOD = 6, /*!< Item with somecombat bonuses */38 INSCRIP_MAGICAL = 6, /*!< Item with combat bonuses */ 39 39 INSCRIP_EXCELLENT = 7, /*!< Ego-item */ 40 40 INSCRIP_SPECIAL = 8, /*!< Artifact */ 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 */ 43 44 44 45 INSCRIP_MAX /*!< Maximum number of pseudo-ID markers */ 45 46 } obj_pseudo_t; 46 47 47 48 48 trunk/src/squelch.c
r676 r677 110 110 { 111 111 SQUELCH_NONE, 112 SQUELCH_ CURSED,112 SQUELCH_BAD, 113 113 SQUELCH_AVERAGE, 114 SQUELCH_GOOD _STRONG,115 SQUELCH_ GOOD_WEAK,114 SQUELCH_GOOD, 115 SQUELCH_EXCELLENT, 116 116 SQUELCH_ALL, 117 117 … … 124 124 static const char *quality_names[SQUELCH_MAX] = 125 125 { 126 "none", /* SQUELCH_NONE */127 " cursed", /* SQUELCH_CURSED */128 "average", /* SQUELCH_AVERAGE */129 "good (strong pseudo-ID)", /* SQUELCH_GOOD_STRONG*/130 " good (weak pseudo-ID)", /* SQUELCH_GOOD_WEAK*/131 "everything except artifacts", /* SQUELCH_ALL */126 "none", /* SQUELCH_NONE */ 127 "bad", /* SQUELCH_BAD */ 128 "average", /* SQUELCH_AVERAGE */ 129 "good", /* SQUELCH_GOOD */ 130 "excellent", /* SQUELCH_EXCELLENT */ 131 "everything except artifacts", /* SQUELCH_ALL */ 132 132 }; 133 133 … … 388 388 switch (squelch_level[num]) 389 389 { 390 case SQUELCH_ CURSED:390 case SQUELCH_BAD: 391 391 { 392 392 if ((feel == INSCRIP_BROKEN) || (feel == INSCRIP_TERRIBLE) || … … 395 395 return TRUE; 396 396 } 397 398 if (fullid && 399 (o_ptr->to_a <= 0 && o_ptr->to_h <= 0 && o_ptr->to_d <= 0)) 400 return TRUE; 397 401 398 402 break; … … 411 415 } 412 416 413 case SQUELCH_GOOD _WEAK:417 case SQUELCH_GOOD: 414 418 { 415 419 if ((feel == INSCRIP_BROKEN) || (feel == INSCRIP_TERRIBLE) || 416 420 (feel == INSCRIP_WORTHLESS) || (feel == INSCRIP_CURSED) || 417 (feel == INSCRIP_AVERAGE) || (feel == INSCRIP_GOOD))421 (feel == INSCRIP_AVERAGE)) 418 422 { 419 423 return TRUE; 420 424 } 421 425 426 if (fullid && !o_ptr->name2 && !o_ptr->name1 && 427 (o_ptr->to_a >= 0 && o_ptr->to_h >= 0 && o_ptr->to_d >= 0)) 428 return TRUE; 429 422 430 break; 423 431 } 424 432 425 case SQUELCH_ GOOD_STRONG:433 case SQUELCH_EXCELLENT: 426 434 { 427 435 if ((feel == INSCRIP_BROKEN) || (feel == INSCRIP_TERRIBLE) || 428 436 (feel == INSCRIP_WORTHLESS) || (feel == INSCRIP_CURSED) || 429 (feel == INSCRIP_AVERAGE) || 430 ((feel == INSCRIP_GOOD) && 431 ((fullid) || (cp_ptr->flags & CF_PSEUDO_ID_HEAVY)))) 437 (feel == INSCRIP_AVERAGE) || (feel == INSCRIP_EXCELLENT)) 432 438 { 433 439 return TRUE; 434 440 } 435 436 break;437 441 } 438 442 … … 449 453 450 454 451 /* 455 /* 452 456 * Returns TRUE if an item should be hidden due to the player's 453 457 * current settings. … … 619 623 menu.count = SQUELCH_MAX; 620 624 if (oid == TYPE_JEWELRY) 621 menu.count = area.page_rows = SQUELCH_ CURSED + 1;625 menu.count = area.page_rows = SQUELCH_BAD + 1; 622 626 623 627 menu_init2(&menu, find_menu_skin(MN_SCROLL), &menu_f, &area); trunk/src/tables.c
r676 r677 1407 1407 "broken", 1408 1408 "average", 1409 " good",1409 "magical", 1410 1410 "excellent", 1411 1411 "special", 1412 1412 "uncursed", 1413 "indestructible" 1413 "indestructible", 1414 "strange" 1414 1415 }; 1415 1416
