mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-17 01:32:21 +02:00
fix movement cost on Favorable Winds
This commit is contained in:
@ -1234,8 +1234,8 @@ int CPathfinderHelper::getMovementCost(
|
|||||||
int ret = hero->getTileCost(*dt, *ct, ti);
|
int ret = hero->getTileCost(*dt, *ct, ti);
|
||||||
if(hero->boat != nullptr && dt->terType->isWater())
|
if(hero->boat != nullptr && dt->terType->isWater())
|
||||||
{
|
{
|
||||||
if(ct->hasFavorableWinds() && dt->hasFavorableWinds())
|
if(ct->hasFavorableWinds())
|
||||||
ret = static_cast<int>(ret * 0.666);
|
ret = static_cast<int>(ret * 2.0 / 3);
|
||||||
}
|
}
|
||||||
else if(ti->hasBonusOfType(Bonus::FLYING_MOVEMENT))
|
else if(ti->hasBonusOfType(Bonus::FLYING_MOVEMENT))
|
||||||
vstd::amin(ret, GameConstants::BASE_MOVEMENT_COST + ti->valOfBonuses(Bonus::FLYING_MOVEMENT));
|
vstd::amin(ret, GameConstants::BASE_MOVEMENT_COST + ti->valOfBonuses(Bonus::FLYING_MOVEMENT));
|
||||||
|
Reference in New Issue
Block a user