Added missing from ModularizedTacticalAI :/

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6019 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
feynman
2013-04-18 21:14:34 +00:00
parent 26383d83a8
commit aa5bed7850
10 changed files with 439 additions and 0 deletions
+61
View File
@@ -0,0 +1,61 @@
/**
* @file
* @author feynman (bears-pit.com)
*/
#ifndef CROW_PLAN_H_
#define CROW_PLAN_H_
#include "Plan.h"
namespace AI
{
namespace tactical
{
/**@class CrowSeekCorpsePlan
* @brief Component/Concrete Product. Let a crow seek a corpse within 4 tiles radius, and go towards it.
*/
class CrowSeekCorpsePlan : public Plan
{
private:
/// The location of the corpse the crow shall go to
int corpse_grid_;
public:
CrowSeekCorpsePlan(SOLDIERTYPE* npc);
virtual void execute(PlanInputData& environment);
/// The plan is marked as 'done' when the 'sweet spot' near the corpse is reached
virtual bool done() const;
int get_corpse_grid() const;
};
/**@class CrowPeckPlan
* @brief Component/Concrete Product. Let a crow sitting next to a corpse peck.
*/
class CrowPeckPlan : public Plan
{
private:
int corpse_grid_;
public:
CrowPeckPlan(SOLDIERTYPE* npc, int corpse_grid);
virtual void execute(PlanInputData& environment);
/// The plan never ends without interrupt/plan update, pecking can take forever
virtual bool done() const {return false;}
};
/**@class CrowFlyAwayPlan
* @brief Component/Concrete Product. Let a crow leave the tactical screen.
*/
class CrowFlyAwayPlan : public Plan
{
private:
public:
CrowFlyAwayPlan(SOLDIERTYPE* npc);
virtual void execute(PlanInputData& environment);
/// The plan is deleted with the crow once it leaves; 'done' is meaningless, flying away cannot be interrupted
virtual bool done() const {return false;}
};
}
}
#endif