mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6019 3b4a5df2-a311-0410-b5c6-a8a6f20db521
62 lines
2.0 KiB
C++
62 lines
2.0 KiB
C++
/**
|
|
* @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
|
|
|