OpenXcom  1.0
Open-source clone of the original X-Com
Public Member Functions | List of all members
OpenXcom::StatStringCondition Class Reference

Public Member Functions

 StatStringCondition (const std::string &conditionName, int minVal, int maxVal)
 Creates a blank StatStringCondition. More...
 
virtual ~StatStringCondition ()
 Cleans up the StatStringCondition. More...
 
std::string getConditionName () const
 Gets the condition name. More...
 
int getMinVal () const
 Gets the minimum value. More...
 
int getMaxVal () const
 Gets the maximum value. More...
 
bool isMet (int stat, bool psi) const
 Checks if the condition has been met. More...
 

Constructor & Destructor Documentation

◆ StatStringCondition()

OpenXcom::StatStringCondition::StatStringCondition ( const std::string &  conditionName,
int  minVal,
int  maxVal 
)

Creates a blank StatStringCondition.

Parameters
conditionNameName of the condition.
minValMinimum value.
maxValMaximum value.

◆ ~StatStringCondition()

OpenXcom::StatStringCondition::~StatStringCondition ( )
virtual

Cleans up the StatStringCondition.

Cleans up the extra StatStringCondition.

Member Function Documentation

◆ getConditionName()

std::string OpenXcom::StatStringCondition::getConditionName ( ) const

Gets the condition name.

Gets the condition string.

Returns
Name of the associated stat.

◆ getMaxVal()

int OpenXcom::StatStringCondition::getMaxVal ( ) const

Gets the maximum value.

Gets the maximum value for the condition (default is 255).

Returns
The maximum value.

◆ getMinVal()

int OpenXcom::StatStringCondition::getMinVal ( ) const

Gets the minimum value.

Gets the minimum value for the condition (default is 0).

Returns
The minimum value.

◆ isMet()

bool OpenXcom::StatStringCondition::isMet ( int  stat,
bool  psi 
) const

Checks if the condition has been met.

Checks if this condition is valid for the current stat.

Parameters
statThe current soldier stat.
psiCan we show psi stats?
Returns
If the condition is met.

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