1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-14 10:12:59 +02:00

Update FuzzyHelper.cpp

Added Multiplicative danger-modifier to citadels and castles.
This commit is contained in:
Xilmi 2024-08-15 18:14:48 +02:00
parent f0ca1c6112
commit 6193e6224f

View File

@ -145,10 +145,10 @@ ui64 FuzzyHelper::evaluateDanger(const CGObjectInstance * obj)
{ {
auto fortLevel = town->fortLevel(); auto fortLevel = town->fortLevel();
if(fortLevel == CGTownInstance::EFortLevel::CASTLE) if (fortLevel == CGTownInstance::EFortLevel::CASTLE)
danger += 10000; danger = std::max(danger * 2, danger + 10000);
else if(fortLevel == CGTownInstance::EFortLevel::CITADEL) else if(fortLevel == CGTownInstance::EFortLevel::CITADEL)
danger += 4000; danger = std::max(ui64(danger * 1.4), danger + 4000);
} }
return danger; return danger;