summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/skills2.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-06 20:14:35 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-06 20:14:35 +0000
commit44d7fbb36c55859117824fe25a298afbe437221b (patch)
tree8854c7d492879cb8ddda79ca91f44d964c5828a9 /crawl-ref/source/skills2.cc
parentb847d4bad842066f8721cf68650d5087528e8486 (diff)
downloadcrawl-ref-44d7fbb36c55859117824fe25a298afbe437221b.tar.gz
crawl-ref-44d7fbb36c55859117824fe25a298afbe437221b.zip
Fix 1870427: Max hp misreported if frail and rotted.
Fix 2002931: feature_item_brand not working No, it's not the important bugs, but at least these are bugs I can reproduce. :P git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6433 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/skills2.cc')
-rw-r--r--crawl-ref/source/skills2.cc38
1 files changed, 1 insertions, 37 deletions
diff --git a/crawl-ref/source/skills2.cc b/crawl-ref/source/skills2.cc
index 3b7e045ecf..9653007a8b 100644
--- a/crawl-ref/source/skills2.cc
+++ b/crawl-ref/source/skills2.cc
@@ -2188,43 +2188,7 @@ void init_skill_order( void )
int calc_hp(bool real_hp)
{
- int hitp;
-
- hitp = (you.base_hp - 5000) + (you.base_hp2 - 5000);
- hitp += (you.experience_level * you.skills[SK_FIGHTING]) / 5;
-
- // being berserk makes you resistant to damage. I don't know why.
- if (you.duration[DUR_BERSERKER] && !real_hp)
- {
- hitp *= 15;
- hitp /= 10;
- }
-
- if (!real_hp)
- {
- // some transformations give you extra hp
- switch (you.attribute[ATTR_TRANSFORMATION])
- {
- case TRAN_STATUE:
- hitp *= 15;
- hitp /= 10;
- break;
- case TRAN_ICE_BEAST:
- hitp *= 12;
- hitp /= 10;
- break;
- case TRAN_DRAGON:
- hitp *= 16;
- hitp /= 10;
- break;
- }
- }
-
- // 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;
+ int hitp = get_real_hp(!real_hp, false);
you.hp_max = hitp;