Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

AiValue Class Reference

The value of a unit for the AI. More...

#include <baseaiinterface.h>

Inheritance diagram for AiValue:

Inheritance graph
[legend]
List of all members.

Public Member Functions

void reset (int _valueType)
 AiValue (int _valueType)
int getValue ()
void setValue (int _value)
void setAdditionalValue (int _addedValue)
void resetAdditionalValue ()
void read (tnstream &stream)
void write (tnstream &stream)

Public Attributes

AiThreat threat
int valueType

Detailed Description

The value of a unit for the AI.

The value consists of a base value calculated from the unit type, damage etc and an additional value. The additional value is used for example if a unit is trying to capture one of your buildings, of if the mission goals say that this unit must be protected at all cost (if it is yours) or destroyed (if it is the enemies')

Definition at line 60 of file baseaiinterface.h.


Constructor & Destructor Documentation

AiValue::AiValue int  _valueType  )  [inline]
 

Definition at line 71 of file baseaiinterface.h.

References reset().


Member Function Documentation

int AiValue::getValue  )  [inline]
 

Definition at line 72 of file baseaiinterface.h.

Referenced by CalculateThreat_Vehicle::calc_threat_vehicle(), and AI::showFieldInformation().

void AiValue::read tnstream stream  ) 
 

Reimplemented in AiParameter.

Definition at line 1840 of file gamemap.cpp.

References AiThreat::read(), threat, and valueType.

Referenced by AiParameter::read().

void AiValue::reset int  _valueType  )  [inline]
 

Definition at line 70 of file baseaiinterface.h.

References AiThreat::reset(), threat, and valueType.

Referenced by AiValue(), and AiParameter::reset().

void AiValue::resetAdditionalValue  )  [inline]
 

Definition at line 75 of file baseaiinterface.h.

void AiValue::setAdditionalValue int  _addedValue  )  [inline]
 

Definition at line 74 of file baseaiinterface.h.

Referenced by SearchReconquerBuilding::unitfound().

void AiValue::setValue int  _value  )  [inline]
 

Definition at line 73 of file baseaiinterface.h.

Referenced by CalculateThreat_Vehicle::calc_threat_vehicle(), and CalculateThreat_VehicleType::calc_threat_vehicletype().

void AiValue::write tnstream stream  ) 
 

Reimplemented in AiParameter.

Definition at line 1830 of file gamemap.cpp.

References threat, valueType, AiThreat::write(), and tnstream::writeInt().

Referenced by AiParameter::write().


Member Data Documentation

AiThreat AiValue::threat
 

Definition at line 67 of file baseaiinterface.h.

Referenced by CalculateThreat_Vehicle::calc_threat_vehicle(), CalculateThreat_VehicleType::calc_threat_vehicletype(), read(), reset(), and write().

int AiValue::valueType
 

Definition at line 68 of file baseaiinterface.h.

Referenced by CalculateThreat_VehicleType::calc_threat_vehicletype(), read(), reset(), and write().


The documentation for this class was generated from the following files:
Generated on Tue Jun 24 02:16:00 2008 for Advanced Strategic Command by  doxygen 1.4.2