2021-05-15 18:23:05 +02:00
|
|
|
#pragma once
|
|
|
|
|
2021-05-15 18:23:38 +02:00
|
|
|
#include "PriorityEvaluator.h"
|
|
|
|
#include "../Goals/AbstractGoal.h"
|
|
|
|
#include "../Behaviors/Behavior.h"
|
|
|
|
|
2021-05-15 18:23:05 +02:00
|
|
|
class Nullkiller
|
|
|
|
{
|
2021-05-15 18:23:38 +02:00
|
|
|
private:
|
|
|
|
std::unique_ptr<PriorityEvaluator> priorityEvaluator;
|
2021-05-15 20:27:22 +02:00
|
|
|
HeroPtr activeHero;
|
2021-05-15 18:23:38 +02:00
|
|
|
|
2021-05-15 18:23:05 +02:00
|
|
|
public:
|
2021-05-15 18:23:38 +02:00
|
|
|
Nullkiller();
|
2021-05-15 18:23:05 +02:00
|
|
|
void makeTurn();
|
2021-05-15 20:27:22 +02:00
|
|
|
bool isActive(const CGHeroInstance * hero) const { return activeHero.h == hero; }
|
2021-05-15 20:56:31 +02:00
|
|
|
void setActive(const HeroPtr & hero) { activeHero = hero; }
|
2021-05-15 18:23:38 +02:00
|
|
|
|
|
|
|
private:
|
|
|
|
Goals::TSubgoal choseBestTask(Behavior & behavior);
|
|
|
|
Goals::TSubgoal choseBestTask(Goals::TGoalVec tasks);
|
2021-05-15 18:23:05 +02:00
|
|
|
};
|