Changeset 433

Show
Ignore:
Timestamp:
08/02/07 13:45:57 (1 year ago)
Author:
takkaria
Message:

Clean up racial and class skill values into arrays. (Kenneth Boyd)

Files:

Legend:

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

    r429 r433  
    464464        /* Calculate the "attack quality" */ 
    465465        bonus = p_ptr->to_h + o_ptr->to_h; 
    466         chance = (p_ptr->skills[SKILL_THN] + (bonus * BTH_PLUS_ADJ)); 
     466        chance = (p_ptr->skills[SKILL_TO_HIT_MELEE] + (bonus * BTH_PLUS_ADJ)); 
    467467 
    468468 
     
    687687        /* Actually "fire" the object */ 
    688688        bonus = (p_ptr->to_h + i_ptr->to_h + j_ptr->to_h); 
    689         chance = (p_ptr->skills[SKILL_THB] + (bonus * BTH_PLUS_ADJ)); 
     689        chance = (p_ptr->skills[SKILL_TO_HIT_BOW] + (bonus * BTH_PLUS_ADJ)); 
    690690 
    691691        /* Base damage from thrown object plus launcher bonus */ 
     
    987987 
    988988        /* Chance of hitting */ 
    989         chance = (p_ptr->skills[SKILL_THT] + (p_ptr->to_h * BTH_PLUS_ADJ)); 
     989        chance = (p_ptr->skills[SKILL_TO_HIT_THROW] + (p_ptr->to_h * BTH_PLUS_ADJ)); 
    990990 
    991991 
  • trunk/src/cmd1.c

    r421 r433  
    2929 
    3030        /* Start with base search ability */ 
    31         chance = p_ptr->skills[SKILL_SRH]; 
     31        chance = p_ptr->skills[SKILL_SEARCH]; 
    3232 
    3333        /* Penalize various conditions */ 
     
    990990 
    991991                /* Spontaneous Searching */ 
    992                 if ((p_ptr->skills[SKILL_FOS] >= 50) || 
    993                     (0 == rand_int(50 - p_ptr->skills[SKILL_FOS]))) 
     992                if ((p_ptr->skills[SKILL_SEARCH_FREQUENCY] >= 50) || 
     993                    (0 == rand_int(50 - p_ptr->skills[SKILL_SEARCH_FREQUENCY]))) 
    994994                { 
    995995                        search(); 
  • trunk/src/cmd2.c

    r421 r433  
    354354 
    355355                /* Get the "disarm" factor */ 
    356                 i = p_ptr->skills[SKILL_DIS]; 
     356                i = p_ptr->skills[SKILL_DISARM]; 
    357357 
    358358                /* Penalize some conditions */ 
     
    419419 
    420420        /* Get the "disarm" factor */ 
    421         i = p_ptr->skills[SKILL_DIS]; 
     421        i = p_ptr->skills[SKILL_DISARM]; 
    422422 
    423423        /* Penalize some conditions */ 
     
    669669        { 
    670670                /* Disarm factor */ 
    671                 i = p_ptr->skills[SKILL_DIS]; 
     671                i = p_ptr->skills[SKILL_DISARM]; 
    672672 
    673673                /* Penalize some conditions */ 
     
    10851085        { 
    10861086                /* Tunnel */ 
    1087                 if ((p_ptr->skills[SKILL_DIG] > 40 + rand_int(1600)) && twall(y, x)) 
     1087                if ((p_ptr->skills[SKILL_DIGGING] > 40 + rand_int(1600)) && twall(y, x)) 
    10881088                { 
    10891089                        msg_print("You have finished the tunnel."); 
     
    11211121                if (hard) 
    11221122                { 
    1123                         okay = (p_ptr->skills[SKILL_DIG] > 20 + rand_int(800)); 
     1123                        okay = (p_ptr->skills[SKILL_DIGGING] > 20 + rand_int(800)); 
    11241124                } 
    11251125 
     
    11271127                else 
    11281128                { 
    1129                         okay = (p_ptr->skills[SKILL_DIG] > 10 + rand_int(400)); 
     1129                        okay = (p_ptr->skills[SKILL_DIGGING] > 10 + rand_int(400)); 
    11301130                } 
    11311131 
     
    11721172        { 
    11731173                /* Remove the rubble */ 
    1174                 if ((p_ptr->skills[SKILL_DIG] > rand_int(200)) && twall(y, x)) 
     1174                if ((p_ptr->skills[SKILL_DIGGING] > rand_int(200)) && twall(y, x)) 
    11751175                { 
    11761176                        /* Message */ 
     
    12041204        { 
    12051205                /* Tunnel */ 
    1206                 if ((p_ptr->skills[SKILL_DIG] > 30 + rand_int(1200)) && twall(y, x)) 
     1206                if ((p_ptr->skills[SKILL_DIGGING] > 30 + rand_int(1200)) && twall(y, x)) 
    12071207                { 
    12081208                        msg_print("You have finished the tunnel."); 
     
    12251225        { 
    12261226                /* Tunnel */ 
    1227                 if ((p_ptr->skills[SKILL_DIG] > 30 + rand_int(1200)) && twall(y, x)) 
     1227                if ((p_ptr->skills[SKILL_DIGGING] > 30 + rand_int(1200)) && twall(y, x)) 
    12281228                { 
    12291229                        msg_print("You have finished the tunnel."); 
     
    13711371 
    13721372        /* Get the "disarm" factor */ 
    1373         i = p_ptr->skills[SKILL_DIS]; 
     1373        i = p_ptr->skills[SKILL_DISARM]; 
    13741374 
    13751375        /* Penalize some conditions */ 
     
    22052205 
    22062206        /* Spontaneous Searching */ 
    2207         if ((p_ptr->skills[SKILL_FOS] >= 50) || (0 == rand_int(50 - p_ptr->skills[SKILL_FOS]))) 
     2207        if ((p_ptr->skills[SKILL_SEARCH_FREQUENCY] >= 50) || 
     2208            (0 == rand_int(50 - p_ptr->skills[SKILL_SEARCH_FREQUENCY]))) 
    22082209        { 
    22092210                search(); 
  • trunk/src/cmd6.c

    r325 r433  
    130130 
    131131        /* Base chance of success */ 
    132         chance = p_ptr->skills[SKILL_DEV]; 
     132        chance = p_ptr->skills[SKILL_DEVICE]; 
    133133 
    134134        /* Confusion hurts skill */ 
  • trunk/src/defines.h

    r432 r433  
    454454enum 
    455455{ 
    456         SKILL_DIS,      /* Skill: Disarming */ 
    457         SKILL_DEV,      /* Skill: Magic Devices */ 
    458         SKILL_SAV,      /* Skill: Saving throw */ 
    459         SKILL_STL,      /* Skill: Stealth factor */ 
    460         SKILL_SRH,      /* Skill: Searching ability */ 
    461         SKILL_FOS,      /* Skill: Searching frequency */ 
    462         SKILL_THN,      /* Skill: To hit (normal) */ 
    463         SKILL_THB,      /* Skill: To hit (shooting) */ 
    464         SKILL_THT,      /* Skill: To hit (throwing) */ 
    465         SKILL_DIG,      /* Skill: Digging */ 
    466  
    467         SKILL_MAX 
     456        SKILL_DISARM,                   /* Skill: Disarming */ 
     457        SKILL_DEVICE,                   /* Skill: Magic Devices */ 
     458        SKILL_SAVE,                             /* Skill: Saving throw */ 
     459        SKILL_STEALTH,                  /* Skill: Stealth factor */ 
     460        SKILL_SEARCH,                   /* Skill: Searching ability */ 
     461        SKILL_SEARCH_FREQUENCY, /* Skill: Searching frequency */ 
     462        SKILL_TO_HIT_MELEE,             /* Skill: To hit (normal) */ 
     463        SKILL_TO_HIT_BOW,               /* Skill: To hit (shooting) */ 
     464        SKILL_TO_HIT_THROW,             /* Skill: To hit (throwing) */ 
     465        SKILL_DIGGING,                  /* Skill: Digging */ 
     466 
     467        SKILL_MAX, 
     468 
     469        /* skills that have racial/class modifiers, scheduled for obviation later */ 
     470        SKILL_MAX_NO_RACE_CLASS = SKILL_MAX - 2 
    468471}; 
    469472 
  • trunk/src/files.c

    r409 r433  
    16121612        } skills[] = 
    16131613        { 
    1614                 { "Saving Throw", SKILL_SAV, 6 }, 
    1615                 { "Stealth", SKILL_STL, 1 }, 
    1616                 { "Fighting", SKILL_THN, 12 }, 
    1617                 { "Shooting", SKILL_THB, 12 }, 
    1618                 { "Disarming", SKILL_DIS, 8 }, 
    1619                 { "Magic Device", SKILL_DEV, 6 }, 
    1620                 { "Perception", SKILL_FOS, 6 }, 
    1621                 { "Searching", SKILL_SRH, 6 } 
     1614                { "Saving Throw", SKILL_SAVE, 6 }, 
     1615                { "Stealth", SKILL_STEALTH, 1 }, 
     1616                { "Fighting", SKILL_TO_HIT_MELEE, 12 }, 
     1617                { "Shooting", SKILL_TO_HIT_BOW, 12 }, 
     1618                { "Disarming", SKILL_DISARM, 8 }, 
     1619                { "Magic Device", SKILL_DEVICE, 6 }, 
     1620                { "Perception", SKILL_SEARCH_FREQUENCY, 6 }, 
     1621                { "Searching", SKILL_SEARCH, 6 } 
    16221622        }; 
    16231623        int i; 
  • trunk/src/init1.c

    r410 r433  
    22912291} 
    22922292 
     2293/* 
     2294 * Helper function for reading a list of skills 
     2295 */ 
     2296static bool parse_skills(s16b *skills_array, const char *buf) 
     2297{ 
     2298        int dis, dev, sav, stl, srh, fos, thn, thb; 
     2299 
     2300        /* Scan for the values */ 
     2301        if (8 != sscanf(buf, "%d:%d:%d:%d:%d:%d:%d:%d", 
     2302                                    &dis, &dev, &sav, &stl, 
     2303                                    &srh, &fos, &thn, &thb)) return FALSE; 
     2304 
     2305        /* Save the values */ 
     2306        skills_array[SKILL_DISARM] = dis; 
     2307        skills_array[SKILL_DEVICE] = dev; 
     2308        skills_array[SKILL_SAVE] = sav; 
     2309        skills_array[SKILL_STEALTH] = stl; 
     2310        skills_array[SKILL_SEARCH] = srh; 
     2311        skills_array[SKILL_SEARCH_FREQUENCY] = fos; 
     2312        skills_array[SKILL_TO_HIT_MELEE] = thn; 
     2313        skills_array[SKILL_TO_HIT_BOW] = thb; 
     2314 
     2315        return TRUE; 
     2316} 
    22932317 
    22942318 
     
    23782402        else if (buf[0] == 'R') 
    23792403        { 
    2380                 int dis, dev, sav, stl, srh, fos, thn, thb; 
    2381  
    23822404                /* There better be a current pr_ptr */ 
    23832405                if (!pr_ptr) return (PARSE_ERROR_MISSING_RECORD_HEADER); 
    23842406 
    2385                 /* Scan for the values */ 
    2386                 if (8 != sscanf(buf+2, "%d:%d:%d:%d:%d:%d:%d:%d", 
    2387                                     &dis, &dev, &sav, &stl, 
    2388                                     &srh, &fos, &thn, &thb)) return (PARSE_ERROR_GENERIC); 
    2389  
    2390                 /* Save the values */ 
    2391                 pr_ptr->r_dis = dis; 
    2392                 pr_ptr->r_dev = dev; 
    2393                 pr_ptr->r_sav = sav; 
    2394                 pr_ptr->r_stl = stl; 
    2395                 pr_ptr->r_srh = srh; 
    2396                 pr_ptr->r_fos = fos; 
    2397                 pr_ptr->r_thn = thn; 
    2398                 pr_ptr->r_thb = thb; 
     2407                /* Verify text */ 
     2408                if (!buf[1] || !buf[2]) return (PARSE_ERROR_GENERIC); 
     2409 
     2410                /* Scan and save the values */ 
     2411                if (!parse_skills(pr_ptr->r_skills, buf+2)) return (PARSE_ERROR_GENERIC); 
    23992412        } 
    24002413 
     
    26422655        else if (buf[0] == 'C') 
    26432656        { 
    2644                 int dis, dev, sav, stl, srh, fos, thn, thb; 
    2645  
    26462657                /* There better be a current pc_ptr */ 
    26472658                if (!pc_ptr) return (PARSE_ERROR_MISSING_RECORD_HEADER); 
    26482659 
    2649                 /* Scan for the values */ 
    2650                 if (8 != sscanf(buf+2, "%d:%d:%d:%d:%d:%d:%d:%d", 
    2651                                     &dis, &dev, &sav, &stl, 
    2652                                     &srh, &fos, &thn, &thb)) return (PARSE_ERROR_GENERIC); 
    2653  
    2654                 /* Save the values */ 
    2655                 pc_ptr->c_dis = dis; 
    2656                 pc_ptr->c_dev = dev; 
    2657                 pc_ptr->c_sav = sav; 
    2658                 pc_ptr->c_stl = stl; 
    2659                 pc_ptr->c_srh = srh; 
    2660                 pc_ptr->c_fos = fos; 
    2661                 pc_ptr->c_thn = thn; 
    2662                 pc_ptr->c_thb = thb; 
     2660                /* Verify text */ 
     2661                if (!buf[1] || !buf[2]) return (PARSE_ERROR_GENERIC); 
     2662 
     2663                /* Scan and save the values */ 
     2664                if (!parse_skills(pc_ptr->c_skills, buf+2)) return (PARSE_ERROR_GENERIC); 
    26632665        } 
    26642666 
     
    26662668        else if (buf[0] == 'X') 
    26672669        { 
    2668                 int dis, dev, sav, stl, srh, fos, thn, thb; 
    2669  
    26702670                /* There better be a current pc_ptr */ 
    26712671                if (!pc_ptr) return (PARSE_ERROR_MISSING_RECORD_HEADER); 
    26722672 
    2673                 /* Scan for the values */ 
    2674                 if (8 != sscanf(buf+2, "%d:%d:%d:%d:%d:%d:%d:%d", 
    2675                                     &dis, &dev, &sav, &stl, 
    2676                                     &srh, &fos, &thn, &thb)) return (PARSE_ERROR_GENERIC); 
    2677  
    2678                 /* Save the values */ 
    2679                 pc_ptr->x_dis = dis; 
    2680                 pc_ptr->x_dev = dev; 
    2681                 pc_ptr->x_sav = sav; 
    2682                 pc_ptr->x_stl = stl; 
    2683                 pc_ptr->x_srh = srh; 
    2684                 pc_ptr->x_fos = fos; 
    2685                 pc_ptr->x_thn = thn; 
    2686                 pc_ptr->x_thb = thb; 
     2673                /* Verify text */ 
     2674                if (!buf[1] || !buf[2]) return (PARSE_ERROR_GENERIC); 
     2675 
     2676                /* Scan and save the values */ 
     2677                if (!parse_skills(pc_ptr->x_skills, buf+2)) return (PARSE_ERROR_GENERIC); 
    26872678        } 
    26882679 
  • trunk/src/melee1.c

    r421 r433  
    907907                                                obvious = TRUE; 
    908908                                        } 
    909                                         else if (rand_int(100) < p_ptr->skills[SKILL_SAV]) 
     909                                        else if (rand_int(100) < p_ptr->skills[SKILL_SAVE]) 
    910910                                        { 
    911911                                                msg_print("You stand your ground!"); 
     
    940940                                                obvious = TRUE; 
    941941                                        } 
    942                                         else if (rand_int(100) < p_ptr->skills[SKILL_SAV]) 
     942                                        else if (rand_int(100) < p_ptr->skills[SKILL_SAVE]) 
    943943                                        { 
    944944                                                msg_print("You resist the effects!"); 
  • trunk/src/melee2.c

    r229 r433  
    13751375                        } 
    13761376 
    1377                         if (rand_int(100) < p_ptr->skills[SKILL_SAV]) 
     1377                        if (rand_int(100) < p_ptr->skills[SKILL_SAVE]) 
    13781378                        { 
    13791379                                msg_print("You resist the effects!"); 
     
    14041404                                msg_format("%^s looks deep into your eyes.", m_name); 
    14051405                        } 
    1406                         if (rand_int(100) < p_ptr->skills[SKILL_SAV]) 
     1406                        if (rand_int(100) < p_ptr->skills[SKILL_SAVE]) 
    14071407                        { 
    14081408                                msg_print("You resist the effects!"); 
     
    14361436                        if (blind) msg_format("%^s mumbles.", m_name); 
    14371437                        else msg_format("%^s points at you and curses.", m_name); 
    1438                         if (rand_int(100) < p_ptr->skills[SKILL_SAV]) 
     1438                        if (rand_int(100) < p_ptr->skills[SKILL_SAVE]) 
    14391439                        { 
    14401440                                msg_print("You resist the effects!"); 
     
    14541454                        if (blind) msg_format("%^s mumbles.", m_name); 
    14551455                        else msg_format("%^s points at you and curses horribly.", m_name); 
    1456                         if (rand_int(100) < p_ptr->skills[SKILL_SAV]) 
     1456                        if (rand_int(100) < p_ptr->skills[SKILL_SAVE]) 
    14571457                        { 
    14581458                                msg_print("You resist the effects!"); 
     
    14721472                        if (blind) msg_format("%^s mumbles loudly.", m_name); 
    14731473                        else msg_format("%^s points at you, incanting terribly!", m_name); 
    1474                         if (rand_int(100) < p_ptr->skills[SKILL_SAV]) 
     1474                        if (rand_int(100) < p_ptr->skills[SKILL_SAVE]) 
    14751475                        { 
    14761476                                msg_print("You resist the effects!"); 
     
    14901490                        if (blind) msg_format("%^s screams the word 'DIE!'", m_name); 
    14911491                        else msg_format("%^s points at you, screaming the word DIE!", m_name); 
    1492                         if (rand_int(100) < p_ptr->skills[SKILL_SAV]) 
     1492                        if (rand_int(100) < p_ptr->skills[SKILL_SAVE]) 
    14931493                        { 
    14941494                                msg_print("You resist the effects!"); 
     
    16371637                                msg_print("You refuse to be frightened."); 
    16381638                        } 
    1639                         else if (rand_int(100) < p_ptr->skills[SKILL_SAV]) 
     1639                        else if (rand_int(100) < p_ptr->skills[SKILL_SAVE]) 
    16401640                        { 
    16411641                                msg_print("You refuse to be frightened."); 
     
    16601660                                msg_print("You are unaffected!"); 
    16611661                        } 
    1662                         else if (rand_int(100) < p_ptr->skills[SKILL_SAV]) 
     1662                        else if (rand_int(100) < p_ptr->skills[SKILL_SAVE]) 
    16631663                        { 
    16641664                                msg_print("You resist the effects!"); 
     
    16831683                                msg_print("You disbelieve the feeble spell."); 
    16841684                        } 
    1685                         else if (rand_int(100) < p_ptr->skills[SKILL_SAV]) 
     1685                        else if (rand_int(100) < p_ptr->skills[SKILL_SAVE]) 
    16861686                        { 
    16871687                                msg_print("You disbelieve the feeble spell."); 
     
    17051705                                msg_print("You are unaffected!"); 
    17061706                        } 
    1707                         else if (rand_int(100) < p_ptr->skills[SKILL_SAV]) 
     1707                        else if (rand_int(100) < p_ptr->skills[SKILL_SAVE]) 
    17081708                        { 
    17091709                                msg_print("You resist the effects!"); 
     
    17281728                                msg_print("You are unaffected!"); 
    17291729                        } 
    1730                         else if (rand_int(100) < p_ptr->skills[SKILL_SAV]) 
     1730                        else if (rand_int(100) < p_ptr->skills[SKILL_SAVE]) 
    17311731                        { 
    17321732                                msg_format("You resist the effects!"); 
     
    19101910                                msg_print("You are unaffected!"); 
    19111911                        } 
    1912                         else if (rand_int(100) < p_ptr->skills[SKILL_SAV]) 
     1912                        else if (rand_int(100) < p_ptr->skills[SKILL_SAVE]) 
    19131913                        { 
    19141914                                msg_print("You resist the effects!"); 
     
    19581958                        msg_format("%^s tries to blank your mind.", m_name); 
    19591959 
    1960                         if (rand_int(100) < p_ptr->skills[SKILL_SAV]) 
     1960                        if (rand_int(100) < p_ptr->skills[SKILL_SAVE]) 
    19611961                                msg_print("You resist the effects!"); 
    19621962                        else 
  • trunk/src/spells1.c

    r399 r433  
    13911391                case 6: 
    13921392                { 
    1393                         if (rand_int(100) < p_ptr->skills[SKILL_SAV]) 
     1393                        if (rand_int(100) < p_ptr->skills[SKILL_SAVE]) 
    13941394                        { 
    13951395                                msg_print("You resist the effects!"); 
     
    14041404                case 7: 
    14051405                { 
    1406                         if (rand_int(100) < p_ptr->skills[SKILL_SAV]) 
     1406                        if (rand_int(100) < p_ptr->skills[SKILL_SAVE]) 
    14071407                        { 
    14081408                                msg_print("You resist the effects!"); 
  • trunk/src/types.h

    r410 r433  
    702702        s16b r_adj[A_MAX];      /* Racial stat bonuses */ 
    703703 
    704         s16b r_dis;                     /* disarming */ 
    705         s16b r_dev;                     /* magic devices */ 
    706         s16b r_sav;                     /* saving throw */ 
    707         s16b r_stl;                     /* stealth */ 
    708         s16b r_srh;                     /* search ability */ 
    709         s16b r_fos;                     /* search frequency */ 
    710         s16b r_thn;                     /* combat (normal) */ 
    711         s16b r_thb;                     /* combat (shooting) */ 
     704        s16b r_skills[SKILL_MAX_NO_RACE_CLASS]; /* racial skills */ 
    712705 
    713706        byte r_mhp;                     /* Race hit-dice modifier */ 
     
    762755        s16b c_adj[A_MAX];      /* Class stat modifier */ 
    763756 
    764         s16b c_dis;                     /* class disarming */ 
    765         s16b c_dev;                     /* class magic devices */ 
    766         s16b c_sav;                     /* class saving throws */ 
    767         s16b c_stl;                     /* class stealth */ 
    768         s16b c_srh;                     /* class searching ability */ 
    769         s16b c_fos;                     /* class searching frequency */ 
    770         s16b c_thn;                     /* class to hit (normal) */ 
    771         s16b c_thb;                     /* class to hit (bows) */ 
    772  
    773         s16b x_dis;                     /* extra disarming */ 
    774         s16b x_dev;                     /* extra magic devices */ 
    775         s16b x_sav;                     /* extra saving throws */ 
    776         s16b x_stl;                     /* extra stealth */ 
    777         s16b x_srh;                     /* extra searching ability */ 
    778         s16b x_fos;                     /* extra searching frequency */ 
    779         s16b x_thn;                     /* extra to hit (normal) */ 
    780         s16b x_thb;                     /* extra to hit (bows) */ 
     757        s16b c_skills[SKILL_MAX_NO_RACE_CLASS]; /* class skills */ 
     758        s16b x_skills[SKILL_MAX_NO_RACE_CLASS]; /* extra skills */ 
    781759 
    782760        s16b c_mhp;                     /* Class hit-dice adjustment */ 
     
    11401118}; 
    11411119 
     1120 
  • trunk/src/xtra1.c

    r415 r433  
    18191819        p_ptr->see_infra = rp_ptr->infra; 
    18201820 
    1821         /* Base skill -- disarming */ 
    1822         p_ptr->skills[SKILL_DIS] = rp_ptr->r_dis + cp_ptr->c_dis; 
    1823  
    1824         /* Base skill -- magic devices */ 
    1825         p_ptr->skills[SKILL_DEV] = rp_ptr->r_dev + cp_ptr->c_dev; 
    1826  
    1827         /* Base skill -- saving throw */ 
    1828         p_ptr->skills[SKILL_SAV] = rp_ptr->r_sav + cp_ptr->c_sav; 
    1829  
    1830         /* Base skill -- stealth */ 
    1831         p_ptr->skills[SKILL_STL] = rp_ptr->r_stl + cp_ptr->c_stl; 
    1832  
    1833         /* Base skill -- searching ability */ 
    1834         p_ptr->skills[SKILL_SRH] = rp_ptr->r_srh + cp_ptr->c_srh; 
    1835  
    1836         /* Base skill -- searching frequency */ 
    1837         p_ptr->skills[SKILL_FOS] = rp_ptr->r_fos + cp_ptr->c_fos; 
    1838  
    1839         /* Base skill -- combat (normal) */ 
    1840         p_ptr->skills[SKILL_THN] = rp_ptr->r_thn + cp_ptr->c_thn; 
    1841  
    1842         /* Base skill -- combat (shooting) */ 
    1843         p_ptr->skills[SKILL_THB] = rp_ptr->r_thb + cp_ptr->c_thb; 
     1821        /* Base skills */ 
     1822        for (i = 0; i < SKILL_MAX_NO_RACE_CLASS; i++) 
     1823        { 
     1824                p_ptr->skills[i] = rp_ptr->r_skills[i] + cp_ptr->c_skills[i]; 
     1825        } 
    18441826 
    18451827        /* Base skill -- combat (throwing) */ 
    1846         p_ptr->skills[SKILL_THT] = rp_ptr->r_thb + cp_ptr->c_thb
     1828        p_ptr->skills[SKILL_TO_HIT_THROW] = p_ptr->skills[SKILL_TO_HIT_BOW]
    18471829 
    18481830        /* Base skill -- digging */ 
    1849         p_ptr->skills[SKILL_DIG] = 0; 
     1831        p_ptr->skills[SKILL_DIGGING] = 0; 
    18501832 
    18511833        /*** Analyze player ***/ 
     
    19271909 
    19281910                /* Affect stealth */ 
    1929                 if (f1 & (TR1_STEALTH)) p_ptr->skills[SKILL_STL] += o_ptr->pval; 
     1911                if (f1 & (TR1_STEALTH)) p_ptr->skills[SKILL_STEALTH] += o_ptr->pval; 
    19301912 
    19311913                /* Affect searching ability (factor of five) */ 
    1932                 if (f1 & (TR1_SEARCH)) p_ptr->skills[SKILL_SRH] += (o_ptr->pval * 5); 
     1914                if (f1 & (TR1_SEARCH)) p_ptr->skills[SKILL_SEARCH] += (o_ptr->pval * 5); 
    19331915 
    19341916                /* Affect searching frequency (factor of five) */ 
    1935                 if (f1 & (TR1_SEARCH)) p_ptr->skills[SKILL_FOS] += (o_ptr->pval * 5); 
     1917                if (f1 & (TR1_SEARCH)) p_ptr->skills[SKILL_SEARCH_FREQUENCY] += (o_ptr->pval * 5); 
    19361918 
    19371919                /* Affect infravision */ 
     
    19391921 
    19401922                /* Affect digging (factor of 20) */ 
    1941                 if (f1 & (TR1_TUNNEL)) p_ptr->skills[SKILL_DIG] += (o_ptr->pval * 20); 
     1923                if (f1 & (TR1_TUNNEL)) p_ptr->skills[SKILL_DIGGING] += (o_ptr->pval * 20); 
    19421924 
    19431925                /* Affect speed */ 
     
    21952177 
    21962178        /* Affect Skill -- stealth (bonus one) */ 
    2197         p_ptr->skills[SKILL_STL] += 1; 
     2179        p_ptr->skills[SKILL_STEALTH] += 1; 
    21982180 
    21992181        /* Affect Skill -- disarming (DEX and INT) */ 
    2200         p_ptr->skills[SKILL_DIS] += adj_dex_dis[p_ptr->stat_ind[A_DEX]]; 
    2201         p_ptr->skills[SKILL_DIS] += adj_int_dis[p_ptr->stat_ind[A_INT]]; 
     2182        p_ptr->skills[SKILL_DISARM] += adj_dex_dis[p_ptr->stat_ind[A_DEX]]; 
     2183        p_ptr->skills[SKILL_DISARM] += adj_int_dis[p_ptr->stat_ind[A_INT]]; 
    22022184 
    22032185        /* Affect Skill -- magic devices (INT) */ 
    2204         p_ptr->skills[SKILL_DEV] += adj_int_dev[p_ptr->stat_ind[A_INT]]; 
     2186        p_ptr->skills[SKILL_DEVICE] += adj_int_dev[p_ptr->stat_ind[A_INT]]; 
    22052187 
    22062188        /* Affect Skill -- saving throw (WIS) */ 
    2207         p_ptr->skills[SKILL_SAV] += adj_wis_sav[p_ptr->stat_ind[A_WIS]]; 
     2189        p_ptr->skills[SKILL_SAVE] += adj_wis_sav[p_ptr->stat_ind[A_WIS]]; 
    22082190 
    22092191        /* Affect Skill -- digging (STR) */ 
    2210         p_ptr->skills[SKILL_DIG] += adj_str_dig[p_ptr->stat_ind[A_STR]]; 
    2211  
    2212         /* Affect Skill -- disarming (Level, by Class) */ 
    2213         p_ptr->skills[SKILL_DIS] += (cp_ptr->x_dis * p_ptr->lev / 10); 
    2214  
    2215         /* Affect Skill -- magic devices (Level, by Class) */ 
    2216         p_ptr->skills[SKILL_DEV] += (cp_ptr->x_dev * p_ptr->lev / 10); 
    2217  
    2218         /* Affect Skill -- saving throw (Level, by Class) */ 
    2219         p_ptr->skills[SKILL_SAV] += (cp_ptr->x_sav * p_ptr->lev / 10); 
    2220  
    2221         /* Affect Skill -- stealth (Level, by Class) */ 
    2222         p_ptr->skills[SKILL_STL] += (cp_ptr->x_stl * p_ptr->lev / 10); 
    2223  
    2224         /* Affect Skill -- search ability (Level, by Class) */ 
    2225         p_ptr->skills[SKILL_SRH] += (cp_ptr->x_srh * p_ptr->lev / 10); 
    2226  
    2227         /* Affect Skill -- search frequency (Level, by Class) */ 
    2228         p_ptr->skills[SKILL_FOS] += (cp_ptr->x_fos * p_ptr->lev / 10); 
    2229  
    2230         /* Affect Skill -- combat (normal) (Level, by Class) */ 
    2231         p_ptr->skills[SKILL_THN] += (cp_ptr->x_thn * p_ptr->lev / 10); 
    2232  
    2233         /* Affect Skill -- combat (shooting) (Level, by Class) */ 
    2234         p_ptr->skills[SKILL_THB] += (cp_ptr->x_thb * p_ptr->lev / 10); 
     2192        p_ptr->skills[SKILL_DIGGING] += adj_str_dig[p_ptr->stat_ind[A_STR]]; 
     2193 
     2194        /* Affect Skills (Level, by Class */ 
     2195        for (i = 0; i < SKILL_MAX_NO_RACE_CLASS; i++) 
     2196        { 
     2197                p_ptr->skills[i] += (cp_ptr->x_skills[i] * p_ptr->lev / 10); 
     2198        } 
    22352199 
    22362200        /* Affect Skill -- combat (throwing) (Level, by Class) */ 
    2237         p_ptr->skills[SKILL_THT] += (cp_ptr->x_thb * p_ptr->lev / 10); 
     2201        p_ptr->skills[SKILL_TO_HIT_THROW] += (cp_ptr->x_skills[SKILL_TO_HIT_BOW] * p_ptr->lev / 10); 
    22382202 
    22392203        /* Limit Skill -- digging from 1 up */ 
    2240         if (p_ptr->skills[SKILL_DIG] < 1) p_ptr->skills[SKILL_DIG] = 1; 
     2204        if (p_ptr->skills[SKILL_DIGGING] < 1) p_ptr->skills[SKILL_DIGGING] = 1; 
    22412205 
    22422206        /* Limit Skill -- stealth from 0 to 30 */ 
    2243         if (p_ptr->skills[SKILL_STL] > 30) p_ptr->skills[SKILL_STL] = 30; 
    2244         if (p_ptr->skills[SKILL_STL] < 0) p_ptr->skills[SKILL_STL] = 0; 
     2207        if (p_ptr->skills[SKILL_STEALTH] > 30) p_ptr->skills[SKILL_STEALTH] = 30; 
     2208        if (p_ptr->skills[SKILL_STEALTH] < 0) p_ptr->skills[SKILL_STEALTH] = 0; 
    22452209 
    22462210        /* Apply Skill -- Extract noise from stealth */ 
    2247         p_ptr->noise = (1L << (30 - p_ptr->skills[SKILL_STL])); 
     2211        p_ptr->noise = (1L << (30 - p_ptr->skills[SKILL_STEALTH])); 
    22482212 
    22492213        /* Obtain the "hold" value */ 
     
    23722336 
    23732337                /* Boost digging skill by weapon weight */ 
    2374                 p_ptr->skills[SKILL_DIG] += (o_ptr->weight / 10); 
     2338                p_ptr->skills[SKILL_DIGGING] += (o_ptr->weight / 10); 
    23752339        } 
    23762340 
     
    27482712 
    27492713 
     2714