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);
size_t getWaveCountdown() const
Gets the minutes until next wave spawns.
Definition: AlienMission.h:78
Represents an alien base on the world.
Definition: AlienBase.h:32
~AlienMission()
Cleans up the mission info.
Definition: AlienMission.cpp:56
Represents an ongoing alien mission.
Definition: AlienMission.h:45
void ufoShotDown(Ufo &ufo, Game &engine, const Globe &globe)
Handle UFO shot down.
Definition: AlienMission.cpp:493
void setAlienBase(const AlienBase *base)
Sets the alien base for this mission.
Definition: AlienMission.cpp:589
void decreaseLiveUfos()
Decrease number of live UFOs.
Definition: AlienMission.h:101
The game data that gets written to disk when the game is saved.
Definition: SavedGame.h:80
Interactive globe view of the world.
Definition: Globe.h:44
bool isOver() const
Is this mission over?
Definition: AlienMission.cpp:127
const std::string & getRegion() const
Gets the mission's region.
Definition: AlienMission.h:70
const AlienBase * getAlienBase() const
Gets the alien base for this mission.
Definition: AlienMission.cpp:598
AlienMission(const RuleAlienMission &rule)
Creates a mission of the specified type.
Definition: AlienMission.cpp:51
Set of rules and stats for a game.
Definition: Ruleset.h:69
YAML::Node save() const
Saves the mission to YAML.
Definition: AlienMission.cpp:98
void think(Game &engine, const Globe &globe)
Handle UFO spawning for the mission.
Definition: AlienMission.cpp:153
Holds information about a specific trajectory.
Definition: UfoTrajectory.h:49
void ufoReachedWaypoint(Ufo &ufo, Game &engine, const Globe &globe)
Handle UFO reaching a waypoint.
Definition: AlienMission.cpp:360
void setRace(const std::string &race)
Sets the mission's race.
Definition: AlienMission.h:76
const std::string & getRace() const
Gets the mission's race.
Definition: AlienMission.h:74
int getId() const
Gets the unique ID for this mission.
Definition: AlienMission.cpp:578
void setWaveCountdown(size_t minutes)
Sets the minutes until next wave spawns.
Definition: AlienMission.cpp:554
void start(size_t initialCount=0)
Initialize with values from rules.
Definition: AlienMission.cpp:321
Stores fixed information about a mission type.
Definition: RuleAlienMission.h:61
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
Represents an alien UFO on the map.
Definition: Ufo.h:41
const std::string & getType() const
Gets the mission's type.
Definition: AlienMission.cpp:116
The core of the game engine, manages the game's entire contents and structure.
Definition: Game.h:44
void load(const YAML::Node &node, SavedGame &game)
Loads the mission from YAML.
Definition: AlienMission.cpp:76
Represents a specific type of UFO.
Definition: RuleUfo.h:37
void addScore(const double lon, const double lat, Game &engine)
Handle Points for mission successes.
Definition: AlienMission.cpp:609
Represents a specific region of the world.
Definition: RuleRegion.h:65
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