mirror of
https://github.com/vcmi/vcmi.git
synced 2025-02-03 13:01:33 +02:00
Merge pull request #3594 from vcmi/fix-3550
#3550 - fix case when unit is in reachability map but only next turn
This commit is contained in:
commit
ec5c44bb92
@ -843,7 +843,7 @@ bool BattleExchangeEvaluator::checkPositionBlocksOurStacks(HypotheticBattle & hb
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!reachable && vstd::contains(reachabilityMap[hex], unit))
|
if(!reachable && std::count(reachabilityMap[hex].begin(), reachabilityMap[hex].end(), unit) > 1)
|
||||||
{
|
{
|
||||||
blockingScore += ratio * (enemyUnit ? BLOCKING_OWN_ATTACK_PENALTY : BLOCKING_OWN_MOVE_PENALTY);
|
blockingScore += ratio * (enemyUnit ? BLOCKING_OWN_ATTACK_PENALTY : BLOCKING_OWN_MOVE_PENALTY);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user