19 #ifndef OPENXCOM_ALIEN_MISSION_H
20 #define OPENXCOM_ALIEN_MISSION_H
23 #include <yaml-cpp/yaml.h>
28 class RuleAlienMission;
49 std::string _region, _race;
51 size_t _nextUfoCounter;
52 size_t _spawnCountdown;
66 YAML::Node
save()
const;
68 const std::string &
getType()
const;
70 const std::string &
getRegion()
const {
return _region; }
74 const std::string &
getRace()
const {
return _race; }
76 void setRace(
const std::string &race) { _race = race; }
97 void start(
size_t initialCount = 0);
109 void addScore(
const double lon,
const double lat,
Game &engine);
114 void spawnAlienBase(
const Globe &globe,
Game &engine);
116 std::pair<double, double> getWaypoint(
const UfoTrajectory &trajectory,
const size_t nextWaypoint,
const Globe &globe,
const RuleRegion ®ion);
118 std::pair<double, double> getLandPoint(
const Globe &globe,
const RuleRegion ®ion,
size_t zone);
Represents an alien base on the world.
Definition: AlienBase.h:33
Represents an ongoing alien mission.
Definition: AlienMission.h:46
void start(size_t initialCount=0)
Initialize with values from rules.
Definition: AlienMission.cpp:321
void addScore(const double lon, const double lat, Game &engine)
Handle Points for mission successes.
Definition: AlienMission.cpp:609
void ufoLifting(Ufo &ufo, Game &engine, const Globe &globe)
Handle UFO lifting from the ground.
Definition: AlienMission.cpp:520
void increaseLiveUfos()
Increase number of live UFOs.
Definition: AlienMission.h:99
void setWaveCountdown(size_t minutes)
Sets the minutes until next wave spawns.
Definition: AlienMission.cpp:554
~AlienMission()
Cleans up the mission info.
Definition: AlienMission.cpp:56
const std::string & getRegion() const
Gets the mission's region.
Definition: AlienMission.h:70
void decreaseLiveUfos()
Decrease number of live UFOs.
Definition: AlienMission.h:101
void ufoReachedWaypoint(Ufo &ufo, Game &engine, const Globe &globe)
Handle UFO reaching a waypoint.
Definition: AlienMission.cpp:360
void think(Game &engine, const Globe &globe)
Handle UFO spawning for the mission.
Definition: AlienMission.cpp:153
const std::string & getType() const
Gets the mission's type.
Definition: AlienMission.cpp:116
void setRace(const std::string &race)
Sets the mission's race.
Definition: AlienMission.h:76
void ufoShotDown(Ufo &ufo, Game &engine, const Globe &globe)
Handle UFO shot down.
Definition: AlienMission.cpp:493
int getId() const
Gets the unique ID for this mission.
Definition: AlienMission.cpp:578
void setAlienBase(const AlienBase *base)
Sets the alien base for this mission.
Definition: AlienMission.cpp:589
void setRegion(const std::string ®ion, const Ruleset &rules)
Sets the mission's region.
Definition: AlienMission.cpp:663
void setId(int id)
Sets the unique ID for this mission.
Definition: AlienMission.cpp:569
AlienMission(const RuleAlienMission &rule)
Creates a mission of the specified type.
Definition: AlienMission.cpp:51
YAML::Node save() const
Saves the mission to YAML.
Definition: AlienMission.cpp:98
const AlienBase * getAlienBase() const
Gets the alien base for this mission.
Definition: AlienMission.cpp:598
size_t getWaveCountdown() const
Gets the minutes until next wave spawns.
Definition: AlienMission.h:78
const std::string & getRace() const
Gets the mission's race.
Definition: AlienMission.h:74
void load(const YAML::Node &node, SavedGame &game)
Loads the mission from YAML.
Definition: AlienMission.cpp:76
bool isOver() const
Is this mission over?
Definition: AlienMission.cpp:127
The core of the game engine, manages the game's entire contents and structure.
Definition: Game.h:45
Interactive globe view of the world.
Definition: Globe.h:45
Stores fixed information about a mission type.
Definition: RuleAlienMission.h:62
Represents a specific region of the world.
Definition: RuleRegion.h:66
Represents a specific type of UFO.
Definition: RuleUfo.h:38
Set of rules and stats for a game.
Definition: Ruleset.h:70
The game data that gets written to disk when the game is saved.
Definition: SavedGame.h:81
Represents an alien UFO on the map.
Definition: Ufo.h:42
Holds information about a specific trajectory.
Definition: UfoTrajectory.h:50
COPYING:
Definition: BaseInfoState.cpp:41