23 #include <yaml-cpp/yaml.h> 28 class WeightedOptions;
60 enum MissionObjective { OBJECTIVE_SCORE, OBJECTIVE_INFILTRATION, OBJECTIVE_BASE, OBJECTIVE_SITE, OBJECTIVE_RETALIATION, OBJECTIVE_SUPPLY };
74 const std::string &
getType()
const {
return _type; }
76 std::string
generateRace(
const size_t monthsPassed)
const;
78 void load(
const YAML::Node &node);
92 int getWeight(
const size_t monthsPassed)
const;
101 std::string _spawnUfo;
103 std::vector<std::pair<size_t, WeightedOptions*> > _raceDistribution;
105 std::map<size_t, int> _weights;
107 std::vector<MissionWave> _waves;
111 MissionObjective _objective;
115 int _retaliationOdds;
117 std::string _siteType;
const MissionWave & getWave(size_t index) const
Gets the full wave information.
Definition: RuleAlienMission.h:82
bool objective
This wave performs the mission objective.
Definition: RuleAlienMission.h:57
const std::string & getType() const
Gets the mission's type.
Definition: RuleAlienMission.h:74
std::string generateRace(const size_t monthsPassed) const
Gets a race based on the game time and the racial distribution.
Definition: RuleAlienMission.cpp:143
size_t getWaveCount() const
Gets the number of waves.
Definition: RuleAlienMission.h:80
int getRetaliationOdds() const
Gets the inherent odds of this mission spawning a retaliation mission.
Definition: RuleAlienMission.cpp:188
int getPoints() const
Gets the score for this mission.
Definition: RuleAlienMission.cpp:156
std::string ufoType
The type of the spawned UFOs.
Definition: RuleAlienMission.h:37
MissionObjective getObjective() const
Gets the objective for this mission.
Definition: RuleAlienMission.h:86
~RuleAlienMission()
Releases all resources held by the mission.
Definition: RuleAlienMission.cpp:63
const std::string & getSpawnUfo() const
Gets the UFO type for special spawns.
Definition: RuleAlienMission.h:88
size_t ufoCount
The number of UFOs that will be generated.
Definition: RuleAlienMission.h:42
size_t spawnTimer
Number of minutes between UFOs in the wave.
Definition: RuleAlienMission.h:52
int getSpawnZone() const
Gets the zone for spawning an alien site or base.
Definition: RuleAlienMission.h:90
std::string trajectory
The trajectory ID for this wave's UFOs.
Definition: RuleAlienMission.h:47
Information about a mission wave.
Definition: RuleAlienMission.h:34
Stores fixed information about a mission type.
Definition: RuleAlienMission.h:67
int getWeight(const size_t monthsPassed) const
Gets the chances of this mission based on the game time.
Definition: RuleAlienMission.cpp:166
void load(const YAML::Node &node)
Loads alien mission data from YAML.
Definition: RuleAlienMission.cpp:75
std::string getSiteType() const
the type of missionSite to spawn (if any)
Definition: RuleAlienMission.h:96
Definition: BaseInfoState.cpp:40