OpenXcom  1.0
Open-source clone of the original X-Com
RuleUfo.h
1 #pragma once
2 /*
3  * Copyright 2010-2016 OpenXcom Developers.
4  *
5  * This file is part of OpenXcom.
6  *
7  * OpenXcom is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * OpenXcom is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with OpenXcom. If not, see <http://www.gnu.org/licenses/>.
19  */
20 #include <string>
21 #include <yaml-cpp/yaml.h>
22 
23 namespace OpenXcom
24 {
25 
26 class RuleTerrain;
27 class Mod;
28 
35 class RuleUfo
36 {
37 private:
38  std::string _type, _size;
39  int _sprite, _marker;
40  int _damageMax, _speedMax, _accel, _power, _range, _score, _reload, _breakOffTime, _sightRange, _missionScore;
41  RuleTerrain *_battlescapeTerrainData;
42  std::string _modSprite;
43 public:
45  RuleUfo(const std::string &type);
47  ~RuleUfo();
49  void load(const YAML::Node& node, Mod *mod);
51  std::string getType() const;
53  std::string getSize() const;
55  int getRadius() const;
57  int getSprite() const;
59  int getMarker() 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;
81  int getSightRange() const;
83  int getMissionScore() const;
84 };
85 
86 }
std::string getType() const
Gets the UFO&#39;s type.
Definition: RuleUfo.cpp:80
int getWeaponRange() const
Gets the UFO&#39;s weapon range.
Definition: RuleUfo.cpp:188
int getMarker() const
Gets the UFO&#39;s globe marker.
Definition: RuleUfo.cpp:138
std::string getModSprite() const
Gets the name of the surface that represents this UFO.
Definition: RuleUfo.cpp:234
Contains all the game-specific static data that never changes throughout the game, like rulesets and resources.
Definition: Mod.h:87
int getMaxDamage() const
Gets the UFO&#39;s maximum damage.
Definition: RuleUfo.cpp:148
int getWeaponReload() const
Gets the reload time of the UFO&#39;s weapon.
Definition: RuleUfo.cpp:216
std::string getSize() const
Gets the UFO&#39;s size.
Definition: RuleUfo.cpp:89
~RuleUfo()
Cleans up the UFO ruleset.
Definition: RuleUfo.cpp:38
int getSprite() const
Gets the UFO&#39;s sprite.
Definition: RuleUfo.cpp:129
int getBreakOffTime() const
Gets the UFO&#39;s escape time.
Definition: RuleUfo.cpp:225
RuleUfo(const std::string &type)
Creates a blank UFO ruleset.
Definition: RuleUfo.cpp:30
int getScore() const
Gets the UFO&#39;s score.
Definition: RuleUfo.cpp:198
int getAcceleration() const
Gets the UFO&#39;s acceleration.
Definition: RuleUfo.cpp:168
int getMaxSpeed() const
Gets the UFO&#39;s maximum speed.
Definition: RuleUfo.cpp:158
int getSightRange() const
Gets the UFO&#39;s radar range.
Definition: RuleUfo.cpp:244
void load(const YAML::Node &node, Mod *mod)
Loads UFO data from YAML.
Definition: RuleUfo.cpp:48
Represents a specific type of UFO.
Definition: RuleUfo.h:35
Represents a specific type of Battlescape Terrain.
Definition: RuleTerrain.h:39
int getMissionScore() const
Gets the UFO&#39;s mission score.
Definition: RuleUfo.cpp:254
RuleTerrain * getBattlescapeTerrainData() const
Sets the battlescape terrain data ruleset for this UFO.
Definition: RuleUfo.cpp:207
int getRadius() const
Gets the UFO&#39;s radius.
Definition: RuleUfo.cpp:99
Definition: BaseInfoState.cpp:40
int getWeaponPower() const
Gets the UFO&#39;s weapon power.
Definition: RuleUfo.cpp:178