diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-05-09 15:11:02 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-05-09 15:11:02 +0000 |
commit | f96d8199faaf5021b5f43cef2aa24d13c4ad2f91 (patch) | |
tree | 44aa37ad7aa884aec7f55cf336c60e54110364a9 | |
parent | e60662a6937932155cbb3e82df1cac59bf783c77 (diff) | |
download | crawl-ref-f96d8199faaf5021b5f43cef2aa24d13c4ad2f91.tar.gz crawl-ref-f96d8199faaf5021b5f43cef2aa24d13c4ad2f91.zip |
Properly enforce the aforementioned limitation if the player gets the
robust mutation while divine robustness is in effect.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4949 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r-- | crawl-ref/source/skills2.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/crawl-ref/source/skills2.cc b/crawl-ref/source/skills2.cc index 2c8f655f44..e4bce9eceb 100644 --- a/crawl-ref/source/skills2.cc +++ b/crawl-ref/source/skills2.cc @@ -2110,10 +2110,12 @@ int calc_hp(bool real_hp) } } + // limit combined robust mutations and divine robustness to 3 + const int robust = std::min(player_mutation_level(MUT_ROBUST) + + you.attribute[ATTR_DIVINE_ROBUSTNESS], 3); + // frail and robust mutations, and divine robustness - hitp *= (10 + player_mutation_level(MUT_ROBUST) - + you.attribute[ATTR_DIVINE_ROBUSTNESS] - - player_mutation_level(MUT_FRAIL)); + hitp *= (10 + robust - player_mutation_level(MUT_FRAIL)); hitp /= 10; you.hp_max = hitp; |