Changeset 907 for trunk/src

Show
Ignore:
Timestamp:
05/16/08 21:11:36 (7 months ago)
Author:
takkaria
Message:

This is the big object list reordering. Savefile compat broken for sanity's sake. Graphics also broken, but will be fixed before release -- don't worry!

First off, this is an attempt to make the item list have a decent order, such that similar items are grouped together. Second, it's an attempt to make the object list more interesting; to remove needless duplication, purely bad items, and to add more variety. This involves a lot of things, which are summarised below. This is not a full changelog.

  • The mushrooms have been redesigned mostly from scratch. One mushroom (Sprinting) doesn't have an implementation right now.
  • Per suggestions on r.g.r.a, healing potions now have significant nutritional content.
  • Use enums in tvalsval.h rather than #defines.

#312:

  • Make scrolls appear in piles sometimes.

#313:

  • Changes here have been made already; the three temporary new mentioned have not been added but will be.

#316:

  • Tone down Rods of Fire Bolts a little.
  • Make rods start at dlev8 at the earliest.
  • Object/Treasure detection merged some time ago now.
  • Don't remove staff of CLW or steal anything from OAngband.

#320: (Rings)

  • Sustain rings combined
  • Bad rings removed
  • Give elemental rings brands, though currently non-functional
  • Add a whole bunch of rings based mostly on suggestions from the forum and r.g.r.a

#321: (Amulets)

  • DOOM removed
  • Adornment made rarer
  • Resistance kept
  • Amulet of Inertia kept (FA, but -3 speed)

#350: (Scrolls)

  • ?Deep descent added.
  • Redundant scrolls can stay; not too much of an issue.

#445: (Combat gear)

  • Body armour changes:
    • There are now only 17 types of body armour.
    • Body armour ACs are even-numbered until you reach the very top-end.
  • Footwear changes:
    • Footwear now goes: leather sandals -> boots -> iron shod -> steel shod -> mithril shod.
    • Add some Ethereal Slippers. (weightless, no AC, ignore elements)
  • Handwear changes:
    • Gauntlets now base AC of 3
    • Mithril Gauntlets with IGNORE_ACID, base AC 5
    • Cesti -> Caestus, now base AC 2 but +3 to-dam (brass knuckles)
    • Add Alchemist's Gloves, which ignore the elements and have only magical AC
    • Add commented-out Mining Gloves
  • Shield changes:
    • Shields now go: Wicker -> Small Metal -> Leather -> Large Metal -> Mithril
    • ACs of the above are 2, 4, 6, 8, 10
    • Weights adjusted so they go from 3lbs to 15lbs.
  • Cloak changes:
    • Shadow Cloak -> Elven Cloak, add stealth.
    • Add Ethereal Cloak, ignores elements and weighs nothing (but also 0 AC).
    • Add Fur Cloak, base AC of 3 but heavy.
  • Weapon changes:
    • Remove Gnomish Shovel, Dwarven Shovel, Pick, Dwarven Pick.
    • Remove the Sabre; tweak artifacts to use rapier.
    • Remove broken daggers/swords (and Narsil).
    • Return the Great in Two-Handed "Great" Flail. Rename Two-Handed to Zweihander. (Moria)
    • Merge short + small swords. Remove damage duplication between swords.
    • Add a Great Hammer (8d1), and a Maul (4d4).
    • Make Tridents 1d10.

