mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-02 23:07:36 +02:00
Little, but significant improvement in AI exploration.
This commit is contained in:
parent
b4c58a5644
commit
9894deee55
@ -305,6 +305,11 @@ bool isCloser(const CGObjectInstance *lhs, const CGObjectInstance *rhs)
|
|||||||
return (ln->moveRemains > rn->moveRemains);
|
return (ln->moveRemains > rn->moveRemains);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//bool isCloser (int3 pos1, int3 pos, const CGHeroInstance * h)
|
||||||
|
//{ //TODO
|
||||||
|
// return false;
|
||||||
|
//};
|
||||||
|
|
||||||
ui64 evaluateDanger(const CGObjectInstance *obj);
|
ui64 evaluateDanger(const CGObjectInstance *obj);
|
||||||
|
|
||||||
ui64 evaluateDanger(crint3 tile)
|
ui64 evaluateDanger(crint3 tile)
|
||||||
@ -2286,7 +2291,7 @@ TSubgoal CGoal::whatToDoToAchieve()
|
|||||||
else
|
else
|
||||||
throw cannotFulfillGoalException("No heroes with remaining MPs for exploring!\n");
|
throw cannotFulfillGoalException("No heroes with remaining MPs for exploring!\n");
|
||||||
}
|
}
|
||||||
boost::sort(hs, compareHeroStrength);
|
boost::sort(hs, isCloser); //closer to what?
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user