1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-01 00:45:26 +02:00
- damage done by turrets is properly increased by built buldings
This commit is contained in:
Ivan Savenko
2013-07-22 16:23:23 +00:00
parent 13acb58d55
commit a719e03b30
5 changed files with 25 additions and 17 deletions

View File

@ -2616,6 +2616,15 @@ bool CGTownInstance::armedGarrison() const
return stacksCount() || garrisonHero;
}
int CGTownInstance::getTownLevel() const
{
// count all buildings that are not upgrades
return boost::range::count_if(builtBuildings, [&](const BuildingID & build)
{
return town->buildings[build] && town->buildings[build]->upgrade == -1;
});
}
CBonusSystemNode * CGTownInstance::whatShouldBeAttached()
{
return &townAndVis;