Changeset 433
- Timestamp:
- 08/02/07 13:45:57 (1 year ago)
- Files:
-
- trunk/src/attack.c (modified) (3 diffs)
- trunk/src/cmd1.c (modified) (2 diffs)
- trunk/src/cmd2.c (modified) (11 diffs)
- trunk/src/cmd6.c (modified) (1 diff)
- trunk/src/defines.h (modified) (1 diff)
- trunk/src/files.c (modified) (1 diff)
- trunk/src/init1.c (modified) (4 diffs)
- trunk/src/melee1.c (modified) (2 diffs)
- trunk/src/melee2.c (modified) (13 diffs)
- trunk/src/spells1.c (modified) (2 diffs)
- trunk/src/types.h (modified) (3 diffs)
- trunk/src/xtra1.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/attack.c
r429 r433 464 464 /* Calculate the "attack quality" */ 465 465 bonus = p_ptr->to_h + o_ptr->to_h; 466 chance = (p_ptr->skills[SKILL_T HN] + (bonus * BTH_PLUS_ADJ));466 chance = (p_ptr->skills[SKILL_TO_HIT_MELEE] + (bonus * BTH_PLUS_ADJ)); 467 467 468 468 … … 687 687 /* Actually "fire" the object */ 688 688 bonus = (p_ptr->to_h + i_ptr->to_h + j_ptr->to_h); 689 chance = (p_ptr->skills[SKILL_T HB] + (bonus * BTH_PLUS_ADJ));689 chance = (p_ptr->skills[SKILL_TO_HIT_BOW] + (bonus * BTH_PLUS_ADJ)); 690 690 691 691 /* Base damage from thrown object plus launcher bonus */ … … 987 987 988 988 /* Chance of hitting */ 989 chance = (p_ptr->skills[SKILL_T HT] + (p_ptr->to_h * BTH_PLUS_ADJ));989 chance = (p_ptr->skills[SKILL_TO_HIT_THROW] + (p_ptr->to_h * BTH_PLUS_ADJ)); 990 990 991 991 trunk/src/cmd1.c
r421 r433 29 29 30 30 /* Start with base search ability */ 31 chance = p_ptr->skills[SKILL_S RH];31 chance = p_ptr->skills[SKILL_SEARCH]; 32 32 33 33 /* Penalize various conditions */ … … 990 990 991 991 /* 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]))) 994 994 { 995 995 search(); trunk/src/cmd2.c
r421 r433 354 354 355 355 /* Get the "disarm" factor */ 356 i = p_ptr->skills[SKILL_DIS ];356 i = p_ptr->skills[SKILL_DISARM]; 357 357 358 358 /* Penalize some conditions */ … … 419 419 420 420 /* Get the "disarm" factor */ 421 i = p_ptr->skills[SKILL_DIS ];421 i = p_ptr->skills[SKILL_DISARM]; 422 422 423 423 /* Penalize some conditions */ … … 669 669 { 670 670 /* Disarm factor */ 671 i = p_ptr->skills[SKILL_DIS ];671 i = p_ptr->skills[SKILL_DISARM]; 672 672 673 673 /* Penalize some conditions */ … … 1085 1085 { 1086 1086 /* 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)) 1088 1088 { 1089 1089 msg_print("You have finished the tunnel."); … … 1121 1121 if (hard) 1122 1122 { 1123 okay = (p_ptr->skills[SKILL_DIG ] > 20 + rand_int(800));1123 okay = (p_ptr->skills[SKILL_DIGGING] > 20 + rand_int(800)); 1124 1124 } 1125 1125 … … 1127 1127 else 1128 1128 { 1129 okay = (p_ptr->skills[SKILL_DIG ] > 10 + rand_int(400));1129 okay = (p_ptr->skills[SKILL_DIGGING] > 10 + rand_int(400)); 1130 1130 } 1131 1131 … … 1172 1172 { 1173 1173 /* 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)) 1175 1175 { 1176 1176 /* Message */ … … 1204 1204 { 1205 1205 /* 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)) 1207 1207 { 1208 1208 msg_print("You have finished the tunnel."); … … 1225 1225 { 1226 1226 /* 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)) 1228 1228 { 1229 1229 msg_print("You have finished the tunnel."); … … 1371 1371 1372 1372 /* Get the "disarm" factor */ 1373 i = p_ptr->skills[SKILL_DIS ];1373 i = p_ptr->skills[SKILL_DISARM]; 1374 1374 1375 1375 /* Penalize some conditions */ … … 2205 2205 2206 2206 /* 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]))) 2208 2209 { 2209 2210 search(); trunk/src/cmd6.c
r325 r433 130 130 131 131 /* Base chance of success */ 132 chance = p_ptr->skills[SKILL_DEV ];132 chance = p_ptr->skills[SKILL_DEVICE]; 133 133 134 134 /* Confusion hurts skill */ trunk/src/defines.h
r432 r433 454 454 enum 455 455 { 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 468 471 }; 469 472 trunk/src/files.c
r409 r433 1612 1612 } skills[] = 1613 1613 { 1614 { "Saving Throw", SKILL_SAV , 6 },1615 { "Stealth", SKILL_ST L, 1 },1616 { "Fighting", SKILL_T HN, 12 },1617 { "Shooting", SKILL_T HB, 12 },1618 { "Disarming", SKILL_DIS , 8 },1619 { "Magic Device", SKILL_DEV , 6 },1620 { "Perception", SKILL_ FOS, 6 },1621 { "Searching", SKILL_S RH, 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 } 1622 1622 }; 1623 1623 int i; trunk/src/init1.c
r410 r433 2291 2291 } 2292 2292 2293 /* 2294 * Helper function for reading a list of skills 2295 */ 2296 static 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 } 2293 2317 2294 2318 … … 2378 2402 else if (buf[0] == 'R') 2379 2403 { 2380 int dis, dev, sav, stl, srh, fos, thn, thb;2381 2382 2404 /* There better be a current pr_ptr */ 2383 2405 if (!pr_ptr) return (PARSE_ERROR_MISSING_RECORD_HEADER); 2384 2406 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); 2399 2412 } 2400 2413 … … 2642 2655 else if (buf[0] == 'C') 2643 2656 { 2644 int dis, dev, sav, stl, srh, fos, thn, thb;2645 2646 2657 /* There better be a current pc_ptr */ 2647 2658 if (!pc_ptr) return (PARSE_ERROR_MISSING_RECORD_HEADER); 2648 2659 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); 2663 2665 } 2664 2666 … … 2666 2668 else if (buf[0] == 'X') 2667 2669 { 2668 int dis, dev, sav, stl, srh, fos, thn, thb;2669 2670 2670 /* There better be a current pc_ptr */ 2671 2671 if (!pc_ptr) return (PARSE_ERROR_MISSING_RECORD_HEADER); 2672 2672 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); 2687 2678 } 2688 2679 trunk/src/melee1.c
r421 r433 907 907 obvious = TRUE; 908 908 } 909 else if (rand_int(100) < p_ptr->skills[SKILL_SAV ])909 else if (rand_int(100) < p_ptr->skills[SKILL_SAVE]) 910 910 { 911 911 msg_print("You stand your ground!"); … … 940 940 obvious = TRUE; 941 941 } 942 else if (rand_int(100) < p_ptr->skills[SKILL_SAV ])942 else if (rand_int(100) < p_ptr->skills[SKILL_SAVE]) 943 943 { 944 944 msg_print("You resist the effects!"); trunk/src/melee2.c
r229 r433 1375 1375 } 1376 1376 1377 if (rand_int(100) < p_ptr->skills[SKILL_SAV ])1377 if (rand_int(100) < p_ptr->skills[SKILL_SAVE]) 1378 1378 { 1379 1379 msg_print("You resist the effects!"); … … 1404 1404 msg_format("%^s looks deep into your eyes.", m_name); 1405 1405 } 1406 if (rand_int(100) < p_ptr->skills[SKILL_SAV ])1406 if (rand_int(100) < p_ptr->skills[SKILL_SAVE]) 1407 1407 { 1408 1408 msg_print("You resist the effects!"); … … 1436 1436 if (blind) msg_format("%^s mumbles.", m_name); 1437 1437 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]) 1439 1439 { 1440 1440 msg_print("You resist the effects!"); … … 1454 1454 if (blind) msg_format("%^s mumbles.", m_name); 1455 1455 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]) 1457 1457 { 1458 1458 msg_print("You resist the effects!"); … … 1472 1472 if (blind) msg_format("%^s mumbles loudly.", m_name); 1473 1473 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]) 1475 1475 { 1476 1476 msg_print("You resist the effects!"); … … 1490 1490 if (blind) msg_format("%^s screams the word 'DIE!'", m_name); 1491 1491 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]) 1493 1493 { 1494 1494 msg_print("You resist the effects!"); … … 1637 1637 msg_print("You refuse to be frightened."); 1638 1638 } 1639 else if (rand_int(100) < p_ptr->skills[SKILL_SAV ])1639 else if (rand_int(100) < p_ptr->skills[SKILL_SAVE]) 1640 1640 { 1641 1641 msg_print("You refuse to be frightened."); … … 1660 1660 msg_print("You are unaffected!"); 1661 1661 } 1662 else if (rand_int(100) < p_ptr->skills[SKILL_SAV ])1662 else if (rand_int(100) < p_ptr->skills[SKILL_SAVE]) 1663 1663 { 1664 1664 msg_print("You resist the effects!"); … … 1683 1683 msg_print("You disbelieve the feeble spell."); 1684 1684 } 1685 else if (rand_int(100) < p_ptr->skills[SKILL_SAV ])1685 else if (rand_int(100) < p_ptr->skills[SKILL_SAVE]) 1686 1686 { 1687 1687 msg_print("You disbelieve the feeble spell."); … … 1705 1705 msg_print("You are unaffected!"); 1706 1706 } 1707 else if (rand_int(100) < p_ptr->skills[SKILL_SAV ])1707 else if (rand_int(100) < p_ptr->skills[SKILL_SAVE]) 1708 1708 { 1709 1709 msg_print("You resist the effects!"); … … 1728 1728 msg_print("You are unaffected!"); 1729 1729 } 1730 else if (rand_int(100) < p_ptr->skills[SKILL_SAV ])1730 else if (rand_int(100) < p_ptr->skills[SKILL_SAVE]) 1731 1731 { 1732 1732 msg_format("You resist the effects!"); … … 1910 1910 msg_print("You are unaffected!"); 1911 1911 } 1912 else if (rand_int(100) < p_ptr->skills[SKILL_SAV ])1912 else if (rand_int(100) < p_ptr->skills[SKILL_SAVE]) 1913 1913 { 1914 1914 msg_print("You resist the effects!"); … … 1958 1958 msg_format("%^s tries to blank your mind.", m_name); 1959 1959 1960 if (rand_int(100) < p_ptr->skills[SKILL_SAV ])1960 if (rand_int(100) < p_ptr->skills[SKILL_SAVE]) 1961 1961 msg_print("You resist the effects!"); 1962 1962 else trunk/src/spells1.c
r399 r433 1391 1391 case 6: 1392 1392 { 1393 if (rand_int(100) < p_ptr->skills[SKILL_SAV ])1393 if (rand_int(100) < p_ptr->skills[SKILL_SAVE]) 1394 1394 { 1395 1395 msg_print("You resist the effects!"); … … 1404 1404 case 7: 1405 1405 { 1406 if (rand_int(100) < p_ptr->skills[SKILL_SAV ])1406 if (rand_int(100) < p_ptr->skills[SKILL_SAVE]) 1407 1407 { 1408 1408 msg_print("You resist the effects!"); trunk/src/types.h
r410 r433 702 702 s16b r_adj[A_MAX]; /* Racial stat bonuses */ 703 703 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 */ 712 705 713 706 byte r_mhp; /* Race hit-dice modifier */ … … 762 755 s16b c_adj[A_MAX]; /* Class stat modifier */ 763 756 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 */ 781 759 782 760 s16b c_mhp; /* Class hit-dice adjustment */ … … 1140 1118 }; 1141 1119 1120 trunk/src/xtra1.c
r415 r433 1819 1819 p_ptr->see_infra = rp_ptr->infra; 1820 1820 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 } 1844 1826 1845 1827 /* Base skill -- combat (throwing) */ 1846 p_ptr->skills[SKILL_T HT] = rp_ptr->r_thb + cp_ptr->c_thb;1828 p_ptr->skills[SKILL_TO_HIT_THROW] = p_ptr->skills[SKILL_TO_HIT_BOW]; 1847 1829 1848 1830 /* Base skill -- digging */ 1849 p_ptr->skills[SKILL_DIG ] = 0;1831 p_ptr->skills[SKILL_DIGGING] = 0; 1850 1832 1851 1833 /*** Analyze player ***/ … … 1927 1909 1928 1910 /* Affect stealth */ 1929 if (f1 & (TR1_STEALTH)) p_ptr->skills[SKILL_ST L] += o_ptr->pval;1911 if (f1 & (TR1_STEALTH)) p_ptr->skills[SKILL_STEALTH] += o_ptr->pval; 1930 1912 1931 1913 /* Affect searching ability (factor of five) */ 1932 if (f1 & (TR1_SEARCH)) p_ptr->skills[SKILL_S RH] += (o_ptr->pval * 5);1914 if (f1 & (TR1_SEARCH)) p_ptr->skills[SKILL_SEARCH] += (o_ptr->pval * 5); 1933 1915 1934 1916 /* 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); 1936 1918 1937 1919 /* Affect infravision */ … … 1939 1921 1940 1922 /* 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); 1942 1924 1943 1925 /* Affect speed */ … … 2195 2177 2196 2178 /* Affect Skill -- stealth (bonus one) */ 2197 p_ptr->skills[SKILL_ST L] += 1;2179 p_ptr->skills[SKILL_STEALTH] += 1; 2198 2180 2199 2181 /* 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]]; 2202 2184 2203 2185 /* 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]]; 2205 2187 2206 2188 /* 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]]; 2208 2190 2209 2191 /* 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 } 2235 2199 2236 2200 /* Affect Skill -- combat (throwing) (Level, by Class) */ 2237 p_ptr->skills[SKILL_T HT] += (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); 2238 2202 2239 2203 /* 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; 2241 2205 2242 2206 /* Limit Skill -- stealth from 0 to 30 */ 2243 if (p_ptr->skills[SKILL_ST L] > 30) p_ptr->skills[SKILL_STL] = 30;2244 if (p_ptr->skills[SKILL_ST L] < 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; 2245 2209 2246 2210 /* Apply Skill -- Extract noise from stealth */ 2247 p_ptr->noise = (1L << (30 - p_ptr->skills[SKILL_ST L]));2211 p_ptr->noise = (1L << (30 - p_ptr->skills[SKILL_STEALTH])); 2248 2212 2249 2213 /* Obtain the "hold" value */ … … 2372 2336 2373 2337 /* 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); 2375 2339 } 2376 2340 … … 2748 2712 2749 2713 2714
