Changeset 677

Show
Ignore:
Timestamp:
02/01/08 05:16:06 (7 months ago)
Author:
takkaria
Message:

Slightly experimental changes regarding pseudo-ID:

  • remove "good" pseudo-ID, replace with "magical"
  • add "strange" pseudo-ID, for when items have mixed blessings
  • stop automaetically cursing all bad weaponry
  • make weak pseudo-id notice the difference between magical and excellent
  • tweak squelch accordingly
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/obj-make.c

    r676 r677  
    532532                        o_ptr->to_d -= todam2; 
    533533                } 
    534  
    535                 /* Cursed (if "bad") */ 
    536                 if (o_ptr->to_h < 0 || o_ptr->to_d < 0) 
    537                     o_ptr->flags3 |= TR3_LIGHT_CURSE; 
    538534        } 
    539535 
     
    647643                        o_ptr->to_a -= toac2; 
    648644                } 
    649  
    650                 /* Cursed (if "bad") */ 
    651                 if (o_ptr->to_a < 0) 
    652                     o_ptr->flags3 |= TR3_LIGHT_CURSE; 
    653645        } 
    654646 
     
    15311523                        return (FALSE); 
    15321524                } 
    1533                  
     1525 
    15341526                /* Potions -- Potions of life, healing, *healing* are good, 
    15351527                 * restore mana for spell casters are good, 
     
    15371529                 * as is augmentation (acts as a potion of 'restoration' if all 
    15381530                 * stats are maximised). 
    1539                  *  
     1531                 * 
    15401532                 * XXX If we make too many useful items 'good' we may want to 
    15411533                 * consider limiting the total number of good drops to uniques 
     
    17021694} 
    17031695 
     1696 
     1697 
    17041698/* 
    17051699 * Return a "feeling" (or NULL) about an item.  Method 1 (Heavy). 
     
    17271721        else if (broken_p(o_ptr)) 
    17281722                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; 
    17341732} 
    17351733 
     
    17481746 
    17491747        /* Artifacts -- except cursed/broken ones */ 
    1750         if (artifact_p(o_ptr)) return (INSCRIP_GOOD); 
     1748        if (artifact_p(o_ptr)) return (INSCRIP_EXCELLENT); 
    17511749 
    17521750        /* 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); 
    17541752 
    17551753        /* 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); 
    17601756 
    17611757        /* No feeling */ 
  • trunk/src/object.h

    r676 r677  
    3636        INSCRIP_BROKEN = 4,          /*!< Cursed ego-item */ 
    3737        INSCRIP_AVERAGE = 5,         /*!< Item with no interesting features */ 
    38         INSCRIP_GOOD = 6,            /*!< Item with some combat bonuses */ 
     38        INSCRIP_MAGICAL = 6,         /*!< Item with combat bonuses */ 
    3939        INSCRIP_EXCELLENT = 7,       /*!< Ego-item */ 
    4040        INSCRIP_SPECIAL = 8,         /*!< Artifact */ 
    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 */ 
    4344 
    4445        INSCRIP_MAX                  /*!< Maximum number of pseudo-ID markers */ 
    4546} obj_pseudo_t; 
    46  
    4747 
    4848 
  • trunk/src/squelch.c

    r676 r677  
    110110{ 
    111111        SQUELCH_NONE, 
    112         SQUELCH_CURSED, 
     112        SQUELCH_BAD, 
    113113        SQUELCH_AVERAGE, 
    114         SQUELCH_GOOD_STRONG
    115         SQUELCH_GOOD_WEAK
     114        SQUELCH_GOOD
     115        SQUELCH_EXCELLENT
    116116        SQUELCH_ALL, 
    117117 
     
    124124static const char *quality_names[SQUELCH_MAX] = 
    125125{ 
    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 */ 
    132132}; 
    133133 
     
    388388        switch (squelch_level[num]) 
    389389        { 
    390                 case SQUELCH_CURSED: 
     390                case SQUELCH_BAD: 
    391391                { 
    392392                        if ((feel == INSCRIP_BROKEN) || (feel == INSCRIP_TERRIBLE) || 
     
    395395                                return TRUE; 
    396396                        } 
     397 
     398                        if (fullid && 
     399                                 (o_ptr->to_a <= 0 && o_ptr->to_h <= 0 && o_ptr->to_d <= 0)) 
     400                                return TRUE; 
    397401 
    398402                        break; 
     
    411415                } 
    412416 
    413                 case SQUELCH_GOOD_WEAK
     417                case SQUELCH_GOOD
    414418                { 
    415419                        if ((feel == INSCRIP_BROKEN) || (feel == INSCRIP_TERRIBLE) || 
    416420                            (feel == INSCRIP_WORTHLESS) || (feel == INSCRIP_CURSED) || 
    417                             (feel == INSCRIP_AVERAGE) || (feel == INSCRIP_GOOD)
     421                            (feel == INSCRIP_AVERAGE)
    418422                        { 
    419423                                return TRUE; 
    420424                        } 
    421425 
     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 
    422430                        break; 
    423431                } 
    424432 
    425                 case SQUELCH_GOOD_STRONG
     433                case SQUELCH_EXCELLENT
    426434                { 
    427435                        if ((feel == INSCRIP_BROKEN) || (feel == INSCRIP_TERRIBLE) || 
    428436                            (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)) 
    432438                        { 
    433439                                return TRUE; 
    434440                        } 
    435  
    436                         break; 
    437441                } 
    438442 
     
    449453 
    450454 
    451 /*  
     455/* 
    452456 * Returns TRUE if an item should be hidden due to the player's 
    453457 * current settings. 
     
    619623        menu.count = SQUELCH_MAX; 
    620624        if (oid == TYPE_JEWELRY) 
    621                 menu.count = area.page_rows = SQUELCH_CURSED + 1; 
     625                menu.count = area.page_rows = SQUELCH_BAD + 1; 
    622626 
    623627        menu_init2(&menu, find_menu_skin(MN_SCROLL), &menu_f, &area); 
  • trunk/src/tables.c

    r676 r677  
    14071407        "broken", 
    14081408        "average", 
    1409         "good", 
     1409        "magical", 
    14101410        "excellent", 
    14111411        "special", 
    14121412        "uncursed", 
    1413         "indestructible" 
     1413        "indestructible", 
     1414        "strange" 
    14141415}; 
    14151416