Changeset 901
- Timestamp:
- 05/16/08 12:16:53 (2 months ago)
- Files:
-
- trunk/src/defines.h (modified) (1 diff)
- trunk/src/dungeon.c (modified) (3 diffs)
- trunk/src/init1.c (modified) (1 diff)
- trunk/src/types.h (modified) (1 diff)
- trunk/src/xtra1.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/defines.h
r899 r901 1271 1271 #define TR3_HOLD_LIFE 0x00000080L /* Hold life */ 1272 1272 #define TR3_NO_FUEL 0x00000100L /* Light source uses no fuel */ 1273 #define TR3_ XXX2 0x00000200L1274 #define TR3_ XXX3 0x00000400L1273 #define TR3_IMPAIR_HP 0x00000200L /* Impair HP recovery */ 1274 #define TR3_IMPAIR_MANA 0x00000400L /* Impair MP recovery */ 1275 1275 #define TR3_XXX4 0x00000800L 1276 1276 #define TR3_IMPACT 0x00001000L /* Earthquake blows */ trunk/src/dungeon.c
r899 r901 744 744 } 745 745 746 /* Getting Faint */ 747 if (p_ptr->food < PY_FOOD_FAINT) 748 { 749 /* Faint occasionally */ 750 if (!p_ptr->timed[TMD_PARALYZED] && one_in_(10)) 751 { 752 /* Message */ 753 msg_print("You faint from the lack of food."); 754 disturb(1, 0); 755 756 /* Hack -- faint (bypass free action) */ 757 (void)inc_timed(TMD_PARALYZED, 1 + randint0(5)); 758 } 759 } 760 761 746 762 /* Starve to death (slowly) */ 747 763 if (p_ptr->food < PY_FOOD_STARVE) … … 754 770 } 755 771 772 /** Regenerate HP **/ 773 756 774 /* Default regeneration */ 757 regen_amount = PY_REGEN_NORMAL; 758 759 /* Getting Weak */ 760 if (p_ptr->food < PY_FOOD_WEAK) 761 { 762 /* Lower regeneration */ 763 if (p_ptr->food < PY_FOOD_STARVE) 764 { 765 regen_amount = 0; 766 } 767 else if (p_ptr->food < PY_FOOD_FAINT) 768 { 769 regen_amount = PY_REGEN_FAINT; 770 } 771 else 772 { 773 regen_amount = PY_REGEN_WEAK; 774 } 775 776 /* Getting Faint */ 777 if (p_ptr->food < PY_FOOD_FAINT) 778 { 779 /* Faint occasionally */ 780 if (!p_ptr->timed[TMD_PARALYZED] && one_in_(10)) 781 { 782 /* Message */ 783 msg_print("You faint from the lack of food."); 784 disturb(1, 0); 785 786 /* Hack -- faint (bypass free action) */ 787 (void)inc_timed(TMD_PARALYZED, 1 + randint0(5)); 788 } 789 } 790 } 791 792 /* Regeneration ability */ 775 if (p_ptr->food >= PY_FOOD_WEAK) 776 regen_amount = PY_REGEN_NORMAL; 777 else if (p_ptr->food < PY_FOOD_STARVE) 778 regen_amount = 0; 779 else if (p_ptr->food < PY_FOOD_FAINT) 780 regen_amount = PY_REGEN_FAINT; 781 else /* if (p_ptr->food < PY_FOOD_WEAK) */ 782 regen_amount = PY_REGEN_WEAK; 783 784 /* Various things speed up regeneration */ 793 785 if (p_ptr->regenerate) 794 { 795 regen_amount = regen_amount * 2; 796 } 797 798 /* Searching or Resting */ 786 regen_amount *= 2; 799 787 if (p_ptr->searching || p_ptr->resting) 800 { 801 regen_amount = regen_amount * 2; 802 } 803 804 /* Regenerate the mana */ 805 if (p_ptr->csp < p_ptr->msp) 806 { 807 regenmana(regen_amount); 808 } 809 810 /* Various things interfere with healing */ 788 regen_amount *= 2; 789 790 /* Some things slow it down */ 791 if (p_ptr->impair_hp) 792 regen_amount /= 2; 793 794 /* Various things interfere with physical healing */ 811 795 if (p_ptr->timed[TMD_PARALYZED]) regen_amount = 0; 812 796 if (p_ptr->timed[TMD_POISONED]) regen_amount = 0; … … 816 800 /* Regenerate Hit Points if needed */ 817 801 if (p_ptr->chp < p_ptr->mhp) 818 {819 802 regenhp(regen_amount); 820 } 803 804 805 /** Regenerate SP **/ 806 807 /* Default regeneration */ 808 regen_amount = PY_REGEN_NORMAL; 809 810 /* Various things speed up regeneration */ 811 if (p_ptr->regenerate) 812 regen_amount *= 2; 813 if (p_ptr->searching || p_ptr->resting) 814 regen_amount *= 2; 815 816 /* Some things slow it down */ 817 if (p_ptr->impair_mana) 818 regen_amount /= 2; 819 820 /* Regenerate mana */ 821 if (p_ptr->csp < p_ptr->msp) 822 regenmana(regen_amount); 823 821 824 822 825 trunk/src/init1.c
r896 r901 468 468 "HOLD_LIFE", 469 469 "NO_FUEL", 470 " XXX2",471 " XXX3",470 "IMPAIR_HP", 471 "IMPAIR_MANA", 472 472 "XXX4", 473 473 "IMPACT", trunk/src/types.h
r899 r901 953 953 954 954 bool slow_digest; /* Slower digestion */ 955 bool impair_hp; /* Slow HP regeneration */ 956 bool impair_mana; /* Slow mana regeneration */ 955 957 bool ffall; /* Feather falling */ 956 958 bool regenerate; /* Regeneration */ trunk/src/xtra1.c
r899 r901 766 766 p_ptr->free_act = FALSE; 767 767 p_ptr->slow_digest = FALSE; 768 p_ptr->impair_hp = FALSE; 769 p_ptr->impair_mana = FALSE; 768 770 p_ptr->regenerate = FALSE; 769 771 p_ptr->ffall = FALSE; … … 838 840 if (f3 & (TR3_TELEPORT)) p_ptr->teleport = TRUE; 839 841 if (f3 & (TR3_DRAIN_EXP)) p_ptr->exp_drain = TRUE; 842 if (f3 & (TR3_IMPAIR_HP)) p_ptr->impair_hp = TRUE; 843 if (f3 & (TR3_IMPAIR_MANA)) p_ptr->impair_mana = TRUE; 840 844 841 845 /* Immunity flags */ … … 937 941 if (f3 & (TR3_TELEPORT)) p_ptr->teleport = TRUE; 938 942 if (f3 & (TR3_DRAIN_EXP)) p_ptr->exp_drain = TRUE; 943 if (f3 & (TR3_IMPAIR_HP)) p_ptr->impair_hp = TRUE; 944 if (f3 & (TR3_IMPAIR_MANA)) p_ptr->impair_mana = TRUE; 939 945 940 946 /* Immunity flags */
