mirror of
https://github.com/vcmi/vcmi.git
synced 2025-12-01 23:12:49 +02:00
Nullkiller: rework prioritization, add hero roles, skills and other variables
This commit is contained in:
committed by
Andrii Danylchenko
parent
531d0af95b
commit
5fe2630c64
@@ -330,7 +330,10 @@ void AINodeStorage::calculateHeroChain(
|
||||
AIPathNode * other,
|
||||
std::vector<ExchangeCandidate> & result) const
|
||||
{
|
||||
if(carrier->actor->canExchange(other->actor))
|
||||
if(carrier->armyLoss < carrier->actor->armyValue
|
||||
&& (carrier->action != CGPathNode::BATTLE || carrier->actor->allowBattle && carrier->specialAction)
|
||||
&& other->armyLoss < other->actor->armyValue
|
||||
&& carrier->actor->canExchange(other->actor))
|
||||
{
|
||||
#if VCMI_TRACE_PATHFINDER >= 2
|
||||
logAi->trace(
|
||||
|
||||
Reference in New Issue
Block a user