OpenXcom  1.0
Open-source clone of the original X-Com
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | List of all members
OpenXcom::RuleAlienMission Class Reference

Stores fixed information about a mission type. More...

#include <RuleAlienMission.h>

Public Member Functions

 ~RuleAlienMission ()
 Releases all resources held by the mission. More...
 
const std::string & getType () const
 Gets the mission's type.
 
const std::string generateRace (const size_t monthsPassed) const
 Gets a race based on the game time and the racial distribution. More...
 
const std::string getTopRace (const size_t monthsPassed) const
 Gets the most likely race based on the game time and the racial distribution.
 
void load (const YAML::Node &node)
 Loads alien mission data from YAML. More...
 
size_t getWaveCount () const
 Gets the number of waves.
 
const MissionWavegetWave (size_t index) const
 Gets the full wave information.
 
int getPoints () const
 Gets the score for this mission. More...
 

Detailed Description

Stores fixed information about a mission type.

It stores the mission waves and the distribution of the races that can undertake the mission based on game date.

Constructor & Destructor Documentation

OpenXcom::RuleAlienMission::~RuleAlienMission ( )

Releases all resources held by the mission.

Ensures the allocated memory is released.

Member Function Documentation

const std::string OpenXcom::RuleAlienMission::generateRace ( const size_t  monthsPassed) const

Gets a race based on the game time and the racial distribution.

Chooses one of the available races for this mission.

The racial distribution may vary based on the current game date.

Parameters
monthsPassedThe number of months that have passed in the game world.
Returns
The string id of the race.
int OpenXcom::RuleAlienMission::getPoints ( ) const

Gets the score for this mission.

Returns the Alien score for this mission.

Returns
Amount of points.
void OpenXcom::RuleAlienMission::load ( const YAML::Node &  node)

Loads alien mission data from YAML.

Loads the mission data from a YAML node.

Parameters
nodeYAML node.

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