Automatically recalculate boosted stat after recalculating flat stat
This commit is contained in:
parent
65cf190367
commit
3e9d030dc4
|
@ -31,6 +31,7 @@ uint32_t Battling::BattleCreature::GetBoostedStat(Core::Statistic stat) {
|
||||||
|
|
||||||
void Battling::BattleCreature::RecalculateFlatStats() {
|
void Battling::BattleCreature::RecalculateFlatStats() {
|
||||||
this->_flatStats = this->__Battle->GetLibrary()->GetStatCalculator()->CalculateFlatStats(this);
|
this->_flatStats = this->__Battle->GetLibrary()->GetStatCalculator()->CalculateFlatStats(this);
|
||||||
|
RecalculateBoostedStats();
|
||||||
}
|
}
|
||||||
void Battling::BattleCreature::RecalculateBoostedStats() {
|
void Battling::BattleCreature::RecalculateBoostedStats() {
|
||||||
this->_boostedStats = this->__Battle->GetLibrary()->GetStatCalculator()->CalculateFlatStats(this);
|
this->_boostedStats = this->__Battle->GetLibrary()->GetStatCalculator()->CalculateFlatStats(this);
|
||||||
|
@ -39,6 +40,7 @@ void Battling::BattleCreature::RecalculateBoostedStats() {
|
||||||
void Battling::BattleCreature::RecalculateFlatStat(Core::Statistic stat) {
|
void Battling::BattleCreature::RecalculateFlatStat(Core::Statistic stat) {
|
||||||
auto s = this->__Battle->GetLibrary()->GetStatCalculator()->CalculateFlatStat(this, stat);
|
auto s = this->__Battle->GetLibrary()->GetStatCalculator()->CalculateFlatStat(this, stat);
|
||||||
this->_flatStats.SetStat(stat, s);
|
this->_flatStats.SetStat(stat, s);
|
||||||
|
RecalculateBoostedStat(stat);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Battling::BattleCreature::RecalculateBoostedStat(Core::Statistic stat) {
|
void Battling::BattleCreature::RecalculateBoostedStat(Core::Statistic stat) {
|
||||||
|
|
Loading…
Reference in New Issue