OpenXcom
1.0
Open-source clone of the original X-Com
|
Stores the information about alien strategy. More...
#include <AlienStrategy.h>
Public Member Functions | |
AlienStrategy () | |
Create an AlienStrategy with no data. More... | |
~AlienStrategy () | |
Free resources used by the AlienStrategy. More... | |
void | init (const Ruleset *rules) |
Initialize values according to the rules. More... | |
void | load (const Ruleset *rules, const YAML::Node &node) |
Loads the data from YAML. More... | |
YAML::Node | save () const |
Saves the data to YAML. More... | |
const std::string | chooseRandomRegion (const Ruleset *rules) |
Choose a random region for a regular mission. More... | |
const std::string | chooseRandomMission (const std::string ®ion) const |
Choose a random mission for a region. More... | |
bool | removeMission (const std::string ®ion, const std::string &mission) |
Remove a region and mission from the list of posibilities. More... | |
Stores the information about alien strategy.
OpenXcom::AlienStrategy::AlienStrategy | ( | ) |
Create an AlienStrategy with no data.
Create an AlienStrategy with no values.
Running a game like this will most likely crash.
OpenXcom::AlienStrategy::~AlienStrategy | ( | ) |
Free resources used by the AlienStrategy.
Free all resources used by this AlienStrategy.
const std::string OpenXcom::AlienStrategy::chooseRandomMission | ( | const std::string & | region | ) | const |
Choose a random mission for a region.
Choose one missions available for region.
region | The region id. |
const std::string OpenXcom::AlienStrategy::chooseRandomRegion | ( | const Ruleset * | rules | ) |
Choose a random region for a regular mission.
Choose one of the regions for a mission.
rules | Pointer to the ruleset. |
void OpenXcom::AlienStrategy::init | ( | const Ruleset * | rules | ) |
Initialize values according to the rules.
Get starting values from the rules.
rules | Pointer to the game ruleset. |
void OpenXcom::AlienStrategy::load | ( | const Ruleset * | rules, |
const YAML::Node & | node | ||
) |
Loads the data from YAML.
Loads the data from a YAML file.
rules | Pointer to the game ruleset. |
node | YAML node. |
bool OpenXcom::AlienStrategy::removeMission | ( | const std::string & | region, |
const std::string & | mission | ||
) |
Remove a region and mission from the list of posibilities.
Remove mission from the list of possible missions for region.
region | The region id. |
mission | The mission id. |
YAML::Node OpenXcom::AlienStrategy::save | ( | ) | const |
Saves the data to YAML.
Saves the alien data to a YAML file.