OpenXcom  1.0
Open-source clone of the original X-Com
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
RuleUfo.h
1 /*
2  * Copyright 2010-2014 OpenXcom Developers.
3  *
4  * This file is part of OpenXcom.
5  *
6  * OpenXcom is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * OpenXcom is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with OpenXcom. If not, see <http://www.gnu.org/licenses/>.
18  */
19 #ifndef OPENXCOM_RULEUFO_H
20 #define OPENXCOM_RULEUFO_H
21 
22 #include <string>
23 #include <yaml-cpp/yaml.h>
24 
25 namespace OpenXcom
26 {
27 
28 class RuleTerrain;
29 class Ruleset;
30 
37 class RuleUfo
38 {
39 private:
40  std::string _type, _size;
41  int _sprite;
42  int _damageMax, _speedMax, _accel, _power, _range, _score, _reload, _breakOffTime;
43  RuleTerrain *_battlescapeTerrainData;
44  std::string _modSprite;
45 public:
47  RuleUfo(const std::string &type);
49  ~RuleUfo();
51  void load(const YAML::Node& node, Ruleset *ruleset);
53  std::string getType() const;
55  std::string getSize() const;
57  int getRadius() const;
59  int getSprite() const;
61  int getMaxDamage() const;
63  int getMaxSpeed() const;
65  int getAcceleration() const;
67  int getWeaponPower() const;
69  int getWeaponRange() const;
71  int getScore() const;
75  int getWeaponReload() const;
77  int getBreakOffTime() const;
79  std::string getModSprite() const;
80 };
81 
82 }
83 
84 #endif
std::string getModSprite() const
Gets the name of the surface that represents this UFO.
Definition: RuleUfo.cpp:219
int getMaxSpeed() const
Gets the UFO's maximum speed.
Definition: RuleUfo.cpp:143
int getAcceleration() const
Gets the UFO's acceleration.
Definition: RuleUfo.cpp:153
~RuleUfo()
Cleans up the UFO ruleset.
Definition: RuleUfo.cpp:37
RuleTerrain * getBattlescapeTerrainData()
Sets the battlescape terrain data ruleset for this UFO.
Definition: RuleUfo.cpp:192
int getWeaponPower() const
Gets the UFO's weapon power.
Definition: RuleUfo.cpp:163
Set of rules and stats for a game.
Definition: Ruleset.h:69
std::string getType() const
Gets the UFO's type.
Definition: RuleUfo.cpp:74
RuleUfo(const std::string &type)
Creates a blank UFO ruleset.
Definition: RuleUfo.cpp:30
int getScore() const
Gets the UFO's score.
Definition: RuleUfo.cpp:183
int getMaxDamage() const
Gets the UFO's maximum damage.
Definition: RuleUfo.cpp:133
int getBreakOffTime() const
Gets the UFO's escape time.
Definition: RuleUfo.cpp:210
int getWeaponReload() const
Gets the reload time of the UFO's weapon.
Definition: RuleUfo.cpp:201
Represents a specific type of UFO.
Definition: RuleUfo.h:37
Represents a specific type of Battlescape Terrain.
Definition: RuleTerrain.h:41
int getSprite() const
Gets the UFO's sprite.
Definition: RuleUfo.cpp:123
std::string getSize() const
Gets the UFO's size.
Definition: RuleUfo.cpp:83
void load(const YAML::Node &node, Ruleset *ruleset)
Loads UFO data from YAML.
Definition: RuleUfo.cpp:47
int getRadius() const
Gets the UFO's radius.
Definition: RuleUfo.cpp:93
int getWeaponRange() const
Gets the UFO's weapon range.
Definition: RuleUfo.cpp:173