mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-04 00:15:53 +02:00
Update DefenceBehavior.cpp
A town will no longer communitcate that it doesn't need defenses, when it currently has a garrisioned hero. Because otherwise the garrisoned hero would just leave and let the town undefended.
This commit is contained in:
parent
909c308614
commit
38da53135b
@ -158,11 +158,6 @@ void DefenceBehavior::evaluateDefence(Goals::TGoalVec & tasks, const CGTownInsta
|
|||||||
|
|
||||||
threats.push_back(threatNode.fastestDanger); // no guarantee that fastest danger will be there
|
threats.push_back(threatNode.fastestDanger); // no guarantee that fastest danger will be there
|
||||||
|
|
||||||
if(town->garrisonHero && handleGarrisonHeroFromPreviousTurn(town, tasks, ai))
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!threatNode.fastestDanger.hero)
|
if(!threatNode.fastestDanger.hero)
|
||||||
{
|
{
|
||||||
logAi->trace("No threat found for town %s", town->getNameTranslated());
|
logAi->trace("No threat found for town %s", town->getNameTranslated());
|
||||||
|
Loading…
Reference in New Issue
Block a user