#540: (Tweak the Elven rings again)

  • give Narya back resist fear
  • give Nenya sustain con
  • remove sust str/wis from Vilya but add sust con. (based on a suggestion by Timo)
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/defines.h

    r904 r907  
    4646#define VERSION_MAJOR   3 
    4747#define VERSION_MINOR   0 
    48 #define VERSION_PATCH   13 
     48#define VERSION_PATCH   14 
    4949#define VERSION_EXTRA   0 
    5050 
     
    5454#define OLD_VERSION_MAJOR       3 
    5555#define OLD_VERSION_MINOR       0 
    56 #define OLD_VERSION_PATCH       1 
     56#define OLD_VERSION_PATCH       14 
    5757 
    5858 
  • trunk/src/load.c

    r889 r907  
    191191 
    192192 
    193 /* A wonderful savefile conversion function. Temporary only. */ 
    194 void convert_kind(byte *tval, byte *sval) 
    195 { 
    196         switch (*tval) 
    197         { 
    198                 case TV_GOLD: 
    199                 { 
    200                         if (*sval > SV_GOLD_MAX) 
    201                                 *sval = SV_GOLD_MAX; 
    202                         return; 
    203                 } 
    204  
    205                 case TV_FOOD: 
    206                 { 
    207                         /* Cure Paranoia + Cure Confusion -> Clear Mind */ 
    208                         if (*sval == 15) *sval = 16; 
    209  
    210                         /* Sickness -> Weakness */ 
    211                         if (*sval == 7) *sval = 6; 
    212  
    213                         /* LoseWis -> Stupidity */ 
    214                         if (*sval == 9) *sval = 8; 
    215  
    216                         /* Paralysis -> Poison */ 
    217                         if (*sval == 5) *sval = 0; 
    218  
    219                         /* Disease -> Unhealth */ 
    220                         if (*sval == 11) *sval = 10; 
    221  
    222                         break; 
    223                 } 
    224  
    225                 /* Some staffs removed, replace with rods */ 
    226                 case TV_STAFF: 
    227                 { 
    228                         int new_sval = *sval; 
    229  
    230                         /* Treasure location */ 
    231                         if (*sval == 10) new_sval = 28; 
    232  
    233                         /* Object location */ 
    234                         if (*sval == 11) new_sval = 29; 
    235  
    236                         /* Door/stair location */ 
    237                         if (*sval == 13) new_sval = 1; 
    238  
    239                         /* Probing */ 
    240                         if (*sval == 23) new_sval = 7; 
    241  
    242                         if (new_sval != *sval) 
    243                         { 
    244                                 *tval = TV_ROD; 
    245                                 *sval = new_sval; 
    246                         } 
    247                 } 
    248         } 
    249 } 
    250  
    251193 
    252194/* 
     
    410352        rd_u16b(&o_ptr->origin_xtra); 
    411353 
    412         /* Old flags */ 
    413         if (older_than(3, 0, 12)) 
    414         { 
    415                 strip_bytes(8); 
    416         } 
    417         else 
    418         { 
    419                 rd_u32b(&o_ptr->flags1); 
    420                 rd_u32b(&o_ptr->flags2); 
    421                 rd_u32b(&o_ptr->flags3); 
    422         } 
     354        rd_u32b(&o_ptr->flags1); 
     355        rd_u32b(&o_ptr->flags2); 
     356        rd_u32b(&o_ptr->flags3); 
    423357 
    424358        /* Monster holding object */ 
    425359        rd_s16b(&o_ptr->held_m_idx); 
    426360 
    427         /* (Old) special powers */ 
    428         if (older_than(3, 0, 12)) 
    429         { 
    430                 byte xtra1; 
    431                 byte xtra2; 
    432                 ego_item_type *e_ptr = NULL; 
    433  
    434                 if (o_ptr->name2) e_ptr = &e_info[o_ptr->name2]; 
    435  
    436                 rd_byte(&xtra1); 
    437                 rd_byte(&xtra2); 
    438  
    439                 /* Extra powers */ 
    440                 switch (xtra1) 
    441                 { 
    442                         case OBJECT_XTRA_TYPE_SUSTAIN: 
    443                         { 
    444                                 o_ptr->flags2 |= ego_sustains[xtra2]; 
    445                                 break; 
    446                         } 
    447  
    448                         case OBJECT_XTRA_TYPE_RESIST: 
    449                         { 
    450                                 o_ptr->flags2 |= ego_resists[xtra2]; 
    451                                 break; 
    452                         } 
    453  
    454                         case OBJECT_XTRA_TYPE_POWER: 
    455                         { 
    456                                 o_ptr->flags3 |= ego_powers[xtra2]; 
    457                                 break; 
    458                         } 
    459                 } 
    460         } 
    461  
    462         /* Inscription */ 
    463361        rd_string(buf, sizeof(buf)); 
    464362 
     
    467365 
    468366 
    469         /* Convert tval/sval */ 
    470         convert_kind(&o_ptr->tval, &o_ptr->sval); 
    471  
    472367        /* Lookup item kind */ 
    473368        o_ptr->k_idx = lookup_kind(o_ptr->tval, o_ptr->sval); 
    474369 
    475         switch (o_ptr->k_idx) 
    476         { 
    477                 case 158: 
    478                         o_ptr->k_idx = 157; 
    479                         break; 
    480  
    481                 case 159: 
    482                 case 160: 
    483                         o_ptr->k_idx = 156; 
    484                         break; 
    485         } 
    486  
    487370        k_ptr = &k_info[o_ptr->k_idx]; 
    488371 
     
    495378 
    496379 
    497  
    498         /* 
    499          * Ensure that rods and wands get the appropriate pvals, 
    500          * and transfer rod charges to timeout. 
    501          * this test should only be passed once, the first 
    502          * time the file is open with ROD/WAND stacking code 
    503          * It could change the timeout improperly if the PVAL (time a rod 
    504          * takes to charge after use) is changed in object.txt. 
    505          * But this is nothing a little resting won't solve. 
    506          * 
    507          * -JG- 
    508          */ 
    509         if ((o_ptr->tval == TV_ROD) && 
    510             (o_ptr->pval - (k_ptr->pval * o_ptr->number) != 0)) 
    511         { 
    512                 o_ptr->timeout = o_ptr->pval; 
    513                 o_ptr->pval = k_ptr->pval * o_ptr->number; 
    514         } 
    515  
    516         if (older_than(3, 0, 4)) 
    517         { 
    518                 /* Recalculate charges of stacked wands and staves */ 
    519                 if ((o_ptr->tval == TV_WAND) || (o_ptr->tval == TV_STAFF)) 
    520                 { 
    521                         o_ptr->pval = o_ptr->pval * o_ptr->number; 
    522                 } 
    523         } 
    524380 
    525381        /* Repair non "wearable" items */ 
     
    642498                        o_ptr->ds = 0; 
    643499                } 
    644         } 
    645  
    646         if (older_than(3, 0, 9) && 
    647             o_ptr->tval == TV_LITE && 
    648             !artifact_p(o_ptr) && 
    649             !ego_item_p(o_ptr) && 
    650             o_ptr->pval) 
    651         { 
    652                 o_ptr->timeout = o_ptr->pval; 
    653                 o_ptr->pval = 0; 
    654500        } 
    655501 
     
    712558        rd_byte(&l_ptr->ignore); 
    713559 
    714         if (older_than(3, 0, 12)) strip_bytes(2); 
    715  
    716560        /* Count drops */ 
    717561        rd_byte(&l_ptr->drop_gold); 
     
    799643                        note("Error reading item"); 
    800644                        return (-1); 
    801                 } 
    802  
    803                 /* Pre-3.0.2 objects in store inventories need to be marked */ 
    804                 if (older_than(3, 0, 2)) 
    805                 { 
    806                         if (n != STORE_HOME) i_ptr->ident |= IDENT_STORE; 
    807645                } 
    808646 
     
    926764        } 
    927765 
    928         /* Load savefiles pre-reorganisation */ 
    929         if (older_than(3, 0, 8)) 
    930         { 
    931                 /*  
    932                  * Slot Old layout:     New layout: 
    933                  * 0    xxx                     maximise 
    934                  * 1    xxx                     randarts 
    935                  * 2    maximise        xxx 
    936                  * 3    preserve        ironman 
    937                  * 4    ironman         no_stores 
    938                  * 5    no_stores       no_artifacts 
    939                  * 6    no_artifats     no_stacking 
    940                  * 7    randarts        no_preserve 
    941                  * 8    no_stacking     no_stairs 
    942                  */ 
    943  
    944                 /* We #define this so it's obvious what we're doing */ 
    945                 #define OLD_OPT(n)      op_ptr->opt[n] 
    946  
    947                 bool old_birth[9]; 
    948                 for (i = 0; i <= 8; i++) 
    949                         old_birth[i] = OLD_OPT(OPT_BIRTH + i); 
    950  
    951                 if (arg_fiddle) note("Loading pre-3.0.7 options..."); 
    952  
    953                 birth_maximize = adult_maximize = old_birth[2]; 
    954                 birth_no_preserve = adult_no_preserve = !old_birth[3]; 
    955                 birth_ironman = adult_ironman = old_birth[4]; 
    956                 birth_no_stores = adult_no_stores = old_birth[5]; 
    957                 birth_no_artifacts = adult_no_artifacts = old_birth[6]; 
    958                 birth_randarts = adult_randarts = old_birth[7]; 
    959                 birth_no_stacking = adult_no_stacking = old_birth[8]; 
    960  
    961                 birth_no_stairs = adult_no_stairs = !OLD_OPT(41); 
    962                 birth_ai_sound = adult_ai_sound = OLD_OPT(42); 
    963                 birth_ai_smell = adult_ai_smell = OLD_OPT(43); 
    964                 birth_ai_packs = adult_ai_packs = OLD_OPT(73); 
    965                 birth_ai_learn = adult_ai_learn = OLD_OPT(46); 
    966                 birth_ai_cheat = adult_ai_cheat = OLD_OPT(47); 
    967                 birth_ai_smart = adult_ai_smart = OLD_OPT(72); 
    968  
    969                 #undef OLD_OPT 
    970         } 
    971  
    972766        /*** Window Options ***/ 
    973767 
     
    1073867        byte tmp8u = 24; 
    1074868 
    1075         /* Handle old versions, and Pete Mack's patch */ 
    1076         if (older_than(3, 0, 6)) 
    1077                 return 0; 
    1078  
    1079  
    1080869        /* Read how many squelch bytes we have */ 
    1081         if (!older_than(3, 0, 9)) 
    1082                 rd_byte(&tmp8u); 
     870        rd_byte(&tmp8u); 
    1083871 
    1084872        /* Check against current number */ 
     
    1142930        int i; 
    1143931 
     932        byte num; 
     933 
    1144934        byte tmp8u; 
    1145935        u16b tmp16u; 
     
    12331023 
    12341024        /* Read the flags */ 
    1235         if (older_than(3, 0, 7)) 
    1236         { 
    1237                 strip_bytes(2); /* Old "rest" */ 
    1238                 rd_s16b(&p_ptr->timed[TMD_BLIND]); 
    1239                 rd_s16b(&p_ptr->timed[TMD_PARALYZED]); 
    1240                 rd_s16b(&p_ptr->timed[TMD_CONFUSED]); 
    1241                 rd_s16b(&p_ptr->food); 
    1242                 strip_bytes(4); /* Old "food_digested" / "protection" */ 
    1243                 rd_s16b(&p_ptr->energy); 
    1244                 rd_s16b(&p_ptr->timed[TMD_FAST]); 
    1245                 rd_s16b(&p_ptr->timed[TMD_SLOW]); 
    1246                 rd_s16b(&p_ptr->timed[TMD_AFRAID]); 
    1247                 rd_s16b(&p_ptr->timed[TMD_CUT]); 
    1248                 rd_s16b(&p_ptr->timed[TMD_STUN]); 
    1249                 rd_s16b(&p_ptr->timed[TMD_POISONED]); 
    1250                 rd_s16b(&p_ptr->timed[TMD_IMAGE]); 
    1251                 rd_s16b(&p_ptr->timed[TMD_PROTEVIL]); 
    1252                 rd_s16b(&p_ptr->timed[TMD_INVULN]); 
    1253                 rd_s16b(&p_ptr->timed[TMD_HERO]); 
    1254                 rd_s16b(&p_ptr->timed[TMD_SHERO]); 
    1255                 rd_s16b(&p_ptr->timed[TMD_SHIELD]); 
    1256                 rd_s16b(&p_ptr->timed[TMD_BLESSED]); 
    1257                 rd_s16b(&p_ptr->timed[TMD_SINVIS]); 
    1258                 rd_s16b(&p_ptr->word_recall); 
    1259                 rd_s16b(&p_ptr->see_infra); 
    1260                 rd_s16b(&p_ptr->timed[TMD_SINFRA]); 
    1261                 rd_s16b(&p_ptr->timed[TMD_OPP_FIRE]); 
    1262                 rd_s16b(&p_ptr->timed[TMD_OPP_COLD]); 
    1263                 rd_s16b(&p_ptr->timed[TMD_OPP_ACID]); 
    1264                 rd_s16b(&p_ptr->timed[TMD_OPP_ELEC]); 
    1265                 rd_s16b(&p_ptr->timed[TMD_OPP_POIS]); 
    1266  
    1267                 rd_byte(&p_ptr->confusing); 
    1268                 rd_byte(&tmp8u);        /* oops */ 
    1269                 rd_byte(&tmp8u);        /* oops */ 
    1270                 rd_byte(&tmp8u);        /* oops */ 
    1271                 rd_byte(&p_ptr->searching); 
    1272                 rd_byte(&tmp8u);        /* oops */ 
    1273                 rd_byte(&tmp8u);        /* oops */ 
    1274                 rd_byte(&tmp8u);        /* oops */ 
     1025        rd_s16b(&p_ptr->food); 
     1026        rd_s16b(&p_ptr->energy); 
     1027        rd_s16b(&p_ptr->word_recall); 
     1028        rd_s16b(&p_ptr->see_infra); 
     1029        rd_byte(&p_ptr->confusing); 
     1030        rd_byte(&p_ptr->searching); 
     1031 
     1032        /* Find the number of timed effects */ 
     1033        rd_byte(&num); 
     1034 
     1035        if (num <= TMD_MAX) 
     1036        { 
     1037                /* Read all the effects */ 
     1038                for (i = 0; i < num; i++) 
     1039                        rd_s16b(&p_ptr->timed[i]); 
     1040 
     1041                /* Initialize any entries not read */ 
     1042                if (num < TMD_MAX) 
     1043                        C_WIPE(p_ptr->timed + num, TMD_MAX - num, s16b); 
    12751044        } 
    12761045        else 
    12771046        { 
    1278                 byte num; 
    1279                 int i; 
    1280  
    1281                 rd_s16b(&p_ptr->food); 
    1282                 rd_s16b(&p_ptr->energy); 
    1283                 rd_s16b(&p_ptr->word_recall); 
    1284                 rd_s16b(&p_ptr->see_infra); 
    1285                 rd_byte(&p_ptr->confusing); 
    1286                 rd_byte(&p_ptr->searching); 
    1287  
    1288                 /* Find the number of timed effects */ 
    1289                 rd_byte(&num); 
    1290  
    1291                 if (num <= TMD_MAX) 
    1292                 { 
    1293                         /* Read all the effects */ 
    1294                         for (i = 0; i < num; i++) 
    1295                                 rd_s16b(&p_ptr->timed[i]); 
    1296  
    1297                         /* Initialize any entries not read */ 
    1298                         if (num < TMD_MAX) 
    1299                                 C_WIPE(p_ptr->timed + num, TMD_MAX - num, s16b); 
    1300                 } 
    1301                 else 
    1302                 { 
    1303                         /* Probably in trouble anyway */ 
    1304                         for (i = 0; i < TMD_MAX; i++) 
    1305                                 rd_s16b(&p_ptr->timed[i]); 
    1306  
    1307                         /* Discard unused entries */ 
    1308                         strip_bytes(2 * (num - TMD_MAX)); 
    1309                         note("Discarded unsupported timed effects"); 
    1310                 } 
     1047                /* Probably in trouble anyway */ 
     1048                for (i = 0; i < TMD_MAX; i++) 
     1049                        rd_s16b(&p_ptr->timed[i]); 
     1050 
     1051                /* Discard unused entries */ 
     1052                strip_bytes(2 * (num - TMD_MAX)); 
     1053                note("Discarded unsupported timed effects"); 
    13111054        } 
    13121055 
     
    13901133 
    13911134 
    1392         if (older_than(3, 0, 11)) 
     1135        if (older_than(3, 0, 14)) 
    13931136        { 
    13941137                /* 
     
    17301473 
    17311474        /* Load the dungeon data */ 
    1732         if (!older_than(3, 0, 11)) for (x = y = 0; y < DUNGEON_HGT; ) 
     1475        for (x = y = 0; y < DUNGEON_HGT; ) 
    17331476        { 
    17341477                /* Grab RLE info */ 
     
    20611804                k_ptr->squelch = (tmp8u & 0x04) ? TRUE : FALSE; 
    20621805                k_ptr->everseen = (tmp8u & 0x08) ? TRUE : FALSE; 
    2063  
    2064                 /* Read the (old) squelch bit */ 
    2065                 if (older_than(3, 0, 9) && !older_than(3, 0, 6)) 
    2066                 { 
    2067                         rd_byte(&tmp8u); 
    2068  
    2069                         if (tmp8u == 3) 
    2070                                 k_ptr->squelch = TRUE; 
    2071                         else 
    2072                                 k_ptr->squelch = FALSE; 
    2073                 } 
    20741806        } 
    20751807 
     
    23342066                        err = -1; 
    23352067                        what = "Savefile is too old"; 
     2068                        goto end; 
    23362069                } 
    23372070                else if (!older_than(VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH + 1)) 
     
    23852118        } 
    23862119 
    2387  
     2120end: 
    23882121        /* Message */ 
    23892122        msg_format("Error (%s) reading %d.%d.%d savefile.", 
  • trunk/src/obj-info.c

    r887 r907  
    9797        { TR2_IM_FIRE, "fire" }, 
    9898        { TR2_IM_COLD, "cold" }, 
     99}; 
     100 
     101static const flag_type f2_vuln[] = 
     102{ 
     103        { TR2_VULN_ACID, "acid" }, 
     104        { TR2_VULN_ELEC, "electricity" }, 
     105        { TR2_VULN_FIRE, "fire" }, 
     106        { TR2_VULN_COLD, "cold" }, 
    99107}; 
    100108 
     
    139147static const flag_type f3_misc[] = 
    140148{ 
    141         { TR3_BLESSED,     "Blessed by the gods" }, 
     149        { TR3_BLESSED, "Blessed by the gods" }, 
    142150        { TR3_SLOW_DIGEST, "Slows your metabolism" }, 
    143         { TR3_FEATHER,     "Feather Falling" }, 
    144         { TR3_REGEN,       "Speeds regeneration" }, 
    145         { TR3_FREE_ACT,    "Prevents paralysis" }, 
    146         { TR3_HOLD_LIFE,   "Stops experience drain" }, 
    147         { TR3_TELEPATHY,   "Grants telepathy" }, 
    148         { TR3_SEE_INVIS,   "Grants the ability to see invisible things" }, 
    149         { TR3_AGGRAVATE,   "Aggravates creatures nearby" }, 
    150         { TR3_DRAIN_EXP,   "Drains experience" }, 
    151         { TR3_TELEPORT,    "Induces random teleportation" }, 
     151        { TR3_IMPAIR_HP, "Impairs hitpoint recovery" }, 
     152        { TR3_IMPAIR_MANA, "Impairs mana recovery" }, 
     153        { TR3_AFRAID, "Makes you unable to hit foes" }, 
     154        { TR3_FEATHER, "Feather Falling" }, 
     155        { TR3_REGEN, "Speeds regeneration" }, 
     156        { TR3_FREE_ACT, "Prevents paralysis" }, 
     157        { TR3_HOLD_LIFE, "Stops experience drain" }, 
     158        { TR3_TELEPATHY, "Grants telepathy" }, 
     159        { TR3_SEE_INVIS, "Grants the ability to see invisible things" }, 
     160        { TR3_AGGRAVATE, "Aggravates creatures nearby" }, 
     161        { TR3_DRAIN_EXP, "Drains experience" }, 
     162        { TR3_TELEPORT, "Induces random teleportation" }, 
    152163}; 
    153164 
     
    199210        { 
    200211                text_out("Provides resistance to "); 
     212                info_out_list(descs, count); 
     213                prev = TRUE; 
     214        } 
     215 
     216        /* Resistances */ 
     217        count = info_collect(f2_vuln, N_ELEMENTS(f2_vuln), f2, descs); 
     218        if (count) 
     219        { 
     220                text_out("Makes you vulnerable to "); 
    201221                info_out_list(descs, count); 
    202222                prev = TRUE; 
  • trunk/src/obj-make.c

    r900 r907  
    681681                        { 
    682682                                /* Strength, Constitution, Dexterity, Intelligence */ 
    683                                 case SV_RING_STR
    684                                 case SV_RING_CON
    685                                 case SV_RING_DEX
    686                                 case SV_RING_INT
     683                                case SV_RING_STRENGTH
     684                                case SV_RING_CONSTITUTION
     685                                case SV_RING_DEXTERITY
     686                                case SV_RING_INTELLIGENCE
    687687                                { 
    688688                                        /* Stat bonus */ 
     
    736736                                } 
    737737 
     738                                /* Light, Dark */ 
     739                                case SV_RING_LIGHT: 
     740                                case SV_RING_DARK: 
     741                                { 
     742                                        /* Searching bonus */ 
     743                                        o_ptr->pval = 1 + m_bonus(5, level); 
     744 
     745                                        break; 
     746                                } 
     747 
    738748                                /* Flames, Acid, Ice, Lightning */ 
    739749                                case SV_RING_FLAMES: 
     
    744754                                        /* Bonus to armor class */ 
    745755                                        o_ptr->to_a = 5 + randint1(5) + m_bonus(10, level); 
     756 
    746757                                        break; 
    747758                                } 
     
    799810                                                o_ptr->to_d = -o_ptr->to_d; 
    800811                                        } 
     812 
     813                                        break; 
     814                                } 
     815 
     816                                case SV_RING_RECKLESS_ATTACKS: 
     817                                { 
     818                                        int amt = rand_range(3, 5); 
     819 
     820                                        o_ptr->to_d = o_ptr->to_h = amt; 
     821                                        o_ptr->to_a = -4 * amt; 
     822 
     823                                        break; 
     824                                } 
     825 
     826                                case SV_RING_OF_THE_MOUSE: 
     827                                { 
     828                                        int amt = randint1(4); 
     829 
     830                                        /* Dex bonus, dam penalty */ 
     831                                        o_ptr->pval = amt; 
     832                                        o_ptr->to_d = -3 * amt; 
     833 
     834                                        break; 
     835                                } 
     836 
     837                                case SV_RING_DELVING: 
     838                                { 
     839                                        /* Digging bonus */ 
     840                                        o_ptr->pval = rand_range(3, 5); 
    801841 
    802842                                        break; 
     
    901941                                        /* Mention the item */ 
    902942                                        if (cheat_peek) object_mention(o_ptr); 
    903  
    904                                         break; 
    905                                 } 
    906  
    907                                 /* Amulet of Doom -- always cursed */ 
    908                                 case SV_AMULET_DOOM: 
    909                                 { 
    910                                         /* Cursed */ 
    911                                         o_ptr->flags3 |= TR3_LIGHT_CURSE; 
    912  
    913                                         /* Penalize */ 
    914                                         o_ptr->pval = 0 - (randint1(5) + m_bonus(5, level)); 
    915                                         o_ptr->to_a = 0 - (randint1(5) + m_bonus(5, level)); 
    916943 
    917944                                        break; 
  • trunk/src/obj-util.c

    r896 r907  
    7777 
    7878                /* HACK - Ordinary food is "boring" */ 
    79                 if ((tval == TV_FOOD) && (k_info[i].sval >= SV_FOOD_MIN_FOOD)) 
     79                if ((tval == TV_FOOD) && (k_info[i].sval < SV_FOOD_MIN_SHROOM)) 
    8080                        continue; 
    8181 
  • trunk/src/randart.c

    r895 r907  
    438438                tval = TV_DIGGING; 
    439439                r2 = Rand_normal(target_level * 2, target_level); 
    440                 if (r2 < 15) sval = SV_SHOVEL; 
    441                 else if (r2 < 30) sval = SV_PICK; 
    442                 else if (r2 < 60) sval = SV_GNOMISH_SHOVEL; 
    443                 else if (r2 < 90) sval = SV_ORCISH_PICK; 
    444                 else if (r2 < 120) sval = SV_DWARVEN_SHOVEL; 
    445                 else sval = SV_DWARVEN_PICK; 
     440                if (r2 < 20) sval = SV_SHOVEL; 
     441                else if (r2 < 50) sval = SV_PICK; 
     442                else sval = SV_MATTOCK; 
    446443        } 
    447444        else if (r < 19) 
     
    454451                else if (r2 < 20) sval = SV_WAR_HAMMER; 
    455452                else if (r2 < 30) sval = SV_QUARTERSTAFF; 
    456                 else if (r2 < 34) sval = SV_LUCERN_HAMMER; 
    457453                else if (r2 < 38) sval = SV_MORNING_STAR; 
    458454                else if (r2 < 45) sval = SV_FLAIL; 
    459455                else if (r2 < 55) sval = SV_LEAD_FILLED_MACE; 
    460456                else if (r2 < 80) sval = SV_BALL_AND_CHAIN; 
    461                 else if (r2 < 120) sval = SV_TWO_HANDED_FLAIL; 
     457                else if (r2 < 100) sval = SV_GREAT_HAMMER; 
     458                else if (r2 < 110) sval = SV_MAUL; 
     459                else if (r2 < 140) sval = SV_TWO_HANDED_GREAT_FLAIL; 
    462460                else sval = SV_MACE_OF_DISRUPTION; 
    463461        } 
     
    467465                tval = TV_SWORD; 
    468466                r2 = Rand_normal(target_level * 2, target_level); 
    469                 if (r2 < 0) sval = SV_BROKEN_DAGGER; 
    470                 else if (r2 < 1) sval = SV_BROKEN_SWORD; 
    471                 else if (r2 < 5) sval = SV_DAGGER; 
     467                if (r2 < 5) sval = SV_DAGGER; 
    472468                else if (r2 < 9) sval = SV_MAIN_GAUCHE; 
    473                 else if (r2 < 10) sval = SV_RAPIER;     /* or at least pointy ;-) */ 
    474                 else if (r2 < 12) sval = SV_SMALL_SWORD; 
     469                else if (r2 < 10) sval = SV_RAPIER; 
    475470                else if (r2 < 14) sval = SV_SHORT_SWORD; 
    476                 else if (r2 < 16) sval = SV_SABRE; 
    477                 else if (r2 < 18) sval = SV_CUTLASS; 
    478471                else if (r2 < 20) sval = SV_TULWAR; 
    479472                else if (r2 < 23) sval = SV_BROAD_SWORD; 
     
    482475                else if (r2 < 45) sval = SV_BASTARD_SWORD; 
    483476                else if (r2 < 60) sval = SV_KATANA; 
    484                 else if (r2 < 90) sval = SV_TWO_HANDED_SWORD
     477                else if (r2 < 90) sval = SV_ZWEIHANDER
    485478                else if (r2 < 120) sval = SV_EXECUTIONERS_SWORD; 
    486479                else sval = SV_BLADE_OF_CHAOS; 
     
    500493                else if (r2 < 60) sval = SV_BATTLE_AXE; 
    501494                else if (r2 < 65) sval = SV_GLAIVE; 
     495                else if (r2 < 72) sval = SV_LUCERNE_HAMMER; 
    502496                else if (r2 < 80) sval = SV_HALBERD; 
    503497                else if (r2 < 120) sval = SV_GREAT_AXE; 
     
    513507 
    514508                /* Soft stuff. */ 
    515                 if (r2 < 0) sval = SV_FILTHY_RAG; 
    516                 else if (r2 < 5) sval = SV_ROBE; 
    517                 else if (r2 < 10) sval = SV_SOFT_LEATHER_ARMOR; 
    518                 else if (r2 < 15) sval = SV_SOFT_STUDDED_LEATHER; 
    519                 else if (r2 < 20) sval = SV_HARD_LEATHER_ARMOR; 
    520                 else if (r2 < 30) sval = SV_HARD_STUDDED_LEATHER; 
     509                if (r2 < 0) sval = SV_ROBE; 
     510                else if (r2 < 10) sval = SV_SOFT_LEATHER_ARMOUR; 
     511                else if (r2 < 20) sval = SV_STUDDED_LEATHER_ARMOUR; 
     512                else if (r2 < 30) sval = SV_HARD_LEATHER_ARMOUR; 
    521513                else if (r2 < 45) sval = SV_LEATHER_SCALE_MAIL; 
    522514 
    523515                /* Hard stuff. */ 
    524                 else if (r2 < 55) sval = SV_RUSTY_CHAIN_MAIL; 
    525                 else if (r2 < 65) sval = SV_METAL_SCALE_MAIL; 
     516                else if (r2 < 60) sval = SV_METAL_SCALE_MAIL; 
    526517                else if (r2 < 75) sval = SV_CHAIN_MAIL; 
    527518                else if (r2 < 85) sval = SV_AUGMENTED_CHAIN_MAIL; 
    528                 else if (r2 < 90) sval = SV_DOUBLE_CHAIN_MAIL; 
    529                 else if (r2 < 97) sval = SV_BAR_CHAIN_MAIL; 
     519                else if (r2 < 95) sval = SV_BAR_CHAIN_MAIL; 
    530520                else if (r2 < 105) sval = SV_METAL_BRIGANDINE_ARMOUR; 
    531521                else if (r2 < 115) sval = SV_PARTIAL_PLATE_ARMOUR; 
     
    542532                tval = TV_BOOTS; 
    543533                r2 = Rand_normal(target_level * 2, target_level); 
    544                 if (r2 < 9) sval = SV_PAIR_OF_SOFT_LEATHER_BOOTS; 
    545                 else if (r2 < 15) sval = SV_PAIR_OF_HARD_LEATHER_BOOTS; 
    546                 else sval = SV_PAIR_OF_METAL_SHOD_BOOTS; 
     534                if (r2 < 4) sval = SV_PAIR_OF_LEATHER_SANDALS; 
     535                if (r2 < 10) sval = SV_PAIR_OF_LEATHER_BOOTS; 
     536                else if (r2 < 24) sval = SV_PAIR_OF_IRON_SHOD_BOOTS; 
     537                /* else if (r2 < ??) sval = SV_PAIR_OF_STEEL_SHOD_BOOTS; */ 
     538                /* else if (r2 < ??) sval = SV_PAIR_OF_ETHEREAL_BOOTS; */ 
     539                else sval = SV_PAIR_OF_STEEL_SHOD_BOOTS; 
    547540        } 
    548541        else if (r < 78) 
     
    552545                r2 = Rand_normal(target_level * 2, target_level); 
    553546                if (r2 < 10) sval = SV_SET_OF_LEATHER_GLOVES; 
    554                 else if (r2 < 30) sval = SV_SET_OF_GAUNTLETS; 
    555                 else sval = SV_SET_OF_CESTI; 
     547                else if (r2 < 40) sval = SV_SET_OF_GAUNTLETS; 
     548                else if (r2 < 50) sval = SV_SET_OF_MITHRIL_GAUNTLETS; 
     549                else if (r2 < 53) sval = SV_SET_OF_ALCHEMISTS_GLOVES; 
     550                else sval = SV_SET_OF_CAESTUS; 
    556551        } 
    557552        else if (r < 87) 
     
    568563                else if (r2 < 60) sval = SV_IRON_CROWN; 
    569564                else if (r2 < 90) sval = SV_GOLDEN_CROWN; 
    570                 else sval = SV_JEWELED_CROWN; 
     565                else sval = SV_JEWEL_ENCRUSTED_CROWN; 
    571566        } 
    572567        else if (r < 94) 
     
    575570                tval = TV_SHIELD; 
    576571                r2 = Rand_normal(target_level * 2, target_level); 
    577                 if (r2 < 9) sval = SV_SMALL_LEATHER_SHIELD; 
     572                /* if (r2 < 9) sval = SV_BUCKLER; */ 
     573                if (r2 < 9) sval = SV_WICKER_SHIELD; 
    578574                else if (r2 < 20) sval = SV_SMALL_METAL_SHIELD; 
    579                 else if (r2 < 40) sval = SV_LARGE_LEATHER_SHIELD; 
     575                else if (r2 < 40) sval = SV_LEATHER_SHIELD; 
    580576                else if (r2 < 60) sval = SV_LARGE_METAL_SHIELD; 
    581                 else sval = SV_SHIELD_OF_DEFLECTION
     577                else sval = SV_MITHRIL_SHIELD
    582578        } 
    583579        else 
     
    586582                tval = TV_CLOAK; 
    587583                r2 = Rand_normal(target_level * 2, target_level); 
    588                 if (r2 < 90) sval = SV_CLOAK; 
    589                 else sval = SV_SHADOW_CLOAK; 
     584                if (r2 < 40) sval = SV_CLOAK; 
     585                if (r2 < 90) sval = SV_FUR_CLOAK; 
     586                if (r2 < 120) sval = SV_ETHEREAL_CLOAK; 
     587                else sval = SV_ELVEN_CLOAK; 
    590588        } 
    591589 
  • trunk/src/tvalsval.h

    r889 r907  
    1 #ifndef INCLUDED_TVALSVAL_H 
    2 #define INCLUDED_TVALSVAL_H 
     1#ifndef INCLUDED_TVALSV_H 
     2#define INCLUDED_TVALSV_H 
     3 
    34 
    45/*** Object "tval" and "sval" codes ***/ 
     6 
     7/* 
     8 * PS: to regenerate the inside of an sval enum, do this: 
     9 * $ grep --context 2 I:<TVAL> object.txt | grep ^[NI] | 
     10 *   perl -pe 'y/[a-z]\- /[A-Z]__/' | perl -pe 's/(&_|~|')//g' | cut -d: -f3 | 
     11 *   perl -00 -pe 's/([^\n]*)\n([^\n]*)\n/\tSV_\1\ =\ \2,\n/g' 
     12 */ 
    513 
    614/* 
     
    6977#define SV_HEAVY_XBOW           24      /* (x4) */ 
    7078 
    71 /* The "sval" codes for TV_DIGGING */ 
    72 #define SV_SHOVEL                       1 
    73 #define SV_GNOMISH_SHOVEL       2 
    74 #define SV_DWARVEN_SHOVEL       3 
    75 #define SV_PICK                         4 
    76 #define SV_ORCISH_PICK          5 
    77 #define SV_DWARVEN_PICK         6 
    78 #define SV_MATTOCK                      7 
    79  
    80 /* The "sval" values for TV_HAFTED */ 
    81 #define SV_WHIP                                 2       /* 1d6 */ 
    82 #define SV_QUARTERSTAFF                 3       /* 1d9 */ 
    83 #define SV_MACE                                 5       /* 2d4 */ 
    84 #define SV_BALL_AND_CHAIN               6       /* 2d4 */ 
    85 #define SV_WAR_HAMMER                   8       /* 3d3 */ 
    86 #define SV_LUCERN_HAMMER                10      /* 2d5 */ 
    87 #define SV_MORNING_STAR                 12      /* 2d6 */ 
    88 #define SV_FLAIL                                13      /* 2d6 */ 
    89 #define SV_LEAD_FILLED_MACE             15      /* 3d4 */ 
    90 #define SV_TWO_HANDED_FLAIL             18      /* 3d6 */ 
    91 #define SV_MACE_OF_DISRUPTION   20      /* 5d8 */ 
    92 #define SV_GROND                                50      /* 3d4 */ 
    93  
    94 /* The "sval" values for TV_POLEARM */ 
    95 #define SV_SPEAR                                2       /* 1d6 */ 
    96 #define SV_AWL_PIKE                             4       /* 1d8 */ 
    97 #define SV_TRIDENT                              5       /* 1d9 */ 
    98 #define SV_PIKE                                 8       /* 2d5 */ 
    99 #define SV_BEAKE