Changeset 421
- Timestamp:
- 08/01/07 10:47:10 (1 year ago)
- Files:
-
- trunk/lib/edit/object.txt (modified) (11 diffs)
- trunk/src/Makefile.inc (modified) (1 diff)
- trunk/src/cmd1.c (modified) (3 diffs)
- trunk/src/cmd2.c (modified) (2 diffs)
- trunk/src/effects.c (modified) (6 diffs)
- trunk/src/effects.h (modified) (2 diffs)
- trunk/src/externs.h (modified) (1 diff)
- trunk/src/melee1.c (modified) (7 diffs)
- trunk/src/spells2.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib/edit/object.txt
r415 r421 1792 1792 E:GAIN_STR 1793 1793 1794 N:226: Weakness1794 N:226:Brawn 1795 1795 G:!:d 1796 1796 I:75:16:0 1797 1797 W:3:0:4:0 1798 A:33:1 to 101799 F:EASY_KNOW 1800 E: LOSE_STR1798 A:33:10 to 20 1799 F:EASY_KNOW 1800 E:BRAWN 1801 1801 1802 1802 N:227:Restore Strength … … 1816 1816 E:GAIN_INT 1817 1817 1818 N:229: Stupidity1818 N:229:Intellect 1819 1819 G:!:d 1820 1820 I:75:17:0 … … 1822 1822 A:33:5 to 15 1823 1823 F:EASY_KNOW 1824 E: LOSE_INT1824 E:INTELLECT 1825 1825 1826 1826 N:230:Restore Intelligence … … 1840 1840 E:GAIN_WIS 1841 1841 1842 N:232: Naivety1842 N:232:Contemplation 1843 1843 G:!:d 1844 1844 I:75:18:0 … … 1846 1846 A:33:5 to 15 1847 1847 F:EASY_KNOW 1848 E: LOSE_WIS1848 E:CONTEMPLATION 1849 1849 1850 1850 N:233:Restore Wisdom … … 1864 1864 E:GAIN_CHR 1865 1865 1866 N:235: Ugliness1866 N:235:Pleasing 1867 1867 G:!:d 1868 1868 I:75:21:0 … … 1870 1870 A:33:1 to 15 1871 1871 F:EASY_KNOW 1872 E: LOSE_CHR1872 E:PLEASING 1873 1873 1874 1874 N:236:Restore Charisma … … 1888 1888 E:CURE_LIGHT 1889 1889 1890 N:238: Clumsiness1890 N:238:Nimbleness 1891 1891 G:!:d 1892 1892 I:75:19:0 … … 1894 1894 A:33:1 to 10 1895 1895 F:EASY_KNOW 1896 E: LOSE_DEX1897 1898 N:239: Sickliness1896 E:NIMBLENESS 1897 1898 N:239:Toughness 1899 1899 G:!:d 1900 1900 I:75:20:0 … … 1902 1902 A:33:1 to 10 1903 1903 F:EASY_KNOW 1904 E: LOSE_CON1904 E:TOUGHNESS 1905 1905 1906 1906 N:240:Cure Serious Wounds … … 2107 2107 E:RESIST_COLD 2108 2108 2109 N:263: See Invisible2109 N:263:True Seeing 2110 2110 G:!:d 2111 2111 I:75:25:0 trunk/src/Makefile.inc
r174 r421 26 26 $(addsuffix .o, init1 init2 randart): init.h 27 27 $(addsuffix .o, cmd4 files init1 init2 util squelch save load wizard1): z-file.h 28 28 $(addsuffic .o, init1 effects): effects.h trunk/src/cmd1.c
r400 r421 757 757 dam = damroll(1, 4); 758 758 take_hit(dam, name); 759 (void)do_dec_stat(A_STR );759 (void)do_dec_stat(A_STR, FALSE); 760 760 } 761 761 else … … 773 773 dam = damroll(1, 4); 774 774 take_hit(dam, name); 775 (void)do_dec_stat(A_DEX );775 (void)do_dec_stat(A_DEX, FALSE); 776 776 } 777 777 else … … 789 789 dam = damroll(1, 4); 790 790 take_hit(dam, name); 791 (void)do_dec_stat(A_CON );791 (void)do_dec_stat(A_CON, FALSE); 792 792 } 793 793 else trunk/src/cmd2.c
r400 r421 275 275 msg_print("A small needle has pricked you!"); 276 276 take_hit(damroll(1, 4), "a poison needle"); 277 (void)do_dec_stat(A_STR );277 (void)do_dec_stat(A_STR, FALSE); 278 278 } 279 279 … … 283 283 msg_print("A small needle has pricked you!"); 284 284 take_hit(damroll(1, 4), "a poison needle"); 285 (void)do_dec_stat(A_CON );285 (void)do_dec_stat(A_CON, FALSE); 286 286 } 287 287 trunk/src/effects.c
r420 r421 400 400 } 401 401 402 case EF_BRAWN: 403 { 404 if (do_inc_stat(A_STR)) *ident = TRUE; 405 if (dec_stat(A_INT, 10, TRUE)) *ident = TRUE; 406 return TRUE; 407 } 408 409 case EF_INTELLECT: 410 { 411 if (do_inc_stat(A_INT)) *ident = TRUE; 412 if (do_dec_stat(A_CON, TRUE)) *ident = TRUE; 413 return TRUE; 414 } 415 416 case EF_CONTEMPLATION: 417 { 418 if (do_inc_stat(A_WIS)) *ident = TRUE; 419 if (do_dec_stat(A_DEX, TRUE)) *ident = TRUE; 420 return TRUE; 421 } 422 423 case EF_TOUGHNESS: 424 { 425 if (do_inc_stat(A_CON)) *ident = TRUE; 426 if (do_dec_stat(A_CHR, TRUE)) *ident = TRUE; 427 return TRUE; 428 } 429 430 case EF_NIMBLENESS: 431 { 432 if (do_inc_stat(A_DEX)) *ident = TRUE; 433 if (do_dec_stat(A_STR, TRUE)) *ident = TRUE; 434 return TRUE; 435 } 436 437 case EF_PLEASING: 438 { 439 if (do_inc_stat(A_CHR)) *ident = TRUE; 440 if (do_dec_stat(A_WIS, TRUE)) *ident = TRUE; 441 return TRUE; 442 } 443 402 444 case EF_LOSE_STR: 403 445 case EF_LOSE_INT: … … 410 452 411 453 take_hit(damroll(5, 5), "stat drain"); 412 (void)do_dec_stat(stat );454 (void)do_dec_stat(stat, FALSE); 413 455 *ident = TRUE; 414 456 … … 419 461 { 420 462 take_hit(damroll(10, 10), "poisonous food"); 421 (void)do_dec_stat(A_CON );463 (void)do_dec_stat(A_CON, FALSE); 422 464 *ident = TRUE; 423 465 … … 485 527 case EF_TMD_INFRA: 486 528 { 487 if (inc_timed(TMD_SINFRA, 100 + damroll(4, 25))) 488 *ident = TRUE; 529 if (inc_timed(TMD_SINFRA, 100 + damroll(4, 25))) *ident = TRUE; 489 530 return TRUE; 490 531 } … … 492 533 case EF_TMD_SINVIS: 493 534 { 494 if ( inc_timed(TMD_SINVIS, 12 + damroll(2, 6)))495 *ident = TRUE;535 if (clear_timed(TMD_BLIND)) *ident = TRUE; 536 if (inc_timed(TMD_SINVIS, 12 + damroll(2, 6))) *ident = TRUE; 496 537 return TRUE; 497 538 } … … 500 541 { 501 542 if (clear_timed(TMD_BLIND)) *ident = TRUE; 502 if (inc_timed(TMD_TELEPATHY, 12 + damroll(6, 6))) 503 *ident = TRUE; 543 if (inc_timed(TMD_TELEPATHY, 12 + damroll(6, 6))) *ident = TRUE; 504 544 return TRUE; 505 545 } trunk/src/effects.h
r420 r421 84 84 EFFECT(GAIN_CHR, FALSE, "restores and increases your charisma") 85 85 EFFECT(GAIN_ALL, FALSE, "restores and increases all your stats") 86 EFFECT(BRAWN, FALSE, "raises your strength at the expense of your intelligence") 87 EFFECT(INTELLECT, FALSE, "raises your intelligence at the expense of your constitution") 88 EFFECT(CONTEMPLATION, FALSE, "raises your wisdom at the expense of your dexterity") 89 EFFECT(TOUGHNESS, FALSE, "raises your constitution at the expense of your charisma") 90 EFFECT(NIMBLENESS, FALSE, "raises your dexterity at the expense of your strength") 91 EFFECT(PLEASING, FALSE, "raises your charisma at the expense of your wisdom") 86 92 EFFECT(LOSE_STR, FALSE, "reduces your strength with damage 5d5") 87 93 EFFECT(LOSE_INT, FALSE, "reduces your intelligence with damage 5d5") … … 102 108 103 109 EFFECT(TMD_INFRA, FALSE, "extends your infravision by 50 feet for 4d25+100 turns") 104 EFFECT(TMD_SINVIS, FALSE, " allows you to see invisible things for 2d6+12 turns")105 EFFECT(TMD_ESP, FALSE, " gives you telepathy for 6d6+12 turns and cures blindness")110 EFFECT(TMD_SINVIS, FALSE, "cures blindness and allows you to see invisible things for 2d6+12 turns") 111 EFFECT(TMD_ESP, FALSE, "cures blindness and gives you telepathy for 6d6+12 turns") 106 112 107 113 EFFECT(ENLIGHTENMENT, FALSE, "completely lights up and magically maps the level") trunk/src/externs.h
r420 r421 518 518 extern bool heal_player(int perc, int min); 519 519 extern void warding_glyph(void); 520 extern bool do_dec_stat(int stat );520 extern bool do_dec_stat(int stat, bool perma); 521 521 extern bool do_res_stat(int stat); 522 522 extern bool do_inc_stat(int stat); trunk/src/melee1.c
r399 r421 965 965 966 966 /* Damage (stat) */ 967 if (do_dec_stat(A_STR )) obvious = TRUE;967 if (do_dec_stat(A_STR, FALSE)) obvious = TRUE; 968 968 969 969 break; … … 976 976 977 977 /* Damage (stat) */ 978 if (do_dec_stat(A_INT )) obvious = TRUE;978 if (do_dec_stat(A_INT, FALSE)) obvious = TRUE; 979 979 980 980 break; … … 987 987 988 988 /* Damage (stat) */ 989 if (do_dec_stat(A_WIS )) obvious = TRUE;989 if (do_dec_stat(A_WIS, FALSE)) obvious = TRUE; 990 990 991 991 break; … … 998 998 999 999 /* Damage (stat) */ 1000 if (do_dec_stat(A_DEX )) obvious = TRUE;1000 if (do_dec_stat(A_DEX, FALSE)) obvious = TRUE; 1001 1001 1002 1002 break; … … 1009 1009 1010 1010 /* Damage (stat) */ 1011 if (do_dec_stat(A_CON )) obvious = TRUE;1011 if (do_dec_stat(A_CON, FALSE)) obvious = TRUE; 1012 1012 1013 1013 break; … … 1020 1020 1021 1021 /* Damage (stat) */ 1022 if (do_dec_stat(A_CHR )) obvious = TRUE;1022 if (do_dec_stat(A_CHR, FALSE)) obvious = TRUE; 1023 1023 1024 1024 break; … … 1031 1031 1032 1032 /* Damage (stats) */ 1033 if (do_dec_stat(A_STR )) obvious = TRUE;1034 if (do_dec_stat(A_DEX )) obvious = TRUE;1035 if (do_dec_stat(A_CON )) obvious = TRUE;1036 if (do_dec_stat(A_INT )) obvious = TRUE;1037 if (do_dec_stat(A_WIS )) obvious = TRUE;1038 if (do_dec_stat(A_CHR )) obvious = TRUE;1033 if (do_dec_stat(A_STR, FALSE)) obvious = TRUE; 1034 if (do_dec_stat(A_DEX, FALSE)) obvious = TRUE; 1035 if (do_dec_stat(A_CON, FALSE)) obvious = TRUE; 1036 if (do_dec_stat(A_INT, FALSE)) obvious = TRUE; 1037 if (do_dec_stat(A_WIS, FALSE)) obvious = TRUE; 1038 if (do_dec_stat(A_CHR, FALSE)) obvious = TRUE; 1039 1039 1040 1040 break; trunk/src/spells2.c
r420 r421 151 151 * Lose a "point" 152 152 */ 153 bool do_dec_stat(int stat )153 bool do_dec_stat(int stat, bool perma) 154 154 { 155 155 bool sust = FALSE; … … 178 178 179 179 /* Attempt to reduce the stat */ 180 if (dec_stat(stat, 10, FALSE))180 if (dec_stat(stat, 10, perma)) 181 181 { 182 182 /* Message */
