OpenXcom
1.0
Open-source clone of the original X-Com
|
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 MissionWave & | getWave (size_t index) const |
Gets the full wave information. | |
int | getPoints () const |
Gets the score for this mission. More... | |
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.
OpenXcom::RuleAlienMission::~RuleAlienMission | ( | ) |
Releases all resources held by the mission.
Ensures the allocated memory is released.
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.
monthsPassed | The number of months that have passed in the game world. |
int OpenXcom::RuleAlienMission::getPoints | ( | ) | const |
Gets the score for this mission.
Returns the Alien score for this mission.
void OpenXcom::RuleAlienMission::load | ( | const YAML::Node & | node | ) |
Loads alien mission data from YAML.
Loads the mission data from a YAML node.
node | YAML node. |