1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-26 03:52:01 +02:00

Use new interface

This commit is contained in:
Tomasz Zieliński 2023-07-09 11:35:50 +02:00 committed by Andrii Danylchenko
parent 69ceee5dd6
commit 5bffea0aac

View File

@ -727,8 +727,8 @@ public:
if(defendTown.getTurn() > 0 && defendTown.isContrAttack())
{
auto ourSpeed = defendTown.hero->maxMovePoints(true);
auto enemySpeed = treat.hero->maxMovePoints(true);
auto ourSpeed = defendTown.hero->movementPointsLimit(true);
auto enemySpeed = treat.hero->movementPointsLimit(true);
if(enemySpeed > ourSpeed) multiplier *= 0.7f;
}
@ -894,7 +894,7 @@ public:
const CGHeroInstance * dismissedHero = dismissCommand.getHero().get();
auto role = ai->heroManager->getHeroRole(dismissedHero);
auto mpLeft = dismissedHero->movement;
auto mpLeft = dismissedHero->movementPointsRemaining();
evaluationContext.movementCost += mpLeft;
evaluationContext.movementCostByRole[role] += mpLeft;