1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00
Files
vcmi/AI/Nullkiller2/Behaviors/DefenceBehavior.h

47 lines
966 B
C++
Raw Normal View History

2025-08-13 14:41:15 +02:00
/*
* DefenceBehavior.h, part of VCMI engine
*
* Authors: listed in file AUTHORS in main folder
*
* License: GNU General Public License v2.0 or later
* Full text of license available in license.txt file, in main folder
*
*/
#pragma once
#include "lib/GameLibrary.h"
#include "../Goals/CGoal.h"
#include "../AIUtility.h"
2025-08-13 17:16:27 +02:00
namespace NK2AI
2025-08-13 14:41:15 +02:00
{
struct HitMapInfo;
namespace Goals
{
class DefenceBehavior : public CGoal<DefenceBehavior>
{
public:
DefenceBehavior()
:CGoal(DEFENCE)
{
}
Goals::TGoalVec decompose(const Nullkiller * aiNk) const override;
2025-08-13 14:41:15 +02:00
std::string toString() const override;
bool operator==(const DefenceBehavior & other) const override
{
return true;
}
private:
void evaluateDefence(Goals::TGoalVec & tasks, const CGTownInstance * town, const Nullkiller * aiNk) const;
2025-09-13 04:24:29 +02:00
static void evaluateRecruitingHero(Goals::TGoalVec & tasks, const HitMapInfo & threat, const CGTownInstance * town, const Nullkiller * aiNk);
2025-08-13 14:41:15 +02:00
};
}
}