diff --git a/Adventures in Lestoria/Player.cpp b/Adventures in Lestoria/Player.cpp index fa71250e..c82e9485 100644 --- a/Adventures in Lestoria/Player.cpp +++ b/Adventures in Lestoria/Player.cpp @@ -250,8 +250,9 @@ const int Player::GetHealth()const{ return hp; } -const float&Player::GetMaxHealth()const{ - return GetStat("Health"); +const float Player::GetMaxHealth()const{ + const float hpPctIncrease=GetStat("Health")*GetStat("Health %")/100.f; + return GetStat("Health")+hpPctIncrease; } const int Player::GetMana()const{ @@ -1525,7 +1526,7 @@ const bool Player::UsingAutoAim()const{ void Player::UpdateHealthAndMana(){ //Perform a check to make sure stats are initialized before they can be used. if(game->GameInitialized()){ - hp=std::min(hp,int(GetStat("Health"))); + hp=std::min(hp,int(GetMaxHealth())); mana=std::min(mana,GetMaxMana()); } } diff --git a/Adventures in Lestoria/Player.h b/Adventures in Lestoria/Player.h index 1dbc928c..a24fe923 100644 --- a/Adventures in Lestoria/Player.h +++ b/Adventures in Lestoria/Player.h @@ -108,7 +108,7 @@ public: const float&GetBaseStat(std::string_view a)const; void SetBaseStat(std::string_view a,float val); void SetBaseStat(ItemAttribute a,float val); - const float&GetMaxHealth()const; + const float GetMaxHealth()const; const int GetHealth()const; const int GetMana()const; const int GetMaxMana()const; diff --git a/Adventures in Lestoria/Version.h b/Adventures in Lestoria/Version.h index 9773aa31..2f5c96cd 100644 --- a/Adventures in Lestoria/Version.h +++ b/Adventures in Lestoria/Version.h @@ -39,7 +39,7 @@ All rights reserved. #define VERSION_MAJOR 1 #define VERSION_MINOR 2 #define VERSION_PATCH 3 -#define VERSION_BUILD 9420 +#define VERSION_BUILD 9424 #define stringify(a) stringify_(a) #define stringify_(a) #a diff --git a/Adventures in Lestoria/assets/gamepack.pak b/Adventures in Lestoria/assets/gamepack.pak index 96ba7977..bbf3dd5c 100644 Binary files a/Adventures in Lestoria/assets/gamepack.pak and b/Adventures in Lestoria/assets/gamepack.pak differ diff --git a/x64/Release/Adventures in Lestoria.exe b/x64/Release/Adventures in Lestoria.exe index 63358b13..036fb418 100644 Binary files a/x64/Release/Adventures in Lestoria.exe and b/x64/Release/Adventures in Lestoria.exe differ