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, _markerLand, _markerCrash;
40  int _damageMax, _speedMax, _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 getLandMarker() const;
63  int getCrashMarker() const;
65  int getMaxDamage() const;
67  int getMaxSpeed() const;
69  int getWeaponPower() const;
71  int getWeaponRange() const;
73  int getScore() const;
77  int getWeaponReload() const;
79  int getBreakOffTime() const;
81  std::string getModSprite() const;
83  int getSightRange() const;
85  int getMissionScore() const;
86 };
87 
88 }
std::string getType() const
Gets the UFO&#39;s type.
Definition: RuleUfo.cpp:91
int getWeaponRange() const
Gets the UFO&#39;s weapon range.
Definition: RuleUfo.cpp:207
int getMarker() const
Gets the UFO&#39;s globe marker when flying.
Definition: RuleUfo.cpp:149
std::string getModSprite() const
Gets the name of the surface that represents this UFO.
Definition: RuleUfo.cpp:253
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:177
int getWeaponReload() const
Gets the reload time of the UFO&#39;s weapon.
Definition: RuleUfo.cpp:235
std::string getSize() const
Gets the UFO&#39;s size.
Definition: RuleUfo.cpp:100
~RuleUfo()
Cleans up the UFO ruleset.
Definition: RuleUfo.cpp:39
int getSprite() const
Gets the UFO&#39;s sprite.
Definition: RuleUfo.cpp:140
int getLandMarker() const
Gets the UFO&#39;s globe marker when landed.
Definition: RuleUfo.cpp:158
int getBreakOffTime() const
Gets the UFO&#39;s escape time.
Definition: RuleUfo.cpp:244
RuleUfo(const std::string &type)
Creates a blank UFO ruleset.
Definition: RuleUfo.cpp:31
int getScore() const
Gets the UFO&#39;s score.
Definition: RuleUfo.cpp:217
int getMaxSpeed() const
Gets the UFO&#39;s maximum speed.
Definition: RuleUfo.cpp:187
int getSightRange() const
Gets the UFO&#39;s radar range.
Definition: RuleUfo.cpp:263
void load(const YAML::Node &node, Mod *mod)
Loads UFO data from YAML.
Definition: RuleUfo.cpp:49
int getCrashMarker() const
Gets the UFO&#39;s globe marker when crashed.
Definition: RuleUfo.cpp:167
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:273
RuleTerrain * getBattlescapeTerrainData() const
Sets the battlescape terrain data ruleset for this UFO.
Definition: RuleUfo.cpp:226
int getRadius() const
Gets the UFO&#39;s radius.
Definition: RuleUfo.cpp:110
Definition: BaseInfoState.cpp:40
int getWeaponPower() const
Gets the UFO&#39;s weapon power.
Definition: RuleUfo.cpp:197