Advanced Strategic Command
Public Member Functions | Public Attributes | List of all members
AiValue Class Reference

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

#include <baseaiinterface.h>

Inheritance diagram for AiValue:
Inheritance graph

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 61 of file baseaiinterface.h.

Constructor & Destructor Documentation

AiValue::AiValue ( int  _valueType)

Definition at line 72 of file baseaiinterface.h.

References reset().

Member Function Documentation

int AiValue::getValue ( )
void AiValue::read ( tnstream stream)

Definition at line 2022 of file gamemap.cpp.

References tnstream::readInt().

Referenced by AiParameter::read().

void AiValue::reset ( int  _valueType)

Definition at line 71 of file baseaiinterface.h.

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

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

void AiValue::resetAdditionalValue ( )

Definition at line 76 of file baseaiinterface.h.

void AiValue::setAdditionalValue ( int  _addedValue)

Definition at line 75 of file baseaiinterface.h.

Referenced by SearchReconquerBuilding::unitfound().

void AiValue::setValue ( int  _value)
void AiValue::write ( tnstream stream)

Definition at line 2012 of file gamemap.cpp.

References tnstream::writeInt().

Referenced by AiParameter::write().

Member Data Documentation

AiThreat AiValue::threat
int AiValue::valueType

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