]> granicus.if.org Git - nethack/commit
HP and Pw multiplication (trunk only)
authornethack.rankin <nethack.rankin>
Wed, 21 Sep 2005 05:31:42 +0000 (05:31 +0000)
committernethack.rankin <nethack.rankin>
Wed, 21 Sep 2005 05:31:42 +0000 (05:31 +0000)
commit5bc6f1444ea32f17d5ef74aff89307b4cc6e2ea9
tree5dbc64d9cace959a68a362d2cf72138cd2fc3c02
parent25a9c0ca4b74f0b9079caef954e99950286d75cd
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).
doc/fixes35.0
include/extern.h
src/attrib.c
src/exper.c
src/polyself.c
src/u_init.c