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:
parent
f0ca1c6112
commit
6193e6224f
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user