mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-12 02:28:11 +02:00
More fixes. Estates skill is now handled as a Bonus.
This commit is contained in:
parent
37cd2b7394
commit
7dce558e28
@ -167,7 +167,7 @@ CKingdomInterface::CKingdomInterface()
|
||||
std::vector<const CGHeroInstance*> heroes = LOCPLINT->cb->getHeroesInfo(true);
|
||||
for(size_t i=0; i<heroes.size();i++)
|
||||
{ //TODO: what about artifacts generating resources?
|
||||
incomesVal[7] += heroes[i]->valOfBonuses(Selector::typeSubtype(Bonus::SECONDARY_SKILL, CGHeroInstance::ESTATES));
|
||||
incomesVal[7] += heroes[i]->valOfBonuses(Selector::typeSubtype(Bonus::SECONDARY_SKILL_PREMY, CGHeroInstance::ESTATES));
|
||||
incomesVal[7] += heroes[i]->valOfBonuses(Selector::typeSubtype(Bonus::GENERATE_RESOURCE, Res::GOLD));
|
||||
}
|
||||
std::vector<const CGTownInstance*> towns = LOCPLINT->cb->getTownsInfo(true);
|
||||
|
@ -1224,6 +1224,8 @@ void CGHeroInstance::updateSkill(int which, int val)
|
||||
skillVal = 5 << (val-1); break;
|
||||
case FIRST_AID:
|
||||
skillVal = 25 + 25*val; break;
|
||||
case ESTATES:
|
||||
skillVal = 125 << (val-1); break;
|
||||
}
|
||||
|
||||
|
||||
|
@ -916,7 +916,7 @@ void CGameHandler::newTurn()
|
||||
|
||||
if(gs->day) //not first day
|
||||
{
|
||||
n.res[i->first][Res::GOLD] += h->valOfBonuses(Selector::typeSubtype(Bonus::SECONDARY_SKILL, CGHeroInstance::ESTATES)); //estates
|
||||
n.res[i->first][Res::GOLD] += h->valOfBonuses(Selector::typeSubtype(Bonus::SECONDARY_SKILL_PREMY, CGHeroInstance::ESTATES)); //estates
|
||||
|
||||
for (int k = 0; k < RESOURCE_QUANTITY; k++)
|
||||
{
|
||||
@ -948,12 +948,12 @@ void CGameHandler::newTurn()
|
||||
{
|
||||
if((**j).town->primaryRes == 127) //we'll give wood and ore
|
||||
{
|
||||
n.res[player][Res::WOOD] += 1;
|
||||
n.res[player][Res::ORE] += 1;
|
||||
n.res[player][Res::WOOD] ++;
|
||||
n.res[player][Res::ORE] ++;
|
||||
}
|
||||
else
|
||||
{
|
||||
n.res[player][(**j).town->primaryRes] += 1;
|
||||
n.res[player][(**j).town->primaryRes] ++;;
|
||||
}
|
||||
}
|
||||
n.res[player][6] += (**j).dailyIncome();
|
||||
|
Loading…
Reference in New Issue
Block a user