mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-29 23:07:48 +02:00
Nullkiller: capture guarded artifacts and other fixes
This commit is contained in:
committed by
Andrii Danylchenko
parent
1fd838a5b9
commit
5344df51c6
@@ -123,9 +123,6 @@ Goals::TGoalVec CaptureObjectsBehavior::getTasks()
|
||||
if(ai->nullkiller->arePathHeroesLocked(way->getPath()))
|
||||
continue;
|
||||
|
||||
if(ai->nullkiller->getHeroLockedReason(way->hero.get()) == HeroLockedReason::STARTUP)
|
||||
continue;
|
||||
|
||||
way->evaluationContext.closestWayRatio
|
||||
= closestWay->evaluationContext.movementCost / way->evaluationContext.movementCost;
|
||||
|
||||
@@ -149,7 +146,6 @@ Goals::TGoalVec CaptureObjectsBehavior::getTasks()
|
||||
bool CaptureObjectsBehavior::shouldVisitObject(ObjectIdRef obj) const
|
||||
{
|
||||
const CGObjectInstance* objInstance = obj;
|
||||
|
||||
if(!objInstance)
|
||||
return false;
|
||||
|
||||
@@ -162,6 +158,11 @@ bool CaptureObjectsBehavior::shouldVisitObject(ObjectIdRef obj) const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if(isObjectRemovable(obj))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
const int3 pos = objInstance->visitablePos();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user