1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-01 00:45:26 +02:00

CGameState::initStartingBonus: fix amounts for wood and ore bonus

In original game when wood and ore bonus is choosen you always get same amount of both resources.
This commit is contained in:
Arseniy Shestakov
2016-01-15 20:36:16 +03:00
parent 530fe04c75
commit 725cce368f

View File

@ -1665,8 +1665,9 @@ void CGameState::initStartingBonus()
int res = VLC->townh->factions[scenarioOps->playerInfos[elem.first].castle]->town->primaryRes;
if(res == Res::WOOD_AND_ORE)
{
elem.second.resources[Res::WOOD] += rand.nextInt(5, 10);
elem.second.resources[Res::ORE] += rand.nextInt(5, 10);
int amount = rand.nextInt(5, 10);
elem.second.resources[Res::WOOD] += amount;
elem.second.resources[Res::ORE] += amount;
}
else
{