1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-16 10:19:47 +02:00
vcmi/AI/Nullkiller/Goals/Invalid.h

53 lines
829 B
C++
Raw Normal View History

2021-05-15 18:22:44 +02:00
/*
* Invalid.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 "CGoal.h"
2022-09-26 20:01:07 +02:00
namespace NKAI
{
2021-05-15 18:22:44 +02:00
struct HeroPtr;
2021-05-16 14:39:38 +02:00
class AIGateway;
2021-05-15 18:22:44 +02:00
namespace Goals
{
2022-09-26 20:01:07 +02:00
class DLL_EXPORT Invalid : public ElementarGoal<Invalid>
{
public:
Invalid()
: ElementarGoal(Goals::INVALID)
{
priority = -1;
}
2024-03-31 17:39:00 +02:00
TGoalVec decompose(const Nullkiller * ai) const override
2022-09-26 20:01:07 +02:00
{
return TGoalVec();
}
bool operator==(const Invalid & other) const override
2022-09-26 20:01:07 +02:00
{
return true;
}
std::string toString() const override
2022-09-26 20:01:07 +02:00
{
return "Invalid";
}
void accept(AIGateway * ai) override
2022-09-26 20:01:07 +02:00
{
throw cannotFulfillGoalException("Can not fulfill Invalid goal!");
}
};
}
2021-05-15 18:22:44 +02:00
}