Skip to content

Commit

Permalink
Cleaned up Dilapidated Tome calculation again
Browse files Browse the repository at this point in the history
  • Loading branch information
SoundChaser83 committed May 14, 2022
1 parent 5b4f504 commit d5fb47a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
2 changes: 1 addition & 1 deletion Source/items.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2809,7 +2809,7 @@ void CalcPlrItemVals(Player &player, bool loadgfx)
player._pMaxMana = imana + player._pMaxManaBase;
player._pMana = std::min(imana + player._pManaBase, player._pMaxMana);

int hpToMagic = player.GetHPtoMagic();
int hpToMagic = std::max(((player._pMaxHP >> 6) - (player._pMaxMana >> 6)) / 2, 0);
if (player.tookDilapShrine) {
player._pMagic += hpToMagic;

Expand Down
12 changes: 0 additions & 12 deletions Source/player.h
Original file line number Diff line number Diff line change
Expand Up @@ -413,18 +413,6 @@ struct Player {
*/
void Reset();

/**
* @brief Used to calculate the HP to magic conversion for Dilapated Tome
*/
int GetHPtoMagic() const
{
int hpToMagic = ((_pMaxHP >> 6) - (_pMaxMana >> 6)) / 2;
if (hpToMagic < 0)
hpToMagic = 0;

return hpToMagic;
}

/**
* @brief Return player's armor value
*/
Expand Down

0 comments on commit d5fb47a

Please sign in to comment.