1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-24 08:32:34 +02:00

fix movement cost on Favorable Winds

This commit is contained in:
Andrey Filipenkov 2023-02-01 10:53:05 +03:00
parent 3fbdc3b198
commit 0c7b5ac793

View File

@ -1234,8 +1234,8 @@ int CPathfinderHelper::getMovementCost(
int ret = hero->getTileCost(*dt, *ct, ti);
if(hero->boat != nullptr && dt->terType->isWater())
{
if(ct->hasFavorableWinds() && dt->hasFavorableWinds())
ret = static_cast<int>(ret * 0.666);
if(ct->hasFavorableWinds())
ret = static_cast<int>(ret * 2.0 / 3);
}
else if(ti->hasBonusOfType(Bonus::FLYING_MOVEMENT))
vstd::amin(ret, GameConstants::BASE_MOVEMENT_COST + ti->valOfBonuses(Bonus::FLYING_MOVEMENT));