![]() |
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 Mod *mod) |
| Initialize values according to the rules. More... | |
| void | load (const YAML::Node &node) |
| Loads the data from YAML. More... | |
| YAML::Node | save () const |
| Saves the data to YAML. More... | |
| std::string | chooseRandomRegion (const Mod *mod) |
| Choose a random region for a regular mission. More... | |
| 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... | |
| int | getMissionsRun (const std::string &varName) |
| Checks the number of missions run labelled as "varName". More... | |
| void | addMissionRun (const std::string &varName) |
| Increments the number of missions run labelled as "varName". More... | |
| void | addMissionLocation (const std::string &varName, const std::string ®ionName, int zoneNumber, int maximum) |
| Adds a mission location to our storage array. More... | |
| bool | validMissionLocation (const std::string &varName, const std::string ®ionName, int zoneNumber) |
| Checks that a given mission location (city or whatever) isn't stored in our list of previously attacked locations. More... | |
| bool | validMissionRegion (const std::string ®ionName) |
| Checks that a given region appears in our strategy table. 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.
| void OpenXcom::AlienStrategy::addMissionLocation | ( | const std::string & | varName, |
| const std::string & | regionName, | ||
| int | zoneNumber, | ||
| int | maximum | ||
| ) |
Adds a mission location to our storage array.
| varName | the name on the variable under which to store this info. |
| regionName | the name of the region we're using. |
| zoneNumber | the number of the zone within that region we're using. |
| maximum | the maximum size of the list we want to maintain. |
| void OpenXcom::AlienStrategy::addMissionRun | ( | const std::string & | varName | ) |
Increments the number of missions run labelled as "varName".
| varName | the variable name that we want to use to keep track of this. |
| 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. |
| std::string OpenXcom::AlienStrategy::chooseRandomRegion | ( | const Mod * | mod | ) |
Choose a random region for a regular mission.
Choose one of the regions for a mission.
| mod | Pointer to the mod. |
| int OpenXcom::AlienStrategy::getMissionsRun | ( | const std::string & | varName | ) |
Checks the number of missions run labelled as "varName".
| void OpenXcom::AlienStrategy::init | ( | const Mod * | mod | ) |
Initialize values according to the rules.
Get starting values from the rules.
| mod | Pointer to the game mod. |
| void OpenXcom::AlienStrategy::load | ( | const YAML::Node & | node | ) |
Loads the data from YAML.
Loads the data from a YAML file.
| 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.
| bool OpenXcom::AlienStrategy::validMissionLocation | ( | const std::string & | varName, |
| const std::string & | regionName, | ||
| int | zoneNumber | ||
| ) |
Checks that a given mission location (city or whatever) isn't stored in our list of previously attacked locations.
| varName | the name of the variable that is storing our data. |
| regionName | the name of the region we're looking for. |
| zoneNumber | the number in the region that we want to check. |
| bool OpenXcom::AlienStrategy::validMissionRegion | ( | const std::string & | region | ) |
Checks that a given region appears in our strategy table.
| region | the region we want to check for validity. |
1.8.14