1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-03-29 21:56:54 +02:00

Merge pull request #1821 from rilian-la-te/remove-cove-hardcode

CTownHandler: remove hardcoded Cove grail
This commit is contained in:
Ivan Savenko 2023-04-02 00:20:49 +03:00 committed by GitHub
commit 4d6b88f10d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -485,15 +485,6 @@ void CTownHandler::addBonusesForVanilaBuilding(CBuilding * building) const
{
b = createBonus(building, Bonus::MORALE, +1);
}
else if(building->bid == BuildingID::GRAIL
&& building->town->faction != nullptr
&& boost::algorithm::ends_with(building->town->faction->getJsonKey(), ":cove"))
{
static TPropagatorPtr allCreaturesPropagator(new CPropagatorNodeType(CBonusSystemNode::ENodeTypes::ALL_CREATURES));
static auto factionLimiter = std::make_shared<CreatureFactionLimiter>(building->town->faction->getIndex());
b = createBonus(building, Bonus::NO_TERRAIN_PENALTY, 0, allCreaturesPropagator);
b->addLimiter(factionLimiter);
}
}
else
{