OpenXcom
1.0
Open-source clone of the original X-Com
|
Represents a specific type of UFO. More...
#include <RuleUfo.h>
Public Member Functions | |
RuleUfo (const std::string &type) | |
Creates a blank UFO ruleset. More... | |
~RuleUfo () | |
Cleans up the UFO ruleset. | |
void | load (const YAML::Node &node, Ruleset *ruleset) |
Loads UFO data from YAML. More... | |
std::string | getType () const |
Gets the UFO's type. More... | |
std::string | getSize () const |
Gets the UFO's size. More... | |
int | getRadius () const |
Gets the UFO's radius. More... | |
int | getSprite () const |
Gets the UFO's sprite. More... | |
int | getMaxDamage () const |
Gets the UFO's maximum damage. More... | |
int | getMaxSpeed () const |
Gets the UFO's maximum speed. More... | |
int | getAcceleration () const |
Gets the UFO's acceleration. More... | |
int | getWeaponPower () const |
Gets the UFO's weapon power. More... | |
int | getWeaponRange () const |
Gets the UFO's weapon range. More... | |
int | getScore () const |
Gets the UFO's score. More... | |
RuleTerrain * | getBattlescapeTerrainData () |
Sets the battlescape terrain data ruleset for this UFO. More... | |
int | getWeaponReload () const |
Gets the reload time of the UFO's weapon. More... | |
int | getBreakOffTime () const |
Gets the UFO's escape time. More... | |
std::string | getModSprite () const |
Gets the name of the surface that represents this UFO. More... | |
Represents a specific type of UFO.
Contains constant info about a UFO like speed, weapons, scores, etc.
OpenXcom::RuleUfo::RuleUfo | ( | const std::string & | type | ) |
Creates a blank UFO ruleset.
Creates a blank ruleset for a certain type of UFO.
type | String defining the type. |
int OpenXcom::RuleUfo::getAcceleration | ( | ) | const |
Gets the UFO's acceleration.
Gets the acceleration of the UFO for taking off / stopping.
RuleTerrain * OpenXcom::RuleUfo::getBattlescapeTerrainData | ( | ) |
Sets the battlescape terrain data ruleset for this UFO.
Gets the terrain data needed to draw the UFO in the battlescape.
int OpenXcom::RuleUfo::getBreakOffTime | ( | ) | const |
Gets the UFO's escape time.
Gets the UFO's break off time.
int OpenXcom::RuleUfo::getMaxDamage | ( | ) | const |
Gets the UFO's maximum damage.
Gets the maximum damage (damage the UFO can take) of the UFO.
int OpenXcom::RuleUfo::getMaxSpeed | ( | ) | const |
Gets the UFO's maximum speed.
Gets the maximum speed of the UFO flying around the Geoscape.
std::string OpenXcom::RuleUfo::getModSprite | ( | ) | const |
Gets the name of the surface that represents this UFO.
For user-defined UFOs, use a surface for the "preview" image.
int OpenXcom::RuleUfo::getRadius | ( | ) | const |
Gets the UFO's radius.
Gets the radius of this type of UFO on the dogfighting window.
int OpenXcom::RuleUfo::getScore | ( | ) | const |
Gets the UFO's score.
Gets the amount of points the player gets for shooting down the UFO.
std::string OpenXcom::RuleUfo::getSize | ( | ) | const |
int OpenXcom::RuleUfo::getSprite | ( | ) | const |
Gets the UFO's sprite.
Gets the ID of the sprite used to draw the UFO in the Dogfight window.
std::string OpenXcom::RuleUfo::getType | ( | ) | const |
Gets the UFO's type.
Gets the language string that names this UFO.
Each UFO type has a unique name.
int OpenXcom::RuleUfo::getWeaponPower | ( | ) | const |
Gets the UFO's weapon power.
Gets the maximum damage done by the UFO's weapons per shot.
int OpenXcom::RuleUfo::getWeaponRange | ( | ) | const |
Gets the UFO's weapon range.
Gets the maximum range for the UFO's weapons.
int OpenXcom::RuleUfo::getWeaponReload | ( | ) | const |
Gets the reload time of the UFO's weapon.
Gets the weapon reload for UFO ships.
void OpenXcom::RuleUfo::load | ( | const YAML::Node & | node, |
Ruleset * | ruleset | ||
) |
Loads UFO data from YAML.
Loads the UFO from a YAML file.
node | YAML node. |
ruleset | Ruleset for the UFO. |