This commit is contained in:
aozhiwei 2023-04-13 13:33:51 +08:00
parent cae1fcb69f
commit 167033e9e9

View File

@ -752,7 +752,12 @@ float BattleDataContext::GetTotalAtk(IBullet* bullet)
float BattleDataContext::GetMaxHP() float BattleDataContext::GetMaxHP()
{ {
return hero_ability_->GetHP(); float hp = hero_ability_->GetHP();
hp += owner_.Get()->GetAbility()->GetAttrAbs(kHAT_Hp);
hp *= 1.0f + owner_.Get()->GetAbility()->GetAttrRate(kHAT_Hp);
hp *= 1.0f + owner_.Get()->GetAbility()->GetAttrAddition(kHAT_Hp) -
owner_.Get()->GetAbility()->GetAttrRuduce(kHAT_Hp);
return hp;
} }
float BattleDataContext::GetDef() float BattleDataContext::GetDef()