![]() |
OpenXcom
1.0
Open-source clone of the original X-Com
|
Represents the creation data for an X-COM unit. More...
#include <RuleSoldier.h>
Public Member Functions | |
RuleSoldier (const std::string &type) | |
Creates a blank soldier ruleset. More... | |
~RuleSoldier () | |
Cleans up the soldier ruleset. | |
void | load (const YAML::Node &node, Mod *mod) |
Loads the soldier data from YAML. More... | |
std::string | getType () const |
Gets the soldier's type. More... | |
const std::vector< std::string > & | getRequirements () const |
Gets the soldier's requirements. More... | |
UnitStats | getMinStats () const |
Gets the minimum stats for the random stats generator. More... | |
UnitStats | getMaxStats () const |
Gets the maximum stats for the random stats generator. More... | |
UnitStats | getStatCaps () const |
Gets the stat caps. More... | |
int | getBuyCost () const |
Gets the cost of the soldier. More... | |
int | getSalaryCost () const |
Gets the monthly salary of the soldier. More... | |
int | getStandHeight () const |
Gets the height of the soldier when it's standing. More... | |
int | getKneelHeight () const |
Gets the height of the soldier when it's kneeling. More... | |
int | getFloatHeight () const |
Gets the elevation of the soldier when it's flying. More... | |
std::string | getArmor () const |
Gets the default-equipped armor. More... | |
int | getFemaleFrequency () const |
Gets the female appearance ratio. More... | |
const std::vector< int > & | getMaleDeathSounds () const |
Gets the soldier's male death sounds. More... | |
const std::vector< int > & | getFemaleDeathSounds () const |
Gets the soldier's female death sounds. More... | |
const std::vector< SoldierNamePool * > & | getNames () const |
Gets the pool list for soldier names. More... | |
int | getValue () const |
Gets the value - for score calculation. More... | |
int | getTransferTime () const |
Gets the soldier's transfer time. More... | |
Represents the creation data for an X-COM unit.
This info is copied to either Soldier for Geoscape or BattleUnit for Battlescape.
OpenXcom::RuleSoldier::RuleSoldier | ( | const std::string & | type | ) |
Creates a blank soldier ruleset.
Creates a blank ruleunit for a certain type of soldier.
type | String defining the type. |
std::string OpenXcom::RuleSoldier::getArmor | ( | ) | const |
Gets the default-equipped armor.
Gets the default armor name.
int OpenXcom::RuleSoldier::getBuyCost | ( | ) | const |
Gets the cost of the soldier.
Gets the cost of hiring this soldier.
const std::vector< int > & OpenXcom::RuleSoldier::getFemaleDeathSounds | ( | ) | const |
Gets the soldier's female death sounds.
Gets the death sounds for female soldiers.
int OpenXcom::RuleSoldier::getFemaleFrequency | ( | ) | const |
Gets the female appearance ratio.
int OpenXcom::RuleSoldier::getFloatHeight | ( | ) | const |
Gets the elevation of the soldier when it's flying.
int OpenXcom::RuleSoldier::getKneelHeight | ( | ) | const |
Gets the height of the soldier when it's kneeling.
const std::vector< int > & OpenXcom::RuleSoldier::getMaleDeathSounds | ( | ) | const |
Gets the soldier's male death sounds.
Gets the death sounds for male soldiers.
UnitStats OpenXcom::RuleSoldier::getMaxStats | ( | ) | const |
Gets the maximum stats for the random stats generator.
UnitStats OpenXcom::RuleSoldier::getMinStats | ( | ) | const |
Gets the minimum stats for the random stats generator.
const std::vector< SoldierNamePool * > & OpenXcom::RuleSoldier::getNames | ( | ) | const |
Gets the pool list for soldier names.
Returns the list of soldier name pools.
const std::vector< std::string > & OpenXcom::RuleSoldier::getRequirements | ( | ) | const |
Gets the soldier's requirements.
Gets the list of research required to acquire this soldier.
int OpenXcom::RuleSoldier::getSalaryCost | ( | ) | const |
Gets the monthly salary of the soldier.
Gets the cost of salary for a month.
int OpenXcom::RuleSoldier::getStandHeight | ( | ) | const |
Gets the height of the soldier when it's standing.
UnitStats OpenXcom::RuleSoldier::getStatCaps | ( | ) | const |
Gets the stat caps.
int OpenXcom::RuleSoldier::getTransferTime | ( | ) | const |
Gets the soldier's transfer time.
Gets the amount of time this item takes to arrive at a base.
std::string OpenXcom::RuleSoldier::getType | ( | ) | const |
Gets the soldier's type.
Returns the language string that names this soldier.
Each soldier type has a unique name.
int OpenXcom::RuleSoldier::getValue | ( | ) | const |
Gets the value - for score calculation.
Gets the soldier's base value, without experience modifiers.
void OpenXcom::RuleSoldier::load | ( | const YAML::Node & | node, |
Mod * | mod | ||
) |
Loads the soldier data from YAML.
Loads the soldier from a YAML file.
node | YAML node. |
mod | Mod for the unit. |