Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HP and Pw multiplication (trunk only)
Fix the problem pointed out by <email deleted> where polymorphing into a new man at level 1 could be used to approximately double or triple your hit points and spell power. With means to drain level back down to 1 and with amulets of life saving to survive those times you lose levels instead of gain, you could do this repeatedly and end up with HP and Pw values in the millions. This uses the earlier patch that records the HP and Pw increments from level gains. Now when polymorphing into a new man, level based HP and Pw are removed from the current values, remainder get multiplied by 80%, 90%, 100%, or 110% (average 95%, so tend to drop slightly), then a brand new set of level gain increments (reflecting new man's Con and Wis) are added in. Code for calculating spell energy is moved from pluslvl() and u_init() into new routine newpw(). It and newhp() take over responsibility for remembering the level based increments from pluslvl() which didn't deal with the initial amount (stored in slot [0]; earlier patch didn't need it).
- Loading branch information
nethack.rankin
committed
Sep 21, 2005
1 parent
25a9c0c
commit 5bc6f14
Showing
6 changed files
with
102 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters