mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-01 00:45:26 +02:00
- fixed #1375
- damage done by turrets is properly increased by built buldings
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user