UFO: Alien Invasion
|
Campaign mission code for alien bases. More...
#include "../../../cl_shared.h"
#include "../cp_campaign.h"
#include "../cp_alienbase.h"
#include "../cp_geoscape.h"
#include "../cp_ufo.h"
#include "../cp_missions.h"
#include "../cp_time.h"
#include "../cp_xvi.h"
#include "../cp_alien_interest.h"
#include "cp_mission_buildbase.h"
#include "cp_mission_recon.h"
Go to the source code of this file.
Macros | |
#define | HAPPINESS_SUBVERSION_LOSS -0.15 |
Functions | |
bool | CP_BasemissionIsSubvertingGovernmentMission (const mission_t *mission) |
void | CP_BuildBaseMissionIsSuccess (mission_t *mission) |
Build Base mission is over and is a success (from an alien point of view): change interest values. More... | |
void | CP_BuildBaseMissionIsFailure (mission_t *mission) |
Build Base mission is over and is a failure (from an alien point of view): change interest values. More... | |
void | CP_BuildBaseMissionOnSpawn (void) |
Run when the mission is spawned. More... | |
void | CP_BuildBaseMissionBaseDestroyed (mission_t *mission) |
Alien base has been destroyed: change interest values. More... | |
static void | CP_BuildBaseMissionLeave (mission_t *mission) |
Build Base mission ends: UFO leave earth. More... | |
static void | CP_BuildBaseSetUpBase (mission_t *mission) |
UFO arrived on new base destination: build base. More... | |
static void | CP_BuildBaseGoToBase (mission_t *mission) |
Go to new base position. More... | |
static void | CP_BuildBaseGovernmentLeave (const campaign_t *campaign, mission_t *mission) |
Subverting Mission ends: UFO leave earth. More... | |
static void | CP_BuildBaseSubvertGovernment (mission_t *mission) |
Start Subverting Mission. More... | |
static void | CP_BuildBaseChooseMission (mission_t *mission) |
Choose if the mission should be an alien infiltration or a build base mission. More... | |
void | CP_BuildBaseMissionNextStage (const campaign_t *campaign, mission_t *mission) |
Determine what action should be performed when a Build Base mission stage ends. More... | |
Campaign mission code for alien bases.
Definition in file cp_mission_buildbase.cpp.
#define HAPPINESS_SUBVERSION_LOSS -0.15 |
Definition at line 38 of file cp_mission_buildbase.cpp.
Referenced by CP_BuildBaseGovernmentLeave().
bool CP_BasemissionIsSubvertingGovernmentMission | ( | const mission_t * | mission | ) |
This mission type has no alienbase set
mission | The mission to check |
Definition at line 45 of file cp_mission_buildbase.cpp.
References campaign_s::alienBaseInterest, ccs, ccs_s::curCampaign, and mission_s::initialOverallInterest.
Referenced by CP_BuildBaseChooseMission(), CP_BuildBaseMissionIsSuccess(), CP_BuildBaseMissionNextStage(), CP_MissionChooseUFO(), and MIS_LoadXML().
Choose if the mission should be an alien infiltration or a build base mission.
Definition at line 229 of file cp_mission_buildbase.cpp.
References CP_BasemissionIsSubvertingGovernmentMission(), CP_BuildBaseGoToBase(), and CP_ReconMissionGroundGo().
Referenced by CP_BuildBaseMissionNextStage().
Go to new base position.
[in,out] | mission | Pointer to the mission |
Definition at line 165 of file cp_mission_buildbase.cpp.
References AB_SetAlienBasePosition(), mission_s::pos, mission_s::stage, STAGE_MISSION_GOTO, mission_s::ufo, and UFO_SendToDestination().
Referenced by CP_BuildBaseChooseMission().
|
static |
Subverting Mission ends: UFO leave earth.
Definition at line 180 of file cp_mission_buildbase.cpp.
References CP_MissionDisableTimeLimit(), GEO_GetNation(), nationInfo_s::happiness, HAPPINESS_SUBVERSION_LOSS, aircraft_s::landed, campaign_s::minhappiness, NAT_GetCurrentMonthInfo(), NAT_SetHappiness(), mission_s::pos, mission_s::stage, STAGE_RETURN_TO_ORBIT, mission_s::ufo, and UFO_SetRandomDest().
Referenced by CP_BuildBaseMissionNextStage().
Alien base has been destroyed: change interest values.
Definition at line 99 of file cp_mission_buildbase.cpp.
References AB_DestroyBase(), mission_s::missionData_t::alienBase, CP_MissionRemove(), mission_s::data, f, INT_ChangeIndividualInterest(), INTERESTCATEGORY_BUILDING, and INTERESTCATEGORY_INTERCEPT.
Referenced by CP_MissionIsOver().
Build Base mission is over and is a failure (from an alien point of view): change interest values.
Definition at line 78 of file cp_mission_buildbase.cpp.
References CP_MissionRemove(), f, INT_ChangeIndividualInterest(), INTERESTCATEGORY_BASE_ATTACK, and INTERESTCATEGORY_BUILDING.
Referenced by CP_MissionIsOver().
Build Base mission is over and is a success (from an alien point of view): change interest values.
Definition at line 54 of file cp_mission_buildbase.cpp.
References mission_s::missionData_t::alienBase, CP_BasemissionIsSubvertingGovernmentMission(), CP_IsXVIStarted, CP_MissionRemove(), CP_SpreadXVIAtPos(), mission_s::data, f, INT_ChangeIndividualInterest(), INTERESTCATEGORY_HARVEST, INTERESTCATEGORY_SUPPLY, INTERESTCATEGORY_TERROR_ATTACK, INTERESTCATEGORY_XVI, and alienBase_s::pos.
Referenced by CP_BuildBaseMissionNextStage(), and CP_MissionIsOver().
Build Base mission ends: UFO leave earth.
Definition at line 117 of file cp_mission_buildbase.cpp.
References mission_s::missionData_t::alienBase, CP_MissionDisableTimeLimit(), mission_s::data, aircraft_s::landed, mission_s::stage, STAGE_RETURN_TO_ORBIT, mission_s::ufo, and UFO_SetRandomDest().
Referenced by CP_BuildBaseMissionNextStage().
void CP_BuildBaseMissionNextStage | ( | const campaign_t * | campaign, |
mission_t * | mission | ||
) |
Determine what action should be performed when a Build Base mission stage ends.
[in] | campaign | The campaign data structure |
[in] | mission | Pointer to the mission which stage ended. |
Definition at line 242 of file cp_mission_buildbase.cpp.
References cgi, CP_BasemissionIsSubvertingGovernmentMission(), CP_BuildBaseChooseMission(), CP_BuildBaseGovernmentLeave(), CP_BuildBaseMissionIsSuccess(), CP_BuildBaseMissionLeave(), CP_BuildBaseSetUpBase(), CP_BuildBaseSubvertGovernment(), CP_MissionBegin(), CP_MissionRemove(), mission_s::stage, STAGE_BUILD_BASE, STAGE_COME_FROM_ORBIT, STAGE_MISSION_GOTO, STAGE_NOT_ACTIVE, STAGE_RETURN_TO_ORBIT, and STAGE_SUBVERT_GOV.
Referenced by CP_MissionStageEnd().
Run when the mission is spawned.
Definition at line 90 of file cp_mission_buildbase.cpp.
References f, INT_ChangeIndividualInterest(), and INTERESTCATEGORY_BUILDING.
Referenced by CP_CreateNewMission().
UFO arrived on new base destination: build base.
[in,out] | mission | Pointer to the mission |
< Minimum time needed to start a new base construction
< Maximum time needed to start a new base construction
Definition at line 136 of file cp_mission_buildbase.cpp.
References AB_BuildBase(), mission_s::missionData_t::alienBase, ccs, cgi, CP_MissionRemove(), CP_UFORemoveFromGeoscape(), mission_s::data, ccs_s::date, Date_Add(), Date_Random(), DEBUG_CLIENT, mission_s::finalDate, mission_s::pos, mission_s::stage, STAGE_BUILD_BASE, and mission_s::ufo.
Referenced by CP_BuildBaseMissionNextStage().
Start Subverting Mission.
Definition at line 208 of file cp_mission_buildbase.cpp.
References ccs, CP_MissionAddToGeoscape(), CP_UFORemoveFromGeoscape(), ccs_s::date, Date_Add(), Date_Random(), mission_s::finalDate, mission_s::stage, STAGE_SUBVERT_GOV, and mission_s::ufo.
Referenced by CP_BuildBaseMissionNextStage().