OpenXcom  1.0
Open-source clone of the original X-Com
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
RuleSoldier.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_RULESOLDIER_H
20 #define OPENXCOM_RULESOLDIER_H
21 
22 #include <string>
23 #include "../Ruleset/Unit.h"
24 
25 namespace OpenXcom
26 {
27 
34 {
35 private:
36  std::string _type;
37  UnitStats _minStats, _maxStats, _statCaps;
38  std::string _armor;
39  int _standHeight, _kneelHeight, _floatHeight;
40 public:
42  RuleSoldier(const std::string &type);
44  ~RuleSoldier();
46  void load(const YAML::Node& node);
48  std::string getType() const;
50  UnitStats getMinStats() const;
52  UnitStats getMaxStats() const;
54  UnitStats getStatCaps() const;
56  int getStandHeight() const;
58  int getKneelHeight() const;
60  int getFloatHeight() const;
62  std::string getArmor() const;
63 
64 };
65 
66 }
67 
68 #endif
RuleSoldier(const std::string &type)
Creates a blank unit ruleset.
Definition: RuleSoldier.cpp:29
int getStandHeight() const
Gets the height of the soldier when it's standing.
Definition: RuleSoldier.cpp:98
std::string getArmor() const
Gets the armor name.
Definition: RuleSoldier.cpp:125
~RuleSoldier()
Cleans up the unit ruleset.
Definition: RuleSoldier.cpp:36
std::string getType() const
Gets the unit's type.
Definition: RuleSoldier.cpp:62
UnitStats getMaxStats() const
Gets the maximum stats for the random stats generator.
Definition: RuleSoldier.cpp:80
This struct holds some plain unit attribute data together.
Definition: Unit.h:32
UnitStats getStatCaps() const
Gets the stat caps.
Definition: RuleSoldier.cpp:89
Represents the creation data for a specific type of unit.
Definition: RuleSoldier.h:33
void load(const YAML::Node &node)
Loads the unit data from YAML.
Definition: RuleSoldier.cpp:45
int getFloatHeight() const
Gets the elevation of the soldier when it's flying.
Definition: RuleSoldier.cpp:116
int getKneelHeight() const
Gets the height of the soldier when it's kneeling.
Definition: RuleSoldier.cpp:107
UnitStats getMinStats() const
Gets the minimum stats for the random stats generator.
Definition: RuleSoldier.cpp:71