Vegastrike 0.5.1 rc1  1.0
Original sources for Vegastrike Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Orders::Ikarus Class Reference

#include <ikarus.h>

Inheritance diagram for Orders::Ikarus:
Orders::AggressiveAI Orders::FireAt CommunicatingAI Order

Public Member Functions

 Ikarus ()
 
virtual void Execute ()
 you can ignore the function below unless it causes problems...this merely makes it so that the AI responds to your commands More...
 
virtual string getOrderDescription ()
 
- Public Member Functions inherited from Orders::AggressiveAI
virtual void SetParent (Unit *parent1)
 Sets the parent of this Unit. Any virtual functions must call this one. More...
 
 AggressiveAI (const char *file, Unit *target=NULL)
 
void ExecuteNoEnemies ()
 
void AfterburnerJumpTurnTowards (Unit *target)
 
- Public Member Functions inherited from Orders::FireAt
virtual void ChooseTarget ()
 this function calls the destructor (needs to be overridden for python; More...
 
void PossiblySwitchTarget (bool istargetjumpableplanet)
 
virtual bool PursueTarget (Unit *, bool leader)
 
void AddReplaceLastOrder (bool replace)
 
void ExecuteLastScriptFor (float time)
 
void FaceTarget (bool end)
 
void FaceTargetITTS (bool end)
 
void MatchLinearVelocity (bool terminate, Vector vec, bool afterburn, bool local)
 
void MatchAngularVelocity (bool terminate, Vector vec, bool local)
 
void ChangeHeading (QVector vec)
 
void ChangeLocalDirection (Vector vec)
 
void MoveTo (QVector, bool afterburn)
 
void MatchVelocity (bool terminate, Vector vec, Vector angvel, bool afterburn, bool local)
 
void Cloak (bool enable, float seconds)
 
void FormUp (QVector pos)
 
void FormUpToOwner (QVector pos)
 
void FaceDirection (float distToMatchFacing, bool finish)
 
void XMLScript (std::string script)
 
void LastPythonScript ()
 
UnitGetParent ()
 
 FireAt (float aggressivitylevel)
 
 FireAt ()
 
virtual std::string Pickle ()
 
virtual void UnPickle (std::string)
 
virtual ~FireAt ()
 
- Public Member Functions inherited from CommunicatingAI
virtual void Destroy ()
 The virutal function that unrefs all memory then calls Destruct () which takes care of unreffing this or calling delete on this. More...
 
virtual float getMood ()
 
UnitGetRandomUnit (float PlayerProbability, float TargetProbability)
 
void RandomInitiateCommunication (float PlayerProbability, float TargetProbability)
 
void TerminateContrabandSearch (bool foundcontraband)
 
void InitiateContrabandSearch (float PlayerProbability, float TargetProbability)
 
void UpdateContrabandSearch ()
 
 CommunicatingAI (int ttype, int stype, float mood=0, float anger=-666, float appeasement=666, float moodswingyness=666, float randomnessresponse=666)
 
virtual void ProcessCommMessage (class CommunicationMessage &c)
 processes a single message...generally called by the Messages() func More...
 
virtual void AdjustRelationTo (Unit *un, float factor)
 
virtual ~CommunicatingAI ()
 
virtual int selectCommunicationMessage (class CommunicationMessage &c, Unit *)
 
virtual int selectCommunicationMessageMood (CommunicationMessage &c, float mood)
 
- Public Member Functions inherited from Order
void ClearMessages ()
 clears the messasges of this order More...
 
 Order ()
 The default constructor setting everything to NULL and no dependency on order. More...
 
 Order (int type, int subtype)
 The constructor that specifies what order dependencies this order has. More...
 
OrderqueryType (unsigned int type)
 returns a pointer to the first order that may be bitwised ored with that type More...
 
OrderqueryAny (unsigned int type)
 returns a pointer to the first order that may be bitwise ored with any type More...
 
void eraseType (unsigned int type)
 Erases all orders that bitwise OR with that type. More...
 
bool AttachOrder (Unit *targets)
 Attaches a group of targets to this order (used for strategery-type games) More...
 
bool AttachOrder (QVector target)
 Attaches a navigation point to this order. More...
 
bool AttachSelfOrder (Unit *targets)
 Attaches a group (form up) to this order. More...
 
OrderEnqueueOrder (Order *ord)
 Enqueues another order that will be executed (in parallel perhaps) when next void Execute() is called. More...
 
OrderReplaceOrder (Order *ord)
 Replaces the first order of that type in the order queue. More...
 
bool Done ()
 
int getType ()
 
int getSubType ()
 
UnitGetParent () const
 
virtual void Communicate (const class CommunicationMessage &c)
 Sends a communication message from the Unit (encapulated in c) to this unit. More...
 
virtual void ProcessCommunicationMessages (float CommRepsonseTime, bool RemoveMessageProcessed)
 responds (or does not) to certain messages in the message queue More...
 
OrderfindOrder (Order *ord)
 return pointer to order or NULL if not found More...
 
void eraseOrder (Order *ord)
 erase that order from the list More...
 
OrderEnqueueOrderFirst (Order *ord)
 enqueue order as first order More...
 
virtual olist_tgetOrderList ()
 returns the orderlist (NULL for orders that haven't got any) More...
 
OrderfindOrderList ()
 searches the suborders recursively for the first order that has an orderlist More...
 
std::string createFullOrderDescription (int level=0)
 
void setActionString (std::string astring)
 
std::string getActionString ()
 

Additional Inherited Members

- Public Types inherited from Orders::AggressiveAI
enum  types {
  AGGAI, MOVEMENT, FACING, UNKNOWN,
  DISTANCE, METERDISTANCE, THREAT, FSHIELD,
  LSHIELD, RSHIELD, BSHIELD, FARMOR,
  BARMOR, LARMOR, RARMOR, HULL,
  RANDOMIZ, FSHIELD_HEAL_RATE, BSHIELD_HEAL_RATE, LSHIELD_HEAL_RATE,
  RSHIELD_HEAL_RATE, FARMOR_HEAL_RATE, BARMOR_HEAL_RATE, LARMOR_HEAL_RATE,
  RARMOR_HEAL_RATE, HULL_HEAL_RATE, TARGET_FACES_YOU, TARGET_IN_FRONT_OF_YOU,
  TARGET_GOING_YOUR_DIRECTION
}
 
- Public Attributes inherited from Orders::AggressiveAI
float Fshield_prev
 
float Fshield_rate_old
 
double Fshield_prev_time
 
float Bshield_prev
 
float Bshield_rate_old
 
double Bshield_prev_time
 
float Lshield_prev
 
float Lshield_rate_old
 
double Lshield_prev_time
 
float Rshield_prev
 
float Rshield_rate_old
 
double Rshield_prev_time
 
float Farmour_prev
 
float Farmour_rate_old
 
double Farmour_prev_time
 
float Barmour_prev
 
float Barmour_rate_old
 
double Barmour_prev_time
 
float Larmour_prev
 
float Larmour_rate_old
 
double Larmour_prev_time
 
float Rarmour_prev
 
float Rarmour_rate_old
 
double Rarmour_prev_time
 
float Hull_prev
 
float Hull_rate_old
 
double Hull_prev_time
 
int personalityseed
 
- Protected Member Functions inherited from Orders::AggressiveAI
void SignalChosenTarget ()
 
bool ProcessLogicItem (const AIEvents::AIEvresult &item)
 
bool ExecuteLogicItem (const AIEvents::AIEvresult &item)
 
bool ProcessLogic (AIEvents::ElemAttrMap &logic, bool inter)
 
void ReCommandWing (Flightgroup *fg)
 
bool ProcessCurrentFgDirective (Flightgroup *fg)
 
- Protected Attributes inherited from Orders::AggressiveAI
AIEvents::ElemAttrMaplogic
 
float logiccurtime
 
float interruptcurtime
 
QVector nav
 
UnitContainer navDestination
 
float lurk_on_arrival
 
std::string last_directive
 

Detailed Description

Definition at line 5 of file ikarus.h.

Constructor & Destructor Documentation

Ikarus::Ikarus ( )

Definition at line 19 of file ikarus.cpp.

19  : AggressiveAI( "default.agg.xml" )
20 {
21  last_time = cur_time = 0;
22 }

Member Function Documentation

void Ikarus::Execute ( )
virtual

you can ignore the function below unless it causes problems...this merely makes it so that the AI responds to your commands

Reimplemented from Orders::AggressiveAI.

Definition at line 72 of file ikarus.cpp.

References AfterburnTurnTowards, Unit::UnitJump::drive, Order::Execute(), Unit::GetDestinations(), Unit::getFlightgroup(), Unit::GetJumpStatus(), Order::parent, Orders::AggressiveAI::ProcessCurrentFgDirective(), Orders::AggressiveAI::ReCommandWing(), and Unit::Target().

73 {
75  ReCommandWing( fg );
77  DecideTarget();
78  if ( !ProcessCurrentFgDirective( fg ) ) {
79  Unit *target = parent->Target();
80  bool isjumpable = target ? ( ( !target->GetDestinations().empty() ) && parent->GetJumpStatus().drive >= 0 ) : false;
81  if (isjumpable)
83  else
84  ExecuteStrategy( target );
85  }
86 }
virtual string Orders::Ikarus::getOrderDescription ( )
inlinevirtual

Reimplemented from Orders::AggressiveAI.

Definition at line 14 of file ikarus.h.

15  {
16  return "ikarus";
17  }

The documentation for this class was generated from the following files: