mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-16 10:19:47 +02:00
29 lines
760 B
C++
29 lines
760 B
C++
#pragma once
|
|
|
|
#include "PriorityEvaluator.h"
|
|
#include "DangerHitMapAnalyzer.h"
|
|
#include "../Goals/AbstractGoal.h"
|
|
#include "../Behaviors/Behavior.h"
|
|
|
|
class Nullkiller
|
|
{
|
|
private:
|
|
std::unique_ptr<PriorityEvaluator> priorityEvaluator;
|
|
HeroPtr activeHero;
|
|
std::set<HeroPtr> lockedHeroes;
|
|
|
|
public:
|
|
std::unique_ptr<DangerHitMapAnalyzer> dangerHitMap;
|
|
|
|
Nullkiller();
|
|
void makeTurn();
|
|
bool isActive(const CGHeroInstance * hero) const { return activeHero.h == hero; }
|
|
void setActive(const HeroPtr & hero) { activeHero = hero; }
|
|
void lockHero(const HeroPtr & hero) { lockedHeroes.insert(hero); }
|
|
|
|
private:
|
|
void resetAiState();
|
|
void updateAiState();
|
|
Goals::TSubgoal choseBestTask(Behavior & behavior);
|
|
Goals::TSubgoal choseBestTask(Goals::TGoalVec tasks);
|
|
}; |