Add Heal function for monsters. Make player stat functions const return. Add Missing Health bonus stat from buffs. Refactor names of stat functions to be more explicit. Add more stat buff and pct buff checks. Fix up discrepancies with how stat up buffs work for the player. 53/53 passing tests.

This commit is contained in:
2024-06-28 01:59:18 -05:00
parent 048f2cce74
commit 6ea8588feb
14 changed files with 225 additions and 88 deletions
@@ -65,7 +65,7 @@ namespace CharacterMenuWindow{
const static std::array<AttributeData,7>displayAttrs{
AttributeData{"Health",[]()->int{return game->GetPlayer()->GetMaxHealth();}},
AttributeData{"Attack",[]()->int{return game->GetPlayer()->GetAttack();}},
AttributeData{"Defense",[]()->int{return game->GetPlayer()->GetStat("Defense");}},
AttributeData{"Defense",[]()->int{return game->GetPlayer()->GetDefense();}},
AttributeData{"Move Spd %",[]()->int{return ceil(game->GetPlayer()->GetMoveSpdMult()*100);}},
AttributeData{"CDR",[]()->int{return ceil(game->GetPlayer()->GetCooldownReductionPct()*100);}},
AttributeData{"Crit Rate",[]()->int{return ceil(game->GetPlayer()->GetCritRatePct()*100);}},
@@ -178,7 +178,7 @@ void Menu::InitializeCharacterMenuWindow(){
const static auto GetLabelText=[](ItemAttribute attribute){
std::string attrStr=std::string(attribute.Name())+"\n ";
attrStr+=std::to_string(game->GetPlayer()->GetStat(attribute));
attrStr+=std::to_string(game->GetPlayer()->GetEquipStat(attribute));
if(attribute.DisplayAsPercent()){
attrStr+="%";
}