mirror of
https://github.com/vcmi/vcmi.git
synced 2025-02-03 13:01:33 +02:00
Use new interface
This commit is contained in:
parent
69ceee5dd6
commit
5bffea0aac
@ -727,8 +727,8 @@ public:
|
|||||||
|
|
||||||
if(defendTown.getTurn() > 0 && defendTown.isContrAttack())
|
if(defendTown.getTurn() > 0 && defendTown.isContrAttack())
|
||||||
{
|
{
|
||||||
auto ourSpeed = defendTown.hero->maxMovePoints(true);
|
auto ourSpeed = defendTown.hero->movementPointsLimit(true);
|
||||||
auto enemySpeed = treat.hero->maxMovePoints(true);
|
auto enemySpeed = treat.hero->movementPointsLimit(true);
|
||||||
|
|
||||||
if(enemySpeed > ourSpeed) multiplier *= 0.7f;
|
if(enemySpeed > ourSpeed) multiplier *= 0.7f;
|
||||||
}
|
}
|
||||||
@ -894,7 +894,7 @@ public:
|
|||||||
const CGHeroInstance * dismissedHero = dismissCommand.getHero().get();
|
const CGHeroInstance * dismissedHero = dismissCommand.getHero().get();
|
||||||
|
|
||||||
auto role = ai->heroManager->getHeroRole(dismissedHero);
|
auto role = ai->heroManager->getHeroRole(dismissedHero);
|
||||||
auto mpLeft = dismissedHero->movement;
|
auto mpLeft = dismissedHero->movementPointsRemaining();
|
||||||
|
|
||||||
evaluationContext.movementCost += mpLeft;
|
evaluationContext.movementCost += mpLeft;
|
||||||
evaluationContext.movementCostByRole[role] += mpLeft;
|
evaluationContext.movementCostByRole[role] += mpLeft;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user