Automatically recalculate boosted stat after recalculating flat stat

This commit is contained in:
Deukhoofd 2019-10-23 18:28:58 +02:00
parent 65cf190367
commit 3e9d030dc4
1 changed files with 2 additions and 0 deletions

View File

@ -31,6 +31,7 @@ uint32_t Battling::BattleCreature::GetBoostedStat(Core::Statistic stat) {
void Battling::BattleCreature::RecalculateFlatStats() {
this->_flatStats = this->__Battle->GetLibrary()->GetStatCalculator()->CalculateFlatStats(this);
RecalculateBoostedStats();
}
void Battling::BattleCreature::RecalculateBoostedStats() {
this->_boostedStats = this->__Battle->GetLibrary()->GetStatCalculator()->CalculateFlatStats(this);
@ -39,6 +40,7 @@ void Battling::BattleCreature::RecalculateBoostedStats() {
void Battling::BattleCreature::RecalculateFlatStat(Core::Statistic stat) {
auto s = this->__Battle->GetLibrary()->GetStatCalculator()->CalculateFlatStat(this, stat);
this->_flatStats.SetStat(stat, s);
RecalculateBoostedStat(stat);
}
void Battling::BattleCreature::RecalculateBoostedStat(Core::Statistic stat) {